hwtests icon indicating copy to clipboard operation
hwtests copied to clipboard

Add FMA test

Open JosJuice opened this issue 3 months ago • 2 comments

I used this to validate https://github.com/dolphin-emu/dolphin/pull/13900. (That PR doesn't pass every single one of these tests, though.)

JosJuice avatar Oct 04 '25 13:10 JosJuice

@Geotale You mentioned in a comment in Dolphin's interpreter that there are situations involving double denormals that the error-free transform isn't able to handle correctly. I've only been able to produce such failing cases with NI=1, where the problem is that denormal error terms get flushed to zero. Have you been able to come up with any cases involving denormals that fail with NI=0?

JosJuice avatar Oct 04 '25 13:10 JosJuice

fA = 0x0000000000000001
fB = 0x3ff0000010000000
fC = 0x0000000000000001

fA * fC + fB

Returns 3ff0000020000000 on hardware, 3ff0000000000000 on Dolphin, because the error can't be precisely enough represented in a double precision float This is of course the extreme case with the smallest error possible, but the point is that any inputs with an fB that ties already and fA * fC is smaller than the smallest double precision subnormal will have the same an issue

Geotale avatar Oct 04 '25 20:10 Geotale