r/AskComputerScience • • Nov 23 '15

Do computers make calculation errors?

If computers can make billions of calculations per second, is there an expected calculation error rate they make? If so, is there some sort of correction process? If the calculations are really just tiny jolts of electricity going through logic gates, is there ever chance for an error? If I give excel 100,000 cells to perform a calculation on, is it possible for one of the calculations to be incorrect mathematically?

Thank you.

30 Upvotes

11 comments sorted by

View all comments

14

u/LimivorousArbour Nov 23 '15

Spontaneous errors can occur due to cosmic rays or hardware defects. Cosmic ray errors are something you can observe if you have large numbers of machines running calculations around the clock for extended periods, see e.g. the google study DRAM Errors in the wild.

It would be exceedingly unlikely to observe a calculation error in a modest spreadsheet on a single machine due to a cosmic ray. Especially if you are using ECC memory.

I've seen a calculation error caused by faulty hardware. We eventually tracked down the problem by noticing that all the failures occurred on a particular cloud machine, and hardware diagnostics turned up a single faulty memory bit. We weren't using ECC RAM, a problem we've since corrected.