diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2012-03-04 11:55:19 -0800 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2012-03-04 11:55:19 -0800 |
commit | 3490dd06c52d5aa7c258f03025a05064837ce1c6 (patch) | |
tree | 23f4ef5380a7863f1ef290c9c309af4529689a0f /mpi-patches/bit-search-optimizations | |
parent | f75994545cb88c6625e4122afa61fbbe1adeb081 (diff) | |
download | txr-3490dd06c52d5aa7c258f03025a05064837ce1c6.tar.gz txr-3490dd06c52d5aa7c258f03025a05064837ce1c6.tar.bz2 txr-3490dd06c52d5aa7c258f03025a05064837ce1c6.zip |
* mpi-patches/add-mp-hash (mp_hash): Fixed use of uninitialized
variable on platforms where the MP digit is smaller than a long integer.
(Not anything TXR is known to run on). Changed algorithm to take the
first and last digit and add them together, rather than just taking the
last digit. The last digit will be zeros for numbers that contain 2 as a
factor with a large enough multiplicity.
* mpi-patches/add-mpi-toradix-with-case: Refreshed.
* mpi-patches/bit-search-optimizations: Likewise.
* mpi-patches/faster-square-root: Likewise.
* mpi-patches/fix-bad-shifts: Likewise.
* mpi-patches/fix-mult-bug: Likewise.
Diffstat (limited to 'mpi-patches/bit-search-optimizations')
-rw-r--r-- | mpi-patches/bit-search-optimizations | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/mpi-patches/bit-search-optimizations b/mpi-patches/bit-search-optimizations index ccbdae79..3dfaaa52 100644 --- a/mpi-patches/bit-search-optimizations +++ b/mpi-patches/bit-search-optimizations @@ -1,8 +1,8 @@ Index: mpi-1.8.6/mpi.c =================================================================== ---- mpi-1.8.6.orig/mpi.c 2011-12-21 15:57:17.000000000 -0800 -+++ mpi-1.8.6/mpi.c 2011-12-21 15:57:49.000000000 -0800 -@@ -2908,6 +2908,218 @@ +--- mpi-1.8.6.orig/mpi.c 2012-03-04 11:49:59.676143507 -0800 ++++ mpi-1.8.6/mpi.c 2012-03-04 11:50:07.500542257 -0800 +@@ -2921,6 +2921,218 @@ /* }}} */ @@ -221,7 +221,7 @@ Index: mpi-1.8.6/mpi.c /* {{{ s_mp_exch(a, b) */ /* Exchange the data for a and b; (b, a) = (a, b) */ -@@ -3185,10 +3397,9 @@ +@@ -3198,10 +3410,9 @@ mp_digit t, d = 0; t = DIGIT(b, USED(b) - 1); @@ -235,7 +235,7 @@ Index: mpi-1.8.6/mpi.c if(d != 0) { s_mp_mul_2d(a, d); -@@ -3971,27 +4182,23 @@ +@@ -3984,27 +4195,23 @@ d = DIGIT(v, uv - 1); /* most significant digit of v */ @@ -275,7 +275,7 @@ Index: mpi-1.8.6/mpi.c } /* end s_mp_ispow2() */ /* }}} */ -@@ -4000,17 +4207,12 @@ +@@ -4013,17 +4220,12 @@ int s_mp_ispow2d(mp_digit d) { |