Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r62365 - in sandbox/xint: . boost/xint boost/xint/detail build dev dev-ms doc doc/dox doc/doxygen doc/doxygen/html doc/doxygen/images example libs libs/xint libs/xint/doc libs/xint/doc/dox libs/xint/example libs/xint/test src test
From: chad.thecomfychair_at_[hidden]
Date: 2010-05-31 20:44:52


Author: chadnelson
Date: 2010-05-31 20:43:54 EDT (Mon, 31 May 2010)
New Revision: 62365
URL: http://svn.boost.org/trac/boost/changeset/62365

Log:
Fourth preliminary version.
Added:
   sandbox/xint/.gitignore (contents, props changed)
   sandbox/xint/boost/xint/detail/
   sandbox/xint/boost/xint/detail/addsubtract.cpp (contents, props changed)
   sandbox/xint/boost/xint/detail/andorxor.cpp (contents, props changed)
   sandbox/xint/boost/xint/detail/bitfunctions.cpp (contents, props changed)
   sandbox/xint/boost/xint/detail/bitqueue.hpp (contents, props changed)
   sandbox/xint/boost/xint/detail/compare.cpp (contents, props changed)
   sandbox/xint/boost/xint/detail/convert.cpp (contents, props changed)
   sandbox/xint/boost/xint/detail/data_t.cpp (contents, props changed)
   sandbox/xint/boost/xint/detail/divide.cpp (contents, props changed)
   sandbox/xint/boost/xint/detail/gcd.cpp (contents, props changed)
   sandbox/xint/boost/xint/detail/internals.hpp (contents, props changed)
   sandbox/xint/boost/xint/detail/modular.cpp (contents, props changed)
   sandbox/xint/boost/xint/detail/monty.cpp (contents, props changed)
   sandbox/xint/boost/xint/detail/monty.hpp (contents, props changed)
   sandbox/xint/boost/xint/detail/multiply.cpp (contents, props changed)
   sandbox/xint/boost/xint/detail/powers.cpp (contents, props changed)
   sandbox/xint/boost/xint/detail/prime.cpp (contents, props changed)
   sandbox/xint/boost/xint/detail/random.cpp (contents, props changed)
   sandbox/xint/boost/xint/detail/roots.cpp (contents, props changed)
   sandbox/xint/boost/xint/detail/shift.cpp (contents, props changed)
   sandbox/xint/dev/
   sandbox/xint/dev-ms/
   sandbox/xint/dev-ms/XInt.sln (contents, props changed)
   sandbox/xint/dev-ms/XInt.vcproj (contents, props changed)
   sandbox/xint/dev/Docs.project (contents, props changed)
   sandbox/xint/dev/Example-Exceptions.project (contents, props changed)
   sandbox/xint/dev/Example-Fibonacci.project (contents, props changed)
   sandbox/xint/dev/Example-GenPrime.project (contents, props changed)
   sandbox/xint/dev/XInt.project (contents, props changed)
   sandbox/xint/dev/XInt.workspace (contents, props changed)
   sandbox/xint/libs/
   sandbox/xint/libs/xint/
   sandbox/xint/libs/xint/doc/
   sandbox/xint/libs/xint/doc/acknowledgements.html (contents, props changed)
   sandbox/xint/libs/xint/doc/acknowledgements_8dox.html (contents, props changed)
   sandbox/xint/libs/xint/doc/addsubtract_8cpp.html (contents, props changed)
   sandbox/xint/libs/xint/doc/addsubtract_8cpp_source.html (contents, props changed)
   sandbox/xint/libs/xint/doc/andorxor_8cpp.html (contents, props changed)
   sandbox/xint/libs/xint/doc/andorxor_8cpp_source.html (contents, props changed)
   sandbox/xint/libs/xint/doc/annotated.html (contents, props changed)
   sandbox/xint/libs/xint/doc/bitfunctions_8cpp.html (contents, props changed)
   sandbox/xint/libs/xint/doc/bitfunctions_8cpp_source.html (contents, props changed)
   sandbox/xint/libs/xint/doc/bitqueue_8hpp.html (contents, props changed)
   sandbox/xint/libs/xint/doc/bitqueue_8hpp_source.html (contents, props changed)
   sandbox/xint/libs/xint/doc/classboost_1_1xint_1_1any__integer.html (contents, props changed)
   sandbox/xint/libs/xint/doc/classboost_1_1xint_1_1any__integer.png (contents, props changed)
   sandbox/xint/libs/xint/doc/classboost_1_1xint_1_1base__divide__t-members.html (contents, props changed)
   sandbox/xint/libs/xint/doc/classboost_1_1xint_1_1base__divide__t.html (contents, props changed)
   sandbox/xint/libs/xint/doc/classboost_1_1xint_1_1default__random__generator-members.html (contents, props changed)
   sandbox/xint/libs/xint/doc/classboost_1_1xint_1_1default__random__generator.html (contents, props changed)
   sandbox/xint/libs/xint/doc/classboost_1_1xint_1_1exceptions_1_1cannot__represent-members.html (contents, props changed)
   sandbox/xint/libs/xint/doc/classboost_1_1xint_1_1exceptions_1_1cannot__represent.html (contents, props changed)
   sandbox/xint/libs/xint/doc/classboost_1_1xint_1_1exceptions_1_1divide__by__zero-members.html (contents, props changed)
   sandbox/xint/libs/xint/doc/classboost_1_1xint_1_1exceptions_1_1divide__by__zero.html (contents, props changed)
   sandbox/xint/libs/xint/doc/classboost_1_1xint_1_1exceptions_1_1invalid__argument-members.html (contents, props changed)
   sandbox/xint/libs/xint/doc/classboost_1_1xint_1_1exceptions_1_1invalid__argument.html (contents, props changed)
   sandbox/xint/libs/xint/doc/classboost_1_1xint_1_1exceptions_1_1invalid__base-members.html (contents, props changed)
   sandbox/xint/libs/xint/doc/classboost_1_1xint_1_1exceptions_1_1invalid__base.html (contents, props changed)
   sandbox/xint/libs/xint/doc/classboost_1_1xint_1_1exceptions_1_1invalid__digit-members.html (contents, props changed)
   sandbox/xint/libs/xint/doc/classboost_1_1xint_1_1exceptions_1_1invalid__digit.html (contents, props changed)
   sandbox/xint/libs/xint/doc/classboost_1_1xint_1_1exceptions_1_1invalid__modulus-members.html (contents, props changed)
   sandbox/xint/libs/xint/doc/classboost_1_1xint_1_1exceptions_1_1invalid__modulus.html (contents, props changed)
   sandbox/xint/libs/xint/doc/classboost_1_1xint_1_1exceptions_1_1no__strong__random-members.html (contents, props changed)
   sandbox/xint/libs/xint/doc/classboost_1_1xint_1_1exceptions_1_1no__strong__random.html (contents, props changed)
   sandbox/xint/libs/xint/doc/classboost_1_1xint_1_1exceptions_1_1not__a__number-members.html (contents, props changed)
   sandbox/xint/libs/xint/doc/classboost_1_1xint_1_1exceptions_1_1not__a__number.html (contents, props changed)
   sandbox/xint/libs/xint/doc/classboost_1_1xint_1_1exceptions_1_1overflow__error-members.html (contents, props changed)
   sandbox/xint/libs/xint/doc/classboost_1_1xint_1_1exceptions_1_1overflow__error.html (contents, props changed)
   sandbox/xint/libs/xint/doc/classboost_1_1xint_1_1exceptions_1_1too__big-members.html (contents, props changed)
   sandbox/xint/libs/xint/doc/classboost_1_1xint_1_1exceptions_1_1too__big.html (contents, props changed)
   sandbox/xint/libs/xint/doc/classboost_1_1xint_1_1fixed__integer-members.html (contents, props changed)
   sandbox/xint/libs/xint/doc/classboost_1_1xint_1_1fixed__integer.html (contents, props changed)
   sandbox/xint/libs/xint/doc/classboost_1_1xint_1_1fixed__integer.png (contents, props changed)
   sandbox/xint/libs/xint/doc/classboost_1_1xint_1_1integer__t-members.html (contents, props changed)
   sandbox/xint/libs/xint/doc/classboost_1_1xint_1_1integer__t.html (contents, props changed)
   sandbox/xint/libs/xint/doc/classboost_1_1xint_1_1integer__t.png (contents, props changed)
   sandbox/xint/libs/xint/doc/classboost_1_1xint_1_1nothrow__integer__t-members.html (contents, props changed)
   sandbox/xint/libs/xint/doc/classboost_1_1xint_1_1nothrow__integer__t.html (contents, props changed)
   sandbox/xint/libs/xint/doc/classboost_1_1xint_1_1nothrow__integer__t.png (contents, props changed)
   sandbox/xint/libs/xint/doc/classdisable__boost__rv__ref.html (contents, props changed)
   sandbox/xint/libs/xint/doc/classes.html (contents, props changed)
   sandbox/xint/libs/xint/doc/classstd_1_1numeric__limits_3_01boost_1_1xint_1_1fixed__integer_3_01_bits_00_01_alloc_00_01_threadsafe_00_01_secure_01_4_01_4.html (contents, props changed)
   sandbox/xint/libs/xint/doc/classstd_1_1numeric__limits_3_01boost_1_1xint_1_1fixed__integer_3_01_bits_00_01_alloc_00_01_threc5961e8032f57408bb0726e8442647e9.html (contents, props changed)
   sandbox/xint/libs/xint/doc/classstd_1_1numeric__limits_3_01boost_1_1xint_1_1integer_01_4-members.html (contents, props changed)
   sandbox/xint/libs/xint/doc/classstd_1_1numeric__limits_3_01boost_1_1xint_1_1integer_01_4.html (contents, props changed)
   sandbox/xint/libs/xint/doc/classstd_1_1numeric__limits_3_01boost_1_1xint_1_1nothrow__integer_01_4-members.html (contents, props changed)
   sandbox/xint/libs/xint/doc/classstd_1_1numeric__limits_3_01boost_1_1xint_1_1nothrow__integer_01_4.html (contents, props changed)
   sandbox/xint/libs/xint/doc/compare_8cpp.html (contents, props changed)
   sandbox/xint/libs/xint/doc/compare_8cpp_source.html (contents, props changed)
   sandbox/xint/libs/xint/doc/complexity.html (contents, props changed)
   sandbox/xint/libs/xint/doc/complexity_8dox.html (contents, props changed)
   sandbox/xint/libs/xint/doc/convert_8cpp.html (contents, props changed)
   sandbox/xint/libs/xint/doc/convert_8cpp_source.html (contents, props changed)
   sandbox/xint/libs/xint/doc/copyonwrite_8dox.html (contents, props changed)
   sandbox/xint/libs/xint/doc/cow.html (contents, props changed)
   sandbox/xint/libs/xint/doc/data__t_8cpp.html (contents, props changed)
   sandbox/xint/libs/xint/doc/data__t_8cpp_source.html (contents, props changed)
   sandbox/xint/libs/xint/doc/dependencies.html (contents, props changed)
   sandbox/xint/libs/xint/doc/dependencies_8dox.html (contents, props changed)
   sandbox/xint/libs/xint/doc/different__types.html (contents, props changed)
   sandbox/xint/libs/xint/doc/divide_8cpp.html (contents, props changed)
   sandbox/xint/libs/xint/doc/divide_8cpp_source.html (contents, props changed)
   sandbox/xint/libs/xint/doc/dox/
   sandbox/xint/libs/xint/doc/dox/Doxyfile (contents, props changed)
   sandbox/xint/libs/xint/doc/dox/acknowledgements.dox (contents, props changed)
   sandbox/xint/libs/xint/doc/dox/complexity.dox (contents, props changed)
   sandbox/xint/libs/xint/doc/dox/copyonwrite.dox (contents, props changed)
   sandbox/xint/libs/xint/doc/dox/dependencies.dox (contents, props changed)
   sandbox/xint/libs/xint/doc/dox/ex_fibonacci.dox (contents, props changed)
      - copied, changed from r61756, /sandbox/xint/doc/dox/ex_fibonacci.dox
   sandbox/xint/libs/xint/doc/dox/exceptions.dox (contents, props changed)
   sandbox/xint/libs/xint/doc/dox/fixed_and_variable.dox (contents, props changed)
   sandbox/xint/libs/xint/doc/dox/history.dox (contents, props changed)
   sandbox/xint/libs/xint/doc/dox/index.dox (contents, props changed)
   sandbox/xint/libs/xint/doc/dox/nan.dox (contents, props changed)
      - copied, changed from r61756, /sandbox/xint/doc/dox/nan.dox
   sandbox/xint/libs/xint/doc/dox/primes.dox (contents, props changed)
      - copied, changed from r61756, /sandbox/xint/doc/dox/primes.dox
   sandbox/xint/libs/xint/doc/dox/r_core.dox (contents, props changed)
   sandbox/xint/libs/xint/doc/dox/r_cow.dox (contents, props changed)
   sandbox/xint/libs/xint/doc/dox/r_exception_blocking.dox (contents, props changed)
   sandbox/xint/libs/xint/doc/dox/r_insecure_default.dox (contents, props changed)
      - copied, changed from r61756, /sandbox/xint/doc/dox/r_insecure_default.dox
   sandbox/xint/libs/xint/doc/dox/r_interface.dox (contents, props changed)
      - copied, changed from r61756, /sandbox/xint/doc/dox/r_interface.dox
   sandbox/xint/libs/xint/doc/dox/r_interface_design_only.dox (contents, props changed)
      - copied, changed from r61756, /sandbox/xint/doc/dox/r_interface_design_only.dox
   sandbox/xint/libs/xint/doc/dox/r_nan.dox (contents, props changed)
      - copied, changed from r61756, /sandbox/xint/doc/dox/r_nan.dox
   sandbox/xint/libs/xint/doc/dox/r_negzero.dox (contents, props changed)
      - copied, changed from r61756, /sandbox/xint/doc/dox/r_negzero.dox
   sandbox/xint/libs/xint/doc/dox/r_nofloats.dox (contents, props changed)
   sandbox/xint/libs/xint/doc/dox/r_random.dox (contents, props changed)
      - copied, changed from r61756, /sandbox/xint/doc/dox/r_random.dox
   sandbox/xint/libs/xint/doc/dox/r_shared_ptr.dox (contents, props changed)
      - copied, changed from r61756, /sandbox/xint/doc/dox/r_shared_ptr.dox
   sandbox/xint/libs/xint/doc/dox/r_toobig.dox (contents, props changed)
   sandbox/xint/libs/xint/doc/dox/random.dox (contents, props changed)
      - copied, changed from r61756, /sandbox/xint/doc/dox/random.dox
   sandbox/xint/libs/xint/doc/dox/rationale.dox (contents, props changed)
   sandbox/xint/libs/xint/doc/dox/testing.dox (contents, props changed)
      - copied, changed from r61756, /sandbox/xint/doc/dox/testing.dox
   sandbox/xint/libs/xint/doc/dox/zero.dox (contents, props changed)
   sandbox/xint/libs/xint/doc/doxygen.css (contents, props changed)
      - copied, changed from r61756, /sandbox/xint/doc/doxygen.css
   sandbox/xint/libs/xint/doc/doxygen.png (contents, props changed)
      - copied, changed from r61756, /sandbox/xint/doc/doxygen.png
   sandbox/xint/libs/xint/doc/ex__fibonacci.html (contents, props changed)
   sandbox/xint/libs/xint/doc/ex__fibonacci_8dox.html (contents, props changed)
   sandbox/xint/libs/xint/doc/exceptions.html (contents, props changed)
   sandbox/xint/libs/xint/doc/exceptions_8dox.html (contents, props changed)
   sandbox/xint/libs/xint/doc/exceptions_8hpp.html (contents, props changed)
   sandbox/xint/libs/xint/doc/exceptions_8hpp_source.html (contents, props changed)
   sandbox/xint/libs/xint/doc/files.html (contents, props changed)
   sandbox/xint/libs/xint/doc/fixed__and__variable_8dox.html (contents, props changed)
   sandbox/xint/libs/xint/doc/fixed__integer_8hpp.html (contents, props changed)
   sandbox/xint/libs/xint/doc/fixed__integer_8hpp_source.html (contents, props changed)
   sandbox/xint/libs/xint/doc/functions.html (contents, props changed)
   sandbox/xint/libs/xint/doc/functions_0x62.html (contents, props changed)
   sandbox/xint/libs/xint/doc/functions_0x63.html (contents, props changed)
   sandbox/xint/libs/xint/doc/functions_0x64.html (contents, props changed)
   sandbox/xint/libs/xint/doc/functions_0x65.html (contents, props changed)
   sandbox/xint/libs/xint/doc/functions_0x66.html (contents, props changed)
   sandbox/xint/libs/xint/doc/functions_0x68.html (contents, props changed)
   sandbox/xint/libs/xint/doc/functions_0x69.html (contents, props changed)
   sandbox/xint/libs/xint/doc/functions_0x6d.html (contents, props changed)
   sandbox/xint/libs/xint/doc/functions_0x6e.html (contents, props changed)
   sandbox/xint/libs/xint/doc/functions_0x6f.html (contents, props changed)
   sandbox/xint/libs/xint/doc/functions_0x70.html (contents, props changed)
   sandbox/xint/libs/xint/doc/functions_0x71.html (contents, props changed)
   sandbox/xint/libs/xint/doc/functions_0x72.html (contents, props changed)
   sandbox/xint/libs/xint/doc/functions_0x73.html (contents, props changed)
   sandbox/xint/libs/xint/doc/functions_0x74.html (contents, props changed)
   sandbox/xint/libs/xint/doc/functions_func.html (contents, props changed)
   sandbox/xint/libs/xint/doc/functions_type.html (contents, props changed)
   sandbox/xint/libs/xint/doc/functions_vars.html (contents, props changed)
   sandbox/xint/libs/xint/doc/gcd_8cpp.html (contents, props changed)
   sandbox/xint/libs/xint/doc/gcd_8cpp_source.html (contents, props changed)
   sandbox/xint/libs/xint/doc/globals.html (contents, props changed)
   sandbox/xint/libs/xint/doc/globals_defs.html (contents, props changed)
   sandbox/xint/libs/xint/doc/hierarchy.html (contents, props changed)
   sandbox/xint/libs/xint/doc/history.html (contents, props changed)
   sandbox/xint/libs/xint/doc/history_8dox.html (contents, props changed)
   sandbox/xint/libs/xint/doc/index.html (contents, props changed)
   sandbox/xint/libs/xint/doc/index_8dox.html (contents, props changed)
   sandbox/xint/libs/xint/doc/integer_8hpp.html (contents, props changed)
   sandbox/xint/libs/xint/doc/integer_8hpp_source.html (contents, props changed)
   sandbox/xint/libs/xint/doc/internals_8hpp.html (contents, props changed)
   sandbox/xint/libs/xint/doc/internals_8hpp_source.html (contents, props changed)
   sandbox/xint/libs/xint/doc/modular_8cpp.html (contents, props changed)
   sandbox/xint/libs/xint/doc/modular_8cpp_source.html (contents, props changed)
   sandbox/xint/libs/xint/doc/monty_8cpp.html (contents, props changed)
   sandbox/xint/libs/xint/doc/monty_8cpp_source.html (contents, props changed)
   sandbox/xint/libs/xint/doc/monty_8hpp.html (contents, props changed)
   sandbox/xint/libs/xint/doc/monty_8hpp_source.html (contents, props changed)
   sandbox/xint/libs/xint/doc/multiply_8cpp.html (contents, props changed)
   sandbox/xint/libs/xint/doc/multiply_8cpp_source.html (contents, props changed)
   sandbox/xint/libs/xint/doc/namespaceboost.html (contents, props changed)
   sandbox/xint/libs/xint/doc/namespaceboost_1_1xint.html (contents, props changed)
   sandbox/xint/libs/xint/doc/namespaceboost_1_1xint_1_1detail.html (contents, props changed)
   sandbox/xint/libs/xint/doc/namespaceboost_1_1xint_1_1exceptions.html (contents, props changed)
   sandbox/xint/libs/xint/doc/namespacemembers.html (contents, props changed)
   sandbox/xint/libs/xint/doc/namespacemembers_func.html (contents, props changed)
   sandbox/xint/libs/xint/doc/namespacemembers_type.html (contents, props changed)
   sandbox/xint/libs/xint/doc/namespacemembers_vars.html (contents, props changed)
   sandbox/xint/libs/xint/doc/namespaces.html (contents, props changed)
   sandbox/xint/libs/xint/doc/namespacestd.html (contents, props changed)
   sandbox/xint/libs/xint/doc/nan.html (contents, props changed)
   sandbox/xint/libs/xint/doc/nan_8dox.html (contents, props changed)
   sandbox/xint/libs/xint/doc/nothrow__integer_8hpp.html (contents, props changed)
   sandbox/xint/libs/xint/doc/nothrow__integer_8hpp_source.html (contents, props changed)
   sandbox/xint/libs/xint/doc/powers_8cpp.html (contents, props changed)
   sandbox/xint/libs/xint/doc/powers_8cpp_source.html (contents, props changed)
   sandbox/xint/libs/xint/doc/prime_8cpp.html (contents, props changed)
   sandbox/xint/libs/xint/doc/prime_8cpp_source.html (contents, props changed)
   sandbox/xint/libs/xint/doc/primes.html (contents, props changed)
   sandbox/xint/libs/xint/doc/primes_8dox.html (contents, props changed)
   sandbox/xint/libs/xint/doc/r__core.html (contents, props changed)
   sandbox/xint/libs/xint/doc/r__core_8dox.html (contents, props changed)
   sandbox/xint/libs/xint/doc/r__cow.html (contents, props changed)
   sandbox/xint/libs/xint/doc/r__cow_8dox.html (contents, props changed)
   sandbox/xint/libs/xint/doc/r__exception__blocking.html (contents, props changed)
   sandbox/xint/libs/xint/doc/r__exception__blocking_8dox.html (contents, props changed)
   sandbox/xint/libs/xint/doc/r__insecure__default.html (contents, props changed)
   sandbox/xint/libs/xint/doc/r__insecure__default_8dox.html (contents, props changed)
   sandbox/xint/libs/xint/doc/r__interface.html (contents, props changed)
   sandbox/xint/libs/xint/doc/r__interface_8dox.html (contents, props changed)
   sandbox/xint/libs/xint/doc/r__interface__design__only.html (contents, props changed)
   sandbox/xint/libs/xint/doc/r__interface__design__only_8dox.html (contents, props changed)
   sandbox/xint/libs/xint/doc/r__nan.html (contents, props changed)
   sandbox/xint/libs/xint/doc/r__nan_8dox.html (contents, props changed)
   sandbox/xint/libs/xint/doc/r__negzero.html (contents, props changed)
   sandbox/xint/libs/xint/doc/r__negzero_8dox.html (contents, props changed)
   sandbox/xint/libs/xint/doc/r__no__floats.html (contents, props changed)
   sandbox/xint/libs/xint/doc/r__nofloats_8dox.html (contents, props changed)
   sandbox/xint/libs/xint/doc/r__random.html (contents, props changed)
   sandbox/xint/libs/xint/doc/r__random_8dox.html (contents, props changed)
   sandbox/xint/libs/xint/doc/r__shared__ptr.html (contents, props changed)
   sandbox/xint/libs/xint/doc/r__shared__ptr_8dox.html (contents, props changed)
   sandbox/xint/libs/xint/doc/r__too__big.html (contents, props changed)
   sandbox/xint/libs/xint/doc/r__toobig_8dox.html (contents, props changed)
   sandbox/xint/libs/xint/doc/random.html (contents, props changed)
   sandbox/xint/libs/xint/doc/random_8cpp.html (contents, props changed)
   sandbox/xint/libs/xint/doc/random_8cpp_source.html (contents, props changed)
   sandbox/xint/libs/xint/doc/random_8dox.html (contents, props changed)
   sandbox/xint/libs/xint/doc/random_8hpp.html (contents, props changed)
   sandbox/xint/libs/xint/doc/random_8hpp_source.html (contents, props changed)
   sandbox/xint/libs/xint/doc/rationale.html (contents, props changed)
   sandbox/xint/libs/xint/doc/rationale_8dox.html (contents, props changed)
   sandbox/xint/libs/xint/doc/roots_8cpp.html (contents, props changed)
   sandbox/xint/libs/xint/doc/roots_8cpp_source.html (contents, props changed)
   sandbox/xint/libs/xint/doc/shift_8cpp.html (contents, props changed)
   sandbox/xint/libs/xint/doc/shift_8cpp_source.html (contents, props changed)
   sandbox/xint/libs/xint/doc/tab_b.gif (contents, props changed)
      - copied, changed from r61756, /sandbox/xint/doc/doxygen/html/tab_b.gif
   sandbox/xint/libs/xint/doc/tab_l.gif (contents, props changed)
      - copied, changed from r61756, /sandbox/xint/doc/doxygen/html/tab_l.gif
   sandbox/xint/libs/xint/doc/tab_r.gif (contents, props changed)
      - copied, changed from r61756, /sandbox/xint/doc/doxygen/html/tab_r.gif
   sandbox/xint/libs/xint/doc/tabs.css (contents, props changed)
      - copied, changed from r61756, /sandbox/xint/doc/doxygen/html/tabs.css
   sandbox/xint/libs/xint/doc/testing.html (contents, props changed)
   sandbox/xint/libs/xint/doc/testing_8dox.html (contents, props changed)
   sandbox/xint/libs/xint/doc/xint_8hpp.html (contents, props changed)
   sandbox/xint/libs/xint/doc/xint_8hpp_source.html (contents, props changed)
   sandbox/xint/libs/xint/doc/zero.html (contents, props changed)
   sandbox/xint/libs/xint/doc/zero_8dox.html (contents, props changed)
   sandbox/xint/libs/xint/example/
   sandbox/xint/libs/xint/example/exceptions.cpp (contents, props changed)
      - copied, changed from r61756, /sandbox/xint/example/exceptions.cpp
   sandbox/xint/libs/xint/example/fibonacci.cpp (contents, props changed)
      - copied, changed from r61756, /sandbox/xint/example/fibonacci.cpp
   sandbox/xint/libs/xint/example/genprime.cpp (contents, props changed)
   sandbox/xint/libs/xint/index.html (contents, props changed)
      - copied, changed from r61756, /sandbox/xint/index.html
   sandbox/xint/libs/xint/test/
   sandbox/xint/libs/xint/test/Jamfile (contents, props changed)
   sandbox/xint/libs/xint/test/test_add.cpp (contents, props changed)
   sandbox/xint/libs/xint/test/test_bit_manipulations.cpp (contents, props changed)
   sandbox/xint/libs/xint/test/test_compare.cpp (contents, props changed)
   sandbox/xint/libs/xint/test/test_convert.cpp (contents, props changed)
   sandbox/xint/libs/xint/test/test_divide.cpp (contents, props changed)
   sandbox/xint/libs/xint/test/test_fixed.cpp (contents, props changed)
   sandbox/xint/libs/xint/test/test_main.cpp (contents, props changed)
   sandbox/xint/libs/xint/test/test_misc.cpp (contents, props changed)
   sandbox/xint/libs/xint/test/test_modular.cpp (contents, props changed)
   sandbox/xint/libs/xint/test/test_monty.cpp (contents, props changed)
   sandbox/xint/libs/xint/test/test_multiply.cpp (contents, props changed)
   sandbox/xint/libs/xint/test/test_nothrow.cpp (contents, props changed)
   sandbox/xint/libs/xint/test/test_powers.cpp (contents, props changed)
   sandbox/xint/libs/xint/test/test_streams.cpp (contents, props changed)
Removed:
   sandbox/xint/PERFORMANCE TESTING.txt
   sandbox/xint/boost/xint/internals.hpp
   sandbox/xint/boost/xint/monty.hpp
   sandbox/xint/build/Jamfile.v2
   sandbox/xint/doc/acknowledgements.html
   sandbox/xint/doc/acknowledgements_8dox.html
   sandbox/xint/doc/annotated.html
   sandbox/xint/doc/base__integer_8cpp.html
   sandbox/xint/doc/base__integer_8cpp_source.html
   sandbox/xint/doc/bit__manipulations_8cpp.html
   sandbox/xint/doc/bit__manipulations_8cpp_source.html
   sandbox/xint/doc/classboost_1_1xint_1_1base__divide__t-members.html
   sandbox/xint/doc/classboost_1_1xint_1_1base__divide__t.html
   sandbox/xint/doc/classboost_1_1xint_1_1default__random__generator-members.html
   sandbox/xint/doc/classboost_1_1xint_1_1default__random__generator.html
   sandbox/xint/doc/classboost_1_1xint_1_1exceptions_1_1cannot__represent-members.html
   sandbox/xint/doc/classboost_1_1xint_1_1exceptions_1_1cannot__represent.html
   sandbox/xint/doc/classboost_1_1xint_1_1exceptions_1_1divide__by__zero-members.html
   sandbox/xint/doc/classboost_1_1xint_1_1exceptions_1_1divide__by__zero.html
   sandbox/xint/doc/classboost_1_1xint_1_1exceptions_1_1invalid__argument-members.html
   sandbox/xint/doc/classboost_1_1xint_1_1exceptions_1_1invalid__argument.html
   sandbox/xint/doc/classboost_1_1xint_1_1exceptions_1_1invalid__base-members.html
   sandbox/xint/doc/classboost_1_1xint_1_1exceptions_1_1invalid__base.html
   sandbox/xint/doc/classboost_1_1xint_1_1exceptions_1_1invalid__digit-members.html
   sandbox/xint/doc/classboost_1_1xint_1_1exceptions_1_1invalid__digit.html
   sandbox/xint/doc/classboost_1_1xint_1_1exceptions_1_1invalid__modulus-members.html
   sandbox/xint/doc/classboost_1_1xint_1_1exceptions_1_1invalid__modulus.html
   sandbox/xint/doc/classboost_1_1xint_1_1exceptions_1_1no__strong__random-members.html
   sandbox/xint/doc/classboost_1_1xint_1_1exceptions_1_1no__strong__random.html
   sandbox/xint/doc/classboost_1_1xint_1_1exceptions_1_1not__a__number-members.html
   sandbox/xint/doc/classboost_1_1xint_1_1exceptions_1_1not__a__number.html
   sandbox/xint/doc/classboost_1_1xint_1_1exceptions_1_1overflow__error-members.html
   sandbox/xint/doc/classboost_1_1xint_1_1exceptions_1_1overflow__error.html
   sandbox/xint/doc/classboost_1_1xint_1_1exceptions_1_1too__big-members.html
   sandbox/xint/doc/classboost_1_1xint_1_1exceptions_1_1too__big.html
   sandbox/xint/doc/classboost_1_1xint_1_1fixed__integer-members.html
   sandbox/xint/doc/classboost_1_1xint_1_1fixed__integer.html
   sandbox/xint/doc/classboost_1_1xint_1_1fixed__integer.png
   sandbox/xint/doc/classboost_1_1xint_1_1fixed__integer__any-members.html
   sandbox/xint/doc/classboost_1_1xint_1_1fixed__integer__any.html
   sandbox/xint/doc/classboost_1_1xint_1_1fixed__integer__any.png
   sandbox/xint/doc/classboost_1_1xint_1_1integer-members.html
   sandbox/xint/doc/classboost_1_1xint_1_1integer.html
   sandbox/xint/doc/classboost_1_1xint_1_1nothrow__integer-members.html
   sandbox/xint/doc/classboost_1_1xint_1_1nothrow__integer.html
   sandbox/xint/doc/classboost_1_1xint_1_1strong__random__generator-members.html
   sandbox/xint/doc/classboost_1_1xint_1_1strong__random__generator.html
   sandbox/xint/doc/classdisable__boost__rv__ref.html
   sandbox/xint/doc/classes.html
   sandbox/xint/doc/classstd_1_1numeric__limits_3_01boost_1_1xint_1_1fixed__integer_3_01_bits_01_4_01_4-members.html
   sandbox/xint/doc/classstd_1_1numeric__limits_3_01boost_1_1xint_1_1fixed__integer_3_01_bits_01_4_01_4.html
   sandbox/xint/doc/classstd_1_1numeric__limits_3_01boost_1_1xint_1_1integer_01_4-members.html
   sandbox/xint/doc/classstd_1_1numeric__limits_3_01boost_1_1xint_1_1integer_01_4.html
   sandbox/xint/doc/classstd_1_1numeric__limits_3_01boost_1_1xint_1_1nothrow__integer_01_4-members.html
   sandbox/xint/doc/classstd_1_1numeric__limits_3_01boost_1_1xint_1_1nothrow__integer_01_4.html
   sandbox/xint/doc/compare_8cpp.html
   sandbox/xint/doc/compare_8cpp_source.html
   sandbox/xint/doc/complexity.html
   sandbox/xint/doc/complexity_8dox.html
   sandbox/xint/doc/convert_8cpp.html
   sandbox/xint/doc/convert_8cpp_source.html
   sandbox/xint/doc/copyonwrite_8dox.html
   sandbox/xint/doc/cow.html
   sandbox/xint/doc/data__t_8cpp.html
   sandbox/xint/doc/data__t_8cpp_source.html
   sandbox/xint/doc/dependencies.html
   sandbox/xint/doc/dependencies_8dox.html
   sandbox/xint/doc/dox/Doxyfile
   sandbox/xint/doc/dox/acknowledgements.dox
   sandbox/xint/doc/dox/complexity.dox
   sandbox/xint/doc/dox/copyonwrite.dox
   sandbox/xint/doc/dox/dependencies.dox
   sandbox/xint/doc/dox/ex_fibonacci.dox
   sandbox/xint/doc/dox/exceptions.dox
   sandbox/xint/doc/dox/fixed_and_variable.dox
   sandbox/xint/doc/dox/history.dox
   sandbox/xint/doc/dox/index.dox
   sandbox/xint/doc/dox/nan.dox
   sandbox/xint/doc/dox/primes.dox
   sandbox/xint/doc/dox/r_core.dox
   sandbox/xint/doc/dox/r_cow.dox
   sandbox/xint/doc/dox/r_exception_blocking.dox
   sandbox/xint/doc/dox/r_insecure_default.dox
   sandbox/xint/doc/dox/r_interface.dox
   sandbox/xint/doc/dox/r_interface_design_only.dox
   sandbox/xint/doc/dox/r_nan.dox
   sandbox/xint/doc/dox/r_negzero.dox
   sandbox/xint/doc/dox/r_random.dox
   sandbox/xint/doc/dox/r_shared_ptr.dox
   sandbox/xint/doc/dox/random.dox
   sandbox/xint/doc/dox/rationale.dox
   sandbox/xint/doc/dox/securemode.dox
   sandbox/xint/doc/dox/testing.dox
   sandbox/xint/doc/dox/threadsafe.dox
   sandbox/xint/doc/dox/zero.dox
   sandbox/xint/doc/doxygen.css
   sandbox/xint/doc/doxygen.png
   sandbox/xint/doc/doxygen/Doxyfile.txt
   sandbox/xint/doc/doxygen/blurbs.css
   sandbox/xint/doc/doxygen/doxywarn.log
   sandbox/xint/doc/doxygen/html/annotated.html
   sandbox/xint/doc/doxygen/html/bit__manipulations_8cpp.html
   sandbox/xint/doc/doxygen/html/bit__manipulations_8cpp_source.html
   sandbox/xint/doc/doxygen/html/classes.html
   sandbox/xint/doc/doxygen/html/classxint_1_1divide__by__zero-members.html
   sandbox/xint/doc/doxygen/html/classxint_1_1divide__by__zero.html
   sandbox/xint/doc/doxygen/html/classxint_1_1integer-members.html
   sandbox/xint/doc/doxygen/html/classxint_1_1integer.html
   sandbox/xint/doc/doxygen/html/classxint_1_1invalid__base-members.html
   sandbox/xint/doc/doxygen/html/classxint_1_1invalid__base.html
   sandbox/xint/doc/doxygen/html/classxint_1_1invalid__digit-members.html
   sandbox/xint/doc/doxygen/html/classxint_1_1invalid__digit.html
   sandbox/xint/doc/doxygen/html/classxint_1_1invalid__modulus-members.html
   sandbox/xint/doc/doxygen/html/classxint_1_1invalid__modulus.html
   sandbox/xint/doc/doxygen/html/classxint_1_1not__a__number-members.html
   sandbox/xint/doc/doxygen/html/classxint_1_1not__a__number.html
   sandbox/xint/doc/doxygen/html/classxint_1_1too__big-members.html
   sandbox/xint/doc/doxygen/html/classxint_1_1too__big.html
   sandbox/xint/doc/doxygen/html/compare_8cpp.html
   sandbox/xint/doc/doxygen/html/compare_8cpp_source.html
   sandbox/xint/doc/doxygen/html/convert_8cpp.html
   sandbox/xint/doc/doxygen/html/convert_8cpp_source.html
   sandbox/xint/doc/doxygen/html/data__t_8cpp.html
   sandbox/xint/doc/doxygen/html/data__t_8cpp_source.html
   sandbox/xint/doc/doxygen/html/doxygen.png
   sandbox/xint/doc/doxygen/html/exception__blocker_8cpp.html
   sandbox/xint/doc/doxygen/html/exception__blocker_8cpp_source.html
   sandbox/xint/doc/doxygen/html/files.html
   sandbox/xint/doc/doxygen/html/functions.html
   sandbox/xint/doc/doxygen/html/functions_func.html
   sandbox/xint/doc/doxygen/html/functions_vars.html
   sandbox/xint/doc/doxygen/html/gcd_8cpp.html
   sandbox/xint/doc/doxygen/html/gcd_8cpp_source.html
   sandbox/xint/doc/doxygen/html/globals.html
   sandbox/xint/doc/doxygen/html/globals_defs.html
   sandbox/xint/doc/doxygen/html/globals_func.html
   sandbox/xint/doc/doxygen/html/globals_vars.html
   sandbox/xint/doc/doxygen/html/index.html
   sandbox/xint/doc/doxygen/html/integer_8cpp.html
   sandbox/xint/doc/doxygen/html/integer_8cpp_source.html
   sandbox/xint/doc/doxygen/html/misc_8cpp.html
   sandbox/xint/doc/doxygen/html/misc_8cpp_source.html
   sandbox/xint/doc/doxygen/html/modular_8cpp.html
   sandbox/xint/doc/doxygen/html/modular_8cpp_source.html
   sandbox/xint/doc/doxygen/html/monty_8cpp.html
   sandbox/xint/doc/doxygen/html/monty_8cpp_source.html
   sandbox/xint/doc/doxygen/html/my_doxygen.css
   sandbox/xint/doc/doxygen/html/namespacedetail.html
   sandbox/xint/doc/doxygen/html/namespacedetail_1_1xint.html
   sandbox/xint/doc/doxygen/html/namespacemembers.html
   sandbox/xint/doc/doxygen/html/namespacemembers_func.html
   sandbox/xint/doc/doxygen/html/namespacemembers_type.html
   sandbox/xint/doc/doxygen/html/namespacemembers_vars.html
   sandbox/xint/doc/doxygen/html/namespaces.html
   sandbox/xint/doc/doxygen/html/namespacexint.html
   sandbox/xint/doc/doxygen/html/namespacexint_1_1detail.html
   sandbox/xint/doc/doxygen/html/operators_8cpp.html
   sandbox/xint/doc/doxygen/html/operators_8cpp_source.html
   sandbox/xint/doc/doxygen/html/powers_8cpp.html
   sandbox/xint/doc/doxygen/html/powers_8cpp_source.html
   sandbox/xint/doc/doxygen/html/primes_8cpp.html
   sandbox/xint/doc/doxygen/html/primes_8cpp_source.html
   sandbox/xint/doc/doxygen/html/primitives_8cpp.html
   sandbox/xint/doc/doxygen/html/primitives_8cpp_source.html
   sandbox/xint/doc/doxygen/html/random_8cpp.html
   sandbox/xint/doc/doxygen/html/random_8cpp_source.html
   sandbox/xint/doc/doxygen/html/roots_8cpp.html
   sandbox/xint/doc/doxygen/html/roots_8cpp_source.html
   sandbox/xint/doc/doxygen/html/structxint_1_1detail_1_1data__t-members.html
   sandbox/xint/doc/doxygen/html/structxint_1_1detail_1_1data__t.html
   sandbox/xint/doc/doxygen/html/structxint_1_1detail_1_1data__t_1_1_quick_digits-members.html
   sandbox/xint/doc/doxygen/html/structxint_1_1detail_1_1data__t_1_1_quick_digits.html
   sandbox/xint/doc/doxygen/html/structxint_1_1detail_1_1token.html
   sandbox/xint/doc/doxygen/html/tab_b.gif
   sandbox/xint/doc/doxygen/html/tab_l.gif
   sandbox/xint/doc/doxygen/html/tab_r.gif
   sandbox/xint/doc/doxygen/html/tabs.css
   sandbox/xint/doc/doxygen/html/xint_8hpp.html
   sandbox/xint/doc/doxygen/html/xint_8hpp_source.html
   sandbox/xint/doc/doxygen/html/xint__data__t_8hpp.html
   sandbox/xint/doc/doxygen/html/xint__data__t_8hpp_source.html
   sandbox/xint/doc/doxygen/html/xint__fibonacci_8cpp.html
   sandbox/xint/doc/doxygen/html/xint__fibonacci_8cpp_source.html
   sandbox/xint/doc/doxygen/html/xint__monty_8hpp.html
   sandbox/xint/doc/doxygen/html/xint__monty_8hpp_source.html
   sandbox/xint/doc/doxygen/html/xint__simple_8cpp.html
   sandbox/xint/doc/doxygen/html/xint__simple_8cpp_source.html
   sandbox/xint/doc/doxygen/html/xint__test_8hpp.html
   sandbox/xint/doc/doxygen/html/xint__test_8hpp_source.html
   sandbox/xint/doc/doxygen/images/Written_for_Boost.png
   sandbox/xint/doc/doxygen/images/boost_in_mind.png
   sandbox/xint/doc/doxygen/images/draft.png
   sandbox/xint/doc/doxygen/images/proposed_boost.png
   sandbox/xint/doc/doxygen/tabs.css
   sandbox/xint/doc/doxygen/xint_doxygen.css
   sandbox/xint/doc/doxygen/xint_doxygen_footer.html
   sandbox/xint/doc/doxygen/xint_doxygen_header.html
   sandbox/xint/doc/ex__fibonacci.html
   sandbox/xint/doc/ex__fibonacci_8dox.html
   sandbox/xint/doc/exceptions.html
   sandbox/xint/doc/exceptions_8dox.html
   sandbox/xint/doc/exceptions_8hpp.html
   sandbox/xint/doc/exceptions_8hpp_source.html
   sandbox/xint/doc/files.html
   sandbox/xint/doc/fixed__and__variable.html
   sandbox/xint/doc/fixed__and__variable_8dox.html
   sandbox/xint/doc/fixed__integer_8hpp.html
   sandbox/xint/doc/fixed__integer_8hpp_source.html
   sandbox/xint/doc/functions.html
   sandbox/xint/doc/functions_0x62.html
   sandbox/xint/doc/functions_0x63.html
   sandbox/xint/doc/functions_0x64.html
   sandbox/xint/doc/functions_0x65.html
   sandbox/xint/doc/functions_0x66.html
   sandbox/xint/doc/functions_0x68.html
   sandbox/xint/doc/functions_0x69.html
   sandbox/xint/doc/functions_0x6d.html
   sandbox/xint/doc/functions_0x6e.html
   sandbox/xint/doc/functions_0x6f.html
   sandbox/xint/doc/functions_0x71.html
   sandbox/xint/doc/functions_0x72.html
   sandbox/xint/doc/functions_0x73.html
   sandbox/xint/doc/functions_0x74.html
   sandbox/xint/doc/functions_0x7a.html
   sandbox/xint/doc/functions_0x7e.html
   sandbox/xint/doc/functions_func.html
   sandbox/xint/doc/functions_type.html
   sandbox/xint/doc/functions_vars.html
   sandbox/xint/doc/gcd_8cpp.html
   sandbox/xint/doc/gcd_8cpp_source.html
   sandbox/xint/doc/globals.html
   sandbox/xint/doc/globals_defs.html
   sandbox/xint/doc/hierarchy.html
   sandbox/xint/doc/history.html
   sandbox/xint/doc/history_8dox.html
   sandbox/xint/doc/index.html
   sandbox/xint/doc/index_8dox.html
   sandbox/xint/doc/integer_8cpp.html
   sandbox/xint/doc/integer_8cpp_source.html
   sandbox/xint/doc/integer_8hpp.html
   sandbox/xint/doc/integer_8hpp_source.html
   sandbox/xint/doc/internals_8hpp.html
   sandbox/xint/doc/internals_8hpp_source.html
   sandbox/xint/doc/misc_8cpp.html
   sandbox/xint/doc/misc_8cpp_source.html
   sandbox/xint/doc/modular_8cpp.html
   sandbox/xint/doc/modular_8cpp_source.html
   sandbox/xint/doc/monty_8cpp.html
   sandbox/xint/doc/monty_8cpp_source.html
   sandbox/xint/doc/monty_8hpp.html
   sandbox/xint/doc/monty_8hpp_source.html
   sandbox/xint/doc/namespaceboost.html
   sandbox/xint/doc/namespaceboost_1_1xint.html
   sandbox/xint/doc/namespaceboost_1_1xint_1_1detail.html
   sandbox/xint/doc/namespaceboost_1_1xint_1_1exceptions.html
   sandbox/xint/doc/namespacemembers.html
   sandbox/xint/doc/namespacemembers_func.html
   sandbox/xint/doc/namespacemembers_type.html
   sandbox/xint/doc/namespacemembers_vars.html
   sandbox/xint/doc/namespaces.html
   sandbox/xint/doc/namespacestd.html
   sandbox/xint/doc/nan.html
   sandbox/xint/doc/nan_8dox.html
   sandbox/xint/doc/nothrow__bit__manipulations_8cpp.html
   sandbox/xint/doc/nothrow__bit__manipulations_8cpp_source.html
   sandbox/xint/doc/nothrow__compare_8cpp.html
   sandbox/xint/doc/nothrow__compare_8cpp_source.html
   sandbox/xint/doc/nothrow__convert_8cpp.html
   sandbox/xint/doc/nothrow__convert_8cpp_source.html
   sandbox/xint/doc/nothrow__gcd_8cpp.html
   sandbox/xint/doc/nothrow__gcd_8cpp_source.html
   sandbox/xint/doc/nothrow__integer_8cpp.html
   sandbox/xint/doc/nothrow__integer_8cpp_source.html
   sandbox/xint/doc/nothrow__integer_8hpp.html
   sandbox/xint/doc/nothrow__integer_8hpp_source.html
   sandbox/xint/doc/nothrow__misc_8cpp.html
   sandbox/xint/doc/nothrow__misc_8cpp_source.html
   sandbox/xint/doc/nothrow__modular_8cpp.html
   sandbox/xint/doc/nothrow__modular_8cpp_source.html
   sandbox/xint/doc/nothrow__operators_8cpp.html
   sandbox/xint/doc/nothrow__operators_8cpp_source.html
   sandbox/xint/doc/nothrow__powers_8cpp.html
   sandbox/xint/doc/nothrow__powers_8cpp_source.html
   sandbox/xint/doc/nothrow__primes_8cpp.html
   sandbox/xint/doc/nothrow__primes_8cpp_source.html
   sandbox/xint/doc/nothrow__primitives_8cpp.html
   sandbox/xint/doc/nothrow__primitives_8cpp_source.html
   sandbox/xint/doc/nothrow__roots_8cpp.html
   sandbox/xint/doc/nothrow__roots_8cpp_source.html
   sandbox/xint/doc/operators_8cpp.html
   sandbox/xint/doc/operators_8cpp_source.html
   sandbox/xint/doc/powers_8cpp.html
   sandbox/xint/doc/powers_8cpp_source.html
   sandbox/xint/doc/primes.html
   sandbox/xint/doc/primes_8cpp.html
   sandbox/xint/doc/primes_8cpp_source.html
   sandbox/xint/doc/primes_8dox.html
   sandbox/xint/doc/primitives_8cpp.html
   sandbox/xint/doc/primitives_8cpp_source.html
   sandbox/xint/doc/r__core.html
   sandbox/xint/doc/r__core_8dox.html
   sandbox/xint/doc/r__cow.html
   sandbox/xint/doc/r__cow_8dox.html
   sandbox/xint/doc/r__exception__blocking.html
   sandbox/xint/doc/r__exception__blocking_8dox.html
   sandbox/xint/doc/r__insecure__default.html
   sandbox/xint/doc/r__insecure__default_8dox.html
   sandbox/xint/doc/r__interface.html
   sandbox/xint/doc/r__interface_8dox.html
   sandbox/xint/doc/r__interface__design__only.html
   sandbox/xint/doc/r__interface__design__only_8dox.html
   sandbox/xint/doc/r__nan.html
   sandbox/xint/doc/r__nan_8dox.html
   sandbox/xint/doc/r__negzero.html
   sandbox/xint/doc/r__negzero_8dox.html
   sandbox/xint/doc/r__random.html
   sandbox/xint/doc/r__random_8dox.html
   sandbox/xint/doc/r__shared__ptr.html
   sandbox/xint/doc/r__shared__ptr_8dox.html
   sandbox/xint/doc/random.html
   sandbox/xint/doc/random_8cpp.html
   sandbox/xint/doc/random_8cpp_source.html
   sandbox/xint/doc/random_8dox.html
   sandbox/xint/doc/random_8hpp.html
   sandbox/xint/doc/random_8hpp_source.html
   sandbox/xint/doc/rationale.html
   sandbox/xint/doc/rationale_8dox.html
   sandbox/xint/doc/roots_8cpp.html
   sandbox/xint/doc/roots_8cpp_source.html
   sandbox/xint/doc/securemode.html
   sandbox/xint/doc/securemode_8dox.html
   sandbox/xint/doc/tab_b.gif
   sandbox/xint/doc/tab_l.gif
   sandbox/xint/doc/tab_r.gif
   sandbox/xint/doc/tabs.css
   sandbox/xint/doc/testing.html
   sandbox/xint/doc/testing_8dox.html
   sandbox/xint/doc/threadsafe.html
   sandbox/xint/doc/threadsafe_8dox.html
   sandbox/xint/doc/xint.qbk
   sandbox/xint/doc/xint_8hpp.html
   sandbox/xint/doc/xint_8hpp_source.html
   sandbox/xint/doc/zero.html
   sandbox/xint/doc/zero_8dox.html
   sandbox/xint/example/exceptions.cpp
   sandbox/xint/example/fibonacci.cpp
   sandbox/xint/example/genprime.cpp
   sandbox/xint/example/xint_simple.cpp
   sandbox/xint/index.html
   sandbox/xint/src/base_integer.cpp
   sandbox/xint/src/bit_manipulations.cpp
   sandbox/xint/src/compare.cpp
   sandbox/xint/src/convert.cpp
   sandbox/xint/src/data_t.cpp
   sandbox/xint/src/gcd.cpp
   sandbox/xint/src/integer.cpp
   sandbox/xint/src/misc.cpp
   sandbox/xint/src/modular.cpp
   sandbox/xint/src/monty.cpp
   sandbox/xint/src/nothrow_bit_manipulations.cpp
   sandbox/xint/src/nothrow_compare.cpp
   sandbox/xint/src/nothrow_convert.cpp
   sandbox/xint/src/nothrow_gcd.cpp
   sandbox/xint/src/nothrow_integer.cpp
   sandbox/xint/src/nothrow_misc.cpp
   sandbox/xint/src/nothrow_modular.cpp
   sandbox/xint/src/nothrow_operators.cpp
   sandbox/xint/src/nothrow_powers.cpp
   sandbox/xint/src/nothrow_primes.cpp
   sandbox/xint/src/nothrow_primitives.cpp
   sandbox/xint/src/nothrow_roots.cpp
   sandbox/xint/src/operators.cpp
   sandbox/xint/src/powers.cpp
   sandbox/xint/src/primes.cpp
   sandbox/xint/src/primitives.cpp
   sandbox/xint/src/random.cpp
   sandbox/xint/src/roots.cpp
   sandbox/xint/test/Jamfile
   sandbox/xint/test/test_add.cpp
   sandbox/xint/test/test_bit_manipulations.cpp
   sandbox/xint/test/test_compare.cpp
   sandbox/xint/test/test_convert.cpp
   sandbox/xint/test/test_divide.cpp
   sandbox/xint/test/test_fixed.cpp
   sandbox/xint/test/test_main.cpp
   sandbox/xint/test/test_misc.cpp
   sandbox/xint/test/test_modular.cpp
   sandbox/xint/test/test_monty.cpp
   sandbox/xint/test/test_multiply.cpp
   sandbox/xint/test/test_powers.cpp
   sandbox/xint/test/test_streams.cpp
   sandbox/xint/test/xint_test_addsub.cpp
Text files modified:
   sandbox/xint/README.TXT | 15
   sandbox/xint/boost/xint/exceptions.hpp | 2
   sandbox/xint/boost/xint/fixed_integer.hpp | 1437 +++++++++++++++++++++----------------
   sandbox/xint/boost/xint/integer.hpp | 1536 +++++++++++++++++++++++++++++++++++----
   sandbox/xint/boost/xint/nothrow_integer.hpp | 1513 ++++++++++++++++++++++++++++++++------
   sandbox/xint/boost/xint/random.hpp | 155 +--
   sandbox/xint/boost/xint/xint.hpp | 3
   7 files changed, 3482 insertions(+), 1179 deletions(-)

Added: sandbox/xint/.gitignore
==============================================================================
--- (empty file)
+++ sandbox/xint/.gitignore 2010-05-31 20:43:54 EDT (Mon, 31 May 2010)
@@ -0,0 +1,23 @@
+libs/xint/doc/*.html
+libs/xint/doc/*.gif
+libs/xint/doc/*.png
+libs/xint/doc/*.css
+
+libs/xint/test/bin/*
+
+dev/Debug/*
+dev/Release/*
+dev/*.mk
+dev/*.tags
+dev/tags
+dev/*.session
+dev/*.depend
+dev/*.layout
+
+dev-ms/Debug/*
+dev-ms/Release/*
+dev-ms/*.ncb
+dev-ms/*.suo
+dev-ms/*.user
+
+dev-cb/*

Deleted: sandbox/xint/PERFORMANCE TESTING.txt
==============================================================================
--- sandbox/xint/PERFORMANCE TESTING.txt 2010-05-31 20:43:54 EDT (Mon, 31 May 2010)
+++ (empty file)
@@ -1,7 +0,0 @@
-To reproduce the test results that I offered on the Boost Developer's mailing
-list, use this version of the library. Uncomment one of the XINT_TEST_* defines
-near the top of internals.hpp and recompile the library (see README.txt for the
-proper setup for that), then compile and run the test program (use the Jamroot
-file in the test directory for that).
-
-The testing code is in test/test_main.cpp.

Modified: sandbox/xint/README.TXT
==============================================================================
--- sandbox/xint/README.TXT (original)
+++ sandbox/xint/README.TXT 2010-05-31 20:43:54 EDT (Mon, 31 May 2010)
@@ -1,20 +1,17 @@
 Installation instructions
 
-* Place the xint directory directly under the $(BOOST_ROOT)/libs directory.
-* Copy (or link) the boost/xint directory directly under $(BOOST_ROOT)/boost.
-* Change to the $(BOOST_ROOT)/libs/xint/build directory and run bjam with your
-favorite commands (under Linux, I use "bjam release install").
+* Copy (or link) the contents of the boost directory directly under the
+ $(BOOST_ROOT)/boost directory.
+* Copy (or link) the contents of the libs directory directly under
+ $(BOOST_ROOT)/libs.
+
+That's it -- it's now a header-only library. :-)
 
 Notes:
 
 The code has been fully tested under Windows (MSVC 8 SP1) and Linux (GCC 4.4.3).
 
-Auto-linking and Windows DLLs are not yet supported. The code will compile under
-Windows with no problem, but I haven't tried it through the bjam system there
-yet.
-
 See the very thorough documentation for any other questions, or ask me on the
 Boost developer's mailing list. Please put [xint] at the beginning of the
 subject line so I'll notice it faster.
 
-

Added: sandbox/xint/boost/xint/detail/addsubtract.cpp
==============================================================================
--- (empty file)
+++ sandbox/xint/boost/xint/detail/addsubtract.cpp 2010-05-31 20:43:54 EDT (Mon, 31 May 2010)
@@ -0,0 +1,227 @@
+
+/*
+ The Extended Integer (XInt) Library
+ A fast, portable C++ library for multi-precision integer math
+ Copyright 2010 by Chad Nelson
+
+ Distributed under the Boost Software License, Version 1.0.
+ See accompanying file LICENSE_1_0.txt or copy at
+ http://www.boost.org/LICENSE_1_0.txt
+
+ See http://www.boost.org/libs/xint for library home page.
+*/
+
+/*! \file
+ \brief Contains the definitions of the addition and subtraction functions.
+
+ This file will be included by the library itself when needed.
+*/
+
+#if defined(BOOST_XINT_COMPILED_LIB) || defined(BOOST_XINT_FROM_HEADER)
+
+#if defined(BOOST_XINT_COMPILED_LIB)
+ #include "internals.hpp"
+#endif // defined(BOOST_XINT_COMPILED_LIB)
+
+//! @cond detail
+namespace boost {
+namespace xint {
+namespace detail {
+
+void sub_increment(data_t& n, bool absolute_value = false);
+void sub_decrement(data_t& n, bool absolute_value = false);
+
+BOOST_XINT_INLINE void sub_add(data_t& n, const data_t n2) {
+ n.beginmod((std::max)(n.length, n2.length) + 1, true);
+
+ digit_t *ndig = n.digits(), *t = ndig, *te = t + n.max_length();
+ const digit_t *p = n2.digits(), *pe = p + (std::min)(n2.length,
+ n.max_length());
+
+ digit_t carry = 0;
+ while (p != pe) {
+ doubledigit_t tmp = doubledigit_t(*t) + *p++ + carry;
+ if (tmp >= digit_overflowbit) {
+ carry = 1;
+ *t++ = static_cast<digit_t>(tmp - digit_overflowbit);
+ } else {
+ carry = 0;
+ *t++ = static_cast<digit_t>(tmp);
+ }
+ }
+
+ if (carry) {
+ while (t != te) {
+ if (*t == digit_mask) *t++ = 0;
+ else { *t++ += 1; break; }
+ }
+ }
+
+ n.length = (std::max)(n.length, size_t(t - ndig));
+ n.endmod();
+}
+
+BOOST_XINT_INLINE void sub_subtract(data_t& n, const data_t n2) {
+ bool swap = (compare(n, n2, true) < 0);
+
+ n.beginmod((std::max)(n.length, n2.length), true);
+ digit_t *ndig = n.digits(), *t = ndig, *te = t + n.length;
+ const digit_t *p = n2.digits(), *pe = p + (std::min)(n2.length, n.length);
+
+ // Now subtract the digits, starting at the least-significant one.
+ digit_t borrow = 0;
+ if (swap) {
+ // abs(n2) is greater than abs(n). Requires slightly different handling.
+ while (p != pe) {
+ doubledigit_t tmp = digit_overflowbit + *p++ - *t - borrow;
+ if (tmp < digit_overflowbit) {
+ borrow = 1;
+ *t++ = static_cast<digit_t>(tmp);
+ } else {
+ borrow = 0;
+ *t++ = static_cast<digit_t>(tmp - digit_overflowbit);
+ }
+ }
+
+ n.length = size_t(t - ndig);
+ n.negative = !n.negative;
+ } else {
+ while (p != pe) {
+ doubledigit_t tmp = digit_overflowbit + *t - *p++ - borrow;
+ if (tmp < digit_overflowbit) {
+ borrow = 1;
+ *t++ = static_cast<digit_t>(tmp);
+ } else {
+ borrow = 0;
+ *t++ = static_cast<digit_t>(tmp - digit_overflowbit);
+ }
+ }
+
+ if (borrow) {
+ while (t != te) {
+ if (*t == 0) *t++ = digit_mask;
+ else { *t++ -= 1; borrow = 0; break; }
+ }
+ }
+ n.length = (std::max)(n.length, size_t(t - ndig));
+ }
+
+ assert(borrow == 0);
+ n.endmod();
+}
+
+BOOST_XINT_INLINE void sub_increment(data_t& n, bool absolute_value) {
+ if (n.is_zero()) {
+ n.set(1);
+ } else if (!absolute_value && n.negative) {
+ sub_decrement(n, true);
+ } else {
+ n.beginmod(n.length + 1, true);
+ digit_t *p = n.digits(), *pe = p + n.length;
+
+ while (p < pe) {
+ if (*p == digit_mask) *p++ = 0;
+ else { *p++ += 1; break; }
+ }
+ n.endmod();
+ }
+}
+
+BOOST_XINT_INLINE void sub_decrement(data_t& n, bool absolute_value) {
+ if (n.is_zero()) {
+ n.set(-1);
+ } else if (!absolute_value && n.negative) {
+ sub_increment(n, true);
+ } else {
+ n.beginmod(n.length);
+ digit_t *p = n.digits(), *pe = p + n.length;
+
+ while (p < pe) {
+ if (*p == 0) *p++ = digit_mask;
+ else { *p++ -= 1; break; }
+ }
+ n.endmod();
+ }
+}
+
+BOOST_XINT_INLINE data_t& data_t::operator++() {
+ sub_increment(*this);
+ return *this;
+}
+
+BOOST_XINT_INLINE data_t& data_t::operator--() {
+ sub_decrement(*this);
+ return *this;
+}
+
+BOOST_XINT_INLINE data_t data_t::operator++(int) {
+ data_t r(*this);
+ sub_increment(*this);
+ return r;
+}
+
+BOOST_XINT_INLINE data_t data_t::operator--(int) {
+ data_t r(*this);
+ sub_decrement(*this);
+ return r;
+}
+
+BOOST_XINT_INLINE data_t data_t::operator-() const {
+ data_t r(negate());
+ r.beginmod();
+ r.endmod(true);
+ return r;
+}
+
+BOOST_XINT_INLINE data_t& data_t::operator+=(const data_t n) {
+ if (!n.is_zero()) {
+ beginmod();
+
+ if (is_zero()) {
+ duplicate_data(n);
+ } else if (negative != n.negative) {
+ sub_subtract(*this, n.negate());
+ } else {
+ sub_add(*this, n);
+ }
+
+ endmod();
+ }
+ return *this;
+}
+
+BOOST_XINT_INLINE data_t& data_t::operator-=(const data_t n) {
+ if (!n.is_zero()) {
+ beginmod();
+
+ if (is_zero()) {
+ duplicate_data(n.negate());
+ } else if (negative != n.negative) {
+ sub_add(*this, n.negate());
+ } else {
+ sub_subtract(*this, n);
+ }
+
+ endmod();
+ }
+ return *this;
+}
+
+BOOST_XINT_INLINE data_t operator+(const data_t n1, const data_t n2) {
+ data_t r(n1);
+ r+=n2;
+ return r;
+}
+
+BOOST_XINT_INLINE data_t operator-(const data_t n1, const data_t n2) {
+ data_t r(n1);
+ r-=n2;
+ return r;
+}
+
+} // namespace detail
+} // namespace xint
+} // namespace boost
+//! @endcond detail
+
+#endif // defined(BOOST_XINT_COMPILED_LIB) || defined(BOOST_XINT_FROM_HEADER)

Added: sandbox/xint/boost/xint/detail/andorxor.cpp
==============================================================================
--- (empty file)
+++ sandbox/xint/boost/xint/detail/andorxor.cpp 2010-05-31 20:43:54 EDT (Mon, 31 May 2010)
@@ -0,0 +1,101 @@
+
+/*
+ The Extended Integer (XInt) Library
+ A fast, portable C++ library for multi-precision integer math
+ Copyright 2010 by Chad Nelson
+
+ Distributed under the Boost Software License, Version 1.0.
+ See accompanying file LICENSE_1_0.txt or copy at
+ http://www.boost.org/LICENSE_1_0.txt
+
+ See http://www.boost.org/libs/xint for library home page.
+*/
+
+/*! \file
+ \brief Contains the functions for ANDing, ORing, and XORing.
+
+ This file will be included by the library itself when needed.
+*/
+
+#if defined(BOOST_XINT_COMPILED_LIB) || defined(BOOST_XINT_FROM_HEADER)
+
+#if defined(BOOST_XINT_COMPILED_LIB)
+ #include "internals.hpp"
+#endif // defined(BOOST_XINT_COMPILED_LIB)
+
+//! @cond detail
+namespace boost {
+namespace xint {
+namespace detail {
+
+BOOST_XINT_INLINE data_t& data_t::operator&=(const data_t n) {
+ size_t len = (std::min)(length, n.length);
+ beginmod(len);
+
+ const digit_t *ns = n.digits(), *nse = ns + len;
+ digit_t *t = digits();
+ while (ns != nse) *t++ &= *ns++;
+ length = len;
+
+ endmod();
+ return *this;
+}
+
+BOOST_XINT_INLINE data_t& data_t::operator|=(const data_t n) {
+ size_t len = (std::max)(length, n.length);
+ beginmod(len);
+
+ if (length > n.length) {
+ const digit_t *ns = n.digits(), *nse = ns + n.length;
+ digit_t *t = digits();
+ while (ns != nse) *t++ |= *ns++;
+ } else {
+ const digit_t *ns = n.digits(), *nse = ns + len;
+ digit_t *t = digits(), *te = t + length;
+ while (t != te) *t++ |= *ns++;
+ while (ns != nse) *t++ = *ns++;
+ length = len;
+ }
+
+ endmod();
+ return *this;
+}
+
+BOOST_XINT_INLINE data_t& data_t::operator^=(const data_t n) {
+ size_t len = (std::max)(length, n.length);
+ beginmod(len);
+
+ if (length > n.length) {
+ const digit_t *ns = n.digits(), *nse = ns + n.length;
+ digit_t *t = digits();
+ while (ns != nse) *t++ ^= *ns++;
+ } else {
+ const digit_t *ns = n.digits(), *nse = ns + len;
+ digit_t *t = digits(), *te = t + length;
+ while (t != te) *t++ ^= *ns++;
+ while (ns != nse) *t++ = *ns++;
+ length = len;
+ }
+
+ endmod();
+ return *this;
+}
+
+BOOST_XINT_INLINE data_t operator&(const data_t n1, const data_t n2) {
+ return data_t(n1) &= n2;
+}
+
+BOOST_XINT_INLINE data_t operator|(const data_t n1, const data_t n2) {
+ return data_t(n1) |= n2;
+}
+
+BOOST_XINT_INLINE data_t operator^(const data_t n1, const data_t n2) {
+ return data_t(n1) ^= n2;
+}
+
+} // namespace detail
+} // namespace xint
+} // namespace boost
+//! @endcond detail
+
+#endif // defined(BOOST_XINT_COMPILED_LIB) || defined(BOOST_XINT_FROM_HEADER)

Added: sandbox/xint/boost/xint/detail/bitfunctions.cpp
==============================================================================
--- (empty file)
+++ sandbox/xint/boost/xint/detail/bitfunctions.cpp 2010-05-31 20:43:54 EDT (Mon, 31 May 2010)
@@ -0,0 +1,85 @@
+
+/*
+ The Extended Integer (XInt) Library
+ A fast, portable C++ library for multi-precision integer math
+ Copyright 2010 by Chad Nelson
+
+ Distributed under the Boost Software License, Version 1.0.
+ See accompanying file LICENSE_1_0.txt or copy at
+ http://www.boost.org/LICENSE_1_0.txt
+
+ See http://www.boost.org/libs/xint for library home page.
+*/
+
+/*! \file
+ \brief Contains the definitions for the bit-manipulation functions.
+
+ This file will be included by the library itself when needed.
+*/
+
+#if defined(BOOST_XINT_COMPILED_LIB) || defined(BOOST_XINT_FROM_HEADER)
+
+#if defined(BOOST_XINT_COMPILED_LIB)
+ #include "internals.hpp"
+#endif // defined(BOOST_XINT_COMPILED_LIB)
+
+//! @cond detail
+namespace boost {
+namespace xint {
+namespace detail {
+
+BOOST_XINT_INLINE bool getbit(const data_t n, size_t bit_index) {
+ size_t index = bit_index / bits_per_digit;
+ if (index < n.length) {
+ digit_t mask=(digit_t(1) << (bit_index % bits_per_digit));
+ return ((n[index] & mask) != 0);
+ } else return false;
+}
+
+BOOST_XINT_INLINE void setbit(data_t& n, size_t bit_index) {
+ if (n.is_fixed_length() && bit_index >= (n.max_length() * bits_per_digit))
+ return;
+
+ size_t index = (bit_index / bits_per_digit);
+ digit_t mask = (digit_t(1) << (bit_index % bits_per_digit));
+
+ n.beginmod(index + 1, true);
+ n.digits()[index] |= mask;
+ if (n.length < index + 1) n.length = index + 1;
+ n.endmod();
+}
+
+BOOST_XINT_INLINE void clearbit(data_t& n, size_t bit_index) {
+ size_t index = (bit_index / bits_per_digit);
+ if (index >= n.length) return; // Bit can't be set, no need to clear it.
+ digit_t mask = (digit_t(1) << (bit_index % bits_per_digit));
+
+ n.beginmod();
+ n.digits()[index] &= ~mask;
+ n.endmod();
+}
+
+BOOST_XINT_INLINE size_t lowestbit(const data_t n, size_t valueIfZero) {
+ if (n.is_zero()) return valueIfZero;
+
+ const digit_t *d = n.digits(), *p = d, *pe = p + n.length;
+ while (p != pe && *p == 0) ++p;
+ size_t r = (bits_per_digit * (p - d));
+
+ digit_t digit = *p;
+ while ((digit & 0x01)==0) { digit >>= 1; ++r; }
+
+ return r;
+}
+
+BOOST_XINT_INLINE size_t highestbit(const data_t n, size_t valueIfZero) {
+ if (n.is_zero()) return valueIfZero;
+ return ((n.length - 1) * bits_per_digit) + log2(n[n.length - 1]);
+}
+
+} // namespace detail
+} // namespace xint
+} // namespace boost
+//! @endcond detail
+
+#endif // defined(BOOST_XINT_COMPILED_LIB) || defined(BOOST_XINT_FROM_HEADER)

Added: sandbox/xint/boost/xint/detail/bitqueue.hpp
==============================================================================
--- (empty file)
+++ sandbox/xint/boost/xint/detail/bitqueue.hpp 2010-05-31 20:43:54 EDT (Mon, 31 May 2010)
@@ -0,0 +1,90 @@
+
+/*
+ The Extended Integer (XInt) Library
+ A fast, portable C++ library for multi-precision integer math
+ Copyright 2010 by Chad Nelson
+
+ Distributed under the Boost Software License, Version 1.0.
+ See accompanying file LICENSE_1_0.txt or copy at
+ http://www.boost.org/LICENSE_1_0.txt
+
+ See http://www.boost.org/libs/xint for library home page.
+*/
+
+/*! \file
+ \brief Contains the bitqueue_t class, used internally.
+
+ This file will be included by the library itself when needed.
+*/
+
+#ifndef BOOST_XINT_INCLUDED_BITQUEUET_HPP
+#define BOOST_XINT_INCLUDED_BITQUEUET_HPP
+
+//! @cond detail
+namespace boost {
+namespace xint {
+namespace detail {
+
+//! \brief Used internally to reorder bits into different-sized groupings.
+class bitqueue_t {
+ public:
+ bitqueue_t(): bits_pending(0) { }
+ void push(doubledigit_t bits, size_t count);
+ doubledigit_t pop(size_t requestedbits);
+ bool empty() const { return pending.empty(); }
+ size_t size() const { return bits_pending; }
+
+ private:
+ static const size_t ddbits = std::numeric_limits<doubledigit_t>::digits;
+ typedef std::pair<doubledigit_t, size_t> indata_t;
+ typedef std::queue<indata_t> inqueue_t;
+
+ size_t bits_pending;
+ inqueue_t pending;
+};
+
+inline void bitqueue_t::push(doubledigit_t bits, size_t count) {
+ if (count < ddbits) {
+ doubledigit_t mask = (doubledigit_t(1) << count) - 1;
+ bits &= mask;
+ }
+
+ if (pending.empty()) {
+ pending.push(std::make_pair(bits, count));
+ } else {
+ indata_t &n(pending.back());
+ if (n.second + count <= ddbits) {
+ n.first |= bits << n.second;
+ n.second += count;
+ } else {
+ pending.push(std::make_pair(bits, count));
+ }
+ }
+ bits_pending += count;
+}
+
+inline doubledigit_t bitqueue_t::pop(size_t requestedbits) {
+ doubledigit_t buffer = 0;
+ size_t bits_in_buffer = 0;
+ while (bits_in_buffer < requestedbits && !pending.empty()) {
+ indata_t &n(pending.front());
+ size_t maxbits = requestedbits - bits_in_buffer, actualbits =
+ (std::min)(n.second, maxbits);
+ buffer |= (n.first << bits_in_buffer);
+
+ n.first >>= actualbits;
+ n.second -= actualbits;
+ bits_in_buffer += actualbits;
+ bits_pending -= actualbits;
+
+ if (n.second == 0) pending.pop();
+ }
+ return (buffer & ((doubledigit_t(1) << requestedbits) - 1));
+}
+
+} // namespace detail
+} // namespace xint
+} // namespace boost
+//! @endcond detail
+
+#endif // BOOST_XINT_INCLUDED_BITQUEUET_HPP

Added: sandbox/xint/boost/xint/detail/compare.cpp
==============================================================================
--- (empty file)
+++ sandbox/xint/boost/xint/detail/compare.cpp 2010-05-31 20:43:54 EDT (Mon, 31 May 2010)
@@ -0,0 +1,104 @@
+
+/*
+ The Extended Integer (XInt) Library
+ A fast, portable C++ library for multi-precision integer math
+ Copyright 2010 by Chad Nelson
+
+ Distributed under the Boost Software License, Version 1.0.
+ See accompanying file LICENSE_1_0.txt or copy at
+ http://www.boost.org/LICENSE_1_0.txt
+
+ See http://www.boost.org/libs/xint for library home page.
+*/
+
+/*! \file
+ \brief Contains the definitions for the comparison functions.
+
+ This file will be included by the library itself when needed.
+*/
+
+#if defined(BOOST_XINT_COMPILED_LIB) || defined(BOOST_XINT_FROM_HEADER)
+
+#if defined(BOOST_XINT_COMPILED_LIB)
+ #include "internals.hpp"
+#endif // defined(BOOST_XINT_COMPILED_LIB)
+
+//! @cond detail
+namespace boost {
+namespace xint {
+namespace detail {
+
+//! Compares equal-length sets of digits.
+BOOST_XINT_INLINE int compare(const digit_t *b1, const digit_t *b2, size_t len,
+ bool equal_only)
+{
+ const detail::digit_t *b1i = b1 + len, *b2i = b2 + len;
+ if (equal_only) {
+ // If we only care whether it's equal or not, we'll start from the
+ // lowest digit instead of the highest, on the assumption that it's more
+ // likely to be different.
+ while (b1 < b1i) if (*b1++ != *b2++) return 1;
+ } else {
+ while (b1i > b1)
+ if (*(--b1i) != *(--b2i))
+ return ((*b1i < *b2i) ? -1 : 1);
+ }
+ return 0; // They're identical.
+}
+
+//! The full-fat comparison function.
+BOOST_XINT_INLINE int compare(const data_t b1, const data_t b2, bool ignoresign)
+{
+ bool invert_answer=false;
+ if (!ignoresign) {
+ if (b1.is_zero()) {
+ if (b2.is_zero()) return 0;
+ return (b2.negative ? 1 : -1);
+ } else if (b2.is_zero()) {
+ return (b1.negative ? -1 : 1);
+ } else {
+ if (b1.negative != b2.negative) return (b1.negative ? -1 : 1);
+ if (b1.negative) invert_answer=true;
+ }
+ }
+
+ int answer = 0;
+ if (b1.length != b2.length) {
+ answer = ((b1.length < b2.length) ? -1 : 1);
+ } else {
+ answer = compare(b1.digits(), b2.digits(), b1.length, false);
+ }
+
+ return (invert_answer ? -answer : answer);
+}
+
+//! Just compares for equality, returns non-zero if different.
+BOOST_XINT_INLINE int compare_eq(const data_t b1, const data_t b2) {
+ if (b1.negative != b2.negative) {
+ // Have to test for is_zero here, because in some rare cases, negative
+ // zero is allowed, and negative zero is equal to zero.
+ return (!b1.is_zero() || !b2.is_zero() ? 1 : 0);
+ }
+ if (b1.length != b2.length) return 1;
+ return compare(b1.digits(), b2.digits(), b1.length, true);
+}
+
+BOOST_XINT_INLINE bool operator==(const data_t num1, const data_t num2) {
+ return compare_eq(num1, num2)==0; }
+BOOST_XINT_INLINE bool operator!=(const data_t num1, const data_t num2) {
+ return compare_eq(num1, num2)!=0; }
+BOOST_XINT_INLINE bool operator<(const data_t num1, const data_t num2) {
+ return compare(num1, num2)<0; }
+BOOST_XINT_INLINE bool operator>(const data_t num1, const data_t num2) {
+ return compare(num1, num2)>0; }
+BOOST_XINT_INLINE bool operator<=(const data_t num1, const data_t num2) {
+ return compare(num1, num2)<=0; }
+BOOST_XINT_INLINE bool operator>=(const data_t num1, const data_t num2) {
+ return compare(num1, num2)>=0; }
+
+} // namespace detail
+} // namespace xint
+} // namespace boost
+//! @endcond detail
+
+#endif // defined(BOOST_XINT_COMPILED_LIB) || defined(BOOST_XINT_FROM_HEADER)

Added: sandbox/xint/boost/xint/detail/convert.cpp
==============================================================================
--- (empty file)
+++ sandbox/xint/boost/xint/detail/convert.cpp 2010-05-31 20:43:54 EDT (Mon, 31 May 2010)
@@ -0,0 +1,251 @@
+
+/*
+ The Extended Integer (XInt) Library
+ A fast, portable C++ library for multi-precision integer math
+ Copyright 2010 by Chad Nelson
+
+ Distributed under the Boost Software License, Version 1.0.
+ See accompanying file LICENSE_1_0.txt or copy at
+ http://www.boost.org/LICENSE_1_0.txt
+
+ See http://www.boost.org/libs/xint for library home page.
+*/
+
+/*! \file
+ \brief Contains the conversion functions.
+
+ This file will be included by the library itself when needed.
+*/
+
+#if defined(BOOST_XINT_COMPILED_LIB) || defined(BOOST_XINT_FROM_HEADER)
+
+#if defined(BOOST_XINT_COMPILED_LIB)
+ #include "internals.hpp"
+ #include "bitqueue.hpp"
+#endif // defined(BOOST_XINT_COMPILED_LIB)
+
+//! @cond detail
+namespace boost {
+namespace xint {
+namespace detail {
+
+BOOST_XINT_INLINE char nToChar(int n, bool upperCase) {
+ if (n < 10) return char(n+'0');
+ else if (upperCase) return char((n - 10) + 'A');
+ else return char((n - 10) + 'a');
+}
+
+BOOST_XINT_INLINE std::string to_string(const data_t n, size_t base, bool
+ uppercase)
+{
+ if (base<2 || base>36) throw exceptions::invalid_base();
+
+ if (n.is_zero()) return "0";
+
+ std::ostringstream out;
+ if (base == 2 || base == 4 || base == 16) {
+ // Fast no-division version, useful for debugging division and for cases
+ // where maximum speed is necessary.
+ const digit_t *firstDigit = n.digits(),
+ *lastDigit = firstDigit + n.length - 1;
+
+ if (n.negative) out << '-';
+
+ int bits_per_base_b_digit = 0;
+ while (base > 1) { base = base >> 1; ++bits_per_base_b_digit; }
+ const digit_t mask = (doubledigit_t(1) << bits_per_base_b_digit) - 1;
+
+ // Skip any leading zeros
+ const digit_t *d = lastDigit;
+ int digitShift = (bits_per_digit - bits_per_base_b_digit);
+ while (digitShift >= 0 && ((*d >> digitShift) & mask) == 0)
+ digitShift -= bits_per_base_b_digit;
+
+ do {
+ while (digitShift >= 0) {
+ out << nToChar((*d >> digitShift) & mask, uppercase);
+ digitShift -= bits_per_base_b_digit;
+ }
+
+ digitShift=(bits_per_digit - bits_per_base_b_digit);
+ } while (d-- != firstDigit);
+
+ return out.str();
+ } else {
+ // ATTN: for when there's nothing more pressing to do
+ // This could be made a lot more efficient for very large numbers, by
+ // dividing n by base raised to whatever number of digits will fit into
+ // a doubledigit_t, then just doing single-digit divides for that many
+ // digits before going back to n for another chunk. That would be
+ // premature optimization though, so I'm just making this note instead.
+ // If someone can show me a use-case where more efficiency is needed in
+ // this function, I'll add it later.
+
+ const data_t shift(n.new_holder(), base);
+ data_t::divide_t a(divide(n.abs(), shift));
+ do {
+ out << nToChar(a.remainder[0], uppercase);
+ a = divide(a.quotient, shift);
+ } while (!a.quotient.is_zero());
+ if (!a.remainder.is_zero()) out << nToChar(a.remainder[0], uppercase);
+
+ if (n.negative) out << '-';
+
+ std::string rval = out.str();
+ std::reverse(rval.begin(), rval.end());
+ return rval;
+ }
+}
+
+BOOST_XINT_INLINE void data_t::from_string(const char *str, char **endptr,
+ size_t base)
+{
+ bool negate=false;
+ const char *c = str;
+
+ while (isspace(*c)) ++c;
+
+ if (*c=='+') ++c;
+ else if (*c=='-') { negate=true; ++c; }
+
+ if (base==autobase) {
+ if (*c=='0') {
+ ++c;
+ if (*c=='x' || *c=='X') {
+ ++c;
+ base=16;
+ } else base=8;
+ } else base=10;
+ }
+
+ if (base<2 || base>36) throw exceptions::invalid_base();
+ if (*c==0) throw exceptions::invalid_digit("No valid digits");
+
+ std::string tstr;
+ if (negate) tstr.push_back('-');
+ if (base <= 10) {
+ const char p = char('0' + base);
+ while (*c >= '0' && *c < p)
+ tstr.push_back(*c++);
+ } else {
+ const char lower = char('a' + base - 10),
+ upper = char('A' + base - 10);
+ while ((*c >= '0' && *c <= '9')
+ || (*c >= 'a' && *c < lower)
+ || (*c >= 'A' && *c < upper))
+ tstr.push_back(*c++);
+ }
+ *endptr = const_cast<char*>(c);
+
+ from_string(tstr, base);
+}
+
+BOOST_XINT_INLINE void data_t::from_string(const char *str, size_t slen, size_t
+ base)
+{
+ bool negate=false;
+ const char *c = str;
+ if (*c=='+') ++c;
+ else if (*c=='-') { negate=true; ++c; }
+
+ if (base==autobase) {
+ if (*c=='0') {
+ ++c;
+ if (*c=='x' || *c=='X') {
+ ++c;
+ base=16;
+ } else base=8;
+ } else base=10;
+ }
+
+ if (base<2 || base>36) throw exceptions::invalid_base();
+ if (*c==0) throw exceptions::invalid_digit("No valid digits");
+
+ size_t max_bits_per_char = 1;
+ while (max_bits_per_char < 6 && base > (1u << max_bits_per_char))
+ ++max_bits_per_char;
+
+ if (slen == 0) slen = strlen(str);
+ size_t len = bits_to_digits(slen);
+
+ const data_t shift(new_holder(), base);
+
+ // ATTN: for when there's nothing more pressing to do
+ // This function could use the same efficiency improvements that to_string
+ // uses, but there's even less need for them here. Show me a use-case where
+ // they're needed and I'll add them; until then, this will suffice.
+
+ data_t digit(new_holder(), 0);
+
+ beginmod(len);
+ set(0);
+
+ while (*c) {
+ if (*c>='0' && *c<='9') digit.set(*c-'0');
+ else if (*c>='A' && *c<='Z') digit.set(*c-'A'+10);
+ else if (*c>='a' && *c<='z') digit.set(*c-'a'+10);
+ else
+ throw exceptions::invalid_digit("encountered non-alphanumeric "
+ "character in string");
+
+ if (digit >= shift) throw exceptions::invalid_digit("encountered digit "
+ "greater than base allows");
+
+ *this *= shift;
+ *this += digit;
+ ++c;
+ }
+
+ negative = negate;
+ endmod();
+}
+
+BOOST_XINT_INLINE void data_t::from_string(const std::string& str, size_t base) {
+ from_string(str.c_str(), str.length(), base);
+}
+
+BOOST_XINT_INLINE xint::binary_t to_binary(const data_t n, size_t bits) {
+ if (bits > size_t(std::numeric_limits<unsigned char>::digits)) throw
+ exceptions::invalid_argument("can't fit that many bits into an "
+ "unsigned character on this system");
+ if (bits == 0) bits = std::numeric_limits<unsigned char>::digits;
+
+ bitqueue_t bitqueue;
+ const digit_t *s = n.digits(), *se = s + n.length;
+ while (s != se) bitqueue.push(*s++, bits_per_digit);
+
+ xint::binary_t target;
+ while (!bitqueue.empty()) target.push_back(static_cast<unsigned char>
+ (bitqueue.pop(bits)));
+ while (!target.empty() && target.back()==0) target.pop_back();
+ return target;
+}
+
+BOOST_XINT_INLINE void data_t::from_binary(xint::binary_t b, size_t bits) {
+ if (bits > size_t(std::numeric_limits<unsigned char>::digits)) throw
+ exceptions::invalid_argument("can't fit that many bits into an "
+ "unsigned character on this system");
+ if (bits == 0) bits = std::numeric_limits<unsigned char>::digits;
+
+ size_t len = bits_to_digits(b.size() * bits);
+ beginmod(len);
+
+ bitqueue_t bitqueue;
+ for (xint::binary_t::const_iterator s = b.begin(), se = b.end(); s != se;
+ ++s) bitqueue.push(*s, bits);
+
+ digit_t *d = digits(), *t = d, *te = t + max_length();
+ while (t != te && !bitqueue.empty())
+ *t++ = static_cast<digit_t>(bitqueue.pop(bits_per_digit));
+
+ length = (t - d);
+
+ endmod();
+}
+
+} // namespace detail
+} // namespace xint
+} // namespace boost
+//! @endcond detail
+
+#endif // defined(BOOST_XINT_COMPILED_LIB) || defined(BOOST_XINT_FROM_HEADER)

Added: sandbox/xint/boost/xint/detail/data_t.cpp
==============================================================================
--- (empty file)
+++ sandbox/xint/boost/xint/detail/data_t.cpp 2010-05-31 20:43:54 EDT (Mon, 31 May 2010)
@@ -0,0 +1,462 @@
+
+/*
+ The Extended Integer (XInt) Library
+ A fast, portable C++ library for multi-precision integer math
+ Copyright 2010 by Chad Nelson
+
+ Distributed under the Boost Software License, Version 1.0.
+ See accompanying file LICENSE_1_0.txt or copy at
+ http://www.boost.org/LICENSE_1_0.txt
+
+ See http://www.boost.org/libs/xint for library home page.
+*/
+
+/*! \file
+ \brief Contains the function definitions for data_t and raw_digits_t.
+
+ This file will be included by the library itself when needed.
+*/
+
+#if defined(BOOST_XINT_COMPILED_LIB) || defined(BOOST_XINT_FROM_HEADER)
+
+#if defined(BOOST_XINT_COMPILED_LIB)
+ #include "internals.hpp"
+ #include "../exceptions.hpp"
+#endif // defined(BOOST_XINT_COMPILED_LIB)
+
+//! @cond detail
+namespace boost {
+namespace xint {
+namespace detail {
+
+////////////////////////////////////////////////////////////////////////////////
+// raw_digits_t
+
+BOOST_XINT_INLINE raw_digits_t::raw_digits_t(size_t max_len, bool ro):
+ copy_count(0), max_length(max_len), readonly(ro) { }
+
+BOOST_XINT_INLINE raw_digits_t::raw_digits_t(size_t max_len, bool ro, digit_t
+ init): copy_count(0), max_length(max_len), readonly(ro)
+{
+ digits[0] = init;
+}
+
+BOOST_XINT_INLINE size_t raw_digits_t::copy(const raw_digits_t& c, size_t
+ length)
+{
+ size_t max = (std::min)(max_length, c.max_length);
+ if (length == 0 || length > max) length = max;
+ copy(c.digits, length);
+ return length;
+}
+
+BOOST_XINT_INLINE void raw_digits_t::copy(const digit_t *s, size_t length) {
+ digit_t *t = digits, *te = t + (std::min)(length, max_length);
+ while (t != te) *t++ = *s++;
+}
+
+BOOST_XINT_INLINE size_t raw_digits_t::zero(size_t length) {
+ if (length == 0) length = max_length;
+ else length = (std::min)(length, max_length);
+ digit_t *t = digits, *te = t + length;
+ while (t != te) *t++ = 0;
+ return length;
+}
+
+BOOST_XINT_INLINE size_t raw_digits_t::copies() const {
+ return copy_count;
+}
+
+////////////////////////////////////////////////////////////////////////////////
+// base_digitmanager_t
+
+BOOST_XINT_INLINE raw_digits_t *base_digitmanager_t::alloc(size_t
+ requested_length, bool readonly) const
+{
+ size_t fixed_digit_length = fixed_length();
+ size_t len = (fixed_digit_length ? fixed_digit_length :
+ (std::max)(requested_length, minimum_digits));
+ size_t count = len - minimum_digits + datasize;
+
+ digit_t *storage = 0;
+ try {
+ storage = raw_allocate(count);
+ if (readonly) return new(storage) raw_digits_t(len, readonly, 0);
+ else return new(storage) raw_digits_t(len, readonly);
+ } catch (std::bad_alloc&) {
+ if (storage) raw_deallocate(storage, len); // Just in case.
+ throw exceptions::overflow_error("Out of memory allocating integer");
+ } catch (std::exception&) {
+ // To make it exception-safe, we've got to ensure that the allocated
+ // data is properly disposed of if there's an exception, before passing
+ // the exception on.
+ if (storage) raw_deallocate(storage, len);
+ throw;
+ }
+}
+
+//! Resizes the data (if possible), and ensures that it's unique in all cases.
+BOOST_XINT_INLINE raw_digits_t *base_digitmanager_t::realloc(raw_digits_t
+ *data, size_t requested_length) const
+{
+ if (fixed_length() == 0) {
+ if (data && data->copies() <= 1 && !data->readonly) {
+ digit_t *rawdata = raw_reallocate(reinterpret_cast<digit_t*>(data),
+ requested_length);
+ if (rawdata != 0) {
+ if (reinterpret_cast<digit_t*>(data) == rawdata) {
+ *(const_cast<size_t*>(&data->max_length)) = requested_length;
+ return data;
+ } else {
+ raw_digits_t *newdata =
+ new(rawdata) raw_digits_t(requested_length, false);
+ newdata->copy(*data);
+ return newdata;
+ }
+ }
+ }
+ } else requested_length = fixed_length();
+
+ // Can't reallocate, move to plan B.
+ raw_digits_t *r = data;
+ if (data == 0 || data->copies() > 1 || data->readonly ||
+ data->max_length < requested_length)
+ {
+ r = alloc(requested_length);
+ if (data) r->copy(*data, requested_length);
+ }
+
+ return r;
+}
+
+BOOST_XINT_INLINE void base_digitmanager_t::dealloc(raw_digits_t *data) const {
+ if (data == 0) return;
+
+ size_t len = (data->max_length + datasize - minimum_digits);
+
+ // Since the data was initialized with placement-new, we have to manually
+ // call the destructor.
+ data-> ~raw_digits_t();
+
+ // Finally, dispose of it.
+ raw_deallocate(reinterpret_cast<digit_t*>(data), len);
+}
+
+//! Tries to change max_length(), preserving current data, and ensures that the
+//! data is unique. max_length is not guaranteed to change, so don't make any
+//! assumptions about that.
+BOOST_XINT_INLINE void base_digitmanager_t::resize_and_uniquify(size_t
+ new_requested_max_length)
+{
+ // If the length can't change, and it's already unique, we don't need to do
+ // anything.
+ if (fixed_length() > 0 && raw_data->copies() <= 1) return;
+
+ if (new_requested_max_length == 0)
+ new_requested_max_length = raw_data->max_length;
+ reset(realloc(raw_data, new_requested_max_length));
+}
+
+//! This should never be used on different derived classes, unless it doesn't
+//! matter that the memory from one class will be deallocated in the other.
+BOOST_XINT_INLINE void swap(base_digitmanager_t& p1, base_digitmanager_t& p2) {
+ using std::swap;
+ swap(p1.raw_data, p2.raw_data);
+}
+
+////////////////////////////////////////////////////////////////////////////////
+// data_t
+
+BOOST_XINT_INLINE data_t::data_t(base_digitmanager_t& holder, size_t len, bool
+ neg): length(len), negative(neg), dataholder(&holder),
+ holder_managed_elsewhere(true), modcount(0) { }
+
+BOOST_XINT_INLINE data_t::data_t(base_digitmanager_t* holder):
+ length(1), negative(false), dataholder(holder),
+ holder_managed_elsewhere(false), modcount(0) { assert(holder != 0); }
+
+//! Makes a copy that shares storage.
+BOOST_XINT_INLINE data_t::data_t(const data_t& copy): length(copy.length),
+ negative(copy.negative),
+ dataholder(copy.dataholder->new_of_type(copy.dataholder)),
+ holder_managed_elsewhere(false), modcount(0) { }
+
+//! Makes a copy that shares storage and sets negative to a specific value,
+//! possibly different from copy's.
+BOOST_XINT_INLINE data_t::data_t(const data_t& copy, bool neg):
+ length(copy.length), negative(neg),
+ dataholder(copy.dataholder->new_of_type(copy.dataholder)),
+ holder_managed_elsewhere(false), modcount(0) { }
+
+BOOST_XINT_INLINE data_t::~data_t() {
+ if (!holder_managed_elsewhere) delete dataholder;
+}
+
+BOOST_XINT_INLINE base_digitmanager_t *data_t::new_holder() const {
+ return dataholder->new_of_type();
+}
+
+BOOST_XINT_INLINE const base_digitmanager_t *data_t::holder() const {
+ if (is_nan()) throw exceptions::not_a_number();
+ return dataholder;
+}
+
+//! Only works when abs(n) will fit into a digit_t.
+BOOST_XINT_INLINE void data_t::set(int n) {
+ beginmod(1);
+ make_unique();
+ if (n < 0) { negative = true; n = -n; } else negative = false;
+ assert(n == int(digit_t(n)));
+ length = 1;
+ digits()[0] = digit_t(n);
+ endmod();
+}
+
+BOOST_XINT_INLINE void data_t::set_signed(boost::intmax_t n) {
+ if (n >= 0) {
+ set_unsigned(n);
+ } else if (n == (std::numeric_limits<boost::intmax_t>::min)()) {
+ // Have to treat the minimum number carefully, because -n is not
+ // what you'd think it is.
+ set_unsigned(-(n + 1), true);
+ --*this;
+ } else {
+ set_unsigned(-n, true);
+ }
+}
+
+BOOST_XINT_INLINE void data_t::set_unsigned(boost::uintmax_t n, bool neg) {
+ beginmod(detail::digits_in_uintmax);
+ if (digit_t(n) == n) {
+ length = 1;
+ digits()[0] = digit_t(n);
+ } else {
+ digit_t *i = digits(), *ie = i + max_length();
+ while (n != 0 && i != ie) {
+ *i++ = digit_t(n & digit_mask);
+ n >>= bits_per_digit;
+ }
+ length = (i - digits());
+ }
+ negative = neg;
+ endmod();
+}
+
+//! Makes a copy with its own unique storage.
+BOOST_XINT_INLINE data_t data_t::duplicate() const {
+ data_t r(*this);
+ r.make_unique();
+ return r;
+}
+
+//! Copies the data into this object's unique storage.
+BOOST_XINT_INLINE void data_t::duplicate_data(const data_t copy) {
+ beginmod(copy.length);
+ digits(); // To trigger any changes from the beginmod call
+ length = (std::min)(max_length(), copy.length);
+ negative = copy.negative;
+ dataholder->copy(copy.dataholder, length);
+ endmod();
+}
+
+//! Discards this item's data and adopts a copy of p.
+BOOST_XINT_INLINE void data_t::reset(data_t p) {
+ dataholder->reset(p.dataholder->get());
+ length = p.length;
+ negative = p.negative;
+ call_endmod_hook = true;
+}
+
+BOOST_XINT_INLINE data_t& data_t::operator=(const data_t& p) {
+ reset(p);
+ return *this;
+}
+
+BOOST_XINT_INLINE const data_t data_t::abs() const {
+ return data_t(*this, false);
+}
+
+BOOST_XINT_INLINE const data_t data_t::negate() const {
+ return data_t(*this, !negative);
+}
+
+BOOST_XINT_INLINE bool data_t::same_storage(const data_t n) const {
+ return (dataholder->get() == n.dataholder->get());
+}
+
+BOOST_XINT_INLINE bool data_t::is_unique() const {
+ return ((*dataholder)->copies() <= 1);
+}
+
+BOOST_XINT_INLINE void data_t::make_unique() {
+ if (!is_unique()) dataholder->resize_and_uniquify(max_length());
+}
+
+//! Unlike operator[], this function is protected from out-of-bounds accesses.
+BOOST_XINT_INLINE digit_t data_t::get_digit(size_t i) const {
+ return (i < length ? (*dataholder)->digits[i] : 0);
+}
+
+BOOST_XINT_INLINE digit_t data_t::operator[](size_t i) {
+ return (*dataholder)->digits[i];
+}
+
+BOOST_XINT_INLINE digit_t *data_t::digits() {
+ assert(modcount > 0);
+
+ if (mod_requested_size > max_length()) {
+ dataholder->resize_and_uniquify(mod_requested_size);
+ } else {
+ make_unique();
+ }
+
+ if (mod_requested_extend) {
+ mod_requested_extend = false;
+ extend(mod_requested_size, true);
+ }
+ mod_requested_size = 0;
+
+ call_endmod_hook = true;
+ return digits(true);
+}
+
+BOOST_XINT_INLINE const digit_t *data_t::digits() const {
+ data_t& t(*const_cast<data_t*>(this));
+ return t.digits(true);
+}
+
+BOOST_XINT_INLINE size_t data_t::max_length() const {
+ return (*dataholder)->max_length;
+}
+
+BOOST_XINT_INLINE bool data_t::is_zero() const {
+ return (length == 1 && (*this)[0] == 0);
+}
+
+//! Extends the current object's length (to the maximum, by default), zeroing
+//! the digits in between.
+BOOST_XINT_INLINE void data_t::extend(size_t new_length, bool skip_mod) {
+ if (new_length == 0) new_length = max_length();
+ else new_length = (std::min)(new_length, max_length());
+
+ if (length < new_length) {
+ digit_t *d;
+ if (!skip_mod) {
+ beginmod();
+ d = (*dataholder)->digits;
+ } else d = digits();
+ digit_t *p = d + length, *pe = d + new_length;
+ while (p < pe) *p++ = 0;
+ length = new_length;
+ if (!skip_mod) endmod();
+ }
+}
+
+BOOST_XINT_INLINE void data_t::beginmod(size_t requested, bool extend) {
+ if (modcount++ == 0) {
+ dataholder->beforemod();
+ mod_requested_size = requested;
+ mod_requested_extend = extend;
+ call_endmod_hook = false;
+ } else {
+ mod_requested_size = (std::max)(mod_requested_size, requested);
+ if (extend) mod_requested_extend = true;
+ }
+}
+
+BOOST_XINT_INLINE void data_t::endmod(bool allow_negative_zero) {
+ assert(length <= max_length());
+
+ digit_t *d = digits(true), *p = d + length - 1;
+ if (call_endmod_hook) {
+ dataholder->endmod_hook(d);
+ call_endmod_hook = false;
+ }
+
+ // Adjust length to skip any leading zeros.
+ while (p > d && *p == 0) --p;
+ length = (p - d + 1);
+
+ // Zero isn't negative, unless told otherwise.
+ if (!allow_negative_zero && p == d && *p == 0) negative = false;
+
+ assert(modcount > 0);
+ if (--modcount == 0) dataholder->aftermod();
+}
+
+BOOST_XINT_INLINE int data_t::sign(bool allow_signed_zero) const {
+ if (!allow_signed_zero && is_zero()) return 0;
+ return (negative ? -1 : 1);
+}
+
+BOOST_XINT_INLINE bool data_t::is_odd() const {
+ return (((*this)[0] & 0x01) != 0);
+}
+
+BOOST_XINT_INLINE bool data_t::is_even() const {
+ return (((*this)[0] & 0x01) == 0);
+}
+
+BOOST_XINT_INLINE size_t data_t::hex_digits() const {
+ return (log2(*this) + 3) / 4;
+}
+
+////////////////////////////////////////////////////////////////////////////////
+// Miscellaneous related free functions
+
+BOOST_XINT_INLINE void swap(data_t& p1, data_t& p2) {
+ using std::swap;
+ swap(p1.length, p2.length);
+ swap(p1.negative, p2.negative);
+ swap(*p1.dataholder, *p2.dataholder);
+}
+
+BOOST_XINT_INLINE size_t log2_base(boost::uintmax_t n, size_t maxbits) {
+ size_t lo = 0, hi = maxbits;
+ while (lo < hi) {
+ size_t s = lo + ((hi - lo) >> 1);
+ if (n >= (boost::uintmax_t(1) << s)) lo = s + 1;
+ else hi = s;
+ }
+ return lo;
+}
+
+//! Use this one, rather than data_t's member version, if the final result needs
+//! to be made thread-safe. Use the member version if thread-safety isn't a
+//! problem (i.e. for internal functions) and maximum speed is desired.
+BOOST_XINT_INLINE data_t abs(const data_t n) {
+ data_t r(n.abs());
+ r.beginmod();
+ r.endmod();
+ return r;
+}
+
+BOOST_XINT_INLINE size_t log2(const data_t n) {
+ size_t r = bits_per_digit * (n.length - 1);
+ return r + log2(n[n.length - 1]);
+}
+
+BOOST_XINT_INLINE size_t log10_bits(size_t bits) {
+ assert(std::numeric_limits<boost::intmax_t>::digits >= 32);
+
+ digitmanager_t<> holder;
+ const data_t large_step(holder.new_of_type(), 1000000000);
+ const data_t small_step(holder.new_of_type(), 10);
+ const size_t count_per_large_step = 9, count_per_small_step = 1;
+
+ data_t n(new digitmanager_t<>);
+ pow2(n, bits);
+ --n;
+
+ size_t r = 0;
+ while (n >= large_step) { n /= large_step; r += count_per_large_step; }
+ while (n >= small_step) { n /= small_step; r += count_per_small_step; }
+ return r;
+}
+
+} // namespace detail
+} // namespace xint
+} // namespace boost
+//! @endcond detail
+
+#endif // defined(BOOST_XINT_COMPILED_LIB) || defined(BOOST_XINT_FROM_HEADER)

Added: sandbox/xint/boost/xint/detail/divide.cpp
==============================================================================
--- (empty file)
+++ sandbox/xint/boost/xint/detail/divide.cpp 2010-05-31 20:43:54 EDT (Mon, 31 May 2010)
@@ -0,0 +1,205 @@
+
+/*
+ The Extended Integer (XInt) Library
+ A fast, portable C++ library for multi-precision integer math
+ Copyright 2010 by Chad Nelson
+
+ Distributed under the Boost Software License, Version 1.0.
+ See accompanying file LICENSE_1_0.txt or copy at
+ http://www.boost.org/LICENSE_1_0.txt
+
+ See http://www.boost.org/libs/xint for library home page.
+*/
+
+/*! \file
+ \brief Contains the definitions of the divide function, and its supporting
+ functions.
+
+ This file will be included by the library itself when needed.
+*/
+
+#if defined(BOOST_XINT_COMPILED_LIB) || defined(BOOST_XINT_FROM_HEADER)
+
+#if defined(BOOST_XINT_COMPILED_LIB)
+ #include "internals.hpp"
+#endif // defined(BOOST_XINT_COMPILED_LIB)
+
+//! @cond detail
+namespace boost {
+namespace xint {
+namespace detail {
+
+BOOST_XINT_INLINE void divide_by_single_digit(data_t& qtarget, data_t& rtarget,
+ const data_t d1, digit_t d2)
+{
+ size_t d1len = d1.length;
+ const digit_t *d1digits = d1.digits();
+
+ doubledigit_t a = 0;
+ const doubledigit_t lomask(digit_mask);
+ const doubledigit_t himask(lomask << bits_per_digit);
+
+ int m = int(d1len) - 1;
+ const digit_t *d1p = d1digits + m;
+
+ qtarget.beginmod(m + 1);
+ digit_t *qp = qtarget.digits() + m, *qe = qtarget.digits() +
+ qtarget.max_length();
+ for (int i = m; i >= 0; --i, --d1p, --qp) {
+ a = (a & ~lomask) | *d1p;
+ if (qp < qe) *qp = static_cast<digit_t>(a / d2);
+ a = (a & ~himask) | ((a % d2) << bits_per_digit);
+ }
+ qtarget.length = (std::min<size_t>)(m + 1, qtarget.max_length());
+ qtarget.endmod();
+
+ rtarget.beginmod(1);
+ rtarget.digits()[0] = static_cast<digit_t>((a & himask) >> bits_per_digit);
+ rtarget.length = 1;
+ rtarget.endmod();
+}
+
+BOOST_XINT_INLINE void sub_divide2(data_t& qtarget, data_t& rtarget, const
+ data_t d1, const data_t d2)
+{
+ assert(d2[d2.length - 1] >= digit_overflowbit / 2);
+
+ const digit_t *byDigits = d2.digits();
+
+ size_t n = d2.length, m = d1.length - n;
+ size_t i = m + n, j = m;
+
+ qtarget.beginmod(j + 1);
+ rtarget.beginmod();
+
+ qtarget.length = j + 1;
+ digit_t *qdigits = qtarget.digits();
+ rtarget.duplicate_data(d1);
+ do {
+ doubledigit_t ri = (doubledigit_t(rtarget.get_digit(i)) <<
+ bits_per_digit) + rtarget.get_digit(i - 1);
+
+ doubledigit_t q = (std::min<doubledigit_t>)(ri / byDigits[n - 1],
+ digit_mask);
+
+ data_t r2(qtarget.new_holder(), 0, 3), qq(qtarget.new_holder(), 0);
+ while (1) {
+ // We need three digits here, a doubledigit_t alone won't suffice.
+ r2.set_unsigned(ri - (q * byDigits[n - 1]));
+ r2 <<= bits_per_digit;
+ r2 += data_t(qtarget.new_holder(), rtarget[i - 2]);
+ qq.set_unsigned(q);
+ if (data_t(qtarget.new_holder(), byDigits[n - 2]) * qq <= r2) break;
+ --q;
+ }
+
+ qq.set_unsigned(q);
+ data_t bq(d2 * qq);
+ if (rtarget < bq) {
+ --q;
+ bq -= d2;
+ }
+
+ bq <<= bits_per_digit * (i - n);
+ rtarget -= bq;
+
+ qdigits[j--] = digit_t(q);
+ } while (--i >= n);
+ rtarget.endmod();
+ qtarget.endmod();
+}
+
+//! This function weeds out single-digit division (for more efficient
+//! processing), normalizes the values if necessary, then calls sub_divide2 for
+//! the actual work.
+BOOST_XINT_INLINE void sub_divide(data_t& qtarget, data_t& rtarget, const data_t
+ d1, const data_t d2)
+{
+ if (d2.length == 1) {
+ divide_by_single_digit(qtarget, rtarget, d1, d2[0]);
+ return;
+ }
+
+ // The normalization step
+ digit_t normalizer = static_cast<digit_t>(digit_overflowbit /
+ (doubledigit_t(d2[d2.length - 1]) + 1));
+ if (normalizer > 1) {
+ const data_t norm(qtarget.new_holder(), normalizer);
+ sub_divide2(qtarget, rtarget, d1 * norm, d2 * norm);
+
+ // Denormalization step. This requires a division by a single digit_t.
+ data_t tmp(qtarget.new_holder());
+ divide_by_single_digit(rtarget, tmp, rtarget.duplicate(), normalizer);
+ } else sub_divide2(qtarget, rtarget, d1, d2);
+}
+
+//! This function handles signs and trivial cases, and calls sub_divide for the
+//! heavy lifting.
+BOOST_XINT_INLINE void divide(data_t& qtarget, data_t& rtarget, const data_t d1,
+ const data_t d2)
+{
+ int sign1 = (d1.is_zero() ? 0 : d1.negative ? -1 : 1);
+ int sign2 = (d2.is_zero() ? 0 : d2.negative ? -1 : 1);
+ if (sign2 == 0) throw exceptions::divide_by_zero();
+
+ qtarget.beginmod();
+ rtarget.beginmod();
+ int comp = compare(d1, d2, true);
+ if (comp < 0) {
+ qtarget.set(0);
+ rtarget.duplicate_data(d1);
+ } else if (comp == 0) {
+ qtarget.set(sign1 != sign2 ? -1 : 1);
+ rtarget.set(0);
+ } else if (sign1 < 0 && sign2 < 0) {
+ sub_divide(qtarget, rtarget, d1.negate(), d2.negate());
+ qtarget.negative = false;
+ rtarget.negative = true;
+ } else if (sign1 < 0) {
+ sub_divide(qtarget, rtarget, d1.negate(), d2);
+ qtarget.negative = rtarget.negative = true;
+ } else if (sign2 < 0) {
+ sub_divide(qtarget, rtarget, d1, d2.negate());
+ qtarget.negative = true;
+ rtarget.negative = false;
+ } else {
+ sub_divide(qtarget, rtarget, d1, d2);
+ qtarget.negative = rtarget.negative = false;
+ }
+ rtarget.endmod();
+ qtarget.endmod();
+}
+
+BOOST_XINT_INLINE data_t::divide_t divide(const data_t d1, const data_t d2) {
+ data_t q(d1.new_holder()), r(d1.new_holder());
+ divide(q, r, d1, d2);
+ return data_t::divide_t(q, r);
+}
+
+BOOST_XINT_INLINE data_t& data_t::operator/=(const data_t b) {
+ data_t remainder(new_holder());
+ divide(*this, remainder, duplicate(), b);
+ return *this;
+}
+
+BOOST_XINT_INLINE data_t& data_t::operator%=(const data_t b) {
+ data_t quotient(new_holder());
+ divide(quotient, *this, duplicate(), b);
+ if (negative) *this += b.abs();
+ return *this;
+}
+
+BOOST_XINT_INLINE data_t operator/(const data_t n1, const data_t n2) {
+ return data_t(n1) /= n2;
+}
+
+BOOST_XINT_INLINE data_t operator%(const data_t n1, const data_t n2) {
+ return data_t(n1) %= n2;
+}
+
+} // namespace detail
+} // namespace xint
+} // namespace boost
+//! @endcond detail
+
+#endif // defined(BOOST_XINT_COMPILED_LIB) || defined(BOOST_XINT_FROM_HEADER)

Added: sandbox/xint/boost/xint/detail/gcd.cpp
==============================================================================
--- (empty file)
+++ sandbox/xint/boost/xint/detail/gcd.cpp 2010-05-31 20:43:54 EDT (Mon, 31 May 2010)
@@ -0,0 +1,159 @@
+
+/*
+ The Extended Integer (XInt) Library
+ A fast, portable C++ library for multi-precision integer math
+ Copyright 2010 by Chad Nelson
+
+ Distributed under the Boost Software License, Version 1.0.
+ See accompanying file LICENSE_1_0.txt or copy at
+ http://www.boost.org/LICENSE_1_0.txt
+
+ See http://www.boost.org/libs/xint for library home page.
+*/
+
+/*! \file
+ \brief Contains functions using the Greatest Common Denominator algorithm.
+
+ This file will be included by the library itself when needed.
+*/
+
+#if defined(BOOST_XINT_COMPILED_LIB) || defined(BOOST_XINT_FROM_HEADER)
+
+#if defined(BOOST_XINT_COMPILED_LIB)
+ #include "internals.hpp"
+#endif // defined(BOOST_XINT_COMPILED_LIB)
+
+//! @cond detail
+namespace boost {
+namespace xint {
+namespace detail {
+
+struct gcd_core {
+ gcd_core(const data_t n, const data_t m): u1(n.new_holder(), 1),
+ u2(n.new_holder()), u3(n)
+ {
+ const data_t zero(n.new_holder());
+ data_t t1(m), t2(n), t3(m);
+ t1.beginmod();
+ t2.beginmod();
+ t3.beginmod();
+ u1.beginmod();
+ u2.beginmod();
+ u3.beginmod();
+
+ --t2;
+ do {
+ do {
+ if (u3.is_even()) {
+ if (u1.is_odd() || u2.is_odd()) { u1 += m; u2 += n; }
+ u1 >>= 1;
+ u2 >>= 1;
+ u3 >>= 1;
+ }
+
+ if (t3.is_even() || u3 < t3) {
+ // Swap the u's with the t's
+ using std::swap;
+ swap(u1, t1);
+ swap(u2, t2);
+ swap(u3, t3);
+ }
+ } while (u3.is_even());
+
+ while (u1 < t1 || u2 < t2) { u1 += m; u2 += n; }
+ u1 -= t1; u2 -= t2; u3 -= t3;
+ } while (t3 > zero);
+
+ while (u1 >= m && u2 >= n) { u1 -= m; u2 -= n; }
+
+ u3.endmod();
+ u2.endmod();
+ u1.endmod();
+ t3.endmod();
+ t2.endmod();
+ t1.endmod();
+ }
+
+ data_t u1, u2, u3;
+};
+
+BOOST_XINT_INLINE void gcd(data_t& target, const data_t num1, const data_t num2)
+{
+ target.beginmod();
+ if (num1.is_zero() && num2.is_zero()) {
+ target.set(0);
+ } else if (num1.is_zero()) {
+ target.duplicate_data(num2);
+ } else if (num2.is_zero()) {
+ target.duplicate_data(num1);
+ } else {
+ data_t n(num1, false), m(num2, false);
+
+ size_t k = 0;
+ if (!getbit(n, k) && !getbit(m, k)) ++k;
+ if (k != 0) { n >>= k; m >>= k; }
+
+ gcd_core core(n, m);
+ if (core.u3.is_zero()) {
+ target.set(1);
+ target <<= k;
+ } else {
+ target.duplicate_data(core.u3);
+ target <<= k;
+ }
+ }
+ target.endmod();
+}
+
+BOOST_XINT_INLINE void lcm(data_t& target, const data_t num1, const data_t num2)
+{
+ if (num1.is_zero() || num2.is_zero()) {
+ target.set(0);
+ } else {
+ data_t common(target.new_holder());
+ gcd(common, num1, num2);
+
+ target.beginmod();
+ target.duplicate_data(num1);
+ target *= num2;
+ target /= common;
+ target.negative = false;
+ target.endmod();
+ }
+}
+
+//! Calculates the modular inverse of n mod m, or (n^(-1)) mod m
+//! Defined as b, where n*b corresponds to 1 (mod m)
+BOOST_XINT_INLINE void invmod(data_t& target, const data_t n, const data_t m) {
+ if (m.is_zero() || m.negative) throw exceptions::invalid_modulus();
+
+ if (n.is_zero()) {
+ target.set(0);
+ } else if (n.negative) {
+ target.beginmod();
+ invmod(target, n.abs(), m);
+ if (!target.is_zero()) {
+ target.negative = true;
+ target += m;
+ }
+ target.endmod();
+ } else {
+ if (n.is_even() && m.is_even()) {
+ // GCD != 1, no inverse possible.
+ target.set(0);
+ } else {
+ gcd_core core(n, m);
+ if (core.u3 != data_t(target.new_holder(), 1)) {
+ // GCD != 1, no inverse possible.
+ target.set(0);
+ } else target.duplicate_data(core.u1);
+ }
+ }
+}
+
+} // namespace detail
+} // namespace xint
+} // namespace boost
+//! @endcond detail
+
+#endif // defined(BOOST_XINT_COMPILED_LIB) || defined(BOOST_XINT_FROM_HEADER)

Added: sandbox/xint/boost/xint/detail/internals.hpp
==============================================================================
--- (empty file)
+++ sandbox/xint/boost/xint/detail/internals.hpp 2010-05-31 20:43:54 EDT (Mon, 31 May 2010)
@@ -0,0 +1,668 @@
+
+/*
+ The Extended Integer (XInt) Library
+ A fast, portable C++ library for multi-precision integer math
+ Copyright 2010 by Chad Nelson
+
+ Distributed under the Boost Software License, Version 1.0.
+ See accompanying file LICENSE_1_0.txt or copy at
+ http://www.boost.org/LICENSE_1_0.txt
+
+ See http://www.boost.org/libs/xint for library home page.
+*/
+
+/*! \file
+ \brief Contains the internal definitions required for all XInt types.
+
+ This file will be included by the library itself when needed.
+*/
+
+#ifndef BOOST_INCLUDED_XINT_INTERNALS_HPP
+#define BOOST_INCLUDED_XINT_INTERNALS_HPP
+
+// Leave this commented out to use it as a header-only library.
+//#define BOOST_XINT_COMPILED_LIB
+
+#include <string>
+#include <vector>
+#include <queue>
+#include <limits>
+#include <cstddef> // for size_t
+#include <cassert>
+#include <boost/integer.hpp>
+#include <boost/cstdint.hpp>
+#include <boost/function.hpp>
+#include <boost/type_traits.hpp>
+#include <boost/static_assert.hpp>
+
+// Uncomment this to use Boost.Move, which can improve the speed when using
+// extremely large numbers.
+//#define BOOST_XINT_USE_MOVE
+
+#ifdef BOOST_XINT_USE_MOVE
+ #include <boost/move/move.hpp>
+ #define BOOST_XINT_COPY_ASSIGN_REF(type) BOOST_COPY_ASSIGN_REF(type)
+ #define BOOST_XINT_COPYABLE_AND_MOVABLE(type) BOOST_COPYABLE_AND_MOVABLE(type)
+ #define BOOST_XINT_RV_REF(type) BOOST_RV_REF(type)
+ #define BOOST_XINT_MOVE(value) boost::move(value)
+ #define BOOST_XINT_FORWARD(type, value) boost::forward<type>(value)
+#else
+ template <typename T> class disable_boost_rv_ref: public T { };
+ #define BOOST_XINT_COPY_ASSIGN_REF(type) const type&
+ #define BOOST_XINT_COPYABLE_AND_MOVABLE(type)
+ #define BOOST_XINT_RV_REF(type) disable_boost_rv_ref<type>
+ #define BOOST_XINT_MOVE(value) value
+ #define BOOST_XINT_FORWARD(type, value) value
+#endif
+
+namespace boost {
+
+//! \brief All the types and functions of the library are within this namespace.
+namespace xint {
+
+//! \brief A callback function takes no parameters and returns a bool.
+typedef boost::function<bool ()> callback_t;
+
+//! \brief An empty callback_t, used as a default parameter for some functions.
+const callback_t no_callback;
+
+//! \brief The format for the binary representations of %integers.
+typedef std::vector<unsigned char> binary_t;
+
+//! \brief A value that can be used for the 'base' parameter of the
+//! string-to-integer constructor functions.
+const size_t autobase = (std::numeric_limits<size_t>::max)();
+
+//! \brief Holds the results from a division-with-remainder call.
+template <class T>
+class base_divide_t {
+ public:
+ base_divide_t() { }
+ base_divide_t(const T& q, const T& r): quotient(q), remainder(r) { }
+ base_divide_t(const base_divide_t<T>& copy):
+ quotient(copy.quotient), remainder(copy.remainder) { }
+ base_divide_t(BOOST_XINT_RV_REF(base_divide_t) move) {
+ quotient._swap(move.quotient); remainder._swap(move.remainder); }
+
+ base_divide_t& operator=(BOOST_XINT_COPY_ASSIGN_REF(base_divide_t) copy)
+ { quotient = copy.quotient; remainder = copy.remainder; return *this; }
+ base_divide_t& operator=(BOOST_XINT_RV_REF(base_divide_t) move) {
+ using std::swap;
+ swap(quotient, move.quotient);
+ swap(remainder, move.remainder);
+ return *this; }
+
+ T quotient, remainder;
+
+ private:
+ BOOST_XINT_COPYABLE_AND_MOVABLE(base_divide_t)
+};
+
+//! \brief The items within this namespace are meant for internal use only.
+namespace detail {
+//! @cond detail
+
+/*!
+ This is the type used for calculations. It should be the largest
+ built-in integral type the system can offer, for maximum processing
+ efficiency.
+*/
+typedef boost::uintmax_t doubledigit_t;
+
+/*!
+ This is the type used to store information about the %integer. It must
+ contain at least half the number of bits that a doubledigit_t can hold,
+ and is most memory-efficient when it's exactly that.
+*/
+typedef boost::uint_t<std::numeric_limits<doubledigit_t>::digits / 2>::fast
+ digit_t;
+
+//! \name Some constants used by the library.
+//!@{
+const size_t minimum_digits = 1;
+const size_t bits_per_digit = std::numeric_limits<digit_t>::digits;
+const size_t digits_in_uintmax =
+ (std::numeric_limits<boost::uintmax_t>::digits + bits_per_digit - 1) /
+ bits_per_digit;
+const digit_t digit_hibit = (digit_t(1) << (bits_per_digit-1));
+const doubledigit_t doubledigit_hibit = (doubledigit_t(1) << (bits_per_digit*2-1));
+const doubledigit_t digit_overflowbit = (doubledigit_t(1) << bits_per_digit);
+const digit_t digit_mask = digit_t(digit_overflowbit-1);
+//!@}
+
+////////////////////////////////////////////////////////////////////////////////
+
+//! Holds the magnitude digits of an integer. Uses the "struct hack" -- look it
+//! up if you're not familiar with it.
+struct raw_digits_t {
+ private:
+ size_t copy_count;
+
+ public:
+ const size_t max_length;
+ const bool readonly;
+ digit_t digits[minimum_digits]; // Must be last data item, see "struct hack"
+
+ raw_digits_t(size_t max_len = 1, bool ro = false);
+ raw_digits_t(size_t max_len, bool ro, digit_t init);
+ size_t copy(const raw_digits_t& c, size_t length = 0);
+ void copy(const digit_t *s, size_t length);
+ size_t zero(size_t length = 0);
+ size_t copies() const;
+
+ friend class base_digitmanager_t;
+};
+
+const size_t datasize = (sizeof(raw_digits_t) + sizeof(digit_t) - 1) /
+ sizeof(digit_t);
+
+//! Stores and manages the raw digits.
+class base_digitmanager_t {
+ public:
+ base_digitmanager_t(): raw_data(0) { }
+ virtual ~base_digitmanager_t() { };
+
+ raw_digits_t *get() { return raw_data; }
+ const raw_digits_t *get() const { return raw_data; }
+ void reset(raw_digits_t *p) { if (raw_data != p) { dec(); raw_data = p;
+ inc(); } }
+
+ raw_digits_t* operator->() { return raw_data; }
+ const raw_digits_t* operator->() const { return raw_data; }
+ void copy(base_digitmanager_t *c, size_t length) { raw_data->copy(
+ *c->raw_data, length); }
+
+ void resize_and_uniquify(size_t new_requested_max_length = 0);
+
+ virtual base_digitmanager_t *new_of_type(base_digitmanager_t *copy = 0)
+ const = 0;
+ virtual size_t fixed_length() const { return 0; }
+
+ /*! \name Modification Hooks
+
+ beforemod and aftermod will be called once per modification, before the
+ first beginmod does any work and after the last endmod finishes. The
+ default implementations do nothing.
+ */
+ //@{
+ virtual void beforemod() { }
+ virtual void aftermod() { }
+ virtual void endmod_hook(digit_t*) { }
+ //@}
+
+ protected:
+ void inc() { if (raw_data) ++raw_data->copy_count; }
+ void dec() { if (raw_data && --raw_data->copy_count == 0)
+ dealloc(raw_data); }
+
+ raw_digits_t *alloc(size_t requested_length, bool readonly = false)
+ const;
+ raw_digits_t *realloc(raw_digits_t *data, size_t new_requested_length)
+ const;
+ void dealloc(raw_digits_t *data) const;
+
+ /*! \name Interface to memory allocation.
+
+ These could be static functions, since they don't access any existing
+ data, but static functions can't be virtual.
+ */
+ //@{
+ virtual digit_t* raw_allocate(size_t requested_length) const = 0;
+ virtual digit_t* raw_reallocate(digit_t *data, size_t new_requested_length)
+ const { return 0; }
+ virtual void raw_deallocate(digit_t *data, size_t length) const = 0;
+ //@}
+
+ virtual raw_digits_t *zerodata() const = 0;
+
+ raw_digits_t *raw_data;
+
+ friend void swap(base_digitmanager_t& p1, base_digitmanager_t& p2);
+};
+
+//! This is the allocator-based version of base_digitmanager_t, with a few other
+//! features.
+template <class Alloc = std::allocator<digit_t>, bool Threadsafe = true, bool
+ Secure = false>
+class digitmanager_t: public base_digitmanager_t {
+ BOOST_STATIC_ASSERT(sizeof(typename Alloc::value_type) == sizeof(digit_t));
+
+ public:
+ digitmanager_t() { reset(zerodata()); }
+ digitmanager_t(size_t requested_length, bool readonly = false)
+ { if (requested_length > 0) reset(alloc(requested_length, readonly)); }
+ digitmanager_t(const base_digitmanager_t& copy) {
+ base_digitmanager_t& c(const_cast<base_digitmanager_t&>(copy));
+ reset(c.get()); }
+ virtual ~digitmanager_t() { dec(); }
+
+ virtual base_digitmanager_t *new_of_type(base_digitmanager_t *copy = 0)
+ const { if (copy != 0) return new digitmanager_t<Alloc, Threadsafe,
+ Secure>(*copy); else return new digitmanager_t<Alloc, Threadsafe,
+ Secure>; }
+ virtual void aftermod() { if (Threadsafe && raw_data && raw_data->copies() >
+ 1) resize_and_uniquify(); }
+
+ protected:
+ virtual digit_t* raw_allocate(size_t requested_length) const {
+ return allocator.allocate(requested_length); }
+ virtual void raw_deallocate(digit_t *data, size_t length) const {
+ if (Secure) memset(data, 0, length * sizeof(digit_t));
+ allocator.deallocate(data, length); }
+ virtual raw_digits_t *zerodata() const { static digitmanager_t z(1, true);
+ return z.raw_data; }
+
+ static Alloc allocator;
+};
+
+template <class Alloc, bool Threadsafe, bool Secure>
+Alloc digitmanager_t<Alloc, Threadsafe, Secure>::allocator;
+
+////////////////////////////////////////////////////////////////////////////////
+
+//! Interface between the raw data and the functions that manipulate it.
+struct data_t {
+ typedef base_divide_t<data_t> divide_t;
+
+ size_t length;
+ bool negative;
+
+ explicit data_t(base_digitmanager_t &holder, size_t len = 1, bool neg =
+ false);
+ explicit data_t(base_digitmanager_t *holder);
+ data_t(const data_t& copy);
+ data_t(const data_t& copy, bool negative);
+ ~data_t();
+
+ template <typename T>
+ data_t(base_digitmanager_t *holder_to_copy, T n, size_t prealloc = 0,
+ typename boost::enable_if<boost::is_integral<T> >::type* = 0);
+
+ base_digitmanager_t *new_holder() const;
+ const base_digitmanager_t *holder() const;
+
+ data_t duplicate() const;
+ void duplicate_data(const data_t copy);
+
+ void reset(data_t p);
+ data_t& operator=(const data_t& p);
+
+ bool same_storage(const data_t n) const;
+ bool is_unique() const;
+ void make_unique();
+
+ void set(int n);
+ void set_signed(boost::intmax_t n);
+ void set_unsigned(boost::uintmax_t n, bool neg = false);
+
+ digit_t get_digit(size_t i) const;
+ digit_t operator[](size_t i);
+ digit_t operator[](size_t i) const { return get_digit(i); }
+ digit_t *digits();
+ const digit_t *digits() const;
+ size_t max_length() const;
+ bool is_fixed_length() const { return (dataholder->fixed_length() > 0); }
+
+ bool is_zero() const;
+ const data_t abs() const;
+ const data_t negate() const;
+
+ void extend(size_t new_length = 0, bool skip_mod = false);
+
+ void from_string(const char *str, size_t length, size_t base);
+ void from_string(const char *str, char **endptr, size_t base);
+ void from_string(const std::string& str, size_t base = 10);
+ void from_binary(xint::binary_t b, size_t bits = 0);
+
+ /*! \name Modification hooks
+
+ You must call beginmod (with an optional minimum size) before any
+ operation that modifies the data (other than simply the negative flag),
+ and endmod after it.
+ */
+ //!@{
+ void beginmod(size_t requested_size = 0, bool extend = false);
+ void endmod(bool allow_negative_zero = false);
+ void beginendmod() { beginmod(); digits(); endmod(true); }
+ //!@}
+
+ int sign(bool signed_zero = false) const;
+ bool is_odd() const;
+ bool is_even() const;
+ bool is_nan() const { return (dataholder->get() == 0); }
+ size_t hex_digits() const;
+
+ data_t& operator++(); // Preincrement
+ data_t& operator--(); // Predecrement
+ data_t operator++(int); // Postincrement
+ data_t operator--(int); // Postdecrement
+
+ bool operator!() const { return is_zero(); }
+ data_t operator-() const;
+ data_t& operator+() { return *this; }
+ const data_t& operator+() const { return *this; }
+ // Fixed-size types can also implement operator~
+
+ data_t& operator+=(const data_t b);
+ data_t& operator-=(const data_t b);
+ data_t& operator*=(const data_t b);
+ data_t& operator/=(const data_t b);
+ data_t& operator%=(const data_t b);
+
+ data_t& operator&=(const data_t n);
+ data_t& operator|=(const data_t n);
+ data_t& operator^=(const data_t n);
+ data_t& operator<<=(size_t shift);
+ data_t& operator>>=(size_t shift);
+
+ static size_t bits_to_digits(size_t bits) { return (bits + bits_per_digit -
+ 1) / bits_per_digit; }
+
+ ////////////////////////////////////////////////////////////////////////////
+ private:
+ digit_t *digits(bool) { return (*dataholder)->digits; }
+
+ base_digitmanager_t * const dataholder;
+ const bool holder_managed_elsewhere;
+ size_t modcount;
+ size_t mod_requested_size;
+ bool mod_requested_extend;
+ bool call_endmod_hook;
+
+ friend void swap(data_t& p1, data_t& p2);
+};
+
+// Conversion functions
+template <typename T> T to(const data_t n, typename
+ boost::enable_if<boost::is_integral<T> >::type* = 0);
+std::string to_string(const data_t n, size_t base = 10, bool uppercase = false);
+xint::binary_t to_binary(const data_t n, size_t bits = 0);
+
+// Bit-manipulation functions
+bool getbit(const data_t n, size_t bit_index);
+void setbit(data_t& n, size_t bit_index);
+void clearbit(data_t& n, size_t bit_index);
+size_t lowestbit(const data_t n, size_t valueIfZero = 0);
+size_t highestbit(const data_t n, size_t valueIfZero = 0);
+
+// Random and prime number functions
+int is_prime(const data_t n, callback_t callback = no_callback);
+
+// Comparison Operators
+bool operator<(const data_t n1, const data_t n2);
+bool operator>(const data_t n1, const data_t n2);
+bool operator<=(const data_t n1, const data_t n2);
+bool operator>=(const data_t n1, const data_t n2);
+bool operator==(const data_t n1, const data_t n2);
+bool operator!=(const data_t n1, const data_t n2);
+
+// Mathematical operators
+data_t operator+(const data_t n1, const data_t n2);
+data_t operator-(const data_t n1, const data_t n2);
+data_t operator*(const data_t n1, const data_t n2);
+data_t operator/(const data_t n1, const data_t n2);
+data_t operator%(const data_t n1, const data_t n2);
+
+// Bitwise operators
+data_t operator&(const data_t n1, const data_t n2);
+data_t operator|(const data_t n1, const data_t n2);
+data_t operator^(const data_t n1, const data_t n2);
+
+// Shift operators
+data_t operator<<(const data_t n, size_t by);
+data_t operator>>(const data_t n, size_t by);
+
+// Miscellaneous
+data_t abs(const data_t n);
+size_t log2(const data_t n);
+int compare(const data_t n1, const data_t n2, bool ignoresign = false);
+
+void pow(data_t& target, const data_t n, const data_t exponent);
+void pow2(data_t& target, size_t exponent);
+void factorial(data_t& target, size_t n);
+
+void sqrt(data_t& target, const data_t n);
+
+void gcd(data_t& target, const data_t num1, const data_t num2);
+void lcm(data_t& target, const data_t num1, const data_t num2);
+void invmod(data_t& target, const data_t n, const data_t modulus);
+
+void mulmod(data_t& target, const data_t n, const data_t by, const data_t
+ modulus);
+void sqrmod(data_t& target, const data_t n, const data_t modulus);
+void powmod(data_t& target, const data_t n, const data_t exponent, const data_t
+ modulus, bool noMontgomery=false);
+
+void square(data_t& target, const data_t n);
+data_t::divide_t divide(const data_t d1, const data_t d2);
+void divide(data_t& qtarget, data_t& rtarget, const data_t d1, const data_t d2);
+
+size_t log10_bits(size_t bits);
+
+//! @endcond detail
+} // namespace detail
+} // namespace xint
+} // namespace boost
+
+////////////////////////////////////////////////////////////////////////////////
+// Function templates
+
+#include "../exceptions.hpp"
+
+namespace boost {
+namespace xint {
+namespace detail {
+//! @cond detail
+
+size_t log2_base(boost::uintmax_t n, size_t maxbits);
+
+template <typename T>
+data_t::data_t(base_digitmanager_t *holder, T n, size_t prealloc, typename
+ boost::enable_if<boost::is_integral<T> >::type*): dataholder(holder),
+ holder_managed_elsewhere(false), modcount(0)
+{
+ beginmod(prealloc);
+ if (std::numeric_limits<T>::is_signed) set_signed(n);
+ else set_unsigned(n);
+ endmod();
+}
+
+template <typename T>
+size_t log2_helper(const T n,
+ typename boost::enable_if<boost::is_unsigned<T> >::type* = 0)
+{
+ return log2_base(n, std::numeric_limits<T>::digits);
+}
+
+template <typename T>
+size_t log2_helper(const T n,
+ typename boost::enable_if<boost::is_signed<T> >::type* = 0)
+{
+ typedef typename boost::make_unsigned<T>::type uT;
+ T nn = (n < 0 ? -n : n);
+ return log2_base(static_cast<uT>(nn), std::numeric_limits<T>::digits);
+}
+
+template <typename T>
+size_t log2(const T n,
+ typename boost::enable_if<boost::is_integral<T> >::type* = 0)
+{
+ return log2_helper(n);
+}
+
+template <typename T>
+T to(const data_t n, typename boost::enable_if<boost::is_integral<T> >::type*) {
+ using std::numeric_limits;
+
+ // We've got to use an unfixed manager, rather than n's manager, because
+ // the first n might be a fixed_integer_t which would screw up later calls
+ // for other types.
+ static digitmanager_t<> unfixed_manager;
+ static const data_t min(unfixed_manager.new_of_type(),
+ (numeric_limits<T>::min)());
+ static const data_t max(unfixed_manager.new_of_type(),
+ (numeric_limits<T>::max)());
+ if (n < min || n > max) throw exceptions::too_big("value out of range for "
+ "requested conversion");
+
+ T rval = 0, shift = T(digit_overflowbit);
+ for (size_t x = 0; x < n.length; ++x) {
+ if (sizeof(T) > sizeof(digit_t)) rval *= shift;
+ rval += static_cast<T>(n[n.length - x - 1]);
+ }
+ if (n.negative) rval *= -1;
+ return rval;
+}
+
+template <typename charT, typename traits>
+inline std::basic_ostream<charT,traits>& operator<<(std::basic_ostream<charT,
+ traits>& out, const data_t n)
+{
+ int base=((out.flags() & std::ios::hex) ? 16
+ : (out.flags() & std::ios::oct) ? 8
+ : 10);
+ bool upperCase=(out.flags() & std::ios::uppercase ? true : false);
+
+ int nsign = (n.is_zero() ? 0 : n.negative ? -1 : 1);
+ if ((out.flags() & std::ios::showpos) && nsign >= 0) out << "+";
+
+ if (out.flags() & std::ios::showbase) {
+ if (nsign < 0) out << "-";
+
+ if (base==16 && upperCase) out << "0X";
+ else if (base==16) out << "0x";
+ else if (base==8) out << "0";
+
+ out << to_string(n.abs(), base, upperCase);
+ } else {
+ out << to_string(n, base, upperCase);
+ }
+ return out;
+}
+
+template <typename charT, typename traits>
+inline std::basic_istream<charT,traits>& operator>>(std::basic_istream<charT,
+ traits>& in, data_t& n)
+{
+ int hex=(in.flags() & std::ios::hex) ? 1 : 0;
+ int dec=(in.flags() & std::ios::dec) ? 1 : 0;
+ int oct=(in.flags() & std::ios::oct) ? 1 : 0;
+ int count=hex+dec+oct;
+
+ size_t base=autobase;
+ if (count==1) {
+ if (hex) base=16;
+ else if (oct) base=8;
+ else base=10;
+ } else if (count>1) base=10;
+ // else auto-base
+
+ std::string s;
+ if (in.peek()=='+') {
+ in.ignore();
+ } else if (in.peek()=='-') {
+ in.ignore();
+ s.push_back('-');
+ }
+
+ if (base==autobase) {
+ if (in.peek()=='0') {
+ in.ignore();
+ int c=in.peek();
+ if (c=='x' || c=='X') {
+ in.ignore();
+ base=16;
+ } else base=8;
+ } else base=10;
+ }
+
+ while (in) {
+ int c=in.peek();
+ if ((base==8 && (c>='0' && c<='7')) ||
+ (base==10 && (c>='0' && c<='9')) ||
+ (base==16 && ((c>='0' && c<='9') || (c>='a' && c<='f') ||
+ (c>='A' && c<='F'))))
+ {
+ in.ignore();
+ s.push_back(char(c));
+ } else break;
+ }
+
+ try {
+ n.from_string(s, base);
+ } catch (std::exception&) {
+ // Catch invalid strings
+ in.setstate(std::ios::failbit);
+ }
+
+ return in;
+}
+
+//! @endcond detail
+} // namespace detail
+} // namespace xint
+} // namespace boost
+
+namespace boost {
+namespace xint {
+//! \brief A base class for all %integer types.
+class any_integer {
+ #ifndef BOOST_XINT_DOXYGEN_IGNORE
+ public:
+ detail::data_t& _data() { return data; }
+ const detail::data_t& _data() const { return data; }
+
+ size_t _get_length() const { return data.length; }
+ detail::digit_t _get_digit(size_t index) const { return data[index]; }
+ bool _is_fixed() const { return data.is_fixed_length(); }
+
+ protected:
+ any_integer(detail::base_digitmanager_t &holder, size_t len, bool neg =
+ false): data(holder, len, neg) { }
+ bool _is_nan() const { return data.is_nan(); }
+
+ detail::data_t data;
+ #endif
+};
+} // namespace xint
+} // namespace boost
+
+#ifndef BOOST_XINT_COMPILED_LIB
+ #include "../exceptions.hpp"
+ #include "../random.hpp"
+ #include "bitqueue.hpp"
+ #ifdef _WIN32
+ #define STRICT
+ #define WIN32_LEAN_AND_MEAN
+ #define NOMINMAX
+ #include <windows.h>
+ #endif
+ #include <sstream>
+ #include <fstream>
+ #include <ctime>
+ #include <boost/scoped_array.hpp>
+ #define BOOST_XINT_INLINE inline
+
+ #define BOOST_XINT_FROM_HEADER
+ #include "data_t.cpp"
+ #include "compare.cpp"
+ #include "shift.cpp"
+ #include "bitfunctions.cpp"
+ #include "andorxor.cpp"
+ #include "addsubtract.cpp"
+ #include "multiply.cpp"
+ #include "divide.cpp"
+ #include "powers.cpp"
+ #include "roots.cpp"
+ #include "monty.cpp"
+ #include "modular.cpp"
+ #include "gcd.cpp"
+ #include "convert.cpp"
+ #include "prime.cpp"
+ #include "random.cpp"
+ #undef BOOST_XINT_FROM_HEADER
+#else
+ #define BOOST_XINT_INLINE
+#endif // BOOST_XINT_COMPILED_LIB
+
+#endif // BOOST_INCLUDED_XINT_INTERNALS_HPP

Added: sandbox/xint/boost/xint/detail/modular.cpp
==============================================================================
--- (empty file)
+++ sandbox/xint/boost/xint/detail/modular.cpp 2010-05-31 20:43:54 EDT (Mon, 31 May 2010)
@@ -0,0 +1,95 @@
+
+/*
+ The Extended Integer (XInt) Library
+ A fast, portable C++ library for multi-precision integer math
+ Copyright 2010 by Chad Nelson
+
+ Distributed under the Boost Software License, Version 1.0.
+ See accompanying file LICENSE_1_0.txt or copy at
+ http://www.boost.org/LICENSE_1_0.txt
+
+ See http://www.boost.org/libs/xint for library home page.
+*/
+
+/*! \file
+ \brief Contains the modular math functions.
+
+ This file will be included by the library itself when needed.
+*/
+
+#if defined(BOOST_XINT_COMPILED_LIB) || defined(BOOST_XINT_FROM_HEADER)
+
+#if defined(BOOST_XINT_COMPILED_LIB)
+ #include "internals.hpp"
+ #include "monty.hpp"
+#endif // defined(BOOST_XINT_COMPILED_LIB)
+
+//! @cond detail
+namespace boost {
+namespace xint {
+namespace detail {
+
+BOOST_XINT_INLINE void mulmod(data_t& target, const data_t n, const data_t by,
+ const data_t modulus)
+{
+ target.duplicate_data(n);
+ target *= by;
+ target %= modulus;
+}
+
+BOOST_XINT_INLINE void sqrmod(data_t& target, const data_t n, const data_t
+ modulus)
+{
+ square(target, n);
+ target %= modulus;
+}
+
+BOOST_XINT_INLINE void powmod(data_t& target, const data_t n, const data_t e,
+ const data_t m, bool noMontgomery)
+{
+ if (m.is_zero() || m.negative) throw exceptions::invalid_modulus();
+ if (e.is_zero()) { target.set(1); return; }
+
+ bool neg = (n.negative && e.is_odd());
+
+ // Montgomery's method is often noticeably faster, but only works if the
+ // m is odd.
+ if (m.is_odd() && !noMontgomery) {
+ montgomeryPowerMod(target, abs(n) % m, abs(e), m);
+ } else {
+ data_t answer(target.new_holder(), 1), p(abs(n));
+ answer.beginmod();
+ p.beginmod();
+
+ size_t lastBitCount = 0;
+ detail::digit_t ee(e[e.length - 1]);
+ while (ee != 0) { ee >>= 1; ++lastBitCount; }
+
+ for (size_t eIndex = 0; eIndex < e.length; ++eIndex) {
+ detail::digit_t ee(e[eIndex]);
+
+ int bitCount(int(eIndex == e.length - 1 ? lastBitCount :
+ detail::bits_per_digit));
+ while (bitCount-- > 0) {
+ if (ee & 0x01) {
+ answer *= p;
+ answer %= m;
+ }
+ sqrmod(p, p, m);
+ ee >>= 1;
+ }
+ }
+ answer.negative = neg;
+ p.endmod();
+ answer.endmod();
+
+ target.duplicate_data(answer);
+ }
+}
+
+} // namespace detail
+} // namespace xint
+} // namespace boost
+//! @endcond detail
+
+#endif // defined(BOOST_XINT_COMPILED_LIB) || defined(BOOST_XINT_FROM_HEADER)

Added: sandbox/xint/boost/xint/detail/monty.cpp
==============================================================================
--- (empty file)
+++ sandbox/xint/boost/xint/detail/monty.cpp 2010-05-31 20:43:54 EDT (Mon, 31 May 2010)
@@ -0,0 +1,269 @@
+
+/*
+ The Extended Integer (XInt) Library
+ A fast, portable C++ library for multi-precision integer math
+ Copyright 2010 by Chad Nelson
+
+ Distributed under the Boost Software License, Version 1.0.
+ See accompanying file LICENSE_1_0.txt or copy at
+ http://www.boost.org/LICENSE_1_0.txt
+
+ See http://www.boost.org/libs/xint for library home page.
+*/
+
+/*! \file
+ \brief Contains the Montgomery Reduction functions.
+
+ This file will be included by the library itself when needed.
+*/
+
+#if defined(BOOST_XINT_COMPILED_LIB) || defined(BOOST_XINT_FROM_HEADER)
+
+#if defined(BOOST_XINT_COMPILED_LIB)
+ #include "internals.hpp"
+ #include "bitqueue.hpp"
+ #include <boost/scoped_array.hpp>
+#endif // defined(BOOST_XINT_COMPILED_LIB)
+
+//! @cond detail
+namespace boost {
+namespace xint {
+namespace detail {
+
+//! Returns the low digit of the inverse of a number.
+BOOST_XINT_INLINE digit_t inverse0(const data_t n) {
+ // Using the Dussé and Kalisk simplification
+ doubledigit_t x = 2, y = 1;
+ digit_t n0 = n[0];
+ for (size_t i = 2; i <= bits_per_digit; ++i, x <<= 1)
+ if (x < ((n0 * y) & ((x << 1) - 1)))
+ y += x;
+ return digit_t(x - y);
+}
+
+/*! \brief Returns the most efficient R value for a number and the library's
+ internal representation. Used internally.
+*/
+BOOST_XINT_INLINE data_t montgomeryR(const data_t n) {
+ data_t r(n.new_holder());
+ pow2(r, bits_per_digit * n.length);
+ return r;
+}
+
+//! Returns the Montgomery form of a number. Used for testing.
+BOOST_XINT_INLINE void toMontgomeryForm(data_t& target, const data_t n, const
+ data_t m)
+{
+ target.duplicate_data(n * montgomeryR(m) % m);
+}
+
+//! Returns the integer from the Montgomery form of a number. Used for testing.
+BOOST_XINT_INLINE void fromMontgomeryForm(data_t& target, const data_t n, const
+ data_t m)
+{
+ data_t mont(montgomeryR(m));
+
+ data_t inv(target.new_holder());
+ invmod(inv, mont, m);
+
+ target.duplicate_data(n * inv % m);
+}
+
+/*! \brief The Montgomery equivalent of <code>mulmod(a, b, n)</code>. Used
+ internally.
+*/
+BOOST_XINT_INLINE data_t montgomeryMultiplyMod(const data_t a, const data_t b,
+ const data_t n, digit_t nPrime0)
+{
+ // Using the Dussé and Kalisk simplification
+ // Unstated parameter B is a power of two representing the number of values
+ // that a single digit can hold, i.e. digit_overflowbit
+ // Unstated parameter L is the number of digits in the modulus, i.e.
+ // n.length
+ // Unstated parameter r is B^L
+ // nPrime0 is nPrime mod B, or digit zero of nPrime
+
+ const size_t L(n.length);
+
+ size_t i = 0;
+ data_t t(a * b), mi(a.new_holder(), 0, n.length + 1);
+ t.beginmod();
+ mi.beginmod();
+
+ do {
+ mi.set_unsigned(digit_t(t[i] * nPrime0));
+ mi *= n;
+ mi <<= (bits_per_digit * i);
+ t += mi;
+ } while (++i < L);
+
+ t >>= (bits_per_digit * L); // Fast divide by r
+
+ if (t >= n) t -= n;
+ mi.endmod();
+ t.endmod();
+
+ return BOOST_XINT_MOVE(t);
+}
+
+// cMaxK sets the balance between memory/precalculations required and the number
+// of calculations required for an exponentiation. Increasing it can only reduce
+// the calculations by a small amount, whereas it increases the memory
+// requirements and number of precalculations by an exponential amount. 8
+// provides a good balance.
+const size_t cMaxK = 8;
+typedef boost::uint_t<cMaxK>::fast kbitdigit_t; // k bits have to fit into it
+typedef std::vector<kbitdigit_t> vkbitdigit_t;
+typedef std::vector<data_t> vxint_t;
+#define ddPowerOfTwo(p) (doubledigit_t(1) << p)
+
+// The splitIntoKBitDigits function assumes that cMaxK <= bits_per_digit+1,
+// it won't work properly if it isn't.
+BOOST_STATIC_ASSERT(cMaxK <= bits_per_digit + 1);
+
+// Make it a template so that the static variable won't cause problems in
+// header-only mode.
+template <typename T = void>
+class TUTable {
+ public:
+ typedef std::pair<int, int> value_t;
+
+ const value_t& operator[](size_t x) const { return mTable[x]; }
+
+ static const TUTable& get() {
+ // Construct a singleton instance on demand
+ if (mPtr.get()==0) mPtr.reset(new TUTable);
+ return *mPtr;
+ }
+
+ private:
+ TUTable(): mTable(new value_t[ddPowerOfTwo(cMaxK)]) {
+ value_t *p=&mTable[0], *pe=p+ddPowerOfTwo(cMaxK);
+ *p++=std::make_pair(0, 0);
+ int i=1;
+ while (p!=pe) *p++=calculateValues(i++);
+ }
+
+ std::pair<int, int> calculateValues(int x) {
+ int r=0;
+ while (1) {
+ if (x & 0x01) return std::make_pair(r, x);
+ ++r;
+ x >>= 1;
+ }
+ }
+
+ static std::auto_ptr<TUTable<T> > mPtr;
+
+ boost::scoped_array<value_t> mTable;
+};
+
+template <typename T>
+std::auto_ptr<TUTable<T> > TUTable<T>::mPtr;
+
+BOOST_XINT_INLINE int mostEfficientK(const data_t e) {
+ doubledigit_t k = cMaxK, kTarget = log2(e) - 1;
+ while (k > 1 && ((k - 1) * (k << ((k - 1) << 1))
+ / (ddPowerOfTwo(k) - k - 1)) >= kTarget)
+ --k;
+ return int(k);
+}
+
+BOOST_XINT_INLINE vxint_t precalculateOddPowersOfAa(const data_t a, const data_t
+ r, const data_t n, size_t k)
+{
+ data_t zero(a.new_holder()), one(a.new_holder(), 1);
+ data_t aa = a * r % n, aSquared = a * a % n;
+
+ vxint_t rval;
+ rval.reserve(size_t(ddPowerOfTwo(k)));
+ rval.push_back(one); // Anything to the zeroth power is one
+ rval.push_back(aa); // Anything to the first power is itself
+
+ for (doubledigit_t i = 3, ie = ddPowerOfTwo(k); i < ie; i += 2) {
+ aa *= aSquared;
+ aa %= n;
+ rval.push_back(zero); // Even powers not needed or calculated
+ rval.push_back(aa); // Odd power
+ }
+
+ return rval;
+}
+
+BOOST_XINT_INLINE void montgomeryPowerMod(data_t& target, const data_t a, const
+ data_t e, const data_t n)
+{
+ // 0 <= a < n, n is odd
+ // Returns a^e mod n
+
+ const TUTable<> &tuTable(TUTable<>::get());
+
+ if (e.is_zero()) { target.set(1); return; }
+ if (n.is_even()) throw exceptions::invalid_modulus("montgomeryPowerMod "
+ "requires an odd modulus");
+
+ // Precalculate some values
+ const size_t k(mostEfficientK(e));
+ const data_t r(montgomeryR(n));
+ const digit_t nPrime0(inverse0(n));
+ const vxint_t oddPowersOfAa(precalculateOddPowersOfAa(a, r, n, k));
+
+ // Slice the exponent (e) up into k-bit digits
+ vkbitdigit_t eDigits;
+ {
+ bitqueue_t q;
+ for (const digit_t *dig = e.digits(), *i = dig, *ie = i + e.length;
+ i <ie; ++i) q.push(*i, bits_per_digit);
+
+ // The bitqueue_t returns them low-bits-first, we need to start with the
+ // high bits.
+ while (!q.empty()) eDigits.push_back(kbitdigit_t(q.pop(k)));
+ }
+
+ data_t pp(target.new_holder());
+ pp.beginmod();
+
+ while (eDigits.back() == 0) eDigits.pop_back();
+ kbitdigit_t i = eDigits.back();
+ eDigits.pop_back();
+
+ if (i == 0) {
+ pp = r % n;
+ } else {
+ std::pair<int, int> tu = tuTable[i];
+ pp = oddPowersOfAa[tu.second];
+ while (tu.first-- > 0) pp = montgomeryMultiplyMod(pp, pp, n, nPrime0);
+ }
+
+ while (!eDigits.empty()) {
+ i = eDigits.back();
+ eDigits.pop_back();
+
+ if (i == 0) {
+ int t = int(k);
+ while (t-- > 0) pp = montgomeryMultiplyMod(pp, pp, n, nPrime0);
+ } else {
+ std::pair<int, int> tu = tuTable[i];
+
+ size_t s = k - tu.first;
+ while (s-- > 0) pp = montgomeryMultiplyMod(pp, pp, n, nPrime0);
+
+ pp = montgomeryMultiplyMod(pp, oddPowersOfAa[tu.second], n,
+ nPrime0);
+
+ while (tu.first-- > 0) pp = montgomeryMultiplyMod(pp, pp, n,
+ nPrime0);
+ }
+ }
+ pp.endmod();
+
+ target.duplicate_data(montgomeryMultiplyMod(pp, data_t(target.new_holder(),
+ 1), n, nPrime0));
+}
+
+} // namespace detail
+} // namespace xint
+} // namespace boost
+//! @endcond detail
+
+#endif // defined(BOOST_XINT_COMPILED_LIB) || defined(BOOST_XINT_FROM_HEADER)

Added: sandbox/xint/boost/xint/detail/monty.hpp
==============================================================================
--- (empty file)
+++ sandbox/xint/boost/xint/detail/monty.hpp 2010-05-31 20:43:54 EDT (Mon, 31 May 2010)
@@ -0,0 +1,46 @@
+
+/*
+ The Extended Integer (XInt) Library
+ A fast, portable C++ library for multi-precision integer math
+ Copyright 2010 by Chad Nelson
+
+ Distributed under the Boost Software License, Version 1.0.
+ See accompanying file LICENSE_1_0.txt or copy at
+ http://www.boost.org/LICENSE_1_0.txt
+
+ See http://www.boost.org/libs/xint for library home page.
+*/
+
+/*! \file
+ \brief Montgomery Reduction functions.
+
+ This file declares the functions that use the Montgomery Reduction. They are
+ used internally to speed up the xint::powmod function for odd modulii.
+*/
+
+#ifndef BOOST_INCLUDED_XINT_MONTY_HPP
+#define BOOST_INCLUDED_XINT_MONTY_HPP
+
+//! @cond detail
+namespace boost {
+namespace xint {
+namespace detail {
+
+//! \name Montgomery Reduction functions
+//!@{
+digit_t inverse0(const data_t n);
+data_t montgomeryR(const data_t n);
+void toMontgomeryForm(data_t& target, const data_t n, const data_t m);
+void fromMontgomeryForm(data_t& target, const data_t n, const data_t m);
+data_t montgomeryMultiplyMod(const data_t x, const data_t y, const data_t m,
+ digit_t nPrime0);
+void montgomeryPowerMod(data_t& target, const data_t x, const data_t e, const
+ data_t m);
+//!@}
+
+} // namespace detail
+} // namespace xint
+} // namespace boost
+//! @endcond detail
+
+#endif // BOOST_INCLUDED_XINT_MONTY_HPP

Added: sandbox/xint/boost/xint/detail/multiply.cpp
==============================================================================
--- (empty file)
+++ sandbox/xint/boost/xint/detail/multiply.cpp 2010-05-31 20:43:54 EDT (Mon, 31 May 2010)
@@ -0,0 +1,166 @@
+
+/*
+ The Extended Integer (XInt) Library
+ A fast, portable C++ library for multi-precision integer math
+ Copyright 2010 by Chad Nelson
+
+ Distributed under the Boost Software License, Version 1.0.
+ See accompanying file LICENSE_1_0.txt or copy at
+ http://www.boost.org/LICENSE_1_0.txt
+
+ See http://www.boost.org/libs/xint for library home page.
+*/
+
+/*! \file
+ \brief Contains the multiplication and squaring functions.
+
+ This file will be included by the library itself when needed.
+*/
+
+#if defined(BOOST_XINT_COMPILED_LIB) || defined(BOOST_XINT_FROM_HEADER)
+
+#if defined(BOOST_XINT_COMPILED_LIB)
+ #include "internals.hpp"
+#endif // defined(BOOST_XINT_COMPILED_LIB)
+
+//! @cond detail
+namespace boost {
+namespace xint {
+namespace detail {
+
+BOOST_XINT_INLINE void square(data_t& target, const data_t n) {
+ target.set(0);
+ target.beginmod(n.length * 2 + 1, true);
+
+ const digit_t *ndigits = n.digits();
+ size_t nlen = n.length;
+
+ digit_t *rdigits = target.digits(), *rmax = rdigits + target.length;
+
+ // Calculate the product of digits of unequal index
+ size_t i = 0;
+ doubledigit_t c;
+ do {
+ const doubledigit_t ii = ndigits[i];
+ const digit_t *jp = ndigits + i + 1;
+ digit_t *rp = rdigits + i + (i + 1), *rpe = rdigits + i + nlen;
+ if (rpe > rmax) rpe = rmax;
+
+ c = 0;
+ while (rp < rpe) {
+ doubledigit_t t = ii * *jp++ + *rp + c;
+ *rp++ = static_cast<digit_t>(t);
+ c = (t >> bits_per_digit);
+ }
+ if (rp < rmax) *rp = static_cast<digit_t>(c);
+ } while (++i < nlen - 1);
+
+ // Multiplication of inner products by two
+ c = 0;
+ digit_t *rp = rdigits + 1, *rpe = rdigits + (2 * nlen) - 1;
+ if (rpe > rmax) rpe = rmax;
+
+ if (rp < rmax) {
+ do {
+ doubledigit_t t = (doubledigit_t(*rp) << 1) + c;
+ *rp++ = static_cast<digit_t>(t);
+ c = (t >> bits_per_digit);
+ } while (rp < rpe);
+ if (rp < rmax) *rp = static_cast<digit_t>(c);
+ }
+
+ // Addition of inner squares
+ const digit_t *ip = ndigits, *ipe = ndigits + nlen;
+ rp = rdigits;
+ c = 0;
+ do {
+ doubledigit_t t = doubledigit_t(*ip) * *ip + *rp + c;
+ *rp++ = static_cast<digit_t>(t);
+ if (rp >= rmax) break;
+ c = (t >> bits_per_digit);
+
+ t = c + *rp;
+ *rp++ = static_cast<digit_t>(t);
+ if (rp >= rmax) break;
+ c = (t >> bits_per_digit);
+ } while (++ip < ipe);
+ if (rp < rmax) *rp += static_cast<digit_t>(c);
+
+ // No need to change length
+ target.negative = false;
+ target.endmod();
+}
+
+BOOST_XINT_INLINE void multiply(data_t& target, const data_t n, const data_t by)
+{
+ if (n.is_zero() || by.is_zero()) { target.set(0); return; }
+
+ if (n.same_storage(by)) {
+ if (n.negative != by.negative) {
+ square(target, n);
+ target.negative = true;
+ return;
+ } else {
+ square(target, n);
+ return;
+ }
+ }
+
+ target.length = 0;
+ target.beginmod(n.length + by.length, true);
+
+ digit_t *adigits = target.digits(), *ae = adigits + target.max_length();
+ size_t maxdigit = target.max_length(), nlen = n.length, bylen = by.length;
+
+ // Now multiply the digits, starting at the least-significant digit.
+ const digit_t *d1 = n.digits(), *d1e = d1 + (std::min)(nlen, maxdigit);
+ for (int digit1 = 0; d1 < d1e; ++digit1, ++d1) {
+ const digit_t *d2 = by.digits(), *d2e = d2 + (std::min)(bylen, maxdigit
+ - digit1);
+ for (int digit2 = 0; d2 < d2e; ++digit2, ++d2) {
+ // First multiply the two digits
+ doubledigit_t t = doubledigit_t(*d1) * *d2;
+
+ // Now add the result to the answer.
+ int carry=0;
+ digit_t *a = adigits + digit1 + digit2;
+ doubledigit_t addt = doubledigit_t(*a) + (t & digit_mask);
+ if (addt >= digit_overflowbit) carry=1;
+ *a++=static_cast<digit_t>(addt);
+
+ if (a < ae) {
+ addt = *a + ((t >> bits_per_digit) & digit_mask) + carry;
+ if (addt >= digit_overflowbit) carry=1; else carry=0;
+ *a++ = static_cast<digit_t>(addt);
+
+ while (carry && a < ae) {
+ addt = *a + 1;
+ *a++ = static_cast<digit_t>(addt);
+ if (addt < digit_overflowbit) break;
+ }
+ }
+ }
+ }
+
+ // No need to change length
+ target.negative = (n.negative != by.negative);
+ target.endmod();
+}
+
+BOOST_XINT_INLINE data_t& data_t::operator*=(const data_t by) {
+ multiply(*this, duplicate(), by);
+ return *this;
+}
+
+BOOST_XINT_INLINE data_t operator*(const data_t n1, const data_t n2) {
+ data_t r(n1.new_holder());
+ multiply(r, n1, n2);
+ return r;
+}
+
+} // namespace detail
+} // namespace xint
+} // namespace boost
+//! @endcond detail
+
+#endif // defined(BOOST_XINT_COMPILED_LIB) || defined(BOOST_XINT_FROM_HEADER)

Added: sandbox/xint/boost/xint/detail/powers.cpp
==============================================================================
--- (empty file)
+++ sandbox/xint/boost/xint/detail/powers.cpp 2010-05-31 20:43:54 EDT (Mon, 31 May 2010)
@@ -0,0 +1,110 @@
+
+/*
+ The Extended Integer (XInt) Library
+ A fast, portable C++ library for multi-precision integer math
+ Copyright 2010 by Chad Nelson
+
+ Distributed under the Boost Software License, Version 1.0.
+ See accompanying file LICENSE_1_0.txt or copy at
+ http://www.boost.org/LICENSE_1_0.txt
+
+ See http://www.boost.org/libs/xint for library home page.
+*/
+
+/*! \file
+ \brief Contains functions related to powers of a number.
+
+ This file will be included by the library itself when needed.
+*/
+
+#if defined(BOOST_XINT_COMPILED_LIB) || defined(BOOST_XINT_FROM_HEADER)
+
+#if defined(BOOST_XINT_COMPILED_LIB)
+ #include "internals.hpp"
+#endif // defined(BOOST_XINT_COMPILED_LIB)
+
+namespace boost {
+namespace xint {
+namespace detail {
+//! @cond detail
+
+BOOST_XINT_INLINE size_t count_one_bits(const data_t n) {
+ size_t r = 0;
+ for (const digit_t *p = n.digits(), *pe = p + n.length; p != pe; ++p) {
+ digit_t nn(*p);
+ while (nn != 0) {
+ if (nn & 0x01) ++r;
+ nn >>= 1;
+ }
+ }
+ return r;
+}
+
+BOOST_XINT_INLINE void pow(data_t& target, const data_t n, const data_t e) {
+ if (e.is_zero()) {
+ // Anything to the zeroth power is one.
+ target.set(1);
+ return;
+ } else if (e.negative) {
+ // Anything to a negative power is a fractional value, which an integer
+ // library can't represent.
+ target.set(0);
+ return;
+ }
+
+ bool neg = (!n.is_zero() && n.negative && e.is_odd());
+
+ size_t lastBitCount = 0;
+ digit_t ee(e[e.length - 1]);
+ while (ee != 0) { ee >>= 1; ++lastBitCount; }
+
+ data_t p(n.abs());
+ p.beginmod(data_t::bits_to_digits(log2(p) * log2(e)));
+
+ target.beginmod(data_t::bits_to_digits(log2(p) * count_one_bits(e)));
+ target.set(1);
+ for (size_t eIndex=0; eIndex < e.length; ++eIndex) {
+ digit_t eee(e[eIndex]);
+
+ int bitCount(int(eIndex == e.length - 1 ? lastBitCount :
+ bits_per_digit));
+ while (bitCount-- > 0) {
+ if (eee & 0x01) target *= p;
+ square(p, p);
+
+ eee >>= 1;
+ }
+ }
+ target.negative = neg;
+ target.endmod();
+
+ p.endmod();
+}
+
+BOOST_XINT_INLINE void pow2(data_t& target, size_t exponent) {
+ target.beginmod();
+ target.set(0);
+ setbit(target, exponent);
+ target.endmod();
+}
+
+BOOST_XINT_INLINE void factorial(data_t& target, size_t n) {
+ target.beginmod(data_t::bits_to_digits(n * log2(n / 2)) + 1);
+ target.set(1);
+
+ data_t one(target.new_holder(), 1);
+ data_t nn(target.new_holder(), n);
+ while (nn > one) {
+ target *= nn;
+ --nn;
+ }
+
+ target.endmod();
+}
+
+//! @endcond detail
+} // namespace detail
+} // namespace xint
+} // namespace boost
+
+#endif // defined(BOOST_XINT_COMPILED_LIB) || defined(BOOST_XINT_FROM_HEADER)

Added: sandbox/xint/boost/xint/detail/prime.cpp
==============================================================================
--- (empty file)
+++ sandbox/xint/boost/xint/detail/prime.cpp 2010-05-31 20:43:54 EDT (Mon, 31 May 2010)
@@ -0,0 +1,149 @@
+
+/*
+ The Extended Integer (XInt) Library
+ A fast, portable C++ library for multi-precision integer math
+ Copyright 2010 by Chad Nelson
+
+ Distributed under the Boost Software License, Version 1.0.
+ See accompanying file LICENSE_1_0.txt or copy at
+ http://www.boost.org/LICENSE_1_0.txt
+
+ See http://www.boost.org/libs/xint for library home page.
+*/
+
+/*! \file
+ \brief Contains the function definitions for the prime number functions.
+
+ This file will be included by the library itself when needed.
+*/
+
+#if defined(BOOST_XINT_COMPILED_LIB) || defined(BOOST_XINT_FROM_HEADER)
+
+#if defined(BOOST_XINT_COMPILED_LIB)
+ #include "internals.hpp"
+ #include "../random.hpp"
+#endif // defined(BOOST_XINT_COMPILED_LIB)
+
+//! @cond detail
+namespace boost {
+namespace xint {
+namespace detail {
+
+BOOST_XINT_INLINE std::vector<int> sieveOfEratosthenes(int upTo) {
+ std::vector<int> sieve;
+ sieve.reserve(upTo);
+
+ // Zero and one aren't prime, by definition.
+ sieve.push_back(0);
+ sieve.push_back(0);
+
+ for (int p = 2; p < upTo; ++p) sieve.push_back(p);
+
+ std::vector<int> ret;
+
+ int *p = &sieve[0], *e = p + upTo;
+ while (p < e) {
+ if (*p == 0) { ++p; continue; }
+ ret.push_back(*p);
+
+ int *p2 = p + (*p);
+ while (p2 < e) { *p2 = 0; p2 += *p; }
+
+ ++p;
+ }
+
+ return ret;
+}
+
+// The Miller-Rabin Probabilistic Test of Primality
+BOOST_XINT_INLINE int isProbablePrimeBaseB(const data_t n, const data_t b,
+ callback_t callback)
+{
+ const data_t one(n.new_holder(), 1), nMinus1(n - one);
+
+ // Find r and a satisfying: n - 1 = 2^a * r, r odd
+ data_t r(nMinus1);
+ unsigned long a = 0;
+ while (r.is_even()) { r >>= 1; ++a; }
+
+ // We check the congruence class of b^((2^i)r) % n for each i
+ // from 0 to a - 1. If any one is correct, then n passes.
+ // Otherwise, n fails.
+ data_t test(n.new_holder());
+ powmod(test, b, r, n);
+ if (test == one || test == nMinus1) return 1; // Better than 3/4 chance it's prime
+
+ while (a-- > 0) {
+ sqrmod(test, test, n);
+ if (test == nMinus1) return 1;
+ }
+
+ if (callback && !callback()) return -1;
+ return 0;
+}
+
+BOOST_XINT_INLINE int is_prime(const data_t n, callback_t callback) {
+ data_t tmp(n.new_holder(), 2);
+ if (n < tmp) throw exceptions::invalid_argument("xint::is_prime cannot "
+ "test numbers below 2");
+
+ // First we trial-divide it by the primes below 2000
+ static const std::vector<int> low_primes(sieveOfEratosthenes(2000));
+ const data_t zero(n.new_holder());
+ std::vector<int>::const_iterator i = low_primes.begin(), ie =
+ low_primes.end();
+ for (; i != ie; ++i) {
+ tmp.set_unsigned(*i);
+ if ((n % tmp) == zero)
+ return (n == tmp);
+ }
+
+ // Ensure that we've got a random generator.
+ static std::auto_ptr<default_random_generator> gen(new
+ default_random_generator);
+ detail::random_generator<default_random_generator> random(*gen.get());
+
+ // Run the number through the Miller-Rabin Probabilistic Test of Primality
+ // a few times to see if it's actually (probably) prime.
+ for (int count = 0; count < 5; ++count) {
+ unsigned int k = random();
+ tmp.set_unsigned(k);
+ int isP = isProbablePrimeBaseB(n, tmp, callback);
+ if (isP <= 0) return isP;
+ }
+ return 1; // Appears to be prime!
+}
+
+BOOST_XINT_INLINE void random_prime(data_t& target, base_random_generator& gen,
+ size_t size_in_bits, callback_t callback)
+{
+ if (size_in_bits < 2) throw exceptions::invalid_argument("cannot create "
+ "prime numbers smaller than two bits");
+
+ // Call the callback for the first time
+ if (callback && !callback()) { target.set(0); return; }
+
+ // If, by rare chance, the number we're testing gets larger than the number
+ // of bits requested, we have to start over with a new random number of the
+ // proper size.
+ data_t pe(target.new_holder());
+ pow2(pe, size_in_bits + 1);
+
+ const data_t two(target.new_holder(), 2);
+ while (1) {
+ random_by_size(target, gen, size_in_bits, true, true, false);
+ while (target < pe) {
+ int r = is_prime(target, callback);
+ if (r < 0) { target.set(0); return; }
+ if (r == 1) return;
+ target += two;
+ }
+ }
+}
+
+} // namespace detail
+} // namespace xint
+} // namespace boost
+//! @endcond detail
+
+#endif // defined(BOOST_XINT_COMPILED_LIB) || defined(BOOST_XINT_FROM_HEADER)

Added: sandbox/xint/boost/xint/detail/random.cpp
==============================================================================
--- (empty file)
+++ sandbox/xint/boost/xint/detail/random.cpp 2010-05-31 20:43:54 EDT (Mon, 31 May 2010)
@@ -0,0 +1,200 @@
+
+/*
+ The Extended Integer (XInt) Library
+ A fast, portable C++ library for multi-precision integer math
+ Copyright 2010 by Chad Nelson
+
+ Distributed under the Boost Software License, Version 1.0.
+ See accompanying file LICENSE_1_0.txt or copy at
+ http://www.boost.org/LICENSE_1_0.txt
+
+ See http://www.boost.org/libs/xint for library home page.
+*/
+
+/*! \file
+ \brief Contains the function definitions for the random number functions.
+
+ This file will be included by the library itself when needed.
+*/
+
+#if defined(BOOST_XINT_COMPILED_LIB) || defined(BOOST_XINT_FROM_HEADER)
+
+#if defined(BOOST_XINT_COMPILED_LIB)
+ #include "internals.hpp"
+ #include "bitqueue.hpp"
+ #include "../random.hpp"
+
+ #ifdef _WIN32
+ #define STRICT
+ #define WIN32_LEAN_AND_MEAN
+ #define NOMINMAX
+ #include <windows.h>
+ #endif
+
+ #include <sstream>
+ #include <fstream>
+ #include <ctime>
+#endif // defined(BOOST_XINT_COMPILED_LIB)
+
+//! @cond detail
+namespace boost {
+namespace xint {
+namespace detail {
+
+BOOST_XINT_INLINE void random_by_size(data_t& target, base_random_generator&
+ gen, size_t bits, bool high_bit_on, bool low_bit_on, bool can_be_negative)
+{
+ if (bits == 0) { target.set(0); return; }
+
+ // Grab a bunch of bits
+ bitqueue_t bitqueue;
+ while (bitqueue.size() < bits) bitqueue.push(gen(),
+ std::numeric_limits<base_random_generator::result_type>::digits);
+
+ // Stick them into an integer
+ size_t d = data_t::bits_to_digits(bits);
+ target.beginmod(d);
+ digit_t *tdigits = target.digits();
+ target.length = (std::min)(d + 1, target.max_length());
+ digit_t *pp = tdigits, *ppe = pp + target.length;
+ while (pp < ppe) *pp++ = static_cast<digit_t>(bitqueue.pop(bits_per_digit));
+
+ // Trim it to the proper length
+ size_t index = (bits / bits_per_digit);
+ digit_t mask = (digit_t(1) << (bits % bits_per_digit)) - 1;
+ if (mask == 0) { mask = digit_mask; --index; }
+ target.length = index + 1;
+ tdigits[index] &= mask;
+ for (digit_t *i = tdigits + index + 1, *ie = tdigits + target.length; i <
+ ie; ++i) *i = 0;
+
+ if (high_bit_on) setbit(target, bits - 1);
+ if (low_bit_on) setbit(target, 0);
+ target.negative = (can_be_negative && (gen() & 0x01));
+ target.endmod();
+}
+
+} // namespace detail
+} // namespace xint
+} // namespace boost
+//! @endcond detail
+
+////////////////////////////////////////////////////////////////////////////////
+// The secure random generator
+
+//! @cond
+namespace boost {
+namespace xint {
+namespace detail {
+
+#ifdef _WIN32
+ template <typename T>
+ struct strong_random_generator_t<T>::impl_t {
+ typedef BOOLEAN (WINAPI *RtlGenRandomFn)(PVOID, ULONG);
+ typedef DWORD result_type;
+
+ impl_t(): dll(0), fn(0) {
+ // This should work under WinXP, Vista, and Win7. No guarantees
+ // about future compatibility, but I doubt that Microsoft will get
+ // rid of it (it's too useful), and I doubt that they'll change it
+ // now that it's well-known (it would break too many programs). We
+ // could also use the rand_s function in more recent versions of
+ // Visual C++, but that causes compatibility problems with older
+ // versions of Windows.
+ dll=LoadLibraryA("Advapi32.dll");
+ if (dll != 0) fn=RtlGenRandomFn(GetProcAddress(dll,
+ "SystemFunction036"));
+ if (fn == 0) {
+ destroy();
+ throw exceptions::no_strong_random();
+ }
+ }
+
+ ~impl_t() { destroy(); }
+
+ result_type operator()() {
+ result_type r=0;
+ if (!fn(&r, sizeof(result_type)))
+ throw exceptions::no_strong_random("RtlGenRandom failed");
+ return r;
+ }
+
+ void destroy() { if (dll) FreeLibrary(dll); }
+
+ HMODULE dll;
+ RtlGenRandomFn fn;
+ };
+
+ template <typename T>
+ BOOST_XINT_INLINE double strong_random_generator_t<T>::entropy() const
+ { return 32; }
+#else
+ template <typename T>
+ struct strong_random_generator_t<T>::impl_t {
+ typedef unsigned char result_type;
+
+ impl_t(): rng("/dev/urandom", std::ios::binary) {
+ // This should be supported under most non-Windows systems. Note
+ // that we're using /dev/urandom, not /dev/random -- /dev/random is
+ // more secure, but it can be VERY slow.
+ if (!rng) throw exceptions::no_strong_random();
+ }
+
+ result_type operator()() {
+ int r=rng.get();
+ if (r==EOF) throw exceptions::no_strong_random("/dev/urandom "
+ "returned EOF");
+ return static_cast<result_type>(r);
+ }
+
+ std::ifstream rng;
+ };
+
+ template <typename T>
+ BOOST_XINT_INLINE double strong_random_generator_t<T>::entropy() const
+ { return 8; }
+#endif
+
+template <typename T>
+const bool strong_random_generator_t<T>::has_fixed_range = true;
+
+template <typename T>
+const typename strong_random_generator_t<T>::result_type
+ strong_random_generator_t<T>::min_value =
+ (std::numeric_limits<typename
+ strong_random_generator_t<T>::impl_t::result_type>::min)();
+
+template <typename T>
+const typename strong_random_generator_t<T>::result_type
+ strong_random_generator_t<T>::max_value =
+ (std::numeric_limits<typename
+ strong_random_generator_t<T>::impl_t::result_type>::max)();
+
+template <typename T>
+BOOST_XINT_INLINE strong_random_generator_t<T>::strong_random_generator_t():
+ impl(new impl_t) { }
+
+template <typename T>
+BOOST_XINT_INLINE strong_random_generator_t<T>::~strong_random_generator_t() {
+ delete impl; }
+
+template <typename T>
+BOOST_XINT_INLINE typename strong_random_generator_t<T>::result_type
+ strong_random_generator_t<T>::operator()() { return (*impl)(); }
+
+template <typename T>
+BOOST_XINT_INLINE typename strong_random_generator_t<T>::result_type
+ strong_random_generator_t<T>::min BOOST_PREVENT_MACRO_SUBSTITUTION () const
+ { return min_value; }
+
+template <typename T>
+BOOST_XINT_INLINE typename strong_random_generator_t<T>::result_type
+ strong_random_generator_t<T>::max BOOST_PREVENT_MACRO_SUBSTITUTION () const
+ { return max_value; }
+
+} // namespace detail
+} // namespace xint
+} // namespace boost
+//! @endcond
+
+#endif // defined(BOOST_XINT_COMPILED_LIB) || defined(BOOST_XINT_FROM_HEADER)

Added: sandbox/xint/boost/xint/detail/roots.cpp
==============================================================================
--- (empty file)
+++ sandbox/xint/boost/xint/detail/roots.cpp 2010-05-31 20:43:54 EDT (Mon, 31 May 2010)
@@ -0,0 +1,66 @@
+
+/*
+ The Extended Integer (XInt) Library
+ A fast, portable C++ library for multi-precision integer math
+ Copyright 2010 by Chad Nelson
+
+ Distributed under the Boost Software License, Version 1.0.
+ See accompanying file LICENSE_1_0.txt or copy at
+ http://www.boost.org/LICENSE_1_0.txt
+
+ See http://www.boost.org/libs/xint for library home page.
+*/
+
+/*! \file
+ \brief Contains the square-root function definition, and any future
+ root-related ones.
+
+ This file will be included by the library itself when needed.
+*/
+
+#if defined(BOOST_XINT_COMPILED_LIB) || defined(BOOST_XINT_FROM_HEADER)
+
+#if defined(BOOST_XINT_COMPILED_LIB)
+ #include "internals.hpp"
+#endif // defined(BOOST_XINT_COMPILED_LIB)
+
+//! @cond detail
+namespace boost {
+namespace xint {
+namespace detail {
+
+BOOST_XINT_INLINE void sqrt(data_t& target, data_t n) {
+ if (n.is_zero()) { target.set(0); return; }
+ if (n.negative) throw exceptions::cannot_represent("library cannot "
+ "represent imaginary values (tried to take sqrt of negative number)");
+
+ // A naive implementation using pure integers can result in an endless loop,
+ // cycling between two numbers that are approximately correct (try
+ // sqrt(23)). To deal with that, we multiply everything by an even power of
+ // two.
+ const size_t extra_bits = 1;
+ n <<= (extra_bits * 2);
+
+ // Initial guess is half the length of n, in bits
+ target.beginmod();
+ target.set(0);
+ setbit(target, log2(n) / 2);
+
+ // Now refine it until we're as close as we can get.
+ while (1) {
+ data_t guess((target + (n / target)) >> 1);
+ if ((target >> extra_bits) == (guess >> extra_bits)) break;
+ target.duplicate_data(guess);
+ }
+
+ // Remove half of the added bits.
+ target >>= extra_bits;
+ target.endmod();
+}
+
+} // namespace detail
+} // namespace xint
+} // namespace boost
+//! @endcond detail
+
+#endif // defined(BOOST_XINT_COMPILED_LIB) || defined(BOOST_XINT_FROM_HEADER)

Added: sandbox/xint/boost/xint/detail/shift.cpp
==============================================================================
--- (empty file)
+++ sandbox/xint/boost/xint/detail/shift.cpp 2010-05-31 20:43:54 EDT (Mon, 31 May 2010)
@@ -0,0 +1,112 @@
+
+/*
+ The Extended Integer (XInt) Library
+ A fast, portable C++ library for multi-precision integer math
+ Copyright 2010 by Chad Nelson
+
+ Distributed under the Boost Software License, Version 1.0.
+ See accompanying file LICENSE_1_0.txt or copy at
+ http://www.boost.org/LICENSE_1_0.txt
+
+ See http://www.boost.org/libs/xint for library home page.
+*/
+
+/*! \file
+ \brief Contains the bit-shifting function definitions.
+
+ This file will be included by the library itself when needed.
+*/
+
+#if defined(BOOST_XINT_COMPILED_LIB) || defined(BOOST_XINT_FROM_HEADER)
+
+#if defined(BOOST_XINT_COMPILED_LIB)
+ #include "internals.hpp"
+#endif // defined(BOOST_XINT_COMPILED_LIB)
+
+//! @cond detail
+namespace boost {
+namespace xint {
+namespace detail {
+
+BOOST_XINT_INLINE data_t& data_t::operator<<=(size_t byBits) {
+ if (byBits == 0) return *this;
+
+ // bits/dchunks is distance to move
+ size_t dchunks = byBits / bits_per_digit, bits = byBits % bits_per_digit;
+ size_t anslen = length + dchunks + (bits != 0 ? 1 : 0);
+ beginmod(anslen);
+
+ // nlen is one greater than top source byte to move
+ size_t nlen = (std::min)(length, anslen - dchunks - (bits != 0 ? 1 : 0));
+
+ digit_t *dstart = digits();
+ if (bits != 0 && dchunks + 1 < anslen) {
+ // Handle both bits and dchunks in one pass
+ const digit_t *s = dstart + nlen - 1;
+ digit_t *t = dstart + nlen + dchunks, *te = dstart + max_length();
+ length = (std::min<size_t>)(t - dstart + 1, max_length());
+
+ while (t >= te && s > dstart) { --t; --s; }
+ if (t < te) *t-- = *s >> (bits_per_digit - bits); else --t;
+ while (s > dstart) {
+ *t = (*s-- << bits);
+ *t-- |= (*s >> (bits_per_digit - bits));
+ }
+ *t-- = (*s << bits);
+
+ while (t >= dstart) *t-- = 0;
+ } else if (dchunks != 0 && dchunks < anslen) {
+ length = anslen;
+ memmove(dstart + dchunks, dstart, sizeof(digit_t) * nlen);
+ memset(dstart, 0, dchunks * sizeof(digit_t));
+ } else {
+ set(0);
+ }
+
+ endmod();
+ return *this;
+}
+
+BOOST_XINT_INLINE data_t& data_t::operator>>=(size_t byBits) {
+ if (byBits == 0) return *this;
+
+ size_t dchunks = byBits / bits_per_digit, bits = byBits % bits_per_digit,
+ bits2 = bits_per_digit - bits;
+
+ beginmod();
+ digit_t *tgt = digits();
+
+ if (dchunks < length) {
+ if (bits != 0) {
+ // Handle both bits and dchunks in one pass
+ const digit_t *s = tgt + dchunks, *se = tgt + length - 1;
+ digit_t *t = tgt;
+ while (s != se) {
+ *t = (*s++ >> bits);
+ *t++ |= (*s << bits2);
+ }
+ *t++ = (*s >> bits);
+ length = (t - tgt);
+ } else if (dchunks != 0) {
+ memmove(tgt, tgt + dchunks, sizeof(digit_t) * (length - dchunks));
+ length -= dchunks;
+ }
+ } else set(0);
+ endmod();
+ return *this;
+}
+
+BOOST_XINT_INLINE data_t operator<<(data_t n, size_t bits) {
+ return (n <<= bits);
+}
+
+BOOST_XINT_INLINE data_t operator>>(data_t n, size_t bits) {
+ return (n >>= bits);
+}
+
+} // namespace detail
+} // namespace xint
+} // namespace boost
+//! @endcond detail
+
+#endif // defined(BOOST_XINT_COMPILED_LIB) || defined(BOOST_XINT_FROM_HEADER)

Modified: sandbox/xint/boost/xint/exceptions.hpp
==============================================================================
--- sandbox/xint/boost/xint/exceptions.hpp (original)
+++ sandbox/xint/boost/xint/exceptions.hpp 2010-05-31 20:43:54 EDT (Mon, 31 May 2010)
@@ -18,7 +18,7 @@
 #ifndef BOOST_INCLUDED_XINT_EXCEPTIONS_HPP
 #define BOOST_INCLUDED_XINT_EXCEPTIONS_HPP
 
-#include "internals.hpp"
+#include <stdexcept>
 
 namespace boost {
 namespace xint {

Modified: sandbox/xint/boost/xint/fixed_integer.hpp
==============================================================================
--- sandbox/xint/boost/xint/fixed_integer.hpp (original)
+++ sandbox/xint/boost/xint/fixed_integer.hpp 2010-05-31 20:43:54 EDT (Mon, 31 May 2010)
@@ -18,17 +18,88 @@
 #ifndef BOOST_INCLUDED_XINT_FIXED_INTEGER_HPP
 #define BOOST_INCLUDED_XINT_FIXED_INTEGER_HPP
 
-#include <boost/shared_ptr.hpp>
-#include "internals.hpp"
-#include "exceptions.hpp"
+#include "detail/internals.hpp"
+#include "random.hpp"
 
 namespace boost {
 namespace xint {
 
+#ifdef _WIN32
+ // The file's constructors make heavy use of the 'this' pointer, in a safe
+ // manner. MSVC isn't smart enough to know that it's safe.
+ #pragma warning(push)
+ #pragma warning(disable: 4355)
+#endif
+
+//! @cond detail
+namespace detail {
+/*! This is the fixed-size version of digitmanager_t.
+
+ I tried adding a memory cache to this, until I realized that it would need
+ to be thread-local or it would break thread safety. Although I could use
+ Boost.Thread to get thread-local variables, adding a dependency on a
+ compiled library isn't very attractive, so I'm deferring any caching to the
+ allocator. That's really a better place for it anyway.
+*/
+template <size_t Bits, class Alloc = std::allocator<digit_t>, bool Threadsafe =
+ true, bool Secure = false>
+class fixed_digitmanager_t: public digitmanager_t<Alloc, Threadsafe, Secure> {
+ public:
+ fixed_digitmanager_t() { }
+ fixed_digitmanager_t(size_t requested_length, bool readonly = false):
+ digitmanager_t<Alloc, Threadsafe, Secure>(requested_length, readonly)
+ { }
+ fixed_digitmanager_t(const base_digitmanager_t& copy):
+ digitmanager_t<Alloc, Threadsafe, Secure>(copy) { }
+
+ virtual base_digitmanager_t *new_of_type(base_digitmanager_t *copy = 0)
+ const { if (copy != 0) return new fixed_digitmanager_t<Bits, Alloc,
+ Threadsafe, Secure>(*copy); else return new fixed_digitmanager_t<Bits,
+ Alloc, Threadsafe, Secure>; }
+ virtual size_t fixed_length() const { return fixed; }
+ virtual void endmod_hook(digit_t *p) { *(p + last_digit_index) &=
+ last_digit_mask; }
+
+ protected:
+ static const size_t fixed, last_digit_index;
+ static const digit_t last_digit_mask;
+};
+
+template <size_t Bits, class Alloc, bool Threadsafe, bool Secure>
+const size_t fixed_digitmanager_t<Bits, Alloc, Threadsafe, Secure>::fixed =
+ detail::data_t::bits_to_digits(Bits);
+template <size_t Bits, class Alloc, bool Threadsafe, bool Secure> const size_t
+ fixed_digitmanager_t<Bits, Alloc, Threadsafe, Secure>::last_digit_index =
+ fixed_digitmanager_t<Bits, Alloc, Threadsafe, Secure>::fixed - 1;
+template <size_t Bits, class Alloc, bool Threadsafe, bool Secure> const digit_t
+ fixed_digitmanager_t<Bits, Alloc, Threadsafe, Secure>::last_digit_mask =
+ (Bits % detail::bits_per_digit)
+ ? digit_t((doubledigit_t(1) << (Bits % detail::bits_per_digit)) - 1)
+ : detail::digit_mask;
+//template <size_t Bits, class Alloc, bool Threadsafe, bool Secure> const digit_t
+// fixed_digitmanager_t<Bits, Alloc, Threadsafe, Secure>::last_digit_mask =
+// digit_t((doubledigit_t(1) << (Bits % detail::bits_per_digit)) - 1);
+} // namespace detail
+//! @endcond detail
+
 /*! \brief A fixed-size integer type.
 
-\tparam Bits The number of bits that the magnitude of the %fixed_integer type
-should be limited to. This can be any number greater than zero.
+ \tparam Bits The number of bits that the magnitude of the %fixed_integer
+ type should be limited to. This can be any number greater than zero.
+
+ \tparam Alloc The allocator to use. It must be for the \c
+ boost::xint::detail::digit_t type.
+
+ \tparam Threadsafe If \c true, the library ensures that each object has its
+ own unique storage before returning it. If \c false, identical objects are
+ allowed to share storage using a copy-on-write design, potentially
+ increasing the speed of the library, but making it unsafe for programs where
+ an %integer object might be accessed by more than one thread. The library
+ allows copy-on-write for internal functions regardless of this parameter,
+ which is safe because the internal functions are single-threaded.
+
+ \tparam Secure If \c true, the library zeros out all memory before
+ deallocating it, for maximum security.
 
 %fixed_integer types are more processor-efficient than variable-sized %integers,
 because they seldom need to do any allocation once they're created. However,
@@ -49,796 +120,914 @@
 1</code> will both be zero. However, the sign (on non-zero answers) is
 preserved, so <code>fixed_integer<8>(-255) - 2</code> will be -1.
 */
-template <size_t Bits>
-class fixed_integer: public fixed_integer_any {
+template <size_t Bits, class Alloc = std::allocator<detail::digit_t>, bool
+ Threadsafe = true, bool Secure = false>
+class fixed_integer: public detail::fixed_digitmanager_t<Bits, Alloc,
+ Threadsafe, Secure>, public any_integer
+{
     public:
+ typedef fixed_integer<Bits, Alloc, Threadsafe, Secure> type;
+
     //! \name Constructors & Destructors
     //!@{
     fixed_integer();
- fixed_integer(const fixed_integer<Bits>& b);
- explicit fixed_integer(const base_integer& b);
- explicit fixed_integer(const std::string& str, size_t base=10);
- template <typename T> fixed_integer(const T& n,
- typename boost::enable_if<boost::is_integral<T> >::type* = 0,
- typename boost::enable_if<boost::is_signed<T> >::type* = 0);
- template <typename T> fixed_integer(const T& n,
- typename boost::enable_if<boost::is_integral<T> >::type* = 0,
- typename boost::enable_if<boost::is_unsigned<T> >::type* = 0);
+ fixed_integer(const fixed_integer<Bits, Alloc, Threadsafe, Secure>& b);
+ fixed_integer(BOOST_XINT_RV_REF(type) b): any_integer(*this,1) { _swap(b); }
+ explicit fixed_integer(const char *str, size_t base = 10);
+ explicit fixed_integer(const char *str, char **endptr, size_t base = 10);
+ explicit fixed_integer(const std::string& str, size_t base = 10);
+ explicit fixed_integer(const xint::binary_t b, size_t bits = 0);
+ explicit fixed_integer(const any_integer& other);
+ template <typename Type> fixed_integer(const Type n,
+ typename boost::enable_if<boost::is_integral<Type> >::type* = 0);
+
+ #ifndef BOOST_XINT_DOXYGEN_IGNORE
+ //! This one is used internally.
+ fixed_integer(const detail::data_t c): detail::fixed_digitmanager_t<Bits,
+ Alloc, Threadsafe, Secure>(*c.holder()), any_integer(*this, c.length,
+ c.negative) { data.beginendmod(); }
+ #endif
     //!@}
 
+ /*! \name Mathematical and Bitwise Operators
+ \brief These operate exactly like their counterparts for the built-in
+ %integer types.
+ */
+ //@{
+ fixed_integer<Bits, Alloc, Threadsafe, Secure>& operator=(
+ BOOST_XINT_COPY_ASSIGN_REF(type) c);
+ fixed_integer<Bits, Alloc, Threadsafe, Secure>& operator=(
+ BOOST_XINT_RV_REF(type) c) { _swap(c); return *this; }
+ template <typename Type> fixed_integer<Bits, Alloc, Threadsafe, Secure>&
+ operator=(const Type n) { fixed_integer<Bits, Alloc, Threadsafe,
+ Secure> nn(n); _swap(nn); return *this; }
+
+ bool operator!() const { return data.is_zero(); }
+ fixed_integer<Bits, Alloc, Threadsafe, Secure> operator-() const;
+ fixed_integer<Bits, Alloc, Threadsafe, Secure>& operator+() { return
+ *this; }
+ const fixed_integer<Bits, Alloc, Threadsafe, Secure>& operator+() const {
+ return *this; }
+ fixed_integer<Bits, Alloc, Threadsafe, Secure> operator~() const;
+
+ fixed_integer<Bits, Alloc, Threadsafe, Secure>& operator+=(const
+ fixed_integer<Bits, Alloc, Threadsafe, Secure> b);
+ fixed_integer<Bits, Alloc, Threadsafe, Secure>& operator-=(const
+ fixed_integer<Bits, Alloc, Threadsafe, Secure> b);
+ fixed_integer<Bits, Alloc, Threadsafe, Secure>& operator*=(const
+ fixed_integer<Bits, Alloc, Threadsafe, Secure> b);
+ fixed_integer<Bits, Alloc, Threadsafe, Secure>& operator/=(const
+ fixed_integer<Bits, Alloc, Threadsafe, Secure> b);
+ fixed_integer<Bits, Alloc, Threadsafe, Secure>& operator%=(const
+ fixed_integer<Bits, Alloc, Threadsafe, Secure> b);
+
+ fixed_integer<Bits, Alloc, Threadsafe, Secure>& operator++();
+ fixed_integer<Bits, Alloc, Threadsafe, Secure>& operator--();
+ fixed_integer<Bits, Alloc, Threadsafe, Secure> operator++(int);
+ fixed_integer<Bits, Alloc, Threadsafe, Secure> operator--(int);
+
+ fixed_integer<Bits, Alloc, Threadsafe, Secure>& operator&=(const
+ fixed_integer<Bits, Alloc, Threadsafe, Secure> n);
+ fixed_integer<Bits, Alloc, Threadsafe, Secure>& operator|=(const
+ fixed_integer<Bits, Alloc, Threadsafe, Secure> n);
+ fixed_integer<Bits, Alloc, Threadsafe, Secure>& operator^=(const
+ fixed_integer<Bits, Alloc, Threadsafe, Secure> n);
+ fixed_integer<Bits, Alloc, Threadsafe, Secure> operator<<(size_t shift)
+ const;
+ fixed_integer<Bits, Alloc, Threadsafe, Secure> operator>>(size_t shift)
+ const;
+ fixed_integer<Bits, Alloc, Threadsafe, Secure>& operator<<=(size_t shift);
+ fixed_integer<Bits, Alloc, Threadsafe, Secure>& operator>>=(size_t shift);
+ //@}
+
     //! \name Miscellaneous Functions
     //!@{
- bool odd() const;
- bool even() const;
- int sign(bool signed_zero=false) const;
+ bool is_odd() const;
+ bool is_even() const;
+ int sign(bool signed_zero = false) const;
     size_t hex_digits() const;
     //!@}
 
- /*! \name Mathematical and Bitwise Operators
- \brief These operate exactly like their counterparts for the built-in
- %integer types.
+ typedef base_divide_t<fixed_integer<Bits, Alloc, Threadsafe, Secure> >
+ divide_t;
+
+ /*! \name Static Member Functions
+
+ These are functions that return a fixed_integer, but don't take one as a
+ parameter. To use them as free functions, you would have to specify the
+ return type anyway, so I made them static member functions of the type
+ instead.
     */
     //!@{
- fixed_integer<Bits>& operator=(const fixed_integer<Bits>& c) { _attach(c,
- false); return *this; }
-
- bool operator!() const { return _is_zero(); }
- fixed_integer<Bits> operator-() const { return negate(*this); }
- fixed_integer<Bits>& operator+() { return *this; }
- const fixed_integer<Bits>& operator+() const { return *this; }
- fixed_integer<Bits> operator~() const;
-
- fixed_integer<Bits>& operator+=(const fixed_integer_any& b);
- fixed_integer<Bits>& operator-=(const fixed_integer_any& b);
- fixed_integer<Bits>& operator*=(const fixed_integer_any& b);
- fixed_integer<Bits>& operator/=(const fixed_integer_any& b);
- fixed_integer<Bits>& operator%=(const fixed_integer_any& b);
-
- fixed_integer<Bits>& operator++(); //!< \details Preincrement operator
- fixed_integer<Bits>& operator--(); //!< \details Predecrement operator
- fixed_integer<Bits> operator++(int); //!< \details Postincrement operator -- not recommended, inefficient
- fixed_integer<Bits> operator--(int); //!< \details Postdecrement operator -- not recommended, inefficient
-
- fixed_integer<Bits>& operator&=(const fixed_integer_any& n);
- fixed_integer<Bits>& operator|=(const fixed_integer_any& n);
- fixed_integer<Bits>& operator^=(const fixed_integer_any& n);
- fixed_integer<Bits> operator<<(size_t shift) const;
- fixed_integer<Bits> operator>>(size_t shift) const;
- fixed_integer<Bits>& operator<<=(size_t shift);
- fixed_integer<Bits>& operator>>=(size_t shift);
+ static fixed_integer<Bits, Alloc, Threadsafe, Secure> pow2(size_t exponent);
+ static fixed_integer<Bits, Alloc, Threadsafe, Secure> factorial(size_t n);
+ template <class Type> static fixed_integer<Bits, Alloc, Threadsafe, Secure>
+ random_by_size(Type& gen, size_t size_in_bits, bool high_bit_on = false,
+ bool low_bit_on = false, bool can_be_negative = false);
+ template <class Type> static fixed_integer<Bits, Alloc, Threadsafe, Secure>
+ random_prime(Type& gen, size_t size_in_bits, callback_t callback =
+ no_callback);
     //!@}
 
- typedef base_divide_t<fixed_integer<Bits> > divide_t;
+ void _swap(fixed_integer<Bits, Alloc, Threadsafe, Secure>& s) { using
+ std::swap; swap(data, s.data); }
 
     private:
- static const size_t _c_digits;
- static const detail::digit_t _c_mask;
- static boost::shared_ptr<detail::data_t> preallocated_zero;
+ BOOST_XINT_COPYABLE_AND_MOVABLE(type)
 };
 
-template <size_t Bits> const size_t fixed_integer<Bits>::_c_digits =
- (Bits + detail::bits_per_digit - 1) / detail::bits_per_digit;
-template <size_t Bits> const detail::digit_t fixed_integer<Bits>::_c_mask =
- ((Bits % detail::bits_per_digit) == 0) ? detail::digit_mask
- : ((detail::digit_t(1) << (Bits % detail::bits_per_digit)) - 1);
-template <size_t Bits> boost::shared_ptr<detail::data_t>
- fixed_integer<Bits>::preallocated_zero(detail::allocate_fixed_zero(
- fixed_integer<Bits>::_c_mask, fixed_integer<Bits>::_c_digits),
- detail::deallocate);
-
-//! \name Mathematical primitives
-//!@{
-template <size_t Bits> fixed_integer<Bits> abs(const fixed_integer<Bits>& n);
-template <size_t Bits> fixed_integer<Bits> negate(const fixed_integer<Bits>& n);
-template <size_t Bits> fixed_integer<Bits> add(const fixed_integer<Bits>& n,
- const fixed_integer<Bits>& addend);
-template <size_t Bits> fixed_integer<Bits> subtract(const fixed_integer<Bits>&
- n, const fixed_integer<Bits>& subtrahend);
-template <size_t Bits> fixed_integer<Bits> multiply(const fixed_integer<Bits>&
- n, const fixed_integer<Bits>& multiplicand);
-template <size_t Bits> fixed_integer<Bits> divide(const fixed_integer<Bits>&
- dividend, const fixed_integer<Bits>& divisor);
-template <size_t Bits> typename fixed_integer<Bits>::divide_t divide_r(const
- fixed_integer<Bits>& dividend, const fixed_integer<Bits>& divisor);
-//!@}
-
-//! \name Powers and roots
-//!@{
-template <size_t Bits>
-fixed_integer<Bits> sqr(const fixed_integer<Bits>& n);
-template <size_t Bits>
-fixed_integer<Bits> pow(const fixed_integer<Bits>& n, const
- fixed_integer_any& exponent);
-template <size_t Bits>
-fixed_integer<Bits> fixed_pow2(size_t exponent);
-template <size_t Bits>
-fixed_integer<Bits> fixed_factorial(size_t n);
-template <size_t Bits>
-fixed_integer<Bits> sqrt(const fixed_integer<Bits>& n);
-//!@}
-
-//! \name Conversion functions
-//!@{
-template <size_t Bits, typename T> T to(const fixed_integer<Bits>& n);
-std::string to_string(const fixed_integer_any& n, size_t base=10, bool
- uppercase=false);
-template <size_t Bits> fixed_integer<Bits> fixed_from_string(const
- std::string& str, size_t base=10);
-template <size_t Bits> xint::binary_t to_binary(const fixed_integer_any& n,
- size_t bits=0);
-template <size_t Bits> fixed_integer<Bits> fixed_from_binary(const
- xint::binary_t& s, size_t bits=0);
-//!@}
+//! \copydoc integer_t::integer_t()
+template<size_t Bits, class Alloc, bool Threadsafe, bool Secure>
+fixed_integer<Bits, Alloc, Threadsafe, Secure>::fixed_integer():
+ any_integer(*this, 1)
+{
+ // Don't need to do anything, already preinitialized to zero.
+}
 
-//! \name Bit-manipulation functions
-//!@{
-template <size_t Bits>
-bool getbit(const fixed_integer<Bits>& n, size_t bit);
-template <size_t Bits>
-void setbit(fixed_integer<Bits>& n, size_t bit);
-template <size_t Bits>
-void clearbit(fixed_integer<Bits>& n, size_t bit);
-template <size_t Bits>
-size_t lowestbit(const fixed_integer<Bits>& n, size_t valueIfZero=0);
-template <size_t Bits>
-size_t highestbit(const fixed_integer<Bits>& n, size_t valueIfZero=0);
-template <size_t Bits>
-fixed_integer<Bits> bitwise_and(const fixed_integer<Bits>& n1, const
- fixed_integer<Bits>& n2);
-template <size_t Bits>
-fixed_integer<Bits> bitwise_or (const fixed_integer<Bits>& n1, const
- fixed_integer<Bits>& n2);
-template <size_t Bits>
-fixed_integer<Bits> bitwise_xor(const fixed_integer<Bits>& n1, const
- fixed_integer<Bits>& n2);
-template <size_t Bits>
-fixed_integer<Bits> shift(const fixed_integer<Bits>& n, int byBits);
-template <size_t Bits>
-fixed_integer<Bits> shift_left(const fixed_integer<Bits>& n, size_t byBits);
-template <size_t Bits>
-fixed_integer<Bits> shift_right(const fixed_integer<Bits>& n, size_t byBits);
-//!@}
+//! \copydoc integer_t::integer_t(const integer_t&)
+template<size_t Bits, class Alloc, bool Threadsafe, bool Secure>
+fixed_integer<Bits, Alloc, Threadsafe, Secure>::fixed_integer(const
+ fixed_integer<Bits, Alloc, Threadsafe, Secure>& b):
+ detail::fixed_digitmanager_t<Bits, Alloc, Threadsafe, Secure>(
+ *b.data.holder()), any_integer(*this, (std::min)(b.data.length,
+ fixed_integer<Bits, Alloc, Threadsafe, Secure>::fixed),
+ b.data.negative)
+{
+ data.beginendmod();
+}
 
-/*! \name Modular math functions
+/*! \copydoc integer_t::integer_t(const std::string&, size_t)
 
-A common reason to use a large-integer library is to implement public-key
-encryption, and the algorithms for such encryption often use modular math.
+\note
+This function does \e not stop when the fixed_integer's bits are full. It uses
+the entire string, then truncates the result to the proper number of bits.
 */
-//!@{
-template <size_t Bits>
-fixed_integer<Bits> mod(const fixed_integer<Bits>& n, const fixed_integer<Bits>&
- modBy);
-template <size_t Bits>
-fixed_integer<Bits> mulmod(const fixed_integer<Bits>& n, const
- fixed_integer<Bits>& by, const fixed_integer<Bits>& modulus);
-template <size_t Bits>
-fixed_integer<Bits> sqrmod(const fixed_integer<Bits>& n, const
- fixed_integer<Bits>& modulus);
-template <size_t Bits>
-fixed_integer<Bits> powmod(const fixed_integer<Bits>& n, const
- fixed_integer<Bits>& exponent, const fixed_integer<Bits>& modulus,
- bool noMontgomery=false);
-template <size_t Bits>
-fixed_integer<Bits> invmod(const fixed_integer<Bits>& n, const
- fixed_integer<Bits>& modulus);
-//!@}
-
-//! \name Random number functions
-//!@{
-template <class T, size_t Bits>
-fixed_integer<Bits> fixed_random_by_size(T& gen, size_t sizeInBits, bool
- highBitOn = false, bool lowBitOn = false, bool canBeNegative = false);
-//!@}
-
-//! \name Prime number functions
-//!@{
-int is_prime(const fixed_integer_any& n, callback_t callback = no_callback);
-template <class T, size_t Bits>
-fixed_integer<Bits> fixed_random_prime(T& gen, size_t sizeInBits, callback_t
- callback = no_callback);
-//!@}
+template<size_t Bits, class Alloc, bool Threadsafe, bool Secure>
+fixed_integer<Bits, Alloc, Threadsafe, Secure>::fixed_integer(const char
+ *str, size_t base): any_integer(*this, 1)
+{
+ data.from_string(str, strlen(str), base);
+}
 
-/*! \name Operators
+/*! \copydoc integer_t::integer_t(const char *, char **, size_t)
 
- These act exactly the same as for the built-in %integer types.
+\note
+This function does \e not stop when the fixed_integer's bits are full. It
+continues as long as there are valid digits for the base in question, then
+truncates the result to the proper number of bits.
 */
-//!@{
-#define BOOST_XINT_NFIXED typename boost::disable_if<boost::is_base_of<\
- fixed_integer_any, T>, fixed_integer<Bits> >::type
-
-#define BOOST_XINT_FIXED_BINARY_FN(name, body) \
-template <size_t Bits> \
-fixed_integer<Bits> name(const fixed_integer<Bits>& op1, \
- const fixed_integer<Bits>& op2) \
-{ \
- fixed_integer<Bits> r; \
- body(r, op1, op2); \
- return BOOST_XINT_MOVE(r); \
-} \
-\
-template <size_t Bits, typename T> \
-BOOST_XINT_NFIXED name(const fixed_integer<Bits>& n1, const T& n2) { \
- fixed_integer<Bits> r; \
- body(r, n1, fixed_integer_any(n2)); \
- return BOOST_XINT_MOVE(r); \
-} \
-\
-template <typename T, size_t Bits> \
-BOOST_XINT_NFIXED name(const T& n1, const fixed_integer<Bits>& n2) { \
- fixed_integer<Bits> r; \
- body(r, fixed_integer_any(n1), n2); \
- return BOOST_XINT_MOVE(r); \
-}
-
-BOOST_XINT_FIXED_BINARY_FN(operator+, detail::add)
-BOOST_XINT_FIXED_BINARY_FN(operator-, detail::subtract)
-BOOST_XINT_FIXED_BINARY_FN(operator*, detail::multiply)
-BOOST_XINT_FIXED_BINARY_FN(operator/, detail::divide)
-BOOST_XINT_FIXED_BINARY_FN(operator%, detail::mod)
-BOOST_XINT_FIXED_BINARY_FN(operator&, detail::bitwise_and)
-BOOST_XINT_FIXED_BINARY_FN(operator|, detail::bitwise_or)
-BOOST_XINT_FIXED_BINARY_FN(operator^, detail::bitwise_xor)
-
-bool operator==(const fixed_integer_any &num1, const fixed_integer_any &num2);
-bool operator!=(const fixed_integer_any& num1, const fixed_integer_any& num2);
-bool operator<(const fixed_integer_any& num1, const fixed_integer_any& num2);
-bool operator>(const fixed_integer_any& num1, const fixed_integer_any& num2);
-bool operator<=(const fixed_integer_any& num1, const fixed_integer_any& num2);
-bool operator>=(const fixed_integer_any& num1, const fixed_integer_any& num2);
-//!@}
-
-//! \name Miscellaneous functions
-//!@{
-int compare(const fixed_integer_any& c1, const fixed_integer_any& c2, bool
- ignoresign=false);
-size_t log2(const fixed_integer_any& n);
-template <size_t Bits>
-fixed_integer<Bits> gcd(const fixed_integer<Bits>& num1, const
- fixed_integer<Bits>& num2);
-template <size_t Bits>
-fixed_integer<Bits> lcm(const fixed_integer<Bits>& num1, const
- fixed_integer<Bits>& num2);
-//!@}
-
-////////////////////////////////////////////////////////////////////////////////
-// fixed_integer member function definitions
-
-//! \brief Creates a new fixed_integer with an initial value of zero.
-template <size_t Bits>
-fixed_integer<Bits>::fixed_integer(): fixed_integer_any(preallocated_zero.get())
-{ }
-
-/*! \brief Creates a copy of an existing fixed_integer with the same size.
+template<size_t Bits, class Alloc, bool Threadsafe, bool Secure>
+fixed_integer<Bits, Alloc, Threadsafe, Secure>::fixed_integer(const char
+ *str, char **endptr, size_t base): any_integer(*this, 1)
+{
+ data.from_string(str, endptr, base);
+}
 
-\param[in] b An existing integer of the same size.
+/*! \copydoc integer_t::integer_t(const std::string&, size_t)
 
-\overload
+\note
+This function does \e not stop when the fixed_integer's bits are full. It uses
+the entire string, then truncates the result to the proper number of bits.
 */
-template <size_t Bits>
-fixed_integer<Bits>::fixed_integer(const fixed_integer<Bits>& b):
- fixed_integer_any(b) { }
-
-/*! \brief Converts an existing xint type.
-
-\param[in] b An existing integer, nothrow_integer, or fixed_integer of a
-different size.
+template<size_t Bits, class Alloc, bool Threadsafe, bool Secure>
+fixed_integer<Bits, Alloc, Threadsafe, Secure>::fixed_integer(const
+ std::string& str, size_t base): any_integer(*this, 1)
+{
+ data.from_string(str.c_str(), str.length(), base);
+}
 
-\overload
+/*! \copydoc integer_t::integer_t(const xint::binary_t, size_t)
 
-\note If the number represented by the parameter is too large to fit into the
-fixed_integer, it is silently truncated, and only the lower bits are preserved.
+\note
+This function does \e not stop when the fixed_integer's bits are full. It uses
+the entire \c binary_t item, then truncates the result to the proper number of
+bits.
 */
-template <size_t Bits>
-fixed_integer<Bits>::fixed_integer(const base_integer& b):
- fixed_integer_any(preallocated_zero.get())
+template<size_t Bits, class Alloc, bool Threadsafe, bool Secure>
+fixed_integer<Bits, Alloc, Threadsafe, Secure>::fixed_integer(const
+ xint::binary_t b, size_t bits): any_integer(*this, 1)
 {
- if (b._is_nan()) throw exceptions::not_a_number();
- _attach(b, false);
+ data.from_binary(b, bits);
 }
 
-/*! \copydoc integer::integer(const std::string&, size_t)
-
-\note If the number represented by the parameter is too large to fit into the
-fixed_integer, it is silently truncated, and only the lower bits are preserved.
-*/
-template <size_t Bits>
-fixed_integer<Bits>::fixed_integer(const std::string& str, size_t base):
- fixed_integer_any(_c_digits, _c_mask)
+//! \copydoc integer_t::integer_t(const any_integer&)
+template<size_t Bits, class Alloc, bool Threadsafe, bool Secure>
+fixed_integer<Bits, Alloc, Threadsafe, Secure>::fixed_integer(const any_integer&
+ c): detail::fixed_digitmanager_t<Bits, Alloc, Threadsafe, Secure>(
+ *c._data().holder()), any_integer(*this, (std::min)(c._data().length,
+ fixed_integer<Bits, Alloc, Threadsafe, Secure>::fixed), c._data().negative)
 {
- detail::from_string(*this, str, base);
+ data.beginendmod();
 }
 
 /*!
-Constructs a new fixed_integer object with the value of the built-in signed
-%integer passed to it.
-
-\param[in] n A number of type \c T.
-\tparam T The type of \c n.
+ Constructs a new integer object with the value of the built-in %integer type
+ passed to it.
 
-You can ignore the \c enable_if parameters, they are there only to tell
-the compiler what types it applies to.
+ \param[in] n The value for the new object.
+ \tparam Type The type of \c n.
 
-\overload
+ You can ignore the \c enable_if parameter, it's there only to tell the
+ compiler what types the function applies to.
 
-\note If the number represented by the parameter is too large to fit into the
-fixed_integer, it is silently truncated, and only the lower bits are preserved.
+ \overload
 */
-template <size_t Bits>
-template <typename T>
-fixed_integer<Bits>::fixed_integer(const T& n,
- typename boost::enable_if<boost::is_integral<T> >::type*,
- typename boost::enable_if<boost::is_signed<T> >::type*):
- fixed_integer_any(_c_digits, _c_mask)
+template<size_t Bits, class Alloc, bool Threadsafe, bool Secure>
+template <typename Type> fixed_integer<Bits, Alloc, Threadsafe,
+ Secure>::fixed_integer(const Type n, typename
+ boost::enable_if<boost::is_integral<Type> >::type*): any_integer(*this, 1)
 {
- _set_signed(n);
+ if (std::numeric_limits<Type>::is_signed) data.set_signed(n);
+ else data.set_unsigned(n);
 }
 
-/*!
-Constructs a new integer object with the value of the built-in unsigned
-%integer passed to it.
-
-\param[in] n A number of type \c T.
-\tparam T The type of \c n.
+template<size_t Bits, class Alloc, bool Threadsafe, bool Secure>
+fixed_integer<Bits, Alloc, Threadsafe, Secure>& fixed_integer<Bits, Alloc,
+ Threadsafe, Secure>::operator=(BOOST_XINT_COPY_ASSIGN_REF(type) c)
+{
+ data = c.data;
+ data.beginendmod();
+ return *this;
+}
 
-You can ignore the \c enable_if parameters, they are there only to tell
-the compiler what types it applies to.
+//! \copydoc integer_t::operator-
+template<size_t Bits, class Alloc, bool Threadsafe, bool Secure>
+fixed_integer<Bits, Alloc, Threadsafe, Secure> fixed_integer<Bits, Alloc,
+ Threadsafe, Secure>::operator-() const
+{
+ fixed_integer<Bits, Alloc, Threadsafe, Secure> r(-data);
+ return BOOST_XINT_MOVE(r);
+}
 
-\overload
+/*! \brief The Bitwise Ones' Complement (i.e. bitwise NOT) operator.
 
-\note If the number represented by the parameter is too large to fit into the
-fixed_integer, it is silently truncated, and only the lower bits are preserved.
+This operator does not exist in the integer and nothrow_integer classes, because
+as their lengths are not limited, it would result in an infinitely long number.
 */
-template <size_t Bits>
-template <typename T>
-fixed_integer<Bits>::fixed_integer(const T& n,
- typename boost::enable_if<boost::is_integral<T> >::type*,
- typename boost::enable_if<boost::is_unsigned<T> >::type*):
- fixed_integer_any(_c_digits, _c_mask)
+template <size_t Bits, class Alloc, bool Threadsafe, bool Secure>
+fixed_integer<Bits, Alloc, Threadsafe, Secure> fixed_integer<Bits, Alloc,
+ Threadsafe, Secure>::operator~() const
+{
+ fixed_integer<Bits, Alloc, Threadsafe, Secure> r;
+ r.data.beginmod(this->fixed_length(), true);
+ const detail::digit_t *s = data.digits(), *se = s + data.length;
+ detail::digit_t *t = r.data.digits(), *te = t + this->fixed_length();
+ while (s != se) *t++ = ~(*s++);
+ while (t != te) *t++ = static_cast<detail::digit_t>(~0);
+ r.data.length = this->fixed_length();
+ r.data.endmod();
+ return BOOST_XINT_MOVE(r);
+}
+
+//! \see operator+(fixed_integer, fixed_integer)
+template<size_t Bits, class Alloc, bool Threadsafe, bool Secure>
+fixed_integer<Bits, Alloc, Threadsafe, Secure>& fixed_integer<Bits, Alloc,
+ Threadsafe, Secure>::operator+=(const fixed_integer<Bits, Alloc, Threadsafe,
+ Secure> b)
 {
- _set_unsigned(n);
+ data += b.data;
+ return *this;
 }
 
-//! \copydoc integer::odd
-template <size_t Bits>
-bool fixed_integer<Bits>::odd() const {
- return (_get_digit(0) & 0x01) != 0;
+//! \see operator-(fixed_integer, fixed_integer)
+template<size_t Bits, class Alloc, bool Threadsafe, bool Secure>
+fixed_integer<Bits, Alloc, Threadsafe, Secure>& fixed_integer<Bits, Alloc,
+ Threadsafe, Secure>::operator-=(const fixed_integer<Bits, Alloc, Threadsafe,
+ Secure> b)
+{
+ data -= b.data;
+ return *this;
 }
 
-//! \copydoc integer::even
-template <size_t Bits>
-bool fixed_integer<Bits>::even() const {
- return (_get_digit(0) & 0x01) == 0;
+//! \see operator*(fixed_integer, fixed_integer)
+template<size_t Bits, class Alloc, bool Threadsafe, bool Secure>
+fixed_integer<Bits, Alloc, Threadsafe, Secure>& fixed_integer<Bits, Alloc,
+ Threadsafe, Secure>::operator*=(const fixed_integer<Bits, Alloc, Threadsafe,
+ Secure> b)
+{
+ data *= b.data;
+ return *this;
 }
 
-//! \copydoc integer::sign
-template <size_t Bits>
-int fixed_integer<Bits>::sign(bool signed_zero) const {
- if (!signed_zero && _is_zero()) return 0;
- else return (_get_negative() ? -1 : 1);
+//! \see operator/(fixed_integer, fixed_integer)
+template<size_t Bits, class Alloc, bool Threadsafe, bool Secure>
+fixed_integer<Bits, Alloc, Threadsafe, Secure>& fixed_integer<Bits, Alloc,
+ Threadsafe, Secure>::operator/=(const fixed_integer<Bits, Alloc, Threadsafe,
+ Secure> b)
+{
+ data /= b.data;
+ return *this;
 }
 
-//! \copydoc integer::hex_digits
-template <size_t Bits>
-size_t fixed_integer<Bits>::hex_digits() const {
- size_t bits=_log2();
- return (bits+3)/4; // Four bits per hex digit, rounded up
+//! \see operator%(fixed_integer, fixed_integer)
+template<size_t Bits, class Alloc, bool Threadsafe, bool Secure>
+fixed_integer<Bits, Alloc, Threadsafe, Secure>& fixed_integer<Bits, Alloc,
+ Threadsafe, Secure>::operator%=(const fixed_integer<Bits, Alloc, Threadsafe,
+ Secure> b)
+{
+ data %= b.data;
+ return *this;
 }
 
-/*! \brief The Bitwise Ones' Complement (i.e. bitwise NOT) operator.
+//! \copydoc integer_t::operator++
+template<size_t Bits, class Alloc, bool Threadsafe, bool Secure>
+fixed_integer<Bits, Alloc, Threadsafe, Secure>& fixed_integer<Bits, Alloc,
+ Threadsafe, Secure>::operator++()
+{
+ ++data;
+ return *this;
+}
 
-This operator does not exist in the integer and nothrow_integer classes, because
-as their lengths are not limited, it would result in an infinitely long number.
-*/
-template <size_t Bits>
-fixed_integer<Bits> fixed_integer<Bits>::operator~() const {
- fixed_integer<Bits> r(*this);
- r._make_unique();
- detail::digit_t *p = r._get_writable_digits(), *pe1 = p + r._get_length(),
- *pe2 = p + _c_digits;
- while (p != pe1) { *p = ~(*p); ++p; }
- while (p != pe2) *p++ = detail::digit_mask;
- r._set_length(_c_digits);
- r._cleanup();
+//! \copydoc integer_t::operator--
+template<size_t Bits, class Alloc, bool Threadsafe, bool Secure>
+fixed_integer<Bits, Alloc, Threadsafe, Secure>& fixed_integer<Bits, Alloc,
+ Threadsafe, Secure>::operator--()
+{
+ --data;
+ return *this;
+}
+
+//! \copydoc integer_t::operator++(int)
+template<size_t Bits, class Alloc, bool Threadsafe, bool Secure>
+fixed_integer<Bits, Alloc, Threadsafe, Secure> fixed_integer<Bits, Alloc,
+ Threadsafe, Secure>::operator++(int)
+{
+ fixed_integer<Bits, Alloc, Threadsafe, Secure> r(data++);
     return BOOST_XINT_MOVE(r);
 }
 
-#define BOOST_XINT_FIXED_OPEQ_FN(name, body) \
-template <size_t Bits> \
-fixed_integer<Bits>& fixed_integer<Bits>::name(const fixed_integer_any& n) { \
- body(*this, *this, n); \
- return *this; \
+//! \copydoc integer_t::operator--(int)
+template<size_t Bits, class Alloc, bool Threadsafe, bool Secure>
+fixed_integer<Bits, Alloc, Threadsafe, Secure> fixed_integer<Bits, Alloc,
+ Threadsafe, Secure>::operator--(int)
+{
+ fixed_integer<Bits, Alloc, Threadsafe, Secure> r(data--);
+ return BOOST_XINT_MOVE(r);
 }
 
-BOOST_XINT_FIXED_OPEQ_FN(operator+=, detail::add)
-BOOST_XINT_FIXED_OPEQ_FN(operator-=, detail::subtract)
-BOOST_XINT_FIXED_OPEQ_FN(operator*=, detail::multiply)
-BOOST_XINT_FIXED_OPEQ_FN(operator/=, detail::divide)
-BOOST_XINT_FIXED_OPEQ_FN(operator%=, detail::mod)
+//! \see operator&(fixed_integer, fixed_integer)
+template<size_t Bits, class Alloc, bool Threadsafe, bool Secure>
+fixed_integer<Bits, Alloc, Threadsafe, Secure>& fixed_integer<Bits, Alloc,
+ Threadsafe, Secure>::operator&=(const fixed_integer<Bits, Alloc, Threadsafe,
+ Secure> n)
+{
+ data &= n.data;
+ return *this;
+}
 
-template <size_t Bits>
-fixed_integer<Bits>& fixed_integer<Bits>::operator<<=(size_t shift) {
- detail::shift_left(*this, *this, shift);
+//! \see operator|(fixed_integer, fixed_integer)
+template<size_t Bits, class Alloc, bool Threadsafe, bool Secure>
+fixed_integer<Bits, Alloc, Threadsafe, Secure>& fixed_integer<Bits, Alloc,
+ Threadsafe, Secure>::operator|=(const fixed_integer<Bits, Alloc, Threadsafe,
+ Secure> n)
+{
+ data |= n.data;
     return *this;
 }
 
-template <size_t Bits>
-fixed_integer<Bits>& fixed_integer<Bits>::operator>>=(size_t shift) {
- detail::shift_right(*this, *this, shift);
+//! \see operator^(fixed_integer, fixed_integer)
+template<size_t Bits, class Alloc, bool Threadsafe, bool Secure>
+fixed_integer<Bits, Alloc, Threadsafe, Secure>& fixed_integer<Bits, Alloc,
+ Threadsafe, Secure>::operator^=(const fixed_integer<Bits, Alloc, Threadsafe,
+ Secure> n)
+{
+ data ^= n.data;
     return *this;
 }
 
-template <size_t Bits>
-fixed_integer<Bits> fixed_integer<Bits>::operator<<(size_t shift) const {
- fixed_integer<Bits> r;
- detail::shift_left(r, *this, shift);
+//! \copydoc integer_t::operator<<(size_t) const
+template<size_t Bits, class Alloc, bool Threadsafe, bool Secure>
+fixed_integer<Bits, Alloc, Threadsafe, Secure> fixed_integer<Bits, Alloc,
+ Threadsafe, Secure>::operator<<(size_t shift) const
+{
+ fixed_integer<Bits, Alloc, Threadsafe, Secure> r(data << shift);
     return BOOST_XINT_MOVE(r);
 }
 
-template <size_t Bits>
-fixed_integer<Bits> fixed_integer<Bits>::operator>>(size_t shift) const {
- fixed_integer<Bits> r;
- detail::shift_right(r, *this, shift);
+//! \copydoc integer_t::operator>>(size_t) const
+template<size_t Bits, class Alloc, bool Threadsafe, bool Secure>
+fixed_integer<Bits, Alloc, Threadsafe, Secure> fixed_integer<Bits, Alloc,
+ Threadsafe, Secure>::operator>>(size_t shift) const
+{
+ fixed_integer<Bits, Alloc, Threadsafe, Secure> r(data >> shift);
     return BOOST_XINT_MOVE(r);
 }
 
-template <size_t Bits>
-fixed_integer<Bits>& fixed_integer<Bits>::operator++() {
- _increment();
+//! \see fixed_integer::operator<<(size_t) const
+template<size_t Bits, class Alloc, bool Threadsafe, bool Secure>
+fixed_integer<Bits, Alloc, Threadsafe, Secure>& fixed_integer<Bits, Alloc,
+ Threadsafe, Secure>::operator<<=(size_t shift)
+{
+ data <<= shift;
     return *this;
 }
 
-template <size_t Bits>
-fixed_integer<Bits>& fixed_integer<Bits>::operator--() {
- _decrement();
+//! \see fixed_integer::operator>>(size_t) const
+template<size_t Bits, class Alloc, bool Threadsafe, bool Secure>
+fixed_integer<Bits, Alloc, Threadsafe, Secure>& fixed_integer<Bits, Alloc,
+ Threadsafe, Secure>::operator>>=(size_t shift)
+{
+ data >>= shift;
     return *this;
 }
 
-template <size_t Bits>
-fixed_integer<Bits> fixed_integer<Bits>::operator++(int) {
- fixed_integer<Bits> old(*this);
- _increment();
- return BOOST_XINT_MOVE(old);
+//! \copydoc integer_t::is_odd
+template<size_t Bits, class Alloc, bool Threadsafe, bool Secure>
+bool fixed_integer<Bits, Alloc, Threadsafe, Secure>::is_odd() const {
+ return data.is_odd();
 }
 
-template <size_t Bits>
-fixed_integer<Bits> fixed_integer<Bits>::operator--(int) {
- fixed_integer<Bits> old(*this);
- _decrement();
- return BOOST_XINT_MOVE(old);
+//! \copydoc integer_t::is_even
+template<size_t Bits, class Alloc, bool Threadsafe, bool Secure>
+bool fixed_integer<Bits, Alloc, Threadsafe, Secure>::is_even() const {
+ return data.is_even();
 }
 
-////////////////////////////////////////////////////////////////////////////////
-// Non-member fixed_integer function definitions
-
-//! \copydoc abs(const integer&)
-template <size_t Bits>
-fixed_integer<Bits> abs(const fixed_integer<Bits>& n) {
- if (n._get_negative()) {
- fixed_integer<Bits> r(n);
- r._set_negative(false);
- return BOOST_XINT_MOVE(r);
- } else return n;
+//! \copydoc integer_t::sign
+template<size_t Bits, class Alloc, bool Threadsafe, bool Secure>
+int fixed_integer<Bits, Alloc, Threadsafe, Secure>::sign(bool signed_zero)
+ const
+{
+ return data.sign(signed_zero);
 }
 
-//! \copydoc negate(const integer&)
-template <size_t Bits>
-fixed_integer<Bits> negate(const fixed_integer<Bits>& n) {
- fixed_integer<Bits> r(n);
- r._set_negative(!r._get_negative());
- return BOOST_XINT_MOVE(r);
+//! \copydoc integer_t::hex_digits
+template<size_t Bits, class Alloc, bool Threadsafe, bool Secure>
+size_t fixed_integer<Bits, Alloc, Threadsafe, Secure>::hex_digits() const {
+ return data.hex_digits();
 }
 
-//! \copydoc add(const integer&, const integer&)
-template <size_t Bits>
-fixed_integer<Bits> add(const fixed_integer<Bits>& n1, const
- fixed_integer<Bits>& n2)
+//! \copydoc integer_t::pow2
+template<size_t Bits, class Alloc, bool Threadsafe, bool Secure>
+fixed_integer<Bits, Alloc, Threadsafe, Secure> fixed_integer<Bits, Alloc,
+ Threadsafe, Secure>::pow2(size_t exponent)
 {
- fixed_integer<Bits> r;
- detail::add(r, n1, n2);
+ fixed_integer<Bits, Alloc, Threadsafe, Secure> r;
+ detail::pow2(r.data, exponent);
     return BOOST_XINT_MOVE(r);
 }
 
-//! \copydoc subtract(const integer&, const integer&)
-template <size_t Bits>
-fixed_integer<Bits> subtract(const fixed_integer<Bits>& n1, const
- fixed_integer<Bits>& n2)
+//! \copydoc integer_t::factorial
+template<size_t Bits, class Alloc, bool Threadsafe, bool Secure>
+fixed_integer<Bits, Alloc, Threadsafe, Secure> fixed_integer<Bits, Alloc,
+ Threadsafe, Secure>::factorial(size_t n)
 {
- fixed_integer<Bits> r;
- detail::subtract(r, n1, n2);
+ fixed_integer<Bits, Alloc, Threadsafe, Secure> r;
+ detail::factorial(r.data, n);
     return BOOST_XINT_MOVE(r);
 }
 
-//! \copydoc multiply(const integer&, const integer&)
-template <size_t Bits>
-fixed_integer<Bits> multiply(const fixed_integer<Bits>& n, const
- fixed_integer<Bits>& by)
+//! \copydoc integer_t::random_by_size
+template<size_t Bits, class Alloc, bool Threadsafe, bool Secure>
+template <class Type>
+fixed_integer<Bits, Alloc, Threadsafe, Secure> fixed_integer<Bits, Alloc,
+ Threadsafe, Secure>::random_by_size(Type& gen, size_t size_in_bits, bool
+ high_bit_on, bool low_bit_on, bool can_be_negative)
 {
- fixed_integer<Bits> r;
- detail::multiply(r, n, by);
+ detail::random_generator<Type> rgen(gen);
+
+ fixed_integer<Bits, Alloc, Threadsafe, Secure> r;
+ detail::random_by_size(r._data(), rgen, size_in_bits, high_bit_on,
+ low_bit_on, can_be_negative);
     return BOOST_XINT_MOVE(r);
 }
 
-//! \copydoc divide(const integer&, const integer&)
-template <size_t Bits>
-fixed_integer<Bits> divide(const fixed_integer<Bits>& dividend,
- const fixed_integer<Bits>& divisor)
+//! \copydoc integer_t::random_prime
+template<size_t Bits, class Alloc, bool Threadsafe, bool Secure>
+template <class Type>
+fixed_integer<Bits, Alloc, Threadsafe, Secure> fixed_integer<Bits, Alloc,
+ Threadsafe, Secure>::random_prime(Type& gen, size_t size_in_bits, callback_t
+ callback)
 {
- fixed_integer<Bits> q, r;
- detail::divide(q, r, dividend, divisor);
- return BOOST_XINT_MOVE(q);
-}
+ detail::random_generator<Type> rgen(gen);
 
-//! \copydoc divide(const integer&, const integer&)
-template <size_t Bits>
-typename fixed_integer<Bits>::divide_t divide_r(const fixed_integer<Bits>&
- dividend, const fixed_integer<Bits>& divisor)
-{
- fixed_integer<Bits> q, r;
- detail::divide(q, r, dividend, divisor);
- return BOOST_XINT_FORWARD(fixed_integer<Bits>::divide_t,
- fixed_integer<Bits>::divide_t(BOOST_XINT_MOVE(q), BOOST_XINT_MOVE(r)));
+ fixed_integer<Bits, Alloc, Threadsafe, Secure> r;
+ detail::random_prime(r._data(), rgen, size_in_bits, callback);
+ return BOOST_XINT_MOVE(r);
 }
 
-//! \copydoc sqr(const integer&)
-template <size_t Bits>
-fixed_integer<Bits> sqr(const fixed_integer<Bits>& n) {
- fixed_integer<Bits> r;
- detail::sqr(r, n);
+////////////////////////////////////////////////////////////////////////////////
+// Free function template definitions
+
+//! \name Mathematical primitives
+//!@{
+//! \copydoc abs(integer_t)
+template<size_t Bits, class Alloc, bool Threadsafe, bool Secure>
+fixed_integer<Bits, Alloc, Threadsafe, Secure> abs(const fixed_integer<Bits,
+ Alloc, Threadsafe, Secure> n)
+{
+ fixed_integer<Bits, Alloc, Threadsafe, Secure> r(abs(n._data()));
     return BOOST_XINT_MOVE(r);
 }
 
-//! \copydoc pow(const integer&, const integer&)
-template <size_t Bits>
-fixed_integer<Bits> pow(const fixed_integer<Bits>& n, const
- fixed_integer_any& e)
+//! \copydoc divide(integer_t, integer_t)
+template<size_t Bits, class Alloc, bool Threadsafe, bool Secure>
+typename fixed_integer<Bits, Alloc, Threadsafe, Secure>::divide_t divide(const
+ fixed_integer<Bits, Alloc, Threadsafe, Secure> dividend, const
+ fixed_integer<Bits, Alloc, Threadsafe, Secure> divisor)
 {
- fixed_integer<Bits> r;
- detail::pow(r, n, e);
+ typename fixed_integer<Bits, Alloc, Threadsafe, Secure>::divide_t r;
+ divide(r.quotient._data(), r.remainder._data(), dividend._data(),
+ divisor._data());
     return BOOST_XINT_MOVE(r);
 }
+//!@}
 
-//! \copydoc pow2(size_t)
-template <size_t Bits>
-fixed_integer<Bits> fixed_pow2(size_t e) {
- fixed_integer<Bits> r;
- setbit(r, e);
+//! \name Powers and roots
+//!@{
+//! \copydoc square(integer_t)
+template<size_t Bits, class Alloc, bool Threadsafe, bool Secure>
+fixed_integer<Bits, Alloc, Threadsafe, Secure> square(const fixed_integer<Bits,
+ Alloc, Threadsafe, Secure> n)
+{
+ fixed_integer<Bits, Alloc, Threadsafe, Secure> r;
+ square(r._data(), n._data());
     return BOOST_XINT_MOVE(r);
 }
 
-//! \copydoc factorial(size_t)
-template <size_t Bits>
-fixed_integer<Bits> fixed_factorial(size_t n) {
- fixed_integer<Bits> r;
- detail::factorial(r, n);
+//! \copydoc pow(integer_t, integer_t)
+template<size_t Bits, class Alloc, bool Threadsafe, bool Secure>
+fixed_integer<Bits, Alloc, Threadsafe, Secure> pow(const fixed_integer<Bits,
+ Alloc, Threadsafe, Secure> n, const fixed_integer<Bits, Alloc, Threadsafe,
+ Secure> e)
+{
+ fixed_integer<Bits, Alloc, Threadsafe, Secure> r;
+ pow(r._data(), n._data(), e._data());
     return BOOST_XINT_MOVE(r);
 }
 
-//! \copydoc sqrt(const integer&)
-template <size_t Bits>
-fixed_integer<Bits> sqrt(const fixed_integer<Bits>& n) {
- fixed_integer<Bits> r;
- detail::sqrt(r, n);
+//! \copydoc sqrt(integer_t)
+template<size_t Bits, class Alloc, bool Threadsafe, bool Secure>
+fixed_integer<Bits, Alloc, Threadsafe, Secure> sqrt(const fixed_integer<Bits,
+ Alloc, Threadsafe, Secure> n)
+{
+ fixed_integer<Bits, Alloc, Threadsafe, Secure> r;
+ sqrt(r._data(), n._data());
     return BOOST_XINT_MOVE(r);
 }
+//!@}
 
-//! \copydoc to(const integer&)
-template <size_t Bits, typename T>
-T to(const fixed_integer<Bits>& n) {
- return detail::to<T>(n);
+//! \name Conversion functions
+//!@{
+//! \copydoc to(integer_t)
+template <typename Type, size_t Bits, class Alloc, bool Threadsafe, bool Secure>
+Type to(const fixed_integer<Bits, Alloc, Threadsafe, Secure> n) {
+ return to<Type>(n._data());
 }
 
-//! \copydoc from_string
-template <size_t Bits>
-fixed_integer<Bits> fixed_from_string(const std::string& str, size_t base) {
- fixed_integer<Bits> r;
- detail::from_string(r, str, base);
- return BOOST_XINT_MOVE(r);
+//! \copydoc to_string(integer_t, size_t, bool)
+template<size_t Bits, class Alloc, bool Threadsafe, bool Secure>
+std::string to_string(const fixed_integer<Bits, Alloc, Threadsafe, Secure> n,
+ size_t base = 10, bool uppercase = false)
+{
+ return to_string(n._data(), base, uppercase);
 }
 
-//! \copydoc to_binary(const integer&, size_t bits)
-template <size_t Bits>
-xint::binary_t to_binary(const fixed_integer_any& n, size_t bits) {
- xint::binary_t r;
- detail::to_binary(r, n, bits);
- return r;
+//! \copydoc to_binary(integer_t, size_t)
+template<size_t Bits, class Alloc, bool Threadsafe, bool Secure>
+xint::binary_t to_binary(const fixed_integer<Bits, Alloc, Threadsafe, Secure> n,
+ size_t bits = 0)
+{
+ return to_binary(n._data(), bits);
 }
+//!@}
 
-//! \copydoc from_binary
-template <size_t Bits>
-fixed_integer<Bits> fixed_from_binary(const xint::binary_t& b, size_t bits) {
- fixed_integer<Bits> r;
- detail::from_binary(r, b, bits);
- return BOOST_XINT_MOVE(r);
+//! \name Bit-manipulation functions
+//!@{
+//! \copydoc getbit(const integer_t, size_t)
+template<size_t Bits, class Alloc, bool Threadsafe, bool Secure>
+bool getbit(const fixed_integer<Bits, Alloc, Threadsafe, Secure> n, size_t bit)
+{
+ return getbit(n._data(), bit);
 }
 
-//! \copydoc getbit(const integer&, size_t)
-template <size_t Bits>
-bool getbit(const fixed_integer<Bits>& n, size_t bit) {
- return detail::getbit(n, bit);
+//! \copydoc setbit(integer_t&, size_t)
+template<size_t Bits, class Alloc, bool Threadsafe, bool Secure>
+void setbit(fixed_integer<Bits, Alloc, Threadsafe, Secure>& n, size_t bit) {
+ setbit(n._data(), bit);
 }
 
-//! \copydoc setbit(integer&, size_t)
-template <size_t Bits>
-void setbit(fixed_integer<Bits>& n, size_t bit) {
- return detail::setbit(n, bit);
+//! \copydoc clearbit(integer_t&, size_t)
+template<size_t Bits, class Alloc, bool Threadsafe, bool Secure>
+void clearbit(fixed_integer<Bits, Alloc, Threadsafe, Secure>& n, size_t bit) {
+ clearbit(n._data(), bit);
 }
 
-//! \copydoc clearbit(integer&, size_t)
-template <size_t Bits>
-void clearbit(fixed_integer<Bits>& n, size_t bit) {
- return detail::clearbit(n, bit);
+//! \copydoc lowestbit(integer_t, size_t)
+template<size_t Bits, class Alloc, bool Threadsafe, bool Secure>
+size_t lowestbit(const fixed_integer<Bits, Alloc, Threadsafe, Secure> n, size_t
+ return_if_zero = 0)
+{
+ return lowestbit(n._data(), return_if_zero);
 }
 
-//! \copydoc lowestbit(const integer&, size_t)
-template <size_t Bits>
-size_t lowestbit(const fixed_integer<Bits>& n, size_t valueIfZero) {
- return detail::lowestbit(n, valueIfZero);
+//! \copydoc highestbit(integer_t, size_t)
+template<size_t Bits, class Alloc, bool Threadsafe, bool Secure>
+size_t highestbit(const fixed_integer<Bits, Alloc, Threadsafe, Secure> n, size_t
+ return_if_zero = 0)
+{
+ return highestbit(n._data(), return_if_zero);
 }
+//!@}
 
-//! \copydoc highestbit(const integer&, size_t)
-template <size_t Bits>
-size_t highestbit(const fixed_integer<Bits>& n, size_t valueIfZero) {
- return detail::highestbit(n, valueIfZero);
+//! \name Modular math functions
+//!@{
+//! \copydoc mulmod(integer_t, integer_t, integer_t)
+template<size_t Bits, class Alloc, bool Threadsafe, bool Secure>
+fixed_integer<Bits, Alloc, Threadsafe, Secure> mulmod(const fixed_integer<Bits,
+ Alloc, Threadsafe, Secure> n, const fixed_integer<Bits, Alloc, Threadsafe,
+ Secure> by, const fixed_integer<Bits, Alloc, Threadsafe, Secure> modulus)
+{
+ fixed_integer<Bits, Alloc, Threadsafe, Secure> r;
+ mulmod(r._data(), n._data(), by._data(), modulus._data());
+ return BOOST_XINT_MOVE(r);
 }
 
-//! \copydoc bitwise_and(const integer&, const integer&)
-template <size_t Bits>
-fixed_integer<Bits> bitwise_and(const fixed_integer<Bits>& n1, const
- fixed_integer<Bits>& n2)
+//! \copydoc sqrmod(integer_t, integer_t)
+template<size_t Bits, class Alloc, bool Threadsafe, bool Secure>
+fixed_integer<Bits, Alloc, Threadsafe, Secure> sqrmod(const fixed_integer<Bits,
+ Alloc, Threadsafe, Secure> n, const fixed_integer<Bits, Alloc, Threadsafe,
+ Secure> modulus)
 {
- fixed_integer<Bits> r;
- detail::bitwise_and(r, n1, n2);
+ fixed_integer<Bits, Alloc, Threadsafe, Secure> r;
+ sqrmod(r._data(), n._data(), modulus._data());
     return BOOST_XINT_MOVE(r);
 }
 
-//! \copydoc bitwise_or(const integer&, const integer&)
-template <size_t Bits>
-fixed_integer<Bits> bitwise_or (const fixed_integer<Bits>& n1, const
- fixed_integer<Bits>& n2)
+//! \copydoc powmod(integer_t, integer_t, integer_t, bool)
+template<size_t Bits, class Alloc, bool Threadsafe, bool Secure>
+fixed_integer<Bits, Alloc, Threadsafe, Secure> powmod(const fixed_integer<Bits,
+ Alloc, Threadsafe, Secure> n, const fixed_integer<Bits, Alloc, Threadsafe,
+ Secure> exponent, const fixed_integer<Bits, Alloc, Threadsafe, Secure>
+ modulus, bool no_monty)
 {
- fixed_integer<Bits> r;
- detail::bitwise_or(r, n1, n2);
+ fixed_integer<Bits, Alloc, Threadsafe, Secure> r;
+ powmod(r._data(), n._data(), exponent._data(), modulus._data(), no_monty);
     return BOOST_XINT_MOVE(r);
 }
 
-//! \copydoc bitwise_xor(const integer&, const integer&)
-template <size_t Bits>
-fixed_integer<Bits> bitwise_xor(const fixed_integer<Bits>& n1, const
- fixed_integer<Bits>& n2)
+//! \copydoc invmod(integer_t, integer_t)
+template<size_t Bits, class Alloc, bool Threadsafe, bool Secure>
+fixed_integer<Bits, Alloc, Threadsafe, Secure> invmod(const fixed_integer<Bits,
+ Alloc, Threadsafe, Secure> n, const fixed_integer<Bits, Alloc, Threadsafe,
+ Secure> modulus)
 {
- fixed_integer<Bits> r;
- detail::bitwise_xor(r, n1, n2);
+ fixed_integer<Bits, Alloc, Threadsafe, Secure> r;
+ invmod(r._data(), n._data(), modulus._data());
     return BOOST_XINT_MOVE(r);
 }
+//!@}
 
-//! \copydoc shift(const integer&, int)
-template <size_t Bits>
-fixed_integer<Bits> shift(const fixed_integer<Bits>& n, int byBits) {
- return (byBits < 0 ? shift_right(n, -byBits) : shift_left(n, byBits));
+//! \name Random and prime number functions
+//!@{
+//! \copydoc is_prime(integer_t, callback_t)
+template<size_t Bits, class Alloc, bool Threadsafe, bool Secure>
+int is_prime(const fixed_integer<Bits, Alloc, Threadsafe, Secure> n, callback_t
+ callback = no_callback)
+{
+ return is_prime(n._data(), callback);
 }
+//!@}
 
-//! \copydoc shift_left(const integer&, size_t)
-template <size_t Bits>
-fixed_integer<Bits> shift_left(const fixed_integer<Bits>& n, size_t byBits) {
- fixed_integer<Bits> r;
- detail::shift_left(r, n, byBits);
+//! \name Comparison Operators
+//!@{
+template<size_t Bits, class Alloc, bool Threadsafe, bool Secure> bool
+ operator<(const fixed_integer<Bits, Alloc, Threadsafe, Secure> n1, const
+ fixed_integer<Bits, Alloc, Threadsafe, Secure> n2) { return
+ operator<(n1._data(), n2._data()); }
+template<size_t Bits, class Alloc, bool Threadsafe, bool Secure> bool
+ operator>(const fixed_integer<Bits, Alloc, Threadsafe, Secure> n1, const
+ fixed_integer<Bits, Alloc, Threadsafe, Secure> n2) { return
+ operator>(n1._data(), n2._data()); }
+template<size_t Bits, class Alloc, bool Threadsafe, bool Secure> bool
+ operator<=(const fixed_integer<Bits, Alloc, Threadsafe, Secure> n1, const
+ fixed_integer<Bits, Alloc, Threadsafe, Secure> n2) { return
+ operator<=(n1._data(), n2._data()); }
+template<size_t Bits, class Alloc, bool Threadsafe, bool Secure> bool
+ operator>=(const fixed_integer<Bits, Alloc, Threadsafe, Secure> n1, const
+ fixed_integer<Bits, Alloc, Threadsafe, Secure> n2) { return
+ operator>=(n1._data(), n2._data()); }
+template<size_t Bits, class Alloc, bool Threadsafe, bool Secure> bool
+ operator==(const fixed_integer<Bits, Alloc, Threadsafe, Secure> n1, const
+ fixed_integer<Bits, Alloc, Threadsafe, Secure> n2) { return
+ operator==(n1._data(), n2._data()); }
+template<size_t Bits, class Alloc, bool Threadsafe, bool Secure> bool
+ operator!=(const fixed_integer<Bits, Alloc, Threadsafe, Secure> n1, const
+ fixed_integer<Bits, Alloc, Threadsafe, Secure> n2) { return
+ operator!=(n1._data(), n2._data()); }
+//!@}
+
+//! \name Mathematical and Bitwise Operators
+//!@{
+//! \copydoc operator+(integer_t, integer_t)
+template<size_t Bits, class Alloc, bool Threadsafe, bool Secure>
+fixed_integer<Bits, Alloc, Threadsafe, Secure> operator+(const fixed_integer<
+ Bits, Alloc, Threadsafe, Secure> n1, const fixed_integer<Bits, Alloc,
+ Threadsafe, Secure> n2)
+{
+ fixed_integer<Bits, Alloc, Threadsafe, Secure> r(n1._data() + n2._data());
     return BOOST_XINT_MOVE(r);
 }
 
-//! \copydoc shift_right(const integer&, size_t)
-template <size_t Bits>
-fixed_integer<Bits> shift_right(const fixed_integer<Bits>& n, size_t byBits) {
- fixed_integer<Bits> r;
- detail::shift_right(r, n, byBits);
+//! \copydoc operator-(integer_t, integer_t)
+template<size_t Bits, class Alloc, bool Threadsafe, bool Secure>
+fixed_integer<Bits, Alloc, Threadsafe, Secure> operator-(const fixed_integer<
+ Bits, Alloc, Threadsafe, Secure> n1, const fixed_integer<Bits, Alloc,
+ Threadsafe, Secure> n2)
+{
+ fixed_integer<Bits, Alloc, Threadsafe, Secure> r(n1._data() - n2._data());
     return BOOST_XINT_MOVE(r);
 }
 
-template <size_t Bits>
-fixed_integer<Bits> mod(const fixed_integer<Bits>& n, const fixed_integer<Bits>&
- m)
+//! \copydoc operator*(integer_t, integer_t)
+template<size_t Bits, class Alloc, bool Threadsafe, bool Secure>
+fixed_integer<Bits, Alloc, Threadsafe, Secure> operator*(const
+ fixed_integer<Bits, Alloc, Threadsafe, Secure> n1, const fixed_integer<Bits,
+ Alloc, Threadsafe, Secure> n2)
 {
- fixed_integer<Bits> r;
- detail::mod(r, n, m);
+ fixed_integer<Bits, Alloc, Threadsafe, Secure> r(n1._data() * n2._data());
     return BOOST_XINT_MOVE(r);
 }
 
-//! \copydoc mulmod(const integer&, const integer&, const integer&)
-template <size_t Bits>
-fixed_integer<Bits> mulmod(const fixed_integer<Bits>& n, const
- fixed_integer<Bits>& by, const fixed_integer<Bits>& m)
+//! \copydoc operator/(integer_t, integer_t)
+template<size_t Bits, class Alloc, bool Threadsafe, bool Secure>
+fixed_integer<Bits, Alloc, Threadsafe, Secure> operator/(const fixed_integer<
+ Bits, Alloc, Threadsafe, Secure> dividend, const fixed_integer<Bits, Alloc,
+ Threadsafe, Secure> divisor)
 {
- return mod(n * by, m);
+ fixed_integer<Bits, Alloc, Threadsafe, Secure> r(dividend._data() /
+ divisor._data());
+ return BOOST_XINT_MOVE(r);
 }
 
-//! \copydoc sqrmod(const integer&, const integer&)
-template <size_t Bits>
-fixed_integer<Bits> sqrmod(const fixed_integer<Bits>& n, const
- fixed_integer<Bits>& m)
+//! \copydoc operator%(integer_t, integer_t)
+template<size_t Bits, class Alloc, bool Threadsafe, bool Secure>
+fixed_integer<Bits, Alloc, Threadsafe, Secure> operator%(const fixed_integer<
+ Bits, Alloc, Threadsafe, Secure> n1, const fixed_integer<Bits, Alloc,
+ Threadsafe, Secure> n2)
 {
- return mod(sqr(n), m);
+ fixed_integer<Bits, Alloc, Threadsafe, Secure> r(n1._data() % n2._data());
+ return BOOST_XINT_MOVE(r);
 }
 
-//! \copydoc powmod(const integer&, const integer&, const integer&, bool)
-template <size_t Bits>
-fixed_integer<Bits> powmod(const fixed_integer<Bits>& n, const
- fixed_integer<Bits>& e, const fixed_integer<Bits>& m, bool noMontgomery)
+//! \copydoc operator&(integer_t, integer_t)
+template<size_t Bits, class Alloc, bool Threadsafe, bool Secure>
+fixed_integer<Bits, Alloc, Threadsafe, Secure> operator&(const fixed_integer<
+ Bits, Alloc, Threadsafe, Secure> n1, const fixed_integer<Bits, Alloc,
+ Threadsafe, Secure> n2)
 {
- fixed_integer<Bits> r;
- detail::powmod(r, n, e, m, noMontgomery);
+ fixed_integer<Bits, Alloc, Threadsafe, Secure> r(n1._data() & n2._data());
     return BOOST_XINT_MOVE(r);
 }
 
-//! \copydoc invmod(const integer&, const integer&)
-template <size_t Bits>
-fixed_integer<Bits> invmod(const fixed_integer<Bits>& n, const
- fixed_integer<Bits>& m)
+//! \copydoc operator|(integer_t, integer_t)
+template<size_t Bits, class Alloc, bool Threadsafe, bool Secure>
+fixed_integer<Bits, Alloc, Threadsafe, Secure> operator|(const fixed_integer<
+ Bits, Alloc, Threadsafe, Secure> n1, const fixed_integer<Bits, Alloc,
+ Threadsafe, Secure> n2)
 {
- fixed_integer<Bits> r;
- detail::invmod(r, n, m);
+ fixed_integer<Bits, Alloc, Threadsafe, Secure> r(n1._data() | n2._data());
     return BOOST_XINT_MOVE(r);
 }
 
-//! \copydoc random_by_size
-template <class T, size_t Bits>
-fixed_integer<Bits> fixed_random_by_size(T& gen, size_t bits, bool high_bit_on,
- bool low_bit_on, bool can_be_negative)
+//! \copydoc operator^(integer_t, integer_t)
+template<size_t Bits, class Alloc, bool Threadsafe, bool Secure>
+fixed_integer<Bits, Alloc, Threadsafe, Secure> operator^(const fixed_integer<
+ Bits, Alloc, Threadsafe, Secure> n1, const fixed_integer<Bits, Alloc,
+ Threadsafe, Secure> n2)
 {
- return BOOST_XINT_MOVE(fixed_integer<Bits>(random_by_size(gen,
- (std::min)(Bits, bits), high_bit_on, low_bit_on, can_be_negative)));
+ fixed_integer<Bits, Alloc, Threadsafe, Secure> r(n1._data() ^ n2._data());
+ return BOOST_XINT_MOVE(r);
 }
+//!@}
 
-//! \copydoc random_prime
-template <class T, size_t Bits>
-fixed_integer<Bits> fixed_random_prime(T& gen, size_t size_in_bits, callback_t
- callback)
+//! \name Miscellaneous functions
+//!@{
+//! \copydoc gcd(integer_t, integer_t)
+template<size_t Bits, class Alloc, bool Threadsafe, bool Secure>
+fixed_integer<Bits, Alloc, Threadsafe, Secure> gcd(const fixed_integer<Bits,
+ Alloc, Threadsafe, Secure> num1, const fixed_integer<Bits, Alloc,
+ Threadsafe, Secure> num2)
 {
- fixed_integer<Bits> r(random_prime(gen, (std::min)(Bits, size_in_bits),
- callback));
+ fixed_integer<Bits, Alloc, Threadsafe, Secure> r;
+ gcd(r._data(), num1._data(), num2._data());
     return BOOST_XINT_MOVE(r);
 }
 
-//! \copydoc gcd(const integer&, const integer&)
-template <size_t Bits>
-fixed_integer<Bits> gcd(const fixed_integer<Bits>& num1, const
- fixed_integer<Bits>& num2)
+//! \copydoc lcm(integer_t, integer_t)
+template<size_t Bits, class Alloc, bool Threadsafe, bool Secure>
+fixed_integer<Bits, Alloc, Threadsafe, Secure> lcm(const fixed_integer<Bits,
+ Alloc, Threadsafe, Secure> num1, const fixed_integer<Bits, Alloc,
+ Threadsafe, Secure> num2)
 {
- fixed_integer<Bits> r;
- detail::gcd(r, num1, num2);
+ fixed_integer<Bits, Alloc, Threadsafe, Secure> r;
+ lcm(r._data(), num1._data(), num2._data());
     return BOOST_XINT_MOVE(r);
 }
 
-//! \copydoc lcm(const integer&, const integer&)
-template <size_t Bits>
-fixed_integer<Bits> lcm(const fixed_integer<Bits>& num1, const
- fixed_integer<Bits>& num2)
+//! \copydoc compare(integer_t, integer_t, bool)
+template<size_t Bits, class Alloc, bool Threadsafe, bool Secure>
+int compare(const fixed_integer<Bits, Alloc, Threadsafe, Secure> n1, const
+ fixed_integer<Bits, Alloc, Threadsafe, Secure> n2, bool ignoresign = false)
 {
- fixed_integer<Bits> r;
- detail::lcm(r, num1, num2);
- return BOOST_XINT_MOVE(r);
+ return compare(n1._data(), n2._data(), ignoresign);
 }
 
+//! \copydoc log2(integer_t)
+template<size_t Bits, class Alloc, bool Threadsafe, bool Secure>
+size_t log2(const fixed_integer<Bits, Alloc, Threadsafe, Secure> n) {
+ return log2(n._data());
+}
+//!@}
+
+//! Allows for comparisons between fixed_integer types and other integral
+//! values.
+#define BOOST_XINT_FIXED_ANY_COMPARE(rtype, op) \
+ template <size_t Bits, class Alloc, bool Threadsafe, bool Secure, typename \
+ N> \
+ rtype op(const fixed_integer<Bits, Alloc, Threadsafe, Secure> n1, const N \
+ n2) \
+ { \
+ return op(n1, fixed_integer<Bits, Alloc, Threadsafe, Secure>(n2)); \
+ } \
+ \
+ template <typename N, size_t Bits, class Alloc, bool Threadsafe, bool \
+ Secure> \
+ rtype op(const N n1, const fixed_integer<Bits, Alloc, Threadsafe, Secure> \
+ n2) \
+ { \
+ return op(fixed_integer<Bits, Alloc, Threadsafe, Secure>(n1), n2); \
+ }
+
+BOOST_XINT_FIXED_ANY_COMPARE(bool, operator<)
+BOOST_XINT_FIXED_ANY_COMPARE(bool, operator>)
+BOOST_XINT_FIXED_ANY_COMPARE(bool, operator<=)
+BOOST_XINT_FIXED_ANY_COMPARE(bool, operator>=)
+BOOST_XINT_FIXED_ANY_COMPARE(bool, operator==)
+BOOST_XINT_FIXED_ANY_COMPARE(bool, operator!=)
+BOOST_XINT_FIXED_ANY_COMPARE(int, compare)
+
+//! Allows for operations between fixed_integer types and other integral values.
+#define BOOST_XINT_FIXED_ANY_MATH(op) \
+ template <size_t Bits, class Alloc, bool Threadsafe, bool Secure, typename \
+ N> \
+ fixed_integer<Bits, Alloc, Threadsafe, Secure> op(const fixed_integer<Bits,\
+ Alloc, Threadsafe, Secure> n1, const N n2) \
+ { \
+ fixed_integer<Bits, Alloc, Threadsafe, Secure> r(op(n1, \
+ fixed_integer<Bits, Alloc, Threadsafe, Secure>(n2))); \
+ return BOOST_XINT_MOVE(r); \
+ } \
+ \
+ template <typename N, size_t Bits, class Alloc, bool Threadsafe, bool \
+ Secure> \
+ fixed_integer<Bits, Alloc, Threadsafe, Secure> op(const N n1, const \
+ fixed_integer<Bits, Alloc, Threadsafe, Secure> n2) \
+ { \
+ fixed_integer<Bits, Alloc, Threadsafe, Secure> r(op(fixed_integer< \
+ Bits, Alloc, Threadsafe, Secure>(n1), n2)); \
+ return BOOST_XINT_MOVE(r); \
+ }
+
+BOOST_XINT_FIXED_ANY_MATH(pow)
+BOOST_XINT_FIXED_ANY_MATH(mulmod)
+BOOST_XINT_FIXED_ANY_MATH(sqrmod)
+BOOST_XINT_FIXED_ANY_MATH(powmod)
+BOOST_XINT_FIXED_ANY_MATH(invmod)
+BOOST_XINT_FIXED_ANY_MATH(operator+)
+BOOST_XINT_FIXED_ANY_MATH(operator-)
+BOOST_XINT_FIXED_ANY_MATH(operator*)
+BOOST_XINT_FIXED_ANY_MATH(operator/)
+BOOST_XINT_FIXED_ANY_MATH(operator%)
+BOOST_XINT_FIXED_ANY_MATH(operator&)
+BOOST_XINT_FIXED_ANY_MATH(operator|)
+BOOST_XINT_FIXED_ANY_MATH(operator^)
+BOOST_XINT_FIXED_ANY_MATH(gcd)
+BOOST_XINT_FIXED_ANY_MATH(lcm)
+
 //! \name Stream input/output functions
 //!@{
-template <typename charT, typename traits, size_t Bits>
-inline std::basic_ostream<charT,traits>& operator<<(std::basic_ostream<charT,
- traits>& out, const fixed_integer<Bits>& n)
+template <typename charT, typename traits, size_t Bits, class Alloc, bool
+ Threadsafe, bool Secure> inline std::basic_ostream<charT,traits>&
+ operator<<(std::basic_ostream<charT, traits>& out, const fixed_integer<Bits,
+ Alloc, Threadsafe, Secure> n)
 {
- return detail::operator<<(out, n);
+ return operator<<(out, n._data());
 }
 
-template <typename charT, typename traits, size_t Bits>
-inline std::basic_istream<charT,traits>& operator>>(std::basic_istream<charT,
- traits>& in, fixed_integer<Bits>& n)
+template <typename charT, typename traits, size_t Bits, class Alloc, bool
+ Threadsafe, bool Secure> inline std::basic_istream<charT,traits>&
+ operator>>(std::basic_istream<charT, traits>& in, fixed_integer<Bits, Alloc,
+ Threadsafe, Secure>& n)
 {
- return detail::operator>>(in, n);
+ return operator>>(in, n._data());
 }
 //!@}
 
-// No 100% compatible way to declare a specialization of a function template
-// using a templated class, as far as I can tell. This is the second-best
-// solution.
-template<size_t Bits>
-void swap(fixed_integer<Bits>& left, fixed_integer<Bits>& right) {
+template<size_t Bits, class Alloc, bool Threadsafe, bool Secure>
+inline void swap(fixed_integer<Bits, Alloc, Threadsafe, Secure>& left,
+ fixed_integer<Bits, Alloc, Threadsafe, Secure>& right)
+{
     left._swap(right);
 }
 
@@ -847,54 +1036,72 @@
 
 namespace std {
 
-template<size_t Bits>
-class numeric_limits<boost::xint::fixed_integer<Bits> > {
+template<size_t Bits, class Alloc, bool Threadsafe, bool Secure>
+class numeric_limits<boost::xint::fixed_integer<Bits, Alloc, Threadsafe,
+ Secure> >
+{
     public:
     static const bool is_specialized = true;
 
- static boost::xint::fixed_integer<Bits> min() throw() { return
- -~(boost::xint::fixed_integer<Bits>()); }
- static boost::xint::fixed_integer<Bits> max() throw() { return
- ~(boost::xint::fixed_integer<Bits>()); }
+ static boost::xint::fixed_integer<Bits, Alloc, Threadsafe, Secure> min()
+ throw() { return -~(boost::xint::fixed_integer<Bits, Alloc, Threadsafe,
+ Secure>()); }
+ static boost::xint::fixed_integer<Bits, Alloc, Threadsafe, Secure> max()
+ throw() { return ~(boost::xint::fixed_integer<Bits, Alloc, Threadsafe,
+ Secure>()); }
 
     static const int digits = Bits;
- static const int digits10; // = boost::xint::fixed_integer<Bits>::_c_log10;
+ static const int digits10;
     static const bool is_signed = true;
     static const bool is_integer = true;
     static const bool is_exact = true;
     static const int radix = 2;
- static boost::xint::fixed_integer<Bits> epsilon() throw() { return 0; }
- static boost::xint::fixed_integer<Bits> round_error() throw() { return 0; }
-
- static const int min_exponent = 0; // Not applicable
- static const int min_exponent10 = 0; // Not applicable
- static const int max_exponent = 0; // Not applicable
- static const int max_exponent10 = 0; // Not applicable
+ static boost::xint::fixed_integer<Bits, Alloc, Threadsafe, Secure> epsilon()
+ throw() { return 0; }
+ static boost::xint::fixed_integer<Bits, Alloc, Threadsafe, Secure>
+ round_error() throw() { return 0; }
+
+ static const int min_exponent = 0; // N/A
+ static const int min_exponent10 = 0; // N/A
+ static const int max_exponent = 0; // N/A
+ static const int max_exponent10 = 0; // N/A
 
     static const bool has_infinity = false;
     static const bool has_quiet_NaN = false;
     static const bool has_signaling_NaN = false;
- static const float_denorm_style has_denorm = denorm_absent; // Not applicable
- static const bool has_denorm_loss = false; // Not applicable
+ static const float_denorm_style has_denorm = denorm_absent; // N/A
+ static const bool has_denorm_loss = false; // N/A
 
- static boost::xint::fixed_integer<Bits> infinity() throw() { return 0; } // Not applicable
- static boost::xint::fixed_integer<Bits> quiet_NaN() throw() { return 0; } // Not applicable
- static boost::xint::fixed_integer<Bits> signaling_NaN() throw() { return 0; } // Not applicable
- static boost::xint::fixed_integer<Bits> denorm_min() throw() { return 0; } // Not applicable
+ static boost::xint::fixed_integer<Bits, Alloc, Threadsafe, Secure>
+ infinity() throw() { return 0; } // N/A
+ static boost::xint::fixed_integer<Bits, Alloc, Threadsafe, Secure>
+ quiet_NaN() throw() { return 0; } // N/A
+ static boost::xint::fixed_integer<Bits, Alloc, Threadsafe, Secure>
+ signaling_NaN() throw() { return 0; } // N/A
+ static boost::xint::fixed_integer<Bits, Alloc, Threadsafe, Secure>
+ denorm_min() throw() { return 0; } // N/A
 
     static const bool is_iec559 = false;
     static const bool is_bounded = true;
     static const bool is_modulo = true;
 
     static const bool traps = true; // I assume this means exceptions?
- static const bool tinyness_before = false; // Not applicable
- static const float_round_style round_style = round_indeterminate; // Not applicable
+ static const bool tinyness_before = false; // N/A
+ static const float_round_style round_style = round_indeterminate; // N/A
 };
 
-template<size_t Bits>
-const int numeric_limits<boost::xint::fixed_integer<Bits> >::digits10 =
- static_cast<int>(boost::xint::detail::log10_bits(Bits));
+#ifndef BOOST_XINT_DOXYGEN_IGNORE
+template<size_t Bits, class Alloc, bool Threadsafe, bool Secure>
+const int numeric_limits<boost::xint::fixed_integer<Bits, Alloc, Threadsafe,
+ Secure> >::digits10
+ = static_cast<int>(boost::xint::detail::log10_bits(Bits));
+#endif
 
 } // namespace std
 
+#ifdef _WIN32
+ // Return the warning setting to its original value.
+ #pragma warning(pop)
+#endif
+
 #endif // BOOST_INCLUDED_XINT_FIXED_INTEGER_HPP

Modified: sandbox/xint/boost/xint/integer.hpp
==============================================================================
--- sandbox/xint/boost/xint/integer.hpp (original)
+++ sandbox/xint/boost/xint/integer.hpp 2010-05-31 20:43:54 EDT (Mon, 31 May 2010)
@@ -12,41 +12,73 @@
 */
 
 /*! \file
- \brief Declares the core integer type.
+ \brief Declares the arbitrary-length integer type.
 */
 
 #ifndef BOOST_INCLUDED_XINT_INTEGER_HPP
 #define BOOST_INCLUDED_XINT_INTEGER_HPP
 
-#include "internals.hpp"
+#include "detail/internals.hpp"
+#include "random.hpp"
+
+#ifdef _WIN32
+ // The file's constructors make heavy use of the 'this' pointer, in a safe
+ // manner. MSVC isn't smart enough to know that it's safe.
+ #pragma warning(push)
+ #pragma warning(disable: 4355)
+#endif
 
 namespace boost {
 namespace xint {
 
-/*! \brief The core %integer class.
+/*! \brief The integer_t class template.
+
+ This class implements the standard aribitrary-length %integer type.
 
- This class implements the standard \c integer type.
+ There are only a few member functions, primarily operators. Most of the
+ functionality is implemented using standalone functions.
 
- There are only a few member functions; most of the functionality is
- implemented using standalone functions.
+ \tparam Alloc The allocator to use. It must be for the \c
+ boost::xint::detail::digit_t type.
+
+ \tparam Threadsafe If \c true, the library ensures that each object has its
+ own unique storage before returning it. If \c false, identical objects are
+ allowed to share storage using a copy-on-write design, potentially
+ increasing the speed of the library, but making it unsafe for programs where
+ an %integer object might be accessed by more than one thread. The library
+ allows copy-on-write for internal functions regardless of this parameter,
+ which is safe because the internal functions are single-threaded.
+
+ \tparam Secure If \c true, the library zeros out all memory before
+ deallocating it, for maximum security.
 */
-class integer: public detail::base_variable_length_integer {
+template <class Alloc = std::allocator<detail::digit_t>, bool Threadsafe = true,
+ bool Secure = false>
+class integer_t: private detail::digitmanager_t<Alloc, Threadsafe, Secure>,
+ public any_integer
+{
     public:
+ typedef integer_t<Alloc, Threadsafe, Secure> type;
 
     //! \name Constructors & Destructors
     //!@{
- integer();
- integer(const integer& b);
- integer(BOOST_XINT_RV_REF(integer) b) { _swap(b); }
- explicit integer(const nothrow_integer& b);
- explicit integer(const fixed_integer_any& b);
- explicit integer(const std::string& str, size_t base=10);
- template <typename T> integer(const T& n,
- typename boost::enable_if<boost::is_integral<T> >::type* = 0,
- typename boost::enable_if<boost::is_signed<T> >::type* = 0);
- template <typename T> integer(const T& n,
- typename boost::enable_if<boost::is_integral<T> >::type* = 0,
- typename boost::enable_if<boost::is_unsigned<T> >::type* = 0);
+ integer_t();
+ integer_t(const integer_t<Alloc, Threadsafe, Secure>& b);
+ integer_t(BOOST_XINT_RV_REF(type) b): any_integer(*this, 1) { _swap(b); }
+ explicit integer_t(const char *str, size_t base = 10);
+ explicit integer_t(const char *str, char **endptr, size_t base = 10);
+ explicit integer_t(const std::string& str, size_t base = 10);
+ explicit integer_t(const xint::binary_t b, size_t bits = 0);
+ explicit integer_t(const any_integer& other);
+ template <typename Type> integer_t(const Type n,
+ typename boost::enable_if<boost::is_integral<Type> >::type* = 0);
+
+ #ifndef BOOST_XINT_DOXYGEN_IGNORE
+ //! This one is used internally.
+ integer_t(const detail::data_t c): detail::digitmanager_t<Alloc, Threadsafe,
+ Secure>(*c.holder()), any_integer(*this, c.length, c.negative) {
+ data.beginendmod(); }
+ #endif
     //!@}
 
     /*! \name Mathematical and Bitwise Operators
@@ -57,242 +89,1387 @@
         a fixed maximum size, there is no logical way to implement it.
     */
     //@{
- integer& operator=(BOOST_XINT_COPY_ASSIGN_REF(integer) c);
- integer& operator=(BOOST_XINT_RV_REF(integer) c) { _swap(c); return *this; }
- template <typename T> integer& operator=(const T& n) { integer nn(n);
- _swap(nn); return *this; }
-
- bool operator!() const { return _is_zero(); }
- integer operator-() const;
- integer& operator+() { return *this; }
- const integer& operator+() const { return *this; }
-
- integer& operator+=(const integer& b);
- integer& operator-=(const integer& b);
- integer& operator*=(const integer& b);
- integer& operator/=(const integer& b);
- integer& operator%=(const integer& b);
-
- integer& operator++(); //!< \details Preincrement operator
- integer& operator--(); //!< \details Predecrement operator
- integer operator++(int); //!< \details Postincrement operator -- not recommended, inefficient
- integer operator--(int); //!< \details Postdecrement operator -- not recommended, inefficient
-
- integer& operator&=(const integer& n);
- integer& operator|=(const integer& n);
- integer& operator^=(const integer& n);
- integer operator<<(size_t shift) const;
- integer operator>>(size_t shift) const;
- integer& operator<<=(size_t shift);
- integer& operator>>=(size_t shift);
- //@}
-
- /*! \name Preconstructed integers
-
- These return preconstructed integers with the values named by the
- functions. They are used internally, so that the most common values
- don't have to be constructed each time they're needed.
- */
- //@{
- static const integer& zero();
- static const integer& one();
+ integer_t<Alloc, Threadsafe, Secure>& operator=(BOOST_XINT_COPY_ASSIGN_REF(
+ type) c);
+ integer_t<Alloc, Threadsafe, Secure>& operator=(BOOST_XINT_RV_REF(type) c) {
+ _swap(c); return *this; }
+ template <typename Type> integer_t<Alloc, Threadsafe, Secure>& operator=(
+ const Type n) { integer_t<Alloc, Threadsafe, Secure> nn(n); _swap(nn);
+ return *this; }
+
+ bool operator!() const { return data.is_zero(); }
+ integer_t<Alloc, Threadsafe, Secure> operator-() const;
+ integer_t<Alloc, Threadsafe, Secure>& operator+() { return *this; }
+ const integer_t<Alloc, Threadsafe, Secure>& operator+() const { return
+ *this; }
+
+ integer_t<Alloc, Threadsafe, Secure>& operator+=(const integer_t<Alloc,
+ Threadsafe, Secure> b);
+ integer_t<Alloc, Threadsafe, Secure>& operator-=(const integer_t<Alloc,
+ Threadsafe, Secure> b);
+ integer_t<Alloc, Threadsafe, Secure>& operator*=(const integer_t<Alloc,
+ Threadsafe, Secure> b);
+ integer_t<Alloc, Threadsafe, Secure>& operator/=(const integer_t<Alloc,
+ Threadsafe, Secure> b);
+ integer_t<Alloc, Threadsafe, Secure>& operator%=(const integer_t<Alloc,
+ Threadsafe, Secure> b);
+
+ integer_t<Alloc, Threadsafe, Secure>& operator++();
+ integer_t<Alloc, Threadsafe, Secure>& operator--();
+ integer_t<Alloc, Threadsafe, Secure> operator++(int);
+ integer_t<Alloc, Threadsafe, Secure> operator--(int);
+
+ integer_t<Alloc, Threadsafe, Secure>& operator&=(const integer_t<Alloc,
+ Threadsafe, Secure> n);
+ integer_t<Alloc, Threadsafe, Secure>& operator|=(const integer_t<Alloc,
+ Threadsafe, Secure> n);
+ integer_t<Alloc, Threadsafe, Secure>& operator^=(const integer_t<Alloc,
+ Threadsafe, Secure> n);
+ integer_t<Alloc, Threadsafe, Secure> operator<<(size_t shift) const;
+ integer_t<Alloc, Threadsafe, Secure> operator>>(size_t shift) const;
+ integer_t<Alloc, Threadsafe, Secure>& operator<<=(size_t shift);
+ integer_t<Alloc, Threadsafe, Secure>& operator>>=(size_t shift);
     //@}
 
     //! \name Miscellaneous Functions
     //!@{
- bool odd() const;
- bool even() const;
- int sign(bool signed_zero=false) const;
-
+ bool is_odd() const;
+ bool is_even() const;
+ int sign(bool signed_zero = false) const;
     size_t hex_digits() const;
     //!@}
 
- typedef base_divide_t<integer> divide_t;
+ typedef base_divide_t<integer_t<Alloc, Threadsafe, Secure> > divide_t;
 
- private:
- BOOST_XINT_COPYABLE_AND_MOVABLE(integer)
+ /*! \name Static Member Functions
+
+ These are functions that return an integer_t, but don't take one as a
+ parameter. To use them as free functions, you would have to specify the
+ return type anyway, so I made them static member functions of the type
+ instead.
+ */
+ //!@{
+ static integer_t<Alloc, Threadsafe, Secure> pow2(size_t exponent);
+ static integer_t<Alloc, Threadsafe, Secure> factorial(size_t n);
+ template <class Type> static integer_t<Alloc, Threadsafe, Secure>
+ random_by_size(Type& gen, size_t size_in_bits, bool high_bit_on = false,
+ bool low_bit_on = false, bool can_be_negative = false);
+ template <class Type> static integer_t<Alloc, Threadsafe, Secure>
+ random_prime(Type& gen, size_t size_in_bits, callback_t callback =
+ no_callback);
+ //!@}
+
+ void _swap(integer_t<Alloc, Threadsafe, Secure>& s) { using std::swap;
+ swap(data, s.data); }
 
- static std::auto_ptr<integer> cZero, cOne;
+ private:
+ BOOST_XINT_COPYABLE_AND_MOVABLE(type)
 };
 
-//! \name Mathematical primitives
+////////////////////////////////////////////////////////////////////////////////
+// Member function template definitions
+
+//! \brief Creates a new integer with an initial value of zero.
+template<class Alloc, bool Threadsafe, bool Secure>
+integer_t<Alloc, Threadsafe, Secure>::integer_t(): any_integer(*this, 1) {
+ // Don't need to do anything, already preinitialized to zero.
+}
+
+/*! \brief Creates a copy of an existing integer.
+
+\param[in] b An existing integer.
+
+\overload
+*/
+template<class Alloc, bool Threadsafe, bool Secure>
+integer_t<Alloc, Threadsafe, Secure>::integer_t(const integer_t<Alloc,
+ Threadsafe, Secure>& b): detail::digitmanager_t<Alloc, Threadsafe, Secure>(
+ *b.data.holder()), any_integer(*this, b.data.length, b.data.negative)
+{
+ data.beginendmod();
+}
+
+//! \copydoc integer_t(const std::string&, size_t)
+template<class Alloc, bool Threadsafe, bool Secure>
+integer_t<Alloc, Threadsafe, Secure>::integer_t(const char *str, size_t base):
+ any_integer(*this, 1)
+{
+ data.from_string(str, strlen(str), base);
+}
+
+/*! \brief Parse an integer from a string representation.
+
+- Complexity: O(n<sup>2</sup>)
+
+\param[in] str A string representation of a number.
+\param[out] endptr When the function returns, this will contain a pointer to the
+first character after the parsed integer.
+\param[in] base The base that the string representation of the number is in.
+This can be any number between 2 and 36 (inclusive). It can also be the constant
+xint::autobase, in which case the function will follow the standard C/C++ rules
+for interpreting a numeric constant: any number with a zero as the first digit
+is assumed to be base-8; any number with a leading zero-x or zero-X (such as
+0x1f) is base-16, and anything else is base-10.
+
+\exception exceptions::invalid_base if the base parameter is not between 2 and
+36 (inclusive) or the constant xint::autobase.
+\exception exceptions::invalid_digit if there are no valid digits before the
+first invalid character.
+
+\remarks
+This function is based on the \c strtol function from the standard library. Like
+\c strtol, it first discards any leading whitespace characters, then takes as
+many characters as are valid for the given \c base and interprets them as an
+integer. Then a pointer to the first character following the integer is stored
+in the object pointed by \c endptr.
+
+\overload
+*/
+template<class Alloc, bool Threadsafe, bool Secure>
+integer_t<Alloc, Threadsafe, Secure>::integer_t(const char *str, char **endptr,
+ size_t base): any_integer(*this, 1)
+{
+ data.from_string(str, endptr, base);
+}
+
+/*! \brief Create an integer from a string representation.
+
+- Complexity: O(n<sup>2</sup>)
+
+\param[in] str A string representation of a number.
+\param[in] base The base that the string representation of the number is in.
+This can be any number between 2 and 36 (inclusive). It can also be the constant
+xint::autobase, in which case the function will follow the standard C/C++ rules
+for interpreting a numeric constant: any number with a zero as the first digit
+is assumed to be base-8; any number with a leading zero-x or zero-X (such as
+0x1f) is base-16, and anything else is base-10.
+
+\exception exceptions::invalid_base if the base parameter is not between 2 and
+36 (inclusive) or the constant xint::autobase.
+\exception exceptions::invalid_digit if the string contains any digit that
+cannot be part of a number in the specified base, or if there are no valid
+digits.
+
+\remarks
+This is the most common way to initialize literal values that are too large to
+fit into a native integral type.
+
+\overload
+*/
+template<class Alloc, bool Threadsafe, bool Secure>
+integer_t<Alloc, Threadsafe, Secure>::integer_t(const std::string& str, size_t
+ base): any_integer(*this, 1)
+{
+ data.from_string(str.c_str(), str.length(), base);
+}
+
+/*! \brief Converts a portable binary representation of a number into an
+ %integer.
+
+- Complexity: O(n)
+
+\param[in] b An \c xint::binary_t containing the bytes to convert, lowest byte
+first.
+\param[in] bits The number of bits packed into each character (for portability
+with systems that might not have characters with the same number of bits), or
+zero (the default) to assume the number of bits in the current system's
+unsigned character type.
+
+\exception exceptions::invalid_argument if \c bits is greater than the number of
+bits in an unsigned character.
+
+\returns An %integer representing the bytes.
+
+\see xint::to_binary
+
+\overload
+*/
+template<class Alloc, bool Threadsafe, bool Secure>
+integer_t<Alloc, Threadsafe, Secure>::integer_t(const xint::binary_t b, size_t
+ bits): any_integer(*this, 1)
+{
+ data.from_binary(b, bits);
+}
+
+/*! Constructs a new integer object from an existing integer object.
+
+ Converts any existing integer_t, fixed_integer, or nothrow_integer object to
+ this type.
+*/
+template<class Alloc, bool Threadsafe, bool Secure>
+integer_t<Alloc, Threadsafe, Secure>::integer_t(const any_integer& c):
+ detail::digitmanager_t<Alloc, Threadsafe, Secure>(*c._data().holder()),
+ any_integer(*this, c._data().length, c._data().negative)
+{
+ data.beginendmod();
+}
+
+/*!
+ Constructs a new integer object with the value of the built-in %integer type
+ passed to it.
+
+ \param[in] n The value for the new object.
+ \tparam Type The type of \c n.
+
+ You can ignore the \c enable_if parameter, it's there only to tell the
+ compiler what types the function applies to.
+
+ \overload
+*/
+template<class Alloc, bool Threadsafe, bool Secure>
+template <typename Type> integer_t<Alloc, Threadsafe, Secure>::integer_t(const
+ Type n, typename boost::enable_if<boost::is_integral<Type> >::type*):
+ any_integer(*this, 1)
+{
+ if (std::numeric_limits<Type>::is_signed) data.set_signed(n);
+ else data.set_unsigned(n);
+}
+
+template<class Alloc, bool Threadsafe, bool Secure>
+integer_t<Alloc, Threadsafe, Secure>& integer_t<Alloc, Threadsafe,
+ Secure>::operator=(BOOST_XINT_COPY_ASSIGN_REF(type) c)
+{
+ data = c.data;
+ data.beginendmod();
+ return *this;
+}
+
+/*! \brief Return the additive inverse of an integer.
+
+- Complexity: O(1)
+
+\returns \c *this with the sign reversed.
+*/
+template<class Alloc, bool Threadsafe, bool Secure>
+integer_t<Alloc, Threadsafe, Secure> integer_t<Alloc, Threadsafe,
+ Secure>::operator-() const
+{
+ integer_t<Alloc, Threadsafe, Secure> r(-data);
+ return BOOST_XINT_MOVE(r);
+}
+
+//! \see operator+(integer_t, integer_t)
+template<class Alloc, bool Threadsafe, bool Secure>
+integer_t<Alloc, Threadsafe, Secure>& integer_t<Alloc, Threadsafe,
+ Secure>::operator+=(const integer_t<Alloc, Threadsafe, Secure> b)
+{
+ data += b.data;
+ return *this;
+}
+
+//! \see operator-(integer_t, integer_t)
+template<class Alloc, bool Threadsafe, bool Secure>
+integer_t<Alloc, Threadsafe, Secure>& integer_t<Alloc, Threadsafe,
+ Secure>::operator-=(const integer_t<Alloc, Threadsafe, Secure> b)
+{
+ data -= b.data;
+ return *this;
+}
+
+//! \see operator*(integer_t, integer_t)
+template<class Alloc, bool Threadsafe, bool Secure>
+integer_t<Alloc, Threadsafe, Secure>& integer_t<Alloc, Threadsafe,
+ Secure>::operator*=(const integer_t<Alloc, Threadsafe, Secure> b)
+{
+ data *= b.data;
+ return *this;
+}
+
+//! \see operator/(integer_t, integer_t)
+template<class Alloc, bool Threadsafe, bool Secure>
+integer_t<Alloc, Threadsafe, Secure>& integer_t<Alloc, Threadsafe,
+ Secure>::operator/=(const integer_t<Alloc, Threadsafe, Secure> b)
+{
+ data /= b.data;
+ return *this;
+}
+
+//! \see operator%(integer_t, integer_t)
+template<class Alloc, bool Threadsafe, bool Secure>
+integer_t<Alloc, Threadsafe, Secure>& integer_t<Alloc, Threadsafe,
+ Secure>::operator%=(const integer_t<Alloc, Threadsafe, Secure> b)
+{
+ data %= b.data;
+ return *this;
+}
+
+/*! Preincrement operator
+
+- Complexity: amortized O(1)
+*/
+template<class Alloc, bool Threadsafe, bool Secure>
+integer_t<Alloc, Threadsafe, Secure>& integer_t<Alloc, Threadsafe,
+ Secure>::operator++()
+{
+ ++data;
+ return *this;
+}
+
+/*! Predecrement operator
+
+- Complexity: amortized O(1)
+*/
+template<class Alloc, bool Threadsafe, bool Secure>
+integer_t<Alloc, Threadsafe, Secure>& integer_t<Alloc, Threadsafe,
+ Secure>::operator--()
+{
+ --data;
+ return *this;
+}
+
+/*! Postincrement operator
+
+- Complexity: O(n)
+
+This is not recommended. It must make a copy before incrementing the \c *this
+object, making it noticeably less efficient than the preincrement operator.
+*/
+template<class Alloc, bool Threadsafe, bool Secure>
+integer_t<Alloc, Threadsafe, Secure> integer_t<Alloc, Threadsafe,
+ Secure>::operator++(int)
+{
+ integer_t<Alloc, Threadsafe, Secure> r(data++);
+ return BOOST_XINT_MOVE(r);
+}
+
+/*! Postdecrement operator
+
+- Complexity: O(n)
+
+This is not recommended. It must make a copy before decrementing the \c *this
+object, making it noticeably less efficient than the predecrement operator.
+*/
+template<class Alloc, bool Threadsafe, bool Secure>
+integer_t<Alloc, Threadsafe, Secure> integer_t<Alloc, Threadsafe,
+ Secure>::operator--(int)
+{
+ integer_t<Alloc, Threadsafe, Secure> r(data--);
+ return BOOST_XINT_MOVE(r);
+}
+
+//! \see operator&(integer_t, integer_t)
+template<class Alloc, bool Threadsafe, bool Secure>
+integer_t<Alloc, Threadsafe, Secure>& integer_t<Alloc, Threadsafe,
+ Secure>::operator&=(const integer_t<Alloc, Threadsafe, Secure> n)
+{
+ data &= n.data;
+ return *this;
+}
+
+//! \see operator|(integer_t, integer_t)
+template<class Alloc, bool Threadsafe, bool Secure>
+integer_t<Alloc, Threadsafe, Secure>& integer_t<Alloc, Threadsafe,
+ Secure>::operator|=(const integer_t<Alloc, Threadsafe, Secure> n)
+{
+ data |= n.data;
+ return *this;
+}
+
+//! \see operator^(integer_t, integer_t)
+template<class Alloc, bool Threadsafe, bool Secure>
+integer_t<Alloc, Threadsafe, Secure>& integer_t<Alloc, Threadsafe,
+ Secure>::operator^=(const integer_t<Alloc, Threadsafe, Secure> n)
+{
+ data ^= n.data;
+ return *this;
+}
+
+/*! \brief Left-shift an integer by a specified number of bits.
+
+- Complexity: O(n)
+
+\param[in] shift The number of bits to left-shift the number.
+
+\returns The bit-shifted integer.
+*/
+template<class Alloc, bool Threadsafe, bool Secure>
+integer_t<Alloc, Threadsafe, Secure> integer_t<Alloc, Threadsafe,
+ Secure>::operator<<(size_t shift) const
+{
+ integer_t<Alloc, Threadsafe, Secure> r(data << shift);
+ return BOOST_XINT_MOVE(r);
+}
+
+/*! \brief Right-shift an integer by a specified number of bits.
+
+- Complexity: O(n)
+
+\param[in] shift The number of bits to right-shift the number.
+
+\returns The bit-shifted integer.
+*/
+template<class Alloc, bool Threadsafe, bool Secure>
+integer_t<Alloc, Threadsafe, Secure> integer_t<Alloc, Threadsafe,
+ Secure>::operator>>(size_t shift) const
+{
+ integer_t<Alloc, Threadsafe, Secure> r(data >> shift);
+ return BOOST_XINT_MOVE(r);
+}
+
+//! \see operator<<(integer_t, integer_t)
+template<class Alloc, bool Threadsafe, bool Secure>
+integer_t<Alloc, Threadsafe, Secure>& integer_t<Alloc, Threadsafe,
+ Secure>::operator<<=(size_t shift)
+{
+ data <<= shift;
+ return *this;
+}
+
+//! \see operator>>(integer_t, integer_t)
+template<class Alloc, bool Threadsafe, bool Secure>
+integer_t<Alloc, Threadsafe, Secure>& integer_t<Alloc, Threadsafe,
+ Secure>::operator>>=(size_t shift)
+{
+ data >>= shift;
+ return *this;
+}
+
+/*! \brief Tests the lowest bit of \c *this to determine oddness.
+
+- Complexity: O(1)
+
+\returns \c true if \c *this is odd, otherwise \c false.
+*/
+template<class Alloc, bool Threadsafe, bool Secure>
+bool integer_t<Alloc, Threadsafe, Secure>::is_odd() const {
+ return data.is_odd();
+}
+
+/*! \brief Tests the lowest bit of \c *this to determine evenness.
+
+- Complexity: O(1)
+
+\returns \c true if \c *this is even, otherwise \c false.
+*/
+template<class Alloc, bool Threadsafe, bool Secure>
+bool integer_t<Alloc, Threadsafe, Secure>::is_even() const {
+ return data.is_even();
+}
+
+/*! \brief Tests the sign of \c *this.
+
+- Complexity: O(1)
+
+\param[in] signed_zero If \c false (the default value), returns zero if \c *this
+is zero. If \c true, returns 1 or -1 on a zero \c *this as well. Primarily used
+to identify a \ref zero "negative zero".
+
+\returns -1 if \c *this is negative, 0 if it's zero, or 1 if it's greater than
+zero.
+*/
+template<class Alloc, bool Threadsafe, bool Secure>
+int integer_t<Alloc, Threadsafe, Secure>::sign(bool signed_zero) const {
+ return data.sign(signed_zero);
+}
+
+/*! \brief Tells you roughly how large \c *this is.
+
+- Complexity: O(1)
+
+\returns The number of hexadecimal digits that would be required to encode \c
+*this.
+*/
+template<class Alloc, bool Threadsafe, bool Secure>
+size_t integer_t<Alloc, Threadsafe, Secure>::hex_digits() const {
+ return data.hex_digits();
+}
+
+/*! \brief Calculate the value of 2<sup>e</sup>
+
+- Complexity: O(1)
+
+\param[in] exponent The exponent to operate on.
+
+\returns 2 to the power of \c exponent.
+
+\remarks
+This is a convenience function, to help with self-documenting code. It is also
+more efficient than using bit-shifting or the \c pow function to get the same
+result.
+*/
+template<class Alloc, bool Threadsafe, bool Secure>
+integer_t<Alloc, Threadsafe, Secure> integer_t<Alloc, Threadsafe,
+ Secure>::pow2(size_t exponent)
+{
+ integer_t<Alloc, Threadsafe, Secure> r;
+ detail::pow2(r.data, exponent);
+ return BOOST_XINT_MOVE(r);
+}
+
+/*! \brief Calculate the value of \c n!
+
+- Complexity: O(n<sup>3</sup>)
+
+\param[in] n The value to operate on.
+
+\returns \c n factorial, defined as <code>1*2*3*...*n</code>
+
+\warning
+Factorials get ridiculously huge, even with fairly small values of \c n. This
+function, when used with a large parameter, is the easiest way to exhaust the
+system's memory.
+*/
+template<class Alloc, bool Threadsafe, bool Secure>
+integer_t<Alloc, Threadsafe, Secure> integer_t<Alloc, Threadsafe,
+ Secure>::factorial(size_t n)
+{
+ integer_t<Alloc, Threadsafe, Secure> r;
+ detail::factorial(r.data, n);
+ return BOOST_XINT_MOVE(r);
+}
+
+/*! \brief Generates a random integer with specific attributes.
+
+- Complexity: O(n)
+
+\param[in] gen The random number generator to use. This can be
+boost::xint::default_random_generator, boost::xint::strong_random_generator, or
+any other class that supplies the member functions required by the Boost.Random
+random number generators.
+\param[in] size_in_bits The maximum number of bits that you want the returned
+number to have.
+\param[in] high_bit_on If \c true, the returned number will have exactly the
+requested size. If \c false, the upper bits may be zero, resulting in a number
+that is slightly smaller than requested.
+\param[in] low_bit_on If \c true, the returned number will always be odd. If
+\c false, it has an equal chance of being odd or even.
+\param[in] can_be_negative If \c true, the returned value has an equal chance
+of being positive or negative. If \c false, it will always be positive.
+
+\returns A random integer with the requested attributes.
+
+\see \ref random
+*/
+template<class Alloc, bool Threadsafe, bool Secure>
+template <class Type>
+integer_t<Alloc, Threadsafe, Secure> integer_t<Alloc, Threadsafe,
+ Secure>::random_by_size(Type& gen, size_t size_in_bits, bool high_bit_on,
+ bool low_bit_on, bool can_be_negative)
+{
+ detail::random_generator<Type> rgen(gen);
+
+ integer_t<Alloc, Threadsafe, Secure> r;
+ detail::random_by_size(r._data(), rgen, size_in_bits, high_bit_on,
+ low_bit_on, can_be_negative);
+ return BOOST_XINT_MOVE(r);
+}
+
+/*! \brief Generate a randomly-generated prime number of a particular bit-size.
+
+- Complexity: Varies
+
+\param[in] gen The random number generator to use. This can be
+boost::xint::default_random_generator, boost::xint::strong_random_generator, or
+any other class that supplies the member functions required by the Boost.Random
+random number generators.
+\param[in] size_in_bits The number of bits that you want the returned value to
+have.
+\param[in] callback An optional function that will be called regularly during
+the operation. If it returns \c false, the function will immediately return.
+
+\returns A randomly-generated prime integer with the specified number of bits,
+or zero if the provided callback function cancelled the operation.
+
+\exception exceptions::invalid_argument if \c size_in_bits is less than two.
+
+\note This function uses xint::is_prime. See the description of it for details
+of its limitations.
+
+\par
+See the \link random Random Number Functions page\endlink for details on how to
+get cryptographically-secure random numbers.
+
+\see \ref primes
+*/
+template<class Alloc, bool Threadsafe, bool Secure>
+template <class Type>
+integer_t<Alloc, Threadsafe, Secure> integer_t<Alloc, Threadsafe,
+ Secure>::random_prime(Type& gen, size_t size_in_bits, callback_t callback)
+{
+ detail::random_generator<Type> rgen(gen);
+
+ integer_t<Alloc, Threadsafe, Secure> r;
+ detail::random_prime(r._data(), rgen, size_in_bits, callback);
+ return BOOST_XINT_MOVE(r);
+}
+
+////////////////////////////////////////////////////////////////////////////////
+// Free function template definitions
+/*! \name Mathematical primitives
+
+ There are only a couple of functions here because almost all mathematical
+ primitives are implemented as operators.
+*/
 //!@{
-integer abs(const integer& n);
-integer negate(const integer& n);
-integer add(const integer& n, const integer& addend);
-integer subtract(const integer& n, const integer& subtrahend);
-integer multiply(const integer& n, const integer& multiplicand);
-integer divide(const integer& dividend, const integer& divisor);
-integer::divide_t divide_r(const integer& dividend, const integer& divisor);
+
+/*! \brief Returns the absolute value of an integer.
+
+- Complexity: O(1)
+
+\param[in] n The integer to operate on.
+
+\returns If \c n is zero or positive, returns \c n. Otherwise returns \c -n.
+*/
+template<class Alloc, bool Threadsafe, bool Secure>
+integer_t<Alloc, Threadsafe, Secure> abs(const integer_t<Alloc, Threadsafe,
+ Secure> n)
+{
+ integer_t<Alloc, Threadsafe, Secure> r(abs(n._data()));
+ return BOOST_XINT_MOVE(r);
+}
+
+/*! \brief Calculate how many \c dividends would fit into \c divisor, with the
+ remainder.
+
+- Complexity: O(n<sup>2</sup>)
+
+\param[in] dividend, divisor The integers to operate on.
+
+\returns A \c divide_t class containing the quotient and remainder of \c
+dividend divided by \c divisor.
+
+\exception exceptions::divide_by_zero if \c d2 is zero.
+
+\see operator/(integer_t, integer_t)
+\see operator%(integer_t, integer_t)
+\see integer_t::operator/=
+\see integer_t::operator%=
+*/
+template<class Alloc, bool Threadsafe, bool Secure>
+typename integer_t<Alloc, Threadsafe, Secure>::divide_t divide(const
+ integer_t<Alloc, Threadsafe, Secure> dividend, const integer_t<Alloc,
+ Threadsafe, Secure> divisor)
+{
+ typename integer_t<Alloc, Threadsafe, Secure>::divide_t r;
+ divide(r.quotient._data(), r.remainder._data(), dividend._data(),
+ divisor._data());
+ return BOOST_XINT_MOVE(r);
+}
 //!@}
 
-//! \name Powers and roots
+/*! \name Powers and roots
+
+ \see integer_t::pow2
+ \see integer_t::factorial
+*/
 //!@{
-integer sqr(const integer& n);
-integer pow(const integer& n, const integer& exponent);
-integer pow2(size_t exponent);
-integer factorial(size_t n);
-integer sqrt(const integer& n);
+
+/*! \brief Calculate the value of n<sup>2</sup>
+
+- Complexity: O(n(n+1)/2)
+
+\param[in] n The integer to operate on.
+
+\returns \c n times \c n.
+
+This function uses a more-efficient algorithm than standard multiplication.
+*/
+template<class Alloc, bool Threadsafe, bool Secure>
+integer_t<Alloc, Threadsafe, Secure> square(const integer_t<Alloc, Threadsafe,
+ Secure> n)
+{
+ integer_t<Alloc, Threadsafe, Secure> r;
+ square(r._data(), n._data());
+ return BOOST_XINT_MOVE(r);
+}
+
+/*! \brief Calculate the value of n<sup>e</sup>
+
+- Complexity: O(n<sub>n</sub><sup>2</sup>n<sub>e</sub>)
+
+\param[in] n, e The integers to operate on.
+
+\returns \c n to the power of \c e.
+*/
+template<class Alloc, bool Threadsafe, bool Secure>
+integer_t<Alloc, Threadsafe, Secure> pow(const integer_t<Alloc, Threadsafe,
+ Secure> n, const integer_t<Alloc, Threadsafe, Secure> e)
+{
+ integer_t<Alloc, Threadsafe, Secure> r;
+ pow(r._data(), n._data(), e._data());
+ return BOOST_XINT_MOVE(r);
+}
+
+/*! \brief Calculate the square root of \c an integer.
+
+- Complexity: O(n<sup>2</sup>)
+
+\param[in] n The value to operate on.
+
+\returns The largest integer that, when squared, is less than or equal to \c n.
+If \c n is not a perfect square, then this value will not be the exact square
+root.
+
+\exception exceptions::cannot_represent if \c n is negative.
+*/
+template<class Alloc, bool Threadsafe, bool Secure>
+integer_t<Alloc, Threadsafe, Secure> sqrt(const integer_t<Alloc, Threadsafe,
+ Secure> n)
+{
+ integer_t<Alloc, Threadsafe, Secure> r;
+ sqrt(r._data(), n._data());
+ return BOOST_XINT_MOVE(r);
+}
 //!@}
 
-//! \name Conversion functions
+/*! \name Conversion functions
+
+ Note that these only convert an %integer type to something else. See the
+ %integer constructors for conversions the other way.
+*/
 //!@{
-template <typename T> T to(const integer& n);
-std::string to_string(const integer& n, size_t base=10, bool upperCase=false);
-integer from_string(const std::string& str, size_t base=10);
-xint::binary_t to_binary(const integer& n, size_t bits=0);
-integer from_binary(const xint::binary_t& b, size_t bits=0);
+
+/*! \brief Converts an xint::integer type to a built-in %integer type.
+
+\param[in] n The %integer to convert.
+\tparam T The type to convert it to.
+
+\returns The numeric value of \c n, converted to the specified type.
+
+\exception exceptions::too_big if \c n would not fit into the specified type.
+
+This function provides the most efficient means of converting to a built-in
+integral type.
+*/
+template <typename Type, class Alloc, bool Threadsafe, bool Secure>
+Type to(const integer_t<Alloc, Threadsafe, Secure> n) {
+ return to<Type>(n._data());
+}
+
+/*! \brief Creates a string representation of the specified %integer.
+
+- Complexity: O(n<sup>2</sup>)
+
+\param[in] n The %integer to convert.
+\param[in] base The base, between 2 and 36 inclusive, to convert it to. Defaults
+to base 10.
+\param[in] uppercase Whether to make alphabetic characters (for bases greater
+than ten) uppercase or not. Defaults to \c false.
+
+\returns The string value of \c n.
+
+\exception exceptions::invalid_base if base is less than two or greater than 36.
+
+\remarks
+This is the function that's called when you ask the library to write an %integer
+to a stream, but it's more flexible because you can specify any base between 2
+and 36. (Streams only allow base-8, base-10, or base-16.)
+*/
+template<class Alloc, bool Threadsafe, bool Secure>
+std::string to_string(const integer_t<Alloc, Threadsafe, Secure> n, size_t base
+ = 10, bool uppercase = false)
+{
+ return to_string(n._data(), base, uppercase);
+}
+
+/*! \brief Creates a binary representation of an %integer.
+
+- Complexity: O(n)
+
+\param[in] n The %integer to convert.
+\param[in] bits The number of bits to pack into each character (for portability
+with systems that might not have characters with the same number of bits), or
+zero (the default) to assume the number of bits in the current system's
+unsigned character type.
+
+\returns An \c xint::binary_t containing the binary representation, lowest byte
+first.
+
+\exception exceptions::invalid_argument if \c bits is greater than the number of
+bits in an unsigned character.
+
+\note
+This function only stores the absolute value of \c n; if you need the sign, you
+must store it separately.
+
+\remarks
+A binary representation is sometimes desirable for persistent storage or
+transmission, as it is more space-efficient than a string representation.
+
+\see integer_t::integer_t(xint::binary_t, size_t bits)
+*/
+template<class Alloc, bool Threadsafe, bool Secure>
+xint::binary_t to_binary(const integer_t<Alloc, Threadsafe, Secure> n, size_t
+ bits = 0)
+{
+ return to_binary(n._data(), bits);
+}
 //!@}
 
 //! \name Bit-manipulation functions
 //!@{
-bool getbit(const integer& n, size_t bit);
-void setbit(integer& n, size_t bit);
-void clearbit(integer& n, size_t bit);
-size_t lowestbit(const integer& n, size_t valueIfZero=0);
-size_t highestbit(const integer& n, size_t valueIfZero=0);
-integer bitwise_and(const integer& n1, const integer& n2);
-integer bitwise_or (const integer& n1, const integer& n2);
-integer bitwise_xor(const integer& n1, const integer& n2);
-integer shift(const integer& n, int byBits);
-integer shift_left(const integer& n, size_t byBits);
-integer shift_right(const integer& n, size_t byBits);
+
+/*! \brief Queries the value of a particular bit in an integer.
+
+- Complexity: O(1)
+
+\param[in] n The integer to query.
+\param[in] bit The zero-based index of the bit you're asking about.
+
+\returns \c true if the specified bit is set (has a value of one), \c false if
+it is clear.
+*/
+template<class Alloc, bool Threadsafe, bool Secure>
+bool getbit(const integer_t<Alloc, Threadsafe, Secure> n, size_t bit) {
+ return getbit(n._data(), bit);
+}
+
+/*! \brief Sets a specific bit in an integer to one.
+
+- Complexity: O(1)
+
+\param[in,out] n The integer to operate on.
+\param[in] bit The zero-based index of the bit to change.
+
+\returns Nothing.
+*/
+template<class Alloc, bool Threadsafe, bool Secure>
+void setbit(integer_t<Alloc, Threadsafe, Secure>& n, size_t bit) {
+ setbit(n._data(), bit);
+}
+
+/*! \brief Sets a specific bit in an integer to zero.
+
+- Complexity: O(1)
+
+\param[in,out] n The integer to operate on.
+\param[in] bit The zero-based index of the bit to change.
+
+\returns Nothing.
+*/
+template<class Alloc, bool Threadsafe, bool Secure>
+void clearbit(integer_t<Alloc, Threadsafe, Secure>& n, size_t bit) {
+ clearbit(n._data(), bit);
+}
+
+/*! \brief Obtains the index of the lowest bit in an integer with a value of
+ one.
+
+- Complexity: O(1)
+
+\param[in] n The integer to query.
+\param[in] return_if_zero The value to return if \c n is zero (as there is no
+correct answer in that case).
+
+\returns The zero-based index of the lowest one-bit in the integer, or \c
+return_if_zero if the integer contains no set bits.
+*/
+template<class Alloc, bool Threadsafe, bool Secure>
+size_t lowestbit(const integer_t<Alloc, Threadsafe, Secure> n, size_t
+ return_if_zero = 0)
+{
+ return lowestbit(n._data(), return_if_zero);
+}
+
+/*! \brief Obtains the index of the highest bit in an integer with a value of
+ one.
+
+- Complexity: O(1)
+
+\param[in] n The integer to query.
+\param[in] return_if_zero The value to return if \c n is zero (as there is no
+correct answer in that case).
+
+\returns The zero-based index of the highest one-bit in the integer, or \c
+return_if_zero if the integer contains no set bits.
+*/
+template<class Alloc, bool Threadsafe, bool Secure>
+size_t highestbit(const integer_t<Alloc, Threadsafe, Secure> n, size_t
+ return_if_zero = 0)
+{
+ return highestbit(n._data(), return_if_zero);
+}
 //!@}
 
 /*! \name Modular math functions
 
-A common reason to use a large-integer library is to implement public-key
-encryption, and the algorithms for such encryption often use modular math.
+ A common reason to use a large-integer library is to implement public-key
+ encryption, and the algorithms for such encryption often use modular math.
+
+ \see operator%(integer_t, integer_t)
+ \see integer_t::operator%=
 */
 //!@{
-integer mod(const integer& n, const integer& modBy);
-integer mulmod(const integer& n, const integer& by, const integer& modulus);
-integer sqrmod(const integer& n, const integer& modulus);
-integer powmod(const integer& n, const integer& exponent, const integer&
- modulus, bool noMontgomery=false);
-integer invmod(const integer& n, const integer& modulus);
+
+/*! \brief Get the modular product of two integers.
+
+- Complexity: O(2n<sup>2</sup>)
+
+\param[in] n, by The integers to multiply.
+\param[in] modulus The modulus.
+
+\returns The result of \c n * \c by % \c modulus.
+
+\remarks
+This is purely a convenience function, to make it easier to write
+self-documenting code. It does not provide any additional efficiency over
+writing out the calculation.
+*/
+template<class Alloc, bool Threadsafe, bool Secure>
+integer_t<Alloc, Threadsafe, Secure> mulmod(const integer_t<Alloc, Threadsafe,
+ Secure> n, const integer_t<Alloc, Threadsafe, Secure> by, const
+ integer_t<Alloc, Threadsafe, Secure> modulus)
+{
+ integer_t<Alloc, Threadsafe, Secure> r;
+ mulmod(r._data(), n._data(), by._data(), modulus._data());
+ return BOOST_XINT_MOVE(r);
+}
+
+/*! \brief Get the modular product of squaring an integer.
+
+- Complexity: O(2n<sup>2</sup>)
+
+\param[in] n The integer to square.
+\param[in] modulus The modulus.
+
+\returns The result of \c square(n) % \c modulus.
+
+\remarks
+This is purely a convenience function, to make it easier to write
+self-documenting code. It does not provide any additional efficiency over
+writing out the calculation.
+*/
+template<class Alloc, bool Threadsafe, bool Secure>
+integer_t<Alloc, Threadsafe, Secure> sqrmod(const integer_t<Alloc, Threadsafe,
+ Secure> n, const integer_t<Alloc, Threadsafe, Secure> modulus)
+{
+ integer_t<Alloc, Threadsafe, Secure> r;
+ sqrmod(r._data(), n._data(), modulus._data());
+ return BOOST_XINT_MOVE(r);
+}
+
+/*! \brief Get the result of \c n<sup>e</sup> % \c m, keeping the intermediate
+ results (relatively) small.
+
+- Complexity: O(n<sub>n</sub><sup>2</sup>n<sub>e</sub>)
+
+\param[in] n The integer to exponentiate.
+\param[in] exponent The exponent.
+\param[in] modulus The modulus.
+\param[in] no_monty Used for testing, leave false for normal operation.
+
+\returns The result of \c pow(n, \c exponent) % \c modulus.
+
+\exception exceptions::invalid_modulus if the modulus is less than one.
+
+\remarks
+Because this function keeps the intermediate results small, it is far faster
+and uses far less memory than a naive implementation.
+
+\par
+In addition, this function will use the Montgomery Reduction internally, if the
+modulus is an odd number (and if \c no_monty isn't set), which is almost always
+faster than the non-Montgomery method.
+*/
+template<class Alloc, bool Threadsafe, bool Secure>
+integer_t<Alloc, Threadsafe, Secure> powmod(const integer_t<Alloc, Threadsafe,
+ Secure> n, const integer_t<Alloc, Threadsafe, Secure> exponent, const
+ integer_t<Alloc, Threadsafe, Secure> modulus, bool no_monty = false)
+{
+ integer_t<Alloc, Threadsafe, Secure> r;
+ powmod(r._data(), n._data(), exponent._data(), modulus._data(), no_monty);
+ return BOOST_XINT_MOVE(r);
+}
+
+/*! \brief Get the modular inverse of a number in a modulus, if there is one.
+
+- Complexity: O((log n)<sup>3</sup>)
+
+\param[in] n The number to calculate the inverse of.
+\param[in] modulus The modulus to use.
+
+\returns The modular inverse of \c n in \c modulus. If \c n has no modular
+inverse in \c modulus, returns zero.
+
+\exception exceptions::invalid_modulus if the modulus is less than one.
+*/
+template<class Alloc, bool Threadsafe, bool Secure>
+integer_t<Alloc, Threadsafe, Secure> invmod(const integer_t<Alloc, Threadsafe,
+ Secure> n, const integer_t<Alloc, Threadsafe, Secure> modulus)
+{
+ integer_t<Alloc, Threadsafe, Secure> r;
+ invmod(r._data(), n._data(), modulus._data());
+ return BOOST_XINT_MOVE(r);
+}
 //!@}
 
-//! \name Random number functions
+/*! \name Random and prime number functions
+
+ \see integer_t::random_by_size
+ \see integer_t::random_prime
+*/
 //!@{
-template <class T>
-integer random_by_size(T& gen, size_t sizeInBits, bool highBitOn=false, bool
- lowBitOn=false, bool canBeNegative=false);
+
+/*! \brief Tests an integer for primality.
+
+- Complexity: Varies
+
+\param[in] n The number to test.
+\param[in] callback An optional function that will be called regularly during
+the operation. If it returns \c false, the function will immediately return.
+
+\returns 1 if \c n seems to be prime, 0 if it isn't, or -1 if the provided
+callback function cancelled the operation.
+
+\exception exceptions::invalid_argument if \c n is less than 2.
+
+\remarks
+This function uses the Rabin-Miller probabilistic primality test. There is an
+infinitesimally small chance that it will think that a composite number is
+actually prime, but that is so small that it can be ignored for most practical
+purposes. If even that chance is too much, you can run this function over the
+number several times, it will use different randomly-selected "witness" numbers
+each time.
+
+\see \ref primes
+*/
+template<class Alloc, bool Threadsafe, bool Secure>
+int is_prime(const integer_t<Alloc, Threadsafe, Secure> n, callback_t callback =
+ no_callback)
+{
+ return is_prime(n._data(), callback);
+}
 //!@}
 
-//! \name Prime number functions
+/*! \name Comparison Operators
+
+ \see compare(integer_t, integer_t, bool)
+*/
 //!@{
-int is_prime(const integer& n, callback_t callback=no_callback);
-integer random_prime(size_t sizeInBits, callback_t callback=no_callback);
+template<class Alloc, bool Threadsafe, bool Secure> bool operator<(const
+ integer_t<Alloc, Threadsafe, Secure> n1, const integer_t<Alloc, Threadsafe,
+ Secure> n2) { return operator<(n1._data(), n2._data()); }
+template<class Alloc, bool Threadsafe, bool Secure> bool operator>(const
+ integer_t<Alloc, Threadsafe, Secure> n1, const integer_t<Alloc, Threadsafe,
+ Secure> n2) { return operator>(n1._data(), n2._data()); }
+template<class Alloc, bool Threadsafe, bool Secure> bool operator<=(const
+ integer_t<Alloc, Threadsafe, Secure> n1, const integer_t<Alloc, Threadsafe,
+ Secure> n2) { return operator<=(n1._data(), n2._data()); }
+template<class Alloc, bool Threadsafe, bool Secure> bool operator>=(const
+ integer_t<Alloc, Threadsafe, Secure> n1, const integer_t<Alloc, Threadsafe,
+ Secure> n2) { return operator>=(n1._data(), n2._data()); }
+template<class Alloc, bool Threadsafe, bool Secure> bool operator==(const
+ integer_t<Alloc, Threadsafe, Secure> n1, const integer_t<Alloc, Threadsafe,
+ Secure> n2) { return operator==(n1._data(), n2._data()); }
+template<class Alloc, bool Threadsafe, bool Secure> bool operator!=(const
+ integer_t<Alloc, Threadsafe, Secure> n1, const integer_t<Alloc, Threadsafe,
+ Secure> n2) { return operator!=(n1._data(), n2._data()); }
 //!@}
 
-/*! \name Operators
+/*! \name Mathematical and Bitwise Operators
 
     These act exactly the same as for the built-in %integer types.
 */
 //!@{
-bool operator<(const integer& n1, const integer& n2);
-bool operator>(const integer& n1, const integer& n2);
-bool operator<=(const integer& n1, const integer& n2);
-bool operator>=(const integer& n1, const integer& n2);
-bool operator==(const integer& n1, const integer& n2);
-bool operator!=(const integer& n1, const integer& n2);
-
-integer operator+(const integer& n1, const integer& n2);
-integer operator-(const integer& n1, const integer& n2);
-integer operator*(const integer& n1, const integer& n2);
-integer operator/(const integer& n1, const integer& n2);
-integer operator%(const integer& n1, const integer& n2);
-integer operator&(const integer& n1, const integer& n2);
-integer operator|(const integer& n1, const integer& n2);
-integer operator^(const integer& n1, const integer& n2);
+
+/*! \brief Calculate the sum of two integers.
+
+- Complexity: O(n)
+
+\param[in] n1, n2 The integers to add.
+
+\returns The sum of the parameters.
+*/
+template<class Alloc, bool Threadsafe, bool Secure>
+integer_t<Alloc, Threadsafe, Secure> operator+(const integer_t<Alloc,
+ Threadsafe, Secure> n1, const integer_t<Alloc, Threadsafe, Secure> n2)
+{
+ integer_t<Alloc, Threadsafe, Secure> r(n1._data() + n2._data());
+ return BOOST_XINT_MOVE(r);
+}
+
+/*! \brief Calculate the difference between two integers.
+
+- Complexity: O(n)
+
+\param[in] n1, n2 The integers to operate on.
+
+\returns The difference between the parameters.
+*/
+template<class Alloc, bool Threadsafe, bool Secure>
+integer_t<Alloc, Threadsafe, Secure> operator-(const integer_t<Alloc,
+ Threadsafe, Secure> n1, const integer_t<Alloc, Threadsafe, Secure> n2)
+{
+ integer_t<Alloc, Threadsafe, Secure> r(n1._data() - n2._data());
+ return BOOST_XINT_MOVE(r);
+}
+
+/*! \brief Calculate the product of two integers.
+
+- Complexity: O(n<sup>2</sup>)
+
+\param[in] n1, n2 The integers to operate on.
+
+\returns The product of the parameters.
+
+\remarks
+Automatically uses the more-efficient squaring algorithm if it can trivially
+detect that the two parameters are copies of the same number.
+*/
+template<class Alloc, bool Threadsafe, bool Secure>
+integer_t<Alloc, Threadsafe, Secure> operator*(const integer_t<Alloc,
+ Threadsafe, Secure> n1, const integer_t<Alloc, Threadsafe, Secure> n2)
+{
+ integer_t<Alloc, Threadsafe, Secure> r(n1._data() * n2._data());
+ return BOOST_XINT_MOVE(r);
+}
+
+/*! \brief Calculate how many \c dividends would fit into \c divisor.
+
+- Complexity: O(n<sup>2</sup>)
+
+\param[in] dividend, divisor The integers to operate on.
+
+\returns The integer value of \c dividend divided by \c divisor.
+
+\exception exceptions::divide_by_zero if \c divisor is zero.
+*/
+template<class Alloc, bool Threadsafe, bool Secure>
+integer_t<Alloc, Threadsafe, Secure> operator/(const integer_t<Alloc,
+ Threadsafe, Secure> dividend, const integer_t<Alloc, Threadsafe, Secure>
+ divisor)
+{
+ integer_t<Alloc, Threadsafe, Secure> r(dividend._data() / divisor._data());
+ return BOOST_XINT_MOVE(r);
+}
+
+/*! \brief Get the remainder after dividing a number by another.
+
+- Complexity: O(n<sup>2</sup>)
+
+\param[in] n1 The dividend.
+\param[in] n2 The divisor.
+
+\returns The remainder after dividing \c n1 by \c n2.
+*/
+template<class Alloc, bool Threadsafe, bool Secure>
+integer_t<Alloc, Threadsafe, Secure> operator%(const integer_t<Alloc,
+ Threadsafe, Secure> n1, const integer_t<Alloc, Threadsafe, Secure> n2)
+{
+ integer_t<Alloc, Threadsafe, Secure> r(n1._data() % n2._data());
+ return BOOST_XINT_MOVE(r);
+}
+
+/*! \brief Combine two integers using a bitwise \c AND operation.
+
+- Complexity: O(n)
+
+\param[in] n1, n2 The integers to operate on.
+
+\returns A positive integer with all bits that are set in both parameters turned
+on.
+*/
+template<class Alloc, bool Threadsafe, bool Secure>
+integer_t<Alloc, Threadsafe, Secure> operator&(const integer_t<Alloc,
+ Threadsafe, Secure> n1, const integer_t<Alloc, Threadsafe, Secure> n2)
+{
+ integer_t<Alloc, Threadsafe, Secure> r(n1._data() & n2._data());
+ return BOOST_XINT_MOVE(r);
+}
+
+/*! \brief Combine two integers using a bitwise \c OR operation.
+
+- Complexity: O(n)
+
+\param[in] n1, n2 The integers to operate on.
+
+\returns A positive integer with all bits that are set in either parameter
+turned on.
+*/
+template<class Alloc, bool Threadsafe, bool Secure>
+integer_t<Alloc, Threadsafe, Secure> operator|(const integer_t<Alloc,
+ Threadsafe, Secure> n1, const integer_t<Alloc, Threadsafe, Secure> n2)
+{
+ integer_t<Alloc, Threadsafe, Secure> r(n1._data() | n2._data());
+ return BOOST_XINT_MOVE(r);
+}
+
+/*! \brief Combine two integers using a bitwise \c XOR operation.
+
+- Complexity: O(n)
+
+\param[in] n1, n2 The integers to operate on.
+
+\returns A positive integer with all bits that are set in either parameter, but
+not both, turned on.
+*/
+template<class Alloc, bool Threadsafe, bool Secure>
+integer_t<Alloc, Threadsafe, Secure> operator^(const integer_t<Alloc,
+ Threadsafe, Secure> n1, const integer_t<Alloc, Threadsafe, Secure> n2)
+{
+ integer_t<Alloc, Threadsafe, Secure> r(n1._data() ^ n2._data());
+ return BOOST_XINT_MOVE(r);
+}
 //!@}
 
 //! \name Miscellaneous functions
 //!@{
-int compare(const integer &n1, const integer &n2, bool ignoresign=false);
-size_t log2(const integer& n);
-integer gcd(const integer& num1, const integer& num2);
-integer lcm(const integer& num1, const integer& num2);
-//!@}
 
-////////////////////////////////////////////////////////////////////////////////
-// Template function definitions
+/*! \brief Calculate the Greatest Common Denominator of two integers.
 
-/*!
- Constructs a new integer object with the value of the built-in signed
- %integer passed to it.
+- Complexity: O((log n)<sup>3</sup>)
+
+\param[in] num1, num2 The integers to operate on.
+
+\returns The greatest common denominator of the two integers, which will always
+be a positive number.
+*/
+template<class Alloc, bool Threadsafe, bool Secure>
+integer_t<Alloc, Threadsafe, Secure> gcd(const integer_t<Alloc, Threadsafe,
+ Secure> num1, const integer_t<Alloc, Threadsafe, Secure> num2)
+{
+ integer_t<Alloc, Threadsafe, Secure> r;
+ gcd(r._data(), num1._data(), num2._data());
+ return BOOST_XINT_MOVE(r);
+}
 
- \param[in] n A number of type \c T.
- \tparam T The type of \c n.
+/*! \brief Calculate the Least Common Multiple of two integers.
 
- You can ignore the \c enable_if parameters, they are there only to tell
- the compiler what types it applies to.
+- Complexity: O((log n)<sup>3</sup> + n<sup>2</sup>)
 
- \overload
+\param[in] num1, num2 The integers to operate on.
+
+\returns The least common multiple of the two integers. If either integer is
+zero, then the return value will be zero, by convention; in all other cases, the
+return value will be a positive number.
 */
-template <typename T> integer::integer(const T& n,
- typename boost::enable_if<boost::is_integral<T> >::type*,
- typename boost::enable_if<boost::is_signed<T> >::type*)
+template<class Alloc, bool Threadsafe, bool Secure>
+integer_t<Alloc, Threadsafe, Secure> lcm(const integer_t<Alloc, Threadsafe,
+ Secure> num1, const integer_t<Alloc, Threadsafe, Secure> num2)
 {
- _set_signed(n);
+ integer_t<Alloc, Threadsafe, Secure> r;
+ lcm(r._data(), num1._data(), num2._data());
+ return BOOST_XINT_MOVE(r);
 }
 
-/*!
- Constructs a new integer object with the value of the built-in unsigned
- %integer passed to it.
+/*! \brief Compare two integer objects.
 
- \param[in] n A number of type \c T.
- \tparam T The type of \c n.
+- Complexity: varies between O(n) if the numbers are equal (the worst case),
+down to O(1) if they have different signs or wildly different magnitudes.
 
- You can ignore the \c enable_if parameters, they are there only to tell
- the compiler what types it applies to.
+\param[in] n1, n2 The integers to compare.
+\param[in] ignoresign If \c true, the absolute values of n1 and n2 are compared,
+instead of their signed values. Used internally.
 
- \overload
+\returns A negative number if \c n1 < \c n2; zero if \c n1 == \c n2, or a
+positive number if \c n1 > \c n2.
 */
-template <typename T> integer::integer(const T& n,
- typename boost::enable_if<boost::is_integral<T> >::type*,
- typename boost::enable_if<boost::is_unsigned<T> >::type*)
+template<class Alloc, bool Threadsafe, bool Secure>
+int compare(const integer_t<Alloc, Threadsafe, Secure> n1, const integer_t<
+ Alloc, Threadsafe, Secure> n2, bool ignoresign = false)
 {
- _set_unsigned(n);
+ return compare(n1._data(), n2._data(), ignoresign);
 }
 
-/*! \brief Efficiently converts from an xint::integer to a built-in %integer
- type.
+/*! \brief Get the log<sub>2</sub> value of an integer.
 
-\param[in] n The %integer to convert.
-\tparam T The type to convert it to.
+- Complexity: O(1)
 
-\returns The numeric value of \c n, converted to the specified type.
+\param[in] n The %integer to operate on.
 
-\exception exceptions::too_big if \c n would not fit into the specified type.
+\returns The %integer log<sub>2</sub> value of the integer.
+
+\remarks
+pow2(log2(n)-1) will give you an integer with the highest set bit of \c n,
+assuming that \c n is non-zero.
+
+\par
+Similar to the #highestbit function.
 */
-template <typename T>
-T to(const integer& n) {
- return detail::to<T>(n);
+template<class Alloc, bool Threadsafe, bool Secure>
+size_t log2(const integer_t<Alloc, Threadsafe, Secure> n) {
+ return log2(n._data());
 }
+//!@}
+
+//! Allows for comparisons between integer_t types and other integral values.
+#define BOOST_XINT_ANY_COMPARE(rtype, op) \
+ template <class Alloc, bool Threadsafe, bool Secure, typename N> \
+ rtype op(const integer_t<Alloc, Threadsafe, Secure> n1, const N n2) { \
+ return op(n1, integer_t<Alloc, Threadsafe, Secure>(n2)); \
+ } \
+ \
+ template <typename N, class Alloc, bool Threadsafe, bool Secure> \
+ rtype op(const N n1, const integer_t<Alloc, Threadsafe, Secure> n2) { \
+ return op(integer_t<Alloc, Threadsafe, Secure>(n1), n2); \
+ }
+
+BOOST_XINT_ANY_COMPARE(bool, operator<)
+BOOST_XINT_ANY_COMPARE(bool, operator>)
+BOOST_XINT_ANY_COMPARE(bool, operator<=)
+BOOST_XINT_ANY_COMPARE(bool, operator>=)
+BOOST_XINT_ANY_COMPARE(bool, operator==)
+BOOST_XINT_ANY_COMPARE(bool, operator!=)
+BOOST_XINT_ANY_COMPARE(int, compare)
+
+//! Allows for operations between integer_t types and other integral values.
+#define BOOST_XINT_ANY_MATH(op) \
+ template <class Alloc, bool Threadsafe, bool Secure, typename N> \
+ integer_t<Alloc, Threadsafe, Secure> op(const integer_t<Alloc, Threadsafe, \
+ Secure> n1, const N n2) \
+ { \
+ integer_t<Alloc, Threadsafe, Secure> r(op(n1, integer_t<Alloc, \
+ Threadsafe, Secure>(n2))); \
+ return BOOST_XINT_MOVE(r); \
+ } \
+ \
+ template <typename N, class Alloc, bool Threadsafe, bool Secure> \
+ integer_t<Alloc, Threadsafe, Secure> op(const N n1, const integer_t<Alloc, \
+ Threadsafe, Secure> n2) \
+ { \
+ integer_t<Alloc, Threadsafe, Secure> r(op(integer_t<Alloc, Threadsafe, \
+ Secure>(n1), n2)); \
+ return BOOST_XINT_MOVE(r); \
+ }
+
+BOOST_XINT_ANY_MATH(pow)
+BOOST_XINT_ANY_MATH(mulmod)
+BOOST_XINT_ANY_MATH(sqrmod)
+BOOST_XINT_ANY_MATH(powmod)
+BOOST_XINT_ANY_MATH(invmod)
+BOOST_XINT_ANY_MATH(operator+)
+BOOST_XINT_ANY_MATH(operator-)
+BOOST_XINT_ANY_MATH(operator*)
+BOOST_XINT_ANY_MATH(operator/)
+BOOST_XINT_ANY_MATH(operator%)
+BOOST_XINT_ANY_MATH(operator&)
+BOOST_XINT_ANY_MATH(operator|)
+BOOST_XINT_ANY_MATH(operator^)
+BOOST_XINT_ANY_MATH(gcd)
+BOOST_XINT_ANY_MATH(lcm)
 
 //! \name Stream input/output functions
 //!@{
-template <typename charT, typename traits>
-inline std::basic_ostream<charT,traits>& operator<<(std::basic_ostream<charT,
- traits>& out, const integer& n)
+template <typename charT, typename traits, class Alloc, bool Threadsafe, bool
+ Secure> inline std::basic_ostream<charT,traits>& operator<<(
+ std::basic_ostream<charT, traits>& out, const integer_t<Alloc, Threadsafe,
+ Secure> n)
 {
- return detail::operator<<(out, n);
+ return operator<<(out, n._data());
 }
 
-template <typename charT, typename traits>
-inline std::basic_istream<charT,traits>& operator>>(std::basic_istream<charT,
- traits>& in, integer& n)
+template <typename charT, typename traits, class Alloc, bool Threadsafe, bool
+ Secure> inline std::basic_istream<charT,traits>& operator>>(
+ std::basic_istream<charT, traits>& in, integer_t<Alloc, Threadsafe, Secure>&
+ n)
 {
- return detail::operator>>(in, n);
+ return operator>>(in, n._data());
 }
 //!@}
 
-inline void swap(integer& left, integer& right) {
+template<class Alloc, bool Threadsafe, bool Secure>
+inline void swap(integer_t<Alloc, Threadsafe, Secure>& left, integer_t<Alloc,
+ Threadsafe, Secure>& right)
+{
     left._swap(right);
 }
 
+/*! \brief The default arbitrary-length integer type.
+
+ This uses the default parameters for the integer_t template.
+*/
+typedef integer_t<> integer;
+
 } // namespace xint
 } // namespace boost
 
@@ -340,4 +1517,9 @@
 };
 } // namespace std
 
+#ifdef _WIN32
+ // Return the warning setting to its original value.
+ #pragma warning(pop)
+#endif
+
 #endif // BOOST_INCLUDED_XINT_INTEGER_HPP

Deleted: sandbox/xint/boost/xint/internals.hpp
==============================================================================
--- sandbox/xint/boost/xint/internals.hpp 2010-05-31 20:43:54 EDT (Mon, 31 May 2010)
+++ (empty file)
@@ -1,546 +0,0 @@
-
-/*
- The Extended Integer (XInt) Library
- A fast, portable C++ library for multi-precision integer math
- Copyright 2010 by Chad Nelson
-
- Distributed under the Boost Software License, Version 1.0.
- See accompanying file LICENSE_1_0.txt or copy at
- http://www.boost.org/LICENSE_1_0.txt
-
- See http://www.boost.org/libs/xint for library home page.
-*/
-
-/*! \file
- \brief Contains the internal definitions required for all XInt types.
-
- This file will be included by the library itself when needed.
-*/
-
-#ifndef BOOST_INCLUDED_XINT_INTERNALS_HPP
-#define BOOST_INCLUDED_XINT_INTERNALS_HPP
-
-// For performance testing, uncomment one of these defines.
-//#define XINT_TEST_BASELINE
-//#define XINT_TEST_MOVE
-//#define XINT_TEST_COPY_ON_WRITE
-
-#include <string>
-#include <vector>
-#include <queue>
-#include <limits>
-#include <cstddef> // for size_t
-#include <iostream>
-#include <stdexcept>
-#include <boost/integer.hpp>
-#include <boost/cstdint.hpp>
-#include <boost/function.hpp>
-#include <boost/type_traits.hpp>
-
-#if defined XINT_TEST_BASELINE
- #define PERFORMANCE_TEST
-#elif defined XINT_TEST_COPY_ON_WRITE
- #define PERFORMANCE_TEST
- #define BOOST_XINT_USE_COPY_ON_WRITE
-#elif defined XINT_TEST_MOVE
- #define PERFORMANCE_TEST
- #define BOOST_XINT_USE_MOVE
-#else
- #ifdef XINT_THREADSAFE
- #define BOOST_XINT_USE_MOVE
- #else
- #define BOOST_XINT_USE_COPY_ON_WRITE
- #endif
-#endif
-
-#ifdef BOOST_XINT_USE_MOVE
- #include <boost/move/move.hpp>
- #define BOOST_XINT_COPY_ASSIGN_REF(type) BOOST_COPY_ASSIGN_REF(type)
- #define BOOST_XINT_COPYABLE_AND_MOVABLE(type) BOOST_COPYABLE_AND_MOVABLE(type)
- #define BOOST_XINT_RV_REF(type) BOOST_RV_REF(type)
- #define BOOST_XINT_MOVE(value) boost::move(value)
- #define BOOST_XINT_FORWARD(type, value) boost::forward<type>(value)
-#else
- template <typename T> class disable_boost_rv_ref: public T { };
- #define BOOST_XINT_COPY_ASSIGN_REF(type) const type&
- #define BOOST_XINT_COPYABLE_AND_MOVABLE(type)
- #define BOOST_XINT_RV_REF(type) disable_boost_rv_ref<type>
- #define BOOST_XINT_MOVE(value) value
- #define BOOST_XINT_FORWARD(type, value) value
-#endif
-
-namespace boost {
-
-//! \brief All the types and functions of the library are within this namespace.
-namespace xint {
-
-class integer;
-class nothrow_integer;
-class fixed_integer_any;
-template <size_t Bits> class fixed_integer;
-
-//! A callback function takes no parameters and returns a bool.
-//! \see xint::is_prime
-//! \see xint::random_prime
-typedef boost::function<bool ()> callback_t;
-
-//! The format for the binary representations of %integers.
-//! \see xint::to_binary
-//! \see xint::from_binary
-typedef std::vector<unsigned char> binary_t;
-
-//! An empty callback_t, used as a default parameter for some functions.
-//! \see xint::is_prime
-//! \see xint::random_prime
-const callback_t no_callback;
-
-//! A value that can be used for the 'base' parameter of the string-to-integer functions
-//! \see xint::integer::integer(const std::string& str, size_t base)
-//! \see xint::from_string
-const size_t autobase=(std::numeric_limits<size_t>::max)();
-
-//! \brief The items within this namespace are meant for internal use only.
-namespace detail {
-//! @cond detail
-
-/*!
- This is the type used for calculations. It should be the largest
- built-in integral type the system can offer, for maximum processing
- efficiency.
-*/
-typedef boost::uintmax_t doubledigit_t;
-
-/*!
- This is the type used to store information about the %integer. It must
- contain at least half the number of bits that a doubledigit_t can hold,
- and is most memory-efficient when it's exactly that.
-*/
-typedef boost::uint_t<std::numeric_limits<doubledigit_t>::digits / 2>::fast
- digit_t;
-
-//! \name Some constants used by the library.
-//!@{
-const size_t bits_per_digit = std::numeric_limits<digit_t>::digits;
-const size_t digits_in_uintmax =
- (std::numeric_limits<boost::uintmax_t>::digits + bits_per_digit - 1) /
- bits_per_digit;
-const digit_t digit_hibit = (digit_t(1) << (bits_per_digit-1));
-const doubledigit_t doubledigit_hibit = (doubledigit_t(1) << (bits_per_digit*2-1));
-const doubledigit_t digit_overflowbit = (doubledigit_t(1) << bits_per_digit);
-const digit_t digit_mask = digit_t(digit_overflowbit-1);
-//!@}
-
-//! Holds the text representation of the Not-a-Number value.
-const extern std::string nan_text;
-
-//! \brief Holds the magnitude digits of an integer.
-struct data_t {
- size_t copies, length, max_length;
- digit_t fixed_mask; //!< For the topmost digit; zero for variable-sized
- digit_t magnitude[1];
-};
-
-//! \name The data_t functions.
-//!@{
-void zero(digit_t *p, digit_t *end);
-void zero(digit_t *p, size_t size);
-data_t *allocate(size_t max_digits, size_t initial_length=
- (std::numeric_limits<size_t>::max)(), digit_t fixed_mask=0);
-data_t *allocate_fixed(digit_t mask, size_t max_digits, size_t initial_length=
- (std::numeric_limits<size_t>::max)());
-data_t *allocate_fixed_zero(digit_t mask, size_t max_digits);
-data_t *reallocate(data_t *olddata, size_t newsize);
-data_t *duplicate(data_t *olddata, size_t extra=0);
-data_t *duplicate(data_t *olddata, data_t *data_to_copy, size_t extra=0);
-void deallocate(data_t *data);
-//!@}
-
-class temp_t;
-class base_variable_length_integer;
-
-//! \brief The base class for all integer classes.
-class base_integer {
- public:
- ~base_integer();
-
- //! \name Internal Functions
- //@{
- detail::digit_t _get_digit(size_t index) const;
- detail::digit_t _get_digit(size_t index, bool) const; //!< \overload
- detail::digit_t* _get_writable_digits();
- const detail::digit_t* _get_digits() const; //!< \overload
-
- size_t _get_length() const;
- size_t _get_max_length() const;
- void _set_length(size_t digits);
-
- size_t _log2() const;
-
- bool _is_nan() const { return (data==0); };
- bool _is_unique() const;
- bool _is_zero() const;
-
- bool _is_fixed() const;
- size_t _fixed_digits() const;
- size_t _fixed_bits() const;
-
- bool _get_readonly() const;
- void _mark_movable();
- bool _is_movable() const;
- bool _get_negative() const;
- void _set_negative(bool neg);
- void _toggle_negative();
-
- void _realloc(size_t new_digit_count);
- void _cleanup();
- void _attach(const base_integer& copy, bool treat_as_movable);
-
- void _increment(bool absolute_value=false);
- void _decrement(bool absolute_value=false);
-
- integer _to_integer(bool treat_as_movable) const;
- void _set_signed(boost::intmax_t n);
- void _set_unsigned(boost::uintmax_t n, bool negative=false);
-
- void _make_unique();
- void _swap(base_integer& other);
- //@}
-
- protected:
- typedef unsigned int flag_t;
-
- base_integer();
- base_integer(const base_integer& c, bool fixed);
- explicit base_integer(data_t *adopt, bool neg=false);
- base_integer(size_t count, digit_t mask);
- void _base_attach(data_t *new_data, flag_t flags = 0, size_t
- extra_allocation = 0, bool is_movable = false);
-
- void _set_readonly();
-
- protected:
- static const flag_t flag_negative = 0x01;
- static const flag_t flag_readonly = 0x02;
- static const flag_t flag_fixedlength = 0x04;
- static const flag_t flag_movable = 0x08;
-
- private:
- flag_t flags;
- data_t *data;
-
- friend class temp_t;
- friend class base_variable_length_integer;
-};
-
-//! \brief Makes a temporary integer that can always share storage.
-class temp_t: public base_integer {
- public:
- explicit temp_t(const base_integer& b) {
- flags = b.flags;
- data = b.data;
- ++data->copies;
- }
-
- //! Constructs an empty integer of the same type as the one passed in.
- temp_t(const base_integer& b, size_t realloc_size):
- base_integer(b._is_fixed()
- ? allocate_fixed(b.data->fixed_mask, b._fixed_digits(), realloc_size)
- : allocate(realloc_size)) { }
-};
-
-//! \brief Makes a negated temporary integer that can always share storage.
-class neg_t: public temp_t {
- public:
- explicit neg_t(const base_integer& b): temp_t(b) {
- _toggle_negative();
- }
-};
-
-//! \brief The base class for the variable-length integer classes.
-class base_variable_length_integer: public base_integer {
- protected:
- void _attach_0();
-};
-
-//! \brief Used internally to reorder bits into different-sized groupings.
-class bitqueue_t {
- public:
- bitqueue_t(): bits_pending(0) { }
- void push(doubledigit_t bits, size_t count);
- doubledigit_t pop(size_t requestedbits);
- bool empty() const { return pending.empty(); }
- size_t size() const { return bits_pending; }
-
- private:
- static const size_t ddbits = std::numeric_limits<doubledigit_t>::digits;
- typedef std::pair<doubledigit_t, size_t> indata_t;
- typedef std::queue<indata_t> inqueue_t;
-
- size_t bits_pending;
- inqueue_t pending;
-};
-
-int compare(const base_integer &b1, const base_integer &b2, bool
- ignoresign=false);
-std::string to_string(const base_integer& n, size_t base, bool uppercase);
-void from_string(base_integer& target, const std::string& str, size_t base);
-void add(base_integer& target, const base_integer& n1, const base_integer& n2);
-void subtract(base_integer& target, const base_integer& n1, const base_integer&
- n2);
-void multiply(base_integer& target, const base_integer& n1, const base_integer&
- n2);
-void divide(base_integer& qtarget, base_integer& rtarget, const base_integer&
- n1, const base_integer& n2);
-void divide(base_integer& target, const base_integer& n1, const base_integer&
- n2);
-void sqr(base_integer& target, const base_integer& n);
-void pow(base_integer& target, const base_integer& n, const base_integer& e);
-void factorial(base_integer& target, size_t n);
-void sqrt(base_integer& target, const base_integer& n);
-bool getbit(const base_integer& n, size_t bit);
-void setbit(base_integer& n, size_t bit);
-void clearbit(base_integer& n, size_t bit);
-size_t lowestbit(const base_integer& n, size_t valueIfZero);
-size_t highestbit(const base_integer& n, size_t valueIfZero);
-void bitwise_and(base_integer& target, const base_integer& n1, const
- base_integer& n2);
-void bitwise_or(base_integer& target, const base_integer& n1, const
- base_integer& n2);
-void bitwise_xor(base_integer& target, const base_integer& n1, const
- base_integer& n2);
-void shift_left(base_integer& target, const base_integer& n, size_t byBits);
-void shift_right(base_integer& target, const base_integer& n, size_t byBits);
-void to_binary(xint::binary_t& target, const base_integer& n, size_t bits);
-void from_binary(base_integer& target, const xint::binary_t& s, size_t bits);
-void gcd(base_integer& target, const base_integer& num1, const base_integer&
- num2);
-void lcm(base_integer& target, const base_integer& num1, const base_integer&
- num2);
-void mod(base_integer& target, const base_integer& n1, const base_integer&
- n2);
-void invmod(base_integer& target, const base_integer& n, const base_integer& m);
-void powmod(base_integer& target, const base_integer& n, const base_integer& e,
- const base_integer& m, bool noMontgomery);
-
-size_t log10_bits(size_t bits);
-
-//! @endcond detail
-} // namespace detail
-
-/*! \brief The base class for all fixed_integer types.
-
-This class eases operations on different-sized fixed_integer types.
-*/
-class fixed_integer_any: public detail::base_integer {
- public:
- /*! \name Automatic conversion operators.
-
- These allow the compiler to create a temporary fixed_integer, of the
- size of boost::uintmax_t, for proper comparisons between fixed_integer
- types and literals. They shouldn't be used for any other purposes.
- */
- template <typename T> fixed_integer_any(const T& n,
- typename boost::enable_if<boost::is_integral<T> >::type* = 0,
- typename boost::enable_if<boost::is_signed<T> >::type* = 0):
- base_integer(detail::digits_in_uintmax, detail::digit_mask)
- { _set_signed(n); }
-
- template <typename T> fixed_integer_any(const T& n,
- typename boost::enable_if<boost::is_integral<T> >::type* = 0,
- typename boost::enable_if<boost::is_unsigned<T> >::type* = 0):
- base_integer(detail::digits_in_uintmax, detail::digit_mask)
- { _set_unsigned(n); }
-
- protected:
- fixed_integer_any(size_t count, detail::digit_t mask):
- base_integer(count, mask) { }
- explicit fixed_integer_any(detail::data_t *adopt, bool neg=false):
- base_integer(adopt, neg) { }
- explicit fixed_integer_any(const fixed_integer_any& c):
- base_integer(c, true) { }
-};
-
-//! \name Miscellaneous functions
-//!@{
-bool opt_secure_mode();
-bool opt_thread_safe();
-//!@}
-
-/*! \brief Holds the results from a division-with-remainder call.
-
-This class serves essentially the same purpose as an \c std::pair. The only
-reason it exists is that \c std::pair doesn't work well with Boost.Move on some
-compilers.
-*/
-template <class T>
-class base_divide_t {
- public:
- base_divide_t() { }
- base_divide_t(const T& q, const T& r): quotient(q), remainder(r) { }
- base_divide_t(const base_divide_t<T>& copy):
- quotient(copy.quotient), remainder(copy.remainder) { }
- base_divide_t(BOOST_XINT_RV_REF(base_divide_t) move) {
- quotient._swap(move.quotient); remainder._swap(move.remainder); }
-
- base_divide_t& operator=(BOOST_XINT_COPY_ASSIGN_REF(base_divide_t) copy)
- { quotient = copy.quotient; remainder = copy.remainder; return
- *this; }
- base_divide_t& operator=(BOOST_XINT_RV_REF(base_divide_t) move) {
- quotient._swap(move.quotient); remainder._swap(move.remainder); return
- *this; }
-
- T quotient, remainder;
-
- private:
- BOOST_XINT_COPYABLE_AND_MOVABLE(base_divide_t)
-};
-
-} // namespace xint
-} // namespace boost
-
-////////////////////////////////////////////////////////////////////////////////
-// Template functions
-
-#include "exceptions.hpp"
-
-namespace boost {
-namespace xint {
-
-//! @cond detail
-namespace detail {
-
-template <typename T>
-size_t log2(const T& n,
- typename boost::enable_if<boost::is_integral<T> >::type* = 0,
- typename boost::enable_if<boost::is_unsigned<T> >::type* = 0)
-{
- size_t lo=0, hi=std::numeric_limits<T>::digits;
- while (lo < hi) {
- size_t s = lo + ((hi - lo) >> 1);
- if (n >= (T(1) << s)) lo = s + 1;
- else hi = s;
- }
- return lo;
-}
-
-template <typename T>
-size_t log2(const T& nn,
- typename boost::enable_if<boost::is_integral<T> >::type* = 0,
- typename boost::enable_if<boost::is_signed<T> >::type* = 0)
-{
- typedef typename boost::make_unsigned<T>::type uT;
- return log2(static_cast<uT>(nn < 0 ? -nn : nn));
-}
-
-template <typename T>
-T to(const base_integer& n) {
- if (compare(n, fixed_integer_any((std::numeric_limits<T>::min)())) < 0
- || compare(n, fixed_integer_any((std::numeric_limits<T>::max)())) > 0)
- throw exceptions::too_big("value out of range for requested "
- "conversion");
-
- T rval = 0;
- size_t len=n._get_length();
- for (size_t x=0; x<len; ++x) {
- if (sizeof(T) > sizeof(detail::digit_t)) rval <<= detail::bits_per_digit;
- rval += static_cast<T>(n._get_digit(len - x - 1));
- }
- if (n._get_negative()) rval = -rval; // Bogus MSVC warning C4146
- return rval;
-}
-
-template <typename charT, typename traits>
-inline std::basic_ostream<charT,traits>& operator<<(std::basic_ostream<charT,
- traits>& out, const base_integer& n)
-{
- int base=((out.flags() & std::ios::hex) ? 16
- : (out.flags() & std::ios::oct) ? 8
- : 10);
- bool upperCase=(out.flags() & std::ios::uppercase ? true : false);
-
- int nsign = (n._is_zero() ? 0 : n._get_negative() ? -1 : 1);
- if ((out.flags() & std::ios::showpos) && nsign >= 0) out << "+";
-
- if (out.flags() & std::ios::showbase) {
- if (nsign < 0) out << "-";
-
- if (base==16 && upperCase) out << "0X";
- else if (base==16) out << "0x";
- else if (base==8) out << "0";
-
- if (n._get_negative()) {
- out << to_string(neg_t(n), base, upperCase);
- } else {
- out << to_string(n, base, upperCase);
- }
- } else {
- out << to_string(n, base, upperCase);
- }
- return out;
-}
-
-template <typename charT, typename traits>
-inline std::basic_istream<charT,traits>& operator>>(std::basic_istream<charT,
- traits>& in, base_integer& n)
-{
- int hex=(in.flags() & std::ios::hex) ? 1 : 0;
- int dec=(in.flags() & std::ios::dec) ? 1 : 0;
- int oct=(in.flags() & std::ios::oct) ? 1 : 0;
- int count=hex+dec+oct;
-
- size_t base=autobase;
- if (count==1) {
- if (hex) base=16;
- else if (oct) base=8;
- else base=10;
- } else if (count>1) base=10;
- // else auto-base
-
- std::string s;
- if (in.peek()=='+') {
- in.ignore();
- } else if (in.peek()=='-') {
- in.ignore();
- s.push_back('-');
- }
-
- if (base==autobase) {
- if (in.peek()=='0') {
- in.ignore();
- int c=in.peek();
- if (c=='x' || c=='X') {
- in.ignore();
- base=16;
- } else base=8;
- } else base=10;
- }
-
- while (in) {
- int c=in.peek();
- if ((base==8 && (c>='0' && c<='7')) ||
- (base==10 && (c>='0' && c<='9')) ||
- (base==16 && ((c>='0' && c<='9') || (c>='a' && c<='f') ||
- (c>='A' && c<='F'))))
- {
- in.ignore();
- s.push_back(char(c));
- } else break;
- }
-
- try {
- detail::from_string(n, s, base);
- } catch (std::exception&) {
- // Catch invalid strings
- in.setstate(std::ios::failbit);
- }
-
- return in;
-}
-
-} // namespace detail
-//! @endcond detail
-
-} // namespace xint
-} // namespace boost
-
-#endif // BOOST_INCLUDED_XINT_INTERNALS_HPP

Deleted: sandbox/xint/boost/xint/monty.hpp
==============================================================================
--- sandbox/xint/boost/xint/monty.hpp 2010-05-31 20:43:54 EDT (Mon, 31 May 2010)
+++ (empty file)
@@ -1,45 +0,0 @@
-
-/*
- The Extended Integer (XInt) Library
- A fast, portable C++ library for multi-precision integer math
- Copyright 2010 by Chad Nelson
-
- Distributed under the Boost Software License, Version 1.0.
- See accompanying file LICENSE_1_0.txt or copy at
- http://www.boost.org/LICENSE_1_0.txt
-
- See http://www.boost.org/libs/xint for library home page.
-*/
-
-/*! \file
- \brief Internally-used functions.
-
- This file declares the functions that use the Montgomery Reduction. They are
- used internally to speed up the xint::powmod function for odd modulii.
-*/
-
-#ifndef BOOST_INCLUDED_XINT_MONTY_HPP
-#define BOOST_INCLUDED_XINT_MONTY_HPP
-
-//! @cond detail
-namespace boost {
-namespace xint {
-namespace detail {
-
-//! \name Montgomery Reduction functions
-//!@{
-detail::digit_t inverse0(const integer& n);
-integer montgomeryR(const integer& n);
-integer toMontgomeryForm(const integer& n, const integer& m);
-integer fromMontgomeryForm(const integer& n, const integer& m);
-integer montgomeryMultiplyMod(const integer& x, const integer& y, const integer&
- m, detail::digit_t nPrime0);
-integer montgomeryPowerMod(const integer& x, const integer& e, const integer& m);
-//!@}
-
-} // namespace detail
-} // namespace xint
-} // namespace boost
-//! @endcond detail
-
-#endif // BOOST_INCLUDED_XINT_MONTY_HPP

Modified: sandbox/xint/boost/xint/nothrow_integer.hpp
==============================================================================
--- sandbox/xint/boost/xint/nothrow_integer.hpp (original)
+++ sandbox/xint/boost/xint/nothrow_integer.hpp 2010-05-31 20:43:54 EDT (Mon, 31 May 2010)
@@ -18,321 +18,1314 @@
 #ifndef BOOST_INCLUDED_XINT_NOTHROW_INTEGER_HPP
 #define BOOST_INCLUDED_XINT_NOTHROW_INTEGER_HPP
 
-#include "integer.hpp"
+#include "detail/internals.hpp"
+#include "random.hpp"
 
 namespace boost {
 namespace xint {
 
-/*! \brief The %nothrow_integer class.
+#ifdef _WIN32
+ // The file's constructors make heavy use of the 'this' pointer, in a safe
+ // manner. MSVC isn't smart enough to know that it's safe.
+ #pragma warning(push)
+ #pragma warning(disable: 4355)
+#endif
+
+#ifndef BOOST_XINT_DOXYGEN_IGNORE
+namespace detail {
+ struct nan_t { };
+}
+#endif
+
+/*! \brief The %nothrow_integer_t class template.
+
+ Operations using this class do not throw exceptions, they return special
+ values (most often \ref nan "Not-a-Number") to indicate failures.
+
+ There are only a few member functions; most of the functionality is
+ implemented using standalone functions.
+
+ \tparam Alloc The allocator to use. It must be for the \c
+ boost::xint::detail::digit_t type.
+
+ \tparam Threadsafe If \c true, the library ensures that each object has its
+ own unique storage before returning it. If \c false, identical objects are
+ allowed to share storage using a copy-on-write design, potentially
+ increasing the speed of the library, but making it unsafe for programs where
+ an %integer object might be accessed by more than one thread. The library
+ allows copy-on-write for internal functions regardless of this parameter,
+ which is safe because the internal functions are single-threaded.
+
+ \tparam Secure If \c true, the library zeros out all memory before
+ deallocating it, for maximum security.
+*/
+template <class Alloc = std::allocator<detail::digit_t>, bool Threadsafe = true,
+ bool Secure = false>
+class nothrow_integer_t: public detail::digitmanager_t<Alloc, Threadsafe,
+ Secure>, public any_integer
+{
+ public:
+ typedef nothrow_integer_t<Alloc, Threadsafe, Secure> type;
+
+ //! \name Constructors & Destructors
+ //!@{
+ nothrow_integer_t();
+ nothrow_integer_t(const nothrow_integer_t<Alloc, Threadsafe, Secure>& b);
+ nothrow_integer_t(BOOST_XINT_RV_REF(type) b): any_integer(*this, 1) {
+ _swap(b); }
+ explicit nothrow_integer_t(const char *str, size_t base = 10);
+ explicit nothrow_integer_t(const char *str, char **endptr, size_t base =
+ 10);
+ explicit nothrow_integer_t(const std::string& str, size_t base = 10);
+ explicit nothrow_integer_t(const xint::binary_t b, size_t bits = 0);
+ explicit nothrow_integer_t(const any_integer& other);
+ template <typename Type> nothrow_integer_t(const Type n,
+ typename boost::enable_if<boost::is_integral<Type> >::type* = 0);
+
+ #ifndef BOOST_XINT_DOXYGEN_IGNORE
+ //! This one is used internally.
+ nothrow_integer_t(const detail::data_t c): detail::digitmanager_t<Alloc,
+ Threadsafe, Secure>(*c.holder()), any_integer(*this, c.length,
+ c.negative) { data.beginendmod(); }
+ nothrow_integer_t(const detail::nan_t& c): detail::digitmanager_t<Alloc,
+ Threadsafe, Secure>(0), any_integer(*this, 0) { }
+ #endif
+ //!@}
+
+ /*! \name Mathematical and Bitwise Operators
+ \brief These operate exactly like their counterparts for the built-in
+ %integer types.
+ */
+ //@{
+ nothrow_integer_t<Alloc, Threadsafe, Secure>& operator=(
+ BOOST_XINT_COPY_ASSIGN_REF(type) c);
+ nothrow_integer_t<Alloc, Threadsafe, Secure>& operator=(
+ BOOST_XINT_RV_REF(type) c) { _swap(c); return *this; }
+ template <typename Type> nothrow_integer_t<Alloc, Threadsafe, Secure>&
+ operator=(const Type n) { nothrow_integer_t<Alloc, Threadsafe,
+ Secure> nn(n); _swap(nn); return *this; }
+
+ bool operator!() const { return data.is_zero(); }
+ nothrow_integer_t<Alloc, Threadsafe, Secure> operator-() const;
+ nothrow_integer_t<Alloc, Threadsafe, Secure>& operator+() { return
+ *this; }
+ const nothrow_integer_t<Alloc, Threadsafe, Secure>& operator+() const {
+ return *this; }
+ nothrow_integer_t<Alloc, Threadsafe, Secure> operator~() const;
+
+ nothrow_integer_t<Alloc, Threadsafe, Secure>& operator+=(const
+ nothrow_integer_t<Alloc, Threadsafe, Secure> b);
+ nothrow_integer_t<Alloc, Threadsafe, Secure>& operator-=(const
+ nothrow_integer_t<Alloc, Threadsafe, Secure> b);
+ nothrow_integer_t<Alloc, Threadsafe, Secure>& operator*=(const
+ nothrow_integer_t<Alloc, Threadsafe, Secure> b);
+ nothrow_integer_t<Alloc, Threadsafe, Secure>& operator/=(const
+ nothrow_integer_t<Alloc, Threadsafe, Secure> b);
+ nothrow_integer_t<Alloc, Threadsafe, Secure>& operator%=(const
+ nothrow_integer_t<Alloc, Threadsafe, Secure> b);
+
+ nothrow_integer_t<Alloc, Threadsafe, Secure>& operator++();
+ nothrow_integer_t<Alloc, Threadsafe, Secure>& operator--();
+ nothrow_integer_t<Alloc, Threadsafe, Secure> operator++(int);
+ nothrow_integer_t<Alloc, Threadsafe, Secure> operator--(int);
+
+ nothrow_integer_t<Alloc, Threadsafe, Secure>& operator&=(const
+ nothrow_integer_t<Alloc, Threadsafe, Secure> n);
+ nothrow_integer_t<Alloc, Threadsafe, Secure>& operator|=(const
+ nothrow_integer_t<Alloc, Threadsafe, Secure> n);
+ nothrow_integer_t<Alloc, Threadsafe, Secure>& operator^=(const
+ nothrow_integer_t<Alloc, Threadsafe, Secure> n);
+ nothrow_integer_t<Alloc, Threadsafe, Secure> operator<<(size_t shift)
+ const;
+ nothrow_integer_t<Alloc, Threadsafe, Secure> operator>>(size_t shift)
+ const;
+ nothrow_integer_t<Alloc, Threadsafe, Secure>& operator<<=(size_t shift);
+ nothrow_integer_t<Alloc, Threadsafe, Secure>& operator>>=(size_t shift);
+ //@}
+
+ //! \name Miscellaneous Functions
+ //!@{
+ bool is_odd() const;
+ bool is_even() const;
+ bool is_nan() const { return _is_nan(); }
+ int sign(bool signed_zero = false) const;
+ size_t hex_digits() const;
+ //!@}
+
+ typedef base_divide_t<nothrow_integer_t<Alloc, Threadsafe, Secure> >
+ divide_t;
+
+ /*! \name Static Member Functions
+
+ These are functions that return a nothrow_integer_t, but don't take one
+ as a parameter. To use them as free functions, you would have to specify
+ the return type anyway, so I made them static member functions of the
+ type instead.
+ */
+ //!@{
+ static nothrow_integer_t<Alloc, Threadsafe, Secure> pow2(size_t exponent);
+ static nothrow_integer_t<Alloc, Threadsafe, Secure> factorial(size_t n);
+ static nothrow_integer_t<Alloc, Threadsafe, Secure> nan() { return _nan; }
+ template <class Type> static nothrow_integer_t<Alloc, Threadsafe, Secure>
+ random_by_size(Type& gen, size_t size_in_bits, bool high_bit_on = false,
+ bool low_bit_on = false, bool can_be_negative = false);
+ template <class Type> static nothrow_integer_t<Alloc, Threadsafe, Secure>
+ random_prime(Type& gen, size_t size_in_bits, callback_t callback =
+ no_callback);
+ //!@}
+
+ void _swap(nothrow_integer_t<Alloc, Threadsafe, Secure>& s) { using
+ std::swap; swap(data, s.data); }
+ static std::string _nan_text() { return "#NaN#"; }
+
+ private:
+ static nothrow_integer_t<Alloc, Threadsafe, Secure> _nan;
+ BOOST_XINT_COPYABLE_AND_MOVABLE(type)
+};
+
+template <class Alloc, bool Threadsafe, bool Secure>
+nothrow_integer_t<Alloc, Threadsafe, Secure> nothrow_integer_t<Alloc,
+ Threadsafe, Secure>::_nan = nothrow_integer_t<Alloc, Threadsafe, Secure>(
+ detail::nan_t());
+
+////////////////////////////////////////////////////////////////////////////////
+// Function template definitions
+
+//! \copydoc integer_t::integer_t()
+template<class Alloc, bool Threadsafe, bool Secure>
+nothrow_integer_t<Alloc, Threadsafe, Secure>::nothrow_integer_t():
+ any_integer(*this, 1)
+{
+ // Don't need to do anything, already preinitialized to zero.
+}
+
+//! \copydoc integer_t::integer_t(const integer_t&)
+template<class Alloc, bool Threadsafe, bool Secure>
+nothrow_integer_t<Alloc, Threadsafe, Secure>::nothrow_integer_t(const
+ nothrow_integer_t<Alloc, Threadsafe, Secure>& b): any_integer(*this, 1)
+{
+ try {
+ data = b.data;
+ if (!is_nan()) data.beginendmod();
+ } catch (std::exception&) {
+ *this = nan();
+ }
+}
+
+//! \copydoc integer_t::integer_t(const std::string&, size_t)
+template<class Alloc, bool Threadsafe, bool Secure>
+nothrow_integer_t<Alloc, Threadsafe, Secure>::nothrow_integer_t(const char *str,
+ size_t base): any_integer(*this, 1)
+{
+ try {
+ data.from_string(str, strlen(str), base);
+ } catch (std::exception&) {
+ *this = nan();
+ }
+}
+
+//! \copydoc integer_t::integer_t(const char *, char **, size_t)
+template<class Alloc, bool Threadsafe, bool Secure>
+nothrow_integer_t<Alloc, Threadsafe, Secure>::nothrow_integer_t(const char *str,
+ char **endptr, size_t base): any_integer(*this, 1)
+{
+ try {
+ data.from_string(str, endptr, base);
+ } catch (std::exception&) {
+ *this = nan();
+ }
+}
+
+//! \copydoc integer_t::integer_t(const std::string&, size_t)
+template<class Alloc, bool Threadsafe, bool Secure>
+nothrow_integer_t<Alloc, Threadsafe, Secure>::nothrow_integer_t(const
+ std::string& str, size_t base): any_integer(*this, 1)
+{
+ try {
+ data.from_string(str.c_str(), str.length(), base);
+ } catch (std::exception&) {
+ *this = nan();
+ }
+}
+
+//! \copydoc integer_t::integer_t(const xint::binary_t, size_t)
+template<class Alloc, bool Threadsafe, bool Secure>
+nothrow_integer_t<Alloc, Threadsafe, Secure>::nothrow_integer_t(const
+ xint::binary_t b, size_t bits): any_integer(*this, 1)
+{
+ try {
+ data.from_binary(b, bits);
+ } catch (std::exception&) {
+ *this = nan();
+ }
+}
+
+//! \copydoc integer_t::integer_t(const any_integer&)
+template<class Alloc, bool Threadsafe, bool Secure>
+nothrow_integer_t<Alloc, Threadsafe, Secure>::nothrow_integer_t(const
+ any_integer& c): any_integer(*this, 1)
+{
+ if (c._data().is_nan()) {
+ *this = nan();
+ } else {
+ try {
+ data.duplicate_data(c._data());
+ } catch (std::exception&) {
+ *this = nan();
+ }
+ }
+}
+
+/*!
+ Constructs a new integer object with the value of the built-in %integer type
+ passed to it.
+
+ \param[in] n The value for the new object.
+ \tparam Type The type of \c n.
+
+ You can ignore the \c enable_if parameter, it's there only to tell the
+ compiler what types the function applies to.
+
+ \overload
+*/
+template<class Alloc, bool Threadsafe, bool Secure>
+template <typename Type> nothrow_integer_t<Alloc, Threadsafe,
+ Secure>::nothrow_integer_t(const Type n, typename
+ boost::enable_if<boost::is_integral<Type> >::type*): any_integer(*this, 1)
+{
+ try {
+ if (std::numeric_limits<Type>::is_signed) data.set_signed(n);
+ else data.set_unsigned(n);
+ } catch (std::exception&) {
+ *this = nan();
+ }
+}
+
+template<class Alloc, bool Threadsafe, bool Secure>
+nothrow_integer_t<Alloc, Threadsafe, Secure>& nothrow_integer_t<Alloc,
+ Threadsafe, Secure>::operator=(BOOST_XINT_COPY_ASSIGN_REF(type) c)
+{
+ try {
+ data = c.data;
+ if (!is_nan()) data.beginendmod();
+ } catch (std::exception&) {
+ *this = nan();
+ }
+ return *this;
+}
+
+//! \copydoc integer_t::operator-
+template<class Alloc, bool Threadsafe, bool Secure>
+nothrow_integer_t<Alloc, Threadsafe, Secure> nothrow_integer_t<Alloc,
+ Threadsafe, Secure>::operator-() const
+{
+ try {
+ if (is_nan()) return *this;
+ nothrow_integer_t<Alloc, Threadsafe, Secure> r(-data);
+ return BOOST_XINT_MOVE(r);
+ } catch (std::exception&) {
+ return nan();
+ }
+}
+
+//! \see operator+(nothrow_integer_t, nothrow_integer_t)
+template<class Alloc, bool Threadsafe, bool Secure>
+nothrow_integer_t<Alloc, Threadsafe, Secure>& nothrow_integer_t<Alloc,
+ Threadsafe, Secure>::operator+=(const nothrow_integer_t<Alloc, Threadsafe,
+ Secure> b)
+{
+ try {
+ if (!is_nan() && !b.is_nan()) data += b.data;
+ else *this = nan();
+ } catch (std::exception&) {
+ *this = nan();
+ }
+ return *this;
+}
+
+//! \see operator-(nothrow_integer_t, nothrow_integer_t)
+template<class Alloc, bool Threadsafe, bool Secure>
+nothrow_integer_t<Alloc, Threadsafe, Secure>& nothrow_integer_t<Alloc,
+ Threadsafe, Secure>::operator-=(const nothrow_integer_t<Alloc, Threadsafe,
+ Secure> b)
+{
+ try {
+ if (!is_nan() && !b.is_nan()) data -= b.data;
+ else *this = nan();
+ } catch (std::exception&) {
+ *this = nan();
+ }
+ return *this;
+}
+
+//! \see operator*(nothrow_integer_t, nothrow_integer_t)
+template<class Alloc, bool Threadsafe, bool Secure>
+nothrow_integer_t<Alloc, Threadsafe, Secure>& nothrow_integer_t<Alloc,
+ Threadsafe, Secure>::operator*=(const nothrow_integer_t<Alloc, Threadsafe,
+ Secure> b)
+{
+ try {
+ if (!is_nan() && !b.is_nan()) data *= b.data;
+ else *this = nan();
+ } catch (std::exception&) {
+ *this = nan();
+ }
+ return *this;
+}
+
+//! \see operator/(nothrow_integer_t, nothrow_integer_t)
+template<class Alloc, bool Threadsafe, bool Secure>
+nothrow_integer_t<Alloc, Threadsafe, Secure>& nothrow_integer_t<Alloc,
+ Threadsafe, Secure>::operator/=(const nothrow_integer_t<Alloc, Threadsafe,
+ Secure> b)
+{
+ try {
+ if (!is_nan() && !b.is_nan()) data /= b.data;
+ else *this = nan();
+ } catch (std::exception&) {
+ *this = nan();
+ }
+ return *this;
+}
+
+//! \see operator%(nothrow_integer_t, nothrow_integer_t)
+template<class Alloc, bool Threadsafe, bool Secure>
+nothrow_integer_t<Alloc, Threadsafe, Secure>& nothrow_integer_t<Alloc,
+ Threadsafe, Secure>::operator%=(const nothrow_integer_t<Alloc, Threadsafe,
+ Secure> b)
+{
+ try {
+ if (!is_nan() && !b.is_nan()) data %= b.data;
+ else *this = nan();
+ } catch (std::exception&) {
+ *this = nan();
+ }
+ return *this;
+}
+
+//! \copydoc integer_t::operator++
+template<class Alloc, bool Threadsafe, bool Secure>
+nothrow_integer_t<Alloc, Threadsafe, Secure>& nothrow_integer_t<Alloc,
+ Threadsafe, Secure>::operator++()
+{
+ try {
+ if (!is_nan()) ++data;
+ } catch (std::exception&) {
+ *this = nan();
+ }
+ return *this;
+}
+
+//! \copydoc integer_t::operator--
+template<class Alloc, bool Threadsafe, bool Secure>
+nothrow_integer_t<Alloc, Threadsafe, Secure>& nothrow_integer_t<Alloc,
+ Threadsafe, Secure>::operator--()
+{
+ try {
+ if (!is_nan()) --data;
+ } catch (std::exception&) {
+ *this = nan();
+ }
+ return *this;
+}
+
+//! \copydoc integer_t::operator++(int)
+template<class Alloc, bool Threadsafe, bool Secure>
+nothrow_integer_t<Alloc, Threadsafe, Secure> nothrow_integer_t<Alloc,
+ Threadsafe, Secure>::operator++(int)
+{
+ try {
+ if (is_nan()) return *this;
+ nothrow_integer_t<Alloc, Threadsafe, Secure> r(data++);
+ return BOOST_XINT_MOVE(r);
+ } catch (std::exception&) {
+ return nan();
+ }
+}
+
+//! \copydoc integer_t::operator--(int)
+template<class Alloc, bool Threadsafe, bool Secure>
+nothrow_integer_t<Alloc, Threadsafe, Secure> nothrow_integer_t<Alloc,
+ Threadsafe, Secure>::operator--(int)
+{
+ try {
+ if (is_nan()) return *this;
+ nothrow_integer_t<Alloc, Threadsafe, Secure> r(data--);
+ return BOOST_XINT_MOVE(r);
+ } catch (std::exception&) {
+ return nan();
+ }
+}
+
+//! \see operator&(nothrow_integer_t, nothrow_integer_t)
+template<class Alloc, bool Threadsafe, bool Secure>
+nothrow_integer_t<Alloc, Threadsafe, Secure>& nothrow_integer_t<Alloc,
+ Threadsafe, Secure>::operator&=(const nothrow_integer_t<Alloc, Threadsafe,
+ Secure> n)
+{
+ try {
+ if (!is_nan() && !n.is_nan()) data &= n.data;
+ else *this = nan();
+ } catch (std::exception&) {
+ *this = nan();
+ }
+ return *this;
+}
+
+//! \see operator|(nothrow_integer_t, nothrow_integer_t)
+template<class Alloc, bool Threadsafe, bool Secure>
+nothrow_integer_t<Alloc, Threadsafe, Secure>& nothrow_integer_t<Alloc,
+ Threadsafe, Secure>::operator|=(const nothrow_integer_t<Alloc, Threadsafe,
+ Secure> n)
+{
+ try {
+ if (!is_nan() && !n.is_nan()) data |= n.data;
+ else *this = nan();
+ } catch (std::exception&) {
+ *this = nan();
+ }
+ return *this;
+}
+
+//! \see operator^(nothrow_integer_t, nothrow_integer_t)
+template<class Alloc, bool Threadsafe, bool Secure>
+nothrow_integer_t<Alloc, Threadsafe, Secure>& nothrow_integer_t<Alloc,
+ Threadsafe, Secure>::operator^=(const nothrow_integer_t<Alloc, Threadsafe,
+ Secure> n)
+{
+ try {
+ if (!is_nan() && !n.is_nan()) data ^= n.data;
+ else *this = nan();
+ } catch (std::exception&) {
+ *this = nan();
+ }
+ return *this;
+}
+
+//! \copydoc integer_t::operator<<(size_t) const
+template<class Alloc, bool Threadsafe, bool Secure>
+nothrow_integer_t<Alloc, Threadsafe, Secure> nothrow_integer_t<Alloc,
+ Threadsafe, Secure>::operator<<(size_t shift) const
+{
+ try {
+ if (is_nan()) return *this;
+ nothrow_integer_t<Alloc, Threadsafe, Secure> r(data << shift);
+ return BOOST_XINT_MOVE(r);
+ } catch (std::exception&) {
+ return nothrow_integer_t<Alloc, Threadsafe, Secure>::nan();
+ }
+}
+
+//! \copydoc integer_t::operator>>(size_t) const
+template<class Alloc, bool Threadsafe, bool Secure>
+nothrow_integer_t<Alloc, Threadsafe, Secure> nothrow_integer_t<Alloc,
+ Threadsafe, Secure>::operator>>(size_t shift) const
+{
+ try {
+ if (is_nan()) return *this;
+ nothrow_integer_t<Alloc, Threadsafe, Secure> r(data >> shift);
+ return BOOST_XINT_MOVE(r);
+ } catch (std::exception&) {
+ return nothrow_integer_t<Alloc, Threadsafe, Secure>::nan();
+ }
+}
+
+//! \see nothrow_integer_t::operator<<(size_t) const
+template<class Alloc, bool Threadsafe, bool Secure>
+nothrow_integer_t<Alloc, Threadsafe, Secure>& nothrow_integer_t<Alloc,
+ Threadsafe, Secure>::operator<<=(size_t shift)
+{
+ try {
+ if (!is_nan()) data <<= shift;
+ } catch (std::exception&) {
+ *this = nan();
+ }
+ return *this;
+}
+
+//! \see nothrow_integer_t::operator>>(size_t) const
+template<class Alloc, bool Threadsafe, bool Secure>
+nothrow_integer_t<Alloc, Threadsafe, Secure>& nothrow_integer_t<Alloc,
+ Threadsafe, Secure>::operator>>=(size_t shift)
+{
+ try {
+ if (!is_nan()) data >>= shift;
+ } catch (std::exception&) {
+ *this = nan();
+ }
+ return *this;
+}
+
+/*! \copydoc integer_t::is_odd
+
+ Returns false instead of throwing.
+*/
+template<class Alloc, bool Threadsafe, bool Secure>
+bool nothrow_integer_t<Alloc, Threadsafe, Secure>::is_odd() const {
+ try {
+ return (is_nan() ? false : data.is_odd());
+ } catch (std::exception&) {
+ return false;
+ }
+}
+
+/*! \copydoc integer_t::is_even
+
+ Returns false instead of throwing.
+*/
+template<class Alloc, bool Threadsafe, bool Secure>
+bool nothrow_integer_t<Alloc, Threadsafe, Secure>::is_even() const {
+ try {
+ return (is_nan() ? false : data.is_even());
+ } catch (std::exception&) {
+ return false;
+ }
+}
+
+/*! \copydoc integer_t::sign
+
+ Returns zero instead of throwing.
+*/
+template<class Alloc, bool Threadsafe, bool Secure>
+int nothrow_integer_t<Alloc, Threadsafe, Secure>::sign(bool signed_zero)
+ const
+{
+ try {
+ return (is_nan() ? 0 : data.sign(signed_zero));
+ } catch (std::exception&) {
+ return 0;
+ }
+}
+
+/*! \copydoc integer_t::hex_digits
+
+ Returns zero instead of throwing.
+*/
+template<class Alloc, bool Threadsafe, bool Secure>
+size_t nothrow_integer_t<Alloc, Threadsafe, Secure>::hex_digits() const {
+ try {
+ return (is_nan() ? 0 : data.hex_digits());
+ } catch (std::exception&) {
+ return 0;
+ }
+}
+
+//! \copydoc integer_t::pow2
+template<class Alloc, bool Threadsafe, bool Secure>
+nothrow_integer_t<Alloc, Threadsafe, Secure> nothrow_integer_t<Alloc,
+ Threadsafe, Secure>::pow2(size_t exponent)
+{
+ try {
+ nothrow_integer_t<Alloc, Threadsafe, Secure> r;
+ detail::pow2(r.data, exponent);
+ return BOOST_XINT_MOVE(r);
+ } catch (std::exception&) {
+ return nothrow_integer_t<Alloc, Threadsafe, Secure>::nan();
+ }
+}
+
+//! \copydoc integer_t::factorial
+template<class Alloc, bool Threadsafe, bool Secure>
+nothrow_integer_t<Alloc, Threadsafe, Secure> nothrow_integer_t<Alloc,
+ Threadsafe, Secure>::factorial(size_t n)
+{
+ try {
+ nothrow_integer_t<Alloc, Threadsafe, Secure> r;
+ detail::factorial(r.data, n);
+ return BOOST_XINT_MOVE(r);
+ } catch (std::exception&) {
+ return nothrow_integer_t<Alloc, Threadsafe, Secure>::nan();
+ }
+}
+
+//! \copydoc integer_t::random_by_size
+template<class Alloc, bool Threadsafe, bool Secure>
+template <class Type>
+nothrow_integer_t<Alloc, Threadsafe, Secure> nothrow_integer_t<Alloc,
+ Threadsafe, Secure>::random_by_size(Type& gen, size_t size_in_bits, bool
+ high_bit_on, bool low_bit_on, bool can_be_negative)
+{
+ try {
+ detail::random_generator<Type> rgen(gen);
+
+ nothrow_integer_t<Alloc, Threadsafe, Secure> r;
+ detail::random_by_size(r._data(), rgen, size_in_bits, high_bit_on,
+ low_bit_on, can_be_negative);
+ return BOOST_XINT_MOVE(r);
+ } catch (std::exception&) {
+ return nothrow_integer_t<Alloc, Threadsafe, Secure>::nan();
+ }
+}
+
+//! \copydoc integer_t::random_prime
+template<class Alloc, bool Threadsafe, bool Secure>
+template <class Type>
+nothrow_integer_t<Alloc, Threadsafe, Secure> nothrow_integer_t<Alloc,
+ Threadsafe, Secure>::random_prime(Type& gen, size_t size_in_bits, callback_t
+ callback)
+{
+ try {
+ detail::random_generator<Type> rgen(gen);
+
+ nothrow_integer_t<Alloc, Threadsafe, Secure> r;
+ detail::random_prime(r._data(), rgen, size_in_bits, callback);
+ return BOOST_XINT_MOVE(r);
+ } catch (std::exception&) {
+ return nothrow_integer_t<Alloc, Threadsafe, Secure>::nan();
+ }
+}
+
+////////////////////////////////////////////////////////////////////////////////
+// Free function template definitions
+
+//! \name Mathematical primitives
+//!@{
+
+//! \copydoc abs(integer_t)
+template<class Alloc, bool Threadsafe, bool Secure>
+nothrow_integer_t<Alloc, Threadsafe, Secure> abs(const nothrow_integer_t<Alloc,
+ Threadsafe, Secure> n)
+{
+ try {
+ if (n.is_nan()) return n;
+ nothrow_integer_t<Alloc, Threadsafe, Secure> r(abs(n._data()));
+ return BOOST_XINT_MOVE(r);
+ } catch (std::exception&) {
+ return n.nan();
+ }
+}
+
+/*! \copydoc divide(integer_t, integer_t)
+
+\note Returns two Not-a-Number values instead of throwing.
+*/
+template<class Alloc, bool Threadsafe, bool Secure>
+typename nothrow_integer_t<Alloc, Threadsafe, Secure>::divide_t divide(const
+ nothrow_integer_t<Alloc, Threadsafe, Secure> dividend, const
+ nothrow_integer_t<Alloc, Threadsafe, Secure> divisor)
+{
+ try {
+ if (dividend.is_nan() || divisor.is_nan())
+ return std::make_pair(dividend.nan(), dividend.nan());
+ typename nothrow_integer_t<Alloc, Threadsafe, Secure>::divide_t r;
+ divide(r.quotient._data(), r.remainder._data(), dividend._data(),
+ divisor._data());
+ return BOOST_XINT_MOVE(r);
+ } catch (std::exception&) {
+ return std::make_pair(dividend.nan(), dividend.nan());
+ }
+}
+//!@}
+
+//! \name Powers and roots
+//!@{
+
+//! \copydoc square(integer_t)
+template<class Alloc, bool Threadsafe, bool Secure>
+nothrow_integer_t<Alloc, Threadsafe, Secure> square(const nothrow_integer_t<
+ Alloc, Threadsafe, Secure> n)
+{
+ try {
+ if (n.is_nan()) return n;
+ nothrow_integer_t<Alloc, Threadsafe, Secure> r;
+ square(r._data(), n._data());
+ return BOOST_XINT_MOVE(r);
+ } catch (std::exception&) {
+ return n.nan();
+ }
+}
+
+//! \copydoc pow(integer_t, integer_t)
+template<class Alloc, bool Threadsafe, bool Secure>
+nothrow_integer_t<Alloc, Threadsafe, Secure> pow(const nothrow_integer_t<Alloc,
+ Threadsafe, Secure> n, const nothrow_integer_t<Alloc, Threadsafe, Secure> e)
+{
+ try {
+ if (n.is_nan() || e.is_nan()) return n.nan();
+ nothrow_integer_t<Alloc, Threadsafe, Secure> r;
+ pow(r._data(), n._data(), e._data());
+ return BOOST_XINT_MOVE(r);
+ } catch (std::exception&) {
+ return n.nan();
+ }
+}
+
+//! \copydoc sqrt(integer_t)
+template<class Alloc, bool Threadsafe, bool Secure>
+nothrow_integer_t<Alloc, Threadsafe, Secure> sqrt(const nothrow_integer_t<Alloc,
+ Threadsafe, Secure> n)
+{
+ try {
+ if (n.is_nan()) return n;
+ nothrow_integer_t<Alloc, Threadsafe, Secure> r;
+ sqrt(r._data(), n._data());
+ return BOOST_XINT_MOVE(r);
+ } catch (std::exception&) {
+ return n.nan();
+ }
+}
+//!@}
+
+//! \name Conversion functions
+//!@{
 
- Functions using this class do not throw exceptions, they return special
- values (most often \ref nan "Not-a-Number") to indicate failures.
+/*! \copydoc to(integer_t)
 
- There are only a few member functions; most of the functionality is
- implemented using standalone functions.
+\note Returns T(0) instead of throwing.
 */
-class nothrow_integer: public detail::base_variable_length_integer {
- public:
+template <typename Type, class Alloc, bool Threadsafe, bool Secure>
+Type to(const nothrow_integer_t<Alloc, Threadsafe, Secure> n) {
+ try {
+ if (n.is_nan()) return Type(0);
+ return to<Type>(n._data());
+ } catch (std::exception&) {
+ return Type(0);
+ }
+}
 
- //! \name Constructors & Destructors
- //!@{
- nothrow_integer();
- nothrow_integer(const nothrow_integer& b);
- nothrow_integer(BOOST_XINT_RV_REF(nothrow_integer) b) { _swap(b); }
- explicit nothrow_integer(const integer& b);
- explicit nothrow_integer(const fixed_integer_any& b);
- explicit nothrow_integer(const std::string& str, size_t base=10);
- template <typename T> nothrow_integer(const T& n,
- typename boost::enable_if<boost::is_integral<T> >::type* = 0,
- typename boost::enable_if<boost::is_signed<T> >::type* = 0);
- template <typename T> nothrow_integer(const T& n,
- typename boost::enable_if<boost::is_integral<T> >::type* = 0,
- typename boost::enable_if<boost::is_unsigned<T> >::type* = 0);
- //!@}
+/*! \copydoc to_string(integer_t, size_t, bool)
 
- /*! \name Mathematical and Bitwise Operators
- \brief These operate exactly like their counterparts for the built-in
- %integer types.
+\note Returns an empty string instead of throwing.
+*/
+template<class Alloc, bool Threadsafe, bool Secure>
+std::string to_string(const nothrow_integer_t<Alloc, Threadsafe, Secure> n,
+ size_t base = 10, bool uppercase = false)
+{
+ try {
+ if (n.is_nan()) return n._nan_text();
+ return to_string(n._data(), base, uppercase);
+ } catch (std::exception&) {
+ return std::string();
+ }
+}
 
- Note that there is no \c operator~. Since the nothrow_integer type
- doesn't have a fixed maximum size, there is no logical way to implement
- it.
- */
- //@{
- nothrow_integer& operator=(BOOST_XINT_COPY_ASSIGN_REF(nothrow_integer) c);
- nothrow_integer& operator=(BOOST_XINT_RV_REF(nothrow_integer) c) { _swap(c);
- return *this; }
- template <typename T> nothrow_integer& operator=(const T& n) {
- nothrow_integer nn(n); _swap(nn); return *this; }
+/*! \copydoc to_binary(integer_t, size_t)
 
- bool operator!() const { return _is_zero(); }
- nothrow_integer operator-() const;
- nothrow_integer& operator+() { return *this; }
- const nothrow_integer& operator+() const { return *this; }
-
- nothrow_integer& operator+=(const nothrow_integer& b);
- nothrow_integer& operator-=(const nothrow_integer& b);
- nothrow_integer& operator*=(const nothrow_integer& b);
- nothrow_integer& operator/=(const nothrow_integer& b);
- nothrow_integer& operator%=(const nothrow_integer& b);
-
- nothrow_integer& operator++(); //!< \details Preincrement operator
- nothrow_integer& operator--(); //!< \details Predecrement operator
- nothrow_integer operator++(int); //!< \details Postincrement operator -- not recommended, inefficient
- nothrow_integer operator--(int); //!< \details Postdecrement operator -- not recommended, inefficient
-
- nothrow_integer& operator&=(const nothrow_integer& n);
- nothrow_integer& operator|=(const nothrow_integer& n);
- nothrow_integer& operator^=(const nothrow_integer& n);
- nothrow_integer operator<<(size_t shift) const;
- nothrow_integer operator>>(size_t shift) const;
- nothrow_integer& operator<<=(size_t shift);
- nothrow_integer& operator>>=(size_t shift);
- //@}
+\note Returns an empty \c binary_t object instead of throwing. Note that a zero
+value will also return an empty \c binary_t object.
+*/
+template<class Alloc, bool Threadsafe, bool Secure>
+xint::binary_t to_binary(const nothrow_integer_t<Alloc, Threadsafe, Secure> n,
+ size_t bits = 0)
+{
+ try {
+ if (n.is_nan()) return xint::binary_t();
+ return to_binary(n._data(), bits);
+ } catch (std::exception&) {
+ return xint::binary_t();
+ }
+}
+//!@}
 
- //! \name Miscellaneous Functions
- //!@{
- bool odd() const;
- bool even() const;
- int sign(bool signed_zero=false) const;
- bool is_nan() const;
+//! \name Bit-manipulation functions
+//!@{
 
- size_t hex_digits() const;
- //!@}
+/*! \copydoc getbit(const integer_t, size_t)
 
- /*! \name Preconstructed integers
+\note Returns false instead of throwing.
+*/
+template<class Alloc, bool Threadsafe, bool Secure>
+bool getbit(const nothrow_integer_t<Alloc, Threadsafe, Secure> n, size_t bit) {
+ try {
+ if (n.is_nan()) return false;
+ return getbit(n._data(), bit);
+ } catch (std::exception&) {
+ return false;
+ }
+}
 
- These return preconstructed integers with the values named by the
- functions. They are used internally, so that the most common values
- don't have to be constructed each time they're needed.
- */
- //@{
- static const nothrow_integer& zero();
- static const nothrow_integer& one();
- static const nothrow_integer& nan();
- //@}
+/*! \copydoc setbit(integer_t&, size_t)
 
- //! \brief For internal use only.
- void _make_unique(bool);
+\note Does nothing instead of throwing.
+*/
+template<class Alloc, bool Threadsafe, bool Secure>
+void setbit(nothrow_integer_t<Alloc, Threadsafe, Secure>& n, size_t bit) {
+ try {
+ if (!n.is_nan()) setbit(n._data(), bit);
+ } catch (std::exception&) {
+ // Do nothing.
+ }
+}
 
- typedef base_divide_t<nothrow_integer> divide_t;
+/*! \copydoc clearbit(integer_t&, size_t)
 
- private:
- BOOST_XINT_COPYABLE_AND_MOVABLE(nothrow_integer)
+\note Does nothing instead of throwing.
+*/
+template<class Alloc, bool Threadsafe, bool Secure>
+void clearbit(nothrow_integer_t<Alloc, Threadsafe, Secure>& n, size_t bit) {
+ try {
+ if (!n.is_nan()) clearbit(n._data(), bit);
+ } catch (std::exception&) {
+ // Do nothing.
+ }
+}
 
- static std::auto_ptr<nothrow_integer> cZero, cOne, cNaN;
-};
+/*! \copydoc lowestbit(integer_t, size_t)
 
-//! \name Mathematical primitives
-//!@{
-nothrow_integer abs(const nothrow_integer& n);
-nothrow_integer negate(const nothrow_integer& n);
-nothrow_integer add(const nothrow_integer& n, const nothrow_integer& addend);
-nothrow_integer subtract(const nothrow_integer& n, const nothrow_integer&
- subtrahend);
-nothrow_integer multiply(const nothrow_integer& n, const nothrow_integer&
- multiplicand);
-nothrow_integer divide(const nothrow_integer& dividend, const nothrow_integer&
- divisor);
-nothrow_integer::divide_t divide_r(const nothrow_integer& dividend, const
- nothrow_integer& divisor);
-//!@}
+\note Returns \c return_if_zero instead of throwing.
+*/
+template<class Alloc, bool Threadsafe, bool Secure>
+size_t lowestbit(const nothrow_integer_t<Alloc, Threadsafe, Secure> n, size_t
+ return_if_zero = 0)
+{
+ try {
+ if (n.is_nan()) return return_if_zero;
+ return lowestbit(n._data(), return_if_zero);
+ } catch (std::exception&) {
+ return return_if_zero;
+ }
+}
 
-////////////////////////////////////////////////////////////////////////////////
+/*! \copydoc highestbit(integer_t, size_t)
 
-//! \name Powers and roots
-//!@{
-nothrow_integer sqr(const nothrow_integer& n);
-nothrow_integer pow(const nothrow_integer& n, const nothrow_integer& exponent);
-nothrow_integer nothrow_pow2(size_t exponent);
-nothrow_integer nothrow_factorial(size_t n);
-nothrow_integer sqrt(const nothrow_integer& n);
+\note Returns \c return_if_zero instead of throwing.
+*/
+template<class Alloc, bool Threadsafe, bool Secure>
+size_t highestbit(const nothrow_integer_t<Alloc, Threadsafe, Secure> n, size_t
+ return_if_zero = 0)
+{
+ try {
+ if (n.is_nan()) return return_if_zero;
+ return highestbit(n._data(), return_if_zero);
+ } catch (std::exception&) {
+ return return_if_zero;
+ }
+}
 //!@}
 
-////////////////////////////////////////////////////////////////////////////////
-
-//! \name Conversion functions
+//! \name Modular math functions
 //!@{
-template <typename T> T to(const nothrow_integer& n);
-std::string to_string(const nothrow_integer& n, size_t base=10, bool upperCase =
- false);
-nothrow_integer nothrow_from_string(const std::string& str, size_t base=10);
-xint::binary_t to_binary(const nothrow_integer& n, size_t bits=0);
-nothrow_integer nothrow_from_binary(const xint::binary_t& s, size_t bits=0);
-//!@}
 
-////////////////////////////////////////////////////////////////////////////////
+//! \copydoc mulmod(integer_t, integer_t, integer_t)
+template<class Alloc, bool Threadsafe, bool Secure>
+nothrow_integer_t<Alloc, Threadsafe, Secure> mulmod(const nothrow_integer_t<
+ Alloc, Threadsafe, Secure> n, const nothrow_integer_t<Alloc, Threadsafe,
+ Secure> by, const nothrow_integer_t<Alloc, Threadsafe, Secure> modulus)
+{
+ try {
+ if (n.is_nan() || by.is_nan() || modulus.is_nan()) return n.nan();
+ nothrow_integer_t<Alloc, Threadsafe, Secure> r;
+ mulmod(r._data(), n._data(), by._data(), modulus._data());
+ return BOOST_XINT_MOVE(r);
+ } catch (std::exception&) {
+ return n.nan();
+ }
+}
 
-//! \name Bit-manipulation functions
-//!@{
-bool getbit(const nothrow_integer& n, size_t bit);
-void setbit(nothrow_integer& n, size_t bit);
-void clearbit(nothrow_integer& n, size_t bit);
-size_t lowestbit(const nothrow_integer& n, size_t valueIfZero=0);
-size_t highestbit(const nothrow_integer& n, size_t valueIfZero=0);
-nothrow_integer bitwise_and(const nothrow_integer& n1, const nothrow_integer&
- n2);
-nothrow_integer bitwise_or (const nothrow_integer& n1, const nothrow_integer&
- n2);
-nothrow_integer bitwise_xor(const nothrow_integer& n1, const nothrow_integer&
- n2);
-nothrow_integer shift(const nothrow_integer& n, int byBits);
-nothrow_integer shift_left(const nothrow_integer& n, size_t byBits);
-nothrow_integer shift_right(const nothrow_integer& n, size_t byBits);
+//! \copydoc sqrmod(integer_t, integer_t)
+template<class Alloc, bool Threadsafe, bool Secure>
+nothrow_integer_t<Alloc, Threadsafe, Secure> sqrmod(const nothrow_integer_t<
+ Alloc, Threadsafe, Secure> n, const nothrow_integer_t<Alloc, Threadsafe,
+ Secure> modulus)
+{
+ try {
+ if (n.is_nan() || modulus.is_nan()) return n.nan();
+ nothrow_integer_t<Alloc, Threadsafe, Secure> r;
+ sqrmod(r._data(), n._data(), modulus._data());
+ return BOOST_XINT_MOVE(r);
+ } catch (std::exception&) {
+ return n.nan();
+ }
+}
+
+//! \copydoc powmod(integer_t, integer_t, integer_t, bool)
+template<class Alloc, bool Threadsafe, bool Secure>
+nothrow_integer_t<Alloc, Threadsafe, Secure> powmod(const nothrow_integer_t<
+ Alloc, Threadsafe, Secure> n, const nothrow_integer_t<Alloc, Threadsafe,
+ Secure> exponent, const nothrow_integer_t<Alloc, Threadsafe, Secure>
+ modulus, bool no_monty)
+{
+ try {
+ if (n.is_nan() || exponent.is_nan() || modulus.is_nan()) return n.nan();
+ nothrow_integer_t<Alloc, Threadsafe, Secure> r;
+ powmod(r._data(), n._data(), exponent._data(), modulus._data(),
+ no_monty);
+ return BOOST_XINT_MOVE(r);
+ } catch (std::exception&) {
+ return n.nan();
+ }
+}
+
+//! \copydoc invmod(integer_t, integer_t)
+template<class Alloc, bool Threadsafe, bool Secure>
+nothrow_integer_t<Alloc, Threadsafe, Secure> invmod(const nothrow_integer_t<
+ Alloc, Threadsafe, Secure> n, const nothrow_integer_t<Alloc, Threadsafe,
+ Secure> modulus)
+{
+ try {
+ if (n.is_nan() || modulus.is_nan()) return n.nan();
+ nothrow_integer_t<Alloc, Threadsafe, Secure> r;
+ invmod(r._data(), n._data(), modulus._data());
+ return BOOST_XINT_MOVE(r);
+ } catch (std::exception&) {
+ return n.nan();
+ }
+}
 //!@}
 
-////////////////////////////////////////////////////////////////////////////////
+//! \name Random and prime number functions
+//!@{
 
-/*! \name Modular math functions
+/*! \copydoc is_prime(integer_t, callback_t)
 
-A common reason to use a large-integer library is to implement public-key
-encryption, and the algorithms for such encryption often use modular math.
+\note Returns -2 instead of throwing.
 */
-//!@{
-nothrow_integer mod(const nothrow_integer& n, const nothrow_integer& modBy);
-nothrow_integer mulmod(const nothrow_integer& n, const nothrow_integer& by,
- const nothrow_integer& modulus);
-nothrow_integer sqrmod(const nothrow_integer& n, const nothrow_integer&
- modulus);
-nothrow_integer powmod(const nothrow_integer& n, const nothrow_integer&
- exponent, const nothrow_integer& modulus, bool noMontgomery=false);
-nothrow_integer invmod(const nothrow_integer& n, const nothrow_integer&
- modulus);
+template<class Alloc, bool Threadsafe, bool Secure>
+int is_prime(const nothrow_integer_t<Alloc, Threadsafe, Secure> n, callback_t
+ callback = no_callback)
+{
+ try {
+ if (n.is_nan()) return -2;
+ return is_prime(n._data(), callback);
+ } catch (std::exception&) {
+ return -2;
+ }
+}
 //!@}
 
-////////////////////////////////////////////////////////////////////////////////
-
-//! \name Random number functions
+//! \name Comparison Operators
 //!@{
-template <class T>
-nothrow_integer nothrow_random_by_size(T& gen, size_t sizeInBits, bool
- highBitOn = false, bool lowBitOn = false, bool canBeNegative = false);
-//!@}
 
-////////////////////////////////////////////////////////////////////////////////
+template<class Alloc, bool Threadsafe, bool Secure> bool
+ operator<(const nothrow_integer_t<Alloc, Threadsafe, Secure> n1, const
+ nothrow_integer_t<Alloc, Threadsafe, Secure> n2)
+{
+ if (n1.is_nan() || n2.is_nan()) return false;
+ try {
+ return operator<(n1._data(), n2._data());
+ } catch (std::exception&) {
+ return false;
+ }
+}
 
-//! \name Prime number functions
-//!@{
-int is_prime(const nothrow_integer& n, callback_t callback=no_callback);
-template <class T>
-nothrow_integer nothrow_random_prime(T& gen, size_t sizeInBits, callback_t
- callback = no_callback);
-//!@}
+template<class Alloc, bool Threadsafe, bool Secure> bool
+ operator>(const nothrow_integer_t<Alloc, Threadsafe, Secure> n1, const
+ nothrow_integer_t<Alloc, Threadsafe, Secure> n2)
+{
+ if (n1.is_nan() || n2.is_nan()) return false;
+ try {
+ return operator>(n1._data(), n2._data());
+ } catch (std::exception&) {
+ return false;
+ }
+}
 
-////////////////////////////////////////////////////////////////////////////////
+template<class Alloc, bool Threadsafe, bool Secure> bool
+ operator<=(const nothrow_integer_t<Alloc, Threadsafe, Secure> n1, const
+ nothrow_integer_t<Alloc, Threadsafe, Secure> n2)
+{
+ if (n1.is_nan() || n2.is_nan()) return false;
+ try {
+ return operator<=(n1._data(), n2._data());
+ } catch (std::exception&) {
+ return false;
+ }
+}
 
-/*! \name Operators
+template<class Alloc, bool Threadsafe, bool Secure> bool
+ operator>=(const nothrow_integer_t<Alloc, Threadsafe, Secure> n1, const
+ nothrow_integer_t<Alloc, Threadsafe, Secure> n2)
+{
+ if (n1.is_nan() || n2.is_nan()) return false;
+ try {
+ return operator>=(n1._data(), n2._data());
+ } catch (std::exception&) {
+ return false;
+ }
+}
 
- These act exactly the same as for the built-in %integer types.
-*/
-//!@{
-bool operator<(const nothrow_integer& n1, const nothrow_integer& n2);
-bool operator>(const nothrow_integer& n1, const nothrow_integer& n2);
-bool operator<=(const nothrow_integer& n1, const nothrow_integer& n2);
-bool operator>=(const nothrow_integer& n1, const nothrow_integer& n2);
-bool operator==(const nothrow_integer& n1, const nothrow_integer& n2);
-bool operator!=(const nothrow_integer& n1, const nothrow_integer& n2);
-
-nothrow_integer operator+(const nothrow_integer& n1, const nothrow_integer& n2);
-nothrow_integer operator-(const nothrow_integer& n1, const nothrow_integer& n2);
-nothrow_integer operator*(const nothrow_integer& n1, const nothrow_integer& n2);
-nothrow_integer operator/(const nothrow_integer& n1, const nothrow_integer& n2);
-nothrow_integer operator%(const nothrow_integer& n1, const nothrow_integer& n2);
-nothrow_integer operator&(const nothrow_integer& n1, const nothrow_integer& n2);
-nothrow_integer operator|(const nothrow_integer& n1, const nothrow_integer& n2);
-nothrow_integer operator^(const nothrow_integer& n1, const nothrow_integer& n2);
-//!@}
+template<class Alloc, bool Threadsafe, bool Secure> bool
+ operator==(const nothrow_integer_t<Alloc, Threadsafe, Secure> n1, const
+ nothrow_integer_t<Alloc, Threadsafe, Secure> n2)
+{
+ if (n1.is_nan() || n2.is_nan()) return false;
+ try {
+ return operator==(n1._data(), n2._data());
+ } catch (std::exception&) {
+ return false;
+ }
+}
 
-////////////////////////////////////////////////////////////////////////////////
+template<class Alloc, bool Threadsafe, bool Secure> bool
+ operator!=(const nothrow_integer_t<Alloc, Threadsafe, Secure> n1, const
+ nothrow_integer_t<Alloc, Threadsafe, Secure> n2)
+{
+ if (n1.is_nan() || n2.is_nan()) return false;
+ try {
+ return operator!=(n1._data(), n2._data());
+ } catch (std::exception&) {
+ return false;
+ }
+}
+//!@}
 
-//! \name Miscellaneous functions
+//! \name Mathematical and Bitwise Operators
 //!@{
-int compare(const nothrow_integer &n1, const nothrow_integer &n2, bool
- ignoresign=false);
-size_t log2(const nothrow_integer& n);
-nothrow_integer gcd(const nothrow_integer& num1, const nothrow_integer& num2);
-nothrow_integer lcm(const nothrow_integer& num1, const nothrow_integer& num2);
-//!@}
 
-////////////////////////////////////////////////////////////////////////////////
-// Template function definitions
+//! \copydoc operator+(integer_t, integer_t)
+template<class Alloc, bool Threadsafe, bool Secure>
+nothrow_integer_t<Alloc, Threadsafe, Secure> operator+(const nothrow_integer_t<
+ Alloc, Threadsafe, Secure> n1, const nothrow_integer_t<Alloc, Threadsafe,
+ Secure> n2)
+{
+ if (n1.is_nan() || n2.is_nan()) return false;
+ try {
+ nothrow_integer_t<Alloc, Threadsafe, Secure> r(n1._data() + n2._data());
+ return BOOST_XINT_MOVE(r);
+ } catch (std::exception&) {
+ return n1.nan();
+ }
+}
 
-/*!
- Constructs a new nothrow_integer object with the value of the built-in
- signed %integer passed to it.
+//! \copydoc operator-(integer_t, integer_t)
+template<class Alloc, bool Threadsafe, bool Secure>
+nothrow_integer_t<Alloc, Threadsafe, Secure> operator-(const nothrow_integer_t<
+ Alloc, Threadsafe, Secure> n1, const nothrow_integer_t<Alloc, Threadsafe,
+ Secure> n2)
+{
+ if (n1.is_nan() || n2.is_nan()) return false;
+ try {
+ nothrow_integer_t<Alloc, Threadsafe, Secure> r(n1._data() - n2._data());
+ return BOOST_XINT_MOVE(r);
+ } catch (std::exception&) {
+ return n1.nan();
+ }
+}
 
- \param[in] n A number of type \c T.
- \tparam T The type of \c n.
+//! \copydoc operator*(integer_t, integer_t)
+template<class Alloc, bool Threadsafe, bool Secure>
+nothrow_integer_t<Alloc, Threadsafe, Secure> operator*(const
+ nothrow_integer_t<Alloc, Threadsafe, Secure> n1, const nothrow_integer_t<
+ Alloc, Threadsafe, Secure> n2)
+{
+ if (n1.is_nan() || n2.is_nan()) return false;
+ try {
+ nothrow_integer_t<Alloc, Threadsafe, Secure> r(n1._data() * n2._data());
+ return BOOST_XINT_MOVE(r);
+ } catch (std::exception&) {
+ return n1.nan();
+ }
+}
 
- You can ignore the \c enable_if parameters, they are there only to tell
- the compiler what types it applies to.
+//! \copydoc operator/(integer_t, integer_t)
+template<class Alloc, bool Threadsafe, bool Secure>
+nothrow_integer_t<Alloc, Threadsafe, Secure> operator/(const nothrow_integer_t<
+ Alloc, Threadsafe, Secure> dividend, const nothrow_integer_t<Alloc,
+ Threadsafe, Secure> divisor)
+{
+ if (dividend.is_nan() || divisor.is_nan()) return false;
+ try {
+ nothrow_integer_t<Alloc, Threadsafe, Secure> r(dividend._data() /
+ divisor._data());
+ return BOOST_XINT_MOVE(r);
+ } catch (std::exception&) {
+ return dividend.nan();
+ }
+}
 
- \overload
-*/
-template <typename T> nothrow_integer::nothrow_integer(const T& n,
- typename boost::enable_if<boost::is_integral<T> >::type*,
- typename boost::enable_if<boost::is_signed<T> >::type*)
+//! \copydoc operator%(integer_t, integer_t)
+template<class Alloc, bool Threadsafe, bool Secure>
+nothrow_integer_t<Alloc, Threadsafe, Secure> operator%(const nothrow_integer_t<
+ Alloc, Threadsafe, Secure> n1, const nothrow_integer_t<Alloc, Threadsafe,
+ Secure> n2)
+{
+ if (n1.is_nan() || n2.is_nan()) return false;
+ try {
+ nothrow_integer_t<Alloc, Threadsafe, Secure> r(n1._data() % n2._data());
+ return BOOST_XINT_MOVE(r);
+ } catch (std::exception&) {
+ return n1.nan();
+ }
+}
+
+//! \copydoc operator&(integer_t, integer_t)
+template<class Alloc, bool Threadsafe, bool Secure>
+nothrow_integer_t<Alloc, Threadsafe, Secure> operator&(const nothrow_integer_t<
+ Alloc, Threadsafe, Secure> n1, const nothrow_integer_t<Alloc, Threadsafe,
+ Secure> n2)
 {
+ if (n1.is_nan() || n2.is_nan()) return false;
     try {
- _set_signed(n);
+ nothrow_integer_t<Alloc, Threadsafe, Secure> r(n1._data() & n2._data());
+ return BOOST_XINT_MOVE(r);
     } catch (std::exception&) {
- _base_attach(0);
+ return n1.nan();
     }
 }
 
-/*!
- Constructs a new nothrow_integer object with the value of the built-in
- unsigned %integer passed to it.
+//! \copydoc operator|(integer_t, integer_t)
+template<class Alloc, bool Threadsafe, bool Secure>
+nothrow_integer_t<Alloc, Threadsafe, Secure> operator|(const nothrow_integer_t<
+ Alloc, Threadsafe, Secure> n1, const nothrow_integer_t<Alloc, Threadsafe,
+ Secure> n2)
+{
+ if (n1.is_nan() || n2.is_nan()) return false;
+ try {
+ nothrow_integer_t<Alloc, Threadsafe, Secure> r(n1._data() | n2._data());
+ return BOOST_XINT_MOVE(r);
+ } catch (std::exception&) {
+ return n1.nan();
+ }
+}
+
+//! \copydoc operator^(integer_t, integer_t)
+template<class Alloc, bool Threadsafe, bool Secure>
+nothrow_integer_t<Alloc, Threadsafe, Secure> operator^(const nothrow_integer_t<
+ Alloc, Threadsafe, Secure> n1, const nothrow_integer_t<Alloc, Threadsafe,
+ Secure> n2)
+{
+ if (n1.is_nan() || n2.is_nan()) return false;
+ try {
+ nothrow_integer_t<Alloc, Threadsafe, Secure> r(n1._data() ^ n2._data());
+ return BOOST_XINT_MOVE(r);
+ } catch (std::exception&) {
+ return n1.nan();
+ }
+}
+//!@}
 
- \param[in] n A number of type \c T.
- \tparam T The type of \c n.
+//! \name Miscellaneous functions
+//!@{
 
- You can ignore the \c enable_if parameters, they are there only to tell
- the compiler what types it applies to.
+//! \copydoc gcd(integer_t, integer_t)
+template<class Alloc, bool Threadsafe, bool Secure>
+nothrow_integer_t<Alloc, Threadsafe, Secure> gcd(const nothrow_integer_t<Alloc,
+ Threadsafe, Secure> num1, const nothrow_integer_t<Alloc, Threadsafe, Secure>
+ num2)
+{
+ if (num1.is_nan() || num2.is_nan()) return num1.nan();
+ try {
+ nothrow_integer_t<Alloc, Threadsafe, Secure> r;
+ gcd(r._data(), num1._data(), num2._data());
+ return BOOST_XINT_MOVE(r);
+ } catch (std::exception&) {
+ return num1.nan();
+ }
+}
 
- \overload
+//! \copydoc lcm(integer_t, integer_t)
+template<class Alloc, bool Threadsafe, bool Secure>
+nothrow_integer_t<Alloc, Threadsafe, Secure> lcm(const nothrow_integer_t<Alloc,
+ Threadsafe, Secure> num1, const nothrow_integer_t<Alloc, Threadsafe, Secure>
+ num2)
+{
+ if (num1.is_nan() || num2.is_nan()) return num1.nan();
+ try {
+ nothrow_integer_t<Alloc, Threadsafe, Secure> r;
+ lcm(r._data(), num1._data(), num2._data());
+ return BOOST_XINT_MOVE(r);
+ } catch (std::exception&) {
+ return num1.nan();
+ }
+}
+
+/*! \copydoc compare(integer_t, integer_t, bool)
+
+\note Returns 2 instead of throwing, so say that the items are not equal.
 */
-template <typename T> nothrow_integer::nothrow_integer(const T& n,
- typename boost::enable_if<boost::is_integral<T> >::type*,
- typename boost::enable_if<boost::is_unsigned<T> >::type*)
+template<class Alloc, bool Threadsafe, bool Secure>
+int compare(const nothrow_integer_t<Alloc, Threadsafe, Secure> n1, const
+ nothrow_integer_t<Alloc, Threadsafe, Secure> n2, bool ignoresign = false)
 {
+ if (n1.is_nan() || n2.is_nan()) return 2;
     try {
- _set_unsigned(n);
+ return compare(n1._data(), n2._data(), ignoresign);
     } catch (std::exception&) {
- _base_attach(0);
+ return 2;
     }
 }
 
-/*! \copydoc xint::to
+/*! \copydoc log2(integer_t)
 
-\note Returns T(0) instead of throwing.
+\note Returns zero instead of throwing.
 */
-template <typename T>
-T to(const nothrow_integer& n) {
+template<class Alloc, bool Threadsafe, bool Secure>
+size_t log2(const nothrow_integer_t<Alloc, Threadsafe, Secure> n) {
     try {
- return detail::to<T>(n);
+ return (n.is_nan() ? 0 : log2(n._data()));
     } catch (std::exception&) {
         return 0;
     }
 }
+//!@}
+
+//! Allows for comparisons between nothrow_integer_t types and other integral
+//! values.
+#define BOOST_XINT_NOTHROW_ANY_COMPARE(rtype, op) \
+ template <class Alloc, bool Threadsafe, bool Secure, typename N> \
+ rtype op(const nothrow_integer_t<Alloc, Threadsafe, Secure> n1, const N \
+ n2) \
+ { \
+ return op(n1, nothrow_integer_t<Alloc, Threadsafe, Secure>(n2)); \
+ } \
+ \
+ template <typename N, class Alloc, bool Threadsafe, bool Secure> \
+ rtype op(const N n1, const nothrow_integer_t<Alloc, Threadsafe, Secure> \
+ n2) \
+ { \
+ return op(nothrow_integer_t<Alloc, Threadsafe, Secure>(n1), n2); \
+ }
+
+BOOST_XINT_NOTHROW_ANY_COMPARE(bool, operator<)
+BOOST_XINT_NOTHROW_ANY_COMPARE(bool, operator>)
+BOOST_XINT_NOTHROW_ANY_COMPARE(bool, operator<=)
+BOOST_XINT_NOTHROW_ANY_COMPARE(bool, operator>=)
+BOOST_XINT_NOTHROW_ANY_COMPARE(bool, operator==)
+BOOST_XINT_NOTHROW_ANY_COMPARE(bool, operator!=)
+BOOST_XINT_NOTHROW_ANY_COMPARE(int, compare)
+
+//! Allows for operations between nothrow_integer_t types and other integral
+//! values.
+#define BOOST_XINT_NOTHROW_ANY_MATH(op) \
+ template <class Alloc, bool Threadsafe, bool Secure, typename N> \
+ nothrow_integer_t<Alloc, Threadsafe, Secure> op(const nothrow_integer_t< \
+ Alloc, Threadsafe, Secure> n1, const N n2) \
+ { \
+ nothrow_integer_t<Alloc, Threadsafe, Secure> r(op(n1, \
+ nothrow_integer_t<Alloc, Threadsafe, Secure>(n2))); \
+ return BOOST_XINT_MOVE(r); \
+ } \
+ \
+ template <typename N, class Alloc, bool Threadsafe, bool Secure> \
+ nothrow_integer_t<Alloc, Threadsafe, Secure> op(const N n1, const \
+ nothrow_integer_t<Alloc, Threadsafe, Secure> n2) \
+ { \
+ nothrow_integer_t<Alloc, Threadsafe, Secure> r(op(nothrow_integer_t< \
+ Alloc, Threadsafe, Secure>(n1), n2)); \
+ return BOOST_XINT_MOVE(r); \
+ }
+
+BOOST_XINT_NOTHROW_ANY_MATH(pow)
+BOOST_XINT_NOTHROW_ANY_MATH(mulmod)
+BOOST_XINT_NOTHROW_ANY_MATH(sqrmod)
+BOOST_XINT_NOTHROW_ANY_MATH(powmod)
+BOOST_XINT_NOTHROW_ANY_MATH(invmod)
+BOOST_XINT_NOTHROW_ANY_MATH(operator+)
+BOOST_XINT_NOTHROW_ANY_MATH(operator-)
+BOOST_XINT_NOTHROW_ANY_MATH(operator*)
+BOOST_XINT_NOTHROW_ANY_MATH(operator/)
+BOOST_XINT_NOTHROW_ANY_MATH(operator%)
+BOOST_XINT_NOTHROW_ANY_MATH(operator&)
+BOOST_XINT_NOTHROW_ANY_MATH(operator|)
+BOOST_XINT_NOTHROW_ANY_MATH(operator^)
+BOOST_XINT_NOTHROW_ANY_MATH(gcd)
+BOOST_XINT_NOTHROW_ANY_MATH(lcm)
 
 //! \name Stream input/output functions
 //!@{
-template <typename charT, typename traits>
-inline std::basic_ostream<charT,traits>& operator<<(std::basic_ostream<charT,
- traits>& out, const nothrow_integer& n)
-{
- if (n.is_nan()) {
- out << detail::nan_text;
- return out;
- } else {
- return detail::operator<<(out, n);
- }
+template <typename charT, typename traits, class Alloc, bool
+ Threadsafe, bool Secure> inline std::basic_ostream<charT,traits>&
+ operator<<(std::basic_ostream<charT, traits>& out, const nothrow_integer_t<
+ Alloc, Threadsafe, Secure> n)
+{
+ if (n.is_nan()) return operator<<(out, n._nan_text());
+ return operator<<(out, n._data());
 }
 
-template <typename charT, typename traits>
-inline std::basic_istream<charT,traits>& operator>>(std::basic_istream<charT,
- traits>& in, nothrow_integer& n)
+template <typename charT, typename traits, class Alloc, bool
+ Threadsafe, bool Secure> inline std::basic_istream<charT,traits>&
+ operator>>(std::basic_istream<charT, traits>& in, nothrow_integer_t<Alloc,
+ Threadsafe, Secure>& n)
 {
     if (in.peek()=='#') {
         // Must be either #NaN# or an error
@@ -349,44 +1342,27 @@
 
         std::string str(buffer);
 
- if (str==detail::nan_text) n=nothrow_integer::nan();
+ if (str == n._nan_text()) n = n.nan();
         else in.setstate(std::ios::failbit);
         return in;
     } else {
- return detail::operator>>(in, n);
+ return operator>>(in, n._data());
     }
 }
 //!@}
 
-//! \copydoc xint::random_by_size
-template <class T>
-nothrow_integer nothrow_random_by_size(T& gen, size_t bits, bool high_bit_on,
- bool low_bit_on, bool can_be_negative)
+template<class Alloc, bool Threadsafe, bool Secure>
+inline void swap(nothrow_integer_t<Alloc, Threadsafe, Secure>& left,
+ nothrow_integer_t<Alloc, Threadsafe, Secure>& right)
 {
- try {
- return nothrow_integer(xint::random_by_size(gen, bits, high_bit_on,
- low_bit_on, can_be_negative));
- } catch (std::exception&) {
- return nothrow_integer::nan();
- }
+ left._swap(right);
 }
 
-//! \copydoc xint::random_prime
-template <class T>
-nothrow_integer nothrow_random_prime(T& gen, size_t size_in_bits, callback_t
- callback)
-{
- try {
- nothrow_integer r(xint::random_prime(gen, size_in_bits, callback));
- return BOOST_XINT_MOVE(r);
- } catch (std::exception&) {
- return nothrow_integer::nan();
- }
-}
+/*! \brief The default nothrow_integer type.
 
-inline void swap(nothrow_integer& left, nothrow_integer& right) {
- left._swap(right);
-}
+ This uses the default parameters for the nothrow_integer_t template.
+*/
+typedef nothrow_integer_t<> nothrow_integer;
 
 } // namespace xint
 } // namespace boost
@@ -436,4 +1412,9 @@
 };
 } // namespace std
 
+#ifdef _WIN32
+ // Return the warning setting to its original value.
+ #pragma warning(pop)
+#endif
+
 #endif // BOOST_INCLUDED_XINT_NOTHROW_INTEGER_HPP

Modified: sandbox/xint/boost/xint/random.hpp
==============================================================================
--- sandbox/xint/boost/xint/random.hpp (original)
+++ sandbox/xint/boost/xint/random.hpp 2010-05-31 20:43:54 EDT (Mon, 31 May 2010)
@@ -18,7 +18,8 @@
 #ifndef BOOST_INCLUDED_XINT_RANDOM_HPP
 #define BOOST_INCLUDED_XINT_RANDOM_HPP
 
-#include "internals.hpp"
+#include "detail/internals.hpp"
+#include <ctime>
 #include <boost/random/uniform_int.hpp>
 #include <boost/random/variate_generator.hpp>
 #include <boost/random/mersenne_twister.hpp>
@@ -26,48 +27,32 @@
 namespace boost {
 namespace xint {
 
-/*! \brief A convenience class for cryptographically-secure random numbers.
-
- \see \ref random
- \see \ref boost::xint::random_by_size
- \see \ref boost::xint::random_prime
-*/
-class strong_random_generator {
- public:
- typedef unsigned int result_type;
-
- strong_random_generator();
- ~strong_random_generator();
- result_type operator()();
-
- static const bool has_fixed_range;
- static const result_type min_value;
- static const result_type max_value;
- result_type min() const;
- result_type max() const;
- double entropy() const;
-
- private:
- struct impl_t;
- impl_t *impl;
-};
-
-/*! \brief A convenience class for general-purpose (insecure) random numbers.
+namespace detail {
+//! @cond detail
 
- This is nothing more than a very thin shell around one of the faster
- pseudo-random number generators provided by Boost.Random.
+ // This is a template only so that the static member variables don't cause
+ // problems in header-only mode.
+ template <typename T = void>
+ class strong_random_generator_t {
+ public:
+ typedef unsigned int result_type;
 
- \see \ref random
- \see \ref boost::xint::random_by_size
- \see \ref boost::xint::random_prime
-*/
-class default_random_generator: public boost::mt19937 {
- public:
- default_random_generator(): mt19937(time(0)+clock()) { }
-};
+ strong_random_generator_t();
+ ~strong_random_generator_t();
+ result_type operator()();
+
+ static const bool has_fixed_range;
+ static const result_type min_value;
+ static const result_type max_value;
+ result_type min() const;
+ result_type max() const;
+ double entropy() const;
+
+ private:
+ struct impl_t;
+ impl_t *impl;
+ };
 
-//! @cond detail
-namespace detail {
     //! The base class for random_generator.
     struct base_random_generator {
         typedef unsigned int result_type;
@@ -87,81 +72,35 @@
         gen_t gen;
     };
 
- integer random_by_size(base_random_generator& gen, size_t bits, bool
- high_bit_on, bool low_bit_on, bool can_be_negative);
- integer random_prime(base_random_generator& gen, size_t size_in_bits,
- callback_t callback);
-} // namespace detail
-//! @endcond detail
-
-////////////////////////////////////////////////////////////////////////////////
-// Template function definitions
-
-/*! \brief Generates a random integer with specific attributes.
+ void random_by_size(data_t& target, base_random_generator& gen, size_t bits,
+ bool high_bit_on, bool low_bit_on, bool can_be_negative);
+ void random_prime(data_t& target, base_random_generator& gen, size_t
+ size_in_bits, callback_t callback = no_callback);
 
-- Complexity: O(n)
+//! @endcond detail
+} // namespace detail
 
-\param[in] gen The random number generator to use. This can be
-boost::xint::default_random_generator, boost::xint::strong_random_generator, or
-any other class that supplies the member functions required by the Boost.Random
-random number generators.
-\param[in] bits The maximum number of bits that you want the returned number to
-have.
-\param[in] high_bit_on If \c true, the returned number will have exactly the
-requested size. If \c false, the upper bits may be zero, resulting in a number
-that is slightly smaller than requested.
-\param[in] low_bit_on If \c true, the returned number will always be odd. If
-\c false, it has an equal chance of being odd or even.
-\param[in] can_be_negative If \c true, the returned value has an equal chance
-of being positive or negative. If \c false, it will always be positive.
+/*! \brief A convenience class for general-purpose (insecure) random numbers.
 
-\returns A random integer with the requested attributes.
+ This is nothing more than a very thin shell around one of the faster
+ pseudo-random number generators provided by Boost.Random.
 
-\see \ref random
+ \see \ref random
+ \see \ref integer_t::random_by_size
+ \see \ref integer_t::random_prime
 */
-template <class T>
-integer random_by_size(T& gen, size_t bits, bool high_bit_on, bool low_bit_on,
- bool can_be_negative)
-{
- detail::random_generator<T> generator(gen);
- integer r(detail::random_by_size(generator, bits, high_bit_on, low_bit_on,
- can_be_negative));
- return BOOST_XINT_MOVE(r);
-}
-
-/*! \brief Generate a randomly-generated prime number of a particular bit-size.
-
-- Complexity: Varies
-
-\param[in] gen The random number generator to use. This can be
-boost::xint::default_random_generator, boost::xint::strong_random_generator, or
-any other class that supplies the member functions required by the Boost.Random
-random number generators.
-\param[in] size_in_bits The number of bits that you want the returned value to
-have.
-\param[in] callback An optional function that will be called regularly during
-the operation. If it returns \c false, the function will immediately return.
-
-\returns A randomly-generated prime integer with the specified number of bits,
-or zero if the provided callback function cancelled the operation.
-
-\exception exceptions::invalid_argument if \c size_in_bits is less than two.
-
-\note This function uses xint::is_prime. See the description of it for details
-of its limitations.
-
-\par
-See the \link random Random Number Functions page\endlink for details on how to
-get cryptographically-secure random numbers.
+class default_random_generator: public boost::mt19937 {
+ public:
+ default_random_generator(): mt19937(boost::uint32_t(time(0)+clock())) { }
+};
+
+/*! \brief A convenience class for cryptographically-secure random numbers.
 
-\see \ref primes
+ \see \ref random
+ \see \ref integer_t::random_by_size
+ \see \ref integer_t::random_prime
 */
-template <class T>
-integer random_prime(T& gen, size_t size_in_bits, callback_t callback) {
- detail::random_generator<T> generator(gen);
- return BOOST_XINT_MOVE(detail::random_prime(generator, size_in_bits,
- callback));
-}
+typedef detail::strong_random_generator_t<> strong_random_generator;
 
 } // namespace xint
 } // namespace boost

Modified: sandbox/xint/boost/xint/xint.hpp
==============================================================================
--- sandbox/xint/boost/xint/xint.hpp (original)
+++ sandbox/xint/boost/xint/xint.hpp 2010-05-31 20:43:54 EDT (Mon, 31 May 2010)
@@ -18,7 +18,6 @@
 #ifndef BOOST_INCLUDED_XINT_HPP
 #define BOOST_INCLUDED_XINT_HPP
 
-#include "internals.hpp"
 #include "integer.hpp"
 #include "nothrow_integer.hpp"
 #include "fixed_integer.hpp"

Deleted: sandbox/xint/build/Jamfile.v2
==============================================================================
--- sandbox/xint/build/Jamfile.v2 2010-05-31 20:43:54 EDT (Mon, 31 May 2010)
+++ (empty file)
@@ -1,59 +0,0 @@
-# Copyright 2010 by Chad Nelson
-# Distributed under the Boost Software License, Version 1.0.
-# See accompanying file LICENSE_1_0.txt or copy at
-# http://www.boost.org/LICENSE_1_0.txt.
-
-project boost/xint
- : source-location ../src
- : requirements
- <use>/boost//headers
- <threading>multi:<define>XINT_THREADSAFE
- : usage-requirements
- <threading>multi:<define>XINT_THREADSAFE
- ;
-
-
-SOURCES =
- base_integer.cpp
- data_t.cpp
-
- nothrow_integer.cpp
- nothrow_bit_manipulations.cpp
- nothrow_compare.cpp
- nothrow_convert.cpp
- nothrow_gcd.cpp
- nothrow_misc.cpp
- nothrow_modular.cpp
- nothrow_operators.cpp
- nothrow_powers.cpp
- nothrow_primes.cpp
- nothrow_primitives.cpp
- nothrow_random.cpp
- nothrow_roots.cpp
-
- integer.cpp
- bit_manipulations.cpp
- compare.cpp
- convert.cpp
- gcd.cpp
- misc.cpp
- modular.cpp
- monty.cpp
- operators.cpp
- powers.cpp
- primes.cpp
- primitives.cpp
- random.cpp
- roots.cpp
- ;
-
-lib boost_xint
- : ../src/$(SOURCES)
- :
- <include>../
- <link>static:<define>BOOST_XINT_STATIC_LINK=1
- <link>shared:<define>BOOST_XINT_DYN_LINK=1
- ;
-
-boost-install boost_xint ;
-

Added: sandbox/xint/dev-ms/XInt.sln
==============================================================================
--- (empty file)
+++ sandbox/xint/dev-ms/XInt.sln 2010-05-31 20:43:54 EDT (Mon, 31 May 2010)
@@ -0,0 +1,20 @@
+
+Microsoft Visual Studio Solution File, Format Version 9.00
+# Visual Studio 2005
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "XInt", "XInt.vcproj", "{772C26FC-CD6E-4246-BCDF-F587F280B90F}"
+EndProject
+Global
+ GlobalSection(SolutionConfigurationPlatforms) = preSolution
+ Debug|Win32 = Debug|Win32
+ Release|Win32 = Release|Win32
+ EndGlobalSection
+ GlobalSection(ProjectConfigurationPlatforms) = postSolution
+ {772C26FC-CD6E-4246-BCDF-F587F280B90F}.Debug|Win32.ActiveCfg = Debug|Win32
+ {772C26FC-CD6E-4246-BCDF-F587F280B90F}.Debug|Win32.Build.0 = Debug|Win32
+ {772C26FC-CD6E-4246-BCDF-F587F280B90F}.Release|Win32.ActiveCfg = Release|Win32
+ {772C26FC-CD6E-4246-BCDF-F587F280B90F}.Release|Win32.Build.0 = Release|Win32
+ EndGlobalSection
+ GlobalSection(SolutionProperties) = preSolution
+ HideSolutionNode = FALSE
+ EndGlobalSection
+EndGlobal

Added: sandbox/xint/dev-ms/XInt.vcproj
==============================================================================
--- (empty file)
+++ sandbox/xint/dev-ms/XInt.vcproj 2010-05-31 20:43:54 EDT (Mon, 31 May 2010)
@@ -0,0 +1,353 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="8.00"
+ Name="XInt"
+ ProjectGUID="{772C26FC-CD6E-4246-BCDF-F587F280B90F}"
+ RootNamespace="XInt"
+ Keyword="Win32Proj"
+ >
+ <Platforms>
+ <Platform
+ Name="Win32"
+ />
+ </Platforms>
+ <ToolFiles>
+ </ToolFiles>
+ <Configurations>
+ <Configuration
+ Name="Debug|Win32"
+ OutputDirectory="$(SolutionDir)$(ConfigurationName)"
+ IntermediateDirectory="$(ConfigurationName)"
+ ConfigurationType="1"
+ CharacterSet="1"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;BOOST_XINT_SINGLE_TEST_PROGRAM;BOOST_TEST_DYN_LINK;BOOST_XINT_COMPILED_LIB"
+ MinimalRebuild="true"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="3"
+ UsePrecompiledHeader="0"
+ WarningLevel="3"
+ Detect64BitPortabilityProblems="true"
+ DebugInformationFormat="4"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ LinkIncremental="2"
+ GenerateDebugInformation="true"
+ SubSystem="1"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCWebDeploymentTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="Release|Win32"
+ OutputDirectory="$(SolutionDir)$(ConfigurationName)"
+ IntermediateDirectory="$(ConfigurationName)"
+ ConfigurationType="1"
+ CharacterSet="1"
+ WholeProgramOptimization="1"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;BOOST_XINT_SINGLE_TEST_PROGRAM;BOOST_TEST_DYN_LINK;BOOST_XINT_COMPILED_LIB"
+ RuntimeLibrary="2"
+ UsePrecompiledHeader="0"
+ WarningLevel="3"
+ Detect64BitPortabilityProblems="true"
+ DebugInformationFormat="3"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ LinkIncremental="1"
+ GenerateDebugInformation="true"
+ SubSystem="1"
+ OptimizeReferences="2"
+ EnableCOMDATFolding="2"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCWebDeploymentTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ </Configurations>
+ <References>
+ </References>
+ <Files>
+ <Filter
+ Name="Source Files"
+ Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
+ UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
+ >
+ <File
+ RelativePath="..\boost\xint\detail\addsubtract.cpp"
+ >
+ </File>
+ <File
+ RelativePath="..\boost\xint\detail\andorxor.cpp"
+ >
+ </File>
+ <File
+ RelativePath="..\boost\xint\detail\bitfunctions.cpp"
+ >
+ </File>
+ <File
+ RelativePath="..\boost\xint\detail\compare.cpp"
+ >
+ </File>
+ <File
+ RelativePath="..\boost\xint\detail\convert.cpp"
+ >
+ </File>
+ <File
+ RelativePath="..\boost\xint\detail\data_t.cpp"
+ >
+ </File>
+ <File
+ RelativePath="..\boost\xint\detail\divide.cpp"
+ >
+ </File>
+ <File
+ RelativePath="..\boost\xint\detail\gcd.cpp"
+ >
+ </File>
+ <File
+ RelativePath="..\boost\xint\detail\modular.cpp"
+ >
+ </File>
+ <File
+ RelativePath="..\boost\xint\detail\monty.cpp"
+ >
+ </File>
+ <File
+ RelativePath="..\boost\xint\detail\multiply.cpp"
+ >
+ </File>
+ <File
+ RelativePath="..\boost\xint\detail\powers.cpp"
+ >
+ </File>
+ <File
+ RelativePath="..\boost\xint\detail\prime.cpp"
+ >
+ </File>
+ <File
+ RelativePath="..\boost\xint\detail\random.cpp"
+ >
+ </File>
+ <File
+ RelativePath="..\boost\xint\detail\roots.cpp"
+ >
+ </File>
+ <File
+ RelativePath="..\boost\xint\detail\shift.cpp"
+ >
+ </File>
+ <Filter
+ Name="test"
+ >
+ <File
+ RelativePath="..\libs\xint\test\test_add.cpp"
+ >
+ </File>
+ <File
+ RelativePath="..\libs\xint\test\test_bit_manipulations.cpp"
+ >
+ </File>
+ <File
+ RelativePath="..\libs\xint\test\test_compare.cpp"
+ >
+ </File>
+ <File
+ RelativePath="..\libs\xint\test\test_convert.cpp"
+ >
+ </File>
+ <File
+ RelativePath="..\libs\xint\test\test_divide.cpp"
+ >
+ </File>
+ <File
+ RelativePath="..\libs\xint\test\test_fixed.cpp"
+ >
+ </File>
+ <File
+ RelativePath="..\libs\xint\test\test_main.cpp"
+ >
+ </File>
+ <File
+ RelativePath="..\libs\xint\test\test_misc.cpp"
+ >
+ </File>
+ <File
+ RelativePath="..\libs\xint\test\test_modular.cpp"
+ >
+ </File>
+ <File
+ RelativePath="..\libs\xint\test\test_monty.cpp"
+ >
+ </File>
+ <File
+ RelativePath="..\libs\xint\test\test_multiply.cpp"
+ >
+ </File>
+ <File
+ RelativePath="..\libs\xint\test\test_nothrow.cpp"
+ >
+ </File>
+ <File
+ RelativePath="..\libs\xint\test\test_powers.cpp"
+ >
+ </File>
+ <File
+ RelativePath="..\libs\xint\test\test_streams.cpp"
+ >
+ </File>
+ </Filter>
+ </Filter>
+ <Filter
+ Name="Header Files"
+ Filter="h;hpp;hxx;hm;inl;inc;xsd"
+ UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
+ >
+ <File
+ RelativePath="..\boost\xint\detail\bitqueue.hpp"
+ >
+ </File>
+ <File
+ RelativePath="..\boost\xint\exceptions.hpp"
+ >
+ </File>
+ <File
+ RelativePath="..\boost\xint\fixed_integer.hpp"
+ >
+ </File>
+ <File
+ RelativePath="..\boost\xint\integer.hpp"
+ >
+ </File>
+ <File
+ RelativePath="..\boost\xint\detail\internals.hpp"
+ >
+ </File>
+ <File
+ RelativePath="..\boost\xint\detail\monty.hpp"
+ >
+ </File>
+ <File
+ RelativePath="..\boost\xint\nothrow_integer.hpp"
+ >
+ </File>
+ <File
+ RelativePath="..\boost\xint\random.hpp"
+ >
+ </File>
+ <File
+ RelativePath="..\boost\xint\xint.hpp"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="Resource Files"
+ Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav"
+ UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"
+ >
+ </Filter>
+ </Files>
+ <Globals>
+ </Globals>
+</VisualStudioProject>

Added: sandbox/xint/dev/Docs.project
==============================================================================
--- (empty file)
+++ sandbox/xint/dev/Docs.project 2010-05-31 20:43:54 EDT (Mon, 31 May 2010)
@@ -0,0 +1,85 @@
+<?xml version="1.0" encoding="utf-8"?>
+<CodeLite_Project Name="Docs" InternalType="">
+ <Plugins>
+ <Plugin Name="qmake">
+ <![CDATA[00020001N0003All0000000000000001N0005Debug000000000000]]>
+ </Plugin>
+ </Plugins>
+ <Description/>
+ <Dependencies/>
+ <Dependencies Name="Debug"/>
+ <VirtualDirectory Name="dox">
+ <File Name="../libs/xint/doc/dox/acknowledgements.dox"/>
+ <File Name="../libs/xint/doc/dox/complexity.dox"/>
+ <File Name="../libs/xint/doc/dox/copyonwrite.dox"/>
+ <File Name="../libs/xint/doc/dox/dependencies.dox"/>
+ <File Name="../libs/xint/doc/dox/ex_fibonacci.dox"/>
+ <File Name="../libs/xint/doc/dox/exceptions.dox"/>
+ <File Name="../libs/xint/doc/dox/fixed_and_variable.dox"/>
+ <File Name="../libs/xint/doc/dox/history.dox"/>
+ <File Name="../libs/xint/doc/dox/index.dox"/>
+ <File Name="../libs/xint/doc/dox/nan.dox"/>
+ <File Name="../libs/xint/doc/dox/primes.dox"/>
+ <File Name="../libs/xint/doc/dox/r_core.dox"/>
+ <File Name="../libs/xint/doc/dox/r_cow.dox"/>
+ <File Name="../libs/xint/doc/dox/r_exception_blocking.dox"/>
+ <File Name="../libs/xint/doc/dox/r_insecure_default.dox"/>
+ <File Name="../libs/xint/doc/dox/r_interface.dox"/>
+ <File Name="../libs/xint/doc/dox/r_interface_design_only.dox"/>
+ <File Name="../libs/xint/doc/dox/r_nan.dox"/>
+ <File Name="../libs/xint/doc/dox/r_negzero.dox"/>
+ <File Name="../libs/xint/doc/dox/r_nofloats.dox"/>
+ <File Name="../libs/xint/doc/dox/r_random.dox"/>
+ <File Name="../libs/xint/doc/dox/r_shared_ptr.dox"/>
+ <File Name="../libs/xint/doc/dox/r_toobig.dox"/>
+ <File Name="../libs/xint/doc/dox/random.dox"/>
+ <File Name="../libs/xint/doc/dox/rationale.dox"/>
+ <File Name="../libs/xint/doc/dox/testing.dox"/>
+ <File Name="../libs/xint/doc/dox/zero.dox"/>
+ </VirtualDirectory>
+ <VirtualDirectory Name="Project">
+ <File Name="../libs/xint/doc/dox/Doxyfile"/>
+ </VirtualDirectory>
+ <Settings Type="Executable">
+ <Configuration Name="All" CompilerType="cobra" DebuggerType="GNU gdb debugger" Type="Executable" BuildCmpWithGlobalSettings="append" BuildLnkWithGlobalSettings="append" BuildResWithGlobalSettings="append">
+ <Compiler Options="-g" Required="no" PreCompiledHeader="">
+ <IncludePath Value="."/>
+ </Compiler>
+ <Linker Options="-O0" Required="no">
+ <LibraryPath Value="."/>
+ <LibraryPath Value="Debug"/>
+ </Linker>
+ <ResourceCompiler Options="" Required="no"/>
+ <General OutputFile="" IntermediateDirectory="./Debug" Command="" CommandArguments="" WorkingDirectory="./Debug" PauseExecWhenProcTerminates="no"/>
+ <Debugger IsRemote="no" RemoteHostName="" RemoteHostPort="" DebuggerPath="">
+ <PostConnectCommands/>
+ <StartupCommands/>
+ </Debugger>
+ <PreBuild/>
+ <PostBuild/>
+ <CustomBuild Enabled="yes">
+ <RebuildCommand/>
+ <CleanCommand>rm ~/projects/xint/libs/xint/doc/*</CleanCommand>
+ <BuildCommand>doxygen</BuildCommand>
+ <PreprocessFileCommand/>
+ <SingleFileCommand/>
+ <MakefileGenerationCommand/>
+ <ThirdPartyToolName>None</ThirdPartyToolName>
+ <WorkingDirectory>/home/chad/projects/xint/libs/xint/doc/dox</WorkingDirectory>
+ </CustomBuild>
+ <AdditionalRules>
+ <CustomPostBuild/>
+ <CustomPreBuild/>
+ </AdditionalRules>
+ </Configuration>
+ <GlobalSettings>
+ <Compiler Options="">
+ <IncludePath Value="."/>
+ </Compiler>
+ <Linker Options="">
+ <LibraryPath Value="."/>
+ </Linker>
+ <ResourceCompiler Options=""/>
+ </GlobalSettings>
+ </Settings>
+</CodeLite_Project>

Added: sandbox/xint/dev/Example-Exceptions.project
==============================================================================
--- (empty file)
+++ sandbox/xint/dev/Example-Exceptions.project 2010-05-31 20:43:54 EDT (Mon, 31 May 2010)
@@ -0,0 +1,75 @@
+<?xml version="1.0" encoding="utf-8"?>
+<CodeLite_Project Name="Example-Exceptions" InternalType="Console">
+ <Description/>
+ <Dependencies/>
+ <Settings Type="Executable">
+ <GlobalSettings>
+ <Compiler Options="">
+ <IncludePath Value="."/>
+ </Compiler>
+ <Linker Options="">
+ <LibraryPath Value="."/>
+ </Linker>
+ <ResourceCompiler Options=""/>
+ </GlobalSettings>
+ <Configuration Name="Debug" CompilerType="gnu g++" DebuggerType="GNU gdb debugger" Type="" BuildCmpWithGlobalSettings="append" BuildLnkWithGlobalSettings="append" BuildResWithGlobalSettings="append">
+ <Compiler Options="-g" Required="yes" PreCompiledHeader="">
+ <IncludePath Value="."/>
+ </Compiler>
+ <Linker Options="" Required="yes"/>
+ <ResourceCompiler Options="" Required="no"/>
+ <General OutputFile="$(IntermediateDirectory)/$(ProjectName)" IntermediateDirectory="./Debug" Command="./$(ProjectName)" CommandArguments="" WorkingDirectory="$(IntermediateDirectory)" PauseExecWhenProcTerminates="yes"/>
+ <Debugger IsRemote="no" RemoteHostName="" RemoteHostPort="" DebuggerPath="">
+ <PostConnectCommands/>
+ <StartupCommands/>
+ </Debugger>
+ <PreBuild/>
+ <PostBuild/>
+ <CustomBuild Enabled="no">
+ <RebuildCommand/>
+ <CleanCommand/>
+ <BuildCommand/>
+ <PreprocessFileCommand/>
+ <SingleFileCommand/>
+ <MakefileGenerationCommand/>
+ <ThirdPartyToolName>None</ThirdPartyToolName>
+ <WorkingDirectory/>
+ </CustomBuild>
+ <AdditionalRules>
+ <CustomPostBuild/>
+ <CustomPreBuild/>
+ </AdditionalRules>
+ </Configuration>
+ <Configuration Name="Release" CompilerType="gnu g++" DebuggerType="GNU gdb debugger" Type="" BuildCmpWithGlobalSettings="append" BuildLnkWithGlobalSettings="append" BuildResWithGlobalSettings="append">
+ <Compiler Options="" Required="yes" PreCompiledHeader="">
+ <IncludePath Value="."/>
+ </Compiler>
+ <Linker Options="-O2" Required="yes"/>
+ <ResourceCompiler Options="" Required="no"/>
+ <General OutputFile="$(IntermediateDirectory)/$(ProjectName)" IntermediateDirectory="./Release" Command="./$(ProjectName)" CommandArguments="" WorkingDirectory="$(IntermediateDirectory)" PauseExecWhenProcTerminates="yes"/>
+ <Debugger IsRemote="no" RemoteHostName="" RemoteHostPort="" DebuggerPath="">
+ <PostConnectCommands/>
+ <StartupCommands/>
+ </Debugger>
+ <PreBuild/>
+ <PostBuild/>
+ <CustomBuild Enabled="no">
+ <RebuildCommand/>
+ <CleanCommand/>
+ <BuildCommand/>
+ <PreprocessFileCommand/>
+ <SingleFileCommand/>
+ <MakefileGenerationCommand/>
+ <ThirdPartyToolName>None</ThirdPartyToolName>
+ <WorkingDirectory/>
+ </CustomBuild>
+ <AdditionalRules>
+ <CustomPostBuild/>
+ <CustomPreBuild/>
+ </AdditionalRules>
+ </Configuration>
+ </Settings>
+ <VirtualDirectory Name="src">
+ <File Name="../libs/xint/example/exceptions.cpp"/>
+ </VirtualDirectory>
+</CodeLite_Project>

Added: sandbox/xint/dev/Example-Fibonacci.project
==============================================================================
--- (empty file)
+++ sandbox/xint/dev/Example-Fibonacci.project 2010-05-31 20:43:54 EDT (Mon, 31 May 2010)
@@ -0,0 +1,75 @@
+<?xml version="1.0" encoding="utf-8"?>
+<CodeLite_Project Name="Example-Fibonacci" InternalType="Console">
+ <Description/>
+ <Dependencies/>
+ <Settings Type="Executable">
+ <GlobalSettings>
+ <Compiler Options="">
+ <IncludePath Value="."/>
+ </Compiler>
+ <Linker Options="">
+ <LibraryPath Value="."/>
+ </Linker>
+ <ResourceCompiler Options=""/>
+ </GlobalSettings>
+ <Configuration Name="Debug" CompilerType="gnu g++" DebuggerType="GNU gdb debugger" Type="" BuildCmpWithGlobalSettings="append" BuildLnkWithGlobalSettings="append" BuildResWithGlobalSettings="append">
+ <Compiler Options="-g" Required="yes" PreCompiledHeader="">
+ <IncludePath Value="."/>
+ </Compiler>
+ <Linker Options="" Required="yes"/>
+ <ResourceCompiler Options="" Required="no"/>
+ <General OutputFile="$(IntermediateDirectory)/$(ProjectName)" IntermediateDirectory="./Debug" Command="./$(ProjectName)" CommandArguments="" WorkingDirectory="$(IntermediateDirectory)" PauseExecWhenProcTerminates="yes"/>
+ <Debugger IsRemote="no" RemoteHostName="" RemoteHostPort="" DebuggerPath="">
+ <PostConnectCommands/>
+ <StartupCommands/>
+ </Debugger>
+ <PreBuild/>
+ <PostBuild/>
+ <CustomBuild Enabled="no">
+ <RebuildCommand/>
+ <CleanCommand/>
+ <BuildCommand/>
+ <PreprocessFileCommand/>
+ <SingleFileCommand/>
+ <MakefileGenerationCommand/>
+ <ThirdPartyToolName>None</ThirdPartyToolName>
+ <WorkingDirectory/>
+ </CustomBuild>
+ <AdditionalRules>
+ <CustomPostBuild/>
+ <CustomPreBuild/>
+ </AdditionalRules>
+ </Configuration>
+ <Configuration Name="Release" CompilerType="gnu g++" DebuggerType="GNU gdb debugger" Type="" BuildCmpWithGlobalSettings="append" BuildLnkWithGlobalSettings="append" BuildResWithGlobalSettings="append">
+ <Compiler Options="" Required="yes" PreCompiledHeader="">
+ <IncludePath Value="."/>
+ </Compiler>
+ <Linker Options="-O2" Required="yes"/>
+ <ResourceCompiler Options="" Required="no"/>
+ <General OutputFile="$(IntermediateDirectory)/$(ProjectName)" IntermediateDirectory="./Release" Command="./$(ProjectName)" CommandArguments="" WorkingDirectory="$(IntermediateDirectory)" PauseExecWhenProcTerminates="yes"/>
+ <Debugger IsRemote="no" RemoteHostName="" RemoteHostPort="" DebuggerPath="">
+ <PostConnectCommands/>
+ <StartupCommands/>
+ </Debugger>
+ <PreBuild/>
+ <PostBuild/>
+ <CustomBuild Enabled="no">
+ <RebuildCommand/>
+ <CleanCommand/>
+ <BuildCommand/>
+ <PreprocessFileCommand/>
+ <SingleFileCommand/>
+ <MakefileGenerationCommand/>
+ <ThirdPartyToolName>None</ThirdPartyToolName>
+ <WorkingDirectory/>
+ </CustomBuild>
+ <AdditionalRules>
+ <CustomPostBuild/>
+ <CustomPreBuild/>
+ </AdditionalRules>
+ </Configuration>
+ </Settings>
+ <VirtualDirectory Name="src">
+ <File Name="../libs/xint/example/fibonacci.cpp"/>
+ </VirtualDirectory>
+</CodeLite_Project>

Added: sandbox/xint/dev/Example-GenPrime.project
==============================================================================
--- (empty file)
+++ sandbox/xint/dev/Example-GenPrime.project 2010-05-31 20:43:54 EDT (Mon, 31 May 2010)
@@ -0,0 +1,75 @@
+<?xml version="1.0" encoding="utf-8"?>
+<CodeLite_Project Name="Example-GenPrime" InternalType="Console">
+ <Description/>
+ <Dependencies/>
+ <Settings Type="Executable">
+ <GlobalSettings>
+ <Compiler Options="">
+ <IncludePath Value="."/>
+ </Compiler>
+ <Linker Options="">
+ <LibraryPath Value="."/>
+ </Linker>
+ <ResourceCompiler Options=""/>
+ </GlobalSettings>
+ <Configuration Name="Debug" CompilerType="gnu g++" DebuggerType="GNU gdb debugger" Type="" BuildCmpWithGlobalSettings="append" BuildLnkWithGlobalSettings="append" BuildResWithGlobalSettings="append">
+ <Compiler Options="-g" Required="yes" PreCompiledHeader="">
+ <IncludePath Value="."/>
+ </Compiler>
+ <Linker Options="" Required="yes"/>
+ <ResourceCompiler Options="" Required="no"/>
+ <General OutputFile="$(IntermediateDirectory)/$(ProjectName)" IntermediateDirectory="./Debug" Command="./$(ProjectName)" CommandArguments="" WorkingDirectory="$(IntermediateDirectory)" PauseExecWhenProcTerminates="yes"/>
+ <Debugger IsRemote="no" RemoteHostName="" RemoteHostPort="" DebuggerPath="">
+ <PostConnectCommands/>
+ <StartupCommands/>
+ </Debugger>
+ <PreBuild/>
+ <PostBuild/>
+ <CustomBuild Enabled="no">
+ <RebuildCommand/>
+ <CleanCommand/>
+ <BuildCommand/>
+ <PreprocessFileCommand/>
+ <SingleFileCommand/>
+ <MakefileGenerationCommand/>
+ <ThirdPartyToolName>None</ThirdPartyToolName>
+ <WorkingDirectory/>
+ </CustomBuild>
+ <AdditionalRules>
+ <CustomPostBuild/>
+ <CustomPreBuild/>
+ </AdditionalRules>
+ </Configuration>
+ <Configuration Name="Release" CompilerType="gnu g++" DebuggerType="GNU gdb debugger" Type="" BuildCmpWithGlobalSettings="append" BuildLnkWithGlobalSettings="append" BuildResWithGlobalSettings="append">
+ <Compiler Options="" Required="yes" PreCompiledHeader="">
+ <IncludePath Value="."/>
+ </Compiler>
+ <Linker Options="-O2" Required="yes"/>
+ <ResourceCompiler Options="" Required="no"/>
+ <General OutputFile="$(IntermediateDirectory)/$(ProjectName)" IntermediateDirectory="./Release" Command="./$(ProjectName)" CommandArguments="" WorkingDirectory="$(IntermediateDirectory)" PauseExecWhenProcTerminates="yes"/>
+ <Debugger IsRemote="no" RemoteHostName="" RemoteHostPort="" DebuggerPath="">
+ <PostConnectCommands/>
+ <StartupCommands/>
+ </Debugger>
+ <PreBuild/>
+ <PostBuild/>
+ <CustomBuild Enabled="no">
+ <RebuildCommand/>
+ <CleanCommand/>
+ <BuildCommand/>
+ <PreprocessFileCommand/>
+ <SingleFileCommand/>
+ <MakefileGenerationCommand/>
+ <ThirdPartyToolName>None</ThirdPartyToolName>
+ <WorkingDirectory/>
+ </CustomBuild>
+ <AdditionalRules>
+ <CustomPostBuild/>
+ <CustomPreBuild/>
+ </AdditionalRules>
+ </Configuration>
+ </Settings>
+ <VirtualDirectory Name="src">
+ <File Name="../libs/xint/example/genprime.cpp"/>
+ </VirtualDirectory>
+</CodeLite_Project>

Added: sandbox/xint/dev/XInt.project
==============================================================================
--- (empty file)
+++ sandbox/xint/dev/XInt.project 2010-05-31 20:43:54 EDT (Mon, 31 May 2010)
@@ -0,0 +1,197 @@
+<?xml version="1.0" encoding="utf-8"?>
+<CodeLite_Project Name="XInt" InternalType="Console">
+ <Plugins>
+ <Plugin Name="qmake">
+ <![CDATA[00040001N0005Debug0000000000000001N0018Debug, Header Only0000000000000001N0007Release0000000000000001N0020Release, Header Only000000000000]]>
+ </Plugin>
+ </Plugins>
+ <Description/>
+ <Dependencies/>
+ <VirtualDirectory Name="xint">
+ <File Name="../boost/xint/exceptions.hpp"/>
+ <File Name="../boost/xint/fixed_integer.hpp"/>
+ <File Name="../boost/xint/integer.hpp"/>
+ <File Name="../boost/xint/nothrow_integer.hpp"/>
+ <File Name="../boost/xint/random.hpp"/>
+ <File Name="../boost/xint/xint.hpp"/>
+ <VirtualDirectory Name="detail">
+ <File Name="../boost/xint/detail/addsubtract.cpp"/>
+ <File Name="../boost/xint/detail/andorxor.cpp"/>
+ <File Name="../boost/xint/detail/bitfunctions.cpp"/>
+ <File Name="../boost/xint/detail/bitqueue.hpp"/>
+ <File Name="../boost/xint/detail/compare.cpp"/>
+ <File Name="../boost/xint/detail/convert.cpp"/>
+ <File Name="../boost/xint/detail/data_t.cpp"/>
+ <File Name="../boost/xint/detail/divide.cpp"/>
+ <File Name="../boost/xint/detail/gcd.cpp"/>
+ <File Name="../boost/xint/detail/internals.hpp"/>
+ <File Name="../boost/xint/detail/modular.cpp"/>
+ <File Name="../boost/xint/detail/monty.cpp"/>
+ <File Name="../boost/xint/detail/monty.hpp"/>
+ <File Name="../boost/xint/detail/multiply.cpp"/>
+ <File Name="../boost/xint/detail/powers.cpp"/>
+ <File Name="../boost/xint/detail/prime.cpp"/>
+ <File Name="../boost/xint/detail/random.cpp"/>
+ <File Name="../boost/xint/detail/roots.cpp"/>
+ <File Name="../boost/xint/detail/shift.cpp"/>
+ </VirtualDirectory>
+ </VirtualDirectory>
+ <VirtualDirectory Name="test">
+ <File Name="../libs/xint/test/test_add.cpp"/>
+ <File Name="../libs/xint/test/test_bit_manipulations.cpp"/>
+ <File Name="../libs/xint/test/test_compare.cpp"/>
+ <File Name="../libs/xint/test/test_convert.cpp"/>
+ <File Name="../libs/xint/test/test_divide.cpp"/>
+ <File Name="../libs/xint/test/test_fixed.cpp"/>
+ <File Name="../libs/xint/test/test_main.cpp"/>
+ <File Name="../libs/xint/test/test_misc.cpp"/>
+ <File Name="../libs/xint/test/test_modular.cpp"/>
+ <File Name="../libs/xint/test/test_monty.cpp"/>
+ <File Name="../libs/xint/test/test_multiply.cpp"/>
+ <File Name="../libs/xint/test/test_nothrow.cpp"/>
+ <File Name="../libs/xint/test/test_powers.cpp"/>
+ <File Name="../libs/xint/test/test_streams.cpp"/>
+ </VirtualDirectory>
+ <Dependencies Name="Debug"/>
+ <Dependencies Name="Debug, Header Only"/>
+ <Dependencies Name="Release"/>
+ <Dependencies Name="Release, Header Only"/>
+ <VirtualDirectory Name="other">
+ <File Name="../.gitignore"/>
+ <File Name="../README.TXT"/>
+ </VirtualDirectory>
+ <Settings Type="Executable">
+ <Configuration Name="Debug" CompilerType="gnu g++" DebuggerType="GNU gdb debugger" Type="Executable" BuildCmpWithGlobalSettings="append" BuildLnkWithGlobalSettings="append" BuildResWithGlobalSettings="append">
+ <Compiler Options="-g;-Wall" Required="yes" PreCompiledHeader="">
+ <IncludePath Value="."/>
+ <Preprocessor Value="BOOST_XINT_SINGLE_TEST_PROGRAM"/>
+ <Preprocessor Value="BOOST_TEST_DYN_LINK"/>
+ <Preprocessor Value="BOOST_XINT_COMPILED_LIB"/>
+ </Compiler>
+ <Linker Options="" Required="yes"/>
+ <ResourceCompiler Options="" Required="no"/>
+ <General OutputFile="$(IntermediateDirectory)/$(ProjectName)" IntermediateDirectory="./Debug" Command="./$(ProjectName)" CommandArguments="" WorkingDirectory="$(IntermediateDirectory)" PauseExecWhenProcTerminates="yes"/>
+ <Debugger IsRemote="no" RemoteHostName="" RemoteHostPort="" DebuggerPath="">
+ <PostConnectCommands/>
+ <StartupCommands/>
+ </Debugger>
+ <PreBuild/>
+ <PostBuild/>
+ <CustomBuild Enabled="no">
+ <RebuildCommand/>
+ <CleanCommand/>
+ <BuildCommand/>
+ <PreprocessFileCommand/>
+ <SingleFileCommand/>
+ <MakefileGenerationCommand/>
+ <ThirdPartyToolName>None</ThirdPartyToolName>
+ <WorkingDirectory/>
+ </CustomBuild>
+ <AdditionalRules>
+ <CustomPostBuild/>
+ <CustomPreBuild/>
+ </AdditionalRules>
+ </Configuration>
+ <Configuration Name="Debug, Header Only" CompilerType="gnu g++" DebuggerType="GNU gdb debugger" Type="Executable" BuildCmpWithGlobalSettings="append" BuildLnkWithGlobalSettings="append" BuildResWithGlobalSettings="append">
+ <Compiler Options="-g;-Wall" Required="yes" PreCompiledHeader="">
+ <IncludePath Value="."/>
+ <Preprocessor Value="BOOST_XINT_SINGLE_TEST_PROGRAM"/>
+ <Preprocessor Value="BOOST_TEST_DYN_LINK"/>
+ </Compiler>
+ <Linker Options="" Required="yes"/>
+ <ResourceCompiler Options="" Required="no"/>
+ <General OutputFile="$(IntermediateDirectory)/$(ProjectName)" IntermediateDirectory="./Debug" Command="./$(ProjectName)" CommandArguments="" WorkingDirectory="$(IntermediateDirectory)" PauseExecWhenProcTerminates="yes"/>
+ <Debugger IsRemote="no" RemoteHostName="" RemoteHostPort="" DebuggerPath="">
+ <PostConnectCommands/>
+ <StartupCommands/>
+ </Debugger>
+ <PreBuild/>
+ <PostBuild/>
+ <CustomBuild Enabled="no">
+ <RebuildCommand/>
+ <CleanCommand/>
+ <BuildCommand/>
+ <PreprocessFileCommand/>
+ <SingleFileCommand/>
+ <MakefileGenerationCommand/>
+ <ThirdPartyToolName>None</ThirdPartyToolName>
+ <WorkingDirectory/>
+ </CustomBuild>
+ <AdditionalRules>
+ <CustomPostBuild/>
+ <CustomPreBuild/>
+ </AdditionalRules>
+ </Configuration>
+ <Configuration Name="Release" CompilerType="gnu g++" DebuggerType="GNU gdb debugger" Type="Executable" BuildCmpWithGlobalSettings="append" BuildLnkWithGlobalSettings="append" BuildResWithGlobalSettings="append">
+ <Compiler Options="-O2;-Wall" Required="yes" PreCompiledHeader="">
+ <IncludePath Value="."/>
+ <Preprocessor Value="BOOST_XINT_SINGLE_TEST_PROGRAM"/>
+ <Preprocessor Value="BOOST_TEST_DYN_LINK"/>
+ <Preprocessor Value="BOOST_XINT_COMPILED_LIB"/>
+ </Compiler>
+ <Linker Options="-O2" Required="yes"/>
+ <ResourceCompiler Options="" Required="no"/>
+ <General OutputFile="$(IntermediateDirectory)/$(ProjectName)" IntermediateDirectory="./Release" Command="./$(ProjectName)" CommandArguments="x" WorkingDirectory="$(IntermediateDirectory)" PauseExecWhenProcTerminates="yes"/>
+ <Debugger IsRemote="no" RemoteHostName="" RemoteHostPort="" DebuggerPath="">
+ <PostConnectCommands/>
+ <StartupCommands/>
+ </Debugger>
+ <PreBuild/>
+ <PostBuild/>
+ <CustomBuild Enabled="no">
+ <RebuildCommand/>
+ <CleanCommand/>
+ <BuildCommand/>
+ <PreprocessFileCommand/>
+ <SingleFileCommand/>
+ <MakefileGenerationCommand/>
+ <ThirdPartyToolName>None</ThirdPartyToolName>
+ <WorkingDirectory/>
+ </CustomBuild>
+ <AdditionalRules>
+ <CustomPostBuild/>
+ <CustomPreBuild/>
+ </AdditionalRules>
+ </Configuration>
+ <Configuration Name="Release, Header Only" CompilerType="gnu g++" DebuggerType="GNU gdb debugger" Type="Executable" BuildCmpWithGlobalSettings="append" BuildLnkWithGlobalSettings="append" BuildResWithGlobalSettings="append">
+ <Compiler Options="-O2;-Wall" Required="yes" PreCompiledHeader="">
+ <IncludePath Value="."/>
+ <Preprocessor Value="BOOST_XINT_SINGLE_TEST_PROGRAM"/>
+ <Preprocessor Value="BOOST_TEST_DYN_LINK"/>
+ </Compiler>
+ <Linker Options="-O2" Required="yes"/>
+ <ResourceCompiler Options="" Required="no"/>
+ <General OutputFile="$(IntermediateDirectory)/$(ProjectName)" IntermediateDirectory="./Release" Command="./$(ProjectName)" CommandArguments="x" WorkingDirectory="$(IntermediateDirectory)" PauseExecWhenProcTerminates="yes"/>
+ <Debugger IsRemote="no" RemoteHostName="" RemoteHostPort="" DebuggerPath="">
+ <PostConnectCommands/>
+ <StartupCommands/>
+ </Debugger>
+ <PreBuild/>
+ <PostBuild/>
+ <CustomBuild Enabled="no">
+ <RebuildCommand/>
+ <CleanCommand/>
+ <BuildCommand/>
+ <PreprocessFileCommand/>
+ <SingleFileCommand/>
+ <MakefileGenerationCommand/>
+ <ThirdPartyToolName>None</ThirdPartyToolName>
+ <WorkingDirectory/>
+ </CustomBuild>
+ <AdditionalRules>
+ <CustomPostBuild/>
+ <CustomPreBuild/>
+ </AdditionalRules>
+ </Configuration>
+ <GlobalSettings>
+ <Compiler Options="">
+ <IncludePath Value="."/>
+ </Compiler>
+ <Linker Options="">
+ <LibraryPath Value="."/>
+ <Library Value="boost_unit_test_framework"/>
+ </Linker>
+ <ResourceCompiler Options=""/>
+ </GlobalSettings>
+ </Settings>
+</CodeLite_Project>

Added: sandbox/xint/dev/XInt.workspace
==============================================================================
--- (empty file)
+++ sandbox/xint/dev/XInt.workspace 2010-05-31 20:43:54 EDT (Mon, 31 May 2010)
@@ -0,0 +1,62 @@
+<?xml version="1.0" encoding="utf-8"?>
+<CodeLite_Workspace Name="XInt" Database="./XInt.tags">
+ <Project Name="XInt" Path="XInt.project" Active="Yes"/>
+ <Project Name="Docs" Path="Docs.project" Active="No"/>
+ <Project Name="Example-Exceptions" Path="Example-Exceptions.project"/>
+ <Project Name="Example-Fibonacci" Path="Example-Fibonacci.project" Active="No"/>
+ <Project Name="Example-GenPrime" Path="Example-GenPrime.project" Active="No"/>
+ <BuildMatrix>
+ <WorkspaceConfiguration Name="Debug" Selected="yes">
+ <Project Name="XInt" ConfigName="Debug"/>
+ <Project Name="Docs" ConfigName="All"/>
+ <Project Name="XInt" ConfigName="Debug"/>
+ <Project Name="Docs" ConfigName="All"/>
+ <Project Name="XInt" ConfigName="Debug"/>
+ <Project Name="Docs" ConfigName="All"/>
+ <Project Name="XInt" ConfigName="Debug"/>
+ <Project Name="Docs" ConfigName="All"/>
+ <Project Name="Example-Exceptions" ConfigName="Debug"/>
+ <Project Name="Example-Fibonacci" ConfigName="Debug"/>
+ <Project Name="Example-GenPrime" ConfigName="Debug"/>
+ </WorkspaceConfiguration>
+ <WorkspaceConfiguration Name="Release" Selected="yes">
+ <Project Name="XInt" ConfigName="Release"/>
+ <Project Name="Docs" ConfigName="All"/>
+ <Project Name="XInt" ConfigName="Release"/>
+ <Project Name="Docs" ConfigName="All"/>
+ <Project Name="XInt" ConfigName="Release"/>
+ <Project Name="Docs" ConfigName="All"/>
+ <Project Name="XInt" ConfigName="Release"/>
+ <Project Name="Docs" ConfigName="All"/>
+ <Project Name="Example-Exceptions" ConfigName="Release"/>
+ <Project Name="Example-Fibonacci" ConfigName="Release"/>
+ <Project Name="Example-GenPrime" ConfigName="Release"/>
+ </WorkspaceConfiguration>
+ <WorkspaceConfiguration Name="Debug, Header Only" Selected="yes">
+ <Project Name="XInt" ConfigName="Debug, Header Only"/>
+ <Project Name="Docs" ConfigName="Debug"/>
+ <Project Name="XInt" ConfigName="Debug, Header Only"/>
+ <Project Name="Docs" ConfigName="All"/>
+ <Project Name="XInt" ConfigName="Debug, Header Only"/>
+ <Project Name="Docs" ConfigName="All"/>
+ <Project Name="XInt" ConfigName="Debug, Header Only"/>
+ <Project Name="Docs" ConfigName="All"/>
+ <Project Name="Example-Exceptions" ConfigName="Debug"/>
+ <Project Name="Example-Fibonacci" ConfigName="Debug"/>
+ <Project Name="Example-GenPrime" ConfigName="Debug"/>
+ </WorkspaceConfiguration>
+ <WorkspaceConfiguration Name="Release, Header Only" Selected="yes">
+ <Project Name="XInt" ConfigName="Release, Header Only"/>
+ <Project Name="Docs" ConfigName="All"/>
+ <Project Name="XInt" ConfigName="Release, Header Only"/>
+ <Project Name="Docs" ConfigName="All"/>
+ <Project Name="XInt" ConfigName="Release, Header Only"/>
+ <Project Name="Docs" ConfigName="All"/>
+ <Project Name="XInt" ConfigName="Release, Header Only"/>
+ <Project Name="Docs" ConfigName="All"/>
+ <Project Name="Example-Exceptions" ConfigName="Debug"/>
+ <Project Name="Example-Fibonacci" ConfigName="Debug"/>
+ <Project Name="Example-GenPrime" ConfigName="Debug"/>
+ </WorkspaceConfiguration>
+ </BuildMatrix>
+</CodeLite_Workspace>

Deleted: sandbox/xint/doc/acknowledgements.html
==============================================================================
--- sandbox/xint/doc/acknowledgements.html 2010-05-31 20:43:54 EDT (Mon, 31 May 2010)
+++ (empty file)
@@ -1,71 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
-<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
-<title>The Extended Integer (XInt) Library: Acknowledgements</title>
-<link href="tabs.css" rel="stylesheet" type="text/css"/>
-<link href="doxygen.css" rel="stylesheet" type="text/css"/>
-</head>
-<body>
-<!-- Generated by Doxygen 1.6.3 -->
-<div class="navigation" id="top">
- <div class="tabs">
- <ul>
- <li>Main Page</li>
- <li>Namespaces</li>
- <li>Classes</li>
- <li>Files</li>
- </ul>
- </div>
- <div class="navpath"><a class="el" href="index.html">The Extended Integer (XInt) Library</a>
- </div>
-</div>
-<div class="contents">
-
-
-<h1><a class="anchor" id="acknowledgements">Acknowledgements </a></h1><p>Several people have helped me improve the XInt library. Particular thanks go to Paul Bristow, for...</p>
-<ul>
-<li>Pointing out the need for a specialization of <code>std::numeric_limits</code> for the library-provided types;</li>
-<li>Spending a great deal of time and effort to introduce me to the Boost.Test framework and Doxygen/QuickBook;</li>
-<li>Providing test cases and documentation tweaks;</li>
-<li>General advice and moral support.</li>
-</ul>
-<p>...and to Jeffrey Lee Hellrung, Jr., for...</p>
-<ul>
-<li>advice on implementing move-aware objects;</li>
-<li>an invigorating discussion on the differing needs of an integer library versus a floating-point one;</li>
-<li>politely pointing out a logic bug that I was blind to;</li>
-<li>and several other things that I'm sure I missed.</li>
-</ul>
-<p>The library wouldn't be nearly as good without their work.</p>
-<p>Other contributors from the Boost development list, roughly in the order that they contributed:</p>
-<ul>
-<li>Steven Watanabe, for an improvement to the template constructor, and for comments on the random number code.</li>
-<li>Scott McMurray, for comments on the random number code, the Not-a-Number value, and the blockable exceptions design, and for accidentally pointing out an error in the square-root function, among other things.</li>
-<li>"Pavel" for suggesting adding the algorithmic complexity of each function to the documentation, and for more than once understanding what I was trying to explain when no one else seemed to.</li>
-<li>Vincente Juan Botet Escribá, for doubting everything I wrote... irritating, but sometimes useful.</li>
-<li>Peter Dimov, for suggesting a separate <code>overflow_error</code> exception class.</li>
-<li>"Fred," a.k.a. "Gottlob Frege", for information on infinities.</li>
-<li>Joachim Faulhaber, for a discussion of intervals and interval containers.</li>
-<li>Domagoj Saric, for suggesting a design that would allow for both variable-length and fixed-length integers.</li>
-<li>Juergen Hunold, for major improvements to the build system.</li>
-</ul>
-<p>And the other Boost development list members who joined the discussion:</p>
-<ul>
-<li>Anders Dalvander</li>
-<li>Arash Partow</li>
-<li>Robert Stewart</li>
-<li>Frank Mori Hess</li>
-<li>Christopher Jefferson</li>
-<li>Daniel (Herring?)</li>
-<li>"OvermindDL1"</li>
-<li>Marius Stoica</li>
-<li>Kim Barrett</li>
-</ul>
-<p>If I've forgotten anyone, please let me know and I'll correct the oversight. </p>
-</div>
-<hr class="footer"/><address style="text-align: right;"><small>Generated on Tue May 4 10:20:16 2010 for The Extended Integer (XInt) Library by&nbsp;
-<a href="http://www.doxygen.org/index.html">
-<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.3 </small></address>
-</body>
-</html>

Deleted: sandbox/xint/doc/acknowledgements_8dox.html
==============================================================================
--- sandbox/xint/doc/acknowledgements_8dox.html 2010-05-31 20:43:54 EDT (Mon, 31 May 2010)
+++ (empty file)
@@ -1,35 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
-<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
-<title>The Extended Integer (XInt) Library: /home/chad/projects/xint/doc/dox/acknowledgements.dox File Reference</title>
-<link href="tabs.css" rel="stylesheet" type="text/css"/>
-<link href="doxygen.css" rel="stylesheet" type="text/css"/>
-</head>
-<body>
-<!-- Generated by Doxygen 1.6.3 -->
-<div class="navigation" id="top">
- <div class="tabs">
- <ul>
- <li>Main Page</li>
- <li>Namespaces</li>
- <li>Classes</li>
- <li class="current">Files</li>
- </ul>
- </div>
- <div class="tabs">
- <ul>
- <li>File List</li>
- <li>File Members</li>
- </ul>
- </div>
-</div>
-<div class="contents">
-<h1>/home/chad/projects/xint/doc/dox/acknowledgements.dox File Reference</h1><table border="0" cellpadding="0" cellspacing="0">
-</table>
-</div>
-<hr class="footer"/><address style="text-align: right;"><small>Generated on Tue May 4 10:20:16 2010 for The Extended Integer (XInt) Library by&nbsp;
-<a href="http://www.doxygen.org/index.html">
-<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.3 </small></address>
-</body>
-</html>

Deleted: sandbox/xint/doc/annotated.html
==============================================================================
--- sandbox/xint/doc/annotated.html 2010-05-31 20:43:54 EDT (Mon, 31 May 2010)
+++ (empty file)
@@ -1,57 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
-<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
-<title>The Extended Integer (XInt) Library: Class List</title>
-<link href="tabs.css" rel="stylesheet" type="text/css"/>
-<link href="doxygen.css" rel="stylesheet" type="text/css"/>
-</head>
-<body>
-<!-- Generated by Doxygen 1.6.3 -->
-<div class="navigation" id="top">
- <div class="tabs">
- <ul>
- <li>Main Page</li>
- <li>Namespaces</li>
- <li class="current">Classes</li>
- <li>Files</li>
- </ul>
- </div>
- <div class="tabs">
- <ul>
- <li class="current">Class List</li>
- <li>Class Hierarchy</li>
- <li>Class Members</li>
- </ul>
- </div>
-</div>
-<div class="contents">
-<h1>Class List</h1>Here are the classes, structs, unions and interfaces with brief descriptions:<table>
- <tr><td class="indexkey"><a class="el" href="classboost_1_1xint_1_1base__divide__t.html">boost::xint::base_divide_t&lt; T &gt;</a></td><td class="indexvalue">Holds the results from a division-with-remainder call </td></tr>
- <tr><td class="indexkey"><a class="el" href="classboost_1_1xint_1_1exceptions_1_1cannot__represent.html">boost::xint::exceptions::cannot_represent</a></td><td class="indexvalue"></td></tr>
- <tr><td class="indexkey"><a class="el" href="classboost_1_1xint_1_1default__random__generator.html">boost::xint::default_random_generator</a></td><td class="indexvalue">A convenience class for general-purpose (insecure) random numbers </td></tr>
- <tr><td class="indexkey"><a class="el" href="classdisable__boost__rv__ref.html">disable_boost_rv_ref&lt; T &gt;</a></td><td class="indexvalue"></td></tr>
- <tr><td class="indexkey"><a class="el" href="classboost_1_1xint_1_1exceptions_1_1divide__by__zero.html">boost::xint::exceptions::divide_by_zero</a></td><td class="indexvalue"></td></tr>
- <tr><td class="indexkey"><a class="el" href="classboost_1_1xint_1_1fixed__integer.html">boost::xint::fixed_integer&lt; Bits &gt;</a></td><td class="indexvalue">A fixed-size integer type </td></tr>
- <tr><td class="indexkey"><a class="el" href="classboost_1_1xint_1_1fixed__integer__any.html">boost::xint::fixed_integer_any</a></td><td class="indexvalue">The base class for all <a class="el" href="classboost_1_1xint_1_1fixed__integer.html" title="A fixed-size integer type.">fixed_integer</a> types </td></tr>
- <tr><td class="indexkey"><a class="el" href="classboost_1_1xint_1_1integer.html">boost::xint::integer</a></td><td class="indexvalue">The core integer class </td></tr>
- <tr><td class="indexkey"><a class="el" href="classboost_1_1xint_1_1exceptions_1_1invalid__argument.html">boost::xint::exceptions::invalid_argument</a></td><td class="indexvalue"></td></tr>
- <tr><td class="indexkey"><a class="el" href="classboost_1_1xint_1_1exceptions_1_1invalid__base.html">boost::xint::exceptions::invalid_base</a></td><td class="indexvalue"></td></tr>
- <tr><td class="indexkey"><a class="el" href="classboost_1_1xint_1_1exceptions_1_1invalid__digit.html">boost::xint::exceptions::invalid_digit</a></td><td class="indexvalue"></td></tr>
- <tr><td class="indexkey"><a class="el" href="classboost_1_1xint_1_1exceptions_1_1invalid__modulus.html">boost::xint::exceptions::invalid_modulus</a></td><td class="indexvalue"></td></tr>
- <tr><td class="indexkey"><a class="el" href="classboost_1_1xint_1_1exceptions_1_1no__strong__random.html">boost::xint::exceptions::no_strong_random</a></td><td class="indexvalue"></td></tr>
- <tr><td class="indexkey"><a class="el" href="classboost_1_1xint_1_1exceptions_1_1not__a__number.html">boost::xint::exceptions::not_a_number</a></td><td class="indexvalue"></td></tr>
- <tr><td class="indexkey"><a class="el" href="classboost_1_1xint_1_1nothrow__integer.html">boost::xint::nothrow_integer</a></td><td class="indexvalue">The nothrow_integer class </td></tr>
- <tr><td class="indexkey"><a class="el" href="classstd_1_1numeric__limits_3_01boost_1_1xint_1_1fixed__integer_3_01_bits_01_4_01_4.html">std::numeric_limits&lt; boost::xint::fixed_integer&lt; Bits &gt; &gt;</a></td><td class="indexvalue"></td></tr>
- <tr><td class="indexkey"><a class="el" href="classstd_1_1numeric__limits_3_01boost_1_1xint_1_1integer_01_4.html">std::numeric_limits&lt; boost::xint::integer &gt;</a></td><td class="indexvalue"></td></tr>
- <tr><td class="indexkey"><a class="el" href="classstd_1_1numeric__limits_3_01boost_1_1xint_1_1nothrow__integer_01_4.html">std::numeric_limits&lt; boost::xint::nothrow_integer &gt;</a></td><td class="indexvalue"></td></tr>
- <tr><td class="indexkey"><a class="el" href="classboost_1_1xint_1_1exceptions_1_1overflow__error.html">boost::xint::exceptions::overflow_error</a></td><td class="indexvalue"></td></tr>
- <tr><td class="indexkey"><a class="el" href="classboost_1_1xint_1_1strong__random__generator.html">boost::xint::strong_random_generator</a></td><td class="indexvalue">A convenience class for cryptographically-secure random numbers </td></tr>
- <tr><td class="indexkey"><a class="el" href="classboost_1_1xint_1_1exceptions_1_1too__big.html">boost::xint::exceptions::too_big</a></td><td class="indexvalue"></td></tr>
-</table>
-</div>
-<hr class="footer"/><address style="text-align: right;"><small>Generated on Tue May 4 10:20:16 2010 for The Extended Integer (XInt) Library by&nbsp;
-<a href="http://www.doxygen.org/index.html">
-<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.3 </small></address>
-</body>
-</html>

Deleted: sandbox/xint/doc/base__integer_8cpp.html
==============================================================================
--- sandbox/xint/doc/base__integer_8cpp.html 2010-05-31 20:43:54 EDT (Mon, 31 May 2010)
+++ (empty file)
@@ -1,51 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
-<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
-<title>The Extended Integer (XInt) Library: base_integer.cpp File Reference</title>
-<link href="tabs.css" rel="stylesheet" type="text/css"/>
-<link href="doxygen.css" rel="stylesheet" type="text/css"/>
-</head>
-<body>
-<!-- Generated by Doxygen 1.6.3 -->
-<div class="navigation" id="top">
- <div class="tabs">
- <ul>
- <li>Main Page</li>
- <li>Namespaces</li>
- <li>Classes</li>
- <li class="current">Files</li>
- </ul>
- </div>
- <div class="tabs">
- <ul>
- <li>File List</li>
- <li>File Members</li>
- </ul>
- </div>
-</div>
-<div class="contents">
-<h1>base_integer.cpp File Reference</h1>
-<p>Contains the definitions for the <code>base_integer</code> member functions.
-More...</p>
-
-<p>Go to the source code of this file.</p>
-<table border="0" cellpadding="0" cellspacing="0">
-<tr><td colspan="2"><h2>Namespaces</h2></td></tr>
-<tr><td class="memItemLeft" align="right" valign="top">namespace &nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespaceboost.html">boost</a></td></tr>
-<tr><td class="memItemLeft" align="right" valign="top">namespace &nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespaceboost_1_1xint.html">boost::xint</a></td></tr>
-
-<p><tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight"><p>All the types and functions of the library are within this namespace. </p>
-<br/></td></tr>
-</p>
-</table>
-<hr/><a name="_details"></a><h2>Detailed Description</h2>
-<p>Contains the definitions for the <code>base_integer</code> member functions. </p>
-
-<p>Definition in file <a class="el" href="base__integer_8cpp_source.html">base_integer.cpp</a>.</p>
-</div>
-<hr class="footer"/><address style="text-align: right;"><small>Generated on Tue May 4 10:20:16 2010 for The Extended Integer (XInt) Library by&nbsp;
-<a href="http://www.doxygen.org/index.html">
-<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.3 </small></address>
-</body>
-</html>

Deleted: sandbox/xint/doc/base__integer_8cpp_source.html
==============================================================================
--- sandbox/xint/doc/base__integer_8cpp_source.html 2010-05-31 20:43:54 EDT (Mon, 31 May 2010)
+++ (empty file)
@@ -1,390 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
-<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
-<title>The Extended Integer (XInt) Library: base_integer.cpp Source File</title>
-<link href="tabs.css" rel="stylesheet" type="text/css"/>
-<link href="doxygen.css" rel="stylesheet" type="text/css"/>
-</head>
-<body>
-<!-- Generated by Doxygen 1.6.3 -->
-<div class="navigation" id="top">
- <div class="tabs">
- <ul>
- <li>Main Page</li>
- <li>Namespaces</li>
- <li>Classes</li>
- <li class="current">Files</li>
- </ul>
- </div>
- <div class="tabs">
- <ul>
- <li>File List</li>
- <li>File Members</li>
- </ul>
- </div>
-<h1>base_integer.cpp</h1>Go to the documentation of this file.<div class="fragment"><pre class="fragment"><a name="l00001"></a>00001
-<a name="l00002"></a>00002 <span class="comment">/*</span>
-<a name="l00003"></a>00003 <span class="comment"> The Extended Integer (XInt) Library</span>
-<a name="l00004"></a>00004 <span class="comment"> A fast, portable C++ library for multi-precision integer math</span>
-<a name="l00005"></a>00005 <span class="comment"> Copyright 2010 by Chad Nelson</span>
-<a name="l00006"></a>00006 <span class="comment"></span>
-<a name="l00007"></a>00007 <span class="comment"> Distributed under the Boost Software License, Version 1.0.</span>
-<a name="l00008"></a>00008 <span class="comment"> See accompanying file LICENSE_1_0.txt or copy at</span>
-<a name="l00009"></a>00009 <span class="comment"> http://www.boost.org/LICENSE_1_0.txt>
-<a name="l00010"></a>00010 <span class="comment"></span>
-<a name="l00011"></a>00011 <span class="comment"> See
http://www.boost.org/libs/xint for library home page.</span>
-<a name="l00012"></a>00012 <span class="comment">*/</span>
-<a name="l00013"></a>00013
-<a name="l00018"></a>00018 <span class="preprocessor">#include &quot;../boost/xint/internals.hpp&quot;</span>
-<a name="l00019"></a>00019 <span class="preprocessor">#include &quot;../boost/xint/integer.hpp&quot;</span>
-<a name="l00020"></a>00020
-<a name="l00021"></a><a class="code" href="namespaceboost_1_1xint.html">00021</a> <span class="keyword">namespace </span>boost {
-<a name="l00022"></a>00022 <span class="keyword">namespace </span>xint {
-<a name="l00023"></a>00023
-<a name="l00025"></a>00025 <span class="keyword">namespace </span>detail {
-<a name="l00026"></a>00026
-<a name="l00027"></a>00027 <span class="keyword">struct </span>variable_zerodata_t: <span class="keyword">public</span> data_t {
-<a name="l00028"></a>00028 <span class="keyword">public</span>:
-<a name="l00029"></a>00029 variable_zerodata_t() { copies=1; fixed_mask=0; length=max_length=1;
-<a name="l00030"></a>00030 *magnitude=0; }
-<a name="l00031"></a>00031 };
-<a name="l00032"></a>00032
-<a name="l00033"></a>00033 variable_zerodata_t* variable_zerodata() {
-<a name="l00034"></a>00034 <span class="keyword">static</span> std::auto_ptr&lt;variable_zerodata_t&gt; z(<span class="keyword">new</span> variable_zerodata_t);
-<a name="l00035"></a>00035 <span class="keywordflow">return</span> z.get();
-<a name="l00036"></a>00036 }
-<a name="l00037"></a>00037
-<a name="l00039"></a>00039
-<a name="l00040"></a>00040 base_integer::base_integer(): flags(0), data(0) { }
-<a name="l00041"></a>00041
-<a name="l00042"></a>00042 base_integer::base_integer(<span class="keyword">const</span> base_integer&amp; c, <span class="keywordtype">bool</span> fixed): flags(0), data(0)
-<a name="l00043"></a>00043 {
-<a name="l00044"></a>00044 <span class="keywordflow">if</span> (fixed) flags |= flag_fixedlength;
-<a name="l00045"></a>00045 _attach(c, <span class="keyword">false</span>);
-<a name="l00046"></a>00046 }
-<a name="l00047"></a>00047
-<a name="l00048"></a>00048 base_integer::base_integer(<span class="keywordtype">size_t</span> count, digit_t mask): flags(flag_fixedlength),
-<a name="l00049"></a>00049 data(0)
-<a name="l00050"></a>00050 {
-<a name="l00051"></a>00051 _base_attach(allocate_fixed(mask, count, 1));
-<a name="l00052"></a>00052 }
-<a name="l00053"></a>00053
-<a name="l00054"></a>00054 base_integer::base_integer(data_t *adopt, <span class="keywordtype">bool</span> neg): flags(0), data(0) {
-<a name="l00055"></a>00055 <span class="keywordflow">if</span> (adopt &amp;&amp; adopt-&gt;fixed_mask != 0) flags |= flag_fixedlength;
-<a name="l00056"></a>00056 _base_attach(adopt);
-<a name="l00057"></a>00057 _set_negative(neg);
-<a name="l00058"></a>00058 }
-<a name="l00059"></a>00059
-<a name="l00060"></a>00060 base_integer::~base_integer() {
-<a name="l00061"></a>00061 <span class="keywordflow">if</span> (data &amp;&amp; --data-&gt;copies == 0) deallocate(data);
-<a name="l00062"></a>00062 }
-<a name="l00063"></a>00063
-<a name="l00064"></a>00064 digit_t base_integer::_get_digit(<span class="keywordtype">size_t</span> index)<span class="keyword"> const </span>{
-<a name="l00065"></a>00065 <span class="keywordflow">return</span> data-&gt;magnitude[index];
-<a name="l00066"></a>00066 }
-<a name="l00067"></a>00067
-<a name="l00068"></a>00068 digit_t base_integer::_get_digit(<span class="keywordtype">size_t</span> index, <span class="keywordtype">bool</span>)<span class="keyword"> const </span>{
-<a name="l00069"></a>00069 <span class="keywordflow">if</span> (index &gt;= data-&gt;length) <span class="keywordflow">return</span> 0;
-<a name="l00070"></a>00070 <span class="keywordflow">return</span> data-&gt;magnitude[index];
-<a name="l00071"></a>00071 }
-<a name="l00072"></a>00072
-<a name="l00073"></a>00073 digit_t* base_integer::_get_writable_digits() {
-<a name="l00074"></a>00074 assert(!_get_readonly());
-<a name="l00075"></a>00075 <span class="keywordflow">return</span> data-&gt;magnitude;
-<a name="l00076"></a>00076 }
-<a name="l00077"></a>00077
-<a name="l00078"></a>00078 <span class="keyword">const</span> digit_t* base_integer::_get_digits()<span class="keyword"> const </span>{
-<a name="l00079"></a>00079 <span class="keywordflow">return</span> data-&gt;magnitude;
-<a name="l00080"></a>00080 }
-<a name="l00081"></a>00081
-<a name="l00082"></a>00082 <span class="keywordtype">size_t</span> base_integer::_get_length()<span class="keyword"> const </span>{
-<a name="l00083"></a>00083 <span class="keywordflow">return</span> data-&gt;length;
-<a name="l00084"></a>00084 }
-<a name="l00085"></a>00085
-<a name="l00086"></a>00086 <span class="keywordtype">size_t</span> base_integer::_get_max_length()<span class="keyword"> const </span>{
-<a name="l00087"></a>00087 <span class="keywordflow">return</span> _is_fixed() ? _fixed_digits() : (std::numeric_limits&lt;size_t&gt;::max)();
-<a name="l00088"></a>00088 }
-<a name="l00089"></a>00089
-<a name="l00090"></a>00090 <span class="keywordtype">void</span> base_integer::_set_length(<span class="keywordtype">size_t</span> digits) {
-<a name="l00091"></a>00091 data-&gt;length = digits;
-<a name="l00092"></a>00092 }
-<a name="l00093"></a>00093
-<a name="l00094"></a>00094 <span class="keywordtype">size_t</span> base_integer::_log2()<span class="keyword"> const </span>{
-<a name="l00095"></a>00095 <span class="keywordtype">size_t</span> len = _get_length() - 1;
-<a name="l00096"></a>00096 <span class="keywordflow">return</span> (bits_per_digit * len) + <a class="code" href="namespaceboost_1_1xint.html#a0cd277cd7a80cda764f889781f0140cd" title="Get the log2 value of an integer.">log2</a>(_get_digit(len));
-<a name="l00097"></a>00097 }
-<a name="l00098"></a>00098
-<a name="l00099"></a>00099 <span class="keywordtype">void</span> base_integer::_set_unsigned(boost::uintmax_t n, <span class="keywordtype">bool</span> negative) {
-<a name="l00100"></a>00100 <span class="comment">// Assumes that the proper allocation &amp; sizing was already done</span>
-<a name="l00101"></a>00101 assert(!_get_readonly());
-<a name="l00102"></a>00102 <span class="keywordflow">if</span> (data == 0) _base_attach(allocate(detail::digits_in_uintmax));
-<a name="l00103"></a>00103 <span class="keywordflow">if</span> (digit_t(n) == n) {
-<a name="l00104"></a>00104 data-&gt;length = 1;
-<a name="l00105"></a>00105 *data-&gt;magnitude = digit_t(n);
-<a name="l00106"></a>00106 } <span class="keywordflow">else</span> {
-<a name="l00107"></a>00107 digit_t *i = data-&gt;magnitude, *ie = i + data-&gt;max_length;
-<a name="l00108"></a>00108 <span class="keywordflow">while</span> (n != 0 &amp;&amp; i != ie) {
-<a name="l00109"></a>00109 *i++ = digit_t(n &amp; digit_mask);
-<a name="l00110"></a>00110 n &gt;&gt;= bits_per_digit;
-<a name="l00111"></a>00111 }
-<a name="l00112"></a>00112 data-&gt;length = i - data-&gt;magnitude;
-<a name="l00113"></a>00113 }
-<a name="l00114"></a>00114 _set_negative(negative);
-<a name="l00115"></a>00115 _cleanup();
-<a name="l00116"></a>00116 }
-<a name="l00117"></a>00117
-<a name="l00118"></a>00118 <span class="keywordtype">void</span> base_integer::_set_signed(boost::intmax_t n) {
-<a name="l00119"></a>00119 <span class="keywordflow">if</span> (n &gt;= 0) {
-<a name="l00120"></a>00120 _set_unsigned(n);
-<a name="l00121"></a>00121 } <span class="keywordflow">else</span> <span class="keywordflow">if</span> (n == (std::numeric_limits&lt;boost::intmax_t&gt;::min)()) {
-<a name="l00122"></a>00122 <span class="comment">// Have to treat the minimum number carefully, because -n is not</span>
-<a name="l00123"></a>00123 <span class="comment">// what you&#39;d think it is.</span>
-<a name="l00124"></a>00124 _set_unsigned(-(n+1), <span class="keyword">true</span>);
-<a name="l00125"></a>00125 _decrement();
-<a name="l00126"></a>00126 } <span class="keywordflow">else</span> {
-<a name="l00127"></a>00127 _set_unsigned(-n, <span class="keyword">true</span>);
-<a name="l00128"></a>00128 }
-<a name="l00129"></a>00129 }
-<a name="l00130"></a>00130
-<a name="l00131"></a>00131 <span class="keywordtype">bool</span> base_integer::_is_unique()<span class="keyword"> const </span>{
-<a name="l00132"></a>00132 <span class="keywordflow">return</span> (!data || data-&gt;copies &lt;= 1);
-<a name="l00133"></a>00133 }
-<a name="l00134"></a>00134
-<a name="l00135"></a>00135 <span class="keywordtype">bool</span> base_integer::_is_zero()<span class="keyword"> const </span>{
-<a name="l00136"></a>00136 <span class="keywordflow">return</span> (data-&gt;length == 1 &amp;&amp; *data-&gt;magnitude == 0);
-<a name="l00137"></a>00137 }
-<a name="l00138"></a>00138
-<a name="l00139"></a>00139 <span class="keywordtype">bool</span> base_integer::_is_fixed()<span class="keyword"> const </span>{
-<a name="l00140"></a>00140 <span class="keywordflow">if</span> (data) <span class="keywordflow">return</span> (data-&gt;fixed_mask != 0);
-<a name="l00141"></a>00141 <span class="keywordflow">else</span> <span class="keywordflow">return</span> ((flags &amp; flag_fixedlength) != 0);
-<a name="l00142"></a>00142 }
-<a name="l00143"></a>00143
-<a name="l00144"></a>00144 <span class="keywordtype">size_t</span> base_integer::_fixed_digits()<span class="keyword"> const </span>{
-<a name="l00145"></a>00145 <span class="keywordflow">return</span> _is_fixed() ? data-&gt;max_length : 0;
-<a name="l00146"></a>00146 }
-<a name="l00147"></a>00147
-<a name="l00148"></a>00148 <span class="keywordtype">size_t</span> base_integer::_fixed_bits()<span class="keyword"> const </span>{
-<a name="l00149"></a>00149 <span class="keywordtype">size_t</span> digits = _fixed_digits();
-<a name="l00150"></a>00150 <span class="keywordflow">if</span> (digits != 0) <span class="keywordflow">return</span> ((digits - 1) * detail::bits_per_digit) +
-<a name="l00151"></a>00151 <a class="code" href="namespaceboost_1_1xint.html#a0cd277cd7a80cda764f889781f0140cd" title="Get the log2 value of an integer.">detail::log2</a>(data-&gt;fixed_mask);
-<a name="l00152"></a>00152 <span class="keywordflow">else</span> <span class="keywordflow">return</span> 0;
-<a name="l00153"></a>00153 }
-<a name="l00154"></a>00154
-<a name="l00155"></a>00155 <span class="keywordtype">bool</span> base_integer::_get_negative()<span class="keyword"> const </span>{
-<a name="l00156"></a>00156 <span class="keywordflow">return</span> ((flags &amp; flag_negative) ? <span class="keyword">true</span> : <span class="keyword">false</span>);
-<a name="l00157"></a>00157 }
-<a name="l00158"></a>00158
-<a name="l00159"></a>00159 <span class="keywordtype">void</span> base_integer::_set_negative(<span class="keywordtype">bool</span> neg) {
-<a name="l00160"></a>00160 <span class="keywordflow">if</span> (neg) flags |= flag_negative;
-<a name="l00161"></a>00161 <span class="keywordflow">else</span> flags &amp;= ~flag_negative;
-<a name="l00162"></a>00162 }
-<a name="l00163"></a>00163
-<a name="l00164"></a>00164 <span class="keywordtype">void</span> base_integer::_toggle_negative() {
-<a name="l00165"></a>00165 flags ^= flag_negative;
-<a name="l00166"></a>00166 }
-<a name="l00167"></a>00167
-<a name="l00168"></a>00168 <span class="keywordtype">bool</span> base_integer::_get_readonly()<span class="keyword"> const </span>{
-<a name="l00169"></a>00169 <span class="keywordflow">return</span> ((flags &amp; flag_readonly) ? <span class="keyword">true</span> : <span class="keyword">false</span>);
-<a name="l00170"></a>00170 }
-<a name="l00171"></a>00171
-<a name="l00172"></a>00172 <span class="keywordtype">void</span> base_integer::_set_readonly() {
-<a name="l00173"></a>00173 flags |= flag_readonly;
-<a name="l00174"></a>00174 }
-<a name="l00175"></a>00175
-<a name="l00176"></a>00176 <span class="keywordtype">void</span> base_integer::_realloc(<span class="keywordtype">size_t</span> new_digit_count) {
-<a name="l00177"></a>00177 data = reallocate(data, new_digit_count);
-<a name="l00178"></a>00178 }
-<a name="l00179"></a>00179
-<a name="l00180"></a>00180 <span class="keywordtype">void</span> base_integer::_make_unique() {
-<a name="l00181"></a>00181 <span class="keywordflow">if</span> (data &amp;&amp; !_is_unique()) {
-<a name="l00182"></a>00182 data_t *olddata = data;
-<a name="l00183"></a>00183
-<a name="l00184"></a>00184 data = (olddata-&gt;fixed_mask != 0 ?
-<a name="l00185"></a>00185 allocate_fixed(olddata-&gt;fixed_mask, olddata-&gt;max_length, 0) :
-<a name="l00186"></a>00186 allocate(olddata-&gt;length, 0));
-<a name="l00187"></a>00187 data-&gt;copies = 1;
-<a name="l00188"></a>00188 data-&gt;length = olddata-&gt;length;
-<a name="l00189"></a>00189
-<a name="l00190"></a>00190 digit_t *s = olddata-&gt;magnitude, *se = s + olddata-&gt;length;
-<a name="l00191"></a>00191 digit_t *t = data-&gt;magnitude;
-<a name="l00192"></a>00192 <span class="keywordflow">while</span> (s != se) *t++ = *s++;
-<a name="l00193"></a>00193
-<a name="l00194"></a>00194 --olddata-&gt;copies;
-<a name="l00195"></a>00195 }
-<a name="l00196"></a>00196 }
-<a name="l00197"></a>00197
-<a name="l00198"></a>00198 <span class="keywordtype">void</span> base_integer::_mark_movable() {
-<a name="l00199"></a>00199 <span class="keywordflow">if</span> (_is_unique()) flags |= flag_movable;
-<a name="l00200"></a>00200 }
-<a name="l00201"></a>00201
-<a name="l00202"></a>00202 <span class="keywordtype">bool</span> base_integer::_is_movable()<span class="keyword"> const </span>{
-<a name="l00203"></a>00203 <span class="keywordflow">return</span> ((flags &amp; flag_movable) ? <span class="keyword">true</span> : <span class="keyword">false</span>);
-<a name="l00204"></a>00204 }
-<a name="l00205"></a>00205
-<a name="l00206"></a>00206 <span class="keywordtype">void</span> base_integer::_swap(base_integer&amp; other) {
-<a name="l00207"></a>00207 flag_t tempflags = flags;
-<a name="l00208"></a>00208 flags = other.flags;
-<a name="l00209"></a>00209 other.flags = tempflags;
-<a name="l00210"></a>00210
-<a name="l00211"></a>00211 data_t *tempdata = data;
-<a name="l00212"></a>00212 data = other.data;
-<a name="l00213"></a>00213 other.data = tempdata;
-<a name="l00214"></a>00214 }
-<a name="l00215"></a>00215
-<a name="l00216"></a>00216 <span class="keywordtype">void</span> base_integer::_base_attach(data_t *new_data, flag_t setflags, <span class="keywordtype">size_t</span>
-<a name="l00217"></a>00217 extra_allocation, <span class="keywordtype">bool</span> is_movable)
-<a name="l00218"></a>00218 {
-<a name="l00219"></a>00219 <span class="preprocessor"> #ifdef BOOST_XINT_USE_COPY_ON_WRITE</span>
-<a name="l00220"></a>00220 <span class="preprocessor"></span> <span class="keywordtype">bool</span> adopt=<span class="keyword">true</span>;
-<a name="l00221"></a>00221 <span class="preprocessor"> #else</span>
-<a name="l00222"></a>00222 <span class="preprocessor"></span> <span class="keywordtype">bool</span> adopt=(new_data &amp;&amp; is_movable);
-<a name="l00223"></a>00223 <span class="preprocessor"> #endif</span>
-<a name="l00224"></a>00224 <span class="preprocessor"></span>
-<a name="l00225"></a>00225 <span class="keywordflow">if</span> (data != new_data || extra_allocation != 0) {
-<a name="l00226"></a>00226 <span class="comment">// If only one of them is fixed-length, the data can&#39;t be adopted.</span>
-<a name="l00227"></a>00227 <span class="keywordflow">if</span> (adopt &amp;&amp; new_data &amp;&amp; _is_fixed() != (new_data-&gt;fixed_mask != 0))
-<a name="l00228"></a>00228 adopt=<span class="keyword">false</span>;
-<a name="l00229"></a>00229
-<a name="l00230"></a>00230 <span class="comment">// If either of them are fixed-length, and they&#39;re not the same fixed-</span>
-<a name="l00231"></a>00231 <span class="comment">// length, then the data can&#39;t be adopted.</span>
-<a name="l00232"></a>00232 <span class="keywordflow">if</span> (adopt &amp;&amp; data &amp;&amp; new_data &amp;&amp; (data-&gt;fixed_mask ||
-<a name="l00233"></a>00233 new_data-&gt;fixed_mask) &amp;&amp; (data-&gt;fixed_mask != new_data-&gt;fixed_mask
-<a name="l00234"></a>00234 || data-&gt;max_length != new_data-&gt;max_length)) adopt=<span class="keyword">false</span>;
-<a name="l00235"></a>00235
-<a name="l00236"></a>00236 <span class="comment">// If we don&#39;t have a data item, but we&#39;re supposed to allocate extra</span>
-<a name="l00237"></a>00237 <span class="comment">// data, we can&#39;t adopt the existing data item.</span>
-<a name="l00238"></a>00238 <span class="keywordflow">if</span> (adopt &amp;&amp; extra_allocation != 0 &amp;&amp; !data) adopt=<span class="keyword">false</span>;
-<a name="l00239"></a>00239
-<a name="l00240"></a>00240 <span class="comment">// If extra_allocation is requested, and it&#39;s a variable-length integer,</span>
-<a name="l00241"></a>00241 <span class="comment">// check the max_size. If there isn&#39;t enough to fit in the</span>
-<a name="l00242"></a>00242 <span class="comment">// extra_allocation, don&#39;t allow adoption.</span>
-<a name="l00243"></a>00243 <span class="keywordflow">if</span> (adopt &amp;&amp; extra_allocation != 0 &amp;&amp; data-&gt;fixed_mask == 0)
-<a name="l00244"></a>00244 <span class="keywordflow">if</span> (data-&gt;length + extra_allocation &gt; data-&gt;max_length) adopt=<span class="keyword">false</span>;
-<a name="l00245"></a>00245
-<a name="l00246"></a>00246 <span class="keywordflow">if</span> (adopt) {
-<a name="l00247"></a>00247 <span class="keywordflow">if</span> (data &amp;&amp; --data-&gt;copies == 0) deallocate(data);
-<a name="l00248"></a>00248 data=new_data;
-<a name="l00249"></a>00249 <span class="keywordflow">if</span> (data) ++data-&gt;copies;
-<a name="l00250"></a>00250 } <span class="keywordflow">else</span> <span class="keywordflow">if</span> (new_data != 0) {
-<a name="l00251"></a>00251 <span class="comment">// Duplicate the data in a unique data_t item</span>
-<a name="l00252"></a>00252 <span class="keywordflow">if</span> (data == 0) {
-<a name="l00253"></a>00253 data = (_is_fixed() ?
-<a name="l00254"></a>00254 allocate_fixed(new_data-&gt;fixed_mask, new_data-&gt;max_length,
-<a name="l00255"></a>00255 0) :
-<a name="l00256"></a>00256 allocate(new_data-&gt;length + extra_allocation, 0));
-<a name="l00257"></a>00257 ++data-&gt;copies;
-<a name="l00258"></a>00258 } <span class="keywordflow">else</span> <span class="keywordflow">if</span> ((data-&gt;copies &gt; 1 || data-&gt;max_length &lt; new_data-&gt;length
-<a name="l00259"></a>00259 + extra_allocation) || _get_readonly())
-<a name="l00260"></a>00260 {
-<a name="l00261"></a>00261 data_t *olddata = data;
-<a name="l00262"></a>00262 data = (_is_fixed() ?
-<a name="l00263"></a>00263 allocate_fixed(data-&gt;fixed_mask, data-&gt;max_length, 0) :
-<a name="l00264"></a>00264 allocate(new_data-&gt;length + extra_allocation, 0));
-<a name="l00265"></a>00265 ++data-&gt;copies;
-<a name="l00266"></a>00266 <span class="keywordflow">if</span> (--olddata-&gt;copies == 0) deallocate(olddata);
-<a name="l00267"></a>00267 }
-<a name="l00268"></a>00268 data-&gt;length = (std::min)(new_data-&gt;length + extra_allocation,
-<a name="l00269"></a>00269 data-&gt;max_length);
-<a name="l00270"></a>00270
-<a name="l00271"></a>00271 digit_t *s = new_data-&gt;magnitude, *se = s + new_data-&gt;length;
-<a name="l00272"></a>00272 digit_t *t = data-&gt;magnitude, *te = t + data-&gt;length;
-<a name="l00273"></a>00273 <span class="keywordflow">while</span> (t != te &amp;&amp; s != se) *t++ = *s++;
-<a name="l00274"></a>00274 zero(t, te);
-<a name="l00275"></a>00275 } <span class="keywordflow">else</span> {
-<a name="l00276"></a>00276 <span class="keywordflow">if</span> (--data-&gt;copies == 0) deallocate(data);
-<a name="l00277"></a>00277 data=0;
-<a name="l00278"></a>00278 }
-<a name="l00279"></a>00279 }
-<a name="l00280"></a>00280 flags = setflags;
-<a name="l00281"></a>00281 }
-<a name="l00282"></a>00282
-<a name="l00283"></a>00283 <span class="keywordtype">void</span> base_integer::_attach(<span class="keyword">const</span> base_integer&amp; copy, <span class="keywordtype">bool</span> movable) {
-<a name="l00284"></a>00284 <span class="keywordtype">bool</span> move = (copy._is_movable() || (movable &amp;&amp; copy.data &amp;&amp;
-<a name="l00285"></a>00285 copy.data-&gt;copies &lt;= 1));
-<a name="l00286"></a>00286 _base_attach(copy.data, copy.flags, 0, move);
-<a name="l00287"></a>00287 <span class="keywordflow">if</span> (data) _cleanup();
-<a name="l00288"></a>00288 }
-<a name="l00289"></a>00289
-<a name="l00290"></a>00290 <span class="keywordtype">void</span> base_integer::_cleanup() {
-<a name="l00291"></a>00291 digit_t *p = data-&gt;magnitude + data-&gt;length - 1;
-<a name="l00292"></a>00292 <span class="keywordflow">if</span> (data-&gt;fixed_mask != 0 &amp;&amp; p == data-&gt;magnitude + data-&gt;max_length - 1)
-<a name="l00293"></a>00293 *p &amp;= data-&gt;fixed_mask;
-<a name="l00294"></a>00294 <span class="keywordflow">if</span> (*p == 0) {
-<a name="l00295"></a>00295 <span class="keywordflow">if</span> (p != data-&gt;magnitude) {
-<a name="l00296"></a>00296 <span class="keywordflow">while</span> (--p != data-&gt;magnitude &amp;&amp; *p == 0); <span class="comment">// Null loop</span>
-<a name="l00297"></a>00297 <span class="keywordflow">if</span> (*p == 0) _set_negative(<span class="keyword">false</span>); <span class="comment">// It&#39;s zero.</span>
-<a name="l00298"></a>00298 data-&gt;length = p - data-&gt;magnitude + 1;
-<a name="l00299"></a>00299 } <span class="comment">// It&#39;s zero, but it may legitimately be a &quot;negative zero&quot;, leave it.</span>
-<a name="l00300"></a>00300 }
-<a name="l00301"></a>00301 }
-<a name="l00302"></a>00302
-<a name="l00303"></a>00303 <a class="code" href="classboost_1_1xint_1_1integer.html" title="The core integer class.">integer</a> base_integer::_to_integer(<span class="keywordtype">bool</span> treat_as_movable)<span class="keyword"> const </span>{
-<a name="l00304"></a>00304 <a class="code" href="classboost_1_1xint_1_1integer.html" title="The core integer class.">integer</a> r;
-<a name="l00305"></a>00305 r._attach(*<span class="keyword">this</span>, treat_as_movable);
-<a name="l00306"></a>00306 <span class="keywordflow">return</span> r;
-<a name="l00307"></a>00307 }
-<a name="l00308"></a>00308
-<a name="l00309"></a>00309 <span class="keywordtype">void</span> base_integer::_increment(<span class="keywordtype">bool</span> absolute_value) {
-<a name="l00310"></a>00310 _make_unique();
-<a name="l00311"></a>00311 <span class="keywordflow">if</span> (_is_zero()) {
-<a name="l00312"></a>00312 data-&gt;magnitude[0] = 1;
-<a name="l00313"></a>00313 _set_negative(<span class="keyword">false</span>);
-<a name="l00314"></a>00314 } <span class="keywordflow">else</span> <span class="keywordflow">if</span> (!absolute_value &amp;&amp; _get_negative()) {
-<a name="l00315"></a>00315 _decrement(<span class="keyword">true</span>);
-<a name="l00316"></a>00316 } <span class="keywordflow">else</span> {
-<a name="l00317"></a>00317 _realloc(_get_length() + 1);
-<a name="l00318"></a>00318 digit_t *p = _get_writable_digits(), *pe = p + _get_length();
-<a name="l00319"></a>00319
-<a name="l00320"></a>00320 <span class="keywordflow">while</span> (p &lt; pe) {
-<a name="l00321"></a>00321 <span class="keywordflow">if</span> (*p == digit_mask) *p++ = 0;
-<a name="l00322"></a>00322 <span class="keywordflow">else</span> { *p++ += 1; <span class="keywordflow">break</span>; }
-<a name="l00323"></a>00323 }
-<a name="l00324"></a>00324 _cleanup();
-<a name="l00325"></a>00325 }
-<a name="l00326"></a>00326 }
-<a name="l00327"></a>00327
-<a name="l00328"></a>00328 <span class="keywordtype">void</span> base_integer::_decrement(<span class="keywordtype">bool</span> absolute_value) {
-<a name="l00329"></a>00329 _make_unique();
-<a name="l00330"></a>00330 <span class="keywordflow">if</span> (_is_zero()) {
-<a name="l00331"></a>00331 data-&gt;magnitude[0]=1;
-<a name="l00332"></a>00332 _set_negative(<span class="keyword">true</span>);
-<a name="l00333"></a>00333 } <span class="keywordflow">else</span> <span class="keywordflow">if</span> (!absolute_value &amp;&amp; _get_negative()) {
-<a name="l00334"></a>00334 _increment(<span class="keyword">true</span>);
-<a name="l00335"></a>00335 } <span class="keywordflow">else</span> {
-<a name="l00336"></a>00336 digit_t *p = _get_writable_digits(), *pe = p + _get_length();
-<a name="l00337"></a>00337 <span class="keywordflow">while</span> (p != pe) {
-<a name="l00338"></a>00338 <span class="keywordflow">if</span> (*p == 0) *p++ = digit_mask;
-<a name="l00339"></a>00339 <span class="keywordflow">else</span> { *p++ -= 1; <span class="keywordflow">break</span>; }
-<a name="l00340"></a>00340 }
-<a name="l00341"></a>00341 _cleanup();
-<a name="l00342"></a>00342 }
-<a name="l00343"></a>00343 }
-<a name="l00344"></a>00344
-<a name="l00346"></a>00346
-<a name="l00347"></a>00347 <span class="keywordtype">void</span> base_variable_length_integer::_attach_0() {
-<a name="l00348"></a>00348 _base_attach(variable_zerodata());
-<a name="l00349"></a>00349 }
-<a name="l00350"></a>00350
-<a name="l00351"></a>00351 <span class="keywordtype">size_t</span> log10_bits(<span class="keywordtype">size_t</span> bits) {
-<a name="l00352"></a>00352 assert(std::numeric_limits&lt;boost::intmax_t&gt;::digits &gt;= 32);
-<a name="l00353"></a>00353 <span class="keyword">const</span> boost::intmax_t large_step(1000000000), small_step(10);
-<a name="l00354"></a>00354 <span class="keyword">const</span> <span class="keywordtype">size_t</span> count_per_large_step = 9, count_per_small_step = 1;
-<a name="l00355"></a>00355 <a class="code" href="classboost_1_1xint_1_1integer.html" title="The core integer class.">integer</a> n(<a class="code" href="namespaceboost_1_1xint.html#af710e4b39cfa66096c202f17d12cc7b7" title="Calculate the value of 2e">pow2</a>(bits)-1);
-<a name="l00356"></a>00356
-<a name="l00357"></a>00357 <span class="keywordtype">size_t</span> r = 0;
-<a name="l00358"></a>00358 <span class="keywordflow">while</span> (n &gt;= large_step) { n /= large_step; r += count_per_large_step; }
-<a name="l00359"></a>00359 <span class="keywordflow">while</span> (n &gt;= small_step) { n /= small_step; r += count_per_small_step; }
-<a name="l00360"></a>00360 <span class="keywordflow">return</span> r;
-<a name="l00361"></a>00361 }
-<a name="l00362"></a>00362
-<a name="l00363"></a>00363 } <span class="comment">// namespace detail</span>
-<a name="l00365"></a>00365 <span class="comment"></span>
-<a name="l00366"></a>00366 } <span class="comment">// namespace xint</span>
-<a name="l00367"></a>00367 } <span class="comment">// namespace boost</span>
-</pre></div></div>
-<hr class="footer"/><address style="text-align: right;"><small>Generated on Tue May 4 10:20:16 2010 for The Extended Integer (XInt) Library by&nbsp;
-<a href="http://www.doxygen.org/index.html">
-<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.3 </small></address>
-</body>
-</html>

Deleted: sandbox/xint/doc/bit__manipulations_8cpp.html
==============================================================================
--- sandbox/xint/doc/bit__manipulations_8cpp.html 2010-05-31 20:43:54 EDT (Mon, 31 May 2010)
+++ (empty file)
@@ -1,77 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
-<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
-<title>The Extended Integer (XInt) Library: bit_manipulations.cpp File Reference</title>
-<link href="tabs.css" rel="stylesheet" type="text/css"/>
-<link href="doxygen.css" rel="stylesheet" type="text/css"/>
-</head>
-<body>
-<!-- Generated by Doxygen 1.6.3 -->
-<div class="navigation" id="top">
- <div class="tabs">
- <ul>
- <li>Main Page</li>
- <li>Namespaces</li>
- <li>Classes</li>
- <li class="current">Files</li>
- </ul>
- </div>
- <div class="tabs">
- <ul>
- <li>File List</li>
- <li>File Members</li>
- </ul>
- </div>
-</div>
-<div class="contents">
-<h1>bit_manipulations.cpp File Reference</h1>
-<p>Contains the bit-manipulation functions.
-More...</p>
-
-<p>Go to the source code of this file.</p>
-<table border="0" cellpadding="0" cellspacing="0">
-<tr><td colspan="2"><h2>Namespaces</h2></td></tr>
-<tr><td class="memItemLeft" align="right" valign="top">namespace &nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespaceboost.html">boost</a></td></tr>
-<tr><td class="memItemLeft" align="right" valign="top">namespace &nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespaceboost_1_1xint.html">boost::xint</a></td></tr>
-
-<p><tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight"><p>All the types and functions of the library are within this namespace. </p>
-<br/></td></tr>
-</p>
-<tr><td colspan="2"><h2>Functions</h2></td></tr>
-<tr><td colspan="2"><div class="groupHeader">Bit-manipulation functions</div></td></tr>
-<tr><td colspan="2"><div class="groupText"><p><a class="anchor" id="amgrpcc775c18f98f26f2b84ac7a2558636f2"></a> </p>
-</div></td></tr>
-<tr><td class="memItemLeft" align="right" valign="top">integer&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespaceboost_1_1xint.html#ab828c0be1559b60537b959ef75092fb2">boost::xint::bitwise_and</a> (const integer &amp;n1, const integer &amp;n2)</td></tr>
-<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Combine two integers using a bitwise <code>AND</code> operation. <br/></td></tr>
-<tr><td class="memItemLeft" align="right" valign="top">integer&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespaceboost_1_1xint.html#ab38ce0764a4b6433e11e30efa2175fec">boost::xint::bitwise_or</a> (const integer &amp;n1, const integer &amp;n2)</td></tr>
-<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Combine two integers using a bitwise <code>OR</code> operation. <br/></td></tr>
-<tr><td class="memItemLeft" align="right" valign="top">integer&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespaceboost_1_1xint.html#a6afd5af4550b698f6a7065f457fcb0a1">boost::xint::bitwise_xor</a> (const integer &amp;n1, const integer &amp;n2)</td></tr>
-<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Combine two integers using a bitwise <code>XOR</code> operation. <br/></td></tr>
-<tr><td class="memItemLeft" align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespaceboost_1_1xint.html#a96d452df71ac6799a7041647b4b106df">boost::xint::clearbit</a> (integer &amp;n, size_t bit)</td></tr>
-<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Sets a specific bit in an integer to zero. <br/></td></tr>
-<tr><td class="memItemLeft" align="right" valign="top">detail bool&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespaceboost_1_1xint.html#ac00836bdc530b3eaf0a9b9f2e208273b">boost::xint::getbit</a> (const integer &amp;n, size_t bit)</td></tr>
-<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Queries the value of a particular bit in an integer. <br/></td></tr>
-<tr><td class="memItemLeft" align="right" valign="top">size_t&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespaceboost_1_1xint.html#aec002c076eff13d0382c5d2cd6de1d60">boost::xint::highestbit</a> (const integer &amp;n, size_t valueIfZero)</td></tr>
-<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Obtains the index of the highest bit in an integer with a value of one. <br/></td></tr>
-<tr><td class="memItemLeft" align="right" valign="top">size_t&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespaceboost_1_1xint.html#a783e728f8221cd424d6f7f5d5f67ec40">boost::xint::lowestbit</a> (const integer &amp;n, size_t valueIfZero)</td></tr>
-<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Obtains the index of the lowest bit in an integer with a value of one. <br/></td></tr>
-<tr><td class="memItemLeft" align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespaceboost_1_1xint.html#a6278915cf51b0d448a9db40031226182">boost::xint::setbit</a> (integer &amp;n, size_t bit)</td></tr>
-<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Sets a specific bit in an integer to one. <br/></td></tr>
-<tr><td class="memItemLeft" align="right" valign="top">integer&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespaceboost_1_1xint.html#aaed048f3dc3a442152ebffa3f721d014">boost::xint::shift</a> (const integer &amp;n, int byBits)</td></tr>
-<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Bit-shift an integer, in either direction. <br/></td></tr>
-<tr><td class="memItemLeft" align="right" valign="top">integer&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespaceboost_1_1xint.html#ae22c3492ecf08370a9a972c8d6fb8e96">boost::xint::shift_left</a> (const integer &amp;n, size_t byBits)</td></tr>
-<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Left-shift an integer by a specified number of bits. <br/></td></tr>
-<tr><td class="memItemLeft" align="right" valign="top">integer&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespaceboost_1_1xint.html#aca7453fa9e276ebefacc9827b55f69d2">boost::xint::shift_right</a> (const integer &amp;n, size_t byBits)</td></tr>
-<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Right-shift an integer by a specified number of bits. <br/></td></tr>
-</table>
-<hr/><a name="_details"></a><h2>Detailed Description</h2>
-<p>Contains the bit-manipulation functions. </p>
-
-<p>Definition in file <a class="el" href="bit__manipulations_8cpp_source.html">bit_manipulations.cpp</a>.</p>
-</div>
-<hr class="footer"/><address style="text-align: right;"><small>Generated on Tue May 4 10:20:16 2010 for The Extended Integer (XInt) Library by&nbsp;
-<a href="http://www.doxygen.org/index.html">
-<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.3 </small></address>
-</body>
-</html>

Deleted: sandbox/xint/doc/bit__manipulations_8cpp_source.html
==============================================================================
--- sandbox/xint/doc/bit__manipulations_8cpp_source.html 2010-05-31 20:43:54 EDT (Mon, 31 May 2010)
+++ (empty file)
@@ -1,301 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
-<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
-<title>The Extended Integer (XInt) Library: bit_manipulations.cpp Source File</title>
-<link href="tabs.css" rel="stylesheet" type="text/css"/>
-<link href="doxygen.css" rel="stylesheet" type="text/css"/>
-</head>
-<body>
-<!-- Generated by Doxygen 1.6.3 -->
-<div class="navigation" id="top">
- <div class="tabs">
- <ul>
- <li>Main Page</li>
- <li>Namespaces</li>
- <li>Classes</li>
- <li class="current">Files</li>
- </ul>
- </div>
- <div class="tabs">
- <ul>
- <li>File List</li>
- <li>File Members</li>
- </ul>
- </div>
-<h1>bit_manipulations.cpp</h1>Go to the documentation of this file.<div class="fragment"><pre class="fragment"><a name="l00001"></a>00001
-<a name="l00002"></a>00002 <span class="comment">/*</span>
-<a name="l00003"></a>00003 <span class="comment"> The Extended Integer (XInt) Library</span>
-<a name="l00004"></a>00004 <span class="comment"> A fast, portable C++ library for multi-precision integer math</span>
-<a name="l00005"></a>00005 <span class="comment"> Copyright 2010 by Chad Nelson</span>
-<a name="l00006"></a>00006 <span class="comment"></span>
-<a name="l00007"></a>00007 <span class="comment"> Distributed under the Boost Software License, Version 1.0.</span>
-<a name="l00008"></a>00008 <span class="comment"> See accompanying file LICENSE_1_0.txt or copy at</span>
-<a name="l00009"></a>00009 <span class="comment"> http://www.boost.org/LICENSE_1_0.txt>
-<a name="l00010"></a>00010 <span class="comment"></span>
-<a name="l00011"></a>00011 <span class="comment"> See
http://www.boost.org/libs/xint for library home page.</span>
-<a name="l00012"></a>00012 <span class="comment">*/</span>
-<a name="l00013"></a>00013
-<a name="l00018"></a>00018 <span class="preprocessor">#include &quot;../boost/xint/integer.hpp&quot;</span>
-<a name="l00019"></a>00019
-<a name="l00020"></a>00020 <span class="keyword">namespace </span>boost {
-<a name="l00021"></a>00021 <span class="keyword">namespace </span>xint {
-<a name="l00022"></a>00022
-<a name="l00024"></a>00024 <span class="keyword">namespace </span>detail {
-<a name="l00025"></a>00025
-<a name="l00026"></a>00026 <span class="keywordtype">bool</span> <a class="code" href="namespaceboost_1_1xint.html#ac00836bdc530b3eaf0a9b9f2e208273b" title="Queries the value of a particular bit in an integer.">getbit</a>(<span class="keyword">const</span> base_integer&amp; n, <span class="keywordtype">size_t</span> bit) {
-<a name="l00027"></a>00027 <span class="keywordtype">size_t</span> index = bit / bits_per_digit;
-<a name="l00028"></a>00028 <span class="keywordflow">if</span> (index &lt; n._get_length()) {
-<a name="l00029"></a>00029 digit_t mask=(digit_t(1) &lt;&lt; (bit % bits_per_digit));
-<a name="l00030"></a>00030 <span class="keywordflow">return</span> ((n._get_digit(index) &amp; mask) != 0);
-<a name="l00031"></a>00031 } <span class="keywordflow">else</span> <span class="keywordflow">return</span> <span class="keyword">false</span>;
-<a name="l00032"></a>00032 }
-<a name="l00033"></a>00033
-<a name="l00034"></a>00034 <span class="keywordtype">void</span> <a class="code" href="namespaceboost_1_1xint.html#a6278915cf51b0d448a9db40031226182" title="Sets a specific bit in an integer to one.">setbit</a>(base_integer&amp; n, <span class="keywordtype">size_t</span> bit) {
-<a name="l00035"></a>00035 <span class="keywordflow">if</span> (n._is_fixed() &amp;&amp; bit &gt;= n._fixed_bits()) <span class="keywordflow">return</span>;
-<a name="l00036"></a>00036
-<a name="l00037"></a>00037 n._make_unique();
-<a name="l00038"></a>00038
-<a name="l00039"></a>00039 <span class="keywordtype">size_t</span> index = bit / bits_per_digit;
-<a name="l00040"></a>00040 <span class="keywordflow">if</span> (index &gt;= n._get_length()) n._realloc(index+1);
-<a name="l00041"></a>00041
-<a name="l00042"></a>00042 digit_t mask = (digit_t(1) &lt;&lt; (bit % bits_per_digit));
-<a name="l00043"></a>00043 n._get_writable_digits()[index] |= mask;
-<a name="l00044"></a>00044 n._cleanup();
-<a name="l00045"></a>00045 }
-<a name="l00046"></a>00046
-<a name="l00047"></a>00047 <span class="keywordtype">void</span> <a class="code" href="namespaceboost_1_1xint.html#a96d452df71ac6799a7041647b4b106df" title="Sets a specific bit in an integer to zero.">clearbit</a>(base_integer&amp; n, <span class="keywordtype">size_t</span> bit) {
-<a name="l00048"></a>00048 <span class="keywordflow">if</span> (n._is_fixed() &amp;&amp; bit &gt;= n._fixed_bits()) <span class="keywordflow">return</span>;
-<a name="l00049"></a>00049
-<a name="l00050"></a>00050 <span class="keywordtype">size_t</span> index = bit / bits_per_digit;
-<a name="l00051"></a>00051 <span class="keywordflow">if</span> (index &lt; n._get_length()) {
-<a name="l00052"></a>00052 n._make_unique();
-<a name="l00053"></a>00053 digit_t mask=(digit_t(1) &lt;&lt; (bit % bits_per_digit));
-<a name="l00054"></a>00054 n._get_writable_digits()[index] &amp;= ~mask;
-<a name="l00055"></a>00055 n._cleanup();
-<a name="l00056"></a>00056 }
-<a name="l00057"></a>00057 }
-<a name="l00058"></a>00058
-<a name="l00059"></a>00059 <span class="keywordtype">size_t</span> <a class="code" href="namespaceboost_1_1xint.html#a783e728f8221cd424d6f7f5d5f67ec40" title="Obtains the index of the lowest bit in an integer with a value of one.">lowestbit</a>(<span class="keyword">const</span> base_integer&amp; n, <span class="keywordtype">size_t</span> valueIfZero) {
-<a name="l00060"></a>00060 <span class="keywordflow">if</span> (n._is_zero()) <span class="keywordflow">return</span> valueIfZero;
-<a name="l00061"></a>00061
-<a name="l00062"></a>00062 <span class="keyword">const</span> digit_t *p=n._get_digits(), *pe=p+n._get_length();
-<a name="l00063"></a>00063 <span class="keywordflow">while</span> (p!=pe &amp;&amp; *p==0) ++p;
-<a name="l00064"></a>00064
-<a name="l00065"></a>00065 <span class="keywordtype">size_t</span> index=(p - n._get_digits());
-<a name="l00066"></a>00066 <span class="keywordtype">size_t</span> r=(bits_per_digit * index);
-<a name="l00067"></a>00067 digit_t digit=*p;
-<a name="l00068"></a>00068
-<a name="l00069"></a>00069 <span class="keywordflow">while</span> ((digit &amp; 0x01)==0) {
-<a name="l00070"></a>00070 digit&gt;&gt;=1;
-<a name="l00071"></a>00071 ++r;
-<a name="l00072"></a>00072 }
-<a name="l00073"></a>00073
-<a name="l00074"></a>00074 <span class="keywordflow">return</span> r;
-<a name="l00075"></a>00075 }
-<a name="l00076"></a>00076
-<a name="l00077"></a>00077 <span class="keywordtype">size_t</span> <a class="code" href="namespaceboost_1_1xint.html#aec002c076eff13d0382c5d2cd6de1d60" title="Obtains the index of the highest bit in an integer with a value of one.">highestbit</a>(<span class="keyword">const</span> base_integer&amp; n, <span class="keywordtype">size_t</span> valueIfZero) {
-<a name="l00078"></a>00078 <span class="keywordflow">return</span> (n._is_zero() ? valueIfZero : n._log2()-1);
-<a name="l00079"></a>00079 }
-<a name="l00080"></a>00080
-<a name="l00081"></a>00081 <span class="keywordtype">void</span> <a class="code" href="namespaceboost_1_1xint.html#ab828c0be1559b60537b959ef75092fb2" title="Combine two integers using a bitwise AND operation.">bitwise_and</a>(base_integer&amp; target, <span class="keyword">const</span> base_integer&amp; n1, <span class="keyword">const</span>
-<a name="l00082"></a>00082 base_integer&amp; n2)
-<a name="l00083"></a>00083 {
-<a name="l00084"></a>00084 <span class="keywordtype">bool</span> n1larger=(n1._get_length() &gt; n2._get_length());
-<a name="l00085"></a>00085 <span class="keyword">const</span> base_integer &amp;smaller(n1larger ? n2 : n1),
-<a name="l00086"></a>00086 &amp;larger(n1larger ? n1 : n2);
-<a name="l00087"></a>00087
-<a name="l00088"></a>00088 <span class="keywordtype">size_t</span> maxlen = (std::min)(smaller._get_length(), target._get_max_length());
-<a name="l00089"></a>00089
-<a name="l00090"></a>00090 target._make_unique();
-<a name="l00091"></a>00091 target._realloc(maxlen);
-<a name="l00092"></a>00092
-<a name="l00093"></a>00093 <span class="keyword">const</span> digit_t *s1 = smaller._get_digits(), *s1e = s1 + maxlen, *s2 =
-<a name="l00094"></a>00094 larger._get_digits();
-<a name="l00095"></a>00095 digit_t *t = target._get_writable_digits();
-<a name="l00096"></a>00096
-<a name="l00097"></a>00097 <span class="keywordflow">while</span> (s1 &lt; s1e) *t++ = *s1++ &amp; *s2++;
-<a name="l00098"></a>00098
-<a name="l00099"></a>00099 target._cleanup();
-<a name="l00100"></a>00100 }
-<a name="l00101"></a>00101
-<a name="l00102"></a>00102 <span class="keywordtype">void</span> <a class="code" href="namespaceboost_1_1xint.html#ab38ce0764a4b6433e11e30efa2175fec" title="Combine two integers using a bitwise OR operation.">bitwise_or</a>(base_integer&amp; target, <span class="keyword">const</span> base_integer&amp; n1, <span class="keyword">const</span>
-<a name="l00103"></a>00103 base_integer&amp; n2)
-<a name="l00104"></a>00104 {
-<a name="l00105"></a>00105 <span class="keywordtype">bool</span> n1larger = (n1._get_length() &gt; n2._get_length());
-<a name="l00106"></a>00106 <span class="keyword">const</span> base_integer &amp;smaller(n1larger ? n2 : n1), &amp;larger(n1larger ? n1 : n2);
-<a name="l00107"></a>00107
-<a name="l00108"></a>00108 <span class="keywordtype">size_t</span> maxlen = (std::min)(larger._get_length(), target._get_max_length());
-<a name="l00109"></a>00109
-<a name="l00110"></a>00110 target._make_unique();
-<a name="l00111"></a>00111 target._realloc(maxlen);
-<a name="l00112"></a>00112
-<a name="l00113"></a>00113 <span class="keyword">const</span> digit_t *s1 = smaller._get_digits(), *s1e = s1 +
-<a name="l00114"></a>00114 (std::min)(smaller._get_length(), maxlen);
-<a name="l00115"></a>00115 <span class="keyword">const</span> digit_t *s2 = larger._get_digits(), *s2e = s2 + maxlen;
-<a name="l00116"></a>00116 digit_t *t = target._get_writable_digits();
-<a name="l00117"></a>00117
-<a name="l00118"></a>00118 <span class="keywordflow">while</span> (s1 &lt; s1e) *t++ = *s1++ | *s2++;
-<a name="l00119"></a>00119 <span class="keywordflow">while</span> (s2 &lt; s2e) *t++ = *s2++;
-<a name="l00120"></a>00120
-<a name="l00121"></a>00121 target._cleanup();
-<a name="l00122"></a>00122 }
-<a name="l00123"></a>00123
-<a name="l00124"></a>00124 <span class="keywordtype">void</span> <a class="code" href="namespaceboost_1_1xint.html#a6afd5af4550b698f6a7065f457fcb0a1" title="Combine two integers using a bitwise XOR operation.">bitwise_xor</a>(base_integer&amp; target, <span class="keyword">const</span> base_integer&amp; n1, <span class="keyword">const</span>
-<a name="l00125"></a>00125 base_integer&amp; n2)
-<a name="l00126"></a>00126 {
-<a name="l00127"></a>00127 <span class="keywordtype">bool</span> n1larger=(n1._get_length() &gt; n2._get_length());
-<a name="l00128"></a>00128 <span class="keyword">const</span> base_integer &amp;smaller(n1larger ? n2 : n1), &amp;larger(n1larger ? n1 : n2);
-<a name="l00129"></a>00129
-<a name="l00130"></a>00130 <span class="keywordtype">size_t</span> maxlen = (std::min)(larger._get_length(), target._get_max_length());
-<a name="l00131"></a>00131
-<a name="l00132"></a>00132 target._make_unique();
-<a name="l00133"></a>00133 target._realloc(maxlen);
-<a name="l00134"></a>00134
-<a name="l00135"></a>00135 <span class="keyword">const</span> digit_t *s1 = smaller._get_digits(), *s1e = s1 +
-<a name="l00136"></a>00136 (std::min)(smaller._get_length(), maxlen);
-<a name="l00137"></a>00137 <span class="keyword">const</span> digit_t *s2 = larger._get_digits(), *s2e = s2 + maxlen;
-<a name="l00138"></a>00138 digit_t *t = target._get_writable_digits();
-<a name="l00139"></a>00139
-<a name="l00140"></a>00140 <span class="keywordflow">while</span> (s1&lt;s1e) *t++ = *s1++ ^ *s2++;
-<a name="l00141"></a>00141 <span class="keywordflow">while</span> (s2&lt;s2e) *t++ = *s2++;
-<a name="l00142"></a>00142
-<a name="l00143"></a>00143 target._cleanup();
-<a name="l00144"></a>00144 }
-<a name="l00145"></a>00145
-<a name="l00146"></a>00146 <span class="keywordtype">void</span> <a class="code" href="namespaceboost_1_1xint.html#ae22c3492ecf08370a9a972c8d6fb8e96" title="Left-shift an integer by a specified number of bits.">shift_left</a>(base_integer&amp; target, <span class="keyword">const</span> base_integer&amp; n, <span class="keywordtype">size_t</span> byBits) {
-<a name="l00147"></a>00147 <span class="keywordflow">if</span> (byBits==0) {
-<a name="l00148"></a>00148 target._attach(n, <span class="keyword">false</span>);
-<a name="l00149"></a>00149 <span class="keywordflow">return</span>;
-<a name="l00150"></a>00150 }
-<a name="l00151"></a>00151
-<a name="l00152"></a>00152 <span class="keywordtype">size_t</span> bytes = byBits / bits_per_digit, bits = byBits % bits_per_digit;
-<a name="l00153"></a>00153 <span class="keywordtype">size_t</span> nlen = n._get_length();
-<a name="l00154"></a>00154
-<a name="l00155"></a>00155 temp_t answer(target, n._get_length() + bytes + 1);
-<a name="l00156"></a>00156 digit_t *tgt = answer._get_writable_digits();
-<a name="l00157"></a>00157 <span class="keywordtype">size_t</span> anslen = answer._get_max_length();
-<a name="l00158"></a>00158
-<a name="l00159"></a>00159 <span class="keyword">const</span> digit_t *src = n._get_digits();
-<a name="l00160"></a>00160
-<a name="l00161"></a>00161 <span class="comment">// bits/bytes is distance to move</span>
-<a name="l00162"></a>00162 <span class="comment">// nlen is one greater than top source byte to move</span>
-<a name="l00163"></a>00163 nlen = (std::min)(nlen, anslen - bytes - (bits != 0 ? 1 : 0));
-<a name="l00164"></a>00164
-<a name="l00165"></a>00165 <span class="keywordflow">if</span> (bits != 0 &amp;&amp; bytes+1 &lt; anslen) {
-<a name="l00166"></a>00166 <span class="comment">// Handle both bits and bytes in one pass</span>
-<a name="l00167"></a>00167 <span class="keyword">const</span> digit_t *s = src + nlen - 1;
-<a name="l00168"></a>00168 digit_t *t = tgt + nlen + bytes;
-<a name="l00169"></a>00169
-<a name="l00170"></a>00170 *t-- = *s &gt;&gt; (bits_per_digit - bits);
-<a name="l00171"></a>00171 <span class="keywordflow">while</span> (s &gt; src) {
-<a name="l00172"></a>00172 *t = (*s-- &lt;&lt; bits);
-<a name="l00173"></a>00173 *t-- |= (*s &gt;&gt; (bits_per_digit - bits));
-<a name="l00174"></a>00174 }
-<a name="l00175"></a>00175 *t = (*s &lt;&lt; bits);
-<a name="l00176"></a>00176 } <span class="keywordflow">else</span> <span class="keywordflow">if</span> (bytes != 0 &amp;&amp; bytes+1 &lt; anslen) {
-<a name="l00177"></a>00177 memcpy(tgt + bytes, src, <span class="keyword">sizeof</span>(digit_t) * nlen);
-<a name="l00178"></a>00178 }
-<a name="l00179"></a>00179 answer._cleanup();
-<a name="l00180"></a>00180 answer._set_negative(n._get_negative());
-<a name="l00181"></a>00181 target._attach(answer, <span class="keyword">true</span>);
-<a name="l00182"></a>00182 }
-<a name="l00183"></a>00183
-<a name="l00184"></a>00184 <span class="keywordtype">void</span> <a class="code" href="namespaceboost_1_1xint.html#aca7453fa9e276ebefacc9827b55f69d2" title="Right-shift an integer by a specified number of bits.">shift_right</a>(base_integer&amp; target, <span class="keyword">const</span> base_integer&amp; n, <span class="keywordtype">size_t</span> byBits) {
-<a name="l00185"></a>00185 <span class="keywordflow">if</span> (byBits==0) {
-<a name="l00186"></a>00186 target._attach(n, <span class="keyword">false</span>);
-<a name="l00187"></a>00187 <span class="keywordflow">return</span>;
-<a name="l00188"></a>00188 }
-<a name="l00189"></a>00189
-<a name="l00190"></a>00190 <span class="keywordtype">size_t</span> bytes = byBits / bits_per_digit, bits = byBits % bits_per_digit,
-<a name="l00191"></a>00191 bits2 = bits_per_digit - bits;
-<a name="l00192"></a>00192
-<a name="l00193"></a>00193 temp_t answer(target, n._get_length() + bytes + 1);
-<a name="l00194"></a>00194 digit_t *tgt = answer._get_writable_digits();
-<a name="l00195"></a>00195
-<a name="l00196"></a>00196 <span class="keywordtype">size_t</span> nlen = n._get_length();
-<a name="l00197"></a>00197 <span class="keyword">const</span> digit_t *src = n._get_digits();
-<a name="l00198"></a>00198 <span class="keywordflow">if</span> (bytes &lt; nlen) {
-<a name="l00199"></a>00199 <span class="keywordflow">if</span> (bits != 0) {
-<a name="l00200"></a>00200 <span class="comment">// Handle both bits and bytes in one pass</span>
-<a name="l00201"></a>00201 <span class="keyword">const</span> digit_t *s = src + bytes, *se = src + nlen - 1;
-<a name="l00202"></a>00202 digit_t *t = tgt;
-<a name="l00203"></a>00203 <span class="keywordflow">while</span> (s!=se) {
-<a name="l00204"></a>00204 *t = (*s++ &gt;&gt; bits);
-<a name="l00205"></a>00205 *t++ |= (*s &lt;&lt; bits2);
-<a name="l00206"></a>00206 }
-<a name="l00207"></a>00207 *t = (*s &gt;&gt; bits);
-<a name="l00208"></a>00208 } <span class="keywordflow">else</span> <span class="keywordflow">if</span> (bytes != 0) {
-<a name="l00209"></a>00209 memcpy(tgt, src + bytes, <span class="keyword">sizeof</span>(digit_t) * (nlen - bytes));
-<a name="l00210"></a>00210 }
-<a name="l00211"></a>00211 }
-<a name="l00212"></a>00212 answer._cleanup();
-<a name="l00213"></a>00213 answer._set_negative(n._get_negative());
-<a name="l00214"></a>00214 target._attach(answer, <span class="keyword">true</span>);
-<a name="l00215"></a>00215 }
-<a name="l00216"></a>00216
-<a name="l00217"></a>00217 } <span class="comment">// namespace detail</span>
-<a name="l00219"></a>00219 <span class="comment"></span>
-<a name="l00230"></a>00230 <span class="keywordtype">bool</span> <a class="code" href="namespaceboost_1_1xint.html#ac00836bdc530b3eaf0a9b9f2e208273b" title="Queries the value of a particular bit in an integer.">getbit</a>(<span class="keyword">const</span> integer&amp; n, <span class="keywordtype">size_t</span> bit) {
-<a name="l00231"></a>00231 <span class="keywordflow">return</span> <a class="code" href="namespaceboost_1_1xint.html#ac00836bdc530b3eaf0a9b9f2e208273b" title="Queries the value of a particular bit in an integer.">detail::getbit</a>(n, bit);
-<a name="l00232"></a>00232 }
-<a name="l00233"></a>00233
-<a name="l00243"></a>00243 <span class="keywordtype">void</span> <a class="code" href="namespaceboost_1_1xint.html#a6278915cf51b0d448a9db40031226182" title="Sets a specific bit in an integer to one.">setbit</a>(integer&amp; n, <span class="keywordtype">size_t</span> bit) {
-<a name="l00244"></a>00244 <a class="code" href="namespaceboost_1_1xint.html#a6278915cf51b0d448a9db40031226182" title="Sets a specific bit in an integer to one.">detail::setbit</a>(n, bit);
-<a name="l00245"></a>00245 }
-<a name="l00246"></a>00246
-<a name="l00256"></a>00256 <span class="keywordtype">void</span> <a class="code" href="namespaceboost_1_1xint.html#a96d452df71ac6799a7041647b4b106df" title="Sets a specific bit in an integer to zero.">clearbit</a>(integer&amp; n, <span class="keywordtype">size_t</span> bit) {
-<a name="l00257"></a>00257 <a class="code" href="namespaceboost_1_1xint.html#a96d452df71ac6799a7041647b4b106df" title="Sets a specific bit in an integer to zero.">detail::clearbit</a>(n, bit);
-<a name="l00258"></a>00258 }
-<a name="l00259"></a>00259
-<a name="l00271"></a>00271 <span class="keywordtype">size_t</span> <a class="code" href="namespaceboost_1_1xint.html#a783e728f8221cd424d6f7f5d5f67ec40" title="Obtains the index of the lowest bit in an integer with a value of one.">lowestbit</a>(<span class="keyword">const</span> integer&amp; n, <span class="keywordtype">size_t</span> valueIfZero) {
-<a name="l00272"></a>00272 <span class="keywordflow">return</span> <a class="code" href="namespaceboost_1_1xint.html#a783e728f8221cd424d6f7f5d5f67ec40" title="Obtains the index of the lowest bit in an integer with a value of one.">detail::lowestbit</a>(n, valueIfZero);
-<a name="l00273"></a>00273 }
-<a name="l00274"></a>00274
-<a name="l00286"></a>00286 <span class="keywordtype">size_t</span> <a class="code" href="namespaceboost_1_1xint.html#aec002c076eff13d0382c5d2cd6de1d60" title="Obtains the index of the highest bit in an integer with a value of one.">highestbit</a>(<span class="keyword">const</span> integer&amp; n, <span class="keywordtype">size_t</span> valueIfZero) {
-<a name="l00287"></a>00287 <span class="keywordflow">return</span> <a class="code" href="namespaceboost_1_1xint.html#aec002c076eff13d0382c5d2cd6de1d60" title="Obtains the index of the highest bit in an integer with a value of one.">detail::highestbit</a>(n, valueIfZero);
-<a name="l00288"></a>00288 }
-<a name="l00289"></a>00289
-<a name="l00299"></a>00299 integer <a class="code" href="namespaceboost_1_1xint.html#ab828c0be1559b60537b959ef75092fb2" title="Combine two integers using a bitwise AND operation.">bitwise_and</a>(<span class="keyword">const</span> integer&amp; n1, <span class="keyword">const</span> integer&amp; n2) {
-<a name="l00300"></a>00300 integer r;
-<a name="l00301"></a>00301 <a class="code" href="namespaceboost_1_1xint.html#ab828c0be1559b60537b959ef75092fb2" title="Combine two integers using a bitwise AND operation.">detail::bitwise_and</a>(r, n1, n2);
-<a name="l00302"></a>00302 <span class="keywordflow">return</span> <a class="code" href="internals_8hpp.html#a73c3b02410381da656b7cb59c7ba9314">BOOST_XINT_MOVE</a>(r);
-<a name="l00303"></a>00303 }
-<a name="l00304"></a>00304
-<a name="l00314"></a>00314 integer <a class="code" href="namespaceboost_1_1xint.html#ab38ce0764a4b6433e11e30efa2175fec" title="Combine two integers using a bitwise OR operation.">bitwise_or</a>(<span class="keyword">const</span> integer&amp; n1, <span class="keyword">const</span> integer&amp; n2) {
-<a name="l00315"></a>00315 integer r;
-<a name="l00316"></a>00316 <a class="code" href="namespaceboost_1_1xint.html#ab38ce0764a4b6433e11e30efa2175fec" title="Combine two integers using a bitwise OR operation.">detail::bitwise_or</a>(r, n1, n2);
-<a name="l00317"></a>00317 <span class="keywordflow">return</span> <a class="code" href="internals_8hpp.html#a73c3b02410381da656b7cb59c7ba9314">BOOST_XINT_MOVE</a>(r);
-<a name="l00318"></a>00318 }
-<a name="l00319"></a>00319
-<a name="l00329"></a>00329 integer <a class="code" href="namespaceboost_1_1xint.html#a6afd5af4550b698f6a7065f457fcb0a1" title="Combine two integers using a bitwise XOR operation.">bitwise_xor</a>(<span class="keyword">const</span> integer&amp; n1, <span class="keyword">const</span> integer&amp; n2) {
-<a name="l00330"></a>00330 integer r;
-<a name="l00331"></a>00331 <a class="code" href="namespaceboost_1_1xint.html#a6afd5af4550b698f6a7065f457fcb0a1" title="Combine two integers using a bitwise XOR operation.">detail::bitwise_xor</a>(r, n1, n2);
-<a name="l00332"></a>00332 <span class="keywordflow">return</span> <a class="code" href="internals_8hpp.html#a73c3b02410381da656b7cb59c7ba9314">BOOST_XINT_MOVE</a>(r);
-<a name="l00333"></a>00333 }
-<a name="l00334"></a>00334
-<a name="l00345"></a>00345 integer <a class="code" href="namespaceboost_1_1xint.html#aaed048f3dc3a442152ebffa3f721d014" title="Bit-shift an integer, in either direction.">shift</a>(<span class="keyword">const</span> integer&amp; n, <span class="keywordtype">int</span> byBits) {
-<a name="l00346"></a>00346 <span class="keywordflow">if</span> (byBits &gt; 0) <span class="keywordflow">return</span> <a class="code" href="namespaceboost_1_1xint.html#ae22c3492ecf08370a9a972c8d6fb8e96" title="Left-shift an integer by a specified number of bits.">shift_left</a>(n, byBits);
-<a name="l00347"></a>00347 <span class="keywordflow">else</span> <span class="keywordflow">return</span> <a class="code" href="namespaceboost_1_1xint.html#aca7453fa9e276ebefacc9827b55f69d2" title="Right-shift an integer by a specified number of bits.">shift_right</a>(n, -byBits);
-<a name="l00348"></a>00348 }
-<a name="l00349"></a>00349
-<a name="l00359"></a>00359 integer <a class="code" href="namespaceboost_1_1xint.html#ae22c3492ecf08370a9a972c8d6fb8e96" title="Left-shift an integer by a specified number of bits.">shift_left</a>(<span class="keyword">const</span> integer&amp; n, <span class="keywordtype">size_t</span> byBits) {
-<a name="l00360"></a>00360 integer r;
-<a name="l00361"></a>00361 <a class="code" href="namespaceboost_1_1xint.html#ae22c3492ecf08370a9a972c8d6fb8e96" title="Left-shift an integer by a specified number of bits.">detail::shift_left</a>(r, n, byBits);
-<a name="l00362"></a>00362 <span class="keywordflow">return</span> <a class="code" href="internals_8hpp.html#a73c3b02410381da656b7cb59c7ba9314">BOOST_XINT_MOVE</a>(r);
-<a name="l00363"></a>00363 }
-<a name="l00364"></a>00364
-<a name="l00374"></a>00374 integer <a class="code" href="namespaceboost_1_1xint.html#aca7453fa9e276ebefacc9827b55f69d2" title="Right-shift an integer by a specified number of bits.">shift_right</a>(<span class="keyword">const</span> integer&amp; n, <span class="keywordtype">size_t</span> byBits) {
-<a name="l00375"></a>00375 integer r;
-<a name="l00376"></a>00376 <a class="code" href="namespaceboost_1_1xint.html#aca7453fa9e276ebefacc9827b55f69d2" title="Right-shift an integer by a specified number of bits.">detail::shift_right</a>(r, n, byBits);
-<a name="l00377"></a>00377 <span class="keywordflow">return</span> <a class="code" href="internals_8hpp.html#a73c3b02410381da656b7cb59c7ba9314">BOOST_XINT_MOVE</a>(r);
-<a name="l00378"></a>00378 }
-<a name="l00379"></a>00379
-<a name="l00380"></a>00380 } <span class="comment">// namespace xint</span>
-<a name="l00381"></a>00381 } <span class="comment">// namespace boost</span>
-</pre></div></div>
-<hr class="footer"/><address style="text-align: right;"><small>Generated on Tue May 4 10:20:16 2010 for The Extended Integer (XInt) Library by&nbsp;
-<a href="http://www.doxygen.org/index.html">
-<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.3 </small></address>
-</body>
-</html>

Deleted: sandbox/xint/doc/classboost_1_1xint_1_1base__divide__t-members.html
==============================================================================
--- sandbox/xint/doc/classboost_1_1xint_1_1base__divide__t-members.html 2010-05-31 20:43:54 EDT (Mon, 31 May 2010)
+++ (empty file)
@@ -1,43 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
-<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
-<title>The Extended Integer (XInt) Library: Member List</title>
-<link href="tabs.css" rel="stylesheet" type="text/css"/>
-<link href="doxygen.css" rel="stylesheet" type="text/css"/>
-</head>
-<body>
-<!-- Generated by Doxygen 1.6.3 -->
-<div class="navigation" id="top">
- <div class="tabs">
- <ul>
- <li>Main Page</li>
- <li>Namespaces</li>
- <li class="current">Classes</li>
- <li>Files</li>
- </ul>
- </div>
- <div class="tabs">
- <ul>
- <li>Class List</li>
- <li>Class Hierarchy</li>
- <li>Class Members</li>
- </ul>
- </div>
-</div>
-<div class="contents">
-<h1>boost::xint::base_divide_t&lt; T &gt; Member List</h1>This is the complete list of members for <a class="el" href="classboost_1_1xint_1_1base__divide__t.html">boost::xint::base_divide_t&lt; T &gt;</a>, including all inherited members.<table>
- <tr class="memlist"><td><a class="el" href="classboost_1_1xint_1_1base__divide__t.html#a78e4dd66f424388d1db839ef53e25997">base_divide_t</a>()</td><td><a class="el" href="classboost_1_1xint_1_1base__divide__t.html">boost::xint::base_divide_t&lt; T &gt;</a></td><td><code> [inline]</code></td></tr>
- <tr class="memlist"><td><a class="el" href="classboost_1_1xint_1_1base__divide__t.html#a1b7962768058ad19d8d3e848b1fc019e">base_divide_t</a>(const T &amp;q, const T &amp;r)</td><td><a class="el" href="classboost_1_1xint_1_1base__divide__t.html">boost::xint::base_divide_t&lt; T &gt;</a></td><td><code> [inline]</code></td></tr>
- <tr class="memlist"><td><a class="el" href="classboost_1_1xint_1_1base__divide__t.html#aa9f43e464f328b0cc618f67e6e4d1d6f">base_divide_t</a>(const base_divide_t&lt; T &gt; &amp;copy)</td><td><a class="el" href="classboost_1_1xint_1_1base__divide__t.html">boost::xint::base_divide_t&lt; T &gt;</a></td><td><code> [inline]</code></td></tr>
- <tr class="memlist"><td><a class="el" href="classboost_1_1xint_1_1base__divide__t.html#aaa2df86aa70e8ac849cd6289a1f459b1">base_divide_t</a>(BOOST_XINT_RV_REF(base_divide_t) move)</td><td><a class="el" href="classboost_1_1xint_1_1base__divide__t.html">boost::xint::base_divide_t&lt; T &gt;</a></td><td><code> [inline]</code></td></tr>
- <tr class="memlist"><td><a class="el" href="classboost_1_1xint_1_1base__divide__t.html#ac74a636871dd2988a4f654fc745426c7">operator=</a>(BOOST_XINT_COPY_ASSIGN_REF(base_divide_t) copy)</td><td><a class="el" href="classboost_1_1xint_1_1base__divide__t.html">boost::xint::base_divide_t&lt; T &gt;</a></td><td><code> [inline]</code></td></tr>
- <tr class="memlist"><td><a class="el" href="classboost_1_1xint_1_1base__divide__t.html#a5f66ee628dc58d181b8c2886354909fb">operator=</a>(BOOST_XINT_RV_REF(base_divide_t) move)</td><td><a class="el" href="classboost_1_1xint_1_1base__divide__t.html">boost::xint::base_divide_t&lt; T &gt;</a></td><td><code> [inline]</code></td></tr>
- <tr class="memlist"><td><a class="el" href="classboost_1_1xint_1_1base__divide__t.html#a7b3f254223974ed79663f9a0e4d1649c">quotient</a></td><td><a class="el" href="classboost_1_1xint_1_1base__divide__t.html">boost::xint::base_divide_t&lt; T &gt;</a></td><td></td></tr>
- <tr class="memlist"><td><a class="el" href="classboost_1_1xint_1_1base__divide__t.html#aa79bd57f1bc85ceb86913fd0f81c9e2d">remainder</a></td><td><a class="el" href="classboost_1_1xint_1_1base__divide__t.html">boost::xint::base_divide_t&lt; T &gt;</a></td><td></td></tr>
-</table></div>
-<hr class="footer"/><address style="text-align: right;"><small>Generated on Tue May 4 10:20:16 2010 for The Extended Integer (XInt) Library by&nbsp;
-<a href="http://www.doxygen.org/index.html">
-<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.3 </small></address>
-</body>
-</html>

Deleted: sandbox/xint/doc/classboost_1_1xint_1_1base__divide__t.html
==============================================================================
--- sandbox/xint/doc/classboost_1_1xint_1_1base__divide__t.html 2010-05-31 20:43:54 EDT (Mon, 31 May 2010)
+++ (empty file)
@@ -1,241 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
-<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
-<title>The Extended Integer (XInt) Library: boost::xint::base_divide_t&lt; T &gt; Class Template Reference</title>
-<link href="tabs.css" rel="stylesheet" type="text/css"/>
-<link href="doxygen.css" rel="stylesheet" type="text/css"/>
-</head>
-<body>
-<!-- Generated by Doxygen 1.6.3 -->
-<div class="navigation" id="top">
- <div class="tabs">
- <ul>
- <li>Main Page</li>
- <li>Namespaces</li>
- <li class="current">Classes</li>
- <li>Files</li>
- </ul>
- </div>
- <div class="tabs">
- <ul>
- <li>Class List</li>
- <li>Class Hierarchy</li>
- <li>Class Members</li>
- </ul>
- </div>
- <div class="navpath"><a class="el" href="namespaceboost.html">boost</a>::<a class="el" href="namespaceboost_1_1xint.html">xint</a>::<a class="el" href="classboost_1_1xint_1_1base__divide__t.html">base_divide_t</a>
- </div>
-</div>
-<div class="contents">
-<h1>boost::xint::base_divide_t&lt; T &gt; Class Template Reference</h1><!-- doxytag: class="boost::xint::base_divide_t" -->
-<p>Holds the results from a division-with-remainder call.
-More...</p>
-
-<p>List of all members.</p>
-<table border="0" cellpadding="0" cellspacing="0">
-<tr><td colspan="2"><h2>Public Member Functions</h2></td></tr>
-<tr><td class="memItemLeft" align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classboost_1_1xint_1_1base__divide__t.html#aaa2df86aa70e8ac849cd6289a1f459b1">base_divide_t</a> (BOOST_XINT_RV_REF(<a class="el" href="classboost_1_1xint_1_1base__divide__t.html">base_divide_t</a>) move)</td></tr>
-<tr><td class="memItemLeft" align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classboost_1_1xint_1_1base__divide__t.html#aa9f43e464f328b0cc618f67e6e4d1d6f">base_divide_t</a> (const <a class="el" href="classboost_1_1xint_1_1base__divide__t.html">base_divide_t</a>&lt; T &gt; &amp;copy)</td></tr>
-<tr><td class="memItemLeft" align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classboost_1_1xint_1_1base__divide__t.html#a1b7962768058ad19d8d3e848b1fc019e">base_divide_t</a> (const T &amp;q, const T &amp;r)</td></tr>
-<tr><td class="memItemLeft" align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classboost_1_1xint_1_1base__divide__t.html#a78e4dd66f424388d1db839ef53e25997">base_divide_t</a> ()</td></tr>
-<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="classboost_1_1xint_1_1base__divide__t.html">base_divide_t</a> &amp;&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classboost_1_1xint_1_1base__divide__t.html#a5f66ee628dc58d181b8c2886354909fb">operator=</a> (BOOST_XINT_RV_REF(<a class="el" href="classboost_1_1xint_1_1base__divide__t.html">base_divide_t</a>) move)</td></tr>
-<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="classboost_1_1xint_1_1base__divide__t.html">base_divide_t</a> &amp;&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classboost_1_1xint_1_1base__divide__t.html#ac74a636871dd2988a4f654fc745426c7">operator=</a> (BOOST_XINT_COPY_ASSIGN_REF(<a class="el" href="classboost_1_1xint_1_1base__divide__t.html">base_divide_t</a>) copy)</td></tr>
-<tr><td colspan="2"><h2>Public Attributes</h2></td></tr>
-<tr><td class="memItemLeft" align="right" valign="top">T&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classboost_1_1xint_1_1base__divide__t.html#a7b3f254223974ed79663f9a0e4d1649c">quotient</a></td></tr>
-<tr><td class="memItemLeft" align="right" valign="top">T&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classboost_1_1xint_1_1base__divide__t.html#aa79bd57f1bc85ceb86913fd0f81c9e2d">remainder</a></td></tr>
-</table>
-<hr/><a name="_details"></a><h2>Detailed Description</h2>
-<h3>template&lt;class T&gt;<br/>
- class boost::xint::base_divide_t&lt; T &gt;</h3>
-
-<p>Holds the results from a division-with-remainder call. </p>
-<p>This class serves essentially the same purpose as an <code>std::pair</code>. The only reason it exists is that <code>std::pair</code> doesn't work well with Boost.Move on some compilers. </p>
-
-<p>Definition at line <a class="el" href="internals_8hpp_source.html#l00376">376</a> of file <a class="el" href="internals_8hpp_source.html">internals.hpp</a>.</p>
-<hr/><h2>Constructor &amp; Destructor Documentation</h2>
-<a class="anchor" id="a78e4dd66f424388d1db839ef53e25997"></a><!-- doxytag: member="boost::xint::base_divide_t::base_divide_t" ref="a78e4dd66f424388d1db839ef53e25997" args="()" -->
-<div class="memitem">
-<div class="memproto">
-<div class="memtemplate">
-template&lt;class T&gt; </div>
- <table class="memname">
- <tr>
- <td class="memname"><a class="el" href="classboost_1_1xint_1_1base__divide__t.html">boost::xint::base_divide_t</a>&lt; T &gt;::<a class="el" href="classboost_1_1xint_1_1base__divide__t.html">base_divide_t</a> </td>
- <td>(</td>
- <td class="paramname"></td>
- <td>&nbsp;)&nbsp;</td>
- <td><code> [inline]</code></td>
- </tr>
- </table>
-</div>
-<div class="memdoc">
-
-<p>Definition at line <a class="el" href="internals_8hpp_source.html#l00378">378</a> of file <a class="el" href="internals_8hpp_source.html">internals.hpp</a>.</p>
-
-</div>
-</div>
-<a class="anchor" id="a1b7962768058ad19d8d3e848b1fc019e"></a><!-- doxytag: member="boost::xint::base_divide_t::base_divide_t" ref="a1b7962768058ad19d8d3e848b1fc019e" args="(const T &amp;q, const T &amp;r)" -->
-<div class="memitem">
-<div class="memproto">
-<div class="memtemplate">
-template&lt;class T&gt; </div>
- <table class="memname">
- <tr>
- <td class="memname"><a class="el" href="classboost_1_1xint_1_1base__divide__t.html">boost::xint::base_divide_t</a>&lt; T &gt;::<a class="el" href="classboost_1_1xint_1_1base__divide__t.html">base_divide_t</a> </td>
- <td>(</td>
- <td class="paramtype">const T &amp;&nbsp;</td>
- <td class="paramname"> <em>q</em>, </td>
- </tr>
- <tr>
- <td class="paramkey"></td>
- <td></td>
- <td class="paramtype">const T &amp;&nbsp;</td>
- <td class="paramname"> <em>r</em></td><td>&nbsp;</td>
- </tr>
- <tr>
- <td></td>
- <td>)</td>
- <td></td><td></td><td><code> [inline]</code></td>
- </tr>
- </table>
-</div>
-<div class="memdoc">
-
-<p>Definition at line <a class="el" href="internals_8hpp_source.html#l00379">379</a> of file <a class="el" href="internals_8hpp_source.html">internals.hpp</a>.</p>
-
-</div>
-</div>
-<a class="anchor" id="aa9f43e464f328b0cc618f67e6e4d1d6f"></a><!-- doxytag: member="boost::xint::base_divide_t::base_divide_t" ref="aa9f43e464f328b0cc618f67e6e4d1d6f" args="(const base_divide_t&lt; T &gt; &amp;copy)" -->
-<div class="memitem">
-<div class="memproto">
-<div class="memtemplate">
-template&lt;class T&gt; </div>
- <table class="memname">
- <tr>
- <td class="memname"><a class="el" href="classboost_1_1xint_1_1base__divide__t.html">boost::xint::base_divide_t</a>&lt; T &gt;::<a class="el" href="classboost_1_1xint_1_1base__divide__t.html">base_divide_t</a> </td>
- <td>(</td>
- <td class="paramtype">const <a class="el" href="classboost_1_1xint_1_1base__divide__t.html">base_divide_t</a>&lt; T &gt; &amp;&nbsp;</td>
- <td class="paramname"> <em>copy</em></td>
- <td>&nbsp;)&nbsp;</td>
- <td><code> [inline]</code></td>
- </tr>
- </table>
-</div>
-<div class="memdoc">
-
-<p>Definition at line <a class="el" href="internals_8hpp_source.html#l00380">380</a> of file <a class="el" href="internals_8hpp_source.html">internals.hpp</a>.</p>
-
-</div>
-</div>
-<a class="anchor" id="aaa2df86aa70e8ac849cd6289a1f459b1"></a><!-- doxytag: member="boost::xint::base_divide_t::base_divide_t" ref="aaa2df86aa70e8ac849cd6289a1f459b1" args="(BOOST_XINT_RV_REF(base_divide_t) move)" -->
-<div class="memitem">
-<div class="memproto">
-<div class="memtemplate">
-template&lt;class T&gt; </div>
- <table class="memname">
- <tr>
- <td class="memname"><a class="el" href="classboost_1_1xint_1_1base__divide__t.html">boost::xint::base_divide_t</a>&lt; T &gt;::<a class="el" href="classboost_1_1xint_1_1base__divide__t.html">base_divide_t</a> </td>
- <td>(</td>
- <td class="paramtype">BOOST_XINT_RV_REF(<a class="el" href="classboost_1_1xint_1_1base__divide__t.html">base_divide_t</a>&lt; T &gt;)&nbsp;</td>
- <td class="paramname"> <em>move</em></td>
- <td>&nbsp;)&nbsp;</td>
- <td><code> [inline]</code></td>
- </tr>
- </table>
-</div>
-<div class="memdoc">
-
-<p>Definition at line <a class="el" href="internals_8hpp_source.html#l00382">382</a> of file <a class="el" href="internals_8hpp_source.html">internals.hpp</a>.</p>
-
-</div>
-</div>
-<hr/><h2>Member Function Documentation</h2>
-<a class="anchor" id="a5f66ee628dc58d181b8c2886354909fb"></a><!-- doxytag: member="boost::xint::base_divide_t::operator=" ref="a5f66ee628dc58d181b8c2886354909fb" args="(BOOST_XINT_RV_REF(base_divide_t) move)" -->
-<div class="memitem">
-<div class="memproto">
-<div class="memtemplate">
-template&lt;class T&gt; </div>
- <table class="memname">
- <tr>
- <td class="memname"><a class="el" href="classboost_1_1xint_1_1base__divide__t.html">base_divide_t</a>&amp; <a class="el" href="classboost_1_1xint_1_1base__divide__t.html">boost::xint::base_divide_t</a>&lt; T &gt;::operator= </td>
- <td>(</td>
- <td class="paramtype">BOOST_XINT_RV_REF(<a class="el" href="classboost_1_1xint_1_1base__divide__t.html">base_divide_t</a>&lt; T &gt;)&nbsp;</td>
- <td class="paramname"> <em>move</em></td>
- <td>&nbsp;)&nbsp;</td>
- <td><code> [inline]</code></td>
- </tr>
- </table>
-</div>
-<div class="memdoc">
-
-<p>Definition at line <a class="el" href="internals_8hpp_source.html#l00388">388</a> of file <a class="el" href="internals_8hpp_source.html">internals.hpp</a>.</p>
-
-</div>
-</div>
-<a class="anchor" id="ac74a636871dd2988a4f654fc745426c7"></a><!-- doxytag: member="boost::xint::base_divide_t::operator=" ref="ac74a636871dd2988a4f654fc745426c7" args="(BOOST_XINT_COPY_ASSIGN_REF(base_divide_t) copy)" -->
-<div class="memitem">
-<div class="memproto">
-<div class="memtemplate">
-template&lt;class T&gt; </div>
- <table class="memname">
- <tr>
- <td class="memname"><a class="el" href="classboost_1_1xint_1_1base__divide__t.html">base_divide_t</a>&amp; <a class="el" href="classboost_1_1xint_1_1base__divide__t.html">boost::xint::base_divide_t</a>&lt; T &gt;::operator= </td>
- <td>(</td>
- <td class="paramtype">BOOST_XINT_COPY_ASSIGN_REF(<a class="el" href="classboost_1_1xint_1_1base__divide__t.html">base_divide_t</a>&lt; T &gt;)&nbsp;</td>
- <td class="paramname"> <em>copy</em></td>
- <td>&nbsp;)&nbsp;</td>
- <td><code> [inline]</code></td>
- </tr>
- </table>
-</div>
-<div class="memdoc">
-
-<p>Definition at line <a class="el" href="internals_8hpp_source.html#l00385">385</a> of file <a class="el" href="internals_8hpp_source.html">internals.hpp</a>.</p>
-
-</div>
-</div>
-<hr/><h2>Member Data Documentation</h2>
-<a class="anchor" id="a7b3f254223974ed79663f9a0e4d1649c"></a><!-- doxytag: member="boost::xint::base_divide_t::quotient" ref="a7b3f254223974ed79663f9a0e4d1649c" args="" -->
-<div class="memitem">
-<div class="memproto">
-<div class="memtemplate">
-template&lt;class T&gt; </div>
- <table class="memname">
- <tr>
- <td class="memname">T <a class="el" href="classboost_1_1xint_1_1base__divide__t.html">boost::xint::base_divide_t</a>&lt; T &gt;::<a class="el" href="classboost_1_1xint_1_1base__divide__t.html#a7b3f254223974ed79663f9a0e4d1649c">quotient</a></td>
- </tr>
- </table>
-</div>
-<div class="memdoc">
-
-<p>Definition at line <a class="el" href="internals_8hpp_source.html#l00392">392</a> of file <a class="el" href="internals_8hpp_source.html">internals.hpp</a>.</p>
-
-</div>
-</div>
-<a class="anchor" id="aa79bd57f1bc85ceb86913fd0f81c9e2d"></a><!-- doxytag: member="boost::xint::base_divide_t::remainder" ref="aa79bd57f1bc85ceb86913fd0f81c9e2d" args="" -->
-<div class="memitem">
-<div class="memproto">
-<div class="memtemplate">
-template&lt;class T&gt; </div>
- <table class="memname">
- <tr>
- <td class="memname">T <a class="el" href="classboost_1_1xint_1_1base__divide__t.html">boost::xint::base_divide_t</a>&lt; T &gt;::<a class="el" href="classboost_1_1xint_1_1base__divide__t.html#aa79bd57f1bc85ceb86913fd0f81c9e2d">remainder</a></td>
- </tr>
- </table>
-</div>
-<div class="memdoc">
-
-<p>Definition at line <a class="el" href="internals_8hpp_source.html#l00392">392</a> of file <a class="el" href="internals_8hpp_source.html">internals.hpp</a>.</p>
-
-</div>
-</div>
-<hr/>The documentation for this class was generated from the following file:<ul>
-<li><a class="el" href="internals_8hpp_source.html">internals.hpp</a></li>
-</ul>
-</div>
-<hr class="footer"/><address style="text-align: right;"><small>Generated on Tue May 4 10:20:16 2010 for The Extended Integer (XInt) Library by&nbsp;
-<a href="http://www.doxygen.org/index.html">
-<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.3 </small></address>
-</body>
-</html>

Deleted: sandbox/xint/doc/classboost_1_1xint_1_1default__random__generator-members.html
==============================================================================
--- sandbox/xint/doc/classboost_1_1xint_1_1default__random__generator-members.html 2010-05-31 20:43:54 EDT (Mon, 31 May 2010)
+++ (empty file)
@@ -1,36 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
-<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
-<title>The Extended Integer (XInt) Library: Member List</title>
-<link href="tabs.css" rel="stylesheet" type="text/css"/>
-<link href="doxygen.css" rel="stylesheet" type="text/css"/>
-</head>
-<body>
-<!-- Generated by Doxygen 1.6.3 -->
-<div class="navigation" id="top">
- <div class="tabs">
- <ul>
- <li>Main Page</li>
- <li>Namespaces</li>
- <li class="current">Classes</li>
- <li>Files</li>
- </ul>
- </div>
- <div class="tabs">
- <ul>
- <li>Class List</li>
- <li>Class Hierarchy</li>
- <li>Class Members</li>
- </ul>
- </div>
-</div>
-<div class="contents">
-<h1>boost::xint::default_random_generator Member List</h1>This is the complete list of members for <a class="el" href="classboost_1_1xint_1_1default__random__generator.html">boost::xint::default_random_generator</a>, including all inherited members.<table>
- <tr class="memlist"><td><a class="el" href="classboost_1_1xint_1_1default__random__generator.html#a4289636c47258469b78703ae791812f6">default_random_generator</a>()</td><td><a class="el" href="classboost_1_1xint_1_1default__random__generator.html">boost::xint::default_random_generator</a></td><td><code> [inline]</code></td></tr>
-</table></div>
-<hr class="footer"/><address style="text-align: right;"><small>Generated on Tue May 4 10:20:16 2010 for The Extended Integer (XInt) Library by&nbsp;
-<a href="http://www.doxygen.org/index.html">
-<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.3 </small></address>
-</body>
-</html>

Deleted: sandbox/xint/doc/classboost_1_1xint_1_1default__random__generator.html
==============================================================================
--- sandbox/xint/doc/classboost_1_1xint_1_1default__random__generator.html 2010-05-31 20:43:54 EDT (Mon, 31 May 2010)
+++ (empty file)
@@ -1,78 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
-<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
-<title>The Extended Integer (XInt) Library: boost::xint::default_random_generator Class Reference</title>
-<link href="tabs.css" rel="stylesheet" type="text/css"/>
-<link href="doxygen.css" rel="stylesheet" type="text/css"/>
-</head>
-<body>
-<!-- Generated by Doxygen 1.6.3 -->
-<div class="navigation" id="top">
- <div class="tabs">
- <ul>
- <li>Main Page</li>
- <li>Namespaces</li>
- <li class="current">Classes</li>
- <li>Files</li>
- </ul>
- </div>
- <div class="tabs">
- <ul>
- <li>Class List</li>
- <li>Class Hierarchy</li>
- <li>Class Members</li>
- </ul>
- </div>
- <div class="navpath"><a class="el" href="namespaceboost.html">boost</a>::<a class="el" href="namespaceboost_1_1xint.html">xint</a>::<a class="el" href="classboost_1_1xint_1_1default__random__generator.html">default_random_generator</a>
- </div>
-</div>
-<div class="contents">
-<h1>boost::xint::default_random_generator Class Reference</h1><!-- doxytag: class="boost::xint::default_random_generator" -->
-<p>A convenience class for general-purpose (insecure) random numbers.
-More...</p>
-
-<p>List of all members.</p>
-<table border="0" cellpadding="0" cellspacing="0">
-<tr><td colspan="2"><h2>Public Member Functions</h2></td></tr>
-<tr><td class="memItemLeft" align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classboost_1_1xint_1_1default__random__generator.html#a4289636c47258469b78703ae791812f6">default_random_generator</a> ()</td></tr>
-</table>
-<hr/><a name="_details"></a><h2>Detailed Description</h2>
-<p>A convenience class for general-purpose (insecure) random numbers. </p>
-<p>This is nothing more than a very thin shell around one of the faster pseudo-random number generators provided by Boost.Random.</p>
-<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="random.html">The XInt Random Number System</a> </dd>
-<dd>
-<a class="el" href="namespaceboost_1_1xint.html#af431075692c7b5b7bc01768856876512">boost::xint::random_by_size</a> </dd>
-<dd>
-<a class="el" href="namespaceboost_1_1xint.html#afec65ec6ec0b57c0483a703040d97107">boost::xint::random_prime</a> </dd></dl>
-
-<p>Definition at line <a class="el" href="random_8hpp_source.html#l00064">64</a> of file <a class="el" href="random_8hpp_source.html">random.hpp</a>.</p>
-<hr/><h2>Constructor &amp; Destructor Documentation</h2>
-<a class="anchor" id="a4289636c47258469b78703ae791812f6"></a><!-- doxytag: member="boost::xint::default_random_generator::default_random_generator" ref="a4289636c47258469b78703ae791812f6" args="()" -->
-<div class="memitem">
-<div class="memproto">
- <table class="memname">
- <tr>
- <td class="memname">boost::xint::default_random_generator::default_random_generator </td>
- <td>(</td>
- <td class="paramname"></td>
- <td>&nbsp;)&nbsp;</td>
- <td><code> [inline]</code></td>
- </tr>
- </table>
-</div>
-<div class="memdoc">
-
-<p>Definition at line <a class="el" href="random_8hpp_source.html#l00066">66</a> of file <a class="el" href="random_8hpp_source.html">random.hpp</a>.</p>
-
-</div>
-</div>
-<hr/>The documentation for this class was generated from the following file:<ul>
-<li><a class="el" href="random_8hpp_source.html">random.hpp</a></li>
-</ul>
-</div>
-<hr class="footer"/><address style="text-align: right;"><small>Generated on Tue May 4 10:20:16 2010 for The Extended Integer (XInt) Library by&nbsp;
-<a href="http://www.doxygen.org/index.html">
-<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.3 </small></address>
-</body>
-</html>

Deleted: sandbox/xint/doc/classboost_1_1xint_1_1exceptions_1_1cannot__represent-members.html
==============================================================================
--- sandbox/xint/doc/classboost_1_1xint_1_1exceptions_1_1cannot__represent-members.html 2010-05-31 20:43:54 EDT (Mon, 31 May 2010)
+++ (empty file)
@@ -1,36 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
-<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
-<title>The Extended Integer (XInt) Library: Member List</title>
-<link href="tabs.css" rel="stylesheet" type="text/css"/>
-<link href="doxygen.css" rel="stylesheet" type="text/css"/>
-</head>
-<body>
-<!-- Generated by Doxygen 1.6.3 -->
-<div class="navigation" id="top">
- <div class="tabs">
- <ul>
- <li>Main Page</li>
- <li>Namespaces</li>
- <li class="current">Classes</li>
- <li>Files</li>
- </ul>
- </div>
- <div class="tabs">
- <ul>
- <li>Class List</li>
- <li>Class Hierarchy</li>
- <li>Class Members</li>
- </ul>
- </div>
-</div>
-<div class="contents">
-<h1>boost::xint::exceptions::cannot_represent Member List</h1>This is the complete list of members for <a class="el" href="classboost_1_1xint_1_1exceptions_1_1cannot__represent.html">boost::xint::exceptions::cannot_represent</a>, including all inherited members.<table>
- <tr class="memlist"><td><a class="el" href="classboost_1_1xint_1_1exceptions_1_1cannot__represent.html#a0968d8ac61c24529816bcaf69d155b75">cannot_represent</a>(const std::string &amp;what=&quot;cannot represent the requested value&quot;)</td><td><a class="el" href="classboost_1_1xint_1_1exceptions_1_1cannot__represent.html">boost::xint::exceptions::cannot_represent</a></td><td><code> [inline]</code></td></tr>
-</table></div>
-<hr class="footer"/><address style="text-align: right;"><small>Generated on Tue May 4 10:20:17 2010 for The Extended Integer (XInt) Library by&nbsp;
-<a href="http://www.doxygen.org/index.html">
-<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.3 </small></address>
-</body>
-</html>

Deleted: sandbox/xint/doc/classboost_1_1xint_1_1exceptions_1_1cannot__represent.html
==============================================================================
--- sandbox/xint/doc/classboost_1_1xint_1_1exceptions_1_1cannot__represent.html 2010-05-31 20:43:54 EDT (Mon, 31 May 2010)
+++ (empty file)
@@ -1,70 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
-<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
-<title>The Extended Integer (XInt) Library: boost::xint::exceptions::cannot_represent Class Reference</title>
-<link href="tabs.css" rel="stylesheet" type="text/css"/>
-<link href="doxygen.css" rel="stylesheet" type="text/css"/>
-</head>
-<body>
-<!-- Generated by Doxygen 1.6.3 -->
-<div class="navigation" id="top">
- <div class="tabs">
- <ul>
- <li>Main Page</li>
- <li>Namespaces</li>
- <li class="current">Classes</li>
- <li>Files</li>
- </ul>
- </div>
- <div class="tabs">
- <ul>
- <li>Class List</li>
- <li>Class Hierarchy</li>
- <li>Class Members</li>
- </ul>
- </div>
- <div class="navpath"><a class="el" href="namespaceboost.html">boost</a>::<a class="el" href="namespaceboost_1_1xint.html">xint</a>::<a class="el" href="namespaceboost_1_1xint_1_1exceptions.html">exceptions</a>::<a class="el" href="classboost_1_1xint_1_1exceptions_1_1cannot__represent.html">cannot_represent</a>
- </div>
-</div>
-<div class="contents">
-<h1>boost::xint::exceptions::cannot_represent Class Reference</h1><!-- doxytag: class="boost::xint::exceptions::cannot_represent" -->
-<p>List of all members.</p>
-<table border="0" cellpadding="0" cellspacing="0">
-<tr><td colspan="2"><h2>Public Member Functions</h2></td></tr>
-<tr><td class="memItemLeft" align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classboost_1_1xint_1_1exceptions_1_1cannot__represent.html#a0968d8ac61c24529816bcaf69d155b75">cannot_represent</a> (const std::string &amp;what=&quot;cannot represent the requested value&quot;)</td></tr>
-</table>
-<hr/><a name="_details"></a><h2>Detailed Description</h2>
-<p>Derived from <code>std::invalid_argument</code>. </p>
-
-<p>Definition at line <a class="el" href="exceptions_8hpp_source.html#l00077">77</a> of file <a class="el" href="exceptions_8hpp_source.html">exceptions.hpp</a>.</p>
-<hr/><h2>Constructor &amp; Destructor Documentation</h2>
-<a class="anchor" id="a0968d8ac61c24529816bcaf69d155b75"></a><!-- doxytag: member="boost::xint::exceptions::cannot_represent::cannot_represent" ref="a0968d8ac61c24529816bcaf69d155b75" args="(const std::string &amp;what=&quot;cannot represent the requested value&quot;)" -->
-<div class="memitem">
-<div class="memproto">
- <table class="memname">
- <tr>
- <td class="memname">boost::xint::exceptions::cannot_represent::cannot_represent </td>
- <td>(</td>
- <td class="paramtype">const std::string &amp;&nbsp;</td>
- <td class="paramname"> <em>what</em> = <code>&quot;cannot&nbsp;represent&nbsp;the&nbsp;requested&nbsp;value&quot;</code></td>
- <td>&nbsp;)&nbsp;</td>
- <td><code> [inline]</code></td>
- </tr>
- </table>
-</div>
-<div class="memdoc">
-
-<p>Definition at line <a class="el" href="exceptions_8hpp_source.html#l00079">79</a> of file <a class="el" href="exceptions_8hpp_source.html">exceptions.hpp</a>.</p>
-
-</div>
-</div>
-<hr/>The documentation for this class was generated from the following file:<ul>
-<li><a class="el" href="exceptions_8hpp_source.html">exceptions.hpp</a></li>
-</ul>
-</div>
-<hr class="footer"/><address style="text-align: right;"><small>Generated on Tue May 4 10:20:17 2010 for The Extended Integer (XInt) Library by&nbsp;
-<a href="http://www.doxygen.org/index.html">
-<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.3 </small></address>
-</body>
-</html>

Deleted: sandbox/xint/doc/classboost_1_1xint_1_1exceptions_1_1divide__by__zero-members.html
==============================================================================
--- sandbox/xint/doc/classboost_1_1xint_1_1exceptions_1_1divide__by__zero-members.html 2010-05-31 20:43:54 EDT (Mon, 31 May 2010)
+++ (empty file)
@@ -1,36 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
-<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
-<title>The Extended Integer (XInt) Library: Member List</title>
-<link href="tabs.css" rel="stylesheet" type="text/css"/>
-<link href="doxygen.css" rel="stylesheet" type="text/css"/>
-</head>
-<body>
-<!-- Generated by Doxygen 1.6.3 -->
-<div class="navigation" id="top">
- <div class="tabs">
- <ul>
- <li>Main Page</li>
- <li>Namespaces</li>
- <li class="current">Classes</li>
- <li>Files</li>
- </ul>
- </div>
- <div class="tabs">
- <ul>
- <li>Class List</li>
- <li>Class Hierarchy</li>
- <li>Class Members</li>
- </ul>
- </div>
-</div>
-<div class="contents">
-<h1>boost::xint::exceptions::divide_by_zero Member List</h1>This is the complete list of members for <a class="el" href="classboost_1_1xint_1_1exceptions_1_1divide__by__zero.html">boost::xint::exceptions::divide_by_zero</a>, including all inherited members.<table>
- <tr class="memlist"><td><a class="el" href="classboost_1_1xint_1_1exceptions_1_1divide__by__zero.html#aaff4d720e4a134315acde919ff06e640">divide_by_zero</a>(const std::string &amp;what=&quot;divide by zero error&quot;)</td><td><a class="el" href="classboost_1_1xint_1_1exceptions_1_1divide__by__zero.html">boost::xint::exceptions::divide_by_zero</a></td><td><code> [inline]</code></td></tr>
-</table></div>
-<hr class="footer"/><address style="text-align: right;"><small>Generated on Tue May 4 10:20:17 2010 for The Extended Integer (XInt) Library by&nbsp;
-<a href="http://www.doxygen.org/index.html">
-<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.3 </small></address>
-</body>
-</html>

Deleted: sandbox/xint/doc/classboost_1_1xint_1_1exceptions_1_1divide__by__zero.html
==============================================================================
--- sandbox/xint/doc/classboost_1_1xint_1_1exceptions_1_1divide__by__zero.html 2010-05-31 20:43:54 EDT (Mon, 31 May 2010)
+++ (empty file)
@@ -1,70 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
-<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
-<title>The Extended Integer (XInt) Library: boost::xint::exceptions::divide_by_zero Class Reference</title>
-<link href="tabs.css" rel="stylesheet" type="text/css"/>
-<link href="doxygen.css" rel="stylesheet" type="text/css"/>
-</head>
-<body>
-<!-- Generated by Doxygen 1.6.3 -->
-<div class="navigation" id="top">
- <div class="tabs">
- <ul>
- <li>Main Page</li>
- <li>Namespaces</li>
- <li class="current">Classes</li>
- <li>Files</li>
- </ul>
- </div>
- <div class="tabs">
- <ul>
- <li>Class List</li>
- <li>Class Hierarchy</li>
- <li>Class Members</li>
- </ul>
- </div>
- <div class="navpath"><a class="el" href="namespaceboost.html">boost</a>::<a class="el" href="namespaceboost_1_1xint.html">xint</a>::<a class="el" href="namespaceboost_1_1xint_1_1exceptions.html">exceptions</a>::<a class="el" href="classboost_1_1xint_1_1exceptions_1_1divide__by__zero.html">divide_by_zero</a>
- </div>
-</div>
-<div class="contents">
-<h1>boost::xint::exceptions::divide_by_zero Class Reference</h1><!-- doxytag: class="boost::xint::exceptions::divide_by_zero" -->
-<p>List of all members.</p>
-<table border="0" cellpadding="0" cellspacing="0">
-<tr><td colspan="2"><h2>Public Member Functions</h2></td></tr>
-<tr><td class="memItemLeft" align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classboost_1_1xint_1_1exceptions_1_1divide__by__zero.html#aaff4d720e4a134315acde919ff06e640">divide_by_zero</a> (const std::string &amp;what=&quot;divide by zero error&quot;)</td></tr>
-</table>
-<hr/><a name="_details"></a><h2>Detailed Description</h2>
-<p>Derived from <code>std::invalid_argument</code>. </p>
-
-<p>Definition at line <a class="el" href="exceptions_8hpp_source.html#l00068">68</a> of file <a class="el" href="exceptions_8hpp_source.html">exceptions.hpp</a>.</p>
-<hr/><h2>Constructor &amp; Destructor Documentation</h2>
-<a class="anchor" id="aaff4d720e4a134315acde919ff06e640"></a><!-- doxytag: member="boost::xint::exceptions::divide_by_zero::divide_by_zero" ref="aaff4d720e4a134315acde919ff06e640" args="(const std::string &amp;what=&quot;divide by zero error&quot;)" -->
-<div class="memitem">
-<div class="memproto">
- <table class="memname">
- <tr>
- <td class="memname">boost::xint::exceptions::divide_by_zero::divide_by_zero </td>
- <td>(</td>
- <td class="paramtype">const std::string &amp;&nbsp;</td>
- <td class="paramname"> <em>what</em> = <code>&quot;divide&nbsp;by&nbsp;zero&nbsp;error&quot;</code></td>
- <td>&nbsp;)&nbsp;</td>
- <td><code> [inline]</code></td>
- </tr>
- </table>
-</div>
-<div class="memdoc">
-
-<p>Definition at line <a class="el" href="exceptions_8hpp_source.html#l00070">70</a> of file <a class="el" href="exceptions_8hpp_source.html">exceptions.hpp</a>.</p>
-
-</div>
-</div>
-<hr/>The documentation for this class was generated from the following file:<ul>
-<li><a class="el" href="exceptions_8hpp_source.html">exceptions.hpp</a></li>
-</ul>
-</div>
-<hr class="footer"/><address style="text-align: right;"><small>Generated on Tue May 4 10:20:17 2010 for The Extended Integer (XInt) Library by&nbsp;
-<a href="http://www.doxygen.org/index.html">
-<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.3 </small></address>
-</body>
-</html>

Deleted: sandbox/xint/doc/classboost_1_1xint_1_1exceptions_1_1invalid__argument-members.html
==============================================================================
--- sandbox/xint/doc/classboost_1_1xint_1_1exceptions_1_1invalid__argument-members.html 2010-05-31 20:43:54 EDT (Mon, 31 May 2010)
+++ (empty file)
@@ -1,36 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
-<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
-<title>The Extended Integer (XInt) Library: Member List</title>
-<link href="tabs.css" rel="stylesheet" type="text/css"/>
-<link href="doxygen.css" rel="stylesheet" type="text/css"/>
-</head>
-<body>
-<!-- Generated by Doxygen 1.6.3 -->
-<div class="navigation" id="top">
- <div class="tabs">
- <ul>
- <li>Main Page</li>
- <li>Namespaces</li>
- <li class="current">Classes</li>
- <li>Files</li>
- </ul>
- </div>
- <div class="tabs">
- <ul>
- <li>Class List</li>
- <li>Class Hierarchy</li>
- <li>Class Members</li>
- </ul>
- </div>
-</div>
-<div class="contents">
-<h1>boost::xint::exceptions::invalid_argument Member List</h1>This is the complete list of members for <a class="el" href="classboost_1_1xint_1_1exceptions_1_1invalid__argument.html">boost::xint::exceptions::invalid_argument</a>, including all inherited members.<table>
- <tr class="memlist"><td><a class="el" href="classboost_1_1xint_1_1exceptions_1_1invalid__argument.html#a8ba3e56172de34c772b287ce8e325f32">invalid_argument</a>(const std::string &amp;what=&quot;invalid argument&quot;)</td><td><a class="el" href="classboost_1_1xint_1_1exceptions_1_1invalid__argument.html">boost::xint::exceptions::invalid_argument</a></td><td><code> [inline]</code></td></tr>
-</table></div>
-<hr class="footer"/><address style="text-align: right;"><small>Generated on Tue May 4 10:20:17 2010 for The Extended Integer (XInt) Library by&nbsp;
-<a href="http://www.doxygen.org/index.html">
-<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.3 </small></address>
-</body>
-</html>

Deleted: sandbox/xint/doc/classboost_1_1xint_1_1exceptions_1_1invalid__argument.html
==============================================================================
--- sandbox/xint/doc/classboost_1_1xint_1_1exceptions_1_1invalid__argument.html 2010-05-31 20:43:54 EDT (Mon, 31 May 2010)
+++ (empty file)
@@ -1,70 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
-<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
-<title>The Extended Integer (XInt) Library: boost::xint::exceptions::invalid_argument Class Reference</title>
-<link href="tabs.css" rel="stylesheet" type="text/css"/>
-<link href="doxygen.css" rel="stylesheet" type="text/css"/>
-</head>
-<body>
-<!-- Generated by Doxygen 1.6.3 -->
-<div class="navigation" id="top">
- <div class="tabs">
- <ul>
- <li>Main Page</li>
- <li>Namespaces</li>
- <li class="current">Classes</li>
- <li>Files</li>
- </ul>
- </div>
- <div class="tabs">
- <ul>
- <li>Class List</li>
- <li>Class Hierarchy</li>
- <li>Class Members</li>
- </ul>
- </div>
- <div class="navpath"><a class="el" href="namespaceboost.html">boost</a>::<a class="el" href="namespaceboost_1_1xint.html">xint</a>::<a class="el" href="namespaceboost_1_1xint_1_1exceptions.html">exceptions</a>::<a class="el" href="classboost_1_1xint_1_1exceptions_1_1invalid__argument.html">invalid_argument</a>
- </div>
-</div>
-<div class="contents">
-<h1>boost::xint::exceptions::invalid_argument Class Reference</h1><!-- doxytag: class="boost::xint::exceptions::invalid_argument" -->
-<p>List of all members.</p>
-<table border="0" cellpadding="0" cellspacing="0">
-<tr><td colspan="2"><h2>Public Member Functions</h2></td></tr>
-<tr><td class="memItemLeft" align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classboost_1_1xint_1_1exceptions_1_1invalid__argument.html#a8ba3e56172de34c772b287ce8e325f32">invalid_argument</a> (const std::string &amp;what=&quot;invalid argument&quot;)</td></tr>
-</table>
-<hr/><a name="_details"></a><h2>Detailed Description</h2>
-<p>Derived from <code>std::invalid_argument</code>. </p>
-
-<p>Definition at line <a class="el" href="exceptions_8hpp_source.html#l00032">32</a> of file <a class="el" href="exceptions_8hpp_source.html">exceptions.hpp</a>.</p>
-<hr/><h2>Constructor &amp; Destructor Documentation</h2>
-<a class="anchor" id="a8ba3e56172de34c772b287ce8e325f32"></a><!-- doxytag: member="boost::xint::exceptions::invalid_argument::invalid_argument" ref="a8ba3e56172de34c772b287ce8e325f32" args="(const std::string &amp;what=&quot;invalid argument&quot;)" -->
-<div class="memitem">
-<div class="memproto">
- <table class="memname">
- <tr>
- <td class="memname">boost::xint::exceptions::invalid_argument::invalid_argument </td>
- <td>(</td>
- <td class="paramtype">const std::string &amp;&nbsp;</td>
- <td class="paramname"> <em>what</em> = <code>&quot;invalid&nbsp;argument&quot;</code></td>
- <td>&nbsp;)&nbsp;</td>
- <td><code> [inline]</code></td>
- </tr>
- </table>
-</div>
-<div class="memdoc">
-
-<p>Definition at line <a class="el" href="exceptions_8hpp_source.html#l00034">34</a> of file <a class="el" href="exceptions_8hpp_source.html">exceptions.hpp</a>.</p>
-
-</div>
-</div>
-<hr/>The documentation for this class was generated from the following file:<ul>
-<li><a class="el" href="exceptions_8hpp_source.html">exceptions.hpp</a></li>
-</ul>
-</div>
-<hr class="footer"/><address style="text-align: right;"><small>Generated on Tue May 4 10:20:17 2010 for The Extended Integer (XInt) Library by&nbsp;
-<a href="http://www.doxygen.org/index.html">
-<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.3 </small></address>
-</body>
-</html>

Deleted: sandbox/xint/doc/classboost_1_1xint_1_1exceptions_1_1invalid__base-members.html
==============================================================================
--- sandbox/xint/doc/classboost_1_1xint_1_1exceptions_1_1invalid__base-members.html 2010-05-31 20:43:54 EDT (Mon, 31 May 2010)
+++ (empty file)
@@ -1,36 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
-<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
-<title>The Extended Integer (XInt) Library: Member List</title>
-<link href="tabs.css" rel="stylesheet" type="text/css"/>
-<link href="doxygen.css" rel="stylesheet" type="text/css"/>
-</head>
-<body>
-<!-- Generated by Doxygen 1.6.3 -->
-<div class="navigation" id="top">
- <div class="tabs">
- <ul>
- <li>Main Page</li>
- <li>Namespaces</li>
- <li class="current">Classes</li>
- <li>Files</li>
- </ul>
- </div>
- <div class="tabs">
- <ul>
- <li>Class List</li>
- <li>Class Hierarchy</li>
- <li>Class Members</li>
- </ul>
- </div>
-</div>
-<div class="contents">
-<h1>boost::xint::exceptions::invalid_base Member List</h1>This is the complete list of members for <a class="el" href="classboost_1_1xint_1_1exceptions_1_1invalid__base.html">boost::xint::exceptions::invalid_base</a>, including all inherited members.<table>
- <tr class="memlist"><td><a class="el" href="classboost_1_1xint_1_1exceptions_1_1invalid__base.html#a4647071020547bd103ee885bec7edffa">invalid_base</a>(const std::string &amp;what=&quot;invalid base&quot;)</td><td><a class="el" href="classboost_1_1xint_1_1exceptions_1_1invalid__base.html">boost::xint::exceptions::invalid_base</a></td><td><code> [inline]</code></td></tr>
-</table></div>
-<hr class="footer"/><address style="text-align: right;"><small>Generated on Tue May 4 10:20:17 2010 for The Extended Integer (XInt) Library by&nbsp;
-<a href="http://www.doxygen.org/index.html">
-<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.3 </small></address>
-</body>
-</html>

Deleted: sandbox/xint/doc/classboost_1_1xint_1_1exceptions_1_1invalid__base.html
==============================================================================
--- sandbox/xint/doc/classboost_1_1xint_1_1exceptions_1_1invalid__base.html 2010-05-31 20:43:54 EDT (Mon, 31 May 2010)
+++ (empty file)
@@ -1,70 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
-<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
-<title>The Extended Integer (XInt) Library: boost::xint::exceptions::invalid_base Class Reference</title>
-<link href="tabs.css" rel="stylesheet" type="text/css"/>
-<link href="doxygen.css" rel="stylesheet" type="text/css"/>
-</head>
-<body>
-<!-- Generated by Doxygen 1.6.3 -->
-<div class="navigation" id="top">
- <div class="tabs">
- <ul>
- <li>Main Page</li>
- <li>Namespaces</li>
- <li class="current">Classes</li>
- <li>Files</li>
- </ul>
- </div>
- <div class="tabs">
- <ul>
- <li>Class List</li>
- <li>Class Hierarchy</li>
- <li>Class Members</li>
- </ul>
- </div>
- <div class="navpath"><a class="el" href="namespaceboost.html">boost</a>::<a class="el" href="namespaceboost_1_1xint.html">xint</a>::<a class="el" href="namespaceboost_1_1xint_1_1exceptions.html">exceptions</a>::<a class="el" href="classboost_1_1xint_1_1exceptions_1_1invalid__base.html">invalid_base</a>
- </div>
-</div>
-<div class="contents">
-<h1>boost::xint::exceptions::invalid_base Class Reference</h1><!-- doxytag: class="boost::xint::exceptions::invalid_base" -->
-<p>List of all members.</p>
-<table border="0" cellpadding="0" cellspacing="0">
-<tr><td colspan="2"><h2>Public Member Functions</h2></td></tr>
-<tr><td class="memItemLeft" align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classboost_1_1xint_1_1exceptions_1_1invalid__base.html#a4647071020547bd103ee885bec7edffa">invalid_base</a> (const std::string &amp;what=&quot;invalid base&quot;)</td></tr>
-</table>
-<hr/><a name="_details"></a><h2>Detailed Description</h2>
-<p>Derived from <code>std::invalid_argument</code>. </p>
-
-<p>Definition at line <a class="el" href="exceptions_8hpp_source.html#l00041">41</a> of file <a class="el" href="exceptions_8hpp_source.html">exceptions.hpp</a>.</p>
-<hr/><h2>Constructor &amp; Destructor Documentation</h2>
-<a class="anchor" id="a4647071020547bd103ee885bec7edffa"></a><!-- doxytag: member="boost::xint::exceptions::invalid_base::invalid_base" ref="a4647071020547bd103ee885bec7edffa" args="(const std::string &amp;what=&quot;invalid base&quot;)" -->
-<div class="memitem">
-<div class="memproto">
- <table class="memname">
- <tr>
- <td class="memname">boost::xint::exceptions::invalid_base::invalid_base </td>
- <td>(</td>
- <td class="paramtype">const std::string &amp;&nbsp;</td>
- <td class="paramname"> <em>what</em> = <code>&quot;invalid&nbsp;base&quot;</code></td>
- <td>&nbsp;)&nbsp;</td>
- <td><code> [inline]</code></td>
- </tr>
- </table>
-</div>
-<div class="memdoc">
-
-<p>Definition at line <a class="el" href="exceptions_8hpp_source.html#l00043">43</a> of file <a class="el" href="exceptions_8hpp_source.html">exceptions.hpp</a>.</p>
-
-</div>
-</div>
-<hr/>The documentation for this class was generated from the following file:<ul>
-<li><a class="el" href="exceptions_8hpp_source.html">exceptions.hpp</a></li>
-</ul>
-</div>
-<hr class="footer"/><address style="text-align: right;"><small>Generated on Tue May 4 10:20:17 2010 for The Extended Integer (XInt) Library by&nbsp;
-<a href="http://www.doxygen.org/index.html">
-<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.3 </small></address>
-</body>
-</html>

Deleted: sandbox/xint/doc/classboost_1_1xint_1_1exceptions_1_1invalid__digit-members.html
==============================================================================
--- sandbox/xint/doc/classboost_1_1xint_1_1exceptions_1_1invalid__digit-members.html 2010-05-31 20:43:54 EDT (Mon, 31 May 2010)
+++ (empty file)
@@ -1,36 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
-<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
-<title>The Extended Integer (XInt) Library: Member List</title>
-<link href="tabs.css" rel="stylesheet" type="text/css"/>
-<link href="doxygen.css" rel="stylesheet" type="text/css"/>
-</head>
-<body>
-<!-- Generated by Doxygen 1.6.3 -->
-<div class="navigation" id="top">
- <div class="tabs">
- <ul>
- <li>Main Page</li>
- <li>Namespaces</li>
- <li class="current">Classes</li>
- <li>Files</li>
- </ul>
- </div>
- <div class="tabs">
- <ul>
- <li>Class List</li>
- <li>Class Hierarchy</li>
- <li>Class Members</li>
- </ul>
- </div>
-</div>
-<div class="contents">
-<h1>boost::xint::exceptions::invalid_digit Member List</h1>This is the complete list of members for <a class="el" href="classboost_1_1xint_1_1exceptions_1_1invalid__digit.html">boost::xint::exceptions::invalid_digit</a>, including all inherited members.<table>
- <tr class="memlist"><td><a class="el" href="classboost_1_1xint_1_1exceptions_1_1invalid__digit.html#abcdf43b30c3910dde89e406ca802eacc">invalid_digit</a>(const std::string &amp;what=&quot;invalid digit&quot;)</td><td><a class="el" href="classboost_1_1xint_1_1exceptions_1_1invalid__digit.html">boost::xint::exceptions::invalid_digit</a></td><td><code> [inline]</code></td></tr>
-</table></div>
-<hr class="footer"/><address style="text-align: right;"><small>Generated on Tue May 4 10:20:17 2010 for The Extended Integer (XInt) Library by&nbsp;
-<a href="http://www.doxygen.org/index.html">
-<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.3 </small></address>
-</body>
-</html>

Deleted: sandbox/xint/doc/classboost_1_1xint_1_1exceptions_1_1invalid__digit.html
==============================================================================
--- sandbox/xint/doc/classboost_1_1xint_1_1exceptions_1_1invalid__digit.html 2010-05-31 20:43:54 EDT (Mon, 31 May 2010)
+++ (empty file)
@@ -1,70 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
-<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
-<title>The Extended Integer (XInt) Library: boost::xint::exceptions::invalid_digit Class Reference</title>
-<link href="tabs.css" rel="stylesheet" type="text/css"/>
-<link href="doxygen.css" rel="stylesheet" type="text/css"/>
-</head>
-<body>
-<!-- Generated by Doxygen 1.6.3 -->
-<div class="navigation" id="top">
- <div class="tabs">
- <ul>
- <li>Main Page</li>
- <li>Namespaces</li>
- <li class="current">Classes</li>
- <li>Files</li>
- </ul>
- </div>
- <div class="tabs">
- <ul>
- <li>Class List</li>
- <li>Class Hierarchy</li>
- <li>Class Members</li>
- </ul>
- </div>
- <div class="navpath"><a class="el" href="namespaceboost.html">boost</a>::<a class="el" href="namespaceboost_1_1xint.html">xint</a>::<a class="el" href="namespaceboost_1_1xint_1_1exceptions.html">exceptions</a>::<a class="el" href="classboost_1_1xint_1_1exceptions_1_1invalid__digit.html">invalid_digit</a>
- </div>
-</div>
-<div class="contents">
-<h1>boost::xint::exceptions::invalid_digit Class Reference</h1><!-- doxytag: class="boost::xint::exceptions::invalid_digit" -->
-<p>List of all members.</p>
-<table border="0" cellpadding="0" cellspacing="0">
-<tr><td colspan="2"><h2>Public Member Functions</h2></td></tr>
-<tr><td class="memItemLeft" align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classboost_1_1xint_1_1exceptions_1_1invalid__digit.html#abcdf43b30c3910dde89e406ca802eacc">invalid_digit</a> (const std::string &amp;what=&quot;invalid digit&quot;)</td></tr>
-</table>
-<hr/><a name="_details"></a><h2>Detailed Description</h2>
-<p>Derived from <code>std::range_error</code>. </p>
-
-<p>Definition at line <a class="el" href="exceptions_8hpp_source.html#l00050">50</a> of file <a class="el" href="exceptions_8hpp_source.html">exceptions.hpp</a>.</p>
-<hr/><h2>Constructor &amp; Destructor Documentation</h2>
-<a class="anchor" id="abcdf43b30c3910dde89e406ca802eacc"></a><!-- doxytag: member="boost::xint::exceptions::invalid_digit::invalid_digit" ref="abcdf43b30c3910dde89e406ca802eacc" args="(const std::string &amp;what=&quot;invalid digit&quot;)" -->
-<div class="memitem">
-<div class="memproto">
- <table class="memname">
- <tr>
- <td class="memname">boost::xint::exceptions::invalid_digit::invalid_digit </td>
- <td>(</td>
- <td class="paramtype">const std::string &amp;&nbsp;</td>
- <td class="paramname"> <em>what</em> = <code>&quot;invalid&nbsp;digit&quot;</code></td>
- <td>&nbsp;)&nbsp;</td>
- <td><code> [inline]</code></td>
- </tr>
- </table>
-</div>
-<div class="memdoc">
-
-<p>Definition at line <a class="el" href="exceptions_8hpp_source.html#l00052">52</a> of file <a class="el" href="exceptions_8hpp_source.html">exceptions.hpp</a>.</p>
-
-</div>
-</div>
-<hr/>The documentation for this class was generated from the following file:<ul>
-<li><a class="el" href="exceptions_8hpp_source.html">exceptions.hpp</a></li>
-</ul>
-</div>
-<hr class="footer"/><address style="text-align: right;"><small>Generated on Tue May 4 10:20:17 2010 for The Extended Integer (XInt) Library by&nbsp;
-<a href="http://www.doxygen.org/index.html">
-<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.3 </small></address>
-</body>
-</html>

Deleted: sandbox/xint/doc/classboost_1_1xint_1_1exceptions_1_1invalid__modulus-members.html
==============================================================================
--- sandbox/xint/doc/classboost_1_1xint_1_1exceptions_1_1invalid__modulus-members.html 2010-05-31 20:43:54 EDT (Mon, 31 May 2010)
+++ (empty file)
@@ -1,36 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
-<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
-<title>The Extended Integer (XInt) Library: Member List</title>
-<link href="tabs.css" rel="stylesheet" type="text/css"/>
-<link href="doxygen.css" rel="stylesheet" type="text/css"/>
-</head>
-<body>
-<!-- Generated by Doxygen 1.6.3 -->
-<div class="navigation" id="top">
- <div class="tabs">
- <ul>
- <li>Main Page</li>
- <li>Namespaces</li>
- <li class="current">Classes</li>
- <li>Files</li>
- </ul>
- </div>
- <div class="tabs">
- <ul>
- <li>Class List</li>
- <li>Class Hierarchy</li>
- <li>Class Members</li>
- </ul>
- </div>
-</div>
-<div class="contents">
-<h1>boost::xint::exceptions::invalid_modulus Member List</h1>This is the complete list of members for <a class="el" href="classboost_1_1xint_1_1exceptions_1_1invalid__modulus.html">boost::xint::exceptions::invalid_modulus</a>, including all inherited members.<table>
- <tr class="memlist"><td><a class="el" href="classboost_1_1xint_1_1exceptions_1_1invalid__modulus.html#a16c06e28a7f483b0ca2fb5906d53278d">invalid_modulus</a>(const std::string &amp;what=&quot;invalid modulus&quot;)</td><td><a class="el" href="classboost_1_1xint_1_1exceptions_1_1invalid__modulus.html">boost::xint::exceptions::invalid_modulus</a></td><td><code> [inline]</code></td></tr>
-</table></div>
-<hr class="footer"/><address style="text-align: right;"><small>Generated on Tue May 4 10:20:17 2010 for The Extended Integer (XInt) Library by&nbsp;
-<a href="http://www.doxygen.org/index.html">
-<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.3 </small></address>
-</body>
-</html>

Deleted: sandbox/xint/doc/classboost_1_1xint_1_1exceptions_1_1invalid__modulus.html
==============================================================================
--- sandbox/xint/doc/classboost_1_1xint_1_1exceptions_1_1invalid__modulus.html 2010-05-31 20:43:54 EDT (Mon, 31 May 2010)
+++ (empty file)
@@ -1,70 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
-<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
-<title>The Extended Integer (XInt) Library: boost::xint::exceptions::invalid_modulus Class Reference</title>
-<link href="tabs.css" rel="stylesheet" type="text/css"/>
-<link href="doxygen.css" rel="stylesheet" type="text/css"/>
-</head>
-<body>
-<!-- Generated by Doxygen 1.6.3 -->
-<div class="navigation" id="top">
- <div class="tabs">
- <ul>
- <li>Main Page</li>
- <li>Namespaces</li>
- <li class="current">Classes</li>
- <li>Files</li>
- </ul>
- </div>
- <div class="tabs">
- <ul>
- <li>Class List</li>
- <li>Class Hierarchy</li>
- <li>Class Members</li>
- </ul>
- </div>
- <div class="navpath"><a class="el" href="namespaceboost.html">boost</a>::<a class="el" href="namespaceboost_1_1xint.html">xint</a>::<a class="el" href="namespaceboost_1_1xint_1_1exceptions.html">exceptions</a>::<a class="el" href="classboost_1_1xint_1_1exceptions_1_1invalid__modulus.html">invalid_modulus</a>
- </div>
-</div>
-<div class="contents">
-<h1>boost::xint::exceptions::invalid_modulus Class Reference</h1><!-- doxytag: class="boost::xint::exceptions::invalid_modulus" -->
-<p>List of all members.</p>
-<table border="0" cellpadding="0" cellspacing="0">
-<tr><td colspan="2"><h2>Public Member Functions</h2></td></tr>
-<tr><td class="memItemLeft" align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classboost_1_1xint_1_1exceptions_1_1invalid__modulus.html#a16c06e28a7f483b0ca2fb5906d53278d">invalid_modulus</a> (const std::string &amp;what=&quot;invalid modulus&quot;)</td></tr>
-</table>
-<hr/><a name="_details"></a><h2>Detailed Description</h2>
-<p>Derived from <code>std::invalid_argument</code>. </p>
-
-<p>Definition at line <a class="el" href="exceptions_8hpp_source.html#l00059">59</a> of file <a class="el" href="exceptions_8hpp_source.html">exceptions.hpp</a>.</p>
-<hr/><h2>Constructor &amp; Destructor Documentation</h2>
-<a class="anchor" id="a16c06e28a7f483b0ca2fb5906d53278d"></a><!-- doxytag: member="boost::xint::exceptions::invalid_modulus::invalid_modulus" ref="a16c06e28a7f483b0ca2fb5906d53278d" args="(const std::string &amp;what=&quot;invalid modulus&quot;)" -->
-<div class="memitem">
-<div class="memproto">
- <table class="memname">
- <tr>
- <td class="memname">boost::xint::exceptions::invalid_modulus::invalid_modulus </td>
- <td>(</td>
- <td class="paramtype">const std::string &amp;&nbsp;</td>
- <td class="paramname"> <em>what</em> = <code>&quot;invalid&nbsp;modulus&quot;</code></td>
- <td>&nbsp;)&nbsp;</td>
- <td><code> [inline]</code></td>
- </tr>
- </table>
-</div>
-<div class="memdoc">
-
-<p>Definition at line <a class="el" href="exceptions_8hpp_source.html#l00061">61</a> of file <a class="el" href="exceptions_8hpp_source.html">exceptions.hpp</a>.</p>
-
-</div>
-</div>
-<hr/>The documentation for this class was generated from the following file:<ul>
-<li><a class="el" href="exceptions_8hpp_source.html">exceptions.hpp</a></li>
-</ul>
-</div>
-<hr class="footer"/><address style="text-align: right;"><small>Generated on Tue May 4 10:20:17 2010 for The Extended Integer (XInt) Library by&nbsp;
-<a href="http://www.doxygen.org/index.html">
-<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.3 </small></address>
-</body>
-</html>

Deleted: sandbox/xint/doc/classboost_1_1xint_1_1exceptions_1_1no__strong__random-members.html
==============================================================================
--- sandbox/xint/doc/classboost_1_1xint_1_1exceptions_1_1no__strong__random-members.html 2010-05-31 20:43:54 EDT (Mon, 31 May 2010)
+++ (empty file)
@@ -1,36 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
-<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
-<title>The Extended Integer (XInt) Library: Member List</title>
-<link href="tabs.css" rel="stylesheet" type="text/css"/>
-<link href="doxygen.css" rel="stylesheet" type="text/css"/>
-</head>
-<body>
-<!-- Generated by Doxygen 1.6.3 -->
-<div class="navigation" id="top">
- <div class="tabs">
- <ul>
- <li>Main Page</li>
- <li>Namespaces</li>
- <li class="current">Classes</li>
- <li>Files</li>
- </ul>
- </div>
- <div class="tabs">
- <ul>
- <li>Class List</li>
- <li>Class Hierarchy</li>
- <li>Class Members</li>
- </ul>
- </div>
-</div>
-<div class="contents">
-<h1>boost::xint::exceptions::no_strong_random Member List</h1>This is the complete list of members for <a class="el" href="classboost_1_1xint_1_1exceptions_1_1no__strong__random.html">boost::xint::exceptions::no_strong_random</a>, including all inherited members.<table>
- <tr class="memlist"><td><a class="el" href="classboost_1_1xint_1_1exceptions_1_1no__strong__random.html#ab225c7d5d10a03eac6d5e9c784135675">no_strong_random</a>(const std::string &amp;what=&quot;system does not have a strong random generator&quot;)</td><td><a class="el" href="classboost_1_1xint_1_1exceptions_1_1no__strong__random.html">boost::xint::exceptions::no_strong_random</a></td><td><code> [inline]</code></td></tr>
-</table></div>
-<hr class="footer"/><address style="text-align: right;"><small>Generated on Tue May 4 10:20:17 2010 for The Extended Integer (XInt) Library by&nbsp;
-<a href="http://www.doxygen.org/index.html">
-<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.3 </small></address>
-</body>
-</html>

Deleted: sandbox/xint/doc/classboost_1_1xint_1_1exceptions_1_1no__strong__random.html
==============================================================================
--- sandbox/xint/doc/classboost_1_1xint_1_1exceptions_1_1no__strong__random.html 2010-05-31 20:43:54 EDT (Mon, 31 May 2010)
+++ (empty file)
@@ -1,71 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
-<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
-<title>The Extended Integer (XInt) Library: boost::xint::exceptions::no_strong_random Class Reference</title>
-<link href="tabs.css" rel="stylesheet" type="text/css"/>
-<link href="doxygen.css" rel="stylesheet" type="text/css"/>
-</head>
-<body>
-<!-- Generated by Doxygen 1.6.3 -->
-<div class="navigation" id="top">
- <div class="tabs">
- <ul>
- <li>Main Page</li>
- <li>Namespaces</li>
- <li class="current">Classes</li>
- <li>Files</li>
- </ul>
- </div>
- <div class="tabs">
- <ul>
- <li>Class List</li>
- <li>Class Hierarchy</li>
- <li>Class Members</li>
- </ul>
- </div>
- <div class="navpath"><a class="el" href="namespaceboost.html">boost</a>::<a class="el" href="namespaceboost_1_1xint.html">xint</a>::<a class="el" href="namespaceboost_1_1xint_1_1exceptions.html">exceptions</a>::<a class="el" href="classboost_1_1xint_1_1exceptions_1_1no__strong__random.html">no_strong_random</a>
- </div>
-</div>
-<div class="contents">
-<h1>boost::xint::exceptions::no_strong_random Class Reference</h1><!-- doxytag: class="boost::xint::exceptions::no_strong_random" -->
-<p>List of all members.</p>
-<table border="0" cellpadding="0" cellspacing="0">
-<tr><td colspan="2"><h2>Public Member Functions</h2></td></tr>
-<tr><td class="memItemLeft" align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classboost_1_1xint_1_1exceptions_1_1no__strong__random.html#ab225c7d5d10a03eac6d5e9c784135675">no_strong_random</a> (const std::string &amp;what=&quot;system does not have a strong random generator&quot;)</td></tr>
-</table>
-<hr/><a name="_details"></a><h2>Detailed Description</h2>
-<p>Derived from <code>std::runtime_error</code>.</p>
-<dl class="remark"><dt><b>Remarks:</b></dt><dd>Thrown by the <a class="el" href="classboost_1_1xint_1_1strong__random__generator.html" title="A convenience class for cryptographically-secure random numbers.">xint::strong_random_generator</a> class's constructor, if the system does not provide a cryptographically-secure random generator. Also thrown if the generator fails when asked to provide a random value, though this should be vanishingly rare. </dd></dl>
-
-<p>Definition at line <a class="el" href="exceptions_8hpp_source.html#l00114">114</a> of file <a class="el" href="exceptions_8hpp_source.html">exceptions.hpp</a>.</p>
-<hr/><h2>Constructor &amp; Destructor Documentation</h2>
-<a class="anchor" id="ab225c7d5d10a03eac6d5e9c784135675"></a><!-- doxytag: member="boost::xint::exceptions::no_strong_random::no_strong_random" ref="ab225c7d5d10a03eac6d5e9c784135675" args="(const std::string &amp;what=&quot;system does not have a strong random generator&quot;)" -->
-<div class="memitem">
-<div class="memproto">
- <table class="memname">
- <tr>
- <td class="memname">boost::xint::exceptions::no_strong_random::no_strong_random </td>
- <td>(</td>
- <td class="paramtype">const std::string &amp;&nbsp;</td>
- <td class="paramname"> <em>what</em> = <code>&quot;system&nbsp;does&nbsp;not&nbsp;have&nbsp;a&nbsp;strong&nbsp;random&nbsp;generator&quot;</code></td>
- <td>&nbsp;)&nbsp;</td>
- <td><code> [inline]</code></td>
- </tr>
- </table>
-</div>
-<div class="memdoc">
-
-<p>Definition at line <a class="el" href="exceptions_8hpp_source.html#l00116">116</a> of file <a class="el" href="exceptions_8hpp_source.html">exceptions.hpp</a>.</p>
-
-</div>
-</div>
-<hr/>The documentation for this class was generated from the following file:<ul>
-<li><a class="el" href="exceptions_8hpp_source.html">exceptions.hpp</a></li>
-</ul>
-</div>
-<hr class="footer"/><address style="text-align: right;"><small>Generated on Tue May 4 10:20:17 2010 for The Extended Integer (XInt) Library by&nbsp;
-<a href="http://www.doxygen.org/index.html">
-<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.3 </small></address>
-</body>
-</html>

Deleted: sandbox/xint/doc/classboost_1_1xint_1_1exceptions_1_1not__a__number-members.html
==============================================================================
--- sandbox/xint/doc/classboost_1_1xint_1_1exceptions_1_1not__a__number-members.html 2010-05-31 20:43:54 EDT (Mon, 31 May 2010)
+++ (empty file)
@@ -1,36 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
-<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
-<title>The Extended Integer (XInt) Library: Member List</title>
-<link href="tabs.css" rel="stylesheet" type="text/css"/>
-<link href="doxygen.css" rel="stylesheet" type="text/css"/>
-</head>
-<body>
-<!-- Generated by Doxygen 1.6.3 -->
-<div class="navigation" id="top">
- <div class="tabs">
- <ul>
- <li>Main Page</li>
- <li>Namespaces</li>
- <li class="current">Classes</li>
- <li>Files</li>
- </ul>
- </div>
- <div class="tabs">
- <ul>
- <li>Class List</li>
- <li>Class Hierarchy</li>
- <li>Class Members</li>
- </ul>
- </div>
-</div>
-<div class="contents">
-<h1>boost::xint::exceptions::not_a_number Member List</h1>This is the complete list of members for <a class="el" href="classboost_1_1xint_1_1exceptions_1_1not__a__number.html">boost::xint::exceptions::not_a_number</a>, including all inherited members.<table>
- <tr class="memlist"><td><a class="el" href="classboost_1_1xint_1_1exceptions_1_1not__a__number.html#aa47b024550fd673bd497e0875443c67f">not_a_number</a>(const std::string &amp;what=&quot;attempted to use a Not-a-Number&quot;)</td><td><a class="el" href="classboost_1_1xint_1_1exceptions_1_1not__a__number.html">boost::xint::exceptions::not_a_number</a></td><td><code> [inline]</code></td></tr>
-</table></div>
-<hr class="footer"/><address style="text-align: right;"><small>Generated on Tue May 4 10:20:17 2010 for The Extended Integer (XInt) Library by&nbsp;
-<a href="http://www.doxygen.org/index.html">
-<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.3 </small></address>
-</body>
-</html>

Deleted: sandbox/xint/doc/classboost_1_1xint_1_1exceptions_1_1not__a__number.html
==============================================================================
--- sandbox/xint/doc/classboost_1_1xint_1_1exceptions_1_1not__a__number.html 2010-05-31 20:43:54 EDT (Mon, 31 May 2010)
+++ (empty file)
@@ -1,71 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
-<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
-<title>The Extended Integer (XInt) Library: boost::xint::exceptions::not_a_number Class Reference</title>
-<link href="tabs.css" rel="stylesheet" type="text/css"/>
-<link href="doxygen.css" rel="stylesheet" type="text/css"/>
-</head>
-<body>
-<!-- Generated by Doxygen 1.6.3 -->
-<div class="navigation" id="top">
- <div class="tabs">
- <ul>
- <li>Main Page</li>
- <li>Namespaces</li>
- <li class="current">Classes</li>
- <li>Files</li>
- </ul>
- </div>
- <div class="tabs">
- <ul>
- <li>Class List</li>
- <li>Class Hierarchy</li>
- <li>Class Members</li>
- </ul>
- </div>
- <div class="navpath"><a class="el" href="namespaceboost.html">boost</a>::<a class="el" href="namespaceboost_1_1xint.html">xint</a>::<a class="el" href="namespaceboost_1_1xint_1_1exceptions.html">exceptions</a>::<a class="el" href="classboost_1_1xint_1_1exceptions_1_1not__a__number.html">not_a_number</a>
- </div>
-</div>
-<div class="contents">
-<h1>boost::xint::exceptions::not_a_number Class Reference</h1><!-- doxytag: class="boost::xint::exceptions::not_a_number" -->
-<p>List of all members.</p>
-<table border="0" cellpadding="0" cellspacing="0">
-<tr><td colspan="2"><h2>Public Member Functions</h2></td></tr>
-<tr><td class="memItemLeft" align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classboost_1_1xint_1_1exceptions_1_1not__a__number.html#aa47b024550fd673bd497e0875443c67f">not_a_number</a> (const std::string &amp;what=&quot;attempted to use a Not-a-Number&quot;)</td></tr>
-</table>
-<hr/><a name="_details"></a><h2>Detailed Description</h2>
-<p>Derived from <code>std::runtime_error</code>.</p>
-<dl class="remark"><dt><b>Remarks:</b></dt><dd>Most library functions will throw a <a class="el" href="classboost_1_1xint_1_1exceptions_1_1not__a__number.html">not_a_number</a> exception if you try to use a <a class="el" href="nan.html">Not-a-Number value</a> in them. </dd></dl>
-
-<p>Definition at line <a class="el" href="exceptions_8hpp_source.html#l00099">99</a> of file <a class="el" href="exceptions_8hpp_source.html">exceptions.hpp</a>.</p>
-<hr/><h2>Constructor &amp; Destructor Documentation</h2>
-<a class="anchor" id="aa47b024550fd673bd497e0875443c67f"></a><!-- doxytag: member="boost::xint::exceptions::not_a_number::not_a_number" ref="aa47b024550fd673bd497e0875443c67f" args="(const std::string &amp;what=&quot;attempted to use a Not&#45;a&#45;Number&quot;)" -->
-<div class="memitem">
-<div class="memproto">
- <table class="memname">
- <tr>
- <td class="memname">boost::xint::exceptions::not_a_number::not_a_number </td>
- <td>(</td>
- <td class="paramtype">const std::string &amp;&nbsp;</td>
- <td class="paramname"> <em>what</em> = <code>&quot;attempted&nbsp;to&nbsp;use&nbsp;a&nbsp;Not-a-Number&quot;</code></td>
- <td>&nbsp;)&nbsp;</td>
- <td><code> [inline]</code></td>
- </tr>
- </table>
-</div>
-<div class="memdoc">
-
-<p>Definition at line <a class="el" href="exceptions_8hpp_source.html#l00101">101</a> of file <a class="el" href="exceptions_8hpp_source.html">exceptions.hpp</a>.</p>
-
-</div>
-</div>
-<hr/>The documentation for this class was generated from the following file:<ul>
-<li><a class="el" href="exceptions_8hpp_source.html">exceptions.hpp</a></li>
-</ul>
-</div>
-<hr class="footer"/><address style="text-align: right;"><small>Generated on Tue May 4 10:20:17 2010 for The Extended Integer (XInt) Library by&nbsp;
-<a href="http://www.doxygen.org/index.html">
-<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.3 </small></address>
-</body>
-</html>

Deleted: sandbox/xint/doc/classboost_1_1xint_1_1exceptions_1_1overflow__error-members.html
==============================================================================
--- sandbox/xint/doc/classboost_1_1xint_1_1exceptions_1_1overflow__error-members.html 2010-05-31 20:43:54 EDT (Mon, 31 May 2010)
+++ (empty file)
@@ -1,36 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
-<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
-<title>The Extended Integer (XInt) Library: Member List</title>
-<link href="tabs.css" rel="stylesheet" type="text/css"/>
-<link href="doxygen.css" rel="stylesheet" type="text/css"/>
-</head>
-<body>
-<!-- Generated by Doxygen 1.6.3 -->
-<div class="navigation" id="top">
- <div class="tabs">
- <ul>
- <li>Main Page</li>
- <li>Namespaces</li>
- <li class="current">Classes</li>
- <li>Files</li>
- </ul>
- </div>
- <div class="tabs">
- <ul>
- <li>Class List</li>
- <li>Class Hierarchy</li>
- <li>Class Members</li>
- </ul>
- </div>
-</div>
-<div class="contents">
-<h1>boost::xint::exceptions::overflow_error Member List</h1>This is the complete list of members for <a class="el" href="classboost_1_1xint_1_1exceptions_1_1overflow__error.html">boost::xint::exceptions::overflow_error</a>, including all inherited members.<table>
- <tr class="memlist"><td><a class="el" href="classboost_1_1xint_1_1exceptions_1_1overflow__error.html#a767d8fbe5816d77fa0aadf9481d0bd5a">overflow_error</a>(const std::string &amp;what=&quot;overflow error: can't obtain enough memory to represent the requested number&quot;)</td><td><a class="el" href="classboost_1_1xint_1_1exceptions_1_1overflow__error.html">boost::xint::exceptions::overflow_error</a></td><td><code> [inline]</code></td></tr>
-</table></div>
-<hr class="footer"/><address style="text-align: right;"><small>Generated on Tue May 4 10:20:17 2010 for The Extended Integer (XInt) Library by&nbsp;
-<a href="http://www.doxygen.org/index.html">
-<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.3 </small></address>
-</body>
-</html>

Deleted: sandbox/xint/doc/classboost_1_1xint_1_1exceptions_1_1overflow__error.html
==============================================================================
--- sandbox/xint/doc/classboost_1_1xint_1_1exceptions_1_1overflow__error.html 2010-05-31 20:43:54 EDT (Mon, 31 May 2010)
+++ (empty file)
@@ -1,71 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
-<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
-<title>The Extended Integer (XInt) Library: boost::xint::exceptions::overflow_error Class Reference</title>
-<link href="tabs.css" rel="stylesheet" type="text/css"/>
-<link href="doxygen.css" rel="stylesheet" type="text/css"/>
-</head>
-<body>
-<!-- Generated by Doxygen 1.6.3 -->
-<div class="navigation" id="top">
- <div class="tabs">
- <ul>
- <li>Main Page</li>
- <li>Namespaces</li>
- <li class="current">Classes</li>
- <li>Files</li>
- </ul>
- </div>
- <div class="tabs">
- <ul>
- <li>Class List</li>
- <li>Class Hierarchy</li>
- <li>Class Members</li>
- </ul>
- </div>
- <div class="navpath"><a class="el" href="namespaceboost.html">boost</a>::<a class="el" href="namespaceboost_1_1xint.html">xint</a>::<a class="el" href="namespaceboost_1_1xint_1_1exceptions.html">exceptions</a>::<a class="el" href="classboost_1_1xint_1_1exceptions_1_1overflow__error.html">overflow_error</a>
- </div>
-</div>
-<div class="contents">
-<h1>boost::xint::exceptions::overflow_error Class Reference</h1><!-- doxytag: class="boost::xint::exceptions::overflow_error" -->
-<p>List of all members.</p>
-<table border="0" cellpadding="0" cellspacing="0">
-<tr><td colspan="2"><h2>Public Member Functions</h2></td></tr>
-<tr><td class="memItemLeft" align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classboost_1_1xint_1_1exceptions_1_1overflow__error.html#a767d8fbe5816d77fa0aadf9481d0bd5a">overflow_error</a> (const std::string &amp;what=&quot;overflow error: can't obtain enough memory to represent the requested number&quot;)</td></tr>
-</table>
-<hr/><a name="_details"></a><h2>Detailed Description</h2>
-<p>Derived from <code>std::overflow_error</code>.</p>
-<dl class="remark"><dt><b>Remarks:</b></dt><dd>Thrown when the library can't get enough memory to represent a number. </dd></dl>
-
-<p>Definition at line <a class="el" href="exceptions_8hpp_source.html#l00127">127</a> of file <a class="el" href="exceptions_8hpp_source.html">exceptions.hpp</a>.</p>
-<hr/><h2>Constructor &amp; Destructor Documentation</h2>
-<a class="anchor" id="a767d8fbe5816d77fa0aadf9481d0bd5a"></a><!-- doxytag: member="boost::xint::exceptions::overflow_error::overflow_error" ref="a767d8fbe5816d77fa0aadf9481d0bd5a" args="(const std::string &amp;what=&quot;overflow error: can't obtain enough memory to represent the requested number&quot;)" -->
-<div class="memitem">
-<div class="memproto">
- <table class="memname">
- <tr>
- <td class="memname">boost::xint::exceptions::overflow_error::overflow_error </td>
- <td>(</td>
- <td class="paramtype">const std::string &amp;&nbsp;</td>
- <td class="paramname"> <em>what</em> = <code>&quot;overflow&nbsp;error:&nbsp;can't&nbsp;obtain&nbsp;enough&nbsp;memory&nbsp;to&nbsp;represent&nbsp;the&nbsp;requested&nbsp;number&quot;</code></td>
- <td>&nbsp;)&nbsp;</td>
- <td><code> [inline]</code></td>
- </tr>
- </table>
-</div>
-<div class="memdoc">
-
-<p>Definition at line <a class="el" href="exceptions_8hpp_source.html#l00129">129</a> of file <a class="el" href="exceptions_8hpp_source.html">exceptions.hpp</a>.</p>
-
-</div>
-</div>
-<hr/>The documentation for this class was generated from the following file:<ul>
-<li><a class="el" href="exceptions_8hpp_source.html">exceptions.hpp</a></li>
-</ul>
-</div>
-<hr class="footer"/><address style="text-align: right;"><small>Generated on Tue May 4 10:20:17 2010 for The Extended Integer (XInt) Library by&nbsp;
-<a href="http://www.doxygen.org/index.html">
-<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.3 </small></address>
-</body>
-</html>

Deleted: sandbox/xint/doc/classboost_1_1xint_1_1exceptions_1_1too__big-members.html
==============================================================================
--- sandbox/xint/doc/classboost_1_1xint_1_1exceptions_1_1too__big-members.html 2010-05-31 20:43:54 EDT (Mon, 31 May 2010)
+++ (empty file)
@@ -1,36 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
-<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
-<title>The Extended Integer (XInt) Library: Member List</title>
-<link href="tabs.css" rel="stylesheet" type="text/css"/>
-<link href="doxygen.css" rel="stylesheet" type="text/css"/>
-</head>
-<body>
-<!-- Generated by Doxygen 1.6.3 -->
-<div class="navigation" id="top">
- <div class="tabs">
- <ul>
- <li>Main Page</li>
- <li>Namespaces</li>
- <li class="current">Classes</li>
- <li>Files</li>
- </ul>
- </div>
- <div class="tabs">
- <ul>
- <li>Class List</li>
- <li>Class Hierarchy</li>
- <li>Class Members</li>
- </ul>
- </div>
-</div>
-<div class="contents">
-<h1>boost::xint::exceptions::too_big Member List</h1>This is the complete list of members for <a class="el" href="classboost_1_1xint_1_1exceptions_1_1too__big.html">boost::xint::exceptions::too_big</a>, including all inherited members.<table>
- <tr class="memlist"><td><a class="el" href="classboost_1_1xint_1_1exceptions_1_1too__big.html#a111e2c1a759054d80afcd5fa4af2995c">too_big</a>(const std::string &amp;what=&quot;value out of range for requested conversion&quot;)</td><td><a class="el" href="classboost_1_1xint_1_1exceptions_1_1too__big.html">boost::xint::exceptions::too_big</a></td><td><code> [inline]</code></td></tr>
-</table></div>
-<hr class="footer"/><address style="text-align: right;"><small>Generated on Tue May 4 10:20:17 2010 for The Extended Integer (XInt) Library by&nbsp;
-<a href="http://www.doxygen.org/index.html">
-<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.3 </small></address>
-</body>
-</html>

Deleted: sandbox/xint/doc/classboost_1_1xint_1_1exceptions_1_1too__big.html
==============================================================================
--- sandbox/xint/doc/classboost_1_1xint_1_1exceptions_1_1too__big.html 2010-05-31 20:43:54 EDT (Mon, 31 May 2010)
+++ (empty file)
@@ -1,70 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
-<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
-<title>The Extended Integer (XInt) Library: boost::xint::exceptions::too_big Class Reference</title>
-<link href="tabs.css" rel="stylesheet" type="text/css"/>
-<link href="doxygen.css" rel="stylesheet" type="text/css"/>
-</head>
-<body>
-<!-- Generated by Doxygen 1.6.3 -->
-<div class="navigation" id="top">
- <div class="tabs">
- <ul>
- <li>Main Page</li>
- <li>Namespaces</li>
- <li class="current">Classes</li>
- <li>Files</li>
- </ul>
- </div>
- <div class="tabs">
- <ul>
- <li>Class List</li>
- <li>Class Hierarchy</li>
- <li>Class Members</li>
- </ul>
- </div>
- <div class="navpath"><a class="el" href="namespaceboost.html">boost</a>::<a class="el" href="namespaceboost_1_1xint.html">xint</a>::<a class="el" href="namespaceboost_1_1xint_1_1exceptions.html">exceptions</a>::<a class="el" href="classboost_1_1xint_1_1exceptions_1_1too__big.html">too_big</a>
- </div>
-</div>
-<div class="contents">
-<h1>boost::xint::exceptions::too_big Class Reference</h1><!-- doxytag: class="boost::xint::exceptions::too_big" -->
-<p>List of all members.</p>
-<table border="0" cellpadding="0" cellspacing="0">
-<tr><td colspan="2"><h2>Public Member Functions</h2></td></tr>
-<tr><td class="memItemLeft" align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classboost_1_1xint_1_1exceptions_1_1too__big.html#a111e2c1a759054d80afcd5fa4af2995c">too_big</a> (const std::string &amp;what=&quot;value out of range for requested conversion&quot;)</td></tr>
-</table>
-<hr/><a name="_details"></a><h2>Detailed Description</h2>
-<p>Derived from <code>std::range_error</code>. </p>
-
-<p>Definition at line <a class="el" href="exceptions_8hpp_source.html#l00086">86</a> of file <a class="el" href="exceptions_8hpp_source.html">exceptions.hpp</a>.</p>
-<hr/><h2>Constructor &amp; Destructor Documentation</h2>
-<a class="anchor" id="a111e2c1a759054d80afcd5fa4af2995c"></a><!-- doxytag: member="boost::xint::exceptions::too_big::too_big" ref="a111e2c1a759054d80afcd5fa4af2995c" args="(const std::string &amp;what=&quot;value out of range for requested conversion&quot;)" -->
-<div class="memitem">
-<div class="memproto">
- <table class="memname">
- <tr>
- <td class="memname">boost::xint::exceptions::too_big::too_big </td>
- <td>(</td>
- <td class="paramtype">const std::string &amp;&nbsp;</td>
- <td class="paramname"> <em>what</em> = <code>&quot;value&nbsp;out&nbsp;of&nbsp;range&nbsp;for&nbsp;requested&nbsp;conversion&quot;</code></td>
- <td>&nbsp;)&nbsp;</td>
- <td><code> [inline]</code></td>
- </tr>
- </table>
-</div>
-<div class="memdoc">
-
-<p>Definition at line <a class="el" href="exceptions_8hpp_source.html#l00088">88</a> of file <a class="el" href="exceptions_8hpp_source.html">exceptions.hpp</a>.</p>
-
-</div>
-</div>
-<hr/>The documentation for this class was generated from the following file:<ul>
-<li><a class="el" href="exceptions_8hpp_source.html">exceptions.hpp</a></li>
-</ul>
-</div>
-<hr class="footer"/><address style="text-align: right;"><small>Generated on Tue May 4 10:20:17 2010 for The Extended Integer (XInt) Library by&nbsp;
-<a href="http://www.doxygen.org/index.html">
-<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.3 </small></address>
-</body>
-</html>

Deleted: sandbox/xint/doc/classboost_1_1xint_1_1fixed__integer-members.html
==============================================================================
--- sandbox/xint/doc/classboost_1_1xint_1_1fixed__integer-members.html 2010-05-31 20:43:54 EDT (Mon, 31 May 2010)
+++ (empty file)
@@ -1,73 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
-<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
-<title>The Extended Integer (XInt) Library: Member List</title>
-<link href="tabs.css" rel="stylesheet" type="text/css"/>
-<link href="doxygen.css" rel="stylesheet" type="text/css"/>
-</head>
-<body>
-<!-- Generated by Doxygen 1.6.3 -->
-<div class="navigation" id="top">
- <div class="tabs">
- <ul>
- <li>Main Page</li>
- <li>Namespaces</li>
- <li class="current">Classes</li>
- <li>Files</li>
- </ul>
- </div>
- <div class="tabs">
- <ul>
- <li>Class List</li>
- <li>Class Hierarchy</li>
- <li>Class Members</li>
- </ul>
- </div>
-</div>
-<div class="contents">
-<h1>boost::xint::fixed_integer&lt; Bits &gt; Member List</h1>This is the complete list of members for <a class="el" href="classboost_1_1xint_1_1fixed__integer.html">boost::xint::fixed_integer&lt; Bits &gt;</a>, including all inherited members.<table>
- <tr class="memlist"><td><a class="el" href="classboost_1_1xint_1_1fixed__integer.html#a5488c21218c4590496962b5fee817e8e">divide_t</a> typedef</td><td><a class="el" href="classboost_1_1xint_1_1fixed__integer.html">boost::xint::fixed_integer&lt; Bits &gt;</a></td><td></td></tr>
- <tr class="memlist"><td><a class="el" href="classboost_1_1xint_1_1fixed__integer.html#a45f3960bff5c408403644fcc421edeac">even</a>() const </td><td><a class="el" href="classboost_1_1xint_1_1fixed__integer.html">boost::xint::fixed_integer&lt; Bits &gt;</a></td><td><code> [inline]</code></td></tr>
- <tr class="memlist"><td><a class="el" href="classboost_1_1xint_1_1fixed__integer.html#a2d8ad1fd4f6ac182679b151d304c54fa">fixed_integer</a>()</td><td><a class="el" href="classboost_1_1xint_1_1fixed__integer.html">boost::xint::fixed_integer&lt; Bits &gt;</a></td><td><code> [inline]</code></td></tr>
- <tr class="memlist"><td><a class="el" href="classboost_1_1xint_1_1fixed__integer.html#a8ea211f55972c49956401951e3ae088b">fixed_integer</a>(const fixed_integer&lt; Bits &gt; &amp;b)</td><td><a class="el" href="classboost_1_1xint_1_1fixed__integer.html">boost::xint::fixed_integer&lt; Bits &gt;</a></td><td><code> [inline]</code></td></tr>
- <tr class="memlist"><td><a class="el" href="classboost_1_1xint_1_1fixed__integer.html#ae4a2bd977d06ebbb5449acc902648064">fixed_integer</a>(const base_integer &amp;b)</td><td><a class="el" href="classboost_1_1xint_1_1fixed__integer.html">boost::xint::fixed_integer&lt; Bits &gt;</a></td><td><code> [inline, explicit]</code></td></tr>
- <tr class="memlist"><td><a class="el" href="classboost_1_1xint_1_1fixed__integer.html#a9edb8090a8b2eb698f24fc6d74e591d8">fixed_integer</a>(const std::string &amp;str, size_t base=10)</td><td><a class="el" href="classboost_1_1xint_1_1fixed__integer.html">boost::xint::fixed_integer&lt; Bits &gt;</a></td><td><code> [inline, explicit]</code></td></tr>
- <tr class="memlist"><td><a class="el" href="classboost_1_1xint_1_1fixed__integer.html#aa302b0b3adb58cf7d79009058322f528">fixed_integer</a>(const T &amp;n, typename boost::enable_if&lt; boost::is_integral&lt; T &gt; &gt;::type *=0, typename boost::enable_if&lt; boost::is_signed&lt; T &gt; &gt;::type *=0)</td><td><a class="el" href="classboost_1_1xint_1_1fixed__integer.html">boost::xint::fixed_integer&lt; Bits &gt;</a></td><td><code> [inline]</code></td></tr>
- <tr class="memlist"><td><a class="el" href="classboost_1_1xint_1_1fixed__integer.html#a18c23eb0b0d3491cc3fcfdb0b7805a46">fixed_integer</a>(const T &amp;n, typename boost::enable_if&lt; boost::is_integral&lt; T &gt; &gt;::type *=0, typename boost::enable_if&lt; boost::is_unsigned&lt; T &gt; &gt;::type *=0)</td><td><a class="el" href="classboost_1_1xint_1_1fixed__integer.html">boost::xint::fixed_integer&lt; Bits &gt;</a></td><td><code> [inline]</code></td></tr>
- <tr class="memlist"><td><a class="el" href="classboost_1_1xint_1_1fixed__integer__any.html#af6e682f145aaa5ceea6f8d81bf533442">fixed_integer_any</a>(const T &amp;n, typename boost::enable_if&lt; boost::is_integral&lt; T &gt; &gt;::type *=0, typename boost::enable_if&lt; boost::is_signed&lt; T &gt; &gt;::type *=0)</td><td><a class="el" href="classboost_1_1xint_1_1fixed__integer__any.html">boost::xint::fixed_integer_any</a></td><td><code> [inline]</code></td></tr>
- <tr class="memlist"><td><a class="el" href="classboost_1_1xint_1_1fixed__integer__any.html#a3ad49f5095f367b7e19aa3becb3464b3">fixed_integer_any</a>(const T &amp;n, typename boost::enable_if&lt; boost::is_integral&lt; T &gt; &gt;::type *=0, typename boost::enable_if&lt; boost::is_unsigned&lt; T &gt; &gt;::type *=0)</td><td><a class="el" href="classboost_1_1xint_1_1fixed__integer__any.html">boost::xint::fixed_integer_any</a></td><td><code> [inline]</code></td></tr>
- <tr class="memlist"><td><a class="el" href="classboost_1_1xint_1_1fixed__integer__any.html#aa1c3b00ad3be70fb2d42dd86fcfe3a00">fixed_integer_any</a>(size_t count, detail::digit_t mask)</td><td><a class="el" href="classboost_1_1xint_1_1fixed__integer__any.html">boost::xint::fixed_integer_any</a></td><td><code> [inline, protected]</code></td></tr>
- <tr class="memlist"><td><a class="el" href="classboost_1_1xint_1_1fixed__integer__any.html#a9f0620259b6e2cdf3ea6e2bad2a21d22">fixed_integer_any</a>(detail::data_t *adopt, bool neg=false)</td><td><a class="el" href="classboost_1_1xint_1_1fixed__integer__any.html">boost::xint::fixed_integer_any</a></td><td><code> [inline, explicit, protected]</code></td></tr>
- <tr class="memlist"><td><a class="el" href="classboost_1_1xint_1_1fixed__integer__any.html#abdd088ce22d3afd4a8c3dcc402401ace">fixed_integer_any</a>(const fixed_integer_any &amp;c)</td><td><a class="el" href="classboost_1_1xint_1_1fixed__integer__any.html">boost::xint::fixed_integer_any</a></td><td><code> [inline, explicit, protected]</code></td></tr>
- <tr class="memlist"><td><a class="el" href="classboost_1_1xint_1_1fixed__integer.html#a7234a3a5bea21f0045cee62e5427f3bf">hex_digits</a>() const </td><td><a class="el" href="classboost_1_1xint_1_1fixed__integer.html">boost::xint::fixed_integer&lt; Bits &gt;</a></td><td><code> [inline]</code></td></tr>
- <tr class="memlist"><td><a class="el" href="classboost_1_1xint_1_1fixed__integer.html#a7cf3f89f994ac21e3858c3b0cdf7d8c7">odd</a>() const </td><td><a class="el" href="classboost_1_1xint_1_1fixed__integer.html">boost::xint::fixed_integer&lt; Bits &gt;</a></td><td><code> [inline]</code></td></tr>
- <tr class="memlist"><td><a class="el" href="classboost_1_1xint_1_1fixed__integer.html#ae2f227bfbdf7f7f4b69a968ae491f8df">operator!</a>() const </td><td><a class="el" href="classboost_1_1xint_1_1fixed__integer.html">boost::xint::fixed_integer&lt; Bits &gt;</a></td><td><code> [inline]</code></td></tr>
- <tr class="memlist"><td><a class="el" href="classboost_1_1xint_1_1fixed__integer.html#a49bd66c70cb6b121bfaea17627321779">operator%=</a>(const fixed_integer_any &amp;b)</td><td><a class="el" href="classboost_1_1xint_1_1fixed__integer.html">boost::xint::fixed_integer&lt; Bits &gt;</a></td><td></td></tr>
- <tr class="memlist"><td><a class="el" href="classboost_1_1xint_1_1fixed__integer.html#a6b9fd6cf35616b29c03d621a1a2d8c83">operator&amp;=</a>(const fixed_integer_any &amp;n)</td><td><a class="el" href="classboost_1_1xint_1_1fixed__integer.html">boost::xint::fixed_integer&lt; Bits &gt;</a></td><td></td></tr>
- <tr class="memlist"><td><a class="el" href="classboost_1_1xint_1_1fixed__integer.html#a3f19202d563bcee5fce090d09e353dc6">operator*=</a>(const fixed_integer_any &amp;b)</td><td><a class="el" href="classboost_1_1xint_1_1fixed__integer.html">boost::xint::fixed_integer&lt; Bits &gt;</a></td><td></td></tr>
- <tr class="memlist"><td><a class="el" href="classboost_1_1xint_1_1fixed__integer.html#a195d3683bf389a1d3467a90c4f797b20">operator+</a>()</td><td><a class="el" href="classboost_1_1xint_1_1fixed__integer.html">boost::xint::fixed_integer&lt; Bits &gt;</a></td><td><code> [inline]</code></td></tr>
- <tr class="memlist"><td><a class="el" href="classboost_1_1xint_1_1fixed__integer.html#acb3c1e3c5bf0395beed0ba9d58a39600">operator+</a>() const </td><td><a class="el" href="classboost_1_1xint_1_1fixed__integer.html">boost::xint::fixed_integer&lt; Bits &gt;</a></td><td><code> [inline]</code></td></tr>
- <tr class="memlist"><td><a class="el" href="classboost_1_1xint_1_1fixed__integer.html#a045819216daea2ec2509066310d1755d">operator++</a>()</td><td><a class="el" href="classboost_1_1xint_1_1fixed__integer.html">boost::xint::fixed_integer&lt; Bits &gt;</a></td><td><code> [inline]</code></td></tr>
- <tr class="memlist"><td><a class="el" href="classboost_1_1xint_1_1fixed__integer.html#a781e7f1612a68f1c35c2bc8d17d33b0c">operator++</a>(int)</td><td><a class="el" href="classboost_1_1xint_1_1fixed__integer.html">boost::xint::fixed_integer&lt; Bits &gt;</a></td><td><code> [inline]</code></td></tr>
- <tr class="memlist"><td><a class="el" href="classboost_1_1xint_1_1fixed__integer.html#aee99171535628c8466999d3bdc2b7516">operator+=</a>(const fixed_integer_any &amp;b)</td><td><a class="el" href="classboost_1_1xint_1_1fixed__integer.html">boost::xint::fixed_integer&lt; Bits &gt;</a></td><td></td></tr>
- <tr class="memlist"><td><a class="el" href="classboost_1_1xint_1_1fixed__integer.html#aac0ac16865a09e299593891ae0399139">operator-</a>() const </td><td><a class="el" href="classboost_1_1xint_1_1fixed__integer.html">boost::xint::fixed_integer&lt; Bits &gt;</a></td><td><code> [inline]</code></td></tr>
- <tr class="memlist"><td><a class="el" href="classboost_1_1xint_1_1fixed__integer.html#a4623f3c93f327cb2fc426cf3c1c14e1e">operator--</a>()</td><td><a class="el" href="classboost_1_1xint_1_1fixed__integer.html">boost::xint::fixed_integer&lt; Bits &gt;</a></td><td><code> [inline]</code></td></tr>
- <tr class="memlist"><td><a class="el" href="classboost_1_1xint_1_1fixed__integer.html#a92b08d730aa7913ccc2b9860cda5cb1b">operator--</a>(int)</td><td><a class="el" href="classboost_1_1xint_1_1fixed__integer.html">boost::xint::fixed_integer&lt; Bits &gt;</a></td><td><code> [inline]</code></td></tr>
- <tr class="memlist"><td><a class="el" href="classboost_1_1xint_1_1fixed__integer.html#a8269a74cf9ed0dd4fbf7fb348cb35626">operator-=</a>(const fixed_integer_any &amp;b)</td><td><a class="el" href="classboost_1_1xint_1_1fixed__integer.html">boost::xint::fixed_integer&lt; Bits &gt;</a></td><td></td></tr>
- <tr class="memlist"><td><a class="el" href="classboost_1_1xint_1_1fixed__integer.html#a3ea864bd2849226218e5e5fa4332bac3">operator/=</a>(const fixed_integer_any &amp;b)</td><td><a class="el" href="classboost_1_1xint_1_1fixed__integer.html">boost::xint::fixed_integer&lt; Bits &gt;</a></td><td></td></tr>
- <tr class="memlist"><td><a class="el" href="classboost_1_1xint_1_1fixed__integer.html#a2caf7d4d873d7805beb2e62ddcb9b4f3">operator&lt;&lt;</a>(size_t shift) const </td><td><a class="el" href="classboost_1_1xint_1_1fixed__integer.html">boost::xint::fixed_integer&lt; Bits &gt;</a></td><td><code> [inline]</code></td></tr>
- <tr class="memlist"><td><a class="el" href="classboost_1_1xint_1_1fixed__integer.html#ac78f10b3130a60ba9d5e392ddb5629f3">operator&lt;&lt;=</a>(size_t shift)</td><td><a class="el" href="classboost_1_1xint_1_1fixed__integer.html">boost::xint::fixed_integer&lt; Bits &gt;</a></td><td><code> [inline]</code></td></tr>
- <tr class="memlist"><td><a class="el" href="classboost_1_1xint_1_1fixed__integer.html#a8cd90bde9fd2284d2260986b9f23b3c7">operator=</a>(const fixed_integer&lt; Bits &gt; &amp;c)</td><td><a class="el" href="classboost_1_1xint_1_1fixed__integer.html">boost::xint::fixed_integer&lt; Bits &gt;</a></td><td><code> [inline]</code></td></tr>
- <tr class="memlist"><td><a class="el" href="classboost_1_1xint_1_1fixed__integer.html#a472d2d3147f4e762efdce04fdf50efa9">operator&gt;&gt;</a>(size_t shift) const </td><td><a class="el" href="classboost_1_1xint_1_1fixed__integer.html">boost::xint::fixed_integer&lt; Bits &gt;</a></td><td><code> [inline]</code></td></tr>
- <tr class="memlist"><td><a class="el" href="classboost_1_1xint_1_1fixed__integer.html#aea1a25705a83f84b416e3aabd0d30d01">operator&gt;&gt;=</a>(size_t shift)</td><td><a class="el" href="classboost_1_1xint_1_1fixed__integer.html">boost::xint::fixed_integer&lt; Bits &gt;</a></td><td><code> [inline]</code></td></tr>
- <tr class="memlist"><td><a class="el" href="classboost_1_1xint_1_1fixed__integer.html#acd4a98a6eb089b7f806b74607249f027">operator^=</a>(const fixed_integer_any &amp;n)</td><td><a class="el" href="classboost_1_1xint_1_1fixed__integer.html">boost::xint::fixed_integer&lt; Bits &gt;</a></td><td></td></tr>
- <tr class="memlist"><td><a class="el" href="classboost_1_1xint_1_1fixed__integer.html#ab24851149e1e43675669f79421feb0c6">operator|=</a>(const fixed_integer_any &amp;n)</td><td><a class="el" href="classboost_1_1xint_1_1fixed__integer.html">boost::xint::fixed_integer&lt; Bits &gt;</a></td><td></td></tr>
- <tr class="memlist"><td><a class="el" href="classboost_1_1xint_1_1fixed__integer.html#a8741f3260d2a5a74c4d5cedf8a7d2a82">operator~</a>() const </td><td><a class="el" href="classboost_1_1xint_1_1fixed__integer.html">boost::xint::fixed_integer&lt; Bits &gt;</a></td><td><code> [inline]</code></td></tr>
- <tr class="memlist"><td><a class="el" href="classboost_1_1xint_1_1fixed__integer.html#a82f0342baba940b21f046be76b3a1fc9">sign</a>(bool signed_zero=false) const </td><td><a class="el" href="classboost_1_1xint_1_1fixed__integer.html">boost::xint::fixed_integer&lt; Bits &gt;</a></td><td><code> [inline]</code></td></tr>
-</table></div>
-<hr class="footer"/><address style="text-align: right;"><small>Generated on Tue May 4 10:20:17 2010 for The Extended Integer (XInt) Library by&nbsp;
-<a href="http://www.doxygen.org/index.html">
-<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.3 </small></address>
-</body>
-</html>

Deleted: sandbox/xint/doc/classboost_1_1xint_1_1fixed__integer.html
==============================================================================
--- sandbox/xint/doc/classboost_1_1xint_1_1fixed__integer.html 2010-05-31 20:43:54 EDT (Mon, 31 May 2010)
+++ (empty file)
@@ -1,970 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
-<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
-<title>The Extended Integer (XInt) Library: boost::xint::fixed_integer&lt; Bits &gt; Class Template Reference</title>
-<link href="tabs.css" rel="stylesheet" type="text/css"/>
-<link href="doxygen.css" rel="stylesheet" type="text/css"/>
-</head>
-<body>
-<!-- Generated by Doxygen 1.6.3 -->
-<div class="navigation" id="top">
- <div class="tabs">
- <ul>
- <li>Main Page</li>
- <li>Namespaces</li>
- <li class="current">Classes</li>
- <li>Files</li>
- </ul>
- </div>
- <div class="tabs">
- <ul>
- <li>Class List</li>
- <li>Class Hierarchy</li>
- <li>Class Members</li>
- </ul>
- </div>
- <div class="navpath"><a class="el" href="namespaceboost.html">boost</a>::<a class="el" href="namespaceboost_1_1xint.html">xint</a>::<a class="el" href="classboost_1_1xint_1_1fixed__integer.html">fixed_integer</a>
- </div>
-</div>
-<div class="contents">
-<h1>boost::xint::fixed_integer&lt; Bits &gt; Class Template Reference</h1><!-- doxytag: class="boost::xint::fixed_integer" --><!-- doxytag: inherits="boost::xint::fixed_integer_any" -->
-<p>A fixed-size integer type.
-More...</p>
-<div class="dynheader">
-Inheritance diagram for boost::xint::fixed_integer&lt; Bits &gt;:</div>
-<div class="dynsection">
- <div class="center">
- <img src="classboost_1_1xint_1_1fixed__integer.png" usemap="#boost::xint::fixed_integer&lt; Bits &gt;_map" alt=""/>
- <map id="boost::xint::fixed_integer&lt; Bits &gt;_map" name="boost::xint::fixed_integer&lt; Bits &gt;_map">
-<area href="classboost_1_1xint_1_1fixed__integer__any.html" alt="boost::xint::fixed_integer_any" shape="rect" coords="0,0,190,24"/>
-</map>
- </div>
-</div>
-
-<p>List of all members.</p>
-<table border="0" cellpadding="0" cellspacing="0">
-<tr><td colspan="2"><h2>Public Types</h2></td></tr>
-<tr><td class="memItemLeft" align="right" valign="top">typedef <a class="el" href="classboost_1_1xint_1_1base__divide__t.html">base_divide_t</a><br class="typebreak"/>
-&lt; <a class="el" href="classboost_1_1xint_1_1fixed__integer.html">fixed_integer</a>&lt; Bits &gt; &gt;&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classboost_1_1xint_1_1fixed__integer.html#a5488c21218c4590496962b5fee817e8e">divide_t</a></td></tr>
-<tr><td colspan="2"><h2>Public Member Functions</h2></td></tr>
-<tr><td colspan="2"><div class="groupHeader">Miscellaneous Functions</div></td></tr>
-<tr><td colspan="2"><div class="groupText"><p><a class="anchor" id="amgrpf5be5219a55995e13d6b8d7bf99ed653"></a> </p>
-</div></td></tr>
-<tr><td class="memItemLeft" align="right" valign="top">bool&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classboost_1_1xint_1_1fixed__integer.html#a45f3960bff5c408403644fcc421edeac">even</a> () const </td></tr>
-<tr><td class="memItemLeft" align="right" valign="top">size_t&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classboost_1_1xint_1_1fixed__integer.html#a7234a3a5bea21f0045cee62e5427f3bf">hex_digits</a> () const </td></tr>
-<tr><td class="memItemLeft" align="right" valign="top">bool&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classboost_1_1xint_1_1fixed__integer.html#a7cf3f89f994ac21e3858c3b0cdf7d8c7">odd</a> () const </td></tr>
-<tr><td class="memItemLeft" align="right" valign="top">int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classboost_1_1xint_1_1fixed__integer.html#a82f0342baba940b21f046be76b3a1fc9">sign</a> (bool signed_zero=false) const </td></tr>
-<tr><td colspan="2"><div class="groupHeader">Constructors &amp; Destructors</div></td></tr>
-<tr><td colspan="2"><div class="groupText"><p><a class="anchor" id="amgrpab1e74c734dea693114ec1f1cb9434ad"></a> </p>
-</div></td></tr>
-<tr><td class="memTemplParams" colspan="2">template&lt;typename T &gt; </td></tr>
-<tr><td class="memTemplItemLeft" align="right" valign="top">&nbsp;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="classboost_1_1xint_1_1fixed__integer.html#a18c23eb0b0d3491cc3fcfdb0b7805a46">fixed_integer</a> (const T &amp;n, typename boost::enable_if&lt; boost::is_integral&lt; T &gt; &gt;::type *=0, typename boost::enable_if&lt; boost::is_unsigned&lt; T &gt; &gt;::type *=0)</td></tr>
-<tr><td class="memTemplParams" colspan="2">template&lt;typename T &gt; </td></tr>
-<tr><td class="memTemplItemLeft" align="right" valign="top">&nbsp;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="classboost_1_1xint_1_1fixed__integer.html#aa302b0b3adb58cf7d79009058322f528">fixed_integer</a> (const T &amp;n, typename boost::enable_if&lt; boost::is_integral&lt; T &gt; &gt;::type *=0, typename boost::enable_if&lt; boost::is_signed&lt; T &gt; &gt;::type *=0)</td></tr>
-<tr><td class="memItemLeft" align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classboost_1_1xint_1_1fixed__integer.html#a9edb8090a8b2eb698f24fc6d74e591d8">fixed_integer</a> (const std::string &amp;str, size_t base=10)</td></tr>
-<tr><td class="memItemLeft" align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classboost_1_1xint_1_1fixed__integer.html#ae4a2bd977d06ebbb5449acc902648064">fixed_integer</a> (const base_integer &amp;b)</td></tr>
-<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Converts an existing xint type. <br/></td></tr>
-<tr><td class="memItemLeft" align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classboost_1_1xint_1_1fixed__integer.html#a8ea211f55972c49956401951e3ae088b">fixed_integer</a> (const <a class="el" href="classboost_1_1xint_1_1fixed__integer.html">fixed_integer</a>&lt; Bits &gt; &amp;b)</td></tr>
-<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Creates a copy of an existing <a class="el" href="classboost_1_1xint_1_1fixed__integer.html" title="A fixed-size integer type.">fixed_integer</a> with the same size. <br/></td></tr>
-<tr><td class="memItemLeft" align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classboost_1_1xint_1_1fixed__integer.html#a2d8ad1fd4f6ac182679b151d304c54fa">fixed_integer</a> ()</td></tr>
-<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Creates a new <a class="el" href="classboost_1_1xint_1_1fixed__integer.html" title="A fixed-size integer type.">fixed_integer</a> with an initial value of zero. <br/></td></tr>
-<tr><td colspan="2"><div class="groupHeader">Mathematical and Bitwise Operators</div></td></tr>
-<tr><td colspan="2"><div class="groupText"><p><a class="anchor" id="amgrp8eb1e0f0af70edd858d54ba68b80ce7e"></a>These operate exactly like their counterparts for the built-in integer types. </p>
-</div></td></tr>
-<tr><td class="memItemLeft" align="right" valign="top">bool&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classboost_1_1xint_1_1fixed__integer.html#ae2f227bfbdf7f7f4b69a968ae491f8df">operator!</a> () const </td></tr>
-<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="classboost_1_1xint_1_1fixed__integer.html">fixed_integer</a>&lt; Bits &gt; &amp;&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classboost_1_1xint_1_1fixed__integer.html#a49bd66c70cb6b121bfaea17627321779">operator%=</a> (const <a class="el" href="classboost_1_1xint_1_1fixed__integer__any.html">fixed_integer_any</a> &amp;b)</td></tr>
-<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="classboost_1_1xint_1_1fixed__integer.html">fixed_integer</a>&lt; Bits &gt; &amp;&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classboost_1_1xint_1_1fixed__integer.html#a6b9fd6cf35616b29c03d621a1a2d8c83">operator&amp;=</a> (const <a class="el" href="classboost_1_1xint_1_1fixed__integer__any.html">fixed_integer_any</a> &amp;n)</td></tr>
-<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="classboost_1_1xint_1_1fixed__integer.html">fixed_integer</a>&lt; Bits &gt; &amp;&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classboost_1_1xint_1_1fixed__integer.html#a3f19202d563bcee5fce090d09e353dc6">operator*=</a> (const <a class="el" href="classboost_1_1xint_1_1fixed__integer__any.html">fixed_integer_any</a> &amp;b)</td></tr>
-<tr><td class="memItemLeft" align="right" valign="top">const <a class="el" href="classboost_1_1xint_1_1fixed__integer.html">fixed_integer</a>&lt; Bits &gt; &amp;&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classboost_1_1xint_1_1fixed__integer.html#acb3c1e3c5bf0395beed0ba9d58a39600">operator+</a> () const </td></tr>
-<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="classboost_1_1xint_1_1fixed__integer.html">fixed_integer</a>&lt; Bits &gt; &amp;&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classboost_1_1xint_1_1fixed__integer.html#a195d3683bf389a1d3467a90c4f797b20">operator+</a> ()</td></tr>
-<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="classboost_1_1xint_1_1fixed__integer.html">fixed_integer</a>&lt; Bits &gt;&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classboost_1_1xint_1_1fixed__integer.html#a781e7f1612a68f1c35c2bc8d17d33b0c">operator++</a> (int)</td></tr>
-<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="classboost_1_1xint_1_1fixed__integer.html">fixed_integer</a>&lt; Bits &gt; &amp;&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classboost_1_1xint_1_1fixed__integer.html#a045819216daea2ec2509066310d1755d">operator++</a> ()</td></tr>
-<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="classboost_1_1xint_1_1fixed__integer.html">fixed_integer</a>&lt; Bits &gt; &amp;&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classboost_1_1xint_1_1fixed__integer.html#aee99171535628c8466999d3bdc2b7516">operator+=</a> (const <a class="el" href="classboost_1_1xint_1_1fixed__integer__any.html">fixed_integer_any</a> &amp;b)</td></tr>
-<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="classboost_1_1xint_1_1fixed__integer.html">fixed_integer</a>&lt; Bits &gt;&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classboost_1_1xint_1_1fixed__integer.html#aac0ac16865a09e299593891ae0399139">operator-</a> () const </td></tr>
-<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="classboost_1_1xint_1_1fixed__integer.html">fixed_integer</a>&lt; Bits &gt;&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classboost_1_1xint_1_1fixed__integer.html#a92b08d730aa7913ccc2b9860cda5cb1b">operator--</a> (int)</td></tr>
-<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="classboost_1_1xint_1_1fixed__integer.html">fixed_integer</a>&lt; Bits &gt; &amp;&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classboost_1_1xint_1_1fixed__integer.html#a4623f3c93f327cb2fc426cf3c1c14e1e">operator--</a> ()</td></tr>
-<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="classboost_1_1xint_1_1fixed__integer.html">fixed_integer</a>&lt; Bits &gt; &amp;&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classboost_1_1xint_1_1fixed__integer.html#a8269a74cf9ed0dd4fbf7fb348cb35626">operator-=</a> (const <a class="el" href="classboost_1_1xint_1_1fixed__integer__any.html">fixed_integer_any</a> &amp;b)</td></tr>
-<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="classboost_1_1xint_1_1fixed__integer.html">fixed_integer</a>&lt; Bits &gt; &amp;&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classboost_1_1xint_1_1fixed__integer.html#a3ea864bd2849226218e5e5fa4332bac3">operator/=</a> (const <a class="el" href="classboost_1_1xint_1_1fixed__integer__any.html">fixed_integer_any</a> &amp;b)</td></tr>
-<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="classboost_1_1xint_1_1fixed__integer.html">fixed_integer</a>&lt; Bits &gt;&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classboost_1_1xint_1_1fixed__integer.html#a2caf7d4d873d7805beb2e62ddcb9b4f3">operator&lt;&lt;</a> (size_t shift) const </td></tr>
-<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="classboost_1_1xint_1_1fixed__integer.html">fixed_integer</a>&lt; Bits &gt; &amp;&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classboost_1_1xint_1_1fixed__integer.html#ac78f10b3130a60ba9d5e392ddb5629f3">operator&lt;&lt;=</a> (size_t shift)</td></tr>
-<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="classboost_1_1xint_1_1fixed__integer.html">fixed_integer</a>&lt; Bits &gt; &amp;&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classboost_1_1xint_1_1fixed__integer.html#a8cd90bde9fd2284d2260986b9f23b3c7">operator=</a> (const <a class="el" href="classboost_1_1xint_1_1fixed__integer.html">fixed_integer</a>&lt; Bits &gt; &amp;c)</td></tr>
-<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="classboost_1_1xint_1_1fixed__integer.html">fixed_integer</a>&lt; Bits &gt;&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classboost_1_1xint_1_1fixed__integer.html#a472d2d3147f4e762efdce04fdf50efa9">operator&gt;&gt;</a> (size_t shift) const </td></tr>
-<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="classboost_1_1xint_1_1fixed__integer.html">fixed_integer</a>&lt; Bits &gt; &amp;&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classboost_1_1xint_1_1fixed__integer.html#aea1a25705a83f84b416e3aabd0d30d01">operator&gt;&gt;=</a> (size_t shift)</td></tr>
-<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="classboost_1_1xint_1_1fixed__integer.html">fixed_integer</a>&lt; Bits &gt; &amp;&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classboost_1_1xint_1_1fixed__integer.html#acd4a98a6eb089b7f806b74607249f027">operator^=</a> (const <a class="el" href="classboost_1_1xint_1_1fixed__integer__any.html">fixed_integer_any</a> &amp;n)</td></tr>
-<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="classboost_1_1xint_1_1fixed__integer.html">fixed_integer</a>&lt; Bits &gt; &amp;&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classboost_1_1xint_1_1fixed__integer.html#ab24851149e1e43675669f79421feb0c6">operator|=</a> (const <a class="el" href="classboost_1_1xint_1_1fixed__integer__any.html">fixed_integer_any</a> &amp;n)</td></tr>
-<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="classboost_1_1xint_1_1fixed__integer.html">fixed_integer</a>&lt; Bits &gt;&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classboost_1_1xint_1_1fixed__integer.html#a8741f3260d2a5a74c4d5cedf8a7d2a82">operator~</a> () const </td></tr>
-<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">The Bitwise Ones' Complement (i.e. bitwise NOT) operator. <br/></td></tr>
-</table>
-<hr/><a name="_details"></a><h2>Detailed Description</h2>
-<h3>template&lt;size_t Bits&gt;<br/>
- class boost::xint::fixed_integer&lt; Bits &gt;</h3>
-
-<p>A fixed-size integer type. </p>
-<dl><dt><b>Template Parameters:</b></dt><dd>
- <table border="0" cellspacing="2" cellpadding="0">
- <tr><td valign="top"></td><td valign="top"><em>Bits</em>&nbsp;</td><td>The number of bits that the magnitude of the fixed_integer type should be limited to. This can be any number greater than zero.</td></tr>
- </table>
- </dd>
-</dl>
-<p>fixed_integer types are more processor-efficient than variable-sized integers, because they seldom need to do any allocation once they're created. However, they can be less memory-efficient for holding smaller values. They also silently discard the upper bits on any value that is too big for them, which can bite the unwary.</p>
-<dl class="note"><dt><b>Note:</b></dt><dd>The number of bits refers only to the unsigned magnitude of the number. The sign is stored separately. This means that, for example, a <code>fixed_integer&lt;8&gt;</code> has a range of -255 to +255, not -128 to +127 like an <code>int8_t</code>.</dd></dl>
-<dl class="user"><dt><b></b></dt><dd>Also note that when calculating with fixed_integer types, the number does not "wrap around" when it exceeds the type's size like the built-in signed integer types do. It is truncated to the lower bits instead. For example, <code>fixed_integer&lt;8&gt;(-255) - 1</code> and <code>fixed_integer&lt;8&gt;(255) + 1</code> will both be zero. However, the sign (on non-zero answers) is preserved, so <code>fixed_integer&lt;8&gt;(-255) - 2</code> will be -1. </dd></dl>
-
-<p>Definition at line <a class="el" href="fixed__integer_8hpp_source.html#l00051">51</a> of file <a class="el" href="fixed__integer_8hpp_source.html">fixed_integer.hpp</a>.</p>
-<hr/><h2>Member Typedef Documentation</h2>
-<a class="anchor" id="a5488c21218c4590496962b5fee817e8e"></a><!-- doxytag: member="boost::xint::fixed_integer::divide_t" ref="a5488c21218c4590496962b5fee817e8e" args="" -->
-<div class="memitem">
-<div class="memproto">
-<div class="memtemplate">
-template&lt;size_t Bits&gt; </div>
- <table class="memname">
- <tr>
- <td class="memname">typedef <a class="el" href="classboost_1_1xint_1_1base__divide__t.html">base_divide_t</a>&lt;<a class="el" href="classboost_1_1xint_1_1fixed__integer.html">fixed_integer</a>&lt;Bits&gt; &gt; <a class="el" href="classboost_1_1xint_1_1fixed__integer.html">boost::xint::fixed_integer</a>&lt; Bits &gt;::<a class="el" href="classboost_1_1xint_1_1base__divide__t.html">divide_t</a></td>
- </tr>
- </table>
-</div>
-<div class="memdoc">
-
-<p>Definition at line <a class="el" href="fixed__integer_8hpp_source.html#l00082">82</a> of file <a class="el" href="fixed__integer_8hpp_source.html">fixed_integer.hpp</a>.</p>
-
-</div>
-</div>
-<hr/><h2>Constructor &amp; Destructor Documentation</h2>
-<a class="anchor" id="a2d8ad1fd4f6ac182679b151d304c54fa"></a><!-- doxytag: member="boost::xint::fixed_integer::fixed_integer" ref="a2d8ad1fd4f6ac182679b151d304c54fa" args="()" -->
-<div class="memitem">
-<div class="memproto">
-<div class="memtemplate">
-template&lt;size_t Bits&gt; </div>
- <table class="memname">
- <tr>
- <td class="memname"><a class="el" href="classboost_1_1xint_1_1fixed__integer.html">boost::xint::fixed_integer</a>&lt; Bits &gt;::<a class="el" href="classboost_1_1xint_1_1fixed__integer.html">fixed_integer</a> </td>
- <td>(</td>
- <td class="paramname"></td>
- <td>&nbsp;)&nbsp;</td>
- <td><code> [inline]</code></td>
- </tr>
- </table>
-</div>
-<div class="memdoc">
-
-<p>Creates a new <a class="el" href="classboost_1_1xint_1_1fixed__integer.html" title="A fixed-size integer type.">fixed_integer</a> with an initial value of zero. </p>
-
-<p>Definition at line <a class="el" href="fixed__integer_8hpp_source.html#l00306">306</a> of file <a class="el" href="fixed__integer_8hpp_source.html">fixed_integer.hpp</a>.</p>
-
-</div>
-</div>
-<a class="anchor" id="a8ea211f55972c49956401951e3ae088b"></a><!-- doxytag: member="boost::xint::fixed_integer::fixed_integer" ref="a8ea211f55972c49956401951e3ae088b" args="(const fixed_integer&lt; Bits &gt; &amp;b)" -->
-<div class="memitem">
-<div class="memproto">
-<div class="memtemplate">
-template&lt;size_t Bits&gt; </div>
- <table class="memname">
- <tr>
- <td class="memname"><a class="el" href="classboost_1_1xint_1_1fixed__integer.html">boost::xint::fixed_integer</a>&lt; Bits &gt;::<a class="el" href="classboost_1_1xint_1_1fixed__integer.html">fixed_integer</a> </td>
- <td>(</td>
- <td class="paramtype">const <a class="el" href="classboost_1_1xint_1_1fixed__integer.html">fixed_integer</a>&lt; Bits &gt; &amp;&nbsp;</td>
- <td class="paramname"> <em>b</em></td>
- <td>&nbsp;)&nbsp;</td>
- <td><code> [inline]</code></td>
- </tr>
- </table>
-</div>
-<div class="memdoc">
-
-<p>Creates a copy of an existing <a class="el" href="classboost_1_1xint_1_1fixed__integer.html" title="A fixed-size integer type.">fixed_integer</a> with the same size. </p>
-<dl><dt><b>Parameters:</b></dt><dd>
- <table border="0" cellspacing="2" cellpadding="0">
- <tr><td valign="top"><tt>[in]</tt>&nbsp;</td><td valign="top"><em>b</em>&nbsp;</td><td>An existing integer of the same size.</td></tr>
- </table>
- </dd>
-</dl>
-<p>This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. </p>
-
-<p>Definition at line <a class="el" href="fixed__integer_8hpp_source.html#l00316">316</a> of file <a class="el" href="fixed__integer_8hpp_source.html">fixed_integer.hpp</a>.</p>
-
-</div>
-</div>
-<a class="anchor" id="ae4a2bd977d06ebbb5449acc902648064"></a><!-- doxytag: member="boost::xint::fixed_integer::fixed_integer" ref="ae4a2bd977d06ebbb5449acc902648064" args="(const base_integer &amp;b)" -->
-<div class="memitem">
-<div class="memproto">
-<div class="memtemplate">
-template&lt;size_t Bits&gt; </div>
- <table class="memname">
- <tr>
- <td class="memname"><a class="el" href="classboost_1_1xint_1_1fixed__integer.html">boost::xint::fixed_integer</a>&lt; Bits &gt;::<a class="el" href="classboost_1_1xint_1_1fixed__integer.html">fixed_integer</a> </td>
- <td>(</td>
- <td class="paramtype">const base_integer &amp;&nbsp;</td>
- <td class="paramname"> <em>b</em></td>
- <td>&nbsp;)&nbsp;</td>
- <td><code> [inline, explicit]</code></td>
- </tr>
- </table>
-</div>
-<div class="memdoc">
-
-<p>Converts an existing xint type. </p>
-<dl><dt><b>Parameters:</b></dt><dd>
- <table border="0" cellspacing="2" cellpadding="0">
- <tr><td valign="top"><tt>[in]</tt>&nbsp;</td><td valign="top"><em>b</em>&nbsp;</td><td>An existing integer, <a class="el" href="classboost_1_1xint_1_1nothrow__integer.html" title="The nothrow_integer class.">nothrow_integer</a>, or <a class="el" href="classboost_1_1xint_1_1fixed__integer.html" title="A fixed-size integer type.">fixed_integer</a> of a different size.</td></tr>
- </table>
- </dd>
-</dl>
-<p>This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. </p>
-<dl class="note"><dt><b>Note:</b></dt><dd>If the number represented by the parameter is too large to fit into the <a class="el" href="classboost_1_1xint_1_1fixed__integer.html" title="A fixed-size integer type.">fixed_integer</a>, it is silently truncated, and only the lower bits are preserved. </dd></dl>
-
-<p>Definition at line <a class="el" href="fixed__integer_8hpp_source.html#l00330">330</a> of file <a class="el" href="fixed__integer_8hpp_source.html">fixed_integer.hpp</a>.</p>
-
-</div>
-</div>
-<a class="anchor" id="a9edb8090a8b2eb698f24fc6d74e591d8"></a><!-- doxytag: member="boost::xint::fixed_integer::fixed_integer" ref="a9edb8090a8b2eb698f24fc6d74e591d8" args="(const std::string &amp;str, size_t base=10)" -->
-<div class="memitem">
-<div class="memproto">
-<div class="memtemplate">
-template&lt;size_t Bits&gt; </div>
- <table class="memname">
- <tr>
- <td class="memname"><a class="el" href="classboost_1_1xint_1_1fixed__integer.html">boost::xint::fixed_integer</a>&lt; Bits &gt;::<a class="el" href="classboost_1_1xint_1_1fixed__integer.html">fixed_integer</a> </td>
- <td>(</td>
- <td class="paramtype">const std::string &amp;&nbsp;</td>
- <td class="paramname"> <em>str</em>, </td>
- </tr>
- <tr>
- <td class="paramkey"></td>
- <td></td>
- <td class="paramtype">size_t&nbsp;</td>
- <td class="paramname"> <em>base</em> = <code>10</code></td><td>&nbsp;</td>
- </tr>
- <tr>
- <td></td>
- <td>)</td>
- <td></td><td></td><td><code> [inline, explicit]</code></td>
- </tr>
- </table>
-</div>
-<div class="memdoc">
-<p>Create an integer from a string representation. <ul>
-<li>Complexity: O(n<sup>2</sup>)</li>
-</ul>
-<dl><dt><b>Parameters:</b></dt><dd>
- <table border="0" cellspacing="2" cellpadding="0">
- <tr><td valign="top"><tt>[in]</tt>&nbsp;</td><td valign="top"><em>str</em>&nbsp;</td><td>A string representation of a number. </td></tr>
- <tr><td valign="top"><tt>[in]</tt>&nbsp;</td><td valign="top"><em>base</em>&nbsp;</td><td>The base of the number, or <a class="el" href="namespaceboost_1_1xint.html#a086ec65a0273dccedca0fbfbddb03398">xint::autobase</a>.</td></tr>
- </table>
- </dd>
-</dl>
-<dl><dt><b>Exceptions:</b></dt><dd>
- <table border="0" cellspacing="2" cellpadding="0">
- <tr><td valign="top"></td><td valign="top"><em><a class="el" href="classboost_1_1xint_1_1exceptions_1_1invalid__base.html">exceptions::invalid_base</a></em>&nbsp;</td><td>if the base parameter is not between 2 and 36 (inclusive) or the constant <a class="el" href="namespaceboost_1_1xint.html#a086ec65a0273dccedca0fbfbddb03398">xint::autobase</a>. </td></tr>
- <tr><td valign="top"></td><td valign="top"><em><a class="el" href="classboost_1_1xint_1_1exceptions_1_1invalid__digit.html">exceptions::invalid_digit</a></em>&nbsp;</td><td>if the string contains any digit that cannot be part of a number in the specified base, or if there are no valid digits.</td></tr>
- </table>
- </dd>
-</dl>
-<dl class="remark"><dt><b>Remarks:</b></dt><dd>This will convert a string representation of a number into an integer. See the description of the <a class="el" href="namespaceboost_1_1xint.html#af263105e57d48eff5fe14d4d03ca10e1">from_string</a> function for details on its behavior.</dd></dl>
-<dl class="user"><dt><b></b></dt><dd>This is the most common way to initialize values that are too large to fit into a native integral type.</dd></dl>
-<p>This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. </p>
-<dl class="note"><dt><b>Note:</b></dt><dd>If the number represented by the parameter is too large to fit into the <a class="el" href="classboost_1_1xint_1_1fixed__integer.html" title="A fixed-size integer type.">fixed_integer</a>, it is silently truncated, and only the lower bits are preserved. </dd></dl>
-
-<p>Definition at line <a class="el" href="fixed__integer_8hpp_source.html#l00343">343</a> of file <a class="el" href="fixed__integer_8hpp_source.html">fixed_integer.hpp</a>.</p>
-
-</div>
-</div>
-<a class="anchor" id="aa302b0b3adb58cf7d79009058322f528"></a><!-- doxytag: member="boost::xint::fixed_integer::fixed_integer" ref="aa302b0b3adb58cf7d79009058322f528" args="(const T &amp;n, typename boost::enable_if&lt; boost::is_integral&lt; T &gt; &gt;::type *=0, typename boost::enable_if&lt; boost::is_signed&lt; T &gt; &gt;::type *=0)" -->
-<div class="memitem">
-<div class="memproto">
-<div class="memtemplate">
-template&lt;size_t Bits&gt; </div>
-<div class="memtemplate">
-template&lt;typename T &gt; </div>
- <table class="memname">
- <tr>
- <td class="memname"><a class="el" href="classboost_1_1xint_1_1fixed__integer.html">boost::xint::fixed_integer</a>&lt; Bits &gt;::<a class="el" href="classboost_1_1xint_1_1fixed__integer.html">fixed_integer</a> </td>
- <td>(</td>
- <td class="paramtype">const T &amp;&nbsp;</td>
- <td class="paramname"> <em>n</em>, </td>
- </tr>
- <tr>
- <td class="paramkey"></td>
- <td></td>
- <td class="paramtype">typename boost::enable_if&lt; boost::is_integral&lt; T &gt; &gt;::type *&nbsp;</td>
- <td class="paramname"> = <code>0</code>, </td>
- </tr>
- <tr>
- <td class="paramkey"></td>
- <td></td>
- <td class="paramtype">typename boost::enable_if&lt; boost::is_signed&lt; T &gt; &gt;::type *&nbsp;</td>
- <td class="paramname"> = <code>0</code></td><td>&nbsp;</td>
- </tr>
- <tr>
- <td></td>
- <td>)</td>
- <td></td><td></td><td><code> [inline]</code></td>
- </tr>
- </table>
-</div>
-<div class="memdoc">
-<p>Constructs a new <a class="el" href="classboost_1_1xint_1_1fixed__integer.html" title="A fixed-size integer type.">fixed_integer</a> object with the value of the built-in signed integer passed to it.</p>
-<dl><dt><b>Parameters:</b></dt><dd>
- <table border="0" cellspacing="2" cellpadding="0">
- <tr><td valign="top"><tt>[in]</tt>&nbsp;</td><td valign="top"><em>n</em>&nbsp;</td><td>A number of type <code>T</code>. </td></tr>
- </table>
- </dd>
-</dl>
-<dl><dt><b>Template Parameters:</b></dt><dd>
- <table border="0" cellspacing="2" cellpadding="0">
- <tr><td valign="top"></td><td valign="top"><em>T</em>&nbsp;</td><td>The type of <code>n</code>.</td></tr>
- </table>
- </dd>
-</dl>
-<p>You can ignore the <code>enable_if</code> parameters, they are there only to tell the compiler what types it applies to.</p>
-<p>This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. </p>
-<dl class="note"><dt><b>Note:</b></dt><dd>If the number represented by the parameter is too large to fit into the <a class="el" href="classboost_1_1xint_1_1fixed__integer.html" title="A fixed-size integer type.">fixed_integer</a>, it is silently truncated, and only the lower bits are preserved. </dd></dl>
-
-<p>Definition at line <a class="el" href="fixed__integer_8hpp_source.html#l00366">366</a> of file <a class="el" href="fixed__integer_8hpp_source.html">fixed_integer.hpp</a>.</p>
-
-</div>
-</div>
-<a class="anchor" id="a18c23eb0b0d3491cc3fcfdb0b7805a46"></a><!-- doxytag: member="boost::xint::fixed_integer::fixed_integer" ref="a18c23eb0b0d3491cc3fcfdb0b7805a46" args="(const T &amp;n, typename boost::enable_if&lt; boost::is_integral&lt; T &gt; &gt;::type *=0, typename boost::enable_if&lt; boost::is_unsigned&lt; T &gt; &gt;::type *=0)" -->
-<div class="memitem">
-<div class="memproto">
-<div class="memtemplate">
-template&lt;size_t Bits&gt; </div>
-<div class="memtemplate">
-template&lt;typename T &gt; </div>
- <table class="memname">
- <tr>
- <td class="memname"><a class="el" href="classboost_1_1xint_1_1fixed__integer.html">boost::xint::fixed_integer</a>&lt; Bits &gt;::<a class="el" href="classboost_1_1xint_1_1fixed__integer.html">fixed_integer</a> </td>
- <td>(</td>
- <td class="paramtype">const T &amp;&nbsp;</td>
- <td class="paramname"> <em>n</em>, </td>
- </tr>
- <tr>
- <td class="paramkey"></td>
- <td></td>
- <td class="paramtype">typename boost::enable_if&lt; boost::is_integral&lt; T &gt; &gt;::type *&nbsp;</td>
- <td class="paramname"> = <code>0</code>, </td>
- </tr>
- <tr>
- <td class="paramkey"></td>
- <td></td>
- <td class="paramtype">typename boost::enable_if&lt; boost::is_unsigned&lt; T &gt; &gt;::type *&nbsp;</td>
- <td class="paramname"> = <code>0</code></td><td>&nbsp;</td>
- </tr>
- <tr>
- <td></td>
- <td>)</td>
- <td></td><td></td><td><code> [inline]</code></td>
- </tr>
- </table>
-</div>
-<div class="memdoc">
-<p>Constructs a new integer object with the value of the built-in unsigned integer passed to it.</p>
-<dl><dt><b>Parameters:</b></dt><dd>
- <table border="0" cellspacing="2" cellpadding="0">
- <tr><td valign="top"><tt>[in]</tt>&nbsp;</td><td valign="top"><em>n</em>&nbsp;</td><td>A number of type <code>T</code>. </td></tr>
- </table>
- </dd>
-</dl>
-<dl><dt><b>Template Parameters:</b></dt><dd>
- <table border="0" cellspacing="2" cellpadding="0">
- <tr><td valign="top"></td><td valign="top"><em>T</em>&nbsp;</td><td>The type of <code>n</code>.</td></tr>
- </table>
- </dd>
-</dl>
-<p>You can ignore the <code>enable_if</code> parameters, they are there only to tell the compiler what types it applies to.</p>
-<p>This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. </p>
-<dl class="note"><dt><b>Note:</b></dt><dd>If the number represented by the parameter is too large to fit into the <a class="el" href="classboost_1_1xint_1_1fixed__integer.html" title="A fixed-size integer type.">fixed_integer</a>, it is silently truncated, and only the lower bits are preserved. </dd></dl>
-
-<p>Definition at line <a class="el" href="fixed__integer_8hpp_source.html#l00391">391</a> of file <a class="el" href="fixed__integer_8hpp_source.html">fixed_integer.hpp</a>.</p>
-
-</div>
-</div>
-<hr/><h2>Member Function Documentation</h2>
-<a class="anchor" id="a45f3960bff5c408403644fcc421edeac"></a><!-- doxytag: member="boost::xint::fixed_integer::even" ref="a45f3960bff5c408403644fcc421edeac" args="() const " -->
-<div class="memitem">
-<div class="memproto">
-<div class="memtemplate">
-template&lt;size_t Bits&gt; </div>
- <table class="memname">
- <tr>
- <td class="memname">bool <a class="el" href="classboost_1_1xint_1_1fixed__integer.html">boost::xint::fixed_integer</a>&lt; Bits &gt;::even </td>
- <td>(</td>
- <td class="paramname"></td>
- <td>&nbsp;)&nbsp;</td>
- <td> const<code> [inline]</code></td>
- </tr>
- </table>
-</div>
-<div class="memdoc">
-<p>Tests the lowest bit of <code>*this</code> to determine evenness. <ul>
-<li>Complexity: O(1)</li>
-</ul>
-<dl class="return"><dt><b>Returns:</b></dt><dd><code>true</code> if <code>*this</code> is even, otherwise <code>false</code>. </dd></dl>
- </p>
-
-<p>Definition at line <a class="el" href="fixed__integer_8hpp_source.html#l00407">407</a> of file <a class="el" href="fixed__integer_8hpp_source.html">fixed_integer.hpp</a>.</p>
-
-</div>
-</div>
-<a class="anchor" id="a7234a3a5bea21f0045cee62e5427f3bf"></a><!-- doxytag: member="boost::xint::fixed_integer::hex_digits" ref="a7234a3a5bea21f0045cee62e5427f3bf" args="() const " -->
-<div class="memitem">
-<div class="memproto">
-<div class="memtemplate">
-template&lt;size_t Bits&gt; </div>
- <table class="memname">
- <tr>
- <td class="memname">size_t <a class="el" href="classboost_1_1xint_1_1fixed__integer.html">boost::xint::fixed_integer</a>&lt; Bits &gt;::hex_digits </td>
- <td>(</td>
- <td class="paramname"></td>
- <td>&nbsp;)&nbsp;</td>
- <td> const<code> [inline]</code></td>
- </tr>
- </table>
-</div>
-<div class="memdoc">
-<p>Tells you roughly how large <code>*this</code> is. <ul>
-<li>Complexity: O(1)</li>
-</ul>
-<dl class="return"><dt><b>Returns:</b></dt><dd>The number of hexadecimal digits that would be required to encode <code>this</code>. </dd></dl>
- </p>
-
-<p>Definition at line <a class="el" href="fixed__integer_8hpp_source.html#l00420">420</a> of file <a class="el" href="fixed__integer_8hpp_source.html">fixed_integer.hpp</a>.</p>
-
-</div>
-</div>
-<a class="anchor" id="a7cf3f89f994ac21e3858c3b0cdf7d8c7"></a><!-- doxytag: member="boost::xint::fixed_integer::odd" ref="a7cf3f89f994ac21e3858c3b0cdf7d8c7" args="() const " -->
-<div class="memitem">
-<div class="memproto">
-<div class="memtemplate">
-template&lt;size_t Bits&gt; </div>
- <table class="memname">
- <tr>
- <td class="memname">bool <a class="el" href="classboost_1_1xint_1_1fixed__integer.html">boost::xint::fixed_integer</a>&lt; Bits &gt;::odd </td>
- <td>(</td>
- <td class="paramname"></td>
- <td>&nbsp;)&nbsp;</td>
- <td> const<code> [inline]</code></td>
- </tr>
- </table>
-</div>
-<div class="memdoc">
-<p>Tests the lowest bit of <code>*this</code> to determine oddness. <ul>
-<li>Complexity: O(1)</li>
-</ul>
-<dl class="return"><dt><b>Returns:</b></dt><dd><code>true</code> if <code>*this</code> is odd, otherwise <code>false</code>. </dd></dl>
- </p>
-
-<p>Definition at line <a class="el" href="fixed__integer_8hpp_source.html#l00401">401</a> of file <a class="el" href="fixed__integer_8hpp_source.html">fixed_integer.hpp</a>.</p>
-
-</div>
-</div>
-<a class="anchor" id="ae2f227bfbdf7f7f4b69a968ae491f8df"></a><!-- doxytag: member="boost::xint::fixed_integer::operator!" ref="ae2f227bfbdf7f7f4b69a968ae491f8df" args="() const " -->
-<div class="memitem">
-<div class="memproto">
-<div class="memtemplate">
-template&lt;size_t Bits&gt; </div>
- <table class="memname">
- <tr>
- <td class="memname">bool <a class="el" href="classboost_1_1xint_1_1fixed__integer.html">boost::xint::fixed_integer</a>&lt; Bits &gt;::operator! </td>
- <td>(</td>
- <td class="paramname"></td>
- <td>&nbsp;)&nbsp;</td>
- <td> const<code> [inline]</code></td>
- </tr>
- </table>
-</div>
-<div class="memdoc">
-
-<p>Definition at line <a class="el" href="fixed__integer_8hpp_source.html#l00056">56</a> of file <a class="el" href="fixed__integer_8hpp_source.html">fixed_integer.hpp</a>.</p>
-
-</div>
-</div>
-<a class="anchor" id="a49bd66c70cb6b121bfaea17627321779"></a><!-- doxytag: member="boost::xint::fixed_integer::operator%=" ref="a49bd66c70cb6b121bfaea17627321779" args="(const fixed_integer_any &amp;b)" -->
-<div class="memitem">
-<div class="memproto">
-<div class="memtemplate">
-template&lt;size_t Bits&gt; </div>
- <table class="memname">
- <tr>
- <td class="memname"><a class="el" href="classboost_1_1xint_1_1fixed__integer.html">fixed_integer</a>&lt;Bits&gt;&amp; <a class="el" href="classboost_1_1xint_1_1fixed__integer.html">boost::xint::fixed_integer</a>&lt; Bits &gt;::operator%= </td>
- <td>(</td>
- <td class="paramtype">const <a class="el" href="classboost_1_1xint_1_1fixed__integer__any.html">fixed_integer_any</a> &amp;&nbsp;</td>
- <td class="paramname"> <em>b</em></td>
- <td>&nbsp;)&nbsp;</td>
- <td></td>
- </tr>
- </table>
-</div>
-<div class="memdoc">
-
-</div>
-</div>
-<a class="anchor" id="a6b9fd6cf35616b29c03d621a1a2d8c83"></a><!-- doxytag: member="boost::xint::fixed_integer::operator&amp;=" ref="a6b9fd6cf35616b29c03d621a1a2d8c83" args="(const fixed_integer_any &amp;n)" -->
-<div class="memitem">
-<div class="memproto">
-<div class="memtemplate">
-template&lt;size_t Bits&gt; </div>
- <table class="memname">
- <tr>
- <td class="memname"><a class="el" href="classboost_1_1xint_1_1fixed__integer.html">fixed_integer</a>&lt;Bits&gt;&amp; <a class="el" href="classboost_1_1xint_1_1fixed__integer.html">boost::xint::fixed_integer</a>&lt; Bits &gt;::operator&amp;= </td>
- <td>(</td>
- <td class="paramtype">const <a class="el" href="classboost_1_1xint_1_1fixed__integer__any.html">fixed_integer_any</a> &amp;&nbsp;</td>
- <td class="paramname"> <em>n</em></td>
- <td>&nbsp;)&nbsp;</td>
- <td></td>
- </tr>
- </table>
-</div>
-<div class="memdoc">
-
-</div>
-</div>
-<a class="anchor" id="a3f19202d563bcee5fce090d09e353dc6"></a><!-- doxytag: member="boost::xint::fixed_integer::operator*=" ref="a3f19202d563bcee5fce090d09e353dc6" args="(const fixed_integer_any &amp;b)" -->
-<div class="memitem">
-<div class="memproto">
-<div class="memtemplate">
-template&lt;size_t Bits&gt; </div>
- <table class="memname">
- <tr>
- <td class="memname"><a class="el" href="classboost_1_1xint_1_1fixed__integer.html">fixed_integer</a>&lt;Bits&gt;&amp; <a class="el" href="classboost_1_1xint_1_1fixed__integer.html">boost::xint::fixed_integer</a>&lt; Bits &gt;::operator*= </td>
- <td>(</td>
- <td class="paramtype">const <a class="el" href="classboost_1_1xint_1_1fixed__integer__any.html">fixed_integer_any</a> &amp;&nbsp;</td>
- <td class="paramname"> <em>b</em></td>
- <td>&nbsp;)&nbsp;</td>
- <td></td>
- </tr>
- </table>
-</div>
-<div class="memdoc">
-
-</div>
-</div>
-<a class="anchor" id="acb3c1e3c5bf0395beed0ba9d58a39600"></a><!-- doxytag: member="boost::xint::fixed_integer::operator+" ref="acb3c1e3c5bf0395beed0ba9d58a39600" args="() const " -->
-<div class="memitem">
-<div class="memproto">
-<div class="memtemplate">
-template&lt;size_t Bits&gt; </div>
- <table class="memname">
- <tr>
- <td class="memname">const <a class="el" href="classboost_1_1xint_1_1fixed__integer.html">fixed_integer</a>&lt;Bits&gt;&amp; <a class="el" href="classboost_1_1xint_1_1fixed__integer.html">boost::xint::fixed_integer</a>&lt; Bits &gt;::operator+ </td>
- <td>(</td>
- <td class="paramname"></td>
- <td>&nbsp;)&nbsp;</td>
- <td> const<code> [inline]</code></td>
- </tr>
- </table>
-</div>
-<div class="memdoc">
-
-<p>Definition at line <a class="el" href="fixed__integer_8hpp_source.html#l00059">59</a> of file <a class="el" href="fixed__integer_8hpp_source.html">fixed_integer.hpp</a>.</p>
-
-</div>
-</div>
-<a class="anchor" id="a195d3683bf389a1d3467a90c4f797b20"></a><!-- doxytag: member="boost::xint::fixed_integer::operator+" ref="a195d3683bf389a1d3467a90c4f797b20" args="()" -->
-<div class="memitem">
-<div class="memproto">
-<div class="memtemplate">
-template&lt;size_t Bits&gt; </div>
- <table class="memname">
- <tr>
- <td class="memname"><a class="el" href="classboost_1_1xint_1_1fixed__integer.html">fixed_integer</a>&lt;Bits&gt;&amp; <a class="el" href="classboost_1_1xint_1_1fixed__integer.html">boost::xint::fixed_integer</a>&lt; Bits &gt;::operator+ </td>
- <td>(</td>
- <td class="paramname"></td>
- <td>&nbsp;)&nbsp;</td>
- <td><code> [inline]</code></td>
- </tr>
- </table>
-</div>
-<div class="memdoc">
-
-<p>Definition at line <a class="el" href="fixed__integer_8hpp_source.html#l00058">58</a> of file <a class="el" href="fixed__integer_8hpp_source.html">fixed_integer.hpp</a>.</p>
-
-</div>
-</div>
-<a class="anchor" id="a781e7f1612a68f1c35c2bc8d17d33b0c"></a><!-- doxytag: member="boost::xint::fixed_integer::operator++" ref="a781e7f1612a68f1c35c2bc8d17d33b0c" args="(int)" -->
-<div class="memitem">
-<div class="memproto">
-<div class="memtemplate">
-template&lt;size_t Bits&gt; </div>
- <table class="memname">
- <tr>
- <td class="memname"><a class="el" href="classboost_1_1xint_1_1fixed__integer.html">fixed_integer</a>&lt; Bits &gt; <a class="el" href="classboost_1_1xint_1_1fixed__integer.html">boost::xint::fixed_integer</a>&lt; Bits &gt;::operator++ </td>
- <td>(</td>
- <td class="paramtype">int&nbsp;</td>
- <td class="paramname"></td>
- <td>&nbsp;)&nbsp;</td>
- <td><code> [inline]</code></td>
- </tr>
- </table>
-</div>
-<div class="memdoc">
-<p>Postincrement operator -- not recommended, inefficient </p>
-
-<p>Definition at line <a class="el" href="fixed__integer_8hpp_source.html#l00495">495</a> of file <a class="el" href="fixed__integer_8hpp_source.html">fixed_integer.hpp</a>.</p>
-
-</div>
-</div>
-<a class="anchor" id="a045819216daea2ec2509066310d1755d"></a><!-- doxytag: member="boost::xint::fixed_integer::operator++" ref="a045819216daea2ec2509066310d1755d" args="()" -->
-<div class="memitem">
-<div class="memproto">
-<div class="memtemplate">
-template&lt;size_t Bits&gt; </div>
- <table class="memname">
- <tr>
- <td class="memname"><a class="el" href="classboost_1_1xint_1_1fixed__integer.html">fixed_integer</a>&lt; Bits &gt; &amp; <a class="el" href="classboost_1_1xint_1_1fixed__integer.html">boost::xint::fixed_integer</a>&lt; Bits &gt;::operator++ </td>
- <td>(</td>
- <td class="paramname"></td>
- <td>&nbsp;)&nbsp;</td>
- <td><code> [inline]</code></td>
- </tr>
- </table>
-</div>
-<div class="memdoc">
-<p>Preincrement operator </p>
-
-<p>Definition at line <a class="el" href="fixed__integer_8hpp_source.html#l00483">483</a> of file <a class="el" href="fixed__integer_8hpp_source.html">fixed_integer.hpp</a>.</p>
-
-</div>
-</div>
-<a class="anchor" id="aee99171535628c8466999d3bdc2b7516"></a><!-- doxytag: member="boost::xint::fixed_integer::operator+=" ref="aee99171535628c8466999d3bdc2b7516" args="(const fixed_integer_any &amp;b)" -->
-<div class="memitem">
-<div class="memproto">
-<div class="memtemplate">
-template&lt;size_t Bits&gt; </div>
- <table class="memname">
- <tr>
- <td class="memname"><a class="el" href="classboost_1_1xint_1_1fixed__integer.html">fixed_integer</a>&lt;Bits&gt;&amp; <a class="el" href="classboost_1_1xint_1_1fixed__integer.html">boost::xint::fixed_integer</a>&lt; Bits &gt;::operator+= </td>
- <td>(</td>
- <td class="paramtype">const <a class="el" href="classboost_1_1xint_1_1fixed__integer__any.html">fixed_integer_any</a> &amp;&nbsp;</td>
- <td class="paramname"> <em>b</em></td>
- <td>&nbsp;)&nbsp;</td>
- <td></td>
- </tr>
- </table>
-</div>
-<div class="memdoc">
-
-</div>
-</div>
-<a class="anchor" id="aac0ac16865a09e299593891ae0399139"></a><!-- doxytag: member="boost::xint::fixed_integer::operator&#45;" ref="aac0ac16865a09e299593891ae0399139" args="() const " -->
-<div class="memitem">
-<div class="memproto">
-<div class="memtemplate">
-template&lt;size_t Bits&gt; </div>
- <table class="memname">
- <tr>
- <td class="memname"><a class="el" href="classboost_1_1xint_1_1fixed__integer.html">fixed_integer</a>&lt;Bits&gt; <a class="el" href="classboost_1_1xint_1_1fixed__integer.html">boost::xint::fixed_integer</a>&lt; Bits &gt;::operator- </td>
- <td>(</td>
- <td class="paramname"></td>
- <td>&nbsp;)&nbsp;</td>
- <td> const<code> [inline]</code></td>
- </tr>
- </table>
-</div>
-<div class="memdoc">
-
-<p>Definition at line <a class="el" href="fixed__integer_8hpp_source.html#l00057">57</a> of file <a class="el" href="fixed__integer_8hpp_source.html">fixed_integer.hpp</a>.</p>
-
-</div>
-</div>
-<a class="anchor" id="a92b08d730aa7913ccc2b9860cda5cb1b"></a><!-- doxytag: member="boost::xint::fixed_integer::operator&#45;&#45;" ref="a92b08d730aa7913ccc2b9860cda5cb1b" args="(int)" -->
-<div class="memitem">
-<div class="memproto">
-<div class="memtemplate">
-template&lt;size_t Bits&gt; </div>
- <table class="memname">
- <tr>
- <td class="memname"><a class="el" href="classboost_1_1xint_1_1fixed__integer.html">fixed_integer</a>&lt; Bits &gt; <a class="el" href="classboost_1_1xint_1_1fixed__integer.html">boost::xint::fixed_integer</a>&lt; Bits &gt;::operator-- </td>
- <td>(</td>
- <td class="paramtype">int&nbsp;</td>
- <td class="paramname"></td>
- <td>&nbsp;)&nbsp;</td>
- <td><code> [inline]</code></td>
- </tr>
- </table>
-</div>
-<div class="memdoc">
-<p>Postdecrement operator -- not recommended, inefficient </p>
-
-<p>Definition at line <a class="el" href="fixed__integer_8hpp_source.html#l00502">502</a> of file <a class="el" href="fixed__integer_8hpp_source.html">fixed_integer.hpp</a>.</p>
-
-</div>
-</div>
-<a class="anchor" id="a4623f3c93f327cb2fc426cf3c1c14e1e"></a><!-- doxytag: member="boost::xint::fixed_integer::operator&#45;&#45;" ref="a4623f3c93f327cb2fc426cf3c1c14e1e" args="()" -->
-<div class="memitem">
-<div class="memproto">
-<div class="memtemplate">
-template&lt;size_t Bits&gt; </div>
- <table class="memname">
- <tr>
- <td class="memname"><a class="el" href="classboost_1_1xint_1_1fixed__integer.html">fixed_integer</a>&lt; Bits &gt; &amp; <a class="el" href="classboost_1_1xint_1_1fixed__integer.html">boost::xint::fixed_integer</a>&lt; Bits &gt;::operator-- </td>
- <td>(</td>
- <td class="paramname"></td>
- <td>&nbsp;)&nbsp;</td>
- <td><code> [inline]</code></td>
- </tr>
- </table>
-</div>
-<div class="memdoc">
-<p>Predecrement operator </p>
-
-<p>Definition at line <a class="el" href="fixed__integer_8hpp_source.html#l00489">489</a> of file <a class="el" href="fixed__integer_8hpp_source.html">fixed_integer.hpp</a>.</p>
-
-</div>
-</div>
-<a class="anchor" id="a8269a74cf9ed0dd4fbf7fb348cb35626"></a><!-- doxytag: member="boost::xint::fixed_integer::operator&#45;=" ref="a8269a74cf9ed0dd4fbf7fb348cb35626" args="(const fixed_integer_any &amp;b)" -->
-<div class="memitem">
-<div class="memproto">
-<div class="memtemplate">
-template&lt;size_t Bits&gt; </div>
- <table class="memname">
- <tr>
- <td class="memname"><a class="el" href="classboost_1_1xint_1_1fixed__integer.html">fixed_integer</a>&lt;Bits&gt;&amp; <a class="el" href="classboost_1_1xint_1_1fixed__integer.html">boost::xint::fixed_integer</a>&lt; Bits &gt;::operator-= </td>
- <td>(</td>
- <td class="paramtype">const <a class="el" href="classboost_1_1xint_1_1fixed__integer__any.html">fixed_integer_any</a> &amp;&nbsp;</td>
- <td class="paramname"> <em>b</em></td>
- <td>&nbsp;)&nbsp;</td>
- <td></td>
- </tr>
- </table>
-</div>
-<div class="memdoc">
-
-</div>
-</div>
-<a class="anchor" id="a3ea864bd2849226218e5e5fa4332bac3"></a><!-- doxytag: member="boost::xint::fixed_integer::operator/=" ref="a3ea864bd2849226218e5e5fa4332bac3" args="(const fixed_integer_any &amp;b)" -->
-<div class="memitem">
-<div class="memproto">
-<div class="memtemplate">
-template&lt;size_t Bits&gt; </div>
- <table class="memname">
- <tr>
- <td class="memname"><a class="el" href="classboost_1_1xint_1_1fixed__integer.html">fixed_integer</a>&lt;Bits&gt;&amp; <a class="el" href="classboost_1_1xint_1_1fixed__integer.html">boost::xint::fixed_integer</a>&lt; Bits &gt;::operator/= </td>
- <td>(</td>
- <td class="paramtype">const <a class="el" href="classboost_1_1xint_1_1fixed__integer__any.html">fixed_integer_any</a> &amp;&nbsp;</td>
- <td class="paramname"> <em>b</em></td>
- <td>&nbsp;)&nbsp;</td>
- <td></td>
- </tr>
- </table>
-</div>
-<div class="memdoc">
-
-</div>
-</div>
-<a class="anchor" id="a2caf7d4d873d7805beb2e62ddcb9b4f3"></a><!-- doxytag: member="boost::xint::fixed_integer::operator&lt;&lt;" ref="a2caf7d4d873d7805beb2e62ddcb9b4f3" args="(size_t shift) const " -->
-<div class="memitem">
-<div class="memproto">
-<div class="memtemplate">
-template&lt;size_t Bits&gt; </div>
- <table class="memname">
- <tr>
- <td class="memname"><a class="el" href="classboost_1_1xint_1_1fixed__integer.html">fixed_integer</a>&lt; Bits &gt; <a class="el" href="classboost_1_1xint_1_1fixed__integer.html">boost::xint::fixed_integer</a>&lt; Bits &gt;::operator&lt;&lt; </td>
- <td>(</td>
- <td class="paramtype">size_t&nbsp;</td>
- <td class="paramname"> <em>shift</em></td>
- <td>&nbsp;)&nbsp;</td>
- <td> const<code> [inline]</code></td>
- </tr>
- </table>
-</div>
-<div class="memdoc">
-
-<p>Definition at line <a class="el" href="fixed__integer_8hpp_source.html#l00469">469</a> of file <a class="el" href="fixed__integer_8hpp_source.html">fixed_integer.hpp</a>.</p>
-
-</div>
-</div>
-<a class="anchor" id="ac78f10b3130a60ba9d5e392ddb5629f3"></a><!-- doxytag: member="boost::xint::fixed_integer::operator&lt;&lt;=" ref="ac78f10b3130a60ba9d5e392ddb5629f3" args="(size_t shift)" -->
-<div class="memitem">
-<div class="memproto">
-<div class="memtemplate">
-template&lt;size_t Bits&gt; </div>
- <table class="memname">
- <tr>
- <td class="memname"><a class="el" href="classboost_1_1xint_1_1fixed__integer.html">fixed_integer</a>&lt; Bits &gt; &amp; <a class="el" href="classboost_1_1xint_1_1fixed__integer.html">boost::xint::fixed_integer</a>&lt; Bits &gt;::operator&lt;&lt;= </td>
- <td>(</td>
- <td class="paramtype">size_t&nbsp;</td>
- <td class="paramname"> <em>shift</em></td>
- <td>&nbsp;)&nbsp;</td>
- <td><code> [inline]</code></td>
- </tr>
- </table>
-</div>
-<div class="memdoc">
-
-<p>Definition at line <a class="el" href="fixed__integer_8hpp_source.html#l00457">457</a> of file <a class="el" href="fixed__integer_8hpp_source.html">fixed_integer.hpp</a>.</p>
-
-</div>
-</div>
-<a class="anchor" id="a8cd90bde9fd2284d2260986b9f23b3c7"></a><!-- doxytag: member="boost::xint::fixed_integer::operator=" ref="a8cd90bde9fd2284d2260986b9f23b3c7" args="(const fixed_integer&lt; Bits &gt; &amp;c)" -->
-<div class="memitem">
-<div class="memproto">
-<div class="memtemplate">
-template&lt;size_t Bits&gt; </div>
- <table class="memname">
- <tr>
- <td class="memname"><a class="el" href="classboost_1_1xint_1_1fixed__integer.html">fixed_integer</a>&lt;Bits&gt;&amp; <a class="el" href="classboost_1_1xint_1_1fixed__integer.html">boost::xint::fixed_integer</a>&lt; Bits &gt;::operator= </td>
- <td>(</td>
- <td class="paramtype">const <a class="el" href="classboost_1_1xint_1_1fixed__integer.html">fixed_integer</a>&lt; Bits &gt; &amp;&nbsp;</td>
- <td class="paramname"> <em>c</em></td>
- <td>&nbsp;)&nbsp;</td>
- <td><code> [inline]</code></td>
- </tr>
- </table>
-</div>
-<div class="memdoc">
-
-<p>Definition at line <a class="el" href="fixed__integer_8hpp_source.html#l00053">53</a> of file <a class="el" href="fixed__integer_8hpp_source.html">fixed_integer.hpp</a>.</p>
-
-</div>
-</div>
-<a class="anchor" id="a472d2d3147f4e762efdce04fdf50efa9"></a><!-- doxytag: member="boost::xint::fixed_integer::operator&gt;&gt;" ref="a472d2d3147f4e762efdce04fdf50efa9" args="(size_t shift) const " -->
-<div class="memitem">
-<div class="memproto">
-<div class="memtemplate">
-template&lt;size_t Bits&gt; </div>
- <table class="memname">
- <tr>
- <td class="memname"><a class="el" href="classboost_1_1xint_1_1fixed__integer.html">fixed_integer</a>&lt; Bits &gt; <a class="el" href="classboost_1_1xint_1_1fixed__integer.html">boost::xint::fixed_integer</a>&lt; Bits &gt;::operator&gt;&gt; </td>
- <td>(</td>
- <td class="paramtype">size_t&nbsp;</td>
- <td class="paramname"> <em>shift</em></td>
- <td>&nbsp;)&nbsp;</td>
- <td> const<code> [inline]</code></td>
- </tr>
- </table>
-</div>
-<div class="memdoc">
-
-<p>Definition at line <a class="el" href="fixed__integer_8hpp_source.html#l00476">476</a> of file <a class="el" href="fixed__integer_8hpp_source.html">fixed_integer.hpp</a>.</p>
-
-</div>
-</div>
-<a class="anchor" id="aea1a25705a83f84b416e3aabd0d30d01"></a><!-- doxytag: member="boost::xint::fixed_integer::operator&gt;&gt;=" ref="aea1a25705a83f84b416e3aabd0d30d01" args="(size_t shift)" -->
-<div class="memitem">
-<div class="memproto">
-<div class="memtemplate">
-template&lt;size_t Bits&gt; </div>
- <table class="memname">
- <tr>
- <td class="memname"><a class="el" href="classboost_1_1xint_1_1fixed__integer.html">fixed_integer</a>&lt; Bits &gt; &amp; <a class="el" href="classboost_1_1xint_1_1fixed__integer.html">boost::xint::fixed_integer</a>&lt; Bits &gt;::operator&gt;&gt;= </td>
- <td>(</td>
- <td class="paramtype">size_t&nbsp;</td>
- <td class="paramname"> <em>shift</em></td>
- <td>&nbsp;)&nbsp;</td>
- <td><code> [inline]</code></td>
- </tr>
- </table>
-</div>
-<div class="memdoc">
-
-<p>Definition at line <a class="el" href="fixed__integer_8hpp_source.html#l00463">463</a> of file <a class="el" href="fixed__integer_8hpp_source.html">fixed_integer.hpp</a>.</p>
-
-</div>
-</div>
-<a class="anchor" id="acd4a98a6eb089b7f806b74607249f027"></a><!-- doxytag: member="boost::xint::fixed_integer::operator^=" ref="acd4a98a6eb089b7f806b74607249f027" args="(const fixed_integer_any &amp;n)" -->
-<div class="memitem">
-<div class="memproto">
-<div class="memtemplate">
-template&lt;size_t Bits&gt; </div>
- <table class="memname">
- <tr>
- <td class="memname"><a class="el" href="classboost_1_1xint_1_1fixed__integer.html">fixed_integer</a>&lt;Bits&gt;&amp; <a class="el" href="classboost_1_1xint_1_1fixed__integer.html">boost::xint::fixed_integer</a>&lt; Bits &gt;::operator^= </td>
- <td>(</td>
- <td class="paramtype">const <a class="el" href="classboost_1_1xint_1_1fixed__integer__any.html">fixed_integer_any</a> &amp;&nbsp;</td>
- <td class="paramname"> <em>n</em></td>
- <td>&nbsp;)&nbsp;</td>
- <td></td>
- </tr>
- </table>
-</div>
-<div class="memdoc">
-
-</div>
-</div>
-<a class="anchor" id="ab24851149e1e43675669f79421feb0c6"></a><!-- doxytag: member="boost::xint::fixed_integer::operator|=" ref="ab24851149e1e43675669f79421feb0c6" args="(const fixed_integer_any &amp;n)" -->
-<div class="memitem">
-<div class="memproto">
-<div class="memtemplate">
-template&lt;size_t Bits&gt; </div>
- <table class="memname">
- <tr>
- <td class="memname"><a class="el" href="classboost_1_1xint_1_1fixed__integer.html">fixed_integer</a>&lt;Bits&gt;&amp; <a class="el" href="classboost_1_1xint_1_1fixed__integer.html">boost::xint::fixed_integer</a>&lt; Bits &gt;::operator|= </td>
- <td>(</td>
- <td class="paramtype">const <a class="el" href="classboost_1_1xint_1_1fixed__integer__any.html">fixed_integer_any</a> &amp;&nbsp;</td>
- <td class="paramname"> <em>n</em></td>
- <td>&nbsp;)&nbsp;</td>
- <td></td>
- </tr>
- </table>
-</div>
-<div class="memdoc">
-
-</div>
-</div>
-<a class="anchor" id="a8741f3260d2a5a74c4d5cedf8a7d2a82"></a><!-- doxytag: member="boost::xint::fixed_integer::operator~" ref="a8741f3260d2a5a74c4d5cedf8a7d2a82" args="() const " -->
-<div class="memitem">
-<div class="memproto">
-<div class="memtemplate">
-template&lt;size_t Bits&gt; </div>
- <table class="memname">
- <tr>
- <td class="memname"><a class="el" href="classboost_1_1xint_1_1fixed__integer.html">fixed_integer</a>&lt; Bits &gt; <a class="el" href="classboost_1_1xint_1_1fixed__integer.html">boost::xint::fixed_integer</a>&lt; Bits &gt;::operator~ </td>
- <td>(</td>
- <td class="paramname"></td>
- <td>&nbsp;)&nbsp;</td>
- <td> const<code> [inline]</code></td>
- </tr>
- </table>
-</div>
-<div class="memdoc">
-
-<p>The Bitwise Ones' Complement (i.e. bitwise NOT) operator. </p>
-<p>This operator does not exist in the integer and <a class="el" href="classboost_1_1xint_1_1nothrow__integer.html" title="The nothrow_integer class.">nothrow_integer</a> classes, because as their lengths are not limited, it would result in an infinitely long number. </p>
-
-<p>Definition at line <a class="el" href="fixed__integer_8hpp_source.html#l00431">431</a> of file <a class="el" href="fixed__integer_8hpp_source.html">fixed_integer.hpp</a>.</p>
-
-</div>
-</div>
-<a class="anchor" id="a82f0342baba940b21f046be76b3a1fc9"></a><!-- doxytag: member="boost::xint::fixed_integer::sign" ref="a82f0342baba940b21f046be76b3a1fc9" args="(bool signed_zero=false) const " -->
-<div class="memitem">
-<div class="memproto">
-<div class="memtemplate">
-template&lt;size_t Bits&gt; </div>
- <table class="memname">
- <tr>
- <td class="memname">int <a class="el" href="classboost_1_1xint_1_1fixed__integer.html">boost::xint::fixed_integer</a>&lt; Bits &gt;::sign </td>
- <td>(</td>
- <td class="paramtype">bool&nbsp;</td>
- <td class="paramname"> <em>signed_zero</em> = <code>false</code></td>
- <td>&nbsp;)&nbsp;</td>
- <td> const<code> [inline]</code></td>
- </tr>
- </table>
-</div>
-<div class="memdoc">
-<p>Tests the sign of <code>*this</code>. <ul>
-<li>Complexity: O(1)</li>
-</ul>
-<dl><dt><b>Parameters:</b></dt><dd>
- <table border="0" cellspacing="2" cellpadding="0">
- <tr><td valign="top"><tt>[in]</tt>&nbsp;</td><td valign="top"><em>signed_zero</em>&nbsp;</td><td>If <code>false</code> (the default value), returns zero if <code>*this</code> is zero. If <code>true</code>, returns 1 or -1 on a zero <code>*this</code> as well. Primarily used to identify a <a class="el" href="zero.html">negative zero</a>.</td></tr>
- </table>
- </dd>
-</dl>
-<dl class="return"><dt><b>Returns:</b></dt><dd>-1 if <code>*this</code> is negative, 0 if it's zero, or 1 if it's greater than zero. </dd></dl>
- </p>
-
-<p>Definition at line <a class="el" href="fixed__integer_8hpp_source.html#l00413">413</a> of file <a class="el" href="fixed__integer_8hpp_source.html">fixed_integer.hpp</a>.</p>
-
-</div>
-</div>
-<hr/>The documentation for this class was generated from the following file:<ul>
-<li><a class="el" href="fixed__integer_8hpp_source.html">fixed_integer.hpp</a></li>
-</ul>
-</div>
-<hr class="footer"/><address style="text-align: right;"><small>Generated on Tue May 4 10:20:17 2010 for The Extended Integer (XInt) Library by&nbsp;
-<a href="http://www.doxygen.org/index.html">
-<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.3 </small></address>
-</body>
-</html>

Deleted: sandbox/xint/doc/classboost_1_1xint_1_1fixed__integer.png
==============================================================================
Binary file. No diff available.

Deleted: sandbox/xint/doc/classboost_1_1xint_1_1fixed__integer__any-members.html
==============================================================================
--- sandbox/xint/doc/classboost_1_1xint_1_1fixed__integer__any-members.html 2010-05-31 20:43:54 EDT (Mon, 31 May 2010)
+++ (empty file)
@@ -1,40 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
-<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
-<title>The Extended Integer (XInt) Library: Member List</title>
-<link href="tabs.css" rel="stylesheet" type="text/css"/>
-<link href="doxygen.css" rel="stylesheet" type="text/css"/>
-</head>
-<body>
-<!-- Generated by Doxygen 1.6.3 -->
-<div class="navigation" id="top">
- <div class="tabs">
- <ul>
- <li>Main Page</li>
- <li>Namespaces</li>
- <li class="current">Classes</li>
- <li>Files</li>
- </ul>
- </div>
- <div class="tabs">
- <ul>
- <li>Class List</li>
- <li>Class Hierarchy</li>
- <li>Class Members</li>
- </ul>
- </div>
-</div>
-<div class="contents">
-<h1>boost::xint::fixed_integer_any Member List</h1>This is the complete list of members for <a class="el" href="classboost_1_1xint_1_1fixed__integer__any.html">boost::xint::fixed_integer_any</a>, including all inherited members.<table>
- <tr class="memlist"><td><a class="el" href="classboost_1_1xint_1_1fixed__integer__any.html#af6e682f145aaa5ceea6f8d81bf533442">fixed_integer_any</a>(const T &amp;n, typename boost::enable_if&lt; boost::is_integral&lt; T &gt; &gt;::type *=0, typename boost::enable_if&lt; boost::is_signed&lt; T &gt; &gt;::type *=0)</td><td><a class="el" href="classboost_1_1xint_1_1fixed__integer__any.html">boost::xint::fixed_integer_any</a></td><td><code> [inline]</code></td></tr>
- <tr class="memlist"><td><a class="el" href="classboost_1_1xint_1_1fixed__integer__any.html#a3ad49f5095f367b7e19aa3becb3464b3">fixed_integer_any</a>(const T &amp;n, typename boost::enable_if&lt; boost::is_integral&lt; T &gt; &gt;::type *=0, typename boost::enable_if&lt; boost::is_unsigned&lt; T &gt; &gt;::type *=0)</td><td><a class="el" href="classboost_1_1xint_1_1fixed__integer__any.html">boost::xint::fixed_integer_any</a></td><td><code> [inline]</code></td></tr>
- <tr class="memlist"><td><a class="el" href="classboost_1_1xint_1_1fixed__integer__any.html#aa1c3b00ad3be70fb2d42dd86fcfe3a00">fixed_integer_any</a>(size_t count, detail::digit_t mask)</td><td><a class="el" href="classboost_1_1xint_1_1fixed__integer__any.html">boost::xint::fixed_integer_any</a></td><td><code> [inline, protected]</code></td></tr>
- <tr class="memlist"><td><a class="el" href="classboost_1_1xint_1_1fixed__integer__any.html#a9f0620259b6e2cdf3ea6e2bad2a21d22">fixed_integer_any</a>(detail::data_t *adopt, bool neg=false)</td><td><a class="el" href="classboost_1_1xint_1_1fixed__integer__any.html">boost::xint::fixed_integer_any</a></td><td><code> [inline, explicit, protected]</code></td></tr>
- <tr class="memlist"><td><a class="el" href="classboost_1_1xint_1_1fixed__integer__any.html#abdd088ce22d3afd4a8c3dcc402401ace">fixed_integer_any</a>(const fixed_integer_any &amp;c)</td><td><a class="el" href="classboost_1_1xint_1_1fixed__integer__any.html">boost::xint::fixed_integer_any</a></td><td><code> [inline, explicit, protected]</code></td></tr>
-</table></div>
-<hr class="footer"/><address style="text-align: right;"><small>Generated on Tue May 4 10:20:17 2010 for The Extended Integer (XInt) Library by&nbsp;
-<a href="http://www.doxygen.org/index.html">
-<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.3 </small></address>
-</body>
-</html>

Deleted: sandbox/xint/doc/classboost_1_1xint_1_1fixed__integer__any.html
==============================================================================
--- sandbox/xint/doc/classboost_1_1xint_1_1fixed__integer__any.html 2010-05-31 20:43:54 EDT (Mon, 31 May 2010)
+++ (empty file)
@@ -1,224 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
-<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
-<title>The Extended Integer (XInt) Library: boost::xint::fixed_integer_any Class Reference</title>
-<link href="tabs.css" rel="stylesheet" type="text/css"/>
-<link href="doxygen.css" rel="stylesheet" type="text/css"/>
-</head>
-<body>
-<!-- Generated by Doxygen 1.6.3 -->
-<div class="navigation" id="top">
- <div class="tabs">
- <ul>
- <li>Main Page</li>
- <li>Namespaces</li>
- <li class="current">Classes</li>
- <li>Files</li>
- </ul>
- </div>
- <div class="tabs">
- <ul>
- <li>Class List</li>
- <li>Class Hierarchy</li>
- <li>Class Members</li>
- </ul>
- </div>
- <div class="navpath"><a class="el" href="namespaceboost.html">boost</a>::<a class="el" href="namespaceboost_1_1xint.html">xint</a>::<a class="el" href="classboost_1_1xint_1_1fixed__integer__any.html">fixed_integer_any</a>
- </div>
-</div>
-<div class="contents">
-<h1>boost::xint::fixed_integer_any Class Reference</h1><!-- doxytag: class="boost::xint::fixed_integer_any" -->
-<p>The base class for all <a class="el" href="classboost_1_1xint_1_1fixed__integer.html" title="A fixed-size integer type.">fixed_integer</a> types.
-More...</p>
-<div class="dynheader">
-Inheritance diagram for boost::xint::fixed_integer_any:</div>
-<div class="dynsection">
- <div class="center">
- <img src="classboost_1_1xint_1_1fixed__integer__any.png" usemap="#boost::xint::fixed_integer_any_map" alt=""/>
- <map id="boost::xint::fixed_integer_any_map" name="boost::xint::fixed_integer_any_map">
-<area href="classboost_1_1xint_1_1fixed__integer.html" alt="boost::xint::fixed_integer&lt; Bits &gt;" shape="rect" coords="0,56,190,80"/>
-</map>
- </div>
-</div>
-
-<p>List of all members.</p>
-<table border="0" cellpadding="0" cellspacing="0">
-<tr><td colspan="2"><h2>Automatic conversion operators.</h2></td></tr>
-<tr><td colspan="2"><p><a class="anchor" id="amgrpcf300c6907e4dc517ceded2f8cbac54f"></a> These allow the compiler to create a temporary <a class="el" href="classboost_1_1xint_1_1fixed__integer.html" title="A fixed-size integer type.">fixed_integer</a>, of the size of boost::uintmax_t, for proper comparisons between <a class="el" href="classboost_1_1xint_1_1fixed__integer.html" title="A fixed-size integer type.">fixed_integer</a> types and literals. They shouldn't be used for any other purposes. </p>
-<br/><br/></td></tr>
-<tr><td class="memTemplParams" colspan="2">template&lt;typename T &gt; </td></tr>
-<tr><td class="memTemplItemLeft" align="right" valign="top">&nbsp;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="classboost_1_1xint_1_1fixed__integer__any.html#a3ad49f5095f367b7e19aa3becb3464b3">fixed_integer_any</a> (const T &amp;n, typename boost::enable_if&lt; boost::is_integral&lt; T &gt; &gt;::type *=0, typename boost::enable_if&lt; boost::is_unsigned&lt; T &gt; &gt;::type *=0)</td></tr>
-<tr><td class="memTemplParams" colspan="2">template&lt;typename T &gt; </td></tr>
-<tr><td class="memTemplItemLeft" align="right" valign="top">&nbsp;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="classboost_1_1xint_1_1fixed__integer__any.html#af6e682f145aaa5ceea6f8d81bf533442">fixed_integer_any</a> (const T &amp;n, typename boost::enable_if&lt; boost::is_integral&lt; T &gt; &gt;::type *=0, typename boost::enable_if&lt; boost::is_signed&lt; T &gt; &gt;::type *=0)</td></tr>
-<tr><td class="memItemLeft" align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classboost_1_1xint_1_1fixed__integer__any.html#abdd088ce22d3afd4a8c3dcc402401ace">fixed_integer_any</a> (const <a class="el" href="classboost_1_1xint_1_1fixed__integer__any.html">fixed_integer_any</a> &amp;c)</td></tr>
-<tr><td class="memItemLeft" align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classboost_1_1xint_1_1fixed__integer__any.html#a9f0620259b6e2cdf3ea6e2bad2a21d22">fixed_integer_any</a> (detail::data_t *adopt, bool neg=false)</td></tr>
-<tr><td class="memItemLeft" align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classboost_1_1xint_1_1fixed__integer__any.html#aa1c3b00ad3be70fb2d42dd86fcfe3a00">fixed_integer_any</a> (size_t count, detail::digit_t mask)</td></tr>
-</table>
-<hr/><a name="_details"></a><h2>Detailed Description</h2>
-<p>The base class for all <a class="el" href="classboost_1_1xint_1_1fixed__integer.html" title="A fixed-size integer type.">fixed_integer</a> types. </p>
-<p>This class eases operations on different-sized <a class="el" href="classboost_1_1xint_1_1fixed__integer.html" title="A fixed-size integer type.">fixed_integer</a> types. </p>
-
-<p>Definition at line <a class="el" href="internals_8hpp_source.html#l00334">334</a> of file <a class="el" href="internals_8hpp_source.html">internals.hpp</a>.</p>
-<hr/><h2>Constructor &amp; Destructor Documentation</h2>
-<a class="anchor" id="af6e682f145aaa5ceea6f8d81bf533442"></a><!-- doxytag: member="boost::xint::fixed_integer_any::fixed_integer_any" ref="af6e682f145aaa5ceea6f8d81bf533442" args="(const T &amp;n, typename boost::enable_if&lt; boost::is_integral&lt; T &gt; &gt;::type *=0, typename boost::enable_if&lt; boost::is_signed&lt; T &gt; &gt;::type *=0)" -->
-<div class="memitem">
-<div class="memproto">
-<div class="memtemplate">
-template&lt;typename T &gt; </div>
- <table class="memname">
- <tr>
- <td class="memname">boost::xint::fixed_integer_any::fixed_integer_any </td>
- <td>(</td>
- <td class="paramtype">const T &amp;&nbsp;</td>
- <td class="paramname"> <em>n</em>, </td>
- </tr>
- <tr>
- <td class="paramkey"></td>
- <td></td>
- <td class="paramtype">typename boost::enable_if&lt; boost::is_integral&lt; T &gt; &gt;::type *&nbsp;</td>
- <td class="paramname"> = <code>0</code>, </td>
- </tr>
- <tr>
- <td class="paramkey"></td>
- <td></td>
- <td class="paramtype">typename boost::enable_if&lt; boost::is_signed&lt; T &gt; &gt;::type *&nbsp;</td>
- <td class="paramname"> = <code>0</code></td><td>&nbsp;</td>
- </tr>
- <tr>
- <td></td>
- <td>)</td>
- <td></td><td></td><td><code> [inline]</code></td>
- </tr>
- </table>
-</div>
-<div class="memdoc">
-
-<p>Definition at line <a class="el" href="internals_8hpp_source.html#l00342">342</a> of file <a class="el" href="internals_8hpp_source.html">internals.hpp</a>.</p>
-
-</div>
-</div>
-<a class="anchor" id="a3ad49f5095f367b7e19aa3becb3464b3"></a><!-- doxytag: member="boost::xint::fixed_integer_any::fixed_integer_any" ref="a3ad49f5095f367b7e19aa3becb3464b3" args="(const T &amp;n, typename boost::enable_if&lt; boost::is_integral&lt; T &gt; &gt;::type *=0, typename boost::enable_if&lt; boost::is_unsigned&lt; T &gt; &gt;::type *=0)" -->
-<div class="memitem">
-<div class="memproto">
-<div class="memtemplate">
-template&lt;typename T &gt; </div>
- <table class="memname">
- <tr>
- <td class="memname">boost::xint::fixed_integer_any::fixed_integer_any </td>
- <td>(</td>
- <td class="paramtype">const T &amp;&nbsp;</td>
- <td class="paramname"> <em>n</em>, </td>
- </tr>
- <tr>
- <td class="paramkey"></td>
- <td></td>
- <td class="paramtype">typename boost::enable_if&lt; boost::is_integral&lt; T &gt; &gt;::type *&nbsp;</td>
- <td class="paramname"> = <code>0</code>, </td>
- </tr>
- <tr>
- <td class="paramkey"></td>
- <td></td>
- <td class="paramtype">typename boost::enable_if&lt; boost::is_unsigned&lt; T &gt; &gt;::type *&nbsp;</td>
- <td class="paramname"> = <code>0</code></td><td>&nbsp;</td>
- </tr>
- <tr>
- <td></td>
- <td>)</td>
- <td></td><td></td><td><code> [inline]</code></td>
- </tr>
- </table>
-</div>
-<div class="memdoc">
-
-<p>Definition at line <a class="el" href="internals_8hpp_source.html#l00348">348</a> of file <a class="el" href="internals_8hpp_source.html">internals.hpp</a>.</p>
-
-</div>
-</div>
-<a class="anchor" id="aa1c3b00ad3be70fb2d42dd86fcfe3a00"></a><!-- doxytag: member="boost::xint::fixed_integer_any::fixed_integer_any" ref="aa1c3b00ad3be70fb2d42dd86fcfe3a00" args="(size_t count, detail::digit_t mask)" -->
-<div class="memitem">
-<div class="memproto">
- <table class="memname">
- <tr>
- <td class="memname">boost::xint::fixed_integer_any::fixed_integer_any </td>
- <td>(</td>
- <td class="paramtype">size_t&nbsp;</td>
- <td class="paramname"> <em>count</em>, </td>
- </tr>
- <tr>
- <td class="paramkey"></td>
- <td></td>
- <td class="paramtype">detail::digit_t&nbsp;</td>
- <td class="paramname"> <em>mask</em></td><td>&nbsp;</td>
- </tr>
- <tr>
- <td></td>
- <td>)</td>
- <td></td><td></td><td><code> [inline, protected]</code></td>
- </tr>
- </table>
-</div>
-<div class="memdoc">
-
-<p>Definition at line <a class="el" href="internals_8hpp_source.html#l00355">355</a> of file <a class="el" href="internals_8hpp_source.html">internals.hpp</a>.</p>
-
-</div>
-</div>
-<a class="anchor" id="a9f0620259b6e2cdf3ea6e2bad2a21d22"></a><!-- doxytag: member="boost::xint::fixed_integer_any::fixed_integer_any" ref="a9f0620259b6e2cdf3ea6e2bad2a21d22" args="(detail::data_t *adopt, bool neg=false)" -->
-<div class="memitem">
-<div class="memproto">
- <table class="memname">
- <tr>
- <td class="memname">boost::xint::fixed_integer_any::fixed_integer_any </td>
- <td>(</td>
- <td class="paramtype">detail::data_t *&nbsp;</td>
- <td class="paramname"> <em>adopt</em>, </td>
- </tr>
- <tr>
- <td class="paramkey"></td>
- <td></td>
- <td class="paramtype">bool&nbsp;</td>
- <td class="paramname"> <em>neg</em> = <code>false</code></td><td>&nbsp;</td>
- </tr>
- <tr>
- <td></td>
- <td>)</td>
- <td></td><td></td><td><code> [inline, explicit, protected]</code></td>
- </tr>
- </table>
-</div>
-<div class="memdoc">
-
-<p>Definition at line <a class="el" href="internals_8hpp_source.html#l00357">357</a> of file <a class="el" href="internals_8hpp_source.html">internals.hpp</a>.</p>
-
-</div>
-</div>
-<a class="anchor" id="abdd088ce22d3afd4a8c3dcc402401ace"></a><!-- doxytag: member="boost::xint::fixed_integer_any::fixed_integer_any" ref="abdd088ce22d3afd4a8c3dcc402401ace" args="(const fixed_integer_any &amp;c)" -->
-<div class="memitem">
-<div class="memproto">
- <table class="memname">
- <tr>
- <td class="memname">boost::xint::fixed_integer_any::fixed_integer_any </td>
- <td>(</td>
- <td class="paramtype">const <a class="el" href="classboost_1_1xint_1_1fixed__integer__any.html">fixed_integer_any</a> &amp;&nbsp;</td>
- <td class="paramname"> <em>c</em></td>
- <td>&nbsp;)&nbsp;</td>
- <td><code> [inline, explicit, protected]</code></td>
- </tr>
- </table>
-</div>
-<div class="memdoc">
-
-<p>Definition at line <a class="el" href="internals_8hpp_source.html#l00359">359</a> of file <a class="el" href="internals_8hpp_source.html">internals.hpp</a>.</p>
-
-</div>
-</div>
-<hr/>The documentation for this class was generated from the following file:<ul>
-<li><a class="el" href="internals_8hpp_source.html">internals.hpp</a></li>
-</ul>
-</div>
-<hr class="footer"/><address style="text-align: right;"><small>Generated on Tue May 4 10:20:17 2010 for The Extended Integer (XInt) Library by&nbsp;
-<a href="http://www.doxygen.org/index.html">
-<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.3 </small></address>
-</body>
-</html>

Deleted: sandbox/xint/doc/classboost_1_1xint_1_1fixed__integer__any.png
==============================================================================
Binary file. No diff available.

Deleted: sandbox/xint/doc/classboost_1_1xint_1_1integer-members.html
==============================================================================
--- sandbox/xint/doc/classboost_1_1xint_1_1integer-members.html 2010-05-31 20:43:54 EDT (Mon, 31 May 2010)
+++ (empty file)
@@ -1,73 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
-<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
-<title>The Extended Integer (XInt) Library: Member List</title>
-<link href="tabs.css" rel="stylesheet" type="text/css"/>
-<link href="doxygen.css" rel="stylesheet" type="text/css"/>
-</head>
-<body>
-<!-- Generated by Doxygen 1.6.3 -->
-<div class="navigation" id="top">
- <div class="tabs">
- <ul>
- <li>Main Page</li>
- <li>Namespaces</li>
- <li class="current">Classes</li>
- <li>Files</li>
- </ul>
- </div>
- <div class="tabs">
- <ul>
- <li>Class List</li>
- <li>Class Hierarchy</li>
- <li>Class Members</li>
- </ul>
- </div>
-</div>
-<div class="contents">
-<h1>boost::xint::integer Member List</h1>This is the complete list of members for <a class="el" href="classboost_1_1xint_1_1integer.html">boost::xint::integer</a>, including all inherited members.<table>
- <tr class="memlist"><td><a class="el" href="classboost_1_1xint_1_1integer.html#a5c47ab8e93d541e298dcfa3d73845d5a">divide_t</a> typedef</td><td><a class="el" href="classboost_1_1xint_1_1integer.html">boost::xint::integer</a></td><td></td></tr>
- <tr class="memlist"><td><a class="el" href="classboost_1_1xint_1_1integer.html#afa36410b307d227f66657ea6f2116bdb">even</a>() const </td><td><a class="el" href="classboost_1_1xint_1_1integer.html">boost::xint::integer</a></td><td></td></tr>
- <tr class="memlist"><td><a class="el" href="classboost_1_1xint_1_1integer.html#af9206e301a190df90fa2e76a30238c6f">hex_digits</a>() const </td><td><a class="el" href="classboost_1_1xint_1_1integer.html">boost::xint::integer</a></td><td></td></tr>
- <tr class="memlist"><td><a class="el" href="classboost_1_1xint_1_1integer.html#a33ad2603be1c3ae3823523265f7ee600">integer</a>()</td><td><a class="el" href="classboost_1_1xint_1_1integer.html">boost::xint::integer</a></td><td></td></tr>
- <tr class="memlist"><td><a class="el" href="classboost_1_1xint_1_1integer.html#afc2ddd14b40ab91640d10b134d2b7141">integer</a>(const integer &amp;b)</td><td><a class="el" href="classboost_1_1xint_1_1integer.html">boost::xint::integer</a></td><td></td></tr>
- <tr class="memlist"><td><a class="el" href="classboost_1_1xint_1_1integer.html#a36f03940af78fea1a821a51678a26104">integer</a>(BOOST_XINT_RV_REF(integer) b)</td><td><a class="el" href="classboost_1_1xint_1_1integer.html">boost::xint::integer</a></td><td><code> [inline]</code></td></tr>
- <tr class="memlist"><td><a class="el" href="classboost_1_1xint_1_1integer.html#acc0aea50091f653fb983373e12fc815e">integer</a>(const nothrow_integer &amp;b)</td><td><a class="el" href="classboost_1_1xint_1_1integer.html">boost::xint::integer</a></td><td><code> [explicit]</code></td></tr>
- <tr class="memlist"><td><a class="el" href="classboost_1_1xint_1_1integer.html#a963c15aab569fc6c93f5c8a42f7b2544">integer</a>(const fixed_integer_any &amp;b)</td><td><a class="el" href="classboost_1_1xint_1_1integer.html">boost::xint::integer</a></td><td><code> [explicit]</code></td></tr>
- <tr class="memlist"><td><a class="el" href="classboost_1_1xint_1_1integer.html#a179df60f5dc32f98b9f564ec20aff5a8">integer</a>(const std::string &amp;str, size_t base=10)</td><td><a class="el" href="classboost_1_1xint_1_1integer.html">boost::xint::integer</a></td><td><code> [explicit]</code></td></tr>
- <tr class="memlist"><td><a class="el" href="classboost_1_1xint_1_1integer.html#acf287891cafa7f5b20f5e56476fa1fc6">integer</a>(const T &amp;n, typename boost::enable_if&lt; boost::is_integral&lt; T &gt; &gt;::type *=0, typename boost::enable_if&lt; boost::is_signed&lt; T &gt; &gt;::type *=0)</td><td><a class="el" href="classboost_1_1xint_1_1integer.html">boost::xint::integer</a></td><td><code> [inline]</code></td></tr>
- <tr class="memlist"><td><a class="el" href="classboost_1_1xint_1_1integer.html#a9941bbf92bcfa48233110c451e676f64">integer</a>(const T &amp;n, typename boost::enable_if&lt; boost::is_integral&lt; T &gt; &gt;::type *=0, typename boost::enable_if&lt; boost::is_unsigned&lt; T &gt; &gt;::type *=0)</td><td><a class="el" href="classboost_1_1xint_1_1integer.html">boost::xint::integer</a></td><td><code> [inline]</code></td></tr>
- <tr class="memlist"><td><a class="el" href="classboost_1_1xint_1_1integer.html#a5d17a8184d20e7829273f769550954c1">odd</a>() const </td><td><a class="el" href="classboost_1_1xint_1_1integer.html">boost::xint::integer</a></td><td></td></tr>
- <tr class="memlist"><td><a class="el" href="classboost_1_1xint_1_1integer.html#aa332681715634b73118ffe76090a75d3">one</a>()</td><td><a class="el" href="classboost_1_1xint_1_1integer.html">boost::xint::integer</a></td><td><code> [static]</code></td></tr>
- <tr class="memlist"><td><a class="el" href="classboost_1_1xint_1_1integer.html#aea3d83dfa135c8833620ce96aece1743">operator!</a>() const </td><td><a class="el" href="classboost_1_1xint_1_1integer.html">boost::xint::integer</a></td><td><code> [inline]</code></td></tr>
- <tr class="memlist"><td><a class="el" href="classboost_1_1xint_1_1integer.html#a1acfe3b61f26b7168fd103521f6deee9">operator%=</a>(const integer &amp;b)</td><td><a class="el" href="classboost_1_1xint_1_1integer.html">boost::xint::integer</a></td><td></td></tr>
- <tr class="memlist"><td><a class="el" href="classboost_1_1xint_1_1integer.html#a717edb41c50edbd4b601c38b1fc6a8b0">operator&amp;=</a>(const integer &amp;n)</td><td><a class="el" href="classboost_1_1xint_1_1integer.html">boost::xint::integer</a></td><td></td></tr>
- <tr class="memlist"><td><a class="el" href="classboost_1_1xint_1_1integer.html#a3452b0a1af51a556bdcb6a3d087b44db">operator*=</a>(const integer &amp;b)</td><td><a class="el" href="classboost_1_1xint_1_1integer.html">boost::xint::integer</a></td><td></td></tr>
- <tr class="memlist"><td><a class="el" href="classboost_1_1xint_1_1integer.html#afe9c68f79efd13d349b532b2077c298f">operator+</a>()</td><td><a class="el" href="classboost_1_1xint_1_1integer.html">boost::xint::integer</a></td><td><code> [inline]</code></td></tr>
- <tr class="memlist"><td><a class="el" href="classboost_1_1xint_1_1integer.html#aa6e1e4356f6eebbd65e84d8717169acb">operator+</a>() const </td><td><a class="el" href="classboost_1_1xint_1_1integer.html">boost::xint::integer</a></td><td><code> [inline]</code></td></tr>
- <tr class="memlist"><td><a class="el" href="classboost_1_1xint_1_1integer.html#ab15c60f8f28c2f520a26ab19e33c280c">operator++</a>()</td><td><a class="el" href="classboost_1_1xint_1_1integer.html">boost::xint::integer</a></td><td></td></tr>
- <tr class="memlist"><td><a class="el" href="classboost_1_1xint_1_1integer.html#acdb4dc0521b76fbb0e667905fddaaada">operator++</a>(int)</td><td><a class="el" href="classboost_1_1xint_1_1integer.html">boost::xint::integer</a></td><td></td></tr>
- <tr class="memlist"><td><a class="el" href="classboost_1_1xint_1_1integer.html#a8ba263f6a5e51c15e3c51241d113c35e">operator+=</a>(const integer &amp;b)</td><td><a class="el" href="classboost_1_1xint_1_1integer.html">boost::xint::integer</a></td><td></td></tr>
- <tr class="memlist"><td><a class="el" href="classboost_1_1xint_1_1integer.html#a974cdabaf176323354cf491820b2d22d">operator-</a>() const </td><td><a class="el" href="classboost_1_1xint_1_1integer.html">boost::xint::integer</a></td><td></td></tr>
- <tr class="memlist"><td><a class="el" href="classboost_1_1xint_1_1integer.html#aa535f200d1d95306aae3d5f991df4e8f">operator--</a>()</td><td><a class="el" href="classboost_1_1xint_1_1integer.html">boost::xint::integer</a></td><td></td></tr>
- <tr class="memlist"><td><a class="el" href="classboost_1_1xint_1_1integer.html#a628a1e9614bcb4d0916dd7869877807d">operator--</a>(int)</td><td><a class="el" href="classboost_1_1xint_1_1integer.html">boost::xint::integer</a></td><td></td></tr>
- <tr class="memlist"><td><a class="el" href="classboost_1_1xint_1_1integer.html#a92f8f3cb4e080c43d889103e7606b7ba">operator-=</a>(const integer &amp;b)</td><td><a class="el" href="classboost_1_1xint_1_1integer.html">boost::xint::integer</a></td><td></td></tr>
- <tr class="memlist"><td><a class="el" href="classboost_1_1xint_1_1integer.html#a9e630e1f2cf12d29ad01de9c44dc8e3c">operator/=</a>(const integer &amp;b)</td><td><a class="el" href="classboost_1_1xint_1_1integer.html">boost::xint::integer</a></td><td></td></tr>
- <tr class="memlist"><td><a class="el" href="classboost_1_1xint_1_1integer.html#abc90075da0adaef0da2d0083e59af414">operator&lt;&lt;</a>(size_t shift) const </td><td><a class="el" href="classboost_1_1xint_1_1integer.html">boost::xint::integer</a></td><td></td></tr>
- <tr class="memlist"><td><a class="el" href="classboost_1_1xint_1_1integer.html#a33f0a1167639a60ac8ad8ef0f3d3f585">operator&lt;&lt;=</a>(size_t shift)</td><td><a class="el" href="classboost_1_1xint_1_1integer.html">boost::xint::integer</a></td><td></td></tr>
- <tr class="memlist"><td><a class="el" href="classboost_1_1xint_1_1integer.html#a81ff5a94d6895e1714e992fde407e7fa">operator=</a>(BOOST_XINT_COPY_ASSIGN_REF(integer) c)</td><td><a class="el" href="classboost_1_1xint_1_1integer.html">boost::xint::integer</a></td><td></td></tr>
- <tr class="memlist"><td><a class="el" href="classboost_1_1xint_1_1integer.html#a7092b058fd3f2450c5f6d6a0f6ae4a3c">operator=</a>(BOOST_XINT_RV_REF(integer) c)</td><td><a class="el" href="classboost_1_1xint_1_1integer.html">boost::xint::integer</a></td><td><code> [inline]</code></td></tr>
- <tr class="memlist"><td><a class="el" href="classboost_1_1xint_1_1integer.html#acf5998b517a994c38766d28a0d946a21">operator=</a>(const T &amp;n)</td><td><a class="el" href="classboost_1_1xint_1_1integer.html">boost::xint::integer</a></td><td><code> [inline]</code></td></tr>
- <tr class="memlist"><td><a class="el" href="classboost_1_1xint_1_1integer.html#a22af7cfcb28f97f4c8b78939265b46d6">operator&gt;&gt;</a>(size_t shift) const </td><td><a class="el" href="classboost_1_1xint_1_1integer.html">boost::xint::integer</a></td><td></td></tr>
- <tr class="memlist"><td><a class="el" href="classboost_1_1xint_1_1integer.html#a0ca39c4cb36160461fb9848cc9e7f2d4">operator&gt;&gt;=</a>(size_t shift)</td><td><a class="el" href="classboost_1_1xint_1_1integer.html">boost::xint::integer</a></td><td></td></tr>
- <tr class="memlist"><td><a class="el" href="classboost_1_1xint_1_1integer.html#a40fdf2cd80d53e173aa5129fe02289c3">operator^=</a>(const integer &amp;n)</td><td><a class="el" href="classboost_1_1xint_1_1integer.html">boost::xint::integer</a></td><td></td></tr>
- <tr class="memlist"><td><a class="el" href="classboost_1_1xint_1_1integer.html#a1fa48e6c6cefec7ae672156d27e79ec6">operator|=</a>(const integer &amp;n)</td><td><a class="el" href="classboost_1_1xint_1_1integer.html">boost::xint::integer</a></td><td></td></tr>
- <tr class="memlist"><td><a class="el" href="classboost_1_1xint_1_1integer.html#a6821767d0ec6c762a4c1002944550aae">sign</a>(bool signed_zero=false) const </td><td><a class="el" href="classboost_1_1xint_1_1integer.html">boost::xint::integer</a></td><td></td></tr>
- <tr class="memlist"><td><a class="el" href="classboost_1_1xint_1_1integer.html#a5c08ebe10f3f6333328b35193edd53d0">zero</a>()</td><td><a class="el" href="classboost_1_1xint_1_1integer.html">boost::xint::integer</a></td><td><code> [static]</code></td></tr>
-</table></div>
-<hr class="footer"/><address style="text-align: right;"><small>Generated on Tue May 4 10:20:17 2010 for The Extended Integer (XInt) Library by&nbsp;
-<a href="http://www.doxygen.org/index.html">
-<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.3 </small></address>
-</body>
-</html>

Deleted: sandbox/xint/doc/classboost_1_1xint_1_1integer.html
==============================================================================
--- sandbox/xint/doc/classboost_1_1xint_1_1integer.html 2010-05-31 20:43:54 EDT (Mon, 31 May 2010)
+++ (empty file)
@@ -1,1027 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
-<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
-<title>The Extended Integer (XInt) Library: boost::xint::integer Class Reference</title>
-<link href="tabs.css" rel="stylesheet" type="text/css"/>
-<link href="doxygen.css" rel="stylesheet" type="text/css"/>
-</head>
-<body>
-<!-- Generated by Doxygen 1.6.3 -->
-<div class="navigation" id="top">
- <div class="tabs">
- <ul>
- <li>Main Page</li>
- <li>Namespaces</li>
- <li class="current">Classes</li>
- <li>Files</li>
- </ul>
- </div>
- <div class="tabs">
- <ul>
- <li>Class List</li>
- <li>Class Hierarchy</li>
- <li>Class Members</li>
- </ul>
- </div>
- <div class="navpath"><a class="el" href="namespaceboost.html">boost</a>::<a class="el" href="namespaceboost_1_1xint.html">xint</a>::<a class="el" href="classboost_1_1xint_1_1integer.html">integer</a>
- </div>
-</div>
-<div class="contents">
-<h1>boost::xint::integer Class Reference</h1><!-- doxytag: class="boost::xint::integer" -->
-<p>The core integer class.
-More...</p>
-
-<p>List of all members.</p>
-<table border="0" cellpadding="0" cellspacing="0">
-<tr><td colspan="2"><h2>Public Types</h2></td></tr>
-<tr><td class="memItemLeft" align="right" valign="top">typedef <a class="el" href="classboost_1_1xint_1_1base__divide__t.html">base_divide_t</a>&lt; <a class="el" href="classboost_1_1xint_1_1integer.html">integer</a> &gt;&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classboost_1_1xint_1_1integer.html#a5c47ab8e93d541e298dcfa3d73845d5a">divide_t</a></td></tr>
-<tr><td colspan="2"><h2>Public Member Functions</h2></td></tr>
-<tr><td colspan="2"><div class="groupHeader">Miscellaneous Functions</div></td></tr>
-<tr><td colspan="2"><div class="groupText"><p><a class="anchor" id="amgrpf5be5219a55995e13d6b8d7bf99ed653"></a> </p>
-</div></td></tr>
-<tr><td class="memItemLeft" align="right" valign="top">bool&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classboost_1_1xint_1_1integer.html#afa36410b307d227f66657ea6f2116bdb">even</a> () const </td></tr>
-<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Tests the lowest bit of <code>*this</code> to determine evenness. <br/></td></tr>
-<tr><td class="memItemLeft" align="right" valign="top">size_t&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classboost_1_1xint_1_1integer.html#af9206e301a190df90fa2e76a30238c6f">hex_digits</a> () const </td></tr>
-<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Tells you roughly how large <code>*this</code> is. <br/></td></tr>
-<tr><td class="memItemLeft" align="right" valign="top">bool&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classboost_1_1xint_1_1integer.html#a5d17a8184d20e7829273f769550954c1">odd</a> () const </td></tr>
-<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Tests the lowest bit of <code>*this</code> to determine oddness. <br/></td></tr>
-<tr><td class="memItemLeft" align="right" valign="top">int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classboost_1_1xint_1_1integer.html#a6821767d0ec6c762a4c1002944550aae">sign</a> (bool signed_zero=false) const </td></tr>
-<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Tests the sign of <code>*this</code>. <br/></td></tr>
-<tr><td colspan="2"><div class="groupHeader">Constructors &amp; Destructors</div></td></tr>
-<tr><td colspan="2"><div class="groupText"><p><a class="anchor" id="amgrpab1e74c734dea693114ec1f1cb9434ad"></a> </p>
-</div></td></tr>
-<tr><td class="memTemplParams" colspan="2">template&lt;typename T &gt; </td></tr>
-<tr><td class="memTemplItemLeft" align="right" valign="top">&nbsp;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="classboost_1_1xint_1_1integer.html#a9941bbf92bcfa48233110c451e676f64">integer</a> (const T &amp;n, typename boost::enable_if&lt; boost::is_integral&lt; T &gt; &gt;::type *=0, typename boost::enable_if&lt; boost::is_unsigned&lt; T &gt; &gt;::type *=0)</td></tr>
-<tr><td class="memTemplParams" colspan="2">template&lt;typename T &gt; </td></tr>
-<tr><td class="memTemplItemLeft" align="right" valign="top">&nbsp;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="classboost_1_1xint_1_1integer.html#acf287891cafa7f5b20f5e56476fa1fc6">integer</a> (const T &amp;n, typename boost::enable_if&lt; boost::is_integral&lt; T &gt; &gt;::type *=0, typename boost::enable_if&lt; boost::is_signed&lt; T &gt; &gt;::type *=0)</td></tr>
-<tr><td class="memItemLeft" align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classboost_1_1xint_1_1integer.html#a179df60f5dc32f98b9f564ec20aff5a8">integer</a> (const std::string &amp;str, size_t base=10)</td></tr>
-<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Create an integer from a string representation. <br/></td></tr>
-<tr><td class="memItemLeft" align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classboost_1_1xint_1_1integer.html#a963c15aab569fc6c93f5c8a42f7b2544">integer</a> (const <a class="el" href="classboost_1_1xint_1_1fixed__integer__any.html">fixed_integer_any</a> &amp;b)</td></tr>
-<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Creates an integer from any <a class="el" href="classboost_1_1xint_1_1fixed__integer.html" title="A fixed-size integer type.">fixed_integer</a> type. <br/></td></tr>
-<tr><td class="memItemLeft" align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classboost_1_1xint_1_1integer.html#acc0aea50091f653fb983373e12fc815e">integer</a> (const <a class="el" href="classboost_1_1xint_1_1nothrow__integer.html">nothrow_integer</a> &amp;b)</td></tr>
-<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Creates an integer from a <a class="el" href="classboost_1_1xint_1_1nothrow__integer.html" title="The nothrow_integer class.">nothrow_integer</a>. <br/></td></tr>
-<tr><td class="memItemLeft" align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classboost_1_1xint_1_1integer.html#a36f03940af78fea1a821a51678a26104">integer</a> (BOOST_XINT_RV_REF(<a class="el" href="classboost_1_1xint_1_1integer.html">integer</a>) b)</td></tr>
-<tr><td class="memItemLeft" align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classboost_1_1xint_1_1integer.html#afc2ddd14b40ab91640d10b134d2b7141">integer</a> (const <a class="el" href="classboost_1_1xint_1_1integer.html">integer</a> &amp;b)</td></tr>
-<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Creates a copy of an existing integer. <br/></td></tr>
-<tr><td class="memItemLeft" align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classboost_1_1xint_1_1integer.html#a33ad2603be1c3ae3823523265f7ee600">integer</a> ()</td></tr>
-<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Creates a new integer with an initial value of zero. <br/></td></tr>
-<tr><td colspan="2"><div class="groupHeader">Mathematical and Bitwise Operators</div></td></tr>
-<tr><td colspan="2"><div class="groupText"><p><a class="anchor" id="amgrp8eb1e0f0af70edd858d54ba68b80ce7e"></a>These operate exactly like their counterparts for the built-in integer types.</p>
-<p>Note that there is no <code>operator~</code>. Since the integer type doesn't have a fixed maximum size, there is no logical way to implement it. </p>
-</div></td></tr>
-<tr><td class="memItemLeft" align="right" valign="top">bool&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classboost_1_1xint_1_1integer.html#aea3d83dfa135c8833620ce96aece1743">operator!</a> () const </td></tr>
-<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="classboost_1_1xint_1_1integer.html">integer</a> &amp;&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classboost_1_1xint_1_1integer.html#a1acfe3b61f26b7168fd103521f6deee9">operator%=</a> (const <a class="el" href="classboost_1_1xint_1_1integer.html">integer</a> &amp;b)</td></tr>
-<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="classboost_1_1xint_1_1integer.html">integer</a> &amp;&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classboost_1_1xint_1_1integer.html#a717edb41c50edbd4b601c38b1fc6a8b0">operator&amp;=</a> (const <a class="el" href="classboost_1_1xint_1_1integer.html">integer</a> &amp;n)</td></tr>
-<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="classboost_1_1xint_1_1integer.html">integer</a> &amp;&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classboost_1_1xint_1_1integer.html#a3452b0a1af51a556bdcb6a3d087b44db">operator*=</a> (const <a class="el" href="classboost_1_1xint_1_1integer.html">integer</a> &amp;b)</td></tr>
-<tr><td class="memItemLeft" align="right" valign="top">const <a class="el" href="classboost_1_1xint_1_1integer.html">integer</a> &amp;&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classboost_1_1xint_1_1integer.html#aa6e1e4356f6eebbd65e84d8717169acb">operator+</a> () const </td></tr>
-<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="classboost_1_1xint_1_1integer.html">integer</a> &amp;&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classboost_1_1xint_1_1integer.html#afe9c68f79efd13d349b532b2077c298f">operator+</a> ()</td></tr>
-<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="classboost_1_1xint_1_1integer.html">integer</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classboost_1_1xint_1_1integer.html#acdb4dc0521b76fbb0e667905fddaaada">operator++</a> (int)</td></tr>
-<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="classboost_1_1xint_1_1integer.html">integer</a> &amp;&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classboost_1_1xint_1_1integer.html#ab15c60f8f28c2f520a26ab19e33c280c">operator++</a> ()</td></tr>
-<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="classboost_1_1xint_1_1integer.html">integer</a> &amp;&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classboost_1_1xint_1_1integer.html#a8ba263f6a5e51c15e3c51241d113c35e">operator+=</a> (const <a class="el" href="classboost_1_1xint_1_1integer.html">integer</a> &amp;b)</td></tr>
-<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="classboost_1_1xint_1_1integer.html">integer</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classboost_1_1xint_1_1integer.html#a974cdabaf176323354cf491820b2d22d">operator-</a> () const </td></tr>
-<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="classboost_1_1xint_1_1integer.html">integer</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classboost_1_1xint_1_1integer.html#a628a1e9614bcb4d0916dd7869877807d">operator--</a> (int)</td></tr>
-<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="classboost_1_1xint_1_1integer.html">integer</a> &amp;&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classboost_1_1xint_1_1integer.html#aa535f200d1d95306aae3d5f991df4e8f">operator--</a> ()</td></tr>
-<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="classboost_1_1xint_1_1integer.html">integer</a> &amp;&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classboost_1_1xint_1_1integer.html#a92f8f3cb4e080c43d889103e7606b7ba">operator-=</a> (const <a class="el" href="classboost_1_1xint_1_1integer.html">integer</a> &amp;b)</td></tr>
-<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="classboost_1_1xint_1_1integer.html">integer</a> &amp;&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classboost_1_1xint_1_1integer.html#a9e630e1f2cf12d29ad01de9c44dc8e3c">operator/=</a> (const <a class="el" href="classboost_1_1xint_1_1integer.html">integer</a> &amp;b)</td></tr>
-<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="classboost_1_1xint_1_1integer.html">integer</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classboost_1_1xint_1_1integer.html#abc90075da0adaef0da2d0083e59af414">operator&lt;&lt;</a> (size_t shift) const </td></tr>
-<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="classboost_1_1xint_1_1integer.html">integer</a> &amp;&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classboost_1_1xint_1_1integer.html#a33f0a1167639a60ac8ad8ef0f3d3f585">operator&lt;&lt;=</a> (size_t shift)</td></tr>
-<tr><td class="memTemplParams" colspan="2">template&lt;typename T &gt; </td></tr>
-<tr><td class="memTemplItemLeft" align="right" valign="top"><a class="el" href="classboost_1_1xint_1_1integer.html">integer</a> &amp;&nbsp;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="classboost_1_1xint_1_1integer.html#acf5998b517a994c38766d28a0d946a21">operator=</a> (const T &amp;n)</td></tr>
-<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="classboost_1_1xint_1_1integer.html">integer</a> &amp;&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classboost_1_1xint_1_1integer.html#a7092b058fd3f2450c5f6d6a0f6ae4a3c">operator=</a> (BOOST_XINT_RV_REF(<a class="el" href="classboost_1_1xint_1_1integer.html">integer</a>) c)</td></tr>
-<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="classboost_1_1xint_1_1integer.html">integer</a> &amp;&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classboost_1_1xint_1_1integer.html#a81ff5a94d6895e1714e992fde407e7fa">operator=</a> (BOOST_XINT_COPY_ASSIGN_REF(<a class="el" href="classboost_1_1xint_1_1integer.html">integer</a>) c)</td></tr>
-<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="classboost_1_1xint_1_1integer.html">integer</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classboost_1_1xint_1_1integer.html#a22af7cfcb28f97f4c8b78939265b46d6">operator&gt;&gt;</a> (size_t shift) const </td></tr>
-<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="classboost_1_1xint_1_1integer.html">integer</a> &amp;&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classboost_1_1xint_1_1integer.html#a0ca39c4cb36160461fb9848cc9e7f2d4">operator&gt;&gt;=</a> (size_t shift)</td></tr>
-<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="classboost_1_1xint_1_1integer.html">integer</a> &amp;&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classboost_1_1xint_1_1integer.html#a40fdf2cd80d53e173aa5129fe02289c3">operator^=</a> (const <a class="el" href="classboost_1_1xint_1_1integer.html">integer</a> &amp;n)</td></tr>
-<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="classboost_1_1xint_1_1integer.html">integer</a> &amp;&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classboost_1_1xint_1_1integer.html#a1fa48e6c6cefec7ae672156d27e79ec6">operator|=</a> (const <a class="el" href="classboost_1_1xint_1_1integer.html">integer</a> &amp;n)</td></tr>
-<tr><td colspan="2"><h2>Static Public Member Functions</h2></td></tr>
-<tr><td colspan="2"><div class="groupHeader">Preconstructed integers</div></td></tr>
-<tr><td colspan="2"><div class="groupText"><p><a class="anchor" id="amgrpbc92fcddffc2f3092779f92fe2501e4a"></a> These return preconstructed integers with the values named by the functions. They are used internally, so that the most common values don't have to be constructed each time they're needed. </p>
-</div></td></tr>
-<tr><td class="memItemLeft" align="right" valign="top">static const <a class="el" href="classboost_1_1xint_1_1integer.html">integer</a> &amp;&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classboost_1_1xint_1_1integer.html#aa332681715634b73118ffe76090a75d3">one</a> ()</td></tr>
-<tr><td class="memItemLeft" align="right" valign="top">static const <a class="el" href="classboost_1_1xint_1_1integer.html">integer</a> &amp;&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classboost_1_1xint_1_1integer.html#a5c08ebe10f3f6333328b35193edd53d0">zero</a> ()</td></tr>
-</table>
-<hr/><a name="_details"></a><h2>Detailed Description</h2>
-<p>The core integer class. </p>
-<p>This class implements the standard <code>integer</code> type.</p>
-<p>There are only a few member functions; most of the functionality is implemented using standalone functions. </p>
-
-<p>Definition at line <a class="el" href="integer_8hpp_source.html#l00033">33</a> of file <a class="el" href="integer_8hpp_source.html">integer.hpp</a>.</p>
-<hr/><h2>Member Typedef Documentation</h2>
-<a class="anchor" id="a5c47ab8e93d541e298dcfa3d73845d5a"></a><!-- doxytag: member="boost::xint::integer::divide_t" ref="a5c47ab8e93d541e298dcfa3d73845d5a" args="" -->
-<div class="memitem">
-<div class="memproto">
- <table class="memname">
- <tr>
- <td class="memname">typedef <a class="el" href="classboost_1_1xint_1_1base__divide__t.html">base_divide_t</a>&lt;<a class="el" href="classboost_1_1xint_1_1integer.html">integer</a>&gt; <a class="el" href="classboost_1_1xint_1_1base__divide__t.html">boost::xint::integer::divide_t</a></td>
- </tr>
- </table>
-</div>
-<div class="memdoc">
-
-<p>Definition at line <a class="el" href="integer_8hpp_source.html#l00110">110</a> of file <a class="el" href="integer_8hpp_source.html">integer.hpp</a>.</p>
-
-</div>
-</div>
-<hr/><h2>Constructor &amp; Destructor Documentation</h2>
-<a class="anchor" id="a33ad2603be1c3ae3823523265f7ee600"></a><!-- doxytag: member="boost::xint::integer::integer" ref="a33ad2603be1c3ae3823523265f7ee600" args="()" -->
-<div class="memitem">
-<div class="memproto">
- <table class="memname">
- <tr>
- <td class="memname">boost::xint::integer::integer </td>
- <td>(</td>
- <td class="paramname"></td>
- <td>&nbsp;)&nbsp;</td>
- <td></td>
- </tr>
- </table>
-</div>
-<div class="memdoc">
-
-<p>Creates a new integer with an initial value of zero. </p>
-
-<p>Definition at line <a class="el" href="integer_8cpp_source.html#l00025">25</a> of file <a class="el" href="integer_8cpp_source.html">integer.cpp</a>.</p>
-
-</div>
-</div>
-<a class="anchor" id="afc2ddd14b40ab91640d10b134d2b7141"></a><!-- doxytag: member="boost::xint::integer::integer" ref="afc2ddd14b40ab91640d10b134d2b7141" args="(const integer &amp;b)" -->
-<div class="memitem">
-<div class="memproto">
- <table class="memname">
- <tr>
- <td class="memname">boost::xint::integer::integer </td>
- <td>(</td>
- <td class="paramtype">const <a class="el" href="classboost_1_1xint_1_1integer.html">integer</a> &amp;&nbsp;</td>
- <td class="paramname"> <em>b</em></td>
- <td>&nbsp;)&nbsp;</td>
- <td></td>
- </tr>
- </table>
-</div>
-<div class="memdoc">
-
-<p>Creates a copy of an existing integer. </p>
-<dl><dt><b>Parameters:</b></dt><dd>
- <table border="0" cellspacing="2" cellpadding="0">
- <tr><td valign="top"><tt>[in]</tt>&nbsp;</td><td valign="top"><em>b</em>&nbsp;</td><td>An existing integer.</td></tr>
- </table>
- </dd>
-</dl>
-<dl class="note"><dt><b>Note:</b></dt><dd>This library can use a <a class="el" href="cow.html">copy-on-write technique</a>, making copying (even of large numbers) a very inexpensive operation.</dd></dl>
-<p>This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. </p>
-
-<p>Definition at line <a class="el" href="integer_8cpp_source.html#l00039">39</a> of file <a class="el" href="integer_8cpp_source.html">integer.cpp</a>.</p>
-
-</div>
-</div>
-<a class="anchor" id="a36f03940af78fea1a821a51678a26104"></a><!-- doxytag: member="boost::xint::integer::integer" ref="a36f03940af78fea1a821a51678a26104" args="(BOOST_XINT_RV_REF(integer) b)" -->
-<div class="memitem">
-<div class="memproto">
- <table class="memname">
- <tr>
- <td class="memname">boost::xint::integer::integer </td>
- <td>(</td>
- <td class="paramtype">BOOST_XINT_RV_REF(<a class="el" href="classboost_1_1xint_1_1integer.html">integer</a>)&nbsp;</td>
- <td class="paramname"> <em>b</em></td>
- <td>&nbsp;)&nbsp;</td>
- <td><code> [inline]</code></td>
- </tr>
- </table>
-</div>
-<div class="memdoc">
-
-<p>Definition at line <a class="el" href="integer_8hpp_source.html#l00040">40</a> of file <a class="el" href="integer_8hpp_source.html">integer.hpp</a>.</p>
-
-</div>
-</div>
-<a class="anchor" id="acc0aea50091f653fb983373e12fc815e"></a><!-- doxytag: member="boost::xint::integer::integer" ref="acc0aea50091f653fb983373e12fc815e" args="(const nothrow_integer &amp;b)" -->
-<div class="memitem">
-<div class="memproto">
- <table class="memname">
- <tr>
- <td class="memname">boost::xint::integer::integer </td>
- <td>(</td>
- <td class="paramtype">const <a class="el" href="classboost_1_1xint_1_1nothrow__integer.html">nothrow_integer</a> &amp;&nbsp;</td>
- <td class="paramname"> <em>b</em></td>
- <td>&nbsp;)&nbsp;</td>
- <td><code> [explicit]</code></td>
- </tr>
- </table>
-</div>
-<div class="memdoc">
-
-<p>Creates an integer from a <a class="el" href="classboost_1_1xint_1_1nothrow__integer.html" title="The nothrow_integer class.">nothrow_integer</a>. </p>
-<dl><dt><b>Parameters:</b></dt><dd>
- <table border="0" cellspacing="2" cellpadding="0">
- <tr><td valign="top"><tt>[in]</tt>&nbsp;</td><td valign="top"><em>b</em>&nbsp;</td><td>An existing <a class="el" href="classboost_1_1xint_1_1nothrow__integer.html" title="The nothrow_integer class.">nothrow_integer</a>.</td></tr>
- </table>
- </dd>
-</dl>
-<dl class="note"><dt><b>Note:</b></dt><dd>This library can use a <a class="el" href="cow.html">copy-on-write technique</a>, making copying (even of large numbers) a very inexpensive operation.</dd></dl>
-<p>This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. </p>
-
-<p>Definition at line <a class="el" href="integer_8cpp_source.html#l00053">53</a> of file <a class="el" href="integer_8cpp_source.html">integer.cpp</a>.</p>
-
-</div>
-</div>
-<a class="anchor" id="a963c15aab569fc6c93f5c8a42f7b2544"></a><!-- doxytag: member="boost::xint::integer::integer" ref="a963c15aab569fc6c93f5c8a42f7b2544" args="(const fixed_integer_any &amp;b)" -->
-<div class="memitem">
-<div class="memproto">
- <table class="memname">
- <tr>
- <td class="memname">boost::xint::integer::integer </td>
- <td>(</td>
- <td class="paramtype">const <a class="el" href="classboost_1_1xint_1_1fixed__integer__any.html">fixed_integer_any</a> &amp;&nbsp;</td>
- <td class="paramname"> <em>b</em></td>
- <td>&nbsp;)&nbsp;</td>
- <td><code> [explicit]</code></td>
- </tr>
- </table>
-</div>
-<div class="memdoc">
-
-<p>Creates an integer from any <a class="el" href="classboost_1_1xint_1_1fixed__integer.html" title="A fixed-size integer type.">fixed_integer</a> type. </p>
-<dl><dt><b>Parameters:</b></dt><dd>
- <table border="0" cellspacing="2" cellpadding="0">
- <tr><td valign="top"><tt>[in]</tt>&nbsp;</td><td valign="top"><em>b</em>&nbsp;</td><td>An existing <a class="el" href="classboost_1_1xint_1_1fixed__integer.html" title="A fixed-size integer type.">fixed_integer</a>.</td></tr>
- </table>
- </dd>
-</dl>
-<p>This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. </p>
-
-<p>Definition at line <a class="el" href="integer_8cpp_source.html#l00064">64</a> of file <a class="el" href="integer_8cpp_source.html">integer.cpp</a>.</p>
-
-</div>
-</div>
-<a class="anchor" id="a179df60f5dc32f98b9f564ec20aff5a8"></a><!-- doxytag: member="boost::xint::integer::integer" ref="a179df60f5dc32f98b9f564ec20aff5a8" args="(const std::string &amp;str, size_t base=10)" -->
-<div class="memitem">
-<div class="memproto">
- <table class="memname">
- <tr>
- <td class="memname">boost::xint::integer::integer </td>
- <td>(</td>
- <td class="paramtype">const std::string &amp;&nbsp;</td>
- <td class="paramname"> <em>str</em>, </td>
- </tr>
- <tr>
- <td class="paramkey"></td>
- <td></td>
- <td class="paramtype">size_t&nbsp;</td>
- <td class="paramname"> <em>base</em> = <code>10</code></td><td>&nbsp;</td>
- </tr>
- <tr>
- <td></td>
- <td>)</td>
- <td></td><td></td><td><code> [explicit]</code></td>
- </tr>
- </table>
-</div>
-<div class="memdoc">
-
-<p>Create an integer from a string representation. </p>
-<ul>
-<li>Complexity: O(n<sup>2</sup>)</li>
-</ul>
-<dl><dt><b>Parameters:</b></dt><dd>
- <table border="0" cellspacing="2" cellpadding="0">
- <tr><td valign="top"><tt>[in]</tt>&nbsp;</td><td valign="top"><em>str</em>&nbsp;</td><td>A string representation of a number. </td></tr>
- <tr><td valign="top"><tt>[in]</tt>&nbsp;</td><td valign="top"><em>base</em>&nbsp;</td><td>The base of the number, or <a class="el" href="namespaceboost_1_1xint.html#a086ec65a0273dccedca0fbfbddb03398">xint::autobase</a>.</td></tr>
- </table>
- </dd>
-</dl>
-<dl><dt><b>Exceptions:</b></dt><dd>
- <table border="0" cellspacing="2" cellpadding="0">
- <tr><td valign="top"></td><td valign="top"><em><a class="el" href="classboost_1_1xint_1_1exceptions_1_1invalid__base.html">exceptions::invalid_base</a></em>&nbsp;</td><td>if the base parameter is not between 2 and 36 (inclusive) or the constant <a class="el" href="namespaceboost_1_1xint.html#a086ec65a0273dccedca0fbfbddb03398">xint::autobase</a>. </td></tr>
- <tr><td valign="top"></td><td valign="top"><em><a class="el" href="classboost_1_1xint_1_1exceptions_1_1invalid__digit.html">exceptions::invalid_digit</a></em>&nbsp;</td><td>if the string contains any digit that cannot be part of a number in the specified base, or if there are no valid digits.</td></tr>
- </table>
- </dd>
-</dl>
-<dl class="remark"><dt><b>Remarks:</b></dt><dd>This will convert a string representation of a number into an integer. See the description of the <a class="el" href="namespaceboost_1_1xint.html#af263105e57d48eff5fe14d4d03ca10e1">from_string</a> function for details on its behavior.</dd></dl>
-<dl class="user"><dt><b></b></dt><dd>This is the most common way to initialize values that are too large to fit into a native integral type.</dd></dl>
-<p>This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. </p>
-
-<p>Definition at line <a class="el" href="integer_8cpp_source.html#l00091">91</a> of file <a class="el" href="integer_8cpp_source.html">integer.cpp</a>.</p>
-
-</div>
-</div>
-<a class="anchor" id="acf287891cafa7f5b20f5e56476fa1fc6"></a><!-- doxytag: member="boost::xint::integer::integer" ref="acf287891cafa7f5b20f5e56476fa1fc6" args="(const T &amp;n, typename boost::enable_if&lt; boost::is_integral&lt; T &gt; &gt;::type *=0, typename boost::enable_if&lt; boost::is_signed&lt; T &gt; &gt;::type *=0)" -->
-<div class="memitem">
-<div class="memproto">
-<div class="memtemplate">
-template&lt;typename T &gt; </div>
- <table class="memname">
- <tr>
- <td class="memname">boost::xint::integer::integer </td>
- <td>(</td>
- <td class="paramtype">const T &amp;&nbsp;</td>
- <td class="paramname"> <em>n</em>, </td>
- </tr>
- <tr>
- <td class="paramkey"></td>
- <td></td>
- <td class="paramtype">typename boost::enable_if&lt; boost::is_integral&lt; T &gt; &gt;::type *&nbsp;</td>
- <td class="paramname"> = <code>0</code>, </td>
- </tr>
- <tr>
- <td class="paramkey"></td>
- <td></td>
- <td class="paramtype">typename boost::enable_if&lt; boost::is_signed&lt; T &gt; &gt;::type *&nbsp;</td>
- <td class="paramname"> = <code>0</code></td><td>&nbsp;</td>
- </tr>
- <tr>
- <td></td>
- <td>)</td>
- <td></td><td></td><td><code> [inline]</code></td>
- </tr>
- </table>
-</div>
-<div class="memdoc">
-<p>Constructs a new integer object with the value of the built-in signed integer passed to it.</p>
-<dl><dt><b>Parameters:</b></dt><dd>
- <table border="0" cellspacing="2" cellpadding="0">
- <tr><td valign="top"><tt>[in]</tt>&nbsp;</td><td valign="top"><em>n</em>&nbsp;</td><td>A number of type <code>T</code>. </td></tr>
- </table>
- </dd>
-</dl>
-<dl><dt><b>Template Parameters:</b></dt><dd>
- <table border="0" cellspacing="2" cellpadding="0">
- <tr><td valign="top"></td><td valign="top"><em>T</em>&nbsp;</td><td>The type of <code>n</code>.</td></tr>
- </table>
- </dd>
-</dl>
-<p>You can ignore the <code>enable_if</code> parameters, they are there only to tell the compiler what types it applies to.</p>
-<p>This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. </p>
-
-<p>Definition at line <a class="el" href="integer_8hpp_source.html#l00234">234</a> of file <a class="el" href="integer_8hpp_source.html">integer.hpp</a>.</p>
-
-</div>
-</div>
-<a class="anchor" id="a9941bbf92bcfa48233110c451e676f64"></a><!-- doxytag: member="boost::xint::integer::integer" ref="a9941bbf92bcfa48233110c451e676f64" args="(const T &amp;n, typename boost::enable_if&lt; boost::is_integral&lt; T &gt; &gt;::type *=0, typename boost::enable_if&lt; boost::is_unsigned&lt; T &gt; &gt;::type *=0)" -->
-<div class="memitem">
-<div class="memproto">
-<div class="memtemplate">
-template&lt;typename T &gt; </div>
- <table class="memname">
- <tr>
- <td class="memname">boost::xint::integer::integer </td>
- <td>(</td>
- <td class="paramtype">const T &amp;&nbsp;</td>
- <td class="paramname"> <em>n</em>, </td>
- </tr>
- <tr>
- <td class="paramkey"></td>
- <td></td>
- <td class="paramtype">typename boost::enable_if&lt; boost::is_integral&lt; T &gt; &gt;::type *&nbsp;</td>
- <td class="paramname"> = <code>0</code>, </td>
- </tr>
- <tr>
- <td class="paramkey"></td>
- <td></td>
- <td class="paramtype">typename boost::enable_if&lt; boost::is_unsigned&lt; T &gt; &gt;::type *&nbsp;</td>
- <td class="paramname"> = <code>0</code></td><td>&nbsp;</td>
- </tr>
- <tr>
- <td></td>
- <td>)</td>
- <td></td><td></td><td><code> [inline]</code></td>
- </tr>
- </table>
-</div>
-<div class="memdoc">
-<p>Constructs a new integer object with the value of the built-in unsigned integer passed to it.</p>
-<dl><dt><b>Parameters:</b></dt><dd>
- <table border="0" cellspacing="2" cellpadding="0">
- <tr><td valign="top"><tt>[in]</tt>&nbsp;</td><td valign="top"><em>n</em>&nbsp;</td><td>A number of type <code>T</code>. </td></tr>
- </table>
- </dd>
-</dl>
-<dl><dt><b>Template Parameters:</b></dt><dd>
- <table border="0" cellspacing="2" cellpadding="0">
- <tr><td valign="top"></td><td valign="top"><em>T</em>&nbsp;</td><td>The type of <code>n</code>.</td></tr>
- </table>
- </dd>
-</dl>
-<p>You can ignore the <code>enable_if</code> parameters, they are there only to tell the compiler what types it applies to.</p>
-<p>This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. </p>
-
-<p>Definition at line <a class="el" href="integer_8hpp_source.html#l00253">253</a> of file <a class="el" href="integer_8hpp_source.html">integer.hpp</a>.</p>
-
-</div>
-</div>
-<hr/><h2>Member Function Documentation</h2>
-<a class="anchor" id="afa36410b307d227f66657ea6f2116bdb"></a><!-- doxytag: member="boost::xint::integer::even" ref="afa36410b307d227f66657ea6f2116bdb" args="() const " -->
-<div class="memitem">
-<div class="memproto">
- <table class="memname">
- <tr>
- <td class="memname">bool boost::xint::integer::even </td>
- <td>(</td>
- <td class="paramname"></td>
- <td>&nbsp;)&nbsp;</td>
- <td> const</td>
- </tr>
- </table>
-</div>
-<div class="memdoc">
-
-<p>Tests the lowest bit of <code>*this</code> to determine evenness. </p>
-<ul>
-<li>Complexity: O(1)</li>
-</ul>
-<dl class="return"><dt><b>Returns:</b></dt><dd><code>true</code> if <code>*this</code> is even, otherwise <code>false</code>. </dd></dl>
-
-<p>Definition at line <a class="el" href="integer_8cpp_source.html#l00111">111</a> of file <a class="el" href="integer_8cpp_source.html">integer.cpp</a>.</p>
-
-</div>
-</div>
-<a class="anchor" id="af9206e301a190df90fa2e76a30238c6f"></a><!-- doxytag: member="boost::xint::integer::hex_digits" ref="af9206e301a190df90fa2e76a30238c6f" args="() const " -->
-<div class="memitem">
-<div class="memproto">
- <table class="memname">
- <tr>
- <td class="memname">size_t boost::xint::integer::hex_digits </td>
- <td>(</td>
- <td class="paramname"></td>
- <td>&nbsp;)&nbsp;</td>
- <td> const</td>
- </tr>
- </table>
-</div>
-<div class="memdoc">
-
-<p>Tells you roughly how large <code>*this</code> is. </p>
-<ul>
-<li>Complexity: O(1)</li>
-</ul>
-<dl class="return"><dt><b>Returns:</b></dt><dd>The number of hexadecimal digits that would be required to encode <code>this</code>. </dd></dl>
-
-<p>Definition at line <a class="el" href="integer_8cpp_source.html#l00138">138</a> of file <a class="el" href="integer_8cpp_source.html">integer.cpp</a>.</p>
-
-</div>
-</div>
-<a class="anchor" id="a5d17a8184d20e7829273f769550954c1"></a><!-- doxytag: member="boost::xint::integer::odd" ref="a5d17a8184d20e7829273f769550954c1" args="() const " -->
-<div class="memitem">
-<div class="memproto">
- <table class="memname">
- <tr>
- <td class="memname">bool boost::xint::integer::odd </td>
- <td>(</td>
- <td class="paramname"></td>
- <td>&nbsp;)&nbsp;</td>
- <td> const</td>
- </tr>
- </table>
-</div>
-<div class="memdoc">
-
-<p>Tests the lowest bit of <code>*this</code> to determine oddness. </p>
-<ul>
-<li>Complexity: O(1)</li>
-</ul>
-<dl class="return"><dt><b>Returns:</b></dt><dd><code>true</code> if <code>*this</code> is odd, otherwise <code>false</code>. </dd></dl>
-
-<p>Definition at line <a class="el" href="integer_8cpp_source.html#l00101">101</a> of file <a class="el" href="integer_8cpp_source.html">integer.cpp</a>.</p>
-
-</div>
-</div>
-<a class="anchor" id="aa332681715634b73118ffe76090a75d3"></a><!-- doxytag: member="boost::xint::integer::one" ref="aa332681715634b73118ffe76090a75d3" args="()" -->
-<div class="memitem">
-<div class="memproto">
- <table class="memname">
- <tr>
- <td class="memname">const <a class="el" href="classboost_1_1xint_1_1integer.html">integer</a> &amp; boost::xint::integer::one </td>
- <td>(</td>
- <td class="paramname"></td>
- <td>&nbsp;)&nbsp;</td>
- <td><code> [static]</code></td>
- </tr>
- </table>
-</div>
-<div class="memdoc">
-
-<p>Definition at line <a class="el" href="integer_8cpp_source.html#l00193">193</a> of file <a class="el" href="integer_8cpp_source.html">integer.cpp</a>.</p>
-
-</div>
-</div>
-<a class="anchor" id="aea3d83dfa135c8833620ce96aece1743"></a><!-- doxytag: member="boost::xint::integer::operator!" ref="aea3d83dfa135c8833620ce96aece1743" args="() const " -->
-<div class="memitem">
-<div class="memproto">
- <table class="memname">
- <tr>
- <td class="memname">bool boost::xint::integer::operator! </td>
- <td>(</td>
- <td class="paramname"></td>
- <td>&nbsp;)&nbsp;</td>
- <td> const<code> [inline]</code></td>
- </tr>
- </table>
-</div>
-<div class="memdoc">
-
-<p>Definition at line <a class="el" href="integer_8hpp_source.html#l00065">65</a> of file <a class="el" href="integer_8hpp_source.html">integer.hpp</a>.</p>
-
-</div>
-</div>
-<a class="anchor" id="a1acfe3b61f26b7168fd103521f6deee9"></a><!-- doxytag: member="boost::xint::integer::operator%=" ref="a1acfe3b61f26b7168fd103521f6deee9" args="(const integer &amp;b)" -->
-<div class="memitem">
-<div class="memproto">
- <table class="memname">
- <tr>
- <td class="memname"><a class="el" href="classboost_1_1xint_1_1integer.html">integer</a> &amp; boost::xint::integer::operator%= </td>
- <td>(</td>
- <td class="paramtype">const <a class="el" href="classboost_1_1xint_1_1integer.html">integer</a> &amp;&nbsp;</td>
- <td class="paramname"> <em>b</em></td>
- <td>&nbsp;)&nbsp;</td>
- <td></td>
- </tr>
- </table>
-</div>
-<div class="memdoc">
-
-<p>Definition at line <a class="el" href="integer_8cpp_source.html#l00162">162</a> of file <a class="el" href="integer_8cpp_source.html">integer.cpp</a>.</p>
-
-</div>
-</div>
-<a class="anchor" id="a717edb41c50edbd4b601c38b1fc6a8b0"></a><!-- doxytag: member="boost::xint::integer::operator&amp;=" ref="a717edb41c50edbd4b601c38b1fc6a8b0" args="(const integer &amp;n)" -->
-<div class="memitem">
-<div class="memproto">
- <table class="memname">
- <tr>
- <td class="memname"><a class="el" href="classboost_1_1xint_1_1integer.html">integer</a> &amp; boost::xint::integer::operator&amp;= </td>
- <td>(</td>
- <td class="paramtype">const <a class="el" href="classboost_1_1xint_1_1integer.html">integer</a> &amp;&nbsp;</td>
- <td class="paramname"> <em>n</em></td>
- <td>&nbsp;)&nbsp;</td>
- <td></td>
- </tr>
- </table>
-</div>
-<div class="memdoc">
-
-<p>Definition at line <a class="el" href="integer_8cpp_source.html#l00171">171</a> of file <a class="el" href="integer_8cpp_source.html">integer.cpp</a>.</p>
-
-</div>
-</div>
-<a class="anchor" id="a3452b0a1af51a556bdcb6a3d087b44db"></a><!-- doxytag: member="boost::xint::integer::operator*=" ref="a3452b0a1af51a556bdcb6a3d087b44db" args="(const integer &amp;b)" -->
-<div class="memitem">
-<div class="memproto">
- <table class="memname">
- <tr>
- <td class="memname"><a class="el" href="classboost_1_1xint_1_1integer.html">integer</a> &amp; boost::xint::integer::operator*= </td>
- <td>(</td>
- <td class="paramtype">const <a class="el" href="classboost_1_1xint_1_1integer.html">integer</a> &amp;&nbsp;</td>
- <td class="paramname"> <em>b</em></td>
- <td>&nbsp;)&nbsp;</td>
- <td></td>
- </tr>
- </table>
-</div>
-<div class="memdoc">
-
-<p>Definition at line <a class="el" href="integer_8cpp_source.html#l00160">160</a> of file <a class="el" href="integer_8cpp_source.html">integer.cpp</a>.</p>
-
-</div>
-</div>
-<a class="anchor" id="aa6e1e4356f6eebbd65e84d8717169acb"></a><!-- doxytag: member="boost::xint::integer::operator+" ref="aa6e1e4356f6eebbd65e84d8717169acb" args="() const " -->
-<div class="memitem">
-<div class="memproto">
- <table class="memname">
- <tr>
- <td class="memname">const <a class="el" href="classboost_1_1xint_1_1integer.html">integer</a>&amp; boost::xint::integer::operator+ </td>
- <td>(</td>
- <td class="paramname"></td>
- <td>&nbsp;)&nbsp;</td>
- <td> const<code> [inline]</code></td>
- </tr>
- </table>
-</div>
-<div class="memdoc">
-
-<p>Definition at line <a class="el" href="integer_8hpp_source.html#l00068">68</a> of file <a class="el" href="integer_8hpp_source.html">integer.hpp</a>.</p>
-
-</div>
-</div>
-<a class="anchor" id="afe9c68f79efd13d349b532b2077c298f"></a><!-- doxytag: member="boost::xint::integer::operator+" ref="afe9c68f79efd13d349b532b2077c298f" args="()" -->
-<div class="memitem">
-<div class="memproto">
- <table class="memname">
- <tr>
- <td class="memname"><a class="el" href="classboost_1_1xint_1_1integer.html">integer</a>&amp; boost::xint::integer::operator+ </td>
- <td>(</td>
- <td class="paramname"></td>
- <td>&nbsp;)&nbsp;</td>
- <td><code> [inline]</code></td>
- </tr>
- </table>
-</div>
-<div class="memdoc">
-
-<p>Definition at line <a class="el" href="integer_8hpp_source.html#l00067">67</a> of file <a class="el" href="integer_8hpp_source.html">integer.hpp</a>.</p>
-
-</div>
-</div>
-<a class="anchor" id="acdb4dc0521b76fbb0e667905fddaaada"></a><!-- doxytag: member="boost::xint::integer::operator++" ref="acdb4dc0521b76fbb0e667905fddaaada" args="(int)" -->
-<div class="memitem">
-<div class="memproto">
- <table class="memname">
- <tr>
- <td class="memname"><a class="el" href="classboost_1_1xint_1_1integer.html">integer</a> boost::xint::integer::operator++ </td>
- <td>(</td>
- <td class="paramtype">int&nbsp;</td>
- <td class="paramname"></td>
- <td>&nbsp;)&nbsp;</td>
- <td></td>
- </tr>
- </table>
-</div>
-<div class="memdoc">
-<p>Postincrement operator -- not recommended, inefficient </p>
-
-<p>Definition at line <a class="el" href="integer_8cpp_source.html#l00166">166</a> of file <a class="el" href="integer_8cpp_source.html">integer.cpp</a>.</p>
-
-</div>
-</div>
-<a class="anchor" id="ab15c60f8f28c2f520a26ab19e33c280c"></a><!-- doxytag: member="boost::xint::integer::operator++" ref="ab15c60f8f28c2f520a26ab19e33c280c" args="()" -->
-<div class="memitem">
-<div class="memproto">
- <table class="memname">
- <tr>
- <td class="memname"><a class="el" href="classboost_1_1xint_1_1integer.html">integer</a> &amp; boost::xint::integer::operator++ </td>
- <td>(</td>
- <td class="paramname"></td>
- <td>&nbsp;)&nbsp;</td>
- <td></td>
- </tr>
- </table>
-</div>
-<div class="memdoc">
-<p>Preincrement operator </p>
-
-<p>Definition at line <a class="el" href="integer_8cpp_source.html#l00164">164</a> of file <a class="el" href="integer_8cpp_source.html">integer.cpp</a>.</p>
-
-</div>
-</div>
-<a class="anchor" id="a8ba263f6a5e51c15e3c51241d113c35e"></a><!-- doxytag: member="boost::xint::integer::operator+=" ref="a8ba263f6a5e51c15e3c51241d113c35e" args="(const integer &amp;b)" -->
-<div class="memitem">
-<div class="memproto">
- <table class="memname">
- <tr>
- <td class="memname"><a class="el" href="classboost_1_1xint_1_1integer.html">integer</a> &amp; boost::xint::integer::operator+= </td>
- <td>(</td>
- <td class="paramtype">const <a class="el" href="classboost_1_1xint_1_1integer.html">integer</a> &amp;&nbsp;</td>
- <td class="paramname"> <em>b</em></td>
- <td>&nbsp;)&nbsp;</td>
- <td></td>
- </tr>
- </table>
-</div>
-<div class="memdoc">
-
-<p>Definition at line <a class="el" href="integer_8cpp_source.html#l00143">143</a> of file <a class="el" href="integer_8cpp_source.html">integer.cpp</a>.</p>
-
-</div>
-</div>
-<a class="anchor" id="a974cdabaf176323354cf491820b2d22d"></a><!-- doxytag: member="boost::xint::integer::operator&#45;" ref="a974cdabaf176323354cf491820b2d22d" args="() const " -->
-<div class="memitem">
-<div class="memproto">
- <table class="memname">
- <tr>
- <td class="memname"><a class="el" href="classboost_1_1xint_1_1integer.html">integer</a> boost::xint::integer::operator- </td>
- <td>(</td>
- <td class="paramname"></td>
- <td>&nbsp;)&nbsp;</td>
- <td> const</td>
- </tr>
- </table>
-</div>
-<div class="memdoc">
-
-<p>Definition at line <a class="el" href="integer_8cpp_source.html#l00158">158</a> of file <a class="el" href="integer_8cpp_source.html">integer.cpp</a>.</p>
-
-</div>
-</div>
-<a class="anchor" id="a628a1e9614bcb4d0916dd7869877807d"></a><!-- doxytag: member="boost::xint::integer::operator&#45;&#45;" ref="a628a1e9614bcb4d0916dd7869877807d" args="(int)" -->
-<div class="memitem">
-<div class="memproto">
- <table class="memname">
- <tr>
- <td class="memname"><a class="el" href="classboost_1_1xint_1_1integer.html">integer</a> boost::xint::integer::operator-- </td>
- <td>(</td>
- <td class="paramtype">int&nbsp;</td>
- <td class="paramname"></td>
- <td>&nbsp;)&nbsp;</td>
- <td></td>
- </tr>
- </table>
-</div>
-<div class="memdoc">
-<p>Postdecrement operator -- not recommended, inefficient </p>
-
-<p>Definition at line <a class="el" href="integer_8cpp_source.html#l00167">167</a> of file <a class="el" href="integer_8cpp_source.html">integer.cpp</a>.</p>
-
-</div>
-</div>
-<a class="anchor" id="aa535f200d1d95306aae3d5f991df4e8f"></a><!-- doxytag: member="boost::xint::integer::operator&#45;&#45;" ref="aa535f200d1d95306aae3d5f991df4e8f" args="()" -->
-<div class="memitem">
-<div class="memproto">
- <table class="memname">
- <tr>
- <td class="memname"><a class="el" href="classboost_1_1xint_1_1integer.html">integer</a> &amp; boost::xint::integer::operator-- </td>
- <td>(</td>
- <td class="paramname"></td>
- <td>&nbsp;)&nbsp;</td>
- <td></td>
- </tr>
- </table>
-</div>
-<div class="memdoc">
-<p>Predecrement operator </p>
-
-<p>Definition at line <a class="el" href="integer_8cpp_source.html#l00165">165</a> of file <a class="el" href="integer_8cpp_source.html">integer.cpp</a>.</p>
-
-</div>
-</div>
-<a class="anchor" id="a92f8f3cb4e080c43d889103e7606b7ba"></a><!-- doxytag: member="boost::xint::integer::operator&#45;=" ref="a92f8f3cb4e080c43d889103e7606b7ba" args="(const integer &amp;b)" -->
-<div class="memitem">
-<div class="memproto">
- <table class="memname">
- <tr>
- <td class="memname"><a class="el" href="classboost_1_1xint_1_1integer.html">integer</a> &amp; boost::xint::integer::operator-= </td>
- <td>(</td>
- <td class="paramtype">const <a class="el" href="classboost_1_1xint_1_1integer.html">integer</a> &amp;&nbsp;</td>
- <td class="paramname"> <em>b</em></td>
- <td>&nbsp;)&nbsp;</td>
- <td></td>
- </tr>
- </table>
-</div>
-<div class="memdoc">
-
-<p>Definition at line <a class="el" href="integer_8cpp_source.html#l00148">148</a> of file <a class="el" href="integer_8cpp_source.html">integer.cpp</a>.</p>
-
-</div>
-</div>
-<a class="anchor" id="a9e630e1f2cf12d29ad01de9c44dc8e3c"></a><!-- doxytag: member="boost::xint::integer::operator/=" ref="a9e630e1f2cf12d29ad01de9c44dc8e3c" args="(const integer &amp;b)" -->
-<div class="memitem">
-<div class="memproto">
- <table class="memname">
- <tr>
- <td class="memname"><a class="el" href="classboost_1_1xint_1_1integer.html">integer</a> &amp; boost::xint::integer::operator/= </td>
- <td>(</td>
- <td class="paramtype">const <a class="el" href="classboost_1_1xint_1_1integer.html">integer</a> &amp;&nbsp;</td>
- <td class="paramname"> <em>b</em></td>
- <td>&nbsp;)&nbsp;</td>
- <td></td>
- </tr>
- </table>
-</div>
-<div class="memdoc">
-
-<p>Definition at line <a class="el" href="integer_8cpp_source.html#l00161">161</a> of file <a class="el" href="integer_8cpp_source.html">integer.cpp</a>.</p>
-
-</div>
-</div>
-<a class="anchor" id="abc90075da0adaef0da2d0083e59af414"></a><!-- doxytag: member="boost::xint::integer::operator&lt;&lt;" ref="abc90075da0adaef0da2d0083e59af414" args="(size_t shift) const " -->
-<div class="memitem">
-<div class="memproto">
- <table class="memname">
- <tr>
- <td class="memname"><a class="el" href="classboost_1_1xint_1_1integer.html">integer</a> boost::xint::integer::operator&lt;&lt; </td>
- <td>(</td>
- <td class="paramtype">size_t&nbsp;</td>
- <td class="paramname"> <em>shift</em></td>
- <td>&nbsp;)&nbsp;</td>
- <td> const</td>
- </tr>
- </table>
-</div>
-<div class="memdoc">
-
-<p>Definition at line <a class="el" href="integer_8cpp_source.html#l00169">169</a> of file <a class="el" href="integer_8cpp_source.html">integer.cpp</a>.</p>
-
-</div>
-</div>
-<a class="anchor" id="a33f0a1167639a60ac8ad8ef0f3d3f585"></a><!-- doxytag: member="boost::xint::integer::operator&lt;&lt;=" ref="a33f0a1167639a60ac8ad8ef0f3d3f585" args="(size_t shift)" -->
-<div class="memitem">
-<div class="memproto">
- <table class="memname">
- <tr>
- <td class="memname"><a class="el" href="classboost_1_1xint_1_1integer.html">integer</a> &amp; boost::xint::integer::operator&lt;&lt;= </td>
- <td>(</td>
- <td class="paramtype">size_t&nbsp;</td>
- <td class="paramname"> <em>shift</em></td>
- <td>&nbsp;)&nbsp;</td>
- <td></td>
- </tr>
- </table>
-</div>
-<div class="memdoc">
-
-<p>Definition at line <a class="el" href="integer_8cpp_source.html#l00175">175</a> of file <a class="el" href="integer_8cpp_source.html">integer.cpp</a>.</p>
-
-</div>
-</div>
-<a class="anchor" id="acf5998b517a994c38766d28a0d946a21"></a><!-- doxytag: member="boost::xint::integer::operator=" ref="acf5998b517a994c38766d28a0d946a21" args="(const T &amp;n)" -->
-<div class="memitem">
-<div class="memproto">
-<div class="memtemplate">
-template&lt;typename T &gt; </div>
- <table class="memname">
- <tr>
- <td class="memname"><a class="el" href="classboost_1_1xint_1_1integer.html">integer</a>&amp; boost::xint::integer::operator= </td>
- <td>(</td>
- <td class="paramtype">const T &amp;&nbsp;</td>
- <td class="paramname"> <em>n</em></td>
- <td>&nbsp;)&nbsp;</td>
- <td><code> [inline]</code></td>
- </tr>
- </table>
-</div>
-<div class="memdoc">
-
-<p>Definition at line <a class="el" href="integer_8hpp_source.html#l00062">62</a> of file <a class="el" href="integer_8hpp_source.html">integer.hpp</a>.</p>
-
-</div>
-</div>
-<a class="anchor" id="a7092b058fd3f2450c5f6d6a0f6ae4a3c"></a><!-- doxytag: member="boost::xint::integer::operator=" ref="a7092b058fd3f2450c5f6d6a0f6ae4a3c" args="(BOOST_XINT_RV_REF(integer) c)" -->
-<div class="memitem">
-<div class="memproto">
- <table class="memname">
- <tr>
- <td class="memname"><a class="el" href="classboost_1_1xint_1_1integer.html">integer</a>&amp; boost::xint::integer::operator= </td>
- <td>(</td>
- <td class="paramtype">BOOST_XINT_RV_REF(<a class="el" href="classboost_1_1xint_1_1integer.html">integer</a>)&nbsp;</td>
- <td class="paramname"> <em>c</em></td>
- <td>&nbsp;)&nbsp;</td>
- <td><code> [inline]</code></td>
- </tr>
- </table>
-</div>
-<div class="memdoc">
-
-<p>Definition at line <a class="el" href="integer_8hpp_source.html#l00061">61</a> of file <a class="el" href="integer_8hpp_source.html">integer.hpp</a>.</p>
-
-</div>
-</div>
-<a class="anchor" id="a81ff5a94d6895e1714e992fde407e7fa"></a><!-- doxytag: member="boost::xint::integer::operator=" ref="a81ff5a94d6895e1714e992fde407e7fa" args="(BOOST_XINT_COPY_ASSIGN_REF(integer) c)" -->
-<div class="memitem">
-<div class="memproto">
- <table class="memname">
- <tr>
- <td class="memname"><a class="el" href="classboost_1_1xint_1_1integer.html">integer</a> &amp; boost::xint::integer::operator= </td>
- <td>(</td>
- <td class="paramtype">BOOST_XINT_COPY_ASSIGN_REF(<a class="el" href="classboost_1_1xint_1_1integer.html">integer</a>)&nbsp;</td>
- <td class="paramname"> <em>c</em></td>
- <td>&nbsp;)&nbsp;</td>
- <td></td>
- </tr>
- </table>
-</div>
-<div class="memdoc">
-
-<p>Definition at line <a class="el" href="integer_8cpp_source.html#l00153">153</a> of file <a class="el" href="integer_8cpp_source.html">integer.cpp</a>.</p>
-
-</div>
-</div>
-<a class="anchor" id="a22af7cfcb28f97f4c8b78939265b46d6"></a><!-- doxytag: member="boost::xint::integer::operator&gt;&gt;" ref="a22af7cfcb28f97f4c8b78939265b46d6" args="(size_t shift) const " -->
-<div class="memitem">
-<div class="memproto">
- <table class="memname">
- <tr>
- <td class="memname"><a class="el" href="classboost_1_1xint_1_1integer.html">integer</a> boost::xint::integer::operator&gt;&gt; </td>
- <td>(</td>
- <td class="paramtype">size_t&nbsp;</td>
- <td class="paramname"> <em>shift</em></td>
- <td>&nbsp;)&nbsp;</td>
- <td> const</td>
- </tr>
- </table>
-</div>
-<div class="memdoc">
-
-<p>Definition at line <a class="el" href="integer_8cpp_source.html#l00170">170</a> of file <a class="el" href="integer_8cpp_source.html">integer.cpp</a>.</p>
-
-</div>
-</div>
-<a class="anchor" id="a0ca39c4cb36160461fb9848cc9e7f2d4"></a><!-- doxytag: member="boost::xint::integer::operator&gt;&gt;=" ref="a0ca39c4cb36160461fb9848cc9e7f2d4" args="(size_t shift)" -->
-<div class="memitem">
-<div class="memproto">
- <table class="memname">
- <tr>
- <td class="memname"><a class="el" href="classboost_1_1xint_1_1integer.html">integer</a> &amp; boost::xint::integer::operator&gt;&gt;= </td>
- <td>(</td>
- <td class="paramtype">size_t&nbsp;</td>
- <td class="paramname"> <em>shift</em></td>
- <td>&nbsp;)&nbsp;</td>
- <td></td>
- </tr>
- </table>
-</div>
-<div class="memdoc">
-
-<p>Definition at line <a class="el" href="integer_8cpp_source.html#l00180">180</a> of file <a class="el" href="integer_8cpp_source.html">integer.cpp</a>.</p>
-
-</div>
-</div>
-<a class="anchor" id="a40fdf2cd80d53e173aa5129fe02289c3"></a><!-- doxytag: member="boost::xint::integer::operator^=" ref="a40fdf2cd80d53e173aa5129fe02289c3" args="(const integer &amp;n)" -->
-<div class="memitem">
-<div class="memproto">
- <table class="memname">
- <tr>
- <td class="memname"><a class="el" href="classboost_1_1xint_1_1integer.html">integer</a> &amp; boost::xint::integer::operator^= </td>
- <td>(</td>
- <td class="paramtype">const <a class="el" href="classboost_1_1xint_1_1integer.html">integer</a> &amp;&nbsp;</td>
- <td class="paramname"> <em>n</em></td>
- <td>&nbsp;)&nbsp;</td>
- <td></td>
- </tr>
- </table>
-</div>
-<div class="memdoc">
-
-<p>Definition at line <a class="el" href="integer_8cpp_source.html#l00173">173</a> of file <a class="el" href="integer_8cpp_source.html">integer.cpp</a>.</p>
-
-</div>
-</div>
-<a class="anchor" id="a1fa48e6c6cefec7ae672156d27e79ec6"></a><!-- doxytag: member="boost::xint::integer::operator|=" ref="a1fa48e6c6cefec7ae672156d27e79ec6" args="(const integer &amp;n)" -->
-<div class="memitem">
-<div class="memproto">
- <table class="memname">
- <tr>
- <td class="memname"><a class="el" href="classboost_1_1xint_1_1integer.html">integer</a> &amp; boost::xint::integer::operator|= </td>
- <td>(</td>
- <td class="paramtype">const <a class="el" href="classboost_1_1xint_1_1integer.html">integer</a> &amp;&nbsp;</td>
- <td class="paramname"> <em>n</em></td>
- <td>&nbsp;)&nbsp;</td>
- <td></td>
- </tr>
- </table>
-</div>
-<div class="memdoc">
-
-<p>Definition at line <a class="el" href="integer_8cpp_source.html#l00172">172</a> of file <a class="el" href="integer_8cpp_source.html">integer.cpp</a>.</p>
-
-</div>
-</div>
-<a class="anchor" id="a6821767d0ec6c762a4c1002944550aae"></a><!-- doxytag: member="boost::xint::integer::sign" ref="a6821767d0ec6c762a4c1002944550aae" args="(bool signed_zero=false) const " -->
-<div class="memitem">
-<div class="memproto">
- <table class="memname">
- <tr>
- <td class="memname">int boost::xint::integer::sign </td>
- <td>(</td>
- <td class="paramtype">bool&nbsp;</td>
- <td class="paramname"> <em>signed_zero</em> = <code>false</code></td>
- <td>&nbsp;)&nbsp;</td>
- <td> const</td>
- </tr>
- </table>
-</div>
-<div class="memdoc">
-
-<p>Tests the sign of <code>*this</code>. </p>
-<ul>
-<li>Complexity: O(1)</li>
-</ul>
-<dl><dt><b>Parameters:</b></dt><dd>
- <table border="0" cellspacing="2" cellpadding="0">
- <tr><td valign="top"><tt>[in]</tt>&nbsp;</td><td valign="top"><em>signed_zero</em>&nbsp;</td><td>If <code>false</code> (the default value), returns zero if <code>*this</code> is zero. If <code>true</code>, returns 1 or -1 on a zero <code>*this</code> as well. Primarily used to identify a <a class="el" href="zero.html">negative zero</a>.</td></tr>
- </table>
- </dd>
-</dl>
-<dl class="return"><dt><b>Returns:</b></dt><dd>-1 if <code>*this</code> is negative, 0 if it's zero, or 1 if it's greater than zero. </dd></dl>
-
-<p>Definition at line <a class="el" href="integer_8cpp_source.html#l00126">126</a> of file <a class="el" href="integer_8cpp_source.html">integer.cpp</a>.</p>
-
-</div>
-</div>
-<a class="anchor" id="a5c08ebe10f3f6333328b35193edd53d0"></a><!-- doxytag: member="boost::xint::integer::zero" ref="a5c08ebe10f3f6333328b35193edd53d0" args="()" -->
-<div class="memitem">
-<div class="memproto">
- <table class="memname">
- <tr>
- <td class="memname">const <a class="el" href="classboost_1_1xint_1_1integer.html">integer</a> &amp; boost::xint::integer::zero </td>
- <td>(</td>
- <td class="paramname"></td>
- <td>&nbsp;)&nbsp;</td>
- <td><code> [static]</code></td>
- </tr>
- </table>
-</div>
-<div class="memdoc">
-
-<p>Definition at line <a class="el" href="integer_8cpp_source.html#l00185">185</a> of file <a class="el" href="integer_8cpp_source.html">integer.cpp</a>.</p>
-
-</div>
-</div>
-<hr/>The documentation for this class was generated from the following files:<ul>
-<li><a class="el" href="integer_8hpp_source.html">integer.hpp</a></li>
-<li><a class="el" href="integer_8cpp_source.html">integer.cpp</a></li>
-</ul>
-</div>
-<hr class="footer"/><address style="text-align: right;"><small>Generated on Tue May 4 10:20:17 2010 for The Extended Integer (XInt) Library by&nbsp;
-<a href="http://www.doxygen.org/index.html">
-<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.3 </small></address>
-</body>
-</html>

Deleted: sandbox/xint/doc/classboost_1_1xint_1_1nothrow__integer-members.html
==============================================================================
--- sandbox/xint/doc/classboost_1_1xint_1_1nothrow__integer-members.html 2010-05-31 20:43:54 EDT (Mon, 31 May 2010)
+++ (empty file)
@@ -1,76 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
-<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
-<title>The Extended Integer (XInt) Library: Member List</title>
-<link href="tabs.css" rel="stylesheet" type="text/css"/>
-<link href="doxygen.css" rel="stylesheet" type="text/css"/>
-</head>
-<body>
-<!-- Generated by Doxygen 1.6.3 -->
-<div class="navigation" id="top">
- <div class="tabs">
- <ul>
- <li>Main Page</li>
- <li>Namespaces</li>
- <li class="current">Classes</li>
- <li>Files</li>
- </ul>
- </div>
- <div class="tabs">
- <ul>
- <li>Class List</li>
- <li>Class Hierarchy</li>
- <li>Class Members</li>
- </ul>
- </div>
-</div>
-<div class="contents">
-<h1>boost::xint::nothrow_integer Member List</h1>This is the complete list of members for <a class="el" href="classboost_1_1xint_1_1nothrow__integer.html">boost::xint::nothrow_integer</a>, including all inherited members.<table>
- <tr class="memlist"><td><a class="el" href="classboost_1_1xint_1_1nothrow__integer.html#aae36cdd1ec2d4d51116ae52ce2863803">_make_unique</a>(bool)</td><td><a class="el" href="classboost_1_1xint_1_1nothrow__integer.html">boost::xint::nothrow_integer</a></td><td></td></tr>
- <tr class="memlist"><td><a class="el" href="classboost_1_1xint_1_1nothrow__integer.html#a65b4d583927453701d33aa35d727132a">divide_t</a> typedef</td><td><a class="el" href="classboost_1_1xint_1_1nothrow__integer.html">boost::xint::nothrow_integer</a></td><td></td></tr>
- <tr class="memlist"><td><a class="el" href="classboost_1_1xint_1_1nothrow__integer.html#a405c535527d1ff631c7338a6d329c51d">even</a>() const </td><td><a class="el" href="classboost_1_1xint_1_1nothrow__integer.html">boost::xint::nothrow_integer</a></td><td></td></tr>
- <tr class="memlist"><td><a class="el" href="classboost_1_1xint_1_1nothrow__integer.html#a06f1a0177446777e4e84dc0fc91d65b2">hex_digits</a>() const </