Date: Sat, 3 Dec 2005 07:38:35 +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 s_rint.c Message-ID: <200512030738.jB37cZB8021010@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
bde 2005-12-03 07:38:35 UTC FreeBSD src repository Modified files: lib/msun/src s_rint.c Log: Simplified the fix in rev.1.3. Instead of using long double for TWO52[sx] to trick gcc into correctly converting TWO52[sx]+x to double on assignment to "double w", force a correct assignment by assigning to *(double *)&w. This is cleaner and avoids the double rounding problem on machines that evaluate double expressions in double precision. It is not necessary to convert w-TWO52[sx] to double precision on return as implied in the comment in rev.1.3, since the difference is exact. Revision Changes Path 1.13 +2 -8 src/lib/msun/src/s_rint.c
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200512030738.jB37cZB8021010>