Boost logo

Boost :

Subject: Re: [boost] [math] boost::math::isfinite fails with --fast-math
From: Tim Blechmann (tim_at_[hidden])
Date: 2012-11-26 07:22:17

> I'm wandering if this is to be expected, the following code
> fails if compiled with --fast-math:
> //====================================================
> #include <boost/math/special_functions/fpclassify.hpp>
> int main() {
> const float a = 0.0f/0.0f;
> assert(not boost::math::isfinite(a));
> }

yes: --ffast-math enables -ffinite-math-only, which (man gcc):

> Allow optimizations for floating-point arithmetic that assume that arguments and results are not NaNs or +-Infs.

Boost list run by bdawes at, gregod at, cpdaniel at, john at