
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (log (sqrt (+ (* x.re x.re) (* x.im x.im))))))
(*
(exp (- (* t_0 y.re) (* (atan2 x.im x.re) y.im)))
(sin (+ (* t_0 y.im) (* (atan2 x.im x.re) y.re))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))));
return exp(((t_0 * y_46_re) - (atan2(x_46_im, x_46_re) * y_46_im))) * sin(((t_0 * y_46_im) + (atan2(x_46_im, x_46_re) * y_46_re)));
}
real(8) function code(x_46re, x_46im, y_46re, y_46im)
real(8), intent (in) :: x_46re
real(8), intent (in) :: x_46im
real(8), intent (in) :: y_46re
real(8), intent (in) :: y_46im
real(8) :: t_0
t_0 = log(sqrt(((x_46re * x_46re) + (x_46im * x_46im))))
code = exp(((t_0 * y_46re) - (atan2(x_46im, x_46re) * y_46im))) * sin(((t_0 * y_46im) + (atan2(x_46im, x_46re) * y_46re)))
end function
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = Math.log(Math.sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))));
return Math.exp(((t_0 * y_46_re) - (Math.atan2(x_46_im, x_46_re) * y_46_im))) * Math.sin(((t_0 * y_46_im) + (Math.atan2(x_46_im, x_46_re) * y_46_re)));
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): t_0 = math.log(math.sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im)))) return math.exp(((t_0 * y_46_re) - (math.atan2(x_46_im, x_46_re) * y_46_im))) * math.sin(((t_0 * y_46_im) + (math.atan2(x_46_im, x_46_re) * y_46_re)))
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = log(sqrt(Float64(Float64(x_46_re * x_46_re) + Float64(x_46_im * x_46_im)))) return Float64(exp(Float64(Float64(t_0 * y_46_re) - Float64(atan(x_46_im, x_46_re) * y_46_im))) * sin(Float64(Float64(t_0 * y_46_im) + Float64(atan(x_46_im, x_46_re) * y_46_re)))) end
function tmp = code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im)))); tmp = exp(((t_0 * y_46_re) - (atan2(x_46_im, x_46_re) * y_46_im))) * sin(((t_0 * y_46_im) + (atan2(x_46_im, x_46_re) * y_46_re))); end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[Log[N[Sqrt[N[(N[(x$46$re * x$46$re), $MachinePrecision] + N[(x$46$im * x$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]}, N[(N[Exp[N[(N[(t$95$0 * y$46$re), $MachinePrecision] - N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Sin[N[(N[(t$95$0 * y$46$im), $MachinePrecision] + N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$re), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right)\\
e^{t\_0 \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \sin \left(t\_0 \cdot y.im + \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)
\end{array}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 20 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (log (sqrt (+ (* x.re x.re) (* x.im x.im))))))
(*
(exp (- (* t_0 y.re) (* (atan2 x.im x.re) y.im)))
(sin (+ (* t_0 y.im) (* (atan2 x.im x.re) y.re))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))));
return exp(((t_0 * y_46_re) - (atan2(x_46_im, x_46_re) * y_46_im))) * sin(((t_0 * y_46_im) + (atan2(x_46_im, x_46_re) * y_46_re)));
}
real(8) function code(x_46re, x_46im, y_46re, y_46im)
real(8), intent (in) :: x_46re
real(8), intent (in) :: x_46im
real(8), intent (in) :: y_46re
real(8), intent (in) :: y_46im
real(8) :: t_0
t_0 = log(sqrt(((x_46re * x_46re) + (x_46im * x_46im))))
code = exp(((t_0 * y_46re) - (atan2(x_46im, x_46re) * y_46im))) * sin(((t_0 * y_46im) + (atan2(x_46im, x_46re) * y_46re)))
end function
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = Math.log(Math.sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))));
return Math.exp(((t_0 * y_46_re) - (Math.atan2(x_46_im, x_46_re) * y_46_im))) * Math.sin(((t_0 * y_46_im) + (Math.atan2(x_46_im, x_46_re) * y_46_re)));
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): t_0 = math.log(math.sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im)))) return math.exp(((t_0 * y_46_re) - (math.atan2(x_46_im, x_46_re) * y_46_im))) * math.sin(((t_0 * y_46_im) + (math.atan2(x_46_im, x_46_re) * y_46_re)))
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = log(sqrt(Float64(Float64(x_46_re * x_46_re) + Float64(x_46_im * x_46_im)))) return Float64(exp(Float64(Float64(t_0 * y_46_re) - Float64(atan(x_46_im, x_46_re) * y_46_im))) * sin(Float64(Float64(t_0 * y_46_im) + Float64(atan(x_46_im, x_46_re) * y_46_re)))) end
function tmp = code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im)))); tmp = exp(((t_0 * y_46_re) - (atan2(x_46_im, x_46_re) * y_46_im))) * sin(((t_0 * y_46_im) + (atan2(x_46_im, x_46_re) * y_46_re))); end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[Log[N[Sqrt[N[(N[(x$46$re * x$46$re), $MachinePrecision] + N[(x$46$im * x$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]}, N[(N[Exp[N[(N[(t$95$0 * y$46$re), $MachinePrecision] - N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Sin[N[(N[(t$95$0 * y$46$im), $MachinePrecision] + N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$re), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right)\\
e^{t\_0 \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \sin \left(t\_0 \cdot y.im + \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)
\end{array}
\end{array}
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (* y.re (atan2 x.im x.re)))
(t_1 (sin t_0))
(t_2
(exp
(-
(* y.re (log (sqrt (+ (* x.re x.re) (* x.im x.im)))))
(* y.im (atan2 x.im x.re)))))
(t_3 (log (hypot x.re x.im)))
(t_4 (* y.im t_3))
(t_5 (exp (fma t_3 y.re (* y.im (- (atan2 x.im x.re)))))))
(if (<= y.re -800000000.0)
(* t_2 (fabs t_1))
(if (<= y.re 2.7e+118)
(* t_5 (sin (fma t_3 y.im t_0)))
(if (<= y.re 8e+203)
(*
(pow (hypot x.im x.re) y.re)
(sin (pow (pow (cbrt (fma (atan2 x.im x.re) y.re t_4)) 2.0) 1.5)))
(if (<= y.re 2e+214)
(* t_2 (+ (* y.im (log (hypot x.im x.re))) t_1))
(* t_5 (sin (pow (cbrt t_4) 3.0)))))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = y_46_re * atan2(x_46_im, x_46_re);
double t_1 = sin(t_0);
double t_2 = exp(((y_46_re * log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))) - (y_46_im * atan2(x_46_im, x_46_re))));
double t_3 = log(hypot(x_46_re, x_46_im));
double t_4 = y_46_im * t_3;
double t_5 = exp(fma(t_3, y_46_re, (y_46_im * -atan2(x_46_im, x_46_re))));
double tmp;
if (y_46_re <= -800000000.0) {
tmp = t_2 * fabs(t_1);
} else if (y_46_re <= 2.7e+118) {
tmp = t_5 * sin(fma(t_3, y_46_im, t_0));
} else if (y_46_re <= 8e+203) {
tmp = pow(hypot(x_46_im, x_46_re), y_46_re) * sin(pow(pow(cbrt(fma(atan2(x_46_im, x_46_re), y_46_re, t_4)), 2.0), 1.5));
} else if (y_46_re <= 2e+214) {
tmp = t_2 * ((y_46_im * log(hypot(x_46_im, x_46_re))) + t_1);
} else {
tmp = t_5 * sin(pow(cbrt(t_4), 3.0));
}
return tmp;
}
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = Float64(y_46_re * atan(x_46_im, x_46_re)) t_1 = sin(t_0) t_2 = exp(Float64(Float64(y_46_re * log(sqrt(Float64(Float64(x_46_re * x_46_re) + Float64(x_46_im * x_46_im))))) - Float64(y_46_im * atan(x_46_im, x_46_re)))) t_3 = log(hypot(x_46_re, x_46_im)) t_4 = Float64(y_46_im * t_3) t_5 = exp(fma(t_3, y_46_re, Float64(y_46_im * Float64(-atan(x_46_im, x_46_re))))) tmp = 0.0 if (y_46_re <= -800000000.0) tmp = Float64(t_2 * abs(t_1)); elseif (y_46_re <= 2.7e+118) tmp = Float64(t_5 * sin(fma(t_3, y_46_im, t_0))); elseif (y_46_re <= 8e+203) tmp = Float64((hypot(x_46_im, x_46_re) ^ y_46_re) * sin(((cbrt(fma(atan(x_46_im, x_46_re), y_46_re, t_4)) ^ 2.0) ^ 1.5))); elseif (y_46_re <= 2e+214) tmp = Float64(t_2 * Float64(Float64(y_46_im * log(hypot(x_46_im, x_46_re))) + t_1)); else tmp = Float64(t_5 * sin((cbrt(t_4) ^ 3.0))); end return tmp end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[Sin[t$95$0], $MachinePrecision]}, Block[{t$95$2 = N[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[(y$46$im * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$3 = N[Log[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision]], $MachinePrecision]}, Block[{t$95$4 = N[(y$46$im * t$95$3), $MachinePrecision]}, Block[{t$95$5 = N[Exp[N[(t$95$3 * y$46$re + N[(y$46$im * (-N[ArcTan[x$46$im / x$46$re], $MachinePrecision])), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[y$46$re, -800000000.0], N[(t$95$2 * N[Abs[t$95$1], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$re, 2.7e+118], N[(t$95$5 * N[Sin[N[(t$95$3 * y$46$im + t$95$0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$re, 8e+203], N[(N[Power[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision], y$46$re], $MachinePrecision] * N[Sin[N[Power[N[Power[N[Power[N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$re + t$95$4), $MachinePrecision], 1/3], $MachinePrecision], 2.0], $MachinePrecision], 1.5], $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$re, 2e+214], N[(t$95$2 * N[(N[(y$46$im * N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]), $MachinePrecision] + t$95$1), $MachinePrecision]), $MachinePrecision], N[(t$95$5 * N[Sin[N[Power[N[Power[t$95$4, 1/3], $MachinePrecision], 3.0], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
t_1 := \sin t\_0\\
t_2 := e^{y.re \cdot \log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) - y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}}\\
t_3 := \log \left(\mathsf{hypot}\left(x.re, x.im\right)\right)\\
t_4 := y.im \cdot t\_3\\
t_5 := e^{\mathsf{fma}\left(t\_3, y.re, y.im \cdot \left(-\tan^{-1}_* \frac{x.im}{x.re}\right)\right)}\\
\mathbf{if}\;y.re \leq -800000000:\\
\;\;\;\;t\_2 \cdot \left|t\_1\right|\\
\mathbf{elif}\;y.re \leq 2.7 \cdot 10^{+118}:\\
\;\;\;\;t\_5 \cdot \sin \left(\mathsf{fma}\left(t\_3, y.im, t\_0\right)\right)\\
\mathbf{elif}\;y.re \leq 8 \cdot 10^{+203}:\\
\;\;\;\;{\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re} \cdot \sin \left({\left({\left(\sqrt[3]{\mathsf{fma}\left(\tan^{-1}_* \frac{x.im}{x.re}, y.re, t\_4\right)}\right)}^{2}\right)}^{1.5}\right)\\
\mathbf{elif}\;y.re \leq 2 \cdot 10^{+214}:\\
\;\;\;\;t\_2 \cdot \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right) + t\_1\right)\\
\mathbf{else}:\\
\;\;\;\;t\_5 \cdot \sin \left({\left(\sqrt[3]{t\_4}\right)}^{3}\right)\\
\end{array}
\end{array}
if y.re < -8e8Initial program 31.8%
Taylor expanded in y.im around 0 83.4%
add-sqr-sqrt56.1%
sqrt-unprod92.4%
pow292.4%
*-commutative92.4%
Applied egg-rr92.4%
unpow292.4%
rem-sqrt-square92.4%
*-commutative92.4%
Simplified92.4%
if -8e8 < y.re < 2.7e118Initial program 40.0%
fma-neg40.0%
hypot-define40.0%
distribute-rgt-neg-out40.0%
fma-define40.0%
hypot-define81.9%
*-commutative81.9%
Simplified81.9%
if 2.7e118 < y.re < 7.9999999999999999e203Initial program 50.0%
exp-diff41.7%
exp-to-pow41.7%
hypot-define41.7%
*-commutative41.7%
exp-prod41.7%
fma-define41.7%
hypot-define50.0%
*-commutative50.0%
Simplified50.0%
add-cbrt-cube8.3%
pow38.3%
fma-undefine8.3%
*-commutative8.3%
*-commutative8.3%
fma-define8.3%
Applied egg-rr8.3%
Taylor expanded in y.im around 0 8.3%
unpow28.3%
unpow28.3%
hypot-undefine8.3%
Simplified8.3%
rem-cbrt-cube58.3%
rem-cube-cbrt75.0%
sqr-pow58.3%
pow-prod-down100.0%
pow2100.0%
metadata-eval100.0%
Applied egg-rr100.0%
fma-define100.0%
+-commutative100.0%
fma-define100.0%
Simplified100.0%
if 7.9999999999999999e203 < y.re < 1.9999999999999999e214Initial program 50.0%
Taylor expanded in y.im around 0 75.0%
+-commutative75.0%
associate-*r*75.0%
unpow275.0%
unpow275.0%
hypot-undefine100.0%
Simplified100.0%
Taylor expanded in y.re around 0 100.0%
if 1.9999999999999999e214 < y.re Initial program 29.2%
fma-neg29.2%
hypot-define29.2%
distribute-rgt-neg-out29.2%
fma-define29.2%
hypot-define54.2%
*-commutative54.2%
Simplified54.2%
add-cube-cbrt62.5%
pow370.8%
fma-undefine70.8%
*-commutative70.8%
*-commutative70.8%
fma-define70.8%
Applied egg-rr70.8%
Taylor expanded in y.re around 0 25.0%
unpow1/350.0%
+-commutative50.0%
unpow250.0%
unpow250.0%
hypot-undefine83.3%
Simplified83.3%
Final simplification85.9%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (log (hypot x.re x.im)))
(t_1 (cbrt (fma y.im t_0 (* y.re (atan2 x.im x.re)))))
(t_2 (exp (fma t_0 y.re (* y.im (- (atan2 x.im x.re))))))
(t_3
(fabs
(cbrt
(fma (atan2 x.im x.re) y.re (* y.im (log (hypot x.im x.re))))))))
(if (<= y.im -1.6e+69)
(* t_2 (sin (pow (* (pow (cbrt t_1) 2.0) (cbrt t_3)) 3.0)))
(if (<= y.im 0.001)
(* t_2 (sin (pow t_1 3.0)))
(* t_2 (sin (pow t_3 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 = cbrt(fma(y_46_im, t_0, (y_46_re * atan2(x_46_im, x_46_re))));
double t_2 = exp(fma(t_0, y_46_re, (y_46_im * -atan2(x_46_im, x_46_re))));
double t_3 = fabs(cbrt(fma(atan2(x_46_im, x_46_re), y_46_re, (y_46_im * log(hypot(x_46_im, x_46_re))))));
double tmp;
if (y_46_im <= -1.6e+69) {
tmp = t_2 * sin(pow((pow(cbrt(t_1), 2.0) * cbrt(t_3)), 3.0));
} else if (y_46_im <= 0.001) {
tmp = t_2 * sin(pow(t_1, 3.0));
} else {
tmp = t_2 * sin(pow(t_3, 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 = cbrt(fma(y_46_im, t_0, Float64(y_46_re * atan(x_46_im, x_46_re)))) t_2 = exp(fma(t_0, y_46_re, Float64(y_46_im * Float64(-atan(x_46_im, x_46_re))))) t_3 = abs(cbrt(fma(atan(x_46_im, x_46_re), y_46_re, Float64(y_46_im * log(hypot(x_46_im, x_46_re)))))) tmp = 0.0 if (y_46_im <= -1.6e+69) tmp = Float64(t_2 * sin((Float64((cbrt(t_1) ^ 2.0) * cbrt(t_3)) ^ 3.0))); elseif (y_46_im <= 0.001) tmp = Float64(t_2 * sin((t_1 ^ 3.0))); else tmp = Float64(t_2 * sin((t_3 ^ 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[Power[N[(y$46$im * t$95$0 + N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 1/3], $MachinePrecision]}, Block[{t$95$2 = N[Exp[N[(t$95$0 * y$46$re + N[(y$46$im * (-N[ArcTan[x$46$im / x$46$re], $MachinePrecision])), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$3 = N[Abs[N[Power[N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$re + N[(y$46$im * N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 1/3], $MachinePrecision]], $MachinePrecision]}, If[LessEqual[y$46$im, -1.6e+69], N[(t$95$2 * N[Sin[N[Power[N[(N[Power[N[Power[t$95$1, 1/3], $MachinePrecision], 2.0], $MachinePrecision] * N[Power[t$95$3, 1/3], $MachinePrecision]), $MachinePrecision], 3.0], $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$im, 0.001], N[(t$95$2 * N[Sin[N[Power[t$95$1, 3.0], $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(t$95$2 * N[Sin[N[Power[t$95$3, 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 := \sqrt[3]{\mathsf{fma}\left(y.im, t\_0, y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)}\\
t_2 := e^{\mathsf{fma}\left(t\_0, y.re, y.im \cdot \left(-\tan^{-1}_* \frac{x.im}{x.re}\right)\right)}\\
t_3 := \left|\sqrt[3]{\mathsf{fma}\left(\tan^{-1}_* \frac{x.im}{x.re}, y.re, y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right)}\right|\\
\mathbf{if}\;y.im \leq -1.6 \cdot 10^{+69}:\\
\;\;\;\;t\_2 \cdot \sin \left({\left({\left(\sqrt[3]{t\_1}\right)}^{2} \cdot \sqrt[3]{t\_3}\right)}^{3}\right)\\
\mathbf{elif}\;y.im \leq 0.001:\\
\;\;\;\;t\_2 \cdot \sin \left({t\_1}^{3}\right)\\
\mathbf{else}:\\
\;\;\;\;t\_2 \cdot \sin \left({t\_3}^{3}\right)\\
\end{array}
\end{array}
if y.im < -1.59999999999999992e69Initial program 27.8%
fma-neg27.8%
hypot-define27.8%
distribute-rgt-neg-out27.8%
fma-define27.8%
hypot-define80.6%
*-commutative80.6%
Simplified80.6%
add-cube-cbrt80.1%
pow373.9%
fma-undefine73.9%
*-commutative73.9%
*-commutative73.9%
fma-define73.9%
Applied egg-rr73.9%
add-cube-cbrt70.5%
pow270.5%
Applied egg-rr70.5%
add-sqr-sqrt22.1%
sqrt-unprod84.1%
pow284.1%
Applied egg-rr84.1%
unpow284.1%
rem-sqrt-square84.1%
fma-define84.1%
+-commutative84.1%
fma-define84.1%
hypot-undefine33.3%
unpow233.3%
unpow233.3%
+-commutative33.3%
unpow233.3%
unpow233.3%
hypot-define84.1%
Simplified84.1%
if -1.59999999999999992e69 < y.im < 1e-3Initial program 42.9%
fma-neg42.9%
hypot-define42.9%
distribute-rgt-neg-out42.9%
fma-define42.1%
hypot-define82.3%
*-commutative82.3%
Simplified82.3%
add-cube-cbrt86.9%
pow386.9%
fma-undefine86.9%
*-commutative86.9%
*-commutative86.9%
fma-define86.9%
Applied egg-rr86.9%
if 1e-3 < y.im Initial program 35.9%
fma-neg35.9%
hypot-define35.9%
distribute-rgt-neg-out35.9%
fma-define35.9%
hypot-define68.2%
*-commutative68.2%
Simplified68.2%
add-cube-cbrt72.1%
pow372.1%
fma-undefine72.1%
*-commutative72.1%
*-commutative72.1%
fma-define72.1%
Applied egg-rr72.1%
add-sqr-sqrt54.6%
sqrt-unprod74.9%
pow274.9%
Applied egg-rr79.2%
unpow274.9%
rem-sqrt-square74.9%
fma-define74.9%
+-commutative74.9%
fma-define74.9%
hypot-undefine41.5%
unpow241.5%
unpow241.5%
+-commutative41.5%
unpow241.5%
unpow241.5%
hypot-define74.9%
Simplified79.2%
Final simplification84.2%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (log (hypot x.re x.im)))
(t_1 (* y.re (atan2 x.im x.re)))
(t_2 (log (sqrt (+ (* x.re x.re) (* x.im x.im)))))
(t_3 (exp (- (* y.re t_2) (* y.im (atan2 x.im x.re))))))
(if (<= (* t_3 (sin (+ (* y.im t_2) t_1))) INFINITY)
(* t_3 (+ (* y.im (log (hypot x.im x.re))) (sin t_1)))
(*
(exp (fma t_0 y.re (* y.im (- (atan2 x.im x.re)))))
(sin (pow (cbrt (fma y.im t_0 t_1)) 3.0))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = log(hypot(x_46_re, x_46_im));
double t_1 = y_46_re * atan2(x_46_im, x_46_re);
double t_2 = log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))));
double t_3 = exp(((y_46_re * t_2) - (y_46_im * atan2(x_46_im, x_46_re))));
double tmp;
if ((t_3 * sin(((y_46_im * t_2) + t_1))) <= ((double) INFINITY)) {
tmp = t_3 * ((y_46_im * log(hypot(x_46_im, x_46_re))) + sin(t_1));
} else {
tmp = exp(fma(t_0, y_46_re, (y_46_im * -atan2(x_46_im, x_46_re)))) * sin(pow(cbrt(fma(y_46_im, t_0, t_1)), 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 = Float64(y_46_re * atan(x_46_im, x_46_re)) t_2 = log(sqrt(Float64(Float64(x_46_re * x_46_re) + Float64(x_46_im * x_46_im)))) t_3 = exp(Float64(Float64(y_46_re * t_2) - Float64(y_46_im * atan(x_46_im, x_46_re)))) tmp = 0.0 if (Float64(t_3 * sin(Float64(Float64(y_46_im * t_2) + t_1))) <= Inf) tmp = Float64(t_3 * Float64(Float64(y_46_im * log(hypot(x_46_im, x_46_re))) + sin(t_1))); else tmp = Float64(exp(fma(t_0, y_46_re, Float64(y_46_im * Float64(-atan(x_46_im, x_46_re))))) * sin((cbrt(fma(y_46_im, t_0, t_1)) ^ 3.0))); end return tmp end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[Log[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision]], $MachinePrecision]}, Block[{t$95$1 = N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[Log[N[Sqrt[N[(N[(x$46$re * x$46$re), $MachinePrecision] + N[(x$46$im * x$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]}, Block[{t$95$3 = N[Exp[N[(N[(y$46$re * t$95$2), $MachinePrecision] - N[(y$46$im * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[N[(t$95$3 * N[Sin[N[(N[(y$46$im * t$95$2), $MachinePrecision] + t$95$1), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], Infinity], N[(t$95$3 * N[(N[(y$46$im * N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]), $MachinePrecision] + N[Sin[t$95$1], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[Exp[N[(t$95$0 * y$46$re + N[(y$46$im * (-N[ArcTan[x$46$im / x$46$re], $MachinePrecision])), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Sin[N[Power[N[Power[N[(y$46$im * t$95$0 + t$95$1), $MachinePrecision], 1/3], $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 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
t_2 := \log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right)\\
t_3 := e^{y.re \cdot t\_2 - y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}}\\
\mathbf{if}\;t\_3 \cdot \sin \left(y.im \cdot t\_2 + t\_1\right) \leq \infty:\\
\;\;\;\;t\_3 \cdot \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right) + \sin t\_1\right)\\
\mathbf{else}:\\
\;\;\;\;e^{\mathsf{fma}\left(t\_0, y.re, y.im \cdot \left(-\tan^{-1}_* \frac{x.im}{x.re}\right)\right)} \cdot \sin \left({\left(\sqrt[3]{\mathsf{fma}\left(y.im, t\_0, t\_1\right)}\right)}^{3}\right)\\
\end{array}
\end{array}
if (*.f64 (exp.f64 (-.f64 (*.f64 (log.f64 (sqrt.f64 (+.f64 (*.f64 x.re x.re) (*.f64 x.im x.im)))) y.re) (*.f64 (atan2.f64 x.im x.re) y.im))) (sin.f64 (+.f64 (*.f64 (log.f64 (sqrt.f64 (+.f64 (*.f64 x.re x.re) (*.f64 x.im x.im)))) y.im) (*.f64 (atan2.f64 x.im x.re) y.re)))) < +inf.0Initial program 76.2%
Taylor expanded in y.im around 0 77.0%
+-commutative77.0%
associate-*r*77.0%
unpow277.0%
unpow277.0%
hypot-undefine77.0%
Simplified77.0%
Taylor expanded in y.re around 0 82.6%
if +inf.0 < (*.f64 (exp.f64 (-.f64 (*.f64 (log.f64 (sqrt.f64 (+.f64 (*.f64 x.re x.re) (*.f64 x.im x.im)))) y.re) (*.f64 (atan2.f64 x.im x.re) y.im))) (sin.f64 (+.f64 (*.f64 (log.f64 (sqrt.f64 (+.f64 (*.f64 x.re x.re) (*.f64 x.im x.im)))) y.im) (*.f64 (atan2.f64 x.im x.re) y.re)))) Initial program 0.0%
fma-neg0.0%
hypot-define0.0%
distribute-rgt-neg-out0.0%
fma-define0.0%
hypot-define80.7%
*-commutative80.7%
Simplified80.7%
add-cube-cbrt83.2%
pow382.5%
fma-undefine82.5%
*-commutative82.5%
*-commutative82.5%
fma-define82.5%
Applied egg-rr82.5%
Final simplification82.6%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (log (hypot x.re x.im))))
(if (or (<= y.im -1e-102) (not (<= y.im 1.85e-14)))
(*
(exp (fma t_0 y.re (* y.im (- (atan2 x.im x.re)))))
(sin (pow (cbrt (* y.im t_0)) 3.0)))
(*
(sin (pow (cbrt (fma y.im t_0 (* y.re (atan2 x.im x.re)))) 3.0))
(pow (hypot x.im x.re) y.re)))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = log(hypot(x_46_re, x_46_im));
double tmp;
if ((y_46_im <= -1e-102) || !(y_46_im <= 1.85e-14)) {
tmp = exp(fma(t_0, y_46_re, (y_46_im * -atan2(x_46_im, x_46_re)))) * sin(pow(cbrt((y_46_im * t_0)), 3.0));
} else {
tmp = sin(pow(cbrt(fma(y_46_im, t_0, (y_46_re * atan2(x_46_im, x_46_re)))), 3.0)) * pow(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 = log(hypot(x_46_re, x_46_im)) tmp = 0.0 if ((y_46_im <= -1e-102) || !(y_46_im <= 1.85e-14)) tmp = Float64(exp(fma(t_0, y_46_re, Float64(y_46_im * Float64(-atan(x_46_im, x_46_re))))) * sin((cbrt(Float64(y_46_im * t_0)) ^ 3.0))); else tmp = Float64(sin((cbrt(fma(y_46_im, t_0, Float64(y_46_re * atan(x_46_im, x_46_re)))) ^ 3.0)) * (hypot(x_46_im, x_46_re) ^ 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, -1e-102], N[Not[LessEqual[y$46$im, 1.85e-14]], $MachinePrecision]], N[(N[Exp[N[(t$95$0 * y$46$re + N[(y$46$im * (-N[ArcTan[x$46$im / x$46$re], $MachinePrecision])), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Sin[N[Power[N[Power[N[(y$46$im * t$95$0), $MachinePrecision], 1/3], $MachinePrecision], 3.0], $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(N[Sin[N[Power[N[Power[N[(y$46$im * t$95$0 + N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 1/3], $MachinePrecision], 3.0], $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 := \log \left(\mathsf{hypot}\left(x.re, x.im\right)\right)\\
\mathbf{if}\;y.im \leq -1 \cdot 10^{-102} \lor \neg \left(y.im \leq 1.85 \cdot 10^{-14}\right):\\
\;\;\;\;e^{\mathsf{fma}\left(t\_0, y.re, y.im \cdot \left(-\tan^{-1}_* \frac{x.im}{x.re}\right)\right)} \cdot \sin \left({\left(\sqrt[3]{y.im \cdot t\_0}\right)}^{3}\right)\\
\mathbf{else}:\\
\;\;\;\;\sin \left({\left(\sqrt[3]{\mathsf{fma}\left(y.im, t\_0, y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)}\right)}^{3}\right) \cdot {\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re}\\
\end{array}
\end{array}
if y.im < -9.99999999999999933e-103 or 1.85000000000000001e-14 < y.im Initial program 33.4%
fma-neg33.4%
hypot-define33.4%
distribute-rgt-neg-out33.4%
fma-define32.8%
hypot-define71.7%
*-commutative71.7%
Simplified71.7%
add-cube-cbrt76.7%
pow374.5%
fma-undefine74.5%
*-commutative74.5%
*-commutative74.5%
fma-define74.5%
Applied egg-rr74.5%
Taylor expanded in y.re around 0 22.6%
unpow1/333.9%
+-commutative33.9%
unpow233.9%
unpow233.9%
hypot-undefine74.5%
Simplified74.5%
if -9.99999999999999933e-103 < y.im < 1.85000000000000001e-14Initial program 44.6%
exp-diff44.6%
exp-to-pow44.6%
hypot-define44.6%
*-commutative44.6%
exp-prod44.6%
fma-define44.6%
hypot-define89.2%
*-commutative89.2%
Simplified89.2%
add-cbrt-cube32.9%
pow332.9%
fma-undefine32.9%
*-commutative32.9%
*-commutative32.9%
fma-define32.9%
Applied egg-rr32.9%
Taylor expanded in y.im around 0 23.2%
unpow223.2%
unpow223.2%
hypot-undefine32.9%
Simplified32.9%
rem-cbrt-cube89.2%
rem-cube-cbrt89.3%
Applied egg-rr89.3%
Final simplification80.0%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (sin (* y.re (atan2 x.im x.re))))
(t_1
(exp
(-
(* y.re (log (sqrt (+ (* x.re x.re) (* x.im x.im)))))
(* y.im (atan2 x.im x.re)))))
(t_2 (* y.im (log (hypot x.im x.re)))))
(if (<= y.re -5000000000.0)
(* t_1 (fabs t_0))
(if (<= y.re 3.7e-29)
(*
(exp (* y.im (- (atan2 x.im x.re))))
(sin (fma (atan2 x.im x.re) y.re (* y.im (log (hypot x.re x.im))))))
(if (or (<= y.re 1e+216) (not (<= y.re 1.35e+253)))
(* t_1 (+ t_2 t_0))
(* t_1 (sin t_2)))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = sin((y_46_re * atan2(x_46_im, x_46_re)));
double t_1 = exp(((y_46_re * log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))) - (y_46_im * atan2(x_46_im, x_46_re))));
double t_2 = y_46_im * log(hypot(x_46_im, x_46_re));
double tmp;
if (y_46_re <= -5000000000.0) {
tmp = t_1 * fabs(t_0);
} else if (y_46_re <= 3.7e-29) {
tmp = exp((y_46_im * -atan2(x_46_im, x_46_re))) * sin(fma(atan2(x_46_im, x_46_re), y_46_re, (y_46_im * log(hypot(x_46_re, x_46_im)))));
} else if ((y_46_re <= 1e+216) || !(y_46_re <= 1.35e+253)) {
tmp = t_1 * (t_2 + t_0);
} else {
tmp = t_1 * sin(t_2);
}
return tmp;
}
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = sin(Float64(y_46_re * atan(x_46_im, x_46_re))) t_1 = exp(Float64(Float64(y_46_re * log(sqrt(Float64(Float64(x_46_re * x_46_re) + Float64(x_46_im * x_46_im))))) - Float64(y_46_im * atan(x_46_im, x_46_re)))) t_2 = Float64(y_46_im * log(hypot(x_46_im, x_46_re))) tmp = 0.0 if (y_46_re <= -5000000000.0) tmp = Float64(t_1 * abs(t_0)); elseif (y_46_re <= 3.7e-29) tmp = Float64(exp(Float64(y_46_im * Float64(-atan(x_46_im, x_46_re)))) * sin(fma(atan(x_46_im, x_46_re), y_46_re, Float64(y_46_im * log(hypot(x_46_re, x_46_im)))))); elseif ((y_46_re <= 1e+216) || !(y_46_re <= 1.35e+253)) tmp = Float64(t_1 * Float64(t_2 + t_0)); else tmp = Float64(t_1 * sin(t_2)); end return tmp end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[Sin[N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$1 = N[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[(y$46$im * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$2 = N[(y$46$im * N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y$46$re, -5000000000.0], N[(t$95$1 * N[Abs[t$95$0], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$re, 3.7e-29], N[(N[Exp[N[(y$46$im * (-N[ArcTan[x$46$im / x$46$re], $MachinePrecision])), $MachinePrecision]], $MachinePrecision] * N[Sin[N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$re + N[(y$46$im * N[Log[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[y$46$re, 1e+216], N[Not[LessEqual[y$46$re, 1.35e+253]], $MachinePrecision]], N[(t$95$1 * N[(t$95$2 + t$95$0), $MachinePrecision]), $MachinePrecision], N[(t$95$1 * N[Sin[t$95$2], $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\\
t_1 := e^{y.re \cdot \log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) - y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}}\\
t_2 := y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\\
\mathbf{if}\;y.re \leq -5000000000:\\
\;\;\;\;t\_1 \cdot \left|t\_0\right|\\
\mathbf{elif}\;y.re \leq 3.7 \cdot 10^{-29}:\\
\;\;\;\;e^{y.im \cdot \left(-\tan^{-1}_* \frac{x.im}{x.re}\right)} \cdot \sin \left(\mathsf{fma}\left(\tan^{-1}_* \frac{x.im}{x.re}, y.re, y.im \cdot \log \left(\mathsf{hypot}\left(x.re, x.im\right)\right)\right)\right)\\
\mathbf{elif}\;y.re \leq 10^{+216} \lor \neg \left(y.re \leq 1.35 \cdot 10^{+253}\right):\\
\;\;\;\;t\_1 \cdot \left(t\_2 + t\_0\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1 \cdot \sin t\_2\\
\end{array}
\end{array}
if y.re < -5e9Initial program 30.8%
Taylor expanded in y.im around 0 83.1%
add-sqr-sqrt55.4%
sqrt-unprod92.3%
pow292.3%
*-commutative92.3%
Applied egg-rr92.3%
unpow292.3%
rem-sqrt-square92.3%
*-commutative92.3%
Simplified92.3%
if -5e9 < y.re < 3.6999999999999997e-29Initial program 39.5%
exp-diff39.5%
exp-to-pow39.5%
hypot-define39.5%
*-commutative39.5%
exp-prod39.0%
fma-define38.3%
hypot-define78.6%
*-commutative78.6%
Simplified78.6%
Taylor expanded in y.re around 0 79.9%
rec-exp79.9%
distribute-rgt-neg-in79.9%
Simplified79.9%
Taylor expanded in y.im around inf 38.9%
+-commutative38.9%
*-commutative38.9%
+-commutative38.9%
unpow238.9%
unpow238.9%
hypot-undefine80.7%
fma-define80.7%
Simplified80.7%
if 3.6999999999999997e-29 < y.re < 1e216 or 1.35000000000000001e253 < y.re Initial program 46.9%
Taylor expanded in y.im around 0 67.4%
+-commutative67.4%
associate-*r*67.4%
unpow267.4%
unpow267.4%
hypot-undefine75.5%
Simplified75.5%
Taylor expanded in y.re around 0 83.7%
if 1e216 < y.re < 1.35000000000000001e253Initial program 10.0%
Taylor expanded in y.re around 0 50.0%
unpow250.0%
unpow250.0%
hypot-undefine80.0%
Simplified80.0%
Final simplification84.2%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (log (hypot x.re x.im)))
(t_1
(exp
(-
(* y.re (log (sqrt (+ (* x.re x.re) (* x.im x.im)))))
(* y.im (atan2 x.im x.re)))))
(t_2 (* y.re (atan2 x.im x.re)))
(t_3 (fabs (sin t_2)))
(t_4 (* t_1 t_3)))
(if (<= y.re -5000000000.0)
t_4
(if (<= y.re 5.6e-17)
(*
(exp (* y.im (- (atan2 x.im x.re))))
(sin (fma (atan2 x.im x.re) y.re (* y.im t_0))))
(if (<= y.re 2.45e+100)
(* (sin (fma t_0 y.im t_2)) (pow (hypot x.im x.re) y.re))
(if (<= y.re 6.6e+215)
(* t_3 (pow x.im y.re))
(if (<= y.re 5e+266)
(* t_1 (sin (* y.im (log (hypot x.im x.re)))))
t_4)))))))
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(((y_46_re * log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))) - (y_46_im * atan2(x_46_im, x_46_re))));
double t_2 = y_46_re * atan2(x_46_im, x_46_re);
double t_3 = fabs(sin(t_2));
double t_4 = t_1 * t_3;
double tmp;
if (y_46_re <= -5000000000.0) {
tmp = t_4;
} else if (y_46_re <= 5.6e-17) {
tmp = exp((y_46_im * -atan2(x_46_im, x_46_re))) * sin(fma(atan2(x_46_im, x_46_re), y_46_re, (y_46_im * t_0)));
} else if (y_46_re <= 2.45e+100) {
tmp = sin(fma(t_0, y_46_im, t_2)) * pow(hypot(x_46_im, x_46_re), y_46_re);
} else if (y_46_re <= 6.6e+215) {
tmp = t_3 * pow(x_46_im, y_46_re);
} else if (y_46_re <= 5e+266) {
tmp = t_1 * sin((y_46_im * log(hypot(x_46_im, x_46_re))));
} else {
tmp = t_4;
}
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(Float64(Float64(y_46_re * log(sqrt(Float64(Float64(x_46_re * x_46_re) + Float64(x_46_im * x_46_im))))) - Float64(y_46_im * atan(x_46_im, x_46_re)))) t_2 = Float64(y_46_re * atan(x_46_im, x_46_re)) t_3 = abs(sin(t_2)) t_4 = Float64(t_1 * t_3) tmp = 0.0 if (y_46_re <= -5000000000.0) tmp = t_4; elseif (y_46_re <= 5.6e-17) tmp = Float64(exp(Float64(y_46_im * Float64(-atan(x_46_im, x_46_re)))) * sin(fma(atan(x_46_im, x_46_re), y_46_re, Float64(y_46_im * t_0)))); elseif (y_46_re <= 2.45e+100) tmp = Float64(sin(fma(t_0, y_46_im, t_2)) * (hypot(x_46_im, x_46_re) ^ y_46_re)); elseif (y_46_re <= 6.6e+215) tmp = Float64(t_3 * (x_46_im ^ y_46_re)); elseif (y_46_re <= 5e+266) tmp = Float64(t_1 * sin(Float64(y_46_im * log(hypot(x_46_im, x_46_re))))); else tmp = t_4; 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[(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[(y$46$im * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$2 = N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[Abs[N[Sin[t$95$2], $MachinePrecision]], $MachinePrecision]}, Block[{t$95$4 = N[(t$95$1 * t$95$3), $MachinePrecision]}, If[LessEqual[y$46$re, -5000000000.0], t$95$4, If[LessEqual[y$46$re, 5.6e-17], N[(N[Exp[N[(y$46$im * (-N[ArcTan[x$46$im / x$46$re], $MachinePrecision])), $MachinePrecision]], $MachinePrecision] * N[Sin[N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$re + N[(y$46$im * t$95$0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$re, 2.45e+100], N[(N[Sin[N[(t$95$0 * y$46$im + t$95$2), $MachinePrecision]], $MachinePrecision] * N[Power[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision], y$46$re], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$re, 6.6e+215], N[(t$95$3 * N[Power[x$46$im, y$46$re], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$re, 5e+266], N[(t$95$1 * N[Sin[N[(y$46$im * N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], t$95$4]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \log \left(\mathsf{hypot}\left(x.re, x.im\right)\right)\\
t_1 := e^{y.re \cdot \log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) - y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}}\\
t_2 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
t_3 := \left|\sin t\_2\right|\\
t_4 := t\_1 \cdot t\_3\\
\mathbf{if}\;y.re \leq -5000000000:\\
\;\;\;\;t\_4\\
\mathbf{elif}\;y.re \leq 5.6 \cdot 10^{-17}:\\
\;\;\;\;e^{y.im \cdot \left(-\tan^{-1}_* \frac{x.im}{x.re}\right)} \cdot \sin \left(\mathsf{fma}\left(\tan^{-1}_* \frac{x.im}{x.re}, y.re, y.im \cdot t\_0\right)\right)\\
\mathbf{elif}\;y.re \leq 2.45 \cdot 10^{+100}:\\
\;\;\;\;\sin \left(\mathsf{fma}\left(t\_0, y.im, t\_2\right)\right) \cdot {\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re}\\
\mathbf{elif}\;y.re \leq 6.6 \cdot 10^{+215}:\\
\;\;\;\;t\_3 \cdot {x.im}^{y.re}\\
\mathbf{elif}\;y.re \leq 5 \cdot 10^{+266}:\\
\;\;\;\;t\_1 \cdot \sin \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t\_4\\
\end{array}
\end{array}
if y.re < -5e9 or 4.9999999999999999e266 < y.re Initial program 32.9%
Taylor expanded in y.im around 0 80.3%
add-sqr-sqrt54.0%
sqrt-unprod90.8%
pow290.8%
*-commutative90.8%
Applied egg-rr90.8%
unpow290.8%
rem-sqrt-square90.8%
*-commutative90.8%
Simplified90.8%
if -5e9 < y.re < 5.5999999999999998e-17Initial program 40.1%
exp-diff40.1%
exp-to-pow40.1%
hypot-define40.1%
*-commutative40.1%
exp-prod39.6%
fma-define38.9%
hypot-define78.3%
*-commutative78.3%
Simplified78.3%
Taylor expanded in y.re around 0 79.6%
rec-exp79.6%
distribute-rgt-neg-in79.6%
Simplified79.6%
Taylor expanded in y.im around inf 39.5%
+-commutative39.5%
*-commutative39.5%
+-commutative39.5%
unpow239.5%
unpow239.5%
hypot-undefine80.3%
fma-define80.3%
Simplified80.3%
if 5.5999999999999998e-17 < y.re < 2.44999999999999983e100Initial program 38.5%
exp-diff30.8%
exp-to-pow30.8%
hypot-define30.8%
*-commutative30.8%
exp-prod30.8%
fma-define30.8%
hypot-define76.9%
*-commutative76.9%
Simplified76.9%
Taylor expanded in y.im around 0 69.8%
unpow240.8%
unpow240.8%
hypot-undefine48.2%
Simplified77.2%
if 2.44999999999999983e100 < y.re < 6.5999999999999997e215Initial program 50.0%
Taylor expanded in y.im around 0 70.1%
Taylor expanded in x.re around 0 35.2%
Taylor expanded in y.im around 0 65.2%
add-sqr-sqrt40.0%
sqrt-unprod80.1%
pow280.1%
*-commutative80.1%
Applied egg-rr85.2%
unpow280.1%
rem-sqrt-square80.1%
*-commutative80.1%
Simplified85.2%
if 6.5999999999999997e215 < y.re < 4.9999999999999999e266Initial program 16.7%
Taylor expanded in y.re around 0 41.7%
unpow241.7%
unpow241.7%
hypot-undefine75.0%
Simplified75.0%
Final simplification83.4%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (log (hypot x.re x.im)))
(t_1 (* y.re (atan2 x.im x.re)))
(t_2
(exp
(-
(* y.re (log (sqrt (+ (* x.re x.re) (* x.im x.im)))))
(* y.im (atan2 x.im x.re))))))
(if (<= y.re -5000000000.0)
(* t_2 (fabs (sin t_1)))
(if (<= y.re 5.6e-17)
(*
(exp (* y.im (- (atan2 x.im x.re))))
(sin (fma (atan2 x.im x.re) y.re (* y.im t_0))))
(if (<= y.re 6e+90)
(* (sin (fma t_0 y.im t_1)) (pow (hypot x.im x.re) y.re))
(* t_2 (sin (fabs t_1))))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = log(hypot(x_46_re, x_46_im));
double t_1 = y_46_re * atan2(x_46_im, x_46_re);
double t_2 = exp(((y_46_re * log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))) - (y_46_im * atan2(x_46_im, x_46_re))));
double tmp;
if (y_46_re <= -5000000000.0) {
tmp = t_2 * fabs(sin(t_1));
} else if (y_46_re <= 5.6e-17) {
tmp = exp((y_46_im * -atan2(x_46_im, x_46_re))) * sin(fma(atan2(x_46_im, x_46_re), y_46_re, (y_46_im * t_0)));
} else if (y_46_re <= 6e+90) {
tmp = sin(fma(t_0, y_46_im, t_1)) * pow(hypot(x_46_im, x_46_re), y_46_re);
} else {
tmp = t_2 * sin(fabs(t_1));
}
return tmp;
}
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = log(hypot(x_46_re, x_46_im)) t_1 = Float64(y_46_re * atan(x_46_im, x_46_re)) t_2 = exp(Float64(Float64(y_46_re * log(sqrt(Float64(Float64(x_46_re * x_46_re) + Float64(x_46_im * x_46_im))))) - Float64(y_46_im * atan(x_46_im, x_46_re)))) tmp = 0.0 if (y_46_re <= -5000000000.0) tmp = Float64(t_2 * abs(sin(t_1))); elseif (y_46_re <= 5.6e-17) tmp = Float64(exp(Float64(y_46_im * Float64(-atan(x_46_im, x_46_re)))) * sin(fma(atan(x_46_im, x_46_re), y_46_re, Float64(y_46_im * t_0)))); elseif (y_46_re <= 6e+90) tmp = Float64(sin(fma(t_0, y_46_im, t_1)) * (hypot(x_46_im, x_46_re) ^ y_46_re)); else tmp = Float64(t_2 * sin(abs(t_1))); end return tmp end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[Log[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision]], $MachinePrecision]}, Block[{t$95$1 = N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[Exp[N[(N[(y$46$re * 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[(y$46$im * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[y$46$re, -5000000000.0], N[(t$95$2 * N[Abs[N[Sin[t$95$1], $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$re, 5.6e-17], N[(N[Exp[N[(y$46$im * (-N[ArcTan[x$46$im / x$46$re], $MachinePrecision])), $MachinePrecision]], $MachinePrecision] * N[Sin[N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$re + N[(y$46$im * t$95$0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$re, 6e+90], N[(N[Sin[N[(t$95$0 * y$46$im + t$95$1), $MachinePrecision]], $MachinePrecision] * N[Power[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision], y$46$re], $MachinePrecision]), $MachinePrecision], N[(t$95$2 * N[Sin[N[Abs[t$95$1], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \log \left(\mathsf{hypot}\left(x.re, x.im\right)\right)\\
t_1 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
t_2 := e^{y.re \cdot \log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) - y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}}\\
\mathbf{if}\;y.re \leq -5000000000:\\
\;\;\;\;t\_2 \cdot \left|\sin t\_1\right|\\
\mathbf{elif}\;y.re \leq 5.6 \cdot 10^{-17}:\\
\;\;\;\;e^{y.im \cdot \left(-\tan^{-1}_* \frac{x.im}{x.re}\right)} \cdot \sin \left(\mathsf{fma}\left(\tan^{-1}_* \frac{x.im}{x.re}, y.re, y.im \cdot t\_0\right)\right)\\
\mathbf{elif}\;y.re \leq 6 \cdot 10^{+90}:\\
\;\;\;\;\sin \left(\mathsf{fma}\left(t\_0, y.im, t\_1\right)\right) \cdot {\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re}\\
\mathbf{else}:\\
\;\;\;\;t\_2 \cdot \sin \left(\left|t\_1\right|\right)\\
\end{array}
\end{array}
if y.re < -5e9Initial program 30.8%
Taylor expanded in y.im around 0 83.1%
add-sqr-sqrt55.4%
sqrt-unprod92.3%
pow292.3%
*-commutative92.3%
Applied egg-rr92.3%
unpow292.3%
rem-sqrt-square92.3%
*-commutative92.3%
Simplified92.3%
if -5e9 < y.re < 5.5999999999999998e-17Initial program 40.1%
exp-diff40.1%
exp-to-pow40.1%
hypot-define40.1%
*-commutative40.1%
exp-prod39.6%
fma-define38.9%
hypot-define78.3%
*-commutative78.3%
Simplified78.3%
Taylor expanded in y.re around 0 79.6%
rec-exp79.6%
distribute-rgt-neg-in79.6%
Simplified79.6%
Taylor expanded in y.im around inf 39.5%
+-commutative39.5%
*-commutative39.5%
+-commutative39.5%
unpow239.5%
unpow239.5%
hypot-undefine80.3%
fma-define80.3%
Simplified80.3%
if 5.5999999999999998e-17 < y.re < 5.99999999999999957e90Initial program 38.5%
exp-diff30.8%
exp-to-pow30.8%
hypot-define30.8%
*-commutative30.8%
exp-prod30.8%
fma-define30.8%
hypot-define76.9%
*-commutative76.9%
Simplified76.9%
Taylor expanded in y.im around 0 69.8%
unpow240.8%
unpow240.8%
hypot-undefine48.2%
Simplified77.2%
if 5.99999999999999957e90 < y.re Initial program 39.5%
Taylor expanded in y.im around 0 60.5%
add-sqr-sqrt28.1%
sqrt-unprod30.3%
pow230.3%
*-commutative30.3%
Applied egg-rr30.3%
*-commutative30.3%
unpow230.3%
rem-sqrt-square65.3%
Simplified72.1%
Final simplification81.8%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (* y.re (atan2 x.im x.re)))
(t_1 (sin t_0))
(t_2 (sin (fma (log (hypot x.re x.im)) y.im t_0))))
(if (<= y.re -3200000.0)
(*
(exp
(-
(* y.re (log (sqrt (+ (* x.re x.re) (* x.im x.im)))))
(* y.im (atan2 x.im x.re))))
t_1)
(if (<= y.re 5.6e-17)
(* t_2 (exp (* y.im (- (atan2 x.im x.re)))))
(if (or (<= y.re 5.5e+86) (not (<= y.re 4.2e+230)))
(* t_2 (pow (hypot x.im x.re) y.re))
(* (fabs t_1) (pow x.im y.re)))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = y_46_re * atan2(x_46_im, x_46_re);
double t_1 = sin(t_0);
double t_2 = sin(fma(log(hypot(x_46_re, x_46_im)), y_46_im, t_0));
double tmp;
if (y_46_re <= -3200000.0) {
tmp = exp(((y_46_re * log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))) - (y_46_im * atan2(x_46_im, x_46_re)))) * t_1;
} else if (y_46_re <= 5.6e-17) {
tmp = t_2 * exp((y_46_im * -atan2(x_46_im, x_46_re)));
} else if ((y_46_re <= 5.5e+86) || !(y_46_re <= 4.2e+230)) {
tmp = t_2 * pow(hypot(x_46_im, x_46_re), y_46_re);
} else {
tmp = fabs(t_1) * pow(x_46_im, y_46_re);
}
return tmp;
}
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = Float64(y_46_re * atan(x_46_im, x_46_re)) t_1 = sin(t_0) t_2 = sin(fma(log(hypot(x_46_re, x_46_im)), y_46_im, t_0)) tmp = 0.0 if (y_46_re <= -3200000.0) 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(y_46_im * atan(x_46_im, x_46_re)))) * t_1); elseif (y_46_re <= 5.6e-17) tmp = Float64(t_2 * exp(Float64(y_46_im * Float64(-atan(x_46_im, x_46_re))))); elseif ((y_46_re <= 5.5e+86) || !(y_46_re <= 4.2e+230)) tmp = Float64(t_2 * (hypot(x_46_im, x_46_re) ^ y_46_re)); else tmp = Float64(abs(t_1) * (x_46_im ^ y_46_re)); end return tmp end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[Sin[t$95$0], $MachinePrecision]}, Block[{t$95$2 = N[Sin[N[(N[Log[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision]], $MachinePrecision] * y$46$im + t$95$0), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[y$46$re, -3200000.0], 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[(y$46$im * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * t$95$1), $MachinePrecision], If[LessEqual[y$46$re, 5.6e-17], N[(t$95$2 * N[Exp[N[(y$46$im * (-N[ArcTan[x$46$im / x$46$re], $MachinePrecision])), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[y$46$re, 5.5e+86], N[Not[LessEqual[y$46$re, 4.2e+230]], $MachinePrecision]], N[(t$95$2 * N[Power[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision], y$46$re], $MachinePrecision]), $MachinePrecision], N[(N[Abs[t$95$1], $MachinePrecision] * N[Power[x$46$im, y$46$re], $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
t_1 := \sin t\_0\\
t_2 := \sin \left(\mathsf{fma}\left(\log \left(\mathsf{hypot}\left(x.re, x.im\right)\right), y.im, t\_0\right)\right)\\
\mathbf{if}\;y.re \leq -3200000:\\
\;\;\;\;e^{y.re \cdot \log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) - y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}} \cdot t\_1\\
\mathbf{elif}\;y.re \leq 5.6 \cdot 10^{-17}:\\
\;\;\;\;t\_2 \cdot e^{y.im \cdot \left(-\tan^{-1}_* \frac{x.im}{x.re}\right)}\\
\mathbf{elif}\;y.re \leq 5.5 \cdot 10^{+86} \lor \neg \left(y.re \leq 4.2 \cdot 10^{+230}\right):\\
\;\;\;\;t\_2 \cdot {\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re}\\
\mathbf{else}:\\
\;\;\;\;\left|t\_1\right| \cdot {x.im}^{y.re}\\
\end{array}
\end{array}
if y.re < -3.2e6Initial program 31.8%
Taylor expanded in y.im around 0 83.4%
if -3.2e6 < y.re < 5.5999999999999998e-17Initial program 39.6%
exp-diff39.6%
exp-to-pow39.6%
hypot-define39.6%
*-commutative39.6%
exp-prod39.2%
fma-define39.2%
hypot-define78.9%
*-commutative78.9%
Simplified78.9%
Taylor expanded in y.re around 0 80.2%
rec-exp80.2%
distribute-rgt-neg-in80.2%
Simplified80.2%
if 5.5999999999999998e-17 < y.re < 5.5000000000000002e86 or 4.19999999999999986e230 < y.re Initial program 35.3%
exp-diff29.4%
exp-to-pow29.4%
hypot-define29.4%
*-commutative29.4%
exp-prod29.4%
fma-define29.4%
hypot-define58.8%
*-commutative58.8%
Simplified58.8%
Taylor expanded in y.im around 0 64.9%
unpow215.6%
unpow215.6%
hypot-undefine18.4%
Simplified67.7%
if 5.5000000000000002e86 < y.re < 4.19999999999999986e230Initial program 45.5%
Taylor expanded in y.im around 0 63.7%
Taylor expanded in x.re around 0 32.0%
Taylor expanded in y.im around 0 59.3%
add-sqr-sqrt36.4%
sqrt-unprod77.3%
pow277.3%
*-commutative77.3%
Applied egg-rr82.0%
unpow277.3%
rem-sqrt-square77.3%
*-commutative77.3%
Simplified82.0%
Final simplification79.5%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (log (hypot x.re x.im)))
(t_1 (* y.re (atan2 x.im x.re)))
(t_2 (sin t_1)))
(if (<= y.re -5000000000.0)
(*
(exp
(-
(* y.re (log (sqrt (+ (* x.re x.re) (* x.im x.im)))))
(* y.im (atan2 x.im x.re))))
t_2)
(if (<= y.re 5.6e-17)
(*
(exp (* y.im (- (atan2 x.im x.re))))
(sin (fma (atan2 x.im x.re) y.re (* y.im t_0))))
(if (or (<= y.re 3.8e+99) (not (<= y.re 4.2e+230)))
(* (sin (fma t_0 y.im t_1)) (pow (hypot x.im x.re) y.re))
(* (fabs t_2) (pow x.im y.re)))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = log(hypot(x_46_re, x_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_re <= -5000000000.0) {
tmp = exp(((y_46_re * log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))) - (y_46_im * atan2(x_46_im, x_46_re)))) * t_2;
} else if (y_46_re <= 5.6e-17) {
tmp = exp((y_46_im * -atan2(x_46_im, x_46_re))) * sin(fma(atan2(x_46_im, x_46_re), y_46_re, (y_46_im * t_0)));
} else if ((y_46_re <= 3.8e+99) || !(y_46_re <= 4.2e+230)) {
tmp = sin(fma(t_0, y_46_im, t_1)) * pow(hypot(x_46_im, x_46_re), y_46_re);
} else {
tmp = fabs(t_2) * pow(x_46_im, y_46_re);
}
return tmp;
}
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = log(hypot(x_46_re, x_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_re <= -5000000000.0) 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(y_46_im * atan(x_46_im, x_46_re)))) * t_2); elseif (y_46_re <= 5.6e-17) tmp = Float64(exp(Float64(y_46_im * Float64(-atan(x_46_im, x_46_re)))) * sin(fma(atan(x_46_im, x_46_re), y_46_re, Float64(y_46_im * t_0)))); elseif ((y_46_re <= 3.8e+99) || !(y_46_re <= 4.2e+230)) tmp = Float64(sin(fma(t_0, y_46_im, t_1)) * (hypot(x_46_im, x_46_re) ^ y_46_re)); else tmp = Float64(abs(t_2) * (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]}, 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$re, -5000000000.0], 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[(y$46$im * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * t$95$2), $MachinePrecision], If[LessEqual[y$46$re, 5.6e-17], N[(N[Exp[N[(y$46$im * (-N[ArcTan[x$46$im / x$46$re], $MachinePrecision])), $MachinePrecision]], $MachinePrecision] * N[Sin[N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$re + N[(y$46$im * t$95$0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[y$46$re, 3.8e+99], N[Not[LessEqual[y$46$re, 4.2e+230]], $MachinePrecision]], N[(N[Sin[N[(t$95$0 * y$46$im + t$95$1), $MachinePrecision]], $MachinePrecision] * N[Power[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision], y$46$re], $MachinePrecision]), $MachinePrecision], N[(N[Abs[t$95$2], $MachinePrecision] * N[Power[x$46$im, y$46$re], $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \log \left(\mathsf{hypot}\left(x.re, x.im\right)\right)\\
t_1 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
t_2 := \sin t\_1\\
\mathbf{if}\;y.re \leq -5000000000:\\
\;\;\;\;e^{y.re \cdot \log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) - y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}} \cdot t\_2\\
\mathbf{elif}\;y.re \leq 5.6 \cdot 10^{-17}:\\
\;\;\;\;e^{y.im \cdot \left(-\tan^{-1}_* \frac{x.im}{x.re}\right)} \cdot \sin \left(\mathsf{fma}\left(\tan^{-1}_* \frac{x.im}{x.re}, y.re, y.im \cdot t\_0\right)\right)\\
\mathbf{elif}\;y.re \leq 3.8 \cdot 10^{+99} \lor \neg \left(y.re \leq 4.2 \cdot 10^{+230}\right):\\
\;\;\;\;\sin \left(\mathsf{fma}\left(t\_0, y.im, t\_1\right)\right) \cdot {\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re}\\
\mathbf{else}:\\
\;\;\;\;\left|t\_2\right| \cdot {x.im}^{y.re}\\
\end{array}
\end{array}
if y.re < -5e9Initial program 30.8%
Taylor expanded in y.im around 0 83.1%
if -5e9 < y.re < 5.5999999999999998e-17Initial program 40.1%
exp-diff40.1%
exp-to-pow40.1%
hypot-define40.1%
*-commutative40.1%
exp-prod39.6%
fma-define38.9%
hypot-define78.3%
*-commutative78.3%
Simplified78.3%
Taylor expanded in y.re around 0 79.6%
rec-exp79.6%
distribute-rgt-neg-in79.6%
Simplified79.6%
Taylor expanded in y.im around inf 39.5%
+-commutative39.5%
*-commutative39.5%
+-commutative39.5%
unpow239.5%
unpow239.5%
hypot-undefine80.3%
fma-define80.3%
Simplified80.3%
if 5.5999999999999998e-17 < y.re < 3.8e99 or 4.19999999999999986e230 < y.re Initial program 35.3%
exp-diff29.4%
exp-to-pow29.4%
hypot-define29.4%
*-commutative29.4%
exp-prod29.4%
fma-define29.4%
hypot-define58.8%
*-commutative58.8%
Simplified58.8%
Taylor expanded in y.im around 0 64.9%
unpow215.6%
unpow215.6%
hypot-undefine18.4%
Simplified67.7%
if 3.8e99 < y.re < 4.19999999999999986e230Initial program 45.5%
Taylor expanded in y.im around 0 63.7%
Taylor expanded in x.re around 0 32.0%
Taylor expanded in y.im around 0 59.3%
add-sqr-sqrt36.4%
sqrt-unprod77.3%
pow277.3%
*-commutative77.3%
Applied egg-rr82.0%
unpow277.3%
rem-sqrt-square77.3%
*-commutative77.3%
Simplified82.0%
Final simplification79.5%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (log (hypot x.re x.im)))
(t_1 (* y.re (atan2 x.im x.re)))
(t_2 (fabs (sin t_1))))
(if (<= y.re -5000000000.0)
(*
(exp
(-
(* y.re (log (sqrt (+ (* x.re x.re) (* x.im x.im)))))
(* y.im (atan2 x.im x.re))))
t_2)
(if (<= y.re 5.2e-17)
(*
(exp (* y.im (- (atan2 x.im x.re))))
(sin (fma (atan2 x.im x.re) y.re (* y.im t_0))))
(if (or (<= y.re 6.8e+99) (not (<= y.re 4.3e+230)))
(* (sin (fma t_0 y.im t_1)) (pow (hypot x.im x.re) y.re))
(* t_2 (pow x.im y.re)))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = log(hypot(x_46_re, x_46_im));
double t_1 = y_46_re * atan2(x_46_im, x_46_re);
double t_2 = fabs(sin(t_1));
double tmp;
if (y_46_re <= -5000000000.0) {
tmp = exp(((y_46_re * log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))) - (y_46_im * atan2(x_46_im, x_46_re)))) * t_2;
} else if (y_46_re <= 5.2e-17) {
tmp = exp((y_46_im * -atan2(x_46_im, x_46_re))) * sin(fma(atan2(x_46_im, x_46_re), y_46_re, (y_46_im * t_0)));
} else if ((y_46_re <= 6.8e+99) || !(y_46_re <= 4.3e+230)) {
tmp = sin(fma(t_0, y_46_im, t_1)) * pow(hypot(x_46_im, x_46_re), y_46_re);
} else {
tmp = t_2 * pow(x_46_im, y_46_re);
}
return tmp;
}
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = log(hypot(x_46_re, x_46_im)) t_1 = Float64(y_46_re * atan(x_46_im, x_46_re)) t_2 = abs(sin(t_1)) tmp = 0.0 if (y_46_re <= -5000000000.0) 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(y_46_im * atan(x_46_im, x_46_re)))) * t_2); elseif (y_46_re <= 5.2e-17) tmp = Float64(exp(Float64(y_46_im * Float64(-atan(x_46_im, x_46_re)))) * sin(fma(atan(x_46_im, x_46_re), y_46_re, Float64(y_46_im * t_0)))); elseif ((y_46_re <= 6.8e+99) || !(y_46_re <= 4.3e+230)) tmp = Float64(sin(fma(t_0, y_46_im, t_1)) * (hypot(x_46_im, x_46_re) ^ y_46_re)); else tmp = Float64(t_2 * (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]}, Block[{t$95$1 = N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[Abs[N[Sin[t$95$1], $MachinePrecision]], $MachinePrecision]}, If[LessEqual[y$46$re, -5000000000.0], 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[(y$46$im * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * t$95$2), $MachinePrecision], If[LessEqual[y$46$re, 5.2e-17], N[(N[Exp[N[(y$46$im * (-N[ArcTan[x$46$im / x$46$re], $MachinePrecision])), $MachinePrecision]], $MachinePrecision] * N[Sin[N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$re + N[(y$46$im * t$95$0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[y$46$re, 6.8e+99], N[Not[LessEqual[y$46$re, 4.3e+230]], $MachinePrecision]], N[(N[Sin[N[(t$95$0 * y$46$im + t$95$1), $MachinePrecision]], $MachinePrecision] * N[Power[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision], y$46$re], $MachinePrecision]), $MachinePrecision], N[(t$95$2 * N[Power[x$46$im, y$46$re], $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \log \left(\mathsf{hypot}\left(x.re, x.im\right)\right)\\
t_1 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
t_2 := \left|\sin t\_1\right|\\
\mathbf{if}\;y.re \leq -5000000000:\\
\;\;\;\;e^{y.re \cdot \log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) - y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}} \cdot t\_2\\
\mathbf{elif}\;y.re \leq 5.2 \cdot 10^{-17}:\\
\;\;\;\;e^{y.im \cdot \left(-\tan^{-1}_* \frac{x.im}{x.re}\right)} \cdot \sin \left(\mathsf{fma}\left(\tan^{-1}_* \frac{x.im}{x.re}, y.re, y.im \cdot t\_0\right)\right)\\
\mathbf{elif}\;y.re \leq 6.8 \cdot 10^{+99} \lor \neg \left(y.re \leq 4.3 \cdot 10^{+230}\right):\\
\;\;\;\;\sin \left(\mathsf{fma}\left(t\_0, y.im, t\_1\right)\right) \cdot {\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re}\\
\mathbf{else}:\\
\;\;\;\;t\_2 \cdot {x.im}^{y.re}\\
\end{array}
\end{array}
if y.re < -5e9Initial program 30.8%
Taylor expanded in y.im around 0 83.1%
add-sqr-sqrt55.4%
sqrt-unprod92.3%
pow292.3%
*-commutative92.3%
Applied egg-rr92.3%
unpow292.3%
rem-sqrt-square92.3%
*-commutative92.3%
Simplified92.3%
if -5e9 < y.re < 5.20000000000000006e-17Initial program 40.1%
exp-diff40.1%
exp-to-pow40.1%
hypot-define40.1%
*-commutative40.1%
exp-prod39.6%
fma-define38.9%
hypot-define78.3%
*-commutative78.3%
Simplified78.3%
Taylor expanded in y.re around 0 79.6%
rec-exp79.6%
distribute-rgt-neg-in79.6%
Simplified79.6%
Taylor expanded in y.im around inf 39.5%
+-commutative39.5%
*-commutative39.5%
+-commutative39.5%
unpow239.5%
unpow239.5%
hypot-undefine80.3%
fma-define80.3%
Simplified80.3%
if 5.20000000000000006e-17 < y.re < 6.79999999999999968e99 or 4.29999999999999959e230 < y.re Initial program 35.3%
exp-diff29.4%
exp-to-pow29.4%
hypot-define29.4%
*-commutative29.4%
exp-prod29.4%
fma-define29.4%
hypot-define58.8%
*-commutative58.8%
Simplified58.8%
Taylor expanded in y.im around 0 64.9%
unpow215.6%
unpow215.6%
hypot-undefine18.4%
Simplified67.7%
if 6.79999999999999968e99 < y.re < 4.29999999999999959e230Initial program 45.5%
Taylor expanded in y.im around 0 63.7%
Taylor expanded in x.re around 0 32.0%
Taylor expanded in y.im around 0 59.3%
add-sqr-sqrt36.4%
sqrt-unprod77.3%
pow277.3%
*-commutative77.3%
Applied egg-rr82.0%
unpow277.3%
rem-sqrt-square77.3%
*-commutative77.3%
Simplified82.0%
Final simplification81.9%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (* y.im (log (hypot x.im x.re))))
(t_1 (exp (* y.im (- (atan2 x.im x.re))))))
(if (<= y.im -1.75e-6)
(* t_1 (sin (pow (cbrt t_0) 3.0)))
(if (<= y.im 1.45e+32)
(*
(sin (fma (log (hypot x.re x.im)) y.im (* y.re (atan2 x.im x.re))))
(pow (hypot x.im x.re) y.re))
(* t_1 (sqrt (pow (sin t_0) 2.0)))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = y_46_im * log(hypot(x_46_im, x_46_re));
double t_1 = exp((y_46_im * -atan2(x_46_im, x_46_re)));
double tmp;
if (y_46_im <= -1.75e-6) {
tmp = t_1 * sin(pow(cbrt(t_0), 3.0));
} else if (y_46_im <= 1.45e+32) {
tmp = sin(fma(log(hypot(x_46_re, x_46_im)), y_46_im, (y_46_re * atan2(x_46_im, x_46_re)))) * pow(hypot(x_46_im, x_46_re), y_46_re);
} else {
tmp = t_1 * sqrt(pow(sin(t_0), 2.0));
}
return tmp;
}
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = Float64(y_46_im * log(hypot(x_46_im, x_46_re))) t_1 = exp(Float64(y_46_im * Float64(-atan(x_46_im, x_46_re)))) tmp = 0.0 if (y_46_im <= -1.75e-6) tmp = Float64(t_1 * sin((cbrt(t_0) ^ 3.0))); elseif (y_46_im <= 1.45e+32) tmp = Float64(sin(fma(log(hypot(x_46_re, x_46_im)), y_46_im, Float64(y_46_re * atan(x_46_im, x_46_re)))) * (hypot(x_46_im, x_46_re) ^ y_46_re)); else tmp = Float64(t_1 * sqrt((sin(t_0) ^ 2.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[Exp[N[(y$46$im * (-N[ArcTan[x$46$im / x$46$re], $MachinePrecision])), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[y$46$im, -1.75e-6], N[(t$95$1 * N[Sin[N[Power[N[Power[t$95$0, 1/3], $MachinePrecision], 3.0], $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$im, 1.45e+32], N[(N[Sin[N[(N[Log[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision]], $MachinePrecision] * 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$im ^ 2 + x$46$re ^ 2], $MachinePrecision], y$46$re], $MachinePrecision]), $MachinePrecision], N[(t$95$1 * N[Sqrt[N[Power[N[Sin[t$95$0], $MachinePrecision], 2.0], $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 := e^{y.im \cdot \left(-\tan^{-1}_* \frac{x.im}{x.re}\right)}\\
\mathbf{if}\;y.im \leq -1.75 \cdot 10^{-6}:\\
\;\;\;\;t\_1 \cdot \sin \left({\left(\sqrt[3]{t\_0}\right)}^{3}\right)\\
\mathbf{elif}\;y.im \leq 1.45 \cdot 10^{+32}:\\
\;\;\;\;\sin \left(\mathsf{fma}\left(\log \left(\mathsf{hypot}\left(x.re, x.im\right)\right), y.im, y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right) \cdot {\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re}\\
\mathbf{else}:\\
\;\;\;\;t\_1 \cdot \sqrt{{\sin t\_0}^{2}}\\
\end{array}
\end{array}
if y.im < -1.74999999999999997e-6Initial program 26.8%
exp-diff22.9%
exp-to-pow22.9%
hypot-define22.9%
*-commutative22.9%
exp-prod22.5%
fma-define21.2%
hypot-define59.5%
*-commutative59.5%
Simplified59.5%
Taylor expanded in y.re around 0 62.3%
rec-exp62.3%
distribute-rgt-neg-in62.3%
Simplified62.3%
Taylor expanded in y.im around inf 23.0%
+-commutative23.0%
unpow223.0%
unpow223.0%
hypot-undefine61.1%
log-pow0.0%
hypot-undefine0.0%
unpow20.0%
unpow20.0%
+-commutative0.0%
unpow20.0%
unpow20.0%
hypot-undefine0.0%
Simplified0.0%
add-cube-cbrt0.0%
pow30.0%
log-pow62.2%
Applied egg-rr62.2%
if -1.74999999999999997e-6 < y.im < 1.45000000000000001e32Initial program 46.0%
exp-diff45.2%
exp-to-pow45.2%
hypot-define45.2%
*-commutative45.2%
exp-prod45.2%
fma-define45.2%
hypot-define86.1%
*-commutative86.1%
Simplified86.1%
Taylor expanded in y.im around 0 65.4%
unpow228.6%
unpow228.6%
hypot-undefine37.2%
Simplified86.7%
if 1.45000000000000001e32 < y.im Initial program 34.6%
exp-diff29.8%
exp-to-pow29.8%
hypot-define29.8%
*-commutative29.8%
exp-prod29.3%
fma-define29.3%
hypot-define51.9%
*-commutative51.9%
Simplified51.9%
Taylor expanded in y.re around 0 54.4%
rec-exp54.4%
distribute-rgt-neg-in54.4%
Simplified54.4%
Taylor expanded in y.im around inf 31.5%
+-commutative31.5%
unpow231.5%
unpow231.5%
hypot-undefine56.0%
log-pow0.0%
hypot-undefine0.0%
unpow20.0%
unpow20.0%
+-commutative0.0%
unpow20.0%
unpow20.0%
hypot-undefine0.0%
Simplified0.0%
add-sqr-sqrt0.0%
sqrt-unprod0.0%
pow20.0%
log-pow63.4%
Applied egg-rr63.4%
Final simplification73.7%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (* y.im (log (hypot x.im x.re))))
(t_1 (exp (* y.im (- (atan2 x.im x.re))))))
(if (<= y.im -1.5e-6)
(* t_1 (sin (pow (cbrt t_0) 3.0)))
(if (<= y.im 4.5e+32)
(*
(pow (hypot x.im x.re) y.re)
(sin (fma (atan2 x.im x.re) y.re (* y.im (log (hypot x.re x.im))))))
(* t_1 (sqrt (pow (sin t_0) 2.0)))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = y_46_im * log(hypot(x_46_im, x_46_re));
double t_1 = exp((y_46_im * -atan2(x_46_im, x_46_re)));
double tmp;
if (y_46_im <= -1.5e-6) {
tmp = t_1 * sin(pow(cbrt(t_0), 3.0));
} else if (y_46_im <= 4.5e+32) {
tmp = pow(hypot(x_46_im, x_46_re), y_46_re) * sin(fma(atan2(x_46_im, x_46_re), y_46_re, (y_46_im * log(hypot(x_46_re, x_46_im)))));
} else {
tmp = t_1 * sqrt(pow(sin(t_0), 2.0));
}
return tmp;
}
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = Float64(y_46_im * log(hypot(x_46_im, x_46_re))) t_1 = exp(Float64(y_46_im * Float64(-atan(x_46_im, x_46_re)))) tmp = 0.0 if (y_46_im <= -1.5e-6) tmp = Float64(t_1 * sin((cbrt(t_0) ^ 3.0))); elseif (y_46_im <= 4.5e+32) tmp = Float64((hypot(x_46_im, x_46_re) ^ y_46_re) * sin(fma(atan(x_46_im, x_46_re), y_46_re, Float64(y_46_im * log(hypot(x_46_re, x_46_im)))))); else tmp = Float64(t_1 * sqrt((sin(t_0) ^ 2.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[Exp[N[(y$46$im * (-N[ArcTan[x$46$im / x$46$re], $MachinePrecision])), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[y$46$im, -1.5e-6], N[(t$95$1 * N[Sin[N[Power[N[Power[t$95$0, 1/3], $MachinePrecision], 3.0], $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$im, 4.5e+32], N[(N[Power[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision], y$46$re], $MachinePrecision] * N[Sin[N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$re + N[(y$46$im * N[Log[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(t$95$1 * N[Sqrt[N[Power[N[Sin[t$95$0], $MachinePrecision], 2.0], $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 := e^{y.im \cdot \left(-\tan^{-1}_* \frac{x.im}{x.re}\right)}\\
\mathbf{if}\;y.im \leq -1.5 \cdot 10^{-6}:\\
\;\;\;\;t\_1 \cdot \sin \left({\left(\sqrt[3]{t\_0}\right)}^{3}\right)\\
\mathbf{elif}\;y.im \leq 4.5 \cdot 10^{+32}:\\
\;\;\;\;{\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re} \cdot \sin \left(\mathsf{fma}\left(\tan^{-1}_* \frac{x.im}{x.re}, y.re, y.im \cdot \log \left(\mathsf{hypot}\left(x.re, x.im\right)\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1 \cdot \sqrt{{\sin t\_0}^{2}}\\
\end{array}
\end{array}
if y.im < -1.5e-6Initial program 26.8%
exp-diff22.9%
exp-to-pow22.9%
hypot-define22.9%
*-commutative22.9%
exp-prod22.5%
fma-define21.2%
hypot-define59.5%
*-commutative59.5%
Simplified59.5%
Taylor expanded in y.re around 0 62.3%
rec-exp62.3%
distribute-rgt-neg-in62.3%
Simplified62.3%
Taylor expanded in y.im around inf 23.0%
+-commutative23.0%
unpow223.0%
unpow223.0%
hypot-undefine61.1%
log-pow0.0%
hypot-undefine0.0%
unpow20.0%
unpow20.0%
+-commutative0.0%
unpow20.0%
unpow20.0%
hypot-undefine0.0%
Simplified0.0%
add-cube-cbrt0.0%
pow30.0%
log-pow62.2%
Applied egg-rr62.2%
if -1.5e-6 < y.im < 4.5000000000000003e32Initial program 46.0%
exp-diff45.2%
exp-to-pow45.2%
hypot-define45.2%
*-commutative45.2%
exp-prod45.2%
fma-define45.2%
hypot-define86.1%
*-commutative86.1%
Simplified86.1%
add-cbrt-cube37.5%
pow337.5%
fma-undefine37.5%
*-commutative37.5%
*-commutative37.5%
fma-define37.5%
Applied egg-rr37.5%
Taylor expanded in y.im around 0 28.6%
unpow228.6%
unpow228.6%
hypot-undefine37.2%
Simplified37.2%
Taylor expanded in y.im around 0 45.7%
+-commutative45.7%
*-commutative45.7%
fma-undefine45.8%
+-commutative45.8%
unpow245.8%
unpow245.8%
hypot-undefine86.7%
Simplified86.7%
if 4.5000000000000003e32 < y.im Initial program 34.6%
exp-diff29.8%
exp-to-pow29.8%
hypot-define29.8%
*-commutative29.8%
exp-prod29.3%
fma-define29.3%
hypot-define51.9%
*-commutative51.9%
Simplified51.9%
Taylor expanded in y.re around 0 54.4%
rec-exp54.4%
distribute-rgt-neg-in54.4%
Simplified54.4%
Taylor expanded in y.im around inf 31.5%
+-commutative31.5%
unpow231.5%
unpow231.5%
hypot-undefine56.0%
log-pow0.0%
hypot-undefine0.0%
unpow20.0%
unpow20.0%
+-commutative0.0%
unpow20.0%
unpow20.0%
hypot-undefine0.0%
Simplified0.0%
add-sqr-sqrt0.0%
sqrt-unprod0.0%
pow20.0%
log-pow63.4%
Applied egg-rr63.4%
Final simplification73.7%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (sin (* y.re (atan2 x.im x.re))))
(t_1
(*
(exp
(-
(* y.re (log (sqrt (+ (* x.re x.re) (* x.im x.im)))))
(* y.im (atan2 x.im x.re))))
t_0)))
(if (<= y.re -3200000.0)
t_1
(if (<= y.re 1.1e-26)
(*
(exp (* y.im (- (atan2 x.im x.re))))
(sin (* y.im (log (hypot x.im x.re)))))
(if (or (<= y.re 9.5e+71) (not (<= y.re 9e+230)))
t_1
(* (fabs t_0) (pow x.im y.re)))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = sin((y_46_re * atan2(x_46_im, x_46_re)));
double t_1 = exp(((y_46_re * log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))) - (y_46_im * atan2(x_46_im, x_46_re)))) * t_0;
double tmp;
if (y_46_re <= -3200000.0) {
tmp = t_1;
} else if (y_46_re <= 1.1e-26) {
tmp = exp((y_46_im * -atan2(x_46_im, x_46_re))) * sin((y_46_im * log(hypot(x_46_im, x_46_re))));
} else if ((y_46_re <= 9.5e+71) || !(y_46_re <= 9e+230)) {
tmp = t_1;
} else {
tmp = fabs(t_0) * pow(x_46_im, y_46_re);
}
return tmp;
}
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = Math.sin((y_46_re * Math.atan2(x_46_im, x_46_re)));
double t_1 = Math.exp(((y_46_re * Math.log(Math.sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))) - (y_46_im * Math.atan2(x_46_im, x_46_re)))) * t_0;
double tmp;
if (y_46_re <= -3200000.0) {
tmp = t_1;
} else if (y_46_re <= 1.1e-26) {
tmp = Math.exp((y_46_im * -Math.atan2(x_46_im, x_46_re))) * Math.sin((y_46_im * Math.log(Math.hypot(x_46_im, x_46_re))));
} else if ((y_46_re <= 9.5e+71) || !(y_46_re <= 9e+230)) {
tmp = t_1;
} else {
tmp = Math.abs(t_0) * Math.pow(x_46_im, y_46_re);
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): t_0 = math.sin((y_46_re * math.atan2(x_46_im, x_46_re))) t_1 = math.exp(((y_46_re * math.log(math.sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))) - (y_46_im * math.atan2(x_46_im, x_46_re)))) * t_0 tmp = 0 if y_46_re <= -3200000.0: tmp = t_1 elif y_46_re <= 1.1e-26: tmp = math.exp((y_46_im * -math.atan2(x_46_im, x_46_re))) * math.sin((y_46_im * math.log(math.hypot(x_46_im, x_46_re)))) elif (y_46_re <= 9.5e+71) or not (y_46_re <= 9e+230): tmp = t_1 else: tmp = math.fabs(t_0) * math.pow(x_46_im, y_46_re) return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = sin(Float64(y_46_re * atan(x_46_im, x_46_re))) t_1 = Float64(exp(Float64(Float64(y_46_re * log(sqrt(Float64(Float64(x_46_re * x_46_re) + Float64(x_46_im * x_46_im))))) - Float64(y_46_im * atan(x_46_im, x_46_re)))) * t_0) tmp = 0.0 if (y_46_re <= -3200000.0) tmp = t_1; elseif (y_46_re <= 1.1e-26) tmp = Float64(exp(Float64(y_46_im * Float64(-atan(x_46_im, x_46_re)))) * sin(Float64(y_46_im * log(hypot(x_46_im, x_46_re))))); elseif ((y_46_re <= 9.5e+71) || !(y_46_re <= 9e+230)) tmp = t_1; else tmp = Float64(abs(t_0) * (x_46_im ^ y_46_re)); end return tmp end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = sin((y_46_re * atan2(x_46_im, x_46_re))); t_1 = exp(((y_46_re * log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))) - (y_46_im * atan2(x_46_im, x_46_re)))) * t_0; tmp = 0.0; if (y_46_re <= -3200000.0) tmp = t_1; elseif (y_46_re <= 1.1e-26) tmp = exp((y_46_im * -atan2(x_46_im, x_46_re))) * sin((y_46_im * log(hypot(x_46_im, x_46_re)))); elseif ((y_46_re <= 9.5e+71) || ~((y_46_re <= 9e+230))) tmp = t_1; else tmp = abs(t_0) * (x_46_im ^ y_46_re); end tmp_2 = tmp; end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[Sin[N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$1 = N[(N[Exp[N[(N[(y$46$re * N[Log[N[Sqrt[N[(N[(x$46$re * x$46$re), $MachinePrecision] + N[(x$46$im * x$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision] - N[(y$46$im * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * t$95$0), $MachinePrecision]}, If[LessEqual[y$46$re, -3200000.0], t$95$1, If[LessEqual[y$46$re, 1.1e-26], N[(N[Exp[N[(y$46$im * (-N[ArcTan[x$46$im / x$46$re], $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], If[Or[LessEqual[y$46$re, 9.5e+71], N[Not[LessEqual[y$46$re, 9e+230]], $MachinePrecision]], t$95$1, N[(N[Abs[t$95$0], $MachinePrecision] * N[Power[x$46$im, y$46$re], $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\\
t_1 := e^{y.re \cdot \log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) - y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}} \cdot t\_0\\
\mathbf{if}\;y.re \leq -3200000:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y.re \leq 1.1 \cdot 10^{-26}:\\
\;\;\;\;e^{y.im \cdot \left(-\tan^{-1}_* \frac{x.im}{x.re}\right)} \cdot \sin \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right)\\
\mathbf{elif}\;y.re \leq 9.5 \cdot 10^{+71} \lor \neg \left(y.re \leq 9 \cdot 10^{+230}\right):\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;\left|t\_0\right| \cdot {x.im}^{y.re}\\
\end{array}
\end{array}
if y.re < -3.2e6 or 1.1e-26 < y.re < 9.50000000000000015e71 or 8.9999999999999998e230 < y.re Initial program 35.1%
Taylor expanded in y.im around 0 78.4%
if -3.2e6 < y.re < 1.1e-26Initial program 39.2%
exp-diff39.2%
exp-to-pow39.2%
hypot-define39.2%
*-commutative39.2%
exp-prod38.7%
fma-define38.7%
hypot-define78.8%
*-commutative78.8%
Simplified78.8%
Taylor expanded in y.re around 0 80.0%
rec-exp80.0%
distribute-rgt-neg-in80.0%
Simplified80.0%
Taylor expanded in y.im around inf 33.8%
unpow233.8%
unpow233.8%
hypot-undefine67.6%
Simplified67.6%
if 9.50000000000000015e71 < y.re < 8.9999999999999998e230Initial program 38.5%
Taylor expanded in y.im around 0 53.9%
Taylor expanded in x.re around 0 27.1%
Taylor expanded in y.im around 0 50.3%
add-sqr-sqrt30.8%
sqrt-unprod69.3%
pow269.3%
*-commutative69.3%
Applied egg-rr73.4%
unpow269.3%
rem-sqrt-square69.3%
*-commutative69.3%
Simplified73.4%
Final simplification72.3%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (* y.re (atan2 x.im x.re))))
(if (<= y.re -4200000000.0)
(* (fabs (sin t_0)) (pow x.im y.re))
(if (<= y.re 2.2e-12)
(*
(exp (* y.im (- (atan2 x.im x.re))))
(sin (* y.im (log (hypot x.im x.re)))))
(if (<= y.re 1.35e+78)
(* (pow (hypot x.im x.re) y.re) (sin (+ t_0 (* y.im (log x.re)))))
(* (pow x.im y.re) (sin (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_re * atan2(x_46_im, x_46_re);
double tmp;
if (y_46_re <= -4200000000.0) {
tmp = fabs(sin(t_0)) * pow(x_46_im, y_46_re);
} else if (y_46_re <= 2.2e-12) {
tmp = exp((y_46_im * -atan2(x_46_im, x_46_re))) * sin((y_46_im * log(hypot(x_46_im, x_46_re))));
} else if (y_46_re <= 1.35e+78) {
tmp = pow(hypot(x_46_im, x_46_re), y_46_re) * sin((t_0 + (y_46_im * log(x_46_re))));
} else {
tmp = pow(x_46_im, y_46_re) * sin(fabs(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_re <= -4200000000.0) {
tmp = Math.abs(Math.sin(t_0)) * Math.pow(x_46_im, y_46_re);
} else if (y_46_re <= 2.2e-12) {
tmp = Math.exp((y_46_im * -Math.atan2(x_46_im, x_46_re))) * Math.sin((y_46_im * Math.log(Math.hypot(x_46_im, x_46_re))));
} else if (y_46_re <= 1.35e+78) {
tmp = Math.pow(Math.hypot(x_46_im, x_46_re), y_46_re) * Math.sin((t_0 + (y_46_im * Math.log(x_46_re))));
} else {
tmp = Math.pow(x_46_im, y_46_re) * Math.sin(Math.abs(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_re <= -4200000000.0: tmp = math.fabs(math.sin(t_0)) * math.pow(x_46_im, y_46_re) elif y_46_re <= 2.2e-12: tmp = math.exp((y_46_im * -math.atan2(x_46_im, x_46_re))) * math.sin((y_46_im * math.log(math.hypot(x_46_im, x_46_re)))) elif y_46_re <= 1.35e+78: tmp = math.pow(math.hypot(x_46_im, x_46_re), y_46_re) * math.sin((t_0 + (y_46_im * math.log(x_46_re)))) else: tmp = math.pow(x_46_im, y_46_re) * math.sin(math.fabs(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_re <= -4200000000.0) tmp = Float64(abs(sin(t_0)) * (x_46_im ^ y_46_re)); elseif (y_46_re <= 2.2e-12) tmp = Float64(exp(Float64(y_46_im * Float64(-atan(x_46_im, x_46_re)))) * sin(Float64(y_46_im * log(hypot(x_46_im, x_46_re))))); elseif (y_46_re <= 1.35e+78) tmp = Float64((hypot(x_46_im, x_46_re) ^ y_46_re) * sin(Float64(t_0 + Float64(y_46_im * log(x_46_re))))); else tmp = Float64((x_46_im ^ y_46_re) * sin(abs(t_0))); end return tmp end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = y_46_re * atan2(x_46_im, x_46_re); tmp = 0.0; if (y_46_re <= -4200000000.0) tmp = abs(sin(t_0)) * (x_46_im ^ y_46_re); elseif (y_46_re <= 2.2e-12) tmp = exp((y_46_im * -atan2(x_46_im, x_46_re))) * sin((y_46_im * log(hypot(x_46_im, x_46_re)))); elseif (y_46_re <= 1.35e+78) tmp = (hypot(x_46_im, x_46_re) ^ y_46_re) * sin((t_0 + (y_46_im * log(x_46_re)))); else tmp = (x_46_im ^ y_46_re) * sin(abs(t_0)); end tmp_2 = tmp; end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y$46$re, -4200000000.0], N[(N[Abs[N[Sin[t$95$0], $MachinePrecision]], $MachinePrecision] * N[Power[x$46$im, y$46$re], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$re, 2.2e-12], N[(N[Exp[N[(y$46$im * (-N[ArcTan[x$46$im / x$46$re], $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], If[LessEqual[y$46$re, 1.35e+78], N[(N[Power[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision], y$46$re], $MachinePrecision] * N[Sin[N[(t$95$0 + N[(y$46$im * N[Log[x$46$re], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(N[Power[x$46$im, y$46$re], $MachinePrecision] * N[Sin[N[Abs[t$95$0], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
\mathbf{if}\;y.re \leq -4200000000:\\
\;\;\;\;\left|\sin t\_0\right| \cdot {x.im}^{y.re}\\
\mathbf{elif}\;y.re \leq 2.2 \cdot 10^{-12}:\\
\;\;\;\;e^{y.im \cdot \left(-\tan^{-1}_* \frac{x.im}{x.re}\right)} \cdot \sin \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right)\\
\mathbf{elif}\;y.re \leq 1.35 \cdot 10^{+78}:\\
\;\;\;\;{\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re} \cdot \sin \left(t\_0 + y.im \cdot \log x.re\right)\\
\mathbf{else}:\\
\;\;\;\;{x.im}^{y.re} \cdot \sin \left(\left|t\_0\right|\right)\\
\end{array}
\end{array}
if y.re < -4.2e9Initial program 31.8%
Taylor expanded in y.im around 0 83.4%
Taylor expanded in x.re around 0 33.4%
Taylor expanded in y.im around 0 59.4%
add-sqr-sqrt56.1%
sqrt-unprod92.4%
pow292.4%
*-commutative92.4%
Applied egg-rr68.5%
unpow292.4%
rem-sqrt-square92.4%
*-commutative92.4%
Simplified68.5%
if -4.2e9 < y.re < 2.19999999999999992e-12Initial program 40.1%
exp-diff40.1%
exp-to-pow40.1%
hypot-define40.1%
*-commutative40.1%
exp-prod39.6%
fma-define39.6%
hypot-define79.1%
*-commutative79.1%
Simplified79.1%
Taylor expanded in y.re around 0 80.3%
rec-exp80.3%
distribute-rgt-neg-in80.3%
Simplified80.3%
Taylor expanded in y.im around inf 34.1%
unpow234.1%
unpow234.1%
hypot-undefine67.4%
Simplified67.4%
if 2.19999999999999992e-12 < y.re < 1.35000000000000002e78Initial program 33.3%
exp-diff25.0%
exp-to-pow25.0%
hypot-define25.0%
*-commutative25.0%
exp-prod25.0%
fma-define25.0%
hypot-define75.0%
*-commutative75.0%
Simplified75.0%
add-cbrt-cube43.8%
pow343.8%
fma-undefine43.8%
*-commutative43.8%
*-commutative43.8%
fma-define43.8%
Applied egg-rr43.8%
Taylor expanded in y.im around 0 35.9%
unpow235.9%
unpow235.9%
hypot-undefine43.9%
Simplified43.9%
Taylor expanded in x.im around 0 58.5%
if 1.35000000000000002e78 < y.re Initial program 39.5%
Taylor expanded in y.im around 0 60.5%
Taylor expanded in x.re around 0 30.3%
Taylor expanded in y.im around 0 53.7%
add-sqr-sqrt28.1%
sqrt-unprod30.3%
pow230.3%
*-commutative30.3%
Applied egg-rr30.3%
*-commutative30.3%
unpow230.3%
rem-sqrt-square65.3%
Simplified65.3%
Final simplification66.9%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0
(* y.re (* (atan2 x.im x.re) (exp (* y.im (- (atan2 x.im x.re)))))))
(t_1 (* y.re (atan2 x.im x.re))))
(if (<= y.re -4900000000.0)
(* (fabs (sin t_1)) (pow x.im y.re))
(if (<= y.re 1.35e-307)
t_0
(if (<= y.re 2.8e-295)
(*
(sin (* y.im (log (hypot x.im x.re))))
(exp (* y.im (atan2 x.im x.re))))
(if (<= y.re 1.1e+75) t_0 (* (pow x.im y.re) (sin (fabs t_1)))))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = y_46_re * (atan2(x_46_im, x_46_re) * exp((y_46_im * -atan2(x_46_im, x_46_re))));
double t_1 = y_46_re * atan2(x_46_im, x_46_re);
double tmp;
if (y_46_re <= -4900000000.0) {
tmp = fabs(sin(t_1)) * pow(x_46_im, y_46_re);
} else if (y_46_re <= 1.35e-307) {
tmp = t_0;
} else if (y_46_re <= 2.8e-295) {
tmp = sin((y_46_im * log(hypot(x_46_im, x_46_re)))) * exp((y_46_im * atan2(x_46_im, x_46_re)));
} else if (y_46_re <= 1.1e+75) {
tmp = t_0;
} else {
tmp = pow(x_46_im, y_46_re) * sin(fabs(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) * Math.exp((y_46_im * -Math.atan2(x_46_im, x_46_re))));
double t_1 = y_46_re * Math.atan2(x_46_im, x_46_re);
double tmp;
if (y_46_re <= -4900000000.0) {
tmp = Math.abs(Math.sin(t_1)) * Math.pow(x_46_im, y_46_re);
} else if (y_46_re <= 1.35e-307) {
tmp = t_0;
} else if (y_46_re <= 2.8e-295) {
tmp = Math.sin((y_46_im * Math.log(Math.hypot(x_46_im, x_46_re)))) * Math.exp((y_46_im * Math.atan2(x_46_im, x_46_re)));
} else if (y_46_re <= 1.1e+75) {
tmp = t_0;
} else {
tmp = Math.pow(x_46_im, y_46_re) * Math.sin(Math.abs(t_1));
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): t_0 = y_46_re * (math.atan2(x_46_im, x_46_re) * math.exp((y_46_im * -math.atan2(x_46_im, x_46_re)))) t_1 = y_46_re * math.atan2(x_46_im, x_46_re) tmp = 0 if y_46_re <= -4900000000.0: tmp = math.fabs(math.sin(t_1)) * math.pow(x_46_im, y_46_re) elif y_46_re <= 1.35e-307: tmp = t_0 elif y_46_re <= 2.8e-295: tmp = math.sin((y_46_im * math.log(math.hypot(x_46_im, x_46_re)))) * math.exp((y_46_im * math.atan2(x_46_im, x_46_re))) elif y_46_re <= 1.1e+75: tmp = t_0 else: tmp = math.pow(x_46_im, y_46_re) * math.sin(math.fabs(t_1)) 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(y_46_im * Float64(-atan(x_46_im, x_46_re)))))) t_1 = Float64(y_46_re * atan(x_46_im, x_46_re)) tmp = 0.0 if (y_46_re <= -4900000000.0) tmp = Float64(abs(sin(t_1)) * (x_46_im ^ y_46_re)); elseif (y_46_re <= 1.35e-307) tmp = t_0; elseif (y_46_re <= 2.8e-295) tmp = Float64(sin(Float64(y_46_im * log(hypot(x_46_im, x_46_re)))) * exp(Float64(y_46_im * atan(x_46_im, x_46_re)))); elseif (y_46_re <= 1.1e+75) tmp = t_0; else tmp = Float64((x_46_im ^ y_46_re) * sin(abs(t_1))); end return tmp end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = y_46_re * (atan2(x_46_im, x_46_re) * exp((y_46_im * -atan2(x_46_im, x_46_re)))); t_1 = y_46_re * atan2(x_46_im, x_46_re); tmp = 0.0; if (y_46_re <= -4900000000.0) tmp = abs(sin(t_1)) * (x_46_im ^ y_46_re); elseif (y_46_re <= 1.35e-307) tmp = t_0; elseif (y_46_re <= 2.8e-295) tmp = sin((y_46_im * log(hypot(x_46_im, x_46_re)))) * exp((y_46_im * atan2(x_46_im, x_46_re))); elseif (y_46_re <= 1.1e+75) tmp = t_0; else tmp = (x_46_im ^ y_46_re) * sin(abs(t_1)); end tmp_2 = tmp; end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[(y$46$re * N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * N[Exp[N[(y$46$im * (-N[ArcTan[x$46$im / x$46$re], $MachinePrecision])), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y$46$re, -4900000000.0], N[(N[Abs[N[Sin[t$95$1], $MachinePrecision]], $MachinePrecision] * N[Power[x$46$im, y$46$re], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$re, 1.35e-307], t$95$0, If[LessEqual[y$46$re, 2.8e-295], N[(N[Sin[N[(y$46$im * N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Exp[N[(y$46$im * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$re, 1.1e+75], t$95$0, N[(N[Power[x$46$im, y$46$re], $MachinePrecision] * N[Sin[N[Abs[t$95$1], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := y.re \cdot \left(\tan^{-1}_* \frac{x.im}{x.re} \cdot e^{y.im \cdot \left(-\tan^{-1}_* \frac{x.im}{x.re}\right)}\right)\\
t_1 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
\mathbf{if}\;y.re \leq -4900000000:\\
\;\;\;\;\left|\sin t\_1\right| \cdot {x.im}^{y.re}\\
\mathbf{elif}\;y.re \leq 1.35 \cdot 10^{-307}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;y.re \leq 2.8 \cdot 10^{-295}:\\
\;\;\;\;\sin \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right) \cdot e^{y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}}\\
\mathbf{elif}\;y.re \leq 1.1 \cdot 10^{+75}:\\
\;\;\;\;t\_0\\
\mathbf{else}:\\
\;\;\;\;{x.im}^{y.re} \cdot \sin \left(\left|t\_1\right|\right)\\
\end{array}
\end{array}
if y.re < -4.9e9Initial program 31.8%
Taylor expanded in y.im around 0 83.4%
Taylor expanded in x.re around 0 33.4%
Taylor expanded in y.im around 0 59.4%
add-sqr-sqrt56.1%
sqrt-unprod92.4%
pow292.4%
*-commutative92.4%
Applied egg-rr68.5%
unpow292.4%
rem-sqrt-square92.4%
*-commutative92.4%
Simplified68.5%
if -4.9e9 < y.re < 1.34999999999999993e-307 or 2.7999999999999999e-295 < y.re < 1.10000000000000006e75Initial program 38.4%
Taylor expanded in y.im around 0 35.9%
Taylor expanded in x.re around 0 26.0%
Taylor expanded in y.re around 0 50.4%
if 1.34999999999999993e-307 < y.re < 2.7999999999999999e-295Initial program 66.4%
exp-diff66.4%
exp-to-pow66.4%
hypot-define66.4%
*-commutative66.4%
exp-prod66.4%
fma-define66.4%
hypot-define99.7%
*-commutative99.7%
Simplified99.7%
Taylor expanded in y.re around 0 99.7%
rec-exp99.7%
distribute-rgt-neg-in99.7%
Simplified99.7%
Taylor expanded in y.im around inf 66.4%
+-commutative66.4%
unpow266.4%
unpow266.4%
hypot-undefine99.7%
log-pow4.1%
hypot-undefine2.6%
unpow22.6%
unpow22.6%
+-commutative2.6%
unpow22.6%
unpow22.6%
hypot-undefine4.1%
Simplified4.1%
add-exp-log4.1%
log-prod4.1%
add-log-exp4.1%
*-commutative4.1%
add-sqr-sqrt3.0%
sqrt-unprod4.1%
sqr-neg4.1%
sqrt-unprod1.1%
add-sqr-sqrt4.1%
log-pow45.1%
Applied egg-rr45.1%
exp-sum45.1%
rem-exp-log83.3%
Simplified83.3%
if 1.10000000000000006e75 < y.re Initial program 39.5%
Taylor expanded in y.im around 0 60.5%
Taylor expanded in x.re around 0 30.3%
Taylor expanded in y.im around 0 53.7%
add-sqr-sqrt28.1%
sqrt-unprod30.3%
pow230.3%
*-commutative30.3%
Applied egg-rr30.3%
*-commutative30.3%
unpow230.3%
rem-sqrt-square65.3%
Simplified65.3%
Final simplification58.4%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (* y.re (atan2 x.im x.re))))
(if (<= y.re -550000000.0)
(* (fabs (sin t_0)) (pow x.im y.re))
(if (<= y.re 1.12e+86)
(*
(exp (* y.im (- (atan2 x.im x.re))))
(sin (* y.im (log (hypot x.im x.re)))))
(* (pow x.im y.re) (sin (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_re * atan2(x_46_im, x_46_re);
double tmp;
if (y_46_re <= -550000000.0) {
tmp = fabs(sin(t_0)) * pow(x_46_im, y_46_re);
} else if (y_46_re <= 1.12e+86) {
tmp = exp((y_46_im * -atan2(x_46_im, x_46_re))) * sin((y_46_im * log(hypot(x_46_im, x_46_re))));
} else {
tmp = pow(x_46_im, y_46_re) * sin(fabs(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_re <= -550000000.0) {
tmp = Math.abs(Math.sin(t_0)) * Math.pow(x_46_im, y_46_re);
} else if (y_46_re <= 1.12e+86) {
tmp = Math.exp((y_46_im * -Math.atan2(x_46_im, x_46_re))) * Math.sin((y_46_im * Math.log(Math.hypot(x_46_im, x_46_re))));
} else {
tmp = Math.pow(x_46_im, y_46_re) * Math.sin(Math.abs(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_re <= -550000000.0: tmp = math.fabs(math.sin(t_0)) * math.pow(x_46_im, y_46_re) elif y_46_re <= 1.12e+86: tmp = math.exp((y_46_im * -math.atan2(x_46_im, x_46_re))) * math.sin((y_46_im * math.log(math.hypot(x_46_im, x_46_re)))) else: tmp = math.pow(x_46_im, y_46_re) * math.sin(math.fabs(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_re <= -550000000.0) tmp = Float64(abs(sin(t_0)) * (x_46_im ^ y_46_re)); elseif (y_46_re <= 1.12e+86) tmp = Float64(exp(Float64(y_46_im * Float64(-atan(x_46_im, x_46_re)))) * sin(Float64(y_46_im * log(hypot(x_46_im, x_46_re))))); else tmp = Float64((x_46_im ^ y_46_re) * sin(abs(t_0))); end return tmp end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = y_46_re * atan2(x_46_im, x_46_re); tmp = 0.0; if (y_46_re <= -550000000.0) tmp = abs(sin(t_0)) * (x_46_im ^ y_46_re); elseif (y_46_re <= 1.12e+86) tmp = exp((y_46_im * -atan2(x_46_im, x_46_re))) * sin((y_46_im * log(hypot(x_46_im, x_46_re)))); else tmp = (x_46_im ^ y_46_re) * sin(abs(t_0)); end tmp_2 = tmp; end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y$46$re, -550000000.0], N[(N[Abs[N[Sin[t$95$0], $MachinePrecision]], $MachinePrecision] * N[Power[x$46$im, y$46$re], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$re, 1.12e+86], N[(N[Exp[N[(y$46$im * (-N[ArcTan[x$46$im / x$46$re], $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[Power[x$46$im, y$46$re], $MachinePrecision] * N[Sin[N[Abs[t$95$0], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
\mathbf{if}\;y.re \leq -550000000:\\
\;\;\;\;\left|\sin t\_0\right| \cdot {x.im}^{y.re}\\
\mathbf{elif}\;y.re \leq 1.12 \cdot 10^{+86}:\\
\;\;\;\;e^{y.im \cdot \left(-\tan^{-1}_* \frac{x.im}{x.re}\right)} \cdot \sin \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;{x.im}^{y.re} \cdot \sin \left(\left|t\_0\right|\right)\\
\end{array}
\end{array}
if y.re < -5.5e8Initial program 31.8%
Taylor expanded in y.im around 0 83.4%
Taylor expanded in x.re around 0 33.4%
Taylor expanded in y.im around 0 59.4%
add-sqr-sqrt56.1%
sqrt-unprod92.4%
pow292.4%
*-commutative92.4%
Applied egg-rr68.5%
unpow292.4%
rem-sqrt-square92.4%
*-commutative92.4%
Simplified68.5%
if -5.5e8 < y.re < 1.12e86Initial program 39.5%
exp-diff38.8%
exp-to-pow38.8%
hypot-define38.8%
*-commutative38.8%
exp-prod38.4%
fma-define38.4%
hypot-define78.7%
*-commutative78.7%
Simplified78.7%
Taylor expanded in y.re around 0 75.4%
rec-exp75.4%
distribute-rgt-neg-in75.4%
Simplified75.4%
Taylor expanded in y.im around inf 32.3%
unpow232.3%
unpow232.3%
hypot-undefine63.6%
Simplified63.6%
if 1.12e86 < y.re Initial program 39.5%
Taylor expanded in y.im around 0 60.5%
Taylor expanded in x.re around 0 30.3%
Taylor expanded in y.im around 0 53.7%
add-sqr-sqrt28.1%
sqrt-unprod30.3%
pow230.3%
*-commutative30.3%
Applied egg-rr30.3%
*-commutative30.3%
unpow230.3%
rem-sqrt-square65.3%
Simplified65.3%
Final simplification65.1%
(FPCore (x.re x.im y.re y.im) :precision binary64 (if (or (<= y.re -4900000000.0) (not (<= y.re 1.65e+31))) (* (fabs (sin (* y.re (atan2 x.im x.re)))) (pow x.im y.re)) (* y.re (* (atan2 x.im x.re) (exp (* y.im (- (atan2 x.im x.re))))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double tmp;
if ((y_46_re <= -4900000000.0) || !(y_46_re <= 1.65e+31)) {
tmp = fabs(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((y_46_im * -atan2(x_46_im, x_46_re))));
}
return tmp;
}
real(8) function code(x_46re, x_46im, y_46re, y_46im)
real(8), intent (in) :: x_46re
real(8), intent (in) :: x_46im
real(8), intent (in) :: y_46re
real(8), intent (in) :: y_46im
real(8) :: tmp
if ((y_46re <= (-4900000000.0d0)) .or. (.not. (y_46re <= 1.65d+31))) then
tmp = abs(sin((y_46re * atan2(x_46im, x_46re)))) * (x_46im ** y_46re)
else
tmp = y_46re * (atan2(x_46im, x_46re) * exp((y_46im * -atan2(x_46im, x_46re))))
end if
code = tmp
end function
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double tmp;
if ((y_46_re <= -4900000000.0) || !(y_46_re <= 1.65e+31)) {
tmp = Math.abs(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((y_46_im * -Math.atan2(x_46_im, x_46_re))));
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): tmp = 0 if (y_46_re <= -4900000000.0) or not (y_46_re <= 1.65e+31): tmp = math.fabs(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((y_46_im * -math.atan2(x_46_im, x_46_re)))) return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) tmp = 0.0 if ((y_46_re <= -4900000000.0) || !(y_46_re <= 1.65e+31)) tmp = Float64(abs(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(y_46_im * Float64(-atan(x_46_im, x_46_re)))))); end return tmp end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im) tmp = 0.0; if ((y_46_re <= -4900000000.0) || ~((y_46_re <= 1.65e+31))) tmp = abs(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((y_46_im * -atan2(x_46_im, x_46_re)))); end tmp_2 = tmp; end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := If[Or[LessEqual[y$46$re, -4900000000.0], N[Not[LessEqual[y$46$re, 1.65e+31]], $MachinePrecision]], N[(N[Abs[N[Sin[N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $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[(y$46$im * (-N[ArcTan[x$46$im / x$46$re], $MachinePrecision])), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y.re \leq -4900000000 \lor \neg \left(y.re \leq 1.65 \cdot 10^{+31}\right):\\
\;\;\;\;\left|\sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right| \cdot {x.im}^{y.re}\\
\mathbf{else}:\\
\;\;\;\;y.re \cdot \left(\tan^{-1}_* \frac{x.im}{x.re} \cdot e^{y.im \cdot \left(-\tan^{-1}_* \frac{x.im}{x.re}\right)}\right)\\
\end{array}
\end{array}
if y.re < -4.9e9 or 1.64999999999999996e31 < y.re Initial program 35.3%
Taylor expanded in y.im around 0 73.3%
Taylor expanded in x.re around 0 31.2%
Taylor expanded in y.im around 0 54.6%
add-sqr-sqrt45.7%
sqrt-unprod78.5%
pow278.5%
*-commutative78.5%
Applied egg-rr63.3%
unpow278.5%
rem-sqrt-square79.3%
*-commutative79.3%
Simplified63.3%
if -4.9e9 < y.re < 1.64999999999999996e31Initial program 39.3%
Taylor expanded in y.im around 0 33.5%
Taylor expanded in x.re around 0 25.4%
Taylor expanded in y.re around 0 50.2%
Final simplification56.1%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (* y.re (atan2 x.im x.re))))
(if (<= y.re -4900000000.0)
(* (fabs (sin t_0)) (pow x.im y.re))
(if (<= y.re 7.1e+75)
(* y.re (* (atan2 x.im x.re) (exp (* y.im (- (atan2 x.im x.re))))))
(* (pow x.im y.re) (sin (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_re * atan2(x_46_im, x_46_re);
double tmp;
if (y_46_re <= -4900000000.0) {
tmp = fabs(sin(t_0)) * pow(x_46_im, y_46_re);
} else if (y_46_re <= 7.1e+75) {
tmp = y_46_re * (atan2(x_46_im, x_46_re) * exp((y_46_im * -atan2(x_46_im, x_46_re))));
} else {
tmp = pow(x_46_im, y_46_re) * sin(fabs(t_0));
}
return tmp;
}
real(8) function code(x_46re, x_46im, y_46re, y_46im)
real(8), intent (in) :: x_46re
real(8), intent (in) :: x_46im
real(8), intent (in) :: y_46re
real(8), intent (in) :: y_46im
real(8) :: t_0
real(8) :: tmp
t_0 = y_46re * atan2(x_46im, x_46re)
if (y_46re <= (-4900000000.0d0)) then
tmp = abs(sin(t_0)) * (x_46im ** y_46re)
else if (y_46re <= 7.1d+75) then
tmp = y_46re * (atan2(x_46im, x_46re) * exp((y_46im * -atan2(x_46im, x_46re))))
else
tmp = (x_46im ** y_46re) * sin(abs(t_0))
end if
code = tmp
end function
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = y_46_re * Math.atan2(x_46_im, x_46_re);
double tmp;
if (y_46_re <= -4900000000.0) {
tmp = Math.abs(Math.sin(t_0)) * Math.pow(x_46_im, y_46_re);
} else if (y_46_re <= 7.1e+75) {
tmp = y_46_re * (Math.atan2(x_46_im, x_46_re) * Math.exp((y_46_im * -Math.atan2(x_46_im, x_46_re))));
} else {
tmp = Math.pow(x_46_im, y_46_re) * Math.sin(Math.abs(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_re <= -4900000000.0: tmp = math.fabs(math.sin(t_0)) * math.pow(x_46_im, y_46_re) elif y_46_re <= 7.1e+75: tmp = y_46_re * (math.atan2(x_46_im, x_46_re) * math.exp((y_46_im * -math.atan2(x_46_im, x_46_re)))) else: tmp = math.pow(x_46_im, y_46_re) * math.sin(math.fabs(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_re <= -4900000000.0) tmp = Float64(abs(sin(t_0)) * (x_46_im ^ y_46_re)); elseif (y_46_re <= 7.1e+75) tmp = Float64(y_46_re * Float64(atan(x_46_im, x_46_re) * exp(Float64(y_46_im * Float64(-atan(x_46_im, x_46_re)))))); else tmp = Float64((x_46_im ^ y_46_re) * sin(abs(t_0))); end return tmp end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = y_46_re * atan2(x_46_im, x_46_re); tmp = 0.0; if (y_46_re <= -4900000000.0) tmp = abs(sin(t_0)) * (x_46_im ^ y_46_re); elseif (y_46_re <= 7.1e+75) tmp = y_46_re * (atan2(x_46_im, x_46_re) * exp((y_46_im * -atan2(x_46_im, x_46_re)))); else tmp = (x_46_im ^ y_46_re) * sin(abs(t_0)); end tmp_2 = tmp; end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y$46$re, -4900000000.0], N[(N[Abs[N[Sin[t$95$0], $MachinePrecision]], $MachinePrecision] * N[Power[x$46$im, y$46$re], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$re, 7.1e+75], N[(y$46$re * N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * N[Exp[N[(y$46$im * (-N[ArcTan[x$46$im / x$46$re], $MachinePrecision])), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[Power[x$46$im, y$46$re], $MachinePrecision] * N[Sin[N[Abs[t$95$0], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
\mathbf{if}\;y.re \leq -4900000000:\\
\;\;\;\;\left|\sin t\_0\right| \cdot {x.im}^{y.re}\\
\mathbf{elif}\;y.re \leq 7.1 \cdot 10^{+75}:\\
\;\;\;\;y.re \cdot \left(\tan^{-1}_* \frac{x.im}{x.re} \cdot e^{y.im \cdot \left(-\tan^{-1}_* \frac{x.im}{x.re}\right)}\right)\\
\mathbf{else}:\\
\;\;\;\;{x.im}^{y.re} \cdot \sin \left(\left|t\_0\right|\right)\\
\end{array}
\end{array}
if y.re < -4.9e9Initial program 31.8%
Taylor expanded in y.im around 0 83.4%
Taylor expanded in x.re around 0 33.4%
Taylor expanded in y.im around 0 59.4%
add-sqr-sqrt56.1%
sqrt-unprod92.4%
pow292.4%
*-commutative92.4%
Applied egg-rr68.5%
unpow292.4%
rem-sqrt-square92.4%
*-commutative92.4%
Simplified68.5%
if -4.9e9 < y.re < 7.09999999999999982e75Initial program 39.5%
Taylor expanded in y.im around 0 34.6%
Taylor expanded in x.re around 0 24.9%
Taylor expanded in y.re around 0 48.5%
if 7.09999999999999982e75 < y.re Initial program 39.5%
Taylor expanded in y.im around 0 60.5%
Taylor expanded in x.re around 0 30.3%
Taylor expanded in y.im around 0 53.7%
add-sqr-sqrt28.1%
sqrt-unprod30.3%
pow230.3%
*-commutative30.3%
Applied egg-rr30.3%
*-commutative30.3%
unpow230.3%
rem-sqrt-square65.3%
Simplified65.3%
Final simplification56.5%
(FPCore (x.re x.im y.re y.im) :precision binary64 (if (or (<= y.re -230000000.0) (not (<= y.re 1.2e+19))) (* (sin (* y.re (atan2 x.im x.re))) (pow x.im y.re)) (* y.re (* (atan2 x.im x.re) (exp (* y.im (- (atan2 x.im x.re))))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double tmp;
if ((y_46_re <= -230000000.0) || !(y_46_re <= 1.2e+19)) {
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((y_46_im * -atan2(x_46_im, x_46_re))));
}
return tmp;
}
real(8) function code(x_46re, x_46im, y_46re, y_46im)
real(8), intent (in) :: x_46re
real(8), intent (in) :: x_46im
real(8), intent (in) :: y_46re
real(8), intent (in) :: y_46im
real(8) :: tmp
if ((y_46re <= (-230000000.0d0)) .or. (.not. (y_46re <= 1.2d+19))) then
tmp = sin((y_46re * atan2(x_46im, x_46re))) * (x_46im ** y_46re)
else
tmp = y_46re * (atan2(x_46im, x_46re) * exp((y_46im * -atan2(x_46im, x_46re))))
end if
code = tmp
end function
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double tmp;
if ((y_46_re <= -230000000.0) || !(y_46_re <= 1.2e+19)) {
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((y_46_im * -Math.atan2(x_46_im, x_46_re))));
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): tmp = 0 if (y_46_re <= -230000000.0) or not (y_46_re <= 1.2e+19): 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((y_46_im * -math.atan2(x_46_im, x_46_re)))) return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) tmp = 0.0 if ((y_46_re <= -230000000.0) || !(y_46_re <= 1.2e+19)) 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(y_46_im * Float64(-atan(x_46_im, x_46_re)))))); end return tmp end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im) tmp = 0.0; if ((y_46_re <= -230000000.0) || ~((y_46_re <= 1.2e+19))) 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((y_46_im * -atan2(x_46_im, x_46_re)))); end tmp_2 = tmp; end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := If[Or[LessEqual[y$46$re, -230000000.0], N[Not[LessEqual[y$46$re, 1.2e+19]], $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[(y$46$im * (-N[ArcTan[x$46$im / x$46$re], $MachinePrecision])), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y.re \leq -230000000 \lor \neg \left(y.re \leq 1.2 \cdot 10^{+19}\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^{y.im \cdot \left(-\tan^{-1}_* \frac{x.im}{x.re}\right)}\right)\\
\end{array}
\end{array}
if y.re < -2.3e8 or 1.2e19 < y.re Initial program 35.0%
Taylor expanded in y.im around 0 73.5%
Taylor expanded in x.re around 0 31.7%
Taylor expanded in y.im around 0 55.0%
if -2.3e8 < y.re < 1.2e19Initial program 39.6%
Taylor expanded in y.im around 0 33.0%
Taylor expanded in x.re around 0 24.9%
Taylor expanded in y.re around 0 50.5%
Final simplification52.6%
(FPCore (x.re x.im y.re y.im) :precision binary64 (* (sin (* y.re (atan2 x.im x.re))) (pow x.im y.re)))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
return sin((y_46_re * atan2(x_46_im, x_46_re))) * pow(x_46_im, 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
code = sin((y_46re * atan2(x_46im, x_46re))) * (x_46im ** y_46re)
end function
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
return Math.sin((y_46_re * Math.atan2(x_46_im, x_46_re))) * Math.pow(x_46_im, y_46_re);
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): return math.sin((y_46_re * math.atan2(x_46_im, x_46_re))) * math.pow(x_46_im, y_46_re)
function code(x_46_re, x_46_im, y_46_re, y_46_im) return Float64(sin(Float64(y_46_re * atan(x_46_im, x_46_re))) * (x_46_im ^ y_46_re)) end
function tmp = code(x_46_re, x_46_im, y_46_re, y_46_im) tmp = sin((y_46_re * atan2(x_46_im, x_46_re))) * (x_46_im ^ y_46_re); end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := 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]
\begin{array}{l}
\\
\sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {x.im}^{y.re}
\end{array}
Initial program 37.5%
Taylor expanded in y.im around 0 51.5%
Taylor expanded in x.re around 0 28.0%
Taylor expanded in y.im around 0 30.6%
Final simplification30.6%
herbie shell --seed 2024053
(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)))))