[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:
GitHubProUser67 2024-11-22 00:11:26 +01:00
parent 34753ae109
commit b0b65fa248
1 changed files with 1 additions and 1 deletions

View File

@ -517,7 +517,7 @@ PS2Float PS2Float::DoDiv(PS2Float other)
resMantissa |= ((u64)(otherMantissa)*resMantissa != selfMantissa64) ? 1U : 0;
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)
{