Average Error: 25.3 → 25.3
Time: 7.1s
Precision: 64
Internal Precision: 384
\[\frac{x.re \cdot y.re + x.im \cdot y.im}{y.re \cdot y.re + y.im \cdot y.im}\]
\[\frac{\frac{(x.im \cdot y.im + \left(y.re \cdot x.re\right))_*}{\sqrt{(y.im \cdot y.im + \left(y.re \cdot y.re\right))_*}}}{\sqrt{(y.im \cdot y.im + \left(y.re \cdot y.re\right))_*}}\]

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.3

    \[\frac{x.re \cdot y.re + x.im \cdot y.im}{y.re \cdot y.re + y.im \cdot y.im}\]
  2. Applied simplify25.3

    \[\leadsto \color{blue}{\frac{(x.im \cdot y.im + \left(y.re \cdot x.re\right))_*}{(y.im \cdot y.im + \left(y.re \cdot y.re\right))_*}}\]
  3. Using strategy rm
  4. Applied add-sqr-sqrt25.3

    \[\leadsto \frac{(x.im \cdot y.im + \left(y.re \cdot x.re\right))_*}{\color{blue}{\sqrt{(y.im \cdot y.im + \left(y.re \cdot y.re\right))_*} \cdot \sqrt{(y.im \cdot y.im + \left(y.re \cdot y.re\right))_*}}}\]
  5. Applied associate-/r*25.3

    \[\leadsto \color{blue}{\frac{\frac{(x.im \cdot y.im + \left(y.re \cdot x.re\right))_*}{\sqrt{(y.im \cdot y.im + \left(y.re \cdot y.re\right))_*}}}{\sqrt{(y.im \cdot y.im + \left(y.re \cdot y.re\right))_*}}}\]

Runtime

Time bar (total: 7.1s)Debug logProfile

herbie shell --seed '#(1070227846 1561819246 480764335 4016816270 2602869839 2117310382)' +o rules:numerics
(FPCore (x.re x.im y.re y.im)
  :name "_divideComplex, real part"
  (/ (+ (* x.re y.re) (* x.im y.im)) (+ (* y.re y.re) (* y.im y.im))))