see bellow. 2009/2/5 Marc Schwartz <[email protected]>
> Ely Schoenfeld <[email protected]> writes: > > > Hello all. > > > > I discovered something odd with OOo 3.0.1 Calc. > > > > Hope someone could verify this for me. > > > > a) Put in two different cells the numbers: > > > > 18282.34 (For example A1) > > -18282.73 (For example A2) > > > > b) Add them in another cell. (For example A3) > > Doesn't matter if you use the "SUM" formula or just use a simple "+" > sign. > > > > If I add more decimals to the cell format, I get something like > -0.390000, > > that's ok. > > > > But If I copy the last cell and then paste special with only text, > numbers and > > dates checked, I obtain: > > -0.389999999999418 > > > > You can test that the problem IS affecting further calculations like > this. > > > > a) Add 0.005 to the result (A3 in my example) > > > > You will obtain -0.38 if you are showing 2 decimals. > > > > b) Write exactly -0.39 in a new cell, and then add the same 0.005 to it. > > > > You will obtain -0.39 if you are showing 2 decimals. > > > > In both cases, if you add more decimals to the cells, you will obtain the > same: > > -0.385 > > But if you copy and paste special with only text, numbers and dates > checked, > > you would obtain in the first case -0.384999999999418 and -0.385 in the > second > > one. > > > > I'm attaching an odt file here, hope it passes through. > > > > In case it's relevant, this happened on a: > > > > Windows XP Version 2002, sp3 > > 32Bit Centrino Duo processor > > > > Should I open an issue about this? (Couldn't find one) > > > > Thank you all. > > > > Ely. > > In addition to all of the other comments, you might want to review this > article: > > What Every Computer Scientist Should Know About Floating-Point > Arithmetic > > http://docs.sun.com/source/806-3568/ncg_goldberg.html > > > You might also want to review this MSKB article: > > http://support.microsoft.com/default.aspx?scid=kb;EN-US;78113 > > as OO.org has implemented a similar process in Calc. > > > HTH, > > Marc Schwartz > Thank you very much for those links. Does anybody knows if this Floating Point error gets moved to a much bigger numbers if I install OOo Calc in a 64bit computer with a 64bit compatible OS? Or it depends on the format it uses internally? Ely > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [email protected] > For additional commands, e-mail: [email protected] > >
