additional M_PI definitions

release/4.3a0
Varun Agrawal 2023-12-28 12:00:47 -05:00
parent 5806f5f98c
commit 8db9e0146a
1 changed files with 6 additions and 0 deletions

View File

@ -102,9 +102,15 @@
#define cephes_isfinite(x) isfinite(x)
#endif
/* M_PI et al. are not defined in math.h in C99, even with _USE_MATH_DEFINES */
#if !defined(M_PI)
#define M_PI 3.14159265358979323846
#endif
#ifndef M_PI_2
#define M_PI_2 1.57079632679489661923 /* pi/2 */
#define M_1_PI 0.31830988618379067154 /* 1/pi */
#define M_2_PI 0.63661977236758134308 /* 2/pi */
#endif
/* Constants needed that are not available in the C standard library */
#define SCIPY_EULER 0.577215664901532860606512090082402431 /* Euler constant */