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/fix-mult-bug | |
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/fix-mult-bug')
-rw-r--r-- | mpi-patches/fix-mult-bug | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/mpi-patches/fix-mult-bug b/mpi-patches/fix-mult-bug index a894eefe..a3e375df 100644 --- a/mpi-patches/fix-mult-bug +++ b/mpi-patches/fix-mult-bug @@ -1,8 +1,8 @@ Index: mpi-1.8.6/mpi.c =================================================================== ---- mpi-1.8.6.orig/mpi.c 2011-12-10 19:43:20.000000000 -0800 -+++ mpi-1.8.6/mpi.c 2011-12-12 21:55:28.000000000 -0800 -@@ -3255,7 +3255,7 @@ +--- mpi-1.8.6.orig/mpi.c 2012-03-04 11:49:39.720925007 -0800 ++++ mpi-1.8.6/mpi.c 2012-03-04 11:49:47.661389007 -0800 +@@ -3268,7 +3268,7 @@ unless absolutely necessary. */ max = USED(a); @@ -11,7 +11,7 @@ Index: mpi-1.8.6/mpi.c if(CARRYOUT(w) != 0) { if((res = s_mp_pad(a, max + 1)) != MP_OKAY) return res; -@@ -3263,7 +3263,7 @@ +@@ -3276,7 +3276,7 @@ } for(ix = 0; ix < max; ix++) { @@ -20,7 +20,7 @@ Index: mpi-1.8.6/mpi.c dp[ix] = ACCUM(w); k = CARRYOUT(w); } -@@ -3480,7 +3480,7 @@ +@@ -3493,7 +3493,7 @@ pa = DIGITS(a); for(jx = 0; jx < ua; ++jx, ++pa) { pt = pbt + ix + jx; @@ -29,7 +29,7 @@ Index: mpi-1.8.6/mpi.c *pt = ACCUM(w); k = CARRYOUT(w); } -@@ -3562,7 +3562,7 @@ +@@ -3575,7 +3575,7 @@ if(*pa1 == 0) continue; @@ -38,7 +38,7 @@ Index: mpi-1.8.6/mpi.c pbt[ix + ix] = ACCUM(w); k = CARRYOUT(w); -@@ -3584,7 +3584,7 @@ +@@ -3597,7 +3597,7 @@ pt = pbt + ix + jx; /* Compute the multiplicative step */ @@ -47,7 +47,7 @@ Index: mpi-1.8.6/mpi.c /* If w is more than half MP_WORD_MAX, the doubling will overflow, and we need to record a carry out into the next -@@ -3628,7 +3628,7 @@ +@@ -3641,7 +3641,7 @@ */ kx = 1; while(k) { |