<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 - Circular reference accumulator, err:523 or miscalculation"
   href="https://bugs.documentfoundation.org/show_bug.cgi?id=114482">114482</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>Circular reference accumulator, err:523 or miscalculation
          </td>
        </tr>

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

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

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

        <tr>
          <th>OS</th>
          <td>Mac OS X (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>a.burger@liamix.de
          </td>
        </tr></table>
      <p>
        <div>
        <pre>Description:
To finish my spreadsheet-sequence I usually let my pupils write a little
car-racing simulation in Excel. At my new school I haven't got Excel at my
disposition, so we do everything with Calc (which is fine generally). However,
there is something that worked fine in Excel that I cannot get to work in Calc.

I need an accumulator field that adds the result of a dice-roll (simulated by
=int(rand()*6)+1) to get the current sum of all prior dice-rolls plus the
current one.

This is possible if you activate iterative calculations. But with my current
settings I most of the time get the following error: 
<a href="https://i.stack.imgur.com/XBpY8.png">https://i.stack.imgur.com/XBpY8.png</a>

The settings are as follows: 
<a href="https://i.stack.imgur.com/H5XXb.png">https://i.stack.imgur.com/H5XXb.png</a>

I can get the iterative calculation to work if I set "Minimum cange:" to 6. But
when I press F9, the calculation is not correct. It always at least adds double
the dice-value, but oftentimes a value that seems to have no connection to the
show dice value.

In Excel this simply worked using the following settings: 
<a href="https://i.stack.imgur.com/02GCR.png">https://i.stack.imgur.com/02GCR.png</a>
<a href="https://i.stack.imgur.com/Zr5ic.png">https://i.stack.imgur.com/Zr5ic.png</a>

Calc's behaviour seems to be wrong, no matter what settings I enter for "steps"
and "minimum change".

Steps to Reproduce:
1. set setting according to screenshot
2. add a circular reference
3. press F9

Actual Results:  
err:523 or miscalculations (seems like two iterations at a time)

Expected Results:
On every press of F9 the new "dice-value" should be calculated and added to the
accumulator field.


Reproducible: Always


User Profile Reset: Yes



Additional Info:


User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.13; rv:57.0)
Gecko/20100101 Firefox/57.0</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>