
(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 23 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (log (sqrt (+ (* x.re x.re) (* x.im x.im))))))
(*
(exp (- (* t_0 y.re) (* (atan2 x.im x.re) y.im)))
(sin (+ (* t_0 y.im) (* (atan2 x.im x.re) y.re))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))));
return exp(((t_0 * y_46_re) - (atan2(x_46_im, x_46_re) * y_46_im))) * sin(((t_0 * y_46_im) + (atan2(x_46_im, x_46_re) * y_46_re)));
}
real(8) function code(x_46re, x_46im, y_46re, y_46im)
real(8), intent (in) :: x_46re
real(8), intent (in) :: x_46im
real(8), intent (in) :: y_46re
real(8), intent (in) :: y_46im
real(8) :: t_0
t_0 = log(sqrt(((x_46re * x_46re) + (x_46im * x_46im))))
code = exp(((t_0 * y_46re) - (atan2(x_46im, x_46re) * y_46im))) * sin(((t_0 * y_46im) + (atan2(x_46im, x_46re) * y_46re)))
end function
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = Math.log(Math.sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))));
return Math.exp(((t_0 * y_46_re) - (Math.atan2(x_46_im, x_46_re) * y_46_im))) * Math.sin(((t_0 * y_46_im) + (Math.atan2(x_46_im, x_46_re) * y_46_re)));
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): t_0 = math.log(math.sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im)))) return math.exp(((t_0 * y_46_re) - (math.atan2(x_46_im, x_46_re) * y_46_im))) * math.sin(((t_0 * y_46_im) + (math.atan2(x_46_im, x_46_re) * y_46_re)))
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = log(sqrt(Float64(Float64(x_46_re * x_46_re) + Float64(x_46_im * x_46_im)))) return Float64(exp(Float64(Float64(t_0 * y_46_re) - Float64(atan(x_46_im, x_46_re) * y_46_im))) * sin(Float64(Float64(t_0 * y_46_im) + Float64(atan(x_46_im, x_46_re) * y_46_re)))) end
function tmp = code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im)))); tmp = exp(((t_0 * y_46_re) - (atan2(x_46_im, x_46_re) * y_46_im))) * sin(((t_0 * y_46_im) + (atan2(x_46_im, x_46_re) * y_46_re))); end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[Log[N[Sqrt[N[(N[(x$46$re * x$46$re), $MachinePrecision] + N[(x$46$im * x$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]}, N[(N[Exp[N[(N[(t$95$0 * y$46$re), $MachinePrecision] - N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Sin[N[(N[(t$95$0 * y$46$im), $MachinePrecision] + N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$re), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right)\\
e^{t\_0 \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \sin \left(t\_0 \cdot y.im + \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)
\end{array}
\end{array}
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (log (hypot x.im x.re)))
(t_1
(exp
(fma (log (hypot x.re x.im)) y.re (* (atan2 x.im x.re) (- y.im))))))
(if (<= y.im -6e+61)
(* t_1 (sin (* y.im (+ t_0 (* (atan2 x.im x.re) (/ y.re y.im))))))
(if (<= y.im 5e+62)
(* t_1 (sin (* y.re (+ (atan2 x.im x.re) (* y.im (/ t_0 y.re))))))
(*
t_1
(sin (* y.im (+ t_0 (* y.re (* (atan2 x.im x.re) (/ 1.0 y.im)))))))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = log(hypot(x_46_im, x_46_re));
double t_1 = exp(fma(log(hypot(x_46_re, x_46_im)), y_46_re, (atan2(x_46_im, x_46_re) * -y_46_im)));
double tmp;
if (y_46_im <= -6e+61) {
tmp = t_1 * sin((y_46_im * (t_0 + (atan2(x_46_im, x_46_re) * (y_46_re / y_46_im)))));
} else if (y_46_im <= 5e+62) {
tmp = t_1 * sin((y_46_re * (atan2(x_46_im, x_46_re) + (y_46_im * (t_0 / y_46_re)))));
} else {
tmp = t_1 * sin((y_46_im * (t_0 + (y_46_re * (atan2(x_46_im, x_46_re) * (1.0 / y_46_im))))));
}
return tmp;
}
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = log(hypot(x_46_im, x_46_re)) t_1 = exp(fma(log(hypot(x_46_re, x_46_im)), y_46_re, Float64(atan(x_46_im, x_46_re) * Float64(-y_46_im)))) tmp = 0.0 if (y_46_im <= -6e+61) tmp = Float64(t_1 * sin(Float64(y_46_im * Float64(t_0 + Float64(atan(x_46_im, x_46_re) * Float64(y_46_re / y_46_im)))))); elseif (y_46_im <= 5e+62) tmp = Float64(t_1 * sin(Float64(y_46_re * Float64(atan(x_46_im, x_46_re) + Float64(y_46_im * Float64(t_0 / y_46_re)))))); else tmp = Float64(t_1 * sin(Float64(y_46_im * Float64(t_0 + Float64(y_46_re * Float64(atan(x_46_im, x_46_re) * Float64(1.0 / y_46_im))))))); end return tmp end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]}, Block[{t$95$1 = N[Exp[N[(N[Log[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision]], $MachinePrecision] * y$46$re + N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * (-y$46$im)), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[y$46$im, -6e+61], N[(t$95$1 * N[Sin[N[(y$46$im * N[(t$95$0 + N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * N[(y$46$re / y$46$im), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$im, 5e+62], 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[(t$95$0 / y$46$re), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(t$95$1 * N[Sin[N[(y$46$im * N[(t$95$0 + N[(y$46$re * N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * N[(1.0 / y$46$im), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\\
t_1 := e^{\mathsf{fma}\left(\log \left(\mathsf{hypot}\left(x.re, x.im\right)\right), y.re, \tan^{-1}_* \frac{x.im}{x.re} \cdot \left(-y.im\right)\right)}\\
\mathbf{if}\;y.im \leq -6 \cdot 10^{+61}:\\
\;\;\;\;t\_1 \cdot \sin \left(y.im \cdot \left(t\_0 + \tan^{-1}_* \frac{x.im}{x.re} \cdot \frac{y.re}{y.im}\right)\right)\\
\mathbf{elif}\;y.im \leq 5 \cdot 10^{+62}:\\
\;\;\;\;t\_1 \cdot \sin \left(y.re \cdot \left(\tan^{-1}_* \frac{x.im}{x.re} + y.im \cdot \frac{t\_0}{y.re}\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1 \cdot \sin \left(y.im \cdot \left(t\_0 + y.re \cdot \left(\tan^{-1}_* \frac{x.im}{x.re} \cdot \frac{1}{y.im}\right)\right)\right)\\
\end{array}
\end{array}
if y.im < -6e61Initial program 30.7%
cancel-sign-sub-inv30.7%
fma-define30.7%
hypot-define30.7%
distribute-lft-neg-in30.7%
distribute-rgt-neg-out30.7%
fma-define30.7%
hypot-define64.4%
*-commutative64.4%
Simplified64.4%
Taylor expanded in y.im around inf 30.7%
unpow230.7%
unpow230.7%
hypot-undefine64.4%
associate-/l*64.4%
Simplified64.4%
clear-num62.5%
inv-pow62.5%
Applied egg-rr62.5%
unpow-162.5%
Simplified62.5%
*-un-lft-identity62.5%
+-commutative62.5%
un-div-inv64.4%
Applied egg-rr64.4%
*-lft-identity64.4%
+-commutative64.4%
associate-/r/66.3%
Simplified66.3%
if -6e61 < y.im < 5.00000000000000029e62Initial program 45.1%
cancel-sign-sub-inv45.1%
fma-define45.1%
hypot-define45.1%
distribute-lft-neg-in45.1%
distribute-rgt-neg-out45.1%
fma-define45.1%
hypot-define87.6%
*-commutative87.6%
Simplified87.6%
Taylor expanded in y.re around inf 45.1%
+-commutative45.1%
associate-/l*45.8%
unpow245.8%
unpow245.8%
hypot-undefine88.8%
Simplified88.8%
if 5.00000000000000029e62 < y.im Initial program 31.6%
cancel-sign-sub-inv31.6%
fma-define31.6%
hypot-define31.6%
distribute-lft-neg-in31.6%
distribute-rgt-neg-out31.6%
fma-define31.6%
hypot-define72.3%
*-commutative72.3%
Simplified72.3%
Taylor expanded in y.im around inf 31.6%
unpow231.6%
unpow231.6%
hypot-undefine72.3%
associate-/l*72.3%
Simplified72.3%
div-inv72.3%
Applied egg-rr72.3%
Final simplification80.5%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (* y.re (atan2 x.im x.re)))
(t_1 (log (sqrt (+ (* x.re x.re) (* x.im x.im)))))
(t_2
(*
(exp (- (* y.re t_1) (* (atan2 x.im x.re) y.im)))
(sin (+ t_0 (* y.im t_1))))))
(if (<= t_2 0.05)
t_2
(*
(exp (fma (log (hypot x.re x.im)) y.re (* (atan2 x.im x.re) (- y.im))))
(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 = log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))));
double t_2 = exp(((y_46_re * t_1) - (atan2(x_46_im, x_46_re) * y_46_im))) * sin((t_0 + (y_46_im * t_1)));
double tmp;
if (t_2 <= 0.05) {
tmp = t_2;
} else {
tmp = exp(fma(log(hypot(x_46_re, x_46_im)), y_46_re, (atan2(x_46_im, x_46_re) * -y_46_im))) * 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 = log(sqrt(Float64(Float64(x_46_re * x_46_re) + Float64(x_46_im * x_46_im)))) t_2 = Float64(exp(Float64(Float64(y_46_re * t_1) - Float64(atan(x_46_im, x_46_re) * y_46_im))) * sin(Float64(t_0 + Float64(y_46_im * t_1)))) tmp = 0.0 if (t_2 <= 0.05) tmp = t_2; else tmp = Float64(exp(fma(log(hypot(x_46_re, x_46_im)), y_46_re, Float64(atan(x_46_im, x_46_re) * Float64(-y_46_im)))) * 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[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[(N[Exp[N[(N[(y$46$re * t$95$1), $MachinePrecision] - N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Sin[N[(t$95$0 + N[(y$46$im * t$95$1), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$2, 0.05], t$95$2, N[(N[Exp[N[(N[Log[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision]], $MachinePrecision] * y$46$re + N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * (-y$46$im)), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * 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 := \log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right)\\
t_2 := e^{y.re \cdot t\_1 - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \sin \left(t\_0 + y.im \cdot t\_1\right)\\
\mathbf{if}\;t\_2 \leq 0.05:\\
\;\;\;\;t\_2\\
\mathbf{else}:\\
\;\;\;\;e^{\mathsf{fma}\left(\log \left(\mathsf{hypot}\left(x.re, x.im\right)\right), y.re, \tan^{-1}_* \frac{x.im}{x.re} \cdot \left(-y.im\right)\right)} \cdot \sin t\_0\\
\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.050000000000000003Initial program 86.6%
if 0.050000000000000003 < (*.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 6.6%
cancel-sign-sub-inv6.6%
fma-define6.6%
hypot-define6.6%
distribute-lft-neg-in6.6%
distribute-rgt-neg-out6.6%
fma-define6.6%
hypot-define74.5%
*-commutative74.5%
Simplified74.5%
Taylor expanded in y.im around inf 5.3%
unpow25.3%
unpow25.3%
hypot-undefine69.2%
associate-/l*69.2%
Simplified69.2%
Taylor expanded in y.im around 0 60.3%
Final simplification71.0%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (log (hypot x.re x.im))))
(*
(exp (fma t_0 y.re (* (atan2 x.im x.re) (- y.im))))
(sin (fma t_0 y.im (* y.re (atan2 x.im x.re)))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = log(hypot(x_46_re, x_46_im));
return exp(fma(t_0, y_46_re, (atan2(x_46_im, x_46_re) * -y_46_im))) * sin(fma(t_0, y_46_im, (y_46_re * atan2(x_46_im, x_46_re))));
}
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = log(hypot(x_46_re, x_46_im)) return Float64(exp(fma(t_0, y_46_re, Float64(atan(x_46_im, x_46_re) * Float64(-y_46_im)))) * sin(fma(t_0, y_46_im, Float64(y_46_re * atan(x_46_im, x_46_re))))) end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[Log[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision]], $MachinePrecision]}, N[(N[Exp[N[(t$95$0 * y$46$re + N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * (-y$46$im)), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Sin[N[(t$95$0 * y$46$im + N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \log \left(\mathsf{hypot}\left(x.re, x.im\right)\right)\\
e^{\mathsf{fma}\left(t\_0, y.re, \tan^{-1}_* \frac{x.im}{x.re} \cdot \left(-y.im\right)\right)} \cdot \sin \left(\mathsf{fma}\left(t\_0, y.im, y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)
\end{array}
\end{array}
Initial program 39.1%
cancel-sign-sub-inv39.1%
fma-define39.1%
hypot-define39.1%
distribute-lft-neg-in39.1%
distribute-rgt-neg-out39.1%
fma-define39.1%
hypot-define79.4%
*-commutative79.4%
Simplified79.4%
Final simplification79.4%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (log (hypot x.im x.re))))
(if (or (<= y.im -0.01) (not (<= y.im 4.2e-25)))
(*
(exp (fma (log (hypot x.re x.im)) y.re (* (atan2 x.im x.re) (- y.im))))
(sin (* y.im (+ t_0 (* y.re (/ (atan2 x.im x.re) y.im))))))
(*
(sin (* y.re (+ (atan2 x.im x.re) (* y.im (/ t_0 y.re)))))
(/ (pow (hypot x.re x.im) y.re) (pow (exp y.im) (atan2 x.im x.re)))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = log(hypot(x_46_im, x_46_re));
double tmp;
if ((y_46_im <= -0.01) || !(y_46_im <= 4.2e-25)) {
tmp = exp(fma(log(hypot(x_46_re, x_46_im)), y_46_re, (atan2(x_46_im, x_46_re) * -y_46_im))) * sin((y_46_im * (t_0 + (y_46_re * (atan2(x_46_im, x_46_re) / y_46_im)))));
} else {
tmp = sin((y_46_re * (atan2(x_46_im, x_46_re) + (y_46_im * (t_0 / y_46_re))))) * (pow(hypot(x_46_re, x_46_im), y_46_re) / pow(exp(y_46_im), atan2(x_46_im, x_46_re)));
}
return tmp;
}
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = log(hypot(x_46_im, x_46_re)) tmp = 0.0 if ((y_46_im <= -0.01) || !(y_46_im <= 4.2e-25)) tmp = Float64(exp(fma(log(hypot(x_46_re, x_46_im)), y_46_re, Float64(atan(x_46_im, x_46_re) * Float64(-y_46_im)))) * sin(Float64(y_46_im * Float64(t_0 + Float64(y_46_re * Float64(atan(x_46_im, x_46_re) / y_46_im)))))); else tmp = Float64(sin(Float64(y_46_re * Float64(atan(x_46_im, x_46_re) + Float64(y_46_im * Float64(t_0 / y_46_re))))) * Float64((hypot(x_46_re, x_46_im) ^ y_46_re) / (exp(y_46_im) ^ atan(x_46_im, x_46_re)))); end return tmp end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]}, If[Or[LessEqual[y$46$im, -0.01], N[Not[LessEqual[y$46$im, 4.2e-25]], $MachinePrecision]], N[(N[Exp[N[(N[Log[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision]], $MachinePrecision] * y$46$re + N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * (-y$46$im)), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Sin[N[(y$46$im * N[(t$95$0 + N[(y$46$re * N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] / y$46$im), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(N[Sin[N[(y$46$re * N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] + N[(y$46$im * N[(t$95$0 / y$46$re), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(N[Power[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision], y$46$re], $MachinePrecision] / N[Power[N[Exp[y$46$im], $MachinePrecision], N[ArcTan[x$46$im / x$46$re], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\\
\mathbf{if}\;y.im \leq -0.01 \lor \neg \left(y.im \leq 4.2 \cdot 10^{-25}\right):\\
\;\;\;\;e^{\mathsf{fma}\left(\log \left(\mathsf{hypot}\left(x.re, x.im\right)\right), y.re, \tan^{-1}_* \frac{x.im}{x.re} \cdot \left(-y.im\right)\right)} \cdot \sin \left(y.im \cdot \left(t\_0 + y.re \cdot \frac{\tan^{-1}_* \frac{x.im}{x.re}}{y.im}\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\sin \left(y.re \cdot \left(\tan^{-1}_* \frac{x.im}{x.re} + y.im \cdot \frac{t\_0}{y.re}\right)\right) \cdot \frac{{\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re}}{{\left(e^{y.im}\right)}^{\tan^{-1}_* \frac{x.im}{x.re}}}\\
\end{array}
\end{array}
if y.im < -0.0100000000000000002 or 4.20000000000000005e-25 < y.im Initial program 33.3%
cancel-sign-sub-inv33.3%
fma-define33.3%
hypot-define33.3%
distribute-lft-neg-in33.3%
distribute-rgt-neg-out33.3%
fma-define33.3%
hypot-define71.5%
*-commutative71.5%
Simplified71.5%
Taylor expanded in y.im around inf 34.0%
unpow234.0%
unpow234.0%
hypot-undefine72.2%
associate-/l*72.2%
Simplified72.2%
if -0.0100000000000000002 < y.im < 4.20000000000000005e-25Initial program 46.4%
exp-diff46.4%
exp-to-pow46.4%
hypot-define46.4%
*-commutative46.4%
exp-prod46.4%
fma-define46.4%
hypot-define89.2%
*-commutative89.2%
Simplified89.2%
Taylor expanded in y.re around inf 46.4%
+-commutative46.4%
associate-/l*46.4%
unpow246.4%
unpow246.4%
hypot-undefine88.3%
Simplified88.3%
Final simplification79.4%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (log (hypot x.im x.re)))
(t_1
(exp
(fma (log (hypot x.re x.im)) y.re (* (atan2 x.im x.re) (- y.im))))))
(if (<= y.im -0.00029)
(* t_1 (sin (* y.im (+ t_0 (/ y.re (/ y.im (atan2 x.im x.re)))))))
(if (<= y.im 1.2e-24)
(*
(sin (* y.re (+ (atan2 x.im x.re) (* y.im (/ t_0 y.re)))))
(/ (pow (hypot x.re x.im) y.re) (pow (exp y.im) (atan2 x.im x.re))))
(* t_1 (sin (* y.im (+ t_0 (* y.re (/ (atan2 x.im x.re) y.im))))))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = log(hypot(x_46_im, x_46_re));
double t_1 = exp(fma(log(hypot(x_46_re, x_46_im)), y_46_re, (atan2(x_46_im, x_46_re) * -y_46_im)));
double tmp;
if (y_46_im <= -0.00029) {
tmp = t_1 * sin((y_46_im * (t_0 + (y_46_re / (y_46_im / atan2(x_46_im, x_46_re))))));
} else if (y_46_im <= 1.2e-24) {
tmp = sin((y_46_re * (atan2(x_46_im, x_46_re) + (y_46_im * (t_0 / y_46_re))))) * (pow(hypot(x_46_re, x_46_im), y_46_re) / pow(exp(y_46_im), atan2(x_46_im, x_46_re)));
} else {
tmp = t_1 * sin((y_46_im * (t_0 + (y_46_re * (atan2(x_46_im, x_46_re) / y_46_im)))));
}
return tmp;
}
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = log(hypot(x_46_im, x_46_re)) t_1 = exp(fma(log(hypot(x_46_re, x_46_im)), y_46_re, Float64(atan(x_46_im, x_46_re) * Float64(-y_46_im)))) tmp = 0.0 if (y_46_im <= -0.00029) tmp = Float64(t_1 * sin(Float64(y_46_im * Float64(t_0 + Float64(y_46_re / Float64(y_46_im / atan(x_46_im, x_46_re))))))); elseif (y_46_im <= 1.2e-24) tmp = Float64(sin(Float64(y_46_re * Float64(atan(x_46_im, x_46_re) + Float64(y_46_im * Float64(t_0 / y_46_re))))) * Float64((hypot(x_46_re, x_46_im) ^ y_46_re) / (exp(y_46_im) ^ atan(x_46_im, x_46_re)))); else tmp = Float64(t_1 * sin(Float64(y_46_im * Float64(t_0 + Float64(y_46_re * Float64(atan(x_46_im, x_46_re) / y_46_im)))))); end return tmp end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]}, Block[{t$95$1 = N[Exp[N[(N[Log[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision]], $MachinePrecision] * y$46$re + N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * (-y$46$im)), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[y$46$im, -0.00029], N[(t$95$1 * N[Sin[N[(y$46$im * N[(t$95$0 + N[(y$46$re / N[(y$46$im / N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$im, 1.2e-24], N[(N[Sin[N[(y$46$re * N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] + N[(y$46$im * N[(t$95$0 / y$46$re), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(N[Power[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision], y$46$re], $MachinePrecision] / N[Power[N[Exp[y$46$im], $MachinePrecision], N[ArcTan[x$46$im / x$46$re], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t$95$1 * N[Sin[N[(y$46$im * N[(t$95$0 + N[(y$46$re * N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] / y$46$im), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\\
t_1 := e^{\mathsf{fma}\left(\log \left(\mathsf{hypot}\left(x.re, x.im\right)\right), y.re, \tan^{-1}_* \frac{x.im}{x.re} \cdot \left(-y.im\right)\right)}\\
\mathbf{if}\;y.im \leq -0.00029:\\
\;\;\;\;t\_1 \cdot \sin \left(y.im \cdot \left(t\_0 + \frac{y.re}{\frac{y.im}{\tan^{-1}_* \frac{x.im}{x.re}}}\right)\right)\\
\mathbf{elif}\;y.im \leq 1.2 \cdot 10^{-24}:\\
\;\;\;\;\sin \left(y.re \cdot \left(\tan^{-1}_* \frac{x.im}{x.re} + y.im \cdot \frac{t\_0}{y.re}\right)\right) \cdot \frac{{\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re}}{{\left(e^{y.im}\right)}^{\tan^{-1}_* \frac{x.im}{x.re}}}\\
\mathbf{else}:\\
\;\;\;\;t\_1 \cdot \sin \left(y.im \cdot \left(t\_0 + y.re \cdot \frac{\tan^{-1}_* \frac{x.im}{x.re}}{y.im}\right)\right)\\
\end{array}
\end{array}
if y.im < -2.9e-4Initial program 30.7%
cancel-sign-sub-inv30.7%
fma-define30.7%
hypot-define30.7%
distribute-lft-neg-in30.7%
distribute-rgt-neg-out30.7%
fma-define30.7%
hypot-define65.3%
*-commutative65.3%
Simplified65.3%
Taylor expanded in y.im around inf 32.2%
unpow232.2%
unpow232.2%
hypot-undefine66.9%
associate-/l*66.9%
Simplified66.9%
clear-num65.3%
inv-pow65.3%
Applied egg-rr65.3%
unpow-165.3%
Simplified65.3%
un-div-inv68.4%
Applied egg-rr68.4%
if -2.9e-4 < y.im < 1.1999999999999999e-24Initial program 46.4%
exp-diff46.4%
exp-to-pow46.4%
hypot-define46.4%
*-commutative46.4%
exp-prod46.4%
fma-define46.4%
hypot-define89.2%
*-commutative89.2%
Simplified89.2%
Taylor expanded in y.re around inf 46.4%
+-commutative46.4%
associate-/l*46.4%
unpow246.4%
unpow246.4%
hypot-undefine88.3%
Simplified88.3%
if 1.1999999999999999e-24 < y.im Initial program 35.5%
cancel-sign-sub-inv35.5%
fma-define35.5%
hypot-define35.5%
distribute-lft-neg-in35.5%
distribute-rgt-neg-out35.5%
fma-define35.5%
hypot-define76.9%
*-commutative76.9%
Simplified76.9%
Taylor expanded in y.im around inf 35.5%
unpow235.5%
unpow235.5%
hypot-undefine76.9%
associate-/l*76.9%
Simplified76.9%
Final simplification79.8%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (log (hypot x.im x.re)))
(t_1
(exp
(fma (log (hypot x.re x.im)) y.re (* (atan2 x.im x.re) (- y.im))))))
(if (<= y.im -2.85e+57)
(* t_1 (sin (* y.im (+ t_0 (* (atan2 x.im x.re) (/ y.re y.im))))))
(if (<= y.im 2.1e+62)
(* t_1 (sin (* y.re (+ (atan2 x.im x.re) (* y.im (/ t_0 y.re))))))
(* t_1 (sin (* y.im (+ t_0 (* y.re (/ (atan2 x.im x.re) y.im))))))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = log(hypot(x_46_im, x_46_re));
double t_1 = exp(fma(log(hypot(x_46_re, x_46_im)), y_46_re, (atan2(x_46_im, x_46_re) * -y_46_im)));
double tmp;
if (y_46_im <= -2.85e+57) {
tmp = t_1 * sin((y_46_im * (t_0 + (atan2(x_46_im, x_46_re) * (y_46_re / y_46_im)))));
} else if (y_46_im <= 2.1e+62) {
tmp = t_1 * sin((y_46_re * (atan2(x_46_im, x_46_re) + (y_46_im * (t_0 / y_46_re)))));
} else {
tmp = t_1 * sin((y_46_im * (t_0 + (y_46_re * (atan2(x_46_im, x_46_re) / y_46_im)))));
}
return tmp;
}
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = log(hypot(x_46_im, x_46_re)) t_1 = exp(fma(log(hypot(x_46_re, x_46_im)), y_46_re, Float64(atan(x_46_im, x_46_re) * Float64(-y_46_im)))) tmp = 0.0 if (y_46_im <= -2.85e+57) tmp = Float64(t_1 * sin(Float64(y_46_im * Float64(t_0 + Float64(atan(x_46_im, x_46_re) * Float64(y_46_re / y_46_im)))))); elseif (y_46_im <= 2.1e+62) tmp = Float64(t_1 * sin(Float64(y_46_re * Float64(atan(x_46_im, x_46_re) + Float64(y_46_im * Float64(t_0 / y_46_re)))))); else tmp = Float64(t_1 * sin(Float64(y_46_im * Float64(t_0 + Float64(y_46_re * Float64(atan(x_46_im, x_46_re) / y_46_im)))))); end return tmp end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]}, Block[{t$95$1 = N[Exp[N[(N[Log[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision]], $MachinePrecision] * y$46$re + N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * (-y$46$im)), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[y$46$im, -2.85e+57], N[(t$95$1 * N[Sin[N[(y$46$im * N[(t$95$0 + N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * N[(y$46$re / y$46$im), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$im, 2.1e+62], 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[(t$95$0 / y$46$re), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(t$95$1 * N[Sin[N[(y$46$im * N[(t$95$0 + N[(y$46$re * N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] / y$46$im), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\\
t_1 := e^{\mathsf{fma}\left(\log \left(\mathsf{hypot}\left(x.re, x.im\right)\right), y.re, \tan^{-1}_* \frac{x.im}{x.re} \cdot \left(-y.im\right)\right)}\\
\mathbf{if}\;y.im \leq -2.85 \cdot 10^{+57}:\\
\;\;\;\;t\_1 \cdot \sin \left(y.im \cdot \left(t\_0 + \tan^{-1}_* \frac{x.im}{x.re} \cdot \frac{y.re}{y.im}\right)\right)\\
\mathbf{elif}\;y.im \leq 2.1 \cdot 10^{+62}:\\
\;\;\;\;t\_1 \cdot \sin \left(y.re \cdot \left(\tan^{-1}_* \frac{x.im}{x.re} + y.im \cdot \frac{t\_0}{y.re}\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1 \cdot \sin \left(y.im \cdot \left(t\_0 + y.re \cdot \frac{\tan^{-1}_* \frac{x.im}{x.re}}{y.im}\right)\right)\\
\end{array}
\end{array}
if y.im < -2.8499999999999999e57Initial program 30.7%
cancel-sign-sub-inv30.7%
fma-define30.7%
hypot-define30.7%
distribute-lft-neg-in30.7%
distribute-rgt-neg-out30.7%
fma-define30.7%
hypot-define64.4%
*-commutative64.4%
Simplified64.4%
Taylor expanded in y.im around inf 30.7%
unpow230.7%
unpow230.7%
hypot-undefine64.4%
associate-/l*64.4%
Simplified64.4%
clear-num62.5%
inv-pow62.5%
Applied egg-rr62.5%
unpow-162.5%
Simplified62.5%
*-un-lft-identity62.5%
+-commutative62.5%
un-div-inv64.4%
Applied egg-rr64.4%
*-lft-identity64.4%
+-commutative64.4%
associate-/r/66.3%
Simplified66.3%
if -2.8499999999999999e57 < y.im < 2.1e62Initial program 45.1%
cancel-sign-sub-inv45.1%
fma-define45.1%
hypot-define45.1%
distribute-lft-neg-in45.1%
distribute-rgt-neg-out45.1%
fma-define45.1%
hypot-define87.6%
*-commutative87.6%
Simplified87.6%
Taylor expanded in y.re around inf 45.1%
+-commutative45.1%
associate-/l*45.8%
unpow245.8%
unpow245.8%
hypot-undefine88.8%
Simplified88.8%
if 2.1e62 < y.im Initial program 31.6%
cancel-sign-sub-inv31.6%
fma-define31.6%
hypot-define31.6%
distribute-lft-neg-in31.6%
distribute-rgt-neg-out31.6%
fma-define31.6%
hypot-define72.3%
*-commutative72.3%
Simplified72.3%
Taylor expanded in y.im around inf 31.6%
unpow231.6%
unpow231.6%
hypot-undefine72.3%
associate-/l*72.3%
Simplified72.3%
Final simplification80.5%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(if (or (<= y.im -2020.0) (not (<= y.im 62000000000000.0)))
(*
(exp (fma (log (hypot x.re x.im)) y.re (* (atan2 x.im x.re) (- y.im))))
(sin (* y.re (atan2 x.im x.re))))
(*
(sin
(* y.re (+ (atan2 x.im x.re) (* y.im (/ (log (hypot x.im x.re)) y.re)))))
(/ (pow (hypot x.re x.im) y.re) (pow (exp y.im) (atan2 x.im x.re))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double tmp;
if ((y_46_im <= -2020.0) || !(y_46_im <= 62000000000000.0)) {
tmp = exp(fma(log(hypot(x_46_re, x_46_im)), y_46_re, (atan2(x_46_im, x_46_re) * -y_46_im))) * sin((y_46_re * atan2(x_46_im, x_46_re)));
} else {
tmp = 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))))) * (pow(hypot(x_46_re, x_46_im), y_46_re) / pow(exp(y_46_im), atan2(x_46_im, x_46_re)));
}
return tmp;
}
function code(x_46_re, x_46_im, y_46_re, y_46_im) tmp = 0.0 if ((y_46_im <= -2020.0) || !(y_46_im <= 62000000000000.0)) tmp = Float64(exp(fma(log(hypot(x_46_re, x_46_im)), y_46_re, Float64(atan(x_46_im, x_46_re) * Float64(-y_46_im)))) * sin(Float64(y_46_re * atan(x_46_im, x_46_re)))); else tmp = Float64(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))))) * Float64((hypot(x_46_re, x_46_im) ^ y_46_re) / (exp(y_46_im) ^ atan(x_46_im, x_46_re)))); end return tmp end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := If[Or[LessEqual[y$46$im, -2020.0], N[Not[LessEqual[y$46$im, 62000000000000.0]], $MachinePrecision]], N[(N[Exp[N[(N[Log[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision]], $MachinePrecision] * y$46$re + N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * (-y$46$im)), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Sin[N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(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] * N[(N[Power[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision], y$46$re], $MachinePrecision] / N[Power[N[Exp[y$46$im], $MachinePrecision], N[ArcTan[x$46$im / x$46$re], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y.im \leq -2020 \lor \neg \left(y.im \leq 62000000000000\right):\\
\;\;\;\;e^{\mathsf{fma}\left(\log \left(\mathsf{hypot}\left(x.re, x.im\right)\right), y.re, \tan^{-1}_* \frac{x.im}{x.re} \cdot \left(-y.im\right)\right)} \cdot \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\\
\mathbf{else}:\\
\;\;\;\;\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) \cdot \frac{{\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re}}{{\left(e^{y.im}\right)}^{\tan^{-1}_* \frac{x.im}{x.re}}}\\
\end{array}
\end{array}
if y.im < -2020 or 6.2e13 < y.im Initial program 33.3%
cancel-sign-sub-inv33.3%
fma-define33.3%
hypot-define33.3%
distribute-lft-neg-in33.3%
distribute-rgt-neg-out33.3%
fma-define33.3%
hypot-define69.5%
*-commutative69.5%
Simplified69.5%
Taylor expanded in y.im around inf 34.0%
unpow234.0%
unpow234.0%
hypot-undefine70.3%
associate-/l*70.3%
Simplified70.3%
Taylor expanded in y.im around 0 66.4%
if -2020 < y.im < 6.2e13Initial program 45.1%
exp-diff45.1%
exp-to-pow45.1%
hypot-define45.1%
*-commutative45.1%
exp-prod45.1%
fma-define45.1%
hypot-define89.4%
*-commutative89.4%
Simplified89.4%
Taylor expanded in y.re around inf 45.1%
+-commutative45.1%
associate-/l*45.1%
unpow245.1%
unpow245.1%
hypot-undefine88.6%
Simplified88.6%
Final simplification77.3%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (sin (* y.re (atan2 x.im x.re))))
(t_1
(*
(exp
(fma (log (hypot x.re x.im)) y.re (* (atan2 x.im x.re) (- y.im))))
t_0)))
(if (<= y.re -3.4e+44)
t_1
(if (<= y.re 3.2e-9)
(*
(sin
(*
y.im
(+ (log (hypot x.im x.re)) (* y.re (/ (atan2 x.im x.re) y.im)))))
(/ (pow (hypot x.re x.im) y.re) (pow (exp y.im) (atan2 x.im x.re))))
(if (<= y.re 6e+104)
t_1
(* (fabs t_0) (pow (hypot x.im x.re) y.re)))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = sin((y_46_re * atan2(x_46_im, x_46_re)));
double t_1 = exp(fma(log(hypot(x_46_re, x_46_im)), y_46_re, (atan2(x_46_im, x_46_re) * -y_46_im))) * t_0;
double tmp;
if (y_46_re <= -3.4e+44) {
tmp = t_1;
} else if (y_46_re <= 3.2e-9) {
tmp = sin((y_46_im * (log(hypot(x_46_im, x_46_re)) + (y_46_re * (atan2(x_46_im, x_46_re) / y_46_im))))) * (pow(hypot(x_46_re, x_46_im), y_46_re) / pow(exp(y_46_im), atan2(x_46_im, x_46_re)));
} else if (y_46_re <= 6e+104) {
tmp = t_1;
} else {
tmp = fabs(t_0) * pow(hypot(x_46_im, x_46_re), y_46_re);
}
return tmp;
}
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = sin(Float64(y_46_re * atan(x_46_im, x_46_re))) t_1 = Float64(exp(fma(log(hypot(x_46_re, x_46_im)), y_46_re, Float64(atan(x_46_im, x_46_re) * Float64(-y_46_im)))) * t_0) tmp = 0.0 if (y_46_re <= -3.4e+44) tmp = t_1; elseif (y_46_re <= 3.2e-9) tmp = Float64(sin(Float64(y_46_im * Float64(log(hypot(x_46_im, x_46_re)) + Float64(y_46_re * Float64(atan(x_46_im, x_46_re) / y_46_im))))) * Float64((hypot(x_46_re, x_46_im) ^ y_46_re) / (exp(y_46_im) ^ atan(x_46_im, x_46_re)))); elseif (y_46_re <= 6e+104) tmp = t_1; else tmp = Float64(abs(t_0) * (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[Sin[N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$1 = N[(N[Exp[N[(N[Log[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision]], $MachinePrecision] * y$46$re + N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * (-y$46$im)), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * t$95$0), $MachinePrecision]}, If[LessEqual[y$46$re, -3.4e+44], t$95$1, If[LessEqual[y$46$re, 3.2e-9], N[(N[Sin[N[(y$46$im * N[(N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision] + N[(y$46$re * N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] / y$46$im), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(N[Power[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision], y$46$re], $MachinePrecision] / N[Power[N[Exp[y$46$im], $MachinePrecision], N[ArcTan[x$46$im / x$46$re], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$re, 6e+104], t$95$1, N[(N[Abs[t$95$0], $MachinePrecision] * N[Power[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision], y$46$re], $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\\
t_1 := e^{\mathsf{fma}\left(\log \left(\mathsf{hypot}\left(x.re, x.im\right)\right), y.re, \tan^{-1}_* \frac{x.im}{x.re} \cdot \left(-y.im\right)\right)} \cdot t\_0\\
\mathbf{if}\;y.re \leq -3.4 \cdot 10^{+44}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y.re \leq 3.2 \cdot 10^{-9}:\\
\;\;\;\;\sin \left(y.im \cdot \left(\log \left(\mathsf{hypot}\left(x.im, x.re\right)\right) + y.re \cdot \frac{\tan^{-1}_* \frac{x.im}{x.re}}{y.im}\right)\right) \cdot \frac{{\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re}}{{\left(e^{y.im}\right)}^{\tan^{-1}_* \frac{x.im}{x.re}}}\\
\mathbf{elif}\;y.re \leq 6 \cdot 10^{+104}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;\left|t\_0\right| \cdot {\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re}\\
\end{array}
\end{array}
if y.re < -3.4e44 or 3.20000000000000012e-9 < y.re < 5.99999999999999937e104Initial program 35.4%
cancel-sign-sub-inv35.4%
fma-define35.4%
hypot-define35.4%
distribute-lft-neg-in35.4%
distribute-rgt-neg-out35.4%
fma-define35.4%
hypot-define75.4%
*-commutative75.4%
Simplified75.4%
Taylor expanded in y.im around inf 32.3%
unpow232.3%
unpow232.3%
hypot-undefine67.7%
associate-/l*69.2%
Simplified69.2%
Taylor expanded in y.im around 0 81.5%
if -3.4e44 < y.re < 3.20000000000000012e-9Initial program 43.5%
exp-diff43.5%
exp-to-pow43.5%
hypot-define43.5%
*-commutative43.5%
exp-prod43.5%
fma-define43.5%
hypot-define84.8%
*-commutative84.8%
Simplified84.8%
Taylor expanded in y.im around inf 43.4%
unpow243.4%
unpow243.4%
hypot-undefine85.0%
associate-/l*85.0%
Simplified84.7%
if 5.99999999999999937e104 < y.re Initial program 28.2%
exp-diff23.1%
exp-to-pow23.1%
hypot-define23.1%
*-commutative23.1%
exp-prod23.1%
fma-define23.1%
hypot-define51.3%
*-commutative51.3%
Simplified51.3%
Taylor expanded in y.im around 0 46.2%
unpow246.2%
unpow246.2%
hypot-undefine46.2%
Simplified46.2%
add-sqr-sqrt23.1%
sqrt-unprod61.6%
pow261.6%
Applied egg-rr61.6%
unpow261.6%
rem-sqrt-square61.6%
Simplified61.6%
Final simplification80.4%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (sin (* y.re (atan2 x.im x.re))))
(t_1
(*
(exp
(fma (log (hypot x.re x.im)) y.re (* (atan2 x.im x.re) (- y.im))))
t_0)))
(if (<= y.re -1.36e-117)
t_1
(if (<= y.re 1e-160)
(/
(sin (* y.im (log (hypot x.im x.re))))
(pow (exp (atan2 x.im x.re)) y.im))
(if (<= y.re 1.26e+105)
t_1
(* (fabs t_0) (pow (hypot x.im x.re) y.re)))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = sin((y_46_re * atan2(x_46_im, x_46_re)));
double t_1 = exp(fma(log(hypot(x_46_re, x_46_im)), y_46_re, (atan2(x_46_im, x_46_re) * -y_46_im))) * t_0;
double tmp;
if (y_46_re <= -1.36e-117) {
tmp = t_1;
} else if (y_46_re <= 1e-160) {
tmp = sin((y_46_im * log(hypot(x_46_im, x_46_re)))) / pow(exp(atan2(x_46_im, x_46_re)), y_46_im);
} else if (y_46_re <= 1.26e+105) {
tmp = t_1;
} else {
tmp = fabs(t_0) * pow(hypot(x_46_im, x_46_re), y_46_re);
}
return tmp;
}
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = sin(Float64(y_46_re * atan(x_46_im, x_46_re))) t_1 = Float64(exp(fma(log(hypot(x_46_re, x_46_im)), y_46_re, Float64(atan(x_46_im, x_46_re) * Float64(-y_46_im)))) * t_0) tmp = 0.0 if (y_46_re <= -1.36e-117) tmp = t_1; elseif (y_46_re <= 1e-160) tmp = Float64(sin(Float64(y_46_im * log(hypot(x_46_im, x_46_re)))) / (exp(atan(x_46_im, x_46_re)) ^ y_46_im)); elseif (y_46_re <= 1.26e+105) tmp = t_1; else tmp = Float64(abs(t_0) * (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[Sin[N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$1 = N[(N[Exp[N[(N[Log[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision]], $MachinePrecision] * y$46$re + N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * (-y$46$im)), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * t$95$0), $MachinePrecision]}, If[LessEqual[y$46$re, -1.36e-117], t$95$1, If[LessEqual[y$46$re, 1e-160], N[(N[Sin[N[(y$46$im * N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / N[Power[N[Exp[N[ArcTan[x$46$im / x$46$re], $MachinePrecision]], $MachinePrecision], y$46$im], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$re, 1.26e+105], t$95$1, N[(N[Abs[t$95$0], $MachinePrecision] * N[Power[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision], y$46$re], $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\\
t_1 := e^{\mathsf{fma}\left(\log \left(\mathsf{hypot}\left(x.re, x.im\right)\right), y.re, \tan^{-1}_* \frac{x.im}{x.re} \cdot \left(-y.im\right)\right)} \cdot t\_0\\
\mathbf{if}\;y.re \leq -1.36 \cdot 10^{-117}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y.re \leq 10^{-160}:\\
\;\;\;\;\frac{\sin \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right)}{{\left(e^{\tan^{-1}_* \frac{x.im}{x.re}}\right)}^{y.im}}\\
\mathbf{elif}\;y.re \leq 1.26 \cdot 10^{+105}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;\left|t\_0\right| \cdot {\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re}\\
\end{array}
\end{array}
if y.re < -1.35999999999999996e-117 or 9.9999999999999999e-161 < y.re < 1.2599999999999999e105Initial program 41.5%
cancel-sign-sub-inv41.5%
fma-define41.5%
hypot-define41.5%
distribute-lft-neg-in41.5%
distribute-rgt-neg-out41.5%
fma-define41.5%
hypot-define81.8%
*-commutative81.8%
Simplified81.8%
Taylor expanded in y.im around inf 40.1%
unpow240.1%
unpow240.1%
hypot-undefine78.3%
associate-/l*79.0%
Simplified79.0%
Taylor expanded in y.im around 0 74.9%
if -1.35999999999999996e-117 < y.re < 9.9999999999999999e-161Initial program 40.2%
exp-diff40.2%
exp-to-pow40.2%
hypot-define40.2%
*-commutative40.2%
exp-prod40.2%
fma-define40.2%
hypot-define82.5%
*-commutative82.5%
Simplified82.5%
Taylor expanded in y.re around 0 34.3%
unpow234.3%
unpow234.3%
hypot-undefine71.0%
*-commutative71.0%
exp-prod71.0%
Simplified71.0%
if 1.2599999999999999e105 < y.re Initial program 28.2%
exp-diff23.1%
exp-to-pow23.1%
hypot-define23.1%
*-commutative23.1%
exp-prod23.1%
fma-define23.1%
hypot-define51.3%
*-commutative51.3%
Simplified51.3%
Taylor expanded in y.im around 0 46.2%
unpow246.2%
unpow246.2%
hypot-undefine46.2%
Simplified46.2%
add-sqr-sqrt23.1%
sqrt-unprod61.6%
pow261.6%
Applied egg-rr61.6%
unpow261.6%
rem-sqrt-square61.6%
Simplified61.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 (* y.re (atan2 x.im x.re)))
(t_2 (sin t_1))
(t_3
(*
t_2
(exp
(- (* y.re (log (sqrt (+ (* x.re x.re) (* x.im x.im))))) t_0)))))
(if (<= y.re -9.5e-13)
t_3
(if (<= y.re 1.45e-101)
(/
(sin (* y.im (log (hypot x.im x.re))))
(pow (exp (atan2 x.im x.re)) y.im))
(if (<= y.re 1.65e-10)
(/ (* (sin (+ t_1 (* y.im (log x.re)))) (pow x.re y.re)) (exp t_0))
(if (<= y.re 2.5e+85)
t_3
(* (fabs t_2) (pow (hypot x.im x.re) y.re))))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double 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 t_3 = t_2 * exp(((y_46_re * log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))) - t_0));
double tmp;
if (y_46_re <= -9.5e-13) {
tmp = t_3;
} else if (y_46_re <= 1.45e-101) {
tmp = sin((y_46_im * log(hypot(x_46_im, x_46_re)))) / pow(exp(atan2(x_46_im, x_46_re)), y_46_im);
} else if (y_46_re <= 1.65e-10) {
tmp = (sin((t_1 + (y_46_im * log(x_46_re)))) * pow(x_46_re, y_46_re)) / exp(t_0);
} else if (y_46_re <= 2.5e+85) {
tmp = t_3;
} else {
tmp = fabs(t_2) * pow(hypot(x_46_im, x_46_re), y_46_re);
}
return tmp;
}
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double 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 t_3 = t_2 * Math.exp(((y_46_re * Math.log(Math.sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))) - t_0));
double tmp;
if (y_46_re <= -9.5e-13) {
tmp = t_3;
} else if (y_46_re <= 1.45e-101) {
tmp = Math.sin((y_46_im * Math.log(Math.hypot(x_46_im, x_46_re)))) / Math.pow(Math.exp(Math.atan2(x_46_im, x_46_re)), y_46_im);
} else if (y_46_re <= 1.65e-10) {
tmp = (Math.sin((t_1 + (y_46_im * Math.log(x_46_re)))) * Math.pow(x_46_re, y_46_re)) / Math.exp(t_0);
} else if (y_46_re <= 2.5e+85) {
tmp = t_3;
} else {
tmp = Math.abs(t_2) * Math.pow(Math.hypot(x_46_im, x_46_re), y_46_re);
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): 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) t_3 = t_2 * math.exp(((y_46_re * math.log(math.sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))) - t_0)) tmp = 0 if y_46_re <= -9.5e-13: tmp = t_3 elif y_46_re <= 1.45e-101: tmp = math.sin((y_46_im * math.log(math.hypot(x_46_im, x_46_re)))) / math.pow(math.exp(math.atan2(x_46_im, x_46_re)), y_46_im) elif y_46_re <= 1.65e-10: tmp = (math.sin((t_1 + (y_46_im * math.log(x_46_re)))) * math.pow(x_46_re, y_46_re)) / math.exp(t_0) elif y_46_re <= 2.5e+85: tmp = t_3 else: tmp = math.fabs(t_2) * math.pow(math.hypot(x_46_im, x_46_re), y_46_re) return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) 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) t_3 = Float64(t_2 * exp(Float64(Float64(y_46_re * log(sqrt(Float64(Float64(x_46_re * x_46_re) + Float64(x_46_im * x_46_im))))) - t_0))) tmp = 0.0 if (y_46_re <= -9.5e-13) tmp = t_3; elseif (y_46_re <= 1.45e-101) tmp = Float64(sin(Float64(y_46_im * log(hypot(x_46_im, x_46_re)))) / (exp(atan(x_46_im, x_46_re)) ^ y_46_im)); elseif (y_46_re <= 1.65e-10) tmp = Float64(Float64(sin(Float64(t_1 + Float64(y_46_im * log(x_46_re)))) * (x_46_re ^ y_46_re)) / exp(t_0)); elseif (y_46_re <= 2.5e+85) tmp = t_3; else tmp = Float64(abs(t_2) * (hypot(x_46_im, x_46_re) ^ y_46_re)); end return tmp end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im) 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); t_3 = t_2 * exp(((y_46_re * log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))) - t_0)); tmp = 0.0; if (y_46_re <= -9.5e-13) tmp = t_3; elseif (y_46_re <= 1.45e-101) tmp = sin((y_46_im * log(hypot(x_46_im, x_46_re)))) / (exp(atan2(x_46_im, x_46_re)) ^ y_46_im); elseif (y_46_re <= 1.65e-10) tmp = (sin((t_1 + (y_46_im * log(x_46_re)))) * (x_46_re ^ y_46_re)) / exp(t_0); elseif (y_46_re <= 2.5e+85) tmp = t_3; else tmp = abs(t_2) * (hypot(x_46_im, x_46_re) ^ y_46_re); end tmp_2 = tmp; end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := 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]}, Block[{t$95$3 = N[(t$95$2 * N[Exp[N[(N[(y$46$re * N[Log[N[Sqrt[N[(N[(x$46$re * x$46$re), $MachinePrecision] + N[(x$46$im * x$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y$46$re, -9.5e-13], t$95$3, If[LessEqual[y$46$re, 1.45e-101], N[(N[Sin[N[(y$46$im * N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / N[Power[N[Exp[N[ArcTan[x$46$im / x$46$re], $MachinePrecision]], $MachinePrecision], y$46$im], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$re, 1.65e-10], N[(N[(N[Sin[N[(t$95$1 + N[(y$46$im * N[Log[x$46$re], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Power[x$46$re, y$46$re], $MachinePrecision]), $MachinePrecision] / N[Exp[t$95$0], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$re, 2.5e+85], t$95$3, N[(N[Abs[t$95$2], $MachinePrecision] * N[Power[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision], y$46$re], $MachinePrecision]), $MachinePrecision]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
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\\
t_3 := t\_2 \cdot e^{y.re \cdot \log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) - t\_0}\\
\mathbf{if}\;y.re \leq -9.5 \cdot 10^{-13}:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;y.re \leq 1.45 \cdot 10^{-101}:\\
\;\;\;\;\frac{\sin \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right)}{{\left(e^{\tan^{-1}_* \frac{x.im}{x.re}}\right)}^{y.im}}\\
\mathbf{elif}\;y.re \leq 1.65 \cdot 10^{-10}:\\
\;\;\;\;\frac{\sin \left(t\_1 + y.im \cdot \log x.re\right) \cdot {x.re}^{y.re}}{e^{t\_0}}\\
\mathbf{elif}\;y.re \leq 2.5 \cdot 10^{+85}:\\
\;\;\;\;t\_3\\
\mathbf{else}:\\
\;\;\;\;\left|t\_2\right| \cdot {\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re}\\
\end{array}
\end{array}
if y.re < -9.49999999999999991e-13 or 1.65e-10 < y.re < 2.5e85Initial program 35.5%
Taylor expanded in y.im around 0 76.2%
if -9.49999999999999991e-13 < y.re < 1.45e-101Initial program 46.4%
exp-diff46.4%
exp-to-pow46.4%
hypot-define46.4%
*-commutative46.4%
exp-prod46.4%
fma-define46.4%
hypot-define85.6%
*-commutative85.6%
Simplified85.6%
Taylor expanded in y.re around 0 36.7%
unpow236.7%
unpow236.7%
hypot-undefine67.0%
*-commutative67.0%
exp-prod67.0%
Simplified67.0%
if 1.45e-101 < y.re < 1.65e-10Initial program 39.2%
exp-diff39.2%
exp-to-pow39.2%
hypot-define39.2%
*-commutative39.2%
exp-prod39.2%
fma-define39.2%
hypot-define79.3%
*-commutative79.3%
Simplified79.3%
Taylor expanded in x.im around 0 57.9%
if 2.5e85 < y.re Initial program 26.8%
exp-diff22.0%
exp-to-pow22.0%
hypot-define22.0%
*-commutative22.0%
exp-prod22.0%
fma-define22.0%
hypot-define48.8%
*-commutative48.8%
Simplified48.8%
Taylor expanded in y.im around 0 44.0%
unpow244.0%
unpow244.0%
hypot-undefine44.0%
Simplified44.0%
add-sqr-sqrt22.0%
sqrt-unprod58.7%
pow258.7%
Applied egg-rr58.7%
unpow258.7%
rem-sqrt-square58.7%
Simplified58.7%
Final simplification67.5%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (* y.re (atan2 x.im x.re))) (t_1 (pow (hypot x.im x.re) y.re)))
(if (<= y.re -3.5e-12)
(* t_1 (sin (pow (cbrt t_0) 3.0)))
(if (<= y.re 1.45e-101)
(/
(sin (* y.im (log (hypot x.im x.re))))
(pow (exp (atan2 x.im x.re)) y.im))
(if (<= y.re 1.86)
(/
(* (sin (+ t_0 (* y.im (log x.re)))) (pow x.re y.re))
(exp (* (atan2 x.im x.re) y.im)))
(if (<= y.re 4e+155)
(*
y.re
(+
(atan2 x.im x.re)
(*
y.re
(log1p (+ (pow (hypot x.im x.re) (atan2 x.im x.re)) -1.0)))))
(* (fabs (sin t_0)) t_1)))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = y_46_re * atan2(x_46_im, x_46_re);
double t_1 = pow(hypot(x_46_im, x_46_re), y_46_re);
double tmp;
if (y_46_re <= -3.5e-12) {
tmp = t_1 * sin(pow(cbrt(t_0), 3.0));
} else if (y_46_re <= 1.45e-101) {
tmp = sin((y_46_im * log(hypot(x_46_im, x_46_re)))) / pow(exp(atan2(x_46_im, x_46_re)), y_46_im);
} else if (y_46_re <= 1.86) {
tmp = (sin((t_0 + (y_46_im * log(x_46_re)))) * pow(x_46_re, y_46_re)) / exp((atan2(x_46_im, x_46_re) * y_46_im));
} else if (y_46_re <= 4e+155) {
tmp = y_46_re * (atan2(x_46_im, x_46_re) + (y_46_re * log1p((pow(hypot(x_46_im, x_46_re), atan2(x_46_im, x_46_re)) + -1.0))));
} else {
tmp = fabs(sin(t_0)) * t_1;
}
return tmp;
}
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = y_46_re * Math.atan2(x_46_im, x_46_re);
double t_1 = Math.pow(Math.hypot(x_46_im, x_46_re), y_46_re);
double tmp;
if (y_46_re <= -3.5e-12) {
tmp = t_1 * Math.sin(Math.pow(Math.cbrt(t_0), 3.0));
} else if (y_46_re <= 1.45e-101) {
tmp = Math.sin((y_46_im * Math.log(Math.hypot(x_46_im, x_46_re)))) / Math.pow(Math.exp(Math.atan2(x_46_im, x_46_re)), y_46_im);
} else if (y_46_re <= 1.86) {
tmp = (Math.sin((t_0 + (y_46_im * Math.log(x_46_re)))) * Math.pow(x_46_re, y_46_re)) / Math.exp((Math.atan2(x_46_im, x_46_re) * y_46_im));
} else if (y_46_re <= 4e+155) {
tmp = y_46_re * (Math.atan2(x_46_im, x_46_re) + (y_46_re * Math.log1p((Math.pow(Math.hypot(x_46_im, x_46_re), Math.atan2(x_46_im, x_46_re)) + -1.0))));
} else {
tmp = Math.abs(Math.sin(t_0)) * t_1;
}
return tmp;
}
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = Float64(y_46_re * atan(x_46_im, x_46_re)) t_1 = hypot(x_46_im, x_46_re) ^ y_46_re tmp = 0.0 if (y_46_re <= -3.5e-12) tmp = Float64(t_1 * sin((cbrt(t_0) ^ 3.0))); elseif (y_46_re <= 1.45e-101) tmp = Float64(sin(Float64(y_46_im * log(hypot(x_46_im, x_46_re)))) / (exp(atan(x_46_im, x_46_re)) ^ y_46_im)); elseif (y_46_re <= 1.86) tmp = Float64(Float64(sin(Float64(t_0 + Float64(y_46_im * log(x_46_re)))) * (x_46_re ^ y_46_re)) / exp(Float64(atan(x_46_im, x_46_re) * y_46_im))); elseif (y_46_re <= 4e+155) tmp = Float64(y_46_re * Float64(atan(x_46_im, x_46_re) + Float64(y_46_re * log1p(Float64((hypot(x_46_im, x_46_re) ^ atan(x_46_im, x_46_re)) + -1.0))))); else tmp = Float64(abs(sin(t_0)) * t_1); end return tmp end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[Power[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision], y$46$re], $MachinePrecision]}, If[LessEqual[y$46$re, -3.5e-12], N[(t$95$1 * N[Sin[N[Power[N[Power[t$95$0, 1/3], $MachinePrecision], 3.0], $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$re, 1.45e-101], N[(N[Sin[N[(y$46$im * N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / N[Power[N[Exp[N[ArcTan[x$46$im / x$46$re], $MachinePrecision]], $MachinePrecision], y$46$im], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$re, 1.86], N[(N[(N[Sin[N[(t$95$0 + N[(y$46$im * N[Log[x$46$re], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Power[x$46$re, y$46$re], $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, 4e+155], N[(y$46$re * N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] + N[(y$46$re * N[Log[1 + N[(N[Power[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision], N[ArcTan[x$46$im / x$46$re], $MachinePrecision]], $MachinePrecision] + -1.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[Abs[N[Sin[t$95$0], $MachinePrecision]], $MachinePrecision] * t$95$1), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
t_1 := {\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re}\\
\mathbf{if}\;y.re \leq -3.5 \cdot 10^{-12}:\\
\;\;\;\;t\_1 \cdot \sin \left({\left(\sqrt[3]{t\_0}\right)}^{3}\right)\\
\mathbf{elif}\;y.re \leq 1.45 \cdot 10^{-101}:\\
\;\;\;\;\frac{\sin \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right)}{{\left(e^{\tan^{-1}_* \frac{x.im}{x.re}}\right)}^{y.im}}\\
\mathbf{elif}\;y.re \leq 1.86:\\
\;\;\;\;\frac{\sin \left(t\_0 + y.im \cdot \log x.re\right) \cdot {x.re}^{y.re}}{e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}}\\
\mathbf{elif}\;y.re \leq 4 \cdot 10^{+155}:\\
\;\;\;\;y.re \cdot \left(\tan^{-1}_* \frac{x.im}{x.re} + y.re \cdot \mathsf{log1p}\left({\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{\tan^{-1}_* \frac{x.im}{x.re}} + -1\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\left|\sin t\_0\right| \cdot t\_1\\
\end{array}
\end{array}
if y.re < -3.5e-12Initial program 36.5%
exp-diff23.8%
exp-to-pow23.8%
hypot-define23.8%
*-commutative23.8%
exp-prod22.2%
fma-define22.2%
hypot-define57.4%
*-commutative57.4%
Simplified57.4%
Taylor expanded in y.im around 0 70.2%
unpow270.2%
unpow270.2%
hypot-undefine71.7%
Simplified71.7%
*-commutative71.7%
add-cube-cbrt76.4%
pow376.4%
*-commutative76.4%
Applied egg-rr76.4%
if -3.5e-12 < y.re < 1.45e-101Initial program 46.4%
exp-diff46.4%
exp-to-pow46.4%
hypot-define46.4%
*-commutative46.4%
exp-prod46.4%
fma-define46.4%
hypot-define85.6%
*-commutative85.6%
Simplified85.6%
Taylor expanded in y.re around 0 36.7%
unpow236.7%
unpow236.7%
hypot-undefine67.0%
*-commutative67.0%
exp-prod67.0%
Simplified67.0%
if 1.45e-101 < y.re < 1.8600000000000001Initial program 38.7%
exp-diff38.7%
exp-to-pow38.7%
hypot-define38.7%
*-commutative38.7%
exp-prod38.7%
fma-define38.7%
hypot-define78.2%
*-commutative78.2%
Simplified78.2%
Taylor expanded in x.im around 0 57.1%
if 1.8600000000000001 < y.re < 4.00000000000000003e155Initial program 18.2%
exp-diff13.6%
exp-to-pow13.6%
hypot-define13.6%
*-commutative13.6%
exp-prod13.6%
fma-define13.6%
hypot-define36.4%
*-commutative36.4%
Simplified36.4%
Taylor expanded in y.im around 0 41.3%
unpow241.3%
unpow241.3%
hypot-undefine41.3%
Simplified41.3%
Taylor expanded in y.re around 0 18.5%
Taylor expanded in y.re around 0 42.3%
log1p-expm1-u55.2%
expm1-undefine55.2%
exp-to-pow55.3%
unpow255.3%
unpow255.3%
hypot-undefine51.0%
Applied egg-rr51.0%
if 4.00000000000000003e155 < y.re Initial program 34.4%
exp-diff28.1%
exp-to-pow28.1%
hypot-define28.1%
*-commutative28.1%
exp-prod28.1%
fma-define28.1%
hypot-define59.4%
*-commutative59.4%
Simplified59.4%
Taylor expanded in y.im around 0 53.2%
unpow253.2%
unpow253.2%
hypot-undefine53.2%
Simplified53.2%
add-sqr-sqrt28.1%
sqrt-unprod68.8%
pow268.8%
Applied egg-rr68.8%
unpow268.8%
rem-sqrt-square68.8%
Simplified68.8%
Final simplification67.0%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (sin (* y.re (atan2 x.im x.re))))
(t_1 (pow (hypot x.im x.re) y.re)))
(if (or (<= y.im -0.000115) (not (<= y.im 7.2e-20)))
(* t_1 (log (exp t_0)))
(* t_0 t_1))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = sin((y_46_re * atan2(x_46_im, x_46_re)));
double t_1 = pow(hypot(x_46_im, x_46_re), y_46_re);
double tmp;
if ((y_46_im <= -0.000115) || !(y_46_im <= 7.2e-20)) {
tmp = t_1 * log(exp(t_0));
} else {
tmp = t_0 * t_1;
}
return tmp;
}
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = Math.sin((y_46_re * Math.atan2(x_46_im, x_46_re)));
double t_1 = Math.pow(Math.hypot(x_46_im, x_46_re), y_46_re);
double tmp;
if ((y_46_im <= -0.000115) || !(y_46_im <= 7.2e-20)) {
tmp = t_1 * Math.log(Math.exp(t_0));
} else {
tmp = t_0 * t_1;
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): t_0 = math.sin((y_46_re * math.atan2(x_46_im, x_46_re))) t_1 = math.pow(math.hypot(x_46_im, x_46_re), y_46_re) tmp = 0 if (y_46_im <= -0.000115) or not (y_46_im <= 7.2e-20): tmp = t_1 * math.log(math.exp(t_0)) else: tmp = t_0 * t_1 return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = sin(Float64(y_46_re * atan(x_46_im, x_46_re))) t_1 = hypot(x_46_im, x_46_re) ^ y_46_re tmp = 0.0 if ((y_46_im <= -0.000115) || !(y_46_im <= 7.2e-20)) tmp = Float64(t_1 * log(exp(t_0))); else tmp = Float64(t_0 * t_1); end return tmp end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = sin((y_46_re * atan2(x_46_im, x_46_re))); t_1 = hypot(x_46_im, x_46_re) ^ y_46_re; tmp = 0.0; if ((y_46_im <= -0.000115) || ~((y_46_im <= 7.2e-20))) tmp = t_1 * log(exp(t_0)); else tmp = t_0 * t_1; end tmp_2 = tmp; end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[Sin[N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$1 = N[Power[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision], y$46$re], $MachinePrecision]}, If[Or[LessEqual[y$46$im, -0.000115], N[Not[LessEqual[y$46$im, 7.2e-20]], $MachinePrecision]], N[(t$95$1 * N[Log[N[Exp[t$95$0], $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(t$95$0 * t$95$1), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\\
t_1 := {\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re}\\
\mathbf{if}\;y.im \leq -0.000115 \lor \neg \left(y.im \leq 7.2 \cdot 10^{-20}\right):\\
\;\;\;\;t\_1 \cdot \log \left(e^{t\_0}\right)\\
\mathbf{else}:\\
\;\;\;\;t\_0 \cdot t\_1\\
\end{array}
\end{array}
if y.im < -1.15e-4 or 7.19999999999999948e-20 < y.im Initial program 33.7%
exp-diff26.0%
exp-to-pow26.0%
hypot-define26.0%
*-commutative26.0%
exp-prod25.3%
fma-define25.3%
hypot-define55.4%
*-commutative55.4%
Simplified55.4%
Taylor expanded in y.im around 0 36.8%
unpow236.8%
unpow236.8%
hypot-undefine28.4%
Simplified28.4%
add-log-exp26.2%
Applied egg-rr46.3%
if -1.15e-4 < y.im < 7.19999999999999948e-20Initial program 45.9%
exp-diff45.9%
exp-to-pow45.9%
hypot-define45.9%
*-commutative45.9%
exp-prod45.9%
fma-define45.9%
hypot-define89.1%
*-commutative89.1%
Simplified89.1%
Taylor expanded in y.im around 0 43.0%
unpow243.0%
unpow243.0%
hypot-undefine56.5%
Simplified56.5%
Final simplification50.8%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (sin (* y.re (atan2 x.im x.re))))
(t_1 (pow (hypot x.im x.re) y.re))
(t_2 (* t_0 t_1)))
(if (<= y.re -3.4e-12)
t_2
(if (<= y.re 3.4e-96)
(/
(sin (* y.im (log (hypot x.im x.re))))
(pow (exp y.im) (atan2 x.im x.re)))
(if (<= y.re 1e+80) t_2 (* (fabs t_0) t_1))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = sin((y_46_re * atan2(x_46_im, x_46_re)));
double t_1 = pow(hypot(x_46_im, x_46_re), y_46_re);
double t_2 = t_0 * t_1;
double tmp;
if (y_46_re <= -3.4e-12) {
tmp = t_2;
} else if (y_46_re <= 3.4e-96) {
tmp = sin((y_46_im * log(hypot(x_46_im, x_46_re)))) / pow(exp(y_46_im), atan2(x_46_im, x_46_re));
} else if (y_46_re <= 1e+80) {
tmp = t_2;
} else {
tmp = fabs(t_0) * t_1;
}
return tmp;
}
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = Math.sin((y_46_re * Math.atan2(x_46_im, x_46_re)));
double t_1 = Math.pow(Math.hypot(x_46_im, x_46_re), y_46_re);
double t_2 = t_0 * t_1;
double tmp;
if (y_46_re <= -3.4e-12) {
tmp = t_2;
} else if (y_46_re <= 3.4e-96) {
tmp = Math.sin((y_46_im * Math.log(Math.hypot(x_46_im, x_46_re)))) / Math.pow(Math.exp(y_46_im), Math.atan2(x_46_im, x_46_re));
} else if (y_46_re <= 1e+80) {
tmp = t_2;
} else {
tmp = Math.abs(t_0) * t_1;
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): t_0 = math.sin((y_46_re * math.atan2(x_46_im, x_46_re))) t_1 = math.pow(math.hypot(x_46_im, x_46_re), y_46_re) t_2 = t_0 * t_1 tmp = 0 if y_46_re <= -3.4e-12: tmp = t_2 elif y_46_re <= 3.4e-96: tmp = math.sin((y_46_im * math.log(math.hypot(x_46_im, x_46_re)))) / math.pow(math.exp(y_46_im), math.atan2(x_46_im, x_46_re)) elif y_46_re <= 1e+80: tmp = t_2 else: tmp = math.fabs(t_0) * t_1 return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = sin(Float64(y_46_re * atan(x_46_im, x_46_re))) t_1 = hypot(x_46_im, x_46_re) ^ y_46_re t_2 = Float64(t_0 * t_1) tmp = 0.0 if (y_46_re <= -3.4e-12) tmp = t_2; elseif (y_46_re <= 3.4e-96) tmp = Float64(sin(Float64(y_46_im * log(hypot(x_46_im, x_46_re)))) / (exp(y_46_im) ^ atan(x_46_im, x_46_re))); elseif (y_46_re <= 1e+80) tmp = t_2; else tmp = Float64(abs(t_0) * t_1); end return tmp end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = sin((y_46_re * atan2(x_46_im, x_46_re))); t_1 = hypot(x_46_im, x_46_re) ^ y_46_re; t_2 = t_0 * t_1; tmp = 0.0; if (y_46_re <= -3.4e-12) tmp = t_2; elseif (y_46_re <= 3.4e-96) tmp = sin((y_46_im * log(hypot(x_46_im, x_46_re)))) / (exp(y_46_im) ^ atan2(x_46_im, x_46_re)); elseif (y_46_re <= 1e+80) tmp = t_2; else tmp = abs(t_0) * t_1; end tmp_2 = tmp; end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[Sin[N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$1 = N[Power[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision], y$46$re], $MachinePrecision]}, Block[{t$95$2 = N[(t$95$0 * t$95$1), $MachinePrecision]}, If[LessEqual[y$46$re, -3.4e-12], t$95$2, If[LessEqual[y$46$re, 3.4e-96], N[(N[Sin[N[(y$46$im * N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / N[Power[N[Exp[y$46$im], $MachinePrecision], N[ArcTan[x$46$im / x$46$re], $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$re, 1e+80], t$95$2, N[(N[Abs[t$95$0], $MachinePrecision] * t$95$1), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\\
t_1 := {\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re}\\
t_2 := t\_0 \cdot t\_1\\
\mathbf{if}\;y.re \leq -3.4 \cdot 10^{-12}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;y.re \leq 3.4 \cdot 10^{-96}:\\
\;\;\;\;\frac{\sin \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right)}{{\left(e^{y.im}\right)}^{\tan^{-1}_* \frac{x.im}{x.re}}}\\
\mathbf{elif}\;y.re \leq 10^{+80}:\\
\;\;\;\;t\_2\\
\mathbf{else}:\\
\;\;\;\;\left|t\_0\right| \cdot t\_1\\
\end{array}
\end{array}
if y.re < -3.4000000000000001e-12 or 3.4000000000000001e-96 < y.re < 1e80Initial program 35.9%
exp-diff27.2%
exp-to-pow27.2%
hypot-define27.2%
*-commutative27.2%
exp-prod26.2%
fma-define26.2%
hypot-define63.5%
*-commutative63.5%
Simplified63.5%
Taylor expanded in y.im around 0 59.9%
unpow259.9%
unpow259.9%
hypot-undefine63.8%
Simplified63.8%
if -3.4000000000000001e-12 < y.re < 3.4000000000000001e-96Initial program 46.9%
exp-diff46.9%
exp-to-pow46.9%
hypot-define46.9%
*-commutative46.9%
exp-prod46.9%
fma-define46.9%
hypot-define85.1%
*-commutative85.1%
Simplified85.1%
Taylor expanded in y.re around 0 37.5%
unpow237.5%
unpow237.5%
hypot-undefine67.2%
exp-prod66.8%
Simplified66.8%
if 1e80 < y.re Initial program 26.2%
exp-diff21.4%
exp-to-pow21.4%
hypot-define21.4%
*-commutative21.4%
exp-prod21.4%
fma-define21.4%
hypot-define47.6%
*-commutative47.6%
Simplified47.6%
Taylor expanded in y.im around 0 43.0%
unpow243.0%
unpow243.0%
hypot-undefine43.0%
Simplified43.0%
add-sqr-sqrt21.5%
sqrt-unprod57.3%
pow257.3%
Applied egg-rr57.3%
unpow257.3%
rem-sqrt-square57.3%
Simplified57.3%
Final simplification64.1%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (* y.re (atan2 x.im x.re)))
(t_1 (sin t_0))
(t_2 (pow (hypot x.im x.re) y.re)))
(if (<= y.re -4.8e-12)
(* t_2 (sin (pow (cbrt t_0) 3.0)))
(if (<= y.re 3.4e-96)
(/
(sin (* y.im (log (hypot x.im x.re))))
(pow (exp y.im) (atan2 x.im x.re)))
(if (<= y.re 5e+82) (* t_1 t_2) (* (fabs t_1) 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 = sin(t_0);
double t_2 = pow(hypot(x_46_im, x_46_re), y_46_re);
double tmp;
if (y_46_re <= -4.8e-12) {
tmp = t_2 * sin(pow(cbrt(t_0), 3.0));
} else if (y_46_re <= 3.4e-96) {
tmp = sin((y_46_im * log(hypot(x_46_im, x_46_re)))) / pow(exp(y_46_im), atan2(x_46_im, x_46_re));
} else if (y_46_re <= 5e+82) {
tmp = t_1 * t_2;
} else {
tmp = fabs(t_1) * t_2;
}
return tmp;
}
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = y_46_re * Math.atan2(x_46_im, x_46_re);
double t_1 = Math.sin(t_0);
double t_2 = Math.pow(Math.hypot(x_46_im, x_46_re), y_46_re);
double tmp;
if (y_46_re <= -4.8e-12) {
tmp = t_2 * Math.sin(Math.pow(Math.cbrt(t_0), 3.0));
} else if (y_46_re <= 3.4e-96) {
tmp = Math.sin((y_46_im * Math.log(Math.hypot(x_46_im, x_46_re)))) / Math.pow(Math.exp(y_46_im), Math.atan2(x_46_im, x_46_re));
} else if (y_46_re <= 5e+82) {
tmp = t_1 * t_2;
} else {
tmp = Math.abs(t_1) * 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 = sin(t_0) t_2 = hypot(x_46_im, x_46_re) ^ y_46_re tmp = 0.0 if (y_46_re <= -4.8e-12) tmp = Float64(t_2 * sin((cbrt(t_0) ^ 3.0))); elseif (y_46_re <= 3.4e-96) tmp = Float64(sin(Float64(y_46_im * log(hypot(x_46_im, x_46_re)))) / (exp(y_46_im) ^ atan(x_46_im, x_46_re))); elseif (y_46_re <= 5e+82) tmp = Float64(t_1 * t_2); else tmp = Float64(abs(t_1) * 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[Sin[t$95$0], $MachinePrecision]}, Block[{t$95$2 = N[Power[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision], y$46$re], $MachinePrecision]}, If[LessEqual[y$46$re, -4.8e-12], N[(t$95$2 * N[Sin[N[Power[N[Power[t$95$0, 1/3], $MachinePrecision], 3.0], $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$re, 3.4e-96], N[(N[Sin[N[(y$46$im * N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / N[Power[N[Exp[y$46$im], $MachinePrecision], N[ArcTan[x$46$im / x$46$re], $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$re, 5e+82], N[(t$95$1 * t$95$2), $MachinePrecision], N[(N[Abs[t$95$1], $MachinePrecision] * t$95$2), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
t_1 := \sin t\_0\\
t_2 := {\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re}\\
\mathbf{if}\;y.re \leq -4.8 \cdot 10^{-12}:\\
\;\;\;\;t\_2 \cdot \sin \left({\left(\sqrt[3]{t\_0}\right)}^{3}\right)\\
\mathbf{elif}\;y.re \leq 3.4 \cdot 10^{-96}:\\
\;\;\;\;\frac{\sin \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right)}{{\left(e^{y.im}\right)}^{\tan^{-1}_* \frac{x.im}{x.re}}}\\
\mathbf{elif}\;y.re \leq 5 \cdot 10^{+82}:\\
\;\;\;\;t\_1 \cdot t\_2\\
\mathbf{else}:\\
\;\;\;\;\left|t\_1\right| \cdot t\_2\\
\end{array}
\end{array}
if y.re < -4.79999999999999974e-12Initial program 36.5%
exp-diff23.8%
exp-to-pow23.8%
hypot-define23.8%
*-commutative23.8%
exp-prod22.2%
fma-define22.2%
hypot-define57.4%
*-commutative57.4%
Simplified57.4%
Taylor expanded in y.im around 0 70.2%
unpow270.2%
unpow270.2%
hypot-undefine71.7%
Simplified71.7%
*-commutative71.7%
add-cube-cbrt76.4%
pow376.4%
*-commutative76.4%
Applied egg-rr76.4%
if -4.79999999999999974e-12 < y.re < 3.4000000000000001e-96Initial program 46.9%
exp-diff46.9%
exp-to-pow46.9%
hypot-define46.9%
*-commutative46.9%
exp-prod46.9%
fma-define46.9%
hypot-define85.1%
*-commutative85.1%
Simplified85.1%
Taylor expanded in y.re around 0 37.5%
unpow237.5%
unpow237.5%
hypot-undefine67.2%
exp-prod66.8%
Simplified66.8%
if 3.4000000000000001e-96 < y.re < 5.00000000000000015e82Initial program 35.0%
exp-diff32.5%
exp-to-pow32.5%
hypot-define32.5%
*-commutative32.5%
exp-prod32.5%
fma-define32.5%
hypot-define73.0%
*-commutative73.0%
Simplified73.0%
Taylor expanded in y.im around 0 43.7%
unpow243.7%
unpow243.7%
hypot-undefine51.4%
Simplified51.4%
if 5.00000000000000015e82 < y.re Initial program 26.2%
exp-diff21.4%
exp-to-pow21.4%
hypot-define21.4%
*-commutative21.4%
exp-prod21.4%
fma-define21.4%
hypot-define47.6%
*-commutative47.6%
Simplified47.6%
Taylor expanded in y.im around 0 43.0%
unpow243.0%
unpow243.0%
hypot-undefine43.0%
Simplified43.0%
add-sqr-sqrt21.5%
sqrt-unprod57.3%
pow257.3%
Applied egg-rr57.3%
unpow257.3%
rem-sqrt-square57.3%
Simplified57.3%
Final simplification65.2%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (pow (hypot x.im x.re) y.re)))
(if (<= y.im 6.9e+180)
(* (sin (* y.re (atan2 x.im x.re))) t_0)
(*
t_0
(*
-0.16666666666666666
(* (pow (atan2 x.im x.re) 3.0) (pow y.re 3.0)))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = pow(hypot(x_46_im, x_46_re), y_46_re);
double tmp;
if (y_46_im <= 6.9e+180) {
tmp = sin((y_46_re * atan2(x_46_im, x_46_re))) * t_0;
} else {
tmp = t_0 * (-0.16666666666666666 * (pow(atan2(x_46_im, x_46_re), 3.0) * pow(y_46_re, 3.0)));
}
return tmp;
}
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = Math.pow(Math.hypot(x_46_im, x_46_re), y_46_re);
double tmp;
if (y_46_im <= 6.9e+180) {
tmp = Math.sin((y_46_re * Math.atan2(x_46_im, x_46_re))) * t_0;
} else {
tmp = t_0 * (-0.16666666666666666 * (Math.pow(Math.atan2(x_46_im, x_46_re), 3.0) * Math.pow(y_46_re, 3.0)));
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): t_0 = math.pow(math.hypot(x_46_im, x_46_re), y_46_re) tmp = 0 if y_46_im <= 6.9e+180: tmp = math.sin((y_46_re * math.atan2(x_46_im, x_46_re))) * t_0 else: tmp = t_0 * (-0.16666666666666666 * (math.pow(math.atan2(x_46_im, x_46_re), 3.0) * math.pow(y_46_re, 3.0))) return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = hypot(x_46_im, x_46_re) ^ y_46_re tmp = 0.0 if (y_46_im <= 6.9e+180) tmp = Float64(sin(Float64(y_46_re * atan(x_46_im, x_46_re))) * t_0); else tmp = Float64(t_0 * Float64(-0.16666666666666666 * Float64((atan(x_46_im, x_46_re) ^ 3.0) * (y_46_re ^ 3.0)))); end return tmp end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = hypot(x_46_im, x_46_re) ^ y_46_re; tmp = 0.0; if (y_46_im <= 6.9e+180) tmp = sin((y_46_re * atan2(x_46_im, x_46_re))) * t_0; else tmp = t_0 * (-0.16666666666666666 * ((atan2(x_46_im, x_46_re) ^ 3.0) * (y_46_re ^ 3.0))); end tmp_2 = tmp; end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[Power[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision], y$46$re], $MachinePrecision]}, If[LessEqual[y$46$im, 6.9e+180], N[(N[Sin[N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * t$95$0), $MachinePrecision], N[(t$95$0 * N[(-0.16666666666666666 * N[(N[Power[N[ArcTan[x$46$im / x$46$re], $MachinePrecision], 3.0], $MachinePrecision] * N[Power[y$46$re, 3.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := {\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re}\\
\mathbf{if}\;y.im \leq 6.9 \cdot 10^{+180}:\\
\;\;\;\;\sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot t\_0\\
\mathbf{else}:\\
\;\;\;\;t\_0 \cdot \left(-0.16666666666666666 \cdot \left({\tan^{-1}_* \frac{x.im}{x.re}}^{3} \cdot {y.re}^{3}\right)\right)\\
\end{array}
\end{array}
if y.im < 6.8999999999999996e180Initial program 40.1%
exp-diff36.1%
exp-to-pow36.1%
hypot-define36.1%
*-commutative36.1%
exp-prod35.6%
fma-define35.6%
hypot-define71.9%
*-commutative71.9%
Simplified71.9%
Taylor expanded in y.im around 0 40.4%
unpow240.4%
unpow240.4%
hypot-undefine45.3%
Simplified45.3%
if 6.8999999999999996e180 < y.im Initial program 32.4%
exp-diff26.5%
exp-to-pow26.5%
hypot-define26.5%
*-commutative26.5%
exp-prod26.5%
fma-define26.5%
hypot-define59.5%
*-commutative59.5%
Simplified59.5%
Taylor expanded in y.im around 0 33.7%
unpow233.7%
unpow233.7%
hypot-undefine11.5%
Simplified11.5%
Taylor expanded in y.re around 0 11.4%
Taylor expanded in y.re around inf 39.1%
*-commutative39.1%
Simplified39.1%
Final simplification44.5%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (sin (* y.re (atan2 x.im x.re)))))
(if (<= y.im 2.95e+203)
(* t_0 (pow (hypot x.im x.re) y.re))
(fabs (log (exp t_0))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = sin((y_46_re * atan2(x_46_im, x_46_re)));
double tmp;
if (y_46_im <= 2.95e+203) {
tmp = t_0 * pow(hypot(x_46_im, x_46_re), y_46_re);
} else {
tmp = fabs(log(exp(t_0)));
}
return tmp;
}
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = Math.sin((y_46_re * Math.atan2(x_46_im, x_46_re)));
double tmp;
if (y_46_im <= 2.95e+203) {
tmp = t_0 * Math.pow(Math.hypot(x_46_im, x_46_re), y_46_re);
} else {
tmp = Math.abs(Math.log(Math.exp(t_0)));
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): t_0 = math.sin((y_46_re * math.atan2(x_46_im, x_46_re))) tmp = 0 if y_46_im <= 2.95e+203: tmp = t_0 * math.pow(math.hypot(x_46_im, x_46_re), y_46_re) else: tmp = math.fabs(math.log(math.exp(t_0))) return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = sin(Float64(y_46_re * atan(x_46_im, x_46_re))) tmp = 0.0 if (y_46_im <= 2.95e+203) tmp = Float64(t_0 * (hypot(x_46_im, x_46_re) ^ y_46_re)); else tmp = abs(log(exp(t_0))); end return tmp end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = sin((y_46_re * atan2(x_46_im, x_46_re))); tmp = 0.0; if (y_46_im <= 2.95e+203) tmp = t_0 * (hypot(x_46_im, x_46_re) ^ y_46_re); else tmp = abs(log(exp(t_0))); end tmp_2 = tmp; end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[Sin[N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[y$46$im, 2.95e+203], N[(t$95$0 * N[Power[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision], y$46$re], $MachinePrecision]), $MachinePrecision], N[Abs[N[Log[N[Exp[t$95$0], $MachinePrecision]], $MachinePrecision]], $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\\
\mathbf{if}\;y.im \leq 2.95 \cdot 10^{+203}:\\
\;\;\;\;t\_0 \cdot {\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re}\\
\mathbf{else}:\\
\;\;\;\;\left|\log \left(e^{t\_0}\right)\right|\\
\end{array}
\end{array}
if y.im < 2.94999999999999986e203Initial program 39.2%
exp-diff35.3%
exp-to-pow35.3%
hypot-define35.3%
*-commutative35.3%
exp-prod34.8%
fma-define34.8%
hypot-define71.3%
*-commutative71.3%
Simplified71.3%
Taylor expanded in y.im around 0 40.9%
unpow240.9%
unpow240.9%
hypot-undefine44.8%
Simplified44.8%
if 2.94999999999999986e203 < y.im Initial program 37.9%
exp-diff31.0%
exp-to-pow31.0%
hypot-define31.0%
*-commutative31.0%
exp-prod31.0%
fma-define31.0%
hypot-define62.1%
*-commutative62.1%
Simplified62.1%
Taylor expanded in y.im around 0 29.2%
unpow229.2%
unpow229.2%
hypot-undefine9.7%
Simplified9.7%
add-sqr-sqrt3.9%
sqrt-unprod35.7%
pow235.7%
Applied egg-rr35.7%
unpow235.7%
rem-sqrt-square13.1%
Simplified13.1%
Taylor expanded in y.re around 0 3.4%
add-log-exp39.2%
Applied egg-rr39.2%
Final simplification44.2%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(if (or (<= y.re -3.1e+15) (not (<= y.re 2.65e-105)))
(* (fabs (sin (* y.re (atan2 x.im x.re)))) (pow x.im y.re))
(*
y.re
(+ (atan2 x.im x.re) (* y.re (* (atan2 x.im x.re) (log (- x.re))))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double tmp;
if ((y_46_re <= -3.1e+15) || !(y_46_re <= 2.65e-105)) {
tmp = fabs(sin((y_46_re * atan2(x_46_im, x_46_re)))) * pow(x_46_im, y_46_re);
} else {
tmp = y_46_re * (atan2(x_46_im, x_46_re) + (y_46_re * (atan2(x_46_im, x_46_re) * log(-x_46_re))));
}
return tmp;
}
real(8) function code(x_46re, x_46im, y_46re, y_46im)
real(8), intent (in) :: x_46re
real(8), intent (in) :: x_46im
real(8), intent (in) :: y_46re
real(8), intent (in) :: y_46im
real(8) :: tmp
if ((y_46re <= (-3.1d+15)) .or. (.not. (y_46re <= 2.65d-105))) then
tmp = abs(sin((y_46re * atan2(x_46im, x_46re)))) * (x_46im ** y_46re)
else
tmp = y_46re * (atan2(x_46im, x_46re) + (y_46re * (atan2(x_46im, x_46re) * log(-x_46re))))
end if
code = tmp
end function
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double tmp;
if ((y_46_re <= -3.1e+15) || !(y_46_re <= 2.65e-105)) {
tmp = Math.abs(Math.sin((y_46_re * Math.atan2(x_46_im, x_46_re)))) * Math.pow(x_46_im, y_46_re);
} else {
tmp = y_46_re * (Math.atan2(x_46_im, x_46_re) + (y_46_re * (Math.atan2(x_46_im, x_46_re) * Math.log(-x_46_re))));
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): tmp = 0 if (y_46_re <= -3.1e+15) or not (y_46_re <= 2.65e-105): tmp = math.fabs(math.sin((y_46_re * math.atan2(x_46_im, x_46_re)))) * math.pow(x_46_im, y_46_re) else: tmp = y_46_re * (math.atan2(x_46_im, x_46_re) + (y_46_re * (math.atan2(x_46_im, x_46_re) * math.log(-x_46_re)))) return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) tmp = 0.0 if ((y_46_re <= -3.1e+15) || !(y_46_re <= 2.65e-105)) tmp = Float64(abs(sin(Float64(y_46_re * atan(x_46_im, x_46_re)))) * (x_46_im ^ y_46_re)); else tmp = Float64(y_46_re * Float64(atan(x_46_im, x_46_re) + Float64(y_46_re * Float64(atan(x_46_im, x_46_re) * log(Float64(-x_46_re)))))); end return tmp end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im) tmp = 0.0; if ((y_46_re <= -3.1e+15) || ~((y_46_re <= 2.65e-105))) tmp = abs(sin((y_46_re * atan2(x_46_im, x_46_re)))) * (x_46_im ^ y_46_re); else tmp = y_46_re * (atan2(x_46_im, x_46_re) + (y_46_re * (atan2(x_46_im, x_46_re) * log(-x_46_re)))); end tmp_2 = tmp; end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := If[Or[LessEqual[y$46$re, -3.1e+15], N[Not[LessEqual[y$46$re, 2.65e-105]], $MachinePrecision]], N[(N[Abs[N[Sin[N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision] * N[Power[x$46$im, y$46$re], $MachinePrecision]), $MachinePrecision], N[(y$46$re * N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] + N[(y$46$re * N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * N[Log[(-x$46$re)], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y.re \leq -3.1 \cdot 10^{+15} \lor \neg \left(y.re \leq 2.65 \cdot 10^{-105}\right):\\
\;\;\;\;\left|\sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right| \cdot {x.im}^{y.re}\\
\mathbf{else}:\\
\;\;\;\;y.re \cdot \left(\tan^{-1}_* \frac{x.im}{x.re} + y.re \cdot \left(\tan^{-1}_* \frac{x.im}{x.re} \cdot \log \left(-x.re\right)\right)\right)\\
\end{array}
\end{array}
if y.re < -3.1e15 or 2.6500000000000001e-105 < y.re Initial program 34.0%
exp-diff26.2%
exp-to-pow26.2%
hypot-define26.2%
*-commutative26.2%
exp-prod25.5%
fma-define25.5%
hypot-define57.6%
*-commutative57.6%
Simplified57.6%
Taylor expanded in y.im around 0 52.3%
unpow252.3%
unpow252.3%
hypot-undefine54.6%
Simplified54.6%
add-sqr-sqrt29.3%
sqrt-unprod51.0%
pow251.0%
Applied egg-rr51.0%
unpow251.0%
rem-sqrt-square50.4%
Simplified50.4%
Taylor expanded in x.re around 0 43.0%
if -3.1e15 < y.re < 2.6500000000000001e-105Initial program 45.3%
exp-diff45.3%
exp-to-pow45.3%
hypot-define45.3%
*-commutative45.3%
exp-prod45.3%
fma-define45.3%
hypot-define85.8%
*-commutative85.8%
Simplified85.8%
Taylor expanded in y.im around 0 23.9%
unpow223.9%
unpow223.9%
hypot-undefine23.9%
Simplified23.9%
Taylor expanded in y.re around 0 23.1%
Taylor expanded in y.re around 0 16.6%
Taylor expanded in x.re around -inf 14.2%
mul-1-neg14.2%
Simplified14.2%
Final simplification30.1%
(FPCore (x.re x.im y.re y.im) :precision binary64 (if (<= y.im 7.6e+185) (* (sin (* y.re (atan2 x.im x.re))) (pow (hypot x.im x.re) y.re)) (* (atan2 x.im x.re) (* (log (hypot x.im x.re)) (pow y.re 2.0)))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double tmp;
if (y_46_im <= 7.6e+185) {
tmp = sin((y_46_re * atan2(x_46_im, x_46_re))) * pow(hypot(x_46_im, x_46_re), y_46_re);
} else {
tmp = atan2(x_46_im, x_46_re) * (log(hypot(x_46_im, x_46_re)) * pow(y_46_re, 2.0));
}
return tmp;
}
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double tmp;
if (y_46_im <= 7.6e+185) {
tmp = Math.sin((y_46_re * Math.atan2(x_46_im, x_46_re))) * Math.pow(Math.hypot(x_46_im, x_46_re), y_46_re);
} else {
tmp = Math.atan2(x_46_im, x_46_re) * (Math.log(Math.hypot(x_46_im, x_46_re)) * Math.pow(y_46_re, 2.0));
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): tmp = 0 if y_46_im <= 7.6e+185: tmp = math.sin((y_46_re * math.atan2(x_46_im, x_46_re))) * math.pow(math.hypot(x_46_im, x_46_re), y_46_re) else: tmp = math.atan2(x_46_im, x_46_re) * (math.log(math.hypot(x_46_im, x_46_re)) * math.pow(y_46_re, 2.0)) return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) tmp = 0.0 if (y_46_im <= 7.6e+185) tmp = Float64(sin(Float64(y_46_re * atan(x_46_im, x_46_re))) * (hypot(x_46_im, x_46_re) ^ y_46_re)); else tmp = Float64(atan(x_46_im, x_46_re) * Float64(log(hypot(x_46_im, x_46_re)) * (y_46_re ^ 2.0))); end return tmp end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im) tmp = 0.0; if (y_46_im <= 7.6e+185) tmp = sin((y_46_re * atan2(x_46_im, x_46_re))) * (hypot(x_46_im, x_46_re) ^ y_46_re); else tmp = atan2(x_46_im, x_46_re) * (log(hypot(x_46_im, x_46_re)) * (y_46_re ^ 2.0)); end tmp_2 = tmp; end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := If[LessEqual[y$46$im, 7.6e+185], N[(N[Sin[N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Power[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision], y$46$re], $MachinePrecision]), $MachinePrecision], N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * N[(N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision] * N[Power[y$46$re, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y.im \leq 7.6 \cdot 10^{+185}:\\
\;\;\;\;\sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re}\\
\mathbf{else}:\\
\;\;\;\;\tan^{-1}_* \frac{x.im}{x.re} \cdot \left(\log \left(\mathsf{hypot}\left(x.im, x.re\right)\right) \cdot {y.re}^{2}\right)\\
\end{array}
\end{array}
if y.im < 7.5999999999999996e185Initial program 40.1%
exp-diff36.1%
exp-to-pow36.1%
hypot-define36.1%
*-commutative36.1%
exp-prod35.6%
fma-define35.6%
hypot-define71.9%
*-commutative71.9%
Simplified71.9%
Taylor expanded in y.im around 0 40.4%
unpow240.4%
unpow240.4%
hypot-undefine45.3%
Simplified45.3%
if 7.5999999999999996e185 < y.im Initial program 32.4%
exp-diff26.5%
exp-to-pow26.5%
hypot-define26.5%
*-commutative26.5%
exp-prod26.5%
fma-define26.5%
hypot-define59.5%
*-commutative59.5%
Simplified59.5%
Taylor expanded in y.im around 0 33.7%
unpow233.7%
unpow233.7%
hypot-undefine11.5%
Simplified11.5%
Taylor expanded in y.re around 0 11.4%
Taylor expanded in y.re around 0 22.5%
Taylor expanded in y.re around inf 24.5%
associate-*r*24.5%
unpow224.5%
unpow224.5%
hypot-undefine30.3%
Simplified30.3%
Final simplification43.3%
(FPCore (x.re x.im y.re y.im) :precision binary64 (* (sin (* y.re (atan2 x.im x.re))) (pow (hypot x.im x.re) y.re)))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
return sin((y_46_re * atan2(x_46_im, x_46_re))) * pow(hypot(x_46_im, x_46_re), y_46_re);
}
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.pow(Math.hypot(x_46_im, x_46_re), y_46_re);
}
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.pow(math.hypot(x_46_im, x_46_re), y_46_re)
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))) * (hypot(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) tmp = sin((y_46_re * atan2(x_46_im, x_46_re))) * (hypot(x_46_im, x_46_re) ^ y_46_re); 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[Power[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision], y$46$re], $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re}
\end{array}
Initial program 39.1%
exp-diff34.8%
exp-to-pow34.8%
hypot-define34.8%
*-commutative34.8%
exp-prod34.4%
fma-define34.4%
hypot-define70.3%
*-commutative70.3%
Simplified70.3%
Taylor expanded in y.im around 0 39.6%
unpow239.6%
unpow239.6%
hypot-undefine40.8%
Simplified40.8%
Final simplification40.8%
(FPCore (x.re x.im y.re y.im) :precision binary64 (if (<= x.im -5e-312) (* y.re (+ (atan2 x.im x.re) (* y.re (* (atan2 x.im x.re) (log (- x.im)))))) (* y.re (+ (atan2 x.im x.re) (* y.re (* (atan2 x.im x.re) (log x.im)))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double tmp;
if (x_46_im <= -5e-312) {
tmp = y_46_re * (atan2(x_46_im, x_46_re) + (y_46_re * (atan2(x_46_im, x_46_re) * log(-x_46_im))));
} else {
tmp = y_46_re * (atan2(x_46_im, x_46_re) + (y_46_re * (atan2(x_46_im, x_46_re) * log(x_46_im))));
}
return tmp;
}
real(8) function code(x_46re, x_46im, y_46re, y_46im)
real(8), intent (in) :: x_46re
real(8), intent (in) :: x_46im
real(8), intent (in) :: y_46re
real(8), intent (in) :: y_46im
real(8) :: tmp
if (x_46im <= (-5d-312)) then
tmp = y_46re * (atan2(x_46im, x_46re) + (y_46re * (atan2(x_46im, x_46re) * log(-x_46im))))
else
tmp = y_46re * (atan2(x_46im, x_46re) + (y_46re * (atan2(x_46im, x_46re) * log(x_46im))))
end if
code = tmp
end function
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double tmp;
if (x_46_im <= -5e-312) {
tmp = y_46_re * (Math.atan2(x_46_im, x_46_re) + (y_46_re * (Math.atan2(x_46_im, x_46_re) * Math.log(-x_46_im))));
} else {
tmp = y_46_re * (Math.atan2(x_46_im, x_46_re) + (y_46_re * (Math.atan2(x_46_im, x_46_re) * Math.log(x_46_im))));
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): tmp = 0 if x_46_im <= -5e-312: tmp = y_46_re * (math.atan2(x_46_im, x_46_re) + (y_46_re * (math.atan2(x_46_im, x_46_re) * math.log(-x_46_im)))) else: tmp = y_46_re * (math.atan2(x_46_im, x_46_re) + (y_46_re * (math.atan2(x_46_im, x_46_re) * math.log(x_46_im)))) return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) tmp = 0.0 if (x_46_im <= -5e-312) tmp = Float64(y_46_re * Float64(atan(x_46_im, x_46_re) + Float64(y_46_re * Float64(atan(x_46_im, x_46_re) * log(Float64(-x_46_im)))))); else tmp = Float64(y_46_re * Float64(atan(x_46_im, x_46_re) + Float64(y_46_re * Float64(atan(x_46_im, x_46_re) * log(x_46_im))))); end return tmp end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im) tmp = 0.0; if (x_46_im <= -5e-312) tmp = y_46_re * (atan2(x_46_im, x_46_re) + (y_46_re * (atan2(x_46_im, x_46_re) * log(-x_46_im)))); else tmp = y_46_re * (atan2(x_46_im, x_46_re) + (y_46_re * (atan2(x_46_im, x_46_re) * log(x_46_im)))); end tmp_2 = tmp; end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := If[LessEqual[x$46$im, -5e-312], N[(y$46$re * N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] + N[(y$46$re * N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * N[Log[(-x$46$im)], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(y$46$re * N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] + N[(y$46$re * N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * N[Log[x$46$im], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x.im \leq -5 \cdot 10^{-312}:\\
\;\;\;\;y.re \cdot \left(\tan^{-1}_* \frac{x.im}{x.re} + y.re \cdot \left(\tan^{-1}_* \frac{x.im}{x.re} \cdot \log \left(-x.im\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;y.re \cdot \left(\tan^{-1}_* \frac{x.im}{x.re} + y.re \cdot \left(\tan^{-1}_* \frac{x.im}{x.re} \cdot \log x.im\right)\right)\\
\end{array}
\end{array}
if x.im < -5.0000000000022e-312Initial program 37.7%
exp-diff33.4%
exp-to-pow33.4%
hypot-define33.4%
*-commutative33.4%
exp-prod32.7%
fma-define32.7%
hypot-define67.1%
*-commutative67.1%
Simplified67.1%
Taylor expanded in y.im around 0 39.3%
unpow239.3%
unpow239.3%
hypot-undefine39.9%
Simplified39.9%
Taylor expanded in y.re around 0 28.5%
Taylor expanded in y.re around 0 21.0%
Taylor expanded in x.im around -inf 15.5%
mul-1-neg15.5%
Simplified15.5%
if -5.0000000000022e-312 < x.im Initial program 40.8%
exp-diff36.5%
exp-to-pow36.5%
hypot-define36.5%
*-commutative36.5%
exp-prod36.5%
fma-define36.5%
hypot-define74.1%
*-commutative74.1%
Simplified74.1%
Taylor expanded in y.im around 0 39.9%
unpow239.9%
unpow239.9%
hypot-undefine41.9%
Simplified41.9%
Taylor expanded in y.re around 0 30.6%
Taylor expanded in y.re around 0 23.5%
Taylor expanded in x.im around inf 28.2%
mul-1-neg28.2%
distribute-lft-neg-in28.2%
log-rec28.2%
remove-double-neg28.2%
*-commutative28.2%
Simplified28.2%
Final simplification21.2%
(FPCore (x.re x.im y.re y.im) :precision binary64 (if (<= x.im 2.5e-298) (* y.re (* (atan2 x.im x.re) (+ 1.0 (* y.re (log x.re))))) (* y.re (+ (atan2 x.im x.re) (* y.re (* (atan2 x.im x.re) (log x.im)))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double tmp;
if (x_46_im <= 2.5e-298) {
tmp = y_46_re * (atan2(x_46_im, x_46_re) * (1.0 + (y_46_re * log(x_46_re))));
} else {
tmp = y_46_re * (atan2(x_46_im, x_46_re) + (y_46_re * (atan2(x_46_im, x_46_re) * log(x_46_im))));
}
return tmp;
}
real(8) function code(x_46re, x_46im, y_46re, y_46im)
real(8), intent (in) :: x_46re
real(8), intent (in) :: x_46im
real(8), intent (in) :: y_46re
real(8), intent (in) :: y_46im
real(8) :: tmp
if (x_46im <= 2.5d-298) then
tmp = y_46re * (atan2(x_46im, x_46re) * (1.0d0 + (y_46re * log(x_46re))))
else
tmp = y_46re * (atan2(x_46im, x_46re) + (y_46re * (atan2(x_46im, x_46re) * log(x_46im))))
end if
code = tmp
end function
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double tmp;
if (x_46_im <= 2.5e-298) {
tmp = y_46_re * (Math.atan2(x_46_im, x_46_re) * (1.0 + (y_46_re * Math.log(x_46_re))));
} else {
tmp = y_46_re * (Math.atan2(x_46_im, x_46_re) + (y_46_re * (Math.atan2(x_46_im, x_46_re) * Math.log(x_46_im))));
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): tmp = 0 if x_46_im <= 2.5e-298: tmp = y_46_re * (math.atan2(x_46_im, x_46_re) * (1.0 + (y_46_re * math.log(x_46_re)))) else: tmp = y_46_re * (math.atan2(x_46_im, x_46_re) + (y_46_re * (math.atan2(x_46_im, x_46_re) * math.log(x_46_im)))) return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) tmp = 0.0 if (x_46_im <= 2.5e-298) tmp = Float64(y_46_re * Float64(atan(x_46_im, x_46_re) * Float64(1.0 + Float64(y_46_re * log(x_46_re))))); else tmp = Float64(y_46_re * Float64(atan(x_46_im, x_46_re) + Float64(y_46_re * Float64(atan(x_46_im, x_46_re) * log(x_46_im))))); end return tmp end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im) tmp = 0.0; if (x_46_im <= 2.5e-298) tmp = y_46_re * (atan2(x_46_im, x_46_re) * (1.0 + (y_46_re * log(x_46_re)))); else tmp = y_46_re * (atan2(x_46_im, x_46_re) + (y_46_re * (atan2(x_46_im, x_46_re) * log(x_46_im)))); end tmp_2 = tmp; end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := If[LessEqual[x$46$im, 2.5e-298], N[(y$46$re * N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * N[(1.0 + N[(y$46$re * N[Log[x$46$re], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(y$46$re * N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] + N[(y$46$re * N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * N[Log[x$46$im], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x.im \leq 2.5 \cdot 10^{-298}:\\
\;\;\;\;y.re \cdot \left(\tan^{-1}_* \frac{x.im}{x.re} \cdot \left(1 + y.re \cdot \log x.re\right)\right)\\
\mathbf{else}:\\
\;\;\;\;y.re \cdot \left(\tan^{-1}_* \frac{x.im}{x.re} + y.re \cdot \left(\tan^{-1}_* \frac{x.im}{x.re} \cdot \log x.im\right)\right)\\
\end{array}
\end{array}
if x.im < 2.5000000000000001e-298Initial program 37.6%
exp-diff33.4%
exp-to-pow33.4%
hypot-define33.4%
*-commutative33.4%
exp-prod32.7%
fma-define32.7%
hypot-define67.1%
*-commutative67.1%
Simplified67.1%
Taylor expanded in y.im around 0 39.2%
unpow239.2%
unpow239.2%
hypot-undefine39.8%
Simplified39.8%
Taylor expanded in y.re around 0 28.0%
Taylor expanded in y.re around 0 20.6%
Taylor expanded in x.im around 0 6.1%
+-commutative6.1%
remove-double-neg6.1%
log-rec6.1%
distribute-lft-neg-in6.1%
distribute-rgt-neg-in6.1%
mul-1-neg6.1%
mul-1-neg6.1%
distribute-rgt-neg-in6.1%
distribute-lft-neg-in6.1%
log-rec6.1%
remove-double-neg6.1%
associate-*r*6.1%
distribute-rgt1-in6.1%
Simplified6.1%
if 2.5000000000000001e-298 < x.im Initial program 41.0%
exp-diff36.5%
exp-to-pow36.5%
hypot-define36.5%
*-commutative36.5%
exp-prod36.5%
fma-define36.5%
hypot-define74.3%
*-commutative74.3%
Simplified74.3%
Taylor expanded in y.im around 0 40.0%
unpow240.0%
unpow240.0%
hypot-undefine42.1%
Simplified42.1%
Taylor expanded in y.re around 0 31.4%
Taylor expanded in y.re around 0 24.1%
Taylor expanded in x.im around inf 28.9%
mul-1-neg28.9%
distribute-lft-neg-in28.9%
log-rec28.9%
remove-double-neg28.9%
*-commutative28.9%
Simplified28.9%
Final simplification16.0%
(FPCore (x.re x.im y.re y.im) :precision binary64 (if (<= x.im 2.5e-298) (* y.re (* (atan2 x.im x.re) (+ 1.0 (* y.re (log x.re))))) (* y.re (* (atan2 x.im x.re) (+ 1.0 (* y.re (log x.im)))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double tmp;
if (x_46_im <= 2.5e-298) {
tmp = y_46_re * (atan2(x_46_im, x_46_re) * (1.0 + (y_46_re * log(x_46_re))));
} else {
tmp = y_46_re * (atan2(x_46_im, x_46_re) * (1.0 + (y_46_re * log(x_46_im))));
}
return tmp;
}
real(8) function code(x_46re, x_46im, y_46re, y_46im)
real(8), intent (in) :: x_46re
real(8), intent (in) :: x_46im
real(8), intent (in) :: y_46re
real(8), intent (in) :: y_46im
real(8) :: tmp
if (x_46im <= 2.5d-298) then
tmp = y_46re * (atan2(x_46im, x_46re) * (1.0d0 + (y_46re * log(x_46re))))
else
tmp = y_46re * (atan2(x_46im, x_46re) * (1.0d0 + (y_46re * log(x_46im))))
end if
code = tmp
end function
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double tmp;
if (x_46_im <= 2.5e-298) {
tmp = y_46_re * (Math.atan2(x_46_im, x_46_re) * (1.0 + (y_46_re * Math.log(x_46_re))));
} else {
tmp = y_46_re * (Math.atan2(x_46_im, x_46_re) * (1.0 + (y_46_re * Math.log(x_46_im))));
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): tmp = 0 if x_46_im <= 2.5e-298: tmp = y_46_re * (math.atan2(x_46_im, x_46_re) * (1.0 + (y_46_re * math.log(x_46_re)))) else: tmp = y_46_re * (math.atan2(x_46_im, x_46_re) * (1.0 + (y_46_re * math.log(x_46_im)))) return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) tmp = 0.0 if (x_46_im <= 2.5e-298) tmp = Float64(y_46_re * Float64(atan(x_46_im, x_46_re) * Float64(1.0 + Float64(y_46_re * log(x_46_re))))); else tmp = Float64(y_46_re * Float64(atan(x_46_im, x_46_re) * Float64(1.0 + Float64(y_46_re * log(x_46_im))))); end return tmp end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im) tmp = 0.0; if (x_46_im <= 2.5e-298) tmp = y_46_re * (atan2(x_46_im, x_46_re) * (1.0 + (y_46_re * log(x_46_re)))); else tmp = y_46_re * (atan2(x_46_im, x_46_re) * (1.0 + (y_46_re * log(x_46_im)))); end tmp_2 = tmp; end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := If[LessEqual[x$46$im, 2.5e-298], N[(y$46$re * N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * N[(1.0 + N[(y$46$re * N[Log[x$46$re], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(y$46$re * N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * N[(1.0 + N[(y$46$re * N[Log[x$46$im], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x.im \leq 2.5 \cdot 10^{-298}:\\
\;\;\;\;y.re \cdot \left(\tan^{-1}_* \frac{x.im}{x.re} \cdot \left(1 + y.re \cdot \log x.re\right)\right)\\
\mathbf{else}:\\
\;\;\;\;y.re \cdot \left(\tan^{-1}_* \frac{x.im}{x.re} \cdot \left(1 + y.re \cdot \log x.im\right)\right)\\
\end{array}
\end{array}
if x.im < 2.5000000000000001e-298Initial program 37.6%
exp-diff33.4%
exp-to-pow33.4%
hypot-define33.4%
*-commutative33.4%
exp-prod32.7%
fma-define32.7%
hypot-define67.1%
*-commutative67.1%
Simplified67.1%
Taylor expanded in y.im around 0 39.2%
unpow239.2%
unpow239.2%
hypot-undefine39.8%
Simplified39.8%
Taylor expanded in y.re around 0 28.0%
Taylor expanded in y.re around 0 20.6%
Taylor expanded in x.im around 0 6.1%
+-commutative6.1%
remove-double-neg6.1%
log-rec6.1%
distribute-lft-neg-in6.1%
distribute-rgt-neg-in6.1%
mul-1-neg6.1%
mul-1-neg6.1%
distribute-rgt-neg-in6.1%
distribute-lft-neg-in6.1%
log-rec6.1%
remove-double-neg6.1%
associate-*r*6.1%
distribute-rgt1-in6.1%
Simplified6.1%
if 2.5000000000000001e-298 < x.im Initial program 41.0%
exp-diff36.5%
exp-to-pow36.5%
hypot-define36.5%
*-commutative36.5%
exp-prod36.5%
fma-define36.5%
hypot-define74.3%
*-commutative74.3%
Simplified74.3%
Taylor expanded in y.im around 0 40.0%
unpow240.0%
unpow240.0%
hypot-undefine42.1%
Simplified42.1%
Taylor expanded in y.re around 0 31.4%
Taylor expanded in y.re around 0 24.1%
Taylor expanded in x.im around inf 28.9%
mul-1-neg28.9%
distribute-rgt-neg-in28.9%
distribute-lft-neg-in28.9%
log-rec28.9%
remove-double-neg28.9%
associate-*r*28.9%
distribute-lft1-in28.9%
Simplified28.9%
Final simplification16.0%
(FPCore (x.re x.im y.re y.im) :precision binary64 (* y.re (* (atan2 x.im x.re) (+ 1.0 (* y.re (log x.im))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
return y_46_re * (atan2(x_46_im, x_46_re) * (1.0 + (y_46_re * log(x_46_im))));
}
real(8) function code(x_46re, x_46im, y_46re, y_46im)
real(8), intent (in) :: x_46re
real(8), intent (in) :: x_46im
real(8), intent (in) :: y_46re
real(8), intent (in) :: y_46im
code = y_46re * (atan2(x_46im, x_46re) * (1.0d0 + (y_46re * log(x_46im))))
end function
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
return y_46_re * (Math.atan2(x_46_im, x_46_re) * (1.0 + (y_46_re * Math.log(x_46_im))));
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): return y_46_re * (math.atan2(x_46_im, x_46_re) * (1.0 + (y_46_re * math.log(x_46_im))))
function code(x_46_re, x_46_im, y_46_re, y_46_im) return Float64(y_46_re * Float64(atan(x_46_im, x_46_re) * Float64(1.0 + Float64(y_46_re * log(x_46_im))))) end
function tmp = code(x_46_re, x_46_im, y_46_re, y_46_im) tmp = y_46_re * (atan2(x_46_im, x_46_re) * (1.0 + (y_46_re * log(x_46_im)))); end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := N[(y$46$re * N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * N[(1.0 + N[(y$46$re * N[Log[x$46$im], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
y.re \cdot \left(\tan^{-1}_* \frac{x.im}{x.re} \cdot \left(1 + y.re \cdot \log x.im\right)\right)
\end{array}
Initial program 39.1%
exp-diff34.8%
exp-to-pow34.8%
hypot-define34.8%
*-commutative34.8%
exp-prod34.4%
fma-define34.4%
hypot-define70.3%
*-commutative70.3%
Simplified70.3%
Taylor expanded in y.im around 0 39.6%
unpow239.6%
unpow239.6%
hypot-undefine40.8%
Simplified40.8%
Taylor expanded in y.re around 0 29.5%
Taylor expanded in y.re around 0 22.1%
Taylor expanded in x.im around inf 12.7%
mul-1-neg12.7%
distribute-rgt-neg-in12.7%
distribute-lft-neg-in12.7%
log-rec12.7%
remove-double-neg12.7%
associate-*r*12.7%
distribute-lft1-in12.7%
Simplified12.7%
Final simplification12.7%
herbie shell --seed 2024078
(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)))))