0

For the same underlying value, will the rounding error be consistent or random when I run a program multiply time. Say, if I store value 0.003, the actual number stored in the computer is 0.002999999998. If I run the same program multiple times, will the stored number be sometimes 0.002999999998, and sometimes 0.0030000000001?

Peter O.
  • 32,158
  • 14
  • 82
  • 96
SimonInNYC
  • 400
  • 3
  • 15
  • Unclear. If the number stored is (say) `01110000111000110`, then... the value stays that way! Could you edit question and clarify. – kebs May 04 '21 at 20:01
  • And why the language tags ? – kebs May 04 '21 at 20:01
  • 1
    See also Bruce Dawson's "[Floating-Point Determinism](https://randomascii.wordpress.com/2013/07/16/floating-point-determinism/)". – Peter O. May 04 '21 at 20:04

0 Answers0