|
Boost : |
Subject: Re: [boost] [Math] boost::math::signbit returns false for -NAN
From: Hartmut Kaiser (hartmut.kaiser_at_[hidden])
Date: 2009-03-15 20:38:32
Ping?
Regards Hartmut
> -----Original Message-----
> From: Hartmut Kaiser [mailto:hartmut.kaiser_at_[hidden]]
> Sent: Wednesday, March 11, 2009 8:35 AM
> To: 'boost_at_[hidden]'
> Cc: 'John Maddock'
> Subject: [Math] boost::math::signbit returns false for -NAN
>
> Hi all,
>
> the boost::math::signbit function in trunk fails for an argument of -
> NAN.
>
> #include <boost/math/special_functions/sign.hpp>
>
> int main()
> {
> using boost::math::signbit;
> BOOST_ASSERT(signbit(-std::numeric_limits<double>::quiet_NaN()));
> return 0;
> }
>
> I'd expect to get a '1' back, but the function returns zero and the
> assertion fails. I know it worked while using Jon Rade's floating point
> utilities library from the vault. Does this have been integrated?
>
> Regards Hartmut
>
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk