
(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 15 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (log (sqrt (+ (* x.re x.re) (* x.im x.im))))))
(*
(exp (- (* t_0 y.re) (* (atan2 x.im x.re) y.im)))
(sin (+ (* t_0 y.im) (* (atan2 x.im x.re) y.re))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))));
return exp(((t_0 * y_46_re) - (atan2(x_46_im, x_46_re) * y_46_im))) * sin(((t_0 * y_46_im) + (atan2(x_46_im, x_46_re) * y_46_re)));
}
real(8) function code(x_46re, x_46im, y_46re, y_46im)
real(8), intent (in) :: x_46re
real(8), intent (in) :: x_46im
real(8), intent (in) :: y_46re
real(8), intent (in) :: y_46im
real(8) :: t_0
t_0 = log(sqrt(((x_46re * x_46re) + (x_46im * x_46im))))
code = exp(((t_0 * y_46re) - (atan2(x_46im, x_46re) * y_46im))) * sin(((t_0 * y_46im) + (atan2(x_46im, x_46re) * y_46re)))
end function
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = Math.log(Math.sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))));
return Math.exp(((t_0 * y_46_re) - (Math.atan2(x_46_im, x_46_re) * y_46_im))) * Math.sin(((t_0 * y_46_im) + (Math.atan2(x_46_im, x_46_re) * y_46_re)));
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): t_0 = math.log(math.sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im)))) return math.exp(((t_0 * y_46_re) - (math.atan2(x_46_im, x_46_re) * y_46_im))) * math.sin(((t_0 * y_46_im) + (math.atan2(x_46_im, x_46_re) * y_46_re)))
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = log(sqrt(Float64(Float64(x_46_re * x_46_re) + Float64(x_46_im * x_46_im)))) return Float64(exp(Float64(Float64(t_0 * y_46_re) - Float64(atan(x_46_im, x_46_re) * y_46_im))) * sin(Float64(Float64(t_0 * y_46_im) + Float64(atan(x_46_im, x_46_re) * y_46_re)))) end
function tmp = code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im)))); tmp = exp(((t_0 * y_46_re) - (atan2(x_46_im, x_46_re) * y_46_im))) * sin(((t_0 * y_46_im) + (atan2(x_46_im, x_46_re) * y_46_re))); end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[Log[N[Sqrt[N[(N[(x$46$re * x$46$re), $MachinePrecision] + N[(x$46$im * x$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]}, N[(N[Exp[N[(N[(t$95$0 * y$46$re), $MachinePrecision] - N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Sin[N[(N[(t$95$0 * y$46$im), $MachinePrecision] + N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$re), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right)\\
e^{t_0 \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \sin \left(t_0 \cdot y.im + \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)
\end{array}
\end{array}
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (* y.re (atan2 x.im x.re))) (t_1 (log (hypot x.re x.im))))
(if (<= y.re 3.3e+141)
(*
(exp (fma t_1 y.re (* (atan2 x.im x.re) (- y.im))))
(sin (fma t_1 y.im t_0)))
(*
(exp
(-
(* y.re (log (sqrt (+ (* x.re x.re) (* x.im x.im)))))
(* (atan2 x.im x.re) y.im)))
(fabs (sin (fma y.im (log (hypot 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 = 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 <= 3.3e+141) {
tmp = exp(fma(t_1, y_46_re, (atan2(x_46_im, x_46_re) * -y_46_im))) * sin(fma(t_1, y_46_im, t_0));
} else {
tmp = exp(((y_46_re * log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))) - (atan2(x_46_im, x_46_re) * y_46_im))) * fabs(sin(fma(y_46_im, log(hypot(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 = 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 <= 3.3e+141) tmp = Float64(exp(fma(t_1, y_46_re, Float64(atan(x_46_im, x_46_re) * Float64(-y_46_im)))) * sin(fma(t_1, y_46_im, t_0))); else tmp = Float64(exp(Float64(Float64(y_46_re * log(sqrt(Float64(Float64(x_46_re * x_46_re) + Float64(x_46_im * x_46_im))))) - Float64(atan(x_46_im, x_46_re) * y_46_im))) * abs(sin(fma(y_46_im, log(hypot(x_46_im, x_46_re)), t_0)))); end return tmp end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[Log[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision]], $MachinePrecision]}, If[LessEqual[y$46$re, 3.3e+141], N[(N[Exp[N[(t$95$1 * y$46$re + N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * (-y$46$im)), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Sin[N[(t$95$1 * y$46$im + t$95$0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(N[Exp[N[(N[(y$46$re * N[Log[N[Sqrt[N[(N[(x$46$re * x$46$re), $MachinePrecision] + N[(x$46$im * x$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision] - N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Abs[N[Sin[N[(y$46$im * N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision] + t$95$0), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
t_1 := \log \left(\mathsf{hypot}\left(x.re, x.im\right)\right)\\
\mathbf{if}\;y.re \leq 3.3 \cdot 10^{+141}:\\
\;\;\;\;e^{\mathsf{fma}\left(t_1, y.re, \tan^{-1}_* \frac{x.im}{x.re} \cdot \left(-y.im\right)\right)} \cdot \sin \left(\mathsf{fma}\left(t_1, y.im, t_0\right)\right)\\
\mathbf{else}:\\
\;\;\;\;e^{y.re \cdot \log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \left|\sin \left(\mathsf{fma}\left(y.im, \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right), t_0\right)\right)\right|\\
\end{array}
\end{array}
if y.re < 3.2999999999999997e141Initial program 33.0%
fma-neg33.0%
hypot-def33.0%
distribute-rgt-neg-out33.0%
fma-def33.0%
hypot-def81.2%
*-commutative81.2%
Simplified81.2%
if 3.2999999999999997e141 < y.re Initial program 26.5%
fma-def26.5%
hypot-udef61.8%
*-commutative61.8%
add-sqr-sqrt44.2%
sqrt-unprod70.6%
pow270.6%
fma-udef70.6%
*-commutative70.6%
*-commutative70.6%
fma-def70.6%
Applied egg-rr70.6%
unpow270.6%
rem-sqrt-square79.5%
*-commutative79.5%
hypot-def35.3%
unpow235.3%
unpow235.3%
+-commutative35.3%
fma-def35.3%
fma-def35.3%
unpow235.3%
unpow235.3%
hypot-def79.5%
Simplified79.5%
Final simplification81.0%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (* y.re (atan2 x.im x.re)))
(t_1 (* y.im (log (hypot x.im x.re)))))
(if (<= y.re -4.8e-50)
(*
(exp
(-
(* y.re (log (sqrt (+ (* x.re x.re) (* x.im x.im)))))
(* (atan2 x.im x.re) y.im)))
(sin (+ t_0 (fabs t_1))))
(if (<= y.re 1.65e+19)
(*
(sin (fma (log (hypot x.re x.im)) y.im t_0))
(/ (pow (hypot x.re x.im) y.re) (pow (exp y.im) (atan2 x.im x.re))))
(* (pow (hypot x.im x.re) y.re) (sin t_1))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = y_46_re * atan2(x_46_im, x_46_re);
double t_1 = y_46_im * log(hypot(x_46_im, x_46_re));
double tmp;
if (y_46_re <= -4.8e-50) {
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_0 + fabs(t_1)));
} else if (y_46_re <= 1.65e+19) {
tmp = sin(fma(log(hypot(x_46_re, x_46_im)), y_46_im, t_0)) * (pow(hypot(x_46_re, x_46_im), y_46_re) / pow(exp(y_46_im), atan2(x_46_im, x_46_re)));
} else {
tmp = pow(hypot(x_46_im, x_46_re), y_46_re) * sin(t_1);
}
return tmp;
}
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = Float64(y_46_re * atan(x_46_im, x_46_re)) t_1 = Float64(y_46_im * log(hypot(x_46_im, x_46_re))) tmp = 0.0 if (y_46_re <= -4.8e-50) tmp = Float64(exp(Float64(Float64(y_46_re * log(sqrt(Float64(Float64(x_46_re * x_46_re) + Float64(x_46_im * x_46_im))))) - Float64(atan(x_46_im, x_46_re) * y_46_im))) * sin(Float64(t_0 + abs(t_1)))); elseif (y_46_re <= 1.65e+19) tmp = Float64(sin(fma(log(hypot(x_46_re, x_46_im)), y_46_im, t_0)) * Float64((hypot(x_46_re, x_46_im) ^ y_46_re) / (exp(y_46_im) ^ atan(x_46_im, x_46_re)))); else tmp = Float64((hypot(x_46_im, x_46_re) ^ y_46_re) * sin(t_1)); end return tmp end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(y$46$im * N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y$46$re, -4.8e-50], N[(N[Exp[N[(N[(y$46$re * N[Log[N[Sqrt[N[(N[(x$46$re * x$46$re), $MachinePrecision] + N[(x$46$im * x$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision] - N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Sin[N[(t$95$0 + N[Abs[t$95$1], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$re, 1.65e+19], N[(N[Sin[N[(N[Log[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision]], $MachinePrecision] * y$46$im + t$95$0), $MachinePrecision]], $MachinePrecision] * N[(N[Power[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision], y$46$re], $MachinePrecision] / N[Power[N[Exp[y$46$im], $MachinePrecision], N[ArcTan[x$46$im / x$46$re], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[Power[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision], y$46$re], $MachinePrecision] * N[Sin[t$95$1], $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
t_1 := y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\\
\mathbf{if}\;y.re \leq -4.8 \cdot 10^{-50}:\\
\;\;\;\;e^{y.re \cdot \log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \sin \left(t_0 + \left|t_1\right|\right)\\
\mathbf{elif}\;y.re \leq 1.65 \cdot 10^{+19}:\\
\;\;\;\;\sin \left(\mathsf{fma}\left(\log \left(\mathsf{hypot}\left(x.re, x.im\right)\right), y.im, t_0\right)\right) \cdot \frac{{\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re}}{{\left(e^{y.im}\right)}^{\tan^{-1}_* \frac{x.im}{x.re}}}\\
\mathbf{else}:\\
\;\;\;\;{\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re} \cdot \sin t_1\\
\end{array}
\end{array}
if y.re < -4.80000000000000004e-50Initial program 33.8%
add-sqr-sqrt21.3%
sqrt-unprod30.0%
pow230.0%
*-commutative30.0%
hypot-udef66.4%
Applied egg-rr66.4%
unpow266.4%
rem-sqrt-square82.6%
hypot-def36.3%
unpow236.3%
unpow236.3%
+-commutative36.3%
unpow236.3%
unpow236.3%
hypot-def82.6%
Simplified82.6%
if -4.80000000000000004e-50 < y.re < 1.65e19Initial program 37.5%
exp-diff37.5%
exp-to-pow37.5%
hypot-def37.5%
*-commutative37.5%
exp-prod37.3%
fma-def37.3%
hypot-def83.0%
*-commutative83.0%
Simplified83.0%
if 1.65e19 < y.re Initial program 19.0%
exp-diff13.8%
exp-to-pow13.8%
hypot-def13.8%
*-commutative13.8%
exp-prod12.1%
fma-def12.1%
hypot-def41.4%
*-commutative41.4%
Simplified41.4%
*-un-lft-identity41.4%
add-sqr-sqrt41.4%
times-frac41.4%
Applied egg-rr41.4%
associate-*l/41.4%
*-lft-identity41.4%
hypot-def41.4%
unpow241.4%
unpow241.4%
+-commutative41.4%
unpow241.4%
unpow241.4%
hypot-def41.4%
exp-prod41.4%
exp-prod43.1%
Simplified43.1%
Taylor expanded in y.re around 0 15.5%
unpow215.5%
unpow215.5%
hypot-def50.0%
Simplified50.0%
Taylor expanded in y.im around 0 60.5%
unpow260.5%
unpow260.5%
hypot-def60.5%
Simplified60.5%
Final simplification77.8%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (log (hypot x.re x.im))))
(*
(exp (fma t_0 y.re (* (atan2 x.im x.re) (- y.im))))
(sin (fma t_0 y.im (* y.re (atan2 x.im x.re)))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = log(hypot(x_46_re, x_46_im));
return exp(fma(t_0, y_46_re, (atan2(x_46_im, x_46_re) * -y_46_im))) * sin(fma(t_0, y_46_im, (y_46_re * atan2(x_46_im, x_46_re))));
}
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = log(hypot(x_46_re, x_46_im)) return Float64(exp(fma(t_0, y_46_re, Float64(atan(x_46_im, x_46_re) * Float64(-y_46_im)))) * sin(fma(t_0, y_46_im, Float64(y_46_re * atan(x_46_im, x_46_re))))) end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[Log[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision]], $MachinePrecision]}, N[(N[Exp[N[(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[(t$95$0 * y$46$im + N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \log \left(\mathsf{hypot}\left(x.re, x.im\right)\right)\\
e^{\mathsf{fma}\left(t_0, y.re, \tan^{-1}_* \frac{x.im}{x.re} \cdot \left(-y.im\right)\right)} \cdot \sin \left(\mathsf{fma}\left(t_0, y.im, y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)
\end{array}
\end{array}
Initial program 32.1%
fma-neg32.1%
hypot-def32.1%
distribute-rgt-neg-out32.1%
fma-def32.1%
hypot-def79.0%
*-commutative79.0%
Simplified79.0%
Final simplification79.0%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (* (atan2 x.im x.re) y.im))
(t_1
(exp (- (* y.re (log (sqrt (+ (* x.re x.re) (* x.im x.im))))) t_0)))
(t_2 (log (hypot x.im x.re)))
(t_3 (* y.re (atan2 x.im x.re)))
(t_4
(*
(fabs (sin (fma y.im t_2 t_3)))
(pow (exp y.im) (- (atan2 x.im x.re)))))
(t_5 (* y.im t_2)))
(if (<= y.im -4e+27)
t_4
(if (<= y.im 1.2e-76)
(*
(sin (fma (log (hypot x.re x.im)) y.im t_3))
(/ (pow (hypot x.re x.im) y.re) (+ t_0 1.0)))
(if (<= y.im 7.2e+136)
(* t_1 (sin t_5))
(if (<= y.im 1.05e+175) t_4 (* t_1 (sin (+ t_3 (fabs t_5))))))))))
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 = exp(((y_46_re * log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))) - t_0));
double t_2 = log(hypot(x_46_im, x_46_re));
double t_3 = y_46_re * atan2(x_46_im, x_46_re);
double t_4 = fabs(sin(fma(y_46_im, t_2, t_3))) * pow(exp(y_46_im), -atan2(x_46_im, x_46_re));
double t_5 = y_46_im * t_2;
double tmp;
if (y_46_im <= -4e+27) {
tmp = t_4;
} else if (y_46_im <= 1.2e-76) {
tmp = sin(fma(log(hypot(x_46_re, x_46_im)), y_46_im, t_3)) * (pow(hypot(x_46_re, x_46_im), y_46_re) / (t_0 + 1.0));
} else if (y_46_im <= 7.2e+136) {
tmp = t_1 * sin(t_5);
} else if (y_46_im <= 1.05e+175) {
tmp = t_4;
} else {
tmp = t_1 * sin((t_3 + fabs(t_5)));
}
return tmp;
}
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = Float64(atan(x_46_im, x_46_re) * y_46_im) t_1 = exp(Float64(Float64(y_46_re * log(sqrt(Float64(Float64(x_46_re * x_46_re) + Float64(x_46_im * x_46_im))))) - t_0)) t_2 = log(hypot(x_46_im, x_46_re)) t_3 = Float64(y_46_re * atan(x_46_im, x_46_re)) t_4 = Float64(abs(sin(fma(y_46_im, t_2, t_3))) * (exp(y_46_im) ^ Float64(-atan(x_46_im, x_46_re)))) t_5 = Float64(y_46_im * t_2) tmp = 0.0 if (y_46_im <= -4e+27) tmp = t_4; elseif (y_46_im <= 1.2e-76) tmp = Float64(sin(fma(log(hypot(x_46_re, x_46_im)), y_46_im, t_3)) * Float64((hypot(x_46_re, x_46_im) ^ y_46_re) / Float64(t_0 + 1.0))); elseif (y_46_im <= 7.2e+136) tmp = Float64(t_1 * sin(t_5)); elseif (y_46_im <= 1.05e+175) tmp = t_4; else tmp = Float64(t_1 * sin(Float64(t_3 + abs(t_5)))); 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[Exp[N[(N[(y$46$re * N[Log[N[Sqrt[N[(N[(x$46$re * x$46$re), $MachinePrecision] + N[(x$46$im * x$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$2 = N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]}, Block[{t$95$3 = N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[(N[Abs[N[Sin[N[(y$46$im * t$95$2 + t$95$3), $MachinePrecision]], $MachinePrecision]], $MachinePrecision] * N[Power[N[Exp[y$46$im], $MachinePrecision], (-N[ArcTan[x$46$im / x$46$re], $MachinePrecision])], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$5 = N[(y$46$im * t$95$2), $MachinePrecision]}, If[LessEqual[y$46$im, -4e+27], t$95$4, If[LessEqual[y$46$im, 1.2e-76], N[(N[Sin[N[(N[Log[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision]], $MachinePrecision] * y$46$im + t$95$3), $MachinePrecision]], $MachinePrecision] * N[(N[Power[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision], y$46$re], $MachinePrecision] / N[(t$95$0 + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$im, 7.2e+136], N[(t$95$1 * N[Sin[t$95$5], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$im, 1.05e+175], t$95$4, N[(t$95$1 * N[Sin[N[(t$95$3 + N[Abs[t$95$5], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im\\
t_1 := e^{y.re \cdot \log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) - t_0}\\
t_2 := \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\\
t_3 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
t_4 := \left|\sin \left(\mathsf{fma}\left(y.im, t_2, t_3\right)\right)\right| \cdot {\left(e^{y.im}\right)}^{\left(-\tan^{-1}_* \frac{x.im}{x.re}\right)}\\
t_5 := y.im \cdot t_2\\
\mathbf{if}\;y.im \leq -4 \cdot 10^{+27}:\\
\;\;\;\;t_4\\
\mathbf{elif}\;y.im \leq 1.2 \cdot 10^{-76}:\\
\;\;\;\;\sin \left(\mathsf{fma}\left(\log \left(\mathsf{hypot}\left(x.re, x.im\right)\right), y.im, t_3\right)\right) \cdot \frac{{\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re}}{t_0 + 1}\\
\mathbf{elif}\;y.im \leq 7.2 \cdot 10^{+136}:\\
\;\;\;\;t_1 \cdot \sin t_5\\
\mathbf{elif}\;y.im \leq 1.05 \cdot 10^{+175}:\\
\;\;\;\;t_4\\
\mathbf{else}:\\
\;\;\;\;t_1 \cdot \sin \left(t_3 + \left|t_5\right|\right)\\
\end{array}
\end{array}
if y.im < -4.0000000000000001e27 or 7.20000000000000011e136 < y.im < 1.05e175Initial program 18.0%
exp-diff14.1%
exp-to-pow14.1%
hypot-def14.1%
*-commutative14.1%
exp-prod14.2%
fma-def14.2%
hypot-def51.4%
*-commutative51.4%
Simplified51.4%
Taylor expanded in y.re around 0 58.0%
rec-exp58.0%
distribute-rgt-neg-in58.0%
exp-prod61.8%
Simplified61.8%
add-sqr-sqrt36.1%
sqrt-unprod69.5%
pow269.5%
Applied egg-rr69.5%
unpow269.5%
rem-sqrt-square69.5%
hypot-def18.2%
unpow218.2%
unpow218.2%
+-commutative18.2%
unpow218.2%
unpow218.2%
hypot-def69.5%
Simplified69.5%
if -4.0000000000000001e27 < y.im < 1.20000000000000007e-76Initial program 37.1%
exp-diff37.1%
exp-to-pow37.1%
hypot-def37.1%
*-commutative37.1%
exp-prod36.0%
fma-def36.0%
hypot-def88.0%
*-commutative88.0%
Simplified88.0%
Taylor expanded in y.im around 0 88.6%
if 1.20000000000000007e-76 < y.im < 7.20000000000000011e136Initial program 38.9%
Taylor expanded in y.re around 0 44.5%
unpow244.5%
unpow244.5%
hypot-def79.9%
Simplified79.9%
if 1.05e175 < y.im Initial program 46.2%
add-sqr-sqrt30.8%
sqrt-unprod0.0%
pow20.0%
*-commutative0.0%
hypot-udef0.0%
Applied egg-rr0.0%
unpow20.0%
rem-sqrt-square77.2%
hypot-def53.8%
unpow253.8%
unpow253.8%
+-commutative53.8%
unpow253.8%
unpow253.8%
hypot-def77.2%
Simplified77.2%
Final simplification80.4%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (* y.re (atan2 x.im x.re)))
(t_1 (* (atan2 x.im x.re) y.im))
(t_2 (log (hypot x.im x.re)))
(t_3
(*
(fabs (sin (fma y.im t_2 t_0)))
(pow (exp y.im) (- (atan2 x.im x.re))))))
(if (<= y.im -4.4e+26)
t_3
(if (<= y.im 1.2e-76)
(*
(sin (fma (log (hypot x.re x.im)) y.im t_0))
(/ (pow (hypot x.re x.im) y.re) (+ t_1 1.0)))
(if (or (<= y.im 3.2e+136) (not (<= y.im 6.3e+174)))
(*
(exp (- (* y.re (log (sqrt (+ (* x.re x.re) (* x.im x.im))))) t_1))
(sin (* y.im t_2)))
t_3)))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = y_46_re * atan2(x_46_im, x_46_re);
double t_1 = atan2(x_46_im, x_46_re) * y_46_im;
double t_2 = log(hypot(x_46_im, x_46_re));
double t_3 = fabs(sin(fma(y_46_im, t_2, t_0))) * pow(exp(y_46_im), -atan2(x_46_im, x_46_re));
double tmp;
if (y_46_im <= -4.4e+26) {
tmp = t_3;
} else if (y_46_im <= 1.2e-76) {
tmp = sin(fma(log(hypot(x_46_re, x_46_im)), y_46_im, t_0)) * (pow(hypot(x_46_re, x_46_im), y_46_re) / (t_1 + 1.0));
} else if ((y_46_im <= 3.2e+136) || !(y_46_im <= 6.3e+174)) {
tmp = exp(((y_46_re * log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))) - t_1)) * sin((y_46_im * t_2));
} else {
tmp = t_3;
}
return tmp;
}
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = Float64(y_46_re * atan(x_46_im, x_46_re)) t_1 = Float64(atan(x_46_im, x_46_re) * y_46_im) t_2 = log(hypot(x_46_im, x_46_re)) t_3 = Float64(abs(sin(fma(y_46_im, t_2, t_0))) * (exp(y_46_im) ^ Float64(-atan(x_46_im, x_46_re)))) tmp = 0.0 if (y_46_im <= -4.4e+26) tmp = t_3; elseif (y_46_im <= 1.2e-76) tmp = Float64(sin(fma(log(hypot(x_46_re, x_46_im)), y_46_im, t_0)) * Float64((hypot(x_46_re, x_46_im) ^ y_46_re) / Float64(t_1 + 1.0))); elseif ((y_46_im <= 3.2e+136) || !(y_46_im <= 6.3e+174)) tmp = Float64(exp(Float64(Float64(y_46_re * log(sqrt(Float64(Float64(x_46_re * x_46_re) + Float64(x_46_im * x_46_im))))) - t_1)) * sin(Float64(y_46_im * t_2))); else tmp = t_3; end return tmp end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$im), $MachinePrecision]}, Block[{t$95$2 = N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]}, Block[{t$95$3 = N[(N[Abs[N[Sin[N[(y$46$im * t$95$2 + t$95$0), $MachinePrecision]], $MachinePrecision]], $MachinePrecision] * N[Power[N[Exp[y$46$im], $MachinePrecision], (-N[ArcTan[x$46$im / x$46$re], $MachinePrecision])], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y$46$im, -4.4e+26], t$95$3, If[LessEqual[y$46$im, 1.2e-76], N[(N[Sin[N[(N[Log[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision]], $MachinePrecision] * y$46$im + t$95$0), $MachinePrecision]], $MachinePrecision] * N[(N[Power[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision], y$46$re], $MachinePrecision] / N[(t$95$1 + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[y$46$im, 3.2e+136], N[Not[LessEqual[y$46$im, 6.3e+174]], $MachinePrecision]], N[(N[Exp[N[(N[(y$46$re * N[Log[N[Sqrt[N[(N[(x$46$re * x$46$re), $MachinePrecision] + N[(x$46$im * x$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision]], $MachinePrecision] * N[Sin[N[(y$46$im * t$95$2), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], t$95$3]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
t_1 := \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im\\
t_2 := \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\\
t_3 := \left|\sin \left(\mathsf{fma}\left(y.im, t_2, t_0\right)\right)\right| \cdot {\left(e^{y.im}\right)}^{\left(-\tan^{-1}_* \frac{x.im}{x.re}\right)}\\
\mathbf{if}\;y.im \leq -4.4 \cdot 10^{+26}:\\
\;\;\;\;t_3\\
\mathbf{elif}\;y.im \leq 1.2 \cdot 10^{-76}:\\
\;\;\;\;\sin \left(\mathsf{fma}\left(\log \left(\mathsf{hypot}\left(x.re, x.im\right)\right), y.im, t_0\right)\right) \cdot \frac{{\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re}}{t_1 + 1}\\
\mathbf{elif}\;y.im \leq 3.2 \cdot 10^{+136} \lor \neg \left(y.im \leq 6.3 \cdot 10^{+174}\right):\\
\;\;\;\;e^{y.re \cdot \log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) - t_1} \cdot \sin \left(y.im \cdot t_2\right)\\
\mathbf{else}:\\
\;\;\;\;t_3\\
\end{array}
\end{array}
if y.im < -4.40000000000000014e26 or 3.19999999999999988e136 < y.im < 6.3000000000000001e174Initial program 18.0%
exp-diff14.1%
exp-to-pow14.1%
hypot-def14.1%
*-commutative14.1%
exp-prod14.2%
fma-def14.2%
hypot-def51.4%
*-commutative51.4%
Simplified51.4%
Taylor expanded in y.re around 0 58.0%
rec-exp58.0%
distribute-rgt-neg-in58.0%
exp-prod61.8%
Simplified61.8%
add-sqr-sqrt36.1%
sqrt-unprod69.5%
pow269.5%
Applied egg-rr69.5%
unpow269.5%
rem-sqrt-square69.5%
hypot-def18.2%
unpow218.2%
unpow218.2%
+-commutative18.2%
unpow218.2%
unpow218.2%
hypot-def69.5%
Simplified69.5%
if -4.40000000000000014e26 < y.im < 1.20000000000000007e-76Initial program 37.1%
exp-diff37.1%
exp-to-pow37.1%
hypot-def37.1%
*-commutative37.1%
exp-prod36.0%
fma-def36.0%
hypot-def88.0%
*-commutative88.0%
Simplified88.0%
Taylor expanded in y.im around 0 88.6%
if 1.20000000000000007e-76 < y.im < 3.19999999999999988e136 or 6.3000000000000001e174 < y.im Initial program 40.3%
Taylor expanded in y.re around 0 44.8%
unpow244.8%
unpow244.8%
hypot-def77.9%
Simplified77.9%
Final simplification80.0%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (* y.re (atan2 x.im x.re))))
(if (<= y.re -4.8e-50)
(*
(exp
(-
(* y.re (log (sqrt (+ (* x.re x.re) (* x.im x.im)))))
(* (atan2 x.im x.re) y.im)))
(sin t_0))
(if (<= y.re 430000.0)
(*
(sin (fma (log (hypot x.re x.im)) y.im t_0))
(exp (* (atan2 x.im x.re) (- y.im))))
(*
(pow (hypot x.im x.re) y.re)
(sin (* y.im (log (hypot x.im x.re)))))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = y_46_re * atan2(x_46_im, x_46_re);
double tmp;
if (y_46_re <= -4.8e-50) {
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_0);
} else if (y_46_re <= 430000.0) {
tmp = sin(fma(log(hypot(x_46_re, x_46_im)), y_46_im, t_0)) * exp((atan2(x_46_im, x_46_re) * -y_46_im));
} else {
tmp = pow(hypot(x_46_im, x_46_re), y_46_re) * sin((y_46_im * log(hypot(x_46_im, x_46_re))));
}
return tmp;
}
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = Float64(y_46_re * atan(x_46_im, x_46_re)) tmp = 0.0 if (y_46_re <= -4.8e-50) 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_0)); elseif (y_46_re <= 430000.0) tmp = Float64(sin(fma(log(hypot(x_46_re, x_46_im)), y_46_im, t_0)) * 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) * sin(Float64(y_46_im * log(hypot(x_46_im, x_46_re))))); end return tmp end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y$46$re, -4.8e-50], 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$0], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$re, 430000.0], N[(N[Sin[N[(N[Log[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision]], $MachinePrecision] * y$46$im + t$95$0), $MachinePrecision]], $MachinePrecision] * N[Exp[N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * (-y$46$im)), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(N[Power[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision], y$46$re], $MachinePrecision] * N[Sin[N[(y$46$im * N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
\mathbf{if}\;y.re \leq -4.8 \cdot 10^{-50}:\\
\;\;\;\;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_0\\
\mathbf{elif}\;y.re \leq 430000:\\
\;\;\;\;\sin \left(\mathsf{fma}\left(\log \left(\mathsf{hypot}\left(x.re, x.im\right)\right), y.im, t_0\right)\right) \cdot e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot \left(-y.im\right)}\\
\mathbf{else}:\\
\;\;\;\;{\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re} \cdot \sin \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right)\\
\end{array}
\end{array}
if y.re < -4.80000000000000004e-50Initial program 33.8%
Taylor expanded in y.im around 0 81.4%
if -4.80000000000000004e-50 < y.re < 4.3e5Initial program 38.1%
exp-diff38.1%
exp-to-pow38.1%
hypot-def38.1%
*-commutative38.1%
exp-prod37.9%
fma-def37.9%
hypot-def82.7%
*-commutative82.7%
Simplified82.7%
Taylor expanded in y.re around 0 81.6%
rec-exp81.6%
distribute-rgt-neg-in81.6%
Simplified81.6%
if 4.3e5 < y.re Initial program 18.3%
exp-diff13.3%
exp-to-pow13.3%
hypot-def13.3%
*-commutative13.3%
exp-prod11.7%
fma-def11.7%
hypot-def43.3%
*-commutative43.3%
Simplified43.3%
*-un-lft-identity43.3%
add-sqr-sqrt43.3%
times-frac43.3%
Applied egg-rr43.3%
associate-*l/43.3%
*-lft-identity43.3%
hypot-def43.3%
unpow243.3%
unpow243.3%
+-commutative43.3%
unpow243.3%
unpow243.3%
hypot-def43.3%
exp-prod43.3%
exp-prod45.0%
Simplified45.0%
Taylor expanded in y.re around 0 15.0%
unpow215.0%
unpow215.0%
hypot-def50.0%
Simplified50.0%
Taylor expanded in y.im around 0 60.2%
unpow260.2%
unpow260.2%
hypot-def60.2%
Simplified60.2%
Final simplification76.5%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (* y.re (atan2 x.im x.re)))
(t_1 (pow (hypot x.im x.re) y.re))
(t_2 (sin t_0)))
(if (<= y.im -5e+25)
(* (pow (exp y.im) (- (atan2 x.im x.re))) t_2)
(if (<= y.im 1.95e-134)
(* (sin (fma (log (hypot x.re x.im)) y.im t_0)) t_1)
(if (<= y.im 105000.0)
(* t_1 (sin (* y.im (log (hypot x.im x.re)))))
(*
(exp
(-
(* y.re (log (sqrt (+ (* x.re x.re) (* x.im x.im)))))
(* (atan2 x.im x.re) y.im)))
t_2))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = y_46_re * atan2(x_46_im, x_46_re);
double t_1 = pow(hypot(x_46_im, x_46_re), y_46_re);
double t_2 = sin(t_0);
double tmp;
if (y_46_im <= -5e+25) {
tmp = pow(exp(y_46_im), -atan2(x_46_im, x_46_re)) * t_2;
} else if (y_46_im <= 1.95e-134) {
tmp = sin(fma(log(hypot(x_46_re, x_46_im)), y_46_im, t_0)) * t_1;
} else if (y_46_im <= 105000.0) {
tmp = t_1 * sin((y_46_im * log(hypot(x_46_im, x_46_re))));
} else {
tmp = exp(((y_46_re * log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))) - (atan2(x_46_im, x_46_re) * y_46_im))) * t_2;
}
return tmp;
}
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = Float64(y_46_re * atan(x_46_im, x_46_re)) t_1 = hypot(x_46_im, x_46_re) ^ y_46_re t_2 = sin(t_0) tmp = 0.0 if (y_46_im <= -5e+25) tmp = Float64((exp(y_46_im) ^ Float64(-atan(x_46_im, x_46_re))) * t_2); elseif (y_46_im <= 1.95e-134) tmp = Float64(sin(fma(log(hypot(x_46_re, x_46_im)), y_46_im, t_0)) * t_1); elseif (y_46_im <= 105000.0) tmp = Float64(t_1 * sin(Float64(y_46_im * log(hypot(x_46_im, x_46_re))))); else tmp = Float64(exp(Float64(Float64(y_46_re * log(sqrt(Float64(Float64(x_46_re * x_46_re) + Float64(x_46_im * x_46_im))))) - Float64(atan(x_46_im, x_46_re) * y_46_im))) * t_2); 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[Power[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision], y$46$re], $MachinePrecision]}, Block[{t$95$2 = N[Sin[t$95$0], $MachinePrecision]}, If[LessEqual[y$46$im, -5e+25], N[(N[Power[N[Exp[y$46$im], $MachinePrecision], (-N[ArcTan[x$46$im / x$46$re], $MachinePrecision])], $MachinePrecision] * t$95$2), $MachinePrecision], If[LessEqual[y$46$im, 1.95e-134], N[(N[Sin[N[(N[Log[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision]], $MachinePrecision] * y$46$im + t$95$0), $MachinePrecision]], $MachinePrecision] * t$95$1), $MachinePrecision], If[LessEqual[y$46$im, 105000.0], N[(t$95$1 * N[Sin[N[(y$46$im * N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], 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] * t$95$2), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
t_1 := {\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re}\\
t_2 := \sin t_0\\
\mathbf{if}\;y.im \leq -5 \cdot 10^{+25}:\\
\;\;\;\;{\left(e^{y.im}\right)}^{\left(-\tan^{-1}_* \frac{x.im}{x.re}\right)} \cdot t_2\\
\mathbf{elif}\;y.im \leq 1.95 \cdot 10^{-134}:\\
\;\;\;\;\sin \left(\mathsf{fma}\left(\log \left(\mathsf{hypot}\left(x.re, x.im\right)\right), y.im, t_0\right)\right) \cdot t_1\\
\mathbf{elif}\;y.im \leq 105000:\\
\;\;\;\;t_1 \cdot \sin \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;e^{y.re \cdot \log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot t_2\\
\end{array}
\end{array}
if y.im < -5.00000000000000024e25Initial program 20.0%
exp-diff15.8%
exp-to-pow15.8%
hypot-def15.8%
*-commutative15.8%
exp-prod15.8%
fma-def15.8%
hypot-def53.0%
*-commutative53.0%
Simplified53.0%
Taylor expanded in y.re around 0 57.5%
rec-exp57.5%
distribute-rgt-neg-in57.5%
exp-prod61.7%
Simplified61.7%
Taylor expanded in y.im around 0 60.3%
if -5.00000000000000024e25 < y.im < 1.95e-134Initial program 37.7%
exp-diff37.7%
exp-to-pow37.7%
hypot-def37.7%
*-commutative37.7%
exp-prod36.4%
fma-def36.4%
hypot-def88.2%
*-commutative88.2%
Simplified88.2%
Taylor expanded in y.im around 0 63.5%
unpow263.5%
unpow263.5%
hypot-def88.6%
Simplified88.6%
if 1.95e-134 < y.im < 105000Initial program 43.3%
exp-diff43.3%
exp-to-pow43.3%
hypot-def43.3%
*-commutative43.3%
exp-prod43.3%
fma-def43.3%
hypot-def79.9%
*-commutative79.9%
Simplified79.9%
*-un-lft-identity79.9%
add-sqr-sqrt79.9%
times-frac79.8%
Applied egg-rr79.8%
associate-*l/79.9%
*-lft-identity79.9%
hypot-def67.1%
unpow267.1%
unpow267.1%
+-commutative67.1%
unpow267.1%
unpow267.1%
hypot-def79.9%
exp-prod79.9%
exp-prod79.9%
Simplified79.9%
Taylor expanded in y.re around 0 50.4%
unpow250.4%
unpow250.4%
hypot-def93.8%
Simplified93.8%
Taylor expanded in y.im around 0 81.3%
unpow281.3%
unpow281.3%
hypot-def91.0%
Simplified91.0%
if 105000 < y.im Initial program 31.7%
Taylor expanded in y.im around 0 68.7%
Final simplification76.5%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (* (atan2 x.im x.re) y.im))
(t_1 (sin (* y.im (log (hypot x.im x.re)))))
(t_2 (* y.re (atan2 x.im x.re)))
(t_3 (/ (pow (hypot x.re x.im) y.re) (+ t_0 1.0))))
(if (<= y.re -4.5e-50)
(*
(exp (- (* y.re (log (sqrt (+ (* x.re x.re) (* x.im x.im))))) t_0))
(sin t_2))
(if (<= y.re 2.2e-40)
(* t_1 (exp (* (atan2 x.im x.re) (- y.im))))
(if (<= y.re 4.5e+18)
(* t_3 (sin (+ t_2 (* y.im (log x.re)))))
(if (<= y.re 2e+75)
(* t_1 t_3)
(* (pow (hypot x.im x.re) y.re) t_1)))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = atan2(x_46_im, x_46_re) * y_46_im;
double t_1 = sin((y_46_im * log(hypot(x_46_im, x_46_re))));
double t_2 = y_46_re * atan2(x_46_im, x_46_re);
double t_3 = pow(hypot(x_46_re, x_46_im), y_46_re) / (t_0 + 1.0);
double tmp;
if (y_46_re <= -4.5e-50) {
tmp = exp(((y_46_re * log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))) - t_0)) * sin(t_2);
} else if (y_46_re <= 2.2e-40) {
tmp = t_1 * exp((atan2(x_46_im, x_46_re) * -y_46_im));
} else if (y_46_re <= 4.5e+18) {
tmp = t_3 * sin((t_2 + (y_46_im * log(x_46_re))));
} else if (y_46_re <= 2e+75) {
tmp = t_1 * t_3;
} else {
tmp = pow(hypot(x_46_im, x_46_re), y_46_re) * t_1;
}
return tmp;
}
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = Math.atan2(x_46_im, x_46_re) * y_46_im;
double t_1 = Math.sin((y_46_im * Math.log(Math.hypot(x_46_im, x_46_re))));
double t_2 = y_46_re * Math.atan2(x_46_im, x_46_re);
double t_3 = Math.pow(Math.hypot(x_46_re, x_46_im), y_46_re) / (t_0 + 1.0);
double tmp;
if (y_46_re <= -4.5e-50) {
tmp = Math.exp(((y_46_re * Math.log(Math.sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))) - t_0)) * Math.sin(t_2);
} else if (y_46_re <= 2.2e-40) {
tmp = t_1 * Math.exp((Math.atan2(x_46_im, x_46_re) * -y_46_im));
} else if (y_46_re <= 4.5e+18) {
tmp = t_3 * Math.sin((t_2 + (y_46_im * Math.log(x_46_re))));
} else if (y_46_re <= 2e+75) {
tmp = t_1 * t_3;
} else {
tmp = Math.pow(Math.hypot(x_46_im, x_46_re), y_46_re) * t_1;
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): t_0 = math.atan2(x_46_im, x_46_re) * y_46_im t_1 = math.sin((y_46_im * math.log(math.hypot(x_46_im, x_46_re)))) t_2 = y_46_re * math.atan2(x_46_im, x_46_re) t_3 = math.pow(math.hypot(x_46_re, x_46_im), y_46_re) / (t_0 + 1.0) tmp = 0 if y_46_re <= -4.5e-50: tmp = math.exp(((y_46_re * math.log(math.sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))) - t_0)) * math.sin(t_2) elif y_46_re <= 2.2e-40: tmp = t_1 * math.exp((math.atan2(x_46_im, x_46_re) * -y_46_im)) elif y_46_re <= 4.5e+18: tmp = t_3 * math.sin((t_2 + (y_46_im * math.log(x_46_re)))) elif y_46_re <= 2e+75: tmp = t_1 * t_3 else: tmp = math.pow(math.hypot(x_46_im, x_46_re), y_46_re) * t_1 return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = Float64(atan(x_46_im, x_46_re) * y_46_im) t_1 = sin(Float64(y_46_im * log(hypot(x_46_im, x_46_re)))) t_2 = Float64(y_46_re * atan(x_46_im, x_46_re)) t_3 = Float64((hypot(x_46_re, x_46_im) ^ y_46_re) / Float64(t_0 + 1.0)) tmp = 0.0 if (y_46_re <= -4.5e-50) tmp = Float64(exp(Float64(Float64(y_46_re * log(sqrt(Float64(Float64(x_46_re * x_46_re) + Float64(x_46_im * x_46_im))))) - t_0)) * sin(t_2)); elseif (y_46_re <= 2.2e-40) tmp = Float64(t_1 * exp(Float64(atan(x_46_im, x_46_re) * Float64(-y_46_im)))); elseif (y_46_re <= 4.5e+18) tmp = Float64(t_3 * sin(Float64(t_2 + Float64(y_46_im * log(x_46_re))))); elseif (y_46_re <= 2e+75) tmp = Float64(t_1 * t_3); else tmp = Float64((hypot(x_46_im, x_46_re) ^ y_46_re) * t_1); end return tmp end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = atan2(x_46_im, x_46_re) * y_46_im; t_1 = sin((y_46_im * log(hypot(x_46_im, x_46_re)))); t_2 = y_46_re * atan2(x_46_im, x_46_re); t_3 = (hypot(x_46_re, x_46_im) ^ y_46_re) / (t_0 + 1.0); tmp = 0.0; if (y_46_re <= -4.5e-50) tmp = exp(((y_46_re * log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))) - t_0)) * sin(t_2); elseif (y_46_re <= 2.2e-40) tmp = t_1 * exp((atan2(x_46_im, x_46_re) * -y_46_im)); elseif (y_46_re <= 4.5e+18) tmp = t_3 * sin((t_2 + (y_46_im * log(x_46_re)))); elseif (y_46_re <= 2e+75) tmp = t_1 * t_3; else tmp = (hypot(x_46_im, x_46_re) ^ y_46_re) * t_1; end tmp_2 = tmp; end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$im), $MachinePrecision]}, Block[{t$95$1 = N[Sin[N[(y$46$im * N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$2 = N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[Power[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision], y$46$re], $MachinePrecision] / N[(t$95$0 + 1.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y$46$re, -4.5e-50], N[(N[Exp[N[(N[(y$46$re * N[Log[N[Sqrt[N[(N[(x$46$re * x$46$re), $MachinePrecision] + N[(x$46$im * x$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]], $MachinePrecision] * N[Sin[t$95$2], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$re, 2.2e-40], N[(t$95$1 * N[Exp[N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * (-y$46$im)), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$re, 4.5e+18], N[(t$95$3 * N[Sin[N[(t$95$2 + N[(y$46$im * N[Log[x$46$re], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$re, 2e+75], N[(t$95$1 * t$95$3), $MachinePrecision], N[(N[Power[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision], y$46$re], $MachinePrecision] * t$95$1), $MachinePrecision]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im\\
t_1 := \sin \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right)\\
t_2 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
t_3 := \frac{{\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re}}{t_0 + 1}\\
\mathbf{if}\;y.re \leq -4.5 \cdot 10^{-50}:\\
\;\;\;\;e^{y.re \cdot \log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) - t_0} \cdot \sin t_2\\
\mathbf{elif}\;y.re \leq 2.2 \cdot 10^{-40}:\\
\;\;\;\;t_1 \cdot e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot \left(-y.im\right)}\\
\mathbf{elif}\;y.re \leq 4.5 \cdot 10^{+18}:\\
\;\;\;\;t_3 \cdot \sin \left(t_2 + y.im \cdot \log x.re\right)\\
\mathbf{elif}\;y.re \leq 2 \cdot 10^{+75}:\\
\;\;\;\;t_1 \cdot t_3\\
\mathbf{else}:\\
\;\;\;\;{\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re} \cdot t_1\\
\end{array}
\end{array}
if y.re < -4.49999999999999962e-50Initial program 33.8%
Taylor expanded in y.im around 0 81.4%
if -4.49999999999999962e-50 < y.re < 2.20000000000000009e-40Initial program 39.8%
exp-diff39.8%
exp-to-pow39.8%
hypot-def39.8%
*-commutative39.8%
exp-prod39.8%
fma-def39.8%
hypot-def83.4%
*-commutative83.4%
Simplified83.4%
*-un-lft-identity83.4%
add-sqr-sqrt83.4%
times-frac83.4%
Applied egg-rr83.4%
associate-*l/83.4%
*-lft-identity83.4%
hypot-def52.3%
unpow252.3%
unpow252.3%
+-commutative52.3%
unpow252.3%
unpow252.3%
hypot-def83.4%
exp-prod83.4%
exp-prod83.4%
Simplified83.4%
Taylor expanded in y.re around 0 32.3%
unpow232.3%
unpow232.3%
hypot-def69.0%
Simplified69.0%
Taylor expanded in y.re around 0 69.0%
rec-exp69.0%
distribute-rgt-neg-in69.0%
Simplified69.0%
if 2.20000000000000009e-40 < y.re < 4.5e18Initial program 21.9%
exp-diff21.9%
exp-to-pow21.9%
hypot-def21.9%
*-commutative21.9%
exp-prod20.1%
fma-def20.1%
hypot-def80.0%
*-commutative80.0%
Simplified80.0%
Taylor expanded in y.im around 0 76.2%
Taylor expanded in x.im around 0 56.1%
if 4.5e18 < y.re < 1.99999999999999985e75Initial program 7.7%
exp-diff7.7%
exp-to-pow7.7%
hypot-def7.7%
*-commutative7.7%
exp-prod7.7%
fma-def7.7%
hypot-def15.4%
*-commutative15.4%
Simplified15.4%
Taylor expanded in y.im around 0 23.6%
Taylor expanded in y.re around 0 15.4%
unpow215.4%
unpow215.4%
hypot-def46.2%
Simplified54.3%
if 1.99999999999999985e75 < y.re Initial program 22.2%
exp-diff15.6%
exp-to-pow15.6%
hypot-def15.6%
*-commutative15.6%
exp-prod13.3%
fma-def13.3%
hypot-def48.9%
*-commutative48.9%
Simplified48.9%
*-un-lft-identity48.9%
add-sqr-sqrt48.9%
times-frac48.9%
Applied egg-rr48.9%
associate-*l/48.9%
*-lft-identity48.9%
hypot-def48.9%
unpow248.9%
unpow248.9%
+-commutative48.9%
unpow248.9%
unpow248.9%
hypot-def48.9%
exp-prod48.9%
exp-prod51.1%
Simplified51.1%
Taylor expanded in y.re around 0 15.6%
unpow215.6%
unpow215.6%
hypot-def51.1%
Simplified51.1%
Taylor expanded in y.im around 0 64.5%
unpow264.5%
unpow264.5%
hypot-def64.5%
Simplified64.5%
Final simplification70.6%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (sin (* y.im (log (hypot x.im x.re))))))
(if (<= y.re -5.6e-52)
(*
(exp
(-
(* y.re (log (sqrt (+ (* x.re x.re) (* x.im x.im)))))
(* (atan2 x.im x.re) y.im)))
(sin (* y.re (atan2 x.im x.re))))
(if (<= y.re 92000.0)
(* t_0 (exp (* (atan2 x.im x.re) (- y.im))))
(* (pow (hypot x.im x.re) y.re) t_0)))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = sin((y_46_im * log(hypot(x_46_im, x_46_re))));
double tmp;
if (y_46_re <= -5.6e-52) {
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((y_46_re * atan2(x_46_im, x_46_re)));
} else if (y_46_re <= 92000.0) {
tmp = t_0 * exp((atan2(x_46_im, x_46_re) * -y_46_im));
} else {
tmp = pow(hypot(x_46_im, x_46_re), y_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.sin((y_46_im * Math.log(Math.hypot(x_46_im, x_46_re))));
double tmp;
if (y_46_re <= -5.6e-52) {
tmp = Math.exp(((y_46_re * Math.log(Math.sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))) - (Math.atan2(x_46_im, x_46_re) * y_46_im))) * Math.sin((y_46_re * Math.atan2(x_46_im, x_46_re)));
} else if (y_46_re <= 92000.0) {
tmp = t_0 * 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) * t_0;
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): t_0 = math.sin((y_46_im * math.log(math.hypot(x_46_im, x_46_re)))) tmp = 0 if y_46_re <= -5.6e-52: tmp = math.exp(((y_46_re * math.log(math.sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))) - (math.atan2(x_46_im, x_46_re) * y_46_im))) * math.sin((y_46_re * math.atan2(x_46_im, x_46_re))) elif y_46_re <= 92000.0: tmp = t_0 * 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) * t_0 return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = sin(Float64(y_46_im * log(hypot(x_46_im, x_46_re)))) tmp = 0.0 if (y_46_re <= -5.6e-52) tmp = Float64(exp(Float64(Float64(y_46_re * log(sqrt(Float64(Float64(x_46_re * x_46_re) + Float64(x_46_im * x_46_im))))) - Float64(atan(x_46_im, x_46_re) * y_46_im))) * sin(Float64(y_46_re * atan(x_46_im, x_46_re)))); elseif (y_46_re <= 92000.0) tmp = Float64(t_0 * 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) * t_0); end return tmp end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = sin((y_46_im * log(hypot(x_46_im, x_46_re)))); tmp = 0.0; if (y_46_re <= -5.6e-52) 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((y_46_re * atan2(x_46_im, x_46_re))); elseif (y_46_re <= 92000.0) tmp = t_0 * exp((atan2(x_46_im, x_46_re) * -y_46_im)); else tmp = (hypot(x_46_im, x_46_re) ^ y_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[Sin[N[(y$46$im * N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[y$46$re, -5.6e-52], 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[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$re, 92000.0], N[(t$95$0 * N[Exp[N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * (-y$46$im)), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(N[Power[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision], y$46$re], $MachinePrecision] * t$95$0), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \sin \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right)\\
\mathbf{if}\;y.re \leq -5.6 \cdot 10^{-52}:\\
\;\;\;\;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(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\\
\mathbf{elif}\;y.re \leq 92000:\\
\;\;\;\;t_0 \cdot e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot \left(-y.im\right)}\\
\mathbf{else}:\\
\;\;\;\;{\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re} \cdot t_0\\
\end{array}
\end{array}
if y.re < -5.59999999999999989e-52Initial program 33.8%
Taylor expanded in y.im around 0 81.4%
if -5.59999999999999989e-52 < y.re < 92000Initial program 38.1%
exp-diff38.1%
exp-to-pow38.1%
hypot-def38.1%
*-commutative38.1%
exp-prod37.9%
fma-def37.9%
hypot-def82.7%
*-commutative82.7%
Simplified82.7%
*-un-lft-identity82.7%
add-sqr-sqrt82.7%
times-frac82.7%
Applied egg-rr82.7%
associate-*l/82.7%
*-lft-identity82.7%
hypot-def50.9%
unpow250.9%
unpow250.9%
+-commutative50.9%
unpow250.9%
unpow250.9%
hypot-def82.7%
exp-prod82.7%
exp-prod83.0%
Simplified83.0%
Taylor expanded in y.re around 0 29.0%
unpow229.0%
unpow229.0%
hypot-def64.9%
Simplified64.9%
Taylor expanded in y.re around 0 64.8%
rec-exp64.8%
distribute-rgt-neg-in64.8%
Simplified64.8%
if 92000 < y.re Initial program 18.3%
exp-diff13.3%
exp-to-pow13.3%
hypot-def13.3%
*-commutative13.3%
exp-prod11.7%
fma-def11.7%
hypot-def43.3%
*-commutative43.3%
Simplified43.3%
*-un-lft-identity43.3%
add-sqr-sqrt43.3%
times-frac43.3%
Applied egg-rr43.3%
associate-*l/43.3%
*-lft-identity43.3%
hypot-def43.3%
unpow243.3%
unpow243.3%
+-commutative43.3%
unpow243.3%
unpow243.3%
hypot-def43.3%
exp-prod43.3%
exp-prod45.0%
Simplified45.0%
Taylor expanded in y.re around 0 15.0%
unpow215.0%
unpow215.0%
hypot-def50.0%
Simplified50.0%
Taylor expanded in y.im around 0 60.2%
unpow260.2%
unpow260.2%
hypot-def60.2%
Simplified60.2%
Final simplification68.9%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0
(*
(pow (hypot x.im x.re) y.re)
(sin (* y.im (log (hypot x.im x.re))))))
(t_1 (sin (* y.re (atan2 x.im x.re))))
(t_2 (* (pow (exp y.im) (- (atan2 x.im x.re))) t_1)))
(if (<= y.im -5.2e+25)
t_2
(if (<= y.im -5.2e-114)
t_0
(if (<= y.im 2.85e-258)
(*
(/ (pow (hypot x.re x.im) y.re) (+ (* (atan2 x.im x.re) y.im) 1.0))
t_1)
(if (<= y.im 6.6e+106) t_0 t_2))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = pow(hypot(x_46_im, x_46_re), y_46_re) * sin((y_46_im * log(hypot(x_46_im, x_46_re))));
double t_1 = sin((y_46_re * atan2(x_46_im, x_46_re)));
double t_2 = pow(exp(y_46_im), -atan2(x_46_im, x_46_re)) * t_1;
double tmp;
if (y_46_im <= -5.2e+25) {
tmp = t_2;
} else if (y_46_im <= -5.2e-114) {
tmp = t_0;
} else if (y_46_im <= 2.85e-258) {
tmp = (pow(hypot(x_46_re, x_46_im), y_46_re) / ((atan2(x_46_im, x_46_re) * y_46_im) + 1.0)) * t_1;
} else if (y_46_im <= 6.6e+106) {
tmp = t_0;
} else {
tmp = t_2;
}
return tmp;
}
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = Math.pow(Math.hypot(x_46_im, x_46_re), y_46_re) * Math.sin((y_46_im * Math.log(Math.hypot(x_46_im, x_46_re))));
double t_1 = Math.sin((y_46_re * Math.atan2(x_46_im, x_46_re)));
double t_2 = Math.pow(Math.exp(y_46_im), -Math.atan2(x_46_im, x_46_re)) * t_1;
double tmp;
if (y_46_im <= -5.2e+25) {
tmp = t_2;
} else if (y_46_im <= -5.2e-114) {
tmp = t_0;
} else if (y_46_im <= 2.85e-258) {
tmp = (Math.pow(Math.hypot(x_46_re, x_46_im), y_46_re) / ((Math.atan2(x_46_im, x_46_re) * y_46_im) + 1.0)) * t_1;
} else if (y_46_im <= 6.6e+106) {
tmp = t_0;
} else {
tmp = t_2;
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): t_0 = math.pow(math.hypot(x_46_im, x_46_re), y_46_re) * math.sin((y_46_im * math.log(math.hypot(x_46_im, x_46_re)))) t_1 = math.sin((y_46_re * math.atan2(x_46_im, x_46_re))) t_2 = math.pow(math.exp(y_46_im), -math.atan2(x_46_im, x_46_re)) * t_1 tmp = 0 if y_46_im <= -5.2e+25: tmp = t_2 elif y_46_im <= -5.2e-114: tmp = t_0 elif y_46_im <= 2.85e-258: tmp = (math.pow(math.hypot(x_46_re, x_46_im), y_46_re) / ((math.atan2(x_46_im, x_46_re) * y_46_im) + 1.0)) * t_1 elif y_46_im <= 6.6e+106: tmp = t_0 else: tmp = t_2 return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = Float64((hypot(x_46_im, x_46_re) ^ y_46_re) * sin(Float64(y_46_im * log(hypot(x_46_im, x_46_re))))) t_1 = sin(Float64(y_46_re * atan(x_46_im, x_46_re))) t_2 = Float64((exp(y_46_im) ^ Float64(-atan(x_46_im, x_46_re))) * t_1) tmp = 0.0 if (y_46_im <= -5.2e+25) tmp = t_2; elseif (y_46_im <= -5.2e-114) tmp = t_0; elseif (y_46_im <= 2.85e-258) tmp = Float64(Float64((hypot(x_46_re, x_46_im) ^ y_46_re) / Float64(Float64(atan(x_46_im, x_46_re) * y_46_im) + 1.0)) * t_1); elseif (y_46_im <= 6.6e+106) tmp = t_0; else tmp = t_2; end return tmp end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = (hypot(x_46_im, x_46_re) ^ y_46_re) * sin((y_46_im * log(hypot(x_46_im, x_46_re)))); t_1 = sin((y_46_re * atan2(x_46_im, x_46_re))); t_2 = (exp(y_46_im) ^ -atan2(x_46_im, x_46_re)) * t_1; tmp = 0.0; if (y_46_im <= -5.2e+25) tmp = t_2; elseif (y_46_im <= -5.2e-114) tmp = t_0; elseif (y_46_im <= 2.85e-258) tmp = ((hypot(x_46_re, x_46_im) ^ y_46_re) / ((atan2(x_46_im, x_46_re) * y_46_im) + 1.0)) * t_1; elseif (y_46_im <= 6.6e+106) tmp = t_0; else tmp = t_2; end tmp_2 = tmp; end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[(N[Power[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 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]}, Block[{t$95$1 = N[Sin[N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$2 = N[(N[Power[N[Exp[y$46$im], $MachinePrecision], (-N[ArcTan[x$46$im / x$46$re], $MachinePrecision])], $MachinePrecision] * t$95$1), $MachinePrecision]}, If[LessEqual[y$46$im, -5.2e+25], t$95$2, If[LessEqual[y$46$im, -5.2e-114], t$95$0, If[LessEqual[y$46$im, 2.85e-258], N[(N[(N[Power[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision], y$46$re], $MachinePrecision] / N[(N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$im), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision] * t$95$1), $MachinePrecision], If[LessEqual[y$46$im, 6.6e+106], t$95$0, t$95$2]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := {\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re} \cdot \sin \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right)\\
t_1 := \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\\
t_2 := {\left(e^{y.im}\right)}^{\left(-\tan^{-1}_* \frac{x.im}{x.re}\right)} \cdot t_1\\
\mathbf{if}\;y.im \leq -5.2 \cdot 10^{+25}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;y.im \leq -5.2 \cdot 10^{-114}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;y.im \leq 2.85 \cdot 10^{-258}:\\
\;\;\;\;\frac{{\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re}}{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im + 1} \cdot t_1\\
\mathbf{elif}\;y.im \leq 6.6 \cdot 10^{+106}:\\
\;\;\;\;t_0\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
\end{array}
if y.im < -5.1999999999999997e25 or 6.60000000000000015e106 < y.im Initial program 23.7%
exp-diff18.6%
exp-to-pow18.6%
hypot-def18.6%
*-commutative18.6%
exp-prod18.6%
fma-def18.6%
hypot-def51.6%
*-commutative51.6%
Simplified51.6%
Taylor expanded in y.re around 0 58.0%
rec-exp58.0%
distribute-rgt-neg-in58.0%
exp-prod61.1%
Simplified61.1%
Taylor expanded in y.im around 0 62.1%
if -5.1999999999999997e25 < y.im < -5.20000000000000026e-114 or 2.8500000000000001e-258 < y.im < 6.60000000000000015e106Initial program 34.5%
exp-diff32.7%
exp-to-pow32.7%
hypot-def32.7%
*-commutative32.7%
exp-prod29.7%
fma-def29.7%
hypot-def72.2%
*-commutative72.2%
Simplified72.2%
*-un-lft-identity72.2%
add-sqr-sqrt72.2%
times-frac72.2%
Applied egg-rr72.2%
associate-*l/72.2%
*-lft-identity72.2%
hypot-def52.6%
unpow252.6%
unpow252.6%
+-commutative52.6%
unpow252.6%
unpow252.6%
hypot-def72.2%
exp-prod72.2%
exp-prod75.4%
Simplified75.4%
Taylor expanded in y.re around 0 31.9%
unpow231.9%
unpow231.9%
hypot-def73.0%
Simplified73.0%
Taylor expanded in y.im around 0 64.3%
unpow264.3%
unpow264.3%
hypot-def73.6%
Simplified73.6%
if -5.20000000000000026e-114 < y.im < 2.8500000000000001e-258Initial program 43.0%
exp-diff43.0%
exp-to-pow43.0%
hypot-def43.0%
*-commutative43.0%
exp-prod43.0%
fma-def43.0%
hypot-def88.0%
*-commutative88.0%
Simplified88.0%
Taylor expanded in y.im around 0 88.0%
Taylor expanded in y.im around 0 68.5%
Final simplification68.2%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (sin (* y.im (log (hypot x.im x.re))))))
(if (<= y.re -1.45e-52)
(*
(* y.re (atan2 x.im x.re))
(exp
(-
(* y.re (log (sqrt (+ (* x.re x.re) (* x.im x.im)))))
(* (atan2 x.im x.re) y.im))))
(if (<= y.re 380.0)
(* t_0 (exp (* (atan2 x.im x.re) (- y.im))))
(* (pow (hypot x.im x.re) y.re) t_0)))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = sin((y_46_im * log(hypot(x_46_im, x_46_re))));
double tmp;
if (y_46_re <= -1.45e-52) {
tmp = (y_46_re * atan2(x_46_im, x_46_re)) * 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)));
} else if (y_46_re <= 380.0) {
tmp = t_0 * exp((atan2(x_46_im, x_46_re) * -y_46_im));
} else {
tmp = pow(hypot(x_46_im, x_46_re), y_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.sin((y_46_im * Math.log(Math.hypot(x_46_im, x_46_re))));
double tmp;
if (y_46_re <= -1.45e-52) {
tmp = (y_46_re * Math.atan2(x_46_im, x_46_re)) * Math.exp(((y_46_re * Math.log(Math.sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))) - (Math.atan2(x_46_im, x_46_re) * y_46_im)));
} else if (y_46_re <= 380.0) {
tmp = t_0 * 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) * t_0;
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): t_0 = math.sin((y_46_im * math.log(math.hypot(x_46_im, x_46_re)))) tmp = 0 if y_46_re <= -1.45e-52: tmp = (y_46_re * math.atan2(x_46_im, x_46_re)) * math.exp(((y_46_re * math.log(math.sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))) - (math.atan2(x_46_im, x_46_re) * y_46_im))) elif y_46_re <= 380.0: tmp = t_0 * 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) * t_0 return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = sin(Float64(y_46_im * log(hypot(x_46_im, x_46_re)))) tmp = 0.0 if (y_46_re <= -1.45e-52) tmp = Float64(Float64(y_46_re * atan(x_46_im, x_46_re)) * 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)))); elseif (y_46_re <= 380.0) tmp = Float64(t_0 * 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) * t_0); end return tmp end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = sin((y_46_im * log(hypot(x_46_im, x_46_re)))); tmp = 0.0; if (y_46_re <= -1.45e-52) tmp = (y_46_re * atan2(x_46_im, x_46_re)) * 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))); elseif (y_46_re <= 380.0) tmp = t_0 * exp((atan2(x_46_im, x_46_re) * -y_46_im)); else tmp = (hypot(x_46_im, x_46_re) ^ y_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[Sin[N[(y$46$im * N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[y$46$re, -1.45e-52], N[(N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision] * N[Exp[N[(N[(y$46$re * N[Log[N[Sqrt[N[(N[(x$46$re * x$46$re), $MachinePrecision] + N[(x$46$im * x$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision] - N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$re, 380.0], N[(t$95$0 * N[Exp[N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * (-y$46$im)), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(N[Power[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision], y$46$re], $MachinePrecision] * t$95$0), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \sin \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right)\\
\mathbf{if}\;y.re \leq -1.45 \cdot 10^{-52}:\\
\;\;\;\;\left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot e^{y.re \cdot \log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}\\
\mathbf{elif}\;y.re \leq 380:\\
\;\;\;\;t_0 \cdot e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot \left(-y.im\right)}\\
\mathbf{else}:\\
\;\;\;\;{\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re} \cdot t_0\\
\end{array}
\end{array}
if y.re < -1.4500000000000001e-52Initial program 33.8%
Taylor expanded in y.im around 0 81.4%
Taylor expanded in y.re around 0 80.2%
if -1.4500000000000001e-52 < y.re < 380Initial program 38.1%
exp-diff38.1%
exp-to-pow38.1%
hypot-def38.1%
*-commutative38.1%
exp-prod37.9%
fma-def37.9%
hypot-def82.7%
*-commutative82.7%
Simplified82.7%
*-un-lft-identity82.7%
add-sqr-sqrt82.7%
times-frac82.7%
Applied egg-rr82.7%
associate-*l/82.7%
*-lft-identity82.7%
hypot-def50.9%
unpow250.9%
unpow250.9%
+-commutative50.9%
unpow250.9%
unpow250.9%
hypot-def82.7%
exp-prod82.7%
exp-prod83.0%
Simplified83.0%
Taylor expanded in y.re around 0 29.0%
unpow229.0%
unpow229.0%
hypot-def64.9%
Simplified64.9%
Taylor expanded in y.re around 0 64.8%
rec-exp64.8%
distribute-rgt-neg-in64.8%
Simplified64.8%
if 380 < y.re Initial program 18.3%
exp-diff13.3%
exp-to-pow13.3%
hypot-def13.3%
*-commutative13.3%
exp-prod11.7%
fma-def11.7%
hypot-def43.3%
*-commutative43.3%
Simplified43.3%
*-un-lft-identity43.3%
add-sqr-sqrt43.3%
times-frac43.3%
Applied egg-rr43.3%
associate-*l/43.3%
*-lft-identity43.3%
hypot-def43.3%
unpow243.3%
unpow243.3%
+-commutative43.3%
unpow243.3%
unpow243.3%
hypot-def43.3%
exp-prod43.3%
exp-prod45.0%
Simplified45.0%
Taylor expanded in y.re around 0 15.0%
unpow215.0%
unpow215.0%
hypot-def50.0%
Simplified50.0%
Taylor expanded in y.im around 0 60.2%
unpow260.2%
unpow260.2%
hypot-def60.2%
Simplified60.2%
Final simplification68.5%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (sin (* y.im (log (hypot x.im x.re)))))
(t_1 (* (pow (hypot x.im x.re) y.re) t_0)))
(if (<= y.re -66000000000.0)
t_1
(if (<= y.re -4e-54)
(*
(pow (exp y.im) (- (atan2 x.im x.re)))
(sin (* y.re (atan2 x.im x.re))))
(if (<= y.re 1750.0)
(* t_0 (exp (* (atan2 x.im x.re) (- y.im))))
t_1)))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = sin((y_46_im * log(hypot(x_46_im, x_46_re))));
double t_1 = pow(hypot(x_46_im, x_46_re), y_46_re) * t_0;
double tmp;
if (y_46_re <= -66000000000.0) {
tmp = t_1;
} else if (y_46_re <= -4e-54) {
tmp = pow(exp(y_46_im), -atan2(x_46_im, x_46_re)) * sin((y_46_re * atan2(x_46_im, x_46_re)));
} else if (y_46_re <= 1750.0) {
tmp = t_0 * exp((atan2(x_46_im, x_46_re) * -y_46_im));
} else {
tmp = t_1;
}
return tmp;
}
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = Math.sin((y_46_im * Math.log(Math.hypot(x_46_im, x_46_re))));
double t_1 = Math.pow(Math.hypot(x_46_im, x_46_re), y_46_re) * t_0;
double tmp;
if (y_46_re <= -66000000000.0) {
tmp = t_1;
} else if (y_46_re <= -4e-54) {
tmp = 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 if (y_46_re <= 1750.0) {
tmp = t_0 * Math.exp((Math.atan2(x_46_im, x_46_re) * -y_46_im));
} else {
tmp = t_1;
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): t_0 = math.sin((y_46_im * math.log(math.hypot(x_46_im, x_46_re)))) t_1 = math.pow(math.hypot(x_46_im, x_46_re), y_46_re) * t_0 tmp = 0 if y_46_re <= -66000000000.0: tmp = t_1 elif y_46_re <= -4e-54: tmp = 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))) elif y_46_re <= 1750.0: tmp = t_0 * math.exp((math.atan2(x_46_im, x_46_re) * -y_46_im)) else: tmp = t_1 return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = sin(Float64(y_46_im * log(hypot(x_46_im, x_46_re)))) t_1 = Float64((hypot(x_46_im, x_46_re) ^ y_46_re) * t_0) tmp = 0.0 if (y_46_re <= -66000000000.0) tmp = t_1; elseif (y_46_re <= -4e-54) tmp = Float64((exp(y_46_im) ^ Float64(-atan(x_46_im, x_46_re))) * sin(Float64(y_46_re * atan(x_46_im, x_46_re)))); elseif (y_46_re <= 1750.0) tmp = Float64(t_0 * exp(Float64(atan(x_46_im, x_46_re) * Float64(-y_46_im)))); else tmp = t_1; end return tmp end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = sin((y_46_im * log(hypot(x_46_im, x_46_re)))); t_1 = (hypot(x_46_im, x_46_re) ^ y_46_re) * t_0; tmp = 0.0; if (y_46_re <= -66000000000.0) tmp = t_1; elseif (y_46_re <= -4e-54) tmp = (exp(y_46_im) ^ -atan2(x_46_im, x_46_re)) * sin((y_46_re * atan2(x_46_im, x_46_re))); elseif (y_46_re <= 1750.0) tmp = t_0 * exp((atan2(x_46_im, x_46_re) * -y_46_im)); else tmp = t_1; end tmp_2 = tmp; end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[Sin[N[(y$46$im * N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$1 = N[(N[Power[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision], y$46$re], $MachinePrecision] * t$95$0), $MachinePrecision]}, If[LessEqual[y$46$re, -66000000000.0], t$95$1, If[LessEqual[y$46$re, -4e-54], N[(N[Power[N[Exp[y$46$im], $MachinePrecision], (-N[ArcTan[x$46$im / x$46$re], $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, 1750.0], N[(t$95$0 * N[Exp[N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * (-y$46$im)), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \sin \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right)\\
t_1 := {\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re} \cdot t_0\\
\mathbf{if}\;y.re \leq -66000000000:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y.re \leq -4 \cdot 10^{-54}:\\
\;\;\;\;{\left(e^{y.im}\right)}^{\left(-\tan^{-1}_* \frac{x.im}{x.re}\right)} \cdot \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\\
\mathbf{elif}\;y.re \leq 1750:\\
\;\;\;\;t_0 \cdot e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot \left(-y.im\right)}\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if y.re < -6.6e10 or 1750 < y.re Initial program 25.8%
exp-diff20.2%
exp-to-pow20.2%
hypot-def20.2%
*-commutative20.2%
exp-prod17.7%
fma-def17.7%
hypot-def54.0%
*-commutative54.0%
Simplified54.0%
*-un-lft-identity54.0%
add-sqr-sqrt54.0%
times-frac54.0%
Applied egg-rr54.0%
associate-*l/54.0%
*-lft-identity54.0%
hypot-def54.0%
unpow254.0%
unpow254.0%
+-commutative54.0%
unpow254.0%
unpow254.0%
hypot-def54.0%
exp-prod54.0%
exp-prod56.5%
Simplified56.5%
Taylor expanded in y.re around 0 21.0%
unpow221.0%
unpow221.0%
hypot-def59.7%
Simplified59.7%
Taylor expanded in y.im around 0 72.7%
unpow272.7%
unpow272.7%
hypot-def72.7%
Simplified72.7%
if -6.6e10 < y.re < -4.0000000000000001e-54Initial program 37.5%
exp-diff37.5%
exp-to-pow37.5%
hypot-def37.5%
*-commutative37.5%
exp-prod37.6%
fma-def37.6%
hypot-def62.7%
*-commutative62.7%
Simplified62.7%
Taylor expanded in y.re around 0 52.0%
rec-exp52.0%
distribute-rgt-neg-in52.0%
exp-prod52.2%
Simplified52.2%
Taylor expanded in y.im around 0 64.7%
if -4.0000000000000001e-54 < y.re < 1750Initial program 38.1%
exp-diff38.1%
exp-to-pow38.1%
hypot-def38.1%
*-commutative38.1%
exp-prod37.9%
fma-def37.9%
hypot-def82.7%
*-commutative82.7%
Simplified82.7%
*-un-lft-identity82.7%
add-sqr-sqrt82.7%
times-frac82.7%
Applied egg-rr82.7%
associate-*l/82.7%
*-lft-identity82.7%
hypot-def50.9%
unpow250.9%
unpow250.9%
+-commutative50.9%
unpow250.9%
unpow250.9%
hypot-def82.7%
exp-prod82.7%
exp-prod83.0%
Simplified83.0%
Taylor expanded in y.re around 0 29.0%
unpow229.0%
unpow229.0%
hypot-def64.9%
Simplified64.9%
Taylor expanded in y.re around 0 64.8%
rec-exp64.8%
distribute-rgt-neg-in64.8%
Simplified64.8%
Final simplification68.6%
(FPCore (x.re x.im y.re y.im) :precision binary64 (if (or (<= y.im -5e+25) (not (<= y.im 3.55e+106))) (* (pow (exp y.im) (- (atan2 x.im x.re))) (sin (* y.re (atan2 x.im x.re)))) (* (pow (hypot x.im x.re) y.re) (sin (* y.im (log (hypot x.im x.re)))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double tmp;
if ((y_46_im <= -5e+25) || !(y_46_im <= 3.55e+106)) {
tmp = 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 = pow(hypot(x_46_im, x_46_re), y_46_re) * sin((y_46_im * log(hypot(x_46_im, x_46_re))));
}
return tmp;
}
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double tmp;
if ((y_46_im <= -5e+25) || !(y_46_im <= 3.55e+106)) {
tmp = 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 = Math.pow(Math.hypot(x_46_im, x_46_re), y_46_re) * Math.sin((y_46_im * Math.log(Math.hypot(x_46_im, x_46_re))));
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): tmp = 0 if (y_46_im <= -5e+25) or not (y_46_im <= 3.55e+106): tmp = 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 = math.pow(math.hypot(x_46_im, x_46_re), y_46_re) * math.sin((y_46_im * math.log(math.hypot(x_46_im, x_46_re)))) return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) tmp = 0.0 if ((y_46_im <= -5e+25) || !(y_46_im <= 3.55e+106)) tmp = Float64((exp(y_46_im) ^ Float64(-atan(x_46_im, x_46_re))) * sin(Float64(y_46_re * atan(x_46_im, x_46_re)))); else tmp = Float64((hypot(x_46_im, x_46_re) ^ y_46_re) * sin(Float64(y_46_im * log(hypot(x_46_im, x_46_re))))); end return tmp end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im) tmp = 0.0; if ((y_46_im <= -5e+25) || ~((y_46_im <= 3.55e+106))) tmp = (exp(y_46_im) ^ -atan2(x_46_im, x_46_re)) * sin((y_46_re * atan2(x_46_im, x_46_re))); else tmp = (hypot(x_46_im, x_46_re) ^ y_46_re) * sin((y_46_im * log(hypot(x_46_im, x_46_re)))); end tmp_2 = tmp; end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := If[Or[LessEqual[y$46$im, -5e+25], N[Not[LessEqual[y$46$im, 3.55e+106]], $MachinePrecision]], N[(N[Power[N[Exp[y$46$im], $MachinePrecision], (-N[ArcTan[x$46$im / x$46$re], $MachinePrecision])], $MachinePrecision] * N[Sin[N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(N[Power[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision], y$46$re], $MachinePrecision] * N[Sin[N[(y$46$im * N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y.im \leq -5 \cdot 10^{+25} \lor \neg \left(y.im \leq 3.55 \cdot 10^{+106}\right):\\
\;\;\;\;{\left(e^{y.im}\right)}^{\left(-\tan^{-1}_* \frac{x.im}{x.re}\right)} \cdot \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\\
\mathbf{else}:\\
\;\;\;\;{\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re} \cdot \sin \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right)\\
\end{array}
\end{array}
if y.im < -5.00000000000000024e25 or 3.55000000000000015e106 < y.im Initial program 23.7%
exp-diff18.6%
exp-to-pow18.6%
hypot-def18.6%
*-commutative18.6%
exp-prod18.6%
fma-def18.6%
hypot-def51.6%
*-commutative51.6%
Simplified51.6%
Taylor expanded in y.re around 0 58.0%
rec-exp58.0%
distribute-rgt-neg-in58.0%
exp-prod61.1%
Simplified61.1%
Taylor expanded in y.im around 0 62.1%
if -5.00000000000000024e25 < y.im < 3.55000000000000015e106Initial program 37.2%
exp-diff36.0%
exp-to-pow36.0%
hypot-def36.0%
*-commutative36.0%
exp-prod33.9%
fma-def33.9%
hypot-def77.3%
*-commutative77.3%
Simplified77.3%
*-un-lft-identity77.3%
add-sqr-sqrt77.3%
times-frac77.3%
Applied egg-rr77.3%
associate-*l/77.3%
*-lft-identity77.3%
hypot-def58.5%
unpow258.5%
unpow258.5%
+-commutative58.5%
unpow258.5%
unpow258.5%
hypot-def77.3%
exp-prod77.3%
exp-prod79.4%
Simplified79.4%
Taylor expanded in y.re around 0 26.9%
unpow226.9%
unpow226.9%
hypot-def65.1%
Simplified65.1%
Taylor expanded in y.im around 0 56.6%
unpow256.6%
unpow256.6%
hypot-def65.5%
Simplified65.5%
Final simplification64.2%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(if (<= y.im -5.4e+169)
(*
(* y.re (atan2 x.im x.re))
(exp (- (* y.re (log x.re)) (* (atan2 x.im x.re) y.im))))
(* (pow (hypot x.im x.re) y.re) (sin (* y.im (log (hypot x.im x.re)))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double tmp;
if (y_46_im <= -5.4e+169) {
tmp = (y_46_re * atan2(x_46_im, x_46_re)) * exp(((y_46_re * log(x_46_re)) - (atan2(x_46_im, x_46_re) * y_46_im)));
} else {
tmp = pow(hypot(x_46_im, x_46_re), y_46_re) * sin((y_46_im * log(hypot(x_46_im, x_46_re))));
}
return tmp;
}
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double tmp;
if (y_46_im <= -5.4e+169) {
tmp = (y_46_re * Math.atan2(x_46_im, x_46_re)) * Math.exp(((y_46_re * Math.log(x_46_re)) - (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) * Math.sin((y_46_im * Math.log(Math.hypot(x_46_im, x_46_re))));
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): tmp = 0 if y_46_im <= -5.4e+169: tmp = (y_46_re * math.atan2(x_46_im, x_46_re)) * math.exp(((y_46_re * math.log(x_46_re)) - (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) * math.sin((y_46_im * math.log(math.hypot(x_46_im, x_46_re)))) return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) tmp = 0.0 if (y_46_im <= -5.4e+169) tmp = Float64(Float64(y_46_re * atan(x_46_im, x_46_re)) * exp(Float64(Float64(y_46_re * log(x_46_re)) - Float64(atan(x_46_im, x_46_re) * y_46_im)))); else tmp = Float64((hypot(x_46_im, x_46_re) ^ y_46_re) * sin(Float64(y_46_im * log(hypot(x_46_im, x_46_re))))); end return tmp end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im) tmp = 0.0; if (y_46_im <= -5.4e+169) tmp = (y_46_re * atan2(x_46_im, x_46_re)) * exp(((y_46_re * log(x_46_re)) - (atan2(x_46_im, x_46_re) * y_46_im))); else tmp = (hypot(x_46_im, x_46_re) ^ y_46_re) * sin((y_46_im * log(hypot(x_46_im, x_46_re)))); end tmp_2 = tmp; end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := If[LessEqual[y$46$im, -5.4e+169], N[(N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision] * N[Exp[N[(N[(y$46$re * N[Log[x$46$re], $MachinePrecision]), $MachinePrecision] - 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[Sin[N[(y$46$im * N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y.im \leq -5.4 \cdot 10^{+169}:\\
\;\;\;\;\left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot e^{y.re \cdot \log x.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}\\
\mathbf{else}:\\
\;\;\;\;{\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re} \cdot \sin \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right)\\
\end{array}
\end{array}
if y.im < -5.39999999999999981e169Initial program 20.0%
Taylor expanded in y.im around 0 47.9%
Taylor expanded in x.re around inf 32.5%
Taylor expanded in y.re around 0 40.0%
if -5.39999999999999981e169 < y.im Initial program 34.4%
exp-diff32.1%
exp-to-pow32.1%
hypot-def32.1%
*-commutative32.1%
exp-prod30.6%
fma-def30.6%
hypot-def70.3%
*-commutative70.3%
Simplified70.3%
*-un-lft-identity70.3%
add-sqr-sqrt70.3%
times-frac70.3%
Applied egg-rr70.3%
associate-*l/70.3%
*-lft-identity70.3%
hypot-def54.7%
unpow254.7%
unpow254.7%
+-commutative54.7%
unpow254.7%
unpow254.7%
hypot-def70.3%
exp-prod70.3%
exp-prod71.9%
Simplified71.9%
Taylor expanded in y.re around 0 25.4%
unpow225.4%
unpow225.4%
hypot-def61.4%
Simplified61.4%
Taylor expanded in y.im around 0 50.8%
unpow250.8%
unpow250.8%
hypot-def54.2%
Simplified54.2%
Final simplification51.9%
(FPCore (x.re x.im y.re y.im) :precision binary64 (* (* y.re (atan2 x.im x.re)) (exp (- (* y.re (log x.re)) (* (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) {
return (y_46_re * atan2(x_46_im, x_46_re)) * exp(((y_46_re * log(x_46_re)) - (atan2(x_46_im, x_46_re) * y_46_im)));
}
real(8) function code(x_46re, x_46im, y_46re, y_46im)
real(8), intent (in) :: x_46re
real(8), intent (in) :: x_46im
real(8), intent (in) :: y_46re
real(8), intent (in) :: y_46im
code = (y_46re * atan2(x_46im, x_46re)) * exp(((y_46re * log(x_46re)) - (atan2(x_46im, x_46re) * y_46im)))
end function
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
return (y_46_re * Math.atan2(x_46_im, x_46_re)) * Math.exp(((y_46_re * Math.log(x_46_re)) - (Math.atan2(x_46_im, x_46_re) * y_46_im)));
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): return (y_46_re * math.atan2(x_46_im, x_46_re)) * math.exp(((y_46_re * math.log(x_46_re)) - (math.atan2(x_46_im, x_46_re) * y_46_im)))
function code(x_46_re, x_46_im, y_46_re, y_46_im) return Float64(Float64(y_46_re * atan(x_46_im, x_46_re)) * exp(Float64(Float64(y_46_re * log(x_46_re)) - Float64(atan(x_46_im, x_46_re) * y_46_im)))) end
function tmp = code(x_46_re, x_46_im, y_46_re, y_46_im) tmp = (y_46_re * atan2(x_46_im, x_46_re)) * exp(((y_46_re * log(x_46_re)) - (atan2(x_46_im, x_46_re) * y_46_im))); end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := N[(N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision] * N[Exp[N[(N[(y$46$re * N[Log[x$46$re], $MachinePrecision]), $MachinePrecision] - N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot e^{y.re \cdot \log x.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}
\end{array}
Initial program 32.1%
Taylor expanded in y.im around 0 52.9%
Taylor expanded in x.re around inf 27.3%
Taylor expanded in y.re around 0 27.7%
Final simplification27.7%
herbie shell --seed 2023292
(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)))))