Page 1 of 1

Complex Math

PostPosted: Wed May 02, 2012 2:19 am
by rpmrichard
hi
a while ago i discovered a short program to do complex adition and subtraction on this site...
now i cannot find it again, amongst all the info here.

does anyone have an idea of the program im talking of?

many thanx in advance

Re: Complex Math

PostPosted: Wed May 02, 2012 7:26 am
by Garth
I didn't see it, but for the addition, if the two numbers are already on the stack (X=REPT(2nd #), Y=IMPT(2nd #), Z=REPT(1st #), and T=IMPT(1st #)), how about:
X<>Y, RDN, +, RDN, +, RUP. (From there, you can modify it for the subtraction.)
For the result, X contains the real part and Y the imaginary part. This is the order the Advantage module uses. It has a lot of complex functions. If you really want super performance in complex arithmetic, get Ángel Martin's 41Z module ROM image loaded into one of the modern (being made today) "supermodules" like the Diego Diaz's NoV64. You'll get a true four-level complex stack and more functions than you could dream of. The 41CL board transplant in coconut 41's will further multiply the speed by 50.