129
rated 0 times
[
136]
[
7]
/ answers: 1 / hits: 31680
/ 13 Years ago, tue, may 17, 2011, 12:00:00
I was wondering how can I subtract two negative Floating-Point numbers in javascript. I tried:
alert(-0.2-0.1);
and the result is -0.30000000000000004
. Am I doing something wrong? What do I have to do to get -0.3
?
More From » floating-point