3 ms·
While you are correct that it can _represent_ these numbers with that precision... it cannot operate on them and retain that precision, so DO NOT USE FLOATS TO
by withinboredom 2y ago
While you are correct that it can _represent_ these numbers with that precision... it cannot operate on them and retain that precision, so DO NOT USE FLOATS TO REPRESENT MONEY. Thank you for your time.
let a = 35
let b = -34.99
console.log(a+b)
// output: 0.00999999999999801
- zoover2020 2y agoBrr almost got the shivers until I read your comment