Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
11
Task/Nth-root/NewLISP/nth-root.l
Normal file
11
Task/Nth-root/NewLISP/nth-root.l
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