summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorMartynas Venckus <martynas@cvs.openbsd.org>2011-04-17 10:37:08 +0000
committerMartynas Venckus <martynas@cvs.openbsd.org>2011-04-17 10:37:08 +0000
commit53e226a601594dc7f8e6613edb67b4fe5a4d109e (patch)
treef18ac7bebb33c01c7a4d22a6f85eb8cf346bdc08 /lib
parent80ed1b0ffadb94149d6de2a973c62ee1194b6ac2 (diff)
20 -> DBL_FRACHBITS
Diffstat (limited to 'lib')
-rw-r--r--lib/libm/src/s_lround.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/libm/src/s_lround.c b/lib/libm/src/s_lround.c
index 0742f076510..9f983ca0005 100644
--- a/lib/libm/src/s_lround.c
+++ b/lib/libm/src/s_lround.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: s_lround.c,v 1.1 2008/07/21 20:29:14 martynas Exp $ */
+/* $OpenBSD: s_lround.c,v 1.2 2011/04/17 10:37:07 martynas Exp $ */
/* $NetBSD: lround.c,v 1.2 2004/10/13 15:18:32 drochner Exp $ */
/*-
@@ -51,7 +51,7 @@ LROUNDNAME(double x)
RESTYPE res;
GET_HIGH_WORD(i0, x);
- e = i0 >> 20;
+ e = i0 >> DBL_FRACHBITS;
s = e >> DBL_EXPBITS;
e = (e & 0x7ff) - DBL_EXP_BIAS;
@@ -69,9 +69,9 @@ LROUNDNAME(double x)
}
EXTRACT_WORDS(i0, i1, x);
- e = ((i0 >> 20) & 0x7ff) - DBL_EXP_BIAS;
+ e = ((i0 >> DBL_FRACHBITS) & 0x7ff) - DBL_EXP_BIAS;
i0 &= 0xfffff;
- i0 |= (1 << 20);
+ i0 |= (1 << DBL_FRACHBITS);
shift = e - DBL_FRACBITS;
if (shift >=0)