std::isfinite broken?
Paolo Carlini
paolo.carlini@oracle.com
Mon Jul 28 12:10:00 GMT 2008
Neal Becker wrote:
> I found that compiling without -ffast-math would allow std::isfinite to
> work. Sorry if the statement was confusing. The code looks something
> like:
>
> [calculate x]
> if (not isfinite (x))
> throw std::runtime_error ("blah")
>
Well, -ffast-math implies -ffinite-math-only, I think you have to pass
-fno-finite-math-only if you want to deal correctly with infinities.
Paolo.
More information about the Gcc
mailing list