[Ecm-commits] r2375 - trunk

cvs commits ecm-commits at lists.gforge.inria.fr
Tue Feb 5 19:13:39 CET 2013


Author: morain
Date: 2013-02-05 19:13:38 +0100 (Tue, 05 Feb 2013)
New Revision: 2375

Log:
should be better this way, anyhow.


Modified:
   trunk/cmecm.c
Modified: trunk/cmecm.c
===================================================================
--- trunk/cmecm.c	2013-02-05 18:09:57 UTC (rev 2374)
+++ trunk/cmecm.c	2013-02-05 18:13:38 UTC (rev 2375)
@@ -748,14 +748,16 @@
 	    mpz_clear(tmp2);
 	}
 #endif
+	for(j = 0; j < dF; j += 3)
+	    mpz_set(G[j], F[j]);
 	for(j = 1; j < dF; j += 3){
-	    mpz_mul(G[j], G[j], tmp);
+	    mpz_mul(G[j], F[j], tmp);
 	    mpz_mod(G[j], G[j], modulus->orig_modulus);
 	}
 	/* tmp <- omega^2 */
 	mpz_mul(tmp, tmp, modulus->orig_modulus);
 	for(j = 2; j < dF; j += 3){
-	    mpz_mul(G[j], G[j], tmp);
+	    mpz_mul(G[j], F[j], tmp);
 	    mpz_mod(G[j], G[j], modulus->orig_modulus);
 	}
 	mpz_clear(tmp);




More information about the Ecm-commits mailing list