/* -*-c-*-
*
- * $Id: mpmul.c,v 1.2 2000/07/09 21:31:10 mdw Exp $
+ * $Id: mpmul.c,v 1.5 2004/04/08 01:36:15 mdw Exp $
*
* Multiply many small numbers together
*
* MA 02111-1307, USA.
*/
-/*----- Revision history --------------------------------------------------*
- *
- * $Log: mpmul.c,v $
- * Revision 1.2 2000/07/09 21:31:10 mdw
- * Fix bug, and add a test rig.
- *
- * Revision 1.1 2000/07/01 11:21:39 mdw
- * New interface for computing products of many (small) integers.
- *
- */
-
/*----- Header files ------------------------------------------------------*/
#include "mp.h"
x = mp_fromulong(x, j);
mpmul_add(&b, x);
}
- if (x)
- mp_drop(x);
+ mp_drop(x);
return (mpmul_done(&b));
}
mp *fx = *(mp **)v[1].buf;
mp *y = mp_factorial(x);
int ok = 1;
- if (MP_CMP(fx, !=, y)) {
+ if (!MP_EQ(fx, y)) {
fprintf(stderr, "factorial failed\n");
MP_FPRINTF(stderr, (stderr, "%lu! = ", x), fx);
MP_EPRINT("result", y);