Hanif Ariffin
65dcf1ce1c
Updating test_math.py to CPython 3.12.9 ( #5507 )
...
* Fixed implementation against CPython 3.12.9 Lib/test/test_math.py tests
---------
Signed-off-by: Hanif Ariffin <hanif.ariffin.4326@gmail.com >
Co-authored-by: Jeong YunWon <jeong@youknowone.org >
2025-02-20 11:21:12 +09:00
Yongjin
3a13a7bfda
update test_math.py from cpython 3.11.2
2023-03-25 15:21:41 +09:00
Devon Hollowood
3739372d43
Implement more accurate hypot()
...
This uses the improved-accuracy hypotenuse algorithm from Borges 2019,
see https://arxiv.org/abs/1904.09481 .
2022-10-26 23:44:13 -07:00
Devon Hollowood
dd5da766ab
Clean up a few obsolete TODOs in test_math.py
...
It looks like these were accidentally left in the codebase after #2773 .
2022-10-26 13:59:00 -07:00
Devon Hollowood
82b4990224
Use improved log2() implementation for log10()
...
This also fixes a bug in the log2() implementation, where very large
negative integer arguments would not raise an exception (and instead
would turn into NaNs).
2022-10-24 18:46:49 -07:00
Devon Hollowood
beeb0441ef
Allow log2() to work on large integers
2022-10-22 14:55:14 -07:00
Jeong YunWon
368e47cddb
Merge pull request #4151 from jopemachine/add-cbrt
...
Add `math.cbrt` implemented in cpython 3.11
2022-09-12 13:55:56 +09:00
Gyubong
e0f491ea8c
Fix edge case of math.pow(0.0, -inf), math.pow(-0.0, -inf)
2022-09-12 12:45:56 +09:00
Gyubong
96fc308c04
Add math.cbrt
...
Update math.rs
2022-09-12 12:39:53 +09:00
Gyubong
ea4f2e7bac
Update test_math.py from CPython v3.12.0a0
2022-09-11 11:16:11 +09:00
Gyubong
1933e5f56e
Add math.exp2
2022-09-08 17:00:42 +09:00
yyun-d
3070b19b36
Update test_math.py to cpython 3.10
2021-11-20 16:27:20 +09:00
Tetramad
c88c69a993
Fix math.log1p to pass some failed tests
...
Now math.log1p with less than or equal to negative one should raise
ValueError with "math domain error" message
2021-10-25 14:44:13 +09:00
Tetramad
ba3cafc932
Fix math.atanh to pass failed tests
...
Now math.atanh with out of domain value should raise ValueError with
"math domain error" message
2021-10-25 10:45:11 +09:00
Padraic Fanning
bb1947eb9d
Clarify skip in test_math
2021-10-15 00:09:50 +09:00
snpark
0c38ff5b89
fix: float_info is supported
2021-10-07 16:23:55 +09:00
Dongin Kim
1406f80c3c
fix failed test remainder in test_math
...
add conditions for below rules
1. remainder(x, inf) is x, for non-NaN non-infinite x
2. According to IEEE 754-2008 7.2(f)
2-1. remainder(x, 0) for non-NaN x is invalid operation
2-2. remainder(infinity, x) for non-NaN x is invalid operation
2021-09-11 20:00:29 +09:00
voidSatisfaction
e3f48bea95
Add math.dist function and enabled its tests ( #2920 )
...
Add math.dist function and enable its tests
2021-08-21 12:28:49 +03:00
Kim Dong In
6fa88ab05a
Fix failed test pow in test_math
...
add two conditions to raise ValueError for input values
case 1: NaN, when both input values are finite, and base is negative and exponent is non-integer
case 2: divde by zero, when base is 0 exponent is negative value
2021-08-16 16:45:45 +09:00
voidSatisfaction
67ede59c32
Add math.prod function and enable its tests
2021-08-15 23:20:28 +09:00
leesungbin
2c6208a5f8
Add math_perm method
...
Co-authored-by: Jeong YunWon <youknowone@users.noreply.github.com >
2021-08-11 02:29:44 +09:00
voidSatisfaction
3cd1f6b27c
Add math.comb function
2021-08-08 20:04:23 +09:00
jfh
53e8f5c17d
Uncomment tests, mark the failing/need to skip.
2021-08-01 04:21:42 +03:00
Yossi Konstantinovsky
e909f48f7e
math: fix ldexp
2021-07-12 10:39:43 +03:00
Yossi Konstantinovsky
963e6e3df6
math: raise OverflowError when result is infinite
...
Matches CPython behavior.
2021-07-12 10:35:31 +03:00
Zach Silver
83de5bdf13
Unmark testFloor and testCeil failure
2021-02-15 16:34:53 -08:00
carbotaniuman
9faed3582a
Address review
2020-12-21 22:29:15 -06:00
carbotaniuman
0ff37540ab
Add fsum to the math module
2020-12-19 19:32:08 -06:00
hyperbora
babebf0794
fix math.acosh
2020-10-31 00:26:18 +09:00
Noah
e772b42f36
Fix a few math tests and implement nextafter in rust
2020-10-25 13:43:33 -05:00
Árni Dagur
ab444d0a3e
Correct value of sys.float_info.min
2020-10-22 18:30:51 +00:00
Árni Dagur
da2bd5ea86
Implement math.ulp
2020-10-21 23:41:47 +00:00
Árni Dagur
72608545f3
Implement math.isqrt in Rust
2020-10-06 17:58:58 +00:00
hyperbora
c6ea8f9907
fix math.acos and math.asin
2020-10-03 22:37:43 +09:00
hyperbora
a1437a5be5
fix math.sqrt
2020-10-03 12:37:07 +09:00
Jeong YunWon
8e8efe0ec8
reform every TODO: RUSTPYTHON to same format
2020-06-17 18:47:13 +09:00
Noah
3ba023b738
Add todos in front of unittest.skip("RustPython") notes
2020-05-26 15:27:12 -05:00
TheAnyKey
b7e91677a7
simplified implementation and commented tests
2020-05-10 20:53:09 +00:00
TheAnyKey
ab9c2f2251
imported tests from cpython 3.6a5 for math. skipping all failing tests
2020-05-08 17:37:36 +00:00