
(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 (* (atan2 x.im x.re) y.im))
(t_1 (+ (* x.re x.re) (* x.im x.im)))
(t_2 (* y.re (atan2 x.im x.re)))
(t_3 (sin t_2))
(t_4 (+ t_3 (* y.im (* (log (hypot x.im x.re)) (cos t_2)))))
(t_5 (* (exp (- (* y.re (log (sqrt t_1))) t_0)) t_4)))
(if (<= y.re -1.4e-12)
t_5
(if (<= y.re 3.1)
(/ t_4 (/ (exp t_0) (pow (hypot x.re x.im) y.re)))
(if (<= y.re 5.5e+279) t_5 (/ t_3 (pow t_1 (/ y.re -2.0))))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = atan2(x_46_im, x_46_re) * y_46_im;
double t_1 = (x_46_re * x_46_re) + (x_46_im * x_46_im);
double t_2 = y_46_re * atan2(x_46_im, x_46_re);
double t_3 = sin(t_2);
double t_4 = t_3 + (y_46_im * (log(hypot(x_46_im, x_46_re)) * cos(t_2)));
double t_5 = exp(((y_46_re * log(sqrt(t_1))) - t_0)) * t_4;
double tmp;
if (y_46_re <= -1.4e-12) {
tmp = t_5;
} else if (y_46_re <= 3.1) {
tmp = t_4 / (exp(t_0) / pow(hypot(x_46_re, x_46_im), y_46_re));
} else if (y_46_re <= 5.5e+279) {
tmp = t_5;
} else {
tmp = t_3 / pow(t_1, (y_46_re / -2.0));
}
return tmp;
}
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = Math.atan2(x_46_im, x_46_re) * y_46_im;
double t_1 = (x_46_re * x_46_re) + (x_46_im * x_46_im);
double t_2 = y_46_re * Math.atan2(x_46_im, x_46_re);
double t_3 = Math.sin(t_2);
double t_4 = t_3 + (y_46_im * (Math.log(Math.hypot(x_46_im, x_46_re)) * Math.cos(t_2)));
double t_5 = Math.exp(((y_46_re * Math.log(Math.sqrt(t_1))) - t_0)) * t_4;
double tmp;
if (y_46_re <= -1.4e-12) {
tmp = t_5;
} else if (y_46_re <= 3.1) {
tmp = t_4 / (Math.exp(t_0) / Math.pow(Math.hypot(x_46_re, x_46_im), y_46_re));
} else if (y_46_re <= 5.5e+279) {
tmp = t_5;
} else {
tmp = t_3 / Math.pow(t_1, (y_46_re / -2.0));
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): t_0 = math.atan2(x_46_im, x_46_re) * y_46_im t_1 = (x_46_re * x_46_re) + (x_46_im * x_46_im) t_2 = y_46_re * math.atan2(x_46_im, x_46_re) t_3 = math.sin(t_2) t_4 = t_3 + (y_46_im * (math.log(math.hypot(x_46_im, x_46_re)) * math.cos(t_2))) t_5 = math.exp(((y_46_re * math.log(math.sqrt(t_1))) - t_0)) * t_4 tmp = 0 if y_46_re <= -1.4e-12: tmp = t_5 elif y_46_re <= 3.1: tmp = t_4 / (math.exp(t_0) / math.pow(math.hypot(x_46_re, x_46_im), y_46_re)) elif y_46_re <= 5.5e+279: tmp = t_5 else: tmp = t_3 / math.pow(t_1, (y_46_re / -2.0)) return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = Float64(atan(x_46_im, x_46_re) * y_46_im) t_1 = Float64(Float64(x_46_re * x_46_re) + Float64(x_46_im * x_46_im)) t_2 = Float64(y_46_re * atan(x_46_im, x_46_re)) t_3 = sin(t_2) t_4 = Float64(t_3 + Float64(y_46_im * Float64(log(hypot(x_46_im, x_46_re)) * cos(t_2)))) t_5 = Float64(exp(Float64(Float64(y_46_re * log(sqrt(t_1))) - t_0)) * t_4) tmp = 0.0 if (y_46_re <= -1.4e-12) tmp = t_5; elseif (y_46_re <= 3.1) tmp = Float64(t_4 / Float64(exp(t_0) / (hypot(x_46_re, x_46_im) ^ y_46_re))); elseif (y_46_re <= 5.5e+279) tmp = t_5; else tmp = Float64(t_3 / (t_1 ^ Float64(y_46_re / -2.0))); end return tmp end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = atan2(x_46_im, x_46_re) * y_46_im; t_1 = (x_46_re * x_46_re) + (x_46_im * x_46_im); t_2 = y_46_re * atan2(x_46_im, x_46_re); t_3 = sin(t_2); t_4 = t_3 + (y_46_im * (log(hypot(x_46_im, x_46_re)) * cos(t_2))); t_5 = exp(((y_46_re * log(sqrt(t_1))) - t_0)) * t_4; tmp = 0.0; if (y_46_re <= -1.4e-12) tmp = t_5; elseif (y_46_re <= 3.1) tmp = t_4 / (exp(t_0) / (hypot(x_46_re, x_46_im) ^ y_46_re)); elseif (y_46_re <= 5.5e+279) tmp = t_5; else tmp = t_3 / (t_1 ^ (y_46_re / -2.0)); end tmp_2 = tmp; end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$im), $MachinePrecision]}, Block[{t$95$1 = N[(N[(x$46$re * x$46$re), $MachinePrecision] + N[(x$46$im * x$46$im), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[Sin[t$95$2], $MachinePrecision]}, Block[{t$95$4 = N[(t$95$3 + N[(y$46$im * N[(N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision] * N[Cos[t$95$2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$5 = N[(N[Exp[N[(N[(y$46$re * N[Log[N[Sqrt[t$95$1], $MachinePrecision]], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]], $MachinePrecision] * t$95$4), $MachinePrecision]}, If[LessEqual[y$46$re, -1.4e-12], t$95$5, If[LessEqual[y$46$re, 3.1], N[(t$95$4 / N[(N[Exp[t$95$0], $MachinePrecision] / N[Power[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision], y$46$re], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$re, 5.5e+279], t$95$5, N[(t$95$3 / N[Power[t$95$1, N[(y$46$re / -2.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im\\
t_1 := x.re \cdot x.re + x.im \cdot x.im\\
t_2 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
t_3 := \sin t\_2\\
t_4 := t\_3 + y.im \cdot \left(\log \left(\mathsf{hypot}\left(x.im, x.re\right)\right) \cdot \cos t\_2\right)\\
t_5 := e^{y.re \cdot \log \left(\sqrt{t\_1}\right) - t\_0} \cdot t\_4\\
\mathbf{if}\;y.re \leq -1.4 \cdot 10^{-12}:\\
\;\;\;\;t\_5\\
\mathbf{elif}\;y.re \leq 3.1:\\
\;\;\;\;\frac{t\_4}{\frac{e^{t\_0}}{{\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re}}}\\
\mathbf{elif}\;y.re \leq 5.5 \cdot 10^{+279}:\\
\;\;\;\;t\_5\\
\mathbf{else}:\\
\;\;\;\;\frac{t\_3}{{t\_1}^{\left(\frac{y.re}{-2}\right)}}\\
\end{array}
\end{array}
if y.re < -1.4000000000000001e-12 or 3.10000000000000009 < y.re < 5.50000000000000038e279Initial program 43.7%
Taylor expanded in y.im around 0
+-lowering-+.f64N/A
sin-lowering-sin.f64N/A
*-lowering-*.f64N/A
atan2-lowering-atan2.f64N/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
log-lowering-log.f64N/A
unpow2N/A
unpow2N/A
hypot-defineN/A
hypot-lowering-hypot.f64N/A
cos-lowering-cos.f64N/A
*-lowering-*.f64N/A
atan2-lowering-atan2.f6481.0%
Simplified81.0%
if -1.4000000000000001e-12 < y.re < 3.10000000000000009Initial program 39.2%
exp-diffN/A
associate-*l/N/A
associate-/l*N/A
*-commutativeN/A
associate-/r/N/A
exp-diffN/A
Simplified83.7%
Taylor expanded in y.im around 0
+-lowering-+.f64N/A
sin-lowering-sin.f64N/A
*-lowering-*.f64N/A
atan2-lowering-atan2.f64N/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
log-lowering-log.f64N/A
unpow2N/A
unpow2N/A
hypot-defineN/A
hypot-lowering-hypot.f64N/A
cos-lowering-cos.f64N/A
*-lowering-*.f64N/A
atan2-lowering-atan2.f6488.2%
Simplified88.2%
if 5.50000000000000038e279 < y.re Initial program 30.0%
Applied egg-rr60.0%
Taylor expanded in y.im around 0
mul-1-negN/A
neg-lowering-neg.f64N/A
sin-lowering-sin.f64N/A
*-lowering-*.f64N/A
atan2-lowering-atan2.f6480.0%
Simplified80.0%
Final simplification82.4%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (* (atan2 x.im x.re) y.im))
(t_1 (* y.re (atan2 x.im x.re)))
(t_2 (log (sqrt (+ (* x.re x.re) (* x.im x.im)))))
(t_3 (* (exp (- (* y.re t_2) t_0)) (sin (+ t_1 (* t_2 y.im))))))
(if (<= t_3 INFINITY)
t_3
(/
(sin (+ t_1 (* y.im (log (hypot x.re x.im)))))
(/ (exp t_0) (pow (hypot x.re x.im) y.re))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = atan2(x_46_im, x_46_re) * y_46_im;
double t_1 = y_46_re * atan2(x_46_im, x_46_re);
double t_2 = log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))));
double t_3 = exp(((y_46_re * t_2) - t_0)) * sin((t_1 + (t_2 * y_46_im)));
double tmp;
if (t_3 <= ((double) INFINITY)) {
tmp = t_3;
} else {
tmp = sin((t_1 + (y_46_im * log(hypot(x_46_re, x_46_im))))) / (exp(t_0) / pow(hypot(x_46_re, x_46_im), y_46_re));
}
return tmp;
}
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = Math.atan2(x_46_im, x_46_re) * y_46_im;
double t_1 = y_46_re * Math.atan2(x_46_im, x_46_re);
double t_2 = Math.log(Math.sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))));
double t_3 = Math.exp(((y_46_re * t_2) - t_0)) * Math.sin((t_1 + (t_2 * y_46_im)));
double tmp;
if (t_3 <= Double.POSITIVE_INFINITY) {
tmp = t_3;
} else {
tmp = Math.sin((t_1 + (y_46_im * Math.log(Math.hypot(x_46_re, x_46_im))))) / (Math.exp(t_0) / Math.pow(Math.hypot(x_46_re, x_46_im), y_46_re));
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): t_0 = math.atan2(x_46_im, x_46_re) * y_46_im t_1 = y_46_re * math.atan2(x_46_im, x_46_re) t_2 = math.log(math.sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im)))) t_3 = math.exp(((y_46_re * t_2) - t_0)) * math.sin((t_1 + (t_2 * y_46_im))) tmp = 0 if t_3 <= math.inf: tmp = t_3 else: tmp = math.sin((t_1 + (y_46_im * math.log(math.hypot(x_46_re, x_46_im))))) / (math.exp(t_0) / math.pow(math.hypot(x_46_re, x_46_im), y_46_re)) return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = Float64(atan(x_46_im, x_46_re) * y_46_im) t_1 = Float64(y_46_re * atan(x_46_im, x_46_re)) t_2 = log(sqrt(Float64(Float64(x_46_re * x_46_re) + Float64(x_46_im * x_46_im)))) t_3 = Float64(exp(Float64(Float64(y_46_re * t_2) - t_0)) * sin(Float64(t_1 + Float64(t_2 * y_46_im)))) tmp = 0.0 if (t_3 <= Inf) tmp = t_3; else tmp = Float64(sin(Float64(t_1 + Float64(y_46_im * log(hypot(x_46_re, x_46_im))))) / Float64(exp(t_0) / (hypot(x_46_re, x_46_im) ^ y_46_re))); end return tmp end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = atan2(x_46_im, x_46_re) * y_46_im; t_1 = y_46_re * atan2(x_46_im, x_46_re); t_2 = log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im)))); t_3 = exp(((y_46_re * t_2) - t_0)) * sin((t_1 + (t_2 * y_46_im))); tmp = 0.0; if (t_3 <= Inf) tmp = t_3; else tmp = sin((t_1 + (y_46_im * log(hypot(x_46_re, x_46_im))))) / (exp(t_0) / (hypot(x_46_re, x_46_im) ^ y_46_re)); end tmp_2 = tmp; end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$im), $MachinePrecision]}, Block[{t$95$1 = N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[Log[N[Sqrt[N[(N[(x$46$re * x$46$re), $MachinePrecision] + N[(x$46$im * x$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]}, Block[{t$95$3 = N[(N[Exp[N[(N[(y$46$re * t$95$2), $MachinePrecision] - t$95$0), $MachinePrecision]], $MachinePrecision] * N[Sin[N[(t$95$1 + N[(t$95$2 * y$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$3, Infinity], t$95$3, N[(N[Sin[N[(t$95$1 + N[(y$46$im * N[Log[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / N[(N[Exp[t$95$0], $MachinePrecision] / N[Power[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision], y$46$re], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im\\
t_1 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
t_2 := \log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right)\\
t_3 := e^{y.re \cdot t\_2 - t\_0} \cdot \sin \left(t\_1 + t\_2 \cdot y.im\right)\\
\mathbf{if}\;t\_3 \leq \infty:\\
\;\;\;\;t\_3\\
\mathbf{else}:\\
\;\;\;\;\frac{\sin \left(t\_1 + y.im \cdot \log \left(\mathsf{hypot}\left(x.re, x.im\right)\right)\right)}{\frac{e^{t\_0}}{{\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re}}}\\
\end{array}
\end{array}
if (*.f64 (exp.f64 (-.f64 (*.f64 (log.f64 (sqrt.f64 (+.f64 (*.f64 x.re x.re) (*.f64 x.im x.im)))) y.re) (*.f64 (atan2.f64 x.im x.re) y.im))) (sin.f64 (+.f64 (*.f64 (log.f64 (sqrt.f64 (+.f64 (*.f64 x.re x.re) (*.f64 x.im x.im)))) y.im) (*.f64 (atan2.f64 x.im x.re) y.re)))) < +inf.0Initial program 80.8%
if +inf.0 < (*.f64 (exp.f64 (-.f64 (*.f64 (log.f64 (sqrt.f64 (+.f64 (*.f64 x.re x.re) (*.f64 x.im x.im)))) y.re) (*.f64 (atan2.f64 x.im x.re) y.im))) (sin.f64 (+.f64 (*.f64 (log.f64 (sqrt.f64 (+.f64 (*.f64 x.re x.re) (*.f64 x.im x.im)))) y.im) (*.f64 (atan2.f64 x.im x.re) y.re)))) Initial program 0.0%
exp-diffN/A
associate-*l/N/A
associate-/l*N/A
*-commutativeN/A
associate-/r/N/A
exp-diffN/A
Simplified73.3%
Final simplification77.1%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (* y.re (atan2 x.im x.re)))
(t_1 (* t_0 (pow (hypot x.im x.re) y.re))))
(if (<= y.re -3.3e+103)
t_1
(if (<= y.re 3.4e+201)
(/
(+ (sin t_0) (* y.im (* (log (hypot x.im x.re)) (cos t_0))))
(/ (exp (* (atan2 x.im x.re) y.im)) (pow (hypot x.re x.im) y.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_re * atan2(x_46_im, x_46_re);
double t_1 = t_0 * pow(hypot(x_46_im, x_46_re), y_46_re);
double tmp;
if (y_46_re <= -3.3e+103) {
tmp = t_1;
} else if (y_46_re <= 3.4e+201) {
tmp = (sin(t_0) + (y_46_im * (log(hypot(x_46_im, x_46_re)) * cos(t_0)))) / (exp((atan2(x_46_im, x_46_re) * y_46_im)) / pow(hypot(x_46_re, x_46_im), y_46_re));
} else {
tmp = t_1;
}
return tmp;
}
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = y_46_re * Math.atan2(x_46_im, x_46_re);
double t_1 = t_0 * Math.pow(Math.hypot(x_46_im, x_46_re), y_46_re);
double tmp;
if (y_46_re <= -3.3e+103) {
tmp = t_1;
} else if (y_46_re <= 3.4e+201) {
tmp = (Math.sin(t_0) + (y_46_im * (Math.log(Math.hypot(x_46_im, x_46_re)) * Math.cos(t_0)))) / (Math.exp((Math.atan2(x_46_im, x_46_re) * y_46_im)) / Math.pow(Math.hypot(x_46_re, x_46_im), y_46_re));
} else {
tmp = t_1;
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): t_0 = y_46_re * math.atan2(x_46_im, x_46_re) t_1 = t_0 * math.pow(math.hypot(x_46_im, x_46_re), y_46_re) tmp = 0 if y_46_re <= -3.3e+103: tmp = t_1 elif y_46_re <= 3.4e+201: tmp = (math.sin(t_0) + (y_46_im * (math.log(math.hypot(x_46_im, x_46_re)) * math.cos(t_0)))) / (math.exp((math.atan2(x_46_im, x_46_re) * y_46_im)) / math.pow(math.hypot(x_46_re, x_46_im), y_46_re)) else: tmp = t_1 return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = Float64(y_46_re * atan(x_46_im, x_46_re)) t_1 = Float64(t_0 * (hypot(x_46_im, x_46_re) ^ y_46_re)) tmp = 0.0 if (y_46_re <= -3.3e+103) tmp = t_1; elseif (y_46_re <= 3.4e+201) tmp = Float64(Float64(sin(t_0) + Float64(y_46_im * Float64(log(hypot(x_46_im, x_46_re)) * cos(t_0)))) / Float64(exp(Float64(atan(x_46_im, x_46_re) * y_46_im)) / (hypot(x_46_re, x_46_im) ^ y_46_re))); else tmp = t_1; end return tmp end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = y_46_re * atan2(x_46_im, x_46_re); t_1 = t_0 * (hypot(x_46_im, x_46_re) ^ y_46_re); tmp = 0.0; if (y_46_re <= -3.3e+103) tmp = t_1; elseif (y_46_re <= 3.4e+201) tmp = (sin(t_0) + (y_46_im * (log(hypot(x_46_im, x_46_re)) * cos(t_0)))) / (exp((atan2(x_46_im, x_46_re) * y_46_im)) / (hypot(x_46_re, x_46_im) ^ y_46_re)); else tmp = t_1; end tmp_2 = tmp; end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(t$95$0 * N[Power[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision], y$46$re], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y$46$re, -3.3e+103], t$95$1, If[LessEqual[y$46$re, 3.4e+201], N[(N[(N[Sin[t$95$0], $MachinePrecision] + N[(y$46$im * N[(N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision] * N[Cos[t$95$0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(N[Exp[N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$im), $MachinePrecision]], $MachinePrecision] / N[Power[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision], y$46$re], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
t_1 := t\_0 \cdot {\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re}\\
\mathbf{if}\;y.re \leq -3.3 \cdot 10^{+103}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y.re \leq 3.4 \cdot 10^{+201}:\\
\;\;\;\;\frac{\sin t\_0 + y.im \cdot \left(\log \left(\mathsf{hypot}\left(x.im, x.re\right)\right) \cdot \cos t\_0\right)}{\frac{e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}}{{\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re}}}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if y.re < -3.30000000000000009e103 or 3.4e201 < y.re Initial program 40.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
unpow2N/A
unpow2N/A
hypot-defineN/A
hypot-lowering-hypot.f6470.4%
Simplified70.4%
Taylor expanded in y.re around 0
*-lowering-*.f64N/A
atan2-lowering-atan2.f6474.4%
Simplified74.4%
if -3.30000000000000009e103 < y.re < 3.4e201Initial program 41.3%
exp-diffN/A
associate-*l/N/A
associate-/l*N/A
*-commutativeN/A
associate-/r/N/A
exp-diffN/A
Simplified79.4%
Taylor expanded in y.im around 0
+-lowering-+.f64N/A
sin-lowering-sin.f64N/A
*-lowering-*.f64N/A
atan2-lowering-atan2.f64N/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
log-lowering-log.f64N/A
unpow2N/A
unpow2N/A
hypot-defineN/A
hypot-lowering-hypot.f64N/A
cos-lowering-cos.f64N/A
*-lowering-*.f64N/A
atan2-lowering-atan2.f6483.4%
Simplified83.4%
(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+103)
(* t_0 (pow (hypot x.im x.re) y.re))
(if (<= y.re 550000000000.0)
(/
(sin (+ t_0 (* y.im (log (hypot x.re x.im)))))
(/ (exp (* (atan2 x.im x.re) y.im)) (pow (hypot x.re x.im) y.re)))
(/ (sin t_0) (pow (+ (* x.re x.re) (* x.im x.im)) (/ y.re -2.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 tmp;
if (y_46_re <= -3.3e+103) {
tmp = t_0 * pow(hypot(x_46_im, x_46_re), y_46_re);
} else if (y_46_re <= 550000000000.0) {
tmp = sin((t_0 + (y_46_im * log(hypot(x_46_re, x_46_im))))) / (exp((atan2(x_46_im, x_46_re) * y_46_im)) / pow(hypot(x_46_re, x_46_im), y_46_re));
} else {
tmp = sin(t_0) / pow(((x_46_re * x_46_re) + (x_46_im * x_46_im)), (y_46_re / -2.0));
}
return tmp;
}
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = y_46_re * Math.atan2(x_46_im, x_46_re);
double tmp;
if (y_46_re <= -3.3e+103) {
tmp = t_0 * Math.pow(Math.hypot(x_46_im, x_46_re), y_46_re);
} else if (y_46_re <= 550000000000.0) {
tmp = Math.sin((t_0 + (y_46_im * Math.log(Math.hypot(x_46_re, x_46_im))))) / (Math.exp((Math.atan2(x_46_im, x_46_re) * y_46_im)) / Math.pow(Math.hypot(x_46_re, x_46_im), y_46_re));
} else {
tmp = Math.sin(t_0) / Math.pow(((x_46_re * x_46_re) + (x_46_im * x_46_im)), (y_46_re / -2.0));
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): t_0 = y_46_re * math.atan2(x_46_im, x_46_re) tmp = 0 if y_46_re <= -3.3e+103: tmp = t_0 * math.pow(math.hypot(x_46_im, x_46_re), y_46_re) elif y_46_re <= 550000000000.0: tmp = math.sin((t_0 + (y_46_im * math.log(math.hypot(x_46_re, x_46_im))))) / (math.exp((math.atan2(x_46_im, x_46_re) * y_46_im)) / math.pow(math.hypot(x_46_re, x_46_im), y_46_re)) else: tmp = math.sin(t_0) / math.pow(((x_46_re * x_46_re) + (x_46_im * x_46_im)), (y_46_re / -2.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)) tmp = 0.0 if (y_46_re <= -3.3e+103) tmp = Float64(t_0 * (hypot(x_46_im, x_46_re) ^ y_46_re)); elseif (y_46_re <= 550000000000.0) tmp = Float64(sin(Float64(t_0 + Float64(y_46_im * log(hypot(x_46_re, x_46_im))))) / Float64(exp(Float64(atan(x_46_im, x_46_re) * y_46_im)) / (hypot(x_46_re, x_46_im) ^ y_46_re))); else tmp = Float64(sin(t_0) / (Float64(Float64(x_46_re * x_46_re) + Float64(x_46_im * x_46_im)) ^ Float64(y_46_re / -2.0))); end return tmp end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = y_46_re * atan2(x_46_im, x_46_re); tmp = 0.0; if (y_46_re <= -3.3e+103) tmp = t_0 * (hypot(x_46_im, x_46_re) ^ y_46_re); elseif (y_46_re <= 550000000000.0) tmp = sin((t_0 + (y_46_im * log(hypot(x_46_re, x_46_im))))) / (exp((atan2(x_46_im, x_46_re) * y_46_im)) / (hypot(x_46_re, x_46_im) ^ y_46_re)); else tmp = sin(t_0) / (((x_46_re * x_46_re) + (x_46_im * x_46_im)) ^ (y_46_re / -2.0)); end tmp_2 = tmp; end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y$46$re, -3.3e+103], N[(t$95$0 * N[Power[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision], y$46$re], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$re, 550000000000.0], N[(N[Sin[N[(t$95$0 + N[(y$46$im * N[Log[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / N[(N[Exp[N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$im), $MachinePrecision]], $MachinePrecision] / N[Power[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision], y$46$re], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[Sin[t$95$0], $MachinePrecision] / N[Power[N[(N[(x$46$re * x$46$re), $MachinePrecision] + N[(x$46$im * x$46$im), $MachinePrecision]), $MachinePrecision], N[(y$46$re / -2.0), $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 -3.3 \cdot 10^{+103}:\\
\;\;\;\;t\_0 \cdot {\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re}\\
\mathbf{elif}\;y.re \leq 550000000000:\\
\;\;\;\;\frac{\sin \left(t\_0 + y.im \cdot \log \left(\mathsf{hypot}\left(x.re, x.im\right)\right)\right)}{\frac{e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}}{{\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re}}}\\
\mathbf{else}:\\
\;\;\;\;\frac{\sin t\_0}{{\left(x.re \cdot x.re + x.im \cdot x.im\right)}^{\left(\frac{y.re}{-2}\right)}}\\
\end{array}
\end{array}
if y.re < -3.30000000000000009e103Initial program 43.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
unpow2N/A
unpow2N/A
hypot-defineN/A
hypot-lowering-hypot.f6482.2%
Simplified82.2%
Taylor expanded in y.re around 0
*-lowering-*.f64N/A
atan2-lowering-atan2.f6484.8%
Simplified84.8%
if -3.30000000000000009e103 < y.re < 5.5e11Initial program 41.9%
exp-diffN/A
associate-*l/N/A
associate-/l*N/A
*-commutativeN/A
associate-/r/N/A
exp-diffN/A
Simplified85.4%
if 5.5e11 < y.re Initial program 38.2%
Applied egg-rr32.9%
Taylor expanded in y.im around 0
mul-1-negN/A
neg-lowering-neg.f64N/A
sin-lowering-sin.f64N/A
*-lowering-*.f64N/A
atan2-lowering-atan2.f6460.6%
Simplified60.6%
Final simplification77.2%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (sin (* y.re (atan2 x.im x.re)))))
(if (<= y.re -1.75e-25)
(* t_0 (pow (hypot x.im x.re) y.re))
(if (<= y.re 7.8e+68)
(/ (* y.im (log (hypot x.im x.re))) (exp (* (atan2 x.im x.re) y.im)))
(/ t_0 (pow (+ (* x.re x.re) (* x.im x.im)) (/ y.re -2.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)));
double tmp;
if (y_46_re <= -1.75e-25) {
tmp = t_0 * pow(hypot(x_46_im, x_46_re), y_46_re);
} else if (y_46_re <= 7.8e+68) {
tmp = (y_46_im * log(hypot(x_46_im, x_46_re))) / exp((atan2(x_46_im, x_46_re) * y_46_im));
} else {
tmp = t_0 / pow(((x_46_re * x_46_re) + (x_46_im * x_46_im)), (y_46_re / -2.0));
}
return tmp;
}
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = Math.sin((y_46_re * Math.atan2(x_46_im, x_46_re)));
double tmp;
if (y_46_re <= -1.75e-25) {
tmp = t_0 * Math.pow(Math.hypot(x_46_im, x_46_re), y_46_re);
} else if (y_46_re <= 7.8e+68) {
tmp = (y_46_im * Math.log(Math.hypot(x_46_im, x_46_re))) / Math.exp((Math.atan2(x_46_im, x_46_re) * y_46_im));
} else {
tmp = t_0 / Math.pow(((x_46_re * x_46_re) + (x_46_im * x_46_im)), (y_46_re / -2.0));
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): t_0 = math.sin((y_46_re * math.atan2(x_46_im, x_46_re))) tmp = 0 if y_46_re <= -1.75e-25: tmp = t_0 * math.pow(math.hypot(x_46_im, x_46_re), y_46_re) elif y_46_re <= 7.8e+68: tmp = (y_46_im * math.log(math.hypot(x_46_im, x_46_re))) / math.exp((math.atan2(x_46_im, x_46_re) * y_46_im)) else: tmp = t_0 / math.pow(((x_46_re * x_46_re) + (x_46_im * x_46_im)), (y_46_re / -2.0)) 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))) tmp = 0.0 if (y_46_re <= -1.75e-25) tmp = Float64(t_0 * (hypot(x_46_im, x_46_re) ^ y_46_re)); elseif (y_46_re <= 7.8e+68) tmp = Float64(Float64(y_46_im * log(hypot(x_46_im, x_46_re))) / exp(Float64(atan(x_46_im, x_46_re) * y_46_im))); else tmp = Float64(t_0 / (Float64(Float64(x_46_re * x_46_re) + Float64(x_46_im * x_46_im)) ^ Float64(y_46_re / -2.0))); end return tmp end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = sin((y_46_re * atan2(x_46_im, x_46_re))); tmp = 0.0; if (y_46_re <= -1.75e-25) tmp = t_0 * (hypot(x_46_im, x_46_re) ^ y_46_re); elseif (y_46_re <= 7.8e+68) tmp = (y_46_im * log(hypot(x_46_im, x_46_re))) / exp((atan2(x_46_im, x_46_re) * y_46_im)); else tmp = t_0 / (((x_46_re * x_46_re) + (x_46_im * x_46_im)) ^ (y_46_re / -2.0)); end tmp_2 = 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]}, If[LessEqual[y$46$re, -1.75e-25], N[(t$95$0 * N[Power[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision], y$46$re], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$re, 7.8e+68], N[(N[(y$46$im * N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / N[Exp[N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$im), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(t$95$0 / N[Power[N[(N[(x$46$re * x$46$re), $MachinePrecision] + N[(x$46$im * x$46$im), $MachinePrecision]), $MachinePrecision], N[(y$46$re / -2.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\\
\mathbf{if}\;y.re \leq -1.75 \cdot 10^{-25}:\\
\;\;\;\;t\_0 \cdot {\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re}\\
\mathbf{elif}\;y.re \leq 7.8 \cdot 10^{+68}:\\
\;\;\;\;\frac{y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)}{e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}}\\
\mathbf{else}:\\
\;\;\;\;\frac{t\_0}{{\left(x.re \cdot x.re + x.im \cdot x.im\right)}^{\left(\frac{y.re}{-2}\right)}}\\
\end{array}
\end{array}
if y.re < -1.7500000000000001e-25Initial program 48.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
unpow2N/A
unpow2N/A
hypot-defineN/A
hypot-lowering-hypot.f6484.1%
Simplified84.1%
if -1.7500000000000001e-25 < y.re < 7.80000000000000037e68Initial program 39.9%
exp-diffN/A
associate-*l/N/A
associate-/l*N/A
*-commutativeN/A
associate-/r/N/A
exp-diffN/A
Simplified79.3%
Taylor expanded in y.re around 0
/-lowering-/.f64N/A
sin-lowering-sin.f64N/A
*-lowering-*.f64N/A
log-lowering-log.f64N/A
unpow2N/A
unpow2N/A
hypot-defineN/A
hypot-lowering-hypot.f64N/A
exp-lowering-exp.f64N/A
*-lowering-*.f64N/A
atan2-lowering-atan2.f6466.3%
Simplified66.3%
Taylor expanded in y.im around 0
*-lowering-*.f64N/A
log-lowering-log.f64N/A
unpow2N/A
unpow2N/A
hypot-defineN/A
hypot-lowering-hypot.f6472.6%
Simplified72.6%
if 7.80000000000000037e68 < y.re Initial program 36.1%
Applied egg-rr31.1%
Taylor expanded in y.im around 0
mul-1-negN/A
neg-lowering-neg.f64N/A
sin-lowering-sin.f64N/A
*-lowering-*.f64N/A
atan2-lowering-atan2.f6464.0%
Simplified64.0%
Final simplification71.8%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (sin (* y.re (atan2 x.im x.re)))))
(if (<= y.re -7.5e-58)
(* t_0 (pow (hypot x.im x.re) y.re))
(if (<= y.re 1.92e-50)
(* y.im (log (hypot x.im x.re)))
(/ t_0 (pow (+ (* x.re x.re) (* x.im x.im)) (/ y.re -2.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)));
double tmp;
if (y_46_re <= -7.5e-58) {
tmp = t_0 * pow(hypot(x_46_im, x_46_re), y_46_re);
} else if (y_46_re <= 1.92e-50) {
tmp = y_46_im * log(hypot(x_46_im, x_46_re));
} else {
tmp = t_0 / pow(((x_46_re * x_46_re) + (x_46_im * x_46_im)), (y_46_re / -2.0));
}
return tmp;
}
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = Math.sin((y_46_re * Math.atan2(x_46_im, x_46_re)));
double tmp;
if (y_46_re <= -7.5e-58) {
tmp = t_0 * Math.pow(Math.hypot(x_46_im, x_46_re), y_46_re);
} else if (y_46_re <= 1.92e-50) {
tmp = y_46_im * Math.log(Math.hypot(x_46_im, x_46_re));
} else {
tmp = t_0 / Math.pow(((x_46_re * x_46_re) + (x_46_im * x_46_im)), (y_46_re / -2.0));
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): t_0 = math.sin((y_46_re * math.atan2(x_46_im, x_46_re))) tmp = 0 if y_46_re <= -7.5e-58: tmp = t_0 * math.pow(math.hypot(x_46_im, x_46_re), y_46_re) elif y_46_re <= 1.92e-50: tmp = y_46_im * math.log(math.hypot(x_46_im, x_46_re)) else: tmp = t_0 / math.pow(((x_46_re * x_46_re) + (x_46_im * x_46_im)), (y_46_re / -2.0)) 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))) tmp = 0.0 if (y_46_re <= -7.5e-58) tmp = Float64(t_0 * (hypot(x_46_im, x_46_re) ^ y_46_re)); elseif (y_46_re <= 1.92e-50) tmp = Float64(y_46_im * log(hypot(x_46_im, x_46_re))); else tmp = Float64(t_0 / (Float64(Float64(x_46_re * x_46_re) + Float64(x_46_im * x_46_im)) ^ Float64(y_46_re / -2.0))); end return tmp end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = sin((y_46_re * atan2(x_46_im, x_46_re))); tmp = 0.0; if (y_46_re <= -7.5e-58) tmp = t_0 * (hypot(x_46_im, x_46_re) ^ y_46_re); elseif (y_46_re <= 1.92e-50) tmp = y_46_im * log(hypot(x_46_im, x_46_re)); else tmp = t_0 / (((x_46_re * x_46_re) + (x_46_im * x_46_im)) ^ (y_46_re / -2.0)); end tmp_2 = 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]}, If[LessEqual[y$46$re, -7.5e-58], N[(t$95$0 * N[Power[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision], y$46$re], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$re, 1.92e-50], N[(y$46$im * N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(t$95$0 / N[Power[N[(N[(x$46$re * x$46$re), $MachinePrecision] + N[(x$46$im * x$46$im), $MachinePrecision]), $MachinePrecision], N[(y$46$re / -2.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\\
\mathbf{if}\;y.re \leq -7.5 \cdot 10^{-58}:\\
\;\;\;\;t\_0 \cdot {\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re}\\
\mathbf{elif}\;y.re \leq 1.92 \cdot 10^{-50}:\\
\;\;\;\;y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{t\_0}{{\left(x.re \cdot x.re + x.im \cdot x.im\right)}^{\left(\frac{y.re}{-2}\right)}}\\
\end{array}
\end{array}
if y.re < -7.50000000000000002e-58Initial program 52.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
unpow2N/A
unpow2N/A
hypot-defineN/A
hypot-lowering-hypot.f6477.7%
Simplified77.7%
if -7.50000000000000002e-58 < y.re < 1.92e-50Initial program 35.3%
Taylor expanded in y.im around 0
pow-lowering-pow.f64N/A
unpow2N/A
unpow2N/A
hypot-defineN/A
hypot-lowering-hypot.f6422.4%
Simplified22.4%
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
+-lowering-+.f64N/A
unpow2N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6414.7%
Simplified14.7%
Taylor expanded in y.im around 0
*-lowering-*.f64N/A
log-lowering-log.f64N/A
unpow2N/A
unpow2N/A
hypot-defineN/A
hypot-lowering-hypot.f6441.2%
Simplified41.2%
if 1.92e-50 < y.re Initial program 38.5%
Applied egg-rr33.3%
Taylor expanded in y.im around 0
mul-1-negN/A
neg-lowering-neg.f64N/A
sin-lowering-sin.f64N/A
*-lowering-*.f64N/A
atan2-lowering-atan2.f6460.4%
Simplified60.4%
Final simplification56.2%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (sin (* y.re (atan2 x.im x.re))))
(t_1 (pow (+ (* x.re x.re) (* x.im x.im)) (/ y.re -2.0))))
(if (<= y.re -5.8e-150)
(/ 1.0 (/ t_1 t_0))
(if (<= y.re 4.7e-51) (* y.im (log (hypot x.im x.re))) (/ t_0 t_1)))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = sin((y_46_re * atan2(x_46_im, x_46_re)));
double t_1 = pow(((x_46_re * x_46_re) + (x_46_im * x_46_im)), (y_46_re / -2.0));
double tmp;
if (y_46_re <= -5.8e-150) {
tmp = 1.0 / (t_1 / t_0);
} else if (y_46_re <= 4.7e-51) {
tmp = y_46_im * log(hypot(x_46_im, x_46_re));
} else {
tmp = t_0 / t_1;
}
return tmp;
}
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = Math.sin((y_46_re * Math.atan2(x_46_im, x_46_re)));
double t_1 = Math.pow(((x_46_re * x_46_re) + (x_46_im * x_46_im)), (y_46_re / -2.0));
double tmp;
if (y_46_re <= -5.8e-150) {
tmp = 1.0 / (t_1 / t_0);
} else if (y_46_re <= 4.7e-51) {
tmp = y_46_im * Math.log(Math.hypot(x_46_im, x_46_re));
} else {
tmp = t_0 / t_1;
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): t_0 = math.sin((y_46_re * math.atan2(x_46_im, x_46_re))) t_1 = math.pow(((x_46_re * x_46_re) + (x_46_im * x_46_im)), (y_46_re / -2.0)) tmp = 0 if y_46_re <= -5.8e-150: tmp = 1.0 / (t_1 / t_0) elif y_46_re <= 4.7e-51: tmp = y_46_im * math.log(math.hypot(x_46_im, x_46_re)) else: tmp = t_0 / 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(Float64(x_46_re * x_46_re) + Float64(x_46_im * x_46_im)) ^ Float64(y_46_re / -2.0) tmp = 0.0 if (y_46_re <= -5.8e-150) tmp = Float64(1.0 / Float64(t_1 / t_0)); elseif (y_46_re <= 4.7e-51) tmp = Float64(y_46_im * log(hypot(x_46_im, x_46_re))); else tmp = Float64(t_0 / t_1); end return tmp end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = sin((y_46_re * atan2(x_46_im, x_46_re))); t_1 = ((x_46_re * x_46_re) + (x_46_im * x_46_im)) ^ (y_46_re / -2.0); tmp = 0.0; if (y_46_re <= -5.8e-150) tmp = 1.0 / (t_1 / t_0); elseif (y_46_re <= 4.7e-51) tmp = y_46_im * log(hypot(x_46_im, x_46_re)); else tmp = t_0 / t_1; end tmp_2 = tmp; end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[Sin[N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$1 = N[Power[N[(N[(x$46$re * x$46$re), $MachinePrecision] + N[(x$46$im * x$46$im), $MachinePrecision]), $MachinePrecision], N[(y$46$re / -2.0), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[y$46$re, -5.8e-150], N[(1.0 / N[(t$95$1 / t$95$0), $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$re, 4.7e-51], N[(y$46$im * N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(t$95$0 / t$95$1), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\\
t_1 := {\left(x.re \cdot x.re + x.im \cdot x.im\right)}^{\left(\frac{y.re}{-2}\right)}\\
\mathbf{if}\;y.re \leq -5.8 \cdot 10^{-150}:\\
\;\;\;\;\frac{1}{\frac{t\_1}{t\_0}}\\
\mathbf{elif}\;y.re \leq 4.7 \cdot 10^{-51}:\\
\;\;\;\;y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{t\_0}{t\_1}\\
\end{array}
\end{array}
if y.re < -5.7999999999999996e-150Initial program 47.2%
Applied egg-rr32.5%
Taylor expanded in y.im around 0
mul-1-negN/A
neg-lowering-neg.f64N/A
sin-lowering-sin.f64N/A
*-lowering-*.f64N/A
atan2-lowering-atan2.f6461.6%
Simplified61.6%
clear-numN/A
/-lowering-/.f64N/A
sub0-negN/A
frac-2negN/A
/-lowering-/.f64N/A
pow-lowering-pow.f64N/A
+-commutativeN/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
sin-lowering-sin.f64N/A
*-lowering-*.f64N/A
atan2-lowering-atan2.f6466.1%
Applied egg-rr66.1%
if -5.7999999999999996e-150 < y.re < 4.6999999999999997e-51Initial program 37.2%
Taylor expanded in y.im around 0
pow-lowering-pow.f64N/A
unpow2N/A
unpow2N/A
hypot-defineN/A
hypot-lowering-hypot.f6424.8%
Simplified24.8%
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
+-lowering-+.f64N/A
unpow2N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6417.6%
Simplified17.6%
Taylor expanded in y.im around 0
*-lowering-*.f64N/A
log-lowering-log.f64N/A
unpow2N/A
unpow2N/A
hypot-defineN/A
hypot-lowering-hypot.f6443.7%
Simplified43.7%
if 4.6999999999999997e-51 < y.re Initial program 38.5%
Applied egg-rr33.3%
Taylor expanded in y.im around 0
mul-1-negN/A
neg-lowering-neg.f64N/A
sin-lowering-sin.f64N/A
*-lowering-*.f64N/A
atan2-lowering-atan2.f6460.4%
Simplified60.4%
Final simplification55.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 -7e-145)
(/ 1.0 (/ (pow (+ (* x.re x.re) (* x.im x.im)) (/ y.re -2.0)) (sin t_0)))
(if (<= y.re 1.15e-80)
(* y.im (log (hypot x.im x.re)))
(* t_0 (pow (hypot 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 = y_46_re * atan2(x_46_im, x_46_re);
double tmp;
if (y_46_re <= -7e-145) {
tmp = 1.0 / (pow(((x_46_re * x_46_re) + (x_46_im * x_46_im)), (y_46_re / -2.0)) / sin(t_0));
} else if (y_46_re <= 1.15e-80) {
tmp = y_46_im * log(hypot(x_46_im, x_46_re));
} else {
tmp = t_0 * pow(hypot(x_46_im, x_46_re), y_46_re);
}
return tmp;
}
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = y_46_re * Math.atan2(x_46_im, x_46_re);
double tmp;
if (y_46_re <= -7e-145) {
tmp = 1.0 / (Math.pow(((x_46_re * x_46_re) + (x_46_im * x_46_im)), (y_46_re / -2.0)) / Math.sin(t_0));
} else if (y_46_re <= 1.15e-80) {
tmp = y_46_im * Math.log(Math.hypot(x_46_im, x_46_re));
} else {
tmp = t_0 * Math.pow(Math.hypot(x_46_im, x_46_re), y_46_re);
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): t_0 = y_46_re * math.atan2(x_46_im, x_46_re) tmp = 0 if y_46_re <= -7e-145: tmp = 1.0 / (math.pow(((x_46_re * x_46_re) + (x_46_im * x_46_im)), (y_46_re / -2.0)) / math.sin(t_0)) elif y_46_re <= 1.15e-80: tmp = y_46_im * math.log(math.hypot(x_46_im, x_46_re)) else: tmp = t_0 * math.pow(math.hypot(x_46_im, 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 (y_46_re <= -7e-145) tmp = Float64(1.0 / Float64((Float64(Float64(x_46_re * x_46_re) + Float64(x_46_im * x_46_im)) ^ Float64(y_46_re / -2.0)) / sin(t_0))); elseif (y_46_re <= 1.15e-80) tmp = Float64(y_46_im * log(hypot(x_46_im, x_46_re))); else tmp = Float64(t_0 * (hypot(x_46_im, x_46_re) ^ y_46_re)); end return tmp end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = y_46_re * atan2(x_46_im, x_46_re); tmp = 0.0; if (y_46_re <= -7e-145) tmp = 1.0 / ((((x_46_re * x_46_re) + (x_46_im * x_46_im)) ^ (y_46_re / -2.0)) / sin(t_0)); elseif (y_46_re <= 1.15e-80) tmp = y_46_im * log(hypot(x_46_im, x_46_re)); else tmp = t_0 * (hypot(x_46_im, x_46_re) ^ y_46_re); end tmp_2 = tmp; end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y$46$re, -7e-145], N[(1.0 / N[(N[Power[N[(N[(x$46$re * x$46$re), $MachinePrecision] + N[(x$46$im * x$46$im), $MachinePrecision]), $MachinePrecision], N[(y$46$re / -2.0), $MachinePrecision]], $MachinePrecision] / N[Sin[t$95$0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$re, 1.15e-80], N[(y$46$im * N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(t$95$0 * N[Power[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision], 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 -7 \cdot 10^{-145}:\\
\;\;\;\;\frac{1}{\frac{{\left(x.re \cdot x.re + x.im \cdot x.im\right)}^{\left(\frac{y.re}{-2}\right)}}{\sin t\_0}}\\
\mathbf{elif}\;y.re \leq 1.15 \cdot 10^{-80}:\\
\;\;\;\;y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t\_0 \cdot {\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re}\\
\end{array}
\end{array}
if y.re < -6.99999999999999994e-145Initial program 47.2%
Applied egg-rr32.5%
Taylor expanded in y.im around 0
mul-1-negN/A
neg-lowering-neg.f64N/A
sin-lowering-sin.f64N/A
*-lowering-*.f64N/A
atan2-lowering-atan2.f6461.6%
Simplified61.6%
clear-numN/A
/-lowering-/.f64N/A
sub0-negN/A
frac-2negN/A
/-lowering-/.f64N/A
pow-lowering-pow.f64N/A
+-commutativeN/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
sin-lowering-sin.f64N/A
*-lowering-*.f64N/A
atan2-lowering-atan2.f6466.1%
Applied egg-rr66.1%
if -6.99999999999999994e-145 < y.re < 1.1499999999999999e-80Initial program 38.0%
Taylor expanded in y.im around 0
pow-lowering-pow.f64N/A
unpow2N/A
unpow2N/A
hypot-defineN/A
hypot-lowering-hypot.f6426.1%
Simplified26.1%
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
+-lowering-+.f64N/A
unpow2N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6418.3%
Simplified18.3%
Taylor expanded in y.im around 0
*-lowering-*.f64N/A
log-lowering-log.f64N/A
unpow2N/A
unpow2N/A
hypot-defineN/A
hypot-lowering-hypot.f6446.4%
Simplified46.4%
if 1.1499999999999999e-80 < 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
unpow2N/A
unpow2N/A
hypot-defineN/A
hypot-lowering-hypot.f6454.5%
Simplified54.5%
Taylor expanded in y.re around 0
*-lowering-*.f64N/A
atan2-lowering-atan2.f6455.6%
Simplified55.6%
Final simplification56.3%
(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.4e-147)
(* (sin t_0) (pow (+ (* x.re x.re) (* x.im x.im)) (/ y.re 2.0)))
(if (<= y.re 1.9e-81)
(* y.im (log (hypot x.im x.re)))
(* t_0 (pow (hypot 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 = y_46_re * atan2(x_46_im, x_46_re);
double tmp;
if (y_46_re <= -3.4e-147) {
tmp = sin(t_0) * pow(((x_46_re * x_46_re) + (x_46_im * x_46_im)), (y_46_re / 2.0));
} else if (y_46_re <= 1.9e-81) {
tmp = y_46_im * log(hypot(x_46_im, x_46_re));
} else {
tmp = t_0 * pow(hypot(x_46_im, x_46_re), y_46_re);
}
return tmp;
}
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = y_46_re * Math.atan2(x_46_im, x_46_re);
double tmp;
if (y_46_re <= -3.4e-147) {
tmp = Math.sin(t_0) * Math.pow(((x_46_re * x_46_re) + (x_46_im * x_46_im)), (y_46_re / 2.0));
} else if (y_46_re <= 1.9e-81) {
tmp = y_46_im * Math.log(Math.hypot(x_46_im, x_46_re));
} else {
tmp = t_0 * Math.pow(Math.hypot(x_46_im, x_46_re), y_46_re);
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): t_0 = y_46_re * math.atan2(x_46_im, x_46_re) tmp = 0 if y_46_re <= -3.4e-147: tmp = math.sin(t_0) * math.pow(((x_46_re * x_46_re) + (x_46_im * x_46_im)), (y_46_re / 2.0)) elif y_46_re <= 1.9e-81: tmp = y_46_im * math.log(math.hypot(x_46_im, x_46_re)) else: tmp = t_0 * math.pow(math.hypot(x_46_im, 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 (y_46_re <= -3.4e-147) tmp = Float64(sin(t_0) * (Float64(Float64(x_46_re * x_46_re) + Float64(x_46_im * x_46_im)) ^ Float64(y_46_re / 2.0))); elseif (y_46_re <= 1.9e-81) tmp = Float64(y_46_im * log(hypot(x_46_im, x_46_re))); else tmp = Float64(t_0 * (hypot(x_46_im, x_46_re) ^ y_46_re)); end return tmp end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = y_46_re * atan2(x_46_im, x_46_re); tmp = 0.0; if (y_46_re <= -3.4e-147) tmp = sin(t_0) * (((x_46_re * x_46_re) + (x_46_im * x_46_im)) ^ (y_46_re / 2.0)); elseif (y_46_re <= 1.9e-81) tmp = y_46_im * log(hypot(x_46_im, x_46_re)); else tmp = t_0 * (hypot(x_46_im, x_46_re) ^ y_46_re); end tmp_2 = tmp; end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y$46$re, -3.4e-147], N[(N[Sin[t$95$0], $MachinePrecision] * N[Power[N[(N[(x$46$re * x$46$re), $MachinePrecision] + N[(x$46$im * x$46$im), $MachinePrecision]), $MachinePrecision], N[(y$46$re / 2.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$re, 1.9e-81], N[(y$46$im * N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(t$95$0 * N[Power[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision], 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.4 \cdot 10^{-147}:\\
\;\;\;\;\sin t\_0 \cdot {\left(x.re \cdot x.re + x.im \cdot x.im\right)}^{\left(\frac{y.re}{2}\right)}\\
\mathbf{elif}\;y.re \leq 1.9 \cdot 10^{-81}:\\
\;\;\;\;y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t\_0 \cdot {\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re}\\
\end{array}
\end{array}
if y.re < -3.39999999999999996e-147Initial program 47.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
unpow2N/A
unpow2N/A
hypot-defineN/A
hypot-lowering-hypot.f6465.1%
Simplified65.1%
*-commutativeN/A
sqrt-pow2N/A
+-commutativeN/A
sqrt-pow2N/A
*-lowering-*.f64N/A
sqrt-pow2N/A
pow-lowering-pow.f64N/A
+-commutativeN/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
sin-lowering-sin.f64N/A
*-lowering-*.f64N/A
atan2-lowering-atan2.f6466.1%
Applied egg-rr66.1%
if -3.39999999999999996e-147 < y.re < 1.8999999999999999e-81Initial program 38.0%
Taylor expanded in y.im around 0
pow-lowering-pow.f64N/A
unpow2N/A
unpow2N/A
hypot-defineN/A
hypot-lowering-hypot.f6426.1%
Simplified26.1%
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
+-lowering-+.f64N/A
unpow2N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6418.3%
Simplified18.3%
Taylor expanded in y.im around 0
*-lowering-*.f64N/A
log-lowering-log.f64N/A
unpow2N/A
unpow2N/A
hypot-defineN/A
hypot-lowering-hypot.f6446.4%
Simplified46.4%
if 1.8999999999999999e-81 < 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
unpow2N/A
unpow2N/A
hypot-defineN/A
hypot-lowering-hypot.f6454.5%
Simplified54.5%
Taylor expanded in y.re around 0
*-lowering-*.f64N/A
atan2-lowering-atan2.f6455.6%
Simplified55.6%
Final simplification56.3%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (* y.re (atan2 x.im x.re))))
(if (<= y.re -7e-145)
(/ t_0 (pow (+ (* x.re x.re) (* x.im x.im)) (/ y.re -2.0)))
(if (<= y.re 2.7e-81)
(* y.im (log (hypot x.im x.re)))
(* t_0 (pow (hypot 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 = y_46_re * atan2(x_46_im, x_46_re);
double tmp;
if (y_46_re <= -7e-145) {
tmp = t_0 / pow(((x_46_re * x_46_re) + (x_46_im * x_46_im)), (y_46_re / -2.0));
} else if (y_46_re <= 2.7e-81) {
tmp = y_46_im * log(hypot(x_46_im, x_46_re));
} else {
tmp = t_0 * pow(hypot(x_46_im, x_46_re), y_46_re);
}
return tmp;
}
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = y_46_re * Math.atan2(x_46_im, x_46_re);
double tmp;
if (y_46_re <= -7e-145) {
tmp = t_0 / Math.pow(((x_46_re * x_46_re) + (x_46_im * x_46_im)), (y_46_re / -2.0));
} else if (y_46_re <= 2.7e-81) {
tmp = y_46_im * Math.log(Math.hypot(x_46_im, x_46_re));
} else {
tmp = t_0 * Math.pow(Math.hypot(x_46_im, x_46_re), y_46_re);
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): t_0 = y_46_re * math.atan2(x_46_im, x_46_re) tmp = 0 if y_46_re <= -7e-145: tmp = t_0 / math.pow(((x_46_re * x_46_re) + (x_46_im * x_46_im)), (y_46_re / -2.0)) elif y_46_re <= 2.7e-81: tmp = y_46_im * math.log(math.hypot(x_46_im, x_46_re)) else: tmp = t_0 * math.pow(math.hypot(x_46_im, 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 (y_46_re <= -7e-145) tmp = Float64(t_0 / (Float64(Float64(x_46_re * x_46_re) + Float64(x_46_im * x_46_im)) ^ Float64(y_46_re / -2.0))); elseif (y_46_re <= 2.7e-81) tmp = Float64(y_46_im * log(hypot(x_46_im, x_46_re))); else tmp = Float64(t_0 * (hypot(x_46_im, x_46_re) ^ y_46_re)); end return tmp end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = y_46_re * atan2(x_46_im, x_46_re); tmp = 0.0; if (y_46_re <= -7e-145) tmp = t_0 / (((x_46_re * x_46_re) + (x_46_im * x_46_im)) ^ (y_46_re / -2.0)); elseif (y_46_re <= 2.7e-81) tmp = y_46_im * log(hypot(x_46_im, x_46_re)); else tmp = t_0 * (hypot(x_46_im, x_46_re) ^ y_46_re); end tmp_2 = tmp; end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y$46$re, -7e-145], N[(t$95$0 / N[Power[N[(N[(x$46$re * x$46$re), $MachinePrecision] + N[(x$46$im * x$46$im), $MachinePrecision]), $MachinePrecision], N[(y$46$re / -2.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$re, 2.7e-81], N[(y$46$im * N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(t$95$0 * N[Power[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision], 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 -7 \cdot 10^{-145}:\\
\;\;\;\;\frac{t\_0}{{\left(x.re \cdot x.re + x.im \cdot x.im\right)}^{\left(\frac{y.re}{-2}\right)}}\\
\mathbf{elif}\;y.re \leq 2.7 \cdot 10^{-81}:\\
\;\;\;\;y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t\_0 \cdot {\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re}\\
\end{array}
\end{array}
if y.re < -6.99999999999999994e-145Initial program 47.2%
Applied egg-rr32.5%
Taylor expanded in y.im around 0
mul-1-negN/A
neg-lowering-neg.f64N/A
sin-lowering-sin.f64N/A
*-lowering-*.f64N/A
atan2-lowering-atan2.f6461.6%
Simplified61.6%
Taylor expanded in y.re around 0
*-commutativeN/A
*-lowering-*.f64N/A
atan2-lowering-atan2.f6464.5%
Simplified64.5%
if -6.99999999999999994e-145 < y.re < 2.6999999999999999e-81Initial program 38.0%
Taylor expanded in y.im around 0
pow-lowering-pow.f64N/A
unpow2N/A
unpow2N/A
hypot-defineN/A
hypot-lowering-hypot.f6426.1%
Simplified26.1%
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
+-lowering-+.f64N/A
unpow2N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6418.3%
Simplified18.3%
Taylor expanded in y.im around 0
*-lowering-*.f64N/A
log-lowering-log.f64N/A
unpow2N/A
unpow2N/A
hypot-defineN/A
hypot-lowering-hypot.f6446.4%
Simplified46.4%
if 2.6999999999999999e-81 < 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
unpow2N/A
unpow2N/A
hypot-defineN/A
hypot-lowering-hypot.f6454.5%
Simplified54.5%
Taylor expanded in y.re around 0
*-lowering-*.f64N/A
atan2-lowering-atan2.f6455.6%
Simplified55.6%
Final simplification55.0%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(if (<= y.re -3.5e-58)
(sin (* y.re (atan2 x.im x.re)))
(if (<= y.re 2.25e-46)
(* y.im (log (hypot x.im x.re)))
(*
y.re
(*
(atan2 x.im x.re)
(+ 1.0 (* y.re (* (log (+ (* x.re x.re) (* x.im x.im))) 0.5))))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double tmp;
if (y_46_re <= -3.5e-58) {
tmp = sin((y_46_re * atan2(x_46_im, x_46_re)));
} else if (y_46_re <= 2.25e-46) {
tmp = y_46_im * log(hypot(x_46_im, x_46_re));
} else {
tmp = y_46_re * (atan2(x_46_im, x_46_re) * (1.0 + (y_46_re * (log(((x_46_re * x_46_re) + (x_46_im * x_46_im))) * 0.5))));
}
return tmp;
}
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double tmp;
if (y_46_re <= -3.5e-58) {
tmp = Math.sin((y_46_re * Math.atan2(x_46_im, x_46_re)));
} else if (y_46_re <= 2.25e-46) {
tmp = y_46_im * Math.log(Math.hypot(x_46_im, x_46_re));
} else {
tmp = y_46_re * (Math.atan2(x_46_im, x_46_re) * (1.0 + (y_46_re * (Math.log(((x_46_re * x_46_re) + (x_46_im * x_46_im))) * 0.5))));
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): tmp = 0 if y_46_re <= -3.5e-58: tmp = math.sin((y_46_re * math.atan2(x_46_im, x_46_re))) elif y_46_re <= 2.25e-46: tmp = y_46_im * math.log(math.hypot(x_46_im, x_46_re)) else: tmp = y_46_re * (math.atan2(x_46_im, x_46_re) * (1.0 + (y_46_re * (math.log(((x_46_re * x_46_re) + (x_46_im * x_46_im))) * 0.5)))) return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) tmp = 0.0 if (y_46_re <= -3.5e-58) tmp = sin(Float64(y_46_re * atan(x_46_im, x_46_re))); elseif (y_46_re <= 2.25e-46) tmp = Float64(y_46_im * log(hypot(x_46_im, x_46_re))); else tmp = Float64(y_46_re * Float64(atan(x_46_im, x_46_re) * Float64(1.0 + Float64(y_46_re * Float64(log(Float64(Float64(x_46_re * x_46_re) + Float64(x_46_im * x_46_im))) * 0.5))))); end return tmp end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im) tmp = 0.0; if (y_46_re <= -3.5e-58) tmp = sin((y_46_re * atan2(x_46_im, x_46_re))); elseif (y_46_re <= 2.25e-46) tmp = y_46_im * log(hypot(x_46_im, x_46_re)); else tmp = y_46_re * (atan2(x_46_im, x_46_re) * (1.0 + (y_46_re * (log(((x_46_re * x_46_re) + (x_46_im * x_46_im))) * 0.5)))); end tmp_2 = tmp; end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := If[LessEqual[y$46$re, -3.5e-58], N[Sin[N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[LessEqual[y$46$re, 2.25e-46], N[(y$46$im * N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(y$46$re * N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * N[(1.0 + N[(y$46$re * N[(N[Log[N[(N[(x$46$re * x$46$re), $MachinePrecision] + N[(x$46$im * x$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y.re \leq -3.5 \cdot 10^{-58}:\\
\;\;\;\;\sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\\
\mathbf{elif}\;y.re \leq 2.25 \cdot 10^{-46}:\\
\;\;\;\;y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\\
\mathbf{else}:\\
\;\;\;\;y.re \cdot \left(\tan^{-1}_* \frac{x.im}{x.re} \cdot \left(1 + y.re \cdot \left(\log \left(x.re \cdot x.re + x.im \cdot x.im\right) \cdot 0.5\right)\right)\right)\\
\end{array}
\end{array}
if y.re < -3.4999999999999999e-58Initial program 52.8%
Applied egg-rr35.7%
Taylor expanded in y.im around 0
mul-1-negN/A
neg-lowering-neg.f64N/A
sin-lowering-sin.f64N/A
*-lowering-*.f64N/A
atan2-lowering-atan2.f6469.2%
Simplified69.2%
Taylor expanded in y.re around 0
Simplified15.8%
if -3.4999999999999999e-58 < y.re < 2.25e-46Initial program 35.3%
Taylor expanded in y.im around 0
pow-lowering-pow.f64N/A
unpow2N/A
unpow2N/A
hypot-defineN/A
hypot-lowering-hypot.f6422.4%
Simplified22.4%
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
+-lowering-+.f64N/A
unpow2N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6414.7%
Simplified14.7%
Taylor expanded in y.im around 0
*-lowering-*.f64N/A
log-lowering-log.f64N/A
unpow2N/A
unpow2N/A
hypot-defineN/A
hypot-lowering-hypot.f6441.2%
Simplified41.2%
if 2.25e-46 < y.re Initial program 38.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
unpow2N/A
unpow2N/A
hypot-defineN/A
hypot-lowering-hypot.f6457.8%
Simplified57.8%
Taylor expanded in y.re around 0
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
log-lowering-log.f64N/A
sqrt-lowering-sqrt.f64N/A
+-lowering-+.f64N/A
unpow2N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
atan2-lowering-atan2.f64N/A
atan2-lowering-atan2.f6425.3%
Simplified25.3%
*-commutativeN/A
*-lowering-*.f64N/A
Applied egg-rr25.3%
Final simplification29.4%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0
(/
(* y.re (atan2 x.im x.re))
(pow (+ (* x.re x.re) (* x.im x.im)) (/ y.re -2.0)))))
(if (<= y.re -1.5e-146)
t_0
(if (<= y.re 4.7e-51) (* y.im (log (hypot x.im x.re))) t_0))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = (y_46_re * atan2(x_46_im, x_46_re)) / pow(((x_46_re * x_46_re) + (x_46_im * x_46_im)), (y_46_re / -2.0));
double tmp;
if (y_46_re <= -1.5e-146) {
tmp = t_0;
} else if (y_46_re <= 4.7e-51) {
tmp = y_46_im * log(hypot(x_46_im, x_46_re));
} else {
tmp = t_0;
}
return tmp;
}
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = (y_46_re * Math.atan2(x_46_im, x_46_re)) / Math.pow(((x_46_re * x_46_re) + (x_46_im * x_46_im)), (y_46_re / -2.0));
double tmp;
if (y_46_re <= -1.5e-146) {
tmp = t_0;
} else if (y_46_re <= 4.7e-51) {
tmp = y_46_im * Math.log(Math.hypot(x_46_im, x_46_re));
} else {
tmp = t_0;
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): t_0 = (y_46_re * math.atan2(x_46_im, x_46_re)) / math.pow(((x_46_re * x_46_re) + (x_46_im * x_46_im)), (y_46_re / -2.0)) tmp = 0 if y_46_re <= -1.5e-146: tmp = t_0 elif y_46_re <= 4.7e-51: tmp = y_46_im * math.log(math.hypot(x_46_im, x_46_re)) else: tmp = t_0 return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = Float64(Float64(y_46_re * atan(x_46_im, x_46_re)) / (Float64(Float64(x_46_re * x_46_re) + Float64(x_46_im * x_46_im)) ^ Float64(y_46_re / -2.0))) tmp = 0.0 if (y_46_re <= -1.5e-146) tmp = t_0; elseif (y_46_re <= 4.7e-51) tmp = Float64(y_46_im * log(hypot(x_46_im, x_46_re))); else tmp = t_0; end return tmp end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = (y_46_re * atan2(x_46_im, x_46_re)) / (((x_46_re * x_46_re) + (x_46_im * x_46_im)) ^ (y_46_re / -2.0)); tmp = 0.0; if (y_46_re <= -1.5e-146) tmp = t_0; elseif (y_46_re <= 4.7e-51) tmp = y_46_im * log(hypot(x_46_im, x_46_re)); else tmp = t_0; end tmp_2 = tmp; end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[(N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision] / N[Power[N[(N[(x$46$re * x$46$re), $MachinePrecision] + N[(x$46$im * x$46$im), $MachinePrecision]), $MachinePrecision], N[(y$46$re / -2.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y$46$re, -1.5e-146], t$95$0, If[LessEqual[y$46$re, 4.7e-51], N[(y$46$im * N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]), $MachinePrecision], t$95$0]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}}{{\left(x.re \cdot x.re + x.im \cdot x.im\right)}^{\left(\frac{y.re}{-2}\right)}}\\
\mathbf{if}\;y.re \leq -1.5 \cdot 10^{-146}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;y.re \leq 4.7 \cdot 10^{-51}:\\
\;\;\;\;y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
if y.re < -1.50000000000000009e-146 or 4.6999999999999997e-51 < y.re Initial program 43.1%
Applied egg-rr32.9%
Taylor expanded in y.im around 0
mul-1-negN/A
neg-lowering-neg.f64N/A
sin-lowering-sin.f64N/A
*-lowering-*.f64N/A
atan2-lowering-atan2.f6461.0%
Simplified61.0%
Taylor expanded in y.re around 0
*-commutativeN/A
*-lowering-*.f64N/A
atan2-lowering-atan2.f6462.0%
Simplified62.0%
if -1.50000000000000009e-146 < y.re < 4.6999999999999997e-51Initial program 37.2%
Taylor expanded in y.im around 0
pow-lowering-pow.f64N/A
unpow2N/A
unpow2N/A
hypot-defineN/A
hypot-lowering-hypot.f6424.8%
Simplified24.8%
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
+-lowering-+.f64N/A
unpow2N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6417.6%
Simplified17.6%
Taylor expanded in y.im around 0
*-lowering-*.f64N/A
log-lowering-log.f64N/A
unpow2N/A
unpow2N/A
hypot-defineN/A
hypot-lowering-hypot.f6443.7%
Simplified43.7%
Final simplification54.8%
(FPCore (x.re x.im y.re y.im) :precision binary64 (if (<= y.re -9.5e-58) (sin (* y.re (atan2 x.im x.re))) (* y.im (log (hypot 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 <= -9.5e-58) {
tmp = sin((y_46_re * atan2(x_46_im, x_46_re)));
} else {
tmp = y_46_im * log(hypot(x_46_im, x_46_re));
}
return tmp;
}
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double tmp;
if (y_46_re <= -9.5e-58) {
tmp = Math.sin((y_46_re * Math.atan2(x_46_im, x_46_re)));
} else {
tmp = y_46_im * Math.log(Math.hypot(x_46_im, x_46_re));
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): tmp = 0 if y_46_re <= -9.5e-58: tmp = math.sin((y_46_re * math.atan2(x_46_im, x_46_re))) else: tmp = y_46_im * math.log(math.hypot(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 <= -9.5e-58) tmp = sin(Float64(y_46_re * atan(x_46_im, x_46_re))); else tmp = Float64(y_46_im * log(hypot(x_46_im, x_46_re))); end return tmp end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im) tmp = 0.0; if (y_46_re <= -9.5e-58) tmp = sin((y_46_re * atan2(x_46_im, x_46_re))); else tmp = y_46_im * log(hypot(x_46_im, x_46_re)); end tmp_2 = tmp; end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := If[LessEqual[y$46$re, -9.5e-58], N[Sin[N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[(y$46$im * N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y.re \leq -9.5 \cdot 10^{-58}:\\
\;\;\;\;\sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\\
\mathbf{else}:\\
\;\;\;\;y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\\
\end{array}
\end{array}
if y.re < -9.4999999999999994e-58Initial program 52.8%
Applied egg-rr35.7%
Taylor expanded in y.im around 0
mul-1-negN/A
neg-lowering-neg.f64N/A
sin-lowering-sin.f64N/A
*-lowering-*.f64N/A
atan2-lowering-atan2.f6469.2%
Simplified69.2%
Taylor expanded in y.re around 0
Simplified15.8%
if -9.4999999999999994e-58 < y.re Initial program 36.6%
Taylor expanded in y.im around 0
pow-lowering-pow.f64N/A
unpow2N/A
unpow2N/A
hypot-defineN/A
hypot-lowering-hypot.f6428.1%
Simplified28.1%
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
+-lowering-+.f64N/A
unpow2N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f649.3%
Simplified9.3%
Taylor expanded in y.im around 0
*-lowering-*.f64N/A
log-lowering-log.f64N/A
unpow2N/A
unpow2N/A
hypot-defineN/A
hypot-lowering-hypot.f6425.2%
Simplified25.2%
Final simplification22.6%
(FPCore (x.re x.im y.re y.im) :precision binary64 (if (<= y.re -3.3e-58) (* y.re (atan2 x.im x.re)) (* y.im (log (hypot 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 <= -3.3e-58) {
tmp = y_46_re * atan2(x_46_im, x_46_re);
} else {
tmp = y_46_im * log(hypot(x_46_im, x_46_re));
}
return tmp;
}
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double tmp;
if (y_46_re <= -3.3e-58) {
tmp = y_46_re * Math.atan2(x_46_im, x_46_re);
} else {
tmp = y_46_im * Math.log(Math.hypot(x_46_im, x_46_re));
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): tmp = 0 if y_46_re <= -3.3e-58: tmp = y_46_re * math.atan2(x_46_im, x_46_re) else: tmp = y_46_im * math.log(math.hypot(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 <= -3.3e-58) tmp = Float64(y_46_re * atan(x_46_im, x_46_re)); else tmp = Float64(y_46_im * log(hypot(x_46_im, x_46_re))); end return tmp end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im) tmp = 0.0; if (y_46_re <= -3.3e-58) tmp = y_46_re * atan2(x_46_im, x_46_re); else tmp = y_46_im * log(hypot(x_46_im, x_46_re)); end tmp_2 = tmp; end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := If[LessEqual[y$46$re, -3.3e-58], N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision], N[(y$46$im * N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y.re \leq -3.3 \cdot 10^{-58}:\\
\;\;\;\;y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
\mathbf{else}:\\
\;\;\;\;y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\\
\end{array}
\end{array}
if y.re < -3.30000000000000026e-58Initial program 52.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
unpow2N/A
unpow2N/A
hypot-defineN/A
hypot-lowering-hypot.f6477.7%
Simplified77.7%
Taylor expanded in y.re around 0
*-lowering-*.f64N/A
atan2-lowering-atan2.f6415.5%
Simplified15.5%
if -3.30000000000000026e-58 < y.re Initial program 36.6%
Taylor expanded in y.im around 0
pow-lowering-pow.f64N/A
unpow2N/A
unpow2N/A
hypot-defineN/A
hypot-lowering-hypot.f6428.1%
Simplified28.1%
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
+-lowering-+.f64N/A
unpow2N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f649.3%
Simplified9.3%
Taylor expanded in y.im around 0
*-lowering-*.f64N/A
log-lowering-log.f64N/A
unpow2N/A
unpow2N/A
hypot-defineN/A
hypot-lowering-hypot.f6425.2%
Simplified25.2%
(FPCore (x.re x.im y.re y.im) :precision binary64 (if (<= x.im 5e+26) (* y.re (atan2 x.im x.re)) (sin (* y.im (log x.im)))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double tmp;
if (x_46_im <= 5e+26) {
tmp = y_46_re * atan2(x_46_im, x_46_re);
} else {
tmp = sin((y_46_im * log(x_46_im)));
}
return tmp;
}
real(8) function code(x_46re, x_46im, y_46re, y_46im)
real(8), intent (in) :: x_46re
real(8), intent (in) :: x_46im
real(8), intent (in) :: y_46re
real(8), intent (in) :: y_46im
real(8) :: tmp
if (x_46im <= 5d+26) then
tmp = y_46re * atan2(x_46im, x_46re)
else
tmp = sin((y_46im * log(x_46im)))
end if
code = tmp
end function
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double tmp;
if (x_46_im <= 5e+26) {
tmp = y_46_re * Math.atan2(x_46_im, x_46_re);
} else {
tmp = Math.sin((y_46_im * Math.log(x_46_im)));
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): tmp = 0 if x_46_im <= 5e+26: tmp = y_46_re * math.atan2(x_46_im, x_46_re) else: tmp = math.sin((y_46_im * math.log(x_46_im))) return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) tmp = 0.0 if (x_46_im <= 5e+26) tmp = Float64(y_46_re * atan(x_46_im, x_46_re)); else tmp = sin(Float64(y_46_im * log(x_46_im))); end return tmp end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im) tmp = 0.0; if (x_46_im <= 5e+26) tmp = y_46_re * atan2(x_46_im, x_46_re); else tmp = sin((y_46_im * log(x_46_im))); end tmp_2 = tmp; end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := If[LessEqual[x$46$im, 5e+26], N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision], N[Sin[N[(y$46$im * N[Log[x$46$im], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x.im \leq 5 \cdot 10^{+26}:\\
\;\;\;\;y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
\mathbf{else}:\\
\;\;\;\;\sin \left(y.im \cdot \log x.im\right)\\
\end{array}
\end{array}
if x.im < 5.0000000000000001e26Initial program 47.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
unpow2N/A
unpow2N/A
hypot-defineN/A
hypot-lowering-hypot.f6447.6%
Simplified47.6%
Taylor expanded in y.re around 0
*-lowering-*.f64N/A
atan2-lowering-atan2.f6413.6%
Simplified13.6%
if 5.0000000000000001e26 < x.im Initial program 25.3%
Taylor expanded in y.im around 0
pow-lowering-pow.f64N/A
unpow2N/A
unpow2N/A
hypot-defineN/A
hypot-lowering-hypot.f6417.1%
Simplified17.1%
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
+-lowering-+.f64N/A
unpow2N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f645.1%
Simplified5.1%
Taylor expanded in x.re around 0
sin-lowering-sin.f64N/A
*-lowering-*.f64N/A
log-lowering-log.f6416.5%
Simplified16.5%
(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 41.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
unpow2N/A
unpow2N/A
hypot-defineN/A
hypot-lowering-hypot.f6445.1%
Simplified45.1%
Taylor expanded in y.re around 0
*-lowering-*.f64N/A
atan2-lowering-atan2.f6411.6%
Simplified11.6%
herbie shell --seed 2024160
(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)))))