History of Simple Complex Math Script
 modified by Russ Webb on 2004-04-22 21:11:33Author - Shin Katsumata Email: skat@flask.com Webpage: Summary: Set of Complex Math Functions Instructions: This code implments a set of four basic math functions for complex number and conversion of coordinate system between cartesian(R) and polar(P). A complex number is represented using two registers. X (top register) contains the real value and Y is imaginary value. In polar notation, X is magnitude and Y is phase. "CLRx" clears two registers at a time. Code: ----RPN.1 "Complex" ~ "+" k4r4r2k3+k3+r2; "-" k4r4r2k3-k3-r2; "x" k4r4g1g5*g4g4*+r2r4*r3r4*-; "÷" k4r4g1g1*g3g1*+g2g6*g4g6*-g2/r3r5*r4r5*+r3/; ~ ">R" r2g1ig3*r2or3*; ">P"g10<(1A4*:0)g2g4/A+k32Pr22P+s; "CLRx" d1d1; modified by Shin Katsumata on 2004-09-21 20:53:04Author - Shin Katsumata Email: skat@flask.com Webpage: Summary: Set of Complex Math Functions Instructions: This code implments a set of four basic math functions for complex number and conversion of coordinate system between cartesian(R) and polar(P). A complex number is represented using two registers. X (top register) contains the real value and Y is imaginary value. In polar notation, X is magnitude and Y is phase. "CLRx" clears two registers at a time. I wrote this script long ago to meet my need. Now there are better scripts available. I use " Complex Arithmetic Script" written by Dr. Ray Franco Code: ```RPN.1 "Complex" ~ "+" k4r4r2k3+k3+r2; "-" k4r4r2k3-k3-r2; "x" k4r4g1g5*g4g4*+r2r4*r3r4*-; "÷" k4r4g1g1*g3g1*+g2g6*g4g6*-g2/r3r5*r4r5*+r3/; ~ ">R" r2g1ig3*r2or3*; ">P"g10<(1A4*:0)g2g4/A+k32Pr22P+s; "CLRx" d1d1; ```