Javascript Computation Error (Numerical Error In Simple Calculation) -
this question has answer here:
- is floating point math broken? 20 answers
- how deal floating point number precision in javascript? 35 answers
solved:
read:
just javascript processing environment , type:
150.3 + 150.03 simple calculation, doesn't seem give right result (it doesn't matter if write "150.30 + 150.03" or so).
it gives result: 300.33000000000004.
any ideas why?
ps: read articles both on stack overflow , wikipedia wrong computing calculations due finite precision, nothing seemed relevant case.
Comments
Post a Comment