
(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 12 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (log (sqrt (+ (* x.re x.re) (* x.im x.im))))))
(*
(exp (- (* t_0 y.re) (* (atan2 x.im x.re) y.im)))
(sin (+ (* t_0 y.im) (* (atan2 x.im x.re) y.re))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))));
return exp(((t_0 * y_46_re) - (atan2(x_46_im, x_46_re) * y_46_im))) * sin(((t_0 * y_46_im) + (atan2(x_46_im, x_46_re) * y_46_re)));
}
real(8) function code(x_46re, x_46im, y_46re, y_46im)
real(8), intent (in) :: x_46re
real(8), intent (in) :: x_46im
real(8), intent (in) :: y_46re
real(8), intent (in) :: y_46im
real(8) :: t_0
t_0 = log(sqrt(((x_46re * x_46re) + (x_46im * x_46im))))
code = exp(((t_0 * y_46re) - (atan2(x_46im, x_46re) * y_46im))) * sin(((t_0 * y_46im) + (atan2(x_46im, x_46re) * y_46re)))
end function
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = Math.log(Math.sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))));
return Math.exp(((t_0 * y_46_re) - (Math.atan2(x_46_im, x_46_re) * y_46_im))) * Math.sin(((t_0 * y_46_im) + (Math.atan2(x_46_im, x_46_re) * y_46_re)));
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): t_0 = math.log(math.sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im)))) return math.exp(((t_0 * y_46_re) - (math.atan2(x_46_im, x_46_re) * y_46_im))) * math.sin(((t_0 * y_46_im) + (math.atan2(x_46_im, x_46_re) * y_46_re)))
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = log(sqrt(Float64(Float64(x_46_re * x_46_re) + Float64(x_46_im * x_46_im)))) return Float64(exp(Float64(Float64(t_0 * y_46_re) - Float64(atan(x_46_im, x_46_re) * y_46_im))) * sin(Float64(Float64(t_0 * y_46_im) + Float64(atan(x_46_im, x_46_re) * y_46_re)))) end
function tmp = code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im)))); tmp = exp(((t_0 * y_46_re) - (atan2(x_46_im, x_46_re) * y_46_im))) * sin(((t_0 * y_46_im) + (atan2(x_46_im, x_46_re) * y_46_re))); end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[Log[N[Sqrt[N[(N[(x$46$re * x$46$re), $MachinePrecision] + N[(x$46$im * x$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]}, N[(N[Exp[N[(N[(t$95$0 * y$46$re), $MachinePrecision] - N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Sin[N[(N[(t$95$0 * y$46$im), $MachinePrecision] + N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$re), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right)\\
e^{t\_0 \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \sin \left(t\_0 \cdot y.im + \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)
\end{array}
\end{array}
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (* y.im (atan2 x.im x.re)))
(t_1 (log (- x.re)))
(t_2 (* y.re (atan2 x.im x.re)))
(t_3 (fma x.im x.im (* x.re x.re))))
(if (<= x.re -1.25e-147)
(* (sin (fma t_1 y.im t_2)) (exp (- (fma y.re (- t_1) t_0))))
(if (<= x.re 1.5e-309)
(* y.re (* (atan2 x.im x.re) (pow (* t_3 t_3) (* y.re 0.25))))
(*
(exp (- (* y.re (log x.re)) t_0))
(sin (fma y.im (log x.re) 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_im * atan2(x_46_im, x_46_re);
double t_1 = log(-x_46_re);
double t_2 = y_46_re * atan2(x_46_im, x_46_re);
double t_3 = fma(x_46_im, x_46_im, (x_46_re * x_46_re));
double tmp;
if (x_46_re <= -1.25e-147) {
tmp = sin(fma(t_1, y_46_im, t_2)) * exp(-fma(y_46_re, -t_1, t_0));
} else if (x_46_re <= 1.5e-309) {
tmp = y_46_re * (atan2(x_46_im, x_46_re) * pow((t_3 * t_3), (y_46_re * 0.25)));
} else {
tmp = exp(((y_46_re * log(x_46_re)) - t_0)) * sin(fma(y_46_im, log(x_46_re), t_2));
}
return tmp;
}
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = Float64(y_46_im * atan(x_46_im, x_46_re)) t_1 = log(Float64(-x_46_re)) t_2 = Float64(y_46_re * atan(x_46_im, x_46_re)) t_3 = fma(x_46_im, x_46_im, Float64(x_46_re * x_46_re)) tmp = 0.0 if (x_46_re <= -1.25e-147) tmp = Float64(sin(fma(t_1, y_46_im, t_2)) * exp(Float64(-fma(y_46_re, Float64(-t_1), t_0)))); elseif (x_46_re <= 1.5e-309) tmp = Float64(y_46_re * Float64(atan(x_46_im, x_46_re) * (Float64(t_3 * t_3) ^ Float64(y_46_re * 0.25)))); else tmp = Float64(exp(Float64(Float64(y_46_re * log(x_46_re)) - t_0)) * sin(fma(y_46_im, log(x_46_re), 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$im * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[Log[(-x$46$re)], $MachinePrecision]}, Block[{t$95$2 = N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(x$46$im * x$46$im + N[(x$46$re * x$46$re), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x$46$re, -1.25e-147], N[(N[Sin[N[(t$95$1 * y$46$im + t$95$2), $MachinePrecision]], $MachinePrecision] * N[Exp[(-N[(y$46$re * (-t$95$1) + t$95$0), $MachinePrecision])], $MachinePrecision]), $MachinePrecision], If[LessEqual[x$46$re, 1.5e-309], N[(y$46$re * N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * N[Power[N[(t$95$3 * t$95$3), $MachinePrecision], N[(y$46$re * 0.25), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[Exp[N[(N[(y$46$re * N[Log[x$46$re], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]], $MachinePrecision] * N[Sin[N[(y$46$im * N[Log[x$46$re], $MachinePrecision] + t$95$2), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
t_1 := \log \left(-x.re\right)\\
t_2 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
t_3 := \mathsf{fma}\left(x.im, x.im, x.re \cdot x.re\right)\\
\mathbf{if}\;x.re \leq -1.25 \cdot 10^{-147}:\\
\;\;\;\;\sin \left(\mathsf{fma}\left(t\_1, y.im, t\_2\right)\right) \cdot e^{-\mathsf{fma}\left(y.re, -t\_1, t\_0\right)}\\
\mathbf{elif}\;x.re \leq 1.5 \cdot 10^{-309}:\\
\;\;\;\;y.re \cdot \left(\tan^{-1}_* \frac{x.im}{x.re} \cdot {\left(t\_3 \cdot t\_3\right)}^{\left(y.re \cdot 0.25\right)}\right)\\
\mathbf{else}:\\
\;\;\;\;e^{y.re \cdot \log x.re - t\_0} \cdot \sin \left(\mathsf{fma}\left(y.im, \log x.re, t\_2\right)\right)\\
\end{array}
\end{array}
if x.re < -1.25000000000000003e-147Initial program 35.5%
Taylor expanded in x.re around -inf
*-lowering-*.f64N/A
exp-lowering-exp.f64N/A
sub-negN/A
mul-1-negN/A
distribute-neg-outN/A
neg-lowering-neg.f64N/A
accelerator-lowering-fma.f64N/A
log-lowering-log.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
atan2-lowering-atan2.f64N/A
sin-lowering-sin.f64N/A
Simplified73.9%
*-commutativeN/A
*-lowering-*.f64N/A
Applied egg-rr73.9%
if -1.25000000000000003e-147 < x.re < 1.5e-309Initial program 29.2%
Taylor expanded in y.re around 0
+-commutativeN/A
accelerator-lowering-fma.f64N/A
Simplified29.2%
Taylor expanded in y.im around 0
*-lowering-*.f64N/A
*-lowering-*.f64N/A
atan2-lowering-atan2.f64N/A
pow-lowering-pow.f64N/A
sqrt-lowering-sqrt.f64N/A
unpow2N/A
accelerator-lowering-fma.f64N/A
unpow2N/A
*-lowering-*.f6447.6
Simplified47.6%
pow1/2N/A
pow-unpowN/A
sqr-powN/A
pow-prod-downN/A
pow-lowering-pow.f64N/A
*-lowering-*.f64N/A
accelerator-lowering-fma.f64N/A
*-lowering-*.f64N/A
accelerator-lowering-fma.f64N/A
*-lowering-*.f64N/A
*-commutativeN/A
associate-/l*N/A
*-lowering-*.f64N/A
metadata-eval51.3
Applied egg-rr51.3%
if 1.5e-309 < x.re Initial program 39.9%
Taylor expanded in x.im around 0
*-lowering-*.f64N/A
exp-lowering-exp.f64N/A
--lowering--.f64N/A
*-lowering-*.f64N/A
log-lowering-log.f64N/A
*-lowering-*.f64N/A
atan2-lowering-atan2.f64N/A
sin-lowering-sin.f64N/A
accelerator-lowering-fma.f64N/A
log-lowering-log.f64N/A
*-lowering-*.f64N/A
atan2-lowering-atan2.f6473.4
Simplified73.4%
Final simplification71.5%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (log (sqrt (+ (* x.re x.re) (* x.im x.im)))))
(t_1 (fma x.im x.im (* x.re x.re))))
(if (<=
(*
(exp (- (* y.re t_0) (* y.im (atan2 x.im x.re))))
(sin (+ (* y.re (atan2 x.im x.re)) (* y.im t_0))))
-2e-143)
(* y.re (* (fabs (atan2 x.im x.re)) (pow (sqrt t_1) y.re)))
(* (atan2 x.im x.re) (* y.re (pow t_1 (* y.re 0.5)))))))
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))));
double t_1 = fma(x_46_im, x_46_im, (x_46_re * x_46_re));
double tmp;
if ((exp(((y_46_re * t_0) - (y_46_im * atan2(x_46_im, x_46_re)))) * sin(((y_46_re * atan2(x_46_im, x_46_re)) + (y_46_im * t_0)))) <= -2e-143) {
tmp = y_46_re * (fabs(atan2(x_46_im, x_46_re)) * pow(sqrt(t_1), y_46_re));
} else {
tmp = atan2(x_46_im, x_46_re) * (y_46_re * pow(t_1, (y_46_re * 0.5)));
}
return tmp;
}
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)))) t_1 = fma(x_46_im, x_46_im, Float64(x_46_re * x_46_re)) tmp = 0.0 if (Float64(exp(Float64(Float64(y_46_re * t_0) - Float64(y_46_im * atan(x_46_im, x_46_re)))) * sin(Float64(Float64(y_46_re * atan(x_46_im, x_46_re)) + Float64(y_46_im * t_0)))) <= -2e-143) tmp = Float64(y_46_re * Float64(abs(atan(x_46_im, x_46_re)) * (sqrt(t_1) ^ y_46_re))); else tmp = Float64(atan(x_46_im, x_46_re) * Float64(y_46_re * (t_1 ^ Float64(y_46_re * 0.5)))); end return tmp end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[Log[N[Sqrt[N[(N[(x$46$re * x$46$re), $MachinePrecision] + N[(x$46$im * x$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]}, Block[{t$95$1 = N[(x$46$im * x$46$im + N[(x$46$re * x$46$re), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(N[Exp[N[(N[(y$46$re * t$95$0), $MachinePrecision] - N[(y$46$im * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Sin[N[(N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision] + N[(y$46$im * t$95$0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], -2e-143], N[(y$46$re * N[(N[Abs[N[ArcTan[x$46$im / x$46$re], $MachinePrecision]], $MachinePrecision] * N[Power[N[Sqrt[t$95$1], $MachinePrecision], y$46$re], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * N[(y$46$re * N[Power[t$95$1, N[(y$46$re * 0.5), $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)\\
t_1 := \mathsf{fma}\left(x.im, x.im, x.re \cdot x.re\right)\\
\mathbf{if}\;e^{y.re \cdot t\_0 - y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}} \cdot \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re} + y.im \cdot t\_0\right) \leq -2 \cdot 10^{-143}:\\
\;\;\;\;y.re \cdot \left(\left|\tan^{-1}_* \frac{x.im}{x.re}\right| \cdot {\left(\sqrt{t\_1}\right)}^{y.re}\right)\\
\mathbf{else}:\\
\;\;\;\;\tan^{-1}_* \frac{x.im}{x.re} \cdot \left(y.re \cdot {t\_1}^{\left(y.re \cdot 0.5\right)}\right)\\
\end{array}
\end{array}
if (*.f64 (exp.f64 (-.f64 (*.f64 (log.f64 (sqrt.f64 (+.f64 (*.f64 x.re x.re) (*.f64 x.im x.im)))) y.re) (*.f64 (atan2.f64 x.im x.re) y.im))) (sin.f64 (+.f64 (*.f64 (log.f64 (sqrt.f64 (+.f64 (*.f64 x.re x.re) (*.f64 x.im x.im)))) y.im) (*.f64 (atan2.f64 x.im x.re) y.re)))) < -1.9999999999999999e-143Initial program 64.6%
Taylor expanded in y.re around 0
+-commutativeN/A
accelerator-lowering-fma.f64N/A
Simplified73.4%
Taylor expanded in y.im around 0
*-lowering-*.f64N/A
*-lowering-*.f64N/A
atan2-lowering-atan2.f64N/A
pow-lowering-pow.f64N/A
sqrt-lowering-sqrt.f64N/A
unpow2N/A
accelerator-lowering-fma.f64N/A
unpow2N/A
*-lowering-*.f6427.9
Simplified27.9%
rem-square-sqrtN/A
sqrt-prodN/A
rem-sqrt-squareN/A
fabs-lowering-fabs.f64N/A
atan2-lowering-atan2.f6440.1
Applied egg-rr40.1%
if -1.9999999999999999e-143 < (*.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 33.0%
Taylor expanded in y.re around 0
+-commutativeN/A
accelerator-lowering-fma.f64N/A
Simplified30.5%
Taylor expanded in y.im around 0
*-lowering-*.f64N/A
*-lowering-*.f64N/A
atan2-lowering-atan2.f64N/A
pow-lowering-pow.f64N/A
sqrt-lowering-sqrt.f64N/A
unpow2N/A
accelerator-lowering-fma.f64N/A
unpow2N/A
*-lowering-*.f6450.7
Simplified50.7%
*-commutativeN/A
associate-*l*N/A
*-lowering-*.f64N/A
atan2-lowering-atan2.f64N/A
*-lowering-*.f64N/A
sqrt-pow2N/A
pow-lowering-pow.f64N/A
accelerator-lowering-fma.f64N/A
*-lowering-*.f64N/A
div-invN/A
metadata-evalN/A
*-lowering-*.f6450.7
Applied egg-rr50.7%
Final simplification49.3%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (fma x.im x.im (* x.re x.re))))
(if (<= x.re -4.6e-32)
(*
(exp (* (atan2 x.im x.re) (- y.im)))
(sin (fma y.re (atan2 x.im x.re) (* (log (/ -1.0 x.re)) (- y.im)))))
(if (<= x.re -2e-310)
(* y.re (* (atan2 x.im x.re) (pow (* t_0 t_0) (* y.re 0.25))))
(*
(exp (- (* y.re (log x.re)) (* y.im (atan2 x.im x.re))))
(sin (fma y.im (log x.re) (* 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) {
double t_0 = fma(x_46_im, x_46_im, (x_46_re * x_46_re));
double tmp;
if (x_46_re <= -4.6e-32) {
tmp = exp((atan2(x_46_im, x_46_re) * -y_46_im)) * sin(fma(y_46_re, atan2(x_46_im, x_46_re), (log((-1.0 / x_46_re)) * -y_46_im)));
} else if (x_46_re <= -2e-310) {
tmp = y_46_re * (atan2(x_46_im, x_46_re) * pow((t_0 * t_0), (y_46_re * 0.25)));
} else {
tmp = exp(((y_46_re * log(x_46_re)) - (y_46_im * atan2(x_46_im, x_46_re)))) * sin(fma(y_46_im, log(x_46_re), (y_46_re * atan2(x_46_im, x_46_re))));
}
return tmp;
}
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = fma(x_46_im, x_46_im, Float64(x_46_re * x_46_re)) tmp = 0.0 if (x_46_re <= -4.6e-32) tmp = Float64(exp(Float64(atan(x_46_im, x_46_re) * Float64(-y_46_im))) * sin(fma(y_46_re, atan(x_46_im, x_46_re), Float64(log(Float64(-1.0 / x_46_re)) * Float64(-y_46_im))))); elseif (x_46_re <= -2e-310) tmp = Float64(y_46_re * Float64(atan(x_46_im, x_46_re) * (Float64(t_0 * t_0) ^ Float64(y_46_re * 0.25)))); else tmp = Float64(exp(Float64(Float64(y_46_re * log(x_46_re)) - Float64(y_46_im * atan(x_46_im, x_46_re)))) * sin(fma(y_46_im, log(x_46_re), Float64(y_46_re * atan(x_46_im, x_46_re))))); end return tmp end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[(x$46$im * x$46$im + N[(x$46$re * x$46$re), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x$46$re, -4.6e-32], N[(N[Exp[N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * (-y$46$im)), $MachinePrecision]], $MachinePrecision] * N[Sin[N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision] + N[(N[Log[N[(-1.0 / x$46$re), $MachinePrecision]], $MachinePrecision] * (-y$46$im)), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[x$46$re, -2e-310], N[(y$46$re * N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * N[Power[N[(t$95$0 * t$95$0), $MachinePrecision], N[(y$46$re * 0.25), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[Exp[N[(N[(y$46$re * N[Log[x$46$re], $MachinePrecision]), $MachinePrecision] - N[(y$46$im * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Sin[N[(y$46$im * N[Log[x$46$re], $MachinePrecision] + N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \mathsf{fma}\left(x.im, x.im, x.re \cdot x.re\right)\\
\mathbf{if}\;x.re \leq -4.6 \cdot 10^{-32}:\\
\;\;\;\;e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot \left(-y.im\right)} \cdot \sin \left(\mathsf{fma}\left(y.re, \tan^{-1}_* \frac{x.im}{x.re}, \log \left(\frac{-1}{x.re}\right) \cdot \left(-y.im\right)\right)\right)\\
\mathbf{elif}\;x.re \leq -2 \cdot 10^{-310}:\\
\;\;\;\;y.re \cdot \left(\tan^{-1}_* \frac{x.im}{x.re} \cdot {\left(t\_0 \cdot t\_0\right)}^{\left(y.re \cdot 0.25\right)}\right)\\
\mathbf{else}:\\
\;\;\;\;e^{y.re \cdot \log x.re - y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}} \cdot \sin \left(\mathsf{fma}\left(y.im, \log x.re, y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)\\
\end{array}
\end{array}
if x.re < -4.6000000000000001e-32Initial program 34.3%
Taylor expanded in x.re around -inf
*-lowering-*.f64N/A
exp-lowering-exp.f64N/A
sub-negN/A
mul-1-negN/A
distribute-neg-outN/A
neg-lowering-neg.f64N/A
accelerator-lowering-fma.f64N/A
log-lowering-log.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
atan2-lowering-atan2.f64N/A
sin-lowering-sin.f64N/A
Simplified74.5%
Taylor expanded in y.re around 0
exp-lowering-exp.f64N/A
neg-lowering-neg.f64N/A
*-lowering-*.f64N/A
atan2-lowering-atan2.f6457.8
Simplified57.8%
if -4.6000000000000001e-32 < x.re < -1.999999999999994e-310Initial program 34.1%
Taylor expanded in y.re around 0
+-commutativeN/A
accelerator-lowering-fma.f64N/A
Simplified29.3%
Taylor expanded in y.im around 0
*-lowering-*.f64N/A
*-lowering-*.f64N/A
atan2-lowering-atan2.f64N/A
pow-lowering-pow.f64N/A
sqrt-lowering-sqrt.f64N/A
unpow2N/A
accelerator-lowering-fma.f64N/A
unpow2N/A
*-lowering-*.f6452.6
Simplified52.6%
pow1/2N/A
pow-unpowN/A
sqr-powN/A
pow-prod-downN/A
pow-lowering-pow.f64N/A
*-lowering-*.f64N/A
accelerator-lowering-fma.f64N/A
*-lowering-*.f64N/A
accelerator-lowering-fma.f64N/A
*-lowering-*.f64N/A
*-commutativeN/A
associate-/l*N/A
*-lowering-*.f64N/A
metadata-eval54.8
Applied egg-rr54.8%
if -1.999999999999994e-310 < x.re Initial program 39.9%
Taylor expanded in x.im around 0
*-lowering-*.f64N/A
exp-lowering-exp.f64N/A
--lowering--.f64N/A
*-lowering-*.f64N/A
log-lowering-log.f64N/A
*-lowering-*.f64N/A
atan2-lowering-atan2.f64N/A
sin-lowering-sin.f64N/A
accelerator-lowering-fma.f64N/A
log-lowering-log.f64N/A
*-lowering-*.f64N/A
atan2-lowering-atan2.f6473.4
Simplified73.4%
Final simplification65.5%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (fabs (atan2 x.im x.re)))
(t_1 (pow (sqrt (fma x.im x.im (* x.re x.re))) y.re)))
(if (<= y.re -1.85)
(* y.re (* t_0 t_1))
(if (<= y.re 2.1)
(* y.re (* (atan2 x.im x.re) (exp (* (atan2 x.im x.re) (- y.im)))))
(* t_1 (sin (* y.re t_0)))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = fabs(atan2(x_46_im, x_46_re));
double t_1 = pow(sqrt(fma(x_46_im, x_46_im, (x_46_re * x_46_re))), y_46_re);
double tmp;
if (y_46_re <= -1.85) {
tmp = y_46_re * (t_0 * t_1);
} else if (y_46_re <= 2.1) {
tmp = y_46_re * (atan2(x_46_im, x_46_re) * exp((atan2(x_46_im, x_46_re) * -y_46_im)));
} else {
tmp = t_1 * sin((y_46_re * t_0));
}
return tmp;
}
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = abs(atan(x_46_im, x_46_re)) t_1 = 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 <= -1.85) tmp = Float64(y_46_re * Float64(t_0 * t_1)); elseif (y_46_re <= 2.1) tmp = Float64(y_46_re * Float64(atan(x_46_im, x_46_re) * exp(Float64(atan(x_46_im, x_46_re) * Float64(-y_46_im))))); else tmp = Float64(t_1 * sin(Float64(y_46_re * t_0))); end return tmp end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[Abs[N[ArcTan[x$46$im / x$46$re], $MachinePrecision]], $MachinePrecision]}, Block[{t$95$1 = 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]}, If[LessEqual[y$46$re, -1.85], N[(y$46$re * N[(t$95$0 * t$95$1), $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$re, 2.1], N[(y$46$re * N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * N[Exp[N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * (-y$46$im)), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t$95$1 * N[Sin[N[(y$46$re * t$95$0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \left|\tan^{-1}_* \frac{x.im}{x.re}\right|\\
t_1 := {\left(\sqrt{\mathsf{fma}\left(x.im, x.im, x.re \cdot x.re\right)}\right)}^{y.re}\\
\mathbf{if}\;y.re \leq -1.85:\\
\;\;\;\;y.re \cdot \left(t\_0 \cdot t\_1\right)\\
\mathbf{elif}\;y.re \leq 2.1:\\
\;\;\;\;y.re \cdot \left(\tan^{-1}_* \frac{x.im}{x.re} \cdot e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot \left(-y.im\right)}\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1 \cdot \sin \left(y.re \cdot t\_0\right)\\
\end{array}
\end{array}
if y.re < -1.8500000000000001Initial program 41.5%
Taylor expanded in y.re around 0
+-commutativeN/A
accelerator-lowering-fma.f64N/A
Simplified33.8%
Taylor expanded in y.im around 0
*-lowering-*.f64N/A
*-lowering-*.f64N/A
atan2-lowering-atan2.f64N/A
pow-lowering-pow.f64N/A
sqrt-lowering-sqrt.f64N/A
unpow2N/A
accelerator-lowering-fma.f64N/A
unpow2N/A
*-lowering-*.f6484.8
Simplified84.8%
rem-square-sqrtN/A
sqrt-prodN/A
rem-sqrt-squareN/A
fabs-lowering-fabs.f64N/A
atan2-lowering-atan2.f6486.3
Applied egg-rr86.3%
if -1.8500000000000001 < y.re < 2.10000000000000009Initial program 39.3%
Taylor expanded in y.im around 0
*-lowering-*.f64N/A
atan2-lowering-atan2.f6434.7
Simplified34.7%
Taylor expanded in y.re around 0
*-lowering-*.f64N/A
*-lowering-*.f64N/A
exp-lowering-exp.f64N/A
neg-lowering-neg.f64N/A
*-lowering-*.f64N/A
atan2-lowering-atan2.f64N/A
atan2-lowering-atan2.f6452.3
Simplified52.3%
if 2.10000000000000009 < y.re Initial program 28.6%
Taylor expanded in y.im around 0
*-lowering-*.f64N/A
sin-lowering-sin.f64N/A
*-lowering-*.f64N/A
atan2-lowering-atan2.f64N/A
pow-lowering-pow.f64N/A
sqrt-lowering-sqrt.f64N/A
unpow2N/A
accelerator-lowering-fma.f64N/A
unpow2N/A
*-lowering-*.f6454.1
Simplified54.1%
unpow1N/A
metadata-evalN/A
pow-prod-upN/A
pow-prod-downN/A
unpow2N/A
pow-lowering-pow.f64N/A
pow-lowering-pow.f64N/A
atan2-lowering-atan2.f6462.0
Applied egg-rr62.0%
unpow1/2N/A
unpow2N/A
rem-sqrt-squareN/A
fabs-lowering-fabs.f64N/A
atan2-lowering-atan2.f6462.0
Applied egg-rr62.0%
Final simplification63.3%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0
(*
y.re
(*
(fabs (atan2 x.im x.re))
(pow (sqrt (fma x.im x.im (* x.re x.re))) y.re)))))
(if (<= y.re -1.9)
t_0
(if (<= y.re 2.2)
(* y.re (* (atan2 x.im x.re) (exp (* (atan2 x.im x.re) (- y.im)))))
t_0))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = y_46_re * (fabs(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 <= -1.9) {
tmp = t_0;
} else if (y_46_re <= 2.2) {
tmp = y_46_re * (atan2(x_46_im, x_46_re) * exp((atan2(x_46_im, x_46_re) * -y_46_im)));
} else {
tmp = t_0;
}
return tmp;
}
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = Float64(y_46_re * Float64(abs(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 <= -1.9) tmp = t_0; elseif (y_46_re <= 2.2) tmp = Float64(y_46_re * Float64(atan(x_46_im, x_46_re) * exp(Float64(atan(x_46_im, x_46_re) * Float64(-y_46_im))))); else tmp = t_0; end return tmp end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[(y$46$re * N[(N[Abs[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]), $MachinePrecision]}, If[LessEqual[y$46$re, -1.9], t$95$0, If[LessEqual[y$46$re, 2.2], N[(y$46$re * N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * N[Exp[N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * (-y$46$im)), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$0]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := y.re \cdot \left(\left|\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}\right)\\
\mathbf{if}\;y.re \leq -1.9:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;y.re \leq 2.2:\\
\;\;\;\;y.re \cdot \left(\tan^{-1}_* \frac{x.im}{x.re} \cdot e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot \left(-y.im\right)}\right)\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
if y.re < -1.8999999999999999 or 2.2000000000000002 < y.re Initial program 35.2%
Taylor expanded in y.re around 0
+-commutativeN/A
accelerator-lowering-fma.f64N/A
Simplified33.6%
Taylor expanded in y.im around 0
*-lowering-*.f64N/A
*-lowering-*.f64N/A
atan2-lowering-atan2.f64N/A
pow-lowering-pow.f64N/A
sqrt-lowering-sqrt.f64N/A
unpow2N/A
accelerator-lowering-fma.f64N/A
unpow2N/A
*-lowering-*.f6472.8
Simplified72.8%
rem-square-sqrtN/A
sqrt-prodN/A
rem-sqrt-squareN/A
fabs-lowering-fabs.f64N/A
atan2-lowering-atan2.f6474.3
Applied egg-rr74.3%
if -1.8999999999999999 < y.re < 2.2000000000000002Initial program 39.3%
Taylor expanded in y.im around 0
*-lowering-*.f64N/A
atan2-lowering-atan2.f6434.7
Simplified34.7%
Taylor expanded in y.re around 0
*-lowering-*.f64N/A
*-lowering-*.f64N/A
exp-lowering-exp.f64N/A
neg-lowering-neg.f64N/A
*-lowering-*.f64N/A
atan2-lowering-atan2.f64N/A
atan2-lowering-atan2.f6452.3
Simplified52.3%
Final simplification63.3%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (fma x.im x.im (* x.re x.re))))
(if (<= x.im -2.2e+79)
(* y.re (* (atan2 x.im x.re) (pow (- x.im) y.re)))
(if (<= x.im -1.1e-200)
(* y.re (* (fabs (atan2 x.im x.re)) (pow (sqrt t_0) y.re)))
(* y.re (* (atan2 x.im x.re) (pow (* t_0 t_0) (* y.re 0.25))))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = fma(x_46_im, x_46_im, (x_46_re * x_46_re));
double tmp;
if (x_46_im <= -2.2e+79) {
tmp = y_46_re * (atan2(x_46_im, x_46_re) * pow(-x_46_im, y_46_re));
} else if (x_46_im <= -1.1e-200) {
tmp = y_46_re * (fabs(atan2(x_46_im, x_46_re)) * pow(sqrt(t_0), y_46_re));
} else {
tmp = y_46_re * (atan2(x_46_im, x_46_re) * pow((t_0 * t_0), (y_46_re * 0.25)));
}
return tmp;
}
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = fma(x_46_im, x_46_im, Float64(x_46_re * x_46_re)) tmp = 0.0 if (x_46_im <= -2.2e+79) tmp = Float64(y_46_re * Float64(atan(x_46_im, x_46_re) * (Float64(-x_46_im) ^ y_46_re))); elseif (x_46_im <= -1.1e-200) tmp = Float64(y_46_re * Float64(abs(atan(x_46_im, x_46_re)) * (sqrt(t_0) ^ y_46_re))); else tmp = Float64(y_46_re * Float64(atan(x_46_im, x_46_re) * (Float64(t_0 * t_0) ^ Float64(y_46_re * 0.25)))); end return tmp end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[(x$46$im * x$46$im + N[(x$46$re * x$46$re), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x$46$im, -2.2e+79], N[(y$46$re * N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * N[Power[(-x$46$im), y$46$re], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x$46$im, -1.1e-200], N[(y$46$re * N[(N[Abs[N[ArcTan[x$46$im / x$46$re], $MachinePrecision]], $MachinePrecision] * N[Power[N[Sqrt[t$95$0], $MachinePrecision], y$46$re], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(y$46$re * N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * N[Power[N[(t$95$0 * t$95$0), $MachinePrecision], N[(y$46$re * 0.25), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \mathsf{fma}\left(x.im, x.im, x.re \cdot x.re\right)\\
\mathbf{if}\;x.im \leq -2.2 \cdot 10^{+79}:\\
\;\;\;\;y.re \cdot \left(\tan^{-1}_* \frac{x.im}{x.re} \cdot {\left(-x.im\right)}^{y.re}\right)\\
\mathbf{elif}\;x.im \leq -1.1 \cdot 10^{-200}:\\
\;\;\;\;y.re \cdot \left(\left|\tan^{-1}_* \frac{x.im}{x.re}\right| \cdot {\left(\sqrt{t\_0}\right)}^{y.re}\right)\\
\mathbf{else}:\\
\;\;\;\;y.re \cdot \left(\tan^{-1}_* \frac{x.im}{x.re} \cdot {\left(t\_0 \cdot t\_0\right)}^{\left(y.re \cdot 0.25\right)}\right)\\
\end{array}
\end{array}
if x.im < -2.1999999999999999e79Initial program 16.3%
Taylor expanded in y.re around 0
+-commutativeN/A
accelerator-lowering-fma.f64N/A
Simplified15.2%
Taylor expanded in y.im around 0
*-lowering-*.f64N/A
*-lowering-*.f64N/A
atan2-lowering-atan2.f64N/A
pow-lowering-pow.f64N/A
sqrt-lowering-sqrt.f64N/A
unpow2N/A
accelerator-lowering-fma.f64N/A
unpow2N/A
*-lowering-*.f6452.9
Simplified52.9%
Taylor expanded in x.im around -inf
mul-1-negN/A
neg-lowering-neg.f6461.3
Simplified61.3%
if -2.1999999999999999e79 < x.im < -1.10000000000000007e-200Initial program 57.7%
Taylor expanded in y.re around 0
+-commutativeN/A
accelerator-lowering-fma.f64N/A
Simplified54.6%
Taylor expanded in y.im around 0
*-lowering-*.f64N/A
*-lowering-*.f64N/A
atan2-lowering-atan2.f64N/A
pow-lowering-pow.f64N/A
sqrt-lowering-sqrt.f64N/A
unpow2N/A
accelerator-lowering-fma.f64N/A
unpow2N/A
*-lowering-*.f6438.9
Simplified38.9%
rem-square-sqrtN/A
sqrt-prodN/A
rem-sqrt-squareN/A
fabs-lowering-fabs.f64N/A
atan2-lowering-atan2.f6443.8
Applied egg-rr43.8%
if -1.10000000000000007e-200 < x.im Initial program 35.2%
Taylor expanded in y.re around 0
+-commutativeN/A
accelerator-lowering-fma.f64N/A
Simplified35.2%
Taylor expanded in y.im around 0
*-lowering-*.f64N/A
*-lowering-*.f64N/A
atan2-lowering-atan2.f64N/A
pow-lowering-pow.f64N/A
sqrt-lowering-sqrt.f64N/A
unpow2N/A
accelerator-lowering-fma.f64N/A
unpow2N/A
*-lowering-*.f6449.7
Simplified49.7%
pow1/2N/A
pow-unpowN/A
sqr-powN/A
pow-prod-downN/A
pow-lowering-pow.f64N/A
*-lowering-*.f64N/A
accelerator-lowering-fma.f64N/A
*-lowering-*.f64N/A
accelerator-lowering-fma.f64N/A
*-lowering-*.f64N/A
*-commutativeN/A
associate-/l*N/A
*-lowering-*.f64N/A
metadata-eval51.6
Applied egg-rr51.6%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(if (<= x.im -4.5e+120)
(* (atan2 x.im x.re) (/ y.re (pow (/ -1.0 x.im) y.re)))
(*
(atan2 x.im x.re)
(* y.re (pow (fma x.im x.im (* x.re x.re)) (* y.re 0.5))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double tmp;
if (x_46_im <= -4.5e+120) {
tmp = atan2(x_46_im, x_46_re) * (y_46_re / pow((-1.0 / x_46_im), y_46_re));
} else {
tmp = atan2(x_46_im, x_46_re) * (y_46_re * pow(fma(x_46_im, x_46_im, (x_46_re * x_46_re)), (y_46_re * 0.5)));
}
return tmp;
}
function code(x_46_re, x_46_im, y_46_re, y_46_im) tmp = 0.0 if (x_46_im <= -4.5e+120) tmp = Float64(atan(x_46_im, x_46_re) * Float64(y_46_re / (Float64(-1.0 / x_46_im) ^ y_46_re))); else tmp = Float64(atan(x_46_im, x_46_re) * Float64(y_46_re * (fma(x_46_im, x_46_im, Float64(x_46_re * x_46_re)) ^ Float64(y_46_re * 0.5)))); end return tmp end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := If[LessEqual[x$46$im, -4.5e+120], N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * N[(y$46$re / N[Power[N[(-1.0 / x$46$im), $MachinePrecision], y$46$re], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * N[(y$46$re * N[Power[N[(x$46$im * x$46$im + N[(x$46$re * x$46$re), $MachinePrecision]), $MachinePrecision], N[(y$46$re * 0.5), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x.im \leq -4.5 \cdot 10^{+120}:\\
\;\;\;\;\tan^{-1}_* \frac{x.im}{x.re} \cdot \frac{y.re}{{\left(\frac{-1}{x.im}\right)}^{y.re}}\\
\mathbf{else}:\\
\;\;\;\;\tan^{-1}_* \frac{x.im}{x.re} \cdot \left(y.re \cdot {\left(\mathsf{fma}\left(x.im, x.im, x.re \cdot x.re\right)\right)}^{\left(y.re \cdot 0.5\right)}\right)\\
\end{array}
\end{array}
if x.im < -4.49999999999999977e120Initial program 9.5%
Taylor expanded in y.re around 0
+-commutativeN/A
accelerator-lowering-fma.f64N/A
Simplified9.5%
Taylor expanded in y.im around 0
*-lowering-*.f64N/A
*-lowering-*.f64N/A
atan2-lowering-atan2.f64N/A
pow-lowering-pow.f64N/A
sqrt-lowering-sqrt.f64N/A
unpow2N/A
accelerator-lowering-fma.f64N/A
unpow2N/A
*-lowering-*.f6451.0
Simplified51.0%
*-commutativeN/A
associate-*l*N/A
*-lowering-*.f64N/A
atan2-lowering-atan2.f64N/A
*-lowering-*.f64N/A
sqrt-pow2N/A
pow-lowering-pow.f64N/A
accelerator-lowering-fma.f64N/A
*-lowering-*.f64N/A
div-invN/A
metadata-evalN/A
*-lowering-*.f6451.0
Applied egg-rr51.0%
Taylor expanded in x.im around -inf
neg-mul-1N/A
exp-negN/A
associate-*r/N/A
*-rgt-identityN/A
/-lowering-/.f64N/A
*-commutativeN/A
exp-to-powN/A
pow-lowering-pow.f64N/A
/-lowering-/.f6460.9
Simplified60.9%
if -4.49999999999999977e120 < x.im Initial program 42.6%
Taylor expanded in y.re around 0
+-commutativeN/A
accelerator-lowering-fma.f64N/A
Simplified41.5%
Taylor expanded in y.im around 0
*-lowering-*.f64N/A
*-lowering-*.f64N/A
atan2-lowering-atan2.f64N/A
pow-lowering-pow.f64N/A
sqrt-lowering-sqrt.f64N/A
unpow2N/A
accelerator-lowering-fma.f64N/A
unpow2N/A
*-lowering-*.f6447.0
Simplified47.0%
*-commutativeN/A
associate-*l*N/A
*-lowering-*.f64N/A
atan2-lowering-atan2.f64N/A
*-lowering-*.f64N/A
sqrt-pow2N/A
pow-lowering-pow.f64N/A
accelerator-lowering-fma.f64N/A
*-lowering-*.f64N/A
div-invN/A
metadata-evalN/A
*-lowering-*.f6447.0
Applied egg-rr47.0%
Final simplification49.2%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(if (<= x.im -1e+113)
(* y.re (* (atan2 x.im x.re) (pow (- x.im) y.re)))
(*
(atan2 x.im x.re)
(* y.re (pow (fma x.im x.im (* x.re x.re)) (* y.re 0.5))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double tmp;
if (x_46_im <= -1e+113) {
tmp = y_46_re * (atan2(x_46_im, x_46_re) * pow(-x_46_im, y_46_re));
} else {
tmp = atan2(x_46_im, x_46_re) * (y_46_re * pow(fma(x_46_im, x_46_im, (x_46_re * x_46_re)), (y_46_re * 0.5)));
}
return tmp;
}
function code(x_46_re, x_46_im, y_46_re, y_46_im) tmp = 0.0 if (x_46_im <= -1e+113) tmp = Float64(y_46_re * Float64(atan(x_46_im, x_46_re) * (Float64(-x_46_im) ^ y_46_re))); else tmp = Float64(atan(x_46_im, x_46_re) * Float64(y_46_re * (fma(x_46_im, x_46_im, Float64(x_46_re * x_46_re)) ^ Float64(y_46_re * 0.5)))); end return tmp end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := If[LessEqual[x$46$im, -1e+113], N[(y$46$re * N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * N[Power[(-x$46$im), y$46$re], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * N[(y$46$re * N[Power[N[(x$46$im * x$46$im + N[(x$46$re * x$46$re), $MachinePrecision]), $MachinePrecision], N[(y$46$re * 0.5), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x.im \leq -1 \cdot 10^{+113}:\\
\;\;\;\;y.re \cdot \left(\tan^{-1}_* \frac{x.im}{x.re} \cdot {\left(-x.im\right)}^{y.re}\right)\\
\mathbf{else}:\\
\;\;\;\;\tan^{-1}_* \frac{x.im}{x.re} \cdot \left(y.re \cdot {\left(\mathsf{fma}\left(x.im, x.im, x.re \cdot x.re\right)\right)}^{\left(y.re \cdot 0.5\right)}\right)\\
\end{array}
\end{array}
if x.im < -1e113Initial program 9.5%
Taylor expanded in y.re around 0
+-commutativeN/A
accelerator-lowering-fma.f64N/A
Simplified9.5%
Taylor expanded in y.im around 0
*-lowering-*.f64N/A
*-lowering-*.f64N/A
atan2-lowering-atan2.f64N/A
pow-lowering-pow.f64N/A
sqrt-lowering-sqrt.f64N/A
unpow2N/A
accelerator-lowering-fma.f64N/A
unpow2N/A
*-lowering-*.f6451.0
Simplified51.0%
Taylor expanded in x.im around -inf
mul-1-negN/A
neg-lowering-neg.f6460.8
Simplified60.8%
if -1e113 < x.im Initial program 42.6%
Taylor expanded in y.re around 0
+-commutativeN/A
accelerator-lowering-fma.f64N/A
Simplified41.5%
Taylor expanded in y.im around 0
*-lowering-*.f64N/A
*-lowering-*.f64N/A
atan2-lowering-atan2.f64N/A
pow-lowering-pow.f64N/A
sqrt-lowering-sqrt.f64N/A
unpow2N/A
accelerator-lowering-fma.f64N/A
unpow2N/A
*-lowering-*.f6447.0
Simplified47.0%
*-commutativeN/A
associate-*l*N/A
*-lowering-*.f64N/A
atan2-lowering-atan2.f64N/A
*-lowering-*.f64N/A
sqrt-pow2N/A
pow-lowering-pow.f64N/A
accelerator-lowering-fma.f64N/A
*-lowering-*.f64N/A
div-invN/A
metadata-evalN/A
*-lowering-*.f6447.0
Applied egg-rr47.0%
Final simplification49.2%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(if (<= x.im -3.7e-25)
(* y.re (* (atan2 x.im x.re) (pow (- x.im) y.re)))
(if (<= x.im 1.6e-55)
(* y.re (* (atan2 x.im x.re) (pow x.re y.re)))
(* y.re (* (atan2 x.im x.re) (pow x.im y.re))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double tmp;
if (x_46_im <= -3.7e-25) {
tmp = y_46_re * (atan2(x_46_im, x_46_re) * pow(-x_46_im, y_46_re));
} else if (x_46_im <= 1.6e-55) {
tmp = y_46_re * (atan2(x_46_im, x_46_re) * pow(x_46_re, y_46_re));
} else {
tmp = y_46_re * (atan2(x_46_im, x_46_re) * pow(x_46_im, y_46_re));
}
return tmp;
}
real(8) function code(x_46re, x_46im, y_46re, y_46im)
real(8), intent (in) :: x_46re
real(8), intent (in) :: x_46im
real(8), intent (in) :: y_46re
real(8), intent (in) :: y_46im
real(8) :: tmp
if (x_46im <= (-3.7d-25)) then
tmp = y_46re * (atan2(x_46im, x_46re) * (-x_46im ** y_46re))
else if (x_46im <= 1.6d-55) then
tmp = y_46re * (atan2(x_46im, x_46re) * (x_46re ** y_46re))
else
tmp = y_46re * (atan2(x_46im, x_46re) * (x_46im ** y_46re))
end if
code = tmp
end function
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double tmp;
if (x_46_im <= -3.7e-25) {
tmp = y_46_re * (Math.atan2(x_46_im, x_46_re) * Math.pow(-x_46_im, y_46_re));
} else if (x_46_im <= 1.6e-55) {
tmp = y_46_re * (Math.atan2(x_46_im, x_46_re) * Math.pow(x_46_re, y_46_re));
} else {
tmp = y_46_re * (Math.atan2(x_46_im, x_46_re) * Math.pow(x_46_im, y_46_re));
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): tmp = 0 if x_46_im <= -3.7e-25: tmp = y_46_re * (math.atan2(x_46_im, x_46_re) * math.pow(-x_46_im, y_46_re)) elif x_46_im <= 1.6e-55: tmp = y_46_re * (math.atan2(x_46_im, x_46_re) * math.pow(x_46_re, y_46_re)) else: tmp = y_46_re * (math.atan2(x_46_im, x_46_re) * math.pow(x_46_im, y_46_re)) return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) tmp = 0.0 if (x_46_im <= -3.7e-25) tmp = Float64(y_46_re * Float64(atan(x_46_im, x_46_re) * (Float64(-x_46_im) ^ y_46_re))); elseif (x_46_im <= 1.6e-55) tmp = Float64(y_46_re * Float64(atan(x_46_im, x_46_re) * (x_46_re ^ y_46_re))); else tmp = Float64(y_46_re * Float64(atan(x_46_im, x_46_re) * (x_46_im ^ y_46_re))); end return tmp end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im) tmp = 0.0; if (x_46_im <= -3.7e-25) tmp = y_46_re * (atan2(x_46_im, x_46_re) * (-x_46_im ^ y_46_re)); elseif (x_46_im <= 1.6e-55) tmp = y_46_re * (atan2(x_46_im, x_46_re) * (x_46_re ^ y_46_re)); else tmp = y_46_re * (atan2(x_46_im, x_46_re) * (x_46_im ^ y_46_re)); end tmp_2 = tmp; end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := If[LessEqual[x$46$im, -3.7e-25], N[(y$46$re * N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * N[Power[(-x$46$im), y$46$re], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x$46$im, 1.6e-55], N[(y$46$re * N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * N[Power[x$46$re, y$46$re], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(y$46$re * N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * N[Power[x$46$im, y$46$re], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x.im \leq -3.7 \cdot 10^{-25}:\\
\;\;\;\;y.re \cdot \left(\tan^{-1}_* \frac{x.im}{x.re} \cdot {\left(-x.im\right)}^{y.re}\right)\\
\mathbf{elif}\;x.im \leq 1.6 \cdot 10^{-55}:\\
\;\;\;\;y.re \cdot \left(\tan^{-1}_* \frac{x.im}{x.re} \cdot {x.re}^{y.re}\right)\\
\mathbf{else}:\\
\;\;\;\;y.re \cdot \left(\tan^{-1}_* \frac{x.im}{x.re} \cdot {x.im}^{y.re}\right)\\
\end{array}
\end{array}
if x.im < -3.70000000000000009e-25Initial program 25.6%
Taylor expanded in y.re around 0
+-commutativeN/A
accelerator-lowering-fma.f64N/A
Simplified23.4%
Taylor expanded in y.im around 0
*-lowering-*.f64N/A
*-lowering-*.f64N/A
atan2-lowering-atan2.f64N/A
pow-lowering-pow.f64N/A
sqrt-lowering-sqrt.f64N/A
unpow2N/A
accelerator-lowering-fma.f64N/A
unpow2N/A
*-lowering-*.f6448.9
Simplified48.9%
Taylor expanded in x.im around -inf
mul-1-negN/A
neg-lowering-neg.f6453.4
Simplified53.4%
if -3.70000000000000009e-25 < x.im < 1.6000000000000001e-55Initial program 51.2%
Taylor expanded in y.re around 0
+-commutativeN/A
accelerator-lowering-fma.f64N/A
Simplified51.2%
Taylor expanded in y.im around 0
*-lowering-*.f64N/A
*-lowering-*.f64N/A
atan2-lowering-atan2.f64N/A
pow-lowering-pow.f64N/A
sqrt-lowering-sqrt.f64N/A
unpow2N/A
accelerator-lowering-fma.f64N/A
unpow2N/A
*-lowering-*.f6448.1
Simplified48.1%
Taylor expanded in x.im around 0
*-lowering-*.f64N/A
atan2-lowering-atan2.f64N/A
pow-lowering-pow.f6443.8
Simplified43.8%
if 1.6000000000000001e-55 < x.im Initial program 26.4%
Taylor expanded in y.re around 0
+-commutativeN/A
accelerator-lowering-fma.f64N/A
Simplified25.0%
Taylor expanded in y.im around 0
*-lowering-*.f64N/A
*-lowering-*.f64N/A
atan2-lowering-atan2.f64N/A
pow-lowering-pow.f64N/A
sqrt-lowering-sqrt.f64N/A
unpow2N/A
accelerator-lowering-fma.f64N/A
unpow2N/A
*-lowering-*.f6445.7
Simplified45.7%
Taylor expanded in x.re around 0
*-lowering-*.f64N/A
atan2-lowering-atan2.f64N/A
pow-lowering-pow.f6442.1
Simplified42.1%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(if (<= y.re -1.66e+19)
(* y.re (* (atan2 x.im x.re) (pow x.re y.re)))
(if (<= y.re 128000.0)
(sin (* y.re (atan2 x.im x.re)))
(* y.re (* (atan2 x.im x.re) (pow x.im y.re))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double tmp;
if (y_46_re <= -1.66e+19) {
tmp = y_46_re * (atan2(x_46_im, x_46_re) * pow(x_46_re, y_46_re));
} else if (y_46_re <= 128000.0) {
tmp = sin((y_46_re * atan2(x_46_im, x_46_re)));
} else {
tmp = y_46_re * (atan2(x_46_im, x_46_re) * pow(x_46_im, y_46_re));
}
return tmp;
}
real(8) function code(x_46re, x_46im, y_46re, y_46im)
real(8), intent (in) :: x_46re
real(8), intent (in) :: x_46im
real(8), intent (in) :: y_46re
real(8), intent (in) :: y_46im
real(8) :: tmp
if (y_46re <= (-1.66d+19)) then
tmp = y_46re * (atan2(x_46im, x_46re) * (x_46re ** y_46re))
else if (y_46re <= 128000.0d0) then
tmp = sin((y_46re * atan2(x_46im, x_46re)))
else
tmp = y_46re * (atan2(x_46im, x_46re) * (x_46im ** y_46re))
end if
code = tmp
end function
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double tmp;
if (y_46_re <= -1.66e+19) {
tmp = y_46_re * (Math.atan2(x_46_im, x_46_re) * Math.pow(x_46_re, y_46_re));
} else if (y_46_re <= 128000.0) {
tmp = Math.sin((y_46_re * Math.atan2(x_46_im, x_46_re)));
} else {
tmp = y_46_re * (Math.atan2(x_46_im, x_46_re) * Math.pow(x_46_im, y_46_re));
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): tmp = 0 if y_46_re <= -1.66e+19: tmp = y_46_re * (math.atan2(x_46_im, x_46_re) * math.pow(x_46_re, y_46_re)) elif y_46_re <= 128000.0: tmp = math.sin((y_46_re * math.atan2(x_46_im, x_46_re))) else: tmp = y_46_re * (math.atan2(x_46_im, x_46_re) * math.pow(x_46_im, y_46_re)) return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) tmp = 0.0 if (y_46_re <= -1.66e+19) tmp = Float64(y_46_re * Float64(atan(x_46_im, x_46_re) * (x_46_re ^ y_46_re))); elseif (y_46_re <= 128000.0) tmp = sin(Float64(y_46_re * atan(x_46_im, x_46_re))); else tmp = Float64(y_46_re * Float64(atan(x_46_im, x_46_re) * (x_46_im ^ y_46_re))); end return tmp end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im) tmp = 0.0; if (y_46_re <= -1.66e+19) tmp = y_46_re * (atan2(x_46_im, x_46_re) * (x_46_re ^ y_46_re)); elseif (y_46_re <= 128000.0) tmp = sin((y_46_re * atan2(x_46_im, x_46_re))); else tmp = y_46_re * (atan2(x_46_im, x_46_re) * (x_46_im ^ y_46_re)); end tmp_2 = tmp; end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := If[LessEqual[y$46$re, -1.66e+19], N[(y$46$re * N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * N[Power[x$46$re, y$46$re], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$re, 128000.0], N[Sin[N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[(y$46$re * N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * N[Power[x$46$im, y$46$re], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y.re \leq -1.66 \cdot 10^{+19}:\\
\;\;\;\;y.re \cdot \left(\tan^{-1}_* \frac{x.im}{x.re} \cdot {x.re}^{y.re}\right)\\
\mathbf{elif}\;y.re \leq 128000:\\
\;\;\;\;\sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\\
\mathbf{else}:\\
\;\;\;\;y.re \cdot \left(\tan^{-1}_* \frac{x.im}{x.re} \cdot {x.im}^{y.re}\right)\\
\end{array}
\end{array}
if y.re < -1.66e19Initial program 43.1%
Taylor expanded in y.re around 0
+-commutativeN/A
accelerator-lowering-fma.f64N/A
Simplified34.5%
Taylor expanded in y.im around 0
*-lowering-*.f64N/A
*-lowering-*.f64N/A
atan2-lowering-atan2.f64N/A
pow-lowering-pow.f64N/A
sqrt-lowering-sqrt.f64N/A
unpow2N/A
accelerator-lowering-fma.f64N/A
unpow2N/A
*-lowering-*.f6488.1
Simplified88.1%
Taylor expanded in x.im around 0
*-lowering-*.f64N/A
atan2-lowering-atan2.f64N/A
pow-lowering-pow.f6474.5
Simplified74.5%
if -1.66e19 < y.re < 128000Initial program 38.2%
Taylor expanded in y.im around 0
*-lowering-*.f64N/A
sin-lowering-sin.f64N/A
*-lowering-*.f64N/A
atan2-lowering-atan2.f64N/A
pow-lowering-pow.f64N/A
sqrt-lowering-sqrt.f64N/A
unpow2N/A
accelerator-lowering-fma.f64N/A
unpow2N/A
*-lowering-*.f6424.3
Simplified24.3%
Taylor expanded in x.re around 0
+-lowering-+.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
accelerator-lowering-fma.f64N/A
/-lowering-/.f64N/A
unpow2N/A
*-lowering-*.f64N/A
cube-multN/A
unpow2N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
associate-*r/N/A
metadata-evalN/A
/-lowering-/.f649.4
Simplified9.4%
Taylor expanded in y.re around 0
Simplified19.7%
if 128000 < y.re Initial program 29.5%
Taylor expanded in y.re around 0
+-commutativeN/A
accelerator-lowering-fma.f64N/A
Simplified32.8%
Taylor expanded in y.im around 0
*-lowering-*.f64N/A
*-lowering-*.f64N/A
atan2-lowering-atan2.f64N/A
pow-lowering-pow.f64N/A
sqrt-lowering-sqrt.f64N/A
unpow2N/A
accelerator-lowering-fma.f64N/A
unpow2N/A
*-lowering-*.f6462.4
Simplified62.4%
Taylor expanded in x.re around 0
*-lowering-*.f64N/A
atan2-lowering-atan2.f64N/A
pow-lowering-pow.f6457.8
Simplified57.8%
Final simplification41.2%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (* y.re (* (atan2 x.im x.re) (pow x.im y.re)))))
(if (<= y.re -0.38)
t_0
(if (<= y.re 116000.0) (sin (* y.re (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(x_46_im, y_46_re));
double tmp;
if (y_46_re <= -0.38) {
tmp = t_0;
} else if (y_46_re <= 116000.0) {
tmp = sin((y_46_re * atan2(x_46_im, x_46_re)));
} else {
tmp = t_0;
}
return tmp;
}
real(8) function code(x_46re, x_46im, y_46re, y_46im)
real(8), intent (in) :: x_46re
real(8), intent (in) :: x_46im
real(8), intent (in) :: y_46re
real(8), intent (in) :: y_46im
real(8) :: t_0
real(8) :: tmp
t_0 = y_46re * (atan2(x_46im, x_46re) * (x_46im ** y_46re))
if (y_46re <= (-0.38d0)) then
tmp = t_0
else if (y_46re <= 116000.0d0) then
tmp = sin((y_46re * atan2(x_46im, x_46re)))
else
tmp = t_0
end if
code = tmp
end function
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = y_46_re * (Math.atan2(x_46_im, x_46_re) * Math.pow(x_46_im, y_46_re));
double tmp;
if (y_46_re <= -0.38) {
tmp = t_0;
} else if (y_46_re <= 116000.0) {
tmp = Math.sin((y_46_re * Math.atan2(x_46_im, x_46_re)));
} else {
tmp = t_0;
}
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) * math.pow(x_46_im, y_46_re)) tmp = 0 if y_46_re <= -0.38: tmp = t_0 elif y_46_re <= 116000.0: tmp = math.sin((y_46_re * math.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(y_46_re * Float64(atan(x_46_im, x_46_re) * (x_46_im ^ y_46_re))) tmp = 0.0 if (y_46_re <= -0.38) tmp = t_0; elseif (y_46_re <= 116000.0) tmp = sin(Float64(y_46_re * atan(x_46_im, x_46_re))); else tmp = t_0; 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) * (x_46_im ^ y_46_re)); tmp = 0.0; if (y_46_re <= -0.38) tmp = t_0; elseif (y_46_re <= 116000.0) tmp = sin((y_46_re * atan2(x_46_im, x_46_re))); else tmp = t_0; end tmp_2 = tmp; end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[(y$46$re * N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * N[Power[x$46$im, y$46$re], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y$46$re, -0.38], t$95$0, If[LessEqual[y$46$re, 116000.0], N[Sin[N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]], $MachinePrecision], t$95$0]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := y.re \cdot \left(\tan^{-1}_* \frac{x.im}{x.re} \cdot {x.im}^{y.re}\right)\\
\mathbf{if}\;y.re \leq -0.38:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;y.re \leq 116000:\\
\;\;\;\;\sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
if y.re < -0.38 or 116000 < y.re Initial program 35.7%
Taylor expanded in y.re around 0
+-commutativeN/A
accelerator-lowering-fma.f64N/A
Simplified33.3%
Taylor expanded in y.im around 0
*-lowering-*.f64N/A
*-lowering-*.f64N/A
atan2-lowering-atan2.f64N/A
pow-lowering-pow.f64N/A
sqrt-lowering-sqrt.f64N/A
unpow2N/A
accelerator-lowering-fma.f64N/A
unpow2N/A
*-lowering-*.f6473.9
Simplified73.9%
Taylor expanded in x.re around 0
*-lowering-*.f64N/A
atan2-lowering-atan2.f64N/A
pow-lowering-pow.f6456.0
Simplified56.0%
if -0.38 < y.re < 116000Initial program 38.7%
Taylor expanded in y.im around 0
*-lowering-*.f64N/A
sin-lowering-sin.f64N/A
*-lowering-*.f64N/A
atan2-lowering-atan2.f64N/A
pow-lowering-pow.f64N/A
sqrt-lowering-sqrt.f64N/A
unpow2N/A
accelerator-lowering-fma.f64N/A
unpow2N/A
*-lowering-*.f6421.8
Simplified21.8%
Taylor expanded in x.re around 0
+-lowering-+.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
accelerator-lowering-fma.f64N/A
/-lowering-/.f64N/A
unpow2N/A
*-lowering-*.f64N/A
cube-multN/A
unpow2N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
associate-*r/N/A
metadata-evalN/A
/-lowering-/.f649.1
Simplified9.1%
Taylor expanded in y.re around 0
Simplified20.7%
Final simplification38.0%
(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 37.2%
Taylor expanded in y.im around 0
*-lowering-*.f64N/A
sin-lowering-sin.f64N/A
*-lowering-*.f64N/A
atan2-lowering-atan2.f64N/A
pow-lowering-pow.f64N/A
sqrt-lowering-sqrt.f64N/A
unpow2N/A
accelerator-lowering-fma.f64N/A
unpow2N/A
*-lowering-*.f6443.9
Simplified43.9%
Taylor expanded in y.re around 0
*-lowering-*.f64N/A
atan2-lowering-atan2.f6414.4
Simplified14.4%
herbie shell --seed 2024204
(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)))))