X-Git-Url: https://mattmccutchen.net/bigint/bigint.git/blobdiff_plain/918d66f23e6b2528010db6f121e229f488fe3410..66d84fa2e51e36706556be30cb38c8026db32e46:/ChangeLog diff --git a/ChangeLog b/ChangeLog index 25bc9fc..ac6927c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,10 +1,91 @@ -+===================================================================+ -Matt McCutchen's Big Integer Library -http://hashproduct.metaesthetics.net/bigint/ + Change Log -Change Log -========== -These entries tell you what was added, fixed, or improved in each version as compared to the previous one. In case you haven't noticed, a version number roughly corresponds to the release date of that version in `YYYY.MM.DD[.N]' format, where `.N' goes `.2', `.3', etc. if there are multiple versions on the same day. +These entries tell you what was added, fixed, or improved in each version as +compared to the previous one. In case you haven't noticed, a version number +roughly corresponds to the release date of that version in `YYYY.MM.DD[.N]' +format, where `.N' goes `.2', `.3', etc. if there are multiple versions on the +same day. The topmost version listed is the one you have. + +2010.04.30 +---------- +- Strengthen the advice about build/IDE configuration in the README. + +2009.05.03 +---------- +- BigUnsigned::{get,set}Bit: Change two remaining `1 <<' to `Blk(1) <<' to work + on systems where sizeof(unsigned int) != sizeof(Blk). Bug reported by Brad + Spencer. +- dataToBigInteger: Change a `delete' to `delete []' to avoid leaking memory. + Bug reported by Nicolás Carrasco. + +2009.03.26 +---------- +- BigUnsignedInABase(std::string) Reject digits too big for the base. + Bug reported by Niakam Kazemi. + +2008.07.20 +---------- +Dennis Yew pointed out serious problems with ambiguities and unwanted +conversions when mixing BigInteger/BigUnsigned and primitive integers. To fix +these, I removed the implicit conversions from BigInteger/BigUnsigned to +primitive integers and from BigInteger to BigUnsigned. Removing the +BigInteger-to-BigUnsigned conversion required changing BigInteger to have a +BigUnsigned field instead of inheriting from it; this was a complex task but +ultimately gave a saner design. At the same time, I went through the entire +codebase, making the formatting and comments prettier and reworking anything I +thought was unclear. I also added a testsuite (currently for 32-bit systems +only); it doesn't yet cover the entire library but should help to ensure that +things work the way they should. + +A number of changes from version 2007.07.07 break compatibility with existing +code that uses the library, but updating that code should be pretty easy: +- BigInteger can no longer be implicitly converted to BigUnsigned. Use + getMagnitude() instead. +- BigUnsigned and BigInteger can no longer be implicitly converted to primitive + integers. Use the toInt() family of functions instead. +- The easy* functions have been renamed to more mature names: + bigUnsignedToString, bigIntegerToString, stringToBigUnsigned, + stringToBigInteger, dataToBigInteger. +- BigInteger no longer supports bitwise operations. Get the magnitude with + getMagnitude() and operate on that instead. +- The old {BigUnsigned,BigInteger}::{divide,modulo} copy-less options have been + removed. Use divideWithRemainder instead. +- Added a base argument to BigUnsignedInABase's digit-array constructor. I + ope no one used that constructor in its broken state anyway. + +Other notable changes: +- Added BigUnsigned functions setBlock, bitLength, getBit, setBit. +- The bit-shifting operations now support negative shift amounts, which shift in + the other direction. +- Added some big-integer algorithms in BigIntegerAlgorithms.hh: gcd, + extendedEuclidean, modinv, modexp. + +2007.07.07 +---------- +Update the "Running the sample program produces this output:" comment in +sample.cc for the bitwise operators. + +2007.06.14 +---------- +- Implement << and >> for BigUnsigned in response to email from Marco Schulze. +- Fix name: DOTR_ALIASED -> DTRT_ALIASED. +- Demonstrate all bitwise operators (&, |, ^, <<, >>) in sample.cc. + +2007.02.16 +---------- +Boris Dessy pointed out that the library threw an exception on "a *= a", so I changed all the put-here operations to handle aliased calls correctly using a temporary copy instead of throwing exceptions. + +2006.08.14 +---------- +In BigUnsigned::bitXor, change allocate(b2->len) to allocate(a2->len): we should allocate enough space for the longer number, not the shorter one! Thanks to Sriram Sankararaman for pointing this out. + +2006.05.03 +---------- +I ran the sample program using valgrind and discovered a `delete s' that should be `delete [] s' and a `len++' before an `allocateAndCopy(len)' that should have been after an `allocateAndCopy(len + 1)'. I fixed both. Yay for valgrind! + +2006.05.01 +---------- +I fixed incorrect results reported by Mohand Mezmaz and related memory corruption on platforms where Blk is bigger than int. I replaced (1 << x) with (Blk(1) << x) in two places in BigUnsigned.cc. 2006.04.24 ---------- @@ -62,4 +143,4 @@ Brad Spencer pointed out a memory leak in `BigUnsigned::divide'. It is fixed in --------- After months of inactivity, I fixed a bug in the `BigInteger' division routine; thanks to David Allen for reporting the bug. I also added simple routines for decimal output to `std::ostream's, and there is a demo that prints out powers of 3. -+===================================================================+ \ No newline at end of file +~~~~