Skip to content

Commit 7f3d7d0

Browse files
authored
gh-157135: Fix documentation errors in the math.atan{2}pi functions (#157136)
1 parent 36c7440 commit 7f3d7d0

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

Doc/library/math.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ noted otherwise, all return values are floats.
9090
:func:`atan(x) <atan>` Arc tangent of *x*, in radians
9191
:func:`atanpi(x) <atanpi>` Arc tangent of *x*, in half-turns
9292
:func:`atan2(y, x) <atan2>` ``atan(y / x)``, in radians
93-
:func:`atan2pi(y, x) <atan2pi>` ``atan(y / x)``, in half-turns
93+
:func:`atan2pi(y, x) <atan2pi>` ``atanpi(y / x)``, in half-turns
9494
:func:`cos(x) <cos>` Cosine of *x* radians
9595
:func:`cospi(x) <cospi>` Cosine of *x⋅π* radians
9696
:func:`sin(x) <sin>` Sine of *x* radians

Modules/mathmodule.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -256,7 +256,7 @@ m_asinpi(double x)
256256

257257
#ifndef HAVE_ATANPI
258258
/*
259-
asin(x)/pi. It conforms to C23 Annex 'F'.
259+
atan(x)/pi. It conforms to C23 Annex 'F'.
260260
*/
261261

262262
static double
@@ -274,7 +274,7 @@ m_atanpi(double x)
274274

275275
#ifndef HAVE_ATAN2PI
276276
/*
277-
asin(x)/pi. It conforms to C23 Annex 'F'.
277+
atan2(y, x)/pi. It conforms to C23 Annex 'F'.
278278
*/
279279

280280
static double
@@ -1136,7 +1136,7 @@ FUNC1D(atanh, atanh, 0,
11361136
FUNC1D(atanpi, m_atanpi, 0,
11371137
"atanpi($module, x, /)\n--\n\n"
11381138
"Return the arc tangent (measured in half-turns) of x.\n\n"
1139-
"The result is between 0 and 1.",
1139+
"The result is between -1/2 and 1/2.",
11401140
"expected a number in range from -1 up to 1, got %s")
11411141
FUNC1(cbrt, cbrt, 0,
11421142
"cbrt($module, x, /)\n--\n\n"

0 commit comments

Comments
 (0)