Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r81121 - in sandbox/big_number: boost/multiprecision boost/multiprecision/cpp_int libs/multiprecision/doc libs/multiprecision/doc/html libs/multiprecision/doc/html/boost_multiprecision libs/multiprecision/doc/html/boost_multiprecision/indexes libs/multiprecision/doc/html/boost_multiprecision/map libs/multiprecision/doc/html/boost_multiprecision/ref libs/multiprecision/doc/html/boost_multiprecision/tut libs/multiprecision/doc/html/boost_multiprecision/tut/floats libs/multiprecision/doc/html/boost_multiprecision/tut/ints libs/multiprecision/doc/html/boost_multiprecision/tut/rational libs/multiprecision/performance libs/multiprecision/test/math
From: john_at_[hidden]
Date: 2012-10-31 13:06:39


Author: johnmaddock
Date: 2012-10-31 13:06:33 EDT (Wed, 31 Oct 2012)
New Revision: 81121
URL: http://svn.boost.org/trac/boost/changeset/81121

Log:
Update and regenerate docs.
Fix error in expression template unpacking that occasionally caused variable over-writes.
Update Math lib tests to test at least one non-ET type.
Text files modified:
   sandbox/big_number/boost/multiprecision/cpp_int/misc.hpp | 2
   sandbox/big_number/boost/multiprecision/number.hpp | 12
   sandbox/big_number/libs/multiprecision/doc/html/boost_multiprecision/indexes/s01.html | 8
   sandbox/big_number/libs/multiprecision/doc/html/boost_multiprecision/indexes/s02.html | 12 +
   sandbox/big_number/libs/multiprecision/doc/html/boost_multiprecision/indexes/s03.html | 48 +++++
   sandbox/big_number/libs/multiprecision/doc/html/boost_multiprecision/indexes/s04.html | 74 +++++++++
   sandbox/big_number/libs/multiprecision/doc/html/boost_multiprecision/intro.html | 118 +++++++++++---
   sandbox/big_number/libs/multiprecision/doc/html/boost_multiprecision/map/hist.html | 6
   sandbox/big_number/libs/multiprecision/doc/html/boost_multiprecision/map/todo.html | 42 ++--
   sandbox/big_number/libs/multiprecision/doc/html/boost_multiprecision/ref/cpp_int_ref.html | 100 ++++++++---
   sandbox/big_number/libs/multiprecision/doc/html/boost_multiprecision/ref/headers.html | 118 ++++++++++++--
   sandbox/big_number/libs/multiprecision/doc/html/boost_multiprecision/ref/internals.html | 11 +
   sandbox/big_number/libs/multiprecision/doc/html/boost_multiprecision/ref/number.html | 7
   sandbox/big_number/libs/multiprecision/doc/html/boost_multiprecision/tut/conversions.html | 20 +-
   sandbox/big_number/libs/multiprecision/doc/html/boost_multiprecision/tut/floats/cpp_dec_float.html | 6
   sandbox/big_number/libs/multiprecision/doc/html/boost_multiprecision/tut/floats/gmp_float.html | 8
   sandbox/big_number/libs/multiprecision/doc/html/boost_multiprecision/tut/ints/cpp_int.html | 226 +++++++++++++++++++++++----
   sandbox/big_number/libs/multiprecision/doc/html/boost_multiprecision/tut/ints/gmp_int.html | 2
   sandbox/big_number/libs/multiprecision/doc/html/boost_multiprecision/tut/ints/tom_int.html | 2
   sandbox/big_number/libs/multiprecision/doc/html/boost_multiprecision/tut/rational/cpp_rational.html | 2
   sandbox/big_number/libs/multiprecision/doc/html/boost_multiprecision/tut/rational/gmp_rational.html | 2
   sandbox/big_number/libs/multiprecision/doc/html/boost_multiprecision/tut/rational/tommath_rational.html | 2
   sandbox/big_number/libs/multiprecision/doc/html/index.html | 2
   sandbox/big_number/libs/multiprecision/doc/multiprecision.qbk | 317 +++++++++++++++++++++++++++------------
   sandbox/big_number/libs/multiprecision/performance/sf_performance.cpp | 7
   sandbox/big_number/libs/multiprecision/test/math/log1p_expm1_test.cpp | 2
   sandbox/big_number/libs/multiprecision/test/math/powm1_sqrtp1m1_test.cpp | 2
   sandbox/big_number/libs/multiprecision/test/math/test_bessel_i.cpp | 2
   sandbox/big_number/libs/multiprecision/test/math/test_bessel_j.cpp | 2
   sandbox/big_number/libs/multiprecision/test/math/test_bessel_k.cpp | 2
   sandbox/big_number/libs/multiprecision/test/math/test_bessel_y.cpp | 2
   sandbox/big_number/libs/multiprecision/test/math/test_beta.cpp | 2
   sandbox/big_number/libs/multiprecision/test/math/test_binomial_coeff.cpp | 2
   sandbox/big_number/libs/multiprecision/test/math/test_carlson.cpp | 2
   sandbox/big_number/libs/multiprecision/test/math/test_cbrt.cpp | 2
   sandbox/big_number/libs/multiprecision/test/math/test_digamma.cpp | 2
   sandbox/big_number/libs/multiprecision/test/math/test_ellint_1.cpp | 2
   sandbox/big_number/libs/multiprecision/test/math/test_ellint_2.cpp | 2
   sandbox/big_number/libs/multiprecision/test/math/test_ellint_3.cpp | 2
   sandbox/big_number/libs/multiprecision/test/math/test_erf.cpp | 2
   sandbox/big_number/libs/multiprecision/test/math/test_expint.cpp | 2
   sandbox/big_number/libs/multiprecision/test/math/test_gamma.cpp | 2
   sandbox/big_number/libs/multiprecision/test/math/test_hermite.cpp | 2
   sandbox/big_number/libs/multiprecision/test/math/test_ibeta.cpp | 2
   sandbox/big_number/libs/multiprecision/test/math/test_ibeta_2.cpp | 2
   sandbox/big_number/libs/multiprecision/test/math/test_ibeta_3.cpp | 2
   sandbox/big_number/libs/multiprecision/test/math/test_ibeta_4.cpp | 2
   sandbox/big_number/libs/multiprecision/test/math/test_ibeta_inv_1.cpp | 2
   sandbox/big_number/libs/multiprecision/test/math/test_ibeta_inv_ab_4.cpp | 2
   sandbox/big_number/libs/multiprecision/test/math/test_igamma.cpp | 2
   sandbox/big_number/libs/multiprecision/test/math/test_igamma_inv.cpp | 2
   sandbox/big_number/libs/multiprecision/test/math/test_igamma_inva.cpp | 2
   sandbox/big_number/libs/multiprecision/test/math/test_laguerre.cpp | 2
   sandbox/big_number/libs/multiprecision/test/math/test_legendre.cpp | 2
   sandbox/big_number/libs/multiprecision/test/math/test_tgamma_ratio.cpp | 2
   sandbox/big_number/libs/multiprecision/test/math/test_zeta.cpp | 2
   56 files changed, 942 insertions(+), 274 deletions(-)

Modified: sandbox/big_number/boost/multiprecision/cpp_int/misc.hpp
==============================================================================
--- sandbox/big_number/boost/multiprecision/cpp_int/misc.hpp (original)
+++ sandbox/big_number/boost/multiprecision/cpp_int/misc.hpp 2012-10-31 13:06:33 EDT (Wed, 31 Oct 2012)
@@ -31,7 +31,7 @@
 void check_is_negative(const mpl::true_&) BOOST_NOEXCEPT {}
 void check_is_negative(const mpl::false_&)
 {
- BOOST_THROW_EXCEPTION(std::domain_error("Attempt to assign a negative value to an unsigned type."));
+ BOOST_THROW_EXCEPTION(std::range_error("Attempt to assign a negative value to an unsigned type."));
 }
 
 template <class Integer>

Modified: sandbox/big_number/boost/multiprecision/number.hpp
==============================================================================
--- sandbox/big_number/boost/multiprecision/number.hpp (original)
+++ sandbox/big_number/boost/multiprecision/number.hpp 2012-10-31 13:06:33 EDT (Wed, 31 Oct 2012)
@@ -749,7 +749,7 @@
          self_type temp(e);
          temp.m_backend.swap(this->m_backend);
       }
- else if(bl || (left_depth >= right_depth))
+ else if(!br && (bl || (left_depth >= right_depth)))
       { // br is always false, but if bl is true we must take the this branch:
          do_assign(e.left(), typename left_type::tag_type());
          do_add(e.right(), typename right_type::tag_type());
@@ -788,7 +788,7 @@
          self_type temp(e);
          temp.m_backend.swap(this->m_backend);
       }
- else if(bl || (left_depth >= right_depth))
+ else if(!br && (bl || (left_depth >= right_depth)))
       { // br is always false, but if bl is true we must take the this branch:
          do_assign(e.left(), typename left_type::tag_type());
          do_subtract(e.right(), typename right_type::tag_type());
@@ -827,7 +827,7 @@
          self_type temp(e);
          temp.m_backend.swap(this->m_backend);
       }
