summaryrefslogtreecommitdiffstats
path: root/mpi-patches/add-mpi-toradix-with-case
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2012-03-04 11:55:19 -0800
committerKaz Kylheku <kaz@kylheku.com>2012-03-04 11:55:19 -0800
commit3490dd06c52d5aa7c258f03025a05064837ce1c6 (patch)
tree23f4ef5380a7863f1ef290c9c309af4529689a0f /mpi-patches/add-mpi-toradix-with-case
parentf75994545cb88c6625e4122afa61fbbe1adeb081 (diff)
downloadtxr-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/add-mpi-toradix-with-case')
-rw-r--r--mpi-patches/add-mpi-toradix-with-case14
1 files changed, 7 insertions, 7 deletions
diff --git a/mpi-patches/add-mpi-toradix-with-case b/mpi-patches/add-mpi-toradix-with-case
index b94fdb19..8d5b1e73 100644
--- a/mpi-patches/add-mpi-toradix-with-case
+++ b/mpi-patches/add-mpi-toradix-with-case
@@ -1,8 +1,8 @@
Index: mpi-1.8.6/mpi.c
===================================================================
---- mpi-1.8.6.orig/mpi.c 2011-12-10 12:05:35.000000000 -0800
-+++ mpi-1.8.6/mpi.c 2011-12-10 12:05:39.000000000 -0800
-@@ -2615,9 +2615,9 @@
+--- mpi-1.8.6.orig/mpi.c 2012-03-04 11:49:32.456841257 -0800
++++ mpi-1.8.6/mpi.c 2012-03-04 11:49:39.720925007 -0800
+@@ -2628,9 +2628,9 @@
/* }}} */
@@ -14,7 +14,7 @@ Index: mpi-1.8.6/mpi.c
{
int ix, pos = 0;
-@@ -2648,7 +2648,7 @@
+@@ -2661,7 +2661,7 @@
}
/* Generate digits, use capital letters */
@@ -23,7 +23,7 @@ Index: mpi-1.8.6/mpi.c
str[pos++] = ch;
}
-@@ -2676,10 +2676,15 @@
+@@ -2689,10 +2689,15 @@
return MP_OKAY;
@@ -42,8 +42,8 @@ Index: mpi-1.8.6/mpi.c
int mp_char2value(char ch, int r)
Index: mpi-1.8.6/mpi.h
===================================================================
---- mpi-1.8.6.orig/mpi.h 2011-12-10 12:05:35.000000000 -0800
-+++ mpi-1.8.6/mpi.h 2011-12-10 12:05:39.000000000 -0800
+--- mpi-1.8.6.orig/mpi.h 2012-03-04 11:49:32.196695007 -0800
++++ mpi-1.8.6/mpi.h 2012-03-04 11:49:39.724927257 -0800
@@ -213,6 +213,7 @@
int mp_radix_size(mp_int *mp, int radix);
int mp_value_radix_size(int num, int qty, int radix);