home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Dos/V Magazine 2002 July 1
/
VMAG130101.iso
/
ONLINE
/
monthly
/
calc
/
CLPCA511.LZH
/
ClipCalc
/
EXTFUNC
/
hypot2.cef
< prev
next >
Encoding:
Amiga
Atari
Commodore
DOS
FM Towns/JPY
Macintosh
Macintosh JP
Macintosh to JP
NeXTSTEP
RISC OS/Acorn
Shift JIS
UTF-8
Windows-1252 (detected)
Wrap
Text File
|
2002-08-18
|
316 b
|
13 lines
#!/usr/local/bin/clip
#Æ╝èpÄOèpî`é╠Ä╬ò╙é╠Æ╖é│(Moler\-Morrison û@) hypotenuse
#\!- <val> <val>
:float \16
@x = abs @0; @y = abs @1
if @x < @y; @t = @x; @x = @y; @y = @t; endif
if @y == 0; return @x; endif
for @i = 0; @i < 3; @i++
@t = @y / @x; @t *= @t; @t /= 4 + @t
@x += 2 * @x * @t; @y *= @t
next
@x