
(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 18 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))))))
(if (or (<= y.im -0.00024) (not (<= y.im 2.55e+61)))
(* (sin (pow (cbrt (* y.im t_0)) 3.0)) t_1)
(*
t_1
(sin
(*
y.re
(+ (atan2 x.im x.re) (* y.im (/ (log (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 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 tmp;
if ((y_46_im <= -0.00024) || !(y_46_im <= 2.55e+61)) {
tmp = sin(pow(cbrt((y_46_im * t_0)), 3.0)) * t_1;
} else {
tmp = t_1 * sin((y_46_re * (atan2(x_46_im, x_46_re) + (y_46_im * (log(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) 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)))) tmp = 0.0 if ((y_46_im <= -0.00024) || !(y_46_im <= 2.55e+61)) tmp = Float64(sin((cbrt(Float64(y_46_im * t_0)) ^ 3.0)) * t_1); else tmp = Float64(t_1 * sin(Float64(y_46_re * Float64(atan(x_46_im, x_46_re) + Float64(y_46_im * Float64(log(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_] := 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]}, If[Or[LessEqual[y$46$im, -0.00024], N[Not[LessEqual[y$46$im, 2.55e+61]], $MachinePrecision]], N[(N[Sin[N[Power[N[Power[N[(y$46$im * t$95$0), $MachinePrecision], 1/3], $MachinePrecision], 3.0], $MachinePrecision]], $MachinePrecision] * t$95$1), $MachinePrecision], N[(t$95$1 * N[Sin[N[(y$46$re * N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] + N[(y$46$im * N[(N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision] / y$46$re), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \log \left(\mathsf{hypot}\left(x.re, x.im\right)\right)\\
t_1 := e^{\mathsf{fma}\left(t\_0, y.re, \tan^{-1}_* \frac{x.im}{x.re} \cdot \left(-y.im\right)\right)}\\
\mathbf{if}\;y.im \leq -0.00024 \lor \neg \left(y.im \leq 2.55 \cdot 10^{+61}\right):\\
\;\;\;\;\sin \left({\left(\sqrt[3]{y.im \cdot t\_0}\right)}^{3}\right) \cdot t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_1 \cdot \sin \left(y.re \cdot \left(\tan^{-1}_* \frac{x.im}{x.re} + y.im \cdot \frac{\log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)}{y.re}\right)\right)\\
\end{array}
\end{array}
if y.im < -2.40000000000000006e-4 or 2.55000000000000005e61 < y.im Initial program 24.6%
cancel-sign-sub-inv24.6%
fma-define24.6%
hypot-define24.6%
distribute-lft-neg-in24.6%
distribute-rgt-neg-out24.6%
fma-define24.6%
hypot-define70.5%
*-commutative70.5%
Simplified70.5%
fma-undefine70.5%
hypot-define24.6%
*-commutative24.6%
add-cube-cbrt27.6%
pow327.7%
fma-define27.7%
hypot-define70.9%
Applied egg-rr70.9%
Taylor expanded in y.im around inf 31.1%
+-commutative31.1%
unpow231.1%
unpow231.1%
hypot-undefine76.8%
Simplified76.8%
if -2.40000000000000006e-4 < y.im < 2.55000000000000005e61Initial program 47.4%
cancel-sign-sub-inv47.4%
fma-define47.4%
hypot-define47.4%
distribute-lft-neg-in47.4%
distribute-rgt-neg-out47.4%
fma-define47.4%
hypot-define86.1%
*-commutative86.1%
Simplified86.1%
Taylor expanded in y.re around inf 47.3%
+-commutative47.3%
associate-/l*47.3%
unpow247.3%
unpow247.3%
hypot-undefine85.3%
Simplified85.3%
Final simplification81.3%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (* y.re (atan2 x.im x.re)))
(t_1 (log (sqrt (+ (* x.re x.re) (* x.im x.im)))))
(t_2 (exp (- (* t_1 y.re) (* (atan2 x.im x.re) y.im))))
(t_3 (log (hypot x.re x.im))))
(if (<= (* t_2 (sin (+ (* t_1 y.im) t_0))) -0.25)
(* t_2 (sin (pow (cbrt (* y.im t_3)) 3.0)))
(*
(exp (fma t_3 y.re (* (atan2 x.im x.re) (- y.im))))
(sin (fma t_3 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(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))));
double t_2 = exp(((t_1 * y_46_re) - (atan2(x_46_im, x_46_re) * y_46_im)));
double t_3 = log(hypot(x_46_re, x_46_im));
double tmp;
if ((t_2 * sin(((t_1 * y_46_im) + t_0))) <= -0.25) {
tmp = t_2 * sin(pow(cbrt((y_46_im * t_3)), 3.0));
} else {
tmp = exp(fma(t_3, y_46_re, (atan2(x_46_im, x_46_re) * -y_46_im))) * sin(fma(t_3, y_46_im, t_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(sqrt(Float64(Float64(x_46_re * x_46_re) + Float64(x_46_im * x_46_im)))) t_2 = exp(Float64(Float64(t_1 * y_46_re) - Float64(atan(x_46_im, x_46_re) * y_46_im))) t_3 = log(hypot(x_46_re, x_46_im)) tmp = 0.0 if (Float64(t_2 * sin(Float64(Float64(t_1 * y_46_im) + t_0))) <= -0.25) tmp = Float64(t_2 * sin((cbrt(Float64(y_46_im * t_3)) ^ 3.0))); else tmp = Float64(exp(fma(t_3, y_46_re, Float64(atan(x_46_im, x_46_re) * Float64(-y_46_im)))) * sin(fma(t_3, y_46_im, t_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[N[(N[(x$46$re * x$46$re), $MachinePrecision] + N[(x$46$im * x$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]}, Block[{t$95$2 = N[Exp[N[(N[(t$95$1 * y$46$re), $MachinePrecision] - N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$3 = N[Log[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision]], $MachinePrecision]}, If[LessEqual[N[(t$95$2 * N[Sin[N[(N[(t$95$1 * y$46$im), $MachinePrecision] + t$95$0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], -0.25], N[(t$95$2 * N[Sin[N[Power[N[Power[N[(y$46$im * t$95$3), $MachinePrecision], 1/3], $MachinePrecision], 3.0], $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(N[Exp[N[(t$95$3 * y$46$re + N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * (-y$46$im)), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Sin[N[(t$95$3 * y$46$im + t$95$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(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right)\\
t_2 := e^{t\_1 \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}\\
t_3 := \log \left(\mathsf{hypot}\left(x.re, x.im\right)\right)\\
\mathbf{if}\;t\_2 \cdot \sin \left(t\_1 \cdot y.im + t\_0\right) \leq -0.25:\\
\;\;\;\;t\_2 \cdot \sin \left({\left(\sqrt[3]{y.im \cdot t\_3}\right)}^{3}\right)\\
\mathbf{else}:\\
\;\;\;\;e^{\mathsf{fma}\left(t\_3, y.re, \tan^{-1}_* \frac{x.im}{x.re} \cdot \left(-y.im\right)\right)} \cdot \sin \left(\mathsf{fma}\left(t\_3, y.im, t\_0\right)\right)\\
\end{array}
\end{array}
if (*.f64 (exp.f64 (-.f64 (*.f64 (log.f64 (sqrt.f64 (+.f64 (*.f64 x.re x.re) (*.f64 x.im x.im)))) y.re) (*.f64 (atan2.f64 x.im x.re) y.im))) (sin.f64 (+.f64 (*.f64 (log.f64 (sqrt.f64 (+.f64 (*.f64 x.re x.re) (*.f64 x.im x.im)))) y.im) (*.f64 (atan2.f64 x.im x.re) y.re)))) < -0.25Initial program 33.6%
Taylor expanded in y.re around 0 44.1%
unpow244.1%
unpow244.1%
hypot-undefine44.1%
Simplified44.1%
add-cube-cbrt65.1%
pow365.2%
*-commutative65.2%
hypot-undefine65.2%
+-commutative65.2%
hypot-undefine65.2%
*-commutative65.2%
Applied egg-rr65.2%
if -0.25 < (*.f64 (exp.f64 (-.f64 (*.f64 (log.f64 (sqrt.f64 (+.f64 (*.f64 x.re x.re) (*.f64 x.im x.im)))) y.re) (*.f64 (atan2.f64 x.im x.re) y.im))) (sin.f64 (+.f64 (*.f64 (log.f64 (sqrt.f64 (+.f64 (*.f64 x.re x.re) (*.f64 x.im x.im)))) y.im) (*.f64 (atan2.f64 x.im x.re) y.re)))) Initial program 37.1%
cancel-sign-sub-inv37.1%
fma-define37.1%
hypot-define37.1%
distribute-lft-neg-in37.1%
distribute-rgt-neg-out37.1%
fma-define37.1%
hypot-define82.5%
*-commutative82.5%
Simplified82.5%
Final simplification81.2%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (* y.re (atan2 x.im x.re)))
(t_1
(exp
(-
(* (log (sqrt (+ (* x.re x.re) (* x.im x.im)))) y.re)
(* (atan2 x.im x.re) y.im))))
(t_2 (log (hypot x.re x.im)))
(t_3 (* t_1 (sin (pow (cbrt (* y.im t_2)) 3.0)))))
(if (<= y.re -1.2e+32)
t_3
(if (<= y.re 0.00255)
(* (sin (fma t_2 y.im t_0)) (exp (* (atan2 x.im x.re) (- y.im))))
(if (or (<= y.re 6.2e+171) (not (<= y.re 1.05e+263)))
t_3
(* t_1 (sin 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 = exp(((log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im)))) * y_46_re) - (atan2(x_46_im, x_46_re) * y_46_im)));
double t_2 = log(hypot(x_46_re, x_46_im));
double t_3 = t_1 * sin(pow(cbrt((y_46_im * t_2)), 3.0));
double tmp;
if (y_46_re <= -1.2e+32) {
tmp = t_3;
} else if (y_46_re <= 0.00255) {
tmp = sin(fma(t_2, y_46_im, t_0)) * exp((atan2(x_46_im, x_46_re) * -y_46_im));
} else if ((y_46_re <= 6.2e+171) || !(y_46_re <= 1.05e+263)) {
tmp = t_3;
} else {
tmp = t_1 * sin(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 = exp(Float64(Float64(log(sqrt(Float64(Float64(x_46_re * x_46_re) + Float64(x_46_im * x_46_im)))) * y_46_re) - Float64(atan(x_46_im, x_46_re) * y_46_im))) t_2 = log(hypot(x_46_re, x_46_im)) t_3 = Float64(t_1 * sin((cbrt(Float64(y_46_im * t_2)) ^ 3.0))) tmp = 0.0 if (y_46_re <= -1.2e+32) tmp = t_3; elseif (y_46_re <= 0.00255) tmp = Float64(sin(fma(t_2, y_46_im, t_0)) * exp(Float64(atan(x_46_im, x_46_re) * Float64(-y_46_im)))); elseif ((y_46_re <= 6.2e+171) || !(y_46_re <= 1.05e+263)) tmp = t_3; else tmp = Float64(t_1 * sin(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[Exp[N[(N[(N[Log[N[Sqrt[N[(N[(x$46$re * x$46$re), $MachinePrecision] + N[(x$46$im * x$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision] * y$46$re), $MachinePrecision] - N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$2 = N[Log[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision]], $MachinePrecision]}, Block[{t$95$3 = N[(t$95$1 * N[Sin[N[Power[N[Power[N[(y$46$im * t$95$2), $MachinePrecision], 1/3], $MachinePrecision], 3.0], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y$46$re, -1.2e+32], t$95$3, If[LessEqual[y$46$re, 0.00255], N[(N[Sin[N[(t$95$2 * 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], If[Or[LessEqual[y$46$re, 6.2e+171], N[Not[LessEqual[y$46$re, 1.05e+263]], $MachinePrecision]], t$95$3, N[(t$95$1 * N[Sin[t$95$0], $MachinePrecision]), $MachinePrecision]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
t_1 := e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}\\
t_2 := \log \left(\mathsf{hypot}\left(x.re, x.im\right)\right)\\
t_3 := t\_1 \cdot \sin \left({\left(\sqrt[3]{y.im \cdot t\_2}\right)}^{3}\right)\\
\mathbf{if}\;y.re \leq -1.2 \cdot 10^{+32}:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;y.re \leq 0.00255:\\
\;\;\;\;\sin \left(\mathsf{fma}\left(t\_2, y.im, t\_0\right)\right) \cdot e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot \left(-y.im\right)}\\
\mathbf{elif}\;y.re \leq 6.2 \cdot 10^{+171} \lor \neg \left(y.re \leq 1.05 \cdot 10^{+263}\right):\\
\;\;\;\;t\_3\\
\mathbf{else}:\\
\;\;\;\;t\_1 \cdot \sin t\_0\\
\end{array}
\end{array}
if y.re < -1.19999999999999996e32 or 0.0025500000000000002 < y.re < 6.1999999999999998e171 or 1.0500000000000001e263 < y.re Initial program 38.2%
Taylor expanded in y.re around 0 40.9%
unpow240.9%
unpow240.9%
hypot-undefine78.2%
Simplified78.2%
add-cube-cbrt81.9%
pow383.7%
*-commutative83.7%
hypot-undefine44.5%
+-commutative44.5%
hypot-undefine83.7%
*-commutative83.7%
Applied egg-rr83.7%
if -1.19999999999999996e32 < y.re < 0.0025500000000000002Initial program 35.8%
cancel-sign-sub-inv35.8%
fma-define35.8%
hypot-define35.8%
distribute-lft-neg-in35.8%
distribute-rgt-neg-out35.8%
fma-define35.8%
hypot-define80.5%
*-commutative80.5%
Simplified80.5%
Taylor expanded in y.re around 0 79.2%
neg-mul-179.2%
*-commutative79.2%
distribute-rgt-neg-in79.2%
Simplified79.2%
if 6.1999999999999998e171 < y.re < 1.0500000000000001e263Initial program 35.3%
Taylor expanded in y.im around 0 82.4%
Final simplification81.3%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (* (atan2 x.im x.re) (- y.im))) (t_1 (log (hypot x.re x.im))))
(if (or (<= y.re -4e-23) (not (<= y.re 5e-20)))
(*
(exp (fma t_1 y.re t_0))
(sin
(*
y.re
(+ (atan2 x.im x.re) (* y.im (/ (log (hypot x.im x.re)) y.re))))))
(* (sin (fma t_1 y.im (* y.re (atan2 x.im x.re)))) (exp t_0)))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = atan2(x_46_im, x_46_re) * -y_46_im;
double t_1 = log(hypot(x_46_re, x_46_im));
double tmp;
if ((y_46_re <= -4e-23) || !(y_46_re <= 5e-20)) {
tmp = exp(fma(t_1, y_46_re, t_0)) * sin((y_46_re * (atan2(x_46_im, x_46_re) + (y_46_im * (log(hypot(x_46_im, x_46_re)) / y_46_re)))));
} else {
tmp = sin(fma(t_1, y_46_im, (y_46_re * atan2(x_46_im, x_46_re)))) * exp(t_0);
}
return tmp;
}
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = Float64(atan(x_46_im, x_46_re) * Float64(-y_46_im)) t_1 = log(hypot(x_46_re, x_46_im)) tmp = 0.0 if ((y_46_re <= -4e-23) || !(y_46_re <= 5e-20)) tmp = Float64(exp(fma(t_1, y_46_re, t_0)) * sin(Float64(y_46_re * Float64(atan(x_46_im, x_46_re) + Float64(y_46_im * Float64(log(hypot(x_46_im, x_46_re)) / y_46_re)))))); else tmp = Float64(sin(fma(t_1, y_46_im, Float64(y_46_re * atan(x_46_im, x_46_re)))) * exp(t_0)); end return tmp end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * (-y$46$im)), $MachinePrecision]}, Block[{t$95$1 = N[Log[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision]], $MachinePrecision]}, If[Or[LessEqual[y$46$re, -4e-23], N[Not[LessEqual[y$46$re, 5e-20]], $MachinePrecision]], N[(N[Exp[N[(t$95$1 * y$46$re + t$95$0), $MachinePrecision]], $MachinePrecision] * N[Sin[N[(y$46$re * N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] + N[(y$46$im * N[(N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision] / y$46$re), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(N[Sin[N[(t$95$1 * y$46$im + N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Exp[t$95$0], $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \tan^{-1}_* \frac{x.im}{x.re} \cdot \left(-y.im\right)\\
t_1 := \log \left(\mathsf{hypot}\left(x.re, x.im\right)\right)\\
\mathbf{if}\;y.re \leq -4 \cdot 10^{-23} \lor \neg \left(y.re \leq 5 \cdot 10^{-20}\right):\\
\;\;\;\;e^{\mathsf{fma}\left(t\_1, y.re, t\_0\right)} \cdot \sin \left(y.re \cdot \left(\tan^{-1}_* \frac{x.im}{x.re} + y.im \cdot \frac{\log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)}{y.re}\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\sin \left(\mathsf{fma}\left(t\_1, y.im, y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right) \cdot e^{t\_0}\\
\end{array}
\end{array}
if y.re < -3.99999999999999984e-23 or 4.9999999999999999e-20 < y.re Initial program 36.9%
cancel-sign-sub-inv36.9%
fma-define36.9%
hypot-define36.9%
distribute-lft-neg-in36.9%
distribute-rgt-neg-out36.9%
fma-define36.9%
hypot-define76.7%
*-commutative76.7%
Simplified76.7%
Taylor expanded in y.re around inf 37.6%
+-commutative37.6%
associate-/l*38.4%
unpow238.4%
unpow238.4%
hypot-undefine79.0%
Simplified79.0%
if -3.99999999999999984e-23 < y.re < 4.9999999999999999e-20Initial program 36.7%
cancel-sign-sub-inv36.7%
fma-define36.7%
hypot-define36.7%
distribute-lft-neg-in36.7%
distribute-rgt-neg-out36.7%
fma-define36.7%
hypot-define81.2%
*-commutative81.2%
Simplified81.2%
Taylor expanded in y.re around 0 81.2%
neg-mul-181.2%
*-commutative81.2%
distribute-rgt-neg-in81.2%
Simplified81.2%
Final simplification80.0%
(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 (sin (fma t_1 y.im t_0)))
(t_3
(exp
(-
(* (log (sqrt (+ (* x.re x.re) (* x.im x.im)))) y.re)
(* (atan2 x.im x.re) y.im)))))
(if (<= y.re -1.2e+32)
(* t_2 (pow (hypot x.re x.im) y.re))
(if (<= y.re 0.053)
(* t_2 (exp (* (atan2 x.im x.re) (- y.im))))
(if (<= y.re 8.2e+158)
(* t_3 (* y.im t_1))
(* t_3 (sin (fabs 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 = sin(fma(t_1, y_46_im, t_0));
double t_3 = exp(((log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im)))) * y_46_re) - (atan2(x_46_im, x_46_re) * y_46_im)));
double tmp;
if (y_46_re <= -1.2e+32) {
tmp = t_2 * pow(hypot(x_46_re, x_46_im), y_46_re);
} else if (y_46_re <= 0.053) {
tmp = t_2 * exp((atan2(x_46_im, x_46_re) * -y_46_im));
} else if (y_46_re <= 8.2e+158) {
tmp = t_3 * (y_46_im * t_1);
} else {
tmp = t_3 * sin(fabs(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 = sin(fma(t_1, y_46_im, t_0)) t_3 = exp(Float64(Float64(log(sqrt(Float64(Float64(x_46_re * x_46_re) + Float64(x_46_im * x_46_im)))) * y_46_re) - Float64(atan(x_46_im, x_46_re) * y_46_im))) tmp = 0.0 if (y_46_re <= -1.2e+32) tmp = Float64(t_2 * (hypot(x_46_re, x_46_im) ^ y_46_re)); elseif (y_46_re <= 0.053) tmp = Float64(t_2 * exp(Float64(atan(x_46_im, x_46_re) * Float64(-y_46_im)))); elseif (y_46_re <= 8.2e+158) tmp = Float64(t_3 * Float64(y_46_im * t_1)); else tmp = Float64(t_3 * sin(abs(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[Sin[N[(t$95$1 * y$46$im + t$95$0), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$3 = N[Exp[N[(N[(N[Log[N[Sqrt[N[(N[(x$46$re * x$46$re), $MachinePrecision] + N[(x$46$im * x$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision] * y$46$re), $MachinePrecision] - N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[y$46$re, -1.2e+32], N[(t$95$2 * N[Power[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision], y$46$re], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$re, 0.053], N[(t$95$2 * N[Exp[N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * (-y$46$im)), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$re, 8.2e+158], N[(t$95$3 * N[(y$46$im * t$95$1), $MachinePrecision]), $MachinePrecision], N[(t$95$3 * N[Sin[N[Abs[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 := \sin \left(\mathsf{fma}\left(t\_1, y.im, t\_0\right)\right)\\
t_3 := e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}\\
\mathbf{if}\;y.re \leq -1.2 \cdot 10^{+32}:\\
\;\;\;\;t\_2 \cdot {\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re}\\
\mathbf{elif}\;y.re \leq 0.053:\\
\;\;\;\;t\_2 \cdot e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot \left(-y.im\right)}\\
\mathbf{elif}\;y.re \leq 8.2 \cdot 10^{+158}:\\
\;\;\;\;t\_3 \cdot \left(y.im \cdot t\_1\right)\\
\mathbf{else}:\\
\;\;\;\;t\_3 \cdot \sin \left(\left|t\_0\right|\right)\\
\end{array}
\end{array}
if y.re < -1.19999999999999996e32Initial program 43.1%
exp-diff36.2%
exp-to-pow36.2%
hypot-define36.2%
*-commutative36.2%
exp-prod36.2%
fma-define36.2%
hypot-define77.6%
*-commutative77.6%
Simplified77.6%
Taylor expanded in y.im around 0 86.3%
if -1.19999999999999996e32 < y.re < 0.0529999999999999985Initial program 35.8%
cancel-sign-sub-inv35.8%
fma-define35.8%
hypot-define35.8%
distribute-lft-neg-in35.8%
distribute-rgt-neg-out35.8%
fma-define35.8%
hypot-define80.5%
*-commutative80.5%
Simplified80.5%
Taylor expanded in y.re around 0 79.2%
neg-mul-179.2%
*-commutative79.2%
distribute-rgt-neg-in79.2%
Simplified79.2%
if 0.0529999999999999985 < y.re < 8.20000000000000008e158Initial program 34.3%
Taylor expanded in y.re around 0 40.0%
unpow240.0%
unpow240.0%
hypot-undefine71.5%
Simplified71.5%
Taylor expanded in y.im around 0 68.6%
+-commutative68.6%
unpow268.6%
unpow268.6%
hypot-undefine74.3%
Simplified74.3%
if 8.20000000000000008e158 < y.re Initial program 32.4%
Taylor expanded in y.im around 0 67.7%
*-commutative67.7%
add-sqr-sqrt29.5%
sqrt-unprod17.6%
pow217.6%
Applied egg-rr17.6%
*-commutative17.6%
unpow217.6%
rem-sqrt-square73.6%
Simplified73.6%
Final simplification79.4%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (log (hypot x.re x.im)))
(t_1 (sin (fma t_0 y.im (* y.re (atan2 x.im x.re)))))
(t_2 (* t_1 (pow (hypot x.re x.im) y.re))))
(if (<= y.re -1.18e+33)
t_2
(if (<= y.re 0.053)
(* t_1 (exp (* (atan2 x.im x.re) (- y.im))))
(if (<= y.re 1.4e+166)
(*
(exp
(-
(* (log (sqrt (+ (* x.re x.re) (* x.im x.im)))) y.re)
(* (atan2 x.im x.re) y.im)))
(* y.im 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 = log(hypot(x_46_re, x_46_im));
double t_1 = sin(fma(t_0, y_46_im, (y_46_re * atan2(x_46_im, x_46_re))));
double t_2 = t_1 * pow(hypot(x_46_re, x_46_im), y_46_re);
double tmp;
if (y_46_re <= -1.18e+33) {
tmp = t_2;
} else if (y_46_re <= 0.053) {
tmp = t_1 * exp((atan2(x_46_im, x_46_re) * -y_46_im));
} else if (y_46_re <= 1.4e+166) {
tmp = exp(((log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im)))) * y_46_re) - (atan2(x_46_im, x_46_re) * y_46_im))) * (y_46_im * t_0);
} else {
tmp = 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 = sin(fma(t_0, y_46_im, Float64(y_46_re * atan(x_46_im, x_46_re)))) t_2 = Float64(t_1 * (hypot(x_46_re, x_46_im) ^ y_46_re)) tmp = 0.0 if (y_46_re <= -1.18e+33) tmp = t_2; elseif (y_46_re <= 0.053) tmp = Float64(t_1 * exp(Float64(atan(x_46_im, x_46_re) * Float64(-y_46_im)))); elseif (y_46_re <= 1.4e+166) tmp = Float64(exp(Float64(Float64(log(sqrt(Float64(Float64(x_46_re * x_46_re) + Float64(x_46_im * x_46_im)))) * y_46_re) - Float64(atan(x_46_im, x_46_re) * y_46_im))) * Float64(y_46_im * t_0)); else tmp = 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[Sin[N[(t$95$0 * y$46$im + N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$2 = N[(t$95$1 * N[Power[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision], y$46$re], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y$46$re, -1.18e+33], t$95$2, If[LessEqual[y$46$re, 0.053], 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, 1.4e+166], N[(N[Exp[N[(N[(N[Log[N[Sqrt[N[(N[(x$46$re * x$46$re), $MachinePrecision] + N[(x$46$im * x$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision] * y$46$re), $MachinePrecision] - N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(y$46$im * t$95$0), $MachinePrecision]), $MachinePrecision], t$95$2]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \log \left(\mathsf{hypot}\left(x.re, x.im\right)\right)\\
t_1 := \sin \left(\mathsf{fma}\left(t\_0, y.im, y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)\\
t_2 := t\_1 \cdot {\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re}\\
\mathbf{if}\;y.re \leq -1.18 \cdot 10^{+33}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;y.re \leq 0.053:\\
\;\;\;\;t\_1 \cdot e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot \left(-y.im\right)}\\
\mathbf{elif}\;y.re \leq 1.4 \cdot 10^{+166}:\\
\;\;\;\;e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \left(y.im \cdot t\_0\right)\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if y.re < -1.17999999999999993e33 or 1.39999999999999998e166 < y.re Initial program 40.0%
exp-diff34.4%
exp-to-pow34.4%
hypot-define34.4%
*-commutative34.4%
exp-prod32.2%
fma-define32.2%
hypot-define70.0%
*-commutative70.0%
Simplified70.0%
Taylor expanded in y.im around 0 81.2%
if -1.17999999999999993e33 < y.re < 0.0529999999999999985Initial program 35.8%
cancel-sign-sub-inv35.8%
fma-define35.8%
hypot-define35.8%
distribute-lft-neg-in35.8%
distribute-rgt-neg-out35.8%
fma-define35.8%
hypot-define80.5%
*-commutative80.5%
Simplified80.5%
Taylor expanded in y.re around 0 79.2%
neg-mul-179.2%
*-commutative79.2%
distribute-rgt-neg-in79.2%
Simplified79.2%
if 0.0529999999999999985 < y.re < 1.39999999999999998e166Initial program 32.4%
Taylor expanded in y.re around 0 37.8%
unpow237.8%
unpow237.8%
hypot-undefine70.3%
Simplified70.3%
Taylor expanded in y.im around 0 67.6%
+-commutative67.6%
unpow267.6%
unpow267.6%
hypot-undefine73.0%
Simplified73.0%
Final simplification79.0%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (* y.re (atan2 x.im x.re)))
(t_1
(exp
(-
(* (log (sqrt (+ (* x.re x.re) (* x.im x.im)))) y.re)
(* (atan2 x.im x.re) y.im))))
(t_2 (* t_1 (sin t_0)))
(t_3 (log (hypot x.re x.im))))
(if (<= y.re -1.2e+32)
t_2
(if (<= y.re 0.052)
(* (sin (fma t_3 y.im t_0)) (exp (* (atan2 x.im x.re) (- y.im))))
(if (<= y.re 1.4e+166) (* t_1 (* y.im t_3)) 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 = exp(((log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im)))) * y_46_re) - (atan2(x_46_im, x_46_re) * y_46_im)));
double t_2 = t_1 * sin(t_0);
double t_3 = log(hypot(x_46_re, x_46_im));
double tmp;
if (y_46_re <= -1.2e+32) {
tmp = t_2;
} else if (y_46_re <= 0.052) {
tmp = sin(fma(t_3, y_46_im, t_0)) * exp((atan2(x_46_im, x_46_re) * -y_46_im));
} else if (y_46_re <= 1.4e+166) {
tmp = t_1 * (y_46_im * t_3);
} else {
tmp = t_2;
}
return tmp;
}
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = Float64(y_46_re * atan(x_46_im, x_46_re)) t_1 = exp(Float64(Float64(log(sqrt(Float64(Float64(x_46_re * x_46_re) + Float64(x_46_im * x_46_im)))) * y_46_re) - Float64(atan(x_46_im, x_46_re) * y_46_im))) t_2 = Float64(t_1 * sin(t_0)) t_3 = log(hypot(x_46_re, x_46_im)) tmp = 0.0 if (y_46_re <= -1.2e+32) tmp = t_2; elseif (y_46_re <= 0.052) tmp = Float64(sin(fma(t_3, y_46_im, t_0)) * exp(Float64(atan(x_46_im, x_46_re) * Float64(-y_46_im)))); elseif (y_46_re <= 1.4e+166) tmp = Float64(t_1 * Float64(y_46_im * t_3)); else tmp = 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[Exp[N[(N[(N[Log[N[Sqrt[N[(N[(x$46$re * x$46$re), $MachinePrecision] + N[(x$46$im * x$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision] * y$46$re), $MachinePrecision] - N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$2 = N[(t$95$1 * N[Sin[t$95$0], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[Log[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision]], $MachinePrecision]}, If[LessEqual[y$46$re, -1.2e+32], t$95$2, If[LessEqual[y$46$re, 0.052], N[(N[Sin[N[(t$95$3 * 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], If[LessEqual[y$46$re, 1.4e+166], N[(t$95$1 * N[(y$46$im * t$95$3), $MachinePrecision]), $MachinePrecision], t$95$2]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
t_1 := e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}\\
t_2 := t\_1 \cdot \sin t\_0\\
t_3 := \log \left(\mathsf{hypot}\left(x.re, x.im\right)\right)\\
\mathbf{if}\;y.re \leq -1.2 \cdot 10^{+32}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;y.re \leq 0.052:\\
\;\;\;\;\sin \left(\mathsf{fma}\left(t\_3, y.im, t\_0\right)\right) \cdot e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot \left(-y.im\right)}\\
\mathbf{elif}\;y.re \leq 1.4 \cdot 10^{+166}:\\
\;\;\;\;t\_1 \cdot \left(y.im \cdot t\_3\right)\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if y.re < -1.19999999999999996e32 or 1.39999999999999998e166 < y.re Initial program 40.0%
Taylor expanded in y.im around 0 81.1%
if -1.19999999999999996e32 < y.re < 0.0519999999999999976Initial program 35.8%
cancel-sign-sub-inv35.8%
fma-define35.8%
hypot-define35.8%
distribute-lft-neg-in35.8%
distribute-rgt-neg-out35.8%
fma-define35.8%
hypot-define80.5%
*-commutative80.5%
Simplified80.5%
Taylor expanded in y.re around 0 79.2%
neg-mul-179.2%
*-commutative79.2%
distribute-rgt-neg-in79.2%
Simplified79.2%
if 0.0519999999999999976 < y.re < 1.39999999999999998e166Initial program 32.4%
Taylor expanded in y.re around 0 37.8%
unpow237.8%
unpow237.8%
hypot-undefine70.3%
Simplified70.3%
Taylor expanded in y.im around 0 67.6%
+-commutative67.6%
unpow267.6%
unpow267.6%
hypot-undefine73.0%
Simplified73.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 x.im)) t_0)))
(t_2 (sin (* y.im (log (hypot x.im x.re)))))
(t_3 (* t_2 t_1))
(t_4 (* y.re (atan2 x.im x.re)))
(t_5 (sin t_4))
(t_6 (* t_5 t_1))
(t_7
(* (pow (hypot x.re x.im) y.re) (sin (+ t_4 (* y.im (log x.im)))))))
(if (<= x.im -9.2e-7)
(* (exp (- (* y.re (log (- x.im))) t_0)) t_2)
(if (<= x.im 8.2e-308)
(*
(exp (- (* (log (sqrt (+ (* x.re x.re) (* x.im x.im)))) y.re) t_0))
t_5)
(if (<= x.im 7.5e-280)
t_3
(if (<= x.im 1.7e-195)
t_6
(if (<= x.im 4.4e-151)
t_7
(if (<= x.im 7e-66)
t_3
(if (<= x.im 0.059) t_7 (if (<= x.im 8.2e+116) t_3 t_6))))))))))
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(x_46_im)) - t_0));
double t_2 = sin((y_46_im * log(hypot(x_46_im, x_46_re))));
double t_3 = t_2 * t_1;
double t_4 = y_46_re * atan2(x_46_im, x_46_re);
double t_5 = sin(t_4);
double t_6 = t_5 * t_1;
double t_7 = pow(hypot(x_46_re, x_46_im), y_46_re) * sin((t_4 + (y_46_im * log(x_46_im))));
double tmp;
if (x_46_im <= -9.2e-7) {
tmp = exp(((y_46_re * log(-x_46_im)) - t_0)) * t_2;
} else if (x_46_im <= 8.2e-308) {
tmp = exp(((log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im)))) * y_46_re) - t_0)) * t_5;
} else if (x_46_im <= 7.5e-280) {
tmp = t_3;
} else if (x_46_im <= 1.7e-195) {
tmp = t_6;
} else if (x_46_im <= 4.4e-151) {
tmp = t_7;
} else if (x_46_im <= 7e-66) {
tmp = t_3;
} else if (x_46_im <= 0.059) {
tmp = t_7;
} else if (x_46_im <= 8.2e+116) {
tmp = t_3;
} else {
tmp = t_6;
}
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.exp(((y_46_re * Math.log(x_46_im)) - t_0));
double t_2 = Math.sin((y_46_im * Math.log(Math.hypot(x_46_im, x_46_re))));
double t_3 = t_2 * t_1;
double t_4 = y_46_re * Math.atan2(x_46_im, x_46_re);
double t_5 = Math.sin(t_4);
double t_6 = t_5 * t_1;
double t_7 = Math.pow(Math.hypot(x_46_re, x_46_im), y_46_re) * Math.sin((t_4 + (y_46_im * Math.log(x_46_im))));
double tmp;
if (x_46_im <= -9.2e-7) {
tmp = Math.exp(((y_46_re * Math.log(-x_46_im)) - t_0)) * t_2;
} else if (x_46_im <= 8.2e-308) {
tmp = Math.exp(((Math.log(Math.sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im)))) * y_46_re) - t_0)) * t_5;
} else if (x_46_im <= 7.5e-280) {
tmp = t_3;
} else if (x_46_im <= 1.7e-195) {
tmp = t_6;
} else if (x_46_im <= 4.4e-151) {
tmp = t_7;
} else if (x_46_im <= 7e-66) {
tmp = t_3;
} else if (x_46_im <= 0.059) {
tmp = t_7;
} else if (x_46_im <= 8.2e+116) {
tmp = t_3;
} else {
tmp = t_6;
}
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.exp(((y_46_re * math.log(x_46_im)) - t_0)) t_2 = math.sin((y_46_im * math.log(math.hypot(x_46_im, x_46_re)))) t_3 = t_2 * t_1 t_4 = y_46_re * math.atan2(x_46_im, x_46_re) t_5 = math.sin(t_4) t_6 = t_5 * t_1 t_7 = math.pow(math.hypot(x_46_re, x_46_im), y_46_re) * math.sin((t_4 + (y_46_im * math.log(x_46_im)))) tmp = 0 if x_46_im <= -9.2e-7: tmp = math.exp(((y_46_re * math.log(-x_46_im)) - t_0)) * t_2 elif x_46_im <= 8.2e-308: tmp = math.exp(((math.log(math.sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im)))) * y_46_re) - t_0)) * t_5 elif x_46_im <= 7.5e-280: tmp = t_3 elif x_46_im <= 1.7e-195: tmp = t_6 elif x_46_im <= 4.4e-151: tmp = t_7 elif x_46_im <= 7e-66: tmp = t_3 elif x_46_im <= 0.059: tmp = t_7 elif x_46_im <= 8.2e+116: tmp = t_3 else: tmp = t_6 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(x_46_im)) - t_0)) t_2 = sin(Float64(y_46_im * log(hypot(x_46_im, x_46_re)))) t_3 = Float64(t_2 * t_1) t_4 = Float64(y_46_re * atan(x_46_im, x_46_re)) t_5 = sin(t_4) t_6 = Float64(t_5 * t_1) t_7 = Float64((hypot(x_46_re, x_46_im) ^ y_46_re) * sin(Float64(t_4 + Float64(y_46_im * log(x_46_im))))) tmp = 0.0 if (x_46_im <= -9.2e-7) tmp = Float64(exp(Float64(Float64(y_46_re * log(Float64(-x_46_im))) - t_0)) * t_2); elseif (x_46_im <= 8.2e-308) tmp = Float64(exp(Float64(Float64(log(sqrt(Float64(Float64(x_46_re * x_46_re) + Float64(x_46_im * x_46_im)))) * y_46_re) - t_0)) * t_5); elseif (x_46_im <= 7.5e-280) tmp = t_3; elseif (x_46_im <= 1.7e-195) tmp = t_6; elseif (x_46_im <= 4.4e-151) tmp = t_7; elseif (x_46_im <= 7e-66) tmp = t_3; elseif (x_46_im <= 0.059) tmp = t_7; elseif (x_46_im <= 8.2e+116) tmp = t_3; else tmp = t_6; 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 = exp(((y_46_re * log(x_46_im)) - t_0)); t_2 = sin((y_46_im * log(hypot(x_46_im, x_46_re)))); t_3 = t_2 * t_1; t_4 = y_46_re * atan2(x_46_im, x_46_re); t_5 = sin(t_4); t_6 = t_5 * t_1; t_7 = (hypot(x_46_re, x_46_im) ^ y_46_re) * sin((t_4 + (y_46_im * log(x_46_im)))); tmp = 0.0; if (x_46_im <= -9.2e-7) tmp = exp(((y_46_re * log(-x_46_im)) - t_0)) * t_2; elseif (x_46_im <= 8.2e-308) tmp = exp(((log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im)))) * y_46_re) - t_0)) * t_5; elseif (x_46_im <= 7.5e-280) tmp = t_3; elseif (x_46_im <= 1.7e-195) tmp = t_6; elseif (x_46_im <= 4.4e-151) tmp = t_7; elseif (x_46_im <= 7e-66) tmp = t_3; elseif (x_46_im <= 0.059) tmp = t_7; elseif (x_46_im <= 8.2e+116) tmp = t_3; else tmp = t_6; 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[Exp[N[(N[(y$46$re * N[Log[x$46$im], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$2 = 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$3 = N[(t$95$2 * t$95$1), $MachinePrecision]}, Block[{t$95$4 = N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$5 = N[Sin[t$95$4], $MachinePrecision]}, Block[{t$95$6 = N[(t$95$5 * t$95$1), $MachinePrecision]}, Block[{t$95$7 = N[(N[Power[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision], y$46$re], $MachinePrecision] * N[Sin[N[(t$95$4 + N[(y$46$im * N[Log[x$46$im], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x$46$im, -9.2e-7], N[(N[Exp[N[(N[(y$46$re * N[Log[(-x$46$im)], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]], $MachinePrecision] * t$95$2), $MachinePrecision], If[LessEqual[x$46$im, 8.2e-308], N[(N[Exp[N[(N[(N[Log[N[Sqrt[N[(N[(x$46$re * x$46$re), $MachinePrecision] + N[(x$46$im * x$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision] * y$46$re), $MachinePrecision] - t$95$0), $MachinePrecision]], $MachinePrecision] * t$95$5), $MachinePrecision], If[LessEqual[x$46$im, 7.5e-280], t$95$3, If[LessEqual[x$46$im, 1.7e-195], t$95$6, If[LessEqual[x$46$im, 4.4e-151], t$95$7, If[LessEqual[x$46$im, 7e-66], t$95$3, If[LessEqual[x$46$im, 0.059], t$95$7, If[LessEqual[x$46$im, 8.2e+116], t$95$3, t$95$6]]]]]]]]]]]]]]]]
\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 x.im - t\_0}\\
t_2 := \sin \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right)\\
t_3 := t\_2 \cdot t\_1\\
t_4 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
t_5 := \sin t\_4\\
t_6 := t\_5 \cdot t\_1\\
t_7 := {\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re} \cdot \sin \left(t\_4 + y.im \cdot \log x.im\right)\\
\mathbf{if}\;x.im \leq -9.2 \cdot 10^{-7}:\\
\;\;\;\;e^{y.re \cdot \log \left(-x.im\right) - t\_0} \cdot t\_2\\
\mathbf{elif}\;x.im \leq 8.2 \cdot 10^{-308}:\\
\;\;\;\;e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re - t\_0} \cdot t\_5\\
\mathbf{elif}\;x.im \leq 7.5 \cdot 10^{-280}:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;x.im \leq 1.7 \cdot 10^{-195}:\\
\;\;\;\;t\_6\\
\mathbf{elif}\;x.im \leq 4.4 \cdot 10^{-151}:\\
\;\;\;\;t\_7\\
\mathbf{elif}\;x.im \leq 7 \cdot 10^{-66}:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;x.im \leq 0.059:\\
\;\;\;\;t\_7\\
\mathbf{elif}\;x.im \leq 8.2 \cdot 10^{+116}:\\
\;\;\;\;t\_3\\
\mathbf{else}:\\
\;\;\;\;t\_6\\
\end{array}
\end{array}
if x.im < -9.1999999999999998e-7Initial program 25.7%
Taylor expanded in y.re around 0 20.8%
unpow220.8%
unpow220.8%
hypot-undefine55.7%
Simplified55.7%
Taylor expanded in x.im around -inf 69.8%
mul-1-neg69.8%
Simplified69.8%
if -9.1999999999999998e-7 < x.im < 8.19999999999999965e-308Initial program 55.8%
Taylor expanded in y.im around 0 66.3%
if 8.19999999999999965e-308 < x.im < 7.4999999999999999e-280 or 4.3999999999999999e-151 < x.im < 7.0000000000000001e-66 or 0.058999999999999997 < x.im < 8.1999999999999996e116Initial program 52.1%
Taylor expanded in y.re around 0 57.0%
unpow257.0%
unpow257.0%
hypot-undefine62.2%
Simplified62.2%
Taylor expanded in x.re around 0 81.8%
if 7.4999999999999999e-280 < x.im < 1.70000000000000001e-195 or 8.1999999999999996e116 < x.im Initial program 16.5%
Taylor expanded in y.im around 0 50.6%
Taylor expanded in x.re around 0 70.7%
*-commutative70.7%
Simplified70.7%
if 1.70000000000000001e-195 < x.im < 4.3999999999999999e-151 or 7.0000000000000001e-66 < x.im < 0.058999999999999997Initial program 59.4%
exp-diff59.4%
exp-to-pow59.4%
hypot-define59.4%
*-commutative59.4%
exp-prod57.4%
fma-define57.4%
hypot-define76.6%
*-commutative76.6%
Simplified76.6%
Taylor expanded in x.re around 0 75.6%
Taylor expanded in y.im around 0 75.6%
Final simplification71.8%
(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 x.im)) t_0)))
(t_2 (* (sin (* y.im (log (hypot x.im x.re)))) t_1))
(t_3 (* y.re (atan2 x.im x.re)))
(t_4 (sin t_3))
(t_5 (* t_4 t_1)))
(if (<= x.im -2.5e-170)
(* t_4 (exp (- (* y.re (log (- x.im))) t_0)))
(if (<= x.im 1.3e-308)
(* t_4 (exp (- (log (pow x.re y.re)) t_0)))
(if (<= x.im 7.8e-280)
t_2
(if (<= x.im 5.3e-278)
(* t_4 (exp (- (* y.re (log x.re)) t_0)))
(if (<= x.im 2.4e-192)
t_5
(if (<= x.im 4.3e-66)
t_2
(if (<= x.im 0.045)
(*
(pow (hypot x.re x.im) y.re)
(sin (+ t_3 (* y.im (log x.im)))))
(if (<= x.im 2.7e+116) t_2 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(x_46_im)) - t_0));
double t_2 = sin((y_46_im * log(hypot(x_46_im, x_46_re)))) * t_1;
double t_3 = y_46_re * atan2(x_46_im, x_46_re);
double t_4 = sin(t_3);
double t_5 = t_4 * t_1;
double tmp;
if (x_46_im <= -2.5e-170) {
tmp = t_4 * exp(((y_46_re * log(-x_46_im)) - t_0));
} else if (x_46_im <= 1.3e-308) {
tmp = t_4 * exp((log(pow(x_46_re, y_46_re)) - t_0));
} else if (x_46_im <= 7.8e-280) {
tmp = t_2;
} else if (x_46_im <= 5.3e-278) {
tmp = t_4 * exp(((y_46_re * log(x_46_re)) - t_0));
} else if (x_46_im <= 2.4e-192) {
tmp = t_5;
} else if (x_46_im <= 4.3e-66) {
tmp = t_2;
} else if (x_46_im <= 0.045) {
tmp = pow(hypot(x_46_re, x_46_im), y_46_re) * sin((t_3 + (y_46_im * log(x_46_im))));
} else if (x_46_im <= 2.7e+116) {
tmp = t_2;
} else {
tmp = t_5;
}
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.exp(((y_46_re * Math.log(x_46_im)) - t_0));
double t_2 = Math.sin((y_46_im * Math.log(Math.hypot(x_46_im, x_46_re)))) * t_1;
double t_3 = y_46_re * Math.atan2(x_46_im, x_46_re);
double t_4 = Math.sin(t_3);
double t_5 = t_4 * t_1;
double tmp;
if (x_46_im <= -2.5e-170) {
tmp = t_4 * Math.exp(((y_46_re * Math.log(-x_46_im)) - t_0));
} else if (x_46_im <= 1.3e-308) {
tmp = t_4 * Math.exp((Math.log(Math.pow(x_46_re, y_46_re)) - t_0));
} else if (x_46_im <= 7.8e-280) {
tmp = t_2;
} else if (x_46_im <= 5.3e-278) {
tmp = t_4 * Math.exp(((y_46_re * Math.log(x_46_re)) - t_0));
} else if (x_46_im <= 2.4e-192) {
tmp = t_5;
} else if (x_46_im <= 4.3e-66) {
tmp = t_2;
} else if (x_46_im <= 0.045) {
tmp = Math.pow(Math.hypot(x_46_re, x_46_im), y_46_re) * Math.sin((t_3 + (y_46_im * Math.log(x_46_im))));
} else if (x_46_im <= 2.7e+116) {
tmp = t_2;
} else {
tmp = t_5;
}
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.exp(((y_46_re * math.log(x_46_im)) - t_0)) t_2 = math.sin((y_46_im * math.log(math.hypot(x_46_im, x_46_re)))) * t_1 t_3 = y_46_re * math.atan2(x_46_im, x_46_re) t_4 = math.sin(t_3) t_5 = t_4 * t_1 tmp = 0 if x_46_im <= -2.5e-170: tmp = t_4 * math.exp(((y_46_re * math.log(-x_46_im)) - t_0)) elif x_46_im <= 1.3e-308: tmp = t_4 * math.exp((math.log(math.pow(x_46_re, y_46_re)) - t_0)) elif x_46_im <= 7.8e-280: tmp = t_2 elif x_46_im <= 5.3e-278: tmp = t_4 * math.exp(((y_46_re * math.log(x_46_re)) - t_0)) elif x_46_im <= 2.4e-192: tmp = t_5 elif x_46_im <= 4.3e-66: tmp = t_2 elif x_46_im <= 0.045: tmp = math.pow(math.hypot(x_46_re, x_46_im), y_46_re) * math.sin((t_3 + (y_46_im * math.log(x_46_im)))) elif x_46_im <= 2.7e+116: tmp = t_2 else: tmp = 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(x_46_im)) - t_0)) t_2 = Float64(sin(Float64(y_46_im * log(hypot(x_46_im, x_46_re)))) * t_1) t_3 = Float64(y_46_re * atan(x_46_im, x_46_re)) t_4 = sin(t_3) t_5 = Float64(t_4 * t_1) tmp = 0.0 if (x_46_im <= -2.5e-170) tmp = Float64(t_4 * exp(Float64(Float64(y_46_re * log(Float64(-x_46_im))) - t_0))); elseif (x_46_im <= 1.3e-308) tmp = Float64(t_4 * exp(Float64(log((x_46_re ^ y_46_re)) - t_0))); elseif (x_46_im <= 7.8e-280) tmp = t_2; elseif (x_46_im <= 5.3e-278) tmp = Float64(t_4 * exp(Float64(Float64(y_46_re * log(x_46_re)) - t_0))); elseif (x_46_im <= 2.4e-192) tmp = t_5; elseif (x_46_im <= 4.3e-66) tmp = t_2; elseif (x_46_im <= 0.045) tmp = Float64((hypot(x_46_re, x_46_im) ^ y_46_re) * sin(Float64(t_3 + Float64(y_46_im * log(x_46_im))))); elseif (x_46_im <= 2.7e+116) tmp = t_2; else tmp = t_5; 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 = exp(((y_46_re * log(x_46_im)) - t_0)); t_2 = sin((y_46_im * log(hypot(x_46_im, x_46_re)))) * t_1; t_3 = y_46_re * atan2(x_46_im, x_46_re); t_4 = sin(t_3); t_5 = t_4 * t_1; tmp = 0.0; if (x_46_im <= -2.5e-170) tmp = t_4 * exp(((y_46_re * log(-x_46_im)) - t_0)); elseif (x_46_im <= 1.3e-308) tmp = t_4 * exp((log((x_46_re ^ y_46_re)) - t_0)); elseif (x_46_im <= 7.8e-280) tmp = t_2; elseif (x_46_im <= 5.3e-278) tmp = t_4 * exp(((y_46_re * log(x_46_re)) - t_0)); elseif (x_46_im <= 2.4e-192) tmp = t_5; elseif (x_46_im <= 4.3e-66) tmp = t_2; elseif (x_46_im <= 0.045) tmp = (hypot(x_46_re, x_46_im) ^ y_46_re) * sin((t_3 + (y_46_im * log(x_46_im)))); elseif (x_46_im <= 2.7e+116) tmp = t_2; else tmp = t_5; 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[Exp[N[(N[(y$46$re * N[Log[x$46$im], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$2 = 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]}, Block[{t$95$3 = N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[Sin[t$95$3], $MachinePrecision]}, Block[{t$95$5 = N[(t$95$4 * t$95$1), $MachinePrecision]}, If[LessEqual[x$46$im, -2.5e-170], N[(t$95$4 * N[Exp[N[(N[(y$46$re * N[Log[(-x$46$im)], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[x$46$im, 1.3e-308], N[(t$95$4 * N[Exp[N[(N[Log[N[Power[x$46$re, y$46$re], $MachinePrecision]], $MachinePrecision] - t$95$0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[x$46$im, 7.8e-280], t$95$2, If[LessEqual[x$46$im, 5.3e-278], N[(t$95$4 * N[Exp[N[(N[(y$46$re * N[Log[x$46$re], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[x$46$im, 2.4e-192], t$95$5, If[LessEqual[x$46$im, 4.3e-66], t$95$2, If[LessEqual[x$46$im, 0.045], N[(N[Power[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision], y$46$re], $MachinePrecision] * N[Sin[N[(t$95$3 + N[(y$46$im * N[Log[x$46$im], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[x$46$im, 2.7e+116], t$95$2, t$95$5]]]]]]]]]]]]]]
\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 x.im - t\_0}\\
t_2 := \sin \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right) \cdot t\_1\\
t_3 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
t_4 := \sin t\_3\\
t_5 := t\_4 \cdot t\_1\\
\mathbf{if}\;x.im \leq -2.5 \cdot 10^{-170}:\\
\;\;\;\;t\_4 \cdot e^{y.re \cdot \log \left(-x.im\right) - t\_0}\\
\mathbf{elif}\;x.im \leq 1.3 \cdot 10^{-308}:\\
\;\;\;\;t\_4 \cdot e^{\log \left({x.re}^{y.re}\right) - t\_0}\\
\mathbf{elif}\;x.im \leq 7.8 \cdot 10^{-280}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;x.im \leq 5.3 \cdot 10^{-278}:\\
\;\;\;\;t\_4 \cdot e^{y.re \cdot \log x.re - t\_0}\\
\mathbf{elif}\;x.im \leq 2.4 \cdot 10^{-192}:\\
\;\;\;\;t\_5\\
\mathbf{elif}\;x.im \leq 4.3 \cdot 10^{-66}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;x.im \leq 0.045:\\
\;\;\;\;{\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re} \cdot \sin \left(t\_3 + y.im \cdot \log x.im\right)\\
\mathbf{elif}\;x.im \leq 2.7 \cdot 10^{+116}:\\
\;\;\;\;t\_2\\
\mathbf{else}:\\
\;\;\;\;t\_5\\
\end{array}
\end{array}
if x.im < -2.50000000000000005e-170Initial program 34.5%
Taylor expanded in y.im around 0 57.5%
Taylor expanded in x.im around -inf 63.4%
mul-1-neg64.9%
Simplified63.4%
if -2.50000000000000005e-170 < x.im < 1.3e-308Initial program 55.9%
Taylor expanded in y.im around 0 62.4%
Taylor expanded in x.re around inf 36.6%
add-log-exp36.6%
exp-to-pow60.6%
Applied egg-rr60.6%
if 1.3e-308 < x.im < 7.79999999999999996e-280 or 2.3999999999999999e-192 < x.im < 4.30000000000000013e-66 or 0.044999999999999998 < x.im < 2.7e116Initial program 49.7%
Taylor expanded in y.re around 0 53.9%
unpow253.9%
unpow253.9%
hypot-undefine62.4%
Simplified62.4%
Taylor expanded in x.re around 0 77.3%
if 7.79999999999999996e-280 < x.im < 5.3e-278Initial program 100.0%
Taylor expanded in y.im around 0 100.0%
Taylor expanded in x.re around inf 100.0%
if 5.3e-278 < x.im < 2.3999999999999999e-192 or 2.7e116 < x.im Initial program 16.5%
Taylor expanded in y.im around 0 50.6%
Taylor expanded in x.re around 0 72.1%
*-commutative72.1%
Simplified72.1%
if 4.30000000000000013e-66 < x.im < 0.044999999999999998Initial program 69.2%
exp-diff69.2%
exp-to-pow69.2%
hypot-define69.2%
*-commutative69.2%
exp-prod69.2%
fma-define69.2%
hypot-define84.9%
*-commutative84.9%
Simplified84.9%
Taylor expanded in x.re around 0 84.9%
Taylor expanded in y.im around 0 84.8%
Final simplification69.4%
(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 (* y.re (atan2 x.im x.re)))
(t_2 (* (atan2 x.im x.re) y.im))
(t_3 (exp (- (* y.re (log x.im)) t_2)))
(t_4 (* t_0 t_3)))
(if (<= x.im -1.05e+148)
(* (exp (- (* y.re (log (- x.im))) t_2)) t_0)
(if (<= x.im 1.45e-307)
(*
(exp (- (* (log (sqrt (+ (* x.re x.re) (* x.im x.im)))) y.re) t_2))
(* y.im (log (hypot x.re x.im))))
(if (<= x.im 2.7e-66)
t_4
(if (<= x.im 0.45)
(*
(/ (pow (hypot x.re x.im) y.re) (+ t_2 1.0))
(sin (+ t_1 (* y.im (log x.im)))))
(if (<= x.im 2e+118) t_4 (* (sin 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 = sin((y_46_im * log(hypot(x_46_im, x_46_re))));
double t_1 = y_46_re * atan2(x_46_im, x_46_re);
double t_2 = atan2(x_46_im, x_46_re) * y_46_im;
double t_3 = exp(((y_46_re * log(x_46_im)) - t_2));
double t_4 = t_0 * t_3;
double tmp;
if (x_46_im <= -1.05e+148) {
tmp = exp(((y_46_re * log(-x_46_im)) - t_2)) * t_0;
} else if (x_46_im <= 1.45e-307) {
tmp = exp(((log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im)))) * y_46_re) - t_2)) * (y_46_im * log(hypot(x_46_re, x_46_im)));
} else if (x_46_im <= 2.7e-66) {
tmp = t_4;
} else if (x_46_im <= 0.45) {
tmp = (pow(hypot(x_46_re, x_46_im), y_46_re) / (t_2 + 1.0)) * sin((t_1 + (y_46_im * log(x_46_im))));
} else if (x_46_im <= 2e+118) {
tmp = t_4;
} else {
tmp = sin(t_1) * 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.sin((y_46_im * Math.log(Math.hypot(x_46_im, x_46_re))));
double t_1 = y_46_re * Math.atan2(x_46_im, x_46_re);
double t_2 = Math.atan2(x_46_im, x_46_re) * y_46_im;
double t_3 = Math.exp(((y_46_re * Math.log(x_46_im)) - t_2));
double t_4 = t_0 * t_3;
double tmp;
if (x_46_im <= -1.05e+148) {
tmp = Math.exp(((y_46_re * Math.log(-x_46_im)) - t_2)) * t_0;
} else if (x_46_im <= 1.45e-307) {
tmp = Math.exp(((Math.log(Math.sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im)))) * y_46_re) - t_2)) * (y_46_im * Math.log(Math.hypot(x_46_re, x_46_im)));
} else if (x_46_im <= 2.7e-66) {
tmp = t_4;
} else if (x_46_im <= 0.45) {
tmp = (Math.pow(Math.hypot(x_46_re, x_46_im), y_46_re) / (t_2 + 1.0)) * Math.sin((t_1 + (y_46_im * Math.log(x_46_im))));
} else if (x_46_im <= 2e+118) {
tmp = t_4;
} else {
tmp = Math.sin(t_1) * t_3;
}
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 = y_46_re * math.atan2(x_46_im, x_46_re) t_2 = math.atan2(x_46_im, x_46_re) * y_46_im t_3 = math.exp(((y_46_re * math.log(x_46_im)) - t_2)) t_4 = t_0 * t_3 tmp = 0 if x_46_im <= -1.05e+148: tmp = math.exp(((y_46_re * math.log(-x_46_im)) - t_2)) * t_0 elif x_46_im <= 1.45e-307: tmp = math.exp(((math.log(math.sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im)))) * y_46_re) - t_2)) * (y_46_im * math.log(math.hypot(x_46_re, x_46_im))) elif x_46_im <= 2.7e-66: tmp = t_4 elif x_46_im <= 0.45: tmp = (math.pow(math.hypot(x_46_re, x_46_im), y_46_re) / (t_2 + 1.0)) * math.sin((t_1 + (y_46_im * math.log(x_46_im)))) elif x_46_im <= 2e+118: tmp = t_4 else: tmp = math.sin(t_1) * t_3 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(y_46_re * atan(x_46_im, x_46_re)) t_2 = Float64(atan(x_46_im, x_46_re) * y_46_im) t_3 = exp(Float64(Float64(y_46_re * log(x_46_im)) - t_2)) t_4 = Float64(t_0 * t_3) tmp = 0.0 if (x_46_im <= -1.05e+148) tmp = Float64(exp(Float64(Float64(y_46_re * log(Float64(-x_46_im))) - t_2)) * t_0); elseif (x_46_im <= 1.45e-307) tmp = Float64(exp(Float64(Float64(log(sqrt(Float64(Float64(x_46_re * x_46_re) + Float64(x_46_im * x_46_im)))) * y_46_re) - t_2)) * Float64(y_46_im * log(hypot(x_46_re, x_46_im)))); elseif (x_46_im <= 2.7e-66) tmp = t_4; elseif (x_46_im <= 0.45) tmp = Float64(Float64((hypot(x_46_re, x_46_im) ^ y_46_re) / Float64(t_2 + 1.0)) * sin(Float64(t_1 + Float64(y_46_im * log(x_46_im))))); elseif (x_46_im <= 2e+118) tmp = t_4; else tmp = Float64(sin(t_1) * t_3); 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 = y_46_re * atan2(x_46_im, x_46_re); t_2 = atan2(x_46_im, x_46_re) * y_46_im; t_3 = exp(((y_46_re * log(x_46_im)) - t_2)); t_4 = t_0 * t_3; tmp = 0.0; if (x_46_im <= -1.05e+148) tmp = exp(((y_46_re * log(-x_46_im)) - t_2)) * t_0; elseif (x_46_im <= 1.45e-307) tmp = exp(((log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im)))) * y_46_re) - t_2)) * (y_46_im * log(hypot(x_46_re, x_46_im))); elseif (x_46_im <= 2.7e-66) tmp = t_4; elseif (x_46_im <= 0.45) tmp = ((hypot(x_46_re, x_46_im) ^ y_46_re) / (t_2 + 1.0)) * sin((t_1 + (y_46_im * log(x_46_im)))); elseif (x_46_im <= 2e+118) tmp = t_4; else tmp = sin(t_1) * 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[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[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$im), $MachinePrecision]}, Block[{t$95$3 = N[Exp[N[(N[(y$46$re * N[Log[x$46$im], $MachinePrecision]), $MachinePrecision] - t$95$2), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$4 = N[(t$95$0 * t$95$3), $MachinePrecision]}, If[LessEqual[x$46$im, -1.05e+148], N[(N[Exp[N[(N[(y$46$re * N[Log[(-x$46$im)], $MachinePrecision]), $MachinePrecision] - t$95$2), $MachinePrecision]], $MachinePrecision] * t$95$0), $MachinePrecision], If[LessEqual[x$46$im, 1.45e-307], N[(N[Exp[N[(N[(N[Log[N[Sqrt[N[(N[(x$46$re * x$46$re), $MachinePrecision] + N[(x$46$im * x$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision] * y$46$re), $MachinePrecision] - t$95$2), $MachinePrecision]], $MachinePrecision] * N[(y$46$im * N[Log[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x$46$im, 2.7e-66], t$95$4, If[LessEqual[x$46$im, 0.45], N[(N[(N[Power[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision], y$46$re], $MachinePrecision] / N[(t$95$2 + 1.0), $MachinePrecision]), $MachinePrecision] * N[Sin[N[(t$95$1 + N[(y$46$im * N[Log[x$46$im], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[x$46$im, 2e+118], t$95$4, N[(N[Sin[t$95$1], $MachinePrecision] * t$95$3), $MachinePrecision]]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \sin \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right)\\
t_1 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
t_2 := \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im\\
t_3 := e^{y.re \cdot \log x.im - t\_2}\\
t_4 := t\_0 \cdot t\_3\\
\mathbf{if}\;x.im \leq -1.05 \cdot 10^{+148}:\\
\;\;\;\;e^{y.re \cdot \log \left(-x.im\right) - t\_2} \cdot t\_0\\
\mathbf{elif}\;x.im \leq 1.45 \cdot 10^{-307}:\\
\;\;\;\;e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re - t\_2} \cdot \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.re, x.im\right)\right)\right)\\
\mathbf{elif}\;x.im \leq 2.7 \cdot 10^{-66}:\\
\;\;\;\;t\_4\\
\mathbf{elif}\;x.im \leq 0.45:\\
\;\;\;\;\frac{{\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re}}{t\_2 + 1} \cdot \sin \left(t\_1 + y.im \cdot \log x.im\right)\\
\mathbf{elif}\;x.im \leq 2 \cdot 10^{+118}:\\
\;\;\;\;t\_4\\
\mathbf{else}:\\
\;\;\;\;\sin t\_1 \cdot t\_3\\
\end{array}
\end{array}
if x.im < -1.04999999999999999e148Initial program 0.0%
Taylor expanded in y.re around 0 0.0%
unpow20.0%
unpow20.0%
hypot-undefine53.5%
Simplified53.5%
Taylor expanded in x.im around -inf 75.2%
mul-1-neg75.2%
Simplified75.2%
if -1.04999999999999999e148 < x.im < 1.45e-307Initial program 54.7%
Taylor expanded in y.re around 0 46.5%
unpow246.5%
unpow246.5%
hypot-undefine62.7%
Simplified62.7%
Taylor expanded in y.im around 0 56.6%
+-commutative56.6%
unpow256.6%
unpow256.6%
hypot-undefine69.3%
Simplified69.3%
if 1.45e-307 < x.im < 2.69999999999999996e-66 or 0.450000000000000011 < x.im < 1.99999999999999993e118Initial program 42.4%
Taylor expanded in y.re around 0 42.6%
unpow242.6%
unpow242.6%
hypot-undefine55.9%
Simplified55.9%
Taylor expanded in x.re around 0 67.9%
if 2.69999999999999996e-66 < x.im < 0.450000000000000011Initial program 69.2%
exp-diff69.2%
exp-to-pow69.2%
hypot-define69.2%
*-commutative69.2%
exp-prod69.2%
fma-define69.2%
hypot-define84.9%
*-commutative84.9%
Simplified84.9%
Taylor expanded in x.re around 0 84.9%
Taylor expanded in y.im around 0 84.9%
if 1.99999999999999993e118 < x.im Initial program 9.8%
Taylor expanded in y.im around 0 46.6%
Taylor expanded in x.re around 0 75.1%
*-commutative75.1%
Simplified75.1%
Final simplification71.4%
(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 (* y.re (atan2 x.im x.re)))
(t_2 (* (atan2 x.im x.re) y.im))
(t_3 (exp (- (* y.re (log x.im)) t_2)))
(t_4 (* t_0 t_3)))
(if (<= x.im -2e+149)
(* (exp (- (* y.re (log (- x.im))) t_2)) t_0)
(if (<= x.im 9e-308)
(*
(exp (- (* (log (sqrt (+ (* x.re x.re) (* x.im x.im)))) y.re) t_2))
(* y.im (log (hypot x.re x.im))))
(if (<= x.im 8e-66)
t_4
(if (<= x.im 32.0)
(* (pow (hypot x.re x.im) y.re) (sin (+ t_1 (* y.im (log x.im)))))
(if (<= x.im 1.52e+118) t_4 (* (sin 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 = sin((y_46_im * log(hypot(x_46_im, x_46_re))));
double t_1 = y_46_re * atan2(x_46_im, x_46_re);
double t_2 = atan2(x_46_im, x_46_re) * y_46_im;
double t_3 = exp(((y_46_re * log(x_46_im)) - t_2));
double t_4 = t_0 * t_3;
double tmp;
if (x_46_im <= -2e+149) {
tmp = exp(((y_46_re * log(-x_46_im)) - t_2)) * t_0;
} else if (x_46_im <= 9e-308) {
tmp = exp(((log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im)))) * y_46_re) - t_2)) * (y_46_im * log(hypot(x_46_re, x_46_im)));
} else if (x_46_im <= 8e-66) {
tmp = t_4;
} else if (x_46_im <= 32.0) {
tmp = pow(hypot(x_46_re, x_46_im), y_46_re) * sin((t_1 + (y_46_im * log(x_46_im))));
} else if (x_46_im <= 1.52e+118) {
tmp = t_4;
} else {
tmp = sin(t_1) * 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.sin((y_46_im * Math.log(Math.hypot(x_46_im, x_46_re))));
double t_1 = y_46_re * Math.atan2(x_46_im, x_46_re);
double t_2 = Math.atan2(x_46_im, x_46_re) * y_46_im;
double t_3 = Math.exp(((y_46_re * Math.log(x_46_im)) - t_2));
double t_4 = t_0 * t_3;
double tmp;
if (x_46_im <= -2e+149) {
tmp = Math.exp(((y_46_re * Math.log(-x_46_im)) - t_2)) * t_0;
} else if (x_46_im <= 9e-308) {
tmp = Math.exp(((Math.log(Math.sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im)))) * y_46_re) - t_2)) * (y_46_im * Math.log(Math.hypot(x_46_re, x_46_im)));
} else if (x_46_im <= 8e-66) {
tmp = t_4;
} else if (x_46_im <= 32.0) {
tmp = Math.pow(Math.hypot(x_46_re, x_46_im), y_46_re) * Math.sin((t_1 + (y_46_im * Math.log(x_46_im))));
} else if (x_46_im <= 1.52e+118) {
tmp = t_4;
} else {
tmp = Math.sin(t_1) * t_3;
}
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 = y_46_re * math.atan2(x_46_im, x_46_re) t_2 = math.atan2(x_46_im, x_46_re) * y_46_im t_3 = math.exp(((y_46_re * math.log(x_46_im)) - t_2)) t_4 = t_0 * t_3 tmp = 0 if x_46_im <= -2e+149: tmp = math.exp(((y_46_re * math.log(-x_46_im)) - t_2)) * t_0 elif x_46_im <= 9e-308: tmp = math.exp(((math.log(math.sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im)))) * y_46_re) - t_2)) * (y_46_im * math.log(math.hypot(x_46_re, x_46_im))) elif x_46_im <= 8e-66: tmp = t_4 elif x_46_im <= 32.0: tmp = math.pow(math.hypot(x_46_re, x_46_im), y_46_re) * math.sin((t_1 + (y_46_im * math.log(x_46_im)))) elif x_46_im <= 1.52e+118: tmp = t_4 else: tmp = math.sin(t_1) * t_3 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(y_46_re * atan(x_46_im, x_46_re)) t_2 = Float64(atan(x_46_im, x_46_re) * y_46_im) t_3 = exp(Float64(Float64(y_46_re * log(x_46_im)) - t_2)) t_4 = Float64(t_0 * t_3) tmp = 0.0 if (x_46_im <= -2e+149) tmp = Float64(exp(Float64(Float64(y_46_re * log(Float64(-x_46_im))) - t_2)) * t_0); elseif (x_46_im <= 9e-308) tmp = Float64(exp(Float64(Float64(log(sqrt(Float64(Float64(x_46_re * x_46_re) + Float64(x_46_im * x_46_im)))) * y_46_re) - t_2)) * Float64(y_46_im * log(hypot(x_46_re, x_46_im)))); elseif (x_46_im <= 8e-66) tmp = t_4; elseif (x_46_im <= 32.0) tmp = Float64((hypot(x_46_re, x_46_im) ^ y_46_re) * sin(Float64(t_1 + Float64(y_46_im * log(x_46_im))))); elseif (x_46_im <= 1.52e+118) tmp = t_4; else tmp = Float64(sin(t_1) * t_3); 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 = y_46_re * atan2(x_46_im, x_46_re); t_2 = atan2(x_46_im, x_46_re) * y_46_im; t_3 = exp(((y_46_re * log(x_46_im)) - t_2)); t_4 = t_0 * t_3; tmp = 0.0; if (x_46_im <= -2e+149) tmp = exp(((y_46_re * log(-x_46_im)) - t_2)) * t_0; elseif (x_46_im <= 9e-308) tmp = exp(((log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im)))) * y_46_re) - t_2)) * (y_46_im * log(hypot(x_46_re, x_46_im))); elseif (x_46_im <= 8e-66) tmp = t_4; elseif (x_46_im <= 32.0) tmp = (hypot(x_46_re, x_46_im) ^ y_46_re) * sin((t_1 + (y_46_im * log(x_46_im)))); elseif (x_46_im <= 1.52e+118) tmp = t_4; else tmp = sin(t_1) * 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[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[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$im), $MachinePrecision]}, Block[{t$95$3 = N[Exp[N[(N[(y$46$re * N[Log[x$46$im], $MachinePrecision]), $MachinePrecision] - t$95$2), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$4 = N[(t$95$0 * t$95$3), $MachinePrecision]}, If[LessEqual[x$46$im, -2e+149], N[(N[Exp[N[(N[(y$46$re * N[Log[(-x$46$im)], $MachinePrecision]), $MachinePrecision] - t$95$2), $MachinePrecision]], $MachinePrecision] * t$95$0), $MachinePrecision], If[LessEqual[x$46$im, 9e-308], N[(N[Exp[N[(N[(N[Log[N[Sqrt[N[(N[(x$46$re * x$46$re), $MachinePrecision] + N[(x$46$im * x$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision] * y$46$re), $MachinePrecision] - t$95$2), $MachinePrecision]], $MachinePrecision] * N[(y$46$im * N[Log[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x$46$im, 8e-66], t$95$4, If[LessEqual[x$46$im, 32.0], N[(N[Power[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision], y$46$re], $MachinePrecision] * N[Sin[N[(t$95$1 + N[(y$46$im * N[Log[x$46$im], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[x$46$im, 1.52e+118], t$95$4, N[(N[Sin[t$95$1], $MachinePrecision] * t$95$3), $MachinePrecision]]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \sin \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right)\\
t_1 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
t_2 := \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im\\
t_3 := e^{y.re \cdot \log x.im - t\_2}\\
t_4 := t\_0 \cdot t\_3\\
\mathbf{if}\;x.im \leq -2 \cdot 10^{+149}:\\
\;\;\;\;e^{y.re \cdot \log \left(-x.im\right) - t\_2} \cdot t\_0\\
\mathbf{elif}\;x.im \leq 9 \cdot 10^{-308}:\\
\;\;\;\;e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re - t\_2} \cdot \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.re, x.im\right)\right)\right)\\
\mathbf{elif}\;x.im \leq 8 \cdot 10^{-66}:\\
\;\;\;\;t\_4\\
\mathbf{elif}\;x.im \leq 32:\\
\;\;\;\;{\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re} \cdot \sin \left(t\_1 + y.im \cdot \log x.im\right)\\
\mathbf{elif}\;x.im \leq 1.52 \cdot 10^{+118}:\\
\;\;\;\;t\_4\\
\mathbf{else}:\\
\;\;\;\;\sin t\_1 \cdot t\_3\\
\end{array}
\end{array}
if x.im < -2.0000000000000001e149Initial program 0.0%
Taylor expanded in y.re around 0 0.0%
unpow20.0%
unpow20.0%
hypot-undefine53.5%
Simplified53.5%
Taylor expanded in x.im around -inf 75.2%
mul-1-neg75.2%
Simplified75.2%
if -2.0000000000000001e149 < x.im < 9.00000000000000017e-308Initial program 54.7%
Taylor expanded in y.re around 0 46.5%
unpow246.5%
unpow246.5%
hypot-undefine62.7%
Simplified62.7%
Taylor expanded in y.im around 0 56.6%
+-commutative56.6%
unpow256.6%
unpow256.6%
hypot-undefine69.3%
Simplified69.3%
if 9.00000000000000017e-308 < x.im < 7.9999999999999998e-66 or 32 < x.im < 1.5200000000000001e118Initial program 42.4%
Taylor expanded in y.re around 0 42.6%
unpow242.6%
unpow242.6%
hypot-undefine55.9%
Simplified55.9%
Taylor expanded in x.re around 0 67.9%
if 7.9999999999999998e-66 < x.im < 32Initial program 69.2%
exp-diff69.2%
exp-to-pow69.2%
hypot-define69.2%
*-commutative69.2%
exp-prod69.2%
fma-define69.2%
hypot-define84.9%
*-commutative84.9%
Simplified84.9%
Taylor expanded in x.re around 0 84.9%
Taylor expanded in y.im around 0 84.8%
if 1.5200000000000001e118 < x.im Initial program 9.8%
Taylor expanded in y.im around 0 46.6%
Taylor expanded in x.re around 0 75.1%
*-commutative75.1%
Simplified75.1%
Final simplification71.4%
(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.re (atan2 x.im x.re)))))
(if (<= x.re -2e-310)
(* t_1 (exp (- (* y.re (log (- x.re))) t_0)))
(if (or (<= x.re 450.0) (not (<= x.re 1.1e+236)))
(*
(sin (* y.im (log (hypot x.im x.re))))
(exp (- (* y.re (log x.re)) t_0)))
(* t_1 (exp (- (log (pow 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 = atan2(x_46_im, x_46_re) * y_46_im;
double t_1 = sin((y_46_re * atan2(x_46_im, x_46_re)));
double tmp;
if (x_46_re <= -2e-310) {
tmp = t_1 * exp(((y_46_re * log(-x_46_re)) - t_0));
} else if ((x_46_re <= 450.0) || !(x_46_re <= 1.1e+236)) {
tmp = sin((y_46_im * log(hypot(x_46_im, x_46_re)))) * exp(((y_46_re * log(x_46_re)) - t_0));
} else {
tmp = t_1 * exp((log(pow(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.atan2(x_46_im, x_46_re) * y_46_im;
double t_1 = Math.sin((y_46_re * Math.atan2(x_46_im, x_46_re)));
double tmp;
if (x_46_re <= -2e-310) {
tmp = t_1 * Math.exp(((y_46_re * Math.log(-x_46_re)) - t_0));
} else if ((x_46_re <= 450.0) || !(x_46_re <= 1.1e+236)) {
tmp = Math.sin((y_46_im * Math.log(Math.hypot(x_46_im, x_46_re)))) * Math.exp(((y_46_re * Math.log(x_46_re)) - t_0));
} else {
tmp = t_1 * Math.exp((Math.log(Math.pow(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.atan2(x_46_im, x_46_re) * y_46_im t_1 = math.sin((y_46_re * math.atan2(x_46_im, x_46_re))) tmp = 0 if x_46_re <= -2e-310: tmp = t_1 * math.exp(((y_46_re * math.log(-x_46_re)) - t_0)) elif (x_46_re <= 450.0) or not (x_46_re <= 1.1e+236): tmp = math.sin((y_46_im * math.log(math.hypot(x_46_im, x_46_re)))) * math.exp(((y_46_re * math.log(x_46_re)) - t_0)) else: tmp = t_1 * math.exp((math.log(math.pow(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 = Float64(atan(x_46_im, x_46_re) * y_46_im) t_1 = sin(Float64(y_46_re * atan(x_46_im, x_46_re))) tmp = 0.0 if (x_46_re <= -2e-310) tmp = Float64(t_1 * exp(Float64(Float64(y_46_re * log(Float64(-x_46_re))) - t_0))); elseif ((x_46_re <= 450.0) || !(x_46_re <= 1.1e+236)) tmp = Float64(sin(Float64(y_46_im * log(hypot(x_46_im, x_46_re)))) * exp(Float64(Float64(y_46_re * log(x_46_re)) - t_0))); else tmp = Float64(t_1 * exp(Float64(log((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 = atan2(x_46_im, x_46_re) * y_46_im; t_1 = sin((y_46_re * atan2(x_46_im, x_46_re))); tmp = 0.0; if (x_46_re <= -2e-310) tmp = t_1 * exp(((y_46_re * log(-x_46_re)) - t_0)); elseif ((x_46_re <= 450.0) || ~((x_46_re <= 1.1e+236))) tmp = sin((y_46_im * log(hypot(x_46_im, x_46_re)))) * exp(((y_46_re * log(x_46_re)) - t_0)); else tmp = t_1 * exp((log((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[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$im), $MachinePrecision]}, Block[{t$95$1 = N[Sin[N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[x$46$re, -2e-310], N[(t$95$1 * N[Exp[N[(N[(y$46$re * N[Log[(-x$46$re)], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[x$46$re, 450.0], N[Not[LessEqual[x$46$re, 1.1e+236]], $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[Exp[N[(N[(y$46$re * N[Log[x$46$re], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(t$95$1 * N[Exp[N[(N[Log[N[Power[x$46$re, y$46$re], $MachinePrecision]], $MachinePrecision] - t$95$0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im\\
t_1 := \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\\
\mathbf{if}\;x.re \leq -2 \cdot 10^{-310}:\\
\;\;\;\;t\_1 \cdot e^{y.re \cdot \log \left(-x.re\right) - t\_0}\\
\mathbf{elif}\;x.re \leq 450 \lor \neg \left(x.re \leq 1.1 \cdot 10^{+236}\right):\\
\;\;\;\;\sin \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right) \cdot e^{y.re \cdot \log x.re - t\_0}\\
\mathbf{else}:\\
\;\;\;\;t\_1 \cdot e^{\log \left({x.re}^{y.re}\right) - t\_0}\\
\end{array}
\end{array}
if x.re < -1.999999999999994e-310Initial program 38.3%
Taylor expanded in y.im around 0 55.9%
Taylor expanded in x.re around -inf 61.8%
mul-1-neg61.8%
Simplified61.8%
if -1.999999999999994e-310 < x.re < 450 or 1.09999999999999989e236 < x.re Initial program 40.0%
Taylor expanded in y.re around 0 42.4%
unpow242.4%
unpow242.4%
hypot-undefine65.4%
Simplified65.4%
Taylor expanded in x.re around inf 69.7%
if 450 < x.re < 1.09999999999999989e236Initial program 28.6%
Taylor expanded in y.im around 0 50.9%
Taylor expanded in x.re around inf 64.0%
add-log-exp64.1%
exp-to-pow64.1%
Applied egg-rr64.1%
Final simplification64.5%
(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 (- x.re))) t_0)))
(t_2 (sin (* y.re (atan2 x.im x.re))))
(t_3 (sin (* y.im (log (hypot x.im x.re))))))
(if (<= x.re -6.5e-77)
(* t_2 t_1)
(if (<= x.re -4.6e-305)
(* t_3 t_1)
(if (<= x.re 1.34e-284)
(* t_2 (exp (- (* y.re (log (- x.im))) t_0)))
(* t_3 (exp (- (* y.re (log 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 = atan2(x_46_im, x_46_re) * y_46_im;
double t_1 = exp(((y_46_re * log(-x_46_re)) - t_0));
double t_2 = sin((y_46_re * atan2(x_46_im, x_46_re)));
double t_3 = sin((y_46_im * log(hypot(x_46_im, x_46_re))));
double tmp;
if (x_46_re <= -6.5e-77) {
tmp = t_2 * t_1;
} else if (x_46_re <= -4.6e-305) {
tmp = t_3 * t_1;
} else if (x_46_re <= 1.34e-284) {
tmp = t_2 * exp(((y_46_re * log(-x_46_im)) - t_0));
} else {
tmp = t_3 * exp(((y_46_re * log(x_46_re)) - t_0));
}
return tmp;
}
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = Math.atan2(x_46_im, x_46_re) * y_46_im;
double t_1 = Math.exp(((y_46_re * Math.log(-x_46_re)) - t_0));
double t_2 = Math.sin((y_46_re * Math.atan2(x_46_im, x_46_re)));
double t_3 = Math.sin((y_46_im * Math.log(Math.hypot(x_46_im, x_46_re))));
double tmp;
if (x_46_re <= -6.5e-77) {
tmp = t_2 * t_1;
} else if (x_46_re <= -4.6e-305) {
tmp = t_3 * t_1;
} else if (x_46_re <= 1.34e-284) {
tmp = t_2 * Math.exp(((y_46_re * Math.log(-x_46_im)) - t_0));
} else {
tmp = t_3 * Math.exp(((y_46_re * Math.log(x_46_re)) - t_0));
}
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.exp(((y_46_re * math.log(-x_46_re)) - t_0)) t_2 = math.sin((y_46_re * math.atan2(x_46_im, x_46_re))) t_3 = math.sin((y_46_im * math.log(math.hypot(x_46_im, x_46_re)))) tmp = 0 if x_46_re <= -6.5e-77: tmp = t_2 * t_1 elif x_46_re <= -4.6e-305: tmp = t_3 * t_1 elif x_46_re <= 1.34e-284: tmp = t_2 * math.exp(((y_46_re * math.log(-x_46_im)) - t_0)) else: tmp = t_3 * math.exp(((y_46_re * math.log(x_46_re)) - t_0)) return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = Float64(atan(x_46_im, x_46_re) * y_46_im) t_1 = exp(Float64(Float64(y_46_re * log(Float64(-x_46_re))) - t_0)) t_2 = sin(Float64(y_46_re * atan(x_46_im, x_46_re))) t_3 = sin(Float64(y_46_im * log(hypot(x_46_im, x_46_re)))) tmp = 0.0 if (x_46_re <= -6.5e-77) tmp = Float64(t_2 * t_1); elseif (x_46_re <= -4.6e-305) tmp = Float64(t_3 * t_1); elseif (x_46_re <= 1.34e-284) tmp = Float64(t_2 * exp(Float64(Float64(y_46_re * log(Float64(-x_46_im))) - t_0))); else tmp = Float64(t_3 * exp(Float64(Float64(y_46_re * log(x_46_re)) - t_0))); end return tmp end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = atan2(x_46_im, x_46_re) * y_46_im; t_1 = exp(((y_46_re * log(-x_46_re)) - t_0)); t_2 = sin((y_46_re * atan2(x_46_im, x_46_re))); t_3 = sin((y_46_im * log(hypot(x_46_im, x_46_re)))); tmp = 0.0; if (x_46_re <= -6.5e-77) tmp = t_2 * t_1; elseif (x_46_re <= -4.6e-305) tmp = t_3 * t_1; elseif (x_46_re <= 1.34e-284) tmp = t_2 * exp(((y_46_re * log(-x_46_im)) - t_0)); else tmp = t_3 * exp(((y_46_re * log(x_46_re)) - t_0)); end tmp_2 = tmp; end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[(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[(-x$46$re)], $MachinePrecision]), $MachinePrecision] - t$95$0), $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[Sin[N[(y$46$im * N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[x$46$re, -6.5e-77], N[(t$95$2 * t$95$1), $MachinePrecision], If[LessEqual[x$46$re, -4.6e-305], N[(t$95$3 * t$95$1), $MachinePrecision], If[LessEqual[x$46$re, 1.34e-284], N[(t$95$2 * N[Exp[N[(N[(y$46$re * N[Log[(-x$46$im)], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(t$95$3 * N[Exp[N[(N[(y$46$re * N[Log[x$46$re], $MachinePrecision]), $MachinePrecision] - t$95$0), $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(-x.re\right) - t\_0}\\
t_2 := \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\\
t_3 := \sin \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right)\\
\mathbf{if}\;x.re \leq -6.5 \cdot 10^{-77}:\\
\;\;\;\;t\_2 \cdot t\_1\\
\mathbf{elif}\;x.re \leq -4.6 \cdot 10^{-305}:\\
\;\;\;\;t\_3 \cdot t\_1\\
\mathbf{elif}\;x.re \leq 1.34 \cdot 10^{-284}:\\
\;\;\;\;t\_2 \cdot e^{y.re \cdot \log \left(-x.im\right) - t\_0}\\
\mathbf{else}:\\
\;\;\;\;t\_3 \cdot e^{y.re \cdot \log x.re - t\_0}\\
\end{array}
\end{array}
if x.re < -6.4999999999999999e-77Initial program 38.4%
Taylor expanded in y.im around 0 52.7%
Taylor expanded in x.re around -inf 66.6%
mul-1-neg66.6%
Simplified66.6%
if -6.4999999999999999e-77 < x.re < -4.5999999999999999e-305Initial program 39.5%
Taylor expanded in y.re around 0 35.3%
unpow235.3%
unpow235.3%
hypot-undefine60.3%
Simplified60.3%
Taylor expanded in x.re around -inf 62.1%
mul-1-neg53.4%
Simplified62.1%
if -4.5999999999999999e-305 < x.re < 1.34000000000000003e-284Initial program 50.0%
Taylor expanded in y.im around 0 87.9%
Taylor expanded in x.im around -inf 87.5%
mul-1-neg50.0%
Simplified87.5%
if 1.34000000000000003e-284 < x.re Initial program 33.6%
Taylor expanded in y.re around 0 32.6%
unpow232.6%
unpow232.6%
hypot-undefine56.2%
Simplified56.2%
Taylor expanded in x.re around inf 63.5%
Final simplification64.9%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (* (atan2 x.im x.re) y.im))
(t_1 (* y.re (atan2 x.im x.re)))
(t_2 (sin t_1)))
(if (<= x.im -2.55e-173)
(* t_2 (exp (- (* y.re (log (- x.im))) t_0)))
(if (<= x.im 5.6e-278)
(* t_2 (exp (- (log (pow x.re y.re)) t_0)))
(if (or (<= x.im 3.3e-199) (not (<= x.im 6400000.0)))
(* t_2 (exp (- (* y.re (log x.im)) t_0)))
(*
(pow (hypot x.re x.im) y.re)
(sin (+ t_1 (* y.im (log x.im))))))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = atan2(x_46_im, x_46_re) * y_46_im;
double t_1 = y_46_re * atan2(x_46_im, x_46_re);
double t_2 = sin(t_1);
double tmp;
if (x_46_im <= -2.55e-173) {
tmp = t_2 * exp(((y_46_re * log(-x_46_im)) - t_0));
} else if (x_46_im <= 5.6e-278) {
tmp = t_2 * exp((log(pow(x_46_re, y_46_re)) - t_0));
} else if ((x_46_im <= 3.3e-199) || !(x_46_im <= 6400000.0)) {
tmp = t_2 * exp(((y_46_re * log(x_46_im)) - t_0));
} else {
tmp = pow(hypot(x_46_re, x_46_im), y_46_re) * sin((t_1 + (y_46_im * log(x_46_im))));
}
return tmp;
}
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = Math.atan2(x_46_im, x_46_re) * y_46_im;
double t_1 = y_46_re * Math.atan2(x_46_im, x_46_re);
double t_2 = Math.sin(t_1);
double tmp;
if (x_46_im <= -2.55e-173) {
tmp = t_2 * Math.exp(((y_46_re * Math.log(-x_46_im)) - t_0));
} else if (x_46_im <= 5.6e-278) {
tmp = t_2 * Math.exp((Math.log(Math.pow(x_46_re, y_46_re)) - t_0));
} else if ((x_46_im <= 3.3e-199) || !(x_46_im <= 6400000.0)) {
tmp = t_2 * Math.exp(((y_46_re * Math.log(x_46_im)) - t_0));
} else {
tmp = Math.pow(Math.hypot(x_46_re, x_46_im), y_46_re) * Math.sin((t_1 + (y_46_im * Math.log(x_46_im))));
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): t_0 = math.atan2(x_46_im, x_46_re) * y_46_im t_1 = y_46_re * math.atan2(x_46_im, x_46_re) t_2 = math.sin(t_1) tmp = 0 if x_46_im <= -2.55e-173: tmp = t_2 * math.exp(((y_46_re * math.log(-x_46_im)) - t_0)) elif x_46_im <= 5.6e-278: tmp = t_2 * math.exp((math.log(math.pow(x_46_re, y_46_re)) - t_0)) elif (x_46_im <= 3.3e-199) or not (x_46_im <= 6400000.0): tmp = t_2 * math.exp(((y_46_re * math.log(x_46_im)) - t_0)) else: tmp = math.pow(math.hypot(x_46_re, x_46_im), y_46_re) * math.sin((t_1 + (y_46_im * math.log(x_46_im)))) return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = Float64(atan(x_46_im, x_46_re) * y_46_im) t_1 = Float64(y_46_re * atan(x_46_im, x_46_re)) t_2 = sin(t_1) tmp = 0.0 if (x_46_im <= -2.55e-173) tmp = Float64(t_2 * exp(Float64(Float64(y_46_re * log(Float64(-x_46_im))) - t_0))); elseif (x_46_im <= 5.6e-278) tmp = Float64(t_2 * exp(Float64(log((x_46_re ^ y_46_re)) - t_0))); elseif ((x_46_im <= 3.3e-199) || !(x_46_im <= 6400000.0)) tmp = Float64(t_2 * exp(Float64(Float64(y_46_re * log(x_46_im)) - t_0))); else tmp = Float64((hypot(x_46_re, x_46_im) ^ y_46_re) * sin(Float64(t_1 + Float64(y_46_im * log(x_46_im))))); end return tmp end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = atan2(x_46_im, x_46_re) * y_46_im; t_1 = y_46_re * atan2(x_46_im, x_46_re); t_2 = sin(t_1); tmp = 0.0; if (x_46_im <= -2.55e-173) tmp = t_2 * exp(((y_46_re * log(-x_46_im)) - t_0)); elseif (x_46_im <= 5.6e-278) tmp = t_2 * exp((log((x_46_re ^ y_46_re)) - t_0)); elseif ((x_46_im <= 3.3e-199) || ~((x_46_im <= 6400000.0))) tmp = t_2 * exp(((y_46_re * log(x_46_im)) - t_0)); else tmp = (hypot(x_46_re, x_46_im) ^ y_46_re) * sin((t_1 + (y_46_im * log(x_46_im)))); end tmp_2 = tmp; end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$im), $MachinePrecision]}, Block[{t$95$1 = N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[Sin[t$95$1], $MachinePrecision]}, If[LessEqual[x$46$im, -2.55e-173], N[(t$95$2 * N[Exp[N[(N[(y$46$re * N[Log[(-x$46$im)], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[x$46$im, 5.6e-278], N[(t$95$2 * N[Exp[N[(N[Log[N[Power[x$46$re, y$46$re], $MachinePrecision]], $MachinePrecision] - t$95$0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[x$46$im, 3.3e-199], N[Not[LessEqual[x$46$im, 6400000.0]], $MachinePrecision]], N[(t$95$2 * N[Exp[N[(N[(y$46$re * N[Log[x$46$im], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(N[Power[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision], y$46$re], $MachinePrecision] * N[Sin[N[(t$95$1 + N[(y$46$im * N[Log[x$46$im], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im\\
t_1 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
t_2 := \sin t\_1\\
\mathbf{if}\;x.im \leq -2.55 \cdot 10^{-173}:\\
\;\;\;\;t\_2 \cdot e^{y.re \cdot \log \left(-x.im\right) - t\_0}\\
\mathbf{elif}\;x.im \leq 5.6 \cdot 10^{-278}:\\
\;\;\;\;t\_2 \cdot e^{\log \left({x.re}^{y.re}\right) - t\_0}\\
\mathbf{elif}\;x.im \leq 3.3 \cdot 10^{-199} \lor \neg \left(x.im \leq 6400000\right):\\
\;\;\;\;t\_2 \cdot e^{y.re \cdot \log x.im - t\_0}\\
\mathbf{else}:\\
\;\;\;\;{\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re} \cdot \sin \left(t\_1 + y.im \cdot \log x.im\right)\\
\end{array}
\end{array}
if x.im < -2.5499999999999999e-173Initial program 34.5%
Taylor expanded in y.im around 0 57.5%
Taylor expanded in x.im around -inf 63.4%
mul-1-neg64.9%
Simplified63.4%
if -2.5499999999999999e-173 < x.im < 5.60000000000000015e-278Initial program 50.5%
Taylor expanded in y.im around 0 55.2%
Taylor expanded in x.re around inf 30.2%
add-log-exp30.2%
exp-to-pow53.7%
Applied egg-rr53.7%
if 5.60000000000000015e-278 < x.im < 3.3000000000000002e-199 or 6.4e6 < x.im Initial program 27.1%
Taylor expanded in y.im around 0 49.5%
Taylor expanded in x.re around 0 68.0%
*-commutative68.0%
Simplified68.0%
if 3.3000000000000002e-199 < x.im < 6.4e6Initial program 55.9%
exp-diff52.9%
exp-to-pow52.9%
hypot-define52.9%
*-commutative52.9%
exp-prod51.7%
fma-define51.7%
hypot-define72.9%
*-commutative72.9%
Simplified72.9%
Taylor expanded in x.re around 0 60.9%
Taylor expanded in y.im around 0 62.7%
Final simplification63.7%
(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.re (atan2 x.im x.re)))))
(if (<= x.re -2e-310)
(* t_1 (exp (- (* y.re (log (- x.re))) t_0)))
(* t_1 (exp (- (* y.re (log 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 = atan2(x_46_im, x_46_re) * y_46_im;
double t_1 = sin((y_46_re * atan2(x_46_im, x_46_re)));
double tmp;
if (x_46_re <= -2e-310) {
tmp = t_1 * exp(((y_46_re * log(-x_46_re)) - t_0));
} else {
tmp = t_1 * exp(((y_46_re * log(x_46_re)) - t_0));
}
return tmp;
}
real(8) function code(x_46re, x_46im, y_46re, y_46im)
real(8), intent (in) :: x_46re
real(8), intent (in) :: x_46im
real(8), intent (in) :: y_46re
real(8), intent (in) :: y_46im
real(8) :: t_0
real(8) :: t_1
real(8) :: tmp
t_0 = atan2(x_46im, x_46re) * y_46im
t_1 = sin((y_46re * atan2(x_46im, x_46re)))
if (x_46re <= (-2d-310)) then
tmp = t_1 * exp(((y_46re * log(-x_46re)) - t_0))
else
tmp = t_1 * exp(((y_46re * log(x_46re)) - t_0))
end if
code = tmp
end function
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = Math.atan2(x_46_im, x_46_re) * y_46_im;
double t_1 = Math.sin((y_46_re * Math.atan2(x_46_im, x_46_re)));
double tmp;
if (x_46_re <= -2e-310) {
tmp = t_1 * Math.exp(((y_46_re * Math.log(-x_46_re)) - t_0));
} else {
tmp = t_1 * Math.exp(((y_46_re * Math.log(x_46_re)) - t_0));
}
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_re * math.atan2(x_46_im, x_46_re))) tmp = 0 if x_46_re <= -2e-310: tmp = t_1 * math.exp(((y_46_re * math.log(-x_46_re)) - t_0)) else: tmp = t_1 * math.exp(((y_46_re * math.log(x_46_re)) - t_0)) return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = Float64(atan(x_46_im, x_46_re) * y_46_im) t_1 = sin(Float64(y_46_re * atan(x_46_im, x_46_re))) tmp = 0.0 if (x_46_re <= -2e-310) tmp = Float64(t_1 * exp(Float64(Float64(y_46_re * log(Float64(-x_46_re))) - t_0))); else tmp = Float64(t_1 * exp(Float64(Float64(y_46_re * log(x_46_re)) - t_0))); end return tmp end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = atan2(x_46_im, x_46_re) * y_46_im; t_1 = sin((y_46_re * atan2(x_46_im, x_46_re))); tmp = 0.0; if (x_46_re <= -2e-310) tmp = t_1 * exp(((y_46_re * log(-x_46_re)) - t_0)); else tmp = t_1 * exp(((y_46_re * log(x_46_re)) - t_0)); end tmp_2 = tmp; end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$im), $MachinePrecision]}, Block[{t$95$1 = N[Sin[N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[x$46$re, -2e-310], N[(t$95$1 * N[Exp[N[(N[(y$46$re * N[Log[(-x$46$re)], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(t$95$1 * N[Exp[N[(N[(y$46$re * N[Log[x$46$re], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im\\
t_1 := \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\\
\mathbf{if}\;x.re \leq -2 \cdot 10^{-310}:\\
\;\;\;\;t\_1 \cdot e^{y.re \cdot \log \left(-x.re\right) - t\_0}\\
\mathbf{else}:\\
\;\;\;\;t\_1 \cdot e^{y.re \cdot \log x.re - t\_0}\\
\end{array}
\end{array}
if x.re < -1.999999999999994e-310Initial program 38.3%
Taylor expanded in y.im around 0 55.9%
Taylor expanded in x.re around -inf 61.8%
mul-1-neg61.8%
Simplified61.8%
if -1.999999999999994e-310 < x.re Initial program 35.2%
Taylor expanded in y.im around 0 51.5%
Taylor expanded in x.re around inf 55.7%
Final simplification58.9%
(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.re (atan2 x.im x.re)))))
(if (<= x.im -5e-310)
(* t_1 (exp (- (* y.re (log (- x.im))) t_0)))
(* t_1 (exp (- (* y.re (log x.im)) t_0))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = atan2(x_46_im, x_46_re) * y_46_im;
double t_1 = sin((y_46_re * atan2(x_46_im, x_46_re)));
double tmp;
if (x_46_im <= -5e-310) {
tmp = t_1 * exp(((y_46_re * log(-x_46_im)) - t_0));
} else {
tmp = t_1 * exp(((y_46_re * log(x_46_im)) - t_0));
}
return tmp;
}
real(8) function code(x_46re, x_46im, y_46re, y_46im)
real(8), intent (in) :: x_46re
real(8), intent (in) :: x_46im
real(8), intent (in) :: y_46re
real(8), intent (in) :: y_46im
real(8) :: t_0
real(8) :: t_1
real(8) :: tmp
t_0 = atan2(x_46im, x_46re) * y_46im
t_1 = sin((y_46re * atan2(x_46im, x_46re)))
if (x_46im <= (-5d-310)) then
tmp = t_1 * exp(((y_46re * log(-x_46im)) - t_0))
else
tmp = t_1 * exp(((y_46re * log(x_46im)) - t_0))
end if
code = tmp
end function
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = Math.atan2(x_46_im, x_46_re) * y_46_im;
double t_1 = Math.sin((y_46_re * Math.atan2(x_46_im, x_46_re)));
double tmp;
if (x_46_im <= -5e-310) {
tmp = t_1 * Math.exp(((y_46_re * Math.log(-x_46_im)) - t_0));
} else {
tmp = t_1 * Math.exp(((y_46_re * Math.log(x_46_im)) - t_0));
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): t_0 = math.atan2(x_46_im, x_46_re) * y_46_im t_1 = math.sin((y_46_re * math.atan2(x_46_im, x_46_re))) tmp = 0 if x_46_im <= -5e-310: tmp = t_1 * math.exp(((y_46_re * math.log(-x_46_im)) - t_0)) else: tmp = t_1 * math.exp(((y_46_re * math.log(x_46_im)) - t_0)) return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = Float64(atan(x_46_im, x_46_re) * y_46_im) t_1 = sin(Float64(y_46_re * atan(x_46_im, x_46_re))) tmp = 0.0 if (x_46_im <= -5e-310) tmp = Float64(t_1 * exp(Float64(Float64(y_46_re * log(Float64(-x_46_im))) - t_0))); else tmp = Float64(t_1 * exp(Float64(Float64(y_46_re * log(x_46_im)) - t_0))); end return tmp end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = atan2(x_46_im, x_46_re) * y_46_im; t_1 = sin((y_46_re * atan2(x_46_im, x_46_re))); tmp = 0.0; if (x_46_im <= -5e-310) tmp = t_1 * exp(((y_46_re * log(-x_46_im)) - t_0)); else tmp = t_1 * exp(((y_46_re * log(x_46_im)) - t_0)); end tmp_2 = tmp; end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$im), $MachinePrecision]}, Block[{t$95$1 = N[Sin[N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[x$46$im, -5e-310], N[(t$95$1 * N[Exp[N[(N[(y$46$re * N[Log[(-x$46$im)], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(t$95$1 * N[Exp[N[(N[(y$46$re * N[Log[x$46$im], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im\\
t_1 := \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\\
\mathbf{if}\;x.im \leq -5 \cdot 10^{-310}:\\
\;\;\;\;t\_1 \cdot e^{y.re \cdot \log \left(-x.im\right) - t\_0}\\
\mathbf{else}:\\
\;\;\;\;t\_1 \cdot e^{y.re \cdot \log x.im - t\_0}\\
\end{array}
\end{array}
if x.im < -4.999999999999985e-310Initial program 38.8%
Taylor expanded in y.im around 0 58.5%
Taylor expanded in x.im around -inf 57.7%
mul-1-neg60.3%
Simplified57.7%
if -4.999999999999985e-310 < x.im Initial program 34.9%
Taylor expanded in y.im around 0 49.4%
Taylor expanded in x.re around 0 59.0%
*-commutative59.0%
Simplified59.0%
Final simplification58.4%
(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.re (atan2 x.im x.re)))))
(if (<= x.im -5e-310)
(* t_1 (exp (- (* y.re (log x.re)) t_0)))
(* t_1 (exp (- (* y.re (log x.im)) t_0))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = atan2(x_46_im, x_46_re) * y_46_im;
double t_1 = sin((y_46_re * atan2(x_46_im, x_46_re)));
double tmp;
if (x_46_im <= -5e-310) {
tmp = t_1 * exp(((y_46_re * log(x_46_re)) - t_0));
} else {
tmp = t_1 * exp(((y_46_re * log(x_46_im)) - t_0));
}
return tmp;
}
real(8) function code(x_46re, x_46im, y_46re, y_46im)
real(8), intent (in) :: x_46re
real(8), intent (in) :: x_46im
real(8), intent (in) :: y_46re
real(8), intent (in) :: y_46im
real(8) :: t_0
real(8) :: t_1
real(8) :: tmp
t_0 = atan2(x_46im, x_46re) * y_46im
t_1 = sin((y_46re * atan2(x_46im, x_46re)))
if (x_46im <= (-5d-310)) then
tmp = t_1 * exp(((y_46re * log(x_46re)) - t_0))
else
tmp = t_1 * exp(((y_46re * log(x_46im)) - t_0))
end if
code = tmp
end function
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = Math.atan2(x_46_im, x_46_re) * y_46_im;
double t_1 = Math.sin((y_46_re * Math.atan2(x_46_im, x_46_re)));
double tmp;
if (x_46_im <= -5e-310) {
tmp = t_1 * Math.exp(((y_46_re * Math.log(x_46_re)) - t_0));
} else {
tmp = t_1 * Math.exp(((y_46_re * Math.log(x_46_im)) - t_0));
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): t_0 = math.atan2(x_46_im, x_46_re) * y_46_im t_1 = math.sin((y_46_re * math.atan2(x_46_im, x_46_re))) tmp = 0 if x_46_im <= -5e-310: tmp = t_1 * math.exp(((y_46_re * math.log(x_46_re)) - t_0)) else: tmp = t_1 * math.exp(((y_46_re * math.log(x_46_im)) - t_0)) return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = Float64(atan(x_46_im, x_46_re) * y_46_im) t_1 = sin(Float64(y_46_re * atan(x_46_im, x_46_re))) tmp = 0.0 if (x_46_im <= -5e-310) tmp = Float64(t_1 * exp(Float64(Float64(y_46_re * log(x_46_re)) - t_0))); else tmp = Float64(t_1 * exp(Float64(Float64(y_46_re * log(x_46_im)) - t_0))); end return tmp end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = atan2(x_46_im, x_46_re) * y_46_im; t_1 = sin((y_46_re * atan2(x_46_im, x_46_re))); tmp = 0.0; if (x_46_im <= -5e-310) tmp = t_1 * exp(((y_46_re * log(x_46_re)) - t_0)); else tmp = t_1 * exp(((y_46_re * log(x_46_im)) - t_0)); end tmp_2 = tmp; end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$im), $MachinePrecision]}, Block[{t$95$1 = N[Sin[N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[x$46$im, -5e-310], N[(t$95$1 * N[Exp[N[(N[(y$46$re * N[Log[x$46$re], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(t$95$1 * N[Exp[N[(N[(y$46$re * N[Log[x$46$im], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im\\
t_1 := \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\\
\mathbf{if}\;x.im \leq -5 \cdot 10^{-310}:\\
\;\;\;\;t\_1 \cdot e^{y.re \cdot \log x.re - t\_0}\\
\mathbf{else}:\\
\;\;\;\;t\_1 \cdot e^{y.re \cdot \log x.im - t\_0}\\
\end{array}
\end{array}
if x.im < -4.999999999999985e-310Initial program 38.8%
Taylor expanded in y.im around 0 58.5%
Taylor expanded in x.re around inf 27.3%
if -4.999999999999985e-310 < x.im Initial program 34.9%
Taylor expanded in y.im around 0 49.4%
Taylor expanded in x.re around 0 59.0%
*-commutative59.0%
Simplified59.0%
Final simplification43.7%
(FPCore (x.re x.im y.re y.im) :precision binary64 (* (sin (* y.re (atan2 x.im x.re))) (exp (- (* y.re (log x.im)) (* (atan2 x.im x.re) y.im)))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
return sin((y_46_re * atan2(x_46_im, x_46_re))) * exp(((y_46_re * log(x_46_im)) - (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))) * exp(((y_46re * log(x_46im)) - (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))) * Math.exp(((y_46_re * Math.log(x_46_im)) - (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))) * math.exp(((y_46_re * math.log(x_46_im)) - (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))) * exp(Float64(Float64(y_46_re * log(x_46_im)) - 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))) * exp(((y_46_re * log(x_46_im)) - (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[Exp[N[(N[(y$46$re * N[Log[x$46$im], $MachinePrecision]), $MachinePrecision] - N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot e^{y.re \cdot \log x.im - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}
\end{array}
Initial program 36.8%
Taylor expanded in y.im around 0 53.8%
Taylor expanded in x.re around 0 30.4%
*-commutative30.4%
Simplified30.4%
Final simplification30.4%
herbie shell --seed 2024100
(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)))))