Skip to content

Commit dc3f99f

Browse files
potomakmdickinson
authored andcommitted
bpo-37548: Document range of atan, acos and asin (GH-14717)
1 parent e6b46aa commit dc3f99f

File tree

3 files changed

+13
-6
lines changed

3 files changed

+13
-6
lines changed

Doc/library/math.rst

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -366,17 +366,20 @@ Trigonometric functions
366366

367367
.. function:: acos(x)
368368

369-
Return the arc cosine of *x*, in radians.
369+
Return the arc cosine of *x*, in radians. The result is between ``0`` and
370+
``pi``.
370371

371372

372373
.. function:: asin(x)
373374

374-
Return the arc sine of *x*, in radians.
375+
Return the arc sine of *x*, in radians. The result is between ``-pi/2`` and
376+
``pi/2``.
375377

376378

377379
.. function:: atan(x)
378380

379-
Return the arc tangent of *x*, in radians.
381+
Return the arc tangent of *x*, in radians. The result is between ``-pi/2`` and
382+
``pi/2``.
380383

381384

382385
.. function:: atan2(y, x)

Misc/ACKS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -251,6 +251,7 @@ Jp Calderone
251251
Arnaud Calmettes
252252
Daniel Calvelo
253253
Tony Campbell
254+
Giovanni Cappellotto
254255
Brett Cannon
255256
Tristan Carel
256257
Mike Carlton

Modules/mathmodule.c

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1072,19 +1072,22 @@ math_2(PyObject *const *args, Py_ssize_t nargs,
10721072

10731073
FUNC1(acos, acos, 0,
10741074
"acos($module, x, /)\n--\n\n"
1075-
"Return the arc cosine (measured in radians) of x.")
1075+
"Return the arc cosine (measured in radians) of x.\n\n"
1076+
"The result is between 0 and pi.")
10761077
FUNC1(acosh, m_acosh, 0,
10771078
"acosh($module, x, /)\n--\n\n"
10781079
"Return the inverse hyperbolic cosine of x.")
10791080
FUNC1(asin, asin, 0,
10801081
"asin($module, x, /)\n--\n\n"
1081-
"Return the arc sine (measured in radians) of x.")
1082+
"Return the arc sine (measured in radians) of x.\n\n"
1083+
"The result is between -pi/2 and pi/2.")
10821084
FUNC1(asinh, m_asinh, 0,
10831085
"asinh($module, x, /)\n--\n\n"
10841086
"Return the inverse hyperbolic sine of x.")
10851087
FUNC1(atan, atan, 0,
10861088
"atan($module, x, /)\n--\n\n"
1087-
"Return the arc tangent (measured in radians) of x.")
1089+
"Return the arc tangent (measured in radians) of x.\n\n"
1090+
"The result is between -pi/2 and pi/2.")
10881091
FUNC2(atan2, m_atan2,
10891092
"atan2($module, y, x, /)\n--\n\n"
10901093
"Return the arc tangent (measured in radians) of y/x.\n\n"

0 commit comments

Comments
 (0)