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 mark.dickinson, ms
Date 2008-06-27.21:40:50
SpamBayes Score 0.0008927979
Marked as misclassified No
Message-id <1214602853.17.0.220922771088.issue3222@psf.upfronthosting.co.za>
In-reply-to
Content
This is a known problem, that's unlikely to change unless there's a 
serious overhaul of Python's floating point.

The warning at the end of the math module documentation should probably 
be taken to apply equally to all the built-in floating-point operations:

"""The math module consists mostly of thin wrappers around the platform 
C math library functions. Behavior in exceptional cases is loosely 
specified by the C standards, and Python inherits much of its math-
function error-reporting behavior from the platform C implementation. As 
a result, the specific exceptions raised in error cases (and even 
whether some arguments are considered to be exceptional at all) are not 
defined in any useful cross-platform or cross-release way. For example, 
whether math.log(0) returns -Inf or raises ValueError or OverflowError 
isn't defined, and in cases where math.log(0) raises OverflowError, 
math.log(0L) may raise ValueError instead."""

Or, as Tim Peters is fond of saying:

"""All Python behavior in the presence of infinities, NaNs, and signed 
zeroes is a platform-dependent accident, mostly inherited from that all 
C89 behavior in the presence of infinities, NaNs, and signed zeroes is a 
platform-dependent crapshoot."""
History
Date User Action Args
2008-06-27 21:40:53mark.dickinsonsetspambayes_score: 0.000892798 -> 0.0008927979
recipients: + mark.dickinson, ms
2008-06-27 21:40:53mark.dickinsonsetspambayes_score: 0.000892798 -> 0.000892798
messageid: <1214602853.17.0.220922771088.issue3222@psf.upfronthosting.co.za>
2008-06-27 21:40:52mark.dickinsonlinkissue3222 messages
2008-06-27 21:40:50mark.dickinsoncreate