- else if(bl || (left_depth >= right_depth))
+ else if(!br && (bl || (left_depth >= right_depth)))
       { // br is always false, but if bl is true we must take the this branch:
          do_assign(e.left(), typename left_type::tag_type());
          do_multiplies(e.right(), typename right_type::tag_type());
@@ -927,7 +927,7 @@
       {
          do_bitwise_and(e.left(), typename left_type::tag_type());
       }
- else if(left_depth >= right_depth)
+ else if(!br && (bl || (left_depth >= right_depth)))
       {
          do_assign(e.left(), typename left_type::tag_type());
          do_bitwise_and(e.right(), typename right_type::tag_type());
@@ -972,7 +972,7 @@
       {
          do_bitwise_or(e.left(), typename left_type::tag_type());
       }
- else if(left_depth >= right_depth)
+ else if(!br && (bl || (left_depth >= right_depth)))
       {
          do_assign(e.left(), typename left_type::tag_type());
          do_bitwise_or(e.right(), typename right_type::tag_type());
@@ -1017,7 +1017,7 @@
       {
          do_bitwise_xor(e.left(), typename left_type::tag_type());
       }
- else if(left_depth >= right_depth)
+ else if(!br && (bl || (left_depth >= right_depth)))
       {
          do_assign(e.left(), typename left_type::tag_type());
          do_bitwise_xor(e.right(), typename right_type::tag_type());

Modified: sandbox/big_number/libs/multiprecision/doc/html/boost_multiprecision/indexes/s01.html
==============================================================================
--- sandbox/big_number/libs/multiprecision/doc/html/boost_multiprecision/indexes/s01.html (original)
+++ sandbox/big_number/libs/multiprecision/doc/html/boost_multiprecision/indexes/s01.html 2012-10-31 13:06:33 EDT (Wed, 31 Oct 2012)
@@ -13,9 +13,9 @@
 <div class="spirit-nav">
 <a accesskey="p" href="../indexes.html"><img src="../../images/prev.png" alt="Prev"></a><a accesskey="u" href="../indexes.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="s02.html"><img src="../../images/next.png" alt="Next"></a>
 </div>
-<div class="section id995130">
+<div class="section id992651">
 <div class="titlepage"><div><div><h3 class="title">
-<a name="id995130"></a>Function Index</h3></div></div></div>
+<a name="id992651"></a>Function Index</h3></div></div></div>
 <p><a class="link" href="s01.html#idx_id_0">A</a> <a class="link" href="s01.html#idx_id_1">B</a> <a class="link" href="s01.html#idx_id_2">C</a> <a class="link" href="s01.html#idx_id_3">D</a> <a class="link" href="s01.html#idx_id_4">E</a> <a class="link" href="s01.html#idx_id_5">F</a> <a class="link" href="s01.html#idx_id_7">I</a> <a class="link" href="s01.html#idx_id_8">L</a> <a class="link" href="s01.html#idx_id_9">M</a> <a class="link" href="s01.html#idx_id_12">P</a> <a class="link" href="s01.html#idx_id_13">R</a> <a class="link" href="s01.html#idx_id_14">S</a> <a class="link" href="s01.html#idx_id_15">T</a> <a class="link" href="s01.html#idx_id_17">Z</a></p>
 <div class="variablelist"><dl class="variablelist">
 <dt>
@@ -23,6 +23,10 @@
 </dt>
 <dd><div class="index"><ul class="index" style="list-style-type: none; ">
 <li class="listitem" style="list-style-type: none">
+<p><span class="index-entry-level-0">abs</span></p>
+<div class="index"><ul class="index" style="list-style-type: none; "><li class="listitem" style="list-style-type: none"><p><a class="link" href="../ref/number.html" title="number"><span class="index-entry-level-1">number</span></a></p></li></ul></div>
+</li>
+<li class="listitem" style="list-style-type: none">
 <p><span class="index-entry-level-0">assign</span></p>
 <div class="index"><ul class="index" style="list-style-type: none; "><li class="listitem" style="list-style-type: none"><p><a class="link" href="../ref/number.html" title="number"><span class="index-entry-level-1">number</span></a></p></li></ul></div>
 </li>

Modified: sandbox/big_number/libs/multiprecision/doc/html/boost_multiprecision/indexes/s02.html
==============================================================================
--- sandbox/big_number/libs/multiprecision/doc/html/boost_multiprecision/indexes/s02.html (original)
+++ sandbox/big_number/libs/multiprecision/doc/html/boost_multiprecision/indexes/s02.html 2012-10-31 13:06:33 EDT (Wed, 31 Oct 2012)
@@ -13,9 +13,9 @@
 <div class="spirit-nav">
 <a accesskey="p" href="s01.html"><img src="../../images/prev.png" alt="Prev"></a><a accesskey="u" href="../indexes.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="s03.html"><img src="../../images/next.png" alt="Next"></a>
 </div>
-<div class="section id998787">
+<div class="section id996678">
 <div class="titlepage"><div><div><h3 class="title">
-<a name="id998787"></a>Class Index</h3></div></div></div>
+<a name="id996678"></a>Class Index</h3></div></div></div>
 <p><a class="link" href="s02.html#idx_id_20">C</a> <a class="link" href="s02.html#idx_id_22">E</a> <a class="link" href="s02.html#idx_id_24">G</a> <a class="link" href="s02.html#idx_id_25">I</a> <a class="link" href="s02.html#idx_id_27">M</a> <a class="link" href="s02.html#idx_id_28">N</a> <a class="link" href="s02.html#idx_id_33">T</a></p>
 <div class="variablelist"><dl class="variablelist">
 <dt>
@@ -71,6 +71,14 @@
 <p><span class="index-entry-level-0">is_restricted_conversion</span></p>
 <div class="index"><ul class="index" style="list-style-type: none; "><li class="listitem" style="list-style-type: none"><p><a class="link" href="../ref/internals.html" title="Internal Support Code"><span class="index-entry-level-1">Internal Support Code</span></a></p></li></ul></div>
 </li>
+<li class="listitem" style="list-style-type: none">
+<p><span class="index-entry-level-0">is_signed_number</span></p>
+<div class="index"><ul class="index" style="list-style-type: none; "><li class="listitem" style="list-style-type: none"><p><a class="link" href="../ref/internals.html" title="Internal Support Code"><span class="index-entry-level-1">Internal Support Code</span></a></p></li></ul></div>
+</li>
+<li class="listitem" style="list-style-type: none">
+<p><span class="index-entry-level-0">is_unsigned_number</span></p>
+<div class="index"><ul class="index" style="list-style-type: none; "><li class="listitem" style="list-style-type: none"><p><a class="link" href="../ref/internals.html" title="Internal Support Code"><span class="index-entry-level-1">Internal Support Code</span></a></p></li></ul></div>
+</li>
 </ul></div></dd>
 <dt>
 <a name="idx_id_27"></a><span class="term">M</span>

Modified: sandbox/big_number/libs/multiprecision/doc/html/boost_multiprecision/indexes/s03.html
==============================================================================
--- sandbox/big_number/libs/multiprecision/doc/html/boost_multiprecision/indexes/s03.html (original)
+++ sandbox/big_number/libs/multiprecision/doc/html/boost_multiprecision/indexes/s03.html 2012-10-31 13:06:33 EDT (Wed, 31 Oct 2012)
@@ -13,9 +13,9 @@
 <div class="spirit-nav">
 <a accesskey="p" href="s02.html"><img src="../../images/prev.png" alt="Prev"></a><a accesskey="u" href="../indexes.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="s04.html"><img src="../../images/next.png" alt="Next"></a>
 </div>
-<div class="section id999166">
+<div class="section id997095">
 <div class="titlepage"><div><div><h3 class="title">
-<a name="id999166"></a>Typedef Index</h3></div></div></div>
+<a name="id997095"></a>Typedef Index</h3></div></div></div>
 <p><a class="link" href="s03.html#idx_id_38">C</a> <a class="link" href="s03.html#idx_id_43">I</a> <a class="link" href="s03.html#idx_id_44">L</a> <a class="link" href="s03.html#idx_id_45">M</a> <a class="link" href="s03.html#idx_id_51">T</a> <a class="link" href="s03.html#idx_id_52">U</a></p>
 <div class="variablelist"><dl class="variablelist">
 <dt>
@@ -23,6 +23,50 @@
 </dt>
 <dd><div class="index"><ul class="index" style="list-style-type: none; ">
 <li class="listitem" style="list-style-type: none">
+<p><span class="index-entry-level-0">checked_cpp_int</span></p>
+<div class="index"><ul class="index" style="list-style-type: none; "><li class="listitem" style="list-style-type: none"><p><a class="link" href="../tut/ints/cpp_int.html" title="cpp_int"><span class="index-entry-level-1">cpp_int</span></a></p></li></ul></div>
+</li>
+<li class="listitem" style="list-style-type: none">
+<p><span class="index-entry-level-0">checked_cpp_rational</span></p>
+<div class="index"><ul class="index" style="list-style-type: none; "><li class="listitem" style="list-style-type: none"><p><a class="link" href="../tut/ints/cpp_int.html" title="cpp_int"><span class="index-entry-level-1">cpp_int</span></a></p></li></ul></div>
+</li>
+<li class="listitem" style="list-style-type: none">
+<p><span class="index-entry-level-0">checked_cpp_rational_backend</span></p>
+<div class="index"><ul class="index" style="list-style-type: none; "><li class="listitem" style="list-style-type: none"><p><a class="link" href="../tut/ints/cpp_int.html" title="cpp_int"><span class="index-entry-level-1">cpp_int</span></a></p></li></ul></div>
+</li>
+<li class="listitem" style="list-style-type: none">
+<p><span class="index-entry-level-0">checked_int1024_t</span></p>
+<div class="index"><ul class="index" style="list-style-type: none; "><li class="listitem" style="list-style-type: none"><p><a class="link" href="../tut/ints/cpp_int.html" title="cpp_int"><span class="index-entry-level-1">cpp_int</span></a></p></li></ul></div>
+</li>
+<li class="listitem" style="list-style-type: none">
+<p><span class="index-entry-level-0">checked_int128_t</span></p>
+<div class="index"><ul class="index" style="list-style-type: none; "><li class="listitem" style="list-style-type: none"><p><a class="link" href="../tut/ints/cpp_int.html" title="cpp_int"><span class="index-entry-level-1">cpp_int</span></a></p></li></ul></div>
+</li>
+<li class="listitem" style="list-style-type: none">
+<p><span class="index-entry-level-0">checked_int256_t</span></p>
+<div class="index"><ul class="index" style="list-style-type: none; "><li class="listitem" style="list-style-type: none"><p><a class="link" href="../tut/ints/cpp_int.html" title="cpp_int"><span class="index-entry-level-1">cpp_int</span></a></p></li></ul></div>
+</li>
+<li class="listitem" style="list-style-type: none">
+<p><span class="index-entry-level-0">checked_int512_t</span></p>
+<div class="index"><ul class="index" style="list-style-type: none; "><li class="listitem" style="list-style-type: none"><p><a class="link" href="../tut/ints/cpp_int.html" title="cpp_int"><span class="index-entry-level-1">cpp_int</span></a></p></li></ul></div>
+</li>
+<li class="listitem" style="list-style-type: none">
+<p><span class="index-entry-level-0">checked_uint1024_t</span></p>
+<div class="index"><ul class="index" style="list-style-type: none; "><li class="listitem" style="list-style-type: none"><p><a class="link" href="../tut/ints/cpp_int.html" title="cpp_int"><span class="index-entry-level-1">cpp_int</span></a></p></li></ul></div>
+</li>
+<li class="listitem" style="list-style-type: none">
+<p><span class="index-entry-level-0">checked_uint128_t</span></p>
+<div class="index"><ul class="index" style="list-style-type: none; "><li class="listitem" style="list-style-type: none"><p><a class="link" href="../tut/ints/cpp_int.html" title="cpp_int"><span class="index-entry-level-1">cpp_int</span></a></p></li></ul></div>
+</li>
+<li class="listitem" style="list-style-type: none">
+<p><span class="index-entry-level-0">checked_uint256_t</span></p>
+<div class="index"><ul class="index" style="list-style-type: none; "><li class="listitem" style="list-style-type: none"><p><a class="link" href="../tut/ints/cpp_int.html" title="cpp_int"><span class="index-entry-level-1">cpp_int</span></a></p></li></ul></div>
+</li>
+<li class="listitem" style="list-style-type: none">
+<p><span class="index-entry-level-0">checked_uint512_t</span></p>
+<div class="index"><ul class="index" style="list-style-type: none; "><li class="listitem" style="list-style-type: none"><p><a class="link" href="../tut/ints/cpp_int.html" title="cpp_int"><span class="index-entry-level-1">cpp_int</span></a></p></li></ul></div>
+</li>
+<li class="listitem" style="list-style-type: none">
 <p><span class="index-entry-level-0">cpp_dec_float_100</span></p>
 <div class="index"><ul class="index" style="list-style-type: none; "><li class="listitem" style="list-style-type: none"><p><a class="link" href="../tut/floats/cpp_dec_float.html" title="cpp_dec_float"><span class="index-entry-level-1">cpp_dec_float</span></a></p></li></ul></div>
 </li>

Modified: sandbox/big_number/libs/multiprecision/doc/html/boost_multiprecision/indexes/s04.html
==============================================================================
--- sandbox/big_number/libs/multiprecision/doc/html/boost_multiprecision/indexes/s04.html (original)
+++ sandbox/big_number/libs/multiprecision/doc/html/boost_multiprecision/indexes/s04.html 2012-10-31 13:06:33 EDT (Wed, 31 Oct 2012)
@@ -12,9 +12,9 @@
 <div class="spirit-nav">
 <a accesskey="p" href="s03.html"><img src="../../images/prev.png" alt="Prev"></a><a accesskey="u" href="../indexes.html"><img src="../../images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../images/home.png" alt="Home"></a>
 </div>
-<div class="section id999901">
+<div class="section id999680">
 <div class="titlepage"><div><div><h3 class="title">
-<a name="id999901"></a>Index</h3></div></div></div>
+<a name="id999680"></a>Index</h3></div></div></div>
 <p><a class="link" href="s04.html#idx_id_54">A</a> <a class="link" href="s04.html#idx_id_55">B</a> <a class="link" href="s04.html#idx_id_56">C</a> <a class="link" href="s04.html#idx_id_57">D</a> <a class="link" href="s04.html#idx_id_58">E</a> <a class="link" href="s04.html#idx_id_59">F</a> <a class="link" href="s04.html#idx_id_60">G</a> <a class="link" href="s04.html#idx_id_61">I</a> <a class="link" href="s04.html#idx_id_62">L</a> <a class="link" href="s04.html#idx_id_63">M</a> <a class="link" href="s04.html#idx_id_64">N</a> <a class="link" href="s04.html#idx_id_65">O</a> <a class="link" href="s04.html#idx_id_66">P</a> <a class="link" href="s04.html#idx_id_67">R</a> <a class="link" href="s04.html#idx_id_68">S</a> <a class="link" href="s04.html#idx_id_69">T</a> <a class="link" href="s04.html#idx_id_70">U</a> <a class="link" href="s04.html#idx_id_71">Z</a></p>
 <div class="variablelist"><dl class="variablelist">
 <dt>
@@ -22,6 +22,10 @@
 </dt>
 <dd><div class="index"><ul class="index" style="list-style-type: none; ">
 <li class="listitem" style="list-style-type: none">
+<p><span class="index-entry-level-0">abs</span></p>
+<div class="index"><ul class="index" style="list-style-type: none; "><li class="listitem" style="list-style-type: none"><p><a class="link" href="../ref/number.html" title="number"><span class="index-entry-level-1">number</span></a></p></li></ul></div>
+</li>
+<li class="listitem" style="list-style-type: none">
 <p><span class="index-entry-level-0">assign</span></p>
 <div class="index"><ul class="index" style="list-style-type: none; "><li class="listitem" style="list-style-type: none"><p><a class="link" href="../ref/number.html" title="number"><span class="index-entry-level-1">number</span></a></p></li></ul></div>
 </li>
@@ -64,6 +68,50 @@
 <div class="index"><ul class="index" style="list-style-type: none; "><li class="listitem" style="list-style-type: none"><p><a class="link" href="../tut/floats/fp_eg/gi.html" title="Calculating an Integral"><span class="index-entry-level-1">mp_type</span></a></p></li></ul></div>
 </li>
 <li class="listitem" style="list-style-type: none">
+<p><span class="index-entry-level-0">checked_cpp_int</span></p>
+<div class="index"><ul class="index" style="list-style-type: none; "><li class="listitem" style="list-style-type: none"><p><a class="link" href="../tut/ints/cpp_int.html" title="cpp_int"><span class="index-entry-level-1">cpp_int</span></a></p></li></ul></div>
+</li>
+<li class="listitem" style="list-style-type: none">
+<p><span class="index-entry-level-0">checked_cpp_rational</span></p>
+<div class="index"><ul class="index" style="list-style-type: none; "><li class="listitem" style="list-style-type: none"><p><a class="link" href="../tut/ints/cpp_int.html" title="cpp_int"><span class="index-entry-level-1">cpp_int</span></a></p></li></ul></div>
+</li>
+<li class="listitem" style="list-style-type: none">
+<p><span class="index-entry-level-0">checked_cpp_rational_backend</span></p>
+<div class="index"><ul class="index" style="list-style-type: none; "><li class="listitem" style="list-style-type: none"><p><a class="link" href="../tut/ints/cpp_int.html" title="cpp_int"><span class="index-entry-level-1">cpp_int</span></a></p></li></ul></div>
+</li>
+<li class="listitem" style="list-style-type: none">
+<p><span class="index-entry-level-0">checked_int1024_t</span></p>
+<div class="index"><ul class="index" style="list-style-type: none; "><li class="listitem" style="list-style-type: none"><p><a class="link" href="../tut/ints/cpp_int.html" title="cpp_int"><span class="index-entry-level-1">cpp_int</span></a></p></li></ul></div>
+</li>
+<li class="listitem" style="list-style-type: none">
+<p><span class="index-entry-level-0">checked_int128_t</span></p>
+<div class="index"><ul class="index" style="list-style-type: none; "><li class="listitem" style="list-style-type: none"><p><a class="link" href="../tut/ints/cpp_int.html" title="cpp_int"><span class="index-entry-level-1">cpp_int</span></a></p></li></ul></div>
+</li>
+<li class="listitem" style="list-style-type: none">
+<p><span class="index-entry-level-0">checked_int256_t</span></p>
+<div class="index"><ul class="index" style="list-style-type: none; "><li class="listitem" style="list-style-type: none"><p><a class="link" href="../tut/ints/cpp_int.html" title="cpp_int"><span class="index-entry-level-1">cpp_int</span></a></p></li></ul></div>
+</li>
+<li class="listitem" style="list-style-type: none">
+<p><span class="index-entry-level-0">checked_int512_t</span></p>
+<div class="index"><ul class="index" style="list-style-type: none; "><li class="listitem" style="list-style-type: none"><p><a class="link" href="../tut/ints/cpp_int.html" title="cpp_int"><span class="index-entry-level-1">cpp_int</span></a></p></li></ul></div>
+</li>
+<li class="listitem" style="list-style-type: none">
+<p><span class="index-entry-level-0">checked_uint1024_t</span></p>
+<div class="index"><ul class="index" style="list-style-type: none; "><li class="listitem" style="list-style-type: none"><p><a class="link" href="../tut/ints/cpp_int.html" title="cpp_int"><span class="index-entry-level-1">cpp_int</span></a></p></li></ul></div>
+</li>
+<li class="listitem" style="list-style-type: none">
+<p><span class="index-entry-level-0">checked_uint128_t</span></p>
+<div class="index"><ul class="index" style="list-style-type: none; "><li class="listitem" style="list-style-type: none"><p><a class="link" href="../tut/ints/cpp_int.html" title="cpp_int"><span class="index-entry-level-1">cpp_int</span></a></p></li></ul></div>
+</li>
+<li class="listitem" style="list-style-type: none">
+<p><span class="index-entry-level-0">checked_uint256_t</span></p>
+<div class="index"><ul class="index" style="list-style-type: none; "><li class="listitem" style="list-style-type: none"><p><a class="link" href="../tut/ints/cpp_int.html" title="cpp_int"><span class="index-entry-level-1">cpp_int</span></a></p></li></ul></div>
+</li>
+<li class="listitem" style="list-style-type: none">
+<p><span class="index-entry-level-0">checked_uint512_t</span></p>
+<div class="index"><ul class="index" style="list-style-type: none; "><li class="listitem" style="list-style-type: none"><p><a class="link" href="../tut/ints/cpp_int.html" title="cpp_int"><span class="index-entry-level-1">cpp_int</span></a></p></li></ul></div>
+</li>
+<li class="listitem" style="list-style-type: none">
 <p><span class="index-entry-level-0">compare</span></p>
 <div class="index"><ul class="index" style="list-style-type: none; "><li class="listitem" style="list-style-type: none"><p><a class="link" href="../ref/number.html" title="number"><span class="index-entry-level-1">number</span></a></p></li></ul></div>
 </li>
@@ -112,6 +160,17 @@
 <li class="listitem" style="list-style-type: none">
 <p><span class="index-entry-level-0">cpp_int</span></p>
 <div class="index"><ul class="index" style="list-style-type: none; ">
+<li class="listitem" style="list-style-type: none"><p><a class="link" href="../tut/ints/cpp_int.html" title="cpp_int"><span class="index-entry-level-1">checked_cpp_int</span></a></p></li>
+<li class="listitem" style="list-style-type: none"><p><a class="link" href="../tut/ints/cpp_int.html" title="cpp_int"><span class="index-entry-level-1">checked_cpp_rational</span></a></p></li>
+<li class="listitem" style="list-style-type: none"><p><a class="link" href="../tut/ints/cpp_int.html" title="cpp_int"><span class="index-entry-level-1">checked_cpp_rational_backend</span></a></p></li>
+<li class="listitem" style="list-style-type: none"><p><a class="link" href="../tut/ints/cpp_int.html" title="cpp_int"><span class="index-entry-level-1">checked_int1024_t</span></a></p></li>
+<li class="listitem" style="list-style-type: none"><p><a class="link" href="../tut/ints/cpp_int.html" title="cpp_int"><span class="index-entry-level-1">checked_int128_t</span></a></p></li>
+<li class="listitem" style="list-style-type: none"><p><a class="link" href="../tut/ints/cpp_int.html" title="cpp_int"><span class="index-entry-level-1">checked_int256_t</span></a></p></li>
+<li class="listitem" style="list-style-type: none"><p><a class="link" href="../tut/ints/cpp_int.html" title="cpp_int"><span class="index-entry-level-1">checked_int512_t</span></a></p></li>
+<li class="listitem" style="list-style-type: none"><p><a class="link" href="../tut/ints/cpp_int.html" title="cpp_int"><span class="index-entry-level-1">checked_uint1024_t</span></a></p></li>
+<li class="listitem" style="list-style-type: none"><p><a class="link" href="../tut/ints/cpp_int.html" title="cpp_int"><span class="index-entry-level-1">checked_uint128_t</span></a></p></li>
+<li class="listitem" style="list-style-type: none"><p><a class="link" href="../tut/ints/cpp_int.html" title="cpp_int"><span class="index-entry-level-1">checked_uint256_t</span></a></p></li>
+<li class="listitem" style="list-style-type: none"><p><a class="link" href="../tut/ints/cpp_int.html" title="cpp_int"><span class="index-entry-level-1">checked_uint512_t</span></a></p></li>
 <li class="listitem" style="list-style-type: none"><p><span class="bold"><strong><a class="link" href="../tut/ints/cpp_int.html" title="cpp_int"><span class="index-entry-level-1">cpp_int</span></a></strong></span></p></li>
 <li class="listitem" style="list-style-type: none"><p><a class="link" href="../tut/ints/cpp_int.html" title="cpp_int"><span class="index-entry-level-1">cpp_int_backend</span></a></p></li>
 <li class="listitem" style="list-style-type: none"><p><a class="link" href="../tut/ints/cpp_int.html" title="cpp_int"><span class="index-entry-level-1">cpp_rational</span></a></p></li>
@@ -490,6 +549,8 @@
 <li class="listitem" style="list-style-type: none"><p><a class="link" href="../ref/internals.html" title="Internal Support Code"><span class="index-entry-level-1">is_explicitly_convertible</span></a></p></li>
 <li class="listitem" style="list-style-type: none"><p><a class="link" href="../ref/internals.html" title="Internal Support Code"><span class="index-entry-level-1">is_lossy_conversion</span></a></p></li>
 <li class="listitem" style="list-style-type: none"><p><a class="link" href="../ref/internals.html" title="Internal Support Code"><span class="index-entry-level-1">is_restricted_conversion</span></a></p></li>
+<li class="listitem" style="list-style-type: none"><p><a class="link" href="../ref/internals.html" title="Internal Support Code"><span class="index-entry-level-1">is_signed_number</span></a></p></li>
+<li class="listitem" style="list-style-type: none"><p><a class="link" href="../ref/internals.html" title="Internal Support Code"><span class="index-entry-level-1">is_unsigned_number</span></a></p></li>
 </ul></div>
 </li>
 <li class="listitem" style="list-style-type: none">
@@ -541,6 +602,14 @@
 <div class="index"><ul class="index" style="list-style-type: none; "><li class="listitem" style="list-style-type: none"><p><a class="link" href="../ref/internals.html" title="Internal Support Code"><span class="index-entry-level-1">Internal Support Code</span></a></p></li></ul></div>
 </li>
 <li class="listitem" style="list-style-type: none">
+<p><span class="index-entry-level-0">is_signed_number</span></p>
+<div class="index"><ul class="index" style="list-style-type: none; "><li class="listitem" style="list-style-type: none"><p><a class="link" href="../ref/internals.html" title="Internal Support Code"><span class="index-entry-level-1">Internal Support Code</span></a></p></li></ul></div>
+</li>
+<li class="listitem" style="list-style-type: none">
+<p><span class="index-entry-level-0">is_unsigned_number</span></p>
+<div class="index"><ul class="index" style="list-style-type: none; "><li class="listitem" style="list-style-type: none"><p><a class="link" href="../ref/internals.html" title="Internal Support Code"><span class="index-entry-level-1">Internal Support Code</span></a></p></li></ul></div>
+</li>
+<li class="listitem" style="list-style-type: none">
 <p><span class="index-entry-level-0">itrunc</span></p>
 <div class="index"><ul class="index" style="list-style-type: none; "><li class="listitem" style="list-style-type: none"><p><a class="link" href="../ref/number.html" title="number"><span class="index-entry-level-1">number</span></a></p></li></ul></div>
 </li>
@@ -679,6 +748,7 @@
 <li class="listitem" style="list-style-type: none">
 <p><span class="index-entry-level-0">number</span></p>
 <div class="index"><ul class="index" style="list-style-type: none; ">
+<li class="listitem" style="list-style-type: none"><p><a class="link" href="../ref/number.html" title="number"><span class="index-entry-level-1">abs</span></a></p></li>
 <li class="listitem" style="list-style-type: none"><p><a class="link" href="../ref/number.html" title="number"><span class="index-entry-level-1">assign</span></a></p></li>
 <li class="listitem" style="list-style-type: none"><p><a class="link" href="../ref/number.html" title="number"><span class="index-entry-level-1">bit_flip</span></a></p></li>
 <li class="listitem" style="list-style-type: none"><p><a class="link" href="../ref/number.html" title="number"><span class="index-entry-level-1">bit_set</span></a></p></li>

Modified: sandbox/big_number/libs/multiprecision/doc/html/boost_multiprecision/intro.html
==============================================================================
--- sandbox/big_number/libs/multiprecision/doc/html/boost_multiprecision/intro.html (original)
+++ sandbox/big_number/libs/multiprecision/doc/html/boost_multiprecision/intro.html 2012-10-31 13:06:33 EDT (Wed, 31 Oct 2012)
@@ -155,10 +155,11 @@
       Note that while "moved-from" objects are left in a sane state, they
       have an unspecified value, and the only permitted operations on them are destruction
       or the assignment of a new value. Any other operation should be considered
- a programming error and many backends will trigger an assertion if any other
- operation is attempted. This behavior allows for optimal performance on move-construction
- (i.e. no allocation required, we just take ownership of the existing object's
- internal state), while maintaining usability in the standard library containers.
+ a programming error and all of our backends will trigger an assertion if any
+ other operation is attempted. This behavior allows for optimal performance
+ on move-construction (i.e. no allocation required, we just take ownership of
+ the existing object's internal state), while maintaining usability in the standard
+ library containers.
     </p>
 <h5>
 <a name="boost_multiprecision.intro.h1"></a>
@@ -217,9 +218,36 @@
       performed rather than the number of temporaries directly, note also that the
       <a href="http://gmplib.org/manual/C_002b_002b-Interface-Floats.html#C_002b_002b-Interface-Floats" target="_top">mpf_class</a>
       wrapper that will be supplied with GMP-5.1 reduces the number of temporaries
- to pretty much zero). Finally if we use this library with expression templates
- disabled, we still only generate 11 temporaries [1]</sup></a> [2]</sup></a>.
+ to pretty much zero). Note that if we compile with expression templates disabled
+ and rvalue-reference support on, then actually still have no wasted memory
+ allocations as even though temporaries are created, their contents are moved
+ rather than copied. [1]</sup></a>
     </p>
+<div class="important"><table border="0" summary="Important">
+<tr>
+<td rowspan="2" align="center" valign="top" width="25"><img alt="[Important]" src="../images/important.png"></td>
+<th align="left">Important</th>
+</tr>
+<tr><td align="left" valign="top">
+<p>
+ Expression templates can radically reorder the operations in an expression,
+ for example:
+ </p>
+<p>
+ a = (b * c) * a;
+ </p>
+<p>
+ Will get transformed into:
+ </p>
+<p>
+ a *= c; a *= b;
+ </p>
+<p>
+ If this is likely to be an issue for a particular application, then they
+ should be disabled.
+ </p>
+</td></tr>
+</table></div>
 <p>
       This library also extends expression template support to standard library functions
       like <code class="computeroutput"><span class="identifier">abs</span></code> or <code class="computeroutput"><span class="identifier">sin</span></code>
@@ -411,7 +439,7 @@
 </ul></div>
 <p>
       Finally, note that <code class="computeroutput"><span class="identifier">number</span></code> takes
- a second template argument, which, when set to <code class="computeroutput"><span class="keyword">false</span></code>
+ a second template argument, which, when set to <code class="computeroutput"><span class="identifier">et_off</span></code>
       disables all the expression template machinery. The result is much faster to
       compile, but slower at runtime.
     </p>
@@ -421,9 +449,6 @@
       to carry out the underlying arithmetic, and all are operating at the same precision
       (50 decimal digits):
     </p>
-<p>
- TODO: Update, compare to rvalue refs but no ET's as well.
- </p>
 <div class="table">
 <a name="boost_multiprecision.intro.evaluation_of_boost_math_s_bessel_function_test_data"></a><p class="title"><b>Table&#160;1.2.&#160;Evaluation of Boost.Math's Bessel function test data</b></p>
 <div class="table-contents"><table class="table" summary="Evaluation of Boost.Math's Bessel function test data">
@@ -453,17 +478,35 @@
 <tr>
 <td>
               <p>
- number
+ mpfr_float_50
               </p>
             </td>
 <td>
               <p>
- 1.0 (6.21s)
+ 1.0 (5.66s)
               </p>
             </td>
 <td>
               <p>
- 1.0 (2685469)
+ 1.0 (1611963)
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ number&lt;mpfr_float_backend&lt;50&gt;, et_off&gt;<br> (but with
+ rvalue reference support)
+ </p>
+ </td>
+<td>
+ <p>
+ 1.10 (6.25s)
+ </p>
+ </td>
+<td>
+ <p>
+ 2.64 (4260868)
               </p>
             </td>
 </tr>
@@ -475,12 +518,12 @@
             </td>
 <td>
               <p>
- 1.04 (6.45s)
+ 1.09 (6.16s)
               </p>
             </td>
 <td>
               <p>
- 1.47 (3946007)
+ 2.45 (3948316)
               </p>
             </td>
 </tr>
@@ -492,12 +535,12 @@
             </td>
 <td>
               <p>
- 1.53 (9.52s)
+ 1.65 (9.34s)
               </p>
             </td>
 <td>
               <p>
- 4.92 (13222940)
+ 8.21 (13226029)
               </p>
             </td>
 </tr>
@@ -538,12 +581,30 @@
             </td>
 <td>
               <p>
- 1.0 (269s)
+ 1.0 (257s)
               </p>
             </td>
 <td>
               <p>
- 1.0 (139082551)
+ 1.0 (127710873)
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ number&lt;mpfr_float_backend&lt;50&gt;, et_off&gt;<br> (but with
+ rvalue reference support)
+ </p>
+ </td>
+<td>
+ <p>
+ 1.0 (257s)
+ </p>
+ </td>
+<td>
+ <p>
+ 1.2 (156797871)
               </p>
             </td>
 </tr>
@@ -555,12 +616,12 @@
             </td>
 <td>
               <p>
- 1.04 (278s)
+ 1.1 (280s)
               </p>
             </td>
 <td>
               <p>
- 1.81 (252400791)
+ 2.1 (268336640)
               </p>
             </td>
 </tr>
@@ -572,30 +633,29 @@
             </td>
 <td>
               <p>
- 1.49 (401s)
+ 1.4 (363s)
               </p>
             </td>
 <td>
               <p>
- 3.22 (447009280)
+ 3.6 (466960653)
               </p>
             </td>
 </tr>
 </tbody>
 </table></div>
 </div>
-<br class="table-break"><div class="footnotes">
+<br class="table-break"><p>
+ The above results were generated on Win32 compiling with Visual C++ 2010, all
+ optimizations on (/Ox), with MPFR 3.0 and MPIR 2.3.0.
+ </p>
+<div class="footnotes">
 <br><hr style="width:100; align:left;">
 <div id="ftn.boost_multiprecision.intro.f0" class="footnote"><p>[1]
         The actual number generated will depend on the compiler, how well it optimises
         the code, and whether it supports rvalue references. The number of 11 temporaries
         was generated with Visual C++ 10
       </p></div>
-<div id="ftn.boost_multiprecision.intro.f1" class="footnote"><p>[2]
- Marc Glisse suggested pre-review that this could be reduced still further
- by careful use of rvalue-references and move semantics in the operator overloads.
- This will be investigated further at a later date.
- </p></div>
 </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/map/hist.html
==============================================================================
--- sandbox/big_number/libs/multiprecision/doc/html/boost_multiprecision/map/hist.html (original)
+++ sandbox/big_number/libs/multiprecision/doc/html/boost_multiprecision/map/hist.html 2012-10-31 13:06:33 EDT (Wed, 31 Oct 2012)
@@ -28,7 +28,7 @@
             support.
           </li>
 <li class="listitem">
- Many functions made made <code class="computeroutput"><span class="identifier">constexp</span></code>?
+ Many functions made <code class="computeroutput"><span class="identifier">constexp</span></code>.
           </li>
 <li class="listitem">
             Differentiate between explicit and implicit conversions in the number
@@ -55,6 +55,10 @@
             Tweaked expression template unpacking to use fewer temporaries when the
             LHS also appears in the RHS.
           </li>
+<li class="listitem">
+ Refactored <code class="computeroutput"><span class="identifier">cpp_int_backend</span></code>
+ based on review comments with new template parameter structure.
+ </li>
 </ul></div>
 <h5>
 <a name="boost_multiprecision.map.hist.h1"></a>

Modified: sandbox/big_number/libs/multiprecision/doc/html/boost_multiprecision/map/todo.html
==============================================================================
--- sandbox/big_number/libs/multiprecision/doc/html/boost_multiprecision/map/todo.html (original)
+++ sandbox/big_number/libs/multiprecision/doc/html/boost_multiprecision/map/todo.html 2012-10-31 13:06:33 EDT (Wed, 31 Oct 2012)
@@ -58,22 +58,6 @@
             more.
           </li>
 <li class="listitem">
- A backend for an overflow aware integers.
- </li>
-<li class="listitem">
- Each back-end should document the requirements it satisfies (not currently
- scheduled for inclusion: it's deliberately an implementation detail,
- and "optional" requirements are optimisations which can't be
- detected by the user).
- </li>
-<li class="listitem">
- The use of bool in template parameters could be improved by the use of
- an enum class which will be more explicit. E.g <code class="computeroutput"><span class="keyword">enum</span>
- <span class="keyword">class</span> <span class="identifier">expression_template</span>
- <span class="special">{</span><span class="identifier">disabled</span><span class="special">,</span> <span class="identifier">enabled</span><span class="special">};</span> <span class="keyword">enum</span> <span class="keyword">class</span> <span class="identifier">sign</span>
- <span class="special">{</span><span class="keyword">unsigned</span><span class="special">,</span> <span class="keyword">signed</span><span class="special">};</span></code> (Partly done 2012/09/15).
- </li>
-<li class="listitem">
             The performances of mp_number&lt;a_trivial_adaptor&lt;float&gt;, false&gt;respect
             to float and mp_number&lt;a_trivial_adaptor&lt;int&gt;, false&gt; and
             int should be given to show the cost of using the generic interface (Mostly
@@ -95,9 +79,6 @@
             Document why we don't use proto (compile times).
           </li>
 <li class="listitem">
- Document what happens to small fixed precision cpp_int's.
- </li>
-<li class="listitem">
             Should we provide min/max overloads for expression templates?
           </li>
 <li class="listitem">
@@ -105,6 +86,27 @@
             etc.
           </li>
 <li class="listitem">
+ Document what happens to small fixed precision cpp_int's (done 2012/10/31).
+ </li>
+<li class="listitem">
+ The use of bool in template parameters could be improved by the use of
+ an enum class which will be more explicit. E.g <code class="computeroutput"><span class="keyword">enum</span>
+ <span class="keyword">class</span> <span class="identifier">expression_template</span>
+ <span class="special">{</span><span class="identifier">disabled</span><span class="special">,</span> <span class="identifier">enabled</span><span class="special">};</span> <span class="keyword">enum</span> <span class="keyword">class</span> <span class="identifier">sign</span>
+ <span class="special">{</span><span class="keyword">unsigned</span><span class="special">,</span> <span class="keyword">signed</span><span class="special">};</span></code> (Partly done 2012/09/15, done 2012/10/31).
+ </li>
+<li class="listitem">
+ Each back-end should document the requirements it satisfies (not currently
+ scheduled for inclusion: it's deliberately an implementation detail,
+ and "optional" requirements are optimisations which can't be
+ detected by the user). Not done: this is an implementation detail, the
+ exact list of requirements satisfied is purely an optimimization, not
+ something the user can detect.
+ </li>
+<li class="listitem">
+ A backend for an overflow aware integers (done 2012/10/31).
+ </li>
+<li class="listitem">
             IIUC convert_to is used to emulate in c++98 compilers C++11 explicit
             conversions. Could the explicit conversion operator be added on compilers
             supporting it? (Done 2012/09/15).
@@ -158,7 +160,7 @@
 <li class="listitem">
             Make fixed precision orthogonal to Allocator type in cpp_int. Possible
             solution - add an additional MaxBits template argument that defaults
- to 0 (meaning keep going till no more space/memory).
+ to 0 (meaning keep going till no more space/memory). Done.
           </li>
 <li class="listitem">
             Can ring types (exact floating point types) be supported? The answer

Modified: sandbox/big_number/libs/multiprecision/doc/html/boost_multiprecision/ref/cpp_int_ref.html
==============================================================================
--- sandbox/big_number/libs/multiprecision/doc/html/boost_multiprecision/ref/cpp_int_ref.html (original)
+++ sandbox/big_number/libs/multiprecision/doc/html/boost_multiprecision/ref/cpp_int_ref.html 2012-10-31 13:06:33 EDT (Wed, 31 Oct 2012)
@@ -19,30 +19,56 @@
 </h3></div></div></div>
 <pre class="programlisting"><span class="keyword">namespace</span> <span class="identifier">boost</span><span class="special">{</span> <span class="keyword">namespace</span> <span class="identifier">multiprecision</span><span class="special">{</span>
 
-<span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">unsigned</span> <span class="identifier">MinBits</span> <span class="special">=</span> <span class="number">0</span><span class="special">,</span> <span class="keyword">bool</span> <span class="identifier">Signed</span> <span class="special">=</span> <span class="keyword">true</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Allocator</span> <span class="special">=</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">allocator</span><span class="special">&lt;</span><span class="identifier">limb_type</span><span class="special">&gt;</span> <span class="special">&gt;</span>
-<span class="keyword">struct</span> <span class="identifier">cpp_int_backend</span><span class="special">;</span>
+<span class="keyword">typedef</span> <span class="identifier">unspecified</span><span class="special">-</span><span class="identifier">type</span> <span class="identifier">limb_type</span><span class="special">;</span>
+
+<span class="keyword">enum</span> <span class="identifier">cpp_integer_type</span> <span class="special">{</span> <span class="identifier">signed_magnitude</span><span class="special">,</span> <span class="identifier">unsigned_magnitude</span> <span class="special">};</span>
+<span class="keyword">enum</span> <span class="identifier">cpp_int_check_type</span> <span class="special">{</span> <span class="identifier">checked</span><span class="special">,</span> <span class="identifier">unchecked</span> <span class="special">};</span>
+
+<span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">unsigned</span> <span class="identifier">MinDigits</span> <span class="special">=</span> <span class="number">0</span><span class="special">,</span>
+ <span class="keyword">unsigned</span> <span class="identifier">MaxDits</span> <span class="special">=</span> <span class="number">0</span><span class="special">,</span>
+ <span class="identifier">cpp_integer_type</span> <span class="identifier">SignType</span> <span class="special">=</span> <span class="identifier">signed_magnitude</span><span class="special">,</span>
+ <span class="identifier">cpp_int_check_type</span> <span class="identifier">Checked</span> <span class="special">=</span> <span class="identifier">unchecked</span><span class="special">,</span>
+ <span class="keyword">class</span> <span class="identifier">Allocator</span> <span class="special">=</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">allocator</span><span class="special">&lt;</span><span class="identifier">limb_type</span><span class="special">&gt;</span> <span class="special">&gt;</span>
+<span class="keyword">class</span> <span class="identifier">cpp_int_backend</span><span class="special">;</span>
 <span class="comment">//</span>
 <span class="comment">// Expression templates default to et_off if there is no allocator:</span>
 <span class="comment">//</span>
-<span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">unsigned</span> <span class="identifier">MinDigits</span><span class="special">,</span> <span class="keyword">bool</span> <span class="identifier">Signed</span><span class="special">&gt;</span>
-<span class="keyword">struct</span> <span class="identifier">expression_template_default</span><span class="special">&lt;</span><span class="identifier">cpp_int_backend</span><span class="special">&lt;</span><span class="identifier">MinDigits</span><span class="special">,</span> <span class="identifier">Signed</span><span class="special">,</span> <span class="keyword">void</span><span class="special">&gt;</span> <span class="special">&gt;</span>
+<span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">unsigned</span> <span class="identifier">MinDigits</span><span class="special">,</span> <span class="keyword">unsigned</span> <span class="identifier">MaxDigits</span><span class="special">,</span> <span class="identifier">cpp_integer_type</span> <span class="identifier">SignType</span><span class="special">,</span> <span class="identifier">cpp_int_check_type</span> <span class="identifier">Checked</span><span class="special">&gt;</span>
+<span class="keyword">struct</span> <span class="identifier">expression_template_default</span><span class="special">&lt;</span><span class="identifier">cpp_int_backend</span><span class="special">&lt;</span><span class="identifier">MinDigits</span><span class="special">,</span> <span class="identifier">MaxDigits</span><span class="special">,</span> <span class="identifier">SignType</span><span class="special">,</span> <span class="identifier">Checked</span><span class="special">,</span> <span class="keyword">void</span><span class="special">&gt;</span> <span class="special">&gt;</span>
 <span class="special">{</span> <span class="keyword">static</span> <span class="keyword">const</span> <span class="identifier">expression_template_option</span> <span class="identifier">value</span> <span class="special">=</span> <span class="identifier">et_off</span><span class="special">;</span> <span class="special">};</span>
 
-<span class="keyword">typedef</span> <span class="identifier">number</span><span class="special">&lt;</span><span class="identifier">cpp_int_backend</span><span class="special">&lt;&gt;</span> <span class="special">&gt;</span> <span class="identifier">cpp_int</span><span class="special">;</span> <span class="comment">// arbitrary precision integer</span>
+<span class="keyword">typedef</span> <span class="identifier">number</span><span class="special">&lt;</span><span class="identifier">cpp_int_backend</span><span class="special">&lt;&gt;</span> <span class="special">&gt;</span> <span class="identifier">cpp_int</span><span class="special">;</span> <span class="comment">// arbitrary precision integer</span>
 <span class="keyword">typedef</span> <span class="identifier">rational_adapter</span><span class="special">&lt;</span><span class="identifier">cpp_int_backend</span><span class="special">&lt;&gt;</span> <span class="special">&gt;</span> <span class="identifier">cpp_rational_backend</span><span class="special">;</span>
-<span class="keyword">typedef</span> <span class="identifier">number</span><span class="special">&lt;</span><span class="identifier">cpp_rational_backend</span><span class="special">&gt;</span> <span class="identifier">cpp_rational</span><span class="special">;</span> <span class="comment">// arbitrary precision rational number</span>
+<span class="keyword">typedef</span> <span class="identifier">number</span><span class="special">&lt;</span><span class="identifier">cpp_rational_backend</span><span class="special">&gt;</span> <span class="identifier">cpp_rational</span><span class="special">;</span> <span class="comment">// arbitrary precision rational number</span>
 
 <span class="comment">// Fixed precision unsigned types:</span>
-<span class="keyword">typedef</span> <span class="identifier">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">uint128_t</span><span class="special">;</span>
-<span class="keyword">typedef</span> <span class="identifier">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">uint256_t</span><span class="special">;</span>
-<span class="keyword">typedef</span> <span class="identifier">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">uint512_t</span><span class="special">;</span>
-<span class="keyword">typedef</span> <span class="identifier">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">uint1024_t</span><span class="special">;</span>
+<span class="keyword">typedef</span> <span class="identifier">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="number">128</span><span class="special">,</span> <span class="identifier">unsigned_magnitude</span><span class="special">,</span> <span class="identifier">unchecked</span><span class="special">,</span> <span class="keyword">void</span><span class="special">&gt;</span> <span class="special">&gt;</span> <span class="identifier">uint128_t</span><span class="special">;</span>
+<span class="keyword">typedef</span> <span class="identifier">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="number">256</span><span class="special">,</span> <span class="identifier">unsigned_magnitude</span><span class="special">,</span> <span class="identifier">unchecked</span><span class="special">,</span> <span class="keyword">void</span><span class="special">&gt;</span> <span class="special">&gt;</span> <span class="identifier">uint256_t</span><span class="special">;</span>
+<span class="keyword">typedef</span> <span class="identifier">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="number">512</span><span class="special">,</span> <span class="identifier">unsigned_magnitude</span><span class="special">,</span> <span class="identifier">unchecked</span><span class="special">,</span> <span class="keyword">void</span><span class="special">&gt;</span> <span class="special">&gt;</span> <span class="identifier">uint512_t</span><span class="special">;</span>
+<span class="keyword">typedef</span> <span class="identifier">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="number">1024</span><span class="special">,</span> <span class="identifier">unsigned_magnitude</span><span class="special">,</span> <span class="identifier">unchecked</span><span class="special">,</span> <span class="keyword">void</span><span class="special">&gt;</span> <span class="special">&gt;</span> <span class="identifier">uint1024_t</span><span class="special">;</span>
+
+<span class="comment">// Fixed precision signed types:</span>
+<span class="keyword">typedef</span> <span class="identifier">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="number">128</span><span class="special">,</span> <span class="identifier">signed_magnitude</span><span class="special">,</span> <span class="identifier">unchecked</span><span class="special">,</span> <span class="keyword">void</span><span class="special">&gt;</span> <span class="special">&gt;</span> <span class="identifier">int128_t</span><span class="special">;</span>
+<span class="keyword">typedef</span> <span class="identifier">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="number">256</span><span class="special">,</span> <span class="identifier">signed_magnitude</span><span class="special">,</span> <span class="identifier">unchecked</span><span class="special">,</span> <span class="keyword">void</span><span class="special">&gt;</span> <span class="special">&gt;</span> <span class="identifier">int256_t</span><span class="special">;</span>
+<span class="keyword">typedef</span> <span class="identifier">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="number">512</span><span class="special">,</span> <span class="identifier">signed_magnitude</span><span class="special">,</span> <span class="identifier">unchecked</span><span class="special">,</span> <span class="keyword">void</span><span class="special">&gt;</span> <span class="special">&gt;</span> <span class="identifier">int512_t</span><span class="special">;</span>
+<span class="keyword">typedef</span> <span class="identifier">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="number">1024</span><span class="special">,</span> <span class="identifier">signed_magnitude</span><span class="special">,</span> <span class="identifier">unchecked</span><span class="special">,</span> <span class="keyword">void</span><span class="special">&gt;</span> <span class="special">&gt;</span> <span class="identifier">int1024_t</span><span class="special">;</span>
+
+<span class="comment">// Over again, but with checking enabled this time:</span>
+<span class="keyword">typedef</span> <span class="identifier">number</span><span class="special">&lt;</span><span class="identifier">cpp_int_backend</span><span class="special">&lt;</span><span class="number">0</span><span class="special">,</span> <span class="number">0</span><span class="special">,</span> <span class="identifier">signed_magnitude</span><span class="special">,</span> <span class="identifier">checked</span><span class="special">&gt;</span> <span class="special">&gt;</span> <span class="identifier">checked_cpp_int</span><span class="special">;</span>
+<span class="keyword">typedef</span> <span class="identifier">rational_adapter</span><span class="special">&lt;</span><span class="identifier">cpp_int_backend</span><span class="special">&lt;</span><span class="number">0</span><span class="special">,</span> <span class="number">0</span><span class="special">,</span> <span class="identifier">signed_magnitude</span><span class="special">,</span> <span class="identifier">checked</span><span class="special">&gt;</span> <span class="special">&gt;</span> <span class="identifier">checked_cpp_rational_backend</span><span class="special">;</span>
+<span class="keyword">typedef</span> <span class="identifier">number</span><span class="special">&lt;</span><span class="identifier">cpp_rational_backend</span><span class="special">&gt;</span> <span class="identifier">checked_cpp_rational</span><span class="special">;</span>
+
+<span class="comment">// Checked fixed precision unsigned types:</span>
+<span class="keyword">typedef</span> <span class="identifier">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="number">128</span><span class="special">,</span> <span class="identifier">unsigned_magnitude</span><span class="special">,</span> <span class="identifier">checked</span><span class="special">,</span> <span class="keyword">void</span><span class="special">&gt;</span> <span class="special">&gt;</span> <span class="identifier">checked_uint128_t</span><span class="special">;</span>
+<span class="keyword">typedef</span> <span class="identifier">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="number">256</span><span class="special">,</span> <span class="identifier">unsigned_magnitude</span><span class="special">,</span> <span class="identifier">checked</span><span class="special">,</span> <span class="keyword">void</span><span class="special">&gt;</span> <span class="special">&gt;</span> <span class="identifier">checked_uint256_t</span><span class="special">;</span>
+<span class="keyword">typedef</span> <span class="identifier">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="number">512</span><span class="special">,</span> <span class="identifier">unsigned_magnitude</span><span class="special">,</span> <span class="identifier">checked</span><span class="special">,</span> <span class="keyword">void</span><span class="special">&gt;</span> <span class="special">&gt;</span> <span class="identifier">checked_uint512_t</span><span class="special">;</span>
+<span class="keyword">typedef</span> <span class="identifier">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="number">1024</span><span class="special">,</span> <span class="identifier">unsigned_magnitude</span><span class="special">,</span> <span class="identifier">checked</span><span class="special">,</span> <span class="keyword">void</span><span class="special">&gt;</span> <span class="special">&gt;</span> <span class="identifier">checked_uint1024_t</span><span class="special">;</span>
 
 <span class="comment">// Fixed precision signed types:</span>
-<span class="keyword">typedef</span> <span class="identifier">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">int128_t</span><span class="special">;</span>
-<span class="keyword">typedef</span> <span class="identifier">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">int256_t</span><span class="special">;</span>
-<span class="keyword">typedef</span> <span class="identifier">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">int512_t</span><span class="special">;</span>
-<span class="keyword">typedef</span> <span class="identifier">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">int1024_t</span><span class="special">;</span>
+<span class="keyword">typedef</span> <span class="identifier">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="number">128</span><span class="special">,</span> <span class="identifier">signed_magnitude</span><span class="special">,</span> <span class="identifier">checked</span><span class="special">,</span> <span class="keyword">void</span><span class="special">&gt;</span> <span class="special">&gt;</span> <span class="identifier">checked_int128_t</span><span class="special">;</span>
+<span class="keyword">typedef</span> <span class="identifier">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="number">256</span><span class="special">,</span> <span class="identifier">signed_magnitude</span><span class="special">,</span> <span class="identifier">checked</span><span class="special">,</span> <span class="keyword">void</span><span class="special">&gt;</span> <span class="special">&gt;</span> <span class="identifier">checked_int256_t</span><span class="special">;</span>
+<span class="keyword">typedef</span> <span class="identifier">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="number">512</span><span class="special">,</span> <span class="identifier">signed_magnitude</span><span class="special">,</span> <span class="identifier">checked</span><span class="special">,</span> <span class="keyword">void</span><span class="special">&gt;</span> <span class="special">&gt;</span> <span class="identifier">checked_int512_t</span><span class="special">;</span>
+<span class="keyword">typedef</span> <span class="identifier">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="number">1024</span><span class="special">,</span> <span class="identifier">signed_magnitude</span><span class="special">,</span> <span class="identifier">checked</span><span class="special">,</span> <span class="keyword">void</span><span class="special">&gt;</span> <span class="special">&gt;</span> <span class="identifier">checked_int1024_t</span><span class="special">;</span>
 
 <span class="special">}}</span> <span class="comment">// namespaces</span>
 </pre>
@@ -58,30 +84,44 @@
 <div class="variablelist">
 <p class="title"><b></b></p>
 <dl class="variablelist">
-<dt><span class="term">Argument</span></dt>
+<dt><span class="term">MinBits</span></dt>
 <dd><p>
- Meaning
+ Determines the number of Bits to store directly within the object before
+ resorting to dynamic memory allocation. When zero, this field is determined
+ automatically based on how many bits can be stored in union with the
+ dynamic storage header: setting a larger value may improve performance
+ as larger integer values will be stored internally before memory allocation
+ is required.
             </p></dd>
-<dt><span class="term">MinBits</span></dt>
+<dt><span class="term">MaxBits</span></dt>
+<dd><p>
+ Determines the maximum number of bits to be stored in the type: resulting
+ in a fixed precision type. When this value is the same as MinBits,
+ then the Allocator parameter is ignored, as no dynamic memory allocation
+ will ever be performed: in this situation the Allocator parameter should
+ be set to type <code class="computeroutput"><span class="keyword">void</span></code>. Note
+ that this parameter should not be used simply to prevent large memory
+ allocations, not only is that role better performed by the allocator,
+ but fixed precision integers have a tendency to allocate all of MaxBits
+ of storage more often than one would expect.
+ </p></dd>
+<dt><span class="term">SignType</span></dt>
 <dd><p>
- The number of Bits to reserve inside the class's internal cache. When
- constructing a value, the object will use this internal cache if possible
- before resorting to dynamic memory allocation. When this value is zero,
- then the size of the internal cache is <code class="computeroutput"><span class="number">2</span><span class="special">*</span><span class="keyword">sizeof</span><span class="special">(</span><span class="keyword">void</span><span class="special">*)*</span><span class="identifier">CHAR_BIT</span></code>.
- When the Allocator argument is <code class="computeroutput"><span class="keyword">void</span></code>,
- then this parameter determines the precision of the type.
+ Determines whether the resulting type is signed or not. Note that for
+ <a href="http://en.wikipedia.org/wiki/Arbitrary-precision_arithmetic" target="_top">arbitrary
+ precision</a> types this parameter must be <code class="computeroutput"><span class="identifier">signed_magnitude</span></code>.
+ For fixed precision types then this type may be either <code class="computeroutput"><span class="identifier">signed_magnitude</span></code> or <code class="computeroutput"><span class="identifier">unsigned_magnitude</span></code>.
             </p></dd>
-<dt><span class="term">Signed</span></dt>
+<dt><span class="term">Checked</span></dt>
 <dd><p>
- When <code class="computeroutput"><span class="keyword">true</span></code> the type is
- signed, otherwise unsigned. Note that unsigned types are currently
- only supported when the Allocator parameter is <code class="computeroutput"><span class="keyword">void</span></code>.
+ This parameter has two values: <code class="computeroutput"><span class="identifier">checked</span></code>
+ or <code class="computeroutput"><span class="identifier">unchecked</span></code>. See the
+ <a class="link" href="../tut/ints/cpp_int.html" title="cpp_int">tutorial</a>
+ for more information.
             </p></dd>
 <dt><span class="term">Allocator</span></dt>
 <dd><p>
- The allocator used for dynamic memory allocation. This parameter can
- be <code class="computeroutput"><span class="keyword">void</span></code>, in which case
- no dynamic memory will ever be allocated.
+ The allocator to use for dynamic memory allocation, or type <code class="computeroutput"><span class="keyword">void</span></code> if MaxBits == MinBits.
             </p></dd>
 </dl>
 </div>

Modified: sandbox/big_number/libs/multiprecision/doc/html/boost_multiprecision/ref/headers.html
==============================================================================
--- sandbox/big_number/libs/multiprecision/doc/html/boost_multiprecision/ref/headers.html (original)
+++ sandbox/big_number/libs/multiprecision/doc/html/boost_multiprecision/ref/headers.html 2012-10-31 13:06:33 EDT (Wed, 31 Oct 2012)
@@ -66,18 +66,6 @@
 <tr>
 <td>
                 <p>
- integer_ops.hpp
- </p>
- </td>
-<td>
- <p>
- Integer specific non-member functions.
- </p>
- </td>
-</tr>
-<tr>
-<td>
- <p>
                   miller_rabin.hpp
                 </p>
               </td>
@@ -201,25 +189,121 @@
 <tr>
 <td>
                 <p>
- detail/big_lanczos.hpp
+ cpp_int/add.hpp
                 </p>
               </td>
 <td>
                 <p>
- Lanczos support for Boost.Math integration.
+ Add and subtract operators for <code class="computeroutput"><span class="identifier">cpp_int_backend</span></code>.
                 </p>
               </td>
 </tr>
 <tr>
 <td>
                 <p>
- detail/cpp_int_core.hpp
+ cpp_int/bitwise.hpp
                 </p>
               </td>
 <td>
                 <p>
- Platform and peformance tuning for the <code class="computeroutput"><span class="identifier">cpp_int</span></code>
- backend.
+ Bitwise operators for <code class="computeroutput"><span class="identifier">cpp_int_backend</span></code>.
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ cpp_int/checked.hpp
+ </p>
+ </td>
+<td>
+ <p>
+ Helper functions for checked arithmetic for <code class="computeroutput"><span class="identifier">cpp_int_backend</span></code>.
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ cpp_int/comparison.hpp
+ </p>
+ </td>
+<td>
+ <p>
+ Comparison operators for <code class="computeroutput"><span class="identifier">cpp_int_backend</span></code>.
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ cpp_int/cpp_int_config.hpp
+ </p>
+ </td>
+<td>
+ <p>
+ Basic setup and configuration for <code class="computeroutput"><span class="identifier">cpp_int_backend</span></code>.
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ cpp_int/divide.hpp
+ </p>
+ </td>
+<td>
+ <p>
+ Division and modulus operators for <code class="computeroutput"><span class="identifier">cpp_int_backend</span></code>.
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ cpp_int/limits.hpp
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">numeric_limits</span></code>
+ support for <code class="computeroutput"><span class="identifier">cpp_int_backend</span></code>.
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ cpp_int/misc.hpp
+ </p>
+ </td>
+<td>
+ <p>
+ Miscellaneous operators for <code class="computeroutput"><span class="identifier">cpp_int_backend</span></code>.
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ cpp_int/multiply.hpp
+ </p>
+ </td>
+<td>
+ <p>
+ Multiply operators for <code class="computeroutput"><span class="identifier">cpp_int_backend</span></code>.
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ detail/big_lanczos.hpp
+ </p>
+ </td>
+<td>
+ <p>
+ Lanczos support for Boost.Math integration.
                 </p>
               </td>
 </tr>

Modified: sandbox/big_number/libs/multiprecision/doc/html/boost_multiprecision/ref/internals.html
==============================================================================
--- sandbox/big_number/libs/multiprecision/doc/html/boost_multiprecision/ref/internals.html (original)
+++ sandbox/big_number/libs/multiprecision/doc/html/boost_multiprecision/ref/internals.html 2012-10-31 13:06:33 EDT (Wed, 31 Oct 2012)
@@ -77,6 +77,17 @@
         types should generally specialise one of the traits above, rather than this
         one directly.
       </p>
+<pre class="programlisting"><span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">T</span><span class="special">&gt;</span>
+<span class="identifier">is_signed_number</span><span class="special">;</span>
+<span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">T</span><span class="special">&gt;</span>
+<span class="identifier">is_unsigned_number</span><span class="special">;</span>
+</pre>
+<p>
+ These two traits inherit from either <code class="computeroutput"><span class="identifier">mpl</span><span class="special">::</span><span class="identifier">true_</span></code>
+ or <code class="computeroutput"><span class="identifier">mpl</span><span class="special">::</span><span class="identifier">false_</span></code>, by default types are assumed to
+ be signed unless <code class="computeroutput"><span class="identifier">is_unsigned_number</span></code>
+ is specialized for that type.
+ </p>
 </div>
 <table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
 <td align="left"></td>

Modified: sandbox/big_number/libs/multiprecision/doc/html/boost_multiprecision/ref/number.html
==============================================================================
--- sandbox/big_number/libs/multiprecision/doc/html/boost_multiprecision/ref/number.html (original)
+++ sandbox/big_number/libs/multiprecision/doc/html/boost_multiprecision/ref/number.html 2012-10-31 13:06:33 EDT (Wed, 31 Oct 2012)
@@ -281,8 +281,8 @@
           </li>
 <li class="listitem">
             Any type in the same family, as long as no loss of precision is involved.
- For example from <code class="computeroutput"><span class="identifier">int128</span></code>
- to <code class="computeroutput"><span class="identifier">int256</span></code>, or <code class="computeroutput"><span class="identifier">cpp_dec_float_50</span></code> to <code class="computeroutput"><span class="identifier">cpp_dec_float_100</span></code>.
+ For example from <code class="computeroutput"><span class="identifier">int128_t</span></code>
+ to <code class="computeroutput"><span class="identifier">int256_t</span></code>, or <code class="computeroutput"><span class="identifier">cpp_dec_float_50</span></code> to <code class="computeroutput"><span class="identifier">cpp_dec_float_100</span></code>.
           </li>
 </ul></div>
 <p>
@@ -631,7 +631,8 @@
         When these functions use our own implementations, the accuracy of the transcendal
         functions is generally a few epsilon. Note however, that the trigonmetrical
         functions incur the usual accuracy loss when reducing arguments by large
- multiples of &#960;. Also note that both __mpf_float and <a class="link" href="../tut/floats/cpp_dec_float.html" title="cpp_dec_float">cpp_dec_float</a>
+ multiples of &#960;. Also note that both <a class="link" href="../tut/floats/gmp_float.html" title="gmp_float">gmp_float</a>
+ and <a class="link" href="../tut/floats/cpp_dec_float.html" title="cpp_dec_float">cpp_dec_float</a>
         have a number of guard digits beyond their stated precision, so the error
         rates listed for these are in some sense artificially low.
       </p>

Modified: sandbox/big_number/libs/multiprecision/doc/html/boost_multiprecision/tut/conversions.html
==============================================================================
--- sandbox/big_number/libs/multiprecision/doc/html/boost_multiprecision/tut/conversions.html (original)
+++ sandbox/big_number/libs/multiprecision/doc/html/boost_multiprecision/tut/conversions.html 2012-10-31 13:06:33 EDT (Wed, 31 Oct 2012)
@@ -27,15 +27,15 @@
             type, as long as the conversion isn't lossy (for example float to int
             conversion):
           </li></ul></div>
-<pre class="programlisting"><span class="identifier">cpp_dec_float_50</span> <span class="identifier">df</span><span class="special">(</span><span class="number">0.5</span><span class="special">);</span> <span class="comment">// OK construction from double</span>
-<span class="identifier">cpp_int</span> <span class="identifier">i</span><span class="special">(</span><span class="number">450</span><span class="special">);</span> <span class="comment">// OK constructs from signed int</span>
-<span class="identifier">cpp_int</span> <span class="identifier">j</span> <span class="special">=</span> <span class="number">3.14</span><span class="special">;</span> <span class="comment">// Error, lossy conversion.</span>
+<pre class="programlisting"><span class="identifier">cpp_dec_float_50</span> <span class="identifier">df</span><span class="special">(</span><span class="number">0.5</span><span class="special">);</span> <span class="comment">// OK construction from double</span>
+<span class="identifier">cpp_int</span> <span class="identifier">i</span><span class="special">(</span><span class="number">450</span><span class="special">);</span> <span class="comment">// OK constructs from signed int</span>
+<span class="identifier">cpp_int</span> <span class="identifier">j</span> <span class="special">=</span> <span class="number">3.14</span><span class="special">;</span> <span class="comment">// Error, lossy conversion.</span>
 </pre>
 <div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem">
             A number can be explicitly constructed from an arithmetic type, even
             when the conversion is lossy:
           </li></ul></div>
-<pre class="programlisting"><span class="identifier">cpp_int</span> <span class="identifier">i</span><span class="special">(</span><span class="number">3.14</span><span class="special">);</span> <span class="comment">// OK explicit conversion</span>
+<pre class="programlisting"><span class="identifier">cpp_int</span> <span class="identifier">i</span><span class="special">(</span><span class="number">3.14</span><span class="special">);</span> <span class="comment">// OK explicit conversion</span>
 <span class="identifier">i</span> <span class="special">=</span> <span class="keyword">static_cast</span><span class="special">&lt;</span><span class="identifier">cpp_int</span><span class="special">&gt;(</span><span class="number">3.14</span><span class="special">)</span> <span class="comment">// OK explicit conversion</span>
 <span class="identifier">i</span><span class="special">.</span><span class="identifier">assign</span><span class="special">(</span><span class="number">3.14</span><span class="special">);</span> <span class="comment">// OK, explicit assign and avoid a temporary from the cast above</span>
 <span class="identifier">i</span> <span class="special">=</span> <span class="number">3.14</span><span class="special">;</span> <span class="comment">// Error, no implicit assignment operator for lossy conversion.</span>
@@ -59,8 +59,8 @@
             syntax.
           </li></ul></div>
 <pre class="programlisting"><span class="identifier">mpz_int</span> <span class="identifier">z</span><span class="special">(</span><span class="number">2</span><span class="special">);</span>
-<span class="keyword">int</span> <span class="identifier">i</span> <span class="special">=</span> <span class="identifier">z</span><span class="special">;</span> <span class="comment">// Error, implicit conversion not allowed.</span>
-<span class="keyword">int</span> <span class="identifier">j</span> <span class="special">=</span> <span class="keyword">static_cast</span><span class="special">&lt;</span><span class="keyword">int</span><span class="special">&gt;(</span><span class="identifier">z</span><span class="special">);</span> <span class="comment">// OK explicit conversion.</span>
+<span class="keyword">int</span> <span class="identifier">i</span> <span class="special">=</span> <span class="identifier">z</span><span class="special">;</span> <span class="comment">// Error, implicit conversion not allowed.</span>
+<span class="keyword">int</span> <span class="identifier">j</span> <span class="special">=</span> <span class="keyword">static_cast</span><span class="special">&lt;</span><span class="keyword">int</span><span class="special">&gt;(</span><span class="identifier">z</span><span class="special">);</span> <span class="comment">// OK explicit conversion.</span>
 </pre>
 <div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem">
             Any number type can be <span class="emphasis"><em>explicitly</em></span> constructed (or
@@ -109,10 +109,10 @@
             and are implicit conversions if no loss of precision is involved, and
             explicit if it is:
           </li></ul></div>
-<pre class="programlisting"><span class="identifier">int128</span> <span class="identifier">i128</span> <span class="special">=</span> <span class="number">0</span><span class="special">;</span>
-<span class="identifier">int266</span> <span class="identifier">i256</span> <span class="special">=</span> <span class="identifier">i128</span><span class="special">;</span> <span class="comment">// OK implicit widening conversion</span>
-<span class="identifier">i128</span> <span class="special">=</span> <span class="identifier">i256</span><span class="special">;</span> <span class="comment">// Error, no assignment operator found, narrowing conversion is explict</span>
-<span class="identifier">i128</span> <span class="special">=</span> <span class="keyword">static_cast</span><span class="special">&lt;</span><span class="identifier">int128</span><span class="special">&gt;(</span><span class="identifier">i256</span><span class="special">);</span> <span class="comment">// OK, explicit narrowing conversion</span>
+<pre class="programlisting"><span class="identifier">int128_t</span> <span class="identifier">i128</span> <span class="special">=</span> <span class="number">0</span><span class="special">;</span>
+<span class="identifier">int266_t</span> <span class="identifier">i256</span> <span class="special">=</span> <span class="identifier">i128</span><span class="special">;</span> <span class="comment">// OK implicit widening conversion</span>
+<span class="identifier">i128_t</span> <span class="special">=</span> <span class="identifier">i256</span><span class="special">;</span> <span class="comment">// Error, no assignment operator found, narrowing conversion is explict</span>
+<span class="identifier">i128_t</span> <span class="special">=</span> <span class="keyword">static_cast</span><span class="special">&lt;</span><span class="identifier">int128_t</span><span class="special">&gt;(</span><span class="identifier">i256</span><span class="special">);</span> <span class="comment">// OK, explicit narrowing conversion</span>
 
 <span class="identifier">mpz_int</span> <span class="identifier">z</span> <span class="special">=</span> <span class="number">0</span><span class="special">;</span>
 <span class="identifier">mpf_float</span> <span class="identifier">f</span> <span class="special">=</span> <span class="identifier">z</span><span class="special">;</span> <span class="comment">// OK, GMP handles this conversion natively, and it's not lossy and therefore implicit</span>

Modified: sandbox/big_number/libs/multiprecision/doc/html/boost_multiprecision/tut/floats/cpp_dec_float.html
==============================================================================
--- sandbox/big_number/libs/multiprecision/doc/html/boost_multiprecision/tut/floats/cpp_dec_float.html (original)
+++ sandbox/big_number/libs/multiprecision/doc/html/boost_multiprecision/tut/floats/cpp_dec_float.html 2012-10-31 13:06:33 EDT (Wed, 31 Oct 2012)
@@ -33,9 +33,9 @@
 <p>
           The <code class="computeroutput"><span class="identifier">cpp_dec_float</span></code> back-end
           is used in conjunction with <code class="computeroutput"><span class="identifier">number</span></code>:
- It acts as an entirely C++ (header only and dependency free) real-number
- type that is a drop-in replacement for the native C++ floating-point types,
- but with much greater precision.
+ It acts as an entirely C++ (header only and dependency free) floating-point
+ number type that is a drop-in replacement for the native C++ floating-point
+ types, but with much greater precision.
         </p>
 <p>
           Type <code class="computeroutput"><span class="identifier">cpp_dec_float</span></code> can

Modified: sandbox/big_number/libs/multiprecision/doc/html/boost_multiprecision/tut/floats/gmp_float.html
==============================================================================
--- sandbox/big_number/libs/multiprecision/doc/html/boost_multiprecision/tut/floats/gmp_float.html (original)
+++ sandbox/big_number/libs/multiprecision/doc/html/boost_multiprecision/tut/floats/gmp_float.html 2012-10-31 13:06:33 EDT (Wed, 31 Oct 2012)
@@ -110,9 +110,9 @@
 <li class="listitem">
               Since the underlying GMP types
               have no notion of infinities or NaN's, care should be taken to avoid
- numeric overflow or division by zero. That latter will trigger a hardware
- exception, while generating excessively large exponents may result
- in instability of the underlying GMP
+ numeric overflow or division by zero. That latter will result in a
+ std::overflow_error being thrown, while generating excessively large
+ exponents may result in instability of the underlying GMP
               library (in testing, converting a number with an excessively large
               or small exponent to a string caused GMP
               to segfault).
@@ -128,7 +128,7 @@
               point number.
             </li>
 <li class="listitem">
- Division by zero results in a <code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">runtime_error</span></code>
+ Division by zero results in a <code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">overflow_error</span></code>
               being thrown.
             </li>
 </ul></div>

Modified: sandbox/big_number/libs/multiprecision/doc/html/boost_multiprecision/tut/ints/cpp_int.html
==============================================================================
--- sandbox/big_number/libs/multiprecision/doc/html/boost_multiprecision/tut/ints/cpp_int.html (original)
+++ sandbox/big_number/libs/multiprecision/doc/html/boost_multiprecision/tut/ints/cpp_int.html 2012-10-31 13:06:33 EDT (Wed, 31 Oct 2012)
@@ -24,13 +24,20 @@
 
 <span class="keyword">typedef</span> <span class="identifier">unspecified</span><span class="special">-</span><span class="identifier">type</span> <span class="identifier">limb_type</span><span class="special">;</span>
 
-<span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">unsigned</span> <span class="identifier">MinDigits</span> <span class="special">=</span> <span class="number">0</span><span class="special">,</span> <span class="keyword">bool</span> <span class="identifier">Signed</span> <span class="special">=</span> <span class="keyword">true</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Allocator</span> <span class="special">=</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">allocator</span><span class="special">&lt;</span><span class="identifier">limb_type</span><span class="special">&gt;</span> <span class="special">&gt;</span>
+<span class="keyword">enum</span> <span class="identifier">cpp_integer_type</span> <span class="special">{</span> <span class="identifier">signed_magnitude</span><span class="special">,</span> <span class="identifier">unsigned_magnitude</span> <span class="special">};</span>
+<span class="keyword">enum</span> <span class="identifier">cpp_int_check_type</span> <span class="special">{</span> <span class="identifier">checked</span><span class="special">,</span> <span class="identifier">unchecked</span> <span class="special">};</span>
+
+<span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">unsigned</span> <span class="identifier">MinDigits</span> <span class="special">=</span> <span class="number">0</span><span class="special">,</span>
+ <span class="keyword">unsigned</span> <span class="identifier">MaxDits</span> <span class="special">=</span> <span class="number">0</span><span class="special">,</span>
+ <span class="identifier">cpp_integer_type</span> <span class="identifier">SignType</span> <span class="special">=</span> <span class="identifier">signed_magnitude</span><span class="special">,</span>
+ <span class="identifier">cpp_int_check_type</span> <span class="identifier">Checked</span> <span class="special">=</span> <span class="identifier">unchecked</span><span class="special">,</span>
+ <span class="keyword">class</span> <span class="identifier">Allocator</span> <span class="special">=</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">allocator</span><span class="special">&lt;</span><span class="identifier">limb_type</span><span class="special">&gt;</span> <span class="special">&gt;</span>
 <span class="keyword">class</span> <span class="identifier">cpp_int_backend</span><span class="special">;</span>
 <span class="comment">//</span>
 <span class="comment">// Expression templates default to et_off if there is no allocator:</span>
 <span class="comment">//</span>
-<span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">unsigned</span> <span class="identifier">MinDigits</span><span class="special">,</span> <span class="keyword">bool</span> <span class="identifier">Signed</span><span class="special">&gt;</span>
-<span class="keyword">struct</span> <span class="identifier">expression_template_default</span><span class="special">&lt;</span><span class="identifier">cpp_int_backend</span><span class="special">&lt;</span><span class="identifier">MinDigits</span><span class="special">,</span> <span class="identifier">Signed</span><span class="special">,</span> <span class="keyword">void</span><span class="special">&gt;</span> <span class="special">&gt;</span>
+<span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">unsigned</span> <span class="identifier">MinDigits</span><span class="special">,</span> <span class="keyword">unsigned</span> <span class="identifier">MaxDigits</span><span class="special">,</span> <span class="identifier">cpp_integer_type</span> <span class="identifier">SignType</span><span class="special">,</span> <span class="identifier">cpp_int_check_type</span> <span class="identifier">Checked</span><span class="special">&gt;</span>
+<span class="keyword">struct</span> <span class="identifier">expression_template_default</span><span class="special">&lt;</span><span class="identifier">cpp_int_backend</span><span class="special">&lt;</span><span class="identifier">MinDigits</span><span class="special">,</span> <span class="identifier">MaxDigits</span><span class="special">,</span> <span class="identifier">SignType</span><span class="special">,</span> <span class="identifier">Checked</span><span class="special">,</span> <span class="keyword">void</span><span class="special">&gt;</span> <span class="special">&gt;</span>
 <span class="special">{</span> <span class="keyword">static</span> <span class="keyword">const</span> <span class="identifier">expression_template_option</span> <span class="identifier">value</span> <span class="special">=</span> <span class="identifier">et_off</span><span class="special">;</span> <span class="special">};</span>
 
 <span class="keyword">typedef</span> <span class="identifier">number</span><span class="special">&lt;</span><span class="identifier">cpp_int_backend</span><span class="special">&lt;&gt;</span> <span class="special">&gt;</span> <span class="identifier">cpp_int</span><span class="special">;</span> <span class="comment">// arbitrary precision integer</span>
@@ -38,31 +45,45 @@
 <span class="keyword">typedef</span> <span class="identifier">number</span><span class="special">&lt;</span><span class="identifier">cpp_rational_backend</span><span class="special">&gt;</span> <span class="identifier">cpp_rational</span><span class="special">;</span> <span class="comment">// arbitrary precision rational number</span>
 
 <span class="comment">// Fixed precision unsigned types:</span>
-<span class="keyword">typedef</span> <span class="identifier">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">uint128_t</span><span class="special">;</span>
-<span class="keyword">typedef</span> <span class="identifier">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">uint256_t</span><span class="special">;</span>
-<span class="keyword">typedef</span> <span class="identifier">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">uint512_t</span><span class="special">;</span>
-<span class="keyword">typedef</span> <span class="identifier">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">uint1024_t</span><span class="special">;</span>
+<span class="keyword">typedef</span> <span class="identifier">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="number">128</span><span class="special">,</span> <span class="identifier">unsigned_magnitude</span><span class="special">,</span> <span class="identifier">unchecked</span><span class="special">,</span> <span class="keyword">void</span><span class="special">&gt;</span> <span class="special">&gt;</span> <span class="identifier">uint128_t</span><span class="special">;</span>
+<span class="keyword">typedef</span> <span class="identifier">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="number">256</span><span class="special">,</span> <span class="identifier">unsigned_magnitude</span><span class="special">,</span> <span class="identifier">unchecked</span><span class="special">,</span> <span class="keyword">void</span><span class="special">&gt;</span> <span class="special">&gt;</span> <span class="identifier">uint256_t</span><span class="special">;</span>
+<span class="keyword">typedef</span> <span class="identifier">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="number">512</span><span class="special">,</span> <span class="identifier">unsigned_magnitude</span><span class="special">,</span> <span class="identifier">unchecked</span><span class="special">,</span> <span class="keyword">void</span><span class="special">&gt;</span> <span class="special">&gt;</span> <span class="identifier">uint512_t</span><span class="special">;</span>
+<span class="keyword">typedef</span> <span class="identifier">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="number">1024</span><span class="special">,</span> <span class="identifier">unsigned_magnitude</span><span class="special">,</span> <span class="identifier">unchecked</span><span class="special">,</span> <span class="keyword">void</span><span class="special">&gt;</span> <span class="special">&gt;</span> <span class="identifier">uint1024_t</span><span class="special">;</span>
+
+<span class="comment">// Fixed precision signed types:</span>
+<span class="keyword">typedef</span> <span class="identifier">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="number">128</span><span class="special">,</span> <span class="identifier">signed_magnitude</span><span class="special">,</span> <span class="identifier">unchecked</span><span class="special">,</span> <span class="keyword">void</span><span class="special">&gt;</span> <span class="special">&gt;</span> <span class="identifier">int128_t</span><span class="special">;</span>
+<span class="keyword">typedef</span> <span class="identifier">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="number">256</span><span class="special">,</span> <span class="identifier">signed_magnitude</span><span class="special">,</span> <span class="identifier">unchecked</span><span class="special">,</span> <span class="keyword">void</span><span class="special">&gt;</span> <span class="special">&gt;</span> <span class="identifier">int256_t</span><span class="special">;</span>
+<span class="keyword">typedef</span> <span class="identifier">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="number">512</span><span class="special">,</span> <span class="identifier">signed_magnitude</span><span class="special">,</span> <span class="identifier">unchecked</span><span class="special">,</span> <span class="keyword">void</span><span class="special">&gt;</span> <span class="special">&gt;</span> <span class="identifier">int512_t</span><span class="special">;</span>
+<span class="keyword">typedef</span> <span class="identifier">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="number">1024</span><span class="special">,</span> <span class="identifier">signed_magnitude</span><span class="special">,</span> <span class="identifier">unchecked</span><span class="special">,</span> <span class="keyword">void</span><span class="special">&gt;</span> <span class="special">&gt;</span> <span class="identifier">int1024_t</span><span class="special">;</span>
+
+<span class="comment">// Over again, but with checking enabled this time:</span>
+<span class="keyword">typedef</span> <span class="identifier">number</span><span class="special">&lt;</span><span class="identifier">cpp_int_backend</span><span class="special">&lt;</span><span class="number">0</span><span class="special">,</span> <span class="number">0</span><span class="special">,</span> <span class="identifier">signed_magnitude</span><span class="special">,</span> <span class="identifier">checked</span><span class="special">&gt;</span> <span class="special">&gt;</span> <span class="identifier">checked_cpp_int</span><span class="special">;</span>
+<span class="keyword">typedef</span> <span class="identifier">rational_adapter</span><span class="special">&lt;</span><span class="identifier">cpp_int_backend</span><span class="special">&lt;</span><span class="number">0</span><span class="special">,</span> <span class="number">0</span><span class="special">,</span> <span class="identifier">signed_magnitude</span><span class="special">,</span> <span class="identifier">checked</span><span class="special">&gt;</span> <span class="special">&gt;</span> <span class="identifier">checked_cpp_rational_backend</span><span class="special">;</span>
+<span class="keyword">typedef</span> <span class="identifier">number</span><span class="special">&lt;</span><span class="identifier">cpp_rational_backend</span><span class="special">&gt;</span> <span class="identifier">checked_cpp_rational</span><span class="special">;</span>
+
+<span class="comment">// Checked fixed precision unsigned types:</span>
+<span class="keyword">typedef</span> <span class="identifier">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="number">128</span><span class="special">,</span> <span class="identifier">unsigned_magnitude</span><span class="special">,</span> <span class="identifier">checked</span><span class="special">,</span> <span class="keyword">void</span><span class="special">&gt;</span> <span class="special">&gt;</span> <span class="identifier">checked_uint128_t</span><span class="special">;</span>
+<span class="keyword">typedef</span> <span class="identifier">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="number">256</span><span class="special">,</span> <span class="identifier">unsigned_magnitude</span><span class="special">,</span> <span class="identifier">checked</span><span class="special">,</span> <span class="keyword">void</span><span class="special">&gt;</span> <span class="special">&gt;</span> <span class="identifier">checked_uint256_t</span><span class="special">;</span>
+<span class="keyword">typedef</span> <span class="identifier">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="number">512</span><span class="special">,</span> <span class="identifier">unsigned_magnitude</span><span class="special">,</span> <span class="identifier">checked</span><span class="special">,</span> <span class="keyword">void</span><span class="special">&gt;</span> <span class="special">&gt;</span> <span class="identifier">checked_uint512_t</span><span class="special">;</span>
+<span class="keyword">typedef</span> <span class="identifier">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="number">1024</span><span class="special">,</span> <span class="identifier">unsigned_magnitude</span><span class="special">,</span> <span class="identifier">checked</span><span class="special">,</span> <span class="keyword">void</span><span class="special">&gt;</span> <span class="special">&gt;</span> <span class="identifier">checked_uint1024_t</span><span class="special">;</span>
 
 <span class="comment">// Fixed precision signed types:</span>
-<span class="keyword">typedef</span> <span class="identifier">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">int128_t</span><span class="special">;</span>
-<span class="keyword">typedef</span> <span class="identifier">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">int256_t</span><span class="special">;</span>
-<span class="keyword">typedef</span> <span class="identifier">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">int512_t</span><span class="special">;</span>
-<span class="keyword">typedef</span> <span class="identifier">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">int1024_t</span><span class="special">;</span>
+<span class="keyword">typedef</span> <span class="identifier">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="number">128</span><span class="special">,</span> <span class="identifier">signed_magnitude</span><span class="special">,</span> <span class="identifier">checked</span><span class="special">,</span> <span class="keyword">void</span><span class="special">&gt;</span> <span class="special">&gt;</span> <span class="identifier">checked_int128_t</span><span class="special">;</span>
+<span class="keyword">typedef</span> <span class="identifier">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="number">256</span><span class="special">,</span> <span class="identifier">signed_magnitude</span><span class="special">,</span> <span class="identifier">checked</span><span class="special">,</span> <span class="keyword">void</span><span class="special">&gt;</span> <span class="special">&gt;</span> <span class="identifier">checked_int256_t</span><span class="special">;</span>
+<span class="keyword">typedef</span> <span class="identifier">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="number">512</span><span class="special">,</span> <span class="identifier">signed_magnitude</span><span class="special">,</span> <span class="identifier">checked</span><span class="special">,</span> <span class="keyword">void</span><span class="special">&gt;</span> <span class="special">&gt;</span> <span class="identifier">checked_int512_t</span><span class="special">;</span>
+<span class="keyword">typedef</span> <span class="identifier">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="number">1024</span><span class="special">,</span> <span class="identifier">signed_magnitude</span><span class="special">,</span> <span class="identifier">checked</span><span class="special">,</span> <span class="keyword">void</span><span class="special">&gt;</span> <span class="special">&gt;</span> <span class="identifier">checked_int1024_t</span><span class="special">;</span>
 
 <span class="special">}}</span> <span class="comment">// namespaces</span>
 </pre>
 <p>
           The <code class="computeroutput"><span class="identifier">cpp_int_backend</span></code> type
- is used via one of the typedefs <code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">multiprecision</span><span class="special">::</span><span class="identifier">cpp_int</span></code>,
- <code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">multiprecision</span><span class="special">::</span><span class="identifier">uint128_t</span></code>, <code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">multiprecision</span><span class="special">::</span><span class="identifier">uint256_t</span></code>,
- <code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">multiprecision</span><span class="special">::</span><span class="identifier">uint512_t</span></code>, <code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">multiprecision</span><span class="special">::</span><span class="identifier">int128_t</span></code>,
- <code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">multiprecision</span><span class="special">::</span><span class="identifier">int256_t</span></code> or <code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">multiprecision</span><span class="special">::</span><span class="identifier">int512_t</span></code>.
+ is normally used via one of the convenience typedefs given above.
         </p>
 <p>
           This back-end is the "Swiss Army Knife" of integer types as it
           can represent both fixed and <a href="http://en.wikipedia.org/wiki/Arbitrary-precision_arithmetic" target="_top">arbitrary
           precision</a> integer types, and both signed and unsigned types. There
- are three template arguments:
+ are five template arguments:
         </p>
 <div class="variablelist">
 <p class="title"><b></b></p>
@@ -74,27 +95,144 @@
                 is determined automatically based on how many bits can be stored
                 in union with the dynamic storage header: setting a larger value
                 may improve performance as larger integer values will be stored internally
- before memory allocation is required. When the Allocator parameter
- is type <code class="computeroutput"><span class="keyword">void</span></code>, then this
- field determines the total number of bits in the resulting fixed
- precision type.
+ before memory allocation is required.
               </p></dd>
-<dt><span class="term">Signed</span></dt>
+<dt><span class="term">MaxBits</span></dt>
+<dd><p>
+ Determines the maximum number of bits to be stored in the type: resulting
+ in a fixed precision type. When this value is the same as MinBits,
+ then the Allocator parameter is ignored, as no dynamic memory allocation
+ will ever be performed: in this situation the Allocator parameter
+ should be set to type <code class="computeroutput"><span class="keyword">void</span></code>.
+ Note that this parameter should not be used simply to prevent large
+ memory allocations, not only is that role better performed by the
+ allocator, but fixed precision integers have a tendency to allocate
+ all of MaxBits of storage more often than one would expect.
+ </p></dd>
+<dt><span class="term">SignType</span></dt>
 <dd><p>
                 Determines whether the resulting type is signed or not. Note that
                 for <a href="http://en.wikipedia.org/wiki/Arbitrary-precision_arithmetic" target="_top">arbitrary
- precision</a> types (where the Allocator parameter is non-void),
- then this parameter must be <code class="computeroutput"><span class="keyword">true</span></code>.
- For fixed precision types then this type may be either <code class="computeroutput"><span class="keyword">true</span></code> (type is signed), or <code class="computeroutput"><span class="keyword">false</span></code> (type is unsigned).
+ precision</a> types this parameter must be <code class="computeroutput"><span class="identifier">signed_magnitude</span></code>.
+ For fixed precision types then this type may be either <code class="computeroutput"><span class="identifier">signed_magnitude</span></code> or <code class="computeroutput"><span class="identifier">unsigned_magnitude</span></code>.
+ </p></dd>
+<dt><span class="term">Checked</span></dt>
+<dd><p>
+ This parameter has two values: <code class="computeroutput"><span class="identifier">checked</span></code>
+ or <code class="computeroutput"><span class="identifier">unchecked</span></code>. See
+ below.
               </p></dd>
 <dt><span class="term">Allocator</span></dt>
 <dd><p>
- The allocator to use for dynamic memory allocation, or type <code class="computeroutput"><span class="keyword">void</span></code> if this is to be a fixed precision
- type.
+ The allocator to use for dynamic memory allocation, or type <code class="computeroutput"><span class="keyword">void</span></code> if MaxBits == MinBits.
               </p></dd>
 </dl>
 </div>
 <p>
+ When the template parameter Checked is set to <code class="computeroutput"><span class="identifier">checked</span></code>
+ then the result is a <span class="emphasis"><em>checked-integer</em></span>, checked and
+ unchecked integers have the following properties:
+ </p>
+<div class="informaltable"><table class="table">
+<colgroup>
+<col>
+<col>
+<col>
+</colgroup>
+<thead><tr>
+<th>
+ <p>
+ Condition
+ </p>
+ </th>
+<th>
+ <p>
+ Checked-Integer
+ </p>
+ </th>
+<th>
+ <p>
+ Unchecked-Integer
+ </p>
+ </th>
+</tr></thead>
+<tbody>
+<tr>
+<td>
+ <p>
+ Numeric overflow in fixed precision arithmetic
+ </p>
+ </td>
+<td>
+ <p>
+ Throws a <code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">overflow_error</span></code>.
+ </p>
+ </td>
+<td>
+ <p>
+ Performs arithmetic modulo 2<sup>MaxBits</sup>
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ Constructing an integer from a value that can not be represented
+ in the target type
+ </p>
+ </td>
+<td>
+ <p>
+ Throws a <code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">range_error</span></code>.
+ </p>
+ </td>
+<td>
+ <p>
+ Converts the value modulo 2<sup>MaxBits</sup>, signed to unsigned conversions
+ extract the last MaxBits bits of the 2's complement representation
+ of the input value.
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ Unsigned subtraction yielding a negative value.
+ </p>
+ </td>
+<td>
+ <p>
+ Throws a <code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">range_error</span></code>.
+ </p>
+ </td>
+<td>
+ <p>
+ Yields the value that would result from treating the unsigned
+ type as a 2's complement signed type.
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ Attempting a bitwise operation on a negative value.
+ </p>
+ </td>
+<td>
+ <p>
+ Throws a <code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">range_error</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ Yields the value, but not the bit pattern, that would result
+ from performing the operation on a 2's complement integer type.
+ </p>
+ </td>
+</tr>
+</tbody>
+</table></div>
+<p>
           Things you should know when using this type:
         </p>
 <div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; ">
@@ -103,7 +241,7 @@
               have the value zero.
             </li>
 <li class="listitem">
- Division by zero results in a <code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">runtime_error</span></code>
+ Division by zero results in a <code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">overflow_error</span></code>
               being thrown.
             </li>
 <li class="listitem">
@@ -135,19 +273,26 @@
               being thrown, this is a direct consequence of the sign-magnitude representation.
             </li>
 <li class="listitem">
- The fixed precision types <code class="computeroutput"><span class="identifier">mp_</span><span class="special">[</span><span class="identifier">u</span><span class="special">]</span><span class="identifier">intXXX_t</span></code>
- have expression template support turned off - it seems to make little
- difference to the performance of these types either way - so we may
- as well have the faster compile times by turning the feature off.
+ The fixed precision types <code class="computeroutput"><span class="special">[</span><span class="identifier">checked_</span><span class="special">][</span><span class="identifier">u</span><span class="special">]</span><span class="identifier">intXXX_t</span></code> have expression template
+ support turned off - it seems to make little difference to the performance
+ of these types either way - so we may as well have the faster compile
+ times by turning the feature off.
             </li>
 <li class="listitem">
- Unsigned types support subtraction, and unary negation - the result
- is "as if" a 2's complement operation had been performed
- - in other words they behave pretty much as a built in integer type
- would in this situation. So for example if we were using <code class="computeroutput"><span class="identifier">uint128_t</span></code> then both <code class="computeroutput"><span class="identifier">uint128_t</span><span class="special">(</span><span class="number">1</span><span class="special">)-</span><span class="number">4</span></code>
- and <code class="computeroutput"><span class="special">-</span><span class="identifier">uint128</span><span class="special">(</span><span class="number">3</span><span class="special">)</span></code>
+ Unsigned types support subtraction - the result is "as if"
+ a 2's complement operation had been performed as long as they are not
+ <span class="emphasis"><em>checked-integers</em></span> (see above). In other words they
+ behave pretty much as a built in integer type would in this situation.
+ So for example if we were using <code class="computeroutput"><span class="identifier">uint128_t</span></code>
+ then <code class="computeroutput"><span class="identifier">uint128_t</span><span class="special">(</span><span class="number">1</span><span class="special">)-</span><span class="number">4</span></code>
               would result in the value <code class="computeroutput"><span class="number">0</span><span class="identifier">xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFD</span></code>
               of type <code class="computeroutput"><span class="identifier">uint128_t</span></code>.
+ However, had this operation been performed on <code class="computeroutput"><span class="identifier">checked_uint128_t</span></code>
+ then a <code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">range_error</span></code> would have been thrown.
+ </li>
+<li class="listitem">
+ Unary negation of unsigned types results in a compiler error (static
+ assertion).
             </li>
 <li class="listitem">
               This backend supports rvalue-references and is move-aware, making instantiations
@@ -167,6 +312,15 @@
               with only minor performance degradation even if most of the time the
               arithmetic could in fact be done with a narrower type.
             </li>
+<li class="listitem">
+ When used at fixed precision and MaxBits is smaller than the number
+ of bits in the largest native integer type, then internally <code class="computeroutput"><span class="identifier">cpp_int_backend</span></code> switches to a "trivial"
+ implementation where it is just a thin wrapper around a single integer.
+ Note that it will still be slightly slower than a bare native integer,
+ as it emulates a signed-magnitude representation rather than simply
+ using the platforms native sign representation: this ensures there
+ is no step change in behavior as a cpp_int grows in size.
+ </li>
 </ul></div>
 <h6>
 <a name="boost_multiprecision.tut.ints.cpp_int.h0"></a>

Modified: sandbox/big_number/libs/multiprecision/doc/html/boost_multiprecision/tut/ints/gmp_int.html
==============================================================================
--- sandbox/big_number/libs/multiprecision/doc/html/boost_multiprecision/tut/ints/gmp_int.html (original)
+++ sandbox/big_number/libs/multiprecision/doc/html/boost_multiprecision/tut/ints/gmp_int.html 2012-10-31 13:06:33 EDT (Wed, 31 Oct 2012)
@@ -80,7 +80,7 @@
               being thrown if the string can not be interpreted as a valid integer.
             </li>
 <li class="listitem">
- Division by zero results in a <code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">runtime_error</span></code>
+ Division by zero results in a <code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">overflow_error</span></code>
               being thrown.
             </li>
 <li class="listitem">

Modified: sandbox/big_number/libs/multiprecision/doc/html/boost_multiprecision/tut/ints/tom_int.html
==============================================================================
--- sandbox/big_number/libs/multiprecision/doc/html/boost_multiprecision/tut/ints/tom_int.html (original)
+++ sandbox/big_number/libs/multiprecision/doc/html/boost_multiprecision/tut/ints/tom_int.html 2012-10-31 13:06:33 EDT (Wed, 31 Oct 2012)
@@ -65,7 +65,7 @@
               being thrown if the string can not be interpreted as a valid integer.
             </li>
 <li class="listitem">
- Division by zero results in a <code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">runtime_error</span></code>
+ Division by zero results in a <code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">overflow_error</span></code>
               being thrown.
             </li>
 </ul></div>

Modified: sandbox/big_number/libs/multiprecision/doc/html/boost_multiprecision/tut/rational/cpp_rational.html
==============================================================================
--- sandbox/big_number/libs/multiprecision/doc/html/boost_multiprecision/tut/rational/cpp_rational.html (original)
+++ sandbox/big_number/libs/multiprecision/doc/html/boost_multiprecision/tut/rational/cpp_rational.html 2012-10-31 13:06:33 EDT (Wed, 31 Oct 2012)
@@ -61,7 +61,7 @@
               have the value zero.
             </li>
 <li class="listitem">
- Division by zero results in a <code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">rumtime_error</span></code>
+ Division by zero results in a <code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">overflow_error</span></code>
               being thrown.
             </li>
 <li class="listitem">

Modified: sandbox/big_number/libs/multiprecision/doc/html/boost_multiprecision/tut/rational/gmp_rational.html
==============================================================================
--- sandbox/big_number/libs/multiprecision/doc/html/boost_multiprecision/tut/rational/gmp_rational.html (original)
+++ sandbox/big_number/libs/multiprecision/doc/html/boost_multiprecision/tut/rational/gmp_rational.html 2012-10-31 13:06:33 EDT (Wed, 31 Oct 2012)
@@ -77,7 +77,7 @@
               default behavior).
             </li>
 <li class="listitem">
- Division by zero results in a <code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">runtime_error</span></code>
+ Division by zero results in a <code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">overflow_error</span></code>
               being thrown.
             </li>
 <li class="listitem">

Modified: sandbox/big_number/libs/multiprecision/doc/html/boost_multiprecision/tut/rational/tommath_rational.html
==============================================================================
--- sandbox/big_number/libs/multiprecision/doc/html/boost_multiprecision/tut/rational/tommath_rational.html (original)
+++ sandbox/big_number/libs/multiprecision/doc/html/boost_multiprecision/tut/rational/tommath_rational.html 2012-10-31 13:06:33 EDT (Wed, 31 Oct 2012)
@@ -57,7 +57,7 @@
               have the value zero (this the inherited Boost.Rational behavior).
             </li>
 <li class="listitem">
- Division by zero results in a <code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">runtime_error</span></code>
+ Division by zero results in a <code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">overflow_error</span></code>
               being thrown.
             </li>
 <li class="listitem">

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-10-31 13:06:33 EDT (Wed, 31 Oct 2012)
@@ -120,7 +120,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: September 20, 2012 at 15:58:33 GMT</small></p></td>
+<td align="left"><p><small>Last revised: October 31, 2012 at 16:58:22 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-10-31 13:06:33 EDT (Wed, 31 Oct 2012)
@@ -51,6 +51,7 @@
 [def __gmp_int [link boost_multiprecision.tut.ints.gmp_int gmp_int]]
 [def __tom_int [link boost_multiprecision.tut.ints.tom_int tom_int]]
 [def __gmp_float [link boost_multiprecision.tut.floats.gmp_float gmp_float]]
+[def __mpf_float [link boost_multiprecision.tut.floats.gmp_float gmp_float]]
 [def __mpfr_float_backend [link boost_multiprecision.tut.floats.mpfr_float mpfr_float]]
 [def __cpp_dec_float [link boost_multiprecision.tut.floats.cpp_dec_float cpp_dec_float]]
 [def __gmp_rational [link boost_multiprecision.tut.rational.gmp_rational gmp_rational]]
@@ -162,7 +163,7 @@
 
 Note that while "moved-from" objects are left in a sane state, they have an unspecified value, and the only permitted
 operations on them are destruction or the assignment of a new value. Any other operation should be considered
-a programming error and many backends will trigger an assertion if any other operation is attempted. This behavior
+a programming error and all of our backends will trigger an assertion if any other operation is attempted. This behavior
 allows for optimal performance on move-construction (i.e. no allocation required, we just take ownership of the existing
 object's internal state), while maintaining usability in the standard library containers.
 
@@ -204,12 +205,24 @@
 we used an even simpler wrapper around [mpfr] like [mpreal] things would have been even worse and no less that 24 temporaries
 are created for this simple expression (note - we actually measure the number of memory allocations performed rather than
 the number of temporaries directly, note also that the [mpf_class] wrapper that will be supplied with GMP-5.1 reduces the number of
-temporaries to pretty much zero). Finally if we use this library with expression templates disabled, we still only generate 11
-temporaries
+temporaries to pretty much zero). Note that if we compile with expression templates disabled and rvalue-reference support
+on, then actually still have no wasted memory allocations as even though temporaries are created, their contents are moved
+rather than copied.
 [footnote The actual number generated will depend on the compiler, how well it optimises the code, and whether it supports
 rvalue references. The number of 11 temporaries was generated with Visual C++ 10]
-[footnote Marc Glisse suggested pre-review that this could be reduced still further by careful use of rvalue-references
-and move semantics in the operator overloads. This will be investigated further at a later date.].
+
+[important
+Expression templates can radically reorder the operations in an expression, for example:
+
+ a = (b * c) * a;
+
+Will get transformed into:
+
+ a *= c;
+ a *= b;
+
+If this is likely to be an issue for a particular application, then they should be disabled.
+]
 
 This library also extends expression template support to standard library functions like `abs` or `sin` with `number`
 arguments. This means that an expression such as:
@@ -288,29 +301,34 @@
 transformation is more efficient than creating the extra temporary variable, just not by as much as
 one would hope.
 
-Finally, note that `number` takes a second template argument, which, when set to `false` disables all
+Finally, note that `number` takes a second template argument, which, when set to `et_off` disables all
 the expression template machinery. The result is much faster to compile, but slower at runtime.
 
 We'll conclude this section by providing some more performance comparisons between these three libraries,
 again, all are using [mpfr] to carry out the underlying arithmetic, and all are operating at the same precision
 (50 decimal digits):
 
-TODO: Update, compare to rvalue refs but no ET's as well.
-
 [table Evaluation of Boost.Math's Bessel function test data
 [[Library][Relative Time][Relative Number of Memory Allocations]]
-[[number][1.0 (6.21s)][1.0 (2685469)]]
-[[[mpfr_class]][1.04 (6.45s)][1.47 (3946007)]]
-[[[mpreal]][1.53 (9.52s)][4.92 (13222940)]]
+[[mpfr_float_50] [1.0 (5.66s)] [1.0 (1611963)]]
+[[number<mpfr_float_backend<50>, et_off>[br](but with rvalue reference support)]
+ [1.10 (6.25s)][2.64 (4260868)]]
+[[[mpfr_class]] [1.09 (6.16s)][2.45 (3948316)]]
+[[[mpreal]] [1.65 (9.34s)][8.21 (13226029)]]
 ]
 
 [table Evaluation of Boost.Math's Non-Central T distribution test data
 [[Library][Relative Time][Relative Number of Memory Allocations]]
-[[number][1.0 (269s)][1.0 (139082551)]]
-[[[mpfr_class]][1.04 (278s)][1.81 (252400791)]]
-[[[mpreal]][1.49 (401s)][3.22 (447009280)]]
+[[number] [1.0 (257s)][1.0 (127710873)]]
+[[number<mpfr_float_backend<50>, et_off>[br](but with rvalue reference support)]
+ [1.0 (257s)][1.2 (156797871)]]
+[[[mpfr_class]] [1.1 (280s)][2.1 (268336640)]]
+[[[mpreal]] [1.4 (363s)][3.6 (466960653)]]
 ]
 
+The above results were generated on Win32 compiling with Visual C++ 2010, all optimizations on (/Ox),
+with MPFR 3.0 and MPIR 2.3.0.
+
 [endsect]
 
 [section:tut Tutorial]
@@ -338,13 +356,20 @@
 
    typedef unspecified-type limb_type;
 
- template <unsigned MinDigits = 0, bool Signed = true, class Allocator = std::allocator<limb_type> >
+ enum cpp_integer_type { signed_magnitude, unsigned_magnitude };
+ enum cpp_int_check_type { checked, unchecked };
+
+ template <unsigned MinDigits = 0,
+ unsigned MaxDits = 0,
+ cpp_integer_type SignType = signed_magnitude,
+ cpp_int_check_type Checked = unchecked,
+ class Allocator = std::allocator<limb_type> >
    class cpp_int_backend;
    //
    // Expression templates default to et_off if there is no allocator:
    //
- template <unsigned MinDigits, bool Signed>
- struct expression_template_default<cpp_int_backend<MinDigits, Signed, void> >
+ template <unsigned MinDigits, unsigned MaxDigits, cpp_integer_type SignType, cpp_int_check_type Checked>
+ struct expression_template_default<cpp_int_backend<MinDigits, MaxDigits, SignType, Checked, void> >
    { static const expression_template_option value = et_off; };
 
    typedef number<cpp_int_backend<> > cpp_int; // arbitrary precision integer
@@ -352,46 +377,80 @@
    typedef number<cpp_rational_backend> cpp_rational; // arbitrary precision rational number
 
    // Fixed precision unsigned types:
- typedef number<cpp_int_backend<128, false, void> > uint128_t;
- typedef number<cpp_int_backend<256, false, void> > uint256_t;
- typedef number<cpp_int_backend<512, false, void> > uint512_t;
- typedef number<cpp_int_backend<1024, false, void> > uint1024_t;
+ typedef number<cpp_int_backend<128, 128, unsigned_magnitude, unchecked, void> > uint128_t;
+ typedef number<cpp_int_backend<256, 256, unsigned_magnitude, unchecked, void> > uint256_t;
+ typedef number<cpp_int_backend<512, 512, unsigned_magnitude, unchecked, void> > uint512_t;
+ typedef number<cpp_int_backend<1024, 1024, unsigned_magnitude, unchecked, void> > uint1024_t;
+
+ // Fixed precision signed types:
+ typedef number<cpp_int_backend<128, 128, signed_magnitude, unchecked, void> > int128_t;
+ typedef number<cpp_int_backend<256, 256, signed_magnitude, unchecked, void> > int256_t;
+ typedef number<cpp_int_backend<512, 512, signed_magnitude, unchecked, void> > int512_t;
+ typedef number<cpp_int_backend<1024, 1024, signed_magnitude, unchecked, void> > int1024_t;
+
+ // Over again, but with checking enabled this time:
+ typedef number<cpp_int_backend<0, 0, signed_magnitude, checked> > checked_cpp_int;
+ typedef rational_adapter<cpp_int_backend<0, 0, signed_magnitude, checked> > checked_cpp_rational_backend;
+ typedef number<cpp_rational_backend> checked_cpp_rational;
+
+ // Checked fixed precision unsigned types:
+ typedef number<cpp_int_backend<128, 128, unsigned_magnitude, checked, void> > checked_uint128_t;
+ typedef number<cpp_int_backend<256, 256, unsigned_magnitude, checked, void> > checked_uint256_t;
+ typedef number<cpp_int_backend<512, 512, unsigned_magnitude, checked, void> > checked_uint512_t;
+ typedef number<cpp_int_backend<1024, 1024, unsigned_magnitude, checked, void> > checked_uint1024_t;
 
    // Fixed precision signed types:
- typedef number<cpp_int_backend<128, true, void> > int128_t;
- typedef number<cpp_int_backend<256, true, void> > int256_t;
- typedef number<cpp_int_backend<512, true, void> > int512_t;
- typedef number<cpp_int_backend<1024, true, void> > int1024_t;
+ typedef number<cpp_int_backend<128, 128, signed_magnitude, checked, void> > checked_int128_t;
+ typedef number<cpp_int_backend<256, 256, signed_magnitude, checked, void> > checked_int256_t;
+ typedef number<cpp_int_backend<512, 512, signed_magnitude, checked, void> > checked_int512_t;
+ typedef number<cpp_int_backend<1024, 1024, signed_magnitude, checked, void> > checked_int1024_t;
 
    }} // namespaces
 
