I've been banging my head against this for an hour or two now.
I'm trying to subtract 77.495 from 100, but I can't get the correct answer.
It keeps giving 22.504999 rather than 22.505.
I've tried parseFloat(), Number(), all still give the incorrect answer...
try it yourself:
any ideas?
I'm trying to subtract 77.495 from 100, but I can't get the correct answer.
It keeps giving 22.504999 rather than 22.505.
I've tried parseFloat(), Number(), all still give the incorrect answer...
try it yourself:
Code:
alert(100.0000 - 77.495);
any ideas?