
Boost : 
Subject: Re: [boost] [math] boost::math::isfinite fails with fastmath
From: Paul A. Bristow (pbristow_at_[hidden])
Date: 20121126 12:01:58
> Original Message
> From: boostbounces_at_[hidden] [mailto:boostbounces_at_[hidden]] On Behalf Of Tim
> Blechmann
> Sent: Monday, November 26, 2012 4:31 PM
> To: boost_at_[hidden]
> Subject: Re: [boost] [math] boost::math::isfinite fails with fastmath
>
> >> 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 ffastmath is passed as compile flag ...
You are both right  sorry I got my infinite and infinity mistyped.
ffinitemathonly, <<<<<<<<<<<< so the IEEE pattern for infinity will never be set.
fnosignalingnans <<<<<<<<<<<< so the IEEE pattern for signalling will never be set.
(ffastmath 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 illdefined area.
Paul
 Paul A. Bristow, Prizet Farmhouse, Kendal LA8 8AB UK +44 1539 561830 07714330204 pbristow_at_[hidden]
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk