https://bugs.freedesktop.org/show_bug.cgi?id=71459

--- Comment #4 from Dominique Boutry <[email protected]> ---
The spreadsheets calculate and store numbers with the greater precision offered
by the computer technology :
- Floating mantissa 52 bits precise to 1.0E-16 (approx : 52/10 * 3 = ~ 16)
- Other technics (probable : 64-bit integers acting as numerator and
denominator of a fractional number) 
- Perhaps still others, at the discretion of the implementers , as long as it
allows a greater precision.

Finite precision is observable in the following expression :
= 100000000000000000000 + 1 - 100000000000000000000 , which is evaluated as 0 ,
not 1.

Integer storage of integers up to 10000000000000000 is garanteed accurate. But
there is no warranty that intermediate results don't show "integer overflows",
so intuitive use of integers is rapidly inappropriate.

The COMBIN function ( a; b ​​) is difficult to implement :
- Implement it as FACTDOUBLE = (a) / FACTDOUBLE (b) is too restrictive given
the loss of accuracy of FACTDOUBLE from 27,
- Move to floating numbers is not surprising , and introduce the loss of
relative accuracy of 1.0E-16 on input calculation arguments, totaling here
1.0E-13 on output calculation :
COMBIN (15;9) + 1 - 5005 evaluates to 1.00000000000091000000

It belongs to the application developer EXCEL / LibO Calc developer to design a
"digitally correct" application and to avoid sequences that make significant
some bits located in the error area at mantissa end. It is impossible to track
back the evolution of the numeric error along the calculations.
Programmers take into account that for 40 years in calculation which led us to
the moon ;-)
Best solution here : = ROUND ( COMBIN ( 15;9 ) ) + 1 - 5005

-- 
You are receiving this mail because:
You are the assignee for the bug.
_______________________________________________
Libreoffice-bugs mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/libreoffice-bugs

Reply via email to