Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r77451 - in sandbox/big_number: boost/multiprecision libs/multiprecision/doc libs/multiprecision/doc/html libs/multiprecision/doc/html/boost_multiprecision libs/multiprecision/doc/html/boost_multiprecision/perf libs/multiprecision/doc/html/boost_multiprecision/tut libs/multiprecision/performance libs/multiprecision/test
From: john_at_[hidden]
Date: 2012-03-21 05:20:01


Author: johnmaddock
Date: 2012-03-21 05:19:57 EDT (Wed, 21 Mar 2012)
New Revision: 77451
URL: http://svn.boost.org/trac/boost/changeset/77451

Log:
Update Miller Rabin test to use small prime filtering.
Add some new integer type operations.
Update performance tests to match.
Added:
   sandbox/big_number/boost/multiprecision/integer_ops.hpp (contents, props changed)
   sandbox/big_number/libs/multiprecision/doc/html/boost_multiprecision/perf/int_real_world.html (contents, props changed)
   sandbox/big_number/libs/multiprecision/doc/html/boost_multiprecision/perf/rational_performance.html (contents, props changed)
   sandbox/big_number/libs/multiprecision/doc/html/boost_multiprecision/tut/primetest.html (contents, props changed)
   sandbox/big_number/libs/multiprecision/doc/html/boost_multiprecision/tut/random.html (contents, props changed)
   sandbox/big_number/libs/multiprecision/performance/miller_rabin_performance.cpp (contents, props changed)
Text files modified:
   sandbox/big_number/boost/multiprecision/cpp_int.hpp | 176 +++-
   sandbox/big_number/boost/multiprecision/gmp.hpp | 27
   sandbox/big_number/boost/multiprecision/miller_rabin.hpp | 79 ++
   sandbox/big_number/boost/multiprecision/tommath.hpp | 29
   sandbox/big_number/libs/multiprecision/doc/html/boost_multiprecision/map.html | 6
   sandbox/big_number/libs/multiprecision/doc/html/boost_multiprecision/perf.html | 9
   sandbox/big_number/libs/multiprecision/doc/html/boost_multiprecision/perf/float_performance.html | 6
   sandbox/big_number/libs/multiprecision/doc/html/boost_multiprecision/perf/integer_performance.html | 1364 +++++++++++++++++++++++----------------
   sandbox/big_number/libs/multiprecision/doc/html/boost_multiprecision/perf/realworld.html | 11
   sandbox/big_number/libs/multiprecision/doc/html/boost_multiprecision/tut/ints.html | 15
   sandbox/big_number/libs/multiprecision/doc/html/boost_multiprecision/tut/rational.html | 7
   sandbox/big_number/libs/multiprecision/doc/html/index.html | 9
   sandbox/big_number/libs/multiprecision/doc/multiprecision.qbk | 296 ++++++--
   sandbox/big_number/libs/multiprecision/performance/performance_test-msvc-10.log | 1161 ++++++++++++++++++---------------
   sandbox/big_number/libs/multiprecision/test/test_arithmetic.cpp | 19
   sandbox/big_number/libs/multiprecision/test/test_cpp_int.cpp | 17
   16 files changed, 1973 insertions(+), 1258 deletions(-)

Modified: sandbox/big_number/boost/multiprecision/cpp_int.hpp
==============================================================================
--- sandbox/big_number/boost/multiprecision/cpp_int.hpp (original)
+++ sandbox/big_number/boost/multiprecision/cpp_int.hpp 2012-03-21 05:19:57 EDT (Wed, 21 Mar 2012)
@@ -10,6 +10,7 @@
 #include <iomanip>
 #include <boost/cstdint.hpp>
 #include <boost/multiprecision/mp_number.hpp>
+#include <boost/multiprecision/integer_ops.hpp>
 #include <boost/array.hpp>
 #include <boost/type_traits/is_integral.hpp>
 #include <boost/type_traits/is_floating_point.hpp>
@@ -670,7 +671,7 @@
             while(eval_get_sign(t) != 0)
             {
                cpp_int_backend t2;
- divide_unsigned_helper(t2, t, block10, r);
+ divide_unsigned_helper(&t2, t, block10, r);
                t = t2;
                limb_type v = r.limbs()[0];
                for(unsigned i = 0; i < digits_per_block_10; ++i)
@@ -1141,15 +1142,15 @@
    eval_multiply(result, result, val);
 }
 template <unsigned MinBits, bool Signed, class Allocator>
