\[\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: 13.1 s
Input Error: 25.5
Output Error: 9.4
Log:
Profile: 🕒
\(\begin{cases} \frac{b}{(\left(\frac{d}{c}\right) * d + c)_*} - \frac{d \cdot a}{(c * c + \left(d \cdot d\right))_*} & \text{when } c \le -6.783646013079365 \cdot 10^{+175} \\ \frac{b \cdot c}{(d * d + \left({c}^2\right))_*} - \frac{a}{(\left(\frac{c}{d}\right) * c + d)_*} & \text{when } c \le 3.1080072161722114 \cdot 10^{+139} \\ \frac{b}{(\left(\frac{d}{c}\right) * d + c)_*} - \frac{d \cdot a}{(c * c + \left(d \cdot d\right))_*} & \text{otherwise} \end{cases}\)

    if c < -6.783646013079365e+175 or 3.1080072161722114e+139 < c

    1. Started with
      \[\frac{b \cdot c - a \cdot d}{{c}^2 + {d}^2}\]
      43.4
    2. Using strategy rm
      43.4
    3. Applied div-sub to get
      \[\color{red}{\frac{b \cdot c - a \cdot d}{{c}^2 + {d}^2}} \leadsto \color{blue}{\frac{b \cdot c}{{c}^2 + {d}^2} - \frac{a \cdot d}{{c}^2 + {d}^2}}\]
      43.4
    4. Using strategy rm
      43.4
    5. Applied associate-/l* to get
      \[\color{red}{\frac{b \cdot c}{{c}^2 + {d}^2}} - \frac{a \cdot d}{{c}^2 + {d}^2} \leadsto \color{blue}{\frac{b}{\frac{{c}^2 + {d}^2}{c}}} - \frac{a \cdot d}{{c}^2 + {d}^2}\]
      42.6
    6. Applied taylor to get
      \[\frac{b}{\frac{{c}^2 + {d}^2}{c}} - \frac{a \cdot d}{{c}^2 + {d}^2} \leadsto \frac{b}{c + \frac{{d}^2}{c}} - \frac{a \cdot d}{{c}^2 + {d}^2}\]
      17.7
    7. Taylor expanded around 0 to get
      \[\frac{b}{\color{red}{c + \frac{{d}^2}{c}}} - \frac{a \cdot d}{{c}^2 + {d}^2} \leadsto \frac{b}{\color{blue}{c + \frac{{d}^2}{c}}} - \frac{a \cdot d}{{c}^2 + {d}^2}\]
      17.7
    8. Applied simplify to get
      \[\frac{b}{c + \frac{{d}^2}{c}} - \frac{a \cdot d}{{c}^2 + {d}^2} \leadsto \frac{b}{\frac{d}{\frac{c}{d}} + c} - \frac{a \cdot d}{(c * c + \left(d \cdot d\right))_*}\]
      13.3

    9. Applied final simplification
    10. Applied simplify to get
      \[\color{red}{\frac{b}{\frac{d}{\frac{c}{d}} + c} - \frac{a \cdot d}{(c * c + \left(d \cdot d\right))_*}} \leadsto \color{blue}{\frac{b}{(\left(\frac{d}{c}\right) * d + c)_*} - \frac{d \cdot a}{(c * c + \left(d \cdot d\right))_*}}\]
      13.4

    if -6.783646013079365e+175 < c < 3.1080072161722114e+139

    1. Started with
      \[\frac{b \cdot c - a \cdot d}{{c}^2 + {d}^2}\]
      19.5
    2. Using strategy rm
      19.5
    3. Applied div-sub to get
      \[\color{red}{\frac{b \cdot c - a \cdot d}{{c}^2 + {d}^2}} \leadsto \color{blue}{\frac{b \cdot c}{{c}^2 + {d}^2} - \frac{a \cdot d}{{c}^2 + {d}^2}}\]
      19.5
    4. Using strategy rm
      19.5
    5. Applied associate-/l* to get
      \[\frac{b \cdot c}{{c}^2 + {d}^2} - \color{red}{\frac{a \cdot d}{{c}^2 + {d}^2}} \leadsto \frac{b \cdot c}{{c}^2 + {d}^2} - \color{blue}{\frac{a}{\frac{{c}^2 + {d}^2}{d}}}\]
      18.0
    6. Using strategy rm
      18.0
    7. Applied add-sqr-sqrt to get
      \[\frac{b \cdot c}{{c}^2 + {d}^2} - \frac{a}{\color{red}{\frac{{c}^2 + {d}^2}{d}}} \leadsto \frac{b \cdot c}{{c}^2 + {d}^2} - \frac{a}{\color{blue}{{\left(\sqrt{\frac{{c}^2 + {d}^2}{d}}\right)}^2}}\]
      39.9
    8. Applied taylor to get
      \[\frac{b \cdot c}{{c}^2 + {d}^2} - \frac{a}{{\left(\sqrt{\frac{{c}^2 + {d}^2}{d}}\right)}^2} \leadsto \frac{b \cdot c}{{c}^2 + {d}^2} - \frac{a}{{\left(\sqrt{d + \frac{{c}^2}{d}}\right)}^2}\]
      35.0
    9. Taylor expanded around 0 to get
      \[\frac{b \cdot c}{{c}^2 + {d}^2} - \frac{a}{{\left(\sqrt{\color{red}{d + \frac{{c}^2}{d}}}\right)}^2} \leadsto \frac{b \cdot c}{{c}^2 + {d}^2} - \frac{a}{{\left(\sqrt{\color{blue}{d + \frac{{c}^2}{d}}}\right)}^2}\]
      35.0
    10. Applied simplify to get
      \[\frac{b \cdot c}{{c}^2 + {d}^2} - \frac{a}{{\left(\sqrt{d + \frac{{c}^2}{d}}\right)}^2} \leadsto \frac{c \cdot b}{(d * d + \left(c \cdot c\right))_*} - \frac{a}{d + \frac{c}{d} \cdot c}\]
      8.1

    11. Applied final simplification
    12. Applied simplify to get
      \[\color{red}{\frac{c \cdot b}{(d * d + \left(c \cdot c\right))_*} - \frac{a}{d + \frac{c}{d} \cdot c}} \leadsto \color{blue}{\frac{b \cdot c}{(d * d + \left({c}^2\right))_*} - \frac{a}{(\left(\frac{c}{d}\right) * c + d)_*}}\]
      8.1

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