cvs commit: src/lib/msun/src s_rint.c

Bruce Evans bde at
Sat Dec 3 07:38:36 GMT 2005

bde         2005-12-03 07:38:35 UTC

  FreeBSD src repository

  Modified files:
    lib/msun/src         s_rint.c 
  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

More information about the cvs-src mailing list