openerp-expert-framework team mailing list archive
-
openerp-expert-framework team
-
Mailing list archive
-
Message #00445
Re: float errors propagating to 10^-2 in OpenERP v5...
On 20/08/2010 13:26, Raphaël Valyi wrote:
Hello,
On Fri, Aug 20, 2010 at 6:32 AM, Dominique Chabord
<dominique.chabord@xxxxxxxxxx <mailto:dominique.chabord@xxxxxxxxxx>>
wrote:
hi
@Raphäel
Are you still convinced of this ?
You wrote yesterday : "NB: again, once this BCD "convention error"
is made, there is no further accounting error where sums wouldn't
match or anything like that (at least if we don't try to re-round
the same computation but done a bit differently, which requires
care when coding, further errors don't happen)."
I insisted to show you that I gave the proof that it is not true,
and you still deny it. Seems you are still make the initial error.
Sums not necessarily match and you conditions are not true.
regards
Yeah, well,
Dominique, in your example you have shown that you can have round(x)
!= round(x) pretty easily with Float for very simple computations with
decimal values that exceed the precision of the binary Floats (like
0.1, 0.3, 0.7, 0.9...).
No, no and no, you are convinced it is, it is NOT !
What my example is about : (I give it even simpler this time)
A+B is different from B+A if you consider rounding a float result !
The example you gave back is trival, illustrates well known cases and
doesn't highlight what the real problem is, and I don't stop telling it
to you. Consider ALL the initial example, and you will be really scared ;-)
You still go too fast reading it and you only consider half of the
story, and the good one, I mean the easy to fix one, btw.
I thing others will get tired of reading always the same message from me ;-)
However, I believe that with extreme coding care, it might be possible
to round ONLY ONCE, and once you rounded, you always reuse the value
you rounded an put in the accounting and do not try to round it again
on the other side of your comparison (or else always use an 'epsilon').
I don't care about considerations if we do not agree on what the problem
really is. Your example is just mis-leading you.
Accountability is ALWAYS about computing data twice differently to get
the same result. This is what we call BALANCED.
It is not a matter of how many times you round it of whatever. Just
understand how several errors with different magnitudes can combine and
its consequence on the operational result, then we will start from the
same point and can understand each other.
Now, it exists a way to code that computation properly with Floats
NO, there isn't.
until you understand what the problem is, and following part of your
message let me think you didn't.
I'm sorry to insist so badly, but I think all conclusions on a bad start
are a loss of time. This messageis my last attempt to explain that case
as I'm already ashamed of the noise I 'm making.
regards
--
Dominique Chabord - SISalp
Logiciel libre pour l'entreprise : Gestion (ERP) et applications web2
18 avenue Beauregard 74960 Cran Gevrier
145A rue Alexandre Borrely 83000 Toulon
tél +33(0)950274960 fax +33(0)955274960 mob +33(0)622616438
http://sisalp.fr - http://sisalp.org - http://bdll.fr
References