Data commit

This commit is contained in:
Ingy döt Net 2023-07-01 11:58:00 -04:00
parent 7387c8f97b
commit cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions

View file

@ -0,0 +1,24 @@
function nth_root(n, a)
precision = 0.0001
dim x(2)
x[0] = a
x[1] = a /n
while abs(x[1] - x[0]) > precision
x[0] = x[1]
x[1] = ((n -1.0) * x[1] +a / x[1]^(n -1.0)) / n
end while
return x[1]
end function
print " n 5643 ^ 1 / n nth_root ^ n"
print " --------------------------------------"
for n = 3 to 11 step 2
tmp = nth_root(n, 5643)
print " "; n; " "; tmp; chr(9); (tmp ^ n)
next n
print
for n = 25 to 125 step 25
tmp = nth_root(n, 5643)
print n; " "; tmp; chr(9); (tmp ^ n)
next n