VarRound implementation

Fabian Cenedese Cenedese at
Fri Feb 20 04:13:03 CST 2004

>Without a test how can you know if this implementation produces the correct values?  What about variant type conversions?  It seems silly to send a patch without testing it...

Now I'm confused. I'm adding more types to VarRound and I'm also implementing
the test_VarRound function (programmer's pride :)

For this I tested more cases on Windows and got strange results (in my view).

VT_R4: 7.850 -> VarRound(1) -> 7.800
VT_R4: 7.851 -> VarRound(1) -> 7.900

Is this the binary representation (in)accuracy?
How can I test if the rounding worked ok when the numbers may differ in
the last (invisible) bits?

And how should I round a currency? It's valid on Windows but I couldn't
interpret the results. Is this some kind of fixed comma type?

bye  Fabi

More information about the wine-devel mailing list