\[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.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 - y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}} \cdot t_0\\
\mathbf{if}\;y.im \leq -1 \cdot 10^{+20}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;y.im \leq 2.529296054213915 \cdot 10^{-23}:\\
\;\;\;\;\frac{{\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re}}{{\left(e^{\tan^{-1}_* \frac{x.im}{x.re}}\right)}^{y.im}} \cdot \sin \left(\mathsf{fma}\left(t_1, y.im, t_0\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 (* y.re (atan2 x.im x.re)))
(t_1 (log (hypot x.re x.im)))
(t_2 (* (exp (- (* t_1 y.re) (* y.im (atan2 x.im x.re)))) t_0)))
(if (<= y.im -1e+20)
t_2
(if (<= y.im 2.529296054213915e-23)
(*
(/ (pow (hypot x.re x.im) y.re) (pow (exp (atan2 x.im x.re)) y.im))
(sin (fma t_1 y.im t_0)))
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 = y_46_re * atan2(x_46_im, x_46_re);
double t_1 = log(hypot(x_46_re, x_46_im));
double t_2 = exp(((t_1 * y_46_re) - (y_46_im * atan2(x_46_im, x_46_re)))) * t_0;
double tmp;
if (y_46_im <= -1e+20) {
tmp = t_2;
} else if (y_46_im <= 2.529296054213915e-23) {
tmp = (pow(hypot(x_46_re, x_46_im), y_46_re) / pow(exp(atan2(x_46_im, x_46_re)), y_46_im)) * sin(fma(t_1, y_46_im, t_0));
} 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(y_46_re * atan(x_46_im, x_46_re))
t_1 = log(hypot(x_46_re, x_46_im))
t_2 = Float64(exp(Float64(Float64(t_1 * y_46_re) - Float64(y_46_im * atan(x_46_im, x_46_re)))) * t_0)
tmp = 0.0
if (y_46_im <= -1e+20)
tmp = t_2;
elseif (y_46_im <= 2.529296054213915e-23)
tmp = Float64(Float64((hypot(x_46_re, x_46_im) ^ y_46_re) / (exp(atan(x_46_im, x_46_re)) ^ y_46_im)) * sin(fma(t_1, y_46_im, t_0)));
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[(y$46$re * 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[(N[Exp[N[(N[(t$95$1 * y$46$re), $MachinePrecision] - N[(y$46$im * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * t$95$0), $MachinePrecision]}, If[LessEqual[y$46$im, -1e+20], t$95$2, If[LessEqual[y$46$im, 2.529296054213915e-23], N[(N[(N[Power[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision], y$46$re], $MachinePrecision] / N[Power[N[Exp[N[ArcTan[x$46$im / x$46$re], $MachinePrecision]], $MachinePrecision], y$46$im], $MachinePrecision]), $MachinePrecision] * N[Sin[N[(t$95$1 * y$46$im + t$95$0), $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 := 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 - y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}} \cdot t_0\\
\mathbf{if}\;y.im \leq -1 \cdot 10^{+20}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;y.im \leq 2.529296054213915 \cdot 10^{-23}:\\
\;\;\;\;\frac{{\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re}}{{\left(e^{\tan^{-1}_* \frac{x.im}{x.re}}\right)}^{y.im}} \cdot \sin \left(\mathsf{fma}\left(t_1, y.im, t_0\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
Alternatives
| Alternative 1 |
|---|
| Error | 3.8 |
|---|
| Cost | 58760 |
|---|
\[\begin{array}{l}
t_0 := y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
t_1 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
t_2 := \log \left(\mathsf{hypot}\left(x.re, x.im\right)\right)\\
t_3 := e^{t_2 \cdot y.re - t_0}\\
\mathbf{if}\;y.re \leq -4.094144222922793 \cdot 10^{-16}:\\
\;\;\;\;t_3 \cdot t_1\\
\mathbf{elif}\;y.re \leq 1.8:\\
\;\;\;\;\sin \left(\mathsf{fma}\left(t_2, y.im, t_1\right)\right) \cdot \frac{1}{e^{\mathsf{expm1}\left(\mathsf{log1p}\left(t_0\right)\right)}}\\
\mathbf{else}:\\
\;\;\;\;t_3 \cdot \sin t_1\\
\end{array}
\]
| Alternative 2 |
|---|
| Error | 3.7 |
|---|
| Cost | 45960 |
|---|
\[\begin{array}{l}
t_0 := y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
t_1 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
t_2 := \log \left(\mathsf{hypot}\left(x.re, x.im\right)\right)\\
t_3 := e^{t_2 \cdot y.re - t_0}\\
\mathbf{if}\;y.re \leq -4.094144222922793 \cdot 10^{-16}:\\
\;\;\;\;t_3 \cdot t_1\\
\mathbf{elif}\;y.re \leq 1.8:\\
\;\;\;\;\sin \left(\mathsf{fma}\left(t_2, y.im, t_1\right)\right) \cdot \frac{1}{e^{t_0}}\\
\mathbf{else}:\\
\;\;\;\;t_3 \cdot \sin t_1\\
\end{array}
\]
| Alternative 3 |
|---|
| Error | 4.5 |
|---|
| Cost | 45768 |
|---|
\[\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 - y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}} \cdot t_0\\
\mathbf{if}\;y.im \leq -2416.2347045181714:\\
\;\;\;\;t_2\\
\mathbf{elif}\;y.im \leq 2.529296054213915 \cdot 10^{-23}:\\
\;\;\;\;\sin \left(\mathsf{fma}\left(t_1, y.im, t_0\right)\right) \cdot {\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re}\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
\]
| Alternative 4 |
|---|
| Error | 12.1 |
|---|
| Cost | 39824 |
|---|
\[\begin{array}{l}
t_0 := y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
t_1 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
t_2 := \frac{1}{e^{t_0}}\\
t_3 := t_2 \cdot \sin \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right)\\
t_4 := e^{\log \left(\mathsf{hypot}\left(x.re, x.im\right)\right) \cdot y.re - t_0}\\
\mathbf{if}\;y.re \leq -7.430487748264189 \cdot 10^{-42}:\\
\;\;\;\;t_4 \cdot t_1\\
\mathbf{elif}\;y.re \leq -5.798896059321038 \cdot 10^{-73}:\\
\;\;\;\;t_3\\
\mathbf{elif}\;y.re \leq -2.086242785238383 \cdot 10^{-171}:\\
\;\;\;\;t_2 \cdot \sin \left(t_1 - y.im \cdot \log \left(\frac{-1}{x.re}\right)\right)\\
\mathbf{elif}\;y.re \leq 7.10216997374436 \cdot 10^{-105}:\\
\;\;\;\;t_3\\
\mathbf{else}:\\
\;\;\;\;t_4 \cdot \sin t_1\\
\end{array}
\]
| Alternative 5 |
|---|
| Error | 12.2 |
|---|
| Cost | 33484 |
|---|
\[\begin{array}{l}
t_0 := y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
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} \cdot t_1\\
t_3 := \frac{1}{e^{t_0}}\\
t_4 := t_3 \cdot \sin \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right)\\
\mathbf{if}\;y.re \leq -7.430487748264189 \cdot 10^{-42}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;y.re \leq -5.798896059321038 \cdot 10^{-73}:\\
\;\;\;\;t_4\\
\mathbf{elif}\;y.re \leq -2.086242785238383 \cdot 10^{-171}:\\
\;\;\;\;t_3 \cdot \sin \left(t_1 - y.im \cdot \log \left(\frac{-1}{x.re}\right)\right)\\
\mathbf{elif}\;y.re \leq 7.10216997374436 \cdot 10^{-105}:\\
\;\;\;\;t_4\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
\]
| Alternative 6 |
|---|
| Error | 11.1 |
|---|
| Cost | 33424 |
|---|
\[\begin{array}{l}
t_0 := y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
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} \cdot t_1\\
t_3 := \frac{1}{e^{t_0}}\\
t_4 := t_3 \cdot \sin \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right)\\
\mathbf{if}\;y.re \leq -7.430487748264189 \cdot 10^{-42}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;y.re \leq -5.798896059321038 \cdot 10^{-73}:\\
\;\;\;\;t_4\\
\mathbf{elif}\;y.re \leq -4.638358017152081 \cdot 10^{-178}:\\
\;\;\;\;t_1 \cdot t_3\\
\mathbf{elif}\;y.re \leq 7.10216997374436 \cdot 10^{-105}:\\
\;\;\;\;t_4\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
\]
| Alternative 7 |
|---|
| Error | 27.0 |
|---|
| Cost | 33100 |
|---|
\[\begin{array}{l}
t_0 := y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
t_1 := \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot e^{y.re \cdot \log x.im - t_0}\\
t_2 := \frac{1}{e^{t_0}} \cdot \sin \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right)\\
\mathbf{if}\;x.im \leq 2.3 \cdot 10^{-304}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;x.im \leq 8 \cdot 10^{-67}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;x.im \leq 11000:\\
\;\;\;\;t_2\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\]
| Alternative 8 |
|---|
| Error | 29.1 |
|---|
| Cost | 26564 |
|---|
\[\begin{array}{l}
t_0 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
t_1 := y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
\mathbf{if}\;x.im \leq 2.3 \cdot 10^{-304}:\\
\;\;\;\;\frac{1}{e^{t_1}} \cdot \sin t_0\\
\mathbf{else}:\\
\;\;\;\;t_0 \cdot e^{y.re \cdot \log x.im - t_1}\\
\end{array}
\]
| Alternative 9 |
|---|
| Error | 33.9 |
|---|
| Cost | 26304 |
|---|
\[\frac{1}{e^{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 10 |
|---|
| Error | 34.0 |
|---|
| Cost | 19904 |
|---|
\[\left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot \frac{1}{e^{y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}}}
\]
| Alternative 11 |
|---|
| Error | 51.1 |
|---|
| Cost | 13056 |
|---|
\[\sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)
\]