01-26-2019, 12:43 AM
I would like to know what program(s) are best for Complex Number and Polar/Rectangular and related forms decomposition for the 35S.
Thank you.
Thank you.
(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.
Thank you.
(01-26-2019 02:21 AM)rprosperi Wrote: [ -> ](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.
Thank you.
Nice ->R and ->P programs from Pauli here:
http://www.hpmuseum.org/cgi-sys/cgiwrap/...i?read=983
(01-26-2019 03:37 AM)Matt Agajanian Wrote: [ -> ](01-26-2019 02:21 AM)rprosperi Wrote: [ -> ]Nice ->R and ->P programs from Pauli here:
http://www.hpmuseum.org/cgi-sys/cgiwrap/...i?read=983
Please refresh my memory and clarify what should be on the stack before I run each routine.
Thanks
Thanks
(01-26-2019 10:40 AM)ijabbott Wrote: [ -> ]Looking at the code, program P expects Y=y, X=x, and returns Y=θ, X=r. Vice versa for program R.
(01-26-2019 01:04 PM)rprosperi Wrote: [ -> ]...if you look closely you'll see these routines preserve the stack (incl LastX) and flags...
P001 LBL P
P002 FS? 10
P003 GTO P011
P004: ABS
P005 X<>Y
P006 R↓
P007 R↓
P008 eqn ARG(LASTx+i*REGZ)
P009 eqn ABS(LASTx+i*REGT)
P010 RTN
P011: CF 10
P012 XEQ P004
P013 SF 10
P014 RTN
R001 LBL R
R002 FS? 10
R003 GTO R011
R004: ABS
R005 X<>Y
R006 R↓
R007 R↓
R008 eqn LASTx*SIN(REGZ)
R009 eqn LASTx*COS(REGT)
R010 RTN
R011: CF 10
R012 XEQ R004
R013 SF 10
R014 RTN
T: t t
Z: z z
Y: y => θ
X: x r
L: ? x
T: t t
Z: z z
Y: θ => y
X: r x
L: ? r
(01-26-2019 07:02 PM)Gene Wrote: [ -> ]Excellent, Dieter, as always!
(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.
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
T: t z
Z: z y
Y: y => im
X: re+i·im re
L: ? re+i·im
(01-26-2019 04:23 PM)Dieter Wrote: [ -> ](01-26-2019 01:04 PM)rprosperi Wrote: [ -> ]...if you look closely you'll see these routines preserve the stack (incl LastX) and flags...
Yes for the stack and flags, but No regarding LastX. Which is not preserved – on exit it contains a complex number or a vector, respectively.
1 LBL A
2 STO I
3 R↓
4 ABS(I)*COS(ARG(I))+0*(ABS(I)*SIN(ARG(I))►I)
5 RTN
(01-27-2019 08:26 AM)Gerald H Wrote: [ -> ]Code:
4 ABS(I)*COS(ARG(I))+0*(ABS(I)*SIN(ARG(I))►I)
C001 LBL C
C002 FS? 10
C003 GTO C010
C004: ARG
C005 eqn ABS(LASTX)*SIN(REGX)
C006 X<>Y
C007 R↓
C008 eqn ABS(LASTX)*COS(REGT)
C009 RTN
C010: CF 10
C011 XEQ C004
C012 SF 10
C013 RTN