summaryrefslogtreecommitdiffstatshomepage
path: root/py/modmath.c
diff options
context:
space:
mode:
Diffstat (limited to 'py/modmath.c')
-rw-r--r--py/modmath.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/py/modmath.c b/py/modmath.c
index 72b5dde517..861a23b48b 100644
--- a/py/modmath.c
+++ b/py/modmath.c
@@ -54,7 +54,7 @@ STATIC mp_obj_t math_generic_2(mp_obj_t x_obj, mp_obj_t y_obj, mp_float_t (*f)(m
mp_float_t x = mp_obj_get_float(x_obj);
mp_float_t y = mp_obj_get_float(y_obj);
mp_float_t ans = f(x, y);
- if ((isnan(ans) && !isnan(x) && !isnan(y)) || (isinf(ans) && !isinf(x))) {
+ if ((isnan(ans) && !isnan(x) && !isnan(y)) || (isinf(ans) && !isinf(x) && !isinf(y))) {
math_error();
}
return mp_obj_new_float(ans);