From owner-cvs-src@FreeBSD.ORG Sat Dec 3 07:38:36 2005 Return-Path: X-Original-To: cvs-src@FreeBSD.org Delivered-To: cvs-src@FreeBSD.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 7FD4616A41F; Sat, 3 Dec 2005 07:38:36 +0000 (GMT) (envelope-from bde@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id F2A5D43D5E; Sat, 3 Dec 2005 07:38:35 +0000 (GMT) (envelope-from bde@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id jB37cZcD021011; Sat, 3 Dec 2005 07:38:35 GMT (envelope-from bde@repoman.freebsd.org) Received: (from bde@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id jB37cZB8021010; Sat, 3 Dec 2005 07:38:35 GMT (envelope-from bde) Message-Id: <200512030738.jB37cZB8021010@repoman.freebsd.org> From: Bruce Evans Date: Sat, 3 Dec 2005 07:38:35 +0000 (UTC) To: src-committers@FreeBSD.org, cvs-src@FreeBSD.org, cvs-all@FreeBSD.org X-FreeBSD-CVS-Branch: HEAD Cc: Subject: cvs commit: src/lib/msun/src s_rint.c X-BeenThere: cvs-src@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: CVS commit messages for the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 03 Dec 2005 07:38:36 -0000 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