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 alanmcintyre, inducer, loewis, mark.dickinson
Date 2007-11-26.02:18:45
SpamBayes Score 0.0072178417
Marked as misclassified No
Message-id <1196043533.82.0.898223530446.issue1381@psf.upfronthosting.co.za>
In-reply-to
Content
Here is (quite a large) patch, cmath.patch, that fixes a variety of 
problems in the current cmath module.  A summary of the changes:

* sqrt, log, acos, acosh, asin, asinh, atan, atanh no longer produce 
overflow errors for very large inputs

* exp, cos, sin, tan, cosh, sinh, tanh produce valid answers in some cases
where they incorrectly overflowed before.

* sqrt and log are more accurate for tiny numbers

* numeric problems in some functions (especially asinh and asin) should
have been fixed

* the branch cuts for asinh have been moved to the standard positions

* the direction of continuity for the branch cuts of tan, tanh have been 
fixed

* on systems with full hardware and system support for signed zeros (most 
modern systems), functions with a branch cut are continuous on both sides 
of the branch cut.  (As recommended by the C99 standard, amongst others.)

The patch includes documentation updates, but there are still no tests.  
(My current tests make heavy use of the MPFR library, and assume IEEE-754 
format doubles, so need to be seriously reworked.)  The tests are on my to-
do list, but I'm unlikely to find time for them before the new year.  In 
the meantime, I'd very much appreciate any feedback on this patch, if 
anyone has the time/energy/inclination to look at it.  (Andreas:  are you 
in a position to give this a test-run?)
Files
File name Uploaded
cmath.patch mark.dickinson, 2007-11-26.02:18:46
History
Date User Action Args
2007-11-26 02:18:54mark.dickinsonsetspambayes_score: 0.00721784 -> 0.0072178417
recipients: + mark.dickinson, loewis, alanmcintyre, inducer
2007-11-26 02:18:53mark.dickinsonsetspambayes_score: 0.00721784 -> 0.00721784
messageid: <1196043533.82.0.898223530446.issue1381@psf.upfronthosting.co.za>
2007-11-26 02:18:52mark.dickinsonlinkissue1381 messages
2007-11-26 02:18:52mark.dickinsoncreate