[Python-checkins] bpo-37548: Document range of atan, acos and asin (GH-14717)

Mark Dickinson webhook-mailer at python.org
Sat Jul 13 09:59:58 EDT 2019


https://github.com/python/cpython/commit/dc3f99fa77f415077c20a9c2b3e953e5cd894076
commit: dc3f99fa77f415077c20a9c2b3e953e5cd894076
branch: master
author: Giovanni Cappellotto <potomak84 at gmail.com>
committer: Mark Dickinson <dickinsm at gmail.com>
date: 2019-07-13T14:59:55+01:00
summary:

bpo-37548: Document range of atan, acos and asin (GH-14717)

files:
M Doc/library/math.rst
M Misc/ACKS
M Modules/mathmodule.c

diff --git a/Doc/library/math.rst b/Doc/library/math.rst
index bfce41a7f4c4..be953cfe9599 100644
--- a/Doc/library/math.rst
+++ b/Doc/library/math.rst
@@ -366,17 +366,20 @@ Trigonometric functions
 
 .. function:: acos(x)
 
-   Return the arc cosine of *x*, in radians.
+   Return the arc cosine of *x*, in radians. The result is between ``0`` and
+   ``pi``.
 
 
 .. function:: asin(x)
 
-   Return the arc sine of *x*, in radians.
+   Return the arc sine of *x*, in radians. The result is between ``-pi/2`` and
+   ``pi/2``.
 
 
 .. function:: atan(x)
 
-   Return the arc tangent of *x*, in radians.
+   Return the arc tangent of *x*, in radians. The result is between ``-pi/2`` and
+   ``pi/2``.
 
 
 .. function:: atan2(y, x)
diff --git a/Misc/ACKS b/Misc/ACKS
index c0119992cffe..31f8dda888c8 100644
--- a/Misc/ACKS
+++ b/Misc/ACKS
@@ -251,6 +251,7 @@ Jp Calderone
 Arnaud Calmettes
 Daniel Calvelo
 Tony Campbell
+Giovanni Cappellotto
 Brett Cannon
 Tristan Carel
 Mike Carlton
diff --git a/Modules/mathmodule.c b/Modules/mathmodule.c
index 552cb78c88d1..92c40b3a9ff1 100644
--- a/Modules/mathmodule.c
+++ b/Modules/mathmodule.c
@@ -1072,19 +1072,22 @@ math_2(PyObject *const *args, Py_ssize_t nargs,
 
 FUNC1(acos, acos, 0,
       "acos($module, x, /)\n--\n\n"
-      "Return the arc cosine (measured in radians) of x.")
+      "Return the arc cosine (measured in radians) of x.\n\n"
+      "The result is between 0 and pi.")
 FUNC1(acosh, m_acosh, 0,
       "acosh($module, x, /)\n--\n\n"
       "Return the inverse hyperbolic cosine of x.")
 FUNC1(asin, asin, 0,
       "asin($module, x, /)\n--\n\n"
-      "Return the arc sine (measured in radians) of x.")
+      "Return the arc sine (measured in radians) of x.\n\n"
+      "The result is between -pi/2 and pi/2.")
 FUNC1(asinh, m_asinh, 0,
       "asinh($module, x, /)\n--\n\n"
       "Return the inverse hyperbolic sine of x.")
 FUNC1(atan, atan, 0,
       "atan($module, x, /)\n--\n\n"
-      "Return the arc tangent (measured in radians) of x.")
+      "Return the arc tangent (measured in radians) of x.\n\n"
+      "The result is between -pi/2 and pi/2.")
 FUNC2(atan2, m_atan2,
       "atan2($module, y, x, /)\n--\n\n"
       "Return the arc tangent (measured in radians) of y/x.\n\n"



More information about the Python-checkins mailing list