Complex arg-trig functions
Stephen Montgomery-Smith
stephen at missouri.edu
Wed Aug 15 18:15:57 UTC 2012
On 08/15/12 12:13, Bruce Evans wrote:
> On Tue, 14 Aug 2012, Stephen Montgomery-Smith wrote:
>
>> I was looking through the code e_acosh.c, and it made me realize I
>> could get a small fraction more ULP in catrig.c by making the
>> replacements:
>>
>> 216c216
>> < *rx = log1p(Am1 + sqrt(Am1*(A+1)));
>> ---
>>> *rx = log1p(Am1 + sqrt(2*Am1 + Am1*Am1));
>> 282c282
>> < *sqrt_A2my2 = sqrt(Amy*(A+y));
>> ---
>>> *sqrt_A2my2 = sqrt(2*y*Amy + Amy*Amy);
>>
>> I'm not quite sure if the second replacement makes much difference,
>> but the first replacement seemed quite effective.
>
> This seems to be slightly worse. In my tests, it makes little difference
> to the peak error, but unimproves the number of correctly rounded cases
> quite often.
I ran some all night tests, and I came to the same conclusion, except
for the peak error. I'll revert it back.
More information about the freebsd-numerics
mailing list