Average Error: 31.2 → 0.2
Time: 6.3m
Precision: 64
Internal Precision: 128
\[e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \sin \left(\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.im + \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)\]
\[\frac{\sin \left((y.im \cdot \left(\log \left(\sqrt{x.re^2 + x.im^2}^*\right)\right) + \left(\tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right))_*\right)}{\frac{\left(1 + \frac{1}{2} \cdot \left({\left(\tan^{-1}_* \frac{x.im}{x.re}\right)}^{2} \cdot {y.im}^{2}\right)\right) + \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}{{\left(\sqrt{x.re^2 + x.im^2}^*\right)}^{y.re}}}\]

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 31.2

    \[e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \sin \left(\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.im + \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)\]
  2. Initial simplification7.1

    \[\leadsto \frac{\sin \left((y.im \cdot \left(\log \left(\sqrt{x.re^2 + x.im^2}^*\right)\right) + \left(\tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right))_*\right)}{\frac{{\left(e^{y.im}\right)}^{\left(\tan^{-1}_* \frac{x.im}{x.re}\right)}}{{\left(\sqrt{x.re^2 + x.im^2}^*\right)}^{y.re}}}\]
  3. Taylor expanded around 0 0.2

    \[\leadsto \frac{\sin \left((y.im \cdot \left(\log \left(\sqrt{x.re^2 + x.im^2}^*\right)\right) + \left(\tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right))_*\right)}{\frac{\color{blue}{y.im \cdot \tan^{-1}_* \frac{x.im}{x.re} + \left(\frac{1}{2} \cdot \left({y.im}^{2} \cdot {\left(\tan^{-1}_* \frac{x.im}{x.re}\right)}^{2}\right) + 1\right)}}{{\left(\sqrt{x.re^2 + x.im^2}^*\right)}^{y.re}}}\]
  4. Final simplification0.2

    \[\leadsto \frac{\sin \left((y.im \cdot \left(\log \left(\sqrt{x.re^2 + x.im^2}^*\right)\right) + \left(\tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right))_*\right)}{\frac{\left(1 + \frac{1}{2} \cdot \left({\left(\tan^{-1}_* \frac{x.im}{x.re}\right)}^{2} \cdot {y.im}^{2}\right)\right) + \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}{{\left(\sqrt{x.re^2 + x.im^2}^*\right)}^{y.re}}}\]

Runtime

Time bar (total: 6.3m)Debug logProfile

BaselineHerbieOracleSpan%
Regimes0.20.20.10.00%
herbie shell --seed 2018354 +o rules:numerics
(FPCore (x.re x.im y.re y.im)
  :name "powComplex, imaginary part"
  (* (exp (- (* (log (sqrt (+ (* x.re x.re) (* x.im x.im)))) y.re) (* (atan2 x.im x.re) y.im))) (sin (+ (* (log (sqrt (+ (* x.re x.re) (* x.im x.im)))) y.im) (* (atan2 x.im x.re) y.re)))))