Floating-point arithmetic enables numerical computation with finite-precision binary representations. Its trade-off between range and precision makes ordinary decimal-looking values potentially inexact. section 6.2
Rounding can propagate
A literal can print as 0.1 while storing a longer binary approximation. Repeated arithmetic exposes the difference: (== 0.3 (+ 0.1 0.1 0.1)) returns false. section 6.2
Use floating-point values deliberately when approximation is acceptable. Avoid float and double for currency; choose an exact representation such as BigDecimal when precision matters. section 6.2 section 5.13
Mixed numeric comparison
Clojure’s == is suited to comparing numerically equivalent values across types: (== 1M 1.) returns true, whereas (= 1M 1.) returns false. This supports matching market orders whose prices arrive as integers, doubles, or BigDecimals.



















