# Dec128 Fixed-Point Parity Between Simulator and Live Broker

- Canonical: https://rxm.orrnn.com/articles/dec128-fixed-point-execution-parity
- Author: Marcus Chen | Updated: 2026-12-02T02:48:16.329068-08:00

> Sharing a 128-bit base-10 decimal engine across @orrnn/math-fixed, OrrnnScript OBC1, and the Go broker backend eliminates cumulative rounding drift across commissions, swaps, and margin.

## The Hidden Cost of Binary Floating Point

In IEEE-754 `float64`, `0.1 + 0.2 != 0.3`. Over 10,000 scalping trades, tiny tick rounding errors skew backtest Sharpe ratios and trigger unexpected margin stop-outs.

## Unified Dec128 Pipeline

Every price tick, pip value, swap charge, and partial lot close in RTX5 uses identical `Dec128` rounding modes end to end.
