github.com/blynn/nex@v0.0.0-20210330102341-1a3320dab988/tacky/README (about)

     1  = Tacky =
     2  
     3  Tacky is a tool to help with US tax forms.
     4  See tacky_test.go for an example.
     5  
     6  The unconventional language is designed with US tax forms in mind, which
     7  contain instructions like:
     8  
     9   16: Subtract line 9 from line 4
    10   42: Enter Schedule X, line 53
    11  
    12  In Tacky, these are written:
    13  
    14   16 = 4 - 9
    15   42 = [Schedule X:53]
    16  
    17  Each line holds a monetary amount measured in cents. In particular, there is
    18  no support for integer or decimal constants.
    19  
    20  Although all quantities except percentages are measured in cents,
    21  mulitplication and division ignore this, and give their result in cents
    22  rather than cents squared or as a dimensionless quantity.
    23  
    24  These choices made implementation easier, but also makes certain
    25  instructions difficult to translate. For example, suppose we have:
    26  
    27   6: Ceiling of line 5 divided by $2500.
    28   7: Multiply line 6 by 2% (.02) and enter the result as a decimal.
    29   8: Multiply line 2 by line 7.
    30  
    31  Lines 6 and 7 are dimensionless, which Tacky does not support. To
    32  work around this, the three lines should be combined into one:
    33  
    34   8 = 2 * ((5 + $2500 - $0.01) / $2500) * 2%