@@ -361,7 +361,7 @@ extern "C" double PyLong_AsDouble(PyObject* vv) noexcept {
361
361
mpfr_init_set_z (result, l->n , MPFR_RNDN);
362
362
363
363
double result_f = mpfr_get_d (result, MPFR_RNDN);
364
- if (isinf (result_f)) {
364
+ if (std:: isinf (result_f)) {
365
365
PyErr_SetString (PyExc_OverflowError, " long int too large to convert to float" );
366
366
return -1 ;
367
367
}
@@ -415,11 +415,11 @@ extern "C" PyAPI_FUNC(PyObject*) _PyLong_Format(PyObject* aa, int base, int addL
415
415
}
416
416
417
417
extern " C" PyObject* PyLong_FromDouble (double v) noexcept {
418
- if (isnan (v)) {
418
+ if (std:: isnan (v)) {
419
419
PyErr_SetString (PyExc_ValueError, " cannot convert float NaN to integer" );
420
420
return NULL ;
421
421
}
422
- if (isinf (v)) {
422
+ if (std:: isinf (v)) {
423
423
PyErr_SetString (PyExc_OverflowError, " cannot convert float infinity to integer" );
424
424
return NULL ;
425
425
}
@@ -1403,7 +1403,7 @@ Box* longTrueDiv(BoxedLong* v1, Box* _v2) {
1403
1403
1404
1404
double result_f = mpfr_get_d (result, MPFR_RNDN);
1405
1405
1406
- if (isinf (result_f)) {
1406
+ if (std:: isinf (result_f)) {
1407
1407
raiseExcHelper (OverflowError, " integer division result too large for a float" );
1408
1408
}
1409
1409
return boxFloat (result_f);
@@ -1431,7 +1431,7 @@ Box* longRTrueDiv(BoxedLong* v1, Box* _v2) {
1431
1431
mpfr_div (result, lhs_f, rhs_f, MPFR_RNDN);
1432
1432
1433
1433
double result_f = mpfr_get_d (result, MPFR_RNDZ);
1434
- if (isinf (result_f)) {
1434
+ if (std:: isinf (result_f)) {
1435
1435
raiseExcHelper (OverflowError, " integer division result too large for a float" );
1436
1436
}
1437
1437
return boxFloat (result_f);
0 commit comments