18 extern double copysign(
double,
double);
22 extern double round(
double);
26 extern double hypot(
double,
double);
32 extern double fmod (
double,
double);
33 extern double frexp (
double,
int *);
34 extern double ldexp (
double,
int);
35 extern double modf (
double,
double *);
36 extern double pow(
double,
double);
42 extern int finite(
double);
43 extern double copysign(
double,
double);
50 #define Py_MATH_PIl 3.1415926535897932384626433832795029L
53 #define Py_MATH_PI 3.14159265358979323846
57 #define Py_MATH_El 2.7182818284590452353602874713526625L
61 #define Py_MATH_E 2.7182818284590452354
70 #ifndef Py_FORCE_DOUBLE
71 # ifdef X87_DOUBLE_ROUNDING
73 # define Py_FORCE_DOUBLE(X) (_Py_force_double(X))
75 # define Py_FORCE_DOUBLE(X) (X)
79 #ifdef HAVE_GCC_ASM_FOR_X87
80 PyAPI_FUNC(
unsigned short) _Py_get_387controlword(
void);
81 PyAPI_FUNC(
void) _Py_set_387controlword(
unsigned short);
94 #if defined HAVE_DECL_ISNAN && HAVE_DECL_ISNAN == 1
95 #define Py_IS_NAN(X) isnan(X)
97 #define Py_IS_NAN(X) ((X) != (X))
113 #ifndef Py_IS_INFINITY
114 # if defined HAVE_DECL_ISINF && HAVE_DECL_ISINF == 1
115 # define Py_IS_INFINITY(X) isinf(X)
117 # define Py_IS_INFINITY(X) ((X) && \
118 (Py_FORCE_DOUBLE(X)*0.5 == Py_FORCE_DOUBLE(X)))
129 #if defined HAVE_DECL_ISFINITE && HAVE_DECL_ISFINITE == 1
130 #define Py_IS_FINITE(X) isfinite(X)
131 #elif defined HAVE_FINITE
132 #define Py_IS_FINITE(X) finite(X)
134 #define Py_IS_FINITE(X) (!Py_IS_INFINITY(X) && !Py_IS_NAN(X))
146 #define Py_HUGE_VAL HUGE_VAL
154 #if !defined(Py_NAN) && !defined(Py_NO_NAN)
155 #define Py_NAN (Py_HUGE_VAL * 0.)
184 #if defined(__FreeBSD__) || defined(__OpenBSD__)
185 #define Py_OVERFLOWED(X) isinf(X)
187 #define Py_OVERFLOWED(X) ((X) != 0.0 && (errno == ERANGE || \
188 (X) == Py_HUGE_VAL || \
189 (X) == -Py_HUGE_VAL))