SQRT(a);



--- William Springer <wmspringer@comcast.net> wrote:

> The first problem is that when I take SQRT(a), where a is a large 
> integer (in this case, 2220223), I just get back SQRT(2220223).  Does
> this mean a doesn't have a square root?

Probably this is the default behavior when there is no exact square
root.  You can use float to get the numerical answer.  Here's an
example of how it works on my machine (using cvs):

Maxima 5.9.0.1cvs http://maxima.sourceforge.net
Using Lisp CMU Common Lisp 18e
Distributed under the GNU Public License. See the file COPYING.
Dedicated to the memory of William Schelter.
This is a development version of Maxima. The function bug_report()
provides bug reporting information.
(C1) sqrt(2220223);

(D1)                             SQRT(2220223)
(C2) float(%);

(D2)                           1490.04127459611
(C3) sqrt(4);

(D3)                                   2
(C4) sqrt(5);

(D4)                                SQRT(5)
(C5) 67868^2;

(D5)                              4606065424
(C6) sqrt(4606065424);

(D6)                                 67868


> The second problem is that what I actually need to do is find the
> square 
> root of a mod n, where n is 20490901.  Any tips on how to do that
> would 
> be appreciated..

Dunno about this one.

CY

__________________________________
Do you Yahoo!?
Free Pop-Up Blocker - Get it now
http://companion.yahoo.com/