
(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 20 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 (/ (exp t_0) (pow (hypot x.re x.im) y.re)))
(t_2 (* y.re (atan2 x.im x.re)))
(t_3 (sin t_2))
(t_4
(exp (- (* y.re (log (sqrt (+ (* x.re x.re) (* x.im x.im))))) t_0)))
(t_5 (log (hypot x.im x.re)))
(t_6 (+ t_3 (* y.im (* t_5 (cos t_2)))))
(t_7 (* y.im t_5))
(t_8 (cos t_7))
(t_9 (sin t_7)))
(if (<= y.re -5e+42)
(* t_4 t_3)
(if (<= y.re 1e+21)
(/ t_6 t_1)
(if (<= y.re 1.15e+188)
(/
(+
t_9
(*
y.re
(+
(* (atan2 x.im x.re) t_8)
(*
y.re
(+
(* -0.5 (* t_9 (pow (atan2 x.im x.re) 2.0)))
(*
(* y.re -0.16666666666666666)
(* t_8 (pow (atan2 x.im x.re) 3.0))))))))
t_1)
(* t_4 t_6))))))
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 = exp(t_0) / pow(hypot(x_46_re, x_46_im), y_46_re);
double t_2 = y_46_re * atan2(x_46_im, x_46_re);
double t_3 = sin(t_2);
double t_4 = exp(((y_46_re * log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))) - t_0));
double t_5 = log(hypot(x_46_im, x_46_re));
double t_6 = t_3 + (y_46_im * (t_5 * cos(t_2)));
double t_7 = y_46_im * t_5;
double t_8 = cos(t_7);
double t_9 = sin(t_7);
double tmp;
if (y_46_re <= -5e+42) {
tmp = t_4 * t_3;
} else if (y_46_re <= 1e+21) {
tmp = t_6 / t_1;
} else if (y_46_re <= 1.15e+188) {
tmp = (t_9 + (y_46_re * ((atan2(x_46_im, x_46_re) * t_8) + (y_46_re * ((-0.5 * (t_9 * pow(atan2(x_46_im, x_46_re), 2.0))) + ((y_46_re * -0.16666666666666666) * (t_8 * pow(atan2(x_46_im, x_46_re), 3.0)))))))) / t_1;
} else {
tmp = t_4 * t_6;
}
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 = Math.exp(t_0) / Math.pow(Math.hypot(x_46_re, x_46_im), y_46_re);
double t_2 = y_46_re * Math.atan2(x_46_im, x_46_re);
double t_3 = Math.sin(t_2);
double t_4 = Math.exp(((y_46_re * Math.log(Math.sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))) - t_0));
double t_5 = Math.log(Math.hypot(x_46_im, x_46_re));
double t_6 = t_3 + (y_46_im * (t_5 * Math.cos(t_2)));
double t_7 = y_46_im * t_5;
double t_8 = Math.cos(t_7);
double t_9 = Math.sin(t_7);
double tmp;
if (y_46_re <= -5e+42) {
tmp = t_4 * t_3;
} else if (y_46_re <= 1e+21) {
tmp = t_6 / t_1;
} else if (y_46_re <= 1.15e+188) {
tmp = (t_9 + (y_46_re * ((Math.atan2(x_46_im, x_46_re) * t_8) + (y_46_re * ((-0.5 * (t_9 * Math.pow(Math.atan2(x_46_im, x_46_re), 2.0))) + ((y_46_re * -0.16666666666666666) * (t_8 * Math.pow(Math.atan2(x_46_im, x_46_re), 3.0)))))))) / t_1;
} else {
tmp = t_4 * t_6;
}
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 = math.exp(t_0) / math.pow(math.hypot(x_46_re, x_46_im), y_46_re) t_2 = y_46_re * math.atan2(x_46_im, x_46_re) t_3 = math.sin(t_2) t_4 = math.exp(((y_46_re * math.log(math.sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))) - t_0)) t_5 = math.log(math.hypot(x_46_im, x_46_re)) t_6 = t_3 + (y_46_im * (t_5 * math.cos(t_2))) t_7 = y_46_im * t_5 t_8 = math.cos(t_7) t_9 = math.sin(t_7) tmp = 0 if y_46_re <= -5e+42: tmp = t_4 * t_3 elif y_46_re <= 1e+21: tmp = t_6 / t_1 elif y_46_re <= 1.15e+188: tmp = (t_9 + (y_46_re * ((math.atan2(x_46_im, x_46_re) * t_8) + (y_46_re * ((-0.5 * (t_9 * math.pow(math.atan2(x_46_im, x_46_re), 2.0))) + ((y_46_re * -0.16666666666666666) * (t_8 * math.pow(math.atan2(x_46_im, x_46_re), 3.0)))))))) / t_1 else: tmp = t_4 * t_6 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(exp(t_0) / (hypot(x_46_re, x_46_im) ^ y_46_re)) t_2 = Float64(y_46_re * atan(x_46_im, x_46_re)) t_3 = sin(t_2) t_4 = exp(Float64(Float64(y_46_re * log(sqrt(Float64(Float64(x_46_re * x_46_re) + Float64(x_46_im * x_46_im))))) - t_0)) t_5 = log(hypot(x_46_im, x_46_re)) t_6 = Float64(t_3 + Float64(y_46_im * Float64(t_5 * cos(t_2)))) t_7 = Float64(y_46_im * t_5) t_8 = cos(t_7) t_9 = sin(t_7) tmp = 0.0 if (y_46_re <= -5e+42) tmp = Float64(t_4 * t_3); elseif (y_46_re <= 1e+21) tmp = Float64(t_6 / t_1); elseif (y_46_re <= 1.15e+188) tmp = Float64(Float64(t_9 + Float64(y_46_re * Float64(Float64(atan(x_46_im, x_46_re) * t_8) + Float64(y_46_re * Float64(Float64(-0.5 * Float64(t_9 * (atan(x_46_im, x_46_re) ^ 2.0))) + Float64(Float64(y_46_re * -0.16666666666666666) * Float64(t_8 * (atan(x_46_im, x_46_re) ^ 3.0)))))))) / t_1); else tmp = Float64(t_4 * t_6); 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 = exp(t_0) / (hypot(x_46_re, x_46_im) ^ y_46_re); t_2 = y_46_re * atan2(x_46_im, x_46_re); t_3 = sin(t_2); t_4 = exp(((y_46_re * log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))) - t_0)); t_5 = log(hypot(x_46_im, x_46_re)); t_6 = t_3 + (y_46_im * (t_5 * cos(t_2))); t_7 = y_46_im * t_5; t_8 = cos(t_7); t_9 = sin(t_7); tmp = 0.0; if (y_46_re <= -5e+42) tmp = t_4 * t_3; elseif (y_46_re <= 1e+21) tmp = t_6 / t_1; elseif (y_46_re <= 1.15e+188) tmp = (t_9 + (y_46_re * ((atan2(x_46_im, x_46_re) * t_8) + (y_46_re * ((-0.5 * (t_9 * (atan2(x_46_im, x_46_re) ^ 2.0))) + ((y_46_re * -0.16666666666666666) * (t_8 * (atan2(x_46_im, x_46_re) ^ 3.0)))))))) / t_1; else tmp = t_4 * t_6; 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[Exp[t$95$0], $MachinePrecision] / N[Power[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision], y$46$re], $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[Exp[N[(N[(y$46$re * N[Log[N[Sqrt[N[(N[(x$46$re * x$46$re), $MachinePrecision] + N[(x$46$im * x$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$5 = N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]}, Block[{t$95$6 = N[(t$95$3 + N[(y$46$im * N[(t$95$5 * N[Cos[t$95$2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$7 = N[(y$46$im * t$95$5), $MachinePrecision]}, Block[{t$95$8 = N[Cos[t$95$7], $MachinePrecision]}, Block[{t$95$9 = N[Sin[t$95$7], $MachinePrecision]}, If[LessEqual[y$46$re, -5e+42], N[(t$95$4 * t$95$3), $MachinePrecision], If[LessEqual[y$46$re, 1e+21], N[(t$95$6 / t$95$1), $MachinePrecision], If[LessEqual[y$46$re, 1.15e+188], N[(N[(t$95$9 + N[(y$46$re * N[(N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * t$95$8), $MachinePrecision] + N[(y$46$re * N[(N[(-0.5 * N[(t$95$9 * N[Power[N[ArcTan[x$46$im / x$46$re], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(y$46$re * -0.16666666666666666), $MachinePrecision] * N[(t$95$8 * N[Power[N[ArcTan[x$46$im / x$46$re], $MachinePrecision], 3.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / t$95$1), $MachinePrecision], N[(t$95$4 * t$95$6), $MachinePrecision]]]]]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im\\
t_1 := \frac{e^{t\_0}}{{\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re}}\\
t_2 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
t_3 := \sin t\_2\\
t_4 := e^{y.re \cdot \log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) - t\_0}\\
t_5 := \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\\
t_6 := t\_3 + y.im \cdot \left(t\_5 \cdot \cos t\_2\right)\\
t_7 := y.im \cdot t\_5\\
t_8 := \cos t\_7\\
t_9 := \sin t\_7\\
\mathbf{if}\;y.re \leq -5 \cdot 10^{+42}:\\
\;\;\;\;t\_4 \cdot t\_3\\
\mathbf{elif}\;y.re \leq 10^{+21}:\\
\;\;\;\;\frac{t\_6}{t\_1}\\
\mathbf{elif}\;y.re \leq 1.15 \cdot 10^{+188}:\\
\;\;\;\;\frac{t\_9 + y.re \cdot \left(\tan^{-1}_* \frac{x.im}{x.re} \cdot t\_8 + y.re \cdot \left(-0.5 \cdot \left(t\_9 \cdot {\tan^{-1}_* \frac{x.im}{x.re}}^{2}\right) + \left(y.re \cdot -0.16666666666666666\right) \cdot \left(t\_8 \cdot {\tan^{-1}_* \frac{x.im}{x.re}}^{3}\right)\right)\right)}{t\_1}\\
\mathbf{else}:\\
\;\;\;\;t\_4 \cdot t\_6\\
\end{array}
\end{array}
if y.re < -5.00000000000000007e42Initial program 49.1%
Taylor expanded in y.im around 0
sin-lowering-sin.f64N/A
*-lowering-*.f64N/A
atan2-lowering-atan2.f6485.5%
Simplified85.5%
if -5.00000000000000007e42 < y.re < 1e21Initial program 39.2%
exp-diffN/A
associate-*l/N/A
associate-/l*N/A
*-commutativeN/A
associate-/r/N/A
exp-diffN/A
Simplified81.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.6%
Simplified83.6%
if 1e21 < y.re < 1.15000000000000006e188Initial program 46.2%
exp-diffN/A
associate-*l/N/A
associate-/l*N/A
*-commutativeN/A
associate-/r/N/A
exp-diffN/A
Simplified57.7%
Taylor expanded in y.re around 0
+-lowering-+.f64N/A
Simplified84.6%
if 1.15000000000000006e188 < y.re Initial program 31.8%
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.8%
Simplified81.8%
Final simplification84.0%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (* (atan2 x.im x.re) y.im))
(t_1 (* y.re (atan2 x.im x.re)))
(t_2 (log (sqrt (+ (* x.re x.re) (* x.im x.im)))))
(t_3 (* (exp (- (* 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.im x.re)) (cos t_1))))
(/ (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_im, x_46_re)) * cos(t_1)))) / (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_im, x_46_re)) * Math.cos(t_1)))) / (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_im, x_46_re)) * math.cos(t_1)))) / (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(Float64(sin(t_1) + Float64(y_46_im * Float64(log(hypot(x_46_im, x_46_re)) * cos(t_1)))) / 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_im, x_46_re)) * cos(t_1)))) / (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[(N[Sin[t$95$1], $MachinePrecision] + N[(y$46$im * N[(N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision] * N[Cos[t$95$1], $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 t\_1 + y.im \cdot \left(\log \left(\mathsf{hypot}\left(x.im, x.re\right)\right) \cdot \cos t\_1\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 82.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
Simplified72.1%
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.f6477.1%
Simplified77.1%
Final simplification80.0%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (* (atan2 x.im x.re) y.im))
(t_1 (log (hypot x.im x.re)))
(t_2 (* y.re (atan2 x.im x.re)))
(t_3 (exp t_0)))
(if (<= y.im -6e+47)
(*
(exp (- (* y.re (log (sqrt (+ (* x.re x.re) (* x.im x.im))))) t_0))
(+ (sin t_2) (* y.im (* t_1 (cos t_2)))))
(if (<= y.im 5.5e+56)
(/
(sin (* y.re (+ (atan2 x.im x.re) (/ (* y.im t_1) y.re))))
(/ t_3 (pow (hypot x.re x.im) y.re)))
(/ t_2 t_3)))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = atan2(x_46_im, x_46_re) * y_46_im;
double t_1 = log(hypot(x_46_im, x_46_re));
double t_2 = y_46_re * atan2(x_46_im, x_46_re);
double t_3 = exp(t_0);
double tmp;
if (y_46_im <= -6e+47) {
tmp = exp(((y_46_re * log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))) - t_0)) * (sin(t_2) + (y_46_im * (t_1 * cos(t_2))));
} else if (y_46_im <= 5.5e+56) {
tmp = sin((y_46_re * (atan2(x_46_im, x_46_re) + ((y_46_im * t_1) / y_46_re)))) / (t_3 / pow(hypot(x_46_re, x_46_im), y_46_re));
} else {
tmp = t_2 / t_3;
}
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 = Math.log(Math.hypot(x_46_im, x_46_re));
double t_2 = y_46_re * Math.atan2(x_46_im, x_46_re);
double t_3 = Math.exp(t_0);
double tmp;
if (y_46_im <= -6e+47) {
tmp = Math.exp(((y_46_re * Math.log(Math.sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))) - t_0)) * (Math.sin(t_2) + (y_46_im * (t_1 * Math.cos(t_2))));
} else if (y_46_im <= 5.5e+56) {
tmp = Math.sin((y_46_re * (Math.atan2(x_46_im, x_46_re) + ((y_46_im * t_1) / y_46_re)))) / (t_3 / Math.pow(Math.hypot(x_46_re, x_46_im), y_46_re));
} else {
tmp = t_2 / t_3;
}
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 = math.log(math.hypot(x_46_im, x_46_re)) t_2 = y_46_re * math.atan2(x_46_im, x_46_re) t_3 = math.exp(t_0) tmp = 0 if y_46_im <= -6e+47: tmp = math.exp(((y_46_re * math.log(math.sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))) - t_0)) * (math.sin(t_2) + (y_46_im * (t_1 * math.cos(t_2)))) elif y_46_im <= 5.5e+56: tmp = math.sin((y_46_re * (math.atan2(x_46_im, x_46_re) + ((y_46_im * t_1) / y_46_re)))) / (t_3 / math.pow(math.hypot(x_46_re, x_46_im), y_46_re)) else: tmp = t_2 / t_3 return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = Float64(atan(x_46_im, x_46_re) * y_46_im) t_1 = log(hypot(x_46_im, x_46_re)) t_2 = Float64(y_46_re * atan(x_46_im, x_46_re)) t_3 = exp(t_0) tmp = 0.0 if (y_46_im <= -6e+47) tmp = Float64(exp(Float64(Float64(y_46_re * log(sqrt(Float64(Float64(x_46_re * x_46_re) + Float64(x_46_im * x_46_im))))) - t_0)) * Float64(sin(t_2) + Float64(y_46_im * Float64(t_1 * cos(t_2))))); elseif (y_46_im <= 5.5e+56) tmp = Float64(sin(Float64(y_46_re * Float64(atan(x_46_im, x_46_re) + Float64(Float64(y_46_im * t_1) / y_46_re)))) / Float64(t_3 / (hypot(x_46_re, x_46_im) ^ y_46_re))); else tmp = Float64(t_2 / t_3); 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 = log(hypot(x_46_im, x_46_re)); t_2 = y_46_re * atan2(x_46_im, x_46_re); t_3 = exp(t_0); tmp = 0.0; if (y_46_im <= -6e+47) tmp = exp(((y_46_re * log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))) - t_0)) * (sin(t_2) + (y_46_im * (t_1 * cos(t_2)))); elseif (y_46_im <= 5.5e+56) tmp = sin((y_46_re * (atan2(x_46_im, x_46_re) + ((y_46_im * t_1) / y_46_re)))) / (t_3 / (hypot(x_46_re, x_46_im) ^ y_46_re)); else tmp = t_2 / t_3; 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[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $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[Exp[t$95$0], $MachinePrecision]}, If[LessEqual[y$46$im, -6e+47], N[(N[Exp[N[(N[(y$46$re * N[Log[N[Sqrt[N[(N[(x$46$re * x$46$re), $MachinePrecision] + N[(x$46$im * x$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]], $MachinePrecision] * N[(N[Sin[t$95$2], $MachinePrecision] + N[(y$46$im * N[(t$95$1 * N[Cos[t$95$2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$im, 5.5e+56], N[(N[Sin[N[(y$46$re * N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] + N[(N[(y$46$im * t$95$1), $MachinePrecision] / y$46$re), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / N[(t$95$3 / N[Power[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision], y$46$re], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t$95$2 / t$95$3), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im\\
t_1 := \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\\
t_2 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
t_3 := e^{t\_0}\\
\mathbf{if}\;y.im \leq -6 \cdot 10^{+47}:\\
\;\;\;\;e^{y.re \cdot \log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) - t\_0} \cdot \left(\sin t\_2 + y.im \cdot \left(t\_1 \cdot \cos t\_2\right)\right)\\
\mathbf{elif}\;y.im \leq 5.5 \cdot 10^{+56}:\\
\;\;\;\;\frac{\sin \left(y.re \cdot \left(\tan^{-1}_* \frac{x.im}{x.re} + \frac{y.im \cdot t\_1}{y.re}\right)\right)}{\frac{t\_3}{{\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re}}}\\
\mathbf{else}:\\
\;\;\;\;\frac{t\_2}{t\_3}\\
\end{array}
\end{array}
if y.im < -6.0000000000000003e47Initial program 42.3%
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.f6468.7%
Simplified68.7%
if -6.0000000000000003e47 < y.im < 5.5000000000000002e56Initial program 42.4%
exp-diffN/A
associate-*l/N/A
associate-/l*N/A
*-commutativeN/A
associate-/r/N/A
exp-diffN/A
Simplified90.7%
Taylor expanded in y.re around inf
*-lowering-*.f64N/A
+-commutativeN/A
+-lowering-+.f64N/A
atan2-lowering-atan2.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
log-lowering-log.f64N/A
unpow2N/A
unpow2N/A
hypot-defineN/A
hypot-lowering-hypot.f6491.4%
Simplified91.4%
if 5.5000000000000002e56 < y.im Initial program 37.8%
exp-diffN/A
associate-*l/N/A
associate-/l*N/A
*-commutativeN/A
associate-/r/N/A
exp-diffN/A
Simplified57.4%
Taylor expanded in y.im around 0
sin-lowering-sin.f64N/A
*-lowering-*.f64N/A
atan2-lowering-atan2.f6462.5%
Simplified62.5%
Taylor expanded in y.re around 0
/-lowering-/.f64N/A
*-lowering-*.f64N/A
atan2-lowering-atan2.f64N/A
exp-lowering-exp.f64N/A
*-lowering-*.f64N/A
atan2-lowering-atan2.f6470.2%
Simplified70.2%
Final simplification81.7%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (* (atan2 x.im x.re) y.im))
(t_1 (exp t_0))
(t_2 (* y.re (atan2 x.im x.re))))
(if (<= y.im -7.8e+223)
(/ (/ (log (* x.re x.re)) (/ 2.0 y.im)) t_1)
(if (<= y.im -3.95e+55)
(*
(exp (- (* y.re (log (sqrt (+ (* x.re x.re) (* x.im x.im))))) t_0))
(sin t_2))
(if (<= y.im 6.8e+56)
(/
(sin
(*
y.re
(+ (atan2 x.im x.re) (/ (* y.im (log (hypot x.im x.re))) y.re))))
(/ t_1 (pow (hypot x.re x.im) y.re)))
(/ 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 = atan2(x_46_im, x_46_re) * y_46_im;
double t_1 = exp(t_0);
double t_2 = y_46_re * atan2(x_46_im, x_46_re);
double tmp;
if (y_46_im <= -7.8e+223) {
tmp = (log((x_46_re * x_46_re)) / (2.0 / y_46_im)) / t_1;
} else if (y_46_im <= -3.95e+55) {
tmp = exp(((y_46_re * log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))) - t_0)) * sin(t_2);
} else if (y_46_im <= 6.8e+56) {
tmp = sin((y_46_re * (atan2(x_46_im, x_46_re) + ((y_46_im * log(hypot(x_46_im, x_46_re))) / y_46_re)))) / (t_1 / pow(hypot(x_46_re, x_46_im), y_46_re));
} else {
tmp = t_2 / 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.atan2(x_46_im, x_46_re) * y_46_im;
double t_1 = Math.exp(t_0);
double t_2 = y_46_re * Math.atan2(x_46_im, x_46_re);
double tmp;
if (y_46_im <= -7.8e+223) {
tmp = (Math.log((x_46_re * x_46_re)) / (2.0 / y_46_im)) / t_1;
} else if (y_46_im <= -3.95e+55) {
tmp = Math.exp(((y_46_re * Math.log(Math.sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))) - t_0)) * Math.sin(t_2);
} else if (y_46_im <= 6.8e+56) {
tmp = Math.sin((y_46_re * (Math.atan2(x_46_im, x_46_re) + ((y_46_im * Math.log(Math.hypot(x_46_im, x_46_re))) / y_46_re)))) / (t_1 / Math.pow(Math.hypot(x_46_re, x_46_im), y_46_re));
} else {
tmp = t_2 / t_1;
}
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 = math.exp(t_0) t_2 = y_46_re * math.atan2(x_46_im, x_46_re) tmp = 0 if y_46_im <= -7.8e+223: tmp = (math.log((x_46_re * x_46_re)) / (2.0 / y_46_im)) / t_1 elif y_46_im <= -3.95e+55: tmp = math.exp(((y_46_re * math.log(math.sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))) - t_0)) * math.sin(t_2) elif y_46_im <= 6.8e+56: tmp = math.sin((y_46_re * (math.atan2(x_46_im, x_46_re) + ((y_46_im * math.log(math.hypot(x_46_im, x_46_re))) / y_46_re)))) / (t_1 / math.pow(math.hypot(x_46_re, x_46_im), y_46_re)) else: tmp = t_2 / t_1 return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = Float64(atan(x_46_im, x_46_re) * y_46_im) t_1 = exp(t_0) t_2 = Float64(y_46_re * atan(x_46_im, x_46_re)) tmp = 0.0 if (y_46_im <= -7.8e+223) tmp = Float64(Float64(log(Float64(x_46_re * x_46_re)) / Float64(2.0 / y_46_im)) / t_1); elseif (y_46_im <= -3.95e+55) tmp = Float64(exp(Float64(Float64(y_46_re * log(sqrt(Float64(Float64(x_46_re * x_46_re) + Float64(x_46_im * x_46_im))))) - t_0)) * sin(t_2)); elseif (y_46_im <= 6.8e+56) tmp = Float64(sin(Float64(y_46_re * Float64(atan(x_46_im, x_46_re) + Float64(Float64(y_46_im * log(hypot(x_46_im, x_46_re))) / y_46_re)))) / Float64(t_1 / (hypot(x_46_re, x_46_im) ^ y_46_re))); else tmp = Float64(t_2 / t_1); 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 = exp(t_0); t_2 = y_46_re * atan2(x_46_im, x_46_re); tmp = 0.0; if (y_46_im <= -7.8e+223) tmp = (log((x_46_re * x_46_re)) / (2.0 / y_46_im)) / t_1; elseif (y_46_im <= -3.95e+55) tmp = exp(((y_46_re * log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))) - t_0)) * sin(t_2); elseif (y_46_im <= 6.8e+56) tmp = sin((y_46_re * (atan2(x_46_im, x_46_re) + ((y_46_im * log(hypot(x_46_im, x_46_re))) / y_46_re)))) / (t_1 / (hypot(x_46_re, x_46_im) ^ y_46_re)); else tmp = t_2 / 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[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$im), $MachinePrecision]}, Block[{t$95$1 = N[Exp[t$95$0], $MachinePrecision]}, Block[{t$95$2 = N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y$46$im, -7.8e+223], N[(N[(N[Log[N[(x$46$re * x$46$re), $MachinePrecision]], $MachinePrecision] / N[(2.0 / y$46$im), $MachinePrecision]), $MachinePrecision] / t$95$1), $MachinePrecision], If[LessEqual[y$46$im, -3.95e+55], N[(N[Exp[N[(N[(y$46$re * N[Log[N[Sqrt[N[(N[(x$46$re * x$46$re), $MachinePrecision] + N[(x$46$im * x$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]], $MachinePrecision] * N[Sin[t$95$2], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$im, 6.8e+56], N[(N[Sin[N[(y$46$re * N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] + N[(N[(y$46$im * N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / y$46$re), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / N[(t$95$1 / N[Power[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision], y$46$re], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t$95$2 / t$95$1), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im\\
t_1 := e^{t\_0}\\
t_2 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
\mathbf{if}\;y.im \leq -7.8 \cdot 10^{+223}:\\
\;\;\;\;\frac{\frac{\log \left(x.re \cdot x.re\right)}{\frac{2}{y.im}}}{t\_1}\\
\mathbf{elif}\;y.im \leq -3.95 \cdot 10^{+55}:\\
\;\;\;\;e^{y.re \cdot \log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) - t\_0} \cdot \sin t\_2\\
\mathbf{elif}\;y.im \leq 6.8 \cdot 10^{+56}:\\
\;\;\;\;\frac{\sin \left(y.re \cdot \left(\tan^{-1}_* \frac{x.im}{x.re} + \frac{y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)}{y.re}\right)\right)}{\frac{t\_1}{{\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re}}}\\
\mathbf{else}:\\
\;\;\;\;\frac{t\_2}{t\_1}\\
\end{array}
\end{array}
if y.im < -7.7999999999999997e223Initial program 35.3%
exp-diffN/A
associate-*l/N/A
associate-/l*N/A
*-commutativeN/A
associate-/r/N/A
exp-diffN/A
Simplified41.2%
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.f6447.1%
Simplified47.1%
Taylor expanded in y.re around 0
/-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
exp-lowering-exp.f64N/A
*-lowering-*.f64N/A
atan2-lowering-atan2.f6435.5%
Simplified35.5%
frac-2negN/A
*-commutativeN/A
distribute-frac-negN/A
neg-lowering-neg.f64N/A
Applied egg-rr64.9%
Taylor expanded in x.im around 0
log-lowering-log.f64N/A
unpow2N/A
*-lowering-*.f6476.7%
Simplified76.7%
if -7.7999999999999997e223 < y.im < -3.9500000000000002e55Initial program 44.8%
Taylor expanded in y.im around 0
sin-lowering-sin.f64N/A
*-lowering-*.f64N/A
atan2-lowering-atan2.f6463.7%
Simplified63.7%
if -3.9500000000000002e55 < y.im < 6.80000000000000002e56Initial program 42.5%
exp-diffN/A
associate-*l/N/A
associate-/l*N/A
*-commutativeN/A
associate-/r/N/A
exp-diffN/A
Simplified90.2%
Taylor expanded in y.re around inf
*-lowering-*.f64N/A
+-commutativeN/A
+-lowering-+.f64N/A
atan2-lowering-atan2.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
log-lowering-log.f64N/A
unpow2N/A
unpow2N/A
hypot-defineN/A
hypot-lowering-hypot.f6490.8%
Simplified90.8%
if 6.80000000000000002e56 < y.im Initial program 37.8%
exp-diffN/A
associate-*l/N/A
associate-/l*N/A
*-commutativeN/A
associate-/r/N/A
exp-diffN/A
Simplified57.4%
Taylor expanded in y.im around 0
sin-lowering-sin.f64N/A
*-lowering-*.f64N/A
atan2-lowering-atan2.f6462.5%
Simplified62.5%
Taylor expanded in y.re around 0
/-lowering-/.f64N/A
*-lowering-*.f64N/A
atan2-lowering-atan2.f64N/A
exp-lowering-exp.f64N/A
*-lowering-*.f64N/A
atan2-lowering-atan2.f6470.2%
Simplified70.2%
Final simplification77.7%
(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 (sin t_1))
(t_3 (+ (* x.re x.re) (* x.im x.im))))
(if (<= y.re -2e+54)
(* (exp (- (* y.re (log (sqrt t_3))) t_0)) t_2)
(if (<= y.re 5.4e+184)
(/
(sin (+ t_1 (* y.im (log (hypot x.re x.im)))))
(/ (exp t_0) (pow (hypot x.re x.im) y.re)))
(* t_2 (pow t_3 (/ 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 = y_46_re * atan2(x_46_im, x_46_re);
double t_2 = sin(t_1);
double t_3 = (x_46_re * x_46_re) + (x_46_im * x_46_im);
double tmp;
if (y_46_re <= -2e+54) {
tmp = exp(((y_46_re * log(sqrt(t_3))) - t_0)) * t_2;
} else if (y_46_re <= 5.4e+184) {
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));
} else {
tmp = t_2 * pow(t_3, (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 = y_46_re * Math.atan2(x_46_im, x_46_re);
double t_2 = Math.sin(t_1);
double t_3 = (x_46_re * x_46_re) + (x_46_im * x_46_im);
double tmp;
if (y_46_re <= -2e+54) {
tmp = Math.exp(((y_46_re * Math.log(Math.sqrt(t_3))) - t_0)) * t_2;
} else if (y_46_re <= 5.4e+184) {
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));
} else {
tmp = t_2 * Math.pow(t_3, (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 = y_46_re * math.atan2(x_46_im, x_46_re) t_2 = math.sin(t_1) t_3 = (x_46_re * x_46_re) + (x_46_im * x_46_im) tmp = 0 if y_46_re <= -2e+54: tmp = math.exp(((y_46_re * math.log(math.sqrt(t_3))) - t_0)) * t_2 elif y_46_re <= 5.4e+184: 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)) else: tmp = t_2 * math.pow(t_3, (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(y_46_re * atan(x_46_im, x_46_re)) t_2 = sin(t_1) t_3 = Float64(Float64(x_46_re * x_46_re) + Float64(x_46_im * x_46_im)) tmp = 0.0 if (y_46_re <= -2e+54) tmp = Float64(exp(Float64(Float64(y_46_re * log(sqrt(t_3))) - t_0)) * t_2); elseif (y_46_re <= 5.4e+184) 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))); else tmp = Float64(t_2 * (t_3 ^ 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 = y_46_re * atan2(x_46_im, x_46_re); t_2 = sin(t_1); t_3 = (x_46_re * x_46_re) + (x_46_im * x_46_im); tmp = 0.0; if (y_46_re <= -2e+54) tmp = exp(((y_46_re * log(sqrt(t_3))) - t_0)) * t_2; elseif (y_46_re <= 5.4e+184) 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)); else tmp = t_2 * (t_3 ^ (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[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[Sin[t$95$1], $MachinePrecision]}, Block[{t$95$3 = N[(N[(x$46$re * x$46$re), $MachinePrecision] + N[(x$46$im * x$46$im), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y$46$re, -2e+54], N[(N[Exp[N[(N[(y$46$re * N[Log[N[Sqrt[t$95$3], $MachinePrecision]], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]], $MachinePrecision] * t$95$2), $MachinePrecision], If[LessEqual[y$46$re, 5.4e+184], 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], N[(t$95$2 * N[Power[t$95$3, 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 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
t_2 := \sin t\_1\\
t_3 := x.re \cdot x.re + x.im \cdot x.im\\
\mathbf{if}\;y.re \leq -2 \cdot 10^{+54}:\\
\;\;\;\;e^{y.re \cdot \log \left(\sqrt{t\_3}\right) - t\_0} \cdot t\_2\\
\mathbf{elif}\;y.re \leq 5.4 \cdot 10^{+184}:\\
\;\;\;\;\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}}}\\
\mathbf{else}:\\
\;\;\;\;t\_2 \cdot {t\_3}^{\left(\frac{y.re}{2}\right)}\\
\end{array}
\end{array}
if y.re < -2.0000000000000002e54Initial program 49.1%
Taylor expanded in y.im around 0
sin-lowering-sin.f64N/A
*-lowering-*.f64N/A
atan2-lowering-atan2.f6485.5%
Simplified85.5%
if -2.0000000000000002e54 < y.re < 5.3999999999999998e184Initial program 40.1%
exp-diffN/A
associate-*l/N/A
associate-/l*N/A
*-commutativeN/A
associate-/r/N/A
exp-diffN/A
Simplified78.3%
if 5.3999999999999998e184 < y.re Initial program 33.3%
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.f6475.0%
Simplified75.0%
*-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.f6475.0%
Applied egg-rr75.0%
Final simplification79.5%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (* (atan2 x.im x.re) y.im))
(t_1
(*
(exp (- (* y.re (log (sqrt (+ (* x.re x.re) (* x.im x.im))))) t_0))
(sin (* y.re (atan2 x.im x.re))))))
(if (<= y.re -4.6e-11)
t_1
(if (<= y.re 1.55e-5)
(/
(sin
(*
y.im
(+ (log (hypot x.im x.re)) (* y.re (/ (atan2 x.im x.re) y.im)))))
(exp t_0))
t_1))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = atan2(x_46_im, x_46_re) * y_46_im;
double t_1 = exp(((y_46_re * log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))) - t_0)) * sin((y_46_re * atan2(x_46_im, x_46_re)));
double tmp;
if (y_46_re <= -4.6e-11) {
tmp = t_1;
} else if (y_46_re <= 1.55e-5) {
tmp = sin((y_46_im * (log(hypot(x_46_im, x_46_re)) + (y_46_re * (atan2(x_46_im, x_46_re) / y_46_im))))) / exp(t_0);
} 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 = Math.atan2(x_46_im, x_46_re) * y_46_im;
double t_1 = Math.exp(((y_46_re * Math.log(Math.sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))) - t_0)) * Math.sin((y_46_re * Math.atan2(x_46_im, x_46_re)));
double tmp;
if (y_46_re <= -4.6e-11) {
tmp = t_1;
} else if (y_46_re <= 1.55e-5) {
tmp = Math.sin((y_46_im * (Math.log(Math.hypot(x_46_im, x_46_re)) + (y_46_re * (Math.atan2(x_46_im, x_46_re) / y_46_im))))) / Math.exp(t_0);
} else {
tmp = t_1;
}
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 = math.exp(((y_46_re * math.log(math.sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))) - t_0)) * math.sin((y_46_re * math.atan2(x_46_im, x_46_re))) tmp = 0 if y_46_re <= -4.6e-11: tmp = t_1 elif y_46_re <= 1.55e-5: tmp = math.sin((y_46_im * (math.log(math.hypot(x_46_im, x_46_re)) + (y_46_re * (math.atan2(x_46_im, x_46_re) / y_46_im))))) / math.exp(t_0) else: tmp = t_1 return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = Float64(atan(x_46_im, x_46_re) * y_46_im) t_1 = Float64(exp(Float64(Float64(y_46_re * log(sqrt(Float64(Float64(x_46_re * x_46_re) + Float64(x_46_im * x_46_im))))) - t_0)) * sin(Float64(y_46_re * atan(x_46_im, x_46_re)))) tmp = 0.0 if (y_46_re <= -4.6e-11) tmp = t_1; elseif (y_46_re <= 1.55e-5) tmp = Float64(sin(Float64(y_46_im * Float64(log(hypot(x_46_im, x_46_re)) + Float64(y_46_re * Float64(atan(x_46_im, x_46_re) / y_46_im))))) / exp(t_0)); else tmp = t_1; end return tmp end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = atan2(x_46_im, x_46_re) * y_46_im; t_1 = exp(((y_46_re * log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))) - t_0)) * sin((y_46_re * atan2(x_46_im, x_46_re))); tmp = 0.0; if (y_46_re <= -4.6e-11) tmp = t_1; elseif (y_46_re <= 1.55e-5) tmp = sin((y_46_im * (log(hypot(x_46_im, x_46_re)) + (y_46_re * (atan2(x_46_im, x_46_re) / y_46_im))))) / exp(t_0); else tmp = t_1; end tmp_2 = tmp; end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$im), $MachinePrecision]}, Block[{t$95$1 = N[(N[Exp[N[(N[(y$46$re * N[Log[N[Sqrt[N[(N[(x$46$re * x$46$re), $MachinePrecision] + N[(x$46$im * x$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]], $MachinePrecision] * N[Sin[N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y$46$re, -4.6e-11], t$95$1, If[LessEqual[y$46$re, 1.55e-5], N[(N[Sin[N[(y$46$im * N[(N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision] + N[(y$46$re * N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] / y$46$im), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / N[Exp[t$95$0], $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im\\
t_1 := e^{y.re \cdot \log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) - t\_0} \cdot \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\\
\mathbf{if}\;y.re \leq -4.6 \cdot 10^{-11}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y.re \leq 1.55 \cdot 10^{-5}:\\
\;\;\;\;\frac{\sin \left(y.im \cdot \left(\log \left(\mathsf{hypot}\left(x.im, x.re\right)\right) + y.re \cdot \frac{\tan^{-1}_* \frac{x.im}{x.re}}{y.im}\right)\right)}{e^{t\_0}}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if y.re < -4.60000000000000027e-11 or 1.55000000000000007e-5 < y.re Initial program 42.8%
Taylor expanded in y.im around 0
sin-lowering-sin.f64N/A
*-lowering-*.f64N/A
atan2-lowering-atan2.f6473.8%
Simplified73.8%
if -4.60000000000000027e-11 < y.re < 1.55000000000000007e-5Initial program 40.1%
exp-diffN/A
associate-*l/N/A
associate-/l*N/A
*-commutativeN/A
associate-/r/N/A
exp-diffN/A
Simplified82.7%
Taylor expanded in y.im around inf
*-lowering-*.f64N/A
+-lowering-+.f64N/A
log-lowering-log.f64N/A
unpow2N/A
unpow2N/A
hypot-defineN/A
hypot-lowering-hypot.f64N/A
associate-/l*N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
atan2-lowering-atan2.f6482.6%
Simplified82.6%
Taylor expanded in y.re around 0
exp-lowering-exp.f64N/A
*-lowering-*.f64N/A
atan2-lowering-atan2.f6481.4%
Simplified81.4%
Final simplification77.7%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (sin (* y.re (atan2 x.im x.re))))
(t_1 (* t_0 (pow (+ (* x.re x.re) (* x.im x.im)) (/ y.re 2.0))))
(t_2 (exp (* (atan2 x.im x.re) y.im))))
(if (<= y.re -8.6)
t_1
(if (<= y.re 1.6e-143)
(/ (* y.im (log (hypot x.re x.im))) t_2)
(if (<= y.re 8e+20)
(/ t_0 (/ t_2 (pow (hypot x.re x.im) y.re)))
(if (<= y.re 1.15e+188)
(*
(*
y.re
(+
(atan2 x.im x.re)
(*
-0.16666666666666666
(* (pow (atan2 x.im x.re) 3.0) (* y.re y.re)))))
(pow (hypot x.im x.re) 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 = sin((y_46_re * atan2(x_46_im, x_46_re)));
double t_1 = t_0 * pow(((x_46_re * x_46_re) + (x_46_im * x_46_im)), (y_46_re / 2.0));
double t_2 = exp((atan2(x_46_im, x_46_re) * y_46_im));
double tmp;
if (y_46_re <= -8.6) {
tmp = t_1;
} else if (y_46_re <= 1.6e-143) {
tmp = (y_46_im * log(hypot(x_46_re, x_46_im))) / t_2;
} else if (y_46_re <= 8e+20) {
tmp = t_0 / (t_2 / pow(hypot(x_46_re, x_46_im), y_46_re));
} else if (y_46_re <= 1.15e+188) {
tmp = (y_46_re * (atan2(x_46_im, x_46_re) + (-0.16666666666666666 * (pow(atan2(x_46_im, x_46_re), 3.0) * (y_46_re * y_46_re))))) * pow(hypot(x_46_im, x_46_re), 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 = Math.sin((y_46_re * Math.atan2(x_46_im, x_46_re)));
double t_1 = t_0 * Math.pow(((x_46_re * x_46_re) + (x_46_im * x_46_im)), (y_46_re / 2.0));
double t_2 = Math.exp((Math.atan2(x_46_im, x_46_re) * y_46_im));
double tmp;
if (y_46_re <= -8.6) {
tmp = t_1;
} else if (y_46_re <= 1.6e-143) {
tmp = (y_46_im * Math.log(Math.hypot(x_46_re, x_46_im))) / t_2;
} else if (y_46_re <= 8e+20) {
tmp = t_0 / (t_2 / Math.pow(Math.hypot(x_46_re, x_46_im), y_46_re));
} else if (y_46_re <= 1.15e+188) {
tmp = (y_46_re * (Math.atan2(x_46_im, x_46_re) + (-0.16666666666666666 * (Math.pow(Math.atan2(x_46_im, x_46_re), 3.0) * (y_46_re * y_46_re))))) * Math.pow(Math.hypot(x_46_im, x_46_re), 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 = math.sin((y_46_re * math.atan2(x_46_im, x_46_re))) t_1 = t_0 * math.pow(((x_46_re * x_46_re) + (x_46_im * x_46_im)), (y_46_re / 2.0)) t_2 = math.exp((math.atan2(x_46_im, x_46_re) * y_46_im)) tmp = 0 if y_46_re <= -8.6: tmp = t_1 elif y_46_re <= 1.6e-143: tmp = (y_46_im * math.log(math.hypot(x_46_re, x_46_im))) / t_2 elif y_46_re <= 8e+20: tmp = t_0 / (t_2 / math.pow(math.hypot(x_46_re, x_46_im), y_46_re)) elif y_46_re <= 1.15e+188: tmp = (y_46_re * (math.atan2(x_46_im, x_46_re) + (-0.16666666666666666 * (math.pow(math.atan2(x_46_im, x_46_re), 3.0) * (y_46_re * y_46_re))))) * math.pow(math.hypot(x_46_im, x_46_re), 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 = sin(Float64(y_46_re * atan(x_46_im, x_46_re))) t_1 = Float64(t_0 * (Float64(Float64(x_46_re * x_46_re) + Float64(x_46_im * x_46_im)) ^ Float64(y_46_re / 2.0))) t_2 = exp(Float64(atan(x_46_im, x_46_re) * y_46_im)) tmp = 0.0 if (y_46_re <= -8.6) tmp = t_1; elseif (y_46_re <= 1.6e-143) tmp = Float64(Float64(y_46_im * log(hypot(x_46_re, x_46_im))) / t_2); elseif (y_46_re <= 8e+20) tmp = Float64(t_0 / Float64(t_2 / (hypot(x_46_re, x_46_im) ^ y_46_re))); elseif (y_46_re <= 1.15e+188) tmp = Float64(Float64(y_46_re * Float64(atan(x_46_im, x_46_re) + Float64(-0.16666666666666666 * Float64((atan(x_46_im, x_46_re) ^ 3.0) * Float64(y_46_re * y_46_re))))) * (hypot(x_46_im, x_46_re) ^ 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 = sin((y_46_re * atan2(x_46_im, x_46_re))); t_1 = t_0 * (((x_46_re * x_46_re) + (x_46_im * x_46_im)) ^ (y_46_re / 2.0)); t_2 = exp((atan2(x_46_im, x_46_re) * y_46_im)); tmp = 0.0; if (y_46_re <= -8.6) tmp = t_1; elseif (y_46_re <= 1.6e-143) tmp = (y_46_im * log(hypot(x_46_re, x_46_im))) / t_2; elseif (y_46_re <= 8e+20) tmp = t_0 / (t_2 / (hypot(x_46_re, x_46_im) ^ y_46_re)); elseif (y_46_re <= 1.15e+188) tmp = (y_46_re * (atan2(x_46_im, x_46_re) + (-0.16666666666666666 * ((atan2(x_46_im, x_46_re) ^ 3.0) * (y_46_re * y_46_re))))) * (hypot(x_46_im, x_46_re) ^ 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[Sin[N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$1 = N[(t$95$0 * N[Power[N[(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]}, 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, -8.6], t$95$1, If[LessEqual[y$46$re, 1.6e-143], N[(N[(y$46$im * N[Log[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / t$95$2), $MachinePrecision], If[LessEqual[y$46$re, 8e+20], N[(t$95$0 / N[(t$95$2 / N[Power[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision], y$46$re], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$re, 1.15e+188], N[(N[(y$46$re * N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] + N[(-0.16666666666666666 * N[(N[Power[N[ArcTan[x$46$im / x$46$re], $MachinePrecision], 3.0], $MachinePrecision] * N[(y$46$re * y$46$re), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[Power[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision], y$46$re], $MachinePrecision]), $MachinePrecision], t$95$1]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\\
t_1 := t\_0 \cdot {\left(x.re \cdot x.re + x.im \cdot x.im\right)}^{\left(\frac{y.re}{2}\right)}\\
t_2 := e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}\\
\mathbf{if}\;y.re \leq -8.6:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y.re \leq 1.6 \cdot 10^{-143}:\\
\;\;\;\;\frac{y.im \cdot \log \left(\mathsf{hypot}\left(x.re, x.im\right)\right)}{t\_2}\\
\mathbf{elif}\;y.re \leq 8 \cdot 10^{+20}:\\
\;\;\;\;\frac{t\_0}{\frac{t\_2}{{\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re}}}\\
\mathbf{elif}\;y.re \leq 1.15 \cdot 10^{+188}:\\
\;\;\;\;\left(y.re \cdot \left(\tan^{-1}_* \frac{x.im}{x.re} + -0.16666666666666666 \cdot \left({\tan^{-1}_* \frac{x.im}{x.re}}^{3} \cdot \left(y.re \cdot y.re\right)\right)\right)\right) \cdot {\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if y.re < -8.59999999999999964 or 1.15000000000000006e188 < y.re Initial program 44.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.f6480.4%
Simplified80.4%
*-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.f6480.4%
Applied egg-rr80.4%
if -8.59999999999999964 < y.re < 1.5999999999999999e-143Initial program 36.9%
exp-diffN/A
associate-*l/N/A
associate-/l*N/A
*-commutativeN/A
associate-/r/N/A
exp-diffN/A
Simplified79.8%
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.2%
Simplified81.2%
Taylor expanded in y.re around 0
/-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
exp-lowering-exp.f64N/A
*-lowering-*.f64N/A
atan2-lowering-atan2.f6436.8%
Simplified36.8%
+-commutativeN/A
hypot-defineN/A
hypot-lowering-hypot.f6471.4%
Applied egg-rr71.4%
if 1.5999999999999999e-143 < y.re < 8e20Initial program 44.5%
exp-diffN/A
associate-*l/N/A
associate-/l*N/A
*-commutativeN/A
associate-/r/N/A
exp-diffN/A
Simplified81.4%
Taylor expanded in y.im around 0
sin-lowering-sin.f64N/A
*-lowering-*.f64N/A
atan2-lowering-atan2.f6471.8%
Simplified71.8%
if 8e20 < y.re < 1.15000000000000006e188Initial program 46.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.f6442.4%
Simplified42.4%
Taylor expanded in y.re around 0
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
pow-lowering-pow.f64N/A
atan2-lowering-atan2.f64N/A
atan2-lowering-atan2.f6465.4%
Simplified65.4%
Final simplification73.9%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (exp (* (atan2 x.im x.re) y.im)))
(t_1 (+ (* x.re x.re) (* x.im x.im)))
(t_2 (* (sin (* y.re (atan2 x.im x.re))) (pow t_1 (/ y.re 2.0)))))
(if (<= y.re -0.0055)
t_2
(if (<= y.re 40.0)
(/
(sin
(*
y.im
(+ (log (hypot x.im x.re)) (* y.re (/ (atan2 x.im x.re) y.im)))))
t_0)
(if (<= y.re 4.9e+176) (/ (/ (log t_1) (/ 2.0 y.im)) t_0) t_2)))))
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 = (x_46_re * x_46_re) + (x_46_im * x_46_im);
double t_2 = sin((y_46_re * atan2(x_46_im, x_46_re))) * pow(t_1, (y_46_re / 2.0));
double tmp;
if (y_46_re <= -0.0055) {
tmp = t_2;
} else if (y_46_re <= 40.0) {
tmp = sin((y_46_im * (log(hypot(x_46_im, x_46_re)) + (y_46_re * (atan2(x_46_im, x_46_re) / y_46_im))))) / t_0;
} else if (y_46_re <= 4.9e+176) {
tmp = (log(t_1) / (2.0 / y_46_im)) / t_0;
} else {
tmp = t_2;
}
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.exp((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 = Math.sin((y_46_re * Math.atan2(x_46_im, x_46_re))) * Math.pow(t_1, (y_46_re / 2.0));
double tmp;
if (y_46_re <= -0.0055) {
tmp = t_2;
} else if (y_46_re <= 40.0) {
tmp = Math.sin((y_46_im * (Math.log(Math.hypot(x_46_im, x_46_re)) + (y_46_re * (Math.atan2(x_46_im, x_46_re) / y_46_im))))) / t_0;
} else if (y_46_re <= 4.9e+176) {
tmp = (Math.log(t_1) / (2.0 / y_46_im)) / t_0;
} else {
tmp = t_2;
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): t_0 = math.exp((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 = math.sin((y_46_re * math.atan2(x_46_im, x_46_re))) * math.pow(t_1, (y_46_re / 2.0)) tmp = 0 if y_46_re <= -0.0055: tmp = t_2 elif y_46_re <= 40.0: tmp = math.sin((y_46_im * (math.log(math.hypot(x_46_im, x_46_re)) + (y_46_re * (math.atan2(x_46_im, x_46_re) / y_46_im))))) / t_0 elif y_46_re <= 4.9e+176: tmp = (math.log(t_1) / (2.0 / y_46_im)) / t_0 else: tmp = t_2 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) * y_46_im)) t_1 = Float64(Float64(x_46_re * x_46_re) + Float64(x_46_im * x_46_im)) t_2 = Float64(sin(Float64(y_46_re * atan(x_46_im, x_46_re))) * (t_1 ^ Float64(y_46_re / 2.0))) tmp = 0.0 if (y_46_re <= -0.0055) tmp = t_2; elseif (y_46_re <= 40.0) tmp = Float64(sin(Float64(y_46_im * Float64(log(hypot(x_46_im, x_46_re)) + Float64(y_46_re * Float64(atan(x_46_im, x_46_re) / y_46_im))))) / t_0); elseif (y_46_re <= 4.9e+176) tmp = Float64(Float64(log(t_1) / Float64(2.0 / y_46_im)) / t_0); else tmp = t_2; end return tmp end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = exp((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 = sin((y_46_re * atan2(x_46_im, x_46_re))) * (t_1 ^ (y_46_re / 2.0)); tmp = 0.0; if (y_46_re <= -0.0055) tmp = t_2; elseif (y_46_re <= 40.0) tmp = sin((y_46_im * (log(hypot(x_46_im, x_46_re)) + (y_46_re * (atan2(x_46_im, x_46_re) / y_46_im))))) / t_0; elseif (y_46_re <= 4.9e+176) tmp = (log(t_1) / (2.0 / y_46_im)) / t_0; else tmp = t_2; end tmp_2 = 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[(N[(x$46$re * x$46$re), $MachinePrecision] + N[(x$46$im * x$46$im), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[Sin[N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Power[t$95$1, N[(y$46$re / 2.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y$46$re, -0.0055], t$95$2, If[LessEqual[y$46$re, 40.0], N[(N[Sin[N[(y$46$im * N[(N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision] + N[(y$46$re * N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] / y$46$im), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / t$95$0), $MachinePrecision], If[LessEqual[y$46$re, 4.9e+176], N[(N[(N[Log[t$95$1], $MachinePrecision] / N[(2.0 / y$46$im), $MachinePrecision]), $MachinePrecision] / t$95$0), $MachinePrecision], t$95$2]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}\\
t_1 := x.re \cdot x.re + x.im \cdot x.im\\
t_2 := \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {t\_1}^{\left(\frac{y.re}{2}\right)}\\
\mathbf{if}\;y.re \leq -0.0055:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;y.re \leq 40:\\
\;\;\;\;\frac{\sin \left(y.im \cdot \left(\log \left(\mathsf{hypot}\left(x.im, x.re\right)\right) + y.re \cdot \frac{\tan^{-1}_* \frac{x.im}{x.re}}{y.im}\right)\right)}{t\_0}\\
\mathbf{elif}\;y.re \leq 4.9 \cdot 10^{+176}:\\
\;\;\;\;\frac{\frac{\log t\_1}{\frac{2}{y.im}}}{t\_0}\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if y.re < -0.0054999999999999997 or 4.9e176 < y.re Initial program 45.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.f6479.0%
Simplified79.0%
*-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.f6479.0%
Applied egg-rr79.0%
if -0.0054999999999999997 < y.re < 40Initial program 40.8%
exp-diffN/A
associate-*l/N/A
associate-/l*N/A
*-commutativeN/A
associate-/r/N/A
exp-diffN/A
Simplified81.9%
Taylor expanded in y.im around inf
*-lowering-*.f64N/A
+-lowering-+.f64N/A
log-lowering-log.f64N/A
unpow2N/A
unpow2N/A
hypot-defineN/A
hypot-lowering-hypot.f64N/A
associate-/l*N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
atan2-lowering-atan2.f6481.7%
Simplified81.7%
Taylor expanded in y.re around 0
exp-lowering-exp.f64N/A
*-lowering-*.f64N/A
atan2-lowering-atan2.f6479.9%
Simplified79.9%
if 40 < y.re < 4.9e176Initial program 32.3%
exp-diffN/A
associate-*l/N/A
associate-/l*N/A
*-commutativeN/A
associate-/r/N/A
exp-diffN/A
Simplified54.8%
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.f6464.5%
Simplified64.5%
Taylor expanded in y.re around 0
/-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
exp-lowering-exp.f64N/A
*-lowering-*.f64N/A
atan2-lowering-atan2.f6445.7%
Simplified45.7%
frac-2negN/A
*-commutativeN/A
distribute-frac-negN/A
neg-lowering-neg.f64N/A
Applied egg-rr61.8%
Final simplification75.5%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (* y.re (atan2 x.im x.re)))
(t_1 (exp (* (atan2 x.im x.re) y.im)))
(t_2 (+ (* x.re x.re) (* x.im x.im)))
(t_3 (* (sin t_0) (pow t_2 (/ y.re 2.0)))))
(if (<= y.re -1.4)
t_3
(if (<= y.re 3.45e-143)
(/ (* y.im (log (hypot x.re x.im))) t_1)
(if (<= y.re 4.4e-32)
(/ t_0 t_1)
(if (<= y.re 3.1e+176) (/ (/ (log t_2) (/ 2.0 y.im)) t_1) t_3))))))
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 = exp((atan2(x_46_im, x_46_re) * y_46_im));
double t_2 = (x_46_re * x_46_re) + (x_46_im * x_46_im);
double t_3 = sin(t_0) * pow(t_2, (y_46_re / 2.0));
double tmp;
if (y_46_re <= -1.4) {
tmp = t_3;
} else if (y_46_re <= 3.45e-143) {
tmp = (y_46_im * log(hypot(x_46_re, x_46_im))) / t_1;
} else if (y_46_re <= 4.4e-32) {
tmp = t_0 / t_1;
} else if (y_46_re <= 3.1e+176) {
tmp = (log(t_2) / (2.0 / y_46_im)) / t_1;
} else {
tmp = t_3;
}
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 = Math.exp((Math.atan2(x_46_im, x_46_re) * y_46_im));
double t_2 = (x_46_re * x_46_re) + (x_46_im * x_46_im);
double t_3 = Math.sin(t_0) * Math.pow(t_2, (y_46_re / 2.0));
double tmp;
if (y_46_re <= -1.4) {
tmp = t_3;
} else if (y_46_re <= 3.45e-143) {
tmp = (y_46_im * Math.log(Math.hypot(x_46_re, x_46_im))) / t_1;
} else if (y_46_re <= 4.4e-32) {
tmp = t_0 / t_1;
} else if (y_46_re <= 3.1e+176) {
tmp = (Math.log(t_2) / (2.0 / y_46_im)) / t_1;
} else {
tmp = t_3;
}
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 = math.exp((math.atan2(x_46_im, x_46_re) * y_46_im)) t_2 = (x_46_re * x_46_re) + (x_46_im * x_46_im) t_3 = math.sin(t_0) * math.pow(t_2, (y_46_re / 2.0)) tmp = 0 if y_46_re <= -1.4: tmp = t_3 elif y_46_re <= 3.45e-143: tmp = (y_46_im * math.log(math.hypot(x_46_re, x_46_im))) / t_1 elif y_46_re <= 4.4e-32: tmp = t_0 / t_1 elif y_46_re <= 3.1e+176: tmp = (math.log(t_2) / (2.0 / y_46_im)) / t_1 else: tmp = t_3 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 = exp(Float64(atan(x_46_im, x_46_re) * y_46_im)) t_2 = Float64(Float64(x_46_re * x_46_re) + Float64(x_46_im * x_46_im)) t_3 = Float64(sin(t_0) * (t_2 ^ Float64(y_46_re / 2.0))) tmp = 0.0 if (y_46_re <= -1.4) tmp = t_3; elseif (y_46_re <= 3.45e-143) tmp = Float64(Float64(y_46_im * log(hypot(x_46_re, x_46_im))) / t_1); elseif (y_46_re <= 4.4e-32) tmp = Float64(t_0 / t_1); elseif (y_46_re <= 3.1e+176) tmp = Float64(Float64(log(t_2) / Float64(2.0 / y_46_im)) / t_1); else tmp = t_3; 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 = exp((atan2(x_46_im, x_46_re) * y_46_im)); t_2 = (x_46_re * x_46_re) + (x_46_im * x_46_im); t_3 = sin(t_0) * (t_2 ^ (y_46_re / 2.0)); tmp = 0.0; if (y_46_re <= -1.4) tmp = t_3; elseif (y_46_re <= 3.45e-143) tmp = (y_46_im * log(hypot(x_46_re, x_46_im))) / t_1; elseif (y_46_re <= 4.4e-32) tmp = t_0 / t_1; elseif (y_46_re <= 3.1e+176) tmp = (log(t_2) / (2.0 / y_46_im)) / t_1; else tmp = t_3; 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[Exp[N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$im), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$2 = N[(N[(x$46$re * x$46$re), $MachinePrecision] + N[(x$46$im * x$46$im), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[Sin[t$95$0], $MachinePrecision] * N[Power[t$95$2, N[(y$46$re / 2.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y$46$re, -1.4], t$95$3, If[LessEqual[y$46$re, 3.45e-143], N[(N[(y$46$im * N[Log[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / t$95$1), $MachinePrecision], If[LessEqual[y$46$re, 4.4e-32], N[(t$95$0 / t$95$1), $MachinePrecision], If[LessEqual[y$46$re, 3.1e+176], N[(N[(N[Log[t$95$2], $MachinePrecision] / N[(2.0 / y$46$im), $MachinePrecision]), $MachinePrecision] / t$95$1), $MachinePrecision], t$95$3]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
t_1 := e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}\\
t_2 := x.re \cdot x.re + x.im \cdot x.im\\
t_3 := \sin t\_0 \cdot {t\_2}^{\left(\frac{y.re}{2}\right)}\\
\mathbf{if}\;y.re \leq -1.4:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;y.re \leq 3.45 \cdot 10^{-143}:\\
\;\;\;\;\frac{y.im \cdot \log \left(\mathsf{hypot}\left(x.re, x.im\right)\right)}{t\_1}\\
\mathbf{elif}\;y.re \leq 4.4 \cdot 10^{-32}:\\
\;\;\;\;\frac{t\_0}{t\_1}\\
\mathbf{elif}\;y.re \leq 3.1 \cdot 10^{+176}:\\
\;\;\;\;\frac{\frac{\log t\_2}{\frac{2}{y.im}}}{t\_1}\\
\mathbf{else}:\\
\;\;\;\;t\_3\\
\end{array}
\end{array}
if y.re < -1.3999999999999999 or 3.0999999999999999e176 < y.re Initial program 45.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.f6479.0%
Simplified79.0%
*-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.f6479.0%
Applied egg-rr79.0%
if -1.3999999999999999 < y.re < 3.44999999999999994e-143Initial program 36.9%
exp-diffN/A
associate-*l/N/A
associate-/l*N/A
*-commutativeN/A
associate-/r/N/A
exp-diffN/A
Simplified79.8%
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.2%
Simplified81.2%
Taylor expanded in y.re around 0
/-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
exp-lowering-exp.f64N/A
*-lowering-*.f64N/A
atan2-lowering-atan2.f6436.8%
Simplified36.8%
+-commutativeN/A
hypot-defineN/A
hypot-lowering-hypot.f6471.4%
Applied egg-rr71.4%
if 3.44999999999999994e-143 < y.re < 4.4e-32Initial program 49.9%
exp-diffN/A
associate-*l/N/A
associate-/l*N/A
*-commutativeN/A
associate-/r/N/A
exp-diffN/A
Simplified89.7%
Taylor expanded in y.im around 0
sin-lowering-sin.f64N/A
*-lowering-*.f64N/A
atan2-lowering-atan2.f6480.7%
Simplified80.7%
Taylor expanded in y.re around 0
/-lowering-/.f64N/A
*-lowering-*.f64N/A
atan2-lowering-atan2.f64N/A
exp-lowering-exp.f64N/A
*-lowering-*.f64N/A
atan2-lowering-atan2.f6480.7%
Simplified80.7%
if 4.4e-32 < y.re < 3.0999999999999999e176Initial program 39.9%
exp-diffN/A
associate-*l/N/A
associate-/l*N/A
*-commutativeN/A
associate-/r/N/A
exp-diffN/A
Simplified62.5%
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.f6467.5%
Simplified67.5%
Taylor expanded in y.re around 0
/-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
exp-lowering-exp.f64N/A
*-lowering-*.f64N/A
atan2-lowering-atan2.f6443.0%
Simplified43.0%
frac-2negN/A
*-commutativeN/A
distribute-frac-negN/A
neg-lowering-neg.f64N/A
Applied egg-rr60.5%
Final simplification70.4%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (* y.re (atan2 x.im x.re)))
(t_1 (+ (* x.re x.re) (* x.im x.im)))
(t_2 (* (sin t_0) (pow t_1 (/ y.re 2.0))))
(t_3 (exp (* (atan2 x.im x.re) y.im))))
(if (<= y.re -1.2)
t_2
(if (<= y.re 4.4e-32)
(/ t_0 t_3)
(if (<= y.re 9.5e+177) (/ (/ (log t_1) (/ 2.0 y.im)) t_3) t_2)))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = y_46_re * atan2(x_46_im, x_46_re);
double t_1 = (x_46_re * x_46_re) + (x_46_im * x_46_im);
double t_2 = sin(t_0) * pow(t_1, (y_46_re / 2.0));
double t_3 = exp((atan2(x_46_im, x_46_re) * y_46_im));
double tmp;
if (y_46_re <= -1.2) {
tmp = t_2;
} else if (y_46_re <= 4.4e-32) {
tmp = t_0 / t_3;
} else if (y_46_re <= 9.5e+177) {
tmp = (log(t_1) / (2.0 / y_46_im)) / t_3;
} else {
tmp = t_2;
}
return tmp;
}
real(8) function code(x_46re, x_46im, y_46re, y_46im)
real(8), intent (in) :: x_46re
real(8), intent (in) :: x_46im
real(8), intent (in) :: y_46re
real(8), intent (in) :: y_46im
real(8) :: t_0
real(8) :: t_1
real(8) :: t_2
real(8) :: t_3
real(8) :: tmp
t_0 = y_46re * atan2(x_46im, x_46re)
t_1 = (x_46re * x_46re) + (x_46im * x_46im)
t_2 = sin(t_0) * (t_1 ** (y_46re / 2.0d0))
t_3 = exp((atan2(x_46im, x_46re) * y_46im))
if (y_46re <= (-1.2d0)) then
tmp = t_2
else if (y_46re <= 4.4d-32) then
tmp = t_0 / t_3
else if (y_46re <= 9.5d+177) then
tmp = (log(t_1) / (2.0d0 / y_46im)) / t_3
else
tmp = t_2
end if
code = tmp
end function
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = y_46_re * Math.atan2(x_46_im, x_46_re);
double t_1 = (x_46_re * x_46_re) + (x_46_im * x_46_im);
double t_2 = Math.sin(t_0) * Math.pow(t_1, (y_46_re / 2.0));
double t_3 = Math.exp((Math.atan2(x_46_im, x_46_re) * y_46_im));
double tmp;
if (y_46_re <= -1.2) {
tmp = t_2;
} else if (y_46_re <= 4.4e-32) {
tmp = t_0 / t_3;
} else if (y_46_re <= 9.5e+177) {
tmp = (Math.log(t_1) / (2.0 / y_46_im)) / t_3;
} else {
tmp = t_2;
}
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 = (x_46_re * x_46_re) + (x_46_im * x_46_im) t_2 = math.sin(t_0) * math.pow(t_1, (y_46_re / 2.0)) t_3 = math.exp((math.atan2(x_46_im, x_46_re) * y_46_im)) tmp = 0 if y_46_re <= -1.2: tmp = t_2 elif y_46_re <= 4.4e-32: tmp = t_0 / t_3 elif y_46_re <= 9.5e+177: tmp = (math.log(t_1) / (2.0 / y_46_im)) / t_3 else: tmp = t_2 return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = Float64(y_46_re * atan(x_46_im, x_46_re)) t_1 = Float64(Float64(x_46_re * x_46_re) + Float64(x_46_im * x_46_im)) t_2 = Float64(sin(t_0) * (t_1 ^ Float64(y_46_re / 2.0))) t_3 = exp(Float64(atan(x_46_im, x_46_re) * y_46_im)) tmp = 0.0 if (y_46_re <= -1.2) tmp = t_2; elseif (y_46_re <= 4.4e-32) tmp = Float64(t_0 / t_3); elseif (y_46_re <= 9.5e+177) tmp = Float64(Float64(log(t_1) / Float64(2.0 / y_46_im)) / t_3); else tmp = t_2; 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 = (x_46_re * x_46_re) + (x_46_im * x_46_im); t_2 = sin(t_0) * (t_1 ^ (y_46_re / 2.0)); t_3 = exp((atan2(x_46_im, x_46_re) * y_46_im)); tmp = 0.0; if (y_46_re <= -1.2) tmp = t_2; elseif (y_46_re <= 4.4e-32) tmp = t_0 / t_3; elseif (y_46_re <= 9.5e+177) tmp = (log(t_1) / (2.0 / y_46_im)) / t_3; else tmp = t_2; 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[(N[(x$46$re * x$46$re), $MachinePrecision] + N[(x$46$im * x$46$im), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[Sin[t$95$0], $MachinePrecision] * N[Power[t$95$1, N[(y$46$re / 2.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[Exp[N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$im), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[y$46$re, -1.2], t$95$2, If[LessEqual[y$46$re, 4.4e-32], N[(t$95$0 / t$95$3), $MachinePrecision], If[LessEqual[y$46$re, 9.5e+177], N[(N[(N[Log[t$95$1], $MachinePrecision] / N[(2.0 / y$46$im), $MachinePrecision]), $MachinePrecision] / t$95$3), $MachinePrecision], t$95$2]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
t_1 := x.re \cdot x.re + x.im \cdot x.im\\
t_2 := \sin t\_0 \cdot {t\_1}^{\left(\frac{y.re}{2}\right)}\\
t_3 := e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}\\
\mathbf{if}\;y.re \leq -1.2:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;y.re \leq 4.4 \cdot 10^{-32}:\\
\;\;\;\;\frac{t\_0}{t\_3}\\
\mathbf{elif}\;y.re \leq 9.5 \cdot 10^{+177}:\\
\;\;\;\;\frac{\frac{\log t\_1}{\frac{2}{y.im}}}{t\_3}\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if y.re < -1.19999999999999996 or 9.49999999999999996e177 < y.re Initial program 45.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.f6479.0%
Simplified79.0%
*-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.f6479.0%
Applied egg-rr79.0%
if -1.19999999999999996 < y.re < 4.4e-32Initial program 39.0%
exp-diffN/A
associate-*l/N/A
associate-/l*N/A
*-commutativeN/A
associate-/r/N/A
exp-diffN/A
Simplified81.4%
Taylor expanded in y.im around 0
sin-lowering-sin.f64N/A
*-lowering-*.f64N/A
atan2-lowering-atan2.f6449.6%
Simplified49.6%
Taylor expanded in y.re around 0
/-lowering-/.f64N/A
*-lowering-*.f64N/A
atan2-lowering-atan2.f64N/A
exp-lowering-exp.f64N/A
*-lowering-*.f64N/A
atan2-lowering-atan2.f6449.6%
Simplified49.6%
if 4.4e-32 < y.re < 9.49999999999999996e177Initial program 39.9%
exp-diffN/A
associate-*l/N/A
associate-/l*N/A
*-commutativeN/A
associate-/r/N/A
exp-diffN/A
Simplified62.5%
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.f6467.5%
Simplified67.5%
Taylor expanded in y.re around 0
/-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
exp-lowering-exp.f64N/A
*-lowering-*.f64N/A
atan2-lowering-atan2.f6443.0%
Simplified43.0%
frac-2negN/A
*-commutativeN/A
distribute-frac-negN/A
neg-lowering-neg.f64N/A
Applied egg-rr60.5%
Final simplification58.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) (pow (+ (* x.re x.re) (* x.im x.im)) (/ y.re 2.0)))))
(if (<= y.re -1.2)
t_1
(if (<= y.re 0.0235) (/ t_0 (exp (* (atan2 x.im x.re) y.im))) t_1))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = y_46_re * atan2(x_46_im, x_46_re);
double t_1 = sin(t_0) * 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.2) {
tmp = t_1;
} else if (y_46_re <= 0.0235) {
tmp = t_0 / exp((atan2(x_46_im, x_46_re) * y_46_im));
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x_46re, x_46im, y_46re, y_46im)
real(8), intent (in) :: x_46re
real(8), intent (in) :: x_46im
real(8), intent (in) :: y_46re
real(8), intent (in) :: y_46im
real(8) :: t_0
real(8) :: t_1
real(8) :: tmp
t_0 = y_46re * atan2(x_46im, x_46re)
t_1 = sin(t_0) * (((x_46re * x_46re) + (x_46im * x_46im)) ** (y_46re / 2.0d0))
if (y_46re <= (-1.2d0)) then
tmp = t_1
else if (y_46re <= 0.0235d0) then
tmp = t_0 / exp((atan2(x_46im, x_46re) * y_46im))
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = y_46_re * Math.atan2(x_46_im, x_46_re);
double t_1 = Math.sin(t_0) * 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.2) {
tmp = t_1;
} else if (y_46_re <= 0.0235) {
tmp = t_0 / Math.exp((Math.atan2(x_46_im, x_46_re) * y_46_im));
} 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 = math.sin(t_0) * 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.2: tmp = t_1 elif y_46_re <= 0.0235: tmp = t_0 / math.exp((math.atan2(x_46_im, x_46_re) * y_46_im)) else: tmp = t_1 return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = Float64(y_46_re * atan(x_46_im, x_46_re)) t_1 = 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))) tmp = 0.0 if (y_46_re <= -1.2) tmp = t_1; elseif (y_46_re <= 0.0235) tmp = Float64(t_0 / exp(Float64(atan(x_46_im, x_46_re) * y_46_im))); 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 = sin(t_0) * (((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.2) tmp = t_1; elseif (y_46_re <= 0.0235) tmp = t_0 / exp((atan2(x_46_im, x_46_re) * y_46_im)); 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[(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.2], t$95$1, If[LessEqual[y$46$re, 0.0235], N[(t$95$0 / N[Exp[N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$im), $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 := \sin t\_0 \cdot {\left(x.re \cdot x.re + x.im \cdot x.im\right)}^{\left(\frac{y.re}{2}\right)}\\
\mathbf{if}\;y.re \leq -1.2:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y.re \leq 0.0235:\\
\;\;\;\;\frac{t\_0}{e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if y.re < -1.19999999999999996 or 0.0235 < y.re Initial program 42.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.f6470.6%
Simplified70.6%
*-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.f6470.6%
Applied egg-rr70.6%
if -1.19999999999999996 < y.re < 0.0235Initial program 40.4%
exp-diffN/A
associate-*l/N/A
associate-/l*N/A
*-commutativeN/A
associate-/r/N/A
exp-diffN/A
Simplified81.7%
Taylor expanded in y.im around 0
sin-lowering-sin.f64N/A
*-lowering-*.f64N/A
atan2-lowering-atan2.f6450.5%
Simplified50.5%
Taylor expanded in y.re around 0
/-lowering-/.f64N/A
*-lowering-*.f64N/A
atan2-lowering-atan2.f64N/A
exp-lowering-exp.f64N/A
*-lowering-*.f64N/A
atan2-lowering-atan2.f6449.6%
Simplified49.6%
Final simplification59.6%
(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)))
(if (<= y.re -3.05e-50)
(* t_1 (pow x.re y.re))
(if (<= y.re 2.6e-158)
(* (* y.im 0.5) (log (+ (* x.re x.re) (* x.im x.im))))
(if (<= y.re 0.08) t_0 (* t_1 (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 = sin(t_0);
double tmp;
if (y_46_re <= -3.05e-50) {
tmp = t_1 * pow(x_46_re, y_46_re);
} else if (y_46_re <= 2.6e-158) {
tmp = (y_46_im * 0.5) * log(((x_46_re * x_46_re) + (x_46_im * x_46_im)));
} else if (y_46_re <= 0.08) {
tmp = t_0;
} else {
tmp = t_1 * pow(x_46_im, y_46_re);
}
return tmp;
}
real(8) function code(x_46re, x_46im, y_46re, y_46im)
real(8), intent (in) :: x_46re
real(8), intent (in) :: x_46im
real(8), intent (in) :: y_46re
real(8), intent (in) :: y_46im
real(8) :: t_0
real(8) :: t_1
real(8) :: tmp
t_0 = y_46re * atan2(x_46im, x_46re)
t_1 = sin(t_0)
if (y_46re <= (-3.05d-50)) then
tmp = t_1 * (x_46re ** y_46re)
else if (y_46re <= 2.6d-158) then
tmp = (y_46im * 0.5d0) * log(((x_46re * x_46re) + (x_46im * x_46im)))
else if (y_46re <= 0.08d0) then
tmp = t_0
else
tmp = t_1 * (x_46im ** y_46re)
end if
code = tmp
end function
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = y_46_re * Math.atan2(x_46_im, x_46_re);
double t_1 = Math.sin(t_0);
double tmp;
if (y_46_re <= -3.05e-50) {
tmp = t_1 * Math.pow(x_46_re, y_46_re);
} else if (y_46_re <= 2.6e-158) {
tmp = (y_46_im * 0.5) * Math.log(((x_46_re * x_46_re) + (x_46_im * x_46_im)));
} else if (y_46_re <= 0.08) {
tmp = t_0;
} else {
tmp = t_1 * Math.pow(x_46_im, 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) t_1 = math.sin(t_0) tmp = 0 if y_46_re <= -3.05e-50: tmp = t_1 * math.pow(x_46_re, y_46_re) elif y_46_re <= 2.6e-158: tmp = (y_46_im * 0.5) * math.log(((x_46_re * x_46_re) + (x_46_im * x_46_im))) elif y_46_re <= 0.08: tmp = t_0 else: tmp = t_1 * math.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 = sin(t_0) tmp = 0.0 if (y_46_re <= -3.05e-50) tmp = Float64(t_1 * (x_46_re ^ y_46_re)); elseif (y_46_re <= 2.6e-158) tmp = Float64(Float64(y_46_im * 0.5) * log(Float64(Float64(x_46_re * x_46_re) + Float64(x_46_im * x_46_im)))); elseif (y_46_re <= 0.08) tmp = t_0; else tmp = Float64(t_1 * (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 = y_46_re * atan2(x_46_im, x_46_re); t_1 = sin(t_0); tmp = 0.0; if (y_46_re <= -3.05e-50) tmp = t_1 * (x_46_re ^ y_46_re); elseif (y_46_re <= 2.6e-158) tmp = (y_46_im * 0.5) * log(((x_46_re * x_46_re) + (x_46_im * x_46_im))); elseif (y_46_re <= 0.08) tmp = t_0; else tmp = t_1 * (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[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[Sin[t$95$0], $MachinePrecision]}, If[LessEqual[y$46$re, -3.05e-50], N[(t$95$1 * N[Power[x$46$re, y$46$re], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$re, 2.6e-158], N[(N[(y$46$im * 0.5), $MachinePrecision] * N[Log[N[(N[(x$46$re * x$46$re), $MachinePrecision] + N[(x$46$im * x$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$re, 0.08], t$95$0, N[(t$95$1 * 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 := \sin t\_0\\
\mathbf{if}\;y.re \leq -3.05 \cdot 10^{-50}:\\
\;\;\;\;t\_1 \cdot {x.re}^{y.re}\\
\mathbf{elif}\;y.re \leq 2.6 \cdot 10^{-158}:\\
\;\;\;\;\left(y.im \cdot 0.5\right) \cdot \log \left(x.re \cdot x.re + x.im \cdot x.im\right)\\
\mathbf{elif}\;y.re \leq 0.08:\\
\;\;\;\;t\_0\\
\mathbf{else}:\\
\;\;\;\;t\_1 \cdot {x.im}^{y.re}\\
\end{array}
\end{array}
if y.re < -3.0499999999999998e-50Initial program 47.3%
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.f6471.7%
Simplified71.7%
Taylor expanded in x.im around 0
*-lowering-*.f64N/A
sin-lowering-sin.f64N/A
*-lowering-*.f64N/A
atan2-lowering-atan2.f64N/A
pow-lowering-pow.f6458.4%
Simplified58.4%
if -3.0499999999999998e-50 < y.re < 2.6e-158Initial program 36.7%
exp-diffN/A
associate-*l/N/A
associate-/l*N/A
*-commutativeN/A
associate-/r/N/A
exp-diffN/A
Simplified79.2%
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.7%
Simplified81.7%
Taylor expanded in y.re around 0
/-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
exp-lowering-exp.f64N/A
*-lowering-*.f64N/A
atan2-lowering-atan2.f6438.6%
Simplified38.6%
frac-2negN/A
*-commutativeN/A
distribute-frac-negN/A
neg-lowering-neg.f64N/A
Applied egg-rr35.5%
Taylor expanded in y.im around 0
associate-*r*N/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
log-lowering-log.f64N/A
+-lowering-+.f64N/A
unpow2N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6422.1%
Simplified22.1%
if 2.6e-158 < y.re < 0.0800000000000000017Initial program 53.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.5%
Simplified45.5%
Taylor expanded in y.re around 0
*-lowering-*.f64N/A
atan2-lowering-atan2.f6438.8%
Simplified38.8%
if 0.0800000000000000017 < y.re Initial program 35.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.f6458.0%
Simplified58.0%
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.f6451.3%
Simplified51.3%
Final simplification41.3%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (* y.re (atan2 x.im x.re))) (t_1 (* (sin t_0) (pow x.im y.re))))
(if (<= y.re -6e-32)
t_1
(if (<= y.re 3.7e-159)
(* (* y.im 0.5) (log (+ (* x.re x.re) (* x.im x.im))))
(if (<= y.re 0.28) t_0 t_1)))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = y_46_re * atan2(x_46_im, x_46_re);
double t_1 = sin(t_0) * pow(x_46_im, y_46_re);
double tmp;
if (y_46_re <= -6e-32) {
tmp = t_1;
} else if (y_46_re <= 3.7e-159) {
tmp = (y_46_im * 0.5) * log(((x_46_re * x_46_re) + (x_46_im * x_46_im)));
} else if (y_46_re <= 0.28) {
tmp = t_0;
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x_46re, x_46im, y_46re, y_46im)
real(8), intent (in) :: x_46re
real(8), intent (in) :: x_46im
real(8), intent (in) :: y_46re
real(8), intent (in) :: y_46im
real(8) :: t_0
real(8) :: t_1
real(8) :: tmp
t_0 = y_46re * atan2(x_46im, x_46re)
t_1 = sin(t_0) * (x_46im ** y_46re)
if (y_46re <= (-6d-32)) then
tmp = t_1
else if (y_46re <= 3.7d-159) then
tmp = (y_46im * 0.5d0) * log(((x_46re * x_46re) + (x_46im * x_46im)))
else if (y_46re <= 0.28d0) then
tmp = t_0
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = y_46_re * Math.atan2(x_46_im, x_46_re);
double t_1 = Math.sin(t_0) * Math.pow(x_46_im, y_46_re);
double tmp;
if (y_46_re <= -6e-32) {
tmp = t_1;
} else if (y_46_re <= 3.7e-159) {
tmp = (y_46_im * 0.5) * Math.log(((x_46_re * x_46_re) + (x_46_im * x_46_im)));
} else if (y_46_re <= 0.28) {
tmp = t_0;
} else {
tmp = t_1;
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): t_0 = y_46_re * math.atan2(x_46_im, x_46_re) t_1 = math.sin(t_0) * math.pow(x_46_im, y_46_re) tmp = 0 if y_46_re <= -6e-32: tmp = t_1 elif y_46_re <= 3.7e-159: tmp = (y_46_im * 0.5) * math.log(((x_46_re * x_46_re) + (x_46_im * x_46_im))) elif y_46_re <= 0.28: tmp = t_0 else: tmp = t_1 return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = Float64(y_46_re * atan(x_46_im, x_46_re)) t_1 = Float64(sin(t_0) * (x_46_im ^ y_46_re)) tmp = 0.0 if (y_46_re <= -6e-32) tmp = t_1; elseif (y_46_re <= 3.7e-159) tmp = Float64(Float64(y_46_im * 0.5) * log(Float64(Float64(x_46_re * x_46_re) + Float64(x_46_im * x_46_im)))); elseif (y_46_re <= 0.28) tmp = t_0; else tmp = t_1; end return tmp end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = y_46_re * atan2(x_46_im, x_46_re); t_1 = sin(t_0) * (x_46_im ^ y_46_re); tmp = 0.0; if (y_46_re <= -6e-32) tmp = t_1; elseif (y_46_re <= 3.7e-159) tmp = (y_46_im * 0.5) * log(((x_46_re * x_46_re) + (x_46_im * x_46_im))); elseif (y_46_re <= 0.28) tmp = t_0; else tmp = t_1; end tmp_2 = tmp; end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(N[Sin[t$95$0], $MachinePrecision] * N[Power[x$46$im, y$46$re], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y$46$re, -6e-32], t$95$1, If[LessEqual[y$46$re, 3.7e-159], N[(N[(y$46$im * 0.5), $MachinePrecision] * N[Log[N[(N[(x$46$re * x$46$re), $MachinePrecision] + N[(x$46$im * x$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$re, 0.28], t$95$0, t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
t_1 := \sin t\_0 \cdot {x.im}^{y.re}\\
\mathbf{if}\;y.re \leq -6 \cdot 10^{-32}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y.re \leq 3.7 \cdot 10^{-159}:\\
\;\;\;\;\left(y.im \cdot 0.5\right) \cdot \log \left(x.re \cdot x.re + x.im \cdot x.im\right)\\
\mathbf{elif}\;y.re \leq 0.28:\\
\;\;\;\;t\_0\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if y.re < -6.0000000000000001e-32 or 0.28000000000000003 < y.re Initial program 42.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.f6467.9%
Simplified67.9%
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.f6448.6%
Simplified48.6%
if -6.0000000000000001e-32 < y.re < 3.6999999999999999e-159Initial program 36.5%
exp-diffN/A
associate-*l/N/A
associate-/l*N/A
*-commutativeN/A
associate-/r/N/A
exp-diffN/A
Simplified80.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.f6481.9%
Simplified81.9%
Taylor expanded in y.re around 0
/-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
exp-lowering-exp.f64N/A
*-lowering-*.f64N/A
atan2-lowering-atan2.f6436.5%
Simplified36.5%
frac-2negN/A
*-commutativeN/A
distribute-frac-negN/A
neg-lowering-neg.f64N/A
Applied egg-rr33.6%
Taylor expanded in y.im around 0
associate-*r*N/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
log-lowering-log.f64N/A
+-lowering-+.f64N/A
unpow2N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6421.1%
Simplified21.1%
if 3.6999999999999999e-159 < y.re < 0.28000000000000003Initial program 53.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.5%
Simplified45.5%
Taylor expanded in y.re around 0
*-lowering-*.f64N/A
atan2-lowering-atan2.f6438.8%
Simplified38.8%
Final simplification36.8%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (* (* y.re (atan2 x.im x.re)) (pow (hypot x.im x.re) y.re))))
(if (<= y.re -1.4)
t_0
(if (<= y.re 1.55e-139)
(/ (* y.im (log (- 0.0 x.re))) (exp (* (atan2 x.im x.re) y.im)))
t_0))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = (y_46_re * atan2(x_46_im, x_46_re)) * pow(hypot(x_46_im, x_46_re), y_46_re);
double tmp;
if (y_46_re <= -1.4) {
tmp = t_0;
} else if (y_46_re <= 1.55e-139) {
tmp = (y_46_im * log((0.0 - x_46_re))) / exp((atan2(x_46_im, x_46_re) * y_46_im));
} 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(Math.hypot(x_46_im, x_46_re), y_46_re);
double tmp;
if (y_46_re <= -1.4) {
tmp = t_0;
} else if (y_46_re <= 1.55e-139) {
tmp = (y_46_im * Math.log((0.0 - x_46_re))) / Math.exp((Math.atan2(x_46_im, x_46_re) * y_46_im));
} 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(math.hypot(x_46_im, x_46_re), y_46_re) tmp = 0 if y_46_re <= -1.4: tmp = t_0 elif y_46_re <= 1.55e-139: tmp = (y_46_im * math.log((0.0 - x_46_re))) / math.exp((math.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(Float64(y_46_re * atan(x_46_im, x_46_re)) * (hypot(x_46_im, x_46_re) ^ y_46_re)) tmp = 0.0 if (y_46_re <= -1.4) tmp = t_0; elseif (y_46_re <= 1.55e-139) tmp = Float64(Float64(y_46_im * log(Float64(0.0 - x_46_re))) / exp(Float64(atan(x_46_im, x_46_re) * y_46_im))); 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)) * (hypot(x_46_im, x_46_re) ^ y_46_re); tmp = 0.0; if (y_46_re <= -1.4) tmp = t_0; elseif (y_46_re <= 1.55e-139) tmp = (y_46_im * log((0.0 - x_46_re))) / exp((atan2(x_46_im, x_46_re) * y_46_im)); 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[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision], y$46$re], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y$46$re, -1.4], t$95$0, If[LessEqual[y$46$re, 1.55e-139], N[(N[(y$46$im * N[Log[N[(0.0 - x$46$re), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / N[Exp[N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$im), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], t$95$0]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re}\\
\mathbf{if}\;y.re \leq -1.4:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;y.re \leq 1.55 \cdot 10^{-139}:\\
\;\;\;\;\frac{y.im \cdot \log \left(0 - x.re\right)}{e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}}\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
if y.re < -1.3999999999999999 or 1.55e-139 < y.re Initial program 44.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
unpow2N/A
unpow2N/A
hypot-defineN/A
hypot-lowering-hypot.f6466.2%
Simplified66.2%
Taylor expanded in y.re around 0
*-lowering-*.f64N/A
atan2-lowering-atan2.f6460.3%
Simplified60.3%
if -1.3999999999999999 < y.re < 1.55e-139Initial program 36.5%
exp-diffN/A
associate-*l/N/A
associate-/l*N/A
*-commutativeN/A
associate-/r/N/A
exp-diffN/A
Simplified80.0%
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.4%
Simplified81.4%
Taylor expanded in y.re around 0
/-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
exp-lowering-exp.f64N/A
*-lowering-*.f64N/A
atan2-lowering-atan2.f6436.5%
Simplified36.5%
Taylor expanded in x.re around -inf
mul-1-negN/A
neg-lowering-neg.f6436.5%
Simplified36.5%
Final simplification50.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 -2.0)
(* t_0 (pow (hypot x.im x.re) y.re))
(if (<= y.re 7.5e+43)
(/ t_0 (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 <= -2.0) {
tmp = t_0 * pow(hypot(x_46_im, x_46_re), y_46_re);
} else if (y_46_re <= 7.5e+43) {
tmp = t_0 / 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;
}
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 <= -2.0) {
tmp = t_0 * Math.pow(Math.hypot(x_46_im, x_46_re), y_46_re);
} else if (y_46_re <= 7.5e+43) {
tmp = t_0 / Math.exp((Math.atan2(x_46_im, x_46_re) * y_46_im));
} else {
tmp = Math.sin(t_0) * Math.pow(x_46_im, 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 <= -2.0: tmp = t_0 * math.pow(math.hypot(x_46_im, x_46_re), y_46_re) elif y_46_re <= 7.5e+43: tmp = t_0 / math.exp((math.atan2(x_46_im, x_46_re) * y_46_im)) else: tmp = math.sin(t_0) * math.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 <= -2.0) tmp = Float64(t_0 * (hypot(x_46_im, x_46_re) ^ y_46_re)); elseif (y_46_re <= 7.5e+43) tmp = Float64(t_0 / exp(Float64(atan(x_46_im, x_46_re) * y_46_im))); else tmp = Float64(sin(t_0) * (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 = y_46_re * atan2(x_46_im, x_46_re); tmp = 0.0; if (y_46_re <= -2.0) tmp = t_0 * (hypot(x_46_im, x_46_re) ^ y_46_re); elseif (y_46_re <= 7.5e+43) tmp = t_0 / exp((atan2(x_46_im, x_46_re) * y_46_im)); else tmp = sin(t_0) * (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[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y$46$re, -2.0], 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.5e+43], N[(t$95$0 / N[Exp[N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$im), $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 -2:\\
\;\;\;\;t\_0 \cdot {\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re}\\
\mathbf{elif}\;y.re \leq 7.5 \cdot 10^{+43}:\\
\;\;\;\;\frac{t\_0}{e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}}\\
\mathbf{else}:\\
\;\;\;\;\sin t\_0 \cdot {x.im}^{y.re}\\
\end{array}
\end{array}
if y.re < -2Initial 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.f6481.4%
Simplified81.4%
Taylor expanded in y.re around 0
*-lowering-*.f64N/A
atan2-lowering-atan2.f6475.2%
Simplified75.2%
if -2 < y.re < 7.49999999999999967e43Initial program 37.6%
exp-diffN/A
associate-*l/N/A
associate-/l*N/A
*-commutativeN/A
associate-/r/N/A
exp-diffN/A
Simplified78.2%
Taylor expanded in y.im around 0
sin-lowering-sin.f64N/A
*-lowering-*.f64N/A
atan2-lowering-atan2.f6449.4%
Simplified49.4%
Taylor expanded in y.re around 0
/-lowering-/.f64N/A
*-lowering-*.f64N/A
atan2-lowering-atan2.f64N/A
exp-lowering-exp.f64N/A
*-lowering-*.f64N/A
atan2-lowering-atan2.f6447.5%
Simplified47.5%
if 7.49999999999999967e43 < y.re Initial program 44.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.2%
Simplified65.2%
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.f6460.9%
Simplified60.9%
Final simplification56.6%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (* (* y.re (atan2 x.im x.re)) (pow (hypot x.im x.re) y.re))))
(if (<= y.re -0.00195)
t_0
(if (<= y.re 2.2e-140)
(/ (* y.im (log x.im)) (exp (* (atan2 x.im x.re) y.im)))
t_0))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = (y_46_re * atan2(x_46_im, x_46_re)) * pow(hypot(x_46_im, x_46_re), y_46_re);
double tmp;
if (y_46_re <= -0.00195) {
tmp = t_0;
} else if (y_46_re <= 2.2e-140) {
tmp = (y_46_im * log(x_46_im)) / exp((atan2(x_46_im, x_46_re) * y_46_im));
} 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(Math.hypot(x_46_im, x_46_re), y_46_re);
double tmp;
if (y_46_re <= -0.00195) {
tmp = t_0;
} else if (y_46_re <= 2.2e-140) {
tmp = (y_46_im * Math.log(x_46_im)) / Math.exp((Math.atan2(x_46_im, x_46_re) * y_46_im));
} 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(math.hypot(x_46_im, x_46_re), y_46_re) tmp = 0 if y_46_re <= -0.00195: tmp = t_0 elif y_46_re <= 2.2e-140: tmp = (y_46_im * math.log(x_46_im)) / math.exp((math.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(Float64(y_46_re * atan(x_46_im, x_46_re)) * (hypot(x_46_im, x_46_re) ^ y_46_re)) tmp = 0.0 if (y_46_re <= -0.00195) tmp = t_0; elseif (y_46_re <= 2.2e-140) tmp = Float64(Float64(y_46_im * log(x_46_im)) / exp(Float64(atan(x_46_im, x_46_re) * y_46_im))); 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)) * (hypot(x_46_im, x_46_re) ^ y_46_re); tmp = 0.0; if (y_46_re <= -0.00195) tmp = t_0; elseif (y_46_re <= 2.2e-140) tmp = (y_46_im * log(x_46_im)) / exp((atan2(x_46_im, x_46_re) * y_46_im)); 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[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision], y$46$re], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y$46$re, -0.00195], t$95$0, If[LessEqual[y$46$re, 2.2e-140], N[(N[(y$46$im * N[Log[x$46$im], $MachinePrecision]), $MachinePrecision] / N[Exp[N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$im), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], t$95$0]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re}\\
\mathbf{if}\;y.re \leq -0.00195:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;y.re \leq 2.2 \cdot 10^{-140}:\\
\;\;\;\;\frac{y.im \cdot \log x.im}{e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}}\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
if y.re < -0.0019499999999999999 or 2.1999999999999999e-140 < y.re Initial program 44.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
unpow2N/A
unpow2N/A
hypot-defineN/A
hypot-lowering-hypot.f6466.2%
Simplified66.2%
Taylor expanded in y.re around 0
*-lowering-*.f64N/A
atan2-lowering-atan2.f6460.3%
Simplified60.3%
if -0.0019499999999999999 < y.re < 2.1999999999999999e-140Initial program 36.5%
exp-diffN/A
associate-*l/N/A
associate-/l*N/A
*-commutativeN/A
associate-/r/N/A
exp-diffN/A
Simplified80.0%
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.4%
Simplified81.4%
Taylor expanded in y.re around 0
/-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
exp-lowering-exp.f64N/A
*-lowering-*.f64N/A
atan2-lowering-atan2.f6436.5%
Simplified36.5%
Taylor expanded in x.re around 0
/-lowering-/.f64N/A
*-lowering-*.f64N/A
log-lowering-log.f64N/A
exp-lowering-exp.f64N/A
*-lowering-*.f64N/A
atan2-lowering-atan2.f6431.2%
Simplified31.2%
Final simplification48.1%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (* (* y.re (atan2 x.im x.re)) (pow (hypot x.im x.re) y.re))))
(if (<= y.re -3.7e-51)
t_0
(if (<= y.re 1.5e-159)
(* (* y.im 0.5) (log (+ (* x.re x.re) (* x.im x.im))))
t_0))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = (y_46_re * atan2(x_46_im, x_46_re)) * pow(hypot(x_46_im, x_46_re), y_46_re);
double tmp;
if (y_46_re <= -3.7e-51) {
tmp = t_0;
} else if (y_46_re <= 1.5e-159) {
tmp = (y_46_im * 0.5) * log(((x_46_re * x_46_re) + (x_46_im * x_46_im)));
} 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(Math.hypot(x_46_im, x_46_re), y_46_re);
double tmp;
if (y_46_re <= -3.7e-51) {
tmp = t_0;
} else if (y_46_re <= 1.5e-159) {
tmp = (y_46_im * 0.5) * Math.log(((x_46_re * x_46_re) + (x_46_im * x_46_im)));
} 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(math.hypot(x_46_im, x_46_re), y_46_re) tmp = 0 if y_46_re <= -3.7e-51: tmp = t_0 elif y_46_re <= 1.5e-159: tmp = (y_46_im * 0.5) * math.log(((x_46_re * x_46_re) + (x_46_im * x_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(Float64(y_46_re * atan(x_46_im, x_46_re)) * (hypot(x_46_im, x_46_re) ^ y_46_re)) tmp = 0.0 if (y_46_re <= -3.7e-51) tmp = t_0; elseif (y_46_re <= 1.5e-159) tmp = Float64(Float64(y_46_im * 0.5) * log(Float64(Float64(x_46_re * x_46_re) + Float64(x_46_im * x_46_im)))); 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)) * (hypot(x_46_im, x_46_re) ^ y_46_re); tmp = 0.0; if (y_46_re <= -3.7e-51) tmp = t_0; elseif (y_46_re <= 1.5e-159) tmp = (y_46_im * 0.5) * log(((x_46_re * x_46_re) + (x_46_im * x_46_im))); 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[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision], y$46$re], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y$46$re, -3.7e-51], t$95$0, If[LessEqual[y$46$re, 1.5e-159], N[(N[(y$46$im * 0.5), $MachinePrecision] * N[Log[N[(N[(x$46$re * x$46$re), $MachinePrecision] + N[(x$46$im * x$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], t$95$0]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re}\\
\mathbf{if}\;y.re \leq -3.7 \cdot 10^{-51}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;y.re \leq 1.5 \cdot 10^{-159}:\\
\;\;\;\;\left(y.im \cdot 0.5\right) \cdot \log \left(x.re \cdot x.re + x.im \cdot x.im\right)\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
if y.re < -3.69999999999999973e-51 or 1.50000000000000005e-159 < y.re Initial program 44.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.f6462.1%
Simplified62.1%
Taylor expanded in y.re around 0
*-lowering-*.f64N/A
atan2-lowering-atan2.f6456.6%
Simplified56.6%
if -3.69999999999999973e-51 < y.re < 1.50000000000000005e-159Initial program 36.7%
exp-diffN/A
associate-*l/N/A
associate-/l*N/A
*-commutativeN/A
associate-/r/N/A
exp-diffN/A
Simplified79.2%
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.7%
Simplified81.7%
Taylor expanded in y.re around 0
/-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
exp-lowering-exp.f64N/A
*-lowering-*.f64N/A
atan2-lowering-atan2.f6438.6%
Simplified38.6%
frac-2negN/A
*-commutativeN/A
distribute-frac-negN/A
neg-lowering-neg.f64N/A
Applied egg-rr35.5%
Taylor expanded in y.im around 0
associate-*r*N/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
log-lowering-log.f64N/A
+-lowering-+.f64N/A
unpow2N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6422.1%
Simplified22.1%
Final simplification44.1%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (* (* y.im 0.5) (log (+ (* x.re x.re) (* x.im x.im))))))
(if (<= y.re -1.65e-51)
(* y.re (log (exp (atan2 x.im x.re))))
(if (<= y.re 2.7e-156)
t_0
(if (<= y.re 0.72) (* y.re (atan2 x.im x.re)) t_0)))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = (y_46_im * 0.5) * log(((x_46_re * x_46_re) + (x_46_im * x_46_im)));
double tmp;
if (y_46_re <= -1.65e-51) {
tmp = y_46_re * log(exp(atan2(x_46_im, x_46_re)));
} else if (y_46_re <= 2.7e-156) {
tmp = t_0;
} else if (y_46_re <= 0.72) {
tmp = y_46_re * atan2(x_46_im, x_46_re);
} else {
tmp = t_0;
}
return tmp;
}
real(8) function code(x_46re, x_46im, y_46re, y_46im)
real(8), intent (in) :: x_46re
real(8), intent (in) :: x_46im
real(8), intent (in) :: y_46re
real(8), intent (in) :: y_46im
real(8) :: t_0
real(8) :: tmp
t_0 = (y_46im * 0.5d0) * log(((x_46re * x_46re) + (x_46im * x_46im)))
if (y_46re <= (-1.65d-51)) then
tmp = y_46re * log(exp(atan2(x_46im, x_46re)))
else if (y_46re <= 2.7d-156) then
tmp = t_0
else if (y_46re <= 0.72d0) then
tmp = y_46re * atan2(x_46im, x_46re)
else
tmp = t_0
end if
code = tmp
end function
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = (y_46_im * 0.5) * Math.log(((x_46_re * x_46_re) + (x_46_im * x_46_im)));
double tmp;
if (y_46_re <= -1.65e-51) {
tmp = y_46_re * Math.log(Math.exp(Math.atan2(x_46_im, x_46_re)));
} else if (y_46_re <= 2.7e-156) {
tmp = t_0;
} else if (y_46_re <= 0.72) {
tmp = y_46_re * Math.atan2(x_46_im, x_46_re);
} else {
tmp = t_0;
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): t_0 = (y_46_im * 0.5) * math.log(((x_46_re * x_46_re) + (x_46_im * x_46_im))) tmp = 0 if y_46_re <= -1.65e-51: tmp = y_46_re * math.log(math.exp(math.atan2(x_46_im, x_46_re))) elif y_46_re <= 2.7e-156: tmp = t_0 elif y_46_re <= 0.72: tmp = y_46_re * math.atan2(x_46_im, x_46_re) else: tmp = t_0 return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = Float64(Float64(y_46_im * 0.5) * log(Float64(Float64(x_46_re * x_46_re) + Float64(x_46_im * x_46_im)))) tmp = 0.0 if (y_46_re <= -1.65e-51) tmp = Float64(y_46_re * log(exp(atan(x_46_im, x_46_re)))); elseif (y_46_re <= 2.7e-156) tmp = t_0; elseif (y_46_re <= 0.72) tmp = Float64(y_46_re * atan(x_46_im, x_46_re)); else tmp = t_0; end return tmp end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = (y_46_im * 0.5) * log(((x_46_re * x_46_re) + (x_46_im * x_46_im))); tmp = 0.0; if (y_46_re <= -1.65e-51) tmp = y_46_re * log(exp(atan2(x_46_im, x_46_re))); elseif (y_46_re <= 2.7e-156) tmp = t_0; elseif (y_46_re <= 0.72) tmp = y_46_re * atan2(x_46_im, x_46_re); else tmp = t_0; end tmp_2 = tmp; end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[(N[(y$46$im * 0.5), $MachinePrecision] * N[Log[N[(N[(x$46$re * x$46$re), $MachinePrecision] + N[(x$46$im * x$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y$46$re, -1.65e-51], N[(y$46$re * N[Log[N[Exp[N[ArcTan[x$46$im / x$46$re], $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$re, 2.7e-156], t$95$0, If[LessEqual[y$46$re, 0.72], N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision], t$95$0]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \left(y.im \cdot 0.5\right) \cdot \log \left(x.re \cdot x.re + x.im \cdot x.im\right)\\
\mathbf{if}\;y.re \leq -1.65 \cdot 10^{-51}:\\
\;\;\;\;y.re \cdot \log \left(e^{\tan^{-1}_* \frac{x.im}{x.re}}\right)\\
\mathbf{elif}\;y.re \leq 2.7 \cdot 10^{-156}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;y.re \leq 0.72:\\
\;\;\;\;y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
if y.re < -1.64999999999999986e-51Initial program 47.3%
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.f6471.7%
Simplified71.7%
Taylor expanded in y.re around 0
*-lowering-*.f64N/A
atan2-lowering-atan2.f6411.7%
Simplified11.7%
rem-log-expN/A
log-lowering-log.f64N/A
exp-lowering-exp.f64N/A
atan2-lowering-atan2.f6424.3%
Applied egg-rr24.3%
if -1.64999999999999986e-51 < y.re < 2.70000000000000012e-156 or 0.71999999999999997 < y.re Initial program 36.1%
exp-diffN/A
associate-*l/N/A
associate-/l*N/A
*-commutativeN/A
associate-/r/N/A
exp-diffN/A
Simplified71.1%
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.f6475.3%
Simplified75.3%
Taylor expanded in y.re around 0
/-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
exp-lowering-exp.f64N/A
*-lowering-*.f64N/A
atan2-lowering-atan2.f6437.5%
Simplified37.5%
frac-2negN/A
*-commutativeN/A
distribute-frac-negN/A
neg-lowering-neg.f64N/A
Applied egg-rr41.6%
Taylor expanded in y.im around 0
associate-*r*N/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
log-lowering-log.f64N/A
+-lowering-+.f64N/A
unpow2N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6423.5%
Simplified23.5%
if 2.70000000000000012e-156 < y.re < 0.71999999999999997Initial program 53.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.5%
Simplified45.5%
Taylor expanded in y.re around 0
*-lowering-*.f64N/A
atan2-lowering-atan2.f6438.8%
Simplified38.8%
Final simplification25.5%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (* (* y.im 0.5) (log (+ (* x.re x.re) (* x.im x.im))))))
(if (<= y.re 7.4e-149)
t_0
(if (<= y.re 1.22) (* y.re (atan2 x.im x.re)) t_0))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = (y_46_im * 0.5) * log(((x_46_re * x_46_re) + (x_46_im * x_46_im)));
double tmp;
if (y_46_re <= 7.4e-149) {
tmp = t_0;
} else if (y_46_re <= 1.22) {
tmp = y_46_re * atan2(x_46_im, x_46_re);
} else {
tmp = t_0;
}
return tmp;
}
real(8) function code(x_46re, x_46im, y_46re, y_46im)
real(8), intent (in) :: x_46re
real(8), intent (in) :: x_46im
real(8), intent (in) :: y_46re
real(8), intent (in) :: y_46im
real(8) :: t_0
real(8) :: tmp
t_0 = (y_46im * 0.5d0) * log(((x_46re * x_46re) + (x_46im * x_46im)))
if (y_46re <= 7.4d-149) then
tmp = t_0
else if (y_46re <= 1.22d0) then
tmp = y_46re * atan2(x_46im, x_46re)
else
tmp = t_0
end if
code = tmp
end function
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = (y_46_im * 0.5) * Math.log(((x_46_re * x_46_re) + (x_46_im * x_46_im)));
double tmp;
if (y_46_re <= 7.4e-149) {
tmp = t_0;
} else if (y_46_re <= 1.22) {
tmp = y_46_re * Math.atan2(x_46_im, x_46_re);
} else {
tmp = t_0;
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): t_0 = (y_46_im * 0.5) * math.log(((x_46_re * x_46_re) + (x_46_im * x_46_im))) tmp = 0 if y_46_re <= 7.4e-149: tmp = t_0 elif y_46_re <= 1.22: tmp = y_46_re * math.atan2(x_46_im, x_46_re) else: tmp = t_0 return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = Float64(Float64(y_46_im * 0.5) * log(Float64(Float64(x_46_re * x_46_re) + Float64(x_46_im * x_46_im)))) tmp = 0.0 if (y_46_re <= 7.4e-149) tmp = t_0; elseif (y_46_re <= 1.22) tmp = Float64(y_46_re * atan(x_46_im, x_46_re)); else tmp = t_0; end return tmp end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = (y_46_im * 0.5) * log(((x_46_re * x_46_re) + (x_46_im * x_46_im))); tmp = 0.0; if (y_46_re <= 7.4e-149) tmp = t_0; elseif (y_46_re <= 1.22) tmp = y_46_re * atan2(x_46_im, x_46_re); else tmp = t_0; end tmp_2 = tmp; end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[(N[(y$46$im * 0.5), $MachinePrecision] * N[Log[N[(N[(x$46$re * x$46$re), $MachinePrecision] + N[(x$46$im * x$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y$46$re, 7.4e-149], t$95$0, If[LessEqual[y$46$re, 1.22], N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision], t$95$0]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \left(y.im \cdot 0.5\right) \cdot \log \left(x.re \cdot x.re + x.im \cdot x.im\right)\\
\mathbf{if}\;y.re \leq 7.4 \cdot 10^{-149}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;y.re \leq 1.22:\\
\;\;\;\;y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
if y.re < 7.3999999999999998e-149 or 1.21999999999999997 < y.re Initial program 39.9%
exp-diffN/A
associate-*l/N/A
associate-/l*N/A
*-commutativeN/A
associate-/r/N/A
exp-diffN/A
Simplified72.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.f6473.9%
Simplified73.9%
Taylor expanded in y.re around 0
/-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
exp-lowering-exp.f64N/A
*-lowering-*.f64N/A
atan2-lowering-atan2.f6434.7%
Simplified34.7%
frac-2negN/A
*-commutativeN/A
distribute-frac-negN/A
neg-lowering-neg.f64N/A
Applied egg-rr35.6%
Taylor expanded in y.im around 0
associate-*r*N/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
log-lowering-log.f64N/A
+-lowering-+.f64N/A
unpow2N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6418.6%
Simplified18.6%
if 7.3999999999999998e-149 < y.re < 1.21999999999999997Initial program 53.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.5%
Simplified45.5%
Taylor expanded in y.re around 0
*-lowering-*.f64N/A
atan2-lowering-atan2.f6438.8%
Simplified38.8%
Final simplification21.0%
(FPCore (x.re x.im y.re y.im) :precision binary64 (* y.re (atan2 x.im x.re)))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
return y_46_re * atan2(x_46_im, x_46_re);
}
real(8) function code(x_46re, x_46im, y_46re, y_46im)
real(8), intent (in) :: x_46re
real(8), intent (in) :: x_46im
real(8), intent (in) :: y_46re
real(8), intent (in) :: y_46im
code = y_46re * atan2(x_46im, x_46re)
end function
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
return y_46_re * Math.atan2(x_46_im, x_46_re);
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): return y_46_re * math.atan2(x_46_im, x_46_re)
function code(x_46_re, x_46_im, y_46_re, y_46_im) return Float64(y_46_re * atan(x_46_im, x_46_re)) end
function tmp = code(x_46_re, x_46_im, y_46_re, y_46_im) tmp = y_46_re * atan2(x_46_im, x_46_re); end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}
\end{array}
Initial program 41.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.f6443.6%
Simplified43.6%
Taylor expanded in y.re around 0
*-lowering-*.f64N/A
atan2-lowering-atan2.f6412.7%
Simplified12.7%
herbie shell --seed 2024139
(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)))))