
(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 11 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.re x.im)))
(t_1 (exp (- (* t_0 y.re) (* (atan2 x.im x.re) y.im)))))
(if (<= x.im 8.6e-131)
(* t_1 (cos (pow (cbrt (fma t_0 y.im (* y.re (atan2 x.im x.re)))) 3.0)))
(* t_1 (cos (pow (cbrt (* y.im (log x.im))) 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_re, x_46_im));
double t_1 = exp(((t_0 * y_46_re) - (atan2(x_46_im, x_46_re) * y_46_im)));
double tmp;
if (x_46_im <= 8.6e-131) {
tmp = t_1 * cos(pow(cbrt(fma(t_0, y_46_im, (y_46_re * atan2(x_46_im, x_46_re)))), 3.0));
} else {
tmp = t_1 * cos(pow(cbrt((y_46_im * log(x_46_im))), 3.0));
}
return tmp;
}
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = log(hypot(x_46_re, x_46_im)) t_1 = exp(Float64(Float64(t_0 * y_46_re) - Float64(atan(x_46_im, x_46_re) * y_46_im))) tmp = 0.0 if (x_46_im <= 8.6e-131) tmp = Float64(t_1 * cos((cbrt(fma(t_0, y_46_im, Float64(y_46_re * atan(x_46_im, x_46_re)))) ^ 3.0))); else tmp = Float64(t_1 * cos((cbrt(Float64(y_46_im * log(x_46_im))) ^ 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$re ^ 2 + x$46$im ^ 2], $MachinePrecision]], $MachinePrecision]}, Block[{t$95$1 = 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]}, If[LessEqual[x$46$im, 8.6e-131], N[(t$95$1 * N[Cos[N[Power[N[Power[N[(t$95$0 * y$46$im + N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 1/3], $MachinePrecision], 3.0], $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(t$95$1 * N[Cos[N[Power[N[Power[N[(y$46$im * N[Log[x$46$im], $MachinePrecision]), $MachinePrecision], 1/3], $MachinePrecision], 3.0], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \log \left(\mathsf{hypot}\left(x.re, x.im\right)\right)\\
t_1 := e^{t_0 \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}\\
\mathbf{if}\;x.im \leq 8.6 \cdot 10^{-131}:\\
\;\;\;\;t_1 \cdot \cos \left({\left(\sqrt[3]{\mathsf{fma}\left(t_0, y.im, y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)}\right)}^{3}\right)\\
\mathbf{else}:\\
\;\;\;\;t_1 \cdot \cos \left({\left(\sqrt[3]{y.im \cdot \log x.im}\right)}^{3}\right)\\
\end{array}
\end{array}
if x.im < 8.60000000000000038e-131Initial program 37.4%
Simplified81.4%
fma-udef81.4%
hypot-udef37.4%
*-commutative37.4%
add-cube-cbrt38.9%
pow339.5%
hypot-udef86.4%
*-commutative86.4%
fma-udef86.4%
*-commutative86.4%
Applied egg-rr86.4%
if 8.60000000000000038e-131 < x.im Initial program 44.9%
Simplified76.7%
fma-udef76.7%
hypot-udef44.9%
*-commutative44.9%
add-cube-cbrt49.6%
pow347.3%
hypot-udef80.4%
*-commutative80.4%
fma-udef80.4%
*-commutative80.4%
Applied egg-rr80.4%
Taylor expanded in y.re around 0 20.0%
unpow1/348.5%
unpow248.5%
unpow248.5%
hypot-def86.3%
Simplified86.3%
Taylor expanded in x.re around 0 31.8%
unpow1/389.8%
*-commutative89.8%
Simplified89.8%
Final simplification87.5%
(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.im -1e-308)
(*
t_0
(cos
(pow
(cbrt
(fma -1.0 (* y.im (log (/ -1.0 x.im))) (* y.re (atan2 x.im x.re))))
3.0)))
(* t_0 (cos (pow (cbrt (* y.im (log x.im))) 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_im <= -1e-308) {
tmp = t_0 * cos(pow(cbrt(fma(-1.0, (y_46_im * log((-1.0 / x_46_im))), (y_46_re * atan2(x_46_im, x_46_re)))), 3.0));
} else {
tmp = t_0 * cos(pow(cbrt((y_46_im * log(x_46_im))), 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_im <= -1e-308) tmp = Float64(t_0 * cos((cbrt(fma(-1.0, Float64(y_46_im * log(Float64(-1.0 / x_46_im))), Float64(y_46_re * atan(x_46_im, x_46_re)))) ^ 3.0))); else tmp = Float64(t_0 * cos((cbrt(Float64(y_46_im * log(x_46_im))) ^ 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$im, -1e-308], N[(t$95$0 * N[Cos[N[Power[N[Power[N[(-1.0 * N[(y$46$im * N[Log[N[(-1.0 / x$46$im), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] + N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 1/3], $MachinePrecision], 3.0], $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(t$95$0 * N[Cos[N[Power[N[Power[N[(y$46$im * N[Log[x$46$im], $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.im \leq -1 \cdot 10^{-308}:\\
\;\;\;\;t_0 \cdot \cos \left({\left(\sqrt[3]{\mathsf{fma}\left(-1, y.im \cdot \log \left(\frac{-1}{x.im}\right), y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)}\right)}^{3}\right)\\
\mathbf{else}:\\
\;\;\;\;t_0 \cdot \cos \left({\left(\sqrt[3]{y.im \cdot \log x.im}\right)}^{3}\right)\\
\end{array}
\end{array}
if x.im < -9.9999999999999991e-309Initial program 34.7%
Simplified80.4%
fma-udef80.4%
hypot-udef34.7%
*-commutative34.7%
add-cube-cbrt36.0%
pow336.8%
hypot-udef86.3%
*-commutative86.3%
fma-udef86.3%
*-commutative86.3%
Applied egg-rr86.3%
Taylor expanded in x.im around -inf 35.5%
unpow1/386.6%
fma-def86.6%
Simplified86.6%
if -9.9999999999999991e-309 < x.im Initial program 45.0%
Simplified79.3%
fma-udef79.3%
hypot-udef45.0%
*-commutative45.0%
add-cube-cbrt48.8%
pow347.2%
hypot-udef82.6%
*-commutative82.6%
fma-udef82.6%
*-commutative82.6%
Applied egg-rr82.6%
Taylor expanded in y.re around 0 21.0%
unpow1/348.0%
unpow248.0%
unpow248.0%
hypot-def86.4%
Simplified86.4%
Taylor expanded in x.re around 0 28.5%
unpow1/387.7%
*-commutative87.7%
Simplified87.7%
Final simplification87.1%
(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) (* (atan2 x.im x.re) y.im)))
(cos (pow (* (cbrt t_0) (cbrt y.im)) 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_re, x_46_im));
return exp(((t_0 * y_46_re) - (atan2(x_46_im, x_46_re) * y_46_im))) * cos(pow((cbrt(t_0) * cbrt(y_46_im)), 3.0));
}
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_re, x_46_im));
return Math.exp(((t_0 * y_46_re) - (Math.atan2(x_46_im, x_46_re) * y_46_im))) * Math.cos(Math.pow((Math.cbrt(t_0) * Math.cbrt(y_46_im)), 3.0));
}
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) - Float64(atan(x_46_im, x_46_re) * y_46_im))) * cos((Float64(cbrt(t_0) * cbrt(y_46_im)) ^ 3.0))) end
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[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Cos[N[Power[N[(N[Power[t$95$0, 1/3], $MachinePrecision] * N[Power[y$46$im, 1/3], $MachinePrecision]), $MachinePrecision], 3.0], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\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 \cos \left({\left(\sqrt[3]{t_0} \cdot \sqrt[3]{y.im}\right)}^{3}\right)
\end{array}
\end{array}
Initial program 39.9%
Simplified79.8%
fma-udef79.8%
hypot-udef39.9%
*-commutative39.9%
add-cube-cbrt42.5%
pow342.1%
hypot-udef84.4%
*-commutative84.4%
fma-udef84.4%
*-commutative84.4%
Applied egg-rr84.4%
Taylor expanded in y.re around 0 19.3%
unpow1/342.1%
unpow242.1%
unpow242.1%
hypot-def85.2%
Simplified85.2%
*-commutative85.2%
cbrt-prod85.6%
Applied egg-rr85.6%
hypot-def43.1%
unpow243.1%
unpow243.1%
+-commutative43.1%
unpow243.1%
unpow243.1%
hypot-def85.6%
Simplified85.6%
Final simplification85.6%
(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.im 5e-163)
(* t_0 (log (exp (cos (* y.im (log (hypot x.im x.re)))))))
(* t_0 (cos (pow (cbrt (* y.im (log x.im))) 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_im <= 5e-163) {
tmp = t_0 * log(exp(cos((y_46_im * log(hypot(x_46_im, x_46_re))))));
} else {
tmp = t_0 * cos(pow(cbrt((y_46_im * log(x_46_im))), 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_im <= 5e-163) {
tmp = t_0 * Math.log(Math.exp(Math.cos((y_46_im * Math.log(Math.hypot(x_46_im, x_46_re))))));
} else {
tmp = t_0 * Math.cos(Math.pow(Math.cbrt((y_46_im * Math.log(x_46_im))), 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_im <= 5e-163) tmp = Float64(t_0 * log(exp(cos(Float64(y_46_im * log(hypot(x_46_im, x_46_re))))))); else tmp = Float64(t_0 * cos((cbrt(Float64(y_46_im * log(x_46_im))) ^ 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$im, 5e-163], N[(t$95$0 * N[Log[N[Exp[N[Cos[N[(y$46$im * N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(t$95$0 * N[Cos[N[Power[N[Power[N[(y$46$im * N[Log[x$46$im], $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.im \leq 5 \cdot 10^{-163}:\\
\;\;\;\;t_0 \cdot \log \left(e^{\cos \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right)}\right)\\
\mathbf{else}:\\
\;\;\;\;t_0 \cdot \cos \left({\left(\sqrt[3]{y.im \cdot \log x.im}\right)}^{3}\right)\\
\end{array}
\end{array}
if x.im < 4.99999999999999977e-163Initial program 36.8%
Simplified81.6%
fma-udef81.6%
hypot-udef36.8%
*-commutative36.8%
add-cube-cbrt38.4%
pow339.0%
hypot-udef86.7%
*-commutative86.7%
fma-udef86.7%
*-commutative86.7%
Applied egg-rr86.7%
Taylor expanded in y.re around 0 18.0%
unpow1/338.4%
unpow238.4%
unpow238.4%
hypot-def84.8%
Simplified84.8%
add-log-exp84.8%
unpow384.1%
add-cube-cbrt84.0%
Applied egg-rr84.0%
if 4.99999999999999977e-163 < x.im Initial program 45.4%
Simplified76.8%
fma-udef76.8%
hypot-udef45.4%
*-commutative45.4%
add-cube-cbrt49.7%
pow347.5%
hypot-udef80.5%
*-commutative80.5%
fma-udef80.5%
*-commutative80.5%
Applied egg-rr80.5%
Taylor expanded in y.re around 0 21.5%
unpow1/348.6%
unpow248.6%
unpow248.6%
hypot-def85.8%
Simplified85.8%
Taylor expanded in x.re around 0 30.1%
unpow1/388.9%
*-commutative88.9%
Simplified88.9%
Final simplification85.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))) (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) {
return exp(((log(hypot(x_46_re, x_46_im)) * y_46_re) - (atan2(x_46_im, x_46_re) * y_46_im))) * cos(pow(cbrt((y_46_im * log(hypot(x_46_im, x_46_re)))), 3.0));
}
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))) * Math.cos(Math.pow(Math.cbrt((y_46_im * Math.log(Math.hypot(x_46_im, x_46_re)))), 3.0));
}
function code(x_46_re, x_46_im, y_46_re, y_46_im) return Float64(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))) * cos((cbrt(Float64(y_46_im * log(hypot(x_46_im, x_46_re)))) ^ 3.0))) end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := N[(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] * 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}
\\
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 \cos \left({\left(\sqrt[3]{y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)}\right)}^{3}\right)
\end{array}
Initial program 39.9%
Simplified79.8%
fma-udef79.8%
hypot-udef39.9%
*-commutative39.9%
add-cube-cbrt42.5%
pow342.1%
hypot-udef84.4%
*-commutative84.4%
fma-udef84.4%
*-commutative84.4%
Applied egg-rr84.4%
Taylor expanded in y.re around 0 19.3%
unpow1/342.1%
unpow242.1%
unpow242.1%
hypot-def85.2%
Simplified85.2%
Final simplification85.2%
(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.im 7e-163)
t_0
(* t_0 (cos (pow (cbrt (* y.im (log x.im))) 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_im <= 7e-163) {
tmp = t_0;
} else {
tmp = t_0 * cos(pow(cbrt((y_46_im * log(x_46_im))), 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_im <= 7e-163) {
tmp = t_0;
} else {
tmp = t_0 * Math.cos(Math.pow(Math.cbrt((y_46_im * Math.log(x_46_im))), 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_im <= 7e-163) tmp = t_0; else tmp = Float64(t_0 * cos((cbrt(Float64(y_46_im * log(x_46_im))) ^ 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$im, 7e-163], t$95$0, N[(t$95$0 * N[Cos[N[Power[N[Power[N[(y$46$im * N[Log[x$46$im], $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.im \leq 7 \cdot 10^{-163}:\\
\;\;\;\;t_0\\
\mathbf{else}:\\
\;\;\;\;t_0 \cdot \cos \left({\left(\sqrt[3]{y.im \cdot \log x.im}\right)}^{3}\right)\\
\end{array}
\end{array}
if x.im < 7.00000000000000054e-163Initial program 36.8%
Simplified81.6%
fma-udef81.6%
hypot-udef36.8%
*-commutative36.8%
add-cube-cbrt38.4%
pow339.0%
hypot-udef86.7%
*-commutative86.7%
fma-udef86.7%
*-commutative86.7%
Applied egg-rr86.7%
Taylor expanded in y.im around inf 83.7%
if 7.00000000000000054e-163 < x.im Initial program 45.4%
Simplified76.8%
fma-udef76.8%
hypot-udef45.4%
*-commutative45.4%
add-cube-cbrt49.7%
pow347.5%
hypot-udef80.5%
*-commutative80.5%
fma-udef80.5%
*-commutative80.5%
Applied egg-rr80.5%
Taylor expanded in y.re around 0 21.5%
unpow1/348.6%
unpow248.6%
unpow248.6%
hypot-def85.8%
Simplified85.8%
Taylor expanded in x.re around 0 30.1%
unpow1/388.9%
*-commutative88.9%
Simplified88.9%
Final simplification85.6%
(FPCore (x.re x.im y.re y.im) :precision binary64 (if (or (<= y.re -4.8e-26) (not (<= y.re 7.5e-13))) (exp (* (log (hypot x.re x.im)) y.re)) (* (cos (* y.re (atan2 x.im x.re))) (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 <= -4.8e-26) || !(y_46_re <= 7.5e-13)) {
tmp = exp((log(hypot(x_46_re, x_46_im)) * y_46_re));
} else {
tmp = cos((y_46_re * atan2(x_46_im, x_46_re))) * exp((atan2(x_46_im, x_46_re) * -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 tmp;
if ((y_46_re <= -4.8e-26) || !(y_46_re <= 7.5e-13)) {
tmp = Math.exp((Math.log(Math.hypot(x_46_re, x_46_im)) * y_46_re));
} else {
tmp = Math.cos((y_46_re * Math.atan2(x_46_im, x_46_re))) * 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 <= -4.8e-26) or not (y_46_re <= 7.5e-13): tmp = math.exp((math.log(math.hypot(x_46_re, x_46_im)) * y_46_re)) else: tmp = math.cos((y_46_re * math.atan2(x_46_im, x_46_re))) * 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 <= -4.8e-26) || !(y_46_re <= 7.5e-13)) tmp = exp(Float64(log(hypot(x_46_re, x_46_im)) * y_46_re)); else tmp = Float64(cos(Float64(y_46_re * atan(x_46_im, x_46_re))) * 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 <= -4.8e-26) || ~((y_46_re <= 7.5e-13))) tmp = exp((log(hypot(x_46_re, x_46_im)) * y_46_re)); else tmp = cos((y_46_re * atan2(x_46_im, x_46_re))) * 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, -4.8e-26], N[Not[LessEqual[y$46$re, 7.5e-13]], $MachinePrecision]], N[Exp[N[(N[Log[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision]], $MachinePrecision] * y$46$re), $MachinePrecision]], $MachinePrecision], N[(N[Cos[N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Exp[N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * (-y$46$im)), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y.re \leq -4.8 \cdot 10^{-26} \lor \neg \left(y.re \leq 7.5 \cdot 10^{-13}\right):\\
\;\;\;\;e^{\log \left(\mathsf{hypot}\left(x.re, x.im\right)\right) \cdot y.re}\\
\mathbf{else}:\\
\;\;\;\;\cos \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)}\\
\end{array}
\end{array}
if y.re < -4.8000000000000002e-26 or 7.5000000000000004e-13 < y.re Initial program 44.2%
Simplified77.6%
fma-udef77.6%
hypot-udef44.2%
*-commutative44.2%
add-cube-cbrt48.0%
pow347.3%
hypot-udef84.4%
*-commutative84.4%
fma-udef84.4%
*-commutative84.4%
Applied egg-rr84.4%
Taylor expanded in y.im around inf 82.2%
Taylor expanded in y.re around inf 77.8%
+-commutative77.8%
unpow277.8%
unpow277.8%
hypot-def78.5%
Simplified78.5%
if -4.8000000000000002e-26 < y.re < 7.5000000000000004e-13Initial program 35.4%
Simplified82.2%
Taylor expanded in x.im around -inf 37.0%
+-commutative37.0%
mul-1-neg37.0%
unsub-neg37.0%
*-commutative37.0%
Simplified37.0%
Taylor expanded in y.re around 0 37.0%
neg-mul-182.7%
distribute-rgt-neg-in82.7%
Simplified37.0%
Taylor expanded in y.im around 0 82.7%
Final simplification80.5%
(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 39.9%
Simplified79.8%
fma-udef79.8%
hypot-udef39.9%
*-commutative39.9%
add-cube-cbrt42.5%
pow342.1%
hypot-udef84.4%
*-commutative84.4%
fma-udef84.4%
*-commutative84.4%
Applied egg-rr84.4%
Taylor expanded in y.im around inf 82.4%
Final simplification82.4%
(FPCore (x.re x.im y.re y.im) :precision binary64 (if (or (<= y.re -4.8e-26) (not (<= y.re 2.8e-12))) (exp (* (log (hypot x.re x.im)) y.re)) (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 <= -4.8e-26) || !(y_46_re <= 2.8e-12)) {
tmp = exp((log(hypot(x_46_re, x_46_im)) * y_46_re));
} else {
tmp = exp((atan2(x_46_im, x_46_re) * -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 tmp;
if ((y_46_re <= -4.8e-26) || !(y_46_re <= 2.8e-12)) {
tmp = Math.exp((Math.log(Math.hypot(x_46_re, x_46_im)) * y_46_re));
} 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 <= -4.8e-26) or not (y_46_re <= 2.8e-12): tmp = math.exp((math.log(math.hypot(x_46_re, x_46_im)) * y_46_re)) 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 <= -4.8e-26) || !(y_46_re <= 2.8e-12)) tmp = exp(Float64(log(hypot(x_46_re, x_46_im)) * y_46_re)); 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 <= -4.8e-26) || ~((y_46_re <= 2.8e-12))) tmp = exp((log(hypot(x_46_re, x_46_im)) * y_46_re)); 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, -4.8e-26], N[Not[LessEqual[y$46$re, 2.8e-12]], $MachinePrecision]], N[Exp[N[(N[Log[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision]], $MachinePrecision] * y$46$re), $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 -4.8 \cdot 10^{-26} \lor \neg \left(y.re \leq 2.8 \cdot 10^{-12}\right):\\
\;\;\;\;e^{\log \left(\mathsf{hypot}\left(x.re, x.im\right)\right) \cdot y.re}\\
\mathbf{else}:\\
\;\;\;\;e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot \left(-y.im\right)}\\
\end{array}
\end{array}
if y.re < -4.8000000000000002e-26 or 2.8000000000000002e-12 < y.re Initial program 44.2%
Simplified77.6%
fma-udef77.6%
hypot-udef44.2%
*-commutative44.2%
add-cube-cbrt48.0%
pow347.3%
hypot-udef84.4%
*-commutative84.4%
fma-udef84.4%
*-commutative84.4%
Applied egg-rr84.4%
Taylor expanded in y.im around inf 82.2%
Taylor expanded in y.re around inf 77.8%
+-commutative77.8%
unpow277.8%
unpow277.8%
hypot-def78.5%
Simplified78.5%
if -4.8000000000000002e-26 < y.re < 2.8000000000000002e-12Initial program 35.4%
Simplified82.2%
fma-udef82.2%
hypot-udef35.4%
*-commutative35.4%
add-cube-cbrt36.6%
pow336.6%
hypot-udef84.4%
*-commutative84.4%
fma-udef84.4%
*-commutative84.4%
Applied egg-rr84.4%
Taylor expanded in y.im around inf 82.7%
Taylor expanded in y.re around 0 82.7%
neg-mul-182.7%
distribute-rgt-neg-in82.7%
Simplified82.7%
Final simplification80.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) * 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 39.9%
Simplified79.8%
fma-udef79.8%
hypot-udef39.9%
*-commutative39.9%
add-cube-cbrt42.5%
pow342.1%
hypot-udef84.4%
*-commutative84.4%
fma-udef84.4%
*-commutative84.4%
Applied egg-rr84.4%
Taylor expanded in y.im around inf 82.4%
Taylor expanded in y.re around 0 52.0%
neg-mul-152.0%
distribute-rgt-neg-in52.0%
Simplified52.0%
Final simplification52.0%
(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 39.9%
Simplified79.8%
fma-udef79.8%
hypot-udef39.9%
*-commutative39.9%
add-cube-cbrt42.5%
pow342.1%
hypot-udef84.4%
*-commutative84.4%
fma-udef84.4%
*-commutative84.4%
Applied egg-rr84.4%
Taylor expanded in y.im around inf 82.4%
Taylor expanded in y.re around 0 52.0%
neg-mul-152.0%
distribute-rgt-neg-in52.0%
Simplified52.0%
expm1-log1p-u33.6%
expm1-udef33.6%
add-sqr-sqrt18.4%
sqrt-unprod31.5%
sqr-neg31.5%
sqrt-unprod16.3%
add-sqr-sqrt29.5%
Applied egg-rr29.5%
expm1-def29.5%
expm1-log1p31.3%
Simplified31.3%
Final simplification31.3%
herbie shell --seed 2023224
(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)))))