
(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.im (atan2 x.im x.re)))
(t_1 (* y.re (atan2 x.im x.re)))
(t_2 (log (/ -1.0 x.re))))
(if (<= x.re -2.25e-238)
(*
(exp (- (fma y.re t_2 t_0)))
(sin (fma y.re (atan2 x.im x.re) (* t_2 (- y.im)))))
(if (<= x.re 4.5e-37)
(* (exp (- (* y.re (log (sqrt (* x.im x.im)))) t_0)) (sin t_1))
(*
(exp (- (* y.re (log x.re)) t_0))
(sin (fma y.im (log x.re) t_1)))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = y_46_im * atan2(x_46_im, x_46_re);
double t_1 = y_46_re * atan2(x_46_im, x_46_re);
double t_2 = log((-1.0 / x_46_re));
double tmp;
if (x_46_re <= -2.25e-238) {
tmp = exp(-fma(y_46_re, t_2, t_0)) * sin(fma(y_46_re, atan2(x_46_im, x_46_re), (t_2 * -y_46_im)));
} else if (x_46_re <= 4.5e-37) {
tmp = exp(((y_46_re * log(sqrt((x_46_im * x_46_im)))) - t_0)) * sin(t_1);
} else {
tmp = exp(((y_46_re * log(x_46_re)) - t_0)) * sin(fma(y_46_im, log(x_46_re), t_1));
}
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 = Float64(y_46_re * atan(x_46_im, x_46_re)) t_2 = log(Float64(-1.0 / x_46_re)) tmp = 0.0 if (x_46_re <= -2.25e-238) tmp = Float64(exp(Float64(-fma(y_46_re, t_2, t_0))) * sin(fma(y_46_re, atan(x_46_im, x_46_re), Float64(t_2 * Float64(-y_46_im))))); elseif (x_46_re <= 4.5e-37) tmp = Float64(exp(Float64(Float64(y_46_re * log(sqrt(Float64(x_46_im * x_46_im)))) - t_0)) * sin(t_1)); 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_1))); end return tmp end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[(y$46$im * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[Log[N[(-1.0 / x$46$re), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[x$46$re, -2.25e-238], N[(N[Exp[(-N[(y$46$re * t$95$2 + t$95$0), $MachinePrecision])], $MachinePrecision] * N[Sin[N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision] + N[(t$95$2 * (-y$46$im)), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[x$46$re, 4.5e-37], N[(N[Exp[N[(N[(y$46$re * N[Log[N[Sqrt[N[(x$46$im * x$46$im), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]], $MachinePrecision] * N[Sin[t$95$1], $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$1), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
t_1 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
t_2 := \log \left(\frac{-1}{x.re}\right)\\
\mathbf{if}\;x.re \leq -2.25 \cdot 10^{-238}:\\
\;\;\;\;e^{-\mathsf{fma}\left(y.re, t\_2, t\_0\right)} \cdot \sin \left(\mathsf{fma}\left(y.re, \tan^{-1}_* \frac{x.im}{x.re}, t\_2 \cdot \left(-y.im\right)\right)\right)\\
\mathbf{elif}\;x.re \leq 4.5 \cdot 10^{-37}:\\
\;\;\;\;e^{y.re \cdot \log \left(\sqrt{x.im \cdot x.im}\right) - t\_0} \cdot \sin t\_1\\
\mathbf{else}:\\
\;\;\;\;e^{y.re \cdot \log x.re - t\_0} \cdot \sin \left(\mathsf{fma}\left(y.im, \log x.re, t\_1\right)\right)\\
\end{array}
\end{array}
if x.re < -2.24999999999999998e-238Initial program 47.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.1%
if -2.24999999999999998e-238 < x.re < 4.5000000000000004e-37Initial program 55.6%
Taylor expanded in y.im around 0
*-lowering-*.f64N/A
atan2-lowering-atan2.f6469.6
Simplified69.6%
Taylor expanded in x.re around 0
unpow2N/A
*-lowering-*.f6469.6
Simplified69.6%
if 4.5000000000000004e-37 < x.re Initial program 36.7%
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.f6472.7
Simplified72.7%
Final simplification72.4%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (* y.im (atan2 x.im x.re)))
(t_1 (* y.re (atan2 x.im x.re)))
(t_2 (log (/ -1.0 x.im))))
(if (<= x.im -9.1e-243)
(* (exp (- (fma y.re t_2 t_0))) (sin (fma t_2 (- y.im) t_1)))
(if (<= x.im 2.1e-303)
(* (exp (- (* y.re (log x.re)) t_0)) (sin (fma y.im (log x.re) t_1)))
(*
(exp (- (* y.re (log x.im)) t_0))
(sin (fma y.im (log x.im) t_1)))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = y_46_im * atan2(x_46_im, x_46_re);
double t_1 = y_46_re * atan2(x_46_im, x_46_re);
double t_2 = log((-1.0 / x_46_im));
double tmp;
if (x_46_im <= -9.1e-243) {
tmp = exp(-fma(y_46_re, t_2, t_0)) * sin(fma(t_2, -y_46_im, t_1));
} else if (x_46_im <= 2.1e-303) {
tmp = exp(((y_46_re * log(x_46_re)) - t_0)) * sin(fma(y_46_im, log(x_46_re), t_1));
} else {
tmp = exp(((y_46_re * log(x_46_im)) - t_0)) * sin(fma(y_46_im, log(x_46_im), t_1));
}
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 = Float64(y_46_re * atan(x_46_im, x_46_re)) t_2 = log(Float64(-1.0 / x_46_im)) tmp = 0.0 if (x_46_im <= -9.1e-243) tmp = Float64(exp(Float64(-fma(y_46_re, t_2, t_0))) * sin(fma(t_2, Float64(-y_46_im), t_1))); elseif (x_46_im <= 2.1e-303) tmp = Float64(exp(Float64(Float64(y_46_re * log(x_46_re)) - t_0)) * sin(fma(y_46_im, log(x_46_re), t_1))); else tmp = Float64(exp(Float64(Float64(y_46_re * log(x_46_im)) - t_0)) * sin(fma(y_46_im, log(x_46_im), t_1))); end return tmp end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[(y$46$im * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[Log[N[(-1.0 / x$46$im), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[x$46$im, -9.1e-243], N[(N[Exp[(-N[(y$46$re * t$95$2 + t$95$0), $MachinePrecision])], $MachinePrecision] * N[Sin[N[(t$95$2 * (-y$46$im) + t$95$1), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[x$46$im, 2.1e-303], 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$1), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(N[Exp[N[(N[(y$46$re * N[Log[x$46$im], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]], $MachinePrecision] * N[Sin[N[(y$46$im * N[Log[x$46$im], $MachinePrecision] + t$95$1), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
t_1 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
t_2 := \log \left(\frac{-1}{x.im}\right)\\
\mathbf{if}\;x.im \leq -9.1 \cdot 10^{-243}:\\
\;\;\;\;e^{-\mathsf{fma}\left(y.re, t\_2, t\_0\right)} \cdot \sin \left(\mathsf{fma}\left(t\_2, -y.im, t\_1\right)\right)\\
\mathbf{elif}\;x.im \leq 2.1 \cdot 10^{-303}:\\
\;\;\;\;e^{y.re \cdot \log x.re - t\_0} \cdot \sin \left(\mathsf{fma}\left(y.im, \log x.re, t\_1\right)\right)\\
\mathbf{else}:\\
\;\;\;\;e^{y.re \cdot \log x.im - t\_0} \cdot \sin \left(\mathsf{fma}\left(y.im, \log x.im, t\_1\right)\right)\\
\end{array}
\end{array}
if x.im < -9.10000000000000018e-243Initial program 55.5%
Taylor expanded in x.im 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.1%
if -9.10000000000000018e-243 < x.im < 2.1e-303Initial program 38.8%
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.f6461.1
Simplified61.1%
if 2.1e-303 < x.im Initial program 40.8%
Taylor expanded in x.re around 0
*-lowering-*.f64N/A
exp-lowering-exp.f64N/A
--lowering--.f64N/A
*-commutativeN/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.f6467.2
Simplified67.2%
Final simplification69.3%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (sqrt (fma x.im x.im (* x.re x.re))))
(t_1 (* y.re (atan2 x.im x.re)))
(t_2 (* y.im (atan2 x.im x.re))))
(if (<= x.im -1.4e+102)
(* (sin t_1) (exp (* (atan2 x.im x.re) (- y.im))))
(if (<= x.im -2.2e-131)
(*
(exp (- (* y.re (log (sqrt (+ (* x.im x.im) (* x.re x.re))))) t_2))
(sin (* y.im (log t_0))))
(if (<= x.im -2.95e-226)
(* t_1 (pow t_0 y.re))
(if (<= x.im 6.8e-303)
(*
(exp (- (* y.re (log x.re)) t_2))
(sin (fma y.im (log x.re) t_1)))
(*
(exp (- (* y.re (log x.im)) t_2))
(sin (fma y.im (log x.im) t_1)))))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = sqrt(fma(x_46_im, x_46_im, (x_46_re * x_46_re)));
double t_1 = y_46_re * atan2(x_46_im, x_46_re);
double t_2 = y_46_im * atan2(x_46_im, x_46_re);
double tmp;
if (x_46_im <= -1.4e+102) {
tmp = sin(t_1) * exp((atan2(x_46_im, x_46_re) * -y_46_im));
} else if (x_46_im <= -2.2e-131) {
tmp = exp(((y_46_re * log(sqrt(((x_46_im * x_46_im) + (x_46_re * x_46_re))))) - t_2)) * sin((y_46_im * log(t_0)));
} else if (x_46_im <= -2.95e-226) {
tmp = t_1 * pow(t_0, y_46_re);
} else if (x_46_im <= 6.8e-303) {
tmp = exp(((y_46_re * log(x_46_re)) - t_2)) * sin(fma(y_46_im, log(x_46_re), t_1));
} else {
tmp = exp(((y_46_re * log(x_46_im)) - t_2)) * sin(fma(y_46_im, log(x_46_im), t_1));
}
return tmp;
}
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = sqrt(fma(x_46_im, x_46_im, Float64(x_46_re * x_46_re))) t_1 = Float64(y_46_re * atan(x_46_im, x_46_re)) t_2 = Float64(y_46_im * atan(x_46_im, x_46_re)) tmp = 0.0 if (x_46_im <= -1.4e+102) tmp = Float64(sin(t_1) * exp(Float64(atan(x_46_im, x_46_re) * Float64(-y_46_im)))); elseif (x_46_im <= -2.2e-131) tmp = Float64(exp(Float64(Float64(y_46_re * log(sqrt(Float64(Float64(x_46_im * x_46_im) + Float64(x_46_re * x_46_re))))) - t_2)) * sin(Float64(y_46_im * log(t_0)))); elseif (x_46_im <= -2.95e-226) tmp = Float64(t_1 * (t_0 ^ y_46_re)); elseif (x_46_im <= 6.8e-303) tmp = Float64(exp(Float64(Float64(y_46_re * log(x_46_re)) - t_2)) * sin(fma(y_46_im, log(x_46_re), t_1))); else tmp = Float64(exp(Float64(Float64(y_46_re * log(x_46_im)) - t_2)) * sin(fma(y_46_im, log(x_46_im), t_1))); end return tmp end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[Sqrt[N[(x$46$im * x$46$im + N[(x$46$re * x$46$re), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$1 = N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(y$46$im * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x$46$im, -1.4e+102], N[(N[Sin[t$95$1], $MachinePrecision] * N[Exp[N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * (-y$46$im)), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[x$46$im, -2.2e-131], N[(N[Exp[N[(N[(y$46$re * N[Log[N[Sqrt[N[(N[(x$46$im * x$46$im), $MachinePrecision] + N[(x$46$re * x$46$re), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision] - t$95$2), $MachinePrecision]], $MachinePrecision] * N[Sin[N[(y$46$im * N[Log[t$95$0], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[x$46$im, -2.95e-226], N[(t$95$1 * N[Power[t$95$0, y$46$re], $MachinePrecision]), $MachinePrecision], If[LessEqual[x$46$im, 6.8e-303], N[(N[Exp[N[(N[(y$46$re * N[Log[x$46$re], $MachinePrecision]), $MachinePrecision] - t$95$2), $MachinePrecision]], $MachinePrecision] * N[Sin[N[(y$46$im * N[Log[x$46$re], $MachinePrecision] + t$95$1), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(N[Exp[N[(N[(y$46$re * N[Log[x$46$im], $MachinePrecision]), $MachinePrecision] - t$95$2), $MachinePrecision]], $MachinePrecision] * N[Sin[N[(y$46$im * N[Log[x$46$im], $MachinePrecision] + t$95$1), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \sqrt{\mathsf{fma}\left(x.im, x.im, x.re \cdot x.re\right)}\\
t_1 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
t_2 := y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
\mathbf{if}\;x.im \leq -1.4 \cdot 10^{+102}:\\
\;\;\;\;\sin t\_1 \cdot e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot \left(-y.im\right)}\\
\mathbf{elif}\;x.im \leq -2.2 \cdot 10^{-131}:\\
\;\;\;\;e^{y.re \cdot \log \left(\sqrt{x.im \cdot x.im + x.re \cdot x.re}\right) - t\_2} \cdot \sin \left(y.im \cdot \log t\_0\right)\\
\mathbf{elif}\;x.im \leq -2.95 \cdot 10^{-226}:\\
\;\;\;\;t\_1 \cdot {t\_0}^{y.re}\\
\mathbf{elif}\;x.im \leq 6.8 \cdot 10^{-303}:\\
\;\;\;\;e^{y.re \cdot \log x.re - t\_2} \cdot \sin \left(\mathsf{fma}\left(y.im, \log x.re, t\_1\right)\right)\\
\mathbf{else}:\\
\;\;\;\;e^{y.re \cdot \log x.im - t\_2} \cdot \sin \left(\mathsf{fma}\left(y.im, \log x.im, t\_1\right)\right)\\
\end{array}
\end{array}
if x.im < -1.40000000000000009e102Initial program 28.1%
Taylor expanded in y.im around 0
*-lowering-*.f64N/A
atan2-lowering-atan2.f6450.4
Simplified50.4%
Taylor expanded in y.re around 0
exp-lowering-exp.f64N/A
neg-lowering-neg.f64N/A
*-lowering-*.f64N/A
atan2-lowering-atan2.f6461.2
Simplified61.2%
if -1.40000000000000009e102 < x.im < -2.2e-131Initial program 78.1%
Taylor expanded in y.im around inf
*-lowering-*.f64N/A
log-lowering-log.f64N/A
sqrt-lowering-sqrt.f64N/A
unpow2N/A
accelerator-lowering-fma.f64N/A
unpow2N/A
*-lowering-*.f6474.5
Simplified74.5%
if -2.2e-131 < x.im < -2.95e-226Initial program 43.0%
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.6
Simplified43.6%
Taylor expanded in y.re around 0
*-lowering-*.f64N/A
atan2-lowering-atan2.f6457.9
Simplified57.9%
if -2.95e-226 < x.im < 6.8e-303Initial program 38.8%
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.f6461.1
Simplified61.1%
if 6.8e-303 < x.im Initial program 40.8%
Taylor expanded in x.re around 0
*-lowering-*.f64N/A
exp-lowering-exp.f64N/A
--lowering--.f64N/A
*-commutativeN/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.f6467.2
Simplified67.2%
Final simplification66.9%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (* y.re (atan2 x.im x.re)))
(t_1 (sin t_0))
(t_2 (* y.im (atan2 x.im x.re))))
(if (<= x.re -2.2e+154)
(* t_1 (exp (* (atan2 x.im x.re) (- y.im))))
(if (<= x.re 3.4e-37)
(*
t_1
(exp (- (* y.re (log (sqrt (+ (* x.im x.im) (* x.re x.re))))) t_2)))
(*
(exp (- (* y.re (log x.re)) t_2))
(sin (fma y.im (log x.re) t_0)))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = y_46_re * atan2(x_46_im, x_46_re);
double t_1 = sin(t_0);
double t_2 = y_46_im * atan2(x_46_im, x_46_re);
double tmp;
if (x_46_re <= -2.2e+154) {
tmp = t_1 * exp((atan2(x_46_im, x_46_re) * -y_46_im));
} else if (x_46_re <= 3.4e-37) {
tmp = t_1 * exp(((y_46_re * log(sqrt(((x_46_im * x_46_im) + (x_46_re * x_46_re))))) - t_2));
} else {
tmp = exp(((y_46_re * log(x_46_re)) - t_2)) * sin(fma(y_46_im, log(x_46_re), t_0));
}
return tmp;
}
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = Float64(y_46_re * atan(x_46_im, x_46_re)) t_1 = sin(t_0) t_2 = Float64(y_46_im * atan(x_46_im, x_46_re)) tmp = 0.0 if (x_46_re <= -2.2e+154) tmp = Float64(t_1 * exp(Float64(atan(x_46_im, x_46_re) * Float64(-y_46_im)))); elseif (x_46_re <= 3.4e-37) tmp = Float64(t_1 * exp(Float64(Float64(y_46_re * log(sqrt(Float64(Float64(x_46_im * x_46_im) + Float64(x_46_re * x_46_re))))) - t_2))); else tmp = Float64(exp(Float64(Float64(y_46_re * log(x_46_re)) - t_2)) * sin(fma(y_46_im, log(x_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[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[Sin[t$95$0], $MachinePrecision]}, Block[{t$95$2 = N[(y$46$im * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x$46$re, -2.2e+154], N[(t$95$1 * N[Exp[N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * (-y$46$im)), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[x$46$re, 3.4e-37], N[(t$95$1 * N[Exp[N[(N[(y$46$re * N[Log[N[Sqrt[N[(N[(x$46$im * x$46$im), $MachinePrecision] + N[(x$46$re * x$46$re), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision] - t$95$2), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(N[Exp[N[(N[(y$46$re * N[Log[x$46$re], $MachinePrecision]), $MachinePrecision] - t$95$2), $MachinePrecision]], $MachinePrecision] * N[Sin[N[(y$46$im * N[Log[x$46$re], $MachinePrecision] + t$95$0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
t_1 := \sin t\_0\\
t_2 := y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
\mathbf{if}\;x.re \leq -2.2 \cdot 10^{+154}:\\
\;\;\;\;t\_1 \cdot e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot \left(-y.im\right)}\\
\mathbf{elif}\;x.re \leq 3.4 \cdot 10^{-37}:\\
\;\;\;\;t\_1 \cdot e^{y.re \cdot \log \left(\sqrt{x.im \cdot x.im + x.re \cdot x.re}\right) - t\_2}\\
\mathbf{else}:\\
\;\;\;\;e^{y.re \cdot \log x.re - t\_2} \cdot \sin \left(\mathsf{fma}\left(y.im, \log x.re, t\_0\right)\right)\\
\end{array}
\end{array}
if x.re < -2.2000000000000001e154Initial program 0.0%
Taylor expanded in y.im around 0
*-lowering-*.f64N/A
atan2-lowering-atan2.f6423.6
Simplified23.6%
Taylor expanded in y.re around 0
exp-lowering-exp.f64N/A
neg-lowering-neg.f64N/A
*-lowering-*.f64N/A
atan2-lowering-atan2.f6449.2
Simplified49.2%
if -2.2000000000000001e154 < x.re < 3.40000000000000018e-37Initial program 59.0%
Taylor expanded in y.im around 0
*-lowering-*.f64N/A
atan2-lowering-atan2.f6461.1
Simplified61.1%
if 3.40000000000000018e-37 < x.re Initial program 36.7%
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.f6472.7
Simplified72.7%
Final simplification62.9%
(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
(exp
(-
(* y.re (log (sqrt (+ (* x.im x.im) (* x.re x.re)))))
(* y.im (atan2 x.im x.re))))))
(t_2 (exp (* (atan2 x.im x.re) (- y.im)))))
(if (<= y.re -5.5e+57)
t_1
(if (<= y.re -1.4e-99)
(* y.re (* (atan2 x.im x.re) t_2))
(if (<= y.re 5.8e-229)
(* (log (sqrt (fma x.im x.im (* x.re x.re)))) (* y.im t_2))
(if (<= y.re 6.8e+43) (* t_0 t_2) t_1))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = sin((y_46_re * atan2(x_46_im, x_46_re)));
double t_1 = t_0 * exp(((y_46_re * log(sqrt(((x_46_im * x_46_im) + (x_46_re * x_46_re))))) - (y_46_im * atan2(x_46_im, x_46_re))));
double t_2 = exp((atan2(x_46_im, x_46_re) * -y_46_im));
double tmp;
if (y_46_re <= -5.5e+57) {
tmp = t_1;
} else if (y_46_re <= -1.4e-99) {
tmp = y_46_re * (atan2(x_46_im, x_46_re) * t_2);
} else if (y_46_re <= 5.8e-229) {
tmp = log(sqrt(fma(x_46_im, x_46_im, (x_46_re * x_46_re)))) * (y_46_im * t_2);
} else if (y_46_re <= 6.8e+43) {
tmp = t_0 * t_2;
} 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 * exp(Float64(Float64(y_46_re * log(sqrt(Float64(Float64(x_46_im * x_46_im) + Float64(x_46_re * x_46_re))))) - Float64(y_46_im * atan(x_46_im, x_46_re))))) t_2 = exp(Float64(atan(x_46_im, x_46_re) * Float64(-y_46_im))) tmp = 0.0 if (y_46_re <= -5.5e+57) tmp = t_1; elseif (y_46_re <= -1.4e-99) tmp = Float64(y_46_re * Float64(atan(x_46_im, x_46_re) * t_2)); elseif (y_46_re <= 5.8e-229) tmp = Float64(log(sqrt(fma(x_46_im, x_46_im, Float64(x_46_re * x_46_re)))) * Float64(y_46_im * t_2)); elseif (y_46_re <= 6.8e+43) tmp = Float64(t_0 * t_2); 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[Exp[N[(N[(y$46$re * N[Log[N[Sqrt[N[(N[(x$46$im * x$46$im), $MachinePrecision] + N[(x$46$re * x$46$re), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision] - N[(y$46$im * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[Exp[N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * (-y$46$im)), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[y$46$re, -5.5e+57], t$95$1, If[LessEqual[y$46$re, -1.4e-99], N[(y$46$re * N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * t$95$2), $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$re, 5.8e-229], N[(N[Log[N[Sqrt[N[(x$46$im * x$46$im + N[(x$46$re * x$46$re), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision] * N[(y$46$im * t$95$2), $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$re, 6.8e+43], N[(t$95$0 * t$95$2), $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 e^{y.re \cdot \log \left(\sqrt{x.im \cdot x.im + x.re \cdot x.re}\right) - y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}}\\
t_2 := e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot \left(-y.im\right)}\\
\mathbf{if}\;y.re \leq -5.5 \cdot 10^{+57}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y.re \leq -1.4 \cdot 10^{-99}:\\
\;\;\;\;y.re \cdot \left(\tan^{-1}_* \frac{x.im}{x.re} \cdot t\_2\right)\\
\mathbf{elif}\;y.re \leq 5.8 \cdot 10^{-229}:\\
\;\;\;\;\log \left(\sqrt{\mathsf{fma}\left(x.im, x.im, x.re \cdot x.re\right)}\right) \cdot \left(y.im \cdot t\_2\right)\\
\mathbf{elif}\;y.re \leq 6.8 \cdot 10^{+43}:\\
\;\;\;\;t\_0 \cdot t\_2\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if y.re < -5.5000000000000002e57 or 6.80000000000000024e43 < y.re Initial program 45.8%
Taylor expanded in y.im around 0
*-lowering-*.f64N/A
atan2-lowering-atan2.f6472.1
Simplified72.1%
if -5.5000000000000002e57 < y.re < -1.4e-99Initial program 43.7%
Taylor expanded in y.im around 0
*-lowering-*.f64N/A
atan2-lowering-atan2.f6453.3
Simplified53.3%
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.f6468.1
Simplified68.1%
if -1.4e-99 < y.re < 5.7999999999999999e-229Initial program 60.9%
Taylor expanded in y.im around 0
+-commutativeN/A
associate-*r*N/A
accelerator-lowering-fma.f64N/A
*-lowering-*.f64N/A
cos-lowering-cos.f64N/A
*-lowering-*.f64N/A
atan2-lowering-atan2.f64N/A
log-lowering-log.f64N/A
sqrt-lowering-sqrt.f64N/A
unpow2N/A
accelerator-lowering-fma.f64N/A
unpow2N/A
*-lowering-*.f64N/A
sin-lowering-sin.f64N/A
*-lowering-*.f64N/A
atan2-lowering-atan2.f6459.2
Simplified59.2%
Taylor expanded in y.re around 0
associate-*r*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
exp-lowering-exp.f64N/A
distribute-lft-neg-inN/A
*-lowering-*.f64N/A
neg-lowering-neg.f64N/A
atan2-lowering-atan2.f64N/A
log-lowering-log.f64N/A
sqrt-lowering-sqrt.f64N/A
unpow2N/A
accelerator-lowering-fma.f64N/A
unpow2N/A
*-lowering-*.f6459.6
Simplified59.6%
if 5.7999999999999999e-229 < y.re < 6.80000000000000024e43Initial program 38.3%
Taylor expanded in y.im around 0
*-lowering-*.f64N/A
atan2-lowering-atan2.f6440.7
Simplified40.7%
Taylor expanded in y.re around 0
exp-lowering-exp.f64N/A
neg-lowering-neg.f64N/A
*-lowering-*.f64N/A
atan2-lowering-atan2.f6457.5
Simplified57.5%
Final simplification65.4%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (exp (* (atan2 x.im x.re) (- y.im))))
(t_1 (sin (* y.re (atan2 x.im x.re))))
(t_2 (sqrt (fma x.im x.im (* x.re x.re)))))
(if (<= y.re -1e+58)
(* t_1 (pow t_2 y.re))
(if (<= y.re -9e-102)
(* y.re (* (atan2 x.im x.re) t_0))
(if (<= y.re 1.9e-227)
(* (log t_2) (* y.im t_0))
(if (<= y.re 2.65e-30)
(* t_1 t_0)
(*
(exp
(-
(* y.re (log (sqrt (* x.im x.im))))
(* y.im (atan2 x.im x.re))))
t_1)))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = exp((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 = sqrt(fma(x_46_im, x_46_im, (x_46_re * x_46_re)));
double tmp;
if (y_46_re <= -1e+58) {
tmp = t_1 * pow(t_2, y_46_re);
} else if (y_46_re <= -9e-102) {
tmp = y_46_re * (atan2(x_46_im, x_46_re) * t_0);
} else if (y_46_re <= 1.9e-227) {
tmp = log(t_2) * (y_46_im * t_0);
} else if (y_46_re <= 2.65e-30) {
tmp = t_1 * t_0;
} else {
tmp = exp(((y_46_re * log(sqrt((x_46_im * x_46_im)))) - (y_46_im * atan2(x_46_im, x_46_re)))) * t_1;
}
return tmp;
}
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = exp(Float64(atan(x_46_im, x_46_re) * Float64(-y_46_im))) t_1 = sin(Float64(y_46_re * atan(x_46_im, x_46_re))) t_2 = sqrt(fma(x_46_im, x_46_im, Float64(x_46_re * x_46_re))) tmp = 0.0 if (y_46_re <= -1e+58) tmp = Float64(t_1 * (t_2 ^ y_46_re)); elseif (y_46_re <= -9e-102) tmp = Float64(y_46_re * Float64(atan(x_46_im, x_46_re) * t_0)); elseif (y_46_re <= 1.9e-227) tmp = Float64(log(t_2) * Float64(y_46_im * t_0)); elseif (y_46_re <= 2.65e-30) tmp = Float64(t_1 * t_0); else tmp = Float64(exp(Float64(Float64(y_46_re * log(sqrt(Float64(x_46_im * x_46_im)))) - Float64(y_46_im * atan(x_46_im, x_46_re)))) * t_1); 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[ArcTan[x$46$im / x$46$re], $MachinePrecision] * (-y$46$im)), $MachinePrecision]], $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[Sqrt[N[(x$46$im * x$46$im + N[(x$46$re * x$46$re), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[y$46$re, -1e+58], N[(t$95$1 * N[Power[t$95$2, y$46$re], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$re, -9e-102], N[(y$46$re * N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * t$95$0), $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$re, 1.9e-227], N[(N[Log[t$95$2], $MachinePrecision] * N[(y$46$im * t$95$0), $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$re, 2.65e-30], N[(t$95$1 * t$95$0), $MachinePrecision], N[(N[Exp[N[(N[(y$46$re * N[Log[N[Sqrt[N[(x$46$im * x$46$im), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision] - N[(y$46$im * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * t$95$1), $MachinePrecision]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot \left(-y.im\right)}\\
t_1 := \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\\
t_2 := \sqrt{\mathsf{fma}\left(x.im, x.im, x.re \cdot x.re\right)}\\
\mathbf{if}\;y.re \leq -1 \cdot 10^{+58}:\\
\;\;\;\;t\_1 \cdot {t\_2}^{y.re}\\
\mathbf{elif}\;y.re \leq -9 \cdot 10^{-102}:\\
\;\;\;\;y.re \cdot \left(\tan^{-1}_* \frac{x.im}{x.re} \cdot t\_0\right)\\
\mathbf{elif}\;y.re \leq 1.9 \cdot 10^{-227}:\\
\;\;\;\;\log t\_2 \cdot \left(y.im \cdot t\_0\right)\\
\mathbf{elif}\;y.re \leq 2.65 \cdot 10^{-30}:\\
\;\;\;\;t\_1 \cdot t\_0\\
\mathbf{else}:\\
\;\;\;\;e^{y.re \cdot \log \left(\sqrt{x.im \cdot x.im}\right) - y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}} \cdot t\_1\\
\end{array}
\end{array}
if y.re < -9.99999999999999944e57Initial program 53.4%
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-*.f6477.9
Simplified77.9%
if -9.99999999999999944e57 < y.re < -8.99999999999999999e-102Initial program 43.7%
Taylor expanded in y.im around 0
*-lowering-*.f64N/A
atan2-lowering-atan2.f6453.3
Simplified53.3%
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.f6468.1
Simplified68.1%
if -8.99999999999999999e-102 < y.re < 1.90000000000000005e-227Initial program 60.9%
Taylor expanded in y.im around 0
+-commutativeN/A
associate-*r*N/A
accelerator-lowering-fma.f64N/A
*-lowering-*.f64N/A
cos-lowering-cos.f64N/A
*-lowering-*.f64N/A
atan2-lowering-atan2.f64N/A
log-lowering-log.f64N/A
sqrt-lowering-sqrt.f64N/A
unpow2N/A
accelerator-lowering-fma.f64N/A
unpow2N/A
*-lowering-*.f64N/A
sin-lowering-sin.f64N/A
*-lowering-*.f64N/A
atan2-lowering-atan2.f6459.2
Simplified59.2%
Taylor expanded in y.re around 0
associate-*r*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
exp-lowering-exp.f64N/A
distribute-lft-neg-inN/A
*-lowering-*.f64N/A
neg-lowering-neg.f64N/A
atan2-lowering-atan2.f64N/A
log-lowering-log.f64N/A
sqrt-lowering-sqrt.f64N/A
unpow2N/A
accelerator-lowering-fma.f64N/A
unpow2N/A
*-lowering-*.f6459.6
Simplified59.6%
if 1.90000000000000005e-227 < y.re < 2.64999999999999987e-30Initial program 41.9%
Taylor expanded in y.im around 0
*-lowering-*.f64N/A
atan2-lowering-atan2.f6440.4
Simplified40.4%
Taylor expanded in y.re around 0
exp-lowering-exp.f64N/A
neg-lowering-neg.f64N/A
*-lowering-*.f64N/A
atan2-lowering-atan2.f6460.3
Simplified60.3%
if 2.64999999999999987e-30 < y.re Initial program 35.2%
Taylor expanded in y.im around 0
*-lowering-*.f64N/A
atan2-lowering-atan2.f6453.7
Simplified53.7%
Taylor expanded in x.re around 0
unpow2N/A
*-lowering-*.f6455.3
Simplified55.3%
Final simplification63.7%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (exp (* (atan2 x.im x.re) (- y.im))))
(t_1 (sin (* y.re (atan2 x.im x.re))))
(t_2 (sqrt (fma x.im x.im (* x.re x.re))))
(t_3 (* t_1 (pow t_2 y.re))))
(if (<= y.re -7e+57)
t_3
(if (<= y.re -9e-102)
(* y.re (* (atan2 x.im x.re) t_0))
(if (<= y.re 2e-228)
(* (log t_2) (* y.im t_0))
(if (<= y.re 7.2e+43) (* t_1 t_0) t_3))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = exp((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 = sqrt(fma(x_46_im, x_46_im, (x_46_re * x_46_re)));
double t_3 = t_1 * pow(t_2, y_46_re);
double tmp;
if (y_46_re <= -7e+57) {
tmp = t_3;
} else if (y_46_re <= -9e-102) {
tmp = y_46_re * (atan2(x_46_im, x_46_re) * t_0);
} else if (y_46_re <= 2e-228) {
tmp = log(t_2) * (y_46_im * t_0);
} else if (y_46_re <= 7.2e+43) {
tmp = t_1 * t_0;
} else {
tmp = t_3;
}
return tmp;
}
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = exp(Float64(atan(x_46_im, x_46_re) * Float64(-y_46_im))) t_1 = sin(Float64(y_46_re * atan(x_46_im, x_46_re))) t_2 = sqrt(fma(x_46_im, x_46_im, Float64(x_46_re * x_46_re))) t_3 = Float64(t_1 * (t_2 ^ y_46_re)) tmp = 0.0 if (y_46_re <= -7e+57) tmp = t_3; elseif (y_46_re <= -9e-102) tmp = Float64(y_46_re * Float64(atan(x_46_im, x_46_re) * t_0)); elseif (y_46_re <= 2e-228) tmp = Float64(log(t_2) * Float64(y_46_im * t_0)); elseif (y_46_re <= 7.2e+43) tmp = Float64(t_1 * t_0); else tmp = t_3; 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[ArcTan[x$46$im / x$46$re], $MachinePrecision] * (-y$46$im)), $MachinePrecision]], $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[Sqrt[N[(x$46$im * x$46$im + N[(x$46$re * x$46$re), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$3 = N[(t$95$1 * N[Power[t$95$2, y$46$re], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y$46$re, -7e+57], t$95$3, If[LessEqual[y$46$re, -9e-102], N[(y$46$re * N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * t$95$0), $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$re, 2e-228], N[(N[Log[t$95$2], $MachinePrecision] * N[(y$46$im * t$95$0), $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$re, 7.2e+43], N[(t$95$1 * t$95$0), $MachinePrecision], t$95$3]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot \left(-y.im\right)}\\
t_1 := \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\\
t_2 := \sqrt{\mathsf{fma}\left(x.im, x.im, x.re \cdot x.re\right)}\\
t_3 := t\_1 \cdot {t\_2}^{y.re}\\
\mathbf{if}\;y.re \leq -7 \cdot 10^{+57}:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;y.re \leq -9 \cdot 10^{-102}:\\
\;\;\;\;y.re \cdot \left(\tan^{-1}_* \frac{x.im}{x.re} \cdot t\_0\right)\\
\mathbf{elif}\;y.re \leq 2 \cdot 10^{-228}:\\
\;\;\;\;\log t\_2 \cdot \left(y.im \cdot t\_0\right)\\
\mathbf{elif}\;y.re \leq 7.2 \cdot 10^{+43}:\\
\;\;\;\;t\_1 \cdot t\_0\\
\mathbf{else}:\\
\;\;\;\;t\_3\\
\end{array}
\end{array}
if y.re < -6.9999999999999995e57 or 7.2000000000000002e43 < y.re Initial program 45.8%
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-*.f6467.5
Simplified67.5%
if -6.9999999999999995e57 < y.re < -8.99999999999999999e-102Initial program 43.7%
Taylor expanded in y.im around 0
*-lowering-*.f64N/A
atan2-lowering-atan2.f6453.3
Simplified53.3%
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.f6468.1
Simplified68.1%
if -8.99999999999999999e-102 < y.re < 2.00000000000000007e-228Initial program 60.9%
Taylor expanded in y.im around 0
+-commutativeN/A
associate-*r*N/A
accelerator-lowering-fma.f64N/A
*-lowering-*.f64N/A
cos-lowering-cos.f64N/A
*-lowering-*.f64N/A
atan2-lowering-atan2.f64N/A
log-lowering-log.f64N/A
sqrt-lowering-sqrt.f64N/A
unpow2N/A
accelerator-lowering-fma.f64N/A
unpow2N/A
*-lowering-*.f64N/A
sin-lowering-sin.f64N/A
*-lowering-*.f64N/A
atan2-lowering-atan2.f6459.2
Simplified59.2%
Taylor expanded in y.re around 0
associate-*r*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
exp-lowering-exp.f64N/A
distribute-lft-neg-inN/A
*-lowering-*.f64N/A
neg-lowering-neg.f64N/A
atan2-lowering-atan2.f64N/A
log-lowering-log.f64N/A
sqrt-lowering-sqrt.f64N/A
unpow2N/A
accelerator-lowering-fma.f64N/A
unpow2N/A
*-lowering-*.f6459.6
Simplified59.6%
if 2.00000000000000007e-228 < y.re < 7.2000000000000002e43Initial program 38.3%
Taylor expanded in y.im around 0
*-lowering-*.f64N/A
atan2-lowering-atan2.f6440.7
Simplified40.7%
Taylor expanded in y.re around 0
exp-lowering-exp.f64N/A
neg-lowering-neg.f64N/A
*-lowering-*.f64N/A
atan2-lowering-atan2.f6457.5
Simplified57.5%
Final simplification63.5%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (exp (* (atan2 x.im x.re) (- y.im))))
(t_1 (* y.re (* (atan2 x.im x.re) t_0)))
(t_2 (sqrt (fma x.im x.im (* x.re x.re))))
(t_3 (* (sin (* y.re (atan2 x.im x.re))) (pow t_2 y.re)))
(t_4 (* (log t_2) (* y.im t_0))))
(if (<= y.re -9e+57)
t_3
(if (<= y.re -9e-102)
t_1
(if (<= y.re 2.2e-227)
t_4
(if (<= y.re 2.8e+17) t_1 (if (<= y.re 3.6e+193) t_4 t_3)))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = exp((atan2(x_46_im, x_46_re) * -y_46_im));
double t_1 = y_46_re * (atan2(x_46_im, x_46_re) * t_0);
double t_2 = sqrt(fma(x_46_im, x_46_im, (x_46_re * x_46_re)));
double t_3 = sin((y_46_re * atan2(x_46_im, x_46_re))) * pow(t_2, y_46_re);
double t_4 = log(t_2) * (y_46_im * t_0);
double tmp;
if (y_46_re <= -9e+57) {
tmp = t_3;
} else if (y_46_re <= -9e-102) {
tmp = t_1;
} else if (y_46_re <= 2.2e-227) {
tmp = t_4;
} else if (y_46_re <= 2.8e+17) {
tmp = t_1;
} else if (y_46_re <= 3.6e+193) {
tmp = t_4;
} else {
tmp = t_3;
}
return tmp;
}
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = exp(Float64(atan(x_46_im, x_46_re) * Float64(-y_46_im))) t_1 = Float64(y_46_re * Float64(atan(x_46_im, x_46_re) * t_0)) t_2 = sqrt(fma(x_46_im, x_46_im, Float64(x_46_re * x_46_re))) t_3 = Float64(sin(Float64(y_46_re * atan(x_46_im, x_46_re))) * (t_2 ^ y_46_re)) t_4 = Float64(log(t_2) * Float64(y_46_im * t_0)) tmp = 0.0 if (y_46_re <= -9e+57) tmp = t_3; elseif (y_46_re <= -9e-102) tmp = t_1; elseif (y_46_re <= 2.2e-227) tmp = t_4; elseif (y_46_re <= 2.8e+17) tmp = t_1; elseif (y_46_re <= 3.6e+193) tmp = t_4; else tmp = t_3; 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[ArcTan[x$46$im / x$46$re], $MachinePrecision] * (-y$46$im)), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$1 = N[(y$46$re * N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * t$95$0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[Sqrt[N[(x$46$im * x$46$im + N[(x$46$re * x$46$re), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$3 = N[(N[Sin[N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Power[t$95$2, y$46$re], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[(N[Log[t$95$2], $MachinePrecision] * N[(y$46$im * t$95$0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y$46$re, -9e+57], t$95$3, If[LessEqual[y$46$re, -9e-102], t$95$1, If[LessEqual[y$46$re, 2.2e-227], t$95$4, If[LessEqual[y$46$re, 2.8e+17], t$95$1, If[LessEqual[y$46$re, 3.6e+193], t$95$4, t$95$3]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot \left(-y.im\right)}\\
t_1 := y.re \cdot \left(\tan^{-1}_* \frac{x.im}{x.re} \cdot t\_0\right)\\
t_2 := \sqrt{\mathsf{fma}\left(x.im, x.im, x.re \cdot x.re\right)}\\
t_3 := \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {t\_2}^{y.re}\\
t_4 := \log t\_2 \cdot \left(y.im \cdot t\_0\right)\\
\mathbf{if}\;y.re \leq -9 \cdot 10^{+57}:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;y.re \leq -9 \cdot 10^{-102}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y.re \leq 2.2 \cdot 10^{-227}:\\
\;\;\;\;t\_4\\
\mathbf{elif}\;y.re \leq 2.8 \cdot 10^{+17}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y.re \leq 3.6 \cdot 10^{+193}:\\
\;\;\;\;t\_4\\
\mathbf{else}:\\
\;\;\;\;t\_3\\
\end{array}
\end{array}
if y.re < -8.99999999999999991e57 or 3.6e193 < y.re Initial program 50.0%
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-*.f6475.8
Simplified75.8%
if -8.99999999999999991e57 < y.re < -8.99999999999999999e-102 or 2.19999999999999981e-227 < y.re < 2.8e17Initial program 42.0%
Taylor expanded in y.im around 0
*-lowering-*.f64N/A
atan2-lowering-atan2.f6445.0
Simplified45.0%
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.f6461.6
Simplified61.6%
if -8.99999999999999999e-102 < y.re < 2.19999999999999981e-227 or 2.8e17 < y.re < 3.6e193Initial program 48.7%
Taylor expanded in y.im around 0
+-commutativeN/A
associate-*r*N/A
accelerator-lowering-fma.f64N/A
*-lowering-*.f64N/A
cos-lowering-cos.f64N/A
*-lowering-*.f64N/A
atan2-lowering-atan2.f64N/A
log-lowering-log.f64N/A
sqrt-lowering-sqrt.f64N/A
unpow2N/A
accelerator-lowering-fma.f64N/A
unpow2N/A
*-lowering-*.f64N/A
sin-lowering-sin.f64N/A
*-lowering-*.f64N/A
atan2-lowering-atan2.f6456.9
Simplified56.9%
Taylor expanded in y.re around 0
associate-*r*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
exp-lowering-exp.f64N/A
distribute-lft-neg-inN/A
*-lowering-*.f64N/A
neg-lowering-neg.f64N/A
atan2-lowering-atan2.f64N/A
log-lowering-log.f64N/A
sqrt-lowering-sqrt.f64N/A
unpow2N/A
accelerator-lowering-fma.f64N/A
unpow2N/A
*-lowering-*.f6457.4
Simplified57.4%
Final simplification64.7%
(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.4e+58)
t_0
(if (<= y.re 110000000000.0)
(* 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 = 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.4e+58) {
tmp = t_0;
} else if (y_46_re <= 110000000000.0) {
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(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.4e+58) tmp = t_0; elseif (y_46_re <= 110000000000.0) 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[(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.4e+58], t$95$0, If[LessEqual[y$46$re, 110000000000.0], N[(y$46$re * N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * N[Exp[N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * (-y$46$im)), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 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.4 \cdot 10^{+58}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;y.re \leq 110000000000:\\
\;\;\;\;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.3999999999999999e58 or 1.1e11 < y.re Initial program 44.0%
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-*.f6465.8
Simplified65.8%
if -1.3999999999999999e58 < y.re < 1.1e11Initial program 49.3%
Taylor expanded in y.im around 0
*-lowering-*.f64N/A
atan2-lowering-atan2.f6439.8
Simplified39.8%
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.f6453.0
Simplified53.0%
Final simplification58.8%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (* y.re (atan2 x.im x.re))))
(if (<= y.re -3.3e+40)
(* t_0 (pow (sqrt (fma x.im x.im (* x.re x.re))) y.re))
(if (<= y.re 3.6e+16)
(* y.re (* (atan2 x.im x.re) (exp (* (atan2 x.im x.re) (- y.im)))))
(* (sin t_0) (pow x.im y.re))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = y_46_re * atan2(x_46_im, x_46_re);
double tmp;
if (y_46_re <= -3.3e+40) {
tmp = t_0 * pow(sqrt(fma(x_46_im, x_46_im, (x_46_re * x_46_re))), y_46_re);
} else if (y_46_re <= 3.6e+16) {
tmp = y_46_re * (atan2(x_46_im, x_46_re) * exp((atan2(x_46_im, x_46_re) * -y_46_im)));
} else {
tmp = sin(t_0) * pow(x_46_im, 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 (y_46_re <= -3.3e+40) tmp = Float64(t_0 * (sqrt(fma(x_46_im, x_46_im, Float64(x_46_re * x_46_re))) ^ y_46_re)); elseif (y_46_re <= 3.6e+16) tmp = Float64(y_46_re * Float64(atan(x_46_im, x_46_re) * exp(Float64(atan(x_46_im, x_46_re) * Float64(-y_46_im))))); else tmp = Float64(sin(t_0) * (x_46_im ^ y_46_re)); end return tmp end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y$46$re, -3.3e+40], 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, 3.6e+16], N[(y$46$re * N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * N[Exp[N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * (-y$46$im)), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[Sin[t$95$0], $MachinePrecision] * N[Power[x$46$im, 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}\;y.re \leq -3.3 \cdot 10^{+40}:\\
\;\;\;\;t\_0 \cdot {\left(\sqrt{\mathsf{fma}\left(x.im, x.im, x.re \cdot x.re\right)}\right)}^{y.re}\\
\mathbf{elif}\;y.re \leq 3.6 \cdot 10^{+16}:\\
\;\;\;\;y.re \cdot \left(\tan^{-1}_* \frac{x.im}{x.re} \cdot e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot \left(-y.im\right)}\right)\\
\mathbf{else}:\\
\;\;\;\;\sin t\_0 \cdot {x.im}^{y.re}\\
\end{array}
\end{array}
if y.re < -3.2999999999999998e40Initial program 54.1%
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-*.f6475.7
Simplified75.7%
Taylor expanded in y.re around 0
*-lowering-*.f64N/A
atan2-lowering-atan2.f6472.4
Simplified72.4%
if -3.2999999999999998e40 < y.re < 3.6e16Initial program 48.9%
Taylor expanded in y.im around 0
*-lowering-*.f64N/A
atan2-lowering-atan2.f6440.0
Simplified40.0%
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.f6453.4
Simplified53.4%
if 3.6e16 < y.re Initial program 34.5%
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-*.f6453.7
Simplified53.7%
Taylor expanded in x.re around 0
*-lowering-*.f64N/A
sin-lowering-sin.f64N/A
*-lowering-*.f64N/A
atan2-lowering-atan2.f64N/A
pow-lowering-pow.f6452.2
Simplified52.2%
Final simplification57.7%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (* y.re (atan2 x.im x.re)))
(t_1 (sqrt (fma x.im x.im (* x.re x.re)))))
(if (<= y.re -4.1e-103)
(* t_0 (pow t_1 y.re))
(if (<= y.re 4.4e-227)
(sin (* y.im (log t_1)))
(* (sin t_0) (pow x.im y.re))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = y_46_re * atan2(x_46_im, x_46_re);
double t_1 = sqrt(fma(x_46_im, x_46_im, (x_46_re * x_46_re)));
double tmp;
if (y_46_re <= -4.1e-103) {
tmp = t_0 * pow(t_1, y_46_re);
} else if (y_46_re <= 4.4e-227) {
tmp = sin((y_46_im * log(t_1)));
} else {
tmp = sin(t_0) * pow(x_46_im, 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 = sqrt(fma(x_46_im, x_46_im, Float64(x_46_re * x_46_re))) tmp = 0.0 if (y_46_re <= -4.1e-103) tmp = Float64(t_0 * (t_1 ^ y_46_re)); elseif (y_46_re <= 4.4e-227) tmp = sin(Float64(y_46_im * log(t_1))); else tmp = Float64(sin(t_0) * (x_46_im ^ y_46_re)); end return tmp end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[Sqrt[N[(x$46$im * x$46$im + N[(x$46$re * x$46$re), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[y$46$re, -4.1e-103], N[(t$95$0 * N[Power[t$95$1, y$46$re], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$re, 4.4e-227], N[Sin[N[(y$46$im * N[Log[t$95$1], $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[(N[Sin[t$95$0], $MachinePrecision] * N[Power[x$46$im, 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 := \sqrt{\mathsf{fma}\left(x.im, x.im, x.re \cdot x.re\right)}\\
\mathbf{if}\;y.re \leq -4.1 \cdot 10^{-103}:\\
\;\;\;\;t\_0 \cdot {t\_1}^{y.re}\\
\mathbf{elif}\;y.re \leq 4.4 \cdot 10^{-227}:\\
\;\;\;\;\sin \left(y.im \cdot \log t\_1\right)\\
\mathbf{else}:\\
\;\;\;\;\sin t\_0 \cdot {x.im}^{y.re}\\
\end{array}
\end{array}
if y.re < -4.09999999999999996e-103Initial program 50.5%
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-*.f6463.1
Simplified63.1%
Taylor expanded in y.re around 0
*-lowering-*.f64N/A
atan2-lowering-atan2.f6460.9
Simplified60.9%
if -4.09999999999999996e-103 < y.re < 4.39999999999999962e-227Initial program 60.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-*.f6435.9
Simplified35.9%
Taylor expanded in y.re around 0
sin-lowering-sin.f64N/A
*-lowering-*.f64N/A
log-lowering-log.f64N/A
sqrt-lowering-sqrt.f64N/A
unpow2N/A
accelerator-lowering-fma.f64N/A
unpow2N/A
*-lowering-*.f6434.1
Simplified34.1%
if 4.39999999999999962e-227 < y.re Initial program 37.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-*.f6439.4
Simplified39.4%
Taylor expanded in x.re around 0
*-lowering-*.f64N/A
sin-lowering-sin.f64N/A
*-lowering-*.f64N/A
atan2-lowering-atan2.f64N/A
pow-lowering-pow.f6438.4
Simplified38.4%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (sqrt (fma x.im x.im (* x.re x.re))))
(t_1 (* (* y.re (atan2 x.im x.re)) (pow t_0 y.re))))
(if (<= y.re -1.02e-103)
t_1
(if (<= y.re 1.35e-227) (sin (* y.im (log t_0))) t_1))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = sqrt(fma(x_46_im, x_46_im, (x_46_re * x_46_re)));
double t_1 = (y_46_re * atan2(x_46_im, x_46_re)) * pow(t_0, y_46_re);
double tmp;
if (y_46_re <= -1.02e-103) {
tmp = t_1;
} else if (y_46_re <= 1.35e-227) {
tmp = sin((y_46_im * log(t_0)));
} else {
tmp = t_1;
}
return tmp;
}
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = sqrt(fma(x_46_im, x_46_im, Float64(x_46_re * x_46_re))) t_1 = Float64(Float64(y_46_re * atan(x_46_im, x_46_re)) * (t_0 ^ y_46_re)) tmp = 0.0 if (y_46_re <= -1.02e-103) tmp = t_1; elseif (y_46_re <= 1.35e-227) tmp = sin(Float64(y_46_im * log(t_0))); else tmp = t_1; end return tmp end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[Sqrt[N[(x$46$im * x$46$im + N[(x$46$re * x$46$re), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$1 = N[(N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision] * N[Power[t$95$0, y$46$re], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y$46$re, -1.02e-103], t$95$1, If[LessEqual[y$46$re, 1.35e-227], N[Sin[N[(y$46$im * N[Log[t$95$0], $MachinePrecision]), $MachinePrecision]], $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \sqrt{\mathsf{fma}\left(x.im, x.im, x.re \cdot x.re\right)}\\
t_1 := \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {t\_0}^{y.re}\\
\mathbf{if}\;y.re \leq -1.02 \cdot 10^{-103}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y.re \leq 1.35 \cdot 10^{-227}:\\
\;\;\;\;\sin \left(y.im \cdot \log t\_0\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if y.re < -1.01999999999999998e-103 or 1.35e-227 < y.re Initial program 43.4%
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-*.f6450.0
Simplified50.0%
Taylor expanded in y.re around 0
*-lowering-*.f64N/A
atan2-lowering-atan2.f6446.0
Simplified46.0%
if -1.01999999999999998e-103 < y.re < 1.35e-227Initial program 60.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-*.f6435.9
Simplified35.9%
Taylor expanded in y.re around 0
sin-lowering-sin.f64N/A
*-lowering-*.f64N/A
log-lowering-log.f64N/A
sqrt-lowering-sqrt.f64N/A
unpow2N/A
accelerator-lowering-fma.f64N/A
unpow2N/A
*-lowering-*.f6434.1
Simplified34.1%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (* y.re (atan2 x.im x.re))))
(if (<= y.re -2e-104)
(sin t_0)
(if (<= y.re 2.2e-227)
(sin (* y.im (log (sqrt (fma x.im x.im (* x.re x.re))))))
(if (<= y.re 1.45e-31)
t_0
(* y.im (fma 0.5 (/ (* x.im x.im) (* x.re x.re)) (log x.re))))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = y_46_re * atan2(x_46_im, x_46_re);
double tmp;
if (y_46_re <= -2e-104) {
tmp = sin(t_0);
} else if (y_46_re <= 2.2e-227) {
tmp = sin((y_46_im * log(sqrt(fma(x_46_im, x_46_im, (x_46_re * x_46_re))))));
} else if (y_46_re <= 1.45e-31) {
tmp = t_0;
} else {
tmp = y_46_im * fma(0.5, ((x_46_im * x_46_im) / (x_46_re * x_46_re)), log(x_46_re));
}
return tmp;
}
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = Float64(y_46_re * atan(x_46_im, x_46_re)) tmp = 0.0 if (y_46_re <= -2e-104) tmp = sin(t_0); elseif (y_46_re <= 2.2e-227) tmp = sin(Float64(y_46_im * log(sqrt(fma(x_46_im, x_46_im, Float64(x_46_re * x_46_re)))))); elseif (y_46_re <= 1.45e-31) tmp = t_0; else tmp = Float64(y_46_im * fma(0.5, Float64(Float64(x_46_im * x_46_im) / Float64(x_46_re * x_46_re)), log(x_46_re))); end return tmp end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y$46$re, -2e-104], N[Sin[t$95$0], $MachinePrecision], If[LessEqual[y$46$re, 2.2e-227], N[Sin[N[(y$46$im * N[Log[N[Sqrt[N[(x$46$im * x$46$im + N[(x$46$re * x$46$re), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[LessEqual[y$46$re, 1.45e-31], t$95$0, N[(y$46$im * N[(0.5 * N[(N[(x$46$im * x$46$im), $MachinePrecision] / N[(x$46$re * x$46$re), $MachinePrecision]), $MachinePrecision] + N[Log[x$46$re], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
\mathbf{if}\;y.re \leq -2 \cdot 10^{-104}:\\
\;\;\;\;\sin t\_0\\
\mathbf{elif}\;y.re \leq 2.2 \cdot 10^{-227}:\\
\;\;\;\;\sin \left(y.im \cdot \log \left(\sqrt{\mathsf{fma}\left(x.im, x.im, x.re \cdot x.re\right)}\right)\right)\\
\mathbf{elif}\;y.re \leq 1.45 \cdot 10^{-31}:\\
\;\;\;\;t\_0\\
\mathbf{else}:\\
\;\;\;\;y.im \cdot \mathsf{fma}\left(0.5, \frac{x.im \cdot x.im}{x.re \cdot x.re}, \log x.re\right)\\
\end{array}
\end{array}
if y.re < -1.99999999999999985e-104Initial program 50.5%
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-*.f6463.1
Simplified63.1%
Taylor expanded in x.re around inf
*-lowering-*.f64N/A
+-commutativeN/A
accelerator-lowering-fma.f64N/A
/-lowering-/.f64N/A
unpow2N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6449.6
Simplified49.6%
Taylor expanded in y.re around 0
Simplified16.9%
*-rgt-identityN/A
*-commutativeN/A
sin-lowering-sin.f64N/A
*-lowering-*.f64N/A
atan2-lowering-atan2.f6416.9
Applied egg-rr16.9%
if -1.99999999999999985e-104 < y.re < 2.19999999999999981e-227Initial program 60.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-*.f6435.9
Simplified35.9%
Taylor expanded in y.re around 0
sin-lowering-sin.f64N/A
*-lowering-*.f64N/A
log-lowering-log.f64N/A
sqrt-lowering-sqrt.f64N/A
unpow2N/A
accelerator-lowering-fma.f64N/A
unpow2N/A
*-lowering-*.f6434.1
Simplified34.1%
if 2.19999999999999981e-227 < y.re < 1.45e-31Initial program 42.9%
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.7
Simplified24.7%
Taylor expanded in y.re around 0
*-lowering-*.f64N/A
atan2-lowering-atan2.f6430.9
Simplified30.9%
if 1.45e-31 < y.re Initial program 34.7%
Taylor expanded in x.im around 0
+-commutativeN/A
accelerator-lowering-fma.f64N/A
Simplified19.5%
Taylor expanded in y.re around 0
*-lowering-*.f64N/A
exp-lowering-exp.f64N/A
neg-lowering-neg.f64N/A
*-lowering-*.f64N/A
atan2-lowering-atan2.f64N/A
+-commutativeN/A
accelerator-lowering-fma.f64N/A
Simplified11.6%
Taylor expanded in y.im around 0
*-lowering-*.f64N/A
+-commutativeN/A
accelerator-lowering-fma.f64N/A
/-lowering-/.f64N/A
unpow2N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
log-lowering-log.f6410.5
Simplified10.5%
Final simplification20.9%
(FPCore (x.re x.im y.re y.im) :precision binary64 (if (<= y.im 1.65e-155) (sin (* y.re (atan2 x.im x.re))) (* y.im (fma 0.5 (/ (* x.im x.im) (* x.re x.re)) (log 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_im <= 1.65e-155) {
tmp = sin((y_46_re * atan2(x_46_im, x_46_re)));
} else {
tmp = y_46_im * fma(0.5, ((x_46_im * x_46_im) / (x_46_re * x_46_re)), log(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_im <= 1.65e-155) tmp = sin(Float64(y_46_re * atan(x_46_im, x_46_re))); else tmp = Float64(y_46_im * fma(0.5, Float64(Float64(x_46_im * x_46_im) / Float64(x_46_re * x_46_re)), log(x_46_re))); end return tmp end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := If[LessEqual[y$46$im, 1.65e-155], N[Sin[N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[(y$46$im * N[(0.5 * N[(N[(x$46$im * x$46$im), $MachinePrecision] / N[(x$46$re * x$46$re), $MachinePrecision]), $MachinePrecision] + N[Log[x$46$re], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y.im \leq 1.65 \cdot 10^{-155}:\\
\;\;\;\;\sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\\
\mathbf{else}:\\
\;\;\;\;y.im \cdot \mathsf{fma}\left(0.5, \frac{x.im \cdot x.im}{x.re \cdot x.re}, \log x.re\right)\\
\end{array}
\end{array}
if y.im < 1.64999999999999993e-155Initial program 45.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-*.f6445.9
Simplified45.9%
Taylor expanded in x.re around inf
*-lowering-*.f64N/A
+-commutativeN/A
accelerator-lowering-fma.f64N/A
/-lowering-/.f64N/A
unpow2N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6429.0
Simplified29.0%
Taylor expanded in y.re around 0
Simplified17.5%
*-rgt-identityN/A
*-commutativeN/A
sin-lowering-sin.f64N/A
*-lowering-*.f64N/A
atan2-lowering-atan2.f6417.5
Applied egg-rr17.5%
if 1.64999999999999993e-155 < y.im Initial program 49.9%
Taylor expanded in x.im around 0
+-commutativeN/A
accelerator-lowering-fma.f64N/A
Simplified23.5%
Taylor expanded in y.re around 0
*-lowering-*.f64N/A
exp-lowering-exp.f64N/A
neg-lowering-neg.f64N/A
*-lowering-*.f64N/A
atan2-lowering-atan2.f64N/A
+-commutativeN/A
accelerator-lowering-fma.f64N/A
Simplified17.3%
Taylor expanded in y.im around 0
*-lowering-*.f64N/A
+-commutativeN/A
accelerator-lowering-fma.f64N/A
/-lowering-/.f64N/A
unpow2N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
log-lowering-log.f6412.8
Simplified12.8%
Final simplification15.9%
(FPCore (x.re x.im y.re y.im) :precision binary64 (if (<= y.im 1.55e-155) (* y.re (atan2 x.im x.re)) (* y.im (fma 0.5 (/ (* x.im x.im) (* x.re x.re)) (log 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_im <= 1.55e-155) {
tmp = y_46_re * atan2(x_46_im, x_46_re);
} else {
tmp = y_46_im * fma(0.5, ((x_46_im * x_46_im) / (x_46_re * x_46_re)), log(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_im <= 1.55e-155) tmp = Float64(y_46_re * atan(x_46_im, x_46_re)); else tmp = Float64(y_46_im * fma(0.5, Float64(Float64(x_46_im * x_46_im) / Float64(x_46_re * x_46_re)), log(x_46_re))); end return tmp end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := If[LessEqual[y$46$im, 1.55e-155], N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision], N[(y$46$im * N[(0.5 * N[(N[(x$46$im * x$46$im), $MachinePrecision] / N[(x$46$re * x$46$re), $MachinePrecision]), $MachinePrecision] + N[Log[x$46$re], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y.im \leq 1.55 \cdot 10^{-155}:\\
\;\;\;\;y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
\mathbf{else}:\\
\;\;\;\;y.im \cdot \mathsf{fma}\left(0.5, \frac{x.im \cdot x.im}{x.re \cdot x.re}, \log x.re\right)\\
\end{array}
\end{array}
if y.im < 1.55e-155Initial program 45.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-*.f6445.9
Simplified45.9%
Taylor expanded in y.re around 0
*-lowering-*.f64N/A
atan2-lowering-atan2.f6417.5
Simplified17.5%
if 1.55e-155 < y.im Initial program 49.9%
Taylor expanded in x.im around 0
+-commutativeN/A
accelerator-lowering-fma.f64N/A
Simplified23.5%
Taylor expanded in y.re around 0
*-lowering-*.f64N/A
exp-lowering-exp.f64N/A
neg-lowering-neg.f64N/A
*-lowering-*.f64N/A
atan2-lowering-atan2.f64N/A
+-commutativeN/A
accelerator-lowering-fma.f64N/A
Simplified17.3%
Taylor expanded in y.im around 0
*-lowering-*.f64N/A
+-commutativeN/A
accelerator-lowering-fma.f64N/A
/-lowering-/.f64N/A
unpow2N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
log-lowering-log.f6412.8
Simplified12.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 46.9%
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-*.f6441.5
Simplified41.5%
Taylor expanded in y.re around 0
*-lowering-*.f64N/A
atan2-lowering-atan2.f6413.6
Simplified13.6%
herbie shell --seed 2024199
(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)))))