\[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 := y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
t_1 := \log \left(\mathsf{hypot}\left(x.re, x.im\right)\right)\\
t_2 := t_1 \cdot y.re\\
t_3 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
\mathbf{if}\;y.im \leq -7500000000000:\\
\;\;\;\;e^{t_2 - t_0} \cdot \sin \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right)\\
\mathbf{elif}\;y.im \leq 4800000:\\
\;\;\;\;\sin \left(\mathsf{fma}\left(t_1, y.im, t_3\right)\right) \cdot \frac{{\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re}}{t_0 + 1}\\
\mathbf{else}:\\
\;\;\;\;e^{t_2 - \sqrt{{t_0}^{2}}} \cdot \sin t_3\\
\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 (* y.im (atan2 x.im x.re)))
(t_1 (log (hypot x.re x.im)))
(t_2 (* t_1 y.re))
(t_3 (* y.re (atan2 x.im x.re))))
(if (<= y.im -7500000000000.0)
(* (exp (- t_2 t_0)) (sin (* y.im (log (hypot x.im x.re)))))
(if (<= y.im 4800000.0)
(*
(sin (fma t_1 y.im t_3))
(/ (pow (hypot x.re x.im) y.re) (+ t_0 1.0)))
(* (exp (- t_2 (sqrt (pow t_0 2.0)))) (sin t_3))))))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 = y_46_im * atan2(x_46_im, x_46_re);
double t_1 = log(hypot(x_46_re, x_46_im));
double t_2 = t_1 * y_46_re;
double t_3 = y_46_re * atan2(x_46_im, x_46_re);
double tmp;
if (y_46_im <= -7500000000000.0) {
tmp = exp((t_2 - t_0)) * sin((y_46_im * log(hypot(x_46_im, x_46_re))));
} else if (y_46_im <= 4800000.0) {
tmp = sin(fma(t_1, y_46_im, t_3)) * (pow(hypot(x_46_re, x_46_im), y_46_re) / (t_0 + 1.0));
} else {
tmp = exp((t_2 - sqrt(pow(t_0, 2.0)))) * sin(t_3);
}
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 = Float64(y_46_im * atan(x_46_im, x_46_re))
t_1 = log(hypot(x_46_re, x_46_im))
t_2 = Float64(t_1 * y_46_re)
t_3 = Float64(y_46_re * atan(x_46_im, x_46_re))
tmp = 0.0
if (y_46_im <= -7500000000000.0)
tmp = Float64(exp(Float64(t_2 - t_0)) * sin(Float64(y_46_im * log(hypot(x_46_im, x_46_re)))));
elseif (y_46_im <= 4800000.0)
tmp = Float64(sin(fma(t_1, y_46_im, t_3)) * Float64((hypot(x_46_re, x_46_im) ^ y_46_re) / Float64(t_0 + 1.0)));
else
tmp = Float64(exp(Float64(t_2 - sqrt((t_0 ^ 2.0)))) * sin(t_3));
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[(y$46$im * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[Log[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision]], $MachinePrecision]}, Block[{t$95$2 = N[(t$95$1 * y$46$re), $MachinePrecision]}, Block[{t$95$3 = N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y$46$im, -7500000000000.0], N[(N[Exp[N[(t$95$2 - t$95$0), $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], If[LessEqual[y$46$im, 4800000.0], N[(N[Sin[N[(t$95$1 * y$46$im + t$95$3), $MachinePrecision]], $MachinePrecision] * N[(N[Power[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision], y$46$re], $MachinePrecision] / N[(t$95$0 + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[Exp[N[(t$95$2 - N[Sqrt[N[Power[t$95$0, 2.0], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Sin[t$95$3], $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 := y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
t_1 := \log \left(\mathsf{hypot}\left(x.re, x.im\right)\right)\\
t_2 := t_1 \cdot y.re\\
t_3 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
\mathbf{if}\;y.im \leq -7500000000000:\\
\;\;\;\;e^{t_2 - t_0} \cdot \sin \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right)\\
\mathbf{elif}\;y.im \leq 4800000:\\
\;\;\;\;\sin \left(\mathsf{fma}\left(t_1, y.im, t_3\right)\right) \cdot \frac{{\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re}}{t_0 + 1}\\
\mathbf{else}:\\
\;\;\;\;e^{t_2 - \sqrt{{t_0}^{2}}} \cdot \sin t_3\\
\end{array}
Alternatives
| Alternative 1 |
|---|
| Accuracy | 61.1% |
|---|
| Cost | 71552 |
|---|
\[\begin{array}{l}
t_0 := \log \left(\mathsf{hypot}\left(x.re, x.im\right)\right)\\
e^{t_0 \cdot y.re - \sqrt{{\left(y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)}^{2}}} \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 | 61.1% |
|---|
| Cost | 58688 |
|---|
\[\begin{array}{l}
t_0 := \log \left(\mathsf{hypot}\left(x.re, x.im\right)\right)\\
\sin \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 - y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}}
\end{array}
\]
| Alternative 3 |
|---|
| Accuracy | 60.6% |
|---|
| Cost | 52424 |
|---|
\[\begin{array}{l}
t_0 := y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
t_1 := \log \left(\mathsf{hypot}\left(x.re, x.im\right)\right)\\
t_2 := t_1 \cdot y.re\\
t_3 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
\mathbf{if}\;y.im \leq -1050000000000:\\
\;\;\;\;e^{t_2 - t_0} \cdot \sin \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right)\\
\mathbf{elif}\;y.im \leq 110000:\\
\;\;\;\;\frac{\sin \left(\mathsf{fma}\left(t_1, y.im, t_3\right)\right)}{\frac{1}{{\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re}}}\\
\mathbf{else}:\\
\;\;\;\;e^{t_2 - \sqrt{{t_0}^{2}}} \cdot \sin t_3\\
\end{array}
\]
| Alternative 4 |
|---|
| Accuracy | 60.6% |
|---|
| Cost | 45961 |
|---|
\[\begin{array}{l}
t_0 := \log \left(\mathsf{hypot}\left(x.re, x.im\right)\right)\\
\mathbf{if}\;y.im \leq -1050000000000 \lor \neg \left(y.im \leq 5 \cdot 10^{-65}\right):\\
\;\;\;\;e^{t_0 \cdot y.re - y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}} \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}
\]
| Alternative 5 |
|---|
| Accuracy | 60.5% |
|---|
| 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 -1200000000000 \lor \neg \left(y.im \leq 5900\right):\\
\;\;\;\;e^{t_0 \cdot y.re - y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}} \cdot \sin 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 6 |
|---|
| Accuracy | 48.8% |
|---|
| Cost | 39876 |
|---|
\[\begin{array}{l}
t_0 := y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
\mathbf{if}\;x.re \leq 2.16 \cdot 10^{-41}:\\
\;\;\;\;e^{\log \left(\mathsf{hypot}\left(x.re, x.im\right)\right) \cdot y.re - t_0} \cdot \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\\
\mathbf{else}:\\
\;\;\;\;\sin \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right) \cdot e^{y.re \cdot \log \left(x.re + 0.5 \cdot \frac{x.im \cdot x.im}{x.re}\right) - t_0}\\
\end{array}
\]
| Alternative 7 |
|---|
| Accuracy | 46.2% |
|---|
| Cost | 39296 |
|---|
\[e^{\log \left(\mathsf{hypot}\left(x.re, x.im\right)\right) \cdot y.re - y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}} \cdot \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)
\]
| Alternative 8 |
|---|
| Accuracy | 42.7% |
|---|
| Cost | 26377 |
|---|
\[\begin{array}{l}
\mathbf{if}\;y.im \leq -8 \cdot 10^{+44} \lor \neg \left(y.im \leq 1.2 \cdot 10^{+45}\right):\\
\;\;\;\;y.re \cdot \frac{\tan^{-1}_* \frac{x.im}{x.re}}{{\left(e^{y.im}\right)}^{\tan^{-1}_* \frac{x.im}{x.re}}}\\
\mathbf{else}:\\
\;\;\;\;\sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re}\\
\end{array}
\]
| Alternative 9 |
|---|
| Accuracy | 31.3% |
|---|
| Cost | 26112 |
|---|
\[y.re \cdot \frac{\tan^{-1}_* \frac{x.im}{x.re}}{{\left(e^{y.im}\right)}^{\tan^{-1}_* \frac{x.im}{x.re}}}
\]
| Alternative 10 |
|---|
| Accuracy | 31.2% |
|---|
| Cost | 19972 |
|---|
\[\begin{array}{l}
\mathbf{if}\;y.re \leq -4.8 \cdot 10^{+162}:\\
\;\;\;\;0.5 \cdot \left(y.re \cdot \left(\left(y.im \cdot y.im\right) \cdot {\tan^{-1}_* \frac{x.im}{x.re}}^{3}\right)\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 11 |
|---|
| Accuracy | 21.6% |
|---|
| Cost | 19785 |
|---|
\[\begin{array}{l}
\mathbf{if}\;y.re \leq -1.55 \cdot 10^{+29} \lor \neg \left(y.re \leq 8.5 \cdot 10^{+100}\right):\\
\;\;\;\;0.5 \cdot \left(y.re \cdot \left(\left(y.im \cdot y.im\right) \cdot {\tan^{-1}_* \frac{x.im}{x.re}}^{3}\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\sqrt[3]{{\left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)}^{3}}\\
\end{array}
\]
| Alternative 12 |
|---|
| Accuracy | 19.0% |
|---|
| Cost | 13769 |
|---|
\[\begin{array}{l}
\mathbf{if}\;y.re \leq -0.000105 \lor \neg \left(y.re \leq 1.75 \cdot 10^{+141}\right):\\
\;\;\;\;0.5 \cdot \left(y.re \cdot \left(\left(y.im \cdot y.im\right) \cdot {\tan^{-1}_* \frac{x.im}{x.re}}^{3}\right)\right)\\
\mathbf{else}:\\
\;\;\;\;y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
\end{array}
\]
| Alternative 13 |
|---|
| Accuracy | 13.6% |
|---|
| Cost | 6656 |
|---|
\[y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}
\]