Re: Naive Square root algorithm for GNFS ?
From: Tom St Denis (tomstdenis_at_gmail.com)
Date: 03/30/05
- Next message: D. J. Bernstein: "Re: Naive Square root algorithm for GNFS ?"
- Previous message: Jean-Luc Cooke: "Re: Naive Square root algorithm for GNFS ?"
- In reply to: Jean-Luc Cooke: "Re: Naive Square root algorithm for GNFS ?"
- Next in thread: Michael Amling: "Re: Naive Square root algorithm for GNFS ?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Date: 29 Mar 2005 14:07:24 -0800
Jean-Luc Cooke wrote:
> Tom St Denis <tomstdenis@gmail.com> wrote:
>
> > 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.
>
> "No" and "doh!" ... that is assuming this is what he wants.
>
> Exmaple:
> 4 = (3*3) % 5
> 1 = (4*4) % 5
No, you go to m/2 and once you find the root "y" then "-y" will be the
other root.
Tom
- Next message: D. J. Bernstein: "Re: Naive Square root algorithm for GNFS ?"
- Previous message: Jean-Luc Cooke: "Re: Naive Square root algorithm for GNFS ?"
- In reply to: Jean-Luc Cooke: "Re: Naive Square root algorithm for GNFS ?"
- Next in thread: Michael Amling: "Re: Naive Square root algorithm for GNFS ?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Relevant Pages
|
|