X-Git-Url: https://mattmccutchen.net/bigint/bigint.git/blobdiff_plain/a8b42b686243a175ea328c74609c7de6a0163274..cb2f0c288d4b7acfa37d7a9c8bc1024c3f332b5f:/README diff --git a/README b/README index 055ad6f..5860522 100644 --- a/README +++ b/README @@ -1,35 +1,64 @@ -+===================================================================+ -| Big Integer Library | -| A C++ library that does arithmetic on integers of unlimited size. | -| Version 2005.01.16 | -+-------------------------------------------------------------------+ -| By Matt McCutchen | -| E-mail: hashproduct@verizon.net | -| Project Web site: http://mysite.verizon.net/mccutchen/bigint/ | -+===================================================================+ - -What the Big Integer Library provides -===================================== -This library contains two classes, BigUnsigned and BigInteger, that represent nonnegative integers and integers, respectively, of size limited only by your computer's memory. Their capabilities include these operators: - Math: + - * / % & | ^ unary- - Assignment: = += -= *= /= %= &= |= ^= ++ -- - Comparison: == != < <= > >= -In the works are the << and >> operators, integer algorithms like `gcd', and possibly a working implementation of RSA using the library. - -Using the features of the library -================================= -The file `sample.cc' explains and demonstrates the most important features of the library. I recommend that you read `sample.cc' and then run the sample program it contains. If you want to do something not shown in `sample.cc' or want more detail, read the actual header and source files, which are extensively commented. - -Compiling programs with the library -=================================== -The library consists of a folder full of header files (`.hh') and source files (`.cc'). `#include' header files and compile with source files as necessary for your own programs. For those who use `make', a `Makefile' is included that compiles the source code to object files (`.o') and compiles the sample program. - -Bugs -==== -The library has been tested by myself and others but is by no means bug-free. The programs you write using the library will be the best test of its correctness. I urge you to report any problems that you find, whether they come in the form of compiling trouble, mathematically inaccurate results, or runtime memory-management bloopers (which, since I use Java, are altogether too common in my C++). - -Keep in touch -============= -Feel free to e-mail me at `hashproduct@verizon.net' to report bugs or request features. When I fix the bug or add the feature, you will generally be credited by name in the source code and/or the Change Log unless you request otherwise. I am also curious as to what uses you find for the library. If you would like an e-mail whenever a new version of the library is released, e-mail me to join my informal mailing list. New versions of the library will be available at the project Web site at `http://mysite.verizon.net/mccutchen/bigint/'. - -===================================================================== \ No newline at end of file + + C++ Big Integer Library + (see ChangeLog for version) + + http://mattmccutchen.net/bigint/ + + Written and maintained by Matt McCutchen + +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'). `#include' header files and compile with source files as +necessary for your own programs. A Makefile is included that compiles the +library source files and the sample program and links them together; you can +easily customize the Makefile to replace the sample with your own program, or +you can write your own Makefile. + +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. + +~~~~