logb missing from Math.h?

support for the powerpc toolchain
Post Reply
Beau
Posts: 6
Joined: Thu Aug 13, 2009 7:13 pm

logb missing from Math.h?

Post by Beau » Thu Aug 13, 2009 7:16 pm

Is there a reason double logb(double) is not supported in Math.h even though it is in the ISO C standard?

I see it for C++ in tr1\cmath, however, it is not available in C.

Thanks.

Beau
Posts: 6
Joined: Thu Aug 13, 2009 7:13 pm

Re: logb missing from Math.h?

Post by Beau » Thu Aug 13, 2009 11:27 pm

I guess this is because newlib-1.17.0 does not support it officially/documented.

libm.a definately has this in it, however, I guess newlib decided to not include it in math.h:
/* Functions that are not documented, and are not in <math.h>. */
...
extern double logb __P((double));
...

Guess I'll just put this in my own copy of Math.h to allow this to be used.

Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests