# calc: rounding: general precision problem?

OMG. And then you tell me I “insinuate”. Facepalm.

Your last comment is exactly the same reasoning as in

– What are the chances to meet a live dinosaur on street?

– Exactly 50%: either you meet one, or not.

@mikekaganski:
omg, rofl, YOU MADE MY DAY!!! thank you!
that’s new style by you, and i LIKE it, humor than insults … GREAT.
Mercedes engineers have calculated similarly, the self-control software takes people, baby carriages, old people with walking aids etc. into account, but ‘containers lying across the road’ had been just as little ‘relevant objects in the sense of the brake assistant’ as e.g. bridge piers. I mean since a container was! in the way they have improved.
Your dinosaur question hangs on the definition of dinosaur, bats are not far away, and of life, the models of Jurassic Parc can not yet reproduce, but are reasonably intelligent?

All that blablabla about lives is absolutely irrelevant, and only shows how little you know about software development, and how much your idea about the world you live in is based on illusions. But - well, that’s not rare.

One more attempt.

You are doing fundamental errors. You try to use rounding to fix imprecise FP calculations, trying to restore perfect double that is closest to exact correct decimal. This is wrong; the only way to do it right is when user rounds a result of calculations to known precision, not to maximal precision. A human can do it consciously, for specific case: e.g., calculating with money, you may safely round to 2 decimals. This would always work correctly when you work with reasonable sums, because your original numbers (with cents) will error by a very small amount (much less than a cent); their sums and multiples will also differ by values much less than a cent. In that case, round will not have to decide if it’s a bit less than 1/2 cent.

@mikekaganski:
i’m really thankful for your comments, even if they take an opponents position, i’ll think about it …
rounding to 2DP: ‘=round(0,30499999999999948;2)’ should go down, and does in Excel, but not in Calc, thus it’s a compatibility issue too.
a citation from W. Kahan, citing one of his teachers?: ‘In the 1970s D.H. Lehmer, a renowned Number Theorist at Berkeley, used to warn me …“Acquiescence to rounding errors places you in a state of sin.”’, insofar: ‘vade retro, satana!’

No it’s not a compatibility issue. As said, no single data point is useful: Excel may truncate the entered value to the 15 significant points before processing, and that doesn’t make it “correct”. The error here is again in the range of 1 ULP, and so is OK. Citations of random thoughts without context are just off-topic, and a logical fallacy of appeal to authority.

@mikekaganski: again, let me clear my thoughts: ‘Compatibility’ between different programs usable and used for the same task is the quality to process the same input to the same result. If the results are different compatibility is broken. common sense?
If the compatibility is not given and one considers which program should be changed … that which deviates more from school mathematics. my sense, would you share?
If such changes inject new deviations in other areas that can also lead to accept to be ‘better’ in the other task. If this is so for this case you are of course right, but this would have to be shown and justified.
And even then I might still consider whether there is a path to a mathematically correct solution that does not induce other problems.
Unless you know and show! that this is not possible. Or that this is not possible with a tolerable effort.
The ‘sense’ of that citations is context independent - IMHO, and it’s ‘point’ is rounding, thus on topic - IMHO

‘Compatibility’ between different programs usable and used for the same task is the quality to process the same input to the same result. If the results are different compatibility is broken. common sense?

In a sense, yes. But not in the part of “broken”. And it doesn’t imply that lack of “compatibility” in this strict sense is a “problem”.

If the compatibility is not given and one considers which program should be changed … that which deviates more from school mathematics. my sense, would you share?

Yes.

But where have you shown that some program does “deviate more from school mathematics”? See above: a single data point tells nothing.