September Morn Update
This commit is contained in:
parent
4e2d22a71d
commit
aac6731f2c
6856 changed files with 141342 additions and 21127 deletions
12
Task/Nth-root/Factor/nth-root.factor
Normal file
12
Task/Nth-root/Factor/nth-root.factor
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
USING: kernel locals math math.functions prettyprint ;
|
||||
|
||||
:: th-root ( a n -- a^1/n )
|
||||
a [
|
||||
a over n 1 - ^ /f
|
||||
over n 1 - *
|
||||
+ n /f
|
||||
swap over 1e-5 ~ not
|
||||
] loop ;
|
||||
|
||||
34 5 th-root . ! 2.024397458499888
|
||||
34 5 recip ^ . ! 2.024397458499888
|
||||
Loading…
Add table
Add a link
Reference in a new issue