\[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 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
t_2 := e^{y.re \cdot \log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) - t_0} \cdot t_1\\
\mathbf{if}\;y.re \leq -3.259542716421978 \cdot 10^{-21}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;y.re \leq 4.8 \cdot 10^{+43}:\\
\;\;\;\;\frac{1}{e^{t_0}} \cdot \sin \left(\mathsf{fma}\left(\log \left(\mathsf{hypot}\left(x.re, x.im\right)\right), y.im, t_1\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\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 (* y.re (atan2 x.im x.re)))
(t_2
(*
(exp (- (* y.re (log (sqrt (+ (* x.re x.re) (* x.im x.im))))) t_0))
t_1)))
(if (<= y.re -3.259542716421978e-21)
t_2
(if (<= y.re 4.8e+43)
(* (/ 1.0 (exp t_0)) (sin (fma (log (hypot x.re x.im)) y.im t_1)))
t_2))))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 = y_46_re * atan2(x_46_im, x_46_re);
double t_2 = exp(((y_46_re * log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))) - t_0)) * t_1;
double tmp;
if (y_46_re <= -3.259542716421978e-21) {
tmp = t_2;
} else if (y_46_re <= 4.8e+43) {
tmp = (1.0 / exp(t_0)) * sin(fma(log(hypot(x_46_re, x_46_im)), y_46_im, t_1));
} else {
tmp = t_2;
}
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 = Float64(y_46_re * atan(x_46_im, x_46_re))
t_2 = Float64(exp(Float64(Float64(y_46_re * log(sqrt(Float64(Float64(x_46_re * x_46_re) + Float64(x_46_im * x_46_im))))) - t_0)) * t_1)
tmp = 0.0
if (y_46_re <= -3.259542716421978e-21)
tmp = t_2;
elseif (y_46_re <= 4.8e+43)
tmp = Float64(Float64(1.0 / exp(t_0)) * sin(fma(log(hypot(x_46_re, x_46_im)), y_46_im, t_1)));
else
tmp = t_2;
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[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[Exp[N[(N[(y$46$re * N[Log[N[Sqrt[N[(N[(x$46$re * x$46$re), $MachinePrecision] + N[(x$46$im * x$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]], $MachinePrecision] * t$95$1), $MachinePrecision]}, If[LessEqual[y$46$re, -3.259542716421978e-21], t$95$2, If[LessEqual[y$46$re, 4.8e+43], N[(N[(1.0 / N[Exp[t$95$0], $MachinePrecision]), $MachinePrecision] * N[Sin[N[(N[Log[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision]], $MachinePrecision] * y$46$im + t$95$1), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], t$95$2]]]]]
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 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
t_2 := e^{y.re \cdot \log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) - t_0} \cdot t_1\\
\mathbf{if}\;y.re \leq -3.259542716421978 \cdot 10^{-21}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;y.re \leq 4.8 \cdot 10^{+43}:\\
\;\;\;\;\frac{1}{e^{t_0}} \cdot \sin \left(\mathsf{fma}\left(\log \left(\mathsf{hypot}\left(x.re, x.im\right)\right), y.im, t_1\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
Alternatives
| Alternative 1 |
|---|
| Error | 8.8 |
|---|
| Cost | 45768 |
|---|
\[\begin{array}{l}
t_0 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
t_1 := e^{y.re \cdot \log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot t_0\\
\mathbf{if}\;y.im \leq -1.4 \cdot 10^{+29}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y.im \leq 3.8 \cdot 10^{+37}:\\
\;\;\;\;\sin \left(\mathsf{fma}\left(\log \left(\mathsf{hypot}\left(x.re, x.im\right)\right), y.im, t_0\right)\right) \cdot {\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re}\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\]
| Alternative 2 |
|---|
| Error | 23.6 |
|---|
| Cost | 40008 |
|---|
\[\begin{array}{l}
t_0 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
t_1 := {\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re}\\
t_2 := \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im\\
\mathbf{if}\;x.im \leq -2.2 \cdot 10^{+85}:\\
\;\;\;\;e^{y.re \cdot \log \left(-x.im\right) - t_2} \cdot \sin t_0\\
\mathbf{elif}\;x.im \leq -2.6 \cdot 10^{-198}:\\
\;\;\;\;\left(t_1 \cdot \left(1 - t_2\right)\right) \cdot \sin \left(t_0 - y.im \cdot \log \left(\frac{-1}{x.im}\right)\right)\\
\mathbf{elif}\;x.im \leq 6.5 \cdot 10^{-219}:\\
\;\;\;\;e^{y.re \cdot \log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) - t_2} \cdot t_0\\
\mathbf{else}:\\
\;\;\;\;t_1 \cdot \sin \left(t_0 + y.im \cdot \log x.im\right)\\
\end{array}
\]
| Alternative 3 |
|---|
| Error | 23.7 |
|---|
| Cost | 33612 |
|---|
\[\begin{array}{l}
t_0 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
t_1 := {\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re}\\
t_2 := \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im\\
\mathbf{if}\;x.im \leq -2.2 \cdot 10^{+85}:\\
\;\;\;\;e^{y.re \cdot \log \left(-x.im\right) - t_2} \cdot \sin t_0\\
\mathbf{elif}\;x.im \leq -2.6 \cdot 10^{-198}:\\
\;\;\;\;t_1 \cdot \sin \left(t_0 - y.im \cdot \log \left(\frac{-1}{x.im}\right)\right)\\
\mathbf{elif}\;x.im \leq 6.5 \cdot 10^{-219}:\\
\;\;\;\;e^{y.re \cdot \log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) - t_2} \cdot t_0\\
\mathbf{else}:\\
\;\;\;\;t_1 \cdot \sin \left(t_0 + y.im \cdot \log x.im\right)\\
\end{array}
\]
| Alternative 4 |
|---|
| Error | 23.5 |
|---|
| Cost | 33160 |
|---|
\[\begin{array}{l}
t_0 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
t_1 := {\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re}\\
\mathbf{if}\;x.im \leq -2.2 \cdot 10^{+85}:\\
\;\;\;\;e^{y.re \cdot \log \left(-x.im\right) - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \sin t_0\\
\mathbf{elif}\;x.im \leq 0:\\
\;\;\;\;t_1 \cdot \sin \left(t_0 - y.im \cdot \log \left(\frac{-1}{x.im}\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t_1 \cdot \sin \left(t_0 + y.im \cdot \log x.im\right)\\
\end{array}
\]
| Alternative 5 |
|---|
| Error | 24.4 |
|---|
| Cost | 33028 |
|---|
\[\begin{array}{l}
t_0 := {\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re}\\
t_1 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
\mathbf{if}\;x.im \leq 0:\\
\;\;\;\;t_0 \cdot \sin \left(t_1 - y.im \cdot \log \left(\frac{-1}{x.im}\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t_0 \cdot \sin \left(t_1 + y.im \cdot \log x.im\right)\\
\end{array}
\]
| Alternative 6 |
|---|
| Error | 27.6 |
|---|
| Cost | 32900 |
|---|
\[\begin{array}{l}
t_0 := {\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re}\\
t_1 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
\mathbf{if}\;x.im \leq 7.5 \cdot 10^{-218}:\\
\;\;\;\;t_0 \cdot \sin t_1\\
\mathbf{else}:\\
\;\;\;\;t_0 \cdot \sin \left(t_1 + y.im \cdot \log x.im\right)\\
\end{array}
\]
| Alternative 7 |
|---|
| Error | 28.4 |
|---|
| Cost | 26436 |
|---|
\[\begin{array}{l}
t_0 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
\mathbf{if}\;x.im \leq 0.41:\\
\;\;\;\;{\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re} \cdot \sin t_0\\
\mathbf{else}:\\
\;\;\;\;\sin \left(t_0 + y.im \cdot \log x.im\right) \cdot {x.im}^{y.re}\\
\end{array}
\]
| Alternative 8 |
|---|
| Error | 31.4 |
|---|
| Cost | 26376 |
|---|
\[\begin{array}{l}
t_0 := {\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re} \cdot \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\\
\mathbf{if}\;y.re \leq -4.848984626190717 \cdot 10^{-111}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;y.re \leq 1.957247952422381 \cdot 10^{-297}:\\
\;\;\;\;\sin \left({\left(\sqrt[3]{y.im \cdot \log x.im}\right)}^{3}\right)\\
\mathbf{else}:\\
\;\;\;\;t_0\\
\end{array}
\]
| Alternative 9 |
|---|
| Error | 49.2 |
|---|
| Cost | 26048 |
|---|
\[{\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re} \cdot \sin \left(y.im \cdot \log x.im\right)
\]
| Alternative 10 |
|---|
| Error | 54.1 |
|---|
| Cost | 13512 |
|---|
\[\begin{array}{l}
t_0 := \sin \left(y.im \cdot \log x.im\right)\\
t_1 := -1 + \left(1 + t_0\right)\\
\mathbf{if}\;y.re \leq -2.7268238954297577 \cdot 10^{-18}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y.re \leq 1.7154410762124707 \cdot 10^{-43}:\\
\;\;\;\;t_0\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\]
| Alternative 11 |
|---|
| Error | 59.4 |
|---|
| Cost | 12992 |
|---|
\[\sin \left(y.im \cdot \log x.im\right)
\]
| Alternative 12 |
|---|
| Error | 59.7 |
|---|
| Cost | 6592 |
|---|
\[y.im \cdot \log x.im
\]