Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CF_MIN_EXP[1] = {0x00000001} is zero actually (ee fpu) #34

Open
gregory38 opened this issue Feb 11, 2016 · 3 comments
Open

CF_MIN_EXP[1] = {0x00000001} is zero actually (ee fpu) #34

gregory38 opened this issue Feb 11, 2016 · 3 comments

Comments

@gregory38
Copy link

PS2 doesn't support denormal number so 0x00000001 is interpreted as 0.

If the intent was to get the smallest positive number above 0, it ought to be 0x0080_0000 (ie with a biased exponent of 1).

@unknownbrackets
Copy link
Owner

This is intentional. 0x7F800001 (CF_MAX_EXP) is also not a number, it's showing the behavior of non-IEEE floats.

-[Unknown]

@gregory38
Copy link
Author

Sure. I'm asking because CF_GARBAGE1 is also a denormal number and therefore zero. In this case, I think a very small number might be useful to test underflow too.

Speaking of non-IEEE compliance. Will it be possible to have a couple of extra test for rounding of mult and sub operation.

Mult: It seem to lost some lsb bits. Maybe we could do a test that loop on mantissa 8 lsb. Something like that

for ( a = 1.0; a < 1.0001; a += smallest mantissa)
    for ( b = 1.0; b < 1.0001; b += smallest mantissa)
          do a * b

Sub: It seems IEEE have extra hidden bit (round, guard, sticky bits). It seems that EE is different. I think some test that do a - b with a close of b could help to highlight the behavior.

@unknownbrackets
Copy link
Owner

Sure, I'm not at all against adding more constants.

And yes, we had our fun with mult rounding in PPSSPP too. A dedicated test for this is probably a good idea, and I think we created one in pspautotests too.

Sub sounds like a good idea too.

-[Unknown]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants