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 tests/float: Skip new complex tests if complex unavailable. 2023-02-09 15:20:00 +11:00
cmath_fun.py
cmath_fun_special.py
complex1.py py/parsenum: Fix parsing of complex "j" and also "nanj", "infj". 2022-06-23 11:46:47 +10:00
complex1_intbig.py
complex_dunder.py py/obj: Make mp_obj_get_complex_maybe call mp_obj_get_float_maybe first. 2022-07-25 16:11:26 +10:00
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 py/obj: Add support for __float__ and __complex__ functions. 2022-07-25 14:23:34 +10:00
float_format.py py/formatfloat: Use pow(10, e) instead of pos/neg_pow lookup tables. 2022-08-12 23:53:34 +10:00
float_format_ftoe.py py/formatfloat: Format all whole-number floats exactly. 2022-07-26 22:23:47 +10:00
float_format_ftoe.py.exp py/formatfloat: Format all whole-number floats exactly. 2022-07-26 22:23:47 +10:00
float_format_ints.py py/formatfloat: Format all whole-number floats exactly. 2022-07-26 22:23:47 +10:00
float_format_ints_doubleprec.py py/formatfloat: Use pow(10, e) instead of pos/neg_pow lookup tables. 2022-08-12 23:53:34 +10:00
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 tests/float: Make output of math function tests more readable. 2023-02-16 10:38:38 +11:00
math_dunder.py py/obj: Make mp_obj_get_complex_maybe call mp_obj_get_float_maybe first. 2022-07-25 16:11:26 +10:00
math_factorial_intbig.py
math_fun.py tests/float: Make output of math function tests more readable. 2023-02-16 10:38:38 +11:00
math_fun_bool.py
math_fun_int.py
math_fun_intbig.py
math_fun_special.py tests/float: Make output of math function tests more readable. 2023-02-16 10:38:38 +11:00
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 py/formatfloat: Use pow(10, e) instead of pos/neg_pow lookup tables. 2022-08-12 23:53:34 +10:00
string_format_modulo2.py
string_format_modulo2_intbig.py
string_format_modulo3.py
string_format_modulo3.py.exp
true_value.py
types.py