
(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 16 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 (* (atan2 x.im x.re) y.im))
(t_2
(*
(sin (fma y.re (atan2 x.im x.re) (* (log (hypot x.re x.im)) y.im)))
(/ (pow (hypot x.re x.im) y.re) (+ t_1 1.0))))
(t_3 (/ (sin t_0) (pow (exp y.im) (atan2 x.im x.re))))
(t_4
(exp (- (* y.re (log (sqrt (+ (* x.re x.re) (* x.im x.im))))) t_1)))
(t_5 (* y.re (atan2 x.im x.re)))
(t_6 (* t_4 (sin (pow (cbrt t_5) 3.0)))))
(if (<= y.im -8.8e+192)
t_6
(if (<= y.im -1.05e+71)
t_3
(if (<= y.im -1.15e+17)
(* t_4 (sin t_5))
(if (<= y.im 4.2e-208)
t_2
(if (<= y.im 3.6e-173)
(* t_0 (pow (hypot x.im x.re) y.re))
(if (<= y.im 0.00016) t_2 (if (<= y.im 1.7e+189) t_6 t_3)))))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = y_46_im * log(hypot(x_46_im, x_46_re));
double t_1 = atan2(x_46_im, x_46_re) * y_46_im;
double t_2 = sin(fma(y_46_re, atan2(x_46_im, x_46_re), (log(hypot(x_46_re, x_46_im)) * y_46_im))) * (pow(hypot(x_46_re, x_46_im), y_46_re) / (t_1 + 1.0));
double t_3 = sin(t_0) / pow(exp(y_46_im), atan2(x_46_im, x_46_re));
double t_4 = exp(((y_46_re * log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))) - t_1));
double t_5 = y_46_re * atan2(x_46_im, x_46_re);
double t_6 = t_4 * sin(pow(cbrt(t_5), 3.0));
double tmp;
if (y_46_im <= -8.8e+192) {
tmp = t_6;
} else if (y_46_im <= -1.05e+71) {
tmp = t_3;
} else if (y_46_im <= -1.15e+17) {
tmp = t_4 * sin(t_5);
} else if (y_46_im <= 4.2e-208) {
tmp = t_2;
} else if (y_46_im <= 3.6e-173) {
tmp = t_0 * pow(hypot(x_46_im, x_46_re), y_46_re);
} else if (y_46_im <= 0.00016) {
tmp = t_2;
} else if (y_46_im <= 1.7e+189) {
tmp = t_6;
} else {
tmp = t_3;
}
return tmp;
}
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = Float64(y_46_im * log(hypot(x_46_im, x_46_re))) t_1 = Float64(atan(x_46_im, x_46_re) * y_46_im) t_2 = Float64(sin(fma(y_46_re, atan(x_46_im, x_46_re), Float64(log(hypot(x_46_re, x_46_im)) * y_46_im))) * Float64((hypot(x_46_re, x_46_im) ^ y_46_re) / Float64(t_1 + 1.0))) t_3 = Float64(sin(t_0) / (exp(y_46_im) ^ atan(x_46_im, x_46_re))) t_4 = exp(Float64(Float64(y_46_re * log(sqrt(Float64(Float64(x_46_re * x_46_re) + Float64(x_46_im * x_46_im))))) - t_1)) t_5 = Float64(y_46_re * atan(x_46_im, x_46_re)) t_6 = Float64(t_4 * sin((cbrt(t_5) ^ 3.0))) tmp = 0.0 if (y_46_im <= -8.8e+192) tmp = t_6; elseif (y_46_im <= -1.05e+71) tmp = t_3; elseif (y_46_im <= -1.15e+17) tmp = Float64(t_4 * sin(t_5)); elseif (y_46_im <= 4.2e-208) tmp = t_2; elseif (y_46_im <= 3.6e-173) tmp = Float64(t_0 * (hypot(x_46_im, x_46_re) ^ y_46_re)); elseif (y_46_im <= 0.00016) tmp = t_2; elseif (y_46_im <= 1.7e+189) tmp = t_6; 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[(y$46$im * N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$im), $MachinePrecision]}, Block[{t$95$2 = N[(N[Sin[N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision] + N[(N[Log[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision]], $MachinePrecision] * y$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(N[Power[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision], y$46$re], $MachinePrecision] / N[(t$95$1 + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[Sin[t$95$0], $MachinePrecision] / N[Power[N[Exp[y$46$im], $MachinePrecision], N[ArcTan[x$46$im / x$46$re], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[Exp[N[(N[(y$46$re * N[Log[N[Sqrt[N[(N[(x$46$re * x$46$re), $MachinePrecision] + N[(x$46$im * x$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$5 = N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$6 = N[(t$95$4 * N[Sin[N[Power[N[Power[t$95$5, 1/3], $MachinePrecision], 3.0], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y$46$im, -8.8e+192], t$95$6, If[LessEqual[y$46$im, -1.05e+71], t$95$3, If[LessEqual[y$46$im, -1.15e+17], N[(t$95$4 * N[Sin[t$95$5], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$im, 4.2e-208], t$95$2, If[LessEqual[y$46$im, 3.6e-173], 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$im, 0.00016], t$95$2, If[LessEqual[y$46$im, 1.7e+189], t$95$6, t$95$3]]]]]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\\
t_1 := \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im\\
t_2 := \sin \left(\mathsf{fma}\left(y.re, \tan^{-1}_* \frac{x.im}{x.re}, \log \left(\mathsf{hypot}\left(x.re, x.im\right)\right) \cdot y.im\right)\right) \cdot \frac{{\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re}}{t_1 + 1}\\
t_3 := \frac{\sin t_0}{{\left(e^{y.im}\right)}^{\tan^{-1}_* \frac{x.im}{x.re}}}\\
t_4 := e^{y.re \cdot \log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) - t_1}\\
t_5 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
t_6 := t_4 \cdot \sin \left({\left(\sqrt[3]{t_5}\right)}^{3}\right)\\
\mathbf{if}\;y.im \leq -8.8 \cdot 10^{+192}:\\
\;\;\;\;t_6\\
\mathbf{elif}\;y.im \leq -1.05 \cdot 10^{+71}:\\
\;\;\;\;t_3\\
\mathbf{elif}\;y.im \leq -1.15 \cdot 10^{+17}:\\
\;\;\;\;t_4 \cdot \sin t_5\\
\mathbf{elif}\;y.im \leq 4.2 \cdot 10^{-208}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;y.im \leq 3.6 \cdot 10^{-173}:\\
\;\;\;\;t_0 \cdot {\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re}\\
\mathbf{elif}\;y.im \leq 0.00016:\\
\;\;\;\;t_2\\
\mathbf{elif}\;y.im \leq 1.7 \cdot 10^{+189}:\\
\;\;\;\;t_6\\
\mathbf{else}:\\
\;\;\;\;t_3\\
\end{array}
\end{array}
if y.im < -8.8000000000000003e192 or 1.60000000000000013e-4 < y.im < 1.69999999999999992e189Initial program 34.5%
Taylor expanded in y.im around 0 65.9%
*-commutative65.9%
add-sqr-sqrt31.4%
unpow231.4%
add-cube-cbrt38.3%
pow338.3%
unpow238.3%
add-sqr-sqrt74.5%
*-commutative74.5%
Applied egg-rr74.5%
if -8.8000000000000003e192 < y.im < -1.04999999999999995e71 or 1.69999999999999992e189 < y.im Initial program 46.9%
exp-diff40.4%
exp-to-pow40.4%
hypot-def40.4%
*-commutative40.4%
exp-prod39.6%
+-commutative39.6%
*-commutative39.6%
fma-def39.6%
+-commutative39.6%
Simplified59.6%
hypot-udef39.6%
add-cube-cbrt39.3%
pow339.2%
*-commutative39.2%
hypot-udef57.6%
Applied egg-rr57.6%
Taylor expanded in y.re around 0 39.6%
pow-base-139.6%
associate-*r*39.6%
unpow239.6%
unpow239.6%
hypot-def59.6%
*-lft-identity59.6%
Simplified59.6%
Taylor expanded in y.re around 0 44.8%
unpow244.8%
unpow244.8%
hypot-def73.5%
*-commutative73.5%
exp-prod72.8%
Simplified72.8%
if -1.04999999999999995e71 < y.im < -1.15e17Initial program 29.9%
Taylor expanded in y.im around 0 71.7%
if -1.15e17 < y.im < 4.20000000000000024e-208 or 3.59999999999999972e-173 < y.im < 1.60000000000000013e-4Initial program 47.4%
exp-diff47.4%
exp-to-pow47.4%
hypot-def47.4%
*-commutative47.4%
exp-prod47.4%
+-commutative47.4%
*-commutative47.4%
fma-def47.4%
+-commutative47.4%
Simplified89.5%
Taylor expanded in y.im around 0 89.5%
if 4.20000000000000024e-208 < y.im < 3.59999999999999972e-173Initial program 27.3%
exp-diff27.3%
exp-to-pow27.3%
hypot-def27.3%
*-commutative27.3%
exp-prod27.3%
+-commutative27.3%
*-commutative27.3%
fma-def27.3%
+-commutative27.3%
Simplified54.5%
hypot-udef27.3%
add-cube-cbrt27.3%
pow327.3%
*-commutative27.3%
hypot-udef54.5%
Applied egg-rr54.5%
Taylor expanded in y.re around 0 37.1%
pow-base-137.1%
associate-*r*37.1%
unpow237.1%
unpow237.1%
hypot-def91.6%
*-lft-identity91.6%
Simplified91.6%
Taylor expanded in y.im around 0 82.5%
unpow282.5%
unpow282.5%
hypot-def82.5%
unpow282.5%
unpow282.5%
hypot-def91.6%
Simplified91.6%
Final simplification82.2%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (log (sqrt (+ (* x.re x.re) (* x.im x.im)))))
(t_1 (exp (- (* y.re t_0) (* (atan2 x.im x.re) y.im))))
(t_2 (* y.re (atan2 x.im x.re)))
(t_3 (* t_1 (sin (+ t_2 (* y.im t_0))))))
(if (<= t_3 -20.0)
(* t_1 (sin (pow (cbrt t_2) 3.0)))
(if (<= t_3 INFINITY)
t_3
(*
(pow (hypot x.re x.im) y.re)
(sin
(fma y.re (atan2 x.im x.re) (* (log (hypot x.re x.im)) y.im))))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))));
double t_1 = exp(((y_46_re * t_0) - (atan2(x_46_im, x_46_re) * y_46_im)));
double t_2 = y_46_re * atan2(x_46_im, x_46_re);
double t_3 = t_1 * sin((t_2 + (y_46_im * t_0)));
double tmp;
if (t_3 <= -20.0) {
tmp = t_1 * sin(pow(cbrt(t_2), 3.0));
} else if (t_3 <= ((double) INFINITY)) {
tmp = t_3;
} else {
tmp = pow(hypot(x_46_re, x_46_im), y_46_re) * sin(fma(y_46_re, atan2(x_46_im, x_46_re), (log(hypot(x_46_re, x_46_im)) * y_46_im)));
}
return tmp;
}
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = log(sqrt(Float64(Float64(x_46_re * x_46_re) + Float64(x_46_im * x_46_im)))) t_1 = exp(Float64(Float64(y_46_re * t_0) - Float64(atan(x_46_im, x_46_re) * y_46_im))) t_2 = Float64(y_46_re * atan(x_46_im, x_46_re)) t_3 = Float64(t_1 * sin(Float64(t_2 + Float64(y_46_im * t_0)))) tmp = 0.0 if (t_3 <= -20.0) tmp = Float64(t_1 * sin((cbrt(t_2) ^ 3.0))); elseif (t_3 <= Inf) tmp = t_3; else tmp = Float64((hypot(x_46_re, x_46_im) ^ y_46_re) * sin(fma(y_46_re, atan(x_46_im, x_46_re), Float64(log(hypot(x_46_re, x_46_im)) * y_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[Sqrt[N[(N[(x$46$re * x$46$re), $MachinePrecision] + N[(x$46$im * x$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]}, Block[{t$95$1 = N[Exp[N[(N[(y$46$re * t$95$0), $MachinePrecision] - N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$2 = N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(t$95$1 * N[Sin[N[(t$95$2 + N[(y$46$im * t$95$0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$3, -20.0], N[(t$95$1 * N[Sin[N[Power[N[Power[t$95$2, 1/3], $MachinePrecision], 3.0], $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$3, Infinity], t$95$3, N[(N[Power[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision], y$46$re], $MachinePrecision] * N[Sin[N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision] + N[(N[Log[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision]], $MachinePrecision] * y$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right)\\
t_1 := e^{y.re \cdot t_0 - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}\\
t_2 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
t_3 := t_1 \cdot \sin \left(t_2 + y.im \cdot t_0\right)\\
\mathbf{if}\;t_3 \leq -20:\\
\;\;\;\;t_1 \cdot \sin \left({\left(\sqrt[3]{t_2}\right)}^{3}\right)\\
\mathbf{elif}\;t_3 \leq \infty:\\
\;\;\;\;t_3\\
\mathbf{else}:\\
\;\;\;\;{\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re} \cdot \sin \left(\mathsf{fma}\left(y.re, \tan^{-1}_* \frac{x.im}{x.re}, \log \left(\mathsf{hypot}\left(x.re, x.im\right)\right) \cdot y.im\right)\right)\\
\end{array}
\end{array}
if (*.f64 (exp.f64 (-.f64 (*.f64 (log.f64 (sqrt.f64 (+.f64 (*.f64 x.re x.re) (*.f64 x.im x.im)))) y.re) (*.f64 (atan2.f64 x.im x.re) y.im))) (sin.f64 (+.f64 (*.f64 (log.f64 (sqrt.f64 (+.f64 (*.f64 x.re x.re) (*.f64 x.im x.im)))) y.im) (*.f64 (atan2.f64 x.im x.re) y.re)))) < -20Initial program 36.3%
Taylor expanded in y.im around 0 54.4%
*-commutative54.4%
add-sqr-sqrt27.3%
unpow227.3%
add-cube-cbrt27.3%
pow327.3%
unpow227.3%
add-sqr-sqrt72.6%
*-commutative72.6%
Applied egg-rr72.6%
if -20 < (*.f64 (exp.f64 (-.f64 (*.f64 (log.f64 (sqrt.f64 (+.f64 (*.f64 x.re x.re) (*.f64 x.im x.im)))) y.re) (*.f64 (atan2.f64 x.im x.re) y.im))) (sin.f64 (+.f64 (*.f64 (log.f64 (sqrt.f64 (+.f64 (*.f64 x.re x.re) (*.f64 x.im x.im)))) y.im) (*.f64 (atan2.f64 x.im x.re) y.re)))) < +inf.0Initial program 82.8%
if +inf.0 < (*.f64 (exp.f64 (-.f64 (*.f64 (log.f64 (sqrt.f64 (+.f64 (*.f64 x.re x.re) (*.f64 x.im x.im)))) y.re) (*.f64 (atan2.f64 x.im x.re) y.im))) (sin.f64 (+.f64 (*.f64 (log.f64 (sqrt.f64 (+.f64 (*.f64 x.re x.re) (*.f64 x.im x.im)))) y.im) (*.f64 (atan2.f64 x.im x.re) y.re)))) Initial program 0.0%
exp-diff0.0%
exp-to-pow0.0%
hypot-def0.0%
*-commutative0.0%
exp-prod0.0%
+-commutative0.0%
*-commutative0.0%
fma-def0.0%
+-commutative0.0%
Simplified69.7%
Taylor expanded in y.im around 0 66.3%
Final simplification74.7%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (log (hypot x.re x.im))))
(if (<= y.re 3.6e+118)
(*
(exp (- (* y.re t_0) (* (atan2 x.im x.re) y.im)))
(sin (fma t_0 y.im (* y.re (atan2 x.im x.re)))))
(* (pow (hypot x.re x.im) y.re) (sin (* y.im (log (hypot x.im x.re))))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = log(hypot(x_46_re, x_46_im));
double tmp;
if (y_46_re <= 3.6e+118) {
tmp = exp(((y_46_re * t_0) - (atan2(x_46_im, x_46_re) * y_46_im))) * sin(fma(t_0, y_46_im, (y_46_re * atan2(x_46_im, x_46_re))));
} else {
tmp = pow(hypot(x_46_re, x_46_im), y_46_re) * sin((y_46_im * log(hypot(x_46_im, x_46_re))));
}
return tmp;
}
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = log(hypot(x_46_re, x_46_im)) tmp = 0.0 if (y_46_re <= 3.6e+118) tmp = Float64(exp(Float64(Float64(y_46_re * t_0) - Float64(atan(x_46_im, x_46_re) * y_46_im))) * sin(fma(t_0, y_46_im, Float64(y_46_re * atan(x_46_im, x_46_re))))); else tmp = Float64((hypot(x_46_re, x_46_im) ^ y_46_re) * sin(Float64(y_46_im * log(hypot(x_46_im, x_46_re))))); end return tmp end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[Log[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision]], $MachinePrecision]}, If[LessEqual[y$46$re, 3.6e+118], N[(N[Exp[N[(N[(y$46$re * t$95$0), $MachinePrecision] - N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Sin[N[(t$95$0 * y$46$im + N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(N[Power[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision], y$46$re], $MachinePrecision] * N[Sin[N[(y$46$im * N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \log \left(\mathsf{hypot}\left(x.re, x.im\right)\right)\\
\mathbf{if}\;y.re \leq 3.6 \cdot 10^{+118}:\\
\;\;\;\;e^{y.re \cdot t_0 - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \sin \left(\mathsf{fma}\left(t_0, y.im, y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)\\
\mathbf{else}:\\
\;\;\;\;{\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re} \cdot \sin \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right)\\
\end{array}
\end{array}
if y.re < 3.6e118Initial program 44.4%
hypot-def44.4%
fma-def44.4%
hypot-def81.9%
*-commutative81.9%
Simplified81.9%
if 3.6e118 < y.re Initial program 30.3%
exp-diff21.2%
exp-to-pow21.2%
hypot-def21.2%
*-commutative21.2%
exp-prod21.2%
+-commutative21.2%
*-commutative21.2%
fma-def21.2%
+-commutative21.2%
Simplified42.4%
hypot-udef21.2%
add-cube-cbrt21.2%
pow321.2%
*-commutative21.2%
hypot-udef45.5%
Applied egg-rr45.5%
Taylor expanded in y.re around 0 30.3%
pow-base-130.3%
associate-*r*30.3%
unpow230.3%
unpow230.3%
hypot-def63.6%
*-lft-identity63.6%
Simplified63.6%
Taylor expanded in y.im around 0 78.8%
Final simplification81.5%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (pow (hypot x.re x.im) y.re))
(t_1 (* (atan2 x.im x.re) y.im))
(t_2 (* y.re (atan2 x.im x.re)))
(t_3
(sin (fma y.re (atan2 x.im x.re) (* (log (hypot x.re x.im)) y.im))))
(t_4
(exp (- (* y.re (log (sqrt (+ (* x.re x.re) (* x.im x.im))))) t_1)))
(t_5 (* y.im (log (hypot x.im x.re))))
(t_6 (sin t_5)))
(if (<= y.im -1.2e+17)
(* t_4 (sin t_2))
(if (<= y.im 4.2e-208)
(* t_3 (/ t_0 (+ t_1 1.0)))
(if (<= y.im 2.45e-173)
(* t_5 (pow (hypot x.im x.re) y.re))
(if (<= y.im 3.5e-15)
(* t_0 t_3)
(if (<= y.im 1.5e+224)
(* t_6 t_4)
(if (<= y.im 3.6e+273)
(* t_2 (exp (* (atan2 x.im x.re) (- y.im))))
(/ t_6 (pow (exp y.im) (atan2 x.im x.re)))))))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = pow(hypot(x_46_re, x_46_im), y_46_re);
double t_1 = atan2(x_46_im, x_46_re) * y_46_im;
double t_2 = y_46_re * atan2(x_46_im, x_46_re);
double t_3 = sin(fma(y_46_re, atan2(x_46_im, x_46_re), (log(hypot(x_46_re, x_46_im)) * y_46_im)));
double t_4 = exp(((y_46_re * log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))) - t_1));
double t_5 = y_46_im * log(hypot(x_46_im, x_46_re));
double t_6 = sin(t_5);
double tmp;
if (y_46_im <= -1.2e+17) {
tmp = t_4 * sin(t_2);
} else if (y_46_im <= 4.2e-208) {
tmp = t_3 * (t_0 / (t_1 + 1.0));
} else if (y_46_im <= 2.45e-173) {
tmp = t_5 * pow(hypot(x_46_im, x_46_re), y_46_re);
} else if (y_46_im <= 3.5e-15) {
tmp = t_0 * t_3;
} else if (y_46_im <= 1.5e+224) {
tmp = t_6 * t_4;
} else if (y_46_im <= 3.6e+273) {
tmp = t_2 * exp((atan2(x_46_im, x_46_re) * -y_46_im));
} else {
tmp = t_6 / pow(exp(y_46_im), 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 = hypot(x_46_re, x_46_im) ^ y_46_re t_1 = Float64(atan(x_46_im, x_46_re) * y_46_im) t_2 = Float64(y_46_re * atan(x_46_im, x_46_re)) t_3 = sin(fma(y_46_re, atan(x_46_im, x_46_re), Float64(log(hypot(x_46_re, x_46_im)) * y_46_im))) t_4 = exp(Float64(Float64(y_46_re * log(sqrt(Float64(Float64(x_46_re * x_46_re) + Float64(x_46_im * x_46_im))))) - t_1)) t_5 = Float64(y_46_im * log(hypot(x_46_im, x_46_re))) t_6 = sin(t_5) tmp = 0.0 if (y_46_im <= -1.2e+17) tmp = Float64(t_4 * sin(t_2)); elseif (y_46_im <= 4.2e-208) tmp = Float64(t_3 * Float64(t_0 / Float64(t_1 + 1.0))); elseif (y_46_im <= 2.45e-173) tmp = Float64(t_5 * (hypot(x_46_im, x_46_re) ^ y_46_re)); elseif (y_46_im <= 3.5e-15) tmp = Float64(t_0 * t_3); elseif (y_46_im <= 1.5e+224) tmp = Float64(t_6 * t_4); elseif (y_46_im <= 3.6e+273) tmp = Float64(t_2 * exp(Float64(atan(x_46_im, x_46_re) * Float64(-y_46_im)))); else tmp = Float64(t_6 / (exp(y_46_im) ^ atan(x_46_im, x_46_re))); end return tmp end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[Power[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision], y$46$re], $MachinePrecision]}, Block[{t$95$1 = N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$im), $MachinePrecision]}, Block[{t$95$2 = N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[Sin[N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision] + N[(N[Log[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision]], $MachinePrecision] * y$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$4 = N[Exp[N[(N[(y$46$re * N[Log[N[Sqrt[N[(N[(x$46$re * x$46$re), $MachinePrecision] + N[(x$46$im * x$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$5 = N[(y$46$im * N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$6 = N[Sin[t$95$5], $MachinePrecision]}, If[LessEqual[y$46$im, -1.2e+17], N[(t$95$4 * N[Sin[t$95$2], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$im, 4.2e-208], N[(t$95$3 * N[(t$95$0 / N[(t$95$1 + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$im, 2.45e-173], N[(t$95$5 * N[Power[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision], y$46$re], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$im, 3.5e-15], N[(t$95$0 * t$95$3), $MachinePrecision], If[LessEqual[y$46$im, 1.5e+224], N[(t$95$6 * t$95$4), $MachinePrecision], If[LessEqual[y$46$im, 3.6e+273], N[(t$95$2 * N[Exp[N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * (-y$46$im)), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(t$95$6 / N[Power[N[Exp[y$46$im], $MachinePrecision], N[ArcTan[x$46$im / x$46$re], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := {\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re}\\
t_1 := \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im\\
t_2 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
t_3 := \sin \left(\mathsf{fma}\left(y.re, \tan^{-1}_* \frac{x.im}{x.re}, \log \left(\mathsf{hypot}\left(x.re, x.im\right)\right) \cdot y.im\right)\right)\\
t_4 := e^{y.re \cdot \log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) - t_1}\\
t_5 := y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\\
t_6 := \sin t_5\\
\mathbf{if}\;y.im \leq -1.2 \cdot 10^{+17}:\\
\;\;\;\;t_4 \cdot \sin t_2\\
\mathbf{elif}\;y.im \leq 4.2 \cdot 10^{-208}:\\
\;\;\;\;t_3 \cdot \frac{t_0}{t_1 + 1}\\
\mathbf{elif}\;y.im \leq 2.45 \cdot 10^{-173}:\\
\;\;\;\;t_5 \cdot {\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re}\\
\mathbf{elif}\;y.im \leq 3.5 \cdot 10^{-15}:\\
\;\;\;\;t_0 \cdot t_3\\
\mathbf{elif}\;y.im \leq 1.5 \cdot 10^{+224}:\\
\;\;\;\;t_6 \cdot t_4\\
\mathbf{elif}\;y.im \leq 3.6 \cdot 10^{+273}:\\
\;\;\;\;t_2 \cdot e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot \left(-y.im\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{t_6}{{\left(e^{y.im}\right)}^{\tan^{-1}_* \frac{x.im}{x.re}}}\\
\end{array}
\end{array}
if y.im < -1.2e17Initial program 44.6%
Taylor expanded in y.im around 0 63.7%
if -1.2e17 < y.im < 4.20000000000000024e-208Initial program 47.6%
exp-diff47.6%
exp-to-pow47.6%
hypot-def47.6%
*-commutative47.6%
exp-prod47.6%
+-commutative47.6%
*-commutative47.6%
fma-def47.7%
+-commutative47.7%
Simplified88.6%
Taylor expanded in y.im around 0 88.6%
if 4.20000000000000024e-208 < y.im < 2.44999999999999996e-173Initial program 27.3%
exp-diff27.3%
exp-to-pow27.3%
hypot-def27.3%
*-commutative27.3%
exp-prod27.3%
+-commutative27.3%
*-commutative27.3%
fma-def27.3%
+-commutative27.3%
Simplified54.5%
hypot-udef27.3%
add-cube-cbrt27.3%
pow327.3%
*-commutative27.3%
hypot-udef54.5%
Applied egg-rr54.5%
Taylor expanded in y.re around 0 37.1%
pow-base-137.1%
associate-*r*37.1%
unpow237.1%
unpow237.1%
hypot-def91.6%
*-lft-identity91.6%
Simplified91.6%
Taylor expanded in y.im around 0 82.5%
unpow282.5%
unpow282.5%
hypot-def82.5%
unpow282.5%
unpow282.5%
hypot-def91.6%
Simplified91.6%
if 2.44999999999999996e-173 < y.im < 3.5000000000000001e-15Initial program 46.9%
exp-diff46.9%
exp-to-pow46.9%
hypot-def46.9%
*-commutative46.9%
exp-prod46.9%
+-commutative46.9%
*-commutative46.9%
fma-def46.9%
+-commutative46.9%
Simplified93.9%
Taylor expanded in y.im around 0 93.9%
if 3.5000000000000001e-15 < y.im < 1.5000000000000001e224Initial program 29.4%
add-sqr-sqrt16.4%
pow216.4%
Applied egg-rr16.4%
Taylor expanded in y.re around 0 29.4%
+-commutative29.4%
unpow229.4%
unpow229.4%
hypot-def65.8%
hypot-def29.4%
unpow229.4%
unpow229.4%
+-commutative29.4%
unpow229.4%
unpow229.4%
hypot-def65.8%
Simplified65.8%
if 1.5000000000000001e224 < y.im < 3.60000000000000024e273Initial program 26.5%
Taylor expanded in y.im around 0 59.0%
Taylor expanded in y.re around 0 42.3%
fma-def42.3%
cube-prod42.3%
*-commutative42.3%
*-commutative42.3%
Simplified42.3%
Taylor expanded in y.re around 0 75.3%
*-commutative75.3%
Simplified75.3%
if 3.60000000000000024e273 < y.im Initial program 83.3%
exp-diff50.0%
exp-to-pow50.0%
hypot-def50.0%
*-commutative50.0%
exp-prod50.0%
+-commutative50.0%
*-commutative50.0%
fma-def50.0%
+-commutative50.0%
Simplified66.7%
hypot-udef50.0%
add-cube-cbrt50.0%
pow350.0%
*-commutative50.0%
hypot-udef66.7%
Applied egg-rr66.7%
Taylor expanded in y.re around 0 50.0%
pow-base-150.0%
associate-*r*50.0%
unpow250.0%
unpow250.0%
hypot-def66.7%
*-lft-identity66.7%
Simplified66.7%
Taylor expanded in y.re around 0 83.3%
unpow283.3%
unpow283.3%
hypot-def100.0%
*-commutative100.0%
exp-prod100.0%
Simplified100.0%
Final simplification79.5%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (pow (hypot x.re x.im) y.re))
(t_1 (* y.im (log (hypot x.im x.re))))
(t_2 (sin t_1))
(t_3 (pow (exp y.im) (atan2 x.im x.re))))
(if (<= y.re -1080000000.0)
(* t_1 (pow (hypot x.im x.re) y.re))
(if (<= y.re -3.1e-145)
(* (sin (* y.re (atan2 x.im x.re))) (/ t_0 t_3))
(if (<= y.re 1.8e-141)
(/ t_2 t_3)
(if (<= y.re 520000000.0)
(*
t_0
(sin
(fma y.re (atan2 x.im x.re) (* (log (hypot x.re x.im)) y.im))))
(*
t_2
(exp
(-
(* y.re (log (sqrt (+ (* x.re x.re) (* x.im x.im)))))
(* (atan2 x.im x.re) y.im))))))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = pow(hypot(x_46_re, x_46_im), y_46_re);
double t_1 = y_46_im * log(hypot(x_46_im, x_46_re));
double t_2 = sin(t_1);
double t_3 = pow(exp(y_46_im), atan2(x_46_im, x_46_re));
double tmp;
if (y_46_re <= -1080000000.0) {
tmp = t_1 * pow(hypot(x_46_im, x_46_re), y_46_re);
} else if (y_46_re <= -3.1e-145) {
tmp = sin((y_46_re * atan2(x_46_im, x_46_re))) * (t_0 / t_3);
} else if (y_46_re <= 1.8e-141) {
tmp = t_2 / t_3;
} else if (y_46_re <= 520000000.0) {
tmp = t_0 * sin(fma(y_46_re, atan2(x_46_im, x_46_re), (log(hypot(x_46_re, x_46_im)) * y_46_im)));
} else {
tmp = t_2 * exp(((y_46_re * log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))) - (atan2(x_46_im, x_46_re) * y_46_im)));
}
return tmp;
}
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = hypot(x_46_re, x_46_im) ^ y_46_re t_1 = Float64(y_46_im * log(hypot(x_46_im, x_46_re))) t_2 = sin(t_1) t_3 = exp(y_46_im) ^ atan(x_46_im, x_46_re) tmp = 0.0 if (y_46_re <= -1080000000.0) tmp = Float64(t_1 * (hypot(x_46_im, x_46_re) ^ y_46_re)); elseif (y_46_re <= -3.1e-145) tmp = Float64(sin(Float64(y_46_re * atan(x_46_im, x_46_re))) * Float64(t_0 / t_3)); elseif (y_46_re <= 1.8e-141) tmp = Float64(t_2 / t_3); elseif (y_46_re <= 520000000.0) tmp = Float64(t_0 * sin(fma(y_46_re, atan(x_46_im, x_46_re), Float64(log(hypot(x_46_re, x_46_im)) * y_46_im)))); else tmp = Float64(t_2 * exp(Float64(Float64(y_46_re * log(sqrt(Float64(Float64(x_46_re * x_46_re) + Float64(x_46_im * x_46_im))))) - Float64(atan(x_46_im, x_46_re) * y_46_im)))); end return tmp end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[Power[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision], y$46$re], $MachinePrecision]}, Block[{t$95$1 = N[(y$46$im * N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[Sin[t$95$1], $MachinePrecision]}, Block[{t$95$3 = N[Power[N[Exp[y$46$im], $MachinePrecision], N[ArcTan[x$46$im / x$46$re], $MachinePrecision]], $MachinePrecision]}, If[LessEqual[y$46$re, -1080000000.0], N[(t$95$1 * N[Power[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision], y$46$re], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$re, -3.1e-145], N[(N[Sin[N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(t$95$0 / t$95$3), $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$re, 1.8e-141], N[(t$95$2 / t$95$3), $MachinePrecision], If[LessEqual[y$46$re, 520000000.0], N[(t$95$0 * N[Sin[N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision] + N[(N[Log[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision]], $MachinePrecision] * y$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(t$95$2 * N[Exp[N[(N[(y$46$re * N[Log[N[Sqrt[N[(N[(x$46$re * x$46$re), $MachinePrecision] + N[(x$46$im * x$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision] - N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := {\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re}\\
t_1 := y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\\
t_2 := \sin t_1\\
t_3 := {\left(e^{y.im}\right)}^{\tan^{-1}_* \frac{x.im}{x.re}}\\
\mathbf{if}\;y.re \leq -1080000000:\\
\;\;\;\;t_1 \cdot {\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re}\\
\mathbf{elif}\;y.re \leq -3.1 \cdot 10^{-145}:\\
\;\;\;\;\sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot \frac{t_0}{t_3}\\
\mathbf{elif}\;y.re \leq 1.8 \cdot 10^{-141}:\\
\;\;\;\;\frac{t_2}{t_3}\\
\mathbf{elif}\;y.re \leq 520000000:\\
\;\;\;\;t_0 \cdot \sin \left(\mathsf{fma}\left(y.re, \tan^{-1}_* \frac{x.im}{x.re}, \log \left(\mathsf{hypot}\left(x.re, x.im\right)\right) \cdot y.im\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t_2 \cdot e^{y.re \cdot \log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}\\
\end{array}
\end{array}
if y.re < -1.08e9Initial program 43.4%
exp-diff38.2%
exp-to-pow38.2%
hypot-def38.2%
*-commutative38.2%
exp-prod36.8%
+-commutative36.8%
*-commutative36.8%
fma-def36.8%
+-commutative36.8%
Simplified67.1%
hypot-udef36.8%
add-cube-cbrt36.8%
pow336.8%
*-commutative36.8%
hypot-udef65.8%
Applied egg-rr65.8%
Taylor expanded in y.re around 0 38.2%
pow-base-138.2%
associate-*r*38.2%
unpow238.2%
unpow238.2%
hypot-def64.5%
*-lft-identity64.5%
Simplified64.5%
Taylor expanded in y.im around 0 50.1%
unpow250.1%
unpow250.1%
hypot-def50.1%
unpow250.1%
unpow250.1%
hypot-def83.0%
Simplified83.0%
if -1.08e9 < y.re < -3.1e-145Initial program 38.2%
exp-diff38.2%
exp-to-pow38.3%
hypot-def38.3%
*-commutative38.3%
exp-prod37.8%
+-commutative37.8%
*-commutative37.8%
fma-def37.8%
+-commutative37.8%
Simplified79.8%
hypot-udef37.8%
add-cube-cbrt41.1%
pow341.1%
*-commutative41.1%
hypot-udef83.1%
Applied egg-rr83.1%
add-cube-cbrt83.0%
rem-cbrt-cube79.7%
rem-cbrt-cube79.7%
pow279.7%
rem-cbrt-cube83.0%
unpow383.0%
add-cube-cbrt79.7%
hypot-udef37.8%
+-commutative37.8%
hypot-def79.7%
Applied egg-rr83.1%
Taylor expanded in y.im around 0 76.6%
if -3.1e-145 < y.re < 1.80000000000000007e-141Initial program 52.8%
exp-diff52.8%
exp-to-pow52.8%
hypot-def52.8%
*-commutative52.8%
exp-prod52.6%
+-commutative52.6%
*-commutative52.6%
fma-def52.6%
+-commutative52.6%
Simplified83.5%
hypot-udef52.6%
add-cube-cbrt52.2%
pow352.2%
*-commutative52.2%
hypot-udef83.0%
Applied egg-rr83.0%
Taylor expanded in y.re around 0 45.9%
pow-base-145.9%
associate-*r*45.9%
unpow245.9%
unpow245.9%
hypot-def72.9%
*-lft-identity72.9%
Simplified72.9%
Taylor expanded in y.re around 0 46.1%
unpow246.1%
unpow246.1%
hypot-def73.1%
*-commutative73.1%
exp-prod72.9%
Simplified72.9%
if 1.80000000000000007e-141 < y.re < 5.2e8Initial program 36.2%
exp-diff36.2%
exp-to-pow36.2%
hypot-def36.2%
*-commutative36.2%
exp-prod35.6%
+-commutative35.6%
*-commutative35.6%
fma-def35.7%
+-commutative35.7%
Simplified82.1%
Taylor expanded in y.im around 0 75.9%
if 5.2e8 < y.re Initial program 35.1%
add-sqr-sqrt15.8%
pow215.8%
Applied egg-rr15.8%
Taylor expanded in y.re around 0 36.8%
+-commutative36.8%
unpow236.8%
unpow236.8%
hypot-def70.3%
hypot-def36.8%
unpow236.8%
unpow236.8%
+-commutative36.8%
unpow236.8%
unpow236.8%
hypot-def70.3%
Simplified70.3%
Final simplification76.1%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (pow (hypot x.re x.im) y.re))
(t_1 (* y.im (log (hypot x.im x.re))))
(t_2 (sin t_1))
(t_3 (pow (exp y.im) (atan2 x.im x.re)))
(t_4 (* (sin (* y.re (atan2 x.im x.re))) (/ t_0 t_3))))
(if (<= y.re -130000000.0)
(* t_1 (pow (hypot x.im x.re) y.re))
(if (<= y.re -9e-146)
t_4
(if (<= y.re 1.4e-147)
(/ t_2 t_3)
(if (<= y.re 2800000000.0) t_4 (* t_0 t_2)))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = pow(hypot(x_46_re, x_46_im), y_46_re);
double t_1 = y_46_im * log(hypot(x_46_im, x_46_re));
double t_2 = sin(t_1);
double t_3 = pow(exp(y_46_im), atan2(x_46_im, x_46_re));
double t_4 = sin((y_46_re * atan2(x_46_im, x_46_re))) * (t_0 / t_3);
double tmp;
if (y_46_re <= -130000000.0) {
tmp = t_1 * pow(hypot(x_46_im, x_46_re), y_46_re);
} else if (y_46_re <= -9e-146) {
tmp = t_4;
} else if (y_46_re <= 1.4e-147) {
tmp = t_2 / t_3;
} else if (y_46_re <= 2800000000.0) {
tmp = t_4;
} else {
tmp = t_0 * 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.pow(Math.hypot(x_46_re, x_46_im), y_46_re);
double t_1 = y_46_im * Math.log(Math.hypot(x_46_im, x_46_re));
double t_2 = Math.sin(t_1);
double t_3 = Math.pow(Math.exp(y_46_im), Math.atan2(x_46_im, x_46_re));
double t_4 = Math.sin((y_46_re * Math.atan2(x_46_im, x_46_re))) * (t_0 / t_3);
double tmp;
if (y_46_re <= -130000000.0) {
tmp = t_1 * Math.pow(Math.hypot(x_46_im, x_46_re), y_46_re);
} else if (y_46_re <= -9e-146) {
tmp = t_4;
} else if (y_46_re <= 1.4e-147) {
tmp = t_2 / t_3;
} else if (y_46_re <= 2800000000.0) {
tmp = t_4;
} else {
tmp = t_0 * t_2;
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): t_0 = math.pow(math.hypot(x_46_re, x_46_im), y_46_re) t_1 = y_46_im * math.log(math.hypot(x_46_im, x_46_re)) t_2 = math.sin(t_1) t_3 = math.pow(math.exp(y_46_im), math.atan2(x_46_im, x_46_re)) t_4 = math.sin((y_46_re * math.atan2(x_46_im, x_46_re))) * (t_0 / t_3) tmp = 0 if y_46_re <= -130000000.0: tmp = t_1 * math.pow(math.hypot(x_46_im, x_46_re), y_46_re) elif y_46_re <= -9e-146: tmp = t_4 elif y_46_re <= 1.4e-147: tmp = t_2 / t_3 elif y_46_re <= 2800000000.0: tmp = t_4 else: tmp = t_0 * t_2 return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = hypot(x_46_re, x_46_im) ^ y_46_re t_1 = Float64(y_46_im * log(hypot(x_46_im, x_46_re))) t_2 = sin(t_1) t_3 = exp(y_46_im) ^ atan(x_46_im, x_46_re) t_4 = Float64(sin(Float64(y_46_re * atan(x_46_im, x_46_re))) * Float64(t_0 / t_3)) tmp = 0.0 if (y_46_re <= -130000000.0) tmp = Float64(t_1 * (hypot(x_46_im, x_46_re) ^ y_46_re)); elseif (y_46_re <= -9e-146) tmp = t_4; elseif (y_46_re <= 1.4e-147) tmp = Float64(t_2 / t_3); elseif (y_46_re <= 2800000000.0) tmp = t_4; else tmp = Float64(t_0 * t_2); end return tmp end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = hypot(x_46_re, x_46_im) ^ y_46_re; t_1 = y_46_im * log(hypot(x_46_im, x_46_re)); t_2 = sin(t_1); t_3 = exp(y_46_im) ^ atan2(x_46_im, x_46_re); t_4 = sin((y_46_re * atan2(x_46_im, x_46_re))) * (t_0 / t_3); tmp = 0.0; if (y_46_re <= -130000000.0) tmp = t_1 * (hypot(x_46_im, x_46_re) ^ y_46_re); elseif (y_46_re <= -9e-146) tmp = t_4; elseif (y_46_re <= 1.4e-147) tmp = t_2 / t_3; elseif (y_46_re <= 2800000000.0) tmp = t_4; else tmp = t_0 * 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[Power[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision], y$46$re], $MachinePrecision]}, Block[{t$95$1 = N[(y$46$im * N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[Sin[t$95$1], $MachinePrecision]}, Block[{t$95$3 = N[Power[N[Exp[y$46$im], $MachinePrecision], N[ArcTan[x$46$im / x$46$re], $MachinePrecision]], $MachinePrecision]}, Block[{t$95$4 = N[(N[Sin[N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(t$95$0 / t$95$3), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y$46$re, -130000000.0], N[(t$95$1 * N[Power[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision], y$46$re], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$re, -9e-146], t$95$4, If[LessEqual[y$46$re, 1.4e-147], N[(t$95$2 / t$95$3), $MachinePrecision], If[LessEqual[y$46$re, 2800000000.0], t$95$4, N[(t$95$0 * t$95$2), $MachinePrecision]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := {\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re}\\
t_1 := y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\\
t_2 := \sin t_1\\
t_3 := {\left(e^{y.im}\right)}^{\tan^{-1}_* \frac{x.im}{x.re}}\\
t_4 := \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot \frac{t_0}{t_3}\\
\mathbf{if}\;y.re \leq -130000000:\\
\;\;\;\;t_1 \cdot {\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re}\\
\mathbf{elif}\;y.re \leq -9 \cdot 10^{-146}:\\
\;\;\;\;t_4\\
\mathbf{elif}\;y.re \leq 1.4 \cdot 10^{-147}:\\
\;\;\;\;\frac{t_2}{t_3}\\
\mathbf{elif}\;y.re \leq 2800000000:\\
\;\;\;\;t_4\\
\mathbf{else}:\\
\;\;\;\;t_0 \cdot t_2\\
\end{array}
\end{array}
if y.re < -1.3e8Initial program 43.4%
exp-diff38.2%
exp-to-pow38.2%
hypot-def38.2%
*-commutative38.2%
exp-prod36.8%
+-commutative36.8%
*-commutative36.8%
fma-def36.8%
+-commutative36.8%
Simplified67.1%
hypot-udef36.8%
add-cube-cbrt36.8%
pow336.8%
*-commutative36.8%
hypot-udef65.8%
Applied egg-rr65.8%
Taylor expanded in y.re around 0 38.2%
pow-base-138.2%
associate-*r*38.2%
unpow238.2%
unpow238.2%
hypot-def64.5%
*-lft-identity64.5%
Simplified64.5%
Taylor expanded in y.im around 0 50.1%
unpow250.1%
unpow250.1%
hypot-def50.1%
unpow250.1%
unpow250.1%
hypot-def83.0%
Simplified83.0%
if -1.3e8 < y.re < -9.0000000000000001e-146 or 1.4e-147 < y.re < 2.8e9Initial program 39.1%
exp-diff39.1%
exp-to-pow39.1%
hypot-def39.1%
*-commutative39.1%
exp-prod38.6%
+-commutative38.6%
*-commutative38.6%
fma-def38.6%
+-commutative38.6%
Simplified80.8%
hypot-udef38.6%
add-cube-cbrt41.7%
pow340.0%
*-commutative40.0%
hypot-udef82.1%
Applied egg-rr82.1%
add-cube-cbrt83.6%
rem-cbrt-cube82.0%
rem-cbrt-cube80.5%
pow280.5%
rem-cbrt-cube83.6%
unpow383.6%
add-cube-cbrt80.5%
hypot-udef38.5%
+-commutative38.5%
hypot-def80.5%
Applied egg-rr83.7%
Taylor expanded in y.im around 0 72.4%
if -9.0000000000000001e-146 < y.re < 1.4e-147Initial program 52.2%
exp-diff52.2%
exp-to-pow52.2%
hypot-def52.2%
*-commutative52.2%
exp-prod52.0%
+-commutative52.0%
*-commutative52.0%
fma-def52.0%
+-commutative52.0%
Simplified83.8%
hypot-udef52.0%
add-cube-cbrt49.8%
pow351.5%
*-commutative51.5%
hypot-udef83.3%
Applied egg-rr83.3%
Taylor expanded in y.re around 0 46.2%
pow-base-146.2%
associate-*r*46.2%
unpow246.2%
unpow246.2%
hypot-def73.9%
*-lft-identity73.9%
Simplified73.9%
Taylor expanded in y.re around 0 46.5%
unpow246.5%
unpow246.5%
hypot-def74.2%
*-commutative74.2%
exp-prod74.0%
Simplified74.0%
if 2.8e9 < y.re Initial program 35.1%
exp-diff26.3%
exp-to-pow26.3%
hypot-def26.3%
*-commutative26.3%
exp-prod24.6%
+-commutative24.6%
*-commutative24.6%
fma-def24.6%
+-commutative24.6%
Simplified42.1%
hypot-udef24.6%
add-cube-cbrt28.1%
pow328.1%
*-commutative28.1%
hypot-udef45.6%
Applied egg-rr45.6%
Taylor expanded in y.re around 0 28.1%
pow-base-128.1%
associate-*r*28.1%
unpow228.1%
unpow228.1%
hypot-def56.1%
*-lft-identity56.1%
Simplified56.1%
Taylor expanded in y.im around 0 66.9%
Final simplification74.7%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (* y.im (log (hypot x.im x.re))))
(t_1 (* y.re (atan2 x.im x.re)))
(t_2
(exp
(-
(* y.re (log (sqrt (+ (* x.re x.re) (* x.im x.im)))))
(* (atan2 x.im x.re) y.im))))
(t_3
(*
(pow (hypot x.re x.im) y.re)
(sin
(fma y.re (atan2 x.im x.re) (* (log (hypot x.re x.im)) y.im))))))
(if (<= y.im -1.15e+17)
(* t_2 (sin t_1))
(if (<= y.im 4.2e-208)
t_3
(if (<= y.im 2.45e-173)
(* t_0 (pow (hypot x.im x.re) y.re))
(if (<= y.im 0.00016)
t_3
(if (<= y.im 4.6e+148)
(* t_1 t_2)
(/ (sin t_0) (pow (exp y.im) (atan2 x.im x.re))))))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = y_46_im * log(hypot(x_46_im, x_46_re));
double t_1 = y_46_re * atan2(x_46_im, x_46_re);
double t_2 = exp(((y_46_re * log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))) - (atan2(x_46_im, x_46_re) * y_46_im)));
double t_3 = pow(hypot(x_46_re, x_46_im), y_46_re) * sin(fma(y_46_re, atan2(x_46_im, x_46_re), (log(hypot(x_46_re, x_46_im)) * y_46_im)));
double tmp;
if (y_46_im <= -1.15e+17) {
tmp = t_2 * sin(t_1);
} else if (y_46_im <= 4.2e-208) {
tmp = t_3;
} else if (y_46_im <= 2.45e-173) {
tmp = t_0 * pow(hypot(x_46_im, x_46_re), y_46_re);
} else if (y_46_im <= 0.00016) {
tmp = t_3;
} else if (y_46_im <= 4.6e+148) {
tmp = t_1 * t_2;
} else {
tmp = sin(t_0) / pow(exp(y_46_im), atan2(x_46_im, x_46_re));
}
return tmp;
}
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = Float64(y_46_im * log(hypot(x_46_im, x_46_re))) t_1 = Float64(y_46_re * atan(x_46_im, x_46_re)) t_2 = exp(Float64(Float64(y_46_re * log(sqrt(Float64(Float64(x_46_re * x_46_re) + Float64(x_46_im * x_46_im))))) - Float64(atan(x_46_im, x_46_re) * y_46_im))) t_3 = Float64((hypot(x_46_re, x_46_im) ^ y_46_re) * sin(fma(y_46_re, atan(x_46_im, x_46_re), Float64(log(hypot(x_46_re, x_46_im)) * y_46_im)))) tmp = 0.0 if (y_46_im <= -1.15e+17) tmp = Float64(t_2 * sin(t_1)); elseif (y_46_im <= 4.2e-208) tmp = t_3; elseif (y_46_im <= 2.45e-173) tmp = Float64(t_0 * (hypot(x_46_im, x_46_re) ^ y_46_re)); elseif (y_46_im <= 0.00016) tmp = t_3; elseif (y_46_im <= 4.6e+148) tmp = Float64(t_1 * t_2); else tmp = Float64(sin(t_0) / (exp(y_46_im) ^ atan(x_46_im, x_46_re))); end return tmp end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[(y$46$im * N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[Exp[N[(N[(y$46$re * N[Log[N[Sqrt[N[(N[(x$46$re * x$46$re), $MachinePrecision] + N[(x$46$im * x$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision] - N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$3 = N[(N[Power[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision], y$46$re], $MachinePrecision] * N[Sin[N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision] + N[(N[Log[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision]], $MachinePrecision] * y$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y$46$im, -1.15e+17], N[(t$95$2 * N[Sin[t$95$1], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$im, 4.2e-208], t$95$3, If[LessEqual[y$46$im, 2.45e-173], 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$im, 0.00016], t$95$3, If[LessEqual[y$46$im, 4.6e+148], N[(t$95$1 * t$95$2), $MachinePrecision], N[(N[Sin[t$95$0], $MachinePrecision] / N[Power[N[Exp[y$46$im], $MachinePrecision], N[ArcTan[x$46$im / x$46$re], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\\
t_1 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
t_2 := e^{y.re \cdot \log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}\\
t_3 := {\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re} \cdot \sin \left(\mathsf{fma}\left(y.re, \tan^{-1}_* \frac{x.im}{x.re}, \log \left(\mathsf{hypot}\left(x.re, x.im\right)\right) \cdot y.im\right)\right)\\
\mathbf{if}\;y.im \leq -1.15 \cdot 10^{+17}:\\
\;\;\;\;t_2 \cdot \sin t_1\\
\mathbf{elif}\;y.im \leq 4.2 \cdot 10^{-208}:\\
\;\;\;\;t_3\\
\mathbf{elif}\;y.im \leq 2.45 \cdot 10^{-173}:\\
\;\;\;\;t_0 \cdot {\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re}\\
\mathbf{elif}\;y.im \leq 0.00016:\\
\;\;\;\;t_3\\
\mathbf{elif}\;y.im \leq 4.6 \cdot 10^{+148}:\\
\;\;\;\;t_1 \cdot t_2\\
\mathbf{else}:\\
\;\;\;\;\frac{\sin t_0}{{\left(e^{y.im}\right)}^{\tan^{-1}_* \frac{x.im}{x.re}}}\\
\end{array}
\end{array}
if y.im < -1.15e17Initial program 44.6%
Taylor expanded in y.im around 0 63.7%
if -1.15e17 < y.im < 4.20000000000000024e-208 or 2.44999999999999996e-173 < y.im < 1.60000000000000013e-4Initial program 47.4%
exp-diff47.4%
exp-to-pow47.4%
hypot-def47.4%
*-commutative47.4%
exp-prod47.4%
+-commutative47.4%
*-commutative47.4%
fma-def47.4%
+-commutative47.4%
Simplified89.5%
Taylor expanded in y.im around 0 87.9%
if 4.20000000000000024e-208 < y.im < 2.44999999999999996e-173Initial program 27.3%
exp-diff27.3%
exp-to-pow27.3%
hypot-def27.3%
*-commutative27.3%
exp-prod27.3%
+-commutative27.3%
*-commutative27.3%
fma-def27.3%
+-commutative27.3%
Simplified54.5%
hypot-udef27.3%
add-cube-cbrt27.3%
pow327.3%
*-commutative27.3%
hypot-udef54.5%
Applied egg-rr54.5%
Taylor expanded in y.re around 0 37.1%
pow-base-137.1%
associate-*r*37.1%
unpow237.1%
unpow237.1%
hypot-def91.6%
*-lft-identity91.6%
Simplified91.6%
Taylor expanded in y.im around 0 82.5%
unpow282.5%
unpow282.5%
hypot-def82.5%
unpow282.5%
unpow282.5%
hypot-def91.6%
Simplified91.6%
if 1.60000000000000013e-4 < y.im < 4.6000000000000001e148Initial program 29.1%
Taylor expanded in y.im around 0 64.9%
Taylor expanded in y.re around 0 68.1%
*-commutative68.1%
Simplified68.1%
if 4.6000000000000001e148 < y.im Initial program 37.9%
exp-diff31.2%
exp-to-pow31.2%
hypot-def31.2%
*-commutative31.2%
exp-prod30.7%
+-commutative30.7%
*-commutative30.7%
fma-def30.7%
+-commutative30.7%
Simplified50.7%
hypot-udef30.7%
add-cube-cbrt26.8%
pow326.8%
*-commutative26.8%
hypot-udef46.8%
Applied egg-rr46.8%
Taylor expanded in y.re around 0 30.7%
pow-base-130.7%
associate-*r*30.7%
unpow230.7%
unpow230.7%
hypot-def50.7%
*-lft-identity50.7%
Simplified50.7%
Taylor expanded in y.re around 0 37.9%
unpow237.9%
unpow237.9%
hypot-def68.1%
*-commutative68.1%
exp-prod67.6%
Simplified67.6%
Final simplification77.9%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (* y.re (atan2 x.im x.re)))
(t_1 (* t_0 (exp (* (atan2 x.im x.re) (- y.im)))))
(t_2 (pow (hypot x.re x.im) y.re))
(t_3 (* y.im (log (hypot x.im x.re))))
(t_4 (sin t_3)))
(if (<= y.re -470000.0)
(* t_3 (pow (hypot x.im x.re) y.re))
(if (<= y.re -1.3e-145)
t_1
(if (<= y.re 1.3e-146)
(/ t_4 (pow (exp y.im) (atan2 x.im x.re)))
(if (<= y.re 3.9e-52)
t_1
(if (<= y.re 6000000000.0)
(* t_2 (sin t_0))
(if (<= y.re 9.5e+26) t_1 (* t_2 t_4)))))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = y_46_re * atan2(x_46_im, x_46_re);
double t_1 = t_0 * exp((atan2(x_46_im, x_46_re) * -y_46_im));
double t_2 = pow(hypot(x_46_re, x_46_im), y_46_re);
double t_3 = y_46_im * log(hypot(x_46_im, x_46_re));
double t_4 = sin(t_3);
double tmp;
if (y_46_re <= -470000.0) {
tmp = t_3 * pow(hypot(x_46_im, x_46_re), y_46_re);
} else if (y_46_re <= -1.3e-145) {
tmp = t_1;
} else if (y_46_re <= 1.3e-146) {
tmp = t_4 / pow(exp(y_46_im), atan2(x_46_im, x_46_re));
} else if (y_46_re <= 3.9e-52) {
tmp = t_1;
} else if (y_46_re <= 6000000000.0) {
tmp = t_2 * sin(t_0);
} else if (y_46_re <= 9.5e+26) {
tmp = t_1;
} else {
tmp = t_2 * t_4;
}
return tmp;
}
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = y_46_re * Math.atan2(x_46_im, x_46_re);
double t_1 = t_0 * Math.exp((Math.atan2(x_46_im, x_46_re) * -y_46_im));
double t_2 = Math.pow(Math.hypot(x_46_re, x_46_im), y_46_re);
double t_3 = y_46_im * Math.log(Math.hypot(x_46_im, x_46_re));
double t_4 = Math.sin(t_3);
double tmp;
if (y_46_re <= -470000.0) {
tmp = t_3 * Math.pow(Math.hypot(x_46_im, x_46_re), y_46_re);
} else if (y_46_re <= -1.3e-145) {
tmp = t_1;
} else if (y_46_re <= 1.3e-146) {
tmp = t_4 / Math.pow(Math.exp(y_46_im), Math.atan2(x_46_im, x_46_re));
} else if (y_46_re <= 3.9e-52) {
tmp = t_1;
} else if (y_46_re <= 6000000000.0) {
tmp = t_2 * Math.sin(t_0);
} else if (y_46_re <= 9.5e+26) {
tmp = t_1;
} else {
tmp = t_2 * t_4;
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): t_0 = y_46_re * math.atan2(x_46_im, x_46_re) t_1 = t_0 * math.exp((math.atan2(x_46_im, x_46_re) * -y_46_im)) t_2 = math.pow(math.hypot(x_46_re, x_46_im), y_46_re) t_3 = y_46_im * math.log(math.hypot(x_46_im, x_46_re)) t_4 = math.sin(t_3) tmp = 0 if y_46_re <= -470000.0: tmp = t_3 * math.pow(math.hypot(x_46_im, x_46_re), y_46_re) elif y_46_re <= -1.3e-145: tmp = t_1 elif y_46_re <= 1.3e-146: tmp = t_4 / math.pow(math.exp(y_46_im), math.atan2(x_46_im, x_46_re)) elif y_46_re <= 3.9e-52: tmp = t_1 elif y_46_re <= 6000000000.0: tmp = t_2 * math.sin(t_0) elif y_46_re <= 9.5e+26: tmp = t_1 else: tmp = t_2 * t_4 return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = Float64(y_46_re * atan(x_46_im, x_46_re)) t_1 = Float64(t_0 * exp(Float64(atan(x_46_im, x_46_re) * Float64(-y_46_im)))) t_2 = hypot(x_46_re, x_46_im) ^ y_46_re t_3 = Float64(y_46_im * log(hypot(x_46_im, x_46_re))) t_4 = sin(t_3) tmp = 0.0 if (y_46_re <= -470000.0) tmp = Float64(t_3 * (hypot(x_46_im, x_46_re) ^ y_46_re)); elseif (y_46_re <= -1.3e-145) tmp = t_1; elseif (y_46_re <= 1.3e-146) tmp = Float64(t_4 / (exp(y_46_im) ^ atan(x_46_im, x_46_re))); elseif (y_46_re <= 3.9e-52) tmp = t_1; elseif (y_46_re <= 6000000000.0) tmp = Float64(t_2 * sin(t_0)); elseif (y_46_re <= 9.5e+26) tmp = t_1; else tmp = Float64(t_2 * t_4); end return tmp end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = y_46_re * atan2(x_46_im, x_46_re); t_1 = t_0 * exp((atan2(x_46_im, x_46_re) * -y_46_im)); t_2 = hypot(x_46_re, x_46_im) ^ y_46_re; t_3 = y_46_im * log(hypot(x_46_im, x_46_re)); t_4 = sin(t_3); tmp = 0.0; if (y_46_re <= -470000.0) tmp = t_3 * (hypot(x_46_im, x_46_re) ^ y_46_re); elseif (y_46_re <= -1.3e-145) tmp = t_1; elseif (y_46_re <= 1.3e-146) tmp = t_4 / (exp(y_46_im) ^ atan2(x_46_im, x_46_re)); elseif (y_46_re <= 3.9e-52) tmp = t_1; elseif (y_46_re <= 6000000000.0) tmp = t_2 * sin(t_0); elseif (y_46_re <= 9.5e+26) tmp = t_1; else tmp = t_2 * t_4; end tmp_2 = tmp; end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(t$95$0 * N[Exp[N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * (-y$46$im)), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[Power[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision], y$46$re], $MachinePrecision]}, Block[{t$95$3 = N[(y$46$im * N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[Sin[t$95$3], $MachinePrecision]}, If[LessEqual[y$46$re, -470000.0], 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$re, -1.3e-145], t$95$1, If[LessEqual[y$46$re, 1.3e-146], N[(t$95$4 / N[Power[N[Exp[y$46$im], $MachinePrecision], N[ArcTan[x$46$im / x$46$re], $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$re, 3.9e-52], t$95$1, If[LessEqual[y$46$re, 6000000000.0], N[(t$95$2 * N[Sin[t$95$0], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$re, 9.5e+26], t$95$1, N[(t$95$2 * t$95$4), $MachinePrecision]]]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
t_1 := t_0 \cdot e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot \left(-y.im\right)}\\
t_2 := {\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re}\\
t_3 := y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\\
t_4 := \sin t_3\\
\mathbf{if}\;y.re \leq -470000:\\
\;\;\;\;t_3 \cdot {\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re}\\
\mathbf{elif}\;y.re \leq -1.3 \cdot 10^{-145}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y.re \leq 1.3 \cdot 10^{-146}:\\
\;\;\;\;\frac{t_4}{{\left(e^{y.im}\right)}^{\tan^{-1}_* \frac{x.im}{x.re}}}\\
\mathbf{elif}\;y.re \leq 3.9 \cdot 10^{-52}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y.re \leq 6000000000:\\
\;\;\;\;t_2 \cdot \sin t_0\\
\mathbf{elif}\;y.re \leq 9.5 \cdot 10^{+26}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;t_2 \cdot t_4\\
\end{array}
\end{array}
if y.re < -4.7e5Initial program 44.2%
exp-diff39.0%
exp-to-pow39.0%
hypot-def39.0%
*-commutative39.0%
exp-prod37.7%
+-commutative37.7%
*-commutative37.7%
fma-def37.7%
+-commutative37.7%
Simplified67.5%
hypot-udef37.7%
add-cube-cbrt37.7%
pow337.7%
*-commutative37.7%
hypot-udef66.2%
Applied egg-rr66.2%
Taylor expanded in y.re around 0 39.0%
pow-base-139.0%
associate-*r*39.0%
unpow239.0%
unpow239.0%
hypot-def64.9%
*-lft-identity64.9%
Simplified64.9%
Taylor expanded in y.im around 0 50.7%
unpow250.7%
unpow250.7%
hypot-def50.7%
unpow250.7%
unpow250.7%
hypot-def83.2%
Simplified83.2%
if -4.7e5 < y.re < -1.3e-145 or 1.29999999999999993e-146 < y.re < 3.90000000000000018e-52 or 6e9 < y.re < 9.50000000000000054e26Initial program 39.0%
Taylor expanded in y.im around 0 52.7%
Taylor expanded in y.re around 0 51.7%
fma-def51.7%
cube-prod51.7%
*-commutative51.7%
*-commutative51.7%
Simplified51.7%
Taylor expanded in y.re around 0 72.4%
*-commutative72.4%
Simplified72.4%
if -1.3e-145 < y.re < 1.29999999999999993e-146Initial program 52.2%
exp-diff52.2%
exp-to-pow52.2%
hypot-def52.2%
*-commutative52.2%
exp-prod52.0%
+-commutative52.0%
*-commutative52.0%
fma-def52.0%
+-commutative52.0%
Simplified83.8%
hypot-udef52.0%
add-cube-cbrt49.8%
pow351.5%
*-commutative51.5%
hypot-udef83.3%
Applied egg-rr83.3%
Taylor expanded in y.re around 0 46.2%
pow-base-146.2%
associate-*r*46.2%
unpow246.2%
unpow246.2%
hypot-def73.9%
*-lft-identity73.9%
Simplified73.9%
Taylor expanded in y.re around 0 46.5%
unpow246.5%
unpow246.5%
hypot-def74.2%
*-commutative74.2%
exp-prod74.0%
Simplified74.0%
if 3.90000000000000018e-52 < y.re < 6e9Initial program 38.1%
exp-diff38.1%
exp-to-pow38.1%
hypot-def38.1%
*-commutative38.1%
exp-prod38.1%
+-commutative38.1%
*-commutative38.1%
fma-def38.1%
+-commutative38.1%
Simplified99.6%
hypot-udef38.1%
add-cube-cbrt37.8%
pow337.7%
*-commutative37.7%
hypot-udef98.9%
Applied egg-rr98.9%
add-cube-cbrt98.8%
rem-cbrt-cube98.8%
rem-cbrt-cube98.9%
pow298.9%
rem-cbrt-cube98.8%
unpow398.8%
add-cube-cbrt98.9%
hypot-udef37.7%
+-commutative37.7%
hypot-def98.9%
Applied egg-rr98.9%
Taylor expanded in y.im around 0 91.5%
Taylor expanded in y.im around 0 63.2%
if 9.50000000000000054e26 < y.re Initial program 34.0%
exp-diff28.3%
exp-to-pow28.3%
hypot-def28.3%
*-commutative28.3%
exp-prod26.4%
+-commutative26.4%
*-commutative26.4%
fma-def26.4%
+-commutative26.4%
Simplified45.3%
hypot-udef26.4%
add-cube-cbrt30.2%
pow330.2%
*-commutative30.2%
hypot-udef49.1%
Applied egg-rr49.1%
Taylor expanded in y.re around 0 30.2%
pow-base-130.2%
associate-*r*30.2%
unpow230.2%
unpow230.2%
hypot-def60.4%
*-lft-identity60.4%
Simplified60.4%
Taylor expanded in y.im around 0 71.8%
Final simplification75.4%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (* y.re (atan2 x.im x.re)))
(t_1
(*
t_0
(exp
(-
(* y.re (log (sqrt (+ (* x.re x.re) (* x.im x.im)))))
(* (atan2 x.im x.re) y.im)))))
(t_2 (pow (hypot x.re x.im) y.re))
(t_3 (* y.im (log (hypot x.im x.re))))
(t_4 (* t_2 (sin t_3))))
(if (<= y.im -1.15e+17)
t_1
(if (<= y.im -2.25e-212)
t_4
(if (<= y.im 2.1e-208)
(* t_2 (sin t_0))
(if (<= y.im 7e-28)
(* t_3 (pow (hypot x.im x.re) y.re))
(if (<= y.im 1.8e+135)
t_1
(if (<= y.im 6.6e+222)
t_4
(* t_0 (exp (* (atan2 x.im x.re) (- y.im))))))))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = y_46_re * atan2(x_46_im, x_46_re);
double t_1 = t_0 * exp(((y_46_re * log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))) - (atan2(x_46_im, x_46_re) * y_46_im)));
double t_2 = pow(hypot(x_46_re, x_46_im), y_46_re);
double t_3 = y_46_im * log(hypot(x_46_im, x_46_re));
double t_4 = t_2 * sin(t_3);
double tmp;
if (y_46_im <= -1.15e+17) {
tmp = t_1;
} else if (y_46_im <= -2.25e-212) {
tmp = t_4;
} else if (y_46_im <= 2.1e-208) {
tmp = t_2 * sin(t_0);
} else if (y_46_im <= 7e-28) {
tmp = t_3 * pow(hypot(x_46_im, x_46_re), y_46_re);
} else if (y_46_im <= 1.8e+135) {
tmp = t_1;
} else if (y_46_im <= 6.6e+222) {
tmp = t_4;
} else {
tmp = t_0 * exp((atan2(x_46_im, x_46_re) * -y_46_im));
}
return tmp;
}
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = y_46_re * Math.atan2(x_46_im, x_46_re);
double t_1 = t_0 * Math.exp(((y_46_re * Math.log(Math.sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))) - (Math.atan2(x_46_im, x_46_re) * y_46_im)));
double t_2 = Math.pow(Math.hypot(x_46_re, x_46_im), y_46_re);
double t_3 = y_46_im * Math.log(Math.hypot(x_46_im, x_46_re));
double t_4 = t_2 * Math.sin(t_3);
double tmp;
if (y_46_im <= -1.15e+17) {
tmp = t_1;
} else if (y_46_im <= -2.25e-212) {
tmp = t_4;
} else if (y_46_im <= 2.1e-208) {
tmp = t_2 * Math.sin(t_0);
} else if (y_46_im <= 7e-28) {
tmp = t_3 * Math.pow(Math.hypot(x_46_im, x_46_re), y_46_re);
} else if (y_46_im <= 1.8e+135) {
tmp = t_1;
} else if (y_46_im <= 6.6e+222) {
tmp = t_4;
} else {
tmp = t_0 * Math.exp((Math.atan2(x_46_im, x_46_re) * -y_46_im));
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): t_0 = y_46_re * math.atan2(x_46_im, x_46_re) t_1 = t_0 * math.exp(((y_46_re * math.log(math.sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))) - (math.atan2(x_46_im, x_46_re) * y_46_im))) t_2 = math.pow(math.hypot(x_46_re, x_46_im), y_46_re) t_3 = y_46_im * math.log(math.hypot(x_46_im, x_46_re)) t_4 = t_2 * math.sin(t_3) tmp = 0 if y_46_im <= -1.15e+17: tmp = t_1 elif y_46_im <= -2.25e-212: tmp = t_4 elif y_46_im <= 2.1e-208: tmp = t_2 * math.sin(t_0) elif y_46_im <= 7e-28: tmp = t_3 * math.pow(math.hypot(x_46_im, x_46_re), y_46_re) elif y_46_im <= 1.8e+135: tmp = t_1 elif y_46_im <= 6.6e+222: tmp = t_4 else: tmp = t_0 * math.exp((math.atan2(x_46_im, x_46_re) * -y_46_im)) return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = Float64(y_46_re * atan(x_46_im, x_46_re)) t_1 = Float64(t_0 * exp(Float64(Float64(y_46_re * log(sqrt(Float64(Float64(x_46_re * x_46_re) + Float64(x_46_im * x_46_im))))) - Float64(atan(x_46_im, x_46_re) * y_46_im)))) t_2 = hypot(x_46_re, x_46_im) ^ y_46_re t_3 = Float64(y_46_im * log(hypot(x_46_im, x_46_re))) t_4 = Float64(t_2 * sin(t_3)) tmp = 0.0 if (y_46_im <= -1.15e+17) tmp = t_1; elseif (y_46_im <= -2.25e-212) tmp = t_4; elseif (y_46_im <= 2.1e-208) tmp = Float64(t_2 * sin(t_0)); elseif (y_46_im <= 7e-28) tmp = Float64(t_3 * (hypot(x_46_im, x_46_re) ^ y_46_re)); elseif (y_46_im <= 1.8e+135) tmp = t_1; elseif (y_46_im <= 6.6e+222) tmp = t_4; else tmp = Float64(t_0 * exp(Float64(atan(x_46_im, x_46_re) * Float64(-y_46_im)))); end return tmp end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = y_46_re * atan2(x_46_im, x_46_re); t_1 = t_0 * exp(((y_46_re * log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))) - (atan2(x_46_im, x_46_re) * y_46_im))); t_2 = hypot(x_46_re, x_46_im) ^ y_46_re; t_3 = y_46_im * log(hypot(x_46_im, x_46_re)); t_4 = t_2 * sin(t_3); tmp = 0.0; if (y_46_im <= -1.15e+17) tmp = t_1; elseif (y_46_im <= -2.25e-212) tmp = t_4; elseif (y_46_im <= 2.1e-208) tmp = t_2 * sin(t_0); elseif (y_46_im <= 7e-28) tmp = t_3 * (hypot(x_46_im, x_46_re) ^ y_46_re); elseif (y_46_im <= 1.8e+135) tmp = t_1; elseif (y_46_im <= 6.6e+222) tmp = t_4; else tmp = t_0 * exp((atan2(x_46_im, x_46_re) * -y_46_im)); end tmp_2 = tmp; end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(t$95$0 * N[Exp[N[(N[(y$46$re * N[Log[N[Sqrt[N[(N[(x$46$re * x$46$re), $MachinePrecision] + N[(x$46$im * x$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision] - N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[Power[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision], y$46$re], $MachinePrecision]}, Block[{t$95$3 = N[(y$46$im * N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[(t$95$2 * N[Sin[t$95$3], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y$46$im, -1.15e+17], t$95$1, If[LessEqual[y$46$im, -2.25e-212], t$95$4, If[LessEqual[y$46$im, 2.1e-208], N[(t$95$2 * N[Sin[t$95$0], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$im, 7e-28], 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.8e+135], t$95$1, If[LessEqual[y$46$im, 6.6e+222], t$95$4, N[(t$95$0 * N[Exp[N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * (-y$46$im)), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
t_1 := t_0 \cdot e^{y.re \cdot \log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}\\
t_2 := {\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re}\\
t_3 := y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\\
t_4 := t_2 \cdot \sin t_3\\
\mathbf{if}\;y.im \leq -1.15 \cdot 10^{+17}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y.im \leq -2.25 \cdot 10^{-212}:\\
\;\;\;\;t_4\\
\mathbf{elif}\;y.im \leq 2.1 \cdot 10^{-208}:\\
\;\;\;\;t_2 \cdot \sin t_0\\
\mathbf{elif}\;y.im \leq 7 \cdot 10^{-28}:\\
\;\;\;\;t_3 \cdot {\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re}\\
\mathbf{elif}\;y.im \leq 1.8 \cdot 10^{+135}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y.im \leq 6.6 \cdot 10^{+222}:\\
\;\;\;\;t_4\\
\mathbf{else}:\\
\;\;\;\;t_0 \cdot e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot \left(-y.im\right)}\\
\end{array}
\end{array}
if y.im < -1.15e17 or 6.9999999999999999e-28 < y.im < 1.7999999999999999e135Initial program 39.3%
Taylor expanded in y.im around 0 63.2%
Taylor expanded in y.re around 0 63.6%
*-commutative63.6%
Simplified63.6%
if -1.15e17 < y.im < -2.2499999999999999e-212 or 1.7999999999999999e135 < y.im < 6.59999999999999967e222Initial program 40.2%
exp-diff38.6%
exp-to-pow38.6%
hypot-def38.6%
*-commutative38.6%
exp-prod38.4%
+-commutative38.4%
*-commutative38.4%
fma-def38.4%
+-commutative38.4%
Simplified78.2%
hypot-udef38.4%
add-cube-cbrt36.6%
pow336.5%
*-commutative36.5%
hypot-udef74.6%
Applied egg-rr74.6%
Taylor expanded in y.re around 0 38.6%
pow-base-138.6%
associate-*r*38.6%
unpow238.6%
unpow238.6%
hypot-def74.6%
*-lft-identity74.6%
Simplified74.6%
Taylor expanded in y.im around 0 76.2%
if -2.2499999999999999e-212 < y.im < 2.10000000000000012e-208Initial program 54.8%
exp-diff54.8%
exp-to-pow54.8%
hypot-def54.8%
*-commutative54.8%
exp-prod54.8%
+-commutative54.8%
*-commutative54.8%
fma-def54.9%
+-commutative54.9%
Simplified92.3%
hypot-udef54.9%
add-cube-cbrt54.7%
pow354.7%
*-commutative54.7%
hypot-udef92.0%
Applied egg-rr92.0%
add-cube-cbrt91.9%
rem-cbrt-cube91.9%
rem-cbrt-cube91.9%
pow291.9%
rem-cbrt-cube91.9%
unpow391.9%
add-cube-cbrt91.9%
hypot-udef54.6%
+-commutative54.6%
hypot-def91.9%
Applied egg-rr92.0%
Taylor expanded in y.im around 0 92.0%
Taylor expanded in y.im around 0 79.3%
if 2.10000000000000012e-208 < y.im < 6.9999999999999999e-28Initial program 40.3%
exp-diff40.3%
exp-to-pow40.4%
hypot-def40.4%
*-commutative40.4%
exp-prod40.4%
+-commutative40.4%
*-commutative40.4%
fma-def40.4%
+-commutative40.4%
Simplified83.2%
hypot-udef40.4%
add-cube-cbrt40.1%
pow340.1%
*-commutative40.1%
hypot-udef82.6%
Applied egg-rr82.6%
Taylor expanded in y.re around 0 38.6%
pow-base-138.6%
associate-*r*38.6%
unpow238.6%
unpow238.6%
hypot-def76.6%
*-lft-identity76.6%
Simplified76.6%
Taylor expanded in y.im around 0 50.8%
unpow250.8%
unpow250.8%
hypot-def51.0%
unpow251.0%
unpow251.0%
hypot-def76.6%
Simplified76.6%
if 6.59999999999999967e222 < y.im Initial program 45.4%
Taylor expanded in y.im around 0 67.1%
Taylor expanded in y.re around 0 61.5%
fma-def61.5%
cube-prod61.5%
*-commutative61.5%
*-commutative61.5%
Simplified61.5%
Taylor expanded in y.re around 0 78.0%
*-commutative78.0%
Simplified78.0%
Final simplification72.4%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (* y.im (log (hypot x.im x.re))))
(t_1 (* y.re (atan2 x.im x.re)))
(t_2 (* t_1 (exp (* (atan2 x.im x.re) (- y.im)))))
(t_3 (pow (hypot x.re x.im) y.re)))
(if (<= y.im -1.05e+80)
t_2
(if (<= y.im -2e-212)
(* t_0 (pow (hypot x.im x.re) y.re))
(if (<= y.im 1e-208)
(* t_3 (sin t_1))
(if (<= y.im 6.6e+222) (* t_3 (sin t_0)) t_2))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = y_46_im * log(hypot(x_46_im, x_46_re));
double t_1 = y_46_re * atan2(x_46_im, x_46_re);
double t_2 = t_1 * exp((atan2(x_46_im, x_46_re) * -y_46_im));
double t_3 = pow(hypot(x_46_re, x_46_im), y_46_re);
double tmp;
if (y_46_im <= -1.05e+80) {
tmp = t_2;
} else if (y_46_im <= -2e-212) {
tmp = t_0 * pow(hypot(x_46_im, x_46_re), y_46_re);
} else if (y_46_im <= 1e-208) {
tmp = t_3 * sin(t_1);
} else if (y_46_im <= 6.6e+222) {
tmp = t_3 * sin(t_0);
} else {
tmp = t_2;
}
return tmp;
}
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = y_46_im * Math.log(Math.hypot(x_46_im, x_46_re));
double t_1 = y_46_re * Math.atan2(x_46_im, x_46_re);
double t_2 = t_1 * Math.exp((Math.atan2(x_46_im, x_46_re) * -y_46_im));
double t_3 = Math.pow(Math.hypot(x_46_re, x_46_im), y_46_re);
double tmp;
if (y_46_im <= -1.05e+80) {
tmp = t_2;
} else if (y_46_im <= -2e-212) {
tmp = t_0 * Math.pow(Math.hypot(x_46_im, x_46_re), y_46_re);
} else if (y_46_im <= 1e-208) {
tmp = t_3 * Math.sin(t_1);
} else if (y_46_im <= 6.6e+222) {
tmp = t_3 * Math.sin(t_0);
} else {
tmp = t_2;
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): t_0 = y_46_im * math.log(math.hypot(x_46_im, x_46_re)) t_1 = y_46_re * math.atan2(x_46_im, x_46_re) t_2 = t_1 * math.exp((math.atan2(x_46_im, x_46_re) * -y_46_im)) t_3 = math.pow(math.hypot(x_46_re, x_46_im), y_46_re) tmp = 0 if y_46_im <= -1.05e+80: tmp = t_2 elif y_46_im <= -2e-212: tmp = t_0 * math.pow(math.hypot(x_46_im, x_46_re), y_46_re) elif y_46_im <= 1e-208: tmp = t_3 * math.sin(t_1) elif y_46_im <= 6.6e+222: tmp = t_3 * math.sin(t_0) 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_im * log(hypot(x_46_im, x_46_re))) t_1 = Float64(y_46_re * atan(x_46_im, x_46_re)) t_2 = Float64(t_1 * exp(Float64(atan(x_46_im, x_46_re) * Float64(-y_46_im)))) t_3 = hypot(x_46_re, x_46_im) ^ y_46_re tmp = 0.0 if (y_46_im <= -1.05e+80) tmp = t_2; elseif (y_46_im <= -2e-212) tmp = Float64(t_0 * (hypot(x_46_im, x_46_re) ^ y_46_re)); elseif (y_46_im <= 1e-208) tmp = Float64(t_3 * sin(t_1)); elseif (y_46_im <= 6.6e+222) tmp = Float64(t_3 * sin(t_0)); else tmp = t_2; end return tmp end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = y_46_im * log(hypot(x_46_im, x_46_re)); t_1 = y_46_re * atan2(x_46_im, x_46_re); t_2 = t_1 * exp((atan2(x_46_im, x_46_re) * -y_46_im)); t_3 = hypot(x_46_re, x_46_im) ^ y_46_re; tmp = 0.0; if (y_46_im <= -1.05e+80) tmp = t_2; elseif (y_46_im <= -2e-212) tmp = t_0 * (hypot(x_46_im, x_46_re) ^ y_46_re); elseif (y_46_im <= 1e-208) tmp = t_3 * sin(t_1); elseif (y_46_im <= 6.6e+222) tmp = t_3 * sin(t_0); else tmp = t_2; end tmp_2 = tmp; end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[(y$46$im * N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(t$95$1 * N[Exp[N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * (-y$46$im)), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[Power[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision], y$46$re], $MachinePrecision]}, If[LessEqual[y$46$im, -1.05e+80], t$95$2, If[LessEqual[y$46$im, -2e-212], 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$im, 1e-208], N[(t$95$3 * N[Sin[t$95$1], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$im, 6.6e+222], N[(t$95$3 * N[Sin[t$95$0], $MachinePrecision]), $MachinePrecision], t$95$2]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\\
t_1 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
t_2 := t_1 \cdot e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot \left(-y.im\right)}\\
t_3 := {\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re}\\
\mathbf{if}\;y.im \leq -1.05 \cdot 10^{+80}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;y.im \leq -2 \cdot 10^{-212}:\\
\;\;\;\;t_0 \cdot {\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re}\\
\mathbf{elif}\;y.im \leq 10^{-208}:\\
\;\;\;\;t_3 \cdot \sin t_1\\
\mathbf{elif}\;y.im \leq 6.6 \cdot 10^{+222}:\\
\;\;\;\;t_3 \cdot \sin t_0\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
\end{array}
if y.im < -1.05000000000000001e80 or 6.59999999999999967e222 < y.im Initial program 45.5%
Taylor expanded in y.im around 0 62.7%
Taylor expanded in y.re around 0 52.3%
fma-def52.3%
cube-prod54.0%
*-commutative54.0%
*-commutative54.0%
Simplified54.0%
Taylor expanded in y.re around 0 69.5%
*-commutative69.5%
Simplified69.5%
if -1.05000000000000001e80 < y.im < -1.99999999999999991e-212Initial program 42.0%
exp-diff37.5%
exp-to-pow37.5%
hypot-def37.5%
*-commutative37.5%
exp-prod37.3%
+-commutative37.3%
*-commutative37.3%
fma-def37.3%
+-commutative37.3%
Simplified75.9%
hypot-udef37.3%
add-cube-cbrt38.5%
pow338.4%
*-commutative38.4%
hypot-udef76.8%
Applied egg-rr76.8%
Taylor expanded in y.re around 0 35.9%
pow-base-135.9%
associate-*r*35.9%
unpow235.9%
unpow235.9%
hypot-def69.4%
*-lft-identity69.4%
Simplified69.4%
Taylor expanded in y.im around 0 45.2%
unpow245.2%
unpow245.2%
hypot-def45.5%
unpow245.5%
unpow245.5%
hypot-def70.7%
Simplified70.7%
if -1.99999999999999991e-212 < y.im < 1.0000000000000001e-208Initial program 54.8%
exp-diff54.8%
exp-to-pow54.8%
hypot-def54.8%
*-commutative54.8%
exp-prod54.8%
+-commutative54.8%
*-commutative54.8%
fma-def54.9%
+-commutative54.9%
Simplified92.3%
hypot-udef54.9%
add-cube-cbrt54.7%
pow354.7%
*-commutative54.7%
hypot-udef92.0%
Applied egg-rr92.0%
add-cube-cbrt91.9%
rem-cbrt-cube91.9%
rem-cbrt-cube91.9%
pow291.9%
rem-cbrt-cube91.9%
unpow391.9%
add-cube-cbrt91.9%
hypot-udef54.6%
+-commutative54.6%
hypot-def91.9%
Applied egg-rr92.0%
Taylor expanded in y.im around 0 92.0%
Taylor expanded in y.im around 0 79.3%
if 1.0000000000000001e-208 < y.im < 6.59999999999999967e222Initial program 35.7%
exp-diff33.5%
exp-to-pow33.5%
hypot-def33.5%
*-commutative33.5%
exp-prod32.3%
+-commutative32.3%
*-commutative32.3%
fma-def32.3%
+-commutative32.3%
Simplified63.7%
hypot-udef32.3%
add-cube-cbrt34.3%
pow333.3%
*-commutative33.3%
hypot-udef63.4%
Applied egg-rr63.4%
Taylor expanded in y.re around 0 29.4%
pow-base-129.4%
associate-*r*29.4%
unpow229.4%
unpow229.4%
hypot-def59.7%
*-lft-identity59.7%
Simplified59.7%
Taylor expanded in y.im around 0 64.6%
Final simplification69.6%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (* (* y.im (log (hypot x.im x.re))) (pow (hypot x.im x.re) y.re)))
(t_1 (* y.re (atan2 x.im x.re)))
(t_2 (* t_1 (exp (* (atan2 x.im x.re) (- y.im))))))
(if (<= y.im -2.8e+80)
t_2
(if (<= y.im -2.2e-212)
t_0
(if (<= y.im 3.5e-209)
(* (pow (hypot x.re x.im) y.re) (sin t_1))
(if (<= y.im 6.6e+222) t_0 t_2))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = (y_46_im * log(hypot(x_46_im, x_46_re))) * pow(hypot(x_46_im, x_46_re), y_46_re);
double t_1 = y_46_re * atan2(x_46_im, x_46_re);
double t_2 = t_1 * exp((atan2(x_46_im, x_46_re) * -y_46_im));
double tmp;
if (y_46_im <= -2.8e+80) {
tmp = t_2;
} else if (y_46_im <= -2.2e-212) {
tmp = t_0;
} else if (y_46_im <= 3.5e-209) {
tmp = pow(hypot(x_46_re, x_46_im), y_46_re) * sin(t_1);
} else if (y_46_im <= 6.6e+222) {
tmp = t_0;
} else {
tmp = t_2;
}
return tmp;
}
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = (y_46_im * Math.log(Math.hypot(x_46_im, x_46_re))) * Math.pow(Math.hypot(x_46_im, x_46_re), y_46_re);
double t_1 = y_46_re * Math.atan2(x_46_im, x_46_re);
double t_2 = t_1 * Math.exp((Math.atan2(x_46_im, x_46_re) * -y_46_im));
double tmp;
if (y_46_im <= -2.8e+80) {
tmp = t_2;
} else if (y_46_im <= -2.2e-212) {
tmp = t_0;
} else if (y_46_im <= 3.5e-209) {
tmp = Math.pow(Math.hypot(x_46_re, x_46_im), y_46_re) * Math.sin(t_1);
} else if (y_46_im <= 6.6e+222) {
tmp = t_0;
} else {
tmp = t_2;
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): t_0 = (y_46_im * math.log(math.hypot(x_46_im, x_46_re))) * math.pow(math.hypot(x_46_im, x_46_re), y_46_re) t_1 = y_46_re * math.atan2(x_46_im, x_46_re) t_2 = t_1 * math.exp((math.atan2(x_46_im, x_46_re) * -y_46_im)) tmp = 0 if y_46_im <= -2.8e+80: tmp = t_2 elif y_46_im <= -2.2e-212: tmp = t_0 elif y_46_im <= 3.5e-209: tmp = math.pow(math.hypot(x_46_re, x_46_im), y_46_re) * math.sin(t_1) elif y_46_im <= 6.6e+222: tmp = t_0 else: tmp = t_2 return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = Float64(Float64(y_46_im * log(hypot(x_46_im, x_46_re))) * (hypot(x_46_im, x_46_re) ^ y_46_re)) t_1 = Float64(y_46_re * atan(x_46_im, x_46_re)) t_2 = Float64(t_1 * exp(Float64(atan(x_46_im, x_46_re) * Float64(-y_46_im)))) tmp = 0.0 if (y_46_im <= -2.8e+80) tmp = t_2; elseif (y_46_im <= -2.2e-212) tmp = t_0; elseif (y_46_im <= 3.5e-209) tmp = Float64((hypot(x_46_re, x_46_im) ^ y_46_re) * sin(t_1)); elseif (y_46_im <= 6.6e+222) tmp = t_0; else tmp = t_2; end return tmp end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = (y_46_im * log(hypot(x_46_im, x_46_re))) * (hypot(x_46_im, x_46_re) ^ y_46_re); t_1 = y_46_re * atan2(x_46_im, x_46_re); t_2 = t_1 * exp((atan2(x_46_im, x_46_re) * -y_46_im)); tmp = 0.0; if (y_46_im <= -2.8e+80) tmp = t_2; elseif (y_46_im <= -2.2e-212) tmp = t_0; elseif (y_46_im <= 3.5e-209) tmp = (hypot(x_46_re, x_46_im) ^ y_46_re) * sin(t_1); elseif (y_46_im <= 6.6e+222) tmp = t_0; else tmp = t_2; end tmp_2 = tmp; end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[(N[(y$46$im * N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * N[Power[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision], y$46$re], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(t$95$1 * N[Exp[N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * (-y$46$im)), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y$46$im, -2.8e+80], t$95$2, If[LessEqual[y$46$im, -2.2e-212], t$95$0, If[LessEqual[y$46$im, 3.5e-209], N[(N[Power[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision], y$46$re], $MachinePrecision] * N[Sin[t$95$1], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$im, 6.6e+222], t$95$0, t$95$2]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right) \cdot {\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re}\\
t_1 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
t_2 := t_1 \cdot e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot \left(-y.im\right)}\\
\mathbf{if}\;y.im \leq -2.8 \cdot 10^{+80}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;y.im \leq -2.2 \cdot 10^{-212}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;y.im \leq 3.5 \cdot 10^{-209}:\\
\;\;\;\;{\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re} \cdot \sin t_1\\
\mathbf{elif}\;y.im \leq 6.6 \cdot 10^{+222}:\\
\;\;\;\;t_0\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
\end{array}
if y.im < -2.79999999999999984e80 or 6.59999999999999967e222 < y.im Initial program 45.5%
Taylor expanded in y.im around 0 62.7%
Taylor expanded in y.re around 0 52.3%
fma-def52.3%
cube-prod54.0%
*-commutative54.0%
*-commutative54.0%
Simplified54.0%
Taylor expanded in y.re around 0 69.5%
*-commutative69.5%
Simplified69.5%
if -2.79999999999999984e80 < y.im < -2.20000000000000003e-212 or 3.50000000000000002e-209 < y.im < 6.59999999999999967e222Initial program 38.4%
exp-diff35.2%
exp-to-pow35.2%
hypot-def35.2%
*-commutative35.2%
exp-prod34.4%
+-commutative34.4%
*-commutative34.4%
fma-def34.4%
+-commutative34.4%
Simplified68.9%
hypot-udef34.4%
add-cube-cbrt36.1%
pow335.4%
*-commutative35.4%
hypot-udef69.1%
Applied egg-rr69.1%
Taylor expanded in y.re around 0 32.1%
pow-base-132.1%
associate-*r*32.1%
unpow232.1%
unpow232.1%
hypot-def63.8%
*-lft-identity63.8%
Simplified63.8%
Taylor expanded in y.im around 0 41.7%
unpow241.7%
unpow241.7%
hypot-def42.5%
unpow242.5%
unpow242.5%
hypot-def65.9%
Simplified65.9%
if -2.20000000000000003e-212 < y.im < 3.50000000000000002e-209Initial program 54.8%
exp-diff54.8%
exp-to-pow54.8%
hypot-def54.8%
*-commutative54.8%
exp-prod54.8%
+-commutative54.8%
*-commutative54.8%
fma-def54.9%
+-commutative54.9%
Simplified92.3%
hypot-udef54.9%
add-cube-cbrt54.7%
pow354.7%
*-commutative54.7%
hypot-udef92.0%
Applied egg-rr92.0%
add-cube-cbrt91.9%
rem-cbrt-cube91.9%
rem-cbrt-cube91.9%
pow291.9%
rem-cbrt-cube91.9%
unpow391.9%
add-cube-cbrt91.9%
hypot-udef54.6%
+-commutative54.6%
hypot-def91.9%
Applied egg-rr92.0%
Taylor expanded in y.im around 0 92.0%
Taylor expanded in y.im around 0 79.3%
Final simplification68.8%
(FPCore (x.re x.im y.re y.im) :precision binary64 (if (or (<= y.im -9.5e+79) (not (<= y.im 6.6e+222))) (* (* y.re (atan2 x.im x.re)) (exp (* (atan2 x.im x.re) (- y.im)))) (* (* y.im (log (hypot x.im x.re))) (pow (hypot x.im x.re) y.re))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double tmp;
if ((y_46_im <= -9.5e+79) || !(y_46_im <= 6.6e+222)) {
tmp = (y_46_re * atan2(x_46_im, x_46_re)) * exp((atan2(x_46_im, x_46_re) * -y_46_im));
} else {
tmp = (y_46_im * log(hypot(x_46_im, x_46_re))) * pow(hypot(x_46_im, x_46_re), y_46_re);
}
return tmp;
}
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double tmp;
if ((y_46_im <= -9.5e+79) || !(y_46_im <= 6.6e+222)) {
tmp = (y_46_re * Math.atan2(x_46_im, x_46_re)) * Math.exp((Math.atan2(x_46_im, x_46_re) * -y_46_im));
} else {
tmp = (y_46_im * Math.log(Math.hypot(x_46_im, x_46_re))) * Math.pow(Math.hypot(x_46_im, x_46_re), y_46_re);
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): tmp = 0 if (y_46_im <= -9.5e+79) or not (y_46_im <= 6.6e+222): tmp = (y_46_re * math.atan2(x_46_im, x_46_re)) * math.exp((math.atan2(x_46_im, x_46_re) * -y_46_im)) else: tmp = (y_46_im * math.log(math.hypot(x_46_im, x_46_re))) * math.pow(math.hypot(x_46_im, x_46_re), y_46_re) return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) tmp = 0.0 if ((y_46_im <= -9.5e+79) || !(y_46_im <= 6.6e+222)) tmp = Float64(Float64(y_46_re * atan(x_46_im, x_46_re)) * exp(Float64(atan(x_46_im, x_46_re) * Float64(-y_46_im)))); else tmp = Float64(Float64(y_46_im * log(hypot(x_46_im, x_46_re))) * (hypot(x_46_im, x_46_re) ^ y_46_re)); end return tmp end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im) tmp = 0.0; if ((y_46_im <= -9.5e+79) || ~((y_46_im <= 6.6e+222))) tmp = (y_46_re * atan2(x_46_im, x_46_re)) * exp((atan2(x_46_im, x_46_re) * -y_46_im)); else tmp = (y_46_im * log(hypot(x_46_im, x_46_re))) * (hypot(x_46_im, x_46_re) ^ y_46_re); end tmp_2 = tmp; end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := If[Or[LessEqual[y$46$im, -9.5e+79], N[Not[LessEqual[y$46$im, 6.6e+222]], $MachinePrecision]], N[(N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision] * N[Exp[N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * (-y$46$im)), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(N[(y$46$im * N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * N[Power[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision], y$46$re], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y.im \leq -9.5 \cdot 10^{+79} \lor \neg \left(y.im \leq 6.6 \cdot 10^{+222}\right):\\
\;\;\;\;\left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot \left(-y.im\right)}\\
\mathbf{else}:\\
\;\;\;\;\left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right) \cdot {\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re}\\
\end{array}
\end{array}
if y.im < -9.49999999999999994e79 or 6.59999999999999967e222 < y.im Initial program 45.5%
Taylor expanded in y.im around 0 62.7%
Taylor expanded in y.re around 0 52.3%
fma-def52.3%
cube-prod54.0%
*-commutative54.0%
*-commutative54.0%
Simplified54.0%
Taylor expanded in y.re around 0 69.5%
*-commutative69.5%
Simplified69.5%
if -9.49999999999999994e79 < y.im < 6.59999999999999967e222Initial program 41.7%
exp-diff39.2%
exp-to-pow39.2%
hypot-def39.2%
*-commutative39.2%
exp-prod38.5%
+-commutative38.5%
*-commutative38.5%
fma-def38.5%
+-commutative38.5%
Simplified73.6%
hypot-udef38.5%
add-cube-cbrt39.8%
pow339.3%
*-commutative39.3%
hypot-udef73.7%
Applied egg-rr73.7%
Taylor expanded in y.re around 0 32.1%
pow-base-132.1%
associate-*r*32.1%
unpow232.1%
unpow232.1%
hypot-def60.6%
*-lft-identity60.6%
Simplified60.6%
Taylor expanded in y.im around 0 40.3%
unpow240.3%
unpow240.3%
hypot-def41.0%
unpow241.0%
unpow241.0%
hypot-def62.3%
Simplified62.3%
Final simplification63.9%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0
(* (* y.re (atan2 x.im x.re)) (exp (* (atan2 x.im x.re) (- y.im)))))
(t_1
(* (pow (hypot x.im x.re) y.re) (* (log (/ -1.0 x.re)) (- y.im)))))
(if (<= x.re -6.2e+74)
t_1
(if (<= x.re -2.6e+20)
t_0
(if (<= x.re -2.8e-176)
t_1
(if (<= x.re 6.8e-87)
t_0
(* y.im (* (log x.re) (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)) * exp((atan2(x_46_im, x_46_re) * -y_46_im));
double t_1 = pow(hypot(x_46_im, x_46_re), y_46_re) * (log((-1.0 / x_46_re)) * -y_46_im);
double tmp;
if (x_46_re <= -6.2e+74) {
tmp = t_1;
} else if (x_46_re <= -2.6e+20) {
tmp = t_0;
} else if (x_46_re <= -2.8e-176) {
tmp = t_1;
} else if (x_46_re <= 6.8e-87) {
tmp = t_0;
} else {
tmp = y_46_im * (log(x_46_re) * 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)) * Math.exp((Math.atan2(x_46_im, x_46_re) * -y_46_im));
double t_1 = Math.pow(Math.hypot(x_46_im, x_46_re), y_46_re) * (Math.log((-1.0 / x_46_re)) * -y_46_im);
double tmp;
if (x_46_re <= -6.2e+74) {
tmp = t_1;
} else if (x_46_re <= -2.6e+20) {
tmp = t_0;
} else if (x_46_re <= -2.8e-176) {
tmp = t_1;
} else if (x_46_re <= 6.8e-87) {
tmp = t_0;
} else {
tmp = y_46_im * (Math.log(x_46_re) * 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)) * math.exp((math.atan2(x_46_im, x_46_re) * -y_46_im)) t_1 = math.pow(math.hypot(x_46_im, x_46_re), y_46_re) * (math.log((-1.0 / x_46_re)) * -y_46_im) tmp = 0 if x_46_re <= -6.2e+74: tmp = t_1 elif x_46_re <= -2.6e+20: tmp = t_0 elif x_46_re <= -2.8e-176: tmp = t_1 elif x_46_re <= 6.8e-87: tmp = t_0 else: tmp = y_46_im * (math.log(x_46_re) * 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(Float64(y_46_re * atan(x_46_im, x_46_re)) * exp(Float64(atan(x_46_im, x_46_re) * Float64(-y_46_im)))) t_1 = Float64((hypot(x_46_im, x_46_re) ^ y_46_re) * Float64(log(Float64(-1.0 / x_46_re)) * Float64(-y_46_im))) tmp = 0.0 if (x_46_re <= -6.2e+74) tmp = t_1; elseif (x_46_re <= -2.6e+20) tmp = t_0; elseif (x_46_re <= -2.8e-176) tmp = t_1; elseif (x_46_re <= 6.8e-87) tmp = t_0; else tmp = Float64(y_46_im * Float64(log(x_46_re) * (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)) * exp((atan2(x_46_im, x_46_re) * -y_46_im)); t_1 = (hypot(x_46_im, x_46_re) ^ y_46_re) * (log((-1.0 / x_46_re)) * -y_46_im); tmp = 0.0; if (x_46_re <= -6.2e+74) tmp = t_1; elseif (x_46_re <= -2.6e+20) tmp = t_0; elseif (x_46_re <= -2.8e-176) tmp = t_1; elseif (x_46_re <= 6.8e-87) tmp = t_0; else tmp = y_46_im * (log(x_46_re) * (x_46_re ^ y_46_re)); end tmp_2 = tmp; end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[(N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision] * N[Exp[N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * (-y$46$im)), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(N[Power[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision], y$46$re], $MachinePrecision] * N[(N[Log[N[(-1.0 / x$46$re), $MachinePrecision]], $MachinePrecision] * (-y$46$im)), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x$46$re, -6.2e+74], t$95$1, If[LessEqual[x$46$re, -2.6e+20], t$95$0, If[LessEqual[x$46$re, -2.8e-176], t$95$1, If[LessEqual[x$46$re, 6.8e-87], t$95$0, N[(y$46$im * N[(N[Log[x$46$re], $MachinePrecision] * N[Power[x$46$re, y$46$re], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot \left(-y.im\right)}\\
t_1 := {\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re} \cdot \left(\log \left(\frac{-1}{x.re}\right) \cdot \left(-y.im\right)\right)\\
\mathbf{if}\;x.re \leq -6.2 \cdot 10^{+74}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;x.re \leq -2.6 \cdot 10^{+20}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;x.re \leq -2.8 \cdot 10^{-176}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;x.re \leq 6.8 \cdot 10^{-87}:\\
\;\;\;\;t_0\\
\mathbf{else}:\\
\;\;\;\;y.im \cdot \left(\log x.re \cdot {x.re}^{y.re}\right)\\
\end{array}
\end{array}
if x.re < -6.20000000000000043e74 or -2.6e20 < x.re < -2.8000000000000001e-176Initial program 44.0%
exp-diff42.0%
exp-to-pow42.0%
hypot-def42.0%
*-commutative42.0%
exp-prod42.0%
+-commutative42.0%
*-commutative42.0%
fma-def42.0%
+-commutative42.0%
Simplified74.8%
hypot-udef42.0%
add-cube-cbrt44.0%
pow342.9%
*-commutative42.9%
hypot-udef76.7%
Applied egg-rr76.7%
Taylor expanded in y.re around 0 35.5%
pow-base-135.5%
associate-*r*35.5%
unpow235.5%
unpow235.5%
hypot-def60.7%
*-lft-identity60.7%
Simplified60.7%
Taylor expanded in y.im around 0 39.8%
unpow239.8%
unpow239.8%
hypot-def39.9%
unpow239.9%
unpow239.9%
hypot-def58.9%
Simplified58.9%
Taylor expanded in x.re around -inf 55.3%
if -6.20000000000000043e74 < x.re < -2.6e20 or -2.8000000000000001e-176 < x.re < 6.7999999999999997e-87Initial program 46.0%
Taylor expanded in y.im around 0 59.4%
Taylor expanded in y.re around 0 48.4%
fma-def48.4%
cube-prod49.5%
*-commutative49.5%
*-commutative49.5%
Simplified49.5%
Taylor expanded in y.re around 0 47.9%
*-commutative47.9%
Simplified47.9%
if 6.7999999999999997e-87 < x.re Initial program 36.7%
exp-diff35.4%
exp-to-pow35.4%
hypot-def35.4%
*-commutative35.4%
exp-prod32.3%
+-commutative32.3%
*-commutative32.3%
fma-def32.3%
+-commutative32.3%
Simplified59.3%
hypot-udef32.3%
add-cube-cbrt30.8%
pow330.8%
*-commutative30.8%
hypot-udef56.6%
Applied egg-rr56.6%
Taylor expanded in y.re around 0 28.5%
pow-base-128.5%
associate-*r*28.5%
unpow228.5%
unpow228.5%
hypot-def58.2%
*-lft-identity58.2%
Simplified58.2%
Taylor expanded in y.im around 0 39.2%
unpow239.2%
unpow239.2%
hypot-def40.8%
unpow240.8%
unpow240.8%
hypot-def60.9%
Simplified60.9%
Taylor expanded in x.im around 0 53.5%
associate-*r*53.5%
*-commutative53.5%
*-commutative53.5%
Simplified53.5%
Final simplification52.3%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0
(* (* y.re (atan2 x.im x.re)) (exp (* (atan2 x.im x.re) (- y.im))))))
(if (<= x.re -1.25e-121)
t_0
(if (<= x.re -3.7e-175)
(* y.im (* (log x.im) (pow x.im y.re)))
(if (<= x.re 8.6e-90) t_0 (* y.im (* (log x.re) (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)) * exp((atan2(x_46_im, x_46_re) * -y_46_im));
double tmp;
if (x_46_re <= -1.25e-121) {
tmp = t_0;
} else if (x_46_re <= -3.7e-175) {
tmp = y_46_im * (log(x_46_im) * pow(x_46_im, y_46_re));
} else if (x_46_re <= 8.6e-90) {
tmp = t_0;
} else {
tmp = y_46_im * (log(x_46_re) * 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 = (y_46re * atan2(x_46im, x_46re)) * exp((atan2(x_46im, x_46re) * -y_46im))
if (x_46re <= (-1.25d-121)) then
tmp = t_0
else if (x_46re <= (-3.7d-175)) then
tmp = y_46im * (log(x_46im) * (x_46im ** y_46re))
else if (x_46re <= 8.6d-90) then
tmp = t_0
else
tmp = y_46im * (log(x_46re) * (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 = (y_46_re * Math.atan2(x_46_im, x_46_re)) * Math.exp((Math.atan2(x_46_im, x_46_re) * -y_46_im));
double tmp;
if (x_46_re <= -1.25e-121) {
tmp = t_0;
} else if (x_46_re <= -3.7e-175) {
tmp = y_46_im * (Math.log(x_46_im) * Math.pow(x_46_im, y_46_re));
} else if (x_46_re <= 8.6e-90) {
tmp = t_0;
} else {
tmp = y_46_im * (Math.log(x_46_re) * 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)) * math.exp((math.atan2(x_46_im, x_46_re) * -y_46_im)) tmp = 0 if x_46_re <= -1.25e-121: tmp = t_0 elif x_46_re <= -3.7e-175: tmp = y_46_im * (math.log(x_46_im) * math.pow(x_46_im, y_46_re)) elif x_46_re <= 8.6e-90: tmp = t_0 else: tmp = y_46_im * (math.log(x_46_re) * 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(Float64(y_46_re * atan(x_46_im, x_46_re)) * exp(Float64(atan(x_46_im, x_46_re) * Float64(-y_46_im)))) tmp = 0.0 if (x_46_re <= -1.25e-121) tmp = t_0; elseif (x_46_re <= -3.7e-175) tmp = Float64(y_46_im * Float64(log(x_46_im) * (x_46_im ^ y_46_re))); elseif (x_46_re <= 8.6e-90) tmp = t_0; else tmp = Float64(y_46_im * Float64(log(x_46_re) * (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)) * exp((atan2(x_46_im, x_46_re) * -y_46_im)); tmp = 0.0; if (x_46_re <= -1.25e-121) tmp = t_0; elseif (x_46_re <= -3.7e-175) tmp = y_46_im * (log(x_46_im) * (x_46_im ^ y_46_re)); elseif (x_46_re <= 8.6e-90) tmp = t_0; else tmp = y_46_im * (log(x_46_re) * (x_46_re ^ y_46_re)); end tmp_2 = tmp; end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[(N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision] * N[Exp[N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * (-y$46$im)), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x$46$re, -1.25e-121], t$95$0, If[LessEqual[x$46$re, -3.7e-175], N[(y$46$im * N[(N[Log[x$46$im], $MachinePrecision] * N[Power[x$46$im, y$46$re], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x$46$re, 8.6e-90], t$95$0, N[(y$46$im * N[(N[Log[x$46$re], $MachinePrecision] * N[Power[x$46$re, y$46$re], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot \left(-y.im\right)}\\
\mathbf{if}\;x.re \leq -1.25 \cdot 10^{-121}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;x.re \leq -3.7 \cdot 10^{-175}:\\
\;\;\;\;y.im \cdot \left(\log x.im \cdot {x.im}^{y.re}\right)\\
\mathbf{elif}\;x.re \leq 8.6 \cdot 10^{-90}:\\
\;\;\;\;t_0\\
\mathbf{else}:\\
\;\;\;\;y.im \cdot \left(\log x.re \cdot {x.re}^{y.re}\right)\\
\end{array}
\end{array}
if x.re < -1.24999999999999997e-121 or -3.69999999999999998e-175 < x.re < 8.6000000000000004e-90Initial program 43.5%
Taylor expanded in y.im around 0 59.7%
Taylor expanded in y.re around 0 45.5%
fma-def45.5%
cube-prod46.0%
*-commutative46.0%
*-commutative46.0%
Simplified46.0%
Taylor expanded in y.re around 0 46.8%
*-commutative46.8%
Simplified46.8%
if -1.24999999999999997e-121 < x.re < -3.69999999999999998e-175Initial program 64.3%
exp-diff56.6%
exp-to-pow56.6%
hypot-def56.6%
*-commutative56.6%
exp-prod56.6%
+-commutative56.6%
*-commutative56.6%
fma-def56.6%
+-commutative56.6%
Simplified69.1%
hypot-udef56.6%
add-cube-cbrt56.5%
pow356.5%
*-commutative56.5%
hypot-udef68.9%
Applied egg-rr68.9%
Taylor expanded in y.re around 0 49.2%
pow-base-149.2%
associate-*r*49.2%
unpow249.2%
unpow249.2%
hypot-def54.0%
*-lft-identity54.0%
Simplified54.0%
Taylor expanded in y.im around 0 72.5%
unpow272.5%
unpow272.5%
hypot-def72.5%
unpow272.5%
unpow272.5%
hypot-def74.0%
Simplified74.0%
Taylor expanded in x.re around 0 54.2%
if 8.6000000000000004e-90 < x.re Initial program 36.7%
exp-diff35.4%
exp-to-pow35.4%
hypot-def35.4%
*-commutative35.4%
exp-prod32.3%
+-commutative32.3%
*-commutative32.3%
fma-def32.3%
+-commutative32.3%
Simplified59.3%
hypot-udef32.3%
add-cube-cbrt30.8%
pow330.8%
*-commutative30.8%
hypot-udef56.6%
Applied egg-rr56.6%
Taylor expanded in y.re around 0 28.5%
pow-base-128.5%
associate-*r*28.5%
unpow228.5%
unpow228.5%
hypot-def58.2%
*-lft-identity58.2%
Simplified58.2%
Taylor expanded in y.im around 0 39.2%
unpow239.2%
unpow239.2%
hypot-def40.8%
unpow240.8%
unpow240.8%
hypot-def60.9%
Simplified60.9%
Taylor expanded in x.im around 0 53.5%
associate-*r*53.5%
*-commutative53.5%
*-commutative53.5%
Simplified53.5%
Final simplification49.2%
(FPCore (x.re x.im y.re y.im) :precision binary64 (if (<= x.re 5.5e-278) (* y.im (* (log x.im) (pow x.im y.re))) (* y.im (* (log x.re) (pow x.re y.re)))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double tmp;
if (x_46_re <= 5.5e-278) {
tmp = y_46_im * (log(x_46_im) * pow(x_46_im, y_46_re));
} else {
tmp = y_46_im * (log(x_46_re) * 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) :: tmp
if (x_46re <= 5.5d-278) then
tmp = y_46im * (log(x_46im) * (x_46im ** y_46re))
else
tmp = y_46im * (log(x_46re) * (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 tmp;
if (x_46_re <= 5.5e-278) {
tmp = y_46_im * (Math.log(x_46_im) * Math.pow(x_46_im, y_46_re));
} else {
tmp = y_46_im * (Math.log(x_46_re) * Math.pow(x_46_re, y_46_re));
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): tmp = 0 if x_46_re <= 5.5e-278: tmp = y_46_im * (math.log(x_46_im) * math.pow(x_46_im, y_46_re)) else: tmp = y_46_im * (math.log(x_46_re) * math.pow(x_46_re, y_46_re)) return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) tmp = 0.0 if (x_46_re <= 5.5e-278) tmp = Float64(y_46_im * Float64(log(x_46_im) * (x_46_im ^ y_46_re))); else tmp = Float64(y_46_im * Float64(log(x_46_re) * (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) tmp = 0.0; if (x_46_re <= 5.5e-278) tmp = y_46_im * (log(x_46_im) * (x_46_im ^ y_46_re)); else tmp = y_46_im * (log(x_46_re) * (x_46_re ^ y_46_re)); end tmp_2 = tmp; end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := If[LessEqual[x$46$re, 5.5e-278], N[(y$46$im * N[(N[Log[x$46$im], $MachinePrecision] * N[Power[x$46$im, y$46$re], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(y$46$im * N[(N[Log[x$46$re], $MachinePrecision] * N[Power[x$46$re, y$46$re], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x.re \leq 5.5 \cdot 10^{-278}:\\
\;\;\;\;y.im \cdot \left(\log x.im \cdot {x.im}^{y.re}\right)\\
\mathbf{else}:\\
\;\;\;\;y.im \cdot \left(\log x.re \cdot {x.re}^{y.re}\right)\\
\end{array}
\end{array}
if x.re < 5.49999999999999989e-278Initial program 46.5%
exp-diff43.6%
exp-to-pow43.6%
hypot-def43.6%
*-commutative43.6%
exp-prod43.6%
+-commutative43.6%
*-commutative43.6%
fma-def43.6%
+-commutative43.6%
Simplified76.3%
hypot-udef43.6%
add-cube-cbrt45.7%
pow345.7%
*-commutative45.7%
hypot-udef78.3%
Applied egg-rr78.3%
Taylor expanded in y.re around 0 37.0%
pow-base-137.0%
associate-*r*37.0%
unpow237.0%
unpow237.0%
hypot-def61.5%
*-lft-identity61.5%
Simplified61.5%
Taylor expanded in y.im around 0 35.9%
unpow235.9%
unpow235.9%
hypot-def36.1%
unpow236.1%
unpow236.1%
hypot-def53.2%
Simplified53.2%
Taylor expanded in x.re around 0 18.5%
if 5.49999999999999989e-278 < x.re Initial program 38.1%
exp-diff33.9%
exp-to-pow33.9%
hypot-def33.9%
*-commutative33.9%
exp-prod31.9%
+-commutative31.9%
*-commutative31.9%
fma-def31.9%
+-commutative31.9%
Simplified60.4%
hypot-udef31.9%
add-cube-cbrt31.7%
pow331.7%
*-commutative31.7%
hypot-udef59.4%
Applied egg-rr59.4%
Taylor expanded in y.re around 0 28.7%
pow-base-128.7%
associate-*r*28.7%
unpow228.7%
unpow228.7%
hypot-def55.7%
*-lft-identity55.7%
Simplified55.7%
Taylor expanded in y.im around 0 35.6%
unpow235.6%
unpow235.6%
hypot-def37.5%
unpow237.5%
unpow237.5%
hypot-def55.0%
Simplified55.0%
Taylor expanded in x.im around 0 44.2%
associate-*r*44.2%
*-commutative44.2%
*-commutative44.2%
Simplified44.2%
Final simplification30.6%
(FPCore (x.re x.im y.re y.im) :precision binary64 (* y.im (* (log x.im) (pow x.im y.re))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
return y_46_im * (log(x_46_im) * 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 = y_46im * (log(x_46im) * (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 y_46_im * (Math.log(x_46_im) * Math.pow(x_46_im, y_46_re));
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): return y_46_im * (math.log(x_46_im) * math.pow(x_46_im, y_46_re))
function code(x_46_re, x_46_im, y_46_re, y_46_im) return Float64(y_46_im * Float64(log(x_46_im) * (x_46_im ^ y_46_re))) end
function tmp = code(x_46_re, x_46_im, y_46_re, y_46_im) tmp = y_46_im * (log(x_46_im) * (x_46_im ^ y_46_re)); end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := N[(y$46$im * N[(N[Log[x$46$im], $MachinePrecision] * N[Power[x$46$im, y$46$re], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
y.im \cdot \left(\log x.im \cdot {x.im}^{y.re}\right)
\end{array}
Initial program 42.6%
exp-diff39.0%
exp-to-pow39.0%
hypot-def39.0%
*-commutative39.0%
exp-prod38.1%
+-commutative38.1%
*-commutative38.1%
fma-def38.1%
+-commutative38.1%
Simplified68.8%
hypot-udef38.1%
add-cube-cbrt39.1%
pow339.1%
*-commutative39.1%
hypot-udef69.4%
Applied egg-rr69.4%
Taylor expanded in y.re around 0 33.1%
pow-base-133.1%
associate-*r*33.1%
unpow233.1%
unpow233.1%
hypot-def58.8%
*-lft-identity58.8%
Simplified58.8%
Taylor expanded in y.im around 0 35.7%
unpow235.7%
unpow235.7%
hypot-def36.7%
unpow236.7%
unpow236.7%
hypot-def54.0%
Simplified54.0%
Taylor expanded in x.re around 0 18.3%
Final simplification18.3%
herbie shell --seed 2023279
(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)))))