RTX5 Go / C++ / Rust SDK
Why does RTX5 use Dec128 fixed-point math instead of IEEE-754 float64 for margin & PnL?
Asked by @marcus_rtx · 2026-12-02Coming from MQL5 and Python backtesters, I noticed `@orrnn/math-fixed` and the Go broker backend share `Dec128`. What exact discrepancy does this eliminate?
Answers (1)
QuantForge Labs (@quantforge)
Accepted Answer
Binary `float64` cannot represent decimal tick sizes like `0.00001` or `0.01` exactly, causing cumulative rounding drift across thousands of swaps, commissions, and partial closes. `Dec128` keeps 1:1 deterministic parity between the client simulator and the RTX5 Go matching engine.