\[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 := \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im\\
t_1 := \log \left(\mathsf{hypot}\left(x.re, x.im\right)\right)\\
t_2 := e^{t_1 \cdot y.re - t_0}\\
\mathbf{if}\;y.im \leq -200000:\\
\;\;\;\;t_2 \cdot \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\\
\mathbf{elif}\;y.im \leq 1.4 \cdot 10^{-8}:\\
\;\;\;\;\frac{{\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re}}{t_0 + 1} \cdot \sin \left(\mathsf{fma}\left(y.re, \tan^{-1}_* \frac{x.im}{x.re}, t_1 \cdot y.im\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t_2 \cdot {\left(\sqrt[3]{\sin \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right)}\right)}^{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 (* (atan2 x.im x.re) y.im))
(t_1 (log (hypot x.re x.im)))
(t_2 (exp (- (* t_1 y.re) t_0))))
(if (<= y.im -200000.0)
(* t_2 (* y.re (atan2 x.im x.re)))
(if (<= y.im 1.4e-8)
(*
(/ (pow (hypot x.re x.im) y.re) (+ t_0 1.0))
(sin (fma y.re (atan2 x.im x.re) (* t_1 y.im))))
(* t_2 (pow (cbrt (sin (* y.im (log (hypot x.im x.re))))) 3.0))))))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 = atan2(x_46_im, x_46_re) * y_46_im;
double t_1 = log(hypot(x_46_re, x_46_im));
double t_2 = exp(((t_1 * y_46_re) - t_0));
double tmp;
if (y_46_im <= -200000.0) {
tmp = t_2 * (y_46_re * atan2(x_46_im, x_46_re));
} else if (y_46_im <= 1.4e-8) {
tmp = (pow(hypot(x_46_re, x_46_im), y_46_re) / (t_0 + 1.0)) * sin(fma(y_46_re, atan2(x_46_im, x_46_re), (t_1 * y_46_im)));
} else {
tmp = t_2 * pow(cbrt(sin((y_46_im * log(hypot(x_46_im, x_46_re))))), 3.0);
}
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(atan(x_46_im, x_46_re) * y_46_im)
t_1 = log(hypot(x_46_re, x_46_im))
t_2 = exp(Float64(Float64(t_1 * y_46_re) - t_0))
tmp = 0.0
if (y_46_im <= -200000.0)
tmp = Float64(t_2 * Float64(y_46_re * atan(x_46_im, x_46_re)));
elseif (y_46_im <= 1.4e-8)
tmp = Float64(Float64((hypot(x_46_re, x_46_im) ^ y_46_re) / Float64(t_0 + 1.0)) * sin(fma(y_46_re, atan(x_46_im, x_46_re), Float64(t_1 * y_46_im))));
else
tmp = Float64(t_2 * (cbrt(sin(Float64(y_46_im * log(hypot(x_46_im, x_46_re))))) ^ 3.0));
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[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$im), $MachinePrecision]}, Block[{t$95$1 = N[Log[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision]], $MachinePrecision]}, Block[{t$95$2 = N[Exp[N[(N[(t$95$1 * y$46$re), $MachinePrecision] - t$95$0), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[y$46$im, -200000.0], N[(t$95$2 * N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$im, 1.4e-8], N[(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] * N[Sin[N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision] + N[(t$95$1 * y$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(t$95$2 * N[Power[N[Power[N[Sin[N[(y$46$im * N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision], 1/3], $MachinePrecision], 3.0], $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 := \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im\\
t_1 := \log \left(\mathsf{hypot}\left(x.re, x.im\right)\right)\\
t_2 := e^{t_1 \cdot y.re - t_0}\\
\mathbf{if}\;y.im \leq -200000:\\
\;\;\;\;t_2 \cdot \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\\
\mathbf{elif}\;y.im \leq 1.4 \cdot 10^{-8}:\\
\;\;\;\;\frac{{\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re}}{t_0 + 1} \cdot \sin \left(\mathsf{fma}\left(y.re, \tan^{-1}_* \frac{x.im}{x.re}, t_1 \cdot y.im\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t_2 \cdot {\left(\sqrt[3]{\sin \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right)}\right)}^{3}\\
\end{array}
Alternatives
| Alternative 1 |
|---|
| Error | 3.4 |
|---|
| 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.9 |
|---|
| Cost | 52617 |
|---|
\[\begin{array}{l}
t_0 := \log \left(\mathsf{hypot}\left(x.re, x.im\right)\right)\\
t_1 := \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im\\
\mathbf{if}\;y.im \leq -35000 \lor \neg \left(y.im \leq 30000\right):\\
\;\;\;\;e^{t_0 \cdot y.re - t_1} \cdot \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{{\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re}}{t_1 + 1} \cdot \sin \left(\mathsf{fma}\left(y.re, \tan^{-1}_* \frac{x.im}{x.re}, t_0 \cdot y.im\right)\right)\\
\end{array}
\]
| Alternative 3 |
|---|
| Error | 4.1 |
|---|
| Cost | 45896 |
|---|
\[\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}\\
\mathbf{if}\;y.re \leq -8.5 \cdot 10^{-11}:\\
\;\;\;\;t_1 \cdot t_0\\
\mathbf{elif}\;y.re \leq 8.2 \cdot 10^{-53}:\\
\;\;\;\;e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot \left(-y.im\right)} \cdot \sin \left(\mathsf{fma}\left(y.im, \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right), t_0\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t_1 \cdot \sin t_0\\
\end{array}
\]
| Alternative 4 |
|---|
| Error | 4.1 |
|---|
| Cost | 45896 |
|---|
\[\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.re \leq -9.8 \cdot 10^{-11}:\\
\;\;\;\;t_2 \cdot t_0\\
\mathbf{elif}\;y.re \leq 8.2 \cdot 10^{-53}:\\
\;\;\;\;\sin \left(\mathsf{fma}\left(y.re, \tan^{-1}_* \frac{x.im}{x.re}, t_1 \cdot y.im\right)\right) \cdot e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot \left(-y.im\right)}\\
\mathbf{else}:\\
\;\;\;\;t_2 \cdot \sin t_0\\
\end{array}
\]
| Alternative 5 |
|---|
| Error | 13.4 |
|---|
| Cost | 45832 |
|---|
\[\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.re \leq -2.8 \cdot 10^{-16}:\\
\;\;\;\;t_2 \cdot t_1\\
\mathbf{elif}\;y.re \leq 4.8 \cdot 10^{-82}:\\
\;\;\;\;\sin \left(\mathsf{fma}\left(y.im, \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right), t_1\right)\right) \cdot e^{t_0}\\
\mathbf{else}:\\
\;\;\;\;t_2 \cdot \sin t_1\\
\end{array}
\]
| Alternative 6 |
|---|
| Error | 4.1 |
|---|
| Cost | 45769 |
|---|
\[\begin{array}{l}
t_0 := \log \left(\mathsf{hypot}\left(x.re, x.im\right)\right)\\
\mathbf{if}\;y.im \leq -4200000 \lor \neg \left(y.im \leq 300\right):\\
\;\;\;\;e^{t_0 \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)\\
\mathbf{else}:\\
\;\;\;\;\sin \left(\mathsf{fma}\left(y.re, \tan^{-1}_* \frac{x.im}{x.re}, t_0 \cdot y.im\right)\right) \cdot {\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re}\\
\end{array}
\]
| Alternative 7 |
|---|
| Error | 11.7 |
|---|
| Cost | 39824 |
|---|
\[\begin{array}{l}
t_0 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
t_1 := e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot \left(-y.im\right)}\\
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 := y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\\
t_4 := \sin t_3 \cdot t_1\\
\mathbf{if}\;y.re \leq -2.7 \cdot 10^{-44}:\\
\;\;\;\;t_2 \cdot t_0\\
\mathbf{elif}\;y.re \leq 2.75 \cdot 10^{-126}:\\
\;\;\;\;t_4\\
\mathbf{elif}\;y.re \leq 5 \cdot 10^{-90}:\\
\;\;\;\;t_1 \cdot \sin \left(t_0 - t_3\right)\\
\mathbf{elif}\;y.re \leq 1.05 \cdot 10^{-54}:\\
\;\;\;\;t_4\\
\mathbf{else}:\\
\;\;\;\;t_2 \cdot \sin t_0\\
\end{array}
\]
| Alternative 8 |
|---|
| Error | 11.3 |
|---|
| Cost | 39560 |
|---|
\[\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}\\
\mathbf{if}\;y.re \leq -2.55 \cdot 10^{-44}:\\
\;\;\;\;t_1 \cdot t_0\\
\mathbf{elif}\;y.re \leq 2.6 \cdot 10^{-126}:\\
\;\;\;\;\sin \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right) \cdot e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot \left(-y.im\right)}\\
\mathbf{else}:\\
\;\;\;\;t_1 \cdot \sin t_0\\
\end{array}
\]
| Alternative 9 |
|---|
| Error | 27.2 |
|---|
| Cost | 33624 |
|---|
\[\begin{array}{l}
t_0 := e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot \left(-y.im\right)}\\
t_1 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
t_2 := \sin t_1\\
t_3 := t_2 \cdot e^{y.re \cdot \log x.im - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}\\
t_4 := t_0 \cdot t_2\\
t_5 := \sin \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right) \cdot t_0\\
\mathbf{if}\;y.re \leq -4.4 \cdot 10^{+74}:\\
\;\;\;\;t_4\\
\mathbf{elif}\;y.re \leq -6.2 \cdot 10^{+31}:\\
\;\;\;\;t_3\\
\mathbf{elif}\;y.re \leq -2.4 \cdot 10^{-44}:\\
\;\;\;\;t_4\\
\mathbf{elif}\;y.re \leq 2.75 \cdot 10^{-126}:\\
\;\;\;\;t_5\\
\mathbf{elif}\;y.re \leq 3.5 \cdot 10^{-88}:\\
\;\;\;\;t_1 \cdot t_0\\
\mathbf{elif}\;y.re \leq 1.55 \cdot 10^{+32}:\\
\;\;\;\;t_5\\
\mathbf{else}:\\
\;\;\;\;t_3\\
\end{array}
\]
| Alternative 10 |
|---|
| Error | 29.3 |
|---|
| Cost | 33566 |
|---|
\[\begin{array}{l}
t_0 := e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot \left(-y.im\right)}\\
t_1 := \sin \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right) \cdot t_0\\
t_2 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
\mathbf{if}\;x.re \leq -6.2 \cdot 10^{+84}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;x.re \leq -1.25 \cdot 10^{-64}:\\
\;\;\;\;t_0 \cdot \sin t_2\\
\mathbf{elif}\;x.re \leq 2.9 \cdot 10^{-224} \lor \neg \left(x.re \leq 1.95 \cdot 10^{-141}\right) \land \left(x.re \leq 6.6 \cdot 10^{+19} \lor \neg \left(x.re \leq 2.1 \cdot 10^{+167}\right) \land x.re \leq 1.45 \cdot 10^{+256}\right):\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;t_2 \cdot e^{y.re \cdot \log x.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}\\
\end{array}
\]
| Alternative 11 |
|---|
| Error | 11.4 |
|---|
| Cost | 33161 |
|---|
\[\begin{array}{l}
\mathbf{if}\;y.re \leq -6.2 \cdot 10^{-44} \lor \neg \left(y.re \leq 3.3 \cdot 10^{-126}\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 \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^{\tan^{-1}_* \frac{x.im}{x.re} \cdot \left(-y.im\right)}\\
\end{array}
\]
| Alternative 12 |
|---|
| Error | 27.9 |
|---|
| Cost | 26564 |
|---|
\[\begin{array}{l}
t_0 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
\mathbf{if}\;x.re \leq 5 \cdot 10^{-307}:\\
\;\;\;\;e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot \left(-y.im\right)} \cdot \sin t_0\\
\mathbf{else}:\\
\;\;\;\;t_0 \cdot e^{y.re \cdot \log x.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}\\
\end{array}
\]
| Alternative 13 |
|---|
| Error | 33.4 |
|---|
| Cost | 26240 |
|---|
\[e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot \left(-y.im\right)} \cdot \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)
\]
| Alternative 14 |
|---|
| Error | 33.5 |
|---|
| Cost | 19840 |
|---|
\[\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)}
\]
| Alternative 15 |
|---|
| Error | 50.6 |
|---|
| Cost | 13056 |
|---|
\[\sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)
\]