diff options
Diffstat (limited to 'Include/internal/pycore_pymath.h')
| -rw-r--r-- | Include/internal/pycore_pymath.h | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/Include/internal/pycore_pymath.h b/Include/internal/pycore_pymath.h index b1a2004..38f76d0 100644 --- a/Include/internal/pycore_pymath.h +++ b/Include/internal/pycore_pymath.h @@ -8,6 +8,34 @@ extern "C" { # error "this header requires Py_BUILD_CORE define" #endif + +// Python provides implementations for copysign(), round() and hypot() in +// Python/pymath.c just in case your math library doesn't provide the +// functions. +// +// Note: PC/pyconfig.h defines copysign as _copysign +#ifndef HAVE_COPYSIGN +extern double copysign(double, double); +#endif + +#ifndef HAVE_ROUND +extern double round(double); +#endif + +#ifndef HAVE_HYPOT +extern double hypot(double, double); +#endif + +// Extra declarations +#if !defined(_MSC_VER) && !defined(__STDC__) +extern double fmod (double, double); +extern double frexp (double, int *); +extern double ldexp (double, int); +extern double modf (double, double *); +extern double pow(double, double); +#endif // !defined(_MSC_VER) && !defined(__STDC__) + + /* _Py_ADJUST_ERANGE1(x) * _Py_ADJUST_ERANGE2(x, y) * Set errno to 0 before calling a libm function, and invoke one of these |
