
(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)))
(sin (+ (* 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))) * sin(((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))) * sin(((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.sin(((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.sin(((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))) * sin(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))) * sin(((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[Sin[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 \sin \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 18 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)))
(sin (+ (* 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))) * sin(((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))) * sin(((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.sin(((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.sin(((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))) * sin(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))) * sin(((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[Sin[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 \sin \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 (* y.re (atan2 x.im x.re)))
(t_1 (log (hypot x.re x.im)))
(t_2 (exp (fma t_1 y.re (* (atan2 x.im x.re) (- y.im))))))
(if (<= x.im -1.55e-24)
(* t_2 (sin (fma t_1 y.im t_0)))
(* t_2 (sin (pow (cbrt (fma y.im t_1 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 = y_46_re * atan2(x_46_im, x_46_re);
double t_1 = log(hypot(x_46_re, x_46_im));
double t_2 = exp(fma(t_1, y_46_re, (atan2(x_46_im, x_46_re) * -y_46_im)));
double tmp;
if (x_46_im <= -1.55e-24) {
tmp = t_2 * sin(fma(t_1, y_46_im, t_0));
} else {
tmp = t_2 * sin(pow(cbrt(fma(y_46_im, t_1, t_0)), 3.0));
}
return tmp;
}
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = Float64(y_46_re * atan(x_46_im, x_46_re)) t_1 = log(hypot(x_46_re, x_46_im)) t_2 = exp(fma(t_1, y_46_re, Float64(atan(x_46_im, x_46_re) * Float64(-y_46_im)))) tmp = 0.0 if (x_46_im <= -1.55e-24) tmp = Float64(t_2 * sin(fma(t_1, y_46_im, t_0))); else tmp = Float64(t_2 * sin((cbrt(fma(y_46_im, t_1, 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[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[Log[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision]], $MachinePrecision]}, Block[{t$95$2 = N[Exp[N[(t$95$1 * y$46$re + N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * (-y$46$im)), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[x$46$im, -1.55e-24], N[(t$95$2 * N[Sin[N[(t$95$1 * y$46$im + t$95$0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(t$95$2 * N[Sin[N[Power[N[Power[N[(y$46$im * t$95$1 + t$95$0), $MachinePrecision], 1/3], $MachinePrecision], 3.0], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
t_1 := \log \left(\mathsf{hypot}\left(x.re, x.im\right)\right)\\
t_2 := e^{\mathsf{fma}\left(t_1, y.re, \tan^{-1}_* \frac{x.im}{x.re} \cdot \left(-y.im\right)\right)}\\
\mathbf{if}\;x.im \leq -1.55 \cdot 10^{-24}:\\
\;\;\;\;t_2 \cdot \sin \left(\mathsf{fma}\left(t_1, y.im, t_0\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t_2 \cdot \sin \left({\left(\sqrt[3]{\mathsf{fma}\left(y.im, t_1, t_0\right)}\right)}^{3}\right)\\
\end{array}
\end{array}
if x.im < -1.55e-24Initial program 34.7%
fma-neg34.7%
hypot-def34.7%
distribute-rgt-neg-out34.7%
fma-def34.7%
hypot-def85.6%
*-commutative85.6%
Simplified85.6%
if -1.55e-24 < x.im Initial program 40.1%
fma-neg40.1%
hypot-def40.1%
distribute-rgt-neg-out40.1%
fma-def40.1%
hypot-def74.0%
*-commutative74.0%
Simplified74.0%
add-cube-cbrt80.0%
pow380.5%
fma-udef80.5%
*-commutative80.5%
*-commutative80.5%
fma-def80.5%
Applied egg-rr80.5%
Final simplification81.9%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (log (hypot x.re x.im)))
(t_1 (* y.re (atan2 x.im x.re)))
(t_2 (log (sqrt (+ (* x.re x.re) (* x.im x.im)))))
(t_3
(*
(exp (- (* y.re t_2) (* (atan2 x.im x.re) y.im)))
(sin (+ t_1 (* y.im t_2)))))
(t_4 (exp (fma t_0 y.re (* (atan2 x.im x.re) (- y.im))))))
(if (<= t_3 1.0)
t_3
(if (<= t_3 INFINITY)
(* t_4 (sin (pow (cbrt (* y.im (log (hypot x.im x.re)))) 3.0)))
(* t_4 (sin (fma t_0 y.im t_1)))))))
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 = y_46_re * atan2(x_46_im, x_46_re);
double t_2 = log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))));
double t_3 = exp(((y_46_re * t_2) - (atan2(x_46_im, x_46_re) * y_46_im))) * sin((t_1 + (y_46_im * t_2)));
double t_4 = exp(fma(t_0, y_46_re, (atan2(x_46_im, x_46_re) * -y_46_im)));
double tmp;
if (t_3 <= 1.0) {
tmp = t_3;
} else if (t_3 <= ((double) INFINITY)) {
tmp = t_4 * sin(pow(cbrt((y_46_im * log(hypot(x_46_im, x_46_re)))), 3.0));
} else {
tmp = t_4 * sin(fma(t_0, y_46_im, t_1));
}
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 = Float64(y_46_re * atan(x_46_im, x_46_re)) t_2 = log(sqrt(Float64(Float64(x_46_re * x_46_re) + Float64(x_46_im * x_46_im)))) t_3 = Float64(exp(Float64(Float64(y_46_re * t_2) - Float64(atan(x_46_im, x_46_re) * y_46_im))) * sin(Float64(t_1 + Float64(y_46_im * t_2)))) t_4 = exp(fma(t_0, y_46_re, Float64(atan(x_46_im, x_46_re) * Float64(-y_46_im)))) tmp = 0.0 if (t_3 <= 1.0) tmp = t_3; elseif (t_3 <= Inf) tmp = Float64(t_4 * sin((cbrt(Float64(y_46_im * log(hypot(x_46_im, x_46_re)))) ^ 3.0))); else tmp = Float64(t_4 * sin(fma(t_0, y_46_im, t_1))); 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[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[Log[N[Sqrt[N[(N[(x$46$re * x$46$re), $MachinePrecision] + N[(x$46$im * x$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]}, Block[{t$95$3 = N[(N[Exp[N[(N[(y$46$re * t$95$2), $MachinePrecision] - N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Sin[N[(t$95$1 + N[(y$46$im * t$95$2), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[Exp[N[(t$95$0 * y$46$re + N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * (-y$46$im)), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[t$95$3, 1.0], t$95$3, If[LessEqual[t$95$3, Infinity], N[(t$95$4 * N[Sin[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], N[(t$95$4 * N[Sin[N[(t$95$0 * y$46$im + t$95$1), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \log \left(\mathsf{hypot}\left(x.re, x.im\right)\right)\\
t_1 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
t_2 := \log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right)\\
t_3 := e^{y.re \cdot t_2 - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \sin \left(t_1 + y.im \cdot t_2\right)\\
t_4 := e^{\mathsf{fma}\left(t_0, y.re, \tan^{-1}_* \frac{x.im}{x.re} \cdot \left(-y.im\right)\right)}\\
\mathbf{if}\;t_3 \leq 1:\\
\;\;\;\;t_3\\
\mathbf{elif}\;t_3 \leq \infty:\\
\;\;\;\;t_4 \cdot \sin \left({\left(\sqrt[3]{y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)}\right)}^{3}\right)\\
\mathbf{else}:\\
\;\;\;\;t_4 \cdot \sin \left(\mathsf{fma}\left(t_0, y.im, t_1\right)\right)\\
\end{array}
\end{array}
if (*.f64 (exp.f64 (-.f64 (*.f64 (log.f64 (sqrt.f64 (+.f64 (*.f64 x.re x.re) (*.f64 x.im x.im)))) y.re) (*.f64 (atan2.f64 x.im x.re) y.im))) (sin.f64 (+.f64 (*.f64 (log.f64 (sqrt.f64 (+.f64 (*.f64 x.re x.re) (*.f64 x.im x.im)))) y.im) (*.f64 (atan2.f64 x.im x.re) y.re)))) < 1Initial program 88.0%
if 1 < (*.f64 (exp.f64 (-.f64 (*.f64 (log.f64 (sqrt.f64 (+.f64 (*.f64 x.re x.re) (*.f64 x.im x.im)))) y.re) (*.f64 (atan2.f64 x.im x.re) y.im))) (sin.f64 (+.f64 (*.f64 (log.f64 (sqrt.f64 (+.f64 (*.f64 x.re x.re) (*.f64 x.im x.im)))) y.im) (*.f64 (atan2.f64 x.im x.re) y.re)))) < +inf.0Initial program 34.4%
fma-neg34.4%
hypot-def34.4%
distribute-rgt-neg-out34.4%
fma-def34.4%
hypot-def34.4%
*-commutative34.4%
Simplified34.4%
add-cube-cbrt46.9%
pow346.9%
fma-udef46.9%
*-commutative46.9%
*-commutative46.9%
fma-def46.9%
Applied egg-rr46.9%
Taylor expanded in y.re around 0 21.9%
unpow1/356.3%
unpow256.3%
unpow256.3%
hypot-def56.3%
Simplified56.3%
if +inf.0 < (*.f64 (exp.f64 (-.f64 (*.f64 (log.f64 (sqrt.f64 (+.f64 (*.f64 x.re x.re) (*.f64 x.im x.im)))) y.re) (*.f64 (atan2.f64 x.im x.re) y.im))) (sin.f64 (+.f64 (*.f64 (log.f64 (sqrt.f64 (+.f64 (*.f64 x.re x.re) (*.f64 x.im x.im)))) y.im) (*.f64 (atan2.f64 x.im x.re) y.re)))) Initial program 0.0%
fma-neg0.0%
hypot-def0.0%
distribute-rgt-neg-out0.0%
fma-def0.0%
hypot-def79.4%
*-commutative79.4%
Simplified79.4%
Final simplification79.8%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (* y.re (atan2 x.im x.re)))
(t_1 (log (hypot x.re x.im)))
(t_2 (log (sqrt (+ (* x.re x.re) (* x.im x.im)))))
(t_3
(*
(exp (- (* y.re t_2) (* (atan2 x.im x.re) y.im)))
(sin (+ t_0 (* y.im t_2)))))
(t_4 (exp (fma t_1 y.re (* (atan2 x.im x.re) (- y.im))))))
(if (<= t_3 1.0)
(* t_4 (sin (fma (atan2 x.im x.re) y.re (* t_1 y.im))))
(if (<= t_3 INFINITY)
(* t_4 (sin (pow (cbrt (* y.im (log (hypot x.im x.re)))) 3.0)))
(* t_4 (sin (fma t_1 y.im t_0)))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = y_46_re * atan2(x_46_im, x_46_re);
double t_1 = log(hypot(x_46_re, x_46_im));
double t_2 = log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))));
double t_3 = exp(((y_46_re * t_2) - (atan2(x_46_im, x_46_re) * y_46_im))) * sin((t_0 + (y_46_im * t_2)));
double t_4 = exp(fma(t_1, y_46_re, (atan2(x_46_im, x_46_re) * -y_46_im)));
double tmp;
if (t_3 <= 1.0) {
tmp = t_4 * sin(fma(atan2(x_46_im, x_46_re), y_46_re, (t_1 * y_46_im)));
} else if (t_3 <= ((double) INFINITY)) {
tmp = t_4 * sin(pow(cbrt((y_46_im * log(hypot(x_46_im, x_46_re)))), 3.0));
} else {
tmp = t_4 * sin(fma(t_1, y_46_im, t_0));
}
return tmp;
}
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = Float64(y_46_re * atan(x_46_im, x_46_re)) t_1 = log(hypot(x_46_re, x_46_im)) t_2 = log(sqrt(Float64(Float64(x_46_re * x_46_re) + Float64(x_46_im * x_46_im)))) t_3 = Float64(exp(Float64(Float64(y_46_re * t_2) - Float64(atan(x_46_im, x_46_re) * y_46_im))) * sin(Float64(t_0 + Float64(y_46_im * t_2)))) t_4 = exp(fma(t_1, y_46_re, Float64(atan(x_46_im, x_46_re) * Float64(-y_46_im)))) tmp = 0.0 if (t_3 <= 1.0) tmp = Float64(t_4 * sin(fma(atan(x_46_im, x_46_re), y_46_re, Float64(t_1 * y_46_im)))); elseif (t_3 <= Inf) tmp = Float64(t_4 * sin((cbrt(Float64(y_46_im * log(hypot(x_46_im, x_46_re)))) ^ 3.0))); else tmp = Float64(t_4 * sin(fma(t_1, y_46_im, t_0))); end return tmp end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[Log[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision]], $MachinePrecision]}, Block[{t$95$2 = N[Log[N[Sqrt[N[(N[(x$46$re * x$46$re), $MachinePrecision] + N[(x$46$im * x$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]}, Block[{t$95$3 = N[(N[Exp[N[(N[(y$46$re * t$95$2), $MachinePrecision] - N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Sin[N[(t$95$0 + N[(y$46$im * t$95$2), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[Exp[N[(t$95$1 * y$46$re + N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * (-y$46$im)), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[t$95$3, 1.0], N[(t$95$4 * N[Sin[N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$re + N[(t$95$1 * y$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$3, Infinity], N[(t$95$4 * N[Sin[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], N[(t$95$4 * N[Sin[N[(t$95$1 * y$46$im + t$95$0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
t_1 := \log \left(\mathsf{hypot}\left(x.re, x.im\right)\right)\\
t_2 := \log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right)\\
t_3 := e^{y.re \cdot t_2 - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \sin \left(t_0 + y.im \cdot t_2\right)\\
t_4 := e^{\mathsf{fma}\left(t_1, y.re, \tan^{-1}_* \frac{x.im}{x.re} \cdot \left(-y.im\right)\right)}\\
\mathbf{if}\;t_3 \leq 1:\\
\;\;\;\;t_4 \cdot \sin \left(\mathsf{fma}\left(\tan^{-1}_* \frac{x.im}{x.re}, y.re, t_1 \cdot y.im\right)\right)\\
\mathbf{elif}\;t_3 \leq \infty:\\
\;\;\;\;t_4 \cdot \sin \left({\left(\sqrt[3]{y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)}\right)}^{3}\right)\\
\mathbf{else}:\\
\;\;\;\;t_4 \cdot \sin \left(\mathsf{fma}\left(t_1, y.im, t_0\right)\right)\\
\end{array}
\end{array}
if (*.f64 (exp.f64 (-.f64 (*.f64 (log.f64 (sqrt.f64 (+.f64 (*.f64 x.re x.re) (*.f64 x.im x.im)))) y.re) (*.f64 (atan2.f64 x.im x.re) y.im))) (sin.f64 (+.f64 (*.f64 (log.f64 (sqrt.f64 (+.f64 (*.f64 x.re x.re) (*.f64 x.im x.im)))) y.im) (*.f64 (atan2.f64 x.im x.re) y.re)))) < 1Initial program 88.0%
fma-neg88.0%
hypot-def88.0%
distribute-rgt-neg-out88.0%
fma-def88.0%
hypot-def88.0%
*-commutative88.0%
Simplified88.0%
add-cube-cbrt88.2%
pow388.2%
fma-udef88.2%
*-commutative88.2%
*-commutative88.2%
fma-def88.2%
Applied egg-rr88.2%
Applied egg-rr50.6%
expm1-def88.0%
expm1-log1p88.0%
Simplified88.0%
if 1 < (*.f64 (exp.f64 (-.f64 (*.f64 (log.f64 (sqrt.f64 (+.f64 (*.f64 x.re x.re) (*.f64 x.im x.im)))) y.re) (*.f64 (atan2.f64 x.im x.re) y.im))) (sin.f64 (+.f64 (*.f64 (log.f64 (sqrt.f64 (+.f64 (*.f64 x.re x.re) (*.f64 x.im x.im)))) y.im) (*.f64 (atan2.f64 x.im x.re) y.re)))) < +inf.0Initial program 34.4%
fma-neg34.4%
hypot-def34.4%
distribute-rgt-neg-out34.4%
fma-def34.4%
hypot-def34.4%
*-commutative34.4%
Simplified34.4%
add-cube-cbrt46.9%
pow346.9%
fma-udef46.9%
*-commutative46.9%
*-commutative46.9%
fma-def46.9%
Applied egg-rr46.9%
Taylor expanded in y.re around 0 21.9%
unpow1/356.3%
unpow256.3%
unpow256.3%
hypot-def56.3%
Simplified56.3%
if +inf.0 < (*.f64 (exp.f64 (-.f64 (*.f64 (log.f64 (sqrt.f64 (+.f64 (*.f64 x.re x.re) (*.f64 x.im x.im)))) y.re) (*.f64 (atan2.f64 x.im x.re) y.im))) (sin.f64 (+.f64 (*.f64 (log.f64 (sqrt.f64 (+.f64 (*.f64 x.re x.re) (*.f64 x.im x.im)))) y.im) (*.f64 (atan2.f64 x.im x.re) y.re)))) Initial program 0.0%
fma-neg0.0%
hypot-def0.0%
distribute-rgt-neg-out0.0%
fma-def0.0%
hypot-def79.4%
*-commutative79.4%
Simplified79.4%
Final simplification79.8%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (log (hypot x.re x.im)))
(t_1 (log (sqrt (+ (* x.re x.re) (* x.im x.im)))))
(t_2 (exp (- (* y.re t_1) (* (atan2 x.im x.re) y.im))))
(t_3 (* y.re (atan2 x.im x.re)))
(t_4 (* t_2 (sin (+ t_3 (* y.im t_1))))))
(if (<= t_4 1e-200)
(* t_2 (sin (+ t_3 (pow (cbrt (* t_0 y.im)) 3.0))))
(if (<= t_4 INFINITY)
(* t_2 (sin (+ t_3 (fabs (* y.im (log (hypot x.im x.re)))))))
(*
(exp (fma t_0 y.re (* (atan2 x.im x.re) (- y.im))))
(sin (fma t_0 y.im t_3)))))))
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 = log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))));
double t_2 = exp(((y_46_re * t_1) - (atan2(x_46_im, x_46_re) * y_46_im)));
double t_3 = y_46_re * atan2(x_46_im, x_46_re);
double t_4 = t_2 * sin((t_3 + (y_46_im * t_1)));
double tmp;
if (t_4 <= 1e-200) {
tmp = t_2 * sin((t_3 + pow(cbrt((t_0 * y_46_im)), 3.0)));
} else if (t_4 <= ((double) INFINITY)) {
tmp = t_2 * sin((t_3 + fabs((y_46_im * log(hypot(x_46_im, x_46_re))))));
} else {
tmp = exp(fma(t_0, y_46_re, (atan2(x_46_im, x_46_re) * -y_46_im))) * sin(fma(t_0, y_46_im, t_3));
}
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 = log(sqrt(Float64(Float64(x_46_re * x_46_re) + Float64(x_46_im * x_46_im)))) t_2 = exp(Float64(Float64(y_46_re * t_1) - Float64(atan(x_46_im, x_46_re) * y_46_im))) t_3 = Float64(y_46_re * atan(x_46_im, x_46_re)) t_4 = Float64(t_2 * sin(Float64(t_3 + Float64(y_46_im * t_1)))) tmp = 0.0 if (t_4 <= 1e-200) tmp = Float64(t_2 * sin(Float64(t_3 + (cbrt(Float64(t_0 * y_46_im)) ^ 3.0)))); elseif (t_4 <= Inf) tmp = Float64(t_2 * sin(Float64(t_3 + abs(Float64(y_46_im * log(hypot(x_46_im, x_46_re))))))); else tmp = Float64(exp(fma(t_0, y_46_re, Float64(atan(x_46_im, x_46_re) * Float64(-y_46_im)))) * sin(fma(t_0, y_46_im, t_3))); 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[Log[N[Sqrt[N[(N[(x$46$re * x$46$re), $MachinePrecision] + N[(x$46$im * x$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]}, Block[{t$95$2 = N[Exp[N[(N[(y$46$re * t$95$1), $MachinePrecision] - N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$3 = N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[(t$95$2 * N[Sin[N[(t$95$3 + N[(y$46$im * t$95$1), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$4, 1e-200], N[(t$95$2 * N[Sin[N[(t$95$3 + N[Power[N[Power[N[(t$95$0 * y$46$im), $MachinePrecision], 1/3], $MachinePrecision], 3.0], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$4, Infinity], N[(t$95$2 * N[Sin[N[(t$95$3 + N[Abs[N[(y$46$im * N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(N[Exp[N[(t$95$0 * y$46$re + N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * (-y$46$im)), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Sin[N[(t$95$0 * y$46$im + t$95$3), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \log \left(\mathsf{hypot}\left(x.re, x.im\right)\right)\\
t_1 := \log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right)\\
t_2 := e^{y.re \cdot t_1 - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}\\
t_3 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
t_4 := t_2 \cdot \sin \left(t_3 + y.im \cdot t_1\right)\\
\mathbf{if}\;t_4 \leq 10^{-200}:\\
\;\;\;\;t_2 \cdot \sin \left(t_3 + {\left(\sqrt[3]{t_0 \cdot y.im}\right)}^{3}\right)\\
\mathbf{elif}\;t_4 \leq \infty:\\
\;\;\;\;t_2 \cdot \sin \left(t_3 + \left|y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right|\right)\\
\mathbf{else}:\\
\;\;\;\;e^{\mathsf{fma}\left(t_0, y.re, \tan^{-1}_* \frac{x.im}{x.re} \cdot \left(-y.im\right)\right)} \cdot \sin \left(\mathsf{fma}\left(t_0, y.im, t_3\right)\right)\\
\end{array}
\end{array}
if (*.f64 (exp.f64 (-.f64 (*.f64 (log.f64 (sqrt.f64 (+.f64 (*.f64 x.re x.re) (*.f64 x.im x.im)))) y.re) (*.f64 (atan2.f64 x.im x.re) y.im))) (sin.f64 (+.f64 (*.f64 (log.f64 (sqrt.f64 (+.f64 (*.f64 x.re x.re) (*.f64 x.im x.im)))) y.im) (*.f64 (atan2.f64 x.im x.re) y.re)))) < 9.9999999999999998e-201Initial program 87.3%
add-cube-cbrt87.2%
pow389.7%
*-commutative89.7%
hypot-udef89.7%
Applied egg-rr89.7%
if 9.9999999999999998e-201 < (*.f64 (exp.f64 (-.f64 (*.f64 (log.f64 (sqrt.f64 (+.f64 (*.f64 x.re x.re) (*.f64 x.im x.im)))) y.re) (*.f64 (atan2.f64 x.im x.re) y.im))) (sin.f64 (+.f64 (*.f64 (log.f64 (sqrt.f64 (+.f64 (*.f64 x.re x.re) (*.f64 x.im x.im)))) y.im) (*.f64 (atan2.f64 x.im x.re) y.re)))) < +inf.0Initial program 56.1%
add-sqr-sqrt40.2%
sqrt-unprod55.5%
pow255.5%
*-commutative55.5%
hypot-udef55.5%
Applied egg-rr55.5%
unpow255.5%
rem-sqrt-square69.5%
hypot-def69.5%
unpow269.5%
unpow269.5%
+-commutative69.5%
unpow269.5%
unpow269.5%
hypot-def69.5%
Simplified69.5%
if +inf.0 < (*.f64 (exp.f64 (-.f64 (*.f64 (log.f64 (sqrt.f64 (+.f64 (*.f64 x.re x.re) (*.f64 x.im x.im)))) y.re) (*.f64 (atan2.f64 x.im x.re) y.im))) (sin.f64 (+.f64 (*.f64 (log.f64 (sqrt.f64 (+.f64 (*.f64 x.re x.re) (*.f64 x.im x.im)))) y.im) (*.f64 (atan2.f64 x.im x.re) y.re)))) Initial program 0.0%
fma-neg0.0%
hypot-def0.0%
distribute-rgt-neg-out0.0%
fma-def0.0%
hypot-def79.4%
*-commutative79.4%
Simplified79.4%
Final simplification80.6%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (log (hypot x.re x.im))))
(if (or (<= y.im -1.75e+31) (not (<= y.im 6.6e-142)))
(*
(exp (fma t_0 y.re (* (atan2 x.im x.re) (- y.im))))
(sin (pow (cbrt (* y.im (log (hypot x.im x.re)))) 3.0)))
(*
(sin (fma t_0 y.im (* y.re (atan2 x.im x.re))))
(/ (pow (hypot x.re x.im) y.re) (pow (exp y.im) (atan2 x.im x.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));
double tmp;
if ((y_46_im <= -1.75e+31) || !(y_46_im <= 6.6e-142)) {
tmp = exp(fma(t_0, y_46_re, (atan2(x_46_im, x_46_re) * -y_46_im))) * sin(pow(cbrt((y_46_im * log(hypot(x_46_im, x_46_re)))), 3.0));
} else {
tmp = sin(fma(t_0, y_46_im, (y_46_re * atan2(x_46_im, x_46_re)))) * (pow(hypot(x_46_re, x_46_im), y_46_re) / pow(exp(y_46_im), atan2(x_46_im, x_46_re)));
}
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)) tmp = 0.0 if ((y_46_im <= -1.75e+31) || !(y_46_im <= 6.6e-142)) tmp = Float64(exp(fma(t_0, y_46_re, Float64(atan(x_46_im, x_46_re) * Float64(-y_46_im)))) * sin((cbrt(Float64(y_46_im * log(hypot(x_46_im, x_46_re)))) ^ 3.0))); else tmp = Float64(sin(fma(t_0, y_46_im, Float64(y_46_re * atan(x_46_im, x_46_re)))) * Float64((hypot(x_46_re, x_46_im) ^ y_46_re) / (exp(y_46_im) ^ atan(x_46_im, x_46_re)))); 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]}, If[Or[LessEqual[y$46$im, -1.75e+31], N[Not[LessEqual[y$46$im, 6.6e-142]], $MachinePrecision]], N[(N[Exp[N[(t$95$0 * y$46$re + N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * (-y$46$im)), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Sin[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], N[(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] * N[(N[Power[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision], y$46$re], $MachinePrecision] / N[Power[N[Exp[y$46$im], $MachinePrecision], N[ArcTan[x$46$im / x$46$re], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \log \left(\mathsf{hypot}\left(x.re, x.im\right)\right)\\
\mathbf{if}\;y.im \leq -1.75 \cdot 10^{+31} \lor \neg \left(y.im \leq 6.6 \cdot 10^{-142}\right):\\
\;\;\;\;e^{\mathsf{fma}\left(t_0, y.re, \tan^{-1}_* \frac{x.im}{x.re} \cdot \left(-y.im\right)\right)} \cdot \sin \left({\left(\sqrt[3]{y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)}\right)}^{3}\right)\\
\mathbf{else}:\\
\;\;\;\;\sin \left(\mathsf{fma}\left(t_0, y.im, y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right) \cdot \frac{{\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re}}{{\left(e^{y.im}\right)}^{\tan^{-1}_* \frac{x.im}{x.re}}}\\
\end{array}
\end{array}
if y.im < -1.75e31 or 6.5999999999999994e-142 < y.im Initial program 34.6%
fma-neg34.6%
hypot-def34.6%
distribute-rgt-neg-out34.6%
fma-def34.6%
hypot-def67.4%
*-commutative67.4%
Simplified67.4%
add-cube-cbrt72.9%
pow372.3%
fma-udef72.3%
*-commutative72.3%
*-commutative72.3%
fma-def72.3%
Applied egg-rr72.3%
Taylor expanded in y.re around 0 23.8%
unpow1/339.9%
unpow239.9%
unpow239.9%
hypot-def72.9%
Simplified72.9%
if -1.75e31 < y.im < 6.5999999999999994e-142Initial program 44.0%
exp-diff44.0%
exp-to-pow44.0%
hypot-def44.0%
*-commutative44.0%
exp-prod44.0%
fma-def44.0%
hypot-def89.8%
*-commutative89.8%
Simplified89.8%
Final simplification80.2%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (log (hypot x.re x.im))))
(if (or (<= y.im -15.0) (not (<= y.im 6e-142)))
(*
(exp (fma t_0 y.re (* (atan2 x.im x.re) (- y.im))))
(sin (pow (cbrt (* y.im (log (hypot x.im x.re)))) 3.0)))
(*
(sin (fma t_0 y.im (* y.re (atan2 x.im x.re))))
(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 t_0 = log(hypot(x_46_re, x_46_im));
double tmp;
if ((y_46_im <= -15.0) || !(y_46_im <= 6e-142)) {
tmp = exp(fma(t_0, y_46_re, (atan2(x_46_im, x_46_re) * -y_46_im))) * sin(pow(cbrt((y_46_im * log(hypot(x_46_im, x_46_re)))), 3.0));
} else {
tmp = sin(fma(t_0, y_46_im, (y_46_re * atan2(x_46_im, x_46_re)))) * pow(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) t_0 = log(hypot(x_46_re, x_46_im)) tmp = 0.0 if ((y_46_im <= -15.0) || !(y_46_im <= 6e-142)) tmp = Float64(exp(fma(t_0, y_46_re, Float64(atan(x_46_im, x_46_re) * Float64(-y_46_im)))) * sin((cbrt(Float64(y_46_im * log(hypot(x_46_im, x_46_re)))) ^ 3.0))); else tmp = Float64(sin(fma(t_0, y_46_im, Float64(y_46_re * atan(x_46_im, x_46_re)))) * (hypot(x_46_re, x_46_im) ^ y_46_re)); 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]}, If[Or[LessEqual[y$46$im, -15.0], N[Not[LessEqual[y$46$im, 6e-142]], $MachinePrecision]], N[(N[Exp[N[(t$95$0 * y$46$re + N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * (-y$46$im)), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Sin[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], N[(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] * N[Power[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision], y$46$re], $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \log \left(\mathsf{hypot}\left(x.re, x.im\right)\right)\\
\mathbf{if}\;y.im \leq -15 \lor \neg \left(y.im \leq 6 \cdot 10^{-142}\right):\\
\;\;\;\;e^{\mathsf{fma}\left(t_0, y.re, \tan^{-1}_* \frac{x.im}{x.re} \cdot \left(-y.im\right)\right)} \cdot \sin \left({\left(\sqrt[3]{y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)}\right)}^{3}\right)\\
\mathbf{else}:\\
\;\;\;\;\sin \left(\mathsf{fma}\left(t_0, y.im, y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right) \cdot {\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re}\\
\end{array}
\end{array}
if y.im < -15 or 6.0000000000000002e-142 < y.im Initial program 34.6%
fma-neg34.6%
hypot-def34.6%
distribute-rgt-neg-out34.6%
fma-def34.6%
hypot-def67.4%
*-commutative67.4%
Simplified67.4%
add-cube-cbrt72.7%
pow372.0%
fma-udef72.0%
*-commutative72.0%
*-commutative72.0%
fma-def72.0%
Applied egg-rr72.0%
Taylor expanded in y.re around 0 22.9%
unpow1/339.6%
unpow239.6%
unpow239.6%
hypot-def72.7%
Simplified72.7%
if -15 < y.im < 6.0000000000000002e-142Initial program 44.6%
exp-diff44.6%
exp-to-pow44.6%
hypot-def44.6%
*-commutative44.6%
exp-prod44.6%
fma-def44.6%
hypot-def91.1%
*-commutative91.1%
Simplified91.1%
Taylor expanded in y.im around 0 91.1%
Final simplification80.2%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (* y.re (atan2 x.im x.re)))
(t_1 (log (hypot x.im x.re)))
(t_2 (* y.im t_1)))
(if (<= y.im -1.75e+31)
(*
(exp
(-
(* y.re (log (sqrt (+ (* x.re x.re) (* x.im x.im)))))
(* (atan2 x.im x.re) y.im)))
(sin (+ t_0 (fabs t_2))))
(if (<= y.im 4e-159)
(*
(pow (hypot x.re x.im) y.re)
(+ (* y.im (* t_1 (cos t_0))) (sin t_0)))
(*
(exp (fma (log (hypot x.re x.im)) y.re (* (atan2 x.im x.re) (- y.im))))
(sin t_2))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = y_46_re * atan2(x_46_im, x_46_re);
double t_1 = log(hypot(x_46_im, x_46_re));
double t_2 = y_46_im * t_1;
double tmp;
if (y_46_im <= -1.75e+31) {
tmp = exp(((y_46_re * log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))) - (atan2(x_46_im, x_46_re) * y_46_im))) * sin((t_0 + fabs(t_2)));
} else if (y_46_im <= 4e-159) {
tmp = pow(hypot(x_46_re, x_46_im), y_46_re) * ((y_46_im * (t_1 * cos(t_0))) + sin(t_0));
} else {
tmp = exp(fma(log(hypot(x_46_re, x_46_im)), y_46_re, (atan2(x_46_im, x_46_re) * -y_46_im))) * sin(t_2);
}
return tmp;
}
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = Float64(y_46_re * atan(x_46_im, x_46_re)) t_1 = log(hypot(x_46_im, x_46_re)) t_2 = Float64(y_46_im * t_1) tmp = 0.0 if (y_46_im <= -1.75e+31) 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))))) - Float64(atan(x_46_im, x_46_re) * y_46_im))) * sin(Float64(t_0 + abs(t_2)))); elseif (y_46_im <= 4e-159) tmp = Float64((hypot(x_46_re, x_46_im) ^ y_46_re) * Float64(Float64(y_46_im * Float64(t_1 * cos(t_0))) + sin(t_0))); else tmp = Float64(exp(fma(log(hypot(x_46_re, x_46_im)), y_46_re, Float64(atan(x_46_im, x_46_re) * Float64(-y_46_im)))) * sin(t_2)); end return tmp end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]}, Block[{t$95$2 = N[(y$46$im * t$95$1), $MachinePrecision]}, If[LessEqual[y$46$im, -1.75e+31], 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] - N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Sin[N[(t$95$0 + N[Abs[t$95$2], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$im, 4e-159], N[(N[Power[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision], y$46$re], $MachinePrecision] * N[(N[(y$46$im * N[(t$95$1 * N[Cos[t$95$0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[Sin[t$95$0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[Exp[N[(N[Log[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision]], $MachinePrecision] * y$46$re + N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * (-y$46$im)), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Sin[t$95$2], $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
t_1 := \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\\
t_2 := y.im \cdot t_1\\
\mathbf{if}\;y.im \leq -1.75 \cdot 10^{+31}:\\
\;\;\;\;e^{y.re \cdot \log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \sin \left(t_0 + \left|t_2\right|\right)\\
\mathbf{elif}\;y.im \leq 4 \cdot 10^{-159}:\\
\;\;\;\;{\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re} \cdot \left(y.im \cdot \left(t_1 \cdot \cos t_0\right) + \sin t_0\right)\\
\mathbf{else}:\\
\;\;\;\;e^{\mathsf{fma}\left(\log \left(\mathsf{hypot}\left(x.re, x.im\right)\right), y.re, \tan^{-1}_* \frac{x.im}{x.re} \cdot \left(-y.im\right)\right)} \cdot \sin t_2\\
\end{array}
\end{array}
if y.im < -1.75e31Initial program 29.9%
add-sqr-sqrt19.4%
sqrt-unprod13.7%
pow213.7%
*-commutative13.7%
hypot-udef28.8%
Applied egg-rr28.8%
unpow228.8%
rem-sqrt-square72.2%
hypot-def40.6%
unpow240.6%
unpow240.6%
+-commutative40.6%
unpow240.6%
unpow240.6%
hypot-def72.2%
Simplified72.2%
if -1.75e31 < y.im < 3.99999999999999995e-159Initial program 43.2%
exp-diff43.2%
exp-to-pow43.2%
hypot-def43.2%
*-commutative43.2%
exp-prod43.2%
fma-def43.2%
hypot-def90.2%
*-commutative90.2%
Simplified90.2%
Taylor expanded in y.im around 0 88.4%
Taylor expanded in y.im around 0 49.4%
+-commutative49.4%
unpow249.4%
unpow249.4%
hypot-def89.4%
Simplified89.4%
if 3.99999999999999995e-159 < y.im Initial program 40.0%
fma-neg40.0%
hypot-def40.0%
distribute-rgt-neg-out40.0%
fma-def40.0%
hypot-def66.9%
*-commutative66.9%
Simplified66.9%
add-cube-cbrt68.2%
pow369.5%
fma-udef69.5%
*-commutative69.5%
*-commutative69.5%
fma-def69.5%
Applied egg-rr69.5%
Taylor expanded in y.re around 0 42.3%
pow-base-142.3%
*-lft-identity42.3%
unpow242.3%
unpow242.3%
hypot-def70.4%
Simplified70.4%
Final simplification78.7%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (* y.re (atan2 x.im x.re))) (t_1 (log (hypot x.im x.re))))
(if (or (<= y.im -2.55e+29) (not (<= y.im 6e-158)))
(*
(exp (fma (log (hypot x.re x.im)) y.re (* (atan2 x.im x.re) (- y.im))))
(sin (* y.im t_1)))
(*
(pow (hypot x.re x.im) y.re)
(+ (* y.im (* t_1 (cos t_0))) (sin t_0))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = y_46_re * atan2(x_46_im, x_46_re);
double t_1 = log(hypot(x_46_im, x_46_re));
double tmp;
if ((y_46_im <= -2.55e+29) || !(y_46_im <= 6e-158)) {
tmp = exp(fma(log(hypot(x_46_re, x_46_im)), y_46_re, (atan2(x_46_im, x_46_re) * -y_46_im))) * sin((y_46_im * t_1));
} else {
tmp = pow(hypot(x_46_re, x_46_im), y_46_re) * ((y_46_im * (t_1 * cos(t_0))) + sin(t_0));
}
return tmp;
}
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = Float64(y_46_re * atan(x_46_im, x_46_re)) t_1 = log(hypot(x_46_im, x_46_re)) tmp = 0.0 if ((y_46_im <= -2.55e+29) || !(y_46_im <= 6e-158)) tmp = Float64(exp(fma(log(hypot(x_46_re, x_46_im)), y_46_re, Float64(atan(x_46_im, x_46_re) * Float64(-y_46_im)))) * sin(Float64(y_46_im * t_1))); else tmp = Float64((hypot(x_46_re, x_46_im) ^ y_46_re) * Float64(Float64(y_46_im * Float64(t_1 * cos(t_0))) + sin(t_0))); end return tmp end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]}, If[Or[LessEqual[y$46$im, -2.55e+29], N[Not[LessEqual[y$46$im, 6e-158]], $MachinePrecision]], N[(N[Exp[N[(N[Log[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision]], $MachinePrecision] * y$46$re + N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * (-y$46$im)), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Sin[N[(y$46$im * t$95$1), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(N[Power[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision], y$46$re], $MachinePrecision] * N[(N[(y$46$im * N[(t$95$1 * N[Cos[t$95$0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[Sin[t$95$0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
t_1 := \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\\
\mathbf{if}\;y.im \leq -2.55 \cdot 10^{+29} \lor \neg \left(y.im \leq 6 \cdot 10^{-158}\right):\\
\;\;\;\;e^{\mathsf{fma}\left(\log \left(\mathsf{hypot}\left(x.re, x.im\right)\right), y.re, \tan^{-1}_* \frac{x.im}{x.re} \cdot \left(-y.im\right)\right)} \cdot \sin \left(y.im \cdot t_1\right)\\
\mathbf{else}:\\
\;\;\;\;{\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re} \cdot \left(y.im \cdot \left(t_1 \cdot \cos t_0\right) + \sin t_0\right)\\
\end{array}
\end{array}
if y.im < -2.55e29 or 6e-158 < y.im Initial program 35.9%
fma-neg35.9%
hypot-def35.9%
distribute-rgt-neg-out35.9%
fma-def35.9%
hypot-def68.0%
*-commutative68.0%
Simplified68.0%
add-cube-cbrt72.6%
pow372.0%
fma-udef72.0%
*-commutative72.0%
*-commutative72.0%
fma-def72.0%
Applied egg-rr72.0%
Taylor expanded in y.re around 0 37.2%
pow-base-137.2%
*-lft-identity37.2%
unpow237.2%
unpow237.2%
hypot-def69.3%
Simplified69.3%
if -2.55e29 < y.im < 6e-158Initial program 42.7%
exp-diff42.7%
exp-to-pow42.7%
hypot-def42.7%
*-commutative42.7%
exp-prod42.7%
fma-def42.7%
hypot-def90.1%
*-commutative90.1%
Simplified90.1%
Taylor expanded in y.im around 0 89.2%
Taylor expanded in y.im around 0 49.9%
+-commutative49.9%
unpow249.9%
unpow249.9%
hypot-def90.2%
Simplified90.2%
Final simplification77.9%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (log (hypot x.re x.im))))
(if (or (<= y.im -15.0) (not (<= y.im 4.2e-158)))
(*
(exp (fma t_0 y.re (* (atan2 x.im x.re) (- y.im))))
(sin (* y.im (log (hypot x.im x.re)))))
(*
(sin (fma t_0 y.im (* y.re (atan2 x.im x.re))))
(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 t_0 = log(hypot(x_46_re, x_46_im));
double tmp;
if ((y_46_im <= -15.0) || !(y_46_im <= 4.2e-158)) {
tmp = exp(fma(t_0, y_46_re, (atan2(x_46_im, x_46_re) * -y_46_im))) * sin((y_46_im * log(hypot(x_46_im, x_46_re))));
} else {
tmp = sin(fma(t_0, y_46_im, (y_46_re * atan2(x_46_im, x_46_re)))) * pow(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) t_0 = log(hypot(x_46_re, x_46_im)) tmp = 0.0 if ((y_46_im <= -15.0) || !(y_46_im <= 4.2e-158)) tmp = Float64(exp(fma(t_0, y_46_re, Float64(atan(x_46_im, x_46_re) * Float64(-y_46_im)))) * sin(Float64(y_46_im * log(hypot(x_46_im, x_46_re))))); else tmp = Float64(sin(fma(t_0, y_46_im, Float64(y_46_re * atan(x_46_im, x_46_re)))) * (hypot(x_46_re, x_46_im) ^ y_46_re)); 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]}, If[Or[LessEqual[y$46$im, -15.0], N[Not[LessEqual[y$46$im, 4.2e-158]], $MachinePrecision]], N[(N[Exp[N[(t$95$0 * y$46$re + N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * (-y$46$im)), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Sin[N[(y$46$im * N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(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] * N[Power[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision], y$46$re], $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \log \left(\mathsf{hypot}\left(x.re, x.im\right)\right)\\
\mathbf{if}\;y.im \leq -15 \lor \neg \left(y.im \leq 4.2 \cdot 10^{-158}\right):\\
\;\;\;\;e^{\mathsf{fma}\left(t_0, y.re, \tan^{-1}_* \frac{x.im}{x.re} \cdot \left(-y.im\right)\right)} \cdot \sin \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\sin \left(\mathsf{fma}\left(t_0, y.im, y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right) \cdot {\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re}\\
\end{array}
\end{array}
if y.im < -15 or 4.19999999999999983e-158 < y.im Initial program 35.4%
fma-neg35.4%
hypot-def35.4%
distribute-rgt-neg-out35.4%
fma-def35.4%
hypot-def67.8%
*-commutative67.8%
Simplified67.8%
add-cube-cbrt72.8%
pow372.2%
fma-udef72.2%
*-commutative72.2%
*-commutative72.2%
fma-def72.2%
Applied egg-rr72.2%
Taylor expanded in y.re around 0 36.6%
pow-base-136.6%
*-lft-identity36.6%
unpow236.6%
unpow236.6%
hypot-def69.0%
Simplified69.0%
if -15 < y.im < 4.19999999999999983e-158Initial program 43.8%
exp-diff43.8%
exp-to-pow43.8%
hypot-def43.8%
*-commutative43.8%
exp-prod43.8%
fma-def43.8%
hypot-def91.7%
*-commutative91.7%
Simplified91.7%
Taylor expanded in y.im around 0 91.7%
Final simplification77.9%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0
(* y.re (* (atan2 x.im x.re) (exp (* (atan2 x.im x.re) (- y.im)))))))
(if (<= y.im -16000000.0)
t_0
(if (<= y.im 1.2e+15)
(*
(sin (fma (log (hypot x.re x.im)) y.im (* y.re (atan2 x.im x.re))))
(pow (hypot x.re x.im) y.re))
(if (<= y.im 7.5e+219)
(*
(exp
(-
(* y.re (log (sqrt (+ (* x.re x.re) (* x.im x.im)))))
(* (atan2 x.im x.re) y.im)))
(sin (* y.im (log (hypot x.im x.re)))))
t_0)))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = y_46_re * (atan2(x_46_im, x_46_re) * exp((atan2(x_46_im, x_46_re) * -y_46_im)));
double tmp;
if (y_46_im <= -16000000.0) {
tmp = t_0;
} else if (y_46_im <= 1.2e+15) {
tmp = sin(fma(log(hypot(x_46_re, x_46_im)), y_46_im, (y_46_re * atan2(x_46_im, x_46_re)))) * pow(hypot(x_46_re, x_46_im), y_46_re);
} else if (y_46_im <= 7.5e+219) {
tmp = exp(((y_46_re * log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))) - (atan2(x_46_im, x_46_re) * y_46_im))) * sin((y_46_im * log(hypot(x_46_im, x_46_re))));
} else {
tmp = t_0;
}
return tmp;
}
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = Float64(y_46_re * Float64(atan(x_46_im, x_46_re) * exp(Float64(atan(x_46_im, x_46_re) * Float64(-y_46_im))))) tmp = 0.0 if (y_46_im <= -16000000.0) tmp = t_0; elseif (y_46_im <= 1.2e+15) tmp = Float64(sin(fma(log(hypot(x_46_re, x_46_im)), y_46_im, Float64(y_46_re * atan(x_46_im, x_46_re)))) * (hypot(x_46_re, x_46_im) ^ y_46_re)); elseif (y_46_im <= 7.5e+219) 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))))) - Float64(atan(x_46_im, x_46_re) * y_46_im))) * sin(Float64(y_46_im * log(hypot(x_46_im, x_46_re))))); else tmp = t_0; end return tmp end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[(y$46$re * N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * N[Exp[N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * (-y$46$im)), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y$46$im, -16000000.0], t$95$0, If[LessEqual[y$46$im, 1.2e+15], N[(N[Sin[N[(N[Log[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision]], $MachinePrecision] * y$46$im + N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Power[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision], y$46$re], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$im, 7.5e+219], 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] - N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Sin[N[(y$46$im * N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], t$95$0]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := y.re \cdot \left(\tan^{-1}_* \frac{x.im}{x.re} \cdot e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot \left(-y.im\right)}\right)\\
\mathbf{if}\;y.im \leq -16000000:\\
\;\;\;\;t_0\\
\mathbf{elif}\;y.im \leq 1.2 \cdot 10^{+15}:\\
\;\;\;\;\sin \left(\mathsf{fma}\left(\log \left(\mathsf{hypot}\left(x.re, x.im\right)\right), y.im, y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right) \cdot {\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re}\\
\mathbf{elif}\;y.im \leq 7.5 \cdot 10^{+219}:\\
\;\;\;\;e^{y.re \cdot \log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \sin \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t_0\\
\end{array}
\end{array}
if y.im < -1.6e7 or 7.5000000000000006e219 < y.im Initial program 28.6%
Taylor expanded in y.im around 0 56.3%
Taylor expanded in x.re around inf 21.7%
Taylor expanded in y.re around 0 61.1%
*-commutative61.1%
distribute-lft-neg-in61.1%
Simplified61.1%
if -1.6e7 < y.im < 1.2e15Initial program 43.6%
exp-diff43.6%
exp-to-pow43.6%
hypot-def43.6%
*-commutative43.6%
exp-prod43.6%
fma-def43.6%
hypot-def88.8%
*-commutative88.8%
Simplified88.8%
Taylor expanded in y.im around 0 88.8%
if 1.2e15 < y.im < 7.5000000000000006e219Initial program 43.7%
Taylor expanded in y.re around 0 43.7%
unpow243.7%
unpow243.7%
hypot-def62.1%
Simplified62.1%
Final simplification75.1%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (* (atan2 x.im x.re) y.im))
(t_1 (* y.im (log x.re)))
(t_2 (* y.re (atan2 x.im x.re)))
(t_3 (sin t_2))
(t_4
(exp (- (* y.re (log (sqrt (+ (* x.re x.re) (* x.im x.im))))) t_0))))
(if (<= x.re -1.5e-12)
(* t_3 (exp (- (* y.re (log (- x.re))) t_0)))
(if (<= x.re 3e-308)
(* t_2 t_4)
(if (<= x.re 2.2e-156)
(* t_2 (exp (- (* y.re (log x.re)) t_0)))
(if (<= x.re 8.5e-43)
(* t_4 t_3)
(if (<= x.re 4.2e+93)
(*
(exp
(fma
(log (hypot x.re x.im))
y.re
(* (atan2 x.im x.re) (- y.im))))
(sin t_1))
(*
(/ (pow (hypot x.re x.im) y.re) (+ t_0 1.0))
(sin (+ t_2 t_1))))))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = atan2(x_46_im, x_46_re) * y_46_im;
double t_1 = y_46_im * log(x_46_re);
double t_2 = y_46_re * atan2(x_46_im, x_46_re);
double t_3 = sin(t_2);
double t_4 = exp(((y_46_re * log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))) - t_0));
double tmp;
if (x_46_re <= -1.5e-12) {
tmp = t_3 * exp(((y_46_re * log(-x_46_re)) - t_0));
} else if (x_46_re <= 3e-308) {
tmp = t_2 * t_4;
} else if (x_46_re <= 2.2e-156) {
tmp = t_2 * exp(((y_46_re * log(x_46_re)) - t_0));
} else if (x_46_re <= 8.5e-43) {
tmp = t_4 * t_3;
} else if (x_46_re <= 4.2e+93) {
tmp = exp(fma(log(hypot(x_46_re, x_46_im)), y_46_re, (atan2(x_46_im, x_46_re) * -y_46_im))) * sin(t_1);
} else {
tmp = (pow(hypot(x_46_re, x_46_im), y_46_re) / (t_0 + 1.0)) * sin((t_2 + t_1));
}
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 = Float64(y_46_im * log(x_46_re)) t_2 = Float64(y_46_re * atan(x_46_im, x_46_re)) t_3 = sin(t_2) t_4 = 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)) tmp = 0.0 if (x_46_re <= -1.5e-12) tmp = Float64(t_3 * exp(Float64(Float64(y_46_re * log(Float64(-x_46_re))) - t_0))); elseif (x_46_re <= 3e-308) tmp = Float64(t_2 * t_4); elseif (x_46_re <= 2.2e-156) tmp = Float64(t_2 * exp(Float64(Float64(y_46_re * log(x_46_re)) - t_0))); elseif (x_46_re <= 8.5e-43) tmp = Float64(t_4 * t_3); elseif (x_46_re <= 4.2e+93) tmp = Float64(exp(fma(log(hypot(x_46_re, x_46_im)), y_46_re, Float64(atan(x_46_im, x_46_re) * Float64(-y_46_im)))) * sin(t_1)); else tmp = Float64(Float64((hypot(x_46_re, x_46_im) ^ y_46_re) / Float64(t_0 + 1.0)) * sin(Float64(t_2 + t_1))); 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[(y$46$im * N[Log[x$46$re], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[Sin[t$95$2], $MachinePrecision]}, Block[{t$95$4 = 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]}, If[LessEqual[x$46$re, -1.5e-12], N[(t$95$3 * N[Exp[N[(N[(y$46$re * N[Log[(-x$46$re)], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[x$46$re, 3e-308], N[(t$95$2 * t$95$4), $MachinePrecision], If[LessEqual[x$46$re, 2.2e-156], N[(t$95$2 * N[Exp[N[(N[(y$46$re * N[Log[x$46$re], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[x$46$re, 8.5e-43], N[(t$95$4 * t$95$3), $MachinePrecision], If[LessEqual[x$46$re, 4.2e+93], N[(N[Exp[N[(N[Log[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision]], $MachinePrecision] * y$46$re + N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * (-y$46$im)), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Sin[t$95$1], $MachinePrecision]), $MachinePrecision], N[(N[(N[Power[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision], y$46$re], $MachinePrecision] / N[(t$95$0 + 1.0), $MachinePrecision]), $MachinePrecision] * N[Sin[N[(t$95$2 + t$95$1), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im\\
t_1 := y.im \cdot \log x.re\\
t_2 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
t_3 := \sin t_2\\
t_4 := e^{y.re \cdot \log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) - t_0}\\
\mathbf{if}\;x.re \leq -1.5 \cdot 10^{-12}:\\
\;\;\;\;t_3 \cdot e^{y.re \cdot \log \left(-x.re\right) - t_0}\\
\mathbf{elif}\;x.re \leq 3 \cdot 10^{-308}:\\
\;\;\;\;t_2 \cdot t_4\\
\mathbf{elif}\;x.re \leq 2.2 \cdot 10^{-156}:\\
\;\;\;\;t_2 \cdot e^{y.re \cdot \log x.re - t_0}\\
\mathbf{elif}\;x.re \leq 8.5 \cdot 10^{-43}:\\
\;\;\;\;t_4 \cdot t_3\\
\mathbf{elif}\;x.re \leq 4.2 \cdot 10^{+93}:\\
\;\;\;\;e^{\mathsf{fma}\left(\log \left(\mathsf{hypot}\left(x.re, x.im\right)\right), y.re, \tan^{-1}_* \frac{x.im}{x.re} \cdot \left(-y.im\right)\right)} \cdot \sin t_1\\
\mathbf{else}:\\
\;\;\;\;\frac{{\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re}}{t_0 + 1} \cdot \sin \left(t_2 + t_1\right)\\
\end{array}
\end{array}
if x.re < -1.5000000000000001e-12Initial program 29.7%
Taylor expanded in y.im around 0 60.4%
Taylor expanded in x.re around -inf 73.9%
mul-1-neg73.9%
Simplified73.9%
if -1.5000000000000001e-12 < x.re < 3.00000000000000022e-308Initial program 58.8%
Taylor expanded in y.im around 0 52.6%
Taylor expanded in y.re around 0 59.7%
if 3.00000000000000022e-308 < x.re < 2.1999999999999999e-156Initial program 29.6%
Taylor expanded in y.im around 0 49.0%
Taylor expanded in x.re around inf 70.4%
Taylor expanded in y.re around 0 74.1%
if 2.1999999999999999e-156 < x.re < 8.50000000000000056e-43Initial program 48.2%
Taylor expanded in y.im around 0 64.8%
if 8.50000000000000056e-43 < x.re < 4.1999999999999996e93Initial program 59.8%
fma-neg59.8%
hypot-def59.8%
distribute-rgt-neg-out59.8%
fma-def59.8%
hypot-def82.0%
*-commutative82.0%
Simplified82.0%
add-cube-cbrt88.1%
pow391.7%
fma-udef91.6%
*-commutative91.6%
*-commutative91.6%
fma-def91.7%
Applied egg-rr91.7%
Taylor expanded in x.im around 0 50.5%
Taylor expanded in y.re around 0 72.4%
pow-base-172.4%
*-lft-identity72.4%
Simplified72.4%
if 4.1999999999999996e93 < x.re Initial program 13.9%
exp-diff13.9%
exp-to-pow13.9%
hypot-def13.9%
*-commutative13.9%
exp-prod13.9%
fma-def13.9%
hypot-def70.5%
*-commutative70.5%
Simplified70.5%
Taylor expanded in y.im around 0 73.3%
Taylor expanded in x.im around 0 69.6%
Final simplification68.9%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(if (or (<= y.im -1150000000.0) (not (<= y.im 3.8e+15)))
(* y.re (* (atan2 x.im x.re) (exp (* (atan2 x.im x.re) (- y.im)))))
(*
(sin (fma (log (hypot x.re x.im)) y.im (* y.re (atan2 x.im x.re))))
(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_im <= -1150000000.0) || !(y_46_im <= 3.8e+15)) {
tmp = y_46_re * (atan2(x_46_im, x_46_re) * exp((atan2(x_46_im, x_46_re) * -y_46_im)));
} else {
tmp = sin(fma(log(hypot(x_46_re, x_46_im)), y_46_im, (y_46_re * atan2(x_46_im, x_46_re)))) * pow(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_im <= -1150000000.0) || !(y_46_im <= 3.8e+15)) tmp = Float64(y_46_re * Float64(atan(x_46_im, x_46_re) * exp(Float64(atan(x_46_im, x_46_re) * Float64(-y_46_im))))); else tmp = Float64(sin(fma(log(hypot(x_46_re, x_46_im)), y_46_im, Float64(y_46_re * atan(x_46_im, x_46_re)))) * (hypot(x_46_re, x_46_im) ^ y_46_re)); end return tmp end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := If[Or[LessEqual[y$46$im, -1150000000.0], N[Not[LessEqual[y$46$im, 3.8e+15]], $MachinePrecision]], N[(y$46$re * N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * N[Exp[N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * (-y$46$im)), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[Sin[N[(N[Log[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision]], $MachinePrecision] * y$46$im + N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Power[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision], y$46$re], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y.im \leq -1150000000 \lor \neg \left(y.im \leq 3.8 \cdot 10^{+15}\right):\\
\;\;\;\;y.re \cdot \left(\tan^{-1}_* \frac{x.im}{x.re} \cdot e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot \left(-y.im\right)}\right)\\
\mathbf{else}:\\
\;\;\;\;\sin \left(\mathsf{fma}\left(\log \left(\mathsf{hypot}\left(x.re, x.im\right)\right), y.im, y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right) \cdot {\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re}\\
\end{array}
\end{array}
if y.im < -1.15e9 or 3.8e15 < y.im Initial program 33.8%
Taylor expanded in y.im around 0 52.6%
Taylor expanded in x.re around inf 19.8%
Taylor expanded in y.re around 0 58.2%
*-commutative58.2%
distribute-lft-neg-in58.2%
Simplified58.2%
if -1.15e9 < y.im < 3.8e15Initial program 43.6%
exp-diff43.6%
exp-to-pow43.6%
hypot-def43.6%
*-commutative43.6%
exp-prod43.6%
fma-def43.6%
hypot-def88.8%
*-commutative88.8%
Simplified88.8%
Taylor expanded in y.im around 0 88.8%
Final simplification73.5%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (* (atan2 x.im x.re) y.im)) (t_1 (* y.re (atan2 x.im x.re))))
(if (<= x.re -2e-17)
(* (sin t_1) (exp (- (* y.re (log (- x.re))) t_0)))
(if (<= x.re 2.5e-307)
(*
t_1
(exp (- (* y.re (log (sqrt (+ (* x.re x.re) (* x.im x.im))))) t_0)))
(if (<= x.re 2.6e-158)
(* t_1 (exp (- (* y.re (log x.re)) t_0)))
(*
(pow (hypot x.re x.im) y.re)
(sin (+ t_1 (* 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 = atan2(x_46_im, x_46_re) * y_46_im;
double t_1 = y_46_re * atan2(x_46_im, x_46_re);
double tmp;
if (x_46_re <= -2e-17) {
tmp = sin(t_1) * exp(((y_46_re * log(-x_46_re)) - t_0));
} else if (x_46_re <= 2.5e-307) {
tmp = t_1 * exp(((y_46_re * log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))) - t_0));
} else if (x_46_re <= 2.6e-158) {
tmp = t_1 * exp(((y_46_re * log(x_46_re)) - t_0));
} else {
tmp = pow(hypot(x_46_re, x_46_im), y_46_re) * sin((t_1 + (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.atan2(x_46_im, x_46_re) * y_46_im;
double t_1 = y_46_re * Math.atan2(x_46_im, x_46_re);
double tmp;
if (x_46_re <= -2e-17) {
tmp = Math.sin(t_1) * Math.exp(((y_46_re * Math.log(-x_46_re)) - t_0));
} else if (x_46_re <= 2.5e-307) {
tmp = t_1 * Math.exp(((y_46_re * Math.log(Math.sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))) - t_0));
} else if (x_46_re <= 2.6e-158) {
tmp = t_1 * Math.exp(((y_46_re * Math.log(x_46_re)) - t_0));
} else {
tmp = Math.pow(Math.hypot(x_46_re, x_46_im), y_46_re) * Math.sin((t_1 + (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.atan2(x_46_im, x_46_re) * y_46_im t_1 = y_46_re * math.atan2(x_46_im, x_46_re) tmp = 0 if x_46_re <= -2e-17: tmp = math.sin(t_1) * math.exp(((y_46_re * math.log(-x_46_re)) - t_0)) elif x_46_re <= 2.5e-307: tmp = t_1 * math.exp(((y_46_re * math.log(math.sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))) - t_0)) elif x_46_re <= 2.6e-158: tmp = t_1 * math.exp(((y_46_re * math.log(x_46_re)) - t_0)) else: tmp = math.pow(math.hypot(x_46_re, x_46_im), y_46_re) * math.sin((t_1 + (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 = Float64(atan(x_46_im, x_46_re) * y_46_im) t_1 = Float64(y_46_re * atan(x_46_im, x_46_re)) tmp = 0.0 if (x_46_re <= -2e-17) tmp = Float64(sin(t_1) * exp(Float64(Float64(y_46_re * log(Float64(-x_46_re))) - t_0))); elseif (x_46_re <= 2.5e-307) tmp = Float64(t_1 * 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))); elseif (x_46_re <= 2.6e-158) tmp = Float64(t_1 * exp(Float64(Float64(y_46_re * log(x_46_re)) - t_0))); else tmp = Float64((hypot(x_46_re, x_46_im) ^ y_46_re) * sin(Float64(t_1 + 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 = atan2(x_46_im, x_46_re) * y_46_im; t_1 = y_46_re * atan2(x_46_im, x_46_re); tmp = 0.0; if (x_46_re <= -2e-17) tmp = sin(t_1) * exp(((y_46_re * log(-x_46_re)) - t_0)); elseif (x_46_re <= 2.5e-307) tmp = t_1 * exp(((y_46_re * log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))) - t_0)); elseif (x_46_re <= 2.6e-158) tmp = t_1 * exp(((y_46_re * log(x_46_re)) - t_0)); else tmp = (hypot(x_46_re, x_46_im) ^ y_46_re) * sin((t_1 + (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[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$im), $MachinePrecision]}, Block[{t$95$1 = N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x$46$re, -2e-17], N[(N[Sin[t$95$1], $MachinePrecision] * N[Exp[N[(N[(y$46$re * N[Log[(-x$46$re)], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[x$46$re, 2.5e-307], N[(t$95$1 * 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]), $MachinePrecision], If[LessEqual[x$46$re, 2.6e-158], N[(t$95$1 * N[Exp[N[(N[(y$46$re * N[Log[x$46$re], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(N[Power[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision], y$46$re], $MachinePrecision] * N[Sin[N[(t$95$1 + N[(y$46$im * N[Log[x$46$re], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im\\
t_1 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
\mathbf{if}\;x.re \leq -2 \cdot 10^{-17}:\\
\;\;\;\;\sin t_1 \cdot e^{y.re \cdot \log \left(-x.re\right) - t_0}\\
\mathbf{elif}\;x.re \leq 2.5 \cdot 10^{-307}:\\
\;\;\;\;t_1 \cdot e^{y.re \cdot \log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) - t_0}\\
\mathbf{elif}\;x.re \leq 2.6 \cdot 10^{-158}:\\
\;\;\;\;t_1 \cdot e^{y.re \cdot \log x.re - t_0}\\
\mathbf{else}:\\
\;\;\;\;{\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re} \cdot \sin \left(t_1 + y.im \cdot \log x.re\right)\\
\end{array}
\end{array}
if x.re < -2.00000000000000014e-17Initial program 29.7%
Taylor expanded in y.im around 0 60.4%
Taylor expanded in x.re around -inf 73.9%
mul-1-neg73.9%
Simplified73.9%
if -2.00000000000000014e-17 < x.re < 2.50000000000000007e-307Initial program 58.8%
Taylor expanded in y.im around 0 52.6%
Taylor expanded in y.re around 0 59.7%
if 2.50000000000000007e-307 < x.re < 2.6e-158Initial program 26.9%
Taylor expanded in y.im around 0 50.8%
Taylor expanded in x.re around inf 73.1%
Taylor expanded in y.re around 0 73.1%
if 2.6e-158 < x.re Initial program 37.1%
exp-diff31.1%
exp-to-pow31.1%
hypot-def31.1%
*-commutative31.1%
exp-prod29.9%
fma-def29.9%
hypot-def68.3%
*-commutative68.3%
Simplified68.3%
Taylor expanded in y.im around 0 68.9%
Taylor expanded in x.im around 0 64.7%
Final simplification67.1%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (* (atan2 x.im x.re) y.im)) (t_1 (* y.re (atan2 x.im x.re))))
(if (<= x.re -5e-310)
(* (sin t_1) (exp (- (* y.re (log (- x.re))) t_0)))
(if (<= x.re 2.65e-160)
(* t_1 (exp (- (* y.re (log x.re)) t_0)))
(* (pow (hypot x.re x.im) y.re) (sin (+ t_1 (* 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 = atan2(x_46_im, x_46_re) * y_46_im;
double t_1 = y_46_re * atan2(x_46_im, x_46_re);
double tmp;
if (x_46_re <= -5e-310) {
tmp = sin(t_1) * exp(((y_46_re * log(-x_46_re)) - t_0));
} else if (x_46_re <= 2.65e-160) {
tmp = t_1 * exp(((y_46_re * log(x_46_re)) - t_0));
} else {
tmp = pow(hypot(x_46_re, x_46_im), y_46_re) * sin((t_1 + (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.atan2(x_46_im, x_46_re) * y_46_im;
double t_1 = y_46_re * Math.atan2(x_46_im, x_46_re);
double tmp;
if (x_46_re <= -5e-310) {
tmp = Math.sin(t_1) * Math.exp(((y_46_re * Math.log(-x_46_re)) - t_0));
} else if (x_46_re <= 2.65e-160) {
tmp = t_1 * Math.exp(((y_46_re * Math.log(x_46_re)) - t_0));
} else {
tmp = Math.pow(Math.hypot(x_46_re, x_46_im), y_46_re) * Math.sin((t_1 + (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.atan2(x_46_im, x_46_re) * y_46_im t_1 = y_46_re * math.atan2(x_46_im, x_46_re) tmp = 0 if x_46_re <= -5e-310: tmp = math.sin(t_1) * math.exp(((y_46_re * math.log(-x_46_re)) - t_0)) elif x_46_re <= 2.65e-160: tmp = t_1 * math.exp(((y_46_re * math.log(x_46_re)) - t_0)) else: tmp = math.pow(math.hypot(x_46_re, x_46_im), y_46_re) * math.sin((t_1 + (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 = Float64(atan(x_46_im, x_46_re) * y_46_im) t_1 = Float64(y_46_re * atan(x_46_im, x_46_re)) tmp = 0.0 if (x_46_re <= -5e-310) tmp = Float64(sin(t_1) * exp(Float64(Float64(y_46_re * log(Float64(-x_46_re))) - t_0))); elseif (x_46_re <= 2.65e-160) tmp = Float64(t_1 * exp(Float64(Float64(y_46_re * log(x_46_re)) - t_0))); else tmp = Float64((hypot(x_46_re, x_46_im) ^ y_46_re) * sin(Float64(t_1 + 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 = atan2(x_46_im, x_46_re) * y_46_im; t_1 = y_46_re * atan2(x_46_im, x_46_re); tmp = 0.0; if (x_46_re <= -5e-310) tmp = sin(t_1) * exp(((y_46_re * log(-x_46_re)) - t_0)); elseif (x_46_re <= 2.65e-160) tmp = t_1 * exp(((y_46_re * log(x_46_re)) - t_0)); else tmp = (hypot(x_46_re, x_46_im) ^ y_46_re) * sin((t_1 + (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[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$im), $MachinePrecision]}, Block[{t$95$1 = N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x$46$re, -5e-310], N[(N[Sin[t$95$1], $MachinePrecision] * N[Exp[N[(N[(y$46$re * N[Log[(-x$46$re)], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[x$46$re, 2.65e-160], N[(t$95$1 * N[Exp[N[(N[(y$46$re * N[Log[x$46$re], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(N[Power[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision], y$46$re], $MachinePrecision] * N[Sin[N[(t$95$1 + N[(y$46$im * N[Log[x$46$re], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im\\
t_1 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
\mathbf{if}\;x.re \leq -5 \cdot 10^{-310}:\\
\;\;\;\;\sin t_1 \cdot e^{y.re \cdot \log \left(-x.re\right) - t_0}\\
\mathbf{elif}\;x.re \leq 2.65 \cdot 10^{-160}:\\
\;\;\;\;t_1 \cdot e^{y.re \cdot \log x.re - t_0}\\
\mathbf{else}:\\
\;\;\;\;{\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re} \cdot \sin \left(t_1 + y.im \cdot \log x.re\right)\\
\end{array}
\end{array}
if x.re < -4.999999999999985e-310Initial program 42.2%
Taylor expanded in y.im around 0 57.1%
Taylor expanded in x.re around -inf 61.8%
mul-1-neg61.8%
Simplified61.8%
if -4.999999999999985e-310 < x.re < 2.6500000000000001e-160Initial program 26.9%
Taylor expanded in y.im around 0 50.8%
Taylor expanded in x.re around inf 73.1%
Taylor expanded in y.re around 0 73.1%
if 2.6500000000000001e-160 < x.re Initial program 37.1%
exp-diff31.1%
exp-to-pow31.1%
hypot-def31.1%
*-commutative31.1%
exp-prod29.9%
fma-def29.9%
hypot-def68.3%
*-commutative68.3%
Simplified68.3%
Taylor expanded in y.im around 0 68.9%
Taylor expanded in x.im around 0 64.7%
Final simplification64.1%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (* (atan2 x.im x.re) y.im))
(t_1 (sin (* y.re (atan2 x.im x.re)))))
(if (<= x.im -5e-310)
(* t_1 (exp (- (* y.re (log (- x.im))) t_0)))
(* t_1 (exp (- (* y.re (log x.im)) t_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 = sin((y_46_re * atan2(x_46_im, x_46_re)));
double tmp;
if (x_46_im <= -5e-310) {
tmp = t_1 * exp(((y_46_re * log(-x_46_im)) - t_0));
} else {
tmp = t_1 * exp(((y_46_re * log(x_46_im)) - t_0));
}
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) :: t_0
real(8) :: t_1
real(8) :: tmp
t_0 = atan2(x_46im, x_46re) * y_46im
t_1 = sin((y_46re * atan2(x_46im, x_46re)))
if (x_46im <= (-5d-310)) then
tmp = t_1 * exp(((y_46re * log(-x_46im)) - t_0))
else
tmp = t_1 * exp(((y_46re * log(x_46im)) - t_0))
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 t_0 = Math.atan2(x_46_im, x_46_re) * y_46_im;
double t_1 = Math.sin((y_46_re * Math.atan2(x_46_im, x_46_re)));
double tmp;
if (x_46_im <= -5e-310) {
tmp = t_1 * Math.exp(((y_46_re * Math.log(-x_46_im)) - t_0));
} else {
tmp = t_1 * Math.exp(((y_46_re * Math.log(x_46_im)) - t_0));
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): t_0 = math.atan2(x_46_im, x_46_re) * y_46_im t_1 = math.sin((y_46_re * math.atan2(x_46_im, x_46_re))) tmp = 0 if x_46_im <= -5e-310: tmp = t_1 * math.exp(((y_46_re * math.log(-x_46_im)) - t_0)) else: tmp = t_1 * math.exp(((y_46_re * math.log(x_46_im)) - t_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 = sin(Float64(y_46_re * atan(x_46_im, x_46_re))) tmp = 0.0 if (x_46_im <= -5e-310) tmp = Float64(t_1 * exp(Float64(Float64(y_46_re * log(Float64(-x_46_im))) - t_0))); else tmp = Float64(t_1 * exp(Float64(Float64(y_46_re * log(x_46_im)) - t_0))); end return tmp end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = atan2(x_46_im, x_46_re) * y_46_im; t_1 = sin((y_46_re * atan2(x_46_im, x_46_re))); tmp = 0.0; if (x_46_im <= -5e-310) tmp = t_1 * exp(((y_46_re * log(-x_46_im)) - t_0)); else tmp = t_1 * exp(((y_46_re * log(x_46_im)) - t_0)); end tmp_2 = 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[Sin[N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[x$46$im, -5e-310], N[(t$95$1 * N[Exp[N[(N[(y$46$re * N[Log[(-x$46$im)], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(t$95$1 * N[Exp[N[(N[(y$46$re * N[Log[x$46$im], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im\\
t_1 := \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\\
\mathbf{if}\;x.im \leq -5 \cdot 10^{-310}:\\
\;\;\;\;t_1 \cdot e^{y.re \cdot \log \left(-x.im\right) - t_0}\\
\mathbf{else}:\\
\;\;\;\;t_1 \cdot e^{y.re \cdot \log x.im - t_0}\\
\end{array}
\end{array}
if x.im < -4.999999999999985e-310Initial program 43.1%
Taylor expanded in y.im around 0 52.9%
Taylor expanded in x.im around -inf 58.2%
mul-1-neg58.2%
Simplified58.2%
if -4.999999999999985e-310 < x.im Initial program 34.0%
Taylor expanded in y.im around 0 47.7%
Taylor expanded in x.re around 0 49.0%
Final simplification53.7%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (* (atan2 x.im x.re) y.im)) (t_1 (* y.re (atan2 x.im x.re))))
(if (<= x.re -5e-310)
(* (sin t_1) (exp (- (* y.re (log (- x.re))) t_0)))
(* t_1 (exp (- (* y.re (log x.re)) t_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 = y_46_re * atan2(x_46_im, x_46_re);
double tmp;
if (x_46_re <= -5e-310) {
tmp = sin(t_1) * exp(((y_46_re * log(-x_46_re)) - t_0));
} else {
tmp = t_1 * exp(((y_46_re * log(x_46_re)) - t_0));
}
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) :: t_0
real(8) :: t_1
real(8) :: tmp
t_0 = atan2(x_46im, x_46re) * y_46im
t_1 = y_46re * atan2(x_46im, x_46re)
if (x_46re <= (-5d-310)) then
tmp = sin(t_1) * exp(((y_46re * log(-x_46re)) - t_0))
else
tmp = t_1 * exp(((y_46re * log(x_46re)) - t_0))
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 t_0 = Math.atan2(x_46_im, x_46_re) * y_46_im;
double t_1 = y_46_re * Math.atan2(x_46_im, x_46_re);
double tmp;
if (x_46_re <= -5e-310) {
tmp = Math.sin(t_1) * Math.exp(((y_46_re * Math.log(-x_46_re)) - t_0));
} else {
tmp = t_1 * Math.exp(((y_46_re * Math.log(x_46_re)) - t_0));
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): t_0 = math.atan2(x_46_im, x_46_re) * y_46_im t_1 = y_46_re * math.atan2(x_46_im, x_46_re) tmp = 0 if x_46_re <= -5e-310: tmp = math.sin(t_1) * math.exp(((y_46_re * math.log(-x_46_re)) - t_0)) else: tmp = t_1 * math.exp(((y_46_re * math.log(x_46_re)) - t_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 = Float64(y_46_re * atan(x_46_im, x_46_re)) tmp = 0.0 if (x_46_re <= -5e-310) tmp = Float64(sin(t_1) * exp(Float64(Float64(y_46_re * log(Float64(-x_46_re))) - t_0))); else tmp = Float64(t_1 * exp(Float64(Float64(y_46_re * log(x_46_re)) - t_0))); end return tmp end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = atan2(x_46_im, x_46_re) * y_46_im; t_1 = y_46_re * atan2(x_46_im, x_46_re); tmp = 0.0; if (x_46_re <= -5e-310) tmp = sin(t_1) * exp(((y_46_re * log(-x_46_re)) - t_0)); else tmp = t_1 * exp(((y_46_re * log(x_46_re)) - t_0)); end tmp_2 = 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[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x$46$re, -5e-310], N[(N[Sin[t$95$1], $MachinePrecision] * N[Exp[N[(N[(y$46$re * N[Log[(-x$46$re)], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(t$95$1 * N[Exp[N[(N[(y$46$re * N[Log[x$46$re], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im\\
t_1 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
\mathbf{if}\;x.re \leq -5 \cdot 10^{-310}:\\
\;\;\;\;\sin t_1 \cdot e^{y.re \cdot \log \left(-x.re\right) - t_0}\\
\mathbf{else}:\\
\;\;\;\;t_1 \cdot e^{y.re \cdot \log x.re - t_0}\\
\end{array}
\end{array}
if x.re < -4.999999999999985e-310Initial program 42.2%
Taylor expanded in y.im around 0 57.1%
Taylor expanded in x.re around -inf 61.8%
mul-1-neg61.8%
Simplified61.8%
if -4.999999999999985e-310 < x.re Initial program 35.0%
Taylor expanded in y.im around 0 43.5%
Taylor expanded in x.re around inf 47.6%
Taylor expanded in y.re around 0 48.4%
Final simplification55.2%
(FPCore (x.re x.im y.re y.im) :precision binary64 (if (or (<= y.re -1.3e+45) (not (<= y.re 1.32e+45))) (* (sin (* y.re (atan2 x.im x.re))) (pow x.re y.re)) (* 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 <= -1.3e+45) || !(y_46_re <= 1.32e+45)) {
tmp = sin((y_46_re * atan2(x_46_im, x_46_re))) * pow(x_46_re, y_46_re);
} else {
tmp = y_46_re * (atan2(x_46_im, x_46_re) * 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 <= (-1.3d+45)) .or. (.not. (y_46re <= 1.32d+45))) then
tmp = sin((y_46re * atan2(x_46im, x_46re))) * (x_46re ** y_46re)
else
tmp = y_46re * (atan2(x_46im, x_46re) * 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 <= -1.3e+45) || !(y_46_re <= 1.32e+45)) {
tmp = Math.sin((y_46_re * Math.atan2(x_46_im, x_46_re))) * Math.pow(x_46_re, y_46_re);
} else {
tmp = 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 <= -1.3e+45) or not (y_46_re <= 1.32e+45): tmp = math.sin((y_46_re * math.atan2(x_46_im, x_46_re))) * math.pow(x_46_re, y_46_re) else: tmp = 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 <= -1.3e+45) || !(y_46_re <= 1.32e+45)) tmp = Float64(sin(Float64(y_46_re * atan(x_46_im, x_46_re))) * (x_46_re ^ y_46_re)); else tmp = Float64(y_46_re * Float64(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 <= -1.3e+45) || ~((y_46_re <= 1.32e+45))) tmp = sin((y_46_re * atan2(x_46_im, x_46_re))) * (x_46_re ^ y_46_re); else tmp = 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, -1.3e+45], N[Not[LessEqual[y$46$re, 1.32e+45]], $MachinePrecision]], N[(N[Sin[N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Power[x$46$re, y$46$re], $MachinePrecision]), $MachinePrecision], N[(y$46$re * N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * N[Exp[N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * (-y$46$im)), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y.re \leq -1.3 \cdot 10^{+45} \lor \neg \left(y.re \leq 1.32 \cdot 10^{+45}\right):\\
\;\;\;\;\sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {x.re}^{y.re}\\
\mathbf{else}:\\
\;\;\;\;y.re \cdot \left(\tan^{-1}_* \frac{x.im}{x.re} \cdot e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot \left(-y.im\right)}\right)\\
\end{array}
\end{array}
if y.re < -1.30000000000000004e45 or 1.32000000000000005e45 < y.re Initial program 31.2%
Taylor expanded in y.im around 0 65.6%
Taylor expanded in x.re around inf 23.8%
Taylor expanded in y.im around 0 52.0%
*-commutative52.0%
Simplified52.0%
if -1.30000000000000004e45 < y.re < 1.32000000000000005e45Initial program 42.9%
Taylor expanded in y.im around 0 41.7%
Taylor expanded in x.re around inf 23.2%
Taylor expanded in y.re around 0 51.8%
*-commutative51.8%
distribute-lft-neg-in51.8%
Simplified51.8%
Final simplification51.9%
(FPCore (x.re x.im y.re y.im) :precision binary64 (* (sin (* y.re (atan2 x.im x.re))) (pow x.re y.re)))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
return sin((y_46_re * atan2(x_46_im, x_46_re))) * pow(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
code = sin((y_46re * atan2(x_46im, x_46re))) * (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) {
return Math.sin((y_46_re * Math.atan2(x_46_im, x_46_re))) * Math.pow(x_46_re, y_46_re);
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): return math.sin((y_46_re * math.atan2(x_46_im, x_46_re))) * math.pow(x_46_re, y_46_re)
function code(x_46_re, x_46_im, y_46_re, y_46_im) return Float64(sin(Float64(y_46_re * atan(x_46_im, x_46_re))) * (x_46_re ^ y_46_re)) end
function tmp = code(x_46_re, x_46_im, y_46_re, y_46_im) tmp = sin((y_46_re * atan2(x_46_im, x_46_re))) * (x_46_re ^ y_46_re); end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := N[(N[Sin[N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Power[x$46$re, y$46$re], $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {x.re}^{y.re}
\end{array}
Initial program 38.7%
Taylor expanded in y.im around 0 50.4%
Taylor expanded in x.re around inf 23.4%
Taylor expanded in y.im around 0 29.6%
*-commutative29.6%
Simplified29.6%
Final simplification29.6%
herbie shell --seed 2023320
(FPCore (x.re x.im y.re y.im)
:name "powComplex, imaginary part"
: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)))))