
(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 23 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.im (log (hypot x.im x.re))))
(t_1 (cbrt (fma (atan2 x.im x.re) y.re t_0)))
(t_2 (* y.re (atan2 x.im x.re)))
(t_3 (log (hypot x.re x.im)))
(t_4 (exp (- (* t_3 y.re) (* y.im (atan2 x.im x.re)))))
(t_5 (* t_4 (sin (pow (cbrt (fma y.im t_3 t_2)) 3.0))))
(t_6 (pow (cbrt (pow t_1 2.0)) 4.0)))
(if (<= y.re -1.56e+87)
t_5
(if (<= y.re 2.7e-198)
(* t_4 (sin (* t_6 (cbrt t_1))))
(if (<= y.re 5.8e+267)
t_5
(if (<= y.re 2.35e+299)
(* t_4 (sin t_0))
(*
t_4
(sin
(*
t_6
(pow (+ t_2 (* y.im (log x.im))) 0.1111111111111111))))))))))
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 = cbrt(fma(atan2(x_46_im, x_46_re), y_46_re, t_0));
double t_2 = y_46_re * atan2(x_46_im, x_46_re);
double t_3 = log(hypot(x_46_re, x_46_im));
double t_4 = exp(((t_3 * y_46_re) - (y_46_im * atan2(x_46_im, x_46_re))));
double t_5 = t_4 * sin(pow(cbrt(fma(y_46_im, t_3, t_2)), 3.0));
double t_6 = pow(cbrt(pow(t_1, 2.0)), 4.0);
double tmp;
if (y_46_re <= -1.56e+87) {
tmp = t_5;
} else if (y_46_re <= 2.7e-198) {
tmp = t_4 * sin((t_6 * cbrt(t_1)));
} else if (y_46_re <= 5.8e+267) {
tmp = t_5;
} else if (y_46_re <= 2.35e+299) {
tmp = t_4 * sin(t_0);
} else {
tmp = t_4 * sin((t_6 * pow((t_2 + (y_46_im * log(x_46_im))), 0.1111111111111111)));
}
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 = cbrt(fma(atan(x_46_im, x_46_re), y_46_re, t_0)) t_2 = Float64(y_46_re * atan(x_46_im, x_46_re)) t_3 = log(hypot(x_46_re, x_46_im)) t_4 = exp(Float64(Float64(t_3 * y_46_re) - Float64(y_46_im * atan(x_46_im, x_46_re)))) t_5 = Float64(t_4 * sin((cbrt(fma(y_46_im, t_3, t_2)) ^ 3.0))) t_6 = cbrt((t_1 ^ 2.0)) ^ 4.0 tmp = 0.0 if (y_46_re <= -1.56e+87) tmp = t_5; elseif (y_46_re <= 2.7e-198) tmp = Float64(t_4 * sin(Float64(t_6 * cbrt(t_1)))); elseif (y_46_re <= 5.8e+267) tmp = t_5; elseif (y_46_re <= 2.35e+299) tmp = Float64(t_4 * sin(t_0)); else tmp = Float64(t_4 * sin(Float64(t_6 * (Float64(t_2 + Float64(y_46_im * log(x_46_im))) ^ 0.1111111111111111)))); 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[Power[N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$re + t$95$0), $MachinePrecision], 1/3], $MachinePrecision]}, Block[{t$95$2 = N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $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[Exp[N[(N[(t$95$3 * y$46$re), $MachinePrecision] - N[(y$46$im * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$5 = N[(t$95$4 * N[Sin[N[Power[N[Power[N[(y$46$im * t$95$3 + t$95$2), $MachinePrecision], 1/3], $MachinePrecision], 3.0], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$6 = N[Power[N[Power[N[Power[t$95$1, 2.0], $MachinePrecision], 1/3], $MachinePrecision], 4.0], $MachinePrecision]}, If[LessEqual[y$46$re, -1.56e+87], t$95$5, If[LessEqual[y$46$re, 2.7e-198], N[(t$95$4 * N[Sin[N[(t$95$6 * N[Power[t$95$1, 1/3], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$re, 5.8e+267], t$95$5, If[LessEqual[y$46$re, 2.35e+299], N[(t$95$4 * N[Sin[t$95$0], $MachinePrecision]), $MachinePrecision], N[(t$95$4 * N[Sin[N[(t$95$6 * N[Power[N[(t$95$2 + N[(y$46$im * N[Log[x$46$im], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 0.1111111111111111], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\\
t_1 := \sqrt[3]{\mathsf{fma}\left(\tan^{-1}_* \frac{x.im}{x.re}, y.re, t_0\right)}\\
t_2 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
t_3 := \log \left(\mathsf{hypot}\left(x.re, x.im\right)\right)\\
t_4 := e^{t_3 \cdot y.re - y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}}\\
t_5 := t_4 \cdot \sin \left({\left(\sqrt[3]{\mathsf{fma}\left(y.im, t_3, t_2\right)}\right)}^{3}\right)\\
t_6 := {\left(\sqrt[3]{{t_1}^{2}}\right)}^{4}\\
\mathbf{if}\;y.re \leq -1.56 \cdot 10^{+87}:\\
\;\;\;\;t_5\\
\mathbf{elif}\;y.re \leq 2.7 \cdot 10^{-198}:\\
\;\;\;\;t_4 \cdot \sin \left(t_6 \cdot \sqrt[3]{t_1}\right)\\
\mathbf{elif}\;y.re \leq 5.8 \cdot 10^{+267}:\\
\;\;\;\;t_5\\
\mathbf{elif}\;y.re \leq 2.35 \cdot 10^{+299}:\\
\;\;\;\;t_4 \cdot \sin t_0\\
\mathbf{else}:\\
\;\;\;\;t_4 \cdot \sin \left(t_6 \cdot {\left(t_2 + y.im \cdot \log x.im\right)}^{0.1111111111111111}\right)\\
\end{array}
\end{array}
if y.re < -1.5600000000000001e87 or 2.7000000000000002e-198 < y.re < 5.79999999999999966e267Initial program 33.1%
Simplified76.6%
add-cube-cbrt80.1%
pow385.4%
fma-udef85.4%
*-commutative85.4%
*-commutative85.4%
fma-def85.4%
Applied egg-rr85.4%
if -1.5600000000000001e87 < y.re < 2.7000000000000002e-198Initial program 40.7%
Simplified73.4%
add-cube-cbrt74.8%
pow373.0%
fma-udef72.9%
*-commutative72.9%
*-commutative72.9%
fma-def73.0%
Applied egg-rr73.0%
unpow374.8%
add-cube-cbrt75.2%
associate-*r*74.3%
Applied egg-rr77.1%
Simplified84.1%
if 5.79999999999999966e267 < y.re < 2.35e299Initial program 44.4%
Simplified66.7%
Taylor expanded in y.im around inf 44.4%
unpow244.4%
unpow244.4%
hypot-def88.9%
Simplified88.9%
if 2.35e299 < y.re Initial program 33.3%
Simplified33.3%
add-cube-cbrt33.3%
pow366.7%
fma-udef66.7%
*-commutative66.7%
*-commutative66.7%
fma-def66.7%
Applied egg-rr66.7%
unpow333.3%
add-cube-cbrt33.3%
associate-*r*33.3%
Applied egg-rr33.3%
Simplified66.7%
Taylor expanded in x.re around 0 100.0%
Final simplification85.1%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (log (hypot x.re x.im)))
(t_1 (cbrt (cbrt (fma (atan2 x.im x.re) y.re (* y.im t_0)))))
(t_2 (exp (- (* t_0 y.re) (* y.im (atan2 x.im x.re)))))
(t_3 (* t_2 (sin (* t_1 (pow (pow t_1 2.0) 4.0))))))
(if (<= y.im -1.15e-85)
t_3
(if (<= y.im 5.2e-56)
(* t_2 (sin (pow (cbrt (fma y.im t_0 (* y.re (atan2 x.im x.re)))) 3.0)))
(if (<= y.im 5.9e+40)
(*
t_2
(sin
(fabs
(fma (atan2 x.im x.re) y.re (* y.im (log (hypot x.im x.re)))))))
t_3)))))
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(cbrt(fma(atan2(x_46_im, x_46_re), y_46_re, (y_46_im * t_0))));
double t_2 = exp(((t_0 * y_46_re) - (y_46_im * atan2(x_46_im, x_46_re))));
double t_3 = t_2 * sin((t_1 * pow(pow(t_1, 2.0), 4.0)));
double tmp;
if (y_46_im <= -1.15e-85) {
tmp = t_3;
} else if (y_46_im <= 5.2e-56) {
tmp = t_2 * sin(pow(cbrt(fma(y_46_im, t_0, (y_46_re * atan2(x_46_im, x_46_re)))), 3.0));
} else if (y_46_im <= 5.9e+40) {
tmp = t_2 * sin(fabs(fma(atan2(x_46_im, x_46_re), y_46_re, (y_46_im * log(hypot(x_46_im, x_46_re))))));
} else {
tmp = t_3;
}
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(cbrt(fma(atan(x_46_im, x_46_re), y_46_re, Float64(y_46_im * t_0)))) t_2 = exp(Float64(Float64(t_0 * y_46_re) - Float64(y_46_im * atan(x_46_im, x_46_re)))) t_3 = Float64(t_2 * sin(Float64(t_1 * ((t_1 ^ 2.0) ^ 4.0)))) tmp = 0.0 if (y_46_im <= -1.15e-85) tmp = t_3; elseif (y_46_im <= 5.2e-56) tmp = Float64(t_2 * sin((cbrt(fma(y_46_im, t_0, Float64(y_46_re * atan(x_46_im, x_46_re)))) ^ 3.0))); elseif (y_46_im <= 5.9e+40) tmp = Float64(t_2 * sin(abs(fma(atan(x_46_im, x_46_re), y_46_re, Float64(y_46_im * log(hypot(x_46_im, x_46_re))))))); else tmp = t_3; 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[Power[N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$re + N[(y$46$im * t$95$0), $MachinePrecision]), $MachinePrecision], 1/3], $MachinePrecision], 1/3], $MachinePrecision]}, Block[{t$95$2 = N[Exp[N[(N[(t$95$0 * y$46$re), $MachinePrecision] - N[(y$46$im * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$3 = N[(t$95$2 * N[Sin[N[(t$95$1 * N[Power[N[Power[t$95$1, 2.0], $MachinePrecision], 4.0], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y$46$im, -1.15e-85], t$95$3, If[LessEqual[y$46$im, 5.2e-56], N[(t$95$2 * 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]), $MachinePrecision], If[LessEqual[y$46$im, 5.9e+40], N[(t$95$2 * N[Sin[N[Abs[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]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision], t$95$3]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \log \left(\mathsf{hypot}\left(x.re, x.im\right)\right)\\
t_1 := \sqrt[3]{\sqrt[3]{\mathsf{fma}\left(\tan^{-1}_* \frac{x.im}{x.re}, y.re, y.im \cdot t_0\right)}}\\
t_2 := e^{t_0 \cdot y.re - y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}}\\
t_3 := t_2 \cdot \sin \left(t_1 \cdot {\left({t_1}^{2}\right)}^{4}\right)\\
\mathbf{if}\;y.im \leq -1.15 \cdot 10^{-85}:\\
\;\;\;\;t_3\\
\mathbf{elif}\;y.im \leq 5.2 \cdot 10^{-56}:\\
\;\;\;\;t_2 \cdot \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)\\
\mathbf{elif}\;y.im \leq 5.9 \cdot 10^{+40}:\\
\;\;\;\;t_2 \cdot \sin \left(\left|\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|\right)\\
\mathbf{else}:\\
\;\;\;\;t_3\\
\end{array}
\end{array}
if y.im < -1.15e-85 or 5.8999999999999999e40 < y.im Initial program 33.3%
Simplified65.2%
add-cube-cbrt69.1%
pow369.8%
fma-udef69.8%
*-commutative69.8%
*-commutative69.8%
fma-def69.8%
Applied egg-rr69.8%
unpow369.1%
add-cube-cbrt69.0%
associate-*r*66.8%
Applied egg-rr70.6%
Simplified75.1%
expm1-log1p-u75.1%
expm1-udef70.9%
Applied egg-rr74.5%
expm1-def78.7%
expm1-log1p78.7%
Simplified78.7%
if -1.15e-85 < y.im < 5.19999999999999994e-56Initial program 41.8%
Simplified85.7%
add-cube-cbrt84.8%
pow388.5%
fma-udef88.5%
*-commutative88.5%
*-commutative88.5%
fma-def88.5%
Applied egg-rr88.5%
if 5.19999999999999994e-56 < y.im < 5.8999999999999999e40Initial program 31.3%
Simplified75.0%
add-sqr-sqrt68.6%
sqrt-unprod68.8%
pow268.8%
fma-udef68.8%
*-commutative68.8%
*-commutative68.8%
fma-def68.8%
Applied egg-rr68.8%
unpow268.8%
rem-sqrt-square100.0%
fma-def100.0%
+-commutative100.0%
fma-def99.9%
hypot-def31.2%
unpow231.2%
unpow231.2%
+-commutative31.2%
unpow231.2%
unpow231.2%
hypot-def99.9%
Simplified99.9%
Final simplification84.1%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (log (hypot x.re x.im))))
(*
(exp (- (* t_0 y.re) (* y.im (atan2 x.im x.re))))
(sin (pow (cbrt (fma y.im t_0 (* y.re (atan2 x.im x.re)))) 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));
return exp(((t_0 * y_46_re) - (y_46_im * atan2(x_46_im, x_46_re)))) * sin(pow(cbrt(fma(y_46_im, t_0, (y_46_re * atan2(x_46_im, x_46_re)))), 3.0));
}
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = log(hypot(x_46_re, x_46_im)) return Float64(exp(Float64(Float64(t_0 * y_46_re) - Float64(y_46_im * atan(x_46_im, x_46_re)))) * sin((cbrt(fma(y_46_im, t_0, Float64(y_46_re * atan(x_46_im, x_46_re)))) ^ 3.0))) 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]}, N[(N[Exp[N[(N[(t$95$0 * y$46$re), $MachinePrecision] - 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 + N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]), $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)\\
e^{t_0 \cdot y.re - y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}} \cdot \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)
\end{array}
\end{array}
Initial program 36.8%
Simplified74.4%
add-cube-cbrt75.6%
pow377.9%
fma-udef77.9%
*-commutative77.9%
*-commutative77.9%
fma-def77.9%
Applied egg-rr77.9%
Final simplification77.9%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (log (hypot x.re x.im)))
(t_1 (exp (- (* t_0 y.re) (* y.im (atan2 x.im x.re))))))
(if (<= x.re -5.2e+182)
(*
t_1
(sin
(fabs (fma (atan2 x.im x.re) y.re (* y.im (log (hypot x.im x.re)))))))
(* t_1 (sin (fma t_0 y.im (* y.re (atan2 x.im x.re))))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = log(hypot(x_46_re, x_46_im));
double t_1 = exp(((t_0 * y_46_re) - (y_46_im * atan2(x_46_im, x_46_re))));
double tmp;
if (x_46_re <= -5.2e+182) {
tmp = t_1 * sin(fabs(fma(atan2(x_46_im, x_46_re), y_46_re, (y_46_im * log(hypot(x_46_im, x_46_re))))));
} else {
tmp = t_1 * sin(fma(t_0, y_46_im, (y_46_re * atan2(x_46_im, x_46_re))));
}
return tmp;
}
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = log(hypot(x_46_re, x_46_im)) t_1 = exp(Float64(Float64(t_0 * y_46_re) - Float64(y_46_im * atan(x_46_im, x_46_re)))) tmp = 0.0 if (x_46_re <= -5.2e+182) tmp = Float64(t_1 * sin(abs(fma(atan(x_46_im, x_46_re), y_46_re, Float64(y_46_im * log(hypot(x_46_im, x_46_re))))))); else tmp = Float64(t_1 * sin(fma(t_0, y_46_im, Float64(y_46_re * atan(x_46_im, x_46_re))))); end return tmp end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[Log[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision]], $MachinePrecision]}, Block[{t$95$1 = N[Exp[N[(N[(t$95$0 * y$46$re), $MachinePrecision] - N[(y$46$im * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[x$46$re, -5.2e+182], N[(t$95$1 * N[Sin[N[Abs[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]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(t$95$1 * N[Sin[N[(t$95$0 * y$46$im + N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \log \left(\mathsf{hypot}\left(x.re, x.im\right)\right)\\
t_1 := e^{t_0 \cdot y.re - y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}}\\
\mathbf{if}\;x.re \leq -5.2 \cdot 10^{+182}:\\
\;\;\;\;t_1 \cdot \sin \left(\left|\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|\right)\\
\mathbf{else}:\\
\;\;\;\;t_1 \cdot \sin \left(\mathsf{fma}\left(t_0, y.im, y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)\\
\end{array}
\end{array}
if x.re < -5.2e182Initial program 0.0%
Simplified56.5%
add-sqr-sqrt39.1%
sqrt-unprod35.3%
pow235.3%
fma-udef35.3%
*-commutative35.3%
*-commutative35.3%
fma-def35.3%
Applied egg-rr35.3%
unpow235.3%
rem-sqrt-square74.2%
fma-def74.2%
+-commutative74.2%
fma-def74.2%
hypot-def0.0%
unpow20.0%
unpow20.0%
+-commutative0.0%
unpow20.0%
unpow20.0%
hypot-def74.2%
Simplified74.2%
if -5.2e182 < x.re Initial program 40.4%
Simplified76.1%
Final simplification76.0%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (log (hypot x.re x.im))))
(*
(exp (- (* t_0 y.re) (* y.im (atan2 x.im x.re))))
(sin (fma t_0 y.im (* y.re (atan2 x.im x.re)))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = log(hypot(x_46_re, x_46_im));
return exp(((t_0 * y_46_re) - (y_46_im * atan2(x_46_im, x_46_re)))) * sin(fma(t_0, y_46_im, (y_46_re * atan2(x_46_im, x_46_re))));
}
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = log(hypot(x_46_re, x_46_im)) return Float64(exp(Float64(Float64(t_0 * y_46_re) - Float64(y_46_im * atan(x_46_im, x_46_re)))) * sin(fma(t_0, y_46_im, Float64(y_46_re * atan(x_46_im, x_46_re))))) end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[Log[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision]], $MachinePrecision]}, N[(N[Exp[N[(N[(t$95$0 * y$46$re), $MachinePrecision] - N[(y$46$im * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Sin[N[(t$95$0 * y$46$im + N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \log \left(\mathsf{hypot}\left(x.re, x.im\right)\right)\\
e^{t_0 \cdot y.re - y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}} \cdot \sin \left(\mathsf{fma}\left(t_0, y.im, y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)
\end{array}
\end{array}
Initial program 36.8%
Simplified74.4%
Final simplification74.4%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (log (/ -1.0 x.im)))
(t_1 (* y.im (atan2 x.im x.re)))
(t_2 (* y.re (atan2 x.im x.re)))
(t_3 (log (hypot x.re x.im)))
(t_4 (exp (- (* t_3 y.re) t_1))))
(if (<= x.im -7.7e-32)
(/ (sin (- t_2 (* y.im t_0))) (exp (+ t_1 (* y.re t_0))))
(if (<= x.im 2.15e-302)
(* t_4 (sin (* y.im (log (hypot x.im x.re)))))
(if (<= x.im 6e-83)
(* (sin (fma t_3 y.im t_2)) (exp (- (* y.re (log x.im)) t_1)))
(if (<= x.im 1.7e-9)
(*
(exp (- (* y.re (log (sqrt (+ (* x.re x.re) (* x.im x.im))))) t_1))
(sin t_2))
(* t_4 (sin (+ t_2 (* y.im (log x.im)))))))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = log((-1.0 / x_46_im));
double t_1 = 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 = log(hypot(x_46_re, x_46_im));
double t_4 = exp(((t_3 * y_46_re) - t_1));
double tmp;
if (x_46_im <= -7.7e-32) {
tmp = sin((t_2 - (y_46_im * t_0))) / exp((t_1 + (y_46_re * t_0)));
} else if (x_46_im <= 2.15e-302) {
tmp = t_4 * sin((y_46_im * log(hypot(x_46_im, x_46_re))));
} else if (x_46_im <= 6e-83) {
tmp = sin(fma(t_3, y_46_im, t_2)) * exp(((y_46_re * log(x_46_im)) - t_1));
} else if (x_46_im <= 1.7e-9) {
tmp = exp(((y_46_re * log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))) - t_1)) * sin(t_2);
} else {
tmp = t_4 * sin((t_2 + (y_46_im * log(x_46_im))));
}
return tmp;
}
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = log(Float64(-1.0 / x_46_im)) t_1 = 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 = log(hypot(x_46_re, x_46_im)) t_4 = exp(Float64(Float64(t_3 * y_46_re) - t_1)) tmp = 0.0 if (x_46_im <= -7.7e-32) tmp = Float64(sin(Float64(t_2 - Float64(y_46_im * t_0))) / exp(Float64(t_1 + Float64(y_46_re * t_0)))); elseif (x_46_im <= 2.15e-302) tmp = Float64(t_4 * sin(Float64(y_46_im * log(hypot(x_46_im, x_46_re))))); elseif (x_46_im <= 6e-83) tmp = Float64(sin(fma(t_3, y_46_im, t_2)) * exp(Float64(Float64(y_46_re * log(x_46_im)) - t_1))); elseif (x_46_im <= 1.7e-9) tmp = Float64(exp(Float64(Float64(y_46_re * log(sqrt(Float64(Float64(x_46_re * x_46_re) + Float64(x_46_im * x_46_im))))) - t_1)) * sin(t_2)); else tmp = Float64(t_4 * sin(Float64(t_2 + Float64(y_46_im * log(x_46_im))))); end return tmp end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[Log[N[(-1.0 / x$46$im), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$1 = N[(y$46$im * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[Log[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision]], $MachinePrecision]}, Block[{t$95$4 = N[Exp[N[(N[(t$95$3 * y$46$re), $MachinePrecision] - t$95$1), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[x$46$im, -7.7e-32], N[(N[Sin[N[(t$95$2 - N[(y$46$im * t$95$0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / N[Exp[N[(t$95$1 + N[(y$46$re * t$95$0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[x$46$im, 2.15e-302], N[(t$95$4 * 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[x$46$im, 6e-83], N[(N[Sin[N[(t$95$3 * y$46$im + t$95$2), $MachinePrecision]], $MachinePrecision] * N[Exp[N[(N[(y$46$re * N[Log[x$46$im], $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[x$46$im, 1.7e-9], N[(N[Exp[N[(N[(y$46$re * N[Log[N[Sqrt[N[(N[(x$46$re * x$46$re), $MachinePrecision] + N[(x$46$im * x$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision]], $MachinePrecision] * N[Sin[t$95$2], $MachinePrecision]), $MachinePrecision], N[(t$95$4 * N[Sin[N[(t$95$2 + N[(y$46$im * N[Log[x$46$im], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \log \left(\frac{-1}{x.im}\right)\\
t_1 := y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
t_2 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
t_3 := \log \left(\mathsf{hypot}\left(x.re, x.im\right)\right)\\
t_4 := e^{t_3 \cdot y.re - t_1}\\
\mathbf{if}\;x.im \leq -7.7 \cdot 10^{-32}:\\
\;\;\;\;\frac{\sin \left(t_2 - y.im \cdot t_0\right)}{e^{t_1 + y.re \cdot t_0}}\\
\mathbf{elif}\;x.im \leq 2.15 \cdot 10^{-302}:\\
\;\;\;\;t_4 \cdot \sin \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right)\\
\mathbf{elif}\;x.im \leq 6 \cdot 10^{-83}:\\
\;\;\;\;\sin \left(\mathsf{fma}\left(t_3, y.im, t_2\right)\right) \cdot e^{y.re \cdot \log x.im - t_1}\\
\mathbf{elif}\;x.im \leq 1.7 \cdot 10^{-9}:\\
\;\;\;\;e^{y.re \cdot \log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) - t_1} \cdot \sin t_2\\
\mathbf{else}:\\
\;\;\;\;t_4 \cdot \sin \left(t_2 + y.im \cdot \log x.im\right)\\
\end{array}
\end{array}
if x.im < -7.6999999999999997e-32Initial program 31.9%
exp-diff27.5%
+-rgt-identity27.5%
+-rgt-identity27.5%
exp-to-pow27.5%
hypot-def27.5%
*-commutative27.5%
exp-prod26.1%
fma-def26.1%
hypot-def57.9%
*-commutative57.9%
Simplified57.9%
Taylor expanded in x.im around -inf 60.2%
associate-/l*60.2%
+-commutative60.2%
mul-1-neg60.2%
unsub-neg60.2%
*-commutative60.2%
*-commutative60.2%
*-commutative60.2%
div-exp68.9%
*-commutative68.9%
mul-1-neg68.9%
*-commutative68.9%
Simplified68.9%
if -7.6999999999999997e-32 < x.im < 2.1500000000000001e-302Initial program 38.7%
Simplified65.0%
Taylor expanded in y.im around inf 40.7%
unpow240.7%
unpow240.7%
hypot-def67.2%
Simplified67.2%
if 2.1500000000000001e-302 < x.im < 6.00000000000000021e-83Initial program 43.4%
Simplified76.3%
Taylor expanded in x.re around 0 74.8%
if 6.00000000000000021e-83 < x.im < 1.6999999999999999e-9Initial program 57.0%
Taylor expanded in y.im around 0 86.2%
if 1.6999999999999999e-9 < x.im Initial program 32.3%
Simplified80.3%
Taylor expanded in x.re around 0 80.6%
Final simplification74.1%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (log (/ -1.0 x.im)))
(t_1 (* y.im (atan2 x.im x.re)))
(t_2 (* y.re (atan2 x.im x.re)))
(t_3 (exp (- (* (log (hypot x.re x.im)) y.re) t_1))))
(if (<= x.im -5e-32)
(/ (sin (- t_2 (* y.im t_0))) (exp (+ t_1 (* y.re t_0))))
(if (<= x.im 3.1e-140)
(* t_3 (sin (* y.im (log (hypot x.im x.re)))))
(* t_3 (sin (+ t_2 (* y.im (log x.im)))))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = log((-1.0 / x_46_im));
double t_1 = 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 = exp(((log(hypot(x_46_re, x_46_im)) * y_46_re) - t_1));
double tmp;
if (x_46_im <= -5e-32) {
tmp = sin((t_2 - (y_46_im * t_0))) / exp((t_1 + (y_46_re * t_0)));
} else if (x_46_im <= 3.1e-140) {
tmp = t_3 * sin((y_46_im * log(hypot(x_46_im, x_46_re))));
} else {
tmp = t_3 * sin((t_2 + (y_46_im * log(x_46_im))));
}
return tmp;
}
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = Math.log((-1.0 / x_46_im));
double t_1 = y_46_im * Math.atan2(x_46_im, x_46_re);
double t_2 = y_46_re * Math.atan2(x_46_im, x_46_re);
double t_3 = Math.exp(((Math.log(Math.hypot(x_46_re, x_46_im)) * y_46_re) - t_1));
double tmp;
if (x_46_im <= -5e-32) {
tmp = Math.sin((t_2 - (y_46_im * t_0))) / Math.exp((t_1 + (y_46_re * t_0)));
} else if (x_46_im <= 3.1e-140) {
tmp = t_3 * Math.sin((y_46_im * Math.log(Math.hypot(x_46_im, x_46_re))));
} else {
tmp = t_3 * Math.sin((t_2 + (y_46_im * Math.log(x_46_im))));
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): t_0 = math.log((-1.0 / x_46_im)) t_1 = y_46_im * math.atan2(x_46_im, x_46_re) t_2 = y_46_re * math.atan2(x_46_im, x_46_re) t_3 = math.exp(((math.log(math.hypot(x_46_re, x_46_im)) * y_46_re) - t_1)) tmp = 0 if x_46_im <= -5e-32: tmp = math.sin((t_2 - (y_46_im * t_0))) / math.exp((t_1 + (y_46_re * t_0))) elif x_46_im <= 3.1e-140: tmp = t_3 * math.sin((y_46_im * math.log(math.hypot(x_46_im, x_46_re)))) else: tmp = t_3 * math.sin((t_2 + (y_46_im * math.log(x_46_im)))) return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = log(Float64(-1.0 / x_46_im)) t_1 = 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 = exp(Float64(Float64(log(hypot(x_46_re, x_46_im)) * y_46_re) - t_1)) tmp = 0.0 if (x_46_im <= -5e-32) tmp = Float64(sin(Float64(t_2 - Float64(y_46_im * t_0))) / exp(Float64(t_1 + Float64(y_46_re * t_0)))); elseif (x_46_im <= 3.1e-140) tmp = Float64(t_3 * sin(Float64(y_46_im * log(hypot(x_46_im, x_46_re))))); else tmp = Float64(t_3 * sin(Float64(t_2 + Float64(y_46_im * log(x_46_im))))); end return tmp end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = log((-1.0 / x_46_im)); t_1 = y_46_im * atan2(x_46_im, x_46_re); t_2 = y_46_re * atan2(x_46_im, x_46_re); t_3 = exp(((log(hypot(x_46_re, x_46_im)) * y_46_re) - t_1)); tmp = 0.0; if (x_46_im <= -5e-32) tmp = sin((t_2 - (y_46_im * t_0))) / exp((t_1 + (y_46_re * t_0))); elseif (x_46_im <= 3.1e-140) tmp = t_3 * sin((y_46_im * log(hypot(x_46_im, x_46_re)))); else tmp = t_3 * sin((t_2 + (y_46_im * log(x_46_im)))); end tmp_2 = tmp; end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[Log[N[(-1.0 / x$46$im), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$1 = N[(y$46$im * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[Exp[N[(N[(N[Log[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision]], $MachinePrecision] * y$46$re), $MachinePrecision] - t$95$1), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[x$46$im, -5e-32], N[(N[Sin[N[(t$95$2 - N[(y$46$im * t$95$0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / N[Exp[N[(t$95$1 + N[(y$46$re * t$95$0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[x$46$im, 3.1e-140], N[(t$95$3 * N[Sin[N[(y$46$im * N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(t$95$3 * N[Sin[N[(t$95$2 + N[(y$46$im * N[Log[x$46$im], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \log \left(\frac{-1}{x.im}\right)\\
t_1 := y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
t_2 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
t_3 := e^{\log \left(\mathsf{hypot}\left(x.re, x.im\right)\right) \cdot y.re - t_1}\\
\mathbf{if}\;x.im \leq -5 \cdot 10^{-32}:\\
\;\;\;\;\frac{\sin \left(t_2 - y.im \cdot t_0\right)}{e^{t_1 + y.re \cdot t_0}}\\
\mathbf{elif}\;x.im \leq 3.1 \cdot 10^{-140}:\\
\;\;\;\;t_3 \cdot \sin \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t_3 \cdot \sin \left(t_2 + y.im \cdot \log x.im\right)\\
\end{array}
\end{array}
if x.im < -5e-32Initial program 31.9%
exp-diff27.5%
+-rgt-identity27.5%
+-rgt-identity27.5%
exp-to-pow27.5%
hypot-def27.5%
*-commutative27.5%
exp-prod26.1%
fma-def26.1%
hypot-def57.9%
*-commutative57.9%
Simplified57.9%
Taylor expanded in x.im around -inf 60.2%
associate-/l*60.2%
+-commutative60.2%
mul-1-neg60.2%
unsub-neg60.2%
*-commutative60.2%
*-commutative60.2%
*-commutative60.2%
div-exp68.9%
*-commutative68.9%
mul-1-neg68.9%
*-commutative68.9%
Simplified68.9%
if -5e-32 < x.im < 3.0999999999999999e-140Initial program 35.8%
Simplified69.1%
Taylor expanded in y.im around inf 37.3%
unpow237.3%
unpow237.3%
hypot-def69.5%
Simplified69.5%
if 3.0999999999999999e-140 < x.im Initial program 40.6%
Simplified81.3%
Taylor expanded in x.re around 0 76.7%
Final simplification72.4%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (* y.im (atan2 x.im x.re)))
(t_1 (sin (* y.im (log (hypot x.im x.re)))))
(t_2 (* (exp (- (* (log (hypot x.re x.im)) y.re) t_0)) t_1))
(t_3 (sin (* y.re (atan2 x.im x.re)))))
(if (<= y.im -7e-190)
t_2
(if (<= y.im 1.15e-129)
(* t_3 (pow (hypot x.im x.re) y.re))
(if (<= y.im 1.6e+73)
t_2
(if (<= y.im 1e+217)
(*
(exp (- (* y.re (log (sqrt (+ (* x.re x.re) (* x.im x.im))))) t_0))
t_3)
(/ (fabs t_1) (exp t_0))))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = y_46_im * atan2(x_46_im, x_46_re);
double t_1 = sin((y_46_im * log(hypot(x_46_im, x_46_re))));
double t_2 = exp(((log(hypot(x_46_re, x_46_im)) * y_46_re) - t_0)) * t_1;
double t_3 = sin((y_46_re * atan2(x_46_im, x_46_re)));
double tmp;
if (y_46_im <= -7e-190) {
tmp = t_2;
} else if (y_46_im <= 1.15e-129) {
tmp = t_3 * pow(hypot(x_46_im, x_46_re), y_46_re);
} else if (y_46_im <= 1.6e+73) {
tmp = t_2;
} else if (y_46_im <= 1e+217) {
tmp = exp(((y_46_re * log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))) - t_0)) * t_3;
} else {
tmp = fabs(t_1) / exp(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_im * Math.atan2(x_46_im, x_46_re);
double t_1 = Math.sin((y_46_im * Math.log(Math.hypot(x_46_im, x_46_re))));
double t_2 = Math.exp(((Math.log(Math.hypot(x_46_re, x_46_im)) * y_46_re) - t_0)) * t_1;
double t_3 = Math.sin((y_46_re * Math.atan2(x_46_im, x_46_re)));
double tmp;
if (y_46_im <= -7e-190) {
tmp = t_2;
} else if (y_46_im <= 1.15e-129) {
tmp = t_3 * Math.pow(Math.hypot(x_46_im, x_46_re), y_46_re);
} else if (y_46_im <= 1.6e+73) {
tmp = t_2;
} else if (y_46_im <= 1e+217) {
tmp = Math.exp(((y_46_re * Math.log(Math.sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))) - t_0)) * t_3;
} else {
tmp = Math.abs(t_1) / Math.exp(t_0);
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): t_0 = y_46_im * math.atan2(x_46_im, x_46_re) t_1 = math.sin((y_46_im * math.log(math.hypot(x_46_im, x_46_re)))) t_2 = math.exp(((math.log(math.hypot(x_46_re, x_46_im)) * y_46_re) - t_0)) * t_1 t_3 = math.sin((y_46_re * math.atan2(x_46_im, x_46_re))) tmp = 0 if y_46_im <= -7e-190: tmp = t_2 elif y_46_im <= 1.15e-129: tmp = t_3 * math.pow(math.hypot(x_46_im, x_46_re), y_46_re) elif y_46_im <= 1.6e+73: tmp = t_2 elif y_46_im <= 1e+217: tmp = math.exp(((y_46_re * math.log(math.sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))) - t_0)) * t_3 else: tmp = math.fabs(t_1) / math.exp(t_0) return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = Float64(y_46_im * atan(x_46_im, x_46_re)) t_1 = sin(Float64(y_46_im * log(hypot(x_46_im, x_46_re)))) t_2 = Float64(exp(Float64(Float64(log(hypot(x_46_re, x_46_im)) * y_46_re) - t_0)) * t_1) t_3 = sin(Float64(y_46_re * atan(x_46_im, x_46_re))) tmp = 0.0 if (y_46_im <= -7e-190) tmp = t_2; elseif (y_46_im <= 1.15e-129) tmp = Float64(t_3 * (hypot(x_46_im, x_46_re) ^ y_46_re)); elseif (y_46_im <= 1.6e+73) tmp = t_2; elseif (y_46_im <= 1e+217) tmp = Float64(exp(Float64(Float64(y_46_re * log(sqrt(Float64(Float64(x_46_re * x_46_re) + Float64(x_46_im * x_46_im))))) - t_0)) * t_3); else tmp = Float64(abs(t_1) / exp(t_0)); end return tmp end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = y_46_im * atan2(x_46_im, x_46_re); t_1 = sin((y_46_im * log(hypot(x_46_im, x_46_re)))); t_2 = exp(((log(hypot(x_46_re, x_46_im)) * y_46_re) - t_0)) * t_1; t_3 = sin((y_46_re * atan2(x_46_im, x_46_re))); tmp = 0.0; if (y_46_im <= -7e-190) tmp = t_2; elseif (y_46_im <= 1.15e-129) tmp = t_3 * (hypot(x_46_im, x_46_re) ^ y_46_re); elseif (y_46_im <= 1.6e+73) tmp = t_2; elseif (y_46_im <= 1e+217) tmp = exp(((y_46_re * log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))) - t_0)) * t_3; else tmp = abs(t_1) / exp(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$im * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, Block[{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]}, Block[{t$95$2 = N[(N[Exp[N[(N[(N[Log[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision]], $MachinePrecision] * y$46$re), $MachinePrecision] - t$95$0), $MachinePrecision]], $MachinePrecision] * t$95$1), $MachinePrecision]}, Block[{t$95$3 = N[Sin[N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[y$46$im, -7e-190], t$95$2, If[LessEqual[y$46$im, 1.15e-129], N[(t$95$3 * N[Power[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision], y$46$re], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$im, 1.6e+73], t$95$2, If[LessEqual[y$46$im, 1e+217], N[(N[Exp[N[(N[(y$46$re * N[Log[N[Sqrt[N[(N[(x$46$re * x$46$re), $MachinePrecision] + N[(x$46$im * x$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]], $MachinePrecision] * t$95$3), $MachinePrecision], N[(N[Abs[t$95$1], $MachinePrecision] / N[Exp[t$95$0], $MachinePrecision]), $MachinePrecision]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
t_1 := \sin \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right)\\
t_2 := e^{\log \left(\mathsf{hypot}\left(x.re, x.im\right)\right) \cdot y.re - t_0} \cdot t_1\\
t_3 := \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\\
\mathbf{if}\;y.im \leq -7 \cdot 10^{-190}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;y.im \leq 1.15 \cdot 10^{-129}:\\
\;\;\;\;t_3 \cdot {\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re}\\
\mathbf{elif}\;y.im \leq 1.6 \cdot 10^{+73}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;y.im \leq 10^{+217}:\\
\;\;\;\;e^{y.re \cdot \log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) - t_0} \cdot t_3\\
\mathbf{else}:\\
\;\;\;\;\frac{\left|t_1\right|}{e^{t_0}}\\
\end{array}
\end{array}
if y.im < -6.9999999999999999e-190 or 1.15e-129 < y.im < 1.59999999999999991e73Initial program 33.3%
Simplified69.8%
Taylor expanded in y.im around inf 31.1%
unpow231.1%
unpow231.1%
hypot-def69.2%
Simplified69.2%
if -6.9999999999999999e-190 < y.im < 1.15e-129Initial program 42.4%
exp-diff42.4%
+-rgt-identity42.4%
+-rgt-identity42.4%
exp-to-pow42.5%
hypot-def42.5%
*-commutative42.5%
exp-prod42.5%
fma-def42.6%
hypot-def90.5%
*-commutative90.5%
Simplified90.5%
Taylor expanded in y.im around 0 64.3%
*-commutative64.3%
unpow264.3%
unpow264.3%
hypot-def74.4%
Simplified74.4%
if 1.59999999999999991e73 < y.im < 9.9999999999999996e216Initial program 34.3%
Taylor expanded in y.im around 0 71.8%
if 9.9999999999999996e216 < y.im Initial program 42.1%
exp-diff31.6%
+-rgt-identity31.6%
+-rgt-identity31.6%
exp-to-pow31.6%
hypot-def31.6%
*-commutative31.6%
exp-prod31.6%
fma-def31.6%
hypot-def58.0%
*-commutative58.0%
Simplified58.0%
Taylor expanded in y.re around 0 36.9%
add-sqr-sqrt26.3%
sqrt-unprod42.2%
pow242.2%
add-log-exp0.0%
*-commutative0.0%
exp-prod0.0%
add-exp-log0.0%
+-commutative0.0%
unpow20.0%
unpow20.0%
hypot-udef0.0%
Applied egg-rr0.0%
unpow20.0%
rem-sqrt-square0.0%
log-pow80.0%
hypot-def42.2%
unpow242.2%
unpow242.2%
+-commutative42.2%
unpow242.2%
unpow242.2%
hypot-def80.0%
Simplified80.0%
Final simplification71.9%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (* y.im (atan2 x.im x.re)))
(t_1 (exp t_0))
(t_2 (* y.re (atan2 x.im x.re))))
(if (<= x.re -2.1e+173)
(/ (sin (fabs (* y.im (log (/ -1.0 x.re))))) t_1)
(if (<= x.re 1.7e-12)
(*
(exp (- (* y.re (log (sqrt (+ (* x.re x.re) (* x.im x.im))))) t_0))
(sin t_2))
(/ (* (pow x.re y.re) (sin (+ t_2 (* y.im (log x.re))))) t_1)))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = y_46_im * atan2(x_46_im, x_46_re);
double t_1 = exp(t_0);
double t_2 = y_46_re * atan2(x_46_im, x_46_re);
double tmp;
if (x_46_re <= -2.1e+173) {
tmp = sin(fabs((y_46_im * log((-1.0 / x_46_re))))) / t_1;
} else if (x_46_re <= 1.7e-12) {
tmp = exp(((y_46_re * log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))) - t_0)) * sin(t_2);
} else {
tmp = (pow(x_46_re, y_46_re) * sin((t_2 + (y_46_im * log(x_46_re))))) / t_1;
}
return tmp;
}
real(8) function code(x_46re, x_46im, y_46re, y_46im)
real(8), intent (in) :: x_46re
real(8), intent (in) :: x_46im
real(8), intent (in) :: y_46re
real(8), intent (in) :: y_46im
real(8) :: t_0
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_0 = y_46im * atan2(x_46im, x_46re)
t_1 = exp(t_0)
t_2 = y_46re * atan2(x_46im, x_46re)
if (x_46re <= (-2.1d+173)) then
tmp = sin(abs((y_46im * log(((-1.0d0) / x_46re))))) / t_1
else if (x_46re <= 1.7d-12) then
tmp = exp(((y_46re * log(sqrt(((x_46re * x_46re) + (x_46im * x_46im))))) - t_0)) * sin(t_2)
else
tmp = ((x_46re ** y_46re) * sin((t_2 + (y_46im * log(x_46re))))) / t_1
end if
code = tmp
end function
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = y_46_im * Math.atan2(x_46_im, x_46_re);
double t_1 = Math.exp(t_0);
double t_2 = y_46_re * Math.atan2(x_46_im, x_46_re);
double tmp;
if (x_46_re <= -2.1e+173) {
tmp = Math.sin(Math.abs((y_46_im * Math.log((-1.0 / x_46_re))))) / t_1;
} else if (x_46_re <= 1.7e-12) {
tmp = Math.exp(((y_46_re * Math.log(Math.sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))) - t_0)) * Math.sin(t_2);
} else {
tmp = (Math.pow(x_46_re, y_46_re) * Math.sin((t_2 + (y_46_im * Math.log(x_46_re))))) / t_1;
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): t_0 = y_46_im * math.atan2(x_46_im, x_46_re) t_1 = math.exp(t_0) t_2 = y_46_re * math.atan2(x_46_im, x_46_re) tmp = 0 if x_46_re <= -2.1e+173: tmp = math.sin(math.fabs((y_46_im * math.log((-1.0 / x_46_re))))) / t_1 elif x_46_re <= 1.7e-12: tmp = math.exp(((y_46_re * math.log(math.sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))) - t_0)) * math.sin(t_2) else: tmp = (math.pow(x_46_re, y_46_re) * math.sin((t_2 + (y_46_im * math.log(x_46_re))))) / t_1 return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = Float64(y_46_im * atan(x_46_im, x_46_re)) t_1 = exp(t_0) t_2 = Float64(y_46_re * atan(x_46_im, x_46_re)) tmp = 0.0 if (x_46_re <= -2.1e+173) tmp = Float64(sin(abs(Float64(y_46_im * log(Float64(-1.0 / x_46_re))))) / t_1); elseif (x_46_re <= 1.7e-12) tmp = Float64(exp(Float64(Float64(y_46_re * log(sqrt(Float64(Float64(x_46_re * x_46_re) + Float64(x_46_im * x_46_im))))) - t_0)) * sin(t_2)); else tmp = Float64(Float64((x_46_re ^ y_46_re) * sin(Float64(t_2 + Float64(y_46_im * log(x_46_re))))) / t_1); end return tmp end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = y_46_im * atan2(x_46_im, x_46_re); t_1 = exp(t_0); t_2 = y_46_re * atan2(x_46_im, x_46_re); tmp = 0.0; if (x_46_re <= -2.1e+173) tmp = sin(abs((y_46_im * log((-1.0 / x_46_re))))) / t_1; elseif (x_46_re <= 1.7e-12) tmp = exp(((y_46_re * log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))) - t_0)) * sin(t_2); else tmp = ((x_46_re ^ y_46_re) * sin((t_2 + (y_46_im * log(x_46_re))))) / t_1; end tmp_2 = tmp; end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[(y$46$im * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[Exp[t$95$0], $MachinePrecision]}, Block[{t$95$2 = N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x$46$re, -2.1e+173], N[(N[Sin[N[Abs[N[(y$46$im * N[Log[N[(-1.0 / x$46$re), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision] / t$95$1), $MachinePrecision], If[LessEqual[x$46$re, 1.7e-12], N[(N[Exp[N[(N[(y$46$re * N[Log[N[Sqrt[N[(N[(x$46$re * x$46$re), $MachinePrecision] + N[(x$46$im * x$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]], $MachinePrecision] * N[Sin[t$95$2], $MachinePrecision]), $MachinePrecision], N[(N[(N[Power[x$46$re, y$46$re], $MachinePrecision] * N[Sin[N[(t$95$2 + N[(y$46$im * N[Log[x$46$re], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / t$95$1), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
t_1 := e^{t_0}\\
t_2 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
\mathbf{if}\;x.re \leq -2.1 \cdot 10^{+173}:\\
\;\;\;\;\frac{\sin \left(\left|y.im \cdot \log \left(\frac{-1}{x.re}\right)\right|\right)}{t_1}\\
\mathbf{elif}\;x.re \leq 1.7 \cdot 10^{-12}:\\
\;\;\;\;e^{y.re \cdot \log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) - t_0} \cdot \sin t_2\\
\mathbf{else}:\\
\;\;\;\;\frac{{x.re}^{y.re} \cdot \sin \left(t_2 + y.im \cdot \log x.re\right)}{t_1}\\
\end{array}
\end{array}
if x.re < -2.1e173Initial program 0.0%
exp-diff0.0%
+-rgt-identity0.0%
+-rgt-identity0.0%
exp-to-pow0.0%
hypot-def0.0%
*-commutative0.0%
exp-prod0.0%
fma-def0.0%
hypot-def54.2%
*-commutative54.2%
Simplified54.2%
Taylor expanded in y.re around 0 0.0%
+-commutative0.0%
unpow20.0%
unpow20.0%
hypot-udef38.3%
pow138.3%
metadata-eval38.3%
pow-pow0.0%
*-commutative0.0%
add-sqr-sqrt0.0%
sqrt-unprod0.0%
pow20.0%
Applied egg-rr5.2%
unpow25.2%
rem-sqrt-square5.2%
log-pow50.9%
hypot-def0.0%
unpow20.0%
unpow20.0%
+-commutative0.0%
unpow20.0%
unpow20.0%
hypot-def50.9%
Simplified50.9%
Taylor expanded in x.re around -inf 50.9%
associate-*r*50.9%
neg-mul-150.9%
Simplified50.9%
if -2.1e173 < x.re < 1.7e-12Initial program 44.4%
Taylor expanded in y.im around 0 61.2%
if 1.7e-12 < x.re Initial program 26.7%
exp-diff22.7%
+-rgt-identity22.7%
+-rgt-identity22.7%
exp-to-pow22.7%
hypot-def22.7%
*-commutative22.7%
exp-prod20.5%
fma-def20.5%
hypot-def54.9%
*-commutative54.9%
Simplified54.9%
Taylor expanded in x.im around 0 55.6%
Final simplification59.1%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (* y.im (atan2 x.im x.re))) (t_1 (* y.re (atan2 x.im x.re))))
(if (<= x.re -4.5e+173)
(/ (sin (fabs (* y.im (log (/ -1.0 x.re))))) (exp t_0))
(if (<= x.re 2.3e-12)
(*
(exp (- (* y.re (log (sqrt (+ (* x.re x.re) (* x.im x.im))))) t_0))
(sin t_1))
(/
(sin (+ t_1 (* y.im (log x.re))))
(exp (- t_0 (* y.re (log x.re)))))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = y_46_im * atan2(x_46_im, x_46_re);
double t_1 = y_46_re * atan2(x_46_im, x_46_re);
double tmp;
if (x_46_re <= -4.5e+173) {
tmp = sin(fabs((y_46_im * log((-1.0 / x_46_re))))) / exp(t_0);
} else if (x_46_re <= 2.3e-12) {
tmp = exp(((y_46_re * log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))) - t_0)) * sin(t_1);
} else {
tmp = sin((t_1 + (y_46_im * log(x_46_re)))) / exp((t_0 - (y_46_re * log(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) :: t_0
real(8) :: t_1
real(8) :: tmp
t_0 = y_46im * atan2(x_46im, x_46re)
t_1 = y_46re * atan2(x_46im, x_46re)
if (x_46re <= (-4.5d+173)) then
tmp = sin(abs((y_46im * log(((-1.0d0) / x_46re))))) / exp(t_0)
else if (x_46re <= 2.3d-12) then
tmp = exp(((y_46re * log(sqrt(((x_46re * x_46re) + (x_46im * x_46im))))) - t_0)) * sin(t_1)
else
tmp = sin((t_1 + (y_46im * log(x_46re)))) / exp((t_0 - (y_46re * log(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 t_0 = 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 (x_46_re <= -4.5e+173) {
tmp = Math.sin(Math.abs((y_46_im * Math.log((-1.0 / x_46_re))))) / Math.exp(t_0);
} else if (x_46_re <= 2.3e-12) {
tmp = Math.exp(((y_46_re * Math.log(Math.sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))) - t_0)) * Math.sin(t_1);
} else {
tmp = Math.sin((t_1 + (y_46_im * Math.log(x_46_re)))) / Math.exp((t_0 - (y_46_re * Math.log(x_46_re))));
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): t_0 = 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 x_46_re <= -4.5e+173: tmp = math.sin(math.fabs((y_46_im * math.log((-1.0 / x_46_re))))) / math.exp(t_0) elif x_46_re <= 2.3e-12: tmp = math.exp(((y_46_re * math.log(math.sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))) - t_0)) * math.sin(t_1) else: tmp = math.sin((t_1 + (y_46_im * math.log(x_46_re)))) / math.exp((t_0 - (y_46_re * math.log(x_46_re)))) return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = Float64(y_46_im * atan(x_46_im, x_46_re)) t_1 = Float64(y_46_re * atan(x_46_im, x_46_re)) tmp = 0.0 if (x_46_re <= -4.5e+173) tmp = Float64(sin(abs(Float64(y_46_im * log(Float64(-1.0 / x_46_re))))) / exp(t_0)); elseif (x_46_re <= 2.3e-12) tmp = Float64(exp(Float64(Float64(y_46_re * log(sqrt(Float64(Float64(x_46_re * x_46_re) + Float64(x_46_im * x_46_im))))) - t_0)) * sin(t_1)); else tmp = Float64(sin(Float64(t_1 + Float64(y_46_im * log(x_46_re)))) / exp(Float64(t_0 - Float64(y_46_re * log(x_46_re))))); end return tmp end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = y_46_im * atan2(x_46_im, x_46_re); t_1 = y_46_re * atan2(x_46_im, x_46_re); tmp = 0.0; if (x_46_re <= -4.5e+173) tmp = sin(abs((y_46_im * log((-1.0 / x_46_re))))) / exp(t_0); elseif (x_46_re <= 2.3e-12) tmp = exp(((y_46_re * log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))) - t_0)) * sin(t_1); else tmp = sin((t_1 + (y_46_im * log(x_46_re)))) / exp((t_0 - (y_46_re * log(x_46_re)))); end tmp_2 = tmp; end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[(y$46$im * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x$46$re, -4.5e+173], N[(N[Sin[N[Abs[N[(y$46$im * N[Log[N[(-1.0 / x$46$re), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision] / N[Exp[t$95$0], $MachinePrecision]), $MachinePrecision], If[LessEqual[x$46$re, 2.3e-12], N[(N[Exp[N[(N[(y$46$re * N[Log[N[Sqrt[N[(N[(x$46$re * x$46$re), $MachinePrecision] + N[(x$46$im * x$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]], $MachinePrecision] * N[Sin[t$95$1], $MachinePrecision]), $MachinePrecision], N[(N[Sin[N[(t$95$1 + N[(y$46$im * N[Log[x$46$re], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / N[Exp[N[(t$95$0 - N[(y$46$re * N[Log[x$46$re], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
t_1 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
\mathbf{if}\;x.re \leq -4.5 \cdot 10^{+173}:\\
\;\;\;\;\frac{\sin \left(\left|y.im \cdot \log \left(\frac{-1}{x.re}\right)\right|\right)}{e^{t_0}}\\
\mathbf{elif}\;x.re \leq 2.3 \cdot 10^{-12}:\\
\;\;\;\;e^{y.re \cdot \log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) - t_0} \cdot \sin t_1\\
\mathbf{else}:\\
\;\;\;\;\frac{\sin \left(t_1 + y.im \cdot \log x.re\right)}{e^{t_0 - y.re \cdot \log x.re}}\\
\end{array}
\end{array}
if x.re < -4.5000000000000002e173Initial program 0.0%
exp-diff0.0%
+-rgt-identity0.0%
+-rgt-identity0.0%
exp-to-pow0.0%
hypot-def0.0%
*-commutative0.0%
exp-prod0.0%
fma-def0.0%
hypot-def54.2%
*-commutative54.2%
Simplified54.2%
Taylor expanded in y.re around 0 0.0%
+-commutative0.0%
unpow20.0%
unpow20.0%
hypot-udef38.3%
pow138.3%
metadata-eval38.3%
pow-pow0.0%
*-commutative0.0%
add-sqr-sqrt0.0%
sqrt-unprod0.0%
pow20.0%
Applied egg-rr5.2%
unpow25.2%
rem-sqrt-square5.2%
log-pow50.9%
hypot-def0.0%
unpow20.0%
unpow20.0%
+-commutative0.0%
unpow20.0%
unpow20.0%
hypot-def50.9%
Simplified50.9%
Taylor expanded in x.re around -inf 50.9%
associate-*r*50.9%
neg-mul-150.9%
Simplified50.9%
if -4.5000000000000002e173 < x.re < 2.29999999999999989e-12Initial program 44.4%
Taylor expanded in y.im around 0 61.2%
if 2.29999999999999989e-12 < x.re Initial program 26.7%
exp-diff22.7%
+-rgt-identity22.7%
+-rgt-identity22.7%
exp-to-pow22.7%
hypot-def22.7%
*-commutative22.7%
exp-prod20.5%
fma-def20.5%
hypot-def54.9%
*-commutative54.9%
Simplified54.9%
Taylor expanded in x.re around inf 55.6%
associate-/l*55.6%
+-commutative55.6%
mul-1-neg55.6%
unsub-neg55.6%
*-commutative55.6%
log-rec55.6%
*-commutative55.6%
*-commutative55.6%
div-exp61.6%
*-commutative61.6%
Simplified61.6%
Final simplification60.3%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (* y.re (atan2 x.im x.re)))
(t_1 (exp (* y.im (atan2 x.im x.re)))))
(if (<= x.im -1.3e+187)
(/ (sin (* y.im (log (- x.im)))) t_1)
(if (<= x.im -8.5e-123)
(* (sin t_0) (pow (hypot x.im x.re) y.re))
(if (<= x.im 5.2e-213)
(/
(sin (* y.im (log (hypot x.im x.re))))
(pow (exp y.im) (atan2 x.im x.re)))
(/ (* (sin (+ t_0 (* y.im (log x.im)))) (pow x.im y.re)) t_1))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = y_46_re * atan2(x_46_im, x_46_re);
double t_1 = exp((y_46_im * atan2(x_46_im, x_46_re)));
double tmp;
if (x_46_im <= -1.3e+187) {
tmp = sin((y_46_im * log(-x_46_im))) / t_1;
} else if (x_46_im <= -8.5e-123) {
tmp = sin(t_0) * pow(hypot(x_46_im, x_46_re), y_46_re);
} else if (x_46_im <= 5.2e-213) {
tmp = sin((y_46_im * log(hypot(x_46_im, x_46_re)))) / pow(exp(y_46_im), atan2(x_46_im, x_46_re));
} else {
tmp = (sin((t_0 + (y_46_im * log(x_46_im)))) * pow(x_46_im, y_46_re)) / t_1;
}
return tmp;
}
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = y_46_re * Math.atan2(x_46_im, x_46_re);
double t_1 = Math.exp((y_46_im * Math.atan2(x_46_im, x_46_re)));
double tmp;
if (x_46_im <= -1.3e+187) {
tmp = Math.sin((y_46_im * Math.log(-x_46_im))) / t_1;
} else if (x_46_im <= -8.5e-123) {
tmp = Math.sin(t_0) * Math.pow(Math.hypot(x_46_im, x_46_re), y_46_re);
} else if (x_46_im <= 5.2e-213) {
tmp = Math.sin((y_46_im * Math.log(Math.hypot(x_46_im, x_46_re)))) / Math.pow(Math.exp(y_46_im), Math.atan2(x_46_im, x_46_re));
} else {
tmp = (Math.sin((t_0 + (y_46_im * Math.log(x_46_im)))) * Math.pow(x_46_im, y_46_re)) / t_1;
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): t_0 = y_46_re * math.atan2(x_46_im, x_46_re) t_1 = math.exp((y_46_im * math.atan2(x_46_im, x_46_re))) tmp = 0 if x_46_im <= -1.3e+187: tmp = math.sin((y_46_im * math.log(-x_46_im))) / t_1 elif x_46_im <= -8.5e-123: tmp = math.sin(t_0) * math.pow(math.hypot(x_46_im, x_46_re), y_46_re) elif x_46_im <= 5.2e-213: tmp = math.sin((y_46_im * math.log(math.hypot(x_46_im, x_46_re)))) / math.pow(math.exp(y_46_im), math.atan2(x_46_im, x_46_re)) else: tmp = (math.sin((t_0 + (y_46_im * math.log(x_46_im)))) * math.pow(x_46_im, y_46_re)) / t_1 return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = Float64(y_46_re * atan(x_46_im, x_46_re)) t_1 = exp(Float64(y_46_im * atan(x_46_im, x_46_re))) tmp = 0.0 if (x_46_im <= -1.3e+187) tmp = Float64(sin(Float64(y_46_im * log(Float64(-x_46_im)))) / t_1); elseif (x_46_im <= -8.5e-123) tmp = Float64(sin(t_0) * (hypot(x_46_im, x_46_re) ^ y_46_re)); elseif (x_46_im <= 5.2e-213) tmp = Float64(sin(Float64(y_46_im * log(hypot(x_46_im, x_46_re)))) / (exp(y_46_im) ^ atan(x_46_im, x_46_re))); else tmp = Float64(Float64(sin(Float64(t_0 + Float64(y_46_im * log(x_46_im)))) * (x_46_im ^ y_46_re)) / t_1); end return tmp end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = y_46_re * atan2(x_46_im, x_46_re); t_1 = exp((y_46_im * atan2(x_46_im, x_46_re))); tmp = 0.0; if (x_46_im <= -1.3e+187) tmp = sin((y_46_im * log(-x_46_im))) / t_1; elseif (x_46_im <= -8.5e-123) tmp = sin(t_0) * (hypot(x_46_im, x_46_re) ^ y_46_re); elseif (x_46_im <= 5.2e-213) 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 tmp = (sin((t_0 + (y_46_im * log(x_46_im)))) * (x_46_im ^ y_46_re)) / t_1; end tmp_2 = tmp; end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $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[x$46$im, -1.3e+187], N[(N[Sin[N[(y$46$im * N[Log[(-x$46$im)], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / t$95$1), $MachinePrecision], If[LessEqual[x$46$im, -8.5e-123], N[(N[Sin[t$95$0], $MachinePrecision] * N[Power[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision], y$46$re], $MachinePrecision]), $MachinePrecision], If[LessEqual[x$46$im, 5.2e-213], N[(N[Sin[N[(y$46$im * N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / N[Power[N[Exp[y$46$im], $MachinePrecision], N[ArcTan[x$46$im / x$46$re], $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(N[(N[Sin[N[(t$95$0 + N[(y$46$im * N[Log[x$46$im], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Power[x$46$im, y$46$re], $MachinePrecision]), $MachinePrecision] / t$95$1), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
t_1 := e^{y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}}\\
\mathbf{if}\;x.im \leq -1.3 \cdot 10^{+187}:\\
\;\;\;\;\frac{\sin \left(y.im \cdot \log \left(-x.im\right)\right)}{t_1}\\
\mathbf{elif}\;x.im \leq -8.5 \cdot 10^{-123}:\\
\;\;\;\;\sin t_0 \cdot {\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re}\\
\mathbf{elif}\;x.im \leq 5.2 \cdot 10^{-213}:\\
\;\;\;\;\frac{\sin \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right)}{{\left(e^{y.im}\right)}^{\tan^{-1}_* \frac{x.im}{x.re}}}\\
\mathbf{else}:\\
\;\;\;\;\frac{\sin \left(t_0 + y.im \cdot \log x.im\right) \cdot {x.im}^{y.re}}{t_1}\\
\end{array}
\end{array}
if x.im < -1.2999999999999999e187Initial program 0.0%
exp-diff0.0%
+-rgt-identity0.0%
+-rgt-identity0.0%
exp-to-pow0.0%
hypot-def0.0%
*-commutative0.0%
exp-prod0.0%
fma-def0.0%
hypot-def44.3%
*-commutative44.3%
Simplified44.3%
Taylor expanded in y.re around 0 0.0%
Taylor expanded in x.im around -inf 49.0%
mul-1-neg49.0%
Simplified49.0%
if -1.2999999999999999e187 < x.im < -8.4999999999999995e-123Initial program 54.9%
exp-diff49.0%
+-rgt-identity49.0%
+-rgt-identity49.0%
exp-to-pow49.0%
hypot-def49.0%
*-commutative49.0%
exp-prod47.0%
fma-def47.0%
hypot-def68.6%
*-commutative68.6%
Simplified68.6%
Taylor expanded in y.im around 0 57.1%
*-commutative57.1%
unpow257.1%
unpow257.1%
hypot-def59.2%
Simplified59.2%
if -8.4999999999999995e-123 < x.im < 5.2000000000000003e-213Initial program 32.7%
exp-diff31.0%
+-rgt-identity31.0%
+-rgt-identity31.0%
exp-to-pow31.0%
hypot-def31.0%
*-commutative31.0%
exp-prod30.8%
fma-def30.8%
hypot-def68.1%
*-commutative68.1%
Simplified68.1%
Taylor expanded in y.re around 0 28.1%
unpow228.1%
unpow228.1%
hypot-def54.6%
*-commutative54.6%
exp-prod54.1%
Simplified54.1%
if 5.2000000000000003e-213 < x.im Initial program 39.3%
exp-diff33.4%
+-rgt-identity33.4%
+-rgt-identity33.4%
exp-to-pow33.5%
hypot-def33.5%
*-commutative33.5%
exp-prod32.7%
fma-def32.7%
hypot-def65.6%
*-commutative65.6%
Simplified65.6%
Taylor expanded in x.re around 0 58.9%
Final simplification56.8%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (sin (* y.im (log (hypot x.im x.re)))))
(t_1 (/ t_0 (pow (exp y.im) (atan2 x.im x.re))))
(t_2 (* y.re (atan2 x.im x.re)))
(t_3 (pow (hypot x.im x.re) y.re))
(t_4 (* (sin t_2) t_3)))
(if (<= y.re -4e-74)
t_4
(if (<= y.re -6.2e-281)
t_1
(if (<= y.re 5.8e-250)
(/ (fabs t_0) (exp (* y.im (atan2 x.im x.re))))
(if (<= y.re 7.8e-82)
t_1
(if (<= y.re 5e+207)
t_4
(if (<= y.re 3e+287)
(* t_3 (sin (fabs t_2)))
(* t_3 (sin (exp (log 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_im * log(hypot(x_46_im, x_46_re))));
double t_1 = t_0 / pow(exp(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 = pow(hypot(x_46_im, x_46_re), y_46_re);
double t_4 = sin(t_2) * t_3;
double tmp;
if (y_46_re <= -4e-74) {
tmp = t_4;
} else if (y_46_re <= -6.2e-281) {
tmp = t_1;
} else if (y_46_re <= 5.8e-250) {
tmp = fabs(t_0) / exp((y_46_im * atan2(x_46_im, x_46_re)));
} else if (y_46_re <= 7.8e-82) {
tmp = t_1;
} else if (y_46_re <= 5e+207) {
tmp = t_4;
} else if (y_46_re <= 3e+287) {
tmp = t_3 * sin(fabs(t_2));
} else {
tmp = t_3 * sin(exp(log(t_2)));
}
return tmp;
}
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = Math.sin((y_46_im * Math.log(Math.hypot(x_46_im, x_46_re))));
double t_1 = t_0 / Math.pow(Math.exp(y_46_im), Math.atan2(x_46_im, x_46_re));
double t_2 = y_46_re * Math.atan2(x_46_im, x_46_re);
double t_3 = Math.pow(Math.hypot(x_46_im, x_46_re), y_46_re);
double t_4 = Math.sin(t_2) * t_3;
double tmp;
if (y_46_re <= -4e-74) {
tmp = t_4;
} else if (y_46_re <= -6.2e-281) {
tmp = t_1;
} else if (y_46_re <= 5.8e-250) {
tmp = Math.abs(t_0) / Math.exp((y_46_im * Math.atan2(x_46_im, x_46_re)));
} else if (y_46_re <= 7.8e-82) {
tmp = t_1;
} else if (y_46_re <= 5e+207) {
tmp = t_4;
} else if (y_46_re <= 3e+287) {
tmp = t_3 * Math.sin(Math.abs(t_2));
} else {
tmp = t_3 * Math.sin(Math.exp(Math.log(t_2)));
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): t_0 = math.sin((y_46_im * math.log(math.hypot(x_46_im, x_46_re)))) t_1 = t_0 / math.pow(math.exp(y_46_im), math.atan2(x_46_im, x_46_re)) t_2 = y_46_re * math.atan2(x_46_im, x_46_re) t_3 = math.pow(math.hypot(x_46_im, x_46_re), y_46_re) t_4 = math.sin(t_2) * t_3 tmp = 0 if y_46_re <= -4e-74: tmp = t_4 elif y_46_re <= -6.2e-281: tmp = t_1 elif y_46_re <= 5.8e-250: tmp = math.fabs(t_0) / math.exp((y_46_im * math.atan2(x_46_im, x_46_re))) elif y_46_re <= 7.8e-82: tmp = t_1 elif y_46_re <= 5e+207: tmp = t_4 elif y_46_re <= 3e+287: tmp = t_3 * math.sin(math.fabs(t_2)) else: tmp = t_3 * math.sin(math.exp(math.log(t_2))) return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = sin(Float64(y_46_im * log(hypot(x_46_im, x_46_re)))) t_1 = Float64(t_0 / (exp(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 = hypot(x_46_im, x_46_re) ^ y_46_re t_4 = Float64(sin(t_2) * t_3) tmp = 0.0 if (y_46_re <= -4e-74) tmp = t_4; elseif (y_46_re <= -6.2e-281) tmp = t_1; elseif (y_46_re <= 5.8e-250) tmp = Float64(abs(t_0) / exp(Float64(y_46_im * atan(x_46_im, x_46_re)))); elseif (y_46_re <= 7.8e-82) tmp = t_1; elseif (y_46_re <= 5e+207) tmp = t_4; elseif (y_46_re <= 3e+287) tmp = Float64(t_3 * sin(abs(t_2))); else tmp = Float64(t_3 * sin(exp(log(t_2)))); end return tmp end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = sin((y_46_im * log(hypot(x_46_im, x_46_re)))); t_1 = t_0 / (exp(y_46_im) ^ atan2(x_46_im, x_46_re)); t_2 = y_46_re * atan2(x_46_im, x_46_re); t_3 = hypot(x_46_im, x_46_re) ^ y_46_re; t_4 = sin(t_2) * t_3; tmp = 0.0; if (y_46_re <= -4e-74) tmp = t_4; elseif (y_46_re <= -6.2e-281) tmp = t_1; elseif (y_46_re <= 5.8e-250) tmp = abs(t_0) / exp((y_46_im * atan2(x_46_im, x_46_re))); elseif (y_46_re <= 7.8e-82) tmp = t_1; elseif (y_46_re <= 5e+207) tmp = t_4; elseif (y_46_re <= 3e+287) tmp = t_3 * sin(abs(t_2)); else tmp = t_3 * sin(exp(log(t_2))); end tmp_2 = tmp; end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[Sin[N[(y$46$im * N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$1 = N[(t$95$0 / N[Power[N[Exp[y$46$im], $MachinePrecision], N[ArcTan[x$46$im / x$46$re], $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[Power[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision], y$46$re], $MachinePrecision]}, Block[{t$95$4 = N[(N[Sin[t$95$2], $MachinePrecision] * t$95$3), $MachinePrecision]}, If[LessEqual[y$46$re, -4e-74], t$95$4, If[LessEqual[y$46$re, -6.2e-281], t$95$1, If[LessEqual[y$46$re, 5.8e-250], N[(N[Abs[t$95$0], $MachinePrecision] / N[Exp[N[(y$46$im * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$re, 7.8e-82], t$95$1, If[LessEqual[y$46$re, 5e+207], t$95$4, If[LessEqual[y$46$re, 3e+287], N[(t$95$3 * N[Sin[N[Abs[t$95$2], $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(t$95$3 * N[Sin[N[Exp[N[Log[t$95$2], $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \sin \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right)\\
t_1 := \frac{t_0}{{\left(e^{y.im}\right)}^{\tan^{-1}_* \frac{x.im}{x.re}}}\\
t_2 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
t_3 := {\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re}\\
t_4 := \sin t_2 \cdot t_3\\
\mathbf{if}\;y.re \leq -4 \cdot 10^{-74}:\\
\;\;\;\;t_4\\
\mathbf{elif}\;y.re \leq -6.2 \cdot 10^{-281}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y.re \leq 5.8 \cdot 10^{-250}:\\
\;\;\;\;\frac{\left|t_0\right|}{e^{y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}}}\\
\mathbf{elif}\;y.re \leq 7.8 \cdot 10^{-82}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y.re \leq 5 \cdot 10^{+207}:\\
\;\;\;\;t_4\\
\mathbf{elif}\;y.re \leq 3 \cdot 10^{+287}:\\
\;\;\;\;t_3 \cdot \sin \left(\left|t_2\right|\right)\\
\mathbf{else}:\\
\;\;\;\;t_3 \cdot \sin \left(e^{\log t_2}\right)\\
\end{array}
\end{array}
if y.re < -3.99999999999999983e-74 or 7.79999999999999947e-82 < y.re < 4.9999999999999999e207Initial program 32.6%
exp-diff25.6%
+-rgt-identity25.6%
+-rgt-identity25.6%
exp-to-pow25.7%
hypot-def25.7%
*-commutative25.7%
exp-prod24.9%
fma-def24.9%
hypot-def59.2%
*-commutative59.2%
Simplified59.2%
Taylor expanded in y.im around 0 60.8%
*-commutative60.8%
unpow260.8%
unpow260.8%
hypot-def63.0%
Simplified63.0%
if -3.99999999999999983e-74 < y.re < -6.2000000000000004e-281 or 5.8000000000000004e-250 < y.re < 7.79999999999999947e-82Initial program 47.1%
exp-diff47.1%
+-rgt-identity47.1%
+-rgt-identity47.1%
exp-to-pow47.1%
hypot-def47.1%
*-commutative47.1%
exp-prod47.0%
fma-def47.0%
hypot-def85.5%
*-commutative85.5%
Simplified85.5%
Taylor expanded in y.re around 0 33.6%
unpow233.6%
unpow233.6%
hypot-def63.2%
*-commutative63.2%
exp-prod63.0%
Simplified63.0%
if -6.2000000000000004e-281 < y.re < 5.8000000000000004e-250Initial program 27.6%
exp-diff27.6%
+-rgt-identity27.6%
+-rgt-identity27.6%
exp-to-pow27.6%
hypot-def27.6%
*-commutative27.6%
exp-prod27.6%
fma-def27.6%
hypot-def55.6%
*-commutative55.6%
Simplified55.6%
Taylor expanded in y.re around 0 26.1%
add-sqr-sqrt20.3%
sqrt-unprod28.8%
pow228.8%
add-log-exp6.7%
*-commutative6.7%
exp-prod6.7%
add-exp-log6.7%
+-commutative6.7%
unpow26.7%
unpow26.7%
hypot-udef7.3%
Applied egg-rr7.3%
unpow27.3%
rem-sqrt-square7.3%
log-pow82.7%
hypot-def42.7%
unpow242.7%
unpow242.7%
+-commutative42.7%
unpow242.7%
unpow242.7%
hypot-def82.7%
Simplified82.7%
if 4.9999999999999999e207 < y.re < 2.9999999999999999e287Initial program 30.0%
exp-diff20.0%
+-rgt-identity20.0%
+-rgt-identity20.0%
exp-to-pow20.0%
hypot-def20.0%
*-commutative20.0%
exp-prod15.0%
fma-def15.0%
hypot-def25.0%
*-commutative25.0%
Simplified25.0%
Taylor expanded in y.im around 0 40.0%
*-commutative40.0%
unpow240.0%
unpow240.0%
hypot-def40.0%
Simplified40.0%
*-commutative25.5%
add-sqr-sqrt5.2%
sqrt-unprod10.0%
pow210.0%
Applied egg-rr10.0%
unpow210.0%
rem-sqrt-square30.5%
Simplified65.0%
if 2.9999999999999999e287 < y.re Initial program 33.3%
exp-diff33.3%
+-rgt-identity33.3%
+-rgt-identity33.3%
exp-to-pow33.3%
hypot-def33.3%
*-commutative33.3%
exp-prod33.3%
fma-def33.3%
hypot-def50.0%
*-commutative50.0%
Simplified50.0%
Taylor expanded in y.im around 0 50.0%
*-commutative50.0%
unpow250.0%
unpow250.0%
hypot-def50.0%
Simplified50.0%
*-commutative50.0%
add-exp-log66.7%
Applied egg-rr66.7%
Final simplification64.6%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (* y.re (atan2 x.im x.re)))
(t_1 (pow (hypot x.im x.re) y.re))
(t_2 (* (sin t_0) t_1)))
(if (<= y.re -2.15e-197)
t_2
(if (<= y.re 4.6e-219)
(/ (sin (* y.im (log (- x.re)))) (exp (* y.im (atan2 x.im x.re))))
(if (<= y.re 5e+207)
t_2
(if (<= y.re 1.45e+291)
(* t_1 (sin (fabs t_0)))
(* t_1 (sin (exp (log t_0))))))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = y_46_re * atan2(x_46_im, x_46_re);
double t_1 = pow(hypot(x_46_im, x_46_re), y_46_re);
double t_2 = sin(t_0) * t_1;
double tmp;
if (y_46_re <= -2.15e-197) {
tmp = t_2;
} else if (y_46_re <= 4.6e-219) {
tmp = sin((y_46_im * log(-x_46_re))) / exp((y_46_im * atan2(x_46_im, x_46_re)));
} else if (y_46_re <= 5e+207) {
tmp = t_2;
} else if (y_46_re <= 1.45e+291) {
tmp = t_1 * sin(fabs(t_0));
} else {
tmp = t_1 * sin(exp(log(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 t_1 = Math.pow(Math.hypot(x_46_im, x_46_re), y_46_re);
double t_2 = Math.sin(t_0) * t_1;
double tmp;
if (y_46_re <= -2.15e-197) {
tmp = t_2;
} else if (y_46_re <= 4.6e-219) {
tmp = Math.sin((y_46_im * Math.log(-x_46_re))) / Math.exp((y_46_im * Math.atan2(x_46_im, x_46_re)));
} else if (y_46_re <= 5e+207) {
tmp = t_2;
} else if (y_46_re <= 1.45e+291) {
tmp = t_1 * Math.sin(Math.abs(t_0));
} else {
tmp = t_1 * Math.sin(Math.exp(Math.log(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) t_1 = math.pow(math.hypot(x_46_im, x_46_re), y_46_re) t_2 = math.sin(t_0) * t_1 tmp = 0 if y_46_re <= -2.15e-197: tmp = t_2 elif y_46_re <= 4.6e-219: tmp = math.sin((y_46_im * math.log(-x_46_re))) / math.exp((y_46_im * math.atan2(x_46_im, x_46_re))) elif y_46_re <= 5e+207: tmp = t_2 elif y_46_re <= 1.45e+291: tmp = t_1 * math.sin(math.fabs(t_0)) else: tmp = t_1 * math.sin(math.exp(math.log(t_0))) return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = Float64(y_46_re * atan(x_46_im, x_46_re)) t_1 = hypot(x_46_im, x_46_re) ^ y_46_re t_2 = Float64(sin(t_0) * t_1) tmp = 0.0 if (y_46_re <= -2.15e-197) tmp = t_2; elseif (y_46_re <= 4.6e-219) tmp = Float64(sin(Float64(y_46_im * log(Float64(-x_46_re)))) / exp(Float64(y_46_im * atan(x_46_im, x_46_re)))); elseif (y_46_re <= 5e+207) tmp = t_2; elseif (y_46_re <= 1.45e+291) tmp = Float64(t_1 * sin(abs(t_0))); else tmp = Float64(t_1 * sin(exp(log(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); t_1 = hypot(x_46_im, x_46_re) ^ y_46_re; t_2 = sin(t_0) * t_1; tmp = 0.0; if (y_46_re <= -2.15e-197) tmp = t_2; elseif (y_46_re <= 4.6e-219) tmp = sin((y_46_im * log(-x_46_re))) / exp((y_46_im * atan2(x_46_im, x_46_re))); elseif (y_46_re <= 5e+207) tmp = t_2; elseif (y_46_re <= 1.45e+291) tmp = t_1 * sin(abs(t_0)); else tmp = t_1 * sin(exp(log(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]}, Block[{t$95$1 = N[Power[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision], y$46$re], $MachinePrecision]}, Block[{t$95$2 = N[(N[Sin[t$95$0], $MachinePrecision] * t$95$1), $MachinePrecision]}, If[LessEqual[y$46$re, -2.15e-197], t$95$2, If[LessEqual[y$46$re, 4.6e-219], N[(N[Sin[N[(y$46$im * N[Log[(-x$46$re)], $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, 5e+207], t$95$2, If[LessEqual[y$46$re, 1.45e+291], N[(t$95$1 * N[Sin[N[Abs[t$95$0], $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(t$95$1 * N[Sin[N[Exp[N[Log[t$95$0], $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
t_1 := {\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re}\\
t_2 := \sin t_0 \cdot t_1\\
\mathbf{if}\;y.re \leq -2.15 \cdot 10^{-197}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;y.re \leq 4.6 \cdot 10^{-219}:\\
\;\;\;\;\frac{\sin \left(y.im \cdot \log \left(-x.re\right)\right)}{e^{y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}}}\\
\mathbf{elif}\;y.re \leq 5 \cdot 10^{+207}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;y.re \leq 1.45 \cdot 10^{+291}:\\
\;\;\;\;t_1 \cdot \sin \left(\left|t_0\right|\right)\\
\mathbf{else}:\\
\;\;\;\;t_1 \cdot \sin \left(e^{\log t_0}\right)\\
\end{array}
\end{array}
if y.re < -2.15e-197 or 4.59999999999999977e-219 < y.re < 4.9999999999999999e207Initial program 38.2%
exp-diff33.3%
+-rgt-identity33.3%
+-rgt-identity33.3%
exp-to-pow33.4%
hypot-def33.4%
*-commutative33.4%
exp-prod32.8%
fma-def32.9%
hypot-def67.9%
*-commutative67.9%
Simplified67.9%
Taylor expanded in y.im around 0 52.6%
*-commutative52.6%
unpow252.6%
unpow252.6%
hypot-def53.8%
Simplified53.8%
if -2.15e-197 < y.re < 4.59999999999999977e-219Initial program 34.4%
exp-diff34.4%
+-rgt-identity34.4%
+-rgt-identity34.4%
exp-to-pow34.4%
hypot-def34.4%
*-commutative34.4%
exp-prod34.0%
fma-def34.1%
hypot-def70.5%
*-commutative70.5%
Simplified70.5%
Taylor expanded in y.re around 0 31.8%
Taylor expanded in x.re around -inf 52.1%
mul-1-neg52.1%
Simplified52.1%
if 4.9999999999999999e207 < y.re < 1.4500000000000001e291Initial program 30.0%
exp-diff20.0%
+-rgt-identity20.0%
+-rgt-identity20.0%
exp-to-pow20.0%
hypot-def20.0%
*-commutative20.0%
exp-prod15.0%
fma-def15.0%
hypot-def25.0%
*-commutative25.0%
Simplified25.0%
Taylor expanded in y.im around 0 40.0%
*-commutative40.0%
unpow240.0%
unpow240.0%
hypot-def40.0%
Simplified40.0%
*-commutative25.5%
add-sqr-sqrt5.2%
sqrt-unprod10.0%
pow210.0%
Applied egg-rr10.0%
unpow210.0%
rem-sqrt-square30.5%
Simplified65.0%
if 1.4500000000000001e291 < y.re Initial program 33.3%
exp-diff33.3%
+-rgt-identity33.3%
+-rgt-identity33.3%
exp-to-pow33.3%
hypot-def33.3%
*-commutative33.3%
exp-prod33.3%
fma-def33.3%
hypot-def50.0%
*-commutative50.0%
Simplified50.0%
Taylor expanded in y.im around 0 50.0%
*-commutative50.0%
unpow250.0%
unpow250.0%
hypot-def50.0%
Simplified50.0%
*-commutative50.0%
add-exp-log66.7%
Applied egg-rr66.7%
Final simplification54.7%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (* y.re (atan2 x.im x.re)))
(t_1 (pow (hypot x.im x.re) y.re))
(t_2 (* (sin t_0) t_1)))
(if (<= y.re -3.7e-74)
t_2
(if (<= y.re 1.25e-57)
(/
(sin (* y.im (log (hypot x.im x.re))))
(pow (exp y.im) (atan2 x.im x.re)))
(if (<= y.re 4e+209)
t_2
(if (<= y.re 1.7e+291)
(* t_1 (sin (fabs t_0)))
(* t_1 (sin (exp (log t_0))))))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = y_46_re * atan2(x_46_im, x_46_re);
double t_1 = pow(hypot(x_46_im, x_46_re), y_46_re);
double t_2 = sin(t_0) * t_1;
double tmp;
if (y_46_re <= -3.7e-74) {
tmp = t_2;
} else if (y_46_re <= 1.25e-57) {
tmp = sin((y_46_im * log(hypot(x_46_im, x_46_re)))) / pow(exp(y_46_im), atan2(x_46_im, x_46_re));
} else if (y_46_re <= 4e+209) {
tmp = t_2;
} else if (y_46_re <= 1.7e+291) {
tmp = t_1 * sin(fabs(t_0));
} else {
tmp = t_1 * sin(exp(log(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 t_1 = Math.pow(Math.hypot(x_46_im, x_46_re), y_46_re);
double t_2 = Math.sin(t_0) * t_1;
double tmp;
if (y_46_re <= -3.7e-74) {
tmp = t_2;
} else if (y_46_re <= 1.25e-57) {
tmp = Math.sin((y_46_im * Math.log(Math.hypot(x_46_im, x_46_re)))) / Math.pow(Math.exp(y_46_im), Math.atan2(x_46_im, x_46_re));
} else if (y_46_re <= 4e+209) {
tmp = t_2;
} else if (y_46_re <= 1.7e+291) {
tmp = t_1 * Math.sin(Math.abs(t_0));
} else {
tmp = t_1 * Math.sin(Math.exp(Math.log(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) t_1 = math.pow(math.hypot(x_46_im, x_46_re), y_46_re) t_2 = math.sin(t_0) * t_1 tmp = 0 if y_46_re <= -3.7e-74: tmp = t_2 elif y_46_re <= 1.25e-57: tmp = math.sin((y_46_im * math.log(math.hypot(x_46_im, x_46_re)))) / math.pow(math.exp(y_46_im), math.atan2(x_46_im, x_46_re)) elif y_46_re <= 4e+209: tmp = t_2 elif y_46_re <= 1.7e+291: tmp = t_1 * math.sin(math.fabs(t_0)) else: tmp = t_1 * math.sin(math.exp(math.log(t_0))) return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = Float64(y_46_re * atan(x_46_im, x_46_re)) t_1 = hypot(x_46_im, x_46_re) ^ y_46_re t_2 = Float64(sin(t_0) * t_1) tmp = 0.0 if (y_46_re <= -3.7e-74) tmp = t_2; elseif (y_46_re <= 1.25e-57) tmp = Float64(sin(Float64(y_46_im * log(hypot(x_46_im, x_46_re)))) / (exp(y_46_im) ^ atan(x_46_im, x_46_re))); elseif (y_46_re <= 4e+209) tmp = t_2; elseif (y_46_re <= 1.7e+291) tmp = Float64(t_1 * sin(abs(t_0))); else tmp = Float64(t_1 * sin(exp(log(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); t_1 = hypot(x_46_im, x_46_re) ^ y_46_re; t_2 = sin(t_0) * t_1; tmp = 0.0; if (y_46_re <= -3.7e-74) tmp = t_2; elseif (y_46_re <= 1.25e-57) 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 <= 4e+209) tmp = t_2; elseif (y_46_re <= 1.7e+291) tmp = t_1 * sin(abs(t_0)); else tmp = t_1 * sin(exp(log(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]}, Block[{t$95$1 = N[Power[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision], y$46$re], $MachinePrecision]}, Block[{t$95$2 = N[(N[Sin[t$95$0], $MachinePrecision] * t$95$1), $MachinePrecision]}, If[LessEqual[y$46$re, -3.7e-74], t$95$2, If[LessEqual[y$46$re, 1.25e-57], N[(N[Sin[N[(y$46$im * N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / N[Power[N[Exp[y$46$im], $MachinePrecision], N[ArcTan[x$46$im / x$46$re], $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$re, 4e+209], t$95$2, If[LessEqual[y$46$re, 1.7e+291], N[(t$95$1 * N[Sin[N[Abs[t$95$0], $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(t$95$1 * N[Sin[N[Exp[N[Log[t$95$0], $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
t_1 := {\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re}\\
t_2 := \sin t_0 \cdot t_1\\
\mathbf{if}\;y.re \leq -3.7 \cdot 10^{-74}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;y.re \leq 1.25 \cdot 10^{-57}:\\
\;\;\;\;\frac{\sin \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right)}{{\left(e^{y.im}\right)}^{\tan^{-1}_* \frac{x.im}{x.re}}}\\
\mathbf{elif}\;y.re \leq 4 \cdot 10^{+209}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;y.re \leq 1.7 \cdot 10^{+291}:\\
\;\;\;\;t_1 \cdot \sin \left(\left|t_0\right|\right)\\
\mathbf{else}:\\
\;\;\;\;t_1 \cdot \sin \left(e^{\log t_0}\right)\\
\end{array}
\end{array}
if y.re < -3.69999999999999994e-74 or 1.25e-57 < y.re < 4.0000000000000003e209Initial program 32.6%
exp-diff25.6%
+-rgt-identity25.6%
+-rgt-identity25.6%
exp-to-pow25.7%
hypot-def25.7%
*-commutative25.7%
exp-prod24.9%
fma-def24.9%
hypot-def59.2%
*-commutative59.2%
Simplified59.2%
Taylor expanded in y.im around 0 60.8%
*-commutative60.8%
unpow260.8%
unpow260.8%
hypot-def63.0%
Simplified63.0%
if -3.69999999999999994e-74 < y.re < 1.25e-57Initial program 43.6%
exp-diff43.6%
+-rgt-identity43.6%
+-rgt-identity43.6%
exp-to-pow43.6%
hypot-def43.6%
*-commutative43.6%
exp-prod43.5%
fma-def43.5%
hypot-def80.2%
*-commutative80.2%
Simplified80.2%
Taylor expanded in y.re around 0 32.2%
unpow232.2%
unpow232.2%
hypot-def61.7%
*-commutative61.7%
exp-prod61.4%
Simplified61.4%
if 4.0000000000000003e209 < y.re < 1.70000000000000012e291Initial program 30.0%
exp-diff20.0%
+-rgt-identity20.0%
+-rgt-identity20.0%
exp-to-pow20.0%
hypot-def20.0%
*-commutative20.0%
exp-prod15.0%
fma-def15.0%
hypot-def25.0%
*-commutative25.0%
Simplified25.0%
Taylor expanded in y.im around 0 40.0%
*-commutative40.0%
unpow240.0%
unpow240.0%
hypot-def40.0%
Simplified40.0%
*-commutative25.5%
add-sqr-sqrt5.2%
sqrt-unprod10.0%
pow210.0%
Applied egg-rr10.0%
unpow210.0%
rem-sqrt-square30.5%
Simplified65.0%
if 1.70000000000000012e291 < y.re Initial program 33.3%
exp-diff33.3%
+-rgt-identity33.3%
+-rgt-identity33.3%
exp-to-pow33.3%
hypot-def33.3%
*-commutative33.3%
exp-prod33.3%
fma-def33.3%
hypot-def50.0%
*-commutative50.0%
Simplified50.0%
Taylor expanded in y.im around 0 50.0%
*-commutative50.0%
unpow250.0%
unpow250.0%
hypot-def50.0%
Simplified50.0%
*-commutative50.0%
add-exp-log66.7%
Applied egg-rr66.7%
Final simplification62.6%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (sin (* y.re (atan2 x.im x.re))))
(t_1 (pow (hypot x.im x.re) y.re))
(t_2 (* t_0 t_1)))
(if (<= y.re -6.2e-196)
t_2
(if (<= y.re 4.8e-219)
(/ (sin (* y.im (log (- x.re)))) (exp (* y.im (atan2 x.im x.re))))
(if (or (<= y.re 2e+212) (not (<= y.re 4e+261)))
t_2
(* t_1 (fabs t_0)))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = sin((y_46_re * atan2(x_46_im, x_46_re)));
double t_1 = pow(hypot(x_46_im, x_46_re), y_46_re);
double t_2 = t_0 * t_1;
double tmp;
if (y_46_re <= -6.2e-196) {
tmp = t_2;
} else if (y_46_re <= 4.8e-219) {
tmp = sin((y_46_im * log(-x_46_re))) / exp((y_46_im * atan2(x_46_im, x_46_re)));
} else if ((y_46_re <= 2e+212) || !(y_46_re <= 4e+261)) {
tmp = t_2;
} else {
tmp = t_1 * 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 = Math.sin((y_46_re * Math.atan2(x_46_im, x_46_re)));
double t_1 = Math.pow(Math.hypot(x_46_im, x_46_re), y_46_re);
double t_2 = t_0 * t_1;
double tmp;
if (y_46_re <= -6.2e-196) {
tmp = t_2;
} else if (y_46_re <= 4.8e-219) {
tmp = Math.sin((y_46_im * Math.log(-x_46_re))) / Math.exp((y_46_im * Math.atan2(x_46_im, x_46_re)));
} else if ((y_46_re <= 2e+212) || !(y_46_re <= 4e+261)) {
tmp = t_2;
} else {
tmp = t_1 * Math.abs(t_0);
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): t_0 = math.sin((y_46_re * math.atan2(x_46_im, x_46_re))) t_1 = math.pow(math.hypot(x_46_im, x_46_re), y_46_re) t_2 = t_0 * t_1 tmp = 0 if y_46_re <= -6.2e-196: tmp = t_2 elif y_46_re <= 4.8e-219: tmp = math.sin((y_46_im * math.log(-x_46_re))) / math.exp((y_46_im * math.atan2(x_46_im, x_46_re))) elif (y_46_re <= 2e+212) or not (y_46_re <= 4e+261): tmp = t_2 else: tmp = t_1 * math.fabs(t_0) return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = sin(Float64(y_46_re * atan(x_46_im, x_46_re))) t_1 = hypot(x_46_im, x_46_re) ^ y_46_re t_2 = Float64(t_0 * t_1) tmp = 0.0 if (y_46_re <= -6.2e-196) tmp = t_2; elseif (y_46_re <= 4.8e-219) tmp = Float64(sin(Float64(y_46_im * log(Float64(-x_46_re)))) / exp(Float64(y_46_im * atan(x_46_im, x_46_re)))); elseif ((y_46_re <= 2e+212) || !(y_46_re <= 4e+261)) tmp = t_2; else tmp = Float64(t_1 * 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 = sin((y_46_re * atan2(x_46_im, x_46_re))); t_1 = hypot(x_46_im, x_46_re) ^ y_46_re; t_2 = t_0 * t_1; tmp = 0.0; if (y_46_re <= -6.2e-196) tmp = t_2; elseif (y_46_re <= 4.8e-219) tmp = sin((y_46_im * log(-x_46_re))) / exp((y_46_im * atan2(x_46_im, x_46_re))); elseif ((y_46_re <= 2e+212) || ~((y_46_re <= 4e+261))) tmp = t_2; else tmp = t_1 * 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[Sin[N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$1 = N[Power[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision], y$46$re], $MachinePrecision]}, Block[{t$95$2 = N[(t$95$0 * t$95$1), $MachinePrecision]}, If[LessEqual[y$46$re, -6.2e-196], t$95$2, If[LessEqual[y$46$re, 4.8e-219], N[(N[Sin[N[(y$46$im * N[Log[(-x$46$re)], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / N[Exp[N[(y$46$im * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[y$46$re, 2e+212], N[Not[LessEqual[y$46$re, 4e+261]], $MachinePrecision]], t$95$2, N[(t$95$1 * N[Abs[t$95$0], $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 := {\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re}\\
t_2 := t_0 \cdot t_1\\
\mathbf{if}\;y.re \leq -6.2 \cdot 10^{-196}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;y.re \leq 4.8 \cdot 10^{-219}:\\
\;\;\;\;\frac{\sin \left(y.im \cdot \log \left(-x.re\right)\right)}{e^{y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}}}\\
\mathbf{elif}\;y.re \leq 2 \cdot 10^{+212} \lor \neg \left(y.re \leq 4 \cdot 10^{+261}\right):\\
\;\;\;\;t_2\\
\mathbf{else}:\\
\;\;\;\;t_1 \cdot \left|t_0\right|\\
\end{array}
\end{array}
if y.re < -6.19999999999999986e-196 or 4.80000000000000028e-219 < y.re < 1.9999999999999998e212 or 3.9999999999999997e261 < y.re Initial program 38.8%
exp-diff33.3%
+-rgt-identity33.3%
+-rgt-identity33.3%
exp-to-pow33.4%
hypot-def33.4%
*-commutative33.4%
exp-prod32.9%
fma-def32.9%
hypot-def66.3%
*-commutative66.3%
Simplified66.3%
Taylor expanded in y.im around 0 52.7%
*-commutative52.7%
unpow252.7%
unpow252.7%
hypot-def53.8%
Simplified53.8%
if -6.19999999999999986e-196 < y.re < 4.80000000000000028e-219Initial program 34.4%
exp-diff34.4%
+-rgt-identity34.4%
+-rgt-identity34.4%
exp-to-pow34.4%
hypot-def34.4%
*-commutative34.4%
exp-prod34.0%
fma-def34.1%
hypot-def70.5%
*-commutative70.5%
Simplified70.5%
Taylor expanded in y.re around 0 31.8%
Taylor expanded in x.re around -inf 52.1%
mul-1-neg52.1%
Simplified52.1%
if 1.9999999999999998e212 < y.re < 3.9999999999999997e261Initial program 9.1%
exp-diff9.1%
+-rgt-identity9.1%
+-rgt-identity9.1%
exp-to-pow9.1%
hypot-def9.1%
*-commutative9.1%
exp-prod0.0%
fma-def0.0%
hypot-def9.1%
*-commutative9.1%
Simplified9.1%
Taylor expanded in y.im around 0 27.3%
*-commutative27.3%
unpow227.3%
unpow227.3%
hypot-def27.3%
Simplified27.3%
add-sqr-sqrt27.4%
sqrt-unprod63.9%
pow263.9%
*-commutative63.9%
Applied egg-rr72.7%
unpow263.9%
rem-sqrt-square63.9%
Simplified72.7%
Final simplification54.3%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (* y.re (atan2 x.im x.re)))
(t_1 (sin t_0))
(t_2 (pow (hypot x.im x.re) y.re))
(t_3 (* t_1 t_2)))
(if (<= y.re -2.5e-198)
t_3
(if (<= y.re 6.4e-224)
(/ (sin (* y.im (log (- x.re)))) (exp (* y.im (atan2 x.im x.re))))
(if (<= y.re 8.6e+207)
t_3
(if (<= y.re 6e+283)
(* t_2 (sin (fabs t_0)))
(* t_1 (pow x.re y.re))))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = y_46_re * atan2(x_46_im, x_46_re);
double t_1 = sin(t_0);
double t_2 = pow(hypot(x_46_im, x_46_re), y_46_re);
double t_3 = t_1 * t_2;
double tmp;
if (y_46_re <= -2.5e-198) {
tmp = t_3;
} else if (y_46_re <= 6.4e-224) {
tmp = sin((y_46_im * log(-x_46_re))) / exp((y_46_im * atan2(x_46_im, x_46_re)));
} else if (y_46_re <= 8.6e+207) {
tmp = t_3;
} else if (y_46_re <= 6e+283) {
tmp = t_2 * sin(fabs(t_0));
} else {
tmp = t_1 * pow(x_46_re, y_46_re);
}
return tmp;
}
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = y_46_re * Math.atan2(x_46_im, x_46_re);
double t_1 = Math.sin(t_0);
double t_2 = Math.pow(Math.hypot(x_46_im, x_46_re), y_46_re);
double t_3 = t_1 * t_2;
double tmp;
if (y_46_re <= -2.5e-198) {
tmp = t_3;
} else if (y_46_re <= 6.4e-224) {
tmp = Math.sin((y_46_im * Math.log(-x_46_re))) / Math.exp((y_46_im * Math.atan2(x_46_im, x_46_re)));
} else if (y_46_re <= 8.6e+207) {
tmp = t_3;
} else if (y_46_re <= 6e+283) {
tmp = t_2 * Math.sin(Math.abs(t_0));
} else {
tmp = t_1 * Math.pow(x_46_re, y_46_re);
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): t_0 = y_46_re * math.atan2(x_46_im, x_46_re) t_1 = math.sin(t_0) t_2 = math.pow(math.hypot(x_46_im, x_46_re), y_46_re) t_3 = t_1 * t_2 tmp = 0 if y_46_re <= -2.5e-198: tmp = t_3 elif y_46_re <= 6.4e-224: tmp = math.sin((y_46_im * math.log(-x_46_re))) / math.exp((y_46_im * math.atan2(x_46_im, x_46_re))) elif y_46_re <= 8.6e+207: tmp = t_3 elif y_46_re <= 6e+283: tmp = t_2 * math.sin(math.fabs(t_0)) else: tmp = t_1 * math.pow(x_46_re, y_46_re) return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = Float64(y_46_re * atan(x_46_im, x_46_re)) t_1 = sin(t_0) t_2 = hypot(x_46_im, x_46_re) ^ y_46_re t_3 = Float64(t_1 * t_2) tmp = 0.0 if (y_46_re <= -2.5e-198) tmp = t_3; elseif (y_46_re <= 6.4e-224) tmp = Float64(sin(Float64(y_46_im * log(Float64(-x_46_re)))) / exp(Float64(y_46_im * atan(x_46_im, x_46_re)))); elseif (y_46_re <= 8.6e+207) tmp = t_3; elseif (y_46_re <= 6e+283) tmp = Float64(t_2 * sin(abs(t_0))); else tmp = Float64(t_1 * (x_46_re ^ y_46_re)); end return tmp end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = y_46_re * atan2(x_46_im, x_46_re); t_1 = sin(t_0); t_2 = hypot(x_46_im, x_46_re) ^ y_46_re; t_3 = t_1 * t_2; tmp = 0.0; if (y_46_re <= -2.5e-198) tmp = t_3; elseif (y_46_re <= 6.4e-224) tmp = sin((y_46_im * log(-x_46_re))) / exp((y_46_im * atan2(x_46_im, x_46_re))); elseif (y_46_re <= 8.6e+207) tmp = t_3; elseif (y_46_re <= 6e+283) tmp = t_2 * sin(abs(t_0)); else tmp = t_1 * (x_46_re ^ y_46_re); end tmp_2 = tmp; end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[Sin[t$95$0], $MachinePrecision]}, Block[{t$95$2 = N[Power[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision], y$46$re], $MachinePrecision]}, Block[{t$95$3 = N[(t$95$1 * t$95$2), $MachinePrecision]}, If[LessEqual[y$46$re, -2.5e-198], t$95$3, If[LessEqual[y$46$re, 6.4e-224], N[(N[Sin[N[(y$46$im * N[Log[(-x$46$re)], $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, 8.6e+207], t$95$3, If[LessEqual[y$46$re, 6e+283], N[(t$95$2 * N[Sin[N[Abs[t$95$0], $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(t$95$1 * N[Power[x$46$re, 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 := {\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re}\\
t_3 := t_1 \cdot t_2\\
\mathbf{if}\;y.re \leq -2.5 \cdot 10^{-198}:\\
\;\;\;\;t_3\\
\mathbf{elif}\;y.re \leq 6.4 \cdot 10^{-224}:\\
\;\;\;\;\frac{\sin \left(y.im \cdot \log \left(-x.re\right)\right)}{e^{y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}}}\\
\mathbf{elif}\;y.re \leq 8.6 \cdot 10^{+207}:\\
\;\;\;\;t_3\\
\mathbf{elif}\;y.re \leq 6 \cdot 10^{+283}:\\
\;\;\;\;t_2 \cdot \sin \left(\left|t_0\right|\right)\\
\mathbf{else}:\\
\;\;\;\;t_1 \cdot {x.re}^{y.re}\\
\end{array}
\end{array}
if y.re < -2.5e-198 or 6.3999999999999997e-224 < y.re < 8.5999999999999995e207Initial program 38.2%
exp-diff33.3%
+-rgt-identity33.3%
+-rgt-identity33.3%
exp-to-pow33.4%
hypot-def33.4%
*-commutative33.4%
exp-prod32.8%
fma-def32.9%
hypot-def67.9%
*-commutative67.9%
Simplified67.9%
Taylor expanded in y.im around 0 52.6%
*-commutative52.6%
unpow252.6%
unpow252.6%
hypot-def53.8%
Simplified53.8%
if -2.5e-198 < y.re < 6.3999999999999997e-224Initial program 34.4%
exp-diff34.4%
+-rgt-identity34.4%
+-rgt-identity34.4%
exp-to-pow34.4%
hypot-def34.4%
*-commutative34.4%
exp-prod34.0%
fma-def34.1%
hypot-def70.5%
*-commutative70.5%
Simplified70.5%
Taylor expanded in y.re around 0 31.8%
Taylor expanded in x.re around -inf 52.1%
mul-1-neg52.1%
Simplified52.1%
if 8.5999999999999995e207 < y.re < 6.0000000000000001e283Initial program 26.3%
exp-diff15.8%
+-rgt-identity15.8%
+-rgt-identity15.8%
exp-to-pow15.8%
hypot-def15.8%
*-commutative15.8%
exp-prod10.5%
fma-def10.5%
hypot-def21.1%
*-commutative21.1%
Simplified21.1%
Taylor expanded in y.im around 0 36.8%
*-commutative36.8%
unpow236.8%
unpow236.8%
hypot-def36.8%
Simplified36.8%
*-commutative21.6%
add-sqr-sqrt5.5%
sqrt-unprod5.3%
pow25.3%
Applied egg-rr5.3%
unpow25.3%
rem-sqrt-square26.9%
Simplified63.2%
if 6.0000000000000001e283 < y.re Initial program 42.9%
exp-diff42.9%
+-rgt-identity42.9%
+-rgt-identity42.9%
exp-to-pow42.9%
hypot-def42.9%
*-commutative42.9%
exp-prod42.9%
fma-def42.9%
hypot-def57.1%
*-commutative57.1%
Simplified57.1%
Taylor expanded in y.im around 0 57.1%
*-commutative57.1%
unpow257.1%
unpow257.1%
hypot-def57.1%
Simplified57.1%
Taylor expanded in x.im around 0 57.6%
Final simplification54.3%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (sin (* y.re (atan2 x.im x.re))))
(t_1 (* t_0 (pow (hypot x.im x.re) y.re))))
(if (<= y.re -5.5e-197)
t_1
(if (<= y.re 1.7e-219)
(/ (sin (* y.im (log (- x.re)))) (exp (* y.im (atan2 x.im x.re))))
(if (or (<= y.re 3e+212) (not (<= y.re 1.3e+262)))
t_1
(* (pow x.im y.re) (fabs t_0)))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = sin((y_46_re * atan2(x_46_im, x_46_re)));
double t_1 = t_0 * pow(hypot(x_46_im, x_46_re), y_46_re);
double tmp;
if (y_46_re <= -5.5e-197) {
tmp = t_1;
} else if (y_46_re <= 1.7e-219) {
tmp = sin((y_46_im * log(-x_46_re))) / exp((y_46_im * atan2(x_46_im, x_46_re)));
} else if ((y_46_re <= 3e+212) || !(y_46_re <= 1.3e+262)) {
tmp = t_1;
} else {
tmp = pow(x_46_im, y_46_re) * 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 = Math.sin((y_46_re * Math.atan2(x_46_im, x_46_re)));
double t_1 = t_0 * Math.pow(Math.hypot(x_46_im, x_46_re), y_46_re);
double tmp;
if (y_46_re <= -5.5e-197) {
tmp = t_1;
} else if (y_46_re <= 1.7e-219) {
tmp = Math.sin((y_46_im * Math.log(-x_46_re))) / Math.exp((y_46_im * Math.atan2(x_46_im, x_46_re)));
} else if ((y_46_re <= 3e+212) || !(y_46_re <= 1.3e+262)) {
tmp = t_1;
} else {
tmp = Math.pow(x_46_im, y_46_re) * Math.abs(t_0);
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): t_0 = math.sin((y_46_re * math.atan2(x_46_im, x_46_re))) t_1 = t_0 * math.pow(math.hypot(x_46_im, x_46_re), y_46_re) tmp = 0 if y_46_re <= -5.5e-197: tmp = t_1 elif y_46_re <= 1.7e-219: tmp = math.sin((y_46_im * math.log(-x_46_re))) / math.exp((y_46_im * math.atan2(x_46_im, x_46_re))) elif (y_46_re <= 3e+212) or not (y_46_re <= 1.3e+262): tmp = t_1 else: tmp = math.pow(x_46_im, y_46_re) * math.fabs(t_0) return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = sin(Float64(y_46_re * atan(x_46_im, x_46_re))) t_1 = Float64(t_0 * (hypot(x_46_im, x_46_re) ^ y_46_re)) tmp = 0.0 if (y_46_re <= -5.5e-197) tmp = t_1; elseif (y_46_re <= 1.7e-219) tmp = Float64(sin(Float64(y_46_im * log(Float64(-x_46_re)))) / exp(Float64(y_46_im * atan(x_46_im, x_46_re)))); elseif ((y_46_re <= 3e+212) || !(y_46_re <= 1.3e+262)) tmp = t_1; else tmp = Float64((x_46_im ^ y_46_re) * 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 = sin((y_46_re * atan2(x_46_im, x_46_re))); t_1 = t_0 * (hypot(x_46_im, x_46_re) ^ y_46_re); tmp = 0.0; if (y_46_re <= -5.5e-197) tmp = t_1; elseif (y_46_re <= 1.7e-219) tmp = sin((y_46_im * log(-x_46_re))) / exp((y_46_im * atan2(x_46_im, x_46_re))); elseif ((y_46_re <= 3e+212) || ~((y_46_re <= 1.3e+262))) tmp = t_1; else tmp = (x_46_im ^ y_46_re) * 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[Sin[N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$1 = N[(t$95$0 * N[Power[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision], y$46$re], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y$46$re, -5.5e-197], t$95$1, If[LessEqual[y$46$re, 1.7e-219], N[(N[Sin[N[(y$46$im * N[Log[(-x$46$re)], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / N[Exp[N[(y$46$im * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[y$46$re, 3e+212], N[Not[LessEqual[y$46$re, 1.3e+262]], $MachinePrecision]], t$95$1, N[(N[Power[x$46$im, y$46$re], $MachinePrecision] * N[Abs[t$95$0], $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 := t_0 \cdot {\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re}\\
\mathbf{if}\;y.re \leq -5.5 \cdot 10^{-197}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y.re \leq 1.7 \cdot 10^{-219}:\\
\;\;\;\;\frac{\sin \left(y.im \cdot \log \left(-x.re\right)\right)}{e^{y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}}}\\
\mathbf{elif}\;y.re \leq 3 \cdot 10^{+212} \lor \neg \left(y.re \leq 1.3 \cdot 10^{+262}\right):\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;{x.im}^{y.re} \cdot \left|t_0\right|\\
\end{array}
\end{array}
if y.re < -5.50000000000000037e-197 or 1.6999999999999999e-219 < y.re < 3e212 or 1.3e262 < y.re Initial program 38.8%
exp-diff33.3%
+-rgt-identity33.3%
+-rgt-identity33.3%
exp-to-pow33.4%
hypot-def33.4%
*-commutative33.4%
exp-prod32.9%
fma-def32.9%
hypot-def66.3%
*-commutative66.3%
Simplified66.3%
Taylor expanded in y.im around 0 52.7%
*-commutative52.7%
unpow252.7%
unpow252.7%
hypot-def53.8%
Simplified53.8%
if -5.50000000000000037e-197 < y.re < 1.6999999999999999e-219Initial program 34.4%
exp-diff34.4%
+-rgt-identity34.4%
+-rgt-identity34.4%
exp-to-pow34.4%
hypot-def34.4%
*-commutative34.4%
exp-prod34.0%
fma-def34.1%
hypot-def70.5%
*-commutative70.5%
Simplified70.5%
Taylor expanded in y.re around 0 31.8%
Taylor expanded in x.re around -inf 52.1%
mul-1-neg52.1%
Simplified52.1%
if 3e212 < y.re < 1.3e262Initial program 9.1%
exp-diff9.1%
+-rgt-identity9.1%
+-rgt-identity9.1%
exp-to-pow9.1%
hypot-def9.1%
*-commutative9.1%
exp-prod0.0%
fma-def0.0%
hypot-def9.1%
*-commutative9.1%
Simplified9.1%
Taylor expanded in y.im around 0 27.3%
*-commutative27.3%
unpow227.3%
unpow227.3%
hypot-def27.3%
Simplified27.3%
Taylor expanded in x.re around 0 27.6%
add-sqr-sqrt27.4%
sqrt-unprod63.9%
pow263.9%
*-commutative63.9%
Applied egg-rr63.9%
unpow263.9%
rem-sqrt-square63.9%
Simplified63.9%
Final simplification53.9%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (* y.re (atan2 x.im x.re)))
(t_1 (sin t_0))
(t_2 (* (pow x.re y.re) (sin (fabs t_0)))))
(if (<= x.re -3.8e+137)
t_2
(if (<= x.re -6.2e+104)
(* (pow x.im y.re) (fabs t_1))
(if (<= x.re 1.75e+52) (* t_1 (pow x.im y.re)) t_2)))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = y_46_re * atan2(x_46_im, x_46_re);
double t_1 = sin(t_0);
double t_2 = pow(x_46_re, y_46_re) * sin(fabs(t_0));
double tmp;
if (x_46_re <= -3.8e+137) {
tmp = t_2;
} else if (x_46_re <= -6.2e+104) {
tmp = pow(x_46_im, y_46_re) * fabs(t_1);
} else if (x_46_re <= 1.75e+52) {
tmp = t_1 * pow(x_46_im, y_46_re);
} else {
tmp = t_2;
}
return tmp;
}
real(8) function code(x_46re, x_46im, y_46re, y_46im)
real(8), intent (in) :: x_46re
real(8), intent (in) :: x_46im
real(8), intent (in) :: y_46re
real(8), intent (in) :: y_46im
real(8) :: t_0
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_0 = y_46re * atan2(x_46im, x_46re)
t_1 = sin(t_0)
t_2 = (x_46re ** y_46re) * sin(abs(t_0))
if (x_46re <= (-3.8d+137)) then
tmp = t_2
else if (x_46re <= (-6.2d+104)) then
tmp = (x_46im ** y_46re) * abs(t_1)
else if (x_46re <= 1.75d+52) then
tmp = t_1 * (x_46im ** y_46re)
else
tmp = t_2
end if
code = tmp
end function
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = y_46_re * Math.atan2(x_46_im, x_46_re);
double t_1 = Math.sin(t_0);
double t_2 = Math.pow(x_46_re, y_46_re) * Math.sin(Math.abs(t_0));
double tmp;
if (x_46_re <= -3.8e+137) {
tmp = t_2;
} else if (x_46_re <= -6.2e+104) {
tmp = Math.pow(x_46_im, y_46_re) * Math.abs(t_1);
} else if (x_46_re <= 1.75e+52) {
tmp = t_1 * Math.pow(x_46_im, y_46_re);
} else {
tmp = t_2;
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): t_0 = y_46_re * math.atan2(x_46_im, x_46_re) t_1 = math.sin(t_0) t_2 = math.pow(x_46_re, y_46_re) * math.sin(math.fabs(t_0)) tmp = 0 if x_46_re <= -3.8e+137: tmp = t_2 elif x_46_re <= -6.2e+104: tmp = math.pow(x_46_im, y_46_re) * math.fabs(t_1) elif x_46_re <= 1.75e+52: tmp = t_1 * math.pow(x_46_im, y_46_re) else: tmp = t_2 return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = Float64(y_46_re * atan(x_46_im, x_46_re)) t_1 = sin(t_0) t_2 = Float64((x_46_re ^ y_46_re) * sin(abs(t_0))) tmp = 0.0 if (x_46_re <= -3.8e+137) tmp = t_2; elseif (x_46_re <= -6.2e+104) tmp = Float64((x_46_im ^ y_46_re) * abs(t_1)); elseif (x_46_re <= 1.75e+52) tmp = Float64(t_1 * (x_46_im ^ y_46_re)); else tmp = t_2; end return tmp end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = y_46_re * atan2(x_46_im, x_46_re); t_1 = sin(t_0); t_2 = (x_46_re ^ y_46_re) * sin(abs(t_0)); tmp = 0.0; if (x_46_re <= -3.8e+137) tmp = t_2; elseif (x_46_re <= -6.2e+104) tmp = (x_46_im ^ y_46_re) * abs(t_1); elseif (x_46_re <= 1.75e+52) tmp = t_1 * (x_46_im ^ y_46_re); else tmp = t_2; end tmp_2 = tmp; end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[Sin[t$95$0], $MachinePrecision]}, Block[{t$95$2 = N[(N[Power[x$46$re, y$46$re], $MachinePrecision] * N[Sin[N[Abs[t$95$0], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x$46$re, -3.8e+137], t$95$2, If[LessEqual[x$46$re, -6.2e+104], N[(N[Power[x$46$im, y$46$re], $MachinePrecision] * N[Abs[t$95$1], $MachinePrecision]), $MachinePrecision], If[LessEqual[x$46$re, 1.75e+52], N[(t$95$1 * N[Power[x$46$im, y$46$re], $MachinePrecision]), $MachinePrecision], t$95$2]]]]]]
\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 := {x.re}^{y.re} \cdot \sin \left(\left|t_0\right|\right)\\
\mathbf{if}\;x.re \leq -3.8 \cdot 10^{+137}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;x.re \leq -6.2 \cdot 10^{+104}:\\
\;\;\;\;{x.im}^{y.re} \cdot \left|t_1\right|\\
\mathbf{elif}\;x.re \leq 1.75 \cdot 10^{+52}:\\
\;\;\;\;t_1 \cdot {x.im}^{y.re}\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
\end{array}
if x.re < -3.79999999999999963e137 or 1.75e52 < x.re Initial program 16.9%
exp-diff14.2%
+-rgt-identity14.2%
+-rgt-identity14.2%
exp-to-pow14.2%
hypot-def14.2%
*-commutative14.2%
exp-prod14.0%
fma-def14.0%
hypot-def58.1%
*-commutative58.1%
Simplified58.1%
Taylor expanded in y.im around 0 39.7%
*-commutative39.7%
unpow239.7%
unpow239.7%
hypot-def38.1%
Simplified38.1%
Taylor expanded in x.im around 0 33.9%
*-commutative33.9%
add-sqr-sqrt18.6%
sqrt-unprod24.4%
pow224.4%
Applied egg-rr24.4%
unpow224.4%
rem-sqrt-square36.7%
Simplified36.7%
if -3.79999999999999963e137 < x.re < -6.20000000000000033e104Initial program 75.0%
exp-diff50.0%
+-rgt-identity50.0%
+-rgt-identity50.0%
exp-to-pow50.0%
hypot-def50.0%
*-commutative50.0%
exp-prod50.0%
fma-def50.0%
hypot-def50.0%
*-commutative50.0%
Simplified50.0%
Taylor expanded in y.im around 0 34.0%
*-commutative34.0%
unpow234.0%
unpow234.0%
hypot-def34.0%
Simplified34.0%
Taylor expanded in x.re around 0 50.0%
add-sqr-sqrt12.5%
sqrt-unprod63.1%
pow263.1%
*-commutative63.1%
Applied egg-rr63.1%
unpow263.1%
rem-sqrt-square62.9%
Simplified62.9%
if -6.20000000000000033e104 < x.re < 1.75e52Initial program 43.3%
exp-diff39.3%
+-rgt-identity39.3%
+-rgt-identity39.3%
exp-to-pow39.3%
hypot-def39.3%
*-commutative39.3%
exp-prod38.2%
fma-def38.2%
hypot-def67.9%
*-commutative67.9%
Simplified67.9%
Taylor expanded in y.im around 0 47.8%
*-commutative47.8%
unpow247.8%
unpow247.8%
hypot-def47.2%
Simplified47.2%
Taylor expanded in x.re around 0 40.5%
Final simplification40.1%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (exp (* y.im (atan2 x.im x.re)))))
(if (<= y.im -1.05e+73)
(/ (sin (* y.im (log (- x.im)))) t_0)
(if (<= y.im 2.8e+141)
(* (sin (* y.re (atan2 x.im x.re))) (pow (hypot x.im x.re) y.re))
(/ (sin (* y.im (log x.im))) t_0)))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = exp((y_46_im * atan2(x_46_im, x_46_re)));
double tmp;
if (y_46_im <= -1.05e+73) {
tmp = sin((y_46_im * log(-x_46_im))) / t_0;
} else if (y_46_im <= 2.8e+141) {
tmp = sin((y_46_re * atan2(x_46_im, x_46_re))) * pow(hypot(x_46_im, x_46_re), y_46_re);
} else {
tmp = sin((y_46_im * log(x_46_im))) / 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 = Math.exp((y_46_im * Math.atan2(x_46_im, x_46_re)));
double tmp;
if (y_46_im <= -1.05e+73) {
tmp = Math.sin((y_46_im * Math.log(-x_46_im))) / t_0;
} else if (y_46_im <= 2.8e+141) {
tmp = Math.sin((y_46_re * Math.atan2(x_46_im, x_46_re))) * Math.pow(Math.hypot(x_46_im, x_46_re), y_46_re);
} else {
tmp = Math.sin((y_46_im * Math.log(x_46_im))) / t_0;
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): t_0 = math.exp((y_46_im * math.atan2(x_46_im, x_46_re))) tmp = 0 if y_46_im <= -1.05e+73: tmp = math.sin((y_46_im * math.log(-x_46_im))) / t_0 elif y_46_im <= 2.8e+141: tmp = math.sin((y_46_re * math.atan2(x_46_im, x_46_re))) * math.pow(math.hypot(x_46_im, x_46_re), y_46_re) else: tmp = math.sin((y_46_im * math.log(x_46_im))) / t_0 return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = exp(Float64(y_46_im * atan(x_46_im, x_46_re))) tmp = 0.0 if (y_46_im <= -1.05e+73) tmp = Float64(sin(Float64(y_46_im * log(Float64(-x_46_im)))) / t_0); elseif (y_46_im <= 2.8e+141) tmp = Float64(sin(Float64(y_46_re * atan(x_46_im, x_46_re))) * (hypot(x_46_im, x_46_re) ^ y_46_re)); else tmp = Float64(sin(Float64(y_46_im * log(x_46_im))) / t_0); end return tmp end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = exp((y_46_im * atan2(x_46_im, x_46_re))); tmp = 0.0; if (y_46_im <= -1.05e+73) tmp = sin((y_46_im * log(-x_46_im))) / t_0; elseif (y_46_im <= 2.8e+141) tmp = sin((y_46_re * atan2(x_46_im, x_46_re))) * (hypot(x_46_im, x_46_re) ^ y_46_re); else tmp = sin((y_46_im * log(x_46_im))) / 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[Exp[N[(y$46$im * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[y$46$im, -1.05e+73], N[(N[Sin[N[(y$46$im * N[Log[(-x$46$im)], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / t$95$0), $MachinePrecision], If[LessEqual[y$46$im, 2.8e+141], N[(N[Sin[N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Power[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision], y$46$re], $MachinePrecision]), $MachinePrecision], N[(N[Sin[N[(y$46$im * N[Log[x$46$im], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / t$95$0), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := e^{y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}}\\
\mathbf{if}\;y.im \leq -1.05 \cdot 10^{+73}:\\
\;\;\;\;\frac{\sin \left(y.im \cdot \log \left(-x.im\right)\right)}{t_0}\\
\mathbf{elif}\;y.im \leq 2.8 \cdot 10^{+141}:\\
\;\;\;\;\sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re}\\
\mathbf{else}:\\
\;\;\;\;\frac{\sin \left(y.im \cdot \log x.im\right)}{t_0}\\
\end{array}
\end{array}
if y.im < -1.0500000000000001e73Initial program 27.3%
exp-diff21.2%
+-rgt-identity21.2%
+-rgt-identity21.2%
exp-to-pow21.2%
hypot-def21.2%
*-commutative21.2%
exp-prod18.8%
fma-def18.8%
hypot-def45.7%
*-commutative45.7%
Simplified45.7%
Taylor expanded in y.re around 0 25.3%
Taylor expanded in x.im around -inf 35.3%
mul-1-neg35.3%
Simplified35.3%
if -1.0500000000000001e73 < y.im < 2.79999999999999991e141Initial program 39.6%
exp-diff37.3%
+-rgt-identity37.3%
+-rgt-identity37.3%
exp-to-pow37.3%
hypot-def37.3%
*-commutative37.3%
exp-prod36.7%
fma-def36.8%
hypot-def73.6%
*-commutative73.6%
Simplified73.6%
Taylor expanded in y.im around 0 50.9%
*-commutative50.9%
unpow250.9%
unpow250.9%
hypot-def54.1%
Simplified54.1%
if 2.79999999999999991e141 < y.im Initial program 36.1%
exp-diff25.0%
+-rgt-identity25.0%
+-rgt-identity25.0%
exp-to-pow25.0%
hypot-def25.0%
*-commutative25.0%
exp-prod25.0%
fma-def25.0%
hypot-def47.3%
*-commutative47.3%
Simplified47.3%
Taylor expanded in y.re around 0 36.2%
Taylor expanded in x.re around 0 50.1%
Final simplification49.9%
(FPCore (x.re x.im y.re y.im) :precision binary64 (if (<= y.im 3.2e+141) (* (sin (* y.re (atan2 x.im x.re))) (pow (hypot x.im x.re) y.re)) (/ (sin (* y.im (log x.im))) (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_im <= 3.2e+141) {
tmp = sin((y_46_re * atan2(x_46_im, x_46_re))) * pow(hypot(x_46_im, x_46_re), y_46_re);
} else {
tmp = sin((y_46_im * log(x_46_im))) / exp((y_46_im * atan2(x_46_im, x_46_re)));
}
return tmp;
}
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double tmp;
if (y_46_im <= 3.2e+141) {
tmp = Math.sin((y_46_re * Math.atan2(x_46_im, x_46_re))) * Math.pow(Math.hypot(x_46_im, x_46_re), y_46_re);
} else {
tmp = Math.sin((y_46_im * Math.log(x_46_im))) / 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_im <= 3.2e+141: tmp = math.sin((y_46_re * math.atan2(x_46_im, x_46_re))) * math.pow(math.hypot(x_46_im, x_46_re), y_46_re) else: tmp = math.sin((y_46_im * math.log(x_46_im))) / 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_im <= 3.2e+141) tmp = Float64(sin(Float64(y_46_re * atan(x_46_im, x_46_re))) * (hypot(x_46_im, x_46_re) ^ y_46_re)); else tmp = Float64(sin(Float64(y_46_im * log(x_46_im))) / exp(Float64(y_46_im * atan(x_46_im, x_46_re)))); end return tmp end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im) tmp = 0.0; if (y_46_im <= 3.2e+141) tmp = sin((y_46_re * atan2(x_46_im, x_46_re))) * (hypot(x_46_im, x_46_re) ^ y_46_re); else tmp = sin((y_46_im * log(x_46_im))) / 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[LessEqual[y$46$im, 3.2e+141], N[(N[Sin[N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Power[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision], y$46$re], $MachinePrecision]), $MachinePrecision], N[(N[Sin[N[(y$46$im * N[Log[x$46$im], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / N[Exp[N[(y$46$im * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y.im \leq 3.2 \cdot 10^{+141}:\\
\;\;\;\;\sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re}\\
\mathbf{else}:\\
\;\;\;\;\frac{\sin \left(y.im \cdot \log x.im\right)}{e^{y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}}}\\
\end{array}
\end{array}
if y.im < 3.20000000000000019e141Initial program 36.9%
exp-diff33.7%
+-rgt-identity33.7%
+-rgt-identity33.7%
exp-to-pow33.7%
hypot-def33.7%
*-commutative33.7%
exp-prod32.8%
fma-def32.8%
hypot-def67.4%
*-commutative67.4%
Simplified67.4%
Taylor expanded in y.im around 0 47.2%
*-commutative47.2%
unpow247.2%
unpow247.2%
hypot-def47.0%
Simplified47.0%
if 3.20000000000000019e141 < y.im Initial program 36.1%
exp-diff25.0%
+-rgt-identity25.0%
+-rgt-identity25.0%
exp-to-pow25.0%
hypot-def25.0%
*-commutative25.0%
exp-prod25.0%
fma-def25.0%
hypot-def47.3%
*-commutative47.3%
Simplified47.3%
Taylor expanded in y.re around 0 36.2%
Taylor expanded in x.re around 0 50.1%
Final simplification47.5%
(FPCore (x.re x.im y.re y.im) :precision binary64 (* (sin (* y.re (atan2 x.im x.re))) (pow (hypot x.im x.re) y.re)))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
return sin((y_46_re * atan2(x_46_im, x_46_re))) * pow(hypot(x_46_im, x_46_re), y_46_re);
}
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(Math.hypot(x_46_im, x_46_re), 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(math.hypot(x_46_im, x_46_re), 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))) * (hypot(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) tmp = sin((y_46_re * atan2(x_46_im, x_46_re))) * (hypot(x_46_im, x_46_re) ^ 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[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision], y$46$re], $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re}
\end{array}
Initial program 36.8%
exp-diff32.5%
+-rgt-identity32.5%
+-rgt-identity32.5%
exp-to-pow32.5%
hypot-def32.5%
*-commutative32.5%
exp-prod31.7%
fma-def31.7%
hypot-def64.6%
*-commutative64.6%
Simplified64.6%
Taylor expanded in y.im around 0 45.1%
*-commutative45.1%
unpow245.1%
unpow245.1%
hypot-def44.2%
Simplified44.2%
Final simplification44.2%
(FPCore (x.re x.im y.re y.im) :precision binary64 (let* ((t_0 (sin (* y.re (atan2 x.im x.re))))) (if (<= x.re 5.8e-14) (* t_0 (pow x.im y.re)) (* t_0 (pow x.re y.re)))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = sin((y_46_re * atan2(x_46_im, x_46_re)));
double tmp;
if (x_46_re <= 5.8e-14) {
tmp = t_0 * pow(x_46_im, y_46_re);
} else {
tmp = t_0 * pow(x_46_re, y_46_re);
}
return tmp;
}
real(8) function code(x_46re, x_46im, y_46re, y_46im)
real(8), intent (in) :: x_46re
real(8), intent (in) :: x_46im
real(8), intent (in) :: y_46re
real(8), intent (in) :: y_46im
real(8) :: t_0
real(8) :: tmp
t_0 = sin((y_46re * atan2(x_46im, x_46re)))
if (x_46re <= 5.8d-14) then
tmp = t_0 * (x_46im ** y_46re)
else
tmp = t_0 * (x_46re ** y_46re)
end if
code = tmp
end function
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = Math.sin((y_46_re * Math.atan2(x_46_im, x_46_re)));
double tmp;
if (x_46_re <= 5.8e-14) {
tmp = t_0 * Math.pow(x_46_im, y_46_re);
} else {
tmp = t_0 * Math.pow(x_46_re, y_46_re);
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): t_0 = math.sin((y_46_re * math.atan2(x_46_im, x_46_re))) tmp = 0 if x_46_re <= 5.8e-14: tmp = t_0 * math.pow(x_46_im, y_46_re) else: tmp = t_0 * math.pow(x_46_re, 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))) tmp = 0.0 if (x_46_re <= 5.8e-14) tmp = Float64(t_0 * (x_46_im ^ y_46_re)); else tmp = Float64(t_0 * (x_46_re ^ y_46_re)); end return tmp end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = sin((y_46_re * atan2(x_46_im, x_46_re))); tmp = 0.0; if (x_46_re <= 5.8e-14) tmp = t_0 * (x_46_im ^ y_46_re); else tmp = t_0 * (x_46_re ^ y_46_re); end tmp_2 = tmp; end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[Sin[N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[x$46$re, 5.8e-14], N[(t$95$0 * N[Power[x$46$im, y$46$re], $MachinePrecision]), $MachinePrecision], N[(t$95$0 * N[Power[x$46$re, 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)\\
\mathbf{if}\;x.re \leq 5.8 \cdot 10^{-14}:\\
\;\;\;\;t_0 \cdot {x.im}^{y.re}\\
\mathbf{else}:\\
\;\;\;\;t_0 \cdot {x.re}^{y.re}\\
\end{array}
\end{array}
if x.re < 5.8000000000000005e-14Initial program 39.4%
exp-diff35.0%
+-rgt-identity35.0%
+-rgt-identity35.0%
exp-to-pow35.0%
hypot-def35.0%
*-commutative35.0%
exp-prod34.6%
fma-def34.6%
hypot-def67.2%
*-commutative67.2%
Simplified67.2%
Taylor expanded in y.im around 0 45.7%
*-commutative45.7%
unpow245.7%
unpow245.7%
hypot-def45.1%
Simplified45.1%
Taylor expanded in x.re around 0 37.9%
if 5.8000000000000005e-14 < x.re Initial program 26.2%
exp-diff22.3%
+-rgt-identity22.3%
+-rgt-identity22.3%
exp-to-pow22.3%
hypot-def22.3%
*-commutative22.3%
exp-prod20.1%
fma-def20.1%
hypot-def53.8%
*-commutative53.8%
Simplified53.8%
Taylor expanded in y.im around 0 42.5%
*-commutative42.5%
unpow242.5%
unpow242.5%
hypot-def40.8%
Simplified40.8%
Taylor expanded in x.im around 0 40.8%
Final simplification38.4%
(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 36.8%
exp-diff32.5%
+-rgt-identity32.5%
+-rgt-identity32.5%
exp-to-pow32.5%
hypot-def32.5%
*-commutative32.5%
exp-prod31.7%
fma-def31.7%
hypot-def64.6%
*-commutative64.6%
Simplified64.6%
Taylor expanded in y.im around 0 45.1%
*-commutative45.1%
unpow245.1%
unpow245.1%
hypot-def44.2%
Simplified44.2%
Taylor expanded in x.re around 0 35.7%
Final simplification35.7%
herbie shell --seed 2023208
(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)))))