/* -*-c-*-
*
- * $Id: gfx-kmul.c,v 1.1 2000/10/08 15:49:37 mdw Exp $
+ * $Id: gfx-kmul.c,v 1.2 2002/10/09 00:36:03 mdw Exp $
*
* Karatsuba's multiplication algorithm on binary polynomials
*
/*----- Revision history --------------------------------------------------*
*
* $Log: gfx-kmul.c,v $
+ * Revision 1.2 2002/10/09 00:36:03 mdw
+ * Fix bounds on workspace for Karatsuba operations.
+ *
* Revision 1.1 2000/10/08 15:49:37 mdw
* First glimmerings of binary polynomial arithmetic.
*
avm = avl;
}
- assert(((void)"Destination too small for Karatsuba gf-multiply",
- dvl - dv >= 4 * m));
- assert(((void)"Not enough workspace for Karatsuba gf-multiply",
- svl - sv >= 4 * m));
-
/* --- Sort out the middle term --- */
{
mpw *bsv = sv + m, *ssv = bsv + m;
mpw *rdv = dv + m, *rdvl = rdv + 2 * m;
+ assert(rdvl < dvl);
+ assert(ssv < svl);
UXOR2(sv, bsv, av, avm, avm, avl);
UXOR2(bsv, ssv, bv, bvm, bvm, bvl);
if (m > GFK_THRESH)