
-----Original Message----- From: boost-bounces@lists.boost.org [mailto:boost-bounces@lists.boost.org] On Behalf Of Tim Blechmann Sent: Monday, November 26, 2012 4:31 PM To: boost@lists.boost.org Subject: Re: [boost] [math] boost::math::isfinite fails with --fast-math
Which fails - does the 0/0 actually yield an infinity? Or is it isfinite
that fails? 0/0 should yield NaN, not infinity.
0/0 can yield anything, if -ffast-math is passed as compile flag ...
You are both right - sorry I got my infinite and infinity mis-typed. -ffinite-math-only, <<<<<<<<<<<< so the IEEE pattern for infinity will never be set. -fno-signaling-nans <<<<<<<<<<<< so the IEEE pattern for signalling will never be set. (-ffast-math sets a whole group of options, including these). But it appears from Gaetano's tests that the (or a) pattern for *quiet_NaN is set*. So I would expect that isnan might work. But I agree with John that this is a dodgy ill-defined area. Paul --- Paul A. Bristow, Prizet Farmhouse, Kendal LA8 8AB UK +44 1539 561830 07714330204 pbristow@hetp.u-net.com