Subject: [Boost-bugs] [Boost C++ Libraries] #3052: math::signbit fails to report -0
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2009-05-19 19:41:49
#3052: math::signbit fails to report -0
-------------------------------------+--------------------------------------
Reporter: tegtmeye_at_[hidden] | Owner: johnmaddock
Type: Bugs | Status: new
Milestone: Boost 1.40.0 | Component: math
Version: Boost 1.38.0 | Severity: Problem
Keywords: |
-------------------------------------+--------------------------------------
math::signbit fails to report -0. Observed from boost::units, IEEE 754
handling
{{{
#include <boost/math/special_functions/sign.hpp>
#include <iostream>
#include <math.h>
int main(void)
{
float i=copysign(0.,-1.);
float j=boost::math::copysign(0.,-1.);
std::cout << "i: " << i << ", signbit: " << std::signbit(i) << "\n";
std::cout << "j: " << j << ", signbit: " << boost::math::signbit(j) <<
"\n";
return 0;
}
}}}
-- Ticket URL: <https://svn.boost.org/trac/boost/ticket/3052> Boost C++ Libraries <http://www.boost.org/> Boost provides free peer-reviewed portable C++ source libraries.
This archive was generated by hypermail 2.1.7 : 2017-02-16 18:50:00 UTC