home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Dos/V Magazine 2002 July 1
/
VMAG130101.iso
/
ONLINE
/
monthly
/
calc
/
CLPCA511.LZH
/
ClipCalc
/
EXTFUNC
/
cbrt2.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-1254 (detected)
Wrap
Text File
|
2002-08-18
|
256 b
|
12 lines
#!/usr/local/bin/clip
#ùºò√ì¬(Newton û@) cube root
#\!- <val>
:ptype
if @0 == 0; return 0; endif
if @0 > 0; @p = 1; else; @p = 0; @0 = [-]@0; endif
@s = @0 > 1 ? @0 1
do
@S = @s; @s = (@0 / (@s * @s) + 2 * @s) / 3
until @s < @S
@p ? @S ([-]@S)