Average Error: 25.8 → 26.0
Time: 24.8s
Precision: 64
Internal precision: 128
\[\frac{x.im \cdot y.re - x.re \cdot y.im}{y.re \cdot y.re + y.im \cdot y.im}\]
\[\left(y.re \cdot x.im - y.im \cdot x.re\right) \cdot \frac{1}{{y.re}^2 + y.im \cdot y.im}\]

Error

Bits error versus x.re

Bits error versus x.im

Bits error versus y.re

Bits error versus y.im

Derivation

  1. Initial program 25.8

    \[\frac{x.im \cdot y.re - x.re \cdot y.im}{y.re \cdot y.re + y.im \cdot y.im}\]
  2. Applied simplify 25.8

    \[\leadsto \color{blue}{\frac{y.re \cdot x.im - y.im \cdot x.re}{{y.re}^2 + y.im \cdot y.im}}\]
  3. Using strategy rm
  4. Applied div-inv 26.0

    \[\leadsto \color{blue}{\left(y.re \cdot x.im - y.im \cdot x.re\right) \cdot \frac{1}{{y.re}^2 + y.im \cdot y.im}}\]
  5. Removed slow pow expressions

Runtime

Time bar (total: 24.8s) Debug log

Please include this information when filing a bug report:

herbie --seed '#(2211626396 2992924545 1931390858 1701375917 997590084 4222605735)'
(FPCore (x.re x.im y.re y.im)
  :name "_divideComplex, imaginary part"
  (/ (- (* x.im y.re) (* x.re y.im)) (+ (* y.re y.re) (* y.im y.im))))