Re: libm alternative in ports
Hello all, Anonymous wrote: Alexander Best writes: does anybody if there's an alternative for libm in the ports dir? i need it, because the newest snapshots of mplayer require log2() and log2f(), which the base libm doesn't support. for mplayer I'd suggest using code from x264 because both projects use GPLv2+ #if !HAVE_LOG2F #define log2f(x) (logf(x)/0.693147180559945f) #define log2(x) (log(x)/0.693147180559945) #endif In `math.h', there is the following definition: --8<--- #define M_LN2 0.69314718055994530942 /* log e2 */ --8<--- of which you can take advantage for your definition of log2f and log2. Note that this macro is not described in math(3). -- Regards, Michael ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"
Re: libm alternative in ports
Alexander Best writes: > hi there, > > does anybody if there's an alternative for libm in the ports dir? i need it, > because the newest snapshots of mplayer require log2() and log2f(), which the > base libm doesn't support. for mplayer I'd suggest using code from x264 because both projects use GPLv2+ #if !HAVE_LOG2F #define log2f(x) (logf(x)/0.693147180559945f) #define log2(x) (log(x)/0.693147180559945) #endif ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"
Re: libm alternative in ports
On Tue Nov 23 10, Tobias wrote: > On Tue, Nov 23, 2010 at 4:15 PM, Alexander Best wrote: > > > On Tue Nov 23 10, Chris Brennan wrote: > > > On Tue, Nov 23, 2010 at 4:00 PM, Alexander Best > > wrote: > > > > > > > hi there, > > > > > > > > does anybody if there's an alternative for libm in the ports dir? i > > need > > > > it, > > > > because the newest snapshots of mplayer require log2() and log2f(), > > which > > > > the > > > > base libm doesn't support. > > > > > > > > cheers. > > > > alex > > > > Can't you just calculate it yourself? > log2(n) = log10(n)/log10(2)? > http://logbase2.blogspot.com/2007/12/log-base-2.html thanks a lot for the hint. that might be a temporal solution. i don't think log2() and log2f() can be implemented that simply, because POSIX defines quite a few historical bugs which programs rely on. cheers. alex > > --Tobias -- a13x ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"
Re: libm alternative in ports
On Tue, Nov 23, 2010 at 4:15 PM, Alexander Best wrote: > On Tue Nov 23 10, Chris Brennan wrote: > > On Tue, Nov 23, 2010 at 4:00 PM, Alexander Best > wrote: > > > > > hi there, > > > > > > does anybody if there's an alternative for libm in the ports dir? i > need > > > it, > > > because the newest snapshots of mplayer require log2() and log2f(), > which > > > the > > > base libm doesn't support. > > > > > > cheers. > > > alex > Can't you just calculate it yourself? log2(n) = log10(n)/log10(2)? http://logbase2.blogspot.com/2007/12/log-base-2.html --Tobias ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"
Re: libm alternative in ports
On Tue Nov 23 10, Chris Brennan wrote: > On Tue, Nov 23, 2010 at 4:00 PM, Alexander Best wrote: > > > hi there, > > > > does anybody if there's an alternative for libm in the ports dir? i need > > it, > > because the newest snapshots of mplayer require log2() and log2f(), which > > the > > base libm doesn't support. > > > > cheers. > > alex > > > > > This is what a search of /usr/ports turned up for me (cd /usr/ports; > make search name=libm | grep -A1 Port >file) thanks but that doesn't help me very much. i'm looking for a replacement for /usr/lib/libm.so which features all POSIX defined mathematical abilities. the one that comes with FreeBSD is missing two vital functions. i know that the one that comes with netbsd and the one from mac os x have support for these functions. the FreeBSD developers however don't want to implement them for some reason. cheers. alex > > Port:libmspack-0.2_1 > Path:/usr/ports/archivers/libmspack > -- > Port:hs-libmpd-0.4.1 > Path:/usr/ports/audio/hs-libmpd > -- > Port:libmad-0.15.1b_2 > Path:/usr/ports/audio/libmad > -- > Port:libmikmod-3.1.11_2 > Path:/usr/ports/audio/libmikmod > -- > Port:libmodplug-0.8.8.1 > Path:/usr/ports/audio/libmodplug > -- > Port:libmp3-archive-perl-0.9 > Path:/usr/ports/audio/libmp3-archive-perl > -- > Port:libmp3splt-0.6 > Path:/usr/ports/audio/libmp3splt > -- > Port:libmpcdec-1.2.6 > Path:/usr/ports/audio/libmpcdec > -- > Port:libmpd-0.19.0 > Path:/usr/ports/audio/libmpd > -- > Port:libmpdclient-2.3 > Path:/usr/ports/audio/libmpdclient > -- > Port:libmtp-1.0.3 > Path:/usr/ports/audio/libmtp > -- > Port:libmusicbrainz-2.1.5 > Path:/usr/ports/audio/libmusicbrainz > -- > Port:libmusicbrainz3-3.0.3 > Path:/usr/ports/audio/libmusicbrainz3 > -- > Port:linux-libmad-0.15.1.b.3.2 > Path:/usr/ports/audio/linux-libmad > -- > Port:libmicro-0.4.0 > Path:/usr/ports/benchmarks/libmicro > -- > Port:libmemcache-1.4.0.r2_1 > Path:/usr/ports/databases/libmemcache > -- > Port:libmemcached-0.44 > Path:/usr/ports/databases/libmemcached > -- > Port:p5-Memcached-libmemcached-0.21.01 > Path:/usr/ports/databases/p5-Memcached-libmemcached > -- > Port:py26-pylibmc-1.1.1 > Path:/usr/ports/databases/py-pylibmc > -- > Port:glibmm-2.24.2_2,1 > Path:/usr/ports/devel/glibmm > -- > Port:glibmm-reference-2.24.2_5,1 > Path:/usr/ports/devel/glibmm-reference > -- > Port:libmaa-1.2.0,1 > Path:/usr/ports/devel/libmaa > -- > Port:libmatheval-1.1.5_3 > Path:/usr/ports/devel/libmatheval > -- > Port:libmba-0.9.1 > Path:/usr/ports/devel/libmba > -- > Port:libmcs-0.7.2 > Path:/usr/ports/devel/libmcs > -- > Port:libmimedir-0.5.1 > Path:/usr/ports/devel/libmimedir > -- > Port:libmonetra-7.0.4 > Path:/usr/ports/devel/libmonetra > -- > Port:libmowgli-0.7.1 > Path:/usr/ports/devel/libmowgli > -- > Port:libmpcbdm-0.0.3 > Path:/usr/ports/devel/libmpcbdm > -- > Port:libmsocket-0.4_1 > Path:/usr/ports/devel/libmsocket > -- > Port:libmtrie-1.0.3 > Path:/usr/ports/devel/libmtrie > -- > Port:libmaitretarot-0.1.98_4 > Path:/usr/ports/games/libmaitretarot > -- > Port:libmt_client-0.1.98_4 > Path:/usr/ports/games/libmt_client > -- > Port:libmng-1.0.10_2 > Path:/usr/ports/graphics/libmng > -- > Port:libmorph-0.1.2_1 > Path:/usr/ports/graphics/libmorph > -- > Port:linux-f10-libmng-1.0.9 > Path:/usr/ports/graphics/linux-f10-libmng > -- > Port:linux-f8-libmng-1.0.9_1 > Path:/usr/ports/graphics/linux-f8-libmng > -- > Port:linux-libmng-1.0.9_2 > Path:/usr/ports/graphics/linux-libmng > -- > Port:libmapi-0.9_2 > Path:/usr/ports/mail/libmapi > -- > Port:libmath++-0.0.3 > Path:/usr/ports/math/libmath++ > -- > Port:libmcal-0.7_2 > Path:/usr/ports/misc/libmcal > -- > Port:libmetalink-0.0.3 > Path:/usr/ports/misc/libmetalink > -- > Port:libmatroska-1.0.0 > Path:/usr/ports/multimedia/libmatroska > -- > Port:libmovtar-0.1.3_8 > Path:/usr/ports/multimedia/libmovtar > -- > Port:libmpeg2-0.5.1 > Path:/usr/ports/multimedia/libmpeg2 > -- > Port:libmpeg3-1.8 > Path:/usr/ports/multimedia/libmpeg3 > -- > Port:gstreamer-plugins-libmms-0.10.20,3 > Path:/usr/ports/net/gstreamer-plugins-libmms > -- > Port:libmms-0.5_1 > Path:/usr/ports/net/libmms > -- > Port:libmxp-0.2.4 > Path:/usr/ports/net/libmxp > -- > Port:libmsn-4.1 > Path:/usr/ports/net-im/libmsn > -- > Port:libmal-0.44.1 > Path:/usr/ports/palm/libmal > -- > Port:libmcrypt-2.5.8 > Path:/usr/ports/security/libmcrypt > -- > Port:libmrss-0.19.2_3 > Path:/usr/ports/textproc/libmrss > -- > Port:libmicrohttpd-0.4.2 > Path:/usr/ports/www/libmicrohttpd > -- > Port:graphics/libmovtar > Moved:multimedia/libmovtar > -- > Port:graphics/libmpeg
Re: libm alternative in ports
On Tue, Nov 23, 2010 at 4:00 PM, Alexander Best wrote: > hi there, > > does anybody if there's an alternative for libm in the ports dir? i need > it, > because the newest snapshots of mplayer require log2() and log2f(), which > the > base libm doesn't support. > > cheers. > alex > > This is what a search of /usr/ports turned up for me (cd /usr/ports; make search name=libm | grep -A1 Port >file) Port:libmspack-0.2_1 Path:/usr/ports/archivers/libmspack -- Port:hs-libmpd-0.4.1 Path:/usr/ports/audio/hs-libmpd -- Port:libmad-0.15.1b_2 Path:/usr/ports/audio/libmad -- Port:libmikmod-3.1.11_2 Path:/usr/ports/audio/libmikmod -- Port:libmodplug-0.8.8.1 Path:/usr/ports/audio/libmodplug -- Port:libmp3-archive-perl-0.9 Path:/usr/ports/audio/libmp3-archive-perl -- Port:libmp3splt-0.6 Path:/usr/ports/audio/libmp3splt -- Port:libmpcdec-1.2.6 Path:/usr/ports/audio/libmpcdec -- Port:libmpd-0.19.0 Path:/usr/ports/audio/libmpd -- Port:libmpdclient-2.3 Path:/usr/ports/audio/libmpdclient -- Port:libmtp-1.0.3 Path:/usr/ports/audio/libmtp -- Port:libmusicbrainz-2.1.5 Path:/usr/ports/audio/libmusicbrainz -- Port:libmusicbrainz3-3.0.3 Path:/usr/ports/audio/libmusicbrainz3 -- Port:linux-libmad-0.15.1.b.3.2 Path:/usr/ports/audio/linux-libmad -- Port:libmicro-0.4.0 Path:/usr/ports/benchmarks/libmicro -- Port:libmemcache-1.4.0.r2_1 Path:/usr/ports/databases/libmemcache -- Port:libmemcached-0.44 Path:/usr/ports/databases/libmemcached -- Port:p5-Memcached-libmemcached-0.21.01 Path:/usr/ports/databases/p5-Memcached-libmemcached -- Port:py26-pylibmc-1.1.1 Path:/usr/ports/databases/py-pylibmc -- Port:glibmm-2.24.2_2,1 Path:/usr/ports/devel/glibmm -- Port:glibmm-reference-2.24.2_5,1 Path:/usr/ports/devel/glibmm-reference -- Port:libmaa-1.2.0,1 Path:/usr/ports/devel/libmaa -- Port:libmatheval-1.1.5_3 Path:/usr/ports/devel/libmatheval -- Port:libmba-0.9.1 Path:/usr/ports/devel/libmba -- Port:libmcs-0.7.2 Path:/usr/ports/devel/libmcs -- Port:libmimedir-0.5.1 Path:/usr/ports/devel/libmimedir -- Port:libmonetra-7.0.4 Path:/usr/ports/devel/libmonetra -- Port:libmowgli-0.7.1 Path:/usr/ports/devel/libmowgli -- Port:libmpcbdm-0.0.3 Path:/usr/ports/devel/libmpcbdm -- Port:libmsocket-0.4_1 Path:/usr/ports/devel/libmsocket -- Port:libmtrie-1.0.3 Path:/usr/ports/devel/libmtrie -- Port:libmaitretarot-0.1.98_4 Path:/usr/ports/games/libmaitretarot -- Port:libmt_client-0.1.98_4 Path:/usr/ports/games/libmt_client -- Port:libmng-1.0.10_2 Path:/usr/ports/graphics/libmng -- Port:libmorph-0.1.2_1 Path:/usr/ports/graphics/libmorph -- Port:linux-f10-libmng-1.0.9 Path:/usr/ports/graphics/linux-f10-libmng -- Port:linux-f8-libmng-1.0.9_1 Path:/usr/ports/graphics/linux-f8-libmng -- Port:linux-libmng-1.0.9_2 Path:/usr/ports/graphics/linux-libmng -- Port:libmapi-0.9_2 Path:/usr/ports/mail/libmapi -- Port:libmath++-0.0.3 Path:/usr/ports/math/libmath++ -- Port:libmcal-0.7_2 Path:/usr/ports/misc/libmcal -- Port:libmetalink-0.0.3 Path:/usr/ports/misc/libmetalink -- Port:libmatroska-1.0.0 Path:/usr/ports/multimedia/libmatroska -- Port:libmovtar-0.1.3_8 Path:/usr/ports/multimedia/libmovtar -- Port:libmpeg2-0.5.1 Path:/usr/ports/multimedia/libmpeg2 -- Port:libmpeg3-1.8 Path:/usr/ports/multimedia/libmpeg3 -- Port:gstreamer-plugins-libmms-0.10.20,3 Path:/usr/ports/net/gstreamer-plugins-libmms -- Port:libmms-0.5_1 Path:/usr/ports/net/libmms -- Port:libmxp-0.2.4 Path:/usr/ports/net/libmxp -- Port:libmsn-4.1 Path:/usr/ports/net-im/libmsn -- Port:libmal-0.44.1 Path:/usr/ports/palm/libmal -- Port:libmcrypt-2.5.8 Path:/usr/ports/security/libmcrypt -- Port:libmrss-0.19.2_3 Path:/usr/ports/textproc/libmrss -- Port:libmicrohttpd-0.4.2 Path:/usr/ports/www/libmicrohttpd -- Port:graphics/libmovtar Moved:multimedia/libmovtar -- Port:graphics/libmpeg2 Moved:multimedia/libmpeg2 -- Port:deskutils/libmrproject Moved:deskutils/planner -- Port:audio/libmusepack Moved:audio/libmpcdec -- Port:multimedia/gpac-libm4systems Moved:multimedia/gpac-libgpac -- Port:net/libmsn Moved:net-im/libmsn -- Port:devel/libmusclecard Moved: -- Port:graphics/gstreamer-plugins-libmng Moved:graphics/gstreamer-plugins-libmng80 -- Port:graphics/gstreamer-plugins-libmng80 Moved: -- Port:net/gstreamer-plugins-libmms80 Moved:net/gstreamer-plugins-libmms -- Port:devel/libmcve Moved:devel/libmonetra -- Port:audio/py-libmpdclient Moved: -- Port:multimedia/mpeg4ip-libmp4v2 Moved:multimedia/mp4v2 I'm not exactly sure what your looking for but it may be one of these , hth _
libm alternative in ports
hi there, does anybody if there's an alternative for libm in the ports dir? i need it, because the newest snapshots of mplayer require log2() and log2f(), which the base libm doesn't support. cheers. alex -- a13x ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"