1

Shouldn't it be 36.74? Can someone explain what goes on behind the scenes & why does it make sense (if any) for such calculations?

console.log(96.74 - 60)
Satpal
  • 129,808
  • 12
  • 152
  • 166
Zack Webster
  • 127
  • 1
  • 9
  • 1
    TLDR: Those calculations are very fast, floating points are shorter than their precise equivalent, and the results are accurate enough for most things. In your case its 0.0000000000005 off, I mean, no one cares right? – Jonas Wilms Jan 03 '19 at 10:31

0 Answers0