https://bugs.documentfoundation.org/show_bug.cgi?id=67026

--- Comment #18 from b. <newbie...@gmx.de> ---

@Andrew: 

'if cell A1 is loaded with a number with limited decimals (say 15,02) and cell
B1 has a value of 10,02 I should expect to always get A1+B1=25.04 and not
25.03999999999. My main beef is that both numbers are inputed and not
calculated (so I KNOW they have ONLY two decimal places) and thus output should
be ALWAYS on two decimal places.'

for theese values it works in recent LO versions, but there are some numbers
which produce irritating results, 

i had the same idea and tried if it is possible to implement 'smart rounding'
... it is ... it is slow, as done with the tools available to me (user macros),
but ... it works, 

perhaps you'd like to test, and perhaps sometimes somebody will implement
something similar or better in code, 

it doesn't help for very precise numbers with lots of digits, but i'd bet that
about 70 percent of numerical data hold and calculated in spreadsheets are
financial data with 2 or max three decimals, 

and that more than 95 percent of the complaints about wrong calculations in
spreadsheets result from users who didn't expect wx,yz999999~ values for their
money, 

you find a version of my tests in
http://bugs.documentfoundation.org/attachment.cgi?id=165435, or in
http://bugs.documentfoundation.org/attachment.cgi?id=165424, 'SUM_S' doe's a
calculation and smart rounding of two numbers ... 

@Robin: 

which are your 'different results'? couldn't find any in the sample with LO
6.1.6.3 or 7.1.0.0.a0+, or do you mean I10 and J10? they have different display
format, 14 and 16 decimal digits, that's not an issue of calculation but of
user formatting ... 

doesn't say that there are no errors respectively very questionable decisions
how which numbers are processed and displayed (int 16 digits, floats 15, crazy
as producing crazy number sequences), just this sample is OT ... or did i miss
something? 

'Raises an interesting question of how it occurred.' - spreadsheets calculate
with binary 'float' numbers while humans are used to decimals, for many decimal
numbers there is no exact correspondence in the binary system, especially not
with a limited number of bits, so the calculation is done with the closest
value that can be constructed in IEEE 754 float numbers, and also the result is
not! the - often rounded - number that is displayed on the screen, but a binary
value with which calc continues to calculate in the background, thus errors can
add up, 

mostly save: multiplication and division, critical: adding numbers with
different magnitude and subtracting numbers with small difference compared to
their value, special: special functions like like modulus or angle functions
...

-- 
You are receiving this mail because:
You are the assignee for the bug.
_______________________________________________
Libreoffice-bugs mailing list
Libreoffice-bugs@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-bugs

Reply via email to