forked frommicropython/micropython
- Notifications
You must be signed in to change notification settings - Fork0
Commit49f81d5
committed
tests/float/math_constants.py: Test actual e and pi constant values.
The existing test for `math.e` and `math.pi` constants can fail on certaintargets if the functions `math.exp()` and/or `math.cos()` are not accurateenough (eg out by an LSB of float precision). For example this testcurrently fails on PYBD_SF6 which uses double precision floats (and that'sdue to the `lib/libm_dbl/exp.c` implementation not being exact).This commit changes this constant test so that it tests the actual constantvalue, not the evaluation of `exp()` and `cos()` functions.Signed-off-by: Damien George <damien@micropython.org>1 parentdc1af38 commit49f81d5
1 file changed
+23
-4
lines changedLines changed: 23 additions & 4 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1 | 1 |
| |
| 2 | + | |
| 3 | + | |
| 4 | + | |
2 | 5 |
| |
3 |
| - | |
4 |
| - | |
| 6 | + | |
| 7 | + | |
5 | 8 |
| |
6 | 9 |
| |
7 | 10 |
| |
8 | 11 |
| |
9 |
| - | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
10 | 28 |
| |
11 |
| - | |
| 29 | + | |
| 30 | + |
0 commit comments
Comments
(0)