Average Error: 26.1 → 26.0
Time: 35.0s
Precision: 64
Internal Precision: 128
\[\frac{x.re \cdot y.re + x.im \cdot y.im}{y.re \cdot y.re + y.im \cdot y.im}\]
\[\frac{\frac{1}{\frac{\sqrt{y.re \cdot y.re + y.im \cdot y.im}}{y.im \cdot x.im + y.re \cdot x.re}}}{\sqrt{y.re \cdot y.re + 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 26.1

    \[\frac{x.re \cdot y.re + x.im \cdot y.im}{y.re \cdot y.re + y.im \cdot y.im}\]
  2. Using strategy rm
  3. Applied add-sqr-sqrt26.1

    \[\leadsto \frac{x.re \cdot y.re + x.im \cdot y.im}{\color{blue}{\sqrt{y.re \cdot y.re + y.im \cdot y.im} \cdot \sqrt{y.re \cdot y.re + y.im \cdot y.im}}}\]
  4. Applied associate-/r*26.0

    \[\leadsto \color{blue}{\frac{\frac{x.re \cdot y.re + x.im \cdot y.im}{\sqrt{y.re \cdot y.re + y.im \cdot y.im}}}{\sqrt{y.re \cdot y.re + y.im \cdot y.im}}}\]
  5. Using strategy rm
  6. Applied *-un-lft-identity26.0

    \[\leadsto \frac{\frac{x.re \cdot y.re + \color{blue}{1 \cdot \left(x.im \cdot y.im\right)}}{\sqrt{y.re \cdot y.re + y.im \cdot y.im}}}{\sqrt{y.re \cdot y.re + y.im \cdot y.im}}\]
  7. Applied *-un-lft-identity26.0

    \[\leadsto \frac{\frac{\color{blue}{\left(1 \cdot x.re\right)} \cdot y.re + 1 \cdot \left(x.im \cdot y.im\right)}{\sqrt{y.re \cdot y.re + y.im \cdot y.im}}}{\sqrt{y.re \cdot y.re + y.im \cdot y.im}}\]
  8. Applied associate-*l*26.0

    \[\leadsto \frac{\frac{\color{blue}{1 \cdot \left(x.re \cdot y.re\right)} + 1 \cdot \left(x.im \cdot y.im\right)}{\sqrt{y.re \cdot y.re + y.im \cdot y.im}}}{\sqrt{y.re \cdot y.re + y.im \cdot y.im}}\]
  9. Applied distribute-lft-out26.0

    \[\leadsto \frac{\frac{\color{blue}{1 \cdot \left(x.re \cdot y.re + x.im \cdot y.im\right)}}{\sqrt{y.re \cdot y.re + y.im \cdot y.im}}}{\sqrt{y.re \cdot y.re + y.im \cdot y.im}}\]
  10. Applied associate-/l*26.0

    \[\leadsto \frac{\color{blue}{\frac{1}{\frac{\sqrt{y.re \cdot y.re + y.im \cdot y.im}}{x.re \cdot y.re + x.im \cdot y.im}}}}{\sqrt{y.re \cdot y.re + y.im \cdot y.im}}\]
  11. Final simplification26.0

    \[\leadsto \frac{\frac{1}{\frac{\sqrt{y.re \cdot y.re + y.im \cdot y.im}}{y.im \cdot x.im + y.re \cdot x.re}}}{\sqrt{y.re \cdot y.re + y.im \cdot y.im}}\]

Reproduce

herbie shell --seed 2019088 
(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))))