yosys/libs/bigint
Charlotte d130f7fca2 tests: use /usr/bin/env for bash. 2023-08-12 11:59:39 +10:00
..
.gitignore Moved stand-alone libs to libs/ directory and added libs/subcircuit 2013-02-27 09:32:19 +01:00
BigInteger.cc Moved stand-alone libs to libs/ directory and added libs/subcircuit 2013-02-27 09:32:19 +01:00
BigInteger.hh Moved stand-alone libs to libs/ directory and added libs/subcircuit 2013-02-27 09:32:19 +01:00
BigIntegerAlgorithms.cc Moved stand-alone libs to libs/ directory and added libs/subcircuit 2013-02-27 09:32:19 +01:00
BigIntegerAlgorithms.hh Moved stand-alone libs to libs/ directory and added libs/subcircuit 2013-02-27 09:32:19 +01:00
BigIntegerLibrary.hh Moved stand-alone libs to libs/ directory and added libs/subcircuit 2013-02-27 09:32:19 +01:00
BigIntegerUtils.cc Moved stand-alone libs to libs/ directory and added libs/subcircuit 2013-02-27 09:32:19 +01:00
BigIntegerUtils.hh Moved stand-alone libs to libs/ directory and added libs/subcircuit 2013-02-27 09:32:19 +01:00
BigUnsigned.cc Moved stand-alone libs to libs/ directory and added libs/subcircuit 2013-02-27 09:32:19 +01:00
BigUnsigned.hh Moved stand-alone libs to libs/ directory and added libs/subcircuit 2013-02-27 09:32:19 +01:00
BigUnsignedInABase.cc Moved stand-alone libs to libs/ directory and added libs/subcircuit 2013-02-27 09:32:19 +01:00
BigUnsignedInABase.hh Moved stand-alone libs to libs/ directory and added libs/subcircuit 2013-02-27 09:32:19 +01:00
ChangeLog Moved stand-alone libs to libs/ directory and added libs/subcircuit 2013-02-27 09:32:19 +01:00
Makefile Moved stand-alone libs to libs/ directory and added libs/subcircuit 2013-02-27 09:32:19 +01:00
NumberlikeArray.hh Moved stand-alone libs to libs/ directory and added libs/subcircuit 2013-02-27 09:32:19 +01:00
README Fixing old e-mail addresses and deadnames 2021-06-08 00:39:36 +02:00
run-testsuite tests: use /usr/bin/env for bash. 2023-08-12 11:59:39 +10:00
sample.cc Moved stand-alone libs to libs/ directory and added libs/subcircuit 2013-02-27 09:32:19 +01:00
testsuite.cc Moved stand-alone libs to libs/ directory and added libs/subcircuit 2013-02-27 09:32:19 +01:00

README

Note by Claire Wolf:
This version of bigint was downloaded at 2012-08-29 from
https://mattmccutchen.net/bigint/bigint-2010.04.30.tar.bz2

Some minor changes were made to the source code (e.g. "using"
was added to access declarations to prohibit compiler warnings).


==============================================================================

                            C++ Big Integer Library
                          (see ChangeLog for version)

                        http://mattmccutchen.net/bigint/

       Written and maintained by Matt McCutchen <matt@mattmccutchen.net>

You can use this library in a C++ program to do arithmetic on integers of size
limited only by your computer's memory.  The library provides BigUnsigned and
BigInteger classes that represent nonnegative integers and signed integers,
respectively.  Most of the C++ arithmetic operators are overloaded for these
classes, so big-integer calculations are as easy as:

    #include "BigIntegerLibrary.hh"
    
    BigInteger a = 65536;
    cout << (a * a * a * a * a * a * a * a);
    
    (prints 340282366920938463463374607431768211456)

The code in `sample.cc' demonstrates the most important features of the library.
To get started quickly, read the code and explanations in that file and run it.
If you want more detail or a feature not shown in `sample.cc', consult the
consult the actual header and source files, which are thoroughly commented.

This library emphasizes ease of use and clarity of implementation over speed;
some users will prefer GMP (http://swox.com/gmp/), which is faster.  The code is
intended to be reasonably portable across computers and modern C++ compilers; in
particular, it uses whatever word size the computer provides (32-bit, 64-bit, or
otherwise).

Compiling programs that use the library
---------------------------------------
The library consists of a folder full of C++ header files (`.hh') and source
files (`.cc').  Your own programs should `#include' the necessary header files
and link with the source files.  A makefile that builds the sample program
(`sample.cc') is included; you can adapt it to replace the sample with your own
program.

Alternatively, you can use your own build system or IDE.  In that case, you must
put the library header files where the compiler will find them and arrange to
have your program linked with the library source files; otherwise, you will get
errors about missing header files or "undefined references".  To learn how to do
this, consult the documentation for the build system or IDE; don't bother asking
me.  Adding all the library files to your project will work in many IDEs but may
not be the most desirable approach.

Resources
---------
The library's Web site (above) provides links to released versions, the current
development version, and a mailing list for release announcements, questions,
bug reports, and other discussion of the library.  I would be delighted to hear
from you if you like this library and/or find a good use for it.

Bugs and enhancements
---------------------
The library has been tested by me and others but is by no means bug-free.  If
you find a bug, please report it, whether it comes in the form of compiling
trouble, a mathematically inaccurate result, or a memory-management blooper
(since I use Java, these are altogether too common in my C++).  I generally fix
all reported bugs.  You are also welcome to request enhancements, but I am
unlikely to do substantial amounts of work on enhancements at this point.

Legal
-----
I, Matt McCutchen, the sole author of the original Big Integer Library, waive my
copyright to it, placing it in the public domain.  The library comes with
absolutely no warranty.

~~~~