I was shocked to see such a basic subtraction bug in JS, I am sure most of you here would have experienced this issue, please help me with a work around here,
All I am doing is subtracting a number from 100 which gives unexpected results, an example is stated below
100 - 99.1
// returns 0.9000000000000057
Am I doing something wrong here ? :S I am confused
Floating point values are never accurate as you expect. You can use Number object to convert this to answer as you need.