← index #5908PR #15539
Likely Duplicate · medium · value 0.587
QUERY · ISSUE

esp32: float/*_special tests fail

openby tveopened 2020-04-11updated 2020-04-13
port-esp32

The following two tests fail on the esp32: float/cmath_fun_special.py and float/math_domain_special.py:

> ./run-tests --device /dev/ttyUSB0 --target esp32 float/cmath_fun_special.py  float/math_domain_special.py
FAIL  float/cmath_fun_special.py
FAIL  float/math_domain_special.py
2 tests performed (105 individual testcases)
0 tests passed
2 tests failed: cmath_fun_special math_domain_special
> ./run-tests --print-failures

FAILURE float_math_domain_special.py
--- float_math_domain_special.py.exp    2020-04-11 09:47:24.921644291 -0700
+++ float_math_domain_special.py.out    2020-04-11 09:47:24.921644291 -0700
@@ -45,7 +45,7 @@
 gamma ValueError
 1.0000
 inf
-gamma ValueError
+inf
 nan
 lgamma ValueError
 lgamma ValueError

FAILURE float_cmath_fun_special.py
--- float_cmath_fun_special.py.exp      2020-04-11 09:47:24.621649221 -0700
+++ float_cmath_fun_special.py.out      2020-04-11 09:47:24.621649221 -0700
@@ -7,10 +7,10 @@
 complex(1, -0.68219)
 complex(-0.30103, 0)
 complex(-0.30103, 1.3644)
-complex(-0.15051, 0.34109)
-complex(-0.15051, 1.0233)
-complex(-0.15051, -0.34109)
-complex(-0.15051, -1.0233)
+complex(-0.15052, 0.34109)
+complex(-0.15052, 1.0233)
+complex(-0.15052, -0.34109)
+complex(-0.15052, -1.0233)
 complex(0.12448, 0.51506)
 complex(0.12448, 0.84932)
 complex(0.12448, -0.51506)
>
CANDIDATE · PULL REQUEST

esp32: Workaround math.gamma(-inf) result.

mergedby projectgusopened 2024-07-25updated 2024-08-07
port-esp32

Summary

Without this workaround, math.gamma(-float("inf")) returns inf instead of raising a math domain ValueError.

Found while testing #15523.

Upstream issue reported as https://github.com/espressif/esp-idf/issues/14273

Testing

tests/float/math_domain_special.py fails on esp32 without this fix.

This work was funded through GitHub Sponsors.

Keyboard

j / / n
next pair
k / / p
previous pair
1 / / h
show query pane
2 / / l
show candidate pane
c
copy suggested comment
r
toggle reasoning
g i
go to index
?
show this help
esc
close overlays

press ? or esc to close

copied