1

I am new to programming i am learning javascript on w3 schools and come to know that

var x = 0.2+0.1; // result will be 0.30000000000000004
alert(x);

how it is possible. Please let me know

thefourtheye
  • 233,700
  • 52
  • 457
  • 497
Saurabh Mahajan
  • 2,937
  • 7
  • 25
  • 32
  • 7
    [What Every Computer Scientist Should Know About Floating-Point Arithmetic](http://docs.oracle.com/cd/E19957-01/806-3568/ncg_goldberg.html) – thefourtheye Jan 03 '14 at 07:21

0 Answers0