[3/3] gdiplus: Make GdipInvertMatrix test pass on native

Dan Kegel dank at kegel.com
Sat Jul 12 18:16:43 CDT 2008


James wrote:
> > GDI+ uses floating point values for matrix elements so
>> don't you think the result could be slightly different...
>
>  No I don't think the results will be slightly different.
> Higher-precision arithmetic doesn't mean more slop.

Floating point equality comparisons need an error tolerance.
See e.g.

http://teaching.idallen.com/cst8110/97s/floating_point.html
http://docs.hp.com/en/B3906-90006/ch03s05.html
http://en.wikipedia.org/wiki/Floating_point#Accuracy_problems
http://search.cpan.org/~dagolden/Test-Number-Delta-1.03/lib/Test/Number/Delta.pm

And testing matrix math routines is even trickier, it
helps to have a really good math background there...



More information about the wine-devel mailing list