\[\frac{b \cdot c - a \cdot d}{{c}^2 + {d}^2}\]
Test:
Complex division, imag part
Bits:
128 bits
Bits error versus a
Bits error versus b
Bits error versus c
Bits error versus d
Time: 9.9 s
Input Error: 26.2
Output Error: 16.2
Log:
Profile: 🕒
\(\begin{cases} \frac{b}{c} - \frac{a \cdot d}{c \cdot c} & \text{when } c \le -2.2155360606085996 \cdot 10^{+134} \\ \frac{1}{\frac{{c}^2 + {d}^2}{b \cdot c - a \cdot d}} & \text{when } c \le 6.209412377058245 \cdot 10^{+96} \\ \frac{b}{c} - \frac{a \cdot d}{c \cdot c} & \text{otherwise} \end{cases}\)

    if c < -2.2155360606085996e+134 or 6.209412377058245e+96 < c

    1. Started with
      \[\frac{b \cdot c - a \cdot d}{{c}^2 + {d}^2}\]
      42.4
    2. Using strategy rm
      42.4
    3. Applied div-inv to get
      \[\color{red}{\frac{b \cdot c - a \cdot d}{{c}^2 + {d}^2}} \leadsto \color{blue}{\left(b \cdot c - a \cdot d\right) \cdot \frac{1}{{c}^2 + {d}^2}}\]
      42.4
    4. Using strategy rm
      42.4
    5. Applied add-cbrt-cube to get
      \[\left(b \cdot c - a \cdot d\right) \cdot \color{red}{\frac{1}{{c}^2 + {d}^2}} \leadsto \left(b \cdot c - a \cdot d\right) \cdot \color{blue}{\sqrt[3]{{\left(\frac{1}{{c}^2 + {d}^2}\right)}^3}}\]
      47.3
    6. Applied taylor to get
      \[\left(b \cdot c - a \cdot d\right) \cdot \sqrt[3]{{\left(\frac{1}{{c}^2 + {d}^2}\right)}^3} \leadsto \frac{b}{c} - \frac{d \cdot a}{{c}^2}\]
      11.9
    7. Taylor expanded around inf to get
      \[\color{red}{\frac{b}{c} - \frac{d \cdot a}{{c}^2}} \leadsto \color{blue}{\frac{b}{c} - \frac{d \cdot a}{{c}^2}}\]
      11.9
    8. Applied simplify to get
      \[\frac{b}{c} - \frac{d \cdot a}{{c}^2} \leadsto \frac{b}{c} - \frac{a \cdot d}{c \cdot c}\]
      11.9

    9. Applied final simplification

    if -2.2155360606085996e+134 < c < 6.209412377058245e+96

    1. Started with
      \[\frac{b \cdot c - a \cdot d}{{c}^2 + {d}^2}\]
      18.2
    2. Using strategy rm
      18.2
    3. Applied clear-num to get
      \[\color{red}{\frac{b \cdot c - a \cdot d}{{c}^2 + {d}^2}} \leadsto \color{blue}{\frac{1}{\frac{{c}^2 + {d}^2}{b \cdot c - a \cdot d}}}\]
      18.4

  1. Removed slow pow expressions

Original test:


(lambda ((a default) (b default) (c default) (d default))
  #:name "Complex division, imag part"
  (/ (- (* b c) (* a d)) (+ (sqr c) (sqr d)))
  #:target
  (if (< (fabs d) (fabs c)) (/ (- b (* a (/ d c))) (+ c (* d (/ d c)))) (/ (+ (- a) (* b (/ c d))) (+ d (* c (/ c d))))))