Post Reply 
Best Pol/Rect and Complex Number Decomp for 35S
01-26-2019, 08:49 PM (This post was last modified: 01-26-2019 09:16 PM by Dieter.)
Post: #10
RE: Best Pol/Rect and Complex Number Decomp for 35S
(01-26-2019 12:43 AM)Matt Agajanian Wrote:  I would like to know what program(s) are best for Complex Number and Polar/Rectangular and related forms decomposition for the 35S.

Here is my attempt at a complex decomposition routine:

Code:
C001  LBL C
C002  FS? 10
C003  GTO C014
C004  ABS
C005  x≠0?
C006  GTO C009
C007  ENTER
C008  RTN
C009: eqn SGN(SIN(ARG(LASTx)))*ABS(LASTx-SQ(REGX)/LASTx)/2
C010  X<>Y
C011  R↓
C012  eqn SGN(COS(ARG(LASTx)))*ABS(LASTx+SQ(REGT)/LASTx)/2
C013  RTN
C014: CF 10
C015  XEQ C004
C016  SF 10
C017  RTN

Stack diagram:
Code:
T:  t        z
Z:  z        y
Y:  y   =>   im
X:  re+i·im  re

L:  ?        re+i·im

The code has not seen much testing, so please try it, see what you get and report any errors and problems here.
Edit: added a few steps to make the routine also work for 0+0i.

Dieter
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
RE: Best Pol/Rect and Complex Number Decomp for 35S - Dieter - 01-26-2019 08:49 PM



User(s) browsing this thread: 1 Guest(s)