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 david.kwast
Recipients david.kwast, mark.dickinson
Date 2008-02-24.01:56:58
SpamBayes Score 0.00938581
Marked as misclassified No
Message-id <1203818220.25.0.0446261665473.issue1879@psf.upfronthosting.co.za>
In-reply-to
Content
On OSX 10.5 this behavior is confirmed (Python2.5 and 2.6a). This fix 
appears to be a good fix for python 2.6a.

(Python 2.6a with patch applied)
Python 2.6a0 (trunk:60977M, Feb 23 2008, 19:24:52) 
[GCC 4.0.1 (Apple Inc. build 5465)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> from math import log,sqrt
>>> sqrt(-1)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ValueError: math domain error
>>> log(-1)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ValueError: math domain error

david-kwasts-macbook:python-trunk davidkwast$ ./python 
./Lib/test/test_math.py 
testAcos (__main__.MathTests) ... ok
testAsin (__main__.MathTests) ... ok
testAtan (__main__.MathTests) ... ok
testAtan2 (__main__.MathTests) ... ok
testCeil (__main__.MathTests) ... ok
testConstants (__main__.MathTests) ... ok
testCopysign (__main__.MathTests) ... ok
testCos (__main__.MathTests) ... ok
testCosh (__main__.MathTests) ... ok
testDegrees (__main__.MathTests) ... ok
testExp (__main__.MathTests) ... ok
testFabs (__main__.MathTests) ... ok
testFloor (__main__.MathTests) ... ok
testFmod (__main__.MathTests) ... ok
testFrexp (__main__.MathTests) ... ok
testHypot (__main__.MathTests) ... ok
testIsinf (__main__.MathTests) ... ok
testIsnan (__main__.MathTests) ... ok
testLdexp (__main__.MathTests) ... ok
testLog (__main__.MathTests) ... ok
testLog10 (__main__.MathTests) ... ok
testModf (__main__.MathTests) ... ok
testPow (__main__.MathTests) ... ok
testRadians (__main__.MathTests) ... ok
testSin (__main__.MathTests) ... ok
testSinh (__main__.MathTests) ... ok
testSqrt (__main__.MathTests) ... ok
testTan (__main__.MathTests) ... ok
testTanh (__main__.MathTests) ... ok
test_exceptions (__main__.MathTests) ... ok
test_trunc (__main__.MathTests) ... ok

----------------------------------------------------------------------
Ran 31 tests in 0.011s

OK
History
Date User Action Args
2008-02-24 01:57:00david.kwastsetspambayes_score: 0.00938581 -> 0.00938581
recipients: + david.kwast, mark.dickinson
2008-02-24 01:57:00david.kwastsetspambayes_score: 0.00938581 -> 0.00938581
messageid: <1203818220.25.0.0446261665473.issue1879@psf.upfronthosting.co.za>
2008-02-24 01:56:59david.kwastlinkissue1879 messages
2008-02-24 01:56:58david.kwastcreate