<html>
<head>
<base href="https://bugs.documentfoundation.org/">
</head>
<body>
<p>
<div>
<b><a class="bz_bug_link
bz_status_UNCONFIRMED "
title="UNCONFIRMED - Floating-point number round-trip lossage"
href="https://bugs.documentfoundation.org/show_bug.cgi?id=130202#c2">Comment # 2</a>
on <a class="bz_bug_link
bz_status_UNCONFIRMED "
title="UNCONFIRMED - Floating-point number round-trip lossage"
href="https://bugs.documentfoundation.org/show_bug.cgi?id=130202">bug 130202</a>
from <span class="vcard"><a class="email" href="mailto:erack@redhat.com" title="Eike Rathke <erack@redhat.com>"> <span class="fn">Eike Rathke</span></a>
</span></b>
<pre>The minus operator does an approxSub() within the order of magnitudes of the
two operands (i.e. ties/pulls to zero), as users expect 0.3-0.2-0.1 to be 0.0
If you use =RAWSUBTRACT(A1;A2) the result is 24576, which is just the "raw"
floating point subtraction of two values.
Adhoc I'm not sure if and what could be done about the input and display of
such large values, as the largest unambiguous integer value representable as
IEEE 754 double is 9007199254740991 or (2^53)-1.
Not directly related to <a class="bz_bug_link
bz_status_RESOLVED bz_closed"
title="RESOLVED FIXED - Rounding display error for 15 digits integers"
href="show_bug.cgi?id=96918">bug 96918</a> as that was about displaying the
representable integer values accurately.
<span class="quote">> When a floating-point binary number is converted to decimal for later
> conversion back to floating-point binary, it should be converted with
> enough digits that conversion to floating-point binary results in the
> same number. In this case, the number should be displayed in the edit
> box as 3.1415926535897932E+019.</span >
That is wishful thinking. An IEEE 754 double can not be more accurate than
general 15 decimal digits, sometimes 16 and rarely 17 decimal digits. The
problem with unique strings convertible back to double is that they are even
less accurate and not what users expect. See
<a href="http://blog.reverberate.org/2016/02/06/floating-point-demystified-part2.html">http://blog.reverberate.org/2016/02/06/floating-point-demystified-part2.html</a>
You might also be interested in some other links under
<a href="https://erack.de/bookmarks/D.html#Computer_Arithmetic_and_IEEE_754">https://erack.de/bookmarks/D.html#Computer_Arithmetic_and_IEEE_754</a> and
<a href="https://erack.de/bookmarks/D.html#010203">https://erack.de/bookmarks/D.html#010203</a>
If you have a perfect solution I'm not aware of then please tell us.</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are the assignee for the bug.</li>
</ul>
</body>
</html>