decimal handling in javascript