On Mon Sep 16 15:24:10 2024 +0000, Connor McAdams wrote:
Initially I was using relative error in testing, but at some point I had issues with it. Reintroduced it and there don't seem to be anymore issues, so this should be fixed now. :)
I'm afraid I wasn't clear enough here :/
I meant to specifically suggest using the float comparison functions we have in newer tests, like:
`static BOOL compare_float(float f, float g, unsigned int ulps)`
e.g. from d3dx9_36/tests/math.c. In particular I find ULPs to be a great way of quantifying comparison error.
Relatedly, we want to use `%.8e` for `float` formatting, because that doesn't lose precision when printing values.
It looks like, at least for now, we match native results to 1 ULP (on 32-bit, which is the one I happened to test). We need to specify the expected results with greater precision than we currently do, but it ensures that there are no surprises in the implementation.