Never Use Float For Money: The Bug That Silently Mis-Sizes Live Trades
Using a floating-point number for money is a classic bug, but in a trading system it does not just round a penny wrong: it silently mis-sizes a live position. Here is why, and why a Money type is not the fix you think it is.