[Boost-bugs] [Boost C++ Libraries] #8670: Bug in handling 0 mod n

Subject: [Boost-bugs] [Boost C++ Libraries] #8670: Bug in handling 0 mod n
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2013-06-08 02:58:38


#8670: Bug in handling 0 mod n
-------------------------------+----------------------------
 Reporter: filipedlarcanjo@… | Owner: johnmaddock
     Type: Bugs | Status: new
Milestone: To Be Determined | Component: multiprecision
  Version: Boost 1.53.0 | Severity: Problem
 Keywords: |
-------------------------------+----------------------------
 The following code produces as outputs the numbers 5933326056 and 0.

 {{{
 #include <iostream>
 #include <boost/multiprecision/cpp_int.hpp>

 using namespace std;

 int main()
 {
   typedef boost::multiprecision::checked_int1024_t bigint;
   bigint n = 5933326056;
   bigint z = 0;
   cout << (z % n) << endl;
   cout << (0 % 5933326056) << endl;
 }
 }}}

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/8670>
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:13 UTC