9-6 HP IBASIC Supplement
Using Subprograms
Built-In High-Speed Subprograms
Table 9-4 MATH Subprograms, Complex Numbers (2 of 2)
Filename Subprogram Name (parameter list)
MATH
Define
Complex
Number
Operation
Cmul(REAL Op1(*),INTEGER Row1,REAL Op2(*),
INTEGER Row2,REAL Ans(*),INTEGER Rowans)
complex Ans = complex Op1 × complex Op2
MATH
Define
Complex
Number
Operation
Cdiv(REAL Op1(*),INTEGER Row1,REAL Op2(*),
INTEGER Row2,REAL Ans(*),INTEGER Rowans)
complex Ans = complex Op1 ⁄ complex Op2
Ans
real
Rowans()Op1
real
row1()Op2
real
row2()• Op1
imag
row1()Op2
imag
row2()•–=
Ans
imag
Rowans()Op1
real
row1()Op2
imag
row2()• Op2
real
row2()Op1
imag
• row1()+=
den Op2
real
row2()Op2
real
row2()• Op2
imag
row2()Op2
imag
• row2()+=
num1 Op1
real
row1()Op2
real
row2()• Op1
imag
row1()Op2
imag
• row2()+=
num2 Op1
imag
row1()Op2
real
row2()• Op1
real
row1()Op2
imag
• row2()–=
Ans
real
Rowans()
num1
den
--------------=
Ans
imag
Rowans()
num2
den
--------------=