MmDIAG (<A HREF ="http://www.mivacentral.com/truxoft/?product=TRUXOFT-MMDIAG) reports">http://www.mivacentral.com/truxoft/?...TRUXOFT-MMDIAG) reports</A>
that the old fatal arithmetic rounding bug is still kicking in the freshly
announced Empresa v5.01. See my report from 2004 below. It still has the
same effect in v5.01 too.
The results from ME v5.01 (FreeBSD):
10 / -0.00000000000000177636 / 9 / 9
Should be:
10 / 0 / 10 / 10
I am afraid that the engine should be immediately pulled off any server - I
can easily imagine that such a huge error can completely wreck some stores,
and cause big damage if wrong amounts are billed through payment gateways.
Ivo
http://mivo.truxoft.com
-----Original Message-----
From: Ivo Truxa [mailto:[email protected]]
Sent: Sunday, June 20, 2004 7:58 PM
To: '[email protected]'
Cc: '[email protected]'
Subject: RE: [MVM:BUG] fatal arithemtic bug
Almost a year ago I reported a bug giving completely wrong results at simple
arithmetic operations. This bug was supposedly fixed in the following VM
version.
Unfortunately, I just found that only a secondary cosmetic effect of the bug
was resolved, but the serious bug itself is still causing fatally wrong
results in many arithmetic calculations.
The original bug was as follows: the code <MvEVAL EXPR="{100*(1-0.9)}">
displayed "1" instead of the correct "10" as the result. Current engine
versions display correctly "10", but the value itself, and any further
operations with the values, still give wrong results. Try this code:
<MvEVAL EXPR="{100*(1-0.9)}"> /
<MvEVAL EXPR="{100*(1-0.9) - 10}"> /
<MvEVAL EXPR="{int(100*(1-0.9))}"> /
<MvEVAL EXPR="{floor(100*(1-0.9))}">
Correctly it should return: 10 / 0 / 10 / 10
Older VM version return: 1 / -0.00000000000000177636 / 9 / 9
Current VM returns: 10 / -0.00000000000000177636 / 9 / 9
It means only the cosmetic MvEVAL was fixed, but further handling of the
value still results in completely wrong values.
Like at many other bugs, this one is also being detected and reported by the
MmDIAG/TxDIAG v2.00 diagnostic tool.
Ivo
http://mivo.truxoft.com
-----Original Message-----
From: Ivo Truxa
Sent: Monday, August 18, 2003 5:40 PM
Unlike what expected and what v3.9 correctly returns, in MVM the expression
<MvEVAL EXPR="{100*(1-0.9)}"> returns "1" instead of "10"
Example:
<MvEVAL EXPR="{100*(1-0.9)}"> /
<MvEVAL EXPR="{100 * (1 - 0.9)}"> /
<MvEVAL EXPR="{100.00 * (1 - 0.9)}"> /
<MvEVAL EXPR="{100.00 * (1.00 - 0.90)}"> /
<MvEVAL EXPR="{100.00 * ((1 - 0.9) ROUND 2)}"> /
<MvEVAL EXPR="{100-100*0.9}">
Results in v3.xx (correct):
10 / 10 / 10 / 10 / 10 / 10
Results in MVM v4.07 and v4.09 (wrong except of the last two):
1 / 1 / 1 / 1 / 10 / 10
I wonder that nobody experienced any problems with it yet. It must often
return wrong results even in Miva Merchant!
Ivo
http://mivo.truxoft.com
Comment