$include_dir="/home/hyper-archives/boost/include"; include("$include_dir/msg-header.inc") ?>
Subject: [boost] [Math] boost::math::signbit returns false for -NAN
From: Hartmut Kaiser (hartmut.kaiser_at_[hidden])
Date: 2009-03-11 09:34:50
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