50g group photo

Yahoo Groups archive

50g

Archive for 50g.

Index last updated: 2026-03-30 00:59 UTC

Message

RE: [50g] Complex Roots

2009-01-01 by Jeremy Hawdon

Here is a little program for finding the  approximate nth roots of a Gaussian integer:

 

%%HP: T(3)A(R)F(.);

\<< OVER ABS OVER XROOT UNROT SWAP ARG 0 PICK3 1 -

  FOR j 2 \pi * j * OVER + i * PICK3 / EXP 4. PICK * 4. ROLLD

  NEXT DROP NIP \->LIST

  \<< \->NUM

  \>> MAP

\>>

 

It takes z and n from the stack and returns a list of values for z^ (1/n)

 

Jeremy

 

From: 50g@yahoogroups.com [mailto: 50g@yahoogroups.com ] On Behalf Of joecolannino
Sent: 31 December 2008 21:16
To: 50g@yahoogroups.com
Subject: [50g] Complex Roots

 

Does anyone have a program written for the HP 50G that will give all
complex roots of a number? For example,the cube roots of -1 are
{[1+sqrt(3)] /2, -1, and [1-sqrt(3)]/ 2 } but the HP 50G will give only
the first. Trying to evaluate the cube root of 2+11i it chokes
altogether though the answers are clearly {2+i, -1.866+1.232i
(approx), -0.1340-2.232i (approx)}.

Joe

Attachments