
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (log (sqrt (+ (* x.re x.re) (* x.im x.im))))))
(*
(exp (- (* t_0 y.re) (* (atan2 x.im x.re) y.im)))
(sin (+ (* t_0 y.im) (* (atan2 x.im x.re) y.re))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))));
return exp(((t_0 * y_46_re) - (atan2(x_46_im, x_46_re) * y_46_im))) * sin(((t_0 * y_46_im) + (atan2(x_46_im, x_46_re) * y_46_re)));
}
real(8) function code(x_46re, x_46im, y_46re, y_46im)
real(8), intent (in) :: x_46re
real(8), intent (in) :: x_46im
real(8), intent (in) :: y_46re
real(8), intent (in) :: y_46im
real(8) :: t_0
t_0 = log(sqrt(((x_46re * x_46re) + (x_46im * x_46im))))
code = exp(((t_0 * y_46re) - (atan2(x_46im, x_46re) * y_46im))) * sin(((t_0 * y_46im) + (atan2(x_46im, x_46re) * y_46re)))
end function
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = Math.log(Math.sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))));
return Math.exp(((t_0 * y_46_re) - (Math.atan2(x_46_im, x_46_re) * y_46_im))) * Math.sin(((t_0 * y_46_im) + (Math.atan2(x_46_im, x_46_re) * y_46_re)));
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): t_0 = math.log(math.sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im)))) return math.exp(((t_0 * y_46_re) - (math.atan2(x_46_im, x_46_re) * y_46_im))) * math.sin(((t_0 * y_46_im) + (math.atan2(x_46_im, x_46_re) * y_46_re)))
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = log(sqrt(Float64(Float64(x_46_re * x_46_re) + Float64(x_46_im * x_46_im)))) return Float64(exp(Float64(Float64(t_0 * y_46_re) - Float64(atan(x_46_im, x_46_re) * y_46_im))) * sin(Float64(Float64(t_0 * y_46_im) + Float64(atan(x_46_im, x_46_re) * y_46_re)))) end
function tmp = code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im)))); tmp = exp(((t_0 * y_46_re) - (atan2(x_46_im, x_46_re) * y_46_im))) * sin(((t_0 * y_46_im) + (atan2(x_46_im, x_46_re) * y_46_re))); end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[Log[N[Sqrt[N[(N[(x$46$re * x$46$re), $MachinePrecision] + N[(x$46$im * x$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]}, N[(N[Exp[N[(N[(t$95$0 * y$46$re), $MachinePrecision] - N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Sin[N[(N[(t$95$0 * y$46$im), $MachinePrecision] + N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$re), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right)\\
e^{t\_0 \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \sin \left(t\_0 \cdot y.im + \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)
\end{array}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 20 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (log (sqrt (+ (* x.re x.re) (* x.im x.im))))))
(*
(exp (- (* t_0 y.re) (* (atan2 x.im x.re) y.im)))
(sin (+ (* t_0 y.im) (* (atan2 x.im x.re) y.re))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))));
return exp(((t_0 * y_46_re) - (atan2(x_46_im, x_46_re) * y_46_im))) * sin(((t_0 * y_46_im) + (atan2(x_46_im, x_46_re) * y_46_re)));
}
real(8) function code(x_46re, x_46im, y_46re, y_46im)
real(8), intent (in) :: x_46re
real(8), intent (in) :: x_46im
real(8), intent (in) :: y_46re
real(8), intent (in) :: y_46im
real(8) :: t_0
t_0 = log(sqrt(((x_46re * x_46re) + (x_46im * x_46im))))
code = exp(((t_0 * y_46re) - (atan2(x_46im, x_46re) * y_46im))) * sin(((t_0 * y_46im) + (atan2(x_46im, x_46re) * y_46re)))
end function
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = Math.log(Math.sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))));
return Math.exp(((t_0 * y_46_re) - (Math.atan2(x_46_im, x_46_re) * y_46_im))) * Math.sin(((t_0 * y_46_im) + (Math.atan2(x_46_im, x_46_re) * y_46_re)));
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): t_0 = math.log(math.sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im)))) return math.exp(((t_0 * y_46_re) - (math.atan2(x_46_im, x_46_re) * y_46_im))) * math.sin(((t_0 * y_46_im) + (math.atan2(x_46_im, x_46_re) * y_46_re)))
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = log(sqrt(Float64(Float64(x_46_re * x_46_re) + Float64(x_46_im * x_46_im)))) return Float64(exp(Float64(Float64(t_0 * y_46_re) - Float64(atan(x_46_im, x_46_re) * y_46_im))) * sin(Float64(Float64(t_0 * y_46_im) + Float64(atan(x_46_im, x_46_re) * y_46_re)))) end
function tmp = code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im)))); tmp = exp(((t_0 * y_46_re) - (atan2(x_46_im, x_46_re) * y_46_im))) * sin(((t_0 * y_46_im) + (atan2(x_46_im, x_46_re) * y_46_re))); end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[Log[N[Sqrt[N[(N[(x$46$re * x$46$re), $MachinePrecision] + N[(x$46$im * x$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]}, N[(N[Exp[N[(N[(t$95$0 * y$46$re), $MachinePrecision] - N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Sin[N[(N[(t$95$0 * y$46$im), $MachinePrecision] + N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$re), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right)\\
e^{t\_0 \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \sin \left(t\_0 \cdot y.im + \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)
\end{array}
\end{array}
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (log (hypot x.im x.re)))
(t_1 (* y.re (atan2 x.im x.re)))
(t_2 (pow (hypot x.re x.im) y.re))
(t_3 (/ t_2 (pow (exp y.im) (atan2 x.im x.re))))
(t_4 (log (hypot x.re x.im)))
(t_5 (exp (fma t_4 y.re (* (atan2 x.im x.re) (- y.im)))))
(t_6 (* (atan2 x.im x.re) y.im))
(t_7 (sin (fma t_4 y.im t_1))))
(if (<= y.re -1.15e+130)
(*
(exp (- (* y.re (log (sqrt (+ (* x.re x.re) (* x.im x.im))))) t_6))
(sin (fabs t_1)))
(if (<= y.re 7.8e-244)
(* t_5 t_7)
(if (<= y.re 6e-140)
(* t_3 (sin (fabs (fma y.im t_0 t_1))))
(if (<= y.re 4.4e+52)
(* t_3 (sin (pow (cbrt (fma y.im t_4 t_1)) 3.0)))
(if (<= y.re 8.2e+148)
(* t_5 (* y.im t_0))
(if (<= y.re 5e+225)
(* t_7 (/ t_2 (+ 1.0 t_6)))
(* t_7 t_2)))))))))
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_im, x_46_re));
double t_1 = y_46_re * atan2(x_46_im, x_46_re);
double t_2 = pow(hypot(x_46_re, x_46_im), y_46_re);
double t_3 = t_2 / pow(exp(y_46_im), atan2(x_46_im, x_46_re));
double t_4 = log(hypot(x_46_re, x_46_im));
double t_5 = exp(fma(t_4, y_46_re, (atan2(x_46_im, x_46_re) * -y_46_im)));
double t_6 = atan2(x_46_im, x_46_re) * y_46_im;
double t_7 = sin(fma(t_4, y_46_im, t_1));
double tmp;
if (y_46_re <= -1.15e+130) {
tmp = exp(((y_46_re * log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))) - t_6)) * sin(fabs(t_1));
} else if (y_46_re <= 7.8e-244) {
tmp = t_5 * t_7;
} else if (y_46_re <= 6e-140) {
tmp = t_3 * sin(fabs(fma(y_46_im, t_0, t_1)));
} else if (y_46_re <= 4.4e+52) {
tmp = t_3 * sin(pow(cbrt(fma(y_46_im, t_4, t_1)), 3.0));
} else if (y_46_re <= 8.2e+148) {
tmp = t_5 * (y_46_im * t_0);
} else if (y_46_re <= 5e+225) {
tmp = t_7 * (t_2 / (1.0 + t_6));
} else {
tmp = t_7 * t_2;
}
return tmp;
}
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = log(hypot(x_46_im, x_46_re)) t_1 = Float64(y_46_re * atan(x_46_im, x_46_re)) t_2 = hypot(x_46_re, x_46_im) ^ y_46_re t_3 = Float64(t_2 / (exp(y_46_im) ^ atan(x_46_im, x_46_re))) t_4 = log(hypot(x_46_re, x_46_im)) t_5 = exp(fma(t_4, y_46_re, Float64(atan(x_46_im, x_46_re) * Float64(-y_46_im)))) t_6 = Float64(atan(x_46_im, x_46_re) * y_46_im) t_7 = sin(fma(t_4, y_46_im, t_1)) tmp = 0.0 if (y_46_re <= -1.15e+130) tmp = Float64(exp(Float64(Float64(y_46_re * log(sqrt(Float64(Float64(x_46_re * x_46_re) + Float64(x_46_im * x_46_im))))) - t_6)) * sin(abs(t_1))); elseif (y_46_re <= 7.8e-244) tmp = Float64(t_5 * t_7); elseif (y_46_re <= 6e-140) tmp = Float64(t_3 * sin(abs(fma(y_46_im, t_0, t_1)))); elseif (y_46_re <= 4.4e+52) tmp = Float64(t_3 * sin((cbrt(fma(y_46_im, t_4, t_1)) ^ 3.0))); elseif (y_46_re <= 8.2e+148) tmp = Float64(t_5 * Float64(y_46_im * t_0)); elseif (y_46_re <= 5e+225) tmp = Float64(t_7 * Float64(t_2 / Float64(1.0 + t_6))); else tmp = Float64(t_7 * t_2); 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$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]}, Block[{t$95$1 = N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[Power[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision], y$46$re], $MachinePrecision]}, Block[{t$95$3 = N[(t$95$2 / N[Power[N[Exp[y$46$im], $MachinePrecision], N[ArcTan[x$46$im / x$46$re], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[Log[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision]], $MachinePrecision]}, Block[{t$95$5 = N[Exp[N[(t$95$4 * y$46$re + N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * (-y$46$im)), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$6 = N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$im), $MachinePrecision]}, Block[{t$95$7 = N[Sin[N[(t$95$4 * y$46$im + t$95$1), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[y$46$re, -1.15e+130], N[(N[Exp[N[(N[(y$46$re * N[Log[N[Sqrt[N[(N[(x$46$re * x$46$re), $MachinePrecision] + N[(x$46$im * x$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision] - t$95$6), $MachinePrecision]], $MachinePrecision] * N[Sin[N[Abs[t$95$1], $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$re, 7.8e-244], N[(t$95$5 * t$95$7), $MachinePrecision], If[LessEqual[y$46$re, 6e-140], N[(t$95$3 * N[Sin[N[Abs[N[(y$46$im * t$95$0 + t$95$1), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$re, 4.4e+52], N[(t$95$3 * N[Sin[N[Power[N[Power[N[(y$46$im * t$95$4 + t$95$1), $MachinePrecision], 1/3], $MachinePrecision], 3.0], $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$re, 8.2e+148], N[(t$95$5 * N[(y$46$im * t$95$0), $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$re, 5e+225], N[(t$95$7 * N[(t$95$2 / N[(1.0 + t$95$6), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t$95$7 * t$95$2), $MachinePrecision]]]]]]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \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 := {\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re}\\
t_3 := \frac{t\_2}{{\left(e^{y.im}\right)}^{\tan^{-1}_* \frac{x.im}{x.re}}}\\
t_4 := \log \left(\mathsf{hypot}\left(x.re, x.im\right)\right)\\
t_5 := e^{\mathsf{fma}\left(t\_4, y.re, \tan^{-1}_* \frac{x.im}{x.re} \cdot \left(-y.im\right)\right)}\\
t_6 := \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im\\
t_7 := \sin \left(\mathsf{fma}\left(t\_4, y.im, t\_1\right)\right)\\
\mathbf{if}\;y.re \leq -1.15 \cdot 10^{+130}:\\
\;\;\;\;e^{y.re \cdot \log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) - t\_6} \cdot \sin \left(\left|t\_1\right|\right)\\
\mathbf{elif}\;y.re \leq 7.8 \cdot 10^{-244}:\\
\;\;\;\;t\_5 \cdot t\_7\\
\mathbf{elif}\;y.re \leq 6 \cdot 10^{-140}:\\
\;\;\;\;t\_3 \cdot \sin \left(\left|\mathsf{fma}\left(y.im, t\_0, t\_1\right)\right|\right)\\
\mathbf{elif}\;y.re \leq 4.4 \cdot 10^{+52}:\\
\;\;\;\;t\_3 \cdot \sin \left({\left(\sqrt[3]{\mathsf{fma}\left(y.im, t\_4, t\_1\right)}\right)}^{3}\right)\\
\mathbf{elif}\;y.re \leq 8.2 \cdot 10^{+148}:\\
\;\;\;\;t\_5 \cdot \left(y.im \cdot t\_0\right)\\
\mathbf{elif}\;y.re \leq 5 \cdot 10^{+225}:\\
\;\;\;\;t\_7 \cdot \frac{t\_2}{1 + t\_6}\\
\mathbf{else}:\\
\;\;\;\;t\_7 \cdot t\_2\\
\end{array}
\end{array}
if y.re < -1.15000000000000011e130Initial program 32.3%
Taylor expanded in y.im around 0 71.0%
add-sqr-sqrt45.2%
sqrt-unprod35.5%
pow235.5%
*-commutative35.5%
Applied egg-rr35.5%
*-commutative35.5%
unpow235.5%
rem-sqrt-square90.3%
Simplified90.3%
if -1.15000000000000011e130 < y.re < 7.7999999999999998e-244Initial program 41.1%
fma-neg41.1%
hypot-def41.1%
distribute-rgt-neg-out41.1%
fma-def41.1%
hypot-def85.2%
*-commutative85.2%
Simplified85.2%
if 7.7999999999999998e-244 < y.re < 6.00000000000000037e-140Initial program 31.4%
exp-diff31.4%
exp-to-pow31.4%
hypot-def31.4%
*-commutative31.4%
exp-prod31.4%
fma-def31.4%
hypot-def67.9%
*-commutative67.9%
Simplified67.9%
add-sqr-sqrt52.0%
sqrt-unprod47.8%
pow247.8%
fma-udef47.8%
*-commutative47.8%
*-commutative47.8%
fma-def47.8%
Applied egg-rr47.8%
unpow247.8%
rem-sqrt-square89.2%
hypot-def47.2%
unpow247.2%
unpow247.2%
+-commutative47.2%
*-commutative47.2%
unpow247.2%
unpow247.2%
hypot-def89.2%
Simplified89.2%
if 6.00000000000000037e-140 < y.re < 4.4e52Initial program 39.1%
exp-diff39.1%
exp-to-pow39.1%
hypot-def39.1%
*-commutative39.1%
exp-prod38.6%
fma-def38.6%
hypot-def77.1%
*-commutative77.1%
Simplified77.1%
add-cube-cbrt78.3%
pow378.3%
fma-udef78.3%
*-commutative78.3%
*-commutative78.3%
fma-def78.3%
Applied egg-rr78.3%
if 4.4e52 < y.re < 8.1999999999999996e148Initial program 17.6%
fma-neg17.6%
hypot-def17.6%
distribute-rgt-neg-out17.6%
fma-def17.6%
hypot-def23.5%
*-commutative23.5%
Simplified23.5%
Taylor expanded in y.im around inf 47.1%
unpow247.1%
unpow247.1%
hypot-def82.4%
Simplified82.4%
Taylor expanded in y.im around 0 94.1%
unpow294.1%
unpow294.1%
hypot-def94.1%
rem-cbrt-cube88.2%
hypot-def88.2%
unpow288.2%
unpow288.2%
+-commutative88.2%
unpow288.2%
unpow288.2%
hypot-def88.2%
unpow1/388.2%
unpow1/388.2%
Simplified94.1%
if 8.1999999999999996e148 < y.re < 4.99999999999999981e225Initial program 42.1%
exp-diff36.8%
exp-to-pow36.8%
hypot-def36.8%
*-commutative36.8%
exp-prod36.8%
fma-def36.8%
hypot-def52.6%
*-commutative52.6%
Simplified52.6%
Taylor expanded in y.im around 0 73.8%
if 4.99999999999999981e225 < y.re Initial program 40.0%
exp-diff13.3%
exp-to-pow13.3%
hypot-def13.3%
*-commutative13.3%
exp-prod13.3%
fma-def13.3%
hypot-def40.0%
*-commutative40.0%
Simplified40.0%
Taylor expanded in y.im around 0 80.0%
Final simplification84.0%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (log (hypot x.im x.re)))
(t_1 (* y.re (atan2 x.im x.re)))
(t_2 (pow (hypot x.re x.im) y.re))
(t_3 (log (hypot x.re x.im)))
(t_4
(*
(exp (fma t_3 y.re (* (atan2 x.im x.re) (- y.im))))
(sin (fma t_3 y.im t_1)))))
(if (<= y.re -5e+126)
(*
(exp
(-
(* y.re (log (sqrt (+ (* x.re x.re) (* x.im x.im)))))
(* (atan2 x.im x.re) y.im)))
(sin (fabs t_1)))
(if (<= y.re 7.8e-244)
t_4
(if (<= y.re 4.4e-147)
(*
(/ t_2 (pow (exp y.im) (atan2 x.im x.re)))
(sin (fabs (fma y.im t_0 t_1))))
(if (<= y.re 1.15e+19)
t_4
(* t_2 (sin (pow (cbrt (* y.im t_0)) 3.0)))))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = log(hypot(x_46_im, x_46_re));
double t_1 = y_46_re * atan2(x_46_im, x_46_re);
double t_2 = pow(hypot(x_46_re, x_46_im), y_46_re);
double t_3 = log(hypot(x_46_re, x_46_im));
double t_4 = exp(fma(t_3, y_46_re, (atan2(x_46_im, x_46_re) * -y_46_im))) * sin(fma(t_3, y_46_im, t_1));
double tmp;
if (y_46_re <= -5e+126) {
tmp = exp(((y_46_re * log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))) - (atan2(x_46_im, x_46_re) * y_46_im))) * sin(fabs(t_1));
} else if (y_46_re <= 7.8e-244) {
tmp = t_4;
} else if (y_46_re <= 4.4e-147) {
tmp = (t_2 / pow(exp(y_46_im), atan2(x_46_im, x_46_re))) * sin(fabs(fma(y_46_im, t_0, t_1)));
} else if (y_46_re <= 1.15e+19) {
tmp = t_4;
} else {
tmp = t_2 * sin(pow(cbrt((y_46_im * t_0)), 3.0));
}
return tmp;
}
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = log(hypot(x_46_im, x_46_re)) t_1 = Float64(y_46_re * atan(x_46_im, x_46_re)) t_2 = hypot(x_46_re, x_46_im) ^ y_46_re t_3 = log(hypot(x_46_re, x_46_im)) t_4 = Float64(exp(fma(t_3, y_46_re, Float64(atan(x_46_im, x_46_re) * Float64(-y_46_im)))) * sin(fma(t_3, y_46_im, t_1))) tmp = 0.0 if (y_46_re <= -5e+126) tmp = Float64(exp(Float64(Float64(y_46_re * log(sqrt(Float64(Float64(x_46_re * x_46_re) + Float64(x_46_im * x_46_im))))) - Float64(atan(x_46_im, x_46_re) * y_46_im))) * sin(abs(t_1))); elseif (y_46_re <= 7.8e-244) tmp = t_4; elseif (y_46_re <= 4.4e-147) tmp = Float64(Float64(t_2 / (exp(y_46_im) ^ atan(x_46_im, x_46_re))) * sin(abs(fma(y_46_im, t_0, t_1)))); elseif (y_46_re <= 1.15e+19) tmp = t_4; else tmp = Float64(t_2 * sin((cbrt(Float64(y_46_im * t_0)) ^ 3.0))); end return tmp end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]}, Block[{t$95$1 = N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[Power[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision], y$46$re], $MachinePrecision]}, Block[{t$95$3 = N[Log[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision]], $MachinePrecision]}, Block[{t$95$4 = N[(N[Exp[N[(t$95$3 * y$46$re + N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * (-y$46$im)), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Sin[N[(t$95$3 * y$46$im + t$95$1), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y$46$re, -5e+126], N[(N[Exp[N[(N[(y$46$re * N[Log[N[Sqrt[N[(N[(x$46$re * x$46$re), $MachinePrecision] + N[(x$46$im * x$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision] - N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Sin[N[Abs[t$95$1], $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$re, 7.8e-244], t$95$4, If[LessEqual[y$46$re, 4.4e-147], N[(N[(t$95$2 / N[Power[N[Exp[y$46$im], $MachinePrecision], N[ArcTan[x$46$im / x$46$re], $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * N[Sin[N[Abs[N[(y$46$im * t$95$0 + t$95$1), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$re, 1.15e+19], t$95$4, N[(t$95$2 * N[Sin[N[Power[N[Power[N[(y$46$im * t$95$0), $MachinePrecision], 1/3], $MachinePrecision], 3.0], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \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 := {\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re}\\
t_3 := \log \left(\mathsf{hypot}\left(x.re, x.im\right)\right)\\
t_4 := e^{\mathsf{fma}\left(t\_3, y.re, \tan^{-1}_* \frac{x.im}{x.re} \cdot \left(-y.im\right)\right)} \cdot \sin \left(\mathsf{fma}\left(t\_3, y.im, t\_1\right)\right)\\
\mathbf{if}\;y.re \leq -5 \cdot 10^{+126}:\\
\;\;\;\;e^{y.re \cdot \log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \sin \left(\left|t\_1\right|\right)\\
\mathbf{elif}\;y.re \leq 7.8 \cdot 10^{-244}:\\
\;\;\;\;t\_4\\
\mathbf{elif}\;y.re \leq 4.4 \cdot 10^{-147}:\\
\;\;\;\;\frac{t\_2}{{\left(e^{y.im}\right)}^{\tan^{-1}_* \frac{x.im}{x.re}}} \cdot \sin \left(\left|\mathsf{fma}\left(y.im, t\_0, t\_1\right)\right|\right)\\
\mathbf{elif}\;y.re \leq 1.15 \cdot 10^{+19}:\\
\;\;\;\;t\_4\\
\mathbf{else}:\\
\;\;\;\;t\_2 \cdot \sin \left({\left(\sqrt[3]{y.im \cdot t\_0}\right)}^{3}\right)\\
\end{array}
\end{array}
if y.re < -4.99999999999999977e126Initial program 32.3%
Taylor expanded in y.im around 0 71.0%
add-sqr-sqrt45.2%
sqrt-unprod35.5%
pow235.5%
*-commutative35.5%
Applied egg-rr35.5%
*-commutative35.5%
unpow235.5%
rem-sqrt-square90.3%
Simplified90.3%
if -4.99999999999999977e126 < y.re < 7.7999999999999998e-244 or 4.4000000000000002e-147 < y.re < 1.15e19Initial program 40.4%
fma-neg40.4%
hypot-def40.4%
distribute-rgt-neg-out40.4%
fma-def40.4%
hypot-def84.6%
*-commutative84.6%
Simplified84.6%
if 7.7999999999999998e-244 < y.re < 4.4000000000000002e-147Initial program 35.1%
exp-diff35.1%
exp-to-pow35.1%
hypot-def35.1%
*-commutative35.1%
exp-prod35.1%
fma-def35.1%
hypot-def64.2%
*-commutative64.2%
Simplified64.2%
add-sqr-sqrt46.4%
sqrt-unprod47.2%
pow247.2%
fma-udef47.2%
*-commutative47.2%
*-commutative47.2%
fma-def47.2%
Applied egg-rr47.2%
unpow247.2%
rem-sqrt-square88.1%
hypot-def52.8%
unpow252.8%
unpow252.8%
+-commutative52.8%
*-commutative52.8%
unpow252.8%
unpow252.8%
hypot-def88.1%
Simplified88.1%
if 1.15e19 < y.re Initial program 32.8%
exp-diff22.4%
exp-to-pow22.4%
hypot-def22.4%
*-commutative22.4%
exp-prod20.7%
fma-def20.7%
hypot-def36.2%
*-commutative36.2%
Simplified36.2%
add-cube-cbrt46.6%
pow343.1%
fma-udef43.1%
*-commutative43.1%
*-commutative43.1%
fma-def43.1%
Applied egg-rr43.1%
Taylor expanded in y.im around 0 57.0%
Taylor expanded in y.re around 0 19.0%
unpow1/336.2%
unpow236.2%
unpow236.2%
hypot-def70.7%
Simplified70.7%
Final simplification82.4%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (* y.re (atan2 x.im x.re))) (t_1 (log (hypot x.re x.im))))
(if (<= y.re -1e+131)
(*
(exp
(-
(* y.re (log (sqrt (+ (* x.re x.re) (* x.im x.im)))))
(* (atan2 x.im x.re) y.im)))
(sin (fabs t_0)))
(if (<= y.re 6.9e+19)
(*
(exp (fma t_1 y.re (* (atan2 x.im x.re) (- y.im))))
(sin (fma t_1 y.im t_0)))
(*
(pow (hypot x.re x.im) y.re)
(sin (pow (cbrt (* y.im (log (hypot x.im x.re)))) 3.0)))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = y_46_re * atan2(x_46_im, x_46_re);
double t_1 = log(hypot(x_46_re, x_46_im));
double tmp;
if (y_46_re <= -1e+131) {
tmp = exp(((y_46_re * log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))) - (atan2(x_46_im, x_46_re) * y_46_im))) * sin(fabs(t_0));
} else if (y_46_re <= 6.9e+19) {
tmp = exp(fma(t_1, y_46_re, (atan2(x_46_im, x_46_re) * -y_46_im))) * sin(fma(t_1, y_46_im, t_0));
} else {
tmp = pow(hypot(x_46_re, x_46_im), y_46_re) * sin(pow(cbrt((y_46_im * log(hypot(x_46_im, x_46_re)))), 3.0));
}
return tmp;
}
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = Float64(y_46_re * atan(x_46_im, x_46_re)) t_1 = log(hypot(x_46_re, x_46_im)) tmp = 0.0 if (y_46_re <= -1e+131) tmp = Float64(exp(Float64(Float64(y_46_re * log(sqrt(Float64(Float64(x_46_re * x_46_re) + Float64(x_46_im * x_46_im))))) - Float64(atan(x_46_im, x_46_re) * y_46_im))) * sin(abs(t_0))); elseif (y_46_re <= 6.9e+19) tmp = Float64(exp(fma(t_1, y_46_re, Float64(atan(x_46_im, x_46_re) * Float64(-y_46_im)))) * sin(fma(t_1, y_46_im, t_0))); else tmp = Float64((hypot(x_46_re, x_46_im) ^ y_46_re) * sin((cbrt(Float64(y_46_im * log(hypot(x_46_im, x_46_re)))) ^ 3.0))); end return tmp end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[Log[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision]], $MachinePrecision]}, If[LessEqual[y$46$re, -1e+131], N[(N[Exp[N[(N[(y$46$re * N[Log[N[Sqrt[N[(N[(x$46$re * x$46$re), $MachinePrecision] + N[(x$46$im * x$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision] - N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Sin[N[Abs[t$95$0], $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$re, 6.9e+19], N[(N[Exp[N[(t$95$1 * y$46$re + N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * (-y$46$im)), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Sin[N[(t$95$1 * y$46$im + t$95$0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(N[Power[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision], y$46$re], $MachinePrecision] * N[Sin[N[Power[N[Power[N[(y$46$im * N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]), $MachinePrecision], 1/3], $MachinePrecision], 3.0], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
t_1 := \log \left(\mathsf{hypot}\left(x.re, x.im\right)\right)\\
\mathbf{if}\;y.re \leq -1 \cdot 10^{+131}:\\
\;\;\;\;e^{y.re \cdot \log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \sin \left(\left|t\_0\right|\right)\\
\mathbf{elif}\;y.re \leq 6.9 \cdot 10^{+19}:\\
\;\;\;\;e^{\mathsf{fma}\left(t\_1, y.re, \tan^{-1}_* \frac{x.im}{x.re} \cdot \left(-y.im\right)\right)} \cdot \sin \left(\mathsf{fma}\left(t\_1, y.im, t\_0\right)\right)\\
\mathbf{else}:\\
\;\;\;\;{\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re} \cdot \sin \left({\left(\sqrt[3]{y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)}\right)}^{3}\right)\\
\end{array}
\end{array}
if y.re < -9.9999999999999991e130Initial program 32.3%
Taylor expanded in y.im around 0 71.0%
add-sqr-sqrt45.2%
sqrt-unprod35.5%
pow235.5%
*-commutative35.5%
Applied egg-rr35.5%
*-commutative35.5%
unpow235.5%
rem-sqrt-square90.3%
Simplified90.3%
if -9.9999999999999991e130 < y.re < 6.9e19Initial program 39.8%
fma-neg39.8%
hypot-def39.8%
distribute-rgt-neg-out39.8%
fma-def39.9%
hypot-def82.5%
*-commutative82.5%
Simplified82.5%
if 6.9e19 < y.re Initial program 32.8%
exp-diff22.4%
exp-to-pow22.4%
hypot-def22.4%
*-commutative22.4%
exp-prod20.7%
fma-def20.7%
hypot-def36.2%
*-commutative36.2%
Simplified36.2%
add-cube-cbrt46.6%
pow343.1%
fma-udef43.1%
*-commutative43.1%
*-commutative43.1%
fma-def43.1%
Applied egg-rr43.1%
Taylor expanded in y.im around 0 57.0%
Taylor expanded in y.re around 0 19.0%
unpow1/336.2%
unpow236.2%
unpow236.2%
hypot-def70.7%
Simplified70.7%
Final simplification80.8%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (* y.im (log (hypot x.im x.re))))
(t_1 (log (hypot x.re x.im)))
(t_2 (pow (hypot x.re x.im) y.re)))
(if (<= y.re -390.0)
(* (exp (fma t_1 y.re (* (atan2 x.im x.re) (- y.im)))) t_0)
(if (<= y.re 5.2e+17)
(*
(sin (fma t_1 y.im (* y.re (atan2 x.im x.re))))
(/ t_2 (pow (exp y.im) (atan2 x.im x.re))))
(* t_2 (sin (pow (cbrt t_0) 3.0)))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = y_46_im * log(hypot(x_46_im, x_46_re));
double t_1 = log(hypot(x_46_re, x_46_im));
double t_2 = pow(hypot(x_46_re, x_46_im), y_46_re);
double tmp;
if (y_46_re <= -390.0) {
tmp = exp(fma(t_1, y_46_re, (atan2(x_46_im, x_46_re) * -y_46_im))) * t_0;
} else if (y_46_re <= 5.2e+17) {
tmp = sin(fma(t_1, y_46_im, (y_46_re * atan2(x_46_im, x_46_re)))) * (t_2 / pow(exp(y_46_im), atan2(x_46_im, x_46_re)));
} else {
tmp = t_2 * sin(pow(cbrt(t_0), 3.0));
}
return tmp;
}
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = Float64(y_46_im * log(hypot(x_46_im, x_46_re))) t_1 = log(hypot(x_46_re, x_46_im)) t_2 = hypot(x_46_re, x_46_im) ^ y_46_re tmp = 0.0 if (y_46_re <= -390.0) tmp = Float64(exp(fma(t_1, y_46_re, Float64(atan(x_46_im, x_46_re) * Float64(-y_46_im)))) * t_0); elseif (y_46_re <= 5.2e+17) tmp = Float64(sin(fma(t_1, y_46_im, Float64(y_46_re * atan(x_46_im, x_46_re)))) * Float64(t_2 / (exp(y_46_im) ^ atan(x_46_im, x_46_re)))); else tmp = Float64(t_2 * sin((cbrt(t_0) ^ 3.0))); end return tmp end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[(y$46$im * N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[Log[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision]], $MachinePrecision]}, Block[{t$95$2 = N[Power[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision], y$46$re], $MachinePrecision]}, If[LessEqual[y$46$re, -390.0], N[(N[Exp[N[(t$95$1 * y$46$re + N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * (-y$46$im)), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * t$95$0), $MachinePrecision], If[LessEqual[y$46$re, 5.2e+17], N[(N[Sin[N[(t$95$1 * y$46$im + N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(t$95$2 / N[Power[N[Exp[y$46$im], $MachinePrecision], N[ArcTan[x$46$im / x$46$re], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t$95$2 * N[Sin[N[Power[N[Power[t$95$0, 1/3], $MachinePrecision], 3.0], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\\
t_1 := \log \left(\mathsf{hypot}\left(x.re, x.im\right)\right)\\
t_2 := {\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re}\\
\mathbf{if}\;y.re \leq -390:\\
\;\;\;\;e^{\mathsf{fma}\left(t\_1, y.re, \tan^{-1}_* \frac{x.im}{x.re} \cdot \left(-y.im\right)\right)} \cdot t\_0\\
\mathbf{elif}\;y.re \leq 5.2 \cdot 10^{+17}:\\
\;\;\;\;\sin \left(\mathsf{fma}\left(t\_1, y.im, y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right) \cdot \frac{t\_2}{{\left(e^{y.im}\right)}^{\tan^{-1}_* \frac{x.im}{x.re}}}\\
\mathbf{else}:\\
\;\;\;\;t\_2 \cdot \sin \left({\left(\sqrt[3]{t\_0}\right)}^{3}\right)\\
\end{array}
\end{array}
if y.re < -390Initial program 28.0%
fma-neg28.0%
hypot-def28.0%
distribute-rgt-neg-out28.0%
fma-def28.0%
hypot-def76.0%
*-commutative76.0%
Simplified76.0%
Taylor expanded in y.im around inf 36.0%
unpow236.0%
unpow236.0%
hypot-def86.0%
Simplified86.0%
Taylor expanded in y.im around 0 42.0%
unpow242.0%
unpow242.0%
hypot-def86.0%
rem-cbrt-cube34.0%
hypot-def34.0%
unpow234.0%
unpow234.0%
+-commutative34.0%
unpow234.0%
unpow234.0%
hypot-def34.0%
unpow1/334.0%
unpow1/334.0%
Simplified86.0%
if -390 < y.re < 5.2e17Initial program 42.3%
exp-diff42.3%
exp-to-pow42.3%
hypot-def42.3%
*-commutative42.3%
exp-prod41.8%
fma-def41.8%
hypot-def81.6%
*-commutative81.6%
Simplified81.6%
if 5.2e17 < y.re Initial program 32.8%
exp-diff22.4%
exp-to-pow22.4%
hypot-def22.4%
*-commutative22.4%
exp-prod20.7%
fma-def20.7%
hypot-def36.2%
*-commutative36.2%
Simplified36.2%
add-cube-cbrt46.6%
pow343.1%
fma-udef43.1%
*-commutative43.1%
*-commutative43.1%
fma-def43.1%
Applied egg-rr43.1%
Taylor expanded in y.im around 0 57.0%
Taylor expanded in y.re around 0 19.0%
unpow1/336.2%
unpow236.2%
unpow236.2%
hypot-def70.7%
Simplified70.7%
Final simplification80.0%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (log (hypot x.re x.im))))
(if (or (<= y.im -2.2e-30) (not (<= y.im 1.25e-57)))
(*
(exp (fma t_0 y.re (* (atan2 x.im x.re) (- y.im))))
(sin (* y.im (log (hypot x.im x.re)))))
(*
(sin (pow (cbrt (fma y.im t_0 (* y.re (atan2 x.im x.re)))) 3.0))
(pow (hypot x.re x.im) y.re)))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = log(hypot(x_46_re, x_46_im));
double tmp;
if ((y_46_im <= -2.2e-30) || !(y_46_im <= 1.25e-57)) {
tmp = exp(fma(t_0, y_46_re, (atan2(x_46_im, x_46_re) * -y_46_im))) * sin((y_46_im * log(hypot(x_46_im, x_46_re))));
} else {
tmp = sin(pow(cbrt(fma(y_46_im, t_0, (y_46_re * atan2(x_46_im, x_46_re)))), 3.0)) * pow(hypot(x_46_re, x_46_im), y_46_re);
}
return tmp;
}
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = log(hypot(x_46_re, x_46_im)) tmp = 0.0 if ((y_46_im <= -2.2e-30) || !(y_46_im <= 1.25e-57)) tmp = Float64(exp(fma(t_0, y_46_re, Float64(atan(x_46_im, x_46_re) * Float64(-y_46_im)))) * sin(Float64(y_46_im * log(hypot(x_46_im, x_46_re))))); else tmp = Float64(sin((cbrt(fma(y_46_im, t_0, Float64(y_46_re * atan(x_46_im, x_46_re)))) ^ 3.0)) * (hypot(x_46_re, x_46_im) ^ y_46_re)); end return tmp end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[Log[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision]], $MachinePrecision]}, If[Or[LessEqual[y$46$im, -2.2e-30], N[Not[LessEqual[y$46$im, 1.25e-57]], $MachinePrecision]], N[(N[Exp[N[(t$95$0 * y$46$re + N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * (-y$46$im)), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Sin[N[(y$46$im * N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(N[Sin[N[Power[N[Power[N[(y$46$im * t$95$0 + N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 1/3], $MachinePrecision], 3.0], $MachinePrecision]], $MachinePrecision] * N[Power[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision], y$46$re], $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \log \left(\mathsf{hypot}\left(x.re, x.im\right)\right)\\
\mathbf{if}\;y.im \leq -2.2 \cdot 10^{-30} \lor \neg \left(y.im \leq 1.25 \cdot 10^{-57}\right):\\
\;\;\;\;e^{\mathsf{fma}\left(t\_0, y.re, \tan^{-1}_* \frac{x.im}{x.re} \cdot \left(-y.im\right)\right)} \cdot \sin \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\sin \left({\left(\sqrt[3]{\mathsf{fma}\left(y.im, t\_0, y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)}\right)}^{3}\right) \cdot {\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re}\\
\end{array}
\end{array}
if y.im < -2.19999999999999983e-30 or 1.25e-57 < y.im Initial program 33.4%
fma-neg33.4%
hypot-def33.4%
distribute-rgt-neg-out33.4%
fma-def33.4%
hypot-def67.9%
*-commutative67.9%
Simplified67.9%
Taylor expanded in y.im around inf 34.8%
unpow234.8%
unpow234.8%
hypot-def70.7%
Simplified70.7%
if -2.19999999999999983e-30 < y.im < 1.25e-57Initial program 42.3%
exp-diff42.3%
exp-to-pow42.3%
hypot-def42.3%
*-commutative42.3%
exp-prod42.3%
fma-def42.4%
hypot-def82.9%
*-commutative82.9%
Simplified82.9%
add-cube-cbrt85.5%
pow385.5%
fma-udef85.5%
*-commutative85.5%
*-commutative85.5%
fma-def85.5%
Applied egg-rr85.5%
Taylor expanded in y.im around 0 85.5%
Final simplification77.3%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (log (hypot x.re x.im))))
(if (or (<= y.im -5.2e-5) (not (<= y.im 7.1e-59)))
(*
(exp (fma t_0 y.re (* (atan2 x.im x.re) (- y.im))))
(sin (* y.im (log (hypot x.im x.re)))))
(*
(sin (fma t_0 y.im (* y.re (atan2 x.im x.re))))
(/ (pow (hypot x.re x.im) y.re) (+ 1.0 (* (atan2 x.im x.re) y.im)))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = log(hypot(x_46_re, x_46_im));
double tmp;
if ((y_46_im <= -5.2e-5) || !(y_46_im <= 7.1e-59)) {
tmp = exp(fma(t_0, y_46_re, (atan2(x_46_im, x_46_re) * -y_46_im))) * sin((y_46_im * log(hypot(x_46_im, x_46_re))));
} else {
tmp = sin(fma(t_0, y_46_im, (y_46_re * atan2(x_46_im, x_46_re)))) * (pow(hypot(x_46_re, x_46_im), y_46_re) / (1.0 + (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 = log(hypot(x_46_re, x_46_im)) tmp = 0.0 if ((y_46_im <= -5.2e-5) || !(y_46_im <= 7.1e-59)) tmp = Float64(exp(fma(t_0, y_46_re, Float64(atan(x_46_im, x_46_re) * Float64(-y_46_im)))) * sin(Float64(y_46_im * log(hypot(x_46_im, x_46_re))))); else tmp = Float64(sin(fma(t_0, y_46_im, Float64(y_46_re * atan(x_46_im, x_46_re)))) * Float64((hypot(x_46_re, x_46_im) ^ y_46_re) / Float64(1.0 + 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[Log[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision]], $MachinePrecision]}, If[Or[LessEqual[y$46$im, -5.2e-5], N[Not[LessEqual[y$46$im, 7.1e-59]], $MachinePrecision]], N[(N[Exp[N[(t$95$0 * y$46$re + N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * (-y$46$im)), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Sin[N[(y$46$im * N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(N[Sin[N[(t$95$0 * y$46$im + N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(N[Power[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision], y$46$re], $MachinePrecision] / N[(1.0 + 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 := \log \left(\mathsf{hypot}\left(x.re, x.im\right)\right)\\
\mathbf{if}\;y.im \leq -5.2 \cdot 10^{-5} \lor \neg \left(y.im \leq 7.1 \cdot 10^{-59}\right):\\
\;\;\;\;e^{\mathsf{fma}\left(t\_0, y.re, \tan^{-1}_* \frac{x.im}{x.re} \cdot \left(-y.im\right)\right)} \cdot \sin \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\sin \left(\mathsf{fma}\left(t\_0, y.im, y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right) \cdot \frac{{\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re}}{1 + \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}\\
\end{array}
\end{array}
if y.im < -5.19999999999999968e-5 or 7.0999999999999997e-59 < y.im Initial program 33.4%
fma-neg33.4%
hypot-def33.4%
distribute-rgt-neg-out33.4%
fma-def33.4%
hypot-def66.5%
*-commutative66.5%
Simplified66.5%
Taylor expanded in y.im around inf 34.8%
unpow234.8%
unpow234.8%
hypot-def69.5%
Simplified69.5%
if -5.19999999999999968e-5 < y.im < 7.0999999999999997e-59Initial program 41.9%
exp-diff41.9%
exp-to-pow41.9%
hypot-def41.9%
*-commutative41.9%
exp-prod41.9%
fma-def41.9%
hypot-def83.8%
*-commutative83.8%
Simplified83.8%
Taylor expanded in y.im around 0 83.8%
Final simplification76.1%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (log (hypot x.re x.im))))
(if (or (<= y.im -2e-17) (not (<= y.im 7.2e-59)))
(*
(exp (fma t_0 y.re (* (atan2 x.im x.re) (- y.im))))
(sin (* y.im (log (hypot x.im x.re)))))
(*
(sin (fma t_0 y.im (* y.re (atan2 x.im x.re))))
(pow (hypot x.re x.im) y.re)))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = log(hypot(x_46_re, x_46_im));
double tmp;
if ((y_46_im <= -2e-17) || !(y_46_im <= 7.2e-59)) {
tmp = exp(fma(t_0, y_46_re, (atan2(x_46_im, x_46_re) * -y_46_im))) * sin((y_46_im * log(hypot(x_46_im, x_46_re))));
} else {
tmp = sin(fma(t_0, y_46_im, (y_46_re * atan2(x_46_im, x_46_re)))) * pow(hypot(x_46_re, x_46_im), y_46_re);
}
return tmp;
}
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = log(hypot(x_46_re, x_46_im)) tmp = 0.0 if ((y_46_im <= -2e-17) || !(y_46_im <= 7.2e-59)) tmp = Float64(exp(fma(t_0, y_46_re, Float64(atan(x_46_im, x_46_re) * Float64(-y_46_im)))) * sin(Float64(y_46_im * log(hypot(x_46_im, x_46_re))))); else tmp = Float64(sin(fma(t_0, y_46_im, Float64(y_46_re * atan(x_46_im, x_46_re)))) * (hypot(x_46_re, x_46_im) ^ y_46_re)); end return tmp end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[Log[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision]], $MachinePrecision]}, If[Or[LessEqual[y$46$im, -2e-17], N[Not[LessEqual[y$46$im, 7.2e-59]], $MachinePrecision]], N[(N[Exp[N[(t$95$0 * y$46$re + N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * (-y$46$im)), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Sin[N[(y$46$im * N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(N[Sin[N[(t$95$0 * y$46$im + N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Power[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision], y$46$re], $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \log \left(\mathsf{hypot}\left(x.re, x.im\right)\right)\\
\mathbf{if}\;y.im \leq -2 \cdot 10^{-17} \lor \neg \left(y.im \leq 7.2 \cdot 10^{-59}\right):\\
\;\;\;\;e^{\mathsf{fma}\left(t\_0, y.re, \tan^{-1}_* \frac{x.im}{x.re} \cdot \left(-y.im\right)\right)} \cdot \sin \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\sin \left(\mathsf{fma}\left(t\_0, y.im, y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right) \cdot {\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re}\\
\end{array}
\end{array}
if y.im < -2.00000000000000014e-17 or 7.20000000000000001e-59 < y.im Initial program 34.3%
fma-neg34.3%
hypot-def34.3%
distribute-rgt-neg-out34.3%
fma-def34.3%
hypot-def67.0%
*-commutative67.0%
Simplified67.0%
Taylor expanded in y.im around inf 35.8%
unpow235.8%
unpow235.8%
hypot-def69.9%
Simplified69.9%
if -2.00000000000000014e-17 < y.im < 7.20000000000000001e-59Initial program 40.9%
exp-diff40.9%
exp-to-pow40.9%
hypot-def40.9%
*-commutative40.9%
exp-prod40.9%
fma-def40.9%
hypot-def83.5%
*-commutative83.5%
Simplified83.5%
Taylor expanded in y.im around 0 83.5%
Final simplification76.1%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (* (atan2 x.im x.re) (- y.im)))
(t_1 (* y.im (log (hypot x.im x.re))))
(t_2 (log (hypot x.re x.im)))
(t_3 (* (exp (fma t_2 y.re t_0)) t_1)))
(if (<= y.im -1e-18)
t_3
(if (<= y.im 6.2e-61)
(*
(sin (fma t_2 y.im (* y.re (atan2 x.im x.re))))
(pow (hypot x.re x.im) y.re))
(if (<= y.im 6.5e+79)
t_3
(if (<= y.im 3e+219)
(*
(exp
(-
(* y.re (log (sqrt (+ (* x.re x.re) (* x.im x.im)))))
(* (atan2 x.im x.re) y.im)))
(sin t_1))
(* y.re (* (atan2 x.im x.re) (exp t_0)))))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = atan2(x_46_im, x_46_re) * -y_46_im;
double t_1 = y_46_im * log(hypot(x_46_im, x_46_re));
double t_2 = log(hypot(x_46_re, x_46_im));
double t_3 = exp(fma(t_2, y_46_re, t_0)) * t_1;
double tmp;
if (y_46_im <= -1e-18) {
tmp = t_3;
} else if (y_46_im <= 6.2e-61) {
tmp = sin(fma(t_2, y_46_im, (y_46_re * atan2(x_46_im, x_46_re)))) * pow(hypot(x_46_re, x_46_im), y_46_re);
} else if (y_46_im <= 6.5e+79) {
tmp = t_3;
} else if (y_46_im <= 3e+219) {
tmp = exp(((y_46_re * log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))) - (atan2(x_46_im, x_46_re) * y_46_im))) * sin(t_1);
} else {
tmp = y_46_re * (atan2(x_46_im, x_46_re) * exp(t_0));
}
return tmp;
}
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = Float64(atan(x_46_im, x_46_re) * Float64(-y_46_im)) t_1 = Float64(y_46_im * log(hypot(x_46_im, x_46_re))) t_2 = log(hypot(x_46_re, x_46_im)) t_3 = Float64(exp(fma(t_2, y_46_re, t_0)) * t_1) tmp = 0.0 if (y_46_im <= -1e-18) tmp = t_3; elseif (y_46_im <= 6.2e-61) tmp = Float64(sin(fma(t_2, y_46_im, Float64(y_46_re * atan(x_46_im, x_46_re)))) * (hypot(x_46_re, x_46_im) ^ y_46_re)); elseif (y_46_im <= 6.5e+79) tmp = t_3; elseif (y_46_im <= 3e+219) tmp = Float64(exp(Float64(Float64(y_46_re * log(sqrt(Float64(Float64(x_46_re * x_46_re) + Float64(x_46_im * x_46_im))))) - Float64(atan(x_46_im, x_46_re) * y_46_im))) * sin(t_1)); else tmp = Float64(y_46_re * Float64(atan(x_46_im, x_46_re) * exp(t_0))); end return tmp end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * (-y$46$im)), $MachinePrecision]}, Block[{t$95$1 = N[(y$46$im * N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[Log[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision]], $MachinePrecision]}, Block[{t$95$3 = N[(N[Exp[N[(t$95$2 * y$46$re + t$95$0), $MachinePrecision]], $MachinePrecision] * t$95$1), $MachinePrecision]}, If[LessEqual[y$46$im, -1e-18], t$95$3, If[LessEqual[y$46$im, 6.2e-61], N[(N[Sin[N[(t$95$2 * y$46$im + N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Power[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision], y$46$re], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$im, 6.5e+79], t$95$3, If[LessEqual[y$46$im, 3e+219], N[(N[Exp[N[(N[(y$46$re * N[Log[N[Sqrt[N[(N[(x$46$re * x$46$re), $MachinePrecision] + N[(x$46$im * x$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision] - N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Sin[t$95$1], $MachinePrecision]), $MachinePrecision], N[(y$46$re * N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * N[Exp[t$95$0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \tan^{-1}_* \frac{x.im}{x.re} \cdot \left(-y.im\right)\\
t_1 := y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\\
t_2 := \log \left(\mathsf{hypot}\left(x.re, x.im\right)\right)\\
t_3 := e^{\mathsf{fma}\left(t\_2, y.re, t\_0\right)} \cdot t\_1\\
\mathbf{if}\;y.im \leq -1 \cdot 10^{-18}:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;y.im \leq 6.2 \cdot 10^{-61}:\\
\;\;\;\;\sin \left(\mathsf{fma}\left(t\_2, y.im, y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right) \cdot {\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re}\\
\mathbf{elif}\;y.im \leq 6.5 \cdot 10^{+79}:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;y.im \leq 3 \cdot 10^{+219}:\\
\;\;\;\;e^{y.re \cdot \log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \sin t\_1\\
\mathbf{else}:\\
\;\;\;\;y.re \cdot \left(\tan^{-1}_* \frac{x.im}{x.re} \cdot e^{t\_0}\right)\\
\end{array}
\end{array}
if y.im < -1.0000000000000001e-18 or 6.1999999999999999e-61 < y.im < 6.49999999999999954e79Initial program 32.0%
fma-neg32.0%
hypot-def32.0%
distribute-rgt-neg-out32.0%
fma-def32.0%
hypot-def64.1%
*-commutative64.1%
Simplified64.1%
Taylor expanded in y.im around inf 35.2%
unpow235.2%
unpow235.2%
hypot-def68.3%
Simplified68.3%
Taylor expanded in y.im around 0 47.7%
unpow247.7%
unpow247.7%
hypot-def68.7%
rem-cbrt-cube40.3%
hypot-def40.3%
unpow240.3%
unpow240.3%
+-commutative40.3%
unpow240.3%
unpow240.3%
hypot-def40.3%
unpow1/340.3%
unpow1/340.3%
Simplified68.7%
if -1.0000000000000001e-18 < y.im < 6.1999999999999999e-61Initial program 40.9%
exp-diff40.9%
exp-to-pow40.9%
hypot-def40.9%
*-commutative40.9%
exp-prod40.9%
fma-def40.9%
hypot-def83.5%
*-commutative83.5%
Simplified83.5%
Taylor expanded in y.im around 0 83.5%
if 6.49999999999999954e79 < y.im < 2.9999999999999997e219Initial program 39.0%
Taylor expanded in y.re around 0 39.0%
unpow239.0%
unpow239.0%
hypot-def66.8%
Simplified66.8%
if 2.9999999999999997e219 < y.im Initial program 40.0%
Taylor expanded in y.im around 0 73.6%
*-commutative73.6%
expm1-log1p-u67.0%
Applied egg-rr67.0%
Taylor expanded in y.re around 0 86.8%
*-commutative86.8%
distribute-lft-neg-in86.8%
Simplified86.8%
Final simplification76.3%
(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 (* t_0 (sin t_1))))
(if (<= y.re -24000000000.0)
t_2
(if (<= y.re 5.2e-282)
(* y.re (* (atan2 x.im x.re) (exp (* (atan2 x.im x.re) (- y.im)))))
(if (<= y.re 9.5e-218)
t_2
(if (<= y.re 170.0)
(*
(/ t_0 (pow (exp y.im) (atan2 x.im x.re)))
(sin (* y.re (atan2 x.im x.re))))
(* t_0 (sin (pow (cbrt t_1) 3.0)))))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = 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 = t_0 * sin(t_1);
double tmp;
if (y_46_re <= -24000000000.0) {
tmp = t_2;
} else if (y_46_re <= 5.2e-282) {
tmp = y_46_re * (atan2(x_46_im, x_46_re) * exp((atan2(x_46_im, x_46_re) * -y_46_im)));
} else if (y_46_re <= 9.5e-218) {
tmp = t_2;
} else if (y_46_re <= 170.0) {
tmp = (t_0 / pow(exp(y_46_im), atan2(x_46_im, x_46_re))) * sin((y_46_re * atan2(x_46_im, x_46_re)));
} else {
tmp = t_0 * sin(pow(cbrt(t_1), 3.0));
}
return tmp;
}
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = Math.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 = t_0 * Math.sin(t_1);
double tmp;
if (y_46_re <= -24000000000.0) {
tmp = t_2;
} else if (y_46_re <= 5.2e-282) {
tmp = y_46_re * (Math.atan2(x_46_im, x_46_re) * Math.exp((Math.atan2(x_46_im, x_46_re) * -y_46_im)));
} else if (y_46_re <= 9.5e-218) {
tmp = t_2;
} else if (y_46_re <= 170.0) {
tmp = (t_0 / Math.pow(Math.exp(y_46_im), Math.atan2(x_46_im, x_46_re))) * Math.sin((y_46_re * Math.atan2(x_46_im, x_46_re)));
} else {
tmp = t_0 * Math.sin(Math.pow(Math.cbrt(t_1), 3.0));
}
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 = Float64(t_0 * sin(t_1)) tmp = 0.0 if (y_46_re <= -24000000000.0) tmp = t_2; elseif (y_46_re <= 5.2e-282) tmp = Float64(y_46_re * Float64(atan(x_46_im, x_46_re) * exp(Float64(atan(x_46_im, x_46_re) * Float64(-y_46_im))))); elseif (y_46_re <= 9.5e-218) tmp = t_2; elseif (y_46_re <= 170.0) tmp = Float64(Float64(t_0 / (exp(y_46_im) ^ atan(x_46_im, x_46_re))) * sin(Float64(y_46_re * atan(x_46_im, x_46_re)))); else tmp = Float64(t_0 * sin((cbrt(t_1) ^ 3.0))); end return tmp end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[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[(t$95$0 * N[Sin[t$95$1], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y$46$re, -24000000000.0], t$95$2, If[LessEqual[y$46$re, 5.2e-282], N[(y$46$re * N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * N[Exp[N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * (-y$46$im)), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$re, 9.5e-218], t$95$2, If[LessEqual[y$46$re, 170.0], N[(N[(t$95$0 / N[Power[N[Exp[y$46$im], $MachinePrecision], N[ArcTan[x$46$im / x$46$re], $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * N[Sin[N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(t$95$0 * N[Sin[N[Power[N[Power[t$95$1, 1/3], $MachinePrecision], 3.0], $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 := t\_0 \cdot \sin t\_1\\
\mathbf{if}\;y.re \leq -24000000000:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;y.re \leq 5.2 \cdot 10^{-282}:\\
\;\;\;\;y.re \cdot \left(\tan^{-1}_* \frac{x.im}{x.re} \cdot e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot \left(-y.im\right)}\right)\\
\mathbf{elif}\;y.re \leq 9.5 \cdot 10^{-218}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;y.re \leq 170:\\
\;\;\;\;\frac{t\_0}{{\left(e^{y.im}\right)}^{\tan^{-1}_* \frac{x.im}{x.re}}} \cdot \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\\
\mathbf{else}:\\
\;\;\;\;t\_0 \cdot \sin \left({\left(\sqrt[3]{t\_1}\right)}^{3}\right)\\
\end{array}
\end{array}
if y.re < -2.4e10 or 5.20000000000000025e-282 < y.re < 9.49999999999999967e-218Initial program 32.8%
exp-diff31.2%
exp-to-pow31.2%
hypot-def31.2%
*-commutative31.2%
exp-prod31.2%
fma-def31.2%
hypot-def71.8%
*-commutative71.8%
Simplified71.8%
add-cube-cbrt74.5%
pow374.5%
fma-udef74.5%
*-commutative74.5%
*-commutative74.5%
fma-def74.5%
Applied egg-rr74.5%
Taylor expanded in y.im around 0 79.3%
Taylor expanded in y.re around 0 37.8%
pow-base-137.8%
*-lft-identity37.8%
+-commutative37.8%
unpow237.8%
unpow237.8%
hypot-def83.5%
hypot-def37.8%
unpow237.8%
unpow237.8%
+-commutative37.8%
unpow237.8%
unpow237.8%
hypot-def83.5%
Simplified83.5%
if -2.4e10 < y.re < 5.20000000000000025e-282Initial program 46.8%
Taylor expanded in y.im around 0 47.7%
*-commutative47.7%
expm1-log1p-u47.7%
Applied egg-rr47.7%
Taylor expanded in y.re around 0 65.1%
*-commutative65.1%
distribute-lft-neg-in65.1%
Simplified65.1%
if 9.49999999999999967e-218 < y.re < 170Initial program 34.3%
exp-diff34.3%
exp-to-pow34.3%
hypot-def34.3%
*-commutative34.3%
exp-prod33.9%
fma-def33.9%
hypot-def74.4%
*-commutative74.4%
Simplified74.4%
add-cube-cbrt75.4%
pow378.8%
fma-udef78.8%
*-commutative78.8%
*-commutative78.8%
fma-def78.8%
Applied egg-rr78.8%
Taylor expanded in y.im around 0 58.7%
pow-base-158.7%
*-lft-identity58.7%
Simplified58.7%
if 170 < y.re Initial program 34.4%
exp-diff25.0%
exp-to-pow25.0%
hypot-def25.0%
*-commutative25.0%
exp-prod23.4%
fma-def23.4%
hypot-def42.2%
*-commutative42.2%
Simplified42.2%
add-cube-cbrt51.6%
pow348.4%
fma-udef48.4%
*-commutative48.4%
*-commutative48.4%
fma-def48.4%
Applied egg-rr48.4%
Taylor expanded in y.im around 0 61.0%
Taylor expanded in y.re around 0 17.2%
unpow1/337.5%
unpow237.5%
unpow237.5%
hypot-def71.9%
Simplified71.9%
Final simplification69.9%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (* y.im (log (hypot x.im x.re))))
(t_1
(*
(exp
(fma (log (hypot x.re x.im)) y.re (* (atan2 x.im x.re) (- y.im))))
t_0))
(t_2 (pow (hypot x.re x.im) y.re))
(t_3
(*
(/ t_2 (pow (exp y.im) (atan2 x.im x.re)))
(sin (* y.re (atan2 x.im x.re))))))
(if (<= y.re -2.6)
t_1
(if (<= y.re -2.5e-125)
t_3
(if (<= y.re 2.8e-126)
t_1
(if (<= y.re 150.0) t_3 (* t_2 (sin (pow (cbrt t_0) 3.0)))))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = y_46_im * log(hypot(x_46_im, x_46_re));
double t_1 = exp(fma(log(hypot(x_46_re, x_46_im)), y_46_re, (atan2(x_46_im, x_46_re) * -y_46_im))) * t_0;
double t_2 = pow(hypot(x_46_re, x_46_im), y_46_re);
double t_3 = (t_2 / pow(exp(y_46_im), atan2(x_46_im, x_46_re))) * sin((y_46_re * atan2(x_46_im, x_46_re)));
double tmp;
if (y_46_re <= -2.6) {
tmp = t_1;
} else if (y_46_re <= -2.5e-125) {
tmp = t_3;
} else if (y_46_re <= 2.8e-126) {
tmp = t_1;
} else if (y_46_re <= 150.0) {
tmp = t_3;
} else {
tmp = t_2 * sin(pow(cbrt(t_0), 3.0));
}
return tmp;
}
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = Float64(y_46_im * log(hypot(x_46_im, x_46_re))) t_1 = Float64(exp(fma(log(hypot(x_46_re, x_46_im)), y_46_re, Float64(atan(x_46_im, x_46_re) * Float64(-y_46_im)))) * t_0) t_2 = hypot(x_46_re, x_46_im) ^ y_46_re t_3 = Float64(Float64(t_2 / (exp(y_46_im) ^ atan(x_46_im, x_46_re))) * sin(Float64(y_46_re * atan(x_46_im, x_46_re)))) tmp = 0.0 if (y_46_re <= -2.6) tmp = t_1; elseif (y_46_re <= -2.5e-125) tmp = t_3; elseif (y_46_re <= 2.8e-126) tmp = t_1; elseif (y_46_re <= 150.0) tmp = t_3; else tmp = Float64(t_2 * sin((cbrt(t_0) ^ 3.0))); end return tmp end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[(y$46$im * N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(N[Exp[N[(N[Log[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision]], $MachinePrecision] * y$46$re + N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * (-y$46$im)), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * t$95$0), $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[(N[(t$95$2 / N[Power[N[Exp[y$46$im], $MachinePrecision], N[ArcTan[x$46$im / x$46$re], $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * N[Sin[N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y$46$re, -2.6], t$95$1, If[LessEqual[y$46$re, -2.5e-125], t$95$3, If[LessEqual[y$46$re, 2.8e-126], t$95$1, If[LessEqual[y$46$re, 150.0], t$95$3, N[(t$95$2 * N[Sin[N[Power[N[Power[t$95$0, 1/3], $MachinePrecision], 3.0], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\\
t_1 := e^{\mathsf{fma}\left(\log \left(\mathsf{hypot}\left(x.re, x.im\right)\right), y.re, \tan^{-1}_* \frac{x.im}{x.re} \cdot \left(-y.im\right)\right)} \cdot t\_0\\
t_2 := {\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re}\\
t_3 := \frac{t\_2}{{\left(e^{y.im}\right)}^{\tan^{-1}_* \frac{x.im}{x.re}}} \cdot \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\\
\mathbf{if}\;y.re \leq -2.6:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y.re \leq -2.5 \cdot 10^{-125}:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;y.re \leq 2.8 \cdot 10^{-126}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y.re \leq 150:\\
\;\;\;\;t\_3\\
\mathbf{else}:\\
\;\;\;\;t\_2 \cdot \sin \left({\left(\sqrt[3]{t\_0}\right)}^{3}\right)\\
\end{array}
\end{array}
if y.re < -2.60000000000000009 or -2.49999999999999983e-125 < y.re < 2.79999999999999992e-126Initial program 35.1%
fma-neg35.1%
hypot-def35.1%
distribute-rgt-neg-out35.1%
fma-def35.1%
hypot-def79.9%
*-commutative79.9%
Simplified79.9%
Taylor expanded in y.im around inf 35.4%
unpow235.4%
unpow235.4%
hypot-def79.5%
Simplified79.5%
Taylor expanded in y.im around 0 43.7%
unpow243.7%
unpow243.7%
hypot-def80.9%
rem-cbrt-cube34.3%
hypot-def34.3%
unpow234.3%
unpow234.3%
+-commutative34.3%
unpow234.3%
unpow234.3%
hypot-def34.3%
unpow1/334.4%
unpow1/334.3%
Simplified80.9%
if -2.60000000000000009 < y.re < -2.49999999999999983e-125 or 2.79999999999999992e-126 < y.re < 150Initial program 44.0%
exp-diff44.0%
exp-to-pow44.0%
hypot-def44.0%
*-commutative44.0%
exp-prod43.4%
fma-def43.5%
hypot-def79.7%
*-commutative79.7%
Simplified79.7%
add-cube-cbrt78.8%
pow378.9%
fma-udef78.9%
*-commutative78.9%
*-commutative78.9%
fma-def78.9%
Applied egg-rr78.9%
Taylor expanded in y.im around 0 71.0%
pow-base-171.0%
*-lft-identity71.0%
Simplified71.0%
if 150 < y.re Initial program 34.4%
exp-diff25.0%
exp-to-pow25.0%
hypot-def25.0%
*-commutative25.0%
exp-prod23.4%
fma-def23.4%
hypot-def42.2%
*-commutative42.2%
Simplified42.2%
add-cube-cbrt51.6%
pow348.4%
fma-udef48.4%
*-commutative48.4%
*-commutative48.4%
fma-def48.4%
Applied egg-rr48.4%
Taylor expanded in y.im around 0 61.0%
Taylor expanded in y.re around 0 17.2%
unpow1/337.5%
unpow237.5%
unpow237.5%
hypot-def71.9%
Simplified71.9%
Final simplification76.0%
(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.re x.im) y.re))
(t_2 (* y.im (log (hypot x.im x.re))))
(t_3 (* t_1 (sin t_2))))
(if (<= y.re -24000000000.0)
t_3
(if (<= y.re 5.7e-282)
t_0
(if (<= y.re 1.45e-216)
t_3
(if (<= y.re 100.0) t_0 (* t_1 (sin (pow (cbrt t_2) 3.0)))))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = 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_re, x_46_im), y_46_re);
double t_2 = y_46_im * log(hypot(x_46_im, x_46_re));
double t_3 = t_1 * sin(t_2);
double tmp;
if (y_46_re <= -24000000000.0) {
tmp = t_3;
} else if (y_46_re <= 5.7e-282) {
tmp = t_0;
} else if (y_46_re <= 1.45e-216) {
tmp = t_3;
} else if (y_46_re <= 100.0) {
tmp = t_0;
} else {
tmp = t_1 * sin(pow(cbrt(t_2), 3.0));
}
return tmp;
}
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = y_46_re * (Math.atan2(x_46_im, x_46_re) * Math.exp((Math.atan2(x_46_im, x_46_re) * -y_46_im)));
double t_1 = Math.pow(Math.hypot(x_46_re, x_46_im), y_46_re);
double t_2 = y_46_im * Math.log(Math.hypot(x_46_im, x_46_re));
double t_3 = t_1 * Math.sin(t_2);
double tmp;
if (y_46_re <= -24000000000.0) {
tmp = t_3;
} else if (y_46_re <= 5.7e-282) {
tmp = t_0;
} else if (y_46_re <= 1.45e-216) {
tmp = t_3;
} else if (y_46_re <= 100.0) {
tmp = t_0;
} else {
tmp = t_1 * Math.sin(Math.pow(Math.cbrt(t_2), 3.0));
}
return tmp;
}
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = Float64(y_46_re * Float64(atan(x_46_im, x_46_re) * exp(Float64(atan(x_46_im, x_46_re) * Float64(-y_46_im))))) t_1 = hypot(x_46_re, x_46_im) ^ y_46_re t_2 = Float64(y_46_im * log(hypot(x_46_im, x_46_re))) t_3 = Float64(t_1 * sin(t_2)) tmp = 0.0 if (y_46_re <= -24000000000.0) tmp = t_3; elseif (y_46_re <= 5.7e-282) tmp = t_0; elseif (y_46_re <= 1.45e-216) tmp = t_3; elseif (y_46_re <= 100.0) tmp = t_0; else tmp = Float64(t_1 * sin((cbrt(t_2) ^ 3.0))); end return tmp end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[(y$46$re * N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * N[Exp[N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * (-y$46$im)), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[Power[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision], y$46$re], $MachinePrecision]}, Block[{t$95$2 = N[(y$46$im * N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(t$95$1 * N[Sin[t$95$2], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y$46$re, -24000000000.0], t$95$3, If[LessEqual[y$46$re, 5.7e-282], t$95$0, If[LessEqual[y$46$re, 1.45e-216], t$95$3, If[LessEqual[y$46$re, 100.0], t$95$0, N[(t$95$1 * N[Sin[N[Power[N[Power[t$95$2, 1/3], $MachinePrecision], 3.0], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := y.re \cdot \left(\tan^{-1}_* \frac{x.im}{x.re} \cdot e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot \left(-y.im\right)}\right)\\
t_1 := {\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re}\\
t_2 := y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\\
t_3 := t\_1 \cdot \sin t\_2\\
\mathbf{if}\;y.re \leq -24000000000:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;y.re \leq 5.7 \cdot 10^{-282}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;y.re \leq 1.45 \cdot 10^{-216}:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;y.re \leq 100:\\
\;\;\;\;t\_0\\
\mathbf{else}:\\
\;\;\;\;t\_1 \cdot \sin \left({\left(\sqrt[3]{t\_2}\right)}^{3}\right)\\
\end{array}
\end{array}
if y.re < -2.4e10 or 5.7000000000000003e-282 < y.re < 1.45e-216Initial program 32.8%
exp-diff31.2%
exp-to-pow31.2%
hypot-def31.2%
*-commutative31.2%
exp-prod31.2%
fma-def31.2%
hypot-def71.8%
*-commutative71.8%
Simplified71.8%
add-cube-cbrt74.5%
pow374.5%
fma-udef74.5%
*-commutative74.5%
*-commutative74.5%
fma-def74.5%
Applied egg-rr74.5%
Taylor expanded in y.im around 0 79.3%
Taylor expanded in y.re around 0 37.8%
pow-base-137.8%
*-lft-identity37.8%
+-commutative37.8%
unpow237.8%
unpow237.8%
hypot-def83.5%
hypot-def37.8%
unpow237.8%
unpow237.8%
+-commutative37.8%
unpow237.8%
unpow237.8%
hypot-def83.5%
Simplified83.5%
if -2.4e10 < y.re < 5.7000000000000003e-282 or 1.45e-216 < y.re < 100Initial program 41.1%
Taylor expanded in y.im around 0 40.3%
*-commutative40.3%
expm1-log1p-u39.5%
Applied egg-rr39.5%
Taylor expanded in y.re around 0 59.9%
*-commutative59.9%
distribute-lft-neg-in59.9%
Simplified59.9%
if 100 < y.re Initial program 34.4%
exp-diff25.0%
exp-to-pow25.0%
hypot-def25.0%
*-commutative25.0%
exp-prod23.4%
fma-def23.4%
hypot-def42.2%
*-commutative42.2%
Simplified42.2%
add-cube-cbrt51.6%
pow348.4%
fma-udef48.4%
*-commutative48.4%
*-commutative48.4%
fma-def48.4%
Applied egg-rr48.4%
Taylor expanded in y.im around 0 61.0%
Taylor expanded in y.re around 0 17.2%
unpow1/337.5%
unpow237.5%
unpow237.5%
hypot-def71.9%
Simplified71.9%
Final simplification68.8%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (log (hypot x.re x.im))))
(if (or (<= y.im -2e-17) (not (<= y.im 6e-61)))
(*
(exp (fma t_0 y.re (* (atan2 x.im x.re) (- y.im))))
(* y.im (log (hypot x.im x.re))))
(*
(sin (fma t_0 y.im (* y.re (atan2 x.im x.re))))
(pow (hypot x.re x.im) y.re)))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = log(hypot(x_46_re, x_46_im));
double tmp;
if ((y_46_im <= -2e-17) || !(y_46_im <= 6e-61)) {
tmp = exp(fma(t_0, y_46_re, (atan2(x_46_im, x_46_re) * -y_46_im))) * (y_46_im * log(hypot(x_46_im, x_46_re)));
} else {
tmp = sin(fma(t_0, y_46_im, (y_46_re * atan2(x_46_im, x_46_re)))) * pow(hypot(x_46_re, x_46_im), y_46_re);
}
return tmp;
}
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = log(hypot(x_46_re, x_46_im)) tmp = 0.0 if ((y_46_im <= -2e-17) || !(y_46_im <= 6e-61)) tmp = Float64(exp(fma(t_0, y_46_re, Float64(atan(x_46_im, x_46_re) * Float64(-y_46_im)))) * Float64(y_46_im * log(hypot(x_46_im, x_46_re)))); else tmp = Float64(sin(fma(t_0, y_46_im, Float64(y_46_re * atan(x_46_im, x_46_re)))) * (hypot(x_46_re, x_46_im) ^ y_46_re)); end return tmp end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[Log[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision]], $MachinePrecision]}, If[Or[LessEqual[y$46$im, -2e-17], N[Not[LessEqual[y$46$im, 6e-61]], $MachinePrecision]], N[(N[Exp[N[(t$95$0 * y$46$re + N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * (-y$46$im)), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(y$46$im * N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[Sin[N[(t$95$0 * y$46$im + N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Power[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision], y$46$re], $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \log \left(\mathsf{hypot}\left(x.re, x.im\right)\right)\\
\mathbf{if}\;y.im \leq -2 \cdot 10^{-17} \lor \neg \left(y.im \leq 6 \cdot 10^{-61}\right):\\
\;\;\;\;e^{\mathsf{fma}\left(t\_0, y.re, \tan^{-1}_* \frac{x.im}{x.re} \cdot \left(-y.im\right)\right)} \cdot \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\sin \left(\mathsf{fma}\left(t\_0, y.im, y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right) \cdot {\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re}\\
\end{array}
\end{array}
if y.im < -2.00000000000000014e-17 or 6.00000000000000024e-61 < y.im Initial program 34.3%
fma-neg34.3%
hypot-def34.3%
distribute-rgt-neg-out34.3%
fma-def34.3%
hypot-def67.0%
*-commutative67.0%
Simplified67.0%
Taylor expanded in y.im around inf 35.8%
unpow235.8%
unpow235.8%
hypot-def69.9%
Simplified69.9%
Taylor expanded in y.im around 0 43.4%
unpow243.4%
unpow243.4%
hypot-def64.9%
rem-cbrt-cube36.9%
hypot-def36.9%
unpow236.9%
unpow236.9%
+-commutative36.9%
unpow236.9%
unpow236.9%
hypot-def36.9%
unpow1/336.9%
unpow1/336.9%
Simplified64.9%
if -2.00000000000000014e-17 < y.im < 6.00000000000000024e-61Initial program 40.9%
exp-diff40.9%
exp-to-pow40.9%
hypot-def40.9%
*-commutative40.9%
exp-prod40.9%
fma-def40.9%
hypot-def83.5%
*-commutative83.5%
Simplified83.5%
Taylor expanded in y.im around 0 83.5%
Final simplification73.4%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(if (or (<= y.re -24000000000.0)
(not
(or (<= y.re 2.3e-281)
(and (not (<= y.re 1.4e-216)) (<= y.re 130.0)))))
(* (pow (hypot x.re x.im) y.re) (sin (* y.im (log (hypot x.im x.re)))))
(* y.re (* (atan2 x.im x.re) (exp (* (atan2 x.im x.re) (- y.im)))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double tmp;
if ((y_46_re <= -24000000000.0) || !((y_46_re <= 2.3e-281) || (!(y_46_re <= 1.4e-216) && (y_46_re <= 130.0)))) {
tmp = pow(hypot(x_46_re, x_46_im), y_46_re) * sin((y_46_im * log(hypot(x_46_im, x_46_re))));
} else {
tmp = y_46_re * (atan2(x_46_im, x_46_re) * exp((atan2(x_46_im, x_46_re) * -y_46_im)));
}
return tmp;
}
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double tmp;
if ((y_46_re <= -24000000000.0) || !((y_46_re <= 2.3e-281) || (!(y_46_re <= 1.4e-216) && (y_46_re <= 130.0)))) {
tmp = Math.pow(Math.hypot(x_46_re, x_46_im), y_46_re) * Math.sin((y_46_im * Math.log(Math.hypot(x_46_im, x_46_re))));
} else {
tmp = y_46_re * (Math.atan2(x_46_im, x_46_re) * Math.exp((Math.atan2(x_46_im, x_46_re) * -y_46_im)));
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): tmp = 0 if (y_46_re <= -24000000000.0) or not ((y_46_re <= 2.3e-281) or (not (y_46_re <= 1.4e-216) and (y_46_re <= 130.0))): tmp = math.pow(math.hypot(x_46_re, x_46_im), y_46_re) * math.sin((y_46_im * math.log(math.hypot(x_46_im, x_46_re)))) else: tmp = y_46_re * (math.atan2(x_46_im, x_46_re) * math.exp((math.atan2(x_46_im, x_46_re) * -y_46_im))) return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) tmp = 0.0 if ((y_46_re <= -24000000000.0) || !((y_46_re <= 2.3e-281) || (!(y_46_re <= 1.4e-216) && (y_46_re <= 130.0)))) 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))))); else tmp = Float64(y_46_re * Float64(atan(x_46_im, x_46_re) * exp(Float64(atan(x_46_im, x_46_re) * Float64(-y_46_im))))); end return tmp end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im) tmp = 0.0; if ((y_46_re <= -24000000000.0) || ~(((y_46_re <= 2.3e-281) || (~((y_46_re <= 1.4e-216)) && (y_46_re <= 130.0))))) tmp = (hypot(x_46_re, x_46_im) ^ y_46_re) * sin((y_46_im * log(hypot(x_46_im, x_46_re)))); else tmp = y_46_re * (atan2(x_46_im, x_46_re) * exp((atan2(x_46_im, x_46_re) * -y_46_im))); end tmp_2 = tmp; end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := If[Or[LessEqual[y$46$re, -24000000000.0], N[Not[Or[LessEqual[y$46$re, 2.3e-281], And[N[Not[LessEqual[y$46$re, 1.4e-216]], $MachinePrecision], LessEqual[y$46$re, 130.0]]]], $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], N[(y$46$re * N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * N[Exp[N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * (-y$46$im)), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y.re \leq -24000000000 \lor \neg \left(y.re \leq 2.3 \cdot 10^{-281} \lor \neg \left(y.re \leq 1.4 \cdot 10^{-216}\right) \land y.re \leq 130\right):\\
\;\;\;\;{\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)\\
\mathbf{else}:\\
\;\;\;\;y.re \cdot \left(\tan^{-1}_* \frac{x.im}{x.re} \cdot e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot \left(-y.im\right)}\right)\\
\end{array}
\end{array}
if y.re < -2.4e10 or 2.29999999999999989e-281 < y.re < 1.4e-216 or 130 < y.re Initial program 33.6%
exp-diff28.1%
exp-to-pow28.1%
hypot-def28.1%
*-commutative28.1%
exp-prod27.3%
fma-def27.3%
hypot-def57.0%
*-commutative57.0%
Simplified57.0%
add-cube-cbrt63.0%
pow361.5%
fma-udef61.5%
*-commutative61.5%
*-commutative61.5%
fma-def61.5%
Applied egg-rr61.5%
Taylor expanded in y.im around 0 70.1%
Taylor expanded in y.re around 0 37.6%
pow-base-137.6%
*-lft-identity37.6%
+-commutative37.6%
unpow237.6%
unpow237.6%
hypot-def75.4%
hypot-def37.6%
unpow237.6%
unpow237.6%
+-commutative37.6%
unpow237.6%
unpow237.6%
hypot-def75.4%
Simplified75.4%
if -2.4e10 < y.re < 2.29999999999999989e-281 or 1.4e-216 < y.re < 130Initial program 41.1%
Taylor expanded in y.im around 0 40.3%
*-commutative40.3%
expm1-log1p-u39.5%
Applied egg-rr39.5%
Taylor expanded in y.re around 0 59.9%
*-commutative59.9%
distribute-lft-neg-in59.9%
Simplified59.9%
Final simplification67.6%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (pow (hypot x.im x.re) y.re)))
(if (<= y.re -24000000000.0)
(log (pow (pow x.re y.im) t_0))
(if (<= y.re 0.048)
(* y.re (* (atan2 x.im x.re) (exp (* (atan2 x.im x.re) (- y.im)))))
(* (sin (* y.re (atan2 x.im x.re))) t_0)))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = pow(hypot(x_46_im, x_46_re), y_46_re);
double tmp;
if (y_46_re <= -24000000000.0) {
tmp = log(pow(pow(x_46_re, y_46_im), t_0));
} else if (y_46_re <= 0.048) {
tmp = y_46_re * (atan2(x_46_im, x_46_re) * exp((atan2(x_46_im, x_46_re) * -y_46_im)));
} else {
tmp = sin((y_46_re * atan2(x_46_im, x_46_re))) * t_0;
}
return tmp;
}
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = Math.pow(Math.hypot(x_46_im, x_46_re), y_46_re);
double tmp;
if (y_46_re <= -24000000000.0) {
tmp = Math.log(Math.pow(Math.pow(x_46_re, y_46_im), t_0));
} else if (y_46_re <= 0.048) {
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 = Math.sin((y_46_re * Math.atan2(x_46_im, x_46_re))) * t_0;
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): t_0 = math.pow(math.hypot(x_46_im, x_46_re), y_46_re) tmp = 0 if y_46_re <= -24000000000.0: tmp = math.log(math.pow(math.pow(x_46_re, y_46_im), t_0)) elif y_46_re <= 0.048: 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 = math.sin((y_46_re * math.atan2(x_46_im, x_46_re))) * t_0 return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = hypot(x_46_im, x_46_re) ^ y_46_re tmp = 0.0 if (y_46_re <= -24000000000.0) tmp = log(((x_46_re ^ y_46_im) ^ t_0)); elseif (y_46_re <= 0.048) tmp = Float64(y_46_re * Float64(atan(x_46_im, x_46_re) * exp(Float64(atan(x_46_im, x_46_re) * Float64(-y_46_im))))); else tmp = Float64(sin(Float64(y_46_re * atan(x_46_im, x_46_re))) * t_0); end return tmp end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = hypot(x_46_im, x_46_re) ^ y_46_re; tmp = 0.0; if (y_46_re <= -24000000000.0) tmp = log(((x_46_re ^ y_46_im) ^ t_0)); elseif (y_46_re <= 0.048) tmp = y_46_re * (atan2(x_46_im, x_46_re) * exp((atan2(x_46_im, x_46_re) * -y_46_im))); else tmp = sin((y_46_re * atan2(x_46_im, x_46_re))) * t_0; end tmp_2 = tmp; end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[Power[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision], y$46$re], $MachinePrecision]}, If[LessEqual[y$46$re, -24000000000.0], N[Log[N[Power[N[Power[x$46$re, y$46$im], $MachinePrecision], t$95$0], $MachinePrecision]], $MachinePrecision], If[LessEqual[y$46$re, 0.048], N[(y$46$re * N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * N[Exp[N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * (-y$46$im)), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[Sin[N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * t$95$0), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := {\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re}\\
\mathbf{if}\;y.re \leq -24000000000:\\
\;\;\;\;\log \left({\left({x.re}^{y.im}\right)}^{t\_0}\right)\\
\mathbf{elif}\;y.re \leq 0.048:\\
\;\;\;\;y.re \cdot \left(\tan^{-1}_* \frac{x.im}{x.re} \cdot e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot \left(-y.im\right)}\right)\\
\mathbf{else}:\\
\;\;\;\;\sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot t\_0\\
\end{array}
\end{array}
if y.re < -2.4e10Initial program 29.2%
exp-diff27.1%
exp-to-pow27.1%
hypot-def27.1%
*-commutative27.1%
exp-prod27.1%
fma-def27.1%
hypot-def64.6%
*-commutative64.6%
Simplified64.6%
Taylor expanded in x.im around 0 31.3%
Taylor expanded in y.re around 0 35.4%
Taylor expanded in y.im around 0 39.6%
associate-*r*39.6%
unpow239.6%
unpow239.6%
hypot-def39.6%
Simplified39.6%
add-log-exp39.6%
exp-prod71.0%
*-commutative71.0%
exp-to-pow75.2%
Applied egg-rr75.2%
if -2.4e10 < y.re < 0.048000000000000001Initial program 41.2%
Taylor expanded in y.im around 0 35.9%
*-commutative35.9%
expm1-log1p-u35.9%
Applied egg-rr35.9%
Taylor expanded in y.re around 0 55.8%
*-commutative55.8%
distribute-lft-neg-in55.8%
Simplified55.8%
if 0.048000000000000001 < y.re Initial program 34.8%
Taylor expanded in y.im around 0 51.6%
*-commutative51.6%
expm1-log1p-u31.9%
Applied egg-rr31.9%
Taylor expanded in y.im around 0 51.6%
unpow251.6%
unpow251.6%
hypot-def53.1%
Simplified53.1%
Final simplification58.7%
(FPCore (x.re x.im y.re y.im) :precision binary64 (if (or (<= y.re -24000000000.0) (not (<= y.re 0.065))) (* (sin (* y.re (atan2 x.im x.re))) (pow (hypot x.im x.re) y.re)) (* y.re (* (atan2 x.im x.re) (exp (* (atan2 x.im x.re) (- y.im)))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double tmp;
if ((y_46_re <= -24000000000.0) || !(y_46_re <= 0.065)) {
tmp = sin((y_46_re * atan2(x_46_im, x_46_re))) * pow(hypot(x_46_im, x_46_re), y_46_re);
} else {
tmp = y_46_re * (atan2(x_46_im, x_46_re) * exp((atan2(x_46_im, x_46_re) * -y_46_im)));
}
return tmp;
}
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double tmp;
if ((y_46_re <= -24000000000.0) || !(y_46_re <= 0.065)) {
tmp = Math.sin((y_46_re * Math.atan2(x_46_im, x_46_re))) * Math.pow(Math.hypot(x_46_im, x_46_re), y_46_re);
} else {
tmp = y_46_re * (Math.atan2(x_46_im, x_46_re) * Math.exp((Math.atan2(x_46_im, x_46_re) * -y_46_im)));
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): tmp = 0 if (y_46_re <= -24000000000.0) or not (y_46_re <= 0.065): tmp = math.sin((y_46_re * math.atan2(x_46_im, x_46_re))) * math.pow(math.hypot(x_46_im, x_46_re), y_46_re) else: tmp = y_46_re * (math.atan2(x_46_im, x_46_re) * math.exp((math.atan2(x_46_im, x_46_re) * -y_46_im))) return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) tmp = 0.0 if ((y_46_re <= -24000000000.0) || !(y_46_re <= 0.065)) tmp = Float64(sin(Float64(y_46_re * atan(x_46_im, x_46_re))) * (hypot(x_46_im, x_46_re) ^ y_46_re)); else tmp = Float64(y_46_re * Float64(atan(x_46_im, x_46_re) * exp(Float64(atan(x_46_im, x_46_re) * Float64(-y_46_im))))); end return tmp end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im) tmp = 0.0; if ((y_46_re <= -24000000000.0) || ~((y_46_re <= 0.065))) tmp = sin((y_46_re * atan2(x_46_im, x_46_re))) * (hypot(x_46_im, x_46_re) ^ y_46_re); else tmp = y_46_re * (atan2(x_46_im, x_46_re) * exp((atan2(x_46_im, x_46_re) * -y_46_im))); end tmp_2 = tmp; end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := If[Or[LessEqual[y$46$re, -24000000000.0], N[Not[LessEqual[y$46$re, 0.065]], $MachinePrecision]], N[(N[Sin[N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Power[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision], y$46$re], $MachinePrecision]), $MachinePrecision], N[(y$46$re * N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * N[Exp[N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * (-y$46$im)), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y.re \leq -24000000000 \lor \neg \left(y.re \leq 0.065\right):\\
\;\;\;\;\sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re}\\
\mathbf{else}:\\
\;\;\;\;y.re \cdot \left(\tan^{-1}_* \frac{x.im}{x.re} \cdot e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot \left(-y.im\right)}\right)\\
\end{array}
\end{array}
if y.re < -2.4e10 or 0.065000000000000002 < y.re Initial program 32.5%
Taylor expanded in y.im around 0 59.7%
*-commutative59.7%
expm1-log1p-u36.9%
Applied egg-rr36.9%
Taylor expanded in y.im around 0 59.7%
unpow259.7%
unpow259.7%
hypot-def60.6%
Simplified60.6%
if -2.4e10 < y.re < 0.065000000000000002Initial program 41.2%
Taylor expanded in y.im around 0 35.9%
*-commutative35.9%
expm1-log1p-u35.9%
Applied egg-rr35.9%
Taylor expanded in y.re around 0 55.8%
*-commutative55.8%
distribute-lft-neg-in55.8%
Simplified55.8%
Final simplification57.9%
(FPCore (x.re x.im y.re y.im) :precision binary64 (if (<= x.re 4.7e-86) (* y.re (* (atan2 x.im x.re) (exp (* (atan2 x.im x.re) (- y.im))))) (* (pow (hypot x.im x.re) y.re) (* y.im (log x.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 <= 4.7e-86) {
tmp = y_46_re * (atan2(x_46_im, x_46_re) * exp((atan2(x_46_im, x_46_re) * -y_46_im)));
} else {
tmp = pow(hypot(x_46_im, x_46_re), y_46_re) * (y_46_im * log(x_46_re));
}
return tmp;
}
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double tmp;
if (x_46_re <= 4.7e-86) {
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 = Math.pow(Math.hypot(x_46_im, x_46_re), y_46_re) * (y_46_im * Math.log(x_46_re));
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): tmp = 0 if x_46_re <= 4.7e-86: 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 = math.pow(math.hypot(x_46_im, x_46_re), y_46_re) * (y_46_im * math.log(x_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 <= 4.7e-86) tmp = Float64(y_46_re * Float64(atan(x_46_im, x_46_re) * exp(Float64(atan(x_46_im, x_46_re) * Float64(-y_46_im))))); else tmp = Float64((hypot(x_46_im, x_46_re) ^ y_46_re) * Float64(y_46_im * log(x_46_re))); end return tmp end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im) tmp = 0.0; if (x_46_re <= 4.7e-86) tmp = y_46_re * (atan2(x_46_im, x_46_re) * exp((atan2(x_46_im, x_46_re) * -y_46_im))); else tmp = (hypot(x_46_im, x_46_re) ^ y_46_re) * (y_46_im * log(x_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, 4.7e-86], N[(y$46$re * N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * N[Exp[N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * (-y$46$im)), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[Power[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision], y$46$re], $MachinePrecision] * N[(y$46$im * N[Log[x$46$re], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x.re \leq 4.7 \cdot 10^{-86}:\\
\;\;\;\;y.re \cdot \left(\tan^{-1}_* \frac{x.im}{x.re} \cdot e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot \left(-y.im\right)}\right)\\
\mathbf{else}:\\
\;\;\;\;{\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re} \cdot \left(y.im \cdot \log x.re\right)\\
\end{array}
\end{array}
if x.re < 4.7000000000000001e-86Initial program 41.2%
Taylor expanded in y.im around 0 48.4%
*-commutative48.4%
expm1-log1p-u37.4%
Applied egg-rr37.4%
Taylor expanded in y.re around 0 42.2%
*-commutative42.2%
distribute-lft-neg-in42.2%
Simplified42.2%
if 4.7000000000000001e-86 < x.re Initial program 27.8%
exp-diff26.5%
exp-to-pow26.5%
hypot-def26.5%
*-commutative26.5%
exp-prod25.7%
fma-def25.7%
hypot-def68.9%
*-commutative68.9%
Simplified68.9%
Taylor expanded in x.im around 0 65.8%
Taylor expanded in y.re around 0 58.1%
Taylor expanded in y.im around 0 43.3%
associate-*r*43.3%
unpow243.3%
unpow243.3%
hypot-def49.0%
Simplified49.0%
Final simplification44.2%
(FPCore (x.re x.im y.re y.im) :precision binary64 (* (pow (hypot x.im x.re) y.re) (* y.im (log x.re))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
return pow(hypot(x_46_im, x_46_re), y_46_re) * (y_46_im * log(x_46_re));
}
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
return Math.pow(Math.hypot(x_46_im, x_46_re), y_46_re) * (y_46_im * Math.log(x_46_re));
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): return math.pow(math.hypot(x_46_im, x_46_re), y_46_re) * (y_46_im * math.log(x_46_re))
function code(x_46_re, x_46_im, y_46_re, y_46_im) return Float64((hypot(x_46_im, x_46_re) ^ y_46_re) * Float64(y_46_im * log(x_46_re))) end
function tmp = code(x_46_re, x_46_im, y_46_re, y_46_im) tmp = (hypot(x_46_im, x_46_re) ^ y_46_re) * (y_46_im * log(x_46_re)); end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := N[(N[Power[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision], y$46$re], $MachinePrecision] * N[(y$46$im * N[Log[x$46$re], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
{\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re} \cdot \left(y.im \cdot \log x.re\right)
\end{array}
Initial program 37.3%
exp-diff34.6%
exp-to-pow34.6%
hypot-def34.6%
*-commutative34.6%
exp-prod34.0%
fma-def34.0%
hypot-def67.5%
*-commutative67.5%
Simplified67.5%
Taylor expanded in x.im around 0 29.2%
Taylor expanded in y.re around 0 24.0%
Taylor expanded in y.im around 0 17.0%
associate-*r*17.0%
unpow217.0%
unpow217.0%
hypot-def17.3%
Simplified17.3%
Final simplification17.3%
(FPCore (x.re x.im y.re y.im) :precision binary64 (if (or (<= y.re -24000000000.0) (not (<= y.re 1.5e+28))) (* y.im (* (log x.re) (pow x.im y.re))) (* y.im (log x.re))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double tmp;
if ((y_46_re <= -24000000000.0) || !(y_46_re <= 1.5e+28)) {
tmp = y_46_im * (log(x_46_re) * pow(x_46_im, y_46_re));
} else {
tmp = y_46_im * log(x_46_re);
}
return tmp;
}
real(8) function code(x_46re, x_46im, y_46re, y_46im)
real(8), intent (in) :: x_46re
real(8), intent (in) :: x_46im
real(8), intent (in) :: y_46re
real(8), intent (in) :: y_46im
real(8) :: tmp
if ((y_46re <= (-24000000000.0d0)) .or. (.not. (y_46re <= 1.5d+28))) then
tmp = y_46im * (log(x_46re) * (x_46im ** y_46re))
else
tmp = y_46im * log(x_46re)
end if
code = tmp
end function
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double tmp;
if ((y_46_re <= -24000000000.0) || !(y_46_re <= 1.5e+28)) {
tmp = y_46_im * (Math.log(x_46_re) * Math.pow(x_46_im, y_46_re));
} else {
tmp = y_46_im * Math.log(x_46_re);
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): tmp = 0 if (y_46_re <= -24000000000.0) or not (y_46_re <= 1.5e+28): tmp = y_46_im * (math.log(x_46_re) * math.pow(x_46_im, y_46_re)) else: tmp = y_46_im * math.log(x_46_re) return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) tmp = 0.0 if ((y_46_re <= -24000000000.0) || !(y_46_re <= 1.5e+28)) tmp = Float64(y_46_im * Float64(log(x_46_re) * (x_46_im ^ y_46_re))); else tmp = Float64(y_46_im * log(x_46_re)); end return tmp end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im) tmp = 0.0; if ((y_46_re <= -24000000000.0) || ~((y_46_re <= 1.5e+28))) tmp = y_46_im * (log(x_46_re) * (x_46_im ^ y_46_re)); else tmp = y_46_im * log(x_46_re); end tmp_2 = tmp; end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := If[Or[LessEqual[y$46$re, -24000000000.0], N[Not[LessEqual[y$46$re, 1.5e+28]], $MachinePrecision]], N[(y$46$im * N[(N[Log[x$46$re], $MachinePrecision] * N[Power[x$46$im, y$46$re], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(y$46$im * N[Log[x$46$re], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y.re \leq -24000000000 \lor \neg \left(y.re \leq 1.5 \cdot 10^{+28}\right):\\
\;\;\;\;y.im \cdot \left(\log x.re \cdot {x.im}^{y.re}\right)\\
\mathbf{else}:\\
\;\;\;\;y.im \cdot \log x.re\\
\end{array}
\end{array}
if y.re < -2.4e10 or 1.5e28 < y.re Initial program 31.7%
exp-diff25.0%
exp-to-pow25.0%
hypot-def25.0%
*-commutative25.0%
exp-prod24.0%
fma-def24.0%
hypot-def49.0%
*-commutative49.0%
Simplified49.0%
Taylor expanded in x.im around 0 24.0%
Taylor expanded in y.re around 0 26.0%
Taylor expanded in y.im around 0 26.0%
associate-*r*26.0%
unpow226.0%
unpow226.0%
hypot-def26.0%
Simplified26.0%
Taylor expanded in x.re around 0 19.4%
if -2.4e10 < y.re < 1.5e28Initial program 41.1%
exp-diff41.1%
exp-to-pow41.1%
hypot-def41.1%
*-commutative41.1%
exp-prod40.7%
fma-def40.7%
hypot-def80.1%
*-commutative80.1%
Simplified80.1%
Taylor expanded in x.im around 0 32.7%
Taylor expanded in y.re around 0 22.6%
Taylor expanded in y.im around 0 10.9%
associate-*r*10.9%
unpow210.9%
unpow210.9%
hypot-def11.3%
Simplified11.3%
Taylor expanded in y.re around 0 9.1%
Final simplification13.3%
(FPCore (x.re x.im y.re y.im) :precision binary64 (if (<= x.im 6e-44) (* (* y.im (log x.re)) (pow x.re y.re)) (* y.im (* (log x.re) (pow x.im y.re)))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double tmp;
if (x_46_im <= 6e-44) {
tmp = (y_46_im * log(x_46_re)) * pow(x_46_re, y_46_re);
} else {
tmp = y_46_im * (log(x_46_re) * pow(x_46_im, 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_46im <= 6d-44) then
tmp = (y_46im * log(x_46re)) * (x_46re ** y_46re)
else
tmp = y_46im * (log(x_46re) * (x_46im ** 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_im <= 6e-44) {
tmp = (y_46_im * Math.log(x_46_re)) * Math.pow(x_46_re, y_46_re);
} else {
tmp = y_46_im * (Math.log(x_46_re) * Math.pow(x_46_im, y_46_re));
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): tmp = 0 if x_46_im <= 6e-44: tmp = (y_46_im * math.log(x_46_re)) * math.pow(x_46_re, y_46_re) else: tmp = y_46_im * (math.log(x_46_re) * math.pow(x_46_im, 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_im <= 6e-44) tmp = Float64(Float64(y_46_im * log(x_46_re)) * (x_46_re ^ y_46_re)); else tmp = Float64(y_46_im * Float64(log(x_46_re) * (x_46_im ^ y_46_re))); end return tmp end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im) tmp = 0.0; if (x_46_im <= 6e-44) tmp = (y_46_im * log(x_46_re)) * (x_46_re ^ y_46_re); else tmp = y_46_im * (log(x_46_re) * (x_46_im ^ 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$im, 6e-44], N[(N[(y$46$im * N[Log[x$46$re], $MachinePrecision]), $MachinePrecision] * N[Power[x$46$re, y$46$re], $MachinePrecision]), $MachinePrecision], N[(y$46$im * N[(N[Log[x$46$re], $MachinePrecision] * N[Power[x$46$im, y$46$re], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x.im \leq 6 \cdot 10^{-44}:\\
\;\;\;\;\left(y.im \cdot \log x.re\right) \cdot {x.re}^{y.re}\\
\mathbf{else}:\\
\;\;\;\;y.im \cdot \left(\log x.re \cdot {x.im}^{y.re}\right)\\
\end{array}
\end{array}
if x.im < 6.0000000000000005e-44Initial program 37.7%
exp-diff35.4%
exp-to-pow35.4%
hypot-def35.4%
*-commutative35.4%
exp-prod34.4%
fma-def34.5%
hypot-def66.0%
*-commutative66.0%
Simplified66.0%
Taylor expanded in x.im around 0 27.9%
Taylor expanded in y.re around 0 23.5%
Taylor expanded in y.im around 0 18.4%
associate-*r*18.4%
unpow218.4%
unpow218.4%
hypot-def19.8%
Simplified19.8%
Taylor expanded in x.im around 0 19.3%
associate-*r*19.3%
Simplified19.3%
if 6.0000000000000005e-44 < x.im Initial program 36.6%
exp-diff32.9%
exp-to-pow32.9%
hypot-def32.9%
*-commutative32.9%
exp-prod32.9%
fma-def32.9%
hypot-def70.7%
*-commutative70.7%
Simplified70.7%
Taylor expanded in x.im around 0 31.9%
Taylor expanded in y.re around 0 25.0%
Taylor expanded in y.im around 0 14.0%
associate-*r*14.0%
unpow214.0%
unpow214.0%
hypot-def11.8%
Simplified11.8%
Taylor expanded in x.re around 0 11.8%
Final simplification16.9%
(FPCore (x.re x.im y.re y.im) :precision binary64 (* y.im (log x.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_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_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_re);
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): return y_46_im * math.log(x_46_re)
function code(x_46_re, x_46_im, y_46_re, y_46_im) return Float64(y_46_im * log(x_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_re); end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := N[(y$46$im * N[Log[x$46$re], $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
y.im \cdot \log x.re
\end{array}
Initial program 37.3%
exp-diff34.6%
exp-to-pow34.6%
hypot-def34.6%
*-commutative34.6%
exp-prod34.0%
fma-def34.0%
hypot-def67.5%
*-commutative67.5%
Simplified67.5%
Taylor expanded in x.im around 0 29.2%
Taylor expanded in y.re around 0 24.0%
Taylor expanded in y.im around 0 17.0%
associate-*r*17.0%
unpow217.0%
unpow217.0%
hypot-def17.3%
Simplified17.3%
Taylor expanded in y.re around 0 5.9%
Final simplification5.9%
herbie shell --seed 2024040
(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)))))