Hello all,

Anonymous wrote:
Alexander Best<arun...@freebsd.org>  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"

Reply via email to