Data update
This commit is contained in:
parent
5af6d93694
commit
796d366b97
455 changed files with 7413 additions and 1900 deletions
|
|
@ -1,19 +1,20 @@
|
|||
proc power x n . r .
|
||||
func power x n .
|
||||
r = 1
|
||||
for i = 1 to n
|
||||
r *= x
|
||||
.
|
||||
return r
|
||||
.
|
||||
proc nth_root x n . r .
|
||||
func nth_root x n .
|
||||
r = 2
|
||||
repeat
|
||||
call power r n - 1 p
|
||||
p = power r (n - 1)
|
||||
d = (x / p - r) / n
|
||||
r += d
|
||||
until abs d < 0.0001
|
||||
.
|
||||
return r
|
||||
.
|
||||
call power 3.1416 10 x
|
||||
call nth_root x 10 r
|
||||
numfmt 4 0
|
||||
print r
|
||||
x = power 3.1416 10
|
||||
print nth_root x 10
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue