Date: Sat, 29 Oct 2005 16:34:50 +0000 (UTC) From: Bruce Evans <bde@FreeBSD.org> To: src-committers@FreeBSD.org, cvs-src@FreeBSD.org, cvs-all@FreeBSD.org Subject: cvs commit: src/lib/msun/src e_rem_pio2f.c Message-ID: <200510291634.j9TGYoHC041704@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
bde 2005-10-29 16:34:50 UTC
FreeBSD src repository
Modified files:
lib/msun/src e_rem_pio2f.c
Log:
Use double precision to simplify and optimize arg reduction for small
and medium size args too: instead of conditionally subtracting a float
17+24, 17+17+24 or 17+17+17+24 bit approximation to pi/2, always
subtract a double 33+53 bit one. The float version is now closer to
the double version than to old versions of itself -- it uses the same
33+53 bit approximation as the simplest cases in the double version,
and where the float version had to switch to the slow general case at
|x| == 2^7*pi/2, it now switches at |x| == 2^19*pi/2 the same as the
double version.
This speeds up arg reduction by a factor of 2 for |x| between 3*pi/4 and
2^7*pi/4, and by a factor of 7 for |x| between 2^7*pi/4 and 2^19*pi/4.
Revision Changes Path
1.14 +22 -97 src/lib/msun/src/e_rem_pio2f.c
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200510291634.j9TGYoHC041704>
