From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 10174 invoked by alias); 24 Sep 2006 07:05:04 -0000 Received: (qmail 10157 invoked by uid 22791); 24 Sep 2006 07:05:03 -0000 X-Spam-Check-By: sourceware.org Received: from sunsite.ms.mff.cuni.cz (HELO sunsite.mff.cuni.cz) (195.113.15.26) by sourceware.org (qpsmtpd/0.31) with ESMTP; Sun, 24 Sep 2006 07:05:01 +0000 Received: from sunsite.mff.cuni.cz (sunsite.mff.cuni.cz [127.0.0.1]) by sunsite.mff.cuni.cz (8.13.1/8.13.1) with ESMTP id k8O74qLk018110; Sun, 24 Sep 2006 09:04:52 +0200 Received: (from jj@localhost) by sunsite.mff.cuni.cz (8.13.1/8.13.1/Submit) id k8O74pAk018109; Sun, 24 Sep 2006 09:04:51 +0200 Date: Sun, 24 Sep 2006 07:05:00 -0000 From: Jakub Jelinek To: Ulrich Drepper Cc: Glibc hackers Subject: [PATCH] Fix IEEE quad lrintl Message-ID: <20060924070451.GU4556@sunsite.mff.cuni.cz> Reply-To: Jakub Jelinek Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.4.1i Mailing-List: contact libc-hacker-help@sourceware.org; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-hacker-owner@sourceware.org X-SW-Source: 2006-09/txt/msg00046.txt.bz2 Hi! Stupid typos cause it not to be properly rounded - the result of the rounding (r) was unused, while GET_LDOUBLE_WORDS64 was computing exactly what has been already computed, as x hasn't changed in between. 2006-09-24 Jakub Jelinek * sysdeps/ieee754/ldbl-128/s_lrintl.c (__lrintl): Fix 2 typos. --- libc/sysdeps/ieee754/ldbl-128/s_lrintl.c.jj 2006-09-20 23:00:13.000000000 +0200 +++ libc/sysdeps/ieee754/ldbl-128/s_lrintl.c 2006-09-24 08:52:27.000000000 +0200 @@ -50,7 +50,7 @@ __lrintl (long double x) { w = two112[sx] + x; t = w - two112[sx]; - GET_LDOUBLE_WORDS64 (i0, i1, x); + GET_LDOUBLE_WORDS64 (i0, i1, t); j0 = ((i0 >> 48) & 0x7fff) - 0x3fff; i0 &= 0x0000ffffffffffffLL; i0 |= 0x0001000000000000LL; @@ -65,7 +65,7 @@ __lrintl (long double x) { w = two112[sx] + x; t = w - two112[sx]; - GET_LDOUBLE_WORDS64 (i0, i1, x); + GET_LDOUBLE_WORDS64 (i0, i1, t); j0 = ((i0 >> 48) & 0x7fff) - 0x3fff; i0 &= 0x0000ffffffffffffLL; i0 |= 0x0001000000000000LL; Jakub