You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Status: Needs Architectural Review
This issue outlines a proposed core architectural change. It requires technical review and approval before deciding whether to implement or adopt.
Replace floating-point currency math in standard JavaScript numbers (0.1 + 0.2 = 0.30000000000000004) with a deterministic, integer-minor-unit Money library (main/core/money.ts).
Key Features & Technical Details
Integer Minor-Unit Storage:
Stores all monetary values in minor units (e.g. cents, pence, paise: $19.99 = 1999).
Banker’s Rounding (ROUND_HALF_EVEN):
Uses standard accounting Banker’s Rounding on exact halves to eliminate systemic upward rounding bias over large volumes of sales.
Penny-Safe split() Distribution:
Safely divides totals without penny-loss discrepancies (e.g. splitting $10.00 three ways yields [$3.34, $3.33, $3.33] totaling $10.00 exactly).
Important
Status: Needs Architectural Review
This issue outlines a proposed core architectural change. It requires technical review and approval before deciding whether to implement or adopt.
Extracted from fork
richanonymous22/FloCafe(branch:claude/plemmo-epos-audit-fro8v9):Overview
Replace floating-point currency math in standard JavaScript numbers (
0.1 + 0.2 = 0.30000000000000004) with a deterministic, integer-minor-unit Money library (main/core/money.ts).Key Features & Technical Details
$19.99=1999).ROUND_HALF_EVEN):split()Distribution:$10.00three ways yields[$3.34, $3.33, $3.33]totaling$10.00exactly).main/core/money.ts&tests/plemmo-money.test.ts.