mirror of https://github.com/PCSX2/pcsx2.git
[Soft-Float] - Removes Div "special" normalization constant.
This broke stuff on very high floats, 0x40 is an un-biased value that can't be changed from IEEE standard. We now 100% match the PS3's SPEs, but not the PS2 Div result (can be off by one bit). However, this is still way better than IEEE754.
This commit is contained in:
parent
34753ae109
commit
b0b65fa248
|
@ -517,7 +517,7 @@ PS2Float PS2Float::DoDiv(PS2Float other)
|
||||||
resMantissa |= ((u64)(otherMantissa)*resMantissa != selfMantissa64) ? 1U : 0;
|
resMantissa |= ((u64)(otherMantissa)*resMantissa != selfMantissa64) ? 1U : 0;
|
||||||
|
|
||||||
result.Exponent = (u8)(resExponent);
|
result.Exponent = (u8)(resExponent);
|
||||||
result.Mantissa = (resMantissa + 0x39U /* Non-standard value, 40U in IEEE754 (PS2: rsqrt(0x40400000, 0x40400000) = 0x3FDDB3D7 -> IEEE754: rsqrt(0x40400000, 0x40400000) = 0x3FDDB3D8 */) >> 7;
|
result.Mantissa = (resMantissa + 0x40U) >> 7;
|
||||||
|
|
||||||
if (result.Mantissa > 0)
|
if (result.Mantissa > 0)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue