Are unit tests insufficient to catch these kinds of mistakes?
In my company, we are ridiculously pedantic about unit testing, but even with proper level of attention to detail we sometimes fail with getting 100% code coverage.
The biggest pain are log(x)/ln(x) issues in numerical optimization.