Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>The short answer is that FP calculations are entirely deterministic, as per the <a href="http://en.wikipedia.org/wiki/IEEE_754" rel="noreferrer">IEEE Floating Point Standard</a>, but that doesn't mean they're entirely reproducible across machines, compilers, OS's, etc.</p> <p>The long answer to these questions and more can be found in what is probably the best reference on floating point, David Goldberg's <a href="http://docs.sun.com/source/806-3568/ncg_goldberg.html" rel="noreferrer">What Every Computer Scientist Should Know About Floating Point Arithmetic</a>. Skip to the section on the IEEE standard for the key details.</p> <p>To answer your bullet points briefly:</p> <ul> <li><p>Time between calculations and state of the CPU have little to do with this. </p></li> <li><p>Hardware can affect things (e.g. some GPUs are not IEEE floating point compliant).</p></li> <li><p>Language, platform, and OS can also affect things. For a better description of this than I can offer, see Jason Watkins's answer. If you are using Java, take a look at Kahan's <a href="http://www.cs.berkeley.edu/~wkahan/JAVAhurt.pdf" rel="noreferrer">rant on Java's floating point inadequacies</a>.</p></li> <li><p>Solar flares might matter, hopefully infrequently. I wouldn't worry too much, because if they do matter, then everything else is screwed up too. I would put this in the same category as worrying about <a href="http://en.wikipedia.org/wiki/Effects_of_nuclear_explosions#Electromagnetic_pulse" rel="noreferrer">EMP</a>.</p></li> </ul> <p>Finally, if you are doing the same <em>sequence</em> of floating point calculations on the same initial inputs, then things should be replayable exactly just fine. The exact sequence can change depending on your compiler/os/standard library, so you might get some small errors this way.</p> <p>Where you usually run into problems in floating point is if you have a numerically unstable method and you start with FP inputs that are <em>approximately</em> the same but not quite. If your method's stable, you should be able to guarantee reproducibility within some tolerance. If you want more detail than this, then take a look at Goldberg's FP article linked above or pick up an intro text on numerical analysis.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload