Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r61096 - in sandbox/xint: . boost/xint doc doc/dox example src test
From: chad.thecomfychair_at_[hidden]
Date: 2010-04-06 01:40:52


Author: chadnelson
Date: 2010-04-06 01:40:33 EDT (Tue, 06 Apr 2010)
New Revision: 61096
URL: http://svn.boost.org/trac/boost/changeset/61096

Log:
Finally finished complete Doxygen documentation.
Added:
   sandbox/xint/doc/acknowledgements.html (contents, props changed)
   sandbox/xint/doc/acknowledgements_8dox.html (contents, props changed)
   sandbox/xint/doc/annotated.html (contents, props changed)
   sandbox/xint/doc/bit__manipulations_8cpp.html (contents, props changed)
   sandbox/xint/doc/bit__manipulations_8cpp_source.html (contents, props changed)
   sandbox/xint/doc/classes.html (contents, props changed)
   sandbox/xint/doc/classxint_1_1cannot__represent-members.html (contents, props changed)
   sandbox/xint/doc/classxint_1_1cannot__represent.html (contents, props changed)
   sandbox/xint/doc/classxint_1_1divide__by__zero-members.html (contents, props changed)
   sandbox/xint/doc/classxint_1_1divide__by__zero.html (contents, props changed)
   sandbox/xint/doc/classxint_1_1integer-members.html (contents, props changed)
   sandbox/xint/doc/classxint_1_1integer.html (contents, props changed)
   sandbox/xint/doc/classxint_1_1invalid__base-members.html (contents, props changed)
   sandbox/xint/doc/classxint_1_1invalid__base.html (contents, props changed)
   sandbox/xint/doc/classxint_1_1invalid__digit-members.html (contents, props changed)
   sandbox/xint/doc/classxint_1_1invalid__digit.html (contents, props changed)
   sandbox/xint/doc/classxint_1_1invalid__modulus-members.html (contents, props changed)
   sandbox/xint/doc/classxint_1_1invalid__modulus.html (contents, props changed)
   sandbox/xint/doc/classxint_1_1no__strong__random-members.html (contents, props changed)
   sandbox/xint/doc/classxint_1_1no__strong__random.html (contents, props changed)
   sandbox/xint/doc/classxint_1_1not__a__number-members.html (contents, props changed)
   sandbox/xint/doc/classxint_1_1not__a__number.html (contents, props changed)
   sandbox/xint/doc/classxint_1_1overflow__error-members.html (contents, props changed)
   sandbox/xint/doc/classxint_1_1overflow__error.html (contents, props changed)
   sandbox/xint/doc/classxint_1_1strong__random__generator-members.html (contents, props changed)
   sandbox/xint/doc/classxint_1_1strong__random__generator.html (contents, props changed)
   sandbox/xint/doc/classxint_1_1too__big-members.html (contents, props changed)
   sandbox/xint/doc/classxint_1_1too__big.html (contents, props changed)
   sandbox/xint/doc/compare_8cpp.html (contents, props changed)
   sandbox/xint/doc/compare_8cpp_source.html (contents, props changed)
   sandbox/xint/doc/convert_8cpp.html (contents, props changed)
   sandbox/xint/doc/convert_8cpp_source.html (contents, props changed)
   sandbox/xint/doc/copyonwrite_8dox.html (contents, props changed)
   sandbox/xint/doc/cow.html (contents, props changed)
   sandbox/xint/doc/data__t_8cpp.html (contents, props changed)
   sandbox/xint/doc/data__t_8cpp_source.html (contents, props changed)
   sandbox/xint/doc/dependencies.html (contents, props changed)
   sandbox/xint/doc/dependencies_8dox.html (contents, props changed)
   sandbox/xint/doc/dox/
   sandbox/xint/doc/dox/Doxyfile (contents, props changed)
   sandbox/xint/doc/dox/acknowledgements.dox (contents, props changed)
   sandbox/xint/doc/dox/copyonwrite.dox (contents, props changed)
   sandbox/xint/doc/dox/dependencies.dox (contents, props changed)
   sandbox/xint/doc/dox/ex_fibonacci.dox (contents, props changed)
   sandbox/xint/doc/dox/exceptions.dox (contents, props changed)
   sandbox/xint/doc/dox/history.dox (contents, props changed)
   sandbox/xint/doc/dox/index.dox (contents, props changed)
   sandbox/xint/doc/dox/nan.dox (contents, props changed)
   sandbox/xint/doc/dox/primes.dox (contents, props changed)
   sandbox/xint/doc/dox/r_cow.dox (contents, props changed)
   sandbox/xint/doc/dox/r_default_necessary.dox (contents, props changed)
   sandbox/xint/doc/dox/r_insecure_default.dox (contents, props changed)
   sandbox/xint/doc/dox/r_interface.dox (contents, props changed)
   sandbox/xint/doc/dox/r_interface_design_only.dox (contents, props changed)
   sandbox/xint/doc/dox/r_nan.dox (contents, props changed)
   sandbox/xint/doc/dox/r_negzero.dox (contents, props changed)
   sandbox/xint/doc/dox/r_random.dox (contents, props changed)
   sandbox/xint/doc/dox/r_shared_ptr.dox (contents, props changed)
   sandbox/xint/doc/dox/random.dox (contents, props changed)
   sandbox/xint/doc/dox/rationale.dox (contents, props changed)
   sandbox/xint/doc/dox/securemode.dox (contents, props changed)
   sandbox/xint/doc/dox/testing.dox (contents, props changed)
   sandbox/xint/doc/dox/threadsafe.dox (contents, props changed)
   sandbox/xint/doc/doxygen.css (contents, props changed)
   sandbox/xint/doc/doxygen.png (contents, props changed)
   sandbox/xint/doc/ex__fibonacci_8dox.html (contents, props changed)
   sandbox/xint/doc/ex_fibonacci.html (contents, props changed)
   sandbox/xint/doc/exception__blocker_8cpp.html (contents, props changed)
   sandbox/xint/doc/exception__blocker_8cpp_source.html (contents, props changed)
   sandbox/xint/doc/exceptions.html (contents, props changed)
   sandbox/xint/doc/exceptions_8dox.html (contents, props changed)
   sandbox/xint/doc/files.html (contents, props changed)
   sandbox/xint/doc/functions.html (contents, props changed)
   sandbox/xint/doc/functions_func.html (contents, props changed)
   sandbox/xint/doc/functions_type.html (contents, props changed)
   sandbox/xint/doc/functions_vars.html (contents, props changed)
   sandbox/xint/doc/gcd_8cpp.html (contents, props changed)
   sandbox/xint/doc/gcd_8cpp_source.html (contents, props changed)
   sandbox/xint/doc/globals.html (contents, props changed)
   sandbox/xint/doc/globals_defs.html (contents, props changed)
   sandbox/xint/doc/globals_vars.html (contents, props changed)
   sandbox/xint/doc/hierarchy.html (contents, props changed)
   sandbox/xint/doc/history.html (contents, props changed)
   sandbox/xint/doc/history_8dox.html (contents, props changed)
   sandbox/xint/doc/index.html (contents, props changed)
   sandbox/xint/doc/index_8dox.html (contents, props changed)
   sandbox/xint/doc/integer_8cpp.html (contents, props changed)
   sandbox/xint/doc/integer_8cpp_source.html (contents, props changed)
   sandbox/xint/doc/misc_8cpp.html (contents, props changed)
   sandbox/xint/doc/misc_8cpp_source.html (contents, props changed)
   sandbox/xint/doc/modular_8cpp.html (contents, props changed)
   sandbox/xint/doc/modular_8cpp_source.html (contents, props changed)
   sandbox/xint/doc/monty_8cpp.html (contents, props changed)
   sandbox/xint/doc/monty_8cpp_source.html (contents, props changed)
   sandbox/xint/doc/namespacemembers.html (contents, props changed)
   sandbox/xint/doc/namespacemembers_func.html (contents, props changed)
   sandbox/xint/doc/namespacemembers_type.html (contents, props changed)
   sandbox/xint/doc/namespacemembers_vars.html (contents, props changed)
   sandbox/xint/doc/namespaces.html (contents, props changed)
   sandbox/xint/doc/namespacexint.html (contents, props changed)
   sandbox/xint/doc/namespacexint_1_1detail.html (contents, props changed)
   sandbox/xint/doc/nan.html (contents, props changed)
   sandbox/xint/doc/nan_8dox.html (contents, props changed)
   sandbox/xint/doc/operators_8cpp.html (contents, props changed)
   sandbox/xint/doc/operators_8cpp_source.html (contents, props changed)
   sandbox/xint/doc/pages.html (contents, props changed)
   sandbox/xint/doc/powers_8cpp.html (contents, props changed)
   sandbox/xint/doc/powers_8cpp_source.html (contents, props changed)
   sandbox/xint/doc/primes.html (contents, props changed)
   sandbox/xint/doc/primes_8cpp.html (contents, props changed)
   sandbox/xint/doc/primes_8cpp_source.html (contents, props changed)
   sandbox/xint/doc/primes_8dox.html (contents, props changed)
   sandbox/xint/doc/primitives_8cpp.html (contents, props changed)
   sandbox/xint/doc/primitives_8cpp_source.html (contents, props changed)
   sandbox/xint/doc/r__cow_8dox.html (contents, props changed)
   sandbox/xint/doc/r__default__necessary_8dox.html (contents, props changed)
   sandbox/xint/doc/r__insecure__default_8dox.html (contents, props changed)
   sandbox/xint/doc/r__interface_8dox.html (contents, props changed)
   sandbox/xint/doc/r__interface__design__only_8dox.html (contents, props changed)
   sandbox/xint/doc/r__nan_8dox.html (contents, props changed)
   sandbox/xint/doc/r__negzero_8dox.html (contents, props changed)
   sandbox/xint/doc/r__random_8dox.html (contents, props changed)
   sandbox/xint/doc/r__shared__ptr_8dox.html (contents, props changed)
   sandbox/xint/doc/r_cow.html (contents, props changed)
   sandbox/xint/doc/r_default_necessary.html (contents, props changed)
   sandbox/xint/doc/r_insecure_default.html (contents, props changed)
   sandbox/xint/doc/r_interface.html (contents, props changed)
   sandbox/xint/doc/r_interface_design_only.html (contents, props changed)
   sandbox/xint/doc/r_nan.html (contents, props changed)
   sandbox/xint/doc/r_negzero.html (contents, props changed)
   sandbox/xint/doc/r_random.html (contents, props changed)
   sandbox/xint/doc/r_shared_ptr.html (contents, props changed)
   sandbox/xint/doc/random.html (contents, props changed)
   sandbox/xint/doc/random_8cpp.html (contents, props changed)
   sandbox/xint/doc/random_8cpp_source.html (contents, props changed)
   sandbox/xint/doc/random_8dox.html (contents, props changed)
   sandbox/xint/doc/rationale.html (contents, props changed)
   sandbox/xint/doc/rationale_8dox.html (contents, props changed)
   sandbox/xint/doc/roots_8cpp.html (contents, props changed)
   sandbox/xint/doc/roots_8cpp_source.html (contents, props changed)
   sandbox/xint/doc/securemode.html (contents, props changed)
   sandbox/xint/doc/securemode_8dox.html (contents, props changed)
   sandbox/xint/doc/structxint_1_1detail_1_1base__random__generator-members.html (contents, props changed)
   sandbox/xint/doc/structxint_1_1detail_1_1base__random__generator.gif (contents, props changed)
   sandbox/xint/doc/structxint_1_1detail_1_1base__random__generator.html (contents, props changed)
   sandbox/xint/doc/structxint_1_1detail_1_1data__t-members.html (contents, props changed)
   sandbox/xint/doc/structxint_1_1detail_1_1data__t.html (contents, props changed)
   sandbox/xint/doc/structxint_1_1detail_1_1data__t_1_1_quick_digits-members.html (contents, props changed)
   sandbox/xint/doc/structxint_1_1detail_1_1data__t_1_1_quick_digits.html (contents, props changed)
   sandbox/xint/doc/structxint_1_1detail_1_1random__generator-members.html (contents, props changed)
   sandbox/xint/doc/structxint_1_1detail_1_1random__generator.gif (contents, props changed)
   sandbox/xint/doc/structxint_1_1detail_1_1random__generator.html (contents, props changed)
   sandbox/xint/doc/structxint_1_1detail_1_1token.html (contents, props changed)
   sandbox/xint/doc/tab_b.gif (contents, props changed)
   sandbox/xint/doc/tab_l.gif (contents, props changed)
   sandbox/xint/doc/tab_r.gif (contents, props changed)
   sandbox/xint/doc/tabs.css (contents, props changed)
   sandbox/xint/doc/testing.html (contents, props changed)
   sandbox/xint/doc/testing_8dox.html (contents, props changed)
   sandbox/xint/doc/threadsafe.html (contents, props changed)
   sandbox/xint/doc/threadsafe_8dox.html (contents, props changed)
   sandbox/xint/doc/todo.html (contents, props changed)
   sandbox/xint/doc/xint_8hpp.html (contents, props changed)
   sandbox/xint/doc/xint_8hpp_source.html (contents, props changed)
   sandbox/xint/doc/xint__data__t_8hpp.html (contents, props changed)
   sandbox/xint/doc/xint__data__t_8hpp_source.html (contents, props changed)
   sandbox/xint/doc/xint__monty_8hpp.html (contents, props changed)
   sandbox/xint/doc/xint__monty_8hpp_source.html (contents, props changed)
   sandbox/xint/doc/xint__test_8hpp.html (contents, props changed)
   sandbox/xint/doc/xint__test_8hpp_source.html (contents, props changed)
   sandbox/xint/example/exceptions.cpp (contents, props changed)
   sandbox/xint/example/fibonacci.cpp (contents, props changed)
   sandbox/xint/example/genprime.cpp (contents, props changed)
   sandbox/xint/index.html (contents, props changed)
   sandbox/xint/test/Jamroot (contents, props changed)
   sandbox/xint/test/test_add.cpp (contents, props changed)
   sandbox/xint/test/test_bit_manipulations.cpp (contents, props changed)
   sandbox/xint/test/test_convert.cpp (contents, props changed)
   sandbox/xint/test/test_divide.cpp (contents, props changed)
   sandbox/xint/test/test_main.cpp (contents, props changed)
   sandbox/xint/test/test_monty.cpp (contents, props changed)
   sandbox/xint/test/test_multiply.cpp (contents, props changed)
   sandbox/xint/test/test_streams.cpp (contents, props changed)
Removed:
   sandbox/xint/example/xint_fibonacci.cpp
Text files modified:
   sandbox/xint/README.TXT | 14 -
   sandbox/xint/boost/xint/xint.hpp | 382 ++++++++++++++++++++++++++++++---------
   sandbox/xint/boost/xint/xint_data_t.hpp | 33 ++-
   sandbox/xint/boost/xint/xint_monty.hpp | 11 +
   sandbox/xint/boost/xint/xint_test.hpp | 12
   sandbox/xint/src/bit_manipulations.cpp | 123 ++++++++++-
   sandbox/xint/src/compare.cpp | 19 +
   sandbox/xint/src/convert.cpp | 101 +++++++++-
   sandbox/xint/src/data_t.cpp | 11 +
   sandbox/xint/src/exception_blocker.cpp | 68 +++++-
   sandbox/xint/src/gcd.cpp | 44 ++++
   sandbox/xint/src/integer.cpp | 82 ++++++++
   sandbox/xint/src/misc.cpp | 31 +++
   sandbox/xint/src/modular.cpp | 104 ++++++++--
   sandbox/xint/src/monty.cpp | 26 ++
   sandbox/xint/src/operators.cpp | 6
   sandbox/xint/src/powers.cpp | 61 +++++-
   sandbox/xint/src/primes.cpp | 71 ++++++
   sandbox/xint/src/primitives.cpp | 76 +++++++
   sandbox/xint/src/random.cpp | 42 +++
   sandbox/xint/src/roots.cpp | 17 +
   21 files changed, 1097 insertions(+), 237 deletions(-)

Modified: sandbox/xint/README.TXT
==============================================================================
--- sandbox/xint/README.TXT (original)
+++ sandbox/xint/README.TXT 2010-04-06 01:40:33 EDT (Tue, 06 Apr 2010)
@@ -1,6 +1,7 @@
-Installation instructions:
-* Unpack all files to the $(BOOST_ROOT)/libs/xint directory.
-* Copy xint.hpp to the $(BOOST_ROOT)/boost directory.
+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").
 
@@ -12,13 +13,6 @@
 Windows with no problem, but I haven't tried it through the bjam system there
 yet.
 
-There is a test suite, but I'm not sure how it would fit into the Boost test
-system yet.
-
-I'm also not sure that I've got the Jamfile correct. For whatever reason, it
-won't create a static version of the library for me, or maybe I just don't know
-how to ask it to do so.
-
 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.

Modified: sandbox/xint/boost/xint/xint.hpp
==============================================================================
--- sandbox/xint/boost/xint/xint.hpp (original)
+++ sandbox/xint/boost/xint/xint.hpp 2010-04-06 01:40:33 EDT (Tue, 06 Apr 2010)
@@ -1,46 +1,22 @@
-/*! \brief The Extended Integer (XInt) Library
- \details
- A fast, portable C++ library for multi-precision integer math.
 
- This is the main header file for the library, and the only one that
- programs using it should need to include.
+/*
+ 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
 
-\mainpage eXtended Integer library.
-
-A C++ library that lets your program handle much, much larger integer numbers
-than the built-in int, long, or even long long types,
-and handle them using the same syntax that
-C and C++ use for the standard integer types.
-
-The maximum size of the integer is limited by the memory available to store it,
-in practice millions of hexadecimal digits, so effectively infinite.
-
-Completely portable, written entirely in modern C++,
-with many different types of operating system, compiler, and hardware in mind.
-It will compile cleanly on many operating systems without any changes,
-automatically adapting to whatever native integer sizes are available.
-
-It's fast. Speed of execution takes a back seat to portability,
-so it doesn't include things like assembly-language modules
-to wring every last CPU cycle out of it -- but it's still pretty darn fast.
-
-Features you need. Modular arithmetic. Bit manipulation functions.
-Cryptographically-secure random and prime number generation.
-A friendly and intuitive interface. An option for thread-safe operation.
-
-It has the Boost Software License, Version 1.0. at
-http://www.boost.org/LICENSE_1_0.txt
+ See http://www.boost.org/libs/xint for library home page.
+*/
 
-Documentation in full as html is at
-https://svn.boost.org/svn/boost/sandbox/xint/libs/xint/doc/html/index.html
+/*! \file
+ \brief The main header file for the XInt library.
 
-and a pdf version is also available.
+ This is the only header that programs using the library should need to
+ include.
 */
-// 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
 
 #ifndef BOOST_INCLUDED_XINT_H
 #define BOOST_INCLUDED_XINT_H
@@ -59,32 +35,53 @@
 #include <boost/random/uniform_int.hpp>
 #include <boost/random/variate_generator.hpp>
 
+//! \brief All of the functions in the XInt library are within this namespace.
 namespace xint {
 
 ////////////////////////////////////////////////////////////////////////////////
 // The boring-but-necessary preliminary stuff
 
+//! \brief The items within this namespace are meant for internal use only.
 namespace 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 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;
 
     struct data_t;
+
+ //! An empty struct, used in xint::token
     struct token { };
 
+ //! The base class for random_generator.
     struct base_random_generator {
         typedef unsigned int result_type;
         virtual result_type operator()()=0;
     };
 
+ //! Support class for the random generator code.
     template <class T>
     struct random_generator: public base_random_generator {
         typedef boost::uniform_int<result_type> dist_t;
@@ -97,15 +94,32 @@
         gen_t gen;
     };
 
+ //! Support function \see xint::set_random_generator
     void set_random_generator(base_random_generator *obj);
+
+ /*!
+ \return An unsigned int from the current random generator.
+ \see xint::set_random_generator
+ */
     unsigned int get_random();
 } // namespace detail
 
+//! Used for the exception-blocker.
 typedef std::auto_ptr<detail::token> token;
 
+//! A callback function takes no parameters and returns a bool.
+//! @see xint::is_prime
+//! @see xint::random_prime
 typedef boost::function<bool ()> callback_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)();
 
 class not_a_number;
@@ -113,32 +127,43 @@
 ////////////////////////////////////////////////////////////////////////////////
 // The integer class
 
+/*! \brief The extended %integer class.
+
+ This class implements the main \c integer type.
+
+ There are only a few member functions; most of the functionality is
+ implemented using standalone functions.
+
+ Functions that start with an underscore (such as \c _make_unique) are
+ intended for internal use only. They may change arbitrarily in future
+ versions.
+*/
 class integer {
- //! \class integer \brief The extended integer class.
- //! \details TODO more info on the integer class???
     public:
- integer(); //!< Constructs a default integer, value zero.
- integer(const integer& b); //!< Copy constructs a integer from another integer.
- //!< (Can throw std::overflow_error if not enough memory to construct a new integer).
 
+ //! \name Constructors & Destructors
+ //!@{
+ integer();
+ integer(const integer& b);
     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);
-
- explicit integer(const std::string& str, size_t base=10); //!< Constructs an integer from a std::string of decimal digits.
- explicit integer(const not_a_number&); //!< Constructs an integer with value NaN.
+ explicit integer(const std::string& str, size_t base=10);
+ explicit integer(const not_a_number&);
     ~integer();
+ //!@}
 
- bool odd() const; //!< \returns true if extended integer is odd.
- bool even() const; //!< \returns true if extended integer is even.
- int sign() const; //!< \returns -1 if extended integer is < 0.
- bool nan() const; //!< \returns true if extended integer is Not-a-Number.
-
- size_t hex_digits() const; //!< \returns the number of hex digits to show the integer.
-
+ /*! \name Mathematical and Bitwise Operators
+ \brief These operate exactly like their counterparts for the built-in
+ %integer types.
+
+ Note that there is no \c operator~. Since the integer type doesn't have
+ a fixed maximum size, there is no logical way to implement it.
+ */
+ //@{
     integer& operator=(const integer &c);
 
     integer& operator+=(const integer& b);
@@ -147,10 +172,10 @@
     integer& operator/=(const integer& b);
     integer& operator%=(const integer& b);
 
- integer& operator++();
- integer& operator--();
- integer operator++(int);
- integer operator--(int);
+ 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);
@@ -159,25 +184,49 @@
     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, but they are
+ available to your own code as well.
+ */
+ //@{
     static const integer& zero();
     static const integer& one();
+ //@}
+
+ //! \name Miscellaneous Functions
+ //!@{
+ bool odd() const;
+ bool even() const;
+ int sign() const;
+ bool is_nan() const; //!< \returns true if integer is Not-a-Number.
+
+ size_t hex_digits() const; //!< \returns the number of hex digits to show the integer.
+ //!@}
 
- // These are used internally, they're probably not useful outside of the
- // library's functions.
+ /*! \name Internal Functions
+ \brief These functions allow access to the internals of the %integer.
+ They are intended for internal use only.
+ */
+ //@{
     detail::data_t *_get_data() { return data; }
     const detail::data_t *_get_data() const { return data; }
     detail::digit_t _get_digit(size_t index) const;
- detail::digit_t _get_digit(size_t index, bool) const;
+ detail::digit_t _get_digit(size_t index, bool) const; //!< \overload
     size_t _get_length() const;
     void _set_negative(bool negative);
     void _make_unique();
     void _throw_if_nan() const;
+ //@}
 
     private: ///////////////////////////////////////////////////////////////////
     void _init(detail::digit_t init=0);
- void _init(const integer &c);
- void _init(boost::uintmax_t n);
+ void _init(const integer &c); //!< \overload
+ void _init(boost::uintmax_t n); //!< \overload
     void _attach();
     void _detach();
 
@@ -185,8 +234,14 @@
 };
 
 ////////////////////////////////////////////////////////////////////////////////
-// The random generator convenience class
 
+/*! \brief A convenience class for cryptographically-secure random numbers.
+
+ Used with xint::set_random_generator to set the XInt library to use the
+ system-supplied secure random number generator.
+
+ \see \ref random
+*/
 class strong_random_generator {
     public:
     typedef unsigned int result_type;
@@ -208,25 +263,22 @@
 };
 
 ////////////////////////////////////////////////////////////////////////////////
-// Exception-blocking and -allowing functions
 
+/*! \name Exception-blocking and -allowing functions
+
+ See the \ref exceptions "exception-blocking page" for details on these
+ functions and how to use them.
+*/
+//!@{
 bool exceptions_allowed();
 token block_exceptions();
 token allow_exceptions();
+//!@}
 
 ////////////////////////////////////////////////////////////////////////////////
-// Miscellaneous functions
-
-bool opt_secure_mode();
-bool opt_thread_safe();
-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);
-
-////////////////////////////////////////////////////////////////////////////////
-// Mathematical primitives
 
+//! \name Mathematical primitives
+//!@{
 integer abs(const integer& n);
 integer negate(const integer& n);
 integer add(const integer& n, const integer& addend);
@@ -235,28 +287,34 @@
 integer divide(const integer& dividend, const integer& divisor);
 std::pair<integer, integer> divide_r(const integer& dividend, const integer&
     divisor);
+//!@}
 
 ////////////////////////////////////////////////////////////////////////////////
-// Powers and roots
 
+//! \name Powers and roots
+//!@{
 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);
+//!@}
 
 ////////////////////////////////////////////////////////////////////////////////
-// Conversion functions
 
+//! \name Conversion functions
+//!@{
 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);
 std::string to_binary(const integer& n);
 integer from_binary(const std::string& s);
+//!@}
 
 ////////////////////////////////////////////////////////////////////////////////
-// Bit-manipulation functions
 
+//! \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);
@@ -268,33 +326,48 @@
 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);
+//!@}
 
 ////////////////////////////////////////////////////////////////////////////////
-// Modular math functions
 
+/*! \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.
+*/
+//!@{
 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);
+//!@}
 
 ////////////////////////////////////////////////////////////////////////////////
-// Random number functions
 
+//! \name Random number functions
+//!@{
 template <typename T> void set_random_generator(T *gen);
 integer random_by_size(size_t sizeInBits, bool highBitOn=false, bool
     lowBitOn=false, bool canBeNegative=false);
+//!@}
 
 ////////////////////////////////////////////////////////////////////////////////
-// Prime number functions
 
+//! \name Prime number functions
+//!@{
 int is_prime(const integer& n, callback_t callback=no_callback);
 integer random_prime(size_t sizeInBits, callback_t callback=no_callback);
+//!@}
 
 ////////////////////////////////////////////////////////////////////////////////
-// Operators for the integer class
 
+/*! \name Operators
+
+ These act exactly the same as for the built-in %integer types.
+*/
+//!@{
 bool operator!(const integer& n1);
 bool operator<(const integer& n1, const integer& n2);
 bool operator>(const integer& n1, const integer& n2);
@@ -313,67 +386,157 @@
 integer operator&(const integer& n1, const integer& n2);
 integer operator|(const integer& n1, const integer& n2);
 integer operator^(const integer& n1, const integer& n2);
+//!@}
+
+////////////////////////////////////////////////////////////////////////////////
+
+//! \name Miscellaneous functions
+//!@{
+bool opt_secure_mode();
+bool opt_thread_safe();
+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);
+//!@}
 
 ////////////////////////////////////////////////////////////////////////////////
 // Exception classes
 
+//! \name Exception classes
+//!@{
+/*! \brief Exception class
+
+ Derived from \c std::invalid_argument.
+*/
 class invalid_base: public std::invalid_argument {
     public:
     invalid_base(const std::string& what="invalid base"): invalid_argument(what)
         { }
 };
 
+/*! \brief Exception class
+
+ Derived from \c std::range_error.
+*/
 class invalid_digit: public std::range_error {
     public:
     invalid_digit(const std::string& what="invalid digit"): range_error(what)
         { }
 };
 
+/*! \brief Exception class
+
+ Derived from \c std::invalid_argument.
+*/
 class invalid_modulus: public std::invalid_argument {
     public:
     invalid_modulus(const std::string& what="invalid modulus"):
         invalid_argument(what) { }
 };
 
+/*! \brief Exception class
+
+ Derived from \c std::invalid_argument.
+*/
 class divide_by_zero: public std::invalid_argument {
     public:
     divide_by_zero(const std::string& what="divide by zero error"):
         invalid_argument(what) { }
 };
 
+/*! \brief Exception class
+
+ Derived from \c std::invalid_argument.
+*/
 class cannot_represent: public std::invalid_argument {
     public:
- cannot_represent(const std::string& what="cannot represent the requested "
- "value"): invalid_argument(what) { }
+ cannot_represent(const std::string& what=
+ "cannot represent the requested value"): invalid_argument(what) { }
 };
 
+/*! \brief Exception class
+
+ Derived from \c std::range_error.
+*/
 class too_big: public std::range_error {
     public:
- too_big(const std::string& what="value out of range for requested "
- "conversion"): range_error(what) { }
+ too_big(const std::string& what=
+ "value out of range for requested conversion"): range_error(what) { }
 };
 
+/*! \brief Exception class
+
+ Derived from \c std::runtime_error.
+
+ \note Cannot (presently) be blocked.
+
+ \remarks
+ Most library functions will throw an xint::not_a_number exception if you try
+ to use a \link nan Not-a-Number value \endlink in them.
+
+ \par
+ An object of type xint::not_a_number can also be fed to an integer
+ constructor to deliberately produce a Not-a-Number value.
+
+ \par
+ See this page for details on Not-a-Number.
+*/
 class not_a_number: public std::runtime_error {
     public:
     not_a_number(const std::string& what="attempted to use a Not-a-Number"):
         runtime_error(what) { }
 };
 
+/*! \brief Exception class
+
+ Derived from \c std::runtime_error.
+
+ \note Cannot be blocked.
+*/
 class no_strong_random: public std::runtime_error {
     public:
- no_strong_random(const std::string& what="system does not have a strong "
- "random generator"): runtime_error(what) { }
+ no_strong_random(const std::string& what=
+ "system does not have a strong random generator"):
+ runtime_error(what) { }
 };
 
+/*! \brief Exception class
+
+ Derived from \c std::overflow_error.
+
+ \note Cannot (presently) be blocked.
+
+ \remarks
+ Thrown by the xint::strong_random_generator 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.
+*/
 class overflow_error: public std::overflow_error {
     public:
- overflow_error(const std::string& what="overflow error in XInt library"):
+ overflow_error(const std::string& what=
+ "overflow error: can't obtain enough memory to represent the requested number"):
         std::overflow_error(what) { }
 };
+//!@}
 
 ////////////////////////////////////////////////////////////////////////////////
 // Template function definitions
 
+/*!
+ Constructs a new 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.
+
+ You can ignore the \c enable_if parameters, they are there only to tell the
+ compiler what types it applies to.
+
+ \overload
+*/
+
 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*)
@@ -394,6 +557,19 @@
     }
 }
 
+/*!
+ 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.
+
+ You can ignore the \c enable_if parameters, they are there only to tell the
+ compiler what types it applies to.
+
+ \overload
+*/
+
 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*)
@@ -403,6 +579,16 @@
     else _init(boost::uintmax_t(n));
 }
 
+/*! \brief Efficiently converts from an xint::integer 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 xint::too_big if \c n would not fit into the specified type.
+*/
 template <typename T>
 T to(const integer& n) {
     n._throw_if_nan();
@@ -419,17 +605,32 @@
     return rval;
 }
 
+/*! \brief Change the random generator that the library uses.
+
+\param[in] gen A pointer to the new generator to use.
+
+\warning The generator must be a heap-allocated pointer (one created with
+<code>new</code>), which the XInt library assumes ownership of. Don't pass in a
+stack-created item, don't try to delete the item that you passed in, and don't
+attempt to use it separately after passing it to this function, or the behavior
+is undefined.
+
+\remarks
+See the \link random Random Number page\endlink for an example of how to use it.
+*/
 template <typename T>
 void set_random_generator(T *gen) {
     detail::random_generator<T> *obj=new detail::random_generator<T>(gen);
     detail::set_random_generator(obj);
 }
 
+//! \name Stream input/output functions
+//!@{
 template <typename charT, typename traits>
 inline std::basic_ostream<charT,traits>& operator<<(std::basic_ostream<charT,
     traits>& out, const xint::integer& n)
 {
- if (n.nan()) {
+ if (n.is_nan()) {
         out << detail::nan_text;
     } else {
         int base=((out.flags() & std::ios::hex) ? 16
@@ -522,6 +723,7 @@
 
     return in;
 }
+//!@}
 
 } // namespace xint
 

Modified: sandbox/xint/boost/xint/xint_data_t.hpp
==============================================================================
--- sandbox/xint/boost/xint/xint_data_t.hpp (original)
+++ sandbox/xint/boost/xint/xint_data_t.hpp 2010-04-06 01:40:33 EDT (Tue, 06 Apr 2010)
@@ -8,15 +8,14 @@
     See accompanying file LICENSE_1_0.txt or copy at
         http://www.boost.org/LICENSE_1_0.txt
 
- This file contains the declaration for the xint data structure. It should
- only be used by the library itself.
-
- The data for an integer is stored in a separate struct so it can be shared
- between different copies of an identical number.
+ See http://www.boost.org/libs/xint for library home page.
+*/
 
- The digits are stored low-digit-first.
+/*! \file
+ \brief Internal details of an xint::integer.
 
- Define XINT_SECURE to zero all memory before releasing it.
+ This file contains the declaration for the xint data structure. It should
+ only be used by the library itself.
 */
 
 #ifndef BOOST_INCLUDED_XINT_DATA_T_H
@@ -29,17 +28,29 @@
 namespace xint {
 namespace detail {
 
+/*! \brief Holds the internal details of an xint::integer.
+
+ The data for an integer is stored in a separate struct so it can be shared
+ between different copies of an identical number.
+*/
 struct data_t {
+ /*! \brief Holds information determining how many quick-digits to use.
+
+ Smaller numbers are represented in a small array of digits that are part
+ of the #data_t structure itself, so that no additional memory allocation
+ is needed for them. The contents of this structure determine how many of
+ them the library uses.
+ */
     struct QuickDigits {
- // We want at least enough QuickDigits to hold two ints.
         static const size_t intbits=std::numeric_limits<unsigned int>::digits;
- static const size_t suggested=(2*intbits/bits_per_digit);
- static const size_t minimum=3;
+ static const size_t suggested=(2*intbits/bits_per_digit); //!< We want at least enough QuickDigits to hold two standard int types.
+ static const size_t minimum=3; //!< The library's code is written to depend on this value, don't change it.
         static const size_t count=(suggested < minimum ? minimum : suggested);
     };
 
     size_t mLength, mAllocated;
- digit_t *digits, mQuickDigits[QuickDigits::count];
+ digit_t *digits; //!< \note The digits are stored lowest-digit-first.
+ digit_t mQuickDigits[QuickDigits::count];
 
     #if !defined(XINT_SECURE)
         std::vector<digit_t> mStorage;

Modified: sandbox/xint/boost/xint/xint_monty.hpp
==============================================================================
--- sandbox/xint/boost/xint/xint_monty.hpp (original)
+++ sandbox/xint/boost/xint/xint_monty.hpp 2010-04-06 01:40:33 EDT (Tue, 06 Apr 2010)
@@ -8,8 +8,14 @@
     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 powmod function for odd modulii.
+ used internally to speed up the xint::powmod function for odd modulii.
 */
 
 #ifndef BOOST_INCLUDED_XINT_MONTY_H
@@ -17,6 +23,8 @@
 
 namespace xint {
 
+//! \name Montgomery Reduction functions
+//!@{
 detail::digit_t inverse0(const integer& n);
 integer montgomeryR(const integer& n);
 integer toMontgomeryForm(const integer& n, const integer& m);
@@ -24,6 +32,7 @@
 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 xint
 

Modified: sandbox/xint/boost/xint/xint_test.hpp
==============================================================================
--- sandbox/xint/boost/xint/xint_test.hpp (original)
+++ sandbox/xint/boost/xint/xint_test.hpp 2010-04-06 01:40:33 EDT (Tue, 06 Apr 2010)
@@ -8,7 +8,11 @@
     See accompanying file LICENSE_1_0.txt or copy at
         http://www.boost.org/LICENSE_1_0.txt
 
- This header file declares the library's self-testing functions.
+ See http://www.boost.org/libs/xint for library home page.
+*/
+
+/*! \file
+ \brief Declares the library's self-testing functions.
 */
 
 #ifndef BOOST_INCLUDED_XINT_TEST_H
@@ -16,7 +20,8 @@
 
 namespace xint {
 
-bool testAll();
+//! \name Self-Testing Functions
+//!@{
 bool testBitManipulations();
 bool testAddSubtract();
 bool testMultiply();
@@ -25,6 +30,7 @@
 bool testStreams();
 bool testMontyMultiply();
 bool testMontyPowerMod();
+//!@}
 
 } // namespace xint
 

Added: sandbox/xint/doc/acknowledgements.html
==============================================================================
--- (empty file)
+++ sandbox/xint/doc/acknowledgements.html 2010-04-06 01:40:33 EDT (Tue, 06 Apr 2010)
@@ -0,0 +1,61 @@
+<!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.1 -->
+<div class="navigation" id="top">
+ <div class="tabs">
+ <ul>
+ <li>Main Page</li>
+ <li class="current">Related Pages</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 <code><a class="el" href="classxint_1_1integer.html" title="The extended integer class.">xint::integer</a></code>;</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>The library wouldn't be nearly as good without his work, and I hope I didn't irritate him too much. :-)</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 understanding what I was trying to explain when no one else seemed to.</li>
+<li>Jeffrey Lee Hellrung, Jr., for advice on implementing move-aware objects, and for an invigorating discussion on the differing needs of an integer library versus a floating-point one, among other things.</li>
+<li>Peter Dimov, for suggesting a separate <code><a class="el" href="classxint_1_1overflow__error.html" title="Exception class.">xint::overflow_error</a></code> exception class.</li>
+<li>"Fred," a.k.a. "Gottlob Frege", for information on infinities.</li>
+</ul>
+<p>And the other Boost development list members who joined the discussion:</p>
+<ul>
+<li>Anders Dalvander</li>
+<li>Vincente Botet Escriba</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>
+</ul>
+<p>If I've forgotten anyone, please let me know and I'll correct the oversight. </p>
+</div>
+<hr size="1"/><address style="text-align: right;"><small>Generated on Tue Apr 6 01:22:08 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.1 </small></address>
+</body>
+</html>

Added: sandbox/xint/doc/acknowledgements_8dox.html
==============================================================================
--- (empty file)
+++ sandbox/xint/doc/acknowledgements_8dox.html 2010-04-06 01:40:33 EDT (Tue, 06 Apr 2010)
@@ -0,0 +1,36 @@
+<!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.1 -->
+<div class="navigation" id="top">
+ <div class="tabs">
+ <ul>
+ <li>Main Page</li>
+ <li>Related Pages</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 size="1"/><address style="text-align: right;"><small>Generated on Tue Apr 6 01:22:08 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.1 </small></address>
+</body>
+</html>

Added: sandbox/xint/doc/annotated.html
==============================================================================
--- (empty file)
+++ sandbox/xint/doc/annotated.html 2010-04-06 01:40:33 EDT (Tue, 06 Apr 2010)
@@ -0,0 +1,53 @@
+<!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.1 -->
+<div class="navigation" id="top">
+ <div class="tabs">
+ <ul>
+ <li>Main Page</li>
+ <li>Related Pages</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="structxint_1_1detail_1_1base__random__generator.html">xint::detail::base_random_generator</a></td><td class="indexvalue">The base class for <a class="el" href="structxint_1_1detail_1_1random__generator.html" title="Support class for the random generator code.">random_generator</a> </td></tr>
+ <tr><td class="indexkey"><a class="el" href="classxint_1_1cannot__represent.html">xint::cannot_represent</a></td><td class="indexvalue">Exception class </td></tr>
+ <tr><td class="indexkey"><a class="el" href="structxint_1_1detail_1_1data__t.html">xint::detail::data_t</a></td><td class="indexvalue">Holds the internal details of an <a class="el" href="classxint_1_1integer.html" title="The extended integer class.">xint::integer</a> </td></tr>
+ <tr><td class="indexkey"><a class="el" href="classxint_1_1divide__by__zero.html">xint::divide_by_zero</a></td><td class="indexvalue">Exception class </td></tr>
+ <tr><td class="indexkey"><a class="el" href="classxint_1_1integer.html">xint::integer</a></td><td class="indexvalue">The extended integer class </td></tr>
+ <tr><td class="indexkey"><a class="el" href="classxint_1_1invalid__base.html">xint::invalid_base</a></td><td class="indexvalue">Exception class </td></tr>
+ <tr><td class="indexkey"><a class="el" href="classxint_1_1invalid__digit.html">xint::invalid_digit</a></td><td class="indexvalue">Exception class </td></tr>
+ <tr><td class="indexkey"><a class="el" href="classxint_1_1invalid__modulus.html">xint::invalid_modulus</a></td><td class="indexvalue">Exception class </td></tr>
+ <tr><td class="indexkey"><a class="el" href="classxint_1_1no__strong__random.html">xint::no_strong_random</a></td><td class="indexvalue">Exception class </td></tr>
+ <tr><td class="indexkey"><a class="el" href="classxint_1_1not__a__number.html">xint::not_a_number</a></td><td class="indexvalue">Exception class </td></tr>
+ <tr><td class="indexkey"><a class="el" href="classxint_1_1overflow__error.html">xint::overflow_error</a></td><td class="indexvalue">Exception class </td></tr>
+ <tr><td class="indexkey"><a class="el" href="structxint_1_1detail_1_1data__t_1_1_quick_digits.html">xint::detail::data_t::QuickDigits</a></td><td class="indexvalue">Holds information determining how many quick-digits to use </td></tr>
+ <tr><td class="indexkey"><a class="el" href="structxint_1_1detail_1_1random__generator.html">xint::detail::random_generator&lt; T &gt;</a></td><td class="indexvalue">Support class for the random generator code </td></tr>
+ <tr><td class="indexkey"><a class="el" href="classxint_1_1strong__random__generator.html">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="structxint_1_1detail_1_1token.html">xint::detail::token</a></td><td class="indexvalue">An empty struct, used in <a class="el" href="namespacexint.html#ad63045584f06221eb6a7581ad3091582" title="Used for the exception-blocker.">xint::token</a> </td></tr>
+ <tr><td class="indexkey"><a class="el" href="classxint_1_1too__big.html">xint::too_big</a></td><td class="indexvalue">Exception class </td></tr>
+</table>
+</div>
+<hr size="1"/><address style="text-align: right;"><small>Generated on Tue Apr 6 01:22:08 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.1 </small></address>
+</body>
+</html>

Added: sandbox/xint/doc/bit__manipulations_8cpp.html
==============================================================================
--- (empty file)
+++ sandbox/xint/doc/bit__manipulations_8cpp.html 2010-04-06 01:40:33 EDT (Tue, 06 Apr 2010)
@@ -0,0 +1,79 @@
+<!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.1 -->
+<div class="navigation" id="top">
+ <div class="tabs">
+ <ul>
+ <li>Main Page</li>
+ <li>Related Pages</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>
+<code>#include &quot;../boost/xint/xint.hpp&quot;</code><br/>
+<code>#include &quot;../boost/xint/xint_data_t.hpp&quot;</code><br/>
+
+<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="namespacexint.html">xint</a></td></tr>
+
+<p><tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight"><p>All of the functions in the XInt 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>
+<br/><br/></div></td></tr>
+<tr><td class="memItemLeft" align="right" valign="top">bool&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespacexint.html#a07bc7378c8a55e5f92aaef6d8b8ce952">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 <a class="el" href="classxint_1_1integer.html" title="The extended integer class.">integer</a>. <br/></td></tr>
+<tr><td class="memItemLeft" align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespacexint.html#adf2652627e78682c17e120816987984a">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 <a class="el" href="classxint_1_1integer.html" title="The extended integer class.">integer</a> to one. <br/></td></tr>
+<tr><td class="memItemLeft" align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespacexint.html#a8982e3e3ab7c1c763416eadc479d9724">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 <a class="el" href="classxint_1_1integer.html" title="The extended integer class.">integer</a> to zero. <br/></td></tr>
+<tr><td class="memItemLeft" align="right" valign="top">size_t&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespacexint.html#ae04d70f50c4ce73d27ab32b1bf3520f2">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 <a class="el" href="classxint_1_1integer.html" title="The extended integer class.">integer</a> 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="namespacexint.html#ae08828243165ef3f397461507368a6e5">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 <a class="el" href="classxint_1_1integer.html" title="The extended integer class.">integer</a> with a value of one. <br/></td></tr>
+<tr><td class="memItemLeft" align="right" valign="top">integer&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespacexint.html#a06138585f07fe098e24718c46e3078e1">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="namespacexint.html#a8cd0a0dbc779e5a75c9e2f8027474e9a">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="namespacexint.html#a9ffe18a09f5dd354af7b967b032d3cbe">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">integer&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespacexint.html#a4f4dacd6f9398aaa500112731ab713ce">xint::shift</a> (const integer &amp;n, int byBits)</td></tr>
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Bit-shift an <a class="el" href="classxint_1_1integer.html" title="The extended integer class.">integer</a>, 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="namespacexint.html#a6799cc3c4d8c963279be64b209bfd3b6">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 <a class="el" href="classxint_1_1integer.html" title="The extended integer class.">integer</a> 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="namespacexint.html#a49a5a4220cb88b7446545e4b65950473">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 <a class="el" href="classxint_1_1integer.html" title="The extended integer class.">integer</a> 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 size="1"/><address style="text-align: right;"><small>Generated on Tue Apr 6 01:22:08 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.1 </small></address>
+</body>
+</html>

Added: sandbox/xint/doc/bit__manipulations_8cpp_source.html
==============================================================================
--- (empty file)
+++ sandbox/xint/doc/bit__manipulations_8cpp_source.html 2010-04-06 01:40:33 EDT (Tue, 06 Apr 2010)
@@ -0,0 +1,201 @@
+<!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.1 -->
+<div class="navigation" id="top">
+ <div class="tabs">
+ <ul>
+ <li>Main Page</li>
+ <li>Related Pages</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/xint.hpp&quot;</span>
+<a name="l00019"></a>00019 <span class="preprocessor">#include &quot;../boost/xint/xint_data_t.hpp&quot;</span>
+<a name="l00020"></a>00020
+<a name="l00021"></a><a class="code" href="namespacexint.html">00021</a> <span class="keyword">namespace </span>xint {
+<a name="l00022"></a>00022
+<a name="l00023"></a>00023 <span class="keyword">using namespace </span>detail;
+<a name="l00024"></a>00024
+<a name="l00033"></a>00033 <span class="keywordtype">bool</span> <a class="code" href="namespacexint.html#a07bc7378c8a55e5f92aaef6d8b8ce952" title="Queries the value of a particular bit in an integer.">getbit</a>(<span class="keyword">const</span> <a class="code" href="classxint_1_1integer.html" title="The extended integer class.">integer</a>&amp; n, <span class="keywordtype">size_t</span> bit) {
+<a name="l00034"></a>00034 n.<a class="code" href="classxint_1_1integer.html#ad5935c358b92f15064b1f910613f7a3e">_throw_if_nan</a>();
+<a name="l00035"></a>00035 <span class="keywordtype">size_t</span> index=bit/<a class="code" href="namespacexint_1_1detail.html#a9bd9e8d55061238d63913020d2721518">bits_per_digit</a>;
+<a name="l00036"></a>00036 <span class="keywordflow">if</span> (index &lt; n.<a class="code" href="classxint_1_1integer.html#a5723a74b98da2d5ed9452a7ec10c0ca2">_get_length</a>()) {
+<a name="l00037"></a>00037 <a class="code" href="namespacexint_1_1detail.html#a8843fb7e364832d8d5983de28bdbcf34">digit_t</a> mask=(<a class="code" href="namespacexint_1_1detail.html#a8843fb7e364832d8d5983de28bdbcf34">digit_t</a>(1) &lt;&lt; (bit % <a class="code" href="namespacexint_1_1detail.html#a9bd9e8d55061238d63913020d2721518">bits_per_digit</a>));
+<a name="l00038"></a>00038 <span class="keywordflow">return</span> ((n.<a class="code" href="classxint_1_1integer.html#a81ab47d2f92ec66ac1586b61d7fd8b60">_get_digit</a>(index) &amp; mask) != 0);
+<a name="l00039"></a>00039 } <span class="keywordflow">else</span> <span class="keywordflow">return</span> <span class="keyword">false</span>;
+<a name="l00040"></a>00040 }
+<a name="l00041"></a>00041
+<a name="l00049"></a>00049 <span class="keywordtype">void</span> <a class="code" href="namespacexint.html#adf2652627e78682c17e120816987984a" title="Sets a specific bit in an integer to one.">setbit</a>(<a class="code" href="classxint_1_1integer.html" title="The extended integer class.">integer</a>&amp; n, <span class="keywordtype">size_t</span> bit) {
+<a name="l00050"></a>00050 n.<a class="code" href="classxint_1_1integer.html#ad5935c358b92f15064b1f910613f7a3e">_throw_if_nan</a>();
+<a name="l00051"></a>00051 n.<a class="code" href="classxint_1_1integer.html#adc5c7b5bc30c0cfa30d62610e0bc0366">_make_unique</a>();
+<a name="l00052"></a>00052 <a class="code" href="structxint_1_1detail_1_1data__t.html" title="Holds the internal details of an xint::integer.">detail::data_t</a> *ndata=n.<a class="code" href="classxint_1_1integer.html#ae5578d7d5be17df3ecd3ddc5a852d0a0">_get_data</a>();
+<a name="l00053"></a>00053
+<a name="l00054"></a>00054 <span class="keywordtype">size_t</span> index=bit/<a class="code" href="namespacexint_1_1detail.html#a9bd9e8d55061238d63913020d2721518">bits_per_digit</a>;
+<a name="l00055"></a>00055 <span class="keywordflow">if</span> (index &gt;= n.<a class="code" href="classxint_1_1integer.html#a5723a74b98da2d5ed9452a7ec10c0ca2">_get_length</a>()) ndata-&gt;<a class="code" href="structxint_1_1detail_1_1data__t.html#a2bb2c79d47f2fda3605f34b80cb58b8b">realloc</a>(index+1);
+<a name="l00056"></a>00056
+<a name="l00057"></a>00057 <a class="code" href="namespacexint_1_1detail.html#a8843fb7e364832d8d5983de28bdbcf34">digit_t</a> mask=(<a class="code" href="namespacexint_1_1detail.html#a8843fb7e364832d8d5983de28bdbcf34">digit_t</a>(1) &lt;&lt; (bit % <a class="code" href="namespacexint_1_1detail.html#a9bd9e8d55061238d63913020d2721518">bits_per_digit</a>));
+<a name="l00058"></a>00058 ndata-&gt;<a class="code" href="structxint_1_1detail_1_1data__t.html#a5c9382aec147090d7e7e2b5e972402a9">digits</a>[index] |= mask;
+<a name="l00059"></a>00059 ndata-&gt;<a class="code" href="structxint_1_1detail_1_1data__t.html#a6d45feedd311e26f7de06597fb0c6b81">skipLeadingZeros</a>();
+<a name="l00060"></a>00060 }
+<a name="l00061"></a>00061
+<a name="l00069"></a>00069 <span class="keywordtype">void</span> <a class="code" href="namespacexint.html#a8982e3e3ab7c1c763416eadc479d9724" title="Sets a specific bit in an integer to zero.">clearbit</a>(<a class="code" href="classxint_1_1integer.html" title="The extended integer class.">integer</a>&amp; n, <span class="keywordtype">size_t</span> bit) {
+<a name="l00070"></a>00070 n.<a class="code" href="classxint_1_1integer.html#ad5935c358b92f15064b1f910613f7a3e">_throw_if_nan</a>();
+<a name="l00071"></a>00071 <span class="keywordtype">size_t</span> index=bit/<a class="code" href="namespacexint_1_1detail.html#a9bd9e8d55061238d63913020d2721518">bits_per_digit</a>;
+<a name="l00072"></a>00072 <span class="keywordflow">if</span> (index &lt; n.<a class="code" href="classxint_1_1integer.html#a5723a74b98da2d5ed9452a7ec10c0ca2">_get_length</a>()) {
+<a name="l00073"></a>00073 n.<a class="code" href="classxint_1_1integer.html#adc5c7b5bc30c0cfa30d62610e0bc0366">_make_unique</a>();
+<a name="l00074"></a>00074 <a class="code" href="namespacexint_1_1detail.html#a8843fb7e364832d8d5983de28bdbcf34">digit_t</a> mask=(<a class="code" href="namespacexint_1_1detail.html#a8843fb7e364832d8d5983de28bdbcf34">digit_t</a>(1) &lt;&lt; (bit % <a class="code" href="namespacexint_1_1detail.html#a9bd9e8d55061238d63913020d2721518">bits_per_digit</a>));
+<a name="l00075"></a>00075 n.<a class="code" href="classxint_1_1integer.html#ae5578d7d5be17df3ecd3ddc5a852d0a0">_get_data</a>()-&gt;<a class="code" href="structxint_1_1detail_1_1data__t.html#a5c9382aec147090d7e7e2b5e972402a9">digits</a>[index] &amp;= ~mask;
+<a name="l00076"></a>00076 n.<a class="code" href="classxint_1_1integer.html#ae5578d7d5be17df3ecd3ddc5a852d0a0">_get_data</a>()-&gt;<a class="code" href="structxint_1_1detail_1_1data__t.html#a6d45feedd311e26f7de06597fb0c6b81">skipLeadingZeros</a>();
+<a name="l00077"></a>00077 }
+<a name="l00078"></a>00078 }
+<a name="l00079"></a>00079
+<a name="l00089"></a>00089 <span class="keywordtype">size_t</span> <a class="code" href="namespacexint.html#ae04d70f50c4ce73d27ab32b1bf3520f2" title="Obtains the index of the lowest bit in an integer with a value of one.">lowestbit</a>(<span class="keyword">const</span> <a class="code" href="classxint_1_1integer.html" title="The extended integer class.">integer</a>&amp; n, <span class="keywordtype">size_t</span> valueIfZero) {
+<a name="l00090"></a>00090 <span class="keywordflow">if</span> (n.<a class="code" href="classxint_1_1integer.html#a5d84398ce89b376f695ccded2d20c8c2" title="Tests the sign of *this.">sign</a>()==0) <span class="keywordflow">return</span> valueIfZero;
+<a name="l00091"></a>00091
+<a name="l00092"></a>00092 <span class="keyword">const</span> <a class="code" href="structxint_1_1detail_1_1data__t.html" title="Holds the internal details of an xint::integer.">detail::data_t</a> *ndata=n.<a class="code" href="classxint_1_1integer.html#ae5578d7d5be17df3ecd3ddc5a852d0a0">_get_data</a>();
+<a name="l00093"></a>00093 <span class="keyword">const</span> <a class="code" href="namespacexint_1_1detail.html#a8843fb7e364832d8d5983de28bdbcf34">digit_t</a> *p=ndata-&gt;<a class="code" href="structxint_1_1detail_1_1data__t.html#a5c9382aec147090d7e7e2b5e972402a9">digits</a>, *pe=p+ndata-&gt;<a class="code" href="structxint_1_1detail_1_1data__t.html#a599933d272e3592b2d0985ca7f7c72e2">mLength</a>;
+<a name="l00094"></a>00094 <span class="keywordflow">while</span> (p!=pe &amp;&amp; *p==0) ++p;
+<a name="l00095"></a>00095
+<a name="l00096"></a>00096 <span class="keywordtype">size_t</span> index=(p - ndata-&gt;<a class="code" href="structxint_1_1detail_1_1data__t.html#a5c9382aec147090d7e7e2b5e972402a9">digits</a>);
+<a name="l00097"></a>00097 <span class="keywordtype">size_t</span> r=(<a class="code" href="namespacexint_1_1detail.html#a9bd9e8d55061238d63913020d2721518">bits_per_digit</a> * index);
+<a name="l00098"></a>00098 <a class="code" href="namespacexint_1_1detail.html#a8843fb7e364832d8d5983de28bdbcf34">digit_t</a> digit=*p;
+<a name="l00099"></a>00099
+<a name="l00100"></a>00100 <span class="keywordflow">while</span> ((digit &amp; 0x01)==0) {
+<a name="l00101"></a>00101 digit&gt;&gt;=1;
+<a name="l00102"></a>00102 ++r;
+<a name="l00103"></a>00103 }
+<a name="l00104"></a>00104
+<a name="l00105"></a>00105 <span class="keywordflow">return</span> r;
+<a name="l00106"></a>00106 }
+<a name="l00107"></a>00107
+<a name="l00117"></a>00117 <span class="keywordtype">size_t</span> <a class="code" href="namespacexint.html#ae08828243165ef3f397461507368a6e5" title="Obtains the index of the highest bit in an integer with a value of one.">highestbit</a>(<span class="keyword">const</span> <a class="code" href="classxint_1_1integer.html" title="The extended integer class.">integer</a>&amp; n, <span class="keywordtype">size_t</span> valueIfZero) {
+<a name="l00118"></a>00118 <span class="keywordflow">if</span> (n.<a class="code" href="classxint_1_1integer.html#a5d84398ce89b376f695ccded2d20c8c2" title="Tests the sign of *this.">sign</a>()==0) <span class="keywordflow">return</span> valueIfZero;
+<a name="l00119"></a>00119 <span class="keywordflow">return</span> <span class="keyword">static_cast&lt;</span><span class="keywordtype">size_t</span><span class="keyword">&gt;</span>(<a class="code" href="namespacexint.html#aa074495871d366c760c5b0713f5ef048" title="Get the log2 value of an integer.">log2</a>(n)-1);
+<a name="l00120"></a>00120 }
+<a name="l00121"></a>00121
+<a name="l00128"></a>00128 <a class="code" href="classxint_1_1integer.html" title="The extended integer class.">integer</a> <a class="code" href="namespacexint.html#a06138585f07fe098e24718c46e3078e1" title="Combine two integers using a bitwise AND operation.">bitwise_and</a>(<span class="keyword">const</span> <a class="code" href="classxint_1_1integer.html" title="The extended integer class.">integer</a>&amp; n1, <span class="keyword">const</span> <a class="code" href="classxint_1_1integer.html" title="The extended integer class.">integer</a>&amp; n2) {
+<a name="l00129"></a>00129 n1.<a class="code" href="classxint_1_1integer.html#ad5935c358b92f15064b1f910613f7a3e">_throw_if_nan</a>();
+<a name="l00130"></a>00130 n2.<a class="code" href="classxint_1_1integer.html#ad5935c358b92f15064b1f910613f7a3e">_throw_if_nan</a>();
+<a name="l00131"></a>00131
+<a name="l00132"></a>00132 <span class="keyword">const</span> <a class="code" href="structxint_1_1detail_1_1data__t.html" title="Holds the internal details of an xint::integer.">detail::data_t</a> *smaller=n1.<a class="code" href="classxint_1_1integer.html#ae5578d7d5be17df3ecd3ddc5a852d0a0">_get_data</a>(), *larger=n2.<a class="code" href="classxint_1_1integer.html#ae5578d7d5be17df3ecd3ddc5a852d0a0">_get_data</a>();
+<a name="l00133"></a>00133 <span class="keywordflow">if</span> (smaller-&gt;<a class="code" href="structxint_1_1detail_1_1data__t.html#a599933d272e3592b2d0985ca7f7c72e2">mLength</a> &gt; larger-&gt;mLength) std::swap(smaller, larger);
+<a name="l00134"></a>00134
+<a name="l00135"></a>00135 <a class="code" href="classxint_1_1integer.html" title="The extended integer class.">integer</a> r;
+<a name="l00136"></a>00136 <a class="code" href="structxint_1_1detail_1_1data__t.html" title="Holds the internal details of an xint::integer.">detail::data_t</a> *rdata=r.<a class="code" href="classxint_1_1integer.html#ae5578d7d5be17df3ecd3ddc5a852d0a0">_get_data</a>();
+<a name="l00137"></a>00137 rdata-&gt;<a class="code" href="structxint_1_1detail_1_1data__t.html#a4fe3935e29883193166966c49cd73139">alloc</a>(smaller-&gt;<a class="code" href="structxint_1_1detail_1_1data__t.html#a599933d272e3592b2d0985ca7f7c72e2">mLength</a>);
+<a name="l00138"></a>00138
+<a name="l00139"></a>00139 <span class="keyword">const</span> <a class="code" href="namespacexint_1_1detail.html#a8843fb7e364832d8d5983de28bdbcf34">digit_t</a> *s1=smaller-&gt;<a class="code" href="structxint_1_1detail_1_1data__t.html#a5c9382aec147090d7e7e2b5e972402a9">digits</a>, *s1e=s1+smaller-&gt;<a class="code" href="structxint_1_1detail_1_1data__t.html#a599933d272e3592b2d0985ca7f7c72e2">mLength</a>, *s2=larger-&gt;digits;
+<a name="l00140"></a>00140 <a class="code" href="namespacexint_1_1detail.html#a8843fb7e364832d8d5983de28bdbcf34">digit_t</a> *t=rdata-&gt;<a class="code" href="structxint_1_1detail_1_1data__t.html#a5c9382aec147090d7e7e2b5e972402a9">digits</a>;
+<a name="l00141"></a>00141
+<a name="l00142"></a>00142 <span class="keywordflow">while</span> (s1 &lt; s1e) *t++ = *s1++ &amp; *s2++;
+<a name="l00143"></a>00143
+<a name="l00144"></a>00144 rdata-&gt;<a class="code" href="structxint_1_1detail_1_1data__t.html#a6d45feedd311e26f7de06597fb0c6b81">skipLeadingZeros</a>();
+<a name="l00145"></a>00145 <span class="keywordflow">return</span> r;
+<a name="l00146"></a>00146 }
+<a name="l00147"></a>00147
+<a name="l00154"></a>00154 <a class="code" href="classxint_1_1integer.html" title="The extended integer class.">integer</a> <a class="code" href="namespacexint.html#a8cd0a0dbc779e5a75c9e2f8027474e9a" title="Combine two integers using a bitwise OR operation.">bitwise_or</a>(<span class="keyword">const</span> <a class="code" href="classxint_1_1integer.html" title="The extended integer class.">integer</a>&amp; n1, <span class="keyword">const</span> <a class="code" href="classxint_1_1integer.html" title="The extended integer class.">integer</a>&amp; n2) {
+<a name="l00155"></a>00155 n1.<a class="code" href="classxint_1_1integer.html#ad5935c358b92f15064b1f910613f7a3e">_throw_if_nan</a>();
+<a name="l00156"></a>00156 n2.<a class="code" href="classxint_1_1integer.html#ad5935c358b92f15064b1f910613f7a3e">_throw_if_nan</a>();
+<a name="l00157"></a>00157
+<a name="l00158"></a>00158 <span class="keyword">const</span> <a class="code" href="structxint_1_1detail_1_1data__t.html" title="Holds the internal details of an xint::integer.">detail::data_t</a> *smaller=n1.<a class="code" href="classxint_1_1integer.html#ae5578d7d5be17df3ecd3ddc5a852d0a0">_get_data</a>(), *larger=n2.<a class="code" href="classxint_1_1integer.html#ae5578d7d5be17df3ecd3ddc5a852d0a0">_get_data</a>();
+<a name="l00159"></a>00159 <span class="keywordflow">if</span> (smaller-&gt;<a class="code" href="structxint_1_1detail_1_1data__t.html#a599933d272e3592b2d0985ca7f7c72e2">mLength</a> &gt; larger-&gt;mLength) std::swap(smaller, larger);
+<a name="l00160"></a>00160
+<a name="l00161"></a>00161 <a class="code" href="classxint_1_1integer.html" title="The extended integer class.">integer</a> r;
+<a name="l00162"></a>00162 <a class="code" href="structxint_1_1detail_1_1data__t.html" title="Holds the internal details of an xint::integer.">detail::data_t</a> *rdata=r.<a class="code" href="classxint_1_1integer.html#ae5578d7d5be17df3ecd3ddc5a852d0a0">_get_data</a>();
+<a name="l00163"></a>00163 rdata-&gt;<a class="code" href="structxint_1_1detail_1_1data__t.html#a4fe3935e29883193166966c49cd73139">alloc</a>(larger-&gt;mLength);
+<a name="l00164"></a>00164
+<a name="l00165"></a>00165 <span class="keyword">const</span> <a class="code" href="namespacexint_1_1detail.html#a8843fb7e364832d8d5983de28bdbcf34">digit_t</a> *s1=smaller-&gt;<a class="code" href="structxint_1_1detail_1_1data__t.html#a5c9382aec147090d7e7e2b5e972402a9">digits</a>, *s1e=s1+smaller-&gt;<a class="code" href="structxint_1_1detail_1_1data__t.html#a599933d272e3592b2d0985ca7f7c72e2">mLength</a>;
+<a name="l00166"></a>00166 <span class="keyword">const</span> <a class="code" href="namespacexint_1_1detail.html#a8843fb7e364832d8d5983de28bdbcf34">digit_t</a> *s2=larger-&gt;digits, *s2e=s2+larger-&gt;mLength;
+<a name="l00167"></a>00167 <a class="code" href="namespacexint_1_1detail.html#a8843fb7e364832d8d5983de28bdbcf34">digit_t</a> *t=rdata-&gt;<a class="code" href="structxint_1_1detail_1_1data__t.html#a5c9382aec147090d7e7e2b5e972402a9">digits</a>;
+<a name="l00168"></a>00168
+<a name="l00169"></a>00169 <span class="keywordflow">while</span> (s1&lt;s1e) *t++ = *s1++ | *s2++;
+<a name="l00170"></a>00170 <span class="keywordflow">while</span> (s2&lt;s2e) *t++ = *s2++;
+<a name="l00171"></a>00171
+<a name="l00172"></a>00172 rdata-&gt;<a class="code" href="structxint_1_1detail_1_1data__t.html#a6d45feedd311e26f7de06597fb0c6b81">skipLeadingZeros</a>();
+<a name="l00173"></a>00173 <span class="keywordflow">return</span> r;
+<a name="l00174"></a>00174 }
+<a name="l00175"></a>00175
+<a name="l00183"></a>00183 <a class="code" href="classxint_1_1integer.html" title="The extended integer class.">integer</a> <a class="code" href="namespacexint.html#a9ffe18a09f5dd354af7b967b032d3cbe" title="Combine two integers using a bitwise XOR operation.">bitwise_xor</a>(<span class="keyword">const</span> <a class="code" href="classxint_1_1integer.html" title="The extended integer class.">integer</a>&amp; n1, <span class="keyword">const</span> <a class="code" href="classxint_1_1integer.html" title="The extended integer class.">integer</a>&amp; n2) {
+<a name="l00184"></a>00184 n1.<a class="code" href="classxint_1_1integer.html#ad5935c358b92f15064b1f910613f7a3e">_throw_if_nan</a>();
+<a name="l00185"></a>00185 n2.<a class="code" href="classxint_1_1integer.html#ad5935c358b92f15064b1f910613f7a3e">_throw_if_nan</a>();
+<a name="l00186"></a>00186
+<a name="l00187"></a>00187 <span class="keyword">const</span> <a class="code" href="structxint_1_1detail_1_1data__t.html" title="Holds the internal details of an xint::integer.">detail::data_t</a> *smaller=n1.<a class="code" href="classxint_1_1integer.html#ae5578d7d5be17df3ecd3ddc5a852d0a0">_get_data</a>(), *larger=n2.<a class="code" href="classxint_1_1integer.html#ae5578d7d5be17df3ecd3ddc5a852d0a0">_get_data</a>();
+<a name="l00188"></a>00188 <span class="keywordflow">if</span> (smaller-&gt;<a class="code" href="structxint_1_1detail_1_1data__t.html#a599933d272e3592b2d0985ca7f7c72e2">mLength</a> &gt; larger-&gt;mLength) std::swap(smaller, larger);
+<a name="l00189"></a>00189
+<a name="l00190"></a>00190 <a class="code" href="classxint_1_1integer.html" title="The extended integer class.">integer</a> r;
+<a name="l00191"></a>00191 <a class="code" href="structxint_1_1detail_1_1data__t.html" title="Holds the internal details of an xint::integer.">detail::data_t</a> *rdata=r.<a class="code" href="classxint_1_1integer.html#ae5578d7d5be17df3ecd3ddc5a852d0a0">_get_data</a>();
+<a name="l00192"></a>00192 rdata-&gt;<a class="code" href="structxint_1_1detail_1_1data__t.html#a4fe3935e29883193166966c49cd73139">alloc</a>(larger-&gt;mLength);
+<a name="l00193"></a>00193
+<a name="l00194"></a>00194 <span class="keyword">const</span> <a class="code" href="namespacexint_1_1detail.html#a8843fb7e364832d8d5983de28bdbcf34">digit_t</a> *s1=smaller-&gt;<a class="code" href="structxint_1_1detail_1_1data__t.html#a5c9382aec147090d7e7e2b5e972402a9">digits</a>, *s1e=s1+smaller-&gt;<a class="code" href="structxint_1_1detail_1_1data__t.html#a599933d272e3592b2d0985ca7f7c72e2">mLength</a>;
+<a name="l00195"></a>00195 <span class="keyword">const</span> <a class="code" href="namespacexint_1_1detail.html#a8843fb7e364832d8d5983de28bdbcf34">digit_t</a> *s2=larger-&gt;digits, *s2e=s2+larger-&gt;mLength;
+<a name="l00196"></a>00196 <a class="code" href="namespacexint_1_1detail.html#a8843fb7e364832d8d5983de28bdbcf34">digit_t</a> *t=rdata-&gt;<a class="code" href="structxint_1_1detail_1_1data__t.html#a5c9382aec147090d7e7e2b5e972402a9">digits</a>;
+<a name="l00197"></a>00197
+<a name="l00198"></a>00198 <span class="keywordflow">while</span> (s1&lt;s1e) *t++ = *s1++ ^ *s2++;
+<a name="l00199"></a>00199 <span class="keywordflow">while</span> (s2&lt;s2e) *t++ = *s2++;
+<a name="l00200"></a>00200
+<a name="l00201"></a>00201 rdata-&gt;<a class="code" href="structxint_1_1detail_1_1data__t.html#a6d45feedd311e26f7de06597fb0c6b81">skipLeadingZeros</a>();
+<a name="l00202"></a>00202 <span class="keywordflow">return</span> r;
+<a name="l00203"></a>00203 }
+<a name="l00204"></a>00204
+<a name="l00213"></a>00213 <a class="code" href="classxint_1_1integer.html" title="The extended integer class.">integer</a> <a class="code" href="namespacexint.html#a4f4dacd6f9398aaa500112731ab713ce" title="Bit-shift an integer, in either direction.">shift</a>(<span class="keyword">const</span> <a class="code" href="classxint_1_1integer.html" title="The extended integer class.">integer</a>&amp; n, <span class="keywordtype">int</span> byBits) {
+<a name="l00214"></a>00214 <span class="keywordflow">if</span> (byBits &gt; 0) <span class="keywordflow">return</span> <a class="code" href="namespacexint.html#a6799cc3c4d8c963279be64b209bfd3b6" title="Left-shift an integer by a specified number of bits.">shift_left</a>(n, byBits);
+<a name="l00215"></a>00215 <span class="keywordflow">else</span> <span class="keywordflow">return</span> <a class="code" href="namespacexint.html#a49a5a4220cb88b7446545e4b65950473" title="Right-shift an integer by a specified number of bits.">shift_right</a>(n, -byBits);
+<a name="l00216"></a>00216 }
+<a name="l00217"></a>00217
+<a name="l00225"></a>00225 <a class="code" href="classxint_1_1integer.html" title="The extended integer class.">integer</a> <a class="code" href="namespacexint.html#a6799cc3c4d8c963279be64b209bfd3b6" title="Left-shift an integer by a specified number of bits.">shift_left</a>(<span class="keyword">const</span> <a class="code" href="classxint_1_1integer.html" title="The extended integer class.">integer</a>&amp; n, <span class="keywordtype">size_t</span> byBits) {
+<a name="l00226"></a>00226 n.<a class="code" href="classxint_1_1integer.html#ad5935c358b92f15064b1f910613f7a3e">_throw_if_nan</a>();
+<a name="l00227"></a>00227
+<a name="l00228"></a>00228 <span class="keywordflow">if</span> (byBits==0) <span class="keywordflow">return</span> n;
+<a name="l00229"></a>00229
+<a name="l00230"></a>00230 <a class="code" href="classxint_1_1integer.html" title="The extended integer class.">integer</a> nn(n);
+<a name="l00231"></a>00231 nn.<a class="code" href="classxint_1_1integer.html#adc5c7b5bc30c0cfa30d62610e0bc0366">_make_unique</a>();
+<a name="l00232"></a>00232 nn.<a class="code" href="classxint_1_1integer.html#ae5578d7d5be17df3ecd3ddc5a852d0a0">_get_data</a>()-&gt;<a class="code" href="structxint_1_1detail_1_1data__t.html#a72785130c7c6490af874f450cf6e0086">shift_left</a>(byBits);
+<a name="l00233"></a>00233 <span class="keywordflow">return</span> nn;
+<a name="l00234"></a>00234 }
+<a name="l00235"></a>00235
+<a name="l00243"></a>00243 <a class="code" href="classxint_1_1integer.html" title="The extended integer class.">integer</a> <a class="code" href="namespacexint.html#a49a5a4220cb88b7446545e4b65950473" title="Right-shift an integer by a specified number of bits.">shift_right</a>(<span class="keyword">const</span> <a class="code" href="classxint_1_1integer.html" title="The extended integer class.">integer</a>&amp; n, <span class="keywordtype">size_t</span> byBits) {
+<a name="l00244"></a>00244 n.<a class="code" href="classxint_1_1integer.html#ad5935c358b92f15064b1f910613f7a3e">_throw_if_nan</a>();
+<a name="l00245"></a>00245
+<a name="l00246"></a>00246 <span class="keywordflow">if</span> (byBits==0) <span class="keywordflow">return</span> n;
+<a name="l00247"></a>00247
+<a name="l00248"></a>00248 <a class="code" href="classxint_1_1integer.html" title="The extended integer class.">integer</a> nn(n);
+<a name="l00249"></a>00249 nn.<a class="code" href="classxint_1_1integer.html#adc5c7b5bc30c0cfa30d62610e0bc0366">_make_unique</a>();
+<a name="l00250"></a>00250 nn.<a class="code" href="classxint_1_1integer.html#ae5578d7d5be17df3ecd3ddc5a852d0a0">_get_data</a>()-&gt;<a class="code" href="structxint_1_1detail_1_1data__t.html#a432ace7094bca306dcba254f862e2428">shift_right</a>(byBits);
+<a name="l00251"></a>00251 <span class="keywordflow">return</span> nn;
+<a name="l00252"></a>00252 }
+<a name="l00253"></a>00253
+<a name="l00254"></a>00254 } <span class="comment">// namespace detail</span>
+</pre></div></div>
+<hr size="1"/><address style="text-align: right;"><small>Generated on Tue Apr 6 01:22:07 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.1 </small></address>
+</body>
+</html>

Added: sandbox/xint/doc/classes.html
==============================================================================
--- (empty file)
+++ sandbox/xint/doc/classes.html 2010-04-06 01:40:33 EDT (Tue, 06 Apr 2010)
@@ -0,0 +1,48 @@
+<!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: Alphabetical 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.1 -->
+<div class="navigation" id="top">
+ <div class="tabs">
+ <ul>
+ <li>Main Page</li>
+ <li>Related Pages</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>Class Index</h1><div class="qindex"><a class="qindex" href="#letter_B">B</a>&nbsp;|&nbsp;<a class="qindex" href="#letter_C">C</a>&nbsp;|&nbsp;<a class="qindex" href="#letter_D">D</a>&nbsp;|&nbsp;<a class="qindex" href="#letter_I">I</a>&nbsp;|&nbsp;<a class="qindex" href="#letter_N">N</a>&nbsp;|&nbsp;<a class="qindex" href="#letter_O">O</a>&nbsp;|&nbsp;<a class="qindex" href="#letter_Q">Q</a>&nbsp;|&nbsp;<a class="qindex" href="#letter_R">R</a>&nbsp;|&nbsp;<a class="qindex" href="#letter_S">S</a>&nbsp;|&nbsp;<a class="qindex" href="#letter_T">T</a></div>
+<table align="center" width="95%" border="0" cellspacing="0" cellpadding="0">
+<tr><td><a name="letter_B"></a><table border="0" cellspacing="0" cellpadding="0"><tr><td><div class="ah">&nbsp;&nbsp;B&nbsp;&nbsp;</div></td></tr></table>
+</td><td><a class="el" href="classxint_1_1divide__by__zero.html">divide_by_zero</a> (<a class="el" href="namespacexint.html">xint</a>)&nbsp;&nbsp;&nbsp;</td><td><a class="el" href="classxint_1_1invalid__modulus.html">invalid_modulus</a> (<a class="el" href="namespacexint.html">xint</a>)&nbsp;&nbsp;&nbsp;</td><td><a class="el" href="classxint_1_1overflow__error.html">overflow_error</a> (<a class="el" href="namespacexint.html">xint</a>)&nbsp;&nbsp;&nbsp;</td><td><a name="letter_S"></a><table border="0" cellspacing="0" cellpadding="0"><tr><td><div class="ah">&nbsp;&nbsp;S&nbsp;&nbsp;</div></td></tr></table>
+</td></tr><tr><td><a class="el" href="structxint_1_1detail_1_1base__random__generator.html">base_random_generator</a> (<a class="el" href="namespacexint_1_1detail.html">xint::detail</a>)&nbsp;&nbsp;&nbsp;</td><td><a name="letter_I"></a><table border="0" cellspacing="0" cellpadding="0"><tr><td><div class="ah">&nbsp;&nbsp;I&nbsp;&nbsp;</div></td></tr></table>
+</td><td><a name="letter_N"></a><table border="0" cellspacing="0" cellpadding="0"><tr><td><div class="ah">&nbsp;&nbsp;N&nbsp;&nbsp;</div></td></tr></table>
+</td><td><a name="letter_Q"></a><table border="0" cellspacing="0" cellpadding="0"><tr><td><div class="ah">&nbsp;&nbsp;Q&nbsp;&nbsp;</div></td></tr></table>
+</td><td><a class="el" href="classxint_1_1strong__random__generator.html">strong_random_generator</a> (<a class="el" href="namespacexint.html">xint</a>)&nbsp;&nbsp;&nbsp;</td></tr><tr><td><a name="letter_C"></a><table border="0" cellspacing="0" cellpadding="0"><tr><td><div class="ah">&nbsp;&nbsp;C&nbsp;&nbsp;</div></td></tr></table>
+</td><td><a class="el" href="classxint_1_1integer.html">integer</a> (<a class="el" href="namespacexint.html">xint</a>)&nbsp;&nbsp;&nbsp;</td><td><a class="el" href="classxint_1_1no__strong__random.html">no_strong_random</a> (<a class="el" href="namespacexint.html">xint</a>)&nbsp;&nbsp;&nbsp;</td><td><a class="el" href="structxint_1_1detail_1_1data__t_1_1_quick_digits.html">data_t::QuickDigits</a> (<a class="el" href="namespacexint_1_1detail.html">xint::detail</a>)&nbsp;&nbsp;&nbsp;</td><td><a name="letter_T"></a><table border="0" cellspacing="0" cellpadding="0"><tr><td><div class="ah">&nbsp;&nbsp;T&nbsp;&nbsp;</div></td></tr></table>
+</td></tr><tr><td><a class="el" href="classxint_1_1cannot__represent.html">cannot_represent</a> (<a class="el" href="namespacexint.html">xint</a>)&nbsp;&nbsp;&nbsp;</td><td><a class="el" href="classxint_1_1invalid__base.html">invalid_base</a> (<a class="el" href="namespacexint.html">xint</a>)&nbsp;&nbsp;&nbsp;</td><td><a class="el" href="classxint_1_1not__a__number.html">not_a_number</a> (<a class="el" href="namespacexint.html">xint</a>)&nbsp;&nbsp;&nbsp;</td><td><a name="letter_R"></a><table border="0" cellspacing="0" cellpadding="0"><tr><td><div class="ah">&nbsp;&nbsp;R&nbsp;&nbsp;</div></td></tr></table>
+</td><td><a class="el" href="structxint_1_1detail_1_1token.html">token</a> (<a class="el" href="namespacexint_1_1detail.html">xint::detail</a>)&nbsp;&nbsp;&nbsp;</td></tr><tr><td><a name="letter_D"></a><table border="0" cellspacing="0" cellpadding="0"><tr><td><div class="ah">&nbsp;&nbsp;D&nbsp;&nbsp;</div></td></tr></table>
+</td><td><a class="el" href="classxint_1_1invalid__digit.html">invalid_digit</a> (<a class="el" href="namespacexint.html">xint</a>)&nbsp;&nbsp;&nbsp;</td><td><a name="letter_O"></a><table border="0" cellspacing="0" cellpadding="0"><tr><td><div class="ah">&nbsp;&nbsp;O&nbsp;&nbsp;</div></td></tr></table>
+</td><td><a class="el" href="structxint_1_1detail_1_1random__generator.html">random_generator</a> (<a class="el" href="namespacexint_1_1detail.html">xint::detail</a>)&nbsp;&nbsp;&nbsp;</td><td><a class="el" href="classxint_1_1too__big.html">too_big</a> (<a class="el" href="namespacexint.html">xint</a>)&nbsp;&nbsp;&nbsp;</td></tr><tr><td><a class="el" href="structxint_1_1detail_1_1data__t.html">data_t</a> (<a class="el" href="namespacexint_1_1detail.html">xint::detail</a>)&nbsp;&nbsp;&nbsp;</td></tr></table><div class="qindex"><a class="qindex" href="#letter_B">B</a>&nbsp;|&nbsp;<a class="qindex" href="#letter_C">C</a>&nbsp;|&nbsp;<a class="qindex" href="#letter_D">D</a>&nbsp;|&nbsp;<a class="qindex" href="#letter_I">I</a>&nbsp;|&nbsp;<a class="qindex" href="#letter_N">N</a>&nbsp;|&nbsp;<a class="qindex" href="#letter_O">O</a>&nbsp;|&nbsp;<a class="qindex" href="#letter_Q">Q</a>&nbsp;|&nbsp;<a class="qindex" href="#letter_R">R</a>&nbsp;|&nbsp;<a class="qindex" href="#letter_S">S</a>&nbsp;|&nbsp;<a class="qin
dex" href="#letter_T">T</a></div>
+</div>
+<hr size="1"/><address style="text-align: right;"><small>Generated on Tue Apr 6 01:22:08 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.1 </small></address>
+</body>
+</html>

Added: sandbox/xint/doc/classxint_1_1cannot__represent-members.html
==============================================================================
--- (empty file)
+++ sandbox/xint/doc/classxint_1_1cannot__represent-members.html 2010-04-06 01:40:33 EDT (Tue, 06 Apr 2010)
@@ -0,0 +1,37 @@
+<!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.1 -->
+<div class="navigation" id="top">
+ <div class="tabs">
+ <ul>
+ <li>Main Page</li>
+ <li>Related Pages</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>xint::cannot_represent Member List</h1>This is the complete list of members for <a class="el" href="classxint_1_1cannot__represent.html">xint::cannot_represent</a>, including all inherited members.<table>
+ <tr class="memlist"><td><a class="el" href="classxint_1_1cannot__represent.html#ae551af601d2ab445a380a9c48e2a1db9">cannot_represent</a>(const std::string &amp;what=&quot;cannot represent the requested value&quot;)</td><td><a class="el" href="classxint_1_1cannot__represent.html">xint::cannot_represent</a></td><td><code> [inline]</code></td></tr>
+</table></div>
+<hr size="1"/><address style="text-align: right;"><small>Generated on Tue Apr 6 01:22:08 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.1 </small></address>
+</body>
+</html>

Added: sandbox/xint/doc/classxint_1_1cannot__represent.html
==============================================================================
--- (empty file)
+++ sandbox/xint/doc/classxint_1_1cannot__represent.html 2010-04-06 01:40:33 EDT (Tue, 06 Apr 2010)
@@ -0,0 +1,77 @@
+<!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: xint::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.1 -->
+<div class="navigation" id="top">
+ <div class="tabs">
+ <ul>
+ <li>Main Page</li>
+ <li>Related Pages</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="namespacexint.html">xint</a>::<a class="el" href="classxint_1_1cannot__represent.html">cannot_represent</a>
+ </div>
+</div>
+<div class="contents">
+<h1>xint::cannot_represent Class Reference</h1><!-- doxytag: class="xint::cannot_represent" -->
+<p>Exception class.
+More...</p>
+
+<p><code>#include &lt;<a class="el" href="xint_8hpp_source.html">xint.hpp</a>&gt;</code></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="classxint_1_1cannot__represent.html#ae551af601d2ab445a380a9c48e2a1db9">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>Exception class. </p>
+<p>Derived from <code>std::invalid_argument</code>. </p>
+
+<p>Definition at line <a class="el" href="xint_8hpp_source.html#l00452">452</a> of file <a class="el" href="xint_8hpp_source.html">xint.hpp</a>.</p>
+<hr/><h2>Constructor &amp; Destructor Documentation</h2>
+<a class="anchor" id="ae551af601d2ab445a380a9c48e2a1db9"></a><!-- doxytag: member="xint::cannot_represent::cannot_represent" ref="ae551af601d2ab445a380a9c48e2a1db9" 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">xint::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="xint_8hpp_source.html#l00454">454</a> of file <a class="el" href="xint_8hpp_source.html">xint.hpp</a>.</p>
+
+</div>
+</div>
+<hr/>The documentation for this class was generated from the following file:<ul>
+<li><a class="el" href="xint_8hpp_source.html">xint.hpp</a></li>
+</ul>
+</div>
+<hr size="1"/><address style="text-align: right;"><small>Generated on Tue Apr 6 01:22:08 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.1 </small></address>
+</body>
+</html>

Added: sandbox/xint/doc/classxint_1_1divide__by__zero-members.html
==============================================================================
--- (empty file)
+++ sandbox/xint/doc/classxint_1_1divide__by__zero-members.html 2010-04-06 01:40:33 EDT (Tue, 06 Apr 2010)
@@ -0,0 +1,37 @@
+<!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.1 -->
+<div class="navigation" id="top">
+ <div class="tabs">
+ <ul>
+ <li>Main Page</li>
+ <li>Related Pages</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>xint::divide_by_zero Member List</h1>This is the complete list of members for <a class="el" href="classxint_1_1divide__by__zero.html">xint::divide_by_zero</a>, including all inherited members.<table>
+ <tr class="memlist"><td><a class="el" href="classxint_1_1divide__by__zero.html#a31233d42a45ca6ef7078e700fa114ad2">divide_by_zero</a>(const std::string &amp;what=&quot;divide by zero error&quot;)</td><td><a class="el" href="classxint_1_1divide__by__zero.html">xint::divide_by_zero</a></td><td><code> [inline]</code></td></tr>
+</table></div>
+<hr size="1"/><address style="text-align: right;"><small>Generated on Tue Apr 6 01:22:08 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.1 </small></address>
+</body>
+</html>

Added: sandbox/xint/doc/classxint_1_1divide__by__zero.html
==============================================================================
--- (empty file)
+++ sandbox/xint/doc/classxint_1_1divide__by__zero.html 2010-04-06 01:40:33 EDT (Tue, 06 Apr 2010)
@@ -0,0 +1,77 @@
+<!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: xint::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.1 -->
+<div class="navigation" id="top">
+ <div class="tabs">
+ <ul>
+ <li>Main Page</li>
+ <li>Related Pages</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="namespacexint.html">xint</a>::<a class="el" href="classxint_1_1divide__by__zero.html">divide_by_zero</a>
+ </div>
+</div>
+<div class="contents">
+<h1>xint::divide_by_zero Class Reference</h1><!-- doxytag: class="xint::divide_by_zero" -->
+<p>Exception class.
+More...</p>
+
+<p><code>#include &lt;<a class="el" href="xint_8hpp_source.html">xint.hpp</a>&gt;</code></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="classxint_1_1divide__by__zero.html#a31233d42a45ca6ef7078e700fa114ad2">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>Exception class. </p>
+<p>Derived from <code>std::invalid_argument</code>. </p>
+
+<p>Definition at line <a class="el" href="xint_8hpp_source.html#l00442">442</a> of file <a class="el" href="xint_8hpp_source.html">xint.hpp</a>.</p>
+<hr/><h2>Constructor &amp; Destructor Documentation</h2>
+<a class="anchor" id="a31233d42a45ca6ef7078e700fa114ad2"></a><!-- doxytag: member="xint::divide_by_zero::divide_by_zero" ref="a31233d42a45ca6ef7078e700fa114ad2" 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">xint::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="xint_8hpp_source.html#l00444">444</a> of file <a class="el" href="xint_8hpp_source.html">xint.hpp</a>.</p>
+
+</div>
+</div>
+<hr/>The documentation for this class was generated from the following file:<ul>
+<li><a class="el" href="xint_8hpp_source.html">xint.hpp</a></li>
+</ul>
+</div>
+<hr size="1"/><address style="text-align: right;"><small>Generated on Tue Apr 6 01:22:08 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.1 </small></address>
+</body>
+</html>

Added: sandbox/xint/doc/classxint_1_1integer-members.html
==============================================================================
--- (empty file)
+++ sandbox/xint/doc/classxint_1_1integer-members.html 2010-04-06 01:40:33 EDT (Tue, 06 Apr 2010)
@@ -0,0 +1,75 @@
+<!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.1 -->
+<div class="navigation" id="top">
+ <div class="tabs">
+ <ul>
+ <li>Main Page</li>
+ <li>Related Pages</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>xint::integer Member List</h1>This is the complete list of members for <a class="el" href="classxint_1_1integer.html">xint::integer</a>, including all inherited members.<table>
+ <tr class="memlist"><td><a class="el" href="classxint_1_1integer.html#ae5578d7d5be17df3ecd3ddc5a852d0a0">_get_data</a>()</td><td><a class="el" href="classxint_1_1integer.html">xint::integer</a></td><td><code> [inline]</code></td></tr>
+ <tr class="memlist"><td><a class="el" href="classxint_1_1integer.html#aff99f7868567ae0dd4666a985873a5a7">_get_data</a>() const </td><td><a class="el" href="classxint_1_1integer.html">xint::integer</a></td><td><code> [inline]</code></td></tr>
+ <tr class="memlist"><td><a class="el" href="classxint_1_1integer.html#a81ab47d2f92ec66ac1586b61d7fd8b60">_get_digit</a>(size_t index) const </td><td><a class="el" href="classxint_1_1integer.html">xint::integer</a></td><td></td></tr>
+ <tr class="memlist"><td><a class="el" href="classxint_1_1integer.html#a33fe6f16dfba7b076f04a5ea40d8dccb">_get_digit</a>(size_t index, bool) const </td><td><a class="el" href="classxint_1_1integer.html">xint::integer</a></td><td></td></tr>
+ <tr class="memlist"><td><a class="el" href="classxint_1_1integer.html#a5723a74b98da2d5ed9452a7ec10c0ca2">_get_length</a>() const </td><td><a class="el" href="classxint_1_1integer.html">xint::integer</a></td><td></td></tr>
+ <tr class="memlist"><td><a class="el" href="classxint_1_1integer.html#adc5c7b5bc30c0cfa30d62610e0bc0366">_make_unique</a>()</td><td><a class="el" href="classxint_1_1integer.html">xint::integer</a></td><td></td></tr>
+ <tr class="memlist"><td><a class="el" href="classxint_1_1integer.html#ab2f4df250e1030c518180b7e832c5ebd">_set_negative</a>(bool negative)</td><td><a class="el" href="classxint_1_1integer.html">xint::integer</a></td><td></td></tr>
+ <tr class="memlist"><td><a class="el" href="classxint_1_1integer.html#ad5935c358b92f15064b1f910613f7a3e">_throw_if_nan</a>() const </td><td><a class="el" href="classxint_1_1integer.html">xint::integer</a></td><td></td></tr>
+ <tr class="memlist"><td><a class="el" href="classxint_1_1integer.html#a2ffb63eee276c65d8ea8b365adeb1ee2">even</a>() const </td><td><a class="el" href="classxint_1_1integer.html">xint::integer</a></td><td></td></tr>
+ <tr class="memlist"><td><a class="el" href="classxint_1_1integer.html#a25f066e30e4548bc22e0e9d75b809955">hex_digits</a>() const </td><td><a class="el" href="classxint_1_1integer.html">xint::integer</a></td><td></td></tr>
+ <tr class="memlist"><td><a class="el" href="classxint_1_1integer.html#ad32b3b13167c61e48aede083a3e1c7a8">integer</a>()</td><td><a class="el" href="classxint_1_1integer.html">xint::integer</a></td><td></td></tr>
+ <tr class="memlist"><td><a class="el" href="classxint_1_1integer.html#aa123fb47accd778f87e2866c9d986bb7">integer</a>(const integer &amp;b)</td><td><a class="el" href="classxint_1_1integer.html">xint::integer</a></td><td></td></tr>
+ <tr class="memlist"><td><a class="el" href="classxint_1_1integer.html#a67db70248d9890990c257a1d069192e3">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="classxint_1_1integer.html">xint::integer</a></td><td><code> [inline]</code></td></tr>
+ <tr class="memlist"><td><a class="el" href="classxint_1_1integer.html#a0cad684bc9d7032497c7178edb91a5eb">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="classxint_1_1integer.html">xint::integer</a></td><td><code> [inline]</code></td></tr>
+ <tr class="memlist"><td><a class="el" href="classxint_1_1integer.html#a6dfc86dfc539cfda1062ef1bc24aa526">integer</a>(const std::string &amp;str, size_t base=10)</td><td><a class="el" href="classxint_1_1integer.html">xint::integer</a></td><td><code> [explicit]</code></td></tr>
+ <tr class="memlist"><td><a class="el" href="classxint_1_1integer.html#a1211c9298c3281815bc9b709439d031a">integer</a>(const not_a_number &amp;)</td><td><a class="el" href="classxint_1_1integer.html">xint::integer</a></td><td><code> [explicit]</code></td></tr>
+ <tr class="memlist"><td><a class="el" href="classxint_1_1integer.html#a0bca68386478755dc787f981d9cd5606">is_nan</a>() const </td><td><a class="el" href="classxint_1_1integer.html">xint::integer</a></td><td></td></tr>
+ <tr class="memlist"><td><a class="el" href="classxint_1_1integer.html#af2d420708a02755a8851140928e50e23">odd</a>() const </td><td><a class="el" href="classxint_1_1integer.html">xint::integer</a></td><td></td></tr>
+ <tr class="memlist"><td><a class="el" href="classxint_1_1integer.html#a9237b21f4162146c7b5749b169c081b8">one</a>()</td><td><a class="el" href="classxint_1_1integer.html">xint::integer</a></td><td><code> [static]</code></td></tr>
+ <tr class="memlist"><td><a class="el" href="classxint_1_1integer.html#abee8874a961c2bb15a288494e096f36b">operator%=</a>(const integer &amp;b)</td><td><a class="el" href="classxint_1_1integer.html">xint::integer</a></td><td></td></tr>
+ <tr class="memlist"><td><a class="el" href="classxint_1_1integer.html#a0d4c730e3d45d3fa2895b706b202d860">operator&amp;=</a>(const integer &amp;n)</td><td><a class="el" href="classxint_1_1integer.html">xint::integer</a></td><td></td></tr>
+ <tr class="memlist"><td><a class="el" href="classxint_1_1integer.html#a531cdc9ce5667c4553fd1e4dac151b51">operator*=</a>(const integer &amp;b)</td><td><a class="el" href="classxint_1_1integer.html">xint::integer</a></td><td></td></tr>
+ <tr class="memlist"><td><a class="el" href="classxint_1_1integer.html#a60cd241278892070d14a0d57e45c9264">operator++</a>()</td><td><a class="el" href="classxint_1_1integer.html">xint::integer</a></td><td></td></tr>
+ <tr class="memlist"><td><a class="el" href="classxint_1_1integer.html#a79624fb580bdb2ba19fe13223c801c25">operator++</a>(int)</td><td><a class="el" href="classxint_1_1integer.html">xint::integer</a></td><td></td></tr>
+ <tr class="memlist"><td><a class="el" href="classxint_1_1integer.html#aa0259f75f66b97b68310cfed2c0ecc7b">operator+=</a>(const integer &amp;b)</td><td><a class="el" href="classxint_1_1integer.html">xint::integer</a></td><td></td></tr>
+ <tr class="memlist"><td><a class="el" href="classxint_1_1integer.html#a48452b868e2279e202039c9918f0dcf3">operator--</a>()</td><td><a class="el" href="classxint_1_1integer.html">xint::integer</a></td><td></td></tr>
+ <tr class="memlist"><td><a class="el" href="classxint_1_1integer.html#a40ff1ffeda1df544b8bcd907f76d93cd">operator--</a>(int)</td><td><a class="el" href="classxint_1_1integer.html">xint::integer</a></td><td></td></tr>
+ <tr class="memlist"><td><a class="el" href="classxint_1_1integer.html#a2ce7f54adccb88836d1474fc67fa9a62">operator-=</a>(const integer &amp;b)</td><td><a class="el" href="classxint_1_1integer.html">xint::integer</a></td><td></td></tr>
+ <tr class="memlist"><td><a class="el" href="classxint_1_1integer.html#a3366a33f7ca5ad3285515e260d0dce66">operator/=</a>(const integer &amp;b)</td><td><a class="el" href="classxint_1_1integer.html">xint::integer</a></td><td></td></tr>
+ <tr class="memlist"><td><a class="el" href="classxint_1_1integer.html#a3733741d7e1c8ba1c1f490c8949a308f">operator&lt;&lt;</a>(size_t shift) const </td><td><a class="el" href="classxint_1_1integer.html">xint::integer</a></td><td></td></tr>
+ <tr class="memlist"><td><a class="el" href="classxint_1_1integer.html#a14545146f86ed797e97758d8aea32ecd">operator&lt;&lt;=</a>(size_t shift)</td><td><a class="el" href="classxint_1_1integer.html">xint::integer</a></td><td></td></tr>
+ <tr class="memlist"><td><a class="el" href="classxint_1_1integer.html#abfa13a313f2782885bbbfa9a5f4a22c2">operator=</a>(const integer &amp;c)</td><td><a class="el" href="classxint_1_1integer.html">xint::integer</a></td><td></td></tr>
+ <tr class="memlist"><td><a class="el" href="classxint_1_1integer.html#a5cbc6986de4ca89b49162736f8750986">operator&gt;&gt;</a>(size_t shift) const </td><td><a class="el" href="classxint_1_1integer.html">xint::integer</a></td><td></td></tr>
+ <tr class="memlist"><td><a class="el" href="classxint_1_1integer.html#aa0151e58a97bc1801221907d68582ec2">operator&gt;&gt;=</a>(size_t shift)</td><td><a class="el" href="classxint_1_1integer.html">xint::integer</a></td><td></td></tr>
+ <tr class="memlist"><td><a class="el" href="classxint_1_1integer.html#afc13b5ae9c6f28ef5e75777976aeb56d">operator^=</a>(const integer &amp;n)</td><td><a class="el" href="classxint_1_1integer.html">xint::integer</a></td><td></td></tr>
+ <tr class="memlist"><td><a class="el" href="classxint_1_1integer.html#a1af418341e64a317b4cc41fcddaa849f">operator|=</a>(const integer &amp;n)</td><td><a class="el" href="classxint_1_1integer.html">xint::integer</a></td><td></td></tr>
+ <tr class="memlist"><td><a class="el" href="classxint_1_1integer.html#a5d84398ce89b376f695ccded2d20c8c2">sign</a>() const </td><td><a class="el" href="classxint_1_1integer.html">xint::integer</a></td><td></td></tr>
+ <tr class="memlist"><td><a class="el" href="classxint_1_1integer.html#a64a0f99de7c33239237cb59d8464f3d2">zero</a>()</td><td><a class="el" href="classxint_1_1integer.html">xint::integer</a></td><td><code> [static]</code></td></tr>
+ <tr class="memlist"><td><a class="el" href="classxint_1_1integer.html#a4f687cc90353b1c347448f1d94fa157e">~integer</a>()</td><td><a class="el" href="classxint_1_1integer.html">xint::integer</a></td><td></td></tr>
+</table></div>
+<hr size="1"/><address style="text-align: right;"><small>Generated on Tue Apr 6 01:22:08 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.1 </small></address>
+</body>
+</html>

Added: sandbox/xint/doc/classxint_1_1integer.html
==============================================================================
--- (empty file)
+++ sandbox/xint/doc/classxint_1_1integer.html 2010-04-06 01:40:33 EDT (Tue, 06 Apr 2010)
@@ -0,0 +1,1040 @@
+<!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: 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.1 -->
+<div class="navigation" id="top">
+ <div class="tabs">
+ <ul>
+ <li>Main Page</li>
+ <li>Related Pages</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="namespacexint.html">xint</a>::<a class="el" href="classxint_1_1integer.html">integer</a>
+ </div>
+</div>
+<div class="contents">
+<h1>xint::integer Class Reference</h1><!-- doxytag: class="xint::integer" -->
+<p>The extended integer class.
+More...</p>
+
+<p><code>#include &lt;<a class="el" href="xint_8hpp_source.html">xint.hpp</a>&gt;</code></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 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>
+<br/><br/></div></td></tr>
+<tr><td class="memItemLeft" align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classxint_1_1integer.html#ad32b3b13167c61e48aede083a3e1c7a8">integer</a> ()</td></tr>
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Creates a new <a class="el" href="classxint_1_1integer.html" title="The extended integer class.">integer</a> with an initial value of zero. <br/></td></tr>
+<tr><td class="memItemLeft" align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classxint_1_1integer.html#aa123fb47accd778f87e2866c9d986bb7">integer</a> (const <a class="el" href="classxint_1_1integer.html">integer</a> &amp;b)</td></tr>
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Creates a copy of an existing <a class="el" href="classxint_1_1integer.html" title="The extended integer class.">integer</a>. <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="classxint_1_1integer.html#a67db70248d9890990c257a1d069192e3">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="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="classxint_1_1integer.html#a0cad684bc9d7032497c7178edb91a5eb">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="memItemLeft" align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classxint_1_1integer.html#a6dfc86dfc539cfda1062ef1bc24aa526">integer</a> (const std::string &amp;str, size_t base=10)</td></tr>
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Create an <a class="el" href="classxint_1_1integer.html" title="The extended integer class.">integer</a> 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="classxint_1_1integer.html#a1211c9298c3281815bc9b709439d031a">integer</a> (const <a class="el" href="classxint_1_1not__a__number.html">not_a_number</a> &amp;)</td></tr>
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Creates an <a class="el" href="classxint_1_1integer.html" title="The extended integer class.">integer</a> with the value of Not-a-Number. <br/></td></tr>
+<tr><td class="memItemLeft" align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classxint_1_1integer.html#a4f687cc90353b1c347448f1d94fa157e">~integer</a> ()</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 <a class="el" href="classxint_1_1integer.html" title="The extended integer class.">integer</a> type doesn't have a fixed maximum size, there is no logical way to implement it. </p>
+<br/><br/></div></td></tr>
+<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="classxint_1_1integer.html">integer</a> &amp;&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classxint_1_1integer.html#abfa13a313f2782885bbbfa9a5f4a22c2">operator=</a> (const <a class="el" href="classxint_1_1integer.html">integer</a> &amp;c)</td></tr>
+<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="classxint_1_1integer.html">integer</a> &amp;&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classxint_1_1integer.html#aa0259f75f66b97b68310cfed2c0ecc7b">operator+=</a> (const <a class="el" href="classxint_1_1integer.html">integer</a> &amp;b)</td></tr>
+<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="classxint_1_1integer.html">integer</a> &amp;&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classxint_1_1integer.html#a2ce7f54adccb88836d1474fc67fa9a62">operator-=</a> (const <a class="el" href="classxint_1_1integer.html">integer</a> &amp;b)</td></tr>
+<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="classxint_1_1integer.html">integer</a> &amp;&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classxint_1_1integer.html#a531cdc9ce5667c4553fd1e4dac151b51">operator*=</a> (const <a class="el" href="classxint_1_1integer.html">integer</a> &amp;b)</td></tr>
+<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="classxint_1_1integer.html">integer</a> &amp;&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classxint_1_1integer.html#a3366a33f7ca5ad3285515e260d0dce66">operator/=</a> (const <a class="el" href="classxint_1_1integer.html">integer</a> &amp;b)</td></tr>
+<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="classxint_1_1integer.html">integer</a> &amp;&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classxint_1_1integer.html#abee8874a961c2bb15a288494e096f36b">operator%=</a> (const <a class="el" href="classxint_1_1integer.html">integer</a> &amp;b)</td></tr>
+<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="classxint_1_1integer.html">integer</a> &amp;&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classxint_1_1integer.html#a60cd241278892070d14a0d57e45c9264">operator++</a> ()</td></tr>
+<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="classxint_1_1integer.html">integer</a> &amp;&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classxint_1_1integer.html#a48452b868e2279e202039c9918f0dcf3">operator--</a> ()</td></tr>
+<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="classxint_1_1integer.html">integer</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classxint_1_1integer.html#a79624fb580bdb2ba19fe13223c801c25">operator++</a> (int)</td></tr>
+<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="classxint_1_1integer.html">integer</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classxint_1_1integer.html#a40ff1ffeda1df544b8bcd907f76d93cd">operator--</a> (int)</td></tr>
+<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="classxint_1_1integer.html">integer</a> &amp;&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classxint_1_1integer.html#a0d4c730e3d45d3fa2895b706b202d860">operator&amp;=</a> (const <a class="el" href="classxint_1_1integer.html">integer</a> &amp;n)</td></tr>
+<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="classxint_1_1integer.html">integer</a> &amp;&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classxint_1_1integer.html#a1af418341e64a317b4cc41fcddaa849f">operator|=</a> (const <a class="el" href="classxint_1_1integer.html">integer</a> &amp;n)</td></tr>
+<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="classxint_1_1integer.html">integer</a> &amp;&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classxint_1_1integer.html#afc13b5ae9c6f28ef5e75777976aeb56d">operator^=</a> (const <a class="el" href="classxint_1_1integer.html">integer</a> &amp;n)</td></tr>
+<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="classxint_1_1integer.html">integer</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classxint_1_1integer.html#a3733741d7e1c8ba1c1f490c8949a308f">operator&lt;&lt;</a> (size_t shift) const </td></tr>
+<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="classxint_1_1integer.html">integer</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classxint_1_1integer.html#a5cbc6986de4ca89b49162736f8750986">operator&gt;&gt;</a> (size_t shift) const </td></tr>
+<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="classxint_1_1integer.html">integer</a> &amp;&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classxint_1_1integer.html#a14545146f86ed797e97758d8aea32ecd">operator&lt;&lt;=</a> (size_t shift)</td></tr>
+<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="classxint_1_1integer.html">integer</a> &amp;&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classxint_1_1integer.html#aa0151e58a97bc1801221907d68582ec2">operator&gt;&gt;=</a> (size_t shift)</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>
+<br/><br/></div></td></tr>
+<tr><td class="memItemLeft" align="right" valign="top">bool&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classxint_1_1integer.html#af2d420708a02755a8851140928e50e23">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">bool&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classxint_1_1integer.html#a2ffb63eee276c65d8ea8b365adeb1ee2">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">int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classxint_1_1integer.html#a5d84398ce89b376f695ccded2d20c8c2">sign</a> () const </td></tr>
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Tests the sign of <code>*this</code>. <br/></td></tr>
+<tr><td class="memItemLeft" align="right" valign="top">bool&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classxint_1_1integer.html#a0bca68386478755dc787f981d9cd5606">is_nan</a> () const </td></tr>
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Tests <code>*this</code> for Not-a-Number. <br/></td></tr>
+<tr><td class="memItemLeft" align="right" valign="top">size_t&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classxint_1_1integer.html#a25f066e30e4548bc22e0e9d75b809955">hex_digits</a> () const </td></tr>
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Tells you roughly how large an <a class="el" href="classxint_1_1integer.html" title="The extended integer class.">integer</a> is. <br/></td></tr>
+<tr><td colspan="2"><div class="groupHeader">Internal Functions</div></td></tr>
+<tr><td colspan="2"><div class="groupText"><p><a class="anchor" id="amgrpae260ff3a3a80dad696f01482c30bb91"></a>These functions allow access to the internals of the integer. They are intended for internal use only. </p>
+<br/><br/></div></td></tr>
+<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="structxint_1_1detail_1_1data__t.html">detail::data_t</a> *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classxint_1_1integer.html#ae5578d7d5be17df3ecd3ddc5a852d0a0">_get_data</a> ()</td></tr>
+<tr><td class="memItemLeft" align="right" valign="top">const <a class="el" href="structxint_1_1detail_1_1data__t.html">detail::data_t</a> *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classxint_1_1integer.html#aff99f7868567ae0dd4666a985873a5a7">_get_data</a> () const </td></tr>
+<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="namespacexint_1_1detail.html#a8843fb7e364832d8d5983de28bdbcf34">detail::digit_t</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classxint_1_1integer.html#a81ab47d2f92ec66ac1586b61d7fd8b60">_get_digit</a> (size_t index) const </td></tr>
+<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="namespacexint_1_1detail.html#a8843fb7e364832d8d5983de28bdbcf34">detail::digit_t</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classxint_1_1integer.html#a33fe6f16dfba7b076f04a5ea40d8dccb">_get_digit</a> (size_t index, bool) const </td></tr>
+<tr><td class="memItemLeft" align="right" valign="top">size_t&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classxint_1_1integer.html#a5723a74b98da2d5ed9452a7ec10c0ca2">_get_length</a> () const </td></tr>
+<tr><td class="memItemLeft" align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classxint_1_1integer.html#ab2f4df250e1030c518180b7e832c5ebd">_set_negative</a> (bool negative)</td></tr>
+<tr><td class="memItemLeft" align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classxint_1_1integer.html#adc5c7b5bc30c0cfa30d62610e0bc0366">_make_unique</a> ()</td></tr>
+<tr><td class="memItemLeft" align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classxint_1_1integer.html#ad5935c358b92f15064b1f910613f7a3e">_throw_if_nan</a> () const </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, but they are available to your own code as well. </p>
+<br/><br/></div></td></tr>
+<tr><td class="memItemLeft" align="right" valign="top">static const <a class="el" href="classxint_1_1integer.html">integer</a> &amp;&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classxint_1_1integer.html#a64a0f99de7c33239237cb59d8464f3d2">zero</a> ()</td></tr>
+<tr><td class="memItemLeft" align="right" valign="top">static const <a class="el" href="classxint_1_1integer.html">integer</a> &amp;&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classxint_1_1integer.html#a9237b21f4162146c7b5749b169c081b8">one</a> ()</td></tr>
+</table>
+<hr/><a name="_details"></a><h2>Detailed Description</h2>
+<p>The extended integer class. </p>
+<p>This class implements the main <code><a class="el" href="classxint_1_1integer.html" title="The extended integer class.">integer</a></code> type.</p>
+<p>There are only a few member functions; most of the functionality is implemented using standalone functions.</p>
+<p>Functions that start with an underscore (such as <code>_make_unique</code>) are intended for internal use only. They may change arbitrarily in future versions. </p>
+
+<p>Definition at line <a class="el" href="xint_8hpp_source.html#l00141">141</a> of file <a class="el" href="xint_8hpp_source.html">xint.hpp</a>.</p>
+<hr/><h2>Constructor &amp; Destructor Documentation</h2>
+<a class="anchor" id="ad32b3b13167c61e48aede083a3e1c7a8"></a><!-- doxytag: member="xint::integer::integer" ref="ad32b3b13167c61e48aede083a3e1c7a8" args="()" -->
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname">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 <a class="el" href="classxint_1_1integer.html" title="The extended integer class.">integer</a> with an initial value of zero. </p>
+
+<p>Definition at line <a class="el" href="integer_8cpp_source.html#l00034">34</a> of file <a class="el" href="integer_8cpp_source.html">integer.cpp</a>.</p>
+
+</div>
+</div>
+<a class="anchor" id="aa123fb47accd778f87e2866c9d986bb7"></a><!-- doxytag: member="xint::integer::integer" ref="aa123fb47accd778f87e2866c9d986bb7" args="(const integer &amp;b)" -->
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname">xint::integer::integer </td>
+ <td>(</td>
+ <td class="paramtype">const <a class="el" href="classxint_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 <a class="el" href="classxint_1_1integer.html" title="The extended integer class.">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="classxint_1_1integer.html" title="The extended integer class.">integer</a>. If passed a Not-a-Number, it will create another Not-a-Number.</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#l00049">49</a> of file <a class="el" href="integer_8cpp_source.html">integer.cpp</a>.</p>
+
+</div>
+</div>
+<a class="anchor" id="a67db70248d9890990c257a1d069192e3"></a><!-- doxytag: member="xint::integer::integer" ref="a67db70248d9890990c257a1d069192e3" 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">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 <a class="el" href="classxint_1_1integer.html" title="The extended integer class.">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>
+
+<p>Definition at line <a class="el" href="xint_8hpp_source.html#l00540">540</a> of file <a class="el" href="xint_8hpp_source.html">xint.hpp</a>.</p>
+
+</div>
+</div>
+<a class="anchor" id="a0cad684bc9d7032497c7178edb91a5eb"></a><!-- doxytag: member="xint::integer::integer" ref="a0cad684bc9d7032497c7178edb91a5eb" 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">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 <a class="el" href="classxint_1_1integer.html" title="The extended integer class.">integer</a> 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="xint_8hpp_source.html#l00573">573</a> of file <a class="el" href="xint_8hpp_source.html">xint.hpp</a>.</p>
+
+</div>
+</div>
+<a class="anchor" id="a6dfc86dfc539cfda1062ef1bc24aa526"></a><!-- doxytag: member="xint::integer::integer" ref="a6dfc86dfc539cfda1062ef1bc24aa526" args="(const std::string &amp;str, size_t base=10)" -->
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname">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 <a class="el" href="classxint_1_1integer.html" title="The extended integer class.">integer</a> from a string representation. </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>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="namespacexint.html#a7a5434a5f5fb1db19f0de18014c4fc41">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="classxint_1_1invalid__base.html" title="Exception class.">xint::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="namespacexint.html#a7a5434a5f5fb1db19f0de18014c4fc41">xint::autobase</a>. </td></tr>
+ <tr><td valign="top"></td><td valign="top"><em><a class="el" href="classxint_1_1invalid__digit.html" title="Exception class.">xint::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 <a class="el" href="classxint_1_1integer.html" title="The extended integer class.">integer</a>. See the description of the <a class="el" href="namespacexint.html#ad9dcb2b835be5f8ee918979945911ac0" title="Converts a string into an integer.">xint::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#l00074">74</a> of file <a class="el" href="integer_8cpp_source.html">integer.cpp</a>.</p>
+
+</div>
+</div>
+<a class="anchor" id="a1211c9298c3281815bc9b709439d031a"></a><!-- doxytag: member="xint::integer::integer" ref="a1211c9298c3281815bc9b709439d031a" args="(const not_a_number &amp;)" -->
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname">xint::integer::integer </td>
+ <td>(</td>
+ <td class="paramtype">const <a class="el" href="classxint_1_1not__a__number.html">not_a_number</a> &amp;&nbsp;</td>
+ <td class="paramname"> <em>n</em></td>
+ <td>&nbsp;)&nbsp;</td>
+ <td><code> [explicit]</code></td>
+ </tr>
+ </table>
+</div>
+<div class="memdoc">
+
+<p>Creates an <a class="el" href="classxint_1_1integer.html" title="The extended integer class.">integer</a> with the value of Not-a-Number. </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>An <a class="el" href="classxint_1_1not__a__number.html" title="Exception class.">xint::not_a_number</a> object (normally used as an exception class).</td></tr>
+ </table>
+ </dd>
+</dl>
+<dl class="remark"><dt><b>Remarks:</b></dt><dd>This is the official way to create an <a class="el" href="classxint_1_1integer.html" title="The extended integer class.">integer</a> with the Not-a-Number value, if you ever wish to use that value for your own purposes.</dd></dl>
+<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="nan.html">The Not-a-Number Value</a></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#l00090">90</a> of file <a class="el" href="integer_8cpp_source.html">integer.cpp</a>.</p>
+
+</div>
+</div>
+<a class="anchor" id="a4f687cc90353b1c347448f1d94fa157e"></a><!-- doxytag: member="xint::integer::~integer" ref="a4f687cc90353b1c347448f1d94fa157e" args="()" -->
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname">xint::integer::~integer </td>
+ <td>(</td>
+ <td class="paramname"></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#l00094">94</a> of file <a class="el" href="integer_8cpp_source.html">integer.cpp</a>.</p>
+
+</div>
+</div>
+<hr/><h2>Member Function Documentation</h2>
+<a class="anchor" id="aff99f7868567ae0dd4666a985873a5a7"></a><!-- doxytag: member="xint::integer::_get_data" ref="aff99f7868567ae0dd4666a985873a5a7" args="() const " -->
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname">const <a class="el" href="structxint_1_1detail_1_1data__t.html">detail::data_t</a>* xint::integer::_get_data </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="xint_8hpp_source.html#l00217">217</a> of file <a class="el" href="xint_8hpp_source.html">xint.hpp</a>.</p>
+
+</div>
+</div>
+<a class="anchor" id="ae5578d7d5be17df3ecd3ddc5a852d0a0"></a><!-- doxytag: member="xint::integer::_get_data" ref="ae5578d7d5be17df3ecd3ddc5a852d0a0" args="()" -->
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname"><a class="el" href="structxint_1_1detail_1_1data__t.html">detail::data_t</a>* xint::integer::_get_data </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="xint_8hpp_source.html#l00216">216</a> of file <a class="el" href="xint_8hpp_source.html">xint.hpp</a>.</p>
+
+</div>
+</div>
+<a class="anchor" id="a33fe6f16dfba7b076f04a5ea40d8dccb"></a><!-- doxytag: member="xint::integer::_get_digit" ref="a33fe6f16dfba7b076f04a5ea40d8dccb" args="(size_t index, bool) const " -->
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname"><a class="el" href="namespacexint_1_1detail.html#a8843fb7e364832d8d5983de28bdbcf34">detail::digit_t</a> xint::integer::_get_digit </td>
+ <td>(</td>
+ <td class="paramtype">size_t&nbsp;</td>
+ <td class="paramname"> <em>index</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">bool&nbsp;</td>
+ <td class="paramname"></td><td>&nbsp;</td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>)</td>
+ <td></td><td></td><td> const</td>
+ </tr>
+ </table>
+</div>
+<div class="memdoc">
+<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#l00293">293</a> of file <a class="el" href="integer_8cpp_source.html">integer.cpp</a>.</p>
+
+</div>
+</div>
+<a class="anchor" id="a81ab47d2f92ec66ac1586b61d7fd8b60"></a><!-- doxytag: member="xint::integer::_get_digit" ref="a81ab47d2f92ec66ac1586b61d7fd8b60" args="(size_t index) const " -->
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname"><a class="el" href="namespacexint_1_1detail.html#a8843fb7e364832d8d5983de28bdbcf34">detail::digit_t</a> xint::integer::_get_digit </td>
+ <td>(</td>
+ <td class="paramtype">size_t&nbsp;</td>
+ <td class="paramname"> <em>index</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#l00289">289</a> of file <a class="el" href="integer_8cpp_source.html">integer.cpp</a>.</p>
+
+</div>
+</div>
+<a class="anchor" id="a5723a74b98da2d5ed9452a7ec10c0ca2"></a><!-- doxytag: member="xint::integer::_get_length" ref="a5723a74b98da2d5ed9452a7ec10c0ca2" args="() const " -->
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname">size_t xint::integer::_get_length </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#l00298">298</a> of file <a class="el" href="integer_8cpp_source.html">integer.cpp</a>.</p>
+
+</div>
+</div>
+<a class="anchor" id="adc5c7b5bc30c0cfa30d62610e0bc0366"></a><!-- doxytag: member="xint::integer::_make_unique" ref="adc5c7b5bc30c0cfa30d62610e0bc0366" args="()" -->
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname">void xint::integer::_make_unique </td>
+ <td>(</td>
+ <td class="paramname"></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="ab2f4df250e1030c518180b7e832c5ebd"></a><!-- doxytag: member="xint::integer::_set_negative" ref="ab2f4df250e1030c518180b7e832c5ebd" args="(bool negative)" -->
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname">void xint::integer::_set_negative </td>
+ <td>(</td>
+ <td class="paramtype">bool&nbsp;</td>
+ <td class="paramname"> <em>negative</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#l00156">156</a> of file <a class="el" href="integer_8cpp_source.html">integer.cpp</a>.</p>
+
+</div>
+</div>
+<a class="anchor" id="ad5935c358b92f15064b1f910613f7a3e"></a><!-- doxytag: member="xint::integer::_throw_if_nan" ref="ad5935c358b92f15064b1f910613f7a3e" args="() const " -->
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname">void xint::integer::_throw_if_nan </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#l00302">302</a> of file <a class="el" href="integer_8cpp_source.html">integer.cpp</a>.</p>
+
+</div>
+</div>
+<a class="anchor" id="a2ffb63eee276c65d8ea8b365adeb1ee2"></a><!-- doxytag: member="xint::integer::even" ref="a2ffb63eee276c65d8ea8b365adeb1ee2" args="() const " -->
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname">bool 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>
+<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#l00173">173</a> of file <a class="el" href="integer_8cpp_source.html">integer.cpp</a>.</p>
+
+</div>
+</div>
+<a class="anchor" id="a25f066e30e4548bc22e0e9d75b809955"></a><!-- doxytag: member="xint::integer::hex_digits" ref="a25f066e30e4548bc22e0e9d75b809955" args="() const " -->
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname">size_t 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 an <a class="el" href="classxint_1_1integer.html" title="The extended integer class.">integer</a> is. </p>
+<dl class="return"><dt><b>Returns:</b></dt><dd>the number of hex digits to show the <a class="el" href="classxint_1_1integer.html" title="The extended integer class.">integer</a>.</dd>
+<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#l00205">205</a> of file <a class="el" href="integer_8cpp_source.html">integer.cpp</a>.</p>
+
+</div>
+</div>
+<a class="anchor" id="a0bca68386478755dc787f981d9cd5606"></a><!-- doxytag: member="xint::integer::is_nan" ref="a0bca68386478755dc787f981d9cd5606" args="() const " -->
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname">bool xint::integer::is_nan </td>
+ <td>(</td>
+ <td class="paramname"></td>
+ <td>&nbsp;)&nbsp;</td>
+ <td> const</td>
+ </tr>
+ </table>
+</div>
+<div class="memdoc">
+
+<p>Tests <code>*this</code> for Not-a-Number. </p>
+<dl class="return"><dt><b>Returns:</b></dt><dd>true if <a class="el" href="classxint_1_1integer.html" title="The extended integer class.">integer</a> is Not-a-Number.</dd>
+<dd>
+<code>true</code> if <code>*this</code> is Not-a-Number, otherwise <code>false</code>.</dd></dl>
+<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="nan.html">The Not-a-Number Value</a> </dd></dl>
+
+<p>Definition at line <a class="el" href="integer_8cpp_source.html#l00196">196</a> of file <a class="el" href="integer_8cpp_source.html">integer.cpp</a>.</p>
+
+</div>
+</div>
+<a class="anchor" id="af2d420708a02755a8851140928e50e23"></a><!-- doxytag: member="xint::integer::odd" ref="af2d420708a02755a8851140928e50e23" args="() const " -->
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname">bool 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>
+<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#l00164">164</a> of file <a class="el" href="integer_8cpp_source.html">integer.cpp</a>.</p>
+
+</div>
+</div>
+<a class="anchor" id="a9237b21f4162146c7b5749b169c081b8"></a><!-- doxytag: member="xint::integer::one" ref="a9237b21f4162146c7b5749b169c081b8" args="()" -->
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname">const <a class="el" href="classxint_1_1integer.html">integer</a> &amp; 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#l00284">284</a> of file <a class="el" href="integer_8cpp_source.html">integer.cpp</a>.</p>
+
+</div>
+</div>
+<a class="anchor" id="abee8874a961c2bb15a288494e096f36b"></a><!-- doxytag: member="xint::integer::operator%=" ref="abee8874a961c2bb15a288494e096f36b" args="(const integer &amp;b)" -->
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname"><a class="el" href="classxint_1_1integer.html">integer</a> &amp; xint::integer::operator%= </td>
+ <td>(</td>
+ <td class="paramtype">const <a class="el" href="classxint_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#l00250">250</a> of file <a class="el" href="integer_8cpp_source.html">integer.cpp</a>.</p>
+
+</div>
+</div>
+<a class="anchor" id="a0d4c730e3d45d3fa2895b706b202d860"></a><!-- doxytag: member="xint::integer::operator&amp;=" ref="a0d4c730e3d45d3fa2895b706b202d860" args="(const integer &amp;n)" -->
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname"><a class="el" href="classxint_1_1integer.html">integer</a> &amp; xint::integer::operator&amp;= </td>
+ <td>(</td>
+ <td class="paramtype">const <a class="el" href="classxint_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#l00259">259</a> of file <a class="el" href="integer_8cpp_source.html">integer.cpp</a>.</p>
+
+</div>
+</div>
+<a class="anchor" id="a531cdc9ce5667c4553fd1e4dac151b51"></a><!-- doxytag: member="xint::integer::operator*=" ref="a531cdc9ce5667c4553fd1e4dac151b51" args="(const integer &amp;b)" -->
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname"><a class="el" href="classxint_1_1integer.html">integer</a> &amp; xint::integer::operator*= </td>
+ <td>(</td>
+ <td class="paramtype">const <a class="el" href="classxint_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#l00248">248</a> of file <a class="el" href="integer_8cpp_source.html">integer.cpp</a>.</p>
+
+</div>
+</div>
+<a class="anchor" id="a79624fb580bdb2ba19fe13223c801c25"></a><!-- doxytag: member="xint::integer::operator++" ref="a79624fb580bdb2ba19fe13223c801c25" args="(int)" -->
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname"><a class="el" href="classxint_1_1integer.html">integer</a> 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#l00254">254</a> of file <a class="el" href="integer_8cpp_source.html">integer.cpp</a>.</p>
+
+</div>
+</div>
+<a class="anchor" id="a60cd241278892070d14a0d57e45c9264"></a><!-- doxytag: member="xint::integer::operator++" ref="a60cd241278892070d14a0d57e45c9264" args="()" -->
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname"><a class="el" href="classxint_1_1integer.html">integer</a> &amp; 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#l00252">252</a> of file <a class="el" href="integer_8cpp_source.html">integer.cpp</a>.</p>
+
+</div>
+</div>
+<a class="anchor" id="aa0259f75f66b97b68310cfed2c0ecc7b"></a><!-- doxytag: member="xint::integer::operator+=" ref="aa0259f75f66b97b68310cfed2c0ecc7b" args="(const integer &amp;b)" -->
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname"><a class="el" href="classxint_1_1integer.html">integer</a> &amp; xint::integer::operator+= </td>
+ <td>(</td>
+ <td class="paramtype">const <a class="el" href="classxint_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#l00211">211</a> of file <a class="el" href="integer_8cpp_source.html">integer.cpp</a>.</p>
+
+</div>
+</div>
+<a class="anchor" id="a40ff1ffeda1df544b8bcd907f76d93cd"></a><!-- doxytag: member="xint::integer::operator&#45;&#45;" ref="a40ff1ffeda1df544b8bcd907f76d93cd" args="(int)" -->
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname"><a class="el" href="classxint_1_1integer.html">integer</a> 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#l00255">255</a> of file <a class="el" href="integer_8cpp_source.html">integer.cpp</a>.</p>
+
+</div>
+</div>
+<a class="anchor" id="a48452b868e2279e202039c9918f0dcf3"></a><!-- doxytag: member="xint::integer::operator&#45;&#45;" ref="a48452b868e2279e202039c9918f0dcf3" args="()" -->
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname"><a class="el" href="classxint_1_1integer.html">integer</a> &amp; 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#l00253">253</a> of file <a class="el" href="integer_8cpp_source.html">integer.cpp</a>.</p>
+
+</div>
+</div>
+<a class="anchor" id="a2ce7f54adccb88836d1474fc67fa9a62"></a><!-- doxytag: member="xint::integer::operator&#45;=" ref="a2ce7f54adccb88836d1474fc67fa9a62" args="(const integer &amp;b)" -->
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname"><a class="el" href="classxint_1_1integer.html">integer</a> &amp; xint::integer::operator-= </td>
+ <td>(</td>
+ <td class="paramtype">const <a class="el" href="classxint_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#l00225">225</a> of file <a class="el" href="integer_8cpp_source.html">integer.cpp</a>.</p>
+
+</div>
+</div>
+<a class="anchor" id="a3366a33f7ca5ad3285515e260d0dce66"></a><!-- doxytag: member="xint::integer::operator/=" ref="a3366a33f7ca5ad3285515e260d0dce66" args="(const integer &amp;b)" -->
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname"><a class="el" href="classxint_1_1integer.html">integer</a> &amp; xint::integer::operator/= </td>
+ <td>(</td>
+ <td class="paramtype">const <a class="el" href="classxint_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#l00249">249</a> of file <a class="el" href="integer_8cpp_source.html">integer.cpp</a>.</p>
+
+</div>
+</div>
+<a class="anchor" id="a3733741d7e1c8ba1c1f490c8949a308f"></a><!-- doxytag: member="xint::integer::operator&lt;&lt;" ref="a3733741d7e1c8ba1c1f490c8949a308f" args="(size_t shift) const " -->
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname"><a class="el" href="classxint_1_1integer.html">integer</a> 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#l00257">257</a> of file <a class="el" href="integer_8cpp_source.html">integer.cpp</a>.</p>
+
+</div>
+</div>
+<a class="anchor" id="a14545146f86ed797e97758d8aea32ecd"></a><!-- doxytag: member="xint::integer::operator&lt;&lt;=" ref="a14545146f86ed797e97758d8aea32ecd" args="(size_t shift)" -->
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname"><a class="el" href="classxint_1_1integer.html">integer</a> &amp; 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#l00263">263</a> of file <a class="el" href="integer_8cpp_source.html">integer.cpp</a>.</p>
+
+</div>
+</div>
+<a class="anchor" id="abfa13a313f2782885bbbfa9a5f4a22c2"></a><!-- doxytag: member="xint::integer::operator=" ref="abfa13a313f2782885bbbfa9a5f4a22c2" args="(const integer &amp;c)" -->
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname"><a class="el" href="classxint_1_1integer.html">integer</a> &amp; xint::integer::operator= </td>
+ <td>(</td>
+ <td class="paramtype">const <a class="el" href="classxint_1_1integer.html">integer</a> &amp;&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#l00237">237</a> of file <a class="el" href="integer_8cpp_source.html">integer.cpp</a>.</p>
+
+</div>
+</div>
+<a class="anchor" id="a5cbc6986de4ca89b49162736f8750986"></a><!-- doxytag: member="xint::integer::operator&gt;&gt;" ref="a5cbc6986de4ca89b49162736f8750986" args="(size_t shift) const " -->
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname"><a class="el" href="classxint_1_1integer.html">integer</a> 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#l00258">258</a> of file <a class="el" href="integer_8cpp_source.html">integer.cpp</a>.</p>
+
+</div>
+</div>
+<a class="anchor" id="aa0151e58a97bc1801221907d68582ec2"></a><!-- doxytag: member="xint::integer::operator&gt;&gt;=" ref="aa0151e58a97bc1801221907d68582ec2" args="(size_t shift)" -->
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname"><a class="el" href="classxint_1_1integer.html">integer</a> &amp; 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#l00271">271</a> of file <a class="el" href="integer_8cpp_source.html">integer.cpp</a>.</p>
+
+</div>
+</div>
+<a class="anchor" id="afc13b5ae9c6f28ef5e75777976aeb56d"></a><!-- doxytag: member="xint::integer::operator^=" ref="afc13b5ae9c6f28ef5e75777976aeb56d" args="(const integer &amp;n)" -->
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname"><a class="el" href="classxint_1_1integer.html">integer</a> &amp; xint::integer::operator^= </td>
+ <td>(</td>
+ <td class="paramtype">const <a class="el" href="classxint_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#l00261">261</a> of file <a class="el" href="integer_8cpp_source.html">integer.cpp</a>.</p>
+
+</div>
+</div>
+<a class="anchor" id="a1af418341e64a317b4cc41fcddaa849f"></a><!-- doxytag: member="xint::integer::operator|=" ref="a1af418341e64a317b4cc41fcddaa849f" args="(const integer &amp;n)" -->
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname"><a class="el" href="classxint_1_1integer.html">integer</a> &amp; xint::integer::operator|= </td>
+ <td>(</td>
+ <td class="paramtype">const <a class="el" href="classxint_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#l00260">260</a> of file <a class="el" href="integer_8cpp_source.html">integer.cpp</a>.</p>
+
+</div>
+</div>
+<a class="anchor" id="a5d84398ce89b376f695ccded2d20c8c2"></a><!-- doxytag: member="xint::integer::sign" ref="a5d84398ce89b376f695ccded2d20c8c2" args="() const " -->
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname">int xint::integer::sign </td>
+ <td>(</td>
+ <td class="paramname"></td>
+ <td>&nbsp;)&nbsp;</td>
+ <td> const</td>
+ </tr>
+ </table>
+</div>
+<div class="memdoc">
+
+<p>Tests the sign of <code>*this</code>. </p>
+<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#l00183">183</a> of file <a class="el" href="integer_8cpp_source.html">integer.cpp</a>.</p>
+
+</div>
+</div>
+<a class="anchor" id="a64a0f99de7c33239237cb59d8464f3d2"></a><!-- doxytag: member="xint::integer::zero" ref="a64a0f99de7c33239237cb59d8464f3d2" args="()" -->
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname">const <a class="el" href="classxint_1_1integer.html">integer</a> &amp; 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#l00279">279</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="xint_8hpp_source.html">xint.hpp</a></li>
+<li><a class="el" href="integer_8cpp_source.html">integer.cpp</a></li>
+</ul>
+</div>
+<hr size="1"/><address style="text-align: right;"><small>Generated on Tue Apr 6 01:22:08 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.1 </small></address>
+</body>
+</html>

Added: sandbox/xint/doc/classxint_1_1invalid__base-members.html
==============================================================================
--- (empty file)
+++ sandbox/xint/doc/classxint_1_1invalid__base-members.html 2010-04-06 01:40:33 EDT (Tue, 06 Apr 2010)
@@ -0,0 +1,37 @@
+<!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.1 -->
+<div class="navigation" id="top">
+ <div class="tabs">
+ <ul>
+ <li>Main Page</li>
+ <li>Related Pages</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>xint::invalid_base Member List</h1>This is the complete list of members for <a class="el" href="classxint_1_1invalid__base.html">xint::invalid_base</a>, including all inherited members.<table>
+ <tr class="memlist"><td><a class="el" href="classxint_1_1invalid__base.html#a16a577d5584652ca358450cbb55b5d55">invalid_base</a>(const std::string &amp;what=&quot;invalid base&quot;)</td><td><a class="el" href="classxint_1_1invalid__base.html">xint::invalid_base</a></td><td><code> [inline]</code></td></tr>
+</table></div>
+<hr size="1"/><address style="text-align: right;"><small>Generated on Tue Apr 6 01:22:08 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.1 </small></address>
+</body>
+</html>

Added: sandbox/xint/doc/classxint_1_1invalid__base.html
==============================================================================
--- (empty file)
+++ sandbox/xint/doc/classxint_1_1invalid__base.html 2010-04-06 01:40:33 EDT (Tue, 06 Apr 2010)
@@ -0,0 +1,77 @@
+<!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: xint::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.1 -->
+<div class="navigation" id="top">
+ <div class="tabs">
+ <ul>
+ <li>Main Page</li>
+ <li>Related Pages</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="namespacexint.html">xint</a>::<a class="el" href="classxint_1_1invalid__base.html">invalid_base</a>
+ </div>
+</div>
+<div class="contents">
+<h1>xint::invalid_base Class Reference</h1><!-- doxytag: class="xint::invalid_base" -->
+<p>Exception class.
+More...</p>
+
+<p><code>#include &lt;<a class="el" href="xint_8hpp_source.html">xint.hpp</a>&gt;</code></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="classxint_1_1invalid__base.html#a16a577d5584652ca358450cbb55b5d55">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>Exception class. </p>
+<p>Derived from <code>std::invalid_argument</code>. </p>
+
+<p>Definition at line <a class="el" href="xint_8hpp_source.html#l00412">412</a> of file <a class="el" href="xint_8hpp_source.html">xint.hpp</a>.</p>
+<hr/><h2>Constructor &amp; Destructor Documentation</h2>
+<a class="anchor" id="a16a577d5584652ca358450cbb55b5d55"></a><!-- doxytag: member="xint::invalid_base::invalid_base" ref="a16a577d5584652ca358450cbb55b5d55" args="(const std::string &amp;what=&quot;invalid base&quot;)" -->
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname">xint::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="xint_8hpp_source.html#l00414">414</a> of file <a class="el" href="xint_8hpp_source.html">xint.hpp</a>.</p>
+
+</div>
+</div>
+<hr/>The documentation for this class was generated from the following file:<ul>
+<li><a class="el" href="xint_8hpp_source.html">xint.hpp</a></li>
+</ul>
+</div>
+<hr size="1"/><address style="text-align: right;"><small>Generated on Tue Apr 6 01:22:08 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.1 </small></address>
+</body>
+</html>

Added: sandbox/xint/doc/classxint_1_1invalid__digit-members.html
==============================================================================
--- (empty file)
+++ sandbox/xint/doc/classxint_1_1invalid__digit-members.html 2010-04-06 01:40:33 EDT (Tue, 06 Apr 2010)
@@ -0,0 +1,37 @@
+<!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.1 -->
+<div class="navigation" id="top">
+ <div class="tabs">
+ <ul>
+ <li>Main Page</li>
+ <li>Related Pages</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>xint::invalid_digit Member List</h1>This is the complete list of members for <a class="el" href="classxint_1_1invalid__digit.html">xint::invalid_digit</a>, including all inherited members.<table>
+ <tr class="memlist"><td><a class="el" href="classxint_1_1invalid__digit.html#a832283e75569bd7e9d09f38ebae87a27">invalid_digit</a>(const std::string &amp;what=&quot;invalid digit&quot;)</td><td><a class="el" href="classxint_1_1invalid__digit.html">xint::invalid_digit</a></td><td><code> [inline]</code></td></tr>
+</table></div>
+<hr size="1"/><address style="text-align: right;"><small>Generated on Tue Apr 6 01:22:08 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.1 </small></address>
+</body>
+</html>

Added: sandbox/xint/doc/classxint_1_1invalid__digit.html
==============================================================================
--- (empty file)
+++ sandbox/xint/doc/classxint_1_1invalid__digit.html 2010-04-06 01:40:33 EDT (Tue, 06 Apr 2010)
@@ -0,0 +1,77 @@
+<!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: xint::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.1 -->
+<div class="navigation" id="top">
+ <div class="tabs">
+ <ul>
+ <li>Main Page</li>
+ <li>Related Pages</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="namespacexint.html">xint</a>::<a class="el" href="classxint_1_1invalid__digit.html">invalid_digit</a>
+ </div>
+</div>
+<div class="contents">
+<h1>xint::invalid_digit Class Reference</h1><!-- doxytag: class="xint::invalid_digit" -->
+<p>Exception class.
+More...</p>
+
+<p><code>#include &lt;<a class="el" href="xint_8hpp_source.html">xint.hpp</a>&gt;</code></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="classxint_1_1invalid__digit.html#a832283e75569bd7e9d09f38ebae87a27">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>Exception class. </p>
+<p>Derived from <code>std::range_error</code>. </p>
+
+<p>Definition at line <a class="el" href="xint_8hpp_source.html#l00422">422</a> of file <a class="el" href="xint_8hpp_source.html">xint.hpp</a>.</p>
+<hr/><h2>Constructor &amp; Destructor Documentation</h2>
+<a class="anchor" id="a832283e75569bd7e9d09f38ebae87a27"></a><!-- doxytag: member="xint::invalid_digit::invalid_digit" ref="a832283e75569bd7e9d09f38ebae87a27" args="(const std::string &amp;what=&quot;invalid digit&quot;)" -->
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname">xint::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="xint_8hpp_source.html#l00424">424</a> of file <a class="el" href="xint_8hpp_source.html">xint.hpp</a>.</p>
+
+</div>
+</div>
+<hr/>The documentation for this class was generated from the following file:<ul>
+<li><a class="el" href="xint_8hpp_source.html">xint.hpp</a></li>
+</ul>
+</div>
+<hr size="1"/><address style="text-align: right;"><small>Generated on Tue Apr 6 01:22:08 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.1 </small></address>
+</body>
+</html>

Added: sandbox/xint/doc/classxint_1_1invalid__modulus-members.html
==============================================================================
--- (empty file)
+++ sandbox/xint/doc/classxint_1_1invalid__modulus-members.html 2010-04-06 01:40:33 EDT (Tue, 06 Apr 2010)
@@ -0,0 +1,37 @@
+<!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.1 -->
+<div class="navigation" id="top">
+ <div class="tabs">
+ <ul>
+ <li>Main Page</li>
+ <li>Related Pages</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>xint::invalid_modulus Member List</h1>This is the complete list of members for <a class="el" href="classxint_1_1invalid__modulus.html">xint::invalid_modulus</a>, including all inherited members.<table>
+ <tr class="memlist"><td><a class="el" href="classxint_1_1invalid__modulus.html#a691026e352d38fc5120c12d6d134e854">invalid_modulus</a>(const std::string &amp;what=&quot;invalid modulus&quot;)</td><td><a class="el" href="classxint_1_1invalid__modulus.html">xint::invalid_modulus</a></td><td><code> [inline]</code></td></tr>
+</table></div>
+<hr size="1"/><address style="text-align: right;"><small>Generated on Tue Apr 6 01:22:08 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.1 </small></address>
+</body>
+</html>

Added: sandbox/xint/doc/classxint_1_1invalid__modulus.html
==============================================================================
--- (empty file)
+++ sandbox/xint/doc/classxint_1_1invalid__modulus.html 2010-04-06 01:40:33 EDT (Tue, 06 Apr 2010)
@@ -0,0 +1,77 @@
+<!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: xint::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.1 -->
+<div class="navigation" id="top">
+ <div class="tabs">
+ <ul>
+ <li>Main Page</li>
+ <li>Related Pages</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="namespacexint.html">xint</a>::<a class="el" href="classxint_1_1invalid__modulus.html">invalid_modulus</a>
+ </div>
+</div>
+<div class="contents">
+<h1>xint::invalid_modulus Class Reference</h1><!-- doxytag: class="xint::invalid_modulus" -->
+<p>Exception class.
+More...</p>
+
+<p><code>#include &lt;<a class="el" href="xint_8hpp_source.html">xint.hpp</a>&gt;</code></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="classxint_1_1invalid__modulus.html#a691026e352d38fc5120c12d6d134e854">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>Exception class. </p>
+<p>Derived from <code>std::invalid_argument</code>. </p>
+
+<p>Definition at line <a class="el" href="xint_8hpp_source.html#l00432">432</a> of file <a class="el" href="xint_8hpp_source.html">xint.hpp</a>.</p>
+<hr/><h2>Constructor &amp; Destructor Documentation</h2>
+<a class="anchor" id="a691026e352d38fc5120c12d6d134e854"></a><!-- doxytag: member="xint::invalid_modulus::invalid_modulus" ref="a691026e352d38fc5120c12d6d134e854" args="(const std::string &amp;what=&quot;invalid modulus&quot;)" -->
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname">xint::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="xint_8hpp_source.html#l00434">434</a> of file <a class="el" href="xint_8hpp_source.html">xint.hpp</a>.</p>
+
+</div>
+</div>
+<hr/>The documentation for this class was generated from the following file:<ul>
+<li><a class="el" href="xint_8hpp_source.html">xint.hpp</a></li>
+</ul>
+</div>
+<hr size="1"/><address style="text-align: right;"><small>Generated on Tue Apr 6 01:22:08 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.1 </small></address>
+</body>
+</html>

Added: sandbox/xint/doc/classxint_1_1no__strong__random-members.html
==============================================================================
--- (empty file)
+++ sandbox/xint/doc/classxint_1_1no__strong__random-members.html 2010-04-06 01:40:33 EDT (Tue, 06 Apr 2010)
@@ -0,0 +1,37 @@
+<!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.1 -->
+<div class="navigation" id="top">
+ <div class="tabs">
+ <ul>
+ <li>Main Page</li>
+ <li>Related Pages</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>xint::no_strong_random Member List</h1>This is the complete list of members for <a class="el" href="classxint_1_1no__strong__random.html">xint::no_strong_random</a>, including all inherited members.<table>
+ <tr class="memlist"><td><a class="el" href="classxint_1_1no__strong__random.html#a1ed9b4ac87613e636ad8f87bacf25544">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="classxint_1_1no__strong__random.html">xint::no_strong_random</a></td><td><code> [inline]</code></td></tr>
+</table></div>
+<hr size="1"/><address style="text-align: right;"><small>Generated on Tue Apr 6 01:22:08 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.1 </small></address>
+</body>
+</html>

Added: sandbox/xint/doc/classxint_1_1no__strong__random.html
==============================================================================
--- (empty file)
+++ sandbox/xint/doc/classxint_1_1no__strong__random.html 2010-04-06 01:40:33 EDT (Tue, 06 Apr 2010)
@@ -0,0 +1,78 @@
+<!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: xint::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.1 -->
+<div class="navigation" id="top">
+ <div class="tabs">
+ <ul>
+ <li>Main Page</li>
+ <li>Related Pages</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="namespacexint.html">xint</a>::<a class="el" href="classxint_1_1no__strong__random.html">no_strong_random</a>
+ </div>
+</div>
+<div class="contents">
+<h1>xint::no_strong_random Class Reference</h1><!-- doxytag: class="xint::no_strong_random" -->
+<p>Exception class.
+More...</p>
+
+<p><code>#include &lt;<a class="el" href="xint_8hpp_source.html">xint.hpp</a>&gt;</code></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="classxint_1_1no__strong__random.html#a1ed9b4ac87613e636ad8f87bacf25544">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>Exception class. </p>
+<p>Derived from <code>std::runtime_error</code>.</p>
+<dl class="note"><dt><b>Note:</b></dt><dd>Cannot be blocked. </dd></dl>
+
+<p>Definition at line <a class="el" href="xint_8hpp_source.html#l00497">497</a> of file <a class="el" href="xint_8hpp_source.html">xint.hpp</a>.</p>
+<hr/><h2>Constructor &amp; Destructor Documentation</h2>
+<a class="anchor" id="a1ed9b4ac87613e636ad8f87bacf25544"></a><!-- doxytag: member="xint::no_strong_random::no_strong_random" ref="a1ed9b4ac87613e636ad8f87bacf25544" 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">xint::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="xint_8hpp_source.html#l00499">499</a> of file <a class="el" href="xint_8hpp_source.html">xint.hpp</a>.</p>
+
+</div>
+</div>
+<hr/>The documentation for this class was generated from the following file:<ul>
+<li><a class="el" href="xint_8hpp_source.html">xint.hpp</a></li>
+</ul>
+</div>
+<hr size="1"/><address style="text-align: right;"><small>Generated on Tue Apr 6 01:22:08 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.1 </small></address>
+</body>
+</html>

Added: sandbox/xint/doc/classxint_1_1not__a__number-members.html
==============================================================================
--- (empty file)
+++ sandbox/xint/doc/classxint_1_1not__a__number-members.html 2010-04-06 01:40:33 EDT (Tue, 06 Apr 2010)
@@ -0,0 +1,37 @@
+<!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.1 -->
+<div class="navigation" id="top">
+ <div class="tabs">
+ <ul>
+ <li>Main Page</li>
+ <li>Related Pages</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>xint::not_a_number Member List</h1>This is the complete list of members for <a class="el" href="classxint_1_1not__a__number.html">xint::not_a_number</a>, including all inherited members.<table>
+ <tr class="memlist"><td><a class="el" href="classxint_1_1not__a__number.html#a4ecc5bcc06a5d660176d51fc63c996cd">not_a_number</a>(const std::string &amp;what=&quot;attempted to use a Not-a-Number&quot;)</td><td><a class="el" href="classxint_1_1not__a__number.html">xint::not_a_number</a></td><td><code> [inline]</code></td></tr>
+</table></div>
+<hr size="1"/><address style="text-align: right;"><small>Generated on Tue Apr 6 01:22:08 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.1 </small></address>
+</body>
+</html>

Added: sandbox/xint/doc/classxint_1_1not__a__number.html
==============================================================================
--- (empty file)
+++ sandbox/xint/doc/classxint_1_1not__a__number.html 2010-04-06 01:40:33 EDT (Tue, 06 Apr 2010)
@@ -0,0 +1,81 @@
+<!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: xint::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.1 -->
+<div class="navigation" id="top">
+ <div class="tabs">
+ <ul>
+ <li>Main Page</li>
+ <li>Related Pages</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="namespacexint.html">xint</a>::<a class="el" href="classxint_1_1not__a__number.html">not_a_number</a>
+ </div>
+</div>
+<div class="contents">
+<h1>xint::not_a_number Class Reference</h1><!-- doxytag: class="xint::not_a_number" -->
+<p>Exception class.
+More...</p>
+
+<p><code>#include &lt;<a class="el" href="xint_8hpp_source.html">xint.hpp</a>&gt;</code></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="classxint_1_1not__a__number.html#a4ecc5bcc06a5d660176d51fc63c996cd">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>Exception class. </p>
+<p>Derived from <code>std::runtime_error</code>.</p>
+<dl class="note"><dt><b>Note:</b></dt><dd>Cannot (presently) be blocked.</dd></dl>
+<dl class="remark"><dt><b>Remarks:</b></dt><dd>Most library functions will throw an <a class="el" href="classxint_1_1not__a__number.html" title="Exception class.">xint::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>
+<dl class="user"><dt><b></b></dt><dd>An object of type <a class="el" href="classxint_1_1not__a__number.html" title="Exception class.">xint::not_a_number</a> can also be fed to an <a class="el" href="classxint_1_1integer.html" title="The extended integer class.">integer</a> constructor to deliberately produce a Not-a-Number value.</dd></dl>
+<dl class="user"><dt><b></b></dt><dd>See this page for details on Not-a-Number. </dd></dl>
+
+<p>Definition at line <a class="el" href="xint_8hpp_source.html#l00485">485</a> of file <a class="el" href="xint_8hpp_source.html">xint.hpp</a>.</p>
+<hr/><h2>Constructor &amp; Destructor Documentation</h2>
+<a class="anchor" id="a4ecc5bcc06a5d660176d51fc63c996cd"></a><!-- doxytag: member="xint::not_a_number::not_a_number" ref="a4ecc5bcc06a5d660176d51fc63c996cd" 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">xint::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="xint_8hpp_source.html#l00487">487</a> of file <a class="el" href="xint_8hpp_source.html">xint.hpp</a>.</p>
+
+</div>
+</div>
+<hr/>The documentation for this class was generated from the following file:<ul>
+<li><a class="el" href="xint_8hpp_source.html">xint.hpp</a></li>
+</ul>
+</div>
+<hr size="1"/><address style="text-align: right;"><small>Generated on Tue Apr 6 01:22:08 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.1 </small></address>
+</body>
+</html>

Added: sandbox/xint/doc/classxint_1_1overflow__error-members.html
==============================================================================
--- (empty file)
+++ sandbox/xint/doc/classxint_1_1overflow__error-members.html 2010-04-06 01:40:33 EDT (Tue, 06 Apr 2010)
@@ -0,0 +1,37 @@
+<!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.1 -->
+<div class="navigation" id="top">
+ <div class="tabs">
+ <ul>
+ <li>Main Page</li>
+ <li>Related Pages</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>xint::overflow_error Member List</h1>This is the complete list of members for <a class="el" href="classxint_1_1overflow__error.html">xint::overflow_error</a>, including all inherited members.<table>
+ <tr class="memlist"><td><a class="el" href="classxint_1_1overflow__error.html#a126d839e9138532447e0de9e39d1b4c8">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="classxint_1_1overflow__error.html">xint::overflow_error</a></td><td><code> [inline]</code></td></tr>
+</table></div>
+<hr size="1"/><address style="text-align: right;"><small>Generated on Tue Apr 6 01:22:08 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.1 </small></address>
+</body>
+</html>

Added: sandbox/xint/doc/classxint_1_1overflow__error.html
==============================================================================
--- (empty file)
+++ sandbox/xint/doc/classxint_1_1overflow__error.html 2010-04-06 01:40:33 EDT (Tue, 06 Apr 2010)
@@ -0,0 +1,79 @@
+<!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: xint::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.1 -->
+<div class="navigation" id="top">
+ <div class="tabs">
+ <ul>
+ <li>Main Page</li>
+ <li>Related Pages</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="namespacexint.html">xint</a>::<a class="el" href="classxint_1_1overflow__error.html">overflow_error</a>
+ </div>
+</div>
+<div class="contents">
+<h1>xint::overflow_error Class Reference</h1><!-- doxytag: class="xint::overflow_error" -->
+<p>Exception class.
+More...</p>
+
+<p><code>#include &lt;<a class="el" href="xint_8hpp_source.html">xint.hpp</a>&gt;</code></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="classxint_1_1overflow__error.html#a126d839e9138532447e0de9e39d1b4c8">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>Exception class. </p>
+<p>Derived from <code>std::overflow_error</code>.</p>
+<dl class="note"><dt><b>Note:</b></dt><dd>Cannot (presently) be blocked.</dd></dl>
+<dl class="remark"><dt><b>Remarks:</b></dt><dd>Thrown by the <a class="el" href="classxint_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="xint_8hpp_source.html#l00516">516</a> of file <a class="el" href="xint_8hpp_source.html">xint.hpp</a>.</p>
+<hr/><h2>Constructor &amp; Destructor Documentation</h2>
+<a class="anchor" id="a126d839e9138532447e0de9e39d1b4c8"></a><!-- doxytag: member="xint::overflow_error::overflow_error" ref="a126d839e9138532447e0de9e39d1b4c8" 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">xint::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="xint_8hpp_source.html#l00518">518</a> of file <a class="el" href="xint_8hpp_source.html">xint.hpp</a>.</p>
+
+</div>
+</div>
+<hr/>The documentation for this class was generated from the following file:<ul>
+<li><a class="el" href="xint_8hpp_source.html">xint.hpp</a></li>
+</ul>
+</div>
+<hr size="1"/><address style="text-align: right;"><small>Generated on Tue Apr 6 01:22:08 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.1 </small></address>
+</body>
+</html>

Added: sandbox/xint/doc/classxint_1_1strong__random__generator-members.html
==============================================================================
--- (empty file)
+++ sandbox/xint/doc/classxint_1_1strong__random__generator-members.html 2010-04-06 01:40:33 EDT (Tue, 06 Apr 2010)
@@ -0,0 +1,46 @@
+<!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.1 -->
+<div class="navigation" id="top">
+ <div class="tabs">
+ <ul>
+ <li>Main Page</li>
+ <li>Related Pages</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>xint::strong_random_generator Member List</h1>This is the complete list of members for <a class="el" href="classxint_1_1strong__random__generator.html">xint::strong_random_generator</a>, including all inherited members.<table>
+ <tr class="memlist"><td><a class="el" href="classxint_1_1strong__random__generator.html#a57ff17a9c2b36775acfedd53f5a0b30e">entropy</a>() const </td><td><a class="el" href="classxint_1_1strong__random__generator.html">xint::strong_random_generator</a></td><td></td></tr>
+ <tr class="memlist"><td><a class="el" href="classxint_1_1strong__random__generator.html#a1a808cca9189eb64f420e4745ca5122d">has_fixed_range</a></td><td><a class="el" href="classxint_1_1strong__random__generator.html">xint::strong_random_generator</a></td><td><code> [static]</code></td></tr>
+ <tr class="memlist"><td><a class="el" href="classxint_1_1strong__random__generator.html#a1327ad0fe9d6f1f1c851456592b178db">max</a>() const </td><td><a class="el" href="classxint_1_1strong__random__generator.html">xint::strong_random_generator</a></td><td></td></tr>
+ <tr class="memlist"><td><a class="el" href="classxint_1_1strong__random__generator.html#aea47e4fbf8b0fe5914ade7ce2704a3c3">max_value</a></td><td><a class="el" href="classxint_1_1strong__random__generator.html">xint::strong_random_generator</a></td><td><code> [static]</code></td></tr>
+ <tr class="memlist"><td><a class="el" href="classxint_1_1strong__random__generator.html#a5ec89070a7a7338c2b7318086efef701">min</a>() const </td><td><a class="el" href="classxint_1_1strong__random__generator.html">xint::strong_random_generator</a></td><td></td></tr>
+ <tr class="memlist"><td><a class="el" href="classxint_1_1strong__random__generator.html#a4bea7dba7f086441548dfee576e54fce">min_value</a></td><td><a class="el" href="classxint_1_1strong__random__generator.html">xint::strong_random_generator</a></td><td><code> [static]</code></td></tr>
+ <tr class="memlist"><td><a class="el" href="classxint_1_1strong__random__generator.html#a2bbb1944511585f66e5daec4737bd4e7">operator()</a>()</td><td><a class="el" href="classxint_1_1strong__random__generator.html">xint::strong_random_generator</a></td><td></td></tr>
+ <tr class="memlist"><td><a class="el" href="classxint_1_1strong__random__generator.html#a470b586d0730deb716ffa3c13164e493">result_type</a> typedef</td><td><a class="el" href="classxint_1_1strong__random__generator.html">xint::strong_random_generator</a></td><td></td></tr>
+ <tr class="memlist"><td><a class="el" href="classxint_1_1strong__random__generator.html#a8841d21b6614967e0520f55c3093871a">strong_random_generator</a>()</td><td><a class="el" href="classxint_1_1strong__random__generator.html">xint::strong_random_generator</a></td><td></td></tr>
+ <tr class="memlist"><td><a class="el" href="classxint_1_1strong__random__generator.html#ac75f659c2adb7c822d49fe534b2d76a4">~strong_random_generator</a>()</td><td><a class="el" href="classxint_1_1strong__random__generator.html">xint::strong_random_generator</a></td><td></td></tr>
+</table></div>
+<hr size="1"/><address style="text-align: right;"><small>Generated on Tue Apr 6 01:22:08 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.1 </small></address>
+</body>
+</html>

Added: sandbox/xint/doc/classxint_1_1strong__random__generator.html
==============================================================================
--- (empty file)
+++ sandbox/xint/doc/classxint_1_1strong__random__generator.html 2010-04-06 01:40:33 EDT (Tue, 06 Apr 2010)
@@ -0,0 +1,245 @@
+<!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: xint::strong_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.1 -->
+<div class="navigation" id="top">
+ <div class="tabs">
+ <ul>
+ <li>Main Page</li>
+ <li>Related Pages</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="namespacexint.html">xint</a>::<a class="el" href="classxint_1_1strong__random__generator.html">strong_random_generator</a>
+ </div>
+</div>
+<div class="contents">
+<h1>xint::strong_random_generator Class Reference</h1><!-- doxytag: class="xint::strong_random_generator" -->
+<p>A convenience class for cryptographically-secure random numbers.
+More...</p>
+
+<p><code>#include &lt;<a class="el" href="xint_8hpp_source.html">xint.hpp</a>&gt;</code></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 unsigned int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classxint_1_1strong__random__generator.html#a470b586d0730deb716ffa3c13164e493">result_type</a></td></tr>
+<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="classxint_1_1strong__random__generator.html#a8841d21b6614967e0520f55c3093871a">strong_random_generator</a> ()</td></tr>
+<tr><td class="memItemLeft" align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classxint_1_1strong__random__generator.html#ac75f659c2adb7c822d49fe534b2d76a4">~strong_random_generator</a> ()</td></tr>
+<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="classxint_1_1strong__random__generator.html#a470b586d0730deb716ffa3c13164e493">result_type</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classxint_1_1strong__random__generator.html#a2bbb1944511585f66e5daec4737bd4e7">operator()</a> ()</td></tr>
+<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="classxint_1_1strong__random__generator.html#a470b586d0730deb716ffa3c13164e493">result_type</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classxint_1_1strong__random__generator.html#a5ec89070a7a7338c2b7318086efef701">min</a> () const </td></tr>
+<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="classxint_1_1strong__random__generator.html#a470b586d0730deb716ffa3c13164e493">result_type</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classxint_1_1strong__random__generator.html#a1327ad0fe9d6f1f1c851456592b178db">max</a> () const </td></tr>
+<tr><td class="memItemLeft" align="right" valign="top">double&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classxint_1_1strong__random__generator.html#a57ff17a9c2b36775acfedd53f5a0b30e">entropy</a> () const </td></tr>
+<tr><td colspan="2"><h2>Static Public Attributes</h2></td></tr>
+<tr><td class="memItemLeft" align="right" valign="top">static const bool&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classxint_1_1strong__random__generator.html#a1a808cca9189eb64f420e4745ca5122d">has_fixed_range</a> = true</td></tr>
+<tr><td class="memItemLeft" align="right" valign="top">static const <a class="el" href="classxint_1_1strong__random__generator.html#a470b586d0730deb716ffa3c13164e493">result_type</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classxint_1_1strong__random__generator.html#a4bea7dba7f086441548dfee576e54fce">min_value</a></td></tr>
+<tr><td class="memItemLeft" align="right" valign="top">static const <a class="el" href="classxint_1_1strong__random__generator.html#a470b586d0730deb716ffa3c13164e493">result_type</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classxint_1_1strong__random__generator.html#aea47e4fbf8b0fe5914ade7ce2704a3c3">max_value</a></td></tr>
+</table>
+<hr/><a name="_details"></a><h2>Detailed Description</h2>
+<p>A convenience class for cryptographically-secure random numbers. </p>
+<p>Used with <a class="el" href="namespacexint.html#a9c50302b216b64d17d9c1d6350e88036" title="Change the random generator that the library uses.">xint::set_random_generator</a> to set the XInt library to use the system-supplied secure random number generator.</p>
+<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="random.html">The XInt Random Number System</a> </dd></dl>
+
+<p>Definition at line <a class="el" href="xint_8hpp_source.html#l00245">245</a> of file <a class="el" href="xint_8hpp_source.html">xint.hpp</a>.</p>
+<hr/><h2>Member Typedef Documentation</h2>
+<a class="anchor" id="a470b586d0730deb716ffa3c13164e493"></a><!-- doxytag: member="xint::strong_random_generator::result_type" ref="a470b586d0730deb716ffa3c13164e493" args="" -->
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname">typedef unsigned int <a class="el" href="classxint_1_1strong__random__generator.html#a470b586d0730deb716ffa3c13164e493">xint::strong_random_generator::result_type</a></td>
+ </tr>
+ </table>
+</div>
+<div class="memdoc">
+
+<p>Definition at line <a class="el" href="xint_8hpp_source.html#l00247">247</a> of file <a class="el" href="xint_8hpp_source.html">xint.hpp</a>.</p>
+
+</div>
+</div>
+<hr/><h2>Constructor &amp; Destructor Documentation</h2>
+<a class="anchor" id="a8841d21b6614967e0520f55c3093871a"></a><!-- doxytag: member="xint::strong_random_generator::strong_random_generator" ref="a8841d21b6614967e0520f55c3093871a" args="()" -->
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname">xint::strong_random_generator::strong_random_generator </td>
+ <td>(</td>
+ <td class="paramname"></td>
+ <td>&nbsp;)&nbsp;</td>
+ <td></td>
+ </tr>
+ </table>
+</div>
+<div class="memdoc">
+
+<p>Definition at line <a class="el" href="random_8cpp_source.html#l00166">166</a> of file <a class="el" href="random_8cpp_source.html">random.cpp</a>.</p>
+
+</div>
+</div>
+<a class="anchor" id="ac75f659c2adb7c822d49fe534b2d76a4"></a><!-- doxytag: member="xint::strong_random_generator::~strong_random_generator" ref="ac75f659c2adb7c822d49fe534b2d76a4" args="()" -->
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname">xint::strong_random_generator::~strong_random_generator </td>
+ <td>(</td>
+ <td class="paramname"></td>
+ <td>&nbsp;)&nbsp;</td>
+ <td></td>
+ </tr>
+ </table>
+</div>
+<div class="memdoc">
+
+<p>Definition at line <a class="el" href="random_8cpp_source.html#l00167">167</a> of file <a class="el" href="random_8cpp_source.html">random.cpp</a>.</p>
+
+</div>
+</div>
+<hr/><h2>Member Function Documentation</h2>
+<a class="anchor" id="a57ff17a9c2b36775acfedd53f5a0b30e"></a><!-- doxytag: member="xint::strong_random_generator::entropy" ref="a57ff17a9c2b36775acfedd53f5a0b30e" args="() const " -->
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname">double xint::strong_random_generator::entropy </td>
+ <td>(</td>
+ <td class="paramname"></td>
+ <td>&nbsp;)&nbsp;</td>
+ <td> const</td>
+ </tr>
+ </table>
+</div>
+<div class="memdoc">
+
+</div>
+</div>
+<a class="anchor" id="a1327ad0fe9d6f1f1c851456592b178db"></a><!-- doxytag: member="xint::strong_random_generator::max" ref="a1327ad0fe9d6f1f1c851456592b178db" args="() const " -->
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname"><a class="el" href="classxint_1_1strong__random__generator.html#a470b586d0730deb716ffa3c13164e493">result_type</a> xint::strong_random_generator::max </td>
+ <td>(</td>
+ <td class="paramname"></td>
+ <td>&nbsp;)&nbsp;</td>
+ <td> const</td>
+ </tr>
+ </table>
+</div>
+<div class="memdoc">
+
+</div>
+</div>
+<a class="anchor" id="a5ec89070a7a7338c2b7318086efef701"></a><!-- doxytag: member="xint::strong_random_generator::min" ref="a5ec89070a7a7338c2b7318086efef701" args="() const " -->
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname"><a class="el" href="classxint_1_1strong__random__generator.html#a470b586d0730deb716ffa3c13164e493">result_type</a> xint::strong_random_generator::min </td>
+ <td>(</td>
+ <td class="paramname"></td>
+ <td>&nbsp;)&nbsp;</td>
+ <td> const</td>
+ </tr>
+ </table>
+</div>
+<div class="memdoc">
+
+</div>
+</div>
+<a class="anchor" id="a2bbb1944511585f66e5daec4737bd4e7"></a><!-- doxytag: member="xint::strong_random_generator::operator()" ref="a2bbb1944511585f66e5daec4737bd4e7" args="()" -->
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname"><a class="el" href="classxint_1_1strong__random__generator.html#a470b586d0730deb716ffa3c13164e493">strong_random_generator::result_type</a> xint::strong_random_generator::operator() </td>
+ <td>(</td>
+ <td class="paramname"></td>
+ <td>&nbsp;)&nbsp;</td>
+ <td></td>
+ </tr>
+ </table>
+</div>
+<div class="memdoc">
+
+<p>Definition at line <a class="el" href="random_8cpp_source.html#l00168">168</a> of file <a class="el" href="random_8cpp_source.html">random.cpp</a>.</p>
+
+</div>
+</div>
+<hr/><h2>Member Data Documentation</h2>
+<a class="anchor" id="a1a808cca9189eb64f420e4745ca5122d"></a><!-- doxytag: member="xint::strong_random_generator::has_fixed_range" ref="a1a808cca9189eb64f420e4745ca5122d" args="" -->
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname">const bool <a class="el" href="classxint_1_1strong__random__generator.html#a1a808cca9189eb64f420e4745ca5122d">xint::strong_random_generator::has_fixed_range</a> = true<code> [static]</code></td>
+ </tr>
+ </table>
+</div>
+<div class="memdoc">
+
+<p>Definition at line <a class="el" href="xint_8hpp_source.html#l00253">253</a> of file <a class="el" href="xint_8hpp_source.html">xint.hpp</a>.</p>
+
+</div>
+</div>
+<a class="anchor" id="aea47e4fbf8b0fe5914ade7ce2704a3c3"></a><!-- doxytag: member="xint::strong_random_generator::max_value" ref="aea47e4fbf8b0fe5914ade7ce2704a3c3" args="" -->
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname">const <a class="el" href="classxint_1_1strong__random__generator.html#a470b586d0730deb716ffa3c13164e493">strong_random_generator::result_type</a> <a class="el" href="classxint_1_1strong__random__generator.html#aea47e4fbf8b0fe5914ade7ce2704a3c3">xint::strong_random_generator::max_value</a><code> [static]</code></td>
+ </tr>
+ </table>
+</div>
+<div class="memdoc">
+<b>Initial value:</b><div class="fragment"><pre class="fragment">
+ (std::numeric_limits&lt;impl_t::result_type&gt;::max)()
+</pre></div>
+<p>Definition at line <a class="el" href="xint_8hpp_source.html#l00255">255</a> of file <a class="el" href="xint_8hpp_source.html">xint.hpp</a>.</p>
+
+</div>
+</div>
+<a class="anchor" id="a4bea7dba7f086441548dfee576e54fce"></a><!-- doxytag: member="xint::strong_random_generator::min_value" ref="a4bea7dba7f086441548dfee576e54fce" args="" -->
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname">const <a class="el" href="classxint_1_1strong__random__generator.html#a470b586d0730deb716ffa3c13164e493">strong_random_generator::result_type</a> <a class="el" href="classxint_1_1strong__random__generator.html#a4bea7dba7f086441548dfee576e54fce">xint::strong_random_generator::min_value</a><code> [static]</code></td>
+ </tr>
+ </table>
+</div>
+<div class="memdoc">
+<b>Initial value:</b><div class="fragment"><pre class="fragment">
+ (std::numeric_limits&lt;impl_t::result_type&gt;::min)()
+</pre></div>
+<p>Definition at line <a class="el" href="xint_8hpp_source.html#l00254">254</a> of file <a class="el" href="xint_8hpp_source.html">xint.hpp</a>.</p>
+
+</div>
+</div>
+<hr/>The documentation for this class was generated from the following files:<ul>
+<li><a class="el" href="xint_8hpp_source.html">xint.hpp</a></li>
+<li><a class="el" href="random_8cpp_source.html">random.cpp</a></li>
+</ul>
+</div>
+<hr size="1"/><address style="text-align: right;"><small>Generated on Tue Apr 6 01:22:08 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.1 </small></address>
+</body>
+</html>

Added: sandbox/xint/doc/classxint_1_1too__big-members.html
==============================================================================
--- (empty file)
+++ sandbox/xint/doc/classxint_1_1too__big-members.html 2010-04-06 01:40:33 EDT (Tue, 06 Apr 2010)
@@ -0,0 +1,37 @@
+<!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.1 -->
+<div class="navigation" id="top">
+ <div class="tabs">
+ <ul>
+ <li>Main Page</li>
+ <li>Related Pages</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>xint::too_big Member List</h1>This is the complete list of members for <a class="el" href="classxint_1_1too__big.html">xint::too_big</a>, including all inherited members.<table>
+ <tr class="memlist"><td><a class="el" href="classxint_1_1too__big.html#af57a30cd18f06bef869c35b9c98f6115">too_big</a>(const std::string &amp;what=&quot;value out of range for requested conversion&quot;)</td><td><a class="el" href="classxint_1_1too__big.html">xint::too_big</a></td><td><code> [inline]</code></td></tr>
+</table></div>
+<hr size="1"/><address style="text-align: right;"><small>Generated on Tue Apr 6 01:22:08 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.1 </small></address>
+</body>
+</html>

Added: sandbox/xint/doc/classxint_1_1too__big.html
==============================================================================
--- (empty file)
+++ sandbox/xint/doc/classxint_1_1too__big.html 2010-04-06 01:40:33 EDT (Tue, 06 Apr 2010)
@@ -0,0 +1,77 @@
+<!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: xint::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.1 -->
+<div class="navigation" id="top">
+ <div class="tabs">
+ <ul>
+ <li>Main Page</li>
+ <li>Related Pages</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="namespacexint.html">xint</a>::<a class="el" href="classxint_1_1too__big.html">too_big</a>
+ </div>
+</div>
+<div class="contents">
+<h1>xint::too_big Class Reference</h1><!-- doxytag: class="xint::too_big" -->
+<p>Exception class.
+More...</p>
+
+<p><code>#include &lt;<a class="el" href="xint_8hpp_source.html">xint.hpp</a>&gt;</code></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="classxint_1_1too__big.html#af57a30cd18f06bef869c35b9c98f6115">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>Exception class. </p>
+<p>Derived from <code>std::range_error</code>. </p>
+
+<p>Definition at line <a class="el" href="xint_8hpp_source.html#l00462">462</a> of file <a class="el" href="xint_8hpp_source.html">xint.hpp</a>.</p>
+<hr/><h2>Constructor &amp; Destructor Documentation</h2>
+<a class="anchor" id="af57a30cd18f06bef869c35b9c98f6115"></a><!-- doxytag: member="xint::too_big::too_big" ref="af57a30cd18f06bef869c35b9c98f6115" 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">xint::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="xint_8hpp_source.html#l00464">464</a> of file <a class="el" href="xint_8hpp_source.html">xint.hpp</a>.</p>
+
+</div>
+</div>
+<hr/>The documentation for this class was generated from the following file:<ul>
+<li><a class="el" href="xint_8hpp_source.html">xint.hpp</a></li>
+</ul>
+</div>
+<hr size="1"/><address style="text-align: right;"><small>Generated on Tue Apr 6 01:22:08 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.1 </small></address>
+</body>
+</html>

Added: sandbox/xint/doc/compare_8cpp.html
==============================================================================
--- (empty file)
+++ sandbox/xint/doc/compare_8cpp.html 2010-04-06 01:40:33 EDT (Tue, 06 Apr 2010)
@@ -0,0 +1,69 @@
+<!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: compare.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.1 -->
+<div class="navigation" id="top">
+ <div class="tabs">
+ <ul>
+ <li>Main Page</li>
+ <li>Related Pages</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>compare.cpp File Reference</h1>
+<p>Contains the the compare function and comparison operators.
+More...</p>
+<code>#include &quot;../boost/xint/xint.hpp&quot;</code><br/>
+<code>#include &quot;../boost/xint/xint_data_t.hpp&quot;</code><br/>
+
+<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="namespacexint.html">xint</a></td></tr>
+
+<p><tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight"><p>All of the functions in the XInt 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">Miscellaneous functions</div></td></tr>
+<tr><td colspan="2"><div class="groupText"><p><a class="anchor" id="amgrp458f92801f3edfaf2e30b1f530c324e2"></a> </p>
+<br/><br/></div></td></tr>
+<tr><td class="memItemLeft" align="right" valign="top">int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespacexint.html#aff82dd47fae4297b96282371abf4db06">xint::compare</a> (const integer &amp;b1, const integer &amp;b2, bool ignoresign)</td></tr>
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Compare two <a class="el" href="classxint_1_1integer.html" title="The extended integer class.">integer</a> objects. <br/></td></tr>
+<tr><td colspan="2"><div class="groupHeader">Operators</div></td></tr>
+<tr><td colspan="2"><div class="groupText"><p><a class="anchor" id="amgrpb3c5827f54218753bb2c3338236446c2"></a> These act exactly the same as for the built-in integer types. </p>
+<br/><br/></div></td></tr>
+<tr><td class="memItemLeft" align="right" valign="top">bool&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespacexint.html#a675c4fe6ddda6db915450d054ed640ba">xint::operator!</a> (const <a class="el" href="classxint_1_1integer.html">xint::integer</a> &amp;num1)</td></tr>
+<tr><td class="memItemLeft" align="right" valign="top">bool&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespacexint.html#ad32051708c2a2baafa0340e19e90217b">xint::operator==</a> (const <a class="el" href="classxint_1_1integer.html">xint::integer</a> &amp;num1, const <a class="el" href="classxint_1_1integer.html">xint::integer</a> &amp;num2)</td></tr>
+<tr><td class="memItemLeft" align="right" valign="top">bool&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespacexint.html#aefda934d0ffacd0f44fcbbdfee19a139">xint::operator!=</a> (const <a class="el" href="classxint_1_1integer.html">xint::integer</a> &amp;num1, const <a class="el" href="classxint_1_1integer.html">xint::integer</a> &amp;num2)</td></tr>
+<tr><td class="memItemLeft" align="right" valign="top">bool&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespacexint.html#a4f4a4771bf443e6724abbd18173ecc86">xint::operator&lt;</a> (const <a class="el" href="classxint_1_1integer.html">xint::integer</a> &amp;num1, const <a class="el" href="classxint_1_1integer.html">xint::integer</a> &amp;num2)</td></tr>
+<tr><td class="memItemLeft" align="right" valign="top">bool&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespacexint.html#a1229d1f1efbdf3ffeac8b2964ca66093">xint::operator&gt;</a> (const <a class="el" href="classxint_1_1integer.html">xint::integer</a> &amp;num1, const <a class="el" href="classxint_1_1integer.html">xint::integer</a> &amp;num2)</td></tr>
+<tr><td class="memItemLeft" align="right" valign="top">bool&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespacexint.html#ab9d5f34c4d4bed1c86380d4f72edcd9b">xint::operator&lt;=</a> (const <a class="el" href="classxint_1_1integer.html">xint::integer</a> &amp;num1, const <a class="el" href="classxint_1_1integer.html">xint::integer</a> &amp;num2)</td></tr>
+<tr><td class="memItemLeft" align="right" valign="top">bool&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespacexint.html#a766324a6f216f3b49a3e9aa885e9531c">xint::operator&gt;=</a> (const <a class="el" href="classxint_1_1integer.html">xint::integer</a> &amp;num1, const <a class="el" href="classxint_1_1integer.html">xint::integer</a> &amp;num2)</td></tr>
+</table>
+<hr/><a name="_details"></a><h2>Detailed Description</h2>
+<p>Contains the the compare function and comparison operators. </p>
+
+<p>Definition in file <a class="el" href="compare_8cpp_source.html">compare.cpp</a>.</p>
+</div>
+<hr size="1"/><address style="text-align: right;"><small>Generated on Tue Apr 6 01:22:08 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.1 </small></address>
+</body>
+</html>

Added: sandbox/xint/doc/compare_8cpp_source.html
==============================================================================
--- (empty file)
+++ sandbox/xint/doc/compare_8cpp_source.html 2010-04-06 01:40:33 EDT (Tue, 06 Apr 2010)
@@ -0,0 +1,91 @@
+<!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: compare.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.1 -->
+<div class="navigation" id="top">
+ <div class="tabs">
+ <ul>
+ <li>Main Page</li>
+ <li>Related Pages</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>compare.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/xint.hpp&quot;</span>
+<a name="l00019"></a>00019 <span class="preprocessor">#include &quot;../boost/xint/xint_data_t.hpp&quot;</span>
+<a name="l00020"></a>00020
+<a name="l00021"></a>00021 <span class="keyword">namespace </span>xint {
+<a name="l00022"></a>00022
+<a name="l00035"></a>00035 <span class="keywordtype">int</span> <a class="code" href="namespacexint.html#aff82dd47fae4297b96282371abf4db06" title="Compare two integer objects.">compare</a>(<span class="keyword">const</span> integer &amp;b1, <span class="keyword">const</span> integer &amp;b2, <span class="keywordtype">bool</span> ignoresign) {
+<a name="l00036"></a>00036 b1._throw_if_nan();
+<a name="l00037"></a>00037 b2._throw_if_nan();
+<a name="l00038"></a>00038
+<a name="l00039"></a>00039 <span class="keywordflow">if</span> (!ignoresign) {
+<a name="l00040"></a>00040 <span class="keywordtype">int</span> sign1=b1.sign(), sign2=b2.sign();
+<a name="l00041"></a>00041 <span class="keywordflow">if</span> (sign1==0 &amp;&amp; sign2==0) <span class="keywordflow">return</span> 0;
+<a name="l00042"></a>00042 <span class="keywordflow">if</span> (sign1==0) <span class="keywordflow">return</span> -sign2;
+<a name="l00043"></a>00043 <span class="keywordflow">if</span> (sign2==0) <span class="keywordflow">return</span> sign1;
+<a name="l00044"></a>00044
+<a name="l00045"></a>00045 <span class="keywordflow">if</span> (sign1 != sign2) <span class="keywordflow">return</span> sign1;
+<a name="l00046"></a>00046 <span class="keywordflow">if</span> (sign1 &lt; 0) <span class="keywordflow">return</span> <a class="code" href="namespacexint.html#aff82dd47fae4297b96282371abf4db06" title="Compare two integer objects.">compare</a>(-b2, -b1, ignoresign);
+<a name="l00047"></a>00047 }
+<a name="l00048"></a>00048
+<a name="l00049"></a>00049 <span class="keyword">const</span> detail::data_t *b1data=b1._get_data();
+<a name="l00050"></a>00050 <span class="keyword">const</span> detail::data_t *b2data=b2._get_data();
+<a name="l00051"></a>00051
+<a name="l00052"></a>00052 <span class="keywordtype">int</span> answer=0;
+<a name="l00053"></a>00053 <span class="keywordflow">if</span> (b1data-&gt;mLength != b2data-&gt;mLength) {
+<a name="l00054"></a>00054 answer=((b1data-&gt;mLength &lt; b2data-&gt;mLength) ? -1 : 1);
+<a name="l00055"></a>00055 } <span class="keywordflow">else</span> {
+<a name="l00056"></a>00056 <span class="keywordflow">for</span> (<span class="keywordtype">int</span> x = <span class="keywordtype">int</span>(b1data-&gt;mLength) - 1; x &gt;= 0; --x) {
+<a name="l00057"></a>00057 <span class="keywordflow">if</span> (b1data-&gt;digits[x] != b2data-&gt;digits[x]) {
+<a name="l00058"></a>00058 answer=((b1data-&gt;digits[x] &lt; b2data-&gt;digits[x]) ? -1 : 1);
+<a name="l00059"></a>00059 <span class="keywordflow">break</span>;
+<a name="l00060"></a>00060 }
+<a name="l00061"></a>00061 }
+<a name="l00062"></a>00062 }
+<a name="l00063"></a>00063
+<a name="l00064"></a>00064 <span class="keywordflow">return</span> answer;
+<a name="l00065"></a>00065 }
+<a name="l00066"></a>00066
+<a name="l00067"></a>00067 <span class="keywordtype">bool</span> <a class="code" href="namespacexint.html#a675c4fe6ddda6db915450d054ed640ba">operator!</a>(<span class="keyword">const</span> <a class="code" href="classxint_1_1integer.html" title="The extended integer class.">xint::integer</a> &amp;num1) { <span class="keywordflow">return</span> num1.<a class="code" href="classxint_1_1integer.html#a5d84398ce89b376f695ccded2d20c8c2" title="Tests the sign of *this.">sign</a>()==0; }
+<a name="l00068"></a>00068 <span class="keywordtype">bool</span> <a class="code" href="namespacexint.html#ad32051708c2a2baafa0340e19e90217b">operator==</a>(<span class="keyword">const</span> <a class="code" href="classxint_1_1integer.html" title="The extended integer class.">xint::integer</a> &amp;num1, <span class="keyword">const</span> <a class="code" href="classxint_1_1integer.html" title="The extended integer class.">xint::integer</a> &amp;num2) { <span class="keywordflow">return</span> <a class="code" href="namespacexint.html#aff82dd47fae4297b96282371abf4db06" title="Compare two integer objects.">xint::compare</a>(num1, num2)==0; }
+<a name="l00069"></a>00069 <span class="keywordtype">bool</span> <a class="code" href="namespacexint.html#aefda934d0ffacd0f44fcbbdfee19a139">operator!=</a>(<span class="keyword">const</span> <a class="code" href="classxint_1_1integer.html" title="The extended integer class.">xint::integer</a>&amp; num1, <span class="keyword">const</span> <a class="code" href="classxint_1_1integer.html" title="The extended integer class.">xint::integer</a>&amp; num2) { <span class="keywordflow">return</span> <a class="code" href="namespacexint.html#aff82dd47fae4297b96282371abf4db06" title="Compare two integer objects.">xint::compare</a>(num1, num2)!=0; }
+<a name="l00070"></a>00070 <span class="keywordtype">bool</span> <a class="code" href="namespacexint.html#a4f4a4771bf443e6724abbd18173ecc86">operator&lt;</a>(<span class="keyword">const</span> <a class="code" href="classxint_1_1integer.html" title="The extended integer class.">xint::integer</a>&amp; num1, <span class="keyword">const</span> <a class="code" href="classxint_1_1integer.html" title="The extended integer class.">xint::integer</a>&amp; num2) { <span class="keywordflow">return</span> <a class="code" href="namespacexint.html#aff82dd47fae4297b96282371abf4db06" title="Compare two integer objects.">xint::compare</a>(num1, num2)&lt;0; }
+<a name="l00071"></a>00071 <span class="keywordtype">bool</span> <a class="code" href="namespacexint.html#a1229d1f1efbdf3ffeac8b2964ca66093">operator&gt;</a>(<span class="keyword">const</span> <a class="code" href="classxint_1_1integer.html" title="The extended integer class.">xint::integer</a>&amp; num1, <span class="keyword">const</span> <a class="code" href="classxint_1_1integer.html" title="The extended integer class.">xint::integer</a>&amp; num2) { <span class="keywordflow">return</span> <a class="code" href="namespacexint.html#aff82dd47fae4297b96282371abf4db06" title="Compare two integer objects.">xint::compare</a>(num1, num2)&gt;0; }
+<a name="l00072"></a>00072 <span class="keywordtype">bool</span> <a class="code" href="namespacexint.html#ab9d5f34c4d4bed1c86380d4f72edcd9b">operator&lt;=</a>(<span class="keyword">const</span> <a class="code" href="classxint_1_1integer.html" title="The extended integer class.">xint::integer</a>&amp; num1, <span class="keyword">const</span> <a class="code" href="classxint_1_1integer.html" title="The extended integer class.">xint::integer</a>&amp; num2) { <span class="keywordflow">return</span> <a class="code" href="namespacexint.html#aff82dd47fae4297b96282371abf4db06" title="Compare two integer objects.">xint::compare</a>(num1, num2)&lt;=0; }
+<a name="l00073"></a>00073 <span class="keywordtype">bool</span> <a class="code" href="namespacexint.html#a766324a6f216f3b49a3e9aa885e9531c">operator&gt;=</a>(<span class="keyword">const</span> <a class="code" href="classxint_1_1integer.html" title="The extended integer class.">xint::integer</a>&amp; num1, <span class="keyword">const</span> <a class="code" href="classxint_1_1integer.html" title="The extended integer class.">xint::integer</a>&amp; num2) { <span class="keywordflow">return</span> <a class="code" href="namespacexint.html#aff82dd47fae4297b96282371abf4db06" title="Compare two integer objects.">xint::compare</a>(num1, num2)&gt;=0; }
+<a name="l00074"></a>00074
+<a name="l00075"></a>00075 } <span class="comment">// namespace xint</span>
+</pre></div></div>
+<hr size="1"/><address style="text-align: right;"><small>Generated on Tue Apr 6 01:22:07 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.1 </small></address>
+</body>
+</html>

Added: sandbox/xint/doc/convert_8cpp.html
==============================================================================
--- (empty file)
+++ sandbox/xint/doc/convert_8cpp.html 2010-04-06 01:40:33 EDT (Tue, 06 Apr 2010)
@@ -0,0 +1,70 @@
+<!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: convert.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.1 -->
+<div class="navigation" id="top">
+ <div class="tabs">
+ <ul>
+ <li>Main Page</li>
+ <li>Related Pages</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>convert.cpp File Reference</h1>
+<p>Contains the conversion functions.
+More...</p>
+<code>#include &quot;../boost/xint/xint.hpp&quot;</code><br/>
+<code>#include &quot;../boost/xint/xint_data_t.hpp&quot;</code><br/>
+<code>#include &lt;vector&gt;</code><br/>
+<code>#include &lt;algorithm&gt;</code><br/>
+<code>#include &lt;sstream&gt;</code><br/>
+
+<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="namespacexint.html">xint</a></td></tr>
+
+<p><tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight"><p>All of the functions in the XInt 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">Conversion functions</div></td></tr>
+<tr><td colspan="2"><div class="groupText"><p><a class="anchor" id="amgrp9c2e8a06d85d2c9b83b5a0d27e85d535"></a> </p>
+<br/><br/></div></td></tr>
+<tr><td class="memItemLeft" align="right" valign="top">std::string&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespacexint.html#a016c9573ff48411847edf86c406946a0">xint::to_string</a> (const integer &amp;n, size_t base, bool uppercase)</td></tr>
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Creates a string representation of the specified <a class="el" href="classxint_1_1integer.html" title="The extended integer class.">integer</a>. <br/></td></tr>
+<tr><td class="memItemLeft" align="right" valign="top">integer&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespacexint.html#ad9dcb2b835be5f8ee918979945911ac0">xint::from_string</a> (const std::string &amp;str, size_t base)</td></tr>
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Converts a string into an <a class="el" href="classxint_1_1integer.html" title="The extended integer class.">integer</a>. <br/></td></tr>
+<tr><td class="memItemLeft" align="right" valign="top">integer&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespacexint.html#ac2ac2f74b45e4179560d845e6310be9a">xint::from_binary</a> (const std::string &amp;str)</td></tr>
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Converts a binary representation of a number into an <a class="el" href="classxint_1_1integer.html" title="The extended integer class.">integer</a>. <br/></td></tr>
+<tr><td class="memItemLeft" align="right" valign="top">std::string&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespacexint.html#ab8f33201a251e3e118dc82f214e22aeb">xint::to_binary</a> (const integer &amp;n)</td></tr>
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Creates a binary representation of an <a class="el" href="classxint_1_1integer.html" title="The extended integer class.">integer</a>, lowest byte first. <br/></td></tr>
+</table>
+<hr/><a name="_details"></a><h2>Detailed Description</h2>
+<p>Contains the conversion functions. </p>
+<p>Note that the <a class="el" href="namespacexint.html#a21bd738b96eec205eedc7a9960e9a6e5" title="Efficiently converts from an xint::integer to a built-in integer type.">xint::to&lt;T&gt;</a> function is not here, because it's a template function and must be defined in a header file.</p>
+<dl class="todo"><dt><b><a class="el" href="todo.html#_todo000001">Todo:</a></b></dt><dd>the <a class="el" href="namespacexint.html#a016c9573ff48411847edf86c406946a0" title="Creates a string representation of the specified integer.">xint::to_string</a> function could be made more efficient by using only doubledigit_t-sized pieces of the integer at a time, and dividing the whole thing by the total of the divisions done to get the digits. Same with the <a class="el" href="namespacexint.html#ad9dcb2b835be5f8ee918979945911ac0" title="Converts a string into an integer.">xint::from_string</a> function. </dd></dl>
+
+<p>Definition in file <a class="el" href="convert_8cpp_source.html">convert.cpp</a>.</p>
+</div>
+<hr size="1"/><address style="text-align: right;"><small>Generated on Tue Apr 6 01:22:08 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.1 </small></address>
+</body>
+</html>

Added: sandbox/xint/doc/convert_8cpp_source.html
==============================================================================
--- (empty file)
+++ sandbox/xint/doc/convert_8cpp_source.html 2010-04-06 01:40:33 EDT (Tue, 06 Apr 2010)
@@ -0,0 +1,217 @@
+<!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: convert.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.1 -->
+<div class="navigation" id="top">
+ <div class="tabs">
+ <ul>
+ <li>Main Page</li>
+ <li>Related Pages</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>convert.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="l00026"></a>00026 <span class="preprocessor">#include &quot;../boost/xint/xint.hpp&quot;</span>
+<a name="l00027"></a>00027 <span class="preprocessor">#include &quot;../boost/xint/xint_data_t.hpp&quot;</span>
+<a name="l00028"></a>00028
+<a name="l00029"></a>00029 <span class="preprocessor">#include &lt;vector&gt;</span>
+<a name="l00030"></a>00030 <span class="preprocessor">#include &lt;algorithm&gt;</span>
+<a name="l00031"></a>00031 <span class="preprocessor">#include &lt;sstream&gt;</span>
+<a name="l00032"></a>00032
+<a name="l00033"></a>00033 <span class="keyword">namespace </span>xint {
+<a name="l00034"></a>00034
+<a name="l00035"></a>00035 <span class="keyword">using namespace </span>detail;
+<a name="l00036"></a>00036
+<a name="l00037"></a>00037 <span class="keyword">namespace </span>{
+<a name="l00038"></a>00038
+<a name="l00039"></a>00039 <span class="keywordtype">char</span> nToChar(<span class="keywordtype">int</span> n, <span class="keywordtype">bool</span> upperCase) {
+<a name="l00040"></a>00040 <span class="keywordflow">if</span> (n &lt; 10) <span class="keywordflow">return</span> char(n+<span class="charliteral">&apos;0&apos;</span>);
+<a name="l00041"></a>00041 <span class="keywordflow">else</span> <span class="keywordflow">if</span> (upperCase) <span class="keywordflow">return</span> char((n - 10) + <span class="charliteral">&apos;A&apos;</span>);
+<a name="l00042"></a>00042 <span class="keywordflow">else</span> <span class="keywordflow">return</span> char((n - 10) + <span class="charliteral">&apos;a&apos;</span>);
+<a name="l00043"></a>00043 }
+<a name="l00044"></a>00044
+<a name="l00045"></a>00045 } <span class="comment">// namespace</span>
+<a name="l00046"></a>00046
+<a name="l00068"></a>00068 std::string <a class="code" href="namespacexint.html#a016c9573ff48411847edf86c406946a0" title="Creates a string representation of the specified integer.">to_string</a>(<span class="keyword">const</span> integer&amp; n, <span class="keywordtype">size_t</span> base, <span class="keywordtype">bool</span> uppercase) {
+<a name="l00069"></a>00069 <span class="keywordflow">if</span> (n.is_nan()) <span class="keywordflow">return</span> <a class="code" href="namespacexint_1_1detail.html#aede27c67f3308e0805fc3093ffe6f4ce" title="Holds the text representation of the Not-a-Number value.">detail::nan_text</a>;
+<a name="l00070"></a>00070 <span class="keywordflow">if</span> (base&lt;2 || base&gt;36) {
+<a name="l00071"></a>00071 <span class="keywordflow">if</span> (<a class="code" href="namespacexint.html#ac8be41374700d89400f5ecddf0f789e3" title="Query whether exceptions are currently allowed or blocked.">exceptions_allowed</a>()) <span class="keywordflow">throw</span> invalid_base();
+<a name="l00072"></a>00072 <span class="keywordflow">else</span> <span class="keywordflow">return</span> std::string();
+<a name="l00073"></a>00073 }
+<a name="l00074"></a>00074
+<a name="l00075"></a>00075 <span class="keywordflow">if</span> (n.sign()==0) <span class="keywordflow">return</span> <span class="stringliteral">&quot;0&quot;</span>;
+<a name="l00076"></a>00076
+<a name="l00077"></a>00077 std::ostringstream out;
+<a name="l00078"></a>00078 <span class="keywordflow">if</span> (base==16) {
+<a name="l00079"></a>00079 <span class="comment">// Special no-division version, primarily for debugging division</span>
+<a name="l00080"></a>00080 <span class="keyword">const</span> data_t *ndata=n._get_data();
+<a name="l00081"></a>00081 <span class="keyword">const</span> <a class="code" href="namespacexint_1_1detail.html#a8843fb7e364832d8d5983de28bdbcf34">digit_t</a> *firstDigit=ndata-&gt;digits,
+<a name="l00082"></a>00082 *lastDigit=firstDigit + ndata-&gt;mLength - 1;
+<a name="l00083"></a>00083
+<a name="l00084"></a>00084 <span class="keyword">const</span> <span class="keywordtype">int</span> bitsPerDigit=4;
+<a name="l00085"></a>00085 <span class="keyword">const</span> <a class="code" href="namespacexint_1_1detail.html#a8843fb7e364832d8d5983de28bdbcf34">digit_t</a> mask=(<a class="code" href="namespacexint_1_1detail.html#aceb9b654c1c2daaf377b31bd4a089750">doubledigit_t</a>(1) &lt;&lt; bitsPerDigit)-1;
+<a name="l00086"></a>00086
+<a name="l00087"></a>00087 <span class="comment">// Suppress any leading zeros</span>
+<a name="l00088"></a>00088 <span class="keyword">const</span> <a class="code" href="namespacexint_1_1detail.html#a8843fb7e364832d8d5983de28bdbcf34">digit_t</a> *d=lastDigit;
+<a name="l00089"></a>00089 <span class="keywordtype">int</span> digitShift=(<a class="code" href="namespacexint_1_1detail.html#a9bd9e8d55061238d63913020d2721518">bits_per_digit</a> - bitsPerDigit);
+<a name="l00090"></a>00090 <span class="keywordflow">while</span> (digitShift &gt;= 0 &amp;&amp; ((*d &gt;&gt; digitShift) &amp; mask) == 0)
+<a name="l00091"></a>00091 digitShift -= bitsPerDigit;
+<a name="l00092"></a>00092
+<a name="l00093"></a>00093 <span class="keywordflow">do</span> {
+<a name="l00094"></a>00094 <span class="keywordflow">while</span> (digitShift &gt;= 0) {
+<a name="l00095"></a>00095 out &lt;&lt; nToChar((*d &gt;&gt; digitShift) &amp; mask, uppercase);
+<a name="l00096"></a>00096 digitShift -= bitsPerDigit;
+<a name="l00097"></a>00097 }
+<a name="l00098"></a>00098
+<a name="l00099"></a>00099 digitShift=(<a class="code" href="namespacexint_1_1detail.html#a9bd9e8d55061238d63913020d2721518">bits_per_digit</a> - bitsPerDigit);
+<a name="l00100"></a>00100 } <span class="keywordflow">while</span> (d-- != firstDigit);
+<a name="l00101"></a>00101
+<a name="l00102"></a>00102 std::string r(n.sign() &lt; 0 ? std::string(<span class="stringliteral">&quot;-&quot;</span>)+out.str() : out.str());
+<a name="l00103"></a>00103 <span class="keywordflow">return</span> r;
+<a name="l00104"></a>00104 } <span class="keywordflow">else</span> {
+<a name="l00105"></a>00105 <span class="keyword">const</span> integer <a class="code" href="namespacexint.html#a4f4dacd6f9398aaa500112731ab713ce" title="Bit-shift an integer, in either direction.">shift</a>=base;
+<a name="l00106"></a>00106 std::pair&lt;integer, integer&gt; a=std::make_pair(n, <a class="code" href="classxint_1_1integer.html#a64a0f99de7c33239237cb59d8464f3d2">integer::zero</a>());
+<a name="l00107"></a>00107 a.first._set_negative(<span class="keyword">false</span>);
+<a name="l00108"></a>00108
+<a name="l00109"></a>00109 integer r;
+<a name="l00110"></a>00110 <span class="keywordflow">while</span> (a.first.sign()!=0) {
+<a name="l00111"></a>00111 a=<a class="code" href="namespacexint.html#a23d0a0bb05cec1917d96d6aaceeb875d" title="Calculate how many dividends would fit into divisor, with the remainder.">divide_r</a>(a.first, shift);
+<a name="l00112"></a>00112 out &lt;&lt; nToChar(a.second._get_digit(0), uppercase);
+<a name="l00113"></a>00113 }
+<a name="l00114"></a>00114
+<a name="l00115"></a>00115 <span class="keywordflow">if</span> (n.sign() &lt; 0) out &lt;&lt; <span class="charliteral">&apos;-&apos;</span>;
+<a name="l00116"></a>00116
+<a name="l00117"></a>00117 std::string rval=out.str();
+<a name="l00118"></a>00118 std::reverse(rval.begin(), rval.end());
+<a name="l00119"></a>00119 <span class="keywordflow">return</span> rval;
+<a name="l00120"></a>00120 }
+<a name="l00121"></a>00121 }
+<a name="l00122"></a>00122
+<a name="l00149"></a>00149 integer <a class="code" href="namespacexint.html#ad9dcb2b835be5f8ee918979945911ac0" title="Converts a string into an integer.">from_string</a>(<span class="keyword">const</span> std::string&amp; str, <span class="keywordtype">size_t</span> base) {
+<a name="l00150"></a>00150 <span class="keywordflow">if</span> (str==<a class="code" href="namespacexint_1_1detail.html#aede27c67f3308e0805fc3093ffe6f4ce" title="Holds the text representation of the Not-a-Number value.">detail::nan_text</a>) <span class="keywordflow">return</span> integer(not_a_number());
+<a name="l00151"></a>00151
+<a name="l00152"></a>00152 <span class="keywordtype">bool</span> <a class="code" href="namespacexint.html#ab393826381b1abd9f1aca1cdb45f41f6" title="Return the additive inverse of an integer.">negate</a>=<span class="keyword">false</span>;
+<a name="l00153"></a>00153 <span class="keyword">const</span> <span class="keywordtype">char</span> *c=str.c_str();
+<a name="l00154"></a>00154 <span class="keywordflow">if</span> (*c==<span class="charliteral">&apos;+&apos;</span>) ++c;
+<a name="l00155"></a>00155 <span class="keywordflow">else</span> <span class="keywordflow">if</span> (*c==<span class="charliteral">&apos;-&apos;</span>) { negate=<span class="keyword">true</span>; ++c; }
+<a name="l00156"></a>00156
+<a name="l00157"></a>00157 <span class="keywordflow">if</span> (base==<a class="code" href="namespacexint.html#a7a5434a5f5fb1db19f0de18014c4fc41">autobase</a>) {
+<a name="l00158"></a>00158 <span class="keywordflow">if</span> (*c==<span class="charliteral">&apos;0&apos;</span>) {
+<a name="l00159"></a>00159 ++c;
+<a name="l00160"></a>00160 <span class="keywordflow">if</span> (*c==<span class="charliteral">&apos;x&apos;</span> || *c==<span class="charliteral">&apos;X&apos;</span>) {
+<a name="l00161"></a>00161 ++c;
+<a name="l00162"></a>00162 base=16;
+<a name="l00163"></a>00163 } <span class="keywordflow">else</span> base=8;
+<a name="l00164"></a>00164 } <span class="keywordflow">else</span> base=10;
+<a name="l00165"></a>00165 }
+<a name="l00166"></a>00166
+<a name="l00167"></a>00167 <span class="keywordflow">if</span> (base&lt;2 || base&gt;36) {
+<a name="l00168"></a>00168 <span class="keywordflow">if</span> (<a class="code" href="namespacexint.html#ac8be41374700d89400f5ecddf0f789e3" title="Query whether exceptions are currently allowed or blocked.">exceptions_allowed</a>()) <span class="keywordflow">throw</span> invalid_base();
+<a name="l00169"></a>00169 <span class="keywordflow">else</span> <span class="keywordflow">return</span> integer(not_a_number());
+<a name="l00170"></a>00170 }
+<a name="l00171"></a>00171
+<a name="l00172"></a>00172 <span class="keywordflow">if</span> (*c==0) {
+<a name="l00173"></a>00173 <span class="keywordflow">if</span> (<a class="code" href="namespacexint.html#ac8be41374700d89400f5ecddf0f789e3" title="Query whether exceptions are currently allowed or blocked.">exceptions_allowed</a>()) <span class="keywordflow">throw</span> invalid_digit(<span class="stringliteral">&quot;No valid digits&quot;</span>);
+<a name="l00174"></a>00174 <span class="keywordflow">else</span> <span class="keywordflow">return</span> integer(not_a_number());
+<a name="l00175"></a>00175 }
+<a name="l00176"></a>00176
+<a name="l00177"></a>00177 <span class="keyword">const</span> integer <a class="code" href="namespacexint.html#a4f4dacd6f9398aaa500112731ab713ce" title="Bit-shift an integer, in either direction.">shift</a>(base);
+<a name="l00178"></a>00178
+<a name="l00179"></a>00179 integer r;
+<a name="l00180"></a>00180 <span class="keywordflow">while</span> (*c) {
+<a name="l00181"></a>00181 <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> digit;
+<a name="l00182"></a>00182 <span class="keywordflow">if</span> (*c&gt;=<span class="charliteral">&apos;0&apos;</span> &amp;&amp; *c&lt;=<span class="charliteral">&apos;9&apos;</span>) digit=*c-<span class="charliteral">&apos;0&apos;</span>;
+<a name="l00183"></a>00183 <span class="keywordflow">else</span> <span class="keywordflow">if</span> (*c&gt;=<span class="charliteral">&apos;A&apos;</span> &amp;&amp; *c&lt;=<span class="charliteral">&apos;Z&apos;</span>) digit=*c-<span class="charliteral">&apos;A&apos;</span>+10;
+<a name="l00184"></a>00184 <span class="keywordflow">else</span> <span class="keywordflow">if</span> (*c&gt;=<span class="charliteral">&apos;a&apos;</span> &amp;&amp; *c&lt;=<span class="charliteral">&apos;z&apos;</span>) digit=*c-<span class="charliteral">&apos;a&apos;</span>+10;
+<a name="l00185"></a>00185 <span class="keywordflow">else</span> {
+<a name="l00186"></a>00186 <span class="keywordflow">if</span> (<a class="code" href="namespacexint.html#ac8be41374700d89400f5ecddf0f789e3" title="Query whether exceptions are currently allowed or blocked.">exceptions_allowed</a>()) <span class="keywordflow">throw</span> invalid_digit(<span class="stringliteral">&quot;encountered non-alphanumeric character in string&quot;</span>);
+<a name="l00187"></a>00187 <span class="keywordflow">else</span> <span class="keywordflow">return</span> integer(not_a_number());
+<a name="l00188"></a>00188 }
+<a name="l00189"></a>00189
+<a name="l00190"></a>00190 <span class="keywordflow">if</span> (digit &gt;= base) {
+<a name="l00191"></a>00191 <span class="keywordflow">if</span> (<a class="code" href="namespacexint.html#ac8be41374700d89400f5ecddf0f789e3" title="Query whether exceptions are currently allowed or blocked.">exceptions_allowed</a>()) <span class="keywordflow">throw</span> invalid_digit(<span class="stringliteral">&quot;encountered digit greater than base allows&quot;</span>);
+<a name="l00192"></a>00192 <span class="keywordflow">else</span> <span class="keywordflow">return</span> integer(not_a_number());
+<a name="l00193"></a>00193 }
+<a name="l00194"></a>00194
+<a name="l00195"></a>00195 r = (r * shift) + digit;
+<a name="l00196"></a>00196 ++c;
+<a name="l00197"></a>00197 }
+<a name="l00198"></a>00198 r._set_negative(negate);
+<a name="l00199"></a>00199 <span class="keywordflow">return</span> r;
+<a name="l00200"></a>00200 }
+<a name="l00201"></a>00201
+<a name="l00211"></a>00211 integer <a class="code" href="namespacexint.html#ac2ac2f74b45e4179560d845e6310be9a" title="Converts a binary representation of a number into an integer.">from_binary</a>(<span class="keyword">const</span> std::string&amp; str) {
+<a name="l00212"></a>00212 <span class="keyword">const</span> <span class="keywordtype">size_t</span> bytesPerDigit=<span class="keyword">sizeof</span>(<a class="code" href="namespacexint_1_1detail.html#a8843fb7e364832d8d5983de28bdbcf34">digit_t</a>);
+<a name="l00213"></a>00213 <span class="keyword">const</span> <span class="keywordtype">size_t</span> bitsPerByte=std::numeric_limits&lt;unsigned char&gt;::digits;
+<a name="l00214"></a>00214
+<a name="l00215"></a>00215 integer r;
+<a name="l00216"></a>00216 detail::data_t *rdata=r.<a class="code" href="classxint_1_1integer.html#ae5578d7d5be17df3ecd3ddc5a852d0a0">_get_data</a>();
+<a name="l00217"></a>00217 rdata-&gt;<a class="code" href="structxint_1_1detail_1_1data__t.html#a4fe3935e29883193166966c49cd73139">alloc</a>((str.length() + bytesPerDigit - 1)/bytesPerDigit);
+<a name="l00218"></a>00218 <a class="code" href="namespacexint_1_1detail.html#a8843fb7e364832d8d5983de28bdbcf34">digit_t</a> *p=rdata-&gt;digits;
+<a name="l00219"></a>00219
+<a name="l00220"></a>00220 <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> *s=(<span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> *)str.data(), *se=s+str.length();
+<a name="l00221"></a>00221 <span class="keywordflow">while</span> (s&lt;se) {
+<a name="l00222"></a>00222 <a class="code" href="namespacexint_1_1detail.html#a8843fb7e364832d8d5983de28bdbcf34">digit_t</a> d=0;
+<a name="l00223"></a>00223 <span class="keywordflow">for</span> (<span class="keywordtype">size_t</span> i=0; i&lt;bytesPerDigit &amp;&amp; s&lt;se; ++i)
+<a name="l00224"></a>00224 d |= (<a class="code" href="namespacexint_1_1detail.html#a8843fb7e364832d8d5983de28bdbcf34">digit_t</a>(*s++) &lt;&lt; (i * bitsPerByte));
+<a name="l00225"></a>00225 *p++=d;
+<a name="l00226"></a>00226 }
+<a name="l00227"></a>00227 rdata-&gt;skipLeadingZeros();
+<a name="l00228"></a>00228 <span class="keywordflow">return</span> r;
+<a name="l00229"></a>00229 }
+<a name="l00230"></a>00230
+<a name="l00247"></a>00247 std::string <a class="code" href="namespacexint.html#ab8f33201a251e3e118dc82f214e22aeb" title="Creates a binary representation of an integer, lowest byte first.">to_binary</a>(<span class="keyword">const</span> integer&amp; n) {
+<a name="l00248"></a>00248 n._throw_if_nan();
+<a name="l00249"></a>00249
+<a name="l00250"></a>00250 <span class="keyword">const</span> <span class="keywordtype">size_t</span> bytesPerDigit=<span class="keyword">sizeof</span>(<a class="code" href="namespacexint_1_1detail.html#a8843fb7e364832d8d5983de28bdbcf34">digit_t</a>);
+<a name="l00251"></a>00251 <span class="keyword">const</span> <span class="keywordtype">size_t</span> bitsPerByte=std::numeric_limits&lt;unsigned char&gt;::digits;
+<a name="l00252"></a>00252 std::vector&lt;unsigned char&gt; temp;
+<a name="l00253"></a>00253 temp.reserve(n._get_length() * bytesPerDigit);
+<a name="l00254"></a>00254
+<a name="l00255"></a>00255 <span class="keyword">const</span> detail::data_t *ndata=n._get_data();
+<a name="l00256"></a>00256 <span class="keyword">const</span> <a class="code" href="namespacexint_1_1detail.html#a8843fb7e364832d8d5983de28bdbcf34">digit_t</a> *p=ndata-&gt;digits, *pe=p+n._get_length();
+<a name="l00257"></a>00257 <span class="keywordflow">while</span> (p != pe) {
+<a name="l00258"></a>00258 <a class="code" href="namespacexint_1_1detail.html#a8843fb7e364832d8d5983de28bdbcf34">digit_t</a> d(*p++);
+<a name="l00259"></a>00259 <span class="keywordflow">for</span> (<span class="keywordtype">size_t</span> i=0; i&lt;bytesPerDigit; ++i) {
+<a name="l00260"></a>00260 temp.push_back((<span class="keywordtype">unsigned</span> <span class="keywordtype">char</span>)(d));
+<a name="l00261"></a>00261 d &gt;&gt;= bitsPerByte;
+<a name="l00262"></a>00262 }
+<a name="l00263"></a>00263 }
+<a name="l00264"></a>00264 <span class="keywordflow">while</span> (!temp.empty() &amp;&amp; temp.back()==0) temp.pop_back();
+<a name="l00265"></a>00265 <span class="keywordtype">char</span> *c=(<span class="keywordtype">char</span>*)&amp;temp[0];
+<a name="l00266"></a>00266 <span class="keywordflow">return</span> std::string(c, c+temp.size());
+<a name="l00267"></a>00267 }
+<a name="l00268"></a>00268
+<a name="l00269"></a>00269 } <span class="comment">// namespace xint</span>
+</pre></div></div>
+<hr size="1"/><address style="text-align: right;"><small>Generated on Tue Apr 6 01:22:07 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.1 </small></address>
+</body>
+</html>

Added: sandbox/xint/doc/copyonwrite_8dox.html
==============================================================================
--- (empty file)
+++ sandbox/xint/doc/copyonwrite_8dox.html 2010-04-06 01:40:33 EDT (Tue, 06 Apr 2010)
@@ -0,0 +1,36 @@
+<!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/copyonwrite.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.1 -->
+<div class="navigation" id="top">
+ <div class="tabs">
+ <ul>
+ <li>Main Page</li>
+ <li>Related Pages</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/copyonwrite.dox File Reference</h1><table border="0" cellpadding="0" cellspacing="0">
+</table>
+</div>
+<hr size="1"/><address style="text-align: right;"><small>Generated on Tue Apr 6 01:22:08 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.1 </small></address>
+</body>
+</html>

Added: sandbox/xint/doc/cow.html
==============================================================================
--- (empty file)
+++ sandbox/xint/doc/cow.html 2010-04-06 01:40:33 EDT (Tue, 06 Apr 2010)
@@ -0,0 +1,34 @@
+<!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: Copying and Argument-Passing</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.1 -->
+<div class="navigation" id="top">
+ <div class="tabs">
+ <ul>
+ <li>Main Page</li>
+ <li class="current">Related Pages</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="cow">Copying and Argument-Passing </a></h1><p>By default, the <a class="el" href="classxint_1_1integer.html" title="The extended integer class.">xint::integer</a> class uses copy-on-write, which means that if you copy an integer, the copy and the original share the same storage. They are only assigned separate storage when one of them is changed. This mechanism makes copying an integer (explicitly, by returning it, or by using it as a non-reference parameter to a function) very fast, regardless of its size.</p>
+<p>(Unfortunately, this makes thread-safe operation impossible. If you need to use the library from multiple threads, you can disable this behavior by compiling it with <a class="el" href="threadsafe.html">the thread-safe option</a>. </p>
+</div>
+<hr size="1"/><address style="text-align: right;"><small>Generated on Tue Apr 6 01:22:08 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.1 </small></address>
+</body>
+</html>

Added: sandbox/xint/doc/data__t_8cpp.html
==============================================================================
--- (empty file)
+++ sandbox/xint/doc/data__t_8cpp.html 2010-04-06 01:40:33 EDT (Tue, 06 Apr 2010)
@@ -0,0 +1,59 @@
+<!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: data_t.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.1 -->
+<div class="navigation" id="top">
+ <div class="tabs">
+ <ul>
+ <li>Main Page</li>
+ <li>Related Pages</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>data_t.cpp File Reference</h1>
+<p>Contains the definitions for <a class="el" href="structxint_1_1detail_1_1data__t.html" title="Holds the internal details of an xint::integer.">xint::detail::data_t</a> member functions.
+More...</p>
+<code>#include &quot;../boost/xint/xint.hpp&quot;</code><br/>
+<code>#include &quot;../boost/xint/xint_data_t.hpp&quot;</code><br/>
+<code>#include &lt;cassert&gt;</code><br/>
+
+<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="namespacexint.html">xint</a></td></tr>
+
+<p><tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight"><p>All of the functions in the XInt library are within this namespace. </p>
+<br/></td></tr>
+</p>
+<tr><td class="memItemLeft" align="right" valign="top">namespace &nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespacexint_1_1detail.html">xint::detail</a></td></tr>
+
+<p><tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight"><p>The items within this namespace are meant for internal use only. </p>
+<br/></td></tr>
+</p>
+</table>
+<hr/><a name="_details"></a><h2>Detailed Description</h2>
+<p>Contains the definitions for <a class="el" href="structxint_1_1detail_1_1data__t.html" title="Holds the internal details of an xint::integer.">xint::detail::data_t</a> member functions. </p>
+
+<p>Definition in file <a class="el" href="data__t_8cpp_source.html">data_t.cpp</a>.</p>
+</div>
+<hr size="1"/><address style="text-align: right;"><small>Generated on Tue Apr 6 01:22:08 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.1 </small></address>
+</body>
+</html>

Added: sandbox/xint/doc/data__t_8cpp_source.html
==============================================================================
--- (empty file)
+++ sandbox/xint/doc/data__t_8cpp_source.html 2010-04-06 01:40:33 EDT (Tue, 06 Apr 2010)
@@ -0,0 +1,345 @@
+<!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: data_t.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.1 -->
+<div class="navigation" id="top">
+ <div class="tabs">
+ <ul>
+ <li>Main Page</li>
+ <li>Related Pages</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>data_t.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/xint.hpp&quot;</span>
+<a name="l00019"></a>00019 <span class="preprocessor">#include &quot;../boost/xint/xint_data_t.hpp&quot;</span>
+<a name="l00020"></a>00020
+<a name="l00021"></a>00021 <span class="preprocessor">#include &lt;cassert&gt;</span>
+<a name="l00022"></a>00022
+<a name="l00023"></a>00023 <span class="keyword">namespace </span>xint {
+<a name="l00024"></a><a class="code" href="namespacexint_1_1detail.html">00024</a> <span class="keyword">namespace </span>detail {
+<a name="l00025"></a>00025
+<a name="l00026"></a><a class="code" href="structxint_1_1detail_1_1data__t.html#a9309667d3ac573346294e7b6e18c67ff">00026</a> <a class="code" href="structxint_1_1detail_1_1data__t.html#a9309667d3ac573346294e7b6e18c67ff">data_t::data_t</a>(<a class="code" href="namespacexint_1_1detail.html#a8843fb7e364832d8d5983de28bdbcf34">digit_t</a> initial1, <a class="code" href="namespacexint_1_1detail.html#a8843fb7e364832d8d5983de28bdbcf34">digit_t</a> initial2, <a class="code" href="namespacexint_1_1detail.html#a8843fb7e364832d8d5983de28bdbcf34">digit_t</a> initial3) {
+<a name="l00027"></a>00027 <a class="code" href="structxint_1_1detail_1_1data__t.html#a599933d272e3592b2d0985ca7f7c72e2">mLength</a>=1;
+<a name="l00028"></a>00028 <a class="code" href="structxint_1_1detail_1_1data__t.html#a3390530db8333b535f65d3cc01ff5236">mAllocated</a>=<a class="code" href="structxint_1_1detail_1_1data__t_1_1_quick_digits.html#ac691b42c4404e59ae07f89146e722736">QuickDigits::count</a>;
+<a name="l00029"></a>00029 <a class="code" href="structxint_1_1detail_1_1data__t.html#a5c9382aec147090d7e7e2b5e972402a9">digits</a>=<a class="code" href="structxint_1_1detail_1_1data__t.html#a022f882ed0818612861b1a67881ae131">mQuickDigits</a>;
+<a name="l00030"></a>00030 <a class="code" href="structxint_1_1detail_1_1data__t.html#a5c9382aec147090d7e7e2b5e972402a9">digits</a>[0]=initial1;
+<a name="l00031"></a>00031 <a class="code" href="structxint_1_1detail_1_1data__t.html#a5c9382aec147090d7e7e2b5e972402a9">digits</a>[1]=initial2;
+<a name="l00032"></a>00032 <a class="code" href="structxint_1_1detail_1_1data__t.html#a5c9382aec147090d7e7e2b5e972402a9">digits</a>[2]=initial3;
+<a name="l00033"></a>00033 <a class="code" href="structxint_1_1detail_1_1data__t.html#a73bc854b5f9ced6576b97d2cff8f3a5d">mCopies</a>=0;
+<a name="l00034"></a>00034 <a class="code" href="structxint_1_1detail_1_1data__t.html#afb2d8673fc5d99d2ea006cd0aa32b744">mIsNegative</a>=<span class="keyword">false</span>;
+<a name="l00035"></a>00035 }
+<a name="l00036"></a>00036
+<a name="l00038"></a><a class="code" href="structxint_1_1detail_1_1data__t.html#ae5afaa677468a9624ed3fb04318fd2a3">00038</a> <a class="code" href="structxint_1_1detail_1_1data__t.html#a9309667d3ac573346294e7b6e18c67ff">data_t::data_t</a>(<a class="code" href="structxint_1_1detail_1_1data__t.html" title="Holds the internal details of an xint::integer.">data_t</a> *c) {
+<a name="l00039"></a>00039 <a class="code" href="structxint_1_1detail_1_1data__t.html#a599933d272e3592b2d0985ca7f7c72e2">mLength</a>=c-&gt;<a class="code" href="structxint_1_1detail_1_1data__t.html#a599933d272e3592b2d0985ca7f7c72e2">mLength</a>;
+<a name="l00040"></a>00040 <span class="keywordflow">if</span> (c-&gt;<a class="code" href="structxint_1_1detail_1_1data__t.html#a5c9382aec147090d7e7e2b5e972402a9">digits</a> == c-&gt;<a class="code" href="structxint_1_1detail_1_1data__t.html#a022f882ed0818612861b1a67881ae131">mQuickDigits</a>) {
+<a name="l00041"></a>00041 <a class="code" href="structxint_1_1detail_1_1data__t.html#a5c9382aec147090d7e7e2b5e972402a9">digits</a>=<a class="code" href="structxint_1_1detail_1_1data__t.html#a022f882ed0818612861b1a67881ae131">mQuickDigits</a>;
+<a name="l00042"></a>00042 <a class="code" href="structxint_1_1detail_1_1data__t.html#a3390530db8333b535f65d3cc01ff5236">mAllocated</a>=<a class="code" href="structxint_1_1detail_1_1data__t_1_1_quick_digits.html#ac691b42c4404e59ae07f89146e722736">QuickDigits::count</a>;
+<a name="l00043"></a>00043 } <span class="keywordflow">else</span> {
+<a name="l00044"></a>00044 <span class="keywordflow">try</span> {
+<a name="l00045"></a>00045 <a class="code" href="structxint_1_1detail_1_1data__t.html#a3390530db8333b535f65d3cc01ff5236">mAllocated</a>=<a class="code" href="structxint_1_1detail_1_1data__t.html#a599933d272e3592b2d0985ca7f7c72e2">mLength</a>;
+<a name="l00046"></a>00046 <span class="preprocessor"> #ifdef XINT_SECURE</span>
+<a name="l00047"></a>00047 <span class="preprocessor"></span> <a class="code" href="structxint_1_1detail_1_1data__t.html#a5c9382aec147090d7e7e2b5e972402a9">digits</a>=<span class="keyword">new</span> <a class="code" href="namespacexint_1_1detail.html#a8843fb7e364832d8d5983de28bdbcf34">digit_t</a>[<a class="code" href="structxint_1_1detail_1_1data__t.html#a3390530db8333b535f65d3cc01ff5236">mAllocated</a>];
+<a name="l00048"></a>00048 <span class="preprocessor"> #else</span>
+<a name="l00049"></a>00049 <span class="preprocessor"></span> <a class="code" href="structxint_1_1detail_1_1data__t.html#a96c33fdc37dd3c774256f7ed20ce735c">mStorage</a>.resize(<a class="code" href="structxint_1_1detail_1_1data__t.html#a3390530db8333b535f65d3cc01ff5236">mAllocated</a>, 0);
+<a name="l00050"></a>00050 <a class="code" href="structxint_1_1detail_1_1data__t.html#a5c9382aec147090d7e7e2b5e972402a9">digits</a>=&amp;<a class="code" href="structxint_1_1detail_1_1data__t.html#a96c33fdc37dd3c774256f7ed20ce735c">mStorage</a>[0];
+<a name="l00051"></a>00051 <span class="preprocessor"> #endif</span>
+<a name="l00052"></a>00052 <span class="preprocessor"></span> } <span class="keywordflow">catch</span> (std::bad_alloc&amp;) {
+<a name="l00053"></a>00053 <span class="keywordflow">throw</span> <a class="code" href="classxint_1_1overflow__error.html" title="Exception class.">xint::overflow_error</a>(<span class="stringliteral">&quot;Out of memory allocating xint::integer&quot;</span>);
+<a name="l00054"></a>00054 }
+<a name="l00055"></a>00055 }
+<a name="l00056"></a>00056 memcpy(<a class="code" href="structxint_1_1detail_1_1data__t.html#a5c9382aec147090d7e7e2b5e972402a9">digits</a>, c-&gt;<a class="code" href="structxint_1_1detail_1_1data__t.html#a5c9382aec147090d7e7e2b5e972402a9">digits</a>, <a class="code" href="structxint_1_1detail_1_1data__t.html#a599933d272e3592b2d0985ca7f7c72e2">mLength</a>*<span class="keyword">sizeof</span>(<a class="code" href="namespacexint_1_1detail.html#a8843fb7e364832d8d5983de28bdbcf34">digit_t</a>));
+<a name="l00057"></a>00057
+<a name="l00058"></a>00058 <a class="code" href="structxint_1_1detail_1_1data__t.html#a73bc854b5f9ced6576b97d2cff8f3a5d">mCopies</a>=0;
+<a name="l00059"></a>00059 <a class="code" href="structxint_1_1detail_1_1data__t.html#afb2d8673fc5d99d2ea006cd0aa32b744">mIsNegative</a>=c-&gt;<a class="code" href="structxint_1_1detail_1_1data__t.html#afb2d8673fc5d99d2ea006cd0aa32b744">mIsNegative</a>;
+<a name="l00060"></a>00060 }
+<a name="l00061"></a>00061
+<a name="l00062"></a>00062 <span class="preprocessor">#ifdef XINT_SECURE</span>
+<a name="l00063"></a>00063 <span class="preprocessor"></span>data_t::~data_t() {
+<a name="l00064"></a>00064 <a class="code" href="structxint_1_1detail_1_1data__t.html#a288850fd62ef26302ce4767a45acd968">zero</a>(<a class="code" href="structxint_1_1detail_1_1data__t.html#a022f882ed0818612861b1a67881ae131">mQuickDigits</a>, <a class="code" href="structxint_1_1detail_1_1data__t_1_1_quick_digits.html#ac691b42c4404e59ae07f89146e722736">QuickDigits::count</a>);
+<a name="l00065"></a>00065 <span class="keywordflow">if</span> (<a class="code" href="structxint_1_1detail_1_1data__t.html#a5c9382aec147090d7e7e2b5e972402a9">digits</a> != <a class="code" href="structxint_1_1detail_1_1data__t.html#a022f882ed0818612861b1a67881ae131">mQuickDigits</a>) {
+<a name="l00066"></a>00066 <a class="code" href="structxint_1_1detail_1_1data__t.html#a288850fd62ef26302ce4767a45acd968">zero</a>(<a class="code" href="structxint_1_1detail_1_1data__t.html#a5c9382aec147090d7e7e2b5e972402a9">digits</a>, <a class="code" href="structxint_1_1detail_1_1data__t.html#a3390530db8333b535f65d3cc01ff5236">mAllocated</a>);
+<a name="l00067"></a>00067 <span class="keyword">delete</span>[] <a class="code" href="structxint_1_1detail_1_1data__t.html#a5c9382aec147090d7e7e2b5e972402a9">digits</a>;
+<a name="l00068"></a>00068 }
+<a name="l00069"></a>00069 }
+<a name="l00070"></a>00070 <span class="preprocessor">#endif</span>
+<a name="l00071"></a>00071 <span class="preprocessor"></span>
+<a name="l00076"></a><a class="code" href="structxint_1_1detail_1_1data__t.html#a6d45feedd311e26f7de06597fb0c6b81">00076</a> <span class="keywordtype">void</span> <a class="code" href="structxint_1_1detail_1_1data__t.html#a6d45feedd311e26f7de06597fb0c6b81">data_t::skipLeadingZeros</a>() {
+<a name="l00077"></a>00077 <a class="code" href="namespacexint_1_1detail.html#a8843fb7e364832d8d5983de28bdbcf34">digit_t</a> *d=<a class="code" href="structxint_1_1detail_1_1data__t.html#a5c9382aec147090d7e7e2b5e972402a9">digits</a>+<a class="code" href="structxint_1_1detail_1_1data__t.html#a599933d272e3592b2d0985ca7f7c72e2">mLength</a>-1;
+<a name="l00078"></a>00078 <span class="keywordflow">while</span> (d&gt;<a class="code" href="structxint_1_1detail_1_1data__t.html#a5c9382aec147090d7e7e2b5e972402a9">digits</a> &amp;&amp; *d==0) --d;
+<a name="l00079"></a>00079 mLength=int((d-<a class="code" href="structxint_1_1detail_1_1data__t.html#a5c9382aec147090d7e7e2b5e972402a9">digits</a>)+1);
+<a name="l00080"></a>00080 <span class="keywordflow">if</span> (mLength==1 &amp;&amp; <a class="code" href="structxint_1_1detail_1_1data__t.html#a5c9382aec147090d7e7e2b5e972402a9">digits</a>[0]==0) <a class="code" href="structxint_1_1detail_1_1data__t.html#afb2d8673fc5d99d2ea006cd0aa32b744">mIsNegative</a>=<span class="keyword">false</span>; <span class="comment">// Zero isn&apos;t negative</span>
+<a name="l00081"></a>00081 }
+<a name="l00082"></a>00082
+<a name="l00083"></a><a class="code" href="structxint_1_1detail_1_1data__t.html#a57fc3966c44d09daeede53899673cde3">00083</a> <span class="keywordtype">void</span> <a class="code" href="structxint_1_1detail_1_1data__t.html#a57fc3966c44d09daeede53899673cde3">data_t::quickset</a>(<a class="code" href="namespacexint_1_1detail.html#a8843fb7e364832d8d5983de28bdbcf34">digit_t</a> d1, <a class="code" href="namespacexint_1_1detail.html#a8843fb7e364832d8d5983de28bdbcf34">digit_t</a> d2, <a class="code" href="namespacexint_1_1detail.html#a8843fb7e364832d8d5983de28bdbcf34">digit_t</a> d3) {
+<a name="l00084"></a>00084 assert(<a class="code" href="structxint_1_1detail_1_1data__t.html#a73bc854b5f9ced6576b97d2cff8f3a5d">mCopies</a>==1);
+<a name="l00085"></a>00085
+<a name="l00086"></a>00086 <a class="code" href="structxint_1_1detail_1_1data__t.html#a599933d272e3592b2d0985ca7f7c72e2">mLength</a>=3;
+<a name="l00087"></a>00087 <a class="code" href="structxint_1_1detail_1_1data__t.html#a5c9382aec147090d7e7e2b5e972402a9">digits</a>[0]=d1;
+<a name="l00088"></a>00088 <a class="code" href="structxint_1_1detail_1_1data__t.html#a5c9382aec147090d7e7e2b5e972402a9">digits</a>[1]=d2;
+<a name="l00089"></a>00089 <a class="code" href="structxint_1_1detail_1_1data__t.html#a5c9382aec147090d7e7e2b5e972402a9">digits</a>[2]=d3;
+<a name="l00090"></a>00090 <a class="code" href="structxint_1_1detail_1_1data__t.html#afb2d8673fc5d99d2ea006cd0aa32b744">mIsNegative</a>=<span class="keyword">false</span>;
+<a name="l00091"></a>00091 <a class="code" href="structxint_1_1detail_1_1data__t.html#a6d45feedd311e26f7de06597fb0c6b81">skipLeadingZeros</a>();
+<a name="l00092"></a>00092 }
+<a name="l00093"></a>00093
+<a name="l00094"></a><a class="code" href="structxint_1_1detail_1_1data__t.html#a4fe3935e29883193166966c49cd73139">00094</a> <span class="keywordtype">void</span> <a class="code" href="structxint_1_1detail_1_1data__t.html#a4fe3935e29883193166966c49cd73139">data_t::alloc</a>(<span class="keywordtype">size_t</span> newcount, <span class="keywordtype">bool</span> copydigits) {
+<a name="l00095"></a>00095 <span class="keywordflow">if</span> (<a class="code" href="structxint_1_1detail_1_1data__t.html#a5c9382aec147090d7e7e2b5e972402a9">digits</a>==<a class="code" href="structxint_1_1detail_1_1data__t.html#a022f882ed0818612861b1a67881ae131">mQuickDigits</a> &amp;&amp; newcount&lt;=<a class="code" href="structxint_1_1detail_1_1data__t_1_1_quick_digits.html#ac691b42c4404e59ae07f89146e722736">QuickDigits::count</a>) {
+<a name="l00096"></a>00096 <span class="keywordflow">if</span> (!copydigits) <a class="code" href="structxint_1_1detail_1_1data__t.html#a288850fd62ef26302ce4767a45acd968">zero</a>(<a class="code" href="structxint_1_1detail_1_1data__t.html#a5c9382aec147090d7e7e2b5e972402a9">digits</a>, <a class="code" href="structxint_1_1detail_1_1data__t_1_1_quick_digits.html#ac691b42c4404e59ae07f89146e722736">QuickDigits::count</a>);
+<a name="l00097"></a>00097 <span class="keywordflow">else</span> <a class="code" href="structxint_1_1detail_1_1data__t.html#a288850fd62ef26302ce4767a45acd968">zero</a>(<a class="code" href="structxint_1_1detail_1_1data__t.html#a5c9382aec147090d7e7e2b5e972402a9">digits</a>+<a class="code" href="structxint_1_1detail_1_1data__t.html#a599933d272e3592b2d0985ca7f7c72e2">mLength</a>, (newcount-<a class="code" href="structxint_1_1detail_1_1data__t.html#a599933d272e3592b2d0985ca7f7c72e2">mLength</a>));
+<a name="l00098"></a>00098 <a class="code" href="structxint_1_1detail_1_1data__t.html#a599933d272e3592b2d0985ca7f7c72e2">mLength</a>=newcount;
+<a name="l00099"></a>00099 } <span class="keywordflow">else</span> <span class="keywordflow">if</span> (newcount &lt; <a class="code" href="structxint_1_1detail_1_1data__t.html#a3390530db8333b535f65d3cc01ff5236">mAllocated</a>) {
+<a name="l00100"></a>00100 <span class="keywordflow">if</span> (copydigits) {
+<a name="l00101"></a>00101 <span class="keywordflow">if</span> (newcount&gt;<a class="code" href="structxint_1_1detail_1_1data__t.html#a599933d272e3592b2d0985ca7f7c72e2">mLength</a>) <a class="code" href="structxint_1_1detail_1_1data__t.html#a288850fd62ef26302ce4767a45acd968">zero</a>(<a class="code" href="structxint_1_1detail_1_1data__t.html#a5c9382aec147090d7e7e2b5e972402a9">digits</a>+<a class="code" href="structxint_1_1detail_1_1data__t.html#a599933d272e3592b2d0985ca7f7c72e2">mLength</a>, newcount-<a class="code" href="structxint_1_1detail_1_1data__t.html#a599933d272e3592b2d0985ca7f7c72e2">mLength</a>);
+<a name="l00102"></a>00102 <a class="code" href="structxint_1_1detail_1_1data__t.html#a599933d272e3592b2d0985ca7f7c72e2">mLength</a>=newcount;
+<a name="l00103"></a>00103 } <span class="keywordflow">else</span> {
+<a name="l00104"></a>00104 <a class="code" href="structxint_1_1detail_1_1data__t.html#a599933d272e3592b2d0985ca7f7c72e2">mLength</a>=newcount;
+<a name="l00105"></a>00105 <a class="code" href="structxint_1_1detail_1_1data__t.html#a288850fd62ef26302ce4767a45acd968">zero</a>(<a class="code" href="structxint_1_1detail_1_1data__t.html#a5c9382aec147090d7e7e2b5e972402a9">digits</a>, <a class="code" href="structxint_1_1detail_1_1data__t.html#a599933d272e3592b2d0985ca7f7c72e2">mLength</a>);
+<a name="l00106"></a>00106 }
+<a name="l00107"></a>00107 } <span class="keywordflow">else</span> {
+<a name="l00108"></a>00108 <span class="preprocessor"> #ifdef XINT_SECURE</span>
+<a name="l00109"></a>00109 <span class="preprocessor"></span> <span class="keywordtype">int</span> e=newcount;
+<a name="l00110"></a>00110 newcount=1;
+<a name="l00111"></a>00111 <span class="keywordflow">while</span> (newcount &lt; e) newcount &lt;&lt;= 1;
+<a name="l00112"></a>00112 <span class="preprocessor"> #endif</span>
+<a name="l00113"></a>00113 <span class="preprocessor"></span>
+<a name="l00114"></a>00114 <span class="keywordflow">if</span> (<a class="code" href="structxint_1_1detail_1_1data__t.html#a5c9382aec147090d7e7e2b5e972402a9">digits</a>==<a class="code" href="structxint_1_1detail_1_1data__t.html#a022f882ed0818612861b1a67881ae131">mQuickDigits</a> &amp;&amp; copydigits) {
+<a name="l00115"></a>00115 <span class="keywordflow">try</span> {
+<a name="l00116"></a>00116 <span class="preprocessor"> #ifdef XINT_SECURE</span>
+<a name="l00117"></a>00117 <span class="preprocessor"></span> <a class="code" href="structxint_1_1detail_1_1data__t.html#a5c9382aec147090d7e7e2b5e972402a9">digits</a>=<span class="keyword">new</span> <a class="code" href="namespacexint_1_1detail.html#a8843fb7e364832d8d5983de28bdbcf34">digit_t</a>[newcount];
+<a name="l00118"></a>00118 <span class="preprocessor"> #else</span>
+<a name="l00119"></a>00119 <span class="preprocessor"></span> <a class="code" href="structxint_1_1detail_1_1data__t.html#a96c33fdc37dd3c774256f7ed20ce735c">mStorage</a>.resize(newcount);
+<a name="l00120"></a>00120 <a class="code" href="structxint_1_1detail_1_1data__t.html#a5c9382aec147090d7e7e2b5e972402a9">digits</a>=&amp;<a class="code" href="structxint_1_1detail_1_1data__t.html#a96c33fdc37dd3c774256f7ed20ce735c">mStorage</a>[0];
+<a name="l00121"></a>00121 <span class="preprocessor"> #endif</span>
+<a name="l00122"></a>00122 <span class="preprocessor"></span> } <span class="keywordflow">catch</span> (std::bad_alloc&amp;) {
+<a name="l00123"></a>00123 <a class="code" href="structxint_1_1detail_1_1data__t.html#a5c9382aec147090d7e7e2b5e972402a9">digits</a>=<a class="code" href="structxint_1_1detail_1_1data__t.html#a022f882ed0818612861b1a67881ae131">mQuickDigits</a>; <span class="comment">// Might allow for recovery in some cases</span>
+<a name="l00124"></a>00124 <span class="keywordflow">throw</span> <a class="code" href="classxint_1_1overflow__error.html" title="Exception class.">xint::overflow_error</a>(<span class="stringliteral">&quot;Out of memory allocating xint::integer&quot;</span>);
+<a name="l00125"></a>00125 }
+<a name="l00126"></a>00126
+<a name="l00127"></a>00127 memcpy(<a class="code" href="structxint_1_1detail_1_1data__t.html#a5c9382aec147090d7e7e2b5e972402a9">digits</a>, <a class="code" href="structxint_1_1detail_1_1data__t.html#a022f882ed0818612861b1a67881ae131">mQuickDigits</a>, <a class="code" href="structxint_1_1detail_1_1data__t.html#a599933d272e3592b2d0985ca7f7c72e2">mLength</a>*<span class="keyword">sizeof</span>(<a class="code" href="namespacexint_1_1detail.html#a8843fb7e364832d8d5983de28bdbcf34">digit_t</a>));
+<a name="l00128"></a>00128 <a class="code" href="structxint_1_1detail_1_1data__t.html#a288850fd62ef26302ce4767a45acd968">zero</a>(<a class="code" href="structxint_1_1detail_1_1data__t.html#a5c9382aec147090d7e7e2b5e972402a9">digits</a>+<a class="code" href="structxint_1_1detail_1_1data__t.html#a599933d272e3592b2d0985ca7f7c72e2">mLength</a>, newcount-<a class="code" href="structxint_1_1detail_1_1data__t.html#a599933d272e3592b2d0985ca7f7c72e2">mLength</a>);
+<a name="l00129"></a>00129 } <span class="keywordflow">else</span> {
+<a name="l00130"></a>00130 <span class="preprocessor"> #ifdef XINT_SECURE</span>
+<a name="l00131"></a>00131 <span class="preprocessor"></span> <a class="code" href="namespacexint_1_1detail.html#a8843fb7e364832d8d5983de28bdbcf34">digit_t</a> *newDigits=0;
+<a name="l00132"></a>00132 <span class="keywordflow">try</span> {
+<a name="l00133"></a>00133 newDigits=<span class="keyword">new</span> <a class="code" href="namespacexint_1_1detail.html#a8843fb7e364832d8d5983de28bdbcf34">digit_t</a>[newcount];
+<a name="l00134"></a>00134 } <span class="keywordflow">catch</span> (std::bad_alloc&amp;) {
+<a name="l00135"></a>00135 <span class="keywordflow">throw</span> <a class="code" href="classxint_1_1overflow__error.html" title="Exception class.">xint::overflow_error</a>(<span class="stringliteral">&quot;Out of memory allocating xint::integer&quot;</span>);
+<a name="l00136"></a>00136 }
+<a name="l00137"></a>00137
+<a name="l00138"></a>00138 <span class="keywordflow">if</span> (copydigits) {
+<a name="l00139"></a>00139 memcpy(newDigits, <a class="code" href="structxint_1_1detail_1_1data__t.html#a5c9382aec147090d7e7e2b5e972402a9">digits</a>, <a class="code" href="structxint_1_1detail_1_1data__t.html#a599933d272e3592b2d0985ca7f7c72e2">mLength</a>*<span class="keyword">sizeof</span>(<a class="code" href="namespacexint_1_1detail.html#a8843fb7e364832d8d5983de28bdbcf34">digit_t</a>));
+<a name="l00140"></a>00140 <a class="code" href="structxint_1_1detail_1_1data__t.html#a288850fd62ef26302ce4767a45acd968">zero</a>(newDigits+<a class="code" href="structxint_1_1detail_1_1data__t.html#a599933d272e3592b2d0985ca7f7c72e2">mLength</a>, newcount-<a class="code" href="structxint_1_1detail_1_1data__t.html#a599933d272e3592b2d0985ca7f7c72e2">mLength</a>);
+<a name="l00141"></a>00141 } <span class="keywordflow">else</span> <a class="code" href="structxint_1_1detail_1_1data__t.html#a288850fd62ef26302ce4767a45acd968">zero</a>(newDigits, newcount);
+<a name="l00142"></a>00142
+<a name="l00143"></a>00143 <span class="keywordflow">if</span> (<a class="code" href="structxint_1_1detail_1_1data__t.html#a5c9382aec147090d7e7e2b5e972402a9">digits</a>!=<a class="code" href="structxint_1_1detail_1_1data__t.html#a022f882ed0818612861b1a67881ae131">mQuickDigits</a>) {
+<a name="l00144"></a>00144 <a class="code" href="structxint_1_1detail_1_1data__t.html#a288850fd62ef26302ce4767a45acd968">zero</a>(<a class="code" href="structxint_1_1detail_1_1data__t.html#a5c9382aec147090d7e7e2b5e972402a9">digits</a>, <a class="code" href="structxint_1_1detail_1_1data__t.html#a3390530db8333b535f65d3cc01ff5236">mAllocated</a>);
+<a name="l00145"></a>00145 <span class="keyword">delete</span>[] <a class="code" href="structxint_1_1detail_1_1data__t.html#a5c9382aec147090d7e7e2b5e972402a9">digits</a>;
+<a name="l00146"></a>00146 }
+<a name="l00147"></a>00147 <a class="code" href="structxint_1_1detail_1_1data__t.html#a5c9382aec147090d7e7e2b5e972402a9">digits</a>=newDigits;
+<a name="l00148"></a>00148 <span class="preprocessor"> #else</span>
+<a name="l00149"></a>00149 <span class="preprocessor"></span> <span class="keywordflow">try</span> {
+<a name="l00150"></a>00150 <a class="code" href="structxint_1_1detail_1_1data__t.html#a96c33fdc37dd3c774256f7ed20ce735c">mStorage</a>.resize(newcount);
+<a name="l00151"></a>00151 } <span class="keywordflow">catch</span> (std::bad_alloc&amp;) {
+<a name="l00152"></a>00152 <span class="keywordflow">throw</span> <a class="code" href="classxint_1_1overflow__error.html" title="Exception class.">xint::overflow_error</a>(<span class="stringliteral">&quot;Out of memory allocating xint::integer&quot;</span>);
+<a name="l00153"></a>00153 }
+<a name="l00154"></a>00154 <a class="code" href="structxint_1_1detail_1_1data__t.html#a5c9382aec147090d7e7e2b5e972402a9">digits</a>=&amp;<a class="code" href="structxint_1_1detail_1_1data__t.html#a96c33fdc37dd3c774256f7ed20ce735c">mStorage</a>[0];
+<a name="l00155"></a>00155 <span class="keywordflow">if</span> (!copydigits) <a class="code" href="structxint_1_1detail_1_1data__t.html#a288850fd62ef26302ce4767a45acd968">zero</a>(<a class="code" href="structxint_1_1detail_1_1data__t.html#a5c9382aec147090d7e7e2b5e972402a9">digits</a>, newcount);
+<a name="l00156"></a>00156 <span class="preprocessor"> #endif</span>
+<a name="l00157"></a>00157 <span class="preprocessor"></span> }
+<a name="l00158"></a>00158 <a class="code" href="structxint_1_1detail_1_1data__t.html#a599933d272e3592b2d0985ca7f7c72e2">mLength</a>=<a class="code" href="structxint_1_1detail_1_1data__t.html#a3390530db8333b535f65d3cc01ff5236">mAllocated</a>=newcount;
+<a name="l00159"></a>00159 }
+<a name="l00160"></a>00160 }
+<a name="l00161"></a>00161
+<a name="l00162"></a><a class="code" href="structxint_1_1detail_1_1data__t.html#a66862f94545c953f6604b4347205277b">00162</a> <span class="keywordtype">void</span> <a class="code" href="structxint_1_1detail_1_1data__t.html#a66862f94545c953f6604b4347205277b">data_t::copy</a>(<span class="keyword">const</span> <a class="code" href="structxint_1_1detail_1_1data__t.html" title="Holds the internal details of an xint::integer.">data_t</a> *c, <span class="keywordtype">size_t</span> extraDigits) {
+<a name="l00163"></a>00163 <a class="code" href="structxint_1_1detail_1_1data__t.html#a4fe3935e29883193166966c49cd73139">alloc</a>(c-&gt;<a class="code" href="structxint_1_1detail_1_1data__t.html#a599933d272e3592b2d0985ca7f7c72e2">mLength</a>+extraDigits);
+<a name="l00164"></a>00164
+<a name="l00165"></a>00165 <a class="code" href="structxint_1_1detail_1_1data__t.html#a599933d272e3592b2d0985ca7f7c72e2">mLength</a>=c-&gt;<a class="code" href="structxint_1_1detail_1_1data__t.html#a599933d272e3592b2d0985ca7f7c72e2">mLength</a>;
+<a name="l00166"></a>00166 <span class="keywordflow">if</span> (c-&gt;<a class="code" href="structxint_1_1detail_1_1data__t.html#a599933d272e3592b2d0985ca7f7c72e2">mLength</a>==1) *<a class="code" href="structxint_1_1detail_1_1data__t.html#a5c9382aec147090d7e7e2b5e972402a9">digits</a> = *c-&gt;<a class="code" href="structxint_1_1detail_1_1data__t.html#a5c9382aec147090d7e7e2b5e972402a9">digits</a>;
+<a name="l00167"></a>00167 <span class="keywordflow">else</span> memcpy(<a class="code" href="structxint_1_1detail_1_1data__t.html#a5c9382aec147090d7e7e2b5e972402a9">digits</a>, c-&gt;<a class="code" href="structxint_1_1detail_1_1data__t.html#a5c9382aec147090d7e7e2b5e972402a9">digits</a>, <a class="code" href="structxint_1_1detail_1_1data__t.html#a599933d272e3592b2d0985ca7f7c72e2">mLength</a>*<span class="keyword">sizeof</span>(<a class="code" href="namespacexint_1_1detail.html#a8843fb7e364832d8d5983de28bdbcf34">digit_t</a>));
+<a name="l00168"></a>00168
+<a name="l00169"></a>00169 <a class="code" href="structxint_1_1detail_1_1data__t.html#afb2d8673fc5d99d2ea006cd0aa32b744">mIsNegative</a>=c-&gt;<a class="code" href="structxint_1_1detail_1_1data__t.html#afb2d8673fc5d99d2ea006cd0aa32b744">mIsNegative</a>;
+<a name="l00170"></a>00170
+<a name="l00171"></a>00171 <span class="comment">// Deliberately doesn&apos;t call skipLeadingZeros().</span>
+<a name="l00172"></a>00172 }
+<a name="l00173"></a>00173
+<a name="l00174"></a><a class="code" href="structxint_1_1detail_1_1data__t.html#a288850fd62ef26302ce4767a45acd968">00174</a> <span class="keywordtype">void</span> <a class="code" href="structxint_1_1detail_1_1data__t.html#a288850fd62ef26302ce4767a45acd968">data_t::zero</a>(<a class="code" href="namespacexint_1_1detail.html#a8843fb7e364832d8d5983de28bdbcf34">digit_t</a> *p, <span class="keywordtype">size_t</span> count) {
+<a name="l00175"></a>00175 <a class="code" href="namespacexint_1_1detail.html#a8843fb7e364832d8d5983de28bdbcf34">digit_t</a> *pe=p+count;
+<a name="l00176"></a>00176 <span class="keywordflow">while</span> (p&lt;pe) *p++=0;
+<a name="l00177"></a>00177 }
+<a name="l00178"></a>00178
+<a name="l00179"></a><a class="code" href="structxint_1_1detail_1_1data__t.html#aaf6f202db416ad8fe18ec8a6c8c48904">00179</a> <span class="keywordtype">void</span> <a class="code" href="structxint_1_1detail_1_1data__t.html#aaf6f202db416ad8fe18ec8a6c8c48904">data_t::invert</a>() {
+<a name="l00180"></a>00180 assert(<a class="code" href="structxint_1_1detail_1_1data__t.html#a73bc854b5f9ced6576b97d2cff8f3a5d">mCopies</a>==1);
+<a name="l00181"></a>00181
+<a name="l00182"></a>00182 <a class="code" href="structxint_1_1detail_1_1data__t.html#afb2d8673fc5d99d2ea006cd0aa32b744">mIsNegative</a>=!<a class="code" href="structxint_1_1detail_1_1data__t.html#afb2d8673fc5d99d2ea006cd0aa32b744">mIsNegative</a>;
+<a name="l00183"></a>00183
+<a name="l00184"></a>00184 <a class="code" href="namespacexint_1_1detail.html#a8843fb7e364832d8d5983de28bdbcf34">digit_t</a> *d=<a class="code" href="structxint_1_1detail_1_1data__t.html#a5c9382aec147090d7e7e2b5e972402a9">digits</a>, *e=d+<a class="code" href="structxint_1_1detail_1_1data__t.html#a599933d272e3592b2d0985ca7f7c72e2">mLength</a>;
+<a name="l00185"></a>00185 <span class="keywordflow">while</span> (d&lt;e) {
+<a name="l00186"></a>00186 *d=<span class="keyword">static_cast&lt;</span><a class="code" href="namespacexint_1_1detail.html#a8843fb7e364832d8d5983de28bdbcf34">digit_t</a><span class="keyword">&gt;</span>(<a class="code" href="namespacexint_1_1detail.html#a6746855fd8cde164294a46108d502e6a">digit_overflowbit</a> - 1 - *d);
+<a name="l00187"></a>00187 ++d;
+<a name="l00188"></a>00188 }
+<a name="l00189"></a>00189
+<a name="l00190"></a>00190 d=<a class="code" href="structxint_1_1detail_1_1data__t.html#a5c9382aec147090d7e7e2b5e972402a9">digits</a>;
+<a name="l00191"></a>00191 <span class="keywordflow">while</span> (d&lt;e) {
+<a name="l00192"></a>00192 <a class="code" href="namespacexint_1_1detail.html#aceb9b654c1c2daaf377b31bd4a089750">doubledigit_t</a> w=(*d)+1;
+<a name="l00193"></a>00193 (*d++)=static_cast&lt;digit_t&gt;(w);
+<a name="l00194"></a>00194 <span class="keywordflow">if</span> (w&lt;<a class="code" href="namespacexint_1_1detail.html#a6746855fd8cde164294a46108d502e6a">digit_overflowbit</a>) <span class="keywordflow">break</span>;
+<a name="l00195"></a>00195 }
+<a name="l00196"></a>00196
+<a name="l00197"></a>00197 <a class="code" href="structxint_1_1detail_1_1data__t.html#a6d45feedd311e26f7de06597fb0c6b81">skipLeadingZeros</a>();
+<a name="l00198"></a>00198 }
+<a name="l00199"></a>00199
+<a name="l00200"></a><a class="code" href="structxint_1_1detail_1_1data__t.html#aa0dd7ef67ccdef3c3139f4afc84219bd">00200</a> <span class="keywordtype">void</span> <a class="code" href="structxint_1_1detail_1_1data__t.html#aa0dd7ef67ccdef3c3139f4afc84219bd">data_t::negate</a>() {
+<a name="l00201"></a>00201 assert(<a class="code" href="structxint_1_1detail_1_1data__t.html#a73bc854b5f9ced6576b97d2cff8f3a5d">mCopies</a>==1);
+<a name="l00202"></a>00202
+<a name="l00203"></a>00203 <span class="comment">// If it&apos;s zero, don&apos;t change the sign</span>
+<a name="l00204"></a>00204 <span class="keywordflow">if</span> (<a class="code" href="structxint_1_1detail_1_1data__t.html#a599933d272e3592b2d0985ca7f7c72e2">mLength</a>&gt;1 || <a class="code" href="structxint_1_1detail_1_1data__t.html#a5c9382aec147090d7e7e2b5e972402a9">digits</a>[0]!=0) <a class="code" href="structxint_1_1detail_1_1data__t.html#afb2d8673fc5d99d2ea006cd0aa32b744">mIsNegative</a>=!<a class="code" href="structxint_1_1detail_1_1data__t.html#afb2d8673fc5d99d2ea006cd0aa32b744">mIsNegative</a>;
+<a name="l00205"></a>00205 }
+<a name="l00206"></a>00206
+<a name="l00207"></a><a class="code" href="structxint_1_1detail_1_1data__t.html#a143e6814a7aa20a0d61ed616b9940b2e">00207</a> <span class="keywordtype">void</span> <a class="code" href="structxint_1_1detail_1_1data__t.html#a143e6814a7aa20a0d61ed616b9940b2e">data_t::add</a>(<span class="keyword">const</span> <a class="code" href="structxint_1_1detail_1_1data__t.html" title="Holds the internal details of an xint::integer.">data_t</a>&amp; addend) {
+<a name="l00208"></a>00208 assert(<a class="code" href="structxint_1_1detail_1_1data__t.html#a73bc854b5f9ced6576b97d2cff8f3a5d">mCopies</a>==1);
+<a name="l00209"></a>00209 assert(<a class="code" href="structxint_1_1detail_1_1data__t.html#a599933d272e3592b2d0985ca7f7c72e2">mLength</a> &gt;= addend.<a class="code" href="structxint_1_1detail_1_1data__t.html#a599933d272e3592b2d0985ca7f7c72e2">mLength</a>);
+<a name="l00210"></a>00210
+<a name="l00211"></a>00211 <span class="comment">// The answer to any addition problem contains, at most, one digit more</span>
+<a name="l00212"></a>00212 <span class="comment">// than the largest addend.</span>
+<a name="l00213"></a>00213 <a class="code" href="structxint_1_1detail_1_1data__t.html#a2bb2c79d47f2fda3605f34b80cb58b8b">realloc</a>(<a class="code" href="structxint_1_1detail_1_1data__t.html#a599933d272e3592b2d0985ca7f7c72e2">mLength</a>+1);
+<a name="l00214"></a>00214
+<a name="l00215"></a>00215 <span class="comment">// Now add the digits, starting at the least-significant digit.</span>
+<a name="l00216"></a>00216 <a class="code" href="namespacexint_1_1detail.html#a8843fb7e364832d8d5983de28bdbcf34">digit_t</a> carry=0;
+<a name="l00217"></a>00217 <span class="keywordtype">size_t</span> x=0;
+<a name="l00218"></a>00218 <span class="keywordflow">for</span> (; x&lt;addend.<a class="code" href="structxint_1_1detail_1_1data__t.html#a599933d272e3592b2d0985ca7f7c72e2">mLength</a>; ++x) {
+<a name="l00219"></a>00219 <a class="code" href="namespacexint_1_1detail.html#aceb9b654c1c2daaf377b31bd4a089750">doubledigit_t</a> t=<a class="code" href="namespacexint_1_1detail.html#aceb9b654c1c2daaf377b31bd4a089750">doubledigit_t</a>(<a class="code" href="structxint_1_1detail_1_1data__t.html#a5c9382aec147090d7e7e2b5e972402a9">digits</a>[x])+addend.<a class="code" href="structxint_1_1detail_1_1data__t.html#a5c9382aec147090d7e7e2b5e972402a9">digits</a>[x]+carry;
+<a name="l00220"></a>00220 <span class="keywordflow">if</span> (t&gt;=<a class="code" href="namespacexint_1_1detail.html#a6746855fd8cde164294a46108d502e6a">digit_overflowbit</a>) { carry=1; t-=<a class="code" href="namespacexint_1_1detail.html#a6746855fd8cde164294a46108d502e6a">digit_overflowbit</a>; } <span class="keywordflow">else</span> carry=0;
+<a name="l00221"></a>00221 <a class="code" href="structxint_1_1detail_1_1data__t.html#a5c9382aec147090d7e7e2b5e972402a9">digits</a>[x]=<span class="keyword">static_cast&lt;</span><a class="code" href="namespacexint_1_1detail.html#a8843fb7e364832d8d5983de28bdbcf34">digit_t</a><span class="keyword">&gt;</span>(t);
+<a name="l00222"></a>00222 }
+<a name="l00223"></a>00223
+<a name="l00224"></a>00224 <span class="keywordflow">while</span> (carry) {
+<a name="l00225"></a>00225 <a class="code" href="namespacexint_1_1detail.html#aceb9b654c1c2daaf377b31bd4a089750">doubledigit_t</a> t=<a class="code" href="namespacexint_1_1detail.html#aceb9b654c1c2daaf377b31bd4a089750">doubledigit_t</a>(<a class="code" href="structxint_1_1detail_1_1data__t.html#a5c9382aec147090d7e7e2b5e972402a9">digits</a>[x])+1;
+<a name="l00226"></a>00226 <span class="keywordflow">if</span> (t&gt;=<a class="code" href="namespacexint_1_1detail.html#a6746855fd8cde164294a46108d502e6a">digit_overflowbit</a>) { carry=1; t-=<a class="code" href="namespacexint_1_1detail.html#a6746855fd8cde164294a46108d502e6a">digit_overflowbit</a>; } <span class="keywordflow">else</span> carry=0;
+<a name="l00227"></a>00227 <a class="code" href="structxint_1_1detail_1_1data__t.html#a5c9382aec147090d7e7e2b5e972402a9">digits</a>[x]=<span class="keyword">static_cast&lt;</span><a class="code" href="namespacexint_1_1detail.html#a8843fb7e364832d8d5983de28bdbcf34">digit_t</a><span class="keyword">&gt;</span>(t);
+<a name="l00228"></a>00228 ++x;
+<a name="l00229"></a>00229 }
+<a name="l00230"></a>00230
+<a name="l00231"></a>00231 <a class="code" href="structxint_1_1detail_1_1data__t.html#a6d45feedd311e26f7de06597fb0c6b81">skipLeadingZeros</a>();
+<a name="l00232"></a>00232 }
+<a name="l00233"></a>00233
+<a name="l00234"></a><a class="code" href="structxint_1_1detail_1_1data__t.html#a650d374b8d38b369273830bb9d939da4">00234</a> <span class="keywordtype">void</span> <a class="code" href="structxint_1_1detail_1_1data__t.html#a650d374b8d38b369273830bb9d939da4">data_t::subtract</a>(<span class="keyword">const</span> <a class="code" href="structxint_1_1detail_1_1data__t.html" title="Holds the internal details of an xint::integer.">data_t</a>&amp; subtrahend) {
+<a name="l00235"></a>00235 assert(<a class="code" href="structxint_1_1detail_1_1data__t.html#a73bc854b5f9ced6576b97d2cff8f3a5d">mCopies</a>==1);
+<a name="l00236"></a>00236 assert(<a class="code" href="structxint_1_1detail_1_1data__t.html#a599933d272e3592b2d0985ca7f7c72e2">mLength</a> &gt;= subtrahend.<a class="code" href="structxint_1_1detail_1_1data__t.html#a599933d272e3592b2d0985ca7f7c72e2">mLength</a>);
+<a name="l00237"></a>00237
+<a name="l00238"></a>00238 <span class="comment">// For subtraction, the answer will always be less than or equal to the</span>
+<a name="l00239"></a>00239 <span class="comment">// size of the longest operand, so we&apos;ve already got enough room.</span>
+<a name="l00240"></a>00240
+<a name="l00241"></a>00241 <span class="comment">// Now subtract the digits, starting at the least-significant one.</span>
+<a name="l00242"></a>00242 <span class="keywordtype">size_t</span> x;
+<a name="l00243"></a>00243 <span class="keywordtype">int</span> borrow=0;
+<a name="l00244"></a>00244 <a class="code" href="namespacexint_1_1detail.html#aceb9b654c1c2daaf377b31bd4a089750">doubledigit_t</a> t;
+<a name="l00245"></a>00245 <span class="keywordflow">for</span> (x=0; x&lt;subtrahend.<a class="code" href="structxint_1_1detail_1_1data__t.html#a599933d272e3592b2d0985ca7f7c72e2">mLength</a>; ++x) {
+<a name="l00246"></a>00246 t=(<a class="code" href="structxint_1_1detail_1_1data__t.html#a5c9382aec147090d7e7e2b5e972402a9">digits</a>[x]+<a class="code" href="namespacexint_1_1detail.html#a6746855fd8cde164294a46108d502e6a">digit_overflowbit</a>)-subtrahend.<a class="code" href="structxint_1_1detail_1_1data__t.html#a5c9382aec147090d7e7e2b5e972402a9">digits</a>[x]-borrow;
+<a name="l00247"></a>00247 if (t&lt;<a class="code" href="namespacexint_1_1detail.html#a6746855fd8cde164294a46108d502e6a">digit_overflowbit</a>) borrow=1; <span class="keywordflow">else</span> { borrow=0; t-=<a class="code" href="namespacexint_1_1detail.html#a6746855fd8cde164294a46108d502e6a">digit_overflowbit</a>; }
+<a name="l00248"></a>00248 <a class="code" href="structxint_1_1detail_1_1data__t.html#a5c9382aec147090d7e7e2b5e972402a9">digits</a>[x]=<span class="keyword">static_cast&lt;</span><a class="code" href="namespacexint_1_1detail.html#a8843fb7e364832d8d5983de28bdbcf34">digit_t</a><span class="keyword">&gt;</span>(t);
+<a name="l00249"></a>00249 }
+<a name="l00250"></a>00250
+<a name="l00251"></a>00251 <span class="keywordflow">for</span> (; x&lt;<a class="code" href="structxint_1_1detail_1_1data__t.html#a599933d272e3592b2d0985ca7f7c72e2">mLength</a> &amp;&amp; borrow; ++x) {
+<a name="l00252"></a>00252 t=(<a class="code" href="structxint_1_1detail_1_1data__t.html#a5c9382aec147090d7e7e2b5e972402a9">digits</a>[x]+<a class="code" href="namespacexint_1_1detail.html#a6746855fd8cde164294a46108d502e6a">digit_overflowbit</a>)-borrow;
+<a name="l00253"></a>00253 <span class="keywordflow">if</span> (t&lt;<a class="code" href="namespacexint_1_1detail.html#a6746855fd8cde164294a46108d502e6a">digit_overflowbit</a>) borrow=1; <span class="keywordflow">else</span> { borrow=0; t-=<a class="code" href="namespacexint_1_1detail.html#a6746855fd8cde164294a46108d502e6a">digit_overflowbit</a>; }
+<a name="l00254"></a>00254 <a class="code" href="structxint_1_1detail_1_1data__t.html#a5c9382aec147090d7e7e2b5e972402a9">digits</a>[x]=<span class="keyword">static_cast&lt;</span><a class="code" href="namespacexint_1_1detail.html#a8843fb7e364832d8d5983de28bdbcf34">digit_t</a><span class="keyword">&gt;</span>(t);
+<a name="l00255"></a>00255 }
+<a name="l00256"></a>00256
+<a name="l00257"></a>00257 <span class="keywordflow">if</span> (borrow) <a class="code" href="structxint_1_1detail_1_1data__t.html#aa0dd7ef67ccdef3c3139f4afc84219bd">negate</a>();
+<a name="l00258"></a>00258 <a class="code" href="structxint_1_1detail_1_1data__t.html#a6d45feedd311e26f7de06597fb0c6b81">skipLeadingZeros</a>();
+<a name="l00259"></a>00259 }
+<a name="l00260"></a>00260
+<a name="l00261"></a><a class="code" href="structxint_1_1detail_1_1data__t.html#a72785130c7c6490af874f450cf6e0086">00261</a> <span class="keywordtype">void</span> <a class="code" href="structxint_1_1detail_1_1data__t.html#a72785130c7c6490af874f450cf6e0086">data_t::shift_left</a>(<span class="keywordtype">size_t</span> byBits) {
+<a name="l00262"></a>00262 assert(<a class="code" href="structxint_1_1detail_1_1data__t.html#a73bc854b5f9ced6576b97d2cff8f3a5d">mCopies</a>==1);
+<a name="l00263"></a>00263 assert(byBits&gt;0);
+<a name="l00264"></a>00264
+<a name="l00265"></a>00265 <span class="keywordtype">size_t</span> bytes=byBits / <a class="code" href="namespacexint_1_1detail.html#a9bd9e8d55061238d63913020d2721518">bits_per_digit</a>, bits=byBits % <a class="code" href="namespacexint_1_1detail.html#a9bd9e8d55061238d63913020d2721518">bits_per_digit</a>;
+<a name="l00266"></a>00266 <span class="keywordtype">size_t</span> oldLength=<a class="code" href="structxint_1_1detail_1_1data__t.html#a599933d272e3592b2d0985ca7f7c72e2">mLength</a>;
+<a name="l00267"></a>00267
+<a name="l00268"></a>00268 <a class="code" href="structxint_1_1detail_1_1data__t.html#a2bb2c79d47f2fda3605f34b80cb58b8b">realloc</a>(<a class="code" href="structxint_1_1detail_1_1data__t.html#a599933d272e3592b2d0985ca7f7c72e2">mLength</a>+bytes+1);
+<a name="l00269"></a>00269
+<a name="l00270"></a>00270 <span class="keywordflow">if</span> (bits != 0) {
+<a name="l00271"></a>00271 <span class="comment">// Handle both bits and bytes in one pass</span>
+<a name="l00272"></a>00272 <a class="code" href="namespacexint_1_1detail.html#a8843fb7e364832d8d5983de28bdbcf34">digit_t</a> *s=<a class="code" href="structxint_1_1detail_1_1data__t.html#a5c9382aec147090d7e7e2b5e972402a9">digits</a>+oldLength-1, *t=s+bytes+1;
+<a name="l00273"></a>00273
+<a name="l00274"></a>00274 *t-- = *s &gt;&gt; (<a class="code" href="namespacexint_1_1detail.html#a9bd9e8d55061238d63913020d2721518">bits_per_digit</a> - bits);
+<a name="l00275"></a>00275 <span class="keywordflow">while</span> (s &gt; <a class="code" href="structxint_1_1detail_1_1data__t.html#a5c9382aec147090d7e7e2b5e972402a9">digits</a>) {
+<a name="l00276"></a>00276 *t = (*s-- &lt;&lt; bits);
+<a name="l00277"></a>00277 *t-- |= (*s &gt;&gt; (<a class="code" href="namespacexint_1_1detail.html#a9bd9e8d55061238d63913020d2721518">bits_per_digit</a> - bits));
+<a name="l00278"></a>00278 }
+<a name="l00279"></a>00279 *t = (*s &lt;&lt; bits);
+<a name="l00280"></a>00280
+<a name="l00281"></a>00281 <span class="keywordflow">if</span> (bytes != 0) memset(<a class="code" href="structxint_1_1detail_1_1data__t.html#a5c9382aec147090d7e7e2b5e972402a9">digits</a>, 0, <span class="keyword">sizeof</span>(<a class="code" href="namespacexint_1_1detail.html#a8843fb7e364832d8d5983de28bdbcf34">digit_t</a>) * bytes);
+<a name="l00282"></a>00282 } <span class="keywordflow">else</span> <span class="keywordflow">if</span> (bytes != 0) {
+<a name="l00283"></a>00283 memmove(<a class="code" href="structxint_1_1detail_1_1data__t.html#a5c9382aec147090d7e7e2b5e972402a9">digits</a>+bytes, <a class="code" href="structxint_1_1detail_1_1data__t.html#a5c9382aec147090d7e7e2b5e972402a9">digits</a>, <span class="keyword">sizeof</span>(<a class="code" href="namespacexint_1_1detail.html#a8843fb7e364832d8d5983de28bdbcf34">digit_t</a>) * oldLength);
+<a name="l00284"></a>00284 memset(<a class="code" href="structxint_1_1detail_1_1data__t.html#a5c9382aec147090d7e7e2b5e972402a9">digits</a>, 0, <span class="keyword">sizeof</span>(<a class="code" href="namespacexint_1_1detail.html#a8843fb7e364832d8d5983de28bdbcf34">digit_t</a>) * bytes);
+<a name="l00285"></a>00285 }
+<a name="l00286"></a>00286 <a class="code" href="structxint_1_1detail_1_1data__t.html#a6d45feedd311e26f7de06597fb0c6b81">skipLeadingZeros</a>();
+<a name="l00287"></a>00287 }
+<a name="l00288"></a>00288
+<a name="l00289"></a><a class="code" href="structxint_1_1detail_1_1data__t.html#a432ace7094bca306dcba254f862e2428">00289</a> <span class="keywordtype">void</span> <a class="code" href="structxint_1_1detail_1_1data__t.html#a432ace7094bca306dcba254f862e2428">data_t::shift_right</a>(<span class="keywordtype">size_t</span> byBits) {
+<a name="l00290"></a>00290 assert(<a class="code" href="structxint_1_1detail_1_1data__t.html#a73bc854b5f9ced6576b97d2cff8f3a5d">mCopies</a>==1);
+<a name="l00291"></a>00291 assert(byBits&gt;0);
+<a name="l00292"></a>00292
+<a name="l00293"></a>00293 <span class="keywordtype">size_t</span> bytes=byBits / <a class="code" href="namespacexint_1_1detail.html#a9bd9e8d55061238d63913020d2721518">bits_per_digit</a>, bits=byBits % <a class="code" href="namespacexint_1_1detail.html#a9bd9e8d55061238d63913020d2721518">bits_per_digit</a>,
+<a name="l00294"></a>00294 bits2 = <a class="code" href="namespacexint_1_1detail.html#a9bd9e8d55061238d63913020d2721518">bits_per_digit</a> - bits;
+<a name="l00295"></a>00295
+<a name="l00296"></a>00296 <span class="keywordflow">if</span> (bytes &gt;= <a class="code" href="structxint_1_1detail_1_1data__t.html#a599933d272e3592b2d0985ca7f7c72e2">mLength</a>) {
+<a name="l00297"></a>00297 <span class="comment">// Right-shift it into oblivion.</span>
+<a name="l00298"></a>00298 <a class="code" href="structxint_1_1detail_1_1data__t.html#a599933d272e3592b2d0985ca7f7c72e2">mLength</a>=1;
+<a name="l00299"></a>00299 *<a class="code" href="structxint_1_1detail_1_1data__t.html#a5c9382aec147090d7e7e2b5e972402a9">digits</a>=0;
+<a name="l00300"></a>00300 } <span class="keywordflow">else</span> <span class="keywordflow">if</span> (bits != 0) {
+<a name="l00301"></a>00301 <span class="comment">// Handle both bits and bytes in one pass</span>
+<a name="l00302"></a>00302 <a class="code" href="namespacexint_1_1detail.html#a8843fb7e364832d8d5983de28bdbcf34">digit_t</a> *t=<a class="code" href="structxint_1_1detail_1_1data__t.html#a5c9382aec147090d7e7e2b5e972402a9">digits</a>, *s=<a class="code" href="structxint_1_1detail_1_1data__t.html#a5c9382aec147090d7e7e2b5e972402a9">digits</a>+bytes, *se=<a class="code" href="structxint_1_1detail_1_1data__t.html#a5c9382aec147090d7e7e2b5e972402a9">digits</a>+<a class="code" href="structxint_1_1detail_1_1data__t.html#a599933d272e3592b2d0985ca7f7c72e2">mLength</a>-1;
+<a name="l00303"></a>00303 <span class="keywordflow">while</span> (s!=se) {
+<a name="l00304"></a>00304 *t = (*s++ &gt;&gt; bits);
+<a name="l00305"></a>00305 *t++ |= (*s &lt;&lt; bits2);
+<a name="l00306"></a>00306 }
+<a name="l00307"></a>00307 *t = (*s &gt;&gt; bits);
+<a name="l00308"></a>00308 <span class="keywordflow">if</span> (bytes != 0) {
+<a name="l00309"></a>00309 memset(<a class="code" href="structxint_1_1detail_1_1data__t.html#a5c9382aec147090d7e7e2b5e972402a9">digits</a>+mLength-bytes, 0, <span class="keyword">sizeof</span>(<a class="code" href="namespacexint_1_1detail.html#a8843fb7e364832d8d5983de28bdbcf34">digit_t</a>) * bytes);
+<a name="l00310"></a>00310 mLength-=bytes;
+<a name="l00311"></a>00311 }
+<a name="l00312"></a>00312 <a class="code" href="structxint_1_1detail_1_1data__t.html#a6d45feedd311e26f7de06597fb0c6b81">skipLeadingZeros</a>();
+<a name="l00313"></a>00313 } <span class="keywordflow">else</span> <span class="keywordflow">if</span> (bytes != 0) {
+<a name="l00314"></a>00314 memmove(<a class="code" href="structxint_1_1detail_1_1data__t.html#a5c9382aec147090d7e7e2b5e972402a9">digits</a>, <a class="code" href="structxint_1_1detail_1_1data__t.html#a5c9382aec147090d7e7e2b5e972402a9">digits</a> + bytes, <span class="keyword">sizeof</span>(<a class="code" href="namespacexint_1_1detail.html#a8843fb7e364832d8d5983de28bdbcf34">digit_t</a>) * (<a class="code" href="structxint_1_1detail_1_1data__t.html#a599933d272e3592b2d0985ca7f7c72e2">mLength</a> - bytes));
+<a name="l00315"></a>00315 memset(<a class="code" href="structxint_1_1detail_1_1data__t.html#a5c9382aec147090d7e7e2b5e972402a9">digits</a> + <a class="code" href="structxint_1_1detail_1_1data__t.html#a599933d272e3592b2d0985ca7f7c72e2">mLength</a> - bytes, 0, <span class="keyword">sizeof</span>(<a class="code" href="namespacexint_1_1detail.html#a8843fb7e364832d8d5983de28bdbcf34">digit_t</a>) * bytes);
+<a name="l00316"></a>00316 <a class="code" href="structxint_1_1detail_1_1data__t.html#a599933d272e3592b2d0985ca7f7c72e2">mLength</a>-=bytes;
+<a name="l00317"></a>00317 <a class="code" href="structxint_1_1detail_1_1data__t.html#a6d45feedd311e26f7de06597fb0c6b81">skipLeadingZeros</a>();
+<a name="l00318"></a>00318 }
+<a name="l00319"></a>00319 }
+<a name="l00320"></a>00320
+<a name="l00321"></a>00321 } <span class="comment">// namespace detail</span>
+<a name="l00322"></a>00322 } <span class="comment">// namespace xint</span>
+</pre></div></div>
+<hr size="1"/><address style="text-align: right;"><small>Generated on Tue Apr 6 01:22:07 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.1 </small></address>
+</body>
+</html>

Added: sandbox/xint/doc/dependencies.html
==============================================================================
--- (empty file)
+++ sandbox/xint/doc/dependencies.html 2010-04-06 01:40:33 EDT (Tue, 06 Apr 2010)
@@ -0,0 +1,43 @@
+<!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: Dependencies</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.1 -->
+<div class="navigation" id="top">
+ <div class="tabs">
+ <ul>
+ <li>Main Page</li>
+ <li class="current">Related Pages</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="dependencies">Dependencies </a></h1><p>Like any non-trivial program, this library uses several other pieces of code, though I've tried to minimize the dependencies. Here are the ones that are required:</p>
+<ul>
+<li>Boost.Integer</li>
+<li>Boost.Function</li>
+<li>Boost.StaticAssert</li>
+<li>Boost.Random</li>
+<li>Boost.TypeTraits</li>
+<li>Boost.SmartPointers</li>
+<li>Boost.Thread (but only if the library was compiled for <a class="el" href="threadsafe.html">thread-safe operation</a>)</li>
+</ul>
+<p>With the exception of Boost.Thread, all of these are header-only libraries, meaning that you don't need to worry about linking your program with them. </p>
+</div>
+<hr size="1"/><address style="text-align: right;"><small>Generated on Tue Apr 6 01:22:08 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.1 </small></address>
+</body>
+</html>

Added: sandbox/xint/doc/dependencies_8dox.html
==============================================================================
--- (empty file)
+++ sandbox/xint/doc/dependencies_8dox.html 2010-04-06 01:40:33 EDT (Tue, 06 Apr 2010)
@@ -0,0 +1,36 @@
+<!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/dependencies.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.1 -->
+<div class="navigation" id="top">
+ <div class="tabs">
+ <ul>
+ <li>Main Page</li>
+ <li>Related Pages</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/dependencies.dox File Reference</h1><table border="0" cellpadding="0" cellspacing="0">
+</table>
+</div>
+<hr size="1"/><address style="text-align: right;"><small>Generated on Tue Apr 6 01:22:08 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.1 </small></address>
+</body>
+</html>

Added: sandbox/xint/doc/dox/Doxyfile
==============================================================================
--- (empty file)
+++ sandbox/xint/doc/dox/Doxyfile 2010-04-06 01:40:33 EDT (Tue, 06 Apr 2010)
@@ -0,0 +1,1544 @@
+# Doxyfile 1.5.8
+
+# This file describes the settings to be used by the documentation system
+# doxygen (www.doxygen.org) for a project
+#
+# All text after a hash (#) is considered a comment and will be ignored
+# The format is:
+# TAG = value [value, ...]
+# For lists items can also be appended using:
+# TAG += value [value, ...]
+# Values that contain spaces should be placed between quotes (" ")
+
+#---------------------------------------------------------------------------
+# Project related configuration options
+#---------------------------------------------------------------------------
+
+# This tag specifies the encoding used for all characters in the config file
+# that follow. The default is UTF-8 which is also the encoding used for all
+# text before the first occurrence of this tag. Doxygen uses libiconv (or the
+# iconv built into libc) for the transcoding. See
+# http://www.gnu.org/software/libiconv for the list of possible encodings.
+
+DOXYFILE_ENCODING = UTF-8
+
+# The PROJECT_NAME tag is a single word (or a sequence of words surrounded
+# by quotes) that should identify the project.
+
+PROJECT_NAME = "The Extended Integer (XInt) Library"
+
+# The PROJECT_NUMBER tag can be used to enter a project or revision number.
+# This could be handy for archiving the generated documentation or
+# if some version control system is used.
+
+PROJECT_NUMBER =
+
+# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute)
+# base path where the generated documentation will be put.
+# If a relative path is entered, it will be relative to the location
+# where doxygen was started. If left blank the current directory will be used.
+
+OUTPUT_DIRECTORY = /home/chad/projects/xint/doc/dox
+
+# If the CREATE_SUBDIRS tag is set to YES, then doxygen will create
+# 4096 sub-directories (in 2 levels) under the output directory of each output
+# format and will distribute the generated files over these directories.
+# Enabling this option can be useful when feeding doxygen a huge amount of
+# source files, where putting all generated files in the same directory would
+# otherwise cause performance problems for the file system.
+
+CREATE_SUBDIRS = NO
+
+# The OUTPUT_LANGUAGE tag is used to specify the language in which all
+# documentation generated by doxygen is written. Doxygen will use this
+# information to generate all constant output in the proper language.
+# The default language is English, other supported languages are:
+# Afrikaans, Arabic, Brazilian, Catalan, Chinese, Chinese-Traditional,
+# Croatian, Czech, Danish, Dutch, Farsi, Finnish, French, German, Greek,
+# Hungarian, Italian, Japanese, Japanese-en (Japanese with English messages),
+# Korean, Korean-en, Lithuanian, Norwegian, Macedonian, Persian, Polish,
+# Portuguese, Romanian, Russian, Serbian, Serbian-Cyrilic, Slovak, Slovene,
+# Spanish, Swedish, and Ukrainian.
+
+OUTPUT_LANGUAGE = English
+
+# If the BRIEF_MEMBER_DESC tag is set to YES (the default) Doxygen will
+# include brief member descriptions after the members that are listed in
+# the file and class documentation (similar to JavaDoc).
+# Set to NO to disable this.
+
+BRIEF_MEMBER_DESC = YES
+
+# If the REPEAT_BRIEF tag is set to YES (the default) Doxygen will prepend
+# the brief description of a member or function before the detailed description.
+# Note: if both HIDE_UNDOC_MEMBERS and BRIEF_MEMBER_DESC are set to NO, the
+# brief descriptions will be completely suppressed.
+
+REPEAT_BRIEF = YES
+
+# This tag implements a quasi-intelligent brief description abbreviator
+# that is used to form the text in various listings. Each string
+# in this list, if found as the leading text of the brief description, will be
+# stripped from the text and the result after processing the whole list, is
+# used as the annotated text. Otherwise, the brief description is used as-is.
+# If left blank, the following values are used ("$name" is automatically
+# replaced with the name of the entity): "The $name class" "The $name widget"
+# "The $name file" "is" "provides" "specifies" "contains"
+# "represents" "a" "an" "the"
+
+ABBREVIATE_BRIEF = "The $name class" \
+ "The $name widget" \
+ "The $name file" \
+ is \
+ provides \
+ specifies \
+ contains \
+ represents \
+ a \
+ an \
+ the
+
+# If the ALWAYS_DETAILED_SEC and REPEAT_BRIEF tags are both set to YES then
+# Doxygen will generate a detailed section even if there is only a brief
+# description.
+
+ALWAYS_DETAILED_SEC = NO
+
+# If the INLINE_INHERITED_MEMB tag is set to YES, doxygen will show all
+# inherited members of a class in the documentation of that class as if those
+# members were ordinary class members. Constructors, destructors and assignment
+# operators of the base classes will not be shown.
+
+INLINE_INHERITED_MEMB = NO
+
+# If the FULL_PATH_NAMES tag is set to YES then Doxygen will prepend the full
+# path before files name in the file list and in the header files. If set
+# to NO the shortest path that makes the file name unique will be used.
+
+FULL_PATH_NAMES = YES
+
+# If the FULL_PATH_NAMES tag is set to YES then the STRIP_FROM_PATH tag
+# can be used to strip a user-defined part of the path. Stripping is
+# only done if one of the specified strings matches the left-hand part of
+# the path. The tag can be used to show relative paths in the file list.
+# If left blank the directory from which doxygen is run is used as the
+# path to strip.
+
+STRIP_FROM_PATH = /home/chad/projects/xint/src \
+ /home/chad/projects/xint/boost/xint
+
+# The STRIP_FROM_INC_PATH tag can be used to strip a user-defined part of
+# the path mentioned in the documentation of a class, which tells
+# the reader which header file to include in order to use a class.
+# If left blank only the name of the header file containing the class
+# definition is used. Otherwise one should specify the include paths that
+# are normally passed to the compiler using the -I flag.
+
+STRIP_FROM_INC_PATH =
+
+# If the SHORT_NAMES tag is set to YES, doxygen will generate much shorter
+# (but less readable) file names. This can be useful is your file systems
+# doesn't support long names like on DOS, Mac, or CD-ROM.
+
+SHORT_NAMES = NO
+
+# If the JAVADOC_AUTOBRIEF tag is set to YES then Doxygen
+# will interpret the first line (until the first dot) of a JavaDoc-style
+# comment as the brief description. If set to NO, the JavaDoc
+# comments will behave just like regular Qt-style comments
+# (thus requiring an explicit @brief command for a brief description.)
+
+JAVADOC_AUTOBRIEF = NO
+
+# If the QT_AUTOBRIEF tag is set to YES then Doxygen will
+# interpret the first line (until the first dot) of a Qt-style
+# comment as the brief description. If set to NO, the comments
+# will behave just like regular Qt-style comments (thus requiring
+# an explicit \brief command for a brief description.)
+
+QT_AUTOBRIEF = NO
+
+# The MULTILINE_CPP_IS_BRIEF tag can be set to YES to make Doxygen
+# treat a multi-line C++ special comment block (i.e. a block of //! or ///
+# comments) as a brief description. This used to be the default behaviour.
+# The new default is to treat a multi-line C++ comment block as a detailed
+# description. Set this tag to YES if you prefer the old behaviour instead.
+
+MULTILINE_CPP_IS_BRIEF = NO
+
+# If the INHERIT_DOCS tag is set to YES (the default) then an undocumented
+# member inherits the documentation from any documented member that it
+# re-implements.
+
+INHERIT_DOCS = YES
+
+# If the SEPARATE_MEMBER_PAGES tag is set to YES, then doxygen will produce
+# a new page for each member. If set to NO, the documentation of a member will
+# be part of the file/class/namespace that contains it.
+
+SEPARATE_MEMBER_PAGES = NO
+
+# The TAB_SIZE tag can be used to set the number of spaces in a tab.
+# Doxygen uses this value to replace tabs by spaces in code fragments.
+
+TAB_SIZE = 8
+
+# This tag can be used to specify a number of aliases that acts
+# as commands in the documentation. An alias has the form "name=value".
+# For example adding "sideeffect=\par Side Effects:\n" will allow you to
+# put the command \sideeffect (or @sideeffect) in the documentation, which
+# will result in a user-defined paragraph with heading "Side Effects:".
+# You can put \n's in the value part of an alias to insert newlines.
+
+ALIASES =
+
+# Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C
+# sources only. Doxygen will then generate output that is more tailored for C.
+# For instance, some of the names that are used will be different. The list
+# of all members will be omitted, etc.
+
+OPTIMIZE_OUTPUT_FOR_C = NO
+
+# Set the OPTIMIZE_OUTPUT_JAVA tag to YES if your project consists of Java
+# sources only. Doxygen will then generate output that is more tailored for
+# Java. For instance, namespaces will be presented as packages, qualified
+# scopes will look different, etc.
+
+OPTIMIZE_OUTPUT_JAVA = NO
+
+# Set the OPTIMIZE_FOR_FORTRAN tag to YES if your project consists of Fortran
+# sources only. Doxygen will then generate output that is more tailored for
+# Fortran.
+
+OPTIMIZE_FOR_FORTRAN = NO
+
+# Set the OPTIMIZE_OUTPUT_VHDL tag to YES if your project consists of VHDL
+# sources. Doxygen will then generate output that is tailored for
+# VHDL.
+
+OPTIMIZE_OUTPUT_VHDL = NO
+
+# Doxygen selects the parser to use depending on the extension of the files it parses.
+# With this tag you can assign which parser to use for a given extension.
+# Doxygen has a built-in mapping, but you can override or extend it using this tag.
+# The format is ext=language, where ext is a file extension, and language is one of
+# the parsers supported by doxygen: IDL, Java, Javascript, C#, C, C++, D, PHP,
+# Objective-C, Python, Fortran, VHDL, C, C++. For instance to make doxygen treat
+# .inc files as Fortran files (default is PHP), and .f files as C (default is Fortran),
+# use: inc=Fortran f=C
+
+EXTENSION_MAPPING =
+
+# If you use STL classes (i.e. std::string, std::vector, etc.) but do not want
+# to include (a tag file for) the STL sources as input, then you should
+# set this tag to YES in order to let doxygen match functions declarations and
+# definitions whose arguments contain STL classes (e.g. func(std::string); v.s.
+# func(std::string) {}). This also make the inheritance and collaboration
+# diagrams that involve STL classes more complete and accurate.
+
+BUILTIN_STL_SUPPORT = NO
+
+# If you use Microsoft's C++/CLI language, you should set this option to YES to
+# enable parsing support.
+
+CPP_CLI_SUPPORT = NO
+
+# Set the SIP_SUPPORT tag to YES if your project consists of sip sources only.
+# Doxygen will parse them like normal C++ but will assume all classes use public
+# instead of private inheritance when no explicit protection keyword is present.
+
+SIP_SUPPORT = NO
+
+# For Microsoft's IDL there are propget and propput attributes to indicate getter
+# and setter methods for a property. Setting this option to YES (the default)
+# will make doxygen to replace the get and set methods by a property in the
+# documentation. This will only work if the methods are indeed getting or
+# setting a simple type. If this is not the case, or you want to show the
+# methods anyway, you should set this option to NO.
+
+IDL_PROPERTY_SUPPORT = YES
+
+# If member grouping is used in the documentation and the DISTRIBUTE_GROUP_DOC
+# tag is set to YES, then doxygen will reuse the documentation of the first
+# member in the group (if any) for the other members of the group. By default
+# all members of a group must be documented explicitly.
+
+DISTRIBUTE_GROUP_DOC = NO
+
+# Set the SUBGROUPING tag to YES (the default) to allow class member groups of
+# the same type (for instance a group of public functions) to be put as a
+# subgroup of that type (e.g. under the Public Functions section). Set it to
+# NO to prevent subgrouping. Alternatively, this can be done per class using
+# the \nosubgrouping command.
+
+SUBGROUPING = YES
+
+# When TYPEDEF_HIDES_STRUCT is enabled, a typedef of a struct, union, or enum
+# is documented as struct, union, or enum with the name of the typedef. So
+# typedef struct TypeS {} TypeT, will appear in the documentation as a struct
+# with name TypeT. When disabled the typedef will appear as a member of a file,
+# namespace, or class. And the struct will be named TypeS. This can typically
+# be useful for C code in case the coding convention dictates that all compound
+# types are typedef'ed and only the typedef is referenced, never the tag name.
+
+TYPEDEF_HIDES_STRUCT = NO
+
+# The SYMBOL_CACHE_SIZE determines the size of the internal cache use to
+# determine which symbols to keep in memory and which to flush to disk.
+# When the cache is full, less often used symbols will be written to disk.
+# For small to medium size projects (<1000 input files) the default value is
+# probably good enough. For larger projects a too small cache size can cause
+# doxygen to be busy swapping symbols to and from disk most of the time
+# causing a significant performance penality.
+# If the system has enough physical memory increasing the cache will improve the
+# performance by keeping more symbols in memory. Note that the value works on
+# a logarithmic scale so increasing the size by one will rougly double the
+# memory usage. The cache size is given by this formula:
+# 2^(16+SYMBOL_CACHE_SIZE). The valid range is 0..9, the default is 0,
+# corresponding to a cache size of 2^16 = 65536 symbols
+
+SYMBOL_CACHE_SIZE = 0
+
+#---------------------------------------------------------------------------
+# Build related configuration options
+#---------------------------------------------------------------------------
+
+# If the EXTRACT_ALL tag is set to YES doxygen will assume all entities in
+# documentation are documented, even if no documentation was available.
+# Private class members and static file members will be hidden unless
+# the EXTRACT_PRIVATE and EXTRACT_STATIC tags are set to YES
+
+EXTRACT_ALL = YES
+
+# If the EXTRACT_PRIVATE tag is set to YES all private members of a class
+# will be included in the documentation.
+
+EXTRACT_PRIVATE = NO
+
+# If the EXTRACT_STATIC tag is set to YES all static members of a file
+# will be included in the documentation.
+
+EXTRACT_STATIC = NO
+
+# If the EXTRACT_LOCAL_CLASSES tag is set to YES classes (and structs)
+# defined locally in source files will be included in the documentation.
+# If set to NO only classes defined in header files are included.
+
+EXTRACT_LOCAL_CLASSES = YES
+
+# This flag is only useful for Objective-C code. When set to YES local
+# methods, which are defined in the implementation section but not in
+# the interface are included in the documentation.
+# If set to NO (the default) only methods in the interface are included.
+
+EXTRACT_LOCAL_METHODS = NO
+
+# If this flag is set to YES, the members of anonymous namespaces will be
+# extracted and appear in the documentation as a namespace called
+# 'anonymous_namespace{file}', where file will be replaced with the base
+# name of the file that contains the anonymous namespace. By default
+# anonymous namespace are hidden.
+
+EXTRACT_ANON_NSPACES = NO
+
+# If the HIDE_UNDOC_MEMBERS tag is set to YES, Doxygen will hide all
+# undocumented members of documented classes, files or namespaces.
+# If set to NO (the default) these members will be included in the
+# various overviews, but no documentation section is generated.
+# This option has no effect if EXTRACT_ALL is enabled.
+
+HIDE_UNDOC_MEMBERS = NO
+
+# If the HIDE_UNDOC_CLASSES tag is set to YES, Doxygen will hide all
+# undocumented classes that are normally visible in the class hierarchy.
+# If set to NO (the default) these classes will be included in the various
+# overviews. This option has no effect if EXTRACT_ALL is enabled.
+
+HIDE_UNDOC_CLASSES = NO
+
+# If the HIDE_FRIEND_COMPOUNDS tag is set to YES, Doxygen will hide all
+# friend (class|struct|union) declarations.
+# If set to NO (the default) these declarations will be included in the
+# documentation.
+
+HIDE_FRIEND_COMPOUNDS = NO
+
+# If the HIDE_IN_BODY_DOCS tag is set to YES, Doxygen will hide any
+# documentation blocks found inside the body of a function.
+# If set to NO (the default) these blocks will be appended to the
+# function's detailed documentation block.
+
+HIDE_IN_BODY_DOCS = NO
+
+# The INTERNAL_DOCS tag determines if documentation
+# that is typed after a \internal command is included. If the tag is set
+# to NO (the default) then the documentation will be excluded.
+# Set it to YES to include the internal documentation.
+
+INTERNAL_DOCS = NO
+
+# If the CASE_SENSE_NAMES tag is set to NO then Doxygen will only generate
+# file names in lower-case letters. If set to YES upper-case letters are also
+# allowed. This is useful if you have classes or files whose names only differ
+# in case and if your file system supports case sensitive file names. Windows
+# and Mac users are advised to set this option to NO.
+
+CASE_SENSE_NAMES = NO
+
+# If the HIDE_SCOPE_NAMES tag is set to NO (the default) then Doxygen
+# will show members with their full class and namespace scopes in the
+# documentation. If set to YES the scope will be hidden.
+
+HIDE_SCOPE_NAMES = NO
+
+# If the SHOW_INCLUDE_FILES tag is set to YES (the default) then Doxygen
+# will put a list of the files that are included by a file in the documentation
+# of that file.
+
+SHOW_INCLUDE_FILES = YES
+
+# If the INLINE_INFO tag is set to YES (the default) then a tag [inline]
+# is inserted in the documentation for inline members.
+
+INLINE_INFO = YES
+
+# If the SORT_MEMBER_DOCS tag is set to YES (the default) then doxygen
+# will sort the (detailed) documentation of file and class members
+# alphabetically by member name. If set to NO the members will appear in
+# declaration order.
+
+SORT_MEMBER_DOCS = YES
+
+# If the SORT_BRIEF_DOCS tag is set to YES then doxygen will sort the
+# brief documentation of file, namespace and class members alphabetically
+# by member name. If set to NO (the default) the members will appear in
+# declaration order.
+
+SORT_BRIEF_DOCS = NO
+
+# If the SORT_GROUP_NAMES tag is set to YES then doxygen will sort the
+# hierarchy of group names into alphabetical order. If set to NO (the default)
+# the group names will appear in their defined order.
+
+SORT_GROUP_NAMES = NO
+
+# If the SORT_BY_SCOPE_NAME tag is set to YES, the class list will be
+# sorted by fully-qualified names, including namespaces. If set to
+# NO (the default), the class list will be sorted only by class name,
+# not including the namespace part.
+# Note: This option is not very useful if HIDE_SCOPE_NAMES is set to YES.
+# Note: This option applies only to the class list, not to the
+# alphabetical list.
+
+SORT_BY_SCOPE_NAME = NO
+
+# The GENERATE_TODOLIST tag can be used to enable (YES) or
+# disable (NO) the todo list. This list is created by putting \todo
+# commands in the documentation.
+
+GENERATE_TODOLIST = YES
+
+# The GENERATE_TESTLIST tag can be used to enable (YES) or
+# disable (NO) the test list. This list is created by putting \test
+# commands in the documentation.
+
+GENERATE_TESTLIST = YES
+
+# The GENERATE_BUGLIST tag can be used to enable (YES) or
+# disable (NO) the bug list. This list is created by putting \bug
+# commands in the documentation.
+
+GENERATE_BUGLIST = YES
+
+# The GENERATE_DEPRECATEDLIST tag can be used to enable (YES) or
+# disable (NO) the deprecated list. This list is created by putting
+# \deprecated commands in the documentation.
+
+GENERATE_DEPRECATEDLIST= YES
+
+# The ENABLED_SECTIONS tag can be used to enable conditional
+# documentation sections, marked by \if sectionname ... \endif.
+
+ENABLED_SECTIONS =
+
+# The MAX_INITIALIZER_LINES tag determines the maximum number of lines
+# the initial value of a variable or define consists of for it to appear in
+# the documentation. If the initializer consists of more lines than specified
+# here it will be hidden. Use a value of 0 to hide initializers completely.
+# The appearance of the initializer of individual variables and defines in the
+# documentation can be controlled using \showinitializer or \hideinitializer
+# command in the documentation regardless of this setting.
+
+MAX_INITIALIZER_LINES = 30
+
+# Set the SHOW_USED_FILES tag to NO to disable the list of files generated
+# at the bottom of the documentation of classes and structs. If set to YES the
+# list will mention the files that were used to generate the documentation.
+
+SHOW_USED_FILES = YES
+
+# If the sources in your project are distributed over multiple directories
+# then setting the SHOW_DIRECTORIES tag to YES will show the directory hierarchy
+# in the documentation. The default is NO.
+
+SHOW_DIRECTORIES = NO
+
+# Set the SHOW_FILES tag to NO to disable the generation of the Files page.
+# This will remove the Files entry from the Quick Index and from the
+# Folder Tree View (if specified). The default is YES.
+
+SHOW_FILES = YES
+
+# Set the SHOW_NAMESPACES tag to NO to disable the generation of the
+# Namespaces page. This will remove the Namespaces entry from the Quick Index
+# and from the Folder Tree View (if specified). The default is YES.
+
+SHOW_NAMESPACES = YES
+
+# The FILE_VERSION_FILTER tag can be used to specify a program or script that
+# doxygen should invoke to get the current version for each file (typically from
+# the version control system). Doxygen will invoke the program by executing (via
+# popen()) the command <command> <input-file>, where <command> is the value of
+# the FILE_VERSION_FILTER tag, and <input-file> is the name of an input file
+# provided by doxygen. Whatever the program writes to standard output
+# is used as the file version. See the manual for examples.
+
+FILE_VERSION_FILTER =
+
+# The LAYOUT_FILE tag can be used to specify a layout file which will be parsed by
+# doxygen. The layout file controls the global structure of the generated output files
+# in an output format independent way. The create the layout file that represents
+# doxygen's defaults, run doxygen with the -l option. You can optionally specify a
+# file name after the option, if omitted DoxygenLayout.xml will be used as the name
+# of the layout file.
+
+LAYOUT_FILE =
+
+#---------------------------------------------------------------------------
+# configuration options related to warning and progress messages
+#---------------------------------------------------------------------------
+
+# The QUIET tag can be used to turn on/off the messages that are generated
+# by doxygen. Possible values are YES and NO. If left blank NO is used.
+
+QUIET = NO
+
+# The WARNINGS tag can be used to turn on/off the warning messages that are
+# generated by doxygen. Possible values are YES and NO. If left blank
+# NO is used.
+
+WARNINGS = YES
+
+# If WARN_IF_UNDOCUMENTED is set to YES, then doxygen will generate warnings
+# for undocumented members. If EXTRACT_ALL is set to YES then this flag will
+# automatically be disabled.
+
+WARN_IF_UNDOCUMENTED = YES
+
+# If WARN_IF_DOC_ERROR is set to YES, doxygen will generate warnings for
+# potential errors in the documentation, such as not documenting some
+# parameters in a documented function, or documenting parameters that
+# don't exist or using markup commands wrongly.
+
+WARN_IF_DOC_ERROR = YES
+
+# This WARN_NO_PARAMDOC option can be abled to get warnings for
+# functions that are documented, but have no documentation for their parameters
+# or return value. If set to NO (the default) doxygen will only warn about
+# wrong or incomplete parameter documentation, but not about the absence of
+# documentation.
+
+WARN_NO_PARAMDOC = NO
+
+# The WARN_FORMAT tag determines the format of the warning messages that
+# doxygen can produce. The string should contain the $file, $line, and $text
+# tags, which will be replaced by the file and line number from which the
+# warning originated and the warning text. Optionally the format may contain
+# $version, which will be replaced by the version of the file (if it could
+# be obtained via FILE_VERSION_FILTER)
+
+WARN_FORMAT = "$file:$line: $text"
+
+# The WARN_LOGFILE tag can be used to specify a file to which warning
+# and error messages should be written. If left blank the output is written
+# to stderr.
+
+WARN_LOGFILE =
+
+#---------------------------------------------------------------------------
+# configuration options related to the input files
+#---------------------------------------------------------------------------
+
+# The INPUT tag can be used to specify the files and/or directories that contain
+# documented source files. You may enter file names like "myfile.cpp" or
+# directories like "/usr/src/myproject". Separate the files or directories
+# with spaces.
+
+INPUT = /home/chad/projects/xint/src \
+ /home/chad/projects/xint/boost/xint \
+ /home/chad/projects/xint/doc/dox
+
+# This tag can be used to specify the character encoding of the source files
+# that doxygen parses. Internally doxygen uses the UTF-8 encoding, which is
+# also the default input encoding. Doxygen uses libiconv (or the iconv built
+# into libc) for the transcoding. See http://www.gnu.org/software/libiconv for
+# the list of possible encodings.
+
+INPUT_ENCODING = UTF-8
+
+# If the value of the INPUT tag contains directories, you can use the
+# FILE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp
+# and *.h) to filter out the source-files in the directories. If left
+# blank the following patterns are tested:
+# *.c *.cc *.cxx *.cpp *.c++ *.java *.ii *.ixx *.ipp *.i++ *.inl *.h *.hh *.hxx
+# *.hpp *.h++ *.idl *.odl *.cs *.php *.php3 *.inc *.m *.mm *.py *.f90
+
+FILE_PATTERNS = *.c \
+ *.cc \
+ *.cxx \
+ *.cpp \
+ *.c++ \
+ *.d \
+ *.java \
+ *.ii \
+ *.ixx \
+ *.ipp \
+ *.i++ \
+ *.inl \
+ *.h \
+ *.hh \
+ *.hxx \
+ *.hpp \
+ *.h++ \
+ *.idl \
+ *.odl \
+ *.cs \
+ *.php \
+ *.php3 \
+ *.inc \
+ *.m \
+ *.mm \
+ *.dox \
+ *.py \
+ *.f90 \
+ *.f \
+ *.vhd \
+ *.vhdl
+
+# The RECURSIVE tag can be used to turn specify whether or not subdirectories
+# should be searched for input files as well. Possible values are YES and NO.
+# If left blank NO is used.
+
+RECURSIVE = YES
+
+# The EXCLUDE tag can be used to specify files and/or directories that should
+# excluded from the INPUT source files. This way you can easily exclude a
+# subdirectory from a directory tree whose root is specified with the INPUT tag.
+
+EXCLUDE =
+
+# The EXCLUDE_SYMLINKS tag can be used select whether or not files or
+# directories that are symbolic links (a Unix filesystem feature) are excluded
+# from the input.
+
+EXCLUDE_SYMLINKS = NO
+
+# If the value of the INPUT tag contains directories, you can use the
+# EXCLUDE_PATTERNS tag to specify one or more wildcard patterns to exclude
+# certain files from those directories. Note that the wildcards are matched
+# against the file with absolute path, so to exclude all test directories
+# for example use the pattern */test/*
+
+EXCLUDE_PATTERNS =
+
+# The EXCLUDE_SYMBOLS tag can be used to specify one or more symbol names
+# (namespaces, classes, functions, etc.) that should be excluded from the
+# output. The symbol name can be a fully qualified name, a word, or if the
+# wildcard * is used, a substring. Examples: ANamespace, AClass,
+# AClass::ANamespace, ANamespace::*Test
+
+EXCLUDE_SYMBOLS =
+
+# The EXAMPLE_PATH tag can be used to specify one or more files or
+# directories that contain example code fragments that are included (see
+# the \include command).
+
+EXAMPLE_PATH = /home/chad/projects/xint/example
+
+# If the value of the EXAMPLE_PATH tag contains directories, you can use the
+# EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp
+# and *.h) to filter out the source-files in the directories. If left
+# blank all files are included.
+
+EXAMPLE_PATTERNS = *
+
+# If the EXAMPLE_RECURSIVE tag is set to YES then subdirectories will be
+# searched for input files to be used with the \include or \dontinclude
+# commands irrespective of the value of the RECURSIVE tag.
+# Possible values are YES and NO. If left blank NO is used.
+
+EXAMPLE_RECURSIVE = NO
+
+# The IMAGE_PATH tag can be used to specify one or more files or
+# directories that contain image that are included in the documentation (see
+# the \image command).
+
+IMAGE_PATH =
+
+# The INPUT_FILTER tag can be used to specify a program that doxygen should
+# invoke to filter for each input file. Doxygen will invoke the filter program
+# by executing (via popen()) the command <filter> <input-file>, where <filter>
+# is the value of the INPUT_FILTER tag, and <input-file> is the name of an
+# input file. Doxygen will then use the output that the filter program writes
+# to standard output. If FILTER_PATTERNS is specified, this tag will be
+# ignored.
+
+INPUT_FILTER =
+
+# The FILTER_PATTERNS tag can be used to specify filters on a per file pattern
+# basis. Doxygen will compare the file name with each pattern and apply the
+# filter if there is a match. The filters are a list of the form:
+# pattern=filter (like *.cpp=my_cpp_filter). See INPUT_FILTER for further
+# info on how filters are used. If FILTER_PATTERNS is empty, INPUT_FILTER
+# is applied to all files.
+
+FILTER_PATTERNS =
+
+# If the FILTER_SOURCE_FILES tag is set to YES, the input filter (if set using
+# INPUT_FILTER) will be used to filter the input files when producing source
+# files to browse (i.e. when SOURCE_BROWSER is set to YES).
+
+FILTER_SOURCE_FILES = NO
+
+#---------------------------------------------------------------------------
+# configuration options related to source browsing
+#---------------------------------------------------------------------------
+
+# If the SOURCE_BROWSER tag is set to YES then a list of source files will
+# be generated. Documented entities will be cross-referenced with these sources.
+# Note: To get rid of all source code in the generated output, make sure also
+# VERBATIM_HEADERS is set to NO.
+
+SOURCE_BROWSER = YES
+
+# Setting the INLINE_SOURCES tag to YES will include the body
+# of functions and classes directly in the documentation.
+
+INLINE_SOURCES = NO
+
+# Setting the STRIP_CODE_COMMENTS tag to YES (the default) will instruct
+# doxygen to hide any special comment blocks from generated source code
+# fragments. Normal C and C++ comments will always remain visible.
+
+STRIP_CODE_COMMENTS = YES
+
+# If the REFERENCED_BY_RELATION tag is set to YES
+# then for each documented function all documented
+# functions referencing it will be listed.
+
+REFERENCED_BY_RELATION = NO
+
+# If the REFERENCES_RELATION tag is set to YES
+# then for each documented function all documented entities
+# called/used by that function will be listed.
+
+REFERENCES_RELATION = NO
+
+# If the REFERENCES_LINK_SOURCE tag is set to YES (the default)
+# and SOURCE_BROWSER tag is set to YES, then the hyperlinks from
+# functions in REFERENCES_RELATION and REFERENCED_BY_RELATION lists will
+# link to the source code. Otherwise they will link to the documentation.
+
+REFERENCES_LINK_SOURCE = YES
+
+# If the USE_HTAGS tag is set to YES then the references to source code
+# will point to the HTML generated by the htags(1) tool instead of doxygen
+# built-in source browser. The htags tool is part of GNU's global source
+# tagging system (see http://www.gnu.org/software/global/global.html). You
+# will need version 4.8.6 or higher.
+
+USE_HTAGS = NO
+
+# If the VERBATIM_HEADERS tag is set to YES (the default) then Doxygen
+# will generate a verbatim copy of the header file for each class for
+# which an include is specified. Set to NO to disable this.
+
+VERBATIM_HEADERS = YES
+
+#---------------------------------------------------------------------------
+# configuration options related to the alphabetical class index
+#---------------------------------------------------------------------------
+
+# If the ALPHABETICAL_INDEX tag is set to YES, an alphabetical index
+# of all compounds will be generated. Enable this if the project
+# contains a lot of classes, structs, unions or interfaces.
+
+ALPHABETICAL_INDEX = NO
+
+# If the alphabetical index is enabled (see ALPHABETICAL_INDEX) then
+# the COLS_IN_ALPHA_INDEX tag can be used to specify the number of columns
+# in which this list will be split (can be a number in the range [1..20])
+
+COLS_IN_ALPHA_INDEX = 5
+
+# In case all classes in a project start with a common prefix, all
+# classes will be put under the same header in the alphabetical index.
+# The IGNORE_PREFIX tag can be used to specify one or more prefixes that
+# should be ignored while generating the index headers.
+
+IGNORE_PREFIX =
+
+#---------------------------------------------------------------------------
+# configuration options related to the HTML output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_HTML tag is set to YES (the default) Doxygen will
+# generate HTML output.
+
+GENERATE_HTML = YES
+
+# The HTML_OUTPUT tag is used to specify where the HTML docs will be put.
+# If a relative path is entered the value of OUTPUT_DIRECTORY will be
+# put in front of it. If left blank `html' will be used as the default path.
+
+HTML_OUTPUT = ../
+
+# The HTML_FILE_EXTENSION tag can be used to specify the file extension for
+# each generated HTML page (for example: .htm,.php,.asp). If it is left blank
+# doxygen will generate files with .html extension.
+
+HTML_FILE_EXTENSION = .html
+
+# The HTML_HEADER tag can be used to specify a personal HTML header for
+# each generated HTML page. If it is left blank doxygen will generate a
+# standard header.
+
+HTML_HEADER =
+
+# The HTML_FOOTER tag can be used to specify a personal HTML footer for
+# each generated HTML page. If it is left blank doxygen will generate a
+# standard footer.
+
+HTML_FOOTER =
+
+# The HTML_STYLESHEET tag can be used to specify a user-defined cascading
+# style sheet that is used by each HTML page. It can be used to
+# fine-tune the look of the HTML output. If the tag is left blank doxygen
+# will generate a default style sheet. Note that doxygen will try to copy
+# the style sheet file to the HTML output directory, so don't put your own
+# stylesheet in the HTML output directory as well, or it will be erased!
+
+HTML_STYLESHEET =
+
+# If the HTML_ALIGN_MEMBERS tag is set to YES, the members of classes,
+# files or namespaces will be aligned in HTML using tables. If set to
+# NO a bullet list will be used.
+
+HTML_ALIGN_MEMBERS = YES
+
+# If the HTML_DYNAMIC_SECTIONS tag is set to YES then the generated HTML
+# documentation will contain sections that can be hidden and shown after the
+# page has loaded. For this to work a browser that supports
+# JavaScript and DHTML is required (for instance Mozilla 1.0+, Firefox
+# Netscape 6.0+, Internet explorer 5.0+, Konqueror, or Safari).
+
+HTML_DYNAMIC_SECTIONS = NO
+
+# If the GENERATE_DOCSET tag is set to YES, additional index files
+# will be generated that can be used as input for Apple's Xcode 3
+# integrated development environment, introduced with OSX 10.5 (Leopard).
+# To create a documentation set, doxygen will generate a Makefile in the
+# HTML output directory. Running make will produce the docset in that
+# directory and running "make install" will install the docset in
+# ~/Library/Developer/Shared/Documentation/DocSets so that Xcode will find
+# it at startup.
+# See http://developer.apple.com/tools/creatingdocsetswithdoxygen.html for more information.
+
+GENERATE_DOCSET = NO
+
+# When GENERATE_DOCSET tag is set to YES, this tag determines the name of the
+# feed. A documentation feed provides an umbrella under which multiple
+# documentation sets from a single provider (such as a company or product suite)
+# can be grouped.
+
+DOCSET_FEEDNAME = "Doxygen generated docs"
+
+# When GENERATE_DOCSET tag is set to YES, this tag specifies a string that
+# should uniquely identify the documentation set bundle. This should be a
+# reverse domain-name style string, e.g. com.mycompany.MyDocSet. Doxygen
+# will append .docset to the name.
+
+DOCSET_BUNDLE_ID = org.doxygen.Project
+
+# If the GENERATE_HTMLHELP tag is set to YES, additional index files
+# will be generated that can be used as input for tools like the
+# Microsoft HTML help workshop to generate a compiled HTML help file (.chm)
+# of the generated HTML documentation.
+
+GENERATE_HTMLHELP = NO
+
+# If the GENERATE_HTMLHELP tag is set to YES, the CHM_FILE tag can
+# be used to specify the file name of the resulting .chm file. You
+# can add a path in front of the file if the result should not be
+# written to the html output directory.
+
+CHM_FILE =
+
+# If the GENERATE_HTMLHELP tag is set to YES, the HHC_LOCATION tag can
+# be used to specify the location (absolute path including file name) of
+# the HTML help compiler (hhc.exe). If non-empty doxygen will try to run
+# the HTML help compiler on the generated index.hhp.
+
+HHC_LOCATION =
+
+# If the GENERATE_HTMLHELP tag is set to YES, the GENERATE_CHI flag
+# controls if a separate .chi index file is generated (YES) or that
+# it should be included in the master .chm file (NO).
+
+GENERATE_CHI = NO
+
+# If the GENERATE_HTMLHELP tag is set to YES, the CHM_INDEX_ENCODING
+# is used to encode HtmlHelp index (hhk), content (hhc) and project file
+# content.
+
+CHM_INDEX_ENCODING =
+
+# If the GENERATE_HTMLHELP tag is set to YES, the BINARY_TOC flag
+# controls whether a binary table of contents is generated (YES) or a
+# normal table of contents (NO) in the .chm file.
+
+BINARY_TOC = NO
+
+# The TOC_EXPAND flag can be set to YES to add extra items for group members
+# to the contents of the HTML help documentation and to the tree view.
+
+TOC_EXPAND = NO
+
+# If the GENERATE_QHP tag is set to YES and both QHP_NAMESPACE and QHP_VIRTUAL_FOLDER
+# are set, an additional index file will be generated that can be used as input for
+# Qt's qhelpgenerator to generate a Qt Compressed Help (.qch) of the generated
+# HTML documentation.
+
+GENERATE_QHP = NO
+
+# If the QHG_LOCATION tag is specified, the QCH_FILE tag can
+# be used to specify the file name of the resulting .qch file.
+# The path specified is relative to the HTML output folder.
+
+QCH_FILE =
+
+# The QHP_NAMESPACE tag specifies the namespace to use when generating
+# Qt Help Project output. For more information please see
+# http://doc.trolltech.com/qthelpproject.html#namespace
+
+QHP_NAMESPACE =
+
+# The QHP_VIRTUAL_FOLDER tag specifies the namespace to use when generating
+# Qt Help Project output. For more information please see
+# http://doc.trolltech.com/qthelpproject.html#virtual-folders
+
+QHP_VIRTUAL_FOLDER = doc
+
+# If QHP_CUST_FILTER_NAME is set, it specifies the name of a custom filter to add.
+# For more information please see
+# http://doc.trolltech.com/qthelpproject.html#custom-filters
+
+QHP_CUST_FILTER_NAME =
+
+# The QHP_CUST_FILT_ATTRS tag specifies the list of the attributes of the custom filter to add.For more information please see
+# Qt Help Project / Custom Filters.
+
+QHP_CUST_FILTER_ATTRS =
+
+# The QHP_SECT_FILTER_ATTRS tag specifies the list of the attributes this project's
+# filter section matches.
+# Qt Help Project / Filter Attributes.
+
+QHP_SECT_FILTER_ATTRS =
+
+# If the GENERATE_QHP tag is set to YES, the QHG_LOCATION tag can
+# be used to specify the location of Qt's qhelpgenerator.
+# If non-empty doxygen will try to run qhelpgenerator on the generated
+# .qhp file.
+
+QHG_LOCATION =
+
+# The DISABLE_INDEX tag can be used to turn on/off the condensed index at
+# top of each HTML page. The value NO (the default) enables the index and
+# the value YES disables it.
+
+DISABLE_INDEX = NO
+
+# This tag can be used to set the number of enum values (range [1..20])
+# that doxygen will group on one line in the generated HTML documentation.
+
+ENUM_VALUES_PER_LINE = 4
+
+# The GENERATE_TREEVIEW tag is used to specify whether a tree-like index
+# structure should be generated to display hierarchical information.
+# If the tag value is set to FRAME, a side panel will be generated
+# containing a tree-like index structure (just like the one that
+# is generated for HTML Help). For this to work a browser that supports
+# JavaScript, DHTML, CSS and frames is required (for instance Mozilla 1.0+,
+# Netscape 6.0+, Internet explorer 5.0+, or Konqueror). Windows users are
+# probably better off using the HTML help feature. Other possible values
+# for this tag are: HIERARCHIES, which will generate the Groups, Directories,
+# and Class Hierarchy pages using a tree view instead of an ordered list;
+# ALL, which combines the behavior of FRAME and HIERARCHIES; and NONE, which
+# disables this behavior completely. For backwards compatibility with previous
+# releases of Doxygen, the values YES and NO are equivalent to FRAME and NONE
+# respectively.
+
+GENERATE_TREEVIEW = NONE
+
+# If the treeview is enabled (see GENERATE_TREEVIEW) then this tag can be
+# used to set the initial width (in pixels) of the frame in which the tree
+# is shown.
+
+TREEVIEW_WIDTH = 250
+
+# Use this tag to change the font size of Latex formulas included
+# as images in the HTML documentation. The default is 10. Note that
+# when you change the font size after a successful doxygen run you need
+# to manually remove any form_*.png images from the HTML output directory
+# to force them to be regenerated.
+
+FORMULA_FONTSIZE = 10
+
+#---------------------------------------------------------------------------
+# configuration options related to the LaTeX output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_LATEX tag is set to YES (the default) Doxygen will
+# generate Latex output.
+
+GENERATE_LATEX = NO
+
+# The LATEX_OUTPUT tag is used to specify where the LaTeX docs will be put.
+# If a relative path is entered the value of OUTPUT_DIRECTORY will be
+# put in front of it. If left blank `latex' will be used as the default path.
+
+LATEX_OUTPUT = latex
+
+# The LATEX_CMD_NAME tag can be used to specify the LaTeX command name to be
+# invoked. If left blank `latex' will be used as the default command name.
+
+LATEX_CMD_NAME = latex
+
+# The MAKEINDEX_CMD_NAME tag can be used to specify the command name to
+# generate index for LaTeX. If left blank `makeindex' will be used as the
+# default command name.
+
+MAKEINDEX_CMD_NAME = makeindex
+
+# If the COMPACT_LATEX tag is set to YES Doxygen generates more compact
+# LaTeX documents. This may be useful for small projects and may help to
+# save some trees in general.
+
+COMPACT_LATEX = NO
+
+# The PAPER_TYPE tag can be used to set the paper type that is used
+# by the printer. Possible values are: a4, a4wide, letter, legal and
+# executive. If left blank a4wide will be used.
+
+PAPER_TYPE = a4wide
+
+# The EXTRA_PACKAGES tag can be to specify one or more names of LaTeX
+# packages that should be included in the LaTeX output.
+
+EXTRA_PACKAGES =
+
+# The LATEX_HEADER tag can be used to specify a personal LaTeX header for
+# the generated latex document. The header should contain everything until
+# the first chapter. If it is left blank doxygen will generate a
+# standard header. Notice: only use this tag if you know what you are doing!
+
+LATEX_HEADER =
+
+# If the PDF_HYPERLINKS tag is set to YES, the LaTeX that is generated
+# is prepared for conversion to pdf (using ps2pdf). The pdf file will
+# contain links (just like the HTML output) instead of page references
+# This makes the output suitable for online browsing using a pdf viewer.
+
+PDF_HYPERLINKS = YES
+
+# If the USE_PDFLATEX tag is set to YES, pdflatex will be used instead of
+# plain latex in the generated Makefile. Set this option to YES to get a
+# higher quality PDF documentation.
+
+USE_PDFLATEX = YES
+
+# If the LATEX_BATCHMODE tag is set to YES, doxygen will add the \\batchmode.
+# command to the generated LaTeX files. This will instruct LaTeX to keep
+# running if errors occur, instead of asking the user for help.
+# This option is also used when generating formulas in HTML.
+
+LATEX_BATCHMODE = NO
+
+# If LATEX_HIDE_INDICES is set to YES then doxygen will not
+# include the index chapters (such as File Index, Compound Index, etc.)
+# in the output.
+
+LATEX_HIDE_INDICES = NO
+
+#---------------------------------------------------------------------------
+# configuration options related to the RTF output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_RTF tag is set to YES Doxygen will generate RTF output
+# The RTF output is optimized for Word 97 and may not look very pretty with
+# other RTF readers or editors.
+
+GENERATE_RTF = NO
+
+# The RTF_OUTPUT tag is used to specify where the RTF docs will be put.
+# If a relative path is entered the value of OUTPUT_DIRECTORY will be
+# put in front of it. If left blank `rtf' will be used as the default path.
+
+RTF_OUTPUT = rtf
+
+# If the COMPACT_RTF tag is set to YES Doxygen generates more compact
+# RTF documents. This may be useful for small projects and may help to
+# save some trees in general.
+
+COMPACT_RTF = NO
+
+# If the RTF_HYPERLINKS tag is set to YES, the RTF that is generated
+# will contain hyperlink fields. The RTF file will
+# contain links (just like the HTML output) instead of page references.
+# This makes the output suitable for online browsing using WORD or other
+# programs which support those fields.
+# Note: wordpad (write) and others do not support links.
+
+RTF_HYPERLINKS = NO
+
+# Load stylesheet definitions from file. Syntax is similar to doxygen's
+# config file, i.e. a series of assignments. You only have to provide
+# replacements, missing definitions are set to their default value.
+
+RTF_STYLESHEET_FILE =
+
+# Set optional variables used in the generation of an rtf document.
+# Syntax is similar to doxygen's config file.
+
+RTF_EXTENSIONS_FILE =
+
+#---------------------------------------------------------------------------
+# configuration options related to the man page output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_MAN tag is set to YES (the default) Doxygen will
+# generate man pages
+
+GENERATE_MAN = NO
+
+# The MAN_OUTPUT tag is used to specify where the man pages will be put.
+# If a relative path is entered the value of OUTPUT_DIRECTORY will be
+# put in front of it. If left blank `man' will be used as the default path.
+
+MAN_OUTPUT = man
+
+# The MAN_EXTENSION tag determines the extension that is added to
+# the generated man pages (default is the subroutine's section .3)
+
+MAN_EXTENSION = .3
+
+# If the MAN_LINKS tag is set to YES and Doxygen generates man output,
+# then it will generate one additional man file for each entity
+# documented in the real man page(s). These additional files
+# only source the real man page, but without them the man command
+# would be unable to find the correct page. The default is NO.
+
+MAN_LINKS = NO
+
+#---------------------------------------------------------------------------
+# configuration options related to the XML output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_XML tag is set to YES Doxygen will
+# generate an XML file that captures the structure of
+# the code including all documentation.
+
+GENERATE_XML = NO
+
+# The XML_OUTPUT tag is used to specify where the XML pages will be put.
+# If a relative path is entered the value of OUTPUT_DIRECTORY will be
+# put in front of it. If left blank `xml' will be used as the default path.
+
+XML_OUTPUT = xml
+
+# The XML_SCHEMA tag can be used to specify an XML schema,
+# which can be used by a validating XML parser to check the
+# syntax of the XML files.
+
+XML_SCHEMA =
+
+# The XML_DTD tag can be used to specify an XML DTD,
+# which can be used by a validating XML parser to check the
+# syntax of the XML files.
+
+XML_DTD =
+
+# If the XML_PROGRAMLISTING tag is set to YES Doxygen will
+# dump the program listings (including syntax highlighting
+# and cross-referencing information) to the XML output. Note that
+# enabling this will significantly increase the size of the XML output.
+
+XML_PROGRAMLISTING = YES
+
+#---------------------------------------------------------------------------
+# configuration options for the AutoGen Definitions output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_AUTOGEN_DEF tag is set to YES Doxygen will
+# generate an AutoGen Definitions (see autogen.sf.net) file
+# that captures the structure of the code including all
+# documentation. Note that this feature is still experimental
+# and incomplete at the moment.
+
+GENERATE_AUTOGEN_DEF = NO
+
+#---------------------------------------------------------------------------
+# configuration options related to the Perl module output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_PERLMOD tag is set to YES Doxygen will
+# generate a Perl module file that captures the structure of
+# the code including all documentation. Note that this
+# feature is still experimental and incomplete at the
+# moment.
+
+GENERATE_PERLMOD = NO
+
+# If the PERLMOD_LATEX tag is set to YES Doxygen will generate
+# the necessary Makefile rules, Perl scripts and LaTeX code to be able
+# to generate PDF and DVI output from the Perl module output.
+
+PERLMOD_LATEX = NO
+
+# If the PERLMOD_PRETTY tag is set to YES the Perl module output will be
+# nicely formatted so it can be parsed by a human reader. This is useful
+# if you want to understand what is going on. On the other hand, if this
+# tag is set to NO the size of the Perl module output will be much smaller
+# and Perl will parse it just the same.
+
+PERLMOD_PRETTY = YES
+
+# The names of the make variables in the generated doxyrules.make file
+# are prefixed with the string contained in PERLMOD_MAKEVAR_PREFIX.
+# This is useful so different doxyrules.make files included by the same
+# Makefile don't overwrite each other's variables.
+
+PERLMOD_MAKEVAR_PREFIX =
+
+#---------------------------------------------------------------------------
+# Configuration options related to the preprocessor
+#---------------------------------------------------------------------------
+
+# If the ENABLE_PREPROCESSING tag is set to YES (the default) Doxygen will
+# evaluate all C-preprocessor directives found in the sources and include
+# files.
+
+ENABLE_PREPROCESSING = YES
+
+# If the MACRO_EXPANSION tag is set to YES Doxygen will expand all macro
+# names in the source code. If set to NO (the default) only conditional
+# compilation will be performed. Macro expansion can be done in a controlled
+# way by setting EXPAND_ONLY_PREDEF to YES.
+
+MACRO_EXPANSION = NO
+
+# If the EXPAND_ONLY_PREDEF and MACRO_EXPANSION tags are both set to YES
+# then the macro expansion is limited to the macros specified with the
+# PREDEFINED and EXPAND_AS_DEFINED tags.
+
+EXPAND_ONLY_PREDEF = NO
+
+# If the SEARCH_INCLUDES tag is set to YES (the default) the includes files
+# in the INCLUDE_PATH (see below) will be search if a #include is found.
+
+SEARCH_INCLUDES = YES
+
+# The INCLUDE_PATH tag can be used to specify one or more directories that
+# contain include files that are not input files but should be processed by
+# the preprocessor.
+
+INCLUDE_PATH =
+
+# You can use the INCLUDE_FILE_PATTERNS tag to specify one or more wildcard
+# patterns (like *.h and *.hpp) to filter out the header-files in the
+# directories. If left blank, the patterns specified with FILE_PATTERNS will
+# be used.
+
+INCLUDE_FILE_PATTERNS =
+
+# The PREDEFINED tag can be used to specify one or more macro names that
+# are defined before the preprocessor is started (similar to the -D option of
+# gcc). The argument of the tag is a list of macros of the form: name
+# or name=definition (no spaces). If the definition and the = are
+# omitted =1 is assumed. To prevent a macro definition from being
+# undefined via #undef or recursively expanded use the := operator
+# instead of the = operator.
+
+PREDEFINED =
+
+# If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then
+# this tag can be used to specify a list of macro names that should be expanded.
+# The macro definition that is found in the sources will be used.
+# Use the PREDEFINED tag if you want to use a different macro definition.
+
+EXPAND_AS_DEFINED =
+
+# If the SKIP_FUNCTION_MACROS tag is set to YES (the default) then
+# doxygen's preprocessor will remove all function-like macros that are alone
+# on a line, have an all uppercase name, and do not end with a semicolon. Such
+# function macros are typically used for boiler-plate code, and will confuse
+# the parser if not removed.
+
+SKIP_FUNCTION_MACROS = YES
+
+#---------------------------------------------------------------------------
+# Configuration::additions related to external references
+#---------------------------------------------------------------------------
+
+# The TAGFILES option can be used to specify one or more tagfiles.
+# Optionally an initial location of the external documentation
+# can be added for each tagfile. The format of a tag file without
+# this location is as follows:
+# TAGFILES = file1 file2 ...
+# Adding location for the tag files is done as follows:
+# TAGFILES = file1=loc1 "file2 = loc2" ...
+# where "loc1" and "loc2" can be relative or absolute paths or
+# URLs. If a location is present for each tag, the installdox tool
+# does not have to be run to correct the links.
+# Note that each tag file must have a unique name
+# (where the name does NOT include the path)
+# If a tag file is not located in the directory in which doxygen
+# is run, you must also specify the path to the tagfile here.
+
+TAGFILES =
+
+# When a file name is specified after GENERATE_TAGFILE, doxygen will create
+# a tag file that is based on the input files it reads.
+
+GENERATE_TAGFILE =
+
+# If the ALLEXTERNALS tag is set to YES all external classes will be listed
+# in the class index. If set to NO only the inherited external classes
+# will be listed.
+
+ALLEXTERNALS = NO
+
+# If the EXTERNAL_GROUPS tag is set to YES all external groups will be listed
+# in the modules index. If set to NO, only the current project's groups will
+# be listed.
+
+EXTERNAL_GROUPS = YES
+
+# The PERL_PATH should be the absolute path and name of the perl script
+# interpreter (i.e. the result of `which perl').
+
+PERL_PATH = /usr/bin/perl
+
+#---------------------------------------------------------------------------
+# Configuration options related to the dot tool
+#---------------------------------------------------------------------------
+
+# If the CLASS_DIAGRAMS tag is set to YES (the default) Doxygen will
+# generate a inheritance diagram (in HTML, RTF and LaTeX) for classes with base
+# or super classes. Setting the tag to NO turns the diagrams off. Note that
+# this option is superseded by the HAVE_DOT option below. This is only a
+# fallback. It is recommended to install and use dot, since it yields more
+# powerful graphs.
+
+CLASS_DIAGRAMS = YES
+
+# You can define message sequence charts within doxygen comments using the \msc
+# command. Doxygen will then run the mscgen tool (see
+# http://www.mcternan.me.uk/mscgen/) to produce the chart and insert it in the
+# documentation. The MSCGEN_PATH tag allows you to specify the directory where
+# the mscgen tool resides. If left empty the tool is assumed to be found in the
+# default search path.
+
+MSCGEN_PATH =
+
+# If set to YES, the inheritance and collaboration graphs will hide
+# inheritance and usage relations if the target is undocumented
+# or is not a class.
+
+HIDE_UNDOC_RELATIONS = YES
+
+# If you set the HAVE_DOT tag to YES then doxygen will assume the dot tool is
+# available from the path. This tool is part of Graphviz, a graph visualization
+# toolkit from AT&T and Lucent Bell Labs. The other options in this section
+# have no effect if this option is set to NO (the default)
+
+HAVE_DOT = NO
+
+# By default doxygen will write a font called FreeSans.ttf to the output
+# directory and reference it in all dot files that doxygen generates. This
+# font does not include all possible unicode characters however, so when you need
+# these (or just want a differently looking font) you can specify the font name
+# using DOT_FONTNAME. You need need to make sure dot is able to find the font,
+# which can be done by putting it in a standard location or by setting the
+# DOTFONTPATH environment variable or by setting DOT_FONTPATH to the directory
+# containing the font.
+
+DOT_FONTNAME = FreeSans
+
+# The DOT_FONTSIZE tag can be used to set the size of the font of dot graphs.
+# The default size is 10pt.
+
+DOT_FONTSIZE = 10
+
+# By default doxygen will tell dot to use the output directory to look for the
+# FreeSans.ttf font (which doxygen will put there itself). If you specify a
+# different font using DOT_FONTNAME you can set the path where dot
+# can find it using this tag.
+
+DOT_FONTPATH =
+
+# If the CLASS_GRAPH and HAVE_DOT tags are set to YES then doxygen
+# will generate a graph for each documented class showing the direct and
+# indirect inheritance relations. Setting this tag to YES will force the
+# the CLASS_DIAGRAMS tag to NO.
+
+CLASS_GRAPH = YES
+
+# If the COLLABORATION_GRAPH and HAVE_DOT tags are set to YES then doxygen
+# will generate a graph for each documented class showing the direct and
+# indirect implementation dependencies (inheritance, containment, and
+# class references variables) of the class with other documented classes.
+
+COLLABORATION_GRAPH = YES
+
+# If the GROUP_GRAPHS and HAVE_DOT tags are set to YES then doxygen
+# will generate a graph for groups, showing the direct groups dependencies
+
+GROUP_GRAPHS = YES
+
+# If the UML_LOOK tag is set to YES doxygen will generate inheritance and
+# collaboration diagrams in a style similar to the OMG's Unified Modeling
+# Language.
+
+UML_LOOK = NO
+
+# If set to YES, the inheritance and collaboration graphs will show the
+# relations between templates and their instances.
+
+TEMPLATE_RELATIONS = NO
+
+# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDE_GRAPH, and HAVE_DOT
+# tags are set to YES then doxygen will generate a graph for each documented
+# file showing the direct and indirect include dependencies of the file with
+# other documented files.
+
+INCLUDE_GRAPH = YES
+
+# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDED_BY_GRAPH, and
+# HAVE_DOT tags are set to YES then doxygen will generate a graph for each
+# documented header file showing the documented files that directly or
+# indirectly include this file.
+
+INCLUDED_BY_GRAPH = YES
+
+# If the CALL_GRAPH and HAVE_DOT options are set to YES then
+# doxygen will generate a call dependency graph for every global function
+# or class method. Note that enabling this option will significantly increase
+# the time of a run. So in most cases it will be better to enable call graphs
+# for selected functions only using the \callgraph command.
+
+CALL_GRAPH = NO
+
+# If the CALLER_GRAPH and HAVE_DOT tags are set to YES then
+# doxygen will generate a caller dependency graph for every global function
+# or class method. Note that enabling this option will significantly increase
+# the time of a run. So in most cases it will be better to enable caller
+# graphs for selected functions only using the \callergraph command.
+
+CALLER_GRAPH = NO
+
+# If the GRAPHICAL_HIERARCHY and HAVE_DOT tags are set to YES then doxygen
+# will graphical hierarchy of all classes instead of a textual one.
+
+GRAPHICAL_HIERARCHY = YES
+
+# If the DIRECTORY_GRAPH, SHOW_DIRECTORIES and HAVE_DOT tags are set to YES
+# then doxygen will show the dependencies a directory has on other directories
+# in a graphical way. The dependency relations are determined by the #include
+# relations between the files in the directories.
+
+DIRECTORY_GRAPH = YES
+
+# The DOT_IMAGE_FORMAT tag can be used to set the image format of the images
+# generated by dot. Possible values are png, jpg, or gif
+# If left blank png will be used.
+
+DOT_IMAGE_FORMAT = png
+
+# The tag DOT_PATH can be used to specify the path where the dot tool can be
+# found. If left blank, it is assumed the dot tool can be found in the path.
+
+DOT_PATH =
+
+# The DOTFILE_DIRS tag can be used to specify one or more directories that
+# contain dot files that are included in the documentation (see the
+# \dotfile command).
+
+DOTFILE_DIRS =
+
+# The DOT_GRAPH_MAX_NODES tag can be used to set the maximum number of
+# nodes that will be shown in the graph. If the number of nodes in a graph
+# becomes larger than this value, doxygen will truncate the graph, which is
+# visualized by representing a node as a red box. Note that doxygen if the
+# number of direct children of the root node in a graph is already larger than
+# DOT_GRAPH_MAX_NODES then the graph will not be shown at all. Also note
+# that the size of a graph can be further restricted by MAX_DOT_GRAPH_DEPTH.
+
+DOT_GRAPH_MAX_NODES = 50
+
+# The MAX_DOT_GRAPH_DEPTH tag can be used to set the maximum depth of the
+# graphs generated by dot. A depth value of 3 means that only nodes reachable
+# from the root by following a path via at most 3 edges will be shown. Nodes
+# that lay further from the root node will be omitted. Note that setting this
+# option to 1 or 2 may greatly reduce the computation time needed for large
+# code bases. Also note that the size of a graph can be further restricted by
+# DOT_GRAPH_MAX_NODES. Using a depth of 0 means no depth restriction.
+
+MAX_DOT_GRAPH_DEPTH = 0
+
+# Set the DOT_TRANSPARENT tag to YES to generate images with a transparent
+# background. This is disabled by default, because dot on Windows does not
+# seem to support this out of the box. Warning: Depending on the platform used,
+# enabling this option may lead to badly anti-aliased labels on the edges of
+# a graph (i.e. they become hard to read).
+
+DOT_TRANSPARENT = NO
+
+# Set the DOT_MULTI_TARGETS tag to YES allow dot to generate multiple output
+# files in one run (i.e. multiple -o and -T options on the command line). This
+# makes dot run faster, but since only newer versions of dot (>1.8.10)
+# support this, this feature is disabled by default.
+
+DOT_MULTI_TARGETS = NO
+
+# If the GENERATE_LEGEND tag is set to YES (the default) Doxygen will
+# generate a legend page explaining the meaning of the various boxes and
+# arrows in the dot generated graphs.
+
+GENERATE_LEGEND = YES
+
+# If the DOT_CLEANUP tag is set to YES (the default) Doxygen will
+# remove the intermediate dot files that are used to generate
+# the various graphs.
+
+DOT_CLEANUP = YES
+
+#---------------------------------------------------------------------------
+# Options related to the search engine
+#---------------------------------------------------------------------------
+
+# The SEARCHENGINE tag specifies whether or not a search engine should be
+# used. If set to NO the values of all tags below this one will be ignored.
+
+SEARCHENGINE = NO

Added: sandbox/xint/doc/dox/acknowledgements.dox
==============================================================================
--- (empty file)
+++ sandbox/xint/doc/dox/acknowledgements.dox 2010-04-06 01:40:33 EDT (Tue, 06 Apr 2010)
@@ -0,0 +1,45 @@
+/*! \page acknowledgements Acknowledgements
+
+Several people have helped me improve the XInt library. Particular thanks go to
+Paul Bristow, for...
+- Pointing out the need for a specialization of \c std::numeric_limits for \c
+xint::integer;
+- Spending a great deal of time and effort to introduce me to the Boost.Test
+framework and Doxygen/QuickBook;
+- Providing test cases and documentation tweaks;
+- General advice and moral support.
+
+The library wouldn't be nearly as good without his work, and I hope I didn't
+irritate him too much. :-)
+
+Other contributors from the Boost development list, roughly in the order that
+they contributed:
+
+- Steven Watanabe, for an improvement to the template constructor, and for
+comments on the random number code.
+- 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.
+- "Pavel" for suggesting adding the algorithmic complexity of each function to
+the documentation, and for understanding what I was trying to explain when no
+one else seemed to.
+- Jeffrey Lee Hellrung, Jr., for advice on implementing move-aware objects, and
+for an invigorating discussion on the differing needs of an integer library
+versus a floating-point one, among other things.
+- Peter Dimov, for suggesting a separate \c xint::overflow_error exception
+class.
+- "Fred," a.k.a. "Gottlob Frege", for information on infinities.
+
+And the other Boost development list members who joined the discussion:
+
+- Anders Dalvander
+- Vincente Botet Escriba
+- Arash Partow
+- Robert Stewart
+- Frank Mori Hess
+- Christopher Jefferson
+- Daniel (Herring?)
+- "OvermindDL1"
+
+If I've forgotten anyone, please let me know and I'll correct the oversight.
+*/

Added: sandbox/xint/doc/dox/copyonwrite.dox
==============================================================================
--- (empty file)
+++ sandbox/xint/doc/dox/copyonwrite.dox 2010-04-06 01:40:33 EDT (Tue, 06 Apr 2010)
@@ -0,0 +1,12 @@
+/*! \page cow Copying and Argument-Passing
+
+By default, the xint::integer class uses copy-on-write, which means that if you
+copy an integer, the copy and the original share the same storage. They are only
+assigned separate storage when one of them is changed. This mechanism makes
+copying an integer (explicitly, by returning it, or by using it as a
+non-reference parameter to a function) very fast, regardless of its size.
+
+(Unfortunately, this makes thread-safe operation impossible. If you need to use
+the library from multiple threads, you can disable this behavior by compiling it
+with \link threadsafe the thread-safe option\endlink.
+*/

Added: sandbox/xint/doc/dox/dependencies.dox
==============================================================================
--- (empty file)
+++ sandbox/xint/doc/dox/dependencies.dox 2010-04-06 01:40:33 EDT (Tue, 06 Apr 2010)
@@ -0,0 +1,18 @@
+/*! \page dependencies Dependencies
+
+Like any non-trivial program, this library uses several other pieces of code,
+though I've tried to minimize the dependencies. Here are the ones that are
+required:
+
+- Boost.Integer
+- Boost.Function
+- Boost.StaticAssert
+- Boost.Random
+- Boost.TypeTraits
+- Boost.SmartPointers
+- Boost.Thread (but only if the library was compiled for \link threadsafe
+thread-safe operation\endlink)
+
+With the exception of Boost.Thread, all of these are header-only libraries,
+meaning that you don't need to worry about linking your program with them.
+*/

Added: sandbox/xint/doc/dox/ex_fibonacci.dox
==============================================================================
--- (empty file)
+++ sandbox/xint/doc/dox/ex_fibonacci.dox 2010-04-06 01:40:33 EDT (Tue, 06 Apr 2010)
@@ -0,0 +1,22 @@
+/*! \page ex_fibonacci Fibonacci Numbers
+
+Fibonacci numbers are a sequence of numbers, starting with the numbers 0 and 1,
+where each successive number is the sum of the previous two. The first few
+Fibonacci numbers are:
+
+<code>0 1 1 2 3 5 8 13 21 34 55 89 144...</code>
+
+You might be curious what the first Fibonacci number is that's too big to
+calculate using the standard C++ <code>unsigned long</code> type. A brute-force
+method of calculating this would be problematic, since it might not be possible
+to tell when it overflows. But with the XInt library, it's child's play:
+
+\include fibonacci.cpp
+
+If you're not intimately familiar with the Fibonacci sequence, and how fast the
+numbers in it grow, the answer might shock you.
+
+As you can see, using the XInt library is just like using the native integer
+types -- except that an \c xint::integer won't overflow on you until you
+completely exhaust your system's memory. :-)
+*/

Added: sandbox/xint/doc/dox/exceptions.dox
==============================================================================
--- (empty file)
+++ sandbox/xint/doc/dox/exceptions.dox 2010-04-06 01:40:33 EDT (Tue, 06 Apr 2010)
@@ -0,0 +1,48 @@
+/*! \page exceptions Exceptions and Exception-Blocking
+
+\section blocking Exception Blocking
+
+This library includes a mechanism for preventing most exceptions from being
+thrown. This was added to give you, the developer using the library, maximum
+flexibility in dealing with its functions. You can choose to deal with errors
+by catching exceptions or by checking returned values for error codes, on a
+case-by-case basis, depending on which would make for easier or more readable
+code.
+
+\section howitworks How it Works
+
+When exceptions are blocked, any function that would normally throw a blockable
+exception will return a special value indicating failure instead. For functions
+that return an xint::integer, this will be \link nan the Not-a-Number
+value\endlink; for other functions, the value will be noted in the
+documentation.
+
+Note that, while most exceptions can be blocked, a few are unblockable, by
+design.
+
+\warning
+
+When exceptions are blocked, \e any function can return Not-a-Number under
+certain conditions, not just the ones listed as throwing exceptions. An
+insufficient-memory exception (xint::overflow_error), for instance, can happen
+nearly anywhere.
+
+\section howtouse How to Use the Functions
+
+By default, the library throws exceptions when it can't complete the task you've
+asked it to do, and there's no other logical way to indicate an error. But when
+it is more convenient, most of the exceptions that the library might throw can
+be blocked, by holding the xint::token object returned by the
+xint::block_exceptions function. Here's an example (which can be found in the
+\c examples subdirectory as exceptions.cpp):
+
+\include exceptions.cpp
+
+If you need to ensure that exceptions are allowed, in one of your own functions
+that might be called with them blocked, you can hold the xint::token object
+returned by xint::allow_exceptions. It works the same way.
+
+xint::token objects should always be created on the stack, so that they are
+guaranteed to be destroyed in reverse order. If they are not, or if they are
+copied elsewhere, the results are undefined.
+*/

Added: sandbox/xint/doc/dox/history.dox
==============================================================================
--- (empty file)
+++ sandbox/xint/doc/dox/history.dox 2010-04-06 01:40:33 EDT (Tue, 06 Apr 2010)
@@ -0,0 +1,18 @@
+/*! \page history Revision History
+
+This is the third incarnation of my large-integer library. The first was written
+as a research tool in 1995 and was never released. A second, improved version
+was used in some of my commercial Windows software. This third one shares only
+the spirit of the first two; it was designed and written from scratch using all
+the lessons I learned from writing the first two, as well as all the
+mathematical knowledge I could gather from various books and the Internet.
+
+This revision history refers only to this incarnation.
+
+\b 2010-03-26
+- First version uploaded to the Boost File Vault for review.
+
+\b 2010-03-30
+- Many improvements, primarily from feedback on the first Boost upload. Second
+version posted to the Boost File Vault.
+*/

Added: sandbox/xint/doc/dox/index.dox
==============================================================================
--- (empty file)
+++ sandbox/xint/doc/dox/index.dox 2010-04-06 01:40:33 EDT (Tue, 06 Apr 2010)
@@ -0,0 +1,74 @@
+/*! \mainpage The Extended Integer (XInt) Library
+
+<center>A fast, portable C++ library for multi-precision integer math.</center>
+
+<center>Copyright 2010 by Chad Nelson</center>
+
+\section what What is it?
+
+It's a C++ library that lets your program handle much, \e much larger integer
+numbers than the built-in \c int, \c long, or even <code>long long</code> types,
+and handle them using the same syntax that C and C++ use for the standard
+integer types.
+
+The maximum size of the integer is limited only by the memory available to store
+it. In practice that's millions of hexadecimal digits, so it's effectively
+infinite.
+
+\section why Why would I use it?
+
+\li <b>Because it's completely portable.</b> It's written entirely in modern
+C++, with many different types of operating system, compiler, and hardware in
+mind. It will compile cleanly on many operating systems without any changes,
+automatically adapting to whatever native integer sizes are available.
+\li <b>Because it's fast.</b> Speed of execution takes a back seat to
+portability, so it doesn't include things like assembly-language modules to
+wring every last CPU cycle out of it -- but it's still pretty darn fast.
+\li <b>Because it has the features you need.</b> Modular arithmetic.
+Cryptographically-secure prime number generation. Bit manipulation functions. A
+friendly and intuitive interface. An option for thread-safe operation. Complete
+and carefully maintained documentation. What more could you want?
+\li <b>Because it's open-source.</b> You can see exactly how it works. You can
+never be left high and dry because the company that made it goes out of
+business, or decides that it's not profitable to maintain it. If you find a bug
+that isn't fixed fast enough for you, you can fix it yourself, no waiting for
+someone else to get around to it.
+\li <b>Because it's closed-source-friendly and commercial-friendly.</b> It's
+licensed under the Boost Software License 1.0 (which you can find at
+http://www.boost.org/LICENSE_1_0.txt), an OSI-approved open-source license that
+permits you to use it for pretty much anything you want, and doesn't make any
+anti-commercial or anti-closed-source demands.
+
+\section how How do I use it?
+
+That's the best part. If you've installed or compiled the Boost library already,
+all you need to do is add <code>\#include \<boost/xint/xint.hpp\></code> at the
+top of your source code file, and declare your variable as type \c
+boost::xint::integer. Then just use it the way you'd use any integer. If you
+need something more advanced, take a look in \link xint the reference
+section\endlink and you just might find it.
+
+More information on how to use it can be found on the pages listed below.
+
+Detailed Usage Information:
+- \subpage nan
+- \subpage primes (with example code)
+- \subpage exceptions (with example code)
+- \subpage random
+
+Compile-Time Options:
+- \subpage securemode
+- \subpage threadsafe
+
+Library Information:
+- \subpage cow
+- \subpage testing
+- \subpage dependencies
+- \subpage rationale
+- \subpage acknowledgements
+- \subpage history
+
+Stand-Alone Examples:
+- \subpage ex_fibonacci
+
+*/

Added: sandbox/xint/doc/dox/nan.dox
==============================================================================
--- (empty file)
+++ sandbox/xint/doc/dox/nan.dox 2010-04-06 01:40:33 EDT (Tue, 06 Apr 2010)
@@ -0,0 +1,26 @@
+/*! \page nan The Not-a-Number Value
+
+Sometimes it's useful for a variable to have a value that doesn't represent any
+proper value, to indicate that it hasn't been specified or that there was an
+error in a calculation. For that purpose, the \c xint::integer class provides
+Not-a-Number.
+
+To create a Not-a-Number, use the integer constructor that exists solely for
+that purpose. No other library function will return a Not-a-Number except under
+the following circumstances:
+
+- If a function that returns a non-reference integer tries to throw a blockable
+exception, but exceptions are blocked.
+- If the string-to-integer functions are asked to convert the string \c
+"#NaN#".
+
+The only things you can do with a Not-a-Number are:
+
+- Test for it, using the member function integer::is_nan.
+- Convert it to a string, or write it to a stream. The result will be the string
+\c "#NaN#".
+- Make a copy of it.
+
+If you attempt to do anything else with it, you will get the non-blockable
+\c xint::not_a_number exception.
+*/

Added: sandbox/xint/doc/dox/primes.dox
==============================================================================
--- (empty file)
+++ sandbox/xint/doc/dox/primes.dox 2010-04-06 01:40:33 EDT (Tue, 06 Apr 2010)
@@ -0,0 +1,20 @@
+/*! \page primes Generating Prime Numbers
+
+A common reason to use a large-integer library is to implement public-key
+encryption, and the algorithms for such encryption often require large prime
+numbers.
+
+With larger bit-sizes, the xint::is_prime and xint::random_prime functions can
+take a very long time to run, so you can pass an optional callback function to
+them as well. The provided callback function (which takes no parameters and
+returns a <code>bool</code>) will be called regularly during this time, and if
+it returns \c false, the function will abort and return zero (for random_prime)
+or -1 (for is_prime) instead of a value.
+
+Here is an example of how to use the library functions to create a prime number
+of a specific length, using the system's strong random number generator:
+
+\include genprime.cpp
+
+(You can find it in the \c examples directory, by the name \c genprime.cpp.)
+*/

Added: sandbox/xint/doc/dox/r_cow.dox
==============================================================================
--- (empty file)
+++ sandbox/xint/doc/dox/r_cow.dox 2010-04-06 01:40:33 EDT (Tue, 06 Apr 2010)
@@ -0,0 +1,13 @@
+/*! \page r_cow Why use copy-on-write? I've heard that causes problems with multi-threaded code.
+
+It's the best way I found to return large \c integer objects from functions
+efficiently. Some of these numbers can get huge, and move semantics aren't yet
+in the current standard. (Once they are, I'll consider removing the
+copy-on-write stuff.) It is also more CPU- and memory-efficient.
+
+It \e does cause problems when you try to use the library from multiple threads
+at the same time. To deal with that, the library can be compiled in a \link
+threadsafe thread-safe mode\endlink, which ensures that every \c integer gets
+its own unique storage, among other things. You still have to ensure that only
+one thread accesses a particular \c integer at a time.
+*/

Added: sandbox/xint/doc/dox/r_default_necessary.dox
==============================================================================
--- (empty file)
+++ sandbox/xint/doc/dox/r_default_necessary.dox 2010-04-06 01:40:33 EDT (Tue, 06 Apr 2010)
@@ -0,0 +1,7 @@
+/*! \page r_default_necessary Okay, then why not make the developer provide one?
+
+Ease-of-use, and the fact that for many developers, there's little need for
+cryptographically-secure random numbers. This way, those that need them can take
+a few simple steps to get them, and those that don't can just use the library
+as-is.
+*/

Added: sandbox/xint/doc/dox/r_insecure_default.dox
==============================================================================
--- (empty file)
+++ sandbox/xint/doc/dox/r_insecure_default.dox 2010-04-06 01:40:33 EDT (Tue, 06 Apr 2010)
@@ -0,0 +1,7 @@
+/*! \page r_insecure_default But why default to an insecure random number generator? Why not default to the secure one?
+
+Because the secure one isn't available on all systems. If I relied on
+\c random_device as a default, the library wouldn't compile under those systems.
+If I used \c xint::strong_random_generator, it would compile, but would always
+fail on them.
+*/

Added: sandbox/xint/doc/dox/r_interface.dox
==============================================================================
--- (empty file)
+++ sandbox/xint/doc/dox/r_interface.dox 2010-04-06 01:40:33 EDT (Tue, 06 Apr 2010)
@@ -0,0 +1,9 @@
+/*! \page r_interface Why did you do \e X in the interface?
+
+The interface is based on a paper by M.J. Kronenburg presented to the C++
+Standards Committee in early 2004, n1692, and the "standardese" for it in n1744
+by Michiel Salters / Nederlands Normalisatie Instituut.
+
+\see n1692: http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2004/n1692.pdf
+\see n1744: http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2005/n1744.pdf
+*/

Added: sandbox/xint/doc/dox/r_interface_design_only.dox
==============================================================================
--- (empty file)
+++ sandbox/xint/doc/dox/r_interface_design_only.dox 2010-04-06 01:40:33 EDT (Tue, 06 Apr 2010)
@@ -0,0 +1,19 @@
+/*! \page r_interface_design_only Then why didn't you follow those exactly?
+
+The XInt library was designed before I knew about them. I adapted it to them
+later.
+
+There are only a few notable places where XInt differs from them:
+
+- It does not provide separate mathematical primitive functions for <code>long
+long</code>, as suggested in n1744. This is partly because <code>long
+long</code> is not yet in the C++ standard, but mostly because I don't see a
+need for it. The conversion constructors are efficient enough for smaller values
+that there wouldn't be any noticeable benefit from it.
+- It does not, at present, implement a multiplication scheme with better
+performance than the "basecase" mentioned in section 3.4 of n1692, primarily
+because I haven't had the time to research all of them yet. I suspect that most
+people using the library will usually be using numbers below the threshold where
+the more exotic algorithms are faster, but I plan to add at least one of them in
+the future, maybe several.
+*/

Added: sandbox/xint/doc/dox/r_nan.dox
==============================================================================
--- (empty file)
+++ sandbox/xint/doc/dox/r_nan.dox 2010-04-06 01:40:33 EDT (Tue, 06 Apr 2010)
@@ -0,0 +1,6 @@
+/*! \page r_nan Why have a Not-a-Number value?
+
+Because it's the cleanest way I could find to return answers that don't
+represent a valid \c integer, which is necessary for the exception-blocking
+mechanism.
+*/

Added: sandbox/xint/doc/dox/r_negzero.dox
==============================================================================
--- (empty file)
+++ sandbox/xint/doc/dox/r_negzero.dox 2010-04-06 01:40:33 EDT (Tue, 06 Apr 2010)
@@ -0,0 +1,14 @@
+/*! \page r_negzero Since you've got Not-a-Number, what about negative zero, and positive and negative infinity, like IEEE floating-point numbers?
+
+Because they're irrelevant to an arbitrary-sized integer library.
+
+The mathematical concept of zero has no sign. It's neither positive nor
+negative (or if you prefer, it's both). The concept of a signed zero is used in
+floating-point numbers to represent a value that's so small that it can't be
+distinguished from zero, but which may not be an actual zero. Such a non-zero
+number does have a sign. But mathematically, a negative zero is simply zero.
+
+The concept of infinity (in either direction) comes up very rarely in an integer
+library. Since infinity is a concept, not a countable value, it's simply
+represented by the Not-a-Number value in the few places that it might be needed.
+*/

Added: sandbox/xint/doc/dox/r_random.dox
==============================================================================
--- (empty file)
+++ sandbox/xint/doc/dox/r_random.dox 2010-04-06 01:40:33 EDT (Tue, 06 Apr 2010)
@@ -0,0 +1,10 @@
+/*! \page r_random Why did you implement your own random number generator? You should use Boost.Random instead.
+
+Boost.Random provides \c boost::random_device to tap into the operating system's
+strong random number generator, but at the time of this writing, the official
+released version only defines it for Linux and BSD systems. The current
+maintainer, Steven Watanabe, says that he has just added Windows compatibility
+to it, so the xint::strong_random_generator class will likely be reduced to
+a typedef for \c boost::random_device, or a thin shell around it, in the near
+future.
+*/

Added: sandbox/xint/doc/dox/r_shared_ptr.dox
==============================================================================
--- (empty file)
+++ sandbox/xint/doc/dox/r_shared_ptr.dox 2010-04-06 01:40:33 EDT (Tue, 06 Apr 2010)
@@ -0,0 +1,9 @@
+/*! \page r_shared_ptr Why are you using a roll-your-own system instead of \c boost::shared_ptr for the copy-on-write stuff?
+
+Because it's a lot faster. I tried \c boost::shared_ptr, and under Linux with
+GCC 4.4.1 on the same computer, running my test suite went from 1.6 seconds to
+3.4 seconds. The home-grown shared pointer design may not be quite as easy to
+work with in an exception-safe manner, but that's completely internal to the
+\c integer class, so only developers working \e on the library, rather than \e
+with it, have to deal with that. I'll accept that trade-off.
+*/

Added: sandbox/xint/doc/dox/random.dox
==============================================================================
--- (empty file)
+++ sandbox/xint/doc/dox/random.dox 2010-04-06 01:40:33 EDT (Tue, 06 Apr 2010)
@@ -0,0 +1,15 @@
+/*! \page random The XInt Random Number System
+
+The library includes a random number system to support the xint::random_prime
+function. The default random number generator is \e not cryptographically secure
+(see \link rationale the rationale page\endlink for details). However, the
+system can easily be configured to use a cryptographically-secure generator.
+
+The XInt library provides a convenience class, xint::strong_random_generator,
+for both Windows and UNIX-derived systems. It will throw an exception of type
+xint::no_strong_random if you try to instantiate it on a system that does not
+have a strong random number generator.
+
+See the code at the top of \link primes the Prime Numbers page\endlink for an
+example of how to use it.
+*/

Added: sandbox/xint/doc/dox/rationale.dox
==============================================================================
--- (empty file)
+++ sandbox/xint/doc/dox/rationale.dox 2010-04-06 01:40:33 EDT (Tue, 06 Apr 2010)
@@ -0,0 +1,19 @@
+/*! \page rationale Rationales
+
+\section sinterface Interface
+- \subpage r_interface
+- \subpage r_interface_design_only
+
+\section scow Copy-on-Write
+- \subpage r_cow
+- \subpage r_shared_ptr
+
+\section snan Not-a-Number
+- \subpage r_nan
+- \subpage r_negzero
+
+\section srandom Random generator
+- \subpage r_random
+- \subpage r_insecure_default
+- \subpage r_default_necessary
+*/

Added: sandbox/xint/doc/dox/securemode.dox
==============================================================================
--- (empty file)
+++ sandbox/xint/doc/dox/securemode.dox 2010-04-06 01:40:33 EDT (Tue, 06 Apr 2010)
@@ -0,0 +1,12 @@
+/*! \page securemode Secure Mode
+
+For high-security applications, this library has a Secure Mode compile-time
+option. In Secure Mode, all memory is zeroed before being released.
+
+To enable it, define the preprocessor symbol \c XINT_SECURE when compiling the
+library. You don't need to define it when using the library, only when compiling
+it.
+
+To see whether your copy was compiled with secure-mode enabled, use the
+xint::opt_secure_mode function.
+*/

Added: sandbox/xint/doc/dox/testing.dox
==============================================================================
--- (empty file)
+++ sandbox/xint/doc/dox/testing.dox 2010-04-06 01:40:33 EDT (Tue, 06 Apr 2010)
@@ -0,0 +1,10 @@
+/*! \page testing The Self-Testing Program
+
+The library has a self-testing program that you can build and run to confirm
+that it is working properly. You can find the source code for it in the \c test
+subdirectory under the main \c %xint directory. All of the major functions are
+thoroughly exercised, and many of the minor ones as well.
+
+The source code for the testing program also demonstrates how to use many of the
+library's functions.
+*/

Added: sandbox/xint/doc/dox/threadsafe.dox
==============================================================================
--- (empty file)
+++ sandbox/xint/doc/dox/threadsafe.dox 2010-04-06 01:40:33 EDT (Tue, 06 Apr 2010)
@@ -0,0 +1,15 @@
+/*! \page threadsafe Thread-Safe Operation
+
+This library, by default, can only safely be used in one thread at a time. If
+you need thread-safe operation, you must compile it with the thread-safe option
+enabled (see below), and you must ensure that only one thread ever accesses a
+particular integer at a time. The library cannot automatically provide this
+protection without an unacceptably severe speed penalty.
+
+To enable thread-safe operations, define the preprocessor symbol \c
+XINT_THREADSAFE when compiling the library. You don't need to define it when
+using the library, only when compiling it.
+
+To see whether your copy was compiled with thread-safe operation enabled, use
+the xint::opt_thread_safe function.
+*/

Added: sandbox/xint/doc/doxygen.css
==============================================================================
--- (empty file)
+++ sandbox/xint/doc/doxygen.css 2010-04-06 01:40:33 EDT (Tue, 06 Apr 2010)
@@ -0,0 +1,498 @@
+/* The standard CSS for doxygen */
+
+body, table, div, p, dl {
+ font-family: Lucida Grande, Verdana, Geneva, Arial, sans-serif;
+ font-size: 12px;
+}
+
+/* @group Heading Levels */
+
+h1 {
+ text-align: center;
+ font-size: 150%;
+}
+
+h2 {
+ font-size: 120%;
+}
+
+h3 {
+ font-size: 100%;
+}
+
+dt {
+ font-weight: bold;
+}
+
+div.multicol {
+ -moz-column-gap: 1em;
+ -webkit-column-gap: 1em;
+ -moz-column-count: 3;
+ -webkit-column-count: 3;
+}
+
+p.startli, p.startdd {
+ margin-top: 2px;
+}
+
+p.endli {
+ margin-bottom: 0px;
+}
+
+p.enddd {
+ margin-bottom: 4px;
+}
+
+/* @end */
+
+caption {
+ font-weight: bold;
+}
+
+span.legend {
+ font-size: 70%;
+ text-align: center;
+}
+
+div.qindex, div.navtab{
+ background-color: #e8eef2;
+ border: 1px solid #84b0c7;
+ text-align: center;
+ margin: 2px;
+ padding: 2px;
+}
+
+div.qindex, div.navpath {
+ width: 100%;
+ line-height: 140%;
+}
+
+div.navtab {
+ margin-right: 15px;
+}
+
+/* @group Link Styling */
+
+a {
+ color: #153788;
+ font-weight: normal;
+ text-decoration: none;
+}
+
+.contents a:visited {
+ color: #1b77c5;
+}
+
+a:hover {
+ text-decoration: underline;
+}
+
+a.qindex {
+ font-weight: bold;
+}
+
+a.qindexHL {
+ font-weight: bold;
+ background-color: #6666cc;
+ color: #ffffff;
+ border: 1px double #9295C2;
+}
+
+.contents a.qindexHL:visited {
+ color: #ffffff;
+}
+
+a.el {
+ font-weight: bold;
+}
+
+a.elRef {
+}
+
+a.code {
+}
+
+a.codeRef {
+}
+
+/* @end */
+
+dl.el {
+ margin-left: -1cm;
+}
+
+.fragment {
+ font-family: monospace, fixed;
+ font-size: 105%;
+}
+
+pre.fragment {
+ border: 1px solid #CCCCCC;
+ background-color: #f5f5f5;
+ padding: 4px 6px;
+ margin: 4px 8px 4px 2px;
+}
+
+div.ah {
+ background-color: black;
+ font-weight: bold;
+ color: #ffffff;
+ margin-bottom: 3px;
+ margin-top: 3px
+}
+
+div.groupHeader {
+ margin-left: 16px;
+ margin-top: 12px;
+ margin-bottom: 6px;
+ font-weight: bold;
+}
+
+div.groupText {
+ margin-left: 16px;
+ font-style: italic;
+}
+
+body {
+ background: white;
+ color: black;
+ margin-right: 20px;
+ margin-left: 20px;
+}
+
+td.indexkey {
+ background-color: #e8eef2;
+ font-weight: bold;
+ border: 1px solid #CCCCCC;
+ margin: 2px 0px 2px 0;
+ padding: 2px 10px;
+}
+
+td.indexvalue {
+ background-color: #e8eef2;
+ border: 1px solid #CCCCCC;
+ padding: 2px 10px;
+ margin: 2px 0px;
+}
+
+tr.memlist {
+ background-color: #f0f0f0;
+}
+
+p.formulaDsp {
+ text-align: center;
+}
+
+img.formulaDsp {
+
+}
+
+img.formulaInl {
+ vertical-align: middle;
+}
+
+div.center {
+ text-align: center;
+ margin-top: 0px;
+ margin-bottom: 0px;
+ padding: 0px;
+}
+
+div.center img {
+ border: 0px;
+}
+
+img.footer {
+ border: 0px;
+ vertical-align: middle;
+}
+
+/* @group Code Colorization */
+
+span.keyword {
+ color: #008000
+}
+
+span.keywordtype {
+ color: #604020
+}
+
+span.keywordflow {
+ color: #e08000
+}
+
+span.comment {
+ color: #800000
+}
+
+span.preprocessor {
+ color: #806020
+}
+
+span.stringliteral {
+ color: #002080
+}
+
+span.charliteral {
+ color: #008080
+}
+
+span.vhdldigit {
+ color: #ff00ff
+}
+
+span.vhdlchar {
+ color: #000000
+}
+
+span.vhdlkeyword {
+ color: #700070
+}
+
+span.vhdllogic {
+ color: #ff0000
+}
+
+/* @end */
+
+.search {
+ color: #003399;
+ font-weight: bold;
+}
+
+form.search {
+ margin-bottom: 0px;
+ margin-top: 0px;
+}
+
+input.search {
+ font-size: 75%;
+ color: #000080;
+ font-weight: normal;
+ background-color: #e8eef2;
+}
+
+td.tiny {
+ font-size: 75%;
+}
+
+.dirtab {
+ padding: 4px;
+ border-collapse: collapse;
+ border: 1px solid #84b0c7;
+}
+
+th.dirtab {
+ background: #e8eef2;
+ font-weight: bold;
+}
+
+hr {
+ height: 0;
+ border: none;
+ border-top: 1px solid #666;
+}
+
+/* @group Member Descriptions */
+
+.mdescLeft, .mdescRight,
+.memItemLeft, .memItemRight,
+.memTemplItemLeft, .memTemplItemRight, .memTemplParams {
+ background-color: #FAFAFA;
+ border: none;
+ margin: 4px;
+ padding: 1px 0 0 8px;
+}
+
+.mdescLeft, .mdescRight {
+ padding: 0px 8px 4px 8px;
+ color: #555;
+}
+
+.memItemLeft, .memItemRight, .memTemplParams {
+ border-top: 1px solid #ccc;
+}
+
+.memItemLeft, .memTemplItemLeft {
+ white-space: nowrap;
+}
+
+.memTemplParams {
+ color: #606060;
+ white-space: nowrap;
+}
+
+/* @end */
+
+/* @group Member Details */
+
+/* Styles for detailed member documentation */
+
+.memtemplate {
+ font-size: 80%;
+ color: #606060;
+ font-weight: normal;
+ margin-left: 3px;
+}
+
+.memnav {
+ background-color: #e8eef2;
+ border: 1px solid #84b0c7;
+ text-align: center;
+ margin: 2px;
+ margin-right: 15px;
+ padding: 2px;
+}
+
+.memitem {
+ padding: 0;
+ margin-bottom: 10px;
+}
+
+.memname {
+ white-space: nowrap;
+ font-weight: bold;
+}
+
+.memproto, .memdoc {
+ border: 1px solid #84b0c7;
+}
+
+.memproto {
+ padding: 0;
+ background-color: #d5e1e8;
+ font-weight: bold;
+ -webkit-border-top-left-radius: 8px;
+ -webkit-border-top-right-radius: 8px;
+ -webkit-box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.15);
+ -moz-border-radius-topleft: 8px;
+ -moz-border-radius-topright: 8px;
+ -moz-box-shadow: rgba(0, 0, 0, 0.15) 5px 5px 5px;
+
+}
+
+.memdoc {
+ padding: 2px 5px;
+ background-color: #eef3f5;
+ border-top-width: 0;
+ -webkit-border-bottom-left-radius: 8px;
+ -webkit-border-bottom-right-radius: 8px;
+ -webkit-box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.15);
+ -moz-border-radius-bottomleft: 8px;
+ -moz-border-radius-bottomright: 8px;
+ -moz-box-shadow: rgba(0, 0, 0, 0.15) 5px 5px 5px;
+}
+
+.paramkey {
+ text-align: right;
+}
+
+.paramtype {
+ white-space: nowrap;
+}
+
+.paramname {
+ color: #602020;
+ white-space: nowrap;
+}
+.paramname em {
+ font-style: normal;
+}
+
+/* @end */
+
+/* @group Directory (tree) */
+
+/* for the tree view */
+
+.ftvtree {
+ font-family: sans-serif;
+ margin: 0.5em;
+}
+
+/* these are for tree view when used as main index */
+
+.directory {
+ font-size: 9pt;
+ font-weight: bold;
+}
+
+.directory h3 {
+ margin: 0px;
+ margin-top: 1em;
+ font-size: 11pt;
+}
+
+/*
+The following two styles can be used to replace the root node title
+with an image of your choice. Simply uncomment the next two styles,
+specify the name of your image and be sure to set 'height' to the
+proper pixel height of your image.
+*/
+
+/*
+.directory h3.swap {
+ height: 61px;
+ background-repeat: no-repeat;
+ background-image: url("yourimage.gif");
+}
+.directory h3.swap span {
+ display: none;
+}
+*/
+
+.directory > h3 {
+ margin-top: 0;
+}
+
+.directory p {
+ margin: 0px;
+ white-space: nowrap;
+}
+
+.directory div {
+ display: none;
+ margin: 0px;
+}
+
+.directory img {
+ vertical-align: -30%;
+}
+
+/* these are for tree view when not used as main index */
+
+.directory-alt {
+ font-size: 100%;
+ font-weight: bold;
+}
+
+.directory-alt h3 {
+ margin: 0px;
+ margin-top: 1em;
+ font-size: 11pt;
+}
+
+.directory-alt > h3 {
+ margin-top: 0;
+}
+
+.directory-alt p {
+ margin: 0px;
+ white-space: nowrap;
+}
+
+.directory-alt div {
+ display: none;
+ margin: 0px;
+}
+
+.directory-alt img {
+ vertical-align: -30%;
+}
+
+/* @end */
+
+address {
+ font-style: normal;
+ color: #333;
+}

Added: sandbox/xint/doc/doxygen.png
==============================================================================
Binary file. No diff available.

Added: sandbox/xint/doc/ex__fibonacci_8dox.html
==============================================================================
--- (empty file)
+++ sandbox/xint/doc/ex__fibonacci_8dox.html 2010-04-06 01:40:33 EDT (Tue, 06 Apr 2010)
@@ -0,0 +1,36 @@
+<!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/ex_fibonacci.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.1 -->
+<div class="navigation" id="top">
+ <div class="tabs">
+ <ul>
+ <li>Main Page</li>
+ <li>Related Pages</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/ex_fibonacci.dox File Reference</h1><table border="0" cellpadding="0" cellspacing="0">
+</table>
+</div>
+<hr size="1"/><address style="text-align: right;"><small>Generated on Tue Apr 6 01:22:08 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.1 </small></address>
+</body>
+</html>

Added: sandbox/xint/doc/ex_fibonacci.html
==============================================================================
--- (empty file)
+++ sandbox/xint/doc/ex_fibonacci.html 2010-04-06 01:40:33 EDT (Tue, 06 Apr 2010)
@@ -0,0 +1,72 @@
+<!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: Fibonacci Numbers</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.1 -->
+<div class="navigation" id="top">
+ <div class="tabs">
+ <ul>
+ <li>Main Page</li>
+ <li class="current">Related Pages</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="ex_fibonacci">Fibonacci Numbers </a></h1><p>Fibonacci numbers are a sequence of numbers, starting with the numbers 0 and 1, where each successive number is the sum of the previous two. The first few Fibonacci numbers are:</p>
+<p><code>0 1 1 2 3 5 8 13 21 34 55 89 144...</code></p>
+<p>You might be curious what the first Fibonacci number is that's too big to calculate using the standard C++ <code>unsigned long</code> type. A brute-force method of calculating this would be problematic, since it might not be possible to tell when it overflows. But with the XInt library, it's child's play:</p>
+<div class="fragment"><pre class="fragment"><span class="preprocessor">#include &lt;iostream&gt;</span>
+<span class="preprocessor">#include &lt;<a class="code" href="xint_8hpp.html" title="The main header file for the XInt library.">boost/xint/xint.hpp</a>&gt;</span>
+
+<span class="keywordtype">int</span> main() {
+ <span class="keyword">using</span> <a class="code" href="classxint_1_1integer.html" title="The extended integer class.">xint::integer</a>;
+ <span class="keyword">using</span> std::cout;
+ <span class="keyword">using</span> std::endl;
+
+ <span class="comment">// Select the limit, in this case the largest number that will fit into an</span>
+ <span class="comment">// unsigned long.</span>
+ integer limit=(std::numeric_limits&lt;unsigned long&gt;::max)();
+
+ <span class="comment">// Set the first two numbers in the sequence.</span>
+ integer n, n1=0, n2=1;
+
+ <span class="comment">// Now count the items in the sequence as we iterate over them, until we</span>
+ <span class="comment">// come to the first one greater than the limit we&apos;ve set.</span>
+ <span class="keywordtype">size_t</span> counter=0;
+ cout &lt;&lt; counter++ &lt;&lt; <span class="stringliteral">&quot;: &quot;</span> &lt;&lt; n1 &lt;&lt; endl;
+ cout &lt;&lt; counter++ &lt;&lt; <span class="stringliteral">&quot;: &quot;</span> &lt;&lt; n2 &lt;&lt; endl;
+
+ <span class="keywordflow">while</span> (1) {
+ n = n1 + n2;
+ <span class="keywordflow">if</span> (n &gt; limit) <span class="keywordflow">break</span>;
+
+ <span class="comment">// That one didn&apos;t do it, go back for another try.</span>
+ cout &lt;&lt; counter++ &lt;&lt; <span class="stringliteral">&quot;: &quot;</span> &lt;&lt; n &lt;&lt; endl;
+
+ n1=n2;
+ n2=n;
+ }
+
+ cout &lt;&lt; <span class="stringliteral">&quot;The answer is &quot;</span> &lt;&lt; counter &lt;&lt; <span class="stringliteral">&quot; (&quot;</span> &lt;&lt; n &lt;&lt; <span class="stringliteral">&quot;).&quot;</span> &lt;&lt; endl;
+}
+
+</pre></div><p>If you're not intimately familiar with the Fibonacci sequence, and how fast the numbers in it grow, the answer might shock you.</p>
+<p>As you can see, using the XInt library is just like using the native integer types -- except that an <code><a class="el" href="classxint_1_1integer.html" title="The extended integer class.">xint::integer</a></code> won't overflow on you until you completely exhaust your system's memory. :-) </p>
+</div>
+<hr size="1"/><address style="text-align: right;"><small>Generated on Tue Apr 6 01:22:08 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.1 </small></address>
+</body>
+</html>

Added: sandbox/xint/doc/exception__blocker_8cpp.html
==============================================================================
--- (empty file)
+++ sandbox/xint/doc/exception__blocker_8cpp.html 2010-04-06 01:40:33 EDT (Tue, 06 Apr 2010)
@@ -0,0 +1,78 @@
+<!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: exception_blocker.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.1 -->
+<div class="navigation" id="top">
+ <div class="tabs">
+ <ul>
+ <li>Main Page</li>
+ <li>Related Pages</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>exception_blocker.cpp File Reference</h1>
+<p>Contains the definitions for the exception-blocker classes and functions.
+More...</p>
+<code>#include &quot;../boost/xint/xint.hpp&quot;</code><br/>
+
+<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="namespacexint.html">xint</a></td></tr>
+
+<p><tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight"><p>All of the functions in the XInt 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">Exception-blocking and -allowing functions</div></td></tr>
+<tr><td colspan="2"><div class="groupText"><p><a class="anchor" id="amgrp6b736a9df3b9afabec548528235f28b6"></a> See the <a class="el" href="exceptions.html">exception-blocking page</a> for details on these functions and how to use them. </p>
+<br/><br/></div></td></tr>
+<tr><td class="memItemLeft" align="right" valign="top">bool&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespacexint.html#ac8be41374700d89400f5ecddf0f789e3">xint::exceptions_allowed</a> ()</td></tr>
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Query whether exceptions are currently allowed or blocked. <br/></td></tr>
+<tr><td class="memItemLeft" align="right" valign="top">token&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespacexint.html#ae7e3f6afc701f6e8873a407bb418d04c">xint::block_exceptions</a> ()</td></tr>
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Temporarily prevent the library from throwing blockable exceptions. <br/></td></tr>
+<tr><td class="memItemLeft" align="right" valign="top">token&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespacexint.html#a4b5a1a791ba11bb8f158a3b56bd9723e">xint::allow_exceptions</a> ()</td></tr>
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Temprarily counteract an <a class="el" href="namespacexint.html#ae7e3f6afc701f6e8873a407bb418d04c" title="Temporarily prevent the library from throwing blockable exceptions.">xint::block_exceptions</a> token to allow all exceptions. <br/></td></tr>
+</table>
+<hr/><a name="_details"></a><h2>Detailed Description</h2>
+<p>Contains the definitions for the exception-blocker classes and functions. </p>
+
+<p>Definition in file <a class="el" href="exception__blocker_8cpp_source.html">exception_blocker.cpp</a>.</p>
+<hr/><h2>Variable Documentation</h2>
+<a class="anchor" id="a50f7131c1e1f52ac26fb604e489b0dbe"></a><!-- doxytag: member="exception_blocker.cpp::mOldState" ref="a50f7131c1e1f52ac26fb604e489b0dbe" args="" -->
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname">bool <a class="el" href="exception__blocker_8cpp.html#a50f7131c1e1f52ac26fb604e489b0dbe">mOldState</a></td>
+ </tr>
+ </table>
+</div>
+<div class="memdoc">
+
+<p>Definition at line <a class="el" href="exception__blocker_8cpp_source.html#l00048">48</a> of file <a class="el" href="exception__blocker_8cpp_source.html">exception_blocker.cpp</a>.</p>
+
+</div>
+</div>
+</div>
+<hr size="1"/><address style="text-align: right;"><small>Generated on Tue Apr 6 01:22:08 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.1 </small></address>
+</body>
+</html>

Added: sandbox/xint/doc/exception__blocker_8cpp_source.html
==============================================================================
--- (empty file)
+++ sandbox/xint/doc/exception__blocker_8cpp_source.html 2010-04-06 01:40:33 EDT (Tue, 06 Apr 2010)
@@ -0,0 +1,98 @@
+<!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: exception_blocker.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.1 -->
+<div class="navigation" id="top">
+ <div class="tabs">
+ <ul>
+ <li>Main Page</li>
+ <li>Related Pages</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>exception_blocker.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="l00019"></a>00019 <span class="preprocessor">#include &quot;../boost/xint/xint.hpp&quot;</span>
+<a name="l00020"></a>00020
+<a name="l00021"></a>00021 <span class="preprocessor">#ifdef XINT_THREADSAFE</span>
+<a name="l00022"></a>00022 <span class="preprocessor"></span><span class="preprocessor"> #include &lt;boost/thread.hpp&gt;</span>
+<a name="l00023"></a>00023 <span class="preprocessor">#endif</span>
+<a name="l00024"></a>00024 <span class="preprocessor"></span>
+<a name="l00025"></a>00025 <span class="keyword">namespace </span>xint {
+<a name="l00026"></a>00026 <span class="keyword">namespace </span>{
+<a name="l00027"></a>00027
+<a name="l00028"></a>00028 <span class="preprocessor">#ifdef XINT_THREADSAFE</span>
+<a name="l00029"></a>00029 <span class="preprocessor"></span> boost::thread_specific_ptr&lt;bool&gt; allowed;
+<a name="l00030"></a>00030 <span class="preprocessor">#else</span>
+<a name="l00031"></a>00031 <span class="preprocessor"></span> <span class="keywordtype">bool</span> allowed=<span class="keyword">true</span>;
+<a name="l00032"></a>00032 <span class="preprocessor">#endif</span>
+<a name="l00033"></a>00033 <span class="preprocessor"></span>
+<a name="l00034"></a>00034 <span class="keyword">struct </span>EBlockerToken: <span class="keyword">public</span> detail::<a class="code" href="namespacexint.html#ad63045584f06221eb6a7581ad3091582" title="Used for the exception-blocker.">token</a> {
+<a name="l00035"></a>00035 <span class="preprocessor"> #ifdef XINT_THREADSAFE</span>
+<a name="l00036"></a>00036 <span class="preprocessor"></span> EBlockerToken(<span class="keywordtype">bool</span> newAllowState) {
+<a name="l00037"></a>00037 <span class="keywordflow">if</span> (allowed.get()==0) allowed.reset(<span class="keyword">new</span> <span class="keywordtype">bool</span>(<span class="keyword">true</span>));
+<a name="l00038"></a>00038 <a class="code" href="exception__blocker_8cpp.html#a50f7131c1e1f52ac26fb604e489b0dbe">mOldState</a>=*allowed;
+<a name="l00039"></a>00039 *allowed=newAllowState;
+<a name="l00040"></a>00040 }
+<a name="l00041"></a>00041 ~EBlockerToken() { *allowed=<a class="code" href="exception__blocker_8cpp.html#a50f7131c1e1f52ac26fb604e489b0dbe">mOldState</a>; }
+<a name="l00042"></a>00042 <span class="preprocessor"> #else</span>
+<a name="l00043"></a>00043 <span class="preprocessor"></span> EBlockerToken(<span class="keywordtype">bool</span> newAllowState): <a class="code" href="exception__blocker_8cpp.html#a50f7131c1e1f52ac26fb604e489b0dbe">mOldState</a>(allowed) {
+<a name="l00044"></a>00044 allowed=newAllowState; }
+<a name="l00045"></a>00045 ~EBlockerToken() { allowed=<a class="code" href="exception__blocker_8cpp.html#a50f7131c1e1f52ac26fb604e489b0dbe">mOldState</a>; }
+<a name="l00046"></a>00046 <span class="preprocessor"> #endif</span>
+<a name="l00047"></a>00047 <span class="preprocessor"></span>
+<a name="l00048"></a><a class="code" href="exception__blocker_8cpp.html#a50f7131c1e1f52ac26fb604e489b0dbe">00048</a> <span class="keywordtype">bool</span> <a class="code" href="exception__blocker_8cpp.html#a50f7131c1e1f52ac26fb604e489b0dbe">mOldState</a>;
+<a name="l00049"></a>00049 };
+<a name="l00050"></a>00050
+<a name="l00051"></a>00051 } <span class="comment">// namespace</span>
+<a name="l00052"></a>00052
+<a name="l00063"></a>00063 <span class="keywordtype">bool</span> <a class="code" href="namespacexint.html#ac8be41374700d89400f5ecddf0f789e3" title="Query whether exceptions are currently allowed or blocked.">exceptions_allowed</a>() {
+<a name="l00064"></a>00064 <span class="preprocessor"> #ifdef XINT_THREADSAFE</span>
+<a name="l00065"></a>00065 <span class="preprocessor"></span> <span class="comment">// Defaults to true</span>
+<a name="l00066"></a>00066 <span class="keywordflow">return</span> (allowed.get()==0 || *allowed==<span class="keyword">true</span>);
+<a name="l00067"></a>00067 <span class="preprocessor"> #else</span>
+<a name="l00068"></a>00068 <span class="preprocessor"></span> <span class="keywordflow">return</span> allowed;
+<a name="l00069"></a>00069 <span class="preprocessor"> #endif</span>
+<a name="l00070"></a>00070 <span class="preprocessor"></span>}
+<a name="l00071"></a>00071
+<a name="l00084"></a>00084 <a class="code" href="namespacexint.html#ad63045584f06221eb6a7581ad3091582" title="Used for the exception-blocker.">token</a> <a class="code" href="namespacexint.html#ae7e3f6afc701f6e8873a407bb418d04c" title="Temporarily prevent the library from throwing blockable exceptions.">block_exceptions</a>() {
+<a name="l00085"></a>00085 <span class="keywordflow">return</span> <a class="code" href="namespacexint.html#ad63045584f06221eb6a7581ad3091582" title="Used for the exception-blocker.">token</a>(<span class="keyword">new</span> EBlockerToken(<span class="keyword">false</span>));
+<a name="l00086"></a>00086 }
+<a name="l00087"></a>00087
+<a name="l00104"></a>00104 <a class="code" href="namespacexint.html#ad63045584f06221eb6a7581ad3091582" title="Used for the exception-blocker.">token</a> <a class="code" href="namespacexint.html#a4b5a1a791ba11bb8f158a3b56bd9723e" title="Temprarily counteract an xint::block_exceptions token to allow all exceptions.">allow_exceptions</a>() {
+<a name="l00105"></a>00105 <span class="keywordflow">return</span> <a class="code" href="namespacexint.html#ad63045584f06221eb6a7581ad3091582" title="Used for the exception-blocker.">token</a>(<span class="keyword">new</span> EBlockerToken(<span class="keyword">true</span>));
+<a name="l00106"></a>00106 }
+<a name="l00107"></a>00107
+<a name="l00108"></a>00108 } <span class="comment">// namespace xint</span>
+<a name="l00109"></a>00109
+</pre></div></div>
+<hr size="1"/><address style="text-align: right;"><small>Generated on Tue Apr 6 01:22:07 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.1 </small></address>
+</body>
+</html>

Added: sandbox/xint/doc/exceptions.html
==============================================================================
--- (empty file)
+++ sandbox/xint/doc/exceptions.html 2010-04-06 01:40:33 EDT (Tue, 06 Apr 2010)
@@ -0,0 +1,102 @@
+<!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: Exceptions and Exception-Blocking</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.1 -->
+<div class="navigation" id="top">
+ <div class="tabs">
+ <ul>
+ <li>Main Page</li>
+ <li class="current">Related Pages</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="exceptions">Exceptions and Exception-Blocking </a></h1><h2><a class="anchor" id="blocking">
+Exception Blocking</a></h2>
+<p>This library includes a mechanism for preventing most exceptions from being thrown. This was added to give you, the developer using the library, maximum flexibility in dealing with its functions. You can choose to deal with errors by catching exceptions or by checking returned values for error codes, on a case-by-case basis, depending on which would make for easier or more readable code.</p>
+<h2><a class="anchor" id="howitworks">
+How it Works</a></h2>
+<p>When exceptions are blocked, any function that would normally throw a blockable exception will return a special value indicating failure instead. For functions that return an <a class="el" href="classxint_1_1integer.html" title="The extended integer class.">xint::integer</a>, this will be <a class="el" href="nan.html">the Not-a-Number value</a>; for other functions, the value will be noted in the documentation.</p>
+<p>Note that, while most exceptions can be blocked, a few are unblockable, by design.</p>
+<dl class="warning"><dt><b>Warning:</b></dt><dd></dd></dl>
+<p>When exceptions are blocked, <em>any</em> function can return Not-a-Number under certain conditions, not just the ones listed as throwing exceptions. An insufficient-memory exception (<a class="el" href="classxint_1_1overflow__error.html" title="Exception class.">xint::overflow_error</a>), for instance, can happen nearly anywhere.</p>
+<h2><a class="anchor" id="howtouse">
+How to Use the Functions</a></h2>
+<p>By default, the library throws exceptions when it can't complete the task you've asked it to do, and there's no other logical way to indicate an error. But when it is more convenient, most of the exceptions that the library might throw can be blocked, by holding the <a class="el" href="namespacexint.html#ad63045584f06221eb6a7581ad3091582" title="Used for the exception-blocker.">xint::token</a> object returned by the <a class="el" href="namespacexint.html#ae7e3f6afc701f6e8873a407bb418d04c" title="Temporarily prevent the library from throwing blockable exceptions.">xint::block_exceptions</a> function. Here's an example (which can be found in the <code>examples</code> subdirectory as exceptions.cpp):</p>
+<div class="fragment"><pre class="fragment">
+<span class="preprocessor">#include &lt;<a class="code" href="xint_8hpp.html" title="The main header file for the XInt library.">boost/xint/xint.hpp</a>&gt;</span>
+<span class="preprocessor">#include &lt;ostream&gt;</span>
+
+<span class="keywordtype">int</span> main() {
+ <span class="keyword">using namespace </span>std;
+ <span class="keyword">using namespace </span>boost;
+ <span class="keyword">using</span> <a class="code" href="classxint_1_1integer.html" title="The extended integer class.">xint::integer</a>;
+
+ integer n;
+
+ <span class="comment">// It *is* possible to block exceptions multiple times, so this assert</span>
+ <span class="comment">// checks to see whether they&apos;re presently allowed. It is not needed,</span>
+ <span class="comment">// it&apos;s only here for demonstration purposes.</span>
+ assert(<a class="code" href="namespacexint.html#ac8be41374700d89400f5ecddf0f789e3" title="Query whether exceptions are currently allowed or blocked.">xint::exceptions_allowed</a>() == <span class="keyword">true</span>);
+
+ <span class="comment">// We&apos;ll wrap this in a try block for demonstration purposes, just to</span>
+ <span class="comment">// prove that it doesn&apos;t throw an exception. You normally don&apos;t need a</span>
+ <span class="comment">// try block if you&apos;re only expecting blockable exceptions.</span>
+ <span class="keywordflow">try</span> {
+ <span class="comment">// Create the &quot;blocker&quot; token. Until the token is destroyed, exceptions</span>
+ <span class="comment">// will be blocked, except when explicitly re-enabled.</span>
+ <a class="code" href="structxint_1_1detail_1_1token.html" title="An empty struct, used in xint::token.">xint::token</a> blocker=<a class="code" href="namespacexint.html#ae7e3f6afc701f6e8873a407bb418d04c" title="Temporarily prevent the library from throwing blockable exceptions.">xint::block_exceptions</a>();
+
+ <span class="comment">// This assert is only here for demonstration purposes.</span>
+ assert(<a class="code" href="namespacexint.html#ac8be41374700d89400f5ecddf0f789e3" title="Query whether exceptions are currently allowed or blocked.">xint::exceptions_allowed</a>() == <span class="keyword">false</span>);
+
+ <span class="comment">// Call the function(s) that should be exception-blocked. The example</span>
+ <span class="comment">// call tries to interpret an empty string as an integer, which would</span>
+ <span class="comment">// normally throw an xint::invalid_digit exception.</span>
+ n = integer(<span class="stringliteral">&quot;&quot;</span>);
+
+ <span class="comment">// n should be Not-a-Number, because there was an error but exceptions</span>
+ <span class="comment">// were blocked. This example code is fairly useless, and is only here</span>
+ <span class="comment">// for demonstration purposes, but you should always test for Not-a-Number</span>
+ <span class="comment">// when blocking exceptions.</span>
+ <span class="keywordflow">if</span> (n.is_nan()) {
+ cout &lt;&lt; <span class="stringliteral">&quot;n is Not-a-Number, do some intelligent error handling here.&quot;</span>
+ &lt;&lt; endl;
+ } <span class="keywordflow">else</span> {
+ <span class="comment">// This example code should never get to this block, but you would</span>
+ <span class="comment">// usually put the normal program flow code here.</span>
+ cout &lt;&lt; <span class="stringliteral">&quot;Error, n should be Not-a-Number and it isn&apos;t!&quot;</span> &lt;&lt; endl;
+ }
+ } <span class="keywordflow">catch</span> (std::exception&amp; e) {
+ <span class="comment">// This example code should never get to this block, because exceptions</span>
+ <span class="comment">// were blocked.</span>
+ cout &lt;&lt; <span class="stringliteral">&quot;Error, threw an exception when exceptions were blocked!\n&quot;</span> &lt;&lt;
+ e.what() &lt;&lt; endl;
+ }
+
+ <span class="comment">// Now exceptions are re-enabled, because the blocking behavior ended when</span>
+ <span class="comment">// the &quot;blocker&quot; token was destroyed at the end of the try block. Note that</span>
+ <span class="comment">// this assert is not needed, it&apos;s only here for demonstration purposes.</span>
+ assert(<a class="code" href="namespacexint.html#ac8be41374700d89400f5ecddf0f789e3" title="Query whether exceptions are currently allowed or blocked.">xint::exceptions_allowed</a>() == <span class="keyword">true</span>);
+}
+</pre></div><p>If you need to ensure that exceptions are allowed, in one of your own functions that might be called with them blocked, you can hold the <a class="el" href="namespacexint.html#ad63045584f06221eb6a7581ad3091582" title="Used for the exception-blocker.">xint::token</a> object returned by <a class="el" href="namespacexint.html#a4b5a1a791ba11bb8f158a3b56bd9723e" title="Temprarily counteract an xint::block_exceptions token to allow all exceptions.">xint::allow_exceptions</a>. It works the same way.</p>
+<p><a class="el" href="namespacexint.html#ad63045584f06221eb6a7581ad3091582" title="Used for the exception-blocker.">xint::token</a> objects should always be created on the stack, so that they are guaranteed to be destroyed in reverse order. If they are not, or if they are copied elsewhere, the results are undefined. </p>
+</div>
+<hr size="1"/><address style="text-align: right;"><small>Generated on Tue Apr 6 01:22:08 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.1 </small></address>
+</body>
+</html>

Added: sandbox/xint/doc/exceptions_8dox.html
==============================================================================
--- (empty file)
+++ sandbox/xint/doc/exceptions_8dox.html 2010-04-06 01:40:33 EDT (Tue, 06 Apr 2010)
@@ -0,0 +1,36 @@
+<!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/exceptions.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.1 -->
+<div class="navigation" id="top">
+ <div class="tabs">
+ <ul>
+ <li>Main Page</li>
+ <li>Related Pages</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/exceptions.dox File Reference</h1><table border="0" cellpadding="0" cellspacing="0">
+</table>
+</div>
+<hr size="1"/><address style="text-align: right;"><small>Generated on Tue Apr 6 01:22:08 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.1 </small></address>
+</body>
+</html>

Added: sandbox/xint/doc/files.html
==============================================================================
--- (empty file)
+++ sandbox/xint/doc/files.html 2010-04-06 01:40:33 EDT (Tue, 06 Apr 2010)
@@ -0,0 +1,56 @@
+<!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: File Index</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.1 -->
+<div class="navigation" id="top">
+ <div class="tabs">
+ <ul>
+ <li>Main Page</li>
+ <li>Related Pages</li>
+ <li>Namespaces</li>
+ <li>Classes</li>
+ <li class="current">Files</li>
+ </ul>
+ </div>
+ <div class="tabs">
+ <ul>
+ <li class="current">File List</li>
+ <li>File Members</li>
+ </ul>
+ </div>
+</div>
+<div class="contents">
+<h1>File List</h1>Here is a list of all files with brief descriptions:<table>
+ <tr><td class="indexkey"><a class="el" href="xint_8hpp.html">xint.hpp</a> [code]</td><td class="indexvalue">The main header file for the XInt library </td></tr>
+ <tr><td class="indexkey"><a class="el" href="xint__data__t_8hpp.html">xint_data_t.hpp</a> [code]</td><td class="indexvalue">Internal details of an <a class="el" href="classxint_1_1integer.html" title="The extended integer class.">xint::integer</a> </td></tr>
+ <tr><td class="indexkey"><a class="el" href="xint__monty_8hpp.html">xint_monty.hpp</a> [code]</td><td class="indexvalue">Internally-used functions </td></tr>
+ <tr><td class="indexkey"><a class="el" href="xint__test_8hpp.html">xint_test.hpp</a> [code]</td><td class="indexvalue">Declares the library's self-testing functions </td></tr>
+ <tr><td class="indexkey"><a class="el" href="bit__manipulations_8cpp.html">bit_manipulations.cpp</a> [code]</td><td class="indexvalue">Contains the bit-manipulation functions </td></tr>
+ <tr><td class="indexkey"><a class="el" href="compare_8cpp.html">compare.cpp</a> [code]</td><td class="indexvalue">Contains the the compare function and comparison operators </td></tr>
+ <tr><td class="indexkey"><a class="el" href="convert_8cpp.html">convert.cpp</a> [code]</td><td class="indexvalue">Contains the conversion functions </td></tr>
+ <tr><td class="indexkey"><a class="el" href="data__t_8cpp.html">data_t.cpp</a> [code]</td><td class="indexvalue">Contains the definitions for <a class="el" href="structxint_1_1detail_1_1data__t.html" title="Holds the internal details of an xint::integer.">xint::detail::data_t</a> member functions </td></tr>
+ <tr><td class="indexkey"><a class="el" href="exception__blocker_8cpp.html">exception_blocker.cpp</a> [code]</td><td class="indexvalue">Contains the definitions for the exception-blocker classes and functions </td></tr>
+ <tr><td class="indexkey"><a class="el" href="gcd_8cpp.html">gcd.cpp</a> [code]</td><td class="indexvalue">Greatest Common Denominator and Least Common Multple </td></tr>
+ <tr><td class="indexkey"><a class="el" href="integer_8cpp.html">integer.cpp</a> [code]</td><td class="indexvalue">Contains the definitions for the <a class="el" href="classxint_1_1integer.html" title="The extended integer class.">xint::integer</a> member functions </td></tr>
+ <tr><td class="indexkey"><a class="el" href="misc_8cpp.html">misc.cpp</a> [code]</td><td class="indexvalue">Functions that don't fall into any other category </td></tr>
+ <tr><td class="indexkey"><a class="el" href="modular_8cpp.html">modular.cpp</a> [code]</td><td class="indexvalue">Contains the definitions for the basic modular math functions </td></tr>
+ <tr><td class="indexkey"><a class="el" href="monty_8cpp.html">monty.cpp</a> [code]</td><td class="indexvalue">Internally used functions </td></tr>
+ <tr><td class="indexkey"><a class="el" href="operators_8cpp.html">operators.cpp</a> [code]</td><td class="indexvalue">Contains the definitions for the basic math operators </td></tr>
+ <tr><td class="indexkey"><a class="el" href="powers_8cpp.html">powers.cpp</a> [code]</td><td class="indexvalue">Contains the definitions for functions related to powers of a number </td></tr>
+ <tr><td class="indexkey"><a class="el" href="primes_8cpp.html">primes.cpp</a> [code]</td><td class="indexvalue">Contains the definitions for functions related to prime numbers </td></tr>
+ <tr><td class="indexkey"><a class="el" href="primitives_8cpp.html">primitives.cpp</a> [code]</td><td class="indexvalue">Contains the definitions for math primitives </td></tr>
+ <tr><td class="indexkey"><a class="el" href="random_8cpp.html">random.cpp</a> [code]</td><td class="indexvalue">Contains the definitions for the random number functions </td></tr>
+ <tr><td class="indexkey"><a class="el" href="roots_8cpp.html">roots.cpp</a> [code]</td><td class="indexvalue">Contains the definitions for functions related to roots of a number </td></tr>
+</table>
+</div>
+<hr size="1"/><address style="text-align: right;"><small>Generated on Tue Apr 6 01:22:08 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.1 </small></address>
+</body>
+</html>

Added: sandbox/xint/doc/functions.html
==============================================================================
--- (empty file)
+++ sandbox/xint/doc/functions.html 2010-04-06 01:40:33 EDT (Tue, 06 Apr 2010)
@@ -0,0 +1,373 @@
+<!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 Members</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.1 -->
+<div class="navigation" id="top">
+ <div class="tabs">
+ <ul>
+ <li>Main Page</li>
+ <li>Related Pages</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="current">Class Members</li>
+ </ul>
+ </div>
+ <div class="tabs">
+ <ul>
+ <li class="current">All</li>
+ <li>Functions</li>
+ <li>Variables</li>
+ <li>Typedefs</li>
+ </ul>
+ </div>
+ <div class="tabs">
+ <ul>
+ <li>_</li>
+ <li>a</li>
+ <li>c</li>
+ <li>d</li>
+ <li>e</li>
+ <li>g</li>
+ <li>h</li>
+ <li>i</li>
+ <li>m</li>
+ <li>n</li>
+ <li>o</li>
+ <li>q</li>
+ <li>r</li>
+ <li>s</li>
+ <li>t</li>
+ <li>z</li>
+ <li>~</li>
+ </ul>
+ </div>
+</div>
+<div class="contents">
+Here is a list of all class members with links to the classes they belong to:
+
+<h3><a class="anchor" id="index__">- _ -</a></h3><ul>
+<li>_get_data()
+: <a class="el" href="classxint_1_1integer.html#ae5578d7d5be17df3ecd3ddc5a852d0a0">xint::integer</a>
+</li>
+<li>_get_digit()
+: <a class="el" href="classxint_1_1integer.html#a33fe6f16dfba7b076f04a5ea40d8dccb">xint::integer</a>
+</li>
+<li>_get_length()
+: <a class="el" href="classxint_1_1integer.html#a5723a74b98da2d5ed9452a7ec10c0ca2">xint::integer</a>
+</li>
+<li>_make_unique()
+: <a class="el" href="classxint_1_1integer.html#adc5c7b5bc30c0cfa30d62610e0bc0366">xint::integer</a>
+</li>
+<li>_set_negative()
+: <a class="el" href="classxint_1_1integer.html#ab2f4df250e1030c518180b7e832c5ebd">xint::integer</a>
+</li>
+<li>_throw_if_nan()
+: <a class="el" href="classxint_1_1integer.html#ad5935c358b92f15064b1f910613f7a3e">xint::integer</a>
+</li>
+</ul>
+
+
+<h3><a class="anchor" id="index_a">- a -</a></h3><ul>
+<li>add()
+: <a class="el" href="structxint_1_1detail_1_1data__t.html#a143e6814a7aa20a0d61ed616b9940b2e">xint::detail::data_t</a>
+</li>
+<li>alloc()
+: <a class="el" href="structxint_1_1detail_1_1data__t.html#a4fe3935e29883193166966c49cd73139">xint::detail::data_t</a>
+</li>
+<li>attach()
+: <a class="el" href="structxint_1_1detail_1_1data__t.html#a7230e725461510f321bb1c45251b62f3">xint::detail::data_t</a>
+</li>
+</ul>
+
+
+<h3><a class="anchor" id="index_c">- c -</a></h3><ul>
+<li>cannot_represent()
+: <a class="el" href="classxint_1_1cannot__represent.html#ae551af601d2ab445a380a9c48e2a1db9">xint::cannot_represent</a>
+</li>
+<li>copy()
+: <a class="el" href="structxint_1_1detail_1_1data__t.html#a66862f94545c953f6604b4347205277b">xint::detail::data_t</a>
+</li>
+<li>count
+: <a class="el" href="structxint_1_1detail_1_1data__t_1_1_quick_digits.html#ac691b42c4404e59ae07f89146e722736">xint::detail::data_t::QuickDigits</a>
+</li>
+</ul>
+
+
+<h3><a class="anchor" id="index_d">- d -</a></h3><ul>
+<li>data_t()
+: <a class="el" href="structxint_1_1detail_1_1data__t.html#a9309667d3ac573346294e7b6e18c67ff">xint::detail::data_t</a>
+</li>
+<li>detach()
+: <a class="el" href="structxint_1_1detail_1_1data__t.html#afd5505e388c5bf8c9cf069df81a91818">xint::detail::data_t</a>
+</li>
+<li>digits
+: <a class="el" href="structxint_1_1detail_1_1data__t.html#a5c9382aec147090d7e7e2b5e972402a9">xint::detail::data_t</a>
+</li>
+<li>dist_t
+: <a class="el" href="structxint_1_1detail_1_1random__generator.html#aab9830c38c791b5c3ac0ef8328573bfd">xint::detail::random_generator&lt; T &gt;</a>
+</li>
+<li>divide_by_zero()
+: <a class="el" href="classxint_1_1divide__by__zero.html#a31233d42a45ca6ef7078e700fa114ad2">xint::divide_by_zero</a>
+</li>
+</ul>
+
+
+<h3><a class="anchor" id="index_e">- e -</a></h3><ul>
+<li>entropy()
+: <a class="el" href="classxint_1_1strong__random__generator.html#a57ff17a9c2b36775acfedd53f5a0b30e">xint::strong_random_generator</a>
+</li>
+<li>even()
+: <a class="el" href="classxint_1_1integer.html#a2ffb63eee276c65d8ea8b365adeb1ee2">xint::integer</a>
+</li>
+</ul>
+
+
+<h3><a class="anchor" id="index_g">- g -</a></h3><ul>
+<li>gen
+: <a class="el" href="structxint_1_1detail_1_1random__generator.html#a9a90a3050b2ff83d78ef8633deb5d42d">xint::detail::random_generator&lt; T &gt;</a>
+</li>
+<li>gen_t
+: <a class="el" href="structxint_1_1detail_1_1random__generator.html#adbc88a70815fa4f72deb9bddaec86675">xint::detail::random_generator&lt; T &gt;</a>
+</li>
+<li>genobj
+: <a class="el" href="structxint_1_1detail_1_1random__generator.html#a68bbea81955a1424f474b49040bcb007">xint::detail::random_generator&lt; T &gt;</a>
+</li>
+</ul>
+
+
+<h3><a class="anchor" id="index_h">- h -</a></h3><ul>
+<li>has_fixed_range
+: <a class="el" href="classxint_1_1strong__random__generator.html#a1a808cca9189eb64f420e4745ca5122d">xint::strong_random_generator</a>
+</li>
+<li>hex_digits()
+: <a class="el" href="classxint_1_1integer.html#a25f066e30e4548bc22e0e9d75b809955">xint::integer</a>
+</li>
+</ul>
+
+
+<h3><a class="anchor" id="index_i">- i -</a></h3><ul>
+<li>intbits
+: <a class="el" href="structxint_1_1detail_1_1data__t_1_1_quick_digits.html#af5323a8fbfdfaa3cae371872ec865fc5">xint::detail::data_t::QuickDigits</a>
+</li>
+<li>integer()
+: <a class="el" href="classxint_1_1integer.html#ad32b3b13167c61e48aede083a3e1c7a8">xint::integer</a>
+</li>
+<li>invalid_base()
+: <a class="el" href="classxint_1_1invalid__base.html#a16a577d5584652ca358450cbb55b5d55">xint::invalid_base</a>
+</li>
+<li>invalid_digit()
+: <a class="el" href="classxint_1_1invalid__digit.html#a832283e75569bd7e9d09f38ebae87a27">xint::invalid_digit</a>
+</li>
+<li>invalid_modulus()
+: <a class="el" href="classxint_1_1invalid__modulus.html#a691026e352d38fc5120c12d6d134e854">xint::invalid_modulus</a>
+</li>
+<li>invert()
+: <a class="el" href="structxint_1_1detail_1_1data__t.html#aaf6f202db416ad8fe18ec8a6c8c48904">xint::detail::data_t</a>
+</li>
+<li>is_nan()
+: <a class="el" href="classxint_1_1integer.html#a0bca68386478755dc787f981d9cd5606">xint::integer</a>
+</li>
+</ul>
+
+
+<h3><a class="anchor" id="index_m">- m -</a></h3><ul>
+<li>mAllocated
+: <a class="el" href="structxint_1_1detail_1_1data__t.html#a3390530db8333b535f65d3cc01ff5236">xint::detail::data_t</a>
+</li>
+<li>max()
+: <a class="el" href="classxint_1_1strong__random__generator.html#a1327ad0fe9d6f1f1c851456592b178db">xint::strong_random_generator</a>
+</li>
+<li>max_value
+: <a class="el" href="classxint_1_1strong__random__generator.html#aea47e4fbf8b0fe5914ade7ce2704a3c3">xint::strong_random_generator</a>
+</li>
+<li>mCopies
+: <a class="el" href="structxint_1_1detail_1_1data__t.html#a73bc854b5f9ced6576b97d2cff8f3a5d">xint::detail::data_t</a>
+</li>
+<li>min()
+: <a class="el" href="classxint_1_1strong__random__generator.html#a5ec89070a7a7338c2b7318086efef701">xint::strong_random_generator</a>
+</li>
+<li>min_value
+: <a class="el" href="classxint_1_1strong__random__generator.html#a4bea7dba7f086441548dfee576e54fce">xint::strong_random_generator</a>
+</li>
+<li>minimum
+: <a class="el" href="structxint_1_1detail_1_1data__t_1_1_quick_digits.html#aeb7c43d282f871305e76936664cee25f">xint::detail::data_t::QuickDigits</a>
+</li>
+<li>mIsNegative
+: <a class="el" href="structxint_1_1detail_1_1data__t.html#afb2d8673fc5d99d2ea006cd0aa32b744">xint::detail::data_t</a>
+</li>
+<li>mLength
+: <a class="el" href="structxint_1_1detail_1_1data__t.html#a599933d272e3592b2d0985ca7f7c72e2">xint::detail::data_t</a>
+</li>
+<li>mQuickDigits
+: <a class="el" href="structxint_1_1detail_1_1data__t.html#a022f882ed0818612861b1a67881ae131">xint::detail::data_t</a>
+</li>
+<li>mStorage
+: <a class="el" href="structxint_1_1detail_1_1data__t.html#a96c33fdc37dd3c774256f7ed20ce735c">xint::detail::data_t</a>
+</li>
+</ul>
+
+
+<h3><a class="anchor" id="index_n">- n -</a></h3><ul>
+<li>negate()
+: <a class="el" href="structxint_1_1detail_1_1data__t.html#aa0dd7ef67ccdef3c3139f4afc84219bd">xint::detail::data_t</a>
+</li>
+<li>no_strong_random()
+: <a class="el" href="classxint_1_1no__strong__random.html#a1ed9b4ac87613e636ad8f87bacf25544">xint::no_strong_random</a>
+</li>
+<li>not_a_number()
+: <a class="el" href="classxint_1_1not__a__number.html#a4ecc5bcc06a5d660176d51fc63c996cd">xint::not_a_number</a>
+</li>
+</ul>
+
+
+<h3><a class="anchor" id="index_o">- o -</a></h3><ul>
+<li>odd()
+: <a class="el" href="classxint_1_1integer.html#af2d420708a02755a8851140928e50e23">xint::integer</a>
+</li>
+<li>one()
+: <a class="el" href="classxint_1_1integer.html#a9237b21f4162146c7b5749b169c081b8">xint::integer</a>
+</li>
+<li>operator%=()
+: <a class="el" href="classxint_1_1integer.html#abee8874a961c2bb15a288494e096f36b">xint::integer</a>
+</li>
+<li>operator&amp;=()
+: <a class="el" href="classxint_1_1integer.html#a0d4c730e3d45d3fa2895b706b202d860">xint::integer</a>
+</li>
+<li>operator()()
+: <a class="el" href="structxint_1_1detail_1_1base__random__generator.html#aa7f3b20e2fcccbf9d3a5c76e6c89b4b5">xint::detail::base_random_generator</a>
+, <a class="el" href="structxint_1_1detail_1_1random__generator.html#ade9cefb3f061112ba1d3144aefd24f28">xint::detail::random_generator&lt; T &gt;</a>
+, <a class="el" href="classxint_1_1strong__random__generator.html#a2bbb1944511585f66e5daec4737bd4e7">xint::strong_random_generator</a>
+</li>
+<li>operator*=()
+: <a class="el" href="classxint_1_1integer.html#a531cdc9ce5667c4553fd1e4dac151b51">xint::integer</a>
+</li>
+<li>operator++()
+: <a class="el" href="classxint_1_1integer.html#a60cd241278892070d14a0d57e45c9264">xint::integer</a>
+</li>
+<li>operator+=()
+: <a class="el" href="classxint_1_1integer.html#aa0259f75f66b97b68310cfed2c0ecc7b">xint::integer</a>
+</li>
+<li>operator--()
+: <a class="el" href="classxint_1_1integer.html#a48452b868e2279e202039c9918f0dcf3">xint::integer</a>
+</li>
+<li>operator-=()
+: <a class="el" href="classxint_1_1integer.html#a2ce7f54adccb88836d1474fc67fa9a62">xint::integer</a>
+</li>
+<li>operator/=()
+: <a class="el" href="classxint_1_1integer.html#a3366a33f7ca5ad3285515e260d0dce66">xint::integer</a>
+</li>
+<li>operator&lt;&lt;()
+: <a class="el" href="classxint_1_1integer.html#a3733741d7e1c8ba1c1f490c8949a308f">xint::integer</a>
+</li>
+<li>operator&lt;&lt;=()
+: <a class="el" href="classxint_1_1integer.html#a14545146f86ed797e97758d8aea32ecd">xint::integer</a>
+</li>
+<li>operator=()
+: <a class="el" href="classxint_1_1integer.html#abfa13a313f2782885bbbfa9a5f4a22c2">xint::integer</a>
+</li>
+<li>operator&gt;&gt;()
+: <a class="el" href="classxint_1_1integer.html#a5cbc6986de4ca89b49162736f8750986">xint::integer</a>
+</li>
+<li>operator&gt;&gt;=()
+: <a class="el" href="classxint_1_1integer.html#aa0151e58a97bc1801221907d68582ec2">xint::integer</a>
+</li>
+<li>operator^=()
+: <a class="el" href="classxint_1_1integer.html#afc13b5ae9c6f28ef5e75777976aeb56d">xint::integer</a>
+</li>
+<li>operator|=()
+: <a class="el" href="classxint_1_1integer.html#a1af418341e64a317b4cc41fcddaa849f">xint::integer</a>
+</li>
+<li>overflow_error()
+: <a class="el" href="classxint_1_1overflow__error.html#a126d839e9138532447e0de9e39d1b4c8">xint::overflow_error</a>
+</li>
+</ul>
+
+
+<h3><a class="anchor" id="index_q">- q -</a></h3><ul>
+<li>quickset()
+: <a class="el" href="structxint_1_1detail_1_1data__t.html#a57fc3966c44d09daeede53899673cde3">xint::detail::data_t</a>
+</li>
+</ul>
+
+
+<h3><a class="anchor" id="index_r">- r -</a></h3><ul>
+<li>random_generator()
+: <a class="el" href="structxint_1_1detail_1_1random__generator.html#a76ce5051cedd7e6e25dc46ac1fb90098">xint::detail::random_generator&lt; T &gt;</a>
+</li>
+<li>realloc()
+: <a class="el" href="structxint_1_1detail_1_1data__t.html#a2bb2c79d47f2fda3605f34b80cb58b8b">xint::detail::data_t</a>
+</li>
+<li>result_type
+: <a class="el" href="structxint_1_1detail_1_1base__random__generator.html#a0556d7f290cd236303b3f1031611cb3e">xint::detail::base_random_generator</a>
+, <a class="el" href="classxint_1_1strong__random__generator.html#a470b586d0730deb716ffa3c13164e493">xint::strong_random_generator</a>
+</li>
+</ul>
+
+
+<h3><a class="anchor" id="index_s">- s -</a></h3><ul>
+<li>shift_left()
+: <a class="el" href="structxint_1_1detail_1_1data__t.html#a72785130c7c6490af874f450cf6e0086">xint::detail::data_t</a>
+</li>
+<li>shift_right()
+: <a class="el" href="structxint_1_1detail_1_1data__t.html#a432ace7094bca306dcba254f862e2428">xint::detail::data_t</a>
+</li>
+<li>sign()
+: <a class="el" href="classxint_1_1integer.html#a5d84398ce89b376f695ccded2d20c8c2">xint::integer</a>
+</li>
+<li>skipLeadingZeros()
+: <a class="el" href="structxint_1_1detail_1_1data__t.html#a6d45feedd311e26f7de06597fb0c6b81">xint::detail::data_t</a>
+</li>
+<li>strong_random_generator()
+: <a class="el" href="classxint_1_1strong__random__generator.html#a8841d21b6614967e0520f55c3093871a">xint::strong_random_generator</a>
+</li>
+<li>subtract()
+: <a class="el" href="structxint_1_1detail_1_1data__t.html#a650d374b8d38b369273830bb9d939da4">xint::detail::data_t</a>
+</li>
+<li>suggested
+: <a class="el" href="structxint_1_1detail_1_1data__t_1_1_quick_digits.html#a789eadb40cb8c034823ecb5fb6094092">xint::detail::data_t::QuickDigits</a>
+</li>
+</ul>
+
+
+<h3><a class="anchor" id="index_t">- t -</a></h3><ul>
+<li>too_big()
+: <a class="el" href="classxint_1_1too__big.html#af57a30cd18f06bef869c35b9c98f6115">xint::too_big</a>
+</li>
+</ul>
+
+
+<h3><a class="anchor" id="index_z">- z -</a></h3><ul>
+<li>zero()
+: <a class="el" href="classxint_1_1integer.html#a64a0f99de7c33239237cb59d8464f3d2">xint::integer</a>
+, <a class="el" href="structxint_1_1detail_1_1data__t.html#a288850fd62ef26302ce4767a45acd968">xint::detail::data_t</a>
+</li>
+</ul>
+
+
+<h3><a class="anchor" id="index_0x7e">- ~ -</a></h3><ul>
+<li>~integer()
+: <a class="el" href="classxint_1_1integer.html#a4f687cc90353b1c347448f1d94fa157e">xint::integer</a>
+</li>
+<li>~strong_random_generator()
+: <a class="el" href="classxint_1_1strong__random__generator.html#ac75f659c2adb7c822d49fe534b2d76a4">xint::strong_random_generator</a>
+</li>
+</ul>
+</div>
+<hr size="1"/><address style="text-align: right;"><small>Generated on Tue Apr 6 01:22:08 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.1 </small></address>
+</body>
+</html>

Added: sandbox/xint/doc/functions_func.html
==============================================================================
--- (empty file)
+++ sandbox/xint/doc/functions_func.html 2010-04-06 01:40:33 EDT (Tue, 06 Apr 2010)
@@ -0,0 +1,310 @@
+<!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 Members - Functions</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.1 -->
+<div class="navigation" id="top">
+ <div class="tabs">
+ <ul>
+ <li>Main Page</li>
+ <li>Related Pages</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="current">Class Members</li>
+ </ul>
+ </div>
+ <div class="tabs">
+ <ul>
+ <li>All</li>
+ <li class="current">Functions</li>
+ <li>Variables</li>
+ <li>Typedefs</li>
+ </ul>
+ </div>
+ <div class="tabs">
+ <ul>
+ <li>_</li>
+ <li>a</li>
+ <li>c</li>
+ <li>d</li>
+ <li>e</li>
+ <li>h</li>
+ <li>i</li>
+ <li>m</li>
+ <li>n</li>
+ <li>o</li>
+ <li>q</li>
+ <li>r</li>
+ <li>s</li>
+ <li>t</li>
+ <li>z</li>
+ <li>~</li>
+ </ul>
+ </div>
+</div>
+<div class="contents">
+&nbsp;
+
+<h3><a class="anchor" id="index__">- _ -</a></h3><ul>
+<li>_get_data()
+: <a class="el" href="classxint_1_1integer.html#ae5578d7d5be17df3ecd3ddc5a852d0a0">xint::integer</a>
+</li>
+<li>_get_digit()
+: <a class="el" href="classxint_1_1integer.html#a33fe6f16dfba7b076f04a5ea40d8dccb">xint::integer</a>
+</li>
+<li>_get_length()
+: <a class="el" href="classxint_1_1integer.html#a5723a74b98da2d5ed9452a7ec10c0ca2">xint::integer</a>
+</li>
+<li>_make_unique()
+: <a class="el" href="classxint_1_1integer.html#adc5c7b5bc30c0cfa30d62610e0bc0366">xint::integer</a>
+</li>
+<li>_set_negative()
+: <a class="el" href="classxint_1_1integer.html#ab2f4df250e1030c518180b7e832c5ebd">xint::integer</a>
+</li>
+<li>_throw_if_nan()
+: <a class="el" href="classxint_1_1integer.html#ad5935c358b92f15064b1f910613f7a3e">xint::integer</a>
+</li>
+</ul>
+
+
+<h3><a class="anchor" id="index_a">- a -</a></h3><ul>
+<li>add()
+: <a class="el" href="structxint_1_1detail_1_1data__t.html#a143e6814a7aa20a0d61ed616b9940b2e">xint::detail::data_t</a>
+</li>
+<li>alloc()
+: <a class="el" href="structxint_1_1detail_1_1data__t.html#a4fe3935e29883193166966c49cd73139">xint::detail::data_t</a>
+</li>
+<li>attach()
+: <a class="el" href="structxint_1_1detail_1_1data__t.html#a7230e725461510f321bb1c45251b62f3">xint::detail::data_t</a>
+</li>
+</ul>
+
+
+<h3><a class="anchor" id="index_c">- c -</a></h3><ul>
+<li>cannot_represent()
+: <a class="el" href="classxint_1_1cannot__represent.html#ae551af601d2ab445a380a9c48e2a1db9">xint::cannot_represent</a>
+</li>
+<li>copy()
+: <a class="el" href="structxint_1_1detail_1_1data__t.html#a66862f94545c953f6604b4347205277b">xint::detail::data_t</a>
+</li>
+</ul>
+
+
+<h3><a class="anchor" id="index_d">- d -</a></h3><ul>
+<li>data_t()
+: <a class="el" href="structxint_1_1detail_1_1data__t.html#a9309667d3ac573346294e7b6e18c67ff">xint::detail::data_t</a>
+</li>
+<li>detach()
+: <a class="el" href="structxint_1_1detail_1_1data__t.html#afd5505e388c5bf8c9cf069df81a91818">xint::detail::data_t</a>
+</li>
+<li>divide_by_zero()
+: <a class="el" href="classxint_1_1divide__by__zero.html#a31233d42a45ca6ef7078e700fa114ad2">xint::divide_by_zero</a>
+</li>
+</ul>
+
+
+<h3><a class="anchor" id="index_e">- e -</a></h3><ul>
+<li>entropy()
+: <a class="el" href="classxint_1_1strong__random__generator.html#a57ff17a9c2b36775acfedd53f5a0b30e">xint::strong_random_generator</a>
+</li>
+<li>even()
+: <a class="el" href="classxint_1_1integer.html#a2ffb63eee276c65d8ea8b365adeb1ee2">xint::integer</a>
+</li>
+</ul>
+
+
+<h3><a class="anchor" id="index_h">- h -</a></h3><ul>
+<li>hex_digits()
+: <a class="el" href="classxint_1_1integer.html#a25f066e30e4548bc22e0e9d75b809955">xint::integer</a>
+</li>
+</ul>
+
+
+<h3><a class="anchor" id="index_i">- i -</a></h3><ul>
+<li>integer()
+: <a class="el" href="classxint_1_1integer.html#ad32b3b13167c61e48aede083a3e1c7a8">xint::integer</a>
+</li>
+<li>invalid_base()
+: <a class="el" href="classxint_1_1invalid__base.html#a16a577d5584652ca358450cbb55b5d55">xint::invalid_base</a>
+</li>
+<li>invalid_digit()
+: <a class="el" href="classxint_1_1invalid__digit.html#a832283e75569bd7e9d09f38ebae87a27">xint::invalid_digit</a>
+</li>
+<li>invalid_modulus()
+: <a class="el" href="classxint_1_1invalid__modulus.html#a691026e352d38fc5120c12d6d134e854">xint::invalid_modulus</a>
+</li>
+<li>invert()
+: <a class="el" href="structxint_1_1detail_1_1data__t.html#aaf6f202db416ad8fe18ec8a6c8c48904">xint::detail::data_t</a>
+</li>
+<li>is_nan()
+: <a class="el" href="classxint_1_1integer.html#a0bca68386478755dc787f981d9cd5606">xint::integer</a>
+</li>
+</ul>
+
+
+<h3><a class="anchor" id="index_m">- m -</a></h3><ul>
+<li>max()
+: <a class="el" href="classxint_1_1strong__random__generator.html#a1327ad0fe9d6f1f1c851456592b178db">xint::strong_random_generator</a>
+</li>
+<li>min()
+: <a class="el" href="classxint_1_1strong__random__generator.html#a5ec89070a7a7338c2b7318086efef701">xint::strong_random_generator</a>
+</li>
+</ul>
+
+
+<h3><a class="anchor" id="index_n">- n -</a></h3><ul>
+<li>negate()
+: <a class="el" href="structxint_1_1detail_1_1data__t.html#aa0dd7ef67ccdef3c3139f4afc84219bd">xint::detail::data_t</a>
+</li>
+<li>no_strong_random()
+: <a class="el" href="classxint_1_1no__strong__random.html#a1ed9b4ac87613e636ad8f87bacf25544">xint::no_strong_random</a>
+</li>
+<li>not_a_number()
+: <a class="el" href="classxint_1_1not__a__number.html#a4ecc5bcc06a5d660176d51fc63c996cd">xint::not_a_number</a>
+</li>
+</ul>
+
+
+<h3><a class="anchor" id="index_o">- o -</a></h3><ul>
+<li>odd()
+: <a class="el" href="classxint_1_1integer.html#af2d420708a02755a8851140928e50e23">xint::integer</a>
+</li>
+<li>one()
+: <a class="el" href="classxint_1_1integer.html#a9237b21f4162146c7b5749b169c081b8">xint::integer</a>
+</li>
+<li>operator%=()
+: <a class="el" href="classxint_1_1integer.html#abee8874a961c2bb15a288494e096f36b">xint::integer</a>
+</li>
+<li>operator&amp;=()
+: <a class="el" href="classxint_1_1integer.html#a0d4c730e3d45d3fa2895b706b202d860">xint::integer</a>
+</li>
+<li>operator()()
+: <a class="el" href="structxint_1_1detail_1_1base__random__generator.html#aa7f3b20e2fcccbf9d3a5c76e6c89b4b5">xint::detail::base_random_generator</a>
+, <a class="el" href="structxint_1_1detail_1_1random__generator.html#ade9cefb3f061112ba1d3144aefd24f28">xint::detail::random_generator&lt; T &gt;</a>
+, <a class="el" href="classxint_1_1strong__random__generator.html#a2bbb1944511585f66e5daec4737bd4e7">xint::strong_random_generator</a>
+</li>
+<li>operator*=()
+: <a class="el" href="classxint_1_1integer.html#a531cdc9ce5667c4553fd1e4dac151b51">xint::integer</a>
+</li>
+<li>operator++()
+: <a class="el" href="classxint_1_1integer.html#a60cd241278892070d14a0d57e45c9264">xint::integer</a>
+</li>
+<li>operator+=()
+: <a class="el" href="classxint_1_1integer.html#aa0259f75f66b97b68310cfed2c0ecc7b">xint::integer</a>
+</li>
+<li>operator--()
+: <a class="el" href="classxint_1_1integer.html#a48452b868e2279e202039c9918f0dcf3">xint::integer</a>
+</li>
+<li>operator-=()
+: <a class="el" href="classxint_1_1integer.html#a2ce7f54adccb88836d1474fc67fa9a62">xint::integer</a>
+</li>
+<li>operator/=()
+: <a class="el" href="classxint_1_1integer.html#a3366a33f7ca5ad3285515e260d0dce66">xint::integer</a>
+</li>
+<li>operator&lt;&lt;()
+: <a class="el" href="classxint_1_1integer.html#a3733741d7e1c8ba1c1f490c8949a308f">xint::integer</a>
+</li>
+<li>operator&lt;&lt;=()
+: <a class="el" href="classxint_1_1integer.html#a14545146f86ed797e97758d8aea32ecd">xint::integer</a>
+</li>
+<li>operator=()
+: <a class="el" href="classxint_1_1integer.html#abfa13a313f2782885bbbfa9a5f4a22c2">xint::integer</a>
+</li>
+<li>operator&gt;&gt;()
+: <a class="el" href="classxint_1_1integer.html#a5cbc6986de4ca89b49162736f8750986">xint::integer</a>
+</li>
+<li>operator&gt;&gt;=()
+: <a class="el" href="classxint_1_1integer.html#aa0151e58a97bc1801221907d68582ec2">xint::integer</a>
+</li>
+<li>operator^=()
+: <a class="el" href="classxint_1_1integer.html#afc13b5ae9c6f28ef5e75777976aeb56d">xint::integer</a>
+</li>
+<li>operator|=()
+: <a class="el" href="classxint_1_1integer.html#a1af418341e64a317b4cc41fcddaa849f">xint::integer</a>
+</li>
+<li>overflow_error()
+: <a class="el" href="classxint_1_1overflow__error.html#a126d839e9138532447e0de9e39d1b4c8">xint::overflow_error</a>
+</li>
+</ul>
+
+
+<h3><a class="anchor" id="index_q">- q -</a></h3><ul>
+<li>quickset()
+: <a class="el" href="structxint_1_1detail_1_1data__t.html#a57fc3966c44d09daeede53899673cde3">xint::detail::data_t</a>
+</li>
+</ul>
+
+
+<h3><a class="anchor" id="index_r">- r -</a></h3><ul>
+<li>random_generator()
+: <a class="el" href="structxint_1_1detail_1_1random__generator.html#a76ce5051cedd7e6e25dc46ac1fb90098">xint::detail::random_generator&lt; T &gt;</a>
+</li>
+<li>realloc()
+: <a class="el" href="structxint_1_1detail_1_1data__t.html#a2bb2c79d47f2fda3605f34b80cb58b8b">xint::detail::data_t</a>
+</li>
+</ul>
+
+
+<h3><a class="anchor" id="index_s">- s -</a></h3><ul>
+<li>shift_left()
+: <a class="el" href="structxint_1_1detail_1_1data__t.html#a72785130c7c6490af874f450cf6e0086">xint::detail::data_t</a>
+</li>
+<li>shift_right()
+: <a class="el" href="structxint_1_1detail_1_1data__t.html#a432ace7094bca306dcba254f862e2428">xint::detail::data_t</a>
+</li>
+<li>sign()
+: <a class="el" href="classxint_1_1integer.html#a5d84398ce89b376f695ccded2d20c8c2">xint::integer</a>
+</li>
+<li>skipLeadingZeros()
+: <a class="el" href="structxint_1_1detail_1_1data__t.html#a6d45feedd311e26f7de06597fb0c6b81">xint::detail::data_t</a>
+</li>
+<li>strong_random_generator()
+: <a class="el" href="classxint_1_1strong__random__generator.html#a8841d21b6614967e0520f55c3093871a">xint::strong_random_generator</a>
+</li>
+<li>subtract()
+: <a class="el" href="structxint_1_1detail_1_1data__t.html#a650d374b8d38b369273830bb9d939da4">xint::detail::data_t</a>
+</li>
+</ul>
+
+
+<h3><a class="anchor" id="index_t">- t -</a></h3><ul>
+<li>too_big()
+: <a class="el" href="classxint_1_1too__big.html#af57a30cd18f06bef869c35b9c98f6115">xint::too_big</a>
+</li>
+</ul>
+
+
+<h3><a class="anchor" id="index_z">- z -</a></h3><ul>
+<li>zero()
+: <a class="el" href="classxint_1_1integer.html#a64a0f99de7c33239237cb59d8464f3d2">xint::integer</a>
+, <a class="el" href="structxint_1_1detail_1_1data__t.html#a288850fd62ef26302ce4767a45acd968">xint::detail::data_t</a>
+</li>
+</ul>
+
+
+<h3><a class="anchor" id="index_0x7e">- ~ -</a></h3><ul>
+<li>~integer()
+: <a class="el" href="classxint_1_1integer.html#a4f687cc90353b1c347448f1d94fa157e">xint::integer</a>
+</li>
+<li>~strong_random_generator()
+: <a class="el" href="classxint_1_1strong__random__generator.html#ac75f659c2adb7c822d49fe534b2d76a4">xint::strong_random_generator</a>
+</li>
+</ul>
+</div>
+<hr size="1"/><address style="text-align: right;"><small>Generated on Tue Apr 6 01:22:08 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.1 </small></address>
+</body>
+</html>

Added: sandbox/xint/doc/functions_type.html
==============================================================================
--- (empty file)
+++ sandbox/xint/doc/functions_type.html 2010-04-06 01:40:33 EDT (Tue, 06 Apr 2010)
@@ -0,0 +1,55 @@
+<!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 Members - Typedefs</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.1 -->
+<div class="navigation" id="top">
+ <div class="tabs">
+ <ul>
+ <li>Main Page</li>
+ <li>Related Pages</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="current">Class Members</li>
+ </ul>
+ </div>
+ <div class="tabs">
+ <ul>
+ <li>All</li>
+ <li>Functions</li>
+ <li>Variables</li>
+ <li class="current">Typedefs</li>
+ </ul>
+ </div>
+</div>
+<div class="contents">
+&nbsp;<ul>
+<li>dist_t
+: <a class="el" href="structxint_1_1detail_1_1random__generator.html#aab9830c38c791b5c3ac0ef8328573bfd">xint::detail::random_generator&lt; T &gt;</a>
+</li>
+<li>gen_t
+: <a class="el" href="structxint_1_1detail_1_1random__generator.html#adbc88a70815fa4f72deb9bddaec86675">xint::detail::random_generator&lt; T &gt;</a>
+</li>
+<li>result_type
+: <a class="el" href="structxint_1_1detail_1_1base__random__generator.html#a0556d7f290cd236303b3f1031611cb3e">xint::detail::base_random_generator</a>
+, <a class="el" href="classxint_1_1strong__random__generator.html#a470b586d0730deb716ffa3c13164e493">xint::strong_random_generator</a>
+</li>
+</ul>
+</div>
+<hr size="1"/><address style="text-align: right;"><small>Generated on Tue Apr 6 01:22:08 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.1 </small></address>
+</body>
+</html>

Added: sandbox/xint/doc/functions_vars.html
==============================================================================
--- (empty file)
+++ sandbox/xint/doc/functions_vars.html 2010-04-06 01:40:33 EDT (Tue, 06 Apr 2010)
@@ -0,0 +1,93 @@
+<!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 Members - Variables</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.1 -->
+<div class="navigation" id="top">
+ <div class="tabs">
+ <ul>
+ <li>Main Page</li>
+ <li>Related Pages</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="current">Class Members</li>
+ </ul>
+ </div>
+ <div class="tabs">
+ <ul>
+ <li>All</li>
+ <li>Functions</li>
+ <li class="current">Variables</li>
+ <li>Typedefs</li>
+ </ul>
+ </div>
+</div>
+<div class="contents">
+&nbsp;<ul>
+<li>count
+: <a class="el" href="structxint_1_1detail_1_1data__t_1_1_quick_digits.html#ac691b42c4404e59ae07f89146e722736">xint::detail::data_t::QuickDigits</a>
+</li>
+<li>digits
+: <a class="el" href="structxint_1_1detail_1_1data__t.html#a5c9382aec147090d7e7e2b5e972402a9">xint::detail::data_t</a>
+</li>
+<li>gen
+: <a class="el" href="structxint_1_1detail_1_1random__generator.html#a9a90a3050b2ff83d78ef8633deb5d42d">xint::detail::random_generator&lt; T &gt;</a>
+</li>
+<li>genobj
+: <a class="el" href="structxint_1_1detail_1_1random__generator.html#a68bbea81955a1424f474b49040bcb007">xint::detail::random_generator&lt; T &gt;</a>
+</li>
+<li>has_fixed_range
+: <a class="el" href="classxint_1_1strong__random__generator.html#a1a808cca9189eb64f420e4745ca5122d">xint::strong_random_generator</a>
+</li>
+<li>intbits
+: <a class="el" href="structxint_1_1detail_1_1data__t_1_1_quick_digits.html#af5323a8fbfdfaa3cae371872ec865fc5">xint::detail::data_t::QuickDigits</a>
+</li>
+<li>mAllocated
+: <a class="el" href="structxint_1_1detail_1_1data__t.html#a3390530db8333b535f65d3cc01ff5236">xint::detail::data_t</a>
+</li>
+<li>max_value
+: <a class="el" href="classxint_1_1strong__random__generator.html#aea47e4fbf8b0fe5914ade7ce2704a3c3">xint::strong_random_generator</a>
+</li>
+<li>mCopies
+: <a class="el" href="structxint_1_1detail_1_1data__t.html#a73bc854b5f9ced6576b97d2cff8f3a5d">xint::detail::data_t</a>
+</li>
+<li>min_value
+: <a class="el" href="classxint_1_1strong__random__generator.html#a4bea7dba7f086441548dfee576e54fce">xint::strong_random_generator</a>
+</li>
+<li>minimum
+: <a class="el" href="structxint_1_1detail_1_1data__t_1_1_quick_digits.html#aeb7c43d282f871305e76936664cee25f">xint::detail::data_t::QuickDigits</a>
+</li>
+<li>mIsNegative
+: <a class="el" href="structxint_1_1detail_1_1data__t.html#afb2d8673fc5d99d2ea006cd0aa32b744">xint::detail::data_t</a>
+</li>
+<li>mLength
+: <a class="el" href="structxint_1_1detail_1_1data__t.html#a599933d272e3592b2d0985ca7f7c72e2">xint::detail::data_t</a>
+</li>
+<li>mQuickDigits
+: <a class="el" href="structxint_1_1detail_1_1data__t.html#a022f882ed0818612861b1a67881ae131">xint::detail::data_t</a>
+</li>
+<li>mStorage
+: <a class="el" href="structxint_1_1detail_1_1data__t.html#a96c33fdc37dd3c774256f7ed20ce735c">xint::detail::data_t</a>
+</li>
+<li>suggested
+: <a class="el" href="structxint_1_1detail_1_1data__t_1_1_quick_digits.html#a789eadb40cb8c034823ecb5fb6094092">xint::detail::data_t::QuickDigits</a>
+</li>
+</ul>
+</div>
+<hr size="1"/><address style="text-align: right;"><small>Generated on Tue Apr 6 01:22:08 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.1 </small></address>
+</body>
+</html>

Added: sandbox/xint/doc/gcd_8cpp.html
==============================================================================
--- (empty file)
+++ sandbox/xint/doc/gcd_8cpp.html 2010-04-06 01:40:33 EDT (Tue, 06 Apr 2010)
@@ -0,0 +1,112 @@
+<!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: gcd.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.1 -->
+<div class="navigation" id="top">
+ <div class="tabs">
+ <ul>
+ <li>Main Page</li>
+ <li>Related Pages</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>gcd.cpp File Reference</h1>
+<p>Greatest Common Denominator and Least Common Multple.
+More...</p>
+<code>#include &quot;../boost/xint/xint.hpp&quot;</code><br/>
+
+<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="namespacexint.html">xint</a></td></tr>
+
+<p><tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight"><p>All of the functions in the XInt 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">Miscellaneous functions</div></td></tr>
+<tr><td colspan="2"><div class="groupText"><p><a class="anchor" id="amgrp458f92801f3edfaf2e30b1f530c324e2"></a> </p>
+<br/><br/></div></td></tr>
+<tr><td class="memItemLeft" align="right" valign="top">integer&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespacexint.html#ac9e11516ac502e97be1902cde50f97e7">xint::gcd</a> (const integer &amp;num1, const integer &amp;num2)</td></tr>
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Calculate the Greatest Common Denominator of two integers. <br/></td></tr>
+<tr><td class="memItemLeft" align="right" valign="top">integer&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespacexint.html#a17c5e4e807cfa425f48d9f5b464bc8dc">xint::lcm</a> (const integer &amp;num1, const integer &amp;num2)</td></tr>
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Calculate the Least Common Multiple of two integers. <br/></td></tr>
+<tr><td colspan="2"><div class="groupHeader">Modular math functions</div></td></tr>
+<tr><td colspan="2"><div class="groupText"><p><a class="anchor" id="amgrpbf63e6a6a1029bb25b7aa51052b38655"></a>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. </p>
+<br/><br/></div></td></tr>
+<tr><td class="memItemLeft" align="right" valign="top">integer&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespacexint.html#a4a79f60ebe198eadf10b63924018ce66">xint::invmod</a> (const integer &amp;n, const integer &amp;m)</td></tr>
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Get the modular inverse of a number in a modulus, if there is one. <br/></td></tr>
+</table>
+<hr/><a name="_details"></a><h2>Detailed Description</h2>
+<p>Greatest Common Denominator and Least Common Multple. </p>
+<p>Also holds the definition for <a class="el" href="namespacexint.html#a4a79f60ebe198eadf10b63924018ce66" title="Get the modular inverse of a number in a modulus, if there is one.">xint::invmod</a>, since it uses the GCD algorithm. </p>
+
+<p>Definition in file <a class="el" href="gcd_8cpp_source.html">gcd.cpp</a>.</p>
+<hr/><h2>Variable Documentation</h2>
+<a class="anchor" id="accb7b3088be4aa6fea6fe05dc527f01c"></a><!-- doxytag: member="gcd.cpp::u1" ref="accb7b3088be4aa6fea6fe05dc527f01c" args="" -->
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname">integer <a class="el" href="gcd_8cpp.html#accb7b3088be4aa6fea6fe05dc527f01c">u1</a></td>
+ </tr>
+ </table>
+</div>
+<div class="memdoc">
+
+<p>Definition at line <a class="el" href="gcd_8cpp_source.html#l00055">55</a> of file <a class="el" href="gcd_8cpp_source.html">gcd.cpp</a>.</p>
+
+</div>
+</div>
+<a class="anchor" id="a35cdbdce7a7d33309a6cabd35c878b2f"></a><!-- doxytag: member="gcd.cpp::u2" ref="a35cdbdce7a7d33309a6cabd35c878b2f" args="" -->
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname">integer <a class="el" href="gcd_8cpp.html#a35cdbdce7a7d33309a6cabd35c878b2f">u2</a></td>
+ </tr>
+ </table>
+</div>
+<div class="memdoc">
+
+<p>Definition at line <a class="el" href="gcd_8cpp_source.html#l00055">55</a> of file <a class="el" href="gcd_8cpp_source.html">gcd.cpp</a>.</p>
+
+</div>
+</div>
+<a class="anchor" id="a7ac8f5a4ca4a1c621ad1c8ea155faaf2"></a><!-- doxytag: member="gcd.cpp::u3" ref="a7ac8f5a4ca4a1c621ad1c8ea155faaf2" args="" -->
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname">integer <a class="el" href="gcd_8cpp.html#a7ac8f5a4ca4a1c621ad1c8ea155faaf2">u3</a></td>
+ </tr>
+ </table>
+</div>
+<div class="memdoc">
+
+<p>Definition at line <a class="el" href="gcd_8cpp_source.html#l00055">55</a> of file <a class="el" href="gcd_8cpp_source.html">gcd.cpp</a>.</p>
+
+</div>
+</div>
+</div>
+<hr size="1"/><address style="text-align: right;"><small>Generated on Tue Apr 6 01:22:08 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.1 </small></address>
+</body>
+</html>

Added: sandbox/xint/doc/gcd_8cpp_source.html
==============================================================================
--- (empty file)
+++ sandbox/xint/doc/gcd_8cpp_source.html 2010-04-06 01:40:33 EDT (Tue, 06 Apr 2010)
@@ -0,0 +1,141 @@
+<!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: gcd.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.1 -->
+<div class="navigation" id="top">
+ <div class="tabs">
+ <ul>
+ <li>Main Page</li>
+ <li>Related Pages</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>gcd.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="l00020"></a>00020 <span class="preprocessor">#include &quot;../boost/xint/xint.hpp&quot;</span>
+<a name="l00021"></a>00021
+<a name="l00022"></a>00022 <span class="keyword">namespace </span>xint {
+<a name="l00023"></a>00023
+<a name="l00024"></a>00024 <span class="keyword">namespace </span>{
+<a name="l00025"></a>00025
+<a name="l00026"></a>00026 <span class="keyword">struct </span>gcd_core {
+<a name="l00027"></a>00027 gcd_core(<span class="keyword">const</span> integer&amp; n, <span class="keyword">const</span> integer&amp; m): <a class="code" href="gcd_8cpp.html#accb7b3088be4aa6fea6fe05dc527f01c">u1</a>(integer::one()),
+<a name="l00028"></a>00028 <a class="code" href="gcd_8cpp.html#a35cdbdce7a7d33309a6cabd35c878b2f">u2</a>(integer::zero()), <a class="code" href="gcd_8cpp.html#a7ac8f5a4ca4a1c621ad1c8ea155faaf2">u3</a>(n)
+<a name="l00029"></a>00029 {
+<a name="l00030"></a>00030 integer t1=m, t2=n-<a class="code" href="classxint_1_1integer.html#a9237b21f4162146c7b5749b169c081b8">integer::one</a>(), t3=m;
+<a name="l00031"></a>00031 <span class="keywordflow">do</span> {
+<a name="l00032"></a>00032 <span class="keywordflow">do</span> {
+<a name="l00033"></a>00033 <span class="keywordflow">if</span> (<a class="code" href="gcd_8cpp.html#a7ac8f5a4ca4a1c621ad1c8ea155faaf2">u3</a>.even()) {
+<a name="l00034"></a>00034 <span class="keywordflow">if</span> (<a class="code" href="gcd_8cpp.html#accb7b3088be4aa6fea6fe05dc527f01c">u1</a>.odd() || <a class="code" href="gcd_8cpp.html#a35cdbdce7a7d33309a6cabd35c878b2f">u2</a>.odd()) { <a class="code" href="gcd_8cpp.html#accb7b3088be4aa6fea6fe05dc527f01c">u1</a>+=m; <a class="code" href="gcd_8cpp.html#a35cdbdce7a7d33309a6cabd35c878b2f">u2</a>+=n; }
+<a name="l00035"></a>00035 <a class="code" href="gcd_8cpp.html#accb7b3088be4aa6fea6fe05dc527f01c">u1</a> &gt;&gt;= 1;
+<a name="l00036"></a>00036 <a class="code" href="gcd_8cpp.html#a35cdbdce7a7d33309a6cabd35c878b2f">u2</a> &gt;&gt;= 1;
+<a name="l00037"></a>00037 <a class="code" href="gcd_8cpp.html#a7ac8f5a4ca4a1c621ad1c8ea155faaf2">u3</a> &gt;&gt;= 1;
+<a name="l00038"></a>00038 }
+<a name="l00039"></a>00039
+<a name="l00040"></a>00040 <span class="keywordflow">if</span> (t3.even() || <a class="code" href="gcd_8cpp.html#a7ac8f5a4ca4a1c621ad1c8ea155faaf2">u3</a> &lt; t3) {
+<a name="l00041"></a>00041 <span class="comment">// Swap the u&apos;s with the t&apos;s</span>
+<a name="l00042"></a>00042 std::swap(<a class="code" href="gcd_8cpp.html#accb7b3088be4aa6fea6fe05dc527f01c">u1</a>, t1);
+<a name="l00043"></a>00043 std::swap(<a class="code" href="gcd_8cpp.html#a35cdbdce7a7d33309a6cabd35c878b2f">u2</a>, t2);
+<a name="l00044"></a>00044 std::swap(<a class="code" href="gcd_8cpp.html#a7ac8f5a4ca4a1c621ad1c8ea155faaf2">u3</a>, t3);
+<a name="l00045"></a>00045 }
+<a name="l00046"></a>00046 } <span class="keywordflow">while</span> (<a class="code" href="gcd_8cpp.html#a7ac8f5a4ca4a1c621ad1c8ea155faaf2">u3</a>.even());
+<a name="l00047"></a>00047
+<a name="l00048"></a>00048 <span class="keywordflow">while</span> (<a class="code" href="gcd_8cpp.html#accb7b3088be4aa6fea6fe05dc527f01c">u1</a> &lt; t1 || <a class="code" href="gcd_8cpp.html#a35cdbdce7a7d33309a6cabd35c878b2f">u2</a> &lt; t2) { <a class="code" href="gcd_8cpp.html#accb7b3088be4aa6fea6fe05dc527f01c">u1</a>+=m; <a class="code" href="gcd_8cpp.html#a35cdbdce7a7d33309a6cabd35c878b2f">u2</a>+=n; }
+<a name="l00049"></a>00049 <a class="code" href="gcd_8cpp.html#accb7b3088be4aa6fea6fe05dc527f01c">u1</a>-=t1; <a class="code" href="gcd_8cpp.html#a35cdbdce7a7d33309a6cabd35c878b2f">u2</a>-=t2; <a class="code" href="gcd_8cpp.html#a7ac8f5a4ca4a1c621ad1c8ea155faaf2">u3</a>-=t3;
+<a name="l00050"></a>00050 } <span class="keywordflow">while</span> (t3 &gt; 0);
+<a name="l00051"></a>00051
+<a name="l00052"></a>00052 <span class="keywordflow">while</span> (<a class="code" href="gcd_8cpp.html#accb7b3088be4aa6fea6fe05dc527f01c">u1</a> &gt;= m &amp;&amp; <a class="code" href="gcd_8cpp.html#a35cdbdce7a7d33309a6cabd35c878b2f">u2</a> &gt;= n) { <a class="code" href="gcd_8cpp.html#accb7b3088be4aa6fea6fe05dc527f01c">u1</a>-=m; <a class="code" href="gcd_8cpp.html#a35cdbdce7a7d33309a6cabd35c878b2f">u2</a>-=n; }
+<a name="l00053"></a>00053 }
+<a name="l00054"></a>00054
+<a name="l00055"></a><a class="code" href="gcd_8cpp.html#a7ac8f5a4ca4a1c621ad1c8ea155faaf2">00055</a> integer <a class="code" href="gcd_8cpp.html#accb7b3088be4aa6fea6fe05dc527f01c">u1</a>, <a class="code" href="gcd_8cpp.html#a35cdbdce7a7d33309a6cabd35c878b2f">u2</a>, <a class="code" href="gcd_8cpp.html#a7ac8f5a4ca4a1c621ad1c8ea155faaf2">u3</a>;
+<a name="l00056"></a>00056 };
+<a name="l00057"></a>00057
+<a name="l00058"></a>00058 } <span class="comment">// namespace</span>
+<a name="l00059"></a>00059
+<a name="l00067"></a>00067 integer <a class="code" href="namespacexint.html#ac9e11516ac502e97be1902cde50f97e7" title="Calculate the Greatest Common Denominator of two integers.">gcd</a>(<span class="keyword">const</span> integer&amp; num1, <span class="keyword">const</span> integer&amp; num2) {
+<a name="l00068"></a>00068 num1.<a class="code" href="classxint_1_1integer.html#ad5935c358b92f15064b1f910613f7a3e">_throw_if_nan</a>();
+<a name="l00069"></a>00069 num2._throw_if_nan();
+<a name="l00070"></a>00070
+<a name="l00071"></a>00071 <span class="keywordtype">int</span> sign1=num1.sign(), sign2=num2.sign();
+<a name="l00072"></a>00072 <span class="keywordflow">if</span> (sign1==0 &amp;&amp; sign2==0) <span class="keywordflow">return</span> <a class="code" href="classxint_1_1integer.html#a64a0f99de7c33239237cb59d8464f3d2">integer::zero</a>();
+<a name="l00073"></a>00073 <span class="keywordflow">else</span> <span class="keywordflow">if</span> (sign1==0) <span class="keywordflow">return</span> num2;
+<a name="l00074"></a>00074 <span class="keywordflow">else</span> <span class="keywordflow">if</span> (sign2==0) <span class="keywordflow">return</span> num1;
+<a name="l00075"></a>00075
+<a name="l00076"></a>00076 integer n(<a class="code" href="namespacexint.html#ac9e4ed282bafa93dbf608350df0127ba" title="Returns the absolute value of an integer.">abs</a>(num1)), m(<a class="code" href="namespacexint.html#ac9e4ed282bafa93dbf608350df0127ba" title="Returns the absolute value of an integer.">abs</a>(num2));
+<a name="l00077"></a>00077
+<a name="l00078"></a>00078 <span class="keywordtype">size_t</span> k=0;
+<a name="l00079"></a>00079 <span class="keywordflow">while</span> (n.even() &amp;&amp; m.even()) { ++k; n &gt;&gt;= 1; m &gt;&gt;= 1; }
+<a name="l00080"></a>00080
+<a name="l00081"></a>00081 gcd_core core(n, m);
+<a name="l00082"></a>00082
+<a name="l00083"></a>00083 <span class="keywordflow">if</span> (core.u3.sign() != 0) <span class="keywordflow">return</span> core.u3 &lt;&lt; k;
+<a name="l00084"></a>00084 <span class="keywordflow">return</span> <a class="code" href="classxint_1_1integer.html#a9237b21f4162146c7b5749b169c081b8">integer::one</a>() &lt;&lt; k;
+<a name="l00085"></a>00085 }
+<a name="l00086"></a>00086
+<a name="l00095"></a>00095 integer <a class="code" href="namespacexint.html#a17c5e4e807cfa425f48d9f5b464bc8dc" title="Calculate the Least Common Multiple of two integers.">lcm</a>(<span class="keyword">const</span> integer&amp; num1, <span class="keyword">const</span> integer&amp; num2) {
+<a name="l00096"></a>00096 <span class="keywordflow">if</span> (num1.sign() == 0 || num2.sign() == 0) <span class="keywordflow">return</span> <a class="code" href="classxint_1_1integer.html#a64a0f99de7c33239237cb59d8464f3d2">integer::zero</a>();
+<a name="l00097"></a>00097 <span class="keywordflow">return</span> <a class="code" href="namespacexint.html#ac9e4ed282bafa93dbf608350df0127ba" title="Returns the absolute value of an integer.">abs</a>(num1 * num2) / <a class="code" href="namespacexint.html#ac9e11516ac502e97be1902cde50f97e7" title="Calculate the Greatest Common Denominator of two integers.">gcd</a>(num1, num2);
+<a name="l00098"></a>00098 }
+<a name="l00099"></a>00099
+<a name="l00113"></a>00113 integer <a class="code" href="namespacexint.html#a4a79f60ebe198eadf10b63924018ce66" title="Get the modular inverse of a number in a modulus, if there is one.">invmod</a>(<span class="keyword">const</span> integer&amp; n, <span class="keyword">const</span> integer&amp; m) {
+<a name="l00114"></a>00114 <span class="comment">// Calculates the modular inverse of n mod m, or (n^(-1)) mod m</span>
+<a name="l00115"></a>00115 <span class="comment">// Defined as b, where n*b corresponds to 1 (mod m)</span>
+<a name="l00116"></a>00116 <span class="keywordflow">if</span> (m &lt; <a class="code" href="classxint_1_1integer.html#a9237b21f4162146c7b5749b169c081b8">integer::one</a>()) {
+<a name="l00117"></a>00117 <span class="keywordflow">if</span> (<a class="code" href="namespacexint.html#ac8be41374700d89400f5ecddf0f789e3" title="Query whether exceptions are currently allowed or blocked.">exceptions_allowed</a>()) <span class="keywordflow">throw</span> invalid_modulus();
+<a name="l00118"></a>00118 <span class="keywordflow">else</span> <span class="keywordflow">return</span> <a class="code" href="classxint_1_1integer.html#a64a0f99de7c33239237cb59d8464f3d2">integer::zero</a>();
+<a name="l00119"></a>00119 }
+<a name="l00120"></a>00120
+<a name="l00121"></a>00121 <span class="keywordtype">int</span> sign=n.sign();
+<a name="l00122"></a>00122 <span class="keywordflow">if</span> (sign==0) {
+<a name="l00123"></a>00123 <span class="keywordflow">return</span> integer(not_a_number());
+<a name="l00124"></a>00124 } <span class="keywordflow">else</span> <span class="keywordflow">if</span> (n.sign() &lt; 0) {
+<a name="l00125"></a>00125 integer _n(n);
+<a name="l00126"></a>00126 _n._set_negative(<span class="keyword">false</span>);
+<a name="l00127"></a>00127
+<a name="l00128"></a>00128 integer nn=<a class="code" href="namespacexint.html#a4a79f60ebe198eadf10b63924018ce66" title="Get the modular inverse of a number in a modulus, if there is one.">invmod</a>(_n, m);
+<a name="l00129"></a>00129 <span class="keywordflow">if</span> (nn.is_nan()) <span class="keywordflow">return</span> nn;
+<a name="l00130"></a>00130
+<a name="l00131"></a>00131 nn._set_negative(<span class="keyword">true</span>);
+<a name="l00132"></a>00132 <span class="keywordflow">return</span> nn + m;
+<a name="l00133"></a>00133 }
+<a name="l00134"></a>00134
+<a name="l00135"></a>00135 <span class="keywordflow">if</span> (n.even() &amp;&amp; m.even()) <span class="keywordflow">return</span> <a class="code" href="classxint_1_1integer.html#a64a0f99de7c33239237cb59d8464f3d2">integer::zero</a>(); <span class="comment">// GCD(x,y)!=1, no inverse possible.</span>
+<a name="l00136"></a>00136
+<a name="l00137"></a>00137 gcd_core core(n, m);
+<a name="l00138"></a>00138
+<a name="l00139"></a>00139 <span class="keywordflow">if</span> (core.u3 != <a class="code" href="classxint_1_1integer.html#a9237b21f4162146c7b5749b169c081b8">integer::one</a>()) <span class="keywordflow">return</span> <a class="code" href="classxint_1_1integer.html#a64a0f99de7c33239237cb59d8464f3d2">integer::zero</a>(); <span class="comment">// GCD(x,y)!=1, no inverse possible.</span>
+<a name="l00140"></a>00140 <span class="keywordflow">return</span> core.u1;
+<a name="l00141"></a>00141 }
+<a name="l00142"></a>00142
+<a name="l00143"></a>00143 } <span class="comment">// namespace xint</span>
+</pre></div></div>
+<hr size="1"/><address style="text-align: right;"><small>Generated on Tue Apr 6 01:22:07 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.1 </small></address>
+</body>
+</html>

Added: sandbox/xint/doc/globals.html
==============================================================================
--- (empty file)
+++ sandbox/xint/doc/globals.html 2010-04-06 01:40:33 EDT (Tue, 06 Apr 2010)
@@ -0,0 +1,61 @@
+<!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 Members</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.1 -->
+<div class="navigation" id="top">
+ <div class="tabs">
+ <ul>
+ <li>Main Page</li>
+ <li>Related Pages</li>
+ <li>Namespaces</li>
+ <li>Classes</li>
+ <li class="current">Files</li>
+ </ul>
+ </div>
+ <div class="tabs">
+ <ul>
+ <li>File List</li>
+ <li class="current">File Members</li>
+ </ul>
+ </div>
+ <div class="tabs">
+ <ul>
+ <li class="current">All</li>
+ <li>Variables</li>
+ <li>Defines</li>
+ </ul>
+ </div>
+</div>
+<div class="contents">
+Here is a list of all file members with links to the files they belong to:<ul>
+<li>ddPowerOfTwo
+: <a class="el" href="monty_8cpp.html#a5e044fcc16f6eb5e891ef312f47209ac">monty.cpp</a>
+</li>
+<li>mOldState
+: <a class="el" href="exception__blocker_8cpp.html#a50f7131c1e1f52ac26fb604e489b0dbe">exception_blocker.cpp</a>
+</li>
+<li>mTable
+: <a class="el" href="monty_8cpp.html#a934de4c9ba95abb023be91f96559097d">monty.cpp</a>
+</li>
+<li>u1
+: <a class="el" href="gcd_8cpp.html#accb7b3088be4aa6fea6fe05dc527f01c">gcd.cpp</a>
+</li>
+<li>u2
+: <a class="el" href="gcd_8cpp.html#a35cdbdce7a7d33309a6cabd35c878b2f">gcd.cpp</a>
+</li>
+<li>u3
+: <a class="el" href="gcd_8cpp.html#a7ac8f5a4ca4a1c621ad1c8ea155faaf2">gcd.cpp</a>
+</li>
+</ul>
+</div>
+<hr size="1"/><address style="text-align: right;"><small>Generated on Tue Apr 6 01:22:08 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.1 </small></address>
+</body>
+</html>

Added: sandbox/xint/doc/globals_defs.html
==============================================================================
--- (empty file)
+++ sandbox/xint/doc/globals_defs.html 2010-04-06 01:40:33 EDT (Tue, 06 Apr 2010)
@@ -0,0 +1,46 @@
+<!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 Members</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.1 -->
+<div class="navigation" id="top">
+ <div class="tabs">
+ <ul>
+ <li>Main Page</li>
+ <li>Related Pages</li>
+ <li>Namespaces</li>
+ <li>Classes</li>
+ <li class="current">Files</li>
+ </ul>
+ </div>
+ <div class="tabs">
+ <ul>
+ <li>File List</li>
+ <li class="current">File Members</li>
+ </ul>
+ </div>
+ <div class="tabs">
+ <ul>
+ <li>All</li>
+ <li>Variables</li>
+ <li class="current">Defines</li>
+ </ul>
+ </div>
+</div>
+<div class="contents">
+&nbsp;<ul>
+<li>ddPowerOfTwo
+: <a class="el" href="monty_8cpp.html#a5e044fcc16f6eb5e891ef312f47209ac">monty.cpp</a>
+</li>
+</ul>
+</div>
+<hr size="1"/><address style="text-align: right;"><small>Generated on Tue Apr 6 01:22:08 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.1 </small></address>
+</body>
+</html>

Added: sandbox/xint/doc/globals_vars.html
==============================================================================
--- (empty file)
+++ sandbox/xint/doc/globals_vars.html 2010-04-06 01:40:33 EDT (Tue, 06 Apr 2010)
@@ -0,0 +1,58 @@
+<!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 Members</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.1 -->
+<div class="navigation" id="top">
+ <div class="tabs">
+ <ul>
+ <li>Main Page</li>
+ <li>Related Pages</li>
+ <li>Namespaces</li>
+ <li>Classes</li>
+ <li class="current">Files</li>
+ </ul>
+ </div>
+ <div class="tabs">
+ <ul>
+ <li>File List</li>
+ <li class="current">File Members</li>
+ </ul>
+ </div>
+ <div class="tabs">
+ <ul>
+ <li>All</li>
+ <li class="current">Variables</li>
+ <li>Defines</li>
+ </ul>
+ </div>
+</div>
+<div class="contents">
+&nbsp;<ul>
+<li>mOldState
+: <a class="el" href="exception__blocker_8cpp.html#a50f7131c1e1f52ac26fb604e489b0dbe">exception_blocker.cpp</a>
+</li>
+<li>mTable
+: <a class="el" href="monty_8cpp.html#a934de4c9ba95abb023be91f96559097d">monty.cpp</a>
+</li>
+<li>u1
+: <a class="el" href="gcd_8cpp.html#accb7b3088be4aa6fea6fe05dc527f01c">gcd.cpp</a>
+</li>
+<li>u2
+: <a class="el" href="gcd_8cpp.html#a35cdbdce7a7d33309a6cabd35c878b2f">gcd.cpp</a>
+</li>
+<li>u3
+: <a class="el" href="gcd_8cpp.html#a7ac8f5a4ca4a1c621ad1c8ea155faaf2">gcd.cpp</a>
+</li>
+</ul>
+</div>
+<hr size="1"/><address style="text-align: right;"><small>Generated on Tue Apr 6 01:22:08 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.1 </small></address>
+</body>
+</html>

Added: sandbox/xint/doc/hierarchy.html
==============================================================================
--- (empty file)
+++ sandbox/xint/doc/hierarchy.html 2010-04-06 01:40:33 EDT (Tue, 06 Apr 2010)
@@ -0,0 +1,55 @@
+<!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: Hierarchical Index</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.1 -->
+<div class="navigation" id="top">
+ <div class="tabs">
+ <ul>
+ <li>Main Page</li>
+ <li>Related Pages</li>
+ <li>Namespaces</li>
+ <li class="current">Classes</li>
+ <li>Files</li>
+ </ul>
+ </div>
+ <div class="tabs">
+ <ul>
+ <li>Class List</li>
+ <li class="current">Class Hierarchy</li>
+ <li>Class Members</li>
+ </ul>
+ </div>
+</div>
+<div class="contents">
+<h1>Class Hierarchy</h1>This inheritance list is sorted roughly, but not completely, alphabetically:<ul>
+<li><a class="el" href="structxint_1_1detail_1_1base__random__generator.html">xint::detail::base_random_generator</a><ul>
+<li><a class="el" href="structxint_1_1detail_1_1random__generator.html">xint::detail::random_generator&lt; T &gt;</a></li>
+</ul>
+</li>
+<li><a class="el" href="classxint_1_1cannot__represent.html">xint::cannot_represent</a></li>
+<li><a class="el" href="structxint_1_1detail_1_1data__t.html">xint::detail::data_t</a></li>
+<li><a class="el" href="classxint_1_1divide__by__zero.html">xint::divide_by_zero</a></li>
+<li><a class="el" href="classxint_1_1integer.html">xint::integer</a></li>
+<li><a class="el" href="classxint_1_1invalid__base.html">xint::invalid_base</a></li>
+<li><a class="el" href="classxint_1_1invalid__digit.html">xint::invalid_digit</a></li>
+<li><a class="el" href="classxint_1_1invalid__modulus.html">xint::invalid_modulus</a></li>
+<li><a class="el" href="classxint_1_1no__strong__random.html">xint::no_strong_random</a></li>
+<li><a class="el" href="classxint_1_1not__a__number.html">xint::not_a_number</a></li>
+<li><a class="el" href="classxint_1_1overflow__error.html">xint::overflow_error</a></li>
+<li><a class="el" href="structxint_1_1detail_1_1data__t_1_1_quick_digits.html">xint::detail::data_t::QuickDigits</a></li>
+<li><a class="el" href="classxint_1_1strong__random__generator.html">xint::strong_random_generator</a></li>
+<li><a class="el" href="structxint_1_1detail_1_1token.html">xint::detail::token</a></li>
+<li><a class="el" href="classxint_1_1too__big.html">xint::too_big</a></li>
+</ul>
+</div>
+<hr size="1"/><address style="text-align: right;"><small>Generated on Tue Apr 6 01:22:08 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.1 </small></address>
+</body>
+</html>

Added: sandbox/xint/doc/history.html
==============================================================================
--- (empty file)
+++ sandbox/xint/doc/history.html 2010-04-06 01:40:33 EDT (Tue, 06 Apr 2010)
@@ -0,0 +1,42 @@
+<!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: Revision History</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.1 -->
+<div class="navigation" id="top">
+ <div class="tabs">
+ <ul>
+ <li>Main Page</li>
+ <li class="current">Related Pages</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="history">Revision History </a></h1><p>This is the third incarnation of my large-integer library. The first was written as a research tool in 1995 and was never released. A second, improved version was used in some of my commercial Windows software. This third one shares only the spirit of the first two; it was designed and written from scratch using all the lessons I learned from writing the first two, as well as all the mathematical knowledge I could gather from various books and the Internet.</p>
+<p>This revision history refers only to this incarnation.</p>
+<p><b>2010-03-26</b> </p>
+<ul>
+<li>First version uploaded to the Boost File Vault for review.</li>
+</ul>
+<p><b>2010-03-30</b> </p>
+<ul>
+<li>Many improvements, primarily from feedback on the first Boost upload. Second version posted to the Boost File Vault. </li>
+</ul>
+</div>
+<hr size="1"/><address style="text-align: right;"><small>Generated on Tue Apr 6 01:22:08 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.1 </small></address>
+</body>
+</html>

Added: sandbox/xint/doc/history_8dox.html
==============================================================================
--- (empty file)
+++ sandbox/xint/doc/history_8dox.html 2010-04-06 01:40:33 EDT (Tue, 06 Apr 2010)
@@ -0,0 +1,36 @@
+<!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/history.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.1 -->
+<div class="navigation" id="top">
+ <div class="tabs">
+ <ul>
+ <li>Main Page</li>
+ <li>Related Pages</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/history.dox File Reference</h1><table border="0" cellpadding="0" cellspacing="0">
+</table>
+</div>
+<hr size="1"/><address style="text-align: right;"><small>Generated on Tue Apr 6 01:22:08 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.1 </small></address>
+</body>
+</html>

Added: sandbox/xint/doc/index.html
==============================================================================
--- (empty file)
+++ sandbox/xint/doc/index.html 2010-04-06 01:40:33 EDT (Tue, 06 Apr 2010)
@@ -0,0 +1,70 @@
+<!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: The Extended Integer (XInt) Library</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.1 -->
+<div class="navigation" id="top">
+ <div class="tabs">
+ <ul>
+ <li class="current">Main Page</li>
+ <li>Related Pages</li>
+ <li>Namespaces</li>
+ <li>Classes</li>
+ <li>Files</li>
+ </ul>
+ </div>
+</div>
+<div class="contents">
+<h1>The Extended Integer (XInt) Library</h1><center>A fast, portable C++ library for multi-precision integer math.</center><center>Copyright 2010 by Chad Nelson</center><h2><a class="anchor" id="what">
+What is it?</a></h2>
+<p>It's a C++ library that lets your program handle much, <em>much</em> larger integer numbers than the built-in <code>int</code>, <code>long</code>, or even <code>long long</code> types, and handle them using the same syntax that C and C++ use for the standard integer types.</p>
+<p>The maximum size of the integer is limited only by the memory available to store it. In practice that's millions of hexadecimal digits, so it's effectively infinite.</p>
+<h2><a class="anchor" id="why">
+Why would I use it?</a></h2>
+<ul>
+<li><b>Because it's completely portable.</b> It's written entirely in modern C++, with many different types of operating system, compiler, and hardware in mind. It will compile cleanly on many operating systems without any changes, automatically adapting to whatever native integer sizes are available. </li>
+<li><b>Because it's fast.</b> Speed of execution takes a back seat to portability, so it doesn't include things like assembly-language modules to wring every last CPU cycle out of it -- but it's still pretty darn fast. </li>
+<li><b>Because it has the features you need.</b> Modular arithmetic. Cryptographically-secure prime number generation. Bit manipulation functions. A friendly and intuitive interface. An option for thread-safe operation. Complete and carefully maintained documentation. What more could you want? </li>
+<li><b>Because it's open-source.</b> You can see exactly how it works. You can never be left high and dry because the company that made it goes out of business, or decides that it's not profitable to maintain it. If you find a bug that isn't fixed fast enough for you, you can fix it yourself, no waiting for someone else to get around to it. </li>
+<li><b>Because it's closed-source-friendly and commercial-friendly.</b> It's licensed under the Boost Software License 1.0 (which you can find at http://www.boost.org/LICENSE_1_0.txt), an OSI-approved open-source license that permits you to use it for pretty much anything you want, and doesn't make any anti-commercial or anti-closed-source demands.</li>
+</ul>
+<h2><a class="anchor" id="how">
+How do I use it?</a></h2>
+<p>That's the best part. If you've installed or compiled the Boost library already, all you need to do is add <code>#include &lt;<a class="el" href="xint_8hpp.html" title="The main header file for the XInt library.">boost/xint/xint.hpp</a>&gt;</code> at the top of your source code file, and declare your variable as type <code>boost::xint::integer</code>. Then just use it the way you'd use any integer. If you need something more advanced, take a look in <a class="el" href="namespacexint.html">the reference section</a> and you just might find it.</p>
+<p>More information on how to use it can be found on the pages listed below.</p>
+<p>Detailed Usage Information:</p>
+<ul>
+<li><a class="el" href="nan.html">The Not-a-Number Value</a></li>
+<li><a class="el" href="primes.html">Generating Prime Numbers</a> (with example code)</li>
+<li><a class="el" href="exceptions.html">Exceptions and Exception-Blocking</a> (with example code)</li>
+<li><a class="el" href="random.html">The XInt Random Number System</a></li>
+</ul>
+<p>Compile-Time Options:</p>
+<ul>
+<li><a class="el" href="securemode.html">Secure Mode</a></li>
+<li><a class="el" href="threadsafe.html">Thread-Safe Operation</a></li>
+</ul>
+<p>Library Information:</p>
+<ul>
+<li><a class="el" href="cow.html">Copying and Argument-Passing</a></li>
+<li><a class="el" href="testing.html">The Self-Testing Program</a></li>
+<li><a class="el" href="dependencies.html">Dependencies</a></li>
+<li><a class="el" href="rationale.html">Rationales</a></li>
+<li><a class="el" href="acknowledgements.html">Acknowledgements</a></li>
+<li><a class="el" href="history.html">Revision History</a></li>
+</ul>
+<p>Stand-Alone Examples:</p>
+<ul>
+<li><a class="el" href="ex_fibonacci.html">Fibonacci Numbers</a> </li>
+</ul>
+</div>
+<hr size="1"/><address style="text-align: right;"><small>Generated on Tue Apr 6 01:22:07 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.1 </small></address>
+</body>
+</html>

Added: sandbox/xint/doc/index_8dox.html
==============================================================================
--- (empty file)
+++ sandbox/xint/doc/index_8dox.html 2010-04-06 01:40:33 EDT (Tue, 06 Apr 2010)
@@ -0,0 +1,36 @@
+<!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/index.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.1 -->
+<div class="navigation" id="top">
+ <div class="tabs">
+ <ul>
+ <li>Main Page</li>
+ <li>Related Pages</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/index.dox File Reference</h1><table border="0" cellpadding="0" cellspacing="0">
+</table>
+</div>
+<hr size="1"/><address style="text-align: right;"><small>Generated on Tue Apr 6 01:22:08 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.1 </small></address>
+</body>
+</html>

Added: sandbox/xint/doc/integer_8cpp.html
==============================================================================
--- (empty file)
+++ sandbox/xint/doc/integer_8cpp.html 2010-04-06 01:40:33 EDT (Tue, 06 Apr 2010)
@@ -0,0 +1,53 @@
+<!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: 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.1 -->
+<div class="navigation" id="top">
+ <div class="tabs">
+ <ul>
+ <li>Main Page</li>
+ <li>Related Pages</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>integer.cpp File Reference</h1>
+<p>Contains the definitions for the <a class="el" href="classxint_1_1integer.html" title="The extended integer class.">xint::integer</a> member functions.
+More...</p>
+<code>#include &quot;../boost/xint/xint.hpp&quot;</code><br/>
+<code>#include &quot;../boost/xint/xint_data_t.hpp&quot;</code><br/>
+
+<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="namespacexint.html">xint</a></td></tr>
+
+<p><tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight"><p>All of the functions in the XInt 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 <a class="el" href="classxint_1_1integer.html" title="The extended integer class.">xint::integer</a> member functions. </p>
+
+<p>Definition in file <a class="el" href="integer_8cpp_source.html">integer.cpp</a>.</p>
+</div>
+<hr size="1"/><address style="text-align: right;"><small>Generated on Tue Apr 6 01:22:08 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.1 </small></address>
+</body>
+</html>

Added: sandbox/xint/doc/integer_8cpp_source.html
==============================================================================
--- (empty file)
+++ sandbox/xint/doc/integer_8cpp_source.html 2010-04-06 01:40:33 EDT (Tue, 06 Apr 2010)
@@ -0,0 +1,266 @@
+<!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: 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.1 -->
+<div class="navigation" id="top">
+ <div class="tabs">
+ <ul>
+ <li>Main Page</li>
+ <li>Related Pages</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>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/xint.hpp&quot;</span>
+<a name="l00019"></a>00019 <span class="preprocessor">#include &quot;../boost/xint/xint_data_t.hpp&quot;</span>
+<a name="l00020"></a>00020
+<a name="l00021"></a>00021 <span class="preprocessor">#ifdef XINT_THREADSAFE</span>
+<a name="l00022"></a>00022 <span class="preprocessor"></span><span class="preprocessor"> #define XINT_DISABLE_COPY_ON_WRITE</span>
+<a name="l00023"></a>00023 <span class="preprocessor"></span><span class="preprocessor">#endif</span>
+<a name="l00024"></a>00024 <span class="preprocessor"></span>
+<a name="l00025"></a>00025 <span class="keyword">namespace </span>xint {
+<a name="l00026"></a>00026
+<a name="l00027"></a>00027 <span class="keyword">namespace </span>{
+<a name="l00028"></a>00028 std::auto_ptr&lt;integer&gt; cZero, cOne;
+<a name="l00029"></a>00029 }
+<a name="l00030"></a>00030
+<a name="l00031"></a>00031 <span class="keyword">const</span> std::string <a class="code" href="namespacexint_1_1detail.html#aede27c67f3308e0805fc3093ffe6f4ce" title="Holds the text representation of the Not-a-Number value.">detail::nan_text</a>(<span class="stringliteral">&quot;#NaN#&quot;</span>);
+<a name="l00032"></a>00032
+<a name="l00034"></a><a class="code" href="classxint_1_1integer.html#ad32b3b13167c61e48aede083a3e1c7a8">00034</a> <a class="code" href="classxint_1_1integer.html#ad32b3b13167c61e48aede083a3e1c7a8" title="Creates a new integer with an initial value of zero.">integer::integer</a>() {
+<a name="l00035"></a>00035 _init();
+<a name="l00036"></a>00036 }
+<a name="l00037"></a>00037
+<a name="l00049"></a><a class="code" href="classxint_1_1integer.html#aa123fb47accd778f87e2866c9d986bb7">00049</a> <a class="code" href="classxint_1_1integer.html#ad32b3b13167c61e48aede083a3e1c7a8" title="Creates a new integer with an initial value of zero.">integer::integer</a>(<span class="keyword">const</span> <a class="code" href="classxint_1_1integer.html" title="The extended integer class.">integer</a>&amp; b) {
+<a name="l00050"></a>00050 <span class="keywordflow">if</span> (b.<a class="code" href="classxint_1_1integer.html#a0bca68386478755dc787f981d9cd5606" title="Tests *this for Not-a-Number.">is_nan</a>()) data=0;
+<a name="l00051"></a>00051 <span class="keywordflow">else</span> _init(b);
+<a name="l00052"></a>00052 }
+<a name="l00053"></a>00053
+<a name="l00074"></a><a class="code" href="classxint_1_1integer.html#a6dfc86dfc539cfda1062ef1bc24aa526">00074</a> <a class="code" href="classxint_1_1integer.html#ad32b3b13167c61e48aede083a3e1c7a8" title="Creates a new integer with an initial value of zero.">integer::integer</a>(<span class="keyword">const</span> std::string&amp; str, <span class="keywordtype">size_t</span> base) {
+<a name="l00075"></a>00075 _init(<a class="code" href="namespacexint.html#ad9dcb2b835be5f8ee918979945911ac0" title="Converts a string into an integer.">from_string</a>(str, base));
+<a name="l00076"></a>00076 }
+<a name="l00077"></a>00077
+<a name="l00090"></a><a class="code" href="classxint_1_1integer.html#a1211c9298c3281815bc9b709439d031a">00090</a> <a class="code" href="classxint_1_1integer.html#ad32b3b13167c61e48aede083a3e1c7a8" title="Creates a new integer with an initial value of zero.">integer::integer</a>(<span class="keyword">const</span> <a class="code" href="classxint_1_1not__a__number.html" title="Exception class.">not_a_number</a>&amp; n) {
+<a name="l00091"></a>00091 data=0;
+<a name="l00092"></a>00092 }
+<a name="l00093"></a>00093
+<a name="l00094"></a><a class="code" href="classxint_1_1integer.html#a4f687cc90353b1c347448f1d94fa157e">00094</a> <a class="code" href="classxint_1_1integer.html#a4f687cc90353b1c347448f1d94fa157e">integer::~integer</a>() {
+<a name="l00095"></a>00095 _detach();
+<a name="l00096"></a>00096 }
+<a name="l00097"></a>00097
+<a name="l00098"></a>00098 <span class="keywordtype">void</span> integer::_init(<a class="code" href="namespacexint_1_1detail.html#a8843fb7e364832d8d5983de28bdbcf34">detail::digit_t</a> init) {
+<a name="l00099"></a>00099 <span class="keywordflow">try</span> {
+<a name="l00100"></a>00100 data=<span class="keyword">new</span> <a class="code" href="structxint_1_1detail_1_1data__t.html" title="Holds the internal details of an xint::integer.">detail::data_t</a>(init);
+<a name="l00101"></a>00101 } <span class="keywordflow">catch</span> (std::bad_alloc&amp;) {
+<a name="l00102"></a>00102 <span class="keywordflow">throw</span> <a class="code" href="classxint_1_1overflow__error.html" title="Exception class.">xint::overflow_error</a>(<span class="stringliteral">&quot;Out of memory allocating xint::integer&quot;</span>);
+<a name="l00103"></a>00103 }
+<a name="l00104"></a>00104 _attach();
+<a name="l00105"></a>00105 }
+<a name="l00106"></a>00106
+<a name="l00107"></a>00107 <span class="keywordtype">void</span> integer::_init(<span class="keyword">const</span> integer &amp;c) {
+<a name="l00108"></a>00108 <span class="preprocessor"> #ifdef XINT_DISABLE_COPY_ON_WRITE</span>
+<a name="l00109"></a>00109 <span class="preprocessor"></span> data=(c.data ? <span class="keyword">new</span> detail::data_t(c.data) : 0);
+<a name="l00110"></a>00110 <span class="preprocessor"> #else</span>
+<a name="l00111"></a>00111 <span class="preprocessor"></span> data=c.data;
+<a name="l00112"></a>00112 <span class="preprocessor"> #endif</span>
+<a name="l00113"></a>00113 <span class="preprocessor"></span> _attach();
+<a name="l00114"></a>00114 }
+<a name="l00115"></a>00115
+<a name="l00116"></a>00116 <span class="keywordtype">void</span> integer::_init(boost::uintmax_t n) {
+<a name="l00117"></a>00117 <span class="keyword">static</span> <span class="keywordtype">int</span> bits=std::numeric_limits&lt;boost::uintmax_t&gt;::digits;
+<a name="l00118"></a>00118 <span class="keyword">static</span> <span class="keywordtype">int</span> maxDigits=(bits+<a class="code" href="namespacexint_1_1detail.html#a9bd9e8d55061238d63913020d2721518">detail::bits_per_digit</a>-1)/<a class="code" href="namespacexint_1_1detail.html#a9bd9e8d55061238d63913020d2721518">detail::bits_per_digit</a>;
+<a name="l00119"></a>00119
+<a name="l00120"></a>00120 <span class="keywordflow">try</span> {
+<a name="l00121"></a>00121 data=<span class="keyword">new</span> detail::data_t;
+<a name="l00122"></a>00122 } <span class="keywordflow">catch</span> (std::bad_alloc&amp;) {
+<a name="l00123"></a>00123 <span class="keywordflow">throw</span> <a class="code" href="classxint_1_1overflow__error.html" title="Exception class.">xint::overflow_error</a>(<span class="stringliteral">&quot;Out of memory allocating xint::integer&quot;</span>);
+<a name="l00124"></a>00124 }
+<a name="l00125"></a>00125 _attach();
+<a name="l00126"></a>00126
+<a name="l00127"></a>00127 data-&gt;alloc(maxDigits);
+<a name="l00128"></a>00128 <span class="keywordflow">for</span> (<span class="keywordtype">int</span> x=0; n != 0; ++x) {
+<a name="l00129"></a>00129 data-&gt;digits[x]=<a class="code" href="namespacexint_1_1detail.html#a8843fb7e364832d8d5983de28bdbcf34">detail::digit_t</a>(n &amp; <a class="code" href="namespacexint_1_1detail.html#a051753e1bf43dcc77eaa93b8d4e49197">detail::digit_mask</a>);
+<a name="l00130"></a>00130 n &gt;&gt;= <a class="code" href="namespacexint_1_1detail.html#a9bd9e8d55061238d63913020d2721518">detail::bits_per_digit</a>;
+<a name="l00131"></a>00131 }
+<a name="l00132"></a>00132 data-&gt;skipLeadingZeros();
+<a name="l00133"></a>00133 }
+<a name="l00134"></a>00134
+<a name="l00135"></a>00135 <span class="keywordtype">void</span> integer::_attach() {
+<a name="l00136"></a>00136 <span class="keywordflow">if</span> (data) data-&gt;attach();
+<a name="l00137"></a>00137 }
+<a name="l00138"></a>00138
+<a name="l00139"></a>00139 <span class="keywordtype">void</span> integer::_detach() {
+<a name="l00140"></a>00140 <span class="keywordflow">if</span> (data &amp;&amp; data-&gt;detach()) <span class="keyword">delete</span> data;
+<a name="l00141"></a>00141 }
+<a name="l00142"></a>00142
+<a name="l00143"></a><a class="code" href="classxint_1_1integer.html#adc5c7b5bc30c0cfa30d62610e0bc0366">00143</a> <span class="keywordtype">void</span> <a class="code" href="classxint_1_1integer.html#adc5c7b5bc30c0cfa30d62610e0bc0366">integer::_make_unique</a>() {
+<a name="l00144"></a>00144 <span class="keywordflow">try</span> {
+<a name="l00145"></a>00145 <span class="keywordflow">if</span> (data &amp;&amp; data-&gt;<a class="code" href="structxint_1_1detail_1_1data__t.html#a73bc854b5f9ced6576b97d2cff8f3a5d">mCopies</a> &gt; 1) {
+<a name="l00146"></a>00146 <a class="code" href="structxint_1_1detail_1_1data__t.html" title="Holds the internal details of an xint::integer.">detail::data_t</a> *newstore=<span class="keyword">new</span> <a class="code" href="structxint_1_1detail_1_1data__t.html" title="Holds the internal details of an xint::integer.">detail::data_t</a>(data);
+<a name="l00147"></a>00147 _detach();
+<a name="l00148"></a>00148 data=newstore;
+<a name="l00149"></a>00149 _attach();
+<a name="l00150"></a>00150 }
+<a name="l00151"></a>00151 } <span class="keywordflow">catch</span> (std::bad_alloc&amp;) {
+<a name="l00152"></a>00152 <span class="keywordflow">throw</span> <a class="code" href="classxint_1_1overflow__error.html" title="Exception class.">xint::overflow_error</a>(<span class="stringliteral">&quot;Out of memory allocating xint::integer&quot;</span>);
+<a name="l00153"></a>00153 }
+<a name="l00154"></a>00154 }
+<a name="l00155"></a>00155
+<a name="l00156"></a><a class="code" href="classxint_1_1integer.html#ab2f4df250e1030c518180b7e832c5ebd">00156</a> <span class="keywordtype">void</span> <a class="code" href="classxint_1_1integer.html#ab2f4df250e1030c518180b7e832c5ebd">integer::_set_negative</a>(<span class="keywordtype">bool</span> negative) {
+<a name="l00157"></a>00157 <span class="keywordflow">if</span> (negative != (<a class="code" href="classxint_1_1integer.html#a5d84398ce89b376f695ccded2d20c8c2" title="Tests the sign of *this.">sign</a>() &lt; 0)) *<span class="keyword">this</span>=<a class="code" href="namespacexint.html#ab393826381b1abd9f1aca1cdb45f41f6" title="Return the additive inverse of an integer.">negate</a>(*<span class="keyword">this</span>);
+<a name="l00158"></a>00158 }
+<a name="l00159"></a>00159
+<a name="l00164"></a><a class="code" href="classxint_1_1integer.html#af2d420708a02755a8851140928e50e23">00164</a> <span class="keywordtype">bool</span> <a class="code" href="classxint_1_1integer.html#af2d420708a02755a8851140928e50e23" title="Tests the lowest bit of *this to determine oddness.">integer::odd</a>()<span class="keyword"> const </span>{
+<a name="l00165"></a>00165 <a class="code" href="classxint_1_1integer.html#ad5935c358b92f15064b1f910613f7a3e">_throw_if_nan</a>();
+<a name="l00166"></a>00166 <span class="keywordflow">return</span> ((<a class="code" href="classxint_1_1integer.html#a81ab47d2f92ec66ac1586b61d7fd8b60">_get_digit</a>(0) &amp; 0x01)==1);
+<a name="l00167"></a>00167 }
+<a name="l00168"></a>00168
+<a name="l00173"></a><a class="code" href="classxint_1_1integer.html#a2ffb63eee276c65d8ea8b365adeb1ee2">00173</a> <span class="keywordtype">bool</span> <a class="code" href="classxint_1_1integer.html#a2ffb63eee276c65d8ea8b365adeb1ee2" title="Tests the lowest bit of *this to determine evenness.">integer::even</a>()<span class="keyword"> const </span>{
+<a name="l00174"></a>00174 <a class="code" href="classxint_1_1integer.html#ad5935c358b92f15064b1f910613f7a3e">_throw_if_nan</a>();
+<a name="l00175"></a>00175 <span class="keywordflow">return</span> ((<a class="code" href="classxint_1_1integer.html#a81ab47d2f92ec66ac1586b61d7fd8b60">_get_digit</a>(0) &amp; 0x01)==0);
+<a name="l00176"></a>00176 }
+<a name="l00177"></a>00177
+<a name="l00183"></a><a class="code" href="classxint_1_1integer.html#a5d84398ce89b376f695ccded2d20c8c2">00183</a> <span class="keywordtype">int</span> <a class="code" href="classxint_1_1integer.html#a5d84398ce89b376f695ccded2d20c8c2" title="Tests the sign of *this.">integer::sign</a>()<span class="keyword"> const </span>{
+<a name="l00184"></a>00184 <a class="code" href="classxint_1_1integer.html#ad5935c358b92f15064b1f910613f7a3e">_throw_if_nan</a>();
+<a name="l00185"></a>00185 <span class="keywordflow">if</span> (data-&gt;<a class="code" href="structxint_1_1detail_1_1data__t.html#afb2d8673fc5d99d2ea006cd0aa32b744">mIsNegative</a>) <span class="keywordflow">return</span> -1;
+<a name="l00186"></a>00186 <span class="keywordflow">if</span> (<a class="code" href="classxint_1_1integer.html#a5723a74b98da2d5ed9452a7ec10c0ca2">_get_length</a>()==1 &amp;&amp; <a class="code" href="classxint_1_1integer.html#a81ab47d2f92ec66ac1586b61d7fd8b60">_get_digit</a>(0)==0) <span class="keywordflow">return</span> 0;
+<a name="l00187"></a>00187 <span class="keywordflow">return</span> 1;
+<a name="l00188"></a>00188 }
+<a name="l00189"></a>00189
+<a name="l00196"></a><a class="code" href="classxint_1_1integer.html#a0bca68386478755dc787f981d9cd5606">00196</a> <span class="keywordtype">bool</span> <a class="code" href="classxint_1_1integer.html#a0bca68386478755dc787f981d9cd5606" title="Tests *this for Not-a-Number.">integer::is_nan</a>()<span class="keyword"> const </span>{
+<a name="l00197"></a>00197 <span class="keywordflow">return</span> (data==0);
+<a name="l00198"></a>00198 }
+<a name="l00199"></a>00199
+<a name="l00205"></a><a class="code" href="classxint_1_1integer.html#a25f066e30e4548bc22e0e9d75b809955">00205</a> <span class="keywordtype">size_t</span> <a class="code" href="classxint_1_1integer.html#a25f066e30e4548bc22e0e9d75b809955" title="Tells you roughly how large an integer is.">integer::hex_digits</a>()<span class="keyword"> const </span>{
+<a name="l00206"></a>00206 <a class="code" href="classxint_1_1integer.html#ad5935c358b92f15064b1f910613f7a3e">_throw_if_nan</a>();
+<a name="l00207"></a>00207 <span class="keywordtype">size_t</span> bits=<a class="code" href="namespacexint.html#aa074495871d366c760c5b0713f5ef048" title="Get the log2 value of an integer.">log2</a>(*<span class="keyword">this</span>);
+<a name="l00208"></a>00208 <span class="keywordflow">return</span> (bits+3)/4; <span class="comment">// Four bits per hex digit, rounded up</span>
+<a name="l00209"></a>00209 }
+<a name="l00210"></a>00210
+<a name="l00211"></a><a class="code" href="classxint_1_1integer.html#aa0259f75f66b97b68310cfed2c0ecc7b">00211</a> <a class="code" href="classxint_1_1integer.html" title="The extended integer class.">integer</a>&amp; <a class="code" href="classxint_1_1integer.html#aa0259f75f66b97b68310cfed2c0ecc7b">integer::operator+=</a>(<span class="keyword">const</span> <a class="code" href="classxint_1_1integer.html" title="The extended integer class.">integer</a>&amp; addend) {
+<a name="l00212"></a>00212 <span class="keywordflow">if</span> ((<a class="code" href="classxint_1_1integer.html#a5d84398ce89b376f695ccded2d20c8c2" title="Tests the sign of *this.">sign</a>() &lt; 0) == (addend.<a class="code" href="classxint_1_1integer.html#a5d84398ce89b376f695ccded2d20c8c2" title="Tests the sign of *this.">sign</a>() &lt; 0)
+<a name="l00213"></a>00213 &amp;&amp; data-&gt;<a class="code" href="structxint_1_1detail_1_1data__t.html#a599933d272e3592b2d0985ca7f7c72e2">mLength</a> &gt;= addend.data-&gt;<a class="code" href="structxint_1_1detail_1_1data__t.html#a599933d272e3592b2d0985ca7f7c72e2">mLength</a>)
+<a name="l00214"></a>00214 {
+<a name="l00215"></a>00215 <span class="comment">// Fast in-place add</span>
+<a name="l00216"></a>00216 <a class="code" href="classxint_1_1integer.html#adc5c7b5bc30c0cfa30d62610e0bc0366">_make_unique</a>();
+<a name="l00217"></a>00217 data-&gt;<a class="code" href="structxint_1_1detail_1_1data__t.html#a143e6814a7aa20a0d61ed616b9940b2e">add</a>(addend.data);
+<a name="l00218"></a>00218 } <span class="keywordflow">else</span> {
+<a name="l00219"></a>00219 <span class="comment">// This works for all cases</span>
+<a name="l00220"></a>00220 *<span class="keyword">this</span>=<a class="code" href="namespacexint.html#a7cc636a05af16eba73014bf88273d163" title="Calculate the sum of two integers.">add</a>(*<span class="keyword">this</span>, addend);
+<a name="l00221"></a>00221 }
+<a name="l00222"></a>00222 <span class="keywordflow">return</span> *<span class="keyword">this</span>;
+<a name="l00223"></a>00223 }
+<a name="l00224"></a>00224
+<a name="l00225"></a><a class="code" href="classxint_1_1integer.html#a2ce7f54adccb88836d1474fc67fa9a62">00225</a> <a class="code" href="classxint_1_1integer.html" title="The extended integer class.">integer</a>&amp; <a class="code" href="classxint_1_1integer.html#a2ce7f54adccb88836d1474fc67fa9a62">integer::operator-=</a>(<span class="keyword">const</span> <a class="code" href="classxint_1_1integer.html" title="The extended integer class.">integer</a>&amp; subtrahend) {
+<a name="l00226"></a>00226 <span class="keywordflow">if</span> (<a class="code" href="classxint_1_1integer.html#a5d84398ce89b376f695ccded2d20c8c2" title="Tests the sign of *this.">sign</a>() &gt;= 0 &amp;&amp; subtrahend.<a class="code" href="classxint_1_1integer.html#a5d84398ce89b376f695ccded2d20c8c2" title="Tests the sign of *this.">sign</a>() &gt;= 0 &amp;&amp; *<span class="keyword">this</span> &gt;= subtrahend) {
+<a name="l00227"></a>00227 <span class="comment">// Fast in-place subtract</span>
+<a name="l00228"></a>00228 <a class="code" href="classxint_1_1integer.html#adc5c7b5bc30c0cfa30d62610e0bc0366">_make_unique</a>();
+<a name="l00229"></a>00229 data-&gt;<a class="code" href="structxint_1_1detail_1_1data__t.html#a650d374b8d38b369273830bb9d939da4">subtract</a>(subtrahend.data);
+<a name="l00230"></a>00230 } <span class="keywordflow">else</span> {
+<a name="l00231"></a>00231 <span class="comment">// This works for all cases</span>
+<a name="l00232"></a>00232 *<span class="keyword">this</span>=<a class="code" href="namespacexint.html#af196cd74cb23970032fddcce71957a80" title="Calculate the difference between two integers.">subtract</a>(*<span class="keyword">this</span>, subtrahend);
+<a name="l00233"></a>00233 }
+<a name="l00234"></a>00234 <span class="keywordflow">return</span> *<span class="keyword">this</span>;
+<a name="l00235"></a>00235 }
+<a name="l00236"></a>00236
+<a name="l00237"></a><a class="code" href="classxint_1_1integer.html#abfa13a313f2782885bbbfa9a5f4a22c2">00237</a> <a class="code" href="classxint_1_1integer.html" title="The extended integer class.">integer</a>&amp; <a class="code" href="classxint_1_1integer.html#abfa13a313f2782885bbbfa9a5f4a22c2">integer::operator=</a>(<span class="keyword">const</span> <a class="code" href="classxint_1_1integer.html" title="The extended integer class.">integer</a> &amp;c) {
+<a name="l00238"></a>00238 _detach();
+<a name="l00239"></a>00239 <span class="preprocessor"> #ifdef XINT_DISABLE_COPY_ON_WRITE</span>
+<a name="l00240"></a>00240 <span class="preprocessor"></span> data=(c.data ? <span class="keyword">new</span> <a class="code" href="structxint_1_1detail_1_1data__t.html" title="Holds the internal details of an xint::integer.">detail::data_t</a>(c.data) : 0);
+<a name="l00241"></a>00241 <span class="preprocessor"> #else</span>
+<a name="l00242"></a>00242 <span class="preprocessor"></span> data=c.data;
+<a name="l00243"></a>00243 <span class="preprocessor"> #endif</span>
+<a name="l00244"></a>00244 <span class="preprocessor"></span> _attach();
+<a name="l00245"></a>00245 <span class="keywordflow">return</span> *<span class="keyword">this</span>;
+<a name="l00246"></a>00246 }
+<a name="l00247"></a>00247
+<a name="l00248"></a><a class="code" href="classxint_1_1integer.html#a531cdc9ce5667c4553fd1e4dac151b51">00248</a> <a class="code" href="classxint_1_1integer.html" title="The extended integer class.">integer</a>&amp; <a class="code" href="classxint_1_1integer.html#a531cdc9ce5667c4553fd1e4dac151b51">integer::operator*=</a>(<span class="keyword">const</span> <a class="code" href="classxint_1_1integer.html" title="The extended integer class.">integer</a>&amp; b) { *<span class="keyword">this</span>=<a class="code" href="namespacexint.html#af3d7059ec08bf075cec5685deca55c5d" title="Calculate the product of two integers.">multiply</a>(*<span class="keyword">this</span>, b); <span class="keywordflow">return</span> *<span class="keyword">this</span>; }
+<a name="l00249"></a><a class="code" href="classxint_1_1integer.html#a3366a33f7ca5ad3285515e260d0dce66">00249</a> <a class="code" href="classxint_1_1integer.html" title="The extended integer class.">integer</a>&amp; <a class="code" href="classxint_1_1integer.html#a3366a33f7ca5ad3285515e260d0dce66">integer::operator/=</a>(<span class="keyword">const</span> <a class="code" href="classxint_1_1integer.html" title="The extended integer class.">integer</a>&amp; b) { *<span class="keyword">this</span>=<a class="code" href="namespacexint.html#abf3d47f1ef1fdf334097fab055886a44" title="Calculate how many dividends would fit into divisor.">divide</a>(*<span class="keyword">this</span>, b); <span class="keywordflow">return</span> *<span class="keyword">this</span>; }
+<a name="l00250"></a><a class="code" href="classxint_1_1integer.html#abee8874a961c2bb15a288494e096f36b">00250</a> <a class="code" href="classxint_1_1integer.html" title="The extended integer class.">integer</a>&amp; <a class="code" href="classxint_1_1integer.html#abee8874a961c2bb15a288494e096f36b">integer::operator%=</a>(<span class="keyword">const</span> <a class="code" href="classxint_1_1integer.html" title="The extended integer class.">integer</a>&amp; b) { *<span class="keyword">this</span>=<a class="code" href="namespacexint.html#ad5a8cc6e57ee8abdc21be98275657cc8" title="Get the remainder after dividing a number by another.">mod</a>(*<span class="keyword">this</span>, b); <span class="keywordflow">return</span> *<span class="keyword">this</span>; }
+<a name="l00251"></a>00251
+<a name="l00252"></a><a class="code" href="classxint_1_1integer.html#a60cd241278892070d14a0d57e45c9264">00252</a> <a class="code" href="classxint_1_1integer.html" title="The extended integer class.">integer</a>&amp; <a class="code" href="classxint_1_1integer.html#a60cd241278892070d14a0d57e45c9264">integer::operator++</a>() { *<span class="keyword">this</span> += <a class="code" href="classxint_1_1integer.html#a9237b21f4162146c7b5749b169c081b8">one</a>(); <span class="keywordflow">return</span> *<span class="keyword">this</span>; }
+<a name="l00253"></a><a class="code" href="classxint_1_1integer.html#a48452b868e2279e202039c9918f0dcf3">00253</a> <a class="code" href="classxint_1_1integer.html" title="The extended integer class.">integer</a>&amp; <a class="code" href="classxint_1_1integer.html#a48452b868e2279e202039c9918f0dcf3">integer::operator--</a>() { *<span class="keyword">this</span> -= <a class="code" href="classxint_1_1integer.html#a9237b21f4162146c7b5749b169c081b8">one</a>(); <span class="keywordflow">return</span> *<span class="keyword">this</span>; }
+<a name="l00254"></a><a class="code" href="classxint_1_1integer.html#a79624fb580bdb2ba19fe13223c801c25">00254</a> <a class="code" href="classxint_1_1integer.html" title="The extended integer class.">integer</a> <a class="code" href="classxint_1_1integer.html#a60cd241278892070d14a0d57e45c9264">integer::operator++</a>(<span class="keywordtype">int</span>) { <a class="code" href="classxint_1_1integer.html" title="The extended integer class.">integer</a> s=*<span class="keyword">this</span>; *<span class="keyword">this</span> += <a class="code" href="classxint_1_1integer.html#a9237b21f4162146c7b5749b169c081b8">one</a>(); <span class="keywordflow">return</span> s; }
+<a name="l00255"></a><a class="code" href="classxint_1_1integer.html#a40ff1ffeda1df544b8bcd907f76d93cd">00255</a> <a class="code" href="classxint_1_1integer.html" title="The extended integer class.">integer</a> <a class="code" href="classxint_1_1integer.html#a48452b868e2279e202039c9918f0dcf3">integer::operator--</a>(<span class="keywordtype">int</span>) { <a class="code" href="classxint_1_1integer.html" title="The extended integer class.">integer</a> s=*<span class="keyword">this</span>; *<span class="keyword">this</span> -= <a class="code" href="classxint_1_1integer.html#a9237b21f4162146c7b5749b169c081b8">one</a>(); <span class="keywordflow">return</span> s; }
+<a name="l00256"></a>00256
+<a name="l00257"></a><a class="code" href="classxint_1_1integer.html#a3733741d7e1c8ba1c1f490c8949a308f">00257</a> <a class="code" href="classxint_1_1integer.html" title="The extended integer class.">integer</a> <a class="code" href="classxint_1_1integer.html#a3733741d7e1c8ba1c1f490c8949a308f">integer::operator&lt;&lt;</a>(<span class="keywordtype">size_t</span> <a class="code" href="namespacexint.html#a4f4dacd6f9398aaa500112731ab713ce" title="Bit-shift an integer, in either direction.">shift</a>)<span class="keyword"> const </span>{ <span class="keywordflow">return</span> <a class="code" href="namespacexint.html#a6799cc3c4d8c963279be64b209bfd3b6" title="Left-shift an integer by a specified number of bits.">shift_left</a>(*<span class="keyword">this</span>, shift); }
+<a name="l00258"></a><a class="code" href="classxint_1_1integer.html#a5cbc6986de4ca89b49162736f8750986">00258</a> <a class="code" href="classxint_1_1integer.html" title="The extended integer class.">integer</a> <a class="code" href="classxint_1_1integer.html#a5cbc6986de4ca89b49162736f8750986">integer::operator&gt;&gt;</a>(<span class="keywordtype">size_t</span> <a class="code" href="namespacexint.html#a4f4dacd6f9398aaa500112731ab713ce" title="Bit-shift an integer, in either direction.">shift</a>)<span class="keyword"> const </span>{ <span class="keywordflow">return</span> <a class="code" href="namespacexint.html#a49a5a4220cb88b7446545e4b65950473" title="Right-shift an integer by a specified number of bits.">shift_right</a>(*<span class="keyword">this</span>, shift); }
+<a name="l00259"></a><a class="code" href="classxint_1_1integer.html#a0d4c730e3d45d3fa2895b706b202d860">00259</a> <a class="code" href="classxint_1_1integer.html" title="The extended integer class.">integer</a>&amp; <a class="code" href="classxint_1_1integer.html#a0d4c730e3d45d3fa2895b706b202d860">integer::operator&amp;=</a>(<span class="keyword">const</span> <a class="code" href="classxint_1_1integer.html" title="The extended integer class.">integer</a>&amp; n) { *<span class="keyword">this</span>=<a class="code" href="namespacexint.html#a06138585f07fe098e24718c46e3078e1" title="Combine two integers using a bitwise AND operation.">bitwise_and</a>(*<span class="keyword">this</span>, n); <span class="keywordflow">return</span> *<span class="keyword">this</span>; }
+<a name="l00260"></a><a class="code" href="classxint_1_1integer.html#a1af418341e64a317b4cc41fcddaa849f">00260</a> <a class="code" href="classxint_1_1integer.html" title="The extended integer class.">integer</a>&amp; <a class="code" href="classxint_1_1integer.html#a1af418341e64a317b4cc41fcddaa849f">integer::operator|=</a>(<span class="keyword">const</span> <a class="code" href="classxint_1_1integer.html" title="The extended integer class.">integer</a>&amp; n) { *<span class="keyword">this</span>=<a class="code" href="namespacexint.html#a8cd0a0dbc779e5a75c9e2f8027474e9a" title="Combine two integers using a bitwise OR operation.">bitwise_or</a>(*<span class="keyword">this</span>, n); <span class="keywordflow">return</span> *<span class="keyword">this</span>; }
+<a name="l00261"></a><a class="code" href="classxint_1_1integer.html#afc13b5ae9c6f28ef5e75777976aeb56d">00261</a> <a class="code" href="classxint_1_1integer.html" title="The extended integer class.">integer</a>&amp; <a class="code" href="classxint_1_1integer.html#afc13b5ae9c6f28ef5e75777976aeb56d">integer::operator^=</a>(<span class="keyword">const</span> <a class="code" href="classxint_1_1integer.html" title="The extended integer class.">integer</a>&amp; n) { *<span class="keyword">this</span>=<a class="code" href="namespacexint.html#a9ffe18a09f5dd354af7b967b032d3cbe" title="Combine two integers using a bitwise XOR operation.">bitwise_xor</a>(*<span class="keyword">this</span>, n); <span class="keywordflow">return</span> *<span class="keyword">this</span>; }
+<a name="l00262"></a>00262
+<a name="l00263"></a><a class="code" href="classxint_1_1integer.html#a14545146f86ed797e97758d8aea32ecd">00263</a> <a class="code" href="classxint_1_1integer.html" title="The extended integer class.">integer</a>&amp; <a class="code" href="classxint_1_1integer.html#a14545146f86ed797e97758d8aea32ecd">integer::operator&lt;&lt;=</a>(<span class="keywordtype">size_t</span> <a class="code" href="namespacexint.html#a4f4dacd6f9398aaa500112731ab713ce" title="Bit-shift an integer, in either direction.">shift</a>) {
+<a name="l00264"></a>00264 <span class="keywordflow">if</span> (shift&gt;0) {
+<a name="l00265"></a>00265 <a class="code" href="classxint_1_1integer.html#adc5c7b5bc30c0cfa30d62610e0bc0366">_make_unique</a>();
+<a name="l00266"></a>00266 data-&gt;<a class="code" href="structxint_1_1detail_1_1data__t.html#a72785130c7c6490af874f450cf6e0086">shift_left</a>(shift);
+<a name="l00267"></a>00267 }
+<a name="l00268"></a>00268 <span class="keywordflow">return</span> *<span class="keyword">this</span>;
+<a name="l00269"></a>00269 }
+<a name="l00270"></a>00270
+<a name="l00271"></a><a class="code" href="classxint_1_1integer.html#aa0151e58a97bc1801221907d68582ec2">00271</a> <a class="code" href="classxint_1_1integer.html" title="The extended integer class.">integer</a>&amp; <a class="code" href="classxint_1_1integer.html#aa0151e58a97bc1801221907d68582ec2">integer::operator&gt;&gt;=</a>(<span class="keywordtype">size_t</span> <a class="code" href="namespacexint.html#a4f4dacd6f9398aaa500112731ab713ce" title="Bit-shift an integer, in either direction.">shift</a>) {
+<a name="l00272"></a>00272 <span class="keywordflow">if</span> (shift&gt;0) {
+<a name="l00273"></a>00273 <a class="code" href="classxint_1_1integer.html#adc5c7b5bc30c0cfa30d62610e0bc0366">_make_unique</a>();
+<a name="l00274"></a>00274 data-&gt;<a class="code" href="structxint_1_1detail_1_1data__t.html#a432ace7094bca306dcba254f862e2428">shift_right</a>(shift);
+<a name="l00275"></a>00275 }
+<a name="l00276"></a>00276 <span class="keywordflow">return</span> *<span class="keyword">this</span>;
+<a name="l00277"></a>00277 }
+<a name="l00278"></a>00278
+<a name="l00279"></a><a class="code" href="classxint_1_1integer.html#a64a0f99de7c33239237cb59d8464f3d2">00279</a> <span class="keyword">const</span> <a class="code" href="classxint_1_1integer.html" title="The extended integer class.">integer</a>&amp; <a class="code" href="classxint_1_1integer.html#a64a0f99de7c33239237cb59d8464f3d2">integer::zero</a>() {
+<a name="l00280"></a>00280 <span class="keywordflow">if</span> (cZero.get()==0) cZero.reset(<span class="keyword">new</span> <a class="code" href="classxint_1_1integer.html" title="The extended integer class.">integer</a>(0));
+<a name="l00281"></a>00281 <span class="keywordflow">return</span> *cZero;
+<a name="l00282"></a>00282 }
+<a name="l00283"></a>00283
+<a name="l00284"></a><a class="code" href="classxint_1_1integer.html#a9237b21f4162146c7b5749b169c081b8">00284</a> <span class="keyword">const</span> <a class="code" href="classxint_1_1integer.html" title="The extended integer class.">integer</a>&amp; <a class="code" href="classxint_1_1integer.html#a9237b21f4162146c7b5749b169c081b8">integer::one</a>() {
+<a name="l00285"></a>00285 <span class="keywordflow">if</span> (cOne.get()==0) cOne.reset(<span class="keyword">new</span> <a class="code" href="classxint_1_1integer.html" title="The extended integer class.">integer</a>(1));
+<a name="l00286"></a>00286 <span class="keywordflow">return</span> *cOne;
+<a name="l00287"></a>00287 }
+<a name="l00288"></a>00288
+<a name="l00289"></a><a class="code" href="classxint_1_1integer.html#a81ab47d2f92ec66ac1586b61d7fd8b60">00289</a> <a class="code" href="namespacexint_1_1detail.html#a8843fb7e364832d8d5983de28bdbcf34">detail::digit_t</a> <a class="code" href="classxint_1_1integer.html#a81ab47d2f92ec66ac1586b61d7fd8b60">integer::_get_digit</a>(<span class="keywordtype">size_t</span> index)<span class="keyword"> const </span>{
+<a name="l00290"></a>00290 <span class="keywordflow">return</span> data-&gt;<a class="code" href="structxint_1_1detail_1_1data__t.html#a5c9382aec147090d7e7e2b5e972402a9">digits</a>[index];
+<a name="l00291"></a>00291 }
+<a name="l00292"></a>00292
+<a name="l00293"></a><a class="code" href="classxint_1_1integer.html#a33fe6f16dfba7b076f04a5ea40d8dccb">00293</a> <a class="code" href="namespacexint_1_1detail.html#a8843fb7e364832d8d5983de28bdbcf34">detail::digit_t</a> <a class="code" href="classxint_1_1integer.html#a81ab47d2f92ec66ac1586b61d7fd8b60">integer::_get_digit</a>(<span class="keywordtype">size_t</span> index, <span class="keywordtype">bool</span>)<span class="keyword"> const </span>{
+<a name="l00294"></a>00294 <span class="keywordflow">if</span> (index &gt;= data-&gt;<a class="code" href="structxint_1_1detail_1_1data__t.html#a599933d272e3592b2d0985ca7f7c72e2">mLength</a>) <span class="keywordflow">return</span> 0;
+<a name="l00295"></a>00295 <span class="keywordflow">return</span> data-&gt;<a class="code" href="structxint_1_1detail_1_1data__t.html#a5c9382aec147090d7e7e2b5e972402a9">digits</a>[index];
+<a name="l00296"></a>00296 }
+<a name="l00297"></a>00297
+<a name="l00298"></a><a class="code" href="classxint_1_1integer.html#a5723a74b98da2d5ed9452a7ec10c0ca2">00298</a> <span class="keywordtype">size_t</span> <a class="code" href="classxint_1_1integer.html#a5723a74b98da2d5ed9452a7ec10c0ca2">integer::_get_length</a>()<span class="keyword"> const </span>{
+<a name="l00299"></a>00299 <span class="keywordflow">return</span> data-&gt;<a class="code" href="structxint_1_1detail_1_1data__t.html#a599933d272e3592b2d0985ca7f7c72e2">mLength</a>;
+<a name="l00300"></a>00300 }
+<a name="l00301"></a>00301
+<a name="l00302"></a><a class="code" href="classxint_1_1integer.html#ad5935c358b92f15064b1f910613f7a3e">00302</a> <span class="keywordtype">void</span> <a class="code" href="classxint_1_1integer.html#ad5935c358b92f15064b1f910613f7a3e">integer::_throw_if_nan</a>()<span class="keyword"> const </span>{
+<a name="l00303"></a>00303 <span class="keywordflow">if</span> (<a class="code" href="classxint_1_1integer.html#a0bca68386478755dc787f981d9cd5606" title="Tests *this for Not-a-Number.">is_nan</a>()) <span class="keywordflow">throw</span> <a class="code" href="classxint_1_1not__a__number.html" title="Exception class.">not_a_number</a>();
+<a name="l00304"></a>00304 }
+<a name="l00305"></a>00305
+<a name="l00306"></a>00306 } <span class="comment">// namespace xint</span>
+</pre></div></div>
+<hr size="1"/><address style="text-align: right;"><small>Generated on Tue Apr 6 01:22:07 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.1 </small></address>
+</body>
+</html>

Added: sandbox/xint/doc/misc_8cpp.html
==============================================================================
--- (empty file)
+++ sandbox/xint/doc/misc_8cpp.html 2010-04-06 01:40:33 EDT (Tue, 06 Apr 2010)
@@ -0,0 +1,62 @@
+<!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: misc.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.1 -->
+<div class="navigation" id="top">
+ <div class="tabs">
+ <ul>
+ <li>Main Page</li>
+ <li>Related Pages</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>misc.cpp File Reference</h1>
+<p>Functions that don't fall into any other category.
+More...</p>
+<code>#include &quot;../boost/xint/xint.hpp&quot;</code><br/>
+
+<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="namespacexint.html">xint</a></td></tr>
+
+<p><tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight"><p>All of the functions in the XInt 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">Miscellaneous functions</div></td></tr>
+<tr><td colspan="2"><div class="groupText"><p><a class="anchor" id="amgrp458f92801f3edfaf2e30b1f530c324e2"></a> </p>
+<br/><br/></div></td></tr>
+<tr><td class="memItemLeft" align="right" valign="top">bool&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespacexint.html#a820d89c1d761a0a2c06479b1c1f9cecd">xint::opt_secure_mode</a> ()</td></tr>
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Tells whether the library was compiled with <a class="el" href="securemode.html">Secure Mode </a> enabled. <br/></td></tr>
+<tr><td class="memItemLeft" align="right" valign="top">bool&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespacexint.html#ad55aa4d44083238d9ec313511f5b1dfa">xint::opt_thread_safe</a> ()</td></tr>
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Tells whether the library was compiled with the <a class="el" href="threadsafe.html">Thread Safe Operation option </a> enabled. <br/></td></tr>
+<tr><td class="memItemLeft" align="right" valign="top">size_t&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespacexint.html#aa074495871d366c760c5b0713f5ef048">xint::log2</a> (const integer &amp;n)</td></tr>
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Get the log<sub>2</sub> value of an <a class="el" href="classxint_1_1integer.html" title="The extended integer class.">integer</a>. <br/></td></tr>
+</table>
+<hr/><a name="_details"></a><h2>Detailed Description</h2>
+<p>Functions that don't fall into any other category. </p>
+
+<p>Definition in file <a class="el" href="misc_8cpp_source.html">misc.cpp</a>.</p>
+</div>
+<hr size="1"/><address style="text-align: right;"><small>Generated on Tue Apr 6 01:22:08 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.1 </small></address>
+</body>
+</html>

Added: sandbox/xint/doc/misc_8cpp_source.html
==============================================================================
--- (empty file)
+++ sandbox/xint/doc/misc_8cpp_source.html 2010-04-06 01:40:33 EDT (Tue, 06 Apr 2010)
@@ -0,0 +1,79 @@
+<!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: misc.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.1 -->
+<div class="navigation" id="top">
+ <div class="tabs">
+ <ul>
+ <li>Main Page</li>
+ <li>Related Pages</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>misc.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/xint.hpp&quot;</span>
+<a name="l00019"></a>00019
+<a name="l00020"></a>00020 <span class="keyword">namespace </span>xint {
+<a name="l00021"></a>00021
+<a name="l00027"></a>00027 <span class="keywordtype">bool</span> <a class="code" href="namespacexint.html#a820d89c1d761a0a2c06479b1c1f9cecd" title="Tells whether the library was compiled with Secure Mode enabled.">opt_secure_mode</a>() {
+<a name="l00028"></a>00028 <span class="preprocessor"> #ifdef XINT_SECURE</span>
+<a name="l00029"></a>00029 <span class="preprocessor"></span> <span class="keywordflow">return</span> <span class="keyword">true</span>;
+<a name="l00030"></a>00030 <span class="preprocessor"> #else</span>
+<a name="l00031"></a>00031 <span class="preprocessor"></span> <span class="keywordflow">return</span> <span class="keyword">false</span>;
+<a name="l00032"></a>00032 <span class="preprocessor"> #endif</span>
+<a name="l00033"></a>00033 <span class="preprocessor"></span>}
+<a name="l00034"></a>00034
+<a name="l00041"></a>00041 <span class="keywordtype">bool</span> <a class="code" href="namespacexint.html#ad55aa4d44083238d9ec313511f5b1dfa" title="Tells whether the library was compiled with the Thread Safe Operation option enabled...">opt_thread_safe</a>() {
+<a name="l00042"></a>00042 <span class="preprocessor"> #ifdef XINT_THREADSAFE</span>
+<a name="l00043"></a>00043 <span class="preprocessor"></span> <span class="keywordflow">return</span> <span class="keyword">true</span>;
+<a name="l00044"></a>00044 <span class="preprocessor"> #else</span>
+<a name="l00045"></a>00045 <span class="preprocessor"></span> <span class="keywordflow">return</span> <span class="keyword">false</span>;
+<a name="l00046"></a>00046 <span class="preprocessor"> #endif</span>
+<a name="l00047"></a>00047 <span class="preprocessor"></span>}
+<a name="l00048"></a>00048
+<a name="l00062"></a>00062 <span class="keywordtype">size_t</span> <a class="code" href="namespacexint.html#aa074495871d366c760c5b0713f5ef048" title="Get the log2 value of an integer.">log2</a>(<span class="keyword">const</span> integer&amp; n) {
+<a name="l00063"></a>00063 n._throw_if_nan();
+<a name="l00064"></a>00064
+<a name="l00065"></a>00065 <span class="keywordtype">size_t</span> r=<a class="code" href="namespacexint_1_1detail.html#a9bd9e8d55061238d63913020d2721518">detail::bits_per_digit</a> * n._get_length();
+<a name="l00066"></a>00066 <a class="code" href="namespacexint_1_1detail.html#a8843fb7e364832d8d5983de28bdbcf34">detail::digit_t</a> mask=<a class="code" href="namespacexint_1_1detail.html#a116bb5ce94c55f0eae3338d69fd5e8eb">detail::digit_hibit</a>, d=n._get_digit(n._get_length()-1);
+<a name="l00067"></a>00067 <span class="keywordflow">while</span> (mask!=0) {
+<a name="l00068"></a>00068 <span class="keywordflow">if</span> ((mask &amp; d)!=0) <span class="keywordflow">break</span>;
+<a name="l00069"></a>00069 mask&gt;&gt;=1;
+<a name="l00070"></a>00070 --r;
+<a name="l00071"></a>00071 }
+<a name="l00072"></a>00072 <span class="keywordflow">return</span> r;
+<a name="l00073"></a>00073 }
+<a name="l00074"></a>00074
+<a name="l00075"></a>00075 } <span class="comment">// namespace xint</span>
+</pre></div></div>
+<hr size="1"/><address style="text-align: right;"><small>Generated on Tue Apr 6 01:22:07 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.1 </small></address>
+</body>
+</html>

Added: sandbox/xint/doc/modular_8cpp.html
==============================================================================
--- (empty file)
+++ sandbox/xint/doc/modular_8cpp.html 2010-04-06 01:40:33 EDT (Tue, 06 Apr 2010)
@@ -0,0 +1,66 @@
+<!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: modular.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.1 -->
+<div class="navigation" id="top">
+ <div class="tabs">
+ <ul>
+ <li>Main Page</li>
+ <li>Related Pages</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>modular.cpp File Reference</h1>
+<p>Contains the definitions for the basic modular math functions.
+More...</p>
+<code>#include &quot;../boost/xint/xint.hpp&quot;</code><br/>
+<code>#include &quot;../boost/xint/xint_monty.hpp&quot;</code><br/>
+
+<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="namespacexint.html">xint</a></td></tr>
+
+<p><tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight"><p>All of the functions in the XInt 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">Modular math functions</div></td></tr>
+<tr><td colspan="2"><div class="groupText"><p><a class="anchor" id="amgrpbf63e6a6a1029bb25b7aa51052b38655"></a>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. </p>
+<br/><br/></div></td></tr>
+<tr><td class="memItemLeft" align="right" valign="top">integer&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespacexint.html#ad5a8cc6e57ee8abdc21be98275657cc8">xint::mod</a> (const integer &amp;n, const integer &amp;m)</td></tr>
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Get the remainder after dividing a number by another. <br/></td></tr>
+<tr><td class="memItemLeft" align="right" valign="top">integer&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespacexint.html#adbbde6cc4b65e9a3df8c52adad9c540f">xint::mulmod</a> (const integer &amp;n, const integer &amp;by, const integer &amp;m)</td></tr>
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Get the modular product of two integers. <br/></td></tr>
+<tr><td class="memItemLeft" align="right" valign="top">integer&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespacexint.html#aa5564979e78556afdc68dbbd744a0bcb">xint::sqrmod</a> (const integer &amp;n, const integer &amp;m)</td></tr>
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Get the modular product of squaring an <a class="el" href="classxint_1_1integer.html" title="The extended integer class.">integer</a>. <br/></td></tr>
+<tr><td class="memItemLeft" align="right" valign="top">integer&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespacexint.html#ac54e9be3a8b131f882f88e57b0ef1c9c">xint::powmod</a> (const integer &amp;n, const integer &amp;e, const integer &amp;m, bool noMontgomery)</td></tr>
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Get the result of <code>n<sup>e</sup></code> % <code>m</code>, keeping the intermediate results (relatively) small. <br/></td></tr>
+</table>
+<hr/><a name="_details"></a><h2>Detailed Description</h2>
+<p>Contains the definitions for the basic modular math functions. </p>
+<p>The <a class="el" href="namespacexint.html#a4a79f60ebe198eadf10b63924018ce66" title="Get the modular inverse of a number in a modulus, if there is one.">xint::invmod</a> function, which logically would be here, is actually in <a class="el" href="gcd_8cpp.html" title="Greatest Common Denominator and Least Common Multple.">gcd.cpp</a> to share the gcd_core function. </p>
+
+<p>Definition in file <a class="el" href="modular_8cpp_source.html">modular.cpp</a>.</p>
+</div>
+<hr size="1"/><address style="text-align: right;"><small>Generated on Tue Apr 6 01:22:08 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.1 </small></address>
+</body>
+</html>

Added: sandbox/xint/doc/modular_8cpp_source.html
==============================================================================
--- (empty file)
+++ sandbox/xint/doc/modular_8cpp_source.html 2010-04-06 01:40:33 EDT (Tue, 06 Apr 2010)
@@ -0,0 +1,106 @@
+<!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: modular.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.1 -->
+<div class="navigation" id="top">
+ <div class="tabs">
+ <ul>
+ <li>Main Page</li>
+ <li>Related Pages</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>modular.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="l00021"></a>00021 <span class="preprocessor">#include &quot;../boost/xint/xint.hpp&quot;</span>
+<a name="l00022"></a>00022 <span class="preprocessor">#include &quot;../boost/xint/xint_monty.hpp&quot;</span>
+<a name="l00023"></a>00023
+<a name="l00024"></a>00024 <span class="keyword">namespace </span>xint {
+<a name="l00025"></a>00025
+<a name="l00033"></a>00033 integer <a class="code" href="namespacexint.html#ad5a8cc6e57ee8abdc21be98275657cc8" title="Get the remainder after dividing a number by another.">mod</a>(<span class="keyword">const</span> integer&amp; n, <span class="keyword">const</span> integer&amp; m) {
+<a name="l00034"></a>00034 integer r=<a class="code" href="namespacexint.html#a23d0a0bb05cec1917d96d6aaceeb875d" title="Calculate how many dividends would fit into divisor, with the remainder.">divide_r</a>(n, m).second;
+<a name="l00035"></a>00035 <span class="keywordflow">if</span> (r.sign() &lt; 0) r+=<a class="code" href="namespacexint.html#ac9e4ed282bafa93dbf608350df0127ba" title="Returns the absolute value of an integer.">abs</a>(m);
+<a name="l00036"></a>00036 <span class="keywordflow">return</span> r;
+<a name="l00037"></a>00037 }
+<a name="l00038"></a>00038
+<a name="l00051"></a>00051 integer <a class="code" href="namespacexint.html#adbbde6cc4b65e9a3df8c52adad9c540f" title="Get the modular product of two integers.">mulmod</a>(<span class="keyword">const</span> integer&amp; n, <span class="keyword">const</span> integer&amp; by, <span class="keyword">const</span> integer&amp; m) {
+<a name="l00052"></a>00052 <span class="keywordflow">return</span> <a class="code" href="namespacexint.html#ad5a8cc6e57ee8abdc21be98275657cc8" title="Get the remainder after dividing a number by another.">mod</a>(n * by, m);
+<a name="l00053"></a>00053 }
+<a name="l00054"></a>00054
+<a name="l00067"></a>00067 integer <a class="code" href="namespacexint.html#aa5564979e78556afdc68dbbd744a0bcb" title="Get the modular product of squaring an integer.">sqrmod</a>(<span class="keyword">const</span> integer&amp; n, <span class="keyword">const</span> integer&amp; m) {
+<a name="l00068"></a>00068 <span class="keywordflow">return</span> <a class="code" href="namespacexint.html#ad5a8cc6e57ee8abdc21be98275657cc8" title="Get the remainder after dividing a number by another.">mod</a>(<a class="code" href="namespacexint.html#a0aec423511839fd784b1654389dfcf5b" title="Calculate the value of n2.">sqr</a>(n), m);
+<a name="l00069"></a>00069 }
+<a name="l00070"></a>00070
+<a name="l00092"></a>00092 integer <a class="code" href="namespacexint.html#ac54e9be3a8b131f882f88e57b0ef1c9c" title="Get the result of ne % m, keeping the intermediate results (relatively) small.">powmod</a>(<span class="keyword">const</span> integer&amp; n, <span class="keyword">const</span> integer&amp; e, <span class="keyword">const</span> integer&amp; m, <span class="keywordtype">bool</span>
+<a name="l00093"></a>00093 noMontgomery)
+<a name="l00094"></a>00094 {
+<a name="l00095"></a>00095 <span class="keywordflow">if</span> (m &lt; <a class="code" href="classxint_1_1integer.html#a9237b21f4162146c7b5749b169c081b8">integer::one</a>()) {
+<a name="l00096"></a>00096 <span class="keywordflow">if</span> (<a class="code" href="namespacexint.html#ac8be41374700d89400f5ecddf0f789e3" title="Query whether exceptions are currently allowed or blocked.">exceptions_allowed</a>()) <span class="keywordflow">throw</span> invalid_modulus();
+<a name="l00097"></a>00097 <span class="keywordflow">else</span> <span class="keywordflow">return</span> integer(not_a_number());
+<a name="l00098"></a>00098 }
+<a name="l00099"></a>00099 <span class="keywordflow">if</span> (e.sign()==0) <span class="keywordflow">return</span> <a class="code" href="classxint_1_1integer.html#a9237b21f4162146c7b5749b169c081b8">integer::one</a>();
+<a name="l00100"></a>00100
+<a name="l00101"></a>00101 <span class="keywordtype">bool</span> neg=(n.sign() &lt; 0 &amp;&amp; e.odd());
+<a name="l00102"></a>00102
+<a name="l00103"></a>00103 integer answer(<a class="code" href="classxint_1_1integer.html#a9237b21f4162146c7b5749b169c081b8">integer::one</a>());
+<a name="l00104"></a>00104
+<a name="l00105"></a>00105 <span class="comment">// Montgomery&apos;s method is often noticeably faster, but only works if the</span>
+<a name="l00106"></a>00106 <span class="comment">// m is odd.</span>
+<a name="l00107"></a>00107 <span class="keywordflow">if</span> (m.odd() &amp;&amp; !noMontgomery) {
+<a name="l00108"></a>00108 answer=<a class="code" href="namespacexint.html#a7d7e8604c467bc007820c60e1bc21626" title="Returns the Montgomery equivalent of powmod(a, b, n). Used internally.">montgomeryPowerMod</a>(<a class="code" href="namespacexint.html#ac9e4ed282bafa93dbf608350df0127ba" title="Returns the absolute value of an integer.">abs</a>(n) % m, <a class="code" href="namespacexint.html#ac9e4ed282bafa93dbf608350df0127ba" title="Returns the absolute value of an integer.">abs</a>(e), m);
+<a name="l00109"></a>00109 } <span class="keywordflow">else</span> {
+<a name="l00110"></a>00110 integer p(<a class="code" href="namespacexint.html#ac9e4ed282bafa93dbf608350df0127ba" title="Returns the absolute value of an integer.">abs</a>(n));
+<a name="l00111"></a>00111
+<a name="l00112"></a>00112 <span class="keywordtype">size_t</span> length=e._get_length(), lastBitCount=0;
+<a name="l00113"></a>00113 <a class="code" href="namespacexint_1_1detail.html#a8843fb7e364832d8d5983de28bdbcf34">detail::digit_t</a> ee(e._get_digit(length-1));
+<a name="l00114"></a>00114 <span class="keywordflow">while</span> (ee != 0) { ee &gt;&gt;= 1; ++lastBitCount; }
+<a name="l00115"></a>00115
+<a name="l00116"></a>00116 <span class="keywordflow">for</span> (<span class="keywordtype">size_t</span> eIndex=0; eIndex &lt; length; ++eIndex) {
+<a name="l00117"></a>00117 <a class="code" href="namespacexint_1_1detail.html#a8843fb7e364832d8d5983de28bdbcf34">detail::digit_t</a> ee(e._get_digit(eIndex));
+<a name="l00118"></a>00118
+<a name="l00119"></a>00119 <span class="keywordtype">int</span> bitCount(<span class="keywordtype">int</span>(eIndex == length-1 ? lastBitCount :
+<a name="l00120"></a>00120 <a class="code" href="namespacexint_1_1detail.html#a9bd9e8d55061238d63913020d2721518">detail::bits_per_digit</a>));
+<a name="l00121"></a>00121 <span class="keywordflow">while</span> (bitCount-- &gt; 0) {
+<a name="l00122"></a>00122 <span class="keywordflow">if</span> (ee &amp; 0x01) answer=<a class="code" href="namespacexint.html#adbbde6cc4b65e9a3df8c52adad9c540f" title="Get the modular product of two integers.">mulmod</a>(answer, p, m);
+<a name="l00123"></a>00123 p=<a class="code" href="namespacexint.html#aa5564979e78556afdc68dbbd744a0bcb" title="Get the modular product of squaring an integer.">sqrmod</a>(p, m);
+<a name="l00124"></a>00124 ee &gt;&gt;= 1;
+<a name="l00125"></a>00125 }
+<a name="l00126"></a>00126 }
+<a name="l00127"></a>00127 }
+<a name="l00128"></a>00128
+<a name="l00129"></a>00129 answer._set_negative(neg);
+<a name="l00130"></a>00130 <span class="keywordflow">return</span> answer;
+<a name="l00131"></a>00131 }
+<a name="l00132"></a>00132
+<a name="l00133"></a>00133 } <span class="comment">// namespace xint</span>
+</pre></div></div>
+<hr size="1"/><address style="text-align: right;"><small>Generated on Tue Apr 6 01:22:08 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.1 </small></address>
+</body>
+</html>

Added: sandbox/xint/doc/monty_8cpp.html
==============================================================================
--- (empty file)
+++ sandbox/xint/doc/monty_8cpp.html 2010-04-06 01:40:33 EDT (Tue, 06 Apr 2010)
@@ -0,0 +1,111 @@
+<!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: monty.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.1 -->
+<div class="navigation" id="top">
+ <div class="tabs">
+ <ul>
+ <li>Main Page</li>
+ <li>Related Pages</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>monty.cpp File Reference</h1>
+<p>Internally used functions.
+More...</p>
+<code>#include &quot;../boost/xint/xint.hpp&quot;</code><br/>
+<code>#include &quot;../boost/xint/xint_data_t.hpp&quot;</code><br/>
+<code>#include &lt;boost/scoped_array.hpp&gt;</code><br/>
+<code>#include &lt;vector&gt;</code><br/>
+
+<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="namespacexint.html">xint</a></td></tr>
+
+<p><tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight"><p>All of the functions in the XInt library are within this namespace. </p>
+<br/></td></tr>
+</p>
+<tr><td colspan="2"><h2>Defines</h2></td></tr>
+<tr><td class="memItemLeft" align="right" valign="top">#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="monty_8cpp.html#a5e044fcc16f6eb5e891ef312f47209ac">ddPowerOfTwo</a>(p)&nbsp;&nbsp;&nbsp;(doubledigit_t(1) &lt;&lt; p)</td></tr>
+<tr><td colspan="2"><h2>Functions</h2></td></tr>
+<tr><td colspan="2"><div class="groupHeader">Montgomery Reduction functions</div></td></tr>
+<tr><td colspan="2"><div class="groupText"><p><a class="anchor" id="amgrpef45384829a28a8031424a8c453ceaa0"></a> </p>
+<br/><br/></div></td></tr>
+<tr><td class="memItemLeft" align="right" valign="top">digit_t&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespacexint.html#afd561fd7c7631267fbc7e5c75c2bde71">xint::inverse0</a> (const integer &amp;n)</td></tr>
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Returns the low digit of the inverse of a number. Used internally. <br/></td></tr>
+<tr><td class="memItemLeft" align="right" valign="top">integer&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespacexint.html#aaf3b26669d4e61f6af5dcae42b20e08b">xint::montgomeryR</a> (const integer &amp;n)</td></tr>
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Returns the most efficient R value for a number and the library's internal representation. Used internally. <br/></td></tr>
+<tr><td class="memItemLeft" align="right" valign="top">integer&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespacexint.html#ab8e85cd5425fcec419c07155e2a91e13">xint::toMontgomeryForm</a> (const integer &amp;n, const integer &amp;m)</td></tr>
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Returns the Montgomery form of a number. Used for testing. <br/></td></tr>
+<tr><td class="memItemLeft" align="right" valign="top">integer&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespacexint.html#a93ed16c5350b34ca22108e48b51918a5">xint::fromMontgomeryForm</a> (const integer &amp;n, const integer &amp;m)</td></tr>
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Returns the <a class="el" href="classxint_1_1integer.html" title="The extended integer class.">integer</a> from the Montgomery form of a number. Used for testing. <br/></td></tr>
+<tr><td class="memItemLeft" align="right" valign="top">integer&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespacexint.html#a722769c7d01e06d9f82eae07a280160c">xint::montgomeryMultiplyMod</a> (const integer &amp;a, const integer &amp;b, const integer &amp;n, digit_t nPrime0)</td></tr>
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Returns the Montgomery equivalent of <code>mulmod(a, b, n)</code>. Used internally. <br/></td></tr>
+<tr><td class="memItemLeft" align="right" valign="top">integer&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespacexint.html#a7d7e8604c467bc007820c60e1bc21626">xint::montgomeryPowerMod</a> (const integer &amp;a, const integer &amp;e, const integer &amp;n)</td></tr>
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Returns the Montgomery equivalent of <code>powmod(a, b, n)</code>. Used internally. <br/></td></tr>
+</table>
+<hr/><a name="_details"></a><h2>Detailed Description</h2>
+<p>Internally used functions. </p>
+<p>This file contains the definitions for functions based on the Montgomery Reduction, used internally for an extra-fast <a class="el" href="namespacexint.html#ac54e9be3a8b131f882f88e57b0ef1c9c" title="Get the result of ne % m, keeping the intermediate results (relatively) small.">xint::powmod</a>. </p>
+
+<p>Definition in file <a class="el" href="monty_8cpp_source.html">monty.cpp</a>.</p>
+<hr/><h2>Define Documentation</h2>
+<a class="anchor" id="a5e044fcc16f6eb5e891ef312f47209ac"></a><!-- doxytag: member="monty.cpp::ddPowerOfTwo" ref="a5e044fcc16f6eb5e891ef312f47209ac" args="(p)" -->
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname">#define ddPowerOfTwo</td>
+ <td>(</td>
+ <td class="paramtype">p&nbsp;</td>
+ <td class="paramname"></td>
+ <td>&nbsp;)&nbsp;</td>
+ <td>&nbsp;&nbsp;&nbsp;(doubledigit_t(1) &lt;&lt; p)</td>
+ </tr>
+ </table>
+</div>
+<div class="memdoc">
+
+<p>Definition at line <a class="el" href="monty_8cpp_source.html#l00129">129</a> of file <a class="el" href="monty_8cpp_source.html">monty.cpp</a>.</p>
+
+</div>
+</div>
+<hr/><h2>Variable Documentation</h2>
+<a class="anchor" id="a934de4c9ba95abb023be91f96559097d"></a><!-- doxytag: member="monty.cpp::mTable" ref="a934de4c9ba95abb023be91f96559097d" args="" -->
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname">boost::scoped_array&lt;value_t&gt; <a class="el" href="monty_8cpp.html#a934de4c9ba95abb023be91f96559097d">mTable</a></td>
+ </tr>
+ </table>
+</div>
+<div class="memdoc">
+
+<p>Definition at line <a class="el" href="monty_8cpp_source.html#l00166">166</a> of file <a class="el" href="monty_8cpp_source.html">monty.cpp</a>.</p>
+
+</div>
+</div>
+</div>
+<hr size="1"/><address style="text-align: right;"><small>Generated on Tue Apr 6 01:22:08 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.1 </small></address>
+</body>
+</html>

Added: sandbox/xint/doc/monty_8cpp_source.html
==============================================================================
--- (empty file)
+++ sandbox/xint/doc/monty_8cpp_source.html 2010-04-06 01:40:33 EDT (Tue, 06 Apr 2010)
@@ -0,0 +1,300 @@
+<!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: monty.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.1 -->
+<div class="navigation" id="top">
+ <div class="tabs">
+ <ul>
+ <li>Main Page</li>
+ <li>Related Pages</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>monty.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="l00021"></a>00021 <span class="preprocessor">#include &quot;../boost/xint/xint.hpp&quot;</span>
+<a name="l00022"></a>00022 <span class="preprocessor">#include &quot;../boost/xint/xint_data_t.hpp&quot;</span>
+<a name="l00023"></a>00023
+<a name="l00024"></a>00024 <span class="preprocessor">#include &lt;boost/scoped_array.hpp&gt;</span>
+<a name="l00025"></a>00025
+<a name="l00026"></a>00026 <span class="preprocessor">#include &lt;vector&gt;</span>
+<a name="l00027"></a>00027
+<a name="l00028"></a>00028 <span class="keyword">namespace </span>xint {
+<a name="l00029"></a>00029
+<a name="l00030"></a>00030 <span class="keyword">using namespace </span>detail;
+<a name="l00031"></a>00031
+<a name="l00033"></a>00033 <a class="code" href="namespacexint_1_1detail.html#a8843fb7e364832d8d5983de28bdbcf34">digit_t</a> <a class="code" href="namespacexint.html#afd561fd7c7631267fbc7e5c75c2bde71" title="Returns the low digit of the inverse of a number. Used internally.">inverse0</a>(<span class="keyword">const</span> integer&amp; n) {
+<a name="l00034"></a>00034 <span class="comment">// Using the Dussé and Kalisk simplification</span>
+<a name="l00035"></a>00035 <a class="code" href="namespacexint_1_1detail.html#aceb9b654c1c2daaf377b31bd4a089750">doubledigit_t</a> x = 2, y = 1;
+<a name="l00036"></a>00036 <a class="code" href="namespacexint_1_1detail.html#a8843fb7e364832d8d5983de28bdbcf34">digit_t</a> n0 = n._get_digit(0);
+<a name="l00037"></a>00037 <span class="keywordflow">for</span> (<span class="keywordtype">size_t</span> i = 2; i &lt;= <a class="code" href="namespacexint_1_1detail.html#a9bd9e8d55061238d63913020d2721518">bits_per_digit</a>; ++i, x &lt;&lt;= 1)
+<a name="l00038"></a>00038 <span class="keywordflow">if</span> (x &lt; ((n0 * y) &amp; ((x &lt;&lt; 1) - 1)))
+<a name="l00039"></a>00039 y += x;
+<a name="l00040"></a>00040 <span class="keywordflow">return</span> <a class="code" href="namespacexint_1_1detail.html#a8843fb7e364832d8d5983de28bdbcf34">digit_t</a>(x - y);
+<a name="l00041"></a>00041 }
+<a name="l00042"></a>00042
+<a name="l00046"></a>00046 integer <a class="code" href="namespacexint.html#aaf3b26669d4e61f6af5dcae42b20e08b" title="Returns the most efficient R value for a number and the library&amp;#39;s internal representation...">montgomeryR</a>(<span class="keyword">const</span> integer&amp; n) {
+<a name="l00047"></a>00047 <span class="keywordflow">return</span> <a class="code" href="classxint_1_1integer.html#a9237b21f4162146c7b5749b169c081b8">integer::one</a>() &lt;&lt; (<a class="code" href="namespacexint_1_1detail.html#a9bd9e8d55061238d63913020d2721518">bits_per_digit</a> * n._get_data()-&gt;mLength);
+<a name="l00048"></a>00048 }
+<a name="l00049"></a>00049
+<a name="l00051"></a>00051 integer <a class="code" href="namespacexint.html#ab8e85cd5425fcec419c07155e2a91e13" title="Returns the Montgomery form of a number. Used for testing.">toMontgomeryForm</a>(<span class="keyword">const</span> integer&amp; n, <span class="keyword">const</span> integer&amp; m) {
+<a name="l00052"></a>00052 <span class="keywordflow">return</span> (n * <a class="code" href="namespacexint.html#aaf3b26669d4e61f6af5dcae42b20e08b" title="Returns the most efficient R value for a number and the library&amp;#39;s internal representation...">montgomeryR</a>(m) % m);
+<a name="l00053"></a>00053 }
+<a name="l00054"></a>00054
+<a name="l00056"></a>00056 integer <a class="code" href="namespacexint.html#a93ed16c5350b34ca22108e48b51918a5" title="Returns the integer from the Montgomery form of a number. Used for testing.">fromMontgomeryForm</a>(<span class="keyword">const</span> integer&amp; n, <span class="keyword">const</span> integer&amp; m) {
+<a name="l00057"></a>00057 integer inv=<a class="code" href="namespacexint.html#a4a79f60ebe198eadf10b63924018ce66" title="Get the modular inverse of a number in a modulus, if there is one.">invmod</a>(<a class="code" href="namespacexint.html#aaf3b26669d4e61f6af5dcae42b20e08b" title="Returns the most efficient R value for a number and the library&amp;#39;s internal representation...">montgomeryR</a>(m), m);
+<a name="l00058"></a>00058 <span class="keywordflow">if</span> (inv.is_nan()) {
+<a name="l00059"></a>00059 <span class="keywordflow">if</span> (<a class="code" href="namespacexint.html#ac8be41374700d89400f5ecddf0f789e3" title="Query whether exceptions are currently allowed or blocked.">exceptions_allowed</a>()) <span class="keywordflow">throw</span> invalid_modulus(<span class="stringliteral">&quot;modulus has no inverse&quot;</span>);
+<a name="l00060"></a>00060 <span class="keywordflow">else</span> <span class="keywordflow">return</span> integer(not_a_number());
+<a name="l00061"></a>00061 }
+<a name="l00062"></a>00062 <span class="keywordflow">return</span> (n * inv % m);
+<a name="l00063"></a>00063 }
+<a name="l00064"></a>00064
+<a name="l00065"></a>00065 <span class="comment">//integer montgomeryReduction(const integer&amp; m, const integer&amp; mPrime, const</span>
+<a name="l00066"></a>00066 <span class="comment">// integer&amp; T)</span>
+<a name="l00067"></a>00067 <span class="comment">//{</span>
+<a name="l00068"></a>00068 <span class="comment">// // Unstated parameter b is digit_overflowbit, a power of 2</span>
+<a name="l00069"></a>00069 <span class="comment">// // Unstated parameter n is m.data-&gt;mLength</span>
+<a name="l00070"></a>00070 <span class="comment">// // Unstated parameter R is b^n</span>
+<a name="l00071"></a>00071 <span class="comment">// // gcd(m, b)==1, or in other words, m must be an odd number</span>
+<a name="l00072"></a>00072 <span class="comment">// // m&apos;=-m^(-1) mod b (precalculated)</span>
+<a name="l00073"></a>00073 <span class="comment">// // T is any arbitrary number greater than zero and &lt;= m*R</span>
+<a name="l00074"></a>00074 <span class="comment">//</span>
+<a name="l00075"></a>00075 <span class="comment">// int n=m._get_data()-&gt;mLength;</span>
+<a name="l00076"></a>00076 <span class="comment">// doubledigit_t mprime = mPrime._get_data()-&gt;digits[0];</span>
+<a name="l00077"></a>00077 <span class="comment">//</span>
+<a name="l00078"></a>00078 <span class="comment">// integer A(T);</span>
+<a name="l00079"></a>00079 <span class="comment">// for (int i=0; i &lt; n; ++i) {</span>
+<a name="l00080"></a>00080 <span class="comment">// integer ui((A._get_data()-&gt;digits[i] * mprime) &amp; digit_mask);</span>
+<a name="l00081"></a>00081 <span class="comment">// ui &lt;&lt;= (bits_per_digit * i); // Fast-multiply by b^i</span>
+<a name="l00082"></a>00082 <span class="comment">// A+=(ui*m);</span>
+<a name="l00083"></a>00083 <span class="comment">// }</span>
+<a name="l00084"></a>00084 <span class="comment">// A &gt;&gt;= (bits_per_digit * n); // Fast-divide by b^n</span>
+<a name="l00085"></a>00085 <span class="comment">// if (A &gt;= m) A -= m;</span>
+<a name="l00086"></a>00086 <span class="comment">// return A;</span>
+<a name="l00087"></a>00087 <span class="comment">//}</span>
+<a name="l00088"></a>00088
+<a name="l00092"></a>00092 integer <a class="code" href="namespacexint.html#a722769c7d01e06d9f82eae07a280160c" title="Returns the Montgomery equivalent of mulmod(a, b, n). Used internally.">montgomeryMultiplyMod</a>(<span class="keyword">const</span> integer&amp; a, <span class="keyword">const</span> integer&amp; b, <span class="keyword">const</span> integer&amp;
+<a name="l00093"></a>00093 n, <a class="code" href="namespacexint_1_1detail.html#a8843fb7e364832d8d5983de28bdbcf34">digit_t</a> nPrime0)
+<a name="l00094"></a>00094 {
+<a name="l00095"></a>00095 <span class="comment">// Using the Dussé and Kalisk simplification</span>
+<a name="l00096"></a>00096 <span class="comment">// Unstated parameter B is a power of two representing the number of values</span>
+<a name="l00097"></a>00097 <span class="comment">// that a single digit can hold, i.e. digit_overflowbit</span>
+<a name="l00098"></a>00098 <span class="comment">// Unstated parameter L is the number of digits in the modulus, i.e.</span>
+<a name="l00099"></a>00099 <span class="comment">// n._get_length()</span>
+<a name="l00100"></a>00100 <span class="comment">// Unstated parameter r is B^L</span>
+<a name="l00101"></a>00101 <span class="comment">// nPrime0 is nPrime mod B, or digit zero of nPrime</span>
+<a name="l00102"></a>00102
+<a name="l00103"></a>00103 <span class="keyword">const</span> integer B(<a class="code" href="namespacexint_1_1detail.html#a6746855fd8cde164294a46108d502e6a">digit_overflowbit</a>);
+<a name="l00104"></a>00104 <span class="keyword">const</span> <span class="keywordtype">size_t</span> L(n._get_length()), L1(L-1);
+<a name="l00105"></a>00105
+<a name="l00106"></a>00106 integer t=a*b;
+<a name="l00107"></a>00107 <span class="keywordtype">size_t</span> i=0;
+<a name="l00108"></a>00108
+<a name="l00109"></a>00109 <span class="keywordflow">do</span> {
+<a name="l00110"></a>00110 <a class="code" href="namespacexint_1_1detail.html#a8843fb7e364832d8d5983de28bdbcf34">digit_t</a> mi=<a class="code" href="namespacexint_1_1detail.html#a8843fb7e364832d8d5983de28bdbcf34">digit_t</a>(<a class="code" href="namespacexint_1_1detail.html#aceb9b654c1c2daaf377b31bd4a089750">doubledigit_t</a>(t._get_digit(i))*nPrime0);
+<a name="l00111"></a>00111 t += (n * mi) &lt;&lt; (<a class="code" href="namespacexint_1_1detail.html#a9bd9e8d55061238d63913020d2721518">bits_per_digit</a> * i);
+<a name="l00112"></a>00112 } <span class="keywordflow">while</span> (++i &lt;= L1);
+<a name="l00113"></a>00113
+<a name="l00114"></a>00114 t &gt;&gt;= (<a class="code" href="namespacexint_1_1detail.html#a9bd9e8d55061238d63913020d2721518">bits_per_digit</a> * L); <span class="comment">// Fast divide by r</span>
+<a name="l00115"></a>00115 <span class="keywordflow">return</span> (t &gt;= n ? t - n : t);
+<a name="l00116"></a>00116 }
+<a name="l00117"></a>00117
+<a name="l00118"></a>00118 <span class="keyword">namespace </span>{
+<a name="l00119"></a>00119
+<a name="l00120"></a>00120 <span class="comment">// cMaxK sets the balance between memory/precalculations required and the number</span>
+<a name="l00121"></a>00121 <span class="comment">// of calculations required for an exponentiation. Increasing it can only reduce</span>
+<a name="l00122"></a>00122 <span class="comment">// the calculations by a small amount, whereas it increases the memory</span>
+<a name="l00123"></a>00123 <span class="comment">// requirements and number of precalculations by an exponential amount. 8</span>
+<a name="l00124"></a>00124 <span class="comment">// provides a good balance.</span>
+<a name="l00125"></a>00125 <span class="keyword">const</span> <span class="keywordtype">size_t</span> cMaxK=8;
+<a name="l00126"></a>00126 <span class="keyword">typedef</span> boost::uint_t&lt;cMaxK&gt;::fast kbitdigit_t; <span class="comment">// k bits have to fit into it</span>
+<a name="l00127"></a>00127 <span class="keyword">typedef</span> std::vector&lt;kbitdigit_t&gt; vkbitdigit_t;
+<a name="l00128"></a>00128 <span class="keyword">typedef</span> std::vector&lt;integer&gt; vxint_t;
+<a name="l00129"></a><a class="code" href="monty_8cpp.html#a5e044fcc16f6eb5e891ef312f47209ac">00129</a> <span class="preprocessor">#define ddPowerOfTwo(p) (doubledigit_t(1) &lt;&lt; p)</span>
+<a name="l00130"></a>00130 <span class="preprocessor"></span>
+<a name="l00131"></a>00131 <span class="comment">// The splitIntoKBitDigits function assumes that cMaxK &lt;= bits_per_digit+1,</span>
+<a name="l00132"></a>00132 <span class="comment">// it won&apos;t work properly if it isn&apos;t.</span>
+<a name="l00133"></a>00133 BOOST_STATIC_ASSERT(cMaxK &lt;= <a class="code" href="namespacexint_1_1detail.html#a9bd9e8d55061238d63913020d2721518">bits_per_digit</a>+1);
+<a name="l00134"></a>00134
+<a name="l00135"></a>00135 <span class="keyword">class </span>TUTable {
+<a name="l00136"></a>00136 <span class="keyword">public</span>:
+<a name="l00137"></a>00137 <span class="keyword">typedef</span> std::pair&lt;int, int&gt; value_t;
+<a name="l00138"></a>00138
+<a name="l00139"></a>00139 <span class="keyword">const</span> value_t&amp; operator[](<span class="keywordtype">size_t</span> x)<span class="keyword"> const </span>{ <span class="keywordflow">return</span> <a class="code" href="monty_8cpp.html#a934de4c9ba95abb023be91f96559097d">mTable</a>[x]; }
+<a name="l00140"></a>00140
+<a name="l00141"></a>00141 <span class="keyword">static</span> <span class="keyword">const</span> TUTable&amp; <span class="keyword">get</span>() {
+<a name="l00142"></a>00142 <span class="comment">// Construct a singleton instance on demand</span>
+<a name="l00143"></a>00143 <span class="keywordflow">if</span> (mPtr.get()==0) mPtr.reset(<span class="keyword">new</span> TUTable);
+<a name="l00144"></a>00144 <span class="keywordflow">return</span> *mPtr;
+<a name="l00145"></a>00145 }
+<a name="l00146"></a>00146
+<a name="l00147"></a>00147 <span class="keyword">private</span>:
+<a name="l00148"></a>00148 TUTable(): <a class="code" href="monty_8cpp.html#a934de4c9ba95abb023be91f96559097d">mTable</a>(new value_t[<a class="code" href="monty_8cpp.html#a5e044fcc16f6eb5e891ef312f47209ac">ddPowerOfTwo</a>(cMaxK)]) {
+<a name="l00149"></a>00149 value_t *p=&amp;<a class="code" href="monty_8cpp.html#a934de4c9ba95abb023be91f96559097d">mTable</a>[0], *pe=p+<a class="code" href="monty_8cpp.html#a5e044fcc16f6eb5e891ef312f47209ac">ddPowerOfTwo</a>(cMaxK);
+<a name="l00150"></a>00150 *p++=std::make_pair(0, 0);
+<a name="l00151"></a>00151 <span class="keywordtype">int</span> i=1;
+<a name="l00152"></a>00152 <span class="keywordflow">while</span> (p!=pe) *p++=calculateValues(i++);
+<a name="l00153"></a>00153 }
+<a name="l00154"></a>00154
+<a name="l00155"></a>00155 std::pair&lt;int, int&gt; calculateValues(<span class="keywordtype">int</span> x) {
+<a name="l00156"></a>00156 <span class="keywordtype">int</span> r=0;
+<a name="l00157"></a>00157 <span class="keywordflow">while</span> (1) {
+<a name="l00158"></a>00158 <span class="keywordflow">if</span> (x &amp; 0x01) <span class="keywordflow">return</span> std::make_pair(r, x);
+<a name="l00159"></a>00159 ++r;
+<a name="l00160"></a>00160 x &gt;&gt;= 1;
+<a name="l00161"></a>00161 }
+<a name="l00162"></a>00162 }
+<a name="l00163"></a>00163
+<a name="l00164"></a>00164 <span class="keyword">static</span> std::auto_ptr&lt;TUTable&gt; mPtr;
+<a name="l00165"></a>00165
+<a name="l00166"></a><a class="code" href="monty_8cpp.html#a934de4c9ba95abb023be91f96559097d">00166</a> boost::scoped_array&lt;value_t&gt; <a class="code" href="monty_8cpp.html#a934de4c9ba95abb023be91f96559097d">mTable</a>;
+<a name="l00167"></a>00167 };
+<a name="l00168"></a>00168
+<a name="l00169"></a>00169 std::auto_ptr&lt;TUTable&gt; TUTable::mPtr;
+<a name="l00170"></a>00170
+<a name="l00171"></a>00171 <span class="keywordtype">int</span> mostEfficientK(<span class="keyword">const</span> integer&amp; e) {
+<a name="l00172"></a>00172 <a class="code" href="namespacexint_1_1detail.html#aceb9b654c1c2daaf377b31bd4a089750">doubledigit_t</a> k=cMaxK, kTarget=<a class="code" href="namespacexint.html#aa074495871d366c760c5b0713f5ef048" title="Get the log2 value of an integer.">log2</a>(e)-1;
+<a name="l00173"></a>00173 <span class="keywordflow">while</span> (k &gt; 1 &amp;&amp; ((k - 1) * (k &lt;&lt; ((k - 1) &lt;&lt; 1))
+<a name="l00174"></a>00174 / (<a class="code" href="monty_8cpp.html#a5e044fcc16f6eb5e891ef312f47209ac">ddPowerOfTwo</a>(k) - k - 1)) &gt;= kTarget)
+<a name="l00175"></a>00175 --k;
+<a name="l00176"></a>00176 <span class="keywordflow">return</span> int(k);
+<a name="l00177"></a>00177 }
+<a name="l00178"></a>00178
+<a name="l00179"></a>00179 vxint_t precalculateOddPowersOfAa(<span class="keyword">const</span> integer&amp; a, <span class="keyword">const</span> integer&amp;
+<a name="l00180"></a>00180 r, <span class="keyword">const</span> integer&amp; n, <span class="keywordtype">size_t</span> k)
+<a name="l00181"></a>00181 {
+<a name="l00182"></a>00182 integer aa=a*r%n, aSquared=a*a%n;
+<a name="l00183"></a>00183
+<a name="l00184"></a>00184 vxint_t rval;
+<a name="l00185"></a>00185 rval.reserve(<span class="keywordtype">size_t</span>(<a class="code" href="monty_8cpp.html#a5e044fcc16f6eb5e891ef312f47209ac">ddPowerOfTwo</a>(k)));
+<a name="l00186"></a>00186 rval.push_back(<a class="code" href="classxint_1_1integer.html#a9237b21f4162146c7b5749b169c081b8">integer::one</a>()); <span class="comment">// Anything to the zeroth power is one</span>
+<a name="l00187"></a>00187 rval.push_back(aa); <span class="comment">// Anything to the first power is itself</span>
+<a name="l00188"></a>00188
+<a name="l00189"></a>00189 <span class="keywordflow">for</span> (<a class="code" href="namespacexint_1_1detail.html#aceb9b654c1c2daaf377b31bd4a089750">doubledigit_t</a> i=3, ie=(<a class="code" href="monty_8cpp.html#a5e044fcc16f6eb5e891ef312f47209ac">ddPowerOfTwo</a>(k)); i&lt;ie; i+=2) {
+<a name="l00190"></a>00190 aa=aa*aSquared%n;
+<a name="l00191"></a>00191 rval.push_back(<a class="code" href="classxint_1_1integer.html#a64a0f99de7c33239237cb59d8464f3d2">integer::zero</a>()); <span class="comment">// Even powers not needed or calculated</span>
+<a name="l00192"></a>00192 rval.push_back(aa); <span class="comment">// Odd power</span>
+<a name="l00193"></a>00193 }
+<a name="l00194"></a>00194
+<a name="l00195"></a>00195 <span class="keywordflow">return</span> rval;
+<a name="l00196"></a>00196 }
+<a name="l00197"></a>00197
+<a name="l00198"></a>00198 vkbitdigit_t splitIntoKBitDigits(<span class="keyword">const</span> integer&amp; e, <span class="keywordtype">size_t</span> k) {
+<a name="l00199"></a>00199 <span class="keywordtype">size_t</span> eBits=<a class="code" href="namespacexint.html#aa074495871d366c760c5b0713f5ef048" title="Get the log2 value of an integer.">log2</a>(e), eDigits=(eBits+k-1)/k, i=0, bitsInHopper=0;
+<a name="l00200"></a>00200
+<a name="l00201"></a>00201 vkbitdigit_t rval;
+<a name="l00202"></a>00202 rval.reserve(eDigits);
+<a name="l00203"></a>00203
+<a name="l00204"></a>00204 <a class="code" href="namespacexint_1_1detail.html#aceb9b654c1c2daaf377b31bd4a089750">doubledigit_t</a> hopper=0, mask=(<a class="code" href="namespacexint_1_1detail.html#aceb9b654c1c2daaf377b31bd4a089750">doubledigit_t</a>(1)&lt;&lt;k)-1;
+<a name="l00205"></a>00205 <span class="keywordflow">while</span> (eDigits-- &gt; 0) {
+<a name="l00206"></a>00206 <span class="keywordflow">if</span> (bitsInHopper &lt; k &amp;&amp; i &lt; e._get_length()) {
+<a name="l00207"></a>00207 <span class="comment">// Add more bits to the hopper</span>
+<a name="l00208"></a>00208 hopper = hopper | (<a class="code" href="namespacexint_1_1detail.html#aceb9b654c1c2daaf377b31bd4a089750">doubledigit_t</a>(e._get_digit(i++)) &lt;&lt; bitsInHopper);
+<a name="l00209"></a>00209 bitsInHopper += <a class="code" href="namespacexint_1_1detail.html#a9bd9e8d55061238d63913020d2721518">bits_per_digit</a>;
+<a name="l00210"></a>00210 }
+<a name="l00211"></a>00211
+<a name="l00212"></a>00212 <span class="comment">// Grab k bits off the bottom</span>
+<a name="l00213"></a>00213 <span class="keywordflow">if</span> (bitsInHopper &gt; 0) {
+<a name="l00214"></a>00214 rval.push_back(kbitdigit_t(hopper &amp; mask));
+<a name="l00215"></a>00215 hopper &gt;&gt;= k;
+<a name="l00216"></a>00216 bitsInHopper-=k;
+<a name="l00217"></a>00217 } <span class="keywordflow">else</span> {
+<a name="l00218"></a>00218 rval.push_back(0);
+<a name="l00219"></a>00219 }
+<a name="l00220"></a>00220 }
+<a name="l00221"></a>00221
+<a name="l00222"></a>00222 <span class="keywordflow">return</span> rval;
+<a name="l00223"></a>00223 }
+<a name="l00224"></a>00224
+<a name="l00225"></a>00225 } <span class="comment">// namespace</span>
+<a name="l00226"></a>00226
+<a name="l00230"></a>00230 integer <a class="code" href="namespacexint.html#a7d7e8604c467bc007820c60e1bc21626" title="Returns the Montgomery equivalent of powmod(a, b, n). Used internally.">montgomeryPowerMod</a>(<span class="keyword">const</span> integer&amp; a, <span class="keyword">const</span> integer&amp; e, <span class="keyword">const</span> integer&amp; n)
+<a name="l00231"></a>00231 {
+<a name="l00232"></a>00232 <span class="comment">// 0 &lt;= a &lt; n, n is odd</span>
+<a name="l00233"></a>00233 <span class="comment">// Returns a^e mod n</span>
+<a name="l00234"></a>00234
+<a name="l00235"></a>00235 <span class="keyword">const</span> TUTable &amp;tuTable(TUTable::get());
+<a name="l00236"></a>00236
+<a name="l00237"></a>00237 <span class="keywordflow">if</span> (e.sign()==0) <span class="keywordflow">return</span> <a class="code" href="classxint_1_1integer.html#a9237b21f4162146c7b5749b169c081b8">integer::one</a>();
+<a name="l00238"></a>00238 <span class="keywordflow">if</span> (n.even()) {
+<a name="l00239"></a>00239 <span class="keywordflow">if</span> (<a class="code" href="namespacexint.html#ac8be41374700d89400f5ecddf0f789e3" title="Query whether exceptions are currently allowed or blocked.">exceptions_allowed</a>()) <span class="keywordflow">throw</span> invalid_modulus(<span class="stringliteral">&quot;montgomeryPowerMod &quot;</span>
+<a name="l00240"></a>00240 <span class="stringliteral">&quot;requires an odd modulus&quot;</span>);
+<a name="l00241"></a>00241 <span class="keywordflow">else</span> <span class="keywordflow">return</span> integer(not_a_number());
+<a name="l00242"></a>00242 }
+<a name="l00243"></a>00243
+<a name="l00244"></a>00244 <span class="comment">// Precalculate some values</span>
+<a name="l00245"></a>00245 <span class="keyword">const</span> <span class="keywordtype">size_t</span> k(mostEfficientK(e));
+<a name="l00246"></a>00246 <span class="keyword">const</span> integer r(<a class="code" href="namespacexint.html#aaf3b26669d4e61f6af5dcae42b20e08b" title="Returns the most efficient R value for a number and the library&amp;#39;s internal representation...">montgomeryR</a>(n));
+<a name="l00247"></a>00247 <span class="keyword">const</span> <a class="code" href="namespacexint_1_1detail.html#a8843fb7e364832d8d5983de28bdbcf34">digit_t</a> nPrime0(<a class="code" href="namespacexint.html#afd561fd7c7631267fbc7e5c75c2bde71" title="Returns the low digit of the inverse of a number. Used internally.">inverse0</a>(n));
+<a name="l00248"></a>00248 <span class="keyword">const</span> vxint_t oddPowersOfAa(precalculateOddPowersOfAa(a, r, n, k));
+<a name="l00249"></a>00249
+<a name="l00250"></a>00250 <span class="comment">// Slice the exponent (e) up into k-bit digits</span>
+<a name="l00251"></a>00251 vkbitdigit_t eDigits(splitIntoKBitDigits(e, k));
+<a name="l00252"></a>00252
+<a name="l00253"></a>00253 integer pp;
+<a name="l00254"></a>00254
+<a name="l00255"></a>00255 kbitdigit_t i=eDigits.back();
+<a name="l00256"></a>00256 eDigits.pop_back();
+<a name="l00257"></a>00257 <span class="keywordflow">if</span> (i == 0) {
+<a name="l00258"></a>00258 pp=r%n;
+<a name="l00259"></a>00259 } <span class="keywordflow">else</span> {
+<a name="l00260"></a>00260 std::pair&lt;int, int&gt; tu=tuTable[i];
+<a name="l00261"></a>00261 pp=oddPowersOfAa[tu.second];
+<a name="l00262"></a>00262 <span class="keywordflow">while</span> (tu.first-- &gt; 0) pp=<a class="code" href="namespacexint.html#a722769c7d01e06d9f82eae07a280160c" title="Returns the Montgomery equivalent of mulmod(a, b, n). Used internally.">montgomeryMultiplyMod</a>(pp, pp, n, nPrime0);
+<a name="l00263"></a>00263 }
+<a name="l00264"></a>00264
+<a name="l00265"></a>00265 <span class="keywordflow">while</span> (!eDigits.empty()) {
+<a name="l00266"></a>00266 i=eDigits.back();
+<a name="l00267"></a>00267 eDigits.pop_back();
+<a name="l00268"></a>00268
+<a name="l00269"></a>00269 <span class="keywordflow">if</span> (i == 0) {
+<a name="l00270"></a>00270 <span class="keywordtype">int</span> t=int(k);
+<a name="l00271"></a>00271 <span class="keywordflow">while</span> (t-- &gt; 0) pp=<a class="code" href="namespacexint.html#a722769c7d01e06d9f82eae07a280160c" title="Returns the Montgomery equivalent of mulmod(a, b, n). Used internally.">montgomeryMultiplyMod</a>(pp, pp, n, nPrime0);
+<a name="l00272"></a>00272 } <span class="keywordflow">else</span> {
+<a name="l00273"></a>00273 std::pair&lt;int, int&gt; tu=tuTable[i];
+<a name="l00274"></a>00274
+<a name="l00275"></a>00275 <span class="keywordtype">size_t</span> s=k-tu.first;
+<a name="l00276"></a>00276 <span class="keywordflow">while</span> (s-- &gt; 0) pp=<a class="code" href="namespacexint.html#a722769c7d01e06d9f82eae07a280160c" title="Returns the Montgomery equivalent of mulmod(a, b, n). Used internally.">montgomeryMultiplyMod</a>(pp, pp, n, nPrime0);
+<a name="l00277"></a>00277
+<a name="l00278"></a>00278 pp=<a class="code" href="namespacexint.html#a722769c7d01e06d9f82eae07a280160c" title="Returns the Montgomery equivalent of mulmod(a, b, n). Used internally.">montgomeryMultiplyMod</a>(pp, oddPowersOfAa[tu.second], n, nPrime0);
+<a name="l00279"></a>00279
+<a name="l00280"></a>00280 <span class="keywordflow">while</span> (tu.first-- &gt; 0) pp=<a class="code" href="namespacexint.html#a722769c7d01e06d9f82eae07a280160c" title="Returns the Montgomery equivalent of mulmod(a, b, n). Used internally.">montgomeryMultiplyMod</a>(pp, pp, n, nPrime0);
+<a name="l00281"></a>00281 }
+<a name="l00282"></a>00282 }
+<a name="l00283"></a>00283
+<a name="l00284"></a>00284 <span class="keywordflow">return</span> <a class="code" href="namespacexint.html#a722769c7d01e06d9f82eae07a280160c" title="Returns the Montgomery equivalent of mulmod(a, b, n). Used internally.">montgomeryMultiplyMod</a>(pp, <a class="code" href="classxint_1_1integer.html#a9237b21f4162146c7b5749b169c081b8">integer::one</a>(), n, nPrime0);
+<a name="l00285"></a>00285 }
+<a name="l00286"></a>00286
+<a name="l00287"></a>00287 } <span class="comment">// namespace xint</span>
+</pre></div></div>
+<hr size="1"/><address style="text-align: right;"><small>Generated on Tue Apr 6 01:22:08 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.1 </small></address>
+</body>
+</html>

Added: sandbox/xint/doc/namespacemembers.html
==============================================================================
--- (empty file)
+++ sandbox/xint/doc/namespacemembers.html 2010-04-06 01:40:33 EDT (Tue, 06 Apr 2010)
@@ -0,0 +1,402 @@
+<!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 Members</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.1 -->
+<div class="navigation" id="top">
+ <div class="tabs">
+ <ul>
+ <li>Main Page</li>
+ <li>Related Pages</li>
+ <li class="current">Namespaces</li>
+ <li>Classes</li>
+ <li>Files</li>
+ </ul>
+ </div>
+ <div class="tabs">
+ <ul>
+ <li>Namespace List</li>
+ <li class="current">Namespace Members</li>
+ </ul>
+ </div>
+ <div class="tabs">
+ <ul>
+ <li class="current">All</li>
+ <li>Functions</li>
+ <li>Variables</li>
+ <li>Typedefs</li>
+ </ul>
+ </div>
+ <div class="tabs">
+ <ul>
+ <li>a</li>
+ <li>b</li>
+ <li>c</li>
+ <li>d</li>
+ <li>e</li>
+ <li>f</li>
+ <li>g</li>
+ <li>h</li>
+ <li>i</li>
+ <li>l</li>
+ <li>m</li>
+ <li>n</li>
+ <li>o</li>
+ <li>p</li>
+ <li>r</li>
+ <li>s</li>
+ <li>t</li>
+ </ul>
+ </div>
+</div>
+<div class="contents">
+Here is a list of all namespace members with links to the namespace documentation for each member:
+
+<h3><a class="anchor" id="index_a">- a -</a></h3><ul>
+<li>abs()
+: <a class="el" href="namespacexint.html#ac9e4ed282bafa93dbf608350df0127ba">xint</a>
+</li>
+<li>add()
+: <a class="el" href="namespacexint.html#a7cc636a05af16eba73014bf88273d163">xint</a>
+</li>
+<li>allow_exceptions()
+: <a class="el" href="namespacexint.html#a4b5a1a791ba11bb8f158a3b56bd9723e">xint</a>
+</li>
+<li>autobase
+: <a class="el" href="namespacexint.html#a7a5434a5f5fb1db19f0de18014c4fc41">xint</a>
+</li>
+</ul>
+
+
+<h3><a class="anchor" id="index_b">- b -</a></h3><ul>
+<li>bits_per_digit
+: <a class="el" href="namespacexint_1_1detail.html#a9bd9e8d55061238d63913020d2721518">xint::detail</a>
+</li>
+<li>bitwise_and()
+: <a class="el" href="namespacexint.html#a06138585f07fe098e24718c46e3078e1">xint</a>
+</li>
+<li>bitwise_or()
+: <a class="el" href="namespacexint.html#a8cd0a0dbc779e5a75c9e2f8027474e9a">xint</a>
+</li>
+<li>bitwise_xor()
+: <a class="el" href="namespacexint.html#a9ffe18a09f5dd354af7b967b032d3cbe">xint</a>
+</li>
+<li>block_exceptions()
+: <a class="el" href="namespacexint.html#ae7e3f6afc701f6e8873a407bb418d04c">xint</a>
+</li>
+</ul>
+
+
+<h3><a class="anchor" id="index_c">- c -</a></h3><ul>
+<li>callback_t
+: <a class="el" href="namespacexint.html#ac8a660c33746c536469d347307b8da7a">xint</a>
+</li>
+<li>clearbit()
+: <a class="el" href="namespacexint.html#a8982e3e3ab7c1c763416eadc479d9724">xint</a>
+</li>
+<li>compare()
+: <a class="el" href="namespacexint.html#aff82dd47fae4297b96282371abf4db06">xint</a>
+</li>
+</ul>
+
+
+<h3><a class="anchor" id="index_d">- d -</a></h3><ul>
+<li>digit_hibit
+: <a class="el" href="namespacexint_1_1detail.html#a116bb5ce94c55f0eae3338d69fd5e8eb">xint::detail</a>
+</li>
+<li>digit_mask
+: <a class="el" href="namespacexint_1_1detail.html#a051753e1bf43dcc77eaa93b8d4e49197">xint::detail</a>
+</li>
+<li>digit_overflowbit
+: <a class="el" href="namespacexint_1_1detail.html#a6746855fd8cde164294a46108d502e6a">xint::detail</a>
+</li>
+<li>digit_t
+: <a class="el" href="namespacexint_1_1detail.html#a8843fb7e364832d8d5983de28bdbcf34">xint::detail</a>
+</li>
+<li>divide()
+: <a class="el" href="namespacexint.html#abf3d47f1ef1fdf334097fab055886a44">xint</a>
+</li>
+<li>divide_r()
+: <a class="el" href="namespacexint.html#a23d0a0bb05cec1917d96d6aaceeb875d">xint</a>
+</li>
+<li>doubledigit_hibit
+: <a class="el" href="namespacexint_1_1detail.html#a2af0686427ee285bd715330f12fcbc1c">xint::detail</a>
+</li>
+<li>doubledigit_t
+: <a class="el" href="namespacexint_1_1detail.html#aceb9b654c1c2daaf377b31bd4a089750">xint::detail</a>
+</li>
+</ul>
+
+
+<h3><a class="anchor" id="index_e">- e -</a></h3><ul>
+<li>exceptions_allowed()
+: <a class="el" href="namespacexint.html#ac8be41374700d89400f5ecddf0f789e3">xint</a>
+</li>
+</ul>
+
+
+<h3><a class="anchor" id="index_f">- f -</a></h3><ul>
+<li>factorial()
+: <a class="el" href="namespacexint.html#aba188df925c87a0f33a79328e31e1a50">xint</a>
+</li>
+<li>from_binary()
+: <a class="el" href="namespacexint.html#ac2ac2f74b45e4179560d845e6310be9a">xint</a>
+</li>
+<li>from_string()
+: <a class="el" href="namespacexint.html#ad9dcb2b835be5f8ee918979945911ac0">xint</a>
+</li>
+<li>fromMontgomeryForm()
+: <a class="el" href="namespacexint.html#a93ed16c5350b34ca22108e48b51918a5">xint</a>
+</li>
+</ul>
+
+
+<h3><a class="anchor" id="index_g">- g -</a></h3><ul>
+<li>gcd()
+: <a class="el" href="namespacexint.html#ac9e11516ac502e97be1902cde50f97e7">xint</a>
+</li>
+<li>get_random()
+: <a class="el" href="namespacexint_1_1detail.html#a1dfc1e90886c4897a4b112f491b89b62">xint::detail</a>
+</li>
+<li>getbit()
+: <a class="el" href="namespacexint.html#a07bc7378c8a55e5f92aaef6d8b8ce952">xint</a>
+</li>
+</ul>
+
+
+<h3><a class="anchor" id="index_h">- h -</a></h3><ul>
+<li>highestbit()
+: <a class="el" href="namespacexint.html#ae08828243165ef3f397461507368a6e5">xint</a>
+</li>
+</ul>
+
+
+<h3><a class="anchor" id="index_i">- i -</a></h3><ul>
+<li>inverse0()
+: <a class="el" href="namespacexint.html#afd561fd7c7631267fbc7e5c75c2bde71">xint</a>
+</li>
+<li>invmod()
+: <a class="el" href="namespacexint.html#a4a79f60ebe198eadf10b63924018ce66">xint</a>
+</li>
+<li>is_prime()
+: <a class="el" href="namespacexint.html#ab205c4e52dbc6825cefe3a251f6ca99f">xint</a>
+</li>
+</ul>
+
+
+<h3><a class="anchor" id="index_l">- l -</a></h3><ul>
+<li>lcm()
+: <a class="el" href="namespacexint.html#a17c5e4e807cfa425f48d9f5b464bc8dc">xint</a>
+</li>
+<li>log2()
+: <a class="el" href="namespacexint.html#aa074495871d366c760c5b0713f5ef048">xint</a>
+</li>
+<li>lowestbit()
+: <a class="el" href="namespacexint.html#ae04d70f50c4ce73d27ab32b1bf3520f2">xint</a>
+</li>
+</ul>
+
+
+<h3><a class="anchor" id="index_m">- m -</a></h3><ul>
+<li>mod()
+: <a class="el" href="namespacexint.html#ad5a8cc6e57ee8abdc21be98275657cc8">xint</a>
+</li>
+<li>montgomeryMultiplyMod()
+: <a class="el" href="namespacexint.html#a722769c7d01e06d9f82eae07a280160c">xint</a>
+</li>
+<li>montgomeryPowerMod()
+: <a class="el" href="namespacexint.html#a7d7e8604c467bc007820c60e1bc21626">xint</a>
+</li>
+<li>montgomeryR()
+: <a class="el" href="namespacexint.html#aaf3b26669d4e61f6af5dcae42b20e08b">xint</a>
+</li>
+<li>mulmod()
+: <a class="el" href="namespacexint.html#adbbde6cc4b65e9a3df8c52adad9c540f">xint</a>
+</li>
+<li>multiply()
+: <a class="el" href="namespacexint.html#af3d7059ec08bf075cec5685deca55c5d">xint</a>
+</li>
+</ul>
+
+
+<h3><a class="anchor" id="index_n">- n -</a></h3><ul>
+<li>nan_text
+: <a class="el" href="namespacexint_1_1detail.html#aede27c67f3308e0805fc3093ffe6f4ce">xint::detail</a>
+</li>
+<li>negate()
+: <a class="el" href="namespacexint.html#ab393826381b1abd9f1aca1cdb45f41f6">xint</a>
+</li>
+<li>no_callback
+: <a class="el" href="namespacexint.html#a44496f258b36237d4cea35558a71017a">xint</a>
+</li>
+</ul>
+
+
+<h3><a class="anchor" id="index_o">- o -</a></h3><ul>
+<li>operator!()
+: <a class="el" href="namespacexint.html#a675c4fe6ddda6db915450d054ed640ba">xint</a>
+</li>
+<li>operator!=()
+: <a class="el" href="namespacexint.html#aefda934d0ffacd0f44fcbbdfee19a139">xint</a>
+</li>
+<li>operator%()
+: <a class="el" href="namespacexint.html#ae0505757986a9c7133552552471aae24">xint</a>
+</li>
+<li>operator&amp;()
+: <a class="el" href="namespacexint.html#a742550f1c62ac8c2bde8e1ceab2a466c">xint</a>
+</li>
+<li>operator*()
+: <a class="el" href="namespacexint.html#aea36ad9037f109576d4f95ec72b5c825">xint</a>
+</li>
+<li>operator+()
+: <a class="el" href="namespacexint.html#a586fb0eb69100ec74be94008ac26670d">xint</a>
+</li>
+<li>operator-()
+: <a class="el" href="namespacexint.html#a8a510361ed458133ebfa5fd95f8d9c27">xint</a>
+</li>
+<li>operator/()
+: <a class="el" href="namespacexint.html#a701217f7824c3e935fca25147da23807">xint</a>
+</li>
+<li>operator&lt;()
+: <a class="el" href="namespacexint.html#a4f4a4771bf443e6724abbd18173ecc86">xint</a>
+</li>
+<li>operator&lt;&lt;()
+: <a class="el" href="namespacexint.html#aa5b0dc228caee6523766326cf40297cd">xint</a>
+</li>
+<li>operator&lt;=()
+: <a class="el" href="namespacexint.html#ab9d5f34c4d4bed1c86380d4f72edcd9b">xint</a>
+</li>
+<li>operator==()
+: <a class="el" href="namespacexint.html#ad32051708c2a2baafa0340e19e90217b">xint</a>
+</li>
+<li>operator&gt;()
+: <a class="el" href="namespacexint.html#a1229d1f1efbdf3ffeac8b2964ca66093">xint</a>
+</li>
+<li>operator&gt;=()
+: <a class="el" href="namespacexint.html#a766324a6f216f3b49a3e9aa885e9531c">xint</a>
+</li>
+<li>operator&gt;&gt;()
+: <a class="el" href="namespacexint.html#a27a0715c66d7350b0f3800f6e161816f">xint</a>
+</li>
+<li>operator^()
+: <a class="el" href="namespacexint.html#a81722cd257bc950ba7c56a202492544f">xint</a>
+</li>
+<li>operator|()
+: <a class="el" href="namespacexint.html#afa8f2a0ac996ad45efc73b2aa056cae2">xint</a>
+</li>
+<li>opt_secure_mode()
+: <a class="el" href="namespacexint.html#a820d89c1d761a0a2c06479b1c1f9cecd">xint</a>
+</li>
+<li>opt_thread_safe()
+: <a class="el" href="namespacexint.html#ad55aa4d44083238d9ec313511f5b1dfa">xint</a>
+</li>
+</ul>
+
+
+<h3><a class="anchor" id="index_p">- p -</a></h3><ul>
+<li>pow()
+: <a class="el" href="namespacexint.html#a186b14f991b32a818abd553b56a13a62">xint</a>
+</li>
+<li>pow2()
+: <a class="el" href="namespacexint.html#a6b723c30c28eb57f611442e0b512f551">xint</a>
+</li>
+<li>powmod()
+: <a class="el" href="namespacexint.html#ac54e9be3a8b131f882f88e57b0ef1c9c">xint</a>
+</li>
+</ul>
+
+
+<h3><a class="anchor" id="index_r">- r -</a></h3><ul>
+<li>random_by_size()
+: <a class="el" href="namespacexint.html#a5da6e81cb78913cc61c9f14857700b5e">xint</a>
+</li>
+<li>random_prime()
+: <a class="el" href="namespacexint.html#afc8ba5f62561b4d2b42e32dde1a10ef3">xint</a>
+</li>
+</ul>
+
+
+<h3><a class="anchor" id="index_s">- s -</a></h3><ul>
+<li>set_random_generator()
+: <a class="el" href="namespacexint_1_1detail.html#a5f8bba03a6f615a82ebcf94ad7cd4353">xint::detail</a>
+, <a class="el" href="namespacexint.html#a9c50302b216b64d17d9c1d6350e88036">xint</a>
+</li>
+<li>setbit()
+: <a class="el" href="namespacexint.html#adf2652627e78682c17e120816987984a">xint</a>
+</li>
+<li>shift()
+: <a class="el" href="namespacexint.html#a4f4dacd6f9398aaa500112731ab713ce">xint</a>
+</li>
+<li>shift_left()
+: <a class="el" href="namespacexint.html#a6799cc3c4d8c963279be64b209bfd3b6">xint</a>
+</li>
+<li>shift_right()
+: <a class="el" href="namespacexint.html#a49a5a4220cb88b7446545e4b65950473">xint</a>
+</li>
+<li>sqr()
+: <a class="el" href="namespacexint.html#a0aec423511839fd784b1654389dfcf5b">xint</a>
+</li>
+<li>sqrmod()
+: <a class="el" href="namespacexint.html#aa5564979e78556afdc68dbbd744a0bcb">xint</a>
+</li>
+<li>sqrt()
+: <a class="el" href="namespacexint.html#a74891726f8af86736169dd43b929ad0a">xint</a>
+</li>
+<li>subtract()
+: <a class="el" href="namespacexint.html#af196cd74cb23970032fddcce71957a80">xint</a>
+</li>
+</ul>
+
+
+<h3><a class="anchor" id="index_t">- t -</a></h3><ul>
+<li>testAddSubtract()
+: <a class="el" href="namespacexint.html#a6b7f5122683b6d924bf86c7d1507206b">xint</a>
+</li>
+<li>testBitManipulations()
+: <a class="el" href="namespacexint.html#a509778d505a3c8a0b335817150eaead2">xint</a>
+</li>
+<li>testConvert()
+: <a class="el" href="namespacexint.html#ae4ef5f20964fa995df7828f27bd7adbe">xint</a>
+</li>
+<li>testDivideMod()
+: <a class="el" href="namespacexint.html#a4ed78ff75865ae44a00d3709dd88c3a1">xint</a>
+</li>
+<li>testMontyMultiply()
+: <a class="el" href="namespacexint.html#ac40068d64f8c4d9002a0687935888c42">xint</a>
+</li>
+<li>testMontyPowerMod()
+: <a class="el" href="namespacexint.html#a9cce0401174b9ae173671b0800c5f457">xint</a>
+</li>
+<li>testMultiply()
+: <a class="el" href="namespacexint.html#affe2e221777d4263a420d014fa9640d0">xint</a>
+</li>
+<li>testStreams()
+: <a class="el" href="namespacexint.html#ae3305f62ca9be58fbc11dbd4c703f38b">xint</a>
+</li>
+<li>to()
+: <a class="el" href="namespacexint.html#a21bd738b96eec205eedc7a9960e9a6e5">xint</a>
+</li>
+<li>to_binary()
+: <a class="el" href="namespacexint.html#ab8f33201a251e3e118dc82f214e22aeb">xint</a>
+</li>
+<li>to_string()
+: <a class="el" href="namespacexint.html#a016c9573ff48411847edf86c406946a0">xint</a>
+</li>
+<li>token
+: <a class="el" href="namespacexint.html#ad63045584f06221eb6a7581ad3091582">xint</a>
+</li>
+<li>toMontgomeryForm()
+: <a class="el" href="namespacexint.html#ab8e85cd5425fcec419c07155e2a91e13">xint</a>
+</li>
+</ul>
+</div>
+<hr size="1"/><address style="text-align: right;"><small>Generated on Tue Apr 6 01:22:08 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.1 </small></address>
+</body>
+</html>

Added: sandbox/xint/doc/namespacemembers_func.html
==============================================================================
--- (empty file)
+++ sandbox/xint/doc/namespacemembers_func.html 2010-04-06 01:40:33 EDT (Tue, 06 Apr 2010)
@@ -0,0 +1,366 @@
+<!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 Members</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.1 -->
+<div class="navigation" id="top">
+ <div class="tabs">
+ <ul>
+ <li>Main Page</li>
+ <li>Related Pages</li>
+ <li class="current">Namespaces</li>
+ <li>Classes</li>
+ <li>Files</li>
+ </ul>
+ </div>
+ <div class="tabs">
+ <ul>
+ <li>Namespace List</li>
+ <li class="current">Namespace Members</li>
+ </ul>
+ </div>
+ <div class="tabs">
+ <ul>
+ <li>All</li>
+ <li class="current">Functions</li>
+ <li>Variables</li>
+ <li>Typedefs</li>
+ </ul>
+ </div>
+ <div class="tabs">
+ <ul>
+ <li>a</li>
+ <li>b</li>
+ <li>c</li>
+ <li>d</li>
+ <li>e</li>
+ <li>f</li>
+ <li>g</li>
+ <li>h</li>
+ <li>i</li>
+ <li>l</li>
+ <li>m</li>
+ <li>n</li>
+ <li>o</li>
+ <li>p</li>
+ <li>r</li>
+ <li>s</li>
+ <li>t</li>
+ </ul>
+ </div>
+</div>
+<div class="contents">
+&nbsp;
+
+<h3><a class="anchor" id="index_a">- a -</a></h3><ul>
+<li>abs()
+: <a class="el" href="namespacexint.html#ac9e4ed282bafa93dbf608350df0127ba">xint</a>
+</li>
+<li>add()
+: <a class="el" href="namespacexint.html#a7cc636a05af16eba73014bf88273d163">xint</a>
+</li>
+<li>allow_exceptions()
+: <a class="el" href="namespacexint.html#a4b5a1a791ba11bb8f158a3b56bd9723e">xint</a>
+</li>
+</ul>
+
+
+<h3><a class="anchor" id="index_b">- b -</a></h3><ul>
+<li>bitwise_and()
+: <a class="el" href="namespacexint.html#a06138585f07fe098e24718c46e3078e1">xint</a>
+</li>
+<li>bitwise_or()
+: <a class="el" href="namespacexint.html#a8cd0a0dbc779e5a75c9e2f8027474e9a">xint</a>
+</li>
+<li>bitwise_xor()
+: <a class="el" href="namespacexint.html#a9ffe18a09f5dd354af7b967b032d3cbe">xint</a>
+</li>
+<li>block_exceptions()
+: <a class="el" href="namespacexint.html#ae7e3f6afc701f6e8873a407bb418d04c">xint</a>
+</li>
+</ul>
+
+
+<h3><a class="anchor" id="index_c">- c -</a></h3><ul>
+<li>clearbit()
+: <a class="el" href="namespacexint.html#a8982e3e3ab7c1c763416eadc479d9724">xint</a>
+</li>
+<li>compare()
+: <a class="el" href="namespacexint.html#aff82dd47fae4297b96282371abf4db06">xint</a>
+</li>
+</ul>
+
+
+<h3><a class="anchor" id="index_d">- d -</a></h3><ul>
+<li>divide()
+: <a class="el" href="namespacexint.html#abf3d47f1ef1fdf334097fab055886a44">xint</a>
+</li>
+<li>divide_r()
+: <a class="el" href="namespacexint.html#a23d0a0bb05cec1917d96d6aaceeb875d">xint</a>
+</li>
+</ul>
+
+
+<h3><a class="anchor" id="index_e">- e -</a></h3><ul>
+<li>exceptions_allowed()
+: <a class="el" href="namespacexint.html#ac8be41374700d89400f5ecddf0f789e3">xint</a>
+</li>
+</ul>
+
+
+<h3><a class="anchor" id="index_f">- f -</a></h3><ul>
+<li>factorial()
+: <a class="el" href="namespacexint.html#aba188df925c87a0f33a79328e31e1a50">xint</a>
+</li>
+<li>from_binary()
+: <a class="el" href="namespacexint.html#ac2ac2f74b45e4179560d845e6310be9a">xint</a>
+</li>
+<li>from_string()
+: <a class="el" href="namespacexint.html#ad9dcb2b835be5f8ee918979945911ac0">xint</a>
+</li>
+<li>fromMontgomeryForm()
+: <a class="el" href="namespacexint.html#a93ed16c5350b34ca22108e48b51918a5">xint</a>
+</li>
+</ul>
+
+
+<h3><a class="anchor" id="index_g">- g -</a></h3><ul>
+<li>gcd()
+: <a class="el" href="namespacexint.html#ac9e11516ac502e97be1902cde50f97e7">xint</a>
+</li>
+<li>get_random()
+: <a class="el" href="namespacexint_1_1detail.html#a1dfc1e90886c4897a4b112f491b89b62">xint::detail</a>
+</li>
+<li>getbit()
+: <a class="el" href="namespacexint.html#a07bc7378c8a55e5f92aaef6d8b8ce952">xint</a>
+</li>
+</ul>
+
+
+<h3><a class="anchor" id="index_h">- h -</a></h3><ul>
+<li>highestbit()
+: <a class="el" href="namespacexint.html#ae08828243165ef3f397461507368a6e5">xint</a>
+</li>
+</ul>
+
+
+<h3><a class="anchor" id="index_i">- i -</a></h3><ul>
+<li>inverse0()
+: <a class="el" href="namespacexint.html#afd561fd7c7631267fbc7e5c75c2bde71">xint</a>
+</li>
+<li>invmod()
+: <a class="el" href="namespacexint.html#a4a79f60ebe198eadf10b63924018ce66">xint</a>
+</li>
+<li>is_prime()
+: <a class="el" href="namespacexint.html#ab205c4e52dbc6825cefe3a251f6ca99f">xint</a>
+</li>
+</ul>
+
+
+<h3><a class="anchor" id="index_l">- l -</a></h3><ul>
+<li>lcm()
+: <a class="el" href="namespacexint.html#a17c5e4e807cfa425f48d9f5b464bc8dc">xint</a>
+</li>
+<li>log2()
+: <a class="el" href="namespacexint.html#aa074495871d366c760c5b0713f5ef048">xint</a>
+</li>
+<li>lowestbit()
+: <a class="el" href="namespacexint.html#ae04d70f50c4ce73d27ab32b1bf3520f2">xint</a>
+</li>
+</ul>
+
+
+<h3><a class="anchor" id="index_m">- m -</a></h3><ul>
+<li>mod()
+: <a class="el" href="namespacexint.html#ad5a8cc6e57ee8abdc21be98275657cc8">xint</a>
+</li>
+<li>montgomeryMultiplyMod()
+: <a class="el" href="namespacexint.html#a722769c7d01e06d9f82eae07a280160c">xint</a>
+</li>
+<li>montgomeryPowerMod()
+: <a class="el" href="namespacexint.html#a7d7e8604c467bc007820c60e1bc21626">xint</a>
+</li>
+<li>montgomeryR()
+: <a class="el" href="namespacexint.html#aaf3b26669d4e61f6af5dcae42b20e08b">xint</a>
+</li>
+<li>mulmod()
+: <a class="el" href="namespacexint.html#adbbde6cc4b65e9a3df8c52adad9c540f">xint</a>
+</li>
+<li>multiply()
+: <a class="el" href="namespacexint.html#af3d7059ec08bf075cec5685deca55c5d">xint</a>
+</li>
+</ul>
+
+
+<h3><a class="anchor" id="index_n">- n -</a></h3><ul>
+<li>negate()
+: <a class="el" href="namespacexint.html#ab393826381b1abd9f1aca1cdb45f41f6">xint</a>
+</li>
+</ul>
+
+
+<h3><a class="anchor" id="index_o">- o -</a></h3><ul>
+<li>operator!()
+: <a class="el" href="namespacexint.html#a675c4fe6ddda6db915450d054ed640ba">xint</a>
+</li>
+<li>operator!=()
+: <a class="el" href="namespacexint.html#aefda934d0ffacd0f44fcbbdfee19a139">xint</a>
+</li>
+<li>operator%()
+: <a class="el" href="namespacexint.html#ae0505757986a9c7133552552471aae24">xint</a>
+</li>
+<li>operator&amp;()
+: <a class="el" href="namespacexint.html#a742550f1c62ac8c2bde8e1ceab2a466c">xint</a>
+</li>
+<li>operator*()
+: <a class="el" href="namespacexint.html#aea36ad9037f109576d4f95ec72b5c825">xint</a>
+</li>
+<li>operator+()
+: <a class="el" href="namespacexint.html#a586fb0eb69100ec74be94008ac26670d">xint</a>
+</li>
+<li>operator-()
+: <a class="el" href="namespacexint.html#a8a510361ed458133ebfa5fd95f8d9c27">xint</a>
+</li>
+<li>operator/()
+: <a class="el" href="namespacexint.html#a701217f7824c3e935fca25147da23807">xint</a>
+</li>
+<li>operator&lt;()
+: <a class="el" href="namespacexint.html#a4f4a4771bf443e6724abbd18173ecc86">xint</a>
+</li>
+<li>operator&lt;&lt;()
+: <a class="el" href="namespacexint.html#aa5b0dc228caee6523766326cf40297cd">xint</a>
+</li>
+<li>operator&lt;=()
+: <a class="el" href="namespacexint.html#ab9d5f34c4d4bed1c86380d4f72edcd9b">xint</a>
+</li>
+<li>operator==()
+: <a class="el" href="namespacexint.html#ad32051708c2a2baafa0340e19e90217b">xint</a>
+</li>
+<li>operator&gt;()
+: <a class="el" href="namespacexint.html#a1229d1f1efbdf3ffeac8b2964ca66093">xint</a>
+</li>
+<li>operator&gt;=()
+: <a class="el" href="namespacexint.html#a766324a6f216f3b49a3e9aa885e9531c">xint</a>
+</li>
+<li>operator&gt;&gt;()
+: <a class="el" href="namespacexint.html#a27a0715c66d7350b0f3800f6e161816f">xint</a>
+</li>
+<li>operator^()
+: <a class="el" href="namespacexint.html#a81722cd257bc950ba7c56a202492544f">xint</a>
+</li>
+<li>operator|()
+: <a class="el" href="namespacexint.html#afa8f2a0ac996ad45efc73b2aa056cae2">xint</a>
+</li>
+<li>opt_secure_mode()
+: <a class="el" href="namespacexint.html#a820d89c1d761a0a2c06479b1c1f9cecd">xint</a>
+</li>
+<li>opt_thread_safe()
+: <a class="el" href="namespacexint.html#ad55aa4d44083238d9ec313511f5b1dfa">xint</a>
+</li>
+</ul>
+
+
+<h3><a class="anchor" id="index_p">- p -</a></h3><ul>
+<li>pow()
+: <a class="el" href="namespacexint.html#a186b14f991b32a818abd553b56a13a62">xint</a>
+</li>
+<li>pow2()
+: <a class="el" href="namespacexint.html#a6b723c30c28eb57f611442e0b512f551">xint</a>
+</li>
+<li>powmod()
+: <a class="el" href="namespacexint.html#ac54e9be3a8b131f882f88e57b0ef1c9c">xint</a>
+</li>
+</ul>
+
+
+<h3><a class="anchor" id="index_r">- r -</a></h3><ul>
+<li>random_by_size()
+: <a class="el" href="namespacexint.html#a5da6e81cb78913cc61c9f14857700b5e">xint</a>
+</li>
+<li>random_prime()
+: <a class="el" href="namespacexint.html#afc8ba5f62561b4d2b42e32dde1a10ef3">xint</a>
+</li>
+</ul>
+
+
+<h3><a class="anchor" id="index_s">- s -</a></h3><ul>
+<li>set_random_generator()
+: <a class="el" href="namespacexint_1_1detail.html#a5f8bba03a6f615a82ebcf94ad7cd4353">xint::detail</a>
+, <a class="el" href="namespacexint.html#a9c50302b216b64d17d9c1d6350e88036">xint</a>
+</li>
+<li>setbit()
+: <a class="el" href="namespacexint.html#adf2652627e78682c17e120816987984a">xint</a>
+</li>
+<li>shift()
+: <a class="el" href="namespacexint.html#a4f4dacd6f9398aaa500112731ab713ce">xint</a>
+</li>
+<li>shift_left()
+: <a class="el" href="namespacexint.html#a6799cc3c4d8c963279be64b209bfd3b6">xint</a>
+</li>
+<li>shift_right()
+: <a class="el" href="namespacexint.html#a49a5a4220cb88b7446545e4b65950473">xint</a>
+</li>
+<li>sqr()
+: <a class="el" href="namespacexint.html#a0aec423511839fd784b1654389dfcf5b">xint</a>
+</li>
+<li>sqrmod()
+: <a class="el" href="namespacexint.html#aa5564979e78556afdc68dbbd744a0bcb">xint</a>
+</li>
+<li>sqrt()
+: <a class="el" href="namespacexint.html#a74891726f8af86736169dd43b929ad0a">xint</a>
+</li>
+<li>subtract()
+: <a class="el" href="namespacexint.html#af196cd74cb23970032fddcce71957a80">xint</a>
+</li>
+</ul>
+
+
+<h3><a class="anchor" id="index_t">- t -</a></h3><ul>
+<li>testAddSubtract()
+: <a class="el" href="namespacexint.html#a6b7f5122683b6d924bf86c7d1507206b">xint</a>
+</li>
+<li>testBitManipulations()
+: <a class="el" href="namespacexint.html#a509778d505a3c8a0b335817150eaead2">xint</a>
+</li>
+<li>testConvert()
+: <a class="el" href="namespacexint.html#ae4ef5f20964fa995df7828f27bd7adbe">xint</a>
+</li>
+<li>testDivideMod()
+: <a class="el" href="namespacexint.html#a4ed78ff75865ae44a00d3709dd88c3a1">xint</a>
+</li>
+<li>testMontyMultiply()
+: <a class="el" href="namespacexint.html#ac40068d64f8c4d9002a0687935888c42">xint</a>
+</li>
+<li>testMontyPowerMod()
+: <a class="el" href="namespacexint.html#a9cce0401174b9ae173671b0800c5f457">xint</a>
+</li>
+<li>testMultiply()
+: <a class="el" href="namespacexint.html#affe2e221777d4263a420d014fa9640d0">xint</a>
+</li>
+<li>testStreams()
+: <a class="el" href="namespacexint.html#ae3305f62ca9be58fbc11dbd4c703f38b">xint</a>
+</li>
+<li>to()
+: <a class="el" href="namespacexint.html#a21bd738b96eec205eedc7a9960e9a6e5">xint</a>
+</li>
+<li>to_binary()
+: <a class="el" href="namespacexint.html#ab8f33201a251e3e118dc82f214e22aeb">xint</a>
+</li>
+<li>to_string()
+: <a class="el" href="namespacexint.html#a016c9573ff48411847edf86c406946a0">xint</a>
+</li>
+<li>toMontgomeryForm()
+: <a class="el" href="namespacexint.html#ab8e85cd5425fcec419c07155e2a91e13">xint</a>
+</li>
+</ul>
+</div>
+<hr size="1"/><address style="text-align: right;"><small>Generated on Tue Apr 6 01:22:08 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.1 </small></address>
+</body>
+</html>

Added: sandbox/xint/doc/namespacemembers_type.html
==============================================================================
--- (empty file)
+++ sandbox/xint/doc/namespacemembers_type.html 2010-04-06 01:40:33 EDT (Tue, 06 Apr 2010)
@@ -0,0 +1,56 @@
+<!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 Members</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.1 -->
+<div class="navigation" id="top">
+ <div class="tabs">
+ <ul>
+ <li>Main Page</li>
+ <li>Related Pages</li>
+ <li class="current">Namespaces</li>
+ <li>Classes</li>
+ <li>Files</li>
+ </ul>
+ </div>
+ <div class="tabs">
+ <ul>
+ <li>Namespace List</li>
+ <li class="current">Namespace Members</li>
+ </ul>
+ </div>
+ <div class="tabs">
+ <ul>
+ <li>All</li>
+ <li>Functions</li>
+ <li>Variables</li>
+ <li class="current">Typedefs</li>
+ </ul>
+ </div>
+</div>
+<div class="contents">
+&nbsp;<ul>
+<li>callback_t
+: <a class="el" href="namespacexint.html#ac8a660c33746c536469d347307b8da7a">xint</a>
+</li>
+<li>digit_t
+: <a class="el" href="namespacexint_1_1detail.html#a8843fb7e364832d8d5983de28bdbcf34">xint::detail</a>
+</li>
+<li>doubledigit_t
+: <a class="el" href="namespacexint_1_1detail.html#aceb9b654c1c2daaf377b31bd4a089750">xint::detail</a>
+</li>
+<li>token
+: <a class="el" href="namespacexint.html#ad63045584f06221eb6a7581ad3091582">xint</a>
+</li>
+</ul>
+</div>
+<hr size="1"/><address style="text-align: right;"><small>Generated on Tue Apr 6 01:22:08 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.1 </small></address>
+</body>
+</html>

Added: sandbox/xint/doc/namespacemembers_vars.html
==============================================================================
--- (empty file)
+++ sandbox/xint/doc/namespacemembers_vars.html 2010-04-06 01:40:33 EDT (Tue, 06 Apr 2010)
@@ -0,0 +1,68 @@
+<!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 Members</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.1 -->
+<div class="navigation" id="top">
+ <div class="tabs">
+ <ul>
+ <li>Main Page</li>
+ <li>Related Pages</li>
+ <li class="current">Namespaces</li>
+ <li>Classes</li>
+ <li>Files</li>
+ </ul>
+ </div>
+ <div class="tabs">
+ <ul>
+ <li>Namespace List</li>
+ <li class="current">Namespace Members</li>
+ </ul>
+ </div>
+ <div class="tabs">
+ <ul>
+ <li>All</li>
+ <li>Functions</li>
+ <li class="current">Variables</li>
+ <li>Typedefs</li>
+ </ul>
+ </div>
+</div>
+<div class="contents">
+&nbsp;<ul>
+<li>autobase
+: <a class="el" href="namespacexint.html#a7a5434a5f5fb1db19f0de18014c4fc41">xint</a>
+</li>
+<li>bits_per_digit
+: <a class="el" href="namespacexint_1_1detail.html#a9bd9e8d55061238d63913020d2721518">xint::detail</a>
+</li>
+<li>digit_hibit
+: <a class="el" href="namespacexint_1_1detail.html#a116bb5ce94c55f0eae3338d69fd5e8eb">xint::detail</a>
+</li>
+<li>digit_mask
+: <a class="el" href="namespacexint_1_1detail.html#a051753e1bf43dcc77eaa93b8d4e49197">xint::detail</a>
+</li>
+<li>digit_overflowbit
+: <a class="el" href="namespacexint_1_1detail.html#a6746855fd8cde164294a46108d502e6a">xint::detail</a>
+</li>
+<li>doubledigit_hibit
+: <a class="el" href="namespacexint_1_1detail.html#a2af0686427ee285bd715330f12fcbc1c">xint::detail</a>
+</li>
+<li>nan_text
+: <a class="el" href="namespacexint_1_1detail.html#aede27c67f3308e0805fc3093ffe6f4ce">xint::detail</a>
+</li>
+<li>no_callback
+: <a class="el" href="namespacexint.html#a44496f258b36237d4cea35558a71017a">xint</a>
+</li>
+</ul>
+</div>
+<hr size="1"/><address style="text-align: right;"><small>Generated on Tue Apr 6 01:22:08 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.1 </small></address>
+</body>
+</html>

Added: sandbox/xint/doc/namespaces.html
==============================================================================
--- (empty file)
+++ sandbox/xint/doc/namespaces.html 2010-04-06 01:40:33 EDT (Tue, 06 Apr 2010)
@@ -0,0 +1,38 @@
+<!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: Namespace Index</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.1 -->
+<div class="navigation" id="top">
+ <div class="tabs">
+ <ul>
+ <li>Main Page</li>
+ <li>Related Pages</li>
+ <li class="current">Namespaces</li>
+ <li>Classes</li>
+ <li>Files</li>
+ </ul>
+ </div>
+ <div class="tabs">
+ <ul>
+ <li class="current">Namespace List</li>
+ <li>Namespace Members</li>
+ </ul>
+ </div>
+</div>
+<div class="contents">
+<h1>Namespace List</h1>Here is a list of all namespaces with brief descriptions:<table>
+ <tr><td class="indexkey"><a class="el" href="namespacexint.html">xint</a></td><td class="indexvalue">All of the functions in the XInt library are within this namespace </td></tr>
+ <tr><td class="indexkey"><a class="el" href="namespacexint_1_1detail.html">xint::detail</a></td><td class="indexvalue">The items within this namespace are meant for internal use only </td></tr>
+</table>
+</div>
+<hr size="1"/><address style="text-align: right;"><small>Generated on Tue Apr 6 01:22:08 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.1 </small></address>
+</body>
+</html>

Added: sandbox/xint/doc/namespacexint.html
==============================================================================
--- (empty file)
+++ sandbox/xint/doc/namespacexint.html 2010-04-06 01:40:33 EDT (Tue, 06 Apr 2010)
@@ -0,0 +1,2795 @@
+<!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: xint Namespace 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.1 -->
+<div class="navigation" id="top">
+ <div class="tabs">
+ <ul>
+ <li>Main Page</li>
+ <li>Related Pages</li>
+ <li class="current">Namespaces</li>
+ <li>Classes</li>
+ <li>Files</li>
+ </ul>
+ </div>
+ <div class="tabs">
+ <ul>
+ <li>Namespace List</li>
+ <li>Namespace Members</li>
+ </ul>
+ </div>
+</div>
+<div class="contents">
+<h1>xint Namespace Reference</h1>
+<p>All of the functions in the XInt library are within this namespace.
+More...</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="namespacexint_1_1detail.html">detail</a></td></tr>
+
+<p><tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight"><p>The items within this namespace are meant for internal use only. </p>
+<br/></td></tr>
+</p>
+<tr><td colspan="2"><h2>Classes</h2></td></tr>
+<tr><td class="memItemLeft" align="right" valign="top">class &nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classxint_1_1integer.html">integer</a></td></tr>
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">The extended integer class. More...<br/></td></tr>
+<tr><td class="memItemLeft" align="right" valign="top">class &nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classxint_1_1strong__random__generator.html">strong_random_generator</a></td></tr>
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">A convenience class for cryptographically-secure random numbers. More...<br/></td></tr>
+<tr><td class="memItemLeft" align="right" valign="top">class &nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classxint_1_1invalid__base.html">invalid_base</a></td></tr>
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Exception class. More...<br/></td></tr>
+<tr><td class="memItemLeft" align="right" valign="top">class &nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classxint_1_1invalid__digit.html">invalid_digit</a></td></tr>
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Exception class. More...<br/></td></tr>
+<tr><td class="memItemLeft" align="right" valign="top">class &nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classxint_1_1invalid__modulus.html">invalid_modulus</a></td></tr>
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Exception class. More...<br/></td></tr>
+<tr><td class="memItemLeft" align="right" valign="top">class &nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classxint_1_1divide__by__zero.html">divide_by_zero</a></td></tr>
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Exception class. More...<br/></td></tr>
+<tr><td class="memItemLeft" align="right" valign="top">class &nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classxint_1_1cannot__represent.html">cannot_represent</a></td></tr>
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Exception class. More...<br/></td></tr>
+<tr><td class="memItemLeft" align="right" valign="top">class &nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classxint_1_1too__big.html">too_big</a></td></tr>
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Exception class. More...<br/></td></tr>
+<tr><td class="memItemLeft" align="right" valign="top">class &nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classxint_1_1not__a__number.html">not_a_number</a></td></tr>
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Exception class. More...<br/></td></tr>
+<tr><td class="memItemLeft" align="right" valign="top">class &nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classxint_1_1no__strong__random.html">no_strong_random</a></td></tr>
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Exception class. More...<br/></td></tr>
+<tr><td class="memItemLeft" align="right" valign="top">class &nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classxint_1_1overflow__error.html">overflow_error</a></td></tr>
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Exception class. More...<br/></td></tr>
+<tr><td colspan="2"><h2>Typedefs</h2></td></tr>
+<tr><td class="memItemLeft" align="right" valign="top">typedef std::auto_ptr<br class="typebreak"/>
+&lt; <a class="el" href="structxint_1_1detail_1_1token.html">detail::token</a> &gt;&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespacexint.html#ad63045584f06221eb6a7581ad3091582">token</a></td></tr>
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Used for the exception-blocker. <br/></td></tr>
+<tr><td class="memItemLeft" align="right" valign="top">typedef boost::function&lt; bool()&gt;&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespacexint.html#ac8a660c33746c536469d347307b8da7a">callback_t</a></td></tr>
+<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>
+<br/><br/></div></td></tr>
+<tr><td class="memItemLeft" align="right" valign="top">bool&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespacexint.html#a07bc7378c8a55e5f92aaef6d8b8ce952">getbit</a> (const <a class="el" href="classxint_1_1integer.html">integer</a> &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 <a class="el" href="classxint_1_1integer.html" title="The extended integer class.">integer</a>. <br/></td></tr>
+<tr><td class="memItemLeft" align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespacexint.html#adf2652627e78682c17e120816987984a">setbit</a> (<a class="el" href="classxint_1_1integer.html">integer</a> &amp;n, size_t bit)</td></tr>
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Sets a specific bit in an <a class="el" href="classxint_1_1integer.html" title="The extended integer class.">integer</a> to one. <br/></td></tr>
+<tr><td class="memItemLeft" align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespacexint.html#a8982e3e3ab7c1c763416eadc479d9724">clearbit</a> (<a class="el" href="classxint_1_1integer.html">integer</a> &amp;n, size_t bit)</td></tr>
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Sets a specific bit in an <a class="el" href="classxint_1_1integer.html" title="The extended integer class.">integer</a> to zero. <br/></td></tr>
+<tr><td class="memItemLeft" align="right" valign="top">size_t&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespacexint.html#ae04d70f50c4ce73d27ab32b1bf3520f2">lowestbit</a> (const <a class="el" href="classxint_1_1integer.html">integer</a> &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 <a class="el" href="classxint_1_1integer.html" title="The extended integer class.">integer</a> 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="namespacexint.html#ae08828243165ef3f397461507368a6e5">highestbit</a> (const <a class="el" href="classxint_1_1integer.html">integer</a> &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 <a class="el" href="classxint_1_1integer.html" title="The extended integer class.">integer</a> with a value of one. <br/></td></tr>
+<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="classxint_1_1integer.html">integer</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespacexint.html#a06138585f07fe098e24718c46e3078e1">bitwise_and</a> (const <a class="el" href="classxint_1_1integer.html">integer</a> &amp;n1, const <a class="el" href="classxint_1_1integer.html">integer</a> &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"><a class="el" href="classxint_1_1integer.html">integer</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespacexint.html#a8cd0a0dbc779e5a75c9e2f8027474e9a">bitwise_or</a> (const <a class="el" href="classxint_1_1integer.html">integer</a> &amp;n1, const <a class="el" href="classxint_1_1integer.html">integer</a> &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"><a class="el" href="classxint_1_1integer.html">integer</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespacexint.html#a9ffe18a09f5dd354af7b967b032d3cbe">bitwise_xor</a> (const <a class="el" href="classxint_1_1integer.html">integer</a> &amp;n1, const <a class="el" href="classxint_1_1integer.html">integer</a> &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"><a class="el" href="classxint_1_1integer.html">integer</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespacexint.html#a4f4dacd6f9398aaa500112731ab713ce">shift</a> (const <a class="el" href="classxint_1_1integer.html">integer</a> &amp;n, int byBits)</td></tr>
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Bit-shift an <a class="el" href="classxint_1_1integer.html" title="The extended integer class.">integer</a>, in either direction. <br/></td></tr>
+<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="classxint_1_1integer.html">integer</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespacexint.html#a6799cc3c4d8c963279be64b209bfd3b6">shift_left</a> (const <a class="el" href="classxint_1_1integer.html">integer</a> &amp;n, size_t byBits)</td></tr>
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Left-shift an <a class="el" href="classxint_1_1integer.html" title="The extended integer class.">integer</a> by a specified number of bits. <br/></td></tr>
+<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="classxint_1_1integer.html">integer</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespacexint.html#a49a5a4220cb88b7446545e4b65950473">shift_right</a> (const <a class="el" href="classxint_1_1integer.html">integer</a> &amp;n, size_t byBits)</td></tr>
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Right-shift an <a class="el" href="classxint_1_1integer.html" title="The extended integer class.">integer</a> by a specified number of bits. <br/></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="amgrp458f92801f3edfaf2e30b1f530c324e2"></a> </p>
+<br/><br/></div></td></tr>
+<tr><td class="memItemLeft" align="right" valign="top">int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespacexint.html#aff82dd47fae4297b96282371abf4db06">compare</a> (const <a class="el" href="classxint_1_1integer.html">integer</a> &amp;b1, const <a class="el" href="classxint_1_1integer.html">integer</a> &amp;b2, bool ignoresign)</td></tr>
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Compare two <a class="el" href="classxint_1_1integer.html" title="The extended integer class.">integer</a> objects. <br/></td></tr>
+<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="classxint_1_1integer.html">integer</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespacexint.html#ac9e11516ac502e97be1902cde50f97e7">gcd</a> (const <a class="el" href="classxint_1_1integer.html">integer</a> &amp;num1, const <a class="el" href="classxint_1_1integer.html">integer</a> &amp;num2)</td></tr>
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Calculate the Greatest Common Denominator of two integers. <br/></td></tr>
+<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="classxint_1_1integer.html">integer</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespacexint.html#a17c5e4e807cfa425f48d9f5b464bc8dc">lcm</a> (const <a class="el" href="classxint_1_1integer.html">integer</a> &amp;num1, const <a class="el" href="classxint_1_1integer.html">integer</a> &amp;num2)</td></tr>
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Calculate the Least Common Multiple of two integers. <br/></td></tr>
+<tr><td class="memItemLeft" align="right" valign="top">bool&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespacexint.html#a820d89c1d761a0a2c06479b1c1f9cecd">opt_secure_mode</a> ()</td></tr>
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Tells whether the library was compiled with <a class="el" href="securemode.html">Secure Mode </a> enabled. <br/></td></tr>
+<tr><td class="memItemLeft" align="right" valign="top">bool&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespacexint.html#ad55aa4d44083238d9ec313511f5b1dfa">opt_thread_safe</a> ()</td></tr>
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Tells whether the library was compiled with the <a class="el" href="threadsafe.html">Thread Safe Operation option </a> enabled. <br/></td></tr>
+<tr><td class="memItemLeft" align="right" valign="top">size_t&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespacexint.html#aa074495871d366c760c5b0713f5ef048">log2</a> (const <a class="el" href="classxint_1_1integer.html">integer</a> &amp;n)</td></tr>
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Get the log<sub>2</sub> value of an <a class="el" href="classxint_1_1integer.html" title="The extended integer class.">integer</a>. <br/></td></tr>
+<tr><td colspan="2"><div class="groupHeader">Operators</div></td></tr>
+<tr><td colspan="2"><div class="groupText"><p><a class="anchor" id="amgrpb3c5827f54218753bb2c3338236446c2"></a> These act exactly the same as for the built-in integer types. </p>
+<br/><br/></div></td></tr>
+<tr><td class="memItemLeft" align="right" valign="top">bool&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespacexint.html#a675c4fe6ddda6db915450d054ed640ba">operator!</a> (const <a class="el" href="classxint_1_1integer.html">xint::integer</a> &amp;num1)</td></tr>
+<tr><td class="memItemLeft" align="right" valign="top">bool&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespacexint.html#ad32051708c2a2baafa0340e19e90217b">operator==</a> (const <a class="el" href="classxint_1_1integer.html">xint::integer</a> &amp;num1, const <a class="el" href="classxint_1_1integer.html">xint::integer</a> &amp;num2)</td></tr>
+<tr><td class="memItemLeft" align="right" valign="top">bool&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespacexint.html#aefda934d0ffacd0f44fcbbdfee19a139">operator!=</a> (const <a class="el" href="classxint_1_1integer.html">xint::integer</a> &amp;num1, const <a class="el" href="classxint_1_1integer.html">xint::integer</a> &amp;num2)</td></tr>
+<tr><td class="memItemLeft" align="right" valign="top">bool&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespacexint.html#a4f4a4771bf443e6724abbd18173ecc86">operator&lt;</a> (const <a class="el" href="classxint_1_1integer.html">xint::integer</a> &amp;num1, const <a class="el" href="classxint_1_1integer.html">xint::integer</a> &amp;num2)</td></tr>
+<tr><td class="memItemLeft" align="right" valign="top">bool&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespacexint.html#a1229d1f1efbdf3ffeac8b2964ca66093">operator&gt;</a> (const <a class="el" href="classxint_1_1integer.html">xint::integer</a> &amp;num1, const <a class="el" href="classxint_1_1integer.html">xint::integer</a> &amp;num2)</td></tr>
+<tr><td class="memItemLeft" align="right" valign="top">bool&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespacexint.html#ab9d5f34c4d4bed1c86380d4f72edcd9b">operator&lt;=</a> (const <a class="el" href="classxint_1_1integer.html">xint::integer</a> &amp;num1, const <a class="el" href="classxint_1_1integer.html">xint::integer</a> &amp;num2)</td></tr>
+<tr><td class="memItemLeft" align="right" valign="top">bool&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespacexint.html#a766324a6f216f3b49a3e9aa885e9531c">operator&gt;=</a> (const <a class="el" href="classxint_1_1integer.html">xint::integer</a> &amp;num1, const <a class="el" href="classxint_1_1integer.html">xint::integer</a> &amp;num2)</td></tr>
+<tr><td class="memItemLeft" align="right" valign="top">const <a class="el" href="classxint_1_1integer.html">integer</a> &amp;&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespacexint.html#a586fb0eb69100ec74be94008ac26670d">operator+</a> (const <a class="el" href="classxint_1_1integer.html">integer</a> &amp;a)</td></tr>
+<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="classxint_1_1integer.html">integer</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespacexint.html#a8a510361ed458133ebfa5fd95f8d9c27">operator-</a> (const <a class="el" href="classxint_1_1integer.html">integer</a> &amp;a)</td></tr>
+<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="classxint_1_1integer.html">integer</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespacexint.html#a211ff80bb081c08674272cfcae736a93">operator+</a> (const <a class="el" href="classxint_1_1integer.html">integer</a> &amp;num1, const <a class="el" href="classxint_1_1integer.html">integer</a> &amp;num2)</td></tr>
+<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="classxint_1_1integer.html">integer</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespacexint.html#a1e09422b575c6d29ea5c0d627b79c28e">operator-</a> (const <a class="el" href="classxint_1_1integer.html">integer</a> &amp;num1, const <a class="el" href="classxint_1_1integer.html">integer</a> &amp;num2)</td></tr>
+<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="classxint_1_1integer.html">integer</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespacexint.html#aea36ad9037f109576d4f95ec72b5c825">operator*</a> (const <a class="el" href="classxint_1_1integer.html">integer</a> &amp;num1, const <a class="el" href="classxint_1_1integer.html">integer</a> &amp;num2)</td></tr>
+<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="classxint_1_1integer.html">integer</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespacexint.html#a701217f7824c3e935fca25147da23807">operator/</a> (const <a class="el" href="classxint_1_1integer.html">integer</a> &amp;num1, const <a class="el" href="classxint_1_1integer.html">integer</a> &amp;num2)</td></tr>
+<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="classxint_1_1integer.html">integer</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespacexint.html#ae0505757986a9c7133552552471aae24">operator%</a> (const <a class="el" href="classxint_1_1integer.html">integer</a> &amp;num1, const <a class="el" href="classxint_1_1integer.html">integer</a> &amp;num2)</td></tr>
+<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="classxint_1_1integer.html">integer</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespacexint.html#a742550f1c62ac8c2bde8e1ceab2a466c">operator&amp;</a> (const <a class="el" href="classxint_1_1integer.html">integer</a> &amp;n1, const <a class="el" href="classxint_1_1integer.html">integer</a> &amp;n2)</td></tr>
+<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="classxint_1_1integer.html">integer</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespacexint.html#afa8f2a0ac996ad45efc73b2aa056cae2">operator|</a> (const <a class="el" href="classxint_1_1integer.html">integer</a> &amp;n1, const <a class="el" href="classxint_1_1integer.html">integer</a> &amp;n2)</td></tr>
+<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="classxint_1_1integer.html">integer</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespacexint.html#a81722cd257bc950ba7c56a202492544f">operator^</a> (const <a class="el" href="classxint_1_1integer.html">integer</a> &amp;n1, const <a class="el" href="classxint_1_1integer.html">integer</a> &amp;n2)</td></tr>
+<tr><td colspan="2"><div class="groupHeader">Conversion functions</div></td></tr>
+<tr><td colspan="2"><div class="groupText"><p><a class="anchor" id="amgrp9c2e8a06d85d2c9b83b5a0d27e85d535"></a> </p>
+<br/><br/></div></td></tr>
+<tr><td class="memItemLeft" align="right" valign="top">std::string&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespacexint.html#a016c9573ff48411847edf86c406946a0">to_string</a> (const <a class="el" href="classxint_1_1integer.html">integer</a> &amp;n, size_t base, bool uppercase)</td></tr>
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Creates a string representation of the specified <a class="el" href="classxint_1_1integer.html" title="The extended integer class.">integer</a>. <br/></td></tr>
+<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="classxint_1_1integer.html">integer</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespacexint.html#ad9dcb2b835be5f8ee918979945911ac0">from_string</a> (const std::string &amp;str, size_t base)</td></tr>
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Converts a string into an <a class="el" href="classxint_1_1integer.html" title="The extended integer class.">integer</a>. <br/></td></tr>
+<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="classxint_1_1integer.html">integer</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespacexint.html#ac2ac2f74b45e4179560d845e6310be9a">from_binary</a> (const std::string &amp;str)</td></tr>
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Converts a binary representation of a number into an <a class="el" href="classxint_1_1integer.html" title="The extended integer class.">integer</a>. <br/></td></tr>
+<tr><td class="memItemLeft" align="right" valign="top">std::string&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespacexint.html#ab8f33201a251e3e118dc82f214e22aeb">to_binary</a> (const <a class="el" href="classxint_1_1integer.html">integer</a> &amp;n)</td></tr>
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Creates a binary representation of an <a class="el" href="classxint_1_1integer.html" title="The extended integer class.">integer</a>, lowest byte first. <br/></td></tr>
+<tr><td class="memTemplParams" colspan="2">template&lt;typename T &gt; </td></tr>
+<tr><td class="memTemplItemLeft" align="right" valign="top">T&nbsp;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="namespacexint.html#a21bd738b96eec205eedc7a9960e9a6e5">to</a> (const <a class="el" href="classxint_1_1integer.html">integer</a> &amp;n)</td></tr>
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Efficiently converts from an <a class="el" href="classxint_1_1integer.html" title="The extended integer class.">xint::integer</a> to a built-in integer type. <br/></td></tr>
+<tr><td colspan="2"><div class="groupHeader">Exception-blocking and -allowing functions</div></td></tr>
+<tr><td colspan="2"><div class="groupText"><p><a class="anchor" id="amgrp6b736a9df3b9afabec548528235f28b6"></a> See the <a class="el" href="exceptions.html">exception-blocking page</a> for details on these functions and how to use them. </p>
+<br/><br/></div></td></tr>
+<tr><td class="memItemLeft" align="right" valign="top">bool&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespacexint.html#ac8be41374700d89400f5ecddf0f789e3">exceptions_allowed</a> ()</td></tr>
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Query whether exceptions are currently allowed or blocked. <br/></td></tr>
+<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="structxint_1_1detail_1_1token.html">token</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespacexint.html#ae7e3f6afc701f6e8873a407bb418d04c">block_exceptions</a> ()</td></tr>
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Temporarily prevent the library from throwing blockable exceptions. <br/></td></tr>
+<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="structxint_1_1detail_1_1token.html">token</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespacexint.html#a4b5a1a791ba11bb8f158a3b56bd9723e">allow_exceptions</a> ()</td></tr>
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Temprarily counteract an <a class="el" href="namespacexint.html#ae7e3f6afc701f6e8873a407bb418d04c" title="Temporarily prevent the library from throwing blockable exceptions.">xint::block_exceptions</a> token to allow all exceptions. <br/></td></tr>
+<tr><td colspan="2"><div class="groupHeader">Modular math functions</div></td></tr>
+<tr><td colspan="2"><div class="groupText"><p><a class="anchor" id="amgrpbf63e6a6a1029bb25b7aa51052b38655"></a>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. </p>
+<br/><br/></div></td></tr>
+<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="classxint_1_1integer.html">integer</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespacexint.html#a4a79f60ebe198eadf10b63924018ce66">invmod</a> (const <a class="el" href="classxint_1_1integer.html">integer</a> &amp;n, const <a class="el" href="classxint_1_1integer.html">integer</a> &amp;m)</td></tr>
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Get the modular inverse of a number in a modulus, if there is one. <br/></td></tr>
+<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="classxint_1_1integer.html">integer</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespacexint.html#ad5a8cc6e57ee8abdc21be98275657cc8">mod</a> (const <a class="el" href="classxint_1_1integer.html">integer</a> &amp;n, const <a class="el" href="classxint_1_1integer.html">integer</a> &amp;m)</td></tr>
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Get the remainder after dividing a number by another. <br/></td></tr>
+<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="classxint_1_1integer.html">integer</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespacexint.html#adbbde6cc4b65e9a3df8c52adad9c540f">mulmod</a> (const <a class="el" href="classxint_1_1integer.html">integer</a> &amp;n, const <a class="el" href="classxint_1_1integer.html">integer</a> &amp;by, const <a class="el" href="classxint_1_1integer.html">integer</a> &amp;m)</td></tr>
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Get the modular product of two integers. <br/></td></tr>
+<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="classxint_1_1integer.html">integer</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespacexint.html#aa5564979e78556afdc68dbbd744a0bcb">sqrmod</a> (const <a class="el" href="classxint_1_1integer.html">integer</a> &amp;n, const <a class="el" href="classxint_1_1integer.html">integer</a> &amp;m)</td></tr>
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Get the modular product of squaring an <a class="el" href="classxint_1_1integer.html" title="The extended integer class.">integer</a>. <br/></td></tr>
+<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="classxint_1_1integer.html">integer</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespacexint.html#ac54e9be3a8b131f882f88e57b0ef1c9c">powmod</a> (const <a class="el" href="classxint_1_1integer.html">integer</a> &amp;n, const <a class="el" href="classxint_1_1integer.html">integer</a> &amp;e, const <a class="el" href="classxint_1_1integer.html">integer</a> &amp;m, bool noMontgomery)</td></tr>
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Get the result of <code>n<sup>e</sup></code> % <code>m</code>, keeping the intermediate results (relatively) small. <br/></td></tr>
+<tr><td colspan="2"><div class="groupHeader">Montgomery Reduction functions</div></td></tr>
+<tr><td colspan="2"><div class="groupText"><p><a class="anchor" id="amgrpef45384829a28a8031424a8c453ceaa0"></a> </p>
+<br/><br/></div></td></tr>
+<tr><td class="memItemLeft" align="right" valign="top">digit_t&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespacexint.html#afd561fd7c7631267fbc7e5c75c2bde71">inverse0</a> (const <a class="el" href="classxint_1_1integer.html">integer</a> &amp;n)</td></tr>
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Returns the low digit of the inverse of a number. Used internally. <br/></td></tr>
+<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="classxint_1_1integer.html">integer</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespacexint.html#aaf3b26669d4e61f6af5dcae42b20e08b">montgomeryR</a> (const <a class="el" href="classxint_1_1integer.html">integer</a> &amp;n)</td></tr>
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Returns the most efficient R value for a number and the library's internal representation. Used internally. <br/></td></tr>
+<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="classxint_1_1integer.html">integer</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespacexint.html#ab8e85cd5425fcec419c07155e2a91e13">toMontgomeryForm</a> (const <a class="el" href="classxint_1_1integer.html">integer</a> &amp;n, const <a class="el" href="classxint_1_1integer.html">integer</a> &amp;m)</td></tr>
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Returns the Montgomery form of a number. Used for testing. <br/></td></tr>
+<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="classxint_1_1integer.html">integer</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespacexint.html#a93ed16c5350b34ca22108e48b51918a5">fromMontgomeryForm</a> (const <a class="el" href="classxint_1_1integer.html">integer</a> &amp;n, const <a class="el" href="classxint_1_1integer.html">integer</a> &amp;m)</td></tr>
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Returns the <a class="el" href="classxint_1_1integer.html" title="The extended integer class.">integer</a> from the Montgomery form of a number. Used for testing. <br/></td></tr>
+<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="classxint_1_1integer.html">integer</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespacexint.html#a722769c7d01e06d9f82eae07a280160c">montgomeryMultiplyMod</a> (const <a class="el" href="classxint_1_1integer.html">integer</a> &amp;a, const <a class="el" href="classxint_1_1integer.html">integer</a> &amp;b, const <a class="el" href="classxint_1_1integer.html">integer</a> &amp;n, digit_t nPrime0)</td></tr>
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Returns the Montgomery equivalent of <code>mulmod(a, b, n)</code>. Used internally. <br/></td></tr>
+<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="classxint_1_1integer.html">integer</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespacexint.html#a7d7e8604c467bc007820c60e1bc21626">montgomeryPowerMod</a> (const <a class="el" href="classxint_1_1integer.html">integer</a> &amp;a, const <a class="el" href="classxint_1_1integer.html">integer</a> &amp;e, const <a class="el" href="classxint_1_1integer.html">integer</a> &amp;n)</td></tr>
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Returns the Montgomery equivalent of <code>powmod(a, b, n)</code>. Used internally. <br/></td></tr>
+<tr><td colspan="2"><div class="groupHeader">Powers and roots</div></td></tr>
+<tr><td colspan="2"><div class="groupText"><p><a class="anchor" id="amgrp928a8cb047602f789d7433e262ed4560"></a> </p>
+<br/><br/></div></td></tr>
+<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="classxint_1_1integer.html">integer</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespacexint.html#a6b723c30c28eb57f611442e0b512f551">pow2</a> (size_t e)</td></tr>
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Calculate the value of 2<sup>e</sup>. <br/></td></tr>
+<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="classxint_1_1integer.html">integer</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespacexint.html#a0aec423511839fd784b1654389dfcf5b">sqr</a> (const <a class="el" href="classxint_1_1integer.html">integer</a> &amp;n)</td></tr>
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Calculate the value of n<sup>2</sup>. <br/></td></tr>
+<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="classxint_1_1integer.html">integer</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespacexint.html#a186b14f991b32a818abd553b56a13a62">pow</a> (const <a class="el" href="classxint_1_1integer.html">integer</a> &amp;n, const <a class="el" href="classxint_1_1integer.html">integer</a> &amp;e)</td></tr>
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Calculate the value of n<sup>e</sup>. <br/></td></tr>
+<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="classxint_1_1integer.html">integer</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespacexint.html#aba188df925c87a0f33a79328e31e1a50">factorial</a> (size_t n)</td></tr>
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Calculate the value of <code>n!</code> <br/></td></tr>
+<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="classxint_1_1integer.html">integer</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespacexint.html#a74891726f8af86736169dd43b929ad0a">sqrt</a> (const <a class="el" href="classxint_1_1integer.html">integer</a> &amp;n)</td></tr>
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Calculate the square root of <code>an</code> <a class="el" href="classxint_1_1integer.html" title="The extended integer class.">integer</a>. <br/></td></tr>
+<tr><td colspan="2"><div class="groupHeader">Prime number functions</div></td></tr>
+<tr><td colspan="2"><div class="groupText"><p><a class="anchor" id="amgrp540e8e12721acbe497d2b9b53ecc76ec"></a> </p>
+<br/><br/></div></td></tr>
+<tr><td class="memItemLeft" align="right" valign="top">int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespacexint.html#ab205c4e52dbc6825cefe3a251f6ca99f">is_prime</a> (const <a class="el" href="classxint_1_1integer.html">integer</a> &amp;n, <a class="el" href="namespacexint.html#ac8a660c33746c536469d347307b8da7a">callback_t</a> callback)</td></tr>
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Tests an <a class="el" href="classxint_1_1integer.html" title="The extended integer class.">integer</a> for primality. <br/></td></tr>
+<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="classxint_1_1integer.html">integer</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespacexint.html#afc8ba5f62561b4d2b42e32dde1a10ef3">random_prime</a> (size_t size_in_bits, <a class="el" href="namespacexint.html#ac8a660c33746c536469d347307b8da7a">callback_t</a> callback)</td></tr>
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Generate a randomly-generated prime number of a particular bit-size. <br/></td></tr>
+<tr><td colspan="2"><div class="groupHeader">Mathematical primitives</div></td></tr>
+<tr><td colspan="2"><div class="groupText"><p><a class="anchor" id="amgrp196dd2a5f50860e057df961a96d84ea3"></a> </p>
+<br/><br/></div></td></tr>
+<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="classxint_1_1integer.html">integer</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespacexint.html#ac9e4ed282bafa93dbf608350df0127ba">abs</a> (const <a class="el" href="classxint_1_1integer.html">integer</a> &amp;n)</td></tr>
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Returns the absolute value of an <a class="el" href="classxint_1_1integer.html" title="The extended integer class.">integer</a>. <br/></td></tr>
+<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="classxint_1_1integer.html">integer</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespacexint.html#ab393826381b1abd9f1aca1cdb45f41f6">negate</a> (const <a class="el" href="classxint_1_1integer.html">integer</a> &amp;n)</td></tr>
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Return the additive inverse of an <a class="el" href="classxint_1_1integer.html" title="The extended integer class.">integer</a>. <br/></td></tr>
+<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="classxint_1_1integer.html">integer</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespacexint.html#a7cc636a05af16eba73014bf88273d163">add</a> (const <a class="el" href="classxint_1_1integer.html">integer</a> &amp;n1, const <a class="el" href="classxint_1_1integer.html">integer</a> &amp;n2)</td></tr>
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Calculate the sum of two integers. <br/></td></tr>
+<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="classxint_1_1integer.html">integer</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespacexint.html#af196cd74cb23970032fddcce71957a80">subtract</a> (const <a class="el" href="classxint_1_1integer.html">integer</a> &amp;n1, const <a class="el" href="classxint_1_1integer.html">integer</a> &amp;n2)</td></tr>
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Calculate the difference between two integers. <br/></td></tr>
+<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="classxint_1_1integer.html">integer</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespacexint.html#af3d7059ec08bf075cec5685deca55c5d">multiply</a> (const <a class="el" href="classxint_1_1integer.html">integer</a> &amp;n, const <a class="el" href="classxint_1_1integer.html">integer</a> &amp;by)</td></tr>
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Calculate the product of two integers. <br/></td></tr>
+<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="classxint_1_1integer.html">integer</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespacexint.html#abf3d47f1ef1fdf334097fab055886a44">divide</a> (const <a class="el" href="classxint_1_1integer.html">integer</a> &amp;dividend, const <a class="el" href="classxint_1_1integer.html">integer</a> &amp;divisor)</td></tr>
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Calculate how many <code>dividends</code> would fit into <code>divisor</code>. <br/></td></tr>
+<tr><td class="memItemLeft" align="right" valign="top">std::pair&lt; <a class="el" href="classxint_1_1integer.html">integer</a>, <a class="el" href="classxint_1_1integer.html">integer</a> &gt;&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespacexint.html#a23d0a0bb05cec1917d96d6aaceeb875d">divide_r</a> (const <a class="el" href="classxint_1_1integer.html">integer</a> &amp;d1, const <a class="el" href="classxint_1_1integer.html">integer</a> &amp;d2)</td></tr>
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Calculate how many <code>dividends</code> would fit into <code>divisor</code>, with the remainder. <br/></td></tr>
+<tr><td colspan="2"><div class="groupHeader">Random number functions</div></td></tr>
+<tr><td colspan="2"><div class="groupText"><p><a class="anchor" id="amgrpdd4713a71c208a173c1f2436d4e32ff7"></a> </p>
+<br/><br/></div></td></tr>
+<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="classxint_1_1integer.html">integer</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespacexint.html#a5da6e81cb78913cc61c9f14857700b5e">random_by_size</a> (size_t bits, bool high_bit_on, bool low_bit_on, bool can_be_negative)</td></tr>
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Generates a random <a class="el" href="classxint_1_1integer.html" title="The extended integer class.">integer</a> with specific attributes. <br/></td></tr>
+<tr><td class="memTemplParams" colspan="2">template&lt;typename T &gt; </td></tr>
+<tr><td class="memTemplItemLeft" align="right" valign="top">void&nbsp;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="namespacexint.html#a9c50302b216b64d17d9c1d6350e88036">set_random_generator</a> (T *gen)</td></tr>
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Change the random generator that the library uses. <br/></td></tr>
+<tr><td colspan="2"><div class="groupHeader">Stream input/output functions</div></td></tr>
+<tr><td colspan="2"><div class="groupText"><p><a class="anchor" id="amgrpd9927783c44c1aad288df0ab8bfa9ddf"></a> </p>
+<br/><br/></div></td></tr>
+<tr><td class="memTemplParams" colspan="2">template&lt;typename charT , typename traits &gt; </td></tr>
+<tr><td class="memTemplItemLeft" align="right" valign="top">std::basic_ostream&lt; charT, <br class="typebreak"/>
+traits &gt; &amp;&nbsp;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="namespacexint.html#aa5b0dc228caee6523766326cf40297cd">operator&lt;&lt;</a> (std::basic_ostream&lt; charT, traits &gt; &amp;out, const <a class="el" href="classxint_1_1integer.html">xint::integer</a> &amp;n)</td></tr>
+<tr><td class="memTemplParams" colspan="2">template&lt;typename charT , typename traits &gt; </td></tr>
+<tr><td class="memTemplItemLeft" align="right" valign="top">std::basic_istream&lt; charT, <br class="typebreak"/>
+traits &gt; &amp;&nbsp;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="namespacexint.html#a27a0715c66d7350b0f3800f6e161816f">operator&gt;&gt;</a> (std::basic_istream&lt; charT, traits &gt; &amp;in, <a class="el" href="classxint_1_1integer.html">xint::integer</a> &amp;n)</td></tr>
+<tr><td colspan="2"><div class="groupHeader">Self-Testing Functions</div></td></tr>
+<tr><td colspan="2"><div class="groupText"><p><a class="anchor" id="amgrpe91fba8935c0c10717694cc0393febf3"></a> </p>
+<br/><br/></div></td></tr>
+<tr><td class="memItemLeft" align="right" valign="top">bool&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespacexint.html#a509778d505a3c8a0b335817150eaead2">testBitManipulations</a> ()</td></tr>
+<tr><td class="memItemLeft" align="right" valign="top">bool&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespacexint.html#a6b7f5122683b6d924bf86c7d1507206b">testAddSubtract</a> ()</td></tr>
+<tr><td class="memItemLeft" align="right" valign="top">bool&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespacexint.html#affe2e221777d4263a420d014fa9640d0">testMultiply</a> ()</td></tr>
+<tr><td class="memItemLeft" align="right" valign="top">bool&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespacexint.html#a4ed78ff75865ae44a00d3709dd88c3a1">testDivideMod</a> ()</td></tr>
+<tr><td class="memItemLeft" align="right" valign="top">bool&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespacexint.html#ae4ef5f20964fa995df7828f27bd7adbe">testConvert</a> ()</td></tr>
+<tr><td class="memItemLeft" align="right" valign="top">bool&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespacexint.html#ae3305f62ca9be58fbc11dbd4c703f38b">testStreams</a> ()</td></tr>
+<tr><td class="memItemLeft" align="right" valign="top">bool&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespacexint.html#ac40068d64f8c4d9002a0687935888c42">testMontyMultiply</a> ()</td></tr>
+<tr><td class="memItemLeft" align="right" valign="top">bool&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespacexint.html#a9cce0401174b9ae173671b0800c5f457">testMontyPowerMod</a> ()</td></tr>
+<tr><td colspan="2"><h2>Variables</h2></td></tr>
+<tr><td class="memItemLeft" align="right" valign="top">const <a class="el" href="namespacexint.html#ac8a660c33746c536469d347307b8da7a">callback_t</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespacexint.html#a44496f258b36237d4cea35558a71017a">no_callback</a></td></tr>
+<tr><td class="memItemLeft" align="right" valign="top">const size_t&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespacexint.html#a7a5434a5f5fb1db19f0de18014c4fc41">autobase</a> = (std::numeric_limits&lt;size_t&gt;::max)()</td></tr>
+</table>
+<hr/><a name="_details"></a><h2>Detailed Description</h2>
+<p>All of the functions in the XInt library are within this namespace. </p>
+<hr/><h2>Typedef Documentation</h2>
+<a class="anchor" id="ac8a660c33746c536469d347307b8da7a"></a><!-- doxytag: member="xint::callback_t" ref="ac8a660c33746c536469d347307b8da7a" args="" -->
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname">typedef boost::function&lt;bool ()&gt; <a class="el" href="namespacexint.html#ac8a660c33746c536469d347307b8da7a">xint::callback_t</a></td>
+ </tr>
+ </table>
+</div>
+<div class="memdoc">
+<p>A callback function takes no parameters and returns a bool. </p>
+<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="namespacexint.html#ab205c4e52dbc6825cefe3a251f6ca99f" title="Tests an integer for primality.">xint::is_prime</a> </dd>
+<dd>
+<a class="el" href="namespacexint.html#afc8ba5f62561b4d2b42e32dde1a10ef3" title="Generate a randomly-generated prime number of a particular bit-size.">xint::random_prime</a> </dd></dl>
+
+<p>Definition at line <a class="el" href="xint_8hpp_source.html#l00113">113</a> of file <a class="el" href="xint_8hpp_source.html">xint.hpp</a>.</p>
+
+</div>
+</div>
+<a class="anchor" id="ad63045584f06221eb6a7581ad3091582"></a><!-- doxytag: member="xint::token" ref="ad63045584f06221eb6a7581ad3091582" args="" -->
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname">typedef std::auto_ptr&lt;<a class="el" href="structxint_1_1detail_1_1token.html">detail::token</a>&gt; <a class="el" href="structxint_1_1detail_1_1token.html">xint::token</a></td>
+ </tr>
+ </table>
+</div>
+<div class="memdoc">
+
+<p>Used for the exception-blocker. </p>
+
+<p>Definition at line <a class="el" href="xint_8hpp_source.html#l00108">108</a> of file <a class="el" href="xint_8hpp_source.html">xint.hpp</a>.</p>
+
+</div>
+</div>
+<hr/><h2>Function Documentation</h2>
+<a class="anchor" id="ac9e4ed282bafa93dbf608350df0127ba"></a><!-- doxytag: member="xint::abs" ref="ac9e4ed282bafa93dbf608350df0127ba" args="(const integer &amp;n)" -->
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname"><a class="el" href="classxint_1_1integer.html">integer</a> xint::abs </td>
+ <td>(</td>
+ <td class="paramtype">const integer &amp;&nbsp;</td>
+ <td class="paramname"> <em>n</em></td>
+ <td>&nbsp;)&nbsp;</td>
+ <td></td>
+ </tr>
+ </table>
+</div>
+<div class="memdoc">
+
+<p>Returns the absolute value of an <a class="el" href="classxint_1_1integer.html" title="The extended integer class.">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>n</em>&nbsp;</td><td>The <a class="el" href="classxint_1_1integer.html" title="The extended integer class.">integer</a> to operate on.</td></tr>
+ </table>
+ </dd>
+</dl>
+<dl class="return"><dt><b>Returns:</b></dt><dd>If <code>n</code> is zero or positive, returns <code>n</code>. Otherwise returns <code>-n</code>. </dd></dl>
+
+</div>
+</div>
+<a class="anchor" id="a7cc636a05af16eba73014bf88273d163"></a><!-- doxytag: member="xint::add" ref="a7cc636a05af16eba73014bf88273d163" args="(const integer &amp;n1, const integer &amp;n2)" -->
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname"><a class="el" href="classxint_1_1integer.html">integer</a> xint::add </td>
+ <td>(</td>
+ <td class="paramtype">const integer &amp;&nbsp;</td>
+ <td class="paramname"> <em>n1</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">const integer &amp;&nbsp;</td>
+ <td class="paramname"> <em>n2</em></td><td>&nbsp;</td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>)</td>
+ <td></td><td></td><td></td>
+ </tr>
+ </table>
+</div>
+<div class="memdoc">
+
+<p>Calculate the sum of two integers. </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>n1,n2</em>&nbsp;</td><td>The integers to add.</td></tr>
+ </table>
+ </dd>
+</dl>
+<dl class="return"><dt><b>Returns:</b></dt><dd>The sum of the parameters. </dd></dl>
+
+</div>
+</div>
+<a class="anchor" id="a4b5a1a791ba11bb8f158a3b56bd9723e"></a><!-- doxytag: member="xint::allow_exceptions" ref="a4b5a1a791ba11bb8f158a3b56bd9723e" args="()" -->
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname"><a class="el" href="structxint_1_1detail_1_1token.html">token</a> xint::allow_exceptions </td>
+ <td>(</td>
+ <td class="paramname"></td>
+ <td>&nbsp;)&nbsp;</td>
+ <td></td>
+ </tr>
+ </table>
+</div>
+<div class="memdoc">
+
+<p>Temprarily counteract an <a class="el" href="namespacexint.html#ae7e3f6afc701f6e8873a407bb418d04c" title="Temporarily prevent the library from throwing blockable exceptions.">xint::block_exceptions</a> token to allow all exceptions. </p>
+<dl class="return"><dt><b>Returns:</b></dt><dd>An <a class="el" href="namespacexint.html#ad63045584f06221eb6a7581ad3091582" title="Used for the exception-blocker.">xint::token</a>. Until this token is destroyed, blockable exceptions can be thrown, unless explicitly re-blocked.</dd></dl>
+<dl class="note"><dt><b>Note:</b></dt><dd>Exceptions are allowed by default.</dd></dl>
+<dl class="remark"><dt><b>Remarks:</b></dt><dd>When the library is compiled for <a class="el" href="threadsafe.html">thread-safe operation</a>, exceptions are blocked or allowed on a per-thread basis. Otherwise they are blocked or allowed globally.</dd></dl>
+<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="exceptions.html">Exceptions and Exception-Blocking</a> </dd></dl>
+
+</div>
+</div>
+<a class="anchor" id="a06138585f07fe098e24718c46e3078e1"></a><!-- doxytag: member="xint::bitwise_and" ref="a06138585f07fe098e24718c46e3078e1" args="(const integer &amp;n1, const integer &amp;n2)" -->
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname"><a class="el" href="classxint_1_1integer.html">integer</a> xint::bitwise_and </td>
+ <td>(</td>
+ <td class="paramtype">const integer &amp;&nbsp;</td>
+ <td class="paramname"> <em>n1</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">const integer &amp;&nbsp;</td>
+ <td class="paramname"> <em>n2</em></td><td>&nbsp;</td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>)</td>
+ <td></td><td></td><td></td>
+ </tr>
+ </table>
+</div>
+<div class="memdoc">
+
+<p>Combine two integers using a bitwise <code>AND</code> operation. </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>n1,n2</em>&nbsp;</td><td>The integers to operate on.</td></tr>
+ </table>
+ </dd>
+</dl>
+<dl class="return"><dt><b>Returns:</b></dt><dd>An <a class="el" href="classxint_1_1integer.html" title="The extended integer class.">integer</a> with all bits that are set in both parameters turned on. </dd></dl>
+
+</div>
+</div>
+<a class="anchor" id="a8cd0a0dbc779e5a75c9e2f8027474e9a"></a><!-- doxytag: member="xint::bitwise_or" ref="a8cd0a0dbc779e5a75c9e2f8027474e9a" args="(const integer &amp;n1, const integer &amp;n2)" -->
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname"><a class="el" href="classxint_1_1integer.html">integer</a> xint::bitwise_or </td>
+ <td>(</td>
+ <td class="paramtype">const integer &amp;&nbsp;</td>
+ <td class="paramname"> <em>n1</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">const integer &amp;&nbsp;</td>
+ <td class="paramname"> <em>n2</em></td><td>&nbsp;</td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>)</td>
+ <td></td><td></td><td></td>
+ </tr>
+ </table>
+</div>
+<div class="memdoc">
+
+<p>Combine two integers using a bitwise <code>OR</code> operation. </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>n1,n2</em>&nbsp;</td><td>The integers to operate on.</td></tr>
+ </table>
+ </dd>
+</dl>
+<dl class="return"><dt><b>Returns:</b></dt><dd>An <a class="el" href="classxint_1_1integer.html" title="The extended integer class.">integer</a> with all bits that are set in either parameter turned on. </dd></dl>
+
+</div>
+</div>
+<a class="anchor" id="a9ffe18a09f5dd354af7b967b032d3cbe"></a><!-- doxytag: member="xint::bitwise_xor" ref="a9ffe18a09f5dd354af7b967b032d3cbe" args="(const integer &amp;n1, const integer &amp;n2)" -->
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname"><a class="el" href="classxint_1_1integer.html">integer</a> xint::bitwise_xor </td>
+ <td>(</td>
+ <td class="paramtype">const integer &amp;&nbsp;</td>
+ <td class="paramname"> <em>n1</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">const integer &amp;&nbsp;</td>
+ <td class="paramname"> <em>n2</em></td><td>&nbsp;</td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>)</td>
+ <td></td><td></td><td></td>
+ </tr>
+ </table>
+</div>
+<div class="memdoc">
+
+<p>Combine two integers using a bitwise <code>XOR</code> operation. </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>n1,n2</em>&nbsp;</td><td>The integers to operate on.</td></tr>
+ </table>
+ </dd>
+</dl>
+<dl class="return"><dt><b>Returns:</b></dt><dd>An <a class="el" href="classxint_1_1integer.html" title="The extended integer class.">integer</a> with all bits that are set in either parameter, but not both, turned on. </dd></dl>
+
+</div>
+</div>
+<a class="anchor" id="ae7e3f6afc701f6e8873a407bb418d04c"></a><!-- doxytag: member="xint::block_exceptions" ref="ae7e3f6afc701f6e8873a407bb418d04c" args="()" -->
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname"><a class="el" href="structxint_1_1detail_1_1token.html">token</a> xint::block_exceptions </td>
+ <td>(</td>
+ <td class="paramname"></td>
+ <td>&nbsp;)&nbsp;</td>
+ <td></td>
+ </tr>
+ </table>
+</div>
+<div class="memdoc">
+
+<p>Temporarily prevent the library from throwing blockable exceptions. </p>
+<dl class="return"><dt><b>Returns:</b></dt><dd>An <a class="el" href="namespacexint.html#ad63045584f06221eb6a7581ad3091582" title="Used for the exception-blocker.">xint::token</a>. Until this token is destroyed, blockable exceptions are blocked, unless explicitly re-enabled.</dd></dl>
+<dl class="remark"><dt><b>Remarks:</b></dt><dd>When the library is compiled for <a class="el" href="threadsafe.html">thread-safe operation</a>, exceptions are blocked or allowed on a per-thread basis. Otherwise they are blocked or allowed globally.</dd></dl>
+<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="exceptions.html">Exceptions and Exception-Blocking</a> </dd></dl>
+
+</div>
+</div>
+<a class="anchor" id="a8982e3e3ab7c1c763416eadc479d9724"></a><!-- doxytag: member="xint::clearbit" ref="a8982e3e3ab7c1c763416eadc479d9724" args="(integer &amp;n, size_t bit)" -->
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname">void xint::clearbit </td>
+ <td>(</td>
+ <td class="paramtype">integer &amp;&nbsp;</td>
+ <td class="paramname"> <em>n</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">size_t&nbsp;</td>
+ <td class="paramname"> <em>bit</em></td><td>&nbsp;</td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>)</td>
+ <td></td><td></td><td></td>
+ </tr>
+ </table>
+</div>
+<div class="memdoc">
+
+<p>Sets a specific bit in an <a class="el" href="classxint_1_1integer.html" title="The extended integer class.">integer</a> to zero. </p>
+<dl><dt><b>Parameters:</b></dt><dd>
+ <table border="0" cellspacing="2" cellpadding="0">
+ <tr><td valign="top"><tt>[in,out]</tt>&nbsp;</td><td valign="top"><em>n</em>&nbsp;</td><td>The <a class="el" href="classxint_1_1integer.html" title="The extended integer class.">integer</a> to operate on. </td></tr>
+ <tr><td valign="top"><tt>[in]</tt>&nbsp;</td><td valign="top"><em>bit</em>&nbsp;</td><td>The zero-based index of the bit to change.</td></tr>
+ </table>
+ </dd>
+</dl>
+<dl class="return"><dt><b>Returns:</b></dt><dd>Nothing. </dd></dl>
+
+</div>
+</div>
+<a class="anchor" id="aff82dd47fae4297b96282371abf4db06"></a><!-- doxytag: member="xint::compare" ref="aff82dd47fae4297b96282371abf4db06" args="(const integer &amp;b1, const integer &amp;b2, bool ignoresign)" -->
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname">int xint::compare </td>
+ <td>(</td>
+ <td class="paramtype">const integer &amp;&nbsp;</td>
+ <td class="paramname"> <em>b1</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">const integer &amp;&nbsp;</td>
+ <td class="paramname"> <em>b2</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">bool&nbsp;</td>
+ <td class="paramname"> <em>ignoresign</em></td><td>&nbsp;</td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>)</td>
+ <td></td><td></td><td></td>
+ </tr>
+ </table>
+</div>
+<div class="memdoc">
+
+<p>Compare two <a class="el" href="classxint_1_1integer.html" title="The extended integer class.">integer</a> objects. </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>b1,b2</em>&nbsp;</td><td>The integers to compare. </td></tr>
+ <tr><td valign="top"><tt>[in]</tt>&nbsp;</td><td valign="top"><em>ignoresign</em>&nbsp;</td><td>If <code>true</code>, the absolute values of b1 and b2 are compared, instead of their signed values. Used internally.</td></tr>
+ </table>
+ </dd>
+</dl>
+<dl class="return"><dt><b>Returns:</b></dt><dd>A negative number if <code>b1</code> &lt; <code>b2</code>; zero if <code>b1</code> == <code>b2</code>, or a positive number if <code>b1</code> &gt; <code>b2</code>.</dd></dl>
+<p>This is the function behind all of the comparison operators. It might sometimes be useful directly as well. </p>
+
+</div>
+</div>
+<a class="anchor" id="abf3d47f1ef1fdf334097fab055886a44"></a><!-- doxytag: member="xint::divide" ref="abf3d47f1ef1fdf334097fab055886a44" args="(const integer &amp;dividend, const integer &amp;divisor)" -->
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname"><a class="el" href="classxint_1_1integer.html">integer</a> xint::divide </td>
+ <td>(</td>
+ <td class="paramtype">const integer &amp;&nbsp;</td>
+ <td class="paramname"> <em>dividend</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">const integer &amp;&nbsp;</td>
+ <td class="paramname"> <em>divisor</em></td><td>&nbsp;</td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>)</td>
+ <td></td><td></td><td></td>
+ </tr>
+ </table>
+</div>
+<div class="memdoc">
+
+<p>Calculate how many <code>dividends</code> would fit into <code>divisor</code>. </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>dividend,divisor</em>&nbsp;</td><td>The integers to operate on.</td></tr>
+ </table>
+ </dd>
+</dl>
+<dl class="return"><dt><b>Returns:</b></dt><dd>The <a class="el" href="classxint_1_1integer.html" title="The extended integer class.">integer</a> value of <code>dividend</code> divided by <code>divisor</code>.</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="classxint_1_1divide__by__zero.html" title="Exception class.">xint::divide_by_zero</a></em>&nbsp;</td><td>if <code>divisor</code> is zero. </td></tr>
+ </table>
+ </dd>
+</dl>
+
+</div>
+</div>
+<a class="anchor" id="a23d0a0bb05cec1917d96d6aaceeb875d"></a><!-- doxytag: member="xint::divide_r" ref="a23d0a0bb05cec1917d96d6aaceeb875d" args="(const integer &amp;d1, const integer &amp;d2)" -->
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname">std::pair&lt; <a class="el" href="classxint_1_1integer.html">integer</a>, <a class="el" href="classxint_1_1integer.html">integer</a> &gt; xint::divide_r </td>
+ <td>(</td>
+ <td class="paramtype">const integer &amp;&nbsp;</td>
+ <td class="paramname"> <em>d1</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">const integer &amp;&nbsp;</td>
+ <td class="paramname"> <em>d2</em></td><td>&nbsp;</td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>)</td>
+ <td></td><td></td><td></td>
+ </tr>
+ </table>
+</div>
+<div class="memdoc">
+
+<p>Calculate how many <code>dividends</code> would fit into <code>divisor</code>, with the remainder. </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>d1</em>&nbsp;</td><td>The dividend. </td></tr>
+ <tr><td valign="top"><tt>[in]</tt>&nbsp;</td><td valign="top"><em>d2</em>&nbsp;</td><td>The divisor.</td></tr>
+ </table>
+ </dd>
+</dl>
+<dl class="return"><dt><b>Returns:</b></dt><dd>An <code>std::pair</code> containing the quotient and remainder of <code>d1</code> divided by <code>d2</code>.</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="classxint_1_1divide__by__zero.html" title="Exception class.">xint::divide_by_zero</a></em>&nbsp;</td><td>if <code>d2</code> is zero.</td></tr>
+ </table>
+ </dd>
+</dl>
+<dl class="note"><dt><b>Note:</b></dt><dd>If exceptions are blocked, it will return an std::pair with two Not-a-Number values instead of throwing. </dd></dl>
+
+</div>
+</div>
+<a class="anchor" id="ac8be41374700d89400f5ecddf0f789e3"></a><!-- doxytag: member="xint::exceptions_allowed" ref="ac8be41374700d89400f5ecddf0f789e3" args="()" -->
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname">bool xint::exceptions_allowed </td>
+ <td>(</td>
+ <td class="paramname"></td>
+ <td>&nbsp;)&nbsp;</td>
+ <td></td>
+ </tr>
+ </table>
+</div>
+<div class="memdoc">
+
+<p>Query whether exceptions are currently allowed or blocked. </p>
+<dl class="return"><dt><b>Returns:</b></dt><dd><code>true</code> if exceptions are currently allowed (the default state), <code>false</code> if they're blocked.</dd></dl>
+<dl class="remark"><dt><b>Remarks:</b></dt><dd>When the library is compiled for <a class="el" href="threadsafe.html">thread-safe operation</a>, exceptions are blocked or allowed on a per-thread basis. Otherwise they are blocked or allowed globally. </dd></dl>
+
+</div>
+</div>
+<a class="anchor" id="aba188df925c87a0f33a79328e31e1a50"></a><!-- doxytag: member="xint::factorial" ref="aba188df925c87a0f33a79328e31e1a50" args="(size_t n)" -->
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname"><a class="el" href="classxint_1_1integer.html">integer</a> xint::factorial </td>
+ <td>(</td>
+ <td class="paramtype">size_t&nbsp;</td>
+ <td class="paramname"> <em>n</em></td>
+ <td>&nbsp;)&nbsp;</td>
+ <td></td>
+ </tr>
+ </table>
+</div>
+<div class="memdoc">
+
+<p>Calculate the value of <code>n!</code> </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>The value to operate on.</td></tr>
+ </table>
+ </dd>
+</dl>
+<dl class="return"><dt><b>Returns:</b></dt><dd><code>n</code> factorial, defined as <code>1*2*3*...*n</code></dd></dl>
+<dl class="warning"><dt><b>Warning:</b></dt><dd>Factorials get ridiculously huge, even with fairly small values of <code>n</code>. This function, when used with a large parameter, is the easiest way to exhaust the system's memory. </dd></dl>
+
+</div>
+</div>
+<a class="anchor" id="ac2ac2f74b45e4179560d845e6310be9a"></a><!-- doxytag: member="xint::from_binary" ref="ac2ac2f74b45e4179560d845e6310be9a" args="(const std::string &amp;str)" -->
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname"><a class="el" href="classxint_1_1integer.html">integer</a> xint::from_binary </td>
+ <td>(</td>
+ <td class="paramtype">const std::string &amp;&nbsp;</td>
+ <td class="paramname"> <em>str</em></td>
+ <td>&nbsp;)&nbsp;</td>
+ <td></td>
+ </tr>
+ </table>
+</div>
+<div class="memdoc">
+
+<p>Converts a binary representation of a number into an <a class="el" href="classxint_1_1integer.html" title="The extended integer class.">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>str</em>&nbsp;</td><td>An <code>std::string</code> containing the bytes to convert, lowest byte first.</td></tr>
+ </table>
+ </dd>
+</dl>
+<dl class="return"><dt><b>Returns:</b></dt><dd>An <a class="el" href="classxint_1_1integer.html" title="The extended integer class.">integer</a> representing the bytes.</dd></dl>
+<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="namespacexint.html#ab8f33201a251e3e118dc82f214e22aeb" title="Creates a binary representation of an integer, lowest byte first.">xint::to_binary</a> </dd></dl>
+
+</div>
+</div>
+<a class="anchor" id="ad9dcb2b835be5f8ee918979945911ac0"></a><!-- doxytag: member="xint::from_string" ref="ad9dcb2b835be5f8ee918979945911ac0" args="(const std::string &amp;str, size_t base)" -->
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname"><a class="el" href="classxint_1_1integer.html">integer</a> xint::from_string </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></td><td>&nbsp;</td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>)</td>
+ <td></td><td></td><td></td>
+ </tr>
+ </table>
+</div>
+<div class="memdoc">
+
+<p>Converts a string into an <a class="el" href="classxint_1_1integer.html" title="The extended integer class.">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>str</em>&nbsp;</td><td>The string to convert. </td></tr>
+ <tr><td valign="top"><tt>[in]</tt>&nbsp;</td><td valign="top"><em>base</em>&nbsp;</td><td>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 <a class="el" href="namespacexint.html#a7a5434a5f5fb1db19f0de18014c4fc41">xint::autobase</a>, 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.</td></tr>
+ </table>
+ </dd>
+</dl>
+<dl class="return"><dt><b>Returns:</b></dt><dd>An <a class="el" href="classxint_1_1integer.html" title="The extended integer class.">integer</a> with the numeric value of the string in base <code>base</code>. If the string is <code>#NaN#</code>, then it will return <a class="el" href="nan.html">Not-a-Number</a>.</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="classxint_1_1overflow__error.html" title="Exception class.">xint::overflow_error</a></em>&nbsp;</td><td>if there is not enough free memory to create the <a class="el" href="classxint_1_1integer.html" title="The extended integer class.">integer</a>. </td></tr>
+ <tr><td valign="top"></td><td valign="top"><em><a class="el" href="classxint_1_1invalid__base.html" title="Exception class.">xint::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="namespacexint.html#a7a5434a5f5fb1db19f0de18014c4fc41">xint::autobase</a>. </td></tr>
+ <tr><td valign="top"></td><td valign="top"><em><a class="el" href="classxint_1_1invalid__digit.html" title="Exception class.">xint::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 is the function that's called when reading an <a class="el" href="classxint_1_1integer.html" title="The extended integer class.">integer</a> from a stream, or when contructing one from a string.</dd></dl>
+<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="classxint_1_1integer.html#a6dfc86dfc539cfda1062ef1bc24aa526" title="Create an integer from a string representation.">integer::integer(const std::string&amp; str, size_t base)</a> </dd></dl>
+
+</div>
+</div>
+<a class="anchor" id="a93ed16c5350b34ca22108e48b51918a5"></a><!-- doxytag: member="xint::fromMontgomeryForm" ref="a93ed16c5350b34ca22108e48b51918a5" args="(const integer &amp;n, const integer &amp;m)" -->
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname"><a class="el" href="classxint_1_1integer.html">integer</a> xint::fromMontgomeryForm </td>
+ <td>(</td>
+ <td class="paramtype">const integer &amp;&nbsp;</td>
+ <td class="paramname"> <em>n</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">const integer &amp;&nbsp;</td>
+ <td class="paramname"> <em>m</em></td><td>&nbsp;</td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>)</td>
+ <td></td><td></td><td></td>
+ </tr>
+ </table>
+</div>
+<div class="memdoc">
+
+<p>Returns the <a class="el" href="classxint_1_1integer.html" title="The extended integer class.">integer</a> from the Montgomery form of a number. Used for testing. </p>
+
+</div>
+</div>
+<a class="anchor" id="ac9e11516ac502e97be1902cde50f97e7"></a><!-- doxytag: member="xint::gcd" ref="ac9e11516ac502e97be1902cde50f97e7" args="(const integer &amp;num1, const integer &amp;num2)" -->
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname"><a class="el" href="classxint_1_1integer.html">integer</a> xint::gcd </td>
+ <td>(</td>
+ <td class="paramtype">const integer &amp;&nbsp;</td>
+ <td class="paramname"> <em>num1</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">const integer &amp;&nbsp;</td>
+ <td class="paramname"> <em>num2</em></td><td>&nbsp;</td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>)</td>
+ <td></td><td></td><td></td>
+ </tr>
+ </table>
+</div>
+<div class="memdoc">
+
+<p>Calculate the Greatest Common Denominator of two integers. </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>num1,num2</em>&nbsp;</td><td>The integers to operate on.</td></tr>
+ </table>
+ </dd>
+</dl>
+<dl class="return"><dt><b>Returns:</b></dt><dd>The greatest common denominator of the two integers, which will always be a positive number. </dd></dl>
+
+</div>
+</div>
+<a class="anchor" id="a07bc7378c8a55e5f92aaef6d8b8ce952"></a><!-- doxytag: member="xint::getbit" ref="a07bc7378c8a55e5f92aaef6d8b8ce952" args="(const integer &amp;n, size_t bit)" -->
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname">bool xint::getbit </td>
+ <td>(</td>
+ <td class="paramtype">const integer &amp;&nbsp;</td>
+ <td class="paramname"> <em>n</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">size_t&nbsp;</td>
+ <td class="paramname"> <em>bit</em></td><td>&nbsp;</td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>)</td>
+ <td></td><td></td><td></td>
+ </tr>
+ </table>
+</div>
+<div class="memdoc">
+
+<p>Queries the value of a particular bit in an <a class="el" href="classxint_1_1integer.html" title="The extended integer class.">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>n</em>&nbsp;</td><td>The <a class="el" href="classxint_1_1integer.html" title="The extended integer class.">integer</a> to query. </td></tr>
+ <tr><td valign="top"><tt>[in]</tt>&nbsp;</td><td valign="top"><em>bit</em>&nbsp;</td><td>The zero-based index of the bit you're asking about.</td></tr>
+ </table>
+ </dd>
+</dl>
+<dl class="return"><dt><b>Returns:</b></dt><dd><code>true</code> if the specified bit is set (has a value of one), <code>false</code> if it is clear. </dd></dl>
+
+</div>
+</div>
+<a class="anchor" id="ae08828243165ef3f397461507368a6e5"></a><!-- doxytag: member="xint::highestbit" ref="ae08828243165ef3f397461507368a6e5" args="(const integer &amp;n, size_t valueIfZero)" -->
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname">size_t xint::highestbit </td>
+ <td>(</td>
+ <td class="paramtype">const integer &amp;&nbsp;</td>
+ <td class="paramname"> <em>n</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">size_t&nbsp;</td>
+ <td class="paramname"> <em>valueIfZero</em></td><td>&nbsp;</td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>)</td>
+ <td></td><td></td><td></td>
+ </tr>
+ </table>
+</div>
+<div class="memdoc">
+
+<p>Obtains the index of the highest bit in an <a class="el" href="classxint_1_1integer.html" title="The extended integer class.">integer</a> with a value of one. </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>The <a class="el" href="classxint_1_1integer.html" title="The extended integer class.">integer</a> to query. </td></tr>
+ <tr><td valign="top"><tt>[in]</tt>&nbsp;</td><td valign="top"><em>valueIfZero</em>&nbsp;</td><td>The value to return if <code>n</code> is zero (as there is no correct answer in that case).</td></tr>
+ </table>
+ </dd>
+</dl>
+<dl class="return"><dt><b>Returns:</b></dt><dd>The zero-based index of the highest one-bit in the <a class="el" href="classxint_1_1integer.html" title="The extended integer class.">integer</a>, or <code>valueIfZero</code> if the <a class="el" href="classxint_1_1integer.html" title="The extended integer class.">integer</a> contains no set bits. </dd></dl>
+
+</div>
+</div>
+<a class="anchor" id="afd561fd7c7631267fbc7e5c75c2bde71"></a><!-- doxytag: member="xint::inverse0" ref="afd561fd7c7631267fbc7e5c75c2bde71" args="(const integer &amp;n)" -->
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname"><a class="el" href="namespacexint_1_1detail.html#a8843fb7e364832d8d5983de28bdbcf34">detail::digit_t</a> xint::inverse0 </td>
+ <td>(</td>
+ <td class="paramtype">const integer &amp;&nbsp;</td>
+ <td class="paramname"> <em>n</em></td>
+ <td>&nbsp;)&nbsp;</td>
+ <td></td>
+ </tr>
+ </table>
+</div>
+<div class="memdoc">
+
+<p>Returns the low digit of the inverse of a number. Used internally. </p>
+
+</div>
+</div>
+<a class="anchor" id="a4a79f60ebe198eadf10b63924018ce66"></a><!-- doxytag: member="xint::invmod" ref="a4a79f60ebe198eadf10b63924018ce66" args="(const integer &amp;n, const integer &amp;m)" -->
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname"><a class="el" href="classxint_1_1integer.html">integer</a> xint::invmod </td>
+ <td>(</td>
+ <td class="paramtype">const integer &amp;&nbsp;</td>
+ <td class="paramname"> <em>n</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">const integer &amp;&nbsp;</td>
+ <td class="paramname"> <em>m</em></td><td>&nbsp;</td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>)</td>
+ <td></td><td></td><td></td>
+ </tr>
+ </table>
+</div>
+<div class="memdoc">
+
+<p>Get the modular inverse of a number in a modulus, if there is one. </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>The number to retrieve the inverse of. </td></tr>
+ <tr><td valign="top"><tt>[in]</tt>&nbsp;</td><td valign="top"><em>m</em>&nbsp;</td><td>The modulus to use.</td></tr>
+ </table>
+ </dd>
+</dl>
+<dl class="return"><dt><b>Returns:</b></dt><dd>The modular inverse of <code>n</code> in <code>m</code>. If <code>n</code> has no modular inverse in <code>m</code>, returns zero.</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="classxint_1_1invalid__modulus.html" title="Exception class.">xint::invalid_modulus</a></em>&nbsp;</td><td>if the modulus is less than one.</td></tr>
+ </table>
+ </dd>
+</dl>
+<dl class="note"><dt><b>Note:</b></dt><dd>If exceptions are blocked, it returns zero instead of throwing an exception. </dd></dl>
+
+</div>
+</div>
+<a class="anchor" id="ab205c4e52dbc6825cefe3a251f6ca99f"></a><!-- doxytag: member="xint::is_prime" ref="ab205c4e52dbc6825cefe3a251f6ca99f" args="(const integer &amp;n, callback_t callback)" -->
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname">int xint::is_prime </td>
+ <td>(</td>
+ <td class="paramtype">const integer &amp;&nbsp;</td>
+ <td class="paramname"> <em>n</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">callback_t&nbsp;</td>
+ <td class="paramname"> <em>callback</em></td><td>&nbsp;</td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>)</td>
+ <td></td><td></td><td></td>
+ </tr>
+ </table>
+</div>
+<div class="memdoc">
+
+<p>Tests an <a class="el" href="classxint_1_1integer.html" title="The extended integer class.">integer</a> for primality. </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>The number to test. </td></tr>
+ <tr><td valign="top"><tt>[in]</tt>&nbsp;</td><td valign="top"><em>callback</em>&nbsp;</td><td>An optional function that will be called regularly during the operation. If it returns <code>false</code>, the function will immediately return.</td></tr>
+ </table>
+ </dd>
+</dl>
+<dl class="return"><dt><b>Returns:</b></dt><dd>1 if <code>n</code> seems to be prime, 0 if it isn't, or -1 if the provided callback function cancelled the operation.</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>std::invalid_argument</em>&nbsp;</td><td>if <code>n</code> is less than 2.</td></tr>
+ </table>
+ </dd>
+</dl>
+<dl class="note"><dt><b>Note:</b></dt><dd>If exceptions are blocked, it will return -1 instead of throwing an exception.</dd></dl>
+<dl class="remark"><dt><b>Remarks:</b></dt><dd>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 random "witness" numbers each time.</dd></dl>
+<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="primes.html">Generating Prime Numbers</a> </dd></dl>
+
+</div>
+</div>
+<a class="anchor" id="a17c5e4e807cfa425f48d9f5b464bc8dc"></a><!-- doxytag: member="xint::lcm" ref="a17c5e4e807cfa425f48d9f5b464bc8dc" args="(const integer &amp;num1, const integer &amp;num2)" -->
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname"><a class="el" href="classxint_1_1integer.html">integer</a> xint::lcm </td>
+ <td>(</td>
+ <td class="paramtype">const integer &amp;&nbsp;</td>
+ <td class="paramname"> <em>num1</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">const integer &amp;&nbsp;</td>
+ <td class="paramname"> <em>num2</em></td><td>&nbsp;</td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>)</td>
+ <td></td><td></td><td></td>
+ </tr>
+ </table>
+</div>
+<div class="memdoc">
+
+<p>Calculate the Least Common Multiple of two integers. </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>num1,num2</em>&nbsp;</td><td>The integers to operate on.</td></tr>
+ </table>
+ </dd>
+</dl>
+<dl class="return"><dt><b>Returns:</b></dt><dd>The least common multiple of the two integers. If either <a class="el" href="classxint_1_1integer.html" title="The extended integer class.">integer</a> is zero, then the return value will be zero, by convention; in all other cases, the return value will be a positive number. </dd></dl>
+
+</div>
+</div>
+<a class="anchor" id="aa074495871d366c760c5b0713f5ef048"></a><!-- doxytag: member="xint::log2" ref="aa074495871d366c760c5b0713f5ef048" args="(const integer &amp;n)" -->
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname">size_t xint::log2 </td>
+ <td>(</td>
+ <td class="paramtype">const integer &amp;&nbsp;</td>
+ <td class="paramname"> <em>n</em></td>
+ <td>&nbsp;)&nbsp;</td>
+ <td></td>
+ </tr>
+ </table>
+</div>
+<div class="memdoc">
+
+<p>Get the log<sub>2</sub> value of an <a class="el" href="classxint_1_1integer.html" title="The extended integer class.">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>n</em>&nbsp;</td><td>The <a class="el" href="classxint_1_1integer.html" title="The extended integer class.">integer</a> to operate on.</td></tr>
+ </table>
+ </dd>
+</dl>
+<dl class="return"><dt><b>Returns:</b></dt><dd>The integer log<sub>2</sub> value of the <a class="el" href="classxint_1_1integer.html" title="The extended integer class.">integer</a>.</dd></dl>
+<dl class="remark"><dt><b>Remarks:</b></dt><dd><a class="el" href="namespacexint.html#a6b723c30c28eb57f611442e0b512f551" title="Calculate the value of 2e.">xint::pow2</a>(xint::log2(n)-1) will give you an <a class="el" href="classxint_1_1integer.html" title="The extended integer class.">integer</a> with the highest set bit of <code>n</code>, assuming that <code>n</code> is non-zero.</dd></dl>
+<dl class="user"><dt><b></b></dt><dd>Similar to the <a class="el" href="namespacexint.html#ae08828243165ef3f397461507368a6e5" title="Obtains the index of the highest bit in an integer with a value of one.">xint::highestbit</a> function. </dd></dl>
+
+</div>
+</div>
+<a class="anchor" id="ae04d70f50c4ce73d27ab32b1bf3520f2"></a><!-- doxytag: member="xint::lowestbit" ref="ae04d70f50c4ce73d27ab32b1bf3520f2" args="(const integer &amp;n, size_t valueIfZero)" -->
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname">size_t xint::lowestbit </td>
+ <td>(</td>
+ <td class="paramtype">const integer &amp;&nbsp;</td>
+ <td class="paramname"> <em>n</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">size_t&nbsp;</td>
+ <td class="paramname"> <em>valueIfZero</em></td><td>&nbsp;</td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>)</td>
+ <td></td><td></td><td></td>
+ </tr>
+ </table>
+</div>
+<div class="memdoc">
+
+<p>Obtains the index of the lowest bit in an <a class="el" href="classxint_1_1integer.html" title="The extended integer class.">integer</a> with a value of one. </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>The <a class="el" href="classxint_1_1integer.html" title="The extended integer class.">integer</a> to query. </td></tr>
+ <tr><td valign="top"><tt>[in]</tt>&nbsp;</td><td valign="top"><em>valueIfZero</em>&nbsp;</td><td>The value to return if <code>n</code> is zero (as there is no correct answer in that case).</td></tr>
+ </table>
+ </dd>
+</dl>
+<dl class="return"><dt><b>Returns:</b></dt><dd>The zero-based index of the lowest one-bit in the <a class="el" href="classxint_1_1integer.html" title="The extended integer class.">integer</a>, or <code>valueIfZero</code> if the <a class="el" href="classxint_1_1integer.html" title="The extended integer class.">integer</a> contains no set bits. </dd></dl>
+
+</div>
+</div>
+<a class="anchor" id="ad5a8cc6e57ee8abdc21be98275657cc8"></a><!-- doxytag: member="xint::mod" ref="ad5a8cc6e57ee8abdc21be98275657cc8" args="(const integer &amp;n, const integer &amp;m)" -->
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname"><a class="el" href="classxint_1_1integer.html">integer</a> xint::mod </td>
+ <td>(</td>
+ <td class="paramtype">const integer &amp;&nbsp;</td>
+ <td class="paramname"> <em>n</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">const integer &amp;&nbsp;</td>
+ <td class="paramname"> <em>m</em></td><td>&nbsp;</td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>)</td>
+ <td></td><td></td><td></td>
+ </tr>
+ </table>
+</div>
+<div class="memdoc">
+
+<p>Get the remainder after dividing a number by another. </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>The dividend. </td></tr>
+ <tr><td valign="top"><tt>[in]</tt>&nbsp;</td><td valign="top"><em>m</em>&nbsp;</td><td>The divisor.</td></tr>
+ </table>
+ </dd>
+</dl>
+<dl class="return"><dt><b>Returns:</b></dt><dd>The result of <code>n</code> % <code>m</code>. </dd></dl>
+
+</div>
+</div>
+<a class="anchor" id="a722769c7d01e06d9f82eae07a280160c"></a><!-- doxytag: member="xint::montgomeryMultiplyMod" ref="a722769c7d01e06d9f82eae07a280160c" args="(const integer &amp;a, const integer &amp;b, const integer &amp;n, digit_t nPrime0)" -->
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname"><a class="el" href="classxint_1_1integer.html">integer</a> xint::montgomeryMultiplyMod </td>
+ <td>(</td>
+ <td class="paramtype">const integer &amp;&nbsp;</td>
+ <td class="paramname"> <em>a</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">const integer &amp;&nbsp;</td>
+ <td class="paramname"> <em>b</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">const integer &amp;&nbsp;</td>
+ <td class="paramname"> <em>n</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">digit_t&nbsp;</td>
+ <td class="paramname"> <em>nPrime0</em></td><td>&nbsp;</td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>)</td>
+ <td></td><td></td><td></td>
+ </tr>
+ </table>
+</div>
+<div class="memdoc">
+
+<p>Returns the Montgomery equivalent of <code>mulmod(a, b, n)</code>. Used internally. </p>
+
+</div>
+</div>
+<a class="anchor" id="a7d7e8604c467bc007820c60e1bc21626"></a><!-- doxytag: member="xint::montgomeryPowerMod" ref="a7d7e8604c467bc007820c60e1bc21626" args="(const integer &amp;a, const integer &amp;e, const integer &amp;n)" -->
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname"><a class="el" href="classxint_1_1integer.html">integer</a> xint::montgomeryPowerMod </td>
+ <td>(</td>
+ <td class="paramtype">const integer &amp;&nbsp;</td>
+ <td class="paramname"> <em>a</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">const integer &amp;&nbsp;</td>
+ <td class="paramname"> <em>e</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">const integer &amp;&nbsp;</td>
+ <td class="paramname"> <em>n</em></td><td>&nbsp;</td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>)</td>
+ <td></td><td></td><td></td>
+ </tr>
+ </table>
+</div>
+<div class="memdoc">
+
+<p>Returns the Montgomery equivalent of <code>powmod(a, b, n)</code>. Used internally. </p>
+
+</div>
+</div>
+<a class="anchor" id="aaf3b26669d4e61f6af5dcae42b20e08b"></a><!-- doxytag: member="xint::montgomeryR" ref="aaf3b26669d4e61f6af5dcae42b20e08b" args="(const integer &amp;n)" -->
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname"><a class="el" href="classxint_1_1integer.html">integer</a> xint::montgomeryR </td>
+ <td>(</td>
+ <td class="paramtype">const integer &amp;&nbsp;</td>
+ <td class="paramname"> <em>n</em></td>
+ <td>&nbsp;)&nbsp;</td>
+ <td></td>
+ </tr>
+ </table>
+</div>
+<div class="memdoc">
+
+<p>Returns the most efficient R value for a number and the library's internal representation. Used internally. </p>
+
+</div>
+</div>
+<a class="anchor" id="adbbde6cc4b65e9a3df8c52adad9c540f"></a><!-- doxytag: member="xint::mulmod" ref="adbbde6cc4b65e9a3df8c52adad9c540f" args="(const integer &amp;n, const integer &amp;by, const integer &amp;m)" -->
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname"><a class="el" href="classxint_1_1integer.html">integer</a> xint::mulmod </td>
+ <td>(</td>
+ <td class="paramtype">const integer &amp;&nbsp;</td>
+ <td class="paramname"> <em>n</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">const integer &amp;&nbsp;</td>
+ <td class="paramname"> <em>by</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">const integer &amp;&nbsp;</td>
+ <td class="paramname"> <em>m</em></td><td>&nbsp;</td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>)</td>
+ <td></td><td></td><td></td>
+ </tr>
+ </table>
+</div>
+<div class="memdoc">
+
+<p>Get the modular product of two integers. </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,by</em>&nbsp;</td><td>The integers to multiply. </td></tr>
+ <tr><td valign="top"><tt>[in]</tt>&nbsp;</td><td valign="top"><em>m</em>&nbsp;</td><td>The modulus.</td></tr>
+ </table>
+ </dd>
+</dl>
+<dl class="return"><dt><b>Returns:</b></dt><dd>The result of <code>n</code> * <code>by</code> % <code>m</code>.</dd></dl>
+<dl class="remark"><dt><b>Remarks:</b></dt><dd>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. </dd></dl>
+
+</div>
+</div>
+<a class="anchor" id="af3d7059ec08bf075cec5685deca55c5d"></a><!-- doxytag: member="xint::multiply" ref="af3d7059ec08bf075cec5685deca55c5d" args="(const integer &amp;n, const integer &amp;by)" -->
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname"><a class="el" href="classxint_1_1integer.html">integer</a> xint::multiply </td>
+ <td>(</td>
+ <td class="paramtype">const integer &amp;&nbsp;</td>
+ <td class="paramname"> <em>n</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">const integer &amp;&nbsp;</td>
+ <td class="paramname"> <em>by</em></td><td>&nbsp;</td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>)</td>
+ <td></td><td></td><td></td>
+ </tr>
+ </table>
+</div>
+<div class="memdoc">
+
+<p>Calculate the product of two integers. </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,by</em>&nbsp;</td><td>The integers to operate on.</td></tr>
+ </table>
+ </dd>
+</dl>
+<dl class="return"><dt><b>Returns:</b></dt><dd>The product of the parameters.</dd></dl>
+<dl class="remark"><dt><b>Remarks:</b></dt><dd>Automatically uses the more-efficient squaring algorithm if it can trivially detect that the two parameters are copies of the same number. </dd></dl>
+
+</div>
+</div>
+<a class="anchor" id="ab393826381b1abd9f1aca1cdb45f41f6"></a><!-- doxytag: member="xint::negate" ref="ab393826381b1abd9f1aca1cdb45f41f6" args="(const integer &amp;n)" -->
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname"><a class="el" href="classxint_1_1integer.html">integer</a> xint::negate </td>
+ <td>(</td>
+ <td class="paramtype">const integer &amp;&nbsp;</td>
+ <td class="paramname"> <em>n</em></td>
+ <td>&nbsp;)&nbsp;</td>
+ <td></td>
+ </tr>
+ </table>
+</div>
+<div class="memdoc">
+
+<p>Return the additive inverse of an <a class="el" href="classxint_1_1integer.html" title="The extended integer class.">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>n</em>&nbsp;</td><td>The <a class="el" href="classxint_1_1integer.html" title="The extended integer class.">integer</a> to operate on.</td></tr>
+ </table>
+ </dd>
+</dl>
+<dl class="return"><dt><b>Returns:</b></dt><dd><code>-n</code>. </dd></dl>
+
+</div>
+</div>
+<a class="anchor" id="a675c4fe6ddda6db915450d054ed640ba"></a><!-- doxytag: member="xint::operator!" ref="a675c4fe6ddda6db915450d054ed640ba" args="(const xint::integer &amp;num1)" -->
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname">bool xint::operator! </td>
+ <td>(</td>
+ <td class="paramtype">const <a class="el" href="classxint_1_1integer.html">xint::integer</a> &amp;&nbsp;</td>
+ <td class="paramname"> <em>num1</em></td>
+ <td>&nbsp;)&nbsp;</td>
+ <td></td>
+ </tr>
+ </table>
+</div>
+<div class="memdoc">
+
+</div>
+</div>
+<a class="anchor" id="aefda934d0ffacd0f44fcbbdfee19a139"></a><!-- doxytag: member="xint::operator!=" ref="aefda934d0ffacd0f44fcbbdfee19a139" args="(const xint::integer &amp;num1, const xint::integer &amp;num2)" -->
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname">bool xint::operator!= </td>
+ <td>(</td>
+ <td class="paramtype">const <a class="el" href="classxint_1_1integer.html">xint::integer</a> &amp;&nbsp;</td>
+ <td class="paramname"> <em>num1</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">const <a class="el" href="classxint_1_1integer.html">xint::integer</a> &amp;&nbsp;</td>
+ <td class="paramname"> <em>num2</em></td><td>&nbsp;</td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>)</td>
+ <td></td><td></td><td></td>
+ </tr>
+ </table>
+</div>
+<div class="memdoc">
+
+</div>
+</div>
+<a class="anchor" id="ae0505757986a9c7133552552471aae24"></a><!-- doxytag: member="xint::operator%" ref="ae0505757986a9c7133552552471aae24" args="(const integer &amp;num1, const integer &amp;num2)" -->
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname"><a class="el" href="classxint_1_1integer.html">integer</a> xint::operator% </td>
+ <td>(</td>
+ <td class="paramtype">const integer &amp;&nbsp;</td>
+ <td class="paramname"> <em>num1</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">const integer &amp;&nbsp;</td>
+ <td class="paramname"> <em>num2</em></td><td>&nbsp;</td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>)</td>
+ <td></td><td></td><td></td>
+ </tr>
+ </table>
+</div>
+<div class="memdoc">
+
+</div>
+</div>
+<a class="anchor" id="a742550f1c62ac8c2bde8e1ceab2a466c"></a><!-- doxytag: member="xint::operator&amp;" ref="a742550f1c62ac8c2bde8e1ceab2a466c" args="(const integer &amp;n1, const integer &amp;n2)" -->
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname"><a class="el" href="classxint_1_1integer.html">integer</a> xint::operator&amp; </td>
+ <td>(</td>
+ <td class="paramtype">const integer &amp;&nbsp;</td>
+ <td class="paramname"> <em>n1</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">const integer &amp;&nbsp;</td>
+ <td class="paramname"> <em>n2</em></td><td>&nbsp;</td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>)</td>
+ <td></td><td></td><td></td>
+ </tr>
+ </table>
+</div>
+<div class="memdoc">
+
+</div>
+</div>
+<a class="anchor" id="aea36ad9037f109576d4f95ec72b5c825"></a><!-- doxytag: member="xint::operator*" ref="aea36ad9037f109576d4f95ec72b5c825" args="(const integer &amp;num1, const integer &amp;num2)" -->
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname"><a class="el" href="classxint_1_1integer.html">integer</a> xint::operator* </td>
+ <td>(</td>
+ <td class="paramtype">const integer &amp;&nbsp;</td>
+ <td class="paramname"> <em>num1</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">const integer &amp;&nbsp;</td>
+ <td class="paramname"> <em>num2</em></td><td>&nbsp;</td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>)</td>
+ <td></td><td></td><td></td>
+ </tr>
+ </table>
+</div>
+<div class="memdoc">
+
+</div>
+</div>
+<a class="anchor" id="a211ff80bb081c08674272cfcae736a93"></a><!-- doxytag: member="xint::operator+" ref="a211ff80bb081c08674272cfcae736a93" args="(const integer &amp;num1, const integer &amp;num2)" -->
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname"><a class="el" href="classxint_1_1integer.html">integer</a> xint::operator+ </td>
+ <td>(</td>
+ <td class="paramtype">const integer &amp;&nbsp;</td>
+ <td class="paramname"> <em>num1</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">const integer &amp;&nbsp;</td>
+ <td class="paramname"> <em>num2</em></td><td>&nbsp;</td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>)</td>
+ <td></td><td></td><td></td>
+ </tr>
+ </table>
+</div>
+<div class="memdoc">
+
+</div>
+</div>
+<a class="anchor" id="a586fb0eb69100ec74be94008ac26670d"></a><!-- doxytag: member="xint::operator+" ref="a586fb0eb69100ec74be94008ac26670d" args="(const integer &amp;a)" -->
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname">const <a class="el" href="classxint_1_1integer.html">integer</a> &amp; xint::operator+ </td>
+ <td>(</td>
+ <td class="paramtype">const integer &amp;&nbsp;</td>
+ <td class="paramname"> <em>a</em></td>
+ <td>&nbsp;)&nbsp;</td>
+ <td></td>
+ </tr>
+ </table>
+</div>
+<div class="memdoc">
+
+</div>
+</div>
+<a class="anchor" id="a1e09422b575c6d29ea5c0d627b79c28e"></a><!-- doxytag: member="xint::operator&#45;" ref="a1e09422b575c6d29ea5c0d627b79c28e" args="(const integer &amp;num1, const integer &amp;num2)" -->
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname"><a class="el" href="classxint_1_1integer.html">integer</a> xint::operator- </td>
+ <td>(</td>
+ <td class="paramtype">const integer &amp;&nbsp;</td>
+ <td class="paramname"> <em>num1</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">const integer &amp;&nbsp;</td>
+ <td class="paramname"> <em>num2</em></td><td>&nbsp;</td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>)</td>
+ <td></td><td></td><td></td>
+ </tr>
+ </table>
+</div>
+<div class="memdoc">
+
+</div>
+</div>
+<a class="anchor" id="a8a510361ed458133ebfa5fd95f8d9c27"></a><!-- doxytag: member="xint::operator&#45;" ref="a8a510361ed458133ebfa5fd95f8d9c27" args="(const integer &amp;a)" -->
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname"><a class="el" href="classxint_1_1integer.html">integer</a> xint::operator- </td>
+ <td>(</td>
+ <td class="paramtype">const integer &amp;&nbsp;</td>
+ <td class="paramname"> <em>a</em></td>
+ <td>&nbsp;)&nbsp;</td>
+ <td></td>
+ </tr>
+ </table>
+</div>
+<div class="memdoc">
+
+</div>
+</div>
+<a class="anchor" id="a701217f7824c3e935fca25147da23807"></a><!-- doxytag: member="xint::operator/" ref="a701217f7824c3e935fca25147da23807" args="(const integer &amp;num1, const integer &amp;num2)" -->
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname"><a class="el" href="classxint_1_1integer.html">integer</a> xint::operator/ </td>
+ <td>(</td>
+ <td class="paramtype">const integer &amp;&nbsp;</td>
+ <td class="paramname"> <em>num1</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">const integer &amp;&nbsp;</td>
+ <td class="paramname"> <em>num2</em></td><td>&nbsp;</td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>)</td>
+ <td></td><td></td><td></td>
+ </tr>
+ </table>
+</div>
+<div class="memdoc">
+
+</div>
+</div>
+<a class="anchor" id="a4f4a4771bf443e6724abbd18173ecc86"></a><!-- doxytag: member="xint::operator&lt;" ref="a4f4a4771bf443e6724abbd18173ecc86" args="(const xint::integer &amp;num1, const xint::integer &amp;num2)" -->
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname">bool xint::operator&lt; </td>
+ <td>(</td>
+ <td class="paramtype">const <a class="el" href="classxint_1_1integer.html">xint::integer</a> &amp;&nbsp;</td>
+ <td class="paramname"> <em>num1</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">const <a class="el" href="classxint_1_1integer.html">xint::integer</a> &amp;&nbsp;</td>
+ <td class="paramname"> <em>num2</em></td><td>&nbsp;</td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>)</td>
+ <td></td><td></td><td></td>
+ </tr>
+ </table>
+</div>
+<div class="memdoc">
+
+</div>
+</div>
+<a class="anchor" id="aa5b0dc228caee6523766326cf40297cd"></a><!-- doxytag: member="xint::operator&lt;&lt;" ref="aa5b0dc228caee6523766326cf40297cd" args="(std::basic_ostream&lt; charT, traits &gt; &amp;out, const xint::integer &amp;n)" -->
+<div class="memitem">
+<div class="memproto">
+<div class="memtemplate">
+template&lt;typename charT , typename traits &gt; </div>
+ <table class="memname">
+ <tr>
+ <td class="memname">std::basic_ostream&lt;charT,traits&gt;&amp; xint::operator&lt;&lt; </td>
+ <td>(</td>
+ <td class="paramtype">std::basic_ostream&lt; charT, traits &gt; &amp;&nbsp;</td>
+ <td class="paramname"> <em>out</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">const <a class="el" href="classxint_1_1integer.html">xint::integer</a> &amp;&nbsp;</td>
+ <td class="paramname"> <em>n</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="xint_8hpp_source.html#l00630">630</a> of file <a class="el" href="xint_8hpp_source.html">xint.hpp</a>.</p>
+
+</div>
+</div>
+<a class="anchor" id="ab9d5f34c4d4bed1c86380d4f72edcd9b"></a><!-- doxytag: member="xint::operator&lt;=" ref="ab9d5f34c4d4bed1c86380d4f72edcd9b" args="(const xint::integer &amp;num1, const xint::integer &amp;num2)" -->
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname">bool xint::operator&lt;= </td>
+ <td>(</td>
+ <td class="paramtype">const <a class="el" href="classxint_1_1integer.html">xint::integer</a> &amp;&nbsp;</td>
+ <td class="paramname"> <em>num1</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">const <a class="el" href="classxint_1_1integer.html">xint::integer</a> &amp;&nbsp;</td>
+ <td class="paramname"> <em>num2</em></td><td>&nbsp;</td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>)</td>
+ <td></td><td></td><td></td>
+ </tr>
+ </table>
+</div>
+<div class="memdoc">
+
+</div>
+</div>
+<a class="anchor" id="ad32051708c2a2baafa0340e19e90217b"></a><!-- doxytag: member="xint::operator==" ref="ad32051708c2a2baafa0340e19e90217b" args="(const xint::integer &amp;num1, const xint::integer &amp;num2)" -->
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname">bool xint::operator== </td>
+ <td>(</td>
+ <td class="paramtype">const <a class="el" href="classxint_1_1integer.html">xint::integer</a> &amp;&nbsp;</td>
+ <td class="paramname"> <em>num1</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">const <a class="el" href="classxint_1_1integer.html">xint::integer</a> &amp;&nbsp;</td>
+ <td class="paramname"> <em>num2</em></td><td>&nbsp;</td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>)</td>
+ <td></td><td></td><td></td>
+ </tr>
+ </table>
+</div>
+<div class="memdoc">
+
+</div>
+</div>
+<a class="anchor" id="a1229d1f1efbdf3ffeac8b2964ca66093"></a><!-- doxytag: member="xint::operator&gt;" ref="a1229d1f1efbdf3ffeac8b2964ca66093" args="(const xint::integer &amp;num1, const xint::integer &amp;num2)" -->
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname">bool xint::operator&gt; </td>
+ <td>(</td>
+ <td class="paramtype">const <a class="el" href="classxint_1_1integer.html">xint::integer</a> &amp;&nbsp;</td>
+ <td class="paramname"> <em>num1</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">const <a class="el" href="classxint_1_1integer.html">xint::integer</a> &amp;&nbsp;</td>
+ <td class="paramname"> <em>num2</em></td><td>&nbsp;</td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>)</td>
+ <td></td><td></td><td></td>
+ </tr>
+ </table>
+</div>
+<div class="memdoc">
+
+</div>
+</div>
+<a class="anchor" id="a766324a6f216f3b49a3e9aa885e9531c"></a><!-- doxytag: member="xint::operator&gt;=" ref="a766324a6f216f3b49a3e9aa885e9531c" args="(const xint::integer &amp;num1, const xint::integer &amp;num2)" -->
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname">bool xint::operator&gt;= </td>
+ <td>(</td>
+ <td class="paramtype">const <a class="el" href="classxint_1_1integer.html">xint::integer</a> &amp;&nbsp;</td>
+ <td class="paramname"> <em>num1</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">const <a class="el" href="classxint_1_1integer.html">xint::integer</a> &amp;&nbsp;</td>
+ <td class="paramname"> <em>num2</em></td><td>&nbsp;</td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>)</td>
+ <td></td><td></td><td></td>
+ </tr>
+ </table>
+</div>
+<div class="memdoc">
+
+</div>
+</div>
+<a class="anchor" id="a27a0715c66d7350b0f3800f6e161816f"></a><!-- doxytag: member="xint::operator&gt;&gt;" ref="a27a0715c66d7350b0f3800f6e161816f" args="(std::basic_istream&lt; charT, traits &gt; &amp;in, xint::integer &amp;n)" -->
+<div class="memitem">
+<div class="memproto">
+<div class="memtemplate">
+template&lt;typename charT , typename traits &gt; </div>
+ <table class="memname">
+ <tr>
+ <td class="memname">std::basic_istream&lt;charT,traits&gt;&amp; xint::operator&gt;&gt; </td>
+ <td>(</td>
+ <td class="paramtype">std::basic_istream&lt; charT, traits &gt; &amp;&nbsp;</td>
+ <td class="paramname"> <em>in</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype"><a class="el" href="classxint_1_1integer.html">xint::integer</a> &amp;&nbsp;</td>
+ <td class="paramname"> <em>n</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="xint_8hpp_source.html#l00657">657</a> of file <a class="el" href="xint_8hpp_source.html">xint.hpp</a>.</p>
+
+</div>
+</div>
+<a class="anchor" id="a81722cd257bc950ba7c56a202492544f"></a><!-- doxytag: member="xint::operator^" ref="a81722cd257bc950ba7c56a202492544f" args="(const integer &amp;n1, const integer &amp;n2)" -->
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname"><a class="el" href="classxint_1_1integer.html">integer</a> xint::operator^ </td>
+ <td>(</td>
+ <td class="paramtype">const integer &amp;&nbsp;</td>
+ <td class="paramname"> <em>n1</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">const integer &amp;&nbsp;</td>
+ <td class="paramname"> <em>n2</em></td><td>&nbsp;</td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>)</td>
+ <td></td><td></td><td></td>
+ </tr>
+ </table>
+</div>
+<div class="memdoc">
+
+</div>
+</div>
+<a class="anchor" id="afa8f2a0ac996ad45efc73b2aa056cae2"></a><!-- doxytag: member="xint::operator|" ref="afa8f2a0ac996ad45efc73b2aa056cae2" args="(const integer &amp;n1, const integer &amp;n2)" -->
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname"><a class="el" href="classxint_1_1integer.html">integer</a> xint::operator| </td>
+ <td>(</td>
+ <td class="paramtype">const integer &amp;&nbsp;</td>
+ <td class="paramname"> <em>n1</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">const integer &amp;&nbsp;</td>
+ <td class="paramname"> <em>n2</em></td><td>&nbsp;</td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>)</td>
+ <td></td><td></td><td></td>
+ </tr>
+ </table>
+</div>
+<div class="memdoc">
+
+</div>
+</div>
+<a class="anchor" id="a820d89c1d761a0a2c06479b1c1f9cecd"></a><!-- doxytag: member="xint::opt_secure_mode" ref="a820d89c1d761a0a2c06479b1c1f9cecd" args="()" -->
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname">bool xint::opt_secure_mode </td>
+ <td>(</td>
+ <td class="paramname"></td>
+ <td>&nbsp;)&nbsp;</td>
+ <td></td>
+ </tr>
+ </table>
+</div>
+<div class="memdoc">
+
+<p>Tells whether the library was compiled with <a class="el" href="securemode.html">Secure Mode </a> enabled. </p>
+<dl class="return"><dt><b>Returns:</b></dt><dd><code>true</code> if Secure Mode is active, <code>false</code> if it isn't. </dd></dl>
+
+</div>
+</div>
+<a class="anchor" id="ad55aa4d44083238d9ec313511f5b1dfa"></a><!-- doxytag: member="xint::opt_thread_safe" ref="ad55aa4d44083238d9ec313511f5b1dfa" args="()" -->
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname">bool xint::opt_thread_safe </td>
+ <td>(</td>
+ <td class="paramname"></td>
+ <td>&nbsp;)&nbsp;</td>
+ <td></td>
+ </tr>
+ </table>
+</div>
+<div class="memdoc">
+
+<p>Tells whether the library was compiled with the <a class="el" href="threadsafe.html">Thread Safe Operation option </a> enabled. </p>
+<dl class="return"><dt><b>Returns:</b></dt><dd><code>true</code> if it was compiled with Thread Safe Operation enabled, <code>false</code> if it wasn't. </dd></dl>
+
+</div>
+</div>
+<a class="anchor" id="a186b14f991b32a818abd553b56a13a62"></a><!-- doxytag: member="xint::pow" ref="a186b14f991b32a818abd553b56a13a62" args="(const integer &amp;n, const integer &amp;e)" -->
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname"><a class="el" href="classxint_1_1integer.html">integer</a> xint::pow </td>
+ <td>(</td>
+ <td class="paramtype">const integer &amp;&nbsp;</td>
+ <td class="paramname"> <em>n</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">const integer &amp;&nbsp;</td>
+ <td class="paramname"> <em>e</em></td><td>&nbsp;</td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>)</td>
+ <td></td><td></td><td></td>
+ </tr>
+ </table>
+</div>
+<div class="memdoc">
+
+<p>Calculate the value of n<sup>e</sup>. </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,e</em>&nbsp;</td><td>The integers to operate on.</td></tr>
+ </table>
+ </dd>
+</dl>
+<dl class="return"><dt><b>Returns:</b></dt><dd><code>n</code> to the power of <code>e</code>. </dd></dl>
+
+</div>
+</div>
+<a class="anchor" id="a6b723c30c28eb57f611442e0b512f551"></a><!-- doxytag: member="xint::pow2" ref="a6b723c30c28eb57f611442e0b512f551" args="(size_t e)" -->
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname"><a class="el" href="classxint_1_1integer.html">integer</a> xint::pow2 </td>
+ <td>(</td>
+ <td class="paramtype">size_t&nbsp;</td>
+ <td class="paramname"> <em>e</em></td>
+ <td>&nbsp;)&nbsp;</td>
+ <td></td>
+ </tr>
+ </table>
+</div>
+<div class="memdoc">
+
+<p>Calculate the value of 2<sup>e</sup>. </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>e</em>&nbsp;</td><td>The exponent to operate on.</td></tr>
+ </table>
+ </dd>
+</dl>
+<dl class="return"><dt><b>Returns:</b></dt><dd>2 to the power of <code>e</code>.</dd></dl>
+<dl class="remark"><dt><b>Remarks:</b></dt><dd>This is a convenience function, to help with self-documenting code. </dd></dl>
+
+</div>
+</div>
+<a class="anchor" id="ac54e9be3a8b131f882f88e57b0ef1c9c"></a><!-- doxytag: member="xint::powmod" ref="ac54e9be3a8b131f882f88e57b0ef1c9c" args="(const integer &amp;n, const integer &amp;e, const integer &amp;m, bool noMontgomery)" -->
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname"><a class="el" href="classxint_1_1integer.html">integer</a> xint::powmod </td>
+ <td>(</td>
+ <td class="paramtype">const integer &amp;&nbsp;</td>
+ <td class="paramname"> <em>n</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">const integer &amp;&nbsp;</td>
+ <td class="paramname"> <em>e</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">const integer &amp;&nbsp;</td>
+ <td class="paramname"> <em>m</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">bool&nbsp;</td>
+ <td class="paramname"> <em>noMontgomery</em></td><td>&nbsp;</td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>)</td>
+ <td></td><td></td><td></td>
+ </tr>
+ </table>
+</div>
+<div class="memdoc">
+
+<p>Get the result of <code>n<sup>e</sup></code> % <code>m</code>, keeping the intermediate results (relatively) small. </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>The <a class="el" href="classxint_1_1integer.html" title="The extended integer class.">integer</a> to exponentiate. </td></tr>
+ <tr><td valign="top"><tt>[in]</tt>&nbsp;</td><td valign="top"><em>e</em>&nbsp;</td><td>The exponent. </td></tr>
+ <tr><td valign="top"><tt>[in]</tt>&nbsp;</td><td valign="top"><em>m</em>&nbsp;</td><td>The modulus. </td></tr>
+ <tr><td valign="top"><tt>[in]</tt>&nbsp;</td><td valign="top"><em>noMontgomery</em>&nbsp;</td><td>Used for testing, leave false for normal operation.</td></tr>
+ </table>
+ </dd>
+</dl>
+<dl class="return"><dt><b>Returns:</b></dt><dd>The result of <code>pow</code>(n, <code>exponent</code>) % <code>modulus</code>.</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="classxint_1_1invalid__modulus.html" title="Exception class.">xint::invalid_modulus</a></em>&nbsp;</td><td>if the modulus is less than one.</td></tr>
+ </table>
+ </dd>
+</dl>
+<dl class="remark"><dt><b>Remarks:</b></dt><dd>Because this function keeps the intermediate results small, it is far faster and uses far less memory than writing out the equivalent calculations.</dd></dl>
+<dl class="user"><dt><b></b></dt><dd>In addition, this function will use the Montgomery Reduction internally, if the modulus is an odd number (and if <code>noMontgomery</code> isn't set), which is almost always faster than the non-Montgomery method. </dd></dl>
+
+</div>
+</div>
+<a class="anchor" id="a5da6e81cb78913cc61c9f14857700b5e"></a><!-- doxytag: member="xint::random_by_size" ref="a5da6e81cb78913cc61c9f14857700b5e" args="(size_t bits, bool high_bit_on, bool low_bit_on, bool can_be_negative)" -->
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname"><a class="el" href="classxint_1_1integer.html">integer</a> xint::random_by_size </td>
+ <td>(</td>
+ <td class="paramtype">size_t&nbsp;</td>
+ <td class="paramname"> <em>bits</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">bool&nbsp;</td>
+ <td class="paramname"> <em>high_bit_on</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">bool&nbsp;</td>
+ <td class="paramname"> <em>low_bit_on</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">bool&nbsp;</td>
+ <td class="paramname"> <em>can_be_negative</em></td><td>&nbsp;</td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>)</td>
+ <td></td><td></td><td></td>
+ </tr>
+ </table>
+</div>
+<div class="memdoc">
+
+<p>Generates a random <a class="el" href="classxint_1_1integer.html" title="The extended integer class.">integer</a> with specific attributes. </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>bits</em>&nbsp;</td><td>The maximum number of bits that you want the returned number to have. </td></tr>
+ <tr><td valign="top"><tt>[in]</tt>&nbsp;</td><td valign="top"><em>high_bit_on</em>&nbsp;</td><td>If <code>true</code>, the returned number will have exactly the requested size. If <code>false</code>, the upper bits may be zero, resulting in a number that is slightly smaller than requested. </td></tr>
+ <tr><td valign="top"><tt>[in]</tt>&nbsp;</td><td valign="top"><em>low_bit_on</em>&nbsp;</td><td>If <code>true</code>, the returned number will always be odd. If <code>false</code>, it has an equal chance of being odd or even. </td></tr>
+ <tr><td valign="top"><tt>[in]</tt>&nbsp;</td><td valign="top"><em>can_be_negative</em>&nbsp;</td><td>If <code>true</code>, the returned value has an equal chance of being positive or negative. If <code>false</code>, it will always be positive.</td></tr>
+ </table>
+ </dd>
+</dl>
+<dl class="return"><dt><b>Returns:</b></dt><dd>A random <a class="el" href="classxint_1_1integer.html" title="The extended integer class.">integer</a> with the requested attributes.</dd></dl>
+<dl class="remark"><dt><b>Remarks:</b></dt><dd>This function uses the currently-defined random generator.</dd></dl>
+<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="namespacexint.html#a9c50302b216b64d17d9c1d6350e88036" title="Change the random generator that the library uses.">xint::set_random_generator</a> </dd></dl>
+
+</div>
+</div>
+<a class="anchor" id="afc8ba5f62561b4d2b42e32dde1a10ef3"></a><!-- doxytag: member="xint::random_prime" ref="afc8ba5f62561b4d2b42e32dde1a10ef3" args="(size_t size_in_bits, callback_t callback)" -->
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname"><a class="el" href="classxint_1_1integer.html">integer</a> xint::random_prime </td>
+ <td>(</td>
+ <td class="paramtype">size_t&nbsp;</td>
+ <td class="paramname"> <em>size_in_bits</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">callback_t&nbsp;</td>
+ <td class="paramname"> <em>callback</em></td><td>&nbsp;</td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>)</td>
+ <td></td><td></td><td></td>
+ </tr>
+ </table>
+</div>
+<div class="memdoc">
+
+<p>Generate a randomly-generated prime number of a particular bit-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>size_in_bits</em>&nbsp;</td><td>The number of bits that you want the returned value to have. </td></tr>
+ <tr><td valign="top"><tt>[in]</tt>&nbsp;</td><td valign="top"><em>callback</em>&nbsp;</td><td>An optional function that will be called regularly during the operation. If it returns <code>false</code>, the function will immediately return.</td></tr>
+ </table>
+ </dd>
+</dl>
+<dl class="return"><dt><b>Returns:</b></dt><dd>A randomly-generated prime <a class="el" href="classxint_1_1integer.html" title="The extended integer class.">integer</a> with the specified number of bits, or zero if the provided callback function cancelled the operation.</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>std::invalid_argument</em>&nbsp;</td><td>if <code>size_in_bits</code> is less than two.</td></tr>
+ </table>
+ </dd>
+</dl>
+<dl class="note"><dt><b>Note:</b></dt><dd>This function uses <a class="el" href="namespacexint.html#ab205c4e52dbc6825cefe3a251f6ca99f" title="Tests an integer for primality.">xint::is_prime</a>. See the description of it for details of its limitations.</dd></dl>
+<dl class="user"><dt><b></b></dt><dd>It also uses the library's currently-set random number generator. See the <a class="el" href="random.html">Random Number Functions page</a> for details on its limitations and requirements, and how to get cryptographically-secure random numbers.</dd></dl>
+<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="primes.html">Generating Prime Numbers</a> </dd></dl>
+
+</div>
+</div>
+<a class="anchor" id="a9c50302b216b64d17d9c1d6350e88036"></a><!-- doxytag: member="xint::set_random_generator" ref="a9c50302b216b64d17d9c1d6350e88036" args="(T *gen)" -->
+<div class="memitem">
+<div class="memproto">
+<div class="memtemplate">
+template&lt;typename T &gt; </div>
+ <table class="memname">
+ <tr>
+ <td class="memname">void xint::set_random_generator </td>
+ <td>(</td>
+ <td class="paramtype">T *&nbsp;</td>
+ <td class="paramname"> <em>gen</em></td>
+ <td>&nbsp;)&nbsp;</td>
+ <td><code> [inline]</code></td>
+ </tr>
+ </table>
+</div>
+<div class="memdoc">
+
+<p>Change the random generator that the library uses. </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>gen</em>&nbsp;</td><td>A pointer to the new generator to use.</td></tr>
+ </table>
+ </dd>
+</dl>
+<dl class="warning"><dt><b>Warning:</b></dt><dd>The generator must be a heap-allocated pointer (one created with <code>new</code>), which the XInt library assumes ownership of. Don't pass in a stack-created item, don't try to delete the item that you passed in, and don't attempt to use it separately after passing it to this function, or the behavior is undefined.</dd></dl>
+<dl class="remark"><dt><b>Remarks:</b></dt><dd>See the <a class="el" href="random.html">Random Number page</a> for an example of how to use it. </dd></dl>
+
+<p>Definition at line <a class="el" href="xint_8hpp_source.html#l00622">622</a> of file <a class="el" href="xint_8hpp_source.html">xint.hpp</a>.</p>
+
+</div>
+</div>
+<a class="anchor" id="adf2652627e78682c17e120816987984a"></a><!-- doxytag: member="xint::setbit" ref="adf2652627e78682c17e120816987984a" args="(integer &amp;n, size_t bit)" -->
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname">void xint::setbit </td>
+ <td>(</td>
+ <td class="paramtype">integer &amp;&nbsp;</td>
+ <td class="paramname"> <em>n</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">size_t&nbsp;</td>
+ <td class="paramname"> <em>bit</em></td><td>&nbsp;</td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>)</td>
+ <td></td><td></td><td></td>
+ </tr>
+ </table>
+</div>
+<div class="memdoc">
+
+<p>Sets a specific bit in an <a class="el" href="classxint_1_1integer.html" title="The extended integer class.">integer</a> to one. </p>
+<dl><dt><b>Parameters:</b></dt><dd>
+ <table border="0" cellspacing="2" cellpadding="0">
+ <tr><td valign="top"><tt>[in,out]</tt>&nbsp;</td><td valign="top"><em>n</em>&nbsp;</td><td>The <a class="el" href="classxint_1_1integer.html" title="The extended integer class.">integer</a> to operate on. </td></tr>
+ <tr><td valign="top"><tt>[in]</tt>&nbsp;</td><td valign="top"><em>bit</em>&nbsp;</td><td>The zero-based index of the bit to change.</td></tr>
+ </table>
+ </dd>
+</dl>
+<dl class="return"><dt><b>Returns:</b></dt><dd>Nothing. </dd></dl>
+
+</div>
+</div>
+<a class="anchor" id="a4f4dacd6f9398aaa500112731ab713ce"></a><!-- doxytag: member="xint::shift" ref="a4f4dacd6f9398aaa500112731ab713ce" args="(const integer &amp;n, int byBits)" -->
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname"><a class="el" href="classxint_1_1integer.html">integer</a> xint::shift </td>
+ <td>(</td>
+ <td class="paramtype">const integer &amp;&nbsp;</td>
+ <td class="paramname"> <em>n</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">int&nbsp;</td>
+ <td class="paramname"> <em>byBits</em></td><td>&nbsp;</td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>)</td>
+ <td></td><td></td><td></td>
+ </tr>
+ </table>
+</div>
+<div class="memdoc">
+
+<p>Bit-shift an <a class="el" href="classxint_1_1integer.html" title="The extended integer class.">integer</a>, in either direction. </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>The <a class="el" href="classxint_1_1integer.html" title="The extended integer class.">integer</a> to operate on. </td></tr>
+ <tr><td valign="top"><tt>[in]</tt>&nbsp;</td><td valign="top"><em>byBits</em>&nbsp;</td><td>The number of bits to shift it. If positive, it will shift left, negative will shift right.</td></tr>
+ </table>
+ </dd>
+</dl>
+<dl class="return"><dt><b>Returns:</b></dt><dd>The bit-shifted <a class="el" href="classxint_1_1integer.html" title="The extended integer class.">integer</a>. </dd></dl>
+
+</div>
+</div>
+<a class="anchor" id="a6799cc3c4d8c963279be64b209bfd3b6"></a><!-- doxytag: member="xint::shift_left" ref="a6799cc3c4d8c963279be64b209bfd3b6" args="(const integer &amp;n, size_t byBits)" -->
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname"><a class="el" href="classxint_1_1integer.html">integer</a> xint::shift_left </td>
+ <td>(</td>
+ <td class="paramtype">const integer &amp;&nbsp;</td>
+ <td class="paramname"> <em>n</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">size_t&nbsp;</td>
+ <td class="paramname"> <em>byBits</em></td><td>&nbsp;</td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>)</td>
+ <td></td><td></td><td></td>
+ </tr>
+ </table>
+</div>
+<div class="memdoc">
+
+<p>Left-shift an <a class="el" href="classxint_1_1integer.html" title="The extended integer class.">integer</a> by a specified number of bits. </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>The <a class="el" href="classxint_1_1integer.html" title="The extended integer class.">integer</a> to operate on. </td></tr>
+ <tr><td valign="top"><tt>[in]</tt>&nbsp;</td><td valign="top"><em>byBits</em>&nbsp;</td><td>The number of bits to left-shift it.</td></tr>
+ </table>
+ </dd>
+</dl>
+<dl class="return"><dt><b>Returns:</b></dt><dd>The bit-shifted <a class="el" href="classxint_1_1integer.html" title="The extended integer class.">integer</a>. </dd></dl>
+
+</div>
+</div>
+<a class="anchor" id="a49a5a4220cb88b7446545e4b65950473"></a><!-- doxytag: member="xint::shift_right" ref="a49a5a4220cb88b7446545e4b65950473" args="(const integer &amp;n, size_t byBits)" -->
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname"><a class="el" href="classxint_1_1integer.html">integer</a> xint::shift_right </td>
+ <td>(</td>
+ <td class="paramtype">const integer &amp;&nbsp;</td>
+ <td class="paramname"> <em>n</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">size_t&nbsp;</td>
+ <td class="paramname"> <em>byBits</em></td><td>&nbsp;</td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>)</td>
+ <td></td><td></td><td></td>
+ </tr>
+ </table>
+</div>
+<div class="memdoc">
+
+<p>Right-shift an <a class="el" href="classxint_1_1integer.html" title="The extended integer class.">integer</a> by a specified number of bits. </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>The <a class="el" href="classxint_1_1integer.html" title="The extended integer class.">integer</a> to operate on. </td></tr>
+ <tr><td valign="top"><tt>[in]</tt>&nbsp;</td><td valign="top"><em>byBits</em>&nbsp;</td><td>The number of bits to right-shift it.</td></tr>
+ </table>
+ </dd>
+</dl>
+<dl class="return"><dt><b>Returns:</b></dt><dd>The bit-shifted <a class="el" href="classxint_1_1integer.html" title="The extended integer class.">integer</a>. </dd></dl>
+
+</div>
+</div>
+<a class="anchor" id="a0aec423511839fd784b1654389dfcf5b"></a><!-- doxytag: member="xint::sqr" ref="a0aec423511839fd784b1654389dfcf5b" args="(const integer &amp;n)" -->
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname"><a class="el" href="classxint_1_1integer.html">integer</a> xint::sqr </td>
+ <td>(</td>
+ <td class="paramtype">const integer &amp;&nbsp;</td>
+ <td class="paramname"> <em>n</em></td>
+ <td>&nbsp;)&nbsp;</td>
+ <td></td>
+ </tr>
+ </table>
+</div>
+<div class="memdoc">
+
+<p>Calculate the value of n<sup>2</sup>. </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>The <a class="el" href="classxint_1_1integer.html" title="The extended integer class.">integer</a> to operate on.</td></tr>
+ </table>
+ </dd>
+</dl>
+<dl class="return"><dt><b>Returns:</b></dt><dd><code>n</code> times <code>n</code>.</dd></dl>
+<p>This function uses a faster algorithm than the standard multiplication one.</p>
+<dl class="todo"><dt><b><a class="el" href="todo.html#_todo000002">Todo:</a></b></dt><dd>Rewrite this to eliminate the inefficient addOverflow. </dd></dl>
+
+</div>
+</div>
+<a class="anchor" id="aa5564979e78556afdc68dbbd744a0bcb"></a><!-- doxytag: member="xint::sqrmod" ref="aa5564979e78556afdc68dbbd744a0bcb" args="(const integer &amp;n, const integer &amp;m)" -->
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname"><a class="el" href="classxint_1_1integer.html">integer</a> xint::sqrmod </td>
+ <td>(</td>
+ <td class="paramtype">const integer &amp;&nbsp;</td>
+ <td class="paramname"> <em>n</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">const integer &amp;&nbsp;</td>
+ <td class="paramname"> <em>m</em></td><td>&nbsp;</td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>)</td>
+ <td></td><td></td><td></td>
+ </tr>
+ </table>
+</div>
+<div class="memdoc">
+
+<p>Get the modular product of squaring an <a class="el" href="classxint_1_1integer.html" title="The extended integer class.">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>n</em>&nbsp;</td><td>The <a class="el" href="classxint_1_1integer.html" title="The extended integer class.">integer</a> to square. </td></tr>
+ <tr><td valign="top"><tt>[in]</tt>&nbsp;</td><td valign="top"><em>m</em>&nbsp;</td><td>The modulus.</td></tr>
+ </table>
+ </dd>
+</dl>
+<dl class="return"><dt><b>Returns:</b></dt><dd>The result of <code>sqr(n)</code> % <code>m</code>.</dd></dl>
+<dl class="remark"><dt><b>Remarks:</b></dt><dd>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. </dd></dl>
+
+</div>
+</div>
+<a class="anchor" id="a74891726f8af86736169dd43b929ad0a"></a><!-- doxytag: member="xint::sqrt" ref="a74891726f8af86736169dd43b929ad0a" args="(const integer &amp;n)" -->
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname"><a class="el" href="classxint_1_1integer.html">integer</a> xint::sqrt </td>
+ <td>(</td>
+ <td class="paramtype">const integer &amp;&nbsp;</td>
+ <td class="paramname"> <em>n</em></td>
+ <td>&nbsp;)&nbsp;</td>
+ <td></td>
+ </tr>
+ </table>
+</div>
+<div class="memdoc">
+
+<p>Calculate the square root of <code>an</code> <a class="el" href="classxint_1_1integer.html" title="The extended integer class.">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>n</em>&nbsp;</td><td>The value to operate on.</td></tr>
+ </table>
+ </dd>
+</dl>
+<dl class="return"><dt><b>Returns:</b></dt><dd>The largest <a class="el" href="classxint_1_1integer.html" title="The extended integer class.">integer</a> that, when squared, is less than or equal to <code>n</code>. If <code>n</code> is not a perfect square, then this value will not be the exact square root.</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="classxint_1_1cannot__represent.html" title="Exception class.">xint::cannot_represent</a></em>&nbsp;</td><td>if <code>n</code> is negative. </td></tr>
+ </table>
+ </dd>
+</dl>
+
+</div>
+</div>
+<a class="anchor" id="af196cd74cb23970032fddcce71957a80"></a><!-- doxytag: member="xint::subtract" ref="af196cd74cb23970032fddcce71957a80" args="(const integer &amp;n1, const integer &amp;n2)" -->
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname"><a class="el" href="classxint_1_1integer.html">integer</a> xint::subtract </td>
+ <td>(</td>
+ <td class="paramtype">const integer &amp;&nbsp;</td>
+ <td class="paramname"> <em>n1</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">const integer &amp;&nbsp;</td>
+ <td class="paramname"> <em>n2</em></td><td>&nbsp;</td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>)</td>
+ <td></td><td></td><td></td>
+ </tr>
+ </table>
+</div>
+<div class="memdoc">
+
+<p>Calculate the difference between two integers. </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>n1,n2</em>&nbsp;</td><td>The integers to operate on.</td></tr>
+ </table>
+ </dd>
+</dl>
+<dl class="return"><dt><b>Returns:</b></dt><dd>The difference between the parameters. </dd></dl>
+
+</div>
+</div>
+<a class="anchor" id="a6b7f5122683b6d924bf86c7d1507206b"></a><!-- doxytag: member="xint::testAddSubtract" ref="a6b7f5122683b6d924bf86c7d1507206b" args="()" -->
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname">bool xint::testAddSubtract </td>
+ <td>(</td>
+ <td class="paramname"></td>
+ <td>&nbsp;)&nbsp;</td>
+ <td></td>
+ </tr>
+ </table>
+</div>
+<div class="memdoc">
+
+</div>
+</div>
+<a class="anchor" id="a509778d505a3c8a0b335817150eaead2"></a><!-- doxytag: member="xint::testBitManipulations" ref="a509778d505a3c8a0b335817150eaead2" args="()" -->
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname">bool xint::testBitManipulations </td>
+ <td>(</td>
+ <td class="paramname"></td>
+ <td>&nbsp;)&nbsp;</td>
+ <td></td>
+ </tr>
+ </table>
+</div>
+<div class="memdoc">
+
+</div>
+</div>
+<a class="anchor" id="ae4ef5f20964fa995df7828f27bd7adbe"></a><!-- doxytag: member="xint::testConvert" ref="ae4ef5f20964fa995df7828f27bd7adbe" args="()" -->
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname">bool xint::testConvert </td>
+ <td>(</td>
+ <td class="paramname"></td>
+ <td>&nbsp;)&nbsp;</td>
+ <td></td>
+ </tr>
+ </table>
+</div>
+<div class="memdoc">
+
+</div>
+</div>
+<a class="anchor" id="a4ed78ff75865ae44a00d3709dd88c3a1"></a><!-- doxytag: member="xint::testDivideMod" ref="a4ed78ff75865ae44a00d3709dd88c3a1" args="()" -->
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname">bool xint::testDivideMod </td>
+ <td>(</td>
+ <td class="paramname"></td>
+ <td>&nbsp;)&nbsp;</td>
+ <td></td>
+ </tr>
+ </table>
+</div>
+<div class="memdoc">
+
+</div>
+</div>
+<a class="anchor" id="ac40068d64f8c4d9002a0687935888c42"></a><!-- doxytag: member="xint::testMontyMultiply" ref="ac40068d64f8c4d9002a0687935888c42" args="()" -->
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname">bool xint::testMontyMultiply </td>
+ <td>(</td>
+ <td class="paramname"></td>
+ <td>&nbsp;)&nbsp;</td>
+ <td></td>
+ </tr>
+ </table>
+</div>
+<div class="memdoc">
+
+</div>
+</div>
+<a class="anchor" id="a9cce0401174b9ae173671b0800c5f457"></a><!-- doxytag: member="xint::testMontyPowerMod" ref="a9cce0401174b9ae173671b0800c5f457" args="()" -->
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname">bool xint::testMontyPowerMod </td>
+ <td>(</td>
+ <td class="paramname"></td>
+ <td>&nbsp;)&nbsp;</td>
+ <td></td>
+ </tr>
+ </table>
+</div>
+<div class="memdoc">
+
+</div>
+</div>
+<a class="anchor" id="affe2e221777d4263a420d014fa9640d0"></a><!-- doxytag: member="xint::testMultiply" ref="affe2e221777d4263a420d014fa9640d0" args="()" -->
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname">bool xint::testMultiply </td>
+ <td>(</td>
+ <td class="paramname"></td>
+ <td>&nbsp;)&nbsp;</td>
+ <td></td>
+ </tr>
+ </table>
+</div>
+<div class="memdoc">
+
+</div>
+</div>
+<a class="anchor" id="ae3305f62ca9be58fbc11dbd4c703f38b"></a><!-- doxytag: member="xint::testStreams" ref="ae3305f62ca9be58fbc11dbd4c703f38b" args="()" -->
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname">bool xint::testStreams </td>
+ <td>(</td>
+ <td class="paramname"></td>
+ <td>&nbsp;)&nbsp;</td>
+ <td></td>
+ </tr>
+ </table>
+</div>
+<div class="memdoc">
+
+</div>
+</div>
+<a class="anchor" id="a21bd738b96eec205eedc7a9960e9a6e5"></a><!-- doxytag: member="xint::to" ref="a21bd738b96eec205eedc7a9960e9a6e5" args="(const integer &amp;n)" -->
+<div class="memitem">
+<div class="memproto">
+<div class="memtemplate">
+template&lt;typename T &gt; </div>
+ <table class="memname">
+ <tr>
+ <td class="memname">T xint::to </td>
+ <td>(</td>
+ <td class="paramtype">const integer &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>Efficiently converts from an <a class="el" href="classxint_1_1integer.html" title="The extended integer class.">xint::integer</a> to a built-in integer 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>n</em>&nbsp;</td><td>The <a class="el" href="classxint_1_1integer.html" title="The extended integer class.">integer</a> to convert. </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 to convert it to.</td></tr>
+ </table>
+ </dd>
+</dl>
+<dl class="return"><dt><b>Returns:</b></dt><dd>The numeric value of <code>n</code>, converted to the specified type.</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="classxint_1_1too__big.html" title="Exception class.">xint::too_big</a></em>&nbsp;</td><td>if <code>n</code> would not fit into the specified type. </td></tr>
+ </table>
+ </dd>
+</dl>
+
+<p>Definition at line <a class="el" href="xint_8hpp_source.html#l00593">593</a> of file <a class="el" href="xint_8hpp_source.html">xint.hpp</a>.</p>
+
+</div>
+</div>
+<a class="anchor" id="ab8f33201a251e3e118dc82f214e22aeb"></a><!-- doxytag: member="xint::to_binary" ref="ab8f33201a251e3e118dc82f214e22aeb" args="(const integer &amp;n)" -->
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname">std::string xint::to_binary </td>
+ <td>(</td>
+ <td class="paramtype">const integer &amp;&nbsp;</td>
+ <td class="paramname"> <em>n</em></td>
+ <td>&nbsp;)&nbsp;</td>
+ <td></td>
+ </tr>
+ </table>
+</div>
+<div class="memdoc">
+
+<p>Creates a binary representation of an <a class="el" href="classxint_1_1integer.html" title="The extended integer class.">integer</a>, lowest byte first. </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>The <a class="el" href="classxint_1_1integer.html" title="The extended integer class.">integer</a> to convert.</td></tr>
+ </table>
+ </dd>
+</dl>
+<dl class="return"><dt><b>Returns:</b></dt><dd>A string containing the binary representation.</dd></dl>
+<dl class="note"><dt><b>Note:</b></dt><dd>This function only stores the absolute value of <code>n</code>; if you need the sign, you must store it separately.</dd></dl>
+<dl class="remark"><dt><b>Remarks:</b></dt><dd>A binary representation is sometimes used for persistent storage or transmission, as it is more space-efficient than a string representation.</dd></dl>
+<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="namespacexint.html#ac2ac2f74b45e4179560d845e6310be9a" title="Converts a binary representation of a number into an integer.">xint::from_binary</a> </dd></dl>
+
+</div>
+</div>
+<a class="anchor" id="a016c9573ff48411847edf86c406946a0"></a><!-- doxytag: member="xint::to_string" ref="a016c9573ff48411847edf86c406946a0" args="(const integer &amp;n, size_t base, bool uppercase)" -->
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname">std::string xint::to_string </td>
+ <td>(</td>
+ <td class="paramtype">const integer &amp;&nbsp;</td>
+ <td class="paramname"> <em>n</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">size_t&nbsp;</td>
+ <td class="paramname"> <em>base</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">bool&nbsp;</td>
+ <td class="paramname"> <em>uppercase</em></td><td>&nbsp;</td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>)</td>
+ <td></td><td></td><td></td>
+ </tr>
+ </table>
+</div>
+<div class="memdoc">
+
+<p>Creates a string representation of the specified <a class="el" href="classxint_1_1integer.html" title="The extended integer class.">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>n</em>&nbsp;</td><td>The <a class="el" href="classxint_1_1integer.html" title="The extended integer class.">integer</a> to convert. </td></tr>
+ <tr><td valign="top"><tt>[in]</tt>&nbsp;</td><td valign="top"><em>base</em>&nbsp;</td><td>The base, between 2 and 36 inclusive, to convert it to. Defaults to base 10. </td></tr>
+ <tr><td valign="top"><tt>[in]</tt>&nbsp;</td><td valign="top"><em>uppercase</em>&nbsp;</td><td>Whether to make alphabetic characters (for bases greater than ten) uppercase or not. Defaults to <code>false</code>.</td></tr>
+ </table>
+ </dd>
+</dl>
+<dl class="return"><dt><b>Returns:</b></dt><dd>The string value of <code>n</code>. If <code>n</code> is Not-a-Number, returns the string <code>#NaN#</code>.</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="classxint_1_1invalid__base.html" title="Exception class.">xint::invalid_base</a></em>&nbsp;</td><td>if base is less than two or greater than 36.</td></tr>
+ </table>
+ </dd>
+</dl>
+<dl class="note"><dt><b>Note:</b></dt><dd>If exceptions are blocked, it returns an empty string instead of throwing an exception.</dd></dl>
+<dl class="remark"><dt><b>Remarks:</b></dt><dd>This is the function that's called when you ask the library to write an <a class="el" href="classxint_1_1integer.html" title="The extended integer class.">integer</a> 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.) </dd></dl>
+
+</div>
+</div>
+<a class="anchor" id="ab8e85cd5425fcec419c07155e2a91e13"></a><!-- doxytag: member="xint::toMontgomeryForm" ref="ab8e85cd5425fcec419c07155e2a91e13" args="(const integer &amp;n, const integer &amp;m)" -->
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname"><a class="el" href="classxint_1_1integer.html">integer</a> xint::toMontgomeryForm </td>
+ <td>(</td>
+ <td class="paramtype">const integer &amp;&nbsp;</td>
+ <td class="paramname"> <em>n</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">const integer &amp;&nbsp;</td>
+ <td class="paramname"> <em>m</em></td><td>&nbsp;</td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>)</td>
+ <td></td><td></td><td></td>
+ </tr>
+ </table>
+</div>
+<div class="memdoc">
+
+<p>Returns the Montgomery form of a number. Used for testing. </p>
+
+</div>
+</div>
+<hr/><h2>Variable Documentation</h2>
+<a class="anchor" id="a7a5434a5f5fb1db19f0de18014c4fc41"></a><!-- doxytag: member="xint::autobase" ref="a7a5434a5f5fb1db19f0de18014c4fc41" args="" -->
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname">const size_t <a class="el" href="namespacexint.html#a7a5434a5f5fb1db19f0de18014c4fc41">xint::autobase</a> = (std::numeric_limits&lt;size_t&gt;::max)()</td>
+ </tr>
+ </table>
+</div>
+<div class="memdoc">
+<p>A value that can be used for the 'base' parameter of the string-to-integer functions </p>
+<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="classxint_1_1integer.html#a6dfc86dfc539cfda1062ef1bc24aa526" title="Create an integer from a string representation.">xint::integer::integer(const std::string&amp; str, size_t base)</a> </dd>
+<dd>
+<a class="el" href="namespacexint.html#ad9dcb2b835be5f8ee918979945911ac0" title="Converts a string into an integer.">xint::from_string</a> </dd></dl>
+
+<p>Definition at line <a class="el" href="xint_8hpp_source.html#l00123">123</a> of file <a class="el" href="xint_8hpp_source.html">xint.hpp</a>.</p>
+
+</div>
+</div>
+<a class="anchor" id="a44496f258b36237d4cea35558a71017a"></a><!-- doxytag: member="xint::no_callback" ref="a44496f258b36237d4cea35558a71017a" args="" -->
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname">const <a class="el" href="namespacexint.html#ac8a660c33746c536469d347307b8da7a">callback_t</a> <a class="el" href="namespacexint.html#a44496f258b36237d4cea35558a71017a">xint::no_callback</a></td>
+ </tr>
+ </table>
+</div>
+<div class="memdoc">
+<p>An empty callback_t, used as a default parameter for some functions. </p>
+<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="namespacexint.html#ab205c4e52dbc6825cefe3a251f6ca99f" title="Tests an integer for primality.">xint::is_prime</a> </dd>
+<dd>
+<a class="el" href="namespacexint.html#afc8ba5f62561b4d2b42e32dde1a10ef3" title="Generate a randomly-generated prime number of a particular bit-size.">xint::random_prime</a> </dd></dl>
+
+<p>Definition at line <a class="el" href="xint_8hpp_source.html#l00118">118</a> of file <a class="el" href="xint_8hpp_source.html">xint.hpp</a>.</p>
+
+</div>
+</div>
+</div>
+<hr size="1"/><address style="text-align: right;"><small>Generated on Tue Apr 6 01:22:08 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.1 </small></address>
+</body>
+</html>

Added: sandbox/xint/doc/namespacexint_1_1detail.html
==============================================================================
--- (empty file)
+++ sandbox/xint/doc/namespacexint_1_1detail.html 2010-04-06 01:40:33 EDT (Tue, 06 Apr 2010)
@@ -0,0 +1,238 @@
+<!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: xint::detail Namespace 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.1 -->
+<div class="navigation" id="top">
+ <div class="tabs">
+ <ul>
+ <li>Main Page</li>
+ <li>Related Pages</li>
+ <li class="current">Namespaces</li>
+ <li>Classes</li>
+ <li>Files</li>
+ </ul>
+ </div>
+ <div class="tabs">
+ <ul>
+ <li>Namespace List</li>
+ <li>Namespace Members</li>
+ </ul>
+ </div>
+ <div class="navpath"><a class="el" href="namespacexint.html">xint</a>::<a class="el" href="namespacexint_1_1detail.html">detail</a>
+ </div>
+</div>
+<div class="contents">
+<h1>xint::detail Namespace Reference</h1>
+<p>The items within this namespace are meant for internal use only.
+More...</p>
+<table border="0" cellpadding="0" cellspacing="0">
+<tr><td colspan="2"><h2>Classes</h2></td></tr>
+<tr><td class="memItemLeft" align="right" valign="top">struct &nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="structxint_1_1detail_1_1token.html">token</a></td></tr>
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">An empty struct, used in <a class="el" href="namespacexint.html#ad63045584f06221eb6a7581ad3091582" title="Used for the exception-blocker.">xint::token</a>. More...<br/></td></tr>
+<tr><td class="memItemLeft" align="right" valign="top">struct &nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="structxint_1_1detail_1_1base__random__generator.html">base_random_generator</a></td></tr>
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">The base class for <a class="el" href="structxint_1_1detail_1_1random__generator.html" title="Support class for the random generator code.">random_generator</a>. More...<br/></td></tr>
+<tr><td class="memItemLeft" align="right" valign="top">struct &nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="structxint_1_1detail_1_1random__generator.html">random_generator</a></td></tr>
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Support class for the random generator code. More...<br/></td></tr>
+<tr><td class="memItemLeft" align="right" valign="top">struct &nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="structxint_1_1detail_1_1data__t.html">data_t</a></td></tr>
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Holds the internal details of an <a class="el" href="classxint_1_1integer.html" title="The extended integer class.">xint::integer</a>. More...<br/></td></tr>
+<tr><td colspan="2"><h2>Typedefs</h2></td></tr>
+<tr><td class="memItemLeft" align="right" valign="top">typedef boost::uintmax_t&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespacexint_1_1detail.html#aceb9b654c1c2daaf377b31bd4a089750">doubledigit_t</a></td></tr>
+<tr><td class="memItemLeft" align="right" valign="top">typedef boost::uint_t<br class="typebreak"/>
+&lt; std::numeric_limits<br class="typebreak"/>
+&lt; <a class="el" href="namespacexint_1_1detail.html#aceb9b654c1c2daaf377b31bd4a089750">doubledigit_t</a> &gt;::digits/2 &gt;<br class="typebreak"/>
+::fast&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespacexint_1_1detail.html#a8843fb7e364832d8d5983de28bdbcf34">digit_t</a></td></tr>
+<tr><td colspan="2"><h2>Functions</h2></td></tr>
+<tr><td class="memItemLeft" align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespacexint_1_1detail.html#a5f8bba03a6f615a82ebcf94ad7cd4353">set_random_generator</a> (<a class="el" href="structxint_1_1detail_1_1base__random__generator.html">base_random_generator</a> *obj)</td></tr>
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Support function. <br/></td></tr>
+<tr><td class="memItemLeft" align="right" valign="top">unsigned int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespacexint_1_1detail.html#a1dfc1e90886c4897a4b112f491b89b62">get_random</a> ()</td></tr>
+<tr><td colspan="2"><h2>Variables</h2></td></tr>
+<tr><td class="memItemLeft" align="right" valign="top">const std::string&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespacexint_1_1detail.html#aede27c67f3308e0805fc3093ffe6f4ce">nan_text</a></td></tr>
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Holds the text representation of the Not-a-Number value. <br/></td></tr>
+<tr><td colspan="2"><div class="groupHeader">Some constants used by the library.</div></td></tr>
+<tr><td colspan="2"><div class="groupText"><p><a class="anchor" id="amgrpe1f42a3ea000e0468230fb7abe73e7b1"></a> </p>
+<br/><br/></div></td></tr>
+<tr><td class="memItemLeft" align="right" valign="top">const size_t&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespacexint_1_1detail.html#a9bd9e8d55061238d63913020d2721518">bits_per_digit</a> = std::numeric_limits&lt;<a class="el" href="namespacexint_1_1detail.html#a8843fb7e364832d8d5983de28bdbcf34">digit_t</a>&gt;::digits</td></tr>
+<tr><td class="memItemLeft" align="right" valign="top">const <a class="el" href="namespacexint_1_1detail.html#a8843fb7e364832d8d5983de28bdbcf34">digit_t</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespacexint_1_1detail.html#a116bb5ce94c55f0eae3338d69fd5e8eb">digit_hibit</a> = (<a class="el" href="namespacexint_1_1detail.html#a8843fb7e364832d8d5983de28bdbcf34">digit_t</a>(1) &lt;&lt; (<a class="el" href="namespacexint_1_1detail.html#a9bd9e8d55061238d63913020d2721518">bits_per_digit</a>-1))</td></tr>
+<tr><td class="memItemLeft" align="right" valign="top">const <a class="el" href="namespacexint_1_1detail.html#aceb9b654c1c2daaf377b31bd4a089750">doubledigit_t</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespacexint_1_1detail.html#a2af0686427ee285bd715330f12fcbc1c">doubledigit_hibit</a> = (<a class="el" href="namespacexint_1_1detail.html#aceb9b654c1c2daaf377b31bd4a089750">doubledigit_t</a>(1) &lt;&lt; (<a class="el" href="namespacexint_1_1detail.html#a9bd9e8d55061238d63913020d2721518">bits_per_digit</a>*2-1))</td></tr>
+<tr><td class="memItemLeft" align="right" valign="top">const <a class="el" href="namespacexint_1_1detail.html#aceb9b654c1c2daaf377b31bd4a089750">doubledigit_t</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespacexint_1_1detail.html#a6746855fd8cde164294a46108d502e6a">digit_overflowbit</a> = (<a class="el" href="namespacexint_1_1detail.html#aceb9b654c1c2daaf377b31bd4a089750">doubledigit_t</a>(1) &lt;&lt; <a class="el" href="namespacexint_1_1detail.html#a9bd9e8d55061238d63913020d2721518">bits_per_digit</a>)</td></tr>
+<tr><td class="memItemLeft" align="right" valign="top">const <a class="el" href="namespacexint_1_1detail.html#a8843fb7e364832d8d5983de28bdbcf34">digit_t</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespacexint_1_1detail.html#a051753e1bf43dcc77eaa93b8d4e49197">digit_mask</a> = <a class="el" href="namespacexint_1_1detail.html#a8843fb7e364832d8d5983de28bdbcf34">digit_t</a>(<a class="el" href="namespacexint_1_1detail.html#a6746855fd8cde164294a46108d502e6a">digit_overflowbit</a>-1)</td></tr>
+</table>
+<hr/><a name="_details"></a><h2>Detailed Description</h2>
+<p>The items within this namespace are meant for internal use only. </p>
+<hr/><h2>Typedef Documentation</h2>
+<a class="anchor" id="a8843fb7e364832d8d5983de28bdbcf34"></a><!-- doxytag: member="xint::detail::digit_t" ref="a8843fb7e364832d8d5983de28bdbcf34" args="" -->
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname">typedef boost::uint_t&lt;std::numeric_limits&lt;<a class="el" href="namespacexint_1_1detail.html#aceb9b654c1c2daaf377b31bd4a089750">doubledigit_t</a>&gt;::digits / 2&gt;::fast <a class="el" href="namespacexint_1_1detail.html#a8843fb7e364832d8d5983de28bdbcf34">xint::detail::digit_t</a></td>
+ </tr>
+ </table>
+</div>
+<div class="memdoc">
+<p>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. </p>
+
+<p>Definition at line <a class="el" href="xint_8hpp_source.html#l00059">59</a> of file <a class="el" href="xint_8hpp_source.html">xint.hpp</a>.</p>
+
+</div>
+</div>
+<a class="anchor" id="aceb9b654c1c2daaf377b31bd4a089750"></a><!-- doxytag: member="xint::detail::doubledigit_t" ref="aceb9b654c1c2daaf377b31bd4a089750" args="" -->
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname">typedef boost::uintmax_t <a class="el" href="namespacexint_1_1detail.html#aceb9b654c1c2daaf377b31bd4a089750">xint::detail::doubledigit_t</a></td>
+ </tr>
+ </table>
+</div>
+<div class="memdoc">
+<p>This is the type used for calculations. It should be the largest built-in integral type the system can offer, for maximum processing efficiency. </p>
+
+<p>Definition at line <a class="el" href="xint_8hpp_source.html#l00051">51</a> of file <a class="el" href="xint_8hpp_source.html">xint.hpp</a>.</p>
+
+</div>
+</div>
+<hr/><h2>Function Documentation</h2>
+<a class="anchor" id="a1dfc1e90886c4897a4b112f491b89b62"></a><!-- doxytag: member="xint::detail::get_random" ref="a1dfc1e90886c4897a4b112f491b89b62" args="()" -->
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname">unsigned int xint::detail::get_random </td>
+ <td>(</td>
+ <td class="paramname"></td>
+ <td>&nbsp;)&nbsp;</td>
+ <td></td>
+ </tr>
+ </table>
+</div>
+<div class="memdoc">
+<dl class="return"><dt><b>Returns:</b></dt><dd>An unsigned int from the current random generator. </dd></dl>
+<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="namespacexint.html#a9c50302b216b64d17d9c1d6350e88036" title="Change the random generator that the library uses.">xint::set_random_generator</a> </dd></dl>
+
+</div>
+</div>
+<a class="anchor" id="a5f8bba03a6f615a82ebcf94ad7cd4353"></a><!-- doxytag: member="xint::detail::set_random_generator" ref="a5f8bba03a6f615a82ebcf94ad7cd4353" args="(base_random_generator *obj)" -->
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname">void xint::detail::set_random_generator </td>
+ <td>(</td>
+ <td class="paramtype">base_random_generator *&nbsp;</td>
+ <td class="paramname"> <em>obj</em></td>
+ <td>&nbsp;)&nbsp;</td>
+ <td></td>
+ </tr>
+ </table>
+</div>
+<div class="memdoc">
+
+<p>Support function. </p>
+<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="namespacexint.html#a9c50302b216b64d17d9c1d6350e88036" title="Change the random generator that the library uses.">xint::set_random_generator</a> </dd></dl>
+
+</div>
+</div>
+<hr/><h2>Variable Documentation</h2>
+<a class="anchor" id="a9bd9e8d55061238d63913020d2721518"></a><!-- doxytag: member="xint::detail::bits_per_digit" ref="a9bd9e8d55061238d63913020d2721518" args="" -->
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname">const size_t <a class="el" href="namespacexint_1_1detail.html#a9bd9e8d55061238d63913020d2721518">xint::detail::bits_per_digit</a> = std::numeric_limits&lt;<a class="el" href="namespacexint_1_1detail.html#a8843fb7e364832d8d5983de28bdbcf34">digit_t</a>&gt;::digits</td>
+ </tr>
+ </table>
+</div>
+<div class="memdoc">
+
+<p>Definition at line <a class="el" href="xint_8hpp_source.html#l00063">63</a> of file <a class="el" href="xint_8hpp_source.html">xint.hpp</a>.</p>
+
+</div>
+</div>
+<a class="anchor" id="a116bb5ce94c55f0eae3338d69fd5e8eb"></a><!-- doxytag: member="xint::detail::digit_hibit" ref="a116bb5ce94c55f0eae3338d69fd5e8eb" args="" -->
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname">const <a class="el" href="namespacexint_1_1detail.html#a8843fb7e364832d8d5983de28bdbcf34">digit_t</a> <a class="el" href="namespacexint_1_1detail.html#a116bb5ce94c55f0eae3338d69fd5e8eb">xint::detail::digit_hibit</a> = (<a class="el" href="namespacexint_1_1detail.html#a8843fb7e364832d8d5983de28bdbcf34">digit_t</a>(1) &lt;&lt; (<a class="el" href="namespacexint_1_1detail.html#a9bd9e8d55061238d63913020d2721518">bits_per_digit</a>-1))</td>
+ </tr>
+ </table>
+</div>
+<div class="memdoc">
+
+<p>Definition at line <a class="el" href="xint_8hpp_source.html#l00064">64</a> of file <a class="el" href="xint_8hpp_source.html">xint.hpp</a>.</p>
+
+</div>
+</div>
+<a class="anchor" id="a051753e1bf43dcc77eaa93b8d4e49197"></a><!-- doxytag: member="xint::detail::digit_mask" ref="a051753e1bf43dcc77eaa93b8d4e49197" args="" -->
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname">const <a class="el" href="namespacexint_1_1detail.html#a8843fb7e364832d8d5983de28bdbcf34">digit_t</a> <a class="el" href="namespacexint_1_1detail.html#a051753e1bf43dcc77eaa93b8d4e49197">xint::detail::digit_mask</a> = <a class="el" href="namespacexint_1_1detail.html#a8843fb7e364832d8d5983de28bdbcf34">digit_t</a>(<a class="el" href="namespacexint_1_1detail.html#a6746855fd8cde164294a46108d502e6a">digit_overflowbit</a>-1)</td>
+ </tr>
+ </table>
+</div>
+<div class="memdoc">
+
+<p>Definition at line <a class="el" href="xint_8hpp_source.html#l00067">67</a> of file <a class="el" href="xint_8hpp_source.html">xint.hpp</a>.</p>
+
+</div>
+</div>
+<a class="anchor" id="a6746855fd8cde164294a46108d502e6a"></a><!-- doxytag: member="xint::detail::digit_overflowbit" ref="a6746855fd8cde164294a46108d502e6a" args="" -->
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname">const <a class="el" href="namespacexint_1_1detail.html#aceb9b654c1c2daaf377b31bd4a089750">doubledigit_t</a> <a class="el" href="namespacexint_1_1detail.html#a6746855fd8cde164294a46108d502e6a">xint::detail::digit_overflowbit</a> = (<a class="el" href="namespacexint_1_1detail.html#aceb9b654c1c2daaf377b31bd4a089750">doubledigit_t</a>(1) &lt;&lt; <a class="el" href="namespacexint_1_1detail.html#a9bd9e8d55061238d63913020d2721518">bits_per_digit</a>)</td>
+ </tr>
+ </table>
+</div>
+<div class="memdoc">
+
+<p>Definition at line <a class="el" href="xint_8hpp_source.html#l00066">66</a> of file <a class="el" href="xint_8hpp_source.html">xint.hpp</a>.</p>
+
+</div>
+</div>
+<a class="anchor" id="a2af0686427ee285bd715330f12fcbc1c"></a><!-- doxytag: member="xint::detail::doubledigit_hibit" ref="a2af0686427ee285bd715330f12fcbc1c" args="" -->
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname">const <a class="el" href="namespacexint_1_1detail.html#aceb9b654c1c2daaf377b31bd4a089750">doubledigit_t</a> <a class="el" href="namespacexint_1_1detail.html#a2af0686427ee285bd715330f12fcbc1c">xint::detail::doubledigit_hibit</a> = (<a class="el" href="namespacexint_1_1detail.html#aceb9b654c1c2daaf377b31bd4a089750">doubledigit_t</a>(1) &lt;&lt; (<a class="el" href="namespacexint_1_1detail.html#a9bd9e8d55061238d63913020d2721518">bits_per_digit</a>*2-1))</td>
+ </tr>
+ </table>
+</div>
+<div class="memdoc">
+
+<p>Definition at line <a class="el" href="xint_8hpp_source.html#l00065">65</a> of file <a class="el" href="xint_8hpp_source.html">xint.hpp</a>.</p>
+
+</div>
+</div>
+<a class="anchor" id="aede27c67f3308e0805fc3093ffe6f4ce"></a><!-- doxytag: member="xint::detail::nan_text" ref="aede27c67f3308e0805fc3093ffe6f4ce" args="" -->
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname">const std::string <a class="el" href="namespacexint_1_1detail.html#aede27c67f3308e0805fc3093ffe6f4ce">xint::detail::nan_text</a></td>
+ </tr>
+ </table>
+</div>
+<div class="memdoc">
+
+<p>Holds the text representation of the Not-a-Number value. </p>
+
+</div>
+</div>
+</div>
+<hr size="1"/><address style="text-align: right;"><small>Generated on Tue Apr 6 01:22:08 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.1 </small></address>
+</body>
+</html>

Added: sandbox/xint/doc/nan.html
==============================================================================
--- (empty file)
+++ sandbox/xint/doc/nan.html 2010-04-06 01:40:33 EDT (Tue, 06 Apr 2010)
@@ -0,0 +1,45 @@
+<!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: The Not-a-Number Value</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.1 -->
+<div class="navigation" id="top">
+ <div class="tabs">
+ <ul>
+ <li>Main Page</li>
+ <li class="current">Related Pages</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="nan">The Not-a-Number Value </a></h1><p>Sometimes it's useful for a variable to have a value that doesn't represent any proper value, to indicate that it hasn't been specified or that there was an error in a calculation. For that purpose, the <code><a class="el" href="classxint_1_1integer.html" title="The extended integer class.">xint::integer</a></code> class provides Not-a-Number.</p>
+<p>To create a Not-a-Number, use the integer constructor that exists solely for that purpose. No other library function will return a Not-a-Number except under the following circumstances:</p>
+<ul>
+<li>If a function that returns a non-reference integer tries to throw a blockable exception, but exceptions are blocked.</li>
+<li>If the string-to-integer functions are asked to convert the string <code>"#NaN#"</code>.</li>
+</ul>
+<p>The only things you can do with a Not-a-Number are:</p>
+<ul>
+<li>Test for it, using the member function integer::is_nan.</li>
+<li>Convert it to a string, or write it to a stream. The result will be the string <code>"#NaN#"</code>.</li>
+<li>Make a copy of it.</li>
+</ul>
+<p>If you attempt to do anything else with it, you will get the non-blockable <code><a class="el" href="classxint_1_1not__a__number.html" title="Exception class.">xint::not_a_number</a></code> exception. </p>
+</div>
+<hr size="1"/><address style="text-align: right;"><small>Generated on Tue Apr 6 01:22:08 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.1 </small></address>
+</body>
+</html>

Added: sandbox/xint/doc/nan_8dox.html
==============================================================================
--- (empty file)
+++ sandbox/xint/doc/nan_8dox.html 2010-04-06 01:40:33 EDT (Tue, 06 Apr 2010)
@@ -0,0 +1,36 @@
+<!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/nan.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.1 -->
+<div class="navigation" id="top">
+ <div class="tabs">
+ <ul>
+ <li>Main Page</li>
+ <li>Related Pages</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/nan.dox File Reference</h1><table border="0" cellpadding="0" cellspacing="0">
+</table>
+</div>
+<hr size="1"/><address style="text-align: right;"><small>Generated on Tue Apr 6 01:22:08 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.1 </small></address>
+</body>
+</html>

Added: sandbox/xint/doc/operators_8cpp.html
==============================================================================
--- (empty file)
+++ sandbox/xint/doc/operators_8cpp.html 2010-04-06 01:40:33 EDT (Tue, 06 Apr 2010)
@@ -0,0 +1,66 @@
+<!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: operators.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.1 -->
+<div class="navigation" id="top">
+ <div class="tabs">
+ <ul>
+ <li>Main Page</li>
+ <li>Related Pages</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>operators.cpp File Reference</h1>
+<p>Contains the definitions for the basic math operators.
+More...</p>
+<code>#include &quot;../boost/xint/xint.hpp&quot;</code><br/>
+
+<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="namespacexint.html">xint</a></td></tr>
+
+<p><tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight"><p>All of the functions in the XInt 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">Operators</div></td></tr>
+<tr><td colspan="2"><div class="groupText"><p><a class="anchor" id="amgrpb3c5827f54218753bb2c3338236446c2"></a> These act exactly the same as for the built-in integer types. </p>
+<br/><br/></div></td></tr>
+<tr><td class="memItemLeft" align="right" valign="top">const integer &amp;&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespacexint.html#a586fb0eb69100ec74be94008ac26670d">xint::operator+</a> (const integer &amp;a)</td></tr>
+<tr><td class="memItemLeft" align="right" valign="top">integer&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespacexint.html#a8a510361ed458133ebfa5fd95f8d9c27">xint::operator-</a> (const integer &amp;a)</td></tr>
+<tr><td class="memItemLeft" align="right" valign="top">integer&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespacexint.html#a211ff80bb081c08674272cfcae736a93">xint::operator+</a> (const integer &amp;num1, const integer &amp;num2)</td></tr>
+<tr><td class="memItemLeft" align="right" valign="top">integer&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespacexint.html#a1e09422b575c6d29ea5c0d627b79c28e">xint::operator-</a> (const integer &amp;num1, const integer &amp;num2)</td></tr>
+<tr><td class="memItemLeft" align="right" valign="top">integer&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespacexint.html#aea36ad9037f109576d4f95ec72b5c825">xint::operator*</a> (const integer &amp;num1, const integer &amp;num2)</td></tr>
+<tr><td class="memItemLeft" align="right" valign="top">integer&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespacexint.html#a701217f7824c3e935fca25147da23807">xint::operator/</a> (const integer &amp;num1, const integer &amp;num2)</td></tr>
+<tr><td class="memItemLeft" align="right" valign="top">integer&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespacexint.html#ae0505757986a9c7133552552471aae24">xint::operator%</a> (const integer &amp;num1, const integer &amp;num2)</td></tr>
+<tr><td class="memItemLeft" align="right" valign="top">integer&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespacexint.html#a742550f1c62ac8c2bde8e1ceab2a466c">xint::operator&amp;</a> (const integer &amp;n1, const integer &amp;n2)</td></tr>
+<tr><td class="memItemLeft" align="right" valign="top">integer&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespacexint.html#afa8f2a0ac996ad45efc73b2aa056cae2">xint::operator|</a> (const integer &amp;n1, const integer &amp;n2)</td></tr>
+<tr><td class="memItemLeft" align="right" valign="top">integer&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespacexint.html#a81722cd257bc950ba7c56a202492544f">xint::operator^</a> (const integer &amp;n1, const integer &amp;n2)</td></tr>
+</table>
+<hr/><a name="_details"></a><h2>Detailed Description</h2>
+<p>Contains the definitions for the basic math operators. </p>
+
+<p>Definition in file <a class="el" href="operators_8cpp_source.html">operators.cpp</a>.</p>
+</div>
+<hr size="1"/><address style="text-align: right;"><small>Generated on Tue Apr 6 01:22:08 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.1 </small></address>
+</body>
+</html>

Added: sandbox/xint/doc/operators_8cpp_source.html
==============================================================================
--- (empty file)
+++ sandbox/xint/doc/operators_8cpp_source.html 2010-04-06 01:40:33 EDT (Tue, 06 Apr 2010)
@@ -0,0 +1,61 @@
+<!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: operators.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.1 -->
+<div class="navigation" id="top">
+ <div class="tabs">
+ <ul>
+ <li>Main Page</li>
+ <li>Related Pages</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>operators.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/xint.hpp&quot;</span>
+<a name="l00019"></a>00019
+<a name="l00020"></a>00020 <span class="keyword">namespace </span>xint {
+<a name="l00021"></a>00021
+<a name="l00022"></a>00022 <span class="keyword">const</span> integer&amp; <a class="code" href="namespacexint.html#a586fb0eb69100ec74be94008ac26670d">operator+</a>(<span class="keyword">const</span> integer&amp; a) { <span class="keywordflow">return</span> a; }
+<a name="l00023"></a>00023 integer <a class="code" href="namespacexint.html#a8a510361ed458133ebfa5fd95f8d9c27">operator-</a>(<span class="keyword">const</span> integer&amp; a) { <span class="keywordflow">return</span> <a class="code" href="namespacexint.html#ab393826381b1abd9f1aca1cdb45f41f6" title="Return the additive inverse of an integer.">negate</a>(a); }
+<a name="l00024"></a>00024 integer <a class="code" href="namespacexint.html#a586fb0eb69100ec74be94008ac26670d">operator+</a>(<span class="keyword">const</span> integer&amp; num1, <span class="keyword">const</span> integer&amp; num2) { <span class="keywordflow">return</span> <a class="code" href="namespacexint.html#a7cc636a05af16eba73014bf88273d163" title="Calculate the sum of two integers.">add</a>(num1, num2); }
+<a name="l00025"></a>00025 integer <a class="code" href="namespacexint.html#a8a510361ed458133ebfa5fd95f8d9c27">operator-</a>(<span class="keyword">const</span> integer&amp; num1, <span class="keyword">const</span> integer&amp; num2) { <span class="keywordflow">return</span> <a class="code" href="namespacexint.html#af196cd74cb23970032fddcce71957a80" title="Calculate the difference between two integers.">subtract</a>(num1, num2); }
+<a name="l00026"></a>00026 integer <a class="code" href="namespacexint.html#aea36ad9037f109576d4f95ec72b5c825">operator*</a>(<span class="keyword">const</span> integer&amp; num1, <span class="keyword">const</span> integer&amp; num2) { <span class="keywordflow">return</span> <a class="code" href="namespacexint.html#af3d7059ec08bf075cec5685deca55c5d" title="Calculate the product of two integers.">multiply</a>(num1, num2); }
+<a name="l00027"></a>00027 integer <a class="code" href="namespacexint.html#a701217f7824c3e935fca25147da23807">operator/</a>(<span class="keyword">const</span> integer&amp; num1, <span class="keyword">const</span> integer&amp; num2) { <span class="keywordflow">return</span> <a class="code" href="namespacexint.html#abf3d47f1ef1fdf334097fab055886a44" title="Calculate how many dividends would fit into divisor.">divide</a>(num1, num2); }
+<a name="l00028"></a>00028 integer <a class="code" href="namespacexint.html#ae0505757986a9c7133552552471aae24">operator%</a>(<span class="keyword">const</span> integer&amp; num1, <span class="keyword">const</span> integer&amp; num2) { <span class="keywordflow">return</span> <a class="code" href="namespacexint.html#ad5a8cc6e57ee8abdc21be98275657cc8" title="Get the remainder after dividing a number by another.">mod</a>(num1, num2); }
+<a name="l00029"></a>00029 integer <a class="code" href="namespacexint.html#a742550f1c62ac8c2bde8e1ceab2a466c">operator&amp;</a>(<span class="keyword">const</span> integer&amp; n1, <span class="keyword">const</span> integer&amp; n2) { <span class="keywordflow">return</span> <a class="code" href="namespacexint.html#a06138585f07fe098e24718c46e3078e1" title="Combine two integers using a bitwise AND operation.">bitwise_and</a>(n1, n2); }
+<a name="l00030"></a>00030 integer <a class="code" href="namespacexint.html#afa8f2a0ac996ad45efc73b2aa056cae2">operator|</a>(<span class="keyword">const</span> integer&amp; n1, <span class="keyword">const</span> integer&amp; n2) { <span class="keywordflow">return</span> <a class="code" href="namespacexint.html#a8cd0a0dbc779e5a75c9e2f8027474e9a" title="Combine two integers using a bitwise OR operation.">bitwise_or</a>(n1, n2); }
+<a name="l00031"></a>00031 integer <a class="code" href="namespacexint.html#a81722cd257bc950ba7c56a202492544f">operator^</a>(<span class="keyword">const</span> integer&amp; n1, <span class="keyword">const</span> integer&amp; n2) { <span class="keywordflow">return</span> <a class="code" href="namespacexint.html#a9ffe18a09f5dd354af7b967b032d3cbe" title="Combine two integers using a bitwise XOR operation.">bitwise_xor</a>(n1, n2); }
+<a name="l00032"></a>00032
+<a name="l00033"></a>00033 } <span class="comment">// namespace xint</span>
+</pre></div></div>
+<hr size="1"/><address style="text-align: right;"><small>Generated on Tue Apr 6 01:22:08 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.1 </small></address>
+</body>
+</html>

Added: sandbox/xint/doc/pages.html
==============================================================================
--- (empty file)
+++ sandbox/xint/doc/pages.html 2010-04-06 01:40:33 EDT (Tue, 06 Apr 2010)
@@ -0,0 +1,32 @@
+<!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: Page Index</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.1 -->
+<div class="navigation" id="top">
+ <div class="tabs">
+ <ul>
+ <li>Main Page</li>
+ <li class="current">Related Pages</li>
+ <li>Namespaces</li>
+ <li>Classes</li>
+ <li>Files</li>
+ </ul>
+ </div>
+</div>
+<div class="contents">
+<h1>Related Pages</h1>Here is a list of all related documentation pages:<ul>
+<li><a class="el" href="todo.html">Todo List</a>
+</li>
+</ul>
+</div>
+<hr size="1"/><address style="text-align: right;"><small>Generated on Tue Apr 6 01:22:07 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.1 </small></address>
+</body>
+</html>

Added: sandbox/xint/doc/powers_8cpp.html
==============================================================================
--- (empty file)
+++ sandbox/xint/doc/powers_8cpp.html 2010-04-06 01:40:33 EDT (Tue, 06 Apr 2010)
@@ -0,0 +1,66 @@
+<!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: powers.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.1 -->
+<div class="navigation" id="top">
+ <div class="tabs">
+ <ul>
+ <li>Main Page</li>
+ <li>Related Pages</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>powers.cpp File Reference</h1>
+<p>Contains the definitions for functions related to powers of a number.
+More...</p>
+<code>#include &quot;../boost/xint/xint.hpp&quot;</code><br/>
+<code>#include &quot;../boost/xint/xint_data_t.hpp&quot;</code><br/>
+<code>#include &lt;vector&gt;</code><br/>
+
+<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="namespacexint.html">xint</a></td></tr>
+
+<p><tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight"><p>All of the functions in the XInt 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">Powers and roots</div></td></tr>
+<tr><td colspan="2"><div class="groupText"><p><a class="anchor" id="amgrp928a8cb047602f789d7433e262ed4560"></a> </p>
+<br/><br/></div></td></tr>
+<tr><td class="memItemLeft" align="right" valign="top">integer&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespacexint.html#a6b723c30c28eb57f611442e0b512f551">xint::pow2</a> (size_t e)</td></tr>
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Calculate the value of 2<sup>e</sup>. <br/></td></tr>
+<tr><td class="memItemLeft" align="right" valign="top">integer&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespacexint.html#a0aec423511839fd784b1654389dfcf5b">xint::sqr</a> (const integer &amp;n)</td></tr>
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Calculate the value of n<sup>2</sup>. <br/></td></tr>
+<tr><td class="memItemLeft" align="right" valign="top">integer&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespacexint.html#a186b14f991b32a818abd553b56a13a62">xint::pow</a> (const integer &amp;n, const integer &amp;e)</td></tr>
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Calculate the value of n<sup>e</sup>. <br/></td></tr>
+<tr><td class="memItemLeft" align="right" valign="top">integer&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespacexint.html#aba188df925c87a0f33a79328e31e1a50">xint::factorial</a> (size_t n)</td></tr>
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Calculate the value of <code>n!</code> <br/></td></tr>
+</table>
+<hr/><a name="_details"></a><h2>Detailed Description</h2>
+<p>Contains the definitions for functions related to powers of a number. </p>
+
+<p>Definition in file <a class="el" href="powers_8cpp_source.html">powers.cpp</a>.</p>
+</div>
+<hr size="1"/><address style="text-align: right;"><small>Generated on Tue Apr 6 01:22:08 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.1 </small></address>
+</body>
+</html>

Added: sandbox/xint/doc/powers_8cpp_source.html
==============================================================================
--- (empty file)
+++ sandbox/xint/doc/powers_8cpp_source.html 2010-04-06 01:40:33 EDT (Tue, 06 Apr 2010)
@@ -0,0 +1,154 @@
+<!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: powers.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.1 -->
+<div class="navigation" id="top">
+ <div class="tabs">
+ <ul>
+ <li>Main Page</li>
+ <li>Related Pages</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>powers.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/xint.hpp&quot;</span>
+<a name="l00019"></a>00019 <span class="preprocessor">#include &quot;../boost/xint/xint_data_t.hpp&quot;</span>
+<a name="l00020"></a>00020
+<a name="l00021"></a>00021 <span class="preprocessor">#include &lt;vector&gt;</span>
+<a name="l00022"></a>00022
+<a name="l00023"></a>00023 <span class="keyword">namespace </span>xint {
+<a name="l00024"></a>00024
+<a name="l00025"></a>00025 <span class="keyword">using namespace </span>detail;
+<a name="l00026"></a>00026
+<a name="l00027"></a>00027 <span class="keyword">namespace </span>{
+<a name="l00028"></a>00028
+<a name="l00029"></a>00029 <span class="keywordtype">bool</span> addOverflow(<a class="code" href="namespacexint_1_1detail.html#aceb9b654c1c2daaf377b31bd4a089750">doubledigit_t</a> &amp;n1, <a class="code" href="namespacexint_1_1detail.html#aceb9b654c1c2daaf377b31bd4a089750">doubledigit_t</a> n2) {
+<a name="l00030"></a>00030 <a class="code" href="namespacexint_1_1detail.html#aceb9b654c1c2daaf377b31bd4a089750">doubledigit_t</a> t=(n1&gt;&gt;1)+(n2&gt;&gt;1);
+<a name="l00031"></a>00031 <span class="keywordflow">if</span> ((n1&amp;1) &amp;&amp; (n2&amp;1)) ++t;
+<a name="l00032"></a>00032 n1+=n2;
+<a name="l00033"></a>00033 <span class="keywordflow">if</span> (t &amp; <a class="code" href="namespacexint_1_1detail.html#a2af0686427ee285bd715330f12fcbc1c">doubledigit_hibit</a>) <span class="keywordflow">return</span> <span class="keyword">true</span>;
+<a name="l00034"></a>00034 <span class="keywordflow">return</span> <span class="keyword">false</span>;
+<a name="l00035"></a>00035 }
+<a name="l00036"></a>00036
+<a name="l00037"></a>00037 } <span class="comment">// namespace</span>
+<a name="l00038"></a>00038
+<a name="l00048"></a>00048 integer <a class="code" href="namespacexint.html#a6b723c30c28eb57f611442e0b512f551" title="Calculate the value of 2e.">pow2</a>(<span class="keywordtype">size_t</span> e) {
+<a name="l00049"></a>00049 integer r;
+<a name="l00050"></a>00050 <a class="code" href="namespacexint.html#adf2652627e78682c17e120816987984a" title="Sets a specific bit in an integer to one.">setbit</a>(r, e);
+<a name="l00051"></a>00051 <span class="keywordflow">return</span> r;
+<a name="l00052"></a>00052 }
+<a name="l00053"></a>00053
+<a name="l00064"></a>00064 integer <a class="code" href="namespacexint.html#a0aec423511839fd784b1654389dfcf5b" title="Calculate the value of n2.">sqr</a>(<span class="keyword">const</span> integer&amp; n) {
+<a name="l00065"></a>00065 n.<a class="code" href="classxint_1_1integer.html#ad5935c358b92f15064b1f910613f7a3e">_throw_if_nan</a>();
+<a name="l00066"></a>00066
+<a name="l00067"></a>00067 <span class="keyword">const</span> data_t *ndata=n._get_data();
+<a name="l00068"></a>00068 std::vector&lt;doubledigit_t&gt; a(ndata-&gt;mLength*2+1, 0);
+<a name="l00069"></a>00069 <a class="code" href="namespacexint_1_1detail.html#aceb9b654c1c2daaf377b31bd4a089750">doubledigit_t</a> *adigit=&amp;a[0];
+<a name="l00070"></a>00070
+<a name="l00071"></a>00071 <span class="keywordtype">size_t</span> i, j;
+<a name="l00072"></a>00072 integer addend;
+<a name="l00073"></a>00073 data_t *addenddata=addend._get_data();
+<a name="l00074"></a>00074 addenddata-&gt;alloc(ndata-&gt;mLength*2+1);
+<a name="l00075"></a>00075
+<a name="l00076"></a>00076 <a class="code" href="namespacexint_1_1detail.html#a8843fb7e364832d8d5983de28bdbcf34">digit_t</a> *ndigitip=ndata-&gt;digits;
+<a name="l00077"></a>00077 <span class="keywordflow">for</span> (i=0; i&lt;ndata-&gt;mLength; ++i, ++ndigitip) {
+<a name="l00078"></a>00078 <a class="code" href="namespacexint_1_1detail.html#a8843fb7e364832d8d5983de28bdbcf34">digit_t</a> ndigiti=*ndigitip;
+<a name="l00079"></a>00079 <a class="code" href="namespacexint_1_1detail.html#aceb9b654c1c2daaf377b31bd4a089750">doubledigit_t</a> t=(<a class="code" href="namespacexint_1_1detail.html#aceb9b654c1c2daaf377b31bd4a089750">doubledigit_t</a>(ndigiti) * ndigiti);
+<a name="l00080"></a>00080 <span class="keywordflow">if</span> (addOverflow(adigit[2*i], t)) ++addenddata-&gt;digits[2*i+2];
+<a name="l00081"></a>00081
+<a name="l00082"></a>00082 for (j=i+1; j&lt;ndata-&gt;mLength; ++j) {
+<a name="l00083"></a>00083 <a class="code" href="namespacexint_1_1detail.html#aceb9b654c1c2daaf377b31bd4a089750">doubledigit_t</a> t=(<a class="code" href="namespacexint_1_1detail.html#aceb9b654c1c2daaf377b31bd4a089750">doubledigit_t</a>(ndata-&gt;digits[j]) * ndigiti);
+<a name="l00084"></a>00084 <span class="keywordflow">if</span> (t &amp; <a class="code" href="namespacexint_1_1detail.html#a2af0686427ee285bd715330f12fcbc1c">doubledigit_hibit</a>) ++addenddata-&gt;digits[i+j+2];
+<a name="l00085"></a>00085 t&lt;&lt;=1;
+<a name="l00086"></a>00086 <span class="keywordflow">if</span> (addOverflow(adigit[i+j], t)) ++addenddata-&gt;digits[i+j+2];
+<a name="l00087"></a>00087 }
+<a name="l00088"></a>00088 }
+<a name="l00089"></a>00089
+<a name="l00090"></a>00090 integer answer;
+<a name="l00091"></a>00091 data_t *answerdata=answer._get_data();
+<a name="l00092"></a>00092 answerdata-&gt;alloc(ndata-&gt;mLength*2+1);
+<a name="l00093"></a>00093
+<a name="l00094"></a>00094 <a class="code" href="namespacexint_1_1detail.html#aceb9b654c1c2daaf377b31bd4a089750">doubledigit_t</a> carry=0;
+<a name="l00095"></a>00095 <span class="keywordflow">for</span> (i=0, j=ndata-&gt;mLength*2+1; i&lt;j; ++i) {
+<a name="l00096"></a>00096 <span class="keywordflow">if</span> (addOverflow(carry, adigit[i])) ++addenddata-&gt;digits[i+2];
+<a name="l00097"></a>00097 answerdata-&gt;digits[i]=<a class="code" href="namespacexint_1_1detail.html#a8843fb7e364832d8d5983de28bdbcf34">digit_t</a>(carry);
+<a name="l00098"></a>00098 carry&gt;&gt;=<a class="code" href="namespacexint_1_1detail.html#a9bd9e8d55061238d63913020d2721518">bits_per_digit</a>;
+<a name="l00099"></a>00099 }
+<a name="l00100"></a>00100
+<a name="l00101"></a>00101 answerdata-&gt;skipLeadingZeros();
+<a name="l00102"></a>00102 addenddata-&gt;skipLeadingZeros();
+<a name="l00103"></a>00103 answer+=addend;
+<a name="l00104"></a>00104
+<a name="l00105"></a>00105 <span class="keywordflow">return</span> answer;
+<a name="l00106"></a>00106 }
+<a name="l00107"></a>00107
+<a name="l00114"></a>00114 integer <a class="code" href="namespacexint.html#a186b14f991b32a818abd553b56a13a62" title="Calculate the value of ne.">pow</a>(<span class="keyword">const</span> integer&amp; n, <span class="keyword">const</span> integer&amp; e) {
+<a name="l00115"></a>00115 <span class="keywordtype">bool</span> neg=(n.sign() &lt; 0 &amp;&amp; e.odd());
+<a name="l00116"></a>00116
+<a name="l00117"></a>00117 <span class="keywordtype">size_t</span> length=e.<a class="code" href="classxint_1_1integer.html#a5723a74b98da2d5ed9452a7ec10c0ca2">_get_length</a>(), lastBitCount=0;
+<a name="l00118"></a>00118 <a class="code" href="namespacexint_1_1detail.html#a8843fb7e364832d8d5983de28bdbcf34">digit_t</a> ee(e._get_digit(length-1));
+<a name="l00119"></a>00119 <span class="keywordflow">while</span> (ee != 0) { ee &gt;&gt;= 1; ++lastBitCount; }
+<a name="l00120"></a>00120
+<a name="l00121"></a>00121 integer p(<a class="code" href="namespacexint.html#ac9e4ed282bafa93dbf608350df0127ba" title="Returns the absolute value of an integer.">abs</a>(n)), answer=<a class="code" href="classxint_1_1integer.html#a9237b21f4162146c7b5749b169c081b8">integer::one</a>();
+<a name="l00122"></a>00122 <span class="keywordflow">for</span> (<span class="keywordtype">size_t</span> eIndex=0; eIndex &lt; length; ++eIndex) {
+<a name="l00123"></a>00123 <a class="code" href="namespacexint_1_1detail.html#a8843fb7e364832d8d5983de28bdbcf34">digit_t</a> eee(e._get_digit(eIndex));
+<a name="l00124"></a>00124
+<a name="l00125"></a>00125 <span class="keywordtype">int</span> bitCount(<span class="keywordtype">int</span>(eIndex == length-1 ? lastBitCount : <a class="code" href="namespacexint_1_1detail.html#a9bd9e8d55061238d63913020d2721518">bits_per_digit</a>));
+<a name="l00126"></a>00126 <span class="keywordflow">while</span> (bitCount-- &gt; 0) {
+<a name="l00127"></a>00127 <span class="keywordflow">if</span> (eee &amp; 0x01) answer*=p;
+<a name="l00128"></a>00128 p=<a class="code" href="namespacexint.html#a0aec423511839fd784b1654389dfcf5b" title="Calculate the value of n2.">sqr</a>(p);
+<a name="l00129"></a>00129 eee &gt;&gt;= 1;
+<a name="l00130"></a>00130 }
+<a name="l00131"></a>00131 }
+<a name="l00132"></a>00132
+<a name="l00133"></a>00133 answer._set_negative(neg);
+<a name="l00134"></a>00134 <span class="keywordflow">return</span> answer;
+<a name="l00135"></a>00135 }
+<a name="l00136"></a>00136
+<a name="l00148"></a>00148 integer <a class="code" href="namespacexint.html#aba188df925c87a0f33a79328e31e1a50" title="Calculate the value of n! ">factorial</a>(<span class="keywordtype">size_t</span> n) {
+<a name="l00149"></a>00149 integer r(<a class="code" href="classxint_1_1integer.html#a9237b21f4162146c7b5749b169c081b8">integer::one</a>());
+<a name="l00150"></a>00150 <span class="keywordflow">if</span> (n == (std::numeric_limits&lt;size_t&gt;::max)()) {
+<a name="l00151"></a>00151 <span class="comment">// It&apos;s highly unlikely that the system will be able to calculate this,</span>
+<a name="l00152"></a>00152 <span class="comment">// or that anyone might want to, but someday it will be possible. This</span>
+<a name="l00153"></a>00153 <span class="comment">// code keeps the function from going into an infinite loop if/when that</span>
+<a name="l00154"></a>00154 <span class="comment">// happens.</span>
+<a name="l00155"></a>00155 r=(std::numeric_limits&lt;size_t&gt;::max)();
+<a name="l00156"></a>00156 --n;
+<a name="l00157"></a>00157 }
+<a name="l00158"></a>00158 <span class="keywordflow">for</span> (<span class="keywordtype">size_t</span> i=2; i&lt;=n; ++i) r*=i;
+<a name="l00159"></a>00159 <span class="keywordflow">return</span> r;
+<a name="l00160"></a>00160 }
+<a name="l00161"></a>00161
+<a name="l00162"></a>00162 } <span class="comment">// namespace xint</span>
+</pre></div></div>
+<hr size="1"/><address style="text-align: right;"><small>Generated on Tue Apr 6 01:22:08 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.1 </small></address>
+</body>
+</html>

Added: sandbox/xint/doc/primes.html
==============================================================================
--- (empty file)
+++ sandbox/xint/doc/primes.html 2010-04-06 01:40:33 EDT (Tue, 06 Apr 2010)
@@ -0,0 +1,71 @@
+<!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: Generating Prime Numbers</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.1 -->
+<div class="navigation" id="top">
+ <div class="tabs">
+ <ul>
+ <li>Main Page</li>
+ <li class="current">Related Pages</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="primes">Generating Prime Numbers </a></h1><p>A common reason to use a large-integer library is to implement public-key encryption, and the algorithms for such encryption often require large prime numbers.</p>
+<p>With larger bit-sizes, the <a class="el" href="namespacexint.html#ab205c4e52dbc6825cefe3a251f6ca99f" title="Tests an integer for primality.">xint::is_prime</a> and <a class="el" href="namespacexint.html#afc8ba5f62561b4d2b42e32dde1a10ef3" title="Generate a randomly-generated prime number of a particular bit-size.">xint::random_prime</a> functions can take a very long time to run, so you can pass an optional callback function to them as well. The provided callback function (which takes no parameters and returns a <code>bool</code>) will be called regularly during this time, and if it returns <code>false</code>, the function will abort and return zero (for random_prime) or -1 (for is_prime) instead of a value.</p>
+<p>Here is an example of how to use the library functions to create a prime number of a specific length, using the system's strong random number generator:</p>
+<div class="fragment"><pre class="fragment"><span class="preprocessor">#include &lt;iostream&gt;</span>
+<span class="preprocessor">#include &lt;<a class="code" href="xint_8hpp.html" title="The main header file for the XInt library.">boost/xint/xint.hpp</a>&gt;</span>
+
+<span class="keywordtype">bool</span> callback() {
+ std::cout &lt;&lt; <span class="charliteral">&apos;.&apos;</span> &lt;&lt; std::flush;
+ <span class="keywordflow">return</span> <span class="keyword">true</span>; <span class="comment">// Return false to abort a long operation</span>
+}
+
+<span class="keywordtype">int</span> main() {
+ <span class="keyword">using namespace </span>std;
+ <span class="keyword">using namespace </span>boost;
+
+ <span class="keyword">const</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> bits=512;
+
+ <span class="keywordflow">try</span> {
+ <span class="comment">// Use the system&apos;s strong random number generator, via the XInt-</span>
+ <span class="comment">// provided convenience class.</span>
+ <a class="code" href="namespacexint_1_1detail.html#a5f8bba03a6f615a82ebcf94ad7cd4353" title="Support function.">xint::set_random_generator</a>(<span class="keyword">new</span> <a class="code" href="classxint_1_1strong__random__generator.html" title="A convenience class for cryptographically-secure random numbers.">xint::strong_random_generator</a>);
+
+ <span class="comment">// Generate the prime number, keeping the user informed of the</span>
+ <span class="comment">// progress.</span>
+ cout &lt;&lt; <span class="stringliteral">&quot;Generating...&quot;</span>;
+ <a class="code" href="classxint_1_1integer.html" title="The extended integer class.">xint::integer</a> p=<a class="code" href="namespacexint.html#afc8ba5f62561b4d2b42e32dde1a10ef3" title="Generate a randomly-generated prime number of a particular bit-size.">xint::random_prime</a>(bits, callback);
+
+ <span class="comment">// Success!</span>
+ cout &lt;&lt; <span class="stringliteral">&quot;\nA random &quot;</span> &lt;&lt; bits &lt;&lt; <span class="stringliteral">&quot;-bit prime is: &quot;</span> &lt;&lt; p &lt;&lt; endl;
+ } <span class="keywordflow">catch</span> (<a class="code" href="classxint_1_1no__strong__random.html" title="Exception class.">xint::no_strong_random</a>&amp; e) {
+ <span class="comment">// xint::strong_random_generator will throw this if the system doesn&apos;t</span>
+ <span class="comment">// have a strong random number generator.</span>
+ cout &lt;&lt; e.what() &lt;&lt; endl;
+ <span class="keywordflow">return</span> EXIT_FAILURE;
+ }
+
+ <span class="keywordflow">return</span> EXIT_SUCCESS;
+}
+</pre></div><p>(You can find it in the <code>examples</code> directory, by the name <code>genprime.cpp</code>.) </p>
+</div>
+<hr size="1"/><address style="text-align: right;"><small>Generated on Tue Apr 6 01:22:08 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.1 </small></address>
+</body>
+</html>

Added: sandbox/xint/doc/primes_8cpp.html
==============================================================================
--- (empty file)
+++ sandbox/xint/doc/primes_8cpp.html 2010-04-06 01:40:33 EDT (Tue, 06 Apr 2010)
@@ -0,0 +1,61 @@
+<!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: primes.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.1 -->
+<div class="navigation" id="top">
+ <div class="tabs">
+ <ul>
+ <li>Main Page</li>
+ <li>Related Pages</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>primes.cpp File Reference</h1>
+<p>Contains the definitions for functions related to prime numbers.
+More...</p>
+<code>#include &quot;../boost/xint/xint.hpp&quot;</code><br/>
+<code>#include &lt;vector&gt;</code><br/>
+
+<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="namespacexint.html">xint</a></td></tr>
+
+<p><tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight"><p>All of the functions in the XInt 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">Prime number functions</div></td></tr>
+<tr><td colspan="2"><div class="groupText"><p><a class="anchor" id="amgrp540e8e12721acbe497d2b9b53ecc76ec"></a> </p>
+<br/><br/></div></td></tr>
+<tr><td class="memItemLeft" align="right" valign="top">int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespacexint.html#ab205c4e52dbc6825cefe3a251f6ca99f">xint::is_prime</a> (const integer &amp;n, callback_t callback)</td></tr>
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Tests an <a class="el" href="classxint_1_1integer.html" title="The extended integer class.">integer</a> for primality. <br/></td></tr>
+<tr><td class="memItemLeft" align="right" valign="top">integer&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespacexint.html#afc8ba5f62561b4d2b42e32dde1a10ef3">xint::random_prime</a> (size_t size_in_bits, callback_t callback)</td></tr>
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Generate a randomly-generated prime number of a particular bit-size. <br/></td></tr>
+</table>
+<hr/><a name="_details"></a><h2>Detailed Description</h2>
+<p>Contains the definitions for functions related to prime numbers. </p>
+
+<p>Definition in file <a class="el" href="primes_8cpp_source.html">primes.cpp</a>.</p>
+</div>
+<hr size="1"/><address style="text-align: right;"><small>Generated on Tue Apr 6 01:22:08 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.1 </small></address>
+</body>
+</html>

Added: sandbox/xint/doc/primes_8cpp_source.html
==============================================================================
--- (empty file)
+++ sandbox/xint/doc/primes_8cpp_source.html 2010-04-06 01:40:33 EDT (Tue, 06 Apr 2010)
@@ -0,0 +1,153 @@
+<!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: primes.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.1 -->
+<div class="navigation" id="top">
+ <div class="tabs">
+ <ul>
+ <li>Main Page</li>
+ <li>Related Pages</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>primes.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/xint.hpp&quot;</span>
+<a name="l00019"></a>00019
+<a name="l00020"></a>00020 <span class="preprocessor">#include &lt;vector&gt;</span>
+<a name="l00021"></a>00021
+<a name="l00022"></a>00022 <span class="keyword">namespace </span>xint {
+<a name="l00023"></a>00023
+<a name="l00024"></a>00024 <span class="keyword">namespace </span>{
+<a name="l00025"></a>00025
+<a name="l00026"></a>00026 std::vector&lt;int&gt; sieveOfEratosthenes(<span class="keywordtype">int</span> upTo) {
+<a name="l00027"></a>00027 std::vector&lt;int&gt; sieve;
+<a name="l00028"></a>00028 sieve.reserve(upTo);
+<a name="l00029"></a>00029
+<a name="l00030"></a>00030 <span class="comment">// Zero and one aren&apos;t prime, by this definition.</span>
+<a name="l00031"></a>00031 sieve.push_back(0);
+<a name="l00032"></a>00032 sieve.push_back(0);
+<a name="l00033"></a>00033
+<a name="l00034"></a>00034 <span class="keywordflow">for</span> (<span class="keywordtype">int</span> p=2; p&lt;upTo; ++p) sieve.push_back(p);
+<a name="l00035"></a>00035
+<a name="l00036"></a>00036 std::vector&lt;int&gt; ret;
+<a name="l00037"></a>00037
+<a name="l00038"></a>00038 <span class="keywordtype">int</span> *p=&amp;sieve[0], *e=p+upTo;
+<a name="l00039"></a>00039 <span class="keywordflow">while</span> (p&lt;e) {
+<a name="l00040"></a>00040 <span class="keywordflow">if</span> (*p==0) { ++p; <span class="keywordflow">continue</span>; }
+<a name="l00041"></a>00041 ret.push_back(*p);
+<a name="l00042"></a>00042
+<a name="l00043"></a>00043 <span class="keywordtype">int</span> *p2=p+(*p);
+<a name="l00044"></a>00044 <span class="keywordflow">while</span> (p2&lt;e) { *p2=0; p2+=*p; }
+<a name="l00045"></a>00045
+<a name="l00046"></a>00046 ++p;
+<a name="l00047"></a>00047 }
+<a name="l00048"></a>00048
+<a name="l00049"></a>00049 <span class="keywordflow">return</span> ret;
+<a name="l00050"></a>00050 }
+<a name="l00051"></a>00051
+<a name="l00052"></a>00052 <span class="comment">// The Miller-Rabin Probabilistic Test of Primality</span>
+<a name="l00053"></a>00053 <span class="keywordtype">int</span> isProbablePrimeBaseB(<span class="keyword">const</span> integer&amp; n, <span class="keyword">const</span> integer &amp;b, <a class="code" href="namespacexint.html#ac8a660c33746c536469d347307b8da7a">callback_t</a>
+<a name="l00054"></a>00054 callback)
+<a name="l00055"></a>00055 {
+<a name="l00056"></a>00056 <span class="keyword">const</span> integer nMinus1(n - <a class="code" href="classxint_1_1integer.html#a9237b21f4162146c7b5749b169c081b8">integer::one</a>());
+<a name="l00057"></a>00057
+<a name="l00058"></a>00058 <span class="comment">// Find r and a satisfying: n-1=2^a * r, r odd</span>
+<a name="l00059"></a>00059 integer r=nMinus1;
+<a name="l00060"></a>00060 <span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> a=0;
+<a name="l00061"></a>00061 <span class="keywordflow">while</span> (r.even()) { r &gt;&gt;= 1; ++a; }
+<a name="l00062"></a>00062
+<a name="l00063"></a>00063 <span class="comment">// We check the congruence class of b^((2^i)r) % n for each i</span>
+<a name="l00064"></a>00064 <span class="comment">// from 0 to a - 1. If any one is correct, then n passes.</span>
+<a name="l00065"></a>00065 <span class="comment">// Otherwise, n fails.</span>
+<a name="l00066"></a>00066 integer test=<a class="code" href="namespacexint.html#ac54e9be3a8b131f882f88e57b0ef1c9c" title="Get the result of ne % m, keeping the intermediate results (relatively) small.">powmod</a>(b, r, n);
+<a name="l00067"></a>00067 <span class="keywordflow">if</span> (test==<a class="code" href="classxint_1_1integer.html#a9237b21f4162146c7b5749b169c081b8">integer::one</a>() || test==nMinus1) <span class="keywordflow">return</span> 1; <span class="comment">// Better than 3/4 chance it&apos;s prime</span>
+<a name="l00068"></a>00068
+<a name="l00069"></a>00069 <span class="keywordflow">while</span> (a--&gt;0) {
+<a name="l00070"></a>00070 test=<a class="code" href="namespacexint.html#aa5564979e78556afdc68dbbd744a0bcb" title="Get the modular product of squaring an integer.">sqrmod</a>(test, n);
+<a name="l00071"></a>00071 <span class="keywordflow">if</span> (test==nMinus1) <span class="keywordflow">return</span> 1;
+<a name="l00072"></a>00072 }
+<a name="l00073"></a>00073
+<a name="l00074"></a>00074 <span class="keywordflow">if</span> (callback &amp;&amp; !callback()) <span class="keywordflow">return</span> -1;
+<a name="l00075"></a>00075 <span class="keywordflow">return</span> 0;
+<a name="l00076"></a>00076 }
+<a name="l00077"></a>00077
+<a name="l00078"></a>00078 } <span class="comment">// namespace</span>
+<a name="l00079"></a>00079
+<a name="l00103"></a>00103 <span class="keywordtype">int</span> <a class="code" href="namespacexint.html#ab205c4e52dbc6825cefe3a251f6ca99f" title="Tests an integer for primality.">is_prime</a>(<span class="keyword">const</span> integer&amp; n, <a class="code" href="namespacexint.html#ac8a660c33746c536469d347307b8da7a">callback_t</a> callback) {
+<a name="l00104"></a>00104 <span class="keywordflow">if</span> (n &lt; 2) {
+<a name="l00105"></a>00105 <span class="keywordflow">if</span> (<a class="code" href="namespacexint.html#ac8be41374700d89400f5ecddf0f789e3" title="Query whether exceptions are currently allowed or blocked.">exceptions_allowed</a>()) <span class="keywordflow">throw</span> std::invalid_argument(<span class="stringliteral">&quot;xint::is_prime &quot;</span>
+<a name="l00106"></a>00106 <span class="stringliteral">&quot;cannot test numbers below 2&quot;</span>);
+<a name="l00107"></a>00107 <span class="keywordflow">else</span> <span class="keywordflow">return</span> -1;
+<a name="l00108"></a>00108 }
+<a name="l00109"></a>00109
+<a name="l00110"></a>00110 <span class="comment">// First we trial-divide it by the primes below 2000</span>
+<a name="l00111"></a>00111 <span class="keyword">static</span> <span class="keyword">const</span> std::vector&lt;int&gt; cLowPrimes(sieveOfEratosthenes(2000));
+<a name="l00112"></a>00112 std::vector&lt;int&gt;::const_iterator i=cLowPrimes.begin(), ie=cLowPrimes.end();
+<a name="l00113"></a>00113 <span class="keywordflow">for</span> (; i!=ie; ++i) <span class="keywordflow">if</span> ((n % *i)==0) <span class="keywordflow">return</span> (n==*i);
+<a name="l00114"></a>00114
+<a name="l00115"></a>00115 <span class="comment">// Run the number through the Miller-Rabin Probabilistic Test of Primality</span>
+<a name="l00116"></a>00116 <span class="comment">// a few times to see if it&apos;s actually (probably) prime.</span>
+<a name="l00117"></a>00117 <span class="keywordflow">for</span> (<span class="keywordtype">int</span> count=0; count&lt;5; ++count) {
+<a name="l00118"></a>00118 <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> k=<a class="code" href="namespacexint_1_1detail.html#a1dfc1e90886c4897a4b112f491b89b62">detail::get_random</a>();
+<a name="l00119"></a>00119 <span class="keywordtype">int</span> isP=isProbablePrimeBaseB(n, <a class="code" href="namespacexint.html#ac9e4ed282bafa93dbf608350df0127ba" title="Returns the absolute value of an integer.">abs</a>(k), callback);
+<a name="l00120"></a>00120 <span class="keywordflow">if</span> (isP &lt;= 0) <span class="keywordflow">return</span> isP;
+<a name="l00121"></a>00121 }
+<a name="l00122"></a>00122 <span class="keywordflow">return</span> 1; <span class="comment">// Appears to be prime!</span>
+<a name="l00123"></a>00123 }
+<a name="l00124"></a>00124
+<a name="l00147"></a>00147 integer <a class="code" href="namespacexint.html#afc8ba5f62561b4d2b42e32dde1a10ef3" title="Generate a randomly-generated prime number of a particular bit-size.">random_prime</a>(<span class="keywordtype">size_t</span> size_in_bits, <a class="code" href="namespacexint.html#ac8a660c33746c536469d347307b8da7a">callback_t</a> callback) {
+<a name="l00148"></a>00148 <span class="keywordflow">if</span> (size_in_bits &lt; 2) {
+<a name="l00149"></a>00149 <span class="keywordflow">if</span> (<a class="code" href="namespacexint.html#ac8be41374700d89400f5ecddf0f789e3" title="Query whether exceptions are currently allowed or blocked.">exceptions_allowed</a>()) <span class="keywordflow">throw</span> std::invalid_argument(
+<a name="l00150"></a>00150 <span class="stringliteral">&quot;xint::random_prime cannot create prime numbers smaller than two &quot;</span>
+<a name="l00151"></a>00151 <span class="stringliteral">&quot;bits&quot;</span>);
+<a name="l00152"></a>00152 <span class="keywordflow">else</span> <span class="keywordflow">return</span> integer(not_a_number());
+<a name="l00153"></a>00153 }
+<a name="l00154"></a>00154
+<a name="l00155"></a>00155 <span class="comment">// Call the callback for the first time</span>
+<a name="l00156"></a>00156 <span class="keywordflow">if</span> (callback &amp;&amp; !callback()) <span class="keywordflow">return</span> <a class="code" href="classxint_1_1integer.html#a64a0f99de7c33239237cb59d8464f3d2">integer::zero</a>();
+<a name="l00157"></a>00157
+<a name="l00158"></a>00158 integer pe=<a class="code" href="namespacexint.html#a6b723c30c28eb57f611442e0b512f551" title="Calculate the value of 2e.">pow2</a>(size_in_bits+1);
+<a name="l00159"></a>00159 <span class="keywordflow">while</span> (1) {
+<a name="l00160"></a>00160 integer p(<a class="code" href="namespacexint.html#a5da6e81cb78913cc61c9f14857700b5e" title="Generates a random integer with specific attributes.">random_by_size</a>(size_in_bits, <span class="keyword">true</span>, <span class="keyword">true</span>));
+<a name="l00161"></a>00161 <span class="keywordflow">while</span> (p &lt; pe) {
+<a name="l00162"></a>00162 <span class="keywordtype">int</span> r=<a class="code" href="namespacexint.html#ab205c4e52dbc6825cefe3a251f6ca99f" title="Tests an integer for primality.">is_prime</a>(p, callback);
+<a name="l00163"></a>00163 <span class="keywordflow">if</span> (r &lt; 0) <span class="keywordflow">return</span> <a class="code" href="classxint_1_1integer.html#a64a0f99de7c33239237cb59d8464f3d2">integer::zero</a>();
+<a name="l00164"></a>00164 <span class="keywordflow">if</span> (r == 1) <span class="keywordflow">return</span> p;
+<a name="l00165"></a>00165 p+=2;
+<a name="l00166"></a>00166 }
+<a name="l00167"></a>00167 }
+<a name="l00168"></a>00168 }
+<a name="l00169"></a>00169
+<a name="l00170"></a>00170 } <span class="comment">// namespace xint</span>
+</pre></div></div>
+<hr size="1"/><address style="text-align: right;"><small>Generated on Tue Apr 6 01:22:08 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.1 </small></address>
+</body>
+</html>

Added: sandbox/xint/doc/primes_8dox.html
==============================================================================
--- (empty file)
+++ sandbox/xint/doc/primes_8dox.html 2010-04-06 01:40:33 EDT (Tue, 06 Apr 2010)
@@ -0,0 +1,36 @@
+<!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/primes.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.1 -->
+<div class="navigation" id="top">
+ <div class="tabs">
+ <ul>
+ <li>Main Page</li>
+ <li>Related Pages</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/primes.dox File Reference</h1><table border="0" cellpadding="0" cellspacing="0">
+</table>
+</div>
+<hr size="1"/><address style="text-align: right;"><small>Generated on Tue Apr 6 01:22:08 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.1 </small></address>
+</body>
+</html>

Added: sandbox/xint/doc/primitives_8cpp.html
==============================================================================
--- (empty file)
+++ sandbox/xint/doc/primitives_8cpp.html 2010-04-06 01:40:33 EDT (Tue, 06 Apr 2010)
@@ -0,0 +1,72 @@
+<!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: primitives.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.1 -->
+<div class="navigation" id="top">
+ <div class="tabs">
+ <ul>
+ <li>Main Page</li>
+ <li>Related Pages</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>primitives.cpp File Reference</h1>
+<p>Contains the definitions for math primitives.
+More...</p>
+<code>#include &quot;../boost/xint/xint.hpp&quot;</code><br/>
+<code>#include &quot;../boost/xint/xint_data_t.hpp&quot;</code><br/>
+<code>#include &lt;cassert&gt;</code><br/>
+
+<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="namespacexint.html">xint</a></td></tr>
+
+<p><tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight"><p>All of the functions in the XInt 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">Mathematical primitives</div></td></tr>
+<tr><td colspan="2"><div class="groupText"><p><a class="anchor" id="amgrp196dd2a5f50860e057df961a96d84ea3"></a> </p>
+<br/><br/></div></td></tr>
+<tr><td class="memItemLeft" align="right" valign="top">integer&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespacexint.html#ac9e4ed282bafa93dbf608350df0127ba">xint::abs</a> (const integer &amp;n)</td></tr>
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Returns the absolute value of an <a class="el" href="classxint_1_1integer.html" title="The extended integer class.">integer</a>. <br/></td></tr>
+<tr><td class="memItemLeft" align="right" valign="top">integer&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespacexint.html#ab393826381b1abd9f1aca1cdb45f41f6">xint::negate</a> (const integer &amp;n)</td></tr>
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Return the additive inverse of an <a class="el" href="classxint_1_1integer.html" title="The extended integer class.">integer</a>. <br/></td></tr>
+<tr><td class="memItemLeft" align="right" valign="top">integer&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespacexint.html#a7cc636a05af16eba73014bf88273d163">xint::add</a> (const integer &amp;n1, const integer &amp;n2)</td></tr>
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Calculate the sum of two integers. <br/></td></tr>
+<tr><td class="memItemLeft" align="right" valign="top">integer&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespacexint.html#af196cd74cb23970032fddcce71957a80">xint::subtract</a> (const integer &amp;n1, const integer &amp;n2)</td></tr>
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Calculate the difference between two integers. <br/></td></tr>
+<tr><td class="memItemLeft" align="right" valign="top">integer&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespacexint.html#af3d7059ec08bf075cec5685deca55c5d">xint::multiply</a> (const integer &amp;n, const integer &amp;by)</td></tr>
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Calculate the product of two integers. <br/></td></tr>
+<tr><td class="memItemLeft" align="right" valign="top">integer&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespacexint.html#abf3d47f1ef1fdf334097fab055886a44">xint::divide</a> (const integer &amp;dividend, const integer &amp;divisor)</td></tr>
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Calculate how many <code>dividends</code> would fit into <code>divisor</code>. <br/></td></tr>
+<tr><td class="memItemLeft" align="right" valign="top">std::pair&lt; integer, integer &gt;&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespacexint.html#a23d0a0bb05cec1917d96d6aaceeb875d">xint::divide_r</a> (const integer &amp;d1, const integer &amp;d2)</td></tr>
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Calculate how many <code>dividends</code> would fit into <code>divisor</code>, with the remainder. <br/></td></tr>
+</table>
+<hr/><a name="_details"></a><h2>Detailed Description</h2>
+<p>Contains the definitions for math primitives. </p>
+
+<p>Definition in file <a class="el" href="primitives_8cpp_source.html">primitives.cpp</a>.</p>
+</div>
+<hr size="1"/><address style="text-align: right;"><small>Generated on Tue Apr 6 01:22:08 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.1 </small></address>
+</body>
+</html>

Added: sandbox/xint/doc/primitives_8cpp_source.html
==============================================================================
--- (empty file)
+++ sandbox/xint/doc/primitives_8cpp_source.html 2010-04-06 01:40:33 EDT (Tue, 06 Apr 2010)
@@ -0,0 +1,287 @@
+<!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: primitives.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.1 -->
+<div class="navigation" id="top">
+ <div class="tabs">
+ <ul>
+ <li>Main Page</li>
+ <li>Related Pages</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>primitives.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/xint.hpp&quot;</span>
+<a name="l00019"></a>00019 <span class="preprocessor">#include &quot;../boost/xint/xint_data_t.hpp&quot;</span>
+<a name="l00020"></a>00020 <span class="preprocessor">#include &lt;cassert&gt;</span>
+<a name="l00021"></a>00021
+<a name="l00022"></a>00022 <span class="keyword">namespace </span>xint {
+<a name="l00023"></a>00023
+<a name="l00024"></a>00024 <span class="keyword">using namespace </span>detail;
+<a name="l00025"></a>00025
+<a name="l00032"></a>00032 integer <a class="code" href="namespacexint.html#ac9e4ed282bafa93dbf608350df0127ba" title="Returns the absolute value of an integer.">abs</a>(<span class="keyword">const</span> integer&amp; n) {
+<a name="l00033"></a>00033 <span class="keywordflow">return</span> (n &lt; 0 ? -n : n);
+<a name="l00034"></a>00034 }
+<a name="l00035"></a>00035
+<a name="l00042"></a>00042 integer <a class="code" href="namespacexint.html#ab393826381b1abd9f1aca1cdb45f41f6" title="Return the additive inverse of an integer.">negate</a>(<span class="keyword">const</span> integer&amp; n) {
+<a name="l00043"></a>00043 n.<a class="code" href="classxint_1_1integer.html#ad5935c358b92f15064b1f910613f7a3e">_throw_if_nan</a>();
+<a name="l00044"></a>00044
+<a name="l00045"></a>00045 integer nn(n);
+<a name="l00046"></a>00046 nn._make_unique();
+<a name="l00047"></a>00047 nn._get_data()-&gt;negate();
+<a name="l00048"></a>00048 <span class="keywordflow">return</span> nn;
+<a name="l00049"></a>00049 }
+<a name="l00050"></a>00050
+<a name="l00057"></a>00057 integer <a class="code" href="namespacexint.html#a7cc636a05af16eba73014bf88273d163" title="Calculate the sum of two integers.">add</a>(<span class="keyword">const</span> integer&amp; n1, <span class="keyword">const</span> integer&amp; n2) {
+<a name="l00058"></a>00058 <span class="keywordtype">int</span> sign1=n1.<a class="code" href="classxint_1_1integer.html#a5d84398ce89b376f695ccded2d20c8c2" title="Tests the sign of *this.">sign</a>(), sign2=n2.sign();
+<a name="l00059"></a>00059 <span class="keywordflow">if</span> (sign1 != sign2) {
+<a name="l00060"></a>00060 <span class="keywordflow">if</span> (sign1==0) <span class="keywordflow">return</span> n2;
+<a name="l00061"></a>00061 <span class="keywordflow">else</span> <span class="keywordflow">if</span> (sign2==0) <span class="keywordflow">return</span> n1;
+<a name="l00062"></a>00062 <span class="keywordflow">else</span> <span class="keywordflow">return</span> <a class="code" href="namespacexint.html#af196cd74cb23970032fddcce71957a80" title="Calculate the difference between two integers.">subtract</a>(n1, -n2);
+<a name="l00063"></a>00063 } <span class="keywordflow">else</span> {
+<a name="l00064"></a>00064 <span class="keyword">const</span> data_t *n1data=n1._get_data(), *n2data=n2._get_data();
+<a name="l00065"></a>00065 <span class="keywordflow">if</span> (n1data-&gt;mLength &lt; n2data-&gt;mLength) std::swap(n1data, n2data);
+<a name="l00066"></a>00066
+<a name="l00067"></a>00067 integer r;
+<a name="l00068"></a>00068 data_t *rdata=r._get_data();
+<a name="l00069"></a>00069 rdata-&gt;copy(n1data, 1);
+<a name="l00070"></a>00070 rdata-&gt;add(*n2data);
+<a name="l00071"></a>00071 <span class="keywordflow">return</span> r;
+<a name="l00072"></a>00072 }
+<a name="l00073"></a>00073 }
+<a name="l00074"></a>00074
+<a name="l00081"></a>00081 integer <a class="code" href="namespacexint.html#af196cd74cb23970032fddcce71957a80" title="Calculate the difference between two integers.">subtract</a>(<span class="keyword">const</span> integer&amp; n1, <span class="keyword">const</span> integer&amp; n2) {
+<a name="l00082"></a>00082 <span class="keywordtype">int</span> sign1=n1.<a class="code" href="classxint_1_1integer.html#a5d84398ce89b376f695ccded2d20c8c2" title="Tests the sign of *this.">sign</a>(), sign2=n2.sign();
+<a name="l00083"></a>00083 <span class="keywordflow">if</span> (sign1 != sign2) {
+<a name="l00084"></a>00084 <span class="keywordflow">if</span> (sign1 == 0) <span class="keywordflow">return</span> -n2;
+<a name="l00085"></a>00085 <span class="keywordflow">else</span> <span class="keywordflow">if</span> (sign2 == 0) <span class="keywordflow">return</span> n1;
+<a name="l00086"></a>00086 <span class="keywordflow">else</span> <span class="keywordflow">return</span> <a class="code" href="namespacexint.html#a7cc636a05af16eba73014bf88273d163" title="Calculate the sum of two integers.">add</a>(n1, -n2);
+<a name="l00087"></a>00087 } <span class="keywordflow">else</span> {
+<a name="l00088"></a>00088 <span class="keywordtype">bool</span> invert=(sign1 == (n1 &lt; n2 ? 1 : -1));
+<a name="l00089"></a>00089 <span class="keyword">const</span> data_t *n1data=n1._get_data(), *n2data=n2._get_data();
+<a name="l00090"></a>00090 <span class="keywordflow">if</span> (invert) std::swap(n1data, n2data);
+<a name="l00091"></a>00091
+<a name="l00092"></a>00092 integer r;
+<a name="l00093"></a>00093 data_t *rdata=r._get_data();
+<a name="l00094"></a>00094 rdata-&gt;copy(n1data);
+<a name="l00095"></a>00095 rdata-&gt;subtract(*n2data);
+<a name="l00096"></a>00096 <span class="keywordflow">return</span> (invert ? -r : r);
+<a name="l00097"></a>00097 }
+<a name="l00098"></a>00098 }
+<a name="l00099"></a>00099
+<a name="l00110"></a>00110 integer <a class="code" href="namespacexint.html#af3d7059ec08bf075cec5685deca55c5d" title="Calculate the product of two integers.">multiply</a>(<span class="keyword">const</span> integer&amp; n, <span class="keyword">const</span> integer&amp; by) {
+<a name="l00111"></a>00111 <span class="keywordtype">int</span> nsign=n.<a class="code" href="classxint_1_1integer.html#a5d84398ce89b376f695ccded2d20c8c2" title="Tests the sign of *this.">sign</a>(), bysign=by.sign();
+<a name="l00112"></a>00112 <span class="keywordflow">if</span> (nsign==0 || bysign==0) <span class="keywordflow">return</span> <a class="code" href="classxint_1_1integer.html#a64a0f99de7c33239237cb59d8464f3d2">integer::zero</a>();
+<a name="l00113"></a>00113
+<a name="l00114"></a>00114 <span class="keyword">const</span> data_t *ndata=n._get_data(), *bydata=by._get_data();
+<a name="l00115"></a>00115 <span class="keywordflow">if</span> (ndata == bydata) <span class="keywordflow">return</span> <a class="code" href="namespacexint.html#a0aec423511839fd784b1654389dfcf5b" title="Calculate the value of n2.">sqr</a>(n);
+<a name="l00116"></a>00116
+<a name="l00117"></a>00117 <span class="comment">// In multiplication, we know that the answer will be less than or equal to</span>
+<a name="l00118"></a>00118 <span class="comment">// the sum of the lengths of the operands.</span>
+<a name="l00119"></a>00119 integer answer;
+<a name="l00120"></a>00120 data_t *answerdata=answer._get_data();
+<a name="l00121"></a>00121 answerdata-&gt;alloc(ndata-&gt;mLength + bydata-&gt;mLength);
+<a name="l00122"></a>00122
+<a name="l00123"></a>00123 <span class="comment">// Now multiply the digits, starting at the least-significant digit.</span>
+<a name="l00124"></a>00124 <span class="keyword">const</span> <a class="code" href="namespacexint_1_1detail.html#a8843fb7e364832d8d5983de28bdbcf34">digit_t</a> *d1 = ndata-&gt;digits, *d1e = d1 + ndata-&gt;mLength;
+<a name="l00125"></a>00125 <span class="keyword">const</span> <a class="code" href="namespacexint_1_1detail.html#a8843fb7e364832d8d5983de28bdbcf34">digit_t</a> *d2e = bydata-&gt;digits + bydata-&gt;mLength;
+<a name="l00126"></a>00126 <span class="keywordflow">for</span> (<span class="keywordtype">int</span> digit1=0; d1&lt;d1e; ++digit1, ++d1) {
+<a name="l00127"></a>00127 <span class="keyword">const</span> <a class="code" href="namespacexint_1_1detail.html#a8843fb7e364832d8d5983de28bdbcf34">digit_t</a> *d2=bydata-&gt;digits;
+<a name="l00128"></a>00128 <span class="keywordflow">for</span> (<span class="keywordtype">int</span> digit2=0; d2&lt;d2e; ++digit2, ++d2) {
+<a name="l00129"></a>00129 <span class="comment">// First multiply the two digits</span>
+<a name="l00130"></a>00130 <a class="code" href="namespacexint_1_1detail.html#aceb9b654c1c2daaf377b31bd4a089750">doubledigit_t</a> t=<a class="code" href="namespacexint_1_1detail.html#aceb9b654c1c2daaf377b31bd4a089750">doubledigit_t</a>(*d1) * *d2;
+<a name="l00131"></a>00131
+<a name="l00132"></a>00132 <span class="comment">// Now add the result to the answer.</span>
+<a name="l00133"></a>00133 <span class="keywordtype">int</span> carry=0;
+<a name="l00134"></a>00134 <a class="code" href="namespacexint_1_1detail.html#a8843fb7e364832d8d5983de28bdbcf34">digit_t</a> *a = answerdata-&gt;digits + digit1 + digit2;
+<a name="l00135"></a>00135 <a class="code" href="namespacexint_1_1detail.html#aceb9b654c1c2daaf377b31bd4a089750">doubledigit_t</a> addt=<a class="code" href="namespacexint_1_1detail.html#aceb9b654c1c2daaf377b31bd4a089750">doubledigit_t</a>(*a) + (t &amp; <a class="code" href="namespacexint_1_1detail.html#a051753e1bf43dcc77eaa93b8d4e49197">digit_mask</a>);
+<a name="l00136"></a>00136 <span class="keywordflow">if</span> (addt &gt;= <a class="code" href="namespacexint_1_1detail.html#a6746855fd8cde164294a46108d502e6a">digit_overflowbit</a>) carry=1;
+<a name="l00137"></a>00137 *a++=<span class="keyword">static_cast&lt;</span><a class="code" href="namespacexint_1_1detail.html#a8843fb7e364832d8d5983de28bdbcf34">digit_t</a><span class="keyword">&gt;</span>(addt);
+<a name="l00138"></a>00138
+<a name="l00139"></a>00139 addt=*a + ((t &gt;&gt; <a class="code" href="namespacexint_1_1detail.html#a9bd9e8d55061238d63913020d2721518">bits_per_digit</a>) &amp; <a class="code" href="namespacexint_1_1detail.html#a051753e1bf43dcc77eaa93b8d4e49197">digit_mask</a>) + carry;
+<a name="l00140"></a>00140 <span class="keywordflow">if</span> (addt &gt;= <a class="code" href="namespacexint_1_1detail.html#a6746855fd8cde164294a46108d502e6a">digit_overflowbit</a>) carry=1; <span class="keywordflow">else</span> carry=0;
+<a name="l00141"></a>00141 *a++=<span class="keyword">static_cast&lt;</span><a class="code" href="namespacexint_1_1detail.html#a8843fb7e364832d8d5983de28bdbcf34">digit_t</a><span class="keyword">&gt;</span>(addt);
+<a name="l00142"></a>00142
+<a name="l00143"></a>00143 <span class="keywordflow">while</span> (carry) {
+<a name="l00144"></a>00144 addt=*a+1;
+<a name="l00145"></a>00145 *a++ = <span class="keyword">static_cast&lt;</span><a class="code" href="namespacexint_1_1detail.html#a8843fb7e364832d8d5983de28bdbcf34">digit_t</a><span class="keyword">&gt;</span>(addt);
+<a name="l00146"></a>00146 <span class="keywordflow">if</span> (addt &lt; <a class="code" href="namespacexint_1_1detail.html#a6746855fd8cde164294a46108d502e6a">digit_overflowbit</a>) <span class="keywordflow">break</span>;
+<a name="l00147"></a>00147 }
+<a name="l00148"></a>00148 }
+<a name="l00149"></a>00149 }
+<a name="l00150"></a>00150
+<a name="l00151"></a>00151 answer._set_negative(nsign != bysign);
+<a name="l00152"></a>00152 answer._get_data()-&gt;skipLeadingZeros();
+<a name="l00153"></a>00153 <span class="keywordflow">return</span> answer;
+<a name="l00154"></a>00154 }
+<a name="l00155"></a>00155
+<a name="l00156"></a>00156 <span class="keyword">namespace </span>{
+<a name="l00157"></a>00157
+<a name="l00158"></a>00158 std::pair&lt;integer, integer&gt; divideBySingleDigit(<span class="keyword">const</span> integer&amp; d1, <a class="code" href="namespacexint_1_1detail.html#a8843fb7e364832d8d5983de28bdbcf34">digit_t</a> d2) {
+<a name="l00159"></a>00159 <span class="keyword">const</span> data_t *d1data=d1._get_data();
+<a name="l00160"></a>00160
+<a name="l00161"></a>00161 integer quotient, remainder;
+<a name="l00162"></a>00162 data_t *qdata=quotient._get_data(), *rdata=remainder._get_data();
+<a name="l00163"></a>00163 qdata-&gt;alloc(d1data-&gt;mLength);
+<a name="l00164"></a>00164 rdata-&gt;alloc(1);
+<a name="l00165"></a>00165
+<a name="l00166"></a>00166 <a class="code" href="namespacexint_1_1detail.html#aceb9b654c1c2daaf377b31bd4a089750">doubledigit_t</a> a=0;
+<a name="l00167"></a>00167 <span class="keyword">const</span> <a class="code" href="namespacexint_1_1detail.html#aceb9b654c1c2daaf377b31bd4a089750">doubledigit_t</a> lomask(<a class="code" href="namespacexint_1_1detail.html#a051753e1bf43dcc77eaa93b8d4e49197">digit_mask</a>);
+<a name="l00168"></a>00168 <span class="keyword">const</span> <a class="code" href="namespacexint_1_1detail.html#aceb9b654c1c2daaf377b31bd4a089750">doubledigit_t</a> himask(<a class="code" href="namespacexint_1_1detail.html#aceb9b654c1c2daaf377b31bd4a089750">doubledigit_t</a>(<a class="code" href="namespacexint_1_1detail.html#a051753e1bf43dcc77eaa93b8d4e49197">digit_mask</a>) &lt;&lt; <a class="code" href="namespacexint_1_1detail.html#a9bd9e8d55061238d63913020d2721518">bits_per_digit</a>);
+<a name="l00169"></a>00169
+<a name="l00170"></a>00170 <span class="keywordtype">int</span> m = int(d1data-&gt;mLength) - 1;
+<a name="l00171"></a>00171 <span class="keyword">const</span> <a class="code" href="namespacexint_1_1detail.html#a8843fb7e364832d8d5983de28bdbcf34">digit_t</a> *d1p=d1data-&gt;digits+m;
+<a name="l00172"></a>00172 <a class="code" href="namespacexint_1_1detail.html#a8843fb7e364832d8d5983de28bdbcf34">digit_t</a> *qp=qdata-&gt;digits+m;
+<a name="l00173"></a>00173 <span class="keywordflow">for</span> (<span class="keywordtype">int</span> i = m; i &gt;= 0; --i, --d1p, --qp) {
+<a name="l00174"></a>00174 a = (a &amp; ~lomask) | *d1p;
+<a name="l00175"></a>00175 *qp = <span class="keyword">static_cast&lt;</span><a class="code" href="namespacexint_1_1detail.html#a8843fb7e364832d8d5983de28bdbcf34">digit_t</a><span class="keyword">&gt;</span>(a / d2);
+<a name="l00176"></a>00176 a = (a &amp; ~himask) | ((a % d2) &lt;&lt; <a class="code" href="namespacexint_1_1detail.html#a9bd9e8d55061238d63913020d2721518">bits_per_digit</a>);
+<a name="l00177"></a>00177 }
+<a name="l00178"></a>00178 rdata-&gt;digits[0] = <span class="keyword">static_cast&lt;</span><a class="code" href="namespacexint_1_1detail.html#a8843fb7e364832d8d5983de28bdbcf34">digit_t</a><span class="keyword">&gt;</span>((a &amp; himask) &gt;&gt;
+<a name="l00179"></a>00179 <a class="code" href="namespacexint_1_1detail.html#a9bd9e8d55061238d63913020d2721518">bits_per_digit</a>);
+<a name="l00180"></a>00180
+<a name="l00181"></a>00181 qdata-&gt;skipLeadingZeros();
+<a name="l00182"></a>00182 rdata-&gt;skipLeadingZeros();
+<a name="l00183"></a>00183 <span class="keywordflow">return</span> std::make_pair(quotient, remainder);
+<a name="l00184"></a>00184 }
+<a name="l00185"></a>00185
+<a name="l00186"></a>00186 std::pair&lt;integer, integer&gt; subDivide(integer d1, integer d2) {
+<a name="l00187"></a>00187 <span class="keyword">const</span> <a class="code" href="namespacexint_1_1detail.html#a8843fb7e364832d8d5983de28bdbcf34">digit_t</a> *byDigits = d2._get_data()-&gt;digits;
+<a name="l00188"></a>00188
+<a name="l00189"></a>00189 <span class="comment">// The normalization step</span>
+<a name="l00190"></a>00190 <a class="code" href="namespacexint_1_1detail.html#a8843fb7e364832d8d5983de28bdbcf34">digit_t</a> d = <span class="keyword">static_cast&lt;</span><a class="code" href="namespacexint_1_1detail.html#a8843fb7e364832d8d5983de28bdbcf34">digit_t</a><span class="keyword">&gt;</span>(<a class="code" href="namespacexint_1_1detail.html#a6746855fd8cde164294a46108d502e6a">digit_overflowbit</a> /
+<a name="l00191"></a>00191 (<a class="code" href="namespacexint_1_1detail.html#aceb9b654c1c2daaf377b31bd4a089750">doubledigit_t</a>(byDigits[d2._get_length()-1])+1));
+<a name="l00192"></a>00192 <span class="keywordflow">if</span> (d &gt; 1) {
+<a name="l00193"></a>00193 d1 *= d;
+<a name="l00194"></a>00194 d2 *= d;
+<a name="l00195"></a>00195
+<a name="l00196"></a>00196 <span class="comment">// Gotta reset this</span>
+<a name="l00197"></a>00197 byDigits = d2._get_data()-&gt;digits;
+<a name="l00198"></a>00198 }
+<a name="l00199"></a>00199 assert(d2._get_digit(d2._get_length()-1) &gt;= <a class="code" href="namespacexint_1_1detail.html#a6746855fd8cde164294a46108d502e6a">digit_overflowbit</a> / 2);
+<a name="l00200"></a>00200
+<a name="l00201"></a>00201 integer quotient, r(d1);
+<a name="l00202"></a>00202 data_t *qdata=quotient._get_data();
+<a name="l00203"></a>00203
+<a name="l00204"></a>00204 <span class="keywordtype">size_t</span> n=d2._get_length(), m=d1._get_length() - n;
+<a name="l00205"></a>00205 <span class="keywordtype">size_t</span> i=m+n, j=m;
+<a name="l00206"></a>00206 qdata-&gt;alloc(j+1);
+<a name="l00207"></a>00207
+<a name="l00208"></a>00208 r._make_unique();
+<a name="l00209"></a>00209 <span class="keywordflow">do</span> {
+<a name="l00210"></a>00210 <a class="code" href="namespacexint_1_1detail.html#aceb9b654c1c2daaf377b31bd4a089750">doubledigit_t</a> ri=(<a class="code" href="namespacexint_1_1detail.html#aceb9b654c1c2daaf377b31bd4a089750">doubledigit_t</a>(r._get_digit(i, <span class="keyword">true</span>))
+<a name="l00211"></a>00211 &lt;&lt; <a class="code" href="namespacexint_1_1detail.html#a9bd9e8d55061238d63913020d2721518">bits_per_digit</a>) + r._get_digit(i-1, <span class="keyword">true</span>);
+<a name="l00212"></a>00212 <a class="code" href="namespacexint_1_1detail.html#aceb9b654c1c2daaf377b31bd4a089750">doubledigit_t</a> q=(std::min&lt;doubledigit_t&gt;)(ri / byDigits[n-1], <a class="code" href="namespacexint_1_1detail.html#a051753e1bf43dcc77eaa93b8d4e49197">digit_mask</a>);
+<a name="l00213"></a>00213
+<a name="l00214"></a>00214 <span class="keywordflow">while</span> (1) {
+<a name="l00215"></a>00215 <span class="comment">// We need three digits here, a doubledigit_t won&apos;t suffice.</span>
+<a name="l00216"></a>00216 <a class="code" href="namespacexint_1_1detail.html#aceb9b654c1c2daaf377b31bd4a089750">doubledigit_t</a> r2a=ri - (q * byDigits[n-1]);
+<a name="l00217"></a>00217 integer r2=(integer(r2a) &lt;&lt; <a class="code" href="namespacexint_1_1detail.html#a9bd9e8d55061238d63913020d2721518">bits_per_digit</a>) + r._get_digit(i-2);
+<a name="l00218"></a>00218 <span class="keywordflow">if</span> (byDigits[n-2] * q &lt;= r2) <span class="keywordflow">break</span>;
+<a name="l00219"></a>00219 --q;
+<a name="l00220"></a>00220 }
+<a name="l00221"></a>00221
+<a name="l00222"></a>00222 integer bq=d2*q;
+<a name="l00223"></a>00223 <span class="keywordflow">if</span> (r &lt; bq) { --q; bq -= d2; }
+<a name="l00224"></a>00224
+<a name="l00225"></a>00225 integer rtemp((r &gt;&gt; (<a class="code" href="namespacexint_1_1detail.html#a9bd9e8d55061238d63913020d2721518">bits_per_digit</a> * (i-n))) - bq);
+<a name="l00226"></a>00226 data_t *rdata=r._get_data();
+<a name="l00227"></a>00227
+<a name="l00228"></a>00228 <a class="code" href="namespacexint_1_1detail.html#a8843fb7e364832d8d5983de28bdbcf34">digit_t</a> *rdigits=rdata-&gt;digits;
+<a name="l00229"></a>00229
+<a name="l00230"></a>00230 <span class="keywordflow">for</span> (<span class="keywordtype">size_t</span> x=0; x&lt;=n &amp;&amp; i-n+x &lt; rdata-&gt;mLength; ++x)
+<a name="l00231"></a>00231 rdigits[i-n+x]=rtemp._get_digit(x, <span class="keyword">true</span>);
+<a name="l00232"></a>00232 rdata-&gt;skipLeadingZeros();
+<a name="l00233"></a>00233
+<a name="l00234"></a>00234 qdata-&gt;digits[j--]=<a class="code" href="namespacexint_1_1detail.html#a8843fb7e364832d8d5983de28bdbcf34">digit_t</a>(q);
+<a name="l00235"></a>00235 } <span class="keywordflow">while</span> (--i &gt;= n);
+<a name="l00236"></a>00236
+<a name="l00237"></a>00237 qdata-&gt;skipLeadingZeros();
+<a name="l00238"></a>00238
+<a name="l00239"></a>00239 <span class="keywordflow">if</span> (d &gt; 1) {
+<a name="l00240"></a>00240 <span class="comment">// Denormalization step. This requires a division by a single digit_t.</span>
+<a name="l00241"></a>00241 integer remainder=divideBySingleDigit(r, d).first;
+<a name="l00242"></a>00242 <span class="keywordflow">return</span> std::make_pair(quotient, remainder);
+<a name="l00243"></a>00243 } <span class="keywordflow">else</span> {
+<a name="l00244"></a>00244 <span class="keywordflow">return</span> std::make_pair(quotient, r);
+<a name="l00245"></a>00245 }
+<a name="l00246"></a>00246 }
+<a name="l00247"></a>00247
+<a name="l00248"></a>00248 } <span class="comment">// namespace</span>
+<a name="l00249"></a>00249
+<a name="l00258"></a>00258 integer <a class="code" href="namespacexint.html#abf3d47f1ef1fdf334097fab055886a44" title="Calculate how many dividends would fit into divisor.">divide</a>(<span class="keyword">const</span> integer&amp; dividend, <span class="keyword">const</span> integer&amp; divisor) {
+<a name="l00259"></a>00259 <span class="keywordflow">return</span> <a class="code" href="namespacexint.html#a23d0a0bb05cec1917d96d6aaceeb875d" title="Calculate how many dividends would fit into divisor, with the remainder.">divide_r</a>(dividend, divisor).first;
+<a name="l00260"></a>00260 }
+<a name="l00261"></a>00261
+<a name="l00276"></a>00276 std::pair&lt;integer, integer&gt; <a class="code" href="namespacexint.html#a23d0a0bb05cec1917d96d6aaceeb875d" title="Calculate how many dividends would fit into divisor, with the remainder.">divide_r</a>(<span class="keyword">const</span> integer&amp; d1, <span class="keyword">const</span>
+<a name="l00277"></a>00277 integer&amp; d2)
+<a name="l00278"></a>00278 {
+<a name="l00279"></a>00279 <span class="keywordtype">int</span> sign1=d1.sign(), sign2=d2.sign();
+<a name="l00280"></a>00280 <span class="keywordflow">if</span> (sign2==0) {
+<a name="l00281"></a>00281 <span class="keywordflow">if</span> (<a class="code" href="namespacexint.html#ac8be41374700d89400f5ecddf0f789e3" title="Query whether exceptions are currently allowed or blocked.">exceptions_allowed</a>()) <span class="keywordflow">throw</span> divide_by_zero();
+<a name="l00282"></a>00282 <span class="keywordflow">else</span> <span class="keywordflow">return</span> std::make_pair(integer(not_a_number()), integer(not_a_number()));
+<a name="l00283"></a>00283 }
+<a name="l00284"></a>00284
+<a name="l00285"></a>00285 <span class="keywordtype">int</span> comp=<a class="code" href="namespacexint.html#aff82dd47fae4297b96282371abf4db06" title="Compare two integer objects.">compare</a>(d1, d2, <span class="keyword">true</span>);
+<a name="l00286"></a>00286 <span class="keywordflow">if</span> (comp&lt;0) {
+<a name="l00287"></a>00287 <span class="keywordflow">return</span> std::make_pair(<a class="code" href="classxint_1_1integer.html#a64a0f99de7c33239237cb59d8464f3d2">integer::zero</a>(), d1);
+<a name="l00288"></a>00288 } <span class="keywordflow">else</span> <span class="keywordflow">if</span> (comp==0) {
+<a name="l00289"></a>00289 <span class="keywordflow">return</span> std::make_pair(sign1 != sign2 ? <a class="code" href="classxint_1_1integer.html#a9237b21f4162146c7b5749b169c081b8">integer::one</a>() : integer(-1),
+<a name="l00290"></a>00290 <a class="code" href="classxint_1_1integer.html#a64a0f99de7c33239237cb59d8464f3d2">integer::zero</a>());
+<a name="l00291"></a>00291 }
+<a name="l00292"></a>00292
+<a name="l00293"></a>00293 <span class="keywordflow">if</span> (sign1 &lt; 0 &amp;&amp; sign2 &lt; 0) {
+<a name="l00294"></a>00294 std::pair&lt;integer, integer&gt; a=subDivide(-d1, -d2);
+<a name="l00295"></a>00295 a.second._set_negative(<span class="keyword">true</span>);
+<a name="l00296"></a>00296 <span class="keywordflow">return</span> a;
+<a name="l00297"></a>00297 } <span class="keywordflow">else</span> <span class="keywordflow">if</span> (sign1 &lt; 0) {
+<a name="l00298"></a>00298 std::pair&lt;integer, integer&gt; a=subDivide(-d1, d2);
+<a name="l00299"></a>00299 a.first._set_negative(<span class="keyword">true</span>);
+<a name="l00300"></a>00300 a.second._set_negative(<span class="keyword">true</span>);
+<a name="l00301"></a>00301 <span class="keywordflow">return</span> a;
+<a name="l00302"></a>00302 } <span class="keywordflow">else</span> <span class="keywordflow">if</span> (sign2 &lt; 0) {
+<a name="l00303"></a>00303 std::pair&lt;integer, integer&gt; a=subDivide(d1, -d2);
+<a name="l00304"></a>00304 a.first._set_negative(<span class="keyword">true</span>);
+<a name="l00305"></a>00305 <span class="keywordflow">return</span> a;
+<a name="l00306"></a>00306 };
+<a name="l00307"></a>00307
+<a name="l00308"></a>00308 <span class="keywordflow">if</span> (d2._get_data()-&gt;mLength == 1) {
+<a name="l00309"></a>00309 <span class="keywordflow">return</span> divideBySingleDigit(d1, d2._get_data()-&gt;digits[0]);
+<a name="l00310"></a>00310 } <span class="keywordflow">else</span> {
+<a name="l00311"></a>00311 <span class="keywordflow">return</span> subDivide(d1, d2);
+<a name="l00312"></a>00312 }
+<a name="l00313"></a>00313 }
+<a name="l00314"></a>00314
+<a name="l00315"></a>00315 } <span class="comment">// namespace xint</span>
+</pre></div></div>
+<hr size="1"/><address style="text-align: right;"><small>Generated on Tue Apr 6 01:22:08 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.1 </small></address>
+</body>
+</html>

Added: sandbox/xint/doc/r__cow_8dox.html
==============================================================================
--- (empty file)
+++ sandbox/xint/doc/r__cow_8dox.html 2010-04-06 01:40:33 EDT (Tue, 06 Apr 2010)
@@ -0,0 +1,36 @@
+<!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/r_cow.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.1 -->
+<div class="navigation" id="top">
+ <div class="tabs">
+ <ul>
+ <li>Main Page</li>
+ <li>Related Pages</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/r_cow.dox File Reference</h1><table border="0" cellpadding="0" cellspacing="0">
+</table>
+</div>
+<hr size="1"/><address style="text-align: right;"><small>Generated on Tue Apr 6 01:22:08 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.1 </small></address>
+</body>
+</html>

Added: sandbox/xint/doc/r__default__necessary_8dox.html
==============================================================================
--- (empty file)
+++ sandbox/xint/doc/r__default__necessary_8dox.html 2010-04-06 01:40:33 EDT (Tue, 06 Apr 2010)
@@ -0,0 +1,36 @@
+<!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/r_default_necessary.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.1 -->
+<div class="navigation" id="top">
+ <div class="tabs">
+ <ul>
+ <li>Main Page</li>
+ <li>Related Pages</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/r_default_necessary.dox File Reference</h1><table border="0" cellpadding="0" cellspacing="0">
+</table>
+</div>
+<hr size="1"/><address style="text-align: right;"><small>Generated on Tue Apr 6 01:22:08 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.1 </small></address>
+</body>
+</html>

Added: sandbox/xint/doc/r__insecure__default_8dox.html
==============================================================================
--- (empty file)
+++ sandbox/xint/doc/r__insecure__default_8dox.html 2010-04-06 01:40:33 EDT (Tue, 06 Apr 2010)
@@ -0,0 +1,36 @@
+<!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/r_insecure_default.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.1 -->
+<div class="navigation" id="top">
+ <div class="tabs">
+ <ul>
+ <li>Main Page</li>
+ <li>Related Pages</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/r_insecure_default.dox File Reference</h1><table border="0" cellpadding="0" cellspacing="0">
+</table>
+</div>
+<hr size="1"/><address style="text-align: right;"><small>Generated on Tue Apr 6 01:22:08 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.1 </small></address>
+</body>
+</html>

Added: sandbox/xint/doc/r__interface_8dox.html
==============================================================================
--- (empty file)
+++ sandbox/xint/doc/r__interface_8dox.html 2010-04-06 01:40:33 EDT (Tue, 06 Apr 2010)
@@ -0,0 +1,36 @@
+<!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/r_interface.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.1 -->
+<div class="navigation" id="top">
+ <div class="tabs">
+ <ul>
+ <li>Main Page</li>
+ <li>Related Pages</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/r_interface.dox File Reference</h1><table border="0" cellpadding="0" cellspacing="0">
+</table>
+</div>
+<hr size="1"/><address style="text-align: right;"><small>Generated on Tue Apr 6 01:22:08 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.1 </small></address>
+</body>
+</html>

Added: sandbox/xint/doc/r__interface__design__only_8dox.html
==============================================================================
--- (empty file)
+++ sandbox/xint/doc/r__interface__design__only_8dox.html 2010-04-06 01:40:33 EDT (Tue, 06 Apr 2010)
@@ -0,0 +1,36 @@
+<!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/r_interface_design_only.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.1 -->
+<div class="navigation" id="top">
+ <div class="tabs">
+ <ul>
+ <li>Main Page</li>
+ <li>Related Pages</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/r_interface_design_only.dox File Reference</h1><table border="0" cellpadding="0" cellspacing="0">
+</table>
+</div>
+<hr size="1"/><address style="text-align: right;"><small>Generated on Tue Apr 6 01:22:08 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.1 </small></address>
+</body>
+</html>

Added: sandbox/xint/doc/r__nan_8dox.html
==============================================================================
--- (empty file)
+++ sandbox/xint/doc/r__nan_8dox.html 2010-04-06 01:40:33 EDT (Tue, 06 Apr 2010)
@@ -0,0 +1,36 @@
+<!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/r_nan.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.1 -->
+<div class="navigation" id="top">
+ <div class="tabs">
+ <ul>
+ <li>Main Page</li>
+ <li>Related Pages</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/r_nan.dox File Reference</h1><table border="0" cellpadding="0" cellspacing="0">
+</table>
+</div>
+<hr size="1"/><address style="text-align: right;"><small>Generated on Tue Apr 6 01:22:08 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.1 </small></address>
+</body>
+</html>

Added: sandbox/xint/doc/r__negzero_8dox.html
==============================================================================
--- (empty file)
+++ sandbox/xint/doc/r__negzero_8dox.html 2010-04-06 01:40:33 EDT (Tue, 06 Apr 2010)
@@ -0,0 +1,36 @@
+<!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/r_negzero.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.1 -->
+<div class="navigation" id="top">
+ <div class="tabs">
+ <ul>
+ <li>Main Page</li>
+ <li>Related Pages</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/r_negzero.dox File Reference</h1><table border="0" cellpadding="0" cellspacing="0">
+</table>
+</div>
+<hr size="1"/><address style="text-align: right;"><small>Generated on Tue Apr 6 01:22:08 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.1 </small></address>
+</body>
+</html>

Added: sandbox/xint/doc/r__random_8dox.html
==============================================================================
--- (empty file)
+++ sandbox/xint/doc/r__random_8dox.html 2010-04-06 01:40:33 EDT (Tue, 06 Apr 2010)
@@ -0,0 +1,36 @@
+<!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/r_random.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.1 -->
+<div class="navigation" id="top">
+ <div class="tabs">
+ <ul>
+ <li>Main Page</li>
+ <li>Related Pages</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/r_random.dox File Reference</h1><table border="0" cellpadding="0" cellspacing="0">
+</table>
+</div>
+<hr size="1"/><address style="text-align: right;"><small>Generated on Tue Apr 6 01:22:08 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.1 </small></address>
+</body>
+</html>

Added: sandbox/xint/doc/r__shared__ptr_8dox.html
==============================================================================
--- (empty file)
+++ sandbox/xint/doc/r__shared__ptr_8dox.html 2010-04-06 01:40:33 EDT (Tue, 06 Apr 2010)
@@ -0,0 +1,36 @@
+<!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/r_shared_ptr.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.1 -->
+<div class="navigation" id="top">
+ <div class="tabs">
+ <ul>
+ <li>Main Page</li>
+ <li>Related Pages</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/r_shared_ptr.dox File Reference</h1><table border="0" cellpadding="0" cellspacing="0">
+</table>
+</div>
+<hr size="1"/><address style="text-align: right;"><small>Generated on Tue Apr 6 01:22:08 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.1 </small></address>
+</body>
+</html>

Added: sandbox/xint/doc/r_cow.html
==============================================================================
--- (empty file)
+++ sandbox/xint/doc/r_cow.html 2010-04-06 01:40:33 EDT (Tue, 06 Apr 2010)
@@ -0,0 +1,34 @@
+<!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: Why use copy-on-write? I&#39;ve heard that causes problems with multi-threaded code.</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.1 -->
+<div class="navigation" id="top">
+ <div class="tabs">
+ <ul>
+ <li>Main Page</li>
+ <li class="current">Related Pages</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>&nbsp;&raquo&nbsp;<a class="el" href="rationale.html">Rationales</a>
+ </div>
+</div>
+<div class="contents">
+
+
+<h1><a class="anchor" id="r_cow">Why use copy-on-write? I've heard that causes problems with multi-threaded code. </a></h1><p>It's the best way I found to return large <code>integer</code> objects from functions efficiently. Some of these numbers can get huge, and move semantics aren't yet in the current standard. (Once they are, I'll consider removing the copy-on-write stuff.) It is also more CPU- and memory-efficient.</p>
+<p>It <em>does</em> cause problems when you try to use the library from multiple threads at the same time. To deal with that, the library can be compiled in a <a class="el" href="threadsafe.html">thread-safe mode</a>, which ensures that every <code>integer</code> gets its own unique storage, among other things. You still have to ensure that only one thread accesses a particular <code>integer</code> at a time. </p>
+</div>
+<hr size="1"/><address style="text-align: right;"><small>Generated on Tue Apr 6 01:22:08 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.1 </small></address>
+</body>
+</html>

Added: sandbox/xint/doc/r_default_necessary.html
==============================================================================
--- (empty file)
+++ sandbox/xint/doc/r_default_necessary.html 2010-04-06 01:40:33 EDT (Tue, 06 Apr 2010)
@@ -0,0 +1,33 @@
+<!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: Okay, then why not make the developer provide one?</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.1 -->
+<div class="navigation" id="top">
+ <div class="tabs">
+ <ul>
+ <li>Main Page</li>
+ <li class="current">Related Pages</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>&nbsp;&raquo&nbsp;<a class="el" href="rationale.html">Rationales</a>
+ </div>
+</div>
+<div class="contents">
+
+
+<h1><a class="anchor" id="r_default_necessary">Okay, then why not make the developer provide one? </a></h1><p>Ease-of-use, and the fact that for many developers, there's little need for cryptographically-secure random numbers. This way, those that need them can take a few simple steps to get them, and those that don't can just use the library as-is. </p>
+</div>
+<hr size="1"/><address style="text-align: right;"><small>Generated on Tue Apr 6 01:22:08 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.1 </small></address>
+</body>
+</html>

Added: sandbox/xint/doc/r_insecure_default.html
==============================================================================
--- (empty file)
+++ sandbox/xint/doc/r_insecure_default.html 2010-04-06 01:40:33 EDT (Tue, 06 Apr 2010)
@@ -0,0 +1,33 @@
+<!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: But why default to an insecure random number generator? Why not default to the secure one?</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.1 -->
+<div class="navigation" id="top">
+ <div class="tabs">
+ <ul>
+ <li>Main Page</li>
+ <li class="current">Related Pages</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>&nbsp;&raquo&nbsp;<a class="el" href="rationale.html">Rationales</a>
+ </div>
+</div>
+<div class="contents">
+
+
+<h1><a class="anchor" id="r_insecure_default">But why default to an insecure random number generator? Why not default to the secure one? </a></h1><p>Because the secure one isn't available on all systems. If I relied on <code>random_device</code> as a default, the library wouldn't compile under those systems. If I used <code><a class="el" href="classxint_1_1strong__random__generator.html" title="A convenience class for cryptographically-secure random numbers.">xint::strong_random_generator</a></code>, it would compile, but would always fail on them. </p>
+</div>
+<hr size="1"/><address style="text-align: right;"><small>Generated on Tue Apr 6 01:22:08 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.1 </small></address>
+</body>
+</html>

Added: sandbox/xint/doc/r_interface.html
==============================================================================
--- (empty file)
+++ sandbox/xint/doc/r_interface.html 2010-04-06 01:40:33 EDT (Tue, 06 Apr 2010)
@@ -0,0 +1,36 @@
+<!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: Why did you do \e X in the interface?</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.1 -->
+<div class="navigation" id="top">
+ <div class="tabs">
+ <ul>
+ <li>Main Page</li>
+ <li class="current">Related Pages</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>&nbsp;&raquo&nbsp;<a class="el" href="rationale.html">Rationales</a>
+ </div>
+</div>
+<div class="contents">
+
+
+<h1><a class="anchor" id="r_interface">Why did you do <em>X</em> in the interface? </a></h1><p>The interface is based on a paper by M.J. Kronenburg presented to the C++ Standards Committee in early 2004, n1692, and the "standardese" for it in n1744 by Michiel Salters / Nederlands Normalisatie Instituut.</p>
+<dl class="see"><dt><b>See also:</b></dt><dd>n1692: http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2004/n1692.pdf </dd>
+<dd>
+n1744: http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2005/n1744.pdf </dd></dl>
+</div>
+<hr size="1"/><address style="text-align: right;"><small>Generated on Tue Apr 6 01:22:08 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.1 </small></address>
+</body>
+</html>

Added: sandbox/xint/doc/r_interface_design_only.html
==============================================================================
--- (empty file)
+++ sandbox/xint/doc/r_interface_design_only.html 2010-04-06 01:40:33 EDT (Tue, 06 Apr 2010)
@@ -0,0 +1,38 @@
+<!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: Then why didn&#39;t you follow those exactly?</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.1 -->
+<div class="navigation" id="top">
+ <div class="tabs">
+ <ul>
+ <li>Main Page</li>
+ <li class="current">Related Pages</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>&nbsp;&raquo&nbsp;<a class="el" href="rationale.html">Rationales</a>
+ </div>
+</div>
+<div class="contents">
+
+
+<h1><a class="anchor" id="r_interface_design_only">Then why didn't you follow those exactly? </a></h1><p>The XInt library was designed before I knew about them. I adapted it to them later.</p>
+<p>There are only a few notable places where XInt differs from them:</p>
+<ul>
+<li>It does not provide separate mathematical primitive functions for <code>long long</code>, as suggested in n1744. This is partly because <code>long long</code> is not yet in the C++ standard, but mostly because I don't see a need for it. The conversion constructors are efficient enough for smaller values that there wouldn't be any noticeable benefit from it.</li>
+<li>It does not, at present, implement a multiplication scheme with better performance than the "basecase" mentioned in section 3.4 of n1692, primarily because I haven't had the time to research all of them yet. I suspect that most people using the library will usually be using numbers below the threshold where the more exotic algorithms are faster, but I plan to add at least one of them in the future, maybe several. </li>
+</ul>
+</div>
+<hr size="1"/><address style="text-align: right;"><small>Generated on Tue Apr 6 01:22:08 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.1 </small></address>
+</body>
+</html>

Added: sandbox/xint/doc/r_nan.html
==============================================================================
--- (empty file)
+++ sandbox/xint/doc/r_nan.html 2010-04-06 01:40:33 EDT (Tue, 06 Apr 2010)
@@ -0,0 +1,33 @@
+<!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: Why have a Not-a-Number value?</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.1 -->
+<div class="navigation" id="top">
+ <div class="tabs">
+ <ul>
+ <li>Main Page</li>
+ <li class="current">Related Pages</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>&nbsp;&raquo&nbsp;<a class="el" href="rationale.html">Rationales</a>
+ </div>
+</div>
+<div class="contents">
+
+
+<h1><a class="anchor" id="r_nan">Why have a Not-a-Number value? </a></h1><p>Because it's the cleanest way I could find to return answers that don't represent a valid <code>integer</code>, which is necessary for the exception-blocking mechanism. </p>
+</div>
+<hr size="1"/><address style="text-align: right;"><small>Generated on Tue Apr 6 01:22:08 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.1 </small></address>
+</body>
+</html>

Added: sandbox/xint/doc/r_negzero.html
==============================================================================
--- (empty file)
+++ sandbox/xint/doc/r_negzero.html 2010-04-06 01:40:33 EDT (Tue, 06 Apr 2010)
@@ -0,0 +1,35 @@
+<!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: Since you&#39;ve got Not-a-Number, what about negative zero, and positive and negative infinity, like IEEE floating-point numbers?</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.1 -->
+<div class="navigation" id="top">
+ <div class="tabs">
+ <ul>
+ <li>Main Page</li>
+ <li class="current">Related Pages</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>&nbsp;&raquo&nbsp;<a class="el" href="rationale.html">Rationales</a>
+ </div>
+</div>
+<div class="contents">
+
+
+<h1><a class="anchor" id="r_negzero">Since you've got Not-a-Number, what about negative zero, and positive and negative infinity, like IEEE floating-point numbers? </a></h1><p>Because they're irrelevant to an arbitrary-sized integer library.</p>
+<p>The mathematical concept of zero has no sign. It's neither positive nor negative (or if you prefer, it's both). The concept of a signed zero is used in floating-point numbers to represent a value that's so small that it can't be distinguished from zero, but which may not be an actual zero. Such a non-zero number does have a sign. But mathematically, a negative zero is simply zero.</p>
+<p>The concept of infinity (in either direction) comes up very rarely in an integer library. Since infinity is a concept, not a countable value, it's simply represented by the Not-a-Number value in the few places that it might be needed. </p>
+</div>
+<hr size="1"/><address style="text-align: right;"><small>Generated on Tue Apr 6 01:22:08 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.1 </small></address>
+</body>
+</html>

Added: sandbox/xint/doc/r_random.html
==============================================================================
--- (empty file)
+++ sandbox/xint/doc/r_random.html 2010-04-06 01:40:33 EDT (Tue, 06 Apr 2010)
@@ -0,0 +1,33 @@
+<!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: Why did you implement your own random number generator? You should use Boost.Random instead.</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.1 -->
+<div class="navigation" id="top">
+ <div class="tabs">
+ <ul>
+ <li>Main Page</li>
+ <li class="current">Related Pages</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>&nbsp;&raquo&nbsp;<a class="el" href="rationale.html">Rationales</a>
+ </div>
+</div>
+<div class="contents">
+
+
+<h1><a class="anchor" id="r_random">Why did you implement your own random number generator? You should use Boost.Random instead. </a></h1><p>Boost.Random provides <code>boost::random_device</code> to tap into the operating system's strong random number generator, but at the time of this writing, the official released version only defines it for Linux and BSD systems. The current maintainer, Steven Watanabe, says that he has just added Windows compatibility to it, so the <a class="el" href="classxint_1_1strong__random__generator.html" title="A convenience class for cryptographically-secure random numbers.">xint::strong_random_generator</a> class will likely be reduced to a typedef for <code>boost::random_device</code>, or a thin shell around it, in the near future. </p>
+</div>
+<hr size="1"/><address style="text-align: right;"><small>Generated on Tue Apr 6 01:22:08 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.1 </small></address>
+</body>
+</html>

Added: sandbox/xint/doc/r_shared_ptr.html
==============================================================================
--- (empty file)
+++ sandbox/xint/doc/r_shared_ptr.html 2010-04-06 01:40:33 EDT (Tue, 06 Apr 2010)
@@ -0,0 +1,33 @@
+<!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: Why are you using a roll-your-own system instead of \c boost::shared_ptr for the copy-on-write stuff?</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.1 -->
+<div class="navigation" id="top">
+ <div class="tabs">
+ <ul>
+ <li>Main Page</li>
+ <li class="current">Related Pages</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>&nbsp;&raquo&nbsp;<a class="el" href="rationale.html">Rationales</a>
+ </div>
+</div>
+<div class="contents">
+
+
+<h1><a class="anchor" id="r_shared_ptr">Why are you using a roll-your-own system instead of <code>boost::shared_ptr</code> for the copy-on-write stuff? </a></h1><p>Because it's a lot faster. I tried <code>boost::shared_ptr</code>, and under Linux with GCC 4.4.1 on the same computer, running my test suite went from 1.6 seconds to 3.4 seconds. The home-grown shared pointer design may not be quite as easy to work with in an exception-safe manner, but that's completely internal to the <code>integer</code> class, so only developers working <em>on</em> the library, rather than <em>with</em> it, have to deal with that. I'll accept that trade-off. </p>
+</div>
+<hr size="1"/><address style="text-align: right;"><small>Generated on Tue Apr 6 01:22:08 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.1 </small></address>
+</body>
+</html>

Added: sandbox/xint/doc/random.html
==============================================================================
--- (empty file)
+++ sandbox/xint/doc/random.html 2010-04-06 01:40:33 EDT (Tue, 06 Apr 2010)
@@ -0,0 +1,35 @@
+<!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: The XInt Random Number System</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.1 -->
+<div class="navigation" id="top">
+ <div class="tabs">
+ <ul>
+ <li>Main Page</li>
+ <li class="current">Related Pages</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="random">The XInt Random Number System </a></h1><p>The library includes a random number system to support the <a class="el" href="namespacexint.html#afc8ba5f62561b4d2b42e32dde1a10ef3" title="Generate a randomly-generated prime number of a particular bit-size.">xint::random_prime</a> function. The default random number generator is <em>not</em> cryptographically secure (see <a class="el" href="rationale.html">the rationale page</a> for details). However, the system can easily be configured to use a cryptographically-secure generator.</p>
+<p>The XInt library provides a convenience class, <a class="el" href="classxint_1_1strong__random__generator.html" title="A convenience class for cryptographically-secure random numbers.">xint::strong_random_generator</a>, for both Windows and UNIX-derived systems. It will throw an exception of type <a class="el" href="classxint_1_1no__strong__random.html" title="Exception class.">xint::no_strong_random</a> if you try to instantiate it on a system that does not have a strong random number generator.</p>
+<p>See the code at the top of <a class="el" href="primes.html">the Prime Numbers page</a> for an example of how to use it. </p>
+</div>
+<hr size="1"/><address style="text-align: right;"><small>Generated on Tue Apr 6 01:22:08 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.1 </small></address>
+</body>
+</html>

Added: sandbox/xint/doc/random_8cpp.html
==============================================================================
--- (empty file)
+++ sandbox/xint/doc/random_8cpp.html 2010-04-06 01:40:33 EDT (Tue, 06 Apr 2010)
@@ -0,0 +1,72 @@
+<!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: random.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.1 -->
+<div class="navigation" id="top">
+ <div class="tabs">
+ <ul>
+ <li>Main Page</li>
+ <li>Related Pages</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>random.cpp File Reference</h1>
+<p>Contains the definitions for the random number functions.
+More...</p>
+<code>#include &quot;../boost/xint/xint.hpp&quot;</code><br/>
+<code>#include &quot;../boost/xint/xint_data_t.hpp&quot;</code><br/>
+<code>#include &lt;vector&gt;</code><br/>
+<code>#include &lt;sstream&gt;</code><br/>
+<code>#include &lt;fstream&gt;</code><br/>
+<code>#include &lt;ctime&gt;</code><br/>
+<code>#include &lt;boost/random/mersenne_twister.hpp&gt;</code><br/>
+
+<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="namespacexint.html">xint</a></td></tr>
+
+<p><tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight"><p>All of the functions in the XInt library are within this namespace. </p>
+<br/></td></tr>
+</p>
+<tr><td class="memItemLeft" align="right" valign="top">namespace &nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespacexint_1_1detail.html">xint::detail</a></td></tr>
+
+<p><tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight"><p>The items within this namespace are meant for internal use only. </p>
+<br/></td></tr>
+</p>
+<tr><td colspan="2"><h2>Functions</h2></td></tr>
+<tr><td class="memItemLeft" align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespacexint_1_1detail.html#a5f8bba03a6f615a82ebcf94ad7cd4353">xint::detail::set_random_generator</a> (base_random_generator *obj)</td></tr>
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Support function. <br/></td></tr>
+<tr><td class="memItemLeft" align="right" valign="top">unsigned int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespacexint_1_1detail.html#a1dfc1e90886c4897a4b112f491b89b62">xint::detail::get_random</a> ()</td></tr>
+<tr><td colspan="2"><div class="groupHeader">Random number functions</div></td></tr>
+<tr><td colspan="2"><div class="groupText"><p><a class="anchor" id="amgrpdd4713a71c208a173c1f2436d4e32ff7"></a> </p>
+<br/><br/></div></td></tr>
+<tr><td class="memItemLeft" align="right" valign="top">integer&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespacexint.html#a5da6e81cb78913cc61c9f14857700b5e">xint::random_by_size</a> (size_t bits, bool high_bit_on, bool low_bit_on, bool can_be_negative)</td></tr>
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Generates a random <a class="el" href="classxint_1_1integer.html" title="The extended integer class.">integer</a> with specific attributes. <br/></td></tr>
+</table>
+<hr/><a name="_details"></a><h2>Detailed Description</h2>
+<p>Contains the definitions for the random number functions. </p>
+
+<p>Definition in file <a class="el" href="random_8cpp_source.html">random.cpp</a>.</p>
+</div>
+<hr size="1"/><address style="text-align: right;"><small>Generated on Tue Apr 6 01:22:08 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.1 </small></address>
+</body>
+</html>

Added: sandbox/xint/doc/random_8cpp_source.html
==============================================================================
--- (empty file)
+++ sandbox/xint/doc/random_8cpp_source.html 2010-04-06 01:40:33 EDT (Tue, 06 Apr 2010)
@@ -0,0 +1,236 @@
+<!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: random.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.1 -->
+<div class="navigation" id="top">
+ <div class="tabs">
+ <ul>
+ <li>Main Page</li>
+ <li>Related Pages</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>random.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">#ifdef _WIN32</span>
+<a name="l00019"></a>00019 <span class="preprocessor"></span><span class="preprocessor"> #define STRICT</span>
+<a name="l00020"></a>00020 <span class="preprocessor"></span><span class="preprocessor"> #define WIN32_LEAN_AND_MEAN</span>
+<a name="l00021"></a>00021 <span class="preprocessor"></span><span class="preprocessor"> #define NOMINMAX</span>
+<a name="l00022"></a>00022 <span class="preprocessor"></span><span class="preprocessor"> #include &lt;windows.h&gt;</span>
+<a name="l00023"></a>00023 <span class="preprocessor">#endif</span>
+<a name="l00024"></a>00024 <span class="preprocessor"></span>
+<a name="l00025"></a>00025 <span class="preprocessor">#include &quot;../boost/xint/xint.hpp&quot;</span>
+<a name="l00026"></a>00026 <span class="preprocessor">#include &quot;../boost/xint/xint_data_t.hpp&quot;</span>
+<a name="l00027"></a>00027 <span class="preprocessor">#include &lt;vector&gt;</span>
+<a name="l00028"></a>00028 <span class="preprocessor">#include &lt;sstream&gt;</span>
+<a name="l00029"></a>00029 <span class="preprocessor">#include &lt;fstream&gt;</span>
+<a name="l00030"></a>00030 <span class="preprocessor">#include &lt;ctime&gt;</span>
+<a name="l00031"></a>00031 <span class="preprocessor">#include &lt;boost/random/mersenne_twister.hpp&gt;</span>
+<a name="l00032"></a>00032
+<a name="l00033"></a>00033 <span class="preprocessor">#ifdef XINT_THREADSAFE</span>
+<a name="l00034"></a>00034 <span class="preprocessor"></span><span class="preprocessor"> #include &lt;boost/thread.hpp&gt;</span>
+<a name="l00035"></a>00035 <span class="preprocessor">#endif</span>
+<a name="l00036"></a>00036 <span class="preprocessor"></span>
+<a name="l00037"></a>00037 <span class="keyword">namespace </span>xint {
+<a name="l00038"></a>00038
+<a name="l00039"></a>00039 <span class="keyword">using namespace </span>detail;
+<a name="l00040"></a>00040
+<a name="l00041"></a>00041 <span class="keyword">namespace </span>{
+<a name="l00042"></a>00042
+<a name="l00043"></a>00043 <span class="keyword">class </span>generator_t {
+<a name="l00044"></a>00044 <span class="keyword">public</span>:
+<a name="l00045"></a>00045 <span class="keyword">typedef</span> <a class="code" href="structxint_1_1detail_1_1base__random__generator.html#a0556d7f290cd236303b3f1031611cb3e">base_random_generator::result_type</a> result_type;
+<a name="l00046"></a>00046 <span class="keyword">typedef</span> boost::mt19937 default_random_t;
+<a name="l00047"></a>00047
+<a name="l00048"></a>00048 <span class="preprocessor"> #ifdef XINT_THREADSAFE</span>
+<a name="l00049"></a>00049 <span class="preprocessor"></span> generator_t() { mLock.lock(); init(); }
+<a name="l00050"></a>00050 ~generator_t() { mLock.unlock(); }
+<a name="l00051"></a>00051 <span class="preprocessor"> #else</span>
+<a name="l00052"></a>00052 <span class="preprocessor"></span> generator_t() { init(); }
+<a name="l00053"></a>00053 <span class="preprocessor"> #endif</span>
+<a name="l00054"></a>00054 <span class="preprocessor"></span>
+<a name="l00055"></a>00055 result_type operator()() { <span class="keywordflow">return</span> mGeneratorObj-&gt;operator()(); }
+<a name="l00056"></a>00056
+<a name="l00057"></a>00057 <span class="keyword">static</span> <span class="keywordtype">void</span> set_generator(base_random_generator *p) { mGeneratorObj.reset(p); }
+<a name="l00058"></a>00058
+<a name="l00059"></a>00059 <span class="keyword">private</span>:
+<a name="l00060"></a>00060 <span class="keywordtype">void</span> init() {
+<a name="l00061"></a>00061 <span class="keywordflow">if</span> (mGeneratorObj.get() == 0) {
+<a name="l00062"></a>00062 <span class="keyword">typedef</span> default_random_t T;
+<a name="l00063"></a>00063 T *genobj(<span class="keyword">new</span> T(boost::uint32_t(time(0)+clock())));
+<a name="l00064"></a>00064 random_generator&lt;T&gt; *obj=<span class="keyword">new</span> random_generator&lt;T&gt;(genobj);
+<a name="l00065"></a>00065 set_generator(obj);
+<a name="l00066"></a>00066 }
+<a name="l00067"></a>00067 }
+<a name="l00068"></a>00068
+<a name="l00069"></a>00069 <span class="keyword">static</span> std::auto_ptr&lt;base_random_generator&gt; mGeneratorObj;
+<a name="l00070"></a>00070
+<a name="l00071"></a>00071 <span class="preprocessor"> #ifdef XINT_THREADSAFE</span>
+<a name="l00072"></a>00072 <span class="preprocessor"></span> <span class="keyword">static</span> boost::mutex mLock;
+<a name="l00073"></a>00073 <span class="preprocessor"> #endif</span>
+<a name="l00074"></a>00074 <span class="preprocessor"></span>};
+<a name="l00075"></a>00075
+<a name="l00076"></a>00076 std::auto_ptr&lt;base_random_generator&gt; generator_t::mGeneratorObj;
+<a name="l00077"></a>00077
+<a name="l00078"></a>00078 <span class="preprocessor">#ifdef XINT_THREADSAFE</span>
+<a name="l00079"></a>00079 <span class="preprocessor"></span> boost::mutex generator_t::mLock;
+<a name="l00080"></a>00080 <span class="preprocessor">#endif</span>
+<a name="l00081"></a>00081 <span class="preprocessor"></span>
+<a name="l00082"></a>00082 } <span class="comment">// namespace</span>
+<a name="l00083"></a>00083
+<a name="l00084"></a>00084 <span class="keyword">namespace </span>detail {
+<a name="l00085"></a>00085
+<a name="l00086"></a>00086 <span class="keywordtype">void</span> <a class="code" href="namespacexint_1_1detail.html#a5f8bba03a6f615a82ebcf94ad7cd4353" title="Support function.">set_random_generator</a>(base_random_generator *obj) {
+<a name="l00087"></a>00087 generator_t::set_generator(obj);
+<a name="l00088"></a>00088 }
+<a name="l00089"></a>00089
+<a name="l00090"></a>00090 <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> <a class="code" href="namespacexint_1_1detail.html#a1dfc1e90886c4897a4b112f491b89b62">get_random</a>() {
+<a name="l00091"></a>00091 generator_t gen;
+<a name="l00092"></a>00092 <span class="keywordflow">return</span> gen();
+<a name="l00093"></a>00093 }
+<a name="l00094"></a>00094
+<a name="l00095"></a>00095 } <span class="comment">// namespace detail</span>
+<a name="l00096"></a>00096
+<a name="l00098"></a>00098 <span class="comment">// The secure random generator</span>
+<a name="l00099"></a>00099
+<a name="l00101"></a>00101 <span class="preprocessor">#ifdef _WIN32</span>
+<a name="l00102"></a>00102 <span class="preprocessor"></span> <span class="keyword">struct </span>strong_random_generator::impl_t {
+<a name="l00103"></a>00103 <span class="keyword">typedef</span> BOOLEAN (WINAPI *RtlGenRandomFn)(PVOID, ULONG);
+<a name="l00104"></a>00104 <span class="keyword">typedef</span> DWORD <a class="code" href="classxint_1_1strong__random__generator.html#a470b586d0730deb716ffa3c13164e493">result_type</a>;
+<a name="l00105"></a>00105
+<a name="l00106"></a>00106 impl_t(): dll(0), fn(0) {
+<a name="l00107"></a>00107 <span class="comment">// This should work under WinXP, Vista, and Win7. No guarantees about</span>
+<a name="l00108"></a>00108 <span class="comment">// future compatibility, but I doubt that Microsoft will get rid of it</span>
+<a name="l00109"></a>00109 <span class="comment">// (it&apos;s too useful), and I doubt that they&apos;ll change it now that it&apos;s</span>
+<a name="l00110"></a>00110 <span class="comment">// well-known (it would break too many programs). We could also use the</span>
+<a name="l00111"></a>00111 <span class="comment">// rand_s function in more recent versions of Visual C++, but that</span>
+<a name="l00112"></a>00112 <span class="comment">// causes compatibility problems with older versions of Windows.</span>
+<a name="l00113"></a>00113 dll=LoadLibraryA(<span class="stringliteral">&quot;Advapi32.dll&quot;</span>);
+<a name="l00114"></a>00114 <span class="keywordflow">if</span> (dll != 0) fn=RtlGenRandomFn(GetProcAddress(dll, <span class="stringliteral">&quot;SystemFunction036&quot;</span>));
+<a name="l00115"></a>00115 <span class="keywordflow">if</span> (fn == 0) {
+<a name="l00116"></a>00116 destroy();
+<a name="l00117"></a>00117 <span class="keywordflow">throw</span> no_strong_random();
+<a name="l00118"></a>00118 }
+<a name="l00119"></a>00119 }
+<a name="l00120"></a>00120
+<a name="l00121"></a>00121 ~impl_t() { destroy(); }
+<a name="l00122"></a>00122
+<a name="l00123"></a>00123 <a class="code" href="classxint_1_1strong__random__generator.html#a470b586d0730deb716ffa3c13164e493">result_type</a> <a class="code" href="classxint_1_1strong__random__generator.html#a2bbb1944511585f66e5daec4737bd4e7">operator()</a>() {
+<a name="l00124"></a>00124 <a class="code" href="classxint_1_1strong__random__generator.html#a470b586d0730deb716ffa3c13164e493">result_type</a> r=0;
+<a name="l00125"></a>00125 <span class="keywordflow">if</span> (!fn(&amp;r, <span class="keyword">sizeof</span>(<a class="code" href="classxint_1_1strong__random__generator.html#a470b586d0730deb716ffa3c13164e493">result_type</a>)))
+<a name="l00126"></a>00126 <span class="keywordflow">throw</span> no_strong_random(<span class="stringliteral">&quot;RtlGenRandom failed&quot;</span>);
+<a name="l00127"></a>00127 <span class="keywordflow">return</span> r;
+<a name="l00128"></a>00128 }
+<a name="l00129"></a>00129
+<a name="l00130"></a>00130 <span class="keywordtype">void</span> destroy() { <span class="keywordflow">if</span> (dll) FreeLibrary(dll); }
+<a name="l00131"></a>00131
+<a name="l00132"></a>00132 HMODULE dll;
+<a name="l00133"></a>00133 RtlGenRandomFn fn;
+<a name="l00134"></a>00134 };
+<a name="l00135"></a>00135
+<a name="l00136"></a>00136 <span class="keywordtype">double</span> <a class="code" href="classxint_1_1strong__random__generator.html#a57ff17a9c2b36775acfedd53f5a0b30e">strong_random_generator::entropy</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> 32; }
+<a name="l00137"></a>00137 <span class="preprocessor">#else</span>
+<a name="l00138"></a>00138 <span class="preprocessor"></span> <span class="keyword">struct </span>strong_random_generator::impl_t {
+<a name="l00139"></a>00139 <span class="keyword">typedef</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> <a class="code" href="classxint_1_1strong__random__generator.html#a470b586d0730deb716ffa3c13164e493">result_type</a>;
+<a name="l00140"></a>00140
+<a name="l00141"></a>00141 impl_t(): rng(<span class="stringliteral">&quot;/dev/urandom&quot;</span>, std::ios::binary) {
+<a name="l00142"></a>00142 <span class="comment">// This should be supported under most non-Windows systems. Note</span>
+<a name="l00143"></a>00143 <span class="comment">// that we&apos;re using /dev/urandom, not /dev/random -- /dev/random is</span>
+<a name="l00144"></a>00144 <span class="comment">// more secure, but it can be VERY slow.</span>
+<a name="l00145"></a>00145 <span class="keywordflow">if</span> (!rng) <span class="keywordflow">throw</span> no_strong_random();
+<a name="l00146"></a>00146 }
+<a name="l00147"></a>00147
+<a name="l00148"></a>00148 <a class="code" href="classxint_1_1strong__random__generator.html#a470b586d0730deb716ffa3c13164e493">result_type</a> <a class="code" href="classxint_1_1strong__random__generator.html#a2bbb1944511585f66e5daec4737bd4e7">operator()</a>() {
+<a name="l00149"></a>00149 <span class="keywordtype">int</span> r=rng.get();
+<a name="l00150"></a>00150 <span class="keywordflow">if</span> (r==EOF) <span class="keywordflow">throw</span> no_strong_random(<span class="stringliteral">&quot;/dev/urandom returned EOF&quot;</span>);
+<a name="l00151"></a>00151 <span class="keywordflow">return</span> <span class="keyword">static_cast&lt;</span><a class="code" href="classxint_1_1strong__random__generator.html#a470b586d0730deb716ffa3c13164e493">result_type</a><span class="keyword">&gt;</span>(r);
+<a name="l00152"></a>00152 }
+<a name="l00153"></a>00153
+<a name="l00154"></a>00154 std::ifstream rng;
+<a name="l00155"></a>00155 };
+<a name="l00156"></a>00156
+<a name="l00157"></a>00157 <span class="keywordtype">double</span> <a class="code" href="classxint_1_1strong__random__generator.html#a57ff17a9c2b36775acfedd53f5a0b30e">strong_random_generator::entropy</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> 8; }
+<a name="l00158"></a>00158 <span class="preprocessor">#endif</span>
+<a name="l00160"></a>00160 <span class="preprocessor"></span>
+<a name="l00161"></a>00161 <span class="preprocessor"></span><span class="keyword">const</span> <span class="keywordtype">bool</span> <a class="code" href="classxint_1_1strong__random__generator.html#a1a808cca9189eb64f420e4745ca5122d">strong_random_generator::has_fixed_range</a> = <span class="keyword">true</span>;
+<a name="l00162"></a>00162 <span class="keyword">const</span> <a class="code" href="classxint_1_1strong__random__generator.html#a470b586d0730deb716ffa3c13164e493">strong_random_generator::result_type</a> <a class="code" href="classxint_1_1strong__random__generator.html#a4bea7dba7f086441548dfee576e54fce">strong_random_generator::min_value</a> =
+<a name="l00163"></a>00163 (std::numeric_limits&lt;impl_t::result_type&gt;::min)();
+<a name="l00164"></a>00164 <span class="keyword">const</span> <a class="code" href="classxint_1_1strong__random__generator.html#a470b586d0730deb716ffa3c13164e493">strong_random_generator::result_type</a> <a class="code" href="classxint_1_1strong__random__generator.html#aea47e4fbf8b0fe5914ade7ce2704a3c3">strong_random_generator::max_value</a> =
+<a name="l00165"></a>00165 (std::numeric_limits&lt;impl_t::result_type&gt;::max)();
+<a name="l00166"></a><a class="code" href="classxint_1_1strong__random__generator.html#a8841d21b6614967e0520f55c3093871a">00166</a> <a class="code" href="classxint_1_1strong__random__generator.html#a8841d21b6614967e0520f55c3093871a">strong_random_generator::strong_random_generator</a>(): impl(new impl_t) { }
+<a name="l00167"></a><a class="code" href="classxint_1_1strong__random__generator.html#ac75f659c2adb7c822d49fe534b2d76a4">00167</a> <a class="code" href="classxint_1_1strong__random__generator.html#ac75f659c2adb7c822d49fe534b2d76a4">strong_random_generator::~strong_random_generator</a>() { <span class="keyword">delete</span> impl; }
+<a name="l00168"></a><a class="code" href="classxint_1_1strong__random__generator.html#a2bbb1944511585f66e5daec4737bd4e7">00168</a> <a class="code" href="classxint_1_1strong__random__generator.html#a470b586d0730deb716ffa3c13164e493">strong_random_generator::result_type</a> <a class="code" href="classxint_1_1strong__random__generator.html#a2bbb1944511585f66e5daec4737bd4e7">strong_random_generator::operator()</a>() {
+<a name="l00169"></a>00169 <span class="keywordflow">return</span> (*impl)(); }
+<a name="l00170"></a>00170
+<a name="l00172"></a>00172 <a class="code" href="classxint_1_1strong__random__generator.html#a470b586d0730deb716ffa3c13164e493">strong_random_generator::result_type</a> <a class="code" href="classxint_1_1strong__random__generator.html#a5ec89070a7a7338c2b7318086efef701">strong_random_generator::min</a>
+<a name="l00173"></a>00173 BOOST_PREVENT_MACRO_SUBSTITUTION ()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> min_value; }
+<a name="l00174"></a>00174 <a class="code" href="classxint_1_1strong__random__generator.html#a470b586d0730deb716ffa3c13164e493">strong_random_generator::result_type</a> <a class="code" href="classxint_1_1strong__random__generator.html#a1327ad0fe9d6f1f1c851456592b178db">strong_random_generator::max</a>
+<a name="l00175"></a>00175 BOOST_PREVENT_MACRO_SUBSTITUTION ()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> max_value; }
+<a name="l00177"></a>00177
+<a name="l00179"></a>00179 <span class="comment">// Returns a positive (unless told otherwise) integer between zero and</span>
+<a name="l00180"></a>00180 <span class="comment">// (1&lt;&lt;bits)-1, inclusive</span>
+<a name="l00181"></a>00181
+<a name="l00202"></a>00202 integer <a class="code" href="namespacexint.html#a5da6e81cb78913cc61c9f14857700b5e" title="Generates a random integer with specific attributes.">random_by_size</a>(<span class="keywordtype">size_t</span> bits, <span class="keywordtype">bool</span> high_bit_on, <span class="keywordtype">bool</span> low_bit_on, <span class="keywordtype">bool</span>
+<a name="l00203"></a>00203 can_be_negative)
+<a name="l00204"></a>00204 {
+<a name="l00205"></a>00205 <span class="keywordflow">if</span> (bits&lt;=0) <span class="keywordflow">return</span> <a class="code" href="classxint_1_1integer.html#a64a0f99de7c33239237cb59d8464f3d2">integer::zero</a>();
+<a name="l00206"></a>00206
+<a name="l00207"></a>00207 generator_t randomGenerator;
+<a name="l00208"></a>00208 <span class="keyword">const</span> <span class="keywordtype">size_t</span> cBitsPerIteration=std::numeric_limits&lt;generator_t::result_type&gt;::digits;
+<a name="l00209"></a>00209
+<a name="l00210"></a>00210 <span class="comment">// Grab a set of random bits, of at least the specified size</span>
+<a name="l00211"></a>00211 <span class="keywordtype">size_t</span> iterations = (bits+cBitsPerIteration-1) / cBitsPerIteration;
+<a name="l00212"></a>00212 std::vector&lt;generator_t::result_type&gt; v;
+<a name="l00213"></a>00213 <span class="keywordflow">for</span> (<span class="keywordtype">size_t</span> i=0; i&lt;iterations; ++i) v.push_back(randomGenerator());
+<a name="l00214"></a>00214
+<a name="l00215"></a>00215 <span class="keyword">const</span> <span class="keywordtype">char</span> *vptr=(<span class="keyword">const</span> <span class="keywordtype">char</span> *)&amp;v[0], *vptr_end=vptr+(v.size() * <span class="keyword">sizeof</span>(generator_t::result_type));
+<a name="l00216"></a>00216 integer p=<a class="code" href="namespacexint.html#ac2ac2f74b45e4179560d845e6310be9a" title="Converts a binary representation of a number into an integer.">from_binary</a>(std::string(vptr, vptr_end));
+<a name="l00217"></a>00217
+<a name="l00218"></a>00218 <span class="comment">// Trim it to the proper length</span>
+<a name="l00219"></a>00219 <span class="keywordtype">size_t</span> index=(bits/<a class="code" href="namespacexint_1_1detail.html#a9bd9e8d55061238d63913020d2721518">bits_per_digit</a>);
+<a name="l00220"></a>00220 <a class="code" href="namespacexint_1_1detail.html#a8843fb7e364832d8d5983de28bdbcf34">digit_t</a> mask=(<a class="code" href="namespacexint_1_1detail.html#a8843fb7e364832d8d5983de28bdbcf34">digit_t</a>(1) &lt;&lt; (bits % <a class="code" href="namespacexint_1_1detail.html#a9bd9e8d55061238d63913020d2721518">bits_per_digit</a>))-1;
+<a name="l00221"></a>00221 <span class="keywordflow">if</span> (mask==0) { mask=<a class="code" href="namespacexint_1_1detail.html#a051753e1bf43dcc77eaa93b8d4e49197">digit_mask</a>; --index; }
+<a name="l00222"></a>00222 p._get_data()-&gt;digits[index] &amp;= mask;
+<a name="l00223"></a>00223 <span class="keywordflow">for</span> (<a class="code" href="namespacexint_1_1detail.html#a8843fb7e364832d8d5983de28bdbcf34">digit_t</a> *i=p._get_data()-&gt;digits+index+1,
+<a name="l00224"></a>00224 *ie=p._get_data()-&gt;digits+p._get_data()-&gt;mLength; i&lt;ie; ++i) *i=0;
+<a name="l00225"></a>00225 p._get_data()-&gt;skipLeadingZeros();
+<a name="l00226"></a>00226
+<a name="l00227"></a>00227 <span class="keywordflow">if</span> (high_bit_on) <a class="code" href="namespacexint.html#adf2652627e78682c17e120816987984a" title="Sets a specific bit in an integer to one.">setbit</a>(p, bits-1);
+<a name="l00228"></a>00228 <span class="keywordflow">if</span> (low_bit_on) <a class="code" href="namespacexint.html#adf2652627e78682c17e120816987984a" title="Sets a specific bit in an integer to one.">setbit</a>(p, 0);
+<a name="l00229"></a>00229 <span class="keywordflow">if</span> (can_be_negative) p._set_negative(randomGenerator() &amp; 0x01);
+<a name="l00230"></a>00230
+<a name="l00231"></a>00231 <span class="keywordflow">return</span> p;
+<a name="l00232"></a>00232 }
+<a name="l00233"></a>00233
+<a name="l00234"></a>00234 } <span class="comment">// namespace xint</span>
+</pre></div></div>
+<hr size="1"/><address style="text-align: right;"><small>Generated on Tue Apr 6 01:22:08 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.1 </small></address>
+</body>
+</html>

Added: sandbox/xint/doc/random_8dox.html
==============================================================================
--- (empty file)
+++ sandbox/xint/doc/random_8dox.html 2010-04-06 01:40:33 EDT (Tue, 06 Apr 2010)
@@ -0,0 +1,36 @@
+<!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/random.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.1 -->
+<div class="navigation" id="top">
+ <div class="tabs">
+ <ul>
+ <li>Main Page</li>
+ <li>Related Pages</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/random.dox File Reference</h1><table border="0" cellpadding="0" cellspacing="0">
+</table>
+</div>
+<hr size="1"/><address style="text-align: right;"><small>Generated on Tue Apr 6 01:22:08 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.1 </small></address>
+</body>
+</html>

Added: sandbox/xint/doc/rationale.html
==============================================================================
--- (empty file)
+++ sandbox/xint/doc/rationale.html 2010-04-06 01:40:33 EDT (Tue, 06 Apr 2010)
@@ -0,0 +1,57 @@
+<!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: Rationales</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.1 -->
+<div class="navigation" id="top">
+ <div class="tabs">
+ <ul>
+ <li>Main Page</li>
+ <li class="current">Related Pages</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="rationale">Rationales </a></h1><h2><a class="anchor" id="sinterface">
+Interface</a></h2>
+<ul>
+<li><a class="el" href="r_interface.html">Why did you do <em>X</em> in the interface?</a></li>
+<li><a class="el" href="r_interface_design_only.html">Then why didn't you follow those exactly?</a></li>
+</ul>
+<h2><a class="anchor" id="scow">
+Copy-on-Write</a></h2>
+<ul>
+<li><a class="el" href="r_cow.html">Why use copy-on-write? I've heard that causes problems with multi-threaded code.</a></li>
+<li><a class="el" href="r_shared_ptr.html">Why are you using a roll-your-own system instead of <code>boost::shared_ptr</code> for the copy-on-write stuff?</a></li>
+</ul>
+<h2><a class="anchor" id="snan">
+Not-a-Number</a></h2>
+<ul>
+<li><a class="el" href="r_nan.html">Why have a Not-a-Number value?</a></li>
+<li><a class="el" href="r_negzero.html">Since you've got Not-a-Number, what about negative zero, and positive and negative infinity, like IEEE floating-point numbers?</a></li>
+</ul>
+<h2><a class="anchor" id="srandom">
+Random generator</a></h2>
+<ul>
+<li><a class="el" href="r_random.html">Why did you implement your own random number generator? You should use Boost.Random instead.</a></li>
+<li><a class="el" href="r_insecure_default.html">But why default to an insecure random number generator? Why not default to the secure one?</a></li>
+<li><a class="el" href="r_default_necessary.html">Okay, then why not make the developer provide one?</a> </li>
+</ul>
+</div>
+<hr size="1"/><address style="text-align: right;"><small>Generated on Tue Apr 6 01:22:08 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.1 </small></address>
+</body>
+</html>

Added: sandbox/xint/doc/rationale_8dox.html
==============================================================================
--- (empty file)
+++ sandbox/xint/doc/rationale_8dox.html 2010-04-06 01:40:33 EDT (Tue, 06 Apr 2010)
@@ -0,0 +1,36 @@
+<!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/rationale.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.1 -->
+<div class="navigation" id="top">
+ <div class="tabs">
+ <ul>
+ <li>Main Page</li>
+ <li>Related Pages</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/rationale.dox File Reference</h1><table border="0" cellpadding="0" cellspacing="0">
+</table>
+</div>
+<hr size="1"/><address style="text-align: right;"><small>Generated on Tue Apr 6 01:22:08 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.1 </small></address>
+</body>
+</html>

Added: sandbox/xint/doc/roots_8cpp.html
==============================================================================
--- (empty file)
+++ sandbox/xint/doc/roots_8cpp.html 2010-04-06 01:40:33 EDT (Tue, 06 Apr 2010)
@@ -0,0 +1,58 @@
+<!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: roots.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.1 -->
+<div class="navigation" id="top">
+ <div class="tabs">
+ <ul>
+ <li>Main Page</li>
+ <li>Related Pages</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>roots.cpp File Reference</h1>
+<p>Contains the definitions for functions related to roots of a number.
+More...</p>
+<code>#include &quot;../boost/xint/xint.hpp&quot;</code><br/>
+
+<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="namespacexint.html">xint</a></td></tr>
+
+<p><tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight"><p>All of the functions in the XInt 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">Powers and roots</div></td></tr>
+<tr><td colspan="2"><div class="groupText"><p><a class="anchor" id="amgrp928a8cb047602f789d7433e262ed4560"></a> </p>
+<br/><br/></div></td></tr>
+<tr><td class="memItemLeft" align="right" valign="top">integer&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespacexint.html#a74891726f8af86736169dd43b929ad0a">xint::sqrt</a> (const integer &amp;n)</td></tr>
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Calculate the square root of <code>an</code> <a class="el" href="classxint_1_1integer.html" title="The extended integer class.">integer</a>. <br/></td></tr>
+</table>
+<hr/><a name="_details"></a><h2>Detailed Description</h2>
+<p>Contains the definitions for functions related to roots of a number. </p>
+
+<p>Definition in file <a class="el" href="roots_8cpp_source.html">roots.cpp</a>.</p>
+</div>
+<hr size="1"/><address style="text-align: right;"><small>Generated on Tue Apr 6 01:22:08 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.1 </small></address>
+</body>
+</html>

Added: sandbox/xint/doc/roots_8cpp_source.html
==============================================================================
--- (empty file)
+++ sandbox/xint/doc/roots_8cpp_source.html 2010-04-06 01:40:33 EDT (Tue, 06 Apr 2010)
@@ -0,0 +1,72 @@
+<!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: roots.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.1 -->
+<div class="navigation" id="top">
+ <div class="tabs">
+ <ul>
+ <li>Main Page</li>
+ <li>Related Pages</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>roots.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/xint.hpp&quot;</span>
+<a name="l00019"></a>00019
+<a name="l00020"></a>00020 <span class="keyword">namespace </span>xint {
+<a name="l00021"></a>00021
+<a name="l00032"></a>00032 integer <a class="code" href="namespacexint.html#a74891726f8af86736169dd43b929ad0a" title="Calculate the square root of an integer.">sqrt</a>(<span class="keyword">const</span> integer&amp; n) {
+<a name="l00033"></a>00033 <span class="keywordflow">if</span> (n.sign() &lt; 0) {
+<a name="l00034"></a>00034 <span class="keywordflow">if</span> (<a class="code" href="namespacexint.html#ac8be41374700d89400f5ecddf0f789e3" title="Query whether exceptions are currently allowed or blocked.">exceptions_allowed</a>()) <span class="keywordflow">throw</span> cannot_represent(<span class="stringliteral">&quot;library cannot &quot;</span>
+<a name="l00035"></a>00035 <span class="stringliteral">&quot;represent imaginary values (tried to take sqrt of negative &quot;</span>
+<a name="l00036"></a>00036 <span class="stringliteral">&quot;number)&quot;</span>);
+<a name="l00037"></a>00037 <span class="keywordflow">else</span> <span class="keywordflow">return</span> integer(not_a_number());
+<a name="l00038"></a>00038 } <span class="keywordflow">else</span> <span class="keywordflow">if</span> (n.sign() == 0) <span class="keywordflow">return</span> <a class="code" href="classxint_1_1integer.html#a64a0f99de7c33239237cb59d8464f3d2">integer::zero</a>();
+<a name="l00039"></a>00039
+<a name="l00040"></a>00040 <span class="comment">// Initial guess is half the length of n, in bits</span>
+<a name="l00041"></a>00041 integer guess;
+<a name="l00042"></a>00042 <a class="code" href="namespacexint.html#adf2652627e78682c17e120816987984a" title="Sets a specific bit in an integer to one.">setbit</a>(guess, <a class="code" href="namespacexint.html#aa074495871d366c760c5b0713f5ef048" title="Get the log2 value of an integer.">log2</a>(n)/2);
+<a name="l00043"></a>00043
+<a name="l00044"></a>00044 <span class="comment">// Now refine it until we&apos;re as close as integers can get</span>
+<a name="l00045"></a>00045 <span class="keywordflow">while</span> (1) {
+<a name="l00046"></a>00046 integer guess2=(guess + (n/guess)) &gt;&gt; 1;
+<a name="l00047"></a>00047 <span class="keywordflow">if</span> (guess == guess2) <span class="keywordflow">break</span>;
+<a name="l00048"></a>00048 guess=guess2;
+<a name="l00049"></a>00049 }
+<a name="l00050"></a>00050
+<a name="l00051"></a>00051 <span class="keywordflow">return</span> guess;
+<a name="l00052"></a>00052 }
+<a name="l00053"></a>00053
+<a name="l00054"></a>00054 } <span class="comment">// namespace xint</span>
+</pre></div></div>
+<hr size="1"/><address style="text-align: right;"><small>Generated on Tue Apr 6 01:22:08 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.1 </small></address>
+</body>
+</html>

Added: sandbox/xint/doc/securemode.html
==============================================================================
--- (empty file)
+++ sandbox/xint/doc/securemode.html 2010-04-06 01:40:33 EDT (Tue, 06 Apr 2010)
@@ -0,0 +1,35 @@
+<!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: Secure Mode</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.1 -->
+<div class="navigation" id="top">
+ <div class="tabs">
+ <ul>
+ <li>Main Page</li>
+ <li class="current">Related Pages</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="securemode">Secure Mode </a></h1><p>For high-security applications, this library has a Secure Mode compile-time option. In Secure Mode, all memory is zeroed before being released.</p>
+<p>To enable it, define the preprocessor symbol <code>XINT_SECURE</code> when compiling the library. You don't need to define it when using the library, only when compiling it.</p>
+<p>To see whether your copy was compiled with secure-mode enabled, use the <a class="el" href="namespacexint.html#a820d89c1d761a0a2c06479b1c1f9cecd" title="Tells whether the library was compiled with Secure Mode enabled.">xint::opt_secure_mode</a> function. </p>
+</div>
+<hr size="1"/><address style="text-align: right;"><small>Generated on Tue Apr 6 01:22:08 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.1 </small></address>
+</body>
+</html>

Added: sandbox/xint/doc/securemode_8dox.html
==============================================================================
--- (empty file)
+++ sandbox/xint/doc/securemode_8dox.html 2010-04-06 01:40:33 EDT (Tue, 06 Apr 2010)
@@ -0,0 +1,36 @@
+<!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/securemode.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.1 -->
+<div class="navigation" id="top">
+ <div class="tabs">
+ <ul>
+ <li>Main Page</li>
+ <li>Related Pages</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/securemode.dox File Reference</h1><table border="0" cellpadding="0" cellspacing="0">
+</table>
+</div>
+<hr size="1"/><address style="text-align: right;"><small>Generated on Tue Apr 6 01:22:08 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.1 </small></address>
+</body>
+</html>

Added: sandbox/xint/doc/structxint_1_1detail_1_1base__random__generator-members.html
==============================================================================
--- (empty file)
+++ sandbox/xint/doc/structxint_1_1detail_1_1base__random__generator-members.html 2010-04-06 01:40:33 EDT (Tue, 06 Apr 2010)
@@ -0,0 +1,38 @@
+<!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.1 -->
+<div class="navigation" id="top">
+ <div class="tabs">
+ <ul>
+ <li>Main Page</li>
+ <li>Related Pages</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>xint::detail::base_random_generator Member List</h1>This is the complete list of members for <a class="el" href="structxint_1_1detail_1_1base__random__generator.html">xint::detail::base_random_generator</a>, including all inherited members.<table>
+ <tr class="memlist"><td><a class="el" href="structxint_1_1detail_1_1base__random__generator.html#aa7f3b20e2fcccbf9d3a5c76e6c89b4b5">operator()</a>()=0</td><td><a class="el" href="structxint_1_1detail_1_1base__random__generator.html">xint::detail::base_random_generator</a></td><td><code> [pure virtual]</code></td></tr>
+ <tr class="memlist"><td><a class="el" href="structxint_1_1detail_1_1base__random__generator.html#a0556d7f290cd236303b3f1031611cb3e">result_type</a> typedef</td><td><a class="el" href="structxint_1_1detail_1_1base__random__generator.html">xint::detail::base_random_generator</a></td><td></td></tr>
+</table></div>
+<hr size="1"/><address style="text-align: right;"><small>Generated on Tue Apr 6 01:22:08 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.1 </small></address>
+</body>
+</html>

Added: sandbox/xint/doc/structxint_1_1detail_1_1base__random__generator.gif
==============================================================================
Binary file. No diff available.

Added: sandbox/xint/doc/structxint_1_1detail_1_1base__random__generator.html
==============================================================================
--- (empty file)
+++ sandbox/xint/doc/structxint_1_1detail_1_1base__random__generator.html 2010-04-06 01:40:33 EDT (Tue, 06 Apr 2010)
@@ -0,0 +1,103 @@
+<!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: xint::detail::base_random_generator Struct 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.1 -->
+<div class="navigation" id="top">
+ <div class="tabs">
+ <ul>
+ <li>Main Page</li>
+ <li>Related Pages</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="namespacexint.html">xint</a>::<a class="el" href="namespacexint_1_1detail.html">detail</a>::<a class="el" href="structxint_1_1detail_1_1base__random__generator.html">base_random_generator</a>
+ </div>
+</div>
+<div class="contents">
+<h1>xint::detail::base_random_generator Struct Reference</h1><!-- doxytag: class="xint::detail::base_random_generator" -->
+<p>The base class for <a class="el" href="structxint_1_1detail_1_1random__generator.html" title="Support class for the random generator code.">random_generator</a>.
+More...</p>
+
+<p><code>#include &lt;<a class="el" href="xint_8hpp_source.html">xint.hpp</a>&gt;</code></p>
+<div class="dynheader">
+Inheritance diagram for xint::detail::base_random_generator:</div>
+<div class="dynsection">
+ <div class="center">
+ <img src="structxint_1_1detail_1_1base__random__generator.gif" usemap="#xint::detail::base_random_generator_map" alt=""/>
+ <map id="xint::detail::base_random_generator_map" name="xint::detail::base_random_generator_map">
+<area href="structxint_1_1detail_1_1random__generator.html" alt="xint::detail::random_generator&lt; T &gt;" shape="rect" coords="0,56,211,80"/>
+</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 unsigned int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="structxint_1_1detail_1_1base__random__generator.html#a0556d7f290cd236303b3f1031611cb3e">result_type</a></td></tr>
+<tr><td colspan="2"><h2>Public Member Functions</h2></td></tr>
+<tr><td class="memItemLeft" align="right" valign="top">virtual <a class="el" href="structxint_1_1detail_1_1base__random__generator.html#a0556d7f290cd236303b3f1031611cb3e">result_type</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="structxint_1_1detail_1_1base__random__generator.html#aa7f3b20e2fcccbf9d3a5c76e6c89b4b5">operator()</a> ()=0</td></tr>
+</table>
+<hr/><a name="_details"></a><h2>Detailed Description</h2>
+<p>The base class for <a class="el" href="structxint_1_1detail_1_1random__generator.html" title="Support class for the random generator code.">random_generator</a>. </p>
+
+<p>Definition at line <a class="el" href="xint_8hpp_source.html#l00079">79</a> of file <a class="el" href="xint_8hpp_source.html">xint.hpp</a>.</p>
+<hr/><h2>Member Typedef Documentation</h2>
+<a class="anchor" id="a0556d7f290cd236303b3f1031611cb3e"></a><!-- doxytag: member="xint::detail::base_random_generator::result_type" ref="a0556d7f290cd236303b3f1031611cb3e" args="" -->
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname">typedef unsigned int <a class="el" href="structxint_1_1detail_1_1base__random__generator.html#a0556d7f290cd236303b3f1031611cb3e">xint::detail::base_random_generator::result_type</a></td>
+ </tr>
+ </table>
+</div>
+<div class="memdoc">
+
+<p>Definition at line <a class="el" href="xint_8hpp_source.html#l00080">80</a> of file <a class="el" href="xint_8hpp_source.html">xint.hpp</a>.</p>
+
+</div>
+</div>
+<hr/><h2>Member Function Documentation</h2>
+<a class="anchor" id="aa7f3b20e2fcccbf9d3a5c76e6c89b4b5"></a><!-- doxytag: member="xint::detail::base_random_generator::operator()" ref="aa7f3b20e2fcccbf9d3a5c76e6c89b4b5" args="()=0" -->
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname">virtual <a class="el" href="structxint_1_1detail_1_1base__random__generator.html#a0556d7f290cd236303b3f1031611cb3e">result_type</a> xint::detail::base_random_generator::operator() </td>
+ <td>(</td>
+ <td class="paramname"></td>
+ <td>&nbsp;)&nbsp;</td>
+ <td><code> [pure virtual]</code></td>
+ </tr>
+ </table>
+</div>
+<div class="memdoc">
+
+<p>Implemented in <a class="el" href="structxint_1_1detail_1_1random__generator.html#ade9cefb3f061112ba1d3144aefd24f28">xint::detail::random_generator&lt; T &gt;</a>.</p>
+
+</div>
+</div>
+<hr/>The documentation for this struct was generated from the following file:<ul>
+<li><a class="el" href="xint_8hpp_source.html">xint.hpp</a></li>
+</ul>
+</div>
+<hr size="1"/><address style="text-align: right;"><small>Generated on Tue Apr 6 01:22:08 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.1 </small></address>
+</body>
+</html>

Added: sandbox/xint/doc/structxint_1_1detail_1_1data__t-members.html
==============================================================================
--- (empty file)
+++ sandbox/xint/doc/structxint_1_1detail_1_1data__t-members.html 2010-04-06 01:40:33 EDT (Tue, 06 Apr 2010)
@@ -0,0 +1,59 @@
+<!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.1 -->
+<div class="navigation" id="top">
+ <div class="tabs">
+ <ul>
+ <li>Main Page</li>
+ <li>Related Pages</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>xint::detail::data_t Member List</h1>This is the complete list of members for <a class="el" href="structxint_1_1detail_1_1data__t.html">xint::detail::data_t</a>, including all inherited members.<table>
+ <tr class="memlist"><td><a class="el" href="structxint_1_1detail_1_1data__t.html#a143e6814a7aa20a0d61ed616b9940b2e">add</a>(const data_t &amp;addend)</td><td><a class="el" href="structxint_1_1detail_1_1data__t.html">xint::detail::data_t</a></td><td></td></tr>
+ <tr class="memlist"><td><a class="el" href="structxint_1_1detail_1_1data__t.html#a4fe3935e29883193166966c49cd73139">alloc</a>(size_t digits, bool copydigits=false)</td><td><a class="el" href="structxint_1_1detail_1_1data__t.html">xint::detail::data_t</a></td><td></td></tr>
+ <tr class="memlist"><td><a class="el" href="structxint_1_1detail_1_1data__t.html#a7230e725461510f321bb1c45251b62f3">attach</a>()</td><td><a class="el" href="structxint_1_1detail_1_1data__t.html">xint::detail::data_t</a></td><td><code> [inline]</code></td></tr>
+ <tr class="memlist"><td><a class="el" href="structxint_1_1detail_1_1data__t.html#a66862f94545c953f6604b4347205277b">copy</a>(const data_t *c, size_t extraDigits=0)</td><td><a class="el" href="structxint_1_1detail_1_1data__t.html">xint::detail::data_t</a></td><td></td></tr>
+ <tr class="memlist"><td><a class="el" href="structxint_1_1detail_1_1data__t.html#a9309667d3ac573346294e7b6e18c67ff">data_t</a>(digit_t initial1=0, digit_t initial2=0, digit_t initial3=0)</td><td><a class="el" href="structxint_1_1detail_1_1data__t.html">xint::detail::data_t</a></td><td></td></tr>
+ <tr class="memlist"><td><a class="el" href="structxint_1_1detail_1_1data__t.html#ae5afaa677468a9624ed3fb04318fd2a3">data_t</a>(data_t *c)</td><td><a class="el" href="structxint_1_1detail_1_1data__t.html">xint::detail::data_t</a></td><td></td></tr>
+ <tr class="memlist"><td><a class="el" href="structxint_1_1detail_1_1data__t.html#afd5505e388c5bf8c9cf069df81a91818">detach</a>()</td><td><a class="el" href="structxint_1_1detail_1_1data__t.html">xint::detail::data_t</a></td><td><code> [inline]</code></td></tr>
+ <tr class="memlist"><td><a class="el" href="structxint_1_1detail_1_1data__t.html#a5c9382aec147090d7e7e2b5e972402a9">digits</a></td><td><a class="el" href="structxint_1_1detail_1_1data__t.html">xint::detail::data_t</a></td><td></td></tr>
+ <tr class="memlist"><td><a class="el" href="structxint_1_1detail_1_1data__t.html#aaf6f202db416ad8fe18ec8a6c8c48904">invert</a>()</td><td><a class="el" href="structxint_1_1detail_1_1data__t.html">xint::detail::data_t</a></td><td></td></tr>
+ <tr class="memlist"><td><a class="el" href="structxint_1_1detail_1_1data__t.html#a3390530db8333b535f65d3cc01ff5236">mAllocated</a></td><td><a class="el" href="structxint_1_1detail_1_1data__t.html">xint::detail::data_t</a></td><td></td></tr>
+ <tr class="memlist"><td><a class="el" href="structxint_1_1detail_1_1data__t.html#a73bc854b5f9ced6576b97d2cff8f3a5d">mCopies</a></td><td><a class="el" href="structxint_1_1detail_1_1data__t.html">xint::detail::data_t</a></td><td></td></tr>
+ <tr class="memlist"><td><a class="el" href="structxint_1_1detail_1_1data__t.html#afb2d8673fc5d99d2ea006cd0aa32b744">mIsNegative</a></td><td><a class="el" href="structxint_1_1detail_1_1data__t.html">xint::detail::data_t</a></td><td></td></tr>
+ <tr class="memlist"><td><a class="el" href="structxint_1_1detail_1_1data__t.html#a599933d272e3592b2d0985ca7f7c72e2">mLength</a></td><td><a class="el" href="structxint_1_1detail_1_1data__t.html">xint::detail::data_t</a></td><td></td></tr>
+ <tr class="memlist"><td><a class="el" href="structxint_1_1detail_1_1data__t.html#a022f882ed0818612861b1a67881ae131">mQuickDigits</a></td><td><a class="el" href="structxint_1_1detail_1_1data__t.html">xint::detail::data_t</a></td><td></td></tr>
+ <tr class="memlist"><td><a class="el" href="structxint_1_1detail_1_1data__t.html#a96c33fdc37dd3c774256f7ed20ce735c">mStorage</a></td><td><a class="el" href="structxint_1_1detail_1_1data__t.html">xint::detail::data_t</a></td><td></td></tr>
+ <tr class="memlist"><td><a class="el" href="structxint_1_1detail_1_1data__t.html#aa0dd7ef67ccdef3c3139f4afc84219bd">negate</a>()</td><td><a class="el" href="structxint_1_1detail_1_1data__t.html">xint::detail::data_t</a></td><td></td></tr>
+ <tr class="memlist"><td><a class="el" href="structxint_1_1detail_1_1data__t.html#a57fc3966c44d09daeede53899673cde3">quickset</a>(digit_t d1, digit_t d2=0, digit_t d3=0)</td><td><a class="el" href="structxint_1_1detail_1_1data__t.html">xint::detail::data_t</a></td><td></td></tr>
+ <tr class="memlist"><td><a class="el" href="structxint_1_1detail_1_1data__t.html#a2bb2c79d47f2fda3605f34b80cb58b8b">realloc</a>(size_t newdigits)</td><td><a class="el" href="structxint_1_1detail_1_1data__t.html">xint::detail::data_t</a></td><td><code> [inline]</code></td></tr>
+ <tr class="memlist"><td><a class="el" href="structxint_1_1detail_1_1data__t.html#a72785130c7c6490af874f450cf6e0086">shift_left</a>(size_t byBits)</td><td><a class="el" href="structxint_1_1detail_1_1data__t.html">xint::detail::data_t</a></td><td></td></tr>
+ <tr class="memlist"><td><a class="el" href="structxint_1_1detail_1_1data__t.html#a432ace7094bca306dcba254f862e2428">shift_right</a>(size_t byBits)</td><td><a class="el" href="structxint_1_1detail_1_1data__t.html">xint::detail::data_t</a></td><td></td></tr>
+ <tr class="memlist"><td><a class="el" href="structxint_1_1detail_1_1data__t.html#a6d45feedd311e26f7de06597fb0c6b81">skipLeadingZeros</a>()</td><td><a class="el" href="structxint_1_1detail_1_1data__t.html">xint::detail::data_t</a></td><td></td></tr>
+ <tr class="memlist"><td><a class="el" href="structxint_1_1detail_1_1data__t.html#a650d374b8d38b369273830bb9d939da4">subtract</a>(const data_t &amp;subtrahend)</td><td><a class="el" href="structxint_1_1detail_1_1data__t.html">xint::detail::data_t</a></td><td></td></tr>
+ <tr class="memlist"><td><a class="el" href="structxint_1_1detail_1_1data__t.html#a288850fd62ef26302ce4767a45acd968">zero</a>(digit_t *p, size_t count)</td><td><a class="el" href="structxint_1_1detail_1_1data__t.html">xint::detail::data_t</a></td><td></td></tr>
+</table></div>
+<hr size="1"/><address style="text-align: right;"><small>Generated on Tue Apr 6 01:22:08 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.1 </small></address>
+</body>
+</html>

Added: sandbox/xint/doc/structxint_1_1detail_1_1data__t.html
==============================================================================
--- (empty file)
+++ sandbox/xint/doc/structxint_1_1detail_1_1data__t.html 2010-04-06 01:40:33 EDT (Tue, 06 Apr 2010)
@@ -0,0 +1,566 @@
+<!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: xint::detail::data_t Struct 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.1 -->
+<div class="navigation" id="top">
+ <div class="tabs">
+ <ul>
+ <li>Main Page</li>
+ <li>Related Pages</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="namespacexint.html">xint</a>::<a class="el" href="namespacexint_1_1detail.html">detail</a>::<a class="el" href="structxint_1_1detail_1_1data__t.html">data_t</a>
+ </div>
+</div>
+<div class="contents">
+<h1>xint::detail::data_t Struct Reference</h1><!-- doxytag: class="xint::detail::data_t" -->
+<p>Holds the internal details of an <a class="el" href="classxint_1_1integer.html" title="The extended integer class.">xint::integer</a>.
+More...</p>
+
+<p><code>#include &lt;<a class="el" href="xint__data__t_8hpp_source.html">xint_data_t.hpp</a>&gt;</code></p>
+
+<p>List of all members.</p>
+<table border="0" cellpadding="0" cellspacing="0">
+<tr><td colspan="2"><h2>Classes</h2></td></tr>
+<tr><td class="memItemLeft" align="right" valign="top">struct &nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="structxint_1_1detail_1_1data__t_1_1_quick_digits.html">QuickDigits</a></td></tr>
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Holds information determining how many quick-digits to use. More...<br/></td></tr>
+<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="structxint_1_1detail_1_1data__t.html#a9309667d3ac573346294e7b6e18c67ff">data_t</a> (<a class="el" href="namespacexint_1_1detail.html#a8843fb7e364832d8d5983de28bdbcf34">digit_t</a> initial1=0, <a class="el" href="namespacexint_1_1detail.html#a8843fb7e364832d8d5983de28bdbcf34">digit_t</a> initial2=0, <a class="el" href="namespacexint_1_1detail.html#a8843fb7e364832d8d5983de28bdbcf34">digit_t</a> initial3=0)</td></tr>
+<tr><td class="memItemLeft" align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="structxint_1_1detail_1_1data__t.html#ae5afaa677468a9624ed3fb04318fd2a3">data_t</a> (<a class="el" href="structxint_1_1detail_1_1data__t.html">data_t</a> *c)</td></tr>
+<tr><td class="memItemLeft" align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="structxint_1_1detail_1_1data__t.html#a7230e725461510f321bb1c45251b62f3">attach</a> ()</td></tr>
+<tr><td class="memItemLeft" align="right" valign="top">bool&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="structxint_1_1detail_1_1data__t.html#afd5505e388c5bf8c9cf069df81a91818">detach</a> ()</td></tr>
+<tr><td class="memItemLeft" align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="structxint_1_1detail_1_1data__t.html#a4fe3935e29883193166966c49cd73139">alloc</a> (size_t <a class="el" href="structxint_1_1detail_1_1data__t.html#a5c9382aec147090d7e7e2b5e972402a9">digits</a>, bool copydigits=false)</td></tr>
+<tr><td class="memItemLeft" align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="structxint_1_1detail_1_1data__t.html#a2bb2c79d47f2fda3605f34b80cb58b8b">realloc</a> (size_t newdigits)</td></tr>
+<tr><td class="memItemLeft" align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="structxint_1_1detail_1_1data__t.html#a6d45feedd311e26f7de06597fb0c6b81">skipLeadingZeros</a> ()</td></tr>
+<tr><td class="memItemLeft" align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="structxint_1_1detail_1_1data__t.html#a66862f94545c953f6604b4347205277b">copy</a> (const <a class="el" href="structxint_1_1detail_1_1data__t.html">data_t</a> *c, size_t extraDigits=0)</td></tr>
+<tr><td class="memItemLeft" align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="structxint_1_1detail_1_1data__t.html#a288850fd62ef26302ce4767a45acd968">zero</a> (<a class="el" href="namespacexint_1_1detail.html#a8843fb7e364832d8d5983de28bdbcf34">digit_t</a> *p, size_t count)</td></tr>
+<tr><td class="memItemLeft" align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="structxint_1_1detail_1_1data__t.html#a57fc3966c44d09daeede53899673cde3">quickset</a> (<a class="el" href="namespacexint_1_1detail.html#a8843fb7e364832d8d5983de28bdbcf34">digit_t</a> d1, <a class="el" href="namespacexint_1_1detail.html#a8843fb7e364832d8d5983de28bdbcf34">digit_t</a> d2=0, <a class="el" href="namespacexint_1_1detail.html#a8843fb7e364832d8d5983de28bdbcf34">digit_t</a> d3=0)</td></tr>
+<tr><td class="memItemLeft" align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="structxint_1_1detail_1_1data__t.html#aaf6f202db416ad8fe18ec8a6c8c48904">invert</a> ()</td></tr>
+<tr><td class="memItemLeft" align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="structxint_1_1detail_1_1data__t.html#aa0dd7ef67ccdef3c3139f4afc84219bd">negate</a> ()</td></tr>
+<tr><td class="memItemLeft" align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="structxint_1_1detail_1_1data__t.html#a143e6814a7aa20a0d61ed616b9940b2e">add</a> (const <a class="el" href="structxint_1_1detail_1_1data__t.html">data_t</a> &amp;addend)</td></tr>
+<tr><td class="memItemLeft" align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="structxint_1_1detail_1_1data__t.html#a650d374b8d38b369273830bb9d939da4">subtract</a> (const <a class="el" href="structxint_1_1detail_1_1data__t.html">data_t</a> &amp;subtrahend)</td></tr>
+<tr><td class="memItemLeft" align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="structxint_1_1detail_1_1data__t.html#a72785130c7c6490af874f450cf6e0086">shift_left</a> (size_t byBits)</td></tr>
+<tr><td class="memItemLeft" align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="structxint_1_1detail_1_1data__t.html#a432ace7094bca306dcba254f862e2428">shift_right</a> (size_t byBits)</td></tr>
+<tr><td colspan="2"><h2>Public Attributes</h2></td></tr>
+<tr><td class="memItemLeft" align="right" valign="top">size_t&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="structxint_1_1detail_1_1data__t.html#a599933d272e3592b2d0985ca7f7c72e2">mLength</a></td></tr>
+<tr><td class="memItemLeft" align="right" valign="top">size_t&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="structxint_1_1detail_1_1data__t.html#a3390530db8333b535f65d3cc01ff5236">mAllocated</a></td></tr>
+<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="namespacexint_1_1detail.html#a8843fb7e364832d8d5983de28bdbcf34">digit_t</a> *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="structxint_1_1detail_1_1data__t.html#a5c9382aec147090d7e7e2b5e972402a9">digits</a></td></tr>
+<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="namespacexint_1_1detail.html#a8843fb7e364832d8d5983de28bdbcf34">digit_t</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="structxint_1_1detail_1_1data__t.html#a022f882ed0818612861b1a67881ae131">mQuickDigits</a> [<a class="el" href="structxint_1_1detail_1_1data__t_1_1_quick_digits.html#ac691b42c4404e59ae07f89146e722736">QuickDigits::count</a>]</td></tr>
+<tr><td class="memItemLeft" align="right" valign="top">std::vector&lt; <a class="el" href="namespacexint_1_1detail.html#a8843fb7e364832d8d5983de28bdbcf34">digit_t</a> &gt;&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="structxint_1_1detail_1_1data__t.html#a96c33fdc37dd3c774256f7ed20ce735c">mStorage</a></td></tr>
+<tr><td class="memItemLeft" align="right" valign="top">int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="structxint_1_1detail_1_1data__t.html#a73bc854b5f9ced6576b97d2cff8f3a5d">mCopies</a></td></tr>
+<tr><td class="memItemLeft" align="right" valign="top">bool&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="structxint_1_1detail_1_1data__t.html#afb2d8673fc5d99d2ea006cd0aa32b744">mIsNegative</a></td></tr>
+</table>
+<hr/><a name="_details"></a><h2>Detailed Description</h2>
+<p>Holds the internal details of an <a class="el" href="classxint_1_1integer.html" title="The extended integer class.">xint::integer</a>. </p>
+<p>The data for an <a class="el" href="classxint_1_1integer.html" title="The extended integer class.">integer</a> is stored in a separate struct so it can be shared between different copies of an identical number. </p>
+
+<p>Definition at line <a class="el" href="xint__data__t_8hpp_source.html#l00036">36</a> of file <a class="el" href="xint__data__t_8hpp_source.html">xint_data_t.hpp</a>.</p>
+<hr/><h2>Constructor &amp; Destructor Documentation</h2>
+<a class="anchor" id="a9309667d3ac573346294e7b6e18c67ff"></a><!-- doxytag: member="xint::detail::data_t::data_t" ref="a9309667d3ac573346294e7b6e18c67ff" args="(digit_t initial1=0, digit_t initial2=0, digit_t initial3=0)" -->
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname">xint::detail::data_t::data_t </td>
+ <td>(</td>
+ <td class="paramtype"><a class="el" href="namespacexint_1_1detail.html#a8843fb7e364832d8d5983de28bdbcf34">digit_t</a>&nbsp;</td>
+ <td class="paramname"> <em>initial1</em> = <code>0</code>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype"><a class="el" href="namespacexint_1_1detail.html#a8843fb7e364832d8d5983de28bdbcf34">digit_t</a>&nbsp;</td>
+ <td class="paramname"> <em>initial2</em> = <code>0</code>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype"><a class="el" href="namespacexint_1_1detail.html#a8843fb7e364832d8d5983de28bdbcf34">digit_t</a>&nbsp;</td>
+ <td class="paramname"> <em>initial3</em> = <code>0</code></td><td>&nbsp;</td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>)</td>
+ <td></td><td></td><td></td>
+ </tr>
+ </table>
+</div>
+<div class="memdoc">
+
+<p>Definition at line <a class="el" href="data__t_8cpp_source.html#l00026">26</a> of file <a class="el" href="data__t_8cpp_source.html">data_t.cpp</a>.</p>
+
+</div>
+</div>
+<a class="anchor" id="ae5afaa677468a9624ed3fb04318fd2a3"></a><!-- doxytag: member="xint::detail::data_t::data_t" ref="ae5afaa677468a9624ed3fb04318fd2a3" args="(data_t *c)" -->
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname">xint::detail::data_t::data_t </td>
+ <td>(</td>
+ <td class="paramtype"><a class="el" href="structxint_1_1detail_1_1data__t.html">data_t</a> *&nbsp;</td>
+ <td class="paramname"> <em>c</em></td>
+ <td>&nbsp;)&nbsp;</td>
+ <td></td>
+ </tr>
+ </table>
+</div>
+<div class="memdoc">
+<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="data__t_8cpp_source.html#l00038">38</a> of file <a class="el" href="data__t_8cpp_source.html">data_t.cpp</a>.</p>
+
+</div>
+</div>
+<hr/><h2>Member Function Documentation</h2>
+<a class="anchor" id="a143e6814a7aa20a0d61ed616b9940b2e"></a><!-- doxytag: member="xint::detail::data_t::add" ref="a143e6814a7aa20a0d61ed616b9940b2e" args="(const data_t &amp;addend)" -->
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname">void xint::detail::data_t::add </td>
+ <td>(</td>
+ <td class="paramtype">const <a class="el" href="structxint_1_1detail_1_1data__t.html">data_t</a> &amp;&nbsp;</td>
+ <td class="paramname"> <em>addend</em></td>
+ <td>&nbsp;)&nbsp;</td>
+ <td></td>
+ </tr>
+ </table>
+</div>
+<div class="memdoc">
+
+<p>Definition at line <a class="el" href="data__t_8cpp_source.html#l00207">207</a> of file <a class="el" href="data__t_8cpp_source.html">data_t.cpp</a>.</p>
+
+</div>
+</div>
+<a class="anchor" id="a4fe3935e29883193166966c49cd73139"></a><!-- doxytag: member="xint::detail::data_t::alloc" ref="a4fe3935e29883193166966c49cd73139" args="(size_t digits, bool copydigits=false)" -->
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname">void xint::detail::data_t::alloc </td>
+ <td>(</td>
+ <td class="paramtype">size_t&nbsp;</td>
+ <td class="paramname"> <em>digits</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">bool&nbsp;</td>
+ <td class="paramname"> <em>copydigits</em> = <code>false</code></td><td>&nbsp;</td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>)</td>
+ <td></td><td></td><td></td>
+ </tr>
+ </table>
+</div>
+<div class="memdoc">
+
+<p>Definition at line <a class="el" href="data__t_8cpp_source.html#l00094">94</a> of file <a class="el" href="data__t_8cpp_source.html">data_t.cpp</a>.</p>
+
+</div>
+</div>
+<a class="anchor" id="a7230e725461510f321bb1c45251b62f3"></a><!-- doxytag: member="xint::detail::data_t::attach" ref="a7230e725461510f321bb1c45251b62f3" args="()" -->
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname">void xint::detail::data_t::attach </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="xint__data__t_8hpp_source.html#l00070">70</a> of file <a class="el" href="xint__data__t_8hpp_source.html">xint_data_t.hpp</a>.</p>
+
+</div>
+</div>
+<a class="anchor" id="a66862f94545c953f6604b4347205277b"></a><!-- doxytag: member="xint::detail::data_t::copy" ref="a66862f94545c953f6604b4347205277b" args="(const data_t *c, size_t extraDigits=0)" -->
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname">void xint::detail::data_t::copy </td>
+ <td>(</td>
+ <td class="paramtype">const <a class="el" href="structxint_1_1detail_1_1data__t.html">data_t</a> *&nbsp;</td>
+ <td class="paramname"> <em>c</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">size_t&nbsp;</td>
+ <td class="paramname"> <em>extraDigits</em> = <code>0</code></td><td>&nbsp;</td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>)</td>
+ <td></td><td></td><td></td>
+ </tr>
+ </table>
+</div>
+<div class="memdoc">
+
+<p>Definition at line <a class="el" href="data__t_8cpp_source.html#l00162">162</a> of file <a class="el" href="data__t_8cpp_source.html">data_t.cpp</a>.</p>
+
+</div>
+</div>
+<a class="anchor" id="afd5505e388c5bf8c9cf069df81a91818"></a><!-- doxytag: member="xint::detail::data_t::detach" ref="afd5505e388c5bf8c9cf069df81a91818" args="()" -->
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname">bool xint::detail::data_t::detach </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="xint__data__t_8hpp_source.html#l00071">71</a> of file <a class="el" href="xint__data__t_8hpp_source.html">xint_data_t.hpp</a>.</p>
+
+</div>
+</div>
+<a class="anchor" id="aaf6f202db416ad8fe18ec8a6c8c48904"></a><!-- doxytag: member="xint::detail::data_t::invert" ref="aaf6f202db416ad8fe18ec8a6c8c48904" args="()" -->
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname">void xint::detail::data_t::invert </td>
+ <td>(</td>
+ <td class="paramname"></td>
+ <td>&nbsp;)&nbsp;</td>
+ <td></td>
+ </tr>
+ </table>
+</div>
+<div class="memdoc">
+
+<p>Definition at line <a class="el" href="data__t_8cpp_source.html#l00179">179</a> of file <a class="el" href="data__t_8cpp_source.html">data_t.cpp</a>.</p>
+
+</div>
+</div>
+<a class="anchor" id="aa0dd7ef67ccdef3c3139f4afc84219bd"></a><!-- doxytag: member="xint::detail::data_t::negate" ref="aa0dd7ef67ccdef3c3139f4afc84219bd" args="()" -->
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname">void xint::detail::data_t::negate </td>
+ <td>(</td>
+ <td class="paramname"></td>
+ <td>&nbsp;)&nbsp;</td>
+ <td></td>
+ </tr>
+ </table>
+</div>
+<div class="memdoc">
+
+<p>Definition at line <a class="el" href="data__t_8cpp_source.html#l00200">200</a> of file <a class="el" href="data__t_8cpp_source.html">data_t.cpp</a>.</p>
+
+</div>
+</div>
+<a class="anchor" id="a57fc3966c44d09daeede53899673cde3"></a><!-- doxytag: member="xint::detail::data_t::quickset" ref="a57fc3966c44d09daeede53899673cde3" args="(digit_t d1, digit_t d2=0, digit_t d3=0)" -->
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname">void xint::detail::data_t::quickset </td>
+ <td>(</td>
+ <td class="paramtype"><a class="el" href="namespacexint_1_1detail.html#a8843fb7e364832d8d5983de28bdbcf34">digit_t</a>&nbsp;</td>
+ <td class="paramname"> <em>d1</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype"><a class="el" href="namespacexint_1_1detail.html#a8843fb7e364832d8d5983de28bdbcf34">digit_t</a>&nbsp;</td>
+ <td class="paramname"> <em>d2</em> = <code>0</code>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype"><a class="el" href="namespacexint_1_1detail.html#a8843fb7e364832d8d5983de28bdbcf34">digit_t</a>&nbsp;</td>
+ <td class="paramname"> <em>d3</em> = <code>0</code></td><td>&nbsp;</td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>)</td>
+ <td></td><td></td><td></td>
+ </tr>
+ </table>
+</div>
+<div class="memdoc">
+
+<p>Definition at line <a class="el" href="data__t_8cpp_source.html#l00083">83</a> of file <a class="el" href="data__t_8cpp_source.html">data_t.cpp</a>.</p>
+
+</div>
+</div>
+<a class="anchor" id="a2bb2c79d47f2fda3605f34b80cb58b8b"></a><!-- doxytag: member="xint::detail::data_t::realloc" ref="a2bb2c79d47f2fda3605f34b80cb58b8b" args="(size_t newdigits)" -->
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname">void xint::detail::data_t::realloc </td>
+ <td>(</td>
+ <td class="paramtype">size_t&nbsp;</td>
+ <td class="paramname"> <em>newdigits</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="xint__data__t_8hpp_source.html#l00073">73</a> of file <a class="el" href="xint__data__t_8hpp_source.html">xint_data_t.hpp</a>.</p>
+
+</div>
+</div>
+<a class="anchor" id="a72785130c7c6490af874f450cf6e0086"></a><!-- doxytag: member="xint::detail::data_t::shift_left" ref="a72785130c7c6490af874f450cf6e0086" args="(size_t byBits)" -->
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname">void xint::detail::data_t::shift_left </td>
+ <td>(</td>
+ <td class="paramtype">size_t&nbsp;</td>
+ <td class="paramname"> <em>byBits</em></td>
+ <td>&nbsp;)&nbsp;</td>
+ <td></td>
+ </tr>
+ </table>
+</div>
+<div class="memdoc">
+
+<p>Definition at line <a class="el" href="data__t_8cpp_source.html#l00261">261</a> of file <a class="el" href="data__t_8cpp_source.html">data_t.cpp</a>.</p>
+
+</div>
+</div>
+<a class="anchor" id="a432ace7094bca306dcba254f862e2428"></a><!-- doxytag: member="xint::detail::data_t::shift_right" ref="a432ace7094bca306dcba254f862e2428" args="(size_t byBits)" -->
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname">void xint::detail::data_t::shift_right </td>
+ <td>(</td>
+ <td class="paramtype">size_t&nbsp;</td>
+ <td class="paramname"> <em>byBits</em></td>
+ <td>&nbsp;)&nbsp;</td>
+ <td></td>
+ </tr>
+ </table>
+</div>
+<div class="memdoc">
+
+<p>Definition at line <a class="el" href="data__t_8cpp_source.html#l00289">289</a> of file <a class="el" href="data__t_8cpp_source.html">data_t.cpp</a>.</p>
+
+</div>
+</div>
+<a class="anchor" id="a6d45feedd311e26f7de06597fb0c6b81"></a><!-- doxytag: member="xint::detail::data_t::skipLeadingZeros" ref="a6d45feedd311e26f7de06597fb0c6b81" args="()" -->
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname">void xint::detail::data_t::skipLeadingZeros </td>
+ <td>(</td>
+ <td class="paramname"></td>
+ <td>&nbsp;)&nbsp;</td>
+ <td></td>
+ </tr>
+ </table>
+</div>
+<div class="memdoc">
+<p>Call this after every manipulation of a <a class="el" href="structxint_1_1detail_1_1data__t.html" title="Holds the internal details of an xint::integer.">data_t</a> object that could possibly leave leading zeros in the <a class="el" href="classxint_1_1integer.html" title="The extended integer class.">integer</a>. </p>
+
+<p>Definition at line <a class="el" href="data__t_8cpp_source.html#l00076">76</a> of file <a class="el" href="data__t_8cpp_source.html">data_t.cpp</a>.</p>
+
+</div>
+</div>
+<a class="anchor" id="a650d374b8d38b369273830bb9d939da4"></a><!-- doxytag: member="xint::detail::data_t::subtract" ref="a650d374b8d38b369273830bb9d939da4" args="(const data_t &amp;subtrahend)" -->
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname">void xint::detail::data_t::subtract </td>
+ <td>(</td>
+ <td class="paramtype">const <a class="el" href="structxint_1_1detail_1_1data__t.html">data_t</a> &amp;&nbsp;</td>
+ <td class="paramname"> <em>subtrahend</em></td>
+ <td>&nbsp;)&nbsp;</td>
+ <td></td>
+ </tr>
+ </table>
+</div>
+<div class="memdoc">
+
+<p>Definition at line <a class="el" href="data__t_8cpp_source.html#l00234">234</a> of file <a class="el" href="data__t_8cpp_source.html">data_t.cpp</a>.</p>
+
+</div>
+</div>
+<a class="anchor" id="a288850fd62ef26302ce4767a45acd968"></a><!-- doxytag: member="xint::detail::data_t::zero" ref="a288850fd62ef26302ce4767a45acd968" args="(digit_t *p, size_t count)" -->
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname">void xint::detail::data_t::zero </td>
+ <td>(</td>
+ <td class="paramtype"><a class="el" href="namespacexint_1_1detail.html#a8843fb7e364832d8d5983de28bdbcf34">digit_t</a> *&nbsp;</td>
+ <td class="paramname"> <em>p</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">size_t&nbsp;</td>
+ <td class="paramname"> <em>count</em></td><td>&nbsp;</td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>)</td>
+ <td></td><td></td><td></td>
+ </tr>
+ </table>
+</div>
+<div class="memdoc">
+
+<p>Definition at line <a class="el" href="data__t_8cpp_source.html#l00174">174</a> of file <a class="el" href="data__t_8cpp_source.html">data_t.cpp</a>.</p>
+
+</div>
+</div>
+<hr/><h2>Member Data Documentation</h2>
+<a class="anchor" id="a5c9382aec147090d7e7e2b5e972402a9"></a><!-- doxytag: member="xint::detail::data_t::digits" ref="a5c9382aec147090d7e7e2b5e972402a9" args="" -->
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname"><a class="el" href="namespacexint_1_1detail.html#a8843fb7e364832d8d5983de28bdbcf34">digit_t</a>* <a class="el" href="structxint_1_1detail_1_1data__t.html#a5c9382aec147090d7e7e2b5e972402a9">xint::detail::data_t::digits</a></td>
+ </tr>
+ </table>
+</div>
+<div class="memdoc">
+<dl class="note"><dt><b>Note:</b></dt><dd>The digits are stored lowest-digit-first. </dd></dl>
+
+<p>Definition at line <a class="el" href="xint__data__t_8hpp_source.html#l00052">52</a> of file <a class="el" href="xint__data__t_8hpp_source.html">xint_data_t.hpp</a>.</p>
+
+</div>
+</div>
+<a class="anchor" id="a3390530db8333b535f65d3cc01ff5236"></a><!-- doxytag: member="xint::detail::data_t::mAllocated" ref="a3390530db8333b535f65d3cc01ff5236" args="" -->
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname">size_t <a class="el" href="structxint_1_1detail_1_1data__t.html#a3390530db8333b535f65d3cc01ff5236">xint::detail::data_t::mAllocated</a></td>
+ </tr>
+ </table>
+</div>
+<div class="memdoc">
+
+<p>Definition at line <a class="el" href="xint__data__t_8hpp_source.html#l00051">51</a> of file <a class="el" href="xint__data__t_8hpp_source.html">xint_data_t.hpp</a>.</p>
+
+</div>
+</div>
+<a class="anchor" id="a73bc854b5f9ced6576b97d2cff8f3a5d"></a><!-- doxytag: member="xint::detail::data_t::mCopies" ref="a73bc854b5f9ced6576b97d2cff8f3a5d" args="" -->
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname">int <a class="el" href="structxint_1_1detail_1_1data__t.html#a73bc854b5f9ced6576b97d2cff8f3a5d">xint::detail::data_t::mCopies</a></td>
+ </tr>
+ </table>
+</div>
+<div class="memdoc">
+
+<p>Definition at line <a class="el" href="xint__data__t_8hpp_source.html#l00059">59</a> of file <a class="el" href="xint__data__t_8hpp_source.html">xint_data_t.hpp</a>.</p>
+
+</div>
+</div>
+<a class="anchor" id="afb2d8673fc5d99d2ea006cd0aa32b744"></a><!-- doxytag: member="xint::detail::data_t::mIsNegative" ref="afb2d8673fc5d99d2ea006cd0aa32b744" args="" -->
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname">bool <a class="el" href="structxint_1_1detail_1_1data__t.html#afb2d8673fc5d99d2ea006cd0aa32b744">xint::detail::data_t::mIsNegative</a></td>
+ </tr>
+ </table>
+</div>
+<div class="memdoc">
+
+<p>Definition at line <a class="el" href="xint__data__t_8hpp_source.html#l00060">60</a> of file <a class="el" href="xint__data__t_8hpp_source.html">xint_data_t.hpp</a>.</p>
+
+</div>
+</div>
+<a class="anchor" id="a599933d272e3592b2d0985ca7f7c72e2"></a><!-- doxytag: member="xint::detail::data_t::mLength" ref="a599933d272e3592b2d0985ca7f7c72e2" args="" -->
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname">size_t <a class="el" href="structxint_1_1detail_1_1data__t.html#a599933d272e3592b2d0985ca7f7c72e2">xint::detail::data_t::mLength</a></td>
+ </tr>
+ </table>
+</div>
+<div class="memdoc">
+
+<p>Definition at line <a class="el" href="xint__data__t_8hpp_source.html#l00051">51</a> of file <a class="el" href="xint__data__t_8hpp_source.html">xint_data_t.hpp</a>.</p>
+
+</div>
+</div>
+<a class="anchor" id="a022f882ed0818612861b1a67881ae131"></a><!-- doxytag: member="xint::detail::data_t::mQuickDigits" ref="a022f882ed0818612861b1a67881ae131" args="[QuickDigits::count]" -->
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname"><a class="el" href="namespacexint_1_1detail.html#a8843fb7e364832d8d5983de28bdbcf34">digit_t</a> <a class="el" href="structxint_1_1detail_1_1data__t.html#a022f882ed0818612861b1a67881ae131">xint::detail::data_t::mQuickDigits</a>[<a class="el" href="structxint_1_1detail_1_1data__t_1_1_quick_digits.html#ac691b42c4404e59ae07f89146e722736">QuickDigits::count</a>]</td>
+ </tr>
+ </table>
+</div>
+<div class="memdoc">
+
+<p>Definition at line <a class="el" href="xint__data__t_8hpp_source.html#l00053">53</a> of file <a class="el" href="xint__data__t_8hpp_source.html">xint_data_t.hpp</a>.</p>
+
+</div>
+</div>
+<a class="anchor" id="a96c33fdc37dd3c774256f7ed20ce735c"></a><!-- doxytag: member="xint::detail::data_t::mStorage" ref="a96c33fdc37dd3c774256f7ed20ce735c" args="" -->
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname">std::vector&lt;<a class="el" href="namespacexint_1_1detail.html#a8843fb7e364832d8d5983de28bdbcf34">digit_t</a>&gt; <a class="el" href="structxint_1_1detail_1_1data__t.html#a96c33fdc37dd3c774256f7ed20ce735c">xint::detail::data_t::mStorage</a></td>
+ </tr>
+ </table>
+</div>
+<div class="memdoc">
+
+<p>Definition at line <a class="el" href="xint__data__t_8hpp_source.html#l00056">56</a> of file <a class="el" href="xint__data__t_8hpp_source.html">xint_data_t.hpp</a>.</p>
+
+</div>
+</div>
+<hr/>The documentation for this struct was generated from the following files:<ul>
+<li><a class="el" href="xint__data__t_8hpp_source.html">xint_data_t.hpp</a></li>
+<li><a class="el" href="data__t_8cpp_source.html">data_t.cpp</a></li>
+</ul>
+</div>
+<hr size="1"/><address style="text-align: right;"><small>Generated on Tue Apr 6 01:22:08 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.1 </small></address>
+</body>
+</html>

Added: sandbox/xint/doc/structxint_1_1detail_1_1data__t_1_1_quick_digits-members.html
==============================================================================
--- (empty file)
+++ sandbox/xint/doc/structxint_1_1detail_1_1data__t_1_1_quick_digits-members.html 2010-04-06 01:40:33 EDT (Tue, 06 Apr 2010)
@@ -0,0 +1,40 @@
+<!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.1 -->
+<div class="navigation" id="top">
+ <div class="tabs">
+ <ul>
+ <li>Main Page</li>
+ <li>Related Pages</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>xint::detail::data_t::QuickDigits Member List</h1>This is the complete list of members for <a class="el" href="structxint_1_1detail_1_1data__t_1_1_quick_digits.html">xint::detail::data_t::QuickDigits</a>, including all inherited members.<table>
+ <tr class="memlist"><td><a class="el" href="structxint_1_1detail_1_1data__t_1_1_quick_digits.html#ac691b42c4404e59ae07f89146e722736">count</a></td><td><a class="el" href="structxint_1_1detail_1_1data__t_1_1_quick_digits.html">xint::detail::data_t::QuickDigits</a></td><td><code> [static]</code></td></tr>
+ <tr class="memlist"><td><a class="el" href="structxint_1_1detail_1_1data__t_1_1_quick_digits.html#af5323a8fbfdfaa3cae371872ec865fc5">intbits</a></td><td><a class="el" href="structxint_1_1detail_1_1data__t_1_1_quick_digits.html">xint::detail::data_t::QuickDigits</a></td><td><code> [static]</code></td></tr>
+ <tr class="memlist"><td><a class="el" href="structxint_1_1detail_1_1data__t_1_1_quick_digits.html#aeb7c43d282f871305e76936664cee25f">minimum</a></td><td><a class="el" href="structxint_1_1detail_1_1data__t_1_1_quick_digits.html">xint::detail::data_t::QuickDigits</a></td><td><code> [static]</code></td></tr>
+ <tr class="memlist"><td><a class="el" href="structxint_1_1detail_1_1data__t_1_1_quick_digits.html#a789eadb40cb8c034823ecb5fb6094092">suggested</a></td><td><a class="el" href="structxint_1_1detail_1_1data__t_1_1_quick_digits.html">xint::detail::data_t::QuickDigits</a></td><td><code> [static]</code></td></tr>
+</table></div>
+<hr size="1"/><address style="text-align: right;"><small>Generated on Tue Apr 6 01:22:08 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.1 </small></address>
+</body>
+</html>

Added: sandbox/xint/doc/structxint_1_1detail_1_1data__t_1_1_quick_digits.html
==============================================================================
--- (empty file)
+++ sandbox/xint/doc/structxint_1_1detail_1_1data__t_1_1_quick_digits.html 2010-04-06 01:40:33 EDT (Tue, 06 Apr 2010)
@@ -0,0 +1,126 @@
+<!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: xint::detail::data_t::QuickDigits Struct 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.1 -->
+<div class="navigation" id="top">
+ <div class="tabs">
+ <ul>
+ <li>Main Page</li>
+ <li>Related Pages</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="namespacexint.html">xint</a>::<a class="el" href="namespacexint_1_1detail.html">detail</a>::<a class="el" href="structxint_1_1detail_1_1data__t.html">data_t</a>::<a class="el" href="structxint_1_1detail_1_1data__t_1_1_quick_digits.html">QuickDigits</a>
+ </div>
+</div>
+<div class="contents">
+<h1>xint::detail::data_t::QuickDigits Struct Reference</h1><!-- doxytag: class="xint::detail::data_t::QuickDigits" -->
+<p>Holds information determining how many quick-digits to use.
+More...</p>
+
+<p><code>#include &lt;<a class="el" href="xint__data__t_8hpp_source.html">xint_data_t.hpp</a>&gt;</code></p>
+
+<p>List of all members.</p>
+<table border="0" cellpadding="0" cellspacing="0">
+<tr><td colspan="2"><h2>Static Public Attributes</h2></td></tr>
+<tr><td class="memItemLeft" align="right" valign="top">static const size_t&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="structxint_1_1detail_1_1data__t_1_1_quick_digits.html#af5323a8fbfdfaa3cae371872ec865fc5">intbits</a> = std::numeric_limits&lt;unsigned int&gt;::<a class="el" href="structxint_1_1detail_1_1data__t.html#a5c9382aec147090d7e7e2b5e972402a9">digits</a></td></tr>
+<tr><td class="memItemLeft" align="right" valign="top">static const size_t&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="structxint_1_1detail_1_1data__t_1_1_quick_digits.html#a789eadb40cb8c034823ecb5fb6094092">suggested</a> = (2*<a class="el" href="structxint_1_1detail_1_1data__t_1_1_quick_digits.html#af5323a8fbfdfaa3cae371872ec865fc5">intbits</a>/<a class="el" href="namespacexint_1_1detail.html#a9bd9e8d55061238d63913020d2721518">bits_per_digit</a>)</td></tr>
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">We want at least enough <a class="el" href="structxint_1_1detail_1_1data__t_1_1_quick_digits.html" title="Holds information determining how many quick-digits to use.">QuickDigits</a> to hold two standard int types. <br/></td></tr>
+<tr><td class="memItemLeft" align="right" valign="top">static const size_t&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="structxint_1_1detail_1_1data__t_1_1_quick_digits.html#aeb7c43d282f871305e76936664cee25f">minimum</a> = 3</td></tr>
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">The library's code is written to depend on this value, don't change it. <br/></td></tr>
+<tr><td class="memItemLeft" align="right" valign="top">static const size_t&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="structxint_1_1detail_1_1data__t_1_1_quick_digits.html#ac691b42c4404e59ae07f89146e722736">count</a> = (<a class="el" href="structxint_1_1detail_1_1data__t_1_1_quick_digits.html#a789eadb40cb8c034823ecb5fb6094092">suggested</a> &lt; <a class="el" href="structxint_1_1detail_1_1data__t_1_1_quick_digits.html#aeb7c43d282f871305e76936664cee25f">minimum</a> ? <a class="el" href="structxint_1_1detail_1_1data__t_1_1_quick_digits.html#aeb7c43d282f871305e76936664cee25f">minimum</a> : <a class="el" href="structxint_1_1detail_1_1data__t_1_1_quick_digits.html#a789eadb40cb8c034823ecb5fb6094092">suggested</a>)</td></tr>
+</table>
+<hr/><a name="_details"></a><h2>Detailed Description</h2>
+<p>Holds information determining how many quick-digits to use. </p>
+<p>Smaller numbers are represented in a small array of digits that are part of the <a class="el" href="structxint_1_1detail_1_1data__t.html#a9309667d3ac573346294e7b6e18c67ff">data_t</a> structure itself, so that no additional memory allocation is needed for them. The contents of this structure determine how many of them the library uses. </p>
+
+<p>Definition at line <a class="el" href="xint__data__t_8hpp_source.html#l00044">44</a> of file <a class="el" href="xint__data__t_8hpp_source.html">xint_data_t.hpp</a>.</p>
+<hr/><h2>Member Data Documentation</h2>
+<a class="anchor" id="ac691b42c4404e59ae07f89146e722736"></a><!-- doxytag: member="xint::detail::data_t::QuickDigits::count" ref="ac691b42c4404e59ae07f89146e722736" args="" -->
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname">const size_t <a class="el" href="structxint_1_1detail_1_1data__t_1_1_quick_digits.html#ac691b42c4404e59ae07f89146e722736">xint::detail::data_t::QuickDigits::count</a> = (<a class="el" href="structxint_1_1detail_1_1data__t_1_1_quick_digits.html#a789eadb40cb8c034823ecb5fb6094092">suggested</a> &lt; <a class="el" href="structxint_1_1detail_1_1data__t_1_1_quick_digits.html#aeb7c43d282f871305e76936664cee25f">minimum</a> ? <a class="el" href="structxint_1_1detail_1_1data__t_1_1_quick_digits.html#aeb7c43d282f871305e76936664cee25f">minimum</a> : <a class="el" href="structxint_1_1detail_1_1data__t_1_1_quick_digits.html#a789eadb40cb8c034823ecb5fb6094092">suggested</a>)<code> [static]</code></td>
+ </tr>
+ </table>
+</div>
+<div class="memdoc">
+
+<p>Definition at line <a class="el" href="xint__data__t_8hpp_source.html#l00048">48</a> of file <a class="el" href="xint__data__t_8hpp_source.html">xint_data_t.hpp</a>.</p>
+
+</div>
+</div>
+<a class="anchor" id="af5323a8fbfdfaa3cae371872ec865fc5"></a><!-- doxytag: member="xint::detail::data_t::QuickDigits::intbits" ref="af5323a8fbfdfaa3cae371872ec865fc5" args="" -->
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname">const size_t <a class="el" href="structxint_1_1detail_1_1data__t_1_1_quick_digits.html#af5323a8fbfdfaa3cae371872ec865fc5">xint::detail::data_t::QuickDigits::intbits</a> = std::numeric_limits&lt;unsigned int&gt;::<a class="el" href="structxint_1_1detail_1_1data__t.html#a5c9382aec147090d7e7e2b5e972402a9">digits</a><code> [static]</code></td>
+ </tr>
+ </table>
+</div>
+<div class="memdoc">
+
+<p>Definition at line <a class="el" href="xint__data__t_8hpp_source.html#l00045">45</a> of file <a class="el" href="xint__data__t_8hpp_source.html">xint_data_t.hpp</a>.</p>
+
+</div>
+</div>
+<a class="anchor" id="aeb7c43d282f871305e76936664cee25f"></a><!-- doxytag: member="xint::detail::data_t::QuickDigits::minimum" ref="aeb7c43d282f871305e76936664cee25f" args="" -->
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname">const size_t <a class="el" href="structxint_1_1detail_1_1data__t_1_1_quick_digits.html#aeb7c43d282f871305e76936664cee25f">xint::detail::data_t::QuickDigits::minimum</a> = 3<code> [static]</code></td>
+ </tr>
+ </table>
+</div>
+<div class="memdoc">
+
+<p>The library's code is written to depend on this value, don't change it. </p>
+
+<p>Definition at line <a class="el" href="xint__data__t_8hpp_source.html#l00047">47</a> of file <a class="el" href="xint__data__t_8hpp_source.html">xint_data_t.hpp</a>.</p>
+
+</div>
+</div>
+<a class="anchor" id="a789eadb40cb8c034823ecb5fb6094092"></a><!-- doxytag: member="xint::detail::data_t::QuickDigits::suggested" ref="a789eadb40cb8c034823ecb5fb6094092" args="" -->
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname">const size_t <a class="el" href="structxint_1_1detail_1_1data__t_1_1_quick_digits.html#a789eadb40cb8c034823ecb5fb6094092">xint::detail::data_t::QuickDigits::suggested</a> = (2*<a class="el" href="structxint_1_1detail_1_1data__t_1_1_quick_digits.html#af5323a8fbfdfaa3cae371872ec865fc5">intbits</a>/<a class="el" href="namespacexint_1_1detail.html#a9bd9e8d55061238d63913020d2721518">bits_per_digit</a>)<code> [static]</code></td>
+ </tr>
+ </table>
+</div>
+<div class="memdoc">
+
+<p>We want at least enough <a class="el" href="structxint_1_1detail_1_1data__t_1_1_quick_digits.html" title="Holds information determining how many quick-digits to use.">QuickDigits</a> to hold two standard int types. </p>
+
+<p>Definition at line <a class="el" href="xint__data__t_8hpp_source.html#l00046">46</a> of file <a class="el" href="xint__data__t_8hpp_source.html">xint_data_t.hpp</a>.</p>
+
+</div>
+</div>
+<hr/>The documentation for this struct was generated from the following file:<ul>
+<li><a class="el" href="xint__data__t_8hpp_source.html">xint_data_t.hpp</a></li>
+</ul>
+</div>
+<hr size="1"/><address style="text-align: right;"><small>Generated on Tue Apr 6 01:22:08 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.1 </small></address>
+</body>
+</html>

Added: sandbox/xint/doc/structxint_1_1detail_1_1random__generator-members.html
==============================================================================
--- (empty file)
+++ sandbox/xint/doc/structxint_1_1detail_1_1random__generator-members.html 2010-04-06 01:40:33 EDT (Tue, 06 Apr 2010)
@@ -0,0 +1,43 @@
+<!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.1 -->
+<div class="navigation" id="top">
+ <div class="tabs">
+ <ul>
+ <li>Main Page</li>
+ <li>Related Pages</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>xint::detail::random_generator&lt; T &gt; Member List</h1>This is the complete list of members for <a class="el" href="structxint_1_1detail_1_1random__generator.html">xint::detail::random_generator&lt; T &gt;</a>, including all inherited members.<table>
+ <tr class="memlist"><td><a class="el" href="structxint_1_1detail_1_1random__generator.html#aab9830c38c791b5c3ac0ef8328573bfd">dist_t</a> typedef</td><td><a class="el" href="structxint_1_1detail_1_1random__generator.html">xint::detail::random_generator&lt; T &gt;</a></td><td></td></tr>
+ <tr class="memlist"><td><a class="el" href="structxint_1_1detail_1_1random__generator.html#a9a90a3050b2ff83d78ef8633deb5d42d">gen</a></td><td><a class="el" href="structxint_1_1detail_1_1random__generator.html">xint::detail::random_generator&lt; T &gt;</a></td><td></td></tr>
+ <tr class="memlist"><td><a class="el" href="structxint_1_1detail_1_1random__generator.html#adbc88a70815fa4f72deb9bddaec86675">gen_t</a> typedef</td><td><a class="el" href="structxint_1_1detail_1_1random__generator.html">xint::detail::random_generator&lt; T &gt;</a></td><td></td></tr>
+ <tr class="memlist"><td><a class="el" href="structxint_1_1detail_1_1random__generator.html#a68bbea81955a1424f474b49040bcb007">genobj</a></td><td><a class="el" href="structxint_1_1detail_1_1random__generator.html">xint::detail::random_generator&lt; T &gt;</a></td><td></td></tr>
+ <tr class="memlist"><td><a class="el" href="structxint_1_1detail_1_1random__generator.html#ade9cefb3f061112ba1d3144aefd24f28">operator()</a>()</td><td><a class="el" href="structxint_1_1detail_1_1random__generator.html">xint::detail::random_generator&lt; T &gt;</a></td><td><code> [inline, virtual]</code></td></tr>
+ <tr class="memlist"><td><a class="el" href="structxint_1_1detail_1_1random__generator.html#a76ce5051cedd7e6e25dc46ac1fb90098">random_generator</a>(T *g)</td><td><a class="el" href="structxint_1_1detail_1_1random__generator.html">xint::detail::random_generator&lt; T &gt;</a></td><td><code> [inline]</code></td></tr>
+ <tr class="memlist"><td><a class="el" href="structxint_1_1detail_1_1base__random__generator.html#a0556d7f290cd236303b3f1031611cb3e">result_type</a> typedef</td><td><a class="el" href="structxint_1_1detail_1_1base__random__generator.html">xint::detail::base_random_generator</a></td><td></td></tr>
+</table></div>
+<hr size="1"/><address style="text-align: right;"><small>Generated on Tue Apr 6 01:22:08 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.1 </small></address>
+</body>
+</html>

Added: sandbox/xint/doc/structxint_1_1detail_1_1random__generator.gif
==============================================================================
Binary file. No diff available.

Added: sandbox/xint/doc/structxint_1_1detail_1_1random__generator.html
==============================================================================
--- (empty file)
+++ sandbox/xint/doc/structxint_1_1detail_1_1random__generator.html 2010-04-06 01:40:33 EDT (Tue, 06 Apr 2010)
@@ -0,0 +1,195 @@
+<!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: xint::detail::random_generator&lt; T &gt; Struct 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.1 -->
+<div class="navigation" id="top">
+ <div class="tabs">
+ <ul>
+ <li>Main Page</li>
+ <li>Related Pages</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="namespacexint.html">xint</a>::<a class="el" href="namespacexint_1_1detail.html">detail</a>::<a class="el" href="structxint_1_1detail_1_1random__generator.html">random_generator</a>
+ </div>
+</div>
+<div class="contents">
+<h1>xint::detail::random_generator&lt; T &gt; Struct Template Reference</h1><!-- doxytag: class="xint::detail::random_generator" --><!-- doxytag: inherits="xint::detail::base_random_generator" -->
+<p>Support class for the random generator code.
+More...</p>
+
+<p><code>#include &lt;<a class="el" href="xint_8hpp_source.html">xint.hpp</a>&gt;</code></p>
+<div class="dynheader">
+Inheritance diagram for xint::detail::random_generator&lt; T &gt;:</div>
+<div class="dynsection">
+ <div class="center">
+ <img src="structxint_1_1detail_1_1random__generator.gif" usemap="#xint::detail::random_generator&lt; T &gt;_map" alt=""/>
+ <map id="xint::detail::random_generator&lt; T &gt;_map" name="xint::detail::random_generator&lt; T &gt;_map">
+<area href="structxint_1_1detail_1_1base__random__generator.html" alt="xint::detail::base_random_generator" shape="rect" coords="0,0,211,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 boost::uniform_int<br class="typebreak"/>
+&lt; <a class="el" href="structxint_1_1detail_1_1base__random__generator.html#a0556d7f290cd236303b3f1031611cb3e">result_type</a> &gt;&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="structxint_1_1detail_1_1random__generator.html#aab9830c38c791b5c3ac0ef8328573bfd">dist_t</a></td></tr>
+<tr><td class="memItemLeft" align="right" valign="top">typedef <br class="typebreak"/>
+boost::variate_generator&lt; T <br class="typebreak"/>
+&amp;, <a class="el" href="structxint_1_1detail_1_1random__generator.html#aab9830c38c791b5c3ac0ef8328573bfd">dist_t</a> &gt;&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="structxint_1_1detail_1_1random__generator.html#adbc88a70815fa4f72deb9bddaec86675">gen_t</a></td></tr>
+<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="structxint_1_1detail_1_1random__generator.html#a76ce5051cedd7e6e25dc46ac1fb90098">random_generator</a> (T *g)</td></tr>
+<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="structxint_1_1detail_1_1base__random__generator.html#a0556d7f290cd236303b3f1031611cb3e">result_type</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="structxint_1_1detail_1_1random__generator.html#ade9cefb3f061112ba1d3144aefd24f28">operator()</a> ()</td></tr>
+<tr><td colspan="2"><h2>Public Attributes</h2></td></tr>
+<tr><td class="memItemLeft" align="right" valign="top">std::auto_ptr&lt; T &gt;&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="structxint_1_1detail_1_1random__generator.html#a68bbea81955a1424f474b49040bcb007">genobj</a></td></tr>
+<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="structxint_1_1detail_1_1random__generator.html#adbc88a70815fa4f72deb9bddaec86675">gen_t</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="structxint_1_1detail_1_1random__generator.html#a9a90a3050b2ff83d78ef8633deb5d42d">gen</a></td></tr>
+</table>
+<hr/><a name="_details"></a><h2>Detailed Description</h2>
+<h3>template&lt;class T&gt;<br/>
+ struct xint::detail::random_generator&lt; T &gt;</h3>
+
+<p>Support class for the random generator code. </p>
+
+<p>Definition at line <a class="el" href="xint_8hpp_source.html#l00086">86</a> of file <a class="el" href="xint_8hpp_source.html">xint.hpp</a>.</p>
+<hr/><h2>Member Typedef Documentation</h2>
+<a class="anchor" id="aab9830c38c791b5c3ac0ef8328573bfd"></a><!-- doxytag: member="xint::detail::random_generator::dist_t" ref="aab9830c38c791b5c3ac0ef8328573bfd" args="" -->
+<div class="memitem">
+<div class="memproto">
+<div class="memtemplate">
+template&lt;class T&gt; </div>
+ <table class="memname">
+ <tr>
+ <td class="memname">typedef boost::uniform_int&lt;<a class="el" href="structxint_1_1detail_1_1base__random__generator.html#a0556d7f290cd236303b3f1031611cb3e">result_type</a>&gt; <a class="el" href="structxint_1_1detail_1_1random__generator.html">xint::detail::random_generator</a>&lt; T &gt;::<a class="el" href="structxint_1_1detail_1_1random__generator.html#aab9830c38c791b5c3ac0ef8328573bfd">dist_t</a></td>
+ </tr>
+ </table>
+</div>
+<div class="memdoc">
+
+<p>Definition at line <a class="el" href="xint_8hpp_source.html#l00087">87</a> of file <a class="el" href="xint_8hpp_source.html">xint.hpp</a>.</p>
+
+</div>
+</div>
+<a class="anchor" id="adbc88a70815fa4f72deb9bddaec86675"></a><!-- doxytag: member="xint::detail::random_generator::gen_t" ref="adbc88a70815fa4f72deb9bddaec86675" args="" -->
+<div class="memitem">
+<div class="memproto">
+<div class="memtemplate">
+template&lt;class T&gt; </div>
+ <table class="memname">
+ <tr>
+ <td class="memname">typedef boost::variate_generator&lt;T&amp;, <a class="el" href="structxint_1_1detail_1_1random__generator.html#aab9830c38c791b5c3ac0ef8328573bfd">dist_t</a>&gt; <a class="el" href="structxint_1_1detail_1_1random__generator.html">xint::detail::random_generator</a>&lt; T &gt;::<a class="el" href="structxint_1_1detail_1_1random__generator.html#adbc88a70815fa4f72deb9bddaec86675">gen_t</a></td>
+ </tr>
+ </table>
+</div>
+<div class="memdoc">
+
+<p>Definition at line <a class="el" href="xint_8hpp_source.html#l00088">88</a> of file <a class="el" href="xint_8hpp_source.html">xint.hpp</a>.</p>
+
+</div>
+</div>
+<hr/><h2>Constructor &amp; Destructor Documentation</h2>
+<a class="anchor" id="a76ce5051cedd7e6e25dc46ac1fb90098"></a><!-- doxytag: member="xint::detail::random_generator::random_generator" ref="a76ce5051cedd7e6e25dc46ac1fb90098" args="(T *g)" -->
+<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="structxint_1_1detail_1_1random__generator.html">xint::detail::random_generator</a>&lt; T &gt;::<a class="el" href="structxint_1_1detail_1_1random__generator.html">random_generator</a> </td>
+ <td>(</td>
+ <td class="paramtype">T *&nbsp;</td>
+ <td class="paramname"> <em>g</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="xint_8hpp_source.html#l00089">89</a> of file <a class="el" href="xint_8hpp_source.html">xint.hpp</a>.</p>
+
+</div>
+</div>
+<hr/><h2>Member Function Documentation</h2>
+<a class="anchor" id="ade9cefb3f061112ba1d3144aefd24f28"></a><!-- doxytag: member="xint::detail::random_generator::operator()" ref="ade9cefb3f061112ba1d3144aefd24f28" 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="structxint_1_1detail_1_1base__random__generator.html#a0556d7f290cd236303b3f1031611cb3e">result_type</a> <a class="el" href="structxint_1_1detail_1_1random__generator.html">xint::detail::random_generator</a>&lt; T &gt;::operator() </td>
+ <td>(</td>
+ <td class="paramname"></td>
+ <td>&nbsp;)&nbsp;</td>
+ <td><code> [inline, virtual]</code></td>
+ </tr>
+ </table>
+</div>
+<div class="memdoc">
+
+<p>Implements <a class="el" href="structxint_1_1detail_1_1base__random__generator.html#aa7f3b20e2fcccbf9d3a5c76e6c89b4b5">xint::detail::base_random_generator</a>.</p>
+
+<p>Definition at line <a class="el" href="xint_8hpp_source.html#l00092">92</a> of file <a class="el" href="xint_8hpp_source.html">xint.hpp</a>.</p>
+
+</div>
+</div>
+<hr/><h2>Member Data Documentation</h2>
+<a class="anchor" id="a9a90a3050b2ff83d78ef8633deb5d42d"></a><!-- doxytag: member="xint::detail::random_generator::gen" ref="a9a90a3050b2ff83d78ef8633deb5d42d" 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="structxint_1_1detail_1_1random__generator.html#adbc88a70815fa4f72deb9bddaec86675">gen_t</a> <a class="el" href="structxint_1_1detail_1_1random__generator.html">xint::detail::random_generator</a>&lt; T &gt;::<a class="el" href="structxint_1_1detail_1_1random__generator.html#a9a90a3050b2ff83d78ef8633deb5d42d">gen</a></td>
+ </tr>
+ </table>
+</div>
+<div class="memdoc">
+
+<p>Definition at line <a class="el" href="xint_8hpp_source.html#l00094">94</a> of file <a class="el" href="xint_8hpp_source.html">xint.hpp</a>.</p>
+
+</div>
+</div>
+<a class="anchor" id="a68bbea81955a1424f474b49040bcb007"></a><!-- doxytag: member="xint::detail::random_generator::genobj" ref="a68bbea81955a1424f474b49040bcb007" args="" -->
+<div class="memitem">
+<div class="memproto">
+<div class="memtemplate">
+template&lt;class T&gt; </div>
+ <table class="memname">
+ <tr>
+ <td class="memname">std::auto_ptr&lt;T&gt; <a class="el" href="structxint_1_1detail_1_1random__generator.html">xint::detail::random_generator</a>&lt; T &gt;::<a class="el" href="structxint_1_1detail_1_1random__generator.html#a68bbea81955a1424f474b49040bcb007">genobj</a></td>
+ </tr>
+ </table>
+</div>
+<div class="memdoc">
+
+<p>Definition at line <a class="el" href="xint_8hpp_source.html#l00093">93</a> of file <a class="el" href="xint_8hpp_source.html">xint.hpp</a>.</p>
+
+</div>
+</div>
+<hr/>The documentation for this struct was generated from the following file:<ul>
+<li><a class="el" href="xint_8hpp_source.html">xint.hpp</a></li>
+</ul>
+</div>
+<hr size="1"/><address style="text-align: right;"><small>Generated on Tue Apr 6 01:22:08 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.1 </small></address>
+</body>
+</html>

Added: sandbox/xint/doc/structxint_1_1detail_1_1token.html
==============================================================================
--- (empty file)
+++ sandbox/xint/doc/structxint_1_1detail_1_1token.html 2010-04-06 01:40:33 EDT (Tue, 06 Apr 2010)
@@ -0,0 +1,51 @@
+<!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: xint::detail::token Struct 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.1 -->
+<div class="navigation" id="top">
+ <div class="tabs">
+ <ul>
+ <li>Main Page</li>
+ <li>Related Pages</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="namespacexint.html">xint</a>::<a class="el" href="namespacexint_1_1detail.html">detail</a>::<a class="el" href="structxint_1_1detail_1_1token.html">token</a>
+ </div>
+</div>
+<div class="contents">
+<h1>xint::detail::token Struct Reference</h1><!-- doxytag: class="xint::detail::token" -->
+<p>An empty struct, used in <a class="el" href="namespacexint.html#ad63045584f06221eb6a7581ad3091582" title="Used for the exception-blocker.">xint::token</a>.
+More...</p>
+
+<p><code>#include &lt;<a class="el" href="xint_8hpp_source.html">xint.hpp</a>&gt;</code></p>
+<table border="0" cellpadding="0" cellspacing="0">
+</table>
+<hr/><a name="_details"></a><h2>Detailed Description</h2>
+<p>An empty struct, used in <a class="el" href="namespacexint.html#ad63045584f06221eb6a7581ad3091582" title="Used for the exception-blocker.">xint::token</a>. </p>
+
+<p>Definition at line <a class="el" href="xint_8hpp_source.html#l00076">76</a> of file <a class="el" href="xint_8hpp_source.html">xint.hpp</a>.</p>
+<hr/>The documentation for this struct was generated from the following file:<ul>
+<li><a class="el" href="xint_8hpp_source.html">xint.hpp</a></li>
+</ul>
+</div>
+<hr size="1"/><address style="text-align: right;"><small>Generated on Tue Apr 6 01:22:08 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.1 </small></address>
+</body>
+</html>

Added: sandbox/xint/doc/tab_b.gif
==============================================================================
Binary file. No diff available.

Added: sandbox/xint/doc/tab_l.gif
==============================================================================
Binary file. No diff available.

Added: sandbox/xint/doc/tab_r.gif
==============================================================================
Binary file. No diff available.

Added: sandbox/xint/doc/tabs.css
==============================================================================
--- (empty file)
+++ sandbox/xint/doc/tabs.css 2010-04-06 01:40:33 EDT (Tue, 06 Apr 2010)
@@ -0,0 +1,105 @@
+/* tabs styles, based on http://www.alistapart.com/articles/slidingdoors */
+
+DIV.tabs
+{
+ float : left;
+ width : 100%;
+ background : url("tab_b.gif") repeat-x bottom;
+ margin-bottom : 4px;
+}
+
+DIV.tabs UL
+{
+ margin : 0px;
+ padding-left : 10px;
+ list-style : none;
+}
+
+DIV.tabs LI, DIV.tabs FORM
+{
+ display : inline;
+ margin : 0px;
+ padding : 0px;
+}
+
+DIV.tabs FORM
+{
+ float : right;
+}
+
+DIV.tabs A
+{
+ float : left;
+ background : url("tab_r.gif") no-repeat right top;
+ border-bottom : 1px solid #84B0C7;
+ font-size : 80%;
+ font-weight : bold;
+ text-decoration : none;
+}
+
+DIV.tabs A:hover
+{
+ background-position: 100% -150px;
+}
+
+DIV.tabs A:link, DIV.tabs A:visited,
+DIV.tabs A:active, DIV.tabs A:hover
+{
+ color: #1A419D;
+}
+
+DIV.tabs SPAN
+{
+ float : left;
+ display : block;
+ background : url("tab_l.gif") no-repeat left top;
+ padding : 5px 9px;
+ white-space : nowrap;
+}
+
+DIV.tabs #MSearchBox
+{
+ float : right;
+ display : inline;
+ font-size : 1em;
+}
+
+DIV.tabs TD
+{
+ font-size : 80%;
+ font-weight : bold;
+ text-decoration : none;
+}
+
+
+
+/* Commented Backslash Hack hides rule from IE5-Mac \*/
+DIV.tabs SPAN {float : none;}
+/* End IE5-Mac hack */
+
+DIV.tabs A:hover SPAN
+{
+ background-position: 0% -150px;
+}
+
+DIV.tabs LI.current A
+{
+ background-position: 100% -150px;
+ border-width : 0px;
+}
+
+DIV.tabs LI.current SPAN
+{
+ background-position: 0% -150px;
+ padding-bottom : 6px;
+}
+
+DIV.navpath
+{
+ background : none;
+ border : none;
+ border-bottom : 1px solid #84B0C7;
+ text-align : center;
+ margin : 2px;
+ padding : 2px;
+}

Added: sandbox/xint/doc/testing.html
==============================================================================
--- (empty file)
+++ sandbox/xint/doc/testing.html 2010-04-06 01:40:33 EDT (Tue, 06 Apr 2010)
@@ -0,0 +1,34 @@
+<!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: The Self-Testing Program</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.1 -->
+<div class="navigation" id="top">
+ <div class="tabs">
+ <ul>
+ <li>Main Page</li>
+ <li class="current">Related Pages</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="testing">The Self-Testing Program </a></h1><p>The library has a self-testing program that you can build and run to confirm that it is working properly. You can find the source code for it in the <code>test</code> subdirectory under the main <code>xint</code> directory. All of the major functions are thoroughly exercised, and many of the minor ones as well.</p>
+<p>The source code for the testing program also demonstrates how to use many of the library's functions. </p>
+</div>
+<hr size="1"/><address style="text-align: right;"><small>Generated on Tue Apr 6 01:22:08 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.1 </small></address>
+</body>
+</html>

Added: sandbox/xint/doc/testing_8dox.html
==============================================================================
--- (empty file)
+++ sandbox/xint/doc/testing_8dox.html 2010-04-06 01:40:33 EDT (Tue, 06 Apr 2010)
@@ -0,0 +1,36 @@
+<!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/testing.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.1 -->
+<div class="navigation" id="top">
+ <div class="tabs">
+ <ul>
+ <li>Main Page</li>
+ <li>Related Pages</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/testing.dox File Reference</h1><table border="0" cellpadding="0" cellspacing="0">
+</table>
+</div>
+<hr size="1"/><address style="text-align: right;"><small>Generated on Tue Apr 6 01:22:08 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.1 </small></address>
+</body>
+</html>

Added: sandbox/xint/doc/threadsafe.html
==============================================================================
--- (empty file)
+++ sandbox/xint/doc/threadsafe.html 2010-04-06 01:40:33 EDT (Tue, 06 Apr 2010)
@@ -0,0 +1,35 @@
+<!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: Thread-Safe Operation</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.1 -->
+<div class="navigation" id="top">
+ <div class="tabs">
+ <ul>
+ <li>Main Page</li>
+ <li class="current">Related Pages</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="threadsafe">Thread-Safe Operation </a></h1><p>This library, by default, can only safely be used in one thread at a time. If you need thread-safe operation, you must compile it with the thread-safe option enabled (see below), and you must ensure that only one thread ever accesses a particular integer at a time. The library cannot automatically provide this protection without an unacceptably severe speed penalty.</p>
+<p>To enable thread-safe operations, define the preprocessor symbol <code>XINT_THREADSAFE</code> when compiling the library. You don't need to define it when using the library, only when compiling it.</p>
+<p>To see whether your copy was compiled with thread-safe operation enabled, use the <a class="el" href="namespacexint.html#ad55aa4d44083238d9ec313511f5b1dfa" title="Tells whether the library was compiled with the Thread Safe Operation option enabled...">xint::opt_thread_safe</a> function. </p>
+</div>
+<hr size="1"/><address style="text-align: right;"><small>Generated on Tue Apr 6 01:22:08 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.1 </small></address>
+</body>
+</html>

Added: sandbox/xint/doc/threadsafe_8dox.html
==============================================================================
--- (empty file)
+++ sandbox/xint/doc/threadsafe_8dox.html 2010-04-06 01:40:33 EDT (Tue, 06 Apr 2010)
@@ -0,0 +1,36 @@
+<!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/threadsafe.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.1 -->
+<div class="navigation" id="top">
+ <div class="tabs">
+ <ul>
+ <li>Main Page</li>
+ <li>Related Pages</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/threadsafe.dox File Reference</h1><table border="0" cellpadding="0" cellspacing="0">
+</table>
+</div>
+<hr size="1"/><address style="text-align: right;"><small>Generated on Tue Apr 6 01:22:08 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.1 </small></address>
+</body>
+</html>

Added: sandbox/xint/doc/todo.html
==============================================================================
--- (empty file)
+++ sandbox/xint/doc/todo.html 2010-04-06 01:40:33 EDT (Tue, 06 Apr 2010)
@@ -0,0 +1,40 @@
+<!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: Todo 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.1 -->
+<div class="navigation" id="top">
+ <div class="tabs">
+ <ul>
+ <li>Main Page</li>
+ <li class="current">Related Pages</li>
+ <li>Namespaces</li>
+ <li>Classes</li>
+ <li>Files</li>
+ </ul>
+ </div>
+</div>
+<div class="contents">
+
+
+<h1><a class="anchor" id="todo">Todo List </a></h1><p><a class="anchor" id="_todo000001"></a> </p>
+<dl>
+<dt>File <a class="el" href="convert_8cpp.html">convert.cpp</a> </dt>
+<dd>the <a class="el" href="namespacexint.html#a016c9573ff48411847edf86c406946a0" title="Creates a string representation of the specified integer.">xint::to_string</a> function could be made more efficient by using only doubledigit_t-sized pieces of the integer at a time, and dividing the whole thing by the total of the divisions done to get the digits. Same with the <a class="el" href="namespacexint.html#ad9dcb2b835be5f8ee918979945911ac0" title="Converts a string into an integer.">xint::from_string</a> function. </dd>
+</dl>
+<p><a class="anchor" id="_todo000002"></a> </p>
+<dl>
+<dt>Member <a class="el" href="namespacexint.html#a0aec423511839fd784b1654389dfcf5b">xint::sqr</a> (const integer &amp;n) </dt>
+<dd>Rewrite this to eliminate the inefficient addOverflow. </dd>
+</dl>
+</div>
+<hr size="1"/><address style="text-align: right;"><small>Generated on Tue Apr 6 01:22:08 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.1 </small></address>
+</body>
+</html>

Added: sandbox/xint/doc/xint_8hpp.html
==============================================================================
--- (empty file)
+++ sandbox/xint/doc/xint_8hpp.html 2010-04-06 01:40:33 EDT (Tue, 06 Apr 2010)
@@ -0,0 +1,276 @@
+<!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: xint.hpp 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.1 -->
+<div class="navigation" id="top">
+ <div class="tabs">
+ <ul>
+ <li>Main Page</li>
+ <li>Related Pages</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>xint.hpp File Reference</h1>
+<p>The main header file for the XInt library.
+More...</p>
+<code>#include &lt;string&gt;</code><br/>
+<code>#include &lt;limits&gt;</code><br/>
+<code>#include &lt;memory&gt;</code><br/>
+<code>#include &lt;cstddef&gt;</code><br/>
+<code>#include &lt;iostream&gt;</code><br/>
+<code>#include &lt;stdexcept&gt;</code><br/>
+<code>#include &lt;boost/integer.hpp&gt;</code><br/>
+<code>#include &lt;boost/cstdint.hpp&gt;</code><br/>
+<code>#include &lt;boost/function.hpp&gt;</code><br/>
+<code>#include &lt;boost/type_traits.hpp&gt;</code><br/>
+<code>#include &lt;boost/static_assert.hpp&gt;</code><br/>
+<code>#include &lt;boost/random/uniform_int.hpp&gt;</code><br/>
+<code>#include &lt;boost/random/variate_generator.hpp&gt;</code><br/>
+
+<p>Go to the source code of this file.</p>
+<table border="0" cellpadding="0" cellspacing="0">
+<tr><td colspan="2"><h2>Classes</h2></td></tr>
+<tr><td class="memItemLeft" align="right" valign="top">struct &nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="structxint_1_1detail_1_1token.html">xint::detail::token</a></td></tr>
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">An empty struct, used in <a class="el" href="namespacexint.html#ad63045584f06221eb6a7581ad3091582" title="Used for the exception-blocker.">xint::token</a>. More...<br/></td></tr>
+<tr><td class="memItemLeft" align="right" valign="top">struct &nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="structxint_1_1detail_1_1base__random__generator.html">xint::detail::base_random_generator</a></td></tr>
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">The base class for <a class="el" href="structxint_1_1detail_1_1random__generator.html" title="Support class for the random generator code.">random_generator</a>. More...<br/></td></tr>
+<tr><td class="memItemLeft" align="right" valign="top">struct &nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="structxint_1_1detail_1_1random__generator.html">xint::detail::random_generator&lt; T &gt;</a></td></tr>
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Support class for the random generator code. More...<br/></td></tr>
+<tr><td class="memItemLeft" align="right" valign="top">class &nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classxint_1_1integer.html">xint::integer</a></td></tr>
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">The extended integer class. More...<br/></td></tr>
+<tr><td class="memItemLeft" align="right" valign="top">class &nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classxint_1_1strong__random__generator.html">xint::strong_random_generator</a></td></tr>
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">A convenience class for cryptographically-secure random numbers. More...<br/></td></tr>
+<tr><td class="memItemLeft" align="right" valign="top">class &nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classxint_1_1invalid__base.html">xint::invalid_base</a></td></tr>
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Exception class. More...<br/></td></tr>
+<tr><td class="memItemLeft" align="right" valign="top">class &nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classxint_1_1invalid__digit.html">xint::invalid_digit</a></td></tr>
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Exception class. More...<br/></td></tr>
+<tr><td class="memItemLeft" align="right" valign="top">class &nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classxint_1_1invalid__modulus.html">xint::invalid_modulus</a></td></tr>
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Exception class. More...<br/></td></tr>
+<tr><td class="memItemLeft" align="right" valign="top">class &nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classxint_1_1divide__by__zero.html">xint::divide_by_zero</a></td></tr>
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Exception class. More...<br/></td></tr>
+<tr><td class="memItemLeft" align="right" valign="top">class &nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classxint_1_1cannot__represent.html">xint::cannot_represent</a></td></tr>
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Exception class. More...<br/></td></tr>
+<tr><td class="memItemLeft" align="right" valign="top">class &nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classxint_1_1too__big.html">xint::too_big</a></td></tr>
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Exception class. More...<br/></td></tr>
+<tr><td class="memItemLeft" align="right" valign="top">class &nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classxint_1_1not__a__number.html">xint::not_a_number</a></td></tr>
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Exception class. More...<br/></td></tr>
+<tr><td class="memItemLeft" align="right" valign="top">class &nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classxint_1_1no__strong__random.html">xint::no_strong_random</a></td></tr>
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Exception class. More...<br/></td></tr>
+<tr><td class="memItemLeft" align="right" valign="top">class &nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classxint_1_1overflow__error.html">xint::overflow_error</a></td></tr>
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Exception class. More...<br/></td></tr>
+<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="namespacexint.html">xint</a></td></tr>
+
+<p><tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight"><p>All of the functions in the XInt library are within this namespace. </p>
+<br/></td></tr>
+</p>
+<tr><td class="memItemLeft" align="right" valign="top">namespace &nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespacexint_1_1detail.html">xint::detail</a></td></tr>
+
+<p><tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight"><p>The items within this namespace are meant for internal use only. </p>
+<br/></td></tr>
+</p>
+<tr><td colspan="2"><h2>Typedefs</h2></td></tr>
+<tr><td class="memItemLeft" align="right" valign="top">typedef boost::uintmax_t&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespacexint_1_1detail.html#aceb9b654c1c2daaf377b31bd4a089750">xint::detail::doubledigit_t</a></td></tr>
+<tr><td class="memItemLeft" align="right" valign="top">typedef boost::uint_t<br class="typebreak"/>
+&lt; std::numeric_limits<br class="typebreak"/>
+&lt; doubledigit_t &gt;::digits/2 &gt;<br class="typebreak"/>
+::fast&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespacexint_1_1detail.html#a8843fb7e364832d8d5983de28bdbcf34">xint::detail::digit_t</a></td></tr>
+<tr><td class="memItemLeft" align="right" valign="top">typedef std::auto_ptr<br class="typebreak"/>
+&lt; detail::token &gt;&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespacexint.html#ad63045584f06221eb6a7581ad3091582">xint::token</a></td></tr>
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Used for the exception-blocker. <br/></td></tr>
+<tr><td class="memItemLeft" align="right" valign="top">typedef boost::function&lt; bool()&gt;&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespacexint.html#ac8a660c33746c536469d347307b8da7a">xint::callback_t</a></td></tr>
+<tr><td colspan="2"><h2>Functions</h2></td></tr>
+<tr><td class="memItemLeft" align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespacexint_1_1detail.html#a5f8bba03a6f615a82ebcf94ad7cd4353">xint::detail::set_random_generator</a> (base_random_generator *obj)</td></tr>
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Support function. <br/></td></tr>
+<tr><td class="memItemLeft" align="right" valign="top">unsigned int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespacexint_1_1detail.html#a1dfc1e90886c4897a4b112f491b89b62">xint::detail::get_random</a> ()</td></tr>
+<tr><td colspan="2"><div class="groupHeader">Exception-blocking and -allowing functions</div></td></tr>
+<tr><td colspan="2"><div class="groupText"><p><a class="anchor" id="amgrp6b736a9df3b9afabec548528235f28b6"></a> See the <a class="el" href="exceptions.html">exception-blocking page</a> for details on these functions and how to use them. </p>
+<br/><br/></div></td></tr>
+<tr><td class="memItemLeft" align="right" valign="top">bool&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespacexint.html#ac8be41374700d89400f5ecddf0f789e3">xint::exceptions_allowed</a> ()</td></tr>
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Query whether exceptions are currently allowed or blocked. <br/></td></tr>
+<tr><td class="memItemLeft" align="right" valign="top">token&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespacexint.html#ae7e3f6afc701f6e8873a407bb418d04c">xint::block_exceptions</a> ()</td></tr>
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Temporarily prevent the library from throwing blockable exceptions. <br/></td></tr>
+<tr><td class="memItemLeft" align="right" valign="top">token&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespacexint.html#a4b5a1a791ba11bb8f158a3b56bd9723e">xint::allow_exceptions</a> ()</td></tr>
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Temprarily counteract an <a class="el" href="namespacexint.html#ae7e3f6afc701f6e8873a407bb418d04c" title="Temporarily prevent the library from throwing blockable exceptions.">xint::block_exceptions</a> token to allow all exceptions. <br/></td></tr>
+<tr><td colspan="2"><div class="groupHeader">Mathematical primitives</div></td></tr>
+<tr><td colspan="2"><div class="groupText"><p><a class="anchor" id="amgrp196dd2a5f50860e057df961a96d84ea3"></a> </p>
+<br/><br/></div></td></tr>
+<tr><td class="memItemLeft" align="right" valign="top">integer&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespacexint.html#ac9e4ed282bafa93dbf608350df0127ba">xint::abs</a> (const integer &amp;n)</td></tr>
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Returns the absolute value of an <a class="el" href="classxint_1_1integer.html" title="The extended integer class.">integer</a>. <br/></td></tr>
+<tr><td class="memItemLeft" align="right" valign="top">integer&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespacexint.html#ab393826381b1abd9f1aca1cdb45f41f6">xint::negate</a> (const integer &amp;n)</td></tr>
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Return the additive inverse of an <a class="el" href="classxint_1_1integer.html" title="The extended integer class.">integer</a>. <br/></td></tr>
+<tr><td class="memItemLeft" align="right" valign="top">integer&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespacexint.html#a7cc636a05af16eba73014bf88273d163">xint::add</a> (const integer &amp;n1, const integer &amp;n2)</td></tr>
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Calculate the sum of two integers. <br/></td></tr>
+<tr><td class="memItemLeft" align="right" valign="top">integer&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespacexint.html#af196cd74cb23970032fddcce71957a80">xint::subtract</a> (const integer &amp;n1, const integer &amp;n2)</td></tr>
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Calculate the difference between two integers. <br/></td></tr>
+<tr><td class="memItemLeft" align="right" valign="top">integer&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespacexint.html#af3d7059ec08bf075cec5685deca55c5d">xint::multiply</a> (const integer &amp;n, const integer &amp;by)</td></tr>
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Calculate the product of two integers. <br/></td></tr>
+<tr><td class="memItemLeft" align="right" valign="top">integer&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespacexint.html#abf3d47f1ef1fdf334097fab055886a44">xint::divide</a> (const integer &amp;dividend, const integer &amp;divisor)</td></tr>
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Calculate how many <code>dividends</code> would fit into <code>divisor</code>. <br/></td></tr>
+<tr><td class="memItemLeft" align="right" valign="top">std::pair&lt; integer, integer &gt;&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespacexint.html#a23d0a0bb05cec1917d96d6aaceeb875d">xint::divide_r</a> (const integer &amp;d1, const integer &amp;d2)</td></tr>
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Calculate how many <code>dividends</code> would fit into <code>divisor</code>, with the remainder. <br/></td></tr>
+<tr><td colspan="2"><div class="groupHeader">Powers and roots</div></td></tr>
+<tr><td colspan="2"><div class="groupText"><p><a class="anchor" id="amgrp928a8cb047602f789d7433e262ed4560"></a> </p>
+<br/><br/></div></td></tr>
+<tr><td class="memItemLeft" align="right" valign="top">integer&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespacexint.html#a0aec423511839fd784b1654389dfcf5b">xint::sqr</a> (const integer &amp;n)</td></tr>
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Calculate the value of n<sup>2</sup>. <br/></td></tr>
+<tr><td class="memItemLeft" align="right" valign="top">integer&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespacexint.html#a186b14f991b32a818abd553b56a13a62">xint::pow</a> (const integer &amp;n, const integer &amp;e)</td></tr>
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Calculate the value of n<sup>e</sup>. <br/></td></tr>
+<tr><td class="memItemLeft" align="right" valign="top">integer&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespacexint.html#a6b723c30c28eb57f611442e0b512f551">xint::pow2</a> (size_t e)</td></tr>
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Calculate the value of 2<sup>e</sup>. <br/></td></tr>
+<tr><td class="memItemLeft" align="right" valign="top">integer&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespacexint.html#aba188df925c87a0f33a79328e31e1a50">xint::factorial</a> (size_t n)</td></tr>
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Calculate the value of <code>n!</code> <br/></td></tr>
+<tr><td class="memItemLeft" align="right" valign="top">integer&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespacexint.html#a74891726f8af86736169dd43b929ad0a">xint::sqrt</a> (const integer &amp;n)</td></tr>
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Calculate the square root of <code>an</code> <a class="el" href="classxint_1_1integer.html" title="The extended integer class.">integer</a>. <br/></td></tr>
+<tr><td colspan="2"><div class="groupHeader">Conversion functions</div></td></tr>
+<tr><td colspan="2"><div class="groupText"><p><a class="anchor" id="amgrp9c2e8a06d85d2c9b83b5a0d27e85d535"></a> </p>
+<br/><br/></div></td></tr>
+<tr><td class="memTemplParams" colspan="2">template&lt;typename T &gt; </td></tr>
+<tr><td class="memTemplItemLeft" align="right" valign="top">T&nbsp;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="namespacexint.html#a21bd738b96eec205eedc7a9960e9a6e5">xint::to</a> (const integer &amp;n)</td></tr>
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Efficiently converts from an <a class="el" href="classxint_1_1integer.html" title="The extended integer class.">xint::integer</a> to a built-in integer type. <br/></td></tr>
+<tr><td class="memItemLeft" align="right" valign="top">std::string&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespacexint.html#a016c9573ff48411847edf86c406946a0">xint::to_string</a> (const integer &amp;n, size_t base, bool uppercase)</td></tr>
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Creates a string representation of the specified <a class="el" href="classxint_1_1integer.html" title="The extended integer class.">integer</a>. <br/></td></tr>
+<tr><td class="memItemLeft" align="right" valign="top">integer&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespacexint.html#ad9dcb2b835be5f8ee918979945911ac0">xint::from_string</a> (const std::string &amp;str, size_t base)</td></tr>
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Converts a string into an <a class="el" href="classxint_1_1integer.html" title="The extended integer class.">integer</a>. <br/></td></tr>
+<tr><td class="memItemLeft" align="right" valign="top">std::string&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespacexint.html#ab8f33201a251e3e118dc82f214e22aeb">xint::to_binary</a> (const integer &amp;n)</td></tr>
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Creates a binary representation of an <a class="el" href="classxint_1_1integer.html" title="The extended integer class.">integer</a>, lowest byte first. <br/></td></tr>
+<tr><td class="memItemLeft" align="right" valign="top">integer&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespacexint.html#ac2ac2f74b45e4179560d845e6310be9a">xint::from_binary</a> (const std::string &amp;str)</td></tr>
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Converts a binary representation of a number into an <a class="el" href="classxint_1_1integer.html" title="The extended integer class.">integer</a>. <br/></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>
+<br/><br/></div></td></tr>
+<tr><td class="memItemLeft" align="right" valign="top">bool&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespacexint.html#a07bc7378c8a55e5f92aaef6d8b8ce952">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 <a class="el" href="classxint_1_1integer.html" title="The extended integer class.">integer</a>. <br/></td></tr>
+<tr><td class="memItemLeft" align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespacexint.html#adf2652627e78682c17e120816987984a">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 <a class="el" href="classxint_1_1integer.html" title="The extended integer class.">integer</a> to one. <br/></td></tr>
+<tr><td class="memItemLeft" align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespacexint.html#a8982e3e3ab7c1c763416eadc479d9724">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 <a class="el" href="classxint_1_1integer.html" title="The extended integer class.">integer</a> to zero. <br/></td></tr>
+<tr><td class="memItemLeft" align="right" valign="top">size_t&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespacexint.html#ae04d70f50c4ce73d27ab32b1bf3520f2">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 <a class="el" href="classxint_1_1integer.html" title="The extended integer class.">integer</a> 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="namespacexint.html#ae08828243165ef3f397461507368a6e5">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 <a class="el" href="classxint_1_1integer.html" title="The extended integer class.">integer</a> with a value of one. <br/></td></tr>
+<tr><td class="memItemLeft" align="right" valign="top">integer&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespacexint.html#a06138585f07fe098e24718c46e3078e1">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="namespacexint.html#a8cd0a0dbc779e5a75c9e2f8027474e9a">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="namespacexint.html#a9ffe18a09f5dd354af7b967b032d3cbe">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">integer&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespacexint.html#a4f4dacd6f9398aaa500112731ab713ce">xint::shift</a> (const integer &amp;n, int byBits)</td></tr>
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Bit-shift an <a class="el" href="classxint_1_1integer.html" title="The extended integer class.">integer</a>, 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="namespacexint.html#a6799cc3c4d8c963279be64b209bfd3b6">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 <a class="el" href="classxint_1_1integer.html" title="The extended integer class.">integer</a> 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="namespacexint.html#a49a5a4220cb88b7446545e4b65950473">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 <a class="el" href="classxint_1_1integer.html" title="The extended integer class.">integer</a> by a specified number of bits. <br/></td></tr>
+<tr><td colspan="2"><div class="groupHeader">Modular math functions</div></td></tr>
+<tr><td colspan="2"><div class="groupText"><p><a class="anchor" id="amgrpbf63e6a6a1029bb25b7aa51052b38655"></a>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. </p>
+<br/><br/></div></td></tr>
+<tr><td class="memItemLeft" align="right" valign="top">integer&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespacexint.html#ad5a8cc6e57ee8abdc21be98275657cc8">xint::mod</a> (const integer &amp;n, const integer &amp;m)</td></tr>
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Get the remainder after dividing a number by another. <br/></td></tr>
+<tr><td class="memItemLeft" align="right" valign="top">integer&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespacexint.html#adbbde6cc4b65e9a3df8c52adad9c540f">xint::mulmod</a> (const integer &amp;n, const integer &amp;by, const integer &amp;m)</td></tr>
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Get the modular product of two integers. <br/></td></tr>
+<tr><td class="memItemLeft" align="right" valign="top">integer&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespacexint.html#aa5564979e78556afdc68dbbd744a0bcb">xint::sqrmod</a> (const integer &amp;n, const integer &amp;m)</td></tr>
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Get the modular product of squaring an <a class="el" href="classxint_1_1integer.html" title="The extended integer class.">integer</a>. <br/></td></tr>
+<tr><td class="memItemLeft" align="right" valign="top">integer&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespacexint.html#ac54e9be3a8b131f882f88e57b0ef1c9c">xint::powmod</a> (const integer &amp;n, const integer &amp;e, const integer &amp;m, bool noMontgomery)</td></tr>
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Get the result of <code>n<sup>e</sup></code> % <code>m</code>, keeping the intermediate results (relatively) small. <br/></td></tr>
+<tr><td class="memItemLeft" align="right" valign="top">integer&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespacexint.html#a4a79f60ebe198eadf10b63924018ce66">xint::invmod</a> (const integer &amp;n, const integer &amp;m)</td></tr>
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Get the modular inverse of a number in a modulus, if there is one. <br/></td></tr>
+<tr><td colspan="2"><div class="groupHeader">Random number functions</div></td></tr>
+<tr><td colspan="2"><div class="groupText"><p><a class="anchor" id="amgrpdd4713a71c208a173c1f2436d4e32ff7"></a> </p>
+<br/><br/></div></td></tr>
+<tr><td class="memTemplParams" colspan="2">template&lt;typename T &gt; </td></tr>
+<tr><td class="memTemplItemLeft" align="right" valign="top">void&nbsp;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="namespacexint.html#a9c50302b216b64d17d9c1d6350e88036">xint::set_random_generator</a> (T *gen)</td></tr>
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Change the random generator that the library uses. <br/></td></tr>
+<tr><td class="memItemLeft" align="right" valign="top">integer&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespacexint.html#a5da6e81cb78913cc61c9f14857700b5e">xint::random_by_size</a> (size_t bits, bool high_bit_on, bool low_bit_on, bool can_be_negative)</td></tr>
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Generates a random <a class="el" href="classxint_1_1integer.html" title="The extended integer class.">integer</a> with specific attributes. <br/></td></tr>
+<tr><td colspan="2"><div class="groupHeader">Prime number functions</div></td></tr>
+<tr><td colspan="2"><div class="groupText"><p><a class="anchor" id="amgrp540e8e12721acbe497d2b9b53ecc76ec"></a> </p>
+<br/><br/></div></td></tr>
+<tr><td class="memItemLeft" align="right" valign="top">int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespacexint.html#ab205c4e52dbc6825cefe3a251f6ca99f">xint::is_prime</a> (const integer &amp;n, callback_t callback)</td></tr>
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Tests an <a class="el" href="classxint_1_1integer.html" title="The extended integer class.">integer</a> for primality. <br/></td></tr>
+<tr><td class="memItemLeft" align="right" valign="top">integer&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespacexint.html#afc8ba5f62561b4d2b42e32dde1a10ef3">xint::random_prime</a> (size_t size_in_bits, callback_t callback)</td></tr>
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Generate a randomly-generated prime number of a particular bit-size. <br/></td></tr>
+<tr><td colspan="2"><div class="groupHeader">Operators</div></td></tr>
+<tr><td colspan="2"><div class="groupText"><p><a class="anchor" id="amgrpb3c5827f54218753bb2c3338236446c2"></a> These act exactly the same as for the built-in integer types. </p>
+<br/><br/></div></td></tr>
+<tr><td class="memItemLeft" align="right" valign="top">bool&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespacexint.html#a675c4fe6ddda6db915450d054ed640ba">xint::operator!</a> (const <a class="el" href="classxint_1_1integer.html">xint::integer</a> &amp;num1)</td></tr>
+<tr><td class="memItemLeft" align="right" valign="top">bool&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespacexint.html#a4f4a4771bf443e6724abbd18173ecc86">xint::operator&lt;</a> (const <a class="el" href="classxint_1_1integer.html">xint::integer</a> &amp;num1, const <a class="el" href="classxint_1_1integer.html">xint::integer</a> &amp;num2)</td></tr>
+<tr><td class="memItemLeft" align="right" valign="top">bool&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespacexint.html#a1229d1f1efbdf3ffeac8b2964ca66093">xint::operator&gt;</a> (const <a class="el" href="classxint_1_1integer.html">xint::integer</a> &amp;num1, const <a class="el" href="classxint_1_1integer.html">xint::integer</a> &amp;num2)</td></tr>
+<tr><td class="memItemLeft" align="right" valign="top">bool&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespacexint.html#ab9d5f34c4d4bed1c86380d4f72edcd9b">xint::operator&lt;=</a> (const <a class="el" href="classxint_1_1integer.html">xint::integer</a> &amp;num1, const <a class="el" href="classxint_1_1integer.html">xint::integer</a> &amp;num2)</td></tr>
+<tr><td class="memItemLeft" align="right" valign="top">bool&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespacexint.html#a766324a6f216f3b49a3e9aa885e9531c">xint::operator&gt;=</a> (const <a class="el" href="classxint_1_1integer.html">xint::integer</a> &amp;num1, const <a class="el" href="classxint_1_1integer.html">xint::integer</a> &amp;num2)</td></tr>
+<tr><td class="memItemLeft" align="right" valign="top">bool&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespacexint.html#ad32051708c2a2baafa0340e19e90217b">xint::operator==</a> (const <a class="el" href="classxint_1_1integer.html">xint::integer</a> &amp;num1, const <a class="el" href="classxint_1_1integer.html">xint::integer</a> &amp;num2)</td></tr>
+<tr><td class="memItemLeft" align="right" valign="top">bool&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespacexint.html#aefda934d0ffacd0f44fcbbdfee19a139">xint::operator!=</a> (const <a class="el" href="classxint_1_1integer.html">xint::integer</a> &amp;num1, const <a class="el" href="classxint_1_1integer.html">xint::integer</a> &amp;num2)</td></tr>
+<tr><td class="memItemLeft" align="right" valign="top">const integer &amp;&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespacexint.html#a586fb0eb69100ec74be94008ac26670d">xint::operator+</a> (const integer &amp;a)</td></tr>
+<tr><td class="memItemLeft" align="right" valign="top">integer&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespacexint.html#a8a510361ed458133ebfa5fd95f8d9c27">xint::operator-</a> (const integer &amp;a)</td></tr>
+<tr><td class="memItemLeft" align="right" valign="top">integer&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespacexint.html#a211ff80bb081c08674272cfcae736a93">xint::operator+</a> (const integer &amp;num1, const integer &amp;num2)</td></tr>
+<tr><td class="memItemLeft" align="right" valign="top">integer&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespacexint.html#a1e09422b575c6d29ea5c0d627b79c28e">xint::operator-</a> (const integer &amp;num1, const integer &amp;num2)</td></tr>
+<tr><td class="memItemLeft" align="right" valign="top">integer&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespacexint.html#aea36ad9037f109576d4f95ec72b5c825">xint::operator*</a> (const integer &amp;num1, const integer &amp;num2)</td></tr>
+<tr><td class="memItemLeft" align="right" valign="top">integer&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespacexint.html#a701217f7824c3e935fca25147da23807">xint::operator/</a> (const integer &amp;num1, const integer &amp;num2)</td></tr>
+<tr><td class="memItemLeft" align="right" valign="top">integer&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespacexint.html#ae0505757986a9c7133552552471aae24">xint::operator%</a> (const integer &amp;num1, const integer &amp;num2)</td></tr>
+<tr><td class="memItemLeft" align="right" valign="top">integer&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespacexint.html#a742550f1c62ac8c2bde8e1ceab2a466c">xint::operator&amp;</a> (const integer &amp;n1, const integer &amp;n2)</td></tr>
+<tr><td class="memItemLeft" align="right" valign="top">integer&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespacexint.html#afa8f2a0ac996ad45efc73b2aa056cae2">xint::operator|</a> (const integer &amp;n1, const integer &amp;n2)</td></tr>
+<tr><td class="memItemLeft" align="right" valign="top">integer&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespacexint.html#a81722cd257bc950ba7c56a202492544f">xint::operator^</a> (const integer &amp;n1, const integer &amp;n2)</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="amgrp458f92801f3edfaf2e30b1f530c324e2"></a> </p>
+<br/><br/></div></td></tr>
+<tr><td class="memItemLeft" align="right" valign="top">bool&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespacexint.html#a820d89c1d761a0a2c06479b1c1f9cecd">xint::opt_secure_mode</a> ()</td></tr>
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Tells whether the library was compiled with <a class="el" href="securemode.html">Secure Mode </a> enabled. <br/></td></tr>
+<tr><td class="memItemLeft" align="right" valign="top">bool&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespacexint.html#ad55aa4d44083238d9ec313511f5b1dfa">xint::opt_thread_safe</a> ()</td></tr>
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Tells whether the library was compiled with the <a class="el" href="threadsafe.html">Thread Safe Operation option </a> enabled. <br/></td></tr>
+<tr><td class="memItemLeft" align="right" valign="top">int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespacexint.html#aff82dd47fae4297b96282371abf4db06">xint::compare</a> (const integer &amp;b1, const integer &amp;b2, bool ignoresign)</td></tr>
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Compare two <a class="el" href="classxint_1_1integer.html" title="The extended integer class.">integer</a> objects. <br/></td></tr>
+<tr><td class="memItemLeft" align="right" valign="top">size_t&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespacexint.html#aa074495871d366c760c5b0713f5ef048">xint::log2</a> (const integer &amp;n)</td></tr>
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Get the log<sub>2</sub> value of an <a class="el" href="classxint_1_1integer.html" title="The extended integer class.">integer</a>. <br/></td></tr>
+<tr><td class="memItemLeft" align="right" valign="top">integer&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespacexint.html#ac9e11516ac502e97be1902cde50f97e7">xint::gcd</a> (const integer &amp;num1, const integer &amp;num2)</td></tr>
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Calculate the Greatest Common Denominator of two integers. <br/></td></tr>
+<tr><td class="memItemLeft" align="right" valign="top">integer&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespacexint.html#a17c5e4e807cfa425f48d9f5b464bc8dc">xint::lcm</a> (const integer &amp;num1, const integer &amp;num2)</td></tr>
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Calculate the Least Common Multiple of two integers. <br/></td></tr>
+<tr><td colspan="2"><div class="groupHeader">Stream input/output functions</div></td></tr>
+<tr><td colspan="2"><div class="groupText"><p><a class="anchor" id="amgrpd9927783c44c1aad288df0ab8bfa9ddf"></a> </p>
+<br/><br/></div></td></tr>
+<tr><td class="memTemplParams" colspan="2">template&lt;typename charT , typename traits &gt; </td></tr>
+<tr><td class="memTemplItemLeft" align="right" valign="top">std::basic_ostream&lt; charT, <br class="typebreak"/>
+traits &gt; &amp;&nbsp;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="namespacexint.html#aa5b0dc228caee6523766326cf40297cd">xint::operator&lt;&lt;</a> (std::basic_ostream&lt; charT, traits &gt; &amp;out, const <a class="el" href="classxint_1_1integer.html">xint::integer</a> &amp;n)</td></tr>
+<tr><td class="memTemplParams" colspan="2">template&lt;typename charT , typename traits &gt; </td></tr>
+<tr><td class="memTemplItemLeft" align="right" valign="top">std::basic_istream&lt; charT, <br class="typebreak"/>
+traits &gt; &amp;&nbsp;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="namespacexint.html#a27a0715c66d7350b0f3800f6e161816f">xint::operator&gt;&gt;</a> (std::basic_istream&lt; charT, traits &gt; &amp;in, <a class="el" href="classxint_1_1integer.html">xint::integer</a> &amp;n)</td></tr>
+<tr><td colspan="2"><h2>Variables</h2></td></tr>
+<tr><td class="memItemLeft" align="right" valign="top">const std::string&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespacexint_1_1detail.html#aede27c67f3308e0805fc3093ffe6f4ce">xint::detail::nan_text</a></td></tr>
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Holds the text representation of the Not-a-Number value. <br/></td></tr>
+<tr><td class="memItemLeft" align="right" valign="top">const callback_t&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespacexint.html#a44496f258b36237d4cea35558a71017a">xint::no_callback</a></td></tr>
+<tr><td class="memItemLeft" align="right" valign="top">const size_t&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespacexint.html#a7a5434a5f5fb1db19f0de18014c4fc41">xint::autobase</a> = (std::numeric_limits&lt;size_t&gt;::max)()</td></tr>
+<tr><td colspan="2"><div class="groupHeader">Some constants used by the library.</div></td></tr>
+<tr><td colspan="2"><div class="groupText"><p><a class="anchor" id="amgrpe1f42a3ea000e0468230fb7abe73e7b1"></a> </p>
+<br/><br/></div></td></tr>
+<tr><td class="memItemLeft" align="right" valign="top">const size_t&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespacexint_1_1detail.html#a9bd9e8d55061238d63913020d2721518">xint::detail::bits_per_digit</a> = std::numeric_limits&lt;digit_t&gt;::digits</td></tr>
+<tr><td class="memItemLeft" align="right" valign="top">const digit_t&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespacexint_1_1detail.html#a116bb5ce94c55f0eae3338d69fd5e8eb">xint::detail::digit_hibit</a> = (digit_t(1) &lt;&lt; (bits_per_digit-1))</td></tr>
+<tr><td class="memItemLeft" align="right" valign="top">const doubledigit_t&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespacexint_1_1detail.html#a2af0686427ee285bd715330f12fcbc1c">xint::detail::doubledigit_hibit</a> = (doubledigit_t(1) &lt;&lt; (bits_per_digit*2-1))</td></tr>
+<tr><td class="memItemLeft" align="right" valign="top">const doubledigit_t&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespacexint_1_1detail.html#a6746855fd8cde164294a46108d502e6a">xint::detail::digit_overflowbit</a> = (doubledigit_t(1) &lt;&lt; bits_per_digit)</td></tr>
+<tr><td class="memItemLeft" align="right" valign="top">const digit_t&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespacexint_1_1detail.html#a051753e1bf43dcc77eaa93b8d4e49197">xint::detail::digit_mask</a> = digit_t(digit_overflowbit-1)</td></tr>
+</table>
+<hr/><a name="_details"></a><h2>Detailed Description</h2>
+<p>The main header file for the XInt library. </p>
+<p>This is the only header that programs using the library should need to include. </p>
+
+<p>Definition in file <a class="el" href="xint_8hpp_source.html">xint.hpp</a>.</p>
+</div>
+<hr size="1"/><address style="text-align: right;"><small>Generated on Tue Apr 6 01:22:08 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.1 </small></address>
+</body>
+</html>

Added: sandbox/xint/doc/xint_8hpp_source.html
==============================================================================
--- (empty file)
+++ sandbox/xint/doc/xint_8hpp_source.html 2010-04-06 01:40:33 EDT (Tue, 06 Apr 2010)
@@ -0,0 +1,508 @@
+<!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: xint.hpp 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.1 -->
+<div class="navigation" id="top">
+ <div class="tabs">
+ <ul>
+ <li>Main Page</li>
+ <li>Related Pages</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>xint.hpp</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="l00021"></a>00021 <span class="preprocessor">#ifndef BOOST_INCLUDED_XINT_H</span>
+<a name="l00022"></a>00022 <span class="preprocessor"></span><span class="preprocessor">#define BOOST_INCLUDED_XINT_H</span>
+<a name="l00023"></a>00023 <span class="preprocessor"></span>
+<a name="l00024"></a>00024 <span class="preprocessor">#include &lt;string&gt;</span>
+<a name="l00025"></a>00025 <span class="preprocessor">#include &lt;limits&gt;</span>
+<a name="l00026"></a>00026 <span class="preprocessor">#include &lt;memory&gt;</span> <span class="comment">// for auto_ptr</span>
+<a name="l00027"></a>00027 <span class="preprocessor">#include &lt;cstddef&gt;</span> <span class="comment">// for size_t</span>
+<a name="l00028"></a>00028 <span class="preprocessor">#include &lt;iostream&gt;</span>
+<a name="l00029"></a>00029 <span class="preprocessor">#include &lt;stdexcept&gt;</span>
+<a name="l00030"></a>00030 <span class="preprocessor">#include &lt;boost/integer.hpp&gt;</span>
+<a name="l00031"></a>00031 <span class="preprocessor">#include &lt;boost/cstdint.hpp&gt;</span>
+<a name="l00032"></a>00032 <span class="preprocessor">#include &lt;boost/function.hpp&gt;</span>
+<a name="l00033"></a>00033 <span class="preprocessor">#include &lt;boost/type_traits.hpp&gt;</span>
+<a name="l00034"></a>00034 <span class="preprocessor">#include &lt;boost/static_assert.hpp&gt;</span>
+<a name="l00035"></a>00035 <span class="preprocessor">#include &lt;boost/random/uniform_int.hpp&gt;</span>
+<a name="l00036"></a>00036 <span class="preprocessor">#include &lt;boost/random/variate_generator.hpp&gt;</span>
+<a name="l00037"></a>00037
+<a name="l00039"></a>00039 <span class="keyword">namespace </span>xint {
+<a name="l00040"></a>00040
+<a name="l00042"></a>00042 <span class="comment">// The boring-but-necessary preliminary stuff</span>
+<a name="l00043"></a>00043
+<a name="l00045"></a>00045 <span class="keyword">namespace </span>detail {
+<a name="l00051"></a><a class="code" href="namespacexint_1_1detail.html#aceb9b654c1c2daaf377b31bd4a089750">00051</a> <span class="keyword">typedef</span> boost::uintmax_t <a class="code" href="namespacexint_1_1detail.html#aceb9b654c1c2daaf377b31bd4a089750">doubledigit_t</a>;
+<a name="l00052"></a>00052
+<a name="l00058"></a>00058 <span class="keyword">typedef</span> boost::uint_t&lt;std::numeric_limits&lt;doubledigit_t&gt;::digits / 2&gt;::fast
+<a name="l00059"></a><a class="code" href="namespacexint_1_1detail.html#a8843fb7e364832d8d5983de28bdbcf34">00059</a> <a class="code" href="namespacexint_1_1detail.html#a8843fb7e364832d8d5983de28bdbcf34">digit_t</a>;
+<a name="l00060"></a>00060
+<a name="l00063"></a><a class="code" href="namespacexint_1_1detail.html#a9bd9e8d55061238d63913020d2721518">00063</a> <span class="keyword">const</span> <span class="keywordtype">size_t</span> <a class="code" href="namespacexint_1_1detail.html#a9bd9e8d55061238d63913020d2721518">bits_per_digit</a> = std::numeric_limits&lt;digit_t&gt;::digits;
+<a name="l00064"></a><a class="code" href="namespacexint_1_1detail.html#a116bb5ce94c55f0eae3338d69fd5e8eb">00064</a> <span class="keyword">const</span> <a class="code" href="namespacexint_1_1detail.html#a8843fb7e364832d8d5983de28bdbcf34">digit_t</a> <a class="code" href="namespacexint_1_1detail.html#a116bb5ce94c55f0eae3338d69fd5e8eb">digit_hibit</a> = (<a class="code" href="namespacexint_1_1detail.html#a8843fb7e364832d8d5983de28bdbcf34">digit_t</a>(1) &lt;&lt; (<a class="code" href="namespacexint_1_1detail.html#a9bd9e8d55061238d63913020d2721518">bits_per_digit</a>-1));
+<a name="l00065"></a><a class="code" href="namespacexint_1_1detail.html#a2af0686427ee285bd715330f12fcbc1c">00065</a> <span class="keyword">const</span> <a class="code" href="namespacexint_1_1detail.html#aceb9b654c1c2daaf377b31bd4a089750">doubledigit_t</a> <a class="code" href="namespacexint_1_1detail.html#a2af0686427ee285bd715330f12fcbc1c">doubledigit_hibit</a> = (<a class="code" href="namespacexint_1_1detail.html#aceb9b654c1c2daaf377b31bd4a089750">doubledigit_t</a>(1) &lt;&lt; (<a class="code" href="namespacexint_1_1detail.html#a9bd9e8d55061238d63913020d2721518">bits_per_digit</a>*2-1));
+<a name="l00066"></a><a class="code" href="namespacexint_1_1detail.html#a6746855fd8cde164294a46108d502e6a">00066</a> <span class="keyword">const</span> <a class="code" href="namespacexint_1_1detail.html#aceb9b654c1c2daaf377b31bd4a089750">doubledigit_t</a> <a class="code" href="namespacexint_1_1detail.html#a6746855fd8cde164294a46108d502e6a">digit_overflowbit</a> = (<a class="code" href="namespacexint_1_1detail.html#aceb9b654c1c2daaf377b31bd4a089750">doubledigit_t</a>(1) &lt;&lt; <a class="code" href="namespacexint_1_1detail.html#a9bd9e8d55061238d63913020d2721518">bits_per_digit</a>);
+<a name="l00067"></a><a class="code" href="namespacexint_1_1detail.html#a051753e1bf43dcc77eaa93b8d4e49197">00067</a> <span class="keyword">const</span> <a class="code" href="namespacexint_1_1detail.html#a8843fb7e364832d8d5983de28bdbcf34">digit_t</a> <a class="code" href="namespacexint_1_1detail.html#a051753e1bf43dcc77eaa93b8d4e49197">digit_mask</a> = <a class="code" href="namespacexint_1_1detail.html#a8843fb7e364832d8d5983de28bdbcf34">digit_t</a>(<a class="code" href="namespacexint_1_1detail.html#a6746855fd8cde164294a46108d502e6a">digit_overflowbit</a>-1);
+<a name="l00069"></a>00069
+<a name="l00071"></a>00071 <span class="keyword">const</span> <span class="keyword">extern</span> std::string <a class="code" href="namespacexint_1_1detail.html#aede27c67f3308e0805fc3093ffe6f4ce" title="Holds the text representation of the Not-a-Number value.">nan_text</a>;
+<a name="l00072"></a>00072
+<a name="l00073"></a>00073 <span class="keyword">struct </span><a class="code" href="structxint_1_1detail_1_1data__t.html" title="Holds the internal details of an xint::integer.">data_t</a>;
+<a name="l00074"></a>00074
+<a name="l00076"></a><a class="code" href="structxint_1_1detail_1_1token.html">00076</a> <span class="keyword">struct </span><a class="code" href="structxint_1_1detail_1_1token.html" title="An empty struct, used in xint::token.">token</a> { };
+<a name="l00077"></a>00077
+<a name="l00079"></a><a class="code" href="structxint_1_1detail_1_1base__random__generator.html">00079</a> <span class="keyword">struct </span><a class="code" href="structxint_1_1detail_1_1base__random__generator.html" title="The base class for random_generator.">base_random_generator</a> {
+<a name="l00080"></a><a class="code" href="structxint_1_1detail_1_1base__random__generator.html#a0556d7f290cd236303b3f1031611cb3e">00080</a> <span class="keyword">typedef</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> <a class="code" href="structxint_1_1detail_1_1base__random__generator.html#a0556d7f290cd236303b3f1031611cb3e">result_type</a>;
+<a name="l00081"></a>00081 <span class="keyword">virtual</span> <a class="code" href="structxint_1_1detail_1_1base__random__generator.html#a0556d7f290cd236303b3f1031611cb3e">result_type</a> <a class="code" href="structxint_1_1detail_1_1base__random__generator.html#aa7f3b20e2fcccbf9d3a5c76e6c89b4b5">operator()</a>()=0;
+<a name="l00082"></a>00082 };
+<a name="l00083"></a>00083
+<a name="l00085"></a>00085 <span class="keyword">template</span> &lt;<span class="keyword">class</span> T&gt;
+<a name="l00086"></a><a class="code" href="structxint_1_1detail_1_1random__generator.html">00086</a> <span class="keyword">struct </span><a class="code" href="structxint_1_1detail_1_1random__generator.html" title="Support class for the random generator code.">random_generator</a>: <span class="keyword">public</span> <a class="code" href="structxint_1_1detail_1_1base__random__generator.html" title="The base class for random_generator.">base_random_generator</a> {
+<a name="l00087"></a><a class="code" href="structxint_1_1detail_1_1random__generator.html#aab9830c38c791b5c3ac0ef8328573bfd">00087</a> <span class="keyword">typedef</span> boost::uniform_int&lt;result_type&gt; <a class="code" href="structxint_1_1detail_1_1random__generator.html#aab9830c38c791b5c3ac0ef8328573bfd">dist_t</a>;
+<a name="l00088"></a><a class="code" href="structxint_1_1detail_1_1random__generator.html#adbc88a70815fa4f72deb9bddaec86675">00088</a> <span class="keyword">typedef</span> boost::variate_generator&lt;T&amp;, dist_t&gt; <a class="code" href="structxint_1_1detail_1_1random__generator.html#adbc88a70815fa4f72deb9bddaec86675">gen_t</a>;
+<a name="l00089"></a><a class="code" href="structxint_1_1detail_1_1random__generator.html#a76ce5051cedd7e6e25dc46ac1fb90098">00089</a> <a class="code" href="structxint_1_1detail_1_1random__generator.html#a76ce5051cedd7e6e25dc46ac1fb90098">random_generator</a>(T *g): <a class="code" href="structxint_1_1detail_1_1random__generator.html#a68bbea81955a1424f474b49040bcb007">genobj</a>(g), <a class="code" href="structxint_1_1detail_1_1random__generator.html#a9a90a3050b2ff83d78ef8633deb5d42d">gen</a>(*g,
+<a name="l00090"></a>00090 <a class="code" href="structxint_1_1detail_1_1random__generator.html#aab9830c38c791b5c3ac0ef8328573bfd">dist_t</a>((std::numeric_limits&lt;<a class="code" href="structxint_1_1detail_1_1base__random__generator.html#a0556d7f290cd236303b3f1031611cb3e">result_type</a>&gt;::min)(),
+<a name="l00091"></a>00091 (std::numeric_limits&lt;<a class="code" href="structxint_1_1detail_1_1base__random__generator.html#a0556d7f290cd236303b3f1031611cb3e">result_type</a>&gt;::max)())) { }
+<a name="l00092"></a><a class="code" href="structxint_1_1detail_1_1random__generator.html#ade9cefb3f061112ba1d3144aefd24f28">00092</a> <a class="code" href="structxint_1_1detail_1_1base__random__generator.html#a0556d7f290cd236303b3f1031611cb3e">result_type</a> <a class="code" href="structxint_1_1detail_1_1random__generator.html#ade9cefb3f061112ba1d3144aefd24f28">operator()</a>() { <span class="keywordflow">return</span> <a class="code" href="structxint_1_1detail_1_1random__generator.html#a9a90a3050b2ff83d78ef8633deb5d42d">gen</a>(); }
+<a name="l00093"></a><a class="code" href="structxint_1_1detail_1_1random__generator.html#a68bbea81955a1424f474b49040bcb007">00093</a> std::auto_ptr&lt;T&gt; <a class="code" href="structxint_1_1detail_1_1random__generator.html#a68bbea81955a1424f474b49040bcb007">genobj</a>;
+<a name="l00094"></a><a class="code" href="structxint_1_1detail_1_1random__generator.html#a9a90a3050b2ff83d78ef8633deb5d42d">00094</a> <a class="code" href="structxint_1_1detail_1_1random__generator.html#adbc88a70815fa4f72deb9bddaec86675">gen_t</a> <a class="code" href="structxint_1_1detail_1_1random__generator.html#a9a90a3050b2ff83d78ef8633deb5d42d">gen</a>;
+<a name="l00095"></a>00095 };
+<a name="l00096"></a>00096
+<a name="l00098"></a>00098 <span class="keywordtype">void</span> <a class="code" href="namespacexint_1_1detail.html#a5f8bba03a6f615a82ebcf94ad7cd4353" title="Support function.">set_random_generator</a>(<a class="code" href="structxint_1_1detail_1_1base__random__generator.html" title="The base class for random_generator.">base_random_generator</a> *obj);
+<a name="l00099"></a>00099
+<a name="l00104"></a>00104 <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> <a class="code" href="namespacexint_1_1detail.html#a1dfc1e90886c4897a4b112f491b89b62">get_random</a>();
+<a name="l00105"></a>00105 } <span class="comment">// namespace detail</span>
+<a name="l00106"></a>00106
+<a name="l00108"></a><a class="code" href="namespacexint.html#ad63045584f06221eb6a7581ad3091582">00108</a> <span class="keyword">typedef</span> std::auto_ptr&lt;detail::token&gt; <a class="code" href="structxint_1_1detail_1_1token.html" title="An empty struct, used in xint::token.">token</a>;
+<a name="l00109"></a>00109
+<a name="l00113"></a><a class="code" href="namespacexint.html#ac8a660c33746c536469d347307b8da7a">00113</a> <span class="keyword">typedef</span> boost::function&lt;bool ()&gt; <a class="code" href="namespacexint.html#ac8a660c33746c536469d347307b8da7a">callback_t</a>;
+<a name="l00114"></a>00114
+<a name="l00118"></a><a class="code" href="namespacexint.html#a44496f258b36237d4cea35558a71017a">00118</a> <span class="keyword">const</span> <a class="code" href="namespacexint.html#ac8a660c33746c536469d347307b8da7a">callback_t</a> <a class="code" href="namespacexint.html#a44496f258b36237d4cea35558a71017a">no_callback</a>;
+<a name="l00119"></a>00119
+<a name="l00123"></a><a class="code" href="namespacexint.html#a7a5434a5f5fb1db19f0de18014c4fc41">00123</a> <span class="keyword">const</span> <span class="keywordtype">size_t</span> <a class="code" href="namespacexint.html#a7a5434a5f5fb1db19f0de18014c4fc41">autobase</a>=(std::numeric_limits&lt;size_t&gt;::max)();
+<a name="l00124"></a>00124
+<a name="l00125"></a>00125 <span class="keyword">class </span><a class="code" href="classxint_1_1not__a__number.html" title="Exception class.">not_a_number</a>;
+<a name="l00126"></a>00126
+<a name="l00128"></a>00128 <span class="comment">// The integer class</span>
+<a name="l00129"></a>00129
+<a name="l00141"></a><a class="code" href="classxint_1_1integer.html">00141</a> <span class="keyword">class </span><a class="code" href="classxint_1_1integer.html" title="The extended integer class.">integer</a> {
+<a name="l00142"></a>00142 <span class="keyword">public</span>:
+<a name="l00143"></a>00143
+<a name="l00146"></a>00146 <a class="code" href="classxint_1_1integer.html#ad32b3b13167c61e48aede083a3e1c7a8" title="Creates a new integer with an initial value of zero.">integer</a>();
+<a name="l00147"></a>00147 <a class="code" href="classxint_1_1integer.html#ad32b3b13167c61e48aede083a3e1c7a8" title="Creates a new integer with an initial value of zero.">integer</a>(<span class="keyword">const</span> <a class="code" href="classxint_1_1integer.html" title="The extended integer class.">integer</a>&amp; b);
+<a name="l00148"></a>00148 <span class="keyword">template</span> &lt;<span class="keyword">typename</span> T&gt; <a class="code" href="classxint_1_1integer.html#ad32b3b13167c61e48aede083a3e1c7a8" title="Creates a new integer with an initial value of zero.">integer</a>(<span class="keyword">const</span> T&amp; n,
+<a name="l00149"></a>00149 <span class="keyword">typename</span> boost::enable_if&lt;boost::is_integral&lt;T&gt; &gt;::type* = 0,
+<a name="l00150"></a>00150 <span class="keyword">typename</span> boost::enable_if&lt;boost::is_signed&lt;T&gt; &gt;::type* = 0);
+<a name="l00151"></a>00151 <span class="keyword">template</span> &lt;<span class="keyword">typename</span> T&gt; <a class="code" href="classxint_1_1integer.html#ad32b3b13167c61e48aede083a3e1c7a8" title="Creates a new integer with an initial value of zero.">integer</a>(<span class="keyword">const</span> T&amp; n,
+<a name="l00152"></a>00152 <span class="keyword">typename</span> boost::enable_if&lt;boost::is_integral&lt;T&gt; &gt;::type* = 0,
+<a name="l00153"></a>00153 <span class="keyword">typename</span> boost::enable_if&lt;boost::is_unsigned&lt;T&gt; &gt;::type* = 0);
+<a name="l00154"></a>00154 <span class="keyword">explicit</span> <a class="code" href="classxint_1_1integer.html#ad32b3b13167c61e48aede083a3e1c7a8" title="Creates a new integer with an initial value of zero.">integer</a>(<span class="keyword">const</span> std::string&amp; str, <span class="keywordtype">size_t</span> base=10);
+<a name="l00155"></a>00155 <span class="keyword">explicit</span> <a class="code" href="classxint_1_1integer.html#ad32b3b13167c61e48aede083a3e1c7a8" title="Creates a new integer with an initial value of zero.">integer</a>(<span class="keyword">const</span> <a class="code" href="classxint_1_1not__a__number.html" title="Exception class.">not_a_number</a>&amp;);
+<a name="l00156"></a>00156 <a class="code" href="classxint_1_1integer.html#a4f687cc90353b1c347448f1d94fa157e">~integer</a>();
+<a name="l00158"></a>00158
+<a name="l00167"></a>00167 <a class="code" href="classxint_1_1integer.html" title="The extended integer class.">integer</a>&amp; <a class="code" href="classxint_1_1integer.html#abfa13a313f2782885bbbfa9a5f4a22c2">operator=</a>(<span class="keyword">const</span> <a class="code" href="classxint_1_1integer.html" title="The extended integer class.">integer</a> &amp;c);
+<a name="l00168"></a>00168
+<a name="l00169"></a>00169 <a class="code" href="classxint_1_1integer.html" title="The extended integer class.">integer</a>&amp; <a class="code" href="classxint_1_1integer.html#aa0259f75f66b97b68310cfed2c0ecc7b">operator+=</a>(<span class="keyword">const</span> <a class="code" href="classxint_1_1integer.html" title="The extended integer class.">integer</a>&amp; b);
+<a name="l00170"></a>00170 <a class="code" href="classxint_1_1integer.html" title="The extended integer class.">integer</a>&amp; <a class="code" href="classxint_1_1integer.html#a2ce7f54adccb88836d1474fc67fa9a62">operator-=</a>(<span class="keyword">const</span> <a class="code" href="classxint_1_1integer.html" title="The extended integer class.">integer</a>&amp; b);
+<a name="l00171"></a>00171 <a class="code" href="classxint_1_1integer.html" title="The extended integer class.">integer</a>&amp; <a class="code" href="classxint_1_1integer.html#a531cdc9ce5667c4553fd1e4dac151b51">operator*=</a>(<span class="keyword">const</span> <a class="code" href="classxint_1_1integer.html" title="The extended integer class.">integer</a>&amp; b);
+<a name="l00172"></a>00172 <a class="code" href="classxint_1_1integer.html" title="The extended integer class.">integer</a>&amp; <a class="code" href="classxint_1_1integer.html#a3366a33f7ca5ad3285515e260d0dce66">operator/=</a>(<span class="keyword">const</span> <a class="code" href="classxint_1_1integer.html" title="The extended integer class.">integer</a>&amp; b);
+<a name="l00173"></a>00173 <a class="code" href="classxint_1_1integer.html" title="The extended integer class.">integer</a>&amp; <a class="code" href="classxint_1_1integer.html#abee8874a961c2bb15a288494e096f36b">operator%=</a>(<span class="keyword">const</span> <a class="code" href="classxint_1_1integer.html" title="The extended integer class.">integer</a>&amp; b);
+<a name="l00174"></a>00174
+<a name="l00175"></a>00175 <a class="code" href="classxint_1_1integer.html" title="The extended integer class.">integer</a>&amp; <a class="code" href="classxint_1_1integer.html#a60cd241278892070d14a0d57e45c9264">operator++</a>();
+<a name="l00176"></a>00176 <a class="code" href="classxint_1_1integer.html" title="The extended integer class.">integer</a>&amp; <a class="code" href="classxint_1_1integer.html#a48452b868e2279e202039c9918f0dcf3">operator--</a>();
+<a name="l00177"></a>00177 <a class="code" href="classxint_1_1integer.html" title="The extended integer class.">integer</a> <a class="code" href="classxint_1_1integer.html#a60cd241278892070d14a0d57e45c9264">operator++</a>(<span class="keywordtype">int</span>);
+<a name="l00178"></a>00178 <a class="code" href="classxint_1_1integer.html" title="The extended integer class.">integer</a> <a class="code" href="classxint_1_1integer.html#a48452b868e2279e202039c9918f0dcf3">operator--</a>(<span class="keywordtype">int</span>);
+<a name="l00179"></a>00179
+<a name="l00180"></a>00180 <a class="code" href="classxint_1_1integer.html" title="The extended integer class.">integer</a>&amp; <a class="code" href="classxint_1_1integer.html#a0d4c730e3d45d3fa2895b706b202d860">operator&amp;=</a>(<span class="keyword">const</span> <a class="code" href="classxint_1_1integer.html" title="The extended integer class.">integer</a>&amp; n);
+<a name="l00181"></a>00181 <a class="code" href="classxint_1_1integer.html" title="The extended integer class.">integer</a>&amp; <a class="code" href="classxint_1_1integer.html#a1af418341e64a317b4cc41fcddaa849f">operator|=</a>(<span class="keyword">const</span> <a class="code" href="classxint_1_1integer.html" title="The extended integer class.">integer</a>&amp; n);
+<a name="l00182"></a>00182 <a class="code" href="classxint_1_1integer.html" title="The extended integer class.">integer</a>&amp; <a class="code" href="classxint_1_1integer.html#afc13b5ae9c6f28ef5e75777976aeb56d">operator^=</a>(<span class="keyword">const</span> <a class="code" href="classxint_1_1integer.html" title="The extended integer class.">integer</a>&amp; n);
+<a name="l00183"></a>00183 <a class="code" href="classxint_1_1integer.html" title="The extended integer class.">integer</a> <a class="code" href="classxint_1_1integer.html#a3733741d7e1c8ba1c1f490c8949a308f">operator&lt;&lt;</a>(<span class="keywordtype">size_t</span> <a class="code" href="namespacexint.html#a4f4dacd6f9398aaa500112731ab713ce" title="Bit-shift an integer, in either direction.">shift</a>) <span class="keyword">const</span>;
+<a name="l00184"></a>00184 <a class="code" href="classxint_1_1integer.html" title="The extended integer class.">integer</a> <a class="code" href="classxint_1_1integer.html#a5cbc6986de4ca89b49162736f8750986">operator&gt;&gt;</a>(<span class="keywordtype">size_t</span> shift) <span class="keyword">const</span>;
+<a name="l00185"></a>00185 <a class="code" href="classxint_1_1integer.html" title="The extended integer class.">integer</a>&amp; <a class="code" href="classxint_1_1integer.html#a14545146f86ed797e97758d8aea32ecd">operator&lt;&lt;=</a>(<span class="keywordtype">size_t</span> shift);
+<a name="l00186"></a>00186 <a class="code" href="classxint_1_1integer.html" title="The extended integer class.">integer</a>&amp; <a class="code" href="classxint_1_1integer.html#aa0151e58a97bc1801221907d68582ec2">operator&gt;&gt;=</a>(<span class="keywordtype">size_t</span> shift);
+<a name="l00188"></a>00188
+<a name="l00197"></a>00197 <span class="keyword">static</span> <span class="keyword">const</span> <a class="code" href="classxint_1_1integer.html" title="The extended integer class.">integer</a>&amp; <a class="code" href="classxint_1_1integer.html#a64a0f99de7c33239237cb59d8464f3d2">zero</a>();
+<a name="l00198"></a>00198 <span class="keyword">static</span> <span class="keyword">const</span> <a class="code" href="classxint_1_1integer.html" title="The extended integer class.">integer</a>&amp; <a class="code" href="classxint_1_1integer.html#a9237b21f4162146c7b5749b169c081b8">one</a>();
+<a name="l00200"></a>00200
+<a name="l00203"></a>00203 <span class="keywordtype">bool</span> <a class="code" href="classxint_1_1integer.html#af2d420708a02755a8851140928e50e23" title="Tests the lowest bit of *this to determine oddness.">odd</a>() <span class="keyword">const</span>;
+<a name="l00204"></a>00204 <span class="keywordtype">bool</span> <a class="code" href="classxint_1_1integer.html#a2ffb63eee276c65d8ea8b365adeb1ee2" title="Tests the lowest bit of *this to determine evenness.">even</a>() <span class="keyword">const</span>;
+<a name="l00205"></a>00205 <span class="keywordtype">int</span> <a class="code" href="classxint_1_1integer.html#a5d84398ce89b376f695ccded2d20c8c2" title="Tests the sign of *this.">sign</a>() <span class="keyword">const</span>;
+<a name="l00206"></a>00206 <span class="keywordtype">bool</span> <a class="code" href="classxint_1_1integer.html#a0bca68386478755dc787f981d9cd5606" title="Tests *this for Not-a-Number.">is_nan</a>() <span class="keyword">const</span>;
+<a name="l00207"></a>00207
+<a name="l00208"></a>00208 <span class="keywordtype">size_t</span> <a class="code" href="classxint_1_1integer.html#a25f066e30e4548bc22e0e9d75b809955" title="Tells you roughly how large an integer is.">hex_digits</a>() <span class="keyword">const</span>;
+<a name="l00209"></a>00209
+<a name="l00210"></a>00210
+<a name="l00216"></a><a class="code" href="classxint_1_1integer.html#ae5578d7d5be17df3ecd3ddc5a852d0a0">00216</a> <a class="code" href="structxint_1_1detail_1_1data__t.html" title="Holds the internal details of an xint::integer.">detail::data_t</a> *<a class="code" href="classxint_1_1integer.html#ae5578d7d5be17df3ecd3ddc5a852d0a0">_get_data</a>() { <span class="keywordflow">return</span> data; }
+<a name="l00217"></a><a class="code" href="classxint_1_1integer.html#aff99f7868567ae0dd4666a985873a5a7">00217</a> <span class="keyword">const</span> <a class="code" href="structxint_1_1detail_1_1data__t.html" title="Holds the internal details of an xint::integer.">detail::data_t</a> *<a class="code" href="classxint_1_1integer.html#aff99f7868567ae0dd4666a985873a5a7">_get_data</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> data; }
+<a name="l00218"></a>00218 <a class="code" href="namespacexint_1_1detail.html#a8843fb7e364832d8d5983de28bdbcf34">detail::digit_t</a> <a class="code" href="classxint_1_1integer.html#a81ab47d2f92ec66ac1586b61d7fd8b60">_get_digit</a>(<span class="keywordtype">size_t</span> index) <span class="keyword">const</span>;
+<a name="l00219"></a>00219 <a class="code" href="namespacexint_1_1detail.html#a8843fb7e364832d8d5983de28bdbcf34">detail::digit_t</a> <a class="code" href="classxint_1_1integer.html#a81ab47d2f92ec66ac1586b61d7fd8b60">_get_digit</a>(<span class="keywordtype">size_t</span> index, <span class="keywordtype">bool</span>) <span class="keyword">const</span>;
+<a name="l00220"></a>00220 <span class="keywordtype">size_t</span> <a class="code" href="classxint_1_1integer.html#a5723a74b98da2d5ed9452a7ec10c0ca2">_get_length</a>() <span class="keyword">const</span>;
+<a name="l00221"></a>00221 <span class="keywordtype">void</span> <a class="code" href="classxint_1_1integer.html#ab2f4df250e1030c518180b7e832c5ebd">_set_negative</a>(<span class="keywordtype">bool</span> negative);
+<a name="l00222"></a>00222 <span class="keywordtype">void</span> <a class="code" href="classxint_1_1integer.html#adc5c7b5bc30c0cfa30d62610e0bc0366">_make_unique</a>();
+<a name="l00223"></a>00223 <span class="keywordtype">void</span> <a class="code" href="classxint_1_1integer.html#ad5935c358b92f15064b1f910613f7a3e">_throw_if_nan</a>() <span class="keyword">const</span>;
+<a name="l00225"></a>00225
+<a name="l00226"></a>00226 <span class="keyword">private</span>:
+<a name="l00227"></a>00227 <span class="keywordtype">void</span> _init(<a class="code" href="namespacexint_1_1detail.html#a8843fb7e364832d8d5983de28bdbcf34">detail::digit_t</a> init=0);
+<a name="l00228"></a>00228 <span class="keywordtype">void</span> _init(<span class="keyword">const</span> <a class="code" href="classxint_1_1integer.html" title="The extended integer class.">integer</a> &amp;c);
+<a name="l00229"></a>00229 <span class="keywordtype">void</span> _init(boost::uintmax_t n);
+<a name="l00230"></a>00230 <span class="keywordtype">void</span> _attach();
+<a name="l00231"></a>00231 <span class="keywordtype">void</span> _detach();
+<a name="l00232"></a>00232
+<a name="l00233"></a>00233 <a class="code" href="structxint_1_1detail_1_1data__t.html" title="Holds the internal details of an xint::integer.">detail::data_t</a> *data;
+<a name="l00234"></a>00234 };
+<a name="l00235"></a>00235
+<a name="l00237"></a>00237
+<a name="l00245"></a><a class="code" href="classxint_1_1strong__random__generator.html">00245</a> <span class="keyword">class </span><a class="code" href="classxint_1_1strong__random__generator.html" title="A convenience class for cryptographically-secure random numbers.">strong_random_generator</a> {
+<a name="l00246"></a>00246 <span class="keyword">public</span>:
+<a name="l00247"></a><a class="code" href="classxint_1_1strong__random__generator.html#a470b586d0730deb716ffa3c13164e493">00247</a> <span class="keyword">typedef</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> <a class="code" href="classxint_1_1strong__random__generator.html#a470b586d0730deb716ffa3c13164e493">result_type</a>;
+<a name="l00248"></a>00248
+<a name="l00249"></a>00249 <a class="code" href="classxint_1_1strong__random__generator.html#a8841d21b6614967e0520f55c3093871a">strong_random_generator</a>();
+<a name="l00250"></a>00250 <a class="code" href="classxint_1_1strong__random__generator.html#ac75f659c2adb7c822d49fe534b2d76a4">~strong_random_generator</a>();
+<a name="l00251"></a>00251 <a class="code" href="classxint_1_1strong__random__generator.html#a470b586d0730deb716ffa3c13164e493">result_type</a> <a class="code" href="classxint_1_1strong__random__generator.html#a2bbb1944511585f66e5daec4737bd4e7">operator()</a>();
+<a name="l00252"></a>00252
+<a name="l00253"></a><a class="code" href="classxint_1_1strong__random__generator.html#a1a808cca9189eb64f420e4745ca5122d">00253</a> <span class="keyword">static</span> <span class="keyword">const</span> <span class="keywordtype">bool</span> <a class="code" href="classxint_1_1strong__random__generator.html#a1a808cca9189eb64f420e4745ca5122d">has_fixed_range</a>;
+<a name="l00254"></a><a class="code" href="classxint_1_1strong__random__generator.html#a4bea7dba7f086441548dfee576e54fce">00254</a> <span class="keyword">static</span> <span class="keyword">const</span> <a class="code" href="classxint_1_1strong__random__generator.html#a470b586d0730deb716ffa3c13164e493">result_type</a> <a class="code" href="classxint_1_1strong__random__generator.html#a4bea7dba7f086441548dfee576e54fce">min_value</a>;
+<a name="l00255"></a><a class="code" href="classxint_1_1strong__random__generator.html#aea47e4fbf8b0fe5914ade7ce2704a3c3">00255</a> <span class="keyword">static</span> <span class="keyword">const</span> <a class="code" href="classxint_1_1strong__random__generator.html#a470b586d0730deb716ffa3c13164e493">result_type</a> <a class="code" href="classxint_1_1strong__random__generator.html#aea47e4fbf8b0fe5914ade7ce2704a3c3">max_value</a>;
+<a name="l00256"></a>00256 <a class="code" href="classxint_1_1strong__random__generator.html#a470b586d0730deb716ffa3c13164e493">result_type</a> <a class="code" href="classxint_1_1strong__random__generator.html#a5ec89070a7a7338c2b7318086efef701">min</a>() <span class="keyword">const</span>;
+<a name="l00257"></a>00257 <a class="code" href="classxint_1_1strong__random__generator.html#a470b586d0730deb716ffa3c13164e493">result_type</a> <a class="code" href="classxint_1_1strong__random__generator.html#a1327ad0fe9d6f1f1c851456592b178db">max</a>() <span class="keyword">const</span>;
+<a name="l00258"></a>00258 <span class="keywordtype">double</span> <a class="code" href="classxint_1_1strong__random__generator.html#a57ff17a9c2b36775acfedd53f5a0b30e">entropy</a>() <span class="keyword">const</span>;
+<a name="l00259"></a>00259
+<a name="l00260"></a>00260 <span class="keyword">private</span>:
+<a name="l00261"></a>00261 <span class="keyword">struct </span>impl_t;
+<a name="l00262"></a>00262 impl_t *impl;
+<a name="l00263"></a>00263 };
+<a name="l00264"></a>00264
+<a name="l00266"></a>00266
+<a name="l00272"></a>00272
+<a name="l00273"></a>00273 <span class="keywordtype">bool</span> <a class="code" href="namespacexint.html#ac8be41374700d89400f5ecddf0f789e3" title="Query whether exceptions are currently allowed or blocked.">exceptions_allowed</a>();
+<a name="l00274"></a>00274 <a class="code" href="structxint_1_1detail_1_1token.html" title="An empty struct, used in xint::token.">token</a> <a class="code" href="namespacexint.html#ae7e3f6afc701f6e8873a407bb418d04c" title="Temporarily prevent the library from throwing blockable exceptions.">block_exceptions</a>();
+<a name="l00275"></a>00275 <a class="code" href="structxint_1_1detail_1_1token.html" title="An empty struct, used in xint::token.">token</a> <a class="code" href="namespacexint.html#a4b5a1a791ba11bb8f158a3b56bd9723e" title="Temprarily counteract an xint::block_exceptions token to allow all exceptions.">allow_exceptions</a>();
+<a name="l00277"></a>00277
+<a name="l00279"></a>00279
+<a name="l00282"></a>00282 <a class="code" href="classxint_1_1integer.html" title="The extended integer class.">integer</a> <a class="code" href="namespacexint.html#ac9e4ed282bafa93dbf608350df0127ba" title="Returns the absolute value of an integer.">abs</a>(<span class="keyword">const</span> <a class="code" href="classxint_1_1integer.html" title="The extended integer class.">integer</a>&amp; n);
+<a name="l00283"></a>00283 <a class="code" href="classxint_1_1integer.html" title="The extended integer class.">integer</a> <a class="code" href="namespacexint.html#ab393826381b1abd9f1aca1cdb45f41f6" title="Return the additive inverse of an integer.">negate</a>(<span class="keyword">const</span> <a class="code" href="classxint_1_1integer.html" title="The extended integer class.">integer</a>&amp; n);
+<a name="l00284"></a>00284 <a class="code" href="classxint_1_1integer.html" title="The extended integer class.">integer</a> <a class="code" href="namespacexint.html#a7cc636a05af16eba73014bf88273d163" title="Calculate the sum of two integers.">add</a>(<span class="keyword">const</span> <a class="code" href="classxint_1_1integer.html" title="The extended integer class.">integer</a>&amp; n, <span class="keyword">const</span> <a class="code" href="classxint_1_1integer.html" title="The extended integer class.">integer</a>&amp; addend);
+<a name="l00285"></a>00285 <a class="code" href="classxint_1_1integer.html" title="The extended integer class.">integer</a> <a class="code" href="namespacexint.html#af196cd74cb23970032fddcce71957a80" title="Calculate the difference between two integers.">subtract</a>(<span class="keyword">const</span> <a class="code" href="classxint_1_1integer.html" title="The extended integer class.">integer</a>&amp; n, <span class="keyword">const</span> <a class="code" href="classxint_1_1integer.html" title="The extended integer class.">integer</a>&amp; subtrahend);
+<a name="l00286"></a>00286 <a class="code" href="classxint_1_1integer.html" title="The extended integer class.">integer</a> <a class="code" href="namespacexint.html#af3d7059ec08bf075cec5685deca55c5d" title="Calculate the product of two integers.">multiply</a>(<span class="keyword">const</span> <a class="code" href="classxint_1_1integer.html" title="The extended integer class.">integer</a>&amp; n, <span class="keyword">const</span> <a class="code" href="classxint_1_1integer.html" title="The extended integer class.">integer</a>&amp; multiplicand);
+<a name="l00287"></a>00287 <a class="code" href="classxint_1_1integer.html" title="The extended integer class.">integer</a> <a class="code" href="namespacexint.html#abf3d47f1ef1fdf334097fab055886a44" title="Calculate how many dividends would fit into divisor.">divide</a>(<span class="keyword">const</span> <a class="code" href="classxint_1_1integer.html" title="The extended integer class.">integer</a>&amp; dividend, <span class="keyword">const</span> <a class="code" href="classxint_1_1integer.html" title="The extended integer class.">integer</a>&amp; divisor);
+<a name="l00288"></a>00288 std::pair&lt;integer, integer&gt; <a class="code" href="namespacexint.html#a23d0a0bb05cec1917d96d6aaceeb875d" title="Calculate how many dividends would fit into divisor, with the remainder.">divide_r</a>(<span class="keyword">const</span> <a class="code" href="classxint_1_1integer.html" title="The extended integer class.">integer</a>&amp; dividend, <span class="keyword">const</span> <a class="code" href="classxint_1_1integer.html" title="The extended integer class.">integer</a>&amp;
+<a name="l00289"></a>00289 divisor);
+<a name="l00291"></a>00291
+<a name="l00293"></a>00293
+<a name="l00296"></a>00296 <a class="code" href="classxint_1_1integer.html" title="The extended integer class.">integer</a> <a class="code" href="namespacexint.html#a0aec423511839fd784b1654389dfcf5b" title="Calculate the value of n2.">sqr</a>(<span class="keyword">const</span> <a class="code" href="classxint_1_1integer.html" title="The extended integer class.">integer</a>&amp; n);
+<a name="l00297"></a>00297 <a class="code" href="classxint_1_1integer.html" title="The extended integer class.">integer</a> <a class="code" href="namespacexint.html#a186b14f991b32a818abd553b56a13a62" title="Calculate the value of ne.">pow</a>(<span class="keyword">const</span> <a class="code" href="classxint_1_1integer.html" title="The extended integer class.">integer</a>&amp; n, <span class="keyword">const</span> <a class="code" href="classxint_1_1integer.html" title="The extended integer class.">integer</a>&amp; exponent);
+<a name="l00298"></a>00298 <a class="code" href="classxint_1_1integer.html" title="The extended integer class.">integer</a> <a class="code" href="namespacexint.html#a6b723c30c28eb57f611442e0b512f551" title="Calculate the value of 2e.">pow2</a>(<span class="keywordtype">size_t</span> exponent);
+<a name="l00299"></a>00299 <a class="code" href="classxint_1_1integer.html" title="The extended integer class.">integer</a> <a class="code" href="namespacexint.html#aba188df925c87a0f33a79328e31e1a50" title="Calculate the value of n! ">factorial</a>(<span class="keywordtype">size_t</span> n);
+<a name="l00300"></a>00300 <a class="code" href="classxint_1_1integer.html" title="The extended integer class.">integer</a> <a class="code" href="namespacexint.html#a74891726f8af86736169dd43b929ad0a" title="Calculate the square root of an integer.">sqrt</a>(<span class="keyword">const</span> <a class="code" href="classxint_1_1integer.html" title="The extended integer class.">integer</a>&amp; n);
+<a name="l00302"></a>00302
+<a name="l00304"></a>00304
+<a name="l00307"></a>00307 <span class="keyword">template</span> &lt;<span class="keyword">typename</span> T&gt; T <a class="code" href="namespacexint.html#a21bd738b96eec205eedc7a9960e9a6e5" title="Efficiently converts from an xint::integer to a built-in integer type.">to</a>(<span class="keyword">const</span> <a class="code" href="classxint_1_1integer.html" title="The extended integer class.">integer</a>&amp; n);
+<a name="l00308"></a>00308 std::string <a class="code" href="namespacexint.html#a016c9573ff48411847edf86c406946a0" title="Creates a string representation of the specified integer.">to_string</a>(<span class="keyword">const</span> <a class="code" href="classxint_1_1integer.html" title="The extended integer class.">integer</a>&amp; n, <span class="keywordtype">size_t</span> base=10, <span class="keywordtype">bool</span> upperCase=<span class="keyword">false</span>);
+<a name="l00309"></a>00309 <a class="code" href="classxint_1_1integer.html" title="The extended integer class.">integer</a> <a class="code" href="namespacexint.html#ad9dcb2b835be5f8ee918979945911ac0" title="Converts a string into an integer.">from_string</a>(<span class="keyword">const</span> std::string&amp; str, <span class="keywordtype">size_t</span> base=10);
+<a name="l00310"></a>00310 std::string <a class="code" href="namespacexint.html#ab8f33201a251e3e118dc82f214e22aeb" title="Creates a binary representation of an integer, lowest byte first.">to_binary</a>(<span class="keyword">const</span> <a class="code" href="classxint_1_1integer.html" title="The extended integer class.">integer</a>&amp; n);
+<a name="l00311"></a>00311 <a class="code" href="classxint_1_1integer.html" title="The extended integer class.">integer</a> <a class="code" href="namespacexint.html#ac2ac2f74b45e4179560d845e6310be9a" title="Converts a binary representation of a number into an integer.">from_binary</a>(<span class="keyword">const</span> std::string&amp; s);
+<a name="l00313"></a>00313
+<a name="l00315"></a>00315
+<a name="l00318"></a>00318 <span class="keywordtype">bool</span> <a class="code" href="namespacexint.html#a07bc7378c8a55e5f92aaef6d8b8ce952" title="Queries the value of a particular bit in an integer.">getbit</a>(<span class="keyword">const</span> <a class="code" href="classxint_1_1integer.html" title="The extended integer class.">integer</a>&amp; n, <span class="keywordtype">size_t</span> bit);
+<a name="l00319"></a>00319 <span class="keywordtype">void</span> <a class="code" href="namespacexint.html#adf2652627e78682c17e120816987984a" title="Sets a specific bit in an integer to one.">setbit</a>(<a class="code" href="classxint_1_1integer.html" title="The extended integer class.">integer</a>&amp; n, <span class="keywordtype">size_t</span> bit);
+<a name="l00320"></a>00320 <span class="keywordtype">void</span> <a class="code" href="namespacexint.html#a8982e3e3ab7c1c763416eadc479d9724" title="Sets a specific bit in an integer to zero.">clearbit</a>(<a class="code" href="classxint_1_1integer.html" title="The extended integer class.">integer</a>&amp; n, <span class="keywordtype">size_t</span> bit);
+<a name="l00321"></a>00321 <span class="keywordtype">size_t</span> <a class="code" href="namespacexint.html#ae04d70f50c4ce73d27ab32b1bf3520f2" title="Obtains the index of the lowest bit in an integer with a value of one.">lowestbit</a>(<span class="keyword">const</span> <a class="code" href="classxint_1_1integer.html" title="The extended integer class.">integer</a>&amp; n, <span class="keywordtype">size_t</span> valueIfZero=0);
+<a name="l00322"></a>00322 <span class="keywordtype">size_t</span> <a class="code" href="namespacexint.html#ae08828243165ef3f397461507368a6e5" title="Obtains the index of the highest bit in an integer with a value of one.">highestbit</a>(<span class="keyword">const</span> <a class="code" href="classxint_1_1integer.html" title="The extended integer class.">integer</a>&amp; n, <span class="keywordtype">size_t</span> valueIfZero=0);
+<a name="l00323"></a>00323 <a class="code" href="classxint_1_1integer.html" title="The extended integer class.">integer</a> <a class="code" href="namespacexint.html#a06138585f07fe098e24718c46e3078e1" title="Combine two integers using a bitwise AND operation.">bitwise_and</a>(<span class="keyword">const</span> <a class="code" href="classxint_1_1integer.html" title="The extended integer class.">integer</a>&amp; n1, <span class="keyword">const</span> <a class="code" href="classxint_1_1integer.html" title="The extended integer class.">integer</a>&amp; n2);
+<a name="l00324"></a>00324 <a class="code" href="classxint_1_1integer.html" title="The extended integer class.">integer</a> <a class="code" href="namespacexint.html#a8cd0a0dbc779e5a75c9e2f8027474e9a" title="Combine two integers using a bitwise OR operation.">bitwise_or</a> (<span class="keyword">const</span> <a class="code" href="classxint_1_1integer.html" title="The extended integer class.">integer</a>&amp; n1, <span class="keyword">const</span> <a class="code" href="classxint_1_1integer.html" title="The extended integer class.">integer</a>&amp; n2);
+<a name="l00325"></a>00325 <a class="code" href="classxint_1_1integer.html" title="The extended integer class.">integer</a> <a class="code" href="namespacexint.html#a9ffe18a09f5dd354af7b967b032d3cbe" title="Combine two integers using a bitwise XOR operation.">bitwise_xor</a>(<span class="keyword">const</span> <a class="code" href="classxint_1_1integer.html" title="The extended integer class.">integer</a>&amp; n1, <span class="keyword">const</span> <a class="code" href="classxint_1_1integer.html" title="The extended integer class.">integer</a>&amp; n2);
+<a name="l00326"></a>00326 <a class="code" href="classxint_1_1integer.html" title="The extended integer class.">integer</a> <a class="code" href="namespacexint.html#a4f4dacd6f9398aaa500112731ab713ce" title="Bit-shift an integer, in either direction.">shift</a>(<span class="keyword">const</span> <a class="code" href="classxint_1_1integer.html" title="The extended integer class.">integer</a>&amp; n, <span class="keywordtype">int</span> byBits);
+<a name="l00327"></a>00327 <a class="code" href="classxint_1_1integer.html" title="The extended integer class.">integer</a> <a class="code" href="namespacexint.html#a6799cc3c4d8c963279be64b209bfd3b6" title="Left-shift an integer by a specified number of bits.">shift_left</a>(<span class="keyword">const</span> <a class="code" href="classxint_1_1integer.html" title="The extended integer class.">integer</a>&amp; n, <span class="keywordtype">size_t</span> byBits);
+<a name="l00328"></a>00328 <a class="code" href="classxint_1_1integer.html" title="The extended integer class.">integer</a> <a class="code" href="namespacexint.html#a49a5a4220cb88b7446545e4b65950473" title="Right-shift an integer by a specified number of bits.">shift_right</a>(<span class="keyword">const</span> <a class="code" href="classxint_1_1integer.html" title="The extended integer class.">integer</a>&amp; n, <span class="keywordtype">size_t</span> byBits);
+<a name="l00330"></a>00330
+<a name="l00332"></a>00332
+<a name="l00338"></a>00338
+<a name="l00339"></a>00339 <a class="code" href="classxint_1_1integer.html" title="The extended integer class.">integer</a> <a class="code" href="namespacexint.html#ad5a8cc6e57ee8abdc21be98275657cc8" title="Get the remainder after dividing a number by another.">mod</a>(<span class="keyword">const</span> <a class="code" href="classxint_1_1integer.html" title="The extended integer class.">integer</a>&amp; n, <span class="keyword">const</span> <a class="code" href="classxint_1_1integer.html" title="The extended integer class.">integer</a>&amp; modBy);
+<a name="l00340"></a>00340 <a class="code" href="classxint_1_1integer.html" title="The extended integer class.">integer</a> <a class="code" href="namespacexint.html#adbbde6cc4b65e9a3df8c52adad9c540f" title="Get the modular product of two integers.">mulmod</a>(<span class="keyword">const</span> <a class="code" href="classxint_1_1integer.html" title="The extended integer class.">integer</a>&amp; n, <span class="keyword">const</span> <a class="code" href="classxint_1_1integer.html" title="The extended integer class.">integer</a>&amp; by, <span class="keyword">const</span> <a class="code" href="classxint_1_1integer.html" title="The extended integer class.">integer</a>&amp; modulus);
+<a name="l00341"></a>00341 <a class="code" href="classxint_1_1integer.html" title="The extended integer class.">integer</a> <a class="code" href="namespacexint.html#aa5564979e78556afdc68dbbd744a0bcb" title="Get the modular product of squaring an integer.">sqrmod</a>(<span class="keyword">const</span> <a class="code" href="classxint_1_1integer.html" title="The extended integer class.">integer</a>&amp; n, <span class="keyword">const</span> <a class="code" href="classxint_1_1integer.html" title="The extended integer class.">integer</a>&amp; modulus);
+<a name="l00342"></a>00342 <a class="code" href="classxint_1_1integer.html" title="The extended integer class.">integer</a> <a class="code" href="namespacexint.html#ac54e9be3a8b131f882f88e57b0ef1c9c" title="Get the result of ne % m, keeping the intermediate results (relatively) small.">powmod</a>(<span class="keyword">const</span> <a class="code" href="classxint_1_1integer.html" title="The extended integer class.">integer</a>&amp; n, <span class="keyword">const</span> <a class="code" href="classxint_1_1integer.html" title="The extended integer class.">integer</a>&amp; exponent, <span class="keyword">const</span> <a class="code" href="classxint_1_1integer.html" title="The extended integer class.">integer</a>&amp;
+<a name="l00343"></a>00343 modulus, <span class="keywordtype">bool</span> noMontgomery=<span class="keyword">false</span>);
+<a name="l00344"></a>00344 <a class="code" href="classxint_1_1integer.html" title="The extended integer class.">integer</a> <a class="code" href="namespacexint.html#a4a79f60ebe198eadf10b63924018ce66" title="Get the modular inverse of a number in a modulus, if there is one.">invmod</a>(<span class="keyword">const</span> <a class="code" href="classxint_1_1integer.html" title="The extended integer class.">integer</a>&amp; n, <span class="keyword">const</span> <a class="code" href="classxint_1_1integer.html" title="The extended integer class.">integer</a>&amp; modulus);
+<a name="l00346"></a>00346
+<a name="l00348"></a>00348
+<a name="l00351"></a>00351 <span class="keyword">template</span> &lt;<span class="keyword">typename</span> T&gt; <span class="keywordtype">void</span> <a class="code" href="namespacexint.html#a9c50302b216b64d17d9c1d6350e88036" title="Change the random generator that the library uses.">set_random_generator</a>(T *gen);
+<a name="l00352"></a>00352 <a class="code" href="classxint_1_1integer.html" title="The extended integer class.">integer</a> <a class="code" href="namespacexint.html#a5da6e81cb78913cc61c9f14857700b5e" title="Generates a random integer with specific attributes.">random_by_size</a>(<span class="keywordtype">size_t</span> sizeInBits, <span class="keywordtype">bool</span> highBitOn=<span class="keyword">false</span>, <span class="keywordtype">bool</span>
+<a name="l00353"></a>00353 lowBitOn=<span class="keyword">false</span>, <span class="keywordtype">bool</span> canBeNegative=<span class="keyword">false</span>);
+<a name="l00355"></a>00355
+<a name="l00357"></a>00357
+<a name="l00360"></a>00360 <span class="keywordtype">int</span> <a class="code" href="namespacexint.html#ab205c4e52dbc6825cefe3a251f6ca99f" title="Tests an integer for primality.">is_prime</a>(<span class="keyword">const</span> <a class="code" href="classxint_1_1integer.html" title="The extended integer class.">integer</a>&amp; n, <a class="code" href="namespacexint.html#ac8a660c33746c536469d347307b8da7a">callback_t</a> callback=<a class="code" href="namespacexint.html#a44496f258b36237d4cea35558a71017a">no_callback</a>);
+<a name="l00361"></a>00361 <a class="code" href="classxint_1_1integer.html" title="The extended integer class.">integer</a> <a class="code" href="namespacexint.html#afc8ba5f62561b4d2b42e32dde1a10ef3" title="Generate a randomly-generated prime number of a particular bit-size.">random_prime</a>(<span class="keywordtype">size_t</span> sizeInBits, <a class="code" href="namespacexint.html#ac8a660c33746c536469d347307b8da7a">callback_t</a> callback=<a class="code" href="namespacexint.html#a44496f258b36237d4cea35558a71017a">no_callback</a>);
+<a name="l00363"></a>00363
+<a name="l00365"></a>00365
+<a name="l00370"></a>00370
+<a name="l00371"></a>00371 <span class="keywordtype">bool</span> <a class="code" href="namespacexint.html#a675c4fe6ddda6db915450d054ed640ba">operator!</a>(<span class="keyword">const</span> <a class="code" href="classxint_1_1integer.html" title="The extended integer class.">integer</a>&amp; n1);
+<a name="l00372"></a>00372 <span class="keywordtype">bool</span> <a class="code" href="namespacexint.html#a4f4a4771bf443e6724abbd18173ecc86">operator&lt;</a>(<span class="keyword">const</span> <a class="code" href="classxint_1_1integer.html" title="The extended integer class.">integer</a>&amp; n1, <span class="keyword">const</span> <a class="code" href="classxint_1_1integer.html" title="The extended integer class.">integer</a>&amp; n2);
+<a name="l00373"></a>00373 <span class="keywordtype">bool</span> <a class="code" href="namespacexint.html#a1229d1f1efbdf3ffeac8b2964ca66093">operator&gt;</a>(<span class="keyword">const</span> <a class="code" href="classxint_1_1integer.html" title="The extended integer class.">integer</a>&amp; n1, <span class="keyword">const</span> <a class="code" href="classxint_1_1integer.html" title="The extended integer class.">integer</a>&amp; n2);
+<a name="l00374"></a>00374 <span class="keywordtype">bool</span> <a class="code" href="namespacexint.html#ab9d5f34c4d4bed1c86380d4f72edcd9b">operator&lt;=</a>(<span class="keyword">const</span> <a class="code" href="classxint_1_1integer.html" title="The extended integer class.">integer</a>&amp; n1, <span class="keyword">const</span> <a class="code" href="classxint_1_1integer.html" title="The extended integer class.">integer</a>&amp; n2);
+<a name="l00375"></a>00375 <span class="keywordtype">bool</span> <a class="code" href="namespacexint.html#a766324a6f216f3b49a3e9aa885e9531c">operator&gt;=</a>(<span class="keyword">const</span> <a class="code" href="classxint_1_1integer.html" title="The extended integer class.">integer</a>&amp; n1, <span class="keyword">const</span> <a class="code" href="classxint_1_1integer.html" title="The extended integer class.">integer</a>&amp; n2);
+<a name="l00376"></a>00376 <span class="keywordtype">bool</span> <a class="code" href="namespacexint.html#ad32051708c2a2baafa0340e19e90217b">operator==</a>(<span class="keyword">const</span> <a class="code" href="classxint_1_1integer.html" title="The extended integer class.">integer</a>&amp; n1, <span class="keyword">const</span> <a class="code" href="classxint_1_1integer.html" title="The extended integer class.">integer</a>&amp; n2);
+<a name="l00377"></a>00377 <span class="keywordtype">bool</span> <a class="code" href="namespacexint.html#aefda934d0ffacd0f44fcbbdfee19a139">operator!=</a>(<span class="keyword">const</span> <a class="code" href="classxint_1_1integer.html" title="The extended integer class.">integer</a>&amp; n1, <span class="keyword">const</span> <a class="code" href="classxint_1_1integer.html" title="The extended integer class.">integer</a>&amp; n2);
+<a name="l00378"></a>00378
+<a name="l00379"></a>00379 <span class="keyword">const</span> <a class="code" href="classxint_1_1integer.html" title="The extended integer class.">integer</a>&amp; <a class="code" href="namespacexint.html#a586fb0eb69100ec74be94008ac26670d">operator+</a>(<span class="keyword">const</span> <a class="code" href="classxint_1_1integer.html" title="The extended integer class.">integer</a>&amp; a);
+<a name="l00380"></a>00380 <a class="code" href="classxint_1_1integer.html" title="The extended integer class.">integer</a> <a class="code" href="namespacexint.html#a8a510361ed458133ebfa5fd95f8d9c27">operator-</a>(<span class="keyword">const</span> <a class="code" href="classxint_1_1integer.html" title="The extended integer class.">integer</a>&amp; a);
+<a name="l00381"></a>00381 <a class="code" href="classxint_1_1integer.html" title="The extended integer class.">integer</a> <a class="code" href="namespacexint.html#a586fb0eb69100ec74be94008ac26670d">operator+</a>(<span class="keyword">const</span> <a class="code" href="classxint_1_1integer.html" title="The extended integer class.">integer</a>&amp; n1, <span class="keyword">const</span> <a class="code" href="classxint_1_1integer.html" title="The extended integer class.">integer</a>&amp; n2);
+<a name="l00382"></a>00382 <a class="code" href="classxint_1_1integer.html" title="The extended integer class.">integer</a> <a class="code" href="namespacexint.html#a8a510361ed458133ebfa5fd95f8d9c27">operator-</a>(<span class="keyword">const</span> <a class="code" href="classxint_1_1integer.html" title="The extended integer class.">integer</a>&amp; n1, <span class="keyword">const</span> <a class="code" href="classxint_1_1integer.html" title="The extended integer class.">integer</a>&amp; n2);
+<a name="l00383"></a>00383 <a class="code" href="classxint_1_1integer.html" title="The extended integer class.">integer</a> <a class="code" href="namespacexint.html#aea36ad9037f109576d4f95ec72b5c825">operator*</a>(<span class="keyword">const</span> <a class="code" href="classxint_1_1integer.html" title="The extended integer class.">integer</a>&amp; n1, <span class="keyword">const</span> <a class="code" href="classxint_1_1integer.html" title="The extended integer class.">integer</a>&amp; n2);
+<a name="l00384"></a>00384 <a class="code" href="classxint_1_1integer.html" title="The extended integer class.">integer</a> <a class="code" href="namespacexint.html#a701217f7824c3e935fca25147da23807">operator/</a>(<span class="keyword">const</span> <a class="code" href="classxint_1_1integer.html" title="The extended integer class.">integer</a>&amp; n1, <span class="keyword">const</span> <a class="code" href="classxint_1_1integer.html" title="The extended integer class.">integer</a>&amp; n2);
+<a name="l00385"></a>00385 <a class="code" href="classxint_1_1integer.html" title="The extended integer class.">integer</a> <a class="code" href="namespacexint.html#ae0505757986a9c7133552552471aae24">operator%</a>(<span class="keyword">const</span> <a class="code" href="classxint_1_1integer.html" title="The extended integer class.">integer</a>&amp; n1, <span class="keyword">const</span> <a class="code" href="classxint_1_1integer.html" title="The extended integer class.">integer</a>&amp; n2);
+<a name="l00386"></a>00386 <a class="code" href="classxint_1_1integer.html" title="The extended integer class.">integer</a> <a class="code" href="namespacexint.html#a742550f1c62ac8c2bde8e1ceab2a466c">operator&amp;</a>(<span class="keyword">const</span> <a class="code" href="classxint_1_1integer.html" title="The extended integer class.">integer</a>&amp; n1, <span class="keyword">const</span> <a class="code" href="classxint_1_1integer.html" title="The extended integer class.">integer</a>&amp; n2);
+<a name="l00387"></a>00387 <a class="code" href="classxint_1_1integer.html" title="The extended integer class.">integer</a> <a class="code" href="namespacexint.html#afa8f2a0ac996ad45efc73b2aa056cae2">operator|</a>(<span class="keyword">const</span> <a class="code" href="classxint_1_1integer.html" title="The extended integer class.">integer</a>&amp; n1, <span class="keyword">const</span> <a class="code" href="classxint_1_1integer.html" title="The extended integer class.">integer</a>&amp; n2);
+<a name="l00388"></a>00388 <a class="code" href="classxint_1_1integer.html" title="The extended integer class.">integer</a> <a class="code" href="namespacexint.html#a81722cd257bc950ba7c56a202492544f">operator^</a>(<span class="keyword">const</span> <a class="code" href="classxint_1_1integer.html" title="The extended integer class.">integer</a>&amp; n1, <span class="keyword">const</span> <a class="code" href="classxint_1_1integer.html" title="The extended integer class.">integer</a>&amp; n2);
+<a name="l00390"></a>00390
+<a name="l00392"></a>00392
+<a name="l00395"></a>00395 <span class="keywordtype">bool</span> <a class="code" href="namespacexint.html#a820d89c1d761a0a2c06479b1c1f9cecd" title="Tells whether the library was compiled with Secure Mode enabled.">opt_secure_mode</a>();
+<a name="l00396"></a>00396 <span class="keywordtype">bool</span> <a class="code" href="namespacexint.html#ad55aa4d44083238d9ec313511f5b1dfa" title="Tells whether the library was compiled with the Thread Safe Operation option enabled...">opt_thread_safe</a>();
+<a name="l00397"></a>00397 <span class="keywordtype">int</span> <a class="code" href="namespacexint.html#aff82dd47fae4297b96282371abf4db06" title="Compare two integer objects.">compare</a>(<span class="keyword">const</span> <a class="code" href="classxint_1_1integer.html" title="The extended integer class.">integer</a> &amp;n1, <span class="keyword">const</span> <a class="code" href="classxint_1_1integer.html" title="The extended integer class.">integer</a> &amp;n2, <span class="keywordtype">bool</span> ignoresign=<span class="keyword">false</span>);
+<a name="l00398"></a>00398 <span class="keywordtype">size_t</span> <a class="code" href="namespacexint.html#aa074495871d366c760c5b0713f5ef048" title="Get the log2 value of an integer.">log2</a>(<span class="keyword">const</span> <a class="code" href="classxint_1_1integer.html" title="The extended integer class.">integer</a>&amp; n);
+<a name="l00399"></a>00399 <a class="code" href="classxint_1_1integer.html" title="The extended integer class.">integer</a> <a class="code" href="namespacexint.html#ac9e11516ac502e97be1902cde50f97e7" title="Calculate the Greatest Common Denominator of two integers.">gcd</a>(<span class="keyword">const</span> <a class="code" href="classxint_1_1integer.html" title="The extended integer class.">integer</a>&amp; num1, <span class="keyword">const</span> <a class="code" href="classxint_1_1integer.html" title="The extended integer class.">integer</a>&amp; num2);
+<a name="l00400"></a>00400 <a class="code" href="classxint_1_1integer.html" title="The extended integer class.">integer</a> <a class="code" href="namespacexint.html#a17c5e4e807cfa425f48d9f5b464bc8dc" title="Calculate the Least Common Multiple of two integers.">lcm</a>(<span class="keyword">const</span> <a class="code" href="classxint_1_1integer.html" title="The extended integer class.">integer</a>&amp; num1, <span class="keyword">const</span> <a class="code" href="classxint_1_1integer.html" title="The extended integer class.">integer</a>&amp; num2);
+<a name="l00402"></a>00402
+<a name="l00404"></a>00404 <span class="comment">// Exception classes</span>
+<a name="l00405"></a>00405
+<a name="l00408"></a>00408
+<a name="l00412"></a><a class="code" href="classxint_1_1invalid__base.html">00412</a> <span class="keyword">class </span><a class="code" href="classxint_1_1invalid__base.html" title="Exception class.">invalid_base</a>: <span class="keyword">public</span> std::invalid_argument {
+<a name="l00413"></a>00413 <span class="keyword">public</span>:
+<a name="l00414"></a><a class="code" href="classxint_1_1invalid__base.html#a16a577d5584652ca358450cbb55b5d55">00414</a> <a class="code" href="classxint_1_1invalid__base.html#a16a577d5584652ca358450cbb55b5d55">invalid_base</a>(<span class="keyword">const</span> std::string&amp; what=<span class="stringliteral">&quot;invalid base&quot;</span>): invalid_argument(what)
+<a name="l00415"></a>00415 { }
+<a name="l00416"></a>00416 };
+<a name="l00417"></a>00417
+<a name="l00422"></a><a class="code" href="classxint_1_1invalid__digit.html">00422</a> <span class="keyword">class </span><a class="code" href="classxint_1_1invalid__digit.html" title="Exception class.">invalid_digit</a>: <span class="keyword">public</span> std::range_error {
+<a name="l00423"></a>00423 <span class="keyword">public</span>:
+<a name="l00424"></a><a class="code" href="classxint_1_1invalid__digit.html#a832283e75569bd7e9d09f38ebae87a27">00424</a> <a class="code" href="classxint_1_1invalid__digit.html#a832283e75569bd7e9d09f38ebae87a27">invalid_digit</a>(<span class="keyword">const</span> std::string&amp; what=<span class="stringliteral">&quot;invalid digit&quot;</span>): range_error(what)
+<a name="l00425"></a>00425 { }
+<a name="l00426"></a>00426 };
+<a name="l00427"></a>00427
+<a name="l00432"></a><a class="code" href="classxint_1_1invalid__modulus.html">00432</a> <span class="keyword">class </span><a class="code" href="classxint_1_1invalid__modulus.html" title="Exception class.">invalid_modulus</a>: <span class="keyword">public</span> std::invalid_argument {
+<a name="l00433"></a>00433 <span class="keyword">public</span>:
+<a name="l00434"></a><a class="code" href="classxint_1_1invalid__modulus.html#a691026e352d38fc5120c12d6d134e854">00434</a> <a class="code" href="classxint_1_1invalid__modulus.html#a691026e352d38fc5120c12d6d134e854">invalid_modulus</a>(<span class="keyword">const</span> std::string&amp; what=<span class="stringliteral">&quot;invalid modulus&quot;</span>):
+<a name="l00435"></a>00435 invalid_argument(what) { }
+<a name="l00436"></a>00436 };
+<a name="l00437"></a>00437
+<a name="l00442"></a><a class="code" href="classxint_1_1divide__by__zero.html">00442</a> <span class="keyword">class </span><a class="code" href="classxint_1_1divide__by__zero.html" title="Exception class.">divide_by_zero</a>: <span class="keyword">public</span> std::invalid_argument {
+<a name="l00443"></a>00443 <span class="keyword">public</span>:
+<a name="l00444"></a><a class="code" href="classxint_1_1divide__by__zero.html#a31233d42a45ca6ef7078e700fa114ad2">00444</a> <a class="code" href="classxint_1_1divide__by__zero.html#a31233d42a45ca6ef7078e700fa114ad2">divide_by_zero</a>(<span class="keyword">const</span> std::string&amp; what=<span class="stringliteral">&quot;divide by zero error&quot;</span>):
+<a name="l00445"></a>00445 invalid_argument(what) { }
+<a name="l00446"></a>00446 };
+<a name="l00447"></a>00447
+<a name="l00452"></a><a class="code" href="classxint_1_1cannot__represent.html">00452</a> <span class="keyword">class </span><a class="code" href="classxint_1_1cannot__represent.html" title="Exception class.">cannot_represent</a>: <span class="keyword">public</span> std::invalid_argument {
+<a name="l00453"></a>00453 <span class="keyword">public</span>:
+<a name="l00454"></a><a class="code" href="classxint_1_1cannot__represent.html#ae551af601d2ab445a380a9c48e2a1db9">00454</a> <a class="code" href="classxint_1_1cannot__represent.html#ae551af601d2ab445a380a9c48e2a1db9">cannot_represent</a>(<span class="keyword">const</span> std::string&amp; what=
+<a name="l00455"></a>00455 <span class="stringliteral">&quot;cannot represent the requested value&quot;</span>): invalid_argument(what) { }
+<a name="l00456"></a>00456 };
+<a name="l00457"></a>00457
+<a name="l00462"></a><a class="code" href="classxint_1_1too__big.html">00462</a> <span class="keyword">class </span><a class="code" href="classxint_1_1too__big.html" title="Exception class.">too_big</a>: <span class="keyword">public</span> std::range_error {
+<a name="l00463"></a>00463 <span class="keyword">public</span>:
+<a name="l00464"></a><a class="code" href="classxint_1_1too__big.html#af57a30cd18f06bef869c35b9c98f6115">00464</a> <a class="code" href="classxint_1_1too__big.html#af57a30cd18f06bef869c35b9c98f6115">too_big</a>(<span class="keyword">const</span> std::string&amp; what=
+<a name="l00465"></a>00465 <span class="stringliteral">&quot;value out of range for requested conversion&quot;</span>): range_error(what) { }
+<a name="l00466"></a>00466 };
+<a name="l00467"></a>00467
+<a name="l00485"></a><a class="code" href="classxint_1_1not__a__number.html">00485</a> <span class="keyword">class </span><a class="code" href="classxint_1_1not__a__number.html" title="Exception class.">not_a_number</a>: <span class="keyword">public</span> std::runtime_error {
+<a name="l00486"></a>00486 <span class="keyword">public</span>:
+<a name="l00487"></a><a class="code" href="classxint_1_1not__a__number.html#a4ecc5bcc06a5d660176d51fc63c996cd">00487</a> <a class="code" href="classxint_1_1not__a__number.html#a4ecc5bcc06a5d660176d51fc63c996cd">not_a_number</a>(<span class="keyword">const</span> std::string&amp; what=<span class="stringliteral">&quot;attempted to use a Not-a-Number&quot;</span>):
+<a name="l00488"></a>00488 runtime_error(what) { }
+<a name="l00489"></a>00489 };
+<a name="l00490"></a>00490
+<a name="l00497"></a><a class="code" href="classxint_1_1no__strong__random.html">00497</a> <span class="keyword">class </span><a class="code" href="classxint_1_1no__strong__random.html" title="Exception class.">no_strong_random</a>: <span class="keyword">public</span> std::runtime_error {
+<a name="l00498"></a>00498 <span class="keyword">public</span>:
+<a name="l00499"></a><a class="code" href="classxint_1_1no__strong__random.html#a1ed9b4ac87613e636ad8f87bacf25544">00499</a> <a class="code" href="classxint_1_1no__strong__random.html#a1ed9b4ac87613e636ad8f87bacf25544">no_strong_random</a>(<span class="keyword">const</span> std::string&amp; what=
+<a name="l00500"></a>00500 <span class="stringliteral">&quot;system does not have a strong random generator&quot;</span>):
+<a name="l00501"></a>00501 runtime_error(what) { }
+<a name="l00502"></a>00502 };
+<a name="l00503"></a>00503
+<a name="l00516"></a><a class="code" href="classxint_1_1overflow__error.html">00516</a> <span class="keyword">class </span><a class="code" href="classxint_1_1overflow__error.html" title="Exception class.">overflow_error</a>: <span class="keyword">public</span> std::<a class="code" href="classxint_1_1overflow__error.html" title="Exception class.">overflow_error</a> {
+<a name="l00517"></a>00517 <span class="keyword">public</span>:
+<a name="l00518"></a><a class="code" href="classxint_1_1overflow__error.html#a126d839e9138532447e0de9e39d1b4c8">00518</a> <a class="code" href="classxint_1_1overflow__error.html#a126d839e9138532447e0de9e39d1b4c8">overflow_error</a>(<span class="keyword">const</span> std::string&amp; what=
+<a name="l00519"></a>00519 <span class="stringliteral">&quot;overflow error: can&apos;t obtain enough memory to represent the requested number&quot;</span>):
+<a name="l00520"></a>00520 std::<a class="code" href="classxint_1_1overflow__error.html" title="Exception class.">overflow_error</a>(what) { }
+<a name="l00521"></a>00521 };
+<a name="l00523"></a>00523
+<a name="l00525"></a>00525 <span class="comment">// Template function definitions</span>
+<a name="l00526"></a>00526
+<a name="l00540"></a><a class="code" href="classxint_1_1integer.html#a67db70248d9890990c257a1d069192e3">00540</a> <span class="keyword">template</span> &lt;<span class="keyword">typename</span> T&gt; <a class="code" href="classxint_1_1integer.html#ad32b3b13167c61e48aede083a3e1c7a8" title="Creates a new integer with an initial value of zero.">integer::integer</a>(<span class="keyword">const</span> T&amp; n,
+<a name="l00541"></a>00541 <span class="keyword">typename</span> boost::enable_if&lt;boost::is_integral&lt;T&gt; &gt;::type*,
+<a name="l00542"></a>00542 <span class="keyword">typename</span> boost::enable_if&lt;boost::is_signed&lt;T&gt; &gt;::type*)
+<a name="l00543"></a>00543 {
+<a name="l00544"></a>00544 <span class="keywordflow">if</span> (n &gt;= 0) {
+<a name="l00545"></a>00545 <span class="keywordflow">if</span> (static_cast&lt;T&gt;(n &amp; <a class="code" href="namespacexint_1_1detail.html#a051753e1bf43dcc77eaa93b8d4e49197">detail::digit_mask</a>) == n)
+<a name="l00546"></a>00546 _init(<a class="code" href="namespacexint_1_1detail.html#a8843fb7e364832d8d5983de28bdbcf34">detail::digit_t</a>(n));
+<a name="l00547"></a>00547 <span class="keywordflow">else</span> _init(boost::uintmax_t(n));
+<a name="l00548"></a>00548 } <span class="keywordflow">else</span> <span class="keywordflow">if</span> (n == (std::numeric_limits&lt;T&gt;::min)()) {
+<a name="l00549"></a>00549 <span class="comment">// Have to treat the minimum number carefully, because -n is not</span>
+<a name="l00550"></a>00550 <span class="comment">// what you&apos;d think it is.</span>
+<a name="l00551"></a>00551 _init(boost::uintmax_t(-(n+1)));
+<a name="l00552"></a>00552 <a class="code" href="classxint_1_1integer.html#ab2f4df250e1030c518180b7e832c5ebd">_set_negative</a>(<span class="keyword">true</span>);
+<a name="l00553"></a>00553 --(*this);
+<a name="l00554"></a>00554 } <span class="keywordflow">else</span> {
+<a name="l00555"></a>00555 _init(boost::uintmax_t(-n));
+<a name="l00556"></a>00556 <a class="code" href="classxint_1_1integer.html#ab2f4df250e1030c518180b7e832c5ebd">_set_negative</a>(<span class="keyword">true</span>);
+<a name="l00557"></a>00557 }
+<a name="l00558"></a>00558 }
+<a name="l00559"></a>00559
+<a name="l00573"></a><a class="code" href="classxint_1_1integer.html#a0cad684bc9d7032497c7178edb91a5eb">00573</a> <span class="keyword">template</span> &lt;<span class="keyword">typename</span> T&gt; <a class="code" href="classxint_1_1integer.html#ad32b3b13167c61e48aede083a3e1c7a8" title="Creates a new integer with an initial value of zero.">integer::integer</a>(<span class="keyword">const</span> T&amp; n,
+<a name="l00574"></a>00574 <span class="keyword">typename</span> boost::enable_if&lt;boost::is_integral&lt;T&gt; &gt;::type*,
+<a name="l00575"></a>00575 <span class="keyword">typename</span> boost::enable_if&lt;boost::is_unsigned&lt;T&gt; &gt;::type*)
+<a name="l00576"></a>00576 {
+<a name="l00577"></a>00577 <span class="keywordflow">if</span> (static_cast&lt;T&gt;(n &amp; <a class="code" href="namespacexint_1_1detail.html#a051753e1bf43dcc77eaa93b8d4e49197">detail::digit_mask</a>) == n)
+<a name="l00578"></a>00578 _init(<a class="code" href="namespacexint_1_1detail.html#a8843fb7e364832d8d5983de28bdbcf34">detail::digit_t</a>(n));
+<a name="l00579"></a>00579 <span class="keywordflow">else</span> _init(boost::uintmax_t(n));
+<a name="l00580"></a>00580 }
+<a name="l00581"></a>00581
+<a name="l00592"></a>00592 <span class="keyword">template</span> &lt;<span class="keyword">typename</span> T&gt;
+<a name="l00593"></a><a class="code" href="namespacexint.html#a21bd738b96eec205eedc7a9960e9a6e5">00593</a> T <a class="code" href="namespacexint.html#a21bd738b96eec205eedc7a9960e9a6e5" title="Efficiently converts from an xint::integer to a built-in integer type.">to</a>(<span class="keyword">const</span> <a class="code" href="classxint_1_1integer.html" title="The extended integer class.">integer</a>&amp; n) {
+<a name="l00594"></a>00594 n.<a class="code" href="classxint_1_1integer.html#ad5935c358b92f15064b1f910613f7a3e">_throw_if_nan</a>();
+<a name="l00595"></a>00595 <span class="keywordflow">if</span> (n &lt; (std::numeric_limits&lt;T&gt;::min)()
+<a name="l00596"></a>00596 || n &gt; (std::numeric_limits&lt;T&gt;::max)())
+<a name="l00597"></a>00597 <span class="keywordflow">throw</span> <a class="code" href="classxint_1_1too__big.html" title="Exception class.">too_big</a>(<span class="stringliteral">&quot;value out of range for requested conversion&quot;</span>);
+<a name="l00598"></a>00598
+<a name="l00599"></a>00599 T rval=0;
+<a name="l00600"></a>00600 <span class="keywordtype">size_t</span> len=n.<a class="code" href="classxint_1_1integer.html#a5723a74b98da2d5ed9452a7ec10c0ca2">_get_length</a>();
+<a name="l00601"></a>00601 <span class="keywordflow">for</span> (<span class="keywordtype">size_t</span> x=0; x&lt;len; ++x)
+<a name="l00602"></a>00602 rval=static_cast&lt;T&gt;((rval * <a class="code" href="namespacexint_1_1detail.html#a6746855fd8cde164294a46108d502e6a">detail::digit_overflowbit</a>)
+<a name="l00603"></a>00603 + n.<a class="code" href="classxint_1_1integer.html#a81ab47d2f92ec66ac1586b61d7fd8b60">_get_digit</a>(len-x-1));
+<a name="l00604"></a>00604 <span class="keywordflow">if</span> (n.<a class="code" href="classxint_1_1integer.html#a5d84398ce89b376f695ccded2d20c8c2" title="Tests the sign of *this.">sign</a>() &lt; 0) rval *= -1;
+<a name="l00605"></a>00605 <span class="keywordflow">return</span> rval;
+<a name="l00606"></a>00606 }
+<a name="l00607"></a>00607
+<a name="l00621"></a>00621 <span class="keyword">template</span> &lt;<span class="keyword">typename</span> T&gt;
+<a name="l00622"></a><a class="code" href="namespacexint.html#a9c50302b216b64d17d9c1d6350e88036">00622</a> <span class="keywordtype">void</span> <a class="code" href="namespacexint.html#a9c50302b216b64d17d9c1d6350e88036" title="Change the random generator that the library uses.">set_random_generator</a>(T *gen) {
+<a name="l00623"></a>00623 <a class="code" href="structxint_1_1detail_1_1random__generator.html" title="Support class for the random generator code.">detail::random_generator&lt;T&gt;</a> *obj=<span class="keyword">new</span> <a class="code" href="structxint_1_1detail_1_1random__generator.html" title="Support class for the random generator code.">detail::random_generator&lt;T&gt;</a>(gen);
+<a name="l00624"></a>00624 <a class="code" href="namespacexint_1_1detail.html#a5f8bba03a6f615a82ebcf94ad7cd4353" title="Support function.">detail::set_random_generator</a>(obj);
+<a name="l00625"></a>00625 }
+<a name="l00626"></a>00626
+<a name="l00629"></a>00629 <span class="keyword">template</span> &lt;<span class="keyword">typename</span> <span class="keywordtype">char</span>T, <span class="keyword">typename</span> traits&gt;
+<a name="l00630"></a><a class="code" href="namespacexint.html#aa5b0dc228caee6523766326cf40297cd">00630</a> <span class="keyword">inline</span> std::basic_ostream&lt;charT,traits&gt;&amp; <a class="code" href="namespacexint.html#aa5b0dc228caee6523766326cf40297cd">operator&lt;&lt;</a>(std::basic_ostream&lt;charT,
+<a name="l00631"></a>00631 traits&gt;&amp; out, <span class="keyword">const</span> <a class="code" href="classxint_1_1integer.html" title="The extended integer class.">xint::integer</a>&amp; n)
+<a name="l00632"></a>00632 {
+<a name="l00633"></a>00633 <span class="keywordflow">if</span> (n.<a class="code" href="classxint_1_1integer.html#a0bca68386478755dc787f981d9cd5606" title="Tests *this for Not-a-Number.">is_nan</a>()) {
+<a name="l00634"></a>00634 out &lt;&lt; <a class="code" href="namespacexint_1_1detail.html#aede27c67f3308e0805fc3093ffe6f4ce" title="Holds the text representation of the Not-a-Number value.">detail::nan_text</a>;
+<a name="l00635"></a>00635 } <span class="keywordflow">else</span> {
+<a name="l00636"></a>00636 <span class="keywordtype">int</span> base=((out.flags() &amp; std::ios::hex) ? 16
+<a name="l00637"></a>00637 : (out.flags() &amp; std::ios::oct) ? 8
+<a name="l00638"></a>00638 : 10);
+<a name="l00639"></a>00639 <span class="keywordtype">bool</span> upperCase=(out.flags() &amp; std::ios::uppercase ? <span class="keyword">true</span> : <span class="keyword">false</span>);
+<a name="l00640"></a>00640
+<a name="l00641"></a>00641 <span class="keywordflow">if</span> (out.flags() &amp; std::ios::showbase) {
+<a name="l00642"></a>00642 <span class="keywordflow">if</span> (n.<a class="code" href="classxint_1_1integer.html#a5d84398ce89b376f695ccded2d20c8c2" title="Tests the sign of *this.">sign</a>() &lt; 0) out &lt;&lt; <span class="stringliteral">&quot;-&quot;</span>;
+<a name="l00643"></a>00643
+<a name="l00644"></a>00644 <span class="keywordflow">if</span> (base==16 &amp;&amp; upperCase) out &lt;&lt; <span class="stringliteral">&quot;0X&quot;</span>;
+<a name="l00645"></a>00645 <span class="keywordflow">else</span> <span class="keywordflow">if</span> (base==16) out &lt;&lt; <span class="stringliteral">&quot;0x&quot;</span>;
+<a name="l00646"></a>00646 <span class="keywordflow">else</span> <span class="keywordflow">if</span> (base==8) out &lt;&lt; <span class="stringliteral">&quot;0&quot;</span>;
+<a name="l00647"></a>00647
+<a name="l00648"></a>00648 out &lt;&lt; <a class="code" href="namespacexint.html#a016c9573ff48411847edf86c406946a0" title="Creates a string representation of the specified integer.">xint::to_string</a>(<a class="code" href="namespacexint.html#ac9e4ed282bafa93dbf608350df0127ba" title="Returns the absolute value of an integer.">abs</a>(n), base, upperCase);
+<a name="l00649"></a>00649 } <span class="keywordflow">else</span> {
+<a name="l00650"></a>00650 out &lt;&lt; <a class="code" href="namespacexint.html#a016c9573ff48411847edf86c406946a0" title="Creates a string representation of the specified integer.">xint::to_string</a>(n, base, upperCase);
+<a name="l00651"></a>00651 }
+<a name="l00652"></a>00652 }
+<a name="l00653"></a>00653 <span class="keywordflow">return</span> out;
+<a name="l00654"></a>00654 }
+<a name="l00655"></a>00655
+<a name="l00656"></a>00656 <span class="keyword">template</span> &lt;<span class="keyword">typename</span> <span class="keywordtype">char</span>T, <span class="keyword">typename</span> traits&gt;
+<a name="l00657"></a><a class="code" href="namespacexint.html#a27a0715c66d7350b0f3800f6e161816f">00657</a> <span class="keyword">inline</span> std::basic_istream&lt;charT,traits&gt;&amp; <a class="code" href="namespacexint.html#a27a0715c66d7350b0f3800f6e161816f">operator&gt;&gt;</a>(std::basic_istream&lt;charT,
+<a name="l00658"></a>00658 traits&gt;&amp; in, <a class="code" href="classxint_1_1integer.html" title="The extended integer class.">xint::integer</a>&amp; n)
+<a name="l00659"></a>00659 {
+<a name="l00660"></a>00660 <span class="keywordtype">int</span> hex=(in.flags() &amp; std::ios::hex) ? 1 : 0;
+<a name="l00661"></a>00661 <span class="keywordtype">int</span> dec=(in.flags() &amp; std::ios::dec) ? 1 : 0;
+<a name="l00662"></a>00662 <span class="keywordtype">int</span> oct=(in.flags() &amp; std::ios::oct) ? 1 : 0;
+<a name="l00663"></a>00663 <span class="keywordtype">int</span> count=hex+dec+oct;
+<a name="l00664"></a>00664
+<a name="l00665"></a>00665 <span class="keywordtype">size_t</span> base=<a class="code" href="namespacexint.html#a7a5434a5f5fb1db19f0de18014c4fc41">autobase</a>;
+<a name="l00666"></a>00666 <span class="keywordflow">if</span> (count==1) {
+<a name="l00667"></a>00667 <span class="keywordflow">if</span> (hex) base=16;
+<a name="l00668"></a>00668 <span class="keywordflow">else</span> <span class="keywordflow">if</span> (oct) base=8;
+<a name="l00669"></a>00669 <span class="keywordflow">else</span> base=10;
+<a name="l00670"></a>00670 } <span class="keywordflow">else</span> <span class="keywordflow">if</span> (count&gt;1) base=10;
+<a name="l00671"></a>00671 <span class="comment">// else auto-base</span>
+<a name="l00672"></a>00672
+<a name="l00673"></a>00673 std::string s;
+<a name="l00674"></a>00674 <span class="keywordflow">if</span> (in.peek()==<span class="charliteral">&apos;+&apos;</span>) {
+<a name="l00675"></a>00675 in.ignore();
+<a name="l00676"></a>00676 } <span class="keywordflow">else</span> <span class="keywordflow">if</span> (in.peek()==<span class="charliteral">&apos;-&apos;</span>) {
+<a name="l00677"></a>00677 in.ignore();
+<a name="l00678"></a>00678 s.push_back(<span class="charliteral">&apos;-&apos;</span>);
+<a name="l00679"></a>00679 }
+<a name="l00680"></a>00680
+<a name="l00681"></a>00681 <span class="keywordflow">if</span> (base==<a class="code" href="namespacexint.html#a7a5434a5f5fb1db19f0de18014c4fc41">autobase</a>) {
+<a name="l00682"></a>00682 <span class="keywordflow">if</span> (in.peek()==<span class="charliteral">&apos;0&apos;</span>) {
+<a name="l00683"></a>00683 in.ignore();
+<a name="l00684"></a>00684 <span class="keywordtype">int</span> c=in.peek();
+<a name="l00685"></a>00685 <span class="keywordflow">if</span> (c==<span class="charliteral">&apos;x&apos;</span> || c==<span class="charliteral">&apos;X&apos;</span>) {
+<a name="l00686"></a>00686 in.ignore();
+<a name="l00687"></a>00687 base=16;
+<a name="l00688"></a>00688 } <span class="keywordflow">else</span> base=8;
+<a name="l00689"></a>00689 } <span class="keywordflow">else</span> base=10;
+<a name="l00690"></a>00690 }
+<a name="l00691"></a>00691
+<a name="l00692"></a>00692 <span class="keywordflow">if</span> (in.peek()==<span class="charliteral">&apos;#&apos;</span>) {
+<a name="l00693"></a>00693 <span class="comment">// Must be either #NaN# or an error</span>
+<a name="l00694"></a>00694 <span class="keywordtype">char</span> buffer[6];
+<a name="l00695"></a>00695 std::streamsize size=in.readsome(buffer, 5);
+<a name="l00696"></a>00696 buffer[size]=0;
+<a name="l00697"></a>00697 std::string str(buffer);
+<a name="l00698"></a>00698
+<a name="l00699"></a>00699 <span class="keywordflow">if</span> (str==<a class="code" href="namespacexint_1_1detail.html#aede27c67f3308e0805fc3093ffe6f4ce" title="Holds the text representation of the Not-a-Number value.">detail::nan_text</a>) n=<a class="code" href="classxint_1_1integer.html" title="The extended integer class.">integer</a>(<a class="code" href="classxint_1_1not__a__number.html" title="Exception class.">not_a_number</a>());
+<a name="l00700"></a>00700 <span class="keywordflow">else</span> in.setstate(std::ios::failbit);
+<a name="l00701"></a>00701 } <span class="keywordflow">else</span> {
+<a name="l00702"></a>00702 <span class="keywordflow">while</span> (in) {
+<a name="l00703"></a>00703 <span class="keywordtype">int</span> c=in.peek();
+<a name="l00704"></a>00704 <span class="keywordflow">if</span> ((base==8 &amp;&amp; (c&gt;=<span class="charliteral">&apos;0&apos;</span> &amp;&amp; c&lt;=<span class="charliteral">&apos;7&apos;</span>)) ||
+<a name="l00705"></a>00705 (base==10 &amp;&amp; (c&gt;=<span class="charliteral">&apos;0&apos;</span> &amp;&amp; c&lt;=<span class="charliteral">&apos;9&apos;</span>)) ||
+<a name="l00706"></a>00706 (base==16 &amp;&amp; ((c&gt;=<span class="charliteral">&apos;0&apos;</span> &amp;&amp; c&lt;=<span class="charliteral">&apos;9&apos;</span>) || (c&gt;=<span class="charliteral">&apos;a&apos;</span> &amp;&amp; c&lt;=<span class="charliteral">&apos;f&apos;</span>) ||
+<a name="l00707"></a>00707 (c&gt;=<span class="charliteral">&apos;A&apos;</span> &amp;&amp; c&lt;=<span class="charliteral">&apos;F&apos;</span>))))
+<a name="l00708"></a>00708 {
+<a name="l00709"></a>00709 in.ignore();
+<a name="l00710"></a>00710 s.push_back(<span class="keywordtype">char</span>(c));
+<a name="l00711"></a>00711 } <span class="keywordflow">else</span> <span class="keywordflow">break</span>;
+<a name="l00712"></a>00712 }
+<a name="l00713"></a>00713
+<a name="l00714"></a>00714 <a class="code" href="structxint_1_1detail_1_1token.html" title="An empty struct, used in xint::token.">token</a> allow=<a class="code" href="namespacexint.html#a4b5a1a791ba11bb8f158a3b56bd9723e" title="Temprarily counteract an xint::block_exceptions token to allow all exceptions.">allow_exceptions</a>();
+<a name="l00715"></a>00715 <span class="keywordflow">try</span> {
+<a name="l00716"></a>00716 <a class="code" href="classxint_1_1integer.html" title="The extended integer class.">xint::integer</a> testValue=<a class="code" href="namespacexint.html#ad9dcb2b835be5f8ee918979945911ac0" title="Converts a string into an integer.">xint::from_string</a>(s, base);
+<a name="l00717"></a>00717 n=testValue;
+<a name="l00718"></a>00718 } <span class="keywordflow">catch</span> (<a class="code" href="classxint_1_1invalid__digit.html" title="Exception class.">xint::invalid_digit</a>&amp;) {
+<a name="l00719"></a>00719 <span class="comment">// Catch invalid strings</span>
+<a name="l00720"></a>00720 in.setstate(std::ios::failbit);
+<a name="l00721"></a>00721 }
+<a name="l00722"></a>00722 }
+<a name="l00723"></a>00723
+<a name="l00724"></a>00724 <span class="keywordflow">return</span> in;
+<a name="l00725"></a>00725 }
+<a name="l00727"></a>00727
+<a name="l00728"></a>00728 } <span class="comment">// namespace xint</span>
+<a name="l00729"></a>00729
+<a name="l00730"></a>00730 <span class="preprocessor">#endif // BOOST_INCLUDED_XINT_H</span>
+</pre></div></div>
+<hr size="1"/><address style="text-align: right;"><small>Generated on Tue Apr 6 01:22:07 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.1 </small></address>
+</body>
+</html>

Added: sandbox/xint/doc/xint__data__t_8hpp.html
==============================================================================
--- (empty file)
+++ sandbox/xint/doc/xint__data__t_8hpp.html 2010-04-06 01:40:33 EDT (Tue, 06 Apr 2010)
@@ -0,0 +1,63 @@
+<!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: xint_data_t.hpp 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.1 -->
+<div class="navigation" id="top">
+ <div class="tabs">
+ <ul>
+ <li>Main Page</li>
+ <li>Related Pages</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>xint_data_t.hpp File Reference</h1>
+<p>Internal details of an <a class="el" href="classxint_1_1integer.html" title="The extended integer class.">xint::integer</a>.
+More...</p>
+<code>#include &lt;vector&gt;</code><br/>
+
+<p>Go to the source code of this file.</p>
+<table border="0" cellpadding="0" cellspacing="0">
+<tr><td colspan="2"><h2>Classes</h2></td></tr>
+<tr><td class="memItemLeft" align="right" valign="top">struct &nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="structxint_1_1detail_1_1data__t.html">xint::detail::data_t</a></td></tr>
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Holds the internal details of an <a class="el" href="classxint_1_1integer.html" title="The extended integer class.">xint::integer</a>. More...<br/></td></tr>
+<tr><td class="memItemLeft" align="right" valign="top">struct &nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="structxint_1_1detail_1_1data__t_1_1_quick_digits.html">xint::detail::data_t::QuickDigits</a></td></tr>
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Holds information determining how many quick-digits to use. More...<br/></td></tr>
+<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="namespacexint.html">xint</a></td></tr>
+
+<p><tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight"><p>All of the functions in the XInt library are within this namespace. </p>
+<br/></td></tr>
+</p>
+<tr><td class="memItemLeft" align="right" valign="top">namespace &nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespacexint_1_1detail.html">xint::detail</a></td></tr>
+
+<p><tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight"><p>The items within this namespace are meant for internal use only. </p>
+<br/></td></tr>
+</p>
+</table>
+<hr/><a name="_details"></a><h2>Detailed Description</h2>
+<p>Internal details of an <a class="el" href="classxint_1_1integer.html" title="The extended integer class.">xint::integer</a>. </p>
+<p>This file contains the declaration for the <a class="el" href="namespacexint.html" title="All of the functions in the XInt library are within this namespace.">xint</a> data structure. It should only be used by the library itself. </p>
+
+<p>Definition in file <a class="el" href="xint__data__t_8hpp_source.html">xint_data_t.hpp</a>.</p>
+</div>
+<hr size="1"/><address style="text-align: right;"><small>Generated on Tue Apr 6 01:22:08 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.1 </small></address>
+</body>
+</html>

Added: sandbox/xint/doc/xint__data__t_8hpp_source.html
==============================================================================
--- (empty file)
+++ sandbox/xint/doc/xint__data__t_8hpp_source.html 2010-04-06 01:40:33 EDT (Tue, 06 Apr 2010)
@@ -0,0 +1,109 @@
+<!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: xint_data_t.hpp 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.1 -->
+<div class="navigation" id="top">
+ <div class="tabs">
+ <ul>
+ <li>Main Page</li>
+ <li>Related Pages</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>xint_data_t.hpp</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="l00021"></a>00021 <span class="preprocessor">#ifndef BOOST_INCLUDED_XINT_DATA_T_H</span>
+<a name="l00022"></a>00022 <span class="preprocessor"></span><span class="preprocessor">#define BOOST_INCLUDED_XINT_DATA_T_H</span>
+<a name="l00023"></a>00023 <span class="preprocessor"></span>
+<a name="l00024"></a>00024 <span class="preprocessor">#if !defined(XINT_SECURE)</span>
+<a name="l00025"></a>00025 <span class="preprocessor"></span><span class="preprocessor"> #include &lt;vector&gt;</span>
+<a name="l00026"></a>00026 <span class="preprocessor">#endif</span>
+<a name="l00027"></a>00027 <span class="preprocessor"></span>
+<a name="l00028"></a>00028 <span class="keyword">namespace </span>xint {
+<a name="l00029"></a>00029 <span class="keyword">namespace </span>detail {
+<a name="l00030"></a>00030
+<a name="l00036"></a><a class="code" href="structxint_1_1detail_1_1data__t.html">00036</a> <span class="keyword">struct </span><a class="code" href="structxint_1_1detail_1_1data__t.html" title="Holds the internal details of an xint::integer.">data_t</a> {
+<a name="l00044"></a><a class="code" href="structxint_1_1detail_1_1data__t_1_1_quick_digits.html">00044</a> <span class="keyword">struct </span><a class="code" href="structxint_1_1detail_1_1data__t_1_1_quick_digits.html" title="Holds information determining how many quick-digits to use.">QuickDigits</a> {
+<a name="l00045"></a><a class="code" href="structxint_1_1detail_1_1data__t_1_1_quick_digits.html#af5323a8fbfdfaa3cae371872ec865fc5">00045</a> <span class="keyword">static</span> <span class="keyword">const</span> <span class="keywordtype">size_t</span> <a class="code" href="structxint_1_1detail_1_1data__t_1_1_quick_digits.html#af5323a8fbfdfaa3cae371872ec865fc5">intbits</a>=std::numeric_limits&lt;unsigned int&gt;::digits;
+<a name="l00046"></a><a class="code" href="structxint_1_1detail_1_1data__t_1_1_quick_digits.html#a789eadb40cb8c034823ecb5fb6094092">00046</a> <span class="keyword">static</span> <span class="keyword">const</span> <span class="keywordtype">size_t</span> <a class="code" href="structxint_1_1detail_1_1data__t_1_1_quick_digits.html#a789eadb40cb8c034823ecb5fb6094092" title="We want at least enough QuickDigits to hold two standard int types.">suggested</a>=(2*<a class="code" href="structxint_1_1detail_1_1data__t_1_1_quick_digits.html#af5323a8fbfdfaa3cae371872ec865fc5">intbits</a>/<a class="code" href="namespacexint_1_1detail.html#a9bd9e8d55061238d63913020d2721518">bits_per_digit</a>);
+<a name="l00047"></a><a class="code" href="structxint_1_1detail_1_1data__t_1_1_quick_digits.html#aeb7c43d282f871305e76936664cee25f">00047</a> <span class="keyword">static</span> <span class="keyword">const</span> <span class="keywordtype">size_t</span> <a class="code" href="structxint_1_1detail_1_1data__t_1_1_quick_digits.html#aeb7c43d282f871305e76936664cee25f" title="The library&amp;#39;s code is written to depend on this value, don&amp;#39;t change it.">minimum</a>=3;
+<a name="l00048"></a><a class="code" href="structxint_1_1detail_1_1data__t_1_1_quick_digits.html#ac691b42c4404e59ae07f89146e722736">00048</a> <span class="keyword">static</span> <span class="keyword">const</span> <span class="keywordtype">size_t</span> <a class="code" href="structxint_1_1detail_1_1data__t_1_1_quick_digits.html#ac691b42c4404e59ae07f89146e722736">count</a>=(<a class="code" href="structxint_1_1detail_1_1data__t_1_1_quick_digits.html#a789eadb40cb8c034823ecb5fb6094092" title="We want at least enough QuickDigits to hold two standard int types.">suggested</a> &lt; <a class="code" href="structxint_1_1detail_1_1data__t_1_1_quick_digits.html#aeb7c43d282f871305e76936664cee25f" title="The library&amp;#39;s code is written to depend on this value, don&amp;#39;t change it.">minimum</a> ? <a class="code" href="structxint_1_1detail_1_1data__t_1_1_quick_digits.html#aeb7c43d282f871305e76936664cee25f" title="The library&amp;#39;s code is written to depend on this value, don&amp;#39;t change it.">minim
um</a> : <a class="code" href="structxint_1_1detail_1_1data__t_1_1_quick_digits.html#a789eadb40cb8c034823ecb5fb6094092" title="We want at least enough QuickDigits to hold two standard int types.">suggested</a>);
+<a name="l00049"></a>00049 };
+<a name="l00050"></a>00050
+<a name="l00051"></a><a class="code" href="structxint_1_1detail_1_1data__t.html#a599933d272e3592b2d0985ca7f7c72e2">00051</a> <span class="keywordtype">size_t</span> <a class="code" href="structxint_1_1detail_1_1data__t.html#a599933d272e3592b2d0985ca7f7c72e2">mLength</a>, <a class="code" href="structxint_1_1detail_1_1data__t.html#a3390530db8333b535f65d3cc01ff5236">mAllocated</a>;
+<a name="l00052"></a><a class="code" href="structxint_1_1detail_1_1data__t.html#a5c9382aec147090d7e7e2b5e972402a9">00052</a> <a class="code" href="namespacexint_1_1detail.html#a8843fb7e364832d8d5983de28bdbcf34">digit_t</a> *<a class="code" href="structxint_1_1detail_1_1data__t.html#a5c9382aec147090d7e7e2b5e972402a9">digits</a>;
+<a name="l00053"></a><a class="code" href="structxint_1_1detail_1_1data__t.html#a022f882ed0818612861b1a67881ae131">00053</a> <a class="code" href="namespacexint_1_1detail.html#a8843fb7e364832d8d5983de28bdbcf34">digit_t</a> <a class="code" href="structxint_1_1detail_1_1data__t.html#a022f882ed0818612861b1a67881ae131">mQuickDigits</a>[<a class="code" href="structxint_1_1detail_1_1data__t_1_1_quick_digits.html#ac691b42c4404e59ae07f89146e722736">QuickDigits::count</a>];
+<a name="l00054"></a>00054
+<a name="l00055"></a>00055 <span class="preprocessor"> #if !defined(XINT_SECURE)</span>
+<a name="l00056"></a><a class="code" href="structxint_1_1detail_1_1data__t.html#a96c33fdc37dd3c774256f7ed20ce735c">00056</a> <span class="preprocessor"></span> std::vector&lt;digit_t&gt; <a class="code" href="structxint_1_1detail_1_1data__t.html#a96c33fdc37dd3c774256f7ed20ce735c">mStorage</a>;
+<a name="l00057"></a>00057 <span class="preprocessor"> #endif</span>
+<a name="l00058"></a>00058 <span class="preprocessor"></span>
+<a name="l00059"></a><a class="code" href="structxint_1_1detail_1_1data__t.html#a73bc854b5f9ced6576b97d2cff8f3a5d">00059</a> <span class="keywordtype">int</span> <a class="code" href="structxint_1_1detail_1_1data__t.html#a73bc854b5f9ced6576b97d2cff8f3a5d">mCopies</a>;
+<a name="l00060"></a><a class="code" href="structxint_1_1detail_1_1data__t.html#afb2d8673fc5d99d2ea006cd0aa32b744">00060</a> <span class="keywordtype">bool</span> <a class="code" href="structxint_1_1detail_1_1data__t.html#afb2d8673fc5d99d2ea006cd0aa32b744">mIsNegative</a>;
+<a name="l00061"></a>00061
+<a name="l00062"></a>00062 <span class="keyword">public</span>:
+<a name="l00063"></a>00063 <a class="code" href="structxint_1_1detail_1_1data__t.html#a9309667d3ac573346294e7b6e18c67ff">data_t</a>(<a class="code" href="namespacexint_1_1detail.html#a8843fb7e364832d8d5983de28bdbcf34">digit_t</a> initial1=0, <a class="code" href="namespacexint_1_1detail.html#a8843fb7e364832d8d5983de28bdbcf34">digit_t</a> initial2=0, <a class="code" href="namespacexint_1_1detail.html#a8843fb7e364832d8d5983de28bdbcf34">digit_t</a> initial3=0);
+<a name="l00064"></a>00064 <a class="code" href="structxint_1_1detail_1_1data__t.html#a9309667d3ac573346294e7b6e18c67ff">data_t</a>(<a class="code" href="structxint_1_1detail_1_1data__t.html" title="Holds the internal details of an xint::integer.">data_t</a> *c);
+<a name="l00065"></a>00065
+<a name="l00066"></a>00066 <span class="preprocessor"> #if defined(XINT_SECURE)</span>
+<a name="l00067"></a>00067 <span class="preprocessor"></span> ~<a class="code" href="structxint_1_1detail_1_1data__t.html" title="Holds the internal details of an xint::integer.">data_t</a>();
+<a name="l00068"></a>00068 <span class="preprocessor"> #endif</span>
+<a name="l00069"></a>00069 <span class="preprocessor"></span>
+<a name="l00070"></a><a class="code" href="structxint_1_1detail_1_1data__t.html#a7230e725461510f321bb1c45251b62f3">00070</a> <span class="keywordtype">void</span> <a class="code" href="structxint_1_1detail_1_1data__t.html#a7230e725461510f321bb1c45251b62f3">attach</a>() { ++<a class="code" href="structxint_1_1detail_1_1data__t.html#a73bc854b5f9ced6576b97d2cff8f3a5d">mCopies</a>; }
+<a name="l00071"></a><a class="code" href="structxint_1_1detail_1_1data__t.html#afd5505e388c5bf8c9cf069df81a91818">00071</a> <span class="keywordtype">bool</span> <a class="code" href="structxint_1_1detail_1_1data__t.html#afd5505e388c5bf8c9cf069df81a91818">detach</a>() { <span class="keywordflow">return</span> (--<a class="code" href="structxint_1_1detail_1_1data__t.html#a73bc854b5f9ced6576b97d2cff8f3a5d">mCopies</a>==0); }
+<a name="l00072"></a>00072 <span class="keywordtype">void</span> <a class="code" href="structxint_1_1detail_1_1data__t.html#a4fe3935e29883193166966c49cd73139">alloc</a>(<span class="keywordtype">size_t</span> <a class="code" href="structxint_1_1detail_1_1data__t.html#a5c9382aec147090d7e7e2b5e972402a9">digits</a>, <span class="keywordtype">bool</span> copydigits=<span class="keyword">false</span>);
+<a name="l00073"></a><a class="code" href="structxint_1_1detail_1_1data__t.html#a2bb2c79d47f2fda3605f34b80cb58b8b">00073</a> <span class="keywordtype">void</span> <a class="code" href="structxint_1_1detail_1_1data__t.html#a2bb2c79d47f2fda3605f34b80cb58b8b">realloc</a>(<span class="keywordtype">size_t</span> newdigits) { <a class="code" href="structxint_1_1detail_1_1data__t.html#a4fe3935e29883193166966c49cd73139">alloc</a>(newdigits, <span class="keyword">true</span>); }
+<a name="l00074"></a>00074 <span class="keywordtype">void</span> <a class="code" href="structxint_1_1detail_1_1data__t.html#a6d45feedd311e26f7de06597fb0c6b81">skipLeadingZeros</a>();
+<a name="l00075"></a>00075 <span class="keywordtype">void</span> <a class="code" href="structxint_1_1detail_1_1data__t.html#a66862f94545c953f6604b4347205277b">copy</a>(<span class="keyword">const</span> <a class="code" href="structxint_1_1detail_1_1data__t.html" title="Holds the internal details of an xint::integer.">data_t</a> *c, <span class="keywordtype">size_t</span> extraDigits=0);
+<a name="l00076"></a>00076 <span class="keywordtype">void</span> <a class="code" href="structxint_1_1detail_1_1data__t.html#a288850fd62ef26302ce4767a45acd968">zero</a>(<a class="code" href="namespacexint_1_1detail.html#a8843fb7e364832d8d5983de28bdbcf34">digit_t</a> *p, <span class="keywordtype">size_t</span> count);
+<a name="l00077"></a>00077
+<a name="l00078"></a>00078 <span class="keywordtype">void</span> <a class="code" href="structxint_1_1detail_1_1data__t.html#a57fc3966c44d09daeede53899673cde3">quickset</a>(<a class="code" href="namespacexint_1_1detail.html#a8843fb7e364832d8d5983de28bdbcf34">digit_t</a> d1, <a class="code" href="namespacexint_1_1detail.html#a8843fb7e364832d8d5983de28bdbcf34">digit_t</a> d2=0, <a class="code" href="namespacexint_1_1detail.html#a8843fb7e364832d8d5983de28bdbcf34">digit_t</a> d3=0);
+<a name="l00079"></a>00079
+<a name="l00080"></a>00080 <span class="keywordtype">void</span> <a class="code" href="structxint_1_1detail_1_1data__t.html#aaf6f202db416ad8fe18ec8a6c8c48904">invert</a>();
+<a name="l00081"></a>00081 <span class="keywordtype">void</span> <a class="code" href="structxint_1_1detail_1_1data__t.html#aa0dd7ef67ccdef3c3139f4afc84219bd">negate</a>();
+<a name="l00082"></a>00082
+<a name="l00083"></a>00083 <span class="comment">// These primitives ignore the signs of the parameters, and their results</span>
+<a name="l00084"></a>00084 <span class="comment">// are calculated in place.</span>
+<a name="l00085"></a>00085 <span class="keywordtype">void</span> <a class="code" href="structxint_1_1detail_1_1data__t.html#a143e6814a7aa20a0d61ed616b9940b2e">add</a>(<span class="keyword">const</span> <a class="code" href="structxint_1_1detail_1_1data__t.html" title="Holds the internal details of an xint::integer.">data_t</a>&amp; addend);
+<a name="l00086"></a>00086 <span class="keywordtype">void</span> <a class="code" href="structxint_1_1detail_1_1data__t.html#a650d374b8d38b369273830bb9d939da4">subtract</a>(<span class="keyword">const</span> <a class="code" href="structxint_1_1detail_1_1data__t.html" title="Holds the internal details of an xint::integer.">data_t</a>&amp; subtrahend);
+<a name="l00087"></a>00087
+<a name="l00088"></a>00088 <span class="comment">// These are also calculated in place, for maximum speed.</span>
+<a name="l00089"></a>00089 <span class="keywordtype">void</span> <a class="code" href="structxint_1_1detail_1_1data__t.html#a72785130c7c6490af874f450cf6e0086">shift_left</a>(<span class="keywordtype">size_t</span> byBits);
+<a name="l00090"></a>00090 <span class="keywordtype">void</span> <a class="code" href="structxint_1_1detail_1_1data__t.html#a432ace7094bca306dcba254f862e2428">shift_right</a>(<span class="keywordtype">size_t</span> byBits);
+<a name="l00091"></a>00091 };
+<a name="l00092"></a>00092
+<a name="l00093"></a>00093 } <span class="comment">// namespace detail</span>
+<a name="l00094"></a>00094 } <span class="comment">// namespace xint</span>
+<a name="l00095"></a>00095
+<a name="l00096"></a>00096 <span class="preprocessor">#endif // BOOST_INCLUDED_XINT_DATA_T_H</span>
+</pre></div></div>
+<hr size="1"/><address style="text-align: right;"><small>Generated on Tue Apr 6 01:22:07 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.1 </small></address>
+</body>
+</html>

Added: sandbox/xint/doc/xint__monty_8hpp.html
==============================================================================
--- (empty file)
+++ sandbox/xint/doc/xint__monty_8hpp.html 2010-04-06 01:40:33 EDT (Tue, 06 Apr 2010)
@@ -0,0 +1,68 @@
+<!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: xint_monty.hpp 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.1 -->
+<div class="navigation" id="top">
+ <div class="tabs">
+ <ul>
+ <li>Main Page</li>
+ <li>Related Pages</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>xint_monty.hpp File Reference</h1>
+<p>Internally-used 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="namespacexint.html">xint</a></td></tr>
+
+<p><tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight"><p>All of the functions in the XInt 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">Montgomery Reduction functions</div></td></tr>
+<tr><td colspan="2"><div class="groupText"><p><a class="anchor" id="amgrpef45384829a28a8031424a8c453ceaa0"></a> </p>
+<br/><br/></div></td></tr>
+<tr><td class="memItemLeft" align="right" valign="top">digit_t&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespacexint.html#afd561fd7c7631267fbc7e5c75c2bde71">xint::inverse0</a> (const integer &amp;n)</td></tr>
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Returns the low digit of the inverse of a number. Used internally. <br/></td></tr>
+<tr><td class="memItemLeft" align="right" valign="top">integer&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespacexint.html#aaf3b26669d4e61f6af5dcae42b20e08b">xint::montgomeryR</a> (const integer &amp;n)</td></tr>
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Returns the most efficient R value for a number and the library's internal representation. Used internally. <br/></td></tr>
+<tr><td class="memItemLeft" align="right" valign="top">integer&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespacexint.html#ab8e85cd5425fcec419c07155e2a91e13">xint::toMontgomeryForm</a> (const integer &amp;n, const integer &amp;m)</td></tr>
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Returns the Montgomery form of a number. Used for testing. <br/></td></tr>
+<tr><td class="memItemLeft" align="right" valign="top">integer&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespacexint.html#a93ed16c5350b34ca22108e48b51918a5">xint::fromMontgomeryForm</a> (const integer &amp;n, const integer &amp;m)</td></tr>
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Returns the <a class="el" href="classxint_1_1integer.html" title="The extended integer class.">integer</a> from the Montgomery form of a number. Used for testing. <br/></td></tr>
+<tr><td class="memItemLeft" align="right" valign="top">integer&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespacexint.html#a722769c7d01e06d9f82eae07a280160c">xint::montgomeryMultiplyMod</a> (const integer &amp;a, const integer &amp;b, const integer &amp;n, digit_t nPrime0)</td></tr>
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Returns the Montgomery equivalent of <code>mulmod(a, b, n)</code>. Used internally. <br/></td></tr>
+<tr><td class="memItemLeft" align="right" valign="top">integer&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespacexint.html#a7d7e8604c467bc007820c60e1bc21626">xint::montgomeryPowerMod</a> (const integer &amp;a, const integer &amp;e, const integer &amp;n)</td></tr>
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Returns the Montgomery equivalent of <code>powmod(a, b, n)</code>. Used internally. <br/></td></tr>
+</table>
+<hr/><a name="_details"></a><h2>Detailed Description</h2>
+<p>Internally-used functions. </p>
+<p>This file declares the functions that use the Montgomery Reduction. They are used internally to speed up the <a class="el" href="namespacexint.html#ac54e9be3a8b131f882f88e57b0ef1c9c" title="Get the result of ne % m, keeping the intermediate results (relatively) small.">xint::powmod</a> function for odd modulii. </p>
+
+<p>Definition in file <a class="el" href="xint__monty_8hpp_source.html">xint_monty.hpp</a>.</p>
+</div>
+<hr size="1"/><address style="text-align: right;"><small>Generated on Tue Apr 6 01:22:08 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.1 </small></address>
+</body>
+</html>

Added: sandbox/xint/doc/xint__monty_8hpp_source.html
==============================================================================
--- (empty file)
+++ sandbox/xint/doc/xint__monty_8hpp_source.html 2010-04-06 01:40:33 EDT (Tue, 06 Apr 2010)
@@ -0,0 +1,61 @@
+<!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: xint_monty.hpp 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.1 -->
+<div class="navigation" id="top">
+ <div class="tabs">
+ <ul>
+ <li>Main Page</li>
+ <li>Related Pages</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>xint_monty.hpp</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="l00021"></a>00021 <span class="preprocessor">#ifndef BOOST_INCLUDED_XINT_MONTY_H</span>
+<a name="l00022"></a>00022 <span class="preprocessor"></span><span class="preprocessor">#define BOOST_INCLUDED_XINT_MONTY_H</span>
+<a name="l00023"></a>00023 <span class="preprocessor"></span>
+<a name="l00024"></a>00024 <span class="keyword">namespace </span>xint {
+<a name="l00025"></a>00025
+<a name="l00028"></a>00028 <a class="code" href="namespacexint_1_1detail.html#a8843fb7e364832d8d5983de28bdbcf34">detail::digit_t</a> <a class="code" href="namespacexint.html#afd561fd7c7631267fbc7e5c75c2bde71" title="Returns the low digit of the inverse of a number. Used internally.">inverse0</a>(<span class="keyword">const</span> integer&amp; n);
+<a name="l00029"></a>00029 integer <a class="code" href="namespacexint.html#aaf3b26669d4e61f6af5dcae42b20e08b" title="Returns the most efficient R value for a number and the library&amp;#39;s internal representation...">montgomeryR</a>(<span class="keyword">const</span> integer&amp; n);
+<a name="l00030"></a>00030 integer <a class="code" href="namespacexint.html#ab8e85cd5425fcec419c07155e2a91e13" title="Returns the Montgomery form of a number. Used for testing.">toMontgomeryForm</a>(<span class="keyword">const</span> integer&amp; n, <span class="keyword">const</span> integer&amp; m);
+<a name="l00031"></a>00031 integer <a class="code" href="namespacexint.html#a93ed16c5350b34ca22108e48b51918a5" title="Returns the integer from the Montgomery form of a number. Used for testing.">fromMontgomeryForm</a>(<span class="keyword">const</span> integer&amp; n, <span class="keyword">const</span> integer&amp; m);
+<a name="l00032"></a>00032 integer <a class="code" href="namespacexint.html#a722769c7d01e06d9f82eae07a280160c" title="Returns the Montgomery equivalent of mulmod(a, b, n). Used internally.">montgomeryMultiplyMod</a>(<span class="keyword">const</span> integer&amp; x, <span class="keyword">const</span> integer&amp; y, <span class="keyword">const</span> integer&amp;
+<a name="l00033"></a>00033 m, <a class="code" href="namespacexint_1_1detail.html#a8843fb7e364832d8d5983de28bdbcf34">detail::digit_t</a> nPrime0);
+<a name="l00034"></a>00034 integer <a class="code" href="namespacexint.html#a7d7e8604c467bc007820c60e1bc21626" title="Returns the Montgomery equivalent of powmod(a, b, n). Used internally.">montgomeryPowerMod</a>(<span class="keyword">const</span> integer&amp; x, <span class="keyword">const</span> integer&amp; e, <span class="keyword">const</span> integer&amp; m);
+<a name="l00036"></a>00036
+<a name="l00037"></a>00037 } <span class="comment">// namespace xint</span>
+<a name="l00038"></a>00038
+<a name="l00039"></a>00039 <span class="preprocessor">#endif // BOOST_INCLUDED_XINT_MONTY_H</span>
+</pre></div></div>
+<hr size="1"/><address style="text-align: right;"><small>Generated on Tue Apr 6 01:22:07 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.1 </small></address>
+</body>
+</html>

Added: sandbox/xint/doc/xint__test_8hpp.html
==============================================================================
--- (empty file)
+++ sandbox/xint/doc/xint__test_8hpp.html 2010-04-06 01:40:33 EDT (Tue, 06 Apr 2010)
@@ -0,0 +1,63 @@
+<!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: xint_test.hpp 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.1 -->
+<div class="navigation" id="top">
+ <div class="tabs">
+ <ul>
+ <li>Main Page</li>
+ <li>Related Pages</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>xint_test.hpp File Reference</h1>
+<p>Declares the library's self-testing 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="namespacexint.html">xint</a></td></tr>
+
+<p><tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight"><p>All of the functions in the XInt 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">Self-Testing Functions</div></td></tr>
+<tr><td colspan="2"><div class="groupText"><p><a class="anchor" id="amgrpe91fba8935c0c10717694cc0393febf3"></a> </p>
+<br/><br/></div></td></tr>
+<tr><td class="memItemLeft" align="right" valign="top">bool&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespacexint.html#a509778d505a3c8a0b335817150eaead2">xint::testBitManipulations</a> ()</td></tr>
+<tr><td class="memItemLeft" align="right" valign="top">bool&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespacexint.html#a6b7f5122683b6d924bf86c7d1507206b">xint::testAddSubtract</a> ()</td></tr>
+<tr><td class="memItemLeft" align="right" valign="top">bool&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespacexint.html#affe2e221777d4263a420d014fa9640d0">xint::testMultiply</a> ()</td></tr>
+<tr><td class="memItemLeft" align="right" valign="top">bool&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespacexint.html#a4ed78ff75865ae44a00d3709dd88c3a1">xint::testDivideMod</a> ()</td></tr>
+<tr><td class="memItemLeft" align="right" valign="top">bool&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespacexint.html#ae4ef5f20964fa995df7828f27bd7adbe">xint::testConvert</a> ()</td></tr>
+<tr><td class="memItemLeft" align="right" valign="top">bool&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespacexint.html#ae3305f62ca9be58fbc11dbd4c703f38b">xint::testStreams</a> ()</td></tr>
+<tr><td class="memItemLeft" align="right" valign="top">bool&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespacexint.html#ac40068d64f8c4d9002a0687935888c42">xint::testMontyMultiply</a> ()</td></tr>
+<tr><td class="memItemLeft" align="right" valign="top">bool&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespacexint.html#a9cce0401174b9ae173671b0800c5f457">xint::testMontyPowerMod</a> ()</td></tr>
+</table>
+<hr/><a name="_details"></a><h2>Detailed Description</h2>
+<p>Declares the library's self-testing functions. </p>
+
+<p>Definition in file <a class="el" href="xint__test_8hpp_source.html">xint_test.hpp</a>.</p>
+</div>
+<hr size="1"/><address style="text-align: right;"><small>Generated on Tue Apr 6 01:22:08 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.1 </small></address>
+</body>
+</html>

Added: sandbox/xint/doc/xint__test_8hpp_source.html
==============================================================================
--- (empty file)
+++ sandbox/xint/doc/xint__test_8hpp_source.html 2010-04-06 01:40:33 EDT (Tue, 06 Apr 2010)
@@ -0,0 +1,62 @@
+<!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: xint_test.hpp 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.1 -->
+<div class="navigation" id="top">
+ <div class="tabs">
+ <ul>
+ <li>Main Page</li>
+ <li>Related Pages</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>xint_test.hpp</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">#ifndef BOOST_INCLUDED_XINT_TEST_H</span>
+<a name="l00019"></a>00019 <span class="preprocessor"></span><span class="preprocessor">#define BOOST_INCLUDED_XINT_TEST_H</span>
+<a name="l00020"></a>00020 <span class="preprocessor"></span>
+<a name="l00021"></a>00021 <span class="keyword">namespace </span>xint {
+<a name="l00022"></a>00022
+<a name="l00025"></a>00025 <span class="keywordtype">bool</span> <a class="code" href="namespacexint.html#a509778d505a3c8a0b335817150eaead2">testBitManipulations</a>();
+<a name="l00026"></a>00026 <span class="keywordtype">bool</span> <a class="code" href="namespacexint.html#a6b7f5122683b6d924bf86c7d1507206b">testAddSubtract</a>();
+<a name="l00027"></a>00027 <span class="keywordtype">bool</span> <a class="code" href="namespacexint.html#affe2e221777d4263a420d014fa9640d0">testMultiply</a>();
+<a name="l00028"></a>00028 <span class="keywordtype">bool</span> <a class="code" href="namespacexint.html#a4ed78ff75865ae44a00d3709dd88c3a1">testDivideMod</a>();
+<a name="l00029"></a>00029 <span class="keywordtype">bool</span> <a class="code" href="namespacexint.html#ae4ef5f20964fa995df7828f27bd7adbe">testConvert</a>();
+<a name="l00030"></a>00030 <span class="keywordtype">bool</span> <a class="code" href="namespacexint.html#ae3305f62ca9be58fbc11dbd4c703f38b">testStreams</a>();
+<a name="l00031"></a>00031 <span class="keywordtype">bool</span> <a class="code" href="namespacexint.html#ac40068d64f8c4d9002a0687935888c42">testMontyMultiply</a>();
+<a name="l00032"></a>00032 <span class="keywordtype">bool</span> <a class="code" href="namespacexint.html#a9cce0401174b9ae173671b0800c5f457">testMontyPowerMod</a>();
+<a name="l00034"></a>00034
+<a name="l00035"></a>00035 } <span class="comment">// namespace xint</span>
+<a name="l00036"></a>00036
+<a name="l00037"></a>00037 <span class="preprocessor">#endif // BOOST_INCLUDED_XINT_TEST_H</span>
+</pre></div></div>
+<hr size="1"/><address style="text-align: right;"><small>Generated on Tue Apr 6 01:22:07 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.1 </small></address>
+</body>
+</html>

Added: sandbox/xint/example/exceptions.cpp
==============================================================================
--- (empty file)
+++ sandbox/xint/example/exceptions.cpp 2010-04-06 01:40:33 EDT (Tue, 06 Apr 2010)
@@ -0,0 +1,56 @@
+
+#include <boost/xint/xint.hpp>
+#include <ostream>
+
+int main() {
+ using namespace std;
+ using namespace boost;
+ using xint::integer;
+
+ integer n;
+
+ // It *is* possible to block exceptions multiple times, so this assert
+ // checks to see whether they're presently allowed. It is not needed,
+ // it's only here for demonstration purposes.
+ assert(xint::exceptions_allowed() == true);
+
+ // We'll wrap this in a try block for demonstration purposes, just to
+ // prove that it doesn't throw an exception. You normally don't need a
+ // try block if you're only expecting blockable exceptions.
+ try {
+ // Create the "blocker" token. Until the token is destroyed, exceptions
+ // will be blocked, except when explicitly re-enabled.
+ xint::token blocker=xint::block_exceptions();
+
+ // This assert is only here for demonstration purposes.
+ assert(xint::exceptions_allowed() == false);
+
+ // Call the function(s) that should be exception-blocked. The example
+ // call tries to interpret an empty string as an integer, which would
+ // normally throw an xint::invalid_digit exception.
+ n = integer("");
+
+ // n should be Not-a-Number, because there was an error but exceptions
+ // were blocked. This example code is fairly useless, and is only here
+ // for demonstration purposes, but you should always test for Not-a-Number
+ // when blocking exceptions.
+ if (n.is_nan()) {
+ cout << "n is Not-a-Number, do some intelligent error handling here."
+ << endl;
+ } else {
+ // This example code should never get to this block, but you would
+ // usually put the normal program flow code here.
+ cout << "Error, n should be Not-a-Number and it isn't!" << endl;
+ }
+ } catch (std::exception& e) {
+ // This example code should never get to this block, because exceptions
+ // were blocked.
+ cout << "Error, threw an exception when exceptions were blocked!\n" <<
+ e.what() << endl;
+ }
+
+ // Now exceptions are re-enabled, because the blocking behavior ended when
+ // the "blocker" token was destroyed at the end of the try block. Note that
+ // this assert is not needed, it's only here for demonstration purposes.
+ assert(xint::exceptions_allowed() == true);
+}

Added: sandbox/xint/example/fibonacci.cpp
==============================================================================
--- (empty file)
+++ sandbox/xint/example/fibonacci.cpp 2010-04-06 01:40:33 EDT (Tue, 06 Apr 2010)
@@ -0,0 +1,35 @@
+#include <iostream>
+#include <boost/xint/xint.hpp>
+
+int main() {
+ using xint::integer;
+ using std::cout;
+ using std::endl;
+
+ // Select the limit, in this case the largest number that will fit into an
+ // unsigned long.
+ integer limit=(std::numeric_limits<unsigned long>::max)();
+
+ // Set the first two numbers in the sequence.
+ integer n, n1=0, n2=1;
+
+ // Now count the items in the sequence as we iterate over them, until we
+ // come to the first one greater than the limit we've set.
+ size_t counter=0;
+ cout << counter++ << ": " << n1 << endl;
+ cout << counter++ << ": " << n2 << endl;
+
+ while (1) {
+ n = n1 + n2;
+ if (n > limit) break;
+
+ // That one didn't do it, go back for another try.
+ cout << counter++ << ": " << n << endl;
+
+ n1=n2;
+ n2=n;
+ }
+
+ cout << "The answer is " << counter << " (" << n << ")." << endl;
+}
+

Added: sandbox/xint/example/genprime.cpp
==============================================================================
--- (empty file)
+++ sandbox/xint/example/genprime.cpp 2010-04-06 01:40:33 EDT (Tue, 06 Apr 2010)
@@ -0,0 +1,35 @@
+#include <iostream>
+#include <boost/xint/xint.hpp>
+
+bool callback() {
+ std::cout << '.' << std::flush;
+ return true; // Return false to abort a long operation
+}
+
+int main() {
+ using namespace std;
+ using namespace boost;
+
+ const unsigned int bits=512;
+
+ try {
+ // Use the system's strong random number generator, via the XInt-
+ // provided convenience class.
+ xint::set_random_generator(new xint::strong_random_generator);
+
+ // Generate the prime number, keeping the user informed of the
+ // progress.
+ cout << "Generating...";
+ xint::integer p=xint::random_prime(bits, callback);
+
+ // Success!
+ cout << "\nA random " << bits << "-bit prime is: " << p << endl;
+ } catch (xint::no_strong_random& e) {
+ // xint::strong_random_generator will throw this if the system doesn't
+ // have a strong random number generator.
+ cout << e.what() << endl;
+ return EXIT_FAILURE;
+ }
+
+ return EXIT_SUCCESS;
+}

Deleted: sandbox/xint/example/xint_fibonacci.cpp
==============================================================================
--- sandbox/xint/example/xint_fibonacci.cpp 2010-04-06 01:40:33 EDT (Tue, 06 Apr 2010)
+++ (empty file)
@@ -1,222 +0,0 @@
-// xint_fibonacci.cpp
-
-// Copyright Chad Nelson 2010
-//
-// 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)
-
-/*!
- \file
- \brief Simple demo of xint sending the fibonacci sequence to stream output.
- \details
-
- Fibonacci numbers are a sequence of numbers, starting with the numbers 0 and 1,
- where each successive number is the sum of the previous two.
-
- http://en.wikipedia.org/wiki/Fibonacci_number
-
-The first few Fibonacci numbers are:
-
- 0 1 1 2 3 5 8 13 21 34 55 89 144...
-
-You might be curious what the first Fibonacci number is that's too big to calculate
-using the standard C++ unsigned long int type.
-A brute-force method of calculating this would be problematic,
-since it might not be possible to tell when it overflows.
-But with the XInt library, it's child's play.
-
-If you're not intimately familiar with the Fibonacci sequence,
-and how fast the numbers in it grow, the answer might shock you.
-
-As you can see, using the XInt library is just like using the native integer types
--- except that an xint::integer won't overflow on you
-until you completely exhaust your system's memory. :-)
-
- Output:
- \verbatim
-
-0: 0
-1: 1
-2: 1
-3: 2
-4: 3
-5: 5
-6: 8
-7: 13
-8: 21
-9: 34
-10: 55
-11: 89
-12: 144
-13: 233
-14: 377
-15: 610
-16: 987
-17: 1597
-18: 2584
-19: 4181
-20: 6765
-21: 10946
-22: 17711
-23: 28657
-24: 46368
-25: 75025
-26: 121393
-27: 196418
-28: 317811
-29: 514229
-30: 832040
-31: 1346269
-32: 2178309
-33: 3524578
-34: 5702887
-35: 9227465
-36: 14930352
-37: 24157817
-38: 39088169
-39: 63245986
-40: 102334155
-41: 165580141
-42: 267914296
-43: 433494437
-44: 701408733
-45: 1134903170
-46: 1836311903
-47: 2971215073
-The 1st Fibonacci member > 4294967295 is number 48, with value 4807526976.
-
- \endverbatim
-
-
-*/
-#include <iostream>
-#include <limits>
-
-#include <boost/xint/xint.hpp>
-// <boost/xint.hpp> ???
-
-int main()
-{
- using xint::integer;
- using std::cout;
- using std::endl;
- using std::numeric_limits;
-
-/*
- //[xint_fibonacci_snippet_1
-
- [@http://en.wikipedia.org/wiki/Fibonacci_number Fibonacci numbers]
-are a sequence of numbers, starting with the numbers 0 and 1,
- where each successive number is the sum of the previous two.
-
-The first few Fibonacci numbers are:
-
- 0 1 1 2 3 5 8 13 21 34 55 89 144...
-
-You might be curious what the first Fibonacci number is that's too big to calculate
-using the standard C++ unsigned long int type.
-A brute-force method of calculating this would be problematic,
-since it might not be possible to tell when it overflows.
-But with the XInt library, it's child's play.
-
-If you're not intimately familiar with the Fibonacci sequence,
-and how fast the numbers in it grow, the answer might shock you.
-
-As you can see, using the XInt library is just like using the native integer types
--- except that an xint::integer won't overflow on you
-until you completely exhaust your system's memory. :-)
-
-//] [xint_fibonacci_snippet_1]
-*/
-
- // Select our limit, in this case the largest number
- // that will fit into an unsigned long:
- integer limit = (std::numeric_limits<unsigned long>::max)();
-
- // Set the first two numbers in the sequence:
- integer n; // (= 0 by default).
- integer n1=0; // to hold the previous Fibonacci number.
- integer n2=1; // to hold the new Fibonacci number.
-
-
- // Now count the items in the sequence as we iterate over them,
- // until we come to the first one greater than the limit we've set.
- size_t counter=0;
- cout << counter++ << ": " << n1 << endl;
- cout << counter++ << ": " << n2 << endl;
-
- while (true)
- {
- n = n1 + n2; //
- if (n > limit) break;
- // That one didn't do it, go back for another try.
- cout << counter++ << ": " << n << endl;
-
- n1 = n2;
- n2 = n;
- }
-//[xint_fibonacci_snippet_2
-//` Finally we print the one that we could not compute using a unsigned long int.
- cout << "The 1st Fibonacci member > " << limit << " is number " << counter << ", with value " << n << "." << endl;
-//] [xint_fibonacci_snippet_2]
-
-} // int main()
-
-
-/*
-//[xint_fibonacci_output_1
-
-0: 0
-1: 1
-2: 1
-3: 2
-4: 3
-5: 5
-6: 8
-7: 13
-8: 21
-9: 34
-10: 55
-11: 89
-12: 144
-13: 233
-14: 377
-15: 610
-16: 987
-17: 1597
-18: 2584
-19: 4181
-20: 6765
-21: 10946
-22: 17711
-23: 28657
-24: 46368
-25: 75025
-26: 121393
-27: 196418
-28: 317811
-29: 514229
-30: 832040
-31: 1346269
-32: 2178309
-33: 3524578
-34: 5702887
-35: 9227465
-36: 14930352
-37: 24157817
-38: 39088169
-39: 63245986
-40: 102334155
-41: 165580141
-42: 267914296
-43: 433494437
-44: 701408733
-45: 1134903170
-46: 1836311903
-47: 2971215073
-The 1st Fibonacci member > 4294967295 is number 48, with value 4807526976.
-
-//] [xint_fibonacci_output_1]
-*/
-

Added: sandbox/xint/index.html
==============================================================================
--- (empty file)
+++ sandbox/xint/index.html 2010-04-06 01:40:33 EDT (Tue, 06 Apr 2010)
@@ -0,0 +1,16 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+
+<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
+<head>
+ <title>Boost.XInt Documentation</title>
+ <meta http-equiv="Content-Type" content="text/html; charset=us-ascii" />
+ <meta http-equiv="refresh" content="0; URL=doc/index.html" />
+</head>
+
+<body>
+ Automatic redirection failed, please go to <a href=
+ "doc/index.html">doc/index.html</a>
+</body>
+</html>
+

Modified: sandbox/xint/src/bit_manipulations.cpp
==============================================================================
--- sandbox/xint/src/bit_manipulations.cpp (original)
+++ sandbox/xint/src/bit_manipulations.cpp 2010-04-06 01:40:33 EDT (Tue, 06 Apr 2010)
@@ -8,7 +8,11 @@
     See accompanying file LICENSE_1_0.txt or copy at
         http://www.boost.org/LICENSE_1_0.txt
 
- This file contains the bit-manipulation functions.
+ See http://www.boost.org/libs/xint for library home page.
+*/
+
+/*! \file
+ \brief Contains the bit-manipulation functions.
 */
 
 #include "../boost/xint/xint.hpp"
@@ -18,6 +22,14 @@
 
 using namespace detail;
 
+/*! \brief Queries the value of a particular bit in an integer.
+
+\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.
+*/
 bool getbit(const integer& n, size_t bit) {
     n._throw_if_nan();
     size_t index=bit/bits_per_digit;
@@ -27,6 +39,13 @@
     } else return false;
 }
 
+/*! \brief Sets a specific bit in an integer to one.
+
+\param[in,out] n The integer to operate on.
+\param[in] bit The zero-based index of the bit to change.
+
+\returns Nothing.
+*/
 void setbit(integer& n, size_t bit) {
     n._throw_if_nan();
     n._make_unique();
@@ -40,6 +59,13 @@
     ndata->skipLeadingZeros();
 }
 
+/*! \brief Sets a specific bit in an integer to zero.
+
+\param[in,out] n The integer to operate on.
+\param[in] bit The zero-based index of the bit to change.
+
+\returns Nothing.
+*/
 void clearbit(integer& n, size_t bit) {
     n._throw_if_nan();
     size_t index=bit/bits_per_digit;
@@ -51,8 +77,17 @@
     }
 }
 
-size_t lowestbit(const integer& n, size_t defaultValue) {
- if (n.sign()==0) return defaultValue;
+/*! \brief Obtains the index of the lowest bit in an integer with a value of one.
+
+\param[in] n The integer to query.
+\param[in] valueIfZero 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
+valueIfZero if the integer contains no set bits.
+*/
+size_t lowestbit(const integer& n, size_t valueIfZero) {
+ if (n.sign()==0) return valueIfZero;
 
     const detail::data_t *ndata=n._get_data();
     const digit_t *p=ndata->digits, *pe=p+ndata->mLength;
@@ -70,11 +105,26 @@
     return r;
 }
 
-size_t highestbit(const integer& n, size_t defaultValue) {
- if (n.sign()==0) return defaultValue;
+/*! \brief Obtains the index of the highest bit in an integer with a value of one.
+
+\param[in] n The integer to query.
+\param[in] valueIfZero 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
+valueIfZero if the integer contains no set bits.
+*/
+size_t highestbit(const integer& n, size_t valueIfZero) {
+ if (n.sign()==0) return valueIfZero;
     return static_cast<size_t>(log2(n)-1);
 }
 
+/*! \brief Combine two integers using a bitwise \c AND operation.
+
+\param[in] n1, n2 The integers to operate on.
+
+\returns An integer with all bits that are set in both parameters turned on.
+*/
 integer bitwise_and(const integer& n1, const integer& n2) {
     n1._throw_if_nan();
     n2._throw_if_nan();
@@ -95,6 +145,12 @@
     return r;
 }
 
+/*! \brief Combine two integers using a bitwise \c OR operation.
+
+\param[in] n1, n2 The integers to operate on.
+
+\returns An integer with all bits that are set in either parameter turned on.
+*/
 integer bitwise_or(const integer& n1, const integer& n2) {
     n1._throw_if_nan();
     n2._throw_if_nan();
@@ -117,6 +173,13 @@
     return r;
 }
 
+/*! \brief Combine two integers using a bitwise \c XOR operation.
+
+\param[in] n1, n2 The integers to operate on.
+
+\returns An integer with all bits that are set in either parameter, but not
+both, turned on.
+*/
 integer bitwise_xor(const integer& n1, const integer& n2) {
     n1._throw_if_nan();
     n2._throw_if_nan();
@@ -139,31 +202,53 @@
     return r;
 }
 
+/*! \brief Bit-shift an integer, in either direction.
+
+\param[in] n The integer to operate on.
+\param[in] byBits The number of bits to shift it. If positive, it will shift
+left, negative will shift right.
+
+\returns The bit-shifted integer.
+*/
 integer shift(const integer& n, int byBits) {
     if (byBits > 0) return shift_left(n, byBits);
     else return shift_right(n, -byBits);
 }
 
-integer shift_left(const integer& _n, size_t byBits) {
- _n._throw_if_nan();
+/*! \brief Left-shift an integer by a specified number of bits.
 
- if (byBits==0) return _n;
+\param[in] n The integer to operate on.
+\param[in] byBits The number of bits to left-shift it.
 
- integer n(_n);
- n._make_unique();
- n._get_data()->shift_left(byBits);
- return n;
+\returns The bit-shifted integer.
+*/
+integer shift_left(const integer& n, size_t byBits) {
+ n._throw_if_nan();
+
+ if (byBits==0) return n;
+
+ integer nn(n);
+ nn._make_unique();
+ nn._get_data()->shift_left(byBits);
+ return nn;
 }
 
-integer shift_right(const integer& _n, size_t byBits) {
- _n._throw_if_nan();
+/*! \brief Right-shift an integer by a specified number of bits.
 
- if (byBits==0) return _n;
+\param[in] n The integer to operate on.
+\param[in] byBits The number of bits to right-shift it.
 
- integer n(_n);
- n._make_unique();
- n._get_data()->shift_right(byBits);
- return n;
+\returns The bit-shifted integer.
+*/
+integer shift_right(const integer& n, size_t byBits) {
+ n._throw_if_nan();
+
+ if (byBits==0) return n;
+
+ integer nn(n);
+ nn._make_unique();
+ nn._get_data()->shift_right(byBits);
+ return nn;
 }
 
 } // namespace detail

Modified: sandbox/xint/src/compare.cpp
==============================================================================
--- sandbox/xint/src/compare.cpp (original)
+++ sandbox/xint/src/compare.cpp 2010-04-06 01:40:33 EDT (Tue, 06 Apr 2010)
@@ -8,8 +8,11 @@
     See accompanying file LICENSE_1_0.txt or copy at
         http://www.boost.org/LICENSE_1_0.txt
 
- This file contains the definition for the compare function, and the
- comparison operators that use it.
+ See http://www.boost.org/libs/xint for library home page.
+*/
+
+/*! \file
+ \brief Contains the the compare function and comparison operators.
 */
 
 #include "../boost/xint/xint.hpp"
@@ -17,6 +20,18 @@
 
 namespace xint {
 
+/*! \brief Compare two integer objects.
+
+\param[in] b1, b2 The integers to compare.
+\param[in] ignoresign If \c true, the absolute values of b1 and b2 are compared,
+instead of their signed values. Used internally.
+
+\returns A negative number if \c b1 < \c b2; zero if \c b1 == \c b2, or a
+positive number if \c b1 > \c b2.
+
+This is the function behind all of the comparison operators. It might sometimes
+be useful directly as well.
+*/
 int compare(const integer &b1, const integer &b2, bool ignoresign) {
     b1._throw_if_nan();
     b2._throw_if_nan();

Modified: sandbox/xint/src/convert.cpp
==============================================================================
--- sandbox/xint/src/convert.cpp (original)
+++ sandbox/xint/src/convert.cpp 2010-04-06 01:40:33 EDT (Tue, 06 Apr 2010)
@@ -8,14 +8,19 @@
     See accompanying file LICENSE_1_0.txt or copy at
         http://www.boost.org/LICENSE_1_0.txt
 
- This file contains the conversion functions. Note that the to<T> function is
- not here, because it's a template function and must be defined in a header
- file.
-
- TODO: the to_string function could be made more efficient by using only
- doubledigit_t-sized pieces of the integer at a time, and dividing the whole
- thing by the total of the divisions done to get the digits. Same with the
- from_string function.
+ See http://www.boost.org/libs/xint for library home page.
+*/
+
+/*! \file
+ \brief Contains the conversion functions.
+
+ Note that the xint::to<T> function is not here, because it's a template
+ function and must be defined in a header file.
+
+ \todo the xint::to_string function could be made more efficient by using
+ only doubledigit_t-sized pieces of the integer at a time, and dividing the
+ whole thing by the total of the divisions done to get the digits. Same with
+ the xint::from_string function.
 */
 
 #include "../boost/xint/xint.hpp"
@@ -39,8 +44,29 @@
 
 } // namespace
 
-std::string to_string(const integer& n, size_t base, bool upperCase) {
- if (n.nan()) return detail::nan_text;
+/*! \brief Creates a string representation of the specified integer.
+
+\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. If \c n is Not-a-Number, returns the string
+\c \#NaN#.
+
+\exception xint::invalid_base if base is less than two or greater than 36.
+
+\note If exceptions are blocked, it returns an empty string instead of throwing
+an exception.
+
+\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.)
+*/
+std::string to_string(const integer& n, size_t base, bool uppercase) {
+ if (n.is_nan()) return detail::nan_text;
     if (base<2 || base>36) {
         if (exceptions_allowed()) throw invalid_base();
         else return std::string();
@@ -66,7 +92,7 @@
 
         do {
             while (digitShift >= 0) {
- out << nToChar((*d >> digitShift) & mask, upperCase);
+ out << nToChar((*d >> digitShift) & mask, uppercase);
                 digitShift -= bitsPerDigit;
             }
 
@@ -83,7 +109,7 @@
         integer r;
         while (a.first.sign()!=0) {
             a=divide_r(a.first, shift);
- out << nToChar(a.second._get_digit(0), upperCase);
+ out << nToChar(a.second._get_digit(0), uppercase);
         }
 
         if (n.sign() < 0) out << '-';
@@ -94,6 +120,32 @@
     }
 }
 
+/*! \brief Converts a string into an integer.
+
+\param[in] str The string to convert.
+\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.
+
+\returns An integer with the numeric value of the string in base \c base. If the
+string is \c \#NaN#, then it will return \link nan Not-a-Number\endlink.
+
+\exception xint::overflow_error if there is not enough free memory to create the
+integer.
+\exception xint::invalid_base if the base parameter is not between 2 and 36
+(inclusive) or the constant xint::autobase.
+\exception xint::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 function that's called when reading an integer from a stream, or
+when contructing one from a string.
+
+\see integer::integer(const std::string& str, size_t base)
+*/
 integer from_string(const std::string& str, size_t base) {
     if (str==detail::nan_text) return integer(not_a_number());
 
@@ -147,6 +199,15 @@
     return r;
 }
 
+/*! \brief Converts a binary representation of a number into an integer.
+
+\param[in] str An \c std::string containing the bytes to convert, lowest byte
+first.
+
+\returns An integer representing the bytes.
+
+\see xint::to_binary
+*/
 integer from_binary(const std::string& str) {
     const size_t bytesPerDigit=sizeof(digit_t);
     const size_t bitsPerByte=std::numeric_limits<unsigned char>::digits;
@@ -167,6 +228,22 @@
     return r;
 }
 
+/*! \brief Creates a binary representation of an integer, lowest byte first.
+
+\param[in] n The integer to convert.
+
+\returns A string containing the binary representation.
+
+\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 used for persistent storage or
+transmission, as it is more space-efficient than a string representation.
+
+\see xint::from_binary
+*/
 std::string to_binary(const integer& n) {
     n._throw_if_nan();
 

Modified: sandbox/xint/src/data_t.cpp
==============================================================================
--- sandbox/xint/src/data_t.cpp (original)
+++ sandbox/xint/src/data_t.cpp 2010-04-06 01:40:33 EDT (Tue, 06 Apr 2010)
@@ -8,7 +8,11 @@
     See accompanying file LICENSE_1_0.txt or copy at
         http://www.boost.org/LICENSE_1_0.txt
 
- This file contains the definitions for data_t member functions.
+ See http://www.boost.org/libs/xint for library home page.
+*/
+
+/*! \file
+ \brief Contains the definitions for xint::detail::data_t member functions.
 */
 
 #include "../boost/xint/xint.hpp"
@@ -30,6 +34,7 @@
     mIsNegative=false;
 }
 
+//! \overload
 data_t::data_t(data_t *c) {
     mLength=c->mLength;
     if (c->digits == c->mQuickDigits) {
@@ -64,6 +69,10 @@
 }
 #endif
 
+/*!
+ Call this after every manipulation of a data_t object that could possibly
+ leave leading zeros in the integer.
+*/
 void data_t::skipLeadingZeros() {
     digit_t *d=digits+mLength-1;
     while (d>digits && *d==0) --d;

Modified: sandbox/xint/src/exception_blocker.cpp
==============================================================================
--- sandbox/xint/src/exception_blocker.cpp (original)
+++ sandbox/xint/src/exception_blocker.cpp 2010-04-06 01:40:33 EDT (Tue, 06 Apr 2010)
@@ -8,7 +8,12 @@
     See accompanying file LICENSE_1_0.txt or copy at
         http://www.boost.org/LICENSE_1_0.txt
 
- This file holds definitions for the exception blocker classes and functions.
+ See http://www.boost.org/libs/xint for library home page.
+*/
+
+/*! \file
+ \brief Contains the definitions for the exception-blocker classes and
+ functions.
 */
 
 #include "../boost/xint/xint.hpp"
@@ -22,30 +27,39 @@
 
 #ifdef XINT_THREADSAFE
     boost::thread_specific_ptr<bool> allowed;
+#else
+ bool allowed=true;
+#endif
 
- struct EBlockerToken: public detail::token {
+struct EBlockerToken: public detail::token {
+ #ifdef XINT_THREADSAFE
         EBlockerToken(bool newAllowState) {
             if (allowed.get()==0) allowed.reset(new bool(true));
             mOldState=*allowed;
             *allowed=newAllowState;
         }
         ~EBlockerToken() { *allowed=mOldState; }
-
- bool mOldState;
- };
-#else
- bool allowed=true;
-
- struct EBlockerToken: public detail::token {
- EBlockerToken(bool newAllowState): mOldState(allowed) { allowed=newAllowState; }
+ #else
+ EBlockerToken(bool newAllowState): mOldState(allowed) {
+ allowed=newAllowState; }
         ~EBlockerToken() { allowed=mOldState; }
+ #endif
 
- bool mOldState;
- };
-#endif
+ bool mOldState;
+};
 
 } // namespace
 
+/*! \brief Query whether exceptions are currently allowed or blocked.
+
+\returns \c true if exceptions are currently allowed (the default state), \c
+false if they're blocked.
+
+\remarks
+When the library is compiled for \link threadsafe thread-safe operation\endlink,
+exceptions are blocked or allowed on a per-thread basis. Otherwise they
+are blocked or allowed globally.
+*/
 bool exceptions_allowed() {
     #ifdef XINT_THREADSAFE
         // Defaults to true
@@ -55,10 +69,38 @@
     #endif
 }
 
+/*! \brief Temporarily prevent the library from throwing blockable exceptions.
+
+\returns An xint::token. Until this token is destroyed, blockable exceptions are
+blocked, unless explicitly re-enabled.
+
+\remarks
+When the library is compiled for \link threadsafe thread-safe operation\endlink,
+exceptions are blocked or allowed on a per-thread basis. Otherwise they are
+blocked or allowed globally.
+
+\see \ref exceptions
+*/
 token block_exceptions() {
     return token(new EBlockerToken(false));
 }
 
+/*! \brief Temprarily counteract an xint::block_exceptions token to allow all
+ exceptions.
+
+\returns An xint::token. Until this token is destroyed, blockable exceptions can
+be thrown, unless explicitly re-blocked.
+
+\note
+Exceptions are allowed by default.
+
+\remarks
+When the library is compiled for \link threadsafe thread-safe operation\endlink,
+exceptions are blocked or allowed on a per-thread basis. Otherwise they are
+blocked or allowed globally.
+
+\see \ref exceptions
+*/
 token allow_exceptions() {
     return token(new EBlockerToken(true));
 }

Modified: sandbox/xint/src/gcd.cpp
==============================================================================
--- sandbox/xint/src/gcd.cpp (original)
+++ sandbox/xint/src/gcd.cpp 2010-04-06 01:40:33 EDT (Tue, 06 Apr 2010)
@@ -8,7 +8,13 @@
     See accompanying file LICENSE_1_0.txt or copy at
         http://www.boost.org/LICENSE_1_0.txt
 
- This file contains the Greatest Common Denominator function.
+ See http://www.boost.org/libs/xint for library home page.
+*/
+
+/*! \file
+ \brief Greatest Common Denominator and Least Common Multple.
+
+ Also holds the definition for xint::invmod, since it uses the GCD algorithm.
 */
 
 #include "../boost/xint/xint.hpp"
@@ -51,6 +57,13 @@
 
 } // namespace
 
+/*! \brief Calculate the Greatest Common Denominator of two integers.
+
+\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.
+*/
 integer gcd(const integer& num1, const integer& num2) {
     num1._throw_if_nan();
     num2._throw_if_nan();
@@ -71,17 +84,38 @@
     return integer::one() << k;
 }
 
+/*! \brief Calculate the Least Common Multiple of two integers.
+
+\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.
+*/
 integer lcm(const integer& num1, const integer& num2) {
     if (num1.sign() == 0 || num2.sign() == 0) return integer::zero();
     return abs(num1 * num2) / gcd(num1, num2);
 }
 
+/*! \brief Get the modular inverse of a number in a modulus, if there is one.
+
+\param[in] n The number to retrieve the inverse of.
+\param[in] m The modulus to use.
+
+\returns The modular inverse of \c n in \c m. If \c n has no modular inverse in
+\c m, returns zero.
+
+\exception xint::invalid_modulus if the modulus is less than one.
+
+\note If exceptions are blocked, it returns zero instead of throwing an
+exception.
+*/
 integer invmod(const integer& n, const integer& m) {
     // Calculates the modular inverse of n mod m, or (n^(-1)) mod m
     // Defined as b, where n*b corresponds to 1 (mod m)
     if (m < integer::one()) {
         if (exceptions_allowed()) throw invalid_modulus();
- else return integer(not_a_number());
+ else return integer::zero();
     }
 
     int sign=n.sign();
@@ -92,17 +126,17 @@
         _n._set_negative(false);
 
         integer nn=invmod(_n, m);
- if (nn.nan()) return nn;
+ if (nn.is_nan()) return nn;
 
         nn._set_negative(true);
         return nn + m;
     }
 
- if (n.even() && m.even()) return integer(not_a_number()); // GCD(x,y)!=1, no inverse possible.
+ if (n.even() && m.even()) return integer::zero(); // GCD(x,y)!=1, no inverse possible.
 
     gcd_core core(n, m);
 
- if (core.u3 != integer::one()) return integer(not_a_number()); // GCD(x,y)!=1, no inverse possible.
+ if (core.u3 != integer::one()) return integer::zero(); // GCD(x,y)!=1, no inverse possible.
     return core.u1;
 }
 

Modified: sandbox/xint/src/integer.cpp
==============================================================================
--- sandbox/xint/src/integer.cpp (original)
+++ sandbox/xint/src/integer.cpp 2010-04-06 01:40:33 EDT (Tue, 06 Apr 2010)
@@ -8,7 +8,11 @@
     See accompanying file LICENSE_1_0.txt or copy at
         http://www.boost.org/LICENSE_1_0.txt
 
- This file contains the definitions for the integer member functions.
+ See http://www.boost.org/libs/xint for library home page.
+*/
+
+/*! \file
+ \brief Contains the definitions for the xint::integer member functions.
 */
 
 #include "../boost/xint/xint.hpp"
@@ -26,20 +30,64 @@
 
 const std::string detail::nan_text("#NaN#");
 
+//! \brief Creates a new integer with an initial value of zero.
 integer::integer() {
     _init();
 }
 
+/*! \brief Creates a copy of an existing integer.
+
+\param[in] b An existing integer. If passed a Not-a-Number, it will create
+another Not-a-Number.
+
+\note
+This library can use a \link cow copy-on-write technique\endlink, making copying
+(even of large numbers) a very inexpensive operation.
+
+\overload
+*/
 integer::integer(const integer& b) {
- if (b.nan()) data=0;
+ if (b.is_nan()) data=0;
     else _init(b);
 }
 
+/*! \brief Create an integer from a string representation.
+
+\param[in] str A string representation of a number.
+\param[in] base The base of the number, or xint::autobase.
+
+\exception xint::invalid_base if the base parameter is not between 2 and 36
+(inclusive) or the constant xint::autobase.
+\exception xint::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 will convert a string representation of a number into an integer. See the
+description of the xint::from_string function for details on its behavior.
+
+\par
+This is the most common way to initialize values that are too large to fit into
+a native integral type.
+
+\overload
+*/
 integer::integer(const std::string& str, size_t base) {
     _init(from_string(str, base));
 }
 
-integer::integer(const not_a_number&) {
+/*! \brief Creates an integer with the value of Not-a-Number.
+
+\param[in] n An xint::not_a_number object (normally used as an exception class).
+
+\remarks
+This is the official way to create an integer with the Not-a-Number value, if
+you ever wish to use that value for your own purposes.
+
+\see \ref nan
+
+\overload
+*/
+integer::integer(const not_a_number& n) {
     data=0;
 }
 
@@ -109,16 +157,29 @@
     if (negative != (sign() < 0)) *this=negate(*this);
 }
 
+/*! \brief Tests the lowest bit of \c *this to determine oddness.
+
+\returns \c true if \c *this is odd, otherwise \c false.
+*/
 bool integer::odd() const {
     _throw_if_nan();
     return ((_get_digit(0) & 0x01)==1);
 }
 
+/*! \brief Tests the lowest bit of \c *this to determine evenness.
+
+\returns \c true if \c *this is even, otherwise \c false.
+*/
 bool integer::even() const {
     _throw_if_nan();
     return ((_get_digit(0) & 0x01)==0);
 }
 
+/*! \brief Tests the sign of \c *this.
+
+\returns -1 if \c *this is negative, 0 if it's zero, or 1 if it's greater than
+zero.
+*/
 int integer::sign() const {
     _throw_if_nan();
     if (data->mIsNegative) return -1;
@@ -126,10 +187,21 @@
     return 1;
 }
 
-bool integer::nan() const {
+/*! \brief Tests \c *this for Not-a-Number.
+
+\returns \c true if \c *this is Not-a-Number, otherwise \c false.
+
+\see \ref nan
+*/
+bool integer::is_nan() const {
     return (data==0);
 }
 
+/*! \brief Tells you roughly how large an integer is.
+
+\returns The number of hexadecimal digits that would be required to encode \c
+*this.
+*/
 size_t integer::hex_digits() const {
     _throw_if_nan();
     size_t bits=log2(*this);
@@ -228,7 +300,7 @@
 }
 
 void integer::_throw_if_nan() const {
- if (nan()) throw not_a_number();
+ if (is_nan()) throw not_a_number();
 }
 
 } // namespace xint

Modified: sandbox/xint/src/misc.cpp
==============================================================================
--- sandbox/xint/src/misc.cpp (original)
+++ sandbox/xint/src/misc.cpp 2010-04-06 01:40:33 EDT (Tue, 06 Apr 2010)
@@ -8,14 +8,22 @@
     See accompanying file LICENSE_1_0.txt or copy at
         http://www.boost.org/LICENSE_1_0.txt
 
- This file contains the definitions for functions that don't fall into any
- of the other categories.
+ See http://www.boost.org/libs/xint for library home page.
+*/
+
+/*! \file
+ \brief Functions that don't fall into any other category.
 */
 
 #include "../boost/xint/xint.hpp"
 
 namespace xint {
 
+/*! \brief Tells whether the library was compiled with \link securemode Secure
+Mode \endlink enabled.
+
+\returns \c true if Secure Mode is active, \c false if it isn't.
+*/
 bool opt_secure_mode() {
     #ifdef XINT_SECURE
         return true;
@@ -24,6 +32,12 @@
     #endif
 }
 
+/*! \brief Tells whether the library was compiled with the \link threadsafe
+Thread Safe Operation option \endlink enabled.
+
+\returns \c true if it was compiled with Thread Safe Operation enabled, \c false
+if it wasn't.
+*/
 bool opt_thread_safe() {
     #ifdef XINT_THREADSAFE
         return true;
@@ -32,6 +46,19 @@
     #endif
 }
 
+/*! \brief Get the log<sub>2</sub> value of an integer.
+
+\param[in] n The integer to operate on.
+
+\returns The %integer log<sub>2</sub> value of the integer.
+
+\remarks
+xint::pow2(xint::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 xint::highestbit function.
+*/
 size_t log2(const integer& n) {
     n._throw_if_nan();
 

Modified: sandbox/xint/src/modular.cpp
==============================================================================
--- sandbox/xint/src/modular.cpp (original)
+++ sandbox/xint/src/modular.cpp 2010-04-06 01:40:33 EDT (Tue, 06 Apr 2010)
@@ -8,8 +8,14 @@
     See accompanying file LICENSE_1_0.txt or copy at
         http://www.boost.org/LICENSE_1_0.txt
 
- This file contains the basic modular math functions, except invmod, which
- is in gcd.cpp to share gcd_core.
+ See http://www.boost.org/libs/xint for library home page.
+*/
+
+/*! \file
+ \brief Contains the definitions for the basic modular math functions.
+
+ The xint::invmod function, which logically would be here, is actually in
+ gcd.cpp to share the gcd_core function.
 */
 
 #include "../boost/xint/xint.hpp"
@@ -17,53 +23,105 @@
 
 namespace xint {
 
-integer mod(const integer& n, const integer& modBy) {
- integer r=divide_r(n, modBy).second;
- if (r.sign() < 0) r+=abs(modBy);
+/*! \brief Get the remainder after dividing a number by another.
+
+\param[in] n The dividend.
+\param[in] m The divisor.
+
+\returns The result of \c n % \c m.
+*/
+integer mod(const integer& n, const integer& m) {
+ integer r=divide_r(n, m).second;
+ if (r.sign() < 0) r+=abs(m);
     return r;
 }
 
-integer mulmod(const integer& n, const integer& by, const integer& modulus) {
- return mod(n * by, modulus);
+/*! \brief Get the modular product of two integers.
+
+\param[in] n, by The integers to multiply.
+\param[in] m The modulus.
+
+\returns The result of \c n * \c by % \c m.
+
+\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.
+*/
+integer mulmod(const integer& n, const integer& by, const integer& m) {
+ return mod(n * by, m);
 }
 
-integer sqrmod(const integer& n, const integer& modulus) {
- return mod(sqr(n), modulus);
+/*! \brief Get the modular product of squaring an integer.
+
+\param[in] n The integer to square.
+\param[in] m The modulus.
+
+\returns The result of \c sqr(n) % \c m.
+
+\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.
+*/
+integer sqrmod(const integer& n, const integer& m) {
+ return mod(sqr(n), m);
 }
 
-integer powmod(const integer& n, const integer& exponent, const integer&
- modulus, bool noMontgomery)
+/*! \brief Get the result of \c n<sup>e</sup> % \c m, keeping the intermediate
+ results (relatively) small.
+
+\param[in] n The integer to exponentiate.
+\param[in] e The exponent.
+\param[in] m The modulus.
+\param[in] noMontgomery Used for testing, leave false for normal operation.
+
+\returns The result of \c pow(n, \c exponent) % \c modulus.
+
+\exception xint::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 writing out the equivalent calculations.
+
+\par
+In addition, this function will use the Montgomery Reduction internally, if the
+modulus is an odd number (and if \c noMontgomery isn't set), which is almost
+always faster than the non-Montgomery method.
+*/
+integer powmod(const integer& n, const integer& e, const integer& m, bool
+ noMontgomery)
 {
- if (modulus < integer::one()) {
+ if (m < integer::one()) {
         if (exceptions_allowed()) throw invalid_modulus();
         else return integer(not_a_number());
     }
- if (exponent.sign()==0) return integer::one();
+ if (e.sign()==0) return integer::one();
 
- bool neg=(n.sign() < 0 && exponent.odd());
+ bool neg=(n.sign() < 0 && e.odd());
 
     integer answer(integer::one());
 
     // Montgomery's method is often noticeably faster, but only works if the
- // modulus is odd.
- if (modulus.odd() && !noMontgomery) {
- answer=montgomeryPowerMod(abs(n) % modulus, abs(exponent), modulus);
+ // m is odd.
+ if (m.odd() && !noMontgomery) {
+ answer=montgomeryPowerMod(abs(n) % m, abs(e), m);
     } else {
         integer p(abs(n));
 
- size_t length=exponent._get_length(), lastBitCount=0;
- detail::digit_t ee(exponent._get_digit(length-1));
+ size_t length=e._get_length(), lastBitCount=0;
+ detail::digit_t ee(e._get_digit(length-1));
         while (ee != 0) { ee >>= 1; ++lastBitCount; }
 
         for (size_t eIndex=0; eIndex < length; ++eIndex) {
- detail::digit_t e(exponent._get_digit(eIndex));
+ detail::digit_t ee(e._get_digit(eIndex));
 
             int bitCount(int(eIndex == length-1 ? lastBitCount :
                 detail::bits_per_digit));
             while (bitCount-- > 0) {
- if (e & 0x01) answer=mulmod(answer, p, modulus);
- p=sqrmod(p, modulus);
- e >>= 1;
+ if (ee & 0x01) answer=mulmod(answer, p, m);
+ p=sqrmod(p, m);
+ ee >>= 1;
             }
         }
     }

Modified: sandbox/xint/src/monty.cpp
==============================================================================
--- sandbox/xint/src/monty.cpp (original)
+++ sandbox/xint/src/monty.cpp 2010-04-06 01:40:33 EDT (Tue, 06 Apr 2010)
@@ -8,8 +8,14 @@
     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 contains the definitions for functions based on the Montgomery
- reduction. Used for an extra-fast powerMod.
+ Reduction, used internally for an extra-fast xint::powmod.
 */
 
 #include "../boost/xint/xint.hpp"
@@ -23,6 +29,7 @@
 
 using namespace detail;
 
+//! Returns the low digit of the inverse of a number. Used internally.
 digit_t inverse0(const integer& n) {
     // Using the Dussé and Kalisk simplification
     doubledigit_t x = 2, y = 1;
@@ -33,17 +40,22 @@
     return digit_t(x - y);
 }
 
+/*! \brief Returns the most efficient R value for a number and the library's
+ internal representation. Used internally.
+*/
 integer montgomeryR(const integer& n) {
     return integer::one() << (bits_per_digit * n._get_data()->mLength);
 }
 
+//! Returns the Montgomery form of a number. Used for testing.
 integer toMontgomeryForm(const integer& n, const integer& m) {
     return (n * montgomeryR(m) % m);
 }
 
+//! Returns the integer from the Montgomery form of a number. Used for testing.
 integer fromMontgomeryForm(const integer& n, const integer& m) {
     integer inv=invmod(montgomeryR(m), m);
- if (inv.nan()) {
+ if (inv.is_nan()) {
         if (exceptions_allowed()) throw invalid_modulus("modulus has no inverse");
         else return integer(not_a_number());
     }
@@ -74,8 +86,11 @@
 // return A;
 //}
 
-integer montgomeryMultiplyMod(const integer& a, const integer& b, const integer& n,
- digit_t nPrime0)
+/*! \brief Returns the Montgomery equivalent of <code>mulmod(a, b, n)</code>.
+ Used internally.
+*/
+integer montgomeryMultiplyMod(const integer& a, const integer& b, const integer&
+ n, digit_t nPrime0)
 {
     // Using the Dussé and Kalisk simplification
     // Unstated parameter B is a power of two representing the number of values
@@ -209,6 +224,9 @@
 
 } // namespace
 
+/*! \brief Returns the Montgomery equivalent of <code>powmod(a, b, n)</code>.
+ Used internally.
+*/
 integer montgomeryPowerMod(const integer& a, const integer& e, const integer& n)
 {
     // 0 <= a < n, n is odd

Modified: sandbox/xint/src/operators.cpp
==============================================================================
--- sandbox/xint/src/operators.cpp (original)
+++ sandbox/xint/src/operators.cpp 2010-04-06 01:40:33 EDT (Tue, 06 Apr 2010)
@@ -8,7 +8,11 @@
     See accompanying file LICENSE_1_0.txt or copy at
         http://www.boost.org/LICENSE_1_0.txt
 
- This file contains the definitions for the basic math operators.
+ See http://www.boost.org/libs/xint for library home page.
+*/
+
+/*! \file
+ \brief Contains the definitions for the basic math operators.
 */
 
 #include "../boost/xint/xint.hpp"

Modified: sandbox/xint/src/powers.cpp
==============================================================================
--- sandbox/xint/src/powers.cpp (original)
+++ sandbox/xint/src/powers.cpp 2010-04-06 01:40:33 EDT (Tue, 06 Apr 2010)
@@ -8,8 +8,11 @@
     See accompanying file LICENSE_1_0.txt or copy at
         http://www.boost.org/LICENSE_1_0.txt
 
- This file contains the definitions for functions related to powers of a
- number.
+ See http://www.boost.org/libs/xint for library home page.
+*/
+
+/*! \file
+ \brief Contains the definitions for functions related to powers of a number.
 */
 
 #include "../boost/xint/xint.hpp"
@@ -33,12 +36,31 @@
 
 } // namespace
 
-integer pow2(size_t exponent) {
+/*! \brief Calculate the value of 2<sup>e</sup>
+
+\param[in] e The exponent to operate on.
+
+\returns 2 to the power of \c e.
+
+\remarks
+This is a convenience function, to help with self-documenting code.
+*/
+integer pow2(size_t e) {
     integer r;
- setbit(r, exponent);
+ setbit(r, e);
     return r;
 }
 
+/*! \brief Calculate the value of n<sup>2</sup>
+
+\param[in] n The integer to operate on.
+
+\returns \c n times \c n.
+
+This function uses a faster algorithm than the standard multiplication one.
+
+\todo Rewrite this to eliminate the inefficient addOverflow.
+*/
 integer sqr(const integer& n) {
     n._throw_if_nan();
 
@@ -83,22 +105,28 @@
     return answer;
 }
 
-integer pow(const integer& n, const integer& exponent) {
- bool neg=(n.sign() < 0 && exponent.odd());
+/*! \brief Calculate the value of n<sup>e</sup>
+
+\param[in] n, e The integers to operate on.
+
+\returns \c n to the power of \c e.
+*/
+integer pow(const integer& n, const integer& e) {
+ bool neg=(n.sign() < 0 && e.odd());
 
- size_t length=exponent._get_length(), lastBitCount=0;
- digit_t ee(exponent._get_digit(length-1));
+ size_t length=e._get_length(), lastBitCount=0;
+ digit_t ee(e._get_digit(length-1));
     while (ee != 0) { ee >>= 1; ++lastBitCount; }
 
     integer p(abs(n)), answer=integer::one();
     for (size_t eIndex=0; eIndex < length; ++eIndex) {
- digit_t e(exponent._get_digit(eIndex));
+ digit_t eee(e._get_digit(eIndex));
 
         int bitCount(int(eIndex == length-1 ? lastBitCount : bits_per_digit));
         while (bitCount-- > 0) {
- if (e & 0x01) answer*=p;
+ if (eee & 0x01) answer*=p;
             p=sqr(p);
- e >>= 1;
+ eee >>= 1;
         }
     }
 
@@ -106,6 +134,17 @@
     return answer;
 }
 
+/*! \brief Calculate the value of \c n!
+
+\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.
+*/
 integer factorial(size_t n) {
     integer r(integer::one());
     if (n == (std::numeric_limits<size_t>::max)()) {

Modified: sandbox/xint/src/primes.cpp
==============================================================================
--- sandbox/xint/src/primes.cpp (original)
+++ sandbox/xint/src/primes.cpp 2010-04-06 01:40:33 EDT (Tue, 06 Apr 2010)
@@ -8,7 +8,11 @@
     See accompanying file LICENSE_1_0.txt or copy at
         http://www.boost.org/LICENSE_1_0.txt
 
- This file contains the definitions for functions related to prime numbers.
+ See http://www.boost.org/libs/xint for library home page.
+*/
+
+/*! \file
+ \brief Contains the definitions for functions related to prime numbers.
 */
 
 #include "../boost/xint/xint.hpp"
@@ -73,9 +77,33 @@
 
 } // namespace
 
+/*! \brief Tests an integer for primality.
+
+\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 std::invalid_argument if \c n is less than 2.
+
+\note If exceptions are blocked, it will return -1 instead of throwing an
+exception.
+
+\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 random "witness" numbers each time.
+
+\see \ref primes
+*/
 int is_prime(const integer& n, callback_t callback) {
     if (n < 2) {
- if (exceptions_allowed()) throw std::invalid_argument("xint::is_prime cannot test numbers below 2");
+ if (exceptions_allowed()) throw std::invalid_argument("xint::is_prime "
+ "cannot test numbers below 2");
         else return -1;
     }
 
@@ -94,16 +122,45 @@
     return 1; // Appears to be prime!
 }
 
-integer random_prime(size_t sizeInBits, callback_t callback) {
+/*! \brief Generate a randomly-generated prime number of a particular bit-size.
+
+\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 std::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
+It also uses the library's currently-set random number generator. See the \link
+random Random Number Functions page\endlink for details on its limitations and
+requirements, and how to get cryptographically-secure random numbers.
+
+\see \ref primes
+*/
+integer random_prime(size_t size_in_bits, callback_t callback) {
+ if (size_in_bits < 2) {
+ if (exceptions_allowed()) throw std::invalid_argument(
+ "xint::random_prime cannot create prime numbers smaller than two "
+ "bits");
+ else return integer(not_a_number());
+ }
+
     // Call the callback for the first time
- if (callback && !callback()) return integer(not_a_number());
+ if (callback && !callback()) return integer::zero();
 
- integer pe=pow2(sizeInBits+1);
+ integer pe=pow2(size_in_bits+1);
     while (1) {
- integer p(random_by_size(sizeInBits, true, true));
+ integer p(random_by_size(size_in_bits, true, true));
         while (p < pe) {
             int r=is_prime(p, callback);
- if (r < 0) return integer(not_a_number());
+ if (r < 0) return integer::zero();
             if (r == 1) return p;
             p+=2;
         }

Modified: sandbox/xint/src/primitives.cpp
==============================================================================
--- sandbox/xint/src/primitives.cpp (original)
+++ sandbox/xint/src/primitives.cpp 2010-04-06 01:40:33 EDT (Tue, 06 Apr 2010)
@@ -8,7 +8,11 @@
     See accompanying file LICENSE_1_0.txt or copy at
         http://www.boost.org/LICENSE_1_0.txt
 
- This file contains the definitions for math primitives.
+ See http://www.boost.org/libs/xint for library home page.
+*/
+
+/*! \file
+ \brief Contains the definitions for math primitives.
 */
 
 #include "../boost/xint/xint.hpp"
@@ -19,19 +23,37 @@
 
 using namespace detail;
 
+/*! \brief Returns the absolute value of an integer.
+
+\param[in] n The integer to operate on.
+
+\returns If \c n is zero or positive, returns \c n. Otherwise returns \c -n.
+*/
 integer abs(const integer& n) {
     return (n < 0 ? -n : n);
 }
 
-integer negate(const integer& _n) {
- _n._throw_if_nan();
+/*! \brief Return the additive inverse of an integer.
+
+\param[in] n The integer to operate on.
+
+\returns \c -n.
+*/
+integer negate(const integer& n) {
+ n._throw_if_nan();
 
- integer n(_n);
- n._make_unique();
- n._get_data()->negate();
- return n;
+ integer nn(n);
+ nn._make_unique();
+ nn._get_data()->negate();
+ return nn;
 }
 
+/*! \brief Calculate the sum of two integers.
+
+\param[in] n1, n2 The integers to add.
+
+\returns The sum of the parameters.
+*/
 integer add(const integer& n1, const integer& n2) {
     int sign1=n1.sign(), sign2=n2.sign();
     if (sign1 != sign2) {
@@ -50,6 +72,12 @@
     }
 }
 
+/*! \brief Calculate the difference between two integers.
+
+\param[in] n1, n2 The integers to operate on.
+
+\returns The difference between the parameters.
+*/
 integer subtract(const integer& n1, const integer& n2) {
     int sign1=n1.sign(), sign2=n2.sign();
     if (sign1 != sign2) {
@@ -69,6 +97,16 @@
     }
 }
 
+/*! \brief Calculate the product of two integers.
+
+\param[in] n, by 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.
+*/
 integer multiply(const integer& n, const integer& by) {
     int nsign=n.sign(), bysign=by.sign();
     if (nsign==0 || bysign==0) return integer::zero();
@@ -178,7 +216,7 @@
             doubledigit_t r2a=ri - (q * byDigits[n-1]);
             integer r2=(integer(r2a) << bits_per_digit) + r._get_digit(i-2);
             if (byDigits[n-2] * q <= r2) break;
- --q;
+ --q;
         }
 
         integer bq=d2*q;
@@ -209,10 +247,32 @@
 
 } // namespace
 
+/*! \brief Calculate how many \c dividends would fit into \c divisor.
+
+\param[in] dividend, divisor The integers to operate on.
+
+\returns The integer value of \c dividend divided by \c divisor.
+
+\exception xint::divide_by_zero if \c divisor is zero.
+*/
 integer divide(const integer& dividend, const integer& divisor) {
     return divide_r(dividend, divisor).first;
 }
 
+/*! \brief Calculate how many \c dividends would fit into \c divisor, with the
+ remainder.
+
+\param[in] d1 The dividend.
+\param[in] d2 The divisor.
+
+\returns An \c std::pair containing the quotient and remainder of \c d1 divided
+by \c d2.
+
+\exception xint::divide_by_zero if \c d2 is zero.
+
+\note If exceptions are blocked, it will return an std::pair with two
+Not-a-Number values instead of throwing.
+*/
 std::pair<integer, integer> divide_r(const integer& d1, const
     integer& d2)
 {

Modified: sandbox/xint/src/random.cpp
==============================================================================
--- sandbox/xint/src/random.cpp (original)
+++ sandbox/xint/src/random.cpp 2010-04-06 01:40:33 EDT (Tue, 06 Apr 2010)
@@ -8,7 +8,11 @@
     See accompanying file LICENSE_1_0.txt or copy at
         http://www.boost.org/LICENSE_1_0.txt
 
- This file contains the random number functions.
+ See http://www.boost.org/libs/xint for library home page.
+*/
+
+/*! \file
+ \brief Contains the definitions for the random number functions.
 */
 
 #ifdef _WIN32
@@ -93,6 +97,7 @@
 ////////////////////////////////////////////////////////////////////////////////
 // The secure random generator
 
+//! @cond
 #ifdef _WIN32
     struct strong_random_generator::impl_t {
         typedef BOOLEAN (WINAPI *RtlGenRandomFn)(PVOID, ULONG);
@@ -151,6 +156,7 @@
 
     double strong_random_generator::entropy() const { return 8; }
 #endif
+//! @endcond
 
 const bool strong_random_generator::has_fixed_range = true;
 const strong_random_generator::result_type strong_random_generator::min_value =
@@ -161,16 +167,40 @@
 strong_random_generator::~strong_random_generator() { delete impl; }
 strong_random_generator::result_type strong_random_generator::operator()() {
     return (*impl)(); }
+
+//! @cond
 strong_random_generator::result_type strong_random_generator::min
     BOOST_PREVENT_MACRO_SUBSTITUTION () const { return min_value; }
 strong_random_generator::result_type strong_random_generator::max
     BOOST_PREVENT_MACRO_SUBSTITUTION () const { return max_value; }
+//! @endcond
 
 ////////////////////////////////////////////////////////////////////////////////
 // Returns a positive (unless told otherwise) integer between zero and
 // (1<<bits)-1, inclusive
-integer random_by_size(size_t bits, bool highBitOn, bool lowBitOn, bool
- canBeNegative)
+
+/*! \brief Generates a random integer with specific attributes.
+
+\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.
+
+\returns A random integer with the requested attributes.
+
+\remarks
+This function uses the currently-defined random generator.
+
+\see \ref random
+\see xint::set_random_generator
+*/
+integer random_by_size(size_t bits, bool high_bit_on, bool low_bit_on, bool
+ can_be_negative)
 {
     if (bits<=0) return integer::zero();
 
@@ -194,9 +224,9 @@
         *ie=p._get_data()->digits+p._get_data()->mLength; i<ie; ++i) *i=0;
     p._get_data()->skipLeadingZeros();
 
- if (highBitOn) setbit(p, bits-1);
- if (lowBitOn) setbit(p, 0);
- if (canBeNegative) p._set_negative(randomGenerator() & 0x01);
+ if (high_bit_on) setbit(p, bits-1);
+ if (low_bit_on) setbit(p, 0);
+ if (can_be_negative) p._set_negative(randomGenerator() & 0x01);
 
     return p;
 }

Modified: sandbox/xint/src/roots.cpp
==============================================================================
--- sandbox/xint/src/roots.cpp (original)
+++ sandbox/xint/src/roots.cpp 2010-04-06 01:40:33 EDT (Tue, 06 Apr 2010)
@@ -8,14 +8,27 @@
     See accompanying file LICENSE_1_0.txt or copy at
         http://www.boost.org/LICENSE_1_0.txt
 
- This file contains the definitions for functions related to roots of a
- number.
+ See http://www.boost.org/libs/xint for library home page.
+*/
+
+/*! \file
+ \brief Contains the definitions for functions related to roots of a number.
 */
 
 #include "../boost/xint/xint.hpp"
 
 namespace xint {
 
+/*! \brief Calculate the square root of \c an integer.
+
+\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 xint::cannot_represent if \c n is negative.
+*/
 integer sqrt(const integer& n) {
     if (n.sign() < 0) {
         if (exceptions_allowed()) throw cannot_represent("library cannot "

Added: sandbox/xint/test/Jamroot
==============================================================================
--- (empty file)
+++ sandbox/xint/test/Jamroot 2010-04-06 01:40:33 EDT (Tue, 06 Apr 2010)
@@ -0,0 +1,20 @@
+
+lib boost_xint : : <name>boost_xint ;
+lib boost_test : : <name>boost_unit_test_framework ;
+
+exe test
+ :
+ # Source code files
+ test_main.cpp test_streams.cpp test_add.cpp test_bit_manipulations.cpp
+ test_convert.cpp test_divide.cpp test_multiply.cpp test_monty.cpp
+
+ # Boost libraries
+ boost_xint
+ boost_test
+ :
+ <include>../
+
+ # For GCC only
+ <cflags>-fno-strict-aliasing
+ ;
+

Added: sandbox/xint/test/test_add.cpp
==============================================================================
--- (empty file)
+++ sandbox/xint/test/test_add.cpp 2010-04-06 01:40:33 EDT (Tue, 06 Apr 2010)
@@ -0,0 +1,91 @@
+
+/*
+ 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
+
+ This file contains the tests for the addition and subtraction functions.
+*/
+
+#include <boost/xint/xint.hpp>
+
+#define BOOST_TEST_DYN_LINK
+#include <boost/test/unit_test.hpp>
+
+#include <iostream>
+
+namespace xint {
+
+using std::endl;
+using std::dec;
+using std::hex;
+
+namespace {
+
+void _test(int section, int test, integer n, integer m) {
+ integer answer(m+n);
+ if (answer-m != n || answer-n != m) {
+ std::ostringstream out;
+ out << "testAddSubtract, section " << section << ", " << test << endl;
+
+ out << "n = " << n;
+ if (section==0) out << " (" << hex << n << dec << ')';
+ out << endl;
+
+ out << "m = " << m;
+ if (section==0) out << " (" << hex << m << dec << ')';
+ out << endl;
+
+ out << "a = " << answer;
+ if (section==0) out << " (" << hex << answer << dec << ')';
+ out << endl << endl;
+
+ out << "a - m = " << (answer-m)
+ << (answer-m == n ? " (good)" : " (should be n, isn't)")
+ << endl;
+ out << "a - n = " << (answer-n)
+ << (answer-n == m ? " (good)" : " (should be m, isn't)")
+ << endl;
+ BOOST_FAIL(out.str());
+ }
+}
+
+} // namespace
+
+BOOST_AUTO_TEST_CASE(testAddSubtract) {
+ {
+ integer n("-3000000080000000600000000", 16),
+ m("8000000090000000600000000", 16);
+ _test(0, 0, n, m);
+ }
+
+ for (int i=0; i<10000; ++i) {
+ integer n(random_by_size(detail::bits_per_digit*4)),
+ m(random_by_size(detail::bits_per_digit*4));
+ _test(1, i, n, m);
+ }
+
+ for (int i=0; i<1000; ++i) {
+ integer n(random_by_size(detail::bits_per_digit*4, false, false, true)),
+ m(random_by_size(detail::bits_per_digit*4, false, false, true));
+ _test(2, i, n, m);
+ }
+
+ for (int i=0; i<1000; ++i) {
+ integer n(random_by_size(detail::bits_per_digit*4, false, false, true)),
+ m(random_by_size(detail::bits_per_digit*3, false, false, true));
+ _test(3, i, n, m);
+ }
+
+ for (int i=0; i<1000; ++i) {
+ integer n(random_by_size(detail::bits_per_digit*3, false, false, true)),
+ m(random_by_size(detail::bits_per_digit*4, false, false, true));
+ _test(4, i, n, m);
+ }
+}
+
+} // namespace xint

Added: sandbox/xint/test/test_bit_manipulations.cpp
==============================================================================
--- (empty file)
+++ sandbox/xint/test/test_bit_manipulations.cpp 2010-04-06 01:40:33 EDT (Tue, 06 Apr 2010)
@@ -0,0 +1,111 @@
+
+/*
+ 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
+
+ This file contains the functions that test the low-level bit manipulations.
+*/
+
+#include <boost/xint/xint.hpp>
+
+#define BOOST_TEST_DYN_LINK
+#include <boost/test/unit_test.hpp>
+
+#include <iostream>
+#include <iomanip>
+
+namespace xint {
+
+using std::hex;
+
+BOOST_AUTO_TEST_CASE(testBitManipulations) {
+ const std::string nSrc="1a2b3c4d5e6f7f6e5d4c3b2a1a2b3c4d5e6f7f6e5d4c3b2a1";
+ integer n(nSrc, 16), n2;
+
+ // If this fails, abort the rest of the test.
+ if (to_string(n, 16) != nSrc) BOOST_FAIL("failure in reading string, can't test");
+
+ // Bits only
+
+ n2 = n << 4;
+ if (to_string(n2, 16) != nSrc+'0') {
+ std::ostringstream out;
+ out << "testBitManipulations: << 4 failure, " << hex << n2;
+ BOOST_ERROR(out.str());
+ }
+
+ n2 >>= 4;
+ if (n2 != n) {
+ std::ostringstream out;
+ out << "testBitManipulations: >>= 4 failure, " << hex << n2;
+ BOOST_ERROR(out.str());
+ }
+
+ // Digits only
+
+ const int cDigitsPerDigit=(detail::bits_per_digit / 4);
+ n2 <<= detail::bits_per_digit;
+ if (to_string(n2, 16) != nSrc + std::string(cDigitsPerDigit, '0')) {
+ std::ostringstream out;
+ out << "testBitManipulations: <<= BpD failure, " << hex << n2;
+ BOOST_ERROR(out.str());
+ }
+
+ n2 >>= detail::bits_per_digit;
+ if (n2 != n) {
+ std::ostringstream out;
+ out << "testBitManipulations: >>= BpD failure, " << hex << n2;
+ BOOST_ERROR(out.str());
+ }
+
+ // Bits and digits simultaaneously
+
+ const int bits_per_digit2=(detail::bits_per_digit + detail::bits_per_digit/2);
+ const int cDigitsPerDigit2=(bits_per_digit2 / 4);
+ n2 <<= bits_per_digit2;
+ if (to_string(n2, 16) != nSrc + std::string(cDigitsPerDigit2, '0')) {
+ std::ostringstream out;
+ out << "testBitManipulations: <<= BpD2 failure, " << hex << n2;
+ BOOST_ERROR(out.str());
+ }
+
+ n2 >>= bits_per_digit2;
+ if (n2 != n) {
+ std::ostringstream out;
+ out << "testBitManipulations: >>= BpD2 failure, " << hex << n2;
+ BOOST_ERROR(out.str());
+ }
+
+ // Right-shift to oblivion
+
+ n2 >>= (detail::bits_per_digit * n2._get_length());
+ if (n2.sign()!=0) {
+ std::ostringstream out;
+ out << "testBitManipulations: >>= inf failure, " << hex << n2;
+ BOOST_ERROR(out.str());
+ }
+
+ // Single-digit by bits
+
+ n=n2=0xEF;
+ n2 <<= 4;
+ if (to_string(n2, 16) != "ef0") {
+ std::ostringstream out;
+ out << "testBitManipulations: single <<= 4 failure, " << hex << n2;
+ BOOST_ERROR(out.str());
+ }
+
+ n2 >>= 4;
+ if (n2 != n) {
+ std::ostringstream out;
+ out << "testBitManipulations: single >>= 4 failure, " << hex << n2;
+ BOOST_ERROR(out.str());
+ }
+}
+
+} // namespace xint

Added: sandbox/xint/test/test_convert.cpp
==============================================================================
--- (empty file)
+++ sandbox/xint/test/test_convert.cpp 2010-04-06 01:40:33 EDT (Tue, 06 Apr 2010)
@@ -0,0 +1,98 @@
+
+/*
+ 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
+
+ This file contains the tests for the conversion functions.
+*/
+
+#include <boost/xint/xint.hpp>
+
+#define BOOST_TEST_DYN_LINK
+#include <boost/test/unit_test.hpp>
+
+#include <iostream>
+#include <iomanip>
+#include <stdexcept>
+#include <vector>
+#include <boost/assign/list_of.hpp>
+
+using std::endl;
+
+namespace xint {
+
+BOOST_AUTO_TEST_CASE(testConvert) {
+ // Come up with a sufficiently complex number to test with. It must be
+ // greater than one digit's worth of data, and have at least one leading
+ // zero in base 16.
+ std::string nStr("2345678900987654321");
+ integer n(sqr(integer(nStr)));
+
+ // If it's zero, something went wrong that we might not catch below.
+ BOOST_REQUIRE_NE(n, 0);
+
+ // Make sure that the number is greater than one digit's worth of data, and
+ // that it has at least one leading zero in base 16.
+ detail::digit_t mask=(detail::doubledigit_t(0x0F) << (detail::bits_per_digit - 4));
+ BOOST_REQUIRE_GT(n._get_length(), size_t(1));
+ BOOST_REQUIRE_EQUAL(n._get_digit(n._get_length()-1) & mask, 0);
+
+ for (int base=2; base<=36; ++base) {
+ std::string s=to_string(n, base);
+ integer nn(s, base);
+ if (nn != n) {
+ std::ostringstream out;
+ out << "testConvert 1, " << base << ": " << to_string(n, base)
+ << ", " << to_string(nn, base) << endl;
+ BOOST_ERROR(out.str());
+ }
+
+ // Shouldn't be any extraneous leading zeros
+ if (s[0]=='0') {
+ std::ostringstream out;
+ out << "testConvert 2, " << base << ": " << s << endl;
+ BOOST_ERROR(out.str());
+ }
+
+ s=to_string(-n, base);
+ nn=integer(s, base);
+ if (nn != -n) {
+ std::ostringstream out;
+ out << "testConvert 3, " << base << ": " << to_string(-n, base)
+ << ", " << to_string(nn, base) << endl;
+ BOOST_ERROR(out.str());
+ }
+ }
+
+ BOOST_REQUIRE(exceptions_allowed());
+
+ // Test base numbers that shouldn't be allowed
+ const std::vector<int> testBases=boost::assign::list_of(-1)(0)(1)(37);
+ for (std::vector<int>::const_iterator b=testBases.begin();
+ b!=testBases.end(); ++b)
+ BOOST_CHECK_THROW(to_string(n, *b), invalid_base);
+
+ boost::int32_t nSrc=1234567890;
+ n=nSrc;
+ boost::int32_t nTgt=to<boost::int32_t>(n);
+ BOOST_CHECK_EQUAL(nTgt, nSrc);
+
+ {
+ token t=block_exceptions();
+ BOOST_CHECK_NO_THROW(integer badConversion("abcdefg", 16));
+ }
+
+ {
+ integer n1("8688527F70B1", 16);
+ std::string nbin=to_binary(n1);
+ integer n2=from_binary(nbin);
+ BOOST_CHECK_EQUAL(n1, n2);
+ }
+}
+
+} // namespace xint

Added: sandbox/xint/test/test_divide.cpp
==============================================================================
--- (empty file)
+++ sandbox/xint/test/test_divide.cpp 2010-04-06 01:40:33 EDT (Tue, 06 Apr 2010)
@@ -0,0 +1,93 @@
+
+/*
+ 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
+
+ This file contains the division testing functions. It also tests some other
+ operations, such as multiplication, but only indirectly and not very
+ thoroughly.
+*/
+
+#include <boost/xint/xint.hpp>
+
+#define BOOST_TEST_DYN_LINK
+#include <boost/test/unit_test.hpp>
+
+#include <iostream>
+#include <boost/tuple/tuple.hpp>
+#include <boost/random.hpp>
+
+namespace xint {
+
+using std::endl;
+
+namespace {
+
+void _test(int section, int test, integer n, integer m) {
+ integer answer, remainder;
+ boost::tie(answer, remainder)=divide_r(n, m);
+
+ integer check=answer*m+remainder;
+ if (check != n || abs(remainder) >= abs(m)) {
+ bool flagRemainder=(check == n);
+
+ std::ostringstream out;
+ out << "testDivideMod, section div-" << section << ", " << test << endl;
+ out << "n = " << to_string(n, 16) << endl;
+ out << "m = " << to_string(m, 16) << endl;
+ out << "a = " << to_string(answer, 16) << endl;
+ out << "r = " << to_string(remainder, 16)
+ << (flagRemainder ? " (should be < m, isn't)" : "")
+ << endl << endl;
+
+ out << "a * m + r = " << to_string(check, 16)
+ << (check != n ? " (should be n, isn't)" : " (ok)")
+ << endl;
+ BOOST_ERROR(out.str());
+ }
+
+ integer modAnswer=mod(n, m);
+ bool modValid=(modAnswer == remainder || modAnswer == remainder+abs(m));
+ if (modAnswer < 0 || modAnswer >= abs(m) || !modValid) {
+ std::ostringstream out;
+ out << "testDivideMod, section mod-" << section << ", " << test << endl;
+ out << "n = " << to_string(n, 16) << endl;
+ out << "m = " << to_string(m, 16) << endl;
+ out << "a = " << to_string(modAnswer, 16) << endl;
+
+ out << "expected = " << to_string(remainder, 16) << endl;
+ out << "or = " << to_string(remainder+abs(m), 16) << endl;
+ BOOST_ERROR(out.str());
+ }
+}
+
+} // namespace
+
+BOOST_AUTO_TEST_CASE(testDivide) {
+ set_random_generator(new boost::mt19937(42u));
+
+ for (int i=0; i<10000; ++i) {
+ integer n(random_by_size(detail::bits_per_digit*4, false, false, true)),
+ m(random_by_size(detail::bits_per_digit*4, false, false, true));
+ _test(1, i, n, m);
+ }
+
+ for (int i=0; i<1000; ++i) {
+ integer n(random_by_size(detail::bits_per_digit*4, false, false, true)),
+ m(random_by_size(detail::bits_per_digit*3, false, false, true));
+ _test(2, i, n, m);
+ }
+
+ for (int i=0; i<1000; ++i) {
+ integer n(random_by_size(detail::bits_per_digit*3, false, false, true)),
+ m(random_by_size(detail::bits_per_digit*4, false, false, true));
+ _test(3, i, n, m);
+ }
+}
+
+} // namespace xint

Added: sandbox/xint/test/test_main.cpp
==============================================================================
--- (empty file)
+++ sandbox/xint/test/test_main.cpp 2010-04-06 01:40:33 EDT (Tue, 06 Apr 2010)
@@ -0,0 +1,24 @@
+
+/*
+ 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
+
+ Previously, this file contained the function to run all of the self-tests
+ for the library. Since converting to Boost.Test, it's simply a place to
+ declare the auto-generated main function.
+
+ Note that not all functions have a test; all the primitives do, but the rest
+ only warrant testing if I'm refactoring them, or if I had problems while
+ writing them or in production.
+*/
+
+#include <boost/xint/xint.hpp>
+
+#define BOOST_TEST_MAIN
+#define BOOST_TEST_DYN_LINK
+#include <boost/test/unit_test.hpp>

Added: sandbox/xint/test/test_monty.cpp
==============================================================================
--- (empty file)
+++ sandbox/xint/test/test_monty.cpp 2010-04-06 01:40:33 EDT (Tue, 06 Apr 2010)
@@ -0,0 +1,135 @@
+
+/*
+ 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
+
+ This file contains the test functions for the Montgomery stuff.
+*/
+
+#include <boost/xint/xint.hpp>
+#include <boost/xint/xint_monty.hpp>
+
+#define BOOST_TEST_DYN_LINK
+#include <boost/test/unit_test.hpp>
+
+#include <iostream>
+#include <iomanip>
+#include <boost/random/mersenne_twister.hpp>
+
+namespace xint {
+
+using std::endl;
+
+namespace {
+
+void _test1(int section, int test, integer x, integer y, integer m) {
+ integer xx=toMontgomeryForm(x, m), yy=toMontgomeryForm(y, m);
+ integer mResult=fromMontgomeryForm(montgomeryMultiplyMod(xx, yy, m,
+ inverse0(m)), m);
+ integer cResult=mod(x * y, m);
+
+ if (mResult != cResult) {
+ std::ostringstream out;
+ out << "testMontyMultiply, section " << section << ", " << test << endl;
+ out << "x = " << to_string(x, 16) << endl;
+ out << "y = " << to_string(y, 16) << endl;
+ out << "m = " << to_string(m, 16) << endl;
+ out << "answer = " << to_string(mResult, 16) << endl;
+ out << "expected = " << to_string(cResult, 16) << endl << endl;
+ BOOST_ERROR(out.str());
+ }
+}
+
+void _test2(int section, int test, integer b, integer r, integer modulus) {
+ integer mResult=montgomeryPowerMod(b%modulus, r, modulus);
+ integer cResult=powmod(b%modulus, r, modulus, true);
+ if (mResult != cResult) {
+ std::ostringstream out;
+ out << "testMontyPowerMod, section " << section << ", " << test << endl;
+ out << "b = " << to_string(b, 16) << endl;
+ out << "r = " << to_string(r, 16) << endl;
+ out << "m = " << to_string(modulus, 16) << endl;
+ out << "answer = " << to_string(mResult, 16) << endl;
+ out << "expected = " << to_string(cResult, 16) << endl << endl;
+ BOOST_ERROR(out.str());
+ }
+}
+
+size_t random(size_t low, size_t high) {
+ unsigned long r=detail::get_random();
+ size_t range=high-low+1;
+ return size_t(low + (r % range));
+}
+
+size_t random1ToDigitLength() {
+ return random(1, detail::bits_per_digit);
+}
+
+} // namespace
+
+BOOST_AUTO_TEST_CASE(testMontyMultiply) {
+ // We always want these to run on the same data, so we can reproduce it if
+ // there are problems.
+ set_random_generator(new boost::mt19937(42u));
+
+ for (int i=0; i<1000; ++i) {
+ integer n(random_by_size(detail::bits_per_digit*3 + random1ToDigitLength(), false, false, true));
+ integer m(random_by_size(detail::bits_per_digit*3 + random1ToDigitLength(), false, false, true));
+ integer modulus(random_by_size(detail::bits_per_digit*4 + random1ToDigitLength(), true, true, false));
+ _test1(1, i, n, m, modulus);
+ }
+
+ for (int i=0; i<1000; ++i) {
+ integer n(random_by_size(detail::bits_per_digit*3 + random1ToDigitLength(), false, false, true));
+ integer m(random_by_size(detail::bits_per_digit*2 + random1ToDigitLength(), false, false, true));
+ integer modulus(random_by_size(detail::bits_per_digit*4 + random1ToDigitLength(), true, true, false));
+ _test1(2, i, n, m, modulus);
+ }
+
+ for (int i=0; i<1000; ++i) {
+ integer n(random_by_size(detail::bits_per_digit*2 + random1ToDigitLength(), false, false, true));
+ integer m(random_by_size(detail::bits_per_digit*3 + random1ToDigitLength(), false, false, true));
+ integer modulus(random_by_size(detail::bits_per_digit*4 + random1ToDigitLength(), true, true, false));
+ _test1(3, i, n, m, modulus);
+ }
+}
+
+BOOST_AUTO_TEST_CASE(testMontyPowerMod) {
+ // We always want these to run on the same data, so we can reproduce it if
+ // there are problems.
+ set_random_generator(new boost::mt19937(42u));
+
+ {
+ integer modulus(random_by_size(detail::bits_per_digit * 5 + random1ToDigitLength(), true, true));
+ for (int i=2; i<100; ++i)
+ _test2(0, i, integer("abcd1234", 16), i, modulus);
+ }
+
+ for (int i=0; i<100; ++i) {
+ integer n(random_by_size(detail::bits_per_digit*3 + random1ToDigitLength(), false, false));
+ integer m(random_by_size(detail::bits_per_digit*3 + random1ToDigitLength(), false, false));
+ integer modulus(random_by_size(detail::bits_per_digit * 2 + random(size_t(1), 3*detail::bits_per_digit), true, true));
+ _test2(1, i, n, m, modulus);
+ }
+
+ for (int i=0; i<100; ++i) {
+ integer n(random_by_size(detail::bits_per_digit*3 + random1ToDigitLength(), false, false));
+ integer m(random_by_size(detail::bits_per_digit*2 + random1ToDigitLength(), false, false));
+ integer modulus(random_by_size(detail::bits_per_digit * 4 + random1ToDigitLength(), true, true));
+ _test2(2, i, n, m, modulus);
+ }
+
+ for (int i=0; i<100; ++i) {
+ integer n(random_by_size(detail::bits_per_digit*2 + random1ToDigitLength(), false, false));
+ integer m(random_by_size(detail::bits_per_digit*3 + random1ToDigitLength(), false, false));
+ integer modulus(random_by_size(detail::bits_per_digit * 4 + random1ToDigitLength(), true, true));
+ _test2(3, i, n, m, modulus);
+ }
+}
+
+} // namespace xint

Added: sandbox/xint/test/test_multiply.cpp
==============================================================================
--- (empty file)
+++ sandbox/xint/test/test_multiply.cpp 2010-04-06 01:40:33 EDT (Tue, 06 Apr 2010)
@@ -0,0 +1,80 @@
+
+/*
+ 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
+
+ This file contains the multiplication-testing function. It also tests
+ division, but only indirectly, and not very thoroughly.
+*/
+
+#include <boost/xint/xint.hpp>
+
+#define BOOST_TEST_DYN_LINK
+#include <boost/test/unit_test.hpp>
+
+#include <iostream>
+
+namespace xint {
+
+using std::endl;
+
+namespace {
+
+void _test(int section, int test, integer n, integer m) {
+ integer result(m*n);
+ if (m.sign()==0 || n.sign()==0) BOOST_CHECK_EQUAL(result, 0);
+ else {
+ if (result/m != n || result/n != m) {
+ std::ostringstream out;
+ out << "testMultiply, section " << section << ", " << test << endl;
+ out << "n = " << to_string(n, 16) << endl;
+ out << "m = " << to_string(m, 16) << endl;
+ out << "r = " << to_string(result, 16) << endl << endl;
+
+ out << "r / m = " << to_string(result-m, 16)
+ << (result/m == n ? " (good)" : " (should be n, isn't)")
+ << endl;
+ out << "r / n = " << to_string(result-n, 16)
+ << (result/n == m ? " (good)" : " (should be m, isn't)")
+ << endl;
+ BOOST_ERROR(out.str());
+ }
+ }
+}
+
+} // namespace
+
+BOOST_AUTO_TEST_CASE(testMultiply) {
+ {
+ // 'm' contains a full digit of zeros, which caused problems with an
+ // earlier implementation.
+ integer n("300493435053701420844513300446198902283");
+ integer m("-10530911911644352242410713382920651977");
+ _test(0, 0, n, m);
+ }
+
+ for (int i=0; i<10000; ++i) {
+ integer n(random_by_size(detail::bits_per_digit*4, false, false, true)),
+ m(random_by_size(detail::bits_per_digit*4, false, false, true));
+ _test(1, i, n, m);
+ }
+
+ for (int i=0; i<1000; ++i) {
+ integer n(random_by_size(detail::bits_per_digit*4, false, false, true)),
+ m(random_by_size(detail::bits_per_digit*3, false, false, true));
+ _test(2, i, n, m);
+ }
+
+ for (int i=0; i<1000; ++i) {
+ integer n(random_by_size(detail::bits_per_digit*3, false, false, true)),
+ m(random_by_size(detail::bits_per_digit*4, false, false, true));
+ _test(3, i, n, m);
+ }
+}
+
+} // namespace xint

Added: sandbox/xint/test/test_streams.cpp
==============================================================================
--- (empty file)
+++ sandbox/xint/test/test_streams.cpp 2010-04-06 01:40:33 EDT (Tue, 06 Apr 2010)
@@ -0,0 +1,174 @@
+
+/*
+ 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
+
+ This file contains the stream testing functions.
+*/
+
+#include <boost/xint/xint.hpp>
+
+#define BOOST_TEST_DYN_LINK
+#include <boost/test/unit_test.hpp>
+
+#include <iostream>
+#include <iomanip>
+#include <sstream>
+
+namespace xint {
+
+namespace {
+
+bool testStreamOut(std::string name, std::stringstream& str, const integer& n, std::string expected) {
+ str.str(std::string());
+ str << n;
+ if (str.str() != expected) {
+ BOOST_ERROR("testStreamOut "+name+": "+str.str());
+ return false;
+ } else return true;
+}
+
+bool testStreamIn(std::string name, std::stringstream& str, std::string value, const integer& expected) {
+ integer test;
+
+ str.clear(); // Reset any error states on the stream
+ str.str(value);
+ str >> test;
+ if (test != expected) {
+ std::ostringstream out;
+ out << "testStreamIn " << name << ": ";
+ if (!str) out << "fail-bit on";
+ else out << test;
+ BOOST_ERROR(out.str());
+ return false;
+ } else return true;
+}
+
+} // namespace
+
+BOOST_AUTO_TEST_CASE(testStreams) {
+ // Test streaming stuff
+ const std::string nStreamSrc8="642547423257157";
+ const std::string nStreamSrc10="28772997619311";
+ const std::string nStreamSrc16="1a2b3c4d5e6f";
+ const std::string nStreamSrc16u="1A2B3C4D5E6F";
+ const std::string nStreamSrcL8="0642547423257157";
+ const std::string nStreamSrcL10="28772997619311";
+ const std::string nStreamSrcL16="0x1a2b3c4d5e6f";
+ const std::string nStreamSrcL16u="0X1A2B3C4D5E6F";
+ const std::string nStreamSrcLNeg16="-0x1a2b3c4d5e6f";
+ integer n(nStreamSrc16u, 16);
+
+ std::stringstream str;
+ std::ios::fmtflags defaultFlags=str.flags();
+ testStreamOut("10", str, n, nStreamSrc10);
+
+ str.flags(defaultFlags);
+ str << std::hex;
+ testStreamOut("16", str, n, nStreamSrc16);
+
+ str.flags(defaultFlags);
+ str << std::hex << std::uppercase;
+ testStreamOut("16u", str, n, nStreamSrc16u);
+
+ str.flags(defaultFlags);
+ str << std::oct;
+ testStreamOut("8", str, n, nStreamSrc8);
+
+ str.flags(defaultFlags);
+ str << std::showbase;
+ testStreamOut("L10", str, n, nStreamSrcL10);
+
+ str.flags(defaultFlags);
+ str << std::showbase << std::hex;
+ testStreamOut("L16", str, n, nStreamSrcL16);
+
+ str.flags(defaultFlags);
+ str << std::showbase << std::hex << std::uppercase;
+ testStreamOut("L16u", str, n, nStreamSrcL16u);
+
+ str.flags(defaultFlags);
+ str << std::showbase << std::oct;
+ testStreamOut("L8", str, n, nStreamSrcL8);
+
+ str.flags(defaultFlags);
+ str << std::hex << std::showbase;
+ testStreamOut("-L16", str, -n, nStreamSrcLNeg16);
+
+ // Now input streams
+
+ str.flags(defaultFlags);
+ testStreamIn("10", str, nStreamSrc10, n);
+
+ str.flags(defaultFlags);
+ str << std::oct;
+ testStreamIn("8", str, nStreamSrc8, n);
+
+ str.flags(defaultFlags);
+ str << std::hex;
+ testStreamIn("16", str, nStreamSrc16, n);
+
+ // Auto-base
+
+ std::ios::fmtflags autoBase=(defaultFlags & ~std::ios::dec);
+ str.flags(defaultFlags);
+ str.setf(autoBase, std::ios::basefield); // Sets auto-base
+ testStreamIn("auto-10", str, nStreamSrcL10, n);
+
+ str.flags(defaultFlags);
+ str.setf(autoBase, std::ios::basefield); // Sets auto-base
+ testStreamIn("auto-8", str, nStreamSrcL8, n);
+
+ str.flags(defaultFlags);
+ str.setf(autoBase, std::ios::basefield); // Sets auto-base
+ testStreamIn("auto-16", str, nStreamSrcL16, n);
+
+ str.flags(defaultFlags);
+ str.setf(autoBase, std::ios::basefield); // Sets auto-base
+ testStreamIn("auto-16u", str, nStreamSrcL16u, n);
+
+ str.flags(defaultFlags);
+ str.setf(autoBase, std::ios::basefield); // Sets auto-base
+ testStreamIn("auto-16 negative", str, nStreamSrcLNeg16, -n);
+
+ // Check error-handling
+
+ try {
+ integer test(123);
+
+ str.flags(defaultFlags);
+ str.clear();
+ str << std::oct;
+ str.str("8192");
+ str >> test;
+ BOOST_CHECK_EQUAL(test, 123); // Shouldn't have touched it
+ if (!!str) BOOST_ERROR("stream error signal wasn't set");
+ } catch (std::exception& e) {
+ std::string err=std::string("testStreams: erroneous input stream exception '")+e.what()+"'";
+ BOOST_ERROR(err);
+ }
+
+ try {
+ str.flags(defaultFlags);
+ str.clear();
+
+ str << integer(not_a_number());
+ std::string temp=str.str();
+
+ integer test;
+ str.str(temp);
+ str >> test;
+ if (!test.is_nan()) BOOST_ERROR("testStream: isNaN test failed");
+ if (!str) BOOST_ERROR("testStream: isNaN set stream error signal, shouldn't have");
+ } catch (std::exception& e) {
+ std::string err=std::string("testStreams: erroneous input stream exception '")+e.what()+"'";
+ BOOST_ERROR(err);
+ }
+}
+
+} // namespace xint


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