Author mark.dickinson
Recipients alanmcintyre, inducer, loewis, mark.dickinson
Date 2007-11-26.02:18:45
SpamBayes Score 0.00721784
Marked as misclassified No
Message-id <>
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 

* 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?)
File name Uploaded
cmath.patch mark.dickinson, 2007-11-26.02:18:46
Date User Action Args
2007-11-26 02:18:54mark.dickinsonsetspambayes_score: 0.00721784 -> 0.00721784
recipients: + mark.dickinson, loewis, alanmcintyre, inducer
2007-11-26 02:18:53mark.dickinsonsetspambayes_score: 0.00721784 -> 0.00721784
messageid: <>
2007-11-26 02:18:52mark.dickinsonlinkissue1381 messages
2007-11-26 02:18:52mark.dickinsoncreate