
(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 (* y.im (atan2 x.im x.re)))
(t_1 (* y.re (atan2 x.im x.re)))
(t_2 (log (hypot x.re x.im))))
(if (<= x.im -1.6e-282)
(*
(exp (* y.re (- (log (hypot x.im x.re)) (/ t_0 y.re))))
(+ (sin t_1) (* y.im (* (cos t_1) t_2))))
(*
(exp (pow (cbrt (- (* y.re t_2) t_0)) 3.0))
(pow (cbrt (sin (fma y.im (cbrt (pow t_2 3.0)) t_1))) 3.0)))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = y_46_im * atan2(x_46_im, x_46_re);
double t_1 = y_46_re * atan2(x_46_im, x_46_re);
double t_2 = log(hypot(x_46_re, x_46_im));
double tmp;
if (x_46_im <= -1.6e-282) {
tmp = exp((y_46_re * (log(hypot(x_46_im, x_46_re)) - (t_0 / y_46_re)))) * (sin(t_1) + (y_46_im * (cos(t_1) * t_2)));
} else {
tmp = exp(pow(cbrt(((y_46_re * t_2) - t_0)), 3.0)) * pow(cbrt(sin(fma(y_46_im, cbrt(pow(t_2, 3.0)), t_1))), 3.0);
}
return tmp;
}
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = Float64(y_46_im * atan(x_46_im, x_46_re)) t_1 = Float64(y_46_re * atan(x_46_im, x_46_re)) t_2 = log(hypot(x_46_re, x_46_im)) tmp = 0.0 if (x_46_im <= -1.6e-282) tmp = Float64(exp(Float64(y_46_re * Float64(log(hypot(x_46_im, x_46_re)) - Float64(t_0 / y_46_re)))) * Float64(sin(t_1) + Float64(y_46_im * Float64(cos(t_1) * t_2)))); else tmp = Float64(exp((cbrt(Float64(Float64(y_46_re * t_2) - t_0)) ^ 3.0)) * (cbrt(sin(fma(y_46_im, cbrt((t_2 ^ 3.0)), t_1))) ^ 3.0)); end return tmp end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[(y$46$im * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[Log[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision]], $MachinePrecision]}, If[LessEqual[x$46$im, -1.6e-282], N[(N[Exp[N[(y$46$re * N[(N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision] - N[(t$95$0 / y$46$re), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(N[Sin[t$95$1], $MachinePrecision] + N[(y$46$im * N[(N[Cos[t$95$1], $MachinePrecision] * t$95$2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[Exp[N[Power[N[Power[N[(N[(y$46$re * t$95$2), $MachinePrecision] - t$95$0), $MachinePrecision], 1/3], $MachinePrecision], 3.0], $MachinePrecision]], $MachinePrecision] * N[Power[N[Power[N[Sin[N[(y$46$im * N[Power[N[Power[t$95$2, 3.0], $MachinePrecision], 1/3], $MachinePrecision] + t$95$1), $MachinePrecision]], $MachinePrecision], 1/3], $MachinePrecision], 3.0], $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
t_1 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
t_2 := \log \left(\mathsf{hypot}\left(x.re, x.im\right)\right)\\
\mathbf{if}\;x.im \leq -1.6 \cdot 10^{-282}:\\
\;\;\;\;e^{y.re \cdot \left(\log \left(\mathsf{hypot}\left(x.im, x.re\right)\right) - \frac{t\_0}{y.re}\right)} \cdot \left(\sin t\_1 + y.im \cdot \left(\cos t\_1 \cdot t\_2\right)\right)\\
\mathbf{else}:\\
\;\;\;\;e^{{\left(\sqrt[3]{y.re \cdot t\_2 - t\_0}\right)}^{3}} \cdot {\left(\sqrt[3]{\sin \left(\mathsf{fma}\left(y.im, \sqrt[3]{{t\_2}^{3}}, t\_1\right)\right)}\right)}^{3}\\
\end{array}
\end{array}
if x.im < -1.59999999999999991e-282Initial program 34.2%
cancel-sign-sub-inv34.2%
fma-define34.2%
hypot-define34.2%
distribute-lft-neg-in34.2%
distribute-rgt-neg-out34.2%
fma-define34.2%
hypot-define77.3%
*-commutative77.3%
Simplified77.3%
Taylor expanded in y.re around inf 55.4%
unpow255.4%
unpow255.4%
hypot-undefine77.3%
associate-*r/77.3%
neg-mul-177.3%
distribute-lft-neg-in77.3%
Simplified77.3%
Taylor expanded in y.im around 0 50.6%
+-commutative50.6%
unpow250.6%
unpow250.6%
hypot-undefine84.2%
Simplified84.2%
if -1.59999999999999991e-282 < x.im Initial program 44.4%
fma-define44.4%
hypot-define64.4%
*-commutative64.4%
add-cube-cbrt64.2%
pow364.2%
Applied egg-rr64.2%
add-cube-cbrt64.2%
pow364.2%
*-commutative64.2%
+-commutative64.2%
hypot-undefine79.9%
hypot-undefine64.2%
+-commutative64.2%
hypot-define79.9%
*-commutative79.9%
Applied egg-rr79.9%
hypot-define44.2%
add-cbrt-cube45.6%
pow346.4%
hypot-define82.9%
Applied egg-rr82.9%
Final simplification83.4%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (* y.re (atan2 x.im x.re)))
(t_1
(exp
(*
y.re
(- (log (hypot x.im x.re)) (/ (* y.im (atan2 x.im x.re)) y.re)))))
(t_2 (log (hypot x.re x.im))))
(if (<= x.im 4.2e-253)
(* t_1 (+ (sin t_0) (* y.im (* (cos t_0) t_2))))
(* t_1 (sin (fma t_2 y.im t_0))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = y_46_re * atan2(x_46_im, x_46_re);
double t_1 = exp((y_46_re * (log(hypot(x_46_im, x_46_re)) - ((y_46_im * atan2(x_46_im, x_46_re)) / y_46_re))));
double t_2 = log(hypot(x_46_re, x_46_im));
double tmp;
if (x_46_im <= 4.2e-253) {
tmp = t_1 * (sin(t_0) + (y_46_im * (cos(t_0) * t_2)));
} else {
tmp = t_1 * sin(fma(t_2, y_46_im, t_0));
}
return tmp;
}
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = Float64(y_46_re * atan(x_46_im, x_46_re)) t_1 = exp(Float64(y_46_re * Float64(log(hypot(x_46_im, x_46_re)) - Float64(Float64(y_46_im * atan(x_46_im, x_46_re)) / y_46_re)))) t_2 = log(hypot(x_46_re, x_46_im)) tmp = 0.0 if (x_46_im <= 4.2e-253) tmp = Float64(t_1 * Float64(sin(t_0) + Float64(y_46_im * Float64(cos(t_0) * t_2)))); else tmp = Float64(t_1 * sin(fma(t_2, y_46_im, t_0))); end return tmp end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[Exp[N[(y$46$re * N[(N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision] - N[(N[(y$46$im * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision] / y$46$re), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$2 = N[Log[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision]], $MachinePrecision]}, If[LessEqual[x$46$im, 4.2e-253], N[(t$95$1 * N[(N[Sin[t$95$0], $MachinePrecision] + N[(y$46$im * N[(N[Cos[t$95$0], $MachinePrecision] * t$95$2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t$95$1 * N[Sin[N[(t$95$2 * y$46$im + t$95$0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
t_1 := e^{y.re \cdot \left(\log \left(\mathsf{hypot}\left(x.im, x.re\right)\right) - \frac{y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}}{y.re}\right)}\\
t_2 := \log \left(\mathsf{hypot}\left(x.re, x.im\right)\right)\\
\mathbf{if}\;x.im \leq 4.2 \cdot 10^{-253}:\\
\;\;\;\;t\_1 \cdot \left(\sin t\_0 + y.im \cdot \left(\cos t\_0 \cdot t\_2\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1 \cdot \sin \left(\mathsf{fma}\left(t\_2, y.im, t\_0\right)\right)\\
\end{array}
\end{array}
if x.im < 4.1999999999999998e-253Initial program 36.8%
cancel-sign-sub-inv36.8%
fma-define36.8%
hypot-define36.8%
distribute-lft-neg-in36.8%
distribute-rgt-neg-out36.8%
fma-define36.8%
hypot-define76.8%
*-commutative76.8%
Simplified76.8%
Taylor expanded in y.re around inf 56.9%
unpow256.9%
unpow256.9%
hypot-undefine76.8%
associate-*r/76.8%
neg-mul-176.8%
distribute-lft-neg-in76.8%
Simplified76.8%
Taylor expanded in y.im around 0 53.2%
+-commutative53.2%
unpow253.2%
unpow253.2%
hypot-undefine83.9%
Simplified83.9%
if 4.1999999999999998e-253 < x.im Initial program 43.1%
cancel-sign-sub-inv43.1%
fma-define43.1%
hypot-define43.1%
distribute-lft-neg-in43.1%
distribute-rgt-neg-out43.1%
fma-define43.1%
hypot-define81.4%
*-commutative81.4%
Simplified81.4%
Taylor expanded in y.re around inf 64.1%
unpow264.1%
unpow264.1%
hypot-undefine81.4%
associate-*r/81.4%
neg-mul-181.4%
distribute-lft-neg-in81.4%
Simplified81.4%
Final simplification82.7%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (* y.re (atan2 x.im x.re)))
(t_1
(exp
(*
y.re
(- (log (hypot x.im x.re)) (/ (* y.im (atan2 x.im x.re)) y.re))))))
(if (or (<= y.im -1.32e+32) (not (<= y.im 9.5e+59)))
(* t_1 (sin t_0))
(* t_1 (sin (fma (log (hypot x.re x.im)) y.im t_0))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = y_46_re * atan2(x_46_im, x_46_re);
double t_1 = exp((y_46_re * (log(hypot(x_46_im, x_46_re)) - ((y_46_im * atan2(x_46_im, x_46_re)) / y_46_re))));
double tmp;
if ((y_46_im <= -1.32e+32) || !(y_46_im <= 9.5e+59)) {
tmp = t_1 * sin(t_0);
} else {
tmp = t_1 * sin(fma(log(hypot(x_46_re, x_46_im)), y_46_im, t_0));
}
return tmp;
}
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = Float64(y_46_re * atan(x_46_im, x_46_re)) t_1 = exp(Float64(y_46_re * Float64(log(hypot(x_46_im, x_46_re)) - Float64(Float64(y_46_im * atan(x_46_im, x_46_re)) / y_46_re)))) tmp = 0.0 if ((y_46_im <= -1.32e+32) || !(y_46_im <= 9.5e+59)) tmp = Float64(t_1 * sin(t_0)); else tmp = Float64(t_1 * sin(fma(log(hypot(x_46_re, x_46_im)), y_46_im, t_0))); end return tmp end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[Exp[N[(y$46$re * N[(N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision] - N[(N[(y$46$im * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision] / y$46$re), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[Or[LessEqual[y$46$im, -1.32e+32], N[Not[LessEqual[y$46$im, 9.5e+59]], $MachinePrecision]], N[(t$95$1 * N[Sin[t$95$0], $MachinePrecision]), $MachinePrecision], N[(t$95$1 * N[Sin[N[(N[Log[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision]], $MachinePrecision] * y$46$im + t$95$0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
t_1 := e^{y.re \cdot \left(\log \left(\mathsf{hypot}\left(x.im, x.re\right)\right) - \frac{y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}}{y.re}\right)}\\
\mathbf{if}\;y.im \leq -1.32 \cdot 10^{+32} \lor \neg \left(y.im \leq 9.5 \cdot 10^{+59}\right):\\
\;\;\;\;t\_1 \cdot \sin t\_0\\
\mathbf{else}:\\
\;\;\;\;t\_1 \cdot \sin \left(\mathsf{fma}\left(\log \left(\mathsf{hypot}\left(x.re, x.im\right)\right), y.im, t\_0\right)\right)\\
\end{array}
\end{array}
if y.im < -1.31999999999999997e32 or 9.50000000000000023e59 < y.im Initial program 32.8%
cancel-sign-sub-inv32.8%
fma-define32.8%
hypot-define32.8%
distribute-lft-neg-in32.8%
distribute-rgt-neg-out32.8%
fma-define32.8%
hypot-define65.0%
*-commutative65.0%
Simplified65.0%
Taylor expanded in y.re around inf 57.5%
unpow257.5%
unpow257.5%
hypot-undefine65.0%
associate-*r/65.0%
neg-mul-165.0%
distribute-lft-neg-in65.0%
Simplified65.0%
Taylor expanded in y.im around 0 74.0%
if -1.31999999999999997e32 < y.im < 9.50000000000000023e59Initial program 45.3%
cancel-sign-sub-inv45.3%
fma-define45.3%
hypot-define45.3%
distribute-lft-neg-in45.3%
distribute-rgt-neg-out45.3%
fma-define45.3%
hypot-define89.7%
*-commutative89.7%
Simplified89.7%
Taylor expanded in y.re around inf 62.7%
unpow262.7%
unpow262.7%
hypot-undefine89.7%
associate-*r/89.7%
neg-mul-189.7%
distribute-lft-neg-in89.7%
Simplified89.7%
Final simplification82.9%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (* y.im (atan2 x.im x.re))) (t_1 (* y.re (atan2 x.im x.re))))
(if (or (<= y.im -1150.0) (not (<= y.im 310.0)))
(* (exp (* y.re (- (log (hypot x.im x.re)) (/ t_0 y.re)))) (sin t_1))
(*
(sin (fma (log (hypot x.re x.im)) y.im t_1))
(/ (pow (hypot x.re x.im) y.re) (+ t_0 1.0))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = y_46_im * atan2(x_46_im, x_46_re);
double t_1 = y_46_re * atan2(x_46_im, x_46_re);
double tmp;
if ((y_46_im <= -1150.0) || !(y_46_im <= 310.0)) {
tmp = exp((y_46_re * (log(hypot(x_46_im, x_46_re)) - (t_0 / y_46_re)))) * sin(t_1);
} else {
tmp = sin(fma(log(hypot(x_46_re, x_46_im)), y_46_im, t_1)) * (pow(hypot(x_46_re, x_46_im), y_46_re) / (t_0 + 1.0));
}
return tmp;
}
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = Float64(y_46_im * atan(x_46_im, x_46_re)) t_1 = Float64(y_46_re * atan(x_46_im, x_46_re)) tmp = 0.0 if ((y_46_im <= -1150.0) || !(y_46_im <= 310.0)) tmp = Float64(exp(Float64(y_46_re * Float64(log(hypot(x_46_im, x_46_re)) - Float64(t_0 / y_46_re)))) * sin(t_1)); else tmp = Float64(sin(fma(log(hypot(x_46_re, x_46_im)), y_46_im, t_1)) * Float64((hypot(x_46_re, x_46_im) ^ y_46_re) / Float64(t_0 + 1.0))); end return tmp end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[(y$46$im * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, If[Or[LessEqual[y$46$im, -1150.0], N[Not[LessEqual[y$46$im, 310.0]], $MachinePrecision]], N[(N[Exp[N[(y$46$re * N[(N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision] - N[(t$95$0 / y$46$re), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Sin[t$95$1], $MachinePrecision]), $MachinePrecision], N[(N[Sin[N[(N[Log[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision]], $MachinePrecision] * y$46$im + t$95$1), $MachinePrecision]], $MachinePrecision] * N[(N[Power[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision], y$46$re], $MachinePrecision] / N[(t$95$0 + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
t_1 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
\mathbf{if}\;y.im \leq -1150 \lor \neg \left(y.im \leq 310\right):\\
\;\;\;\;e^{y.re \cdot \left(\log \left(\mathsf{hypot}\left(x.im, x.re\right)\right) - \frac{t\_0}{y.re}\right)} \cdot \sin t\_1\\
\mathbf{else}:\\
\;\;\;\;\sin \left(\mathsf{fma}\left(\log \left(\mathsf{hypot}\left(x.re, x.im\right)\right), y.im, t\_1\right)\right) \cdot \frac{{\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re}}{t\_0 + 1}\\
\end{array}
\end{array}
if y.im < -1150 or 310 < y.im Initial program 35.0%
cancel-sign-sub-inv35.0%
fma-define35.0%
hypot-define35.0%
distribute-lft-neg-in35.0%
distribute-rgt-neg-out35.0%
fma-define35.0%
hypot-define66.9%
*-commutative66.9%
Simplified66.9%
Taylor expanded in y.re around inf 58.1%
unpow258.1%
unpow258.1%
hypot-undefine66.9%
associate-*r/66.9%
neg-mul-166.9%
distribute-lft-neg-in66.9%
Simplified66.9%
Taylor expanded in y.im around 0 73.7%
if -1150 < y.im < 310Initial program 44.8%
exp-diff44.8%
exp-to-pow44.8%
hypot-define44.8%
*-commutative44.8%
exp-prod44.8%
fma-define44.8%
hypot-define91.1%
*-commutative91.1%
Simplified91.1%
Taylor expanded in y.im around 0 90.0%
Final simplification81.9%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (* y.im (atan2 x.im x.re)))
(t_1 (* y.re (atan2 x.im x.re)))
(t_2 (sin t_1)))
(if (<= y.re -1.1e-7)
(* (exp (* y.re (- (log (hypot x.im x.re)) (/ t_0 y.re)))) t_2)
(if (<= y.re 0.029)
(* (sin (fma (log (hypot x.re x.im)) y.im t_1)) (/ 1.0 (exp t_0)))
(if (<= y.re 6.2e+173)
(*
t_2
(exp (- (* y.re (log (sqrt (+ (* x.re x.re) (* x.im x.im))))) t_0)))
(* (sin (pow (cbrt t_1) 3.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 = y_46_im * atan2(x_46_im, x_46_re);
double t_1 = y_46_re * atan2(x_46_im, x_46_re);
double t_2 = sin(t_1);
double tmp;
if (y_46_re <= -1.1e-7) {
tmp = exp((y_46_re * (log(hypot(x_46_im, x_46_re)) - (t_0 / y_46_re)))) * t_2;
} else if (y_46_re <= 0.029) {
tmp = sin(fma(log(hypot(x_46_re, x_46_im)), y_46_im, t_1)) * (1.0 / exp(t_0));
} else if (y_46_re <= 6.2e+173) {
tmp = t_2 * exp(((y_46_re * log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))) - t_0));
} else {
tmp = sin(pow(cbrt(t_1), 3.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 = Float64(y_46_im * atan(x_46_im, x_46_re)) t_1 = Float64(y_46_re * atan(x_46_im, x_46_re)) t_2 = sin(t_1) tmp = 0.0 if (y_46_re <= -1.1e-7) tmp = Float64(exp(Float64(y_46_re * Float64(log(hypot(x_46_im, x_46_re)) - Float64(t_0 / y_46_re)))) * t_2); elseif (y_46_re <= 0.029) tmp = Float64(sin(fma(log(hypot(x_46_re, x_46_im)), y_46_im, t_1)) * Float64(1.0 / exp(t_0))); elseif (y_46_re <= 6.2e+173) tmp = 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))); else tmp = Float64(sin((cbrt(t_1) ^ 3.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[(y$46$im * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[Sin[t$95$1], $MachinePrecision]}, If[LessEqual[y$46$re, -1.1e-7], N[(N[Exp[N[(y$46$re * N[(N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision] - N[(t$95$0 / y$46$re), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * t$95$2), $MachinePrecision], If[LessEqual[y$46$re, 0.029], N[(N[Sin[N[(N[Log[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision]], $MachinePrecision] * y$46$im + t$95$1), $MachinePrecision]], $MachinePrecision] * N[(1.0 / N[Exp[t$95$0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$re, 6.2e+173], 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], N[(N[Sin[N[Power[N[Power[t$95$1, 1/3], $MachinePrecision], 3.0], $MachinePrecision]], $MachinePrecision] * N[Power[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision], y$46$re], $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
t_1 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
t_2 := \sin t\_1\\
\mathbf{if}\;y.re \leq -1.1 \cdot 10^{-7}:\\
\;\;\;\;e^{y.re \cdot \left(\log \left(\mathsf{hypot}\left(x.im, x.re\right)\right) - \frac{t\_0}{y.re}\right)} \cdot t\_2\\
\mathbf{elif}\;y.re \leq 0.029:\\
\;\;\;\;\sin \left(\mathsf{fma}\left(\log \left(\mathsf{hypot}\left(x.re, x.im\right)\right), y.im, t\_1\right)\right) \cdot \frac{1}{e^{t\_0}}\\
\mathbf{elif}\;y.re \leq 6.2 \cdot 10^{+173}:\\
\;\;\;\;t\_2 \cdot e^{y.re \cdot \log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) - t\_0}\\
\mathbf{else}:\\
\;\;\;\;\sin \left({\left(\sqrt[3]{t\_1}\right)}^{3}\right) \cdot {\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re}\\
\end{array}
\end{array}
if y.re < -1.1000000000000001e-7Initial program 51.4%
cancel-sign-sub-inv51.4%
fma-define51.4%
hypot-define51.4%
distribute-lft-neg-in51.4%
distribute-rgt-neg-out51.4%
fma-define51.4%
hypot-define90.4%
*-commutative90.4%
Simplified90.4%
Taylor expanded in y.re around inf 88.0%
unpow288.0%
unpow288.0%
hypot-undefine90.4%
associate-*r/90.4%
neg-mul-190.4%
distribute-lft-neg-in90.4%
Simplified90.4%
Taylor expanded in y.im around 0 90.6%
if -1.1000000000000001e-7 < y.re < 0.0290000000000000015Initial program 33.0%
exp-diff33.0%
exp-to-pow33.0%
hypot-define33.0%
*-commutative33.0%
exp-prod32.3%
fma-define32.3%
hypot-define75.6%
*-commutative75.6%
Simplified75.6%
Taylor expanded in y.re around 0 76.4%
if 0.0290000000000000015 < y.re < 6.2e173Initial program 54.7%
Taylor expanded in y.im around 0 74.0%
if 6.2e173 < y.re Initial program 23.1%
cancel-sign-sub-inv23.1%
fma-define23.1%
hypot-define23.1%
distribute-lft-neg-in23.1%
distribute-rgt-neg-out23.1%
fma-define23.1%
hypot-define69.2%
*-commutative69.2%
Simplified69.2%
Taylor expanded in y.im around 0 50.1%
unpow250.1%
unpow250.1%
hypot-undefine50.1%
Simplified50.1%
*-commutative50.1%
add-cube-cbrt69.3%
pow373.1%
*-commutative73.1%
Applied egg-rr73.1%
Final simplification79.9%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (* y.re (atan2 x.im x.re)))
(t_1 (log (hypot x.im x.re)))
(t_2
(*
(exp (* y.re (- t_1 (/ (* y.im (atan2 x.im x.re)) y.re))))
(sin t_0))))
(if (<= y.re -5.5e-161)
t_2
(if (<= y.re 5.4e-128)
(* (sin (* t_1 y.im)) (exp (* (- y.im) (atan2 x.im x.re))))
(if (<= y.re 2.7e+175)
t_2
(* (sin (pow (cbrt t_0) 3.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 = y_46_re * atan2(x_46_im, x_46_re);
double t_1 = log(hypot(x_46_im, x_46_re));
double t_2 = exp((y_46_re * (t_1 - ((y_46_im * atan2(x_46_im, x_46_re)) / y_46_re)))) * sin(t_0);
double tmp;
if (y_46_re <= -5.5e-161) {
tmp = t_2;
} else if (y_46_re <= 5.4e-128) {
tmp = sin((t_1 * y_46_im)) * exp((-y_46_im * atan2(x_46_im, x_46_re)));
} else if (y_46_re <= 2.7e+175) {
tmp = t_2;
} else {
tmp = sin(pow(cbrt(t_0), 3.0)) * 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 = y_46_re * Math.atan2(x_46_im, x_46_re);
double t_1 = Math.log(Math.hypot(x_46_im, x_46_re));
double t_2 = Math.exp((y_46_re * (t_1 - ((y_46_im * Math.atan2(x_46_im, x_46_re)) / y_46_re)))) * Math.sin(t_0);
double tmp;
if (y_46_re <= -5.5e-161) {
tmp = t_2;
} else if (y_46_re <= 5.4e-128) {
tmp = Math.sin((t_1 * y_46_im)) * Math.exp((-y_46_im * Math.atan2(x_46_im, x_46_re)));
} else if (y_46_re <= 2.7e+175) {
tmp = t_2;
} else {
tmp = Math.sin(Math.pow(Math.cbrt(t_0), 3.0)) * 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(y_46_re * atan(x_46_im, x_46_re)) t_1 = log(hypot(x_46_im, x_46_re)) t_2 = Float64(exp(Float64(y_46_re * Float64(t_1 - Float64(Float64(y_46_im * atan(x_46_im, x_46_re)) / y_46_re)))) * sin(t_0)) tmp = 0.0 if (y_46_re <= -5.5e-161) tmp = t_2; elseif (y_46_re <= 5.4e-128) tmp = Float64(sin(Float64(t_1 * y_46_im)) * exp(Float64(Float64(-y_46_im) * atan(x_46_im, x_46_re)))); elseif (y_46_re <= 2.7e+175) tmp = t_2; else tmp = Float64(sin((cbrt(t_0) ^ 3.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[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]}, Block[{t$95$2 = N[(N[Exp[N[(y$46$re * N[(t$95$1 - N[(N[(y$46$im * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision] / y$46$re), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Sin[t$95$0], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y$46$re, -5.5e-161], t$95$2, If[LessEqual[y$46$re, 5.4e-128], N[(N[Sin[N[(t$95$1 * y$46$im), $MachinePrecision]], $MachinePrecision] * N[Exp[N[((-y$46$im) * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$re, 2.7e+175], t$95$2, N[(N[Sin[N[Power[N[Power[t$95$0, 1/3], $MachinePrecision], 3.0], $MachinePrecision]], $MachinePrecision] * N[Power[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision], y$46$re], $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
t_1 := \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\\
t_2 := e^{y.re \cdot \left(t\_1 - \frac{y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}}{y.re}\right)} \cdot \sin t\_0\\
\mathbf{if}\;y.re \leq -5.5 \cdot 10^{-161}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;y.re \leq 5.4 \cdot 10^{-128}:\\
\;\;\;\;\sin \left(t\_1 \cdot y.im\right) \cdot e^{\left(-y.im\right) \cdot \tan^{-1}_* \frac{x.im}{x.re}}\\
\mathbf{elif}\;y.re \leq 2.7 \cdot 10^{+175}:\\
\;\;\;\;t\_2\\
\mathbf{else}:\\
\;\;\;\;\sin \left({\left(\sqrt[3]{t\_0}\right)}^{3}\right) \cdot {\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re}\\
\end{array}
\end{array}
if y.re < -5.5e-161 or 5.40000000000000011e-128 < y.re < 2.7000000000000001e175Initial program 44.2%
cancel-sign-sub-inv44.2%
fma-define44.2%
hypot-define44.2%
distribute-lft-neg-in44.2%
distribute-rgt-neg-out44.2%
fma-define44.2%
hypot-define80.8%
*-commutative80.8%
Simplified80.8%
Taylor expanded in y.re around inf 66.5%
unpow266.5%
unpow266.5%
hypot-undefine80.8%
associate-*r/80.8%
neg-mul-180.8%
distribute-lft-neg-in80.8%
Simplified80.8%
Taylor expanded in y.im around 0 76.3%
if -5.5e-161 < y.re < 5.40000000000000011e-128Initial program 34.6%
cancel-sign-sub-inv34.6%
fma-define34.6%
hypot-define34.6%
distribute-lft-neg-in34.6%
distribute-rgt-neg-out34.6%
fma-define34.6%
hypot-define78.2%
*-commutative78.2%
Simplified78.2%
Taylor expanded in y.re around 0 29.7%
*-commutative29.7%
unpow229.7%
unpow229.7%
hypot-undefine67.9%
neg-mul-167.9%
distribute-lft-neg-in67.9%
Simplified67.9%
if 2.7000000000000001e175 < y.re Initial program 23.1%
cancel-sign-sub-inv23.1%
fma-define23.1%
hypot-define23.1%
distribute-lft-neg-in23.1%
distribute-rgt-neg-out23.1%
fma-define23.1%
hypot-define69.2%
*-commutative69.2%
Simplified69.2%
Taylor expanded in y.im around 0 50.1%
unpow250.1%
unpow250.1%
hypot-undefine50.1%
Simplified50.1%
*-commutative50.1%
add-cube-cbrt69.3%
pow373.1%
*-commutative73.1%
Applied egg-rr73.1%
Final simplification74.2%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (log (/ -1.0 x.re)))
(t_1 (* y.im (atan2 x.im x.re)))
(t_2 (* y.re (atan2 x.im x.re))))
(if (<= x.re -2.3e+200)
(*
(sin (- t_2 (* y.im t_0)))
(exp (- (* (- y.im) (atan2 x.im x.re)) (* y.re t_0))))
(if (<= x.re 3.8e-45)
(* (exp (* y.re (- (log (hypot x.im x.re)) (/ t_1 y.re)))) (sin t_2))
(*
(exp (- (* y.re (log x.re)) t_1))
(sin (+ t_2 (* y.im (log x.re)))))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = log((-1.0 / x_46_re));
double t_1 = y_46_im * atan2(x_46_im, x_46_re);
double t_2 = y_46_re * atan2(x_46_im, x_46_re);
double tmp;
if (x_46_re <= -2.3e+200) {
tmp = sin((t_2 - (y_46_im * t_0))) * exp(((-y_46_im * atan2(x_46_im, x_46_re)) - (y_46_re * t_0)));
} else if (x_46_re <= 3.8e-45) {
tmp = exp((y_46_re * (log(hypot(x_46_im, x_46_re)) - (t_1 / y_46_re)))) * sin(t_2);
} else {
tmp = exp(((y_46_re * log(x_46_re)) - t_1)) * sin((t_2 + (y_46_im * log(x_46_re))));
}
return tmp;
}
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = Math.log((-1.0 / x_46_re));
double t_1 = y_46_im * Math.atan2(x_46_im, x_46_re);
double t_2 = y_46_re * Math.atan2(x_46_im, x_46_re);
double tmp;
if (x_46_re <= -2.3e+200) {
tmp = Math.sin((t_2 - (y_46_im * t_0))) * Math.exp(((-y_46_im * Math.atan2(x_46_im, x_46_re)) - (y_46_re * t_0)));
} else if (x_46_re <= 3.8e-45) {
tmp = Math.exp((y_46_re * (Math.log(Math.hypot(x_46_im, x_46_re)) - (t_1 / y_46_re)))) * Math.sin(t_2);
} else {
tmp = Math.exp(((y_46_re * Math.log(x_46_re)) - t_1)) * Math.sin((t_2 + (y_46_im * Math.log(x_46_re))));
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): t_0 = math.log((-1.0 / x_46_re)) t_1 = y_46_im * math.atan2(x_46_im, x_46_re) t_2 = y_46_re * math.atan2(x_46_im, x_46_re) tmp = 0 if x_46_re <= -2.3e+200: tmp = math.sin((t_2 - (y_46_im * t_0))) * math.exp(((-y_46_im * math.atan2(x_46_im, x_46_re)) - (y_46_re * t_0))) elif x_46_re <= 3.8e-45: tmp = math.exp((y_46_re * (math.log(math.hypot(x_46_im, x_46_re)) - (t_1 / y_46_re)))) * math.sin(t_2) else: tmp = math.exp(((y_46_re * math.log(x_46_re)) - t_1)) * math.sin((t_2 + (y_46_im * math.log(x_46_re)))) return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = log(Float64(-1.0 / x_46_re)) t_1 = Float64(y_46_im * atan(x_46_im, x_46_re)) t_2 = Float64(y_46_re * atan(x_46_im, x_46_re)) tmp = 0.0 if (x_46_re <= -2.3e+200) tmp = Float64(sin(Float64(t_2 - Float64(y_46_im * t_0))) * exp(Float64(Float64(Float64(-y_46_im) * atan(x_46_im, x_46_re)) - Float64(y_46_re * t_0)))); elseif (x_46_re <= 3.8e-45) tmp = Float64(exp(Float64(y_46_re * Float64(log(hypot(x_46_im, x_46_re)) - Float64(t_1 / y_46_re)))) * sin(t_2)); else tmp = Float64(exp(Float64(Float64(y_46_re * log(x_46_re)) - t_1)) * sin(Float64(t_2 + Float64(y_46_im * log(x_46_re))))); end return tmp end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = log((-1.0 / x_46_re)); t_1 = y_46_im * atan2(x_46_im, x_46_re); t_2 = y_46_re * atan2(x_46_im, x_46_re); tmp = 0.0; if (x_46_re <= -2.3e+200) tmp = sin((t_2 - (y_46_im * t_0))) * exp(((-y_46_im * atan2(x_46_im, x_46_re)) - (y_46_re * t_0))); elseif (x_46_re <= 3.8e-45) tmp = exp((y_46_re * (log(hypot(x_46_im, x_46_re)) - (t_1 / y_46_re)))) * sin(t_2); else tmp = exp(((y_46_re * log(x_46_re)) - t_1)) * sin((t_2 + (y_46_im * log(x_46_re)))); end tmp_2 = tmp; end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[Log[N[(-1.0 / x$46$re), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$1 = N[(y$46$im * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x$46$re, -2.3e+200], N[(N[Sin[N[(t$95$2 - N[(y$46$im * t$95$0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Exp[N[(N[((-y$46$im) * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision] - N[(y$46$re * t$95$0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[x$46$re, 3.8e-45], N[(N[Exp[N[(y$46$re * N[(N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision] - N[(t$95$1 / y$46$re), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Sin[t$95$2], $MachinePrecision]), $MachinePrecision], N[(N[Exp[N[(N[(y$46$re * N[Log[x$46$re], $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision]], $MachinePrecision] * N[Sin[N[(t$95$2 + N[(y$46$im * N[Log[x$46$re], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \log \left(\frac{-1}{x.re}\right)\\
t_1 := y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
t_2 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
\mathbf{if}\;x.re \leq -2.3 \cdot 10^{+200}:\\
\;\;\;\;\sin \left(t\_2 - y.im \cdot t\_0\right) \cdot e^{\left(-y.im\right) \cdot \tan^{-1}_* \frac{x.im}{x.re} - y.re \cdot t\_0}\\
\mathbf{elif}\;x.re \leq 3.8 \cdot 10^{-45}:\\
\;\;\;\;e^{y.re \cdot \left(\log \left(\mathsf{hypot}\left(x.im, x.re\right)\right) - \frac{t\_1}{y.re}\right)} \cdot \sin t\_2\\
\mathbf{else}:\\
\;\;\;\;e^{y.re \cdot \log x.re - t\_1} \cdot \sin \left(t\_2 + y.im \cdot \log x.re\right)\\
\end{array}
\end{array}
if x.re < -2.30000000000000003e200Initial program 0.0%
fma-define0.0%
hypot-define51.2%
*-commutative51.2%
add-cube-cbrt51.2%
pow351.2%
Applied egg-rr51.2%
Taylor expanded in x.re around -inf 81.6%
*-commutative81.6%
+-commutative81.6%
mul-1-neg81.6%
unsub-neg81.6%
mul-1-neg81.6%
*-commutative81.6%
distribute-rgt-neg-in81.6%
Simplified81.6%
if -2.30000000000000003e200 < x.re < 3.79999999999999997e-45Initial program 46.2%
cancel-sign-sub-inv46.2%
fma-define46.2%
hypot-define46.2%
distribute-lft-neg-in46.2%
distribute-rgt-neg-out46.2%
fma-define46.2%
hypot-define79.5%
*-commutative79.5%
Simplified79.5%
Taylor expanded in y.re around inf 62.6%
unpow262.6%
unpow262.6%
hypot-undefine79.5%
associate-*r/79.5%
neg-mul-179.5%
distribute-lft-neg-in79.5%
Simplified79.5%
Taylor expanded in y.im around 0 76.7%
if 3.79999999999999997e-45 < x.re Initial program 40.2%
fma-define40.2%
hypot-define59.2%
*-commutative59.2%
add-cube-cbrt59.0%
pow359.0%
Applied egg-rr59.0%
Taylor expanded in x.im around 0 74.3%
Final simplification76.4%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (* y.im (atan2 x.im x.re))) (t_1 (* y.re (atan2 x.im x.re))))
(if (<= x.re 3.9e-45)
(* (exp (* y.re (- (log (hypot x.im x.re)) (/ t_0 y.re)))) (sin t_1))
(* (exp (- (* y.re (log x.re)) t_0)) (sin (+ t_1 (* y.im (log x.re))))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = y_46_im * atan2(x_46_im, x_46_re);
double t_1 = y_46_re * atan2(x_46_im, x_46_re);
double tmp;
if (x_46_re <= 3.9e-45) {
tmp = exp((y_46_re * (log(hypot(x_46_im, x_46_re)) - (t_0 / y_46_re)))) * sin(t_1);
} else {
tmp = exp(((y_46_re * log(x_46_re)) - t_0)) * sin((t_1 + (y_46_im * log(x_46_re))));
}
return tmp;
}
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = y_46_im * Math.atan2(x_46_im, x_46_re);
double t_1 = y_46_re * Math.atan2(x_46_im, x_46_re);
double tmp;
if (x_46_re <= 3.9e-45) {
tmp = Math.exp((y_46_re * (Math.log(Math.hypot(x_46_im, x_46_re)) - (t_0 / y_46_re)))) * Math.sin(t_1);
} else {
tmp = Math.exp(((y_46_re * Math.log(x_46_re)) - t_0)) * Math.sin((t_1 + (y_46_im * Math.log(x_46_re))));
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): t_0 = y_46_im * math.atan2(x_46_im, x_46_re) t_1 = y_46_re * math.atan2(x_46_im, x_46_re) tmp = 0 if x_46_re <= 3.9e-45: tmp = math.exp((y_46_re * (math.log(math.hypot(x_46_im, x_46_re)) - (t_0 / y_46_re)))) * math.sin(t_1) else: tmp = math.exp(((y_46_re * math.log(x_46_re)) - t_0)) * math.sin((t_1 + (y_46_im * math.log(x_46_re)))) return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = Float64(y_46_im * atan(x_46_im, x_46_re)) t_1 = Float64(y_46_re * atan(x_46_im, x_46_re)) tmp = 0.0 if (x_46_re <= 3.9e-45) tmp = Float64(exp(Float64(y_46_re * Float64(log(hypot(x_46_im, x_46_re)) - Float64(t_0 / y_46_re)))) * sin(t_1)); else tmp = Float64(exp(Float64(Float64(y_46_re * log(x_46_re)) - t_0)) * sin(Float64(t_1 + Float64(y_46_im * log(x_46_re))))); end return tmp end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = y_46_im * atan2(x_46_im, x_46_re); t_1 = y_46_re * atan2(x_46_im, x_46_re); tmp = 0.0; if (x_46_re <= 3.9e-45) tmp = exp((y_46_re * (log(hypot(x_46_im, x_46_re)) - (t_0 / y_46_re)))) * sin(t_1); else tmp = exp(((y_46_re * log(x_46_re)) - t_0)) * sin((t_1 + (y_46_im * log(x_46_re)))); end tmp_2 = tmp; end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[(y$46$im * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x$46$re, 3.9e-45], N[(N[Exp[N[(y$46$re * N[(N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision] - N[(t$95$0 / y$46$re), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Sin[t$95$1], $MachinePrecision]), $MachinePrecision], N[(N[Exp[N[(N[(y$46$re * N[Log[x$46$re], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]], $MachinePrecision] * N[Sin[N[(t$95$1 + N[(y$46$im * N[Log[x$46$re], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
t_1 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
\mathbf{if}\;x.re \leq 3.9 \cdot 10^{-45}:\\
\;\;\;\;e^{y.re \cdot \left(\log \left(\mathsf{hypot}\left(x.im, x.re\right)\right) - \frac{t\_0}{y.re}\right)} \cdot \sin t\_1\\
\mathbf{else}:\\
\;\;\;\;e^{y.re \cdot \log x.re - t\_0} \cdot \sin \left(t\_1 + y.im \cdot \log x.re\right)\\
\end{array}
\end{array}
if x.re < 3.9e-45Initial program 39.8%
cancel-sign-sub-inv39.8%
fma-define39.8%
hypot-define39.8%
distribute-lft-neg-in39.8%
distribute-rgt-neg-out39.8%
fma-define39.8%
hypot-define80.0%
*-commutative80.0%
Simplified80.0%
Taylor expanded in y.re around inf 61.1%
unpow261.1%
unpow261.1%
hypot-undefine80.0%
associate-*r/80.0%
neg-mul-180.0%
distribute-lft-neg-in80.0%
Simplified80.0%
Taylor expanded in y.im around 0 74.9%
if 3.9e-45 < x.re Initial program 40.2%
fma-define40.2%
hypot-define59.2%
*-commutative59.2%
add-cube-cbrt59.0%
pow359.0%
Applied egg-rr59.0%
Taylor expanded in x.im around 0 74.3%
Final simplification74.7%
(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 -2.4e-106)
(* (sin t_0) t_1)
(if (<= y.re 0.92)
(*
(sin (* (log (hypot x.im x.re)) y.im))
(exp (* (- y.im) (atan2 x.im x.re))))
(* (sin (pow (cbrt t_0) 3.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 <= -2.4e-106) {
tmp = sin(t_0) * t_1;
} else if (y_46_re <= 0.92) {
tmp = sin((log(hypot(x_46_im, x_46_re)) * y_46_im)) * exp((-y_46_im * atan2(x_46_im, x_46_re)));
} else {
tmp = sin(pow(cbrt(t_0), 3.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 <= -2.4e-106) {
tmp = Math.sin(t_0) * t_1;
} else if (y_46_re <= 0.92) {
tmp = Math.sin((Math.log(Math.hypot(x_46_im, x_46_re)) * y_46_im)) * Math.exp((-y_46_im * Math.atan2(x_46_im, x_46_re)));
} else {
tmp = Math.sin(Math.pow(Math.cbrt(t_0), 3.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 <= -2.4e-106) tmp = Float64(sin(t_0) * t_1); elseif (y_46_re <= 0.92) tmp = Float64(sin(Float64(log(hypot(x_46_im, x_46_re)) * y_46_im)) * exp(Float64(Float64(-y_46_im) * atan(x_46_im, x_46_re)))); else tmp = Float64(sin((cbrt(t_0) ^ 3.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, -2.4e-106], N[(N[Sin[t$95$0], $MachinePrecision] * t$95$1), $MachinePrecision], If[LessEqual[y$46$re, 0.92], N[(N[Sin[N[(N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision] * y$46$im), $MachinePrecision]], $MachinePrecision] * N[Exp[N[((-y$46$im) * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(N[Sin[N[Power[N[Power[t$95$0, 1/3], $MachinePrecision], 3.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 -2.4 \cdot 10^{-106}:\\
\;\;\;\;\sin t\_0 \cdot t\_1\\
\mathbf{elif}\;y.re \leq 0.92:\\
\;\;\;\;\sin \left(\log \left(\mathsf{hypot}\left(x.im, x.re\right)\right) \cdot y.im\right) \cdot e^{\left(-y.im\right) \cdot \tan^{-1}_* \frac{x.im}{x.re}}\\
\mathbf{else}:\\
\;\;\;\;\sin \left({\left(\sqrt[3]{t\_0}\right)}^{3}\right) \cdot t\_1\\
\end{array}
\end{array}
if y.re < -2.3999999999999998e-106Initial program 45.7%
cancel-sign-sub-inv45.7%
fma-define45.7%
hypot-define45.7%
distribute-lft-neg-in45.7%
distribute-rgt-neg-out45.7%
fma-define45.7%
hypot-define88.7%
*-commutative88.7%
Simplified88.7%
Taylor expanded in y.im around 0 69.3%
unpow269.3%
unpow269.3%
hypot-undefine75.4%
Simplified75.4%
if -2.3999999999999998e-106 < y.re < 0.92000000000000004Initial program 35.7%
cancel-sign-sub-inv35.7%
fma-define35.7%
hypot-define35.7%
distribute-lft-neg-in35.7%
distribute-rgt-neg-out35.7%
fma-define35.7%
hypot-define75.7%
*-commutative75.7%
Simplified75.7%
Taylor expanded in y.re around 0 28.8%
*-commutative28.8%
unpow228.8%
unpow228.8%
hypot-undefine60.5%
neg-mul-160.5%
distribute-lft-neg-in60.5%
Simplified60.5%
if 0.92000000000000004 < y.re Initial program 38.2%
cancel-sign-sub-inv38.2%
fma-define38.2%
hypot-define38.2%
distribute-lft-neg-in38.2%
distribute-rgt-neg-out38.2%
fma-define38.2%
hypot-define69.1%
*-commutative69.1%
Simplified69.1%
Taylor expanded in y.im around 0 52.9%
unpow252.9%
unpow252.9%
hypot-undefine52.9%
Simplified52.9%
*-commutative52.9%
add-cube-cbrt58.4%
pow358.4%
*-commutative58.4%
Applied egg-rr58.4%
Final simplification65.6%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (pow (hypot x.im x.re) y.re)))
(if (<= y.re -9.2e-110)
(* (sin (* y.re (atan2 x.im x.re))) t_0)
(if (<= y.re 0.95)
(*
(sin (* (log (hypot x.im x.re)) y.im))
(exp (* (- y.im) (atan2 x.im x.re))))
(* t_0 (sin (* y.re (pow (cbrt (atan2 x.im x.re)) 3.0))))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = pow(hypot(x_46_im, x_46_re), y_46_re);
double tmp;
if (y_46_re <= -9.2e-110) {
tmp = sin((y_46_re * atan2(x_46_im, x_46_re))) * t_0;
} else if (y_46_re <= 0.95) {
tmp = sin((log(hypot(x_46_im, x_46_re)) * y_46_im)) * exp((-y_46_im * atan2(x_46_im, x_46_re)));
} else {
tmp = t_0 * sin((y_46_re * pow(cbrt(atan2(x_46_im, x_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_re <= -9.2e-110) {
tmp = Math.sin((y_46_re * Math.atan2(x_46_im, x_46_re))) * t_0;
} else if (y_46_re <= 0.95) {
tmp = Math.sin((Math.log(Math.hypot(x_46_im, x_46_re)) * y_46_im)) * Math.exp((-y_46_im * Math.atan2(x_46_im, x_46_re)));
} else {
tmp = t_0 * Math.sin((y_46_re * Math.pow(Math.cbrt(Math.atan2(x_46_im, x_46_re)), 3.0)));
}
return tmp;
}
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = hypot(x_46_im, x_46_re) ^ y_46_re tmp = 0.0 if (y_46_re <= -9.2e-110) tmp = Float64(sin(Float64(y_46_re * atan(x_46_im, x_46_re))) * t_0); elseif (y_46_re <= 0.95) tmp = Float64(sin(Float64(log(hypot(x_46_im, x_46_re)) * y_46_im)) * exp(Float64(Float64(-y_46_im) * atan(x_46_im, x_46_re)))); else tmp = Float64(t_0 * sin(Float64(y_46_re * (cbrt(atan(x_46_im, x_46_re)) ^ 3.0)))); end return tmp end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[Power[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision], y$46$re], $MachinePrecision]}, If[LessEqual[y$46$re, -9.2e-110], N[(N[Sin[N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * t$95$0), $MachinePrecision], If[LessEqual[y$46$re, 0.95], N[(N[Sin[N[(N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision] * y$46$im), $MachinePrecision]], $MachinePrecision] * N[Exp[N[((-y$46$im) * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(t$95$0 * N[Sin[N[(y$46$re * N[Power[N[Power[N[ArcTan[x$46$im / x$46$re], $MachinePrecision], 1/3], $MachinePrecision], 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.re \leq -9.2 \cdot 10^{-110}:\\
\;\;\;\;\sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot t\_0\\
\mathbf{elif}\;y.re \leq 0.95:\\
\;\;\;\;\sin \left(\log \left(\mathsf{hypot}\left(x.im, x.re\right)\right) \cdot y.im\right) \cdot e^{\left(-y.im\right) \cdot \tan^{-1}_* \frac{x.im}{x.re}}\\
\mathbf{else}:\\
\;\;\;\;t\_0 \cdot \sin \left(y.re \cdot {\left(\sqrt[3]{\tan^{-1}_* \frac{x.im}{x.re}}\right)}^{3}\right)\\
\end{array}
\end{array}
if y.re < -9.2000000000000006e-110Initial program 45.7%
cancel-sign-sub-inv45.7%
fma-define45.7%
hypot-define45.7%
distribute-lft-neg-in45.7%
distribute-rgt-neg-out45.7%
fma-define45.7%
hypot-define88.7%
*-commutative88.7%
Simplified88.7%
Taylor expanded in y.im around 0 69.3%
unpow269.3%
unpow269.3%
hypot-undefine75.4%
Simplified75.4%
if -9.2000000000000006e-110 < y.re < 0.94999999999999996Initial program 35.7%
cancel-sign-sub-inv35.7%
fma-define35.7%
hypot-define35.7%
distribute-lft-neg-in35.7%
distribute-rgt-neg-out35.7%
fma-define35.7%
hypot-define75.7%
*-commutative75.7%
Simplified75.7%
Taylor expanded in y.re around 0 28.8%
*-commutative28.8%
unpow228.8%
unpow228.8%
hypot-undefine60.5%
neg-mul-160.5%
distribute-lft-neg-in60.5%
Simplified60.5%
if 0.94999999999999996 < y.re Initial program 38.2%
cancel-sign-sub-inv38.2%
fma-define38.2%
hypot-define38.2%
distribute-lft-neg-in38.2%
distribute-rgt-neg-out38.2%
fma-define38.2%
hypot-define69.1%
*-commutative69.1%
Simplified69.1%
Taylor expanded in y.im around 0 52.9%
unpow252.9%
unpow252.9%
hypot-undefine52.9%
Simplified52.9%
add-cube-cbrt58.4%
pow358.4%
Applied egg-rr58.4%
Final simplification65.6%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(if (or (<= y.re -2.4e-106) (not (<= y.re 0.88)))
(* (sin (* y.re (atan2 x.im x.re))) (pow (hypot x.im x.re) y.re))
(*
(sin (* (log (hypot x.im x.re)) y.im))
(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_re <= -2.4e-106) || !(y_46_re <= 0.88)) {
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 = sin((log(hypot(x_46_im, x_46_re)) * y_46_im)) * exp((-y_46_im * atan2(x_46_im, x_46_re)));
}
return tmp;
}
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double tmp;
if ((y_46_re <= -2.4e-106) || !(y_46_re <= 0.88)) {
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.sin((Math.log(Math.hypot(x_46_im, x_46_re)) * y_46_im)) * Math.exp((-y_46_im * Math.atan2(x_46_im, x_46_re)));
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): tmp = 0 if (y_46_re <= -2.4e-106) or not (y_46_re <= 0.88): 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.sin((math.log(math.hypot(x_46_im, x_46_re)) * y_46_im)) * math.exp((-y_46_im * math.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_re <= -2.4e-106) || !(y_46_re <= 0.88)) 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(sin(Float64(log(hypot(x_46_im, x_46_re)) * y_46_im)) * exp(Float64(Float64(-y_46_im) * atan(x_46_im, x_46_re)))); end return tmp end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im) tmp = 0.0; if ((y_46_re <= -2.4e-106) || ~((y_46_re <= 0.88))) tmp = sin((y_46_re * atan2(x_46_im, x_46_re))) * (hypot(x_46_im, x_46_re) ^ y_46_re); else tmp = sin((log(hypot(x_46_im, x_46_re)) * y_46_im)) * exp((-y_46_im * atan2(x_46_im, x_46_re))); end tmp_2 = tmp; end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := If[Or[LessEqual[y$46$re, -2.4e-106], N[Not[LessEqual[y$46$re, 0.88]], $MachinePrecision]], N[(N[Sin[N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Power[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision], y$46$re], $MachinePrecision]), $MachinePrecision], N[(N[Sin[N[(N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision] * y$46$im), $MachinePrecision]], $MachinePrecision] * N[Exp[N[((-y$46$im) * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y.re \leq -2.4 \cdot 10^{-106} \lor \neg \left(y.re \leq 0.88\right):\\
\;\;\;\;\sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re}\\
\mathbf{else}:\\
\;\;\;\;\sin \left(\log \left(\mathsf{hypot}\left(x.im, x.re\right)\right) \cdot y.im\right) \cdot e^{\left(-y.im\right) \cdot \tan^{-1}_* \frac{x.im}{x.re}}\\
\end{array}
\end{array}
if y.re < -2.3999999999999998e-106 or 0.880000000000000004 < y.re Initial program 42.9%
cancel-sign-sub-inv42.9%
fma-define42.9%
hypot-define42.9%
distribute-lft-neg-in42.9%
distribute-rgt-neg-out42.9%
fma-define42.9%
hypot-define81.5%
*-commutative81.5%
Simplified81.5%
Taylor expanded in y.im around 0 63.3%
unpow263.3%
unpow263.3%
hypot-undefine67.1%
Simplified67.1%
if -2.3999999999999998e-106 < y.re < 0.880000000000000004Initial program 35.7%
cancel-sign-sub-inv35.7%
fma-define35.7%
hypot-define35.7%
distribute-lft-neg-in35.7%
distribute-rgt-neg-out35.7%
fma-define35.7%
hypot-define75.7%
*-commutative75.7%
Simplified75.7%
Taylor expanded in y.re around 0 28.8%
*-commutative28.8%
unpow228.8%
unpow228.8%
hypot-undefine60.5%
neg-mul-160.5%
distribute-lft-neg-in60.5%
Simplified60.5%
Final simplification64.4%
(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 7.8e+28)
(* t_0 (pow (hypot x.im x.re) y.re))
(log (+ 1.0 (expm1 (* t_0 (pow x.im y.re))))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = sin((y_46_re * atan2(x_46_im, x_46_re)));
double tmp;
if (y_46_im <= 7.8e+28) {
tmp = t_0 * pow(hypot(x_46_im, x_46_re), y_46_re);
} else {
tmp = log((1.0 + expm1((t_0 * pow(x_46_im, 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.sin((y_46_re * Math.atan2(x_46_im, x_46_re)));
double tmp;
if (y_46_im <= 7.8e+28) {
tmp = t_0 * Math.pow(Math.hypot(x_46_im, x_46_re), y_46_re);
} else {
tmp = Math.log((1.0 + Math.expm1((t_0 * Math.pow(x_46_im, y_46_re)))));
}
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 <= 7.8e+28: tmp = t_0 * math.pow(math.hypot(x_46_im, x_46_re), y_46_re) else: tmp = math.log((1.0 + math.expm1((t_0 * math.pow(x_46_im, 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))) tmp = 0.0 if (y_46_im <= 7.8e+28) tmp = Float64(t_0 * (hypot(x_46_im, x_46_re) ^ y_46_re)); else tmp = log(Float64(1.0 + expm1(Float64(t_0 * (x_46_im ^ y_46_re))))); end return tmp end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[Sin[N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[y$46$im, 7.8e+28], N[(t$95$0 * N[Power[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision], y$46$re], $MachinePrecision]), $MachinePrecision], N[Log[N[(1.0 + N[(Exp[N[(t$95$0 * N[Power[x$46$im, y$46$re], $MachinePrecision]), $MachinePrecision]] - 1), $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 7.8 \cdot 10^{+28}:\\
\;\;\;\;t\_0 \cdot {\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re}\\
\mathbf{else}:\\
\;\;\;\;\log \left(1 + \mathsf{expm1}\left(t\_0 \cdot {x.im}^{y.re}\right)\right)\\
\end{array}
\end{array}
if y.im < 7.7999999999999997e28Initial program 43.0%
cancel-sign-sub-inv43.0%
fma-define43.0%
hypot-define43.0%
distribute-lft-neg-in43.0%
distribute-rgt-neg-out43.0%
fma-define43.0%
hypot-define82.6%
*-commutative82.6%
Simplified82.6%
Taylor expanded in y.im around 0 43.6%
unpow243.6%
unpow243.6%
hypot-undefine50.3%
Simplified50.3%
if 7.7999999999999997e28 < y.im Initial program 29.3%
cancel-sign-sub-inv29.3%
fma-define29.3%
hypot-define29.3%
distribute-lft-neg-in29.3%
distribute-rgt-neg-out29.3%
fma-define29.3%
hypot-define66.9%
*-commutative66.9%
Simplified66.9%
Taylor expanded in y.im around 0 41.7%
unpow241.7%
unpow241.7%
hypot-undefine35.4%
Simplified35.4%
Taylor expanded in x.im around inf 24.3%
mul-1-neg24.3%
*-commutative24.3%
distribute-lft-neg-in24.3%
log-rec24.3%
remove-double-neg24.3%
exp-to-pow29.7%
*-commutative29.7%
Simplified29.7%
log1p-expm1-u29.7%
log1p-undefine51.4%
Applied egg-rr51.4%
(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 3.3e+28)
(* t_0 (pow (hypot x.im x.re) y.re))
(* (pow x.im y.re) (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 <= 3.3e+28) {
tmp = t_0 * pow(hypot(x_46_im, x_46_re), y_46_re);
} else {
tmp = pow(x_46_im, y_46_re) * 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 <= 3.3e+28) {
tmp = t_0 * Math.pow(Math.hypot(x_46_im, x_46_re), y_46_re);
} else {
tmp = Math.pow(x_46_im, y_46_re) * 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 <= 3.3e+28: tmp = t_0 * math.pow(math.hypot(x_46_im, x_46_re), y_46_re) else: tmp = math.pow(x_46_im, y_46_re) * 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 <= 3.3e+28) tmp = Float64(t_0 * (hypot(x_46_im, x_46_re) ^ y_46_re)); else tmp = Float64((x_46_im ^ y_46_re) * 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 <= 3.3e+28) tmp = t_0 * (hypot(x_46_im, x_46_re) ^ y_46_re); else tmp = (x_46_im ^ y_46_re) * 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, 3.3e+28], N[(t$95$0 * N[Power[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision], y$46$re], $MachinePrecision]), $MachinePrecision], N[(N[Power[x$46$im, y$46$re], $MachinePrecision] * 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 3.3 \cdot 10^{+28}:\\
\;\;\;\;t\_0 \cdot {\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re}\\
\mathbf{else}:\\
\;\;\;\;{x.im}^{y.re} \cdot \log \left(e^{t\_0}\right)\\
\end{array}
\end{array}
if y.im < 3.3e28Initial program 43.0%
cancel-sign-sub-inv43.0%
fma-define43.0%
hypot-define43.0%
distribute-lft-neg-in43.0%
distribute-rgt-neg-out43.0%
fma-define43.0%
hypot-define82.6%
*-commutative82.6%
Simplified82.6%
Taylor expanded in y.im around 0 43.6%
unpow243.6%
unpow243.6%
hypot-undefine50.3%
Simplified50.3%
if 3.3e28 < y.im Initial program 29.3%
cancel-sign-sub-inv29.3%
fma-define29.3%
hypot-define29.3%
distribute-lft-neg-in29.3%
distribute-rgt-neg-out29.3%
fma-define29.3%
hypot-define66.9%
*-commutative66.9%
Simplified66.9%
Taylor expanded in y.im around 0 41.7%
unpow241.7%
unpow241.7%
hypot-undefine35.4%
Simplified35.4%
Taylor expanded in x.im around inf 24.3%
mul-1-neg24.3%
*-commutative24.3%
distribute-lft-neg-in24.3%
log-rec24.3%
remove-double-neg24.3%
exp-to-pow29.7%
*-commutative29.7%
Simplified29.7%
add-log-exp51.3%
Applied egg-rr51.3%
Final simplification50.6%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (* y.re (atan2 x.im x.re))))
(if (<= y.im 6.2e+212)
(* (sin t_0) (pow (hypot x.im x.re) y.re))
(log (+ 1.0 (expm1 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 tmp;
if (y_46_im <= 6.2e+212) {
tmp = sin(t_0) * pow(hypot(x_46_im, x_46_re), y_46_re);
} else {
tmp = log((1.0 + expm1(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 = y_46_re * Math.atan2(x_46_im, x_46_re);
double tmp;
if (y_46_im <= 6.2e+212) {
tmp = Math.sin(t_0) * Math.pow(Math.hypot(x_46_im, x_46_re), y_46_re);
} else {
tmp = Math.log((1.0 + Math.expm1(t_0)));
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): t_0 = y_46_re * math.atan2(x_46_im, x_46_re) tmp = 0 if y_46_im <= 6.2e+212: tmp = math.sin(t_0) * math.pow(math.hypot(x_46_im, x_46_re), y_46_re) else: tmp = math.log((1.0 + math.expm1(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)) tmp = 0.0 if (y_46_im <= 6.2e+212) tmp = Float64(sin(t_0) * (hypot(x_46_im, x_46_re) ^ y_46_re)); else tmp = log(Float64(1.0 + expm1(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]}, If[LessEqual[y$46$im, 6.2e+212], N[(N[Sin[t$95$0], $MachinePrecision] * N[Power[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision], y$46$re], $MachinePrecision]), $MachinePrecision], N[Log[N[(1.0 + N[(Exp[t$95$0] - 1), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
\mathbf{if}\;y.im \leq 6.2 \cdot 10^{+212}:\\
\;\;\;\;\sin t\_0 \cdot {\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re}\\
\mathbf{else}:\\
\;\;\;\;\log \left(1 + \mathsf{expm1}\left(t\_0\right)\right)\\
\end{array}
\end{array}
if y.im < 6.19999999999999996e212Initial program 39.2%
cancel-sign-sub-inv39.2%
fma-define39.2%
hypot-define39.2%
distribute-lft-neg-in39.2%
distribute-rgt-neg-out39.2%
fma-define39.2%
hypot-define79.4%
*-commutative79.4%
Simplified79.4%
Taylor expanded in y.im around 0 44.0%
unpow244.0%
unpow244.0%
hypot-undefine49.3%
Simplified49.3%
if 6.19999999999999996e212 < y.im Initial program 48.4%
cancel-sign-sub-inv48.4%
fma-define48.4%
hypot-define48.4%
distribute-lft-neg-in48.4%
distribute-rgt-neg-out48.4%
fma-define48.4%
hypot-define74.7%
*-commutative74.7%
Simplified74.7%
Taylor expanded in y.im around 0 33.1%
unpow233.1%
unpow233.1%
hypot-undefine18.2%
Simplified18.2%
Taylor expanded in x.im around inf 17.7%
mul-1-neg17.7%
*-commutative17.7%
distribute-lft-neg-in17.7%
log-rec17.7%
remove-double-neg17.7%
exp-to-pow17.8%
*-commutative17.8%
Simplified17.8%
Taylor expanded in y.re around 0 13.3%
*-commutative13.3%
log1p-expm1-u13.1%
log1p-undefine48.3%
*-commutative48.3%
Applied egg-rr48.3%
(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)))
(if (<= x.im -2.5e-13)
(* t_1 (pow (- x.im) y.re))
(if (<= x.im 6.5e-81)
(* t_1 (pow (- x.re) y.re))
(* t_0 (pow x.im y.re))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = y_46_re * atan2(x_46_im, x_46_re);
double t_1 = sin(t_0);
double tmp;
if (x_46_im <= -2.5e-13) {
tmp = t_1 * pow(-x_46_im, y_46_re);
} else if (x_46_im <= 6.5e-81) {
tmp = t_1 * pow(-x_46_re, y_46_re);
} else {
tmp = t_0 * pow(x_46_im, y_46_re);
}
return tmp;
}
real(8) function code(x_46re, x_46im, y_46re, y_46im)
real(8), intent (in) :: x_46re
real(8), intent (in) :: x_46im
real(8), intent (in) :: y_46re
real(8), intent (in) :: y_46im
real(8) :: t_0
real(8) :: t_1
real(8) :: tmp
t_0 = y_46re * atan2(x_46im, x_46re)
t_1 = sin(t_0)
if (x_46im <= (-2.5d-13)) then
tmp = t_1 * (-x_46im ** y_46re)
else if (x_46im <= 6.5d-81) then
tmp = t_1 * (-x_46re ** y_46re)
else
tmp = t_0 * (x_46im ** y_46re)
end if
code = tmp
end function
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = y_46_re * Math.atan2(x_46_im, x_46_re);
double t_1 = Math.sin(t_0);
double tmp;
if (x_46_im <= -2.5e-13) {
tmp = t_1 * Math.pow(-x_46_im, y_46_re);
} else if (x_46_im <= 6.5e-81) {
tmp = t_1 * Math.pow(-x_46_re, y_46_re);
} else {
tmp = t_0 * Math.pow(x_46_im, y_46_re);
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): t_0 = y_46_re * math.atan2(x_46_im, x_46_re) t_1 = math.sin(t_0) tmp = 0 if x_46_im <= -2.5e-13: tmp = t_1 * math.pow(-x_46_im, y_46_re) elif x_46_im <= 6.5e-81: tmp = t_1 * math.pow(-x_46_re, y_46_re) else: tmp = t_0 * math.pow(x_46_im, y_46_re) return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = Float64(y_46_re * atan(x_46_im, x_46_re)) t_1 = sin(t_0) tmp = 0.0 if (x_46_im <= -2.5e-13) tmp = Float64(t_1 * (Float64(-x_46_im) ^ y_46_re)); elseif (x_46_im <= 6.5e-81) tmp = Float64(t_1 * (Float64(-x_46_re) ^ y_46_re)); else tmp = Float64(t_0 * (x_46_im ^ y_46_re)); end return tmp end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = y_46_re * atan2(x_46_im, x_46_re); t_1 = sin(t_0); tmp = 0.0; if (x_46_im <= -2.5e-13) tmp = t_1 * (-x_46_im ^ y_46_re); elseif (x_46_im <= 6.5e-81) tmp = t_1 * (-x_46_re ^ y_46_re); else tmp = t_0 * (x_46_im ^ 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[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[Sin[t$95$0], $MachinePrecision]}, If[LessEqual[x$46$im, -2.5e-13], N[(t$95$1 * N[Power[(-x$46$im), y$46$re], $MachinePrecision]), $MachinePrecision], If[LessEqual[x$46$im, 6.5e-81], N[(t$95$1 * N[Power[(-x$46$re), y$46$re], $MachinePrecision]), $MachinePrecision], N[(t$95$0 * N[Power[x$46$im, y$46$re], $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
t_1 := \sin t\_0\\
\mathbf{if}\;x.im \leq -2.5 \cdot 10^{-13}:\\
\;\;\;\;t\_1 \cdot {\left(-x.im\right)}^{y.re}\\
\mathbf{elif}\;x.im \leq 6.5 \cdot 10^{-81}:\\
\;\;\;\;t\_1 \cdot {\left(-x.re\right)}^{y.re}\\
\mathbf{else}:\\
\;\;\;\;t\_0 \cdot {x.im}^{y.re}\\
\end{array}
\end{array}
if x.im < -2.49999999999999995e-13Initial program 30.3%
cancel-sign-sub-inv30.3%
fma-define30.3%
hypot-define30.3%
distribute-lft-neg-in30.3%
distribute-rgt-neg-out30.3%
fma-define30.3%
hypot-define81.0%
*-commutative81.0%
Simplified81.0%
Taylor expanded in y.im around 0 50.6%
unpow250.6%
unpow250.6%
hypot-undefine52.4%
Simplified52.4%
Taylor expanded in x.im around -inf 52.4%
neg-mul-152.4%
Simplified52.4%
if -2.49999999999999995e-13 < x.im < 6.5000000000000002e-81Initial program 47.7%
cancel-sign-sub-inv47.7%
fma-define47.7%
hypot-define47.7%
distribute-lft-neg-in47.7%
distribute-rgt-neg-out47.7%
fma-define47.7%
hypot-define74.6%
*-commutative74.6%
Simplified74.6%
Taylor expanded in y.im around 0 38.5%
unpow238.5%
unpow238.5%
hypot-undefine39.7%
Simplified39.7%
Taylor expanded in x.re around -inf 36.5%
mul-1-neg36.5%
Simplified36.5%
if 6.5000000000000002e-81 < x.im 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-define82.3%
*-commutative82.3%
Simplified82.3%
Taylor expanded in y.im around 0 42.6%
unpow242.6%
unpow242.6%
hypot-undefine50.5%
Simplified50.5%
Taylor expanded in x.im around inf 50.4%
mul-1-neg50.4%
*-commutative50.4%
distribute-lft-neg-in50.4%
log-rec50.4%
remove-double-neg50.4%
exp-to-pow50.5%
*-commutative50.5%
Simplified50.5%
Taylor expanded in y.re around 0 51.8%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (* y.re (atan2 x.im x.re))))
(if (or (<= x.im -1.95e+68) (not (<= x.im 1.02e-71)))
(* t_0 (pow x.im y.re))
(* (sin t_0) (pow 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 = y_46_re * atan2(x_46_im, x_46_re);
double tmp;
if ((x_46_im <= -1.95e+68) || !(x_46_im <= 1.02e-71)) {
tmp = t_0 * pow(x_46_im, y_46_re);
} else {
tmp = sin(t_0) * pow(x_46_re, y_46_re);
}
return tmp;
}
real(8) function code(x_46re, x_46im, y_46re, y_46im)
real(8), intent (in) :: x_46re
real(8), intent (in) :: x_46im
real(8), intent (in) :: y_46re
real(8), intent (in) :: y_46im
real(8) :: t_0
real(8) :: tmp
t_0 = y_46re * atan2(x_46im, x_46re)
if ((x_46im <= (-1.95d+68)) .or. (.not. (x_46im <= 1.02d-71))) then
tmp = t_0 * (x_46im ** y_46re)
else
tmp = sin(t_0) * (x_46re ** y_46re)
end if
code = tmp
end function
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = y_46_re * Math.atan2(x_46_im, x_46_re);
double tmp;
if ((x_46_im <= -1.95e+68) || !(x_46_im <= 1.02e-71)) {
tmp = t_0 * Math.pow(x_46_im, y_46_re);
} else {
tmp = Math.sin(t_0) * Math.pow(x_46_re, y_46_re);
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): t_0 = y_46_re * math.atan2(x_46_im, x_46_re) tmp = 0 if (x_46_im <= -1.95e+68) or not (x_46_im <= 1.02e-71): tmp = t_0 * math.pow(x_46_im, y_46_re) else: tmp = math.sin(t_0) * math.pow(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(y_46_re * atan(x_46_im, x_46_re)) tmp = 0.0 if ((x_46_im <= -1.95e+68) || !(x_46_im <= 1.02e-71)) tmp = Float64(t_0 * (x_46_im ^ y_46_re)); else tmp = Float64(sin(t_0) * (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 = y_46_re * atan2(x_46_im, x_46_re); tmp = 0.0; if ((x_46_im <= -1.95e+68) || ~((x_46_im <= 1.02e-71))) tmp = t_0 * (x_46_im ^ y_46_re); else tmp = sin(t_0) * (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[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, If[Or[LessEqual[x$46$im, -1.95e+68], N[Not[LessEqual[x$46$im, 1.02e-71]], $MachinePrecision]], N[(t$95$0 * N[Power[x$46$im, y$46$re], $MachinePrecision]), $MachinePrecision], N[(N[Sin[t$95$0], $MachinePrecision] * N[Power[x$46$re, y$46$re], $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
\mathbf{if}\;x.im \leq -1.95 \cdot 10^{+68} \lor \neg \left(x.im \leq 1.02 \cdot 10^{-71}\right):\\
\;\;\;\;t\_0 \cdot {x.im}^{y.re}\\
\mathbf{else}:\\
\;\;\;\;\sin t\_0 \cdot {x.re}^{y.re}\\
\end{array}
\end{array}
if x.im < -1.95000000000000009e68 or 1.0200000000000001e-71 < x.im Initial program 31.1%
cancel-sign-sub-inv31.1%
fma-define31.1%
hypot-define31.1%
distribute-lft-neg-in31.1%
distribute-rgt-neg-out31.1%
fma-define31.1%
hypot-define82.0%
*-commutative82.0%
Simplified82.0%
Taylor expanded in y.im around 0 45.8%
unpow245.8%
unpow245.8%
hypot-undefine51.1%
Simplified51.1%
Taylor expanded in x.im around inf 32.9%
mul-1-neg32.9%
*-commutative32.9%
distribute-lft-neg-in32.9%
log-rec32.9%
remove-double-neg32.9%
exp-to-pow47.8%
*-commutative47.8%
Simplified47.8%
Taylor expanded in y.re around 0 50.1%
if -1.95000000000000009e68 < x.im < 1.0200000000000001e-71Initial program 50.7%
cancel-sign-sub-inv50.7%
fma-define50.7%
hypot-define50.7%
distribute-lft-neg-in50.7%
distribute-rgt-neg-out50.7%
fma-define50.7%
hypot-define75.5%
*-commutative75.5%
Simplified75.5%
Taylor expanded in y.im around 0 40.0%
unpow240.0%
unpow240.0%
hypot-undefine42.0%
Simplified42.0%
Taylor expanded in x.im around 0 33.5%
Final simplification42.6%
(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)))
(if (<= x.im -2.85e-13)
(* t_1 (pow (- x.im) y.re))
(if (<= x.im 7e-79) (* t_1 (pow x.re y.re)) (* t_0 (pow x.im y.re))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = y_46_re * atan2(x_46_im, x_46_re);
double t_1 = sin(t_0);
double tmp;
if (x_46_im <= -2.85e-13) {
tmp = t_1 * pow(-x_46_im, y_46_re);
} else if (x_46_im <= 7e-79) {
tmp = t_1 * pow(x_46_re, y_46_re);
} else {
tmp = t_0 * pow(x_46_im, y_46_re);
}
return tmp;
}
real(8) function code(x_46re, x_46im, y_46re, y_46im)
real(8), intent (in) :: x_46re
real(8), intent (in) :: x_46im
real(8), intent (in) :: y_46re
real(8), intent (in) :: y_46im
real(8) :: t_0
real(8) :: t_1
real(8) :: tmp
t_0 = y_46re * atan2(x_46im, x_46re)
t_1 = sin(t_0)
if (x_46im <= (-2.85d-13)) then
tmp = t_1 * (-x_46im ** y_46re)
else if (x_46im <= 7d-79) then
tmp = t_1 * (x_46re ** y_46re)
else
tmp = t_0 * (x_46im ** y_46re)
end if
code = tmp
end function
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = y_46_re * Math.atan2(x_46_im, x_46_re);
double t_1 = Math.sin(t_0);
double tmp;
if (x_46_im <= -2.85e-13) {
tmp = t_1 * Math.pow(-x_46_im, y_46_re);
} else if (x_46_im <= 7e-79) {
tmp = t_1 * Math.pow(x_46_re, y_46_re);
} else {
tmp = t_0 * Math.pow(x_46_im, y_46_re);
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): t_0 = y_46_re * math.atan2(x_46_im, x_46_re) t_1 = math.sin(t_0) tmp = 0 if x_46_im <= -2.85e-13: tmp = t_1 * math.pow(-x_46_im, y_46_re) elif x_46_im <= 7e-79: tmp = t_1 * math.pow(x_46_re, y_46_re) else: tmp = t_0 * math.pow(x_46_im, y_46_re) return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = Float64(y_46_re * atan(x_46_im, x_46_re)) t_1 = sin(t_0) tmp = 0.0 if (x_46_im <= -2.85e-13) tmp = Float64(t_1 * (Float64(-x_46_im) ^ y_46_re)); elseif (x_46_im <= 7e-79) tmp = Float64(t_1 * (x_46_re ^ y_46_re)); else tmp = Float64(t_0 * (x_46_im ^ y_46_re)); end return tmp end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = y_46_re * atan2(x_46_im, x_46_re); t_1 = sin(t_0); tmp = 0.0; if (x_46_im <= -2.85e-13) tmp = t_1 * (-x_46_im ^ y_46_re); elseif (x_46_im <= 7e-79) tmp = t_1 * (x_46_re ^ y_46_re); else tmp = t_0 * (x_46_im ^ 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[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[Sin[t$95$0], $MachinePrecision]}, If[LessEqual[x$46$im, -2.85e-13], N[(t$95$1 * N[Power[(-x$46$im), y$46$re], $MachinePrecision]), $MachinePrecision], If[LessEqual[x$46$im, 7e-79], N[(t$95$1 * N[Power[x$46$re, y$46$re], $MachinePrecision]), $MachinePrecision], N[(t$95$0 * N[Power[x$46$im, y$46$re], $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
t_1 := \sin t\_0\\
\mathbf{if}\;x.im \leq -2.85 \cdot 10^{-13}:\\
\;\;\;\;t\_1 \cdot {\left(-x.im\right)}^{y.re}\\
\mathbf{elif}\;x.im \leq 7 \cdot 10^{-79}:\\
\;\;\;\;t\_1 \cdot {x.re}^{y.re}\\
\mathbf{else}:\\
\;\;\;\;t\_0 \cdot {x.im}^{y.re}\\
\end{array}
\end{array}
if x.im < -2.85e-13Initial program 30.3%
cancel-sign-sub-inv30.3%
fma-define30.3%
hypot-define30.3%
distribute-lft-neg-in30.3%
distribute-rgt-neg-out30.3%
fma-define30.3%
hypot-define81.0%
*-commutative81.0%
Simplified81.0%
Taylor expanded in y.im around 0 50.6%
unpow250.6%
unpow250.6%
hypot-undefine52.4%
Simplified52.4%
Taylor expanded in x.im around -inf 52.4%
neg-mul-152.4%
Simplified52.4%
if -2.85e-13 < x.im < 7.00000000000000059e-79Initial program 47.7%
cancel-sign-sub-inv47.7%
fma-define47.7%
hypot-define47.7%
distribute-lft-neg-in47.7%
distribute-rgt-neg-out47.7%
fma-define47.7%
hypot-define74.6%
*-commutative74.6%
Simplified74.6%
Taylor expanded in y.im around 0 38.5%
unpow238.5%
unpow238.5%
hypot-undefine39.7%
Simplified39.7%
Taylor expanded in x.im around 0 33.8%
if 7.00000000000000059e-79 < x.im 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-define82.3%
*-commutative82.3%
Simplified82.3%
Taylor expanded in y.im around 0 42.6%
unpow242.6%
unpow242.6%
hypot-undefine50.5%
Simplified50.5%
Taylor expanded in x.im around inf 50.4%
mul-1-neg50.4%
*-commutative50.4%
distribute-lft-neg-in50.4%
log-rec50.4%
remove-double-neg50.4%
exp-to-pow50.5%
*-commutative50.5%
Simplified50.5%
Taylor expanded in y.re around 0 51.8%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (* y.re (atan2 x.im x.re))))
(if (or (<= y.re -68000000000.0) (not (<= y.re 8.2e-13)))
(* t_0 (pow x.im y.re))
(cbrt (pow t_0 3.0)))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = y_46_re * atan2(x_46_im, x_46_re);
double tmp;
if ((y_46_re <= -68000000000.0) || !(y_46_re <= 8.2e-13)) {
tmp = t_0 * pow(x_46_im, y_46_re);
} else {
tmp = cbrt(pow(t_0, 3.0));
}
return tmp;
}
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = y_46_re * Math.atan2(x_46_im, x_46_re);
double tmp;
if ((y_46_re <= -68000000000.0) || !(y_46_re <= 8.2e-13)) {
tmp = t_0 * Math.pow(x_46_im, y_46_re);
} else {
tmp = Math.cbrt(Math.pow(t_0, 3.0));
}
return tmp;
}
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = Float64(y_46_re * atan(x_46_im, x_46_re)) tmp = 0.0 if ((y_46_re <= -68000000000.0) || !(y_46_re <= 8.2e-13)) tmp = Float64(t_0 * (x_46_im ^ y_46_re)); else tmp = cbrt((t_0 ^ 3.0)); end return tmp end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, If[Or[LessEqual[y$46$re, -68000000000.0], N[Not[LessEqual[y$46$re, 8.2e-13]], $MachinePrecision]], N[(t$95$0 * N[Power[x$46$im, y$46$re], $MachinePrecision]), $MachinePrecision], N[Power[N[Power[t$95$0, 3.0], $MachinePrecision], 1/3], $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
\mathbf{if}\;y.re \leq -68000000000 \lor \neg \left(y.re \leq 8.2 \cdot 10^{-13}\right):\\
\;\;\;\;t\_0 \cdot {x.im}^{y.re}\\
\mathbf{else}:\\
\;\;\;\;\sqrt[3]{{t\_0}^{3}}\\
\end{array}
\end{array}
if y.re < -6.8e10 or 8.2000000000000004e-13 < y.re Initial program 46.8%
cancel-sign-sub-inv46.8%
fma-define46.8%
hypot-define46.8%
distribute-lft-neg-in46.8%
distribute-rgt-neg-out46.8%
fma-define46.8%
hypot-define82.0%
*-commutative82.0%
Simplified82.0%
Taylor expanded in y.im around 0 70.5%
unpow270.5%
unpow270.5%
hypot-undefine70.5%
Simplified70.5%
Taylor expanded in x.im around inf 29.9%
mul-1-neg29.9%
*-commutative29.9%
distribute-lft-neg-in29.9%
log-rec29.9%
remove-double-neg29.9%
exp-to-pow55.1%
*-commutative55.1%
Simplified55.1%
Taylor expanded in y.re around 0 55.3%
if -6.8e10 < y.re < 8.2000000000000004e-13Initial program 33.0%
cancel-sign-sub-inv33.0%
fma-define33.0%
hypot-define33.0%
distribute-lft-neg-in33.0%
distribute-rgt-neg-out33.0%
fma-define33.0%
hypot-define76.2%
*-commutative76.2%
Simplified76.2%
Taylor expanded in y.im around 0 16.0%
unpow216.0%
unpow216.0%
hypot-undefine23.5%
Simplified23.5%
Taylor expanded in x.im around inf 14.2%
mul-1-neg14.2%
*-commutative14.2%
distribute-lft-neg-in14.2%
log-rec14.2%
remove-double-neg14.2%
exp-to-pow14.2%
*-commutative14.2%
Simplified14.2%
Taylor expanded in y.re around 0 22.2%
*-commutative22.2%
add-cbrt-cube23.6%
pow323.6%
*-commutative23.6%
Applied egg-rr23.6%
Final simplification39.4%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (* y.re (atan2 x.im x.re))))
(if (<= y.re -75000000.0)
(* (sin t_0) (pow x.im y.re))
(if (<= y.re 5.7e-11) (cbrt (pow t_0 3.0)) (* t_0 (pow x.im y.re))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = y_46_re * atan2(x_46_im, x_46_re);
double tmp;
if (y_46_re <= -75000000.0) {
tmp = sin(t_0) * pow(x_46_im, y_46_re);
} else if (y_46_re <= 5.7e-11) {
tmp = cbrt(pow(t_0, 3.0));
} else {
tmp = t_0 * pow(x_46_im, 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 = y_46_re * Math.atan2(x_46_im, x_46_re);
double tmp;
if (y_46_re <= -75000000.0) {
tmp = Math.sin(t_0) * Math.pow(x_46_im, y_46_re);
} else if (y_46_re <= 5.7e-11) {
tmp = Math.cbrt(Math.pow(t_0, 3.0));
} else {
tmp = t_0 * Math.pow(x_46_im, y_46_re);
}
return tmp;
}
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = Float64(y_46_re * atan(x_46_im, x_46_re)) tmp = 0.0 if (y_46_re <= -75000000.0) tmp = Float64(sin(t_0) * (x_46_im ^ y_46_re)); elseif (y_46_re <= 5.7e-11) tmp = cbrt((t_0 ^ 3.0)); else tmp = Float64(t_0 * (x_46_im ^ y_46_re)); end return tmp end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y$46$re, -75000000.0], N[(N[Sin[t$95$0], $MachinePrecision] * N[Power[x$46$im, y$46$re], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$re, 5.7e-11], N[Power[N[Power[t$95$0, 3.0], $MachinePrecision], 1/3], $MachinePrecision], N[(t$95$0 * N[Power[x$46$im, y$46$re], $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
\mathbf{if}\;y.re \leq -75000000:\\
\;\;\;\;\sin t\_0 \cdot {x.im}^{y.re}\\
\mathbf{elif}\;y.re \leq 5.7 \cdot 10^{-11}:\\
\;\;\;\;\sqrt[3]{{t\_0}^{3}}\\
\mathbf{else}:\\
\;\;\;\;t\_0 \cdot {x.im}^{y.re}\\
\end{array}
\end{array}
if y.re < -7.5e7Initial program 52.9%
cancel-sign-sub-inv52.9%
fma-define52.9%
hypot-define52.9%
distribute-lft-neg-in52.9%
distribute-rgt-neg-out52.9%
fma-define52.9%
hypot-define91.4%
*-commutative91.4%
Simplified91.4%
Taylor expanded in y.im around 0 85.8%
unpow285.8%
unpow285.8%
hypot-undefine85.8%
Simplified85.8%
Taylor expanded in x.im around inf 35.8%
mul-1-neg35.8%
*-commutative35.8%
distribute-lft-neg-in35.8%
log-rec35.8%
remove-double-neg35.8%
exp-to-pow68.9%
*-commutative68.9%
Simplified68.9%
if -7.5e7 < y.re < 5.6999999999999997e-11Initial program 33.0%
cancel-sign-sub-inv33.0%
fma-define33.0%
hypot-define33.0%
distribute-lft-neg-in33.0%
distribute-rgt-neg-out33.0%
fma-define33.0%
hypot-define76.2%
*-commutative76.2%
Simplified76.2%
Taylor expanded in y.im around 0 16.0%
unpow216.0%
unpow216.0%
hypot-undefine23.5%
Simplified23.5%
Taylor expanded in x.im around inf 14.2%
mul-1-neg14.2%
*-commutative14.2%
distribute-lft-neg-in14.2%
log-rec14.2%
remove-double-neg14.2%
exp-to-pow14.2%
*-commutative14.2%
Simplified14.2%
Taylor expanded in y.re around 0 22.2%
*-commutative22.2%
add-cbrt-cube23.6%
pow323.6%
*-commutative23.6%
Applied egg-rr23.6%
if 5.6999999999999997e-11 < y.re Initial program 39.6%
cancel-sign-sub-inv39.6%
fma-define39.6%
hypot-define39.6%
distribute-lft-neg-in39.6%
distribute-rgt-neg-out39.6%
fma-define39.6%
hypot-define70.6%
*-commutative70.6%
Simplified70.6%
Taylor expanded in y.im around 0 51.9%
unpow251.9%
unpow251.9%
hypot-undefine52.0%
Simplified52.0%
Taylor expanded in x.im around inf 22.7%
mul-1-neg22.7%
*-commutative22.7%
distribute-lft-neg-in22.7%
log-rec22.7%
remove-double-neg22.7%
exp-to-pow38.5%
*-commutative38.5%
Simplified38.5%
Taylor expanded in y.re around 0 40.6%
(FPCore (x.re x.im y.re y.im) :precision binary64 (if (or (<= y.re -48000000.0) (not (<= y.re 6e-13))) (* (* y.re (atan2 x.im x.re)) (pow x.im y.re)) (* y.re (log (exp (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_re <= -48000000.0) || !(y_46_re <= 6e-13)) {
tmp = (y_46_re * atan2(x_46_im, x_46_re)) * pow(x_46_im, y_46_re);
} else {
tmp = y_46_re * log(exp(atan2(x_46_im, 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 <= (-48000000.0d0)) .or. (.not. (y_46re <= 6d-13))) then
tmp = (y_46re * atan2(x_46im, x_46re)) * (x_46im ** y_46re)
else
tmp = y_46re * log(exp(atan2(x_46im, 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 <= -48000000.0) || !(y_46_re <= 6e-13)) {
tmp = (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.log(Math.exp(Math.atan2(x_46_im, x_46_re)));
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): tmp = 0 if (y_46_re <= -48000000.0) or not (y_46_re <= 6e-13): tmp = (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.log(math.exp(math.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_re <= -48000000.0) || !(y_46_re <= 6e-13)) tmp = Float64(Float64(y_46_re * atan(x_46_im, x_46_re)) * (x_46_im ^ y_46_re)); else tmp = Float64(y_46_re * log(exp(atan(x_46_im, x_46_re)))); end return tmp end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im) tmp = 0.0; if ((y_46_re <= -48000000.0) || ~((y_46_re <= 6e-13))) tmp = (y_46_re * atan2(x_46_im, x_46_re)) * (x_46_im ^ y_46_re); else tmp = y_46_re * log(exp(atan2(x_46_im, x_46_re))); end tmp_2 = tmp; end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := If[Or[LessEqual[y$46$re, -48000000.0], N[Not[LessEqual[y$46$re, 6e-13]], $MachinePrecision]], N[(N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision] * N[Power[x$46$im, y$46$re], $MachinePrecision]), $MachinePrecision], N[(y$46$re * N[Log[N[Exp[N[ArcTan[x$46$im / x$46$re], $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y.re \leq -48000000 \lor \neg \left(y.re \leq 6 \cdot 10^{-13}\right):\\
\;\;\;\;\left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {x.im}^{y.re}\\
\mathbf{else}:\\
\;\;\;\;y.re \cdot \log \left(e^{\tan^{-1}_* \frac{x.im}{x.re}}\right)\\
\end{array}
\end{array}
if y.re < -4.8e7 or 5.99999999999999968e-13 < y.re Initial program 46.8%
cancel-sign-sub-inv46.8%
fma-define46.8%
hypot-define46.8%
distribute-lft-neg-in46.8%
distribute-rgt-neg-out46.8%
fma-define46.8%
hypot-define82.0%
*-commutative82.0%
Simplified82.0%
Taylor expanded in y.im around 0 70.5%
unpow270.5%
unpow270.5%
hypot-undefine70.5%
Simplified70.5%
Taylor expanded in x.im around inf 29.9%
mul-1-neg29.9%
*-commutative29.9%
distribute-lft-neg-in29.9%
log-rec29.9%
remove-double-neg29.9%
exp-to-pow55.1%
*-commutative55.1%
Simplified55.1%
Taylor expanded in y.re around 0 55.3%
if -4.8e7 < y.re < 5.99999999999999968e-13Initial program 33.0%
cancel-sign-sub-inv33.0%
fma-define33.0%
hypot-define33.0%
distribute-lft-neg-in33.0%
distribute-rgt-neg-out33.0%
fma-define33.0%
hypot-define76.2%
*-commutative76.2%
Simplified76.2%
Taylor expanded in y.im around 0 16.0%
unpow216.0%
unpow216.0%
hypot-undefine23.5%
Simplified23.5%
Taylor expanded in x.im around inf 14.2%
mul-1-neg14.2%
*-commutative14.2%
distribute-lft-neg-in14.2%
log-rec14.2%
remove-double-neg14.2%
exp-to-pow14.2%
*-commutative14.2%
Simplified14.2%
Taylor expanded in y.re around 0 22.2%
add-log-exp22.8%
Applied egg-rr22.8%
Final simplification39.1%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (* y.re (atan2 x.im x.re))))
(if (<= y.im 7.5e+209)
(* t_0 (pow (hypot x.im x.re) y.re))
(log (+ 1.0 (expm1 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 tmp;
if (y_46_im <= 7.5e+209) {
tmp = t_0 * pow(hypot(x_46_im, x_46_re), y_46_re);
} else {
tmp = log((1.0 + expm1(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 = y_46_re * Math.atan2(x_46_im, x_46_re);
double tmp;
if (y_46_im <= 7.5e+209) {
tmp = t_0 * Math.pow(Math.hypot(x_46_im, x_46_re), y_46_re);
} else {
tmp = Math.log((1.0 + Math.expm1(t_0)));
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): t_0 = y_46_re * math.atan2(x_46_im, x_46_re) tmp = 0 if y_46_im <= 7.5e+209: tmp = t_0 * math.pow(math.hypot(x_46_im, x_46_re), y_46_re) else: tmp = math.log((1.0 + math.expm1(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)) tmp = 0.0 if (y_46_im <= 7.5e+209) tmp = Float64(t_0 * (hypot(x_46_im, x_46_re) ^ y_46_re)); else tmp = log(Float64(1.0 + expm1(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]}, If[LessEqual[y$46$im, 7.5e+209], N[(t$95$0 * N[Power[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision], y$46$re], $MachinePrecision]), $MachinePrecision], N[Log[N[(1.0 + N[(Exp[t$95$0] - 1), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
\mathbf{if}\;y.im \leq 7.5 \cdot 10^{+209}:\\
\;\;\;\;t\_0 \cdot {\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re}\\
\mathbf{else}:\\
\;\;\;\;\log \left(1 + \mathsf{expm1}\left(t\_0\right)\right)\\
\end{array}
\end{array}
if y.im < 7.50000000000000055e209Initial program 39.2%
cancel-sign-sub-inv39.2%
fma-define39.2%
hypot-define39.2%
distribute-lft-neg-in39.2%
distribute-rgt-neg-out39.2%
fma-define39.2%
hypot-define79.4%
*-commutative79.4%
Simplified79.4%
Taylor expanded in y.im around 0 44.0%
unpow244.0%
unpow244.0%
hypot-undefine49.3%
Simplified49.3%
Taylor expanded in y.re around 0 47.5%
if 7.50000000000000055e209 < y.im Initial program 48.4%
cancel-sign-sub-inv48.4%
fma-define48.4%
hypot-define48.4%
distribute-lft-neg-in48.4%
distribute-rgt-neg-out48.4%
fma-define48.4%
hypot-define74.7%
*-commutative74.7%
Simplified74.7%
Taylor expanded in y.im around 0 33.1%
unpow233.1%
unpow233.1%
hypot-undefine18.2%
Simplified18.2%
Taylor expanded in x.im around inf 17.7%
mul-1-neg17.7%
*-commutative17.7%
distribute-lft-neg-in17.7%
log-rec17.7%
remove-double-neg17.7%
exp-to-pow17.8%
*-commutative17.8%
Simplified17.8%
Taylor expanded in y.re around 0 13.3%
*-commutative13.3%
log1p-expm1-u13.1%
log1p-undefine48.3%
*-commutative48.3%
Applied egg-rr48.3%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (* y.re (atan2 x.im x.re))))
(if (or (<= y.re -32000000.0) (not (<= y.re 3.6e-11)))
(* t_0 (pow x.im y.re))
t_0)))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = y_46_re * atan2(x_46_im, x_46_re);
double tmp;
if ((y_46_re <= -32000000.0) || !(y_46_re <= 3.6e-11)) {
tmp = t_0 * pow(x_46_im, y_46_re);
} else {
tmp = t_0;
}
return tmp;
}
real(8) function code(x_46re, x_46im, y_46re, y_46im)
real(8), intent (in) :: x_46re
real(8), intent (in) :: x_46im
real(8), intent (in) :: y_46re
real(8), intent (in) :: y_46im
real(8) :: t_0
real(8) :: tmp
t_0 = y_46re * atan2(x_46im, x_46re)
if ((y_46re <= (-32000000.0d0)) .or. (.not. (y_46re <= 3.6d-11))) then
tmp = t_0 * (x_46im ** y_46re)
else
tmp = t_0
end if
code = tmp
end function
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = y_46_re * Math.atan2(x_46_im, x_46_re);
double tmp;
if ((y_46_re <= -32000000.0) || !(y_46_re <= 3.6e-11)) {
tmp = t_0 * Math.pow(x_46_im, y_46_re);
} else {
tmp = t_0;
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): t_0 = y_46_re * math.atan2(x_46_im, x_46_re) tmp = 0 if (y_46_re <= -32000000.0) or not (y_46_re <= 3.6e-11): tmp = t_0 * math.pow(x_46_im, y_46_re) else: tmp = 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)) tmp = 0.0 if ((y_46_re <= -32000000.0) || !(y_46_re <= 3.6e-11)) tmp = Float64(t_0 * (x_46_im ^ y_46_re)); else tmp = t_0; end return tmp end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = y_46_re * atan2(x_46_im, x_46_re); tmp = 0.0; if ((y_46_re <= -32000000.0) || ~((y_46_re <= 3.6e-11))) tmp = t_0 * (x_46_im ^ y_46_re); else tmp = 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[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, If[Or[LessEqual[y$46$re, -32000000.0], N[Not[LessEqual[y$46$re, 3.6e-11]], $MachinePrecision]], N[(t$95$0 * N[Power[x$46$im, y$46$re], $MachinePrecision]), $MachinePrecision], t$95$0]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
\mathbf{if}\;y.re \leq -32000000 \lor \neg \left(y.re \leq 3.6 \cdot 10^{-11}\right):\\
\;\;\;\;t\_0 \cdot {x.im}^{y.re}\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
if y.re < -3.2e7 or 3.59999999999999985e-11 < y.re Initial program 46.8%
cancel-sign-sub-inv46.8%
fma-define46.8%
hypot-define46.8%
distribute-lft-neg-in46.8%
distribute-rgt-neg-out46.8%
fma-define46.8%
hypot-define82.0%
*-commutative82.0%
Simplified82.0%
Taylor expanded in y.im around 0 70.5%
unpow270.5%
unpow270.5%
hypot-undefine70.5%
Simplified70.5%
Taylor expanded in x.im around inf 29.9%
mul-1-neg29.9%
*-commutative29.9%
distribute-lft-neg-in29.9%
log-rec29.9%
remove-double-neg29.9%
exp-to-pow55.1%
*-commutative55.1%
Simplified55.1%
Taylor expanded in y.re around 0 55.3%
if -3.2e7 < y.re < 3.59999999999999985e-11Initial program 33.0%
cancel-sign-sub-inv33.0%
fma-define33.0%
hypot-define33.0%
distribute-lft-neg-in33.0%
distribute-rgt-neg-out33.0%
fma-define33.0%
hypot-define76.2%
*-commutative76.2%
Simplified76.2%
Taylor expanded in y.im around 0 16.0%
unpow216.0%
unpow216.0%
hypot-undefine23.5%
Simplified23.5%
Taylor expanded in x.im around inf 14.2%
mul-1-neg14.2%
*-commutative14.2%
distribute-lft-neg-in14.2%
log-rec14.2%
remove-double-neg14.2%
exp-to-pow14.2%
*-commutative14.2%
Simplified14.2%
Taylor expanded in y.re around 0 22.2%
Final simplification38.7%
(FPCore (x.re x.im y.re y.im) :precision binary64 (* y.re (atan2 x.im x.re)))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
return y_46_re * atan2(x_46_im, x_46_re);
}
real(8) function code(x_46re, x_46im, y_46re, y_46im)
real(8), intent (in) :: x_46re
real(8), intent (in) :: x_46im
real(8), intent (in) :: y_46re
real(8), intent (in) :: y_46im
code = y_46re * atan2(x_46im, x_46re)
end function
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
return y_46_re * Math.atan2(x_46_im, x_46_re);
}
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)
function code(x_46_re, x_46_im, y_46_re, y_46_im) return Float64(y_46_re * atan(x_46_im, x_46_re)) end
function tmp = code(x_46_re, x_46_im, y_46_re, y_46_im) tmp = y_46_re * atan2(x_46_im, x_46_re); end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}
\end{array}
Initial program 39.9%
cancel-sign-sub-inv39.9%
fma-define39.9%
hypot-define39.9%
distribute-lft-neg-in39.9%
distribute-rgt-neg-out39.9%
fma-define39.9%
hypot-define79.1%
*-commutative79.1%
Simplified79.1%
Taylor expanded in y.im around 0 43.2%
unpow243.2%
unpow243.2%
hypot-undefine47.0%
Simplified47.0%
Taylor expanded in x.im around inf 22.0%
mul-1-neg22.0%
*-commutative22.0%
distribute-lft-neg-in22.0%
log-rec22.0%
remove-double-neg22.0%
exp-to-pow34.6%
*-commutative34.6%
Simplified34.6%
Taylor expanded in y.re around 0 14.0%
herbie shell --seed 2024137
(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)))))