summaryrefslogtreecommitdiffstats
path: root/arith.txr
Commit message (Collapse)AuthorAgeFilesLines
* * arith.c: Regenerated.Kaz Kylheku2011-12-111-13/+119
| | | | | * arith.txr (highest_bit): New function. (mul): Use highest_bit instead of shift based algorithm.
* Bignum support in mult function.Kaz Kylheku2011-12-101-6/+109
| | | | | | | | | | | | | | | | | | | | | | * arith.c: Regenerated. * arith.txr (CNUM_BIT): New constant. (bignum, bignum_dbl_ipt): New static functions. (@{add-fname}): Use bignum function. (mul): New functions, rewrite of mul from lib.c. * lib.c (mul): Function removed. * mpi-patches/add-mp-set-intptr (mp_set_intptr): Revised patch. Local variable v should be int_ptr_t not unsigned long. Also, the mp_set interface doesn't set the sign; it's an unsigned interface. We must do that ourselves. * mpi-patches/fix-mult-bug: The main multiplication function is also broken in the same way, requiring the cast. * mpi-patches/mpi-set-double-intptr: Fixed use of wrong type for local variable v.
* * arith.c: File is now generated using TXR.Kaz Kylheku2011-12-101-0/+163
(NOOP): New macro. (plus): Use NOOP macro. (minus, neg): Function moved here from lib.c and rewritten for bignum support. * lib.c (minus, neg): Functions removed. * arith.txr: New file.