Article 48530 of comp.sys.amiga.programmer:
Newsgroups: comp.sys.amiga.programmer
Path: news.csos.orst.edu!flop.ENGR.ORST.EDU!reuter.cse.ogi.edu!psgrain!nntp.cs.ubc.ca!newsxfer.itd.umich.edu!zip.eecs.umich.edu!yeshua.marcam.com!MathWorks.Com!europa.eng.gtefsd.com!howland.reston.ans.net!EU.net!Germany.EU.net!Munich.Germany.EU.net!ztivax!supernova!binz
From: binz@supernova.zfe.siemens.de (Michael Binz)
Subject: Re: Arexx question: how do you get square roots?
Message-ID: <CoIGwE.Kqv@ztivax.zfe.siemens.de>
Sender: news@ztivax.zfe.siemens.de (The System Manager)
Nntp-Posting-Host: supernova
Organization: Siemens AG
X-Newsreader: TIN [version 1.2 PL2]
References: <2orvn1$m52@panix.com>
Date: Tue, 19 Apr 1994 14:43:25 GMT
Lines: 30

Joel Arandia (arandia@panix.com) wrote:
: I've been flipping through my amiga manual.  I can't seem to find
: any arexx function that will get me the square root of a number
: or variable.  
: 	I must be missing some pages.  Could anyone out there
: tell me how to get square roots in Arexx?

Some time ago, I had the same problems. The solution to this
problem is the following Arexx Code. Just put it in your
rexx: directory.

Don`t use this in thight loops, since it's not very fast :))

== start ==
/* sqrt.rexx
 */

sqrt:
   arg num

   x0 = 0
   x1 = 0.5 * ( num + 1 )

   do until x0 == x1
      x0 = x1
      x1 = 0.5 * ( x0 + (num / x0) )
   end

return x1
== end ==


