(35S) Complex conjugate, real and imaginary parts - Printable Version +- HP Forums (https://www.hpmuseum.org/forum) +-- Forum: HP Software Libraries (/forum-10.html) +--- Forum: General Software Library (/forum-13.html) +--- Thread: (35S) Complex conjugate, real and imaginary parts (/thread-8302.html) |
(35S) Complex conjugate, real and imaginary parts - stephane - 05-05-2017 08:26 PM Some basic complex functions are missing on the HP35s. Among them, the conjugate, and the extraction of the real and imaginary parts. I use the following formulas to fix the issue: z.z* = |z|² z+z* = 2.Re(z) z-z* = 2.i.Im(z) r.exp(i.theta) = r.cos(theta) + i.r.sin(theta) Usage: Before running one of the following programs, a complex value must be in the stack (REGX):
- Re(x) and Im(x): XEQ G ____(the key with the complex i) Y: Re(x) X: Im(x) The programs preserve the variables of the calculator. The stack is preserved too. LASTx is set with the right previous value before running the programs. (I use the following tip: ABS followed by CLx) Code for Conjugate(x) Code:
Code for Re(x) and Im(x) Code:
|