\[\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: 7.7 s
Input Error: 25.7
Output Error: 15.7
Log:
Profile: 🕒
\(\frac{b \cdot c}{(d * d + \left({c}^2\right))_*} - \frac{a}{(\left(\frac{c}{d}\right) * c + d)_*}\)
  1. Started with
    \[\frac{b \cdot c - a \cdot d}{{c}^2 + {d}^2}\]
    25.7
  2. Using strategy rm
    25.7
  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}}\]
    25.8
  4. Using strategy rm
    25.8
  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}}}\]
    24.6
  6. Applied taylor to get
    \[\frac{b \cdot c}{{c}^2 + {d}^2} - \frac{a}{\frac{{c}^2 + {d}^2}{d}} \leadsto \frac{b \cdot c}{{c}^2 + {d}^2} - \frac{a}{d + \frac{{c}^2}{d}}\]
    17.1
  7. Taylor expanded around 0 to get
    \[\frac{b \cdot c}{{c}^2 + {d}^2} - \frac{a}{\color{red}{d + \frac{{c}^2}{d}}} \leadsto \frac{b \cdot c}{{c}^2 + {d}^2} - \frac{a}{\color{blue}{d + \frac{{c}^2}{d}}}\]
    17.1
  8. Applied taylor to get
    \[\frac{b \cdot c}{{c}^2 + {d}^2} - \frac{a}{d + \frac{{c}^2}{d}} \leadsto \frac{b \cdot c}{{c}^2 + {d}^2} - \frac{a}{d + \frac{{c}^2}{d}}\]
    17.1
  9. Taylor expanded around 0 to get
    \[\frac{b \cdot c}{{c}^2 + {d}^2} - \frac{a}{d + \color{red}{\frac{{c}^2}{d}}} \leadsto \frac{b \cdot c}{{c}^2 + {d}^2} - \frac{a}{d + \color{blue}{\frac{{c}^2}{d}}}\]
    17.1
  10. Applied simplify to get
    \[\frac{b \cdot c}{{c}^2 + {d}^2} - \frac{a}{d + \frac{{c}^2}{d}} \leadsto \frac{c \cdot b}{(d * d + \left(c \cdot c\right))_*} - \frac{a}{d + \frac{c}{\frac{d}{c}}}\]
    15.7

  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}{\frac{d}{c}}}} \leadsto \color{blue}{\frac{b \cdot c}{(d * d + \left({c}^2\right))_*} - \frac{a}{(\left(\frac{c}{d}\right) * c + d)_*}}\]
    15.7

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