top | item 20185191

(no title)

civility | 6 years ago

    x = 1e-20 + 1e20 - 1e20
    y = 1e20 - 1e20 + 1e-20
    assert x == y

discuss

order

firethief|6 years ago

That's like the first rule of floating point numbers though: don't do that

civility|6 years ago

The person I replied to claims to have looked at large* data sets and never seen a discrepancy in 6-8 significant digits. I thought I'd show them a small data set with 3 samples that retains no significant digits.

* Never mind that "millions" isn't large by current standards...