50g group photo

Yahoo Groups archive

50g

Index last updated: 2026-04-28 22:38 UTC

Message

Re: Complex Roots

2009-01-01 by Juan C.

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
    >>
>>

b can be real or complex and n an integer grater than 1.

Everybody in the group have a nice year.

Attachments

Move to quarantaine

This moves the raw source file on disk only. The archive index is not changed automatically, so you still need to run a manual refresh afterward.