aboutsummaryrefslogtreecommitdiff
path: root/newlib/libm/common/s_lrint.c
diff options
context:
space:
mode:
authorMatthias Kannwischer <matthias@kannwischer.eu>2018-05-14 14:00:18 +0100
committerCorinna Vinschen <corinna@vinschen.de>2018-05-29 15:59:48 +0200
commitfcfea0ae2d213383f38b06690b6cf1454f2ac82d (patch)
tree5b77a0ed388d0398d0a37831cb197fb608228e49 /newlib/libm/common/s_lrint.c
parent3305f3557064a3cc981e3566959d7833bb81e192 (diff)
downloadnewlib-fcfea0ae2d213383f38b06690b6cf1454f2ac82d.zip
newlib-fcfea0ae2d213383f38b06690b6cf1454f2ac82d.tar.gz
newlib-fcfea0ae2d213383f38b06690b6cf1454f2ac82d.tar.bz2
fix llrint and lrint for 52 <= exponent <= 62
Diffstat (limited to 'newlib/libm/common/s_lrint.c')
-rw-r--r--newlib/libm/common/s_lrint.c4
1 files changed, 2 insertions, 2 deletions
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] */