Complex arg-trig functions

Stephen Montgomery-Smith stephen at missouri.edu
Sun Sep 23 00:08:10 UTC 2012


On 09/22/2012 05:25 PM, Stephen Montgomery-Smith wrote:
> On 09/22/2012 04:47 PM, Bruce Evans wrote:
>> On Sat, 22 Sep 2012, Stephen Montgomery-Smith wrote:
>>
>>> 2.  In my accuracy tests for casin(h), I have never seen the double or
>>> long double have an error greater than 4 ULP.  But for the float case
>>> I have seen 4.15 ULP.
>>
>> I haven't seen any larger than 3.4.  What is the worst case you found?
>> Errors found for float precision tend to be because the density of bad
>> cases is higher so it is easier to test more of them accidentally.  I
>> did do some non-random testing for all float cases in narrow strips
>> about x or y = 0 or 1, but not for all combinations of this with all
>> functions.
>
> Here are some examples for float.  In all these outputs:
> The first entry is the "count".
> The second entry is the function.
> The third and fourth entries are the real and imaginary part of the
> error in ULP.
> The fifth and sixth entries are the real and imaginary part of the input.
> The seventh and eighth and ninth and tenth entries are the real part and
> imaginary part of the answers from the float/double respectively
> (printed to few enough decimal places that you cannot tell they are
> different.)
>
> 2365614 acos 3.75621 0.86681 1.0338860750198364258
> -0.090228326618671417236 0.246582 0.361712 0.246582 0.361712
> 3087248 acos 3.56538 0.1165 2.3730618953704833984 0.26976472139358520508
> 0.124496 -1.51821 0.124496 -1.51821
> 5973027 asinh 3.61544 0.513 0.10977014899253845215
> 0.48254761099815368652 0.124712 0.499309 0.124712 0.499309
> 6558511 acosh 3.57286 0.419525 -0.29658588767051696777
> -0.11975207924842834473 0.124975 -1.8695 0.124975 -1.8695
> 9998127 acos 3.51324 1.09793 1.0892471075057983398
> -0.12541522085666656494 0.247452 0.491951 0.247452 0.491951
> 14879751 asinh 3.5643 1.83067 -0.11303693056106567383
> 0.4351412653923034668 -0.124994 0.446448 -0.124994 0.446448
> 19510082 asin 3.61922 0.0103899 0.46096378564834594727
> -0.01612871512770652771 0.478995 -0.0181731 0.478995 -0.0181731
>
> I can send more examples on request.  I'm not seeing a real pattern here.

Here is an error of about 4.15 ULP

171886645 acosh 0.504775 4.15104 1.0684067010879516602 
-0.049668960273265838623 0.389377 -0.124716 0.389377 -0.124716



More information about the freebsd-numerics mailing list