MUSL math functions
sgk at troutmask.apl.washington.edu
Sat Nov 9 18:27:48 UTC 2013
On Fri, Nov 08, 2013 at 12:50:39AM -0800, David Schultz wrote:
> On Fri, Nov 01, 2013, Bruce Evans wrote:
>>> Have you looked at the code? Hint, I have. Here's ccoshl().
>>> #include "libm.h"
>>> long double complex ccoshl(long double complex z)
>>> return ccosh(z);
> Is there anything usable in there? Thanks for the pointer in any case!
I haven't found anything usable. Many of the musl files have
FreeBSD ident strings. I should note that either musl or
openlibm have some assembly files, but I haven't read them.
These might use newer cpu-specific instructions.
>>> Yes. I object to importing anything from MUSL or OpenBSD or NetBSD
>>> without review or testing. It also appears that these functions are
>>> only available for ld80 archs. FreeBSD has both ld80 and ld128.
>> Supporting ld128 can be a blocker. Apart from increasing the amount of
>> code needed, the extra precision sometimes expands the technical
>> complications a lot.
> I think I was the one who proposed several years ago that we
> should develop the ld80 and ld128 versions at the same time
> because (a) it's more efficient to do both while you have the
> algorithm in your head and (b) the ld128 versions probably would
> never happen otherwise.
At first I was hesitant to do ld128 (mostly because of access to
hardware), but now it forces me to think about the algorithms.
ld80 on i386 has to deal with problems with FP_PE.
More information about the freebsd-numerics