This is the mail archive of the
mailing list for the glibc project.
Re: Alternative math libraries
- To: davem at redhat dot com, moshier at moshier dot ne dot mediaone dot net
- Subject: Re: Alternative math libraries
- From: Bruce Allen <ballen at gravity dot phys dot uwm dot edu>
- Date: Fri, 25 May 2001 11:02:44 -0500 (CDT)
- Cc: ballen at gravity dot phys dot uwm dot edu, ballen at uwm dot edu, libc-alpha at sources dot redhat dot com
- Reply-To: Bruce Allen <ballen at gravity dot phys dot uwm dot edu>
> >> I was sure that linux glibc libm on Intel uses the actual x86
> >> trigometric instructions to implement these routines.
> >> Later,
> >> David S. Miller
> >> firstname.lastname@example.org
> >That's correct. Those hardware instructions only give the correct
> >answer when |x|<2^62.
> No, that's not right. More marketing doubletalk. It's worse than
> that. The incorrect answer threshold, for absolute measure, is about 2^18
> for double precision and 2^47 for single precision. 2^62 is the
> *totally* wrong answer threshold, where the error approaches 100%
> and the hardware raises a flag.
This is pretty awful.
The thing that I find confusing is that libm already contains
high-quality, tested argument reduction code. Isn't it straightforward
to make the trig functions call this routine when |x|>2^18 for double
precision or |x|>2^47 for single precision?
Or are there technical issues that I am unaware of?