Integer roots: Difference between revisions
m
→{{header|Arturo}}
Drkameleon (talk | contribs) No edit summary |
Drkameleon (talk | contribs) |
||
Line 23:
{{trans|D}}
<lang arturo>iRoot:
n1: n-1
n2: n
n3: n1
c: 1
d: (n3+b)/n2
e: (n3*d + b/d^n1)/n2
loop
c: d
d: e
e: (n3*e + b/e^n1)/n2
}
return e
}
print "3rd root of 8 = " +
print "3rd root of 9 = " +
print "First 2001 digits of the square root of 2 = " +
{{out}}
|