Complex arg-trig functions
Stephen Montgomery-Smith
stephen at missouri.edu
Wed Aug 15 21:49:02 UTC 2012
On 08/15/2012 03:42 PM, Stephen Montgomery-Smith wrote:
>
> All your solutions depend upon using (1-tiny) with the result being
> used. But what if FE_DOWNWARD is set? Then 1-tiny becomes
> 1-DBL_EPSILON. And then if the result is used, everything is off by 1 ulp.
>
> And
> if ((int)(1 - tiny) == 1)
> will fail.
How about replacing
if (huge+ax>one && huge+bx>one) ....
with
if ((int)(1/ax)==0 || (int)(1/bx)==0) ....
(We know that one of ax or bx is larger than 1.)
More information about the freebsd-numerics
mailing list