Paolo Carlini wrote:
> ... ah, ok, now I see what you meant, you meant that x is *not* finite,
> still, std::isfinite(x) != 0. Still, testcase badly needed...
>
> Paolo.
#include <cmath>
#include <stdexcept>
int main () {
double x = log (0);
if (not std::isfinite (x)) {
throw std::runtime_error ("not finite");
}
}
Compiled with -O3 -ffast-math will not throw.