Re:There Are Only Four Billion Floats–So Test Them All (2014)
by JoeAltmaier on Friday February 10, 2023 @09:13AM
(#34739788)
For many things (like floating-point), saving the computer time is not any kind of goal. It's not gonna complain if you ask it to try all the things.
Further, writing clever shotgun tests may actually take you longer than writing the simple loop. In which case it's wasting developer time too.
Be very sure you need to do anything but exhaustive testing, before expending the time money and effort on it. That's my advice.
You can use random testing for exhaustive testing. On an input space of size N, you will cover that space completely in O(NlogN) tests on average, and you will include any single input in O(NlogN) trials with high probability.