From 2e54d9d146b34d7ad00e4394c9767f4319244cdf Mon Sep 17 00:00:00 2001 From: stijn Date: Tue, 8 Sep 2020 15:22:34 +0200 Subject: py: Fix handling of NaN in certain pow implementations. Adds a new compile-time option MICROPY_PY_MATH_POW_FIX_NAN for use with toolchains that don't handle pow-of-NaN correctly. --- tests/float/math_domain.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'tests/float') diff --git a/tests/float/math_domain.py b/tests/float/math_domain.py index e63628cf5..0c25dc08b 100644 --- a/tests/float/math_domain.py +++ b/tests/float/math_domain.py @@ -38,7 +38,7 @@ for name, f, args in ( # double argument functions for name, f, args in ( - ("pow", math.pow, ((0, 2), (-1, 2), (0, -1), (-1, 2.3))), + ("pow", math.pow, ((0, 2), (-1, 2), (0, -1), (-1, 2.3), (nan, 0), (1, nan))), ("fmod", math.fmod, ((1.2, inf), (1.2, -inf), (1.2, 0), (inf, 1.2))), ("atan2", math.atan2, ((0, 0), (-inf, inf), (-inf, -inf), (inf, -inf))), ("copysign", math.copysign, ()), -- cgit v1.2.3