C11 conformance of casinl-like functions.
brde at optusnet.com.au
Wed Feb 8 15:10:36 UTC 2017
On Wed, 8 Feb 2017, Montgomery-Smith, Stephen wrote:
> On 02/08/17 06:47, mokhi wrote:
>>> I think you mean acosl, asinl, ...
>> yeah :D
>>> These were implemented quite well in 2012-2013, but not quite finished,
>>> and not committed. Only the float and double version were committed.
>>> The raw versions are still available in
>>> https://people.freebsd.org/~stephen/catrig*.c. These have rotted and
>>> require some editing. Compare with the committed parts to see most
>>> of the necessary editing.
>> Okay, I'll do.
>> Would you like that I add you on Phabricator for reviewing when my
>> editing is done?
>> Thanks and best wishes, Mokhi.
> I would love to see these functions implemented. I spent a lot of time
> on them, and they went through a lot of testing to make sure they were
> accurate, even in very extreme edge cases.
It was you that implemented them :-). Except for many onerous details
like testing on all supported arches and committing them.
> Here are more details about the implementation.
It says that the the results are good to 4 ulps except in float precision.
I dout that that is correct. Higher precisions are just less likely to
get near the corner cases where the errors are larger.
Corner cases are probably only near zeros and poles, but I test the
real and imaginary parts separately and this gives a dubious size for
an ulp (for the error relative to each part instead of relative to
the absolute value of the result). This gives 1-dimensional sets of
corner cases. The functions try to get a small error by this measure
and mostly succeed.
More information about the freebsd-numerics