1

I tried a simple calculation it gives me wrong result.

Here is the fiddle : https://jsfiddle.net/pwu7n6qL/2/

var test = (1909 / 10000) * 10000
$("#abc").val(test);
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<div id="value">
  <input type="number" id="abc"> <br>
  <br> Actual answer is suppose to be : 1909
</div>
Daniel Beck
  • 20,653
  • 5
  • 38
  • 53
  • [This](https://stackoverflow.com/questions/588004/is-floating-point-math-broken) might shed some light on what's going on – StaticBeagle Jun 19 '18 at 21:32

0 Answers0