3 ms·
Short functions can be equivalent for all but a vanishingly small subset of inputs: f1(x) = (x==7239829489) ? 0 : x f2(x) = x so randomized tests would pr
by tlb 9y ago
Short functions can be equivalent for all but a vanishingly small subset of inputs:
f1(x) = (x==7239829489) ? 0 : x
f2(x) = x
so randomized tests would probably say they are equivalent.
- quickthrower2 9y agoThis is the same problem for unit tests even with 100% code coverage.
- dxbydt 9y agovery good counterexample, thank you!