\[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}\;y.im \leq -9.2 \cdot 10^{-17} \lor \neg \left(y.im \leq 1.8 \cdot 10^{-71}\right):\\
\;\;\;\;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 \sin \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;{\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re} \cdot \sin \left(\mathsf{fma}\left(y.re, \tan^{-1}_* \frac{x.im}{x.re}, y.im \cdot \left(3 \cdot \log \left(\sqrt[3]{\mathsf{hypot}\left(x.im, x.re\right)}\right)\right)\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)))
(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 (or (<= y.im -9.2e-17) (not (<= y.im 1.8e-71)))
(*
(exp (- (* (log (hypot x.re x.im)) y.re) (* (atan2 x.im x.re) y.im)))
(sin (* y.im (log (hypot x.im x.re)))))
(*
(pow (hypot x.re x.im) y.re)
(sin
(fma
y.re
(atan2 x.im x.re)
(* y.im (* 3.0 (log (cbrt (hypot 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))) * 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 ((y_46_im <= -9.2e-17) || !(y_46_im <= 1.8e-71)) {
tmp = exp(((log(hypot(x_46_re, x_46_im)) * 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 = pow(hypot(x_46_re, x_46_im), y_46_re) * sin(fma(y_46_re, atan2(x_46_im, x_46_re), (y_46_im * (3.0 * log(cbrt(hypot(x_46_im, x_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)
tmp = 0.0
if ((y_46_im <= -9.2e-17) || !(y_46_im <= 1.8e-71))
tmp = Float64(exp(Float64(Float64(log(hypot(x_46_re, x_46_im)) * 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((hypot(x_46_re, x_46_im) ^ y_46_re) * sin(fma(y_46_re, atan(x_46_im, x_46_re), Float64(y_46_im * Float64(3.0 * log(cbrt(hypot(x_46_im, x_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_] := If[Or[LessEqual[y$46$im, -9.2e-17], N[Not[LessEqual[y$46$im, 1.8e-71]], $MachinePrecision]], N[(N[Exp[N[(N[(N[Log[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $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[(y$46$im * N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(N[Power[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision], y$46$re], $MachinePrecision] * N[Sin[N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision] + N[(y$46$im * N[(3.0 * N[Log[N[Power[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision], 1/3], $MachinePrecision]], $MachinePrecision]), $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 \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}\;y.im \leq -9.2 \cdot 10^{-17} \lor \neg \left(y.im \leq 1.8 \cdot 10^{-71}\right):\\
\;\;\;\;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 \sin \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;{\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re} \cdot \sin \left(\mathsf{fma}\left(y.re, \tan^{-1}_* \frac{x.im}{x.re}, y.im \cdot \left(3 \cdot \log \left(\sqrt[3]{\mathsf{hypot}\left(x.im, x.re\right)}\right)\right)\right)\right)\\
\end{array}
Alternatives
| Alternative 1 |
|---|
| Error | 3.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 |
|---|
| Error | 3.8 |
|---|
| Cost | 45961 |
|---|
\[\begin{array}{l}
t_0 := \log \left(\mathsf{hypot}\left(x.re, x.im\right)\right)\\
\mathbf{if}\;y.im \leq -1.72 \cdot 10^{-16} \lor \neg \left(y.im \leq 1.8 \cdot 10^{-71}\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}:\\
\;\;\;\;\sin \left(\mathsf{fma}\left(t_0, y.im, y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right) \cdot {\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re}\\
\end{array}
\]
| Alternative 3 |
|---|
| Error | 4.2 |
|---|
| Cost | 45960 |
|---|
\[\begin{array}{l}
t_0 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
t_1 := \log \left(\mathsf{hypot}\left(x.re, x.im\right)\right)\\
t_2 := e^{t_1 \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}\\
\mathbf{if}\;y.im \leq -1300:\\
\;\;\;\;t_2 \cdot t_0\\
\mathbf{elif}\;y.im \leq 5200:\\
\;\;\;\;\sin \left(\mathsf{fma}\left(t_1, y.im, t_0\right)\right) \cdot {\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re}\\
\mathbf{else}:\\
\;\;\;\;t_2 \cdot \sin \left(\left|t_0\right|\right)\\
\end{array}
\]
| Alternative 4 |
|---|
| Error | 4.2 |
|---|
| Cost | 45769 |
|---|
\[\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 -3600 \lor \neg \left(y.im \leq 600\right):\\
\;\;\;\;e^{t_0 \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot t_1\\
\mathbf{else}:\\
\;\;\;\;\sin \left(\mathsf{fma}\left(t_0, y.im, t_1\right)\right) \cdot {\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re}\\
\end{array}
\]
| Alternative 5 |
|---|
| Error | 13.1 |
|---|
| Cost | 39692 |
|---|
\[\begin{array}{l}
t_0 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
t_1 := \sin t_0\\
t_2 := 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}\\
t_3 := t_2 \cdot t_0\\
t_4 := {\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re}\\
t_5 := \sin \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right) \cdot t_4\\
\mathbf{if}\;y.im \leq -13000:\\
\;\;\;\;t_3\\
\mathbf{elif}\;y.im \leq -2.05 \cdot 10^{-138}:\\
\;\;\;\;t_5\\
\mathbf{elif}\;y.im \leq -3 \cdot 10^{-182}:\\
\;\;\;\;t_2 \cdot t_1\\
\mathbf{elif}\;y.im \leq -5.1 \cdot 10^{-301}:\\
\;\;\;\;t_5\\
\mathbf{elif}\;y.im \leq 3.6 \cdot 10^{-233}:\\
\;\;\;\;t_4 \cdot t_1\\
\mathbf{elif}\;y.im \leq 1850:\\
\;\;\;\;t_5\\
\mathbf{else}:\\
\;\;\;\;t_3\\
\end{array}
\]
| Alternative 6 |
|---|
| Error | 13.1 |
|---|
| Cost | 33688 |
|---|
\[\begin{array}{l}
t_0 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
t_1 := 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 t_0\\
t_2 := {\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re}\\
t_3 := t_2 \cdot \sin t_0\\
t_4 := \sin \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right) \cdot t_2\\
\mathbf{if}\;y.im \leq -240:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y.im \leq -2.05 \cdot 10^{-138}:\\
\;\;\;\;t_4\\
\mathbf{elif}\;y.im \leq -3 \cdot 10^{-182}:\\
\;\;\;\;t_3\\
\mathbf{elif}\;y.im \leq -5.1 \cdot 10^{-301}:\\
\;\;\;\;t_4\\
\mathbf{elif}\;y.im \leq 1.05 \cdot 10^{-232}:\\
\;\;\;\;t_3\\
\mathbf{elif}\;y.im \leq 500:\\
\;\;\;\;t_4\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\]
| Alternative 7 |
|---|
| Error | 21.6 |
|---|
| Cost | 33492 |
|---|
\[\begin{array}{l}
t_0 := \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\\
t_1 := {\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re}\\
t_2 := t_1 \cdot t_0\\
t_3 := \sin \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right) \cdot t_1\\
\mathbf{if}\;y.im \leq -6.5 \cdot 10^{-136}:\\
\;\;\;\;t_3\\
\mathbf{elif}\;y.im \leq -8 \cdot 10^{-183}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;y.im \leq -5.1 \cdot 10^{-301}:\\
\;\;\;\;t_3\\
\mathbf{elif}\;y.im \leq 8.2 \cdot 10^{-233}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;y.im \leq 1.2 \cdot 10^{+87}:\\
\;\;\;\;t_3\\
\mathbf{else}:\\
\;\;\;\;t_0 \cdot e^{y.re \cdot \log x.im - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}\\
\end{array}
\]
| Alternative 8 |
|---|
| Error | 23.9 |
|---|
| Cost | 26377 |
|---|
\[\begin{array}{l}
\mathbf{if}\;y.re \leq -7.2 \cdot 10^{-98} \lor \neg \left(y.re \leq 4.8 \cdot 10^{-43}\right):\\
\;\;\;\;{\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re} \cdot \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\\
\mathbf{else}:\\
\;\;\;\;\sin \left(\log \left(\mathsf{hypot}\left(x.re, x.im\right)\right) \cdot y.im\right)\\
\end{array}
\]
| Alternative 9 |
|---|
| Error | 37.1 |
|---|
| Cost | 19721 |
|---|
\[\begin{array}{l}
\mathbf{if}\;y.re \leq -3.4 \cdot 10^{-20} \lor \neg \left(y.re \leq 9.5\right):\\
\;\;\;\;\log \left({\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.im}\right)\\
\mathbf{else}:\\
\;\;\;\;\sin \left(\log \left(\mathsf{hypot}\left(x.re, x.im\right)\right) \cdot y.im\right)\\
\end{array}
\]
| Alternative 10 |
|---|
| Error | 46.6 |
|---|
| Cost | 19657 |
|---|
\[\begin{array}{l}
\mathbf{if}\;y.re \leq -1.75 \cdot 10^{-88} \lor \neg \left(y.re \leq 3.2 \cdot 10^{-43}\right):\\
\;\;\;\;\log \left({\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.im}\right)\\
\mathbf{else}:\\
\;\;\;\;\sin \left(y.im \cdot \log x.re\right)\\
\end{array}
\]
| Alternative 11 |
|---|
| Error | 54.0 |
|---|
| Cost | 14288 |
|---|
\[\begin{array}{l}
t_0 := y.im \cdot \log x.re\\
\mathbf{if}\;x.im \leq -1.55 \cdot 10^{+136}:\\
\;\;\;\;\sin \left(y.im \cdot \log \left(\frac{x.re \cdot -0.5}{\frac{x.im}{x.re}} - x.im\right)\right)\\
\mathbf{elif}\;x.im \leq -1.6 \cdot 10^{-132}:\\
\;\;\;\;\sin t_0\\
\mathbf{elif}\;x.im \leq -2.8 \cdot 10^{-220}:\\
\;\;\;\;\sin \left(y.im \cdot \log \left(-x.re\right)\right)\\
\mathbf{elif}\;x.im \leq 3.4 \cdot 10^{-147}:\\
\;\;\;\;\sin \left(\frac{y.im \cdot 0.5}{\frac{x.re}{x.im} \cdot \frac{x.re}{x.im}} + t_0\right)\\
\mathbf{else}:\\
\;\;\;\;\sin \left(y.im \cdot \log x.im\right)\\
\end{array}
\]
| Alternative 12 |
|---|
| Error | 53.9 |
|---|
| Cost | 13636 |
|---|
\[\begin{array}{l}
t_0 := \sin \left(y.im \cdot \log x.re\right)\\
\mathbf{if}\;x.im \leq -1 \cdot 10^{+138}:\\
\;\;\;\;\sin \left(y.im \cdot \log \left(\frac{x.re \cdot -0.5}{\frac{x.im}{x.re}} - x.im\right)\right)\\
\mathbf{elif}\;x.im \leq -1.9 \cdot 10^{-132}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;x.im \leq -7.5 \cdot 10^{-220}:\\
\;\;\;\;\sin \left(y.im \cdot \log \left(-x.re\right)\right)\\
\mathbf{elif}\;x.im \leq 5.8 \cdot 10^{-147}:\\
\;\;\;\;t_0\\
\mathbf{else}:\\
\;\;\;\;\sin \left(y.im \cdot \log x.im\right)\\
\end{array}
\]
| Alternative 13 |
|---|
| Error | 53.8 |
|---|
| Cost | 13520 |
|---|
\[\begin{array}{l}
t_0 := \sin \left(y.im \cdot \log x.re\right)\\
\mathbf{if}\;x.im \leq -1.8 \cdot 10^{+107}:\\
\;\;\;\;\sin \left(y.im \cdot \log \left(-x.im\right)\right)\\
\mathbf{elif}\;x.im \leq -6.4 \cdot 10^{-133}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;x.im \leq -1.36 \cdot 10^{-223}:\\
\;\;\;\;\sin \left(y.im \cdot \log \left(-x.re\right)\right)\\
\mathbf{elif}\;x.im \leq 8 \cdot 10^{-148}:\\
\;\;\;\;t_0\\
\mathbf{else}:\\
\;\;\;\;\sin \left(y.im \cdot \log x.im\right)\\
\end{array}
\]
| Alternative 14 |
|---|
| Error | 53.3 |
|---|
| Cost | 13256 |
|---|
\[\begin{array}{l}
\mathbf{if}\;x.im \leq -2 \cdot 10^{+107}:\\
\;\;\;\;\sin \left(y.im \cdot \log \left(-x.im\right)\right)\\
\mathbf{elif}\;x.im \leq 8 \cdot 10^{-145}:\\
\;\;\;\;\sin \left(y.im \cdot \log x.re\right)\\
\mathbf{else}:\\
\;\;\;\;\sin \left(y.im \cdot \log x.im\right)\\
\end{array}
\]
| Alternative 15 |
|---|
| Error | 54.7 |
|---|
| Cost | 13124 |
|---|
\[\begin{array}{l}
\mathbf{if}\;x.im \leq 7 \cdot 10^{-147}:\\
\;\;\;\;\sin \left(y.im \cdot \log x.re\right)\\
\mathbf{else}:\\
\;\;\;\;\sin \left(y.im \cdot \log x.im\right)\\
\end{array}
\]
| Alternative 16 |
|---|
| Error | 59.4 |
|---|
| Cost | 12992 |
|---|
\[\sin \left(y.im \cdot \log x.im\right)
\]