Skip to content
Merged
Changes from 1 commit
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
ad12476
Add *pi functions to math module
jepler May 27, 2026
03808d6
Add news item and remove testing code
jepler May 27, 2026
e9ec2b6
tests: Add math_testcases for the new *pi functions
jepler May 28, 2026
bb57325
fix discussion of atan2pi
jepler May 28, 2026
7650fa5
fix wrongly changed m_sinpi
jepler May 28, 2026
86de1c0
regenerate autoconf files with `make regen-configure`
jepler May 28, 2026
be980bf
remove accidentally-committed code
jepler May 29, 2026
d3254cd
mathdata: Add +-inf, nan tests for new functions
jepler May 29, 2026
6d8dd17
test_math: Let "mtestfile" test 2-arg functions
jepler May 29, 2026
0c7fdfb
math_testcases: Add testcases for atan2pi
jepler May 29, 2026
aa93326
These are now tested in math_testcases.txt
jepler May 29, 2026
e0ede77
Add whatsnew entry for math module changes
jepler May 29, 2026
694f479
Correct doc typos (atanpi2 -> atan2pi)
jepler May 29, 2026
ab68cdc
Correct comment about which standard this conforms to
jepler May 29, 2026
359ac19
Add 'versionadded' notes to new functions
jepler May 29, 2026
6cec4b8
Use float constants, not expressions, for simple values.
jepler May 29, 2026
d66a2c3
as x is finite, regular comparisons can be used here
jepler May 29, 2026
dcc5040
Merge remote-tracking branch 'origin/main' into c23-math-pifuns
jepler May 29, 2026
1f98ce6
remove comment about glibc
jepler May 30, 2026
12fcd24
Update comments based on review.
jepler May 30, 2026
56da6fc
math_methods: Re-sort and conform to surrounding spacing
jepler May 30, 2026
0e1ba52
Apply suggestions from code review
jepler May 31, 2026
c763c61
Update Modules/mathmodule.c
jepler May 31, 2026
e243ce3
apply lint fix
jepler May 31, 2026
4364ecb
Merge branch 'main' into c23-math-pifuns
serhiy-storchaka Jun 6, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
mathdata: Add +-inf, nan tests for new functions
  • Loading branch information
jepler committed May 29, 2026
commit d3254cd0fe79e4cd039e56631061f65737393eef
24 changes: 24 additions & 0 deletions Lib/test/mathdata/math_testcases.txt
Original file line number Diff line number Diff line change
Expand Up @@ -768,6 +768,10 @@ acospi10128 acospi 0.7071993350982666 -> 0.249958333374387
acospi10129 acospi 0.7071993911300235 -> 0.24995830814793119
acospi10130 acospi 0.7071993911300234 -> 0.24995830814793124

acospi20001 acospi inf -> nan invalid
acospi20002 acospi -inf -> nan invalid
acospi20003 acospi nan -> nan

------------
-- asinpi --
------------
Expand Down Expand Up @@ -878,6 +882,10 @@ asinpi10102 asinpi -0.6554325222969055 -> -0.2275136345890164
asinpi10103 asinpi -0.6554324978014275 -> -0.22751362426513144
asinpi10104 asinpi -0.6554324978014276 -> -0.2275136242651315

asinpi20001 asinpi inf -> nan invalid
asinpi20002 asinpi -inf -> nan invalid
asinpi20003 asinpi nan -> nan

------------
-- atanpi --
------------
Expand Down Expand Up @@ -946,6 +954,10 @@ atanpi10060 atanpi 0.19859452545642853 -> 0.06240267249610054
atanpi10061 atanpi 0.1985945401764544 -> 0.06240267700384578
atanpi10062 atanpi 0.19859454017645436 -> 0.06240267700384577

atanpi20001 atanpi inf -> 0.5
atanpi20002 atanpi -inf -> -0.5
atanpi20003 atanpi nan -> nan

-----------
-- cospi --
-----------
Expand Down Expand Up @@ -1235,6 +1247,10 @@ cospi10281 cospi -629430848.0 -> 1.0
cospi10282 cospi -629430785.4800935 -> -0.06249742289199851
cospi10283 cospi -629430785.4800936 -> -0.06249704911708015

cospi20001 cospi inf -> nan invalid
cospi20002 cospi -inf -> nan invalid
cospi20003 cospi nan -> nan

-----------
-- sinpi --
-----------
Expand Down Expand Up @@ -1550,6 +1566,10 @@ sinpi10307 sinpi -0.004973720293492079 -> -0.015624767310717469
sinpi10308 sinpi -0.004973719955059152 -> -0.015624766247628864
sinpi10309 sinpi -0.004973719955059153 -> -0.015624766247628865

sinpi20001 sinpi inf -> nan invalid
sinpi20002 sinpi -inf -> nan invalid
sinpi20003 sinpi nan -> nan

-----------
-- tanpi --
-----------
Expand Down Expand Up @@ -1830,3 +1850,7 @@ tanpi10272 tanpi -1.6591962575912476 -> 1.829923165916756
tanpi10273 tanpi -1.659196376800537 -> 1.8299215373295707
tanpi10274 tanpi -1.6591963470121214 -> 1.8299219442861712
tanpi10275 tanpi -1.6591963470121216 -> 1.829921944286168

tanpi20001 tanpi inf -> nan invalid
tanpi20002 tanpi -inf -> nan invalid
tanpi20003 tanpi nan -> nan