Modify

Ticket #12090 (closed Bugs: fixed)

Opened 12 months ago

Last modified 12 months ago

cpp_dec_float has broken infinity

Reported by: anonymous Owned by: johnmaddock
Milestone: To Be Determined Component: multiprecision
Version: Boost 1.60.0 Severity: Problem
Keywords: cpp_dec_float infinity Cc: scottopoly@…

Description

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;

}

Attachments

Change History

comment:1 Changed 12 months ago by scottopoly@…

  • Cc scottopoly@… added

comment:2 Changed 12 months ago by johnmaddock

  • Status changed from new to closed
  • Resolution set to fixed
View

Add a comment

Modify Ticket

Change Properties
<Author field>
Action
as closed
The resolution will be deleted. Next status will be 'reopened'
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.