
(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 24 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 (* (atan2 x.im x.re) y.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 (- (* t_2 y.re) t_0)))
(t_4 (* t_3 (sin (+ (* t_2 y.im) t_1)))))
(if (<= t_4 -0.9)
(*
t_3
(*
y.re
(fma
-0.16666666666666666
(* (* y.re y.re) (pow (atan2 x.im x.re) 3.0))
(atan2 x.im x.re))))
(if (<= t_4 -2e-159)
(*
(exp (* y.im (- 0.0 (atan2 x.im x.re))))
(sin
(*
y.re
(fma
y.im
(/ (log (sqrt (fma x.im x.im (* x.re x.re)))) y.re)
(atan2 x.im x.re)))))
(if (<= t_4 0.0)
(* t_3 t_1)
(if (<= t_4 1.0)
(/
(sin
(fma
y.re
(atan2 x.im x.re)
(* (log (fma x.re x.re (* x.im x.im))) (* y.im 0.5))))
(exp (fma (atan2 x.im x.re) y.im 0.0)))
(if (<= t_4 INFINITY)
(* t_3 (sin t_1))
(* (exp (- (* y.re (log (fabs x.re))) t_0)) 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_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(((t_2 * y_46_re) - t_0));
double t_4 = t_3 * sin(((t_2 * y_46_im) + t_1));
double tmp;
if (t_4 <= -0.9) {
tmp = t_3 * (y_46_re * fma(-0.16666666666666666, ((y_46_re * y_46_re) * pow(atan2(x_46_im, x_46_re), 3.0)), atan2(x_46_im, x_46_re)));
} else if (t_4 <= -2e-159) {
tmp = exp((y_46_im * (0.0 - atan2(x_46_im, x_46_re)))) * sin((y_46_re * fma(y_46_im, (log(sqrt(fma(x_46_im, x_46_im, (x_46_re * x_46_re)))) / y_46_re), atan2(x_46_im, x_46_re))));
} else if (t_4 <= 0.0) {
tmp = t_3 * t_1;
} else if (t_4 <= 1.0) {
tmp = sin(fma(y_46_re, atan2(x_46_im, x_46_re), (log(fma(x_46_re, x_46_re, (x_46_im * x_46_im))) * (y_46_im * 0.5)))) / exp(fma(atan2(x_46_im, x_46_re), y_46_im, 0.0));
} else if (t_4 <= ((double) INFINITY)) {
tmp = t_3 * sin(t_1);
} else {
tmp = exp(((y_46_re * log(fabs(x_46_re))) - t_0)) * 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_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 = exp(Float64(Float64(t_2 * y_46_re) - t_0)) t_4 = Float64(t_3 * sin(Float64(Float64(t_2 * y_46_im) + t_1))) tmp = 0.0 if (t_4 <= -0.9) tmp = Float64(t_3 * Float64(y_46_re * fma(-0.16666666666666666, Float64(Float64(y_46_re * y_46_re) * (atan(x_46_im, x_46_re) ^ 3.0)), atan(x_46_im, x_46_re)))); elseif (t_4 <= -2e-159) tmp = Float64(exp(Float64(y_46_im * Float64(0.0 - atan(x_46_im, x_46_re)))) * sin(Float64(y_46_re * fma(y_46_im, Float64(log(sqrt(fma(x_46_im, x_46_im, Float64(x_46_re * x_46_re)))) / y_46_re), atan(x_46_im, x_46_re))))); elseif (t_4 <= 0.0) tmp = Float64(t_3 * t_1); elseif (t_4 <= 1.0) tmp = Float64(sin(fma(y_46_re, atan(x_46_im, x_46_re), Float64(log(fma(x_46_re, x_46_re, Float64(x_46_im * x_46_im))) * Float64(y_46_im * 0.5)))) / exp(fma(atan(x_46_im, x_46_re), y_46_im, 0.0))); elseif (t_4 <= Inf) tmp = Float64(t_3 * sin(t_1)); else tmp = Float64(exp(Float64(Float64(y_46_re * log(abs(x_46_re))) - t_0)) * 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$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[Exp[N[(N[(t$95$2 * y$46$re), $MachinePrecision] - t$95$0), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$4 = N[(t$95$3 * N[Sin[N[(N[(t$95$2 * y$46$im), $MachinePrecision] + t$95$1), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$4, -0.9], N[(t$95$3 * N[(y$46$re * N[(-0.16666666666666666 * N[(N[(y$46$re * y$46$re), $MachinePrecision] * N[Power[N[ArcTan[x$46$im / x$46$re], $MachinePrecision], 3.0], $MachinePrecision]), $MachinePrecision] + N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$4, -2e-159], N[(N[Exp[N[(y$46$im * N[(0.0 - N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Sin[N[(y$46$re * N[(y$46$im * N[(N[Log[N[Sqrt[N[(x$46$im * x$46$im + N[(x$46$re * x$46$re), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision] / y$46$re), $MachinePrecision] + N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$4, 0.0], N[(t$95$3 * t$95$1), $MachinePrecision], If[LessEqual[t$95$4, 1.0], N[(N[Sin[N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision] + N[(N[Log[N[(x$46$re * x$46$re + N[(x$46$im * x$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(y$46$im * 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / N[Exp[N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$im + 0.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$4, Infinity], N[(t$95$3 * N[Sin[t$95$1], $MachinePrecision]), $MachinePrecision], N[(N[Exp[N[(N[(y$46$re * N[Log[N[Abs[x$46$re], $MachinePrecision]], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]], $MachinePrecision] * t$95$1), $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}\\
t_2 := \log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right)\\
t_3 := e^{t\_2 \cdot y.re - t\_0}\\
t_4 := t\_3 \cdot \sin \left(t\_2 \cdot y.im + t\_1\right)\\
\mathbf{if}\;t\_4 \leq -0.9:\\
\;\;\;\;t\_3 \cdot \left(y.re \cdot \mathsf{fma}\left(-0.16666666666666666, \left(y.re \cdot y.re\right) \cdot {\tan^{-1}_* \frac{x.im}{x.re}}^{3}, \tan^{-1}_* \frac{x.im}{x.re}\right)\right)\\
\mathbf{elif}\;t\_4 \leq -2 \cdot 10^{-159}:\\
\;\;\;\;e^{y.im \cdot \left(0 - \tan^{-1}_* \frac{x.im}{x.re}\right)} \cdot \sin \left(y.re \cdot \mathsf{fma}\left(y.im, \frac{\log \left(\sqrt{\mathsf{fma}\left(x.im, x.im, x.re \cdot x.re\right)}\right)}{y.re}, \tan^{-1}_* \frac{x.im}{x.re}\right)\right)\\
\mathbf{elif}\;t\_4 \leq 0:\\
\;\;\;\;t\_3 \cdot t\_1\\
\mathbf{elif}\;t\_4 \leq 1:\\
\;\;\;\;\frac{\sin \left(\mathsf{fma}\left(y.re, \tan^{-1}_* \frac{x.im}{x.re}, \log \left(\mathsf{fma}\left(x.re, x.re, x.im \cdot x.im\right)\right) \cdot \left(y.im \cdot 0.5\right)\right)\right)}{e^{\mathsf{fma}\left(\tan^{-1}_* \frac{x.im}{x.re}, y.im, 0\right)}}\\
\mathbf{elif}\;t\_4 \leq \infty:\\
\;\;\;\;t\_3 \cdot \sin t\_1\\
\mathbf{else}:\\
\;\;\;\;e^{y.re \cdot \log \left(\left|x.re\right|\right) - t\_0} \cdot t\_1\\
\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)))) < -0.900000000000000022Initial program 50.1%
Taylor expanded in y.im around 0
*-lowering-*.f64N/A
atan2-lowering-atan2.f6450.1
Simplified50.1%
Taylor expanded in y.re around 0
*-lowering-*.f64N/A
accelerator-lowering-fma.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
pow-lowering-pow.f64N/A
atan2-lowering-atan2.f64N/A
atan2-lowering-atan2.f6463.8
Simplified63.8%
if -0.900000000000000022 < (*.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)))) < -1.99999999999999998e-159Initial program 94.1%
Taylor expanded in y.re around 0
mul-1-negN/A
neg-sub0N/A
--lowering--.f64N/A
*-lowering-*.f64N/A
atan2-lowering-atan2.f6494.1
Simplified94.1%
Taylor expanded in y.re around inf
*-lowering-*.f64N/A
associate-/l*N/A
accelerator-lowering-fma.f64N/A
/-lowering-/.f64N/A
log-lowering-log.f64N/A
sqrt-lowering-sqrt.f64N/A
unpow2N/A
accelerator-lowering-fma.f64N/A
unpow2N/A
*-lowering-*.f64N/A
atan2-lowering-atan2.f6495.1
Simplified95.1%
if -1.99999999999999998e-159 < (*.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)))) < -0.0Initial program 100.0%
Taylor expanded in y.im around 0
*-lowering-*.f64N/A
atan2-lowering-atan2.f64100.0
Simplified100.0%
Taylor expanded in y.re around 0
*-lowering-*.f64N/A
atan2-lowering-atan2.f64100.0
Simplified100.0%
if -0.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)))) < 1Initial program 87.9%
Taylor expanded in y.re around 0
mul-1-negN/A
neg-sub0N/A
--lowering--.f64N/A
*-lowering-*.f64N/A
atan2-lowering-atan2.f6485.9
Simplified85.9%
*-commutativeN/A
exp-diffN/A
1-expN/A
*-commutativeN/A
un-div-invN/A
*-commutativeN/A
pow1/2N/A
log-powN/A
associate-*l*N/A
Applied egg-rr86.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 73.9%
Taylor expanded in y.im around 0
*-lowering-*.f64N/A
atan2-lowering-atan2.f6473.9
Simplified73.9%
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%
Taylor expanded in y.im around 0
*-lowering-*.f64N/A
atan2-lowering-atan2.f6439.7
Simplified39.7%
Taylor expanded in y.re around 0
*-lowering-*.f64N/A
atan2-lowering-atan2.f6441.9
Simplified41.9%
Taylor expanded in x.re around inf
unpow2N/A
*-lowering-*.f6443.7
Simplified43.7%
rem-sqrt-squareN/A
fabs-lowering-fabs.f6458.9
Applied egg-rr58.9%
Final simplification71.0%
(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)))
(t_2 (log (sqrt (+ (* x.re x.re) (* x.im x.im)))))
(t_3 (exp (- (* t_2 y.re) t_0)))
(t_4 (* t_3 (sin (+ (* t_2 y.im) t_1))))
(t_5 (log (fma x.re x.re (* x.im x.im)))))
(if (<= t_4 -2e-159)
(*
(sin (fma (* y.im 0.5) t_5 t_1))
(pow (sqrt (fma x.im x.im (* x.re x.re))) y.re))
(if (<= t_4 0.0)
(* t_3 t_1)
(if (<= t_4 1.0)
(/
(sin (fma y.re (atan2 x.im x.re) (* t_5 (* y.im 0.5))))
(exp (fma (atan2 x.im x.re) y.im 0.0)))
(if (<= t_4 INFINITY)
(* t_3 (sin t_1))
(* (exp (- (* y.re (log (fabs x.re))) t_0)) 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_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(((t_2 * y_46_re) - t_0));
double t_4 = t_3 * sin(((t_2 * y_46_im) + t_1));
double t_5 = log(fma(x_46_re, x_46_re, (x_46_im * x_46_im)));
double tmp;
if (t_4 <= -2e-159) {
tmp = sin(fma((y_46_im * 0.5), t_5, t_1)) * pow(sqrt(fma(x_46_im, x_46_im, (x_46_re * x_46_re))), y_46_re);
} else if (t_4 <= 0.0) {
tmp = t_3 * t_1;
} else if (t_4 <= 1.0) {
tmp = sin(fma(y_46_re, atan2(x_46_im, x_46_re), (t_5 * (y_46_im * 0.5)))) / exp(fma(atan2(x_46_im, x_46_re), y_46_im, 0.0));
} else if (t_4 <= ((double) INFINITY)) {
tmp = t_3 * sin(t_1);
} else {
tmp = exp(((y_46_re * log(fabs(x_46_re))) - t_0)) * 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_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 = exp(Float64(Float64(t_2 * y_46_re) - t_0)) t_4 = Float64(t_3 * sin(Float64(Float64(t_2 * y_46_im) + t_1))) t_5 = log(fma(x_46_re, x_46_re, Float64(x_46_im * x_46_im))) tmp = 0.0 if (t_4 <= -2e-159) tmp = Float64(sin(fma(Float64(y_46_im * 0.5), t_5, t_1)) * (sqrt(fma(x_46_im, x_46_im, Float64(x_46_re * x_46_re))) ^ y_46_re)); elseif (t_4 <= 0.0) tmp = Float64(t_3 * t_1); elseif (t_4 <= 1.0) tmp = Float64(sin(fma(y_46_re, atan(x_46_im, x_46_re), Float64(t_5 * Float64(y_46_im * 0.5)))) / exp(fma(atan(x_46_im, x_46_re), y_46_im, 0.0))); elseif (t_4 <= Inf) tmp = Float64(t_3 * sin(t_1)); else tmp = Float64(exp(Float64(Float64(y_46_re * log(abs(x_46_re))) - t_0)) * 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$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[Exp[N[(N[(t$95$2 * y$46$re), $MachinePrecision] - t$95$0), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$4 = N[(t$95$3 * N[Sin[N[(N[(t$95$2 * y$46$im), $MachinePrecision] + t$95$1), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$5 = N[Log[N[(x$46$re * x$46$re + N[(x$46$im * x$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[t$95$4, -2e-159], N[(N[Sin[N[(N[(y$46$im * 0.5), $MachinePrecision] * t$95$5 + t$95$1), $MachinePrecision]], $MachinePrecision] * N[Power[N[Sqrt[N[(x$46$im * x$46$im + N[(x$46$re * x$46$re), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], y$46$re], $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$4, 0.0], N[(t$95$3 * t$95$1), $MachinePrecision], If[LessEqual[t$95$4, 1.0], N[(N[Sin[N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision] + N[(t$95$5 * N[(y$46$im * 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / N[Exp[N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$im + 0.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$4, Infinity], N[(t$95$3 * N[Sin[t$95$1], $MachinePrecision]), $MachinePrecision], N[(N[Exp[N[(N[(y$46$re * N[Log[N[Abs[x$46$re], $MachinePrecision]], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]], $MachinePrecision] * t$95$1), $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}\\
t_2 := \log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right)\\
t_3 := e^{t\_2 \cdot y.re - t\_0}\\
t_4 := t\_3 \cdot \sin \left(t\_2 \cdot y.im + t\_1\right)\\
t_5 := \log \left(\mathsf{fma}\left(x.re, x.re, x.im \cdot x.im\right)\right)\\
\mathbf{if}\;t\_4 \leq -2 \cdot 10^{-159}:\\
\;\;\;\;\sin \left(\mathsf{fma}\left(y.im \cdot 0.5, t\_5, t\_1\right)\right) \cdot {\left(\sqrt{\mathsf{fma}\left(x.im, x.im, x.re \cdot x.re\right)}\right)}^{y.re}\\
\mathbf{elif}\;t\_4 \leq 0:\\
\;\;\;\;t\_3 \cdot t\_1\\
\mathbf{elif}\;t\_4 \leq 1:\\
\;\;\;\;\frac{\sin \left(\mathsf{fma}\left(y.re, \tan^{-1}_* \frac{x.im}{x.re}, t\_5 \cdot \left(y.im \cdot 0.5\right)\right)\right)}{e^{\mathsf{fma}\left(\tan^{-1}_* \frac{x.im}{x.re}, y.im, 0\right)}}\\
\mathbf{elif}\;t\_4 \leq \infty:\\
\;\;\;\;t\_3 \cdot \sin t\_1\\
\mathbf{else}:\\
\;\;\;\;e^{y.re \cdot \log \left(\left|x.re\right|\right) - t\_0} \cdot t\_1\\
\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)))) < -1.99999999999999998e-159Initial program 69.9%
*-commutativeN/A
pow1/2N/A
log-powN/A
associate-*r*N/A
accelerator-lowering-fma.f64N/A
*-lowering-*.f64N/A
log-lowering-log.f64N/A
accelerator-lowering-fma.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
atan2-lowering-atan2.f6469.9
Applied egg-rr69.9%
Taylor expanded in y.im around 0
pow-lowering-pow.f64N/A
sqrt-lowering-sqrt.f64N/A
unpow2N/A
accelerator-lowering-fma.f64N/A
unpow2N/A
*-lowering-*.f6463.6
Simplified63.6%
if -1.99999999999999998e-159 < (*.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)))) < -0.0Initial program 100.0%
Taylor expanded in y.im around 0
*-lowering-*.f64N/A
atan2-lowering-atan2.f64100.0
Simplified100.0%
Taylor expanded in y.re around 0
*-lowering-*.f64N/A
atan2-lowering-atan2.f64100.0
Simplified100.0%
if -0.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)))) < 1Initial program 87.9%
Taylor expanded in y.re around 0
mul-1-negN/A
neg-sub0N/A
--lowering--.f64N/A
*-lowering-*.f64N/A
atan2-lowering-atan2.f6485.9
Simplified85.9%
*-commutativeN/A
exp-diffN/A
1-expN/A
*-commutativeN/A
un-div-invN/A
*-commutativeN/A
pow1/2N/A
log-powN/A
associate-*l*N/A
Applied egg-rr86.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 73.9%
Taylor expanded in y.im around 0
*-lowering-*.f64N/A
atan2-lowering-atan2.f6473.9
Simplified73.9%
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%
Taylor expanded in y.im around 0
*-lowering-*.f64N/A
atan2-lowering-atan2.f6439.7
Simplified39.7%
Taylor expanded in y.re around 0
*-lowering-*.f64N/A
atan2-lowering-atan2.f6441.9
Simplified41.9%
Taylor expanded in x.re around inf
unpow2N/A
*-lowering-*.f6443.7
Simplified43.7%
rem-sqrt-squareN/A
fabs-lowering-fabs.f6458.9
Applied egg-rr58.9%
Final simplification68.8%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (* (atan2 x.im x.re) y.im))
(t_1 (log (sqrt (+ (* x.re x.re) (* x.im x.im)))))
(t_2 (exp (- (* t_1 y.re) t_0)))
(t_3 (* y.re (atan2 x.im x.re)))
(t_4 (sin (+ (* t_1 y.im) t_3)))
(t_5 (* t_2 t_4))
(t_6 (* t_4 (fma (atan2 x.im x.re) (- 0.0 y.im) 1.0))))
(if (<= t_5 -0.5)
(*
(*
y.re
(fma
-0.16666666666666666
(* (* y.re y.re) (pow (atan2 x.im x.re) 3.0))
(atan2 x.im x.re)))
(pow (sqrt (fma x.im x.im (* x.re x.re))) y.re))
(if (<= t_5 -2e-159)
t_6
(if (<= t_5 0.0)
(* t_2 t_3)
(if (<= t_5 1.0)
t_6
(* (exp (- (* y.re (log (fabs x.re))) t_0)) t_3)))))))
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 = log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))));
double t_2 = exp(((t_1 * y_46_re) - t_0));
double t_3 = y_46_re * atan2(x_46_im, x_46_re);
double t_4 = sin(((t_1 * y_46_im) + t_3));
double t_5 = t_2 * t_4;
double t_6 = t_4 * fma(atan2(x_46_im, x_46_re), (0.0 - y_46_im), 1.0);
double tmp;
if (t_5 <= -0.5) {
tmp = (y_46_re * fma(-0.16666666666666666, ((y_46_re * y_46_re) * pow(atan2(x_46_im, x_46_re), 3.0)), atan2(x_46_im, x_46_re))) * pow(sqrt(fma(x_46_im, x_46_im, (x_46_re * x_46_re))), y_46_re);
} else if (t_5 <= -2e-159) {
tmp = t_6;
} else if (t_5 <= 0.0) {
tmp = t_2 * t_3;
} else if (t_5 <= 1.0) {
tmp = t_6;
} else {
tmp = exp(((y_46_re * log(fabs(x_46_re))) - t_0)) * t_3;
}
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 = log(sqrt(Float64(Float64(x_46_re * x_46_re) + Float64(x_46_im * x_46_im)))) t_2 = exp(Float64(Float64(t_1 * y_46_re) - t_0)) t_3 = Float64(y_46_re * atan(x_46_im, x_46_re)) t_4 = sin(Float64(Float64(t_1 * y_46_im) + t_3)) t_5 = Float64(t_2 * t_4) t_6 = Float64(t_4 * fma(atan(x_46_im, x_46_re), Float64(0.0 - y_46_im), 1.0)) tmp = 0.0 if (t_5 <= -0.5) tmp = Float64(Float64(y_46_re * fma(-0.16666666666666666, Float64(Float64(y_46_re * y_46_re) * (atan(x_46_im, x_46_re) ^ 3.0)), atan(x_46_im, x_46_re))) * (sqrt(fma(x_46_im, x_46_im, Float64(x_46_re * x_46_re))) ^ y_46_re)); elseif (t_5 <= -2e-159) tmp = t_6; elseif (t_5 <= 0.0) tmp = Float64(t_2 * t_3); elseif (t_5 <= 1.0) tmp = t_6; else tmp = Float64(exp(Float64(Float64(y_46_re * log(abs(x_46_re))) - t_0)) * t_3); 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[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[(t$95$1 * y$46$re), $MachinePrecision] - t$95$0), $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[Sin[N[(N[(t$95$1 * y$46$im), $MachinePrecision] + t$95$3), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$5 = N[(t$95$2 * t$95$4), $MachinePrecision]}, Block[{t$95$6 = N[(t$95$4 * N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * N[(0.0 - y$46$im), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$5, -0.5], N[(N[(y$46$re * N[(-0.16666666666666666 * N[(N[(y$46$re * y$46$re), $MachinePrecision] * N[Power[N[ArcTan[x$46$im / x$46$re], $MachinePrecision], 3.0], $MachinePrecision]), $MachinePrecision] + N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[Power[N[Sqrt[N[(x$46$im * x$46$im + N[(x$46$re * x$46$re), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], y$46$re], $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$5, -2e-159], t$95$6, If[LessEqual[t$95$5, 0.0], N[(t$95$2 * t$95$3), $MachinePrecision], If[LessEqual[t$95$5, 1.0], t$95$6, N[(N[Exp[N[(N[(y$46$re * N[Log[N[Abs[x$46$re], $MachinePrecision]], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]], $MachinePrecision] * t$95$3), $MachinePrecision]]]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im\\
t_1 := \log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right)\\
t_2 := e^{t\_1 \cdot y.re - t\_0}\\
t_3 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
t_4 := \sin \left(t\_1 \cdot y.im + t\_3\right)\\
t_5 := t\_2 \cdot t\_4\\
t_6 := t\_4 \cdot \mathsf{fma}\left(\tan^{-1}_* \frac{x.im}{x.re}, 0 - y.im, 1\right)\\
\mathbf{if}\;t\_5 \leq -0.5:\\
\;\;\;\;\left(y.re \cdot \mathsf{fma}\left(-0.16666666666666666, \left(y.re \cdot y.re\right) \cdot {\tan^{-1}_* \frac{x.im}{x.re}}^{3}, \tan^{-1}_* \frac{x.im}{x.re}\right)\right) \cdot {\left(\sqrt{\mathsf{fma}\left(x.im, x.im, x.re \cdot x.re\right)}\right)}^{y.re}\\
\mathbf{elif}\;t\_5 \leq -2 \cdot 10^{-159}:\\
\;\;\;\;t\_6\\
\mathbf{elif}\;t\_5 \leq 0:\\
\;\;\;\;t\_2 \cdot t\_3\\
\mathbf{elif}\;t\_5 \leq 1:\\
\;\;\;\;t\_6\\
\mathbf{else}:\\
\;\;\;\;e^{y.re \cdot \log \left(\left|x.re\right|\right) - t\_0} \cdot t\_3\\
\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)))) < -0.5Initial program 48.0%
Taylor expanded in y.im around 0
*-lowering-*.f64N/A
atan2-lowering-atan2.f6448.1
Simplified48.1%
Taylor expanded in y.re around 0
*-lowering-*.f64N/A
accelerator-lowering-fma.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
pow-lowering-pow.f64N/A
atan2-lowering-atan2.f64N/A
atan2-lowering-atan2.f6461.1
Simplified61.1%
Taylor expanded in y.im around 0
pow-lowering-pow.f64N/A
sqrt-lowering-sqrt.f64N/A
unpow2N/A
accelerator-lowering-fma.f64N/A
unpow2N/A
*-lowering-*.f6448.5
Simplified48.5%
if -0.5 < (*.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)))) < -1.99999999999999998e-159 or -0.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)))) < 1Initial program 93.0%
Taylor expanded in y.re around 0
mul-1-negN/A
neg-sub0N/A
--lowering--.f64N/A
*-lowering-*.f64N/A
atan2-lowering-atan2.f6491.9
Simplified91.9%
Taylor expanded in y.im around 0
neg-mul-1N/A
+-commutativeN/A
*-commutativeN/A
distribute-rgt-neg-inN/A
neg-mul-1N/A
accelerator-lowering-fma.f64N/A
atan2-lowering-atan2.f64N/A
neg-mul-1N/A
neg-sub0N/A
--lowering--.f6489.8
Simplified89.8%
if -1.99999999999999998e-159 < (*.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)))) < -0.0Initial program 100.0%
Taylor expanded in y.im around 0
*-lowering-*.f64N/A
atan2-lowering-atan2.f64100.0
Simplified100.0%
Taylor expanded in y.re around 0
*-lowering-*.f64N/A
atan2-lowering-atan2.f64100.0
Simplified100.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)))) Initial program 10.6%
Taylor expanded in y.im around 0
*-lowering-*.f64N/A
atan2-lowering-atan2.f6444.6
Simplified44.6%
Taylor expanded in y.re around 0
*-lowering-*.f64N/A
atan2-lowering-atan2.f6444.0
Simplified44.0%
Taylor expanded in x.re around inf
unpow2N/A
*-lowering-*.f6443.2
Simplified43.2%
rem-sqrt-squareN/A
fabs-lowering-fabs.f6458.0
Applied egg-rr58.0%
Final simplification67.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)))
(t_2 (log (sqrt (+ (* x.re x.re) (* x.im x.im)))))
(t_3 (exp (- (* t_2 y.re) t_0)))
(t_4 (* t_3 (sin (+ (* t_2 y.im) t_1))))
(t_5 (log (fma x.re x.re (* x.im x.im)))))
(if (<= t_4 -0.5)
(*
(*
y.re
(fma
-0.16666666666666666
(* (* y.re y.re) (pow (atan2 x.im x.re) 3.0))
(atan2 x.im x.re)))
(pow (sqrt (fma x.im x.im (* x.re x.re))) y.re))
(if (<= t_4 -5e-179)
(sin (* y.im (fma 0.5 t_5 (* y.re (/ (atan2 x.im x.re) y.im)))))
(if (<= t_4 0.0)
(* t_3 t_1)
(if (<= t_4 1.0)
(sin (* (- 0.0 y.im) (fma t_5 -0.5 (/ t_1 (- 0.0 y.im)))))
(* (exp (- (* y.re (log (fabs x.re))) t_0)) 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_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(((t_2 * y_46_re) - t_0));
double t_4 = t_3 * sin(((t_2 * y_46_im) + t_1));
double t_5 = log(fma(x_46_re, x_46_re, (x_46_im * x_46_im)));
double tmp;
if (t_4 <= -0.5) {
tmp = (y_46_re * fma(-0.16666666666666666, ((y_46_re * y_46_re) * pow(atan2(x_46_im, x_46_re), 3.0)), atan2(x_46_im, x_46_re))) * pow(sqrt(fma(x_46_im, x_46_im, (x_46_re * x_46_re))), y_46_re);
} else if (t_4 <= -5e-179) {
tmp = sin((y_46_im * fma(0.5, t_5, (y_46_re * (atan2(x_46_im, x_46_re) / y_46_im)))));
} else if (t_4 <= 0.0) {
tmp = t_3 * t_1;
} else if (t_4 <= 1.0) {
tmp = sin(((0.0 - y_46_im) * fma(t_5, -0.5, (t_1 / (0.0 - y_46_im)))));
} else {
tmp = exp(((y_46_re * log(fabs(x_46_re))) - t_0)) * 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_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 = exp(Float64(Float64(t_2 * y_46_re) - t_0)) t_4 = Float64(t_3 * sin(Float64(Float64(t_2 * y_46_im) + t_1))) t_5 = log(fma(x_46_re, x_46_re, Float64(x_46_im * x_46_im))) tmp = 0.0 if (t_4 <= -0.5) tmp = Float64(Float64(y_46_re * fma(-0.16666666666666666, Float64(Float64(y_46_re * y_46_re) * (atan(x_46_im, x_46_re) ^ 3.0)), atan(x_46_im, x_46_re))) * (sqrt(fma(x_46_im, x_46_im, Float64(x_46_re * x_46_re))) ^ y_46_re)); elseif (t_4 <= -5e-179) tmp = sin(Float64(y_46_im * fma(0.5, t_5, Float64(y_46_re * Float64(atan(x_46_im, x_46_re) / y_46_im))))); elseif (t_4 <= 0.0) tmp = Float64(t_3 * t_1); elseif (t_4 <= 1.0) tmp = sin(Float64(Float64(0.0 - y_46_im) * fma(t_5, -0.5, Float64(t_1 / Float64(0.0 - y_46_im))))); else tmp = Float64(exp(Float64(Float64(y_46_re * log(abs(x_46_re))) - t_0)) * 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$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[Exp[N[(N[(t$95$2 * y$46$re), $MachinePrecision] - t$95$0), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$4 = N[(t$95$3 * N[Sin[N[(N[(t$95$2 * y$46$im), $MachinePrecision] + t$95$1), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$5 = N[Log[N[(x$46$re * x$46$re + N[(x$46$im * x$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[t$95$4, -0.5], N[(N[(y$46$re * N[(-0.16666666666666666 * N[(N[(y$46$re * y$46$re), $MachinePrecision] * N[Power[N[ArcTan[x$46$im / x$46$re], $MachinePrecision], 3.0], $MachinePrecision]), $MachinePrecision] + N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[Power[N[Sqrt[N[(x$46$im * x$46$im + N[(x$46$re * x$46$re), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], y$46$re], $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$4, -5e-179], N[Sin[N[(y$46$im * N[(0.5 * t$95$5 + N[(y$46$re * N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] / y$46$im), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[LessEqual[t$95$4, 0.0], N[(t$95$3 * t$95$1), $MachinePrecision], If[LessEqual[t$95$4, 1.0], N[Sin[N[(N[(0.0 - y$46$im), $MachinePrecision] * N[(t$95$5 * -0.5 + N[(t$95$1 / N[(0.0 - y$46$im), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[(N[Exp[N[(N[(y$46$re * N[Log[N[Abs[x$46$re], $MachinePrecision]], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]], $MachinePrecision] * t$95$1), $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}\\
t_2 := \log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right)\\
t_3 := e^{t\_2 \cdot y.re - t\_0}\\
t_4 := t\_3 \cdot \sin \left(t\_2 \cdot y.im + t\_1\right)\\
t_5 := \log \left(\mathsf{fma}\left(x.re, x.re, x.im \cdot x.im\right)\right)\\
\mathbf{if}\;t\_4 \leq -0.5:\\
\;\;\;\;\left(y.re \cdot \mathsf{fma}\left(-0.16666666666666666, \left(y.re \cdot y.re\right) \cdot {\tan^{-1}_* \frac{x.im}{x.re}}^{3}, \tan^{-1}_* \frac{x.im}{x.re}\right)\right) \cdot {\left(\sqrt{\mathsf{fma}\left(x.im, x.im, x.re \cdot x.re\right)}\right)}^{y.re}\\
\mathbf{elif}\;t\_4 \leq -5 \cdot 10^{-179}:\\
\;\;\;\;\sin \left(y.im \cdot \mathsf{fma}\left(0.5, t\_5, y.re \cdot \frac{\tan^{-1}_* \frac{x.im}{x.re}}{y.im}\right)\right)\\
\mathbf{elif}\;t\_4 \leq 0:\\
\;\;\;\;t\_3 \cdot t\_1\\
\mathbf{elif}\;t\_4 \leq 1:\\
\;\;\;\;\sin \left(\left(0 - y.im\right) \cdot \mathsf{fma}\left(t\_5, -0.5, \frac{t\_1}{0 - y.im}\right)\right)\\
\mathbf{else}:\\
\;\;\;\;e^{y.re \cdot \log \left(\left|x.re\right|\right) - t\_0} \cdot t\_1\\
\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)))) < -0.5Initial program 48.0%
Taylor expanded in y.im around 0
*-lowering-*.f64N/A
atan2-lowering-atan2.f6448.1
Simplified48.1%
Taylor expanded in y.re around 0
*-lowering-*.f64N/A
accelerator-lowering-fma.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
pow-lowering-pow.f64N/A
atan2-lowering-atan2.f64N/A
atan2-lowering-atan2.f6461.1
Simplified61.1%
Taylor expanded in y.im around 0
pow-lowering-pow.f64N/A
sqrt-lowering-sqrt.f64N/A
unpow2N/A
accelerator-lowering-fma.f64N/A
unpow2N/A
*-lowering-*.f6448.5
Simplified48.5%
if -0.5 < (*.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)))) < -4.9999999999999998e-179Initial program 99.5%
flip3-+N/A
clear-numN/A
/-lowering-/.f64N/A
Applied egg-rr99.4%
Taylor expanded in y.im around 0
pow-lowering-pow.f64N/A
sqrt-lowering-sqrt.f64N/A
unpow2N/A
accelerator-lowering-fma.f64N/A
unpow2N/A
*-lowering-*.f6496.0
Simplified96.0%
Taylor expanded in y.re around 0
Simplified96.0%
Taylor expanded in y.im around inf
*-lowering-*.f64N/A
accelerator-lowering-fma.f64N/A
log-lowering-log.f64N/A
+-commutativeN/A
unpow2N/A
accelerator-lowering-fma.f64N/A
unpow2N/A
*-lowering-*.f64N/A
associate-/l*N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
atan2-lowering-atan2.f6496.3
Simplified96.3%
if -4.9999999999999998e-179 < (*.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)))) < -0.0Initial program 100.0%
Taylor expanded in y.im around 0
*-lowering-*.f64N/A
atan2-lowering-atan2.f64100.0
Simplified100.0%
Taylor expanded in y.re around 0
*-lowering-*.f64N/A
atan2-lowering-atan2.f64100.0
Simplified100.0%
if -0.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)))) < 1Initial program 87.9%
flip3-+N/A
clear-numN/A
/-lowering-/.f64N/A
Applied egg-rr87.9%
Taylor expanded in y.im around 0
pow-lowering-pow.f64N/A
sqrt-lowering-sqrt.f64N/A
unpow2N/A
accelerator-lowering-fma.f64N/A
unpow2N/A
*-lowering-*.f6485.2
Simplified85.2%
Taylor expanded in y.re around 0
Simplified83.1%
Taylor expanded in y.im around -inf
mul-1-negN/A
*-commutativeN/A
distribute-rgt-neg-inN/A
neg-mul-1N/A
*-lowering-*.f64N/A
Simplified83.3%
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)))) Initial program 10.6%
Taylor expanded in y.im around 0
*-lowering-*.f64N/A
atan2-lowering-atan2.f6444.6
Simplified44.6%
Taylor expanded in y.re around 0
*-lowering-*.f64N/A
atan2-lowering-atan2.f6444.0
Simplified44.0%
Taylor expanded in x.re around inf
unpow2N/A
*-lowering-*.f6443.2
Simplified43.2%
rem-sqrt-squareN/A
fabs-lowering-fabs.f6458.0
Applied egg-rr58.0%
Final simplification67.4%
(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)))
(t_2 (log (sqrt (+ (* x.re x.re) (* x.im x.im)))))
(t_3 (fma x.re x.re (* x.im x.im)))
(t_4 (exp (- (* t_2 y.re) t_0)))
(t_5 (* t_4 (sin (+ (* t_2 y.im) t_1))))
(t_6 (log t_3)))
(if (<= t_5 -0.5)
(* t_1 (/ (pow t_3 (* y.re 0.5)) (exp t_0)))
(if (<= t_5 -5e-179)
(sin (* y.im (fma 0.5 t_6 (* y.re (/ (atan2 x.im x.re) y.im)))))
(if (<= t_5 0.0)
(* t_4 t_1)
(if (<= t_5 1.0)
(sin (* (- 0.0 y.im) (fma t_6 -0.5 (/ t_1 (- 0.0 y.im)))))
(* (exp (- (* y.re (log (fabs x.re))) t_0)) 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_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 = fma(x_46_re, x_46_re, (x_46_im * x_46_im));
double t_4 = exp(((t_2 * y_46_re) - t_0));
double t_5 = t_4 * sin(((t_2 * y_46_im) + t_1));
double t_6 = log(t_3);
double tmp;
if (t_5 <= -0.5) {
tmp = t_1 * (pow(t_3, (y_46_re * 0.5)) / exp(t_0));
} else if (t_5 <= -5e-179) {
tmp = sin((y_46_im * fma(0.5, t_6, (y_46_re * (atan2(x_46_im, x_46_re) / y_46_im)))));
} else if (t_5 <= 0.0) {
tmp = t_4 * t_1;
} else if (t_5 <= 1.0) {
tmp = sin(((0.0 - y_46_im) * fma(t_6, -0.5, (t_1 / (0.0 - y_46_im)))));
} else {
tmp = exp(((y_46_re * log(fabs(x_46_re))) - t_0)) * 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_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 = fma(x_46_re, x_46_re, Float64(x_46_im * x_46_im)) t_4 = exp(Float64(Float64(t_2 * y_46_re) - t_0)) t_5 = Float64(t_4 * sin(Float64(Float64(t_2 * y_46_im) + t_1))) t_6 = log(t_3) tmp = 0.0 if (t_5 <= -0.5) tmp = Float64(t_1 * Float64((t_3 ^ Float64(y_46_re * 0.5)) / exp(t_0))); elseif (t_5 <= -5e-179) tmp = sin(Float64(y_46_im * fma(0.5, t_6, Float64(y_46_re * Float64(atan(x_46_im, x_46_re) / y_46_im))))); elseif (t_5 <= 0.0) tmp = Float64(t_4 * t_1); elseif (t_5 <= 1.0) tmp = sin(Float64(Float64(0.0 - y_46_im) * fma(t_6, -0.5, Float64(t_1 / Float64(0.0 - y_46_im))))); else tmp = Float64(exp(Float64(Float64(y_46_re * log(abs(x_46_re))) - t_0)) * 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$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[(x$46$re * x$46$re + N[(x$46$im * x$46$im), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[Exp[N[(N[(t$95$2 * y$46$re), $MachinePrecision] - t$95$0), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$5 = N[(t$95$4 * N[Sin[N[(N[(t$95$2 * y$46$im), $MachinePrecision] + t$95$1), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$6 = N[Log[t$95$3], $MachinePrecision]}, If[LessEqual[t$95$5, -0.5], N[(t$95$1 * N[(N[Power[t$95$3, N[(y$46$re * 0.5), $MachinePrecision]], $MachinePrecision] / N[Exp[t$95$0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$5, -5e-179], N[Sin[N[(y$46$im * N[(0.5 * t$95$6 + N[(y$46$re * N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] / y$46$im), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[LessEqual[t$95$5, 0.0], N[(t$95$4 * t$95$1), $MachinePrecision], If[LessEqual[t$95$5, 1.0], N[Sin[N[(N[(0.0 - y$46$im), $MachinePrecision] * N[(t$95$6 * -0.5 + N[(t$95$1 / N[(0.0 - y$46$im), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[(N[Exp[N[(N[(y$46$re * N[Log[N[Abs[x$46$re], $MachinePrecision]], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]], $MachinePrecision] * t$95$1), $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}\\
t_2 := \log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right)\\
t_3 := \mathsf{fma}\left(x.re, x.re, x.im \cdot x.im\right)\\
t_4 := e^{t\_2 \cdot y.re - t\_0}\\
t_5 := t\_4 \cdot \sin \left(t\_2 \cdot y.im + t\_1\right)\\
t_6 := \log t\_3\\
\mathbf{if}\;t\_5 \leq -0.5:\\
\;\;\;\;t\_1 \cdot \frac{{t\_3}^{\left(y.re \cdot 0.5\right)}}{e^{t\_0}}\\
\mathbf{elif}\;t\_5 \leq -5 \cdot 10^{-179}:\\
\;\;\;\;\sin \left(y.im \cdot \mathsf{fma}\left(0.5, t\_6, y.re \cdot \frac{\tan^{-1}_* \frac{x.im}{x.re}}{y.im}\right)\right)\\
\mathbf{elif}\;t\_5 \leq 0:\\
\;\;\;\;t\_4 \cdot t\_1\\
\mathbf{elif}\;t\_5 \leq 1:\\
\;\;\;\;\sin \left(\left(0 - y.im\right) \cdot \mathsf{fma}\left(t\_6, -0.5, \frac{t\_1}{0 - y.im}\right)\right)\\
\mathbf{else}:\\
\;\;\;\;e^{y.re \cdot \log \left(\left|x.re\right|\right) - t\_0} \cdot t\_1\\
\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)))) < -0.5Initial program 48.0%
Taylor expanded in y.im around 0
*-lowering-*.f64N/A
atan2-lowering-atan2.f6448.1
Simplified48.1%
Taylor expanded in y.re around 0
*-lowering-*.f64N/A
atan2-lowering-atan2.f6435.1
Simplified35.1%
exp-diffN/A
+-commutativeN/A
pow-to-expN/A
frac-2negN/A
/-lowering-/.f64N/A
Applied egg-rr39.4%
if -0.5 < (*.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)))) < -4.9999999999999998e-179Initial program 99.5%
flip3-+N/A
clear-numN/A
/-lowering-/.f64N/A
Applied egg-rr99.4%
Taylor expanded in y.im around 0
pow-lowering-pow.f64N/A
sqrt-lowering-sqrt.f64N/A
unpow2N/A
accelerator-lowering-fma.f64N/A
unpow2N/A
*-lowering-*.f6496.0
Simplified96.0%
Taylor expanded in y.re around 0
Simplified96.0%
Taylor expanded in y.im around inf
*-lowering-*.f64N/A
accelerator-lowering-fma.f64N/A
log-lowering-log.f64N/A
+-commutativeN/A
unpow2N/A
accelerator-lowering-fma.f64N/A
unpow2N/A
*-lowering-*.f64N/A
associate-/l*N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
atan2-lowering-atan2.f6496.3
Simplified96.3%
if -4.9999999999999998e-179 < (*.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)))) < -0.0Initial program 100.0%
Taylor expanded in y.im around 0
*-lowering-*.f64N/A
atan2-lowering-atan2.f64100.0
Simplified100.0%
Taylor expanded in y.re around 0
*-lowering-*.f64N/A
atan2-lowering-atan2.f64100.0
Simplified100.0%
if -0.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)))) < 1Initial program 87.9%
flip3-+N/A
clear-numN/A
/-lowering-/.f64N/A
Applied egg-rr87.9%
Taylor expanded in y.im around 0
pow-lowering-pow.f64N/A
sqrt-lowering-sqrt.f64N/A
unpow2N/A
accelerator-lowering-fma.f64N/A
unpow2N/A
*-lowering-*.f6485.2
Simplified85.2%
Taylor expanded in y.re around 0
Simplified83.1%
Taylor expanded in y.im around -inf
mul-1-negN/A
*-commutativeN/A
distribute-rgt-neg-inN/A
neg-mul-1N/A
*-lowering-*.f64N/A
Simplified83.3%
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)))) Initial program 10.6%
Taylor expanded in y.im around 0
*-lowering-*.f64N/A
atan2-lowering-atan2.f6444.6
Simplified44.6%
Taylor expanded in y.re around 0
*-lowering-*.f64N/A
atan2-lowering-atan2.f6444.0
Simplified44.0%
Taylor expanded in x.re around inf
unpow2N/A
*-lowering-*.f6443.2
Simplified43.2%
rem-sqrt-squareN/A
fabs-lowering-fabs.f6458.0
Applied egg-rr58.0%
Final simplification66.2%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (* (atan2 x.im x.re) y.im))
(t_1 (log (sqrt (+ (* x.re x.re) (* x.im x.im)))))
(t_2 (exp (- (* t_1 y.re) t_0)))
(t_3 (* y.re (atan2 x.im x.re)))
(t_4 (* t_2 (sin (+ (* t_1 y.im) t_3))))
(t_5 (log (fma x.re x.re (* x.im x.im)))))
(if (<= t_4 -0.5)
(*
y.re
(fma
(* -0.16666666666666666 (* y.re y.re))
(pow (atan2 x.im x.re) 3.0)
(atan2 x.im x.re)))
(if (<= t_4 -5e-179)
(sin (* y.im (fma 0.5 t_5 (* y.re (/ (atan2 x.im x.re) y.im)))))
(if (<= t_4 0.0)
(* t_2 t_3)
(if (<= t_4 1.0)
(sin (* (- 0.0 y.im) (fma t_5 -0.5 (/ t_3 (- 0.0 y.im)))))
(* (exp (- (* y.re (log (fabs x.re))) t_0)) t_3)))))))
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 = log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))));
double t_2 = exp(((t_1 * y_46_re) - t_0));
double t_3 = y_46_re * atan2(x_46_im, x_46_re);
double t_4 = t_2 * sin(((t_1 * y_46_im) + t_3));
double t_5 = log(fma(x_46_re, x_46_re, (x_46_im * x_46_im)));
double tmp;
if (t_4 <= -0.5) {
tmp = y_46_re * fma((-0.16666666666666666 * (y_46_re * y_46_re)), pow(atan2(x_46_im, x_46_re), 3.0), atan2(x_46_im, x_46_re));
} else if (t_4 <= -5e-179) {
tmp = sin((y_46_im * fma(0.5, t_5, (y_46_re * (atan2(x_46_im, x_46_re) / y_46_im)))));
} else if (t_4 <= 0.0) {
tmp = t_2 * t_3;
} else if (t_4 <= 1.0) {
tmp = sin(((0.0 - y_46_im) * fma(t_5, -0.5, (t_3 / (0.0 - y_46_im)))));
} else {
tmp = exp(((y_46_re * log(fabs(x_46_re))) - t_0)) * t_3;
}
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 = log(sqrt(Float64(Float64(x_46_re * x_46_re) + Float64(x_46_im * x_46_im)))) t_2 = exp(Float64(Float64(t_1 * y_46_re) - t_0)) t_3 = Float64(y_46_re * atan(x_46_im, x_46_re)) t_4 = Float64(t_2 * sin(Float64(Float64(t_1 * y_46_im) + t_3))) t_5 = log(fma(x_46_re, x_46_re, Float64(x_46_im * x_46_im))) tmp = 0.0 if (t_4 <= -0.5) tmp = Float64(y_46_re * fma(Float64(-0.16666666666666666 * Float64(y_46_re * y_46_re)), (atan(x_46_im, x_46_re) ^ 3.0), atan(x_46_im, x_46_re))); elseif (t_4 <= -5e-179) tmp = sin(Float64(y_46_im * fma(0.5, t_5, Float64(y_46_re * Float64(atan(x_46_im, x_46_re) / y_46_im))))); elseif (t_4 <= 0.0) tmp = Float64(t_2 * t_3); elseif (t_4 <= 1.0) tmp = sin(Float64(Float64(0.0 - y_46_im) * fma(t_5, -0.5, Float64(t_3 / Float64(0.0 - y_46_im))))); else tmp = Float64(exp(Float64(Float64(y_46_re * log(abs(x_46_re))) - t_0)) * t_3); 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[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[(t$95$1 * y$46$re), $MachinePrecision] - t$95$0), $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[(N[(t$95$1 * y$46$im), $MachinePrecision] + t$95$3), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$5 = N[Log[N[(x$46$re * x$46$re + N[(x$46$im * x$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[t$95$4, -0.5], N[(y$46$re * N[(N[(-0.16666666666666666 * N[(y$46$re * y$46$re), $MachinePrecision]), $MachinePrecision] * N[Power[N[ArcTan[x$46$im / x$46$re], $MachinePrecision], 3.0], $MachinePrecision] + N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$4, -5e-179], N[Sin[N[(y$46$im * N[(0.5 * t$95$5 + N[(y$46$re * N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] / y$46$im), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[LessEqual[t$95$4, 0.0], N[(t$95$2 * t$95$3), $MachinePrecision], If[LessEqual[t$95$4, 1.0], N[Sin[N[(N[(0.0 - y$46$im), $MachinePrecision] * N[(t$95$5 * -0.5 + N[(t$95$3 / N[(0.0 - y$46$im), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[(N[Exp[N[(N[(y$46$re * N[Log[N[Abs[x$46$re], $MachinePrecision]], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]], $MachinePrecision] * t$95$3), $MachinePrecision]]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im\\
t_1 := \log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right)\\
t_2 := e^{t\_1 \cdot y.re - t\_0}\\
t_3 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
t_4 := t\_2 \cdot \sin \left(t\_1 \cdot y.im + t\_3\right)\\
t_5 := \log \left(\mathsf{fma}\left(x.re, x.re, x.im \cdot x.im\right)\right)\\
\mathbf{if}\;t\_4 \leq -0.5:\\
\;\;\;\;y.re \cdot \mathsf{fma}\left(-0.16666666666666666 \cdot \left(y.re \cdot y.re\right), {\tan^{-1}_* \frac{x.im}{x.re}}^{3}, \tan^{-1}_* \frac{x.im}{x.re}\right)\\
\mathbf{elif}\;t\_4 \leq -5 \cdot 10^{-179}:\\
\;\;\;\;\sin \left(y.im \cdot \mathsf{fma}\left(0.5, t\_5, y.re \cdot \frac{\tan^{-1}_* \frac{x.im}{x.re}}{y.im}\right)\right)\\
\mathbf{elif}\;t\_4 \leq 0:\\
\;\;\;\;t\_2 \cdot t\_3\\
\mathbf{elif}\;t\_4 \leq 1:\\
\;\;\;\;\sin \left(\left(0 - y.im\right) \cdot \mathsf{fma}\left(t\_5, -0.5, \frac{t\_3}{0 - y.im}\right)\right)\\
\mathbf{else}:\\
\;\;\;\;e^{y.re \cdot \log \left(\left|x.re\right|\right) - t\_0} \cdot t\_3\\
\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)))) < -0.5Initial program 48.0%
Taylor expanded in y.re around 0
mul-1-negN/A
neg-sub0N/A
--lowering--.f64N/A
*-lowering-*.f64N/A
atan2-lowering-atan2.f6414.5
Simplified14.5%
Taylor expanded in y.im around 0
sin-lowering-sin.f64N/A
*-lowering-*.f64N/A
atan2-lowering-atan2.f642.0
Simplified2.0%
Taylor expanded in y.re around 0
*-lowering-*.f64N/A
associate-*r*N/A
accelerator-lowering-fma.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
pow-lowering-pow.f64N/A
atan2-lowering-atan2.f64N/A
atan2-lowering-atan2.f6436.1
Simplified36.1%
if -0.5 < (*.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)))) < -4.9999999999999998e-179Initial program 99.5%
flip3-+N/A
clear-numN/A
/-lowering-/.f64N/A
Applied egg-rr99.4%
Taylor expanded in y.im around 0
pow-lowering-pow.f64N/A
sqrt-lowering-sqrt.f64N/A
unpow2N/A
accelerator-lowering-fma.f64N/A
unpow2N/A
*-lowering-*.f6496.0
Simplified96.0%
Taylor expanded in y.re around 0
Simplified96.0%
Taylor expanded in y.im around inf
*-lowering-*.f64N/A
accelerator-lowering-fma.f64N/A
log-lowering-log.f64N/A
+-commutativeN/A
unpow2N/A
accelerator-lowering-fma.f64N/A
unpow2N/A
*-lowering-*.f64N/A
associate-/l*N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
atan2-lowering-atan2.f6496.3
Simplified96.3%
if -4.9999999999999998e-179 < (*.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)))) < -0.0Initial program 100.0%
Taylor expanded in y.im around 0
*-lowering-*.f64N/A
atan2-lowering-atan2.f64100.0
Simplified100.0%
Taylor expanded in y.re around 0
*-lowering-*.f64N/A
atan2-lowering-atan2.f64100.0
Simplified100.0%
if -0.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)))) < 1Initial program 87.9%
flip3-+N/A
clear-numN/A
/-lowering-/.f64N/A
Applied egg-rr87.9%
Taylor expanded in y.im around 0
pow-lowering-pow.f64N/A
sqrt-lowering-sqrt.f64N/A
unpow2N/A
accelerator-lowering-fma.f64N/A
unpow2N/A
*-lowering-*.f6485.2
Simplified85.2%
Taylor expanded in y.re around 0
Simplified83.1%
Taylor expanded in y.im around -inf
mul-1-negN/A
*-commutativeN/A
distribute-rgt-neg-inN/A
neg-mul-1N/A
*-lowering-*.f64N/A
Simplified83.3%
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)))) Initial program 10.6%
Taylor expanded in y.im around 0
*-lowering-*.f64N/A
atan2-lowering-atan2.f6444.6
Simplified44.6%
Taylor expanded in y.re around 0
*-lowering-*.f64N/A
atan2-lowering-atan2.f6444.0
Simplified44.0%
Taylor expanded in x.re around inf
unpow2N/A
*-lowering-*.f6443.2
Simplified43.2%
rem-sqrt-squareN/A
fabs-lowering-fabs.f6458.0
Applied egg-rr58.0%
Final simplification66.3%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (* (atan2 x.im x.re) y.im))
(t_1 (log (sqrt (+ (* x.re x.re) (* x.im x.im)))))
(t_2 (* y.re (atan2 x.im x.re)))
(t_3 (* (exp (- (* t_1 y.re) t_0)) (sin (+ (* t_1 y.im) t_2))))
(t_4 (* (exp (- (* y.re (log (fabs x.re))) t_0)) t_2))
(t_5 (log (fma x.re x.re (* x.im x.im)))))
(if (<= t_3 -0.5)
(*
y.re
(fma
(* -0.16666666666666666 (* y.re y.re))
(pow (atan2 x.im x.re) 3.0)
(atan2 x.im x.re)))
(if (<= t_3 -5e-179)
(sin (* y.im (fma 0.5 t_5 (* y.re (/ (atan2 x.im x.re) y.im)))))
(if (<= t_3 0.0)
t_4
(if (<= t_3 1.0)
(sin (* (- 0.0 y.im) (fma t_5 -0.5 (/ t_2 (- 0.0 y.im)))))
t_4))))))
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 = log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))));
double t_2 = y_46_re * atan2(x_46_im, x_46_re);
double t_3 = exp(((t_1 * y_46_re) - t_0)) * sin(((t_1 * y_46_im) + t_2));
double t_4 = exp(((y_46_re * log(fabs(x_46_re))) - t_0)) * t_2;
double t_5 = log(fma(x_46_re, x_46_re, (x_46_im * x_46_im)));
double tmp;
if (t_3 <= -0.5) {
tmp = y_46_re * fma((-0.16666666666666666 * (y_46_re * y_46_re)), pow(atan2(x_46_im, x_46_re), 3.0), atan2(x_46_im, x_46_re));
} else if (t_3 <= -5e-179) {
tmp = sin((y_46_im * fma(0.5, t_5, (y_46_re * (atan2(x_46_im, x_46_re) / y_46_im)))));
} else if (t_3 <= 0.0) {
tmp = t_4;
} else if (t_3 <= 1.0) {
tmp = sin(((0.0 - y_46_im) * fma(t_5, -0.5, (t_2 / (0.0 - y_46_im)))));
} else {
tmp = t_4;
}
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 = log(sqrt(Float64(Float64(x_46_re * x_46_re) + Float64(x_46_im * x_46_im)))) t_2 = Float64(y_46_re * atan(x_46_im, x_46_re)) t_3 = Float64(exp(Float64(Float64(t_1 * y_46_re) - t_0)) * sin(Float64(Float64(t_1 * y_46_im) + t_2))) t_4 = Float64(exp(Float64(Float64(y_46_re * log(abs(x_46_re))) - t_0)) * t_2) t_5 = log(fma(x_46_re, x_46_re, Float64(x_46_im * x_46_im))) tmp = 0.0 if (t_3 <= -0.5) tmp = Float64(y_46_re * fma(Float64(-0.16666666666666666 * Float64(y_46_re * y_46_re)), (atan(x_46_im, x_46_re) ^ 3.0), atan(x_46_im, x_46_re))); elseif (t_3 <= -5e-179) tmp = sin(Float64(y_46_im * fma(0.5, t_5, Float64(y_46_re * Float64(atan(x_46_im, x_46_re) / y_46_im))))); elseif (t_3 <= 0.0) tmp = t_4; elseif (t_3 <= 1.0) tmp = sin(Float64(Float64(0.0 - y_46_im) * fma(t_5, -0.5, Float64(t_2 / Float64(0.0 - y_46_im))))); else tmp = t_4; 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[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[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[Exp[N[(N[(t$95$1 * y$46$re), $MachinePrecision] - t$95$0), $MachinePrecision]], $MachinePrecision] * N[Sin[N[(N[(t$95$1 * y$46$im), $MachinePrecision] + t$95$2), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[(N[Exp[N[(N[(y$46$re * N[Log[N[Abs[x$46$re], $MachinePrecision]], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]], $MachinePrecision] * t$95$2), $MachinePrecision]}, Block[{t$95$5 = N[Log[N[(x$46$re * x$46$re + N[(x$46$im * x$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[t$95$3, -0.5], N[(y$46$re * N[(N[(-0.16666666666666666 * N[(y$46$re * y$46$re), $MachinePrecision]), $MachinePrecision] * N[Power[N[ArcTan[x$46$im / x$46$re], $MachinePrecision], 3.0], $MachinePrecision] + N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$3, -5e-179], N[Sin[N[(y$46$im * N[(0.5 * t$95$5 + N[(y$46$re * N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] / y$46$im), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[LessEqual[t$95$3, 0.0], t$95$4, If[LessEqual[t$95$3, 1.0], N[Sin[N[(N[(0.0 - y$46$im), $MachinePrecision] * N[(t$95$5 * -0.5 + N[(t$95$2 / N[(0.0 - y$46$im), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], t$95$4]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im\\
t_1 := \log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right)\\
t_2 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
t_3 := e^{t\_1 \cdot y.re - t\_0} \cdot \sin \left(t\_1 \cdot y.im + t\_2\right)\\
t_4 := e^{y.re \cdot \log \left(\left|x.re\right|\right) - t\_0} \cdot t\_2\\
t_5 := \log \left(\mathsf{fma}\left(x.re, x.re, x.im \cdot x.im\right)\right)\\
\mathbf{if}\;t\_3 \leq -0.5:\\
\;\;\;\;y.re \cdot \mathsf{fma}\left(-0.16666666666666666 \cdot \left(y.re \cdot y.re\right), {\tan^{-1}_* \frac{x.im}{x.re}}^{3}, \tan^{-1}_* \frac{x.im}{x.re}\right)\\
\mathbf{elif}\;t\_3 \leq -5 \cdot 10^{-179}:\\
\;\;\;\;\sin \left(y.im \cdot \mathsf{fma}\left(0.5, t\_5, y.re \cdot \frac{\tan^{-1}_* \frac{x.im}{x.re}}{y.im}\right)\right)\\
\mathbf{elif}\;t\_3 \leq 0:\\
\;\;\;\;t\_4\\
\mathbf{elif}\;t\_3 \leq 1:\\
\;\;\;\;\sin \left(\left(0 - y.im\right) \cdot \mathsf{fma}\left(t\_5, -0.5, \frac{t\_2}{0 - y.im}\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t\_4\\
\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)))) < -0.5Initial program 48.0%
Taylor expanded in y.re around 0
mul-1-negN/A
neg-sub0N/A
--lowering--.f64N/A
*-lowering-*.f64N/A
atan2-lowering-atan2.f6414.5
Simplified14.5%
Taylor expanded in y.im around 0
sin-lowering-sin.f64N/A
*-lowering-*.f64N/A
atan2-lowering-atan2.f642.0
Simplified2.0%
Taylor expanded in y.re around 0
*-lowering-*.f64N/A
associate-*r*N/A
accelerator-lowering-fma.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
pow-lowering-pow.f64N/A
atan2-lowering-atan2.f64N/A
atan2-lowering-atan2.f6436.1
Simplified36.1%
if -0.5 < (*.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)))) < -4.9999999999999998e-179Initial program 99.5%
flip3-+N/A
clear-numN/A
/-lowering-/.f64N/A
Applied egg-rr99.4%
Taylor expanded in y.im around 0
pow-lowering-pow.f64N/A
sqrt-lowering-sqrt.f64N/A
unpow2N/A
accelerator-lowering-fma.f64N/A
unpow2N/A
*-lowering-*.f6496.0
Simplified96.0%
Taylor expanded in y.re around 0
Simplified96.0%
Taylor expanded in y.im around inf
*-lowering-*.f64N/A
accelerator-lowering-fma.f64N/A
log-lowering-log.f64N/A
+-commutativeN/A
unpow2N/A
accelerator-lowering-fma.f64N/A
unpow2N/A
*-lowering-*.f64N/A
associate-/l*N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
atan2-lowering-atan2.f6496.3
Simplified96.3%
if -4.9999999999999998e-179 < (*.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)))) < -0.0 or 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)))) Initial program 25.9%
Taylor expanded in y.im around 0
*-lowering-*.f64N/A
atan2-lowering-atan2.f6454.1
Simplified54.1%
Taylor expanded in y.re around 0
*-lowering-*.f64N/A
atan2-lowering-atan2.f6453.6
Simplified53.6%
Taylor expanded in x.re around inf
unpow2N/A
*-lowering-*.f6450.8
Simplified50.8%
rem-sqrt-squareN/A
fabs-lowering-fabs.f6464.1
Applied egg-rr64.1%
if -0.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)))) < 1Initial program 87.9%
flip3-+N/A
clear-numN/A
/-lowering-/.f64N/A
Applied egg-rr87.9%
Taylor expanded in y.im around 0
pow-lowering-pow.f64N/A
sqrt-lowering-sqrt.f64N/A
unpow2N/A
accelerator-lowering-fma.f64N/A
unpow2N/A
*-lowering-*.f6485.2
Simplified85.2%
Taylor expanded in y.re around 0
Simplified83.1%
Taylor expanded in y.im around -inf
mul-1-negN/A
*-commutativeN/A
distribute-rgt-neg-inN/A
neg-mul-1N/A
*-lowering-*.f64N/A
Simplified83.3%
Final simplification65.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)))
(t_2 (log (sqrt (+ (* x.re x.re) (* x.im x.im)))))
(t_3 (exp (- (* t_2 y.re) t_0)))
(t_4 (* t_3 (sin (+ (* t_2 y.im) t_1))))
(t_5 (log (fma x.re x.re (* x.im x.im)))))
(if (<= t_4 -2e-159)
(*
(sin (fma (* y.im 0.5) t_5 t_1))
(pow (sqrt (fma x.im x.im (* x.re x.re))) y.re))
(if (<= t_4 0.0)
(* t_3 t_1)
(if (<= t_4 1.0)
(/
(sin (fma y.re (atan2 x.im x.re) (* t_5 (* y.im 0.5))))
(exp (fma (atan2 x.im x.re) y.im 0.0)))
(* (exp (- (* y.re (log (fabs x.re))) t_0)) 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_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(((t_2 * y_46_re) - t_0));
double t_4 = t_3 * sin(((t_2 * y_46_im) + t_1));
double t_5 = log(fma(x_46_re, x_46_re, (x_46_im * x_46_im)));
double tmp;
if (t_4 <= -2e-159) {
tmp = sin(fma((y_46_im * 0.5), t_5, t_1)) * pow(sqrt(fma(x_46_im, x_46_im, (x_46_re * x_46_re))), y_46_re);
} else if (t_4 <= 0.0) {
tmp = t_3 * t_1;
} else if (t_4 <= 1.0) {
tmp = sin(fma(y_46_re, atan2(x_46_im, x_46_re), (t_5 * (y_46_im * 0.5)))) / exp(fma(atan2(x_46_im, x_46_re), y_46_im, 0.0));
} else {
tmp = exp(((y_46_re * log(fabs(x_46_re))) - t_0)) * 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_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 = exp(Float64(Float64(t_2 * y_46_re) - t_0)) t_4 = Float64(t_3 * sin(Float64(Float64(t_2 * y_46_im) + t_1))) t_5 = log(fma(x_46_re, x_46_re, Float64(x_46_im * x_46_im))) tmp = 0.0 if (t_4 <= -2e-159) tmp = Float64(sin(fma(Float64(y_46_im * 0.5), t_5, t_1)) * (sqrt(fma(x_46_im, x_46_im, Float64(x_46_re * x_46_re))) ^ y_46_re)); elseif (t_4 <= 0.0) tmp = Float64(t_3 * t_1); elseif (t_4 <= 1.0) tmp = Float64(sin(fma(y_46_re, atan(x_46_im, x_46_re), Float64(t_5 * Float64(y_46_im * 0.5)))) / exp(fma(atan(x_46_im, x_46_re), y_46_im, 0.0))); else tmp = Float64(exp(Float64(Float64(y_46_re * log(abs(x_46_re))) - t_0)) * 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$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[Exp[N[(N[(t$95$2 * y$46$re), $MachinePrecision] - t$95$0), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$4 = N[(t$95$3 * N[Sin[N[(N[(t$95$2 * y$46$im), $MachinePrecision] + t$95$1), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$5 = N[Log[N[(x$46$re * x$46$re + N[(x$46$im * x$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[t$95$4, -2e-159], N[(N[Sin[N[(N[(y$46$im * 0.5), $MachinePrecision] * t$95$5 + t$95$1), $MachinePrecision]], $MachinePrecision] * N[Power[N[Sqrt[N[(x$46$im * x$46$im + N[(x$46$re * x$46$re), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], y$46$re], $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$4, 0.0], N[(t$95$3 * t$95$1), $MachinePrecision], If[LessEqual[t$95$4, 1.0], N[(N[Sin[N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision] + N[(t$95$5 * N[(y$46$im * 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / N[Exp[N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$im + 0.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(N[Exp[N[(N[(y$46$re * N[Log[N[Abs[x$46$re], $MachinePrecision]], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]], $MachinePrecision] * t$95$1), $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}\\
t_2 := \log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right)\\
t_3 := e^{t\_2 \cdot y.re - t\_0}\\
t_4 := t\_3 \cdot \sin \left(t\_2 \cdot y.im + t\_1\right)\\
t_5 := \log \left(\mathsf{fma}\left(x.re, x.re, x.im \cdot x.im\right)\right)\\
\mathbf{if}\;t\_4 \leq -2 \cdot 10^{-159}:\\
\;\;\;\;\sin \left(\mathsf{fma}\left(y.im \cdot 0.5, t\_5, t\_1\right)\right) \cdot {\left(\sqrt{\mathsf{fma}\left(x.im, x.im, x.re \cdot x.re\right)}\right)}^{y.re}\\
\mathbf{elif}\;t\_4 \leq 0:\\
\;\;\;\;t\_3 \cdot t\_1\\
\mathbf{elif}\;t\_4 \leq 1:\\
\;\;\;\;\frac{\sin \left(\mathsf{fma}\left(y.re, \tan^{-1}_* \frac{x.im}{x.re}, t\_5 \cdot \left(y.im \cdot 0.5\right)\right)\right)}{e^{\mathsf{fma}\left(\tan^{-1}_* \frac{x.im}{x.re}, y.im, 0\right)}}\\
\mathbf{else}:\\
\;\;\;\;e^{y.re \cdot \log \left(\left|x.re\right|\right) - t\_0} \cdot t\_1\\
\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)))) < -1.99999999999999998e-159Initial program 69.9%
*-commutativeN/A
pow1/2N/A
log-powN/A
associate-*r*N/A
accelerator-lowering-fma.f64N/A
*-lowering-*.f64N/A
log-lowering-log.f64N/A
accelerator-lowering-fma.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
atan2-lowering-atan2.f6469.9
Applied egg-rr69.9%
Taylor expanded in y.im around 0
pow-lowering-pow.f64N/A
sqrt-lowering-sqrt.f64N/A
unpow2N/A
accelerator-lowering-fma.f64N/A
unpow2N/A
*-lowering-*.f6463.6
Simplified63.6%
if -1.99999999999999998e-159 < (*.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)))) < -0.0Initial program 100.0%
Taylor expanded in y.im around 0
*-lowering-*.f64N/A
atan2-lowering-atan2.f64100.0
Simplified100.0%
Taylor expanded in y.re around 0
*-lowering-*.f64N/A
atan2-lowering-atan2.f64100.0
Simplified100.0%
if -0.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)))) < 1Initial program 87.9%
Taylor expanded in y.re around 0
mul-1-negN/A
neg-sub0N/A
--lowering--.f64N/A
*-lowering-*.f64N/A
atan2-lowering-atan2.f6485.9
Simplified85.9%
*-commutativeN/A
exp-diffN/A
1-expN/A
*-commutativeN/A
un-div-invN/A
*-commutativeN/A
pow1/2N/A
log-powN/A
associate-*l*N/A
Applied egg-rr86.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)))) Initial program 10.6%
Taylor expanded in y.im around 0
*-lowering-*.f64N/A
atan2-lowering-atan2.f6444.6
Simplified44.6%
Taylor expanded in y.re around 0
*-lowering-*.f64N/A
atan2-lowering-atan2.f6444.0
Simplified44.0%
Taylor expanded in x.re around inf
unpow2N/A
*-lowering-*.f6443.2
Simplified43.2%
rem-sqrt-squareN/A
fabs-lowering-fabs.f6458.0
Applied egg-rr58.0%
Final simplification66.8%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (pow (sqrt (fma x.im x.im (* x.re x.re))) y.re))
(t_1 (* (atan2 x.im x.re) y.im))
(t_2 (* y.re (atan2 x.im x.re)))
(t_3 (log (sqrt (+ (* x.re x.re) (* x.im x.im)))))
(t_4 (exp (- (* t_3 y.re) t_1)))
(t_5 (* t_4 (sin (+ (* t_3 y.im) t_2))))
(t_6 (log (fma x.re x.re (* x.im x.im)))))
(if (<= t_5 -2e-159)
(* (sin (fma (* y.im 0.5) t_6 t_2)) t_0)
(if (<= t_5 0.0)
(* t_4 t_2)
(if (<= t_5 INFINITY)
(* (sin (/ 1.0 (/ 1.0 (fma (* 0.5 t_6) y.im t_2)))) t_0)
(* (exp (- (* y.re (log (fabs x.re))) t_1)) t_2))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = pow(sqrt(fma(x_46_im, x_46_im, (x_46_re * x_46_re))), y_46_re);
double t_1 = atan2(x_46_im, x_46_re) * y_46_im;
double t_2 = y_46_re * atan2(x_46_im, x_46_re);
double t_3 = log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))));
double t_4 = exp(((t_3 * y_46_re) - t_1));
double t_5 = t_4 * sin(((t_3 * y_46_im) + t_2));
double t_6 = log(fma(x_46_re, x_46_re, (x_46_im * x_46_im)));
double tmp;
if (t_5 <= -2e-159) {
tmp = sin(fma((y_46_im * 0.5), t_6, t_2)) * t_0;
} else if (t_5 <= 0.0) {
tmp = t_4 * t_2;
} else if (t_5 <= ((double) INFINITY)) {
tmp = sin((1.0 / (1.0 / fma((0.5 * t_6), y_46_im, t_2)))) * t_0;
} else {
tmp = exp(((y_46_re * log(fabs(x_46_re))) - t_1)) * t_2;
}
return tmp;
}
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = sqrt(fma(x_46_im, x_46_im, Float64(x_46_re * x_46_re))) ^ y_46_re t_1 = Float64(atan(x_46_im, x_46_re) * y_46_im) t_2 = Float64(y_46_re * atan(x_46_im, x_46_re)) t_3 = log(sqrt(Float64(Float64(x_46_re * x_46_re) + Float64(x_46_im * x_46_im)))) t_4 = exp(Float64(Float64(t_3 * y_46_re) - t_1)) t_5 = Float64(t_4 * sin(Float64(Float64(t_3 * y_46_im) + t_2))) t_6 = log(fma(x_46_re, x_46_re, Float64(x_46_im * x_46_im))) tmp = 0.0 if (t_5 <= -2e-159) tmp = Float64(sin(fma(Float64(y_46_im * 0.5), t_6, t_2)) * t_0); elseif (t_5 <= 0.0) tmp = Float64(t_4 * t_2); elseif (t_5 <= Inf) tmp = Float64(sin(Float64(1.0 / Float64(1.0 / fma(Float64(0.5 * t_6), y_46_im, t_2)))) * t_0); else tmp = Float64(exp(Float64(Float64(y_46_re * log(abs(x_46_re))) - t_1)) * t_2); end return tmp end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[Power[N[Sqrt[N[(x$46$im * x$46$im + N[(x$46$re * x$46$re), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], y$46$re], $MachinePrecision]}, Block[{t$95$1 = N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$im), $MachinePrecision]}, Block[{t$95$2 = N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = 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$4 = N[Exp[N[(N[(t$95$3 * y$46$re), $MachinePrecision] - t$95$1), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$5 = N[(t$95$4 * N[Sin[N[(N[(t$95$3 * y$46$im), $MachinePrecision] + t$95$2), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$6 = N[Log[N[(x$46$re * x$46$re + N[(x$46$im * x$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[t$95$5, -2e-159], N[(N[Sin[N[(N[(y$46$im * 0.5), $MachinePrecision] * t$95$6 + t$95$2), $MachinePrecision]], $MachinePrecision] * t$95$0), $MachinePrecision], If[LessEqual[t$95$5, 0.0], N[(t$95$4 * t$95$2), $MachinePrecision], If[LessEqual[t$95$5, Infinity], N[(N[Sin[N[(1.0 / N[(1.0 / N[(N[(0.5 * t$95$6), $MachinePrecision] * y$46$im + t$95$2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * t$95$0), $MachinePrecision], N[(N[Exp[N[(N[(y$46$re * N[Log[N[Abs[x$46$re], $MachinePrecision]], $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision]], $MachinePrecision] * t$95$2), $MachinePrecision]]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := {\left(\sqrt{\mathsf{fma}\left(x.im, x.im, x.re \cdot x.re\right)}\right)}^{y.re}\\
t_1 := \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im\\
t_2 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
t_3 := \log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right)\\
t_4 := e^{t\_3 \cdot y.re - t\_1}\\
t_5 := t\_4 \cdot \sin \left(t\_3 \cdot y.im + t\_2\right)\\
t_6 := \log \left(\mathsf{fma}\left(x.re, x.re, x.im \cdot x.im\right)\right)\\
\mathbf{if}\;t\_5 \leq -2 \cdot 10^{-159}:\\
\;\;\;\;\sin \left(\mathsf{fma}\left(y.im \cdot 0.5, t\_6, t\_2\right)\right) \cdot t\_0\\
\mathbf{elif}\;t\_5 \leq 0:\\
\;\;\;\;t\_4 \cdot t\_2\\
\mathbf{elif}\;t\_5 \leq \infty:\\
\;\;\;\;\sin \left(\frac{1}{\frac{1}{\mathsf{fma}\left(0.5 \cdot t\_6, y.im, t\_2\right)}}\right) \cdot t\_0\\
\mathbf{else}:\\
\;\;\;\;e^{y.re \cdot \log \left(\left|x.re\right|\right) - t\_1} \cdot t\_2\\
\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)))) < -1.99999999999999998e-159Initial program 69.9%
*-commutativeN/A
pow1/2N/A
log-powN/A
associate-*r*N/A
accelerator-lowering-fma.f64N/A
*-lowering-*.f64N/A
log-lowering-log.f64N/A
accelerator-lowering-fma.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
atan2-lowering-atan2.f6469.9
Applied egg-rr69.9%
Taylor expanded in y.im around 0
pow-lowering-pow.f64N/A
sqrt-lowering-sqrt.f64N/A
unpow2N/A
accelerator-lowering-fma.f64N/A
unpow2N/A
*-lowering-*.f6463.6
Simplified63.6%
if -1.99999999999999998e-159 < (*.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)))) < -0.0Initial program 100.0%
Taylor expanded in y.im around 0
*-lowering-*.f64N/A
atan2-lowering-atan2.f64100.0
Simplified100.0%
Taylor expanded in y.re around 0
*-lowering-*.f64N/A
atan2-lowering-atan2.f64100.0
Simplified100.0%
if -0.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)))) < +inf.0Initial program 80.8%
flip3-+N/A
clear-numN/A
/-lowering-/.f64N/A
Applied egg-rr83.0%
Taylor expanded in y.im around 0
pow-lowering-pow.f64N/A
sqrt-lowering-sqrt.f64N/A
unpow2N/A
accelerator-lowering-fma.f64N/A
unpow2N/A
*-lowering-*.f6468.8
Simplified68.8%
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%
Taylor expanded in y.im around 0
*-lowering-*.f64N/A
atan2-lowering-atan2.f6439.7
Simplified39.7%
Taylor expanded in y.re around 0
*-lowering-*.f64N/A
atan2-lowering-atan2.f6441.9
Simplified41.9%
Taylor expanded in x.re around inf
unpow2N/A
*-lowering-*.f6443.7
Simplified43.7%
rem-sqrt-squareN/A
fabs-lowering-fabs.f6458.9
Applied egg-rr58.9%
Final simplification66.8%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (* (atan2 x.im x.re) y.im))
(t_1 (fma x.im x.im (* x.re x.re)))
(t_2 (pow (sqrt t_1) y.re))
(t_3 (* y.re (atan2 x.im x.re)))
(t_4 (log (sqrt (+ (* x.re x.re) (* x.im x.im)))))
(t_5 (exp (- (* t_4 y.re) t_0)))
(t_6 (* t_5 (sin (+ (* t_4 y.im) t_3)))))
(if (<= t_6 -2e-159)
(* (sin (fma (* y.im 0.5) (log (fma x.re x.re (* x.im x.im))) t_3)) t_2)
(if (<= t_6 0.0)
(* t_5 t_3)
(if (<= t_6 1.0)
(*
t_2
(sin (* (fma (log t_1) -0.5 (/ t_3 (- 0.0 y.im))) (- 0.0 y.im))))
(* (exp (- (* y.re (log (fabs x.re))) t_0)) t_3))))))
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 = fma(x_46_im, x_46_im, (x_46_re * x_46_re));
double t_2 = pow(sqrt(t_1), y_46_re);
double t_3 = y_46_re * atan2(x_46_im, x_46_re);
double t_4 = log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))));
double t_5 = exp(((t_4 * y_46_re) - t_0));
double t_6 = t_5 * sin(((t_4 * y_46_im) + t_3));
double tmp;
if (t_6 <= -2e-159) {
tmp = sin(fma((y_46_im * 0.5), log(fma(x_46_re, x_46_re, (x_46_im * x_46_im))), t_3)) * t_2;
} else if (t_6 <= 0.0) {
tmp = t_5 * t_3;
} else if (t_6 <= 1.0) {
tmp = t_2 * sin((fma(log(t_1), -0.5, (t_3 / (0.0 - y_46_im))) * (0.0 - y_46_im)));
} else {
tmp = exp(((y_46_re * log(fabs(x_46_re))) - t_0)) * t_3;
}
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 = fma(x_46_im, x_46_im, Float64(x_46_re * x_46_re)) t_2 = sqrt(t_1) ^ y_46_re t_3 = Float64(y_46_re * atan(x_46_im, x_46_re)) t_4 = log(sqrt(Float64(Float64(x_46_re * x_46_re) + Float64(x_46_im * x_46_im)))) t_5 = exp(Float64(Float64(t_4 * y_46_re) - t_0)) t_6 = Float64(t_5 * sin(Float64(Float64(t_4 * y_46_im) + t_3))) tmp = 0.0 if (t_6 <= -2e-159) tmp = Float64(sin(fma(Float64(y_46_im * 0.5), log(fma(x_46_re, x_46_re, Float64(x_46_im * x_46_im))), t_3)) * t_2); elseif (t_6 <= 0.0) tmp = Float64(t_5 * t_3); elseif (t_6 <= 1.0) tmp = Float64(t_2 * sin(Float64(fma(log(t_1), -0.5, Float64(t_3 / Float64(0.0 - y_46_im))) * Float64(0.0 - y_46_im)))); else tmp = Float64(exp(Float64(Float64(y_46_re * log(abs(x_46_re))) - t_0)) * t_3); 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[(x$46$im * x$46$im + N[(x$46$re * x$46$re), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[Power[N[Sqrt[t$95$1], $MachinePrecision], y$46$re], $MachinePrecision]}, Block[{t$95$3 = N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = 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$5 = N[Exp[N[(N[(t$95$4 * y$46$re), $MachinePrecision] - t$95$0), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$6 = N[(t$95$5 * N[Sin[N[(N[(t$95$4 * y$46$im), $MachinePrecision] + t$95$3), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$6, -2e-159], N[(N[Sin[N[(N[(y$46$im * 0.5), $MachinePrecision] * N[Log[N[(x$46$re * x$46$re + N[(x$46$im * x$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] + t$95$3), $MachinePrecision]], $MachinePrecision] * t$95$2), $MachinePrecision], If[LessEqual[t$95$6, 0.0], N[(t$95$5 * t$95$3), $MachinePrecision], If[LessEqual[t$95$6, 1.0], N[(t$95$2 * N[Sin[N[(N[(N[Log[t$95$1], $MachinePrecision] * -0.5 + N[(t$95$3 / N[(0.0 - y$46$im), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(0.0 - y$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(N[Exp[N[(N[(y$46$re * N[Log[N[Abs[x$46$re], $MachinePrecision]], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]], $MachinePrecision] * t$95$3), $MachinePrecision]]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im\\
t_1 := \mathsf{fma}\left(x.im, x.im, x.re \cdot x.re\right)\\
t_2 := {\left(\sqrt{t\_1}\right)}^{y.re}\\
t_3 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
t_4 := \log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right)\\
t_5 := e^{t\_4 \cdot y.re - t\_0}\\
t_6 := t\_5 \cdot \sin \left(t\_4 \cdot y.im + t\_3\right)\\
\mathbf{if}\;t\_6 \leq -2 \cdot 10^{-159}:\\
\;\;\;\;\sin \left(\mathsf{fma}\left(y.im \cdot 0.5, \log \left(\mathsf{fma}\left(x.re, x.re, x.im \cdot x.im\right)\right), t\_3\right)\right) \cdot t\_2\\
\mathbf{elif}\;t\_6 \leq 0:\\
\;\;\;\;t\_5 \cdot t\_3\\
\mathbf{elif}\;t\_6 \leq 1:\\
\;\;\;\;t\_2 \cdot \sin \left(\mathsf{fma}\left(\log t\_1, -0.5, \frac{t\_3}{0 - y.im}\right) \cdot \left(0 - y.im\right)\right)\\
\mathbf{else}:\\
\;\;\;\;e^{y.re \cdot \log \left(\left|x.re\right|\right) - t\_0} \cdot t\_3\\
\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)))) < -1.99999999999999998e-159Initial program 69.9%
*-commutativeN/A
pow1/2N/A
log-powN/A
associate-*r*N/A
accelerator-lowering-fma.f64N/A
*-lowering-*.f64N/A
log-lowering-log.f64N/A
accelerator-lowering-fma.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
atan2-lowering-atan2.f6469.9
Applied egg-rr69.9%
Taylor expanded in y.im around 0
pow-lowering-pow.f64N/A
sqrt-lowering-sqrt.f64N/A
unpow2N/A
accelerator-lowering-fma.f64N/A
unpow2N/A
*-lowering-*.f6463.6
Simplified63.6%
if -1.99999999999999998e-159 < (*.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)))) < -0.0Initial program 100.0%
Taylor expanded in y.im around 0
*-lowering-*.f64N/A
atan2-lowering-atan2.f64100.0
Simplified100.0%
Taylor expanded in y.re around 0
*-lowering-*.f64N/A
atan2-lowering-atan2.f64100.0
Simplified100.0%
if -0.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)))) < 1Initial program 87.9%
flip3-+N/A
clear-numN/A
/-lowering-/.f64N/A
Applied egg-rr87.9%
Taylor expanded in y.im around 0
pow-lowering-pow.f64N/A
sqrt-lowering-sqrt.f64N/A
unpow2N/A
accelerator-lowering-fma.f64N/A
unpow2N/A
*-lowering-*.f6485.2
Simplified85.2%
Taylor expanded in y.im around -inf
mul-1-negN/A
*-commutativeN/A
distribute-rgt-neg-inN/A
neg-mul-1N/A
*-lowering-*.f64N/A
Simplified85.3%
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)))) Initial program 10.6%
Taylor expanded in y.im around 0
*-lowering-*.f64N/A
atan2-lowering-atan2.f6444.6
Simplified44.6%
Taylor expanded in y.re around 0
*-lowering-*.f64N/A
atan2-lowering-atan2.f6444.0
Simplified44.0%
Taylor expanded in x.re around inf
unpow2N/A
*-lowering-*.f6443.2
Simplified43.2%
rem-sqrt-squareN/A
fabs-lowering-fabs.f6458.0
Applied egg-rr58.0%
Final simplification66.8%
(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)))
(t_2 (log (sqrt (+ (* x.re x.re) (* x.im x.im)))))
(t_3 (exp (- (* t_2 y.re) t_0)))
(t_4 (* t_3 (sin (+ (* t_2 y.im) t_1))))
(t_5
(*
(sin (fma (* y.im 0.5) (log (fma x.re x.re (* x.im x.im))) t_1))
(pow (sqrt (fma x.im x.im (* x.re x.re))) y.re))))
(if (<= t_4 -2e-159)
t_5
(if (<= t_4 0.0)
(* t_3 t_1)
(if (<= t_4 1.0)
t_5
(* (exp (- (* y.re (log (fabs x.re))) t_0)) 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_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(((t_2 * y_46_re) - t_0));
double t_4 = t_3 * sin(((t_2 * y_46_im) + t_1));
double t_5 = sin(fma((y_46_im * 0.5), log(fma(x_46_re, x_46_re, (x_46_im * x_46_im))), t_1)) * pow(sqrt(fma(x_46_im, x_46_im, (x_46_re * x_46_re))), y_46_re);
double tmp;
if (t_4 <= -2e-159) {
tmp = t_5;
} else if (t_4 <= 0.0) {
tmp = t_3 * t_1;
} else if (t_4 <= 1.0) {
tmp = t_5;
} else {
tmp = exp(((y_46_re * log(fabs(x_46_re))) - t_0)) * 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_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 = exp(Float64(Float64(t_2 * y_46_re) - t_0)) t_4 = Float64(t_3 * sin(Float64(Float64(t_2 * y_46_im) + t_1))) t_5 = Float64(sin(fma(Float64(y_46_im * 0.5), log(fma(x_46_re, x_46_re, Float64(x_46_im * x_46_im))), t_1)) * (sqrt(fma(x_46_im, x_46_im, Float64(x_46_re * x_46_re))) ^ y_46_re)) tmp = 0.0 if (t_4 <= -2e-159) tmp = t_5; elseif (t_4 <= 0.0) tmp = Float64(t_3 * t_1); elseif (t_4 <= 1.0) tmp = t_5; else tmp = Float64(exp(Float64(Float64(y_46_re * log(abs(x_46_re))) - t_0)) * 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$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[Exp[N[(N[(t$95$2 * y$46$re), $MachinePrecision] - t$95$0), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$4 = N[(t$95$3 * N[Sin[N[(N[(t$95$2 * y$46$im), $MachinePrecision] + t$95$1), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$5 = N[(N[Sin[N[(N[(y$46$im * 0.5), $MachinePrecision] * N[Log[N[(x$46$re * x$46$re + N[(x$46$im * x$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] + t$95$1), $MachinePrecision]], $MachinePrecision] * N[Power[N[Sqrt[N[(x$46$im * x$46$im + N[(x$46$re * x$46$re), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], y$46$re], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$4, -2e-159], t$95$5, If[LessEqual[t$95$4, 0.0], N[(t$95$3 * t$95$1), $MachinePrecision], If[LessEqual[t$95$4, 1.0], t$95$5, N[(N[Exp[N[(N[(y$46$re * N[Log[N[Abs[x$46$re], $MachinePrecision]], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]], $MachinePrecision] * t$95$1), $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}\\
t_2 := \log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right)\\
t_3 := e^{t\_2 \cdot y.re - t\_0}\\
t_4 := t\_3 \cdot \sin \left(t\_2 \cdot y.im + t\_1\right)\\
t_5 := \sin \left(\mathsf{fma}\left(y.im \cdot 0.5, \log \left(\mathsf{fma}\left(x.re, x.re, x.im \cdot x.im\right)\right), t\_1\right)\right) \cdot {\left(\sqrt{\mathsf{fma}\left(x.im, x.im, x.re \cdot x.re\right)}\right)}^{y.re}\\
\mathbf{if}\;t\_4 \leq -2 \cdot 10^{-159}:\\
\;\;\;\;t\_5\\
\mathbf{elif}\;t\_4 \leq 0:\\
\;\;\;\;t\_3 \cdot t\_1\\
\mathbf{elif}\;t\_4 \leq 1:\\
\;\;\;\;t\_5\\
\mathbf{else}:\\
\;\;\;\;e^{y.re \cdot \log \left(\left|x.re\right|\right) - t\_0} \cdot t\_1\\
\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)))) < -1.99999999999999998e-159 or -0.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)))) < 1Initial program 76.3%
*-commutativeN/A
pow1/2N/A
log-powN/A
associate-*r*N/A
accelerator-lowering-fma.f64N/A
*-lowering-*.f64N/A
log-lowering-log.f64N/A
accelerator-lowering-fma.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
atan2-lowering-atan2.f6476.3
Applied egg-rr76.3%
Taylor expanded in y.im around 0
pow-lowering-pow.f64N/A
sqrt-lowering-sqrt.f64N/A
unpow2N/A
accelerator-lowering-fma.f64N/A
unpow2N/A
*-lowering-*.f6471.3
Simplified71.3%
if -1.99999999999999998e-159 < (*.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)))) < -0.0Initial program 100.0%
Taylor expanded in y.im around 0
*-lowering-*.f64N/A
atan2-lowering-atan2.f64100.0
Simplified100.0%
Taylor expanded in y.re around 0
*-lowering-*.f64N/A
atan2-lowering-atan2.f64100.0
Simplified100.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)))) Initial program 10.6%
Taylor expanded in y.im around 0
*-lowering-*.f64N/A
atan2-lowering-atan2.f6444.6
Simplified44.6%
Taylor expanded in y.re around 0
*-lowering-*.f64N/A
atan2-lowering-atan2.f6444.0
Simplified44.0%
Taylor expanded in x.re around inf
unpow2N/A
*-lowering-*.f6443.2
Simplified43.2%
rem-sqrt-squareN/A
fabs-lowering-fabs.f6458.0
Applied egg-rr58.0%
Final simplification66.8%
(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)))
(t_2 (log (sqrt (+ (* x.re x.re) (* x.im x.im)))))
(t_3 (exp (- (* t_2 y.re) t_0))))
(if (<= (* t_3 (sin (+ (* t_2 y.im) t_1))) INFINITY)
(*
t_3
(sin
(/
1.0
(/ 1.0 (fma (* 0.5 (log (fma x.re x.re (* x.im x.im)))) y.im t_1)))))
(* (exp (- (* y.re (log (fabs x.re))) t_0)) 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_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(((t_2 * y_46_re) - t_0));
double tmp;
if ((t_3 * sin(((t_2 * y_46_im) + t_1))) <= ((double) INFINITY)) {
tmp = t_3 * sin((1.0 / (1.0 / fma((0.5 * log(fma(x_46_re, x_46_re, (x_46_im * x_46_im)))), y_46_im, t_1))));
} else {
tmp = exp(((y_46_re * log(fabs(x_46_re))) - t_0)) * 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_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 = exp(Float64(Float64(t_2 * y_46_re) - t_0)) tmp = 0.0 if (Float64(t_3 * sin(Float64(Float64(t_2 * y_46_im) + t_1))) <= Inf) tmp = Float64(t_3 * sin(Float64(1.0 / Float64(1.0 / fma(Float64(0.5 * log(fma(x_46_re, x_46_re, Float64(x_46_im * x_46_im)))), y_46_im, t_1))))); else tmp = Float64(exp(Float64(Float64(y_46_re * log(abs(x_46_re))) - t_0)) * 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$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[Exp[N[(N[(t$95$2 * y$46$re), $MachinePrecision] - t$95$0), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[N[(t$95$3 * N[Sin[N[(N[(t$95$2 * y$46$im), $MachinePrecision] + t$95$1), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], Infinity], N[(t$95$3 * N[Sin[N[(1.0 / N[(1.0 / N[(N[(0.5 * N[Log[N[(x$46$re * x$46$re + N[(x$46$im * x$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * y$46$im + t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(N[Exp[N[(N[(y$46$re * N[Log[N[Abs[x$46$re], $MachinePrecision]], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]], $MachinePrecision] * t$95$1), $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}\\
t_2 := \log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right)\\
t_3 := e^{t\_2 \cdot y.re - t\_0}\\
\mathbf{if}\;t\_3 \cdot \sin \left(t\_2 \cdot y.im + t\_1\right) \leq \infty:\\
\;\;\;\;t\_3 \cdot \sin \left(\frac{1}{\frac{1}{\mathsf{fma}\left(0.5 \cdot \log \left(\mathsf{fma}\left(x.re, x.re, x.im \cdot x.im\right)\right), y.im, t\_1\right)}}\right)\\
\mathbf{else}:\\
\;\;\;\;e^{y.re \cdot \log \left(\left|x.re\right|\right) - t\_0} \cdot t\_1\\
\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)))) < +inf.0Initial program 82.6%
flip3-+N/A
clear-numN/A
/-lowering-/.f64N/A
Applied egg-rr83.4%
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%
Taylor expanded in y.im around 0
*-lowering-*.f64N/A
atan2-lowering-atan2.f6439.7
Simplified39.7%
Taylor expanded in y.re around 0
*-lowering-*.f64N/A
atan2-lowering-atan2.f6441.9
Simplified41.9%
Taylor expanded in x.re around inf
unpow2N/A
*-lowering-*.f6443.7
Simplified43.7%
rem-sqrt-squareN/A
fabs-lowering-fabs.f6458.9
Applied egg-rr58.9%
Final simplification70.3%
(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)))
(t_2 (log (sqrt (+ (* x.re x.re) (* x.im x.im)))))
(t_3 (exp (- (* t_2 y.re) t_0))))
(if (<= (* t_3 (sin (+ (* t_2 y.im) t_1))) INFINITY)
(* t_3 (sin (fma (* y.im 0.5) (log (fma x.re x.re (* x.im x.im))) t_1)))
(* (exp (- (* y.re (log (fabs x.re))) t_0)) 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_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(((t_2 * y_46_re) - t_0));
double tmp;
if ((t_3 * sin(((t_2 * y_46_im) + t_1))) <= ((double) INFINITY)) {
tmp = t_3 * sin(fma((y_46_im * 0.5), log(fma(x_46_re, x_46_re, (x_46_im * x_46_im))), t_1));
} else {
tmp = exp(((y_46_re * log(fabs(x_46_re))) - t_0)) * 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_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 = exp(Float64(Float64(t_2 * y_46_re) - t_0)) tmp = 0.0 if (Float64(t_3 * sin(Float64(Float64(t_2 * y_46_im) + t_1))) <= Inf) tmp = Float64(t_3 * sin(fma(Float64(y_46_im * 0.5), log(fma(x_46_re, x_46_re, Float64(x_46_im * x_46_im))), t_1))); else tmp = Float64(exp(Float64(Float64(y_46_re * log(abs(x_46_re))) - t_0)) * 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$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[Exp[N[(N[(t$95$2 * y$46$re), $MachinePrecision] - t$95$0), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[N[(t$95$3 * N[Sin[N[(N[(t$95$2 * y$46$im), $MachinePrecision] + t$95$1), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], Infinity], N[(t$95$3 * N[Sin[N[(N[(y$46$im * 0.5), $MachinePrecision] * N[Log[N[(x$46$re * x$46$re + N[(x$46$im * x$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] + t$95$1), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(N[Exp[N[(N[(y$46$re * N[Log[N[Abs[x$46$re], $MachinePrecision]], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]], $MachinePrecision] * t$95$1), $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}\\
t_2 := \log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right)\\
t_3 := e^{t\_2 \cdot y.re - t\_0}\\
\mathbf{if}\;t\_3 \cdot \sin \left(t\_2 \cdot y.im + t\_1\right) \leq \infty:\\
\;\;\;\;t\_3 \cdot \sin \left(\mathsf{fma}\left(y.im \cdot 0.5, \log \left(\mathsf{fma}\left(x.re, x.re, x.im \cdot x.im\right)\right), t\_1\right)\right)\\
\mathbf{else}:\\
\;\;\;\;e^{y.re \cdot \log \left(\left|x.re\right|\right) - t\_0} \cdot t\_1\\
\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)))) < +inf.0Initial program 82.6%
*-commutativeN/A
pow1/2N/A
log-powN/A
associate-*r*N/A
accelerator-lowering-fma.f64N/A
*-lowering-*.f64N/A
log-lowering-log.f64N/A
accelerator-lowering-fma.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
atan2-lowering-atan2.f6482.6
Applied egg-rr82.6%
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%
Taylor expanded in y.im around 0
*-lowering-*.f64N/A
atan2-lowering-atan2.f6439.7
Simplified39.7%
Taylor expanded in y.re around 0
*-lowering-*.f64N/A
atan2-lowering-atan2.f6441.9
Simplified41.9%
Taylor expanded in x.re around inf
unpow2N/A
*-lowering-*.f6443.7
Simplified43.7%
rem-sqrt-squareN/A
fabs-lowering-fabs.f6458.9
Applied egg-rr58.9%
Final simplification69.9%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (* y.re (atan2 x.im x.re))) (t_1 (* (atan2 x.im x.re) y.im)))
(if (<= x.re -0.01)
(* (exp (- (* y.re (log (fabs x.re))) t_1)) t_0)
(if (<= x.re 3.2e-308)
(* t_0 (/ (pow (fma x.re x.re (* x.im x.im)) (* y.re 0.5)) (exp t_1)))
(*
(exp (- (* y.re (log x.re)) t_1))
(sin (fma y.re (atan2 x.im x.re) (* 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 = y_46_re * atan2(x_46_im, x_46_re);
double t_1 = atan2(x_46_im, x_46_re) * y_46_im;
double tmp;
if (x_46_re <= -0.01) {
tmp = exp(((y_46_re * log(fabs(x_46_re))) - t_1)) * t_0;
} else if (x_46_re <= 3.2e-308) {
tmp = t_0 * (pow(fma(x_46_re, x_46_re, (x_46_im * x_46_im)), (y_46_re * 0.5)) / exp(t_1));
} else {
tmp = exp(((y_46_re * log(x_46_re)) - t_1)) * sin(fma(y_46_re, atan2(x_46_im, x_46_re), (y_46_im * log(x_46_re))));
}
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 = Float64(atan(x_46_im, x_46_re) * y_46_im) tmp = 0.0 if (x_46_re <= -0.01) tmp = Float64(exp(Float64(Float64(y_46_re * log(abs(x_46_re))) - t_1)) * t_0); elseif (x_46_re <= 3.2e-308) tmp = Float64(t_0 * Float64((fma(x_46_re, x_46_re, Float64(x_46_im * x_46_im)) ^ Float64(y_46_re * 0.5)) / exp(t_1))); else tmp = Float64(exp(Float64(Float64(y_46_re * log(x_46_re)) - t_1)) * sin(fma(y_46_re, atan(x_46_im, x_46_re), Float64(y_46_im * log(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[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$im), $MachinePrecision]}, If[LessEqual[x$46$re, -0.01], N[(N[Exp[N[(N[(y$46$re * N[Log[N[Abs[x$46$re], $MachinePrecision]], $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision]], $MachinePrecision] * t$95$0), $MachinePrecision], If[LessEqual[x$46$re, 3.2e-308], N[(t$95$0 * N[(N[Power[N[(x$46$re * x$46$re + N[(x$46$im * x$46$im), $MachinePrecision]), $MachinePrecision], N[(y$46$re * 0.5), $MachinePrecision]], $MachinePrecision] / N[Exp[t$95$1], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[Exp[N[(N[(y$46$re * N[Log[x$46$re], $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision]], $MachinePrecision] * N[Sin[N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision] + N[(y$46$im * N[Log[x$46$re], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
t_1 := \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im\\
\mathbf{if}\;x.re \leq -0.01:\\
\;\;\;\;e^{y.re \cdot \log \left(\left|x.re\right|\right) - t\_1} \cdot t\_0\\
\mathbf{elif}\;x.re \leq 3.2 \cdot 10^{-308}:\\
\;\;\;\;t\_0 \cdot \frac{{\left(\mathsf{fma}\left(x.re, x.re, x.im \cdot x.im\right)\right)}^{\left(y.re \cdot 0.5\right)}}{e^{t\_1}}\\
\mathbf{else}:\\
\;\;\;\;e^{y.re \cdot \log x.re - t\_1} \cdot \sin \left(\mathsf{fma}\left(y.re, \tan^{-1}_* \frac{x.im}{x.re}, y.im \cdot \log x.re\right)\right)\\
\end{array}
\end{array}
if x.re < -0.0100000000000000002Initial program 21.8%
Taylor expanded in y.im around 0
*-lowering-*.f64N/A
atan2-lowering-atan2.f6447.0
Simplified47.0%
Taylor expanded in y.re around 0
*-lowering-*.f64N/A
atan2-lowering-atan2.f6447.0
Simplified47.0%
Taylor expanded in x.re around inf
unpow2N/A
*-lowering-*.f6454.0
Simplified54.0%
rem-sqrt-squareN/A
fabs-lowering-fabs.f6470.9
Applied egg-rr70.9%
if -0.0100000000000000002 < x.re < 3.2000000000000001e-308Initial program 54.0%
Taylor expanded in y.im around 0
*-lowering-*.f64N/A
atan2-lowering-atan2.f6456.2
Simplified56.2%
Taylor expanded in y.re around 0
*-lowering-*.f64N/A
atan2-lowering-atan2.f6458.9
Simplified58.9%
exp-diffN/A
+-commutativeN/A
pow-to-expN/A
frac-2negN/A
/-lowering-/.f64N/A
Applied egg-rr60.2%
if 3.2000000000000001e-308 < x.re Initial program 37.6%
*-commutativeN/A
pow1/2N/A
log-powN/A
associate-*r*N/A
accelerator-lowering-fma.f64N/A
*-lowering-*.f64N/A
log-lowering-log.f64N/A
accelerator-lowering-fma.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
atan2-lowering-atan2.f6437.6
Applied egg-rr37.6%
Taylor expanded in x.re around inf
*-lowering-*.f64N/A
Simplified67.3%
Final simplification64.6%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (sin (* y.re (atan2 x.im x.re))))
(t_1 (* t_0 (pow (sqrt (fma x.im x.im (* x.re x.re))) y.re))))
(if (<= y.re -210000.0)
t_1
(if (<= y.re 46000000000000.0)
(* (exp (* y.im (- 0.0 (atan2 x.im x.re)))) t_0)
t_1))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = sin((y_46_re * atan2(x_46_im, x_46_re)));
double t_1 = t_0 * pow(sqrt(fma(x_46_im, x_46_im, (x_46_re * x_46_re))), y_46_re);
double tmp;
if (y_46_re <= -210000.0) {
tmp = t_1;
} else if (y_46_re <= 46000000000000.0) {
tmp = exp((y_46_im * (0.0 - atan2(x_46_im, x_46_re)))) * t_0;
} else {
tmp = t_1;
}
return tmp;
}
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = sin(Float64(y_46_re * atan(x_46_im, x_46_re))) t_1 = Float64(t_0 * (sqrt(fma(x_46_im, x_46_im, Float64(x_46_re * x_46_re))) ^ y_46_re)) tmp = 0.0 if (y_46_re <= -210000.0) tmp = t_1; elseif (y_46_re <= 46000000000000.0) tmp = Float64(exp(Float64(y_46_im * Float64(0.0 - atan(x_46_im, x_46_re)))) * t_0); else tmp = t_1; end return tmp end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[Sin[N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$1 = N[(t$95$0 * N[Power[N[Sqrt[N[(x$46$im * x$46$im + N[(x$46$re * x$46$re), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], y$46$re], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y$46$re, -210000.0], t$95$1, If[LessEqual[y$46$re, 46000000000000.0], N[(N[Exp[N[(y$46$im * N[(0.0 - N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * t$95$0), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\\
t_1 := t\_0 \cdot {\left(\sqrt{\mathsf{fma}\left(x.im, x.im, x.re \cdot x.re\right)}\right)}^{y.re}\\
\mathbf{if}\;y.re \leq -210000:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y.re \leq 46000000000000:\\
\;\;\;\;e^{y.im \cdot \left(0 - \tan^{-1}_* \frac{x.im}{x.re}\right)} \cdot t\_0\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if y.re < -2.1e5 or 4.6e13 < y.re Initial program 33.9%
Taylor expanded in y.im around 0
*-lowering-*.f64N/A
atan2-lowering-atan2.f6471.5
Simplified71.5%
Taylor expanded in y.im around 0
pow-lowering-pow.f64N/A
sqrt-lowering-sqrt.f64N/A
unpow2N/A
accelerator-lowering-fma.f64N/A
unpow2N/A
*-lowering-*.f6470.6
Simplified70.6%
if -2.1e5 < y.re < 4.6e13Initial program 41.9%
Taylor expanded in y.im around 0
*-lowering-*.f64N/A
atan2-lowering-atan2.f6435.2
Simplified35.2%
Taylor expanded in y.re around 0
exp-lowering-exp.f64N/A
neg-sub0N/A
--lowering--.f64N/A
*-lowering-*.f64N/A
atan2-lowering-atan2.f6454.0
Simplified54.0%
Final simplification61.3%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0
(*
(sin (* y.re (atan2 x.im x.re)))
(pow (sqrt (fma x.im x.im (* x.re x.re))) y.re))))
(if (<= y.re -6.1e-15)
t_0
(if (<= y.re 46000000000000.0)
(* y.re (* (atan2 x.im x.re) (exp (* y.im (- 0.0 (atan2 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 = sin((y_46_re * atan2(x_46_im, x_46_re))) * pow(sqrt(fma(x_46_im, x_46_im, (x_46_re * x_46_re))), y_46_re);
double tmp;
if (y_46_re <= -6.1e-15) {
tmp = t_0;
} else if (y_46_re <= 46000000000000.0) {
tmp = y_46_re * (atan2(x_46_im, x_46_re) * exp((y_46_im * (0.0 - atan2(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(sin(Float64(y_46_re * atan(x_46_im, x_46_re))) * (sqrt(fma(x_46_im, x_46_im, Float64(x_46_re * x_46_re))) ^ y_46_re)) tmp = 0.0 if (y_46_re <= -6.1e-15) tmp = t_0; elseif (y_46_re <= 46000000000000.0) tmp = Float64(y_46_re * Float64(atan(x_46_im, x_46_re) * exp(Float64(y_46_im * Float64(0.0 - atan(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[(N[Sin[N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Power[N[Sqrt[N[(x$46$im * x$46$im + N[(x$46$re * x$46$re), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], y$46$re], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y$46$re, -6.1e-15], t$95$0, If[LessEqual[y$46$re, 46000000000000.0], N[(y$46$re * N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * N[Exp[N[(y$46$im * N[(0.0 - N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$0]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {\left(\sqrt{\mathsf{fma}\left(x.im, x.im, x.re \cdot x.re\right)}\right)}^{y.re}\\
\mathbf{if}\;y.re \leq -6.1 \cdot 10^{-15}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;y.re \leq 46000000000000:\\
\;\;\;\;y.re \cdot \left(\tan^{-1}_* \frac{x.im}{x.re} \cdot e^{y.im \cdot \left(0 - \tan^{-1}_* \frac{x.im}{x.re}\right)}\right)\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
if y.re < -6.09999999999999972e-15 or 4.6e13 < y.re Initial program 34.2%
Taylor expanded in y.im around 0
*-lowering-*.f64N/A
atan2-lowering-atan2.f6471.9
Simplified71.9%
Taylor expanded in y.im around 0
pow-lowering-pow.f64N/A
sqrt-lowering-sqrt.f64N/A
unpow2N/A
accelerator-lowering-fma.f64N/A
unpow2N/A
*-lowering-*.f6470.2
Simplified70.2%
if -6.09999999999999972e-15 < y.re < 4.6e13Initial program 41.9%
Taylor expanded in y.im around 0
*-lowering-*.f64N/A
atan2-lowering-atan2.f6433.6
Simplified33.6%
Taylor expanded in y.re around 0
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
atan2-lowering-atan2.f64N/A
exp-lowering-exp.f64N/A
neg-sub0N/A
--lowering--.f64N/A
*-lowering-*.f64N/A
atan2-lowering-atan2.f6453.2
Simplified53.2%
Final simplification61.0%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0
(*
(* y.re (atan2 x.im x.re))
(pow (sqrt (fma x.im x.im (* x.re x.re))) y.re))))
(if (<= y.re -6.1e-15)
t_0
(if (<= y.re 4.8e+23)
(* y.re (* (atan2 x.im x.re) (exp (* y.im (- 0.0 (atan2 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)) * pow(sqrt(fma(x_46_im, x_46_im, (x_46_re * x_46_re))), y_46_re);
double tmp;
if (y_46_re <= -6.1e-15) {
tmp = t_0;
} else if (y_46_re <= 4.8e+23) {
tmp = y_46_re * (atan2(x_46_im, x_46_re) * exp((y_46_im * (0.0 - atan2(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(Float64(y_46_re * atan(x_46_im, x_46_re)) * (sqrt(fma(x_46_im, x_46_im, Float64(x_46_re * x_46_re))) ^ y_46_re)) tmp = 0.0 if (y_46_re <= -6.1e-15) tmp = t_0; elseif (y_46_re <= 4.8e+23) tmp = Float64(y_46_re * Float64(atan(x_46_im, x_46_re) * exp(Float64(y_46_im * Float64(0.0 - atan(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[(N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision] * N[Power[N[Sqrt[N[(x$46$im * x$46$im + N[(x$46$re * x$46$re), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], y$46$re], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y$46$re, -6.1e-15], t$95$0, If[LessEqual[y$46$re, 4.8e+23], N[(y$46$re * N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * N[Exp[N[(y$46$im * N[(0.0 - N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$0]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {\left(\sqrt{\mathsf{fma}\left(x.im, x.im, x.re \cdot x.re\right)}\right)}^{y.re}\\
\mathbf{if}\;y.re \leq -6.1 \cdot 10^{-15}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;y.re \leq 4.8 \cdot 10^{+23}:\\
\;\;\;\;y.re \cdot \left(\tan^{-1}_* \frac{x.im}{x.re} \cdot e^{y.im \cdot \left(0 - \tan^{-1}_* \frac{x.im}{x.re}\right)}\right)\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
if y.re < -6.09999999999999972e-15 or 4.8e23 < y.re Initial program 33.6%
Taylor expanded in y.im around 0
*-lowering-*.f64N/A
atan2-lowering-atan2.f6471.6
Simplified71.6%
Taylor expanded in y.re around 0
*-lowering-*.f64N/A
atan2-lowering-atan2.f6468.2
Simplified68.2%
Taylor expanded in y.im around 0
pow-lowering-pow.f64N/A
sqrt-lowering-sqrt.f64N/A
unpow2N/A
accelerator-lowering-fma.f64N/A
unpow2N/A
*-lowering-*.f6467.4
Simplified67.4%
if -6.09999999999999972e-15 < y.re < 4.8e23Initial program 42.3%
Taylor expanded in y.im around 0
*-lowering-*.f64N/A
atan2-lowering-atan2.f6434.1
Simplified34.1%
Taylor expanded in y.re around 0
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
atan2-lowering-atan2.f64N/A
exp-lowering-exp.f64N/A
neg-sub0N/A
--lowering--.f64N/A
*-lowering-*.f64N/A
atan2-lowering-atan2.f6452.8
Simplified52.8%
Final simplification59.4%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (* y.re (atan2 x.im x.re))))
(if (<= x.re 3.2e-92)
(* t_0 (pow (sqrt (fma x.im x.im (* x.re x.re))) y.re))
(* (sin t_0) (pow 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 = y_46_re * atan2(x_46_im, x_46_re);
double tmp;
if (x_46_re <= 3.2e-92) {
tmp = t_0 * pow(sqrt(fma(x_46_im, x_46_im, (x_46_re * x_46_re))), y_46_re);
} else {
tmp = sin(t_0) * pow(x_46_re, y_46_re);
}
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)) tmp = 0.0 if (x_46_re <= 3.2e-92) tmp = Float64(t_0 * (sqrt(fma(x_46_im, x_46_im, Float64(x_46_re * x_46_re))) ^ y_46_re)); else tmp = Float64(sin(t_0) * (x_46_re ^ 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[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x$46$re, 3.2e-92], N[(t$95$0 * N[Power[N[Sqrt[N[(x$46$im * x$46$im + N[(x$46$re * x$46$re), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], y$46$re], $MachinePrecision]), $MachinePrecision], N[(N[Sin[t$95$0], $MachinePrecision] * N[Power[x$46$re, y$46$re], $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
\mathbf{if}\;x.re \leq 3.2 \cdot 10^{-92}:\\
\;\;\;\;t\_0 \cdot {\left(\sqrt{\mathsf{fma}\left(x.im, x.im, x.re \cdot x.re\right)}\right)}^{y.re}\\
\mathbf{else}:\\
\;\;\;\;\sin t\_0 \cdot {x.re}^{y.re}\\
\end{array}
\end{array}
if x.re < 3.1999999999999997e-92Initial program 40.7%
Taylor expanded in y.im around 0
*-lowering-*.f64N/A
atan2-lowering-atan2.f6452.5
Simplified52.5%
Taylor expanded in y.re around 0
*-lowering-*.f64N/A
atan2-lowering-atan2.f6453.0
Simplified53.0%
Taylor expanded in y.im around 0
pow-lowering-pow.f64N/A
sqrt-lowering-sqrt.f64N/A
unpow2N/A
accelerator-lowering-fma.f64N/A
unpow2N/A
*-lowering-*.f6442.8
Simplified42.8%
if 3.1999999999999997e-92 < x.re Initial program 33.0%
Taylor expanded in y.im around 0
*-lowering-*.f64N/A
atan2-lowering-atan2.f6447.9
Simplified47.9%
Taylor expanded in x.re around inf
unpow2N/A
*-lowering-*.f6449.1
Simplified49.1%
Taylor expanded in y.im around 0
pow-lowering-pow.f6441.9
Simplified41.9%
Final simplification42.6%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (* y.re (atan2 x.im x.re))) (t_1 (* t_0 (pow x.re y.re))))
(if (<= y.re -210000.0)
t_1
(if (<= y.re -1.2e-165)
(sin (/ -1.0 (/ -1.0 t_0)))
(if (<= y.re 9.2e-115)
(sin (* (* y.im 0.5) (log (fma x.im x.im (* x.re x.re)))))
(if (<= y.re 2.15e+30) (sin t_0) t_1))))))
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 = t_0 * pow(x_46_re, y_46_re);
double tmp;
if (y_46_re <= -210000.0) {
tmp = t_1;
} else if (y_46_re <= -1.2e-165) {
tmp = sin((-1.0 / (-1.0 / t_0)));
} else if (y_46_re <= 9.2e-115) {
tmp = sin(((y_46_im * 0.5) * log(fma(x_46_im, x_46_im, (x_46_re * x_46_re)))));
} else if (y_46_re <= 2.15e+30) {
tmp = sin(t_0);
} else {
tmp = t_1;
}
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 = Float64(t_0 * (x_46_re ^ y_46_re)) tmp = 0.0 if (y_46_re <= -210000.0) tmp = t_1; elseif (y_46_re <= -1.2e-165) tmp = sin(Float64(-1.0 / Float64(-1.0 / t_0))); elseif (y_46_re <= 9.2e-115) tmp = sin(Float64(Float64(y_46_im * 0.5) * log(fma(x_46_im, x_46_im, Float64(x_46_re * x_46_re))))); elseif (y_46_re <= 2.15e+30) tmp = sin(t_0); else tmp = t_1; 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[(t$95$0 * N[Power[x$46$re, y$46$re], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y$46$re, -210000.0], t$95$1, If[LessEqual[y$46$re, -1.2e-165], N[Sin[N[(-1.0 / N[(-1.0 / t$95$0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[LessEqual[y$46$re, 9.2e-115], N[Sin[N[(N[(y$46$im * 0.5), $MachinePrecision] * N[Log[N[(x$46$im * x$46$im + N[(x$46$re * x$46$re), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[LessEqual[y$46$re, 2.15e+30], N[Sin[t$95$0], $MachinePrecision], t$95$1]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
t_1 := t\_0 \cdot {x.re}^{y.re}\\
\mathbf{if}\;y.re \leq -210000:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y.re \leq -1.2 \cdot 10^{-165}:\\
\;\;\;\;\sin \left(\frac{-1}{\frac{-1}{t\_0}}\right)\\
\mathbf{elif}\;y.re \leq 9.2 \cdot 10^{-115}:\\
\;\;\;\;\sin \left(\left(y.im \cdot 0.5\right) \cdot \log \left(\mathsf{fma}\left(x.im, x.im, x.re \cdot x.re\right)\right)\right)\\
\mathbf{elif}\;y.re \leq 2.15 \cdot 10^{+30}:\\
\;\;\;\;\sin t\_0\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if y.re < -2.1e5 or 2.15e30 < y.re Initial program 32.7%
Taylor expanded in y.im around 0
*-lowering-*.f64N/A
atan2-lowering-atan2.f6471.0
Simplified71.0%
Taylor expanded in y.re around 0
*-lowering-*.f64N/A
atan2-lowering-atan2.f6468.3
Simplified68.3%
Taylor expanded in x.re around inf
unpow2N/A
*-lowering-*.f6458.5
Simplified58.5%
Taylor expanded in y.im around 0
pow-lowering-pow.f6455.8
Simplified55.8%
if -2.1e5 < y.re < -1.2000000000000001e-165Initial program 40.7%
flip3-+N/A
clear-numN/A
/-lowering-/.f64N/A
Applied egg-rr40.7%
Taylor expanded in y.im around 0
pow-lowering-pow.f64N/A
sqrt-lowering-sqrt.f64N/A
unpow2N/A
accelerator-lowering-fma.f64N/A
unpow2N/A
*-lowering-*.f6427.6
Simplified27.6%
Taylor expanded in y.re around 0
Simplified24.9%
Taylor expanded in y.im around 0
/-lowering-/.f64N/A
*-lowering-*.f64N/A
atan2-lowering-atan2.f6437.8
Simplified37.8%
if -1.2000000000000001e-165 < y.re < 9.19999999999999938e-115Initial program 46.3%
flip3-+N/A
clear-numN/A
/-lowering-/.f64N/A
Applied egg-rr44.8%
Taylor expanded in y.im around 0
pow-lowering-pow.f64N/A
sqrt-lowering-sqrt.f64N/A
unpow2N/A
accelerator-lowering-fma.f64N/A
unpow2N/A
*-lowering-*.f6432.5
Simplified32.5%
Taylor expanded in y.re around 0
sin-lowering-sin.f64N/A
associate-*r*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
log-lowering-log.f64N/A
unpow2N/A
accelerator-lowering-fma.f64N/A
unpow2N/A
*-lowering-*.f6425.7
Simplified25.7%
if 9.19999999999999938e-115 < y.re < 2.15e30Initial program 38.5%
Taylor expanded in y.re around 0
mul-1-negN/A
neg-sub0N/A
--lowering--.f64N/A
*-lowering-*.f64N/A
atan2-lowering-atan2.f6432.6
Simplified32.6%
Taylor expanded in y.im around 0
sin-lowering-sin.f64N/A
*-lowering-*.f64N/A
atan2-lowering-atan2.f6422.8
Simplified22.8%
Final simplification40.3%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (* y.re (atan2 x.im x.re)))
(t_1 (sin t_0))
(t_2 (* t_0 (pow x.re y.re))))
(if (<= y.re -210000.0)
t_2
(if (<= y.re -1.75e-158)
t_1
(if (<= y.re 9.2e-115)
(sin (* (* y.im 0.5) (log (fma x.im x.im (* x.re x.re)))))
(if (<= y.re 2.15e+30) t_1 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 = sin(t_0);
double t_2 = t_0 * pow(x_46_re, y_46_re);
double tmp;
if (y_46_re <= -210000.0) {
tmp = t_2;
} else if (y_46_re <= -1.75e-158) {
tmp = t_1;
} else if (y_46_re <= 9.2e-115) {
tmp = sin(((y_46_im * 0.5) * log(fma(x_46_im, x_46_im, (x_46_re * x_46_re)))));
} else if (y_46_re <= 2.15e+30) {
tmp = t_1;
} else {
tmp = 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 = sin(t_0) t_2 = Float64(t_0 * (x_46_re ^ y_46_re)) tmp = 0.0 if (y_46_re <= -210000.0) tmp = t_2; elseif (y_46_re <= -1.75e-158) tmp = t_1; elseif (y_46_re <= 9.2e-115) tmp = sin(Float64(Float64(y_46_im * 0.5) * log(fma(x_46_im, x_46_im, Float64(x_46_re * x_46_re))))); elseif (y_46_re <= 2.15e+30) tmp = t_1; else tmp = 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[Sin[t$95$0], $MachinePrecision]}, Block[{t$95$2 = N[(t$95$0 * N[Power[x$46$re, y$46$re], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y$46$re, -210000.0], t$95$2, If[LessEqual[y$46$re, -1.75e-158], t$95$1, If[LessEqual[y$46$re, 9.2e-115], N[Sin[N[(N[(y$46$im * 0.5), $MachinePrecision] * N[Log[N[(x$46$im * x$46$im + N[(x$46$re * x$46$re), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[LessEqual[y$46$re, 2.15e+30], t$95$1, t$95$2]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
t_1 := \sin t\_0\\
t_2 := t\_0 \cdot {x.re}^{y.re}\\
\mathbf{if}\;y.re \leq -210000:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;y.re \leq -1.75 \cdot 10^{-158}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y.re \leq 9.2 \cdot 10^{-115}:\\
\;\;\;\;\sin \left(\left(y.im \cdot 0.5\right) \cdot \log \left(\mathsf{fma}\left(x.im, x.im, x.re \cdot x.re\right)\right)\right)\\
\mathbf{elif}\;y.re \leq 2.15 \cdot 10^{+30}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if y.re < -2.1e5 or 2.15e30 < y.re Initial program 32.7%
Taylor expanded in y.im around 0
*-lowering-*.f64N/A
atan2-lowering-atan2.f6471.0
Simplified71.0%
Taylor expanded in y.re around 0
*-lowering-*.f64N/A
atan2-lowering-atan2.f6468.3
Simplified68.3%
Taylor expanded in x.re around inf
unpow2N/A
*-lowering-*.f6458.5
Simplified58.5%
Taylor expanded in y.im around 0
pow-lowering-pow.f6455.8
Simplified55.8%
if -2.1e5 < y.re < -1.75000000000000006e-158 or 9.19999999999999938e-115 < y.re < 2.15e30Initial program 39.7%
Taylor expanded in y.re around 0
mul-1-negN/A
neg-sub0N/A
--lowering--.f64N/A
*-lowering-*.f64N/A
atan2-lowering-atan2.f6436.8
Simplified36.8%
Taylor expanded in y.im around 0
sin-lowering-sin.f64N/A
*-lowering-*.f64N/A
atan2-lowering-atan2.f6430.9
Simplified30.9%
if -1.75000000000000006e-158 < y.re < 9.19999999999999938e-115Initial program 46.3%
flip3-+N/A
clear-numN/A
/-lowering-/.f64N/A
Applied egg-rr44.8%
Taylor expanded in y.im around 0
pow-lowering-pow.f64N/A
sqrt-lowering-sqrt.f64N/A
unpow2N/A
accelerator-lowering-fma.f64N/A
unpow2N/A
*-lowering-*.f6432.5
Simplified32.5%
Taylor expanded in y.re around 0
sin-lowering-sin.f64N/A
associate-*r*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
log-lowering-log.f64N/A
unpow2N/A
accelerator-lowering-fma.f64N/A
unpow2N/A
*-lowering-*.f6425.7
Simplified25.7%
Final simplification40.3%
(FPCore (x.re x.im y.re y.im) :precision binary64 (* (* y.re (atan2 x.im x.re)) (pow (sqrt (fma x.im x.im (* x.re x.re))) y.re)))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
return (y_46_re * atan2(x_46_im, x_46_re)) * pow(sqrt(fma(x_46_im, x_46_im, (x_46_re * x_46_re))), y_46_re);
}
function code(x_46_re, x_46_im, y_46_re, y_46_im) return Float64(Float64(y_46_re * atan(x_46_im, x_46_re)) * (sqrt(fma(x_46_im, x_46_im, Float64(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[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision] * N[Power[N[Sqrt[N[(x$46$im * x$46$im + N[(x$46$re * x$46$re), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], y$46$re], $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {\left(\sqrt{\mathsf{fma}\left(x.im, x.im, x.re \cdot x.re\right)}\right)}^{y.re}
\end{array}
Initial program 38.4%
Taylor expanded in y.im around 0
*-lowering-*.f64N/A
atan2-lowering-atan2.f6451.1
Simplified51.1%
Taylor expanded in y.re around 0
*-lowering-*.f64N/A
atan2-lowering-atan2.f6449.5
Simplified49.5%
Taylor expanded in y.im around 0
pow-lowering-pow.f64N/A
sqrt-lowering-sqrt.f64N/A
unpow2N/A
accelerator-lowering-fma.f64N/A
unpow2N/A
*-lowering-*.f6440.9
Simplified40.9%
Final simplification40.9%
(FPCore (x.re x.im y.re y.im) :precision binary64 (let* ((t_0 (* y.re (atan2 x.im x.re))) (t_1 (* t_0 (pow x.re y.re)))) (if (<= y.re -210000.0) t_1 (if (<= y.re 2.15e+30) (sin t_0) t_1))))
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 = t_0 * pow(x_46_re, y_46_re);
double tmp;
if (y_46_re <= -210000.0) {
tmp = t_1;
} else if (y_46_re <= 2.15e+30) {
tmp = sin(t_0);
} else {
tmp = t_1;
}
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 = y_46re * atan2(x_46im, x_46re)
t_1 = t_0 * (x_46re ** y_46re)
if (y_46re <= (-210000.0d0)) then
tmp = t_1
else if (y_46re <= 2.15d+30) then
tmp = sin(t_0)
else
tmp = t_1
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 = y_46_re * Math.atan2(x_46_im, x_46_re);
double t_1 = t_0 * Math.pow(x_46_re, y_46_re);
double tmp;
if (y_46_re <= -210000.0) {
tmp = t_1;
} else if (y_46_re <= 2.15e+30) {
tmp = Math.sin(t_0);
} else {
tmp = t_1;
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): t_0 = y_46_re * math.atan2(x_46_im, x_46_re) t_1 = t_0 * math.pow(x_46_re, y_46_re) tmp = 0 if y_46_re <= -210000.0: tmp = t_1 elif y_46_re <= 2.15e+30: tmp = math.sin(t_0) else: tmp = t_1 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 = Float64(t_0 * (x_46_re ^ y_46_re)) tmp = 0.0 if (y_46_re <= -210000.0) tmp = t_1; elseif (y_46_re <= 2.15e+30) tmp = sin(t_0); else tmp = t_1; end return tmp end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = y_46_re * atan2(x_46_im, x_46_re); t_1 = t_0 * (x_46_re ^ y_46_re); tmp = 0.0; if (y_46_re <= -210000.0) tmp = t_1; elseif (y_46_re <= 2.15e+30) tmp = sin(t_0); else tmp = t_1; end tmp_2 = 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[(t$95$0 * N[Power[x$46$re, y$46$re], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y$46$re, -210000.0], t$95$1, If[LessEqual[y$46$re, 2.15e+30], N[Sin[t$95$0], $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
t_1 := t\_0 \cdot {x.re}^{y.re}\\
\mathbf{if}\;y.re \leq -210000:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y.re \leq 2.15 \cdot 10^{+30}:\\
\;\;\;\;\sin t\_0\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if y.re < -2.1e5 or 2.15e30 < y.re Initial program 32.7%
Taylor expanded in y.im around 0
*-lowering-*.f64N/A
atan2-lowering-atan2.f6471.0
Simplified71.0%
Taylor expanded in y.re around 0
*-lowering-*.f64N/A
atan2-lowering-atan2.f6468.3
Simplified68.3%
Taylor expanded in x.re around inf
unpow2N/A
*-lowering-*.f6458.5
Simplified58.5%
Taylor expanded in y.im around 0
pow-lowering-pow.f6455.8
Simplified55.8%
if -2.1e5 < y.re < 2.15e30Initial program 42.7%
Taylor expanded in y.re around 0
mul-1-negN/A
neg-sub0N/A
--lowering--.f64N/A
*-lowering-*.f64N/A
atan2-lowering-atan2.f6441.0
Simplified41.0%
Taylor expanded in y.im around 0
sin-lowering-sin.f64N/A
*-lowering-*.f64N/A
atan2-lowering-atan2.f6422.4
Simplified22.4%
Final simplification36.8%
(FPCore (x.re x.im y.re y.im) :precision binary64 (sin (* y.re (atan2 x.im x.re))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
return sin((y_46_re * atan2(x_46_im, x_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)))
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)));
}
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)))
function code(x_46_re, x_46_im, y_46_re, y_46_im) return sin(Float64(y_46_re * atan(x_46_im, x_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))); end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := N[Sin[N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]
\begin{array}{l}
\\
\sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)
\end{array}
Initial program 38.4%
Taylor expanded in y.re around 0
mul-1-negN/A
neg-sub0N/A
--lowering--.f64N/A
*-lowering-*.f64N/A
atan2-lowering-atan2.f6427.2
Simplified27.2%
Taylor expanded in y.im around 0
sin-lowering-sin.f64N/A
*-lowering-*.f64N/A
atan2-lowering-atan2.f6415.7
Simplified15.7%
(FPCore (x.re x.im y.re y.im) :precision binary64 (* y.re (atan2 x.im x.re)))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
return y_46_re * atan2(x_46_im, x_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 = y_46re * atan2(x_46im, x_46re)
end function
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
return y_46_re * Math.atan2(x_46_im, x_46_re);
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): return y_46_re * math.atan2(x_46_im, x_46_re)
function code(x_46_re, x_46_im, y_46_re, y_46_im) return Float64(y_46_re * atan(x_46_im, x_46_re)) end
function tmp = code(x_46_re, x_46_im, y_46_re, y_46_im) tmp = y_46_re * atan2(x_46_im, x_46_re); end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}
\end{array}
Initial program 38.4%
Taylor expanded in y.re around 0
mul-1-negN/A
neg-sub0N/A
--lowering--.f64N/A
*-lowering-*.f64N/A
atan2-lowering-atan2.f6427.2
Simplified27.2%
Taylor expanded in y.im around 0
sin-lowering-sin.f64N/A
*-lowering-*.f64N/A
atan2-lowering-atan2.f6415.7
Simplified15.7%
Taylor expanded in y.re around 0
*-lowering-*.f64N/A
atan2-lowering-atan2.f6415.7
Simplified15.7%
herbie shell --seed 2024194
(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)))))