mirror of
https://github.com/python/cpython.git
synced 2025-09-26 10:19:53 +00:00
Added copysign(x, y) function to the math module
This commit is contained in:
parent
000a074c95
commit
eebb79cc69
4 changed files with 28 additions and 1 deletions
|
@ -31,6 +31,14 @@ Number-theoretic and representation functions:
|
|||
should return an :class:`Integral` value.
|
||||
|
||||
|
||||
.. function:: copysign(x, y)
|
||||
|
||||
Return *x* with the sign of *y*. ``copysign`` copies the sign bit of an IEEE
|
||||
754 float, ``copysign(1, -0.0)`` returns *-1.0*.
|
||||
|
||||
..versionadded:: 2.6
|
||||
|
||||
|
||||
.. function:: fabs(x)
|
||||
|
||||
Return the absolute value of *x*.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue