
(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 20 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (log (sqrt (+ (* x.re x.re) (* x.im x.im))))))
(*
(exp (- (* t_0 y.re) (* (atan2 x.im x.re) y.im)))
(sin (+ (* t_0 y.im) (* (atan2 x.im x.re) y.re))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))));
return exp(((t_0 * y_46_re) - (atan2(x_46_im, x_46_re) * y_46_im))) * sin(((t_0 * y_46_im) + (atan2(x_46_im, x_46_re) * y_46_re)));
}
real(8) function code(x_46re, x_46im, y_46re, y_46im)
real(8), intent (in) :: x_46re
real(8), intent (in) :: x_46im
real(8), intent (in) :: y_46re
real(8), intent (in) :: y_46im
real(8) :: t_0
t_0 = log(sqrt(((x_46re * x_46re) + (x_46im * x_46im))))
code = exp(((t_0 * y_46re) - (atan2(x_46im, x_46re) * y_46im))) * sin(((t_0 * y_46im) + (atan2(x_46im, x_46re) * y_46re)))
end function
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = Math.log(Math.sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))));
return Math.exp(((t_0 * y_46_re) - (Math.atan2(x_46_im, x_46_re) * y_46_im))) * Math.sin(((t_0 * y_46_im) + (Math.atan2(x_46_im, x_46_re) * y_46_re)));
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): t_0 = math.log(math.sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im)))) return math.exp(((t_0 * y_46_re) - (math.atan2(x_46_im, x_46_re) * y_46_im))) * math.sin(((t_0 * y_46_im) + (math.atan2(x_46_im, x_46_re) * y_46_re)))
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = log(sqrt(Float64(Float64(x_46_re * x_46_re) + Float64(x_46_im * x_46_im)))) return Float64(exp(Float64(Float64(t_0 * y_46_re) - Float64(atan(x_46_im, x_46_re) * y_46_im))) * sin(Float64(Float64(t_0 * y_46_im) + Float64(atan(x_46_im, x_46_re) * y_46_re)))) end
function tmp = code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im)))); tmp = exp(((t_0 * y_46_re) - (atan2(x_46_im, x_46_re) * y_46_im))) * sin(((t_0 * y_46_im) + (atan2(x_46_im, x_46_re) * y_46_re))); end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[Log[N[Sqrt[N[(N[(x$46$re * x$46$re), $MachinePrecision] + N[(x$46$im * x$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]}, N[(N[Exp[N[(N[(t$95$0 * y$46$re), $MachinePrecision] - N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Sin[N[(N[(t$95$0 * y$46$im), $MachinePrecision] + N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$re), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right)\\
e^{t\_0 \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \sin \left(t\_0 \cdot y.im + \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)
\end{array}
\end{array}
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (log (hypot x.im x.re)))
(t_1 (* y.im (atan2 x.im x.re)))
(t_2 (* y.re (atan2 x.im x.re))))
(if (or (<= y.im -1.8e+38) (not (<= y.im 1.05e+60)))
(* (exp (pow (cbrt (- (* y.re t_0) t_1)) 3.0)) (sin t_2))
(*
(exp (* y.re (- t_0 (/ t_1 y.re))))
(sin (fma (log (hypot x.re x.im)) y.im t_2))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = log(hypot(x_46_im, 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 ((y_46_im <= -1.8e+38) || !(y_46_im <= 1.05e+60)) {
tmp = exp(pow(cbrt(((y_46_re * t_0) - t_1)), 3.0)) * sin(t_2);
} else {
tmp = exp((y_46_re * (t_0 - (t_1 / y_46_re)))) * sin(fma(log(hypot(x_46_re, x_46_im)), y_46_im, t_2));
}
return tmp;
}
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = log(hypot(x_46_im, 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 ((y_46_im <= -1.8e+38) || !(y_46_im <= 1.05e+60)) tmp = Float64(exp((cbrt(Float64(Float64(y_46_re * t_0) - t_1)) ^ 3.0)) * sin(t_2)); else tmp = Float64(exp(Float64(y_46_re * Float64(t_0 - Float64(t_1 / y_46_re)))) * sin(fma(log(hypot(x_46_re, x_46_im)), y_46_im, t_2))); end return tmp end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $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[Or[LessEqual[y$46$im, -1.8e+38], N[Not[LessEqual[y$46$im, 1.05e+60]], $MachinePrecision]], N[(N[Exp[N[Power[N[Power[N[(N[(y$46$re * t$95$0), $MachinePrecision] - t$95$1), $MachinePrecision], 1/3], $MachinePrecision], 3.0], $MachinePrecision]], $MachinePrecision] * N[Sin[t$95$2], $MachinePrecision]), $MachinePrecision], N[(N[Exp[N[(y$46$re * N[(t$95$0 - N[(t$95$1 / y$46$re), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Sin[N[(N[Log[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision]], $MachinePrecision] * y$46$im + t$95$2), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \log \left(\mathsf{hypot}\left(x.im, x.re\right)\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}\;y.im \leq -1.8 \cdot 10^{+38} \lor \neg \left(y.im \leq 1.05 \cdot 10^{+60}\right):\\
\;\;\;\;e^{{\left(\sqrt[3]{y.re \cdot t\_0 - t\_1}\right)}^{3}} \cdot \sin t\_2\\
\mathbf{else}:\\
\;\;\;\;e^{y.re \cdot \left(t\_0 - \frac{t\_1}{y.re}\right)} \cdot \sin \left(\mathsf{fma}\left(\log \left(\mathsf{hypot}\left(x.re, x.im\right)\right), y.im, t\_2\right)\right)\\
\end{array}
\end{array}
if y.im < -1.79999999999999985e38 or 1.0500000000000001e60 < y.im Initial program 32.8%
fma-define32.8%
hypot-define57.6%
*-commutative57.6%
add-cube-cbrt57.6%
pow357.6%
Applied egg-rr57.6%
add-cube-cbrt57.6%
pow357.6%
*-commutative57.6%
+-commutative57.6%
hypot-undefine65.0%
*-commutative65.0%
Applied egg-rr65.0%
Taylor expanded in y.im around 0 74.0%
if -1.79999999999999985e38 < y.im < 1.0500000000000001e60Initial 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 -370.0) (not (<= y.im 290.0)))
(*
(exp (pow (cbrt (- (* y.re (log (hypot x.im x.re))) t_0)) 3.0))
(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 <= -370.0) || !(y_46_im <= 290.0)) {
tmp = exp(pow(cbrt(((y_46_re * log(hypot(x_46_im, x_46_re))) - t_0)), 3.0)) * 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 <= -370.0) || !(y_46_im <= 290.0)) tmp = Float64(exp((cbrt(Float64(Float64(y_46_re * log(hypot(x_46_im, x_46_re))) - t_0)) ^ 3.0)) * 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, -370.0], N[Not[LessEqual[y$46$im, 290.0]], $MachinePrecision]], N[(N[Exp[N[Power[N[Power[N[(N[(y$46$re * N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], 1/3], $MachinePrecision], 3.0], $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 -370 \lor \neg \left(y.im \leq 290\right):\\
\;\;\;\;e^{{\left(\sqrt[3]{y.re \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right) - t\_0}\right)}^{3}} \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 < -370 or 290 < y.im Initial program 35.0%
fma-define35.0%
hypot-define58.2%
*-commutative58.2%
add-cube-cbrt58.2%
pow358.2%
Applied egg-rr58.2%
add-cube-cbrt58.2%
pow358.2%
*-commutative58.2%
+-commutative58.2%
hypot-undefine66.9%
*-commutative66.9%
Applied egg-rr66.9%
Taylor expanded in y.im around 0 73.7%
if -370 < y.im < 290Initial 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 (pow (cbrt (- (* y.re (log (hypot x.im x.re))) t_0)) 3.0)) t_2)
(if (<= y.re 5.8e-6)
(*
(sin (fma (log (hypot x.re x.im)) y.im t_1))
(exp (* (- y.re) (/ t_0 y.re))))
(if (<= y.re 2e+170)
(*
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(pow(cbrt(((y_46_re * log(hypot(x_46_im, x_46_re))) - t_0)), 3.0)) * t_2;
} else if (y_46_re <= 5.8e-6) {
tmp = sin(fma(log(hypot(x_46_re, x_46_im)), y_46_im, t_1)) * exp((-y_46_re * (t_0 / y_46_re)));
} else if (y_46_re <= 2e+170) {
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((cbrt(Float64(Float64(y_46_re * log(hypot(x_46_im, x_46_re))) - t_0)) ^ 3.0)) * t_2); elseif (y_46_re <= 5.8e-6) tmp = Float64(sin(fma(log(hypot(x_46_re, x_46_im)), y_46_im, t_1)) * exp(Float64(Float64(-y_46_re) * Float64(t_0 / y_46_re)))); elseif (y_46_re <= 2e+170) 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[Power[N[Power[N[(N[(y$46$re * N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], 1/3], $MachinePrecision], 3.0], $MachinePrecision]], $MachinePrecision] * t$95$2), $MachinePrecision], If[LessEqual[y$46$re, 5.8e-6], N[(N[Sin[N[(N[Log[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision]], $MachinePrecision] * y$46$im + t$95$1), $MachinePrecision]], $MachinePrecision] * N[Exp[N[((-y$46$re) * N[(t$95$0 / y$46$re), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$re, 2e+170], 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^{{\left(\sqrt[3]{y.re \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right) - t\_0}\right)}^{3}} \cdot t\_2\\
\mathbf{elif}\;y.re \leq 5.8 \cdot 10^{-6}:\\
\;\;\;\;\sin \left(\mathsf{fma}\left(\log \left(\mathsf{hypot}\left(x.re, x.im\right)\right), y.im, t\_1\right)\right) \cdot e^{\left(-y.re\right) \cdot \frac{t\_0}{y.re}}\\
\mathbf{elif}\;y.re \leq 2 \cdot 10^{+170}:\\
\;\;\;\;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%
fma-define51.4%
hypot-define88.0%
*-commutative88.0%
add-cube-cbrt87.9%
pow387.9%
Applied egg-rr87.9%
add-cube-cbrt87.9%
pow387.9%
*-commutative87.9%
+-commutative87.9%
hypot-undefine90.4%
*-commutative90.4%
Applied egg-rr90.4%
Taylor expanded in y.im around 0 90.6%
if -1.1000000000000001e-7 < y.re < 5.8000000000000004e-6Initial 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.5%
*-commutative76.5%
Simplified76.5%
Taylor expanded in y.re around inf 40.6%
unpow240.6%
unpow240.6%
hypot-undefine76.5%
associate-*r/76.5%
neg-mul-176.5%
distribute-lft-neg-in76.5%
Simplified76.5%
Taylor expanded in y.im around inf 76.4%
associate-*r/76.4%
neg-mul-176.4%
*-commutative76.4%
distribute-rgt-neg-in76.4%
Applied egg-rr76.4%
if 5.8000000000000004e-6 < y.re < 2.00000000000000007e170Initial program 54.7%
Taylor expanded in y.im around 0 74.0%
if 2.00000000000000007e170 < 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.im (atan2 x.im x.re)))
(t_1 (* y.re (atan2 x.im x.re)))
(t_2
(*
(sin t_1)
(exp
(- (* y.re (log (sqrt (+ (* x.re x.re) (* x.im x.im))))) t_0)))))
(if (<= y.re -0.000135)
t_2
(if (<= y.re 0.00175)
(*
(sin (fma (log (hypot x.re x.im)) y.im t_1))
(exp (* (- y.re) (/ t_0 y.re))))
(if (<= y.re 2e+171)
t_2
(* (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) * exp(((y_46_re * log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))) - t_0));
double tmp;
if (y_46_re <= -0.000135) {
tmp = t_2;
} else if (y_46_re <= 0.00175) {
tmp = sin(fma(log(hypot(x_46_re, x_46_im)), y_46_im, t_1)) * exp((-y_46_re * (t_0 / y_46_re)));
} else if (y_46_re <= 2e+171) {
tmp = t_2;
} 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 = Float64(sin(t_1) * exp(Float64(Float64(y_46_re * log(sqrt(Float64(Float64(x_46_re * x_46_re) + Float64(x_46_im * x_46_im))))) - t_0))) tmp = 0.0 if (y_46_re <= -0.000135) tmp = t_2; elseif (y_46_re <= 0.00175) tmp = Float64(sin(fma(log(hypot(x_46_re, x_46_im)), y_46_im, t_1)) * exp(Float64(Float64(-y_46_re) * Float64(t_0 / y_46_re)))); elseif (y_46_re <= 2e+171) tmp = t_2; 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[(N[Sin[t$95$1], $MachinePrecision] * N[Exp[N[(N[(y$46$re * N[Log[N[Sqrt[N[(N[(x$46$re * x$46$re), $MachinePrecision] + N[(x$46$im * x$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y$46$re, -0.000135], t$95$2, If[LessEqual[y$46$re, 0.00175], N[(N[Sin[N[(N[Log[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision]], $MachinePrecision] * y$46$im + t$95$1), $MachinePrecision]], $MachinePrecision] * N[Exp[N[((-y$46$re) * N[(t$95$0 / y$46$re), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$re, 2e+171], t$95$2, 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 \cdot e^{y.re \cdot \log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) - t\_0}\\
\mathbf{if}\;y.re \leq -0.000135:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;y.re \leq 0.00175:\\
\;\;\;\;\sin \left(\mathsf{fma}\left(\log \left(\mathsf{hypot}\left(x.re, x.im\right)\right), y.im, t\_1\right)\right) \cdot e^{\left(-y.re\right) \cdot \frac{t\_0}{y.re}}\\
\mathbf{elif}\;y.re \leq 2 \cdot 10^{+171}:\\
\;\;\;\;t\_2\\
\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.35000000000000002e-4 or 0.00175000000000000004 < y.re < 1.99999999999999991e171Initial program 53.4%
Taylor expanded in y.im around 0 84.5%
if -1.35000000000000002e-4 < y.re < 0.00175000000000000004Initial program 32.5%
cancel-sign-sub-inv32.5%
fma-define32.5%
hypot-define32.5%
distribute-lft-neg-in32.5%
distribute-rgt-neg-out32.5%
fma-define32.5%
hypot-define76.0%
*-commutative76.0%
Simplified76.0%
Taylor expanded in y.re around inf 40.0%
unpow240.0%
unpow240.0%
hypot-undefine76.0%
associate-*r/76.0%
neg-mul-176.0%
distribute-lft-neg-in76.0%
Simplified76.0%
Taylor expanded in y.im around inf 75.4%
associate-*r/75.4%
neg-mul-175.4%
*-commutative75.4%
distribute-rgt-neg-in75.4%
Applied egg-rr75.4%
if 1.99999999999999991e171 < 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 simplification78.8%
(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)
(exp
(- (* y.re (log (sqrt (+ (* x.re x.re) (* x.im x.im))))) t_0)))))
(if (<= y.re -0.00012)
t_2
(if (<= y.re 0.00019)
(* (sin (fma (log (hypot x.re x.im)) y.im t_1)) (/ 1.0 (exp t_0)))
(if (<= y.re 1e+174)
t_2
(* (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) * exp(((y_46_re * log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))) - t_0));
double tmp;
if (y_46_re <= -0.00012) {
tmp = t_2;
} else if (y_46_re <= 0.00019) {
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 <= 1e+174) {
tmp = t_2;
} 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 = Float64(sin(t_1) * exp(Float64(Float64(y_46_re * log(sqrt(Float64(Float64(x_46_re * x_46_re) + Float64(x_46_im * x_46_im))))) - t_0))) tmp = 0.0 if (y_46_re <= -0.00012) tmp = t_2; elseif (y_46_re <= 0.00019) 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 <= 1e+174) tmp = t_2; 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[(N[Sin[t$95$1], $MachinePrecision] * N[Exp[N[(N[(y$46$re * N[Log[N[Sqrt[N[(N[(x$46$re * x$46$re), $MachinePrecision] + N[(x$46$im * x$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y$46$re, -0.00012], t$95$2, If[LessEqual[y$46$re, 0.00019], 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, 1e+174], t$95$2, 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 \cdot e^{y.re \cdot \log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) - t\_0}\\
\mathbf{if}\;y.re \leq -0.00012:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;y.re \leq 0.00019:\\
\;\;\;\;\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 10^{+174}:\\
\;\;\;\;t\_2\\
\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.20000000000000003e-4 or 1.9000000000000001e-4 < y.re < 1.00000000000000007e174Initial program 53.4%
Taylor expanded in y.im around 0 84.5%
if -1.20000000000000003e-4 < y.re < 1.9000000000000001e-4Initial program 32.5%
exp-diff32.5%
exp-to-pow32.5%
hypot-define32.5%
*-commutative32.5%
exp-prod31.7%
fma-define31.7%
hypot-define75.1%
*-commutative75.1%
Simplified75.1%
Taylor expanded in y.re around 0 75.4%
if 1.00000000000000007e174 < 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 simplification78.8%
(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)
(exp
(-
(* y.re (log (sqrt (+ (* x.re x.re) (* x.im x.im)))))
(* y.im (atan2 x.im x.re)))))))
(if (<= y.re -0.000135)
t_1
(if (<= y.re 6e-7)
(*
(exp (* y.im (- (atan2 x.im x.re))))
(sin (* y.im (log (hypot x.im x.re)))))
(if (<= y.re 2e+170)
t_1
(* (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 = sin(t_0) * exp(((y_46_re * log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))) - (y_46_im * atan2(x_46_im, x_46_re))));
double tmp;
if (y_46_re <= -0.000135) {
tmp = t_1;
} else if (y_46_re <= 6e-7) {
tmp = exp((y_46_im * -atan2(x_46_im, x_46_re))) * sin((y_46_im * log(hypot(x_46_im, x_46_re))));
} else if (y_46_re <= 2e+170) {
tmp = t_1;
} 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.sin(t_0) * Math.exp(((y_46_re * Math.log(Math.sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))) - (y_46_im * Math.atan2(x_46_im, x_46_re))));
double tmp;
if (y_46_re <= -0.000135) {
tmp = t_1;
} else if (y_46_re <= 6e-7) {
tmp = Math.exp((y_46_im * -Math.atan2(x_46_im, x_46_re))) * Math.sin((y_46_im * Math.log(Math.hypot(x_46_im, x_46_re))));
} else if (y_46_re <= 2e+170) {
tmp = t_1;
} 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 = Float64(sin(t_0) * exp(Float64(Float64(y_46_re * log(sqrt(Float64(Float64(x_46_re * x_46_re) + Float64(x_46_im * x_46_im))))) - Float64(y_46_im * atan(x_46_im, x_46_re))))) tmp = 0.0 if (y_46_re <= -0.000135) tmp = t_1; elseif (y_46_re <= 6e-7) tmp = Float64(exp(Float64(y_46_im * Float64(-atan(x_46_im, x_46_re)))) * sin(Float64(y_46_im * log(hypot(x_46_im, x_46_re))))); elseif (y_46_re <= 2e+170) tmp = t_1; 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[(N[Sin[t$95$0], $MachinePrecision] * N[Exp[N[(N[(y$46$re * N[Log[N[Sqrt[N[(N[(x$46$re * x$46$re), $MachinePrecision] + N[(x$46$im * x$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision] - N[(y$46$im * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y$46$re, -0.000135], t$95$1, If[LessEqual[y$46$re, 6e-7], N[(N[Exp[N[(y$46$im * (-N[ArcTan[x$46$im / x$46$re], $MachinePrecision])), $MachinePrecision]], $MachinePrecision] * N[Sin[N[(y$46$im * N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$re, 2e+170], t$95$1, 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 := \sin t\_0 \cdot e^{y.re \cdot \log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) - y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}}\\
\mathbf{if}\;y.re \leq -0.000135:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y.re \leq 6 \cdot 10^{-7}:\\
\;\;\;\;e^{y.im \cdot \left(-\tan^{-1}_* \frac{x.im}{x.re}\right)} \cdot \sin \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right)\\
\mathbf{elif}\;y.re \leq 2 \cdot 10^{+170}:\\
\;\;\;\;t\_1\\
\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 < -1.35000000000000002e-4 or 5.9999999999999997e-7 < y.re < 2.00000000000000007e170Initial program 53.4%
Taylor expanded in y.im around 0 84.5%
if -1.35000000000000002e-4 < y.re < 5.9999999999999997e-7Initial program 32.5%
cancel-sign-sub-inv32.5%
fma-define32.5%
hypot-define32.5%
distribute-lft-neg-in32.5%
distribute-rgt-neg-out32.5%
fma-define32.5%
hypot-define76.0%
*-commutative76.0%
Simplified76.0%
Taylor expanded in y.re around 0 25.9%
neg-mul-125.9%
distribute-lft-neg-in25.9%
*-commutative25.9%
unpow225.9%
unpow225.9%
hypot-undefine56.7%
Simplified56.7%
if 2.00000000000000007e170 < 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 simplification69.5%
(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 (/ -1.0 x.re))))
(if (<= x.re -700.0)
(* (exp (- (* (- y.re) t_2) t_0)) (sin (- t_1 (* y.im t_2))))
(if (<= x.re 4.4e-45)
(*
(sin t_1)
(exp (- (* y.re (log (sqrt (+ (* x.re x.re) (* x.im x.im))))) t_0)))
(*
(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 t_2 = log((-1.0 / x_46_re));
double tmp;
if (x_46_re <= -700.0) {
tmp = exp(((-y_46_re * t_2) - t_0)) * sin((t_1 - (y_46_im * t_2)));
} else if (x_46_re <= 4.4e-45) {
tmp = sin(t_1) * exp(((y_46_re * log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))) - t_0));
} else {
tmp = exp(((y_46_re * log(x_46_re)) - t_0)) * sin((t_1 + (y_46_im * log(x_46_re))));
}
return tmp;
}
real(8) function code(x_46re, x_46im, y_46re, y_46im)
real(8), intent (in) :: x_46re
real(8), intent (in) :: x_46im
real(8), intent (in) :: y_46re
real(8), intent (in) :: y_46im
real(8) :: t_0
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_0 = y_46im * atan2(x_46im, x_46re)
t_1 = y_46re * atan2(x_46im, x_46re)
t_2 = log(((-1.0d0) / x_46re))
if (x_46re <= (-700.0d0)) then
tmp = exp(((-y_46re * t_2) - t_0)) * sin((t_1 - (y_46im * t_2)))
else if (x_46re <= 4.4d-45) then
tmp = sin(t_1) * exp(((y_46re * log(sqrt(((x_46re * x_46re) + (x_46im * x_46im))))) - t_0))
else
tmp = exp(((y_46re * log(x_46re)) - t_0)) * sin((t_1 + (y_46im * log(x_46re))))
end if
code = tmp
end function
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double 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 t_2 = Math.log((-1.0 / x_46_re));
double tmp;
if (x_46_re <= -700.0) {
tmp = Math.exp(((-y_46_re * t_2) - t_0)) * Math.sin((t_1 - (y_46_im * t_2)));
} else if (x_46_re <= 4.4e-45) {
tmp = Math.sin(t_1) * Math.exp(((y_46_re * Math.log(Math.sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))) - t_0));
} 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) t_2 = math.log((-1.0 / x_46_re)) tmp = 0 if x_46_re <= -700.0: tmp = math.exp(((-y_46_re * t_2) - t_0)) * math.sin((t_1 - (y_46_im * t_2))) elif x_46_re <= 4.4e-45: tmp = math.sin(t_1) * math.exp(((y_46_re * math.log(math.sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))) - t_0)) 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)) t_2 = log(Float64(-1.0 / x_46_re)) tmp = 0.0 if (x_46_re <= -700.0) tmp = Float64(exp(Float64(Float64(Float64(-y_46_re) * t_2) - t_0)) * sin(Float64(t_1 - Float64(y_46_im * t_2)))); elseif (x_46_re <= 4.4e-45) tmp = Float64(sin(t_1) * exp(Float64(Float64(y_46_re * log(sqrt(Float64(Float64(x_46_re * x_46_re) + Float64(x_46_im * x_46_im))))) - t_0))); 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); t_2 = log((-1.0 / x_46_re)); tmp = 0.0; if (x_46_re <= -700.0) tmp = exp(((-y_46_re * t_2) - t_0)) * sin((t_1 - (y_46_im * t_2))); elseif (x_46_re <= 4.4e-45) tmp = sin(t_1) * exp(((y_46_re * log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))) - t_0)); 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]}, Block[{t$95$2 = N[Log[N[(-1.0 / x$46$re), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[x$46$re, -700.0], N[(N[Exp[N[(N[((-y$46$re) * t$95$2), $MachinePrecision] - t$95$0), $MachinePrecision]], $MachinePrecision] * N[Sin[N[(t$95$1 - N[(y$46$im * t$95$2), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[x$46$re, 4.4e-45], N[(N[Sin[t$95$1], $MachinePrecision] * N[Exp[N[(N[(y$46$re * N[Log[N[Sqrt[N[(N[(x$46$re * x$46$re), $MachinePrecision] + N[(x$46$im * x$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]], $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}\\
t_2 := \log \left(\frac{-1}{x.re}\right)\\
\mathbf{if}\;x.re \leq -700:\\
\;\;\;\;e^{\left(-y.re\right) \cdot t\_2 - t\_0} \cdot \sin \left(t\_1 - y.im \cdot t\_2\right)\\
\mathbf{elif}\;x.re \leq 4.4 \cdot 10^{-45}:\\
\;\;\;\;\sin t\_1 \cdot e^{y.re \cdot \log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) - t\_0}\\
\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 < -700Initial program 21.3%
fma-define21.3%
hypot-define54.8%
*-commutative54.8%
add-cube-cbrt54.7%
pow354.7%
Applied egg-rr54.7%
add-cube-cbrt54.7%
pow354.7%
*-commutative54.7%
+-commutative54.7%
hypot-undefine76.5%
*-commutative76.5%
Applied egg-rr76.5%
log1p-expm1-u76.5%
*-commutative76.5%
hypot-define21.2%
+-commutative21.2%
hypot-undefine76.5%
Applied egg-rr76.5%
Taylor expanded in x.re around -inf 76.7%
associate-*r*76.7%
neg-mul-176.7%
+-commutative76.7%
mul-1-neg76.7%
unsub-neg76.7%
*-commutative76.7%
Simplified76.7%
if -700 < x.re < 4.39999999999999987e-45Initial program 49.8%
Taylor expanded in y.im around 0 62.9%
if 4.39999999999999987e-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 simplification69.8%
(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 1.05)
(*
(exp (* y.im (- (atan2 x.im x.re))))
(sin (* y.im (log (hypot 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 <= 1.05) {
tmp = exp((y_46_im * -atan2(x_46_im, x_46_re))) * sin((y_46_im * log(hypot(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 <= 1.05) {
tmp = Math.exp((y_46_im * -Math.atan2(x_46_im, x_46_re))) * Math.sin((y_46_im * Math.log(Math.hypot(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 <= 1.05) tmp = Float64(exp(Float64(y_46_im * Float64(-atan(x_46_im, x_46_re)))) * sin(Float64(y_46_im * log(hypot(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, 1.05], N[(N[Exp[N[(y$46$im * (-N[ArcTan[x$46$im / x$46$re], $MachinePrecision])), $MachinePrecision]], $MachinePrecision] * N[Sin[N[(y$46$im * N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(N[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 1.05:\\
\;\;\;\;e^{y.im \cdot \left(-\tan^{-1}_* \frac{x.im}{x.re}\right)} \cdot \sin \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right)\\
\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 < 1.05000000000000004Initial 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%
neg-mul-128.8%
distribute-lft-neg-in28.8%
*-commutative28.8%
unpow228.8%
unpow228.8%
hypot-undefine60.5%
Simplified60.5%
if 1.05000000000000004 < 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 -3.6e-113)
(* (sin (* y.re (atan2 x.im x.re))) t_0)
(if (<= y.re 1.15)
(*
(exp (* y.im (- (atan2 x.im x.re))))
(sin (* y.im (log (hypot 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 <= -3.6e-113) {
tmp = sin((y_46_re * atan2(x_46_im, x_46_re))) * t_0;
} else if (y_46_re <= 1.15) {
tmp = exp((y_46_im * -atan2(x_46_im, x_46_re))) * sin((y_46_im * log(hypot(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 <= -3.6e-113) {
tmp = Math.sin((y_46_re * Math.atan2(x_46_im, x_46_re))) * t_0;
} else if (y_46_re <= 1.15) {
tmp = Math.exp((y_46_im * -Math.atan2(x_46_im, x_46_re))) * Math.sin((y_46_im * Math.log(Math.hypot(x_46_im, x_46_re))));
} else {
tmp = t_0 * Math.sin((y_46_re * Math.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 <= -3.6e-113) tmp = Float64(sin(Float64(y_46_re * atan(x_46_im, x_46_re))) * t_0); elseif (y_46_re <= 1.15) tmp = Float64(exp(Float64(y_46_im * Float64(-atan(x_46_im, x_46_re)))) * sin(Float64(y_46_im * log(hypot(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, -3.6e-113], 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, 1.15], N[(N[Exp[N[(y$46$im * (-N[ArcTan[x$46$im / x$46$re], $MachinePrecision])), $MachinePrecision]], $MachinePrecision] * N[Sin[N[(y$46$im * N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(t$95$0 * N[Sin[N[(y$46$re * N[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 -3.6 \cdot 10^{-113}:\\
\;\;\;\;\sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot t\_0\\
\mathbf{elif}\;y.re \leq 1.15:\\
\;\;\;\;e^{y.im \cdot \left(-\tan^{-1}_* \frac{x.im}{x.re}\right)} \cdot \sin \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t\_0 \cdot \sin \left(y.re \cdot {\left(\sqrt[3]{\tan^{-1}_* \frac{x.im}{x.re}}\right)}^{3}\right)\\
\end{array}
\end{array}
if y.re < -3.59999999999999975e-113Initial 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 -3.59999999999999975e-113 < y.re < 1.1499999999999999Initial 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%
neg-mul-128.8%
distribute-lft-neg-in28.8%
*-commutative28.8%
unpow228.8%
unpow228.8%
hypot-undefine60.5%
Simplified60.5%
if 1.1499999999999999 < 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.92)))
(* (sin (* y.re (atan2 x.im x.re))) (pow (hypot x.im x.re) y.re))
(*
(exp (* y.im (- (atan2 x.im x.re))))
(sin (* y.im (log (hypot x.im x.re)))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double tmp;
if ((y_46_re <= -2.4e-106) || !(y_46_re <= 0.92)) {
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 = exp((y_46_im * -atan2(x_46_im, x_46_re))) * sin((y_46_im * log(hypot(x_46_im, x_46_re))));
}
return tmp;
}
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double tmp;
if ((y_46_re <= -2.4e-106) || !(y_46_re <= 0.92)) {
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.exp((y_46_im * -Math.atan2(x_46_im, x_46_re))) * Math.sin((y_46_im * Math.log(Math.hypot(x_46_im, x_46_re))));
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): tmp = 0 if (y_46_re <= -2.4e-106) or not (y_46_re <= 0.92): 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.exp((y_46_im * -math.atan2(x_46_im, x_46_re))) * math.sin((y_46_im * math.log(math.hypot(x_46_im, x_46_re)))) return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) tmp = 0.0 if ((y_46_re <= -2.4e-106) || !(y_46_re <= 0.92)) 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(exp(Float64(y_46_im * Float64(-atan(x_46_im, x_46_re)))) * sin(Float64(y_46_im * log(hypot(x_46_im, x_46_re))))); end return tmp end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im) tmp = 0.0; if ((y_46_re <= -2.4e-106) || ~((y_46_re <= 0.92))) tmp = sin((y_46_re * atan2(x_46_im, x_46_re))) * (hypot(x_46_im, x_46_re) ^ y_46_re); else tmp = exp((y_46_im * -atan2(x_46_im, x_46_re))) * sin((y_46_im * log(hypot(x_46_im, x_46_re)))); end tmp_2 = tmp; end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := If[Or[LessEqual[y$46$re, -2.4e-106], N[Not[LessEqual[y$46$re, 0.92]], $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[Exp[N[(y$46$im * (-N[ArcTan[x$46$im / x$46$re], $MachinePrecision])), $MachinePrecision]], $MachinePrecision] * N[Sin[N[(y$46$im * N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y.re \leq -2.4 \cdot 10^{-106} \lor \neg \left(y.re \leq 0.92\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}:\\
\;\;\;\;e^{y.im \cdot \left(-\tan^{-1}_* \frac{x.im}{x.re}\right)} \cdot \sin \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right)\\
\end{array}
\end{array}
if y.re < -2.3999999999999998e-106 or 0.92000000000000004 < 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.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%
neg-mul-128.8%
distribute-lft-neg-in28.8%
*-commutative28.8%
unpow228.8%
unpow228.8%
hypot-undefine60.5%
Simplified60.5%
Final simplification64.4%
(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 (<= y.im -9.5e+35)
(* t_1 (pow (log (exp x.im)) y.re))
(if (<= y.im 5.6e+212)
(* t_1 (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 t_1 = sin(t_0);
double tmp;
if (y_46_im <= -9.5e+35) {
tmp = t_1 * pow(log(exp(x_46_im)), y_46_re);
} else if (y_46_im <= 5.6e+212) {
tmp = t_1 * 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 t_1 = Math.sin(t_0);
double tmp;
if (y_46_im <= -9.5e+35) {
tmp = t_1 * Math.pow(Math.log(Math.exp(x_46_im)), y_46_re);
} else if (y_46_im <= 5.6e+212) {
tmp = t_1 * 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) t_1 = math.sin(t_0) tmp = 0 if y_46_im <= -9.5e+35: tmp = t_1 * math.pow(math.log(math.exp(x_46_im)), y_46_re) elif y_46_im <= 5.6e+212: tmp = t_1 * 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)) t_1 = sin(t_0) tmp = 0.0 if (y_46_im <= -9.5e+35) tmp = Float64(t_1 * (log(exp(x_46_im)) ^ y_46_re)); elseif (y_46_im <= 5.6e+212) tmp = Float64(t_1 * (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]}, Block[{t$95$1 = N[Sin[t$95$0], $MachinePrecision]}, If[LessEqual[y$46$im, -9.5e+35], N[(t$95$1 * N[Power[N[Log[N[Exp[x$46$im], $MachinePrecision]], $MachinePrecision], y$46$re], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$im, 5.6e+212], N[(t$95$1 * 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}\\
t_1 := \sin t\_0\\
\mathbf{if}\;y.im \leq -9.5 \cdot 10^{+35}:\\
\;\;\;\;t\_1 \cdot {\log \left(e^{x.im}\right)}^{y.re}\\
\mathbf{elif}\;y.im \leq 5.6 \cdot 10^{+212}:\\
\;\;\;\;t\_1 \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 < -9.50000000000000062e35Initial program 36.6%
cancel-sign-sub-inv36.6%
fma-define36.6%
hypot-define36.6%
distribute-lft-neg-in36.6%
distribute-rgt-neg-out36.6%
fma-define36.6%
hypot-define62.4%
*-commutative62.4%
Simplified62.4%
Taylor expanded in y.im around 0 38.4%
unpow238.4%
unpow238.4%
hypot-undefine35.5%
Simplified35.5%
add-log-exp43.2%
Applied egg-rr43.2%
Taylor expanded in x.re around 0 46.5%
if -9.50000000000000062e35 < y.im < 5.59999999999999994e212Initial program 40.1%
cancel-sign-sub-inv40.1%
fma-define40.1%
hypot-define40.1%
distribute-lft-neg-in40.1%
distribute-rgt-neg-out40.1%
fma-define40.1%
hypot-define85.1%
*-commutative85.1%
Simplified85.1%
Taylor expanded in y.im around 0 45.9%
unpow245.9%
unpow245.9%
hypot-undefine53.9%
Simplified53.9%
if 5.59999999999999994e212 < 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 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 (<= y.im 1.06e+219)
(* (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 <= 1.06e+219) {
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 <= 1.06e+219) {
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 <= 1.06e+219: 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 <= 1.06e+219) 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, 1.06e+219], 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 1.06 \cdot 10^{+219}:\\
\;\;\;\;\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 < 1.06e219Initial 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 1.06e219 < 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 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 (sin (* y.re (atan2 x.im x.re)))))
(if (<= x.im -2.85e-13)
(* t_0 (pow (- x.im) y.re))
(if (<= x.im 1.4e-78)
(* t_0 (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 = sin((y_46_re * atan2(x_46_im, x_46_re)));
double tmp;
if (x_46_im <= -2.85e-13) {
tmp = t_0 * pow(-x_46_im, y_46_re);
} else if (x_46_im <= 1.4e-78) {
tmp = t_0 * 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) :: tmp
t_0 = sin((y_46re * atan2(x_46im, x_46re)))
if (x_46im <= (-2.85d-13)) then
tmp = t_0 * (-x_46im ** y_46re)
else if (x_46im <= 1.4d-78) then
tmp = t_0 * (-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 = Math.sin((y_46_re * Math.atan2(x_46_im, x_46_re)));
double tmp;
if (x_46_im <= -2.85e-13) {
tmp = t_0 * Math.pow(-x_46_im, y_46_re);
} else if (x_46_im <= 1.4e-78) {
tmp = t_0 * 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 = math.sin((y_46_re * math.atan2(x_46_im, x_46_re))) tmp = 0 if x_46_im <= -2.85e-13: tmp = t_0 * math.pow(-x_46_im, y_46_re) elif x_46_im <= 1.4e-78: tmp = t_0 * 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 = sin(Float64(y_46_re * atan(x_46_im, x_46_re))) tmp = 0.0 if (x_46_im <= -2.85e-13) tmp = Float64(t_0 * (Float64(-x_46_im) ^ y_46_re)); elseif (x_46_im <= 1.4e-78) tmp = Float64(t_0 * (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 = sin((y_46_re * atan2(x_46_im, x_46_re))); tmp = 0.0; if (x_46_im <= -2.85e-13) tmp = t_0 * (-x_46_im ^ y_46_re); elseif (x_46_im <= 1.4e-78) tmp = t_0 * (-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[Sin[N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[x$46$im, -2.85e-13], N[(t$95$0 * N[Power[(-x$46$im), y$46$re], $MachinePrecision]), $MachinePrecision], If[LessEqual[x$46$im, 1.4e-78], N[(t$95$0 * 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 := \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\\
\mathbf{if}\;x.im \leq -2.85 \cdot 10^{-13}:\\
\;\;\;\;t\_0 \cdot {\left(-x.im\right)}^{y.re}\\
\mathbf{elif}\;x.im \leq 1.4 \cdot 10^{-78}:\\
\;\;\;\;t\_0 \cdot {\left(-x.re\right)}^{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%
mul-1-neg52.4%
Simplified52.4%
if -2.85e-13 < x.im < 1.40000000000000012e-78Initial 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 1.40000000000000012e-78 < 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.5%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (sin (* y.re (atan2 x.im x.re)))))
(if (or (<= x.im -3600000000000.0) (not (<= x.im 5e-83)))
(* t_0 (pow x.im y.re))
(* 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 = sin((y_46_re * atan2(x_46_im, x_46_re)));
double tmp;
if ((x_46_im <= -3600000000000.0) || !(x_46_im <= 5e-83)) {
tmp = t_0 * pow(x_46_im, y_46_re);
} else {
tmp = 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 = sin((y_46re * atan2(x_46im, x_46re)))
if ((x_46im <= (-3600000000000.0d0)) .or. (.not. (x_46im <= 5d-83))) then
tmp = t_0 * (x_46im ** y_46re)
else
tmp = 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 = Math.sin((y_46_re * Math.atan2(x_46_im, x_46_re)));
double tmp;
if ((x_46_im <= -3600000000000.0) || !(x_46_im <= 5e-83)) {
tmp = t_0 * Math.pow(x_46_im, y_46_re);
} else {
tmp = 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 = math.sin((y_46_re * math.atan2(x_46_im, x_46_re))) tmp = 0 if (x_46_im <= -3600000000000.0) or not (x_46_im <= 5e-83): tmp = t_0 * math.pow(x_46_im, y_46_re) else: tmp = 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 = sin(Float64(y_46_re * atan(x_46_im, x_46_re))) tmp = 0.0 if ((x_46_im <= -3600000000000.0) || !(x_46_im <= 5e-83)) tmp = Float64(t_0 * (x_46_im ^ y_46_re)); else tmp = Float64(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 = sin((y_46_re * atan2(x_46_im, x_46_re))); tmp = 0.0; if ((x_46_im <= -3600000000000.0) || ~((x_46_im <= 5e-83))) tmp = t_0 * (x_46_im ^ y_46_re); else tmp = 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[Sin[N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[Or[LessEqual[x$46$im, -3600000000000.0], N[Not[LessEqual[x$46$im, 5e-83]], $MachinePrecision]], N[(t$95$0 * N[Power[x$46$im, y$46$re], $MachinePrecision]), $MachinePrecision], N[(t$95$0 * N[Power[x$46$re, y$46$re], $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\\
\mathbf{if}\;x.im \leq -3600000000000 \lor \neg \left(x.im \leq 5 \cdot 10^{-83}\right):\\
\;\;\;\;t\_0 \cdot {x.im}^{y.re}\\
\mathbf{else}:\\
\;\;\;\;t\_0 \cdot {x.re}^{y.re}\\
\end{array}
\end{array}
if x.im < -3.6e12 or 5e-83 < x.im Initial program 34.8%
cancel-sign-sub-inv34.8%
fma-define34.8%
hypot-define34.8%
distribute-lft-neg-in34.8%
distribute-rgt-neg-out34.8%
fma-define34.8%
hypot-define82.9%
*-commutative82.9%
Simplified82.9%
Taylor expanded in y.im around 0 47.0%
unpow247.0%
unpow247.0%
hypot-undefine52.4%
Simplified52.4%
Taylor expanded in x.im around inf 47.4%
if -3.6e12 < x.im < 5e-83Initial program 47.9%
cancel-sign-sub-inv47.9%
fma-define47.9%
hypot-define47.9%
distribute-lft-neg-in47.9%
distribute-rgt-neg-out47.9%
fma-define47.9%
hypot-define73.2%
*-commutative73.2%
Simplified73.2%
Taylor expanded in y.im around 0 37.5%
unpow237.5%
unpow237.5%
hypot-undefine38.7%
Simplified38.7%
Taylor expanded in x.im around 0 32.9%
Final simplification41.7%
(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 -35000000.0) (not (<= y.re 5.8e-11)))
(* (sin 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 <= -35000000.0) || !(y_46_re <= 5.8e-11)) {
tmp = sin(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 <= -35000000.0) || !(y_46_re <= 5.8e-11)) {
tmp = Math.sin(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 <= -35000000.0) || !(y_46_re <= 5.8e-11)) tmp = Float64(sin(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, -35000000.0], N[Not[LessEqual[y$46$re, 5.8e-11]], $MachinePrecision]], N[(N[Sin[t$95$0], $MachinePrecision] * 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 -35000000 \lor \neg \left(y.re \leq 5.8 \cdot 10^{-11}\right):\\
\;\;\;\;\sin t\_0 \cdot {x.im}^{y.re}\\
\mathbf{else}:\\
\;\;\;\;\sqrt[3]{{t\_0}^{3}}\\
\end{array}
\end{array}
if y.re < -3.5e7 or 5.8e-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 55.1%
if -3.5e7 < y.re < 5.8e-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 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 (sin (* y.re (atan2 x.im x.re)))))
(if (<= x.im -1.22e-13)
(* t_0 (pow (- x.im) y.re))
(if (<= x.im 1.35e-77) (* t_0 (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 = sin((y_46_re * atan2(x_46_im, x_46_re)));
double tmp;
if (x_46_im <= -1.22e-13) {
tmp = t_0 * pow(-x_46_im, y_46_re);
} else if (x_46_im <= 1.35e-77) {
tmp = t_0 * 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) :: tmp
t_0 = sin((y_46re * atan2(x_46im, x_46re)))
if (x_46im <= (-1.22d-13)) then
tmp = t_0 * (-x_46im ** y_46re)
else if (x_46im <= 1.35d-77) then
tmp = t_0 * (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 = Math.sin((y_46_re * Math.atan2(x_46_im, x_46_re)));
double tmp;
if (x_46_im <= -1.22e-13) {
tmp = t_0 * Math.pow(-x_46_im, y_46_re);
} else if (x_46_im <= 1.35e-77) {
tmp = t_0 * 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 = math.sin((y_46_re * math.atan2(x_46_im, x_46_re))) tmp = 0 if x_46_im <= -1.22e-13: tmp = t_0 * math.pow(-x_46_im, y_46_re) elif x_46_im <= 1.35e-77: tmp = t_0 * 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 = sin(Float64(y_46_re * atan(x_46_im, x_46_re))) tmp = 0.0 if (x_46_im <= -1.22e-13) tmp = Float64(t_0 * (Float64(-x_46_im) ^ y_46_re)); elseif (x_46_im <= 1.35e-77) tmp = Float64(t_0 * (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 = sin((y_46_re * atan2(x_46_im, x_46_re))); tmp = 0.0; if (x_46_im <= -1.22e-13) tmp = t_0 * (-x_46_im ^ y_46_re); elseif (x_46_im <= 1.35e-77) tmp = t_0 * (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[Sin[N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[x$46$im, -1.22e-13], N[(t$95$0 * N[Power[(-x$46$im), y$46$re], $MachinePrecision]), $MachinePrecision], If[LessEqual[x$46$im, 1.35e-77], N[(t$95$0 * 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 := \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\\
\mathbf{if}\;x.im \leq -1.22 \cdot 10^{-13}:\\
\;\;\;\;t\_0 \cdot {\left(-x.im\right)}^{y.re}\\
\mathbf{elif}\;x.im \leq 1.35 \cdot 10^{-77}:\\
\;\;\;\;t\_0 \cdot {x.re}^{y.re}\\
\mathbf{else}:\\
\;\;\;\;t\_0 \cdot {x.im}^{y.re}\\
\end{array}
\end{array}
if x.im < -1.2200000000000001e-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%
mul-1-neg52.4%
Simplified52.4%
if -1.2200000000000001e-13 < x.im < 1.35e-77Initial 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 1.35e-77 < 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.5%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (expm1 (* y.re (atan2 x.im x.re)))))
(if (or (<= y.im -150.0) (not (<= y.im 1.45e+21)))
(log (+ 1.0 t_0))
(log1p t_0))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = expm1((y_46_re * atan2(x_46_im, x_46_re)));
double tmp;
if ((y_46_im <= -150.0) || !(y_46_im <= 1.45e+21)) {
tmp = log((1.0 + t_0));
} else {
tmp = log1p(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.expm1((y_46_re * Math.atan2(x_46_im, x_46_re)));
double tmp;
if ((y_46_im <= -150.0) || !(y_46_im <= 1.45e+21)) {
tmp = Math.log((1.0 + t_0));
} else {
tmp = Math.log1p(t_0);
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): t_0 = math.expm1((y_46_re * math.atan2(x_46_im, x_46_re))) tmp = 0 if (y_46_im <= -150.0) or not (y_46_im <= 1.45e+21): tmp = math.log((1.0 + t_0)) else: tmp = math.log1p(t_0) return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = expm1(Float64(y_46_re * atan(x_46_im, x_46_re))) tmp = 0.0 if ((y_46_im <= -150.0) || !(y_46_im <= 1.45e+21)) tmp = log(Float64(1.0 + t_0)); else tmp = log1p(t_0); end return tmp end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[(Exp[N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]] - 1), $MachinePrecision]}, If[Or[LessEqual[y$46$im, -150.0], N[Not[LessEqual[y$46$im, 1.45e+21]], $MachinePrecision]], N[Log[N[(1.0 + t$95$0), $MachinePrecision]], $MachinePrecision], N[Log[1 + t$95$0], $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \mathsf{expm1}\left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\\
\mathbf{if}\;y.im \leq -150 \lor \neg \left(y.im \leq 1.45 \cdot 10^{+21}\right):\\
\;\;\;\;\log \left(1 + t\_0\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{log1p}\left(t\_0\right)\\
\end{array}
\end{array}
if y.im < -150 or 1.45e21 < y.im Initial program 33.1%
cancel-sign-sub-inv33.1%
fma-define33.1%
hypot-define33.1%
distribute-lft-neg-in33.1%
distribute-rgt-neg-out33.1%
fma-define33.1%
hypot-define65.7%
*-commutative65.7%
Simplified65.7%
Taylor expanded in y.im around 0 40.6%
unpow240.6%
unpow240.6%
hypot-undefine36.3%
Simplified36.3%
Taylor expanded in y.re around 0 4.8%
*-commutative4.8%
log1p-expm1-u16.2%
log1p-undefine32.4%
*-commutative32.4%
Applied egg-rr32.4%
if -150 < y.im < 1.45e21Initial program 46.1%
cancel-sign-sub-inv46.1%
fma-define46.1%
hypot-define46.1%
distribute-lft-neg-in46.1%
distribute-rgt-neg-out46.1%
fma-define46.1%
hypot-define91.3%
*-commutative91.3%
Simplified91.3%
Taylor expanded in y.im around 0 45.6%
unpow245.6%
unpow245.6%
hypot-undefine56.8%
Simplified56.8%
Taylor expanded in y.re around 0 22.3%
log1p-expm1-u32.1%
Applied egg-rr32.1%
Final simplification32.2%
(FPCore (x.re x.im y.re y.im) :precision binary64 (if (<= x.re 2.2e-115) (log1p (expm1 (* y.re (atan2 x.im x.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 (x_46_re <= 2.2e-115) {
tmp = log1p(expm1((y_46_re * atan2(x_46_im, x_46_re))));
} else {
tmp = y_46_re * log(exp(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 (x_46_re <= 2.2e-115) {
tmp = Math.log1p(Math.expm1((y_46_re * Math.atan2(x_46_im, x_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 x_46_re <= 2.2e-115: tmp = math.log1p(math.expm1((y_46_re * math.atan2(x_46_im, x_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 (x_46_re <= 2.2e-115) tmp = log1p(expm1(Float64(y_46_re * atan(x_46_im, x_46_re)))); else tmp = Float64(y_46_re * log(exp(atan(x_46_im, x_46_re)))); end return tmp end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := If[LessEqual[x$46$re, 2.2e-115], N[Log[1 + N[(Exp[N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]] - 1), $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}\;x.re \leq 2.2 \cdot 10^{-115}:\\
\;\;\;\;\mathsf{log1p}\left(\mathsf{expm1}\left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)\\
\mathbf{else}:\\
\;\;\;\;y.re \cdot \log \left(e^{\tan^{-1}_* \frac{x.im}{x.re}}\right)\\
\end{array}
\end{array}
if x.re < 2.1999999999999999e-115Initial program 38.4%
cancel-sign-sub-inv38.4%
fma-define38.4%
hypot-define38.4%
distribute-lft-neg-in38.4%
distribute-rgt-neg-out38.4%
fma-define38.4%
hypot-define80.7%
*-commutative80.7%
Simplified80.7%
Taylor expanded in y.im around 0 46.2%
unpow246.2%
unpow246.2%
hypot-undefine52.2%
Simplified52.2%
Taylor expanded in y.re around 0 16.6%
log1p-expm1-u30.3%
Applied egg-rr30.3%
if 2.1999999999999999e-115 < x.re Initial program 42.3%
cancel-sign-sub-inv42.3%
fma-define42.3%
hypot-define42.3%
distribute-lft-neg-in42.3%
distribute-rgt-neg-out42.3%
fma-define42.3%
hypot-define76.6%
*-commutative76.6%
Simplified76.6%
Taylor expanded in y.im around 0 38.5%
unpow238.5%
unpow238.5%
hypot-undefine38.8%
Simplified38.8%
Taylor expanded in y.re around 0 9.9%
add-log-exp23.3%
Applied egg-rr23.3%
(FPCore (x.re x.im y.re y.im) :precision binary64 (log1p (expm1 (* 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 log1p(expm1((y_46_re * atan2(x_46_im, x_46_re))));
}
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
return Math.log1p(Math.expm1((y_46_re * Math.atan2(x_46_im, x_46_re))));
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): return math.log1p(math.expm1((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 log1p(expm1(Float64(y_46_re * atan(x_46_im, x_46_re)))) end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := N[Log[1 + N[(Exp[N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]] - 1), $MachinePrecision]], $MachinePrecision]
\begin{array}{l}
\\
\mathsf{log1p}\left(\mathsf{expm1}\left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)
\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 y.re around 0 14.0%
log1p-expm1-u24.5%
Applied egg-rr24.5%
(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 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)))))