Complex arg-trig functions

Bruce Evans brde at optusnet.com.au
Fri Sep 21 11:34:30 UTC 2012


On Fri, 21 Sep 2012, I wrote:

> On Thu, 20 Sep 2012, Stephen Montgomery-Smith wrote:
>
>> I also added inexact optimizations for casinh and cacos.
>
> I couldn't get this to give the hoped-for optimization and dropped
> it even for catanh.  You may still prefer it because it is simpler.

It is giving the hoped-for optimizations now...

> But later I found intricacies for returning the correct value of
> Pi/2 which make the inexact optimizations even less useful:

... for the real parts of cacosf(), casin*f(), but not for the real
part of cacoshf().  I tested mainly the latter and catanhf() before,
and the change is still giving a small pessimization for cacoshf().
(I haven't tested the new version for catanhf() yet, and won't test
in so much detail in other precisions).  I think this is because for
cacosh*() alone, inexact is set in more cases while calculating Pi/2.

Bruce


More information about the freebsd-numerics mailing list