1

can anyone explain why the result bellow in JS? console.log(Math.ceil(1.22222 * 100000)); // Expect 122222 in my code, surprisingly, it is 122223

console.log(Math.ceil(1.222222 * 1000000)); // Expect 1222222 and it is 1222222

why 5 and 6 decimal points have different outcome?????????????????

ldsenow
  • 5,885
  • 3
  • 21
  • 21

0 Answers0