From 0de7cf04f3064a543adc0ed73d16c49bfb2777fc Mon Sep 17 00:00:00 2001 From: Jeff Johnston Date: Tue, 3 Aug 2010 18:21:20 +0000 Subject: 2010-08-03 Craig Howland * libm/common/s_lrint.c (lrint): Annotate shift operations with possible shift amount ranges, and use SAFE_RIGHT_SHIFT to avoid undefined behaviour. * libm/common/s_llrint.c (llrint): Likewise. * libm/common/s_lround.c (lround): Correct some comments on ranges. * libm/common/s_llround.c (llround): Likewise. --- newlib/libm/common/s_llround.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'newlib/libm/common/s_llround.c') diff --git a/newlib/libm/common/s_llround.c b/newlib/libm/common/s_llround.c index 3dcb5ff92..0bc35ac6e 100644 --- a/newlib/libm/common/s_llround.c +++ b/newlib/libm/common/s_llround.c @@ -31,10 +31,10 @@ llround(double x) msw &= 0x000fffff; msw |= 0x00100000; - /* exponent_less_1023 in [-1024,1023] */ + /* exponent_less_1023 in [-1023,1024] */ if (exponent_less_1023 < 20) { - /* exponent_less_1023 in [-1024,19] */ + /* exponent_less_1023 in [-1023,19] */ if (exponent_less_1023 < 0) { if (exponent_less_1023 < -1) -- cgit v1.2.3