Float vs Decimal in ActiveRecord
I remember my CompSci professor saying never to use floats for currency. The reason for that is how the IEEE specification defines floats in binary format. Basically, it stores sign, fraction and exponent to represent a Float. It’s like a scientific notation for binary (something like +1.43*10^2). Because of that, it is impossible to store … Read more