Just another update
This commit is contained in:
parent
a25938f123
commit
00a190b0a6
6591 changed files with 94363 additions and 23227 deletions
11
Task/Nth-root/NewLISP/nth-root.newlisp
Normal file
11
Task/Nth-root/NewLISP/nth-root.newlisp
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
(define (nth-root n a)
|
||||
(let ((x1 a)
|
||||
(x2 (div a n)))
|
||||
(until (= x1 x2)
|
||||
(setq x1 x2
|
||||
x2 (div
|
||||
(add
|
||||
(mul x1 (- n 1))
|
||||
(div a (pow x1 (- n 1))))
|
||||
n)))
|
||||
x2))
|
||||
Loading…
Add table
Add a link
Reference in a new issue