@@ -2421,14 +2421,14 @@ float_compactlong_guard(PyObject *lhs, PyObject *rhs)
24212421{
24222422 return (
24232423 PyFloat_CheckExact (lhs ) &&
2424+ !isnan (PyFloat_AsDouble (lhs )) &&
24242425 PyLong_CheckExact (rhs ) &&
2425- _PyLong_IsCompact ((PyLongObject * )rhs ) &&
2426- !isnan (PyFloat_AsDouble (lhs ))
2426+ _PyLong_IsCompact ((PyLongObject * )rhs )
24272427 );
24282428}
24292429
24302430static inline int
2431- float_compactlong_guard_true_div (PyObject * lhs , PyObject * rhs )
2431+ nonzero_float_compactlong_guard (PyObject * lhs , PyObject * rhs )
24322432{
24332433 return (
24342434 float_compactlong_guard (lhs , rhs ) && !PyLong_IsZero (rhs )
@@ -2455,15 +2455,15 @@ static inline int
24552455compactlong_float_guard (PyObject * lhs , PyObject * rhs )
24562456{
24572457 return (
2458- PyFloat_CheckExact (rhs ) &&
24592458 PyLong_CheckExact (lhs ) &&
24602459 _PyLong_IsCompact ((PyLongObject * )lhs ) &&
2460+ PyFloat_CheckExact (rhs ) &&
24612461 !isnan (PyFloat_AsDouble (rhs ))
24622462 );
24632463}
24642464
24652465static inline int
2466- compactlong_float_guard_true_div (PyObject * lhs , PyObject * rhs )
2466+ nonzero_compactlong_float_guard (PyObject * lhs , PyObject * rhs )
24672467{
24682468 return (
24692469 compactlong_float_guard (lhs , rhs ) && PyFloat_AsDouble (rhs ) != 0.0
@@ -2487,14 +2487,14 @@ LONG_FLOAT_ACTION(compactlong_float_true_div, /)
24872487static _PyBinaryOpSpecializationDescr float_compactlong_specs [NB_OPARG_LAST + 1 ] = {
24882488 [NB_ADD ] = {float_compactlong_guard , float_compactlong_add },
24892489 [NB_SUBTRACT ] = {float_compactlong_guard , float_compactlong_subtract },
2490- [NB_TRUE_DIVIDE ] = {float_compactlong_guard_true_div , float_compactlong_true_div },
2490+ [NB_TRUE_DIVIDE ] = {nonzero_float_compactlong_guard , float_compactlong_true_div },
24912491 [NB_MULTIPLY ] = {float_compactlong_guard , float_compactlong_multiply },
24922492};
24932493
24942494static _PyBinaryOpSpecializationDescr compactlong_float_specs [NB_OPARG_LAST + 1 ] = {
24952495 [NB_ADD ] = {compactlong_float_guard , compactlong_float_add },
24962496 [NB_SUBTRACT ] = {compactlong_float_guard , compactlong_float_subtract },
2497- [NB_TRUE_DIVIDE ] = {compactlong_float_guard_true_div , compactlong_float_true_div },
2497+ [NB_TRUE_DIVIDE ] = {nonzero_compactlong_float_guard , compactlong_float_true_div },
24982498 [NB_MULTIPLY ] = {compactlong_float_guard , compactlong_float_multiply },
24992499};
25002500
0 commit comments