複數的四則運算
Author: 藍邦偉  老師

Z

Z

Z

+

-

*

複數的四則運算

Z

+

-

\times{}

\div{}

u = Vector((x(Corner[1.0]), 0.0), (x(Corner[3.0]), 0.0))
v = Vector((0.0, y(Corner[1.0])), (0.0, y(Corner[3.0])))
f(x) = 2.0 * sin(x) + cos(2.0 * x) + 2.0
a = 3 (slider from -5 to 5, step 1)
b = 2 (slider from -5 to 5, step 1)
c = 2 (slider from -5 to 5, step 1)
d = 3 (slider from -5 to 5, step 1)
Z_1: (a, b)
Z_2: (c, d)
Z_A: Z_1 + Z_2
Z_B: Z_1 - Z_2
Z_C: Z_1 * Z_2
e = false
g = false
h = false
文字1: "Z_1+Z_2=" + (a + c) + (If[b + d < 0.0, "-", "+"]) + (b + d) + "i"
文字4: "Z_2=" + c + (If[d < 0.0, "-", "+"]) + (abs(d)) + "i"
文字3: "Z_1=" + a + (If[b < 0.0, "-", "+"]) + (abs(b)) + "i"
文字5: "Z_1-Z_2=" + (a - c) + (If[b - d < 0.0, "-", "+"]) + (abs(b - d)) + "i"
文字6: "Z_1 \times{  } Z_2=" + (a * c - b * d) + (If[a * d + b * c < 0.0, "-", "+"]) + (abs(a * d + b * c)) + "i"
Z_D: Z_1 / Z_2
i = false
文字7: " \frac{ Z_1 }{Z_2 }=" + (If[a * c + b * d < 0.0, "-", ""]) + (FractionText[abs(a * c + b * d) / c^(2.0) + d^(2.0)]) + (If[b * c - a * d < 0.0, "-", "+"]) + (FractionText[abs(b * c - a * d / c^(2.0) + d^(2.0))]) + "i"
T_1 = Corner(1.0)
T_4 = Corner(4.0)
T_2: 0.75 * Corner[1.0] + 0.25 * Corner[2.0]
T_3: 0.75 * Corner[4.0] + 0.25 * Corner[3.0]
多邊形1, t_1, t_2, t_3, t_4 = Polygon(T_1, T_2, T_3, T_4)
j = Segment(T_2, T_3)