\[\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: 14.8 s
Input Error: 26.5
Output Error: 16.1
Log:
Profile: 🕒
\(\begin{cases} \frac{b}{c} - \frac{a \cdot d}{c \cdot c} & \text{when } c \le -1.100832501002167 \cdot 10^{+58} \\ \frac{1}{\frac{{c}^2 + {d}^2}{b \cdot c - a \cdot d}} & \text{when } c \le 3.0833390640169144 \cdot 10^{+134} \\ \frac{b}{c} - \frac{a \cdot d}{c \cdot c} & \text{otherwise} \end{cases}\)

    if c < -1.100832501002167e+58 or 3.0833390640169144e+134 < c

    1. Started with
      \[\frac{b \cdot c - a \cdot d}{{c}^2 + {d}^2}\]
      41.0
    2. Using strategy rm
      41.0
    3. Applied add-cube-cbrt to get
      \[\frac{b \cdot c - a \cdot d}{\color{red}{{c}^2 + {d}^2}} \leadsto \frac{b \cdot c - a \cdot d}{\color{blue}{{\left(\sqrt[3]{{c}^2 + {d}^2}\right)}^3}}\]
      41.1
    4. Applied taylor to get
      \[\frac{b \cdot c - a \cdot d}{{\left(\sqrt[3]{{c}^2 + {d}^2}\right)}^3} \leadsto \frac{b}{c} - \frac{d \cdot a}{{c}^2}\]
      11.6
    5. 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.6
    6. 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.6

    7. Applied final simplification

    if -1.100832501002167e+58 < c < 3.0833390640169144e+134

    1. Started with
      \[\frac{b \cdot c - a \cdot d}{{c}^2 + {d}^2}\]
      18.4
    2. Using strategy rm
      18.4
    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.6

  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))))))