freebsd-dev/lib/msun
Bruce Evans a2ddfa5ea7 Fix remainder() and remainderf() in round-towards-minus-infinity mode
when the result is +-0.  IEEE754 requires (in all rounding modes) that
if the result is +-0 then its sign is the same as that of the first
arg, but in round-towards-minus-infinity mode an uncorrected implementation
detail always reversed the sign.  (The detail is that x-x with x's
sign positive gives -0 in this mode only, but the algorithm assumed
that x-x always has positive sign for such x.)

remquo() and remquof() seem to need the same fix, but I cannot test them
yet.

Use long doubles when mixing NaN args.  This trick improves consistency
of results on at least amd64, so that more serious problems like the
above aren't hidden in simple regression tests by noise for the NaNs.
On amd64, hardware remainder should be used since it is about 10 times
faster than software remainder and is already used for remquo(), but
it involves using the i387 even for floats and doubles, and the i387
does NaN mixing which is better than but inconsistent with SSE NaN mixing.
Software remainder() would probably have been inconsistent with
software remainderl() for the same reason if the latter existed.

Signaling NaNs cause further inconsistencies on at least ia64 and i386.

Use __FBSDID().
2008-02-12 17:11:36 +00:00
..
amd64 Implement rintl(), nearbyintl(), lrintl(), and llrintl(). 2008-01-14 02:12:07 +00:00
arm Use C comments since we now preprocess these files with CPP. 2007-04-29 14:05:22 +00:00
bsdsrc Fix tgamma() on some special args: 2007-05-02 15:24:49 +00:00
i387 Implement rintl(), nearbyintl(), lrintl(), and llrintl(). 2008-01-14 02:12:07 +00:00
ia64 Use C comments since we now preprocess these files with CPP. 2007-04-29 14:05:22 +00:00
ld80 Use a better method of scaling by 2**k. Instead of adding to the 2008-02-07 03:17:05 +00:00
ld128 Use a better method of scaling by 2**k. Instead of adding to the 2008-02-07 03:17:05 +00:00
man Introduce a new log(3) manpage and move the relevant functions there. 2008-01-18 21:43:00 +00:00
powerpc Use C comments since we now preprocess these files with CPP. 2007-04-29 14:05:22 +00:00
sparc64 Use C comments since we now preprocess these files with CPP. 2007-04-29 14:05:22 +00:00
src Fix remainder() and remainderf() in round-towards-minus-infinity mode 2008-02-12 17:11:36 +00:00
Makefile Hook up exp2l() and related docs to the build. 2008-01-18 21:43:10 +00:00
Symbol.map Hook up exp2l() and related docs to the build. 2008-01-18 21:43:10 +00:00