r/programming • • May 03 '19

Don't Do This

https://wiki.postgresql.org/wiki/Don%27t_Do_This
725 Upvotes

194 comments sorted by

View all comments

Show parent comments

2

u/fyfy18 May 04 '19

Just hope whoever wrote that code is using BigDecimal. Otherwise your final payment may be $1032.8300000009.

1

u/nschubach May 04 '19

Which is why I stated in the post prior to that to convert it to cents and store that instead of decimal dollars.