Everytime I heard this I thought, well duh a float should never be used for pricing, why would anyone think that was a good idea? But I finally found someone lmao
Tbf it's better to store the absolute number and number of significant figures as different integers if the floating point math is going to be a problem.
Ignoring specific types existing for this purpose or using integers - double is generally considered a default floating point type in most fields (gamedev being a notable exception).
View all comments
-11
u/LetUsSpeakFreely Apr 10 '26