[issue12211] Better document math.copysign behavior.

Terry J. Reedy report at bugs.python.org
Sun Jun 26 18:54:18 CEST 2011


Terry J. Reedy <tjreedy at udel.edu> added the comment:

I agree with adding '(absolute value)'. I think the following covers the NaN behavior. "NaN acts as a positive value that cannot be negated." This should be added to both doc and docstring.

I do not think we generally specify the nan behavior for each function, but it usually follows general rules. The copysign(x,nan) behavior is not obvious as nan, like int 0, does not really have a sign. One might expect copysign(-1.0,nan) to be -1.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue12211>
_______________________________________


More information about the Python-bugs-list mailing list