<html>
    <head>
      <base href="https://bugs.documentfoundation.org/">
    </head>
    <body><table border="1" cellspacing="0" cellpadding="8">
        <tr>
          <th>Bug ID</th>
          <td><a class="bz_bug_link 
          bz_status_UNCONFIRMED "
   title="UNCONFIRMED - calc: calculation: rounding of results: bad influence of unspecific rounding if terms in different dyadic ranges"
   href="https://bugs.documentfoundation.org/show_bug.cgi?id=138424">138424</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>calc: calculation: rounding of results: bad influence of unspecific rounding if terms in different dyadic ranges
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>LibreOffice
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>3.5.1 release
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>All
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>All
          </td>
        </tr>

        <tr>
          <th>Status</th>
          <td>UNCONFIRMED
          </td>
        </tr>

        <tr>
          <th>Severity</th>
          <td>normal
          </td>
        </tr>

        <tr>
          <th>Priority</th>
          <td>medium
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>Calc
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>libreoffice-bugs@lists.freedesktop.org
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>newbie-02@gmx.de
          </td>
        </tr></table>
      <p>
        <div>
        <pre>Description:
calc doe's some 'tie to zero' rounding, acc. @erAck intended for integer values
but imho affecting all calculations, 

this rounding sometimes has evil effects, e.g.
'=(2^53+31-2^53)+(2^53-31-2^53)+(2^53+31-2^53)+(2^53-31-2^53)' should
mathematical result in '0' (the subterms in brackets cancel each other out),
'fp-math' calculates '2' because above 2^53 IEEE 754 is limited to the 'even
integers' and some small rounding steps in, calc calculates '64' reg.
unneccessary rough rounding and either different effect of it below and above a
magnitude range border (2^53), or different effect for '+' vs. '-', 

Steps to Reproduce:
1. calculate '=(2^53+31-2^53)+(2^53-31-2^53)+(2^53+31-2^53)+(2^53-31-2^53)'
2.
3.

Actual Results:
64

Expected Results:
'0' or maximal tolerable '2', 


Reproducible: Always


User Profile Reset: No



Additional Info:
Version: 7.1.0.0.alpha1+ (x64)
Build ID: b61bf7c7cfcf97a5ade6d130873af146670bc2ee
CPU threads: 8; OS: Windows 6.1 Service Pack 1 Build 7601; UI render: default;
VCL: win
Locale: de-DE (de_DE); UI: en-US
Calc:</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>