freebsd-nq/lib/msun
Bruce Evans 21b0341c80 Start trying to make the float precision trig functions actually worth
using under FreeBSD.  Before this commit, all float precision functions
except exp2f() were implemented using only float precision, apparently
because Cygnus needed this in 1993 for embedded systems with slow or
inefficient double precision.  For FreeBSD, except possibly on systems
that do floating point entirely in software (very old i386 and now
arm), this just gives a more complicated implementation, many bugs,
and usually worse performance for float precision than for double
precision.  The bugs and worse performance were particulary large in
arg reduction for trig functions.  We want to divide by an approximation
to pi/2 which has as many as 1584 bits, so we should use the widest
type that is efficient and/or easy to use, i.e., double.  Use fdlibm's
__kernel_rem_pio2() to do this as Sun apparently intended.  Cygnus's
k_rem_pio2f.c is now unused.  e_rem_pio2f.c still needs to be separate
from e_rem_pio2.c so that it can be optimized for float args.  Similarly
for long double precision.

This speeds up cosf(x) on large args by a factor of about 2.  Correct
arg reduction on large args is still inherently very slow, so hopefully
these args rarely occur in practice.  There is much more efficiency
to be gained by using double precision to speed up arg reduction on
medium and small float args.
2005-10-29 08:15:29 +00:00
..
alpha Replace fegetmask() and fesetmask() with feenableexcept(), 2005-03-16 19:03:46 +00:00
amd64 Add a missing ldexpf() alias for amd64. 2005-09-12 20:54:00 +00:00
arm Replace fegetmask() and fesetmask() with feenableexcept(), 2005-03-16 19:03:46 +00:00
bsdsrc Fixed aliasing bugs in TRUNC() by using the fdlibm macros for access 2005-09-19 11:28:19 +00:00
i387 Prevent these functions from using stack outside of their frame. 2005-05-06 15:44:20 +00:00
ia64 Replace fegetmask() and fesetmask() with feenableexcept(), 2005-03-16 19:03:46 +00:00
man Markup nit. 2005-06-16 21:56:03 +00:00
powerpc Replace fegetmask() and fesetmask() with feenableexcept(), 2005-03-16 19:03:46 +00:00
sparc64 Replace fegetmask() and fesetmask() with feenableexcept(), 2005-03-16 19:03:46 +00:00
src Start trying to make the float precision trig functions actually worth 2005-10-29 08:15:29 +00:00
Makefile Bump the shared library version number of all libraries that have not 2005-07-22 17:19:05 +00:00