projects
/
u
/
mdw
/
catacomb
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Use @MP_EQ@ instead of @MP_CMP@. Remove vestages of @primorial@.
[u/mdw/catacomb]
/
primorial.c
diff --git
a/primorial.c
b/primorial.c
index
6022c9a
..
68c45ad
100644
(file)
--- a/
primorial.c
+++ b/
primorial.c
@@
-1,6
+1,6
@@
/* -*-c-*-
*
/* -*-c-*-
*
- * $Id: primorial.c,v 1.
2 2000/07/09 21:31:43
mdw Exp $
+ * $Id: primorial.c,v 1.
4 2000/08/15 21:41:09
mdw Exp $
*
* Computes the product of the small primes
*
*
* Computes the product of the small primes
*
@@
-30,6
+30,12
@@
/*----- Revision history --------------------------------------------------*
*
* $Log: primorial.c,v $
/*----- Revision history --------------------------------------------------*
*
* $Log: primorial.c,v $
+ * Revision 1.4 2000/08/15 21:41:09 mdw
+ * Bug fix: minimize the right thing.
+ *
+ * Revision 1.3 2000/07/15 10:02:07 mdw
+ * Include missing header file.
+ *
* Revision 1.2 2000/07/09 21:31:43 mdw
* Use `mpmul'.
*
* Revision 1.2 2000/07/09 21:31:43 mdw
* Use `mpmul'.
*
@@
-41,6
+47,7
@@
/*----- Header files ------------------------------------------------------*/
#include "mp.h"
/*----- Header files ------------------------------------------------------*/
#include "mp.h"
+#include "mpint.h"
#include "mpmul.h"
#include "primetab.h"
#include "mpmul.h"
#include "primetab.h"
@@
-75,7
+82,8
@@
void primorial_setup(void)
}
mp_drop(p);
primorial = mpmul_done(&mm);
}
mp_drop(p);
primorial = mpmul_done(&mm);
- mp_minimize(p);
+ mp_minimize(primorial);
+ primorial->a->n--; /* Permanent allocation */
}
/*----- That's all, folks -------------------------------------------------*/
}
/*----- That's all, folks -------------------------------------------------*/