File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -513,7 +513,7 @@ PyObject* longdouble_to_pylong(long double value)
513513static Sleef_quad
514514longdouble_to_quad (long double value )
515515{
516- if (isnanl (value ) || isinfl (value ) || value == 0.0L )
516+ if (isnan (value ) || isinf (value ) || value == 0.0L )
517517 return Sleef_cast_from_doubleq1 ((double )value );
518518
519519 int exp ;
Original file line number Diff line number Diff line change 33#define NPY_TARGET_VERSION NPY_2_4_API_VERSION
44#define NO_IMPORT_ARRAY
55
6+ #include < cmath>
7+
68extern " C" {
79#include < Python.h>
8- #include < math.h>
910
1011#include " numpy/arrayobject.h"
1112#include " numpy/ndarraytypes.h"
@@ -243,12 +244,12 @@ QuadPrecision_int(QuadPrecisionObject *self)
243244 }
244245
245246 long double value = self->value .longdouble_value ;
246- if (isnanl (value))
247+ if (std::isnan (value))
247248 {
248249 PyErr_SetString (PyExc_ValueError, " cannot convert float NaN to integer" );
249250 return NULL ;
250251 }
251- if (isinfl (value))
252+ if (std::isinf (value))
252253 {
253254 PyErr_SetString (PyExc_OverflowError, " cannot convert float infinity to integer" );
254255 return NULL ;
You can’t perform that action at this time.
0 commit comments