Message9280

Author jeff.allen
Recipients jeff.allen
Date 2014-12-31.11:46:03
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1420026364.72.0.485522871417.issue2237@psf.upfronthosting.co.za>
In-reply-to
Content
The float and complex test failures are done now, but the cmath library part of this turns out to be quite demanding. We're only skipping a couple of tests: when I un-skiped the test against cmath_testcases.txt,
and refused to bail on the first error, I counted 961 failures.

In general, I would say failures occur for edge cases: arguments near zero, near one (e.g. for acosh), or large/infinite. 

I've checked-in my progress on this in a dozen change sets leading up to https://hg.python.org/jython/rev/69826acfb4a9 . A couple of them are worth a remark.

Some of the cmath tests are against (real-line) mathematical functions from the math module: I had real :) trouble with this until I recognised that CPython's test_math does not actually demand an accurate result. And in a couple of places our 'passing' math module wasn't giving one! I've fixed that in https://hg.python.org/jython/rev/705cee780e1f .

Nice to see, however, that the Java.Math treatment of inf and nan arguments is almost always what Python requires. We can strip out much of the testing for special values if we want to. I've done this where I've made changes, but not generally.

Many failing cmath functions depend heavily on the complex square root, I eventually realised. And cmath.sqrt was not accurate for small argument. Reworking cmath.sqrt is mostly about scaling to manage the potential overflow or loss of precision in sqrt(a**2 + b**2), or spotting when we don't have to.
https://hg.python.org/jython/rev/d2fa71e7ca54

The score now stands at 945 failures against cmath_testcases.txt.
History
Date User Action Args
2014-12-31 11:46:04jeff.allensetmessageid: <1420026364.72.0.485522871417.issue2237@psf.upfronthosting.co.za>
2014-12-31 11:46:04jeff.allensetrecipients: + jeff.allen
2014-12-31 11:46:04jeff.allenlinkissue2237 messages
2014-12-31 11:46:03jeff.allencreate