Re: Naive Square root algorithm for GNFS ?

From: Tom St Denis (tomstdenis_at_gmail.com)
Date: 03/29/05


Date: 29 Mar 2005 11:19:47 -0800


Jean-Luc Cooke wrote:
> Not specific to NFS:
>
> int sqrtmod(int x, int m) {
> int r;
>
> // just in case...
> x %= m;
>
> for (r=1; r<m; m++) {

Technically this is upto (m-1)/2 and it's "r++" not m.

;-)

Tom



Relevant Pages