
(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 16 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (log (sqrt (+ (* x.re x.re) (* x.im x.im))))))
(*
(exp (- (* t_0 y.re) (* (atan2 x.im x.re) y.im)))
(sin (+ (* t_0 y.im) (* (atan2 x.im x.re) y.re))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))));
return exp(((t_0 * y_46_re) - (atan2(x_46_im, x_46_re) * y_46_im))) * sin(((t_0 * y_46_im) + (atan2(x_46_im, x_46_re) * y_46_re)));
}
real(8) function code(x_46re, x_46im, y_46re, y_46im)
real(8), intent (in) :: x_46re
real(8), intent (in) :: x_46im
real(8), intent (in) :: y_46re
real(8), intent (in) :: y_46im
real(8) :: t_0
t_0 = log(sqrt(((x_46re * x_46re) + (x_46im * x_46im))))
code = exp(((t_0 * y_46re) - (atan2(x_46im, x_46re) * y_46im))) * sin(((t_0 * y_46im) + (atan2(x_46im, x_46re) * y_46re)))
end function
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = Math.log(Math.sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))));
return Math.exp(((t_0 * y_46_re) - (Math.atan2(x_46_im, x_46_re) * y_46_im))) * Math.sin(((t_0 * y_46_im) + (Math.atan2(x_46_im, x_46_re) * y_46_re)));
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): t_0 = math.log(math.sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im)))) return math.exp(((t_0 * y_46_re) - (math.atan2(x_46_im, x_46_re) * y_46_im))) * math.sin(((t_0 * y_46_im) + (math.atan2(x_46_im, x_46_re) * y_46_re)))
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = log(sqrt(Float64(Float64(x_46_re * x_46_re) + Float64(x_46_im * x_46_im)))) return Float64(exp(Float64(Float64(t_0 * y_46_re) - Float64(atan(x_46_im, x_46_re) * y_46_im))) * sin(Float64(Float64(t_0 * y_46_im) + Float64(atan(x_46_im, x_46_re) * y_46_re)))) end
function tmp = code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im)))); tmp = exp(((t_0 * y_46_re) - (atan2(x_46_im, x_46_re) * y_46_im))) * sin(((t_0 * y_46_im) + (atan2(x_46_im, x_46_re) * y_46_re))); end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[Log[N[Sqrt[N[(N[(x$46$re * x$46$re), $MachinePrecision] + N[(x$46$im * x$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]}, N[(N[Exp[N[(N[(t$95$0 * y$46$re), $MachinePrecision] - N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Sin[N[(N[(t$95$0 * y$46$im), $MachinePrecision] + N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$re), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right)\\
e^{t\_0 \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \sin \left(t\_0 \cdot y.im + \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)
\end{array}
\end{array}
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (* y.re (atan2 x.im x.re)))
(t_1 (* (atan2 x.im x.re) y.im))
(t_2 (sin (fma y.im (log x.re) t_0))))
(if (<= x.re -95000000000.0)
(* (exp (- (* (log (- 0.0 x.re)) y.re) t_1)) (sin t_0))
(if (<= x.re 4.5e-49)
(/
(sin (fma (atan2 x.im x.re) y.re 0.0))
(exp
(fma
(* y.re (- 0.0 0.5))
(log (fma x.im x.im (* x.re x.re)))
(fma (atan2 x.im x.re) y.im 0.0))))
(if (<= x.re 2.3e+228)
(*
(exp (- (* y.re (log (sqrt (+ (* x.re x.re) (* x.im x.im))))) t_1))
t_2)
(* t_2 (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 t_1 = atan2(x_46_im, x_46_re) * y_46_im;
double t_2 = sin(fma(y_46_im, log(x_46_re), t_0));
double tmp;
if (x_46_re <= -95000000000.0) {
tmp = exp(((log((0.0 - x_46_re)) * y_46_re) - t_1)) * sin(t_0);
} else if (x_46_re <= 4.5e-49) {
tmp = sin(fma(atan2(x_46_im, x_46_re), y_46_re, 0.0)) / exp(fma((y_46_re * (0.0 - 0.5)), log(fma(x_46_im, x_46_im, (x_46_re * x_46_re))), fma(atan2(x_46_im, x_46_re), y_46_im, 0.0)));
} else if (x_46_re <= 2.3e+228) {
tmp = exp(((y_46_re * log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))) - t_1)) * t_2;
} else {
tmp = t_2 * 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)) t_1 = Float64(atan(x_46_im, x_46_re) * y_46_im) t_2 = sin(fma(y_46_im, log(x_46_re), t_0)) tmp = 0.0 if (x_46_re <= -95000000000.0) tmp = Float64(exp(Float64(Float64(log(Float64(0.0 - x_46_re)) * y_46_re) - t_1)) * sin(t_0)); elseif (x_46_re <= 4.5e-49) tmp = Float64(sin(fma(atan(x_46_im, x_46_re), y_46_re, 0.0)) / exp(fma(Float64(y_46_re * Float64(0.0 - 0.5)), log(fma(x_46_im, x_46_im, Float64(x_46_re * x_46_re))), fma(atan(x_46_im, x_46_re), y_46_im, 0.0)))); elseif (x_46_re <= 2.3e+228) tmp = Float64(exp(Float64(Float64(y_46_re * log(sqrt(Float64(Float64(x_46_re * x_46_re) + Float64(x_46_im * x_46_im))))) - t_1)) * t_2); else tmp = Float64(t_2 * (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]}, Block[{t$95$1 = N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$im), $MachinePrecision]}, Block[{t$95$2 = N[Sin[N[(y$46$im * N[Log[x$46$re], $MachinePrecision] + t$95$0), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[x$46$re, -95000000000.0], N[(N[Exp[N[(N[(N[Log[N[(0.0 - x$46$re), $MachinePrecision]], $MachinePrecision] * y$46$re), $MachinePrecision] - t$95$1), $MachinePrecision]], $MachinePrecision] * N[Sin[t$95$0], $MachinePrecision]), $MachinePrecision], If[LessEqual[x$46$re, 4.5e-49], N[(N[Sin[N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$re + 0.0), $MachinePrecision]], $MachinePrecision] / N[Exp[N[(N[(y$46$re * N[(0.0 - 0.5), $MachinePrecision]), $MachinePrecision] * N[Log[N[(x$46$im * x$46$im + N[(x$46$re * x$46$re), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] + N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$im + 0.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[x$46$re, 2.3e+228], N[(N[Exp[N[(N[(y$46$re * N[Log[N[Sqrt[N[(N[(x$46$re * x$46$re), $MachinePrecision] + N[(x$46$im * x$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision]], $MachinePrecision] * t$95$2), $MachinePrecision], N[(t$95$2 * 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}\\
t_1 := \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im\\
t_2 := \sin \left(\mathsf{fma}\left(y.im, \log x.re, t\_0\right)\right)\\
\mathbf{if}\;x.re \leq -95000000000:\\
\;\;\;\;e^{\log \left(0 - x.re\right) \cdot y.re - t\_1} \cdot \sin t\_0\\
\mathbf{elif}\;x.re \leq 4.5 \cdot 10^{-49}:\\
\;\;\;\;\frac{\sin \left(\mathsf{fma}\left(\tan^{-1}_* \frac{x.im}{x.re}, y.re, 0\right)\right)}{e^{\mathsf{fma}\left(y.re \cdot \left(0 - 0.5\right), \log \left(\mathsf{fma}\left(x.im, x.im, x.re \cdot x.re\right)\right), \mathsf{fma}\left(\tan^{-1}_* \frac{x.im}{x.re}, y.im, 0\right)\right)}}\\
\mathbf{elif}\;x.re \leq 2.3 \cdot 10^{+228}:\\
\;\;\;\;e^{y.re \cdot \log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) - t\_1} \cdot t\_2\\
\mathbf{else}:\\
\;\;\;\;t\_2 \cdot {x.re}^{y.re}\\
\end{array}
\end{array}
if x.re < -9.5e10Initial program 30.0%
Taylor expanded in y.im around 0
*-lowering-*.f64N/A
atan2-lowering-atan2.f6454.3
Simplified54.3%
Taylor expanded in x.re around -inf
mul-1-negN/A
neg-lowering-neg.f6472.0
Simplified72.0%
if -9.5e10 < x.re < 4.5000000000000002e-49Initial program 52.1%
Taylor expanded in y.im around 0
*-lowering-*.f64N/A
atan2-lowering-atan2.f6455.3
Simplified55.3%
exp-diffN/A
clear-numN/A
/-lowering-/.f64N/A
div-expN/A
exp-lowering-exp.f64N/A
--lowering--.f64N/A
+-lft-identityN/A
+-commutativeN/A
accelerator-lowering-fma.f64N/A
atan2-lowering-atan2.f64N/A
*-commutativeN/A
pow1/2N/A
log-powN/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
log-lowering-log.f64N/A
+-commutativeN/A
Applied egg-rr55.3%
associate-*l/N/A
frac-2negN/A
/-lowering-/.f64N/A
*-lft-identityN/A
neg-lowering-neg.f64N/A
sin-lowering-sin.f64N/A
+-lft-identityN/A
+-commutativeN/A
*-commutativeN/A
accelerator-lowering-fma.f64N/A
atan2-lowering-atan2.f64N/A
neg-sub0N/A
--lowering--.f64N/A
Applied egg-rr65.6%
if 4.5000000000000002e-49 < x.re < 2.30000000000000013e228Initial program 53.5%
Taylor expanded in x.re around inf
mul-1-negN/A
distribute-rgt-neg-inN/A
log-recN/A
remove-double-negN/A
accelerator-lowering-fma.f64N/A
log-lowering-log.f64N/A
*-lowering-*.f64N/A
atan2-lowering-atan2.f6473.8
Simplified73.8%
if 2.30000000000000013e228 < x.re Initial program 0.0%
Taylor expanded in x.re around inf
mul-1-negN/A
distribute-rgt-neg-inN/A
log-recN/A
remove-double-negN/A
accelerator-lowering-fma.f64N/A
log-lowering-log.f64N/A
+-commutativeN/A
accelerator-lowering-fma.f64N/A
atan2-lowering-atan2.f64N/A
associate-*r/N/A
/-lowering-/.f64N/A
associate-*r*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.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-*.f6449.5
Simplified49.5%
Taylor expanded in x.im around 0
*-lowering-*.f64N/A
sin-lowering-sin.f64N/A
accelerator-lowering-fma.f64N/A
log-lowering-log.f64N/A
*-lowering-*.f64N/A
atan2-lowering-atan2.f64N/A
pow-lowering-pow.f6483.9
Simplified83.9%
Final simplification65.9%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (* (atan2 x.im x.re) y.im))
(t_1 (sin (* y.re (atan2 x.im x.re))))
(t_2 (sin (fma (atan2 x.im x.re) y.re 0.0)))
(t_3 (log (fma x.im x.im (* x.re x.re)))))
(if (<= y.re -6.8e-7)
(*
t_1
(exp (- (* y.re (log (sqrt (+ (* x.re x.re) (* x.im x.im))))) t_0)))
(if (<= y.re 3.5e-16)
(/ t_2 (exp t_0))
(if (<= y.re 7e+208)
(*
t_1
(/
1.0
(exp (- (fma (atan2 x.im x.re) y.im 0.0) (* y.re (* 0.5 t_3))))))
(/ t_2 (exp (* t_3 (* 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 = atan2(x_46_im, x_46_re) * y_46_im;
double t_1 = sin((y_46_re * atan2(x_46_im, x_46_re)));
double t_2 = sin(fma(atan2(x_46_im, x_46_re), y_46_re, 0.0));
double t_3 = log(fma(x_46_im, x_46_im, (x_46_re * x_46_re)));
double tmp;
if (y_46_re <= -6.8e-7) {
tmp = t_1 * exp(((y_46_re * log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))) - t_0));
} else if (y_46_re <= 3.5e-16) {
tmp = t_2 / exp(t_0);
} else if (y_46_re <= 7e+208) {
tmp = t_1 * (1.0 / exp((fma(atan2(x_46_im, x_46_re), y_46_im, 0.0) - (y_46_re * (0.5 * t_3)))));
} else {
tmp = t_2 / exp((t_3 * (y_46_re * -0.5)));
}
return tmp;
}
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = Float64(atan(x_46_im, x_46_re) * y_46_im) t_1 = sin(Float64(y_46_re * atan(x_46_im, x_46_re))) t_2 = sin(fma(atan(x_46_im, x_46_re), y_46_re, 0.0)) t_3 = log(fma(x_46_im, x_46_im, Float64(x_46_re * x_46_re))) tmp = 0.0 if (y_46_re <= -6.8e-7) tmp = Float64(t_1 * exp(Float64(Float64(y_46_re * log(sqrt(Float64(Float64(x_46_re * x_46_re) + Float64(x_46_im * x_46_im))))) - t_0))); elseif (y_46_re <= 3.5e-16) tmp = Float64(t_2 / exp(t_0)); elseif (y_46_re <= 7e+208) tmp = Float64(t_1 * Float64(1.0 / exp(Float64(fma(atan(x_46_im, x_46_re), y_46_im, 0.0) - Float64(y_46_re * Float64(0.5 * t_3)))))); else tmp = Float64(t_2 / exp(Float64(t_3 * 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[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$im), $MachinePrecision]}, Block[{t$95$1 = N[Sin[N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$2 = N[Sin[N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$re + 0.0), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$3 = N[Log[N[(x$46$im * x$46$im + N[(x$46$re * x$46$re), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[y$46$re, -6.8e-7], N[(t$95$1 * N[Exp[N[(N[(y$46$re * N[Log[N[Sqrt[N[(N[(x$46$re * x$46$re), $MachinePrecision] + N[(x$46$im * x$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$re, 3.5e-16], N[(t$95$2 / N[Exp[t$95$0], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$re, 7e+208], N[(t$95$1 * N[(1.0 / N[Exp[N[(N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$im + 0.0), $MachinePrecision] - N[(y$46$re * N[(0.5 * t$95$3), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t$95$2 / N[Exp[N[(t$95$3 * N[(y$46$re * -0.5), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im\\
t_1 := \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\\
t_2 := \sin \left(\mathsf{fma}\left(\tan^{-1}_* \frac{x.im}{x.re}, y.re, 0\right)\right)\\
t_3 := \log \left(\mathsf{fma}\left(x.im, x.im, x.re \cdot x.re\right)\right)\\
\mathbf{if}\;y.re \leq -6.8 \cdot 10^{-7}:\\
\;\;\;\;t\_1 \cdot e^{y.re \cdot \log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) - t\_0}\\
\mathbf{elif}\;y.re \leq 3.5 \cdot 10^{-16}:\\
\;\;\;\;\frac{t\_2}{e^{t\_0}}\\
\mathbf{elif}\;y.re \leq 7 \cdot 10^{+208}:\\
\;\;\;\;t\_1 \cdot \frac{1}{e^{\mathsf{fma}\left(\tan^{-1}_* \frac{x.im}{x.re}, y.im, 0\right) - y.re \cdot \left(0.5 \cdot t\_3\right)}}\\
\mathbf{else}:\\
\;\;\;\;\frac{t\_2}{e^{t\_3 \cdot \left(y.re \cdot -0.5\right)}}\\
\end{array}
\end{array}
if y.re < -6.79999999999999948e-7Initial program 43.5%
Taylor expanded in y.im around 0
*-lowering-*.f64N/A
atan2-lowering-atan2.f6478.0
Simplified78.0%
if -6.79999999999999948e-7 < y.re < 3.50000000000000017e-16Initial program 43.8%
Taylor expanded in y.im around 0
*-lowering-*.f64N/A
atan2-lowering-atan2.f6435.0
Simplified35.0%
exp-diffN/A
clear-numN/A
/-lowering-/.f64N/A
div-expN/A
exp-lowering-exp.f64N/A
--lowering--.f64N/A
+-lft-identityN/A
+-commutativeN/A
accelerator-lowering-fma.f64N/A
atan2-lowering-atan2.f64N/A
*-commutativeN/A
pow1/2N/A
log-powN/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
log-lowering-log.f64N/A
+-commutativeN/A
Applied egg-rr35.0%
associate-*l/N/A
frac-2negN/A
/-lowering-/.f64N/A
*-lft-identityN/A
neg-lowering-neg.f64N/A
sin-lowering-sin.f64N/A
+-lft-identityN/A
+-commutativeN/A
*-commutativeN/A
accelerator-lowering-fma.f64N/A
atan2-lowering-atan2.f64N/A
neg-sub0N/A
--lowering--.f64N/A
Applied egg-rr42.5%
Taylor expanded in y.re around 0
exp-lowering-exp.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
atan2-lowering-atan2.f6457.5
Simplified57.5%
if 3.50000000000000017e-16 < y.re < 7.00000000000000033e208Initial program 44.6%
Taylor expanded in y.im around 0
*-lowering-*.f64N/A
atan2-lowering-atan2.f6478.8
Simplified78.8%
exp-diffN/A
clear-numN/A
/-lowering-/.f64N/A
div-expN/A
exp-lowering-exp.f64N/A
--lowering--.f64N/A
+-lft-identityN/A
+-commutativeN/A
accelerator-lowering-fma.f64N/A
atan2-lowering-atan2.f64N/A
*-commutativeN/A
pow1/2N/A
log-powN/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
log-lowering-log.f64N/A
+-commutativeN/A
Applied egg-rr78.8%
if 7.00000000000000033e208 < y.re Initial program 30.8%
Taylor expanded in y.im around 0
*-lowering-*.f64N/A
atan2-lowering-atan2.f6438.5
Simplified38.5%
exp-diffN/A
clear-numN/A
/-lowering-/.f64N/A
div-expN/A
exp-lowering-exp.f64N/A
--lowering--.f64N/A
+-lft-identityN/A
+-commutativeN/A
accelerator-lowering-fma.f64N/A
atan2-lowering-atan2.f64N/A
*-commutativeN/A
pow1/2N/A
log-powN/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
log-lowering-log.f64N/A
+-commutativeN/A
Applied egg-rr38.5%
associate-*l/N/A
frac-2negN/A
/-lowering-/.f64N/A
*-lft-identityN/A
neg-lowering-neg.f64N/A
sin-lowering-sin.f64N/A
+-lft-identityN/A
+-commutativeN/A
*-commutativeN/A
accelerator-lowering-fma.f64N/A
atan2-lowering-atan2.f64N/A
neg-sub0N/A
--lowering--.f64N/A
Applied egg-rr76.9%
Taylor expanded in y.im around 0
exp-lowering-exp.f64N/A
associate-*r*N/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
log-lowering-log.f64N/A
unpow2N/A
accelerator-lowering-fma.f64N/A
unpow2N/A
*-lowering-*.f6476.9
Simplified76.9%
Final simplification60.6%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (* (atan2 x.im x.re) y.im))
(t_1
(*
(sin (* y.re (atan2 x.im x.re)))
(exp (- (* y.re (log (sqrt (+ (* x.re x.re) (* x.im x.im))))) t_0))))
(t_2 (sin (fma (atan2 x.im x.re) y.re 0.0))))
(if (<= y.re -4.1e-7)
t_1
(if (<= y.re 3.2e-16)
(/ t_2 (exp t_0))
(if (<= y.re 1.1e+212)
t_1
(/
t_2
(exp (* (log (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 t_0 = atan2(x_46_im, x_46_re) * y_46_im;
double t_1 = sin((y_46_re * atan2(x_46_im, x_46_re))) * exp(((y_46_re * log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))) - t_0));
double t_2 = sin(fma(atan2(x_46_im, x_46_re), y_46_re, 0.0));
double tmp;
if (y_46_re <= -4.1e-7) {
tmp = t_1;
} else if (y_46_re <= 3.2e-16) {
tmp = t_2 / exp(t_0);
} else if (y_46_re <= 1.1e+212) {
tmp = t_1;
} else {
tmp = t_2 / exp((log(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) t_0 = Float64(atan(x_46_im, x_46_re) * y_46_im) t_1 = Float64(sin(Float64(y_46_re * atan(x_46_im, x_46_re))) * exp(Float64(Float64(y_46_re * log(sqrt(Float64(Float64(x_46_re * x_46_re) + Float64(x_46_im * x_46_im))))) - t_0))) t_2 = sin(fma(atan(x_46_im, x_46_re), y_46_re, 0.0)) tmp = 0.0 if (y_46_re <= -4.1e-7) tmp = t_1; elseif (y_46_re <= 3.2e-16) tmp = Float64(t_2 / exp(t_0)); elseif (y_46_re <= 1.1e+212) tmp = t_1; else tmp = Float64(t_2 / exp(Float64(log(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_] := Block[{t$95$0 = N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$im), $MachinePrecision]}, Block[{t$95$1 = N[(N[Sin[N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Exp[N[(N[(y$46$re * N[Log[N[Sqrt[N[(N[(x$46$re * x$46$re), $MachinePrecision] + N[(x$46$im * x$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[Sin[N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$re + 0.0), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[y$46$re, -4.1e-7], t$95$1, If[LessEqual[y$46$re, 3.2e-16], N[(t$95$2 / N[Exp[t$95$0], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$re, 1.1e+212], t$95$1, N[(t$95$2 / N[Exp[N[(N[Log[N[(x$46$im * x$46$im + N[(x$46$re * x$46$re), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(y$46$re * -0.5), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im\\
t_1 := \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot e^{y.re \cdot \log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) - t\_0}\\
t_2 := \sin \left(\mathsf{fma}\left(\tan^{-1}_* \frac{x.im}{x.re}, y.re, 0\right)\right)\\
\mathbf{if}\;y.re \leq -4.1 \cdot 10^{-7}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y.re \leq 3.2 \cdot 10^{-16}:\\
\;\;\;\;\frac{t\_2}{e^{t\_0}}\\
\mathbf{elif}\;y.re \leq 1.1 \cdot 10^{+212}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;\frac{t\_2}{e^{\log \left(\mathsf{fma}\left(x.im, x.im, x.re \cdot x.re\right)\right) \cdot \left(y.re \cdot -0.5\right)}}\\
\end{array}
\end{array}
if y.re < -4.0999999999999999e-7 or 3.20000000000000023e-16 < y.re < 1.09999999999999998e212Initial program 44.0%
Taylor expanded in y.im around 0
*-lowering-*.f64N/A
atan2-lowering-atan2.f6478.3
Simplified78.3%
if -4.0999999999999999e-7 < y.re < 3.20000000000000023e-16Initial program 43.8%
Taylor expanded in y.im around 0
*-lowering-*.f64N/A
atan2-lowering-atan2.f6435.0
Simplified35.0%
exp-diffN/A
clear-numN/A
/-lowering-/.f64N/A
div-expN/A
exp-lowering-exp.f64N/A
--lowering--.f64N/A
+-lft-identityN/A
+-commutativeN/A
accelerator-lowering-fma.f64N/A
atan2-lowering-atan2.f64N/A
*-commutativeN/A
pow1/2N/A
log-powN/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
log-lowering-log.f64N/A
+-commutativeN/A
Applied egg-rr35.0%
associate-*l/N/A
frac-2negN/A
/-lowering-/.f64N/A
*-lft-identityN/A
neg-lowering-neg.f64N/A
sin-lowering-sin.f64N/A
+-lft-identityN/A
+-commutativeN/A
*-commutativeN/A
accelerator-lowering-fma.f64N/A
atan2-lowering-atan2.f64N/A
neg-sub0N/A
--lowering--.f64N/A
Applied egg-rr42.5%
Taylor expanded in y.re around 0
exp-lowering-exp.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
atan2-lowering-atan2.f6457.5
Simplified57.5%
if 1.09999999999999998e212 < y.re Initial program 30.8%
Taylor expanded in y.im around 0
*-lowering-*.f64N/A
atan2-lowering-atan2.f6438.5
Simplified38.5%
exp-diffN/A
clear-numN/A
/-lowering-/.f64N/A
div-expN/A
exp-lowering-exp.f64N/A
--lowering--.f64N/A
+-lft-identityN/A
+-commutativeN/A
accelerator-lowering-fma.f64N/A
atan2-lowering-atan2.f64N/A
*-commutativeN/A
pow1/2N/A
log-powN/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
log-lowering-log.f64N/A
+-commutativeN/A
Applied egg-rr38.5%
associate-*l/N/A
frac-2negN/A
/-lowering-/.f64N/A
*-lft-identityN/A
neg-lowering-neg.f64N/A
sin-lowering-sin.f64N/A
+-lft-identityN/A
+-commutativeN/A
*-commutativeN/A
accelerator-lowering-fma.f64N/A
atan2-lowering-atan2.f64N/A
neg-sub0N/A
--lowering--.f64N/A
Applied egg-rr76.9%
Taylor expanded in y.im around 0
exp-lowering-exp.f64N/A
associate-*r*N/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
log-lowering-log.f64N/A
unpow2N/A
accelerator-lowering-fma.f64N/A
unpow2N/A
*-lowering-*.f6476.9
Simplified76.9%
Final simplification60.6%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (* y.re (atan2 x.im x.re))))
(if (<= x.re -52000000000.0)
(*
(exp (- (* (log (- 0.0 x.re)) y.re) (* (atan2 x.im x.re) y.im)))
(sin t_0))
(if (<= x.re 1.85e-48)
(/
(sin (fma (atan2 x.im x.re) y.re 0.0))
(exp
(fma
(* y.re (- 0.0 0.5))
(log (fma x.im x.im (* x.re x.re)))
(fma (atan2 x.im x.re) y.im 0.0))))
(* (sin (fma y.im (log x.re) 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 <= -52000000000.0) {
tmp = exp(((log((0.0 - x_46_re)) * y_46_re) - (atan2(x_46_im, x_46_re) * y_46_im))) * sin(t_0);
} else if (x_46_re <= 1.85e-48) {
tmp = sin(fma(atan2(x_46_im, x_46_re), y_46_re, 0.0)) / exp(fma((y_46_re * (0.0 - 0.5)), log(fma(x_46_im, x_46_im, (x_46_re * x_46_re))), fma(atan2(x_46_im, x_46_re), y_46_im, 0.0)));
} else {
tmp = sin(fma(y_46_im, log(x_46_re), 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 <= -52000000000.0) tmp = Float64(exp(Float64(Float64(log(Float64(0.0 - x_46_re)) * y_46_re) - Float64(atan(x_46_im, x_46_re) * y_46_im))) * sin(t_0)); elseif (x_46_re <= 1.85e-48) tmp = Float64(sin(fma(atan(x_46_im, x_46_re), y_46_re, 0.0)) / exp(fma(Float64(y_46_re * Float64(0.0 - 0.5)), log(fma(x_46_im, x_46_im, Float64(x_46_re * x_46_re))), fma(atan(x_46_im, x_46_re), y_46_im, 0.0)))); else tmp = Float64(sin(fma(y_46_im, log(x_46_re), 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, -52000000000.0], N[(N[Exp[N[(N[(N[Log[N[(0.0 - x$46$re), $MachinePrecision]], $MachinePrecision] * y$46$re), $MachinePrecision] - N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Sin[t$95$0], $MachinePrecision]), $MachinePrecision], If[LessEqual[x$46$re, 1.85e-48], N[(N[Sin[N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$re + 0.0), $MachinePrecision]], $MachinePrecision] / N[Exp[N[(N[(y$46$re * N[(0.0 - 0.5), $MachinePrecision]), $MachinePrecision] * N[Log[N[(x$46$im * x$46$im + N[(x$46$re * x$46$re), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] + N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$im + 0.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(N[Sin[N[(y$46$im * N[Log[x$46$re], $MachinePrecision] + t$95$0), $MachinePrecision]], $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 -52000000000:\\
\;\;\;\;e^{\log \left(0 - x.re\right) \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \sin t\_0\\
\mathbf{elif}\;x.re \leq 1.85 \cdot 10^{-48}:\\
\;\;\;\;\frac{\sin \left(\mathsf{fma}\left(\tan^{-1}_* \frac{x.im}{x.re}, y.re, 0\right)\right)}{e^{\mathsf{fma}\left(y.re \cdot \left(0 - 0.5\right), \log \left(\mathsf{fma}\left(x.im, x.im, x.re \cdot x.re\right)\right), \mathsf{fma}\left(\tan^{-1}_* \frac{x.im}{x.re}, y.im, 0\right)\right)}}\\
\mathbf{else}:\\
\;\;\;\;\sin \left(\mathsf{fma}\left(y.im, \log x.re, t\_0\right)\right) \cdot {x.re}^{y.re}\\
\end{array}
\end{array}
if x.re < -5.2e10Initial program 30.0%
Taylor expanded in y.im around 0
*-lowering-*.f64N/A
atan2-lowering-atan2.f6454.3
Simplified54.3%
Taylor expanded in x.re around -inf
mul-1-negN/A
neg-lowering-neg.f6472.0
Simplified72.0%
if -5.2e10 < x.re < 1.8499999999999999e-48Initial program 52.1%
Taylor expanded in y.im around 0
*-lowering-*.f64N/A
atan2-lowering-atan2.f6455.3
Simplified55.3%
exp-diffN/A
clear-numN/A
/-lowering-/.f64N/A
div-expN/A
exp-lowering-exp.f64N/A
--lowering--.f64N/A
+-lft-identityN/A
+-commutativeN/A
accelerator-lowering-fma.f64N/A
atan2-lowering-atan2.f64N/A
*-commutativeN/A
pow1/2N/A
log-powN/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
log-lowering-log.f64N/A
+-commutativeN/A
Applied egg-rr55.3%
associate-*l/N/A
frac-2negN/A
/-lowering-/.f64N/A
*-lft-identityN/A
neg-lowering-neg.f64N/A
sin-lowering-sin.f64N/A
+-lft-identityN/A
+-commutativeN/A
*-commutativeN/A
accelerator-lowering-fma.f64N/A
atan2-lowering-atan2.f64N/A
neg-sub0N/A
--lowering--.f64N/A
Applied egg-rr65.6%
if 1.8499999999999999e-48 < x.re Initial program 37.9%
Taylor expanded in x.re around inf
mul-1-negN/A
distribute-rgt-neg-inN/A
log-recN/A
remove-double-negN/A
accelerator-lowering-fma.f64N/A
log-lowering-log.f64N/A
+-commutativeN/A
accelerator-lowering-fma.f64N/A
atan2-lowering-atan2.f64N/A
associate-*r/N/A
/-lowering-/.f64N/A
associate-*r*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6451.2
Simplified51.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-*.f6447.5
Simplified47.5%
Taylor expanded in x.im around 0
*-lowering-*.f64N/A
sin-lowering-sin.f64N/A
accelerator-lowering-fma.f64N/A
log-lowering-log.f64N/A
*-lowering-*.f64N/A
atan2-lowering-atan2.f64N/A
pow-lowering-pow.f6468.0
Simplified68.0%
Final simplification63.1%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (exp (* (log (fma x.im x.im (* x.re x.re))) (* y.re -0.5))))
(t_1 (* (atan2 x.im x.re) y.im))
(t_2 (* y.re (atan2 x.im x.re)))
(t_3 (sin (fma (atan2 x.im x.re) y.re 0.0))))
(if (<= y.re -1e-6)
(*
t_2
(exp (- (* y.re (log (sqrt (+ (* x.re x.re) (* x.im x.im))))) t_1)))
(if (<= y.re 1.28e-14)
(/ t_3 (exp t_1))
(if (<= y.re 2e+206) (/ (sin t_2) t_0) (/ t_3 t_0))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = exp((log(fma(x_46_im, x_46_im, (x_46_re * x_46_re))) * (y_46_re * -0.5)));
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 = sin(fma(atan2(x_46_im, x_46_re), y_46_re, 0.0));
double tmp;
if (y_46_re <= -1e-6) {
tmp = t_2 * exp(((y_46_re * log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))) - t_1));
} else if (y_46_re <= 1.28e-14) {
tmp = t_3 / exp(t_1);
} else if (y_46_re <= 2e+206) {
tmp = sin(t_2) / t_0;
} else {
tmp = t_3 / t_0;
}
return tmp;
}
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = exp(Float64(log(fma(x_46_im, x_46_im, Float64(x_46_re * x_46_re))) * Float64(y_46_re * -0.5))) 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 = sin(fma(atan(x_46_im, x_46_re), y_46_re, 0.0)) tmp = 0.0 if (y_46_re <= -1e-6) tmp = Float64(t_2 * exp(Float64(Float64(y_46_re * log(sqrt(Float64(Float64(x_46_re * x_46_re) + Float64(x_46_im * x_46_im))))) - t_1))); elseif (y_46_re <= 1.28e-14) tmp = Float64(t_3 / exp(t_1)); elseif (y_46_re <= 2e+206) tmp = Float64(sin(t_2) / t_0); else tmp = Float64(t_3 / t_0); end return tmp end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[Exp[N[(N[Log[N[(x$46$im * x$46$im + N[(x$46$re * x$46$re), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(y$46$re * -0.5), $MachinePrecision]), $MachinePrecision]], $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[Sin[N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$re + 0.0), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[y$46$re, -1e-6], N[(t$95$2 * N[Exp[N[(N[(y$46$re * N[Log[N[Sqrt[N[(N[(x$46$re * x$46$re), $MachinePrecision] + N[(x$46$im * x$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$re, 1.28e-14], N[(t$95$3 / N[Exp[t$95$1], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$re, 2e+206], N[(N[Sin[t$95$2], $MachinePrecision] / t$95$0), $MachinePrecision], N[(t$95$3 / t$95$0), $MachinePrecision]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := e^{\log \left(\mathsf{fma}\left(x.im, x.im, x.re \cdot x.re\right)\right) \cdot \left(y.re \cdot -0.5\right)}\\
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 := \sin \left(\mathsf{fma}\left(\tan^{-1}_* \frac{x.im}{x.re}, y.re, 0\right)\right)\\
\mathbf{if}\;y.re \leq -1 \cdot 10^{-6}:\\
\;\;\;\;t\_2 \cdot e^{y.re \cdot \log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) - t\_1}\\
\mathbf{elif}\;y.re \leq 1.28 \cdot 10^{-14}:\\
\;\;\;\;\frac{t\_3}{e^{t\_1}}\\
\mathbf{elif}\;y.re \leq 2 \cdot 10^{+206}:\\
\;\;\;\;\frac{\sin t\_2}{t\_0}\\
\mathbf{else}:\\
\;\;\;\;\frac{t\_3}{t\_0}\\
\end{array}
\end{array}
if y.re < -9.99999999999999955e-7Initial program 43.5%
Taylor expanded in y.im around 0
*-lowering-*.f64N/A
atan2-lowering-atan2.f6478.0
Simplified78.0%
Taylor expanded in y.re around 0
*-lowering-*.f64N/A
atan2-lowering-atan2.f6475.9
Simplified75.9%
if -9.99999999999999955e-7 < y.re < 1.28e-14Initial program 44.2%
Taylor expanded in y.im around 0
*-lowering-*.f64N/A
atan2-lowering-atan2.f6435.5
Simplified35.5%
exp-diffN/A
clear-numN/A
/-lowering-/.f64N/A
div-expN/A
exp-lowering-exp.f64N/A
--lowering--.f64N/A
+-lft-identityN/A
+-commutativeN/A
accelerator-lowering-fma.f64N/A
atan2-lowering-atan2.f64N/A
*-commutativeN/A
pow1/2N/A
log-powN/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
log-lowering-log.f64N/A
+-commutativeN/A
Applied egg-rr35.5%
associate-*l/N/A
frac-2negN/A
/-lowering-/.f64N/A
*-lft-identityN/A
neg-lowering-neg.f64N/A
sin-lowering-sin.f64N/A
+-lft-identityN/A
+-commutativeN/A
*-commutativeN/A
accelerator-lowering-fma.f64N/A
atan2-lowering-atan2.f64N/A
neg-sub0N/A
--lowering--.f64N/A
Applied egg-rr42.9%
Taylor expanded in y.re around 0
exp-lowering-exp.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
atan2-lowering-atan2.f6457.9
Simplified57.9%
if 1.28e-14 < y.re < 2.0000000000000001e206Initial program 43.4%
Taylor expanded in y.im around 0
*-lowering-*.f64N/A
atan2-lowering-atan2.f6478.3
Simplified78.3%
exp-diffN/A
clear-numN/A
/-lowering-/.f64N/A
div-expN/A
exp-lowering-exp.f64N/A
--lowering--.f64N/A
+-lft-identityN/A
+-commutativeN/A
accelerator-lowering-fma.f64N/A
atan2-lowering-atan2.f64N/A
*-commutativeN/A
pow1/2N/A
log-powN/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
log-lowering-log.f64N/A
+-commutativeN/A
Applied egg-rr78.3%
Taylor expanded in y.im around 0
/-lowering-/.f64N/A
sin-lowering-sin.f64N/A
*-lowering-*.f64N/A
atan2-lowering-atan2.f64N/A
exp-lowering-exp.f64N/A
distribute-lft-neg-inN/A
metadata-evalN/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-*.f6474.0
Simplified74.0%
if 2.0000000000000001e206 < y.re Initial program 30.8%
Taylor expanded in y.im around 0
*-lowering-*.f64N/A
atan2-lowering-atan2.f6438.5
Simplified38.5%
exp-diffN/A
clear-numN/A
/-lowering-/.f64N/A
div-expN/A
exp-lowering-exp.f64N/A
--lowering--.f64N/A
+-lft-identityN/A
+-commutativeN/A
accelerator-lowering-fma.f64N/A
atan2-lowering-atan2.f64N/A
*-commutativeN/A
pow1/2N/A
log-powN/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
log-lowering-log.f64N/A
+-commutativeN/A
Applied egg-rr38.5%
associate-*l/N/A
frac-2negN/A
/-lowering-/.f64N/A
*-lft-identityN/A
neg-lowering-neg.f64N/A
sin-lowering-sin.f64N/A
+-lft-identityN/A
+-commutativeN/A
*-commutativeN/A
accelerator-lowering-fma.f64N/A
atan2-lowering-atan2.f64N/A
neg-sub0N/A
--lowering--.f64N/A
Applied egg-rr76.9%
Taylor expanded in y.im around 0
exp-lowering-exp.f64N/A
associate-*r*N/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
log-lowering-log.f64N/A
unpow2N/A
accelerator-lowering-fma.f64N/A
unpow2N/A
*-lowering-*.f6476.9
Simplified76.9%
Final simplification59.3%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (sin (fma (atan2 x.im x.re) y.re 0.0)))
(t_1 (exp (* (log (fma x.im x.im (* x.re x.re))) (* y.re -0.5))))
(t_2 (/ t_0 t_1)))
(if (<= y.re -1.1e-5)
t_2
(if (<= y.re 1.28e-14)
(/ t_0 (exp (* (atan2 x.im x.re) y.im)))
(if (<= y.re 5.2e+209) (/ (sin (* y.re (atan2 x.im 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 = sin(fma(atan2(x_46_im, x_46_re), y_46_re, 0.0));
double t_1 = exp((log(fma(x_46_im, x_46_im, (x_46_re * x_46_re))) * (y_46_re * -0.5)));
double t_2 = t_0 / t_1;
double tmp;
if (y_46_re <= -1.1e-5) {
tmp = t_2;
} else if (y_46_re <= 1.28e-14) {
tmp = t_0 / exp((atan2(x_46_im, x_46_re) * y_46_im));
} else if (y_46_re <= 5.2e+209) {
tmp = sin((y_46_re * atan2(x_46_im, x_46_re))) / t_1;
} else {
tmp = t_2;
}
return tmp;
}
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = sin(fma(atan(x_46_im, x_46_re), y_46_re, 0.0)) t_1 = exp(Float64(log(fma(x_46_im, x_46_im, Float64(x_46_re * x_46_re))) * Float64(y_46_re * -0.5))) t_2 = Float64(t_0 / t_1) tmp = 0.0 if (y_46_re <= -1.1e-5) tmp = t_2; elseif (y_46_re <= 1.28e-14) tmp = Float64(t_0 / exp(Float64(atan(x_46_im, x_46_re) * y_46_im))); elseif (y_46_re <= 5.2e+209) tmp = Float64(sin(Float64(y_46_re * atan(x_46_im, x_46_re))) / 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[Sin[N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$re + 0.0), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$1 = N[Exp[N[(N[Log[N[(x$46$im * x$46$im + N[(x$46$re * x$46$re), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(y$46$re * -0.5), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$2 = N[(t$95$0 / t$95$1), $MachinePrecision]}, If[LessEqual[y$46$re, -1.1e-5], t$95$2, If[LessEqual[y$46$re, 1.28e-14], N[(t$95$0 / N[Exp[N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$im), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$re, 5.2e+209], N[(N[Sin[N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / t$95$1), $MachinePrecision], t$95$2]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \sin \left(\mathsf{fma}\left(\tan^{-1}_* \frac{x.im}{x.re}, y.re, 0\right)\right)\\
t_1 := e^{\log \left(\mathsf{fma}\left(x.im, x.im, x.re \cdot x.re\right)\right) \cdot \left(y.re \cdot -0.5\right)}\\
t_2 := \frac{t\_0}{t\_1}\\
\mathbf{if}\;y.re \leq -1.1 \cdot 10^{-5}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;y.re \leq 1.28 \cdot 10^{-14}:\\
\;\;\;\;\frac{t\_0}{e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}}\\
\mathbf{elif}\;y.re \leq 5.2 \cdot 10^{+209}:\\
\;\;\;\;\frac{\sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)}{t\_1}\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if y.re < -1.1e-5 or 5.2000000000000001e209 < y.re Initial program 39.8%
Taylor expanded in y.im around 0
*-lowering-*.f64N/A
atan2-lowering-atan2.f6466.4
Simplified66.4%
exp-diffN/A
clear-numN/A
/-lowering-/.f64N/A
div-expN/A
exp-lowering-exp.f64N/A
--lowering--.f64N/A
+-lft-identityN/A
+-commutativeN/A
accelerator-lowering-fma.f64N/A
atan2-lowering-atan2.f64N/A
*-commutativeN/A
pow1/2N/A
log-powN/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
log-lowering-log.f64N/A
+-commutativeN/A
Applied egg-rr66.4%
associate-*l/N/A
frac-2negN/A
/-lowering-/.f64N/A
*-lft-identityN/A
neg-lowering-neg.f64N/A
sin-lowering-sin.f64N/A
+-lft-identityN/A
+-commutativeN/A
*-commutativeN/A
accelerator-lowering-fma.f64N/A
atan2-lowering-atan2.f64N/A
neg-sub0N/A
--lowering--.f64N/A
Applied egg-rr77.7%
Taylor expanded in y.im around 0
exp-lowering-exp.f64N/A
associate-*r*N/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
log-lowering-log.f64N/A
unpow2N/A
accelerator-lowering-fma.f64N/A
unpow2N/A
*-lowering-*.f6474.4
Simplified74.4%
if -1.1e-5 < y.re < 1.28e-14Initial program 44.2%
Taylor expanded in y.im around 0
*-lowering-*.f64N/A
atan2-lowering-atan2.f6435.5
Simplified35.5%
exp-diffN/A
clear-numN/A
/-lowering-/.f64N/A
div-expN/A
exp-lowering-exp.f64N/A
--lowering--.f64N/A
+-lft-identityN/A
+-commutativeN/A
accelerator-lowering-fma.f64N/A
atan2-lowering-atan2.f64N/A
*-commutativeN/A
pow1/2N/A
log-powN/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
log-lowering-log.f64N/A
+-commutativeN/A
Applied egg-rr35.5%
associate-*l/N/A
frac-2negN/A
/-lowering-/.f64N/A
*-lft-identityN/A
neg-lowering-neg.f64N/A
sin-lowering-sin.f64N/A
+-lft-identityN/A
+-commutativeN/A
*-commutativeN/A
accelerator-lowering-fma.f64N/A
atan2-lowering-atan2.f64N/A
neg-sub0N/A
--lowering--.f64N/A
Applied egg-rr42.9%
Taylor expanded in y.re around 0
exp-lowering-exp.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
atan2-lowering-atan2.f6457.9
Simplified57.9%
if 1.28e-14 < y.re < 5.2000000000000001e209Initial program 43.4%
Taylor expanded in y.im around 0
*-lowering-*.f64N/A
atan2-lowering-atan2.f6478.3
Simplified78.3%
exp-diffN/A
clear-numN/A
/-lowering-/.f64N/A
div-expN/A
exp-lowering-exp.f64N/A
--lowering--.f64N/A
+-lft-identityN/A
+-commutativeN/A
accelerator-lowering-fma.f64N/A
atan2-lowering-atan2.f64N/A
*-commutativeN/A
pow1/2N/A
log-powN/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
log-lowering-log.f64N/A
+-commutativeN/A
Applied egg-rr78.3%
Taylor expanded in y.im around 0
/-lowering-/.f64N/A
sin-lowering-sin.f64N/A
*-lowering-*.f64N/A
atan2-lowering-atan2.f64N/A
exp-lowering-exp.f64N/A
distribute-lft-neg-inN/A
metadata-evalN/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-*.f6474.0
Simplified74.0%
Final simplification58.3%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (fma x.im x.im (* x.re x.re)))
(t_1 (sin (* y.re (atan2 x.im x.re)))))
(if (<= y.re -9.5e-6)
(* t_1 (pow (sqrt t_0) y.re))
(if (<= y.re 1.28e-14)
(/
(sin (fma (atan2 x.im x.re) y.re 0.0))
(exp (* (atan2 x.im x.re) y.im)))
(/ t_1 (exp (* (log t_0) (* 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 = fma(x_46_im, x_46_im, (x_46_re * x_46_re));
double t_1 = sin((y_46_re * atan2(x_46_im, x_46_re)));
double tmp;
if (y_46_re <= -9.5e-6) {
tmp = t_1 * pow(sqrt(t_0), y_46_re);
} else if (y_46_re <= 1.28e-14) {
tmp = sin(fma(atan2(x_46_im, x_46_re), y_46_re, 0.0)) / exp((atan2(x_46_im, x_46_re) * y_46_im));
} else {
tmp = t_1 / exp((log(t_0) * (y_46_re * -0.5)));
}
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)) t_1 = sin(Float64(y_46_re * atan(x_46_im, x_46_re))) tmp = 0.0 if (y_46_re <= -9.5e-6) tmp = Float64(t_1 * (sqrt(t_0) ^ y_46_re)); elseif (y_46_re <= 1.28e-14) tmp = Float64(sin(fma(atan(x_46_im, x_46_re), y_46_re, 0.0)) / exp(Float64(atan(x_46_im, x_46_re) * y_46_im))); else tmp = Float64(t_1 / exp(Float64(log(t_0) * 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[(x$46$im * x$46$im + N[(x$46$re * x$46$re), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[Sin[N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[y$46$re, -9.5e-6], N[(t$95$1 * N[Power[N[Sqrt[t$95$0], $MachinePrecision], y$46$re], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$re, 1.28e-14], N[(N[Sin[N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$re + 0.0), $MachinePrecision]], $MachinePrecision] / N[Exp[N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$im), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(t$95$1 / N[Exp[N[(N[Log[t$95$0], $MachinePrecision] * N[(y$46$re * -0.5), $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)\\
t_1 := \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\\
\mathbf{if}\;y.re \leq -9.5 \cdot 10^{-6}:\\
\;\;\;\;t\_1 \cdot {\left(\sqrt{t\_0}\right)}^{y.re}\\
\mathbf{elif}\;y.re \leq 1.28 \cdot 10^{-14}:\\
\;\;\;\;\frac{\sin \left(\mathsf{fma}\left(\tan^{-1}_* \frac{x.im}{x.re}, y.re, 0\right)\right)}{e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}}\\
\mathbf{else}:\\
\;\;\;\;\frac{t\_1}{e^{\log t\_0 \cdot \left(y.re \cdot -0.5\right)}}\\
\end{array}
\end{array}
if y.re < -9.5000000000000005e-6Initial program 43.5%
Taylor expanded in y.im around 0
*-lowering-*.f64N/A
atan2-lowering-atan2.f6478.0
Simplified78.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-*.f6471.8
Simplified71.8%
if -9.5000000000000005e-6 < y.re < 1.28e-14Initial program 44.2%
Taylor expanded in y.im around 0
*-lowering-*.f64N/A
atan2-lowering-atan2.f6435.5
Simplified35.5%
exp-diffN/A
clear-numN/A
/-lowering-/.f64N/A
div-expN/A
exp-lowering-exp.f64N/A
--lowering--.f64N/A
+-lft-identityN/A
+-commutativeN/A
accelerator-lowering-fma.f64N/A
atan2-lowering-atan2.f64N/A
*-commutativeN/A
pow1/2N/A
log-powN/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
log-lowering-log.f64N/A
+-commutativeN/A
Applied egg-rr35.5%
associate-*l/N/A
frac-2negN/A
/-lowering-/.f64N/A
*-lft-identityN/A
neg-lowering-neg.f64N/A
sin-lowering-sin.f64N/A
+-lft-identityN/A
+-commutativeN/A
*-commutativeN/A
accelerator-lowering-fma.f64N/A
atan2-lowering-atan2.f64N/A
neg-sub0N/A
--lowering--.f64N/A
Applied egg-rr42.9%
Taylor expanded in y.re around 0
exp-lowering-exp.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
atan2-lowering-atan2.f6457.9
Simplified57.9%
if 1.28e-14 < y.re Initial program 38.9%
Taylor expanded in y.im around 0
*-lowering-*.f64N/A
atan2-lowering-atan2.f6463.9
Simplified63.9%
exp-diffN/A
clear-numN/A
/-lowering-/.f64N/A
div-expN/A
exp-lowering-exp.f64N/A
--lowering--.f64N/A
+-lft-identityN/A
+-commutativeN/A
accelerator-lowering-fma.f64N/A
atan2-lowering-atan2.f64N/A
*-commutativeN/A
pow1/2N/A
log-powN/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
log-lowering-log.f64N/A
+-commutativeN/A
Applied egg-rr63.9%
Taylor expanded in y.im around 0
/-lowering-/.f64N/A
sin-lowering-sin.f64N/A
*-lowering-*.f64N/A
atan2-lowering-atan2.f64N/A
exp-lowering-exp.f64N/A
distribute-lft-neg-inN/A
metadata-evalN/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-*.f6461.2
Simplified61.2%
Final simplification58.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 -1.1e-5)
t_0
(if (<= y.re 1.28e-14)
(/
(sin (fma (atan2 x.im x.re) y.re 0.0))
(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 = 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 <= -1.1e-5) {
tmp = t_0;
} else if (y_46_re <= 1.28e-14) {
tmp = sin(fma(atan2(x_46_im, x_46_re), y_46_re, 0.0)) / 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(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 <= -1.1e-5) tmp = t_0; elseif (y_46_re <= 1.28e-14) tmp = Float64(sin(fma(atan(x_46_im, x_46_re), y_46_re, 0.0)) / exp(Float64(atan(x_46_im, x_46_re) * 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[(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, -1.1e-5], t$95$0, If[LessEqual[y$46$re, 1.28e-14], N[(N[Sin[N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$re + 0.0), $MachinePrecision]], $MachinePrecision] / N[Exp[N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$im), $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 -1.1 \cdot 10^{-5}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;y.re \leq 1.28 \cdot 10^{-14}:\\
\;\;\;\;\frac{\sin \left(\mathsf{fma}\left(\tan^{-1}_* \frac{x.im}{x.re}, y.re, 0\right)\right)}{e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}}\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
if y.re < -1.1e-5 or 1.28e-14 < y.re Initial program 41.0%
Taylor expanded in y.im around 0
*-lowering-*.f64N/A
atan2-lowering-atan2.f6470.5
Simplified70.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-*.f6466.1
Simplified66.1%
if -1.1e-5 < y.re < 1.28e-14Initial program 44.2%
Taylor expanded in y.im around 0
*-lowering-*.f64N/A
atan2-lowering-atan2.f6435.5
Simplified35.5%
exp-diffN/A
clear-numN/A
/-lowering-/.f64N/A
div-expN/A
exp-lowering-exp.f64N/A
--lowering--.f64N/A
+-lft-identityN/A
+-commutativeN/A
accelerator-lowering-fma.f64N/A
atan2-lowering-atan2.f64N/A
*-commutativeN/A
pow1/2N/A
log-powN/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
log-lowering-log.f64N/A
+-commutativeN/A
Applied egg-rr35.5%
associate-*l/N/A
frac-2negN/A
/-lowering-/.f64N/A
*-lft-identityN/A
neg-lowering-neg.f64N/A
sin-lowering-sin.f64N/A
+-lft-identityN/A
+-commutativeN/A
*-commutativeN/A
accelerator-lowering-fma.f64N/A
atan2-lowering-atan2.f64N/A
neg-sub0N/A
--lowering--.f64N/A
Applied egg-rr42.9%
Taylor expanded in y.re around 0
exp-lowering-exp.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
atan2-lowering-atan2.f6457.9
Simplified57.9%
Final simplification58.3%
(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 -1.1e-5)
t_1
(if (<= y.re 1.28e-14)
(* t_0 (exp (* (atan2 x.im x.re) (- 0.0 y.im))))
t_1))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = 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 <= -1.1e-5) {
tmp = t_1;
} else if (y_46_re <= 1.28e-14) {
tmp = t_0 * exp((atan2(x_46_im, x_46_re) * (0.0 - y_46_im)));
} 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 <= -1.1e-5) tmp = t_1; elseif (y_46_re <= 1.28e-14) tmp = Float64(t_0 * exp(Float64(atan(x_46_im, x_46_re) * Float64(0.0 - y_46_im)))); 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, -1.1e-5], t$95$1, If[LessEqual[y$46$re, 1.28e-14], N[(t$95$0 * N[Exp[N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * N[(0.0 - y$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $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 -1.1 \cdot 10^{-5}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y.re \leq 1.28 \cdot 10^{-14}:\\
\;\;\;\;t\_0 \cdot e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot \left(0 - y.im\right)}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if y.re < -1.1e-5 or 1.28e-14 < y.re Initial program 41.0%
Taylor expanded in y.im around 0
*-lowering-*.f64N/A
atan2-lowering-atan2.f6470.5
Simplified70.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-*.f6466.1
Simplified66.1%
if -1.1e-5 < y.re < 1.28e-14Initial program 44.2%
Taylor expanded in y.im around 0
*-lowering-*.f64N/A
atan2-lowering-atan2.f6435.5
Simplified35.5%
exp-diffN/A
clear-numN/A
/-lowering-/.f64N/A
div-expN/A
exp-lowering-exp.f64N/A
--lowering--.f64N/A
+-lft-identityN/A
+-commutativeN/A
accelerator-lowering-fma.f64N/A
atan2-lowering-atan2.f64N/A
*-commutativeN/A
pow1/2N/A
log-powN/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
log-lowering-log.f64N/A
+-commutativeN/A
Applied egg-rr35.5%
Taylor expanded in y.re around 0
rec-expN/A
exp-lowering-exp.f64N/A
distribute-rgt-neg-inN/A
mul-1-negN/A
*-lowering-*.f64N/A
mul-1-negN/A
neg-lowering-neg.f64N/A
atan2-lowering-atan2.f6449.6
Simplified49.6%
Final simplification58.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 -1.65e-6)
t_0
(if (<= y.re 1.28e-14)
(* y.re (* (atan2 x.im x.re) (exp (* (atan2 x.im x.re) (- 0.0 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 = 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 <= -1.65e-6) {
tmp = t_0;
} else if (y_46_re <= 1.28e-14) {
tmp = y_46_re * (atan2(x_46_im, x_46_re) * exp((atan2(x_46_im, x_46_re) * (0.0 - 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(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 <= -1.65e-6) tmp = t_0; elseif (y_46_re <= 1.28e-14) tmp = Float64(y_46_re * Float64(atan(x_46_im, x_46_re) * exp(Float64(atan(x_46_im, x_46_re) * Float64(0.0 - 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[(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, -1.65e-6], t$95$0, If[LessEqual[y$46$re, 1.28e-14], 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] * N[(0.0 - y$46$im), $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 -1.65 \cdot 10^{-6}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;y.re \leq 1.28 \cdot 10^{-14}:\\
\;\;\;\;y.re \cdot \left(\tan^{-1}_* \frac{x.im}{x.re} \cdot e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot \left(0 - y.im\right)}\right)\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
if y.re < -1.65000000000000008e-6 or 1.28e-14 < y.re Initial program 41.0%
Taylor expanded in y.im around 0
*-lowering-*.f64N/A
atan2-lowering-atan2.f6470.5
Simplified70.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-*.f6466.1
Simplified66.1%
if -1.65000000000000008e-6 < y.re < 1.28e-14Initial program 44.2%
Taylor expanded in y.im around 0
*-lowering-*.f64N/A
atan2-lowering-atan2.f6435.5
Simplified35.5%
Taylor expanded in y.re around 0
*-lowering-*.f64N/A
*-lowering-*.f64N/A
exp-lowering-exp.f64N/A
neg-sub0N/A
--lowering--.f64N/A
*-lowering-*.f64N/A
atan2-lowering-atan2.f64N/A
atan2-lowering-atan2.f6449.6
Simplified49.6%
Final simplification58.3%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(if (<= y.re -3e+148)
(*
(pow (sqrt (fma x.im x.im (* x.re x.re))) y.re)
(sin (/ (* 0.5 (* y.im (* x.im x.im))) (* x.re x.re))))
(if (<= y.re 3.7e+173)
(* y.re (* (atan2 x.im x.re) (exp (* (atan2 x.im x.re) (- 0.0 y.im)))))
(*
y.re
(fma
(* -0.16666666666666666 (* y.re y.re))
(pow (atan2 x.im x.re) 3.0)
(atan2 x.im x.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 <= -3e+148) {
tmp = pow(sqrt(fma(x_46_im, x_46_im, (x_46_re * x_46_re))), y_46_re) * sin(((0.5 * (y_46_im * (x_46_im * x_46_im))) / (x_46_re * x_46_re)));
} else if (y_46_re <= 3.7e+173) {
tmp = y_46_re * (atan2(x_46_im, x_46_re) * exp((atan2(x_46_im, x_46_re) * (0.0 - y_46_im))));
} else {
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));
}
return tmp;
}
function code(x_46_re, x_46_im, y_46_re, y_46_im) tmp = 0.0 if (y_46_re <= -3e+148) tmp = Float64((sqrt(fma(x_46_im, x_46_im, Float64(x_46_re * x_46_re))) ^ y_46_re) * sin(Float64(Float64(0.5 * Float64(y_46_im * Float64(x_46_im * x_46_im))) / Float64(x_46_re * x_46_re)))); elseif (y_46_re <= 3.7e+173) tmp = Float64(y_46_re * Float64(atan(x_46_im, x_46_re) * exp(Float64(atan(x_46_im, x_46_re) * Float64(0.0 - y_46_im))))); else 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))); end return tmp end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := If[LessEqual[y$46$re, -3e+148], N[(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] * N[Sin[N[(N[(0.5 * N[(y$46$im * N[(x$46$im * x$46$im), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(x$46$re * x$46$re), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$re, 3.7e+173], 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] * N[(0.0 - y$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 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]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y.re \leq -3 \cdot 10^{+148}:\\
\;\;\;\;{\left(\sqrt{\mathsf{fma}\left(x.im, x.im, x.re \cdot x.re\right)}\right)}^{y.re} \cdot \sin \left(\frac{0.5 \cdot \left(y.im \cdot \left(x.im \cdot x.im\right)\right)}{x.re \cdot x.re}\right)\\
\mathbf{elif}\;y.re \leq 3.7 \cdot 10^{+173}:\\
\;\;\;\;y.re \cdot \left(\tan^{-1}_* \frac{x.im}{x.re} \cdot e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot \left(0 - y.im\right)}\right)\\
\mathbf{else}:\\
\;\;\;\;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)\\
\end{array}
\end{array}
if y.re < -3.00000000000000015e148Initial program 42.3%
Taylor expanded in x.re around inf
mul-1-negN/A
distribute-rgt-neg-inN/A
log-recN/A
remove-double-negN/A
accelerator-lowering-fma.f64N/A
log-lowering-log.f64N/A
+-commutativeN/A
accelerator-lowering-fma.f64N/A
atan2-lowering-atan2.f64N/A
associate-*r/N/A
/-lowering-/.f64N/A
associate-*r*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6430.8
Simplified30.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-*.f6430.8
Simplified30.8%
Taylor expanded in x.re around 0
associate-*r/N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6446.2
Simplified46.2%
if -3.00000000000000015e148 < y.re < 3.69999999999999986e173Initial program 44.0%
Taylor expanded in y.im around 0
*-lowering-*.f64N/A
atan2-lowering-atan2.f6450.3
Simplified50.3%
Taylor expanded in y.re around 0
*-lowering-*.f64N/A
*-lowering-*.f64N/A
exp-lowering-exp.f64N/A
neg-sub0N/A
--lowering--.f64N/A
*-lowering-*.f64N/A
atan2-lowering-atan2.f64N/A
atan2-lowering-atan2.f6441.9
Simplified41.9%
if 3.69999999999999986e173 < y.re Initial program 35.1%
Taylor expanded in y.re around 0
mul-1-negN/A
neg-sub0N/A
--lowering--.f64N/A
*-lowering-*.f64N/A
atan2-lowering-atan2.f6411.7
Simplified11.7%
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.f6438.1
Simplified38.1%
Final simplification41.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)
(sin (/ (* 0.5 (* y.im (* x.im x.im))) (* x.re x.re))))))
(if (<= y.re -2.95e+147)
t_0
(if (<= y.re 8.8e+98)
(* y.re (* (atan2 x.im x.re) (exp (* (atan2 x.im x.re) (- 0.0 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 = pow(sqrt(fma(x_46_im, x_46_im, (x_46_re * x_46_re))), y_46_re) * sin(((0.5 * (y_46_im * (x_46_im * x_46_im))) / (x_46_re * x_46_re)));
double tmp;
if (y_46_re <= -2.95e+147) {
tmp = t_0;
} else if (y_46_re <= 8.8e+98) {
tmp = y_46_re * (atan2(x_46_im, x_46_re) * exp((atan2(x_46_im, x_46_re) * (0.0 - 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((sqrt(fma(x_46_im, x_46_im, Float64(x_46_re * x_46_re))) ^ y_46_re) * sin(Float64(Float64(0.5 * Float64(y_46_im * Float64(x_46_im * x_46_im))) / Float64(x_46_re * x_46_re)))) tmp = 0.0 if (y_46_re <= -2.95e+147) tmp = t_0; elseif (y_46_re <= 8.8e+98) tmp = Float64(y_46_re * Float64(atan(x_46_im, x_46_re) * exp(Float64(atan(x_46_im, x_46_re) * Float64(0.0 - 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[(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] * N[Sin[N[(N[(0.5 * N[(y$46$im * N[(x$46$im * x$46$im), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(x$46$re * x$46$re), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y$46$re, -2.95e+147], t$95$0, If[LessEqual[y$46$re, 8.8e+98], 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] * N[(0.0 - y$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$0]]]
\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} \cdot \sin \left(\frac{0.5 \cdot \left(y.im \cdot \left(x.im \cdot x.im\right)\right)}{x.re \cdot x.re}\right)\\
\mathbf{if}\;y.re \leq -2.95 \cdot 10^{+147}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;y.re \leq 8.8 \cdot 10^{+98}:\\
\;\;\;\;y.re \cdot \left(\tan^{-1}_* \frac{x.im}{x.re} \cdot e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot \left(0 - y.im\right)}\right)\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
if y.re < -2.9500000000000001e147 or 8.80000000000000034e98 < y.re Initial program 39.2%
Taylor expanded in x.re around inf
mul-1-negN/A
distribute-rgt-neg-inN/A
log-recN/A
remove-double-negN/A
accelerator-lowering-fma.f64N/A
log-lowering-log.f64N/A
+-commutativeN/A
accelerator-lowering-fma.f64N/A
atan2-lowering-atan2.f64N/A
associate-*r/N/A
/-lowering-/.f64N/A
associate-*r*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6422.8
Simplified22.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-*.f6422.8
Simplified22.8%
Taylor expanded in x.re around 0
associate-*r/N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6436.7
Simplified36.7%
if -2.9500000000000001e147 < y.re < 8.80000000000000034e98Initial program 44.0%
Taylor expanded in y.im around 0
*-lowering-*.f64N/A
atan2-lowering-atan2.f6447.5
Simplified47.5%
Taylor expanded in y.re around 0
*-lowering-*.f64N/A
*-lowering-*.f64N/A
exp-lowering-exp.f64N/A
neg-sub0N/A
--lowering--.f64N/A
*-lowering-*.f64N/A
atan2-lowering-atan2.f64N/A
atan2-lowering-atan2.f6443.3
Simplified43.3%
Final simplification41.3%
(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)
(sin (/ (* 0.5 (* y.im (* x.im x.im))) (* x.re x.re))))))
(if (<= y.re -9.5e-14)
t_0
(if (<= y.re 45000000000.0) (* 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 = pow(sqrt(fma(x_46_im, x_46_im, (x_46_re * x_46_re))), y_46_re) * sin(((0.5 * (y_46_im * (x_46_im * x_46_im))) / (x_46_re * x_46_re)));
double tmp;
if (y_46_re <= -9.5e-14) {
tmp = t_0;
} else if (y_46_re <= 45000000000.0) {
tmp = y_46_re * 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((sqrt(fma(x_46_im, x_46_im, Float64(x_46_re * x_46_re))) ^ y_46_re) * sin(Float64(Float64(0.5 * Float64(y_46_im * Float64(x_46_im * x_46_im))) / Float64(x_46_re * x_46_re)))) tmp = 0.0 if (y_46_re <= -9.5e-14) tmp = t_0; elseif (y_46_re <= 45000000000.0) tmp = Float64(y_46_re * 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[Power[N[Sqrt[N[(x$46$im * x$46$im + N[(x$46$re * x$46$re), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], y$46$re], $MachinePrecision] * N[Sin[N[(N[(0.5 * N[(y$46$im * N[(x$46$im * x$46$im), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(x$46$re * x$46$re), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y$46$re, -9.5e-14], t$95$0, If[LessEqual[y$46$re, 45000000000.0], N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision], t$95$0]]]
\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} \cdot \sin \left(\frac{0.5 \cdot \left(y.im \cdot \left(x.im \cdot x.im\right)\right)}{x.re \cdot x.re}\right)\\
\mathbf{if}\;y.re \leq -9.5 \cdot 10^{-14}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;y.re \leq 45000000000:\\
\;\;\;\;y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
if y.re < -9.4999999999999999e-14 or 4.5e10 < y.re Initial program 40.9%
Taylor expanded in x.re around inf
mul-1-negN/A
distribute-rgt-neg-inN/A
log-recN/A
remove-double-negN/A
accelerator-lowering-fma.f64N/A
log-lowering-log.f64N/A
+-commutativeN/A
accelerator-lowering-fma.f64N/A
atan2-lowering-atan2.f64N/A
associate-*r/N/A
/-lowering-/.f64N/A
associate-*r*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6425.1
Simplified25.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-*.f6425.1
Simplified25.1%
Taylor expanded in x.re around 0
associate-*r/N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6430.9
Simplified30.9%
if -9.4999999999999999e-14 < y.re < 4.5e10Initial program 44.3%
Taylor expanded in y.re around 0
mul-1-negN/A
neg-sub0N/A
--lowering--.f64N/A
*-lowering-*.f64N/A
atan2-lowering-atan2.f6443.9
Simplified43.9%
Taylor expanded in y.im around 0
sin-lowering-sin.f64N/A
*-lowering-*.f64N/A
atan2-lowering-atan2.f6423.4
Simplified23.4%
Taylor expanded in y.re around 0
*-lowering-*.f64N/A
atan2-lowering-atan2.f6423.4
Simplified23.4%
Final simplification27.3%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(if (<= x.re 4.4e-62)
(sin (* y.re (atan2 x.im x.re)))
(sin
(fma 0.5 (/ (* y.im (* x.im x.im)) (* x.re 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 tmp;
if (x_46_re <= 4.4e-62) {
tmp = sin((y_46_re * atan2(x_46_im, x_46_re)));
} else {
tmp = sin(fma(0.5, ((y_46_im * (x_46_im * x_46_im)) / (x_46_re * 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) tmp = 0.0 if (x_46_re <= 4.4e-62) tmp = sin(Float64(y_46_re * atan(x_46_im, x_46_re))); else tmp = sin(fma(0.5, Float64(Float64(y_46_im * Float64(x_46_im * x_46_im)) / Float64(x_46_re * 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_] := If[LessEqual[x$46$re, 4.4e-62], N[Sin[N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[Sin[N[(0.5 * N[(N[(y$46$im * N[(x$46$im * x$46$im), $MachinePrecision]), $MachinePrecision] / N[(x$46$re * x$46$re), $MachinePrecision]), $MachinePrecision] + N[(y$46$im * N[Log[x$46$re], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x.re \leq 4.4 \cdot 10^{-62}:\\
\;\;\;\;\sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\\
\mathbf{else}:\\
\;\;\;\;\sin \left(\mathsf{fma}\left(0.5, \frac{y.im \cdot \left(x.im \cdot x.im\right)}{x.re \cdot x.re}, y.im \cdot \log x.re\right)\right)\\
\end{array}
\end{array}
if x.re < 4.40000000000000035e-62Initial program 44.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.8
Simplified32.8%
Taylor expanded in y.im around 0
sin-lowering-sin.f64N/A
*-lowering-*.f64N/A
atan2-lowering-atan2.f6415.7
Simplified15.7%
if 4.40000000000000035e-62 < x.re Initial program 38.5%
Taylor expanded in x.re around inf
mul-1-negN/A
distribute-rgt-neg-inN/A
log-recN/A
remove-double-negN/A
accelerator-lowering-fma.f64N/A
log-lowering-log.f64N/A
+-commutativeN/A
accelerator-lowering-fma.f64N/A
atan2-lowering-atan2.f64N/A
associate-*r/N/A
/-lowering-/.f64N/A
associate-*r*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6451.1
Simplified51.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-*.f6447.7
Simplified47.7%
Taylor expanded in y.re around 0
sin-lowering-sin.f64N/A
accelerator-lowering-fma.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
log-lowering-log.f6418.7
Simplified18.7%
Final simplification16.7%
(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 42.5%
Taylor expanded in y.re around 0
mul-1-negN/A
neg-sub0N/A
--lowering--.f64N/A
*-lowering-*.f64N/A
atan2-lowering-atan2.f6428.4
Simplified28.4%
Taylor expanded in y.im around 0
sin-lowering-sin.f64N/A
*-lowering-*.f64N/A
atan2-lowering-atan2.f6414.8
Simplified14.8%
(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 42.5%
Taylor expanded in y.re around 0
mul-1-negN/A
neg-sub0N/A
--lowering--.f64N/A
*-lowering-*.f64N/A
atan2-lowering-atan2.f6428.4
Simplified28.4%
Taylor expanded in y.im around 0
sin-lowering-sin.f64N/A
*-lowering-*.f64N/A
atan2-lowering-atan2.f6414.8
Simplified14.8%
Taylor expanded in y.re around 0
*-lowering-*.f64N/A
atan2-lowering-atan2.f6414.7
Simplified14.7%
herbie shell --seed 2024198
(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)))))