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 tim.peters
Date 2003-04-25.20:09:07
SpamBayes Score
Marked as misclassified
Logged In: YES 

I'm happy enough the way it is.

2.2 specifically added the ability to get a good result for log
(long) even when the long is far too large to fit in a float.  
That's why log(long) takes a different path starting in 2.2, and 
why there's no inconsistency across platforms in log(0L) 
behavior since 2.2.

If you want consistency for log(0.0), then Python cannot allow 
the platfrom log to see 0.0:  "standard" libm error behavior is 
platform-dependent, and error cases for log aren't unique in 
this respect:  Python would have to write its own error-
checking code around all libm functions.  That's a much 
larger project than it may sound, and short of doing that, 
there's really no point special-casing the snot out of one 
specific log case.

It might be better if the math module docs explained that the 
specific exceptions raised in assorted error cases (and even 
whether some arguments are considered to be exceptional at 
all) are, in reality, not defined in any useful cross-platform or 
cross-release way.
Date User Action Args
2007-08-23 14:12:09adminlinkissue711019 messages
2007-08-23 14:12:09admincreate