COMMON: Fix invalid shift
Sign bit is at bit 15 and must go to bit 63
This commit is contained in:
parent
a18db273a5
commit
56f07b0e78
1 changed files with 1 additions and 1 deletions
|
@ -99,7 +99,7 @@ void XPFloat::toDoubleBitsSafe(uint64 &result, bool &outOverflowed, Semantics se
|
|||
if ((signAndExponent & 0x7fff) == 0x7fff) {
|
||||
if ((mantissa & 0x7fffffffffffffffu) == 0) {
|
||||
// Infinity
|
||||
doubleBits = (static_cast<uint64>(signAndExponent & 0x8000) << 63) | 0x7ff0000000000000u;
|
||||
doubleBits = (static_cast<uint64>(signAndExponent & 0x8000) << (63 - 15)) | 0x7ff0000000000000u;
|
||||
} else {
|
||||
// NaN
|
||||
doubleBits = 0xffffffffffffffff;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue