Author mark.dickinson
Recipients Rhamphoryncus, christian.heimes, mark.dickinson
Date 2007-12-18.14:36:33
SpamBayes Score 0.123327
Marked as misclassified No
Message-id <>
Unfortunately, implementing asinh, acosh, atanh correctly is not as simple as just using the formulas 
(this is one of the reasons that it's useful to be able to get at the library definitions).  For 
example, the formula

asinh(x) = log(x + sqrt(1.+(x*x)))

has significant error (i.e. much more than just a few ulps) when x is small (so that the argument of 
the log is close to 1), and when x is large and negative (so that the addition involves adding two 
numbers of almost equal magnitude but opposite sign).  It also overflows unnecessarily at around 
1e154 (on an IEEE754 system), as a result of the intermediate calculation x*x overflowing, and it 
fails to give the correct signs on zero arguments.  (asinh(0.) = 0., asinh(-0.) = -0.)

So either some serious work is required here, or code should be borrowed in an appropriately legal 
fashion from some other library, or those few people who don't have asinh, acosh, etc. already in 
libm will have to live without.

Date User Action Args
2007-12-18 14:36:34mark.dickinsonsetspambayes_score: 0.123327 -> 0.123327
recipients: + mark.dickinson, Rhamphoryncus, christian.heimes
2007-12-18 14:36:33mark.dickinsonsetspambayes_score: 0.123327 -> 0.123327
messageid: <>
2007-12-18 14:36:33mark.dickinsonlinkissue1640 messages
2007-12-18 14:36:33mark.dickinsoncreate