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 mark.dickinson
Recipients Rhamphoryncus, christian.heimes, gmcastil, gvanrossum, mark.dickinson, tim.peters
Date 2008-01-21.03:34:23
SpamBayes Score 0.069069766
Marked as misclassified No
Message-id <1200886466.04.0.101099736381.issue1640@psf.upfronthosting.co.za>
In-reply-to
Content
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.
History
Date User Action Args
2008-01-21 03:34:26mark.dickinsonsetspambayes_score: 0.0690698 -> 0.069069766
recipients: + mark.dickinson, gvanrossum, tim.peters, Rhamphoryncus, christian.heimes, gmcastil
2008-01-21 03:34:26mark.dickinsonsetspambayes_score: 0.0690698 -> 0.0690698
messageid: <1200886466.04.0.101099736381.issue1640@psf.upfronthosting.co.za>
2008-01-21 03:34:24mark.dickinsonlinkissue1640 messages
2008-01-21 03:34:24mark.dickinsoncreate