Fix a bug in dtoa on gcc
Discovered in https://github.com/miloyip/dtoa-benchmark/issues/1 with assertion fail.
This commit is contained in:
parent
c4a1566a4e
commit
d0f98d2da1
@ -105,7 +105,7 @@ struct DiyFp {
|
|||||||
_BitScanReverse64(&index, f);
|
_BitScanReverse64(&index, f);
|
||||||
return DiyFp(f << (63 - index), e - (63 - index));
|
return DiyFp(f << (63 - index), e - (63 - index));
|
||||||
#elif defined(__GNUC__)
|
#elif defined(__GNUC__)
|
||||||
int s = __builtin_clzll(f) + 1;
|
int s = __builtin_clzll(f);
|
||||||
return DiyFp(f << s, e - s);
|
return DiyFp(f << s, e - s);
|
||||||
#else
|
#else
|
||||||
DiyFp res = *this;
|
DiyFp res = *this;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user