path: root/pbn_init.c
Commit message (Collapse)AuthorAgeFilesLines
* pbn_init.c: correct realloc/memset use in pbn_cow()H. Peter Anvin2012-03-201-3/+9
| | | | | realloc(): check the return value memset(): only do this if we actually grew the allocation
* Switch terminology from "atom" to the more standard "limb"H. Peter Anvin2012-03-121-21/+21
| | | | | The "limb" terminology ("like a digit but larger") seems to have become standard enough that we might as well follow suit.
* Fix the division case where the denominator is a single limbH. Peter Anvin2012-03-121-0/+11
| | | | | | The code for Knuth-D assumes a denominator of >= 2 limbs; test for this and fall back to a simple divide loop for a single-limb denominator.
* Do division via Knuth's Algorithm D (limb long division)H. Peter Anvin2012-03-121-0/+11
| | | | | Instead of bitwise, do division via Knuth's Algorithm D, which is basically probabilistic long division.
* Add working (but slow) division algorithm; fix shiftsH. Peter Anvin2007-10-121-2/+2
| | | | | | - Add working (but slow) pbn_div(); - Make pbn_adjust_bits() a part of the official API - Fix bug in the simple-case shift code
* Add bitwise operationsH. Peter Anvin2007-10-121-9/+5
| | | | Add bitwise operations: and, or, xor, set_bit, clr_bit, bit
* Be more careful about the zero caseH. Peter Anvin2007-10-121-1/+4
| | | | Handle the zero case better
* Change name from mpn to "pbn" (Peter's BigNum library)H. Peter Anvin2007-10-111-0/+164