I noticed M_PI
is unavailable on c11
. By looking at /usr/include/math.h
I can see M_PI
is defined if:
#if !defined(__STRICT_ANSI__) || ((_XOPEN_SOURCE - 0) >= 500)
...
#define M_PI 3.1415...
#endif
Moreover in the math.h
from glibc __STRICT_ANSI__
is replaced with __USE_MISC
. I am completely lost with this.
What is the story in between --std=c11
and the constants defined in math.h
?
Which libc
should I consider on a debian
distribution ?
By the way, M_PI
is defined in c99
and gnu11
...
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…