Drexel dragonThe Math ForumDonate to the Math Forum



Search All of the Math Forum:

Views expressed in these public forums are not endorsed by Drexel University or The Math Forum.


Math Forum » Discussions » sci.math.* » sci.math

Topic: Integer test for perfect square
Replies: 20   Last Post: Mar 13, 2009 12:54 PM

Advanced Search

Back to Topic List Back to Topic List Jump to Tree View Jump to Tree View   Messages: [ Previous | Next ]
jimward2@gmail.com

Posts: 7
Registered: 3/12/09
Re: Integer test for perfect square
Posted: Mar 12, 2009 12:58 PM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

On Mar 12, 10:46 am, Jack Schmidt <Jack.Schmidt.SciM...@gmail.com>
wrote:
> > Is there an integer test for a perfect square? Say I
> > have a large positive integer (1000 digits), and I
> > want to know if it's a perfect square, and I don't
> > have floating point available. I ended up getting
> > around this by factoring the number, but I wonder if
> > there's a quicker way.

>
> See Henri Cohen's "A course in computational algebraic
> number theory." Springer-Verlag, 1993. ISBN 3-540-55640-0http://www.ams.org/mathscinet-getitem?mr=1228206
>
> You want algorithm 1.7.3.  Roughly speaking, you
> first check if the number is a square modulo some
> small numbers (11, 63, 64, 65 is suggested), then
> square the integer square root.
>
> This is much faster than factoring.


I guess Cohen outlines a way to find the integer square root without
using floating point? Some form of Newton's method?



Point your RSS reader here for a feed of the latest messages in this topic.

[Privacy Policy] [Terms of Use]

© Drexel University 1994-2014. All Rights Reserved.
The Math Forum is a research and educational enterprise of the Drexel University School of Education.