From: Jakub Jelinek <jakub@redhat.com>
To: Ulrich Drepper <drepper@redhat.com>
Cc: Glibc hackers <libc-hacker@sources.redhat.com>
Subject: [PATCH] Fix IEEE quad lrintl
Date: Sun, 24 Sep 2006 07:05:00 -0000 [thread overview]
Message-ID: <20060924070451.GU4556@sunsite.mff.cuni.cz> (raw)
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 <jakub@redhat.com>
* 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
reply other threads:[~2006-09-24 7:05 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20060924070451.GU4556@sunsite.mff.cuni.cz \
--to=jakub@redhat.com \
--cc=drepper@redhat.com \
--cc=libc-hacker@sources.redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).