diff options
author | Christian Heimes <christian@cheimes.de> | 2008-01-03 22:32:26 (GMT) |
---|---|---|
committer | Christian Heimes <christian@cheimes.de> | 2008-01-03 22:32:26 (GMT) |
commit | eebb79cc690e8ab02cb7f630cfbc046df2c0f4da (patch) | |
tree | e6eae18d02015f5adb8535f3b69cf33e1ba9eb51 /Doc/library/math.rst | |
parent | 000a074c955a1964959ee908300ef49b41170a06 (diff) | |
download | cpython-eebb79cc690e8ab02cb7f630cfbc046df2c0f4da.zip cpython-eebb79cc690e8ab02cb7f630cfbc046df2c0f4da.tar.gz cpython-eebb79cc690e8ab02cb7f630cfbc046df2c0f4da.tar.bz2 |
Added copysign(x, y) function to the math module
Diffstat (limited to 'Doc/library/math.rst')
-rw-r--r-- | Doc/library/math.rst | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/Doc/library/math.rst b/Doc/library/math.rst index d0b03ed..36cdbce 100644 --- a/Doc/library/math.rst +++ b/Doc/library/math.rst @@ -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*. |