From 3490dd06c52d5aa7c258f03025a05064837ce1c6 Mon Sep 17 00:00:00 2001 From: Kaz Kylheku Date: Sun, 4 Mar 2012 11:55:19 -0800 Subject: * 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. --- mpi-patches/faster-square-root | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'mpi-patches/faster-square-root') diff --git a/mpi-patches/faster-square-root b/mpi-patches/faster-square-root index a19bab03..30f3da91 100644 --- a/mpi-patches/faster-square-root +++ b/mpi-patches/faster-square-root @@ -1,7 +1,7 @@ Index: mpi-1.8.6/mpi.c =================================================================== ---- mpi-1.8.6.orig/mpi.c 2011-12-13 15:18:37.000000000 -0800 -+++ mpi-1.8.6/mpi.c 2011-12-13 17:21:59.000000000 -0800 +--- mpi-1.8.6.orig/mpi.c 2012-03-04 11:45:43.071884757 -0800 ++++ mpi-1.8.6/mpi.c 2012-03-04 11:45:43.556157007 -0800 @@ -158,6 +158,9 @@ mp_err s_mp_grow(mp_int *mp, mp_size min); /* increase allocated size */ mp_err s_mp_pad(mp_int *mp, mp_size min); /* left pad with zeroes */ @@ -130,7 +130,7 @@ Index: mpi-1.8.6/mpi.c /* }}} */ -@@ -2541,21 +2522,9 @@ +@@ -2554,21 +2535,9 @@ int mp_count_bits(mp_int *mp) { @@ -153,7 +153,7 @@ Index: mpi-1.8.6/mpi.c } /* end mp_count_bits() */ /* }}} */ -@@ -3119,6 +3088,27 @@ +@@ -3132,6 +3101,27 @@ abort(); } -- cgit v1.2.3