Initial data commit
This commit is contained in:
parent
72d218235f
commit
f23f22d71c
199087 changed files with 3378941 additions and 0 deletions
19
Task/Nth-root/EasyLang/nth-root.easy
Normal file
19
Task/Nth-root/EasyLang/nth-root.easy
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
proc power x n . r .
|
||||
r = 1
|
||||
for i = 1 to n
|
||||
r *= x
|
||||
.
|
||||
.
|
||||
proc nth_root x n . r .
|
||||
r = 2
|
||||
repeat
|
||||
call power r n - 1 p
|
||||
d = (x / p - r) / n
|
||||
r += d
|
||||
until abs d < 0.0001
|
||||
.
|
||||
.
|
||||
call power 3.1416 10 x
|
||||
call nth_root x 10 r
|
||||
numfmt 4 0
|
||||
print r
|
||||
Loading…
Add table
Add a link
Reference in a new issue