tasks a-s
This commit is contained in:
parent
47bf37c096
commit
b83f433714
12433 changed files with 156208 additions and 123 deletions
11
Task/Nth-root/Logo/nth-root.logo
Normal file
11
Task/Nth-root/Logo/nth-root.logo
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
to about :a :b
|
||||
output and [:a - :b < 1e-5] [:a - :b > -1e-5]
|
||||
end
|
||||
|
||||
to root :n :a [:guess :a]
|
||||
localmake "next ((:n-1) * :guess + :a / power :guess (:n-1)) / n
|
||||
if about :guess :next [output :next]
|
||||
output (root :n :a :next)
|
||||
end
|
||||
|
||||
show root 5 34 ; 2.02439745849989
|
||||
Loading…
Add table
Add a link
Reference in a new issue