
(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 21 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 (log (hypot x.re x.im)))
(t_1 (exp (fma t_0 y.re (* (atan2 x.im x.re) (- y.im))))))
(if (<= y.im 5e+160)
(* t_1 (sin (fma t_0 y.im (* y.re (atan2 x.im x.re)))))
(*
t_1
(sin
(pow (pow (cbrt (cbrt (* y.im (log (hypot x.im x.re))))) 3.0) 3.0))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = log(hypot(x_46_re, x_46_im));
double t_1 = exp(fma(t_0, y_46_re, (atan2(x_46_im, x_46_re) * -y_46_im)));
double tmp;
if (y_46_im <= 5e+160) {
tmp = t_1 * sin(fma(t_0, y_46_im, (y_46_re * atan2(x_46_im, x_46_re))));
} else {
tmp = t_1 * sin(pow(pow(cbrt(cbrt((y_46_im * log(hypot(x_46_im, x_46_re))))), 3.0), 3.0));
}
return tmp;
}
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = log(hypot(x_46_re, x_46_im)) t_1 = exp(fma(t_0, y_46_re, Float64(atan(x_46_im, x_46_re) * Float64(-y_46_im)))) tmp = 0.0 if (y_46_im <= 5e+160) tmp = Float64(t_1 * sin(fma(t_0, y_46_im, Float64(y_46_re * atan(x_46_im, x_46_re))))); else tmp = Float64(t_1 * sin(((cbrt(cbrt(Float64(y_46_im * log(hypot(x_46_im, x_46_re))))) ^ 3.0) ^ 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[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision]], $MachinePrecision]}, Block[{t$95$1 = N[Exp[N[(t$95$0 * y$46$re + N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * (-y$46$im)), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[y$46$im, 5e+160], N[(t$95$1 * N[Sin[N[(t$95$0 * y$46$im + N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(t$95$1 * N[Sin[N[Power[N[Power[N[Power[N[Power[N[(y$46$im * N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]), $MachinePrecision], 1/3], $MachinePrecision], 1/3], $MachinePrecision], 3.0], $MachinePrecision], 3.0], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \log \left(\mathsf{hypot}\left(x.re, x.im\right)\right)\\
t_1 := e^{\mathsf{fma}\left(t_0, y.re, \tan^{-1}_* \frac{x.im}{x.re} \cdot \left(-y.im\right)\right)}\\
\mathbf{if}\;y.im \leq 5 \cdot 10^{+160}:\\
\;\;\;\;t_1 \cdot \sin \left(\mathsf{fma}\left(t_0, y.im, y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t_1 \cdot \sin \left({\left({\left(\sqrt[3]{\sqrt[3]{y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)}}\right)}^{3}\right)}^{3}\right)\\
\end{array}
\end{array}
if y.im < 5.0000000000000002e160Initial program 41.8%
cancel-sign-sub-inv41.8%
fma-def41.8%
hypot-def41.8%
distribute-lft-neg-in41.8%
distribute-rgt-neg-out41.8%
fma-def41.8%
hypot-def86.6%
*-commutative86.6%
Simplified86.6%
if 5.0000000000000002e160 < y.im Initial program 37.4%
cancel-sign-sub-inv37.4%
fma-def37.4%
hypot-def37.4%
distribute-lft-neg-in37.4%
distribute-rgt-neg-out37.4%
fma-def37.4%
hypot-def56.3%
*-commutative56.3%
Simplified56.3%
add-cube-cbrt58.5%
pow353.2%
fma-udef53.2%
*-commutative53.2%
*-commutative53.2%
fma-def53.2%
Applied egg-rr53.2%
Taylor expanded in y.re around 0 15.8%
unpow1/334.7%
+-commutative34.7%
unpow234.7%
unpow234.7%
hypot-def55.8%
hypot-def34.7%
unpow234.7%
unpow234.7%
+-commutative34.7%
unpow234.7%
unpow234.7%
hypot-def55.8%
Simplified55.8%
add-cube-cbrt69.4%
pow372.0%
Applied egg-rr72.0%
Final simplification84.4%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (* y.re (atan2 x.im x.re)))
(t_1 (log (hypot x.re x.im)))
(t_2 (exp (fma t_1 y.re (* (atan2 x.im x.re) (- y.im))))))
(if (<= x.re -6.2e-39)
(* t_2 (sin (pow (cbrt (fma y.im t_1 t_0)) 3.0)))
(* t_2 (sin (fma t_1 y.im t_0))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = y_46_re * atan2(x_46_im, x_46_re);
double t_1 = log(hypot(x_46_re, x_46_im));
double t_2 = exp(fma(t_1, y_46_re, (atan2(x_46_im, x_46_re) * -y_46_im)));
double tmp;
if (x_46_re <= -6.2e-39) {
tmp = t_2 * sin(pow(cbrt(fma(y_46_im, t_1, t_0)), 3.0));
} else {
tmp = t_2 * sin(fma(t_1, y_46_im, t_0));
}
return tmp;
}
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = Float64(y_46_re * atan(x_46_im, x_46_re)) t_1 = log(hypot(x_46_re, x_46_im)) t_2 = exp(fma(t_1, y_46_re, Float64(atan(x_46_im, x_46_re) * Float64(-y_46_im)))) tmp = 0.0 if (x_46_re <= -6.2e-39) tmp = Float64(t_2 * sin((cbrt(fma(y_46_im, t_1, t_0)) ^ 3.0))); else tmp = Float64(t_2 * sin(fma(t_1, y_46_im, t_0))); end return tmp end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[Log[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision]], $MachinePrecision]}, Block[{t$95$2 = N[Exp[N[(t$95$1 * y$46$re + N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * (-y$46$im)), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[x$46$re, -6.2e-39], N[(t$95$2 * N[Sin[N[Power[N[Power[N[(y$46$im * t$95$1 + t$95$0), $MachinePrecision], 1/3], $MachinePrecision], 3.0], $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(t$95$2 * N[Sin[N[(t$95$1 * y$46$im + t$95$0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
t_1 := \log \left(\mathsf{hypot}\left(x.re, x.im\right)\right)\\
t_2 := e^{\mathsf{fma}\left(t_1, y.re, \tan^{-1}_* \frac{x.im}{x.re} \cdot \left(-y.im\right)\right)}\\
\mathbf{if}\;x.re \leq -6.2 \cdot 10^{-39}:\\
\;\;\;\;t_2 \cdot \sin \left({\left(\sqrt[3]{\mathsf{fma}\left(y.im, t_1, t_0\right)}\right)}^{3}\right)\\
\mathbf{else}:\\
\;\;\;\;t_2 \cdot \sin \left(\mathsf{fma}\left(t_1, y.im, t_0\right)\right)\\
\end{array}
\end{array}
if x.re < -6.1999999999999994e-39Initial program 37.2%
cancel-sign-sub-inv37.2%
fma-def37.2%
hypot-def37.2%
distribute-lft-neg-in37.2%
distribute-rgt-neg-out37.2%
fma-def37.2%
hypot-def79.3%
*-commutative79.3%
Simplified79.3%
add-cube-cbrt85.1%
pow385.1%
fma-udef85.1%
*-commutative85.1%
*-commutative85.1%
fma-def85.1%
Applied egg-rr85.1%
if -6.1999999999999994e-39 < x.re Initial program 42.9%
cancel-sign-sub-inv42.9%
fma-def42.9%
hypot-def42.9%
distribute-lft-neg-in42.9%
distribute-rgt-neg-out42.9%
fma-def42.9%
hypot-def83.3%
*-commutative83.3%
Simplified83.3%
Final simplification83.8%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (* y.im (log (hypot x.im x.re))))
(t_1 (sin t_0))
(t_2 (log (hypot x.re x.im)))
(t_3 (* y.re (atan2 x.im x.re)))
(t_4 (pow (hypot x.re x.im) y.re)))
(if (<= y.re -3.4)
(* (exp (fma t_2 y.re (* (atan2 x.im x.re) (- y.im)))) t_1)
(if (<= y.re 0.49)
(* (sin (fma t_2 y.im t_3)) (/ t_4 (pow (exp y.im) (atan2 x.im x.re))))
(if (<= y.re 9.8e+144)
(* t_1 t_4)
(*
(exp
(-
(* y.re (log (sqrt (+ (* x.re x.re) (* x.im x.im)))))
(* (atan2 x.im x.re) y.im)))
(sin (+ t_3 (fabs t_0)))))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = y_46_im * log(hypot(x_46_im, x_46_re));
double t_1 = sin(t_0);
double t_2 = log(hypot(x_46_re, x_46_im));
double t_3 = y_46_re * atan2(x_46_im, x_46_re);
double t_4 = pow(hypot(x_46_re, x_46_im), y_46_re);
double tmp;
if (y_46_re <= -3.4) {
tmp = exp(fma(t_2, y_46_re, (atan2(x_46_im, x_46_re) * -y_46_im))) * t_1;
} else if (y_46_re <= 0.49) {
tmp = sin(fma(t_2, y_46_im, t_3)) * (t_4 / pow(exp(y_46_im), atan2(x_46_im, x_46_re)));
} else if (y_46_re <= 9.8e+144) {
tmp = t_1 * t_4;
} else {
tmp = 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))) * sin((t_3 + fabs(t_0)));
}
return tmp;
}
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = Float64(y_46_im * log(hypot(x_46_im, x_46_re))) t_1 = sin(t_0) t_2 = log(hypot(x_46_re, x_46_im)) t_3 = Float64(y_46_re * atan(x_46_im, x_46_re)) t_4 = hypot(x_46_re, x_46_im) ^ y_46_re tmp = 0.0 if (y_46_re <= -3.4) tmp = Float64(exp(fma(t_2, y_46_re, Float64(atan(x_46_im, x_46_re) * Float64(-y_46_im)))) * t_1); elseif (y_46_re <= 0.49) tmp = Float64(sin(fma(t_2, y_46_im, t_3)) * Float64(t_4 / (exp(y_46_im) ^ atan(x_46_im, x_46_re)))); elseif (y_46_re <= 9.8e+144) tmp = Float64(t_1 * t_4); 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))))) - Float64(atan(x_46_im, x_46_re) * y_46_im))) * sin(Float64(t_3 + abs(t_0)))); end return tmp end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[(y$46$im * N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[Sin[t$95$0], $MachinePrecision]}, Block[{t$95$2 = N[Log[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision]], $MachinePrecision]}, Block[{t$95$3 = N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[Power[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision], y$46$re], $MachinePrecision]}, If[LessEqual[y$46$re, -3.4], N[(N[Exp[N[(t$95$2 * y$46$re + N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * (-y$46$im)), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * t$95$1), $MachinePrecision], If[LessEqual[y$46$re, 0.49], N[(N[Sin[N[(t$95$2 * y$46$im + t$95$3), $MachinePrecision]], $MachinePrecision] * N[(t$95$4 / N[Power[N[Exp[y$46$im], $MachinePrecision], N[ArcTan[x$46$im / x$46$re], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$re, 9.8e+144], N[(t$95$1 * t$95$4), $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] - N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Sin[N[(t$95$3 + N[Abs[t$95$0], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\\
t_1 := \sin t_0\\
t_2 := \log \left(\mathsf{hypot}\left(x.re, x.im\right)\right)\\
t_3 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
t_4 := {\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re}\\
\mathbf{if}\;y.re \leq -3.4:\\
\;\;\;\;e^{\mathsf{fma}\left(t_2, y.re, \tan^{-1}_* \frac{x.im}{x.re} \cdot \left(-y.im\right)\right)} \cdot t_1\\
\mathbf{elif}\;y.re \leq 0.49:\\
\;\;\;\;\sin \left(\mathsf{fma}\left(t_2, y.im, t_3\right)\right) \cdot \frac{t_4}{{\left(e^{y.im}\right)}^{\tan^{-1}_* \frac{x.im}{x.re}}}\\
\mathbf{elif}\;y.re \leq 9.8 \cdot 10^{+144}:\\
\;\;\;\;t_1 \cdot t_4\\
\mathbf{else}:\\
\;\;\;\;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} \cdot \sin \left(t_3 + \left|t_0\right|\right)\\
\end{array}
\end{array}
if y.re < -3.39999999999999991Initial program 46.7%
cancel-sign-sub-inv46.7%
fma-def46.7%
hypot-def46.7%
distribute-lft-neg-in46.7%
distribute-rgt-neg-out46.7%
fma-def46.7%
hypot-def88.3%
*-commutative88.3%
Simplified88.3%
add-cube-cbrt93.3%
pow393.3%
fma-udef93.3%
*-commutative93.3%
*-commutative93.3%
fma-def93.3%
Applied egg-rr93.3%
Taylor expanded in y.re around 0 50.0%
pow-base-150.0%
*-lft-identity50.0%
unpow250.0%
unpow250.0%
hypot-def91.7%
Simplified91.7%
if -3.39999999999999991 < y.re < 0.48999999999999999Initial program 42.9%
exp-diff42.9%
exp-to-pow42.9%
hypot-def42.9%
*-commutative42.9%
exp-prod42.7%
fma-def42.7%
hypot-def83.1%
*-commutative83.1%
Simplified83.1%
if 0.48999999999999999 < y.re < 9.8000000000000001e144Initial program 33.3%
exp-diff30.6%
exp-to-pow30.6%
hypot-def30.6%
*-commutative30.6%
exp-prod30.6%
fma-def30.6%
hypot-def61.1%
*-commutative61.1%
Simplified61.1%
Taylor expanded in y.im around 0 66.7%
Taylor expanded in y.re around 0 39.0%
unpow239.0%
unpow239.0%
hypot-def77.8%
Simplified77.8%
if 9.8000000000000001e144 < y.re Initial program 33.3%
add-sqr-sqrt18.2%
sqrt-unprod27.3%
pow227.3%
*-commutative27.3%
hypot-udef66.7%
Applied egg-rr66.7%
unpow266.7%
rem-sqrt-square81.9%
hypot-def33.3%
unpow233.3%
unpow233.3%
+-commutative33.3%
unpow233.3%
unpow233.3%
hypot-def81.9%
Simplified81.9%
Final simplification84.2%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (sin (* y.im (log (hypot x.im x.re)))))
(t_1 (log (hypot x.re x.im)))
(t_2 (exp (fma t_1 y.re (* (atan2 x.im x.re) (- y.im))))))
(if (<= y.im -1.85e+18)
(* t_2 t_0)
(if (<= y.im 8.8e-8)
(*
(sin (fma t_1 y.im (* y.re (atan2 x.im x.re))))
(/ (pow (hypot x.re x.im) y.re) (+ (* (atan2 x.im x.re) y.im) 1.0)))
(* t_2 (pow (cbrt t_0) 3.0))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = sin((y_46_im * log(hypot(x_46_im, x_46_re))));
double t_1 = log(hypot(x_46_re, x_46_im));
double t_2 = exp(fma(t_1, y_46_re, (atan2(x_46_im, x_46_re) * -y_46_im)));
double tmp;
if (y_46_im <= -1.85e+18) {
tmp = t_2 * t_0;
} else if (y_46_im <= 8.8e-8) {
tmp = sin(fma(t_1, y_46_im, (y_46_re * atan2(x_46_im, x_46_re)))) * (pow(hypot(x_46_re, x_46_im), y_46_re) / ((atan2(x_46_im, x_46_re) * y_46_im) + 1.0));
} else {
tmp = t_2 * pow(cbrt(t_0), 3.0);
}
return tmp;
}
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = sin(Float64(y_46_im * log(hypot(x_46_im, x_46_re)))) t_1 = log(hypot(x_46_re, x_46_im)) t_2 = exp(fma(t_1, y_46_re, Float64(atan(x_46_im, x_46_re) * Float64(-y_46_im)))) tmp = 0.0 if (y_46_im <= -1.85e+18) tmp = Float64(t_2 * t_0); elseif (y_46_im <= 8.8e-8) tmp = Float64(sin(fma(t_1, y_46_im, Float64(y_46_re * atan(x_46_im, x_46_re)))) * Float64((hypot(x_46_re, x_46_im) ^ y_46_re) / Float64(Float64(atan(x_46_im, x_46_re) * y_46_im) + 1.0))); else tmp = Float64(t_2 * (cbrt(t_0) ^ 3.0)); end return tmp end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[Sin[N[(y$46$im * N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $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[Exp[N[(t$95$1 * y$46$re + N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * (-y$46$im)), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[y$46$im, -1.85e+18], N[(t$95$2 * t$95$0), $MachinePrecision], If[LessEqual[y$46$im, 8.8e-8], N[(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] * N[(N[Power[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision], y$46$re], $MachinePrecision] / N[(N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$im), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t$95$2 * N[Power[N[Power[t$95$0, 1/3], $MachinePrecision], 3.0], $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \sin \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right)\\
t_1 := \log \left(\mathsf{hypot}\left(x.re, x.im\right)\right)\\
t_2 := e^{\mathsf{fma}\left(t_1, y.re, \tan^{-1}_* \frac{x.im}{x.re} \cdot \left(-y.im\right)\right)}\\
\mathbf{if}\;y.im \leq -1.85 \cdot 10^{+18}:\\
\;\;\;\;t_2 \cdot t_0\\
\mathbf{elif}\;y.im \leq 8.8 \cdot 10^{-8}:\\
\;\;\;\;\sin \left(\mathsf{fma}\left(t_1, y.im, y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right) \cdot \frac{{\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re}}{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im + 1}\\
\mathbf{else}:\\
\;\;\;\;t_2 \cdot {\left(\sqrt[3]{t_0}\right)}^{3}\\
\end{array}
\end{array}
if y.im < -1.85e18Initial program 43.6%
cancel-sign-sub-inv43.6%
fma-def43.6%
hypot-def43.6%
distribute-lft-neg-in43.6%
distribute-rgt-neg-out43.6%
fma-def43.6%
hypot-def79.8%
*-commutative79.8%
Simplified79.8%
add-cube-cbrt77.8%
pow379.7%
fma-udef79.7%
*-commutative79.7%
*-commutative79.7%
fma-def79.7%
Applied egg-rr79.7%
Taylor expanded in y.re around 0 43.6%
pow-base-143.6%
*-lft-identity43.6%
unpow243.6%
unpow243.6%
hypot-def79.8%
Simplified79.8%
if -1.85e18 < y.im < 8.7999999999999994e-8Initial program 44.4%
exp-diff44.4%
exp-to-pow44.4%
hypot-def44.4%
*-commutative44.4%
exp-prod44.4%
fma-def44.4%
hypot-def91.1%
*-commutative91.1%
Simplified91.1%
Taylor expanded in y.im around 0 91.9%
if 8.7999999999999994e-8 < y.im Initial program 33.0%
cancel-sign-sub-inv33.0%
fma-def33.0%
hypot-def33.0%
distribute-lft-neg-in33.0%
distribute-rgt-neg-out33.0%
fma-def33.0%
hypot-def65.5%
*-commutative65.5%
Simplified65.5%
add-cube-cbrt66.5%
pow359.1%
fma-udef59.1%
*-commutative59.1%
*-commutative59.1%
fma-def59.1%
Applied egg-rr59.1%
rem-cube-cbrt65.5%
add-cube-cbrt65.5%
pow365.5%
Applied egg-rr65.5%
Taylor expanded in y.re around 0 33.0%
+-commutative33.0%
unpow233.0%
unpow233.0%
hypot-def67.0%
hypot-def33.0%
unpow233.0%
unpow233.0%
+-commutative33.0%
unpow233.0%
unpow233.0%
hypot-def67.0%
Simplified67.0%
Final simplification82.8%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (* y.re (atan2 x.im x.re))) (t_1 (log (hypot x.re x.im))))
(if (<= y.im 5.4e+170)
(*
(exp (fma t_1 y.re (* (atan2 x.im x.re) (- y.im))))
(sin (fma t_1 y.im t_0)))
(*
(exp
(-
(* y.re (log (sqrt (+ (* x.re x.re) (* x.im x.im)))))
(* (atan2 x.im x.re) y.im)))
(fabs (sin t_0))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = y_46_re * atan2(x_46_im, x_46_re);
double t_1 = log(hypot(x_46_re, x_46_im));
double tmp;
if (y_46_im <= 5.4e+170) {
tmp = exp(fma(t_1, y_46_re, (atan2(x_46_im, x_46_re) * -y_46_im))) * sin(fma(t_1, y_46_im, t_0));
} else {
tmp = 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))) * fabs(sin(t_0));
}
return tmp;
}
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = Float64(y_46_re * atan(x_46_im, x_46_re)) t_1 = log(hypot(x_46_re, x_46_im)) tmp = 0.0 if (y_46_im <= 5.4e+170) tmp = Float64(exp(fma(t_1, y_46_re, Float64(atan(x_46_im, x_46_re) * Float64(-y_46_im)))) * sin(fma(t_1, y_46_im, t_0))); 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))))) - Float64(atan(x_46_im, x_46_re) * y_46_im))) * abs(sin(t_0))); end return tmp end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[Log[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision]], $MachinePrecision]}, If[LessEqual[y$46$im, 5.4e+170], N[(N[Exp[N[(t$95$1 * y$46$re + N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * (-y$46$im)), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Sin[N[(t$95$1 * y$46$im + t$95$0), $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] - N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Abs[N[Sin[t$95$0], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
t_1 := \log \left(\mathsf{hypot}\left(x.re, x.im\right)\right)\\
\mathbf{if}\;y.im \leq 5.4 \cdot 10^{+170}:\\
\;\;\;\;e^{\mathsf{fma}\left(t_1, y.re, \tan^{-1}_* \frac{x.im}{x.re} \cdot \left(-y.im\right)\right)} \cdot \sin \left(\mathsf{fma}\left(t_1, y.im, t_0\right)\right)\\
\mathbf{else}:\\
\;\;\;\;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} \cdot \left|\sin t_0\right|\\
\end{array}
\end{array}
if y.im < 5.4000000000000005e170Initial program 41.5%
cancel-sign-sub-inv41.5%
fma-def41.5%
hypot-def41.5%
distribute-lft-neg-in41.5%
distribute-rgt-neg-out41.5%
fma-def41.5%
hypot-def86.7%
*-commutative86.7%
Simplified86.7%
if 5.4000000000000005e170 < y.im Initial program 39.4%
Taylor expanded in y.im around 0 47.7%
add-sqr-sqrt25.3%
sqrt-unprod58.7%
pow258.7%
*-commutative58.7%
Applied egg-rr58.7%
*-commutative58.7%
unpow258.7%
rem-sqrt-square67.1%
Simplified67.1%
Final simplification83.9%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (log (hypot x.re x.im))))
(if (or (<= y.im -1.8e+18) (not (<= y.im 1.1e-93)))
(*
(exp (fma t_0 y.re (* (atan2 x.im x.re) (- y.im))))
(sin (* y.im (log (hypot x.im x.re)))))
(*
(sin (fma t_0 y.im (* y.re (atan2 x.im x.re))))
(/ (pow (hypot x.re x.im) y.re) (+ (* (atan2 x.im x.re) y.im) 1.0))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = log(hypot(x_46_re, x_46_im));
double tmp;
if ((y_46_im <= -1.8e+18) || !(y_46_im <= 1.1e-93)) {
tmp = exp(fma(t_0, y_46_re, (atan2(x_46_im, x_46_re) * -y_46_im))) * sin((y_46_im * log(hypot(x_46_im, x_46_re))));
} else {
tmp = sin(fma(t_0, y_46_im, (y_46_re * atan2(x_46_im, x_46_re)))) * (pow(hypot(x_46_re, x_46_im), y_46_re) / ((atan2(x_46_im, x_46_re) * y_46_im) + 1.0));
}
return tmp;
}
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = log(hypot(x_46_re, x_46_im)) tmp = 0.0 if ((y_46_im <= -1.8e+18) || !(y_46_im <= 1.1e-93)) tmp = Float64(exp(fma(t_0, y_46_re, Float64(atan(x_46_im, x_46_re) * Float64(-y_46_im)))) * sin(Float64(y_46_im * log(hypot(x_46_im, x_46_re))))); else tmp = Float64(sin(fma(t_0, y_46_im, Float64(y_46_re * atan(x_46_im, x_46_re)))) * Float64((hypot(x_46_re, x_46_im) ^ y_46_re) / Float64(Float64(atan(x_46_im, x_46_re) * y_46_im) + 1.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[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision]], $MachinePrecision]}, If[Or[LessEqual[y$46$im, -1.8e+18], N[Not[LessEqual[y$46$im, 1.1e-93]], $MachinePrecision]], N[(N[Exp[N[(t$95$0 * y$46$re + N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * (-y$46$im)), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Sin[N[(y$46$im * N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(N[Sin[N[(t$95$0 * y$46$im + N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(N[Power[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision], y$46$re], $MachinePrecision] / N[(N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$im), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \log \left(\mathsf{hypot}\left(x.re, x.im\right)\right)\\
\mathbf{if}\;y.im \leq -1.8 \cdot 10^{+18} \lor \neg \left(y.im \leq 1.1 \cdot 10^{-93}\right):\\
\;\;\;\;e^{\mathsf{fma}\left(t_0, y.re, \tan^{-1}_* \frac{x.im}{x.re} \cdot \left(-y.im\right)\right)} \cdot \sin \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\sin \left(\mathsf{fma}\left(t_0, y.im, y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right) \cdot \frac{{\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re}}{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im + 1}\\
\end{array}
\end{array}
if y.im < -1.8e18 or 1.09999999999999998e-93 < y.im Initial program 38.4%
cancel-sign-sub-inv38.4%
fma-def38.4%
hypot-def38.4%
distribute-lft-neg-in38.4%
distribute-rgt-neg-out38.4%
fma-def38.4%
hypot-def73.6%
*-commutative73.6%
Simplified73.6%
add-cube-cbrt74.0%
pow371.0%
fma-udef71.0%
*-commutative71.0%
*-commutative71.0%
fma-def71.0%
Applied egg-rr71.0%
Taylor expanded in y.re around 0 38.4%
pow-base-138.4%
*-lft-identity38.4%
unpow238.4%
unpow238.4%
hypot-def74.4%
Simplified74.4%
if -1.8e18 < y.im < 1.09999999999999998e-93Initial program 44.2%
exp-diff44.2%
exp-to-pow44.2%
hypot-def44.2%
*-commutative44.2%
exp-prod44.2%
fma-def44.2%
hypot-def91.0%
*-commutative91.0%
Simplified91.0%
Taylor expanded in y.im around 0 91.8%
Final simplification82.8%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (log (hypot x.re x.im))))
(if (or (<= y.im -4.4e-16) (not (<= y.im 4.5e-93)))
(*
(exp (fma t_0 y.re (* (atan2 x.im x.re) (- y.im))))
(sin (* y.im (log (hypot x.im x.re)))))
(*
(sin (fma t_0 y.im (* y.re (atan2 x.im x.re))))
(pow (hypot x.re x.im) y.re)))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = log(hypot(x_46_re, x_46_im));
double tmp;
if ((y_46_im <= -4.4e-16) || !(y_46_im <= 4.5e-93)) {
tmp = exp(fma(t_0, y_46_re, (atan2(x_46_im, x_46_re) * -y_46_im))) * sin((y_46_im * log(hypot(x_46_im, x_46_re))));
} else {
tmp = sin(fma(t_0, y_46_im, (y_46_re * atan2(x_46_im, x_46_re)))) * pow(hypot(x_46_re, x_46_im), y_46_re);
}
return tmp;
}
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = log(hypot(x_46_re, x_46_im)) tmp = 0.0 if ((y_46_im <= -4.4e-16) || !(y_46_im <= 4.5e-93)) tmp = Float64(exp(fma(t_0, y_46_re, Float64(atan(x_46_im, x_46_re) * Float64(-y_46_im)))) * sin(Float64(y_46_im * log(hypot(x_46_im, x_46_re))))); else tmp = Float64(sin(fma(t_0, y_46_im, Float64(y_46_re * atan(x_46_im, x_46_re)))) * (hypot(x_46_re, x_46_im) ^ y_46_re)); end return tmp end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[Log[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision]], $MachinePrecision]}, If[Or[LessEqual[y$46$im, -4.4e-16], N[Not[LessEqual[y$46$im, 4.5e-93]], $MachinePrecision]], N[(N[Exp[N[(t$95$0 * y$46$re + N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * (-y$46$im)), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Sin[N[(y$46$im * N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(N[Sin[N[(t$95$0 * y$46$im + N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Power[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision], y$46$re], $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \log \left(\mathsf{hypot}\left(x.re, x.im\right)\right)\\
\mathbf{if}\;y.im \leq -4.4 \cdot 10^{-16} \lor \neg \left(y.im \leq 4.5 \cdot 10^{-93}\right):\\
\;\;\;\;e^{\mathsf{fma}\left(t_0, y.re, \tan^{-1}_* \frac{x.im}{x.re} \cdot \left(-y.im\right)\right)} \cdot \sin \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\sin \left(\mathsf{fma}\left(t_0, y.im, y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right) \cdot {\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re}\\
\end{array}
\end{array}
if y.im < -4.40000000000000001e-16 or 4.5000000000000002e-93 < y.im Initial program 37.7%
cancel-sign-sub-inv37.7%
fma-def37.7%
hypot-def37.7%
distribute-lft-neg-in37.7%
distribute-rgt-neg-out37.7%
fma-def37.7%
hypot-def73.2%
*-commutative73.2%
Simplified73.2%
add-cube-cbrt74.2%
pow371.2%
fma-udef71.2%
*-commutative71.2%
*-commutative71.2%
fma-def71.2%
Applied egg-rr71.2%
Taylor expanded in y.re around 0 37.7%
pow-base-137.7%
*-lft-identity37.7%
unpow237.7%
unpow237.7%
hypot-def74.6%
Simplified74.6%
if -4.40000000000000001e-16 < y.im < 4.5000000000000002e-93Initial program 45.2%
exp-diff45.2%
exp-to-pow45.2%
hypot-def45.2%
*-commutative45.2%
exp-prod45.2%
fma-def45.2%
hypot-def92.3%
*-commutative92.3%
Simplified92.3%
Taylor expanded in y.im around 0 92.3%
Final simplification82.8%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0
(exp
(-
(* y.re (log (sqrt (+ (* x.re x.re) (* x.im x.im)))))
(* (atan2 x.im x.re) y.im))))
(t_1 (* y.re (atan2 x.im x.re)))
(t_2 (sin t_1)))
(if (<= y.im -2.3e+190)
(* y.re (* (atan2 x.im x.re) (exp (* (atan2 x.im x.re) (- y.im)))))
(if (<= y.im -2.4e+30)
(* t_0 t_2)
(if (<= y.im -8.2e-6)
(* t_0 (sin (* y.im (log (hypot x.im x.re)))))
(if (<= y.im 220000000.0)
(*
(sin (fma (log (hypot x.re x.im)) y.im t_1))
(pow (hypot x.re x.im) y.re))
(* t_0 (fabs t_2))))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double 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)));
double t_1 = y_46_re * atan2(x_46_im, x_46_re);
double t_2 = sin(t_1);
double tmp;
if (y_46_im <= -2.3e+190) {
tmp = y_46_re * (atan2(x_46_im, x_46_re) * exp((atan2(x_46_im, x_46_re) * -y_46_im)));
} else if (y_46_im <= -2.4e+30) {
tmp = t_0 * t_2;
} else if (y_46_im <= -8.2e-6) {
tmp = t_0 * sin((y_46_im * log(hypot(x_46_im, x_46_re))));
} else if (y_46_im <= 220000000.0) {
tmp = sin(fma(log(hypot(x_46_re, x_46_im)), y_46_im, t_1)) * pow(hypot(x_46_re, x_46_im), y_46_re);
} else {
tmp = t_0 * fabs(t_2);
}
return tmp;
}
function code(x_46_re, x_46_im, y_46_re, y_46_im) 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))) t_1 = Float64(y_46_re * atan(x_46_im, x_46_re)) t_2 = sin(t_1) tmp = 0.0 if (y_46_im <= -2.3e+190) tmp = Float64(y_46_re * Float64(atan(x_46_im, x_46_re) * exp(Float64(atan(x_46_im, x_46_re) * Float64(-y_46_im))))); elseif (y_46_im <= -2.4e+30) tmp = Float64(t_0 * t_2); elseif (y_46_im <= -8.2e-6) tmp = Float64(t_0 * sin(Float64(y_46_im * log(hypot(x_46_im, x_46_re))))); elseif (y_46_im <= 220000000.0) tmp = Float64(sin(fma(log(hypot(x_46_re, x_46_im)), y_46_im, t_1)) * (hypot(x_46_re, x_46_im) ^ y_46_re)); else tmp = Float64(t_0 * abs(t_2)); 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[(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]}, Block[{t$95$1 = N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[Sin[t$95$1], $MachinePrecision]}, If[LessEqual[y$46$im, -2.3e+190], N[(y$46$re * N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * N[Exp[N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * (-y$46$im)), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$im, -2.4e+30], N[(t$95$0 * t$95$2), $MachinePrecision], If[LessEqual[y$46$im, -8.2e-6], 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, 220000000.0], 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] * N[Power[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision], y$46$re], $MachinePrecision]), $MachinePrecision], N[(t$95$0 * N[Abs[t$95$2], $MachinePrecision]), $MachinePrecision]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := 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}\\
t_1 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
t_2 := \sin t_1\\
\mathbf{if}\;y.im \leq -2.3 \cdot 10^{+190}:\\
\;\;\;\;y.re \cdot \left(\tan^{-1}_* \frac{x.im}{x.re} \cdot e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot \left(-y.im\right)}\right)\\
\mathbf{elif}\;y.im \leq -2.4 \cdot 10^{+30}:\\
\;\;\;\;t_0 \cdot t_2\\
\mathbf{elif}\;y.im \leq -8.2 \cdot 10^{-6}:\\
\;\;\;\;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 220000000:\\
\;\;\;\;\sin \left(\mathsf{fma}\left(\log \left(\mathsf{hypot}\left(x.re, x.im\right)\right), y.im, t_1\right)\right) \cdot {\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re}\\
\mathbf{else}:\\
\;\;\;\;t_0 \cdot \left|t_2\right|\\
\end{array}
\end{array}
if y.im < -2.3e190Initial program 53.8%
Taylor expanded in y.im around 0 47.9%
Taylor expanded in y.re around 0 69.1%
*-commutative69.1%
distribute-rgt-neg-in69.1%
Simplified69.1%
if -2.3e190 < y.im < -2.3999999999999999e30Initial program 41.4%
Taylor expanded in y.im around 0 82.9%
if -2.3999999999999999e30 < y.im < -8.1999999999999994e-6Initial program 0.0%
Taylor expanded in y.re around 0 20.0%
unpow220.0%
unpow220.0%
hypot-def80.1%
Simplified80.1%
if -8.1999999999999994e-6 < y.im < 2.2e8Initial program 44.4%
exp-diff44.4%
exp-to-pow44.4%
hypot-def44.4%
*-commutative44.4%
exp-prod44.4%
fma-def44.4%
hypot-def92.6%
*-commutative92.6%
Simplified92.6%
Taylor expanded in y.im around 0 90.9%
if 2.2e8 < y.im Initial program 33.5%
Taylor expanded in y.im around 0 50.4%
add-sqr-sqrt25.2%
sqrt-unprod55.1%
pow255.1%
*-commutative55.1%
Applied egg-rr55.1%
*-commutative55.1%
unpow255.1%
rem-sqrt-square66.0%
Simplified66.0%
Final simplification81.9%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0
(exp
(-
(* y.re (log (sqrt (+ (* x.re x.re) (* x.im x.im)))))
(* (atan2 x.im x.re) y.im))))
(t_1 (* y.re (atan2 x.im x.re)))
(t_2 (sin t_1)))
(if (<= y.im -2.2e+189)
(* y.re (* (atan2 x.im x.re) (exp (* (atan2 x.im x.re) (- y.im)))))
(if (<= y.im -360.0)
(* t_0 t_2)
(if (<= y.im 1200000000.0)
(*
(sin (fma (log (hypot x.re x.im)) y.im t_1))
(pow (hypot x.re x.im) y.re))
(* t_0 (fabs t_2)))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double 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)));
double t_1 = y_46_re * atan2(x_46_im, x_46_re);
double t_2 = sin(t_1);
double tmp;
if (y_46_im <= -2.2e+189) {
tmp = y_46_re * (atan2(x_46_im, x_46_re) * exp((atan2(x_46_im, x_46_re) * -y_46_im)));
} else if (y_46_im <= -360.0) {
tmp = t_0 * t_2;
} else if (y_46_im <= 1200000000.0) {
tmp = sin(fma(log(hypot(x_46_re, x_46_im)), y_46_im, t_1)) * pow(hypot(x_46_re, x_46_im), y_46_re);
} else {
tmp = t_0 * fabs(t_2);
}
return tmp;
}
function code(x_46_re, x_46_im, y_46_re, y_46_im) 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))) t_1 = Float64(y_46_re * atan(x_46_im, x_46_re)) t_2 = sin(t_1) tmp = 0.0 if (y_46_im <= -2.2e+189) tmp = Float64(y_46_re * Float64(atan(x_46_im, x_46_re) * exp(Float64(atan(x_46_im, x_46_re) * Float64(-y_46_im))))); elseif (y_46_im <= -360.0) tmp = Float64(t_0 * t_2); elseif (y_46_im <= 1200000000.0) tmp = Float64(sin(fma(log(hypot(x_46_re, x_46_im)), y_46_im, t_1)) * (hypot(x_46_re, x_46_im) ^ y_46_re)); else tmp = Float64(t_0 * abs(t_2)); 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[(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]}, Block[{t$95$1 = N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[Sin[t$95$1], $MachinePrecision]}, If[LessEqual[y$46$im, -2.2e+189], N[(y$46$re * N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * N[Exp[N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * (-y$46$im)), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$im, -360.0], N[(t$95$0 * t$95$2), $MachinePrecision], If[LessEqual[y$46$im, 1200000000.0], 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] * N[Power[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision], y$46$re], $MachinePrecision]), $MachinePrecision], N[(t$95$0 * N[Abs[t$95$2], $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := 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}\\
t_1 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
t_2 := \sin t_1\\
\mathbf{if}\;y.im \leq -2.2 \cdot 10^{+189}:\\
\;\;\;\;y.re \cdot \left(\tan^{-1}_* \frac{x.im}{x.re} \cdot e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot \left(-y.im\right)}\right)\\
\mathbf{elif}\;y.im \leq -360:\\
\;\;\;\;t_0 \cdot t_2\\
\mathbf{elif}\;y.im \leq 1200000000:\\
\;\;\;\;\sin \left(\mathsf{fma}\left(\log \left(\mathsf{hypot}\left(x.re, x.im\right)\right), y.im, t_1\right)\right) \cdot {\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re}\\
\mathbf{else}:\\
\;\;\;\;t_0 \cdot \left|t_2\right|\\
\end{array}
\end{array}
if y.im < -2.20000000000000005e189Initial program 53.8%
Taylor expanded in y.im around 0 47.9%
Taylor expanded in y.re around 0 69.1%
*-commutative69.1%
distribute-rgt-neg-in69.1%
Simplified69.1%
if -2.20000000000000005e189 < y.im < -360Initial program 35.3%
Taylor expanded in y.im around 0 79.6%
if -360 < y.im < 1.2e9Initial program 44.4%
exp-diff44.4%
exp-to-pow44.4%
hypot-def44.4%
*-commutative44.4%
exp-prod44.4%
fma-def44.4%
hypot-def92.6%
*-commutative92.6%
Simplified92.6%
Taylor expanded in y.im around 0 90.9%
if 1.2e9 < y.im Initial program 33.5%
Taylor expanded in y.im around 0 50.4%
add-sqr-sqrt25.2%
sqrt-unprod55.1%
pow255.1%
*-commutative55.1%
Applied egg-rr55.1%
*-commutative55.1%
unpow255.1%
rem-sqrt-square66.0%
Simplified66.0%
Final simplification81.5%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (* (atan2 x.im x.re) y.im))
(t_1 (sin (* y.re (atan2 x.im x.re)))))
(if (<= x.im -8.5e+180)
(* (fabs t_1) (exp (- (* y.re (log (- x.im))) t_0)))
(if (<= x.im -3.6e-306)
(*
(exp (- (* y.re (log (sqrt (+ (* x.re x.re) (* x.im x.im))))) t_0))
t_1)
(if (<= x.im 1.25e-48)
(*
(sin (* y.im (log (hypot x.im x.re))))
(pow (hypot x.re x.im) y.re))
(*
(exp
(fma (log (hypot x.re x.im)) y.re (* (atan2 x.im x.re) (- y.im))))
(sin (* y.im (log x.im)))))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = atan2(x_46_im, x_46_re) * y_46_im;
double t_1 = sin((y_46_re * atan2(x_46_im, x_46_re)));
double tmp;
if (x_46_im <= -8.5e+180) {
tmp = fabs(t_1) * exp(((y_46_re * log(-x_46_im)) - t_0));
} else if (x_46_im <= -3.6e-306) {
tmp = exp(((y_46_re * log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))) - t_0)) * t_1;
} else if (x_46_im <= 1.25e-48) {
tmp = sin((y_46_im * log(hypot(x_46_im, x_46_re)))) * pow(hypot(x_46_re, x_46_im), y_46_re);
} else {
tmp = exp(fma(log(hypot(x_46_re, x_46_im)), y_46_re, (atan2(x_46_im, x_46_re) * -y_46_im))) * sin((y_46_im * log(x_46_im)));
}
return tmp;
}
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = Float64(atan(x_46_im, x_46_re) * y_46_im) t_1 = sin(Float64(y_46_re * atan(x_46_im, x_46_re))) tmp = 0.0 if (x_46_im <= -8.5e+180) tmp = Float64(abs(t_1) * exp(Float64(Float64(y_46_re * log(Float64(-x_46_im))) - t_0))); elseif (x_46_im <= -3.6e-306) 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)) * t_1); elseif (x_46_im <= 1.25e-48) tmp = Float64(sin(Float64(y_46_im * log(hypot(x_46_im, x_46_re)))) * (hypot(x_46_re, x_46_im) ^ y_46_re)); else tmp = Float64(exp(fma(log(hypot(x_46_re, x_46_im)), y_46_re, Float64(atan(x_46_im, x_46_re) * Float64(-y_46_im)))) * sin(Float64(y_46_im * log(x_46_im)))); end return tmp end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$im), $MachinePrecision]}, Block[{t$95$1 = N[Sin[N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[x$46$im, -8.5e+180], N[(N[Abs[t$95$1], $MachinePrecision] * N[Exp[N[(N[(y$46$re * N[Log[(-x$46$im)], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[x$46$im, -3.6e-306], 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] * t$95$1), $MachinePrecision], If[LessEqual[x$46$im, 1.25e-48], N[(N[Sin[N[(y$46$im * N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Power[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision], y$46$re], $MachinePrecision]), $MachinePrecision], N[(N[Exp[N[(N[Log[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision]], $MachinePrecision] * y$46$re + N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * (-y$46$im)), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Sin[N[(y$46$im * N[Log[x$46$im], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im\\
t_1 := \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\\
\mathbf{if}\;x.im \leq -8.5 \cdot 10^{+180}:\\
\;\;\;\;\left|t_1\right| \cdot e^{y.re \cdot \log \left(-x.im\right) - t_0}\\
\mathbf{elif}\;x.im \leq -3.6 \cdot 10^{-306}:\\
\;\;\;\;e^{y.re \cdot \log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) - t_0} \cdot t_1\\
\mathbf{elif}\;x.im \leq 1.25 \cdot 10^{-48}:\\
\;\;\;\;\sin \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right) \cdot {\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re}\\
\mathbf{else}:\\
\;\;\;\;e^{\mathsf{fma}\left(\log \left(\mathsf{hypot}\left(x.re, x.im\right)\right), y.re, \tan^{-1}_* \frac{x.im}{x.re} \cdot \left(-y.im\right)\right)} \cdot \sin \left(y.im \cdot \log x.im\right)\\
\end{array}
\end{array}
if x.im < -8.50000000000000077e180Initial program 0.0%
Taylor expanded in y.im around 0 46.5%
add-sqr-sqrt41.5%
sqrt-unprod55.3%
pow255.3%
*-commutative55.3%
Applied egg-rr55.3%
*-commutative55.3%
unpow255.3%
rem-sqrt-square60.0%
Simplified60.0%
Taylor expanded in x.im around -inf 84.9%
mul-1-neg84.9%
Simplified84.9%
if -8.50000000000000077e180 < x.im < -3.59999999999999991e-306Initial program 57.0%
Taylor expanded in y.im around 0 63.3%
if -3.59999999999999991e-306 < x.im < 1.25e-48Initial program 48.1%
exp-diff42.1%
exp-to-pow42.1%
hypot-def42.1%
*-commutative42.1%
exp-prod42.1%
fma-def42.1%
hypot-def76.4%
*-commutative76.4%
Simplified76.4%
Taylor expanded in y.im around 0 74.4%
Taylor expanded in y.re around 0 36.6%
unpow236.6%
unpow236.6%
hypot-def66.9%
Simplified66.9%
if 1.25e-48 < x.im Initial program 26.9%
cancel-sign-sub-inv26.9%
fma-def26.9%
hypot-def26.9%
distribute-lft-neg-in26.9%
distribute-rgt-neg-out26.9%
fma-def26.9%
hypot-def83.2%
*-commutative83.2%
Simplified83.2%
add-cube-cbrt85.3%
pow384.0%
fma-udef84.0%
*-commutative84.0%
*-commutative84.0%
fma-def84.0%
Applied egg-rr84.0%
Taylor expanded in y.re around 0 6.5%
unpow1/323.1%
+-commutative23.1%
unpow223.1%
unpow223.1%
hypot-def71.8%
hypot-def23.1%
unpow223.1%
unpow223.1%
+-commutative23.1%
unpow223.1%
unpow223.1%
hypot-def71.8%
Simplified71.8%
Taylor expanded in x.re around 0 76.5%
pow-base-176.5%
*-lft-identity76.5%
*-commutative76.5%
Simplified76.5%
Final simplification69.9%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0
(* y.re (* (atan2 x.im x.re) (exp (* (atan2 x.im x.re) (- y.im))))))
(t_1 (* (atan2 x.im x.re) y.im))
(t_2 (* y.re (atan2 x.im x.re)))
(t_3 (sin t_2))
(t_4
(*
(exp (- (* y.re (log (sqrt (+ (* x.re x.re) (* x.im x.im))))) t_1))
t_3)))
(if (<= y.im -5e+190)
t_0
(if (<= y.im -450.0)
t_4
(if (<= y.im 380000000.0)
(*
(sin (fma (log (hypot x.re x.im)) y.im t_2))
(pow (hypot x.re x.im) y.re))
(if (<= y.im 3.4e+98)
t_4
(if (<= y.im 3.7e+178)
(* (fabs t_3) (exp (- (* y.re (log (- x.im))) t_1)))
t_0)))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = y_46_re * (atan2(x_46_im, x_46_re) * exp((atan2(x_46_im, x_46_re) * -y_46_im)));
double t_1 = atan2(x_46_im, x_46_re) * y_46_im;
double t_2 = y_46_re * atan2(x_46_im, x_46_re);
double t_3 = sin(t_2);
double t_4 = exp(((y_46_re * log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))) - t_1)) * t_3;
double tmp;
if (y_46_im <= -5e+190) {
tmp = t_0;
} else if (y_46_im <= -450.0) {
tmp = t_4;
} else if (y_46_im <= 380000000.0) {
tmp = sin(fma(log(hypot(x_46_re, x_46_im)), y_46_im, t_2)) * pow(hypot(x_46_re, x_46_im), y_46_re);
} else if (y_46_im <= 3.4e+98) {
tmp = t_4;
} else if (y_46_im <= 3.7e+178) {
tmp = fabs(t_3) * exp(((y_46_re * log(-x_46_im)) - t_1));
} else {
tmp = t_0;
}
return tmp;
}
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = Float64(y_46_re * Float64(atan(x_46_im, x_46_re) * exp(Float64(atan(x_46_im, x_46_re) * Float64(-y_46_im))))) t_1 = Float64(atan(x_46_im, x_46_re) * y_46_im) t_2 = Float64(y_46_re * atan(x_46_im, x_46_re)) t_3 = sin(t_2) t_4 = Float64(exp(Float64(Float64(y_46_re * log(sqrt(Float64(Float64(x_46_re * x_46_re) + Float64(x_46_im * x_46_im))))) - t_1)) * t_3) tmp = 0.0 if (y_46_im <= -5e+190) tmp = t_0; elseif (y_46_im <= -450.0) tmp = t_4; elseif (y_46_im <= 380000000.0) tmp = Float64(sin(fma(log(hypot(x_46_re, x_46_im)), y_46_im, t_2)) * (hypot(x_46_re, x_46_im) ^ y_46_re)); elseif (y_46_im <= 3.4e+98) tmp = t_4; elseif (y_46_im <= 3.7e+178) tmp = Float64(abs(t_3) * exp(Float64(Float64(y_46_re * log(Float64(-x_46_im))) - t_1))); else tmp = t_0; end return tmp end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[(y$46$re * N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * N[Exp[N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * (-y$46$im)), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$im), $MachinePrecision]}, Block[{t$95$2 = N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[Sin[t$95$2], $MachinePrecision]}, Block[{t$95$4 = N[(N[Exp[N[(N[(y$46$re * N[Log[N[Sqrt[N[(N[(x$46$re * x$46$re), $MachinePrecision] + N[(x$46$im * x$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision]], $MachinePrecision] * t$95$3), $MachinePrecision]}, If[LessEqual[y$46$im, -5e+190], t$95$0, If[LessEqual[y$46$im, -450.0], t$95$4, If[LessEqual[y$46$im, 380000000.0], N[(N[Sin[N[(N[Log[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision]], $MachinePrecision] * y$46$im + t$95$2), $MachinePrecision]], $MachinePrecision] * N[Power[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision], y$46$re], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$im, 3.4e+98], t$95$4, If[LessEqual[y$46$im, 3.7e+178], N[(N[Abs[t$95$3], $MachinePrecision] * N[Exp[N[(N[(y$46$re * N[Log[(-x$46$im)], $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], t$95$0]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := y.re \cdot \left(\tan^{-1}_* \frac{x.im}{x.re} \cdot e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot \left(-y.im\right)}\right)\\
t_1 := \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im\\
t_2 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
t_3 := \sin t_2\\
t_4 := e^{y.re \cdot \log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) - t_1} \cdot t_3\\
\mathbf{if}\;y.im \leq -5 \cdot 10^{+190}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;y.im \leq -450:\\
\;\;\;\;t_4\\
\mathbf{elif}\;y.im \leq 380000000:\\
\;\;\;\;\sin \left(\mathsf{fma}\left(\log \left(\mathsf{hypot}\left(x.re, x.im\right)\right), y.im, t_2\right)\right) \cdot {\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re}\\
\mathbf{elif}\;y.im \leq 3.4 \cdot 10^{+98}:\\
\;\;\;\;t_4\\
\mathbf{elif}\;y.im \leq 3.7 \cdot 10^{+178}:\\
\;\;\;\;\left|t_3\right| \cdot e^{y.re \cdot \log \left(-x.im\right) - t_1}\\
\mathbf{else}:\\
\;\;\;\;t_0\\
\end{array}
\end{array}
if y.im < -5.00000000000000036e190 or 3.7000000000000002e178 < y.im Initial program 46.1%
Taylor expanded in y.im around 0 49.5%
Taylor expanded in y.re around 0 62.8%
*-commutative62.8%
distribute-rgt-neg-in62.8%
Simplified62.8%
if -5.00000000000000036e190 < y.im < -450 or 3.8e8 < y.im < 3.39999999999999972e98Initial program 33.3%
Taylor expanded in y.im around 0 77.9%
if -450 < y.im < 3.8e8Initial program 44.4%
exp-diff44.4%
exp-to-pow44.4%
hypot-def44.4%
*-commutative44.4%
exp-prod44.4%
fma-def44.4%
hypot-def92.6%
*-commutative92.6%
Simplified92.6%
Taylor expanded in y.im around 0 90.9%
if 3.39999999999999972e98 < y.im < 3.7000000000000002e178Initial program 12.5%
Taylor expanded in y.im around 0 1.0%
add-sqr-sqrt0.2%
sqrt-unprod40.8%
pow240.8%
*-commutative40.8%
Applied egg-rr40.8%
*-commutative40.8%
unpow240.8%
rem-sqrt-square50.9%
Simplified50.9%
Taylor expanded in x.im around -inf 80.3%
mul-1-neg80.3%
Simplified80.3%
Final simplification81.9%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0
(*
(sin (* y.im (log (hypot x.im x.re))))
(pow (hypot x.re x.im) y.re)))
(t_1
(* y.re (* (atan2 x.im x.re) (exp (* (atan2 x.im x.re) (- y.im))))))
(t_2 (* (atan2 x.im x.re) y.im))
(t_3 (sin (* y.re (atan2 x.im x.re))))
(t_4
(*
(exp (- (* y.re (log (sqrt (+ (* x.re x.re) (* x.im x.im))))) t_2))
t_3)))
(if (<= y.im -5e+189)
t_1
(if (<= y.im -1.06e+30)
t_4
(if (<= y.im -1.2e-164)
t_0
(if (<= y.im 1.2e-237)
(* t_3 (pow (hypot x.im x.re) y.re))
(if (<= y.im 82000000000.0)
t_0
(if (<= y.im 1.55e+98)
t_4
(if (<= y.im 1.4e+175)
(* (fabs t_3) (exp (- (* y.re (log (- x.im))) t_2)))
t_1)))))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = sin((y_46_im * log(hypot(x_46_im, x_46_re)))) * pow(hypot(x_46_re, x_46_im), y_46_re);
double t_1 = y_46_re * (atan2(x_46_im, x_46_re) * exp((atan2(x_46_im, x_46_re) * -y_46_im)));
double t_2 = atan2(x_46_im, x_46_re) * y_46_im;
double t_3 = sin((y_46_re * atan2(x_46_im, x_46_re)));
double t_4 = exp(((y_46_re * log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))) - t_2)) * t_3;
double tmp;
if (y_46_im <= -5e+189) {
tmp = t_1;
} else if (y_46_im <= -1.06e+30) {
tmp = t_4;
} else if (y_46_im <= -1.2e-164) {
tmp = t_0;
} else if (y_46_im <= 1.2e-237) {
tmp = t_3 * pow(hypot(x_46_im, x_46_re), y_46_re);
} else if (y_46_im <= 82000000000.0) {
tmp = t_0;
} else if (y_46_im <= 1.55e+98) {
tmp = t_4;
} else if (y_46_im <= 1.4e+175) {
tmp = fabs(t_3) * exp(((y_46_re * log(-x_46_im)) - t_2));
} else {
tmp = t_1;
}
return tmp;
}
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = Math.sin((y_46_im * Math.log(Math.hypot(x_46_im, x_46_re)))) * Math.pow(Math.hypot(x_46_re, x_46_im), y_46_re);
double t_1 = y_46_re * (Math.atan2(x_46_im, x_46_re) * 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_im;
double t_3 = Math.sin((y_46_re * Math.atan2(x_46_im, x_46_re)));
double t_4 = Math.exp(((y_46_re * Math.log(Math.sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))) - t_2)) * t_3;
double tmp;
if (y_46_im <= -5e+189) {
tmp = t_1;
} else if (y_46_im <= -1.06e+30) {
tmp = t_4;
} else if (y_46_im <= -1.2e-164) {
tmp = t_0;
} else if (y_46_im <= 1.2e-237) {
tmp = t_3 * Math.pow(Math.hypot(x_46_im, x_46_re), y_46_re);
} else if (y_46_im <= 82000000000.0) {
tmp = t_0;
} else if (y_46_im <= 1.55e+98) {
tmp = t_4;
} else if (y_46_im <= 1.4e+175) {
tmp = Math.abs(t_3) * Math.exp(((y_46_re * Math.log(-x_46_im)) - t_2));
} else {
tmp = t_1;
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): t_0 = math.sin((y_46_im * math.log(math.hypot(x_46_im, x_46_re)))) * math.pow(math.hypot(x_46_re, x_46_im), y_46_re) t_1 = y_46_re * (math.atan2(x_46_im, x_46_re) * 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_im t_3 = math.sin((y_46_re * math.atan2(x_46_im, x_46_re))) t_4 = math.exp(((y_46_re * math.log(math.sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))) - t_2)) * t_3 tmp = 0 if y_46_im <= -5e+189: tmp = t_1 elif y_46_im <= -1.06e+30: tmp = t_4 elif y_46_im <= -1.2e-164: tmp = t_0 elif y_46_im <= 1.2e-237: tmp = t_3 * math.pow(math.hypot(x_46_im, x_46_re), y_46_re) elif y_46_im <= 82000000000.0: tmp = t_0 elif y_46_im <= 1.55e+98: tmp = t_4 elif y_46_im <= 1.4e+175: tmp = math.fabs(t_3) * math.exp(((y_46_re * math.log(-x_46_im)) - t_2)) else: tmp = t_1 return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = Float64(sin(Float64(y_46_im * log(hypot(x_46_im, x_46_re)))) * (hypot(x_46_re, x_46_im) ^ y_46_re)) t_1 = Float64(y_46_re * Float64(atan(x_46_im, x_46_re) * exp(Float64(atan(x_46_im, x_46_re) * Float64(-y_46_im))))) t_2 = Float64(atan(x_46_im, x_46_re) * y_46_im) t_3 = sin(Float64(y_46_re * atan(x_46_im, x_46_re))) t_4 = 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_2)) * t_3) tmp = 0.0 if (y_46_im <= -5e+189) tmp = t_1; elseif (y_46_im <= -1.06e+30) tmp = t_4; elseif (y_46_im <= -1.2e-164) tmp = t_0; elseif (y_46_im <= 1.2e-237) tmp = Float64(t_3 * (hypot(x_46_im, x_46_re) ^ y_46_re)); elseif (y_46_im <= 82000000000.0) tmp = t_0; elseif (y_46_im <= 1.55e+98) tmp = t_4; elseif (y_46_im <= 1.4e+175) tmp = Float64(abs(t_3) * exp(Float64(Float64(y_46_re * log(Float64(-x_46_im))) - t_2))); else tmp = t_1; end return tmp end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = sin((y_46_im * log(hypot(x_46_im, x_46_re)))) * (hypot(x_46_re, x_46_im) ^ y_46_re); t_1 = y_46_re * (atan2(x_46_im, x_46_re) * exp((atan2(x_46_im, x_46_re) * -y_46_im))); t_2 = atan2(x_46_im, x_46_re) * y_46_im; t_3 = sin((y_46_re * atan2(x_46_im, x_46_re))); t_4 = exp(((y_46_re * log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))) - t_2)) * t_3; tmp = 0.0; if (y_46_im <= -5e+189) tmp = t_1; elseif (y_46_im <= -1.06e+30) tmp = t_4; elseif (y_46_im <= -1.2e-164) tmp = t_0; elseif (y_46_im <= 1.2e-237) tmp = t_3 * (hypot(x_46_im, x_46_re) ^ y_46_re); elseif (y_46_im <= 82000000000.0) tmp = t_0; elseif (y_46_im <= 1.55e+98) tmp = t_4; elseif (y_46_im <= 1.4e+175) tmp = abs(t_3) * exp(((y_46_re * log(-x_46_im)) - t_2)); else tmp = t_1; end tmp_2 = tmp; end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[(N[Sin[N[(y$46$im * N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Power[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision], y$46$re], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(y$46$re * N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * N[Exp[N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * (-y$46$im)), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$im), $MachinePrecision]}, Block[{t$95$3 = N[Sin[N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$4 = 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$2), $MachinePrecision]], $MachinePrecision] * t$95$3), $MachinePrecision]}, If[LessEqual[y$46$im, -5e+189], t$95$1, If[LessEqual[y$46$im, -1.06e+30], t$95$4, If[LessEqual[y$46$im, -1.2e-164], t$95$0, If[LessEqual[y$46$im, 1.2e-237], N[(t$95$3 * N[Power[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision], y$46$re], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$im, 82000000000.0], t$95$0, If[LessEqual[y$46$im, 1.55e+98], t$95$4, If[LessEqual[y$46$im, 1.4e+175], N[(N[Abs[t$95$3], $MachinePrecision] * N[Exp[N[(N[(y$46$re * N[Log[(-x$46$im)], $MachinePrecision]), $MachinePrecision] - t$95$2), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], t$95$1]]]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \sin \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right) \cdot {\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re}\\
t_1 := y.re \cdot \left(\tan^{-1}_* \frac{x.im}{x.re} \cdot e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot \left(-y.im\right)}\right)\\
t_2 := \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im\\
t_3 := \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\\
t_4 := e^{y.re \cdot \log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) - t_2} \cdot t_3\\
\mathbf{if}\;y.im \leq -5 \cdot 10^{+189}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y.im \leq -1.06 \cdot 10^{+30}:\\
\;\;\;\;t_4\\
\mathbf{elif}\;y.im \leq -1.2 \cdot 10^{-164}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;y.im \leq 1.2 \cdot 10^{-237}:\\
\;\;\;\;t_3 \cdot {\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re}\\
\mathbf{elif}\;y.im \leq 82000000000:\\
\;\;\;\;t_0\\
\mathbf{elif}\;y.im \leq 1.55 \cdot 10^{+98}:\\
\;\;\;\;t_4\\
\mathbf{elif}\;y.im \leq 1.4 \cdot 10^{+175}:\\
\;\;\;\;\left|t_3\right| \cdot e^{y.re \cdot \log \left(-x.im\right) - t_2}\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if y.im < -5.0000000000000004e189 or 1.4000000000000001e175 < y.im Initial program 46.1%
Taylor expanded in y.im around 0 49.5%
Taylor expanded in y.re around 0 62.8%
*-commutative62.8%
distribute-rgt-neg-in62.8%
Simplified62.8%
if -5.0000000000000004e189 < y.im < -1.06e30 or 8.2e10 < y.im < 1.5500000000000001e98Initial program 36.7%
Taylor expanded in y.im around 0 79.7%
if -1.06e30 < y.im < -1.19999999999999992e-164 or 1.2e-237 < y.im < 8.2e10Initial program 42.8%
exp-diff42.8%
exp-to-pow42.8%
hypot-def42.8%
*-commutative42.8%
exp-prod42.8%
fma-def42.8%
hypot-def89.1%
*-commutative89.1%
Simplified89.1%
Taylor expanded in y.im around 0 85.4%
Taylor expanded in y.re around 0 35.6%
unpow235.6%
unpow235.6%
hypot-def75.1%
Simplified75.1%
if -1.19999999999999992e-164 < y.im < 1.2e-237Initial program 43.1%
Taylor expanded in y.im around 0 62.5%
Taylor expanded in y.im around 0 62.5%
unpow262.5%
unpow262.5%
hypot-def84.5%
Simplified84.5%
if 1.5500000000000001e98 < y.im < 1.4000000000000001e175Initial program 12.5%
Taylor expanded in y.im around 0 1.0%
add-sqr-sqrt0.2%
sqrt-unprod40.8%
pow240.8%
*-commutative40.8%
Applied egg-rr40.8%
*-commutative40.8%
unpow240.8%
rem-sqrt-square50.9%
Simplified50.9%
Taylor expanded in x.im around -inf 80.3%
mul-1-neg80.3%
Simplified80.3%
Final simplification75.5%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0
(*
(sin (* y.im (log (hypot x.im x.re))))
(pow (hypot x.re x.im) y.re))))
(if (<= y.re -1.15e+30)
t_0
(if (<= y.re -4e-200)
(* y.re (* (atan2 x.im x.re) (pow (exp y.im) (- (atan2 x.im x.re)))))
(if (<= y.re 4.2e-282)
t_0
(if (<= y.re 0.00165)
(* y.re (* (atan2 x.im x.re) (exp (* (atan2 x.im x.re) (- y.im)))))
(if (<= y.re 2.6e+148)
t_0
(*
(sin (* y.re (atan2 x.im x.re)))
(pow (hypot x.im x.re) y.re)))))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = sin((y_46_im * log(hypot(x_46_im, x_46_re)))) * pow(hypot(x_46_re, x_46_im), y_46_re);
double tmp;
if (y_46_re <= -1.15e+30) {
tmp = t_0;
} else if (y_46_re <= -4e-200) {
tmp = y_46_re * (atan2(x_46_im, x_46_re) * pow(exp(y_46_im), -atan2(x_46_im, x_46_re)));
} else if (y_46_re <= 4.2e-282) {
tmp = t_0;
} else if (y_46_re <= 0.00165) {
tmp = y_46_re * (atan2(x_46_im, x_46_re) * exp((atan2(x_46_im, x_46_re) * -y_46_im)));
} else if (y_46_re <= 2.6e+148) {
tmp = t_0;
} else {
tmp = sin((y_46_re * atan2(x_46_im, x_46_re))) * pow(hypot(x_46_im, x_46_re), y_46_re);
}
return tmp;
}
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = Math.sin((y_46_im * Math.log(Math.hypot(x_46_im, x_46_re)))) * Math.pow(Math.hypot(x_46_re, x_46_im), y_46_re);
double tmp;
if (y_46_re <= -1.15e+30) {
tmp = t_0;
} else if (y_46_re <= -4e-200) {
tmp = y_46_re * (Math.atan2(x_46_im, x_46_re) * Math.pow(Math.exp(y_46_im), -Math.atan2(x_46_im, x_46_re)));
} else if (y_46_re <= 4.2e-282) {
tmp = t_0;
} else if (y_46_re <= 0.00165) {
tmp = y_46_re * (Math.atan2(x_46_im, x_46_re) * Math.exp((Math.atan2(x_46_im, x_46_re) * -y_46_im)));
} else if (y_46_re <= 2.6e+148) {
tmp = t_0;
} else {
tmp = Math.sin((y_46_re * Math.atan2(x_46_im, x_46_re))) * Math.pow(Math.hypot(x_46_im, x_46_re), y_46_re);
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): t_0 = math.sin((y_46_im * math.log(math.hypot(x_46_im, x_46_re)))) * math.pow(math.hypot(x_46_re, x_46_im), y_46_re) tmp = 0 if y_46_re <= -1.15e+30: tmp = t_0 elif y_46_re <= -4e-200: tmp = y_46_re * (math.atan2(x_46_im, x_46_re) * math.pow(math.exp(y_46_im), -math.atan2(x_46_im, x_46_re))) elif y_46_re <= 4.2e-282: tmp = t_0 elif y_46_re <= 0.00165: tmp = y_46_re * (math.atan2(x_46_im, x_46_re) * math.exp((math.atan2(x_46_im, x_46_re) * -y_46_im))) elif y_46_re <= 2.6e+148: tmp = t_0 else: tmp = math.sin((y_46_re * math.atan2(x_46_im, x_46_re))) * math.pow(math.hypot(x_46_im, x_46_re), y_46_re) return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = Float64(sin(Float64(y_46_im * log(hypot(x_46_im, x_46_re)))) * (hypot(x_46_re, x_46_im) ^ y_46_re)) tmp = 0.0 if (y_46_re <= -1.15e+30) tmp = t_0; elseif (y_46_re <= -4e-200) tmp = Float64(y_46_re * Float64(atan(x_46_im, x_46_re) * (exp(y_46_im) ^ Float64(-atan(x_46_im, x_46_re))))); elseif (y_46_re <= 4.2e-282) tmp = t_0; elseif (y_46_re <= 0.00165) tmp = Float64(y_46_re * Float64(atan(x_46_im, x_46_re) * exp(Float64(atan(x_46_im, x_46_re) * Float64(-y_46_im))))); elseif (y_46_re <= 2.6e+148) tmp = t_0; else tmp = Float64(sin(Float64(y_46_re * atan(x_46_im, x_46_re))) * (hypot(x_46_im, x_46_re) ^ y_46_re)); end return tmp end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = sin((y_46_im * log(hypot(x_46_im, x_46_re)))) * (hypot(x_46_re, x_46_im) ^ y_46_re); tmp = 0.0; if (y_46_re <= -1.15e+30) tmp = t_0; elseif (y_46_re <= -4e-200) tmp = y_46_re * (atan2(x_46_im, x_46_re) * (exp(y_46_im) ^ -atan2(x_46_im, x_46_re))); elseif (y_46_re <= 4.2e-282) tmp = t_0; elseif (y_46_re <= 0.00165) tmp = y_46_re * (atan2(x_46_im, x_46_re) * exp((atan2(x_46_im, x_46_re) * -y_46_im))); elseif (y_46_re <= 2.6e+148) tmp = t_0; else tmp = sin((y_46_re * atan2(x_46_im, x_46_re))) * (hypot(x_46_im, x_46_re) ^ y_46_re); end tmp_2 = tmp; end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[(N[Sin[N[(y$46$im * N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Power[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision], y$46$re], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y$46$re, -1.15e+30], t$95$0, If[LessEqual[y$46$re, -4e-200], N[(y$46$re * N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * N[Power[N[Exp[y$46$im], $MachinePrecision], (-N[ArcTan[x$46$im / x$46$re], $MachinePrecision])], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$re, 4.2e-282], t$95$0, If[LessEqual[y$46$re, 0.00165], N[(y$46$re * N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * N[Exp[N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * (-y$46$im)), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$re, 2.6e+148], t$95$0, N[(N[Sin[N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Power[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision], y$46$re], $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \sin \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right) \cdot {\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re}\\
\mathbf{if}\;y.re \leq -1.15 \cdot 10^{+30}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;y.re \leq -4 \cdot 10^{-200}:\\
\;\;\;\;y.re \cdot \left(\tan^{-1}_* \frac{x.im}{x.re} \cdot {\left(e^{y.im}\right)}^{\left(-\tan^{-1}_* \frac{x.im}{x.re}\right)}\right)\\
\mathbf{elif}\;y.re \leq 4.2 \cdot 10^{-282}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;y.re \leq 0.00165:\\
\;\;\;\;y.re \cdot \left(\tan^{-1}_* \frac{x.im}{x.re} \cdot e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot \left(-y.im\right)}\right)\\
\mathbf{elif}\;y.re \leq 2.6 \cdot 10^{+148}:\\
\;\;\;\;t_0\\
\mathbf{else}:\\
\;\;\;\;\sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re}\\
\end{array}
\end{array}
if y.re < -1.15e30 or -3.9999999999999999e-200 < y.re < 4.20000000000000023e-282 or 0.00165 < y.re < 2.6e148Initial program 41.6%
exp-diff37.3%
exp-to-pow37.3%
hypot-def37.3%
*-commutative37.3%
exp-prod35.6%
fma-def35.6%
hypot-def69.6%
*-commutative69.6%
Simplified69.6%
Taylor expanded in y.im around 0 70.1%
Taylor expanded in y.re around 0 37.6%
unpow237.6%
unpow237.6%
hypot-def74.5%
Simplified74.5%
if -1.15e30 < y.re < -3.9999999999999999e-200Initial program 40.4%
Taylor expanded in y.im around 0 63.8%
Taylor expanded in y.re around 0 77.8%
*-commutative77.8%
distribute-rgt-neg-in77.8%
exp-prod77.8%
Simplified77.8%
if 4.20000000000000023e-282 < y.re < 0.00165Initial program 45.1%
Taylor expanded in y.im around 0 33.5%
Taylor expanded in y.re around 0 58.2%
*-commutative58.2%
distribute-rgt-neg-in58.2%
Simplified58.2%
if 2.6e148 < y.re Initial program 33.3%
Taylor expanded in y.im around 0 81.9%
Taylor expanded in y.im around 0 81.9%
unpow281.9%
unpow281.9%
hypot-def81.9%
Simplified81.9%
Final simplification72.0%
(FPCore (x.re x.im y.re y.im) :precision binary64 (if (or (<= y.re -1.15e+30) (not (<= y.re 7.6e-14))) (* (sin (* y.re (atan2 x.im x.re))) (pow (hypot x.im x.re) y.re)) (* y.re (* (atan2 x.im x.re) (exp (* (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 tmp;
if ((y_46_re <= -1.15e+30) || !(y_46_re <= 7.6e-14)) {
tmp = sin((y_46_re * atan2(x_46_im, x_46_re))) * pow(hypot(x_46_im, x_46_re), y_46_re);
} else {
tmp = y_46_re * (atan2(x_46_im, x_46_re) * exp((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 tmp;
if ((y_46_re <= -1.15e+30) || !(y_46_re <= 7.6e-14)) {
tmp = Math.sin((y_46_re * Math.atan2(x_46_im, x_46_re))) * Math.pow(Math.hypot(x_46_im, x_46_re), y_46_re);
} else {
tmp = y_46_re * (Math.atan2(x_46_im, x_46_re) * Math.exp((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): tmp = 0 if (y_46_re <= -1.15e+30) or not (y_46_re <= 7.6e-14): tmp = math.sin((y_46_re * math.atan2(x_46_im, x_46_re))) * math.pow(math.hypot(x_46_im, x_46_re), y_46_re) else: tmp = y_46_re * (math.atan2(x_46_im, x_46_re) * math.exp((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) tmp = 0.0 if ((y_46_re <= -1.15e+30) || !(y_46_re <= 7.6e-14)) tmp = Float64(sin(Float64(y_46_re * atan(x_46_im, x_46_re))) * (hypot(x_46_im, x_46_re) ^ y_46_re)); else tmp = Float64(y_46_re * Float64(atan(x_46_im, x_46_re) * exp(Float64(atan(x_46_im, x_46_re) * Float64(-y_46_im))))); 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 <= -1.15e+30) || ~((y_46_re <= 7.6e-14))) tmp = sin((y_46_re * atan2(x_46_im, x_46_re))) * (hypot(x_46_im, x_46_re) ^ y_46_re); else tmp = y_46_re * (atan2(x_46_im, x_46_re) * exp((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_] := If[Or[LessEqual[y$46$re, -1.15e+30], N[Not[LessEqual[y$46$re, 7.6e-14]], $MachinePrecision]], N[(N[Sin[N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Power[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision], y$46$re], $MachinePrecision]), $MachinePrecision], N[(y$46$re * N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * N[Exp[N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * (-y$46$im)), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y.re \leq -1.15 \cdot 10^{+30} \lor \neg \left(y.re \leq 7.6 \cdot 10^{-14}\right):\\
\;\;\;\;\sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re}\\
\mathbf{else}:\\
\;\;\;\;y.re \cdot \left(\tan^{-1}_* \frac{x.im}{x.re} \cdot e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot \left(-y.im\right)}\right)\\
\end{array}
\end{array}
if y.re < -1.15e30 or 7.6000000000000004e-14 < y.re Initial program 38.1%
Taylor expanded in y.im around 0 75.4%
Taylor expanded in y.im around 0 74.7%
unpow274.7%
unpow274.7%
hypot-def74.7%
Simplified74.7%
if -1.15e30 < y.re < 7.6000000000000004e-14Initial program 44.2%
Taylor expanded in y.im around 0 40.4%
Taylor expanded in y.re around 0 58.4%
*-commutative58.4%
distribute-rgt-neg-in58.4%
Simplified58.4%
Final simplification66.4%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (* y.re (atan2 x.im x.re))) (t_1 (* (sin t_0) (pow x.im y.re))))
(if (<= y.re -1.1e+43)
t_1
(if (<= y.re -2.4e-81)
(log1p (expm1 t_0))
(if (<= y.re -2.35e-99)
(+ (exp (log1p t_0)) -1.0)
(if (<= y.re 950000000.0) (cbrt (pow t_0 3.0)) t_1))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = y_46_re * atan2(x_46_im, x_46_re);
double t_1 = sin(t_0) * pow(x_46_im, y_46_re);
double tmp;
if (y_46_re <= -1.1e+43) {
tmp = t_1;
} else if (y_46_re <= -2.4e-81) {
tmp = log1p(expm1(t_0));
} else if (y_46_re <= -2.35e-99) {
tmp = exp(log1p(t_0)) + -1.0;
} else if (y_46_re <= 950000000.0) {
tmp = cbrt(pow(t_0, 3.0));
} else {
tmp = t_1;
}
return tmp;
}
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = y_46_re * Math.atan2(x_46_im, x_46_re);
double t_1 = Math.sin(t_0) * Math.pow(x_46_im, y_46_re);
double tmp;
if (y_46_re <= -1.1e+43) {
tmp = t_1;
} else if (y_46_re <= -2.4e-81) {
tmp = Math.log1p(Math.expm1(t_0));
} else if (y_46_re <= -2.35e-99) {
tmp = Math.exp(Math.log1p(t_0)) + -1.0;
} else if (y_46_re <= 950000000.0) {
tmp = Math.cbrt(Math.pow(t_0, 3.0));
} else {
tmp = t_1;
}
return tmp;
}
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = Float64(y_46_re * atan(x_46_im, x_46_re)) t_1 = Float64(sin(t_0) * (x_46_im ^ y_46_re)) tmp = 0.0 if (y_46_re <= -1.1e+43) tmp = t_1; elseif (y_46_re <= -2.4e-81) tmp = log1p(expm1(t_0)); elseif (y_46_re <= -2.35e-99) tmp = Float64(exp(log1p(t_0)) + -1.0); elseif (y_46_re <= 950000000.0) tmp = cbrt((t_0 ^ 3.0)); else tmp = t_1; end return tmp end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(N[Sin[t$95$0], $MachinePrecision] * N[Power[x$46$im, y$46$re], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y$46$re, -1.1e+43], t$95$1, If[LessEqual[y$46$re, -2.4e-81], N[Log[1 + N[(Exp[t$95$0] - 1), $MachinePrecision]], $MachinePrecision], If[LessEqual[y$46$re, -2.35e-99], N[(N[Exp[N[Log[1 + t$95$0], $MachinePrecision]], $MachinePrecision] + -1.0), $MachinePrecision], If[LessEqual[y$46$re, 950000000.0], N[Power[N[Power[t$95$0, 3.0], $MachinePrecision], 1/3], $MachinePrecision], t$95$1]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
t_1 := \sin t_0 \cdot {x.im}^{y.re}\\
\mathbf{if}\;y.re \leq -1.1 \cdot 10^{+43}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y.re \leq -2.4 \cdot 10^{-81}:\\
\;\;\;\;\mathsf{log1p}\left(\mathsf{expm1}\left(t_0\right)\right)\\
\mathbf{elif}\;y.re \leq -2.35 \cdot 10^{-99}:\\
\;\;\;\;e^{\mathsf{log1p}\left(t_0\right)} + -1\\
\mathbf{elif}\;y.re \leq 950000000:\\
\;\;\;\;\sqrt[3]{{t_0}^{3}}\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if y.re < -1.1e43 or 9.5e8 < y.re Initial program 37.8%
Taylor expanded in y.im around 0 76.5%
Taylor expanded in x.re around 0 35.4%
Taylor expanded in y.im around 0 59.2%
if -1.1e43 < y.re < -2.3999999999999999e-81Initial program 66.5%
Taylor expanded in y.im around 0 73.9%
Taylor expanded in y.re around 0 80.6%
*-commutative80.6%
distribute-rgt-neg-in80.6%
Simplified80.6%
Taylor expanded in y.im around 0 54.8%
*-commutative54.8%
log1p-expm1-u61.0%
Applied egg-rr61.0%
if -2.3999999999999999e-81 < y.re < -2.34999999999999995e-99Initial program 33.3%
Taylor expanded in y.im around 0 100.0%
Taylor expanded in y.re around 0 100.0%
*-commutative100.0%
distribute-rgt-neg-in100.0%
Simplified100.0%
Taylor expanded in y.im around 0 4.0%
expm1-log1p-u4.0%
expm1-udef100.0%
*-commutative100.0%
Applied egg-rr100.0%
if -2.34999999999999995e-99 < y.re < 9.5e8Initial program 41.8%
Taylor expanded in y.im around 0 34.0%
Taylor expanded in y.re around 0 51.3%
*-commutative51.3%
distribute-rgt-neg-in51.3%
Simplified51.3%
Taylor expanded in y.im around 0 22.7%
add-cbrt-cube28.0%
pow328.0%
*-commutative28.0%
Applied egg-rr28.0%
Final simplification46.2%
(FPCore (x.re x.im y.re y.im) :precision binary64 (if (or (<= y.re -1.25e+43) (not (<= y.re 920000000000.0))) (* (sin (* y.re (atan2 x.im x.re))) (pow x.im y.re)) (* y.re (* (atan2 x.im x.re) (exp (* (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 tmp;
if ((y_46_re <= -1.25e+43) || !(y_46_re <= 920000000000.0)) {
tmp = sin((y_46_re * atan2(x_46_im, x_46_re))) * pow(x_46_im, y_46_re);
} else {
tmp = y_46_re * (atan2(x_46_im, x_46_re) * exp((atan2(x_46_im, x_46_re) * -y_46_im)));
}
return tmp;
}
real(8) function code(x_46re, x_46im, y_46re, y_46im)
real(8), intent (in) :: x_46re
real(8), intent (in) :: x_46im
real(8), intent (in) :: y_46re
real(8), intent (in) :: y_46im
real(8) :: tmp
if ((y_46re <= (-1.25d+43)) .or. (.not. (y_46re <= 920000000000.0d0))) then
tmp = sin((y_46re * atan2(x_46im, x_46re))) * (x_46im ** y_46re)
else
tmp = y_46re * (atan2(x_46im, x_46re) * exp((atan2(x_46im, x_46re) * -y_46im)))
end if
code = tmp
end function
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double tmp;
if ((y_46_re <= -1.25e+43) || !(y_46_re <= 920000000000.0)) {
tmp = Math.sin((y_46_re * Math.atan2(x_46_im, x_46_re))) * Math.pow(x_46_im, y_46_re);
} else {
tmp = y_46_re * (Math.atan2(x_46_im, x_46_re) * Math.exp((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): tmp = 0 if (y_46_re <= -1.25e+43) or not (y_46_re <= 920000000000.0): tmp = math.sin((y_46_re * math.atan2(x_46_im, x_46_re))) * math.pow(x_46_im, y_46_re) else: tmp = y_46_re * (math.atan2(x_46_im, x_46_re) * math.exp((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) tmp = 0.0 if ((y_46_re <= -1.25e+43) || !(y_46_re <= 920000000000.0)) tmp = Float64(sin(Float64(y_46_re * atan(x_46_im, x_46_re))) * (x_46_im ^ y_46_re)); else tmp = Float64(y_46_re * Float64(atan(x_46_im, x_46_re) * exp(Float64(atan(x_46_im, x_46_re) * Float64(-y_46_im))))); 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 <= -1.25e+43) || ~((y_46_re <= 920000000000.0))) tmp = sin((y_46_re * atan2(x_46_im, x_46_re))) * (x_46_im ^ y_46_re); else tmp = y_46_re * (atan2(x_46_im, x_46_re) * exp((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_] := If[Or[LessEqual[y$46$re, -1.25e+43], N[Not[LessEqual[y$46$re, 920000000000.0]], $MachinePrecision]], N[(N[Sin[N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Power[x$46$im, y$46$re], $MachinePrecision]), $MachinePrecision], N[(y$46$re * N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * N[Exp[N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * (-y$46$im)), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y.re \leq -1.25 \cdot 10^{+43} \lor \neg \left(y.re \leq 920000000000\right):\\
\;\;\;\;\sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {x.im}^{y.re}\\
\mathbf{else}:\\
\;\;\;\;y.re \cdot \left(\tan^{-1}_* \frac{x.im}{x.re} \cdot e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot \left(-y.im\right)}\right)\\
\end{array}
\end{array}
if y.re < -1.2500000000000001e43 or 9.2e11 < y.re Initial program 37.8%
Taylor expanded in y.im around 0 76.5%
Taylor expanded in x.re around 0 35.4%
Taylor expanded in y.im around 0 59.2%
if -1.2500000000000001e43 < y.re < 9.2e11Initial program 44.1%
Taylor expanded in y.im around 0 41.3%
Taylor expanded in y.re around 0 56.7%
*-commutative56.7%
distribute-rgt-neg-in56.7%
Simplified56.7%
Final simplification57.9%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (* y.re (atan2 x.im x.re))))
(if (or (<= y.im -4.9e-18) (not (<= y.im 1.3e-58)))
(+ (exp (log1p t_0)) -1.0)
(log1p (expm1 t_0)))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = y_46_re * atan2(x_46_im, x_46_re);
double tmp;
if ((y_46_im <= -4.9e-18) || !(y_46_im <= 1.3e-58)) {
tmp = exp(log1p(t_0)) + -1.0;
} else {
tmp = log1p(expm1(t_0));
}
return tmp;
}
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = y_46_re * Math.atan2(x_46_im, x_46_re);
double tmp;
if ((y_46_im <= -4.9e-18) || !(y_46_im <= 1.3e-58)) {
tmp = Math.exp(Math.log1p(t_0)) + -1.0;
} else {
tmp = Math.log1p(Math.expm1(t_0));
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): t_0 = y_46_re * math.atan2(x_46_im, x_46_re) tmp = 0 if (y_46_im <= -4.9e-18) or not (y_46_im <= 1.3e-58): tmp = math.exp(math.log1p(t_0)) + -1.0 else: tmp = math.log1p(math.expm1(t_0)) return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = Float64(y_46_re * atan(x_46_im, x_46_re)) tmp = 0.0 if ((y_46_im <= -4.9e-18) || !(y_46_im <= 1.3e-58)) tmp = Float64(exp(log1p(t_0)) + -1.0); else tmp = log1p(expm1(t_0)); end return tmp end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, If[Or[LessEqual[y$46$im, -4.9e-18], N[Not[LessEqual[y$46$im, 1.3e-58]], $MachinePrecision]], N[(N[Exp[N[Log[1 + t$95$0], $MachinePrecision]], $MachinePrecision] + -1.0), $MachinePrecision], N[Log[1 + N[(Exp[t$95$0] - 1), $MachinePrecision]], $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
\mathbf{if}\;y.im \leq -4.9 \cdot 10^{-18} \lor \neg \left(y.im \leq 1.3 \cdot 10^{-58}\right):\\
\;\;\;\;e^{\mathsf{log1p}\left(t_0\right)} + -1\\
\mathbf{else}:\\
\;\;\;\;\mathsf{log1p}\left(\mathsf{expm1}\left(t_0\right)\right)\\
\end{array}
\end{array}
if y.im < -4.9000000000000001e-18 or 1.30000000000000003e-58 < y.im Initial program 37.4%
Taylor expanded in y.im around 0 55.8%
Taylor expanded in y.re around 0 51.4%
*-commutative51.4%
distribute-rgt-neg-in51.4%
Simplified51.4%
Taylor expanded in y.im around 0 4.6%
expm1-log1p-u4.2%
expm1-udef29.0%
*-commutative29.0%
Applied egg-rr29.0%
if -4.9000000000000001e-18 < y.im < 1.30000000000000003e-58Initial program 45.1%
Taylor expanded in y.im around 0 59.5%
Taylor expanded in y.re around 0 26.8%
*-commutative26.8%
distribute-rgt-neg-in26.8%
Simplified26.8%
Taylor expanded in y.im around 0 26.8%
*-commutative26.8%
log1p-expm1-u37.1%
Applied egg-rr37.1%
Final simplification33.0%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (* y.re (atan2 x.im x.re))))
(if (<= y.im -4.6e-18)
(+ (exp (log1p t_0)) -1.0)
(if (<= y.im 1e-58)
(log1p (expm1 t_0))
(pow (pow t_0 3.0) 0.3333333333333333)))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = y_46_re * atan2(x_46_im, x_46_re);
double tmp;
if (y_46_im <= -4.6e-18) {
tmp = exp(log1p(t_0)) + -1.0;
} else if (y_46_im <= 1e-58) {
tmp = log1p(expm1(t_0));
} else {
tmp = pow(pow(t_0, 3.0), 0.3333333333333333);
}
return tmp;
}
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = y_46_re * Math.atan2(x_46_im, x_46_re);
double tmp;
if (y_46_im <= -4.6e-18) {
tmp = Math.exp(Math.log1p(t_0)) + -1.0;
} else if (y_46_im <= 1e-58) {
tmp = Math.log1p(Math.expm1(t_0));
} else {
tmp = Math.pow(Math.pow(t_0, 3.0), 0.3333333333333333);
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): t_0 = y_46_re * math.atan2(x_46_im, x_46_re) tmp = 0 if y_46_im <= -4.6e-18: tmp = math.exp(math.log1p(t_0)) + -1.0 elif y_46_im <= 1e-58: tmp = math.log1p(math.expm1(t_0)) else: tmp = math.pow(math.pow(t_0, 3.0), 0.3333333333333333) return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = Float64(y_46_re * atan(x_46_im, x_46_re)) tmp = 0.0 if (y_46_im <= -4.6e-18) tmp = Float64(exp(log1p(t_0)) + -1.0); elseif (y_46_im <= 1e-58) tmp = log1p(expm1(t_0)); else tmp = (t_0 ^ 3.0) ^ 0.3333333333333333; end return tmp end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y$46$im, -4.6e-18], N[(N[Exp[N[Log[1 + t$95$0], $MachinePrecision]], $MachinePrecision] + -1.0), $MachinePrecision], If[LessEqual[y$46$im, 1e-58], N[Log[1 + N[(Exp[t$95$0] - 1), $MachinePrecision]], $MachinePrecision], N[Power[N[Power[t$95$0, 3.0], $MachinePrecision], 0.3333333333333333], $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
\mathbf{if}\;y.im \leq -4.6 \cdot 10^{-18}:\\
\;\;\;\;e^{\mathsf{log1p}\left(t_0\right)} + -1\\
\mathbf{elif}\;y.im \leq 10^{-58}:\\
\;\;\;\;\mathsf{log1p}\left(\mathsf{expm1}\left(t_0\right)\right)\\
\mathbf{else}:\\
\;\;\;\;{\left({t_0}^{3}\right)}^{0.3333333333333333}\\
\end{array}
\end{array}
if y.im < -4.6000000000000002e-18Initial program 42.5%
Taylor expanded in y.im around 0 66.9%
Taylor expanded in y.re around 0 56.9%
*-commutative56.9%
distribute-rgt-neg-in56.9%
Simplified56.9%
Taylor expanded in y.im around 0 6.5%
expm1-log1p-u6.0%
expm1-udef32.6%
*-commutative32.6%
Applied egg-rr32.6%
if -4.6000000000000002e-18 < y.im < 1e-58Initial program 45.1%
Taylor expanded in y.im around 0 59.5%
Taylor expanded in y.re around 0 26.8%
*-commutative26.8%
distribute-rgt-neg-in26.8%
Simplified26.8%
Taylor expanded in y.im around 0 26.8%
*-commutative26.8%
log1p-expm1-u37.1%
Applied egg-rr37.1%
if 1e-58 < y.im Initial program 33.5%
Taylor expanded in y.im around 0 47.1%
Taylor expanded in y.re around 0 47.2%
*-commutative47.2%
distribute-rgt-neg-in47.2%
Simplified47.2%
Taylor expanded in y.im around 0 3.1%
add-cbrt-cube26.1%
pow1/331.1%
pow331.1%
*-commutative31.1%
Applied egg-rr31.1%
Final simplification34.4%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (* y.re (atan2 x.im x.re))))
(if (or (<= y.im -3.6e-13) (not (<= y.im 1.22e-58)))
(cbrt (pow t_0 3.0))
(log1p (expm1 t_0)))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = y_46_re * atan2(x_46_im, x_46_re);
double tmp;
if ((y_46_im <= -3.6e-13) || !(y_46_im <= 1.22e-58)) {
tmp = cbrt(pow(t_0, 3.0));
} else {
tmp = log1p(expm1(t_0));
}
return tmp;
}
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = y_46_re * Math.atan2(x_46_im, x_46_re);
double tmp;
if ((y_46_im <= -3.6e-13) || !(y_46_im <= 1.22e-58)) {
tmp = Math.cbrt(Math.pow(t_0, 3.0));
} else {
tmp = Math.log1p(Math.expm1(t_0));
}
return tmp;
}
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = Float64(y_46_re * atan(x_46_im, x_46_re)) tmp = 0.0 if ((y_46_im <= -3.6e-13) || !(y_46_im <= 1.22e-58)) tmp = cbrt((t_0 ^ 3.0)); else tmp = log1p(expm1(t_0)); end return tmp end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, If[Or[LessEqual[y$46$im, -3.6e-13], N[Not[LessEqual[y$46$im, 1.22e-58]], $MachinePrecision]], N[Power[N[Power[t$95$0, 3.0], $MachinePrecision], 1/3], $MachinePrecision], N[Log[1 + N[(Exp[t$95$0] - 1), $MachinePrecision]], $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
\mathbf{if}\;y.im \leq -3.6 \cdot 10^{-13} \lor \neg \left(y.im \leq 1.22 \cdot 10^{-58}\right):\\
\;\;\;\;\sqrt[3]{{t_0}^{3}}\\
\mathbf{else}:\\
\;\;\;\;\mathsf{log1p}\left(\mathsf{expm1}\left(t_0\right)\right)\\
\end{array}
\end{array}
if y.im < -3.5999999999999998e-13 or 1.2199999999999999e-58 < y.im Initial program 36.9%
Taylor expanded in y.im around 0 55.5%
Taylor expanded in y.re around 0 51.8%
*-commutative51.8%
distribute-rgt-neg-in51.8%
Simplified51.8%
Taylor expanded in y.im around 0 4.6%
add-cbrt-cube27.8%
pow327.8%
*-commutative27.8%
Applied egg-rr27.8%
if -3.5999999999999998e-13 < y.im < 1.2199999999999999e-58Initial program 45.5%
Taylor expanded in y.im around 0 59.8%
Taylor expanded in y.re around 0 26.7%
*-commutative26.7%
distribute-rgt-neg-in26.7%
Simplified26.7%
Taylor expanded in y.im around 0 26.7%
*-commutative26.7%
log1p-expm1-u36.9%
Applied egg-rr36.9%
Final simplification32.3%
(FPCore (x.re x.im y.re y.im) :precision binary64 (log1p (expm1 (* 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 log1p(expm1((y_46_re * atan2(x_46_im, x_46_re))));
}
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
return Math.log1p(Math.expm1((y_46_re * Math.atan2(x_46_im, x_46_re))));
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): return math.log1p(math.expm1((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 log1p(expm1(Float64(y_46_re * atan(x_46_im, x_46_re)))) end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := N[Log[1 + N[(Exp[N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]] - 1), $MachinePrecision]], $MachinePrecision]
\begin{array}{l}
\\
\mathsf{log1p}\left(\mathsf{expm1}\left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)
\end{array}
Initial program 41.2%
Taylor expanded in y.im around 0 57.6%
Taylor expanded in y.re around 0 39.3%
*-commutative39.3%
distribute-rgt-neg-in39.3%
Simplified39.3%
Taylor expanded in y.im around 0 15.5%
*-commutative15.5%
log1p-expm1-u26.5%
Applied egg-rr26.5%
Final simplification26.5%
(FPCore (x.re x.im y.re y.im) :precision binary64 (* y.re (atan2 x.im x.re)))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
return y_46_re * atan2(x_46_im, x_46_re);
}
real(8) function code(x_46re, x_46im, y_46re, y_46im)
real(8), intent (in) :: x_46re
real(8), intent (in) :: x_46im
real(8), intent (in) :: y_46re
real(8), intent (in) :: y_46im
code = y_46re * atan2(x_46im, x_46re)
end function
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
return y_46_re * Math.atan2(x_46_im, x_46_re);
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): return y_46_re * math.atan2(x_46_im, x_46_re)
function code(x_46_re, x_46_im, y_46_re, y_46_im) return Float64(y_46_re * atan(x_46_im, x_46_re)) end
function tmp = code(x_46_re, x_46_im, y_46_re, y_46_im) tmp = y_46_re * atan2(x_46_im, x_46_re); end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}
\end{array}
Initial program 41.2%
Taylor expanded in y.im around 0 57.6%
Taylor expanded in y.re around 0 39.3%
*-commutative39.3%
distribute-rgt-neg-in39.3%
Simplified39.3%
Taylor expanded in y.im around 0 15.5%
Final simplification15.5%
herbie shell --seed 2024013
(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)))))