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

Robinson Tryon (qubit) <[email protected]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |[email protected]
           See Also|                            |https://bugs.freedesktop.or
                   |                            |g/show_bug.cgi?id=67026

--- Comment #2 from Robinson Tryon (qubit) <[email protected]> ---
Another symptom of floating-point arithmetic being imperfect.

If you bump-up precision to 20 places, you see:

Value:                  2.01000000000000000000
INT(Value):             2.00000000000000000000
MOD(Value, INT(Value)): 0.00999999999999979000

When you compare 0.01000000000000000000 and 0.00999999999999979000, Calc
(correctly) says that they're not the same.

I'm not sure if Calc has a built-in EQUAL_WITHIN_TOLERANCE() function, but you
can use this for the purpose:

=(ABS($CELL_OF_FIRST_VALUE - $CELL_OF_SECOND_VALUE) < 0.0000000000001)

Making sure that two values are less than 1e-12 different should be close
enough for most purposes :-)

See:
Bug 67026 - Other: Limitations in Calc precision need to be documented

-- 
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