mirror of
https://github.com/python/cpython.git
synced 2025-12-15 21:44:50 +00:00
#12211: clarify math.copysign() documentation and docstring
This commit is contained in:
parent
e5235f1624
commit
8cb1ec3274
2 changed files with 10 additions and 3 deletions
|
|
@ -906,7 +906,11 @@ PyDoc_STRVAR(math_ceil_doc,
|
|||
"This is the smallest integral value >= x.");
|
||||
|
||||
FUNC2(copysign, copysign,
|
||||
"copysign(x, y)\n\nReturn x with the sign of y.")
|
||||
"copysign(x, y)\n\nReturn a float with the magnitude (absolute value) "
|
||||
"of x but the sign \nof y. On platforms that support signed zeros, "
|
||||
"copysign(1.0, -0.0) \nreturns -1.0.\n\n"
|
||||
"If x is NaN, y is ignored and NaN is returned. If y is NaN, it is\n"
|
||||
"treated as positive.")
|
||||
FUNC1(cos, cos, 0,
|
||||
"cos(x)\n\nReturn the cosine of x (measured in radians).")
|
||||
FUNC1(cosh, cosh, 1,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue