I love how this sensible take is followed by a tornado of comments that boils down to "NEVER use floats JUST BECAUSE".
Never use floats for financial calculations. Because hard won experience.
"Floats" are simulations of Real Numbers, and Reals are uncountable. Not what you want for finance, where everything is counted.
Never use floats for financial calculations. Because hard won experience.
"Floats" are simulations of Real Numbers, and Reals are uncountable. Not what you want for finance, where everything is counted.