]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
Made rintf() actually work. It was completely broken (when s_rint.c
authorbde <bde@FreeBSD.org>
Wed, 28 Aug 1996 16:34:36 +0000 (16:34 +0000)
committerbde <bde@FreeBSD.org>
Wed, 28 Aug 1996 16:34:36 +0000 (16:34 +0000)
commitf68534c325392a29ec468b68fad7e222de0b868b
tree1263974842c58b03868a54b6d0c8d0754e88b3d5
parentf596cd4a0d4dc86794c1d9ea1142eff8ae4b8093
Made rintf() actually work.  It was completely broken (when s_rint.c
was compiled with -O) by the precision bug in the i386 version of
gcc (assignments and casts don't clip the precision).  E.g.,
rintf(12.3456789) was 12.125.

Avoid the same bug in rint().  It was only broken for the unusual
case when the i387 precision is 64 bits.  FreeBSD defaults to 53
bit precision to avoid problems like this, but the standard math
emulator always uses 64 bit precision.
lib/msun/src/s_rint.c
lib/msun/src/s_rintf.c