Tag: recursion

  • LibreOffice Calc: circular reference

    A formula in which the answer depends on itself is called recursive in computer science. Some spreadsheets call it a circular reference.

    The following is my understanding.

    Let’s imagine the following case: tax is assessed as 35 percent of an earner’s after-tax income. Such a calculation is a circular reference: tax=0.35*(Income-tax).

    LibreOffice Calc allows such a calculation. However, circular reference needs to be enabled. Under Tools->Options->Calculate, check a box Iterations. I set the Minimum change to 0.001, then clicked OK.

    Next, I went to cell a1 and typed 75000, then to c1 and typed =0.35*(a1-c1). The answer appeared in c1: 19444.44.

    In that case, 19444.44 should be 35 percent of (75000-19444.44). Well, 75000-19444.44=55555.56, and 35 percent of 55555.56 seems to be 19444.44. Apparently, LibreOffice Calc delivered:)

    Source:

    software.codidact.com

    -JS