
(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 18 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 (* y.re (atan2 x.im x.re)))
(t_2 (log (hypot x.re x.im)))
(t_3 (* (exp (- (* y.re t_2) t_0)) (sin (fma t_2 y.im t_1))))
(t_4 (log (sqrt (+ (* x.re x.re) (* x.im x.im))))))
(if (<= y.re 3300000.0)
t_3
(if (<= y.re 2e+118)
(* (exp (- (* y.re t_4) t_0)) (* y.im t_4))
(if (<= y.re 6.2e+150)
t_3
(*
(pow (hypot x.im x.re) y.re)
(sin (pow (cbrt (fma y.im t_2 t_1)) 3.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 = log(hypot(x_46_re, x_46_im));
double t_3 = exp(((y_46_re * t_2) - t_0)) * sin(fma(t_2, y_46_im, t_1));
double t_4 = log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))));
double tmp;
if (y_46_re <= 3300000.0) {
tmp = t_3;
} else if (y_46_re <= 2e+118) {
tmp = exp(((y_46_re * t_4) - t_0)) * (y_46_im * t_4);
} else if (y_46_re <= 6.2e+150) {
tmp = t_3;
} else {
tmp = pow(hypot(x_46_im, x_46_re), y_46_re) * sin(pow(cbrt(fma(y_46_im, t_2, t_1)), 3.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 = log(hypot(x_46_re, x_46_im)) t_3 = Float64(exp(Float64(Float64(y_46_re * t_2) - t_0)) * sin(fma(t_2, y_46_im, t_1))) t_4 = log(sqrt(Float64(Float64(x_46_re * x_46_re) + Float64(x_46_im * x_46_im)))) tmp = 0.0 if (y_46_re <= 3300000.0) tmp = t_3; elseif (y_46_re <= 2e+118) tmp = Float64(exp(Float64(Float64(y_46_re * t_4) - t_0)) * Float64(y_46_im * t_4)); elseif (y_46_re <= 6.2e+150) tmp = t_3; else tmp = Float64((hypot(x_46_im, x_46_re) ^ y_46_re) * sin((cbrt(fma(y_46_im, t_2, t_1)) ^ 3.0))); end return tmp end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$im), $MachinePrecision]}, Block[{t$95$1 = N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[Log[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $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$2 * y$46$im + t$95$1), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[Log[N[Sqrt[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, 3300000.0], t$95$3, If[LessEqual[y$46$re, 2e+118], N[(N[Exp[N[(N[(y$46$re * t$95$4), $MachinePrecision] - t$95$0), $MachinePrecision]], $MachinePrecision] * N[(y$46$im * t$95$4), $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$re, 6.2e+150], t$95$3, N[(N[Power[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision], y$46$re], $MachinePrecision] * N[Sin[N[Power[N[Power[N[(y$46$im * t$95$2 + t$95$1), $MachinePrecision], 1/3], $MachinePrecision], 3.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 := \log \left(\mathsf{hypot}\left(x.re, x.im\right)\right)\\
t_3 := e^{y.re \cdot t_2 - t_0} \cdot \sin \left(\mathsf{fma}\left(t_2, y.im, t_1\right)\right)\\
t_4 := \log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right)\\
\mathbf{if}\;y.re \leq 3300000:\\
\;\;\;\;t_3\\
\mathbf{elif}\;y.re \leq 2 \cdot 10^{+118}:\\
\;\;\;\;e^{y.re \cdot t_4 - t_0} \cdot \left(y.im \cdot t_4\right)\\
\mathbf{elif}\;y.re \leq 6.2 \cdot 10^{+150}:\\
\;\;\;\;t_3\\
\mathbf{else}:\\
\;\;\;\;{\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re} \cdot \sin \left({\left(\sqrt[3]{\mathsf{fma}\left(y.im, t_2, t_1\right)}\right)}^{3}\right)\\
\end{array}
\end{array}
if y.re < 3.3e6 or 1.99999999999999993e118 < y.re < 6.20000000000000028e150Initial program 42.0%
Simplified86.2%
if 3.3e6 < y.re < 1.99999999999999993e118Initial program 36.0%
Taylor expanded in y.re around 0 60.0%
+-commutative60.0%
unpow260.0%
unpow260.0%
Simplified60.0%
Taylor expanded in y.im around 0 92.0%
unpow292.0%
unpow292.0%
Simplified92.0%
if 6.20000000000000028e150 < y.re Initial program 37.5%
exp-diff34.4%
+-rgt-identity34.4%
+-rgt-identity34.4%
exp-to-pow34.4%
hypot-def34.4%
*-commutative34.4%
exp-prod34.4%
+-commutative34.4%
*-commutative34.4%
Simplified50.0%
Taylor expanded in y.im around 0 56.3%
unpow256.3%
unpow256.3%
hypot-def56.3%
Simplified56.3%
fma-udef56.3%
*-commutative56.3%
hypot-udef37.5%
+-commutative37.5%
add-cube-cbrt40.6%
pow343.8%
*-commutative43.8%
hypot-udef78.1%
fma-def78.1%
Applied egg-rr78.1%
Final simplification85.8%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (log (sqrt (+ (* x.re x.re) (* x.im x.im)))))
(t_1 (log (hypot x.re x.im)))
(t_2 (* y.re (atan2 x.im x.re)))
(t_3 (exp (- (* y.re t_0) (* (atan2 x.im x.re) y.im)))))
(if (<= y.re -3.7e-9)
(* t_2 t_3)
(if (<= y.re 4200.0)
(*
(exp (* (atan2 x.im x.re) (- y.im)))
(sin (fma y.re (atan2 x.im x.re) (* t_1 y.im))))
(if (<= y.re 3.6e+129)
(* t_3 (* y.im t_0))
(if (<= y.re 1.15e+187)
(* t_3 (sin t_2))
(if (<= y.re 3.05e+205)
(sqrt (pow t_2 2.0))
(*
(pow (hypot x.im x.re) y.re)
(sin (pow (cbrt (fma y.im t_1 t_2)) 3.0))))))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))));
double t_1 = log(hypot(x_46_re, x_46_im));
double t_2 = y_46_re * atan2(x_46_im, x_46_re);
double t_3 = exp(((y_46_re * t_0) - (atan2(x_46_im, x_46_re) * y_46_im)));
double tmp;
if (y_46_re <= -3.7e-9) {
tmp = t_2 * t_3;
} else if (y_46_re <= 4200.0) {
tmp = exp((atan2(x_46_im, x_46_re) * -y_46_im)) * sin(fma(y_46_re, atan2(x_46_im, x_46_re), (t_1 * y_46_im)));
} else if (y_46_re <= 3.6e+129) {
tmp = t_3 * (y_46_im * t_0);
} else if (y_46_re <= 1.15e+187) {
tmp = t_3 * sin(t_2);
} else if (y_46_re <= 3.05e+205) {
tmp = sqrt(pow(t_2, 2.0));
} else {
tmp = pow(hypot(x_46_im, x_46_re), y_46_re) * sin(pow(cbrt(fma(y_46_im, t_1, t_2)), 3.0));
}
return tmp;
}
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = log(sqrt(Float64(Float64(x_46_re * x_46_re) + Float64(x_46_im * x_46_im)))) t_1 = log(hypot(x_46_re, x_46_im)) t_2 = Float64(y_46_re * atan(x_46_im, x_46_re)) t_3 = exp(Float64(Float64(y_46_re * t_0) - Float64(atan(x_46_im, x_46_re) * y_46_im))) tmp = 0.0 if (y_46_re <= -3.7e-9) tmp = Float64(t_2 * t_3); elseif (y_46_re <= 4200.0) tmp = Float64(exp(Float64(atan(x_46_im, x_46_re) * Float64(-y_46_im))) * sin(fma(y_46_re, atan(x_46_im, x_46_re), Float64(t_1 * y_46_im)))); elseif (y_46_re <= 3.6e+129) tmp = Float64(t_3 * Float64(y_46_im * t_0)); elseif (y_46_re <= 1.15e+187) tmp = Float64(t_3 * sin(t_2)); elseif (y_46_re <= 3.05e+205) tmp = sqrt((t_2 ^ 2.0)); else tmp = Float64((hypot(x_46_im, x_46_re) ^ y_46_re) * sin((cbrt(fma(y_46_im, t_1, t_2)) ^ 3.0))); end return tmp end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[Log[N[Sqrt[N[(N[(x$46$re * x$46$re), $MachinePrecision] + N[(x$46$im * x$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]}, Block[{t$95$1 = N[Log[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 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[N[(N[(y$46$re * t$95$0), $MachinePrecision] - N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[y$46$re, -3.7e-9], N[(t$95$2 * t$95$3), $MachinePrecision], If[LessEqual[y$46$re, 4200.0], N[(N[Exp[N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * (-y$46$im)), $MachinePrecision]], $MachinePrecision] * N[Sin[N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision] + N[(t$95$1 * y$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$re, 3.6e+129], N[(t$95$3 * N[(y$46$im * t$95$0), $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$re, 1.15e+187], N[(t$95$3 * N[Sin[t$95$2], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$re, 3.05e+205], N[Sqrt[N[Power[t$95$2, 2.0], $MachinePrecision]], $MachinePrecision], N[(N[Power[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision], y$46$re], $MachinePrecision] * N[Sin[N[Power[N[Power[N[(y$46$im * t$95$1 + t$95$2), $MachinePrecision], 1/3], $MachinePrecision], 3.0], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right)\\
t_1 := \log \left(\mathsf{hypot}\left(x.re, x.im\right)\right)\\
t_2 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
t_3 := e^{y.re \cdot t_0 - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}\\
\mathbf{if}\;y.re \leq -3.7 \cdot 10^{-9}:\\
\;\;\;\;t_2 \cdot t_3\\
\mathbf{elif}\;y.re \leq 4200:\\
\;\;\;\;e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot \left(-y.im\right)} \cdot \sin \left(\mathsf{fma}\left(y.re, \tan^{-1}_* \frac{x.im}{x.re}, t_1 \cdot y.im\right)\right)\\
\mathbf{elif}\;y.re \leq 3.6 \cdot 10^{+129}:\\
\;\;\;\;t_3 \cdot \left(y.im \cdot t_0\right)\\
\mathbf{elif}\;y.re \leq 1.15 \cdot 10^{+187}:\\
\;\;\;\;t_3 \cdot \sin t_2\\
\mathbf{elif}\;y.re \leq 3.05 \cdot 10^{+205}:\\
\;\;\;\;\sqrt{{t_2}^{2}}\\
\mathbf{else}:\\
\;\;\;\;{\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re} \cdot \sin \left({\left(\sqrt[3]{\mathsf{fma}\left(y.im, t_1, t_2\right)}\right)}^{3}\right)\\
\end{array}
\end{array}
if y.re < -3.7e-9Initial program 43.5%
Taylor expanded in y.im around 0 77.5%
Taylor expanded in y.re around 0 79.1%
if -3.7e-9 < y.re < 4200Initial program 41.3%
exp-diff41.3%
+-rgt-identity41.3%
+-rgt-identity41.3%
exp-to-pow41.3%
hypot-def41.3%
*-commutative41.3%
exp-prod40.9%
+-commutative40.9%
*-commutative40.9%
Simplified85.2%
Taylor expanded in y.re around 0 85.9%
rec-exp85.9%
distribute-rgt-neg-in85.9%
Simplified85.9%
if 4200 < y.re < 3.6000000000000001e129Initial program 36.0%
Taylor expanded in y.re around 0 60.0%
+-commutative60.0%
unpow260.0%
unpow260.0%
Simplified60.0%
Taylor expanded in y.im around 0 92.0%
unpow292.0%
unpow292.0%
Simplified92.0%
if 3.6000000000000001e129 < y.re < 1.15000000000000002e187Initial program 45.5%
Taylor expanded in y.im around 0 90.9%
if 1.15000000000000002e187 < y.re < 3.0499999999999998e205Initial program 0.0%
Taylor expanded in y.im around 0 0.0%
Taylor expanded in y.re around 0 0.5%
*-commutative0.5%
distribute-rgt-neg-in0.5%
Simplified0.5%
Taylor expanded in y.im around 0 0.5%
add-sqr-sqrt0.4%
sqrt-unprod75.4%
pow275.4%
*-commutative75.4%
Applied egg-rr75.4%
if 3.0499999999999998e205 < y.re Initial program 40.9%
exp-diff36.4%
+-rgt-identity36.4%
+-rgt-identity36.4%
exp-to-pow36.4%
hypot-def36.4%
*-commutative36.4%
exp-prod36.4%
+-commutative36.4%
*-commutative36.4%
Simplified59.1%
Taylor expanded in y.im around 0 63.6%
unpow263.6%
unpow263.6%
hypot-def63.6%
Simplified63.6%
fma-udef63.6%
*-commutative63.6%
hypot-udef40.9%
+-commutative40.9%
add-cube-cbrt45.5%
pow345.5%
*-commutative45.5%
hypot-udef86.4%
fma-def86.4%
Applied egg-rr86.4%
Final simplification85.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.re x.im))))
(if (<= y.re 1.65)
(*
(exp (- (* y.re t_1) t_0))
(sin (fma t_1 y.im (* y.re (atan2 x.im x.re)))))
(*
(exp (- (* y.re (log (sqrt (+ (* x.re x.re) (* x.im x.im))))) t_0))
(sin (pow (cbrt (* t_1 y.im)) 3.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 = log(hypot(x_46_re, x_46_im));
double tmp;
if (y_46_re <= 1.65) {
tmp = exp(((y_46_re * t_1) - t_0)) * sin(fma(t_1, y_46_im, (y_46_re * atan2(x_46_im, x_46_re))));
} else {
tmp = exp(((y_46_re * log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))) - t_0)) * sin(pow(cbrt((t_1 * y_46_im)), 3.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 = log(hypot(x_46_re, x_46_im)) tmp = 0.0 if (y_46_re <= 1.65) tmp = Float64(exp(Float64(Float64(y_46_re * t_1) - t_0)) * sin(fma(t_1, y_46_im, Float64(y_46_re * atan(x_46_im, x_46_re))))); else 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((cbrt(Float64(t_1 * y_46_im)) ^ 3.0))); end return tmp end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$im), $MachinePrecision]}, Block[{t$95$1 = N[Log[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision]], $MachinePrecision]}, If[LessEqual[y$46$re, 1.65], N[(N[Exp[N[(N[(y$46$re * t$95$1), $MachinePrecision] - t$95$0), $MachinePrecision]], $MachinePrecision] * N[Sin[N[(t$95$1 * y$46$im + N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], 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[Power[N[Power[N[(t$95$1 * y$46$im), $MachinePrecision], 1/3], $MachinePrecision], 3.0], $MachinePrecision]], $MachinePrecision]), $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.re, x.im\right)\right)\\
\mathbf{if}\;y.re \leq 1.65:\\
\;\;\;\;e^{y.re \cdot t_1 - t_0} \cdot \sin \left(\mathsf{fma}\left(t_1, y.im, y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)\\
\mathbf{else}:\\
\;\;\;\;e^{y.re \cdot \log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) - t_0} \cdot \sin \left({\left(\sqrt[3]{t_1 \cdot y.im}\right)}^{3}\right)\\
\end{array}
\end{array}
if y.re < 1.6499999999999999Initial program 42.2%
Simplified86.2%
if 1.6499999999999999 < y.re Initial program 36.9%
Taylor expanded in y.re around 0 44.6%
+-commutative44.6%
unpow244.6%
unpow244.6%
Simplified44.6%
*-commutative44.6%
add-cube-cbrt46.2%
pow347.7%
*-commutative47.7%
hypot-udef80.0%
Applied egg-rr80.0%
Final simplification84.6%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (log (sqrt (+ (* x.re x.re) (* x.im x.im)))))
(t_1 (* y.re (atan2 x.im x.re)))
(t_2 (exp (- (* y.re t_0) (* (atan2 x.im x.re) y.im)))))
(if (<= y.re -1.38e-8)
(* t_1 t_2)
(if (<= y.re 1700.0)
(*
(exp (* (atan2 x.im x.re) (- y.im)))
(sin (fma y.re (atan2 x.im x.re) (* (log (hypot x.re x.im)) y.im))))
(if (<= y.re 6.2e+121)
(* t_2 (* y.im t_0))
(if (<= y.re 2e+181) (* t_2 (sin t_1)) (* t_2 (sin (fabs t_1)))))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))));
double t_1 = y_46_re * atan2(x_46_im, x_46_re);
double t_2 = exp(((y_46_re * t_0) - (atan2(x_46_im, x_46_re) * y_46_im)));
double tmp;
if (y_46_re <= -1.38e-8) {
tmp = t_1 * t_2;
} else if (y_46_re <= 1700.0) {
tmp = exp((atan2(x_46_im, x_46_re) * -y_46_im)) * sin(fma(y_46_re, atan2(x_46_im, x_46_re), (log(hypot(x_46_re, x_46_im)) * y_46_im)));
} else if (y_46_re <= 6.2e+121) {
tmp = t_2 * (y_46_im * t_0);
} else if (y_46_re <= 2e+181) {
tmp = t_2 * sin(t_1);
} else {
tmp = t_2 * sin(fabs(t_1));
}
return tmp;
}
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = log(sqrt(Float64(Float64(x_46_re * x_46_re) + Float64(x_46_im * x_46_im)))) t_1 = Float64(y_46_re * atan(x_46_im, x_46_re)) t_2 = exp(Float64(Float64(y_46_re * t_0) - Float64(atan(x_46_im, x_46_re) * y_46_im))) tmp = 0.0 if (y_46_re <= -1.38e-8) tmp = Float64(t_1 * t_2); elseif (y_46_re <= 1700.0) tmp = Float64(exp(Float64(atan(x_46_im, x_46_re) * Float64(-y_46_im))) * sin(fma(y_46_re, atan(x_46_im, x_46_re), Float64(log(hypot(x_46_re, x_46_im)) * y_46_im)))); elseif (y_46_re <= 6.2e+121) tmp = Float64(t_2 * Float64(y_46_im * t_0)); elseif (y_46_re <= 2e+181) tmp = Float64(t_2 * sin(t_1)); else tmp = Float64(t_2 * sin(abs(t_1))); end return tmp end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[Log[N[Sqrt[N[(N[(x$46$re * x$46$re), $MachinePrecision] + N[(x$46$im * x$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]}, Block[{t$95$1 = N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[Exp[N[(N[(y$46$re * t$95$0), $MachinePrecision] - N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[y$46$re, -1.38e-8], N[(t$95$1 * t$95$2), $MachinePrecision], If[LessEqual[y$46$re, 1700.0], N[(N[Exp[N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * (-y$46$im)), $MachinePrecision]], $MachinePrecision] * N[Sin[N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision] + N[(N[Log[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision]], $MachinePrecision] * y$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$re, 6.2e+121], N[(t$95$2 * N[(y$46$im * t$95$0), $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$re, 2e+181], N[(t$95$2 * N[Sin[t$95$1], $MachinePrecision]), $MachinePrecision], N[(t$95$2 * N[Sin[N[Abs[t$95$1], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right)\\
t_1 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
t_2 := e^{y.re \cdot t_0 - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}\\
\mathbf{if}\;y.re \leq -1.38 \cdot 10^{-8}:\\
\;\;\;\;t_1 \cdot t_2\\
\mathbf{elif}\;y.re \leq 1700:\\
\;\;\;\;e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot \left(-y.im\right)} \cdot \sin \left(\mathsf{fma}\left(y.re, \tan^{-1}_* \frac{x.im}{x.re}, \log \left(\mathsf{hypot}\left(x.re, x.im\right)\right) \cdot y.im\right)\right)\\
\mathbf{elif}\;y.re \leq 6.2 \cdot 10^{+121}:\\
\;\;\;\;t_2 \cdot \left(y.im \cdot t_0\right)\\
\mathbf{elif}\;y.re \leq 2 \cdot 10^{+181}:\\
\;\;\;\;t_2 \cdot \sin t_1\\
\mathbf{else}:\\
\;\;\;\;t_2 \cdot \sin \left(\left|t_1\right|\right)\\
\end{array}
\end{array}
if y.re < -1.37999999999999995e-8Initial program 43.5%
Taylor expanded in y.im around 0 77.5%
Taylor expanded in y.re around 0 79.1%
if -1.37999999999999995e-8 < y.re < 1700Initial program 41.3%
exp-diff41.3%
+-rgt-identity41.3%
+-rgt-identity41.3%
exp-to-pow41.3%
hypot-def41.3%
*-commutative41.3%
exp-prod40.9%
+-commutative40.9%
*-commutative40.9%
Simplified85.2%
Taylor expanded in y.re around 0 85.9%
rec-exp85.9%
distribute-rgt-neg-in85.9%
Simplified85.9%
if 1700 < y.re < 6.20000000000000016e121Initial program 36.0%
Taylor expanded in y.re around 0 60.0%
+-commutative60.0%
unpow260.0%
unpow260.0%
Simplified60.0%
Taylor expanded in y.im around 0 92.0%
unpow292.0%
unpow292.0%
Simplified92.0%
if 6.20000000000000016e121 < y.re < 1.9999999999999998e181Initial program 45.5%
Taylor expanded in y.im around 0 90.9%
if 1.9999999999999998e181 < y.re Initial program 34.6%
Taylor expanded in y.im around 0 46.2%
add-sqr-sqrt19.2%
fabs-sqr19.2%
add-sqr-sqrt69.2%
*-commutative69.2%
Applied egg-rr69.2%
Final simplification83.4%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (pow (hypot x.im x.re) y.re))
(t_1 (* y.re (atan2 x.im x.re)))
(t_2 (* t_1 (- (exp (* (atan2 x.im x.re) (- y.im))))))
(t_3 (log (sqrt (+ (* x.re x.re) (* x.im x.im)))))
(t_4 (exp (- (* y.re t_3) (* (atan2 x.im x.re) y.im)))))
(if (<= y.im -2e+176)
t_2
(if (<= y.im -7e+85)
(* t_4 (* y.im t_3))
(if (<= y.im -1.5e+33)
t_2
(if (<= y.im 8.8e-148)
(*
t_0
(sin
(fma y.re (atan2 x.im x.re) (* (log (hypot x.re x.im)) y.im))))
(if (<= y.im 8.8e+17)
(* t_0 (sin (* y.im (log (hypot x.im x.re)))))
(if (<= y.im 5.5e+84) t_2 (* t_1 t_4)))))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = pow(hypot(x_46_im, x_46_re), y_46_re);
double t_1 = y_46_re * atan2(x_46_im, x_46_re);
double t_2 = t_1 * -exp((atan2(x_46_im, x_46_re) * -y_46_im));
double t_3 = log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))));
double t_4 = exp(((y_46_re * t_3) - (atan2(x_46_im, x_46_re) * y_46_im)));
double tmp;
if (y_46_im <= -2e+176) {
tmp = t_2;
} else if (y_46_im <= -7e+85) {
tmp = t_4 * (y_46_im * t_3);
} else if (y_46_im <= -1.5e+33) {
tmp = t_2;
} else if (y_46_im <= 8.8e-148) {
tmp = t_0 * sin(fma(y_46_re, atan2(x_46_im, x_46_re), (log(hypot(x_46_re, x_46_im)) * y_46_im)));
} else if (y_46_im <= 8.8e+17) {
tmp = t_0 * sin((y_46_im * log(hypot(x_46_im, x_46_re))));
} else if (y_46_im <= 5.5e+84) {
tmp = t_2;
} else {
tmp = t_1 * t_4;
}
return tmp;
}
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = hypot(x_46_im, x_46_re) ^ y_46_re t_1 = Float64(y_46_re * atan(x_46_im, x_46_re)) t_2 = Float64(t_1 * Float64(-exp(Float64(atan(x_46_im, x_46_re) * Float64(-y_46_im))))) t_3 = log(sqrt(Float64(Float64(x_46_re * x_46_re) + Float64(x_46_im * x_46_im)))) t_4 = exp(Float64(Float64(y_46_re * t_3) - Float64(atan(x_46_im, x_46_re) * y_46_im))) tmp = 0.0 if (y_46_im <= -2e+176) tmp = t_2; elseif (y_46_im <= -7e+85) tmp = Float64(t_4 * Float64(y_46_im * t_3)); elseif (y_46_im <= -1.5e+33) tmp = t_2; elseif (y_46_im <= 8.8e-148) tmp = Float64(t_0 * sin(fma(y_46_re, atan(x_46_im, x_46_re), Float64(log(hypot(x_46_re, x_46_im)) * y_46_im)))); elseif (y_46_im <= 8.8e+17) tmp = Float64(t_0 * sin(Float64(y_46_im * log(hypot(x_46_im, x_46_re))))); elseif (y_46_im <= 5.5e+84) tmp = t_2; else tmp = Float64(t_1 * t_4); end return tmp end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[Power[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision], y$46$re], $MachinePrecision]}, Block[{t$95$1 = N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(t$95$1 * (-N[Exp[N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * (-y$46$im)), $MachinePrecision]], $MachinePrecision])), $MachinePrecision]}, Block[{t$95$3 = 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$4 = N[Exp[N[(N[(y$46$re * t$95$3), $MachinePrecision] - N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[y$46$im, -2e+176], t$95$2, If[LessEqual[y$46$im, -7e+85], N[(t$95$4 * N[(y$46$im * t$95$3), $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$im, -1.5e+33], t$95$2, If[LessEqual[y$46$im, 8.8e-148], N[(t$95$0 * N[Sin[N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision] + N[(N[Log[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision]], $MachinePrecision] * y$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$im, 8.8e+17], N[(t$95$0 * N[Sin[N[(y$46$im * N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$im, 5.5e+84], t$95$2, N[(t$95$1 * t$95$4), $MachinePrecision]]]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := {\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re}\\
t_1 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
t_2 := t_1 \cdot \left(-e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot \left(-y.im\right)}\right)\\
t_3 := \log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right)\\
t_4 := e^{y.re \cdot t_3 - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}\\
\mathbf{if}\;y.im \leq -2 \cdot 10^{+176}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;y.im \leq -7 \cdot 10^{+85}:\\
\;\;\;\;t_4 \cdot \left(y.im \cdot t_3\right)\\
\mathbf{elif}\;y.im \leq -1.5 \cdot 10^{+33}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;y.im \leq 8.8 \cdot 10^{-148}:\\
\;\;\;\;t_0 \cdot \sin \left(\mathsf{fma}\left(y.re, \tan^{-1}_* \frac{x.im}{x.re}, \log \left(\mathsf{hypot}\left(x.re, x.im\right)\right) \cdot y.im\right)\right)\\
\mathbf{elif}\;y.im \leq 8.8 \cdot 10^{+17}:\\
\;\;\;\;t_0 \cdot \sin \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right)\\
\mathbf{elif}\;y.im \leq 5.5 \cdot 10^{+84}:\\
\;\;\;\;t_2\\
\mathbf{else}:\\
\;\;\;\;t_1 \cdot t_4\\
\end{array}
\end{array}
if y.im < -2e176 or -7.0000000000000001e85 < y.im < -1.49999999999999992e33 or 8.8e17 < y.im < 5.5000000000000004e84Initial program 24.7%
Taylor expanded in y.im around 0 43.2%
Taylor expanded in y.re around 0 45.1%
*-commutative45.1%
distribute-rgt-neg-in45.1%
Simplified45.1%
add-sqr-sqrt2.3%
sqrt-unprod24.1%
pow224.1%
*-commutative24.1%
Applied egg-rr50.5%
Taylor expanded in y.re around -inf 65.5%
mul-1-neg65.5%
distribute-rgt-neg-in65.5%
Simplified65.5%
if -2e176 < y.im < -7.0000000000000001e85Initial program 57.9%
Taylor expanded in y.re around 0 63.2%
+-commutative63.2%
unpow263.2%
unpow263.2%
Simplified63.2%
Taylor expanded in y.im around 0 89.5%
unpow289.5%
unpow289.5%
Simplified89.5%
if -1.49999999999999992e33 < y.im < 8.80000000000000068e-148Initial program 44.8%
exp-diff44.8%
+-rgt-identity44.8%
+-rgt-identity44.8%
exp-to-pow44.8%
hypot-def44.8%
*-commutative44.8%
exp-prod44.3%
+-commutative44.3%
*-commutative44.3%
Simplified90.9%
Taylor expanded in y.im around 0 64.8%
unpow264.8%
unpow264.8%
hypot-def91.4%
Simplified91.4%
if 8.80000000000000068e-148 < y.im < 8.8e17Initial program 38.1%
exp-diff38.1%
+-rgt-identity38.1%
+-rgt-identity38.1%
exp-to-pow38.1%
hypot-def38.1%
*-commutative38.1%
exp-prod38.1%
+-commutative38.1%
*-commutative38.1%
Simplified76.6%
Taylor expanded in y.im around 0 55.6%
unpow255.6%
unpow255.6%
hypot-def75.7%
Simplified75.7%
fma-udef75.7%
*-commutative75.7%
hypot-udef35.8%
+-commutative35.8%
add-sqr-sqrt19.1%
sqrt-unprod21.7%
pow221.7%
*-commutative21.7%
hypot-udef61.6%
fma-def59.3%
Applied egg-rr59.3%
Taylor expanded in y.im around inf 38.2%
+-commutative38.2%
unpow238.2%
unpow238.2%
hypot-def86.4%
hypot-def38.2%
unpow238.2%
unpow238.2%
+-commutative38.2%
unpow238.2%
unpow238.2%
hypot-def86.4%
Simplified86.4%
if 5.5000000000000004e84 < y.im Initial program 47.5%
Taylor expanded in y.im around 0 60.2%
Taylor expanded in y.re around 0 67.7%
Final simplification81.3%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (pow (hypot x.im x.re) y.re))
(t_1 (* y.re (atan2 x.im x.re)))
(t_2 (* t_1 (- (exp (* (atan2 x.im x.re) (- y.im))))))
(t_3 (log (sqrt (+ (* x.re x.re) (* x.im x.im)))))
(t_4 (exp (- (* y.re t_3) (* (atan2 x.im x.re) y.im)))))
(if (<= y.im -2e+176)
t_2
(if (<= y.im -9.4e+85)
(* t_4 (* y.im t_3))
(if (<= y.im -4.5e+33)
t_2
(if (<= y.im 9.5e-148)
(* (sin (fma (log (hypot x.re x.im)) y.im t_1)) t_0)
(if (<= y.im 7.2e+16)
(* t_0 (sin (* y.im (log (hypot x.im x.re)))))
(if (<= y.im 7.5e+84) t_2 (* t_1 t_4)))))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = pow(hypot(x_46_im, x_46_re), y_46_re);
double t_1 = y_46_re * atan2(x_46_im, x_46_re);
double t_2 = t_1 * -exp((atan2(x_46_im, x_46_re) * -y_46_im));
double t_3 = log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))));
double t_4 = exp(((y_46_re * t_3) - (atan2(x_46_im, x_46_re) * y_46_im)));
double tmp;
if (y_46_im <= -2e+176) {
tmp = t_2;
} else if (y_46_im <= -9.4e+85) {
tmp = t_4 * (y_46_im * t_3);
} else if (y_46_im <= -4.5e+33) {
tmp = t_2;
} else if (y_46_im <= 9.5e-148) {
tmp = sin(fma(log(hypot(x_46_re, x_46_im)), y_46_im, t_1)) * t_0;
} else if (y_46_im <= 7.2e+16) {
tmp = t_0 * sin((y_46_im * log(hypot(x_46_im, x_46_re))));
} else if (y_46_im <= 7.5e+84) {
tmp = t_2;
} else {
tmp = t_1 * t_4;
}
return tmp;
}
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = hypot(x_46_im, x_46_re) ^ y_46_re t_1 = Float64(y_46_re * atan(x_46_im, x_46_re)) t_2 = Float64(t_1 * Float64(-exp(Float64(atan(x_46_im, x_46_re) * Float64(-y_46_im))))) t_3 = log(sqrt(Float64(Float64(x_46_re * x_46_re) + Float64(x_46_im * x_46_im)))) t_4 = exp(Float64(Float64(y_46_re * t_3) - Float64(atan(x_46_im, x_46_re) * y_46_im))) tmp = 0.0 if (y_46_im <= -2e+176) tmp = t_2; elseif (y_46_im <= -9.4e+85) tmp = Float64(t_4 * Float64(y_46_im * t_3)); elseif (y_46_im <= -4.5e+33) tmp = t_2; elseif (y_46_im <= 9.5e-148) tmp = Float64(sin(fma(log(hypot(x_46_re, x_46_im)), y_46_im, t_1)) * t_0); elseif (y_46_im <= 7.2e+16) tmp = Float64(t_0 * sin(Float64(y_46_im * log(hypot(x_46_im, x_46_re))))); elseif (y_46_im <= 7.5e+84) tmp = t_2; else tmp = Float64(t_1 * t_4); end return tmp end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[Power[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision], y$46$re], $MachinePrecision]}, Block[{t$95$1 = N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(t$95$1 * (-N[Exp[N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * (-y$46$im)), $MachinePrecision]], $MachinePrecision])), $MachinePrecision]}, Block[{t$95$3 = 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$4 = N[Exp[N[(N[(y$46$re * t$95$3), $MachinePrecision] - N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[y$46$im, -2e+176], t$95$2, If[LessEqual[y$46$im, -9.4e+85], N[(t$95$4 * N[(y$46$im * t$95$3), $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$im, -4.5e+33], t$95$2, If[LessEqual[y$46$im, 9.5e-148], N[(N[Sin[N[(N[Log[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision]], $MachinePrecision] * y$46$im + t$95$1), $MachinePrecision]], $MachinePrecision] * t$95$0), $MachinePrecision], If[LessEqual[y$46$im, 7.2e+16], N[(t$95$0 * N[Sin[N[(y$46$im * N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$im, 7.5e+84], t$95$2, N[(t$95$1 * t$95$4), $MachinePrecision]]]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := {\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re}\\
t_1 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
t_2 := t_1 \cdot \left(-e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot \left(-y.im\right)}\right)\\
t_3 := \log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right)\\
t_4 := e^{y.re \cdot t_3 - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}\\
\mathbf{if}\;y.im \leq -2 \cdot 10^{+176}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;y.im \leq -9.4 \cdot 10^{+85}:\\
\;\;\;\;t_4 \cdot \left(y.im \cdot t_3\right)\\
\mathbf{elif}\;y.im \leq -4.5 \cdot 10^{+33}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;y.im \leq 9.5 \cdot 10^{-148}:\\
\;\;\;\;\sin \left(\mathsf{fma}\left(\log \left(\mathsf{hypot}\left(x.re, x.im\right)\right), y.im, t_1\right)\right) \cdot t_0\\
\mathbf{elif}\;y.im \leq 7.2 \cdot 10^{+16}:\\
\;\;\;\;t_0 \cdot \sin \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right)\\
\mathbf{elif}\;y.im \leq 7.5 \cdot 10^{+84}:\\
\;\;\;\;t_2\\
\mathbf{else}:\\
\;\;\;\;t_1 \cdot t_4\\
\end{array}
\end{array}
if y.im < -2e176 or -9.4000000000000004e85 < y.im < -4.5e33 or 7.2e16 < y.im < 7.5000000000000001e84Initial program 24.7%
Taylor expanded in y.im around 0 43.2%
Taylor expanded in y.re around 0 45.1%
*-commutative45.1%
distribute-rgt-neg-in45.1%
Simplified45.1%
add-sqr-sqrt2.3%
sqrt-unprod24.1%
pow224.1%
*-commutative24.1%
Applied egg-rr50.5%
Taylor expanded in y.re around -inf 65.5%
mul-1-neg65.5%
distribute-rgt-neg-in65.5%
Simplified65.5%
if -2e176 < y.im < -9.4000000000000004e85Initial program 57.9%
Taylor expanded in y.re around 0 63.2%
+-commutative63.2%
unpow263.2%
unpow263.2%
Simplified63.2%
Taylor expanded in y.im around 0 89.5%
unpow289.5%
unpow289.5%
Simplified89.5%
if -4.5e33 < y.im < 9.50000000000000069e-148Initial program 44.8%
exp-diff44.8%
+-rgt-identity44.8%
+-rgt-identity44.8%
exp-to-pow44.8%
hypot-def44.8%
*-commutative44.8%
exp-prod44.3%
+-commutative44.3%
*-commutative44.3%
Simplified90.9%
Taylor expanded in y.im around 0 64.8%
unpow264.8%
unpow264.8%
hypot-def91.4%
Simplified91.4%
fma-udef91.4%
*-commutative91.4%
hypot-udef44.8%
+-commutative44.8%
add-sqr-sqrt25.9%
sqrt-unprod20.0%
pow220.0%
*-commutative20.0%
hypot-udef36.0%
fma-def36.0%
Applied egg-rr36.0%
sqrt-pow191.4%
metadata-eval91.4%
pow191.4%
fma-udef91.4%
*-commutative91.4%
fma-def91.4%
Applied egg-rr91.4%
if 9.50000000000000069e-148 < y.im < 7.2e16Initial program 38.1%
exp-diff38.1%
+-rgt-identity38.1%
+-rgt-identity38.1%
exp-to-pow38.1%
hypot-def38.1%
*-commutative38.1%
exp-prod38.1%
+-commutative38.1%
*-commutative38.1%
Simplified76.6%
Taylor expanded in y.im around 0 55.6%
unpow255.6%
unpow255.6%
hypot-def75.7%
Simplified75.7%
fma-udef75.7%
*-commutative75.7%
hypot-udef35.8%
+-commutative35.8%
add-sqr-sqrt19.1%
sqrt-unprod21.7%
pow221.7%
*-commutative21.7%
hypot-udef61.6%
fma-def59.3%
Applied egg-rr59.3%
Taylor expanded in y.im around inf 38.2%
+-commutative38.2%
unpow238.2%
unpow238.2%
hypot-def86.4%
hypot-def38.2%
unpow238.2%
unpow238.2%
+-commutative38.2%
unpow238.2%
unpow238.2%
hypot-def86.4%
Simplified86.4%
if 7.5000000000000001e84 < y.im Initial program 47.5%
Taylor expanded in y.im around 0 60.2%
Taylor expanded in y.re around 0 67.7%
Final simplification81.3%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (log (sqrt (+ (* x.re x.re) (* x.im x.im)))))
(t_1 (* y.re (atan2 x.im x.re)))
(t_2 (exp (- (* y.re t_0) (* (atan2 x.im x.re) y.im)))))
(if (<= y.re -2.15e-10)
(* t_1 t_2)
(if (<= y.re 1750.0)
(*
(exp (* (atan2 x.im x.re) (- y.im)))
(sin (fma y.re (atan2 x.im x.re) (* (log (hypot x.re x.im)) y.im))))
(if (<= y.re 3.2e+121)
(* t_2 (* y.im t_0))
(if (<= y.re 2.1e+179)
(* t_2 (sin t_1))
(*
(pow (hypot x.im x.re) y.re)
(sin (* y.im (log (hypot x.im x.re)))))))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))));
double t_1 = y_46_re * atan2(x_46_im, x_46_re);
double t_2 = exp(((y_46_re * t_0) - (atan2(x_46_im, x_46_re) * y_46_im)));
double tmp;
if (y_46_re <= -2.15e-10) {
tmp = t_1 * t_2;
} else if (y_46_re <= 1750.0) {
tmp = exp((atan2(x_46_im, x_46_re) * -y_46_im)) * sin(fma(y_46_re, atan2(x_46_im, x_46_re), (log(hypot(x_46_re, x_46_im)) * y_46_im)));
} else if (y_46_re <= 3.2e+121) {
tmp = t_2 * (y_46_im * t_0);
} else if (y_46_re <= 2.1e+179) {
tmp = t_2 * sin(t_1);
} else {
tmp = pow(hypot(x_46_im, x_46_re), y_46_re) * sin((y_46_im * log(hypot(x_46_im, x_46_re))));
}
return tmp;
}
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = log(sqrt(Float64(Float64(x_46_re * x_46_re) + Float64(x_46_im * x_46_im)))) t_1 = Float64(y_46_re * atan(x_46_im, x_46_re)) t_2 = exp(Float64(Float64(y_46_re * t_0) - Float64(atan(x_46_im, x_46_re) * y_46_im))) tmp = 0.0 if (y_46_re <= -2.15e-10) tmp = Float64(t_1 * t_2); elseif (y_46_re <= 1750.0) tmp = Float64(exp(Float64(atan(x_46_im, x_46_re) * Float64(-y_46_im))) * sin(fma(y_46_re, atan(x_46_im, x_46_re), Float64(log(hypot(x_46_re, x_46_im)) * y_46_im)))); elseif (y_46_re <= 3.2e+121) tmp = Float64(t_2 * Float64(y_46_im * t_0)); elseif (y_46_re <= 2.1e+179) tmp = Float64(t_2 * sin(t_1)); else tmp = Float64((hypot(x_46_im, x_46_re) ^ y_46_re) * sin(Float64(y_46_im * log(hypot(x_46_im, x_46_re))))); end return tmp end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[Log[N[Sqrt[N[(N[(x$46$re * x$46$re), $MachinePrecision] + N[(x$46$im * x$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]}, Block[{t$95$1 = N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[Exp[N[(N[(y$46$re * t$95$0), $MachinePrecision] - N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[y$46$re, -2.15e-10], N[(t$95$1 * t$95$2), $MachinePrecision], If[LessEqual[y$46$re, 1750.0], N[(N[Exp[N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * (-y$46$im)), $MachinePrecision]], $MachinePrecision] * N[Sin[N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision] + N[(N[Log[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision]], $MachinePrecision] * y$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$re, 3.2e+121], N[(t$95$2 * N[(y$46$im * t$95$0), $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$re, 2.1e+179], N[(t$95$2 * N[Sin[t$95$1], $MachinePrecision]), $MachinePrecision], N[(N[Power[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision], y$46$re], $MachinePrecision] * N[Sin[N[(y$46$im * N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right)\\
t_1 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
t_2 := e^{y.re \cdot t_0 - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}\\
\mathbf{if}\;y.re \leq -2.15 \cdot 10^{-10}:\\
\;\;\;\;t_1 \cdot t_2\\
\mathbf{elif}\;y.re \leq 1750:\\
\;\;\;\;e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot \left(-y.im\right)} \cdot \sin \left(\mathsf{fma}\left(y.re, \tan^{-1}_* \frac{x.im}{x.re}, \log \left(\mathsf{hypot}\left(x.re, x.im\right)\right) \cdot y.im\right)\right)\\
\mathbf{elif}\;y.re \leq 3.2 \cdot 10^{+121}:\\
\;\;\;\;t_2 \cdot \left(y.im \cdot t_0\right)\\
\mathbf{elif}\;y.re \leq 2.1 \cdot 10^{+179}:\\
\;\;\;\;t_2 \cdot \sin t_1\\
\mathbf{else}:\\
\;\;\;\;{\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re} \cdot \sin \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right)\\
\end{array}
\end{array}
if y.re < -2.15000000000000007e-10Initial program 43.5%
Taylor expanded in y.im around 0 77.5%
Taylor expanded in y.re around 0 79.1%
if -2.15000000000000007e-10 < y.re < 1750Initial program 41.3%
exp-diff41.3%
+-rgt-identity41.3%
+-rgt-identity41.3%
exp-to-pow41.3%
hypot-def41.3%
*-commutative41.3%
exp-prod40.9%
+-commutative40.9%
*-commutative40.9%
Simplified85.2%
Taylor expanded in y.re around 0 85.9%
rec-exp85.9%
distribute-rgt-neg-in85.9%
Simplified85.9%
if 1750 < y.re < 3.1999999999999999e121Initial program 36.0%
Taylor expanded in y.re around 0 60.0%
+-commutative60.0%
unpow260.0%
unpow260.0%
Simplified60.0%
Taylor expanded in y.im around 0 92.0%
unpow292.0%
unpow292.0%
Simplified92.0%
if 3.1999999999999999e121 < y.re < 2.0999999999999999e179Initial program 40.0%
Taylor expanded in y.im around 0 90.0%
if 2.0999999999999999e179 < y.re Initial program 37.0%
exp-diff33.3%
+-rgt-identity33.3%
+-rgt-identity33.3%
exp-to-pow33.3%
hypot-def33.3%
*-commutative33.3%
exp-prod33.3%
+-commutative33.3%
*-commutative33.3%
Simplified51.9%
Taylor expanded in y.im around 0 55.6%
unpow255.6%
unpow255.6%
hypot-def55.6%
Simplified55.6%
fma-udef55.6%
*-commutative55.6%
hypot-udef37.0%
+-commutative37.0%
add-sqr-sqrt22.2%
sqrt-unprod3.7%
pow23.7%
*-commutative3.7%
hypot-udef14.8%
fma-def14.8%
Applied egg-rr14.8%
Taylor expanded in y.im around inf 33.3%
+-commutative33.3%
unpow233.3%
unpow233.3%
hypot-def63.0%
hypot-def33.3%
unpow233.3%
unpow233.3%
+-commutative33.3%
unpow233.3%
unpow233.3%
hypot-def63.0%
Simplified63.0%
Final simplification82.6%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (* y.re (atan2 x.im x.re)))
(t_1 (* t_0 (- (exp (* (atan2 x.im x.re) (- y.im))))))
(t_2 (log (sqrt (+ (* x.re x.re) (* x.im x.im)))))
(t_3 (exp (- (* y.re t_2) (* (atan2 x.im x.re) y.im)))))
(if (<= y.im -2.15e+176)
t_1
(if (<= y.im -9.4e+85)
(* t_3 (* y.im t_2))
(if (<= y.im -5.3e+29)
t_1
(if (<= y.im 2e+17)
(*
(pow (hypot x.im x.re) y.re)
(sin (* y.im (log (hypot x.im x.re)))))
(if (<= y.im 3.7e+84) t_1 (* t_0 t_3))))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = y_46_re * atan2(x_46_im, x_46_re);
double t_1 = t_0 * -exp((atan2(x_46_im, x_46_re) * -y_46_im));
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) - (atan2(x_46_im, x_46_re) * y_46_im)));
double tmp;
if (y_46_im <= -2.15e+176) {
tmp = t_1;
} else if (y_46_im <= -9.4e+85) {
tmp = t_3 * (y_46_im * t_2);
} else if (y_46_im <= -5.3e+29) {
tmp = t_1;
} else if (y_46_im <= 2e+17) {
tmp = pow(hypot(x_46_im, x_46_re), y_46_re) * sin((y_46_im * log(hypot(x_46_im, x_46_re))));
} else if (y_46_im <= 3.7e+84) {
tmp = t_1;
} else {
tmp = t_0 * 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 = t_0 * -Math.exp((Math.atan2(x_46_im, x_46_re) * -y_46_im));
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) - (Math.atan2(x_46_im, x_46_re) * y_46_im)));
double tmp;
if (y_46_im <= -2.15e+176) {
tmp = t_1;
} else if (y_46_im <= -9.4e+85) {
tmp = t_3 * (y_46_im * t_2);
} else if (y_46_im <= -5.3e+29) {
tmp = t_1;
} else if (y_46_im <= 2e+17) {
tmp = Math.pow(Math.hypot(x_46_im, x_46_re), y_46_re) * Math.sin((y_46_im * Math.log(Math.hypot(x_46_im, x_46_re))));
} else if (y_46_im <= 3.7e+84) {
tmp = t_1;
} else {
tmp = t_0 * 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 = t_0 * -math.exp((math.atan2(x_46_im, x_46_re) * -y_46_im)) 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) - (math.atan2(x_46_im, x_46_re) * y_46_im))) tmp = 0 if y_46_im <= -2.15e+176: tmp = t_1 elif y_46_im <= -9.4e+85: tmp = t_3 * (y_46_im * t_2) elif y_46_im <= -5.3e+29: tmp = t_1 elif y_46_im <= 2e+17: tmp = math.pow(math.hypot(x_46_im, x_46_re), y_46_re) * math.sin((y_46_im * math.log(math.hypot(x_46_im, x_46_re)))) elif y_46_im <= 3.7e+84: tmp = t_1 else: tmp = t_0 * 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 = Float64(t_0 * Float64(-exp(Float64(atan(x_46_im, x_46_re) * Float64(-y_46_im))))) t_2 = log(sqrt(Float64(Float64(x_46_re * x_46_re) + Float64(x_46_im * x_46_im)))) t_3 = exp(Float64(Float64(y_46_re * t_2) - Float64(atan(x_46_im, x_46_re) * y_46_im))) tmp = 0.0 if (y_46_im <= -2.15e+176) tmp = t_1; elseif (y_46_im <= -9.4e+85) tmp = Float64(t_3 * Float64(y_46_im * t_2)); elseif (y_46_im <= -5.3e+29) tmp = t_1; elseif (y_46_im <= 2e+17) tmp = Float64((hypot(x_46_im, x_46_re) ^ y_46_re) * sin(Float64(y_46_im * log(hypot(x_46_im, x_46_re))))); elseif (y_46_im <= 3.7e+84) tmp = t_1; else tmp = Float64(t_0 * 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 = t_0 * -exp((atan2(x_46_im, x_46_re) * -y_46_im)); t_2 = log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im)))); t_3 = exp(((y_46_re * t_2) - (atan2(x_46_im, x_46_re) * y_46_im))); tmp = 0.0; if (y_46_im <= -2.15e+176) tmp = t_1; elseif (y_46_im <= -9.4e+85) tmp = t_3 * (y_46_im * t_2); elseif (y_46_im <= -5.3e+29) tmp = t_1; elseif (y_46_im <= 2e+17) tmp = (hypot(x_46_im, x_46_re) ^ y_46_re) * sin((y_46_im * log(hypot(x_46_im, x_46_re)))); elseif (y_46_im <= 3.7e+84) tmp = t_1; else tmp = t_0 * 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[(t$95$0 * (-N[Exp[N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * (-y$46$im)), $MachinePrecision]], $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[Exp[N[(N[(y$46$re * t$95$2), $MachinePrecision] - N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[y$46$im, -2.15e+176], t$95$1, If[LessEqual[y$46$im, -9.4e+85], N[(t$95$3 * N[(y$46$im * t$95$2), $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$im, -5.3e+29], t$95$1, If[LessEqual[y$46$im, 2e+17], N[(N[Power[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision], y$46$re], $MachinePrecision] * N[Sin[N[(y$46$im * N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$im, 3.7e+84], t$95$1, N[(t$95$0 * t$95$3), $MachinePrecision]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
t_1 := t_0 \cdot \left(-e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot \left(-y.im\right)}\right)\\
t_2 := \log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right)\\
t_3 := e^{y.re \cdot t_2 - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}\\
\mathbf{if}\;y.im \leq -2.15 \cdot 10^{+176}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y.im \leq -9.4 \cdot 10^{+85}:\\
\;\;\;\;t_3 \cdot \left(y.im \cdot t_2\right)\\
\mathbf{elif}\;y.im \leq -5.3 \cdot 10^{+29}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y.im \leq 2 \cdot 10^{+17}:\\
\;\;\;\;{\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re} \cdot \sin \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right)\\
\mathbf{elif}\;y.im \leq 3.7 \cdot 10^{+84}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;t_0 \cdot t_3\\
\end{array}
\end{array}
if y.im < -2.15000000000000013e176 or -9.4000000000000004e85 < y.im < -5.3e29 or 2e17 < y.im < 3.7e84Initial program 24.3%
Taylor expanded in y.im around 0 44.3%
Taylor expanded in y.re around 0 44.3%
*-commutative44.3%
distribute-rgt-neg-in44.3%
Simplified44.3%
add-sqr-sqrt2.2%
sqrt-unprod23.7%
pow223.7%
*-commutative23.7%
Applied egg-rr49.6%
Taylor expanded in y.re around -inf 66.1%
mul-1-neg66.1%
distribute-rgt-neg-in66.1%
Simplified66.1%
if -2.15000000000000013e176 < y.im < -9.4000000000000004e85Initial program 57.9%
Taylor expanded in y.re around 0 63.2%
+-commutative63.2%
unpow263.2%
unpow263.2%
Simplified63.2%
Taylor expanded in y.im around 0 89.5%
unpow289.5%
unpow289.5%
Simplified89.5%
if -5.3e29 < y.im < 2e17Initial program 43.1%
exp-diff43.1%
+-rgt-identity43.1%
+-rgt-identity43.1%
exp-to-pow43.1%
hypot-def43.1%
*-commutative43.1%
exp-prod42.8%
+-commutative42.8%
*-commutative42.8%
Simplified86.6%
Taylor expanded in y.im around 0 61.8%
unpow261.8%
unpow261.8%
hypot-def86.7%
Simplified86.7%
fma-udef86.7%
*-commutative86.7%
hypot-udef42.4%
+-commutative42.4%
add-sqr-sqrt24.1%
sqrt-unprod20.6%
pow220.6%
*-commutative20.6%
hypot-udef43.1%
fma-def42.4%
Applied egg-rr42.4%
Taylor expanded in y.im around inf 34.3%
+-commutative34.3%
unpow234.3%
unpow234.3%
hypot-def71.6%
hypot-def34.3%
unpow234.3%
unpow234.3%
+-commutative34.3%
unpow234.3%
unpow234.3%
hypot-def71.6%
Simplified71.6%
if 3.7e84 < y.im Initial program 47.5%
Taylor expanded in y.im around 0 60.2%
Taylor expanded in y.re around 0 67.7%
Final simplification71.1%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (* y.re (atan2 x.im x.re)))
(t_1 (* t_0 (- (exp (* (atan2 x.im x.re) (- y.im)))))))
(if (<= y.im -5.3e+29)
t_1
(if (<= y.im 1.5e+17)
(* (pow (hypot x.im x.re) y.re) (sin (* y.im (log (hypot x.im x.re)))))
(if (<= y.im 6.2e+84)
t_1
(*
t_0
(exp
(-
(* y.re (log (sqrt (+ (* x.re x.re) (* x.im x.im)))))
(* (atan2 x.im x.re) y.im)))))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = y_46_re * atan2(x_46_im, x_46_re);
double t_1 = t_0 * -exp((atan2(x_46_im, x_46_re) * -y_46_im));
double tmp;
if (y_46_im <= -5.3e+29) {
tmp = t_1;
} else if (y_46_im <= 1.5e+17) {
tmp = pow(hypot(x_46_im, x_46_re), y_46_re) * sin((y_46_im * log(hypot(x_46_im, x_46_re))));
} else if (y_46_im <= 6.2e+84) {
tmp = t_1;
} else {
tmp = t_0 * exp(((y_46_re * log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))) - (atan2(x_46_im, x_46_re) * y_46_im)));
}
return tmp;
}
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = y_46_re * Math.atan2(x_46_im, x_46_re);
double t_1 = t_0 * -Math.exp((Math.atan2(x_46_im, x_46_re) * -y_46_im));
double tmp;
if (y_46_im <= -5.3e+29) {
tmp = t_1;
} else if (y_46_im <= 1.5e+17) {
tmp = Math.pow(Math.hypot(x_46_im, x_46_re), y_46_re) * Math.sin((y_46_im * Math.log(Math.hypot(x_46_im, x_46_re))));
} else if (y_46_im <= 6.2e+84) {
tmp = t_1;
} else {
tmp = t_0 * Math.exp(((y_46_re * Math.log(Math.sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))) - (Math.atan2(x_46_im, x_46_re) * y_46_im)));
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): t_0 = y_46_re * math.atan2(x_46_im, x_46_re) t_1 = t_0 * -math.exp((math.atan2(x_46_im, x_46_re) * -y_46_im)) tmp = 0 if y_46_im <= -5.3e+29: tmp = t_1 elif y_46_im <= 1.5e+17: tmp = math.pow(math.hypot(x_46_im, x_46_re), y_46_re) * math.sin((y_46_im * math.log(math.hypot(x_46_im, x_46_re)))) elif y_46_im <= 6.2e+84: tmp = t_1 else: tmp = t_0 * math.exp(((y_46_re * math.log(math.sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))) - (math.atan2(x_46_im, x_46_re) * y_46_im))) return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = Float64(y_46_re * atan(x_46_im, x_46_re)) t_1 = Float64(t_0 * Float64(-exp(Float64(atan(x_46_im, x_46_re) * Float64(-y_46_im))))) tmp = 0.0 if (y_46_im <= -5.3e+29) tmp = t_1; elseif (y_46_im <= 1.5e+17) tmp = Float64((hypot(x_46_im, x_46_re) ^ y_46_re) * sin(Float64(y_46_im * log(hypot(x_46_im, x_46_re))))); elseif (y_46_im <= 6.2e+84) tmp = t_1; else tmp = Float64(t_0 * exp(Float64(Float64(y_46_re * log(sqrt(Float64(Float64(x_46_re * x_46_re) + Float64(x_46_im * x_46_im))))) - Float64(atan(x_46_im, x_46_re) * y_46_im)))); end return tmp end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = y_46_re * atan2(x_46_im, x_46_re); t_1 = t_0 * -exp((atan2(x_46_im, x_46_re) * -y_46_im)); tmp = 0.0; if (y_46_im <= -5.3e+29) tmp = t_1; elseif (y_46_im <= 1.5e+17) tmp = (hypot(x_46_im, x_46_re) ^ y_46_re) * sin((y_46_im * log(hypot(x_46_im, x_46_re)))); elseif (y_46_im <= 6.2e+84) tmp = t_1; else tmp = t_0 * exp(((y_46_re * log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))) - (atan2(x_46_im, x_46_re) * y_46_im))); end tmp_2 = tmp; end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(t$95$0 * (-N[Exp[N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * (-y$46$im)), $MachinePrecision]], $MachinePrecision])), $MachinePrecision]}, If[LessEqual[y$46$im, -5.3e+29], t$95$1, If[LessEqual[y$46$im, 1.5e+17], N[(N[Power[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision], y$46$re], $MachinePrecision] * N[Sin[N[(y$46$im * N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$im, 6.2e+84], t$95$1, N[(t$95$0 * 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] - N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
t_1 := t_0 \cdot \left(-e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot \left(-y.im\right)}\right)\\
\mathbf{if}\;y.im \leq -5.3 \cdot 10^{+29}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y.im \leq 1.5 \cdot 10^{+17}:\\
\;\;\;\;{\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re} \cdot \sin \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right)\\
\mathbf{elif}\;y.im \leq 6.2 \cdot 10^{+84}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;t_0 \cdot e^{y.re \cdot \log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}\\
\end{array}
\end{array}
if y.im < -5.3e29 or 1.5e17 < y.im < 6.20000000000000006e84Initial program 32.9%
Taylor expanded in y.im around 0 43.7%
Taylor expanded in y.re around 0 38.5%
*-commutative38.5%
distribute-rgt-neg-in38.5%
Simplified38.5%
add-sqr-sqrt2.0%
sqrt-unprod20.7%
pow220.7%
*-commutative20.7%
Applied egg-rr42.4%
Taylor expanded in y.re around -inf 65.5%
mul-1-neg65.5%
distribute-rgt-neg-in65.5%
Simplified65.5%
if -5.3e29 < y.im < 1.5e17Initial program 43.1%
exp-diff43.1%
+-rgt-identity43.1%
+-rgt-identity43.1%
exp-to-pow43.1%
hypot-def43.1%
*-commutative43.1%
exp-prod42.8%
+-commutative42.8%
*-commutative42.8%
Simplified86.6%
Taylor expanded in y.im around 0 61.8%
unpow261.8%
unpow261.8%
hypot-def86.7%
Simplified86.7%
fma-udef86.7%
*-commutative86.7%
hypot-udef42.4%
+-commutative42.4%
add-sqr-sqrt24.1%
sqrt-unprod20.6%
pow220.6%
*-commutative20.6%
hypot-udef43.1%
fma-def42.4%
Applied egg-rr42.4%
Taylor expanded in y.im around inf 34.3%
+-commutative34.3%
unpow234.3%
unpow234.3%
hypot-def71.6%
hypot-def34.3%
unpow234.3%
unpow234.3%
+-commutative34.3%
unpow234.3%
unpow234.3%
hypot-def71.6%
Simplified71.6%
if 6.20000000000000006e84 < y.im Initial program 47.5%
Taylor expanded in y.im around 0 60.2%
Taylor expanded in y.re around 0 67.7%
Final simplification69.2%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0
(*
(pow (hypot x.im x.re) y.re)
(sin (* y.im (log (hypot x.im x.re))))))
(t_1 (exp (* (atan2 x.im x.re) (- y.im))))
(t_2 (* (* y.re (atan2 x.im x.re)) (- t_1))))
(if (<= y.im -3.1e+29)
t_2
(if (<= y.im 1.25e+17)
t_0
(if (<= y.im 8.5e+84)
t_2
(if (<= y.im 2.2e+151) t_0 (* (atan2 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 = pow(hypot(x_46_im, x_46_re), y_46_re) * sin((y_46_im * log(hypot(x_46_im, x_46_re))));
double t_1 = exp((atan2(x_46_im, x_46_re) * -y_46_im));
double t_2 = (y_46_re * atan2(x_46_im, x_46_re)) * -t_1;
double tmp;
if (y_46_im <= -3.1e+29) {
tmp = t_2;
} else if (y_46_im <= 1.25e+17) {
tmp = t_0;
} else if (y_46_im <= 8.5e+84) {
tmp = t_2;
} else if (y_46_im <= 2.2e+151) {
tmp = t_0;
} else {
tmp = atan2(x_46_im, x_46_re) * (y_46_re * 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.pow(Math.hypot(x_46_im, x_46_re), y_46_re) * Math.sin((y_46_im * Math.log(Math.hypot(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 = (y_46_re * Math.atan2(x_46_im, x_46_re)) * -t_1;
double tmp;
if (y_46_im <= -3.1e+29) {
tmp = t_2;
} else if (y_46_im <= 1.25e+17) {
tmp = t_0;
} else if (y_46_im <= 8.5e+84) {
tmp = t_2;
} else if (y_46_im <= 2.2e+151) {
tmp = t_0;
} else {
tmp = Math.atan2(x_46_im, x_46_re) * (y_46_re * t_1);
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): t_0 = math.pow(math.hypot(x_46_im, x_46_re), y_46_re) * math.sin((y_46_im * math.log(math.hypot(x_46_im, x_46_re)))) t_1 = math.exp((math.atan2(x_46_im, x_46_re) * -y_46_im)) t_2 = (y_46_re * math.atan2(x_46_im, x_46_re)) * -t_1 tmp = 0 if y_46_im <= -3.1e+29: tmp = t_2 elif y_46_im <= 1.25e+17: tmp = t_0 elif y_46_im <= 8.5e+84: tmp = t_2 elif y_46_im <= 2.2e+151: tmp = t_0 else: tmp = math.atan2(x_46_im, x_46_re) * (y_46_re * t_1) return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = Float64((hypot(x_46_im, x_46_re) ^ y_46_re) * sin(Float64(y_46_im * log(hypot(x_46_im, x_46_re))))) t_1 = exp(Float64(atan(x_46_im, x_46_re) * Float64(-y_46_im))) t_2 = Float64(Float64(y_46_re * atan(x_46_im, x_46_re)) * Float64(-t_1)) tmp = 0.0 if (y_46_im <= -3.1e+29) tmp = t_2; elseif (y_46_im <= 1.25e+17) tmp = t_0; elseif (y_46_im <= 8.5e+84) tmp = t_2; elseif (y_46_im <= 2.2e+151) tmp = t_0; else tmp = Float64(atan(x_46_im, x_46_re) * Float64(y_46_re * t_1)); end return tmp end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = (hypot(x_46_im, x_46_re) ^ y_46_re) * sin((y_46_im * log(hypot(x_46_im, x_46_re)))); t_1 = exp((atan2(x_46_im, x_46_re) * -y_46_im)); t_2 = (y_46_re * atan2(x_46_im, x_46_re)) * -t_1; tmp = 0.0; if (y_46_im <= -3.1e+29) tmp = t_2; elseif (y_46_im <= 1.25e+17) tmp = t_0; elseif (y_46_im <= 8.5e+84) tmp = t_2; elseif (y_46_im <= 2.2e+151) tmp = t_0; else tmp = atan2(x_46_im, x_46_re) * (y_46_re * 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[Power[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision], y$46$re], $MachinePrecision] * N[Sin[N[(y$46$im * N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $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[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision] * (-t$95$1)), $MachinePrecision]}, If[LessEqual[y$46$im, -3.1e+29], t$95$2, If[LessEqual[y$46$im, 1.25e+17], t$95$0, If[LessEqual[y$46$im, 8.5e+84], t$95$2, If[LessEqual[y$46$im, 2.2e+151], t$95$0, N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * N[(y$46$re * t$95$1), $MachinePrecision]), $MachinePrecision]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := {\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re} \cdot \sin \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right)\\
t_1 := e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot \left(-y.im\right)}\\
t_2 := \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot \left(-t_1\right)\\
\mathbf{if}\;y.im \leq -3.1 \cdot 10^{+29}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;y.im \leq 1.25 \cdot 10^{+17}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;y.im \leq 8.5 \cdot 10^{+84}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;y.im \leq 2.2 \cdot 10^{+151}:\\
\;\;\;\;t_0\\
\mathbf{else}:\\
\;\;\;\;\tan^{-1}_* \frac{x.im}{x.re} \cdot \left(y.re \cdot t_1\right)\\
\end{array}
\end{array}
if y.im < -3.0999999999999999e29 or 1.25e17 < y.im < 8.5000000000000008e84Initial program 32.9%
Taylor expanded in y.im around 0 43.7%
Taylor expanded in y.re around 0 38.5%
*-commutative38.5%
distribute-rgt-neg-in38.5%
Simplified38.5%
add-sqr-sqrt2.0%
sqrt-unprod20.7%
pow220.7%
*-commutative20.7%
Applied egg-rr42.4%
Taylor expanded in y.re around -inf 65.5%
mul-1-neg65.5%
distribute-rgt-neg-in65.5%
Simplified65.5%
if -3.0999999999999999e29 < y.im < 1.25e17 or 8.5000000000000008e84 < y.im < 2.20000000000000007e151Initial program 42.7%
exp-diff42.1%
+-rgt-identity42.1%
+-rgt-identity42.1%
exp-to-pow42.1%
hypot-def42.1%
*-commutative42.1%
exp-prod41.8%
+-commutative41.8%
*-commutative41.8%
Simplified81.9%
Taylor expanded in y.im around 0 61.8%
unpow261.8%
unpow261.8%
hypot-def84.6%
Simplified84.6%
fma-udef84.6%
*-commutative84.6%
hypot-udef41.5%
+-commutative41.5%
add-sqr-sqrt22.2%
sqrt-unprod19.6%
pow219.6%
*-commutative19.6%
hypot-udef40.8%
fma-def40.2%
Applied egg-rr40.2%
Taylor expanded in y.im around inf 34.7%
+-commutative34.7%
unpow234.7%
unpow234.7%
hypot-def71.4%
hypot-def34.7%
unpow234.7%
unpow234.7%
+-commutative34.7%
unpow234.7%
unpow234.7%
hypot-def71.4%
Simplified71.4%
if 2.20000000000000007e151 < y.im Initial program 51.9%
Taylor expanded in y.im around 0 59.5%
Taylor expanded in y.re around 0 59.5%
*-commutative59.5%
distribute-rgt-neg-in59.5%
Simplified59.5%
Taylor expanded in y.re around 0 63.3%
associate-*r*63.3%
neg-mul-163.3%
*-commutative63.3%
distribute-rgt-neg-in63.3%
Simplified63.3%
Final simplification68.8%
(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 (sqrt (+ (* x.re x.re) (* x.im x.im))) y.re)))
(t_2 (exp (* (atan2 x.im x.re) (- y.im))))
(t_3 (* (atan2 x.im x.re) (* y.re t_2))))
(if (<= y.re -1.38e-8)
t_1
(if (<= y.re 1.9e-196)
t_3
(if (<= y.re 5.6e-48)
(* t_0 (- t_2))
(if (<= y.re 15000000.0)
t_3
(if (or (<= y.re 2.55e+187) (not (<= y.re 7.2e+219)))
t_1
(sqrt (pow t_0 2.0)))))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = y_46_re * atan2(x_46_im, x_46_re);
double t_1 = sin(t_0) * pow(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))), y_46_re);
double t_2 = exp((atan2(x_46_im, x_46_re) * -y_46_im));
double t_3 = atan2(x_46_im, x_46_re) * (y_46_re * t_2);
double tmp;
if (y_46_re <= -1.38e-8) {
tmp = t_1;
} else if (y_46_re <= 1.9e-196) {
tmp = t_3;
} else if (y_46_re <= 5.6e-48) {
tmp = t_0 * -t_2;
} else if (y_46_re <= 15000000.0) {
tmp = t_3;
} else if ((y_46_re <= 2.55e+187) || !(y_46_re <= 7.2e+219)) {
tmp = t_1;
} else {
tmp = sqrt(pow(t_0, 2.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) :: t_1
real(8) :: t_2
real(8) :: t_3
real(8) :: tmp
t_0 = y_46re * atan2(x_46im, x_46re)
t_1 = sin(t_0) * (sqrt(((x_46re * x_46re) + (x_46im * x_46im))) ** y_46re)
t_2 = exp((atan2(x_46im, x_46re) * -y_46im))
t_3 = atan2(x_46im, x_46re) * (y_46re * t_2)
if (y_46re <= (-1.38d-8)) then
tmp = t_1
else if (y_46re <= 1.9d-196) then
tmp = t_3
else if (y_46re <= 5.6d-48) then
tmp = t_0 * -t_2
else if (y_46re <= 15000000.0d0) then
tmp = t_3
else if ((y_46re <= 2.55d+187) .or. (.not. (y_46re <= 7.2d+219))) then
tmp = t_1
else
tmp = sqrt((t_0 ** 2.0d0))
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(Math.sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))), y_46_re);
double t_2 = Math.exp((Math.atan2(x_46_im, x_46_re) * -y_46_im));
double t_3 = Math.atan2(x_46_im, x_46_re) * (y_46_re * t_2);
double tmp;
if (y_46_re <= -1.38e-8) {
tmp = t_1;
} else if (y_46_re <= 1.9e-196) {
tmp = t_3;
} else if (y_46_re <= 5.6e-48) {
tmp = t_0 * -t_2;
} else if (y_46_re <= 15000000.0) {
tmp = t_3;
} else if ((y_46_re <= 2.55e+187) || !(y_46_re <= 7.2e+219)) {
tmp = t_1;
} else {
tmp = Math.sqrt(Math.pow(t_0, 2.0));
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): t_0 = y_46_re * math.atan2(x_46_im, x_46_re) t_1 = math.sin(t_0) * math.pow(math.sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))), y_46_re) t_2 = math.exp((math.atan2(x_46_im, x_46_re) * -y_46_im)) t_3 = math.atan2(x_46_im, x_46_re) * (y_46_re * t_2) tmp = 0 if y_46_re <= -1.38e-8: tmp = t_1 elif y_46_re <= 1.9e-196: tmp = t_3 elif y_46_re <= 5.6e-48: tmp = t_0 * -t_2 elif y_46_re <= 15000000.0: tmp = t_3 elif (y_46_re <= 2.55e+187) or not (y_46_re <= 7.2e+219): tmp = t_1 else: tmp = math.sqrt(math.pow(t_0, 2.0)) return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = Float64(y_46_re * atan(x_46_im, x_46_re)) t_1 = Float64(sin(t_0) * (sqrt(Float64(Float64(x_46_re * x_46_re) + Float64(x_46_im * x_46_im))) ^ y_46_re)) t_2 = exp(Float64(atan(x_46_im, x_46_re) * Float64(-y_46_im))) t_3 = Float64(atan(x_46_im, x_46_re) * Float64(y_46_re * t_2)) tmp = 0.0 if (y_46_re <= -1.38e-8) tmp = t_1; elseif (y_46_re <= 1.9e-196) tmp = t_3; elseif (y_46_re <= 5.6e-48) tmp = Float64(t_0 * Float64(-t_2)); elseif (y_46_re <= 15000000.0) tmp = t_3; elseif ((y_46_re <= 2.55e+187) || !(y_46_re <= 7.2e+219)) tmp = t_1; else tmp = sqrt((t_0 ^ 2.0)); end return tmp end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = y_46_re * atan2(x_46_im, x_46_re); t_1 = sin(t_0) * (sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))) ^ y_46_re); t_2 = exp((atan2(x_46_im, x_46_re) * -y_46_im)); t_3 = atan2(x_46_im, x_46_re) * (y_46_re * t_2); tmp = 0.0; if (y_46_re <= -1.38e-8) tmp = t_1; elseif (y_46_re <= 1.9e-196) tmp = t_3; elseif (y_46_re <= 5.6e-48) tmp = t_0 * -t_2; elseif (y_46_re <= 15000000.0) tmp = t_3; elseif ((y_46_re <= 2.55e+187) || ~((y_46_re <= 7.2e+219))) tmp = t_1; else tmp = sqrt((t_0 ^ 2.0)); end tmp_2 = tmp; end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(N[Sin[t$95$0], $MachinePrecision] * N[Power[N[Sqrt[N[(N[(x$46$re * x$46$re), $MachinePrecision] + N[(x$46$im * x$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], y$46$re], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[Exp[N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * (-y$46$im)), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$3 = N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * N[(y$46$re * t$95$2), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y$46$re, -1.38e-8], t$95$1, If[LessEqual[y$46$re, 1.9e-196], t$95$3, If[LessEqual[y$46$re, 5.6e-48], N[(t$95$0 * (-t$95$2)), $MachinePrecision], If[LessEqual[y$46$re, 15000000.0], t$95$3, If[Or[LessEqual[y$46$re, 2.55e+187], N[Not[LessEqual[y$46$re, 7.2e+219]], $MachinePrecision]], t$95$1, N[Sqrt[N[Power[t$95$0, 2.0], $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 \cdot {\left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right)}^{y.re}\\
t_2 := e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot \left(-y.im\right)}\\
t_3 := \tan^{-1}_* \frac{x.im}{x.re} \cdot \left(y.re \cdot t_2\right)\\
\mathbf{if}\;y.re \leq -1.38 \cdot 10^{-8}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y.re \leq 1.9 \cdot 10^{-196}:\\
\;\;\;\;t_3\\
\mathbf{elif}\;y.re \leq 5.6 \cdot 10^{-48}:\\
\;\;\;\;t_0 \cdot \left(-t_2\right)\\
\mathbf{elif}\;y.re \leq 15000000:\\
\;\;\;\;t_3\\
\mathbf{elif}\;y.re \leq 2.55 \cdot 10^{+187} \lor \neg \left(y.re \leq 7.2 \cdot 10^{+219}\right):\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;\sqrt{{t_0}^{2}}\\
\end{array}
\end{array}
if y.re < -1.37999999999999995e-8 or 1.5e7 < y.re < 2.55e187 or 7.20000000000000012e219 < y.re Initial program 41.7%
Taylor expanded in y.im around 0 71.4%
Taylor expanded in y.im around 0 67.1%
unpow267.1%
unpow267.1%
Simplified67.1%
if -1.37999999999999995e-8 < y.re < 1.9000000000000001e-196 or 5.6000000000000001e-48 < y.re < 1.5e7Initial program 42.4%
Taylor expanded in y.im around 0 34.4%
Taylor expanded in y.re around 0 50.1%
*-commutative50.1%
distribute-rgt-neg-in50.1%
Simplified50.1%
Taylor expanded in y.re around 0 51.0%
associate-*r*51.0%
neg-mul-151.0%
*-commutative51.0%
distribute-rgt-neg-in51.0%
Simplified51.0%
if 1.9000000000000001e-196 < y.re < 5.6000000000000001e-48Initial program 37.7%
Taylor expanded in y.im around 0 16.8%
Taylor expanded in y.re around 0 36.7%
*-commutative36.7%
distribute-rgt-neg-in36.7%
Simplified36.7%
add-sqr-sqrt14.0%
sqrt-unprod15.2%
pow215.2%
*-commutative15.2%
Applied egg-rr37.1%
Taylor expanded in y.re around -inf 52.2%
mul-1-neg52.2%
distribute-rgt-neg-in52.2%
Simplified52.2%
if 2.55e187 < y.re < 7.20000000000000012e219Initial program 14.3%
Taylor expanded in y.im around 0 14.3%
Taylor expanded in y.re around 0 28.9%
*-commutative28.9%
distribute-rgt-neg-in28.9%
Simplified28.9%
Taylor expanded in y.im around 0 1.8%
add-sqr-sqrt1.1%
sqrt-unprod71.7%
pow271.7%
*-commutative71.7%
Applied egg-rr71.7%
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 (exp (* (atan2 x.im x.re) (- y.im)))))
(if (<= y.im -2.3e+70)
(* t_0 (- t_1))
(if (<= y.im 1.35e-165)
(* (atan2 x.im x.re) (* y.re t_1))
(if (<= y.im 4100000.0)
(cbrt (pow t_0 3.0))
(* t_0 (pow (exp (- y.im)) (atan2 x.im x.re))))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = 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 tmp;
if (y_46_im <= -2.3e+70) {
tmp = t_0 * -t_1;
} else if (y_46_im <= 1.35e-165) {
tmp = atan2(x_46_im, x_46_re) * (y_46_re * t_1);
} else if (y_46_im <= 4100000.0) {
tmp = cbrt(pow(t_0, 3.0));
} else {
tmp = t_0 * pow(exp(-y_46_im), atan2(x_46_im, x_46_re));
}
return tmp;
}
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double 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 tmp;
if (y_46_im <= -2.3e+70) {
tmp = t_0 * -t_1;
} else if (y_46_im <= 1.35e-165) {
tmp = Math.atan2(x_46_im, x_46_re) * (y_46_re * t_1);
} else if (y_46_im <= 4100000.0) {
tmp = Math.cbrt(Math.pow(t_0, 3.0));
} else {
tmp = t_0 * Math.pow(Math.exp(-y_46_im), Math.atan2(x_46_im, x_46_re));
}
return tmp;
}
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = Float64(y_46_re * atan(x_46_im, x_46_re)) t_1 = exp(Float64(atan(x_46_im, x_46_re) * Float64(-y_46_im))) tmp = 0.0 if (y_46_im <= -2.3e+70) tmp = Float64(t_0 * Float64(-t_1)); elseif (y_46_im <= 1.35e-165) tmp = Float64(atan(x_46_im, x_46_re) * Float64(y_46_re * t_1)); elseif (y_46_im <= 4100000.0) tmp = cbrt((t_0 ^ 3.0)); else tmp = Float64(t_0 * (exp(Float64(-y_46_im)) ^ atan(x_46_im, x_46_re))); end return tmp end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[(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]}, If[LessEqual[y$46$im, -2.3e+70], N[(t$95$0 * (-t$95$1)), $MachinePrecision], If[LessEqual[y$46$im, 1.35e-165], N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * N[(y$46$re * t$95$1), $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$im, 4100000.0], N[Power[N[Power[t$95$0, 3.0], $MachinePrecision], 1/3], $MachinePrecision], N[(t$95$0 * N[Power[N[Exp[(-y$46$im)], $MachinePrecision], N[ArcTan[x$46$im / x$46$re], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]]]
\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 \left(-y.im\right)}\\
\mathbf{if}\;y.im \leq -2.3 \cdot 10^{+70}:\\
\;\;\;\;t_0 \cdot \left(-t_1\right)\\
\mathbf{elif}\;y.im \leq 1.35 \cdot 10^{-165}:\\
\;\;\;\;\tan^{-1}_* \frac{x.im}{x.re} \cdot \left(y.re \cdot t_1\right)\\
\mathbf{elif}\;y.im \leq 4100000:\\
\;\;\;\;\sqrt[3]{{t_0}^{3}}\\
\mathbf{else}:\\
\;\;\;\;t_0 \cdot {\left(e^{-y.im}\right)}^{\tan^{-1}_* \frac{x.im}{x.re}}\\
\end{array}
\end{array}
if y.im < -2.29999999999999994e70Initial program 41.8%
Taylor expanded in y.im around 0 39.6%
Taylor expanded in y.re around 0 37.9%
*-commutative37.9%
distribute-rgt-neg-in37.9%
Simplified37.9%
add-sqr-sqrt2.2%
sqrt-unprod23.3%
pow223.3%
*-commutative23.3%
Applied egg-rr41.6%
Taylor expanded in y.re around -inf 67.3%
mul-1-neg67.3%
distribute-rgt-neg-in67.3%
Simplified67.3%
if -2.29999999999999994e70 < y.im < 1.3499999999999999e-165Initial program 42.9%
Taylor expanded in y.im around 0 53.1%
Taylor expanded in y.re around 0 29.2%
*-commutative29.2%
distribute-rgt-neg-in29.2%
Simplified29.2%
Taylor expanded in y.re around 0 29.2%
associate-*r*29.2%
neg-mul-129.2%
*-commutative29.2%
distribute-rgt-neg-in29.2%
Simplified29.2%
if 1.3499999999999999e-165 < y.im < 4.1e6Initial program 40.4%
Taylor expanded in y.im around 0 41.7%
Taylor expanded in y.re around 0 15.2%
*-commutative15.2%
distribute-rgt-neg-in15.2%
Simplified15.2%
Taylor expanded in y.im around 0 15.2%
add-cbrt-cube28.5%
pow328.5%
*-commutative28.5%
Applied egg-rr28.5%
if 4.1e6 < y.im Initial program 36.7%
Taylor expanded in y.im around 0 53.8%
Taylor expanded in y.re around 0 47.4%
*-commutative47.4%
distribute-rgt-neg-in47.4%
Simplified47.4%
Taylor expanded in y.im around inf 47.4%
neg-mul-147.4%
exp-neg47.4%
*-commutative47.4%
rec-exp47.4%
distribute-lft-neg-in47.4%
exp-prod50.5%
Simplified50.5%
Final simplification41.6%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (exp (* (atan2 x.im x.re) (- y.im))))
(t_1 (* (atan2 x.im x.re) (* y.re t_0)))
(t_2 (* y.re (atan2 x.im x.re))))
(if (<= y.re -3e+35)
(cbrt (* (pow (atan2 x.im x.re) 3.0) (pow y.re 3.0)))
(if (<= y.re 3.8e-197)
t_1
(if (<= y.re 5.8e-48)
(* t_2 (- t_0))
(if (<= y.re 6e+37)
t_1
(if (<= y.re 2.55e+187)
(* (atan2 x.im x.re) (log (exp y.re)))
(sqrt (pow t_2 2.0)))))))))
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 = atan2(x_46_im, x_46_re) * (y_46_re * t_0);
double t_2 = y_46_re * atan2(x_46_im, x_46_re);
double tmp;
if (y_46_re <= -3e+35) {
tmp = cbrt((pow(atan2(x_46_im, x_46_re), 3.0) * pow(y_46_re, 3.0)));
} else if (y_46_re <= 3.8e-197) {
tmp = t_1;
} else if (y_46_re <= 5.8e-48) {
tmp = t_2 * -t_0;
} else if (y_46_re <= 6e+37) {
tmp = t_1;
} else if (y_46_re <= 2.55e+187) {
tmp = atan2(x_46_im, x_46_re) * log(exp(y_46_re));
} else {
tmp = sqrt(pow(t_2, 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.exp((Math.atan2(x_46_im, x_46_re) * -y_46_im));
double t_1 = Math.atan2(x_46_im, x_46_re) * (y_46_re * t_0);
double t_2 = y_46_re * Math.atan2(x_46_im, x_46_re);
double tmp;
if (y_46_re <= -3e+35) {
tmp = Math.cbrt((Math.pow(Math.atan2(x_46_im, x_46_re), 3.0) * Math.pow(y_46_re, 3.0)));
} else if (y_46_re <= 3.8e-197) {
tmp = t_1;
} else if (y_46_re <= 5.8e-48) {
tmp = t_2 * -t_0;
} else if (y_46_re <= 6e+37) {
tmp = t_1;
} else if (y_46_re <= 2.55e+187) {
tmp = Math.atan2(x_46_im, x_46_re) * Math.log(Math.exp(y_46_re));
} else {
tmp = Math.sqrt(Math.pow(t_2, 2.0));
}
return tmp;
}
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = exp(Float64(atan(x_46_im, x_46_re) * Float64(-y_46_im))) t_1 = Float64(atan(x_46_im, x_46_re) * Float64(y_46_re * t_0)) t_2 = Float64(y_46_re * atan(x_46_im, x_46_re)) tmp = 0.0 if (y_46_re <= -3e+35) tmp = cbrt(Float64((atan(x_46_im, x_46_re) ^ 3.0) * (y_46_re ^ 3.0))); elseif (y_46_re <= 3.8e-197) tmp = t_1; elseif (y_46_re <= 5.8e-48) tmp = Float64(t_2 * Float64(-t_0)); elseif (y_46_re <= 6e+37) tmp = t_1; elseif (y_46_re <= 2.55e+187) tmp = Float64(atan(x_46_im, x_46_re) * log(exp(y_46_re))); else tmp = sqrt((t_2 ^ 2.0)); end return tmp end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[Exp[N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * (-y$46$im)), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$1 = N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * N[(y$46$re * t$95$0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y$46$re, -3e+35], N[Power[N[(N[Power[N[ArcTan[x$46$im / x$46$re], $MachinePrecision], 3.0], $MachinePrecision] * N[Power[y$46$re, 3.0], $MachinePrecision]), $MachinePrecision], 1/3], $MachinePrecision], If[LessEqual[y$46$re, 3.8e-197], t$95$1, If[LessEqual[y$46$re, 5.8e-48], N[(t$95$2 * (-t$95$0)), $MachinePrecision], If[LessEqual[y$46$re, 6e+37], t$95$1, If[LessEqual[y$46$re, 2.55e+187], N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * N[Log[N[Exp[y$46$re], $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[Sqrt[N[Power[t$95$2, 2.0], $MachinePrecision]], $MachinePrecision]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot \left(-y.im\right)}\\
t_1 := \tan^{-1}_* \frac{x.im}{x.re} \cdot \left(y.re \cdot t_0\right)\\
t_2 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
\mathbf{if}\;y.re \leq -3 \cdot 10^{+35}:\\
\;\;\;\;\sqrt[3]{{\tan^{-1}_* \frac{x.im}{x.re}}^{3} \cdot {y.re}^{3}}\\
\mathbf{elif}\;y.re \leq 3.8 \cdot 10^{-197}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y.re \leq 5.8 \cdot 10^{-48}:\\
\;\;\;\;t_2 \cdot \left(-t_0\right)\\
\mathbf{elif}\;y.re \leq 6 \cdot 10^{+37}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y.re \leq 2.55 \cdot 10^{+187}:\\
\;\;\;\;\tan^{-1}_* \frac{x.im}{x.re} \cdot \log \left(e^{y.re}\right)\\
\mathbf{else}:\\
\;\;\;\;\sqrt{{t_2}^{2}}\\
\end{array}
\end{array}
if y.re < -2.99999999999999991e35Initial program 40.7%
Taylor expanded in y.im around 0 76.1%
Taylor expanded in y.re around 0 20.4%
*-commutative20.4%
distribute-rgt-neg-in20.4%
Simplified20.4%
Taylor expanded in y.im around 0 4.7%
*-commutative4.7%
add-cbrt-cube15.3%
add-cbrt-cube28.7%
cbrt-unprod28.7%
pow328.7%
pow328.7%
Applied egg-rr28.7%
if -2.99999999999999991e35 < y.re < 3.7999999999999999e-197 or 5.8000000000000006e-48 < y.re < 6.00000000000000043e37Initial program 43.7%
Taylor expanded in y.im around 0 38.4%
Taylor expanded in y.re around 0 47.0%
*-commutative47.0%
distribute-rgt-neg-in47.0%
Simplified47.0%
Taylor expanded in y.re around 0 47.8%
associate-*r*47.8%
neg-mul-147.8%
*-commutative47.8%
distribute-rgt-neg-in47.8%
Simplified47.8%
if 3.7999999999999999e-197 < y.re < 5.8000000000000006e-48Initial program 37.7%
Taylor expanded in y.im around 0 16.8%
Taylor expanded in y.re around 0 36.7%
*-commutative36.7%
distribute-rgt-neg-in36.7%
Simplified36.7%
add-sqr-sqrt14.0%
sqrt-unprod15.2%
pow215.2%
*-commutative15.2%
Applied egg-rr37.1%
Taylor expanded in y.re around -inf 52.2%
mul-1-neg52.2%
distribute-rgt-neg-in52.2%
Simplified52.2%
if 6.00000000000000043e37 < y.re < 2.55e187Initial program 37.0%
Taylor expanded in y.im around 0 74.1%
Taylor expanded in y.re around 0 12.9%
*-commutative12.9%
distribute-rgt-neg-in12.9%
Simplified12.9%
Taylor expanded in y.im around 0 2.5%
add-log-exp34.0%
*-commutative34.0%
*-commutative34.0%
exp-prod48.6%
Applied egg-rr48.6%
log-pow48.5%
Simplified48.5%
if 2.55e187 < y.re Initial program 34.6%
Taylor expanded in y.im around 0 46.2%
Taylor expanded in y.re around 0 9.2%
*-commutative9.2%
distribute-rgt-neg-in9.2%
Simplified9.2%
Taylor expanded in y.im around 0 2.2%
add-sqr-sqrt1.6%
sqrt-unprod42.9%
pow242.9%
*-commutative42.9%
Applied egg-rr42.9%
Final simplification43.8%
(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 (* (atan2 x.im x.re) (* y.re t_1)))
(t_3 (* t_0 (- t_1))))
(if (<= y.im -1.2e+68)
t_3
(if (<= y.im 8.8e-277)
t_2
(if (<= y.im 6.5e-55)
(pow (pow t_0 3.0) 0.3333333333333333)
(if (<= y.im 7.2e+16)
(* (atan2 x.im x.re) (log (exp y.re)))
(if (<= y.im 3.7e+84) 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 = exp((atan2(x_46_im, x_46_re) * -y_46_im));
double t_2 = atan2(x_46_im, x_46_re) * (y_46_re * t_1);
double t_3 = t_0 * -t_1;
double tmp;
if (y_46_im <= -1.2e+68) {
tmp = t_3;
} else if (y_46_im <= 8.8e-277) {
tmp = t_2;
} else if (y_46_im <= 6.5e-55) {
tmp = pow(pow(t_0, 3.0), 0.3333333333333333);
} else if (y_46_im <= 7.2e+16) {
tmp = atan2(x_46_im, x_46_re) * log(exp(y_46_re));
} else if (y_46_im <= 3.7e+84) {
tmp = 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 = exp((atan2(x_46im, x_46re) * -y_46im))
t_2 = atan2(x_46im, x_46re) * (y_46re * t_1)
t_3 = t_0 * -t_1
if (y_46im <= (-1.2d+68)) then
tmp = t_3
else if (y_46im <= 8.8d-277) then
tmp = t_2
else if (y_46im <= 6.5d-55) then
tmp = (t_0 ** 3.0d0) ** 0.3333333333333333d0
else if (y_46im <= 7.2d+16) then
tmp = atan2(x_46im, x_46re) * log(exp(y_46re))
else if (y_46im <= 3.7d+84) then
tmp = 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 = Math.exp((Math.atan2(x_46_im, x_46_re) * -y_46_im));
double t_2 = Math.atan2(x_46_im, x_46_re) * (y_46_re * t_1);
double t_3 = t_0 * -t_1;
double tmp;
if (y_46_im <= -1.2e+68) {
tmp = t_3;
} else if (y_46_im <= 8.8e-277) {
tmp = t_2;
} else if (y_46_im <= 6.5e-55) {
tmp = Math.pow(Math.pow(t_0, 3.0), 0.3333333333333333);
} else if (y_46_im <= 7.2e+16) {
tmp = Math.atan2(x_46_im, x_46_re) * Math.log(Math.exp(y_46_re));
} else if (y_46_im <= 3.7e+84) {
tmp = 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 = math.exp((math.atan2(x_46_im, x_46_re) * -y_46_im)) t_2 = math.atan2(x_46_im, x_46_re) * (y_46_re * t_1) t_3 = t_0 * -t_1 tmp = 0 if y_46_im <= -1.2e+68: tmp = t_3 elif y_46_im <= 8.8e-277: tmp = t_2 elif y_46_im <= 6.5e-55: tmp = math.pow(math.pow(t_0, 3.0), 0.3333333333333333) elif y_46_im <= 7.2e+16: tmp = math.atan2(x_46_im, x_46_re) * math.log(math.exp(y_46_re)) elif y_46_im <= 3.7e+84: tmp = 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 = exp(Float64(atan(x_46_im, x_46_re) * Float64(-y_46_im))) t_2 = Float64(atan(x_46_im, x_46_re) * Float64(y_46_re * t_1)) t_3 = Float64(t_0 * Float64(-t_1)) tmp = 0.0 if (y_46_im <= -1.2e+68) tmp = t_3; elseif (y_46_im <= 8.8e-277) tmp = t_2; elseif (y_46_im <= 6.5e-55) tmp = (t_0 ^ 3.0) ^ 0.3333333333333333; elseif (y_46_im <= 7.2e+16) tmp = Float64(atan(x_46_im, x_46_re) * log(exp(y_46_re))); elseif (y_46_im <= 3.7e+84) tmp = 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 = exp((atan2(x_46_im, x_46_re) * -y_46_im)); t_2 = atan2(x_46_im, x_46_re) * (y_46_re * t_1); t_3 = t_0 * -t_1; tmp = 0.0; if (y_46_im <= -1.2e+68) tmp = t_3; elseif (y_46_im <= 8.8e-277) tmp = t_2; elseif (y_46_im <= 6.5e-55) tmp = (t_0 ^ 3.0) ^ 0.3333333333333333; elseif (y_46_im <= 7.2e+16) tmp = atan2(x_46_im, x_46_re) * log(exp(y_46_re)); elseif (y_46_im <= 3.7e+84) tmp = 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[Exp[N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * (-y$46$im)), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$2 = N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * N[(y$46$re * t$95$1), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(t$95$0 * (-t$95$1)), $MachinePrecision]}, If[LessEqual[y$46$im, -1.2e+68], t$95$3, If[LessEqual[y$46$im, 8.8e-277], t$95$2, If[LessEqual[y$46$im, 6.5e-55], N[Power[N[Power[t$95$0, 3.0], $MachinePrecision], 0.3333333333333333], $MachinePrecision], If[LessEqual[y$46$im, 7.2e+16], N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * N[Log[N[Exp[y$46$re], $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$im, 3.7e+84], t$95$3, t$95$2]]]]]]]]]
\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 \left(-y.im\right)}\\
t_2 := \tan^{-1}_* \frac{x.im}{x.re} \cdot \left(y.re \cdot t_1\right)\\
t_3 := t_0 \cdot \left(-t_1\right)\\
\mathbf{if}\;y.im \leq -1.2 \cdot 10^{+68}:\\
\;\;\;\;t_3\\
\mathbf{elif}\;y.im \leq 8.8 \cdot 10^{-277}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;y.im \leq 6.5 \cdot 10^{-55}:\\
\;\;\;\;{\left({t_0}^{3}\right)}^{0.3333333333333333}\\
\mathbf{elif}\;y.im \leq 7.2 \cdot 10^{+16}:\\
\;\;\;\;\tan^{-1}_* \frac{x.im}{x.re} \cdot \log \left(e^{y.re}\right)\\
\mathbf{elif}\;y.im \leq 3.7 \cdot 10^{+84}:\\
\;\;\;\;t_3\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
\end{array}
if y.im < -1.20000000000000004e68 or 7.2e16 < y.im < 3.7e84Initial program 34.3%
Taylor expanded in y.im around 0 40.2%
Taylor expanded in y.re around 0 36.0%
*-commutative36.0%
distribute-rgt-neg-in36.0%
Simplified36.0%
add-sqr-sqrt1.9%
sqrt-unprod21.0%
pow221.0%
*-commutative21.0%
Applied egg-rr43.2%
Taylor expanded in y.re around -inf 65.4%
mul-1-neg65.4%
distribute-rgt-neg-in65.4%
Simplified65.4%
if -1.20000000000000004e68 < y.im < 8.79999999999999983e-277 or 3.7e84 < y.im Initial program 42.1%
Taylor expanded in y.im around 0 54.4%
Taylor expanded in y.re around 0 38.2%
*-commutative38.2%
distribute-rgt-neg-in38.2%
Simplified38.2%
Taylor expanded in y.re around 0 39.0%
associate-*r*39.0%
neg-mul-139.0%
*-commutative39.0%
distribute-rgt-neg-in39.0%
Simplified39.0%
if 8.79999999999999983e-277 < y.im < 6.50000000000000006e-55Initial program 47.9%
Taylor expanded in y.im around 0 51.5%
Taylor expanded in y.re around 0 18.7%
*-commutative18.7%
distribute-rgt-neg-in18.7%
Simplified18.7%
Taylor expanded in y.im around 0 18.7%
add-cbrt-cube26.4%
pow1/328.8%
pow328.8%
*-commutative28.8%
Applied egg-rr28.8%
if 6.50000000000000006e-55 < y.im < 7.2e16Initial program 37.4%
Taylor expanded in y.im around 0 31.8%
Taylor expanded in y.re around 0 21.2%
*-commutative21.2%
distribute-rgt-neg-in21.2%
Simplified21.2%
Taylor expanded in y.im around 0 9.0%
add-log-exp32.6%
*-commutative32.6%
*-commutative32.6%
exp-prod32.6%
Applied egg-rr32.6%
log-pow26.3%
Simplified26.3%
Final simplification43.3%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(if (<= y.re 5.1e+37)
(* (atan2 x.im x.re) (* y.re (exp (* (atan2 x.im x.re) (- y.im)))))
(if (<= y.re 3.3e+184)
(* (atan2 x.im x.re) (log (exp y.re)))
(sqrt (pow (* y.re (atan2 x.im x.re)) 2.0)))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double tmp;
if (y_46_re <= 5.1e+37) {
tmp = atan2(x_46_im, x_46_re) * (y_46_re * exp((atan2(x_46_im, x_46_re) * -y_46_im)));
} else if (y_46_re <= 3.3e+184) {
tmp = atan2(x_46_im, x_46_re) * log(exp(y_46_re));
} else {
tmp = sqrt(pow((y_46_re * atan2(x_46_im, x_46_re)), 2.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) :: tmp
if (y_46re <= 5.1d+37) then
tmp = atan2(x_46im, x_46re) * (y_46re * exp((atan2(x_46im, x_46re) * -y_46im)))
else if (y_46re <= 3.3d+184) then
tmp = atan2(x_46im, x_46re) * log(exp(y_46re))
else
tmp = sqrt(((y_46re * atan2(x_46im, x_46re)) ** 2.0d0))
end if
code = tmp
end function
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double tmp;
if (y_46_re <= 5.1e+37) {
tmp = Math.atan2(x_46_im, x_46_re) * (y_46_re * Math.exp((Math.atan2(x_46_im, x_46_re) * -y_46_im)));
} else if (y_46_re <= 3.3e+184) {
tmp = Math.atan2(x_46_im, x_46_re) * Math.log(Math.exp(y_46_re));
} else {
tmp = Math.sqrt(Math.pow((y_46_re * Math.atan2(x_46_im, x_46_re)), 2.0));
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): tmp = 0 if y_46_re <= 5.1e+37: tmp = math.atan2(x_46_im, x_46_re) * (y_46_re * math.exp((math.atan2(x_46_im, x_46_re) * -y_46_im))) elif y_46_re <= 3.3e+184: tmp = math.atan2(x_46_im, x_46_re) * math.log(math.exp(y_46_re)) else: tmp = math.sqrt(math.pow((y_46_re * math.atan2(x_46_im, x_46_re)), 2.0)) return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) tmp = 0.0 if (y_46_re <= 5.1e+37) tmp = Float64(atan(x_46_im, x_46_re) * Float64(y_46_re * exp(Float64(atan(x_46_im, x_46_re) * Float64(-y_46_im))))); elseif (y_46_re <= 3.3e+184) tmp = Float64(atan(x_46_im, x_46_re) * log(exp(y_46_re))); else tmp = sqrt((Float64(y_46_re * atan(x_46_im, x_46_re)) ^ 2.0)); end return tmp end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im) tmp = 0.0; if (y_46_re <= 5.1e+37) tmp = atan2(x_46_im, x_46_re) * (y_46_re * exp((atan2(x_46_im, x_46_re) * -y_46_im))); elseif (y_46_re <= 3.3e+184) tmp = atan2(x_46_im, x_46_re) * log(exp(y_46_re)); else tmp = sqrt(((y_46_re * atan2(x_46_im, x_46_re)) ^ 2.0)); end tmp_2 = tmp; end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := If[LessEqual[y$46$re, 5.1e+37], N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * N[(y$46$re * N[Exp[N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * (-y$46$im)), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$re, 3.3e+184], N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * N[Log[N[Exp[y$46$re], $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[Sqrt[N[Power[N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]], $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y.re \leq 5.1 \cdot 10^{+37}:\\
\;\;\;\;\tan^{-1}_* \frac{x.im}{x.re} \cdot \left(y.re \cdot e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot \left(-y.im\right)}\right)\\
\mathbf{elif}\;y.re \leq 3.3 \cdot 10^{+184}:\\
\;\;\;\;\tan^{-1}_* \frac{x.im}{x.re} \cdot \log \left(e^{y.re}\right)\\
\mathbf{else}:\\
\;\;\;\;\sqrt{{\left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)}^{2}}\\
\end{array}
\end{array}
if y.re < 5.10000000000000032e37Initial program 42.2%
Taylor expanded in y.im around 0 45.6%
Taylor expanded in y.re around 0 38.6%
*-commutative38.6%
distribute-rgt-neg-in38.6%
Simplified38.6%
Taylor expanded in y.re around 0 39.1%
associate-*r*39.1%
neg-mul-139.1%
*-commutative39.1%
distribute-rgt-neg-in39.1%
Simplified39.1%
if 5.10000000000000032e37 < y.re < 3.2999999999999998e184Initial program 37.0%
Taylor expanded in y.im around 0 74.1%
Taylor expanded in y.re around 0 12.9%
*-commutative12.9%
distribute-rgt-neg-in12.9%
Simplified12.9%
Taylor expanded in y.im around 0 2.5%
add-log-exp34.0%
*-commutative34.0%
*-commutative34.0%
exp-prod48.6%
Applied egg-rr48.6%
log-pow48.5%
Simplified48.5%
if 3.2999999999999998e184 < y.re Initial program 34.6%
Taylor expanded in y.im around 0 46.2%
Taylor expanded in y.re around 0 9.2%
*-commutative9.2%
distribute-rgt-neg-in9.2%
Simplified9.2%
Taylor expanded in y.im around 0 2.2%
add-sqr-sqrt1.6%
sqrt-unprod42.9%
pow242.9%
*-commutative42.9%
Applied egg-rr42.9%
Final simplification40.5%
(FPCore (x.re x.im y.re y.im) :precision binary64 (if (or (<= y.im -3.3e-148) (not (<= y.im 4.2e-191))) (* (atan2 x.im x.re) (log (exp y.re))) (* y.re (atan2 x.im x.re))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double tmp;
if ((y_46_im <= -3.3e-148) || !(y_46_im <= 4.2e-191)) {
tmp = atan2(x_46_im, x_46_re) * log(exp(y_46_re));
} else {
tmp = y_46_re * atan2(x_46_im, x_46_re);
}
return tmp;
}
real(8) function code(x_46re, x_46im, y_46re, y_46im)
real(8), intent (in) :: x_46re
real(8), intent (in) :: x_46im
real(8), intent (in) :: y_46re
real(8), intent (in) :: y_46im
real(8) :: tmp
if ((y_46im <= (-3.3d-148)) .or. (.not. (y_46im <= 4.2d-191))) then
tmp = atan2(x_46im, x_46re) * log(exp(y_46re))
else
tmp = y_46re * atan2(x_46im, x_46re)
end if
code = tmp
end function
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double tmp;
if ((y_46_im <= -3.3e-148) || !(y_46_im <= 4.2e-191)) {
tmp = Math.atan2(x_46_im, x_46_re) * Math.log(Math.exp(y_46_re));
} else {
tmp = y_46_re * Math.atan2(x_46_im, x_46_re);
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): tmp = 0 if (y_46_im <= -3.3e-148) or not (y_46_im <= 4.2e-191): tmp = math.atan2(x_46_im, x_46_re) * math.log(math.exp(y_46_re)) else: tmp = y_46_re * math.atan2(x_46_im, x_46_re) return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) tmp = 0.0 if ((y_46_im <= -3.3e-148) || !(y_46_im <= 4.2e-191)) tmp = Float64(atan(x_46_im, x_46_re) * log(exp(y_46_re))); else tmp = Float64(y_46_re * atan(x_46_im, x_46_re)); end return tmp end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im) tmp = 0.0; if ((y_46_im <= -3.3e-148) || ~((y_46_im <= 4.2e-191))) tmp = atan2(x_46_im, x_46_re) * log(exp(y_46_re)); else tmp = y_46_re * atan2(x_46_im, x_46_re); end tmp_2 = tmp; end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := If[Or[LessEqual[y$46$im, -3.3e-148], N[Not[LessEqual[y$46$im, 4.2e-191]], $MachinePrecision]], N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * N[Log[N[Exp[y$46$re], $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y.im \leq -3.3 \cdot 10^{-148} \lor \neg \left(y.im \leq 4.2 \cdot 10^{-191}\right):\\
\;\;\;\;\tan^{-1}_* \frac{x.im}{x.re} \cdot \log \left(e^{y.re}\right)\\
\mathbf{else}:\\
\;\;\;\;y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
\end{array}
\end{array}
if y.im < -3.29999999999999974e-148 or 4.19999999999999971e-191 < y.im Initial program 40.0%
Taylor expanded in y.im around 0 47.0%
Taylor expanded in y.re around 0 31.6%
*-commutative31.6%
distribute-rgt-neg-in31.6%
Simplified31.6%
Taylor expanded in y.im around 0 6.7%
add-log-exp28.3%
*-commutative28.3%
*-commutative28.3%
exp-prod28.8%
Applied egg-rr28.8%
log-pow27.8%
Simplified27.8%
if -3.29999999999999974e-148 < y.im < 4.19999999999999971e-191Initial program 43.6%
Taylor expanded in y.im around 0 54.3%
Taylor expanded in y.re around 0 37.1%
*-commutative37.1%
distribute-rgt-neg-in37.1%
Simplified37.1%
Taylor expanded in y.im around 0 37.1%
Final simplification29.9%
(FPCore (x.re x.im y.re y.im) :precision binary64 (* (* y.re (atan2 x.im x.re)) (- 1.0 (* (atan2 x.im x.re) y.im))))
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)) * (1.0 - (atan2(x_46_im, x_46_re) * y_46_im));
}
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)) * (1.0d0 - (atan2(x_46im, x_46re) * y_46im))
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)) * (1.0 - (Math.atan2(x_46_im, x_46_re) * y_46_im));
}
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)) * (1.0 - (math.atan2(x_46_im, x_46_re) * y_46_im))
function code(x_46_re, x_46_im, y_46_re, y_46_im) return Float64(Float64(y_46_re * atan(x_46_im, x_46_re)) * Float64(1.0 - Float64(atan(x_46_im, x_46_re) * y_46_im))) 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)) * (1.0 - (atan2(x_46_im, x_46_re) * y_46_im)); end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := N[(N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision] * N[(1.0 - N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$im), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot \left(1 - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im\right)
\end{array}
Initial program 40.8%
Taylor expanded in y.im around 0 48.7%
Taylor expanded in y.re around 0 32.9%
*-commutative32.9%
distribute-rgt-neg-in32.9%
Simplified32.9%
Taylor expanded in y.im around 0 15.9%
neg-mul-115.9%
distribute-rgt-neg-in15.9%
+-commutative15.9%
*-commutative15.9%
distribute-lft-neg-in15.9%
unsub-neg15.9%
Simplified15.9%
Final simplification15.9%
(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 40.8%
Taylor expanded in y.im around 0 48.7%
Taylor expanded in y.re around 0 32.9%
*-commutative32.9%
distribute-rgt-neg-in32.9%
Simplified32.9%
Taylor expanded in y.im around 0 13.7%
Final simplification13.7%
herbie shell --seed 2023174
(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)))))