RFA: Add definition of M_LOG2_E when compiling in ISO C99 mode
Jeff Johnston
jjohnstn@redhat.com
Fri Sep 7 16:02:00 GMT 2007
Nick Clifton wrote:
> Hi Jeff,
>
>> Thanks Nick for pointing this out. I have made a patch, slightly
>> different than yours, that fixes the problem. Basically, I just
>> defined a macro _M_LOG2E that is defined regardless. The macro is
>> used by log2 and log2f and M_LOG2E uses it as well.
>
> Ok, but can you enlighten me a little bit please ? What is the
> difference between M_LOG2E and M_LOG2_E ? They are both defined in
> math.h, but have different values and the log2() and log2f macros
> which used to use the value of M_LOG2_E now use M_LOG2E.
>
> Cheers
> Nick
There are two macros with similar names and different meaning. One is
the ln of 2 and the other is the log2 of e. I had it right but then I
did a check making sure everything was the same and I thought I had
inadverently added the underscore between 2 and E. Thanks for catching
this...sigh..
-- Jeff J.
More information about the Newlib
mailing list