Here's an example where using floats for currencies *could* be an issue... the Number.toFixed() implementation in Javascript can give you surprising results (depending on how you believe it should work):

(1.015).toFixed(2) returns "1.01" instead of what you might expect "1.02"

sitepoint.com/number-tofixed-r

Pretty sure people aren't testing for this kind of bug unless they are aware of these kinds of specific issues...

#currency #FLOAT #bugs #softwareengineering

Last updated 3 years ago

Tech News Worldwide · @TechNews
11278 followers · 97987 posts · Server aspiechattr.me