Samantha said:
Hi - In order to use log2l() and log2f() in C, I apparently have to
include some C99 extension for math.h..Can anyone tell me what that
is? Also - how do I turn on ALL extensions? thanks!
The log2l() and log2f() functions, declared in <math.h>, were added in
C99; they didn't exist in the C90 standard (though I think they were
mentioned in the future library directions section).
Almost all C compilers these days fully support the C90 standard.
Many of them partially support the C99 standard. Very few fully
support the C99 standard.
The way to enable C99 features in your compiler is a question about
your compiler, not about the C language. Your best bet is to consult
the documentation for your compiler.
(I happen to know that the "-std=c99" option does this for gcc; if
you're using gcc, you should read the documentation to see exactly
what this option does.)