Позволю себе процитировать нетленку из BBST
BachDoug Hoffman worked on the MASPAR (the Massively Parallel computer, 64K parallel processors).
The MASPAR has several built-in mathematical functions. The Integer square root function takes a 32-bit word as an input, interpreting it as . an integer (value is between 0 and 232-1). There are 4,294,967,296 possible inputs to this function. How many should we test?What if you knew this machine was to be used for mission-critical and life-critical applications?
•To test the 32-bit integer square root function, Hoffman checked all values (all 4,294,967,296 of them). This took the computer about 6 minutes to run the tests and compare the results to an oracle.
•There were 2 (two) errors, neither of them near any boundary. (The underlying error was that a bit was sometimes missed, but in most error cases, there was no effect on the final calculated result.) Without an exhaustive test, these errors probably wouldn‟t have shown up.
•What about the 64-bit integer square root? How could we find the time to run all of these? If we don't run them all, don't we risk missing some bugs?