Average Error: 33.9 → 19.8
Time: 13.7s
Precision: binary64
Cost: 125059
\[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)\]
↓
\[\begin{array}{l}
\mathbf{if}\;x.im \leq -8.216772974650418 \cdot 10^{+102}:\\
\;\;\;\;\sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot e^{y.re \cdot \log \left(-x.im\right) - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}\\
\mathbf{elif}\;x.im \leq -5.119916187162846 \cdot 10^{-88}:\\
\;\;\;\;e^{y.re \cdot \log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re} - y.im \cdot \log \left(\frac{-1}{x.im}\right)\right)\\
\mathbf{elif}\;x.im \leq -3.627285044465458 \cdot 10^{-281}:\\
\;\;\;\;e^{y.re \cdot \log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re} + y.im \cdot \log \left(\sqrt[3]{\sqrt{{x.re}^{2} + {x.im}^{2}}} \cdot \left(\sqrt[3]{\sqrt{{x.re}^{2} + {x.im}^{2}}} \cdot \sqrt[3]{\sqrt{{x.re}^{2} + {x.im}^{2}}}\right)\right)\right)\\
\mathbf{elif}\;x.im \leq 1.3031182895715489 \cdot 10^{-142}:\\
\;\;\;\;0\\
\mathbf{elif}\;x.im \leq 4168286414130.5063:\\
\;\;\;\;e^{y.re \cdot \log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re} + y.im \cdot \log \left(\sqrt{\sqrt{{x.re}^{2} + {x.im}^{2}}} \cdot \sqrt{\sqrt{{x.re}^{2} + {x.im}^{2}}}\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot e^{y.re \cdot \log x.im - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}\\
\end{array}\]
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)↓
\begin{array}{l}
\mathbf{if}\;x.im \leq -8.216772974650418 \cdot 10^{+102}:\\
\;\;\;\;\sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot e^{y.re \cdot \log \left(-x.im\right) - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}\\
\mathbf{elif}\;x.im \leq -5.119916187162846 \cdot 10^{-88}:\\
\;\;\;\;e^{y.re \cdot \log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re} - y.im \cdot \log \left(\frac{-1}{x.im}\right)\right)\\
\mathbf{elif}\;x.im \leq -3.627285044465458 \cdot 10^{-281}:\\
\;\;\;\;e^{y.re \cdot \log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re} + y.im \cdot \log \left(\sqrt[3]{\sqrt{{x.re}^{2} + {x.im}^{2}}} \cdot \left(\sqrt[3]{\sqrt{{x.re}^{2} + {x.im}^{2}}} \cdot \sqrt[3]{\sqrt{{x.re}^{2} + {x.im}^{2}}}\right)\right)\right)\\
\mathbf{elif}\;x.im \leq 1.3031182895715489 \cdot 10^{-142}:\\
\;\;\;\;0\\
\mathbf{elif}\;x.im \leq 4168286414130.5063:\\
\;\;\;\;e^{y.re \cdot \log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re} + y.im \cdot \log \left(\sqrt{\sqrt{{x.re}^{2} + {x.im}^{2}}} \cdot \sqrt{\sqrt{{x.re}^{2} + {x.im}^{2}}}\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot e^{y.re \cdot \log x.im - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}\\
\end{array}(FPCore (x.re x.im y.re y.im)
:precision binary64
(*
(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)))))↓
(FPCore (x.re x.im y.re y.im)
:precision binary64
(if (<= x.im -8.216772974650418e+102)
(*
(sin (* y.re (atan2 x.im x.re)))
(exp (- (* y.re (log (- x.im))) (* (atan2 x.im x.re) y.im))))
(if (<= x.im -5.119916187162846e-88)
(*
(exp
(-
(* y.re (log (sqrt (+ (* x.re x.re) (* x.im x.im)))))
(* (atan2 x.im x.re) y.im)))
(sin (- (* y.re (atan2 x.im x.re)) (* y.im (log (/ -1.0 x.im))))))
(if (<= x.im -3.627285044465458e-281)
(*
(exp
(-
(* y.re (log (sqrt (+ (* x.re x.re) (* x.im x.im)))))
(* (atan2 x.im x.re) y.im)))
(sin
(+
(* y.re (atan2 x.im x.re))
(*
y.im
(log
(*
(cbrt (sqrt (+ (pow x.re 2.0) (pow x.im 2.0))))
(*
(cbrt (sqrt (+ (pow x.re 2.0) (pow x.im 2.0))))
(cbrt (sqrt (+ (pow x.re 2.0) (pow x.im 2.0)))))))))))
(if (<= x.im 1.3031182895715489e-142)
0.0
(if (<= x.im 4168286414130.5063)
(*
(exp
(-
(* y.re (log (sqrt (+ (* x.re x.re) (* x.im x.im)))))
(* (atan2 x.im x.re) y.im)))
(sin
(+
(* y.re (atan2 x.im x.re))
(*
y.im
(log
(*
(sqrt (sqrt (+ (pow x.re 2.0) (pow x.im 2.0))))
(sqrt (sqrt (+ (pow x.re 2.0) (pow x.im 2.0))))))))))
(*
(sin (* y.re (atan2 x.im x.re)))
(exp (- (* y.re (log x.im)) (* (atan2 x.im x.re) y.im))))))))))double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
return exp((log(sqrt((x_46_re * x_46_re) + (x_46_im * x_46_im))) * y_46_re) - (atan2(x_46_im, x_46_re) * y_46_im)) * sin((log(sqrt((x_46_re * x_46_re) + (x_46_im * x_46_im))) * y_46_im) + (atan2(x_46_im, x_46_re) * y_46_re));
}
↓
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double tmp;
if (x_46_im <= -8.216772974650418e+102) {
tmp = sin(y_46_re * atan2(x_46_im, x_46_re)) * exp((y_46_re * log(-x_46_im)) - (atan2(x_46_im, x_46_re) * y_46_im));
} else if (x_46_im <= -5.119916187162846e-88) {
tmp = exp((y_46_re * log(sqrt((x_46_re * x_46_re) + (x_46_im * x_46_im)))) - (atan2(x_46_im, x_46_re) * y_46_im)) * sin((y_46_re * atan2(x_46_im, x_46_re)) - (y_46_im * log(-1.0 / x_46_im)));
} else if (x_46_im <= -3.627285044465458e-281) {
tmp = exp((y_46_re * log(sqrt((x_46_re * x_46_re) + (x_46_im * x_46_im)))) - (atan2(x_46_im, x_46_re) * y_46_im)) * sin((y_46_re * atan2(x_46_im, x_46_re)) + (y_46_im * log(cbrt(sqrt(pow(x_46_re, 2.0) + pow(x_46_im, 2.0))) * (cbrt(sqrt(pow(x_46_re, 2.0) + pow(x_46_im, 2.0))) * cbrt(sqrt(pow(x_46_re, 2.0) + pow(x_46_im, 2.0)))))));
} else if (x_46_im <= 1.3031182895715489e-142) {
tmp = 0.0;
} else if (x_46_im <= 4168286414130.5063) {
tmp = exp((y_46_re * log(sqrt((x_46_re * x_46_re) + (x_46_im * x_46_im)))) - (atan2(x_46_im, x_46_re) * y_46_im)) * sin((y_46_re * atan2(x_46_im, x_46_re)) + (y_46_im * log(sqrt(sqrt(pow(x_46_re, 2.0) + pow(x_46_im, 2.0))) * sqrt(sqrt(pow(x_46_re, 2.0) + pow(x_46_im, 2.0))))));
} else {
tmp = sin(y_46_re * atan2(x_46_im, x_46_re)) * exp((y_46_re * log(x_46_im)) - (atan2(x_46_im, x_46_re) * y_46_im));
}
return tmp;
}
Try it out
Enter valid numbers for all inputs
Alternatives
| Alternative 1 |
|---|
| Error | 34.2 |
|---|
| Cost | 163392 |
|---|
\[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 \left(\sqrt[3]{\sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re} + y.im \cdot \log \left(\sqrt{{x.re}^{2} + {x.im}^{2}}\right)\right)} \cdot \left(\sqrt[3]{\sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re} + y.im \cdot \log \left(\sqrt{{x.re}^{2} + {x.im}^{2}}\right)\right)} \cdot \sqrt[3]{\sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re} + y.im \cdot \log \left(\sqrt{{x.re}^{2} + {x.im}^{2}}\right)\right)}\right)\right)\]
| Alternative 2 |
|---|
| Error | 33.9 |
|---|
| Cost | 124096 |
|---|
\[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(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re} + y.im \cdot \log \left(\sqrt[3]{\sqrt{{x.re}^{2} + {x.im}^{2}}} \cdot \left(\sqrt[3]{\sqrt{{x.re}^{2} + {x.im}^{2}}} \cdot \sqrt[3]{\sqrt{{x.re}^{2} + {x.im}^{2}}}\right)\right)\right)\]
| Alternative 3 |
|---|
| Error | 33.9 |
|---|
| Cost | 98112 |
|---|
\[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(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re} + y.im \cdot \log \left(\sqrt{\sqrt{{x.re}^{2} + {x.im}^{2}}} \cdot \sqrt{\sqrt{{x.re}^{2} + {x.im}^{2}}}\right)\right)\]
| Alternative 4 |
|---|
| Error | 44.9 |
|---|
| Cost | 97984 |
|---|
\[e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re - \sqrt[3]{y.im} \cdot \left(\tan^{-1}_* \frac{x.im}{x.re} \cdot \left(\sqrt[3]{y.im} \cdot \sqrt[3]{y.im}\right)\right)} \cdot \log \left(e^{\sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re} + y.im \cdot \log \left(\sqrt{{x.re}^{2} + {x.im}^{2}}\right)\right)}\right)\]
| Alternative 5 |
|---|
| Error | 50.6 |
|---|
| Cost | 91328 |
|---|
\[\sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re} + y.im \cdot \log \left(\sqrt{\sqrt{{x.re}^{2} + {x.im}^{2}}} \cdot \sqrt{\sqrt{{x.re}^{2} + {x.im}^{2}}}\right)\right) \cdot e^{y.re \cdot \log x.im - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}\]
| Alternative 6 |
|---|
| Error | 52.4 |
|---|
| Cost | 85504 |
|---|
\[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(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re} + y.im \cdot \log \left(\sqrt{\sqrt{{x.re}^{2} + {x.im}^{2}}} \cdot \sqrt{x.im + 0.5 \cdot \frac{{x.re}^{2}}{x.im}}\right)\right)\]
| Alternative 7 |
|---|
| Error | 50.7 |
|---|
| Cost | 78720 |
|---|
\[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(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re} + y.im \cdot \log \left(\sqrt{\sqrt{{x.re}^{2} + {x.im}^{2}}} \cdot \sqrt{-x.im}\right)\right)\]
| Alternative 8 |
|---|
| Error | 51.1 |
|---|
| Cost | 78656 |
|---|
\[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(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re} + y.im \cdot \log \left(\sqrt{\sqrt{{x.re}^{2} + {x.im}^{2}}} \cdot \sqrt{x.im}\right)\right)\]
| Alternative 9 |
|---|
| Error | 39.4 |
|---|
| Cost | 78592 |
|---|
\[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 \sqrt[3]{{\sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re} + y.im \cdot \log \left(\sqrt{{x.re}^{2} + {x.im}^{2}}\right)\right)}^{3}}\]
| Alternative 10 |
|---|
| Error | 44.9 |
|---|
| Cost | 78528 |
|---|
\[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 \log \left(e^{\sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re} + y.im \cdot \log \left(\sqrt{{x.re}^{2} + {x.im}^{2}}\right)\right)}\right)\]
| Alternative 11 |
|---|
| Error | 33.9 |
|---|
| Cost | 72512 |
|---|
\[\sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re} + \log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.im\right) \cdot e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re - \sqrt[3]{y.im} \cdot \left(\tan^{-1}_* \frac{x.im}{x.re} \cdot \left(\sqrt[3]{y.im} \cdot \sqrt[3]{y.im}\right)\right)}\]
| Alternative 12 |
|---|
| Error | 33.9 |
|---|
| Cost | 53056 |
|---|
\[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(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re} + \log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.im\right)\]
| Alternative 13 |
|---|
| Error | 36.5 |
|---|
| Cost | 52992 |
|---|
\[\sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re} + \log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.im\right) \cdot \frac{{\left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right)}^{y.re}}{e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}}\]
| Alternative 14 |
|---|
| Error | 29.5 |
|---|
| Cost | 52480 |
|---|
\[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 \sqrt[3]{{\sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)}^{3}}\]
| Alternative 15 |
|---|
| Error | 43.9 |
|---|
| Cost | 46400 |
|---|
\[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(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re} - y.im \cdot \log \left(\frac{-1}{x.im}\right)\right)\]
| Alternative 16 |
|---|
| Error | 43.5 |
|---|
| Cost | 46400 |
|---|
\[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(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re} - y.im \cdot \log \left(\frac{-1}{x.re}\right)\right)\]
| Alternative 17 |
|---|
| Error | 43.9 |
|---|
| Cost | 46336 |
|---|
\[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(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re} + y.im \cdot \log \left(-x.im\right)\right)\]
| Alternative 18 |
|---|
| Error | 43.5 |
|---|
| Cost | 46336 |
|---|
\[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(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re} + y.im \cdot \log \left(-x.re\right)\right)\]
| Alternative 19 |
|---|
| Error | 44.1 |
|---|
| Cost | 46272 |
|---|
\[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(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re} + y.im \cdot \log x.im\right)\]
| Alternative 20 |
|---|
| Error | 50.3 |
|---|
| Cost | 46272 |
|---|
\[\sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re} + \log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.im\right) \cdot e^{y.re \cdot \log x.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}\]
| Alternative 21 |
|---|
| Error | 50.6 |
|---|
| Cost | 46272 |
|---|
\[\sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re} + \log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.im\right) \cdot e^{y.re \cdot \log x.im - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}\]
| Alternative 22 |
|---|
| Error | 43.5 |
|---|
| Cost | 46272 |
|---|
\[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(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re} + y.im \cdot \log x.re\right)\]
| Alternative 23 |
|---|
| Error | 27.4 |
|---|
| Cost | 39616 |
|---|
\[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(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\]
| Alternative 24 |
|---|
| Error | 27.5 |
|---|
| Cost | 33216 |
|---|
\[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 \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\]
| Alternative 25 |
|---|
| Error | 44.1 |
|---|
| Cost | 32896 |
|---|
\[\sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot e^{y.re \cdot \log \left(-x.im\right) - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}\]
| Alternative 26 |
|---|
| Error | 42.4 |
|---|
| Cost | 32896 |
|---|
\[\sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot e^{y.re \cdot \log \left(-x.re\right) - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}\]
| Alternative 27 |
|---|
| Error | 44.0 |
|---|
| Cost | 32832 |
|---|
\[\sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot e^{y.re \cdot \log x.im - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}\]
| Alternative 28 |
|---|
| Error | 45.2 |
|---|
| Cost | 32832 |
|---|
\[\sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot e^{y.re \cdot \log x.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}\]
| Alternative 29 |
|---|
| Error | 61.4 |
|---|
| Cost | 64 |
|---|
\[1\]
| Alternative 30 |
|---|
| Error | 27.5 |
|---|
| Cost | 64 |
|---|
\[0\]
| Alternative 31 |
|---|
| Error | 61.4 |
|---|
| Cost | 64 |
|---|
\[-1\]
Error

Derivation
- Split input into 6 regimes
if x.im < -8.2167729746504178e102
Initial program 51.8
\[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)\]
Taylor expanded around 0 30.4
\[\leadsto 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 \color{blue}{\sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)}\]
Simplified30.4
\[\leadsto 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 \color{blue}{\sin \left(\tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)}\]
Taylor expanded around -inf 13.0
\[\leadsto e^{\log \color{blue}{\left(-1 \cdot x.im\right)} \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \sin \left(\tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)\]
Simplified13.0
\[\leadsto e^{\log \color{blue}{\left(-x.im\right)} \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \sin \left(\tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)\]
Simplified13.0
\[\leadsto \color{blue}{\sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot e^{y.re \cdot \log \left(-x.im\right) - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}}\]
if -8.2167729746504178e102 < x.im < -5.1199161871628461e-88
Initial program 18.3
\[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)\]
Taylor expanded around -inf 15.4
\[\leadsto 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 \color{blue}{\sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re} - y.im \cdot \log \left(\frac{-1}{x.im}\right)\right)}\]
Simplified15.4
\[\leadsto 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 \color{blue}{\sin \left(\tan^{-1}_* \frac{x.im}{x.re} \cdot y.re - y.im \cdot \log \left(\frac{-1}{x.im}\right)\right)}\]
Simplified15.4
\[\leadsto \color{blue}{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(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re} - y.im \cdot \log \left(\frac{-1}{x.im}\right)\right)}\]
if -5.1199161871628461e-88 < x.im < -3.6272850444654578e-281
Initial program 28.8
\[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)\]
- Using strategy
rm Applied add-cube-cbrt_binary6428.8
\[\leadsto 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 \color{blue}{\left(\left(\sqrt[3]{\sqrt{x.re \cdot x.re + x.im \cdot x.im}} \cdot \sqrt[3]{\sqrt{x.re \cdot x.re + x.im \cdot x.im}}\right) \cdot \sqrt[3]{\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)\]
Simplified28.8
\[\leadsto 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(\color{blue}{\left(\sqrt[3]{\sqrt{{x.re}^{2} + {x.im}^{2}}} \cdot \sqrt[3]{\sqrt{{x.re}^{2} + {x.im}^{2}}}\right)} \cdot \sqrt[3]{\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)\]
Simplified28.8
\[\leadsto 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(\left(\sqrt[3]{\sqrt{{x.re}^{2} + {x.im}^{2}}} \cdot \sqrt[3]{\sqrt{{x.re}^{2} + {x.im}^{2}}}\right) \cdot \color{blue}{\sqrt[3]{\sqrt{{x.re}^{2} + {x.im}^{2}}}}\right) \cdot y.im + \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)\]
Simplified28.8
\[\leadsto \color{blue}{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(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re} + y.im \cdot \log \left(\sqrt[3]{\sqrt{{x.re}^{2} + {x.im}^{2}}} \cdot \left(\sqrt[3]{\sqrt{{x.re}^{2} + {x.im}^{2}}} \cdot \sqrt[3]{\sqrt{{x.re}^{2} + {x.im}^{2}}}\right)\right)\right)}\]
if -3.6272850444654578e-281 < x.im < 1.30311828957154891e-142
Initial program 29.9
\[0\]
if 1.30311828957154891e-142 < x.im < 4168286414130.50635
Initial program 18.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)\]
- Using strategy
rm Applied add-sqr-sqrt_binary6418.2
\[\leadsto 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 \color{blue}{\left(\sqrt{\sqrt{x.re \cdot x.re + x.im \cdot x.im}} \cdot \sqrt{\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)\]
Simplified18.2
\[\leadsto 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(\color{blue}{\sqrt{\sqrt{{x.re}^{2} + {x.im}^{2}}}} \cdot \sqrt{\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)\]
Simplified18.2
\[\leadsto 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{\sqrt{{x.re}^{2} + {x.im}^{2}}} \cdot \color{blue}{\sqrt{\sqrt{{x.re}^{2} + {x.im}^{2}}}}\right) \cdot y.im + \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)\]
Simplified18.2
\[\leadsto \color{blue}{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(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re} + y.im \cdot \log \left(\sqrt{\sqrt{{x.re}^{2} + {x.im}^{2}}} \cdot \sqrt{\sqrt{{x.re}^{2} + {x.im}^{2}}}\right)\right)}\]
if 4168286414130.50635 < x.im
Initial program 42.9
\[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)\]
Taylor expanded around 0 27.6
\[\leadsto 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 \color{blue}{\sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)}\]
Simplified27.6
\[\leadsto 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 \color{blue}{\sin \left(\tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)}\]
Taylor expanded around 0 15.2
\[\leadsto e^{\log \color{blue}{x.im} \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \sin \left(\tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)\]
Simplified15.2
\[\leadsto \color{blue}{\sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot e^{y.re \cdot \log x.im - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}}\]
- Recombined 6 regimes into one program.
Final simplification19.8
\[\leadsto \begin{array}{l}
\mathbf{if}\;x.im \leq -8.216772974650418 \cdot 10^{+102}:\\
\;\;\;\;\sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot e^{y.re \cdot \log \left(-x.im\right) - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}\\
\mathbf{elif}\;x.im \leq -5.119916187162846 \cdot 10^{-88}:\\
\;\;\;\;e^{y.re \cdot \log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re} - y.im \cdot \log \left(\frac{-1}{x.im}\right)\right)\\
\mathbf{elif}\;x.im \leq -3.627285044465458 \cdot 10^{-281}:\\
\;\;\;\;e^{y.re \cdot \log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re} + y.im \cdot \log \left(\sqrt[3]{\sqrt{{x.re}^{2} + {x.im}^{2}}} \cdot \left(\sqrt[3]{\sqrt{{x.re}^{2} + {x.im}^{2}}} \cdot \sqrt[3]{\sqrt{{x.re}^{2} + {x.im}^{2}}}\right)\right)\right)\\
\mathbf{elif}\;x.im \leq 1.3031182895715489 \cdot 10^{-142}:\\
\;\;\;\;0\\
\mathbf{elif}\;x.im \leq 4168286414130.5063:\\
\;\;\;\;e^{y.re \cdot \log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re} + y.im \cdot \log \left(\sqrt{\sqrt{{x.re}^{2} + {x.im}^{2}}} \cdot \sqrt{\sqrt{{x.re}^{2} + {x.im}^{2}}}\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot e^{y.re \cdot \log x.im - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}\\
\end{array}\]
Reproduce
herbie shell --seed 2021042
(FPCore (x.re x.im y.re y.im)
:name "powComplex, imaginary part"
:precision binary64
(* (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)))))