Documentation errors in the new half-turn *pi functions #157135
Copy link
Copy link
Closed
Labels
docsDocumentation in the Doc dirDocumentation in the Doc dir
Description
Bug description:
Four statements added with the half-turn functions in GH-150555 describe a different function than the one they document.
$ ./python -c 'import math; print(math.atanpi.__doc__); print(math.atanpi(-1), math.atan2pi(-1, -1), math.atanpi(-1 / -1))'
Return the arc tangent (measured in half-turns) of x.
The result is between 0 and 1.
-0.25 -0.75 0.25
atanpi's docstring inModules/mathmodule.csays "The result is between 0 and 1". The range is -1/2 to 1/2, asDoc/library/math.rststates.- The trigonometric summary table in
Doc/library/math.rstdescribesatan2pi(y, x)as "atan(y / x), in half-turns".atanreturns radians, and the entry for the function itself saysatanpi(y / x). - The comment above
m_atanpiinModules/mathmodule.creads "asin(x)/pi". The function computesatan(x)/pi. - The comment above
m_atan2piinModules/mathmodule.creads "asin(x)/pi". The function computesatan2(y, x)/pi.
CPython versions tested on:
CPython main branch
Operating systems tested on:
Linux
Linked PRs
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
docsDocumentation in the Doc dirDocumentation in the Doc dir
Projects
- StatusShow more project fieldsTodo
Activity
[-]`math.atanpi` docstring states the wrong result range[/-][+]Documentation errors in the new half-turn `*pi` functions[/+]gh-157135: Fix documentation errors in the `math.atan{2}pi` functions (…
Merge branch 'main' into tachyon-native-callable
pythongh-157135: Fix documentation errors in the `math.atan{2}pi` fun…
pythongh-157135: Fix documentation errors in the `math.atan{2}pi` fun…