Checkout: https://randomascii.wordpress.com/2014/01/27/theres-only-fou...
From it:
Floating-point math is hard, but testing these functions is trivial, and fast. Just do it.
The functions ceil, floor, and round are particularly easy to test because there are presumed-good CRT (C RunTime) functions that you can check them against. And, you can test every float bit-pattern (all four billion!) in about ninety seconds. It’s actually very easy. Just iterate through all four-billion (technically 2^32) bit patterns, call your test function, call your reference function, and make sure the results match. Properly comparing NaN and zero results takes a bit of care but it’s still not too bad.
A recommendation of this 'search-based' approach (where it can be used) instead of always constructing solutions is one of the 'new' aspects of Wolfram's "New Kind of Science".
I believe that this ability to tolerate searching for a solution is a component of what can allow neural-nets to find solutions better than programmers would ever write. A NN will happily explore nonsensical or illogical bits of parameter-space where there are still some good solutions to be found in places where the 'rational' or 'logical' human mind wouldn't (or even couldn't?) go.