Math FPCore C Julia Wolfram TeX \[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 := \log \left(\mathsf{hypot}\left(x.re, x.im\right)\right)\\
e^{t_0 \cdot y.re - {\left(\sqrt[3]{y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}}\right)}^{3}} \cdot \sin \left(\mathsf{fma}\left(t_0, y.im, y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\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
(let* ((t_0 (log (hypot x.re x.im))))
(*
(exp (- (* t_0 y.re) (pow (cbrt (* y.im (atan2 x.im x.re))) 3.0)))
(sin (fma t_0 y.im (* y.re (atan2 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 t_0 = log(hypot(x_46_re, x_46_im));
return exp(((t_0 * y_46_re) - pow(cbrt((y_46_im * atan2(x_46_im, x_46_re))), 3.0))) * sin(fma(t_0, y_46_im, (y_46_re * atan2(x_46_im, x_46_re))));
}
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 = log(hypot(x_46_re, x_46_im))
return Float64(exp(Float64(Float64(t_0 * y_46_re) - (cbrt(Float64(y_46_im * atan(x_46_im, x_46_re))) ^ 3.0))) * sin(fma(t_0, y_46_im, Float64(y_46_re * atan(x_46_im, x_46_re)))))
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[Log[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision]], $MachinePrecision]}, N[(N[Exp[N[(N[(t$95$0 * y$46$re), $MachinePrecision] - N[Power[N[Power[N[(y$46$im * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision], 1/3], $MachinePrecision], 3.0], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Sin[N[(t$95$0 * y$46$im + N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $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}
t_0 := \log \left(\mathsf{hypot}\left(x.re, x.im\right)\right)\\
e^{t_0 \cdot y.re - {\left(\sqrt[3]{y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}}\right)}^{3}} \cdot \sin \left(\mathsf{fma}\left(t_0, y.im, y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)
\end{array}
Alternatives Alternative 1 Accuracy 80.7% Cost 71552
\[\begin{array}{l}
t_0 := \log \left(\mathsf{hypot}\left(x.re, x.im\right)\right)\\
e^{t_0 \cdot y.re - {\left(\sqrt[3]{y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}}\right)}^{3}} \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 80.7% 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 76.8% Cost 52616
\[\begin{array}{l}
t_0 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
t_1 := \sin t_0\\
\mathbf{if}\;y.re \leq -2.05 \cdot 10^{-12}:\\
\;\;\;\;e^{y.re \cdot \log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) - y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}} \cdot t_1\\
\mathbf{elif}\;y.re \leq 2.1 \cdot 10^{+30}:\\
\;\;\;\;\sin \left(\mathsf{fma}\left(\log \left(\mathsf{hypot}\left(x.re, x.im\right)\right), y.im, t_0\right)\right) \cdot e^{y.im \cdot \left(-\tan^{-1}_* \frac{x.im}{x.re}\right)}\\
\mathbf{else}:\\
\;\;\;\;{\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re} \cdot \left(t_1 + y.im \cdot \left(\log \left(\mathsf{hypot}\left(x.im, x.re\right)\right) \cdot \cos t_0\right)\right)\\
\end{array}
\]
Alternative 4 Accuracy 76.6% Cost 45896
\[\begin{array}{l}
t_0 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
t_1 := \sin \left(\mathsf{fma}\left(\log \left(\mathsf{hypot}\left(x.re, x.im\right)\right), y.im, t_0\right)\right)\\
\mathbf{if}\;y.re \leq -6 \cdot 10^{-14}:\\
\;\;\;\;e^{y.re \cdot \log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) - y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}} \cdot \sin t_0\\
\mathbf{elif}\;y.re \leq 1.25 \cdot 10^{+30}:\\
\;\;\;\;t_1 \cdot e^{y.im \cdot \left(-\tan^{-1}_* \frac{x.im}{x.re}\right)}\\
\mathbf{else}:\\
\;\;\;\;t_1 \cdot {\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re}\\
\end{array}
\]
Alternative 5 Accuracy 72.9% Cost 45769
\[\begin{array}{l}
t_0 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
\mathbf{if}\;y.im \leq -1.1 \cdot 10^{+50} \lor \neg \left(y.im \leq 7900000000000\right):\\
\;\;\;\;e^{y.re \cdot \log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) - y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}} \cdot \sin t_0\\
\mathbf{else}:\\
\;\;\;\;\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}\\
\end{array}
\]
Alternative 6 Accuracy 66.2% Cost 40144
\[\begin{array}{l}
t_0 := \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\\
t_1 := e^{y.re \cdot \log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) - y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}} \cdot t_0\\
t_2 := {\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re}\\
t_3 := t_2 \cdot \sin \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right)\\
\mathbf{if}\;y.im \leq -1.26:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y.im \leq -4.5 \cdot 10^{-153}:\\
\;\;\;\;t_3\\
\mathbf{elif}\;y.im \leq 2.15 \cdot 10^{-167}:\\
\;\;\;\;t_0 \cdot t_2\\
\mathbf{elif}\;y.im \leq 7600000000000:\\
\;\;\;\;t_3\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\]
Alternative 7 Accuracy 56.4% Cost 33304
\[\begin{array}{l}
t_0 := {\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re}\\
t_1 := t_0 \cdot \sin \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right)\\
t_2 := \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\\
t_3 := t_2 \cdot {\left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right)}^{y.re}\\
\mathbf{if}\;y.im \leq -1.45 \cdot 10^{+231}:\\
\;\;\;\;\log \left({\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.im}\right)\\
\mathbf{elif}\;y.im \leq -2.45 \cdot 10^{+165}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y.im \leq -1.26:\\
\;\;\;\;t_3\\
\mathbf{elif}\;y.im \leq -5.2 \cdot 10^{-153}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y.im \leq 5.6 \cdot 10^{-165}:\\
\;\;\;\;t_2 \cdot t_0\\
\mathbf{elif}\;y.im \leq 11500000000000:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;t_3\\
\end{array}
\]
Alternative 8 Accuracy 58.4% Cost 33028
\[\begin{array}{l}
t_0 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
\mathbf{if}\;x.re \leq -1.7 \cdot 10^{-222}:\\
\;\;\;\;\sin t_0 \cdot e^{y.re \cdot \log \left(-x.re\right) - y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}}\\
\mathbf{elif}\;x.re \leq 2 \cdot 10^{+56}:\\
\;\;\;\;{\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re} \cdot \sin \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\sin \left(t_0 + y.im \cdot \log x.re\right) \cdot {x.re}^{y.re}\\
\end{array}
\]
Alternative 9 Accuracy 50.5% Cost 26436
\[\begin{array}{l}
t_0 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
\mathbf{if}\;x.re \leq 7.5 \cdot 10^{+63}:\\
\;\;\;\;\sin t_0 \cdot {\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re}\\
\mathbf{else}:\\
\;\;\;\;\sin \left(t_0 + y.im \cdot \log x.re\right) \cdot {x.re}^{y.re}\\
\end{array}
\]
Alternative 10 Accuracy 46.0% Cost 26112
\[\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}
\]
Alternative 11 Accuracy 34.6% Cost 19721
\[\begin{array}{l}
\mathbf{if}\;y.re \leq -1.15 \cdot 10^{-10} \lor \neg \left(y.re \leq 3.2 \cdot 10^{-50}\right):\\
\;\;\;\;\log \left({\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.im}\right)\\
\mathbf{else}:\\
\;\;\;\;\sin \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right)\\
\end{array}
\]
Alternative 12 Accuracy 28.5% Cost 19657
\[\begin{array}{l}
\mathbf{if}\;y.re \leq -6.6 \cdot 10^{-295} \lor \neg \left(y.re \leq 2.05 \cdot 10^{-103}\right):\\
\;\;\;\;\log \left({\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.im}\right)\\
\mathbf{else}:\\
\;\;\;\;y.im \cdot \log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right)\\
\end{array}
\]
Alternative 13 Accuracy 18.8% Cost 13508
\[\begin{array}{l}
\mathbf{if}\;x.re \leq 1.15 \cdot 10^{+239}:\\
\;\;\;\;y.im \cdot \log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right)\\
\mathbf{else}:\\
\;\;\;\;\sin \left(y.im \cdot \log x.re\right)\\
\end{array}
\]
Alternative 14 Accuracy 12.0% Cost 13316
\[\begin{array}{l}
\mathbf{if}\;x.re \leq -2 \cdot 10^{-308}:\\
\;\;\;\;\sin \left(\log \left(\frac{-1}{x.re}\right) \cdot \left(-y.im\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\sin \left(y.im \cdot \log x.re\right)\\
\end{array}
\]
Alternative 15 Accuracy 9.6% Cost 13124
\[\begin{array}{l}
\mathbf{if}\;x.re \leq 3.9 \cdot 10^{-239}:\\
\;\;\;\;\sin \left(y.im \cdot \log x.im\right)\\
\mathbf{else}:\\
\;\;\;\;\sin \left(y.im \cdot \log x.re\right)\\
\end{array}
\]
Alternative 16 Accuracy 4.6% Cost 12992
\[\sin \left(y.im \cdot \log x.im\right)
\]