Hello, I have one point for this change. Why not to use M_PI* macros
which are available in glibc math.h header file?

glibc math.h in glibc contains:

#if defined __USE_MISC || defined __USE_XOPEN
...
# define M_PI           3.14159265358979323846  /* pi */
...
#endif

#ifdef __USE_GNU
...
# define M_PIl          3.141592653589793238462643383279502884L /* pi */
...
#endif

#if __HAVE_FLOAT16 && defined __USE_GNU
...
# define M_PIf16        __f16 (3.141592653589793238462643383279502884) /* pi */
...
#endif

#if __HAVE_FLOAT32 && defined __USE_GNU
...
# define M_PIf32        __f32 (3.141592653589793238462643383279502884) /* pi */
...
#endif

#if __HAVE_FLOAT64 && defined __USE_GNU
...
# define M_PIf64        __f64 (3.141592653589793238462643383279502884) /* pi */
...
#endif

#if __HAVE_FLOAT128 && defined __USE_GNU
...
# define M_PIf128       __f128 (3.141592653589793238462643383279502884) /* pi */
...
#endif

#if __HAVE_FLOAT32X && defined __USE_GNU
...
# define M_PIf32x       __f32x (3.141592653589793238462643383279502884) /* pi */
...
#endif

#if __HAVE_FLOAT64X && defined __USE_GNU
...
# define M_PIf64x       __f64x (3.141592653589793238462643383279502884) /* pi */
...
#endif

I see that mingw-w64 math.h does not define those M_PI macros with
suffixed, but would not be better to add them?

Usage of those suffixed macros requires from _application_ usage to
define -D_GNU_SOURCE (like any other GNU extension thing). mingw-w64
runtime code can use GNU extensions and lot of are already used (e.g.
inline assembly of gcc/gnu style).


_______________________________________________
Mingw-w64-public mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public

Reply via email to