0.1 + 0.2 = 0.30000000000000004
-
-
We get some overly-precise prices from the Bitfinex API every now and then. No other exchange we track is that accurate. Happens only on and off. Why is that? Example:
BTC/USD – 15min – RSI Cross Below 30.0 – $35,248.52669802 – 03:22:54 UTC – BITFINEX -
BTC/USD, BTC/EUR, BTC/JPY, BTC/GBP are part of a single underlying book and we use high-precise fx values to do the accurate conversion. We prefer not to round to provide the tighter spreads possible.
- Show replies
New conversation -
-
-
That said, it's not a JS thing. It's a floating-point thing. If you use floats instead of decimal types for financial math you're gonna have a bad time.
-
Yup. Ruby etc same thing. Just floating-point math, first thing everyone should learn. Still JS (ie. nodejs) would not be a smart move for a matching engine IMHO. Multi-threading is quite needed in order to reach large scale.
- Show replies
New conversation -
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.