\[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 \cos \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}
t_0 := \log \left(\mathsf{hypot}\left(x.re, x.im\right)\right)\\
t_1 := {\left(\sqrt[3]{\sqrt[3]{\tan^{-1}_* \frac{x.im}{x.re}}}\right)}^{3}\\
e^{t_0 \cdot y.re - {t_1}^{2} \cdot \left(t_1 \cdot y.im\right)} \cdot \cos \left(\mathsf{fma}\left(t_0, y.im, y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)
\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)))
(cos
(+
(* (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
(let* ((t_0 (log (hypot x.re x.im)))
(t_1 (pow (cbrt (cbrt (atan2 x.im x.re))) 3.0)))
(*
(exp (- (* t_0 y.re) (* (pow t_1 2.0) (* t_1 y.im))))
(cos (fma t_0 y.im (* y.re (atan2 x.im x.re)))))))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))) * cos(((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 t_0 = log(hypot(x_46_re, x_46_im));
double t_1 = pow(cbrt(cbrt(atan2(x_46_im, x_46_re))), 3.0);
return exp(((t_0 * y_46_re) - (pow(t_1, 2.0) * (t_1 * y_46_im)))) * cos(fma(t_0, y_46_im, (y_46_re * atan2(x_46_im, x_46_re))));
}
function code(x_46_re, x_46_im, y_46_re, y_46_im)
return Float64(exp(Float64(Float64(log(sqrt(Float64(Float64(x_46_re * x_46_re) + Float64(x_46_im * x_46_im)))) * y_46_re) - Float64(atan(x_46_im, x_46_re) * y_46_im))) * cos(Float64(Float64(log(sqrt(Float64(Float64(x_46_re * x_46_re) + Float64(x_46_im * x_46_im)))) * y_46_im) + Float64(atan(x_46_im, x_46_re) * y_46_re))))
end
↓
function code(x_46_re, x_46_im, y_46_re, y_46_im)
t_0 = log(hypot(x_46_re, x_46_im))
t_1 = cbrt(cbrt(atan(x_46_im, x_46_re))) ^ 3.0
return Float64(exp(Float64(Float64(t_0 * y_46_re) - Float64((t_1 ^ 2.0) * Float64(t_1 * y_46_im)))) * cos(fma(t_0, y_46_im, Float64(y_46_re * atan(x_46_im, x_46_re)))))
end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := N[(N[Exp[N[(N[(N[Log[N[Sqrt[N[(N[(x$46$re * x$46$re), $MachinePrecision] + N[(x$46$im * x$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision] * y$46$re), $MachinePrecision] - N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Cos[N[(N[(N[Log[N[Sqrt[N[(N[(x$46$re * x$46$re), $MachinePrecision] + N[(x$46$im * x$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision] * y$46$im), $MachinePrecision] + N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$re), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]
↓
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[Log[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision]], $MachinePrecision]}, Block[{t$95$1 = N[Power[N[Power[N[Power[N[ArcTan[x$46$im / x$46$re], $MachinePrecision], 1/3], $MachinePrecision], 1/3], $MachinePrecision], 3.0], $MachinePrecision]}, N[(N[Exp[N[(N[(t$95$0 * y$46$re), $MachinePrecision] - N[(N[Power[t$95$1, 2.0], $MachinePrecision] * N[(t$95$1 * y$46$im), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Cos[N[(t$95$0 * y$46$im + N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]
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 \cos \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}
t_0 := \log \left(\mathsf{hypot}\left(x.re, x.im\right)\right)\\
t_1 := {\left(\sqrt[3]{\sqrt[3]{\tan^{-1}_* \frac{x.im}{x.re}}}\right)}^{3}\\
e^{t_0 \cdot y.re - {t_1}^{2} \cdot \left(t_1 \cdot y.im\right)} \cdot \cos \left(\mathsf{fma}\left(t_0, y.im, y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)
\end{array}
Alternatives
| Alternative 1 |
|---|
| Accuracy | 94.5% |
|---|
| Cost | 110208 |
|---|
\[\begin{array}{l}
t_0 := \sqrt[3]{\tan^{-1}_* \frac{x.im}{x.re}}\\
t_1 := \log \left(\mathsf{hypot}\left(x.re, x.im\right)\right)\\
\cos \left(\mathsf{fma}\left(t_1, y.im, y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right) \cdot e^{t_1 \cdot y.re - {\left({\left(\sqrt[3]{t_0}\right)}^{3}\right)}^{2} \cdot \left(y.im \cdot \mathsf{log1p}\left(\mathsf{expm1}\left(t_0\right)\right)\right)}
\end{array}
\]
| Alternative 2 |
|---|
| Accuracy | 94.5% |
|---|
| Cost | 97408 |
|---|
\[\begin{array}{l}
t_0 := \sqrt[3]{\tan^{-1}_* \frac{x.im}{x.re}}\\
t_1 := \log \left(\mathsf{hypot}\left(x.re, x.im\right)\right)\\
\cos \left(\mathsf{fma}\left(t_1, y.im, y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right) \cdot e^{t_1 \cdot y.re - {\left({\left(\sqrt[3]{t_0}\right)}^{3}\right)}^{2} \cdot \left(t_0 \cdot y.im\right)}
\end{array}
\]
| Alternative 3 |
|---|
| Accuracy | 94.5% |
|---|
| Cost | 97344 |
|---|
\[\begin{array}{l}
t_0 := \sqrt[3]{\tan^{-1}_* \frac{x.im}{x.re}}\\
t_1 := \log \left(\mathsf{hypot}\left(x.re, x.im\right)\right)\\
\cos \left(\mathsf{fma}\left(t_1, y.im, y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right) \cdot e^{t_1 \cdot y.re - \left(t_0 \cdot y.im\right) \cdot {\left(\mathsf{log1p}\left(\mathsf{expm1}\left(t_0\right)\right)\right)}^{2}}
\end{array}
\]
| Alternative 4 |
|---|
| Accuracy | 94.5% |
|---|
| Cost | 84544 |
|---|
\[\begin{array}{l}
t_0 := \sqrt[3]{\tan^{-1}_* \frac{x.im}{x.re}}\\
t_1 := \log \left(\mathsf{hypot}\left(x.re, x.im\right)\right)\\
\cos \left(\mathsf{fma}\left(t_1, y.im, y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right) \cdot e^{t_1 \cdot y.re - \left(t_0 \cdot y.im\right) \cdot {t_0}^{2}}
\end{array}
\]
| Alternative 5 |
|---|
| Accuracy | 94.5% |
|---|
| Cost | 58688 |
|---|
\[\begin{array}{l}
t_0 := \log \left(\mathsf{hypot}\left(x.re, x.im\right)\right)\\
\cos \left(\mathsf{fma}\left(t_0, y.im, y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right) \cdot e^{t_0 \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}
\end{array}
\]
| Alternative 6 |
|---|
| Accuracy | 94.1% |
|---|
| Cost | 45696 |
|---|
\[e^{\log \left(\mathsf{hypot}\left(x.re, x.im\right)\right) \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \cos \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right)
\]
| Alternative 7 |
|---|
| Accuracy | 93.6% |
|---|
| Cost | 39296 |
|---|
\[e^{\log \left(\mathsf{hypot}\left(x.re, x.im\right)\right) \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)
\]
| Alternative 8 |
|---|
| Accuracy | 93.3% |
|---|
| Cost | 26176 |
|---|
\[e^{\log \left(\mathsf{hypot}\left(x.re, x.im\right)\right) \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}
\]
| Alternative 9 |
|---|
| Accuracy | 88.6% |
|---|
| Cost | 13577 |
|---|
\[\begin{array}{l}
\mathbf{if}\;y.re \leq -4.5 \cdot 10^{-10} \lor \neg \left(y.re \leq 9.5 \cdot 10^{+39}\right):\\
\;\;\;\;{\left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right)}^{y.re}\\
\mathbf{else}:\\
\;\;\;\;e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot \left(-y.im\right)}\\
\end{array}
\]
| Alternative 10 |
|---|
| Accuracy | 65.3% |
|---|
| Cost | 13120 |
|---|
\[e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot \left(-y.im\right)}
\]
| Alternative 11 |
|---|
| Accuracy | 42.0% |
|---|
| Cost | 13056 |
|---|
\[e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}
\]
| Alternative 12 |
|---|
| Accuracy | 38.1% |
|---|
| Cost | 64 |
|---|
\[1
\]