System Architecture

Calculation Engine v2.0

The deterministic logic layer powering all Commonrule tools.

Layer 1: Input

Strict type enforcement. All user inputs are sanitized and converted to arbitrary-precision decimals before any operation.

Layer 2: Logic

Unit test coverage of >99%. Logic is decoupled from UI, running in a pure functional state to prevent side effects.

Layer 3: Math

Arbitrary precision arithmetic (Big.js / Decimal.js pattern) ensuring 0.1 + 0.2 = 0.3 exactly.

Layer 4: Output

Results are formatted for display (rounding) but passed by reference in their full precision state for chained calculations.

Version History & Constants

v2.1.0Updated 2025 Federal Tax Brackets (IRS Rev. Proc. 24-40)
v2.0.5California Minimum Wage Update ($16.50/hr trigger)
v2.0.0Migration to server-side math verification