\[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)\]
Test:
powComplex, imaginary part
Bits:
128 bits
Bits error versus x.re
Bits error versus x.im
Bits error versus y.re
Bits error versus y.im
Time: 9.5 s
Input Error: 16.1
Output Error: 16.1
Log:
Profile: 🕒
\(\frac{\sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re} + \log \left(\sqrt{{x.re}^2 + x.im \cdot x.im}\right) \cdot y.im\right)}{e^{y.im \cdot \tan^{-1}_* \frac{x.im}{x.re} - \log \left(\sqrt{{x.re}^2 + x.im \cdot x.im}\right) \cdot y.re}}\)
  1. Started with
    \[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)\]
    16.1
  2. Applied simplify to get
    \[\color{red}{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)} \leadsto \color{blue}{\frac{\sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re} + \log \left(\sqrt{{x.re}^2 + x.im \cdot x.im}\right) \cdot y.im\right)}{\frac{{\left(e^{y.im}\right)}^{\left(\tan^{-1}_* \frac{x.im}{x.re}\right)}}{{\left(\sqrt{{x.re}^2 + x.im \cdot x.im}\right)}^{y.re}}}}\]
    17.6
  3. Using strategy rm
    17.6
  4. Applied pow-exp to get
    \[\frac{\sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re} + \log \left(\sqrt{{x.re}^2 + x.im \cdot x.im}\right) \cdot y.im\right)}{\frac{\color{red}{{\left(e^{y.im}\right)}^{\left(\tan^{-1}_* \frac{x.im}{x.re}\right)}}}{{\left(\sqrt{{x.re}^2 + x.im \cdot x.im}\right)}^{y.re}}} \leadsto \frac{\sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re} + \log \left(\sqrt{{x.re}^2 + x.im \cdot x.im}\right) \cdot y.im\right)}{\frac{\color{blue}{e^{y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}}}}{{\left(\sqrt{{x.re}^2 + x.im \cdot x.im}\right)}^{y.re}}}\]
    17.2
  5. Using strategy rm
    17.2
  6. Applied add-exp-log to get
    \[\frac{\sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re} + \log \left(\sqrt{{x.re}^2 + x.im \cdot x.im}\right) \cdot y.im\right)}{\frac{e^{y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}}}{{\color{red}{\left(\sqrt{{x.re}^2 + x.im \cdot x.im}\right)}}^{y.re}}} \leadsto \frac{\sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re} + \log \left(\sqrt{{x.re}^2 + x.im \cdot x.im}\right) \cdot y.im\right)}{\frac{e^{y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}}}{{\color{blue}{\left(e^{\log \left(\sqrt{{x.re}^2 + x.im \cdot x.im}\right)}\right)}}^{y.re}}}\]
    17.2
  7. Applied pow-exp to get
    \[\frac{\sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re} + \log \left(\sqrt{{x.re}^2 + x.im \cdot x.im}\right) \cdot y.im\right)}{\frac{e^{y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}}}{\color{red}{{\left(e^{\log \left(\sqrt{{x.re}^2 + x.im \cdot x.im}\right)}\right)}^{y.re}}}} \leadsto \frac{\sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re} + \log \left(\sqrt{{x.re}^2 + x.im \cdot x.im}\right) \cdot y.im\right)}{\frac{e^{y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}}}{\color{blue}{e^{\log \left(\sqrt{{x.re}^2 + x.im \cdot x.im}\right) \cdot y.re}}}}\]
    17.2
  8. Applied div-exp to get
    \[\frac{\sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re} + \log \left(\sqrt{{x.re}^2 + x.im \cdot x.im}\right) \cdot y.im\right)}{\color{red}{\frac{e^{y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}}}{e^{\log \left(\sqrt{{x.re}^2 + x.im \cdot x.im}\right) \cdot y.re}}}} \leadsto \frac{\sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re} + \log \left(\sqrt{{x.re}^2 + x.im \cdot x.im}\right) \cdot y.im\right)}{\color{blue}{e^{y.im \cdot \tan^{-1}_* \frac{x.im}{x.re} - \log \left(\sqrt{{x.re}^2 + x.im \cdot x.im}\right) \cdot y.re}}}\]
    16.1

Original test:


(lambda ((x.re default) (x.im default) (y.re default) (y.im default))
  #: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)))))