4 ms·
This is not great advice, and he defeats his own argument without realizing it. The main problem with this article is the damn title, which is absolutely awful
by anonytrary 7y ago
This is not great advice, and he defeats his own argument without realizing it. The main problem with this article is the damn title, which is absolutely awful advice. The body of the article ultimately contradicts the title. Anyone who didn't read the article but read the title might be more likely to use floating point numbers for money now.
> One piece of popular programming wisdom is "never using floating-point numbers for money." This has never made sense to me.
He then goes on to explain why it absolutely does and must make sense. It honestly seems like the author's entire point is about not accepting blanket statements.
> My summary: if you are doing some financial math that does not need to be accurate to the penny, just use floating point numbers.
Arguably all financial math needs to be accurate to the penny. I can't help but think he is maliciously trolling, trying to convince people of something that isn't true.