diff options
author | Jeff Johnston <jjohnstn@redhat.com> | 2010-08-03 18:21:20 +0000 |
---|---|---|
committer | Jeff Johnston <jjohnstn@redhat.com> | 2010-08-03 18:21:20 +0000 |
commit | 0de7cf04f3064a543adc0ed73d16c49bfb2777fc (patch) | |
tree | 20425317096c120eeaa64a360838a05c8feba8cf /newlib/libm/common/s_llround.c | |
parent | 0b6fbd396ca2f5448acb925a0b7f718676980d74 (diff) | |
download | cygnal-0de7cf04f3064a543adc0ed73d16c49bfb2777fc.tar.gz cygnal-0de7cf04f3064a543adc0ed73d16c49bfb2777fc.tar.bz2 cygnal-0de7cf04f3064a543adc0ed73d16c49bfb2777fc.zip |
2010-08-03 Craig Howland <howland@LGSInnovations.com>
* 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.
Diffstat (limited to 'newlib/libm/common/s_llround.c')
-rw-r--r-- | newlib/libm/common/s_llround.c | 4 |
1 files changed, 2 insertions, 2 deletions
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) |