Complex arg-trig functions
Stephen Montgomery-Smith
stephen at missouri.edu
Mon Aug 13 19:42:08 UTC 2012
On 08/13/2012 11:57 AM, Bruce Evans wrote:
> I finally tested a version of this. I only did simple comparisons (float
> vs double and double vs long double). The results look promising after
> fixing a few bugs:
Thank you very much for doing the testing, and for fixing the bugs.
>
> % amd64 float prec, on 2**12 * 2**12 args:
> % icacosh:max_er = 0x3690000000 436.5000, avg_er = 0.317, #>=1:0.5 =
> 29104:255732
> There are negative reasons to have the float versions unless they are not
> wrappers. The reasons to have non-wrappers are to test the algorithm and
> run faster.
That large max-err for the imaginary part of icacosh for float bothers
me. It means that I haven't thought it through properly. Could you
send me the input values that created this error(s)?
The float versions really are much harder than the double and
long-double versions. And it just doesn't seem worth the effort,
because who uses them when the double versions are available?
In my case, not for speed. Because on my machine the float versions are
slightly slower than the double version.
Also, you made the comment that in the float version, all the 0.5 should
become 0.5F. Two questions:
1. Doesn't the compiler do this conversion for me?
2. What is wrong with using x/2 instead of 0.5*x? You told me in a far
earlier email to use 0.5*x. (Similarly in one place I have a 0.25.)
More information about the freebsd-numerics
mailing list