The Extended Integer (XInt) Library

A fast, portable C++ library for multi-precision integer math.
Copyright 2010 by Chad Nelson

What is it?

It's 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 built-in 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.

Warning:
This is not (yet) an official Boost library.

Why would I use it?

How do I use it?

That's the best part. If you've installed the Boost library already, all you need to do is add #include <boost/xint/xint.hpp> at the top of your source code file and declare your variable as type boost::xint::integer. Then just use it the way you'd use any integer. If you need something more advanced, take a look in the reference section and you just might find it.

More information on how to use it can be found on the pages listed below.

Stand-Alone Examples:

Detailed Usage Information:

Library Information:


© Copyright Chad Nelson, 2010-2011. 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)