This is the mail archive of the newlib@sourceware.org mailing list for the newlib project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: RFA: Add definition of M_LOG2_E when compiling in ISO C99 mode


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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]