-void divide_unsigned_helper(cpp_int_backend<MinBits, Signed, Allocator>& result, const cpp_int_backend<MinBits, Signed, Allocator>& x, const cpp_int_backend<MinBits, Signed, Allocator>& y, cpp_int_backend<MinBits, Signed, Allocator>& r)
+void divide_unsigned_helper(cpp_int_backend<MinBits, Signed, Allocator>* result, const cpp_int_backend<MinBits, Signed, Allocator>& x, const cpp_int_backend<MinBits, Signed, Allocator>& y, cpp_int_backend<MinBits, Signed, Allocator>& r)
 {
- if((&result == &x) || (&r == &x))
+ if((result == &x) || (&r == &x))
    {
       cpp_int_backend<MinBits, Signed, Allocator> t(x);
       divide_unsigned_helper(result, t, y, r);
       return;
    }
- if((&result == &y) || (&r == &y))
+ if((result == &y) || (&r == &y))
    {
       cpp_int_backend<MinBits, Signed, Allocator> t(y);
       divide_unsigned_helper(result, x, t, r);
@@ -1177,7 +1178,7 @@
 
    using default_ops::eval_subtract;
 
- if(&result == &r)
+ if(result == &r)
    {
       cpp_int_backend<MinBits, Signed, Allocator> rem;
       divide_unsigned_helper(result, x, y, rem);
@@ -1209,13 +1210,15 @@
    {
       // x is zero, so is the result:
       r = y;
- result = x;
+ if(result)
+ *result = x;
       return;
    }
 
    r = x;
    r.sign(false);
- result = static_cast<limb_type>(0u);
+ if(result)
+ *result = static_cast<limb_type>(0u);
    //
    // Check if the remainder is already less than the divisor, if so
    // we already have the result. Note we try and avoid a full compare
@@ -1237,7 +1240,8 @@
    //
    if(r_order == 0)
    {
- result = px[0] / py[0];
+ if(result)
+ *result = px[0] / py[0];
       r = px[0] % py[0];
       return;
    }
@@ -1248,18 +1252,24 @@
       b = y_order ?
          (static_cast<double_limb_type>(py[1]) << cpp_int_backend<MinBits, Signed, Allocator>::limb_bits) | py[0]
          : py[0];
- result = a / b;
+ if(result)
+ *result = a / b;
       r = a % b;
       return;
    }
    //
    // prepare result:
    //
- result.resize(1 + r_order - y_order);
+ if(result)
+ result->resize(1 + r_order - y_order);
    typename cpp_int_backend<MinBits, Signed, Allocator>::const_limb_pointer prem = r.limbs();
- typename cpp_int_backend<MinBits, Signed, Allocator>::limb_pointer pr = result.limbs();
- for(unsigned i = 1; i < 1 + r_order - y_order; ++i)
- pr[i] = 0;
+ typename cpp_int_backend<MinBits, Signed, Allocator>::limb_pointer pr;
+ if(result)
+ {
+ pr = result->limbs();
+ for(unsigned i = 1; i < 1 + r_order - y_order; ++i)
+ pr[i] = 0;
+ }
    bool first_pass = true;
 
    do
@@ -1299,29 +1309,32 @@
       // Update result:
       //
       limb_type shift = r_order - y_order;
- if(r_neg)
+ if(result)
       {
- if(pr[shift] > guess)
- pr[shift] -= guess;
+ if(r_neg)
+ {
+ if(pr[shift] > guess)
+ pr[shift] -= guess;
+ else
+ {
+ t.resize(shift + 1);
+ t.limbs()[shift] = guess;
+ for(unsigned i = 0; i < shift; ++i)
+ t.limbs()[i] = 0;
+ eval_subtract(*result, t);
+ }
+ }
+ else if(cpp_int_backend<MinBits, Signed, Allocator>::max_limb_value - pr[shift] > guess)
+ pr[shift] += guess;
          else
          {
             t.resize(shift + 1);
             t.limbs()[shift] = guess;
             for(unsigned i = 0; i < shift; ++i)
                t.limbs()[i] = 0;
- eval_subtract(result, t);
+ eval_add(*result, t);
          }
       }
- else if(cpp_int_backend<MinBits, Signed, Allocator>::max_limb_value - pr[shift] > guess)
- pr[shift] += guess;
- else
- {
- t.resize(shift + 1);
- t.limbs()[shift] = guess;
- for(unsigned i = 0; i < shift; ++i)
- t.limbs()[i] = 0;
- eval_add(result, t);
- }
       //
       // Calculate guess * y, we use a fused mutiply-shift O(N) for this
       // rather than a full O(N^2) multiply:
@@ -1359,11 +1372,11 @@
       // First time through we need to strip any leading zero, otherwise
       // the termination condition goes belly-up:
       //
- if(first_pass)
+ if(result && first_pass)
       {
          first_pass = false;
- while(pr[result.size() - 1] == 0)
- result.resize(result.size() - 1);
+ while(pr[result->size() - 1] == 0)
+ result->resize(result->size() - 1);
       }
       //
       // Update r_order:
@@ -1382,7 +1395,8 @@
    if(r_neg && eval_get_sign(r))
    {
       // We have one too many in the result:
- eval_decrement(result);
+ if(result)
+ eval_decrement(*result);
       r.negate();
       if(y.sign())
          eval_subtract(r, y);
@@ -1394,16 +1408,16 @@
 }
 
 template <unsigned MinBits, bool Signed, class Allocator>
-void divide_unsigned_helper(cpp_int_backend<MinBits, Signed, Allocator>& result, const cpp_int_backend<MinBits, Signed, Allocator>& x, limb_type y, cpp_int_backend<MinBits, Signed, Allocator>& r)
+void divide_unsigned_helper(cpp_int_backend<MinBits, Signed, Allocator>* result, const cpp_int_backend<MinBits, Signed, Allocator>& x, limb_type y, cpp_int_backend<MinBits, Signed, Allocator>& r)
 {
- if((&result == &x) || (&r == &x))
+ if((result == &x) || (&r == &x))
    {
       cpp_int_backend<MinBits, Signed, Allocator> t(x);
       divide_unsigned_helper(result, t, y, r);
       return;
    }
 
- if(&result == &r)
+ if(result == &r)
    {
       cpp_int_backend<MinBits, Signed, Allocator> rem;
       divide_unsigned_helper(result, x, y, rem);
@@ -1442,7 +1456,8 @@
    //
    if((r_order == 0) && (*pr < y))
    {
- result = static_cast<limb_type>(0u);
+ if(result)
+ *result = static_cast<limb_type>(0u);
       return;
    }
 
@@ -1451,8 +1466,11 @@
    //
    if(r_order == 0)
    {
- result = *pr / y;
- result.sign(x.sign());
+ if(result)
+ {
+ *result = *pr / y;
+ result->sign(x.sign());
+ }
       r.sign(x.sign());
       *pr %= y;
       return;
@@ -1461,16 +1479,23 @@
    {
       double_limb_type a;
       a = (static_cast<double_limb_type>(pr[r_order]) << cpp_int_backend<MinBits, Signed, Allocator>::limb_bits) | pr[0];
- result = a / y;
- result.sign(x.sign());
+ if(result)
+ {
+ *result = a / y;
+ result->sign(x.sign());
+ }
       r = a % y;
       r.sign(x.sign());
       return;
    }
 
- result.resize(r_order + 1);
- typename cpp_int_backend<MinBits, Signed, Allocator>::limb_pointer pres = result.limbs();
- pres[r_order] = 0; // just in case we don't set the most significant limb below.
+ typename cpp_int_backend<MinBits, Signed, Allocator>::limb_pointer pres;
+ if(result)
+ {
+ result->resize(r_order + 1);
+ pres = result->limbs();
+ pres[r_order] = 0; // just in case we don't set the most significant limb below.
+ }
 
    do
    {
@@ -1485,7 +1510,8 @@
          r.resize(r.size() - 1);
          --r_order;
          pr[r_order] = static_cast<limb_type>(b);
- pres[r_order] = static_cast<limb_type>(a / y);
+ if(result)
+ pres[r_order] = static_cast<limb_type>(a / y);
          if(r_order && pr[r_order] == 0)
          {
             --r_order; // No remainder, division was exact.
@@ -1494,7 +1520,8 @@
       }
       else
       {
- pres[r_order] = pr[r_order] / y;
+ if(result)
+ pres[r_order] = pr[r_order] / y;
          pr[r_order] %= y;
          if(r_order && pr[r_order] == 0)
          {
@@ -1507,10 +1534,12 @@
    // short-circuit cases handled first:
    while(r_order || (pr[r_order] > y));
 
- result.normalize();
+ if(result)
+ {
+ result->normalize();
+ result->sign(x.sign());
+ }
    r.normalize();
-
- result.sign(x.sign());
    r.sign(x.sign());
 
    BOOST_ASSERT(r.compare(y) < 0); // remainder must be less than the divisor or our code has failed
@@ -1520,20 +1549,20 @@
 inline void eval_divide(cpp_int_backend<MinBits, Signed, Allocator>& result, const cpp_int_backend<MinBits, Signed, Allocator>& a, const cpp_int_backend<MinBits, Signed, Allocator>& b)
 {
    cpp_int_backend<MinBits, Signed, Allocator> r;
- divide_unsigned_helper(result, a, b, r);
+ divide_unsigned_helper(&result, a, b, r);
    result.sign(a.sign() != b.sign());
 }
 template <unsigned MinBits, bool Signed, class Allocator>
 inline void eval_divide(cpp_int_backend<MinBits, Signed, Allocator>& result, const cpp_int_backend<MinBits, Signed, Allocator>& a, limb_type& b)
 {
    cpp_int_backend<MinBits, Signed, Allocator> r;
- divide_unsigned_helper(result, a, b, r);
+ divide_unsigned_helper(&result, a, b, r);
 }
 template <unsigned MinBits, bool Signed, class Allocator>
 inline void eval_divide(cpp_int_backend<MinBits, Signed, Allocator>& result, const cpp_int_backend<MinBits, Signed, Allocator>& a, signed_limb_type& b)
 {
    cpp_int_backend<MinBits, Signed, Allocator> r;
- divide_unsigned_helper(result, a, std::abs(b), r);
+ divide_unsigned_helper(&result, a, std::abs(b), r);
    if(b < 0)
       result.negate();
 }
@@ -1561,21 +1590,18 @@
 template <unsigned MinBits, bool Signed, class Allocator>
 inline void eval_modulus(cpp_int_backend<MinBits, Signed, Allocator>& result, const cpp_int_backend<MinBits, Signed, Allocator>& a, const cpp_int_backend<MinBits, Signed, Allocator>& b)
 {
- cpp_int_backend<MinBits, Signed, Allocator> r;
- divide_unsigned_helper(r, a, b, result);
+ divide_unsigned_helper(static_cast<cpp_int_backend<MinBits, Signed, Allocator>* >(0), a, b, result);
    result.sign(a.sign());
 }
 template <unsigned MinBits, bool Signed, class Allocator>
 inline void eval_modulus(cpp_int_backend<MinBits, Signed, Allocator>& result, const cpp_int_backend<MinBits, Signed, Allocator>& a, limb_type b)
 {
- cpp_int_backend<MinBits, Signed, Allocator> r;
- divide_unsigned_helper(r, a, b, result);
+ divide_unsigned_helper(static_cast<cpp_int_backend<MinBits, Signed, Allocator>* >(0), a, b, result);
 }
 template <unsigned MinBits, bool Signed, class Allocator>
 inline void eval_modulus(cpp_int_backend<MinBits, Signed, Allocator>& result, const cpp_int_backend<MinBits, Signed, Allocator>& a, signed_limb_type b)
 {
- cpp_int_backend<MinBits, Signed, Allocator> r;
- divide_unsigned_helper(r, a, static_cast<limb_type>(std::abs(b)), result);
+ divide_unsigned_helper(static_cast<cpp_int_backend<MinBits, Signed, Allocator>* >(0), a, static_cast<limb_type>(std::abs(b)), result);
 }
 template <unsigned MinBits, bool Signed, class Allocator>
 inline void eval_modulus(cpp_int_backend<MinBits, Signed, Allocator>& result, const cpp_int_backend<MinBits, Signed, Allocator>& b)
@@ -2024,6 +2050,12 @@
 {
    return eval_is_zero(val) ? 0 : val.sign() ? -1 : 1;
 }
+template <unsigned MinBits, bool Signed, class Allocator>
+inline void eval_abs(cpp_int_backend<MinBits, Signed, Allocator>& result, const cpp_int_backend<MinBits, Signed, Allocator>& val)
+{
+ result = val;
+ result.sign(false);
+}
 
 //
 // Get the location of the least-significant-bit:
@@ -2132,6 +2164,36 @@
       result.negate();
 }
 
+template <unsigned MinBits, bool Signed, class Allocator>
+inline void eval_qr(const cpp_int_backend<MinBits, Signed, Allocator>& x, const cpp_int_backend<MinBits, Signed, Allocator>& y,
+ cpp_int_backend<MinBits, Signed, Allocator>& q, cpp_int_backend<MinBits, Signed, Allocator>& r)
+{
+ divide_unsigned_helper(&q, x, y, r);
+ q.sign(x.sign() != y.sign());
+ r.sign(x.sign());
+}
+
+template <unsigned MinBits, bool Signed, class Allocator, class Integer>
+inline typename enable_if<is_unsigned<Integer>, Integer>::type eval_integer_modulus(const cpp_int_backend<MinBits, Signed, Allocator>& x, Integer val)
+{
+ if((sizeof(Integer) <= sizeof(limb_type)) || (val <= (std::numeric_limits<limb_type>::max)()))
+ {
+ cpp_int_backend<MinBits, Signed, Allocator> d;
+ divide_unsigned_helper(static_cast<cpp_int_backend<MinBits, Signed, Allocator>*>(0), x, val, d);
+ return d.limbs()[0];
+ }
+ else
+ {
+ return default_ops::eval_integer_modulus(x, val);
+ }
+}
+template <unsigned MinBits, bool Signed, class Allocator, class Integer>
+inline typename enable_if<is_signed<Integer>, Integer>::type eval_integer_modulus(const cpp_int_backend<MinBits, Signed, Allocator>& x, Integer val)
+{
+ typedef typename make_unsigned<Integer>::type unsigned_type;
+ return eval_integer_modulus(x, static_cast<unsigned_type>(std::abs(val)));
+}
+
 } // namespace backends;
 
 using boost::multiprecision::backends::cpp_int_backend;
@@ -2147,11 +2209,13 @@
 typedef mp_number<cpp_int_backend<128, false, void> > mp_uint128_t;
 typedef mp_number<cpp_int_backend<256, false, void> > mp_uint256_t;
 typedef mp_number<cpp_int_backend<512, false, void> > mp_uint512_t;
+typedef mp_number<cpp_int_backend<1024, false, void> > mp_uint1024_t;
 
 // Fixed precision signed types:
 typedef mp_number<cpp_int_backend<128, true, void> > mp_int128_t;
 typedef mp_number<cpp_int_backend<256, true, void> > mp_int256_t;
 typedef mp_number<cpp_int_backend<512, true, void> > mp_int512_t;
+typedef mp_number<cpp_int_backend<1024, true, void> > mp_int1024_t;
 
 
 }} // namespaces

Modified: sandbox/big_number/boost/multiprecision/gmp.hpp
==============================================================================
--- sandbox/big_number/boost/multiprecision/gmp.hpp (original)
+++ sandbox/big_number/boost/multiprecision/gmp.hpp 2012-03-21 05:19:57 EDT (Wed, 21 Mar 2012)
@@ -7,6 +7,7 @@
 #define BOOST_MATH_ER_GMP_BACKEND_HPP
 
 #include <boost/multiprecision/mp_number.hpp>
+#include <boost/multiprecision/integer_ops.hpp>
 #include <boost/multiprecision/detail/big_lanczos.hpp>
 #include <boost/math/special_functions/fpclassify.hpp>
 #include <boost/cstdint.hpp>
@@ -1355,6 +1356,32 @@
    mpz_lcm_ui(result.data(), a.data(), std::abs(b));
 }
 
+inline void eval_qr(const gmp_int& x, const gmp_int& y,
+ gmp_int& q, gmp_int& r)
+{
+ mpz_tdiv_qr(q.data(), r.data(), x.data(), y.data());
+}
+
+template <class Integer>
+inline typename enable_if<is_unsigned<Integer>, Integer>::type eval_integer_modulus(const gmp_int& x, Integer val)
+{
+ if((sizeof(Integer) <= sizeof(long)) || (val <= (std::numeric_limits<unsigned long>::max)()))
+ {
+ gmp_int r;
+ return mpz_tdiv_r_ui(r.data(), x.data(), val);
+ }
+ else
+ {
+ return default_ops::eval_integer_modulus(x, val);
+ }
+}
+template <class Integer>
+inline typename enable_if<is_signed<Integer>, Integer>::type eval_integer_modulus(const gmp_int& x, Integer val)
+{
+ typedef typename make_unsigned<Integer>::type unsigned_type;
+ return eval_integer_modulus(x, static_cast<unsigned_type>(std::abs(val)));
+}
+
 struct gmp_rational;
 void eval_add(gmp_rational& t, const gmp_rational& o);
 

Added: sandbox/big_number/boost/multiprecision/integer_ops.hpp
==============================================================================
--- (empty file)
+++ sandbox/big_number/boost/multiprecision/integer_ops.hpp 2012-03-21 05:19:57 EDT (Wed, 21 Mar 2012)
@@ -0,0 +1,62 @@
+///////////////////////////////////////////////////////////////
+// Copyright 2012 John Maddock. Distributed under the Boost
+// Software License, Version 1.0. (See accompanying file
+// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_
+
+#ifndef BOOST_MP_INT_FUNC_HPP
+#define BOOST_MP_INT_FUNC_HPP
+
+#include <boost/multiprecision/mp_number.hpp>
+
+namespace boost{ namespace multiprecision{
+
+namespace default_ops
+{
+
+template <class Backend>
+inline void eval_qr(const Backend& x, const Backend& y, Backend& q, Backend& r)
+{
+ eval_divide(q, x, y);
+ eval_modulus(r, x, y);
+}
+
+template <class Integer>
+inline typename enable_if<is_signed<Integer>, Integer>::type maybe_abs(Integer i) { return std::abs(i); }
+template <class Integer>
+inline typename enable_if<is_unsigned<Integer>, Integer>::type maybe_abs(Integer i) { return i; }
+
+template <class Backend, class Integer>
+inline Integer eval_integer_modulus(const Backend& x, Integer val)
+{
+ using default_ops::eval_modulus;
+ using default_ops::eval_convert_to;
+ typedef typename boost::multiprecision::detail::canonical<Integer, Backend>::type int_type;
+ Backend t;
+ eval_modulus(t, x, static_cast<int_type>(val));
+ Integer result;
+ eval_convert_to(&result, t);
+ return maybe_abs(result);
+}
+
+}
+
+template <class Backend, bool ExpressionTemplates>
+inline void divide_qr(const mp_number<Backend, ExpressionTemplates>& x, const mp_number<Backend, ExpressionTemplates>& y,
+ mp_number<Backend, ExpressionTemplates>& q, mp_number<Backend, ExpressionTemplates>& r)
+{
+ using default_ops::eval_qr;
+ eval_qr(x.backend(), y.backend(), q.backend(), r.backend());
+}
+
+template <class Backend, bool ExpressionTemplates, class Integer>
+inline typename enable_if<is_integral<Integer>, Integer>::type integer_modulus(const mp_number<Backend, ExpressionTemplates>& x, Integer val)
+{
+ using default_ops::eval_integer_modulus;
+ return eval_integer_modulus(x.backend(), val);
+}
+
+}} //namespaces
+
+#endif
+
+

Modified: sandbox/big_number/boost/multiprecision/miller_rabin.hpp
==============================================================================
--- sandbox/big_number/boost/multiprecision/miller_rabin.hpp (original)
+++ sandbox/big_number/boost/multiprecision/miller_rabin.hpp 2012-03-21 05:19:57 EDT (Wed, 21 Mar 2012)
@@ -30,21 +30,88 @@
    result = x % c;
 }
 
+template <class Backend, bool ExpressionTemplates>
+bool check_small_factors(const mp_number<Backend, ExpressionTemplates>& n)
+{
+ static const boost::uint32_t small_factors1[] = {
+ 3u, 5u, 7u, 11u, 13u, 17u, 19u, 23u };
+ static const boost::uint32_t pp1 = 223092870u;
+
+ boost::uint32_t m1 = integer_modulus(n, pp1);
+
+ for(unsigned i = 0; i < sizeof(small_factors1) / sizeof(small_factors1[0]); ++i)
+ {
+ BOOST_ASSERT(pp1 % small_factors1[i] == 0);
+ if(m1 % small_factors1[i] == 0)
+ return false;
+ }
+
+ static const boost::uint32_t small_factors2[] = {
+ 29u, 31u, 37u, 41u, 43u, 47u };
+ static const boost::uint32_t pp2 = 2756205443u;
+
+ m1 = integer_modulus(n, pp2);
+
+ for(unsigned i = 0; i < sizeof(small_factors2) / sizeof(small_factors2[0]); ++i)
+ {
+ BOOST_ASSERT(pp2 % small_factors2[i] == 0);
+ if(m1 % small_factors2[i] == 0)
+ return false;
+ }
+
+ static const boost::uint32_t small_factors3[] = {
+ 53u, 59u, 61u, 67u, 71u };
+ static const boost::uint32_t pp3 = 907383479u;
+
+ m1 = integer_modulus(n, pp3);
+
+ for(unsigned i = 0; i < sizeof(small_factors3) / sizeof(small_factors3[0]); ++i)
+ {
+ BOOST_ASSERT(pp3 % small_factors3[i] == 0);
+ if(m1 % small_factors3[i] == 0)
+ return false;
+ }
+
+ static const boost::uint32_t small_factors4[] = {
+ 73u, 79u, 83u, 89u, 97u };
+ static const boost::uint32_t pp4 = 4132280413u;
+
+ m1 = integer_modulus(n, pp4);
+
+ for(unsigned i = 0; i < sizeof(small_factors4) / sizeof(small_factors4[0]); ++i)
+ {
+ BOOST_ASSERT(pp4 % small_factors4[i] == 0);
+ if(m1 % small_factors4[i] == 0)
+ return false;
+ }
+
+ static const boost::uint32_t small_factors5[] = {
+ 101u, 103u, 107u, 109u };
+ static const boost::uint32_t pp5 = 121330189u;
+
+ m1 = integer_modulus(n, pp5);
+
+ for(unsigned i = 0; i < sizeof(small_factors5) / sizeof(small_factors5[0]); ++i)
+ {
+ BOOST_ASSERT(pp5 % small_factors5[i] == 0);
+ if(m1 % small_factors5[i] == 0)
+ return false;
+ }
+ return true;
+}
+
 template <class Backend, bool ExpressionTemplates, class Engine>
 bool miller_rabin_test(const mp_number<Backend, ExpressionTemplates>& n, unsigned trials, Engine& gen)
 {
    typedef mp_number<Backend, ExpressionTemplates> number_type;
 
- static const unsigned small_factors[] = {
- 3u, 5u, 7u, 11u, 13u, 17u, 19u, 23u, 29u, 31u, 37u, 41u, 43u, 47u, 53u };
-
    if(n < 2)
       return false;
    if((n & 1) == 0)
       return false;
- //
- // Sanity check for small factors:
- //
+
+ if(!check_small_factors(n))
+ return false;
 
    number_type q = (n - 1) >> 1;
    unsigned k = 1;

Modified: sandbox/big_number/boost/multiprecision/tommath.hpp
==============================================================================
--- sandbox/big_number/boost/multiprecision/tommath.hpp (original)
+++ sandbox/big_number/boost/multiprecision/tommath.hpp 2012-03-21 05:19:57 EDT (Wed, 21 Mar 2012)
@@ -8,6 +8,7 @@
 
 #include <boost/multiprecision/mp_number.hpp>
 #include <boost/multiprecision/rational_adapter.hpp>
+#include <boost/multiprecision/integer_ops.hpp>
 #include <boost/math/special_functions/fpclassify.hpp>
 #include <boost/cstdint.hpp>
 #include <boost/lexical_cast.hpp>
@@ -442,6 +443,34 @@
    detail::check_tommath_result(mp_lcm(const_cast< ::mp_int*>(&a.data()), const_cast< ::mp_int*>(&b.data()), const_cast< ::mp_int*>(&result.data())));
 }
 
+inline void eval_qr(const tommath_int& x, const tommath_int& y,
+ tommath_int& q, tommath_int& r)
+{
+ detail::check_tommath_result(mp_div(const_cast< ::mp_int*>(&x.data()), const_cast< ::mp_int*>(&y.data()), &q.data(), &r.data()));
+}
+
+template <class Integer>
+inline typename enable_if<is_unsigned<Integer>, Integer>::type eval_integer_modulus(const tommath_int& x, Integer val)
+{
+ static const mp_digit m = (static_cast<mp_digit>(1) << DIGIT_BIT) - 1;
+ if(val <= m)
+ {
+ mp_digit d;
+ detail::check_tommath_result(mp_mod_d(const_cast< ::mp_int*>(&x.data()), static_cast<mp_digit>(val), &d));
+ return d;
+ }
+ else
+ {
+ return default_ops::eval_integer_modulus(x, val);
+ }
+}
+template <class Integer>
+inline typename enable_if<is_signed<Integer>, Integer>::type eval_integer_modulus(const tommath_int& x, Integer val)
+{
+ typedef typename make_unsigned<Integer>::type unsigned_type;
+ return eval_integer_modulus(x, static_cast<unsigned_type>(std::abs(val)));
+}
+
 } // namespace backends
 
 using boost::multiprecision::backends::tommath_int;

Modified: sandbox/big_number/libs/multiprecision/doc/html/boost_multiprecision/map.html
==============================================================================
--- sandbox/big_number/libs/multiprecision/doc/html/boost_multiprecision/map.html (original)
+++ sandbox/big_number/libs/multiprecision/doc/html/boost_multiprecision/map.html 2012-03-21 05:19:57 EDT (Wed, 21 Mar 2012)
@@ -6,12 +6,12 @@
 <meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
 <link rel="home" href="../index.html" title="Chapter&#160;1.&#160;Boost.Multiprecision">
 <link rel="up" href="../index.html" title="Chapter&#160;1.&#160;Boost.Multiprecision">
-<link rel="prev" href="perf/integer_performance.html" title="Integer Algorithm Perfomance">
+<link rel="prev" href="perf/rational_performance.html" title="Rational Type Perfomance">
 <link rel="next" href="map/hist.html" title="History">
 </head>
 <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
 <div class="spirit-nav">
-<a accesskey="p" href="perf/integer_performance.html"><img src="../images/prev.png" alt="Prev"></a><a accesskey="u" href="../index.html"><img src="../images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../images/home.png" alt="Home"></a><a accesskey="n" href="map/hist.html"><img src="../images/next.png" alt="Next"></a>
+<a accesskey="p" href="perf/rational_performance.html"><img src="../images/prev.png" alt="Prev"></a><a accesskey="u" href="../index.html"><img src="../images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../images/home.png" alt="Home"></a><a accesskey="n" href="map/hist.html"><img src="../images/next.png" alt="Next"></a>
 </div>
 <div class="section boost_multiprecision_map">
 <div class="titlepage"><div><div><h2 class="title" style="clear: both">
@@ -32,7 +32,7 @@
 </tr></table>
 <hr>
 <div class="spirit-nav">
-<a accesskey="p" href="perf/integer_performance.html"><img src="../images/prev.png" alt="Prev"></a><a accesskey="u" href="../index.html"><img src="../images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../images/home.png" alt="Home"></a><a accesskey="n" href="map/hist.html"><img src="../images/next.png" alt="Next"></a>
+<a accesskey="p" href="perf/rational_performance.html"><img src="../images/prev.png" alt="Prev"></a><a accesskey="u" href="../index.html"><img src="../images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../images/home.png" alt="Home"></a><a accesskey="n" href="map/hist.html"><img src="../images/next.png" alt="Next"></a>
 </div>
 </body>
 </html>

Modified: sandbox/big_number/libs/multiprecision/doc/html/boost_multiprecision/perf.html
==============================================================================
--- sandbox/big_number/libs/multiprecision/doc/html/boost_multiprecision/perf.html (original)
+++ sandbox/big_number/libs/multiprecision/doc/html/boost_multiprecision/perf.html 2012-03-21 05:19:57 EDT (Wed, 21 Mar 2012)
@@ -7,7 +7,7 @@
 <link rel="home" href="../index.html" title="Chapter&#160;1.&#160;Boost.Multiprecision">
 <link rel="up" href="../index.html" title="Chapter&#160;1.&#160;Boost.Multiprecision">
 <link rel="prev" href="ref/backendconc.html" title="Backend Requirements">
-<link rel="next" href="perf/realworld.html" title="Real World Tests">
+<link rel="next" href="perf/realworld.html" title="Floating Point Real World Tests">
 </head>
 <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
 <div class="spirit-nav">
@@ -18,11 +18,16 @@
 <a name="boost_multiprecision.perf"></a><a class="link" href="perf.html" title="Performance Comparison">Performance Comparison</a>
 </h2></div></div></div>
 <div class="toc"><dl>
-<dt><span class="section">Real World Tests</span></dt>
+<dt><span class="section"><a href="perf/realworld.html">Floating Point Real
+ World Tests</a></span></dt>
+<dt><span class="section"><a href="perf/int_real_world.html">Integer Real
+ World Tests</a></span></dt>
 <dt><span class="section"><a href="perf/float_performance.html">Float Algorithm
       Perfomance</a></span></dt>
 <dt><span class="section"><a href="perf/integer_performance.html">Integer
       Algorithm Perfomance</a></span></dt>
+<dt><span class="section"><a href="perf/rational_performance.html">Rational
+ Type Perfomance</a></span></dt>
 </dl></div>
 </div>
 <table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>

Modified: sandbox/big_number/libs/multiprecision/doc/html/boost_multiprecision/perf/float_performance.html
==============================================================================
--- sandbox/big_number/libs/multiprecision/doc/html/boost_multiprecision/perf/float_performance.html (original)
+++ sandbox/big_number/libs/multiprecision/doc/html/boost_multiprecision/perf/float_performance.html 2012-03-21 05:19:57 EDT (Wed, 21 Mar 2012)
@@ -6,12 +6,12 @@
 <meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
 <link rel="home" href="../../index.html" title="Chapter&#160;1.&#160;Boost.Multiprecision">
 <link rel="up" href="../perf.html" title="Performance Comparison">
-<link rel="prev" href="realworld.html" title="Real World Tests">
+<link rel="prev" href="int_real_world.html" title="Integer Real World Tests">
 <link rel="next" href="integer_performance.html" title="Integer Algorithm Perfomance">
 </head>
 <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
 <div class="spirit-nav">
-<a accesskey="p" href="realworld.html"><img src="../../images/prev.png" alt="Prev"></a><a accesskey="u" href="../perf.html"><img src="../../images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../images/home.png" alt="Home"></a><a accesskey="n" href="integer_performance.html"><img src="../../images/next.png" alt="Next"></a>
+<a accesskey="p" href="int_real_world.html"><img src="../../images/prev.png" alt="Prev"></a><a accesskey="u" href="../perf.html"><img src="../../images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../images/home.png" alt="Home"></a><a accesskey="n" href="integer_performance.html"><img src="../../images/next.png" alt="Next"></a>
 </div>
 <div class="section boost_multiprecision_perf_float_performance">
 <div class="titlepage"><div><div><h3 class="title">
@@ -955,7 +955,7 @@
 </tr></table>
 <hr>
 <div class="spirit-nav">
-<a accesskey="p" href="realworld.html"><img src="../../images/prev.png" alt="Prev"></a><a accesskey="u" href="../perf.html"><img src="../../images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../images/home.png" alt="Home"></a><a accesskey="n" href="integer_performance.html"><img src="../../images/next.png" alt="Next"></a>
+<a accesskey="p" href="int_real_world.html"><img src="../../images/prev.png" alt="Prev"></a><a accesskey="u" href="../perf.html"><img src="../../images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../images/home.png" alt="Home"></a><a accesskey="n" href="integer_performance.html"><img src="../../images/next.png" alt="Next"></a>
 </div>
 </body>
 </html>

Added: sandbox/big_number/libs/multiprecision/doc/html/boost_multiprecision/perf/int_real_world.html
==============================================================================
--- (empty file)
+++ sandbox/big_number/libs/multiprecision/doc/html/boost_multiprecision/perf/int_real_world.html 2012-03-21 05:19:57 EDT (Wed, 21 Mar 2012)
@@ -0,0 +1,217 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
+<title>Integer Real World Tests</title>
+<link rel="stylesheet" href="http://www.boost.org/doc/libs/release/doc/src/boostbook.css" type="text/css">
+<meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
+<link rel="home" href="../../index.html" title="Chapter&#160;1.&#160;Boost.Multiprecision">
+<link rel="up" href="../perf.html" title="Performance Comparison">
+<link rel="prev" href="realworld.html" title="Floating Point Real World Tests">
+<link rel="next" href="float_performance.html" title="Float Algorithm Perfomance">
+</head>
+<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+<div class="spirit-nav">
+<a accesskey="p" href="realworld.html"><img src="../../images/prev.png" alt="Prev"></a><a accesskey="u" href="../perf.html"><img src="../../images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../images/home.png" alt="Home"></a><a accesskey="n" href="float_performance.html"><img src="../../images/next.png" alt="Next"></a>
+</div>
+<div class="section boost_multiprecision_perf_int_real_world">
+<div class="titlepage"><div><div><h3 class="title">
+<a name="boost_multiprecision.perf.int_real_world"></a><a class="link" href="int_real_world.html" title="Integer Real World Tests">Integer Real
+ World Tests</a>
+</h3></div></div></div>
+<p>
+ These tests
+ measure the time taken to generate 1000 128-bit random numbers and test for
+ primality using the Miller Rabin test.
+ </p>
+<p>
+ Test code was compiled with Microsoft Visual Studio 2010 with all optimisations
+ turned on (/Ox), and used MPIR-2.3.0 and libtommath-0.42.0.
+ The tests were run on 32-bit Windows Vista machine.
+ </p>
+<div class="informaltable"><table class="table">
+<colgroup>
+<col>
+<col>
+</colgroup>
+<thead><tr>
+<th>
+ <p>
+ Integer Type
+ </p>
+ </th>
+<th>
+ <p>
+ Relative (and Absolute) Times
+ </p>
+ </th>
+</tr></thead>
+<tbody>
+<tr>
+<td>
+ <p>
+ cpp_int
+ </p>
+ </td>
+<td>
+ <p>
+ 1.45089(0.481248s)
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ cpp_int (no Expression templates)
+ </p>
+ </td>
+<td>
+ <p>
+ 1.61489(0.535646s)
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ cpp_int (64-bit cache)
+ </p>
+ </td>
+<td>
+ <p>
+ 1.39273(0.461956s)
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ cpp_int (256-bit cache)
+ </p>
+ </td>
+<td>
+ <p>
+ 1.37743(0.456884s)
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ cpp_int (512-bit cache)
+ </p>
+ </td>
+<td>
+ <p>
+ 1.0919(0.362175s)
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ cpp_int (1024-bit cache)
+ </p>
+ </td>
+<td>
+ <p>
+ 1.10864(0.367726s)
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ mp_int
+ </p>
+ </td>
+<td>
+ <p>
+ 3.92956(1.3034s)
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ mp_int (no Expression templates)
+ </p>
+ </td>
+<td>
+ <p>
+ 4.02496(1.33505s)
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ mp_int1024_t
+ </p>
+ </td>
+<td>
+ <p>
+ 1.01094(0.335322s)
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ mp_int1024_t (no Expression templates)
+ </p>
+ </td>
+<td>
+ <p>
+ 1(0.331692s)
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ mpz_int
+ </p>
+ </td>
+<td>
+ <p>
+ 1.08472(0.359793s)
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ mpz_int (no Expression templates)
+ </p>
+ </td>
+<td>
+ <p>
+ 1.20865(0.400901s)
+ </p>
+ </td>
+</tr>
+</tbody>
+</table></div>
+<p>
+ It's interesting to note that expression templates have little effect here
+ - perhaps because the actual expressions involved are relatively trivial
+ in this case - so the time taken for multiplication and division tends to
+ dominate. Also note how increasing the internal cache size used by <code class="computeroutput"><span class="identifier">cpp_int</span></code> is quite effective in this case
+ in cutting out memory allocations altogether - cutting about a third off
+ the total runtime.
+ </p>
+</div>
+<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
+<td align="left"></td>
+<td align="right"><div class="copyright-footer">Copyright &#169; 2011 John Maddock<p>
+ Distributed under the Boost Software License, Version 1.0. (See accompanying
+ file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+ </p>
+</div></td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="realworld.html"><img src="../../images/prev.png" alt="Prev"></a><a accesskey="u" href="../perf.html"><img src="../../images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../images/home.png" alt="Home"></a><a accesskey="n" href="float_performance.html"><img src="../../images/next.png" alt="Next"></a>
+</div>
+</body>
+</html>

Modified: sandbox/big_number/libs/multiprecision/doc/html/boost_multiprecision/perf/integer_performance.html
==============================================================================
--- sandbox/big_number/libs/multiprecision/doc/html/boost_multiprecision/perf/integer_performance.html (original)
+++ sandbox/big_number/libs/multiprecision/doc/html/boost_multiprecision/perf/integer_performance.html 2012-03-21 05:19:57 EDT (Wed, 21 Mar 2012)
@@ -7,11 +7,11 @@
 <link rel="home" href="../../index.html" title="Chapter&#160;1.&#160;Boost.Multiprecision">
 <link rel="up" href="../perf.html" title="Performance Comparison">
 <link rel="prev" href="float_performance.html" title="Float Algorithm Perfomance">
-<link rel="next" href="../map.html" title="Roadmap">
+<link rel="next" href="rational_performance.html" title="Rational Type Perfomance">
 </head>
 <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
 <div class="spirit-nav">
-<a accesskey="p" href="float_performance.html"><img src="../../images/prev.png" alt="Prev"></a><a accesskey="u" href="../perf.html"><img src="../../images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../images/home.png" alt="Home"></a><a accesskey="n" href="../map.html"><img src="../../images/next.png" alt="Next"></a>
+<a accesskey="p" href="float_performance.html"><img src="../../images/prev.png" alt="Prev"></a><a accesskey="u" href="../perf.html"><img src="../../images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../images/home.png" alt="Home"></a><a accesskey="n" href="rational_performance.html"><img src="../../images/next.png" alt="Next"></a>
 </div>
 <div class="section boost_multiprecision_perf_integer_performance">
 <div class="titlepage"><div><div><h3 class="title">
@@ -33,9 +33,8 @@
         The tests were run on 32-bit Windows Vista machine.
       </p>
 <p>
- Note that Linux x64 tests showed significantly worse performance for <code class="computeroutput"><span class="identifier">fixed_int</span></code> division than on Win32 (or possibly
- GMP behaves much better in that case).
- Otherwise the results are much the same.
+ Linux x86_64 results are broadly similar, except that libtommath performs
+ much better there.
       </p>
 <div class="table">
 <a name="boost_multiprecision.perf.integer_performance.operator__"></a><p class="title"><b>Table&#160;1.17.&#160;Operator +</b></p>
@@ -46,7 +45,6 @@
 <col>
 <col>
 <col>
-<col>
 </colgroup>
 <thead><tr>
 <th>
@@ -56,11 +54,6 @@
               </th>
 <th>
                 <p>
- 64 Bits
- </p>
- </th>
-<th>
- <p>
                   128 Bits
                 </p>
               </th>
@@ -84,96 +77,108 @@
 <tr>
 <td>
                 <p>
- fixed_int
+ cpp_int
                 </p>
               </td>
 <td>
                 <p>
- <span class="bold"><strong>1</strong></span> (0.0031291s)
+ 1.24574 (0.0270133s)
                 </p>
               </td>
 <td>
                 <p>
- <span class="bold"><strong>1</strong></span> (0.00703043s)
+ 1.09665 (0.0352319s)
                 </p>
               </td>
 <td>
                 <p>
- <span class="bold"><strong>1</strong></span> (0.0163669s)
+ 1.25708 (0.0524047s)
                 </p>
               </td>
 <td>
                 <p>
- <span class="bold"><strong>1</strong></span> (0.0326567s)
+ 1.31488 (0.08777s)
                 </p>
               </td>
+</tr>
+<tr>
 <td>
                 <p>
- <span class="bold"><strong>1</strong></span> (0.0603087s)
+ cpp_int(fixed)
                 </p>
               </td>
-</tr>
-<tr>
 <td>
                 <p>
- gmp_int
+ 1.05787 (0.0229394s)
                 </p>
               </td>
 <td>
                 <p>
- 12.4866 (0.0390717s)
+ <span class="bold"><strong>1</strong></span> (0.0321268s)
                 </p>
               </td>
 <td>
                 <p>
- 6.01034 (0.0422553s)
+ 1.16171 (0.0484289s)
                 </p>
               </td>
 <td>
                 <p>
- 2.65628 (0.0434751s)
+ 1.24017 (0.0827832s)
                 </p>
               </td>
+</tr>
+<tr>
 <td>
                 <p>
- 1.54295 (0.0503875s)
+ gmp_int
                 </p>
               </td>
 <td>
                 <p>
- 1.16477 (0.0702458s)
+ 2.08016 (0.0451073s)
                 </p>
               </td>
-</tr>
-<tr>
 <td>
                 <p>
- tommath_int
+ 1.33792 (0.042983s)
                 </p>
               </td>
 <td>
                 <p>
- 6.03111 (0.018872s)
+ 1.19676 (0.0498904s)
                 </p>
               </td>
 <td>
                 <p>
- 3.08173 (0.0216659s)
+ <span class="bold"><strong>1</strong></span> (0.0667514s)
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ tommath_int
+ </p>
+ </td>
+<td>
+ <p>
+ <span class="bold"><strong>1</strong></span> (0.0216845s)
                 </p>
               </td>
 <td>
                 <p>
- 1.84243 (0.0301548s)
+ 1.07779 (0.0346258s)
                 </p>
               </td>
 <td>
                 <p>
- 1.30199 (0.0425188s)
+ <span class="bold"><strong>1</strong></span> (0.0416877s)
                 </p>
               </td>
 <td>
                 <p>
- 1.18909 (0.0717123s)
+ 1.06344 (0.0709863s)
                 </p>
               </td>
 </tr>
@@ -189,7 +194,6 @@
 <col>
 <col>
 <col>
-<col>
 </colgroup>
 <thead><tr>
 <th>
@@ -199,11 +203,6 @@
               </th>
 <th>
                 <p>
- 64 Bits
- </p>
- </th>
-<th>
- <p>
                   128 Bits
                 </p>
               </th>
@@ -227,96 +226,108 @@
 <tr>
 <td>
                 <p>
- fixed_int
+ cpp_int
                 </p>
               </td>
 <td>
                 <p>
- <span class="bold"><strong>1</strong></span> (0.00335294s)
+ 1.46244 (0.0202077s)
                 </p>
               </td>
 <td>
                 <p>
- <span class="bold"><strong>1</strong></span> (0.00376116s)
+ 1.20665 (0.0238576s)
                 </p>
               </td>
 <td>
                 <p>
- <span class="bold"><strong>1</strong></span> (0.00985174s)
+ 1.17647 (0.0258293s)
                 </p>
               </td>
 <td>
                 <p>
- <span class="bold"><strong>1</strong></span> (0.0119345s)
+ 1.12424 (0.0317931s)
                 </p>
               </td>
+</tr>
+<tr>
 <td>
                 <p>
- <span class="bold"><strong>1</strong></span> (0.0170918s)
+ cpp_int(fixed)
                 </p>
               </td>
-</tr>
-<tr>
 <td>
                 <p>
- gmp_int
+ <span class="bold"><strong>1</strong></span> (0.0138178s)
+ </p>
+ </td>
+<td>
+ <p>
+ <span class="bold"><strong>1</strong></span> (0.0197719s)
                 </p>
               </td>
 <td>
                 <p>
- 9.47407 (0.031766s)
+ <span class="bold"><strong>1</strong></span> (0.0219548s)
                 </p>
               </td>
 <td>
                 <p>
- 8.44794 (0.0317741s)
+ <span class="bold"><strong>1</strong></span> (0.0282796s)
                 </p>
               </td>
+</tr>
+<tr>
 <td>
                 <p>
- 4.23857 (0.0417573s)
+ gmp_int
                 </p>
               </td>
 <td>
                 <p>
- 5.40856 (0.0645488s)
+ 2.15321 (0.0297527s)
                 </p>
               </td>
 <td>
                 <p>
- 6.31314 (0.107903s)
+ 2.09834 (0.041488s)
                 </p>
               </td>
-</tr>
-<tr>
 <td>
                 <p>
- tommath_int
+ 2.89935 (0.0636546s)
+ </p>
+ </td>
+<td>
+ <p>
+ 3.70262 (0.104709s)
                 </p>
               </td>
+</tr>
+<tr>
 <td>
                 <p>
- 67.0025 (0.224655s)
+ tommath_int
                 </p>
               </td>
 <td>
                 <p>
- 60.4203 (0.22725s)
+ 17.1419 (0.236864s)
                 </p>
               </td>
 <td>
                 <p>
- 25.1834 (0.2481s)
+ 12.9762 (0.256563s)
                 </p>
               </td>
 <td>
                 <p>
- 23.2996 (0.27807s)
+ 12.3275 (0.270648s)
                 </p>
               </td>
 <td>
                 <p>
- 17.1743 (0.293538s)
+ 10.7373 (0.303648s)
                 </p>
               </td>
 </tr>
@@ -332,7 +343,6 @@
 <col>
 <col>
 <col>
-<col>
 </colgroup>
 <thead><tr>
 <th>
@@ -342,11 +352,6 @@
               </th>
 <th>
                 <p>
- 64 Bits
- </p>
- </th>
-<th>
- <p>
                   128 Bits
                 </p>
               </th>
@@ -370,96 +375,108 @@
 <tr>
 <td>
                 <p>
- fixed_int
+ cpp_int
                 </p>
               </td>
 <td>
                 <p>
- <span class="bold"><strong>1</strong></span> (0.00339191s)
+ 1.15385 (0.029665s)
                 </p>
               </td>
 <td>
                 <p>
- <span class="bold"><strong>1</strong></span> (0.0073172s)
+ 1.08217 (0.0369886s)
                 </p>
               </td>
 <td>
                 <p>
- <span class="bold"><strong>1</strong></span> (0.0166428s)
+ 1.05882 (0.051534s)
                 </p>
               </td>
 <td>
                 <p>
- <span class="bold"><strong>1</strong></span> (0.0349375s)
+ 1.12132 (0.0822725s)
                 </p>
               </td>
+</tr>
+<tr>
 <td>
                 <p>
- <span class="bold"><strong>1</strong></span> (0.0600083s)
+ cpp_int(fixed)
                 </p>
               </td>
-</tr>
-<tr>
 <td>
                 <p>
- gmp_int
+ <span class="bold"><strong>1</strong></span> (0.0257095s)
                 </p>
               </td>
 <td>
                 <p>
- 12.5182 (0.0424608s)
+ <span class="bold"><strong>1</strong></span> (0.0341801s)
                 </p>
               </td>
 <td>
                 <p>
- 5.57936 (0.0408253s)
+ <span class="bold"><strong>1</strong></span> (0.0486711s)
                 </p>
               </td>
 <td>
                 <p>
- 2.78496 (0.0463496s)
+ 1.08659 (0.0797242s)
                 </p>
               </td>
+</tr>
+<tr>
 <td>
                 <p>
- 1.48373 (0.051838s)
+ gmp_int
                 </p>
               </td>
 <td>
                 <p>
- 1.29928 (0.0779673s)
+ 1.56685 (0.040283s)
                 </p>
               </td>
-</tr>
-<tr>
 <td>
                 <p>
- tommath_int
+ 1.32917 (0.0454312s)
+ </p>
+ </td>
+<td>
+ <p>
+ 1.06917 (0.0520378s)
+ </p>
+ </td>
+<td>
+ <p>
+ <span class="bold"><strong>1</strong></span> (0.0733708s)
                 </p>
               </td>
+</tr>
+<tr>
 <td>
                 <p>
- 7.00782 (0.0237699s)
+ tommath_int
                 </p>
               </td>
 <td>
                 <p>
- 3.69919 (0.0270677s)
+ 1.059 (0.0272264s)
                 </p>
               </td>
 <td>
                 <p>
- 2.29645 (0.0382195s)
+ 1.16974 (0.0399818s)
                 </p>
               </td>
 <td>
                 <p>
- 1.39777 (0.0488346s)
+ 1.01303 (0.0493054s)
                 </p>
               </td>
 <td>
                 <p>
- 1.28243 (0.0769566s)
+ 1.03375 (0.0758472s)
                 </p>
               </td>
 </tr>
@@ -475,7 +492,6 @@
 <col>
 <col>
 <col>
-<col>
 </colgroup>
 <thead><tr>
 <th>
@@ -485,11 +501,6 @@
               </th>
 <th>
                 <p>
- 64 Bits
- </p>
- </th>
-<th>
- <p>
                   128 Bits
                 </p>
               </th>
@@ -513,96 +524,108 @@
 <tr>
 <td>
                 <p>
- fixed_int
+ cpp_int
                 </p>
               </td>
 <td>
                 <p>
- <span class="bold"><strong>1</strong></span> (0.00250933s)
+ 1.51665 (0.0157196s)
                 </p>
               </td>
 <td>
                 <p>
- <span class="bold"><strong>1</strong></span> (0.00358055s)
+ 1.31513 (0.0200533s)
                 </p>
               </td>
 <td>
                 <p>
- <span class="bold"><strong>1</strong></span> (0.0103282s)
+ 1.29599 (0.0235066s)
                 </p>
               </td>
 <td>
                 <p>
- <span class="bold"><strong>1</strong></span> (0.0119127s)
+ 1.21534 (0.0266136s)
                 </p>
               </td>
+</tr>
+<tr>
 <td>
                 <p>
- <span class="bold"><strong>1</strong></span> (0.0176089s)
+ cpp_int(fixed)
                 </p>
               </td>
-</tr>
-<tr>
 <td>
                 <p>
- gmp_int
+ <span class="bold"><strong>1</strong></span> (0.0103647s)
                 </p>
               </td>
 <td>
                 <p>
- 12.093 (0.0303454s)
+ <span class="bold"><strong>1</strong></span> (0.0152482s)
                 </p>
               </td>
 <td>
                 <p>
- 8.50898 (0.0304669s)
+ <span class="bold"><strong>1</strong></span> (0.018138s)
                 </p>
               </td>
 <td>
                 <p>
- 3.9284 (0.0405733s)
+ <span class="bold"><strong>1</strong></span> (0.021898s)
                 </p>
               </td>
+</tr>
+<tr>
 <td>
                 <p>
- 5.03037 (0.0599252s)
+ gmp_int
                 </p>
               </td>
 <td>
                 <p>
- 5.96617 (0.105058s)
+ 2.7938 (0.0289568s)
                 </p>
               </td>
-</tr>
-<tr>
 <td>
                 <p>
- tommath_int
+ 2.55493 (0.038958s)
+ </p>
+ </td>
+<td>
+ <p>
+ 3.12248 (0.0566356s)
+ </p>
+ </td>
+<td>
+ <p>
+ 4.48855 (0.0982904s)
                 </p>
               </td>
+</tr>
+<tr>
 <td>
                 <p>
- 80.8477 (0.202873s)
+ tommath_int
                 </p>
               </td>
 <td>
                 <p>
- 57.8371 (0.207089s)
+ 20.8695 (0.216305s)
                 </p>
               </td>
 <td>
                 <p>
- 21.3372 (0.220375s)
+ 15.0705 (0.229797s)
                 </p>
               </td>
 <td>
                 <p>
- 23.526 (0.280258s)
+ 13.4093 (0.243217s)
                 </p>
               </td>
 <td>
                 <p>
- 14.793 (0.260488s)
+ 12.2599 (0.268468s)
                 </p>
               </td>
 </tr>
@@ -618,7 +641,6 @@
 <col>
 <col>
 <col>
-<col>
 </colgroup>
 <thead><tr>
 <th>
@@ -628,11 +650,6 @@
               </th>
 <th>
                 <p>
- 64 Bits
- </p>
- </th>
-<th>
- <p>
                   128 Bits
                 </p>
               </th>
@@ -656,96 +673,108 @@
 <tr>
 <td>
                 <p>
- fixed_int
+ cpp_int
                 </p>
               </td>
 <td>
                 <p>
- <span class="bold"><strong>1</strong></span> (0.0223481s)
+ 1.29504 (0.0731032s)
                 </p>
               </td>
 <td>
                 <p>
- <span class="bold"><strong>1</strong></span> (0.0375288s)
+ 1.55431 (0.196132s)
                 </p>
               </td>
 <td>
                 <p>
- <span class="bold"><strong>1</strong></span> (0.120353s)
+ 1.4363 (0.656569s)
                 </p>
               </td>
 <td>
                 <p>
- <span class="bold"><strong>1</strong></span> (0.439147s)
+ 1.63701 (2.47859s)
                 </p>
               </td>
+</tr>
+<tr>
 <td>
                 <p>
- <span class="bold"><strong>1</strong></span> (1.46969s)
+ cpp_int(fixed)
                 </p>
               </td>
-</tr>
-<tr>
 <td>
                 <p>
- gmp_int
+ <span class="bold"><strong>1</strong></span> (0.0564485s)
+ </p>
+ </td>
+<td>
+ <p>
+ 1.16604 (0.147138s)
                 </p>
               </td>
 <td>
                 <p>
- 2.50746 (0.0560369s)
+ <span class="bold"><strong>1</strong></span> (0.457124s)
                 </p>
               </td>
 <td>
                 <p>
- 1.76676 (0.0663044s)
+ <span class="bold"><strong>1</strong></span> (1.5141s)
                 </p>
               </td>
+</tr>
+<tr>
 <td>
                 <p>
- 1.06052 (0.127636s)
+ gmp_int
                 </p>
               </td>
 <td>
                 <p>
- 1.22558 (0.53821s)
+ 1.19574 (0.0674975s)
                 </p>
               </td>
 <td>
                 <p>
- 1.03538 (1.52168s)
+ <span class="bold"><strong>1</strong></span> (0.126186s)
                 </p>
               </td>
-</tr>
-<tr>
 <td>
                 <p>
- tommath_int
+ 1.16627 (0.53313s)
                 </p>
               </td>
 <td>
                 <p>
- 3.00028 (0.0670506s)
+ 1.02906 (1.5581s)
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ tommath_int
                 </p>
               </td>
 <td>
                 <p>
- 2.97696 (0.111722s)
+ 1.97229 (0.111333s)
                 </p>
               </td>
 <td>
                 <p>
- 2.86257 (0.34452s)
+ 2.67087 (0.337027s)
                 </p>
               </td>
 <td>
                 <p>
- 2.26661 (0.995374s)
+ 2.13031 (0.973817s)
                 </p>
               </td>
 <td>
                 <p>
- 2.12926 (3.12935s)
+ 2.05869 (3.11706s)
                 </p>
               </td>
 </tr>
@@ -761,7 +790,6 @@
 <col>
 <col>
 <col>
-<col>
 </colgroup>
 <thead><tr>
 <th>
@@ -771,11 +799,6 @@
               </th>
 <th>
                 <p>
- 64 Bits
- </p>
- </th>
-<th>
- <p>
                   128 Bits
                 </p>
               </th>
@@ -799,96 +822,108 @@
 <tr>
 <td>
                 <p>
- fixed_int
+ cpp_int
                 </p>
               </td>
 <td>
                 <p>
- <span class="bold"><strong>1</strong></span> (0.00444316s)
+ 1.34609 (0.030315s)
                 </p>
               </td>
 <td>
                 <p>
- <span class="bold"><strong>1</strong></span> (0.0135739s)
+ 1.57086 (0.0407838s)
                 </p>
               </td>
 <td>
                 <p>
- <span class="bold"><strong>1</strong></span> (0.0192615s)
+ 1.60154 (0.0542267s)
                 </p>
               </td>
 <td>
                 <p>
- <span class="bold"><strong>1</strong></span> (0.0328339s)
+ 1.67808 (0.0804984s)
                 </p>
               </td>
+</tr>
+<tr>
 <td>
                 <p>
- 1.18198 (0.0567364s)
+ cpp_int(fixed)
                 </p>
               </td>
-</tr>
-<tr>
 <td>
                 <p>
- gmp_int
+ 1.29783 (0.0292279s)
                 </p>
               </td>
 <td>
                 <p>
- 4.57776 (0.0203397s)
+ 1.58263 (0.0410894s)
                 </p>
               </td>
 <td>
                 <p>
- 1.79901 (0.0244196s)
+ 1.61543 (0.054697s)
                 </p>
               </td>
 <td>
                 <p>
- 1.32814 (0.025582s)
+ 1.66841 (0.0800346s)
                 </p>
               </td>
+</tr>
+<tr>
 <td>
                 <p>
- 1.01453 (0.033311s)
+ gmp_int
                 </p>
               </td>
 <td>
                 <p>
- <span class="bold"><strong>1</strong></span> (0.048001s)
+ <span class="bold"><strong>1</strong></span> (0.0225207s)
                 </p>
               </td>
-</tr>
-<tr>
 <td>
                 <p>
- tommath_int
+ <span class="bold"><strong>1</strong></span> (0.0259628s)
+ </p>
+ </td>
+<td>
+ <p>
+ <span class="bold"><strong>1</strong></span> (0.033859s)
+ </p>
+ </td>
+<td>
+ <p>
+ <span class="bold"><strong>1</strong></span> (0.0479706s)
                 </p>
               </td>
+</tr>
+<tr>
 <td>
                 <p>
- 53.8709 (0.239357s)
+ tommath_int
                 </p>
               </td>
 <td>
                 <p>
- 18.3773 (0.249452s)
+ 12.4278 (0.279882s)
                 </p>
               </td>
 <td>
                 <p>
- 14.2088 (0.273682s)
+ 11.9045 (0.309074s)
                 </p>
               </td>
 <td>
                 <p>
- 14.0907 (0.462652s)
+ 10.5973 (0.358813s)
                 </p>
               </td>
 <td>
                 <p>
- 9.10761 (0.437175s)
+ 9.47384 (0.454466s)
                 </p>
               </td>
 </tr>
@@ -904,7 +939,6 @@
 <col>
 <col>
 <col>
-<col>
 </colgroup>
 <thead><tr>
 <th>
@@ -914,11 +948,6 @@
               </th>
 <th>
                 <p>
- 64 Bits
- </p>
- </th>
-<th>
- <p>
                   128 Bits
                 </p>
               </th>
@@ -942,96 +971,108 @@
 <tr>
 <td>
                 <p>
- fixed_int
+ cpp_int
                 </p>
               </td>
 <td>
                 <p>
- <span class="bold"><strong>1</strong></span> (0.0991632s)
+ 2.86387 (0.593314s)
                 </p>
               </td>
 <td>
                 <p>
- <span class="bold"><strong>1</strong></span> (0.172328s)
+ 2.18375 (0.69965s)
                 </p>
               </td>
 <td>
                 <p>
- <span class="bold"><strong>1</strong></span> (0.309492s)
+ 1.72571 (0.918294s)
                 </p>
               </td>
 <td>
                 <p>
- <span class="bold"><strong>1</strong></span> (0.573815s)
+ 1.39251 (1.33801s)
                 </p>
               </td>
+</tr>
+<tr>
 <td>
                 <p>
- <span class="bold"><strong>1</strong></span> (1.06356s)
+ cpp_int(fixed)
                 </p>
               </td>
-</tr>
-<tr>
 <td>
                 <p>
- gmp_int
+ <span class="bold"><strong>1</strong></span> (0.207172s)
                 </p>
               </td>
 <td>
                 <p>
- 7.81859 (0.775316s)
+ <span class="bold"><strong>1</strong></span> (0.320389s)
                 </p>
               </td>
 <td>
                 <p>
- 5.11069 (0.880715s)
+ <span class="bold"><strong>1</strong></span> (0.532127s)
                 </p>
               </td>
 <td>
                 <p>
- 2.93514 (0.908404s)
+ <span class="bold"><strong>1</strong></span> (0.960856s)
                 </p>
               </td>
+</tr>
+<tr>
 <td>
                 <p>
- 1.80497 (1.03572s)
+ gmp_int
                 </p>
               </td>
 <td>
                 <p>
- 1.21878 (1.29625s)
+ 3.89115 (0.806137s)
                 </p>
               </td>
-</tr>
-<tr>
 <td>
                 <p>
- tommath_int
+ 2.87573 (0.921352s)
+ </p>
+ </td>
+<td>
+ <p>
+ 1.96635 (1.04635s)
+ </p>
+ </td>
+<td>
+ <p>
+ 1.29618 (1.24544s)
                 </p>
               </td>
+</tr>
+<tr>
 <td>
                 <p>
- 18.0766 (1.79253s)
+ tommath_int
                 </p>
               </td>
 <td>
                 <p>
- 12.3939 (2.13582s)
+ 11.9483 (2.47535s)
                 </p>
               </td>
 <td>
                 <p>
- 9.80438 (3.03438s)
+ 9.35941 (2.99865s)
                 </p>
               </td>
 <td>
                 <p>
- 8.74047 (5.01541s)
+ 8.79014 (4.67747s)
                 </p>
               </td>
 <td>
                 <p>
- 10.8288 (11.517s)
+ 11.8316 (11.3684s)
                 </p>
               </td>
 </tr>
@@ -1047,7 +1088,6 @@
 <col>
 <col>
 <col>
-<col>
 </colgroup>
 <thead><tr>
 <th>
@@ -1057,11 +1097,6 @@
               </th>
 <th>
                 <p>
- 64 Bits
- </p>
- </th>
-<th>
- <p>
                   128 Bits
                 </p>
               </th>
@@ -1085,96 +1120,108 @@
 <tr>
 <td>
                 <p>
- fixed_int
+ cpp_int
                 </p>
               </td>
 <td>
                 <p>
- 1.04098 (0.0443082s)
+ 5.77003 (0.313196s)
                 </p>
               </td>
 <td>
                 <p>
- 1.61317 (0.110308s)
+ 4.38067 (0.431864s)
                 </p>
               </td>
 <td>
                 <p>
- 2.18324 (0.229148s)
+ 3.55054 (0.634559s)
                 </p>
               </td>
 <td>
                 <p>
- 2.36331 (0.442167s)
+ 2.97898 (1.03205s)
                 </p>
               </td>
+</tr>
+<tr>
 <td>
                 <p>
- 2.45159 (0.866172s)
+ cpp_int(fixed)
                 </p>
               </td>
-</tr>
-<tr>
 <td>
                 <p>
- gmp_int
+ 2.48952 (0.135131s)
                 </p>
               </td>
 <td>
                 <p>
- <span class="bold"><strong>1</strong></span> (0.042564s)
+ 2.59188 (0.255519s)
                 </p>
               </td>
 <td>
                 <p>
- <span class="bold"><strong>1</strong></span> (0.06838s)
+ 2.56716 (0.458808s)
                 </p>
               </td>
 <td>
                 <p>
- <span class="bold"><strong>1</strong></span> (0.104957s)
+ 2.52368 (0.874313s)
                 </p>
               </td>
+</tr>
+<tr>
 <td>
                 <p>
- <span class="bold"><strong>1</strong></span> (0.187096s)
+ gmp_int
                 </p>
               </td>
 <td>
                 <p>
- <span class="bold"><strong>1</strong></span> (0.35331s)
+ <span class="bold"><strong>1</strong></span> (0.0542797s)
                 </p>
               </td>
-</tr>
-<tr>
 <td>
                 <p>
- tommath_int
+ <span class="bold"><strong>1</strong></span> (0.0985842s)
+ </p>
+ </td>
+<td>
+ <p>
+ <span class="bold"><strong>1</strong></span> (0.178722s)
+ </p>
+ </td>
+<td>
+ <p>
+ <span class="bold"><strong>1</strong></span> (0.346443s)
                 </p>
               </td>
+</tr>
+<tr>
 <td>
                 <p>
- 32.4072 (1.37938s)
+ tommath_int
                 </p>
               </td>
 <td>
                 <p>
- 23.7471 (1.62383s)
+ 31.6477 (1.71783s)
                 </p>
               </td>
 <td>
                 <p>
- 22.1907 (2.32908s)
+ 22.8727 (2.25489s)
                 </p>
               </td>
 <td>
                 <p>
- 19.9054 (3.72421s)
+ 19.9248 (3.56101s)
                 </p>
               </td>
 <td>
                 <p>
- 24.2219 (8.55783s)
+ 24.3266 (8.42779s)
                 </p>
               </td>
 </tr>
@@ -1190,7 +1237,6 @@
 <col>
 <col>
 <col>
-<col>
 </colgroup>
 <thead><tr>
 <th>
@@ -1200,11 +1246,6 @@
               </th>
 <th>
                 <p>
- 64 Bits
- </p>
- </th>
-<th>
- <p>
                   128 Bits
                 </p>
               </th>
@@ -1228,96 +1269,108 @@
 <tr>
 <td>
                 <p>
- fixed_int
+ cpp_int
                 </p>
               </td>
 <td>
                 <p>
- <span class="bold"><strong>1</strong></span> (0.0946529s)
+ 1.9813 (0.357541s)
                 </p>
               </td>
 <td>
                 <p>
- <span class="bold"><strong>1</strong></span> (0.170561s)
+ 1.55667 (0.460146s)
                 </p>
               </td>
 <td>
                 <p>
- <span class="bold"><strong>1</strong></span> (0.328458s)
+ 1.35341 (0.681144s)
                 </p>
               </td>
 <td>
                 <p>
- <span class="bold"><strong>1</strong></span> (0.575884s)
+ 1.19906 (1.10138s)
                 </p>
               </td>
+</tr>
+<tr>
 <td>
                 <p>
- <span class="bold"><strong>1</strong></span> (1.05006s)
+ cpp_int(fixed)
                 </p>
               </td>
-</tr>
-<tr>
 <td>
                 <p>
- gmp_int
+ <span class="bold"><strong>1</strong></span> (0.180457s)
                 </p>
               </td>
 <td>
                 <p>
- 7.77525 (0.73595s)
+ <span class="bold"><strong>1</strong></span> (0.295597s)
                 </p>
               </td>
 <td>
                 <p>
- 4.39387 (0.749422s)
+ <span class="bold"><strong>1</strong></span> (0.503278s)
                 </p>
               </td>
 <td>
                 <p>
- 2.35075 (0.772122s)
+ <span class="bold"><strong>1</strong></span> (0.918538s)
                 </p>
               </td>
+</tr>
+<tr>
 <td>
                 <p>
- 1.51922 (0.874894s)
+ gmp_int
                 </p>
               </td>
 <td>
                 <p>
- 1.02263 (1.07382s)
+ 3.50213 (0.631985s)
                 </p>
               </td>
-</tr>
-<tr>
 <td>
                 <p>
- tommath_int
+ 2.33312 (0.689662s)
+ </p>
+ </td>
+<td>
+ <p>
+ 1.57264 (0.791475s)
+ </p>
+ </td>
+<td>
+ <p>
+ 1.07795 (0.99014s)
                 </p>
               </td>
+</tr>
+<tr>
 <td>
                 <p>
- 27.1503 (2.56986s)
+ tommath_int
                 </p>
               </td>
 <td>
                 <p>
- 12.8743 (2.19585s)
+ 12.2393 (2.20868s)
                 </p>
               </td>
 <td>
                 <p>
- 9.43965 (3.10053s)
+ 10.1123 (2.98915s)
                 </p>
               </td>
 <td>
                 <p>
- 8.24936 (4.75068s)
+ 9.46676 (4.76442s)
                 </p>
               </td>
 <td>
                 <p>
- 10.9719 (11.5211s)
+ 12.1795 (11.1873s)
                 </p>
               </td>
 </tr>
@@ -1333,7 +1386,6 @@
 <col>
 <col>
 <col>
-<col>
 </colgroup>
 <thead><tr>
 <th>
@@ -1343,11 +1395,6 @@
               </th>
 <th>
                 <p>
- 64 Bits
- </p>
- </th>
-<th>
- <p>
                   128 Bits
                 </p>
               </th>
@@ -1371,96 +1418,108 @@
 <tr>
 <td>
                 <p>
- fixed_int
+ cpp_int
                 </p>
               </td>
 <td>
                 <p>
- 1.25034 (0.0425984s)
+ 1.88485 (0.105552s)
                 </p>
               </td>
 <td>
                 <p>
- 1.91617 (0.106226s)
+ 2.00194 (0.203711s)
                 </p>
               </td>
 <td>
                 <p>
- 2.02166 (0.195577s)
+ 2.08202 (0.380096s)
                 </p>
               </td>
 <td>
                 <p>
- 2.14437 (0.387067s)
+ 2.12794 (0.752068s)
                 </p>
               </td>
+</tr>
+<tr>
 <td>
                 <p>
- 2.23514 (0.776075s)
+ cpp_int(fixed)
                 </p>
               </td>
-</tr>
-<tr>
 <td>
                 <p>
- gmp_int
+ 1.7474 (0.0978544s)
                 </p>
               </td>
 <td>
                 <p>
- <span class="bold"><strong>1</strong></span> (0.0340695s)
+ 1.88457 (0.191768s)
                 </p>
               </td>
 <td>
                 <p>
- <span class="bold"><strong>1</strong></span> (0.0554367s)
+ 2.0306 (0.37071s)
                 </p>
               </td>
 <td>
                 <p>
- <span class="bold"><strong>1</strong></span> (0.0967406s)
+ 2.0851 (0.736929s)
                 </p>
               </td>
+</tr>
+<tr>
 <td>
                 <p>
- <span class="bold"><strong>1</strong></span> (0.180504s)
+ gmp_int
                 </p>
               </td>
 <td>
                 <p>
- <span class="bold"><strong>1</strong></span> (0.347216s)
+ <span class="bold"><strong>1</strong></span> (0.0560001s)
                 </p>
               </td>
-</tr>
-<tr>
 <td>
                 <p>
- tommath_int
+ <span class="bold"><strong>1</strong></span> (0.101757s)
                 </p>
               </td>
 <td>
                 <p>
- 42.8781 (1.46083s)
+ <span class="bold"><strong>1</strong></span> (0.182561s)
                 </p>
               </td>
 <td>
                 <p>
- 29.879 (1.65639s)
+ <span class="bold"><strong>1</strong></span> (0.353426s)
                 </p>
               </td>
+</tr>
+<tr>
 <td>
                 <p>
- 23.4323 (2.26685s)
+ tommath_int
                 </p>
               </td>
 <td>
                 <p>
- 19.932 (3.5978s)
+ 30.4466 (1.70501s)
                 </p>
               </td>
 <td>
                 <p>
- 25.0046 (8.682s)
+ 22.2997 (2.26915s)
+ </p>
+ </td>
+<td>
+ <p>
+ 19.6199 (3.58184s)
+ </p>
+ </td>
+<td>
+ <p>
+ 24.0694 (8.50676s)
                 </p>
               </td>
 </tr>
@@ -1468,15 +1527,14 @@
 </table></div>
 </div>
 <br class="table-break"><div class="table">
-<a name="boost_multiprecision.perf.integer_performance.operator_str"></a><p class="title"><b>Table&#160;1.27.&#160;Operator str</b></p>
-<div class="table-contents"><table class="table" summary="Operator str">
+<a name="boost_multiprecision.perf.integer_performance.operator___"></a><p class="title"><b>Table&#160;1.27.&#160;Operator &lt;&lt;</b></p>
+<div class="table-contents"><table class="table" summary="Operator &lt;&lt;">
 <colgroup>
 <col>
 <col>
 <col>
 <col>
 <col>
-<col>
 </colgroup>
 <thead><tr>
 <th>
@@ -1486,11 +1544,6 @@
               </th>
 <th>
                 <p>
- 64 Bits
- </p>
- </th>
-<th>
- <p>
                   128 Bits
                 </p>
               </th>
@@ -1514,96 +1567,108 @@
 <tr>
 <td>
                 <p>
- fixed_int
+ cpp_int
                 </p>
               </td>
 <td>
                 <p>
- <span class="bold"><strong>1</strong></span> (0.000465841s)
+ 1.20362 (0.0224696s)
                 </p>
               </td>
 <td>
                 <p>
- <span class="bold"><strong>1</strong></span> (0.00102073s)
+ 1.08555 (0.0294403s)
                 </p>
               </td>
 <td>
                 <p>
- <span class="bold"><strong>1</strong></span> (0.00207212s)
+ <span class="bold"><strong>1</strong></span> (0.0360516s)
                 </p>
               </td>
 <td>
                 <p>
- 1.02618 (0.0062017s)
+ 1.07177 (0.0523935s)
                 </p>
               </td>
+</tr>
+<tr>
 <td>
                 <p>
- 1.32649 (0.0190043s)
+ cpp_int(fixed)
                 </p>
               </td>
-</tr>
-<tr>
 <td>
                 <p>
- gmp_int
+ <span class="bold"><strong>1</strong></span> (0.0186683s)
                 </p>
               </td>
 <td>
                 <p>
- 2.83823 (0.00132216s)
+ <span class="bold"><strong>1</strong></span> (0.0271201s)
                 </p>
               </td>
 <td>
                 <p>
- 2.17537 (0.00222046s)
+ 1.02126 (0.036818s)
                 </p>
               </td>
 <td>
                 <p>
- 1.46978 (0.00304557s)
+ <span class="bold"><strong>1</strong></span> (0.0488848s)
                 </p>
               </td>
+</tr>
+<tr>
 <td>
                 <p>
- <span class="bold"><strong>1</strong></span> (0.00604351s)
+ gmp_int
                 </p>
               </td>
 <td>
                 <p>
- <span class="bold"><strong>1</strong></span> (0.0143268s)
+ 1.36706 (0.0255207s)
                 </p>
               </td>
-</tr>
-<tr>
 <td>
                 <p>
- tommath_int
+ 1.12042 (0.0303858s)
                 </p>
               </td>
 <td>
                 <p>
- 15.76 (0.00734164s)
+ 1.24359 (0.0448335s)
                 </p>
               </td>
 <td>
                 <p>
- 15.9879 (0.0163193s)
+ 1.40143 (0.0685085s)
                 </p>
               </td>
+</tr>
+<tr>
 <td>
                 <p>
- 21.7337 (0.0450349s)
+ tommath_int
                 </p>
               </td>
 <td>
                 <p>
- 19.7183 (0.119168s)
+ 2.09357 (0.0390833s)
                 </p>
               </td>
 <td>
                 <p>
- 26.3445 (0.377431s)
+ 2.4569 (0.0666312s)
+ </p>
+ </td>
+<td>
+ <p>
+ 2.63592 (0.0950291s)
+ </p>
+ </td>
+<td>
+ <p>
+ 3.43638 (0.167987s)
                 </p>
               </td>
 </tr>
@@ -1611,15 +1676,14 @@
 </table></div>
 </div>
 <br class="table-break"><div class="table">
-<a name="boost_multiprecision.perf.integer_performance.operator___"></a><p class="title"><b>Table&#160;1.28.&#160;Operator &lt;&lt;</b></p>
-<div class="table-contents"><table class="table" summary="Operator &lt;&lt;">
+<a name="boost_multiprecision.perf.integer_performance.operator4"></a><p class="title"><b>Table&#160;1.28.&#160;Operator &gt;&gt;</b></p>
+<div class="table-contents"><table class="table" summary="Operator &gt;&gt;">
 <colgroup>
 <col>
 <col>
 <col>
 <col>
 <col>
-<col>
 </colgroup>
 <thead><tr>
 <th>
@@ -1629,11 +1693,6 @@
               </th>
 <th>
                 <p>
- 64 Bits
- </p>
- </th>
-<th>
- <p>
                   128 Bits
                 </p>
               </th>
@@ -1657,96 +1716,108 @@
 <tr>
 <td>
                 <p>
- fixed_int
+ cpp_int
                 </p>
               </td>
 <td>
                 <p>
- <span class="bold"><strong>1</strong></span> (0.0119095s)
+ 1.33649 (0.0210319s)
                 </p>
               </td>
 <td>
                 <p>
- <span class="bold"><strong>1</strong></span> (0.0131746s)
+ 1.12919 (0.0266135s)
                 </p>
               </td>
 <td>
                 <p>
- <span class="bold"><strong>1</strong></span> (0.0213483s)
+ 1.10413 (0.0307184s)
                 </p>
               </td>
 <td>
                 <p>
- <span class="bold"><strong>1</strong></span> (0.0247552s)
+ 1.09267 (0.0399373s)
                 </p>
               </td>
+</tr>
+<tr>
 <td>
                 <p>
- <span class="bold"><strong>1</strong></span> (0.0339579s)
+ cpp_int(fixed)
                 </p>
               </td>
-</tr>
-<tr>
 <td>
                 <p>
- gmp_int
+ <span class="bold"><strong>1</strong></span> (0.0157367s)
                 </p>
               </td>
 <td>
                 <p>
- 1.9355 (0.0230509s)
+ <span class="bold"><strong>1</strong></span> (0.0235686s)
                 </p>
               </td>
 <td>
                 <p>
- 1.94257 (0.0255925s)
+ <span class="bold"><strong>1</strong></span> (0.0278214s)
                 </p>
               </td>
 <td>
                 <p>
- 1.49684 (0.031955s)
+ 1.05198 (0.0384501s)
                 </p>
               </td>
+</tr>
+<tr>
 <td>
                 <p>
- 1.79202 (0.0443618s)
+ gmp_int
                 </p>
               </td>
 <td>
                 <p>
- 2.0846 (0.0707887s)
+ 1.72135 (0.0270884s)
                 </p>
               </td>
-</tr>
-<tr>
 <td>
                 <p>
- tommath_int
+ 1.2078 (0.0284661s)
                 </p>
               </td>
 <td>
                 <p>
- 2.64273 (0.0314737s)
+ 1.16066 (0.0322912s)
                 </p>
               </td>
 <td>
                 <p>
- 2.95612 (0.0389456s)
+ <span class="bold"><strong>1</strong></span> (0.0365503s)
                 </p>
               </td>
+</tr>
+<tr>
 <td>
                 <p>
- 3.05842 (0.065292s)
+ tommath_int
+ </p>
+ </td>
+<td>
+ <p>
+ 15.4381 (0.242945s)
+ </p>
+ </td>
+<td>
+ <p>
+ 11.8797 (0.279987s)
                 </p>
               </td>
 <td>
                 <p>
- 3.79496 (0.0939451s)
+ 10.9043 (0.303374s)
                 </p>
               </td>
 <td>
                 <p>
- 4.82142 (0.163725s)
+ 14.0762 (0.514491s)
                 </p>
               </td>
 </tr>
@@ -1754,15 +1825,14 @@
 </table></div>
 </div>
 <br class="table-break"><div class="table">
-<a name="boost_multiprecision.perf.integer_performance.operator4"></a><p class="title"><b>Table&#160;1.29.&#160;Operator &gt;&gt;</b></p>
-<div class="table-contents"><table class="table" summary="Operator &gt;&gt;">
+<a name="boost_multiprecision.perf.integer_performance.operator5"></a><p class="title"><b>Table&#160;1.29.&#160;Operator &amp;</b></p>
+<div class="table-contents"><table class="table" summary="Operator &amp;">
 <colgroup>
 <col>
 <col>
 <col>
 <col>
 <col>
-<col>
 </colgroup>
 <thead><tr>
 <th>
@@ -1772,11 +1842,6 @@
               </th>
 <th>
                 <p>
- 64 Bits
- </p>
- </th>
-<th>
- <p>
                   128 Bits
                 </p>
               </th>
@@ -1800,96 +1865,108 @@
 <tr>
 <td>
                 <p>
- fixed_int
+ cpp_int
                 </p>
               </td>
 <td>
                 <p>
- <span class="bold"><strong>1</strong></span> (0.006361s)
+ 1.65829 (0.0314059s)
                 </p>
               </td>
 <td>
                 <p>
- <span class="bold"><strong>1</strong></span> (0.00880189s)
+ 1.42198 (0.0390384s)
                 </p>
               </td>
 <td>
                 <p>
- <span class="bold"><strong>1</strong></span> (0.0180295s)
+ 1.48578 (0.0498903s)
                 </p>
               </td>
 <td>
                 <p>
- <span class="bold"><strong>1</strong></span> (0.0220786s)
+ 1.51243 (0.0770342s)
                 </p>
               </td>
+</tr>
+<tr>
 <td>
                 <p>
- <span class="bold"><strong>1</strong></span> (0.0325312s)
+ cpp_int(fixed)
                 </p>
               </td>
-</tr>
-<tr>
 <td>
                 <p>
- gmp_int
+ <span class="bold"><strong>1</strong></span> (0.0189387s)
+ </p>
+ </td>
+<td>
+ <p>
+ <span class="bold"><strong>1</strong></span> (0.0274536s)
                 </p>
               </td>
 <td>
                 <p>
- 4.26889 (0.0271544s)
+ <span class="bold"><strong>1</strong></span> (0.0335786s)
                 </p>
               </td>
 <td>
                 <p>
- 3.14669 (0.0276968s)
+ <span class="bold"><strong>1</strong></span> (0.0509341s)
                 </p>
               </td>
+</tr>
+<tr>
 <td>
                 <p>
- 1.74396 (0.0314426s)
+ gmp_int
                 </p>
               </td>
 <td>
                 <p>
- 1.45928 (0.0322188s)
+ 2.80248 (0.0530755s)
                 </p>
               </td>
 <td>
                 <p>
- 1.24596 (0.0405327s)
+ 2.39752 (0.0658206s)
                 </p>
               </td>
-</tr>
-<tr>
 <td>
                 <p>
- tommath_int
+ 2.66009 (0.089322s)
                 </p>
               </td>
 <td>
                 <p>
- 39.4379 (0.250865s)
+ 2.73942 (0.13953s)
                 </p>
               </td>
+</tr>
+<tr>
 <td>
                 <p>
- 28.6225 (0.251932s)
+ tommath_int
                 </p>
               </td>
 <td>
                 <p>
- 16.4543 (0.296661s)
+ 6.95432 (0.131706s)
                 </p>
               </td>
 <td>
                 <p>
- 14.2167 (0.313884s)
+ 5.4059 (0.148412s)
                 </p>
               </td>
 <td>
                 <p>
- 15.5842 (0.506974s)
+ 4.56887 (0.153417s)
+ </p>
+ </td>
+<td>
+ <p>
+ 6.5696 (0.334616s)
                 </p>
               </td>
 </tr>
@@ -1897,15 +1974,14 @@
 </table></div>
 </div>
 <br class="table-break"><div class="table">
-<a name="boost_multiprecision.perf.integer_performance.operator5"></a><p class="title"><b>Table&#160;1.30.&#160;Operator &amp;</b></p>
-<div class="table-contents"><table class="table" summary="Operator &amp;">
+<a name="boost_multiprecision.perf.integer_performance.operator_int4"></a><p class="title"><b>Table&#160;1.30.&#160;Operator &amp;(int)</b></p>
+<div class="table-contents"><table class="table" summary="Operator &amp;(int)">
 <colgroup>
 <col>
 <col>
 <col>
 <col>
 <col>
-<col>
 </colgroup>
 <thead><tr>
 <th>
@@ -1915,11 +1991,6 @@
               </th>
 <th>
                 <p>
- 64 Bits
- </p>
- </th>
-<th>
- <p>
                   128 Bits
                 </p>
               </th>
@@ -1943,96 +2014,108 @@
 <tr>
 <td>
                 <p>
- fixed_int
+ cpp_int
                 </p>
               </td>
 <td>
                 <p>
- <span class="bold"><strong>1</strong></span> (0.00298048s)
+ 1.63285 (0.0472296s)
                 </p>
               </td>
 <td>
                 <p>
- <span class="bold"><strong>1</strong></span> (0.00546222s)
+ 1.43344 (0.0588492s)
                 </p>
               </td>
 <td>
                 <p>
- <span class="bold"><strong>1</strong></span> (0.0127546s)
+ 1.33141 (0.0724386s)
                 </p>
               </td>
 <td>
                 <p>
- <span class="bold"><strong>1</strong></span> (0.01985s)
+ 1.21353 (0.104144s)
                 </p>
               </td>
+</tr>
+<tr>
 <td>
                 <p>
- <span class="bold"><strong>1</strong></span> (0.0349286s)
+ cpp_int(fixed)
                 </p>
               </td>
-</tr>
-<tr>
 <td>
                 <p>
- gmp_int
+ <span class="bold"><strong>1</strong></span> (0.0289247s)
                 </p>
               </td>
 <td>
                 <p>
- 16.0105 (0.0477189s)
+ <span class="bold"><strong>1</strong></span> (0.0410546s)
                 </p>
               </td>
 <td>
                 <p>
- 9.67027 (0.0528211s)
+ <span class="bold"><strong>1</strong></span> (0.0544075s)
                 </p>
               </td>
 <td>
                 <p>
- 5.12678 (0.0653902s)
+ <span class="bold"><strong>1</strong></span> (0.0858187s)
                 </p>
               </td>
+</tr>
+<tr>
 <td>
                 <p>
- 4.62316 (0.0917698s)
+ gmp_int
                 </p>
               </td>
 <td>
                 <p>
- 4.00837 (0.140007s)
+ 5.24478 (0.151704s)
                 </p>
               </td>
-</tr>
-<tr>
 <td>
                 <p>
- tommath_int
+ 3.81907 (0.15679s)
                 </p>
               </td>
 <td>
                 <p>
- 43.6665 (0.130147s)
+ 2.77979 (0.151242s)
                 </p>
               </td>
 <td>
                 <p>
- 23.8003 (0.130002s)
+ 1.84209 (0.158086s)
                 </p>
               </td>
+</tr>
+<tr>
 <td>
                 <p>
- 11.4242 (0.145711s)
+ tommath_int
                 </p>
               </td>
 <td>
                 <p>
- 7.83416 (0.155508s)
+ 11.7257 (0.339163s)
                 </p>
               </td>
 <td>
                 <p>
- 9.50103 (0.331858s)
+ 8.6379 (0.354625s)
+ </p>
+ </td>
+<td>
+ <p>
+ 6.90411 (0.375636s)
+ </p>
+ </td>
+<td>
+ <p>
+ 7.63253 (0.655013s)
                 </p>
               </td>
 </tr>
@@ -2040,15 +2123,14 @@
 </table></div>
 </div>
 <br class="table-break"><div class="table">
-<a name="boost_multiprecision.perf.integer_performance.operator_int4"></a><p class="title"><b>Table&#160;1.31.&#160;Operator &amp;(int)</b></p>
-<div class="table-contents"><table class="table" summary="Operator &amp;(int)">
+<a name="boost_multiprecision.perf.integer_performance.operator6"></a><p class="title"><b>Table&#160;1.31.&#160;Operator ^</b></p>
+<div class="table-contents"><table class="table" summary="Operator ^">
 <colgroup>
 <col>
 <col>
 <col>
 <col>
 <col>
-<col>
 </colgroup>
 <thead><tr>
 <th>
@@ -2058,11 +2140,6 @@
               </th>
 <th>
                 <p>
- 64 Bits
- </p>
- </th>
-<th>
- <p>
                   128 Bits
                 </p>
               </th>
@@ -2086,96 +2163,108 @@
 <tr>
 <td>
                 <p>
- fixed_int
+ cpp_int
                 </p>
               </td>
 <td>
                 <p>
- <span class="bold"><strong>1</strong></span> (0.00222291s)
+ 1.39325 (0.0297525s)
                 </p>
               </td>
 <td>
                 <p>
- <span class="bold"><strong>1</strong></span> (0.0035522s)
+ 1.28821 (0.0385005s)
                 </p>
               </td>
 <td>
                 <p>
- <span class="bold"><strong>1</strong></span> (0.0110247s)
+ 1.18843 (0.0492426s)
                 </p>
               </td>
 <td>
                 <p>
- <span class="bold"><strong>1</strong></span> (0.0154281s)
+ 1.07724 (0.0758668s)
                 </p>
               </td>
+</tr>
+<tr>
 <td>
                 <p>
- <span class="bold"><strong>1</strong></span> (0.0275044s)
+ cpp_int(fixed)
                 </p>
               </td>
-</tr>
-<tr>
 <td>
                 <p>
- gmp_int
+ <span class="bold"><strong>1</strong></span> (0.0213547s)
                 </p>
               </td>
 <td>
                 <p>
- 70.8538 (0.157502s)
+ <span class="bold"><strong>1</strong></span> (0.0298868s)
                 </p>
               </td>
 <td>
                 <p>
- 42.1478 (0.149717s)
+ <span class="bold"><strong>1</strong></span> (0.041435s)
                 </p>
               </td>
 <td>
                 <p>
- 13.9023 (0.153268s)
+ <span class="bold"><strong>1</strong></span> (0.070427s)
                 </p>
               </td>
+</tr>
+<tr>
 <td>
                 <p>
- 10.3271 (0.159328s)
+ gmp_int
                 </p>
               </td>
 <td>
                 <p>
- 6.0529 (0.166481s)
+ 2.28582 (0.048813s)
                 </p>
               </td>
-</tr>
-<tr>
 <td>
                 <p>
- tommath_int
+ 2.03478 (0.0608129s)
                 </p>
               </td>
 <td>
                 <p>
- 154.134 (0.342626s)
+ 2.05655 (0.0852131s)
                 </p>
               </td>
 <td>
                 <p>
- 93.2035 (0.331077s)
+ 1.92381 (0.135488s)
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ tommath_int
                 </p>
               </td>
 <td>
                 <p>
- 31.9151 (0.351853s)
+ 6.17078 (0.131775s)
                 </p>
               </td>
 <td>
                 <p>
- 23.6515 (0.364899s)
+ 4.8567 (0.145151s)
                 </p>
               </td>
 <td>
                 <p>
- 22.0042 (0.605213s)
+ 3.64659 (0.151097s)
+ </p>
+ </td>
+<td>
+ <p>
+ 4.78192 (0.336776s)
                 </p>
               </td>
 </tr>
@@ -2183,15 +2272,14 @@
 </table></div>
 </div>
 <br class="table-break"><div class="table">
-<a name="boost_multiprecision.perf.integer_performance.operator6"></a><p class="title"><b>Table&#160;1.32.&#160;Operator ^</b></p>
-<div class="table-contents"><table class="table" summary="Operator ^">
+<a name="boost_multiprecision.perf.integer_performance.operator_int5"></a><p class="title"><b>Table&#160;1.32.&#160;Operator ^(int)</b></p>
+<div class="table-contents"><table class="table" summary="Operator ^(int)">
 <colgroup>
 <col>
 <col>
 <col>
 <col>
 <col>
-<col>
 </colgroup>
 <thead><tr>
 <th>
@@ -2201,11 +2289,6 @@
               </th>
 <th>
                 <p>
- 64 Bits
- </p>
- </th>
-<th>
- <p>
                   128 Bits
                 </p>
               </th>
@@ -2229,96 +2312,108 @@
 <tr>
 <td>
                 <p>
- fixed_int
+ cpp_int
                 </p>
               </td>
 <td>
                 <p>
- <span class="bold"><strong>1</strong></span> (0.00307714s)
+ 1.89396 (0.0383127s)
                 </p>
               </td>
 <td>
                 <p>
- <span class="bold"><strong>1</strong></span> (0.00538197s)
+ 1.64269 (0.043417s)
                 </p>
               </td>
 <td>
                 <p>
- <span class="bold"><strong>1</strong></span> (0.0127717s)
+ 1.5386 (0.0477162s)
                 </p>
               </td>
 <td>
                 <p>
- <span class="bold"><strong>1</strong></span> (0.0198304s)
+ 1.32247 (0.0568053s)
                 </p>
               </td>
+</tr>
+<tr>
 <td>
                 <p>
- <span class="bold"><strong>1</strong></span> (0.0345822s)
+ cpp_int(fixed)
                 </p>
               </td>
-</tr>
-<tr>
 <td>
                 <p>
- gmp_int
+ <span class="bold"><strong>1</strong></span> (0.0202288s)
                 </p>
               </td>
 <td>
                 <p>
- 13.9543 (0.0429392s)
+ <span class="bold"><strong>1</strong></span> (0.0264305s)
                 </p>
               </td>
 <td>
                 <p>
- 9.92785 (0.0534314s)
+ <span class="bold"><strong>1</strong></span> (0.0310128s)
                 </p>
               </td>
 <td>
                 <p>
- 4.80398 (0.0613552s)
+ <span class="bold"><strong>1</strong></span> (0.0429539s)
                 </p>
               </td>
+</tr>
+<tr>
 <td>
                 <p>
- 4.35864 (0.0864335s)
+ gmp_int
                 </p>
               </td>
 <td>
                 <p>
- 3.887 (0.134421s)
+ 7.01953 (0.141997s)
                 </p>
               </td>
-</tr>
-<tr>
 <td>
                 <p>
- tommath_int
+ 5.47513 (0.14471s)
+ </p>
+ </td>
+<td>
+ <p>
+ 4.6627 (0.144603s)
+ </p>
+ </td>
+<td>
+ <p>
+ 3.59601 (0.154463s)
                 </p>
               </td>
+</tr>
+<tr>
 <td>
                 <p>
- 41.5958 (0.127996s)
+ tommath_int
                 </p>
               </td>
 <td>
                 <p>
- 24.2396 (0.130457s)
+ 16.2706 (0.329134s)
                 </p>
               </td>
 <td>
                 <p>
- 11.3666 (0.145171s)
+ 12.9494 (0.342258s)
                 </p>
               </td>
 <td>
                 <p>
- 8.01016 (0.158845s)
+ 11.3305 (0.35139s)
                 </p>
               </td>
 <td>
                 <p>
- 9.84853 (0.340584s)
+ 14.1712 (0.608709s)
                 </p>
               </td>
 </tr>
@@ -2326,15 +2421,14 @@
 </table></div>
 </div>
 <br class="table-break"><div class="table">
-<a name="boost_multiprecision.perf.integer_performance.operator_int5"></a><p class="title"><b>Table&#160;1.33.&#160;Operator ^(int)</b></p>
-<div class="table-contents"><table class="table" summary="Operator ^(int)">
+<a name="boost_multiprecision.perf.integer_performance.operator7"></a><p class="title"><b>Table&#160;1.33.&#160;Operator |</b></p>
+<div class="table-contents"><table class="table" summary="Operator |">
 <colgroup>
 <col>
 <col>
 <col>
 <col>
 <col>
-<col>
 </colgroup>
 <thead><tr>
 <th>
@@ -2344,11 +2438,6 @@
               </th>
 <th>
                 <p>
- 64 Bits
- </p>
- </th>
-<th>
- <p>
                   128 Bits
                 </p>
               </th>
@@ -2372,96 +2461,108 @@
 <tr>
 <td>
                 <p>
- fixed_int
+ cpp_int
+ </p>
+ </td>
+<td>
+ <p>
+ 1.34742 (0.0296944s)
                 </p>
               </td>
 <td>
                 <p>
- <span class="bold"><strong>1</strong></span> (0.00236664s)
+ 1.25923 (0.0384846s)
                 </p>
               </td>
 <td>
                 <p>
- <span class="bold"><strong>1</strong></span> (0.0035339s)
+ 1.20517 (0.0493908s)
                 </p>
               </td>
 <td>
                 <p>
- <span class="bold"><strong>1</strong></span> (0.0100442s)
+ 1.10536 (0.0761343s)
                 </p>
               </td>
+</tr>
+<tr>
 <td>
                 <p>
- <span class="bold"><strong>1</strong></span> (0.0155814s)
+ cpp_int(fixed)
                 </p>
               </td>
 <td>
                 <p>
- <span class="bold"><strong>1</strong></span> (0.0293253s)
+ <span class="bold"><strong>1</strong></span> (0.0220379s)
                 </p>
               </td>
-</tr>
-<tr>
 <td>
                 <p>
- gmp_int
+ <span class="bold"><strong>1</strong></span> (0.030562s)
                 </p>
               </td>
 <td>
                 <p>
- 61.4272 (0.145376s)
+ <span class="bold"><strong>1</strong></span> (0.0409823s)
                 </p>
               </td>
 <td>
                 <p>
- 41.6319 (0.147123s)
+ <span class="bold"><strong>1</strong></span> (0.0688775s)
                 </p>
               </td>
+</tr>
+<tr>
 <td>
                 <p>
- 14.9744 (0.150405s)
+ gmp_int
                 </p>
               </td>
 <td>
                 <p>
- 9.64857 (0.150338s)
+ 2.14429 (0.0472558s)
                 </p>
               </td>
 <td>
                 <p>
- 5.46649 (0.160306s)
+ 1.95901 (0.0598712s)
                 </p>
               </td>
-</tr>
-<tr>
 <td>
                 <p>
- tommath_int
+ 2.07584 (0.0850728s)
                 </p>
               </td>
 <td>
                 <p>
- 145.509 (0.344367s)
+ 1.94265 (0.133805s)
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ tommath_int
                 </p>
               </td>
 <td>
                 <p>
- 93.9055 (0.331853s)
+ 5.98286 (0.13185s)
                 </p>
               </td>
 <td>
                 <p>
- 35.0456 (0.352003s)
+ 4.65705 (0.142329s)
                 </p>
               </td>
 <td>
                 <p>
- 22.7371 (0.354275s)
+ 3.85812 (0.158115s)
                 </p>
               </td>
 <td>
                 <p>
- 19.1373 (0.561207s)
+ 4.81524 (0.331662s)
                 </p>
               </td>
 </tr>
@@ -2469,15 +2570,14 @@
 </table></div>
 </div>
 <br class="table-break"><div class="table">
-<a name="boost_multiprecision.perf.integer_performance.operator7"></a><p class="title"><b>Table&#160;1.34.&#160;Operator |</b></p>
-<div class="table-contents"><table class="table" summary="Operator |">
+<a name="boost_multiprecision.perf.integer_performance.operator_int6"></a><p class="title"><b>Table&#160;1.34.&#160;Operator |(int)</b></p>
+<div class="table-contents"><table class="table" summary="Operator |(int)">
 <colgroup>
 <col>
 <col>
 <col>
 <col>
 <col>
-<col>
 </colgroup>
 <thead><tr>
 <th>
@@ -2487,11 +2587,6 @@
               </th>
 <th>
                 <p>
- 64 Bits
- </p>
- </th>
-<th>
- <p>
                   128 Bits
                 </p>
               </th>
@@ -2515,96 +2610,108 @@
 <tr>
 <td>
                 <p>
- fixed_int
+ cpp_int
                 </p>
               </td>
 <td>
                 <p>
- <span class="bold"><strong>1</strong></span> (0.00295261s)
+ 1.40808 (0.0389721s)
                 </p>
               </td>
 <td>
                 <p>
- <span class="bold"><strong>1</strong></span> (0.00560832s)
+ 1.65035 (0.0437872s)
                 </p>
               </td>
 <td>
                 <p>
- <span class="bold"><strong>1</strong></span> (0.0127056s)
+ 1.51667 (0.0466144s)
                 </p>
               </td>
 <td>
                 <p>
- <span class="bold"><strong>1</strong></span> (0.0200759s)
+ 1.37806 (0.0582842s)
                 </p>
               </td>
+</tr>
+<tr>
 <td>
                 <p>
- <span class="bold"><strong>1</strong></span> (0.034651s)
+ cpp_int(fixed)
                 </p>
               </td>
-</tr>
-<tr>
 <td>
                 <p>
- gmp_int
+ <span class="bold"><strong>1</strong></span> (0.0276775s)
                 </p>
               </td>
 <td>
                 <p>
- 14.1091 (0.0416586s)
+ <span class="bold"><strong>1</strong></span> (0.026532s)
                 </p>
               </td>
 <td>
                 <p>
- 8.52475 (0.0478096s)
+ <span class="bold"><strong>1</strong></span> (0.0307348s)
                 </p>
               </td>
 <td>
                 <p>
- 4.74593 (0.0602998s)
+ <span class="bold"><strong>1</strong></span> (0.0422945s)
                 </p>
               </td>
+</tr>
+<tr>
 <td>
                 <p>
- 4.19694 (0.0842575s)
+ gmp_int
                 </p>
               </td>
 <td>
                 <p>
- 3.85525 (0.133588s)
+ 5.31451 (0.147092s)
                 </p>
               </td>
-</tr>
-<tr>
 <td>
                 <p>
- tommath_int
+ 5.37333 (0.142565s)
                 </p>
               </td>
 <td>
                 <p>
- 44.8889 (0.132539s)
+ 4.86508 (0.149527s)
                 </p>
               </td>
 <td>
                 <p>
- 25.2503 (0.141612s)
+ 3.74364 (0.158335s)
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ tommath_int
+ </p>
+ </td>
+<td>
+ <p>
+ 11.9312 (0.330226s)
                 </p>
               </td>
 <td>
                 <p>
- 11.0488 (0.140382s)
+ 12.943 (0.343403s)
                 </p>
               </td>
 <td>
                 <p>
- 7.39273 (0.148416s)
+ 11.4457 (0.35178s)
                 </p>
               </td>
 <td>
                 <p>
- 9.75809 (0.338127s)
+ 14.4462 (0.610997s)
                 </p>
               </td>
 </tr>
@@ -2612,15 +2719,14 @@
 </table></div>
 </div>
 <br class="table-break"><div class="table">
-<a name="boost_multiprecision.perf.integer_performance.operator_int6"></a><p class="title"><b>Table&#160;1.35.&#160;Operator |(int)</b></p>
-<div class="table-contents"><table class="table" summary="Operator |(int)">
+<a name="boost_multiprecision.perf.integer_performance.operator_gcd"></a><p class="title"><b>Table&#160;1.35.&#160;Operator gcd</b></p>
+<div class="table-contents"><table class="table" summary="Operator gcd">
 <colgroup>
 <col>
 <col>
 <col>
 <col>
 <col>
-<col>
 </colgroup>
 <thead><tr>
 <th>
@@ -2630,11 +2736,6 @@
               </th>
 <th>
                 <p>
- 64 Bits
- </p>
- </th>
-<th>
- <p>
                   128 Bits
                 </p>
               </th>
@@ -2658,32 +2759,54 @@
 <tr>
 <td>
                 <p>
- fixed_int
+ cpp_int
                 </p>
               </td>
 <td>
                 <p>
- <span class="bold"><strong>1</strong></span> (0.00244005s)
+ 1.82514 (4.45586s)
                 </p>
               </td>
 <td>
                 <p>
- <span class="bold"><strong>1</strong></span> (0.0040142s)
+ 1.75955 (10.1748s)
                 </p>
               </td>
 <td>
                 <p>
- <span class="bold"><strong>1</strong></span> (0.00983777s)
+ 1.87025 (25.23s)
                 </p>
               </td>
 <td>
                 <p>
- <span class="bold"><strong>1</strong></span> (0.0155223s)
+ 2.11453 (68.8556s)
                 </p>
               </td>
+</tr>
+<tr>
 <td>
                 <p>
- <span class="bold"><strong>1</strong></span> (0.0293444s)
+ cpp_int(fixed)
+ </p>
+ </td>
+<td>
+ <p>
+ 1.57965 (3.85654s)
+ </p>
+ </td>
+<td>
+ <p>
+ 1.67404 (9.68027s)
+ </p>
+ </td>
+<td>
+ <p>
+ 1.8405 (24.8287s)
+ </p>
+ </td>
+<td>
+ <p>
+ 2.27588 (74.1096s)
                 </p>
               </td>
 </tr>
@@ -2695,59 +2818,198 @@
               </td>
 <td>
                 <p>
- 64.6148 (0.157663s)
+ <span class="bold"><strong>1</strong></span> (2.44138s)
                 </p>
               </td>
 <td>
                 <p>
- 34.5827 (0.138822s)
+ <span class="bold"><strong>1</strong></span> (5.78259s)
                 </p>
               </td>
 <td>
                 <p>
- 14.2764 (0.140448s)
+ <span class="bold"><strong>1</strong></span> (13.4902s)
                 </p>
               </td>
 <td>
                 <p>
- 10.3248 (0.160264s)
+ <span class="bold"><strong>1</strong></span> (32.5631s)
                 </p>
               </td>
+</tr>
+<tr>
 <td>
                 <p>
- 5.33565 (0.156572s)
+ tommath_int
+ </p>
+ </td>
+<td>
+ <p>
+ 5.01357 (12.24s)
+ </p>
+ </td>
+<td>
+ <p>
+ 4.38161 (25.337s)
+ </p>
+ </td>
+<td>
+ <p>
+ 4.08681 (55.1319s)
+ </p>
+ </td>
+<td>
+ <p>
+ 4.01045 (130.593s)
                 </p>
               </td>
 </tr>
+</tbody>
+</table></div>
+</div>
+<br class="table-break"><div class="table">
+<a name="boost_multiprecision.perf.integer_performance.operator_str"></a><p class="title"><b>Table&#160;1.36.&#160;Operator str</b></p>
+<div class="table-contents"><table class="table" summary="Operator str">
+<colgroup>
+<col>
+<col>
+<col>
+<col>
+<col>
+</colgroup>
+<thead><tr>
+<th>
+ <p>
+ Backend
+ </p>
+ </th>
+<th>
+ <p>
+ 128 Bits
+ </p>
+ </th>
+<th>
+ <p>
+ 256 Bits
+ </p>
+ </th>
+<th>
+ <p>
+ 512 Bits
+ </p>
+ </th>
+<th>
+ <p>
+ 1024 Bits
+ </p>
+ </th>
+</tr></thead>
+<tbody>
 <tr>
 <td>
                 <p>
- tommath_int
+ cpp_int
+ </p>
+ </td>
+<td>
+ <p>
+ 1.46421 (0.00195137s)
+ </p>
+ </td>
+<td>
+ <p>
+ 1.21669 (0.00319216s)
+ </p>
+ </td>
+<td>
+ <p>
+ 1.25041 (0.00765237s)
+ </p>
+ </td>
+<td>
+ <p>
+ 1.53339 (0.0218096s)
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ cpp_int(fixed)
                 </p>
               </td>
 <td>
                 <p>
- 137.825 (0.3363s)
+ <span class="bold"><strong>1</strong></span> (0.00133271s)
+ </p>
+ </td>
+<td>
+ <p>
+ <span class="bold"><strong>1</strong></span> (0.00262366s)
+ </p>
+ </td>
+<td>
+ <p>
+ 1.0109 (0.00618661s)
+ </p>
+ </td>
+<td>
+ <p>
+ 1.24429 (0.0176978s)
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ gmp_int
+ </p>
+ </td>
+<td>
+ <p>
+ 1.7777 (0.00236916s)
+ </p>
+ </td>
+<td>
+ <p>
+ 1.27408 (0.00334274s)
+ </p>
+ </td>
+<td>
+ <p>
+ <span class="bold"><strong>1</strong></span> (0.00611991s)
+ </p>
+ </td>
+<td>
+ <p>
+ <span class="bold"><strong>1</strong></span> (0.0142232s)
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ tommath_int
                 </p>
               </td>
 <td>
                 <p>
- 81.1074 (0.325581s)
+ 11.9797 (0.0159654s)
                 </p>
               </td>
 <td>
                 <p>
- 34.8737 (0.343079s)
+ 18.3349 (0.0481046s)
                 </p>
               </td>
 <td>
                 <p>
- 22.3727 (0.347276s)
+ 18.3681 (0.112411s)
                 </p>
               </td>
 <td>
                 <p>
- 18.912 (0.554963s)
+ 25.0355 (0.356085s)
                 </p>
               </td>
 </tr>
@@ -2766,7 +3028,7 @@
 </tr></table>
 <hr>
 <div class="spirit-nav">
-<a accesskey="p" href="float_performance.html"><img src="../../images/prev.png" alt="Prev"></a><a accesskey="u" href="../perf.html"><img src="../../images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../images/home.png" alt="Home"></a><a accesskey="n" href="../map.html"><img src="../../images/next.png" alt="Next"></a>
+<a accesskey="p" href="float_performance.html"><img src="../../images/prev.png" alt="Prev"></a><a accesskey="u" href="../perf.html"><img src="../../images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../images/home.png" alt="Home"></a><a accesskey="n" href="rational_performance.html"><img src="../../images/next.png" alt="Next"></a>
 </div>
 </body>
 </html>

Added: sandbox/big_number/libs/multiprecision/doc/html/boost_multiprecision/perf/rational_performance.html
==============================================================================
--- (empty file)
+++ sandbox/big_number/libs/multiprecision/doc/html/boost_multiprecision/perf/rational_performance.html 2012-03-21 05:19:57 EDT (Wed, 21 Mar 2012)
@@ -0,0 +1,905 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
+<title>Rational Type Perfomance</title>
+<link rel="stylesheet" href="http://www.boost.org/doc/libs/release/doc/src/boostbook.css" type="text/css">
+<meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
+<link rel="home" href="../../index.html" title="Chapter&#160;1.&#160;Boost.Multiprecision">
+<link rel="up" href="../perf.html" title="Performance Comparison">
+<link rel="prev" href="integer_performance.html" title="Integer Algorithm Perfomance">
+<link rel="next" href="../map.html" title="Roadmap">
+</head>
+<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+<div class="spirit-nav">
+<a accesskey="p" href="integer_performance.html"><img src="../../images/prev.png" alt="Prev"></a><a accesskey="u" href="../perf.html"><img src="../../images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../images/home.png" alt="Home"></a><a accesskey="n" href="../map.html"><img src="../../images/next.png" alt="Next"></a>
+</div>
+<div class="section boost_multiprecision_perf_rational_performance">
+<div class="titlepage"><div><div><h3 class="title">
+<a name="boost_multiprecision.perf.rational_performance"></a><a class="link" href="rational_performance.html" title="Rational Type Perfomance">Rational
+ Type Perfomance</a>
+</h3></div></div></div>
+<p>
+ Note that these tests are carefully designed to test performance of the underlying
+ algorithms and not memory allocation or variable copying. As usual, performance
+ results should be taken with a healthy dose of scepticsm, and real-world
+ peformance may vary widely depending upon the specifics of the program. In
+ each table relative times are given first, with the best performer given
+ a score of 1. Total actual times are given in brackets, measured in seconds
+ for 500000 operations.
+ </p>
+<p>
+ Test code was compiled with Microsoft Visual Studio 2010 with all optimisations
+ turned on (/Ox), and used MPIR-2.3.0 and MPFR-3.0.0.
+ The tests were run on 32-bit Windows Vista machine.
+ </p>
+<div class="table">
+<a name="boost_multiprecision.perf.rational_performance.operator__"></a><p class="title"><b>Table&#160;1.37.&#160;Operator +</b></p>
+<div class="table-contents"><table class="table" summary="Operator +">
+<colgroup>
+<col>
+<col>
+<col>
+<col>
+<col>
+</colgroup>
+<thead><tr>
+<th>
+ <p>
+ Backend
+ </p>
+ </th>
+<th>
+ <p>
+ 128 Bits
+ </p>
+ </th>
+<th>
+ <p>
+ 256 Bits
+ </p>
+ </th>
+<th>
+ <p>
+ 512 Bits
+ </p>
+ </th>
+<th>
+ <p>
+ 1024 Bits
+ </p>
+ </th>
+</tr></thead>
+<tbody>
+<tr>
+<td>
+ <p>
+ cpp_rational
+ </p>
+ </td>
+<td>
+ <p>
+ 5.91758 (18.1263s)
+ </p>
+ </td>
+<td>
+ <p>
+ 6.60754 (44.1182s)
+ </p>
+ </td>
+<td>
+ <p>
+ 6.65334 (103.169s)
+ </p>
+ </td>
+<td>
+ <p>
+ 6.44717 (244.055s)
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ mpq_rational
+ </p>
+ </td>
+<td>
+ <p>
+ <span class="bold"><strong>1</strong></span> (3.06312s)
+ </p>
+ </td>
+<td>
+ <p>
+ <span class="bold"><strong>1</strong></span> (6.67695s)
+ </p>
+ </td>
+<td>
+ <p>
+ <span class="bold"><strong>1</strong></span> (15.5064s)
+ </p>
+ </td>
+<td>
+ <p>
+ <span class="bold"><strong>1</strong></span> (37.8546s)
+ </p>
+ </td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<br class="table-break"><div class="table">
+<a name="boost_multiprecision.perf.rational_performance.operator___int_"></a><p class="title"><b>Table&#160;1.38.&#160;Operator +(int)</b></p>
+<div class="table-contents"><table class="table" summary="Operator +(int)">
+<colgroup>
+<col>
+<col>
+<col>
+<col>
+<col>
+</colgroup>
+<thead><tr>
+<th>
+ <p>
+ Backend
+ </p>
+ </th>
+<th>
+ <p>
+ 128 Bits
+ </p>
+ </th>
+<th>
+ <p>
+ 256 Bits
+ </p>
+ </th>
+<th>
+ <p>
+ 512 Bits
+ </p>
+ </th>
+<th>
+ <p>
+ 1024 Bits
+ </p>
+ </th>
+</tr></thead>
+<tbody>
+<tr>
+<td>
+ <p>
+ cpp_rational
+ </p>
+ </td>
+<td>
+ <p>
+ 3.98512 (2.67249s)
+ </p>
+ </td>
+<td>
+ <p>
+ 4.24335 (3.04309s)
+ </p>
+ </td>
+<td>
+ <p>
+ 4.65009 (3.83046s)
+ </p>
+ </td>
+<td>
+ <p>
+ 5.45832 (5.08346s)
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ mpq_rational
+ </p>
+ </td>
+<td>
+ <p>
+ <span class="bold"><strong>1</strong></span> (0.670618s)
+ </p>
+ </td>
+<td>
+ <p>
+ <span class="bold"><strong>1</strong></span> (0.717144s)
+ </p>
+ </td>
+<td>
+ <p>
+ <span class="bold"><strong>1</strong></span> (0.823739s)
+ </p>
+ </td>
+<td>
+ <p>
+ <span class="bold"><strong>1</strong></span> (0.931322s)
+ </p>
+ </td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<br class="table-break"><div class="table">
+<a name="boost_multiprecision.perf.rational_performance.operator0"></a><p class="title"><b>Table&#160;1.39.&#160;Operator -</b></p>
+<div class="table-contents"><table class="table" summary="Operator -">
+<colgroup>
+<col>
+<col>
+<col>
+<col>
+<col>
+</colgroup>
+<thead><tr>
+<th>
+ <p>
+ Backend
+ </p>
+ </th>
+<th>
+ <p>
+ 128 Bits
+ </p>
+ </th>
+<th>
+ <p>
+ 256 Bits
+ </p>
+ </th>
+<th>
+ <p>
+ 512 Bits
+ </p>
+ </th>
+<th>
+ <p>
+ 1024 Bits
+ </p>
+ </th>
+</tr></thead>
+<tbody>
+<tr>
+<td>
+ <p>
+ cpp_rational
+ </p>
+ </td>
+<td>
+ <p>
+ 5.91504 (18.2374s)
+ </p>
+ </td>
+<td>
+ <p>
+ 6.55676 (43.8659s)
+ </p>
+ </td>
+<td>
+ <p>
+ 6.66239 (103.481s)
+ </p>
+ </td>
+<td>
+ <p>
+ 6.47224 (244.887s)
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ mpq_rational
+ </p>
+ </td>
+<td>
+ <p>
+ <span class="bold"><strong>1</strong></span> (3.08322s)
+ </p>
+ </td>
+<td>
+ <p>
+ <span class="bold"><strong>1</strong></span> (6.69018s)
+ </p>
+ </td>
+<td>
+ <p>
+ <span class="bold"><strong>1</strong></span> (15.5321s)
+ </p>
+ </td>
+<td>
+ <p>
+ <span class="bold"><strong>1</strong></span> (37.8365s)
+ </p>
+ </td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<br class="table-break"><div class="table">
+<a name="boost_multiprecision.perf.rational_performance.operator_int0"></a><p class="title"><b>Table&#160;1.40.&#160;Operator -(int)</b></p>
+<div class="table-contents"><table class="table" summary="Operator -(int)">
+<colgroup>
+<col>
+<col>
+<col>
+<col>
+<col>
+</colgroup>
+<thead><tr>
+<th>
+ <p>
+ Backend
+ </p>
+ </th>
+<th>
+ <p>
+ 128 Bits
+ </p>
+ </th>
+<th>
+ <p>
+ 256 Bits
+ </p>
+ </th>
+<th>
+ <p>
+ 512 Bits
+ </p>
+ </th>
+<th>
+ <p>
+ 1024 Bits
+ </p>
+ </th>
+</tr></thead>
+<tbody>
+<tr>
+<td>
+ <p>
+ cpp_rational
+ </p>
+ </td>
+<td>
+ <p>
+ 3.96173 (2.66785s)
+ </p>
+ </td>
+<td>
+ <p>
+ 4.36532 (3.09023s)
+ </p>
+ </td>
+<td>
+ <p>
+ 4.59363 (3.74494s)
+ </p>
+ </td>
+<td>
+ <p>
+ 5.43075 (5.09156s)
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ mpq_rational
+ </p>
+ </td>
+<td>
+ <p>
+ <span class="bold"><strong>1</strong></span> (0.673405s)
+ </p>
+ </td>
+<td>
+ <p>
+ <span class="bold"><strong>1</strong></span> (0.707904s)
+ </p>
+ </td>
+<td>
+ <p>
+ <span class="bold"><strong>1</strong></span> (0.815246s)
+ </p>
+ </td>
+<td>
+ <p>
+ <span class="bold"><strong>1</strong></span> (0.937541s)
+ </p>
+ </td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<br class="table-break"><div class="table">
+<a name="boost_multiprecision.perf.rational_performance.operator1"></a><p class="title"><b>Table&#160;1.41.&#160;Operator *</b></p>
+<div class="table-contents"><table class="table" summary="Operator *">
+<colgroup>
+<col>
+<col>
+<col>
+<col>
+<col>
+</colgroup>
+<thead><tr>
+<th>
+ <p>
+ Backend
+ </p>
+ </th>
+<th>
+ <p>
+ 128 Bits
+ </p>
+ </th>
+<th>
+ <p>
+ 256 Bits
+ </p>
+ </th>
+<th>
+ <p>
+ 512 Bits
+ </p>
+ </th>
+<th>
+ <p>
+ 1024 Bits
+ </p>
+ </th>
+</tr></thead>
+<tbody>
+<tr>
+<td>
+ <p>
+ cpp_rational
+ </p>
+ </td>
+<td>
+ <p>
+ 5.59286 (32.3559s)
+ </p>
+ </td>
+<td>
+ <p>
+ 6.54125 (82.4247s)
+ </p>
+ </td>
+<td>
+ <p>
+ 6.8815 (197.198s)
+ </p>
+ </td>
+<td>
+ <p>
+ 6.84066 (473.057s)
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ mpq_rational
+ </p>
+ </td>
+<td>
+ <p>
+ <span class="bold"><strong>1</strong></span> (5.78521s)
+ </p>
+ </td>
+<td>
+ <p>
+ <span class="bold"><strong>1</strong></span> (12.6008s)
+ </p>
+ </td>
+<td>
+ <p>
+ <span class="bold"><strong>1</strong></span> (28.6562s)
+ </p>
+ </td>
+<td>
+ <p>
+ <span class="bold"><strong>1</strong></span> (69.1537s)
+ </p>
+ </td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<br class="table-break"><div class="table">
+<a name="boost_multiprecision.perf.rational_performance.operator_int1"></a><p class="title"><b>Table&#160;1.42.&#160;Operator *(int)</b></p>
+<div class="table-contents"><table class="table" summary="Operator *(int)">
+<colgroup>
+<col>
+<col>
+<col>
+<col>
+<col>
+</colgroup>
+<thead><tr>
+<th>
+ <p>
+ Backend
+ </p>
+ </th>
+<th>
+ <p>
+ 128 Bits
+ </p>
+ </th>
+<th>
+ <p>
+ 256 Bits
+ </p>
+ </th>
+<th>
+ <p>
+ 512 Bits
+ </p>
+ </th>
+<th>
+ <p>
+ 1024 Bits
+ </p>
+ </th>
+</tr></thead>
+<tbody>
+<tr>
+<td>
+ <p>
+ cpp_rational
+ </p>
+ </td>
+<td>
+ <p>
+ 2.70193 (3.1466s)
+ </p>
+ </td>
+<td>
+ <p>
+ 3.10134 (3.79056s)
+ </p>
+ </td>
+<td>
+ <p>
+ 3.659 (4.93935s)
+ </p>
+ </td>
+<td>
+ <p>
+ 4.61372 (6.89845s)
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ mpq_rational
+ </p>
+ </td>
+<td>
+ <p>
+ <span class="bold"><strong>1</strong></span> (1.16457s)
+ </p>
+ </td>
+<td>
+ <p>
+ <span class="bold"><strong>1</strong></span> (1.22223s)
+ </p>
+ </td>
+<td>
+ <p>
+ <span class="bold"><strong>1</strong></span> (1.34992s)
+ </p>
+ </td>
+<td>
+ <p>
+ <span class="bold"><strong>1</strong></span> (1.4952s)
+ </p>
+ </td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<br class="table-break"><div class="table">
+<a name="boost_multiprecision.perf.rational_performance.operator2"></a><p class="title"><b>Table&#160;1.43.&#160;Operator /</b></p>
+<div class="table-contents"><table class="table" summary="Operator /">
+<colgroup>
+<col>
+<col>
+<col>
+<col>
+<col>
+</colgroup>
+<thead><tr>
+<th>
+ <p>
+ Backend
+ </p>
+ </th>
+<th>
+ <p>
+ 128 Bits
+ </p>
+ </th>
+<th>
+ <p>
+ 256 Bits
+ </p>
+ </th>
+<th>
+ <p>
+ 512 Bits
+ </p>
+ </th>
+<th>
+ <p>
+ 1024 Bits
+ </p>
+ </th>
+</tr></thead>
+<tbody>
+<tr>
+<td>
+ <p>
+ cpp_rational
+ </p>
+ </td>
+<td>
+ <p>
+ 4.36846 (63.9498s)
+ </p>
+ </td>
+<td>
+ <p>
+ 5.52565 (145.045s)
+ </p>
+ </td>
+<td>
+ <p>
+ 6.18331 (328.069s)
+ </p>
+ </td>
+<td>
+ <p>
+ 6.49822 (784.806s)
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ mpq_rational
+ </p>
+ </td>
+<td>
+ <p>
+ <span class="bold"><strong>1</strong></span> (14.639s)
+ </p>
+ </td>
+<td>
+ <p>
+ <span class="bold"><strong>1</strong></span> (26.2494s)
+ </p>
+ </td>
+<td>
+ <p>
+ <span class="bold"><strong>1</strong></span> (53.0571s)
+ </p>
+ </td>
+<td>
+ <p>
+ <span class="bold"><strong>1</strong></span> (120.772s)
+ </p>
+ </td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<br class="table-break"><div class="table">
+<a name="boost_multiprecision.perf.rational_performance.operator_int2"></a><p class="title"><b>Table&#160;1.44.&#160;Operator /(int)</b></p>
+<div class="table-contents"><table class="table" summary="Operator /(int)">
+<colgroup>
+<col>
+<col>
+<col>
+<col>
+<col>
+</colgroup>
+<thead><tr>
+<th>
+ <p>
+ Backend
+ </p>
+ </th>
+<th>
+ <p>
+ 128 Bits
+ </p>
+ </th>
+<th>
+ <p>
+ 256 Bits
+ </p>
+ </th>
+<th>
+ <p>
+ 512 Bits
+ </p>
+ </th>
+<th>
+ <p>
+ 1024 Bits
+ </p>
+ </th>
+</tr></thead>
+<tbody>
+<tr>
+<td>
+ <p>
+ cpp_rational
+ </p>
+ </td>
+<td>
+ <p>
+ 2.26643 (3.13785s)
+ </p>
+ </td>
+<td>
+ <p>
+ 2.57125 (3.76931s)
+ </p>
+ </td>
+<td>
+ <p>
+ 3.20872 (5.06758s)
+ </p>
+ </td>
+<td>
+ <p>
+ 4.02177 (7.17803s)
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ mpq_rational
+ </p>
+ </td>
+<td>
+ <p>
+ <span class="bold"><strong>1</strong></span> (1.38449s)
+ </p>
+ </td>
+<td>
+ <p>
+ <span class="bold"><strong>1</strong></span> (1.46594s)
+ </p>
+ </td>
+<td>
+ <p>
+ <span class="bold"><strong>1</strong></span> (1.57931s)
+ </p>
+ </td>
+<td>
+ <p>
+ <span class="bold"><strong>1</strong></span> (1.78479s)
+ </p>
+ </td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<br class="table-break"><div class="table">
+<a name="boost_multiprecision.perf.rational_performance.operator_str"></a><p class="title"><b>Table&#160;1.45.&#160;Operator str</b></p>
+<div class="table-contents"><table class="table" summary="Operator str">
+<colgroup>
+<col>
+<col>
+<col>
+<col>
+<col>
+</colgroup>
+<thead><tr>
+<th>
+ <p>
+ Backend
+ </p>
+ </th>
+<th>
+ <p>
+ 128 Bits
+ </p>
+ </th>
+<th>
+ <p>
+ 256 Bits
+ </p>
+ </th>
+<th>
+ <p>
+ 512 Bits
+ </p>
+ </th>
+<th>
+ <p>
+ 1024 Bits
+ </p>
+ </th>
+</tr></thead>
+<tbody>
+<tr>
+<td>
+ <p>
+ cpp_rational
+ </p>
+ </td>
+<td>
+ <p>
+ 5.40493 (0.0199393s)
+ </p>
+ </td>
+<td>
+ <p>
+ 8.55089 (0.0511907s)
+ </p>
+ </td>
+<td>
+ <p>
+ 9.91026 (0.118839s)
+ </p>
+ </td>
+<td>
+ <p>
+ 9.93546 (0.285367s)
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ mpq_rational
+ </p>
+ </td>
+<td>
+ <p>
+ <span class="bold"><strong>1</strong></span> (0.00368909s)
+ </p>
+ </td>
+<td>
+ <p>
+ <span class="bold"><strong>1</strong></span> (0.00598659s)
+ </p>
+ </td>
+<td>
+ <p>
+ <span class="bold"><strong>1</strong></span> (0.0119915s)
+ </p>
+ </td>
+<td>
+ <p>
+ <span class="bold"><strong>1</strong></span> (0.028722s)
+ </p>
+ </td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<br class="table-break">
+</div>
+<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
+<td align="left"></td>
+<td align="right"><div class="copyright-footer">Copyright &#169; 2011 John Maddock<p>
+ Distributed under the Boost Software License, Version 1.0. (See accompanying
+ file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+ </p>
+</div></td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="integer_performance.html"><img src="../../images/prev.png" alt="Prev"></a><a accesskey="u" href="../perf.html"><img src="../../images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../images/home.png" alt="Home"></a><a accesskey="n" href="../map.html"><img src="../../images/next.png" alt="Next"></a>
+</div>
+</body>
+</html>

Modified: sandbox/big_number/libs/multiprecision/doc/html/boost_multiprecision/perf/realworld.html
==============================================================================
--- sandbox/big_number/libs/multiprecision/doc/html/boost_multiprecision/perf/realworld.html (original)
+++ sandbox/big_number/libs/multiprecision/doc/html/boost_multiprecision/perf/realworld.html 2012-03-21 05:19:57 EDT (Wed, 21 Mar 2012)
@@ -1,21 +1,22 @@
 <html>
 <head>
 <meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
-<title>Real World Tests</title>
+<title>Floating Point Real World Tests</title>
 <link rel="stylesheet" href="http://www.boost.org/doc/libs/release/doc/src/boostbook.css" type="text/css">
 <meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
 <link rel="home" href="../../index.html" title="Chapter&#160;1.&#160;Boost.Multiprecision">
 <link rel="up" href="../perf.html" title="Performance Comparison">
 <link rel="prev" href="../perf.html" title="Performance Comparison">
-<link rel="next" href="float_performance.html" title="Float Algorithm Perfomance">
+<link rel="next" href="int_real_world.html" title="Integer Real World Tests">
 </head>
 <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
 <div class="spirit-nav">
-<a accesskey="p" href="../perf.html"><img src="../../images/prev.png" alt="Prev"></a><a accesskey="u" href="../perf.html"><img src="../../images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../images/home.png" alt="Home"></a><a accesskey="n" href="float_performance.html"><img src="../../images/next.png" alt="Next"></a>
+<a accesskey="p" href="../perf.html"><img src="../../images/prev.png" alt="Prev"></a><a accesskey="u" href="../perf.html"><img src="../../images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../images/home.png" alt="Home"></a><a accesskey="n" href="int_real_world.html"><img src="../../images/next.png" alt="Next"></a>
 </div>
 <div class="section boost_multiprecision_perf_realworld">
 <div class="titlepage"><div><div><h3 class="title">
-<a name="boost_multiprecision.perf.realworld"></a><a class="link" href="realworld.html" title="Real World Tests">Real World Tests</a>
+<a name="boost_multiprecision.perf.realworld"></a><a class="link" href="realworld.html" title="Floating Point Real World Tests">Floating Point Real
+ World Tests</a>
 </h3></div></div></div>
 <p>
         These tests test the total time taken to execute all of Boost.Math's test
@@ -271,7 +272,7 @@
 </tr></table>
 <hr>
 <div class="spirit-nav">
-<a accesskey="p" href="../perf.html"><img src="../../images/prev.png" alt="Prev"></a><a accesskey="u" href="../perf.html"><img src="../../images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../images/home.png" alt="Home"></a><a accesskey="n" href="float_performance.html"><img src="../../images/next.png" alt="Next"></a>
+<a accesskey="p" href="../perf.html"><img src="../../images/prev.png" alt="Prev"></a><a accesskey="u" href="../perf.html"><img src="../../images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../images/home.png" alt="Home"></a><a accesskey="n" href="int_real_world.html"><img src="../../images/next.png" alt="Next"></a>
 </div>
 </body>
 </html>

Modified: sandbox/big_number/libs/multiprecision/doc/html/boost_multiprecision/tut/ints.html
==============================================================================
--- sandbox/big_number/libs/multiprecision/doc/html/boost_multiprecision/tut/ints.html (original)
+++ sandbox/big_number/libs/multiprecision/doc/html/boost_multiprecision/tut/ints.html 2012-03-21 05:19:57 EDT (Wed, 21 Mar 2012)
@@ -113,7 +113,7 @@
               </td>
 <td>
                 <p>
- libtommath
+ libtommath
                 </p>
               </td>
 <td>
@@ -271,16 +271,17 @@
 <p>
         The <code class="computeroutput"><span class="identifier">tommath_int</span></code> backend is
         used via the typedef <code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">multiprecision</span><span class="special">::</span><span class="identifier">mp_int</span></code>.
- It acts as a thin wrapper around the libtommath <code class="computeroutput"><span class="identifier">mp_int</span></code>
- to provide an integer type that is a drop-in replacement for the native C++
- integer types, but with unlimited precision.
+ It acts as a thin wrapper around the libtommath
+ <code class="computeroutput"><span class="identifier">mp_int</span></code> to provide an integer
+ type that is a drop-in replacement for the native C++ integer types, but
+ with unlimited precision.
       </p>
 <p>
         Things you should know when using this type:
       </p>
 <div class="itemizedlist"><ul class="itemizedlist" type="disc">
 <li class="listitem">
- Default constructed objects have the value zero (this is libtommath's
+ Default constructed objects have the value zero (this is libtommath's
             default behavior).
           </li>
 <li class="listitem">
@@ -300,7 +301,7 @@
             will be thrown.
           </li>
 <li class="listitem">
- Division by zero will result in a hardware signal being raised by libtommath.
+ Division by zero will result in a hardware signal being raised by libtommath.
           </li>
 </ul></div>
 <h6>
@@ -359,11 +360,13 @@
 <span class="keyword">typedef</span> <span class="identifier">mp_number</span><span class="special">&lt;</span><span class="identifier">cpp_int_backend</span><span class="special">&lt;</span><span class="number">128</span><span class="special">,</span> <span class="keyword">false</span><span class="special">,</span> <span class="keyword">void</span><span class="special">&gt;</span> <span class="special">&gt;</span> <span class="identifier">mp_uint128_t</span><span class="special">;</span>
 <span class="keyword">typedef</span> <span class="identifier">mp_number</span><span class="special">&lt;</span><span class="identifier">cpp_int_backend</span><span class="special">&lt;</span><span class="number">256</span><span class="special">,</span> <span class="keyword">false</span><span class="special">,</span> <span class="keyword">void</span><span class="special">&gt;</span> <span class="special">&gt;</span> <span class="identifier">mp_uint256_t</span><span class="special">;</span>
 <span class="keyword">typedef</span> <span class="identifier">mp_number</span><span class="special">&lt;</span><span class="identifier">cpp_int_backend</span><span class="special">&lt;</span><span class="number">512</span><span class="special">,</span> <span class="keyword">false</span><span class="special">,</span> <span class="keyword">void</span><span class="special">&gt;</span> <span class="special">&gt;</span> <span class="identifier">mp_uint512_t</span><span class="special">;</span>
+<span class="keyword">typedef</span> <span class="identifier">mp_number</span><span class="special">&lt;</span><span class="identifier">cpp_int_backend</span><span class="special">&lt;</span><span class="number">1024</span><span class="special">,</span> <span class="keyword">false</span><span class="special">,</span> <span class="keyword">void</span><span class="special">&gt;</span> <span class="special">&gt;</span> <span class="identifier">mp_uint1024_t</span><span class="special">;</span>
 
 <span class="comment">// Fixed precision signed types:</span>
 <span class="keyword">typedef</span> <span class="identifier">mp_number</span><span class="special">&lt;</span><span class="identifier">cpp_int_backend</span><span class="special">&lt;</span><span class="number">128</span><span class="special">,</span> <span class="keyword">true</span><span class="special">,</span> <span class="keyword">void</span><span class="special">&gt;</span> <span class="special">&gt;</span> <span class="identifier">mp_int128_t</span><span class="special">;</span>
 <span class="keyword">typedef</span> <span class="identifier">mp_number</span><span class="special">&lt;</span><span class="identifier">cpp_int_backend</span><span class="special">&lt;</span><span class="number">256</span><span class="special">,</span> <span class="keyword">true</span><span class="special">,</span> <span class="keyword">void</span><span class="special">&gt;</span> <span class="special">&gt;</span> <span class="identifier">mp_int256_t</span><span class="special">;</span>
 <span class="keyword">typedef</span> <span class="identifier">mp_number</span><span class="special">&lt;</span><span class="identifier">cpp_int_backend</span><span class="special">&lt;</span><span class="number">512</span><span class="special">,</span> <span class="keyword">true</span><span class="special">,</span> <span class="keyword">void</span><span class="special">&gt;</span> <span class="special">&gt;</span> <span class="identifier">mp_int512_t</span><span class="special">;</span>
+<span class="keyword">typedef</span> <span class="identifier">mp_number</span><span class="special">&lt;</span><span class="identifier">cpp_int_backend</span><span class="special">&lt;</span><span class="number">1024</span><span class="special">,</span> <span class="keyword">true</span><span class="special">,</span> <span class="keyword">void</span><span class="special">&gt;</span> <span class="special">&gt;</span> <span class="identifier">mp_int1024_t</span><span class="special">;</span>
 
 <span class="special">}}</span> <span class="comment">// namespaces</span>
 </pre>

Added: sandbox/big_number/libs/multiprecision/doc/html/boost_multiprecision/tut/primetest.html
==============================================================================
--- (empty file)
+++ sandbox/big_number/libs/multiprecision/doc/html/boost_multiprecision/tut/primetest.html 2012-03-21 05:19:57 EDT (Wed, 21 Mar 2012)
@@ -0,0 +1,107 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
+<title>Primality Testing</title>
+<link rel="stylesheet" href="http://www.boost.org/doc/libs/release/doc/src/boostbook.css" type="text/css">
+<meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
+<link rel="home" href="../../index.html" title="Chapter&#160;1.&#160;Boost.Multiprecision">
+<link rel="up" href="../tut.html" title="Tutorial">
+<link rel="prev" href="random.html" title="Generating Random Numbers">
+<link rel="next" href="../ref.html" title="Reference">
+</head>
+<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+<div class="spirit-nav">
+<a accesskey="p" href="random.html"><img src="../../images/prev.png" alt="Prev"></a><a accesskey="u" href="../tut.html"><img src="../../images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../images/home.png" alt="Home"></a><a accesskey="n" href="../ref.html"><img src="../../images/next.png" alt="Next"></a>
+</div>
+<div class="section boost_multiprecision_tut_primetest">
+<div class="titlepage"><div><div><h3 class="title">
+<a name="boost_multiprecision.tut.primetest"></a><a class="link" href="primetest.html" title="Primality Testing">Primality Testing</a>
+</h3></div></div></div>
+<p>
+ The library implements a fairly basic (meaning unoptimized, and possibly
+ slow) Miller-Rabin test for primality:
+ </p>
+<pre class="programlisting"><span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">multiprecision</span><span class="special">/</span><span class="identifier">miller_rabin</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span>
+
+<span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">Backend</span><span class="special">,</span> <span class="keyword">bool</span> <span class="identifier">ExpressionTemplates</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Engine</span><span class="special">&gt;</span>
+<span class="keyword">bool</span> <span class="identifier">miller_rabin_test</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">mp_number</span><span class="special">&lt;</span><span class="identifier">Backend</span><span class="special">,</span> <span class="identifier">ExpressionTemplates</span><span class="special">&gt;&amp;</span> <span class="identifier">n</span><span class="special">,</span> <span class="keyword">unsigned</span> <span class="identifier">trials</span><span class="special">,</span> <span class="identifier">Engine</span><span class="special">&amp;</span> <span class="identifier">gen</span><span class="special">);</span>
+
+<span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">Backend</span><span class="special">,</span> <span class="keyword">bool</span> <span class="identifier">ExpressionTemplates</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Engine</span><span class="special">&gt;</span>
+<span class="keyword">bool</span> <span class="identifier">miller_rabin_test</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">mp_number</span><span class="special">&lt;</span><span class="identifier">Backend</span><span class="special">,</span> <span class="identifier">ExpressionTemplates</span><span class="special">&gt;&amp;</span> <span class="identifier">n</span><span class="special">,</span> <span class="keyword">unsigned</span> <span class="identifier">trials</span><span class="special">);</span>
+</pre>
+<p>
+ These functions perform a Miller-Rabin test for primality, if the result
+ is <code class="computeroutput"><span class="keyword">false</span></code> then <span class="emphasis"><em>n</em></span>
+ is definitely composite, while if the result is <code class="computeroutput"><span class="keyword">true</span></code>
+ then <span class="emphasis"><em>n</em></span> is prime with probability 0.25^trials. The algorithm
+ used is straight out of Knuth Vol 2, which recomends 25 trials for a pretty
+ strong likelyhood that <span class="emphasis"><em>n</em></span> is prime.
+ </p>
+<p>
+ The third optional argument is for a Uniform Random Number Generator from
+ Boost.Random. When not provided the <code class="computeroutput"><span class="identifier">mt19937</span></code>
+ generator is used. Note that when producing random primes then you should
+ probably use a different random number generator to produce possible primes,
+ than used internally for testing whether the value is prime. It also helps
+ of course to seed the generators with some source of randomness.
+ </p>
+<p>
+ The following example searches for a prime <code class="computeroutput"><span class="identifier">p</span></code>
+ for which <code class="computeroutput"><span class="special">(</span><span class="identifier">p</span><span class="special">-</span><span class="number">1</span><span class="special">)/</span><span class="number">2</span></code> is also probably prime:
+ </p>
+<p>
+</p>
+<pre class="programlisting"><span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">multiprecision</span><span class="special">/</span><span class="identifier">cpp_int</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span>
+<span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">multiprecision</span><span class="special">/</span><span class="identifier">miller_rabin</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span>
+<span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">iostream</span><span class="special">&gt;</span>
+<span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">iomanip</span><span class="special">&gt;</span>
+
+<span class="keyword">int</span> <span class="identifier">main</span><span class="special">()</span>
+<span class="special">{</span>
+ <span class="keyword">using</span> <span class="keyword">namespace</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">random</span><span class="special">;</span>
+ <span class="keyword">using</span> <span class="keyword">namespace</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">multiprecision</span><span class="special">;</span>
+
+ <span class="keyword">typedef</span> <span class="identifier">cpp_int</span> <span class="identifier">int_type</span><span class="special">;</span>
+ <span class="identifier">mt11213b</span> <span class="identifier">base_gen</span><span class="special">(</span><span class="identifier">clock</span><span class="special">());</span>
+ <span class="identifier">independent_bits_engine</span><span class="special">&lt;</span><span class="identifier">mt11213b</span><span class="special">,</span> <span class="number">256</span><span class="special">,</span> <span class="identifier">int_type</span><span class="special">&gt;</span> <span class="identifier">gen</span><span class="special">(</span><span class="identifier">base_gen</span><span class="special">);</span>
+ <span class="comment">//</span>
+ <span class="comment">// We must use a different generator for the tests and number generation, otherwise</span>
+ <span class="comment">// we get false positives.</span>
+ <span class="comment">//</span>
+ <span class="identifier">mt19937</span> <span class="identifier">gen2</span><span class="special">(</span><span class="identifier">clock</span><span class="special">());</span>
+
+ <span class="keyword">for</span><span class="special">(</span><span class="keyword">unsigned</span> <span class="identifier">i</span> <span class="special">=</span> <span class="number">0</span><span class="special">;</span> <span class="identifier">i</span> <span class="special">&lt;</span> <span class="number">100000</span><span class="special">;</span> <span class="special">++</span><span class="identifier">i</span><span class="special">)</span>
+ <span class="special">{</span>
+ <span class="identifier">int_type</span> <span class="identifier">n</span> <span class="special">=</span> <span class="identifier">gen</span><span class="special">();</span>
+ <span class="keyword">if</span><span class="special">(</span><span class="identifier">miller_rabin_test</span><span class="special">(</span><span class="identifier">n</span><span class="special">,</span> <span class="number">25</span><span class="special">,</span> <span class="identifier">gen2</span><span class="special">))</span>
+ <span class="special">{</span>
+ <span class="comment">// Value n is probably prime, see if (n-1)/2 is also prime:</span>
+ <span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span> <span class="special">&lt;&lt;</span> <span class="string">"We have a probable prime with value: "</span> <span class="special">&lt;&lt;</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">hex</span> <span class="special">&lt;&lt;</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">showbase</span> <span class="special">&lt;&lt;</span> <span class="identifier">n</span> <span class="special">&lt;&lt;</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">endl</span><span class="special">;</span>
+ <span class="keyword">if</span><span class="special">(</span><span class="identifier">miller_rabin_test</span><span class="special">((</span><span class="identifier">n</span><span class="special">-</span><span class="number">1</span><span class="special">)/</span><span class="number">2</span><span class="special">,</span> <span class="number">25</span><span class="special">,</span> <span class="identifier">gen2</span><span class="special">))</span>
+ <span class="special">{</span>
+ <span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span> <span class="special">&lt;&lt;</span> <span class="string">"We have a safe prime with value: "</span> <span class="special">&lt;&lt;</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">hex</span> <span class="special">&lt;&lt;</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">showbase</span> <span class="special">&lt;&lt;</span> <span class="identifier">n</span> <span class="special">&lt;&lt;</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">endl</span><span class="special">;</span>
+ <span class="keyword">return</span> <span class="number">0</span><span class="special">;</span>
+ <span class="special">}</span>
+ <span class="special">}</span>
+ <span class="special">}</span>
+ <span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span> <span class="special">&lt;&lt;</span> <span class="string">"Ooops, no safe primes were found"</span> <span class="special">&lt;&lt;</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">endl</span><span class="special">;</span>
+ <span class="keyword">return</span> <span class="number">1</span><span class="special">;</span>
+<span class="special">}</span>
+</pre>
+<p>
+ </p>
+</div>
+<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
+<td align="left"></td>
+<td align="right"><div class="copyright-footer">Copyright &#169; 2011 John Maddock<p>
+ Distributed under the Boost Software License, Version 1.0. (See accompanying
+ file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+ </p>
+</div></td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="random.html"><img src="../../images/prev.png" alt="Prev"></a><a accesskey="u" href="../tut.html"><img src="../../images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../images/home.png" alt="Home"></a><a accesskey="n" href="../ref.html"><img src="../../images/next.png" alt="Next"></a>
+</div>
+</body>
+</html>

Added: sandbox/big_number/libs/multiprecision/doc/html/boost_multiprecision/tut/random.html
==============================================================================
--- (empty file)
+++ sandbox/big_number/libs/multiprecision/doc/html/boost_multiprecision/tut/random.html 2012-03-21 05:19:57 EDT (Wed, 21 Mar 2012)
@@ -0,0 +1,157 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
+<title>Generating Random Numbers</title>
+<link rel="stylesheet" href="http://www.boost.org/doc/libs/release/doc/src/boostbook.css" type="text/css">
+<meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
+<link rel="home" href="../../index.html" title="Chapter&#160;1.&#160;Boost.Multiprecision">
+<link rel="up" href="../tut.html" title="Tutorial">
+<link rel="prev" href="rational.html" title="Rational Number Types">
+<link rel="next" href="primetest.html" title="Primality Testing">
+</head>
+<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+<div class="spirit-nav">
+<a accesskey="p" href="rational.html"><img src="../../images/prev.png" alt="Prev"></a><a accesskey="u" href="../tut.html"><img src="../../images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../images/home.png" alt="Home"></a><a accesskey="n" href="primetest.html"><img src="../../images/next.png" alt="Next"></a>
+</div>
+<div class="section boost_multiprecision_tut_random">
+<div class="titlepage"><div><div><h3 class="title">
+<a name="boost_multiprecision.tut.random"></a><a class="link" href="random.html" title="Generating Random Numbers">Generating Random Numbers</a>
+</h3></div></div></div>
+<p>
+ Random numbers are generated in conjunction with Boost.Random. However, since
+ Boost.Random is unaware of arbitrary precision numbers, it's necessary to
+ include the header:
+ </p>
+<pre class="programlisting"><span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">multiprecision</span><span class="special">/</span><span class="identifier">random</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span>
+</pre>
+<p>
+ In order to act as a bridge between the two libraries.
+ </p>
+<p>
+ Integers with <span class="emphasis"><em>N</em></span> random bits are generated using <code class="computeroutput"><span class="identifier">independent_bits_engine</span></code>:
+ </p>
+<p>
+</p>
+<pre class="programlisting"><span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">multiprecision</span><span class="special">/</span><span class="identifier">gmp</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span>
+<span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">multiprecision</span><span class="special">/</span><span class="identifier">random</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span>
+
+<span class="keyword">using</span> <span class="keyword">namespace</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">multiprecision</span><span class="special">;</span>
+<span class="keyword">using</span> <span class="keyword">namespace</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">random</span><span class="special">;</span>
+
+<span class="comment">//</span>
+<span class="comment">// Declare our random number generator type, the underlying generator</span>
+<span class="comment">// is the Mersenne twister mt19937 engine, and 256 bits are generated:</span>
+<span class="comment">//</span>
+<span class="keyword">typedef</span> <span class="identifier">independent_bits_engine</span><span class="special">&lt;</span><span class="identifier">mt19937</span><span class="special">,</span> <span class="number">256</span><span class="special">,</span> <span class="identifier">mpz_int</span><span class="special">&gt;</span> <span class="identifier">generator_type</span><span class="special">;</span>
+<span class="identifier">generator_type</span> <span class="identifier">gen</span><span class="special">;</span>
+<span class="comment">//</span>
+<span class="comment">// Generate some values:</span>
+<span class="comment">//</span>
+<span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span> <span class="special">&lt;&lt;</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">hex</span> <span class="special">&lt;&lt;</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">showbase</span><span class="special">;</span>
+<span class="keyword">for</span><span class="special">(</span><span class="keyword">unsigned</span> <span class="identifier">i</span> <span class="special">=</span> <span class="number">0</span><span class="special">;</span> <span class="identifier">i</span> <span class="special">&lt;</span> <span class="number">10</span><span class="special">;</span> <span class="special">++</span><span class="identifier">i</span><span class="special">)</span>
+ <span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span> <span class="special">&lt;&lt;</span> <span class="identifier">gen</span><span class="special">()</span> <span class="special">&lt;&lt;</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">endl</span><span class="special">;</span>
+</pre>
+<p>
+ </p>
+<p>
+ Alternatively we can generate integers in a given range using <code class="computeroutput"><span class="identifier">uniform_int_distribution</span></code>, this will invoke
+ the underlying engine multiple times to build up the required number of bits
+ in the result:
+ </p>
+<p>
+</p>
+<pre class="programlisting"><span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">multiprecision</span><span class="special">/</span><span class="identifier">gmp</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span>
+<span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">multiprecision</span><span class="special">/</span><span class="identifier">random</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span>
+
+<span class="keyword">using</span> <span class="keyword">namespace</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">multiprecision</span><span class="special">;</span>
+<span class="keyword">using</span> <span class="keyword">namespace</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">random</span><span class="special">;</span>
+
+<span class="comment">//</span>
+<span class="comment">// Generate integers in a given range using uniform_int,</span>
+<span class="comment">// the underlying generator is invoked multiple times</span>
+<span class="comment">// to generate enough bits:</span>
+<span class="comment">//</span>
+<span class="identifier">mt19937</span> <span class="identifier">mt</span><span class="special">;</span>
+<span class="identifier">uniform_int_distribution</span><span class="special">&lt;</span><span class="identifier">mpz_int</span><span class="special">&gt;</span> <span class="identifier">ui</span><span class="special">(</span><span class="number">0</span><span class="special">,</span> <span class="identifier">mpz_int</span><span class="special">(</span><span class="number">1</span><span class="special">)</span> <span class="special">&lt;&lt;</span> <span class="number">256</span><span class="special">);</span>
+<span class="comment">//</span>
+<span class="comment">// Generate the numbers:</span>
+<span class="comment">//</span>
+<span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span> <span class="special">&lt;&lt;</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">hex</span> <span class="special">&lt;&lt;</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">showbase</span><span class="special">;</span>
+<span class="keyword">for</span><span class="special">(</span><span class="keyword">unsigned</span> <span class="identifier">i</span> <span class="special">=</span> <span class="number">0</span><span class="special">;</span> <span class="identifier">i</span> <span class="special">&lt;</span> <span class="number">10</span><span class="special">;</span> <span class="special">++</span><span class="identifier">i</span><span class="special">)</span>
+ <span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span> <span class="special">&lt;&lt;</span> <span class="identifier">ui</span><span class="special">(</span><span class="identifier">mt</span><span class="special">)</span> <span class="special">&lt;&lt;</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">endl</span><span class="special">;</span>
+</pre>
+<p>
+ </p>
+<p>
+ Floating point values in [0,1) are generated using <code class="computeroutput"><span class="identifier">uniform_01</span></code>,
+ the trick here is to ensure that the underlying generator produces as many
+ random bits as there are digits in the floating point type. As above <code class="computeroutput"><span class="identifier">independent_bits_engine</span></code> can be used for
+ this purpose, note that we also have to convert decimal digits (in the floating
+ point type) to bits (in the random number generator):
+ </p>
+<p>
+</p>
+<pre class="programlisting"><span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">multiprecision</span><span class="special">/</span><span class="identifier">gmp</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span>
+<span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">multiprecision</span><span class="special">/</span><span class="identifier">random</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span>
+
+<span class="keyword">using</span> <span class="keyword">namespace</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">multiprecision</span><span class="special">;</span>
+<span class="keyword">using</span> <span class="keyword">namespace</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">random</span><span class="special">;</span>
+<span class="comment">//</span>
+<span class="comment">// We need an underlying generator with at least as many bits as the</span>
+<span class="comment">// floating point type to generate numbers in [0, 1) with all the bits</span>
+<span class="comment">// in the floating point type randomly filled:</span>
+<span class="comment">//</span>
+<span class="identifier">uniform_01</span><span class="special">&lt;</span><span class="identifier">mpf_float_50</span><span class="special">&gt;</span> <span class="identifier">uf</span><span class="special">;</span>
+<span class="identifier">independent_bits_engine</span><span class="special">&lt;</span><span class="identifier">mt19937</span><span class="special">,</span> <span class="number">50L</span><span class="special">*</span><span class="number">1000L</span><span class="special">/</span><span class="number">301L</span><span class="special">,</span> <span class="identifier">mpz_int</span><span class="special">&gt;</span> <span class="identifier">gen</span><span class="special">;</span>
+<span class="comment">//</span>
+<span class="comment">// Generate the values:</span>
+<span class="comment">//</span>
+<span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span> <span class="special">&lt;&lt;</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">setprecision</span><span class="special">(</span><span class="number">50</span><span class="special">);</span>
+<span class="keyword">for</span><span class="special">(</span><span class="keyword">unsigned</span> <span class="identifier">i</span> <span class="special">=</span> <span class="number">0</span><span class="special">;</span> <span class="identifier">i</span> <span class="special">&lt;</span> <span class="number">20</span><span class="special">;</span> <span class="special">++</span><span class="identifier">i</span><span class="special">)</span>
+ <span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span> <span class="special">&lt;&lt;</span> <span class="identifier">uf</span><span class="special">(</span><span class="identifier">gen</span><span class="special">)</span> <span class="special">&lt;&lt;</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">endl</span><span class="special">;</span>
+</pre>
+<p>
+ </p>
+<p>
+ Finally, we can modify the above example to produce numbers distributed according
+ to some distribution:
+ </p>
+<p>
+</p>
+<pre class="programlisting"><span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">multiprecision</span><span class="special">/</span><span class="identifier">gmp</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span>
+<span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">multiprecision</span><span class="special">/</span><span class="identifier">random</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span>
+
+<span class="keyword">using</span> <span class="keyword">namespace</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">multiprecision</span><span class="special">;</span>
+<span class="keyword">using</span> <span class="keyword">namespace</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">random</span><span class="special">;</span>
+<span class="comment">//</span>
+<span class="comment">// We can repeat the above example, with other distributions:</span>
+<span class="comment">//</span>
+<span class="identifier">uniform_real_distribution</span><span class="special">&lt;</span><span class="identifier">mpf_float_50</span><span class="special">&gt;</span> <span class="identifier">ur</span><span class="special">(-</span><span class="number">20</span><span class="special">,</span> <span class="number">20</span><span class="special">);</span>
+<span class="identifier">gamma_distribution</span><span class="special">&lt;</span><span class="identifier">mpf_float_50</span><span class="special">&gt;</span> <span class="identifier">gd</span><span class="special">(</span><span class="number">20</span><span class="special">);</span>
+<span class="identifier">independent_bits_engine</span><span class="special">&lt;</span><span class="identifier">mt19937</span><span class="special">,</span> <span class="number">50L</span><span class="special">*</span><span class="number">1000L</span><span class="special">/</span><span class="number">301L</span><span class="special">,</span> <span class="identifier">mpz_int</span><span class="special">&gt;</span> <span class="identifier">gen</span><span class="special">;</span>
+<span class="comment">//</span>
+<span class="comment">// Generate some values:</span>
+<span class="comment">//</span>
+<span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span> <span class="special">&lt;&lt;</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">setprecision</span><span class="special">(</span><span class="number">50</span><span class="special">);</span>
+<span class="keyword">for</span><span class="special">(</span><span class="keyword">unsigned</span> <span class="identifier">i</span> <span class="special">=</span> <span class="number">0</span><span class="special">;</span> <span class="identifier">i</span> <span class="special">&lt;</span> <span class="number">20</span><span class="special">;</span> <span class="special">++</span><span class="identifier">i</span><span class="special">)</span>
+ <span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span> <span class="special">&lt;&lt;</span> <span class="identifier">ur</span><span class="special">(</span><span class="identifier">gen</span><span class="special">)</span> <span class="special">&lt;&lt;</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">endl</span><span class="special">;</span>
+<span class="keyword">for</span><span class="special">(</span><span class="keyword">unsigned</span> <span class="identifier">i</span> <span class="special">=</span> <span class="number">0</span><span class="special">;</span> <span class="identifier">i</span> <span class="special">&lt;</span> <span class="number">20</span><span class="special">;</span> <span class="special">++</span><span class="identifier">i</span><span class="special">)</span>
+ <span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span> <span class="special">&lt;&lt;</span> <span class="identifier">gd</span><span class="special">(</span><span class="identifier">gen</span><span class="special">)</span> <span class="special">&lt;&lt;</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">endl</span><span class="special">;</span>
+</pre>
+<p>
+ </p>
+</div>
+<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
+<td align="left"></td>
+<td align="right"><div class="copyright-footer">Copyright &#169; 2011 John Maddock<p>
+ Distributed under the Boost Software License, Version 1.0. (See accompanying
+ file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+ </p>
+</div></td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="rational.html"><img src="../../images/prev.png" alt="Prev"></a><a accesskey="u" href="../tut.html"><img src="../../images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../images/home.png" alt="Home"></a><a accesskey="n" href="primetest.html"><img src="../../images/next.png" alt="Next"></a>
+</div>
+</body>
+</html>

Modified: sandbox/big_number/libs/multiprecision/doc/html/boost_multiprecision/tut/rational.html
==============================================================================
--- sandbox/big_number/libs/multiprecision/doc/html/boost_multiprecision/tut/rational.html (original)
+++ sandbox/big_number/libs/multiprecision/doc/html/boost_multiprecision/tut/rational.html 2012-03-21 05:19:57 EDT (Wed, 21 Mar 2012)
@@ -145,7 +145,7 @@
               </td>
 <td>
                 <p>
- libtommath
+ libtommath
                 </p>
               </td>
 <td>
@@ -452,8 +452,9 @@
             information).
           </li>
 <li class="listitem">
- No changes are made to libtommath's global state, so this type can safely
- coexist with other libtommath code.
+ No changes are made to libtommath's
+ global state, so this type can safely coexist with other libtommath
+ code.
           </li>
 <li class="listitem">
             Performance of this type has been found to be pretty poor - this need

Modified: sandbox/big_number/libs/multiprecision/doc/html/index.html
==============================================================================
--- sandbox/big_number/libs/multiprecision/doc/html/index.html (original)
+++ sandbox/big_number/libs/multiprecision/doc/html/index.html 2012-03-21 05:19:57 EDT (Wed, 21 Mar 2012)
@@ -43,11 +43,16 @@
 </dl></dd>
 <dt><span class="section">Performance Comparison</span></dt>
 <dd><dl>
-<dt><span class="section">Real World Tests</span></dt>
+<dt><span class="section"><a href="boost_multiprecision/perf/realworld.html">Floating Point Real
+ World Tests</a></span></dt>
+<dt><span class="section"><a href="boost_multiprecision/perf/int_real_world.html">Integer Real
+ World Tests</a></span></dt>
 <dt><span class="section"><a href="boost_multiprecision/perf/float_performance.html">Float Algorithm
       Perfomance</a></span></dt>
 <dt><span class="section"><a href="boost_multiprecision/perf/integer_performance.html">Integer
       Algorithm Perfomance</a></span></dt>
+<dt><span class="section"><a href="boost_multiprecision/perf/rational_performance.html">Rational
+ Type Perfomance</a></span></dt>
 </dl></dd>
 <dt><span class="section">Roadmap</span></dt>
 <dd><dl>
@@ -58,7 +63,7 @@
 </div>
 </div>
 <table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
-<td align="left"><p><small>Last revised: March 17, 2012 at 13:19:03 GMT</small></p></td>
+<td align="left"><p><small>Last revised: March 20, 2012 at 19:02:47 GMT</small></p></td>
 <td align="right"><div class="copyright-footer"></div></td>
 </tr></table>
 <hr>

Modified: sandbox/big_number/libs/multiprecision/doc/multiprecision.qbk
==============================================================================
--- sandbox/big_number/libs/multiprecision/doc/multiprecision.qbk (original)
+++ sandbox/big_number/libs/multiprecision/doc/multiprecision.qbk 2012-03-21 05:19:57 EDT (Wed, 21 Mar 2012)
@@ -32,6 +32,8 @@
 [template mpfr_class[] [@http://math.berkeley.edu/~wilken/code/gmpfrxx/ mpfr_class]]
 [template mpreal[] [@http://www.holoborodko.com/pavel/mpfr/ mpreal]]
 [template mpir[] [@http://mpir.org/ MPIR]]
+[template tommath[] [@http://libtom.org/?page=features&newsitems=5&whatfile=ltm libtommath]]
+
 
 [section:intro Introduction]
 
@@ -224,7 +226,7 @@
 [table
 [[Backend Type][Header][Radix][Dependencies][Pros][Cons]]
 [[`gmp_int`][boost/multiprecision/gmp.hpp][2][[gmp]][Very fast and efficient backend.][Dependency on GNU licenced [gmp] library.]]
-[[`mp_int`][boost/multiprecision/tommath.hpp][2][libtommath][Public domain backend with no licence restrictions.][Slower than [gmp].]]
+[[`mp_int`][boost/multiprecision/tommath.hpp][2][[tommath]][Public domain backend with no licence restrictions.][Slower than [gmp].]]
 [[`cpp_int`][boost/multiprecision/cpp_int.hpp][2][None]
             [Very versatile, Boost licenced, all C++ integer type which support both arbitrary precision and fixed precision integer types.][Slower than [gmp].]]
 ]
@@ -275,12 +277,12 @@
 
    }} // namespaces
 
-The `tommath_int` backend is used via the typedef `boost::multiprecision::mp_int`. It acts as a thin wrapper around the libtommath `mp_int`
+The `tommath_int` backend is used via the typedef `boost::multiprecision::mp_int`. It acts as a thin wrapper around the [tommath] `mp_int`
 to provide an integer type that is a drop-in replacement for the native C++ integer types, but with unlimited precision.
 
 Things you should know when using this type:
 
-* Default constructed objects have the value zero (this is libtommath's default behavior).
+* Default constructed objects have the value zero (this is [tommath]'s default behavior).
 * Although `mp_int` is mostly a drop in replacement for the builtin integer types, it should be noted that it is a
 rather strange beast as it's a signed type that is not a 2's complement type. As a result the bitwise operations
 `| & ^` will throw a `std::runtime_error` exception if either of the arguments is negative. Similarly the complement
@@ -288,7 +290,7 @@
 * Formatted IO for this type does not support octal or hexadecimal notation for negative values,
 as a result performing formatted output on this type when the argument is negative and either of the flags
 `std::ios_base::oct` or `std::ios_base::hex` are set, will result in a `std::runtime_error` will be thrown.
-* Division by zero will result in a hardware signal being raised by libtommath.
+* Division by zero will result in a hardware signal being raised by [tommath].
 
 [h5 Example:]
 
@@ -311,11 +313,13 @@
    typedef mp_number<cpp_int_backend<128, false, void> > mp_uint128_t;
    typedef mp_number<cpp_int_backend<256, false, void> > mp_uint256_t;
    typedef mp_number<cpp_int_backend<512, false, void> > mp_uint512_t;
+ typedef mp_number<cpp_int_backend<1024, false, void> > mp_uint1024_t;
 
    // Fixed precision signed types:
    typedef mp_number<cpp_int_backend<128, true, void> > mp_int128_t;
    typedef mp_number<cpp_int_backend<256, true, void> > mp_int256_t;
    typedef mp_number<cpp_int_backend<512, true, void> > mp_int512_t;
+ typedef mp_number<cpp_int_backend<1024, true, void> > mp_int1024_t;
 
    }} // namespaces
 
@@ -521,7 +525,7 @@
 [[Backend Type][Header][Radix][Dependencies][Pros][Cons]]
 [[`gmp_rational`][boost/multiprecision/gmp.hpp][2][[gmp]][Very fast and efficient backend.][Dependency on GNU licenced [gmp] library.]]
 [[`cpp_rational`][boost/multiprecision/cpp_int.hpp][2][None][An all C++ Boost-licenced implementation.][Slower than [gmp].]]
-[[`tommath_rational`][boost/multiprecision/tommath.hpp][2][libtommath][All C/C++ implementation that's Boost Software Licence compatible.][Slower than [gmp].]]
+[[`tommath_rational`][boost/multiprecision/tommath.hpp][2][[tommath]][All C/C++ implementation that's Boost Software Licence compatible.][Slower than [gmp].]]
 [[`rational_adapter`][boost/multiprecision/rational_adapter.hpp][N/A][none][All C++ adapter that allows any inetger backend type to be used as a rational type.][Requires an underlying integer backend type.]]
 [[`boost::rational`][boost/rational.hpp][N/A][None][A C++ rational number type that can used with any `mp_number` integer type.][The expression templates used by `mp_number` end up being "hidden" inside `boost::rational`: performance may well suffer as a result.]]
 ]
@@ -629,7 +633,7 @@
 
 * Default constructed `mp_rational`'s have the value zero (this the inherited Boost.Rational behavior).
 * Division by zero results in a `boost::bad_rational` exception being thrown (see the rational number library's docs for more information).
-* No changes are made to libtommath's global state, so this type can safely coexist with other libtommath code.
+* No changes are made to [tommath]'s global state, so this type can safely coexist with other [tommath] code.
 * Performance of this type has been found to be pretty poor - this need further investigation - but it appears that Boost.Rational
 needs some improvement in this area.
 
@@ -1326,7 +1330,7 @@
 
 [section:perf Performance Comparison]
 
-[section:realworld Real World Tests]
+[section:realworld Floating Point Real World Tests]
 
 These tests test the total time taken to execute all of Boost.Math's test cases for these functions.
 In each case the best performing library gets a relative score of 1, with the total execution time
@@ -1358,6 +1362,38 @@
 
 [endsect]
 
+[section:int_real_world Integer Real World Tests]
+
+These [@../../performance/miller_rabin_performance.cpp tests] measure the time taken to generate 1000 128-bit
+random numbers and test for primality using the Miller Rabin test.
+
+Test code was compiled with Microsoft Visual Studio 2010 with all optimisations
+turned on (/Ox), and used MPIR-2.3.0 and [tommath]-0.42.0. The tests were run on 32-bit
+Windows Vista machine.
+
+[table
+[[Integer Type][Relative (and Absolute) Times]]
+[[cpp_int][1.45089(0.481248s)]]
+[[cpp_int (no Expression templates)][1.61489(0.535646s)]]
+[[cpp_int (64-bit cache)][1.39273(0.461956s)]]
+[[cpp_int (256-bit cache)][1.37743(0.456884s)]]
+[[cpp_int (512-bit cache)][1.0919(0.362175s)]]
+[[cpp_int (1024-bit cache)][1.10864(0.367726s)]]
+[[mp_int][3.92956(1.3034s)]]
+[[mp_int (no Expression templates)][4.02496(1.33505s)]]
+[[mp_int1024_t][1.01094(0.335322s)]]
+[[mp_int1024_t (no Expression templates)][1(0.331692s)]]
+[[mpz_int][1.08472(0.359793s)]]
+[[mpz_int (no Expression templates)][1.20865(0.400901s)]]
+]
+
+It's interesting to note that expression templates have little effect here - perhaps because the actual expressions involved
+are relatively trivial in this case - so the time taken for multiplication and division tends to dominate. Also note
+how increasing the internal cache size used by `cpp_int` is quite effective in this case in cutting out memory allocations
+altogether - cutting about a third off the total runtime.
+
+[endsect]
+
 [section:float_performance Float Algorithm Perfomance]
 
 Note that these tests are carefully designed to test performance of the underlying algorithms
@@ -1441,123 +1477,207 @@
 turned on (/Ox), and used MPIR-2.3.0 and [mpfr]-3.0.0. The tests were run on 32-bit
 Windows Vista machine.
 
-Note that Linux x64 tests showed significantly worse performance for `fixed_int` division
-than on Win32 (or possibly [gmp] behaves much better in that case). Otherwise the results
-are much the same.
+Linux x86_64 results are broadly similar, except that libtommath performs much better there.
 
 [table Operator +
-[[Backend][64 Bits][128 Bits][256 Bits][512 Bits][1024 Bits]]
-[[fixed_int][[*1] (0.0031291s)][[*1] (0.00703043s)][[*1] (0.0163669s)][[*1] (0.0326567s)][[*1] (0.0603087s)]]
-[[gmp_int][12.4866 (0.0390717s)][6.01034 (0.0422553s)][2.65628 (0.0434751s)][1.54295 (0.0503875s)][1.16477 (0.0702458s)]]
-[[tommath_int][6.03111 (0.018872s)][3.08173 (0.0216659s)][1.84243 (0.0301548s)][1.30199 (0.0425188s)][1.18909 (0.0717123s)]]
+[[Backend][128 Bits][256 Bits][512 Bits][1024 Bits]]
+[[cpp_int][1.24574 (0.0270133s)][1.09665 (0.0352319s)][1.25708 (0.0524047s)][1.31488 (0.08777s)]]
+[[cpp_int(fixed)][1.05787 (0.0229394s)][[*1] (0.0321268s)][1.16171 (0.0484289s)][1.24017 (0.0827832s)]]
+[[gmp_int][2.08016 (0.0451073s)][1.33792 (0.042983s)][1.19676 (0.0498904s)][[*1] (0.0667514s)]]
+[[tommath_int][[*1] (0.0216845s)][1.07779 (0.0346258s)][[*1] (0.0416877s)][1.06344 (0.0709863s)]]
 ]
 [table Operator +(int)
-[[Backend][64 Bits][128 Bits][256 Bits][512 Bits][1024 Bits]]
-[[fixed_int][[*1] (0.00335294s)][[*1] (0.00376116s)][[*1] (0.00985174s)][[*1] (0.0119345s)][[*1] (0.0170918s)]]
-[[gmp_int][9.47407 (0.031766s)][8.44794 (0.0317741s)][4.23857 (0.0417573s)][5.40856 (0.0645488s)][6.31314 (0.107903s)]]
-[[tommath_int][67.0025 (0.224655s)][60.4203 (0.22725s)][25.1834 (0.2481s)][23.2996 (0.27807s)][17.1743 (0.293538s)]]
+[[Backend][128 Bits][256 Bits][512 Bits][1024 Bits]]
+[[cpp_int][1.46244 (0.0202077s)][1.20665 (0.0238576s)][1.17647 (0.0258293s)][1.12424 (0.0317931s)]]
+[[cpp_int(fixed)][[*1] (0.0138178s)][[*1] (0.0197719s)][[*1] (0.0219548s)][[*1] (0.0282796s)]]
+[[gmp_int][2.15321 (0.0297527s)][2.09834 (0.041488s)][2.89935 (0.0636546s)][3.70262 (0.104709s)]]
+[[tommath_int][17.1419 (0.236864s)][12.9762 (0.256563s)][12.3275 (0.270648s)][10.7373 (0.303648s)]]
 ]
 [table Operator -
-[[Backend][64 Bits][128 Bits][256 Bits][512 Bits][1024 Bits]]
-[[fixed_int][[*1] (0.00339191s)][[*1] (0.0073172s)][[*1] (0.0166428s)][[*1] (0.0349375s)][[*1] (0.0600083s)]]
-[[gmp_int][12.5182 (0.0424608s)][5.57936 (0.0408253s)][2.78496 (0.0463496s)][1.48373 (0.051838s)][1.29928 (0.0779673s)]]
-[[tommath_int][7.00782 (0.0237699s)][3.69919 (0.0270677s)][2.29645 (0.0382195s)][1.39777 (0.0488346s)][1.28243 (0.0769566s)]]
+[[Backend][128 Bits][256 Bits][512 Bits][1024 Bits]]
+[[cpp_int][1.15385 (0.029665s)][1.08217 (0.0369886s)][1.05882 (0.051534s)][1.12132 (0.0822725s)]]
+[[cpp_int(fixed)][[*1] (0.0257095s)][[*1] (0.0341801s)][[*1] (0.0486711s)][1.08659 (0.0797242s)]]
+[[gmp_int][1.56685 (0.040283s)][1.32917 (0.0454312s)][1.06917 (0.0520378s)][[*1] (0.0733708s)]]
+[[tommath_int][1.059 (0.0272264s)][1.16974 (0.0399818s)][1.01303 (0.0493054s)][1.03375 (0.0758472s)]]
 ]
 [table Operator -(int)
-[[Backend][64 Bits][128 Bits][256 Bits][512 Bits][1024 Bits]]
-[[fixed_int][[*1] (0.00250933s)][[*1] (0.00358055s)][[*1] (0.0103282s)][[*1] (0.0119127s)][[*1] (0.0176089s)]]
-[[gmp_int][12.093 (0.0303454s)][8.50898 (0.0304669s)][3.9284 (0.0405733s)][5.03037 (0.0599252s)][5.96617 (0.105058s)]]
-[[tommath_int][80.8477 (0.202873s)][57.8371 (0.207089s)][21.3372 (0.220375s)][23.526 (0.280258s)][14.793 (0.260488s)]]
+[[Backend][128 Bits][256 Bits][512 Bits][1024 Bits]]
+[[cpp_int][1.51665 (0.0157196s)][1.31513 (0.0200533s)][1.29599 (0.0235066s)][1.21534 (0.0266136s)]]
+[[cpp_int(fixed)][[*1] (0.0103647s)][[*1] (0.0152482s)][[*1] (0.018138s)][[*1] (0.021898s)]]
+[[gmp_int][2.7938 (0.0289568s)][2.55493 (0.038958s)][3.12248 (0.0566356s)][4.48855 (0.0982904s)]]
+[[tommath_int][20.8695 (0.216305s)][15.0705 (0.229797s)][13.4093 (0.243217s)][12.2599 (0.268468s)]]
 ]
 [table Operator *
-[[Backend][64 Bits][128 Bits][256 Bits][512 Bits][1024 Bits]]
-[[fixed_int][[*1] (0.0223481s)][[*1] (0.0375288s)][[*1] (0.120353s)][[*1] (0.439147s)][[*1] (1.46969s)]]
-[[gmp_int][2.50746 (0.0560369s)][1.76676 (0.0663044s)][1.06052 (0.127636s)][1.22558 (0.53821s)][1.03538 (1.52168s)]]
-[[tommath_int][3.00028 (0.0670506s)][2.97696 (0.111722s)][2.86257 (0.34452s)][2.26661 (0.995374s)][2.12926 (3.12935s)]]
+[[Backend][128 Bits][256 Bits][512 Bits][1024 Bits]]
+[[cpp_int][1.29504 (0.0731032s)][1.55431 (0.196132s)][1.4363 (0.656569s)][1.63701 (2.47859s)]]
+[[cpp_int(fixed)][[*1] (0.0564485s)][1.16604 (0.147138s)][[*1] (0.457124s)][[*1] (1.5141s)]]
+[[gmp_int][1.19574 (0.0674975s)][[*1] (0.126186s)][1.16627 (0.53313s)][1.02906 (1.5581s)]]
+[[tommath_int][1.97229 (0.111333s)][2.67087 (0.337027s)][2.13031 (0.973817s)][2.05869 (3.11706s)]]
 ]
 [table Operator *(int)
-[[Backend][64 Bits][128 Bits][256 Bits][512 Bits][1024 Bits]]
-[[fixed_int][[*1] (0.00444316s)][[*1] (0.0135739s)][[*1] (0.0192615s)][[*1] (0.0328339s)][1.18198 (0.0567364s)]]
-[[gmp_int][4.57776 (0.0203397s)][1.79901 (0.0244196s)][1.32814 (0.025582s)][1.01453 (0.033311s)][[*1] (0.048001s)]]
-[[tommath_int][53.8709 (0.239357s)][18.3773 (0.249452s)][14.2088 (0.273682s)][14.0907 (0.462652s)][9.10761 (0.437175s)]]
+[[Backend][128 Bits][256 Bits][512 Bits][1024 Bits]]
+[[cpp_int][1.34609 (0.030315s)][1.57086 (0.0407838s)][1.60154 (0.0542267s)][1.67808 (0.0804984s)]]
+[[cpp_int(fixed)][1.29783 (0.0292279s)][1.58263 (0.0410894s)][1.61543 (0.054697s)][1.66841 (0.0800346s)]]
+[[gmp_int][[*1] (0.0225207s)][[*1] (0.0259628s)][[*1] (0.033859s)][[*1] (0.0479706s)]]
+[[tommath_int][12.4278 (0.279882s)][11.9045 (0.309074s)][10.5973 (0.358813s)][9.47384 (0.454466s)]]
 ]
 [table Operator /
-[[Backend][64 Bits][128 Bits][256 Bits][512 Bits][1024 Bits]]
-[[fixed_int][[*1] (0.0991632s)][[*1] (0.172328s)][[*1] (0.309492s)][[*1] (0.573815s)][[*1] (1.06356s)]]
-[[gmp_int][7.81859 (0.775316s)][5.11069 (0.880715s)][2.93514 (0.908404s)][1.80497 (1.03572s)][1.21878 (1.29625s)]]
-[[tommath_int][18.0766 (1.79253s)][12.3939 (2.13582s)][9.80438 (3.03438s)][8.74047 (5.01541s)][10.8288 (11.517s)]]
+[[Backend][128 Bits][256 Bits][512 Bits][1024 Bits]]
+[[cpp_int][2.86387 (0.593314s)][2.18375 (0.69965s)][1.72571 (0.918294s)][1.39251 (1.33801s)]]
+[[cpp_int(fixed)][[*1] (0.207172s)][[*1] (0.320389s)][[*1] (0.532127s)][[*1] (0.960856s)]]
+[[gmp_int][3.89115 (0.806137s)][2.87573 (0.921352s)][1.96635 (1.04635s)][1.29618 (1.24544s)]]
+[[tommath_int][11.9483 (2.47535s)][9.35941 (2.99865s)][8.79014 (4.67747s)][11.8316 (11.3684s)]]
 ]
 [table Operator /(int)
-[[Backend][64 Bits][128 Bits][256 Bits][512 Bits][1024 Bits]]
-[[fixed_int][1.04098 (0.0443082s)][1.61317 (0.110308s)][2.18324 (0.229148s)][2.36331 (0.442167s)][2.45159 (0.866172s)]]
-[[gmp_int][[*1] (0.042564s)][[*1] (0.06838s)][[*1] (0.104957s)][[*1] (0.187096s)][[*1] (0.35331s)]]
-[[tommath_int][32.4072 (1.37938s)][23.7471 (1.62383s)][22.1907 (2.32908s)][19.9054 (3.72421s)][24.2219 (8.55783s)]]
+[[Backend][128 Bits][256 Bits][512 Bits][1024 Bits]]
+[[cpp_int][5.77003 (0.313196s)][4.38067 (0.431864s)][3.55054 (0.634559s)][2.97898 (1.03205s)]]
+[[cpp_int(fixed)][2.48952 (0.135131s)][2.59188 (0.255519s)][2.56716 (0.458808s)][2.52368 (0.874313s)]]
+[[gmp_int][[*1] (0.0542797s)][[*1] (0.0985842s)][[*1] (0.178722s)][[*1] (0.346443s)]]
+[[tommath_int][31.6477 (1.71783s)][22.8727 (2.25489s)][19.9248 (3.56101s)][24.3266 (8.42779s)]]
 ]
 [table Operator %
-[[Backend][64 Bits][128 Bits][256 Bits][512 Bits][1024 Bits]]
-[[fixed_int][[*1] (0.0946529s)][[*1] (0.170561s)][[*1] (0.328458s)][[*1] (0.575884s)][[*1] (1.05006s)]]
-[[gmp_int][7.77525 (0.73595s)][4.39387 (0.749422s)][2.35075 (0.772122s)][1.51922 (0.874894s)][1.02263 (1.07382s)]]
-[[tommath_int][27.1503 (2.56986s)][12.8743 (2.19585s)][9.43965 (3.10053s)][8.24936 (4.75068s)][10.9719 (11.5211s)]]
+[[Backend][128 Bits][256 Bits][512 Bits][1024 Bits]]
+[[cpp_int][1.9813 (0.357541s)][1.55667 (0.460146s)][1.35341 (0.681144s)][1.19906 (1.10138s)]]
+[[cpp_int(fixed)][[*1] (0.180457s)][[*1] (0.295597s)][[*1] (0.503278s)][[*1] (0.918538s)]]
+[[gmp_int][3.50213 (0.631985s)][2.33312 (0.689662s)][1.57264 (0.791475s)][1.07795 (0.99014s)]]
+[[tommath_int][12.2393 (2.20868s)][10.1123 (2.98915s)][9.46676 (4.76442s)][12.1795 (11.1873s)]]
 ]
 [table Operator %(int)
-[[Backend][64 Bits][128 Bits][256 Bits][512 Bits][1024 Bits]]
-[[fixed_int][1.25034 (0.0425984s)][1.91617 (0.106226s)][2.02166 (0.195577s)][2.14437 (0.387067s)][2.23514 (0.776075s)]]
-[[gmp_int][[*1] (0.0340695s)][[*1] (0.0554367s)][[*1] (0.0967406s)][[*1] (0.180504s)][[*1] (0.347216s)]]
-[[tommath_int][42.8781 (1.46083s)][29.879 (1.65639s)][23.4323 (2.26685s)][19.932 (3.5978s)][25.0046 (8.682s)]]
-]
-[table Operator str
-[[Backend][64 Bits][128 Bits][256 Bits][512 Bits][1024 Bits]]
-[[fixed_int][[*1] (0.000465841s)][[*1] (0.00102073s)][[*1] (0.00207212s)][1.02618 (0.0062017s)][1.32649 (0.0190043s)]]
-[[gmp_int][2.83823 (0.00132216s)][2.17537 (0.00222046s)][1.46978 (0.00304557s)][[*1] (0.00604351s)][[*1] (0.0143268s)]]
-[[tommath_int][15.76 (0.00734164s)][15.9879 (0.0163193s)][21.7337 (0.0450349s)][19.7183 (0.119168s)][26.3445 (0.377431s)]]
+[[Backend][128 Bits][256 Bits][512 Bits][1024 Bits]]
+[[cpp_int][1.88485 (0.105552s)][2.00194 (0.203711s)][2.08202 (0.380096s)][2.12794 (0.752068s)]]
+[[cpp_int(fixed)][1.7474 (0.0978544s)][1.88457 (0.191768s)][2.0306 (0.37071s)][2.0851 (0.736929s)]]
+[[gmp_int][[*1] (0.0560001s)][[*1] (0.101757s)][[*1] (0.182561s)][[*1] (0.353426s)]]
+[[tommath_int][30.4466 (1.70501s)][22.2997 (2.26915s)][19.6199 (3.58184s)][24.0694 (8.50676s)]]
 ]
 [table Operator <<
-[[Backend][64 Bits][128 Bits][256 Bits][512 Bits][1024 Bits]]
-[[fixed_int][[*1] (0.0119095s)][[*1] (0.0131746s)][[*1] (0.0213483s)][[*1] (0.0247552s)][[*1] (0.0339579s)]]
-[[gmp_int][1.9355 (0.0230509s)][1.94257 (0.0255925s)][1.49684 (0.031955s)][1.79202 (0.0443618s)][2.0846 (0.0707887s)]]
-[[tommath_int][2.64273 (0.0314737s)][2.95612 (0.0389456s)][3.05842 (0.065292s)][3.79496 (0.0939451s)][4.82142 (0.163725s)]]
+[[Backend][128 Bits][256 Bits][512 Bits][1024 Bits]]
+[[cpp_int][1.20362 (0.0224696s)][1.08555 (0.0294403s)][[*1] (0.0360516s)][1.07177 (0.0523935s)]]
+[[cpp_int(fixed)][[*1] (0.0186683s)][[*1] (0.0271201s)][1.02126 (0.036818s)][[*1] (0.0488848s)]]
+[[gmp_int][1.36706 (0.0255207s)][1.12042 (0.0303858s)][1.24359 (0.0448335s)][1.40143 (0.0685085s)]]
+[[tommath_int][2.09357 (0.0390833s)][2.4569 (0.0666312s)][2.63592 (0.0950291s)][3.43638 (0.167987s)]]
 ]
 [table Operator >>
-[[Backend][64 Bits][128 Bits][256 Bits][512 Bits][1024 Bits]]
-[[fixed_int][[*1] (0.006361s)][[*1] (0.00880189s)][[*1] (0.0180295s)][[*1] (0.0220786s)][[*1] (0.0325312s)]]
-[[gmp_int][4.26889 (0.0271544s)][3.14669 (0.0276968s)][1.74396 (0.0314426s)][1.45928 (0.0322188s)][1.24596 (0.0405327s)]]
-[[tommath_int][39.4379 (0.250865s)][28.6225 (0.251932s)][16.4543 (0.296661s)][14.2167 (0.313884s)][15.5842 (0.506974s)]]
+[[Backend][128 Bits][256 Bits][512 Bits][1024 Bits]]
+[[cpp_int][1.33649 (0.0210319s)][1.12919 (0.0266135s)][1.10413 (0.0307184s)][1.09267 (0.0399373s)]]
+[[cpp_int(fixed)][[*1] (0.0157367s)][[*1] (0.0235686s)][[*1] (0.0278214s)][1.05198 (0.0384501s)]]
+[[gmp_int][1.72135 (0.0270884s)][1.2078 (0.0284661s)][1.16066 (0.0322912s)][[*1] (0.0365503s)]]
+[[tommath_int][15.4381 (0.242945s)][11.8797 (0.279987s)][10.9043 (0.303374s)][14.0762 (0.514491s)]]
 ]
 [table Operator &
-[[Backend][64 Bits][128 Bits][256 Bits][512 Bits][1024 Bits]]
-[[fixed_int][[*1] (0.00298048s)][[*1] (0.00546222s)][[*1] (0.0127546s)][[*1] (0.01985s)][[*1] (0.0349286s)]]
-[[gmp_int][16.0105 (0.0477189s)][9.67027 (0.0528211s)][5.12678 (0.0653902s)][4.62316 (0.0917698s)][4.00837 (0.140007s)]]
-[[tommath_int][43.6665 (0.130147s)][23.8003 (0.130002s)][11.4242 (0.145711s)][7.83416 (0.155508s)][9.50103 (0.331858s)]]
+[[Backend][128 Bits][256 Bits][512 Bits][1024 Bits]]
+[[cpp_int][1.65829 (0.0314059s)][1.42198 (0.0390384s)][1.48578 (0.0498903s)][1.51243 (0.0770342s)]]
+[[cpp_int(fixed)][[*1] (0.0189387s)][[*1] (0.0274536s)][[*1] (0.0335786s)][[*1] (0.0509341s)]]
+[[gmp_int][2.80248 (0.0530755s)][2.39752 (0.0658206s)][2.66009 (0.089322s)][2.73942 (0.13953s)]]
+[[tommath_int][6.95432 (0.131706s)][5.4059 (0.148412s)][4.56887 (0.153417s)][6.5696 (0.334616s)]]
 ]
 [table Operator &(int)
-[[Backend][64 Bits][128 Bits][256 Bits][512 Bits][1024 Bits]]
-[[fixed_int][[*1] (0.00222291s)][[*1] (0.0035522s)][[*1] (0.0110247s)][[*1] (0.0154281s)][[*1] (0.0275044s)]]
-[[gmp_int][70.8538 (0.157502s)][42.1478 (0.149717s)][13.9023 (0.153268s)][10.3271 (0.159328s)][6.0529 (0.166481s)]]
-[[tommath_int][154.134 (0.342626s)][93.2035 (0.331077s)][31.9151 (0.351853s)][23.6515 (0.364899s)][22.0042 (0.605213s)]]
+[[Backend][128 Bits][256 Bits][512 Bits][1024 Bits]]
+[[cpp_int][1.63285 (0.0472296s)][1.43344 (0.0588492s)][1.33141 (0.0724386s)][1.21353 (0.104144s)]]
+[[cpp_int(fixed)][[*1] (0.0289247s)][[*1] (0.0410546s)][[*1] (0.0544075s)][[*1] (0.0858187s)]]
+[[gmp_int][5.24478 (0.151704s)][3.81907 (0.15679s)][2.77979 (0.151242s)][1.84209 (0.158086s)]]
+[[tommath_int][11.7257 (0.339163s)][8.6379 (0.354625s)][6.90411 (0.375636s)][7.63253 (0.655013s)]]
 ]
 [table Operator ^
-[[Backend][64 Bits][128 Bits][256 Bits][512 Bits][1024 Bits]]
-[[fixed_int][[*1] (0.00307714s)][[*1] (0.00538197s)][[*1] (0.0127717s)][[*1] (0.0198304s)][[*1] (0.0345822s)]]
-[[gmp_int][13.9543 (0.0429392s)][9.92785 (0.0534314s)][4.80398 (0.0613552s)][4.35864 (0.0864335s)][3.887 (0.134421s)]]
-[[tommath_int][41.5958 (0.127996s)][24.2396 (0.130457s)][11.3666 (0.145171s)][8.01016 (0.158845s)][9.84853 (0.340584s)]]
+[[Backend][128 Bits][256 Bits][512 Bits][1024 Bits]]
+[[cpp_int][1.39325 (0.0297525s)][1.28821 (0.0385005s)][1.18843 (0.0492426s)][1.07724 (0.0758668s)]]
+[[cpp_int(fixed)][[*1] (0.0213547s)][[*1] (0.0298868s)][[*1] (0.041435s)][[*1] (0.070427s)]]
+[[gmp_int][2.28582 (0.048813s)][2.03478 (0.0608129s)][2.05655 (0.0852131s)][1.92381 (0.135488s)]]
+[[tommath_int][6.17078 (0.131775s)][4.8567 (0.145151s)][3.64659 (0.151097s)][4.78192 (0.336776s)]]
 ]
 [table Operator ^(int)
-[[Backend][64 Bits][128 Bits][256 Bits][512 Bits][1024 Bits]]
-[[fixed_int][[*1] (0.00236664s)][[*1] (0.0035339s)][[*1] (0.0100442s)][[*1] (0.0155814s)][[*1] (0.0293253s)]]
-[[gmp_int][61.4272 (0.145376s)][41.6319 (0.147123s)][14.9744 (0.150405s)][9.64857 (0.150338s)][5.46649 (0.160306s)]]
-[[tommath_int][145.509 (0.344367s)][93.9055 (0.331853s)][35.0456 (0.352003s)][22.7371 (0.354275s)][19.1373 (0.561207s)]]
+[[Backend][128 Bits][256 Bits][512 Bits][1024 Bits]]
+[[cpp_int][1.89396 (0.0383127s)][1.64269 (0.043417s)][1.5386 (0.0477162s)][1.32247 (0.0568053s)]]
+[[cpp_int(fixed)][[*1] (0.0202288s)][[*1] (0.0264305s)][[*1] (0.0310128s)][[*1] (0.0429539s)]]
+[[gmp_int][7.01953 (0.141997s)][5.47513 (0.14471s)][4.6627 (0.144603s)][3.59601 (0.154463s)]]
+[[tommath_int][16.2706 (0.329134s)][12.9494 (0.342258s)][11.3305 (0.35139s)][14.1712 (0.608709s)]]
 ]
 [table Operator |
-[[Backend][64 Bits][128 Bits][256 Bits][512 Bits][1024 Bits]]
-[[fixed_int][[*1] (0.00295261s)][[*1] (0.00560832s)][[*1] (0.0127056s)][[*1] (0.0200759s)][[*1] (0.034651s)]]
-[[gmp_int][14.1091 (0.0416586s)][8.52475 (0.0478096s)][4.74593 (0.0602998s)][4.19694 (0.0842575s)][3.85525 (0.133588s)]]
-[[tommath_int][44.8889 (0.132539s)][25.2503 (0.141612s)][11.0488 (0.140382s)][7.39273 (0.148416s)][9.75809 (0.338127s)]]
+[[Backend][128 Bits][256 Bits][512 Bits][1024 Bits]]
+[[cpp_int][1.34742 (0.0296944s)][1.25923 (0.0384846s)][1.20517 (0.0493908s)][1.10536 (0.0761343s)]]
+[[cpp_int(fixed)][[*1] (0.0220379s)][[*1] (0.030562s)][[*1] (0.0409823s)][[*1] (0.0688775s)]]
+[[gmp_int][2.14429 (0.0472558s)][1.95901 (0.0598712s)][2.07584 (0.0850728s)][1.94265 (0.133805s)]]
+[[tommath_int][5.98286 (0.13185s)][4.65705 (0.142329s)][3.85812 (0.158115s)][4.81524 (0.331662s)]]
 ]
 [table Operator |(int)
-[[Backend][64 Bits][128 Bits][256 Bits][512 Bits][1024 Bits]]
-[[fixed_int][[*1] (0.00244005s)][[*1] (0.0040142s)][[*1] (0.00983777s)][[*1] (0.0155223s)][[*1] (0.0293444s)]]
-[[gmp_int][64.6148 (0.157663s)][34.5827 (0.138822s)][14.2764 (0.140448s)][10.3248 (0.160264s)][5.33565 (0.156572s)]]
-[[tommath_int][137.825 (0.3363s)][81.1074 (0.325581s)][34.8737 (0.343079s)][22.3727 (0.347276s)][18.912 (0.554963s)]]
+[[Backend][128 Bits][256 Bits][512 Bits][1024 Bits]]
+[[cpp_int][1.40808 (0.0389721s)][1.65035 (0.0437872s)][1.51667 (0.0466144s)][1.37806 (0.0582842s)]]
+[[cpp_int(fixed)][[*1] (0.0276775s)][[*1] (0.026532s)][[*1] (0.0307348s)][[*1] (0.0422945s)]]
+[[gmp_int][5.31451 (0.147092s)][5.37333 (0.142565s)][4.86508 (0.149527s)][3.74364 (0.158335s)]]
+[[tommath_int][11.9312 (0.330226s)][12.943 (0.343403s)][11.4457 (0.35178s)][14.4462 (0.610997s)]]
+]
+[table Operator gcd
+[[Backend][128 Bits][256 Bits][512 Bits][1024 Bits]]
+[[cpp_int][1.82514 (4.45586s)][1.75955 (10.1748s)][1.87025 (25.23s)][2.11453 (68.8556s)]]
+[[cpp_int(fixed)][1.57965 (3.85654s)][1.67404 (9.68027s)][1.8405 (24.8287s)][2.27588 (74.1096s)]]
+[[gmp_int][[*1] (2.44138s)][[*1] (5.78259s)][[*1] (13.4902s)][[*1] (32.5631s)]]
+[[tommath_int][5.01357 (12.24s)][4.38161 (25.337s)][4.08681 (55.1319s)][4.01045 (130.593s)]]
+]
+[table Operator str
+[[Backend][128 Bits][256 Bits][512 Bits][1024 Bits]]
+[[cpp_int][1.46421 (0.00195137s)][1.21669 (0.00319216s)][1.25041 (0.00765237s)][1.53339 (0.0218096s)]]
+[[cpp_int(fixed)][[*1] (0.00133271s)][[*1] (0.00262366s)][1.0109 (0.00618661s)][1.24429 (0.0176978s)]]
+[[gmp_int][1.7777 (0.00236916s)][1.27408 (0.00334274s)][[*1] (0.00611991s)][[*1] (0.0142232s)]]
+[[tommath_int][11.9797 (0.0159654s)][18.3349 (0.0481046s)][18.3681 (0.112411s)][25.0355 (0.356085s)]]
+]
+[endsect]
+
+[section:rational_performance Rational Type Perfomance]
+
+Note that these tests are carefully designed to test performance of the underlying algorithms
+and not memory allocation or variable copying. As usual, performance results should be taken
+with a healthy dose of scepticsm, and real-world peformance may vary widely depending upon the
+specifics of the program. In each table relative times are given first, with the best performer
+given a score of 1. Total actual times are given in brackets, measured in seconds for 500000
+operations.
+
+Test code was compiled with Microsoft Visual Studio 2010 with all optimisations
+turned on (/Ox), and used MPIR-2.3.0 and [mpfr]-3.0.0. The tests were run on 32-bit
+Windows Vista machine.
+
+[table Operator +
+[[Backend][128 Bits][256 Bits][512 Bits][1024 Bits]]
+[[cpp_rational][5.91758 (18.1263s)][6.60754 (44.1182s)][6.65334 (103.169s)][6.44717 (244.055s)]]
+[[mpq_rational][[*1] (3.06312s)][[*1] (6.67695s)][[*1] (15.5064s)][[*1] (37.8546s)]]
+]
+[table Operator +(int)
+[[Backend][128 Bits][256 Bits][512 Bits][1024 Bits]]
+[[cpp_rational][3.98512 (2.67249s)][4.24335 (3.04309s)][4.65009 (3.83046s)][5.45832 (5.08346s)]]
+[[mpq_rational][[*1] (0.670618s)][[*1] (0.717144s)][[*1] (0.823739s)][[*1] (0.931322s)]]
+]
+[table Operator -
+[[Backend][128 Bits][256 Bits][512 Bits][1024 Bits]]
+[[cpp_rational][5.91504 (18.2374s)][6.55676 (43.8659s)][6.66239 (103.481s)][6.47224 (244.887s)]]
+[[mpq_rational][[*1] (3.08322s)][[*1] (6.69018s)][[*1] (15.5321s)][[*1] (37.8365s)]]
+]
+[table Operator -(int)
+[[Backend][128 Bits][256 Bits][512 Bits][1024 Bits]]
+[[cpp_rational][3.96173 (2.66785s)][4.36532 (3.09023s)][4.59363 (3.74494s)][5.43075 (5.09156s)]]
+[[mpq_rational][[*1] (0.673405s)][[*1] (0.707904s)][[*1] (0.815246s)][[*1] (0.937541s)]]
+]
+[table Operator *
+[[Backend][128 Bits][256 Bits][512 Bits][1024 Bits]]
+[[cpp_rational][5.59286 (32.3559s)][6.54125 (82.4247s)][6.8815 (197.198s)][6.84066 (473.057s)]]
+[[mpq_rational][[*1] (5.78521s)][[*1] (12.6008s)][[*1] (28.6562s)][[*1] (69.1537s)]]
+]
+[table Operator *(int)
+[[Backend][128 Bits][256 Bits][512 Bits][1024 Bits]]
+[[cpp_rational][2.70193 (3.1466s)][3.10134 (3.79056s)][3.659 (4.93935s)][4.61372 (6.89845s)]]
+[[mpq_rational][[*1] (1.16457s)][[*1] (1.22223s)][[*1] (1.34992s)][[*1] (1.4952s)]]
+]
+[table Operator /
+[[Backend][128 Bits][256 Bits][512 Bits][1024 Bits]]
+[[cpp_rational][4.36846 (63.9498s)][5.52565 (145.045s)][6.18331 (328.069s)][6.49822 (784.806s)]]
+[[mpq_rational][[*1] (14.639s)][[*1] (26.2494s)][[*1] (53.0571s)][[*1] (120.772s)]]
+]
+[table Operator /(int)
+[[Backend][128 Bits][256 Bits][512 Bits][1024 Bits]]
+[[cpp_rational][2.26643 (3.13785s)][2.57125 (3.76931s)][3.20872 (5.06758s)][4.02177 (7.17803s)]]
+[[mpq_rational][[*1] (1.38449s)][[*1] (1.46594s)][[*1] (1.57931s)][[*1] (1.78479s)]]
+]
+[table Operator str
+[[Backend][128 Bits][256 Bits][512 Bits][1024 Bits]]
+[[cpp_rational][5.40493 (0.0199393s)][8.55089 (0.0511907s)][9.91026 (0.118839s)][9.93546 (0.285367s)]]
+[[mpq_rational][[*1] (0.00368909s)][[*1] (0.00598659s)][[*1] (0.0119915s)][[*1] (0.028722s)]]
 ]
 [endsect]
 

Added: sandbox/big_number/libs/multiprecision/performance/miller_rabin_performance.cpp
==============================================================================
--- (empty file)
+++ sandbox/big_number/libs/multiprecision/performance/miller_rabin_performance.cpp 2012-03-21 05:19:57 EDT (Wed, 21 Mar 2012)
@@ -0,0 +1,164 @@
+///////////////////////////////////////////////////////////////
+// Copyright 2012 John Maddock. Distributed under the Boost
+// Software License, Version 1.0. (See accompanying file
+// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_
+
+#define BOOST_CHRONO_HEADER_ONLY
+
+#if !defined(TEST_MPZ) && !defined(TEST_TOMMATH) && !defined(TEST_CPP_INT)
+# define TEST_MPZ
+# define TEST_TOMMATH
+# define TEST_CPP_INT
+#endif
+
+#ifdef TEST_MPZ
+#include <boost/multiprecision/gmp.hpp>
+#endif
+#ifdef TEST_TOMMATH
+#include <boost/multiprecision/tommath.hpp>
+#endif
+#ifdef TEST_CPP_INT
+#include <boost/multiprecision/cpp_int.hpp>
+#endif
+#include <boost/multiprecision/miller_rabin.hpp>
+#include <boost/chrono.hpp>
+#include <map>
+
+template <class Clock>
+struct stopwatch
+{
+ typedef typename Clock::duration duration;
+ stopwatch()
+ {
+ m_start = Clock::now();
+ }
+ duration elapsed()
+ {
+ return Clock::now() - m_start;
+ }
+ void reset()
+ {
+ m_start = Clock::now();
+ }
+
+private:
+ typename Clock::time_point m_start;
+};
+
+unsigned allocation_count = 0;
+
+void *(*alloc_func_ptr) (size_t);
+void *(*realloc_func_ptr) (void *, size_t, size_t);
+void (*free_func_ptr) (void *, size_t);
+
+void *alloc_func(size_t n)
+{
+ ++allocation_count;
+ return (*alloc_func_ptr)(n);
+}
+
+void free_func(void * p, size_t n)
+{
+ (*free_func_ptr)(p, n);
+}
+
+void * realloc_func(void * p, size_t old, size_t n)
+{
+ ++allocation_count;
+ return (*realloc_func_ptr)(p, old, n);
+}
+
+boost::chrono::duration<double> test_miller_rabin_gmp()
+{
+ using namespace boost::random;
+ using namespace boost::multiprecision;
+
+ stopwatch<boost::chrono::high_resolution_clock> c;
+
+ independent_bits_engine<mt11213b, 256, mpz_int> gen;
+
+ for(unsigned i = 0; i < 1000; ++i)
+ {
+ mpz_int n = gen();
+ mpz_probab_prime_p(n.backend().data(), 25);
+ }
+ return c.elapsed();
+}
+
+std::map<std::string, double> results;
+double min_time = (std::numeric_limits<double>::max)();
+
+template <class IntType>
+boost::chrono::duration<double> test_miller_rabin(const char* name)
+{
+ using namespace boost::random;
+
+ stopwatch<boost::chrono::high_resolution_clock> c;
+
+ independent_bits_engine<mt11213b, 256, IntType> gen;
+ //
+ // We must use a different generator for the tests and number generation, otherwise
+ // we get false positives.
+ //
+ mt19937 gen2;
+
+ for(unsigned i = 0; i < 1000; ++i)
+ {
+ IntType n = gen();
+ miller_rabin_test(n, 25, gen2);
+ }
+ boost::chrono::duration<double> t = c.elapsed();
+ double d = t.count();
+ if(d < min_time)
+ min_time = d;
+ results[name] = d;
+ std::cout << "Time for " << std::setw(30) << std::left << name << " = " << d << std::endl;
+ return t;
+}
+
+void generate_quickbook()
+{
+ std::cout << "[table\n";
+
+ std::map<std::string, double>::const_iterator i(results.begin()), j(results.end());
+
+ while(i != j)
+ {
+ double rel = i->second / min_time;
+ std::cout << "[[" << i->first << "][" << rel << "(" << i->second << "s)]]\n";
+ ++i;
+ }
+
+ std::cout << "]\n";
+}
+
+int main()
+{
+ using namespace boost::multiprecision;
+#ifdef TEST_CPP_INT
+ test_miller_rabin<mp_number<cpp_int_backend<>, false> >("cpp_int (no Expression templates)");
+ test_miller_rabin<cpp_int>("cpp_int");
+ test_miller_rabin<mp_number<cpp_int_backend<64>, false> >("cpp_int (64-bit cache)");
+ test_miller_rabin<mp_number<cpp_int_backend<256>, false> >("cpp_int (256-bit cache)");
+ test_miller_rabin<mp_number<cpp_int_backend<512>, false> >("cpp_int (512-bit cache)");
+ test_miller_rabin<mp_number<cpp_int_backend<1024>, false> >("cpp_int (1024-bit cache)");
+ test_miller_rabin<mp_number<cpp_int_backend<1024, true, void>, false> >("mp_int1024_t (no Expression templates)");
+ test_miller_rabin<mp_int1024_t>("mp_int1024_t");
+#endif
+#ifdef TEST_MPZ
+ test_miller_rabin<mp_number<gmp_int, false> >("mpz_int (no Expression templates)");
+ test_miller_rabin<mpz_int>("mpz_int");
+ std::cout << "Time for mpz_int (native Miller Rabin Test) = " << test_miller_rabin_gmp() << std::endl;
+#endif
+#ifdef TEST_TOMMATH
+ test_miller_rabin<mp_number<boost::multiprecision::tommath_int, false> >("mp_int (no Expression templates)");
+ test_miller_rabin<boost::multiprecision::mp_int>("mp_int");
+#endif
+ mp_get_memory_functions(&alloc_func_ptr, &realloc_func_ptr, &free_func_ptr);
+ mp_set_memory_functions(&alloc_func, &realloc_func, &free_func);
+
+ generate_quickbook();
+
+ return 0;
+}
+

Modified: sandbox/big_number/libs/multiprecision/performance/performance_test-msvc-10.log
==============================================================================
--- sandbox/big_number/libs/multiprecision/performance/performance_test-msvc-10.log (original)
+++ sandbox/big_number/libs/multiprecision/performance/performance_test-msvc-10.log 2012-03-21 05:19:57 EDT (Wed, 21 Mar 2012)
@@ -1,621 +1,718 @@
-gmp_float 50 + 0.108402
-gmp_float 50 - 0.124108
-gmp_float 50 * 0.268372
-gmp_float 50 / 1.23366
-gmp_float 50 str 0.0129107
-gmp_float 50 +(int)0.0336201
-gmp_float 50 -(int)0.133911
-gmp_float 50 *(int)0.0412457
-gmp_float 50 /(int)0.174836
-gmp_float 100 + 0.113853
-gmp_float 100 - 0.117253
-gmp_float 100 * 0.395718
-gmp_float 100 / 1.62424
-gmp_float 100 str 0.0203967
-gmp_float 100 +(int)0.0353951
-gmp_float 100 -(int)0.131355
-gmp_float 100 *(int)0.0433772
-gmp_float 100 /(int)0.22889
-gmp_float 500 + 0.15342
-gmp_float 500 - 0.165713
-gmp_float 500 * 3.28705
-gmp_float 500 / 7.9874
-gmp_float 500 str 0.138075
-gmp_float 500 +(int)0.0630232
-gmp_float 500 -(int)0.186319
-gmp_float 500 *(int)0.0821206
-gmp_float 500 /(int)0.694411
-gmp_int 64 + 0.0390717
-gmp_int 64 - 0.0424608
-gmp_int 64 * 0.0560369
-gmp_int 64 / 0.775316
-gmp_int 64 str 0.00132216
-gmp_int 64 +(int)0.031766
-gmp_int 64 -(int)0.0303454
-gmp_int 64 *(int)0.0203397
-gmp_int 64 /(int)0.042564
-gmp_int 64 % 0.73595
-gmp_int 64 | 0.0416586
-gmp_int 64 & 0.0477189
-gmp_int 64 ^ 0.0429392
-gmp_int 64 << 0.0230509
-gmp_int 64 >> 0.0271544
-gmp_int 64 %(int)0.0340695
-gmp_int 64 |(int)0.157663
-gmp_int 64 &(int)0.157502
-gmp_int 64 ^(int)0.145376
-gmp_int 128 + 0.0422553
-gmp_int 128 - 0.0408253
-gmp_int 128 * 0.0663044
-gmp_int 128 / 0.880715
-gmp_int 128 str 0.00222046
-gmp_int 128 +(int)0.0317741
-gmp_int 128 -(int)0.0304669
-gmp_int 128 *(int)0.0244196
-gmp_int 128 /(int)0.06838
-gmp_int 128 % 0.749422
-gmp_int 128 | 0.0478096
-gmp_int 128 & 0.0528211
-gmp_int 128 ^ 0.0534314
-gmp_int 128 << 0.0255925
-gmp_int 128 >> 0.0276968
-gmp_int 128 %(int)0.0554367
-gmp_int 128 |(int)0.138822
-gmp_int 128 &(int)0.149717
-gmp_int 128 ^(int)0.147123
-gmp_int 256 + 0.0434751
-gmp_int 256 - 0.0463496
-gmp_int 256 * 0.127636
-gmp_int 256 / 0.908404
-gmp_int 256 str 0.00304557
-gmp_int 256 +(int)0.0417573
-gmp_int 256 -(int)0.0405733
-gmp_int 256 *(int)0.025582
-gmp_int 256 /(int)0.104957
-gmp_int 256 % 0.772122
-gmp_int 256 | 0.0602998
-gmp_int 256 & 0.0653902
-gmp_int 256 ^ 0.0613552
-gmp_int 256 << 0.031955
-gmp_int 256 >> 0.0314426
-gmp_int 256 %(int)0.0967406
-gmp_int 256 |(int)0.140448
-gmp_int 256 &(int)0.153268
-gmp_int 256 ^(int)0.150405
-gmp_int 512 + 0.0503875
-gmp_int 512 - 0.051838
-gmp_int 512 * 0.53821
-gmp_int 512 / 1.03572
-gmp_int 512 str 0.00604351
-gmp_int 512 +(int)0.0645488
-gmp_int 512 -(int)0.0599252
-gmp_int 512 *(int)0.033311
-gmp_int 512 /(int)0.187096
-gmp_int 512 % 0.874894
-gmp_int 512 | 0.0842575
-gmp_int 512 & 0.0917698
-gmp_int 512 ^ 0.0864335
-gmp_int 512 << 0.0443618
-gmp_int 512 >> 0.0322188
-gmp_int 512 %(int)0.180504
-gmp_int 512 |(int)0.160264
-gmp_int 512 &(int)0.159328
-gmp_int 512 ^(int)0.150338
-gmp_int 1024 + 0.0702458
-gmp_int 1024 - 0.0779673
-gmp_int 1024 * 1.52168
-gmp_int 1024 / 1.29625
-gmp_int 1024 str 0.0143268
-gmp_int 1024 +(int)0.107903
-gmp_int 1024 -(int)0.105058
-gmp_int 1024 *(int)0.048001
-gmp_int 1024 /(int)0.35331
-gmp_int 1024 % 1.07382
-gmp_int 1024 | 0.133588
-gmp_int 1024 & 0.140007
-gmp_int 1024 ^ 0.134421
-gmp_int 1024 << 0.0707887
-gmp_int 1024 >> 0.0405327
-gmp_int 1024 %(int)0.347216
-gmp_int 1024 |(int)0.156572
-gmp_int 1024 &(int)0.166481
-gmp_int 1024 ^(int)0.160306
-mpq_rational 64 + 1.47032
-mpq_rational 64 - 1.48169
-mpq_rational 64 * 2.67402
-mpq_rational 64 / 9.26405
-mpq_rational 64 str 0.00265159
-mpq_rational 64 +(int)0.639153
-mpq_rational 64 -(int)0.650283
-mpq_rational 64 *(int)1.15673
-mpq_rational 64 /(int)1.40596
-mpq_rational 128 + 3.1599
-mpq_rational 128 - 3.17694
-mpq_rational 128 * 5.89806
-mpq_rational 128 / 14.7461
-mpq_rational 128 str 0.00363964
-mpq_rational 128 +(int)0.683218
-mpq_rational 128 -(int)0.669498
-mpq_rational 128 *(int)1.20559
-mpq_rational 128 /(int)1.42215
-mpq_rational 256 + 6.74926
-mpq_rational 256 - 6.75317
-mpq_rational 256 * 12.7524
-mpq_rational 256 / 26.4939
-mpq_rational 256 str 0.00677698
-mpq_rational 256 +(int)0.725686
-mpq_rational 256 -(int)0.707811
-mpq_rational 256 *(int)1.25776
-mpq_rational 256 /(int)1.50342
-mpq_rational 512 + 16.7334
-mpq_rational 512 - 15.9167
-mpq_rational 512 * 29.4044
-mpq_rational 512 / 54.0641
-mpq_rational 512 str 0.0117945
-mpq_rational 512 +(int)0.895283
-mpq_rational 512 -(int)0.83232
-mpq_rational 512 *(int)1.41413
-mpq_rational 512 /(int)1.62326
-mpq_rational 1024 + 38.5739
-mpq_rational 1024 - 39.0541
-mpq_rational 1024 * 70.1615
-mpq_rational 1024 / 126.261
-mpq_rational 1024 str 0.0283447
-mpq_rational 1024 +(int)0.931053
-mpq_rational 1024 -(int)1.06134
-mpq_rational 1024 *(int)1.59151
-mpq_rational 1024 /(int)1.7796
-tommath_int 64 + 0.018872
-tommath_int 64 - 0.0237699
-tommath_int 64 * 0.0670506
-tommath_int 64 / 1.79253
-tommath_int 64 str 0.00734164
-tommath_int 64 +(int)0.224655
-tommath_int 64 -(int)0.202873
-tommath_int 64 *(int)0.239357
-tommath_int 64 /(int)1.37938
-tommath_int 64 % 2.56986
-tommath_int 64 | 0.132539
-tommath_int 64 & 0.130147
-tommath_int 64 ^ 0.127996
-tommath_int 64 << 0.0314737
-tommath_int 64 >> 0.250865
-tommath_int 64 %(int)1.46083
-tommath_int 64 |(int)0.3363
-tommath_int 64 &(int)0.342626
-tommath_int 64 ^(int)0.344367
-tommath_int 128 + 0.0216659
-tommath_int 128 - 0.0270677
-tommath_int 128 * 0.111722
-tommath_int 128 / 2.13582
-tommath_int 128 str 0.0163193
-tommath_int 128 +(int)0.22725
-tommath_int 128 -(int)0.207089
-tommath_int 128 *(int)0.249452
-tommath_int 128 /(int)1.62383
-tommath_int 128 % 2.19585
-tommath_int 128 | 0.141612
-tommath_int 128 & 0.130002
-tommath_int 128 ^ 0.130457
-tommath_int 128 << 0.0389456
-tommath_int 128 >> 0.251932
-tommath_int 128 %(int)1.65639
-tommath_int 128 |(int)0.325581
-tommath_int 128 &(int)0.331077
-tommath_int 128 ^(int)0.331853
-tommath_int 256 + 0.0301548
-tommath_int 256 - 0.0382195
-tommath_int 256 * 0.34452
-tommath_int 256 / 3.03438
-tommath_int 256 str 0.0450349
-tommath_int 256 +(int)0.2481
-tommath_int 256 -(int)0.220375
-tommath_int 256 *(int)0.273682
-tommath_int 256 /(int)2.32908
-tommath_int 256 % 3.10053
-tommath_int 256 | 0.140382
-tommath_int 256 & 0.145711
-tommath_int 256 ^ 0.145171
-tommath_int 256 << 0.065292
-tommath_int 256 >> 0.296661
-tommath_int 256 %(int)2.26685
-tommath_int 256 |(int)0.343079
-tommath_int 256 &(int)0.351853
-tommath_int 256 ^(int)0.352003
-tommath_int 512 + 0.0425188
-tommath_int 512 - 0.0488346
-tommath_int 512 * 0.995374
-tommath_int 512 / 5.01541
-tommath_int 512 str 0.119168
-tommath_int 512 +(int)0.27807
-tommath_int 512 -(int)0.280258
-tommath_int 512 *(int)0.462652
-tommath_int 512 /(int)3.72421
-tommath_int 512 % 4.75068
-tommath_int 512 | 0.148416
-tommath_int 512 & 0.155508
-tommath_int 512 ^ 0.158845
-tommath_int 512 << 0.0939451
-tommath_int 512 >> 0.313884
-tommath_int 512 %(int)3.5978
-tommath_int 512 |(int)0.347276
-tommath_int 512 &(int)0.364899
-tommath_int 512 ^(int)0.354275
-tommath_int 1024 + 0.0717123
-tommath_int 1024 - 0.0769566
-tommath_int 1024 * 3.12935
-tommath_int 1024 / 11.517
-tommath_int 1024 str 0.377431
-tommath_int 1024 +(int)0.293538
-tommath_int 1024 -(int)0.260488
-tommath_int 1024 *(int)0.437175
-tommath_int 1024 /(int)8.55783
-tommath_int 1024 % 11.5211
-tommath_int 1024 | 0.338127
-tommath_int 1024 & 0.331858
-tommath_int 1024 ^ 0.340584
-tommath_int 1024 << 0.163725
-tommath_int 1024 >> 0.506974
-tommath_int 1024 %(int)8.682
-tommath_int 1024 |(int)0.554963
-tommath_int 1024 &(int)0.605213
-tommath_int 1024 ^(int)0.561207
-fixed_int 64 + 0.0031291
-fixed_int 64 - 0.00339191
-fixed_int 64 * 0.0223481
-fixed_int 64 / 0.0991632
-fixed_int 64 str 0.000465841
-fixed_int 64 +(int)0.00335294
-fixed_int 64 -(int)0.00250933
-fixed_int 64 *(int)0.00444316
-fixed_int 64 /(int)0.0443082
-fixed_int 64 % 0.0946529
-fixed_int 64 | 0.00295261
-fixed_int 64 & 0.00298048
-fixed_int 64 ^ 0.00307714
-fixed_int 64 << 0.0119095
-fixed_int 64 >> 0.006361
-fixed_int 64 %(int)0.0425984
-fixed_int 64 |(int)0.00244005
-fixed_int 64 &(int)0.00222291
-fixed_int 64 ^(int)0.00236664
-fixed_int 128 + 0.00703043
-fixed_int 128 - 0.0073172
-fixed_int 128 * 0.0375288
-fixed_int 128 / 0.172328
-fixed_int 128 str 0.00102073
-fixed_int 128 +(int)0.00376116
-fixed_int 128 -(int)0.00358055
-fixed_int 128 *(int)0.0135739
-fixed_int 128 /(int)0.110308
-fixed_int 128 % 0.170561
-fixed_int 128 | 0.00560832
-fixed_int 128 & 0.00546222
-fixed_int 128 ^ 0.00538197
-fixed_int 128 << 0.0131746
-fixed_int 128 >> 0.00880189
-fixed_int 128 %(int)0.106226
-fixed_int 128 |(int)0.0040142
-fixed_int 128 &(int)0.0035522
-fixed_int 128 ^(int)0.0035339
-fixed_int 256 + 0.0163669
-fixed_int 256 - 0.0166428
-fixed_int 256 * 0.120353
-fixed_int 256 / 0.309492
-fixed_int 256 str 0.00207212
-fixed_int 256 +(int)0.00985174
-fixed_int 256 -(int)0.0103282
-fixed_int 256 *(int)0.0192615
-fixed_int 256 /(int)0.229148
-fixed_int 256 % 0.328458
-fixed_int 256 | 0.0127056
-fixed_int 256 & 0.0127546
-fixed_int 256 ^ 0.0127717
-fixed_int 256 << 0.0213483
-fixed_int 256 >> 0.0180295
-fixed_int 256 %(int)0.195577
-fixed_int 256 |(int)0.00983777
-fixed_int 256 &(int)0.0110247
-fixed_int 256 ^(int)0.0100442
-fixed_int 512 + 0.0326567
-fixed_int 512 - 0.0349375
-fixed_int 512 * 0.439147
-fixed_int 512 / 0.573815
-fixed_int 512 str 0.0062017
-fixed_int 512 +(int)0.0119345
-fixed_int 512 -(int)0.0119127
-fixed_int 512 *(int)0.0328339
-fixed_int 512 /(int)0.442167
-fixed_int 512 % 0.575884
-fixed_int 512 | 0.0200759
-fixed_int 512 & 0.01985
-fixed_int 512 ^ 0.0198304
-fixed_int 512 << 0.0247552
-fixed_int 512 >> 0.0220786
-fixed_int 512 %(int)0.387067
-fixed_int 512 |(int)0.0155223
-fixed_int 512 &(int)0.0154281
-fixed_int 512 ^(int)0.0155814
-fixed_int 1024 + 0.0603087
-fixed_int 1024 - 0.0600083
-fixed_int 1024 * 1.46969
-fixed_int 1024 / 1.06356
-fixed_int 1024 str 0.0190043
-fixed_int 1024 +(int)0.0170918
-fixed_int 1024 -(int)0.0176089
-fixed_int 1024 *(int)0.0567364
-fixed_int 1024 /(int)0.866172
-fixed_int 1024 % 1.05006
-fixed_int 1024 | 0.034651
-fixed_int 1024 & 0.0349286
-fixed_int 1024 ^ 0.0345822
-fixed_int 1024 << 0.0339579
-fixed_int 1024 >> 0.0325312
-fixed_int 1024 %(int)0.776075
-fixed_int 1024 |(int)0.0293444
-fixed_int 1024 &(int)0.0275044
-fixed_int 1024 ^(int)0.0293253
-cpp_float 50 + 0.02382
-cpp_float 50 - 0.0265783
-cpp_float 50 * 0.287898
-cpp_float 50 / 4.00108
-cpp_float 50 str 0.0188303
-cpp_float 50 +(int)0.0527023
-cpp_float 50 -(int)0.0577674
-cpp_float 50 *(int)0.11959
-cpp_float 50 /(int)0.253675
-cpp_float 100 + 0.0294619
-cpp_float 100 - 0.031465
-cpp_float 100 * 0.584569
-cpp_float 100 / 8.12985
-cpp_float 100 str 0.03172
-cpp_float 100 +(int)0.0618102
-cpp_float 100 -(int)0.0633795
-cpp_float 100 *(int)0.197945
-cpp_float 100 /(int)0.419569
-cpp_float 500 + 0.058466
-cpp_float 500 - 0.0619405
-cpp_float 500 * 5.09969
-cpp_float 500 / 54.2796
-cpp_float 500 str 0.131962
-cpp_float 500 +(int)0.105927
-cpp_float 500 -(int)0.11146
-cpp_float 500 *(int)0.742044
-cpp_float 500 /(int)1.64187
-mpfr_float 50 + 0.060035
-mpfr_float 50 - 0.0741774
-mpfr_float 50 * 0.341642
-mpfr_float 50 / 1.63486
-mpfr_float 50 str 0.0282764
-mpfr_float 50 +(int)0.105861
-mpfr_float 50 -(int)0.141577
-mpfr_float 50 *(int)0.152407
-mpfr_float 50 /(int)0.204088
-mpfr_float 100 + 0.0643242
-mpfr_float 100 - 0.0782083
-mpfr_float 100 * 0.465557
-mpfr_float 100 / 2.25716
-mpfr_float 100 str 0.0376683
-mpfr_float 100 +(int)0.111671
-mpfr_float 100 -(int)0.145249
-mpfr_float 100 *(int)0.161353
-mpfr_float 100 /(int)0.259127
-mpfr_float 500 + 0.0805287
-mpfr_float 500 - 0.0934957
-mpfr_float 500 * 3.7482
-mpfr_float 500 / 13.7713
-mpfr_float 500 str 0.158743
-mpfr_float 500 +(int)0.121528
-mpfr_float 500 -(int)0.155487
-mpfr_float 500 *(int)0.271785
-mpfr_float 500 /(int)0.708513
+gmp_float 50 + 0.111016
+gmp_float 50 - 0.119562
+gmp_float 50 * 0.266947
+gmp_float 50 / 1.23608
+gmp_float 50 str 0.0299824
+gmp_float 50 +(int)0.0320709
+gmp_float 50 -(int)0.130453
+gmp_float 50 *(int)0.0391224
+gmp_float 50 /(int)0.178268
+gmp_float 100 + 0.108884
+gmp_float 100 - 0.118595
+gmp_float 100 * 0.401792
+gmp_float 100 / 1.60879
+gmp_float 100 str 0.0207461
+gmp_float 100 +(int)0.0346436
+gmp_float 100 -(int)0.131897
+gmp_float 100 *(int)0.0435089
+gmp_float 100 /(int)0.23715
+gmp_float 500 + 0.143065
+gmp_float 500 - 0.151427
+gmp_float 500 * 3.22591
+gmp_float 500 / 8.09281
+gmp_float 500 str 0.136249
+gmp_float 500 +(int)0.0567182
+gmp_float 500 -(int)0.164247
+gmp_float 500 *(int)0.0824826
+gmp_float 500 /(int)0.693418
+gmp_int 128 + 0.0416325
+gmp_int 128 - 0.0409536
+gmp_int 128 * 0.0673622
+gmp_int 128 / 0.8304
+gmp_int 128 str 0.00202218
+gmp_int 128 +(int)0.0297328
+gmp_int 128 -(int)0.0296573
+gmp_int 128 *(int)0.0225369
+gmp_int 128 /(int)0.0545672
+gmp_int 128 % 0.626244
+gmp_int 128 | 0.0491246
+gmp_int 128 & 0.0530007
+gmp_int 128 ^ 0.0485553
+gmp_int 128 << 0.0260055
+gmp_int 128 >> 0.0275053
+gmp_int 128 %(int)0.0553103
+gmp_int 128 |(int)0.14092
+gmp_int 128 &(int)0.146717
+gmp_int 128 ^(int)0.141446
+gmp_int 128 gcd 2.4583
+gmp_int 256 + 0.0437202
+gmp_int 256 - 0.0449331
+gmp_int 256 * 0.128456
+gmp_int 256 / 0.91168
+gmp_int 256 str 0.00293026
+gmp_int 256 +(int)0.0421762
+gmp_int 256 -(int)0.0392365
+gmp_int 256 *(int)0.0260961
+gmp_int 256 /(int)0.101468
+gmp_int 256 % 0.686075
+gmp_int 256 | 0.0605797
+gmp_int 256 & 0.0657431
+gmp_int 256 ^ 0.0628266
+gmp_int 256 << 0.0309127
+gmp_int 256 >> 0.028966
+gmp_int 256 %(int)0.0997194
+gmp_int 256 |(int)0.141959
+gmp_int 256 &(int)0.148873
+gmp_int 256 ^(int)0.145267
+gmp_int 256 gcd 5.7433
+gmp_int 512 + 0.0502054
+gmp_int 512 - 0.053661
+gmp_int 512 * 0.517967
+gmp_int 512 / 1.04166
+gmp_int 512 str 0.00589914
+gmp_int 512 +(int)0.0648096
+gmp_int 512 -(int)0.0579614
+gmp_int 512 *(int)0.0336047
+gmp_int 512 /(int)0.18882
+gmp_int 512 % 0.792461
+gmp_int 512 | 0.0862186
+gmp_int 512 & 0.0910233
+gmp_int 512 ^ 0.086449
+gmp_int 512 << 0.0480825
+gmp_int 512 >> 0.0323891
+gmp_int 512 %(int)0.183615
+gmp_int 512 |(int)0.150229
+gmp_int 512 &(int)0.154253
+gmp_int 512 ^(int)0.156314
+gmp_int 512 gcd 13.5018
+gmp_int 1024 + 0.065979
+gmp_int 1024 - 0.0703067
+gmp_int 1024 * 1.51138
+gmp_int 1024 / 1.26397
+gmp_int 1024 str 0.0145211
+gmp_int 1024 +(int)0.105223
+gmp_int 1024 -(int)0.0997431
+gmp_int 1024 *(int)0.0487139
+gmp_int 1024 /(int)0.374919
+gmp_int 1024 % 1.02412
+gmp_int 1024 | 0.134887
+gmp_int 1024 & 0.148173
+gmp_int 1024 ^ 0.136369
+gmp_int 1024 << 0.0702549
+gmp_int 1024 >> 0.037103
+gmp_int 1024 %(int)0.351263
+gmp_int 1024 |(int)0.155137
+gmp_int 1024 &(int)0.163801
+gmp_int 1024 ^(int)0.15826
+gmp_int 1024 gcd 32.5205
+cpp_int 128 + 0.0271391
+cpp_int 128 - 0.0302204
+cpp_int 128 * 0.0764199
+cpp_int 128 / 0.601063
+cpp_int 128 str 0.00186546
+cpp_int 128 +(int)0.0203604
+cpp_int 128 -(int)0.0155424
+cpp_int 128 *(int)0.0306376
+cpp_int 128 /(int)0.318461
+cpp_int 128 % 0.488484
+cpp_int 128 | 0.0295702
+cpp_int 128 & 0.0299046
+cpp_int 128 ^ 0.0300509
+cpp_int 128 << 0.0220286
+cpp_int 128 >> 0.0208765
+cpp_int 128 %(int)0.197942
+cpp_int 128 |(int)0.0385046
+cpp_int 128 &(int)0.0463351
+cpp_int 128 ^(int)0.0381023
+cpp_int 128 gcd 4.48165
+cpp_int 256 + 0.0354288
+cpp_int 256 - 0.03826
+cpp_int 256 * 0.193581
+cpp_int 256 / 0.694115
+cpp_int 256 str 0.00327905
+cpp_int 256 +(int)0.0238597
+cpp_int 256 -(int)0.0199724
+cpp_int 256 *(int)0.040404
+cpp_int 256 /(int)0.433035
+cpp_int 256 % 0.597931
+cpp_int 256 | 0.0378751
+cpp_int 256 & 0.0389208
+cpp_int 256 ^ 0.0381634
+cpp_int 256 << 0.0294239
+cpp_int 256 >> 0.0265325
+cpp_int 256 %(int)0.298382
+cpp_int 256 |(int)0.0425891
+cpp_int 256 &(int)0.0550224
+cpp_int 256 ^(int)0.0432356
+cpp_int 256 gcd 10.1686
+cpp_int 512 + 0.0536949
+cpp_int 512 - 0.0529947
+cpp_int 512 * 0.656832
+cpp_int 512 / 0.915068
+cpp_int 512 str 0.0076685
+cpp_int 512 +(int)0.0262742
+cpp_int 512 -(int)0.0223562
+cpp_int 512 *(int)0.0537717
+cpp_int 512 /(int)0.641615
+cpp_int 512 % 0.807811
+cpp_int 512 | 0.0523944
+cpp_int 512 & 0.04981
+cpp_int 512 ^ 0.0494246
+cpp_int 512 << 0.0365532
+cpp_int 512 >> 0.0304931
+cpp_int 512 %(int)0.478772
+cpp_int 512 |(int)0.0479629
+cpp_int 512 &(int)0.0697964
+cpp_int 512 ^(int)0.0466764
+cpp_int 512 gcd 25.1877
+cpp_int 1024 + 0.0884854
+cpp_int 1024 - 0.0822931
+cpp_int 1024 * 2.47851
+cpp_int 1024 / 1.36697
+cpp_int 1024 str 0.0217405
+cpp_int 1024 +(int)0.0296193
+cpp_int 1024 -(int)0.0246399
+cpp_int 1024 *(int)0.0790137
+cpp_int 1024 /(int)1.05122
+cpp_int 1024 % 1.24204
+cpp_int 1024 | 0.0751774
+cpp_int 1024 & 0.0745785
+cpp_int 1024 ^ 0.075182
+cpp_int 1024 << 0.0522035
+cpp_int 1024 >> 0.0383751
+cpp_int 1024 %(int)0.85137
+cpp_int 1024 |(int)0.0549147
+cpp_int 1024 &(int)0.101779
+cpp_int 1024 ^(int)0.0550852
+cpp_int 1024 gcd 69.0626
+cpp_int(fixed) 128 + 0.023195
+cpp_int(fixed) 128 - 0.0255758
+cpp_int(fixed) 128 * 0.0560495
+cpp_int(fixed) 128 / 0.20335
+cpp_int(fixed) 128 str 0.00107409
+cpp_int(fixed) 128 +(int)0.013729
+cpp_int(fixed) 128 -(int)0.0103816
+cpp_int(fixed) 128 *(int)0.0290285
+cpp_int(fixed) 128 /(int)0.134603
+cpp_int(fixed) 128 % 0.193104
+cpp_int(fixed) 128 | 0.0211746
+cpp_int(fixed) 128 & 0.0234269
+cpp_int(fixed) 128 ^ 0.0214753
+cpp_int(fixed) 128 << 0.0189966
+cpp_int(fixed) 128 >> 0.0164431
+cpp_int(fixed) 128 %(int)0.111723
+cpp_int(fixed) 128 |(int)0.020319
+cpp_int(fixed) 128 &(int)0.0281931
+cpp_int(fixed) 128 ^(int)0.0205145
+cpp_int(fixed) 128 gcd 3.69729
+cpp_int(fixed) 256 + 0.0316591
+cpp_int(fixed) 256 - 0.0387139
+cpp_int(fixed) 256 * 0.162173
+cpp_int(fixed) 256 / 0.313292
+cpp_int(fixed) 256 str 0.00227396
+cpp_int(fixed) 256 +(int)0.0195617
+cpp_int(fixed) 256 -(int)0.0153586
+cpp_int(fixed) 256 *(int)0.0403434
+cpp_int(fixed) 256 /(int)0.256092
+cpp_int(fixed) 256 % 0.314303
+cpp_int(fixed) 256 | 0.0329594
+cpp_int(fixed) 256 & 0.026925
+cpp_int(fixed) 256 ^ 0.0297291
+cpp_int(fixed) 256 << 0.0262879
+cpp_int(fixed) 256 >> 0.0222577
+cpp_int(fixed) 256 %(int)0.207915
+cpp_int(fixed) 256 |(int)0.0258999
+cpp_int(fixed) 256 &(int)0.0409067
+cpp_int(fixed) 256 ^(int)0.0260211
+cpp_int(fixed) 256 gcd 9.22552
+cpp_int(fixed) 512 + 0.0515755
+cpp_int(fixed) 512 - 0.0475007
+cpp_int(fixed) 512 * 0.462871
+cpp_int(fixed) 512 / 0.52874
+cpp_int(fixed) 512 str 0.00597122
+cpp_int(fixed) 512 +(int)0.0212179
+cpp_int(fixed) 512 -(int)0.0179683
+cpp_int(fixed) 512 *(int)0.0542558
+cpp_int(fixed) 512 /(int)0.459431
+cpp_int(fixed) 512 % 0.512737
+cpp_int(fixed) 512 | 0.0398115
+cpp_int(fixed) 512 & 0.032775
+cpp_int(fixed) 512 ^ 0.0394438
+cpp_int(fixed) 512 << 0.0317039
+cpp_int(fixed) 512 >> 0.0275545
+cpp_int(fixed) 512 %(int)0.38701
+cpp_int(fixed) 512 |(int)0.0306217
+cpp_int(fixed) 512 &(int)0.0539505
+cpp_int(fixed) 512 ^(int)0.0308272
+cpp_int(fixed) 512 gcd 24.8643
+cpp_int(fixed) 1024 + 0.0833072
+cpp_int(fixed) 1024 - 0.0864345
+cpp_int(fixed) 1024 * 1.61211
+cpp_int(fixed) 1024 / 0.965347
+cpp_int(fixed) 1024 str 0.0174989
+cpp_int(fixed) 1024 +(int)0.0286337
+cpp_int(fixed) 1024 -(int)0.0219173
+cpp_int(fixed) 1024 *(int)0.0826023
+cpp_int(fixed) 1024 /(int)0.855435
+cpp_int(fixed) 1024 % 0.944678
+cpp_int(fixed) 1024 | 0.071698
+cpp_int(fixed) 1024 & 0.0503183
+cpp_int(fixed) 1024 ^ 0.0721252
+cpp_int(fixed) 1024 << 0.0488381
+cpp_int(fixed) 1024 >> 0.0382038
+cpp_int(fixed) 1024 %(int)0.760262
+cpp_int(fixed) 1024 |(int)0.0426336
+cpp_int(fixed) 1024 &(int)0.0863606
+cpp_int(fixed) 1024 ^(int)0.0429944
+cpp_int(fixed) 1024 gcd 73.4335
+cpp_rational 128 + 18.1263
+cpp_rational 128 - 18.2374
+cpp_rational 128 * 32.3559
+cpp_rational 128 / 63.9498
+cpp_rational 128 str 0.0199393
+cpp_rational 128 +(int)2.67249
+cpp_rational 128 -(int)2.66785
+cpp_rational 128 *(int)3.1466
+cpp_rational 128 /(int)3.13785
+cpp_rational 256 + 44.1182
+cpp_rational 256 - 43.8659
+cpp_rational 256 * 82.4247
+cpp_rational 256 / 145.045
+cpp_rational 256 str 0.0511907
+cpp_rational 256 +(int)3.04309
+cpp_rational 256 -(int)3.09023
+cpp_rational 256 *(int)3.79056
+cpp_rational 256 /(int)3.76931
+cpp_rational 512 + 103.169
+cpp_rational 512 - 103.481
+cpp_rational 512 * 197.198
+cpp_rational 512 / 328.069
+cpp_rational 512 str 0.118839
+cpp_rational 512 +(int)3.83046
+cpp_rational 512 -(int)3.74494
+cpp_rational 512 *(int)4.93935
+cpp_rational 512 /(int)5.06758
+cpp_rational 1024 + 244.055
+cpp_rational 1024 - 244.887
+cpp_rational 1024 * 473.057
+cpp_rational 1024 / 784.806
+cpp_rational 1024 str 0.285367
+cpp_rational 1024 +(int)5.08346
+cpp_rational 1024 -(int)5.09156
+cpp_rational 1024 *(int)6.89845
+cpp_rational 1024 /(int)7.17803
+mpq_rational 128 + 3.06312
+mpq_rational 128 - 3.08322
+mpq_rational 128 * 5.78521
+mpq_rational 128 / 14.639
+mpq_rational 128 str 0.00368909
+mpq_rational 128 +(int)0.670618
+mpq_rational 128 -(int)0.673405
+mpq_rational 128 *(int)1.16457
+mpq_rational 128 /(int)1.38449
+mpq_rational 256 + 6.67695
+mpq_rational 256 - 6.69018
+mpq_rational 256 * 12.6008
+mpq_rational 256 / 26.2494
+mpq_rational 256 str 0.00598659
+mpq_rational 256 +(int)0.717144
+mpq_rational 256 -(int)0.707904
+mpq_rational 256 *(int)1.22223
+mpq_rational 256 /(int)1.46594
+mpq_rational 512 + 15.5064
+mpq_rational 512 - 15.5321
+mpq_rational 512 * 28.6562
+mpq_rational 512 / 53.0571
+mpq_rational 512 str 0.0119915
+mpq_rational 512 +(int)0.823739
+mpq_rational 512 -(int)0.815246
+mpq_rational 512 *(int)1.34992
+mpq_rational 512 /(int)1.57931
+mpq_rational 1024 + 37.8546
+mpq_rational 1024 - 37.8365
+mpq_rational 1024 * 69.1537
+mpq_rational 1024 / 120.772
+mpq_rational 1024 str 0.028722
+mpq_rational 1024 +(int)0.931322
+mpq_rational 1024 -(int)0.937541
+mpq_rational 1024 *(int)1.4952
+mpq_rational 1024 /(int)1.78479
+tommath_int 128 + 0.0217192
+tommath_int 128 - 0.0291902
+tommath_int 128 * 0.111627
+tommath_int 128 / 2.08463
+tommath_int 128 str 0.0168021
+tommath_int 128 +(int)0.257132
+tommath_int 128 -(int)0.203455
+tommath_int 128 *(int)0.238829
+tommath_int 128 /(int)1.59094
+tommath_int 128 % 2.85844
+tommath_int 128 | 0.129637
+tommath_int 128 & 0.131309
+tommath_int 128 ^ 0.130689
+tommath_int 128 << 0.0401547
+tommath_int 128 >> 0.23176
+tommath_int 128 %(int)1.79288
+tommath_int 128 |(int)0.335087
+tommath_int 128 &(int)0.340397
+tommath_int 128 ^(int)0.336121
+tommath_int 128 gcd 12.105
+tommath_int 256 + 0.0314797
+tommath_int 256 - 0.0397314
+tommath_int 256 * 0.339525
+tommath_int 256 / 2.90357
+tommath_int 256 str 0.0507118
+tommath_int 256 +(int)0.27657
+tommath_int 256 -(int)0.218347
+tommath_int 256 *(int)0.272846
+tommath_int 256 /(int)2.23033
+tommath_int 256 % 3.05431
+tommath_int 256 | 0.14062
+tommath_int 256 & 0.149703
+tommath_int 256 ^ 0.143938
+tommath_int 256 << 0.0663968
+tommath_int 256 >> 0.261181
+tommath_int 256 %(int)2.19631
+tommath_int 256 |(int)0.344931
+tommath_int 256 &(int)0.354773
+tommath_int 256 ^(int)0.337315
+tommath_int 256 gcd 25.2396
+tommath_int 512 + 0.0423742
+tommath_int 512 - 0.0520296
+tommath_int 512 * 0.974058
+tommath_int 512 / 4.55815
+tommath_int 512 str 0.123612
+tommath_int 512 +(int)0.293832
+tommath_int 512 -(int)0.23252
+tommath_int 512 *(int)0.325472
+tommath_int 512 /(int)3.45058
+tommath_int 512 % 4.64676
+tommath_int 512 | 0.149674
+tommath_int 512 & 0.15487
+tommath_int 512 ^ 0.150772
+tommath_int 512 << 0.0938596
+tommath_int 512 >> 0.289806
+tommath_int 512 %(int)3.43906
+tommath_int 512 |(int)0.350645
+tommath_int 512 &(int)0.364622
+tommath_int 512 ^(int)0.347472
+tommath_int 512 gcd 54.7712
+tommath_int 1024 + 0.0724498
+tommath_int 1024 - 0.0774105
+tommath_int 1024 * 3.11813
+tommath_int 1024 / 11.2594
+tommath_int 1024 str 0.380528
+tommath_int 1024 +(int)0.329666
+tommath_int 1024 -(int)0.261392
+tommath_int 1024 *(int)0.41516
+tommath_int 1024 /(int)8.38249
+tommath_int 1024 % 11.2704
+tommath_int 1024 | 0.414581
+tommath_int 1024 & 0.417234
+tommath_int 1024 ^ 0.419285
+tommath_int 1024 << 0.161738
+tommath_int 1024 >> 0.495316
+tommath_int 1024 %(int)8.45761
+tommath_int 1024 |(int)0.587063
+tommath_int 1024 &(int)0.613817
+tommath_int 1024 ^(int)0.587566
+tommath_int 1024 gcd 128.781
+cpp_dec_float 50 + 0.0238412
+cpp_dec_float 50 - 0.026085
+cpp_dec_float 50 * 0.292488
+cpp_dec_float 50 / 3.99158
+cpp_dec_float 50 str 0.0185371
+cpp_dec_float 50 +(int)0.0522868
+cpp_dec_float 50 -(int)0.0588879
+cpp_dec_float 50 *(int)0.118517
+cpp_dec_float 50 /(int)0.246362
+cpp_dec_float 100 + 0.0293132
+cpp_dec_float 100 - 0.0304546
+cpp_dec_float 100 * 0.583535
+cpp_dec_float 100 / 8.1132
+cpp_dec_float 100 str 0.0318154
+cpp_dec_float 100 +(int)0.0626744
+cpp_dec_float 100 -(int)0.0638241
+cpp_dec_float 100 *(int)0.191461
+cpp_dec_float 100 /(int)0.412828
+cpp_dec_float 500 + 0.0605518
+cpp_dec_float 500 - 0.0625459
+cpp_dec_float 500 * 5.08004
+cpp_dec_float 500 / 53.775
+cpp_dec_float 500 str 0.131303
+cpp_dec_float 500 +(int)0.105128
+cpp_dec_float 500 -(int)0.113107
+cpp_dec_float 500 *(int)0.736865
+cpp_dec_float 500 /(int)1.62534
+mpfr_float 50 + 0.0604351
+mpfr_float 50 - 0.073623
+mpfr_float 50 * 0.332216
+mpfr_float 50 / 1.65596
+mpfr_float 50 str 0.0292843
+mpfr_float 50 +(int)0.107103
+mpfr_float 50 -(int)0.141072
+mpfr_float 50 *(int)0.151189
+mpfr_float 50 /(int)0.202945
+mpfr_float 100 + 0.0651951
+mpfr_float 100 - 0.078328
+mpfr_float 100 * 0.462025
+mpfr_float 100 / 2.28108
+mpfr_float 100 str 0.0379418
+mpfr_float 100 +(int)0.112256
+mpfr_float 100 -(int)0.146486
+mpfr_float 100 *(int)0.160234
+mpfr_float 100 /(int)0.256434
+mpfr_float 500 + 0.0777324
+mpfr_float 500 - 0.089375
+mpfr_float 500 * 3.71393
+mpfr_float 500 / 13.6039
+mpfr_float 500 str 0.156426
+mpfr_float 500 +(int)0.123967
+mpfr_float 500 -(int)0.158239
+mpfr_float 500 *(int)0.265474
+mpfr_float 500 /(int)0.709137
 [section:float_performance Float Type Perfomance]
 [table Operator *
 [[Backend][50 Bits][100 Bits][500 Bits]]
-[[cpp_float][1.07276 (0.287898s)][1.47724 (0.584569s)][1.55145 (5.09969s)]]
-[[gmp_float][[*1] (0.268372s)][[*1] (0.395718s)][[*1] (3.28705s)]]
-[[mpfr_float][1.27302 (0.341642s)][1.17649 (0.465557s)][1.14029 (3.7482s)]]
+[[cpp_dec_float][1.09568 (0.292488s)][1.45233 (0.583535s)][1.57476 (5.08004s)]]
+[[gmp_float][[*1] (0.266947s)][[*1] (0.401792s)][[*1] (3.22591s)]]
+[[mpfr_float][1.2445 (0.332216s)][1.14991 (0.462025s)][1.15128 (3.71393s)]]
 ]
 [table Operator *(int)
 [[Backend][50 Bits][100 Bits][500 Bits]]
-[[cpp_float][2.89945 (0.11959s)][4.56335 (0.197945s)][9.03602 (0.742044s)]]
-[[gmp_float][[*1] (0.0412457s)][[*1] (0.0433772s)][[*1] (0.0821206s)]]
-[[mpfr_float][3.6951 (0.152407s)][3.71977 (0.161353s)][3.30958 (0.271785s)]]
+[[cpp_dec_float][3.02939 (0.118517s)][4.40051 (0.191461s)][8.93358 (0.736865s)]]
+[[gmp_float][[*1] (0.0391224s)][[*1] (0.0435089s)][[*1] (0.0824826s)]]
+[[mpfr_float][3.8645 (0.151189s)][3.6828 (0.160234s)][3.21855 (0.265474s)]]
 ]
 [table Operator +
 [[Backend][50 Bits][100 Bits][500 Bits]]
-[[cpp_float][[*1] (0.02382s)][[*1] (0.0294619s)][[*1] (0.058466s)]]
-[[gmp_float][4.55086 (0.108402s)][3.86443 (0.113853s)][2.6241 (0.15342s)]]
-[[mpfr_float][2.52036 (0.060035s)][2.1833 (0.0643242s)][1.37736 (0.0805287s)]]
+[[cpp_dec_float][[*1] (0.0238412s)][[*1] (0.0293132s)][[*1] (0.0605518s)]]
+[[gmp_float][4.65648 (0.111016s)][3.71451 (0.108884s)][2.36269 (0.143065s)]]
+[[mpfr_float][2.5349 (0.0604351s)][2.22408 (0.0651951s)][1.28374 (0.0777324s)]]
 ]
 [table Operator +(int)
 [[Backend][50 Bits][100 Bits][500 Bits]]
-[[cpp_float][1.56759 (0.0527023s)][1.74629 (0.0618102s)][1.68077 (0.105927s)]]
-[[gmp_float][[*1] (0.0336201s)][[*1] (0.0353951s)][[*1] (0.0630232s)]]
-[[mpfr_float][3.14875 (0.105861s)][3.15499 (0.111671s)][1.92831 (0.121528s)]]
+[[cpp_dec_float][1.63035 (0.0522868s)][1.80912 (0.0626744s)][1.85351 (0.105128s)]]
+[[gmp_float][[*1] (0.0320709s)][[*1] (0.0346436s)][[*1] (0.0567182s)]]
+[[mpfr_float][3.33957 (0.107103s)][3.24031 (0.112256s)][2.18567 (0.123967s)]]
 ]
 [table Operator -
 [[Backend][50 Bits][100 Bits][500 Bits]]
-[[cpp_float][[*1] (0.0265783s)][[*1] (0.031465s)][[*1] (0.0619405s)]]
-[[gmp_float][4.66954 (0.124108s)][3.72645 (0.117253s)][2.67536 (0.165713s)]]
-[[mpfr_float][2.7909 (0.0741774s)][2.48557 (0.0782083s)][1.50944 (0.0934957s)]]
+[[cpp_dec_float][[*1] (0.026085s)][[*1] (0.0304546s)][[*1] (0.0625459s)]]
+[[gmp_float][4.58354 (0.119562s)][3.89415 (0.118595s)][2.42105 (0.151427s)]]
+[[mpfr_float][2.82243 (0.073623s)][2.57196 (0.078328s)][1.42895 (0.089375s)]]
 ]
 [table Operator -(int)
 [[Backend][50 Bits][100 Bits][500 Bits]]
-[[cpp_float][[*1] (0.0577674s)][[*1] (0.0633795s)][[*1] (0.11146s)]]
-[[gmp_float][2.31811 (0.133911s)][2.07251 (0.131355s)][1.67161 (0.186319s)]]
-[[mpfr_float][2.45081 (0.141577s)][2.29174 (0.145249s)][1.395 (0.155487s)]]
+[[cpp_dec_float][[*1] (0.0588879s)][[*1] (0.0638241s)][[*1] (0.113107s)]]
+[[gmp_float][2.21528 (0.130453s)][2.06656 (0.131897s)][1.45214 (0.164247s)]]
+[[mpfr_float][2.3956 (0.141072s)][2.29515 (0.146486s)][1.39903 (0.158239s)]]
 ]
 [table Operator /
 [[Backend][50 Bits][100 Bits][500 Bits]]
-[[cpp_float][3.24327 (4.00108s)][5.00532 (8.12985s)][6.79566 (54.2796s)]]
-[[gmp_float][[*1] (1.23366s)][[*1] (1.62424s)][[*1] (7.9874s)]]
-[[mpfr_float][1.32521 (1.63486s)][1.38967 (2.25716s)][1.72413 (13.7713s)]]
+[[cpp_dec_float][3.22921 (3.99158s)][5.04305 (8.1132s)][6.64479 (53.775s)]]
+[[gmp_float][[*1] (1.23608s)][[*1] (1.60879s)][[*1] (8.09281s)]]
+[[mpfr_float][1.33968 (1.65596s)][1.41789 (2.28108s)][1.68098 (13.6039s)]]
 ]
 [table Operator /(int)
 [[Backend][50 Bits][100 Bits][500 Bits]]
-[[cpp_float][1.45093 (0.253675s)][1.83306 (0.419569s)][2.3644 (1.64187s)]]
-[[gmp_float][[*1] (0.174836s)][[*1] (0.22889s)][[*1] (0.694411s)]]
-[[mpfr_float][1.16731 (0.204088s)][1.13211 (0.259127s)][1.02031 (0.708513s)]]
+[[cpp_dec_float][1.38197 (0.246362s)][1.74079 (0.412828s)][2.34395 (1.62534s)]]
+[[gmp_float][[*1] (0.178268s)][[*1] (0.23715s)][[*1] (0.693418s)]]
+[[mpfr_float][1.13843 (0.202945s)][1.08131 (0.256434s)][1.02267 (0.709137s)]]
 ]
 [table Operator str
 [[Backend][50 Bits][100 Bits][500 Bits]]
-[[cpp_float][1.4585 (0.0188303s)][1.55515 (0.03172s)][[*1] (0.131962s)]]
-[[gmp_float][[*1] (0.0129107s)][[*1] (0.0203967s)][1.04632 (0.138075s)]]
-[[mpfr_float][2.19015 (0.0282764s)][1.84679 (0.0376683s)][1.20295 (0.158743s)]]
+[[cpp_dec_float][[*1] (0.0185371s)][1.53356 (0.0318154s)][[*1] (0.131303s)]]
+[[gmp_float][1.61743 (0.0299824s)][[*1] (0.0207461s)][1.03767 (0.136249s)]]
+[[mpfr_float][1.57977 (0.0292843s)][1.82886 (0.0379418s)][1.19134 (0.156426s)]]
 ]
 [endsect]
 [section:integer_performance Integer Type Perfomance]
 [table Operator %
-[[Backend][64 Bits][128 Bits][256 Bits][512 Bits][1024 Bits]]
-[[fixed_int][[*1] (0.0946529s)][[*1] (0.170561s)][[*1] (0.328458s)][[*1] (0.575884s)][[*1] (1.05006s)]]
-[[gmp_int][7.77525 (0.73595s)][4.39387 (0.749422s)][2.35075 (0.772122s)][1.51922 (0.874894s)][1.02263 (1.07382s)]]
-[[tommath_int][27.1503 (2.56986s)][12.8743 (2.19585s)][9.43965 (3.10053s)][8.24936 (4.75068s)][10.9719 (11.5211s)]]
+[[Backend][128 Bits][256 Bits][512 Bits][1024 Bits]]
+[[cpp_int][2.52964 (0.488484s)][1.9024 (0.597931s)][1.57549 (0.807811s)][1.31477 (1.24204s)]]
+[[cpp_int(fixed)][[*1] (0.193104s)][[*1] (0.314303s)][[*1] (0.512737s)][[*1] (0.944678s)]]
+[[gmp_int][3.24303 (0.626244s)][2.18285 (0.686075s)][1.54555 (0.792461s)][1.0841 (1.02412s)]]
+[[tommath_int][14.8026 (2.85844s)][9.7177 (3.05431s)][9.06266 (4.64676s)][11.9304 (11.2704s)]]
 ]
 [table Operator %(int)
-[[Backend][64 Bits][128 Bits][256 Bits][512 Bits][1024 Bits]]
-[[fixed_int][1.25034 (0.0425984s)][1.91617 (0.106226s)][2.02166 (0.195577s)][2.14437 (0.387067s)][2.23514 (0.776075s)]]
-[[gmp_int][[*1] (0.0340695s)][[*1] (0.0554367s)][[*1] (0.0967406s)][[*1] (0.180504s)][[*1] (0.347216s)]]
-[[tommath_int][42.8781 (1.46083s)][29.879 (1.65639s)][23.4323 (2.26685s)][19.932 (3.5978s)][25.0046 (8.682s)]]
+[[Backend][128 Bits][256 Bits][512 Bits][1024 Bits]]
+[[cpp_int][3.57875 (0.197942s)][2.99222 (0.298382s)][2.60748 (0.478772s)][2.42374 (0.85137s)]]
+[[cpp_int(fixed)][2.01994 (0.111723s)][2.085 (0.207915s)][2.10772 (0.38701s)][2.16437 (0.760262s)]]
+[[gmp_int][[*1] (0.0553103s)][[*1] (0.0997194s)][[*1] (0.183615s)][[*1] (0.351263s)]]
+[[tommath_int][32.4149 (1.79288s)][22.0249 (2.19631s)][18.7297 (3.43906s)][24.0777 (8.45761s)]]
 ]
 [table Operator &
-[[Backend][64 Bits][128 Bits][256 Bits][512 Bits][1024 Bits]]
-[[fixed_int][[*1] (0.00298048s)][[*1] (0.00546222s)][[*1] (0.0127546s)][[*1] (0.01985s)][[*1] (0.0349286s)]]
-[[gmp_int][16.0105 (0.0477189s)][9.67027 (0.0528211s)][5.12678 (0.0653902s)][4.62316 (0.0917698s)][4.00837 (0.140007s)]]
-[[tommath_int][43.6665 (0.130147s)][23.8003 (0.130002s)][11.4242 (0.145711s)][7.83416 (0.155508s)][9.50103 (0.331858s)]]
+[[Backend][128 Bits][256 Bits][512 Bits][1024 Bits]]
+[[cpp_int][1.27651 (0.0299046s)][1.44553 (0.0389208s)][1.51976 (0.04981s)][1.48214 (0.0745785s)]]
+[[cpp_int(fixed)][[*1] (0.0234269s)][[*1] (0.026925s)][[*1] (0.032775s)][[*1] (0.0503183s)]]
+[[gmp_int][2.26238 (0.0530007s)][2.44171 (0.0657431s)][2.77722 (0.0910233s)][2.94472 (0.148173s)]]
+[[tommath_int][5.60505 (0.131309s)][5.56001 (0.149703s)][4.72526 (0.15487s)][8.2919 (0.417234s)]]
 ]
 [table Operator &(int)
-[[Backend][64 Bits][128 Bits][256 Bits][512 Bits][1024 Bits]]
-[[fixed_int][[*1] (0.00222291s)][[*1] (0.0035522s)][[*1] (0.0110247s)][[*1] (0.0154281s)][[*1] (0.0275044s)]]
-[[gmp_int][70.8538 (0.157502s)][42.1478 (0.149717s)][13.9023 (0.153268s)][10.3271 (0.159328s)][6.0529 (0.166481s)]]
-[[tommath_int][154.134 (0.342626s)][93.2035 (0.331077s)][31.9151 (0.351853s)][23.6515 (0.364899s)][22.0042 (0.605213s)]]
+[[Backend][128 Bits][256 Bits][512 Bits][1024 Bits]]
+[[cpp_int][1.64349 (0.0463351s)][1.34507 (0.0550224s)][1.29371 (0.0697964s)][1.17854 (0.101779s)]]
+[[cpp_int(fixed)][[*1] (0.0281931s)][[*1] (0.0409067s)][[*1] (0.0539505s)][[*1] (0.0863606s)]]
+[[gmp_int][5.204 (0.146717s)][3.63933 (0.148873s)][2.85915 (0.154253s)][1.8967 (0.163801s)]]
+[[tommath_int][12.0738 (0.340397s)][8.67273 (0.354773s)][6.75845 (0.364622s)][7.1076 (0.613817s)]]
 ]
 [table Operator *
-[[Backend][64 Bits][128 Bits][256 Bits][512 Bits][1024 Bits]]
-[[fixed_int][[*1] (0.0223481s)][[*1] (0.0375288s)][[*1] (0.120353s)][[*1] (0.439147s)][[*1] (1.46969s)]]
-[[gmp_int][2.50746 (0.0560369s)][1.76676 (0.0663044s)][1.06052 (0.127636s)][1.22558 (0.53821s)][1.03538 (1.52168s)]]
-[[tommath_int][3.00028 (0.0670506s)][2.97696 (0.111722s)][2.86257 (0.34452s)][2.26661 (0.995374s)][2.12926 (3.12935s)]]
+[[Backend][128 Bits][256 Bits][512 Bits][1024 Bits]]
+[[cpp_int][1.36344 (0.0764199s)][1.50698 (0.193581s)][1.41904 (0.656832s)][1.6399 (2.47851s)]]
+[[cpp_int(fixed)][[*1] (0.0560495s)][1.26247 (0.162173s)][[*1] (0.462871s)][1.06665 (1.61211s)]]
+[[gmp_int][1.20183 (0.0673622s)][[*1] (0.128456s)][1.11903 (0.517967s)][[*1] (1.51138s)]]
+[[tommath_int][1.99157 (0.111627s)][2.64312 (0.339525s)][2.10438 (0.974058s)][2.0631 (3.11813s)]]
 ]
 [table Operator *(int)
-[[Backend][64 Bits][128 Bits][256 Bits][512 Bits][1024 Bits]]
-[[fixed_int][[*1] (0.00444316s)][[*1] (0.0135739s)][[*1] (0.0192615s)][[*1] (0.0328339s)][1.18198 (0.0567364s)]]
-[[gmp_int][4.57776 (0.0203397s)][1.79901 (0.0244196s)][1.32814 (0.025582s)][1.01453 (0.033311s)][[*1] (0.048001s)]]
-[[tommath_int][53.8709 (0.239357s)][18.3773 (0.249452s)][14.2088 (0.273682s)][14.0907 (0.462652s)][9.10761 (0.437175s)]]
+[[Backend][128 Bits][256 Bits][512 Bits][1024 Bits]]
+[[cpp_int][1.35944 (0.0306376s)][1.54828 (0.040404s)][1.60013 (0.0537717s)][1.62199 (0.0790137s)]]
+[[cpp_int(fixed)][1.28804 (0.0290285s)][1.54595 (0.0403434s)][1.61453 (0.0542558s)][1.69566 (0.0826023s)]]
+[[gmp_int][[*1] (0.0225369s)][[*1] (0.0260961s)][[*1] (0.0336047s)][[*1] (0.0487139s)]]
+[[tommath_int][10.5972 (0.238829s)][10.4554 (0.272846s)][9.6853 (0.325472s)][8.5224 (0.41516s)]]
 ]
 [table Operator +
-[[Backend][64 Bits][128 Bits][256 Bits][512 Bits][1024 Bits]]
-[[fixed_int][[*1] (0.0031291s)][[*1] (0.00703043s)][[*1] (0.0163669s)][[*1] (0.0326567s)][[*1] (0.0603087s)]]
-[[gmp_int][12.4866 (0.0390717s)][6.01034 (0.0422553s)][2.65628 (0.0434751s)][1.54295 (0.0503875s)][1.16477 (0.0702458s)]]
-[[tommath_int][6.03111 (0.018872s)][3.08173 (0.0216659s)][1.84243 (0.0301548s)][1.30199 (0.0425188s)][1.18909 (0.0717123s)]]
+[[Backend][128 Bits][256 Bits][512 Bits][1024 Bits]]
+[[cpp_int][1.24954 (0.0271391s)][1.12545 (0.0354288s)][1.26716 (0.0536949s)][1.34112 (0.0884854s)]]
+[[cpp_int(fixed)][1.06795 (0.023195s)][1.0057 (0.0316591s)][1.21714 (0.0515755s)][1.26263 (0.0833072s)]]
+[[gmp_int][1.91685 (0.0416325s)][1.38884 (0.0437202s)][1.18481 (0.0502054s)][[*1] (0.065979s)]]
+[[tommath_int][[*1] (0.0217192s)][[*1] (0.0314797s)][[*1] (0.0423742s)][1.09807 (0.0724498s)]]
 ]
 [table Operator +(int)
-[[Backend][64 Bits][128 Bits][256 Bits][512 Bits][1024 Bits]]
-[[fixed_int][[*1] (0.00335294s)][[*1] (0.00376116s)][[*1] (0.00985174s)][[*1] (0.0119345s)][[*1] (0.0170918s)]]
-[[gmp_int][9.47407 (0.031766s)][8.44794 (0.0317741s)][4.23857 (0.0417573s)][5.40856 (0.0645488s)][6.31314 (0.107903s)]]
-[[tommath_int][67.0025 (0.224655s)][60.4203 (0.22725s)][25.1834 (0.2481s)][23.2996 (0.27807s)][17.1743 (0.293538s)]]
+[[Backend][128 Bits][256 Bits][512 Bits][1024 Bits]]
+[[cpp_int][1.48302 (0.0203604s)][1.21971 (0.0238597s)][1.2383 (0.0262742s)][1.03442 (0.0296193s)]]
+[[cpp_int(fixed)][[*1] (0.013729s)][[*1] (0.0195617s)][[*1] (0.0212179s)][[*1] (0.0286337s)]]
+[[gmp_int][2.16569 (0.0297328s)][2.15606 (0.0421762s)][3.05447 (0.0648096s)][3.67481 (0.105223s)]]
+[[tommath_int][18.7291 (0.257132s)][14.1384 (0.27657s)][13.8483 (0.293832s)][11.5132 (0.329666s)]]
 ]
 [table Operator -
-[[Backend][64 Bits][128 Bits][256 Bits][512 Bits][1024 Bits]]
-[[fixed_int][[*1] (0.00339191s)][[*1] (0.0073172s)][[*1] (0.0166428s)][[*1] (0.0349375s)][[*1] (0.0600083s)]]
-[[gmp_int][12.5182 (0.0424608s)][5.57936 (0.0408253s)][2.78496 (0.0463496s)][1.48373 (0.051838s)][1.29928 (0.0779673s)]]
-[[tommath_int][7.00782 (0.0237699s)][3.69919 (0.0270677s)][2.29645 (0.0382195s)][1.39777 (0.0488346s)][1.28243 (0.0769566s)]]
+[[Backend][128 Bits][256 Bits][512 Bits][1024 Bits]]
+[[cpp_int][1.1816 (0.0302204s)][[*1] (0.03826s)][1.11566 (0.0529947s)][1.17049 (0.0822931s)]]
+[[cpp_int(fixed)][[*1] (0.0255758s)][1.01186 (0.0387139s)][[*1] (0.0475007s)][1.22939 (0.0864345s)]]
+[[gmp_int][1.60126 (0.0409536s)][1.17441 (0.0449331s)][1.12969 (0.053661s)][[*1] (0.0703067s)]]
+[[tommath_int][1.14132 (0.0291902s)][1.03846 (0.0397314s)][1.09534 (0.0520296s)][1.10104 (0.0774105s)]]
 ]
 [table Operator -(int)
-[[Backend][64 Bits][128 Bits][256 Bits][512 Bits][1024 Bits]]
-[[fixed_int][[*1] (0.00250933s)][[*1] (0.00358055s)][[*1] (0.0103282s)][[*1] (0.0119127s)][[*1] (0.0176089s)]]
-[[gmp_int][12.093 (0.0303454s)][8.50898 (0.0304669s)][3.9284 (0.0405733s)][5.03037 (0.0599252s)][5.96617 (0.105058s)]]
-[[tommath_int][80.8477 (0.202873s)][57.8371 (0.207089s)][21.3372 (0.220375s)][23.526 (0.280258s)][14.793 (0.260488s)]]
+[[Backend][128 Bits][256 Bits][512 Bits][1024 Bits]]
+[[cpp_int][1.49712 (0.0155424s)][1.3004 (0.0199724s)][1.2442 (0.0223562s)][1.12422 (0.0246399s)]]
+[[cpp_int(fixed)][[*1] (0.0103816s)][[*1] (0.0153586s)][[*1] (0.0179683s)][[*1] (0.0219173s)]]
+[[gmp_int][2.85673 (0.0296573s)][2.55469 (0.0392365s)][3.22576 (0.0579614s)][4.55088 (0.0997431s)]]
+[[tommath_int][19.5977 (0.203455s)][14.2166 (0.218347s)][12.9406 (0.23252s)][11.9263 (0.261392s)]]
 ]
 [table Operator /
-[[Backend][64 Bits][128 Bits][256 Bits][512 Bits][1024 Bits]]
-[[fixed_int][[*1] (0.0991632s)][[*1] (0.172328s)][[*1] (0.309492s)][[*1] (0.573815s)][[*1] (1.06356s)]]
-[[gmp_int][7.81859 (0.775316s)][5.11069 (0.880715s)][2.93514 (0.908404s)][1.80497 (1.03572s)][1.21878 (1.29625s)]]
-[[tommath_int][18.0766 (1.79253s)][12.3939 (2.13582s)][9.80438 (3.03438s)][8.74047 (5.01541s)][10.8288 (11.517s)]]
+[[Backend][128 Bits][256 Bits][512 Bits][1024 Bits]]
+[[cpp_int][2.9558 (0.601063s)][2.21555 (0.694115s)][1.73066 (0.915068s)][1.41604 (1.36697s)]]
+[[cpp_int(fixed)][[*1] (0.20335s)][[*1] (0.313292s)][[*1] (0.52874s)][[*1] (0.965347s)]]
+[[gmp_int][4.08359 (0.8304s)][2.91 (0.91168s)][1.97009 (1.04166s)][1.30934 (1.26397s)]]
+[[tommath_int][10.2514 (2.08463s)][9.26794 (2.90357s)][8.62079 (4.55815s)][11.6636 (11.2594s)]]
 ]
 [table Operator /(int)
-[[Backend][64 Bits][128 Bits][256 Bits][512 Bits][1024 Bits]]
-[[fixed_int][1.04098 (0.0443082s)][1.61317 (0.110308s)][2.18324 (0.229148s)][2.36331 (0.442167s)][2.45159 (0.866172s)]]
-[[gmp_int][[*1] (0.042564s)][[*1] (0.06838s)][[*1] (0.104957s)][[*1] (0.187096s)][[*1] (0.35331s)]]
-[[tommath_int][32.4072 (1.37938s)][23.7471 (1.62383s)][22.1907 (2.32908s)][19.9054 (3.72421s)][24.2219 (8.55783s)]]
+[[Backend][128 Bits][256 Bits][512 Bits][1024 Bits]]
+[[cpp_int][5.83613 (0.318461s)][4.26769 (0.433035s)][3.39803 (0.641615s)][2.80387 (1.05122s)]]
+[[cpp_int(fixed)][2.46673 (0.134603s)][2.52386 (0.256092s)][2.43318 (0.459431s)][2.28165 (0.855435s)]]
+[[gmp_int][[*1] (0.0545672s)][[*1] (0.101468s)][[*1] (0.18882s)][[*1] (0.374919s)]]
+[[tommath_int][29.1556 (1.59094s)][21.9806 (2.23033s)][18.2745 (3.45058s)][22.3582 (8.38249s)]]
 ]
 [table Operator <<
-[[Backend][64 Bits][128 Bits][256 Bits][512 Bits][1024 Bits]]
-[[fixed_int][[*1] (0.0119095s)][[*1] (0.0131746s)][[*1] (0.0213483s)][[*1] (0.0247552s)][[*1] (0.0339579s)]]
-[[gmp_int][1.9355 (0.0230509s)][1.94257 (0.0255925s)][1.49684 (0.031955s)][1.79202 (0.0443618s)][2.0846 (0.0707887s)]]
-[[tommath_int][2.64273 (0.0314737s)][2.95612 (0.0389456s)][3.05842 (0.065292s)][3.79496 (0.0939451s)][4.82142 (0.163725s)]]
+[[Backend][128 Bits][256 Bits][512 Bits][1024 Bits]]
+[[cpp_int][1.1596 (0.0220286s)][1.11929 (0.0294239s)][1.15296 (0.0365532s)][1.06891 (0.0522035s)]]
+[[cpp_int(fixed)][[*1] (0.0189966s)][[*1] (0.0262879s)][[*1] (0.0317039s)][[*1] (0.0488381s)]]
+[[gmp_int][1.36896 (0.0260055s)][1.17593 (0.0309127s)][1.51661 (0.0480825s)][1.43853 (0.0702549s)]]
+[[tommath_int][2.11378 (0.0401547s)][2.52576 (0.0663968s)][2.96051 (0.0938596s)][3.31171 (0.161738s)]]
 ]
 [table Operator >>
-[[Backend][64 Bits][128 Bits][256 Bits][512 Bits][1024 Bits]]
-[[fixed_int][[*1] (0.006361s)][[*1] (0.00880189s)][[*1] (0.0180295s)][[*1] (0.0220786s)][[*1] (0.0325312s)]]
-[[gmp_int][4.26889 (0.0271544s)][3.14669 (0.0276968s)][1.74396 (0.0314426s)][1.45928 (0.0322188s)][1.24596 (0.0405327s)]]
-[[tommath_int][39.4379 (0.250865s)][28.6225 (0.251932s)][16.4543 (0.296661s)][14.2167 (0.313884s)][15.5842 (0.506974s)]]
+[[Backend][128 Bits][256 Bits][512 Bits][1024 Bits]]
+[[cpp_int][1.26962 (0.0208765s)][1.19206 (0.0265325s)][1.10665 (0.0304931s)][1.03429 (0.0383751s)]]
+[[cpp_int(fixed)][[*1] (0.0164431s)][[*1] (0.0222577s)][[*1] (0.0275545s)][1.02967 (0.0382038s)]]
+[[gmp_int][1.67276 (0.0275053s)][1.30139 (0.028966s)][1.17546 (0.0323891s)][[*1] (0.037103s)]]
+[[tommath_int][14.0947 (0.23176s)][11.7344 (0.261181s)][10.5175 (0.289806s)][13.3498 (0.495316s)]]
 ]
 [table Operator ^
-[[Backend][64 Bits][128 Bits][256 Bits][512 Bits][1024 Bits]]
-[[fixed_int][[*1] (0.00307714s)][[*1] (0.00538197s)][[*1] (0.0127717s)][[*1] (0.0198304s)][[*1] (0.0345822s)]]
-[[gmp_int][13.9543 (0.0429392s)][9.92785 (0.0534314s)][4.80398 (0.0613552s)][4.35864 (0.0864335s)][3.887 (0.134421s)]]
-[[tommath_int][41.5958 (0.127996s)][24.2396 (0.130457s)][11.3666 (0.145171s)][8.01016 (0.158845s)][9.84853 (0.340584s)]]
+[[Backend][128 Bits][256 Bits][512 Bits][1024 Bits]]
+[[cpp_int][1.39932 (0.0300509s)][1.28371 (0.0381634s)][1.25304 (0.0494246s)][1.04238 (0.075182s)]]
+[[cpp_int(fixed)][[*1] (0.0214753s)][[*1] (0.0297291s)][[*1] (0.0394438s)][[*1] (0.0721252s)]]
+[[gmp_int][2.26098 (0.0485553s)][2.11331 (0.0628266s)][2.1917 (0.086449s)][1.89072 (0.136369s)]]
+[[tommath_int][6.08557 (0.130689s)][4.84167 (0.143938s)][3.82246 (0.150772s)][5.8133 (0.419285s)]]
 ]
 [table Operator ^(int)
-[[Backend][64 Bits][128 Bits][256 Bits][512 Bits][1024 Bits]]
-[[fixed_int][[*1] (0.00236664s)][[*1] (0.0035339s)][[*1] (0.0100442s)][[*1] (0.0155814s)][[*1] (0.0293253s)]]
-[[gmp_int][61.4272 (0.145376s)][41.6319 (0.147123s)][14.9744 (0.150405s)][9.64857 (0.150338s)][5.46649 (0.160306s)]]
-[[tommath_int][145.509 (0.344367s)][93.9055 (0.331853s)][35.0456 (0.352003s)][22.7371 (0.354275s)][19.1373 (0.561207s)]]
+[[Backend][128 Bits][256 Bits][512 Bits][1024 Bits]]
+[[cpp_int][1.85734 (0.0381023s)][1.66156 (0.0432356s)][1.51413 (0.0466764s)][1.28122 (0.0550852s)]]
+[[cpp_int(fixed)][[*1] (0.0205145s)][[*1] (0.0260211s)][[*1] (0.0308272s)][[*1] (0.0429944s)]]
+[[gmp_int][6.89492 (0.141446s)][5.58265 (0.145267s)][5.07065 (0.156314s)][3.68095 (0.15826s)]]
+[[tommath_int][16.3846 (0.336121s)][12.9631 (0.337315s)][11.2716 (0.347472s)][13.6661 (0.587566s)]]
+]
+[table Operator gcd
+[[Backend][128 Bits][256 Bits][512 Bits][1024 Bits]]
+[[cpp_int][1.82307 (4.48165s)][1.77052 (10.1686s)][1.8655 (25.1877s)][2.12367 (69.0626s)]]
+[[cpp_int(fixed)][1.504 (3.69729s)][1.60631 (9.22552s)][1.84155 (24.8643s)][2.25807 (73.4335s)]]
+[[gmp_int][[*1] (2.4583s)][[*1] (5.7433s)][[*1] (13.5018s)][[*1] (32.5205s)]]
+[[tommath_int][4.92412 (12.105s)][4.39462 (25.2396s)][4.05657 (54.7712s)][3.96001 (128.781s)]]
 ]
 [table Operator str
-[[Backend][64 Bits][128 Bits][256 Bits][512 Bits][1024 Bits]]
-[[fixed_int][[*1] (0.000465841s)][[*1] (0.00102073s)][[*1] (0.00207212s)][1.02618 (0.0062017s)][1.32649 (0.0190043s)]]
-[[gmp_int][2.83823 (0.00132216s)][2.17537 (0.00222046s)][1.46978 (0.00304557s)][[*1] (0.00604351s)][[*1] (0.0143268s)]]
-[[tommath_int][15.76 (0.00734164s)][15.9879 (0.0163193s)][21.7337 (0.0450349s)][19.7183 (0.119168s)][26.3445 (0.377431s)]]
+[[Backend][128 Bits][256 Bits][512 Bits][1024 Bits]]
+[[cpp_int][1.73678 (0.00186546s)][1.442 (0.00327905s)][1.29994 (0.0076685s)][1.49716 (0.0217405s)]]
+[[cpp_int(fixed)][[*1] (0.00107409s)][[*1] (0.00227396s)][1.01222 (0.00597122s)][1.20506 (0.0174989s)]]
+[[gmp_int][1.8827 (0.00202218s)][1.28861 (0.00293026s)][[*1] (0.00589914s)][[*1] (0.0145211s)]]
+[[tommath_int][15.6431 (0.0168021s)][22.3011 (0.0507118s)][20.9541 (0.123612s)][26.2052 (0.380528s)]]
 ]
 [table Operator |
-[[Backend][64 Bits][128 Bits][256 Bits][512 Bits][1024 Bits]]
-[[fixed_int][[*1] (0.00295261s)][[*1] (0.00560832s)][[*1] (0.0127056s)][[*1] (0.0200759s)][[*1] (0.034651s)]]
-[[gmp_int][14.1091 (0.0416586s)][8.52475 (0.0478096s)][4.74593 (0.0602998s)][4.19694 (0.0842575s)][3.85525 (0.133588s)]]
-[[tommath_int][44.8889 (0.132539s)][25.2503 (0.141612s)][11.0488 (0.140382s)][7.39273 (0.148416s)][9.75809 (0.338127s)]]
+[[Backend][128 Bits][256 Bits][512 Bits][1024 Bits]]
+[[cpp_int][1.39649 (0.0295702s)][1.14915 (0.0378751s)][1.31606 (0.0523944s)][1.04853 (0.0751774s)]]
+[[cpp_int(fixed)][[*1] (0.0211746s)][[*1] (0.0329594s)][[*1] (0.0398115s)][[*1] (0.071698s)]]
+[[gmp_int][2.31998 (0.0491246s)][1.83801 (0.0605797s)][2.16567 (0.0862186s)][1.88132 (0.134887s)]]
+[[tommath_int][6.12227 (0.129637s)][4.26647 (0.14062s)][3.75956 (0.149674s)][5.78233 (0.414581s)]]
 ]
 [table Operator |(int)
-[[Backend][64 Bits][128 Bits][256 Bits][512 Bits][1024 Bits]]
-[[fixed_int][[*1] (0.00244005s)][[*1] (0.0040142s)][[*1] (0.00983777s)][[*1] (0.0155223s)][[*1] (0.0293444s)]]
-[[gmp_int][64.6148 (0.157663s)][34.5827 (0.138822s)][14.2764 (0.140448s)][10.3248 (0.160264s)][5.33565 (0.156572s)]]
-[[tommath_int][137.825 (0.3363s)][81.1074 (0.325581s)][34.8737 (0.343079s)][22.3727 (0.347276s)][18.912 (0.554963s)]]
+[[Backend][128 Bits][256 Bits][512 Bits][1024 Bits]]
+[[cpp_int][1.89501 (0.0385046s)][1.64437 (0.0425891s)][1.56631 (0.0479629s)][1.28806 (0.0549147s)]]
+[[cpp_int(fixed)][[*1] (0.020319s)][[*1] (0.0258999s)][[*1] (0.0306217s)][[*1] (0.0426336s)]]
+[[gmp_int][6.93537 (0.14092s)][5.48104 (0.141959s)][4.90595 (0.150229s)][3.63885 (0.155137s)]]
+[[tommath_int][16.4913 (0.335087s)][13.3178 (0.344931s)][11.4509 (0.350645s)][13.7699 (0.587063s)]]
 ]
 [endsect]
 [section:rational_performance Rational Type Perfomance]
 [table Operator *
-[[Backend][64 Bits][128 Bits][256 Bits][512 Bits][1024 Bits]]
-[[mpq_rational][[*1] (2.67402s)][[*1] (5.89806s)][[*1] (12.7524s)][[*1] (29.4044s)][[*1] (70.1615s)]]
+[[Backend][128 Bits][256 Bits][512 Bits][1024 Bits]]
+[[cpp_rational][5.59286 (32.3559s)][6.54125 (82.4247s)][6.8815 (197.198s)][6.84066 (473.057s)]]
+[[mpq_rational][[*1] (5.78521s)][[*1] (12.6008s)][[*1] (28.6562s)][[*1] (69.1537s)]]
 ]
 [table Operator *(int)
-[[Backend][64 Bits][128 Bits][256 Bits][512 Bits][1024 Bits]]
-[[mpq_rational][[*1] (1.15673s)][[*1] (1.20559s)][[*1] (1.25776s)][[*1] (1.41413s)][[*1] (1.59151s)]]
+[[Backend][128 Bits][256 Bits][512 Bits][1024 Bits]]
+[[cpp_rational][2.70193 (3.1466s)][3.10134 (3.79056s)][3.659 (4.93935s)][4.61372 (6.89845s)]]
+[[mpq_rational][[*1] (1.16457s)][[*1] (1.22223s)][[*1] (1.34992s)][[*1] (1.4952s)]]
 ]
 [table Operator +
-[[Backend][64 Bits][128 Bits][256 Bits][512 Bits][1024 Bits]]
-[[mpq_rational][[*1] (1.47032s)][[*1] (3.1599s)][[*1] (6.74926s)][[*1] (16.7334s)][[*1] (38.5739s)]]
+[[Backend][128 Bits][256 Bits][512 Bits][1024 Bits]]
+[[cpp_rational][5.91758 (18.1263s)][6.60754 (44.1182s)][6.65334 (103.169s)][6.44717 (244.055s)]]
+[[mpq_rational][[*1] (3.06312s)][[*1] (6.67695s)][[*1] (15.5064s)][[*1] (37.8546s)]]
 ]
 [table Operator +(int)
-[[Backend][64 Bits][128 Bits][256 Bits][512 Bits][1024 Bits]]
-[[mpq_rational][[*1] (0.639153s)][[*1] (0.683218s)][[*1] (0.725686s)][[*1] (0.895283s)][[*1] (0.931053s)]]
+[[Backend][128 Bits][256 Bits][512 Bits][1024 Bits]]
+[[cpp_rational][3.98512 (2.67249s)][4.24335 (3.04309s)][4.65009 (3.83046s)][5.45832 (5.08346s)]]
+[[mpq_rational][[*1] (0.670618s)][[*1] (0.717144s)][[*1] (0.823739s)][[*1] (0.931322s)]]
 ]
 [table Operator -
-[[Backend][64 Bits][128 Bits][256 Bits][512 Bits][1024 Bits]]
-[[mpq_rational][[*1] (1.48169s)][[*1] (3.17694s)][[*1] (6.75317s)][[*1] (15.9167s)][[*1] (39.0541s)]]
+[[Backend][128 Bits][256 Bits][512 Bits][1024 Bits]]
+[[cpp_rational][5.91504 (18.2374s)][6.55676 (43.8659s)][6.66239 (103.481s)][6.47224 (244.887s)]]
+[[mpq_rational][[*1] (3.08322s)][[*1] (6.69018s)][[*1] (15.5321s)][[*1] (37.8365s)]]
 ]
 [table Operator -(int)
-[[Backend][64 Bits][128 Bits][256 Bits][512 Bits][1024 Bits]]
-[[mpq_rational][[*1] (0.650283s)][[*1] (0.669498s)][[*1] (0.707811s)][[*1] (0.83232s)][[*1] (1.06134s)]]
+[[Backend][128 Bits][256 Bits][512 Bits][1024 Bits]]
+[[cpp_rational][3.96173 (2.66785s)][4.36532 (3.09023s)][4.59363 (3.74494s)][5.43075 (5.09156s)]]
+[[mpq_rational][[*1] (0.673405s)][[*1] (0.707904s)][[*1] (0.815246s)][[*1] (0.937541s)]]
 ]
 [table Operator /
-[[Backend][64 Bits][128 Bits][256 Bits][512 Bits][1024 Bits]]
-[[mpq_rational][[*1] (9.26405s)][[*1] (14.7461s)][[*1] (26.4939s)][[*1] (54.0641s)][[*1] (126.261s)]]
+[[Backend][128 Bits][256 Bits][512 Bits][1024 Bits]]
+[[cpp_rational][4.36846 (63.9498s)][5.52565 (145.045s)][6.18331 (328.069s)][6.49822 (784.806s)]]
+[[mpq_rational][[*1] (14.639s)][[*1] (26.2494s)][[*1] (53.0571s)][[*1] (120.772s)]]
 ]
 [table Operator /(int)
-[[Backend][64 Bits][128 Bits][256 Bits][512 Bits][1024 Bits]]
-[[mpq_rational][[*1] (1.40596s)][[*1] (1.42215s)][[*1] (1.50342s)][[*1] (1.62326s)][[*1] (1.7796s)]]
+[[Backend][128 Bits][256 Bits][512 Bits][1024 Bits]]
+[[cpp_rational][2.26643 (3.13785s)][2.57125 (3.76931s)][3.20872 (5.06758s)][4.02177 (7.17803s)]]
+[[mpq_rational][[*1] (1.38449s)][[*1] (1.46594s)][[*1] (1.57931s)][[*1] (1.78479s)]]
 ]
 [table Operator str
-[[Backend][64 Bits][128 Bits][256 Bits][512 Bits][1024 Bits]]
-[[mpq_rational][[*1] (0.00265159s)][[*1] (0.00363964s)][[*1] (0.00677698s)][[*1] (0.0117945s)][[*1] (0.0283447s)]]
+[[Backend][128 Bits][256 Bits][512 Bits][1024 Bits]]
+[[cpp_rational][5.40493 (0.0199393s)][8.55089 (0.0511907s)][9.91026 (0.118839s)][9.93546 (0.285367s)]]
+[[mpq_rational][[*1] (0.00368909s)][[*1] (0.00598659s)][[*1] (0.0119915s)][[*1] (0.028722s)]]
 ]
 [endsect]

Modified: sandbox/big_number/libs/multiprecision/test/test_arithmetic.cpp
==============================================================================
--- sandbox/big_number/libs/multiprecision/test/test_arithmetic.cpp (original)
+++ sandbox/big_number/libs/multiprecision/test/test_arithmetic.cpp 2012-03-21 05:19:57 EDT (Wed, 21 Mar 2012)
@@ -358,6 +358,11 @@
    BOOST_TEST(lcm(a, 45) == boost::math::lcm(400, 45));
    BOOST_TEST(gcd(400, b) == boost::math::gcd(400, 45));
    BOOST_TEST(lcm(400, b) == boost::math::lcm(400, 45));
+ Real r;
+ divide_qr(a, b, c, r);
+ BOOST_TEST(c == a / b);
+ BOOST_TEST(r = a % b);
+ BOOST_TEST(integer_modulus(a, 57) == a % 57);
    if(std::numeric_limits<Real>::is_signed)
    {
       a = -20;
@@ -376,6 +381,20 @@
       BOOST_TEST(lcm(a, 45) == boost::math::lcm(-400, 45));
       BOOST_TEST(gcd(-400, b) == boost::math::gcd(-400, 45));
       BOOST_TEST(lcm(-400, b) == boost::math::lcm(-400, 45));
+ divide_qr(a, b, c, r);
+ BOOST_TEST(c == a / b);
+ BOOST_TEST(r = a % b);
+ BOOST_TEST(integer_modulus(a, 57) == abs(a % 57));
+ b = -57;
+ divide_qr(a, b, c, r);
+ BOOST_TEST(c == a / b);
+ BOOST_TEST(r = a % b);
+ BOOST_TEST(integer_modulus(a, -57) == abs(a % -57));
+ a = 458;
+ divide_qr(a, b, c, r);
+ BOOST_TEST(c == a / b);
+ BOOST_TEST(r = a % b);
+ BOOST_TEST(integer_modulus(a, -57) == abs(a % -57));
    }
 }
 

Modified: sandbox/big_number/libs/multiprecision/test/test_cpp_int.cpp
==============================================================================
--- sandbox/big_number/libs/multiprecision/test/test_cpp_int.cpp (original)
+++ sandbox/big_number/libs/multiprecision/test/test_cpp_int.cpp 2012-03-21 05:19:57 EDT (Wed, 21 Mar 2012)
@@ -15,6 +15,7 @@
 #include <boost/multiprecision/cpp_int.hpp>
 #include <boost/random/mersenne_twister.hpp>
 #include <boost/random/uniform_int.hpp>
+#include <boost/timer.hpp>
 #include "test.hpp"
 
 template <class T>
@@ -57,7 +58,9 @@
    using namespace boost::multiprecision;
    typedef Number test_type;
    unsigned last_error_count = 0;
- for(int i = 0; i < 1000; ++i)
+ boost::timer tim;
+
+ for(int i = 0; i < 10000; ++i)
    {
       mpz_int a = generate_random<mpz_int>(1000);
       mpz_int b = generate_random<mpz_int>(512);
@@ -280,6 +283,18 @@
          std::cout << "a%d = " << a%d << std::endl;
          std::cout << "a1%d1 = " << a1%d1 << std::endl;
       }
+
+ //
+ // Check to see if test is taking too long.
+ // Tests run on the compiler farm time out after 300 seconds,
+ // so don't get too close to that:
+ //
+ if(tim.elapsed() > 100)
+ {
+ std::cout << "Timeout reached, aborting tests now....\n";
+ break;
+ }
+
    }
 }
 


Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk