[issue7575] tes_math fails Mac OS X 10.4 due to OverflowError in test_mtestfile
Mark Dickinson dicki...@gmail.com added the comment: Fixed in r77116 (trunk), r77117 (py3k). -- resolution: - fixed status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7575 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue7575] tes_math fails Mac OS X 10.4 due to OverflowError in test_mtestfile
New submission from Salman Haq salman@gmail.com: See output of regrtest below. It was run on an Intel Mac OS X 10.4 A similar failure is observed on the py3k branch. ./python.exe Lib/test/regrtest.py -v test_math test_math testAcos (test.test_math.MathTests) ... ok testAcosh (test.test_math.MathTests) ... ok testAsin (test.test_math.MathTests) ... ok testAsinh (test.test_math.MathTests) ... ok testAtan (test.test_math.MathTests) ... ok testAtan2 (test.test_math.MathTests) ... ok testAtanh (test.test_math.MathTests) ... ok testCeil (test.test_math.MathTests) ... ok testConstants (test.test_math.MathTests) ... ok testCopysign (test.test_math.MathTests) ... ok testCos (test.test_math.MathTests) ... ok testCosh (test.test_math.MathTests) ... ok testDegrees (test.test_math.MathTests) ... ok testExp (test.test_math.MathTests) ... ok testFabs (test.test_math.MathTests) ... ok testFactorial (test.test_math.MathTests) ... ok testFloor (test.test_math.MathTests) ... ok testFmod (test.test_math.MathTests) ... ok testFrexp (test.test_math.MathTests) ... ok testFsum (test.test_math.MathTests) ... ok testHypot (test.test_math.MathTests) ... ok testIsinf (test.test_math.MathTests) ... ok testIsnan (test.test_math.MathTests) ... ok testLdexp (test.test_math.MathTests) ... ok testLog (test.test_math.MathTests) ... ok testLog10 (test.test_math.MathTests) ... ok testLog1p (test.test_math.MathTests) ... ok testModf (test.test_math.MathTests) ... ok testPow (test.test_math.MathTests) ... ok testRadians (test.test_math.MathTests) ... ok testSin (test.test_math.MathTests) ... ok testSinh (test.test_math.MathTests) ... ok testSqrt (test.test_math.MathTests) ... ok testTan (test.test_math.MathTests) ... ok testTanh (test.test_math.MathTests) ... ok test_exceptions (test.test_math.MathTests) ... ok test_mtestfile (test.test_math.MathTests) ... FAIL test_testfile (test.test_math.MathTests) ... ok test_trunc (test.test_math.MathTests) ... ok Doctest: ieee754.txt ... ok == FAIL: test_mtestfile (test.test_math.MathTests) -- Traceback (most recent call last): File /Users/salman/svn/python/trunk/Lib/test/test_math.py, line 1016, in test_mtestfile '\n '.join(failures)) AssertionError: Failures in test_mtestfile: expm10302:expm1(709.7827128932839): expected 1.797693134682424e+308, got 'OverflowError' -- Ran 40 tests in 2.273s FAILED (failures=1) test test_math failed -- Traceback (most recent call last): File /Users/salman/svn/python/trunk/Lib/test/test_math.py, line 1016, in test_mtestfile '\n '.join(failures)) AssertionError: Failures in test_mtestfile: expm10302:expm1(709.7827128932839): expected 1.797693134682424e+308, got 'OverflowError' 1 test failed: test_math -- components: Tests messages: 96860 nosy: slmnhq severity: normal status: open title: tes_math fails Mac OS X 10.4 due to OverflowError in test_mtestfile type: performance versions: Python 2.7 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7575 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue7575] tes_math fails Mac OS X 10.4 due to OverflowError in test_mtestfile
Changes by Mark Dickinson dicki...@gmail.com: -- assignee: - mark.dickinson nosy: +mark.dickinson priority: - normal type: performance - behavior ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7575 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue7575] tes_math fails Mac OS X 10.4 due to OverflowError in test_mtestfile
Mark Dickinson dicki...@gmail.com added the comment: Salman Haq also reported (on IRC) that the configure output shows: checking for expm1... yes so this appears to be a problem with the platform's implementation of expm1, rather than with Python's expm1 code (which is only used when the platform version isn't available). -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7575 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue7575] tes_math fails Mac OS X 10.4 due to OverflowError in test_mtestfile
Changes by Mark Dickinson dicki...@gmail.com: -- versions: +Python 3.2 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7575 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue7575] tes_math fails Mac OS X 10.4 due to OverflowError in test_mtestfile
Mark Dickinson dicki...@gmail.com added the comment: This seems to be specific to OS X/Intel: I'm not seeing any failure on my ancient iBook G4 (OS X 10.4.11). -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7575 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue7575] tes_math fails Mac OS X 10.4 due to OverflowError in test_mtestfile
Mark Dickinson dicki...@gmail.com added the comment: Salman Haq, could you find out roughly where expm1 starts overflowing on your machine? E.g., do all of the following overflow for you? from math import expm1 expm1(709.78271289338397) 1.7976931348622732e+308 expm1(709.782712893) 1.797693134172102e+308 expm1(709.7827) 1.7976699566638014e+308 expm1(709.7) 1.6549840276802644e+308 I'm just trying to determine whether the 10.4 expm1 is so broken that Python should work around it, or whether it's only slightly broken. In the latter case we can just live with it, and either weaken the tests slightly or explicitly skip that particularly test on OS X 10.4. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7575 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue7575] tes_math fails Mac OS X 10.4 due to OverflowError in test_mtestfile
Salman Haq salman@gmail.com added the comment: Only the argument with one decimal place precision does NOT overflow. Python 2.7a1+ (trunk:76872, Dec 21 2009, 09:54:29) [GCC 4.0.1 (Apple Computer, Inc. build 5370)] on darwin Type help, copyright, credits or license for more information. from math import expm1 expm1(709.78271289338397) Traceback (most recent call last): File stdin, line 1, in module OverflowError: math range error expm1(709.782712893) Traceback (most recent call last): File stdin, line 1, in module OverflowError: math range error expm1(709.7827) Traceback (most recent call last): File stdin, line 1, in module OverflowError: math range error expm1(709.782) Traceback (most recent call last): File stdin, line 1, in module OverflowError: math range error expm1(709.78) Traceback (most recent call last): File stdin, line 1, in module OverflowError: math range error expm1(709.7) 1.6549840276802644e+308 -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7575 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue7575] tes_math fails Mac OS X 10.4 due to OverflowError in test_mtestfile
Mark Dickinson dicki...@gmail.com added the comment: Thanks for that. I'd call that pretty broken then: the result of expm1(709.78) is effectively wrong by 24.4 trillion ulps (perhaps that should be 24.4 teraulps?). I guess someone just coded a hard cutoff value somewhere between 709.7 and 709.78. But since anyone getting this close to overflow is asking for trouble anyway, perhaps the easiest solution is just to change the test to test a value not quite as close to the overflow boundary. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7575 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue7575] tes_math fails Mac OS X 10.4 due to OverflowError in test_mtestfile
Mark Dickinson dicki...@gmail.com added the comment: Here's a patch (against trunk). -- keywords: +patch Added file: http://bugs.python.org/file15670/issue7575.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7575 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com