projects
/
u
/
mdw
/
catacomb
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Rename Karatsuba constants now that we have @gfx_kmul@ too.
[u/mdw/catacomb]
/
mpmont.c
diff --git
a/mpmont.c
b/mpmont.c
index
4868bff
..
d000f8d
100644
(file)
--- a/
mpmont.c
+++ b/
mpmont.c
@@
-1,6
+1,6
@@
/* -*-c-*-
*
/* -*-c-*-
*
- * $Id: mpmont.c,v 1.1
1 2000/10/08 12:04:27
mdw Exp $
+ * $Id: mpmont.c,v 1.1
2 2000/10/08 15:48:35
mdw Exp $
*
* Montgomery reduction
*
*
* Montgomery reduction
*
@@
-30,6
+30,9
@@
/*----- Revision history --------------------------------------------------*
*
* $Log: mpmont.c,v $
/*----- Revision history --------------------------------------------------*
*
* $Log: mpmont.c,v $
+ * Revision 1.12 2000/10/08 15:48:35 mdw
+ * Rename Karatsuba constants now that we have @gfx_kmul@ too.
+ *
* Revision 1.11 2000/10/08 12:04:27 mdw
* (mpmont_reduce, mpmont_mul): Cope with negative numbers.
*
* Revision 1.11 2000/10/08 12:04:27 mdw
* (mpmont_reduce, mpmont_mul): Cope with negative numbers.
*
@@
-198,7
+201,7
@@
mp *mpmont_reduce(mpmont *mm, mp *d, mp *a)
/* --- Check for serious Karatsuba reduction --- */
/* --- Check for serious Karatsuba reduction --- */
- if (n >
KARATSUBA_CUTOFF
* 3) {
+ if (n >
MPK_THRESH
* 3) {
mp al;
mpw *vl;
mp *u;
mp al;
mpw *vl;
mp *u;
@@
-283,7
+286,7
@@
mp *mpmont_mul(mpmont *mm, mp *d, mp *a, mp *b)
mp *mpmont_mul(mpmont *mm, mp *d, mp *a, mp *b)
{
mp *mpmont_mul(mpmont *mm, mp *d, mp *a, mp *b)
{
- if (mm->n >
KARATSUBA_CUTOFF
* 3) {
+ if (mm->n >
MPK_THRESH
* 3) {
d = mp_mul(d, a, b);
d = mpmont_reduce(mm, d, d);
} else {
d = mp_mul(d, a, b);
d = mpmont_reduce(mm, d, d);
} else {