Subject: [Boost-bugs] [Boost C++ Libraries] #12090: cpp_dec_float has broken infinity
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2016-03-22 21:56:49
#12090: cpp_dec_float has broken infinity
------------------------------------+----------------------------
Reporter: anonymous | Owner: johnmaddock
Type: Bugs | Status: new
Milestone: To Be Determined | Component: multiprecision
Version: Boost 1.60.0 | Severity: Problem
Keywords: cpp_dec_float infinity |
------------------------------------+----------------------------
output of following program should be "inf", but instead is "-14".
#include <iostream>
#include <boost/multiprecision/cpp_dec_float.hpp>
typedef boost::multiprecision::number<
boost::multiprecision::cpp_dec_float< 30, boost::int16_t > > money_t;
int main( int argc, char * * argv )
{
money_t a( 7 );
money_t b( 7 );
std::cout << std::numeric_limits< money_t >::infinity( ) - ( a + b )
<< std::endl;
return 0;
}
-- Ticket URL: <https://svn.boost.org/trac/boost/ticket/12090> 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:19 UTC