Mark Dickinson added the comment: Thanks, Tim!
Dare I suggest extending these rules to encompass things like sqrt(NaN), log(inf), etc., as follows: - return a special value in Python where IEEE-754r/C99 specifies a special value, but doesn't raise any of the three divide-by-zero, invalid, or overflow exceptions, and - raise OverflowError or ValueError as appropriate where IEEE-754r specifies raising one of these exceptions. So e.g. cos(infinity) should give a ValueError, while log(infinity) and exp(infinity) should not raise any Python exception, but should return an infinity instead. And most single variable operations should return an input NaN unaltered, without raising an exception. __________________________________ Tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue1640> __________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com