how to deal with floating point number precision in javascript