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.
This commit is contained in:
@@ -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, ()),
|
||||
|
||||
Reference in New Issue
Block a user