1

Using Chrome Version 27.0.1453.93, I found something very strange that I can not understand :

Launch your console and directly enter

95.1-80

For me the answer should be

15.1

For Chrome

95.10-80
15.099999999999994

(95.10-80).toFixed(2)
"15.10"

(95.10-80).toFixed(3)
"15.100"

...

(95.10-80).toFixed(13)
"15.1000000000000"

...

(95.10-80).toFixed(15)
"15.099999999999994"

...

(95.10-80).toFixed(20)
"15.09999999999999431566"

Does Somebody know why ?

Regards

Lee Taylor
  • 7,761
  • 16
  • 33
  • 49
  • 10
    [Is JavaScript's Floating-Point Math Broken?](http://stackoverflow.com/questions/588004/is-javascripts-floating-point-math-broken) – apsillers May 31 '13 at 15:57

0 Answers0