fix llrint and lrint for 52 <= exponent <= 62

This commit is contained in:
Matthias Kannwischer 2018-05-14 14:00:18 +01:00 committed by Corinna Vinschen
parent 3305f35570
commit fcfea0ae2d
2 changed files with 4 additions and 4 deletions

View File

@ -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] */

View File

@ -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] */