-The `cpp_int_backend` type is used via one of the typedefs `boost::multiprecision::cpp_int`,
-`boost::multiprecision::uint128_t`, `boost::multiprecision::uint256_t`,
-`boost::multiprecision::uint512_t`, `boost::multiprecision::int128_t`, `boost::multiprecision::int256_t`
-or `boost::multiprecision::int512_t`.
+The `cpp_int_backend` type is normally used via one of the convenience typedefs given above.
 
 This back-end is the "Swiss Army Knife" of integer types as it can represent both fixed and
 [@http://en.wikipedia.org/wiki/Arbitrary-precision_arithmetic arbitrary precision]
-integer types, and both signed and unsigned types. There are three template arguments:
+integer types, and both signed and unsigned types. There are five template arguments:
 
 [variablelist
 [[MinBits][Determines the number of Bits to store directly within the object before resorting to dynamic memory
            allocation. When zero, this field is determined automatically based on how many bits can be stored
            in union with the dynamic storage header: setting a larger value may improve performance as larger integer
- values will be stored internally before memory allocation is required.
- When the Allocator parameter is type `void`, then this field
- determines the total number of bits in the resulting fixed precision type.]]
-[[Signed][Determines whether the resulting type is signed or not. Note that for
+ values will be stored internally before memory allocation is required.]]
+[[MaxBits][Determines the maximum number of bits to be stored in the type: resulting in a fixed precision type.
+ When this value is the same as MinBits, then the Allocator parameter is ignored, as no dynamic
+ memory allocation will ever be performed: in this situation the Allocator parameter should be set to
+ type `void`. Note that this parameter should not be used simply to prevent large memory
+ allocations, not only is that role better performed by the allocator, but fixed precision
+ integers have a tendency to allocate all of MaxBits of storage more often than one would expect.]]
+[[SignType][Determines whether the resulting type is signed or not. Note that for
 [@http://en.wikipedia.org/wiki/Arbitrary-precision_arithmetic arbitrary precision] types
- (where the Allocator parameter is non-void), then this parameter must be `true`. For fixed precision
- types then this type may be either `true` (type is signed), or `false` (type is unsigned).]]
-[[Allocator][The allocator to use for dynamic memory allocation, or type `void` if this is to be a fixed precision type.]]
+ this parameter must be `signed_magnitude`. For fixed precision
+ types then this type may be either `signed_magnitude` or `unsigned_magnitude`.]]
+[[Checked][This parameter has two values: `checked` or `unchecked`. See below.]]
+[[Allocator][The allocator to use for dynamic memory allocation, or type `void` if MaxBits == MinBits.]]
+]
+
+When the template parameter Checked is set to `checked` then the result is a ['checked-integer], checked
+and unchecked integers have the following properties:
+
+[table
+[[Condition][Checked-Integer][Unchecked-Integer]]
+[[Numeric overflow in fixed precision arithmetic][Throws a `std::overflow_error`.][Performs arithmetic modulo 2[super MaxBits]]]
+[[Constructing an integer from a value that can not be represented in the target type][Throws a `std::range_error`.]
+[Converts the value modulo 2[super MaxBits], signed to unsigned conversions extract the last MaxBits bits of the
+2's complement representation of the input value.]]
+[[Unsigned subtraction yielding a negative value.][Throws a `std::range_error`.][Yields the value that would
+result from treating the unsigned type as a 2's complement signed type.]]
+[[Attempting a bitwise operation on a negative value.][Throws a `std::range_error`][Yields the value, but not the bit pattern,
+that would result from performing the operation on a 2's complement integer type.]]
 ]
 
 Things you should know when using this type:
 
 * Default constructed `cpp_int_backend`s have the value zero.
-* Division by zero results in a `std::runtime_error` being thrown.
+* Division by zero results in a `std::overflow_error` being thrown.
 * Construction from a string that contains invalid non-numeric characters results in a `std::runtime_error` being thrown.
 * Since the precision of `cpp_int_backend` is necessarily limited when the allocator parameter is void,
 care should be taken to avoid numeric overflow when using this type
@@ -404,13 +463,16 @@
 is the most common format by far.
 * Attempting to print negative values as either an Octal or Hexadecimal string results in a `std::runtime_error` being thrown,
 this is a direct consequence of the sign-magnitude representation.
-* The fixed precision types `mp_[u]intXXX_t` have expression template support turned off - it seems to make little
+* The fixed precision types `[checked_][u]intXXX_t` have expression template support turned off - it seems to make little
 difference to the performance of these types either way - so we may as well have the faster compile times by turning
 the feature off.
-* Unsigned types support subtraction, and unary negation - the result is "as if" a 2's complement operation had been performed
- - in other words they behave pretty much as a built in integer type would in this situation. So for example if we were using
- `uint128_t` then both `uint128_t(1)-4` and `-uint128(3)` would result in the value `0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFD`
- of type `uint128_t`.
+* Unsigned types support subtraction - the result is "as if" a 2's complement operation had been performed as long as they are not
+ ['checked-integers] (see above).
+ In other words they behave pretty much as a built in integer type would in this situation. So for example if we were using
+ `uint128_t` then `uint128_t(1)-4` would result in the value `0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFD`
+ of type `uint128_t`. However, had this operation been performed on `checked_uint128_t` then a `std::range_error` would have
+ been thrown.
+* Unary negation of unsigned types results in a compiler error (static assertion).
 * This backend supports rvalue-references and is move-aware, making instantiations of `number` on this backend move aware.
 * When used at fixed precision, the size of this type is always one machine word larger than you would expect for an N-bit integer:
 the extra word stores both the sign, and how many machine words in the integer are actually in use.
@@ -420,6 +482,11 @@
 Typically this means you can use
 an integer type wide enough for the "worst case senario" with only minor performance degradation even if most of the time
 the arithmetic could in fact be done with a narrower type.
+* When used at fixed precision and MaxBits is smaller than the number of bits in the largest native integer type, then
+internally `cpp_int_backend` switches to a "trivial" implementation where it is just a thin wrapper around a single
+integer. Note that it will still be slightly slower than a bare native integer, as it emulates a
+signed-magnitude representation rather than simply using the platforms native sign representation: this ensures
+there is no step change in behavior as a cpp_int grows in size.
  
 
 [h5 Example:]
@@ -460,7 +527,7 @@
 `std::ios_base::oct` or `std::ios_base::hex` are set, will result in a `std::runtime_error` will be thrown.
 * Conversion from a string results in a `std::runtime_error` being thrown if the string can not be interpreted
 as a valid integer.
-* Division by zero results in a `std::runtime_error` being thrown.
+* Division by zero results in a `std::overflow_error` being thrown.
 * Although this type is a wrapper around [gmp] it will work equally well with [mpir]. Indeed use of [mpir]
 is recommended on Win32.
 * This backend supports rvalue-references and is move-aware, making instantiations of `number` on this backend move aware.
@@ -498,7 +565,7 @@
 `std::ios_base::oct` or `std::ios_base::hex` are set, will result in a `std::runtime_error` will be thrown.
 * Conversion from a string results in a `std::runtime_error` being thrown if the string can not be interpreted
 as a valid integer.
-* Division by zero results in a `std::runtime_error` being thrown.
+* Division by zero results in a `std::overflow_error` being thrown.
 
 [h5 Example:]
 
@@ -548,7 +615,7 @@
    }} // namespaces
 
 The `cpp_dec_float` back-end is used in conjunction with `number`: It acts as an entirely C++ (header only and dependency free)
-real-number type that is a drop-in replacement for the native C++ floating-point types, but with
+floating-point number type that is a drop-in replacement for the native C++ floating-point types, but with
 much greater precision.
 
 Type `cpp_dec_float` can be used at fixed precision by specifying a non-zero `Digits10` template parameter.
@@ -641,7 +708,7 @@
 * It is not possible to round-trip objects of this type to and from a string and get back
 exactly the same value. This appears to be a limitation of [gmp].
 * Since the underlying [gmp] types have no notion of infinities or NaN's, care should be taken
-to avoid numeric overflow or division by zero. That latter will trigger a hardware exception,
+to avoid numeric overflow or division by zero. That latter will result in a std::overflow_error being thrown,
 while generating excessively large exponents may result in instability of the underlying [gmp]
 library (in testing, converting a number with an excessively large or small exponent
 to a string caused [gmp] to segfault).
@@ -649,7 +716,7 @@
 the recommended option on Win32.
 * Conversion from a string results in a `std::runtime_error` being thrown if the string can not be interpreted
 as a valid floating point number.
-* Division by zero results in a `std::runtime_error` being thrown.
+* Division by zero results in a `std::overflow_error` being thrown.
 
 [h5 [gmp] example:]
 
@@ -799,7 +866,7 @@
 Things you should know when using this type:
 
 * Default constructed `cpp_rational`s have the value zero.
-* Division by zero results in a `std::rumtime_error` being thrown.
+* Division by zero results in a `std::overflow_error` being thrown.
 * Conversion from a string results in a `std::runtime_error` being thrown if the string can not be
 interpreted as a valid rational number.
 
@@ -844,7 +911,7 @@
 Things you should know when using this type:
 
 * Default constructed `mpq_rational`s have the value zero (this is the [gmp] default behavior).
-* Division by zero results in a `std::runtime_error` being thrown.
+* Division by zero results in a `std::overflow_error` being thrown.
 * Conversion from a string results in a `std::runtime_error` being thrown if the string can not be
 interpreted as a valid rational number.
 * No changes are made to the [gmp] library's global settings, so this type can coexist with existing
@@ -885,7 +952,7 @@
 Things you should know when using this type:
 
 * Default constructed `tom_rational`s have the value zero (this the inherited Boost.Rational behavior).
-* Division by zero results in a `std::runtime_error` being thrown.
+* Division by zero results in a `std::overflow_error` being thrown.
 * Conversion from a string results in a `std::runtime_error` being thrown if the string can not be
 interpreted as a valid rational number.
 * No changes are made to [tommath]'s global state, so this type can safely coexist with other [tommath] code.
@@ -940,13 +1007,13 @@
 * Any number type can be constructed (or assigned) from any builtin arithmetic type, as long
   as the conversion isn't lossy (for example float to int conversion):
 
- cpp_dec_float_50 df(0.5); // OK construction from double
- cpp_int i(450); // OK constructs from signed int
- cpp_int j = 3.14; // Error, lossy conversion.
+ cpp_dec_float_50 df(0.5); // OK construction from double
+ cpp_int i(450); // OK constructs from signed int
+ cpp_int j = 3.14; // Error, lossy conversion.
 
 * A number can be explicitly constructed from an arithmetic type, even when the conversion is lossy:
 
- cpp_int i(3.14); // OK explicit conversion
+ cpp_int i(3.14); // OK explicit conversion
    i = static_cast<cpp_int>(3.14) // OK explicit conversion
    i.assign(3.14); // OK, explicit assign and avoid a temporary from the cast above
    i = 3.14; // Error, no implicit assignment operator for lossy conversion.
@@ -963,8 +1030,8 @@
 this functionality is only available on compilers supporting C++11's explicit conversion syntax.
 
    mpz_int z(2);
- int i = z; // Error, implicit conversion not allowed.
- int j = static_cast<int>(z); // OK explicit conversion.
+ int i = z; // Error, implicit conversion not allowed.
+ int j = static_cast<int>(z); // OK explicit conversion.
 
 * Any number type can be ['explicitly] constructed (or assigned) from a `const char*` or a `std::string`:
 
@@ -1007,10 +1074,10 @@
 * Interconversions between number types of the same family are allowed and are implicit conversions if no
 loss of precision is involved, and explicit if it is:
 
- int128 i128 = 0;
- int266 i256 = i128; // OK implicit widening conversion
- i128 = i256; // Error, no assignment operator found, narrowing conversion is explict
- i128 = static_cast<int128>(i256); // OK, explicit narrowing conversion
+ int128_t i128 = 0;
+ int266_t i256 = i128; // OK implicit widening conversion
+ i128_t = i256; // Error, no assignment operator found, narrowing conversion is explict
+ i128_t = static_cast<int128_t>(i256); // OK, explicit narrowing conversion
 
    mpz_int z = 0;
    mpf_float f = z; // OK, GMP handles this conversion natively, and it's not lossy and therefore implicit
@@ -1337,7 +1404,7 @@
 * An rvalue reference to another `number`. Move-semantics are used for construction if the backend also
 supports rvalue reference construction. In the case of assignment, move semantics are always supported
 when the argument is an rvalue reference irrespective of the backend.
-* Any type in the same family, as long as no loss of precision is involved. For example from `int128` to `int256`,
+* Any type in the same family, as long as no loss of precision is involved. For example from `int128_t` to `int256_t`,
 or `cpp_dec_float_50` to `cpp_dec_float_100`.
 
 Type `number` is explicitly constructible from:
@@ -1719,30 +1786,56 @@
 
    namespace boost{ namespace multiprecision{
 
- template <unsigned MinBits = 0, bool Signed = true, class Allocator = std::allocator<limb_type> >
- struct cpp_int_backend;
+ typedef unspecified-type limb_type;
+
+ enum cpp_integer_type { signed_magnitude, unsigned_magnitude };
+ enum cpp_int_check_type { checked, unchecked };
+
+ template <unsigned MinDigits = 0,
+ unsigned MaxDits = 0,
+ cpp_integer_type SignType = signed_magnitude,
+ cpp_int_check_type Checked = unchecked,
+ class Allocator = std::allocator<limb_type> >
+ class cpp_int_backend;
    //
    // Expression templates default to et_off if there is no allocator:
    //
- template <unsigned MinDigits, bool Signed>
- struct expression_template_default<cpp_int_backend<MinDigits, Signed, void> >
+ template <unsigned MinDigits, unsigned MaxDigits, cpp_integer_type SignType, cpp_int_check_type Checked>
+ struct expression_template_default<cpp_int_backend<MinDigits, MaxDigits, SignType, Checked, void> >
    { static const expression_template_option value = et_off; };
 
- typedef number<cpp_int_backend<> > cpp_int; // arbitrary precision integer
+ typedef number<cpp_int_backend<> > cpp_int; // arbitrary precision integer
    typedef rational_adapter<cpp_int_backend<> > cpp_rational_backend;
- typedef number<cpp_rational_backend> cpp_rational; // arbitrary precision rational number
+ typedef number<cpp_rational_backend> cpp_rational; // arbitrary precision rational number
 
    // Fixed precision unsigned types:
- typedef number<cpp_int_backend<128, false, void> > uint128_t;
- typedef number<cpp_int_backend<256, false, void> > uint256_t;
- typedef number<cpp_int_backend<512, false, void> > uint512_t;
- typedef number<cpp_int_backend<1024, false, void> > uint1024_t;
+ typedef number<cpp_int_backend<128, 128, unsigned_magnitude, unchecked, void> > uint128_t;
+ typedef number<cpp_int_backend<256, 256, unsigned_magnitude, unchecked, void> > uint256_t;
+ typedef number<cpp_int_backend<512, 512, unsigned_magnitude, unchecked, void> > uint512_t;
+ typedef number<cpp_int_backend<1024, 1024, unsigned_magnitude, unchecked, void> > uint1024_t;
 
    // Fixed precision signed types:
- typedef number<cpp_int_backend<128, true, void> > int128_t;
- typedef number<cpp_int_backend<256, true, void> > int256_t;
- typedef number<cpp_int_backend<512, true, void> > int512_t;
- typedef number<cpp_int_backend<1024, true, void> > int1024_t;
+ typedef number<cpp_int_backend<128, 128, signed_magnitude, unchecked, void> > int128_t;
+ typedef number<cpp_int_backend<256, 256, signed_magnitude, unchecked, void> > int256_t;
+ typedef number<cpp_int_backend<512, 512, signed_magnitude, unchecked, void> > int512_t;
+ typedef number<cpp_int_backend<1024, 1024, signed_magnitude, unchecked, void> > int1024_t;
+
+ // Over again, but with checking enabled this time:
+ typedef number<cpp_int_backend<0, 0, signed_magnitude, checked> > checked_cpp_int;
+ typedef rational_adapter<cpp_int_backend<0, 0, signed_magnitude, checked> > checked_cpp_rational_backend;
+ typedef number<cpp_rational_backend> checked_cpp_rational;
+
+ // Checked fixed precision unsigned types:
+ typedef number<cpp_int_backend<128, 128, unsigned_magnitude, checked, void> > checked_uint128_t;
+ typedef number<cpp_int_backend<256, 256, unsigned_magnitude, checked, void> > checked_uint256_t;
+ typedef number<cpp_int_backend<512, 512, unsigned_magnitude, checked, void> > checked_uint512_t;
+ typedef number<cpp_int_backend<1024, 1024, unsigned_magnitude, checked, void> > checked_uint1024_t;
+
+ // Fixed precision signed types:
+ typedef number<cpp_int_backend<128, 128, signed_magnitude, checked, void> > checked_int128_t;
+ typedef number<cpp_int_backend<256, 256, signed_magnitude, checked, void> > checked_int256_t;
+ typedef number<cpp_int_backend<512, 512, signed_magnitude, checked, void> > checked_int512_t;
+ typedef number<cpp_int_backend<1024, 1024, signed_magnitude, checked, void> > checked_int1024_t;
 
    }} // namespaces
 
@@ -1753,16 +1846,22 @@
 The template arguments are:
 
 [variablelist
-[[Argument][Meaning]]
-[[MinBits]
- [The number of Bits to reserve inside the class's internal cache. When constructing a value,
- the object will use this internal cache if possible before resorting to dynamic memory allocation.
- When this value is zero, then the size of the internal cache is `2*sizeof(void*)*CHAR_BIT`.
- When the Allocator argument is `void`, then this parameter determines the precision of the type.]]
-[[Signed][When `true` the type is signed, otherwise unsigned. Note that unsigned types are currently only
- supported when the Allocator parameter is `void`.]]
-[[Allocator][The allocator used for dynamic memory allocation. This parameter can be `void`, in which case
- no dynamic memory will ever be allocated.]]
+[[MinBits][Determines the number of Bits to store directly within the object before resorting to dynamic memory
+ allocation. When zero, this field is determined automatically based on how many bits can be stored
+ in union with the dynamic storage header: setting a larger value may improve performance as larger integer
+ values will be stored internally before memory allocation is required.]]
+[[MaxBits][Determines the maximum number of bits to be stored in the type: resulting in a fixed precision type.
+ When this value is the same as MinBits, then the Allocator parameter is ignored, as no dynamic
+ memory allocation will ever be performed: in this situation the Allocator parameter should be set to
+ type `void`. Note that this parameter should not be used simply to prevent large memory
+ allocations, not only is that role better performed by the allocator, but fixed precision
+ integers have a tendency to allocate all of MaxBits of storage more often than one would expect.]]
+[[SignType][Determines whether the resulting type is signed or not. Note that for
+[@http://en.wikipedia.org/wiki/Arbitrary-precision_arithmetic arbitrary precision] types
+ this parameter must be `signed_magnitude`. For fixed precision
+ types then this type may be either `signed_magnitude` or `unsigned_magnitude`.]]
+[[Checked][This parameter has two values: `checked` or `unchecked`. See the [link boost_multiprecision.tut.ints.cpp_int tutorial] for more information.]]
+[[Allocator][The allocator to use for dynamic memory allocation, or type `void` if MaxBits == MinBits.]]
 ]
 
 The type of `number_category<cpp_int<Args...> >::type` is `mpl::int_<number_kind_integer>`.
@@ -1940,6 +2039,14 @@
 Note that while this trait is the ultimate arbiter of which constructors are marked as `explicit` in class `number`,
 authors of backend types should generally specialise one of the traits above, rather than this one directly.
 
+ template <class T>
+ is_signed_number;
+ template <class T>
+ is_unsigned_number;
+
+These two traits inherit from either `mpl::true_` or `mpl::false_`, by default types are assumed to be signed unless
+`is_unsigned_number` is specialized for that type.
+
 [endsect]
 
 [section:backendconc Backend Requirements]
@@ -2335,7 +2442,6 @@
 [[Header][Contains]]
 [[cpp_int.hpp][The `cpp_int` backend type.]]
 [[gmp.hpp][Defines all [gmp] related backends.]]
-[[integer_ops.hpp][Integer specific non-member functions.]]
 [[miller_rabin.hpp][Miller Rabin primality testing code.]]
 [[number.hpp][Defines the `number` backend, is included by all the backend headers.]]
 [[mpfr.hpp][Defines the mpfr_float_backend backend.]]
@@ -2348,8 +2454,16 @@
 
 [table Implementation Headers]
 [[Header][Contains]]
+[[cpp_int/add.hpp][Add and subtract operators for `cpp_int_backend`.]]
+[[cpp_int/bitwise.hpp][Bitwise operators for `cpp_int_backend`.]]
+[[cpp_int/checked.hpp][Helper functions for checked arithmetic for `cpp_int_backend`.]]
+[[cpp_int/comparison.hpp][Comparison operators for `cpp_int_backend`.]]
+[[cpp_int/cpp_int_config.hpp][Basic setup and configuration for `cpp_int_backend`.]]
+[[cpp_int/divide.hpp][Division and modulus operators for `cpp_int_backend`.]]
+[[cpp_int/limits.hpp][`numeric_limits` support for `cpp_int_backend`.]]
+[[cpp_int/misc.hpp][Miscellaneous operators for `cpp_int_backend`.]]
+[[cpp_int/multiply.hpp][Multiply operators for `cpp_int_backend`.]]
 [[detail/big_lanczos.hpp][Lanczos support for Boost.Math integration.]]
-[[detail/cpp_int_core.hpp][Platform and peformance tuning for the `cpp_int` backend.]]
 [[detail/default_ops.hpp][Default versions of the optional backend non-member functions.]]
 [[detail/generic_interconvert.hpp][Generic interconversion routines.]]
 [[detail/number_base.hpp][All the expression template code, metaprogramming, and operator overloads for `number`.]]
@@ -2725,7 +2839,7 @@
 [h4 Post review changes]
 
 * Non-expression template operators further optimised with rvalue reference support.
-* Many functions made made `constexp`?
+* Many functions made `constexp`.
 * Differentiate between explicit and implicit conversions in the number constructor.
 * Removed "mp_" prefix from types.
 * Allowed mixed precision arithmetic.
@@ -2733,6 +2847,7 @@
 * Changed ExpressionTemplate parameter default value to use a traits class so that the default value depends on the backend used.
 * Added support for fused-multiply-add/subtract with GMP support.
 * Tweaked expression template unpacking to use fewer temporaries when the LHS also appears in the RHS.
+* Refactored `cpp_int_backend` based on review comments with new template parameter structure.
 
 [h4 Pre-review history]
 
@@ -2763,28 +2878,30 @@
 * Can ring types (exact floating point types) be supported? The answer should be yes, but someone needs to write it,
 the hard part is IO and binary-decimal convertion.
 * Should there be a choice of rounding mode (probably MPFR specific)?
+* We can reuse temporaries in multiple subtrees (temporary caching).
 
 Things requested in review:
 
 * A 2's complement fixed precision int that uses exactly N bits and no more.
-* A backend for an overflow aware integers.
-* Each back-end should document the requirements it satisfies (not currently scheduled for inclusion: it's
-deliberately an implementation detail, and "optional" requirements are optimisations which can't be detected
-by the user).
-* The use of bool in template parameters could be improved by the use of
-an enum class which will be more explicit. E.g `enum class expression_template {disabled, enabled};
-enum class sign {unsigned, signed};` (Partly done 2012/09/15).
 * The performances of mp_number<a_trivial_adaptor<float>, false>respect to
 float and mp_number<a_trivial_adaptor<int>, false> and int should be
 given to show the cost of using the generic interface (Mostly done, just need to update docs to the latest results).
 * The rounding applied when converting must be documented.
 * cpp_dec_float should round to nearest.
-* We can reuse temporaries in multiple subtrees (temporary caching).
-* Emphasise in the docs that ET's may reorder operations.
 * Document why we don't use proto (compile times).
-* Document what happens to small fixed precision cpp_int's.
 * Should we provide min/max overloads for expression templates?
 * Document why we don't abstract out addition/multiplication algorithms etc.
+* We can reuse temporaries in multiple subtrees (temporary caching) Moved to TODO list.
+* Emphasise in the docs that ET's may reorder operations (done 2012/10/31).
+* Document what happens to small fixed precision cpp_int's (done 2012/10/31).
+* The use of bool in template parameters could be improved by the use of
+an enum class which will be more explicit. E.g `enum class expression_template {disabled, enabled};
+enum class sign {unsigned, signed};` (Partly done 2012/09/15, done 2012/10/31).
+* Each back-end should document the requirements it satisfies (not currently scheduled for inclusion: it's
+deliberately an implementation detail, and "optional" requirements are optimisations which can't be detected
+by the user). Not done: this is an implementation detail, the exact list of requirements satisfied is purely
+an optimimization, not something the user can detect.
+* A backend for an overflow aware integers (done 2012/10/31).
 * IIUC convert_to is used to emulate in c++98 compilers C++11 explicit
 conversions. Could the explicit conversion operator be added on
 compilers supporting it? (Done 2012/09/15).
@@ -2811,7 +2928,7 @@
 [h4 Pre-Review Comments]
 
 * Make fixed precision orthogonal to Allocator type in cpp_int. Possible solution - add an additional MaxBits
-template argument that defaults to 0 (meaning keep going till no more space/memory).
+template argument that defaults to 0 (meaning keep going till no more space/memory). Done.
 * Can ring types (exact floating point types) be supported? The answer should be yes, but someone needs to write it (Moved to TODO list).
 * Should there be a choice of rounding mode (probably MPFR specific)? Moved to TODO list.
 * Make the exponent type for cpp_dec_float a templare parameter, maybe include support for big-integer exponents.

Modified: sandbox/big_number/libs/multiprecision/performance/sf_performance.cpp
==============================================================================
--- sandbox/big_number/libs/multiprecision/performance/sf_performance.cpp (original)
+++ sandbox/big_number/libs/multiprecision/performance/sf_performance.cpp 2012-10-31 13:06:33 EDT (Wed, 31 Oct 2012)
@@ -282,8 +282,10 @@
 #ifdef TEST_MPFR
 #if MPFR_VERSION<MPFR_VERSION_NUM(3,0,0)
    time_proc("mpfr_float_50", test_bessel<boost::multiprecision::mpfr_float_50>, 1);
+ time_proc("mpfr_float_50 (no expression templates", test_bessel<number<mpfr_float_backend<50>, et_off> >, 1);
 #else
    time_proc("mpfr_float_50", test_bessel<boost::multiprecision::mpfr_float_50>, mpfr_buildopt_tls_p() ? 3 : 1);
+ time_proc("mpfr_float_50 (no expression templates", test_bessel<number<mpfr_float_backend<50>, et_off> >, mpfr_buildopt_tls_p() ? 3 : 1);
 #endif
 #endif
 #ifdef TEST_MPF
@@ -311,6 +313,7 @@
 #endif
 #ifdef TEST_MPFR
    time_proc("mpfr_float_100", test_bessel<mpfr_float_100>);
+ time_proc("mpfr_float_100 (no expression templates", test_bessel<number<mpfr_float_backend<100>, et_off> >);
 #endif
 #ifdef TEST_MPF
    time_proc("mpf_float_100", test_bessel<mpf_float_100>);
@@ -338,6 +341,7 @@
 #endif
 #ifdef TEST_MPFR
    time_proc("mpfr_float_50", test_polynomial<mpfr_float_50>);
+ time_proc("mpfr_float_50 (no expression templates", test_polynomial<number<mpfr_float_backend<50>, et_off> >);
 #endif
 #ifdef TEST_MPF
    time_proc("mpf_float_50", test_polynomial<mpf_float_50>);
@@ -364,6 +368,7 @@
 #endif
 #ifdef TEST_MPFR
    time_proc("mpfr_float_100", test_polynomial<mpfr_float_100>);
+ time_proc("mpfr_float_100 (no expression templates", test_polynomial<number<mpfr_float_backend<100>, et_off> >);
 #endif
 #ifdef TEST_MPF
    time_proc("mpf_float_100", test_polynomial<mpf_float_100>);
@@ -390,6 +395,7 @@
 #endif
 #ifdef TEST_MPFR
    time_proc("mpfr_float_50", test_nct<mpfr_float_50>);
+ time_proc("mpfr_float_50 (no expression templates", test_nct<number<mpfr_float_backend<50>, et_off> >);
 #endif
 #ifdef TEST_MPF
    time_proc("mpf_float_50", test_nct<mpf_float_50>);
@@ -416,6 +422,7 @@
 #endif
 #ifdef TEST_MPFR
    time_proc("mpfr_float_100", test_nct<mpfr_float_100>);
+ time_proc("mpfr_float_100 (no expression templates", test_nct<number<mpfr_float_backend<100>, et_off> >);
 #endif
 #ifdef TEST_MPF
    time_proc("mpf_float_100", test_nct<mpf_float_100>);

Modified: sandbox/big_number/libs/multiprecision/test/math/log1p_expm1_test.cpp
==============================================================================
--- sandbox/big_number/libs/multiprecision/test/math/log1p_expm1_test.cpp (original)
+++ sandbox/big_number/libs/multiprecision/test/math/log1p_expm1_test.cpp 2012-10-31 13:06:33 EDT (Wed, 31 Oct 2012)
@@ -131,6 +131,8 @@
    test(number<gmp_float<18> >(), "number<gmp_float<18> >");
    test(number<gmp_float<30> >(), "number<gmp_float<30> >");
    test(number<gmp_float<35> >(), "number<gmp_float<35> >");
+ // there should be at least one test with expression templates off:
+ test(number<gmp_float<35>, et_off>(), "number<gmp_float<35>, et_off>");
 #endif
 #ifdef TEST_MPFR_50
    test(number<mpfr_float_backend<18> >(), "number<mpfr_float_backend<18> >");

Modified: sandbox/big_number/libs/multiprecision/test/math/powm1_sqrtp1m1_test.cpp
==============================================================================
--- sandbox/big_number/libs/multiprecision/test/math/powm1_sqrtp1m1_test.cpp (original)
+++ sandbox/big_number/libs/multiprecision/test/math/powm1_sqrtp1m1_test.cpp 2012-10-31 13:06:33 EDT (Wed, 31 Oct 2012)
@@ -123,6 +123,8 @@
    //test_powm1_sqrtp1m1(number<gmp_float<18> >(), "number<gmp_float<18> >");
    test_powm1_sqrtp1m1(number<gmp_float<30> >(), "number<gmp_float<30> >");
    test_powm1_sqrtp1m1(number<gmp_float<35> >(), "number<gmp_float<35> >");
+ // there should be at least one test with expression templates off:
+ test_powm1_sqrtp1m1(number<gmp_float<35>, et_off>(), "number<gmp_float<35>, et_off>");
 #endif
 #ifdef TEST_MPFR_50
    test_powm1_sqrtp1m1(number<mpfr_float_backend<18> >(), "number<mpfr_float_backend<18> >");

Modified: sandbox/big_number/libs/multiprecision/test/math/test_bessel_i.cpp
==============================================================================
--- sandbox/big_number/libs/multiprecision/test/math/test_bessel_i.cpp (original)
+++ sandbox/big_number/libs/multiprecision/test/math/test_bessel_i.cpp 2012-10-31 13:06:33 EDT (Wed, 31 Oct 2012)
@@ -91,6 +91,8 @@
    //test_bessel(number<gmp_float<18> >(), "number<gmp_float<18> >");
    test_bessel(number<gmp_float<30> >(), "number<gmp_float<30> >");
    test_bessel(number<gmp_float<35> >(), "number<gmp_float<35> >");
+ // there should be at least one test with expression templates off:
+ test_bessel(number<gmp_float<35>, et_off>(), "number<gmp_float<35>, et_off>");
 #endif
 #ifdef TEST_MPFR_50
    test_bessel(number<mpfr_float_backend<18> >(), "number<mpfr_float_backend<18> >");

Modified: sandbox/big_number/libs/multiprecision/test/math/test_bessel_j.cpp
==============================================================================
--- sandbox/big_number/libs/multiprecision/test/math/test_bessel_j.cpp (original)
+++ sandbox/big_number/libs/multiprecision/test/math/test_bessel_j.cpp 2012-10-31 13:06:33 EDT (Wed, 31 Oct 2012)
@@ -133,6 +133,8 @@
    //test_bessel(number<gmp_float<18> >(), "number<gmp_float<18> >");
    test_bessel(number<gmp_float<30> >(), "number<gmp_float<30> >");
    test_bessel(number<gmp_float<35> >(), "number<gmp_float<35> >");
+ // there should be at least one test with expression templates off:
+ test_bessel(number<gmp_float<35>, et_off>(), "number<gmp_float<35>, et_off>");
 #endif
 #ifdef TEST_MPFR_50
    test_bessel(number<mpfr_float_backend<18> >(), "number<mpfr_float_backend<18> >");

Modified: sandbox/big_number/libs/multiprecision/test/math/test_bessel_k.cpp
==============================================================================
--- sandbox/big_number/libs/multiprecision/test/math/test_bessel_k.cpp (original)
+++ sandbox/big_number/libs/multiprecision/test/math/test_bessel_k.cpp 2012-10-31 13:06:33 EDT (Wed, 31 Oct 2012)
@@ -106,6 +106,8 @@
    test_bessel(number<gmp_float<18> >(), "number<gmp_float<18> >");
    test_bessel(number<gmp_float<30> >(), "number<gmp_float<30> >");
    test_bessel(number<gmp_float<35> >(), "number<gmp_float<35> >");
+ // there should be at least one test with expression templates off:
+ test_bessel(number<gmp_float<35>, et_off>(), "number<gmp_float<35>, et_off>");
 #endif
 #ifdef TEST_MPFR_50
    test_bessel(number<mpfr_float_backend<18> >(), "number<mpfr_float_backend<18> >");

Modified: sandbox/big_number/libs/multiprecision/test/math/test_bessel_y.cpp
==============================================================================
--- sandbox/big_number/libs/multiprecision/test/math/test_bessel_y.cpp (original)
+++ sandbox/big_number/libs/multiprecision/test/math/test_bessel_y.cpp 2012-10-31 13:06:33 EDT (Wed, 31 Oct 2012)
@@ -132,6 +132,8 @@
    //test_bessel(number<gmp_float<18> >(), "number<gmp_float<18> >");
    test_bessel(number<gmp_float<30> >(), "number<gmp_float<30> >");
    test_bessel(number<gmp_float<35> >(), "number<gmp_float<35> >");
+ // there should be at least one test with expression templates off:
+ test_bessel(number<gmp_float<35>, et_off>(), "number<gmp_float<35>, et_off>");
 #endif
 #ifdef TEST_MPFR_50
    test_bessel(number<mpfr_float_backend<18> >(), "number<mpfr_float_backend<18> >");

Modified: sandbox/big_number/libs/multiprecision/test/math/test_beta.cpp
==============================================================================
--- sandbox/big_number/libs/multiprecision/test/math/test_beta.cpp (original)
+++ sandbox/big_number/libs/multiprecision/test/math/test_beta.cpp 2012-10-31 13:06:33 EDT (Wed, 31 Oct 2012)
@@ -118,6 +118,8 @@
    test_beta(number<gmp_float<18> >(), "number<gmp_float<18> >");
    test_beta(number<gmp_float<30> >(), "number<gmp_float<30> >");
    test_beta(number<gmp_float<35> >(), "number<gmp_float<35> >");
+ // there should be at least one test with expression templates off:
+ test_beta(number<gmp_float<35>, et_off>(), "number<gmp_float<35>, et_off>");
 #endif
 #ifdef TEST_MPFR_50
    test_beta(number<mpfr_float_backend<18> >(), "number<mpfr_float_backend<18> >");

Modified: sandbox/big_number/libs/multiprecision/test/math/test_binomial_coeff.cpp
==============================================================================
--- sandbox/big_number/libs/multiprecision/test/math/test_binomial_coeff.cpp (original)
+++ sandbox/big_number/libs/multiprecision/test/math/test_binomial_coeff.cpp 2012-10-31 13:06:33 EDT (Wed, 31 Oct 2012)
@@ -97,6 +97,8 @@
    test_binomial(number<gmp_float<18> >(), "number<gmp_float<18> >");
    test_binomial(number<gmp_float<30> >(), "number<gmp_float<30> >");
    test_binomial(number<gmp_float<35> >(), "number<gmp_float<35> >");
+ // there should be at least one test with expression templates off:
+ test_binomial(number<gmp_float<35>, et_off>(), "number<gmp_float<35>, et_off>");
 #endif
 #ifdef TEST_MPFR_50
    test_binomial(number<mpfr_float_backend<18> >(), "number<mpfr_float_backend<18> >");

Modified: sandbox/big_number/libs/multiprecision/test/math/test_carlson.cpp
==============================================================================
--- sandbox/big_number/libs/multiprecision/test/math/test_carlson.cpp (original)
+++ sandbox/big_number/libs/multiprecision/test/math/test_carlson.cpp 2012-10-31 13:06:33 EDT (Wed, 31 Oct 2012)
@@ -89,6 +89,8 @@
    test_spots(number<gmp_float<18> >(), "number<gmp_float<18> >");
    test_spots(number<gmp_float<30> >(), "number<gmp_float<30> >");
    test_spots(number<gmp_float<35> >(), "number<gmp_float<35> >");
+ // there should be at least one test with expression templates off:
+ test_spots(number<gmp_float<35>, et_off>(), "number<gmp_float<35>, et_off>");
 #endif
 #ifdef TEST_MPFR_50
    test_spots(number<mpfr_float_backend<18> >(), "number<mpfr_float_backend<18> >");

Modified: sandbox/big_number/libs/multiprecision/test/math/test_cbrt.cpp
==============================================================================
--- sandbox/big_number/libs/multiprecision/test/math/test_cbrt.cpp (original)
+++ sandbox/big_number/libs/multiprecision/test/math/test_cbrt.cpp 2012-10-31 13:06:33 EDT (Wed, 31 Oct 2012)
@@ -78,6 +78,8 @@
    test_cbrt(number<gmp_float<18> >(), "number<gmp_float<18> >");
    test_cbrt(number<gmp_float<30> >(), "number<gmp_float<30> >");
    test_cbrt(number<gmp_float<35> >(), "number<gmp_float<35> >");
+ // there should be at least one test with expression templates off:
+ test_cbrt(number<gmp_float<35>, et_off>(), "number<gmp_float<35>, et_off>");
 #endif
 #ifdef TEST_MPFR_50
    test_cbrt(number<mpfr_float_backend<18> >(), "number<mpfr_float_backend<18> >");

Modified: sandbox/big_number/libs/multiprecision/test/math/test_digamma.cpp
==============================================================================
--- sandbox/big_number/libs/multiprecision/test/math/test_digamma.cpp (original)
+++ sandbox/big_number/libs/multiprecision/test/math/test_digamma.cpp 2012-10-31 13:06:33 EDT (Wed, 31 Oct 2012)
@@ -92,6 +92,8 @@
    test_digamma(number<gmp_float<18> >(), "number<gmp_float<18> >");
    test_digamma(number<gmp_float<30> >(), "number<gmp_float<30> >");
    test_digamma(number<gmp_float<35> >(), "number<gmp_float<35> >");
+ // there should be at least one test with expression templates off:
+ test_digamma(number<gmp_float<35>, et_off>(), "number<gmp_float<35>, et_off>");
 #endif
 #ifdef TEST_MPFR_50
    test_digamma(number<mpfr_float_backend<18> >(), "number<mpfr_float_backend<18> >");

Modified: sandbox/big_number/libs/multiprecision/test/math/test_ellint_1.cpp
==============================================================================
--- sandbox/big_number/libs/multiprecision/test/math/test_ellint_1.cpp (original)
+++ sandbox/big_number/libs/multiprecision/test/math/test_ellint_1.cpp 2012-10-31 13:06:33 EDT (Wed, 31 Oct 2012)
@@ -85,6 +85,8 @@
    test_spots(number<gmp_float<18> >(), "number<gmp_float<18> >");
    test_spots(number<gmp_float<30> >(), "number<gmp_float<30> >");
    test_spots(number<gmp_float<35> >(), "number<gmp_float<35> >");
+ // there should be at least one test with expression templates off:
+ test_spots(number<gmp_float<35>, et_off>(), "number<gmp_float<35>, et_off>");
 #endif
 #ifdef TEST_MPFR_50
    test_spots(number<mpfr_float_backend<18> >(), "number<mpfr_float_backend<18> >");

Modified: sandbox/big_number/libs/multiprecision/test/math/test_ellint_2.cpp
==============================================================================
--- sandbox/big_number/libs/multiprecision/test/math/test_ellint_2.cpp (original)
+++ sandbox/big_number/libs/multiprecision/test/math/test_ellint_2.cpp 2012-10-31 13:06:33 EDT (Wed, 31 Oct 2012)
@@ -78,6 +78,8 @@
    test_spots(number<gmp_float<18> >(), "number<gmp_float<18> >");
    test_spots(number<gmp_float<30> >(), "number<gmp_float<30> >");
    test_spots(number<gmp_float<35> >(), "number<gmp_float<35> >");
+ // there should be at least one test with expression templates off:
+ test_spots(number<gmp_float<35>, et_off>(), "number<gmp_float<35>, et_off>");
 #endif
 #ifdef TEST_MPFR_50
    test_spots(number<mpfr_float_backend<18> >(), "number<mpfr_float_backend<18> >");

Modified: sandbox/big_number/libs/multiprecision/test/math/test_ellint_3.cpp
==============================================================================
--- sandbox/big_number/libs/multiprecision/test/math/test_ellint_3.cpp (original)
+++ sandbox/big_number/libs/multiprecision/test/math/test_ellint_3.cpp 2012-10-31 13:06:33 EDT (Wed, 31 Oct 2012)
@@ -99,6 +99,8 @@
    test_spots(number<gmp_float<18> >(), "number<gmp_float<18> >");
    test_spots(number<gmp_float<30> >(), "number<gmp_float<30> >");
    test_spots(number<gmp_float<35> >(), "number<gmp_float<35> >");
+ // there should be at least one test with expression templates off:
+ test_spots(number<gmp_float<35>, et_off>(), "number<gmp_float<35>, et_off>");
 #endif
 #ifdef TEST_MPFR_50
    test_spots(number<mpfr_float_backend<18> >(), "number<mpfr_float_backend<18> >");

Modified: sandbox/big_number/libs/multiprecision/test/math/test_erf.cpp
==============================================================================
--- sandbox/big_number/libs/multiprecision/test/math/test_erf.cpp (original)
+++ sandbox/big_number/libs/multiprecision/test/math/test_erf.cpp 2012-10-31 13:06:33 EDT (Wed, 31 Oct 2012)
@@ -99,6 +99,8 @@
    test_erf(number<gmp_float<18> >(), "number<gmp_float<18> >");
    test_erf(number<gmp_float<30> >(), "number<gmp_float<30> >");
    test_erf(number<gmp_float<35> >(), "number<gmp_float<35> >");
+ // there should be at least one test with expression templates off:
+ test_erf(number<gmp_float<35>, et_off>(), "number<gmp_float<35>, et_off>");
 #endif
 #ifdef TEST_MPFR_50
    test_erf(number<mpfr_float_backend<18> >(), "number<mpfr_float_backend<18> >");

Modified: sandbox/big_number/libs/multiprecision/test/math/test_expint.cpp
==============================================================================
--- sandbox/big_number/libs/multiprecision/test/math/test_expint.cpp (original)
+++ sandbox/big_number/libs/multiprecision/test/math/test_expint.cpp 2012-10-31 13:06:33 EDT (Wed, 31 Oct 2012)
@@ -99,6 +99,8 @@
    test_expint(number<gmp_float<18> >(), "number<gmp_float<18> >");
    test_expint(number<gmp_float<30> >(), "number<gmp_float<30> >");
    test_expint(number<gmp_float<35> >(), "number<gmp_float<35> >");
+ // there should be at least one test with expression templates off:
+ test_expint(number<gmp_float<35>, et_off>(), "number<gmp_float<35>, et_off>");
 #endif
 #ifdef TEST_MPFR_50
    test_expint(number<mpfr_float_backend<18> >(), "number<mpfr_float_backend<18> >");

Modified: sandbox/big_number/libs/multiprecision/test/math/test_gamma.cpp
==============================================================================
--- sandbox/big_number/libs/multiprecision/test/math/test_gamma.cpp (original)
+++ sandbox/big_number/libs/multiprecision/test/math/test_gamma.cpp 2012-10-31 13:06:33 EDT (Wed, 31 Oct 2012)
@@ -113,6 +113,8 @@
    test_gamma(number<gmp_float<18> >(), "number<gmp_float<18> >");
    test_gamma(number<gmp_float<30> >(), "number<gmp_float<30> >");
    test_gamma(number<gmp_float<35> >(), "number<gmp_float<35> >");
+ // there should be at least one test with expression templates off:
+ test_gamma(number<gmp_float<35>, et_off>(), "number<gmp_float<35>, et_off>");
 #endif
 #ifdef TEST_MPFR_50
    test_gamma(number<mpfr_float_backend<18> >(), "number<mpfr_float_backend<18> >");

Modified: sandbox/big_number/libs/multiprecision/test/math/test_hermite.cpp
==============================================================================
--- sandbox/big_number/libs/multiprecision/test/math/test_hermite.cpp (original)
+++ sandbox/big_number/libs/multiprecision/test/math/test_hermite.cpp 2012-10-31 13:06:33 EDT (Wed, 31 Oct 2012)
@@ -78,6 +78,8 @@
    test_hermite(number<gmp_float<18> >(), "number<gmp_float<18> >");
    test_hermite(number<gmp_float<30> >(), "number<gmp_float<30> >");
    test_hermite(number<gmp_float<35> >(), "number<gmp_float<35> >");
+ // there should be at least one test with expression templates off:
+ test_hermite(number<gmp_float<35>, et_off>(), "number<gmp_float<35>, et_off>");
 #endif
 #ifdef TEST_MPFR_50
    test_hermite(number<mpfr_float_backend<18> >(), "number<mpfr_float_backend<18> >");

Modified: sandbox/big_number/libs/multiprecision/test/math/test_ibeta.cpp
==============================================================================
--- sandbox/big_number/libs/multiprecision/test/math/test_ibeta.cpp (original)
+++ sandbox/big_number/libs/multiprecision/test/math/test_ibeta.cpp 2012-10-31 13:06:33 EDT (Wed, 31 Oct 2012)
@@ -109,6 +109,8 @@
    test_beta(number<gmp_float<18> >(), "number<gmp_float<18> >");
    test_beta(number<gmp_float<30> >(), "number<gmp_float<30> >");
    test_beta(number<gmp_float<35> >(), "number<gmp_float<35> >");
+ // there should be at least one test with expression templates off:
+ test_beta(number<gmp_float<35>, et_off>(), "number<gmp_float<35>, et_off>");
 #endif
 #ifdef TEST_MPFR_50
    test_beta(number<mpfr_float_backend<18> >(), "number<mpfr_float_backend<18> >");

Modified: sandbox/big_number/libs/multiprecision/test/math/test_ibeta_2.cpp
==============================================================================
--- sandbox/big_number/libs/multiprecision/test/math/test_ibeta_2.cpp (original)
+++ sandbox/big_number/libs/multiprecision/test/math/test_ibeta_2.cpp 2012-10-31 13:06:33 EDT (Wed, 31 Oct 2012)
@@ -109,6 +109,8 @@
    test_beta(number<gmp_float<18> >(), "number<gmp_float<18> >");
    test_beta(number<gmp_float<30> >(), "number<gmp_float<30> >");
    test_beta(number<gmp_float<35> >(), "number<gmp_float<35> >");
+ // there should be at least one test with expression templates off:
+ test_beta(number<gmp_float<35>, et_off>(), "number<gmp_float<35>, et_off>");
 #endif
 #ifdef TEST_MPFR_50
    test_beta(number<mpfr_float_backend<18> >(), "number<mpfr_float_backend<18> >");

Modified: sandbox/big_number/libs/multiprecision/test/math/test_ibeta_3.cpp
==============================================================================
--- sandbox/big_number/libs/multiprecision/test/math/test_ibeta_3.cpp (original)
+++ sandbox/big_number/libs/multiprecision/test/math/test_ibeta_3.cpp 2012-10-31 13:06:33 EDT (Wed, 31 Oct 2012)
@@ -95,6 +95,8 @@
    test_beta(number<gmp_float<18> >(), "number<gmp_float<18> >");
    test_beta(number<gmp_float<30> >(), "number<gmp_float<30> >");
    test_beta(number<gmp_float<35> >(), "number<gmp_float<35> >");
+ // there should be at least one test with expression templates off:
+ test_beta(number<gmp_float<35>, et_off>(), "number<gmp_float<35>, et_off>");
 #endif
 #ifdef TEST_MPFR_50
    test_beta(number<mpfr_float_backend<18> >(), "number<mpfr_float_backend<18> >");

Modified: sandbox/big_number/libs/multiprecision/test/math/test_ibeta_4.cpp
==============================================================================
--- sandbox/big_number/libs/multiprecision/test/math/test_ibeta_4.cpp (original)
+++ sandbox/big_number/libs/multiprecision/test/math/test_ibeta_4.cpp 2012-10-31 13:06:33 EDT (Wed, 31 Oct 2012)
@@ -102,6 +102,8 @@
    test_beta(number<gmp_float<18> >(), "number<gmp_float<18> >");
    test_beta(number<gmp_float<30> >(), "number<gmp_float<30> >");
    test_beta(number<gmp_float<35> >(), "number<gmp_float<35> >");
+ // there should be at least one test with expression templates off:
+ test_beta(number<gmp_float<35>, et_off>(), "number<gmp_float<35>, et_off>");
 #endif
 #ifdef TEST_MPFR_50
    test_beta(number<mpfr_float_backend<18> >(), "number<mpfr_float_backend<18> >");

Modified: sandbox/big_number/libs/multiprecision/test/math/test_ibeta_inv_1.cpp
==============================================================================
--- sandbox/big_number/libs/multiprecision/test/math/test_ibeta_inv_1.cpp (original)
+++ sandbox/big_number/libs/multiprecision/test/math/test_ibeta_inv_1.cpp 2012-10-31 13:06:33 EDT (Wed, 31 Oct 2012)
@@ -88,6 +88,8 @@
    //test_beta(number<gmp_float<18> >(), "number<gmp_float<18> >");
    test_beta(number<gmp_float<30> >(), "number<gmp_float<30> >");
    test_beta(number<gmp_float<35> >(), "number<gmp_float<35> >");
+ // there should be at least one test with expression templates off:
+ test_beta(number<gmp_float<35>, et_off>(), "number<gmp_float<35>, et_off>");
 #endif
 #ifdef TEST_MPFR_50
    test_beta(number<mpfr_float_backend<18> >(), "number<mpfr_float_backend<18> >");

Modified: sandbox/big_number/libs/multiprecision/test/math/test_ibeta_inv_ab_4.cpp
==============================================================================
--- sandbox/big_number/libs/multiprecision/test/math/test_ibeta_inv_ab_4.cpp (original)
+++ sandbox/big_number/libs/multiprecision/test/math/test_ibeta_inv_ab_4.cpp 2012-10-31 13:06:33 EDT (Wed, 31 Oct 2012)
@@ -81,6 +81,8 @@
    //test_beta(number<gmp_float<18> >(), "number<gmp_float<18> >");
    test_beta(number<gmp_float<30> >(), "number<gmp_float<30> >");
    test_beta(number<gmp_float<35> >(), "number<gmp_float<35> >");
+ // there should be at least one test with expression templates off:
+ test_beta(number<gmp_float<35>, et_off>(), "number<gmp_float<35>, et_off>");
 #endif
 #ifdef TEST_MPFR_50
    test_beta(number<mpfr_float_backend<18> >(), "number<mpfr_float_backend<18> >");

Modified: sandbox/big_number/libs/multiprecision/test/math/test_igamma.cpp
==============================================================================
--- sandbox/big_number/libs/multiprecision/test/math/test_igamma.cpp (original)
+++ sandbox/big_number/libs/multiprecision/test/math/test_igamma.cpp 2012-10-31 13:06:33 EDT (Wed, 31 Oct 2012)
@@ -85,6 +85,8 @@
    test_gamma(number<gmp_float<18> >(), "number<gmp_float<18> >");
    test_gamma(number<gmp_float<30> >(), "number<gmp_float<30> >");
    test_gamma(number<gmp_float<35> >(), "number<gmp_float<35> >");
+ // there should be at least one test with expression templates off:
+ test_gamma(number<gmp_float<35>, et_off>(), "number<gmp_float<35>, et_off>");
 #endif
 #ifdef TEST_MPFR_50
    test_gamma(number<mpfr_float_backend<18> >(), "number<mpfr_float_backend<18> >");

Modified: sandbox/big_number/libs/multiprecision/test/math/test_igamma_inv.cpp
==============================================================================
--- sandbox/big_number/libs/multiprecision/test/math/test_igamma_inv.cpp (original)
+++ sandbox/big_number/libs/multiprecision/test/math/test_igamma_inv.cpp 2012-10-31 13:06:33 EDT (Wed, 31 Oct 2012)
@@ -100,6 +100,8 @@
    test_gamma(number<gmp_float<18> >(), "number<gmp_float<18> >");
    test_gamma(number<gmp_float<30> >(), "number<gmp_float<30> >");
    test_gamma(number<gmp_float<35> >(), "number<gmp_float<35> >");
+ // there should be at least one test with expression templates off:
+ test_gamma(number<gmp_float<35>, et_off>(), "number<gmp_float<35>, et_off>");
 #endif
 #ifdef TEST_MPFR_50
    test_gamma(number<mpfr_float_backend<18> >(), "number<mpfr_float_backend<18> >");

Modified: sandbox/big_number/libs/multiprecision/test/math/test_igamma_inva.cpp
==============================================================================
--- sandbox/big_number/libs/multiprecision/test/math/test_igamma_inva.cpp (original)
+++ sandbox/big_number/libs/multiprecision/test/math/test_igamma_inva.cpp 2012-10-31 13:06:33 EDT (Wed, 31 Oct 2012)
@@ -79,6 +79,8 @@
    test_gamma(number<gmp_float<18> >(), "number<gmp_float<18> >");
    test_gamma(number<gmp_float<30> >(), "number<gmp_float<30> >");
    test_gamma(number<gmp_float<35> >(), "number<gmp_float<35> >");
+ // there should be at least one test with expression templates off:
+ test_gamma(number<gmp_float<35>, et_off>(), "number<gmp_float<35>, et_off>");
 #endif
 #ifdef TEST_MPFR_50
    test_gamma(number<mpfr_float_backend<18> >(), "number<mpfr_float_backend<18> >");

Modified: sandbox/big_number/libs/multiprecision/test/math/test_laguerre.cpp
==============================================================================
--- sandbox/big_number/libs/multiprecision/test/math/test_laguerre.cpp (original)
+++ sandbox/big_number/libs/multiprecision/test/math/test_laguerre.cpp 2012-10-31 13:06:33 EDT (Wed, 31 Oct 2012)
@@ -78,6 +78,8 @@
    test_laguerre(number<gmp_float<18> >(), "number<gmp_float<18> >");
    test_laguerre(number<gmp_float<30> >(), "number<gmp_float<30> >");
    test_laguerre(number<gmp_float<35> >(), "number<gmp_float<35> >");
+ // there should be at least one test with expression templates off:
+ test_laguerre(number<gmp_float<35>, et_off>(), "number<gmp_float<35>, et_off>");
 #endif
 #ifdef TEST_MPFR_50
    test_laguerre(number<mpfr_float_backend<18> >(), "number<mpfr_float_backend<18> >");

Modified: sandbox/big_number/libs/multiprecision/test/math/test_legendre.cpp
==============================================================================
--- sandbox/big_number/libs/multiprecision/test/math/test_legendre.cpp (original)
+++ sandbox/big_number/libs/multiprecision/test/math/test_legendre.cpp 2012-10-31 13:06:33 EDT (Wed, 31 Oct 2012)
@@ -78,6 +78,8 @@
    test_legendre_p(number<gmp_float<18> >(), "number<gmp_float<18> >");
    test_legendre_p(number<gmp_float<30> >(), "number<gmp_float<30> >");
    test_legendre_p(number<gmp_float<35> >(), "number<gmp_float<35> >");
+ // there should be at least one test with expression templates off:
+ test_legendre_p(number<gmp_float<35>, et_off>(), "number<gmp_float<35>, et_off>");
 #endif
 #ifdef TEST_MPFR_50
    test_legendre_p(number<mpfr_float_backend<18> >(), "number<mpfr_float_backend<18> >");

Modified: sandbox/big_number/libs/multiprecision/test/math/test_tgamma_ratio.cpp
==============================================================================
--- sandbox/big_number/libs/multiprecision/test/math/test_tgamma_ratio.cpp (original)
+++ sandbox/big_number/libs/multiprecision/test/math/test_tgamma_ratio.cpp 2012-10-31 13:06:33 EDT (Wed, 31 Oct 2012)
@@ -92,6 +92,8 @@
    test_tgamma_ratio(number<gmp_float<18> >(), "number<gmp_float<18> >");
    test_tgamma_ratio(number<gmp_float<30> >(), "number<gmp_float<30> >");
    test_tgamma_ratio(number<gmp_float<35> >(), "number<gmp_float<35> >");
+ // there should be at least one test with expression templates off:
+ test_tgamma_ratio(number<gmp_float<35>, et_off>(), "number<gmp_float<35>, et_off>");
 #endif
 #ifdef TEST_MPFR_50
    test_tgamma_ratio(number<mpfr_float_backend<18> >(), "number<mpfr_float_backend<18> >");

Modified: sandbox/big_number/libs/multiprecision/test/math/test_zeta.cpp
==============================================================================
--- sandbox/big_number/libs/multiprecision/test/math/test_zeta.cpp (original)
+++ sandbox/big_number/libs/multiprecision/test/math/test_zeta.cpp 2012-10-31 13:06:33 EDT (Wed, 31 Oct 2012)
@@ -86,6 +86,8 @@
    test_zeta(number<gmp_float<18> >(), "number<gmp_float<18> >");
    test_zeta(number<gmp_float<30> >(), "number<gmp_float<30> >");
    test_zeta(number<gmp_float<35> >(), "number<gmp_float<35> >");
+ // there should be at least one test with expression templates off:
+ test_zeta(number<gmp_float<35>, et_off>(), "number<gmp_float<35>, et_off>");
 #endif
 #ifdef TEST_MPFR_50
    test_zeta(number<mpfr_float_backend<18> >(), "number<mpfr_float_backend<18> >");


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