public inbox for newlib-cvs@sourceware.org help / color / mirror / Atom feed
From: Corinna Vinschen <corinna@sourceware.org> To: newlib-cvs@sourceware.org Subject: [newlib-cygwin] fix llrint and lrint for 52 <= exponent <= 62 Date: Tue, 29 May 2018 14:01:00 -0000 [thread overview] Message-ID: <20180529140101.81013.qmail@sourceware.org> (raw) https://sourceware.org/git/gitweb.cgi?p=newlib-cygwin.git;h=fcfea0ae2d213383f38b06690b6cf1454f2ac82d commit fcfea0ae2d213383f38b06690b6cf1454f2ac82d Author: Matthias Kannwischer <matthias@kannwischer.eu> Date: Mon May 14 14:00:18 2018 +0100 fix llrint and lrint for 52 <= exponent <= 62 Diff: --- newlib/libm/common/s_llrint.c | 4 ++-- newlib/libm/common/s_lrint.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/newlib/libm/common/s_llrint.c b/newlib/libm/common/s_llrint.c index 8b8a846..72452db 100644 --- a/newlib/libm/common/s_llrint.c +++ b/newlib/libm/common/s_llrint.c @@ -93,9 +93,9 @@ long long int if (j0 >= 52) /* 64bit return: j0 in [52,62] */ /* 64bit return: left shift amt in [32,42] */ - result = ((long long int) ((i0 & 0x000fffff) | 0x0010000) << (j0 - 20)) | + result = ((long long int) ((i0 & 0x000fffff) | 0x00100000) << (j0 - 20)) | /* 64bit return: right shift amt in [0,10] */ - (i1 << (j0 - 52)); + ((long long int) i1 << (j0 - 52)); else { /* 64bit return: j0 in [20,51] */ diff --git a/newlib/libm/common/s_lrint.c b/newlib/libm/common/s_lrint.c index 9d2cb73..b37f50f 100644 --- a/newlib/libm/common/s_lrint.c +++ b/newlib/libm/common/s_lrint.c @@ -131,9 +131,9 @@ TWO52[2]={ if (j0 >= 52) /* 64bit return: j0 in [52,62] */ /* 64bit return: left shift amt in [32,42] */ - result = ((long int) ((i0 & 0x000fffff) | 0x0010000) << (j0 - 20)) | + result = ((long int) ((i0 & 0x000fffff) | 0x00100000) << (j0 - 20)) | /* 64bit return: right shift amt in [0,10] */ - (i1 << (j0 - 52)); + ((long int) i1 << (j0 - 52)); else { /* 32bit return: j0 in [20,30] */
reply other threads:[~2018-05-29 14:01 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=20180529140101.81013.qmail@sourceware.org \ --to=corinna@sourceware.org \ --cc=newlib-cvs@sourceware.org \ /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: linkBe 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).