To comment on the following update, log in, then open the issue:
http://www.openoffice.org/issues/show_bug.cgi?id=4219





------- Additional comments from [EMAIL PROTECTED] Thu Feb  1 09:37:21 -0800 
2007 -------
AW->richlv: Thanks for Your comments. Well, Yes, it goes in the right direction
(so, no, no crap at all :-). Unfortunately, it's not about 'slightly deviate'
but 'completely wrong' when calculations exceed the displayable limit.

Let's make a decimal example.

When You add any 2 single-digit numbers, the result may at maximum need two
digits (9 + 9 -> 18). When You have three slots to remember the result, You may
add up to (999 / 9) -> 111 single-digit numbers without danger. If You add more,
Your result may be wrong (overrun), depending on the added numbers (not all need
to be 9, but maybe).

When multiplying, it gets worse. Potentially in binary space, You need double
the space to be on the safe side.

What happens often is something like scaling all values of e.g. a polygon. With
integer numbers, the factor is normally a fraction, e.g. x / y. Multiplying with
this fraction is:

a = a * x / y

Now an example with numbers, a = 250, x = 10, y = 3 (multiply with 3.333...).
Expected integer-result is 833.

But that's not what You get with limit to 3 digits:

a * x -> 250 * 10 -> 2500, three digits -> truncated to 500
500 / 3 -> 166

The in-between result does not fit in the choosen number space. Dividing before
multiplying looks like a good idea, but will make the result more unprecise:

250 / 3 -> 83, * 10 -> 830, three off from the expected result.

For addition this means: errors with less numbers involved (e.g. center of
polygon, all points get added and divided by count -> errors will happen with
polygons which work today)

For multiplication this means: The chance to get completely wrong results
increases by the given factors.

HTH. Comments?

---------------------------------------------------------------------
Please do not reply to this automatically generated notification from
Issue Tracker. Please log onto the website and enter your comments.
http://qa.openoffice.org/issue_handling/project_issues.html#notification

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to