micropython/tests/float
Damien George 2e4dda3c20 py/modmath: Fix two-argument math function domain check.
Prior to this fix, pow(1.5, inf) and pow(0.5, -inf) (among other things)
would incorrectly raise a ValueError, because the result is inf with the
first argument being finite.  This commit fixes this by allowing the result
to be infinite if the first or second (or both) argument is infinite.

This fix doesn't affect the other three math functions that have two
arguments:
- atan2 never returns inf, so always fails isinf(ans)
- copysign returns inf only if the first argument x is inf, so will never
  reach the isinf(y) check
- fmod never returns inf, so always fails isinf(ans)

Signed-off-by: Damien George <damien@micropython.org>
2023-02-24 15:55:12 +11:00
..
array_construct.py
builtin_float_abs.py
builtin_float_hash.py
builtin_float_minmax.py
builtin_float_pow.py
builtin_float_round.py
builtin_float_round_intbig.py
bytearray_construct_endian.py
bytes_construct_endian.py
cmath_dunder.py
cmath_fun.py
cmath_fun_special.py
complex1.py
complex1_intbig.py
complex_dunder.py
complex_reverse_op.py
complex_special_methods.py
float1.py
float2int_doubleprec_intbig.py
float2int_fp30_intbig.py
float2int_intbig.py
float_array.py
float_compare.py
float_divmod.py
float_divmod_relaxed.py
float_dunder.py
float_format.py
float_format_ftoe.py
float_format_ftoe.py.exp
float_format_ints.py
float_format_ints_doubleprec.py
float_parse.py
float_parse_doubleprec.py
float_struct.py
inf_nan_arith.py
int_big_float.py
int_divzero.py
int_power.py
lexer.py
list_index.py
math_constants.py
math_constants_extra.py
math_domain.py py/modmath: Fix two-argument math function domain check. 2023-02-24 15:55:12 +11:00
math_domain_special.py
math_dunder.py
math_factorial_intbig.py
math_fun.py
math_fun_bool.py
math_fun_int.py
math_fun_intbig.py
math_fun_special.py
math_isclose.py
math_isclose.py.exp
python36.py
python36.py.exp
string_format.py
string_format2.py
string_format_fp30.py
string_format_modulo.py
string_format_modulo2.py
string_format_modulo2_intbig.py
string_format_modulo3.py
string_format_modulo3.py.exp
true_value.py
types.py