
(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 19 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.re x.im)))
(t_1 (exp (fma t_0 y.re (* (atan2 x.im x.re) (- y.im)))))
(t_2 (* y.re (atan2 x.im x.re))))
(if (<= y.re -4.5e+241)
(* (pow (hypot x.im x.re) y.re) (sin (fabs t_2)))
(if (<= y.re -5e+15)
(* t_1 (sin (fabs (pow (cbrt (* y.im (log (hypot x.im x.re)))) 3.0))))
(* t_1 (sin (fma t_0 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 = log(hypot(x_46_re, x_46_im));
double t_1 = exp(fma(t_0, y_46_re, (atan2(x_46_im, x_46_re) * -y_46_im)));
double t_2 = y_46_re * atan2(x_46_im, x_46_re);
double tmp;
if (y_46_re <= -4.5e+241) {
tmp = pow(hypot(x_46_im, x_46_re), y_46_re) * sin(fabs(t_2));
} else if (y_46_re <= -5e+15) {
tmp = t_1 * sin(fabs(pow(cbrt((y_46_im * log(hypot(x_46_im, x_46_re)))), 3.0)));
} else {
tmp = t_1 * sin(fma(t_0, y_46_im, t_2));
}
return tmp;
}
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = log(hypot(x_46_re, x_46_im)) t_1 = exp(fma(t_0, y_46_re, Float64(atan(x_46_im, x_46_re) * Float64(-y_46_im)))) t_2 = Float64(y_46_re * atan(x_46_im, x_46_re)) tmp = 0.0 if (y_46_re <= -4.5e+241) tmp = Float64((hypot(x_46_im, x_46_re) ^ y_46_re) * sin(abs(t_2))); elseif (y_46_re <= -5e+15) tmp = Float64(t_1 * sin(abs((cbrt(Float64(y_46_im * log(hypot(x_46_im, x_46_re)))) ^ 3.0)))); else tmp = Float64(t_1 * sin(fma(t_0, 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[Log[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision]], $MachinePrecision]}, Block[{t$95$1 = 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]}, Block[{t$95$2 = N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y$46$re, -4.5e+241], N[(N[Power[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision], y$46$re], $MachinePrecision] * N[Sin[N[Abs[t$95$2], $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$re, -5e+15], N[(t$95$1 * N[Sin[N[Abs[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]), $MachinePrecision], N[(t$95$1 * N[Sin[N[(t$95$0 * y$46$im + t$95$2), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \log \left(\mathsf{hypot}\left(x.re, x.im\right)\right)\\
t_1 := e^{\mathsf{fma}\left(t\_0, y.re, \tan^{-1}_* \frac{x.im}{x.re} \cdot \left(-y.im\right)\right)}\\
t_2 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
\mathbf{if}\;y.re \leq -4.5 \cdot 10^{+241}:\\
\;\;\;\;{\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re} \cdot \sin \left(\left|t\_2\right|\right)\\
\mathbf{elif}\;y.re \leq -5 \cdot 10^{+15}:\\
\;\;\;\;t\_1 \cdot \sin \left(\left|{\left(\sqrt[3]{y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)}\right)}^{3}\right|\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1 \cdot \sin \left(\mathsf{fma}\left(t\_0, y.im, t\_2\right)\right)\\
\end{array}
\end{array}
if y.re < -4.49999999999999993e241Initial program 50.0%
exp-diff42.9%
exp-to-pow42.9%
hypot-define42.9%
*-commutative42.9%
exp-prod42.9%
fma-define42.9%
hypot-define64.3%
*-commutative64.3%
Simplified64.3%
Taylor expanded in y.im around 0 71.4%
unpow271.4%
unpow271.4%
hypot-undefine71.4%
Simplified71.4%
Taylor expanded in y.im around 0 64.3%
add-sqr-sqrt42.9%
sqrt-unprod21.4%
pow221.4%
Applied egg-rr21.4%
unpow221.4%
rem-sqrt-square92.9%
Simplified92.9%
if -4.49999999999999993e241 < y.re < -5e15Initial program 30.9%
cancel-sign-sub-inv30.9%
fma-define30.9%
hypot-define30.9%
distribute-lft-neg-in30.9%
distribute-rgt-neg-out30.9%
fma-define30.9%
hypot-define81.8%
*-commutative81.8%
Simplified81.8%
add-sqr-sqrt45.5%
sqrt-unprod36.4%
pow236.4%
fma-undefine36.4%
*-commutative36.4%
*-commutative36.4%
fma-define36.4%
Applied egg-rr36.4%
unpow236.4%
rem-sqrt-square87.3%
*-commutative87.3%
hypot-undefine36.4%
unpow236.4%
unpow236.4%
+-commutative36.4%
unpow236.4%
unpow236.4%
hypot-undefine87.3%
Simplified87.3%
add-cube-cbrt90.9%
pow387.3%
Applied egg-rr87.3%
Taylor expanded in y.re around 0 23.6%
unpow1/341.8%
unpow241.8%
unpow241.8%
hypot-undefine92.7%
Simplified92.7%
if -5e15 < y.re Initial program 36.3%
cancel-sign-sub-inv36.3%
fma-define36.3%
hypot-define36.3%
distribute-lft-neg-in36.3%
distribute-rgt-neg-out36.3%
fma-define36.3%
hypot-define78.7%
*-commutative78.7%
Simplified78.7%
Final simplification82.5%
(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)))
(t_2 (exp (fma t_1 y.re (* (atan2 x.im x.re) (- y.im))))))
(if (<= y.re -2e+83)
(* t_2 (sin (fabs (fma y.im (log (hypot x.im x.re)) t_0))))
(* t_2 (sin (fma t_1 y.im 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 t_2 = exp(fma(t_1, y_46_re, (atan2(x_46_im, x_46_re) * -y_46_im)));
double tmp;
if (y_46_re <= -2e+83) {
tmp = t_2 * sin(fabs(fma(y_46_im, log(hypot(x_46_im, x_46_re)), t_0)));
} else {
tmp = t_2 * sin(fma(t_1, y_46_im, 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)) t_2 = exp(fma(t_1, y_46_re, Float64(atan(x_46_im, x_46_re) * Float64(-y_46_im)))) tmp = 0.0 if (y_46_re <= -2e+83) tmp = Float64(t_2 * sin(abs(fma(y_46_im, log(hypot(x_46_im, x_46_re)), t_0)))); else tmp = Float64(t_2 * sin(fma(t_1, y_46_im, 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]}, Block[{t$95$2 = 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]}, If[LessEqual[y$46$re, -2e+83], N[(t$95$2 * N[Sin[N[Abs[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], N[(t$95$2 * N[Sin[N[(t$95$1 * y$46$im + t$95$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)\\
t_2 := e^{\mathsf{fma}\left(t\_1, y.re, \tan^{-1}_* \frac{x.im}{x.re} \cdot \left(-y.im\right)\right)}\\
\mathbf{if}\;y.re \leq -2 \cdot 10^{+83}:\\
\;\;\;\;t\_2 \cdot \sin \left(\left|\mathsf{fma}\left(y.im, \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right), t\_0\right)\right|\right)\\
\mathbf{else}:\\
\;\;\;\;t\_2 \cdot \sin \left(\mathsf{fma}\left(t\_1, y.im, t\_0\right)\right)\\
\end{array}
\end{array}
if y.re < -2.00000000000000006e83Initial program 34.5%
cancel-sign-sub-inv34.5%
fma-define34.5%
hypot-define34.5%
distribute-lft-neg-in34.5%
distribute-rgt-neg-out34.5%
fma-define34.5%
hypot-define78.2%
*-commutative78.2%
Simplified78.2%
add-sqr-sqrt49.1%
sqrt-unprod29.1%
pow229.1%
fma-undefine29.1%
*-commutative29.1%
*-commutative29.1%
fma-define29.1%
Applied egg-rr29.1%
unpow229.1%
rem-sqrt-square90.9%
*-commutative90.9%
hypot-undefine45.5%
unpow245.5%
unpow245.5%
+-commutative45.5%
unpow245.5%
unpow245.5%
hypot-undefine90.9%
Simplified90.9%
if -2.00000000000000006e83 < y.re Initial program 36.3%
cancel-sign-sub-inv36.3%
fma-define36.3%
hypot-define36.3%
distribute-lft-neg-in36.3%
distribute-rgt-neg-out36.3%
fma-define36.3%
hypot-define79.2%
*-commutative79.2%
Simplified79.2%
Final simplification81.7%
(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))))
(if (<= y.im -0.013)
(* (sin (* y.im t_0)) (pow (exp y.im) (- (atan2 x.im x.re))))
(if (<= y.im 2.4e+125)
(*
(sin (fma (log (hypot x.re x.im)) y.im t_1))
(/ (pow (hypot x.im x.re) y.re) (pow (exp (atan2 x.im x.re)) y.im)))
(*
(sin (fabs (fma y.im t_0 t_1)))
(exp (* (atan2 x.im x.re) (- y.im))))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = log(hypot(x_46_im, x_46_re));
double t_1 = y_46_re * atan2(x_46_im, x_46_re);
double tmp;
if (y_46_im <= -0.013) {
tmp = sin((y_46_im * t_0)) * pow(exp(y_46_im), -atan2(x_46_im, x_46_re));
} else if (y_46_im <= 2.4e+125) {
tmp = sin(fma(log(hypot(x_46_re, x_46_im)), y_46_im, t_1)) * (pow(hypot(x_46_im, x_46_re), y_46_re) / pow(exp(atan2(x_46_im, x_46_re)), y_46_im));
} else {
tmp = sin(fabs(fma(y_46_im, t_0, t_1))) * exp((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_im, x_46_re)) t_1 = Float64(y_46_re * atan(x_46_im, x_46_re)) tmp = 0.0 if (y_46_im <= -0.013) tmp = Float64(sin(Float64(y_46_im * t_0)) * (exp(y_46_im) ^ Float64(-atan(x_46_im, x_46_re)))); elseif (y_46_im <= 2.4e+125) tmp = Float64(sin(fma(log(hypot(x_46_re, x_46_im)), y_46_im, t_1)) * Float64((hypot(x_46_im, x_46_re) ^ y_46_re) / (exp(atan(x_46_im, x_46_re)) ^ y_46_im))); else tmp = Float64(sin(abs(fma(y_46_im, t_0, t_1))) * exp(Float64(atan(x_46_im, x_46_re) * Float64(-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$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]}, If[LessEqual[y$46$im, -0.013], N[(N[Sin[N[(y$46$im * t$95$0), $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, 2.4e+125], N[(N[Sin[N[(N[Log[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision]], $MachinePrecision] * y$46$im + t$95$1), $MachinePrecision]], $MachinePrecision] * N[(N[Power[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision], y$46$re], $MachinePrecision] / N[Power[N[Exp[N[ArcTan[x$46$im / x$46$re], $MachinePrecision]], $MachinePrecision], y$46$im], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[Sin[N[Abs[N[(y$46$im * t$95$0 + t$95$1), $MachinePrecision]], $MachinePrecision]], $MachinePrecision] * N[Exp[N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * (-y$46$im)), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\\
t_1 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
\mathbf{if}\;y.im \leq -0.013:\\
\;\;\;\;\sin \left(y.im \cdot t\_0\right) \cdot {\left(e^{y.im}\right)}^{\left(-\tan^{-1}_* \frac{x.im}{x.re}\right)}\\
\mathbf{elif}\;y.im \leq 2.4 \cdot 10^{+125}:\\
\;\;\;\;\sin \left(\mathsf{fma}\left(\log \left(\mathsf{hypot}\left(x.re, x.im\right)\right), y.im, t\_1\right)\right) \cdot \frac{{\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re}}{{\left(e^{\tan^{-1}_* \frac{x.im}{x.re}}\right)}^{y.im}}\\
\mathbf{else}:\\
\;\;\;\;\sin \left(\left|\mathsf{fma}\left(y.im, t\_0, t\_1\right)\right|\right) \cdot e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot \left(-y.im\right)}\\
\end{array}
\end{array}
if y.im < -0.0129999999999999994Initial program 28.4%
exp-diff21.7%
exp-to-pow21.7%
hypot-define21.7%
*-commutative21.7%
exp-prod21.3%
fma-define21.3%
hypot-define58.0%
*-commutative58.0%
Simplified58.0%
Taylor expanded in y.re around 0 65.2%
rec-exp65.3%
distribute-rgt-neg-in65.3%
exp-prod64.9%
Simplified64.9%
Taylor expanded in y.re around 0 23.1%
unpow22.1%
unpow22.1%
hypot-undefine4.0%
Simplified66.6%
if -0.0129999999999999994 < y.im < 2.4e125Initial program 41.7%
exp-diff41.7%
exp-to-pow41.7%
hypot-define41.7%
*-commutative41.7%
exp-prod40.5%
fma-define40.5%
hypot-define82.2%
*-commutative82.2%
Simplified82.2%
Taylor expanded in y.re around inf 62.1%
unpow262.1%
unpow262.1%
hypot-undefine83.5%
*-commutative83.5%
exp-prod83.5%
Simplified83.5%
if 2.4e125 < y.im Initial program 23.7%
cancel-sign-sub-inv23.7%
fma-define23.7%
hypot-define23.7%
distribute-lft-neg-in23.7%
distribute-rgt-neg-out23.7%
fma-define23.7%
hypot-define69.0%
*-commutative69.0%
Simplified69.0%
add-sqr-sqrt55.9%
sqrt-unprod11.0%
pow211.0%
fma-undefine11.0%
*-commutative11.0%
*-commutative11.0%
fma-define11.0%
Applied egg-rr11.0%
unpow211.0%
rem-sqrt-square74.7%
*-commutative74.7%
hypot-undefine29.4%
unpow229.4%
unpow229.4%
+-commutative29.4%
unpow229.4%
unpow229.4%
hypot-undefine74.7%
Simplified74.7%
Taylor expanded in y.re around 0 69.6%
neg-mul-166.5%
distribute-rgt-neg-in66.5%
Simplified69.6%
Final simplification77.4%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0
(exp
(-
(* y.re (log (sqrt (+ (* x.re x.re) (* x.im x.im)))))
(* (atan2 x.im x.re) y.im))))
(t_1 (* y.im (log (hypot x.im x.re))))
(t_2 (* y.re (atan2 x.im x.re))))
(if (<= y.re -2.05e+14)
(* (pow (hypot x.im x.re) y.re) (sin (fabs t_2)))
(if (<= y.re 68000.0)
(*
(sin (fma (log (hypot x.re x.im)) y.im t_2))
(/ (pow (hypot x.re x.im) y.re) (pow (exp y.im) (atan2 x.im x.re))))
(if (<= y.re 5e+162)
(* t_0 (sin t_1))
(* t_0 (sin (+ t_2 (fabs t_1)))))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = exp(((y_46_re * log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))) - (atan2(x_46_im, x_46_re) * y_46_im)));
double t_1 = 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 tmp;
if (y_46_re <= -2.05e+14) {
tmp = pow(hypot(x_46_im, x_46_re), y_46_re) * sin(fabs(t_2));
} else if (y_46_re <= 68000.0) {
tmp = sin(fma(log(hypot(x_46_re, x_46_im)), y_46_im, t_2)) * (pow(hypot(x_46_re, x_46_im), y_46_re) / pow(exp(y_46_im), atan2(x_46_im, x_46_re)));
} else if (y_46_re <= 5e+162) {
tmp = t_0 * sin(t_1);
} else {
tmp = t_0 * sin((t_2 + fabs(t_1)));
}
return tmp;
}
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = exp(Float64(Float64(y_46_re * log(sqrt(Float64(Float64(x_46_re * x_46_re) + Float64(x_46_im * x_46_im))))) - Float64(atan(x_46_im, x_46_re) * y_46_im))) t_1 = 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)) tmp = 0.0 if (y_46_re <= -2.05e+14) tmp = Float64((hypot(x_46_im, x_46_re) ^ y_46_re) * sin(abs(t_2))); elseif (y_46_re <= 68000.0) tmp = Float64(sin(fma(log(hypot(x_46_re, x_46_im)), y_46_im, t_2)) * Float64((hypot(x_46_re, x_46_im) ^ y_46_re) / (exp(y_46_im) ^ atan(x_46_im, x_46_re)))); elseif (y_46_re <= 5e+162) tmp = Float64(t_0 * sin(t_1)); else tmp = Float64(t_0 * sin(Float64(t_2 + abs(t_1)))); end return tmp end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[Exp[N[(N[(y$46$re * N[Log[N[Sqrt[N[(N[(x$46$re * x$46$re), $MachinePrecision] + N[(x$46$im * x$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision] - N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$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[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y$46$re, -2.05e+14], N[(N[Power[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision], y$46$re], $MachinePrecision] * N[Sin[N[Abs[t$95$2], $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$re, 68000.0], N[(N[Sin[N[(N[Log[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision]], $MachinePrecision] * y$46$im + t$95$2), $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], If[LessEqual[y$46$re, 5e+162], N[(t$95$0 * N[Sin[t$95$1], $MachinePrecision]), $MachinePrecision], N[(t$95$0 * N[Sin[N[(t$95$2 + N[Abs[t$95$1], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := e^{y.re \cdot \log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}\\
t_1 := y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\\
t_2 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
\mathbf{if}\;y.re \leq -2.05 \cdot 10^{+14}:\\
\;\;\;\;{\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re} \cdot \sin \left(\left|t\_2\right|\right)\\
\mathbf{elif}\;y.re \leq 68000:\\
\;\;\;\;\sin \left(\mathsf{fma}\left(\log \left(\mathsf{hypot}\left(x.re, x.im\right)\right), y.im, t\_2\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{elif}\;y.re \leq 5 \cdot 10^{+162}:\\
\;\;\;\;t\_0 \cdot \sin t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_0 \cdot \sin \left(t\_2 + \left|t\_1\right|\right)\\
\end{array}
\end{array}
if y.re < -2.05e14Initial program 34.8%
exp-diff29.0%
exp-to-pow29.0%
hypot-define29.0%
*-commutative29.0%
exp-prod26.1%
fma-define26.1%
hypot-define63.8%
*-commutative63.8%
Simplified63.8%
Taylor expanded in y.im around 0 71.2%
unpow271.2%
unpow271.2%
hypot-undefine71.2%
Simplified71.2%
Taylor expanded in y.im around 0 71.2%
add-sqr-sqrt42.1%
sqrt-unprod42.1%
pow242.1%
Applied egg-rr42.1%
unpow242.1%
rem-sqrt-square81.3%
Simplified81.3%
if -2.05e14 < y.re < 68000Initial program 33.0%
exp-diff33.0%
exp-to-pow33.0%
hypot-define33.0%
*-commutative33.0%
exp-prod32.9%
fma-define32.9%
hypot-define79.2%
*-commutative79.2%
Simplified79.2%
if 68000 < y.re < 4.9999999999999997e162Initial program 41.9%
Taylor expanded in y.re around 0 48.4%
unpow248.4%
unpow248.4%
hypot-undefine80.8%
Simplified80.8%
if 4.9999999999999997e162 < y.re Initial program 46.2%
add-sqr-sqrt19.2%
sqrt-unprod26.9%
pow226.9%
*-commutative26.9%
hypot-define57.7%
Applied egg-rr57.7%
unpow257.7%
rem-sqrt-square77.0%
hypot-undefine46.2%
unpow246.2%
unpow246.2%
+-commutative46.2%
unpow246.2%
unpow246.2%
hypot-undefine77.0%
Simplified77.0%
Final simplification79.7%
(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 35.9%
cancel-sign-sub-inv35.9%
fma-define35.9%
hypot-define35.9%
distribute-lft-neg-in35.9%
distribute-rgt-neg-out35.9%
fma-define35.9%
hypot-define79.0%
*-commutative79.0%
Simplified79.0%
Final simplification79.0%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0
(exp
(-
(* y.re (log (sqrt (+ (* x.re x.re) (* x.im x.im)))))
(* (atan2 x.im x.re) y.im))))
(t_1 (* y.im (log (hypot x.im x.re))))
(t_2 (* y.re (atan2 x.im x.re))))
(if (<= y.re -15000.0)
(* (pow (hypot x.im x.re) y.re) (sin (fabs t_2)))
(if (<= y.re 2200.0)
(*
(sin (fma (log (hypot x.re x.im)) y.im t_2))
(exp (* (atan2 x.im x.re) (- y.im))))
(if (<= y.re 2.95e+173)
(* t_0 (sin t_1))
(* t_0 (sin (+ t_2 (fabs t_1)))))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = exp(((y_46_re * log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))) - (atan2(x_46_im, x_46_re) * y_46_im)));
double t_1 = 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 tmp;
if (y_46_re <= -15000.0) {
tmp = pow(hypot(x_46_im, x_46_re), y_46_re) * sin(fabs(t_2));
} else if (y_46_re <= 2200.0) {
tmp = sin(fma(log(hypot(x_46_re, x_46_im)), y_46_im, t_2)) * exp((atan2(x_46_im, x_46_re) * -y_46_im));
} else if (y_46_re <= 2.95e+173) {
tmp = t_0 * sin(t_1);
} else {
tmp = t_0 * sin((t_2 + fabs(t_1)));
}
return tmp;
}
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = exp(Float64(Float64(y_46_re * log(sqrt(Float64(Float64(x_46_re * x_46_re) + Float64(x_46_im * x_46_im))))) - Float64(atan(x_46_im, x_46_re) * y_46_im))) t_1 = 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)) tmp = 0.0 if (y_46_re <= -15000.0) tmp = Float64((hypot(x_46_im, x_46_re) ^ y_46_re) * sin(abs(t_2))); elseif (y_46_re <= 2200.0) tmp = Float64(sin(fma(log(hypot(x_46_re, x_46_im)), y_46_im, t_2)) * exp(Float64(atan(x_46_im, x_46_re) * Float64(-y_46_im)))); elseif (y_46_re <= 2.95e+173) tmp = Float64(t_0 * sin(t_1)); else tmp = Float64(t_0 * sin(Float64(t_2 + abs(t_1)))); end return tmp end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[Exp[N[(N[(y$46$re * N[Log[N[Sqrt[N[(N[(x$46$re * x$46$re), $MachinePrecision] + N[(x$46$im * x$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision] - N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$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[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y$46$re, -15000.0], N[(N[Power[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision], y$46$re], $MachinePrecision] * N[Sin[N[Abs[t$95$2], $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$re, 2200.0], N[(N[Sin[N[(N[Log[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision]], $MachinePrecision] * y$46$im + t$95$2), $MachinePrecision]], $MachinePrecision] * N[Exp[N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * (-y$46$im)), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$re, 2.95e+173], N[(t$95$0 * N[Sin[t$95$1], $MachinePrecision]), $MachinePrecision], N[(t$95$0 * N[Sin[N[(t$95$2 + N[Abs[t$95$1], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := e^{y.re \cdot \log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}\\
t_1 := y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\\
t_2 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
\mathbf{if}\;y.re \leq -15000:\\
\;\;\;\;{\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re} \cdot \sin \left(\left|t\_2\right|\right)\\
\mathbf{elif}\;y.re \leq 2200:\\
\;\;\;\;\sin \left(\mathsf{fma}\left(\log \left(\mathsf{hypot}\left(x.re, x.im\right)\right), y.im, t\_2\right)\right) \cdot e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot \left(-y.im\right)}\\
\mathbf{elif}\;y.re \leq 2.95 \cdot 10^{+173}:\\
\;\;\;\;t\_0 \cdot \sin t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_0 \cdot \sin \left(t\_2 + \left|t\_1\right|\right)\\
\end{array}
\end{array}
if y.re < -15000Initial program 35.2%
exp-diff29.6%
exp-to-pow29.6%
hypot-define29.6%
*-commutative29.6%
exp-prod26.8%
fma-define26.8%
hypot-define64.8%
*-commutative64.8%
Simplified64.8%
Taylor expanded in y.im around 0 72.0%
unpow272.0%
unpow272.0%
hypot-undefine72.0%
Simplified72.0%
Taylor expanded in y.im around 0 72.0%
add-sqr-sqrt43.8%
sqrt-unprod43.8%
pow243.8%
Applied egg-rr43.8%
unpow243.8%
rem-sqrt-square81.9%
Simplified81.9%
if -15000 < y.re < 2200Initial program 32.8%
cancel-sign-sub-inv32.8%
fma-define32.8%
hypot-define32.8%
distribute-lft-neg-in32.8%
distribute-rgt-neg-out32.8%
fma-define32.8%
hypot-define79.0%
*-commutative79.0%
Simplified79.0%
Taylor expanded in y.re around 0 76.5%
neg-mul-176.5%
distribute-rgt-neg-in76.5%
Simplified76.5%
if 2200 < y.re < 2.9500000000000002e173Initial program 41.9%
Taylor expanded in y.re around 0 48.4%
unpow248.4%
unpow248.4%
hypot-undefine80.8%
Simplified80.8%
if 2.9500000000000002e173 < y.re Initial program 46.2%
add-sqr-sqrt19.2%
sqrt-unprod26.9%
pow226.9%
*-commutative26.9%
hypot-define57.7%
Applied egg-rr57.7%
unpow257.7%
rem-sqrt-square77.0%
hypot-undefine46.2%
unpow246.2%
unpow246.2%
+-commutative46.2%
unpow246.2%
unpow246.2%
hypot-undefine77.0%
Simplified77.0%
Final simplification78.6%
(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))))
(if (<= y.im -0.0116)
(* (sin (* y.im t_0)) (pow (exp y.im) (- (atan2 x.im x.re))))
(if (<= y.im 6.5e+71)
(*
(pow (hypot x.im x.re) y.re)
(+ (sin t_1) (* y.im (* t_0 (cos t_1)))))
(*
(sin (fma (log (hypot x.re x.im)) y.im t_1))
(exp (* (atan2 x.im x.re) (- y.im))))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = log(hypot(x_46_im, x_46_re));
double t_1 = y_46_re * atan2(x_46_im, x_46_re);
double tmp;
if (y_46_im <= -0.0116) {
tmp = sin((y_46_im * t_0)) * pow(exp(y_46_im), -atan2(x_46_im, x_46_re));
} else if (y_46_im <= 6.5e+71) {
tmp = pow(hypot(x_46_im, x_46_re), y_46_re) * (sin(t_1) + (y_46_im * (t_0 * cos(t_1))));
} else {
tmp = sin(fma(log(hypot(x_46_re, x_46_im)), y_46_im, t_1)) * exp((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_im, x_46_re)) t_1 = Float64(y_46_re * atan(x_46_im, x_46_re)) tmp = 0.0 if (y_46_im <= -0.0116) tmp = Float64(sin(Float64(y_46_im * t_0)) * (exp(y_46_im) ^ Float64(-atan(x_46_im, x_46_re)))); elseif (y_46_im <= 6.5e+71) tmp = Float64((hypot(x_46_im, x_46_re) ^ y_46_re) * Float64(sin(t_1) + Float64(y_46_im * Float64(t_0 * cos(t_1))))); else tmp = Float64(sin(fma(log(hypot(x_46_re, x_46_im)), y_46_im, t_1)) * exp(Float64(atan(x_46_im, x_46_re) * Float64(-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$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]}, If[LessEqual[y$46$im, -0.0116], N[(N[Sin[N[(y$46$im * t$95$0), $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, 6.5e+71], N[(N[Power[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision], y$46$re], $MachinePrecision] * N[(N[Sin[t$95$1], $MachinePrecision] + N[(y$46$im * N[(t$95$0 * N[Cos[t$95$1], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[Sin[N[(N[Log[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision]], $MachinePrecision] * y$46$im + t$95$1), $MachinePrecision]], $MachinePrecision] * N[Exp[N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * (-y$46$im)), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\\
t_1 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
\mathbf{if}\;y.im \leq -0.0116:\\
\;\;\;\;\sin \left(y.im \cdot t\_0\right) \cdot {\left(e^{y.im}\right)}^{\left(-\tan^{-1}_* \frac{x.im}{x.re}\right)}\\
\mathbf{elif}\;y.im \leq 6.5 \cdot 10^{+71}:\\
\;\;\;\;{\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re} \cdot \left(\sin t\_1 + y.im \cdot \left(t\_0 \cdot \cos t\_1\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\sin \left(\mathsf{fma}\left(\log \left(\mathsf{hypot}\left(x.re, x.im\right)\right), y.im, t\_1\right)\right) \cdot e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot \left(-y.im\right)}\\
\end{array}
\end{array}
if y.im < -0.0116Initial program 28.4%
exp-diff21.7%
exp-to-pow21.7%
hypot-define21.7%
*-commutative21.7%
exp-prod21.3%
fma-define21.3%
hypot-define58.0%
*-commutative58.0%
Simplified58.0%
Taylor expanded in y.re around 0 65.2%
rec-exp65.3%
distribute-rgt-neg-in65.3%
exp-prod64.9%
Simplified64.9%
Taylor expanded in y.re around 0 23.1%
unpow22.1%
unpow22.1%
hypot-undefine4.0%
Simplified66.6%
if -0.0116 < y.im < 6.49999999999999954e71Initial program 42.1%
exp-diff42.1%
exp-to-pow42.1%
hypot-define42.1%
*-commutative42.1%
exp-prod41.4%
fma-define41.4%
hypot-define84.9%
*-commutative84.9%
Simplified84.9%
Taylor expanded in y.im around 0 62.2%
unpow262.2%
unpow262.2%
hypot-undefine84.2%
Simplified84.2%
Taylor expanded in y.im around 0 50.3%
*-commutative50.3%
unpow250.3%
unpow250.3%
hypot-undefine85.0%
Simplified85.0%
if 6.49999999999999954e71 < y.im Initial program 26.6%
cancel-sign-sub-inv26.6%
fma-define26.6%
hypot-define26.6%
distribute-lft-neg-in26.6%
distribute-rgt-neg-out26.6%
fma-define26.6%
hypot-define65.9%
*-commutative65.9%
Simplified65.9%
Taylor expanded in y.re around 0 61.9%
neg-mul-161.9%
distribute-rgt-neg-in61.9%
Simplified61.9%
Final simplification76.2%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0
(sin (fma (log (hypot x.re x.im)) y.im (* y.re (atan2 x.im x.re)))))
(t_1 (pow (exp y.im) (- (atan2 x.im x.re)))))
(if (<= y.im -0.013)
(* (sin (* y.im (log (hypot x.im x.re)))) t_1)
(if (<= y.im 0.0019) (* t_0 (pow (hypot x.im x.re) y.re)) (* t_0 t_1)))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = sin(fma(log(hypot(x_46_re, x_46_im)), y_46_im, (y_46_re * atan2(x_46_im, x_46_re))));
double t_1 = pow(exp(y_46_im), -atan2(x_46_im, x_46_re));
double tmp;
if (y_46_im <= -0.013) {
tmp = sin((y_46_im * log(hypot(x_46_im, x_46_re)))) * t_1;
} else if (y_46_im <= 0.0019) {
tmp = t_0 * pow(hypot(x_46_im, x_46_re), y_46_re);
} else {
tmp = t_0 * t_1;
}
return tmp;
}
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = sin(fma(log(hypot(x_46_re, x_46_im)), y_46_im, Float64(y_46_re * atan(x_46_im, x_46_re)))) t_1 = exp(y_46_im) ^ Float64(-atan(x_46_im, x_46_re)) tmp = 0.0 if (y_46_im <= -0.013) tmp = Float64(sin(Float64(y_46_im * log(hypot(x_46_im, x_46_re)))) * t_1); elseif (y_46_im <= 0.0019) tmp = Float64(t_0 * (hypot(x_46_im, x_46_re) ^ y_46_re)); else tmp = Float64(t_0 * t_1); end return tmp end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[Sin[N[(N[Log[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision]], $MachinePrecision] * y$46$im + N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$1 = N[Power[N[Exp[y$46$im], $MachinePrecision], (-N[ArcTan[x$46$im / x$46$re], $MachinePrecision])], $MachinePrecision]}, If[LessEqual[y$46$im, -0.013], N[(N[Sin[N[(y$46$im * N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * t$95$1), $MachinePrecision], If[LessEqual[y$46$im, 0.0019], N[(t$95$0 * N[Power[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision], y$46$re], $MachinePrecision]), $MachinePrecision], N[(t$95$0 * t$95$1), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \sin \left(\mathsf{fma}\left(\log \left(\mathsf{hypot}\left(x.re, x.im\right)\right), y.im, y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)\\
t_1 := {\left(e^{y.im}\right)}^{\left(-\tan^{-1}_* \frac{x.im}{x.re}\right)}\\
\mathbf{if}\;y.im \leq -0.013:\\
\;\;\;\;\sin \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right) \cdot t\_1\\
\mathbf{elif}\;y.im \leq 0.0019:\\
\;\;\;\;t\_0 \cdot {\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re}\\
\mathbf{else}:\\
\;\;\;\;t\_0 \cdot t\_1\\
\end{array}
\end{array}
if y.im < -0.0129999999999999994Initial program 28.4%
exp-diff21.7%
exp-to-pow21.7%
hypot-define21.7%
*-commutative21.7%
exp-prod21.3%
fma-define21.3%
hypot-define58.0%
*-commutative58.0%
Simplified58.0%
Taylor expanded in y.re around 0 65.2%
rec-exp65.3%
distribute-rgt-neg-in65.3%
exp-prod64.9%
Simplified64.9%
Taylor expanded in y.re around 0 23.1%
unpow22.1%
unpow22.1%
hypot-undefine4.0%
Simplified66.6%
if -0.0129999999999999994 < y.im < 0.0019Initial program 41.8%
exp-diff41.8%
exp-to-pow41.8%
hypot-define41.8%
*-commutative41.8%
exp-prod41.8%
fma-define41.8%
hypot-define88.0%
*-commutative88.0%
Simplified88.0%
Taylor expanded in y.im around 0 64.0%
unpow264.0%
unpow264.0%
hypot-undefine87.6%
Simplified87.6%
if 0.0019 < y.im Initial program 30.1%
exp-diff23.4%
exp-to-pow23.4%
hypot-define23.4%
*-commutative23.4%
exp-prod20.1%
fma-define20.1%
hypot-define47.4%
*-commutative47.4%
Simplified47.4%
Taylor expanded in y.re around 0 57.6%
rec-exp57.6%
distribute-rgt-neg-in57.6%
exp-prod59.2%
Simplified59.2%
Final simplification76.0%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0
(sin (fma (log (hypot x.re x.im)) y.im (* y.re (atan2 x.im x.re))))))
(if (<= y.im -0.011)
(*
(sin (* y.im (log (hypot x.im x.re))))
(pow (exp y.im) (- (atan2 x.im x.re))))
(if (<= y.im 3.8e+71)
(* t_0 (pow (hypot x.im x.re) y.re))
(* t_0 (exp (* (atan2 x.im x.re) (- y.im))))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = sin(fma(log(hypot(x_46_re, x_46_im)), y_46_im, (y_46_re * atan2(x_46_im, x_46_re))));
double tmp;
if (y_46_im <= -0.011) {
tmp = sin((y_46_im * log(hypot(x_46_im, x_46_re)))) * pow(exp(y_46_im), -atan2(x_46_im, x_46_re));
} else if (y_46_im <= 3.8e+71) {
tmp = t_0 * pow(hypot(x_46_im, x_46_re), y_46_re);
} else {
tmp = t_0 * exp((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 = sin(fma(log(hypot(x_46_re, x_46_im)), y_46_im, Float64(y_46_re * atan(x_46_im, x_46_re)))) tmp = 0.0 if (y_46_im <= -0.011) tmp = Float64(sin(Float64(y_46_im * log(hypot(x_46_im, x_46_re)))) * (exp(y_46_im) ^ Float64(-atan(x_46_im, x_46_re)))); elseif (y_46_im <= 3.8e+71) tmp = Float64(t_0 * (hypot(x_46_im, x_46_re) ^ y_46_re)); else tmp = Float64(t_0 * exp(Float64(atan(x_46_im, x_46_re) * Float64(-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[Sin[N[(N[Log[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision]], $MachinePrecision] * y$46$im + N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[y$46$im, -0.011], N[(N[Sin[N[(y$46$im * N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Power[N[Exp[y$46$im], $MachinePrecision], (-N[ArcTan[x$46$im / x$46$re], $MachinePrecision])], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$im, 3.8e+71], N[(t$95$0 * N[Power[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision], y$46$re], $MachinePrecision]), $MachinePrecision], N[(t$95$0 * N[Exp[N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * (-y$46$im)), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \sin \left(\mathsf{fma}\left(\log \left(\mathsf{hypot}\left(x.re, x.im\right)\right), y.im, y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)\\
\mathbf{if}\;y.im \leq -0.011:\\
\;\;\;\;\sin \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right) \cdot {\left(e^{y.im}\right)}^{\left(-\tan^{-1}_* \frac{x.im}{x.re}\right)}\\
\mathbf{elif}\;y.im \leq 3.8 \cdot 10^{+71}:\\
\;\;\;\;t\_0 \cdot {\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re}\\
\mathbf{else}:\\
\;\;\;\;t\_0 \cdot e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot \left(-y.im\right)}\\
\end{array}
\end{array}
if y.im < -0.010999999999999999Initial program 28.4%
exp-diff21.7%
exp-to-pow21.7%
hypot-define21.7%
*-commutative21.7%
exp-prod21.3%
fma-define21.3%
hypot-define58.0%
*-commutative58.0%
Simplified58.0%
Taylor expanded in y.re around 0 65.2%
rec-exp65.3%
distribute-rgt-neg-in65.3%
exp-prod64.9%
Simplified64.9%
Taylor expanded in y.re around 0 23.1%
unpow22.1%
unpow22.1%
hypot-undefine4.0%
Simplified66.6%
if -0.010999999999999999 < y.im < 3.8000000000000001e71Initial program 42.1%
exp-diff42.1%
exp-to-pow42.1%
hypot-define42.1%
*-commutative42.1%
exp-prod41.4%
fma-define41.4%
hypot-define84.9%
*-commutative84.9%
Simplified84.9%
Taylor expanded in y.im around 0 62.2%
unpow262.2%
unpow262.2%
hypot-undefine84.2%
Simplified84.2%
if 3.8000000000000001e71 < y.im Initial program 26.6%
cancel-sign-sub-inv26.6%
fma-define26.6%
hypot-define26.6%
distribute-lft-neg-in26.6%
distribute-rgt-neg-out26.6%
fma-define26.6%
hypot-define65.9%
*-commutative65.9%
Simplified65.9%
Taylor expanded in y.re around 0 61.9%
neg-mul-161.9%
distribute-rgt-neg-in61.9%
Simplified61.9%
Final simplification75.8%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(if (or (<= y.im -0.012) (not (<= y.im 1.62e+134)))
(*
(sin (* y.im (log (hypot x.im x.re))))
(pow (exp y.im) (- (atan2 x.im x.re))))
(*
(sin (fma (log (hypot x.re x.im)) y.im (* y.re (atan2 x.im x.re))))
(pow (hypot x.im x.re) y.re))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double tmp;
if ((y_46_im <= -0.012) || !(y_46_im <= 1.62e+134)) {
tmp = sin((y_46_im * log(hypot(x_46_im, x_46_re)))) * pow(exp(y_46_im), -atan2(x_46_im, x_46_re));
} else {
tmp = sin(fma(log(hypot(x_46_re, x_46_im)), y_46_im, (y_46_re * atan2(x_46_im, x_46_re)))) * pow(hypot(x_46_im, x_46_re), y_46_re);
}
return tmp;
}
function code(x_46_re, x_46_im, y_46_re, y_46_im) tmp = 0.0 if ((y_46_im <= -0.012) || !(y_46_im <= 1.62e+134)) tmp = Float64(sin(Float64(y_46_im * log(hypot(x_46_im, x_46_re)))) * (exp(y_46_im) ^ Float64(-atan(x_46_im, x_46_re)))); else tmp = Float64(sin(fma(log(hypot(x_46_re, x_46_im)), y_46_im, Float64(y_46_re * atan(x_46_im, x_46_re)))) * (hypot(x_46_im, x_46_re) ^ y_46_re)); end return tmp end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := If[Or[LessEqual[y$46$im, -0.012], N[Not[LessEqual[y$46$im, 1.62e+134]], $MachinePrecision]], N[(N[Sin[N[(y$46$im * N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Power[N[Exp[y$46$im], $MachinePrecision], (-N[ArcTan[x$46$im / x$46$re], $MachinePrecision])], $MachinePrecision]), $MachinePrecision], N[(N[Sin[N[(N[Log[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision]], $MachinePrecision] * y$46$im + N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Power[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision], y$46$re], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y.im \leq -0.012 \lor \neg \left(y.im \leq 1.62 \cdot 10^{+134}\right):\\
\;\;\;\;\sin \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right) \cdot {\left(e^{y.im}\right)}^{\left(-\tan^{-1}_* \frac{x.im}{x.re}\right)}\\
\mathbf{else}:\\
\;\;\;\;\sin \left(\mathsf{fma}\left(\log \left(\mathsf{hypot}\left(x.re, x.im\right)\right), y.im, y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right) \cdot {\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re}\\
\end{array}
\end{array}
if y.im < -0.012 or 1.6199999999999999e134 < y.im Initial program 27.4%
exp-diff19.0%
exp-to-pow19.0%
hypot-define19.0%
*-commutative19.0%
exp-prod18.8%
fma-define18.8%
hypot-define54.8%
*-commutative54.8%
Simplified54.8%
Taylor expanded in y.re around 0 66.8%
rec-exp66.8%
distribute-rgt-neg-in66.8%
exp-prod66.6%
Simplified66.6%
Taylor expanded in y.re around 0 23.1%
unpow21.7%
unpow21.7%
hypot-undefine3.8%
Simplified67.6%
if -0.012 < y.im < 1.6199999999999999e134Initial program 40.9%
exp-diff40.9%
exp-to-pow40.9%
hypot-define40.9%
*-commutative40.9%
exp-prod39.7%
fma-define39.7%
hypot-define81.3%
*-commutative81.3%
Simplified81.3%
Taylor expanded in y.im around 0 60.6%
unpow260.6%
unpow260.6%
hypot-undefine80.1%
Simplified80.1%
Final simplification75.5%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (pow (hypot x.im x.re) y.re))
(t_1 (sin (* y.im (log (hypot x.im x.re)))))
(t_2 (* t_0 t_1))
(t_3 (* t_1 (pow (exp y.im) (- (atan2 x.im x.re))))))
(if (<= y.im -0.0096)
t_3
(if (<= y.im -3.9e-125)
t_2
(if (<= y.im 5.3e-216)
(* t_0 (sin (* y.re (atan2 x.im x.re))))
(if (<= y.im 3.8e+71) 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 = pow(hypot(x_46_im, x_46_re), y_46_re);
double t_1 = sin((y_46_im * log(hypot(x_46_im, x_46_re))));
double t_2 = t_0 * t_1;
double t_3 = t_1 * pow(exp(y_46_im), -atan2(x_46_im, x_46_re));
double tmp;
if (y_46_im <= -0.0096) {
tmp = t_3;
} else if (y_46_im <= -3.9e-125) {
tmp = t_2;
} else if (y_46_im <= 5.3e-216) {
tmp = t_0 * sin((y_46_re * atan2(x_46_im, x_46_re)));
} else if (y_46_im <= 3.8e+71) {
tmp = t_2;
} else {
tmp = t_3;
}
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 t_1 = Math.sin((y_46_im * Math.log(Math.hypot(x_46_im, x_46_re))));
double t_2 = t_0 * t_1;
double t_3 = t_1 * Math.pow(Math.exp(y_46_im), -Math.atan2(x_46_im, x_46_re));
double tmp;
if (y_46_im <= -0.0096) {
tmp = t_3;
} else if (y_46_im <= -3.9e-125) {
tmp = t_2;
} else if (y_46_im <= 5.3e-216) {
tmp = t_0 * Math.sin((y_46_re * Math.atan2(x_46_im, x_46_re)));
} else if (y_46_im <= 3.8e+71) {
tmp = t_2;
} else {
tmp = t_3;
}
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) t_1 = math.sin((y_46_im * math.log(math.hypot(x_46_im, x_46_re)))) t_2 = t_0 * t_1 t_3 = t_1 * math.pow(math.exp(y_46_im), -math.atan2(x_46_im, x_46_re)) tmp = 0 if y_46_im <= -0.0096: tmp = t_3 elif y_46_im <= -3.9e-125: tmp = t_2 elif y_46_im <= 5.3e-216: tmp = t_0 * math.sin((y_46_re * math.atan2(x_46_im, x_46_re))) elif y_46_im <= 3.8e+71: tmp = t_2 else: tmp = t_3 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 t_1 = sin(Float64(y_46_im * log(hypot(x_46_im, x_46_re)))) t_2 = Float64(t_0 * t_1) t_3 = Float64(t_1 * (exp(y_46_im) ^ Float64(-atan(x_46_im, x_46_re)))) tmp = 0.0 if (y_46_im <= -0.0096) tmp = t_3; elseif (y_46_im <= -3.9e-125) tmp = t_2; elseif (y_46_im <= 5.3e-216) tmp = Float64(t_0 * sin(Float64(y_46_re * atan(x_46_im, x_46_re)))); elseif (y_46_im <= 3.8e+71) tmp = t_2; else tmp = t_3; 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; t_1 = sin((y_46_im * log(hypot(x_46_im, x_46_re)))); t_2 = t_0 * t_1; t_3 = t_1 * (exp(y_46_im) ^ -atan2(x_46_im, x_46_re)); tmp = 0.0; if (y_46_im <= -0.0096) tmp = t_3; elseif (y_46_im <= -3.9e-125) tmp = t_2; elseif (y_46_im <= 5.3e-216) tmp = t_0 * sin((y_46_re * atan2(x_46_im, x_46_re))); elseif (y_46_im <= 3.8e+71) tmp = t_2; else tmp = t_3; 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]}, 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[(t$95$0 * t$95$1), $MachinePrecision]}, Block[{t$95$3 = N[(t$95$1 * N[Power[N[Exp[y$46$im], $MachinePrecision], (-N[ArcTan[x$46$im / x$46$re], $MachinePrecision])], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y$46$im, -0.0096], t$95$3, If[LessEqual[y$46$im, -3.9e-125], t$95$2, If[LessEqual[y$46$im, 5.3e-216], N[(t$95$0 * N[Sin[N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$im, 3.8e+71], t$95$2, t$95$3]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := {\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re}\\
t_1 := \sin \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right)\\
t_2 := t\_0 \cdot t\_1\\
t_3 := t\_1 \cdot {\left(e^{y.im}\right)}^{\left(-\tan^{-1}_* \frac{x.im}{x.re}\right)}\\
\mathbf{if}\;y.im \leq -0.0096:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;y.im \leq -3.9 \cdot 10^{-125}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;y.im \leq 5.3 \cdot 10^{-216}:\\
\;\;\;\;t\_0 \cdot \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\\
\mathbf{elif}\;y.im \leq 3.8 \cdot 10^{+71}:\\
\;\;\;\;t\_2\\
\mathbf{else}:\\
\;\;\;\;t\_3\\
\end{array}
\end{array}
if y.im < -0.00959999999999999916 or 3.8000000000000001e71 < y.im Initial program 27.6%
exp-diff20.2%
exp-to-pow20.2%
hypot-define20.2%
*-commutative20.2%
exp-prod19.1%
fma-define19.1%
hypot-define53.3%
*-commutative53.3%
Simplified53.3%
Taylor expanded in y.re around 0 63.7%
rec-exp63.8%
distribute-rgt-neg-in63.8%
exp-prod63.6%
Simplified63.6%
Taylor expanded in y.re around 0 22.0%
unpow21.7%
unpow21.7%
hypot-undefine3.5%
Simplified62.7%
if -0.00959999999999999916 < y.im < -3.89999999999999982e-125 or 5.29999999999999977e-216 < y.im < 3.8000000000000001e71Initial program 42.1%
exp-diff42.2%
exp-to-pow42.2%
hypot-define42.2%
*-commutative42.2%
exp-prod41.0%
fma-define41.0%
hypot-define81.1%
*-commutative81.1%
Simplified81.1%
Taylor expanded in y.im around 0 59.9%
unpow259.9%
unpow259.9%
hypot-undefine80.0%
Simplified80.0%
Taylor expanded in y.re around 0 39.7%
unpow216.3%
unpow216.3%
hypot-undefine37.4%
Simplified81.7%
if -3.89999999999999982e-125 < y.im < 5.29999999999999977e-216Initial program 42.0%
exp-diff42.0%
exp-to-pow42.0%
hypot-define42.0%
*-commutative42.0%
exp-prod42.0%
fma-define42.0%
hypot-define91.0%
*-commutative91.0%
Simplified91.0%
Taylor expanded in y.im around 0 65.8%
unpow265.8%
unpow265.8%
hypot-undefine91.0%
Simplified91.0%
Taylor expanded in y.im around 0 79.7%
Final simplification73.1%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (pow (hypot x.im x.re) y.re))
(t_1 (* t_0 (sin (* y.im (log (hypot x.im x.re))))))
(t_2 (sin (* y.re (atan2 x.im x.re))))
(t_3 (* (pow (exp y.im) (- (atan2 x.im x.re))) t_2)))
(if (<= y.im -2.4e+24)
t_3
(if (<= y.im -2.95e-123)
t_1
(if (<= y.im 1.15e-220) (* t_0 t_2) (if (<= y.im 4e+71) t_1 t_3))))))
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 t_1 = t_0 * sin((y_46_im * log(hypot(x_46_im, x_46_re))));
double t_2 = sin((y_46_re * atan2(x_46_im, x_46_re)));
double t_3 = pow(exp(y_46_im), -atan2(x_46_im, x_46_re)) * t_2;
double tmp;
if (y_46_im <= -2.4e+24) {
tmp = t_3;
} else if (y_46_im <= -2.95e-123) {
tmp = t_1;
} else if (y_46_im <= 1.15e-220) {
tmp = t_0 * t_2;
} else if (y_46_im <= 4e+71) {
tmp = t_1;
} else {
tmp = t_3;
}
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 t_1 = t_0 * Math.sin((y_46_im * Math.log(Math.hypot(x_46_im, x_46_re))));
double t_2 = Math.sin((y_46_re * Math.atan2(x_46_im, x_46_re)));
double t_3 = Math.pow(Math.exp(y_46_im), -Math.atan2(x_46_im, x_46_re)) * t_2;
double tmp;
if (y_46_im <= -2.4e+24) {
tmp = t_3;
} else if (y_46_im <= -2.95e-123) {
tmp = t_1;
} else if (y_46_im <= 1.15e-220) {
tmp = t_0 * t_2;
} else if (y_46_im <= 4e+71) {
tmp = t_1;
} else {
tmp = t_3;
}
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) t_1 = t_0 * math.sin((y_46_im * math.log(math.hypot(x_46_im, x_46_re)))) t_2 = math.sin((y_46_re * math.atan2(x_46_im, x_46_re))) t_3 = math.pow(math.exp(y_46_im), -math.atan2(x_46_im, x_46_re)) * t_2 tmp = 0 if y_46_im <= -2.4e+24: tmp = t_3 elif y_46_im <= -2.95e-123: tmp = t_1 elif y_46_im <= 1.15e-220: tmp = t_0 * t_2 elif y_46_im <= 4e+71: tmp = t_1 else: tmp = t_3 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 t_1 = Float64(t_0 * sin(Float64(y_46_im * log(hypot(x_46_im, x_46_re))))) t_2 = sin(Float64(y_46_re * atan(x_46_im, x_46_re))) t_3 = Float64((exp(y_46_im) ^ Float64(-atan(x_46_im, x_46_re))) * t_2) tmp = 0.0 if (y_46_im <= -2.4e+24) tmp = t_3; elseif (y_46_im <= -2.95e-123) tmp = t_1; elseif (y_46_im <= 1.15e-220) tmp = Float64(t_0 * t_2); elseif (y_46_im <= 4e+71) tmp = t_1; else tmp = t_3; 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; t_1 = t_0 * sin((y_46_im * log(hypot(x_46_im, x_46_re)))); t_2 = sin((y_46_re * atan2(x_46_im, x_46_re))); t_3 = (exp(y_46_im) ^ -atan2(x_46_im, x_46_re)) * t_2; tmp = 0.0; if (y_46_im <= -2.4e+24) tmp = t_3; elseif (y_46_im <= -2.95e-123) tmp = t_1; elseif (y_46_im <= 1.15e-220) tmp = t_0 * t_2; elseif (y_46_im <= 4e+71) tmp = t_1; else tmp = t_3; 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]}, Block[{t$95$1 = N[(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]), $MachinePrecision]}, Block[{t$95$2 = N[Sin[N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$3 = 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, -2.4e+24], t$95$3, If[LessEqual[y$46$im, -2.95e-123], t$95$1, If[LessEqual[y$46$im, 1.15e-220], N[(t$95$0 * t$95$2), $MachinePrecision], If[LessEqual[y$46$im, 4e+71], t$95$1, t$95$3]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := {\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re}\\
t_1 := t\_0 \cdot \sin \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right)\\
t_2 := \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\\
t_3 := {\left(e^{y.im}\right)}^{\left(-\tan^{-1}_* \frac{x.im}{x.re}\right)} \cdot t\_2\\
\mathbf{if}\;y.im \leq -2.4 \cdot 10^{+24}:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;y.im \leq -2.95 \cdot 10^{-123}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y.im \leq 1.15 \cdot 10^{-220}:\\
\;\;\;\;t\_0 \cdot t\_2\\
\mathbf{elif}\;y.im \leq 4 \cdot 10^{+71}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_3\\
\end{array}
\end{array}
if y.im < -2.4000000000000001e24 or 4.0000000000000002e71 < y.im Initial program 27.5%
exp-diff19.7%
exp-to-pow19.7%
hypot-define19.7%
*-commutative19.7%
exp-prod18.6%
fma-define18.6%
hypot-define52.8%
*-commutative52.8%
Simplified52.8%
Taylor expanded in y.re around 0 63.8%
rec-exp63.8%
distribute-rgt-neg-in63.8%
exp-prod63.6%
Simplified63.6%
Taylor expanded in y.im around 0 56.7%
if -2.4000000000000001e24 < y.im < -2.94999999999999994e-123 or 1.1499999999999999e-220 < y.im < 4.0000000000000002e71Initial program 41.4%
exp-diff41.4%
exp-to-pow41.4%
hypot-define41.4%
*-commutative41.4%
exp-prod40.3%
fma-define40.3%
hypot-define79.9%
*-commutative79.9%
Simplified79.9%
Taylor expanded in y.im around 0 59.6%
unpow259.6%
unpow259.6%
hypot-undefine78.5%
Simplified78.5%
Taylor expanded in y.re around 0 37.5%
unpow215.7%
unpow215.7%
hypot-undefine35.6%
Simplified80.0%
if -2.94999999999999994e-123 < y.im < 1.1499999999999999e-220Initial program 42.0%
exp-diff42.0%
exp-to-pow42.0%
hypot-define42.0%
*-commutative42.0%
exp-prod42.0%
fma-define42.0%
hypot-define91.0%
*-commutative91.0%
Simplified91.0%
Taylor expanded in y.im around 0 65.8%
unpow265.8%
unpow265.8%
hypot-undefine91.0%
Simplified91.0%
Taylor expanded in y.im around 0 79.7%
Final simplification70.6%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (pow (hypot x.im x.re) y.re))
(t_1 (* t_0 (sin (* y.im (log (hypot x.im x.re))))))
(t_2 (* y.re (atan2 x.im x.re)))
(t_3 (/ (sin (fabs t_2)) (exp (* (atan2 x.im x.re) y.im)))))
(if (<= y.im -8.2e+20)
t_3
(if (<= y.im -3.9e-125)
t_1
(if (<= y.im 4.5e-217)
(* t_0 (sin t_2))
(if (<= y.im 5.2e+72) t_1 t_3))))))
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 t_1 = t_0 * 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 = sin(fabs(t_2)) / exp((atan2(x_46_im, x_46_re) * y_46_im));
double tmp;
if (y_46_im <= -8.2e+20) {
tmp = t_3;
} else if (y_46_im <= -3.9e-125) {
tmp = t_1;
} else if (y_46_im <= 4.5e-217) {
tmp = t_0 * sin(t_2);
} else if (y_46_im <= 5.2e+72) {
tmp = t_1;
} else {
tmp = t_3;
}
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 t_1 = t_0 * 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.sin(Math.abs(t_2)) / Math.exp((Math.atan2(x_46_im, x_46_re) * y_46_im));
double tmp;
if (y_46_im <= -8.2e+20) {
tmp = t_3;
} else if (y_46_im <= -3.9e-125) {
tmp = t_1;
} else if (y_46_im <= 4.5e-217) {
tmp = t_0 * Math.sin(t_2);
} else if (y_46_im <= 5.2e+72) {
tmp = t_1;
} else {
tmp = t_3;
}
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) t_1 = t_0 * 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.sin(math.fabs(t_2)) / math.exp((math.atan2(x_46_im, x_46_re) * y_46_im)) tmp = 0 if y_46_im <= -8.2e+20: tmp = t_3 elif y_46_im <= -3.9e-125: tmp = t_1 elif y_46_im <= 4.5e-217: tmp = t_0 * math.sin(t_2) elif y_46_im <= 5.2e+72: tmp = t_1 else: tmp = t_3 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 t_1 = Float64(t_0 * 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(sin(abs(t_2)) / exp(Float64(atan(x_46_im, x_46_re) * y_46_im))) tmp = 0.0 if (y_46_im <= -8.2e+20) tmp = t_3; elseif (y_46_im <= -3.9e-125) tmp = t_1; elseif (y_46_im <= 4.5e-217) tmp = Float64(t_0 * sin(t_2)); elseif (y_46_im <= 5.2e+72) tmp = t_1; else tmp = t_3; 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; t_1 = t_0 * 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 = sin(abs(t_2)) / exp((atan2(x_46_im, x_46_re) * y_46_im)); tmp = 0.0; if (y_46_im <= -8.2e+20) tmp = t_3; elseif (y_46_im <= -3.9e-125) tmp = t_1; elseif (y_46_im <= 4.5e-217) tmp = t_0 * sin(t_2); elseif (y_46_im <= 5.2e+72) tmp = t_1; else tmp = t_3; 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]}, Block[{t$95$1 = N[(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]), $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[Sin[N[Abs[t$95$2], $MachinePrecision]], $MachinePrecision] / N[Exp[N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$im), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y$46$im, -8.2e+20], t$95$3, If[LessEqual[y$46$im, -3.9e-125], t$95$1, If[LessEqual[y$46$im, 4.5e-217], N[(t$95$0 * N[Sin[t$95$2], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$im, 5.2e+72], t$95$1, t$95$3]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := {\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re}\\
t_1 := t\_0 \cdot \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{\sin \left(\left|t\_2\right|\right)}{e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}}\\
\mathbf{if}\;y.im \leq -8.2 \cdot 10^{+20}:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;y.im \leq -3.9 \cdot 10^{-125}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y.im \leq 4.5 \cdot 10^{-217}:\\
\;\;\;\;t\_0 \cdot \sin t\_2\\
\mathbf{elif}\;y.im \leq 5.2 \cdot 10^{+72}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_3\\
\end{array}
\end{array}
if y.im < -8.2e20 or 5.19999999999999963e72 < y.im Initial program 27.2%
exp-diff19.5%
exp-to-pow19.5%
hypot-define19.5%
*-commutative19.5%
exp-prod18.4%
fma-define18.4%
hypot-define52.2%
*-commutative52.2%
Simplified52.2%
add-sqr-sqrt32.9%
sqrt-unprod19.6%
pow219.6%
fma-undefine19.6%
*-commutative19.6%
*-commutative19.6%
fma-define19.6%
Applied egg-rr14.5%
unpow219.6%
rem-sqrt-square66.3%
*-commutative66.3%
hypot-undefine26.4%
unpow226.4%
unpow226.4%
+-commutative26.4%
unpow226.4%
unpow226.4%
hypot-undefine66.3%
Simplified46.5%
Taylor expanded in y.im around 0 50.2%
Taylor expanded in y.re around 0 57.2%
if -8.2e20 < y.im < -3.89999999999999982e-125 or 4.4999999999999999e-217 < y.im < 5.19999999999999963e72Initial program 41.8%
exp-diff41.8%
exp-to-pow41.8%
hypot-define41.8%
*-commutative41.8%
exp-prod40.7%
fma-define40.7%
hypot-define80.8%
*-commutative80.8%
Simplified80.8%
Taylor expanded in y.im around 0 60.2%
unpow260.2%
unpow260.2%
hypot-undefine79.3%
Simplified79.3%
Taylor expanded in y.re around 0 37.9%
unpow215.8%
unpow215.8%
hypot-undefine36.0%
Simplified80.9%
if -3.89999999999999982e-125 < y.im < 4.4999999999999999e-217Initial program 42.0%
exp-diff42.0%
exp-to-pow42.0%
hypot-define42.0%
*-commutative42.0%
exp-prod42.0%
fma-define42.0%
hypot-define91.0%
*-commutative91.0%
Simplified91.0%
Taylor expanded in y.im around 0 65.8%
unpow265.8%
unpow265.8%
hypot-undefine91.0%
Simplified91.0%
Taylor expanded in y.im around 0 79.7%
Final simplification71.0%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (pow (hypot x.im x.re) y.re)) (t_1 (* y.re (atan2 x.im x.re))))
(if (<= y.re -2.2e-6)
(* t_0 (sin (fabs t_1)))
(if (<= y.re 3.8e-18)
(sin (fma (log (hypot x.re x.im)) y.im t_1))
(if (or (<= y.re 1.3e+176) (not (<= y.re 8.5e+213)))
(* t_0 (sin (* y.im (log (hypot x.im x.re)))))
(* t_0 (sin t_1)))))))
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 t_1 = y_46_re * atan2(x_46_im, x_46_re);
double tmp;
if (y_46_re <= -2.2e-6) {
tmp = t_0 * sin(fabs(t_1));
} else if (y_46_re <= 3.8e-18) {
tmp = sin(fma(log(hypot(x_46_re, x_46_im)), y_46_im, t_1));
} else if ((y_46_re <= 1.3e+176) || !(y_46_re <= 8.5e+213)) {
tmp = t_0 * sin((y_46_im * log(hypot(x_46_im, x_46_re))));
} else {
tmp = t_0 * sin(t_1);
}
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 t_1 = Float64(y_46_re * atan(x_46_im, x_46_re)) tmp = 0.0 if (y_46_re <= -2.2e-6) tmp = Float64(t_0 * sin(abs(t_1))); elseif (y_46_re <= 3.8e-18) tmp = sin(fma(log(hypot(x_46_re, x_46_im)), y_46_im, t_1)); elseif ((y_46_re <= 1.3e+176) || !(y_46_re <= 8.5e+213)) tmp = Float64(t_0 * sin(Float64(y_46_im * log(hypot(x_46_im, x_46_re))))); else tmp = Float64(t_0 * 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[Power[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision], y$46$re], $MachinePrecision]}, Block[{t$95$1 = N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y$46$re, -2.2e-6], N[(t$95$0 * N[Sin[N[Abs[t$95$1], $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$re, 3.8e-18], N[Sin[N[(N[Log[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision]], $MachinePrecision] * y$46$im + t$95$1), $MachinePrecision]], $MachinePrecision], If[Or[LessEqual[y$46$re, 1.3e+176], N[Not[LessEqual[y$46$re, 8.5e+213]], $MachinePrecision]], N[(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]), $MachinePrecision], N[(t$95$0 * N[Sin[t$95$1], $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := {\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re}\\
t_1 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
\mathbf{if}\;y.re \leq -2.2 \cdot 10^{-6}:\\
\;\;\;\;t\_0 \cdot \sin \left(\left|t\_1\right|\right)\\
\mathbf{elif}\;y.re \leq 3.8 \cdot 10^{-18}:\\
\;\;\;\;\sin \left(\mathsf{fma}\left(\log \left(\mathsf{hypot}\left(x.re, x.im\right)\right), y.im, t\_1\right)\right)\\
\mathbf{elif}\;y.re \leq 1.3 \cdot 10^{+176} \lor \neg \left(y.re \leq 8.5 \cdot 10^{+213}\right):\\
\;\;\;\;t\_0 \cdot \sin \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t\_0 \cdot \sin t\_1\\
\end{array}
\end{array}
if y.re < -2.2000000000000001e-6Initial program 34.2%
exp-diff28.8%
exp-to-pow28.8%
hypot-define28.8%
*-commutative28.8%
exp-prod26.0%
fma-define26.0%
hypot-define65.8%
*-commutative65.8%
Simplified65.8%
Taylor expanded in y.im around 0 72.8%
unpow272.8%
unpow272.8%
hypot-undefine71.4%
Simplified71.4%
Taylor expanded in y.im around 0 71.5%
add-sqr-sqrt43.9%
sqrt-unprod44.0%
pow244.0%
Applied egg-rr44.0%
unpow244.0%
rem-sqrt-square81.1%
Simplified81.1%
if -2.2000000000000001e-6 < y.re < 3.7999999999999998e-18Initial program 33.8%
exp-diff33.8%
exp-to-pow33.8%
hypot-define33.8%
*-commutative33.8%
exp-prod33.7%
fma-define33.7%
hypot-define77.6%
*-commutative77.6%
Simplified77.6%
Taylor expanded in y.re around 0 77.2%
rec-exp77.2%
distribute-rgt-neg-in77.2%
exp-prod77.0%
Simplified77.0%
Taylor expanded in y.im around 0 52.8%
if 3.7999999999999998e-18 < y.re < 1.29999999999999995e176 or 8.4999999999999995e213 < y.re Initial program 39.6%
exp-diff34.0%
exp-to-pow34.0%
hypot-define34.0%
*-commutative34.0%
exp-prod34.0%
fma-define34.0%
hypot-define64.1%
*-commutative64.1%
Simplified64.1%
Taylor expanded in y.im around 0 60.7%
unpow260.7%
unpow260.7%
hypot-undefine64.4%
Simplified64.4%
Taylor expanded in y.re around 0 36.0%
unpow21.6%
unpow21.6%
hypot-undefine5.9%
Simplified70.0%
if 1.29999999999999995e176 < y.re < 8.4999999999999995e213Initial program 55.6%
exp-diff44.4%
exp-to-pow44.4%
hypot-define44.4%
*-commutative44.4%
exp-prod44.4%
fma-define44.4%
hypot-define77.8%
*-commutative77.8%
Simplified77.8%
Taylor expanded in y.im around 0 88.9%
unpow288.9%
unpow288.9%
hypot-undefine88.9%
Simplified88.9%
Taylor expanded in y.im around 0 88.9%
Final simplification65.7%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (pow (hypot x.im x.re) y.re)))
(if (or (<= y.im -3.9e-125) (not (<= y.im 1.85e-216)))
(* t_0 (sin (* y.im (log (hypot x.im x.re)))))
(* t_0 (sin (* 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 = pow(hypot(x_46_im, x_46_re), y_46_re);
double tmp;
if ((y_46_im <= -3.9e-125) || !(y_46_im <= 1.85e-216)) {
tmp = t_0 * sin((y_46_im * log(hypot(x_46_im, x_46_re))));
} else {
tmp = t_0 * sin((y_46_re * atan2(x_46_im, x_46_re)));
}
return tmp;
}
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = Math.pow(Math.hypot(x_46_im, x_46_re), y_46_re);
double tmp;
if ((y_46_im <= -3.9e-125) || !(y_46_im <= 1.85e-216)) {
tmp = t_0 * Math.sin((y_46_im * Math.log(Math.hypot(x_46_im, x_46_re))));
} else {
tmp = t_0 * Math.sin((y_46_re * Math.atan2(x_46_im, x_46_re)));
}
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_im <= -3.9e-125) or not (y_46_im <= 1.85e-216): tmp = t_0 * math.sin((y_46_im * math.log(math.hypot(x_46_im, x_46_re)))) else: tmp = t_0 * math.sin((y_46_re * math.atan2(x_46_im, x_46_re))) return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = hypot(x_46_im, x_46_re) ^ y_46_re tmp = 0.0 if ((y_46_im <= -3.9e-125) || !(y_46_im <= 1.85e-216)) tmp = Float64(t_0 * sin(Float64(y_46_im * log(hypot(x_46_im, x_46_re))))); else tmp = Float64(t_0 * sin(Float64(y_46_re * atan(x_46_im, x_46_re)))); end return tmp end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = hypot(x_46_im, x_46_re) ^ y_46_re; tmp = 0.0; if ((y_46_im <= -3.9e-125) || ~((y_46_im <= 1.85e-216))) tmp = t_0 * sin((y_46_im * log(hypot(x_46_im, x_46_re)))); else tmp = t_0 * sin((y_46_re * atan2(x_46_im, x_46_re))); end tmp_2 = tmp; end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[Power[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision], y$46$re], $MachinePrecision]}, If[Or[LessEqual[y$46$im, -3.9e-125], N[Not[LessEqual[y$46$im, 1.85e-216]], $MachinePrecision]], N[(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]), $MachinePrecision], N[(t$95$0 * N[Sin[N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := {\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re}\\
\mathbf{if}\;y.im \leq -3.9 \cdot 10^{-125} \lor \neg \left(y.im \leq 1.85 \cdot 10^{-216}\right):\\
\;\;\;\;t\_0 \cdot \sin \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t\_0 \cdot \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\\
\end{array}
\end{array}
if y.im < -3.89999999999999982e-125 or 1.84999999999999998e-216 < y.im Initial program 34.2%
exp-diff30.1%
exp-to-pow30.1%
hypot-define30.1%
*-commutative30.1%
exp-prod29.0%
fma-define29.0%
hypot-define65.9%
*-commutative65.9%
Simplified65.9%
Taylor expanded in y.im around 0 50.4%
unpow250.4%
unpow250.4%
hypot-undefine53.8%
Simplified53.8%
Taylor expanded in y.re around 0 25.0%
unpow28.3%
unpow28.3%
hypot-undefine18.9%
Simplified53.0%
if -3.89999999999999982e-125 < y.im < 1.84999999999999998e-216Initial program 42.0%
exp-diff42.0%
exp-to-pow42.0%
hypot-define42.0%
*-commutative42.0%
exp-prod42.0%
fma-define42.0%
hypot-define91.0%
*-commutative91.0%
Simplified91.0%
Taylor expanded in y.im around 0 65.8%
unpow265.8%
unpow265.8%
hypot-undefine91.0%
Simplified91.0%
Taylor expanded in y.im around 0 79.7%
Final simplification59.0%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (pow (hypot x.im x.re) y.re)) (t_1 (* y.re (atan2 x.im x.re))))
(if (<= y.re -0.036)
(* t_0 (sin (fabs t_1)))
(if (or (<= y.re -4.8e-93) (not (<= y.re 3.1e-108)))
(* t_0 (sin t_1))
(*
(sin (* y.im (log (hypot x.im x.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 = pow(hypot(x_46_im, x_46_re), y_46_re);
double t_1 = y_46_re * atan2(x_46_im, x_46_re);
double tmp;
if (y_46_re <= -0.036) {
tmp = t_0 * sin(fabs(t_1));
} else if ((y_46_re <= -4.8e-93) || !(y_46_re <= 3.1e-108)) {
tmp = t_0 * sin(t_1);
} else {
tmp = sin((y_46_im * log(hypot(x_46_im, x_46_re)))) * (1.0 - (atan2(x_46_im, x_46_re) * y_46_im));
}
return tmp;
}
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = Math.pow(Math.hypot(x_46_im, x_46_re), y_46_re);
double t_1 = y_46_re * Math.atan2(x_46_im, x_46_re);
double tmp;
if (y_46_re <= -0.036) {
tmp = t_0 * Math.sin(Math.abs(t_1));
} else if ((y_46_re <= -4.8e-93) || !(y_46_re <= 3.1e-108)) {
tmp = t_0 * Math.sin(t_1);
} else {
tmp = Math.sin((y_46_im * Math.log(Math.hypot(x_46_im, x_46_re)))) * (1.0 - (Math.atan2(x_46_im, x_46_re) * y_46_im));
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): t_0 = math.pow(math.hypot(x_46_im, x_46_re), y_46_re) t_1 = y_46_re * math.atan2(x_46_im, x_46_re) tmp = 0 if y_46_re <= -0.036: tmp = t_0 * math.sin(math.fabs(t_1)) elif (y_46_re <= -4.8e-93) or not (y_46_re <= 3.1e-108): tmp = t_0 * math.sin(t_1) else: tmp = math.sin((y_46_im * math.log(math.hypot(x_46_im, x_46_re)))) * (1.0 - (math.atan2(x_46_im, x_46_re) * y_46_im)) return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = hypot(x_46_im, x_46_re) ^ y_46_re t_1 = Float64(y_46_re * atan(x_46_im, x_46_re)) tmp = 0.0 if (y_46_re <= -0.036) tmp = Float64(t_0 * sin(abs(t_1))); elseif ((y_46_re <= -4.8e-93) || !(y_46_re <= 3.1e-108)) tmp = Float64(t_0 * sin(t_1)); else tmp = Float64(sin(Float64(y_46_im * log(hypot(x_46_im, x_46_re)))) * Float64(1.0 - Float64(atan(x_46_im, x_46_re) * y_46_im))); end return tmp end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = hypot(x_46_im, x_46_re) ^ y_46_re; t_1 = y_46_re * atan2(x_46_im, x_46_re); tmp = 0.0; if (y_46_re <= -0.036) tmp = t_0 * sin(abs(t_1)); elseif ((y_46_re <= -4.8e-93) || ~((y_46_re <= 3.1e-108))) tmp = t_0 * sin(t_1); else tmp = sin((y_46_im * log(hypot(x_46_im, x_46_re)))) * (1.0 - (atan2(x_46_im, x_46_re) * y_46_im)); end tmp_2 = tmp; end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[Power[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision], y$46$re], $MachinePrecision]}, Block[{t$95$1 = N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y$46$re, -0.036], N[(t$95$0 * N[Sin[N[Abs[t$95$1], $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[y$46$re, -4.8e-93], N[Not[LessEqual[y$46$re, 3.1e-108]], $MachinePrecision]], N[(t$95$0 * N[Sin[t$95$1], $MachinePrecision]), $MachinePrecision], N[(N[Sin[N[(y$46$im * N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(1.0 - N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$im), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := {\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re}\\
t_1 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
\mathbf{if}\;y.re \leq -0.036:\\
\;\;\;\;t\_0 \cdot \sin \left(\left|t\_1\right|\right)\\
\mathbf{elif}\;y.re \leq -4.8 \cdot 10^{-93} \lor \neg \left(y.re \leq 3.1 \cdot 10^{-108}\right):\\
\;\;\;\;t\_0 \cdot \sin t\_1\\
\mathbf{else}:\\
\;\;\;\;\sin \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right) \cdot \left(1 - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im\right)\\
\end{array}
\end{array}
if y.re < -0.0359999999999999973Initial program 34.2%
exp-diff28.8%
exp-to-pow28.8%
hypot-define28.8%
*-commutative28.8%
exp-prod26.0%
fma-define26.0%
hypot-define65.8%
*-commutative65.8%
Simplified65.8%
Taylor expanded in y.im around 0 72.8%
unpow272.8%
unpow272.8%
hypot-undefine71.4%
Simplified71.4%
Taylor expanded in y.im around 0 71.5%
add-sqr-sqrt43.9%
sqrt-unprod44.0%
pow244.0%
Applied egg-rr44.0%
unpow244.0%
rem-sqrt-square81.1%
Simplified81.1%
if -0.0359999999999999973 < y.re < -4.8000000000000002e-93 or 3.10000000000000014e-108 < y.re Initial program 38.0%
exp-diff34.0%
exp-to-pow34.0%
hypot-define34.0%
*-commutative34.0%
exp-prod34.0%
fma-define34.0%
hypot-define67.1%
*-commutative67.1%
Simplified67.1%
Taylor expanded in y.im around 0 55.8%
unpow255.8%
unpow255.8%
hypot-undefine57.9%
Simplified57.9%
Taylor expanded in y.im around 0 48.5%
if -4.8000000000000002e-93 < y.re < 3.10000000000000014e-108Initial program 34.9%
exp-diff34.9%
exp-to-pow34.9%
hypot-define34.9%
*-commutative34.9%
exp-prod34.7%
fma-define34.7%
hypot-define81.7%
*-commutative81.7%
Simplified81.7%
Taylor expanded in y.re around 0 81.9%
rec-exp81.9%
distribute-rgt-neg-in81.9%
exp-prod81.7%
Simplified81.7%
Taylor expanded in y.im around 0 60.0%
mul-1-neg60.0%
unsub-neg60.0%
Simplified60.0%
Taylor expanded in y.re around 0 18.7%
unpow218.7%
unpow218.7%
hypot-undefine45.5%
Simplified45.5%
Final simplification56.8%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(if (or (<= y.re -1.55e-99) (not (<= y.re 2.4e-108)))
(* (pow (hypot x.im x.re) y.re) (sin (* y.re (atan2 x.im x.re))))
(*
(sin (* y.im (log (hypot x.im x.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 tmp;
if ((y_46_re <= -1.55e-99) || !(y_46_re <= 2.4e-108)) {
tmp = pow(hypot(x_46_im, x_46_re), y_46_re) * sin((y_46_re * atan2(x_46_im, x_46_re)));
} else {
tmp = sin((y_46_im * log(hypot(x_46_im, x_46_re)))) * (1.0 - (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 <= -1.55e-99) || !(y_46_re <= 2.4e-108)) {
tmp = Math.pow(Math.hypot(x_46_im, x_46_re), y_46_re) * Math.sin((y_46_re * Math.atan2(x_46_im, x_46_re)));
} else {
tmp = Math.sin((y_46_im * Math.log(Math.hypot(x_46_im, x_46_re)))) * (1.0 - (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 <= -1.55e-99) or not (y_46_re <= 2.4e-108): tmp = math.pow(math.hypot(x_46_im, x_46_re), y_46_re) * math.sin((y_46_re * math.atan2(x_46_im, x_46_re))) else: tmp = math.sin((y_46_im * math.log(math.hypot(x_46_im, x_46_re)))) * (1.0 - (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 <= -1.55e-99) || !(y_46_re <= 2.4e-108)) tmp = Float64((hypot(x_46_im, x_46_re) ^ y_46_re) * sin(Float64(y_46_re * atan(x_46_im, x_46_re)))); else tmp = Float64(sin(Float64(y_46_im * log(hypot(x_46_im, x_46_re)))) * Float64(1.0 - Float64(atan(x_46_im, x_46_re) * 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 <= -1.55e-99) || ~((y_46_re <= 2.4e-108))) tmp = (hypot(x_46_im, x_46_re) ^ y_46_re) * sin((y_46_re * atan2(x_46_im, x_46_re))); else tmp = sin((y_46_im * log(hypot(x_46_im, x_46_re)))) * (1.0 - (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, -1.55e-99], N[Not[LessEqual[y$46$re, 2.4e-108]], $MachinePrecision]], N[(N[Power[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision], y$46$re], $MachinePrecision] * N[Sin[N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(N[Sin[N[(y$46$im * N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(1.0 - N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$im), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y.re \leq -1.55 \cdot 10^{-99} \lor \neg \left(y.re \leq 2.4 \cdot 10^{-108}\right):\\
\;\;\;\;{\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re} \cdot \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\\
\mathbf{else}:\\
\;\;\;\;\sin \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right) \cdot \left(1 - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im\right)\\
\end{array}
\end{array}
if y.re < -1.5499999999999999e-99 or 2.40000000000000017e-108 < y.re Initial program 36.4%
exp-diff31.8%
exp-to-pow31.8%
hypot-define31.8%
*-commutative31.8%
exp-prod30.6%
fma-define30.6%
hypot-define66.5%
*-commutative66.5%
Simplified66.5%
Taylor expanded in y.im around 0 63.0%
unpow263.0%
unpow263.0%
hypot-undefine63.6%
Simplified63.6%
Taylor expanded in y.im around 0 58.2%
if -1.5499999999999999e-99 < y.re < 2.40000000000000017e-108Initial program 34.9%
exp-diff34.9%
exp-to-pow34.9%
hypot-define34.9%
*-commutative34.9%
exp-prod34.7%
fma-define34.7%
hypot-define81.7%
*-commutative81.7%
Simplified81.7%
Taylor expanded in y.re around 0 81.9%
rec-exp81.9%
distribute-rgt-neg-in81.9%
exp-prod81.7%
Simplified81.7%
Taylor expanded in y.im around 0 60.0%
mul-1-neg60.0%
unsub-neg60.0%
Simplified60.0%
Taylor expanded in y.re around 0 18.7%
unpow218.7%
unpow218.7%
hypot-undefine45.5%
Simplified45.5%
Final simplification54.1%
(FPCore (x.re x.im y.re y.im) :precision binary64 (* (pow (hypot x.im x.re) y.re) (sin (* 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) {
return pow(hypot(x_46_im, x_46_re), y_46_re) * sin((y_46_re * atan2(x_46_im, 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) * Math.sin((y_46_re * Math.atan2(x_46_im, 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) * math.sin((y_46_re * math.atan2(x_46_im, 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) * sin(Float64(y_46_re * atan(x_46_im, 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) * sin((y_46_re * atan2(x_46_im, 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[Sin[N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
{\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re} \cdot \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)
\end{array}
Initial program 35.9%
exp-diff32.8%
exp-to-pow32.8%
hypot-define32.8%
*-commutative32.8%
exp-prod31.9%
fma-define31.9%
hypot-define71.5%
*-commutative71.5%
Simplified71.5%
Taylor expanded in y.im around 0 53.8%
unpow253.8%
unpow253.8%
hypot-undefine62.1%
Simplified62.1%
Taylor expanded in y.im around 0 45.2%
Final simplification45.2%
(FPCore (x.re x.im y.re y.im) :precision binary64 (* (sin (* y.re (atan2 x.im x.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) {
return sin((y_46_re * atan2(x_46_im, x_46_re))) * (1.0 - (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 = sin((y_46re * atan2(x_46im, x_46re))) * (1.0d0 - (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 Math.sin((y_46_re * Math.atan2(x_46_im, x_46_re))) * (1.0 - (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 math.sin((y_46_re * math.atan2(x_46_im, x_46_re))) * (1.0 - (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(sin(Float64(y_46_re * atan(x_46_im, x_46_re))) * Float64(1.0 - 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 = sin((y_46_re * atan2(x_46_im, x_46_re))) * (1.0 - (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[Sin[N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(1.0 - N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$im), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot \left(1 - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im\right)
\end{array}
Initial program 35.9%
exp-diff32.8%
exp-to-pow32.8%
hypot-define32.8%
*-commutative32.8%
exp-prod31.9%
fma-define31.9%
hypot-define71.5%
*-commutative71.5%
Simplified71.5%
Taylor expanded in y.re around 0 54.3%
rec-exp54.3%
distribute-rgt-neg-in54.3%
exp-prod54.6%
Simplified54.6%
Taylor expanded in y.im around 0 27.4%
mul-1-neg27.4%
unsub-neg27.4%
Simplified27.4%
Taylor expanded in y.im around 0 13.1%
Final simplification13.1%
herbie shell --seed 2024030
(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)))))