Hello Joe, if you want to get the n root of a number b, you have to
solve the equation x^n-b=0, to solve this you have to use the command
PROOT which needs as argument a vector with the coefficients, in this
case [1 0...0 -b] and you get back a vector with all the roots, How
many zeros do you need in your vector? n-1 zeros. If you enter first b
and then n, your program can be something like this:
<<
-> n
<< 1 SWAP NEG
2 n
START
0 SWAP
NEXT
n 1 + ->ARRY PROOT
Everybody in the group have a nice year.
solve the equation x^n-b=0, to solve this you have to use the command
PROOT which needs as argument a vector with the coefficients, in this
case [1 0...0 -b] and you get back a vector with all the roots, How
many zeros do you need in your vector? n-1 zeros. If you enter first b
and then n, your program can be something like this:
<<
-> n
<< 1 SWAP NEG
2 n
START
0 SWAP
NEXT
n 1 + ->ARRY PROOT
>>b can be real or complex and n an integer grater than 1.
>>
Everybody in the group have a nice year.
