
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (log (sqrt (+ (* x.re x.re) (* x.im x.im))))))
(*
(exp (- (* t_0 y.re) (* (atan2 x.im x.re) y.im)))
(cos (+ (* t_0 y.im) (* (atan2 x.im x.re) y.re))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))));
return exp(((t_0 * y_46_re) - (atan2(x_46_im, x_46_re) * y_46_im))) * cos(((t_0 * y_46_im) + (atan2(x_46_im, x_46_re) * y_46_re)));
}
real(8) function code(x_46re, x_46im, y_46re, y_46im)
real(8), intent (in) :: x_46re
real(8), intent (in) :: x_46im
real(8), intent (in) :: y_46re
real(8), intent (in) :: y_46im
real(8) :: t_0
t_0 = log(sqrt(((x_46re * x_46re) + (x_46im * x_46im))))
code = exp(((t_0 * y_46re) - (atan2(x_46im, x_46re) * y_46im))) * cos(((t_0 * y_46im) + (atan2(x_46im, x_46re) * y_46re)))
end function
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = Math.log(Math.sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))));
return Math.exp(((t_0 * y_46_re) - (Math.atan2(x_46_im, x_46_re) * y_46_im))) * Math.cos(((t_0 * y_46_im) + (Math.atan2(x_46_im, x_46_re) * y_46_re)));
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): t_0 = math.log(math.sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im)))) return math.exp(((t_0 * y_46_re) - (math.atan2(x_46_im, x_46_re) * y_46_im))) * math.cos(((t_0 * y_46_im) + (math.atan2(x_46_im, x_46_re) * y_46_re)))
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = log(sqrt(Float64(Float64(x_46_re * x_46_re) + Float64(x_46_im * x_46_im)))) return Float64(exp(Float64(Float64(t_0 * y_46_re) - Float64(atan(x_46_im, x_46_re) * y_46_im))) * cos(Float64(Float64(t_0 * y_46_im) + Float64(atan(x_46_im, x_46_re) * y_46_re)))) end
function tmp = code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im)))); tmp = exp(((t_0 * y_46_re) - (atan2(x_46_im, x_46_re) * y_46_im))) * cos(((t_0 * y_46_im) + (atan2(x_46_im, x_46_re) * y_46_re))); end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[Log[N[Sqrt[N[(N[(x$46$re * x$46$re), $MachinePrecision] + N[(x$46$im * x$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]}, N[(N[Exp[N[(N[(t$95$0 * y$46$re), $MachinePrecision] - N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Cos[N[(N[(t$95$0 * y$46$im), $MachinePrecision] + N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$re), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right)\\
e^{t_0 \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \cos \left(t_0 \cdot y.im + \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)
\end{array}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 14 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (log (sqrt (+ (* x.re x.re) (* x.im x.im))))))
(*
(exp (- (* t_0 y.re) (* (atan2 x.im x.re) y.im)))
(cos (+ (* t_0 y.im) (* (atan2 x.im x.re) y.re))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))));
return exp(((t_0 * y_46_re) - (atan2(x_46_im, x_46_re) * y_46_im))) * cos(((t_0 * y_46_im) + (atan2(x_46_im, x_46_re) * y_46_re)));
}
real(8) function code(x_46re, x_46im, y_46re, y_46im)
real(8), intent (in) :: x_46re
real(8), intent (in) :: x_46im
real(8), intent (in) :: y_46re
real(8), intent (in) :: y_46im
real(8) :: t_0
t_0 = log(sqrt(((x_46re * x_46re) + (x_46im * x_46im))))
code = exp(((t_0 * y_46re) - (atan2(x_46im, x_46re) * y_46im))) * cos(((t_0 * y_46im) + (atan2(x_46im, x_46re) * y_46re)))
end function
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = Math.log(Math.sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))));
return Math.exp(((t_0 * y_46_re) - (Math.atan2(x_46_im, x_46_re) * y_46_im))) * Math.cos(((t_0 * y_46_im) + (Math.atan2(x_46_im, x_46_re) * y_46_re)));
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): t_0 = math.log(math.sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im)))) return math.exp(((t_0 * y_46_re) - (math.atan2(x_46_im, x_46_re) * y_46_im))) * math.cos(((t_0 * y_46_im) + (math.atan2(x_46_im, x_46_re) * y_46_re)))
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = log(sqrt(Float64(Float64(x_46_re * x_46_re) + Float64(x_46_im * x_46_im)))) return Float64(exp(Float64(Float64(t_0 * y_46_re) - Float64(atan(x_46_im, x_46_re) * y_46_im))) * cos(Float64(Float64(t_0 * y_46_im) + Float64(atan(x_46_im, x_46_re) * y_46_re)))) end
function tmp = code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im)))); tmp = exp(((t_0 * y_46_re) - (atan2(x_46_im, x_46_re) * y_46_im))) * cos(((t_0 * y_46_im) + (atan2(x_46_im, x_46_re) * y_46_re))); end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[Log[N[Sqrt[N[(N[(x$46$re * x$46$re), $MachinePrecision] + N[(x$46$im * x$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]}, N[(N[Exp[N[(N[(t$95$0 * y$46$re), $MachinePrecision] - N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Cos[N[(N[(t$95$0 * y$46$im), $MachinePrecision] + N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$re), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right)\\
e^{t_0 \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \cos \left(t_0 \cdot y.im + \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)
\end{array}
\end{array}
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (log (hypot x.im x.re)))
(t_1 (fma y.im t_0 1.0))
(t_2
(exp
(- (* (log (hypot x.re x.im)) y.re) (* (atan2 x.im x.re) y.im)))))
(if (<= x.im -2e-101)
(* t_2 (- (* (cos t_1) (cos -1.0)) (* (sin t_1) (sin -1.0))))
(if (<= x.im -1e-275)
(*
t_2
(cos (- (* y.re (atan2 x.im x.re)) (* y.im (log (/ -1.0 x.im))))))
(* t_2 (cos (pow (cbrt (* y.im t_0)) 3.0)))))))
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_im, x_46_re));
double t_1 = fma(y_46_im, t_0, 1.0);
double t_2 = exp(((log(hypot(x_46_re, x_46_im)) * y_46_re) - (atan2(x_46_im, x_46_re) * y_46_im)));
double tmp;
if (x_46_im <= -2e-101) {
tmp = t_2 * ((cos(t_1) * cos(-1.0)) - (sin(t_1) * sin(-1.0)));
} else if (x_46_im <= -1e-275) {
tmp = t_2 * cos(((y_46_re * atan2(x_46_im, x_46_re)) - (y_46_im * log((-1.0 / x_46_im)))));
} else {
tmp = t_2 * cos(pow(cbrt((y_46_im * t_0)), 3.0));
}
return tmp;
}
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = log(hypot(x_46_im, x_46_re)) t_1 = fma(y_46_im, t_0, 1.0) t_2 = 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))) tmp = 0.0 if (x_46_im <= -2e-101) tmp = Float64(t_2 * Float64(Float64(cos(t_1) * cos(-1.0)) - Float64(sin(t_1) * sin(-1.0)))); elseif (x_46_im <= -1e-275) tmp = Float64(t_2 * cos(Float64(Float64(y_46_re * atan(x_46_im, x_46_re)) - Float64(y_46_im * log(Float64(-1.0 / x_46_im)))))); else tmp = Float64(t_2 * cos((cbrt(Float64(y_46_im * t_0)) ^ 3.0))); end return tmp end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]}, Block[{t$95$1 = N[(y$46$im * t$95$0 + 1.0), $MachinePrecision]}, Block[{t$95$2 = 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]}, If[LessEqual[x$46$im, -2e-101], N[(t$95$2 * N[(N[(N[Cos[t$95$1], $MachinePrecision] * N[Cos[-1.0], $MachinePrecision]), $MachinePrecision] - N[(N[Sin[t$95$1], $MachinePrecision] * N[Sin[-1.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x$46$im, -1e-275], N[(t$95$2 * N[Cos[N[(N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision] - N[(y$46$im * N[Log[N[(-1.0 / x$46$im), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(t$95$2 * N[Cos[N[Power[N[Power[N[(y$46$im * t$95$0), $MachinePrecision], 1/3], $MachinePrecision], 3.0], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\\
t_1 := \mathsf{fma}\left(y.im, t_0, 1\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}\\
\mathbf{if}\;x.im \leq -2 \cdot 10^{-101}:\\
\;\;\;\;t_2 \cdot \left(\cos t_1 \cdot \cos -1 - \sin t_1 \cdot \sin -1\right)\\
\mathbf{elif}\;x.im \leq -1 \cdot 10^{-275}:\\
\;\;\;\;t_2 \cdot \cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re} - y.im \cdot \log \left(\frac{-1}{x.im}\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t_2 \cdot \cos \left({\left(\sqrt[3]{y.im \cdot t_0}\right)}^{3}\right)\\
\end{array}
\end{array}
if x.im < -2.0000000000000001e-101Initial program 37.8%
Simplified78.0%
fma-udef78.0%
hypot-udef37.8%
*-commutative37.8%
add-cube-cbrt39.0%
pow337.8%
hypot-udef74.6%
*-commutative74.6%
fma-udef74.6%
*-commutative74.6%
Applied egg-rr74.6%
Taylor expanded in y.re around 0 18.3%
unpow1/341.4%
unpow241.4%
unpow241.4%
hypot-def79.4%
Simplified79.4%
unpow383.1%
add-cube-cbrt85.4%
expm1-log1p-u57.3%
Applied egg-rr57.3%
expm1-udef56.1%
sub-neg56.1%
metadata-eval56.1%
cos-sum58.7%
log1p-expm1-u58.7%
log1p-udef58.7%
add-exp-log59.9%
+-commutative59.9%
expm1-log1p-u62.4%
fma-def62.4%
Applied egg-rr89.0%
if -2.0000000000000001e-101 < x.im < -9.99999999999999934e-276Initial program 42.1%
Simplified84.2%
Taylor expanded in x.im around -inf 89.5%
+-commutative89.5%
mul-1-neg89.5%
unsub-neg89.5%
*-commutative89.5%
Simplified89.5%
if -9.99999999999999934e-276 < x.im Initial program 41.7%
Simplified72.1%
fma-udef72.1%
hypot-udef41.7%
*-commutative41.7%
add-cube-cbrt41.7%
pow342.4%
hypot-udef73.3%
*-commutative73.3%
fma-udef73.3%
*-commutative73.3%
Applied egg-rr73.3%
Taylor expanded in y.re around 0 21.4%
unpow1/344.6%
unpow244.6%
unpow244.6%
hypot-def81.4%
Simplified81.4%
Final simplification85.0%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (* (atan2 x.im x.re) y.im))
(t_1 (exp (- (* (log (hypot x.re x.im)) y.re) t_0)))
(t_2 (* y.im (log (hypot x.im x.re))))
(t_3 (cos t_2))
(t_4 (cbrt t_3)))
(if (<= y.re -2.2e+56)
(*
(exp (- (* y.re (log (sqrt (+ (* x.re x.re) (* x.im x.im))))) t_0))
(- t_3 (* y.re (* (atan2 x.im x.re) (sin t_2)))))
(if (<= y.re -1.15e-178)
(* t_1 (sqrt (pow t_3 2.0)))
(* t_1 (* t_4 (pow t_4 2.0)))))))
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 = exp(((log(hypot(x_46_re, x_46_im)) * y_46_re) - t_0));
double t_2 = y_46_im * log(hypot(x_46_im, x_46_re));
double t_3 = cos(t_2);
double t_4 = cbrt(t_3);
double tmp;
if (y_46_re <= -2.2e+56) {
tmp = exp(((y_46_re * log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))) - t_0)) * (t_3 - (y_46_re * (atan2(x_46_im, x_46_re) * sin(t_2))));
} else if (y_46_re <= -1.15e-178) {
tmp = t_1 * sqrt(pow(t_3, 2.0));
} else {
tmp = t_1 * (t_4 * pow(t_4, 2.0));
}
return tmp;
}
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = Math.atan2(x_46_im, x_46_re) * y_46_im;
double t_1 = Math.exp(((Math.log(Math.hypot(x_46_re, x_46_im)) * y_46_re) - t_0));
double t_2 = y_46_im * Math.log(Math.hypot(x_46_im, x_46_re));
double t_3 = Math.cos(t_2);
double t_4 = Math.cbrt(t_3);
double tmp;
if (y_46_re <= -2.2e+56) {
tmp = Math.exp(((y_46_re * Math.log(Math.sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))) - t_0)) * (t_3 - (y_46_re * (Math.atan2(x_46_im, x_46_re) * Math.sin(t_2))));
} else if (y_46_re <= -1.15e-178) {
tmp = t_1 * Math.sqrt(Math.pow(t_3, 2.0));
} else {
tmp = t_1 * (t_4 * Math.pow(t_4, 2.0));
}
return tmp;
}
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 = exp(Float64(Float64(log(hypot(x_46_re, x_46_im)) * y_46_re) - t_0)) t_2 = Float64(y_46_im * log(hypot(x_46_im, x_46_re))) t_3 = cos(t_2) t_4 = cbrt(t_3) tmp = 0.0 if (y_46_re <= -2.2e+56) tmp = 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)) * Float64(t_3 - Float64(y_46_re * Float64(atan(x_46_im, x_46_re) * sin(t_2))))); elseif (y_46_re <= -1.15e-178) tmp = Float64(t_1 * sqrt((t_3 ^ 2.0))); else tmp = Float64(t_1 * Float64(t_4 * (t_4 ^ 2.0))); end return tmp end
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[Exp[N[(N[(N[Log[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision]], $MachinePrecision] * y$46$re), $MachinePrecision] - t$95$0), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$2 = N[(y$46$im * N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[Cos[t$95$2], $MachinePrecision]}, Block[{t$95$4 = N[Power[t$95$3, 1/3], $MachinePrecision]}, If[LessEqual[y$46$re, -2.2e+56], 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] * N[(t$95$3 - N[(y$46$re * N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * N[Sin[t$95$2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$re, -1.15e-178], N[(t$95$1 * N[Sqrt[N[Power[t$95$3, 2.0], $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(t$95$1 * N[(t$95$4 * N[Power[t$95$4, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im\\
t_1 := e^{\log \left(\mathsf{hypot}\left(x.re, x.im\right)\right) \cdot y.re - t_0}\\
t_2 := y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\\
t_3 := \cos t_2\\
t_4 := \sqrt[3]{t_3}\\
\mathbf{if}\;y.re \leq -2.2 \cdot 10^{+56}:\\
\;\;\;\;e^{y.re \cdot \log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) - t_0} \cdot \left(t_3 - y.re \cdot \left(\tan^{-1}_* \frac{x.im}{x.re} \cdot \sin t_2\right)\right)\\
\mathbf{elif}\;y.re \leq -1.15 \cdot 10^{-178}:\\
\;\;\;\;t_1 \cdot \sqrt{{t_3}^{2}}\\
\mathbf{else}:\\
\;\;\;\;t_1 \cdot \left(t_4 \cdot {t_4}^{2}\right)\\
\end{array}
\end{array}
if y.re < -2.20000000000000016e56Initial program 38.8%
Taylor expanded in y.re around 0 46.9%
+-commutative46.9%
mul-1-neg46.9%
unsub-neg46.9%
unpow246.9%
unpow246.9%
hypot-def46.9%
*-commutative46.9%
associate-*l*46.9%
Simplified91.9%
if -2.20000000000000016e56 < y.re < -1.14999999999999997e-178Initial program 36.3%
Simplified71.2%
fma-udef71.2%
hypot-udef36.3%
*-commutative36.3%
add-cube-cbrt36.9%
pow339.1%
hypot-udef74.2%
*-commutative74.2%
fma-udef74.2%
*-commutative74.2%
Applied egg-rr74.2%
Taylor expanded in y.re around 0 18.8%
unpow1/339.1%
unpow239.1%
unpow239.1%
hypot-def74.2%
Simplified74.2%
add-sqr-sqrt49.9%
sqrt-unprod80.9%
pow280.9%
unpow380.8%
add-cube-cbrt80.7%
Applied egg-rr80.7%
if -1.14999999999999997e-178 < y.re Initial program 42.3%
Simplified75.3%
fma-udef75.3%
hypot-udef42.3%
*-commutative42.3%
add-cube-cbrt42.7%
pow342.0%
hypot-udef72.5%
*-commutative72.5%
fma-udef72.5%
*-commutative72.5%
Applied egg-rr72.5%
Taylor expanded in y.re around 0 22.6%
unpow1/345.1%
unpow245.1%
unpow245.1%
hypot-def81.1%
Simplified81.1%
add-cube-cbrt81.1%
pow281.1%
unpow381.1%
add-cube-cbrt81.1%
unpow382.3%
add-cube-cbrt83.3%
Applied egg-rr83.3%
Final simplification84.5%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (log (hypot x.im x.re)))
(t_1
(exp
(- (* (log (hypot x.re x.im)) y.re) (* (atan2 x.im x.re) y.im)))))
(if (<= y.im 1e-46)
(* t_1 (cos (pow (cbrt (* y.im t_0)) 3.0)))
(* t_1 (cos (* (sqrt y.im) (* t_0 (sqrt y.im))))))))
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_im, x_46_re));
double t_1 = exp(((log(hypot(x_46_re, x_46_im)) * y_46_re) - (atan2(x_46_im, x_46_re) * y_46_im)));
double tmp;
if (y_46_im <= 1e-46) {
tmp = t_1 * cos(pow(cbrt((y_46_im * t_0)), 3.0));
} else {
tmp = t_1 * cos((sqrt(y_46_im) * (t_0 * sqrt(y_46_im))));
}
return tmp;
}
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = Math.log(Math.hypot(x_46_im, x_46_re));
double t_1 = Math.exp(((Math.log(Math.hypot(x_46_re, x_46_im)) * y_46_re) - (Math.atan2(x_46_im, x_46_re) * y_46_im)));
double tmp;
if (y_46_im <= 1e-46) {
tmp = t_1 * Math.cos(Math.pow(Math.cbrt((y_46_im * t_0)), 3.0));
} else {
tmp = t_1 * Math.cos((Math.sqrt(y_46_im) * (t_0 * Math.sqrt(y_46_im))));
}
return tmp;
}
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = log(hypot(x_46_im, x_46_re)) t_1 = 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))) tmp = 0.0 if (y_46_im <= 1e-46) tmp = Float64(t_1 * cos((cbrt(Float64(y_46_im * t_0)) ^ 3.0))); else tmp = Float64(t_1 * cos(Float64(sqrt(y_46_im) * Float64(t_0 * sqrt(y_46_im))))); end return tmp end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]}, Block[{t$95$1 = 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]}, If[LessEqual[y$46$im, 1e-46], N[(t$95$1 * N[Cos[N[Power[N[Power[N[(y$46$im * t$95$0), $MachinePrecision], 1/3], $MachinePrecision], 3.0], $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(t$95$1 * N[Cos[N[(N[Sqrt[y$46$im], $MachinePrecision] * N[(t$95$0 * N[Sqrt[y$46$im], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\\
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.im \leq 10^{-46}:\\
\;\;\;\;t_1 \cdot \cos \left({\left(\sqrt[3]{y.im \cdot t_0}\right)}^{3}\right)\\
\mathbf{else}:\\
\;\;\;\;t_1 \cdot \cos \left(\sqrt{y.im} \cdot \left(t_0 \cdot \sqrt{y.im}\right)\right)\\
\end{array}
\end{array}
if y.im < 1.00000000000000002e-46Initial program 41.8%
Simplified78.0%
fma-udef78.0%
hypot-udef41.8%
*-commutative41.8%
add-cube-cbrt41.4%
pow341.9%
hypot-udef77.6%
*-commutative77.6%
fma-udef77.6%
*-commutative77.6%
Applied egg-rr77.6%
Taylor expanded in y.re around 0 22.0%
unpow1/345.6%
unpow245.6%
unpow245.6%
hypot-def85.4%
Simplified85.4%
if 1.00000000000000002e-46 < y.im Initial program 36.9%
Simplified69.3%
fma-udef69.3%
hypot-udef36.9%
*-commutative36.9%
add-cube-cbrt36.2%
pow334.6%
hypot-udef62.6%
*-commutative62.6%
fma-udef62.6%
*-commutative62.6%
Applied egg-rr62.6%
Taylor expanded in y.re around 0 18.5%
unpow1/334.6%
unpow234.6%
unpow234.6%
hypot-def64.1%
Simplified64.1%
unpow367.2%
add-cube-cbrt69.3%
*-commutative69.3%
add-sqr-sqrt72.9%
associate-*r*79.5%
Applied egg-rr79.5%
Final simplification83.9%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0
(exp
(- (* (log (hypot x.re x.im)) y.re) (* (atan2 x.im x.re) y.im)))))
(if (<= x.re -6e-220)
(* t_0 (cos (* y.im (log (/ -1.0 x.re)))))
(* t_0 (cos (pow (cbrt (* 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) {
double t_0 = exp(((log(hypot(x_46_re, x_46_im)) * y_46_re) - (atan2(x_46_im, x_46_re) * y_46_im)));
double tmp;
if (x_46_re <= -6e-220) {
tmp = t_0 * cos((y_46_im * log((-1.0 / x_46_re))));
} else {
tmp = t_0 * cos(pow(cbrt((y_46_im * log(hypot(x_46_im, x_46_re)))), 3.0));
}
return tmp;
}
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = Math.exp(((Math.log(Math.hypot(x_46_re, x_46_im)) * y_46_re) - (Math.atan2(x_46_im, x_46_re) * y_46_im)));
double tmp;
if (x_46_re <= -6e-220) {
tmp = t_0 * Math.cos((y_46_im * Math.log((-1.0 / x_46_re))));
} else {
tmp = t_0 * Math.cos(Math.pow(Math.cbrt((y_46_im * Math.log(Math.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) t_0 = 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))) tmp = 0.0 if (x_46_re <= -6e-220) tmp = Float64(t_0 * cos(Float64(y_46_im * log(Float64(-1.0 / x_46_re))))); else tmp = Float64(t_0 * cos((cbrt(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_] := Block[{t$95$0 = 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]}, If[LessEqual[x$46$re, -6e-220], N[(t$95$0 * N[Cos[N[(y$46$im * N[Log[N[(-1.0 / x$46$re), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(t$95$0 * N[Cos[N[Power[N[Power[N[(y$46$im * N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]), $MachinePrecision], 1/3], $MachinePrecision], 3.0], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := 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}\;x.re \leq -6 \cdot 10^{-220}:\\
\;\;\;\;t_0 \cdot \cos \left(y.im \cdot \log \left(\frac{-1}{x.re}\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t_0 \cdot \cos \left({\left(\sqrt[3]{y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)}\right)}^{3}\right)\\
\end{array}
\end{array}
if x.re < -6.00000000000000035e-220Initial program 37.7%
Simplified75.5%
fma-udef75.5%
hypot-udef37.7%
*-commutative37.7%
add-cube-cbrt39.6%
pow338.7%
hypot-udef74.5%
*-commutative74.5%
fma-udef74.5%
*-commutative74.5%
Applied egg-rr74.5%
Taylor expanded in y.re around 0 22.6%
unpow1/339.6%
unpow239.6%
unpow239.6%
hypot-def79.1%
Simplified79.1%
Taylor expanded in x.re around -inf 85.7%
mul-1-neg85.7%
pow-base-185.7%
*-lft-identity85.7%
*-commutative85.7%
cos-neg85.7%
Simplified85.7%
if -6.00000000000000035e-220 < x.re Initial program 42.5%
Simplified76.0%
fma-udef76.0%
hypot-udef42.5%
*-commutative42.5%
add-cube-cbrt40.4%
pow341.1%
hypot-udef73.2%
*-commutative73.2%
fma-udef73.2%
*-commutative73.2%
Applied egg-rr73.2%
Taylor expanded in y.re around 0 20.0%
unpow1/345.1%
unpow245.1%
unpow245.1%
hypot-def80.6%
Simplified80.6%
Final simplification82.7%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0
(exp
(- (* (log (hypot x.re x.im)) y.re) (* (atan2 x.im x.re) y.im)))))
(if (<= x.re -1e-308)
(* t_0 (cos (* y.im (log (/ -1.0 x.re)))))
(* t_0 (cos (pow (cbrt (* y.im (log x.re))) 3.0))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = exp(((log(hypot(x_46_re, x_46_im)) * y_46_re) - (atan2(x_46_im, x_46_re) * y_46_im)));
double tmp;
if (x_46_re <= -1e-308) {
tmp = t_0 * cos((y_46_im * log((-1.0 / x_46_re))));
} else {
tmp = t_0 * cos(pow(cbrt((y_46_im * log(x_46_re))), 3.0));
}
return tmp;
}
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = Math.exp(((Math.log(Math.hypot(x_46_re, x_46_im)) * y_46_re) - (Math.atan2(x_46_im, x_46_re) * y_46_im)));
double tmp;
if (x_46_re <= -1e-308) {
tmp = t_0 * Math.cos((y_46_im * Math.log((-1.0 / x_46_re))));
} else {
tmp = t_0 * Math.cos(Math.pow(Math.cbrt((y_46_im * Math.log(x_46_re))), 3.0));
}
return tmp;
}
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = 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))) tmp = 0.0 if (x_46_re <= -1e-308) tmp = Float64(t_0 * cos(Float64(y_46_im * log(Float64(-1.0 / x_46_re))))); else tmp = Float64(t_0 * cos((cbrt(Float64(y_46_im * log(x_46_re))) ^ 3.0))); end return tmp end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = 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]}, If[LessEqual[x$46$re, -1e-308], N[(t$95$0 * N[Cos[N[(y$46$im * N[Log[N[(-1.0 / x$46$re), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(t$95$0 * N[Cos[N[Power[N[Power[N[(y$46$im * N[Log[x$46$re], $MachinePrecision]), $MachinePrecision], 1/3], $MachinePrecision], 3.0], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := 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}\;x.re \leq -1 \cdot 10^{-308}:\\
\;\;\;\;t_0 \cdot \cos \left(y.im \cdot \log \left(\frac{-1}{x.re}\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t_0 \cdot \cos \left({\left(\sqrt[3]{y.im \cdot \log x.re}\right)}^{3}\right)\\
\end{array}
\end{array}
if x.re < -9.9999999999999991e-309Initial program 38.8%
Simplified76.0%
fma-udef76.0%
hypot-udef38.8%
*-commutative38.8%
add-cube-cbrt41.3%
pow340.5%
hypot-udef76.0%
*-commutative76.0%
fma-udef76.0%
*-commutative76.0%
Applied egg-rr76.0%
Taylor expanded in y.re around 0 20.7%
unpow1/341.3%
unpow241.3%
unpow241.3%
hypot-def80.1%
Simplified80.1%
Taylor expanded in x.re around -inf 85.0%
mul-1-neg85.0%
pow-base-185.0%
*-lft-identity85.0%
*-commutative85.0%
cos-neg85.0%
Simplified85.0%
if -9.9999999999999991e-309 < x.re Initial program 42.0%
Simplified75.6%
fma-udef75.6%
hypot-udef42.0%
*-commutative42.0%
add-cube-cbrt39.0%
pow339.7%
hypot-udef71.7%
*-commutative71.7%
fma-udef71.7%
*-commutative71.7%
Applied egg-rr71.7%
Taylor expanded in y.re around 0 21.5%
unpow1/344.2%
unpow244.2%
unpow244.2%
hypot-def79.9%
Simplified79.9%
Taylor expanded in x.im around 0 45.6%
unpow1/379.8%
*-commutative79.8%
Simplified79.8%
Final simplification82.3%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0
(exp
(- (* (log (hypot x.re x.im)) y.re) (* (atan2 x.im x.re) y.im)))))
(if (<= x.re -1e-308)
(* t_0 (cos (* y.im (log (/ -1.0 x.re)))))
(* t_0 (cos (* y.im (log x.re)))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = exp(((log(hypot(x_46_re, x_46_im)) * y_46_re) - (atan2(x_46_im, x_46_re) * y_46_im)));
double tmp;
if (x_46_re <= -1e-308) {
tmp = t_0 * cos((y_46_im * log((-1.0 / x_46_re))));
} else {
tmp = t_0 * cos((y_46_im * log(x_46_re)));
}
return tmp;
}
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = Math.exp(((Math.log(Math.hypot(x_46_re, x_46_im)) * y_46_re) - (Math.atan2(x_46_im, x_46_re) * y_46_im)));
double tmp;
if (x_46_re <= -1e-308) {
tmp = t_0 * Math.cos((y_46_im * Math.log((-1.0 / x_46_re))));
} else {
tmp = t_0 * Math.cos((y_46_im * Math.log(x_46_re)));
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): t_0 = math.exp(((math.log(math.hypot(x_46_re, x_46_im)) * y_46_re) - (math.atan2(x_46_im, x_46_re) * y_46_im))) tmp = 0 if x_46_re <= -1e-308: tmp = t_0 * math.cos((y_46_im * math.log((-1.0 / x_46_re)))) else: tmp = t_0 * math.cos((y_46_im * math.log(x_46_re))) return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = 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))) tmp = 0.0 if (x_46_re <= -1e-308) tmp = Float64(t_0 * cos(Float64(y_46_im * log(Float64(-1.0 / x_46_re))))); else tmp = Float64(t_0 * cos(Float64(y_46_im * log(x_46_re)))); end return tmp end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = exp(((log(hypot(x_46_re, x_46_im)) * y_46_re) - (atan2(x_46_im, x_46_re) * y_46_im))); tmp = 0.0; if (x_46_re <= -1e-308) tmp = t_0 * cos((y_46_im * log((-1.0 / x_46_re)))); else tmp = t_0 * cos((y_46_im * log(x_46_re))); end tmp_2 = tmp; end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = 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]}, If[LessEqual[x$46$re, -1e-308], N[(t$95$0 * N[Cos[N[(y$46$im * N[Log[N[(-1.0 / x$46$re), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(t$95$0 * N[Cos[N[(y$46$im * N[Log[x$46$re], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := 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}\;x.re \leq -1 \cdot 10^{-308}:\\
\;\;\;\;t_0 \cdot \cos \left(y.im \cdot \log \left(\frac{-1}{x.re}\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t_0 \cdot \cos \left(y.im \cdot \log x.re\right)\\
\end{array}
\end{array}
if x.re < -9.9999999999999991e-309Initial program 38.8%
Simplified76.0%
fma-udef76.0%
hypot-udef38.8%
*-commutative38.8%
add-cube-cbrt41.3%
pow340.5%
hypot-udef76.0%
*-commutative76.0%
fma-udef76.0%
*-commutative76.0%
Applied egg-rr76.0%
Taylor expanded in y.re around 0 20.7%
unpow1/341.3%
unpow241.3%
unpow241.3%
hypot-def80.1%
Simplified80.1%
Taylor expanded in x.re around -inf 85.0%
mul-1-neg85.0%
pow-base-185.0%
*-lft-identity85.0%
*-commutative85.0%
cos-neg85.0%
Simplified85.0%
if -9.9999999999999991e-309 < x.re Initial program 42.0%
Simplified75.6%
fma-udef75.6%
hypot-udef42.0%
*-commutative42.0%
add-cube-cbrt39.0%
pow339.7%
hypot-udef71.7%
*-commutative71.7%
fma-udef71.7%
*-commutative71.7%
Applied egg-rr71.7%
Taylor expanded in y.re around 0 21.5%
unpow1/344.2%
unpow244.2%
unpow244.2%
hypot-def79.9%
Simplified79.9%
Taylor expanded in x.im around 0 79.2%
pow-base-179.2%
*-lft-identity79.2%
Simplified79.2%
Final simplification82.0%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0
(exp
(- (* (log (hypot x.re x.im)) y.re) (* (atan2 x.im x.re) y.im)))))
(if (<= x.re 1e-294) t_0 (* t_0 (cos (* y.im (log x.re)))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = exp(((log(hypot(x_46_re, x_46_im)) * y_46_re) - (atan2(x_46_im, x_46_re) * y_46_im)));
double tmp;
if (x_46_re <= 1e-294) {
tmp = t_0;
} else {
tmp = t_0 * cos((y_46_im * log(x_46_re)));
}
return tmp;
}
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = Math.exp(((Math.log(Math.hypot(x_46_re, x_46_im)) * y_46_re) - (Math.atan2(x_46_im, x_46_re) * y_46_im)));
double tmp;
if (x_46_re <= 1e-294) {
tmp = t_0;
} else {
tmp = t_0 * Math.cos((y_46_im * Math.log(x_46_re)));
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): t_0 = math.exp(((math.log(math.hypot(x_46_re, x_46_im)) * y_46_re) - (math.atan2(x_46_im, x_46_re) * y_46_im))) tmp = 0 if x_46_re <= 1e-294: tmp = t_0 else: tmp = t_0 * math.cos((y_46_im * math.log(x_46_re))) return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = 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))) tmp = 0.0 if (x_46_re <= 1e-294) tmp = t_0; else tmp = Float64(t_0 * cos(Float64(y_46_im * log(x_46_re)))); end return tmp end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = exp(((log(hypot(x_46_re, x_46_im)) * y_46_re) - (atan2(x_46_im, x_46_re) * y_46_im))); tmp = 0.0; if (x_46_re <= 1e-294) tmp = t_0; else tmp = t_0 * cos((y_46_im * log(x_46_re))); end tmp_2 = tmp; end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = 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]}, If[LessEqual[x$46$re, 1e-294], t$95$0, N[(t$95$0 * N[Cos[N[(y$46$im * N[Log[x$46$re], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := 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}\;x.re \leq 10^{-294}:\\
\;\;\;\;t_0\\
\mathbf{else}:\\
\;\;\;\;t_0 \cdot \cos \left(y.im \cdot \log x.re\right)\\
\end{array}
\end{array}
if x.re < 1.00000000000000002e-294Initial program 38.2%
Simplified74.8%
fma-udef74.8%
hypot-udef38.2%
*-commutative38.2%
add-cube-cbrt40.7%
pow339.8%
hypot-udef74.8%
*-commutative74.8%
fma-udef74.8%
*-commutative74.8%
Applied egg-rr74.8%
Taylor expanded in y.im around inf 81.2%
if 1.00000000000000002e-294 < x.re Initial program 42.7%
Simplified76.7%
fma-udef76.7%
hypot-udef42.7%
*-commutative42.7%
add-cube-cbrt39.6%
pow340.3%
hypot-udef72.8%
*-commutative72.8%
fma-udef72.8%
*-commutative72.8%
Applied egg-rr72.8%
Taylor expanded in y.re around 0 21.8%
unpow1/344.8%
unpow244.8%
unpow244.8%
hypot-def80.3%
Simplified80.3%
Taylor expanded in x.im around 0 80.4%
pow-base-180.4%
*-lft-identity80.4%
Simplified80.4%
Final simplification80.8%
(FPCore (x.re x.im y.re y.im) :precision binary64 (exp (- (* (log (hypot x.re x.im)) y.re) (* (atan2 x.im x.re) y.im))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
return exp(((log(hypot(x_46_re, x_46_im)) * y_46_re) - (atan2(x_46_im, x_46_re) * y_46_im)));
}
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
return Math.exp(((Math.log(Math.hypot(x_46_re, x_46_im)) * y_46_re) - (Math.atan2(x_46_im, x_46_re) * y_46_im)));
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): return math.exp(((math.log(math.hypot(x_46_re, x_46_im)) * y_46_re) - (math.atan2(x_46_im, x_46_re) * y_46_im)))
function code(x_46_re, x_46_im, y_46_re, y_46_im) return 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))) end
function tmp = code(x_46_re, x_46_im, y_46_re, y_46_im) tmp = exp(((log(hypot(x_46_re, x_46_im)) * y_46_re) - (atan2(x_46_im, x_46_re) * y_46_im))); end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := 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]
\begin{array}{l}
\\
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}
\end{array}
Initial program 40.5%
Simplified75.8%
fma-udef75.8%
hypot-udef40.5%
*-commutative40.5%
add-cube-cbrt40.1%
pow340.1%
hypot-udef73.8%
*-commutative73.8%
fma-udef73.8%
*-commutative73.8%
Applied egg-rr73.8%
Taylor expanded in y.im around inf 78.4%
Final simplification78.4%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(if (<= y.re -0.135)
(exp (* y.re (log (sqrt (+ (* x.re x.re) (* x.im x.im))))))
(if (<= y.re 9e-14)
(exp (* (atan2 x.im x.re) (- y.im)))
(exp (log (pow (hypot x.re x.im) y.re))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double tmp;
if (y_46_re <= -0.135) {
tmp = exp((y_46_re * log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))));
} else if (y_46_re <= 9e-14) {
tmp = exp((atan2(x_46_im, x_46_re) * -y_46_im));
} else {
tmp = exp(log(pow(hypot(x_46_re, x_46_im), y_46_re)));
}
return tmp;
}
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double tmp;
if (y_46_re <= -0.135) {
tmp = Math.exp((y_46_re * Math.log(Math.sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))));
} else if (y_46_re <= 9e-14) {
tmp = Math.exp((Math.atan2(x_46_im, x_46_re) * -y_46_im));
} else {
tmp = Math.exp(Math.log(Math.pow(Math.hypot(x_46_re, x_46_im), y_46_re)));
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): tmp = 0 if y_46_re <= -0.135: tmp = math.exp((y_46_re * math.log(math.sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im)))))) elif y_46_re <= 9e-14: tmp = math.exp((math.atan2(x_46_im, x_46_re) * -y_46_im)) else: tmp = math.exp(math.log(math.pow(math.hypot(x_46_re, x_46_im), y_46_re))) return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) tmp = 0.0 if (y_46_re <= -0.135) tmp = exp(Float64(y_46_re * log(sqrt(Float64(Float64(x_46_re * x_46_re) + Float64(x_46_im * x_46_im)))))); elseif (y_46_re <= 9e-14) tmp = exp(Float64(atan(x_46_im, x_46_re) * Float64(-y_46_im))); else tmp = exp(log((hypot(x_46_re, x_46_im) ^ y_46_re))); end return tmp end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im) tmp = 0.0; if (y_46_re <= -0.135) tmp = exp((y_46_re * log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im)))))); elseif (y_46_re <= 9e-14) tmp = exp((atan2(x_46_im, x_46_re) * -y_46_im)); else tmp = exp(log((hypot(x_46_re, x_46_im) ^ y_46_re))); end tmp_2 = tmp; end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := If[LessEqual[y$46$re, -0.135], N[Exp[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]], $MachinePrecision], If[LessEqual[y$46$re, 9e-14], N[Exp[N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * (-y$46$im)), $MachinePrecision]], $MachinePrecision], N[Exp[N[Log[N[Power[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision], y$46$re], $MachinePrecision]], $MachinePrecision]], $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y.re \leq -0.135:\\
\;\;\;\;e^{y.re \cdot \log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right)}\\
\mathbf{elif}\;y.re \leq 9 \cdot 10^{-14}:\\
\;\;\;\;e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot \left(-y.im\right)}\\
\mathbf{else}:\\
\;\;\;\;e^{\log \left({\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re}\right)}\\
\end{array}
\end{array}
if y.re < -0.13500000000000001Initial program 33.9%
Simplified79.7%
fma-udef79.7%
hypot-udef33.9%
*-commutative33.9%
add-cube-cbrt31.0%
pow331.0%
hypot-udef76.8%
*-commutative76.8%
fma-udef76.8%
*-commutative76.8%
Applied egg-rr76.8%
Taylor expanded in y.im around inf 83.6%
Taylor expanded in y.re around inf 76.9%
+-commutative76.9%
unpow276.9%
unpow276.9%
Simplified76.9%
if -0.13500000000000001 < y.re < 8.9999999999999995e-14Initial program 45.7%
Simplified80.3%
fma-udef80.3%
hypot-udef45.7%
*-commutative45.7%
add-cube-cbrt45.4%
pow346.2%
hypot-udef80.0%
*-commutative80.0%
fma-udef80.0%
*-commutative80.0%
Applied egg-rr80.0%
Taylor expanded in y.im around inf 75.9%
Taylor expanded in y.re around 0 75.9%
mul-1-neg75.9%
distribute-rgt-neg-out75.9%
Simplified75.9%
if 8.9999999999999995e-14 < y.re Initial program 37.3%
Simplified65.3%
fma-udef65.3%
hypot-udef37.3%
*-commutative37.3%
add-cube-cbrt38.7%
pow337.3%
hypot-udef61.3%
*-commutative61.3%
fma-udef61.3%
*-commutative61.3%
Applied egg-rr61.3%
Taylor expanded in y.im around inf 78.5%
Taylor expanded in y.re around inf 68.2%
unpow268.2%
unpow268.2%
hypot-def70.7%
log-pow70.7%
hypot-def68.2%
unpow268.2%
unpow268.2%
+-commutative68.2%
unpow268.2%
unpow268.2%
hypot-def70.7%
Simplified70.7%
Final simplification74.6%
(FPCore (x.re x.im y.re y.im) :precision binary64 (if (or (<= y.re -8.8e-7) (not (<= y.re 70000.0))) (exp (* y.re (log (sqrt (+ (* x.re x.re) (* x.im x.im)))))) (exp (* (atan2 x.im x.re) (- y.im)))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double tmp;
if ((y_46_re <= -8.8e-7) || !(y_46_re <= 70000.0)) {
tmp = exp((y_46_re * log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))));
} else {
tmp = exp((atan2(x_46_im, x_46_re) * -y_46_im));
}
return tmp;
}
real(8) function code(x_46re, x_46im, y_46re, y_46im)
real(8), intent (in) :: x_46re
real(8), intent (in) :: x_46im
real(8), intent (in) :: y_46re
real(8), intent (in) :: y_46im
real(8) :: tmp
if ((y_46re <= (-8.8d-7)) .or. (.not. (y_46re <= 70000.0d0))) then
tmp = exp((y_46re * log(sqrt(((x_46re * x_46re) + (x_46im * x_46im))))))
else
tmp = exp((atan2(x_46im, x_46re) * -y_46im))
end if
code = tmp
end function
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double tmp;
if ((y_46_re <= -8.8e-7) || !(y_46_re <= 70000.0)) {
tmp = Math.exp((y_46_re * Math.log(Math.sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))));
} else {
tmp = Math.exp((Math.atan2(x_46_im, x_46_re) * -y_46_im));
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): tmp = 0 if (y_46_re <= -8.8e-7) or not (y_46_re <= 70000.0): tmp = math.exp((y_46_re * math.log(math.sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im)))))) else: tmp = math.exp((math.atan2(x_46_im, x_46_re) * -y_46_im)) return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) tmp = 0.0 if ((y_46_re <= -8.8e-7) || !(y_46_re <= 70000.0)) tmp = exp(Float64(y_46_re * log(sqrt(Float64(Float64(x_46_re * x_46_re) + Float64(x_46_im * x_46_im)))))); else tmp = exp(Float64(atan(x_46_im, x_46_re) * Float64(-y_46_im))); end return tmp end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im) tmp = 0.0; if ((y_46_re <= -8.8e-7) || ~((y_46_re <= 70000.0))) tmp = exp((y_46_re * log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im)))))); else tmp = exp((atan2(x_46_im, x_46_re) * -y_46_im)); end tmp_2 = tmp; end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := If[Or[LessEqual[y$46$re, -8.8e-7], N[Not[LessEqual[y$46$re, 70000.0]], $MachinePrecision]], N[Exp[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]], $MachinePrecision], N[Exp[N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * (-y$46$im)), $MachinePrecision]], $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y.re \leq -8.8 \cdot 10^{-7} \lor \neg \left(y.re \leq 70000\right):\\
\;\;\;\;e^{y.re \cdot \log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right)}\\
\mathbf{else}:\\
\;\;\;\;e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot \left(-y.im\right)}\\
\end{array}
\end{array}
if y.re < -8.8000000000000004e-7 or 7e4 < y.re Initial program 36.4%
Simplified71.3%
fma-udef71.3%
hypot-udef36.4%
*-commutative36.4%
add-cube-cbrt35.1%
pow334.3%
hypot-udef66.9%
*-commutative66.9%
fma-udef66.9%
*-commutative66.9%
Applied egg-rr66.9%
Taylor expanded in y.im around inf 81.6%
Taylor expanded in y.re around inf 74.8%
+-commutative74.8%
unpow274.8%
unpow274.8%
Simplified74.8%
if -8.8000000000000004e-7 < y.re < 7e4Initial program 44.7%
Simplified80.3%
fma-udef80.3%
hypot-udef44.7%
*-commutative44.7%
add-cube-cbrt45.1%
pow345.9%
hypot-udef80.7%
*-commutative80.7%
fma-udef80.7%
*-commutative80.7%
Applied egg-rr80.7%
Taylor expanded in y.im around inf 75.2%
Taylor expanded in y.re around 0 74.4%
mul-1-neg74.4%
distribute-rgt-neg-out74.4%
Simplified74.4%
Final simplification74.6%
(FPCore (x.re x.im y.re y.im) :precision binary64 (if (<= x.im 1.05e-189) (exp (* (atan2 x.im x.re) (- y.im))) (exp (- (* y.re (log x.im)) (* (atan2 x.im x.re) y.im)))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double tmp;
if (x_46_im <= 1.05e-189) {
tmp = exp((atan2(x_46_im, x_46_re) * -y_46_im));
} else {
tmp = exp(((y_46_re * log(x_46_im)) - (atan2(x_46_im, x_46_re) * y_46_im)));
}
return tmp;
}
real(8) function code(x_46re, x_46im, y_46re, y_46im)
real(8), intent (in) :: x_46re
real(8), intent (in) :: x_46im
real(8), intent (in) :: y_46re
real(8), intent (in) :: y_46im
real(8) :: tmp
if (x_46im <= 1.05d-189) then
tmp = exp((atan2(x_46im, x_46re) * -y_46im))
else
tmp = exp(((y_46re * log(x_46im)) - (atan2(x_46im, x_46re) * y_46im)))
end if
code = tmp
end function
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double tmp;
if (x_46_im <= 1.05e-189) {
tmp = Math.exp((Math.atan2(x_46_im, x_46_re) * -y_46_im));
} else {
tmp = Math.exp(((y_46_re * Math.log(x_46_im)) - (Math.atan2(x_46_im, x_46_re) * y_46_im)));
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): tmp = 0 if x_46_im <= 1.05e-189: tmp = math.exp((math.atan2(x_46_im, x_46_re) * -y_46_im)) else: tmp = math.exp(((y_46_re * math.log(x_46_im)) - (math.atan2(x_46_im, x_46_re) * y_46_im))) return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) tmp = 0.0 if (x_46_im <= 1.05e-189) tmp = exp(Float64(atan(x_46_im, x_46_re) * Float64(-y_46_im))); else tmp = exp(Float64(Float64(y_46_re * log(x_46_im)) - Float64(atan(x_46_im, x_46_re) * y_46_im))); end return tmp end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im) tmp = 0.0; if (x_46_im <= 1.05e-189) tmp = exp((atan2(x_46_im, x_46_re) * -y_46_im)); else tmp = exp(((y_46_re * log(x_46_im)) - (atan2(x_46_im, x_46_re) * y_46_im))); end tmp_2 = tmp; end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := If[LessEqual[x$46$im, 1.05e-189], N[Exp[N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * (-y$46$im)), $MachinePrecision]], $MachinePrecision], N[Exp[N[(N[(y$46$re * N[Log[x$46$im], $MachinePrecision]), $MachinePrecision] - N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x.im \leq 1.05 \cdot 10^{-189}:\\
\;\;\;\;e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot \left(-y.im\right)}\\
\mathbf{else}:\\
\;\;\;\;e^{y.re \cdot \log x.im - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}\\
\end{array}
\end{array}
if x.im < 1.05000000000000008e-189Initial program 39.1%
Simplified79.5%
fma-udef79.5%
hypot-udef39.1%
*-commutative39.1%
add-cube-cbrt38.0%
pow337.3%
hypot-udef74.4%
*-commutative74.4%
fma-udef74.4%
*-commutative74.4%
Applied egg-rr74.4%
Taylor expanded in y.im around inf 80.8%
Taylor expanded in y.re around 0 50.5%
mul-1-neg50.5%
distribute-rgt-neg-out50.5%
Simplified50.5%
if 1.05000000000000008e-189 < x.im Initial program 42.5%
Simplified70.9%
fma-udef70.9%
hypot-udef42.5%
*-commutative42.5%
add-cube-cbrt42.9%
pow343.8%
hypot-udef73.0%
*-commutative73.0%
fma-udef73.0%
*-commutative73.0%
Applied egg-rr73.0%
Taylor expanded in y.im around inf 75.4%
Taylor expanded in x.re around 0 70.2%
*-commutative70.2%
Simplified70.2%
Final simplification59.0%
(FPCore (x.re x.im y.re y.im) :precision binary64 (if (<= x.re 3.5e-304) (exp (* (atan2 x.im x.re) (- y.im))) (exp (- (* y.re (log x.re)) (* (atan2 x.im x.re) y.im)))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double tmp;
if (x_46_re <= 3.5e-304) {
tmp = exp((atan2(x_46_im, x_46_re) * -y_46_im));
} else {
tmp = exp(((y_46_re * log(x_46_re)) - (atan2(x_46_im, x_46_re) * y_46_im)));
}
return tmp;
}
real(8) function code(x_46re, x_46im, y_46re, y_46im)
real(8), intent (in) :: x_46re
real(8), intent (in) :: x_46im
real(8), intent (in) :: y_46re
real(8), intent (in) :: y_46im
real(8) :: tmp
if (x_46re <= 3.5d-304) then
tmp = exp((atan2(x_46im, x_46re) * -y_46im))
else
tmp = exp(((y_46re * log(x_46re)) - (atan2(x_46im, x_46re) * y_46im)))
end if
code = tmp
end function
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double tmp;
if (x_46_re <= 3.5e-304) {
tmp = Math.exp((Math.atan2(x_46_im, x_46_re) * -y_46_im));
} else {
tmp = Math.exp(((y_46_re * Math.log(x_46_re)) - (Math.atan2(x_46_im, x_46_re) * y_46_im)));
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): tmp = 0 if x_46_re <= 3.5e-304: tmp = math.exp((math.atan2(x_46_im, x_46_re) * -y_46_im)) else: tmp = math.exp(((y_46_re * math.log(x_46_re)) - (math.atan2(x_46_im, x_46_re) * y_46_im))) return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) tmp = 0.0 if (x_46_re <= 3.5e-304) tmp = exp(Float64(atan(x_46_im, x_46_re) * Float64(-y_46_im))); else tmp = exp(Float64(Float64(y_46_re * log(x_46_re)) - Float64(atan(x_46_im, x_46_re) * y_46_im))); end return tmp end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im) tmp = 0.0; if (x_46_re <= 3.5e-304) tmp = exp((atan2(x_46_im, x_46_re) * -y_46_im)); else tmp = exp(((y_46_re * log(x_46_re)) - (atan2(x_46_im, x_46_re) * y_46_im))); end tmp_2 = tmp; end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := If[LessEqual[x$46$re, 3.5e-304], N[Exp[N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * (-y$46$im)), $MachinePrecision]], $MachinePrecision], N[Exp[N[(N[(y$46$re * N[Log[x$46$re], $MachinePrecision]), $MachinePrecision] - N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x.re \leq 3.5 \cdot 10^{-304}:\\
\;\;\;\;e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot \left(-y.im\right)}\\
\mathbf{else}:\\
\;\;\;\;e^{y.re \cdot \log x.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}\\
\end{array}
\end{array}
if x.re < 3.5e-304Initial program 38.5%
Simplified75.4%
fma-udef75.4%
hypot-udef38.5%
*-commutative38.5%
add-cube-cbrt41.0%
pow340.2%
hypot-udef75.4%
*-commutative75.4%
fma-udef75.4%
*-commutative75.4%
Applied egg-rr75.4%
Taylor expanded in y.im around inf 81.1%
Taylor expanded in y.re around 0 54.4%
mul-1-neg54.4%
distribute-rgt-neg-out54.4%
Simplified54.4%
if 3.5e-304 < x.re Initial program 42.4%
Simplified76.1%
fma-udef76.1%
hypot-udef42.4%
*-commutative42.4%
add-cube-cbrt39.3%
pow340.0%
hypot-udef72.3%
*-commutative72.3%
fma-udef72.3%
*-commutative72.3%
Applied egg-rr72.3%
Taylor expanded in y.im around inf 76.1%
Taylor expanded in x.im around 0 69.5%
*-commutative69.5%
Simplified69.5%
Final simplification62.3%
(FPCore (x.re x.im y.re y.im) :precision binary64 (exp (* (atan2 x.im x.re) (- y.im))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
return exp((atan2(x_46_im, x_46_re) * -y_46_im));
}
real(8) function code(x_46re, x_46im, y_46re, y_46im)
real(8), intent (in) :: x_46re
real(8), intent (in) :: x_46im
real(8), intent (in) :: y_46re
real(8), intent (in) :: y_46im
code = exp((atan2(x_46im, x_46re) * -y_46im))
end function
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
return Math.exp((Math.atan2(x_46_im, x_46_re) * -y_46_im));
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): return math.exp((math.atan2(x_46_im, x_46_re) * -y_46_im))
function code(x_46_re, x_46_im, y_46_re, y_46_im) return exp(Float64(atan(x_46_im, x_46_re) * Float64(-y_46_im))) end
function tmp = code(x_46_re, x_46_im, y_46_re, y_46_im) tmp = exp((atan2(x_46_im, x_46_re) * -y_46_im)); end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := N[Exp[N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * (-y$46$im)), $MachinePrecision]], $MachinePrecision]
\begin{array}{l}
\\
e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot \left(-y.im\right)}
\end{array}
Initial program 40.5%
Simplified75.8%
fma-udef75.8%
hypot-udef40.5%
*-commutative40.5%
add-cube-cbrt40.1%
pow340.1%
hypot-udef73.8%
*-commutative73.8%
fma-udef73.8%
*-commutative73.8%
Applied egg-rr73.8%
Taylor expanded in y.im around inf 78.4%
Taylor expanded in y.re around 0 49.5%
mul-1-neg49.5%
distribute-rgt-neg-out49.5%
Simplified49.5%
Final simplification49.5%
(FPCore (x.re x.im y.re y.im) :precision binary64 (exp (* (atan2 x.im x.re) y.im)))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
return exp((atan2(x_46_im, x_46_re) * y_46_im));
}
real(8) function code(x_46re, x_46im, y_46re, y_46im)
real(8), intent (in) :: x_46re
real(8), intent (in) :: x_46im
real(8), intent (in) :: y_46re
real(8), intent (in) :: y_46im
code = exp((atan2(x_46im, x_46re) * y_46im))
end function
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
return Math.exp((Math.atan2(x_46_im, x_46_re) * y_46_im));
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): return math.exp((math.atan2(x_46_im, x_46_re) * y_46_im))
function code(x_46_re, x_46_im, y_46_re, y_46_im) return exp(Float64(atan(x_46_im, x_46_re) * y_46_im)) end
function tmp = code(x_46_re, x_46_im, y_46_re, y_46_im) tmp = exp((atan2(x_46_im, x_46_re) * y_46_im)); end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := N[Exp[N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$im), $MachinePrecision]], $MachinePrecision]
\begin{array}{l}
\\
e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}
\end{array}
Initial program 40.5%
Simplified75.8%
fma-udef75.8%
hypot-udef40.5%
*-commutative40.5%
add-cube-cbrt40.1%
pow340.1%
hypot-udef73.8%
*-commutative73.8%
fma-udef73.8%
*-commutative73.8%
Applied egg-rr73.8%
Taylor expanded in y.im around inf 78.4%
Taylor expanded in y.re around 0 49.5%
mul-1-neg49.5%
distribute-rgt-neg-out49.5%
Simplified49.5%
add-log-exp49.5%
*-un-lft-identity49.5%
log-prod49.5%
metadata-eval49.5%
add-log-exp49.5%
add-sqr-sqrt25.3%
sqrt-unprod38.9%
sqr-neg38.9%
sqrt-unprod14.9%
add-sqr-sqrt26.5%
Applied egg-rr26.5%
+-lft-identity26.5%
Simplified26.5%
Final simplification26.5%
herbie shell --seed 2023171
(FPCore (x.re x.im y.re y.im)
:name "powComplex, real part"
:precision binary64
(* (exp (- (* (log (sqrt (+ (* x.re x.re) (* x.im x.im)))) y.re) (* (atan2 x.im x.re) y.im))) (cos (+ (* (log (sqrt (+ (* x.re x.re) (* x.im x.im)))) y.im) (* (atan2 x.im x.re) y.re)))))