This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author sandro.tosi
Recipients docs@python, mark.dickinson, r.david.murray, sandro.tosi, terry.reedy, umedoblock
Date 2011-06-26.07:49:26
SpamBayes Score 0.00025729658
Marked as misclassified No
Message-id <1309074567.02.0.116391635937.issue12211@psf.upfronthosting.co.za>
In-reply-to
Content
Taken from http://www.slac.stanford.edu/comp/unix/package/rtems/doc/html/libm/libm.info.copysign.html i'd suggest to extend

  Return a float with the magnitude of x

to

  Return a float with the magnitude (absolute value) of x

It could probably help people less math-savvy in understand what's going to happen :)

Maybe also (only in rest doc) might be nice to describe what happens in case the arguments are NaN, f.e.:

>>> import math
>>> x = float('nan')
>>> math.copysign(1., x)
1.0
>>> math.copysign(-1., x)
1.0
>>> math.copysign(x, -1)
nan
>>> math.copysign(x, x)
nan

umedoblock: would you like to expand the patch with these notes (unless someone objects :)).
History
Date User Action Args
2011-06-26 07:49:27sandro.tosisetrecipients: + sandro.tosi, terry.reedy, mark.dickinson, r.david.murray, docs@python, umedoblock
2011-06-26 07:49:27sandro.tosisetmessageid: <1309074567.02.0.116391635937.issue12211@psf.upfronthosting.co.za>
2011-06-26 07:49:26sandro.tosilinkissue12211 messages
2011-06-26 07:49:26sandro.tosicreate