X-Git-Url: https://git.distorted.org.uk/u/mdw/catacomb/blobdiff_plain/774d32a5b60c5e7d38fba874a42e2273c49889fc..283b9af095a5b24ae71b49a6d2dcbdcdaae47c40:/mp-jacobi.c diff --git a/mp-jacobi.c b/mp-jacobi.c index aba168e..0e187cf 100644 --- a/mp-jacobi.c +++ b/mp-jacobi.c @@ -1,6 +1,6 @@ /* -*-c-*- * - * $Id: mp-jacobi.c,v 1.3 2000/07/20 17:14:34 mdw Exp $ + * $Id: mp-jacobi.c,v 1.4 2000/12/06 20:31:33 mdw Exp $ * * Compute Jacobi symbol * @@ -30,6 +30,9 @@ /*----- Revision history --------------------------------------------------* * * $Log: mp-jacobi.c,v $ + * Revision 1.4 2000/12/06 20:31:33 mdw + * Add assertion to prevent crapness. + * * Revision 1.3 2000/07/20 17:14:34 mdw * Simplify by using @mp_odd@. * @@ -64,6 +67,8 @@ int mp_jacobi(mp *a, mp *n) { int s = 1; + assert(((void)"n must be odd in mp_jacobi", MP_LEN(n) && (n->v[0] & 1))); + /* --- Take copies of the arguments --- */ a = MP_COPY(a);