J
janice
Hi all,
I read a lot of info on this issue, but still don't get it. Why does
this happen?
document.write(".05" + " \+ " + ".05" + " \= " + (.05 + .05) +
"<br>");
document.write("1.05" + " \+ " + ".05" + " \= " + (1.05 + .05) +
"<br>");
document.write("2.05" + " \+ " + ".05" + " \= " + (2.05 + .05) +
"<br>");
Outputs:
..05 + .05 = 0.1
1.05 + .05 = 1.1
2.05 + .05 = 2.0999999999999996
I also tried the code provided in this group's FAQ, and it worked
except for when it reaches an "even" number which should display 6.00
for example, it displays 5.100.
thx!
J.
I read a lot of info on this issue, but still don't get it. Why does
this happen?
document.write(".05" + " \+ " + ".05" + " \= " + (.05 + .05) +
"<br>");
document.write("1.05" + " \+ " + ".05" + " \= " + (1.05 + .05) +
"<br>");
document.write("2.05" + " \+ " + ".05" + " \= " + (2.05 + .05) +
"<br>");
Outputs:
..05 + .05 = 0.1
1.05 + .05 = 1.1
2.05 + .05 = 2.0999999999999996
I also tried the code provided in this group's FAQ, and it worked
except for when it reaches an "even" number which should display 6.00
for example, it displays 5.100.
thx!
J.