\[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}
t_0 := \log \left(\mathsf{hypot}\left(x.re, x.im\right)\right)\\
\mathbf{if}\;y.im \leq -9.4 \cdot 10^{-17} \lor \neg \left(y.im \leq 10^{-55}\right):\\
\;\;\;\;e^{t_0 \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \sin \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{\sin \left(\mathsf{fma}\left(t_0, y.im, y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)}{\frac{1}{{\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re}}}\\
\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
(let* ((t_0 (log (hypot x.re x.im))))
(if (or (<= y.im -9.4e-17) (not (<= y.im 1e-55)))
(*
(exp (- (* t_0 y.re) (* (atan2 x.im x.re) y.im)))
(sin (* y.im (log (hypot x.im x.re)))))
(/
(sin (fma t_0 y.im (* y.re (atan2 x.im x.re))))
(/ 1.0 (pow (hypot x.re x.im) y.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))) * 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 t_0 = log(hypot(x_46_re, x_46_im));
double tmp;
if ((y_46_im <= -9.4e-17) || !(y_46_im <= 1e-55)) {
tmp = exp(((t_0 * y_46_re) - (atan2(x_46_im, x_46_re) * y_46_im))) * sin((y_46_im * log(hypot(x_46_im, x_46_re))));
} else {
tmp = sin(fma(t_0, y_46_im, (y_46_re * atan2(x_46_im, x_46_re)))) / (1.0 / pow(hypot(x_46_re, x_46_im), y_46_re));
}
return tmp;
}
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))) * sin(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))
tmp = 0.0
if ((y_46_im <= -9.4e-17) || !(y_46_im <= 1e-55))
tmp = Float64(exp(Float64(Float64(t_0 * y_46_re) - Float64(atan(x_46_im, x_46_re) * y_46_im))) * sin(Float64(y_46_im * log(hypot(x_46_im, x_46_re)))));
else
tmp = Float64(sin(fma(t_0, y_46_im, Float64(y_46_re * atan(x_46_im, x_46_re)))) / Float64(1.0 / (hypot(x_46_re, x_46_im) ^ y_46_re)));
end
return tmp
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[Sin[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]}, If[Or[LessEqual[y$46$im, -9.4e-17], N[Not[LessEqual[y$46$im, 1e-55]], $MachinePrecision]], N[(N[Exp[N[(N[(t$95$0 * y$46$re), $MachinePrecision] - N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Sin[N[(y$46$im * N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(N[Sin[N[(t$95$0 * y$46$im + N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / N[(1.0 / N[Power[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision], y$46$re], $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 \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}
t_0 := \log \left(\mathsf{hypot}\left(x.re, x.im\right)\right)\\
\mathbf{if}\;y.im \leq -9.4 \cdot 10^{-17} \lor \neg \left(y.im \leq 10^{-55}\right):\\
\;\;\;\;e^{t_0 \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \sin \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{\sin \left(\mathsf{fma}\left(t_0, y.im, y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)}{\frac{1}{{\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re}}}\\
\end{array}
Alternatives
| Alternative 1 |
|---|
| Accuracy | 94.5% |
|---|
| Cost | 58688 |
|---|
\[\begin{array}{l}
t_0 := \log \left(\mathsf{hypot}\left(x.re, x.im\right)\right)\\
e^{t_0 \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \sin \left(\mathsf{fma}\left(t_0, y.im, y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)
\end{array}
\]
| Alternative 2 |
|---|
| Accuracy | 93.1% |
|---|
| Cost | 45897 |
|---|
\[\begin{array}{l}
t_0 := \log \left(\mathsf{hypot}\left(x.re, x.im\right)\right)\\
t_1 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
\mathbf{if}\;y.im \leq -340 \lor \neg \left(y.im \leq 5.6 \cdot 10^{+18}\right):\\
\;\;\;\;e^{t_0 \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot t_1\\
\mathbf{else}:\\
\;\;\;\;\frac{\sin \left(\mathsf{fma}\left(t_0, y.im, t_1\right)\right)}{\frac{1}{{\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re}}}\\
\end{array}
\]
| Alternative 3 |
|---|
| Accuracy | 75.2% |
|---|
| Cost | 39620 |
|---|
\[\begin{array}{l}
t_0 := \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im\\
t_1 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
\mathbf{if}\;x.im \leq 2.1 \cdot 10^{-23}:\\
\;\;\;\;e^{\log \left(\mathsf{hypot}\left(x.re, x.im\right)\right) \cdot y.re - t_0} \cdot \sin t_1\\
\mathbf{else}:\\
\;\;\;\;e^{y.re \cdot \log x.im - t_0} \cdot \sin \left(t_1 + y.im \cdot \log x.im\right)\\
\end{array}
\]
| Alternative 4 |
|---|
| Accuracy | 70.8% |
|---|
| Cost | 39560 |
|---|
\[\begin{array}{l}
t_0 := \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im\\
t_1 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
t_2 := e^{\log \left(\mathsf{hypot}\left(x.re, x.im\right)\right) \cdot y.re - t_0}\\
\mathbf{if}\;y.im \leq -8.8 \cdot 10^{-11}:\\
\;\;\;\;t_2 \cdot t_1\\
\mathbf{elif}\;y.im \leq -1.2 \cdot 10^{-62}:\\
\;\;\;\;e^{\left(y.re \cdot \log x.im + \frac{0.5}{x.im} \cdot \frac{y.re \cdot \left(x.re \cdot x.re\right)}{x.im}\right) - t_0} \cdot \sin \left(y.im \cdot \log x.im\right)\\
\mathbf{else}:\\
\;\;\;\;t_2 \cdot \sin t_1\\
\end{array}
\]
| Alternative 5 |
|---|
| Accuracy | 70.5% |
|---|
| Cost | 33801 |
|---|
\[\begin{array}{l}
t_0 := \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im\\
\mathbf{if}\;y.im \leq -1.08 \cdot 10^{-10} \lor \neg \left(y.im \leq -7.5 \cdot 10^{-64}\right):\\
\;\;\;\;e^{\log \left(\mathsf{hypot}\left(x.re, x.im\right)\right) \cdot y.re - t_0} \cdot \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\\
\mathbf{else}:\\
\;\;\;\;e^{\left(y.re \cdot \log x.im + \frac{0.5}{x.im} \cdot \frac{y.re \cdot \left(x.re \cdot x.re\right)}{x.im}\right) - t_0} \cdot \sin \left(y.im \cdot \log x.im\right)\\
\end{array}
\]
| Alternative 6 |
|---|
| Accuracy | 70.3% |
|---|
| Cost | 33161 |
|---|
\[\begin{array}{l}
t_0 := \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im\\
\mathbf{if}\;y.im \leq -5 \cdot 10^{-10} \lor \neg \left(y.im \leq -5 \cdot 10^{-68}\right):\\
\;\;\;\;e^{\log \left(\mathsf{hypot}\left(x.re, x.im\right)\right) \cdot y.re - t_0} \cdot \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\\
\mathbf{else}:\\
\;\;\;\;e^{y.re \cdot \log x.im - t_0} \cdot \sin \left(y.im \cdot \log x.im\right)\\
\end{array}
\]
| Alternative 7 |
|---|
| Accuracy | 57.4% |
|---|
| Cost | 20105 |
|---|
\[\begin{array}{l}
\mathbf{if}\;y.re \leq -210000000 \lor \neg \left(y.re \leq 2.1 \cdot 10^{+112}\right):\\
\;\;\;\;\tan^{-1}_* \frac{x.im}{x.re} \cdot \left(y.re \cdot {x.re}^{y.re}\right)\\
\mathbf{else}:\\
\;\;\;\;\left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot \left(-y.im\right)}\\
\end{array}
\]
| Alternative 8 |
|---|
| Accuracy | 34.5% |
|---|
| Cost | 13248 |
|---|
\[\tan^{-1}_* \frac{x.im}{x.re} \cdot \left(y.re \cdot {x.re}^{y.re}\right)
\]