
(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)))
(cos (+ (* 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))) * cos(((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))) * cos(((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.cos(((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.cos(((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))) * cos(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))) * cos(((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[Cos[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 \cos \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 16 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)))
(cos (+ (* 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))) * cos(((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))) * cos(((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.cos(((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.cos(((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))) * cos(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))) * cos(((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[Cos[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 \cos \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
(exp
(-
(* (log (sqrt (+ (* x.im x.im) (* x.re x.re)))) y.re)
(* y.im (atan2 x.im x.re)))))
(t_1 (* (atan2 x.im x.re) y.re))
(t_2 (log (hypot x.re x.im)))
(t_3 (* (cos (* t_2 y.im)) t_0)))
(if (<= y.re -2.9)
t_3
(if (<= y.re 150.0)
(/
(cos (fma y.im (log (hypot x.im x.re)) t_1))
(/ (pow (exp y.im) (atan2 x.im x.re)) (pow (hypot x.im x.re) y.re)))
(if (<= y.re 2e+198)
t_3
(* (fma (- y.im) (* (sin t_1) t_2) (cos t_1)) t_0))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = exp(((log(sqrt(((x_46_im * x_46_im) + (x_46_re * x_46_re)))) * y_46_re) - (y_46_im * atan2(x_46_im, x_46_re))));
double t_1 = atan2(x_46_im, x_46_re) * y_46_re;
double t_2 = log(hypot(x_46_re, x_46_im));
double t_3 = cos((t_2 * y_46_im)) * t_0;
double tmp;
if (y_46_re <= -2.9) {
tmp = t_3;
} else if (y_46_re <= 150.0) {
tmp = cos(fma(y_46_im, log(hypot(x_46_im, x_46_re)), t_1)) / (pow(exp(y_46_im), atan2(x_46_im, x_46_re)) / pow(hypot(x_46_im, x_46_re), y_46_re));
} else if (y_46_re <= 2e+198) {
tmp = t_3;
} else {
tmp = fma(-y_46_im, (sin(t_1) * t_2), cos(t_1)) * t_0;
}
return tmp;
}
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = exp(Float64(Float64(log(sqrt(Float64(Float64(x_46_im * x_46_im) + Float64(x_46_re * x_46_re)))) * y_46_re) - Float64(y_46_im * atan(x_46_im, x_46_re)))) t_1 = Float64(atan(x_46_im, x_46_re) * y_46_re) t_2 = log(hypot(x_46_re, x_46_im)) t_3 = Float64(cos(Float64(t_2 * y_46_im)) * t_0) tmp = 0.0 if (y_46_re <= -2.9) tmp = t_3; elseif (y_46_re <= 150.0) tmp = Float64(cos(fma(y_46_im, log(hypot(x_46_im, x_46_re)), t_1)) / Float64((exp(y_46_im) ^ atan(x_46_im, x_46_re)) / (hypot(x_46_im, x_46_re) ^ y_46_re))); elseif (y_46_re <= 2e+198) tmp = t_3; else tmp = Float64(fma(Float64(-y_46_im), Float64(sin(t_1) * t_2), cos(t_1)) * 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[(N[(N[Log[N[Sqrt[N[(N[(x$46$im * x$46$im), $MachinePrecision] + N[(x$46$re * x$46$re), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision] * y$46$re), $MachinePrecision] - N[(y$46$im * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$1 = N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$re), $MachinePrecision]}, Block[{t$95$2 = N[Log[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision]], $MachinePrecision]}, Block[{t$95$3 = N[(N[Cos[N[(t$95$2 * y$46$im), $MachinePrecision]], $MachinePrecision] * t$95$0), $MachinePrecision]}, If[LessEqual[y$46$re, -2.9], t$95$3, If[LessEqual[y$46$re, 150.0], N[(N[Cos[N[(y$46$im * N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision] + t$95$1), $MachinePrecision]], $MachinePrecision] / N[(N[Power[N[Exp[y$46$im], $MachinePrecision], N[ArcTan[x$46$im / x$46$re], $MachinePrecision]], $MachinePrecision] / N[Power[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision], y$46$re], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$re, 2e+198], t$95$3, N[(N[((-y$46$im) * N[(N[Sin[t$95$1], $MachinePrecision] * t$95$2), $MachinePrecision] + N[Cos[t$95$1], $MachinePrecision]), $MachinePrecision] * t$95$0), $MachinePrecision]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := e^{\log \left(\sqrt{x.im \cdot x.im + x.re \cdot x.re}\right) \cdot y.re - y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}}\\
t_1 := \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\\
t_2 := \log \left(\mathsf{hypot}\left(x.re, x.im\right)\right)\\
t_3 := \cos \left(t\_2 \cdot y.im\right) \cdot t\_0\\
\mathbf{if}\;y.re \leq -2.9:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;y.re \leq 150:\\
\;\;\;\;\frac{\cos \left(\mathsf{fma}\left(y.im, \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right), t\_1\right)\right)}{\frac{{\left(e^{y.im}\right)}^{\tan^{-1}_* \frac{x.im}{x.re}}}{{\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re}}}\\
\mathbf{elif}\;y.re \leq 2 \cdot 10^{+198}:\\
\;\;\;\;t\_3\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(-y.im, \sin t\_1 \cdot t\_2, \cos t\_1\right) \cdot t\_0\\
\end{array}
\end{array}
if y.re < -2.89999999999999991 or 150 < y.re < 2.00000000000000004e198Initial program 35.8%
Taylor expanded in y.im around inf
*-commutativeN/A
lower-*.f64N/A
lower-log.f64N/A
+-commutativeN/A
unpow2N/A
unpow2N/A
lower-hypot.f6483.6
Applied rewrites83.6%
if -2.89999999999999991 < y.re < 150Initial program 43.8%
lift-*.f64N/A
*-commutativeN/A
lift-exp.f64N/A
lift--.f64N/A
exp-diffN/A
clear-numN/A
un-div-invN/A
lower-/.f64N/A
Applied rewrites82.4%
if 2.00000000000000004e198 < y.re Initial program 45.8%
Taylor expanded in y.im around 0
+-commutativeN/A
associate-*r*N/A
lower-fma.f64N/A
Applied rewrites91.7%
Final simplification83.8%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (log (hypot x.im x.re)))
(t_1 (* (atan2 x.im x.re) y.re))
(t_2
(*
(cos (* (log (hypot x.re x.im)) y.im))
(exp
(-
(* (log (sqrt (+ (* x.im x.im) (* x.re x.re)))) y.re)
(* y.im (atan2 x.im x.re)))))))
(if (<= y.re -2.9)
t_2
(if (<= y.re 150.0)
(/
(cos (fma y.im t_0 t_1))
(/ (pow (exp y.im) (atan2 x.im x.re)) (pow (hypot x.im x.re) y.re)))
(if (<= y.re 1.6e+198)
t_2
(if (<= y.re 2.7e+299)
(* (pow (hypot x.re x.im) y.re) (cos t_1))
(* (exp (* (- y.im) (atan2 x.im x.re))) (cos (* t_0 y.im)))))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = log(hypot(x_46_im, x_46_re));
double t_1 = atan2(x_46_im, x_46_re) * y_46_re;
double t_2 = cos((log(hypot(x_46_re, x_46_im)) * y_46_im)) * exp(((log(sqrt(((x_46_im * x_46_im) + (x_46_re * x_46_re)))) * y_46_re) - (y_46_im * atan2(x_46_im, x_46_re))));
double tmp;
if (y_46_re <= -2.9) {
tmp = t_2;
} else if (y_46_re <= 150.0) {
tmp = cos(fma(y_46_im, t_0, t_1)) / (pow(exp(y_46_im), atan2(x_46_im, x_46_re)) / pow(hypot(x_46_im, x_46_re), y_46_re));
} else if (y_46_re <= 1.6e+198) {
tmp = t_2;
} else if (y_46_re <= 2.7e+299) {
tmp = pow(hypot(x_46_re, x_46_im), y_46_re) * cos(t_1);
} else {
tmp = exp((-y_46_im * atan2(x_46_im, x_46_re))) * cos((t_0 * y_46_im));
}
return tmp;
}
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = log(hypot(x_46_im, x_46_re)) t_1 = Float64(atan(x_46_im, x_46_re) * y_46_re) t_2 = Float64(cos(Float64(log(hypot(x_46_re, x_46_im)) * y_46_im)) * exp(Float64(Float64(log(sqrt(Float64(Float64(x_46_im * x_46_im) + Float64(x_46_re * x_46_re)))) * y_46_re) - Float64(y_46_im * atan(x_46_im, x_46_re))))) tmp = 0.0 if (y_46_re <= -2.9) tmp = t_2; elseif (y_46_re <= 150.0) tmp = Float64(cos(fma(y_46_im, t_0, t_1)) / Float64((exp(y_46_im) ^ atan(x_46_im, x_46_re)) / (hypot(x_46_im, x_46_re) ^ y_46_re))); elseif (y_46_re <= 1.6e+198) tmp = t_2; elseif (y_46_re <= 2.7e+299) tmp = Float64((hypot(x_46_re, x_46_im) ^ y_46_re) * cos(t_1)); else tmp = Float64(exp(Float64(Float64(-y_46_im) * atan(x_46_im, x_46_re))) * cos(Float64(t_0 * y_46_im))); end return tmp end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]}, Block[{t$95$1 = N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$re), $MachinePrecision]}, Block[{t$95$2 = N[(N[Cos[N[(N[Log[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision]], $MachinePrecision] * y$46$im), $MachinePrecision]], $MachinePrecision] * N[Exp[N[(N[(N[Log[N[Sqrt[N[(N[(x$46$im * x$46$im), $MachinePrecision] + N[(x$46$re * x$46$re), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision] * y$46$re), $MachinePrecision] - N[(y$46$im * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y$46$re, -2.9], t$95$2, If[LessEqual[y$46$re, 150.0], N[(N[Cos[N[(y$46$im * t$95$0 + t$95$1), $MachinePrecision]], $MachinePrecision] / N[(N[Power[N[Exp[y$46$im], $MachinePrecision], N[ArcTan[x$46$im / x$46$re], $MachinePrecision]], $MachinePrecision] / N[Power[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision], y$46$re], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$re, 1.6e+198], t$95$2, If[LessEqual[y$46$re, 2.7e+299], N[(N[Power[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision], y$46$re], $MachinePrecision] * N[Cos[t$95$1], $MachinePrecision]), $MachinePrecision], N[(N[Exp[N[((-y$46$im) * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Cos[N[(t$95$0 * y$46$im), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\\
t_1 := \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\\
t_2 := \cos \left(\log \left(\mathsf{hypot}\left(x.re, x.im\right)\right) \cdot y.im\right) \cdot e^{\log \left(\sqrt{x.im \cdot x.im + x.re \cdot x.re}\right) \cdot y.re - y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}}\\
\mathbf{if}\;y.re \leq -2.9:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;y.re \leq 150:\\
\;\;\;\;\frac{\cos \left(\mathsf{fma}\left(y.im, t\_0, t\_1\right)\right)}{\frac{{\left(e^{y.im}\right)}^{\tan^{-1}_* \frac{x.im}{x.re}}}{{\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re}}}\\
\mathbf{elif}\;y.re \leq 1.6 \cdot 10^{+198}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;y.re \leq 2.7 \cdot 10^{+299}:\\
\;\;\;\;{\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re} \cdot \cos t\_1\\
\mathbf{else}:\\
\;\;\;\;e^{\left(-y.im\right) \cdot \tan^{-1}_* \frac{x.im}{x.re}} \cdot \cos \left(t\_0 \cdot y.im\right)\\
\end{array}
\end{array}
if y.re < -2.89999999999999991 or 150 < y.re < 1.5999999999999999e198Initial program 35.8%
Taylor expanded in y.im around inf
*-commutativeN/A
lower-*.f64N/A
lower-log.f64N/A
+-commutativeN/A
unpow2N/A
unpow2N/A
lower-hypot.f6483.6
Applied rewrites83.6%
if -2.89999999999999991 < y.re < 150Initial program 43.8%
lift-*.f64N/A
*-commutativeN/A
lift-exp.f64N/A
lift--.f64N/A
exp-diffN/A
clear-numN/A
un-div-invN/A
lower-/.f64N/A
Applied rewrites82.4%
if 1.5999999999999999e198 < y.re < 2.7e299Initial program 45.0%
Taylor expanded in y.im around 0
*-commutativeN/A
lower-*.f64N/A
lower-pow.f64N/A
+-commutativeN/A
unpow2N/A
unpow2N/A
lower-hypot.f64N/A
lower-cos.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-atan2.f6490.0
Applied rewrites90.0%
if 2.7e299 < y.re Initial program 50.0%
lift-*.f64N/A
*-commutativeN/A
lift-exp.f64N/A
lift--.f64N/A
exp-diffN/A
clear-numN/A
un-div-invN/A
lower-/.f64N/A
Applied rewrites50.0%
Applied rewrites75.0%
Taylor expanded in y.re around 0
lower-*.f64N/A
lower-cos.f64N/A
lower-*.f64N/A
lower-log.f64N/A
unpow2N/A
unpow2N/A
lower-hypot.f64N/A
neg-mul-1N/A
lower-exp.f64N/A
distribute-lft-neg-inN/A
lower-*.f64N/A
lower-neg.f64N/A
lower-atan2.f64100.0
Applied rewrites100.0%
Final simplification83.8%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0
(*
(cos (* (log (hypot x.re x.im)) y.im))
(exp
(-
(* (log (sqrt (+ (* x.im x.im) (* x.re x.re)))) y.re)
(* y.im (atan2 x.im x.re))))))
(t_1
(*
(exp (* (- y.im) (atan2 x.im x.re)))
(cos (* (log (hypot x.im x.re)) y.im)))))
(if (<= y.re -8.2e-10)
t_0
(if (<= y.re 6.4e-15)
t_1
(if (<= y.re 1.6e+198)
t_0
(if (<= y.re 2.7e+299)
(* (pow (hypot x.re x.im) y.re) (cos (* (atan2 x.im x.re) y.re)))
t_1))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = cos((log(hypot(x_46_re, x_46_im)) * y_46_im)) * exp(((log(sqrt(((x_46_im * x_46_im) + (x_46_re * x_46_re)))) * y_46_re) - (y_46_im * atan2(x_46_im, x_46_re))));
double t_1 = exp((-y_46_im * atan2(x_46_im, x_46_re))) * cos((log(hypot(x_46_im, x_46_re)) * y_46_im));
double tmp;
if (y_46_re <= -8.2e-10) {
tmp = t_0;
} else if (y_46_re <= 6.4e-15) {
tmp = t_1;
} else if (y_46_re <= 1.6e+198) {
tmp = t_0;
} else if (y_46_re <= 2.7e+299) {
tmp = pow(hypot(x_46_re, x_46_im), y_46_re) * cos((atan2(x_46_im, x_46_re) * y_46_re));
} else {
tmp = t_1;
}
return tmp;
}
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = Math.cos((Math.log(Math.hypot(x_46_re, x_46_im)) * y_46_im)) * Math.exp(((Math.log(Math.sqrt(((x_46_im * x_46_im) + (x_46_re * x_46_re)))) * y_46_re) - (y_46_im * Math.atan2(x_46_im, x_46_re))));
double t_1 = Math.exp((-y_46_im * Math.atan2(x_46_im, x_46_re))) * Math.cos((Math.log(Math.hypot(x_46_im, x_46_re)) * y_46_im));
double tmp;
if (y_46_re <= -8.2e-10) {
tmp = t_0;
} else if (y_46_re <= 6.4e-15) {
tmp = t_1;
} else if (y_46_re <= 1.6e+198) {
tmp = t_0;
} else if (y_46_re <= 2.7e+299) {
tmp = Math.pow(Math.hypot(x_46_re, x_46_im), y_46_re) * Math.cos((Math.atan2(x_46_im, x_46_re) * y_46_re));
} else {
tmp = t_1;
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): t_0 = math.cos((math.log(math.hypot(x_46_re, x_46_im)) * y_46_im)) * math.exp(((math.log(math.sqrt(((x_46_im * x_46_im) + (x_46_re * x_46_re)))) * y_46_re) - (y_46_im * math.atan2(x_46_im, x_46_re)))) t_1 = math.exp((-y_46_im * math.atan2(x_46_im, x_46_re))) * math.cos((math.log(math.hypot(x_46_im, x_46_re)) * y_46_im)) tmp = 0 if y_46_re <= -8.2e-10: tmp = t_0 elif y_46_re <= 6.4e-15: tmp = t_1 elif y_46_re <= 1.6e+198: tmp = t_0 elif y_46_re <= 2.7e+299: tmp = math.pow(math.hypot(x_46_re, x_46_im), y_46_re) * math.cos((math.atan2(x_46_im, x_46_re) * y_46_re)) else: tmp = t_1 return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = Float64(cos(Float64(log(hypot(x_46_re, x_46_im)) * y_46_im)) * exp(Float64(Float64(log(sqrt(Float64(Float64(x_46_im * x_46_im) + Float64(x_46_re * x_46_re)))) * y_46_re) - Float64(y_46_im * atan(x_46_im, x_46_re))))) t_1 = Float64(exp(Float64(Float64(-y_46_im) * atan(x_46_im, x_46_re))) * cos(Float64(log(hypot(x_46_im, x_46_re)) * y_46_im))) tmp = 0.0 if (y_46_re <= -8.2e-10) tmp = t_0; elseif (y_46_re <= 6.4e-15) tmp = t_1; elseif (y_46_re <= 1.6e+198) tmp = t_0; elseif (y_46_re <= 2.7e+299) tmp = Float64((hypot(x_46_re, x_46_im) ^ y_46_re) * cos(Float64(atan(x_46_im, x_46_re) * y_46_re))); else tmp = t_1; end return tmp end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = cos((log(hypot(x_46_re, x_46_im)) * y_46_im)) * exp(((log(sqrt(((x_46_im * x_46_im) + (x_46_re * x_46_re)))) * y_46_re) - (y_46_im * atan2(x_46_im, x_46_re)))); t_1 = exp((-y_46_im * atan2(x_46_im, x_46_re))) * cos((log(hypot(x_46_im, x_46_re)) * y_46_im)); tmp = 0.0; if (y_46_re <= -8.2e-10) tmp = t_0; elseif (y_46_re <= 6.4e-15) tmp = t_1; elseif (y_46_re <= 1.6e+198) tmp = t_0; elseif (y_46_re <= 2.7e+299) tmp = (hypot(x_46_re, x_46_im) ^ y_46_re) * cos((atan2(x_46_im, x_46_re) * y_46_re)); else tmp = t_1; end tmp_2 = tmp; end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[(N[Cos[N[(N[Log[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision]], $MachinePrecision] * y$46$im), $MachinePrecision]], $MachinePrecision] * N[Exp[N[(N[(N[Log[N[Sqrt[N[(N[(x$46$im * x$46$im), $MachinePrecision] + N[(x$46$re * x$46$re), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision] * y$46$re), $MachinePrecision] - N[(y$46$im * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(N[Exp[N[((-y$46$im) * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Cos[N[(N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision] * y$46$im), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y$46$re, -8.2e-10], t$95$0, If[LessEqual[y$46$re, 6.4e-15], t$95$1, If[LessEqual[y$46$re, 1.6e+198], t$95$0, If[LessEqual[y$46$re, 2.7e+299], N[(N[Power[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision], y$46$re], $MachinePrecision] * N[Cos[N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$re), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], t$95$1]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \cos \left(\log \left(\mathsf{hypot}\left(x.re, x.im\right)\right) \cdot y.im\right) \cdot e^{\log \left(\sqrt{x.im \cdot x.im + x.re \cdot x.re}\right) \cdot y.re - y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}}\\
t_1 := e^{\left(-y.im\right) \cdot \tan^{-1}_* \frac{x.im}{x.re}} \cdot \cos \left(\log \left(\mathsf{hypot}\left(x.im, x.re\right)\right) \cdot y.im\right)\\
\mathbf{if}\;y.re \leq -8.2 \cdot 10^{-10}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;y.re \leq 6.4 \cdot 10^{-15}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y.re \leq 1.6 \cdot 10^{+198}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;y.re \leq 2.7 \cdot 10^{+299}:\\
\;\;\;\;{\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re} \cdot \cos \left(\tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if y.re < -8.1999999999999996e-10 or 6.3999999999999999e-15 < y.re < 1.5999999999999999e198Initial program 37.4%
Taylor expanded in y.im around inf
*-commutativeN/A
lower-*.f64N/A
lower-log.f64N/A
+-commutativeN/A
unpow2N/A
unpow2N/A
lower-hypot.f6482.5
Applied rewrites82.5%
if -8.1999999999999996e-10 < y.re < 6.3999999999999999e-15 or 2.7e299 < y.re Initial program 42.9%
lift-*.f64N/A
*-commutativeN/A
lift-exp.f64N/A
lift--.f64N/A
exp-diffN/A
clear-numN/A
un-div-invN/A
lower-/.f64N/A
Applied rewrites81.3%
Applied rewrites81.5%
Taylor expanded in y.re around 0
lower-*.f64N/A
lower-cos.f64N/A
lower-*.f64N/A
lower-log.f64N/A
unpow2N/A
unpow2N/A
lower-hypot.f64N/A
neg-mul-1N/A
lower-exp.f64N/A
distribute-lft-neg-inN/A
lower-*.f64N/A
lower-neg.f64N/A
lower-atan2.f6483.8
Applied rewrites83.8%
if 1.5999999999999999e198 < y.re < 2.7e299Initial program 45.0%
Taylor expanded in y.im around 0
*-commutativeN/A
lower-*.f64N/A
lower-pow.f64N/A
+-commutativeN/A
unpow2N/A
unpow2N/A
lower-hypot.f64N/A
lower-cos.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-atan2.f6490.0
Applied rewrites90.0%
Final simplification83.7%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(if (<= y.re -6.8e-13)
(*
(cos (* (atan2 x.im x.re) y.re))
(exp
(-
(* (log (sqrt (+ (* x.im x.im) (* x.re x.re)))) y.re)
(* y.im (atan2 x.im x.re)))))
(if (<= y.re 4400.0)
(*
(exp (* (- y.im) (atan2 x.im x.re)))
(cos (* (log (hypot x.im x.re)) y.im)))
(* 1.0 (pow (hypot x.re x.im) y.re)))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double tmp;
if (y_46_re <= -6.8e-13) {
tmp = cos((atan2(x_46_im, x_46_re) * y_46_re)) * exp(((log(sqrt(((x_46_im * x_46_im) + (x_46_re * x_46_re)))) * y_46_re) - (y_46_im * atan2(x_46_im, x_46_re))));
} else if (y_46_re <= 4400.0) {
tmp = exp((-y_46_im * atan2(x_46_im, x_46_re))) * cos((log(hypot(x_46_im, x_46_re)) * y_46_im));
} else {
tmp = 1.0 * pow(hypot(x_46_re, 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 tmp;
if (y_46_re <= -6.8e-13) {
tmp = Math.cos((Math.atan2(x_46_im, x_46_re) * y_46_re)) * Math.exp(((Math.log(Math.sqrt(((x_46_im * x_46_im) + (x_46_re * x_46_re)))) * y_46_re) - (y_46_im * Math.atan2(x_46_im, x_46_re))));
} else if (y_46_re <= 4400.0) {
tmp = Math.exp((-y_46_im * Math.atan2(x_46_im, x_46_re))) * Math.cos((Math.log(Math.hypot(x_46_im, x_46_re)) * y_46_im));
} else {
tmp = 1.0 * Math.pow(Math.hypot(x_46_re, x_46_im), y_46_re);
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): tmp = 0 if y_46_re <= -6.8e-13: tmp = math.cos((math.atan2(x_46_im, x_46_re) * y_46_re)) * math.exp(((math.log(math.sqrt(((x_46_im * x_46_im) + (x_46_re * x_46_re)))) * y_46_re) - (y_46_im * math.atan2(x_46_im, x_46_re)))) elif y_46_re <= 4400.0: tmp = math.exp((-y_46_im * math.atan2(x_46_im, x_46_re))) * math.cos((math.log(math.hypot(x_46_im, x_46_re)) * y_46_im)) else: tmp = 1.0 * math.pow(math.hypot(x_46_re, x_46_im), y_46_re) return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) tmp = 0.0 if (y_46_re <= -6.8e-13) tmp = Float64(cos(Float64(atan(x_46_im, x_46_re) * y_46_re)) * exp(Float64(Float64(log(sqrt(Float64(Float64(x_46_im * x_46_im) + Float64(x_46_re * x_46_re)))) * y_46_re) - Float64(y_46_im * atan(x_46_im, x_46_re))))); elseif (y_46_re <= 4400.0) tmp = Float64(exp(Float64(Float64(-y_46_im) * atan(x_46_im, x_46_re))) * cos(Float64(log(hypot(x_46_im, x_46_re)) * y_46_im))); else tmp = Float64(1.0 * (hypot(x_46_re, 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) tmp = 0.0; if (y_46_re <= -6.8e-13) tmp = cos((atan2(x_46_im, x_46_re) * y_46_re)) * exp(((log(sqrt(((x_46_im * x_46_im) + (x_46_re * x_46_re)))) * y_46_re) - (y_46_im * atan2(x_46_im, x_46_re)))); elseif (y_46_re <= 4400.0) tmp = exp((-y_46_im * atan2(x_46_im, x_46_re))) * cos((log(hypot(x_46_im, x_46_re)) * y_46_im)); else tmp = 1.0 * (hypot(x_46_re, x_46_im) ^ y_46_re); end tmp_2 = tmp; end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := If[LessEqual[y$46$re, -6.8e-13], N[(N[Cos[N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$re), $MachinePrecision]], $MachinePrecision] * N[Exp[N[(N[(N[Log[N[Sqrt[N[(N[(x$46$im * x$46$im), $MachinePrecision] + N[(x$46$re * x$46$re), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision] * y$46$re), $MachinePrecision] - N[(y$46$im * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$re, 4400.0], N[(N[Exp[N[((-y$46$im) * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Cos[N[(N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision] * y$46$im), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(1.0 * N[Power[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision], y$46$re], $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y.re \leq -6.8 \cdot 10^{-13}:\\
\;\;\;\;\cos \left(\tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right) \cdot e^{\log \left(\sqrt{x.im \cdot x.im + x.re \cdot x.re}\right) \cdot y.re - y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}}\\
\mathbf{elif}\;y.re \leq 4400:\\
\;\;\;\;e^{\left(-y.im\right) \cdot \tan^{-1}_* \frac{x.im}{x.re}} \cdot \cos \left(\log \left(\mathsf{hypot}\left(x.im, x.re\right)\right) \cdot y.im\right)\\
\mathbf{else}:\\
\;\;\;\;1 \cdot {\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re}\\
\end{array}
\end{array}
if y.re < -6.80000000000000031e-13Initial program 37.0%
Taylor expanded in y.im around 0
*-commutativeN/A
lower-*.f64N/A
lower-atan2.f6481.1
Applied rewrites81.1%
if -6.80000000000000031e-13 < y.re < 4400Initial program 44.6%
lift-*.f64N/A
*-commutativeN/A
lift-exp.f64N/A
lift--.f64N/A
exp-diffN/A
clear-numN/A
un-div-invN/A
lower-/.f64N/A
Applied rewrites82.9%
Applied rewrites82.3%
Taylor expanded in y.re around 0
lower-*.f64N/A
lower-cos.f64N/A
lower-*.f64N/A
lower-log.f64N/A
unpow2N/A
unpow2N/A
lower-hypot.f64N/A
neg-mul-1N/A
lower-exp.f64N/A
distribute-lft-neg-inN/A
lower-*.f64N/A
lower-neg.f64N/A
lower-atan2.f6483.6
Applied rewrites83.6%
if 4400 < y.re Initial program 37.1%
Taylor expanded in y.im around 0
*-commutativeN/A
lower-*.f64N/A
lower-pow.f64N/A
+-commutativeN/A
unpow2N/A
unpow2N/A
lower-hypot.f64N/A
lower-cos.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-atan2.f6464.6
Applied rewrites64.6%
Taylor expanded in y.re around 0
Applied rewrites75.9%
Final simplification81.0%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(if (<= y.re -8e-13)
(*
(pow
(pow (pow (* (- x.re) (fma 0.5 (pow (/ x.re x.im) -2.0) 1.0)) 2.0) y.re)
0.5)
1.0)
(if (<= y.re 4400.0)
(*
(exp (* (- y.im) (atan2 x.im x.re)))
(cos (* (log (hypot x.im x.re)) y.im)))
(* 1.0 (pow (hypot x.re x.im) y.re)))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double tmp;
if (y_46_re <= -8e-13) {
tmp = pow(pow(pow((-x_46_re * fma(0.5, pow((x_46_re / x_46_im), -2.0), 1.0)), 2.0), y_46_re), 0.5) * 1.0;
} else if (y_46_re <= 4400.0) {
tmp = exp((-y_46_im * atan2(x_46_im, x_46_re))) * cos((log(hypot(x_46_im, x_46_re)) * y_46_im));
} else {
tmp = 1.0 * pow(hypot(x_46_re, x_46_im), y_46_re);
}
return tmp;
}
function code(x_46_re, x_46_im, y_46_re, y_46_im) tmp = 0.0 if (y_46_re <= -8e-13) tmp = Float64((((Float64(Float64(-x_46_re) * fma(0.5, (Float64(x_46_re / x_46_im) ^ -2.0), 1.0)) ^ 2.0) ^ y_46_re) ^ 0.5) * 1.0); elseif (y_46_re <= 4400.0) tmp = Float64(exp(Float64(Float64(-y_46_im) * atan(x_46_im, x_46_re))) * cos(Float64(log(hypot(x_46_im, x_46_re)) * y_46_im))); else tmp = Float64(1.0 * (hypot(x_46_re, x_46_im) ^ y_46_re)); end return tmp end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := If[LessEqual[y$46$re, -8e-13], N[(N[Power[N[Power[N[Power[N[((-x$46$re) * N[(0.5 * N[Power[N[(x$46$re / x$46$im), $MachinePrecision], -2.0], $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision], y$46$re], $MachinePrecision], 0.5], $MachinePrecision] * 1.0), $MachinePrecision], If[LessEqual[y$46$re, 4400.0], N[(N[Exp[N[((-y$46$im) * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Cos[N[(N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision] * y$46$im), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(1.0 * N[Power[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision], y$46$re], $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y.re \leq -8 \cdot 10^{-13}:\\
\;\;\;\;{\left({\left({\left(\left(-x.re\right) \cdot \mathsf{fma}\left(0.5, {\left(\frac{x.re}{x.im}\right)}^{-2}, 1\right)\right)}^{2}\right)}^{y.re}\right)}^{0.5} \cdot 1\\
\mathbf{elif}\;y.re \leq 4400:\\
\;\;\;\;e^{\left(-y.im\right) \cdot \tan^{-1}_* \frac{x.im}{x.re}} \cdot \cos \left(\log \left(\mathsf{hypot}\left(x.im, x.re\right)\right) \cdot y.im\right)\\
\mathbf{else}:\\
\;\;\;\;1 \cdot {\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re}\\
\end{array}
\end{array}
if y.re < -8.0000000000000002e-13Initial program 37.0%
Taylor expanded in y.im around 0
*-commutativeN/A
lower-*.f64N/A
lower-pow.f64N/A
+-commutativeN/A
unpow2N/A
unpow2N/A
lower-hypot.f64N/A
lower-cos.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-atan2.f6478.4
Applied rewrites78.4%
Taylor expanded in x.re around -inf
Applied rewrites75.5%
Taylor expanded in y.re around 0
Applied rewrites77.9%
Applied rewrites79.5%
if -8.0000000000000002e-13 < y.re < 4400Initial program 44.6%
lift-*.f64N/A
*-commutativeN/A
lift-exp.f64N/A
lift--.f64N/A
exp-diffN/A
clear-numN/A
un-div-invN/A
lower-/.f64N/A
Applied rewrites82.9%
Applied rewrites82.3%
Taylor expanded in y.re around 0
lower-*.f64N/A
lower-cos.f64N/A
lower-*.f64N/A
lower-log.f64N/A
unpow2N/A
unpow2N/A
lower-hypot.f64N/A
neg-mul-1N/A
lower-exp.f64N/A
distribute-lft-neg-inN/A
lower-*.f64N/A
lower-neg.f64N/A
lower-atan2.f6483.6
Applied rewrites83.6%
if 4400 < y.re Initial program 37.1%
Taylor expanded in y.im around 0
*-commutativeN/A
lower-*.f64N/A
lower-pow.f64N/A
+-commutativeN/A
unpow2N/A
unpow2N/A
lower-hypot.f64N/A
lower-cos.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-atan2.f6464.6
Applied rewrites64.6%
Taylor expanded in y.re around 0
Applied rewrites75.9%
Final simplification80.6%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (cos (* (atan2 x.im x.re) y.re)))
(t_1
(* (cos (* (log x.im) y.im)) (exp (- (* y.im (atan2 x.im x.re)))))))
(if (<= y.im -1.35e+289)
t_1
(if (<= y.im -1.55e+263)
(* (pow x.re y.re) 1.0)
(if (<= y.im -2.95e+184)
(*
(pow (* (fma -0.5 (/ (* x.im x.im) (* x.re x.re)) -1.0) x.re) y.re)
t_0)
(if (<= y.im 8.5e+79)
(* 1.0 (pow (hypot x.re x.im) y.re))
(if (<= y.im 1.85e+195)
(* (pow (fma 0.5 (/ (* x.im x.im) x.re) x.re) y.re) t_0)
t_1)))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = cos((atan2(x_46_im, x_46_re) * y_46_re));
double t_1 = cos((log(x_46_im) * y_46_im)) * exp(-(y_46_im * atan2(x_46_im, x_46_re)));
double tmp;
if (y_46_im <= -1.35e+289) {
tmp = t_1;
} else if (y_46_im <= -1.55e+263) {
tmp = pow(x_46_re, y_46_re) * 1.0;
} else if (y_46_im <= -2.95e+184) {
tmp = pow((fma(-0.5, ((x_46_im * x_46_im) / (x_46_re * x_46_re)), -1.0) * x_46_re), y_46_re) * t_0;
} else if (y_46_im <= 8.5e+79) {
tmp = 1.0 * pow(hypot(x_46_re, x_46_im), y_46_re);
} else if (y_46_im <= 1.85e+195) {
tmp = pow(fma(0.5, ((x_46_im * x_46_im) / x_46_re), x_46_re), y_46_re) * t_0;
} else {
tmp = t_1;
}
return tmp;
}
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = cos(Float64(atan(x_46_im, x_46_re) * y_46_re)) t_1 = Float64(cos(Float64(log(x_46_im) * y_46_im)) * exp(Float64(-Float64(y_46_im * atan(x_46_im, x_46_re))))) tmp = 0.0 if (y_46_im <= -1.35e+289) tmp = t_1; elseif (y_46_im <= -1.55e+263) tmp = Float64((x_46_re ^ y_46_re) * 1.0); elseif (y_46_im <= -2.95e+184) tmp = Float64((Float64(fma(-0.5, Float64(Float64(x_46_im * x_46_im) / Float64(x_46_re * x_46_re)), -1.0) * x_46_re) ^ y_46_re) * t_0); elseif (y_46_im <= 8.5e+79) tmp = Float64(1.0 * (hypot(x_46_re, x_46_im) ^ y_46_re)); elseif (y_46_im <= 1.85e+195) tmp = Float64((fma(0.5, Float64(Float64(x_46_im * x_46_im) / x_46_re), x_46_re) ^ y_46_re) * t_0); else tmp = t_1; end return tmp end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[Cos[N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$re), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$1 = N[(N[Cos[N[(N[Log[x$46$im], $MachinePrecision] * 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$im, -1.35e+289], t$95$1, If[LessEqual[y$46$im, -1.55e+263], N[(N[Power[x$46$re, y$46$re], $MachinePrecision] * 1.0), $MachinePrecision], If[LessEqual[y$46$im, -2.95e+184], N[(N[Power[N[(N[(-0.5 * N[(N[(x$46$im * x$46$im), $MachinePrecision] / N[(x$46$re * x$46$re), $MachinePrecision]), $MachinePrecision] + -1.0), $MachinePrecision] * x$46$re), $MachinePrecision], y$46$re], $MachinePrecision] * t$95$0), $MachinePrecision], If[LessEqual[y$46$im, 8.5e+79], N[(1.0 * N[Power[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision], y$46$re], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$im, 1.85e+195], N[(N[Power[N[(0.5 * N[(N[(x$46$im * x$46$im), $MachinePrecision] / x$46$re), $MachinePrecision] + x$46$re), $MachinePrecision], y$46$re], $MachinePrecision] * t$95$0), $MachinePrecision], t$95$1]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \cos \left(\tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)\\
t_1 := \cos \left(\log x.im \cdot y.im\right) \cdot e^{-y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}}\\
\mathbf{if}\;y.im \leq -1.35 \cdot 10^{+289}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y.im \leq -1.55 \cdot 10^{+263}:\\
\;\;\;\;{x.re}^{y.re} \cdot 1\\
\mathbf{elif}\;y.im \leq -2.95 \cdot 10^{+184}:\\
\;\;\;\;{\left(\mathsf{fma}\left(-0.5, \frac{x.im \cdot x.im}{x.re \cdot x.re}, -1\right) \cdot x.re\right)}^{y.re} \cdot t\_0\\
\mathbf{elif}\;y.im \leq 8.5 \cdot 10^{+79}:\\
\;\;\;\;1 \cdot {\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re}\\
\mathbf{elif}\;y.im \leq 1.85 \cdot 10^{+195}:\\
\;\;\;\;{\left(\mathsf{fma}\left(0.5, \frac{x.im \cdot x.im}{x.re}, x.re\right)\right)}^{y.re} \cdot t\_0\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if y.im < -1.35e289 or 1.85e195 < y.im Initial program 32.1%
Taylor expanded in x.im around inf
*-commutativeN/A
lower-*.f64N/A
Applied rewrites53.6%
Taylor expanded in y.im around inf
Applied rewrites53.6%
Taylor expanded in y.im around inf
Applied rewrites53.7%
if -1.35e289 < y.im < -1.5500000000000001e263Initial program 42.9%
Taylor expanded in y.im around 0
*-commutativeN/A
lower-*.f64N/A
lower-pow.f64N/A
+-commutativeN/A
unpow2N/A
unpow2N/A
lower-hypot.f64N/A
lower-cos.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-atan2.f6457.8
Applied rewrites57.8%
Taylor expanded in x.re around -inf
Applied rewrites43.5%
Taylor expanded in y.re around 0
Applied rewrites57.8%
Taylor expanded in x.im around 0
Applied rewrites71.9%
if -1.5500000000000001e263 < y.im < -2.9500000000000001e184Initial program 37.5%
Taylor expanded in y.im around 0
*-commutativeN/A
lower-*.f64N/A
lower-pow.f64N/A
+-commutativeN/A
unpow2N/A
unpow2N/A
lower-hypot.f64N/A
lower-cos.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-atan2.f6438.9
Applied rewrites38.9%
Taylor expanded in x.re around -inf
Applied rewrites63.3%
Taylor expanded in x.re around inf
Applied rewrites87.7%
if -2.9500000000000001e184 < y.im < 8.4999999999999998e79Initial program 43.2%
Taylor expanded in y.im around 0
*-commutativeN/A
lower-*.f64N/A
lower-pow.f64N/A
+-commutativeN/A
unpow2N/A
unpow2N/A
lower-hypot.f64N/A
lower-cos.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-atan2.f6475.5
Applied rewrites75.5%
Taylor expanded in y.re around 0
Applied rewrites81.5%
if 8.4999999999999998e79 < y.im < 1.85e195Initial program 30.0%
Taylor expanded in y.im around 0
*-commutativeN/A
lower-*.f64N/A
lower-pow.f64N/A
+-commutativeN/A
unpow2N/A
unpow2N/A
lower-hypot.f64N/A
lower-cos.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-atan2.f6448.2
Applied rewrites48.2%
Taylor expanded in x.im around 0
Applied rewrites60.0%
Final simplification76.3%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(if (<= y.im 8.5e+79)
(* 1.0 (pow (hypot x.re x.im) y.re))
(*
(pow (fma 0.5 (/ (* x.im x.im) x.re) x.re) y.re)
(cos (* (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 tmp;
if (y_46_im <= 8.5e+79) {
tmp = 1.0 * pow(hypot(x_46_re, x_46_im), y_46_re);
} else {
tmp = pow(fma(0.5, ((x_46_im * x_46_im) / x_46_re), x_46_re), y_46_re) * cos((atan2(x_46_im, x_46_re) * y_46_re));
}
return tmp;
}
function code(x_46_re, x_46_im, y_46_re, y_46_im) tmp = 0.0 if (y_46_im <= 8.5e+79) tmp = Float64(1.0 * (hypot(x_46_re, x_46_im) ^ y_46_re)); else tmp = Float64((fma(0.5, Float64(Float64(x_46_im * x_46_im) / x_46_re), x_46_re) ^ y_46_re) * cos(Float64(atan(x_46_im, x_46_re) * y_46_re))); end return tmp end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := If[LessEqual[y$46$im, 8.5e+79], N[(1.0 * N[Power[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision], y$46$re], $MachinePrecision]), $MachinePrecision], N[(N[Power[N[(0.5 * N[(N[(x$46$im * x$46$im), $MachinePrecision] / x$46$re), $MachinePrecision] + x$46$re), $MachinePrecision], y$46$re], $MachinePrecision] * N[Cos[N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$re), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y.im \leq 8.5 \cdot 10^{+79}:\\
\;\;\;\;1 \cdot {\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re}\\
\mathbf{else}:\\
\;\;\;\;{\left(\mathsf{fma}\left(0.5, \frac{x.im \cdot x.im}{x.re}, x.re\right)\right)}^{y.re} \cdot \cos \left(\tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)\\
\end{array}
\end{array}
if y.im < 8.4999999999999998e79Initial program 42.3%
Taylor expanded in y.im around 0
*-commutativeN/A
lower-*.f64N/A
lower-pow.f64N/A
+-commutativeN/A
unpow2N/A
unpow2N/A
lower-hypot.f64N/A
lower-cos.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-atan2.f6470.7
Applied rewrites70.7%
Taylor expanded in y.re around 0
Applied rewrites75.6%
if 8.4999999999999998e79 < y.im Initial program 32.3%
Taylor expanded in y.im around 0
*-commutativeN/A
lower-*.f64N/A
lower-pow.f64N/A
+-commutativeN/A
unpow2N/A
unpow2N/A
lower-hypot.f64N/A
lower-cos.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-atan2.f6436.1
Applied rewrites36.1%
Taylor expanded in x.im around 0
Applied rewrites44.4%
Final simplification70.2%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(if (<= y.re -1.15e-6)
(*
(pow (* (fma (/ 0.5 x.re) (/ (* x.im x.im) x.re) 1.0) (- x.re)) y.re)
1.0)
(if (<= y.re 7500000.0)
(fma y.re (log (hypot x.re x.im)) 1.0)
(* (pow (+ (* (/ (* x.re x.re) x.im) 0.5) x.im) y.re) 1.0))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double tmp;
if (y_46_re <= -1.15e-6) {
tmp = pow((fma((0.5 / x_46_re), ((x_46_im * x_46_im) / x_46_re), 1.0) * -x_46_re), y_46_re) * 1.0;
} else if (y_46_re <= 7500000.0) {
tmp = fma(y_46_re, log(hypot(x_46_re, x_46_im)), 1.0);
} else {
tmp = pow(((((x_46_re * x_46_re) / x_46_im) * 0.5) + x_46_im), y_46_re) * 1.0;
}
return tmp;
}
function code(x_46_re, x_46_im, y_46_re, y_46_im) tmp = 0.0 if (y_46_re <= -1.15e-6) tmp = Float64((Float64(fma(Float64(0.5 / x_46_re), Float64(Float64(x_46_im * x_46_im) / x_46_re), 1.0) * Float64(-x_46_re)) ^ y_46_re) * 1.0); elseif (y_46_re <= 7500000.0) tmp = fma(y_46_re, log(hypot(x_46_re, x_46_im)), 1.0); else tmp = Float64((Float64(Float64(Float64(Float64(x_46_re * x_46_re) / x_46_im) * 0.5) + x_46_im) ^ y_46_re) * 1.0); end return tmp end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := If[LessEqual[y$46$re, -1.15e-6], N[(N[Power[N[(N[(N[(0.5 / x$46$re), $MachinePrecision] * N[(N[(x$46$im * x$46$im), $MachinePrecision] / x$46$re), $MachinePrecision] + 1.0), $MachinePrecision] * (-x$46$re)), $MachinePrecision], y$46$re], $MachinePrecision] * 1.0), $MachinePrecision], If[LessEqual[y$46$re, 7500000.0], N[(y$46$re * N[Log[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision]], $MachinePrecision] + 1.0), $MachinePrecision], N[(N[Power[N[(N[(N[(N[(x$46$re * x$46$re), $MachinePrecision] / x$46$im), $MachinePrecision] * 0.5), $MachinePrecision] + x$46$im), $MachinePrecision], y$46$re], $MachinePrecision] * 1.0), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y.re \leq -1.15 \cdot 10^{-6}:\\
\;\;\;\;{\left(\mathsf{fma}\left(\frac{0.5}{x.re}, \frac{x.im \cdot x.im}{x.re}, 1\right) \cdot \left(-x.re\right)\right)}^{y.re} \cdot 1\\
\mathbf{elif}\;y.re \leq 7500000:\\
\;\;\;\;\mathsf{fma}\left(y.re, \log \left(\mathsf{hypot}\left(x.re, x.im\right)\right), 1\right)\\
\mathbf{else}:\\
\;\;\;\;{\left(\frac{x.re \cdot x.re}{x.im} \cdot 0.5 + x.im\right)}^{y.re} \cdot 1\\
\end{array}
\end{array}
if y.re < -1.15e-6Initial program 37.5%
Taylor expanded in y.im around 0
*-commutativeN/A
lower-*.f64N/A
lower-pow.f64N/A
+-commutativeN/A
unpow2N/A
unpow2N/A
lower-hypot.f64N/A
lower-cos.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-atan2.f6479.3
Applied rewrites79.3%
Taylor expanded in x.re around -inf
Applied rewrites76.6%
Taylor expanded in y.re around 0
Applied rewrites79.0%
if -1.15e-6 < y.re < 7.5e6Initial program 44.7%
Taylor expanded in y.im around 0
*-commutativeN/A
lower-*.f64N/A
lower-pow.f64N/A
+-commutativeN/A
unpow2N/A
unpow2N/A
lower-hypot.f64N/A
lower-cos.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-atan2.f6456.6
Applied rewrites56.6%
Taylor expanded in y.re around 0
Applied rewrites55.2%
if 7.5e6 < y.re Initial program 36.1%
Taylor expanded in y.im around 0
*-commutativeN/A
lower-*.f64N/A
lower-pow.f64N/A
+-commutativeN/A
unpow2N/A
unpow2N/A
lower-hypot.f64N/A
lower-cos.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-atan2.f6464.0
Applied rewrites64.0%
Taylor expanded in x.re around -inf
Applied rewrites55.9%
Taylor expanded in y.re around 0
Applied rewrites67.4%
Taylor expanded in x.re around 0
Applied rewrites72.2%
Final simplification66.0%
(FPCore (x.re x.im y.re y.im) :precision binary64 (* 1.0 (pow (hypot x.re x.im) y.re)))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
return 1.0 * pow(hypot(x_46_re, x_46_im), y_46_re);
}
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
return 1.0 * Math.pow(Math.hypot(x_46_re, x_46_im), y_46_re);
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): return 1.0 * math.pow(math.hypot(x_46_re, x_46_im), y_46_re)
function code(x_46_re, x_46_im, y_46_re, y_46_im) return Float64(1.0 * (hypot(x_46_re, x_46_im) ^ y_46_re)) end
function tmp = code(x_46_re, x_46_im, y_46_re, y_46_im) tmp = 1.0 * (hypot(x_46_re, x_46_im) ^ y_46_re); end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := N[(1.0 * N[Power[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision], y$46$re], $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
1 \cdot {\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re}
\end{array}
Initial program 40.6%
Taylor expanded in y.im around 0
*-commutativeN/A
lower-*.f64N/A
lower-pow.f64N/A
+-commutativeN/A
unpow2N/A
unpow2N/A
lower-hypot.f64N/A
lower-cos.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-atan2.f6464.7
Applied rewrites64.7%
Taylor expanded in y.re around 0
Applied rewrites67.6%
Final simplification67.6%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(if (<= y.re -2.4e-7)
(*
(pow (* (fma (/ 0.5 x.re) (/ (* x.im x.im) x.re) 1.0) (- x.re)) y.re)
1.0)
(if (<= y.re 7500000.0)
1.0
(* (pow (+ (* (/ (* x.re x.re) x.im) 0.5) x.im) y.re) 1.0))))
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-7) {
tmp = pow((fma((0.5 / x_46_re), ((x_46_im * x_46_im) / x_46_re), 1.0) * -x_46_re), y_46_re) * 1.0;
} else if (y_46_re <= 7500000.0) {
tmp = 1.0;
} else {
tmp = pow(((((x_46_re * x_46_re) / x_46_im) * 0.5) + x_46_im), y_46_re) * 1.0;
}
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-7) tmp = Float64((Float64(fma(Float64(0.5 / x_46_re), Float64(Float64(x_46_im * x_46_im) / x_46_re), 1.0) * Float64(-x_46_re)) ^ y_46_re) * 1.0); elseif (y_46_re <= 7500000.0) tmp = 1.0; else tmp = Float64((Float64(Float64(Float64(Float64(x_46_re * x_46_re) / x_46_im) * 0.5) + x_46_im) ^ y_46_re) * 1.0); end return tmp end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := If[LessEqual[y$46$re, -2.4e-7], N[(N[Power[N[(N[(N[(0.5 / x$46$re), $MachinePrecision] * N[(N[(x$46$im * x$46$im), $MachinePrecision] / x$46$re), $MachinePrecision] + 1.0), $MachinePrecision] * (-x$46$re)), $MachinePrecision], y$46$re], $MachinePrecision] * 1.0), $MachinePrecision], If[LessEqual[y$46$re, 7500000.0], 1.0, N[(N[Power[N[(N[(N[(N[(x$46$re * x$46$re), $MachinePrecision] / x$46$im), $MachinePrecision] * 0.5), $MachinePrecision] + x$46$im), $MachinePrecision], y$46$re], $MachinePrecision] * 1.0), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y.re \leq -2.4 \cdot 10^{-7}:\\
\;\;\;\;{\left(\mathsf{fma}\left(\frac{0.5}{x.re}, \frac{x.im \cdot x.im}{x.re}, 1\right) \cdot \left(-x.re\right)\right)}^{y.re} \cdot 1\\
\mathbf{elif}\;y.re \leq 7500000:\\
\;\;\;\;1\\
\mathbf{else}:\\
\;\;\;\;{\left(\frac{x.re \cdot x.re}{x.im} \cdot 0.5 + x.im\right)}^{y.re} \cdot 1\\
\end{array}
\end{array}
if y.re < -2.39999999999999979e-7Initial program 37.5%
Taylor expanded in y.im around 0
*-commutativeN/A
lower-*.f64N/A
lower-pow.f64N/A
+-commutativeN/A
unpow2N/A
unpow2N/A
lower-hypot.f64N/A
lower-cos.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-atan2.f6479.3
Applied rewrites79.3%
Taylor expanded in x.re around -inf
Applied rewrites76.6%
Taylor expanded in y.re around 0
Applied rewrites79.0%
if -2.39999999999999979e-7 < y.re < 7.5e6Initial program 44.7%
Taylor expanded in y.im around 0
*-commutativeN/A
lower-*.f64N/A
lower-pow.f64N/A
+-commutativeN/A
unpow2N/A
unpow2N/A
lower-hypot.f64N/A
lower-cos.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-atan2.f6456.6
Applied rewrites56.6%
Taylor expanded in y.re around 0
Applied rewrites54.7%
if 7.5e6 < y.re Initial program 36.1%
Taylor expanded in y.im around 0
*-commutativeN/A
lower-*.f64N/A
lower-pow.f64N/A
+-commutativeN/A
unpow2N/A
unpow2N/A
lower-hypot.f64N/A
lower-cos.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-atan2.f6464.0
Applied rewrites64.0%
Taylor expanded in x.re around -inf
Applied rewrites55.9%
Taylor expanded in y.re around 0
Applied rewrites67.4%
Taylor expanded in x.re around 0
Applied rewrites72.2%
Final simplification65.7%
(FPCore (x.re x.im y.re y.im) :precision binary64 (let* ((t_0 (* (pow (+ (* (/ (* x.re x.re) x.im) 0.5) x.im) y.re) 1.0))) (if (<= y.re -13800000000000.0) t_0 (if (<= y.re 7500000.0) 1.0 t_0))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = pow(((((x_46_re * x_46_re) / x_46_im) * 0.5) + x_46_im), y_46_re) * 1.0;
double tmp;
if (y_46_re <= -13800000000000.0) {
tmp = t_0;
} else if (y_46_re <= 7500000.0) {
tmp = 1.0;
} 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 = (((((x_46re * x_46re) / x_46im) * 0.5d0) + x_46im) ** y_46re) * 1.0d0
if (y_46re <= (-13800000000000.0d0)) then
tmp = t_0
else if (y_46re <= 7500000.0d0) then
tmp = 1.0d0
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 = Math.pow(((((x_46_re * x_46_re) / x_46_im) * 0.5) + x_46_im), y_46_re) * 1.0;
double tmp;
if (y_46_re <= -13800000000000.0) {
tmp = t_0;
} else if (y_46_re <= 7500000.0) {
tmp = 1.0;
} else {
tmp = t_0;
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): t_0 = math.pow(((((x_46_re * x_46_re) / x_46_im) * 0.5) + x_46_im), y_46_re) * 1.0 tmp = 0 if y_46_re <= -13800000000000.0: tmp = t_0 elif y_46_re <= 7500000.0: tmp = 1.0 else: tmp = t_0 return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = Float64((Float64(Float64(Float64(Float64(x_46_re * x_46_re) / x_46_im) * 0.5) + x_46_im) ^ y_46_re) * 1.0) tmp = 0.0 if (y_46_re <= -13800000000000.0) tmp = t_0; elseif (y_46_re <= 7500000.0) tmp = 1.0; 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 = (((((x_46_re * x_46_re) / x_46_im) * 0.5) + x_46_im) ^ y_46_re) * 1.0; tmp = 0.0; if (y_46_re <= -13800000000000.0) tmp = t_0; elseif (y_46_re <= 7500000.0) tmp = 1.0; 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[(N[Power[N[(N[(N[(N[(x$46$re * x$46$re), $MachinePrecision] / x$46$im), $MachinePrecision] * 0.5), $MachinePrecision] + x$46$im), $MachinePrecision], y$46$re], $MachinePrecision] * 1.0), $MachinePrecision]}, If[LessEqual[y$46$re, -13800000000000.0], t$95$0, If[LessEqual[y$46$re, 7500000.0], 1.0, t$95$0]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := {\left(\frac{x.re \cdot x.re}{x.im} \cdot 0.5 + x.im\right)}^{y.re} \cdot 1\\
\mathbf{if}\;y.re \leq -13800000000000:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;y.re \leq 7500000:\\
\;\;\;\;1\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
if y.re < -1.38e13 or 7.5e6 < y.re Initial program 36.9%
Taylor expanded in y.im around 0
*-commutativeN/A
lower-*.f64N/A
lower-pow.f64N/A
+-commutativeN/A
unpow2N/A
unpow2N/A
lower-hypot.f64N/A
lower-cos.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-atan2.f6472.4
Applied rewrites72.4%
Taylor expanded in x.re around -inf
Applied rewrites67.9%
Taylor expanded in y.re around 0
Applied rewrites74.8%
Taylor expanded in x.re around 0
Applied rewrites74.8%
if -1.38e13 < y.re < 7.5e6Initial program 44.4%
Taylor expanded in y.im around 0
*-commutativeN/A
lower-*.f64N/A
lower-pow.f64N/A
+-commutativeN/A
unpow2N/A
unpow2N/A
lower-hypot.f64N/A
lower-cos.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-atan2.f6456.8
Applied rewrites56.8%
Taylor expanded in y.re around 0
Applied rewrites53.7%
Final simplification64.4%
(FPCore (x.re x.im y.re y.im) :precision binary64 (if (<= x.re -2.55e-291) (* (pow (- x.re) y.re) 1.0) (if (<= x.re 1.7e-33) (* (pow x.im y.re) 1.0) (* (pow x.re y.re) 1.0))))
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.55e-291) {
tmp = pow(-x_46_re, y_46_re) * 1.0;
} else if (x_46_re <= 1.7e-33) {
tmp = pow(x_46_im, y_46_re) * 1.0;
} else {
tmp = pow(x_46_re, y_46_re) * 1.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) :: tmp
if (x_46re <= (-2.55d-291)) then
tmp = (-x_46re ** y_46re) * 1.0d0
else if (x_46re <= 1.7d-33) then
tmp = (x_46im ** y_46re) * 1.0d0
else
tmp = (x_46re ** y_46re) * 1.0d0
end if
code = tmp
end function
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double tmp;
if (x_46_re <= -2.55e-291) {
tmp = Math.pow(-x_46_re, y_46_re) * 1.0;
} else if (x_46_re <= 1.7e-33) {
tmp = Math.pow(x_46_im, y_46_re) * 1.0;
} else {
tmp = Math.pow(x_46_re, y_46_re) * 1.0;
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): tmp = 0 if x_46_re <= -2.55e-291: tmp = math.pow(-x_46_re, y_46_re) * 1.0 elif x_46_re <= 1.7e-33: tmp = math.pow(x_46_im, y_46_re) * 1.0 else: tmp = math.pow(x_46_re, y_46_re) * 1.0 return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) tmp = 0.0 if (x_46_re <= -2.55e-291) tmp = Float64((Float64(-x_46_re) ^ y_46_re) * 1.0); elseif (x_46_re <= 1.7e-33) tmp = Float64((x_46_im ^ y_46_re) * 1.0); else tmp = Float64((x_46_re ^ y_46_re) * 1.0); end return tmp end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im) tmp = 0.0; if (x_46_re <= -2.55e-291) tmp = (-x_46_re ^ y_46_re) * 1.0; elseif (x_46_re <= 1.7e-33) tmp = (x_46_im ^ y_46_re) * 1.0; else tmp = (x_46_re ^ y_46_re) * 1.0; end tmp_2 = tmp; end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := If[LessEqual[x$46$re, -2.55e-291], N[(N[Power[(-x$46$re), y$46$re], $MachinePrecision] * 1.0), $MachinePrecision], If[LessEqual[x$46$re, 1.7e-33], N[(N[Power[x$46$im, y$46$re], $MachinePrecision] * 1.0), $MachinePrecision], N[(N[Power[x$46$re, y$46$re], $MachinePrecision] * 1.0), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x.re \leq -2.55 \cdot 10^{-291}:\\
\;\;\;\;{\left(-x.re\right)}^{y.re} \cdot 1\\
\mathbf{elif}\;x.re \leq 1.7 \cdot 10^{-33}:\\
\;\;\;\;{x.im}^{y.re} \cdot 1\\
\mathbf{else}:\\
\;\;\;\;{x.re}^{y.re} \cdot 1\\
\end{array}
\end{array}
if x.re < -2.55e-291Initial program 43.5%
Taylor expanded in y.im around 0
*-commutativeN/A
lower-*.f64N/A
lower-pow.f64N/A
+-commutativeN/A
unpow2N/A
unpow2N/A
lower-hypot.f64N/A
lower-cos.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-atan2.f6462.3
Applied rewrites62.3%
Taylor expanded in x.re around -inf
Applied rewrites47.6%
Taylor expanded in y.re around 0
Applied rewrites52.7%
Taylor expanded in x.re around -inf
Applied rewrites62.6%
if -2.55e-291 < x.re < 1.7e-33Initial program 43.8%
Taylor expanded in y.im around 0
*-commutativeN/A
lower-*.f64N/A
lower-pow.f64N/A
+-commutativeN/A
unpow2N/A
unpow2N/A
lower-hypot.f64N/A
lower-cos.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-atan2.f6463.3
Applied rewrites63.3%
Taylor expanded in x.re around -inf
Applied rewrites38.2%
Taylor expanded in y.re around 0
Applied rewrites44.5%
Taylor expanded in x.re around 0
Applied rewrites59.9%
if 1.7e-33 < x.re Initial program 32.3%
Taylor expanded in y.im around 0
*-commutativeN/A
lower-*.f64N/A
lower-pow.f64N/A
+-commutativeN/A
unpow2N/A
unpow2N/A
lower-hypot.f64N/A
lower-cos.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-atan2.f6470.6
Applied rewrites70.6%
Taylor expanded in x.re around -inf
Applied rewrites50.2%
Taylor expanded in y.re around 0
Applied rewrites47.3%
Taylor expanded in x.im around 0
Applied rewrites67.7%
(FPCore (x.re x.im y.re y.im) :precision binary64 (if (<= x.im -1.6e-63) (* (pow (- x.im) y.re) 1.0) (if (<= x.im 4e-21) (* (pow x.re y.re) 1.0) (* (pow x.im y.re) 1.0))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double tmp;
if (x_46_im <= -1.6e-63) {
tmp = pow(-x_46_im, y_46_re) * 1.0;
} else if (x_46_im <= 4e-21) {
tmp = pow(x_46_re, y_46_re) * 1.0;
} else {
tmp = pow(x_46_im, y_46_re) * 1.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) :: tmp
if (x_46im <= (-1.6d-63)) then
tmp = (-x_46im ** y_46re) * 1.0d0
else if (x_46im <= 4d-21) then
tmp = (x_46re ** y_46re) * 1.0d0
else
tmp = (x_46im ** y_46re) * 1.0d0
end if
code = tmp
end function
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double tmp;
if (x_46_im <= -1.6e-63) {
tmp = Math.pow(-x_46_im, y_46_re) * 1.0;
} else if (x_46_im <= 4e-21) {
tmp = Math.pow(x_46_re, y_46_re) * 1.0;
} else {
tmp = Math.pow(x_46_im, y_46_re) * 1.0;
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): tmp = 0 if x_46_im <= -1.6e-63: tmp = math.pow(-x_46_im, y_46_re) * 1.0 elif x_46_im <= 4e-21: tmp = math.pow(x_46_re, y_46_re) * 1.0 else: tmp = math.pow(x_46_im, y_46_re) * 1.0 return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) tmp = 0.0 if (x_46_im <= -1.6e-63) tmp = Float64((Float64(-x_46_im) ^ y_46_re) * 1.0); elseif (x_46_im <= 4e-21) tmp = Float64((x_46_re ^ y_46_re) * 1.0); else tmp = Float64((x_46_im ^ y_46_re) * 1.0); end return tmp end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im) tmp = 0.0; if (x_46_im <= -1.6e-63) tmp = (-x_46_im ^ y_46_re) * 1.0; elseif (x_46_im <= 4e-21) tmp = (x_46_re ^ y_46_re) * 1.0; else tmp = (x_46_im ^ y_46_re) * 1.0; end tmp_2 = tmp; end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := If[LessEqual[x$46$im, -1.6e-63], N[(N[Power[(-x$46$im), y$46$re], $MachinePrecision] * 1.0), $MachinePrecision], If[LessEqual[x$46$im, 4e-21], N[(N[Power[x$46$re, y$46$re], $MachinePrecision] * 1.0), $MachinePrecision], N[(N[Power[x$46$im, y$46$re], $MachinePrecision] * 1.0), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x.im \leq -1.6 \cdot 10^{-63}:\\
\;\;\;\;{\left(-x.im\right)}^{y.re} \cdot 1\\
\mathbf{elif}\;x.im \leq 4 \cdot 10^{-21}:\\
\;\;\;\;{x.re}^{y.re} \cdot 1\\
\mathbf{else}:\\
\;\;\;\;{x.im}^{y.re} \cdot 1\\
\end{array}
\end{array}
if x.im < -1.59999999999999994e-63Initial program 44.6%
Taylor expanded in y.im around 0
*-commutativeN/A
lower-*.f64N/A
lower-pow.f64N/A
+-commutativeN/A
unpow2N/A
unpow2N/A
lower-hypot.f64N/A
lower-cos.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-atan2.f6459.7
Applied rewrites59.7%
Taylor expanded in x.re around -inf
Applied rewrites36.3%
Taylor expanded in y.re around 0
Applied rewrites37.7%
Taylor expanded in x.im around -inf
Applied rewrites60.4%
if -1.59999999999999994e-63 < x.im < 3.99999999999999963e-21Initial program 44.4%
Taylor expanded in y.im around 0
*-commutativeN/A
lower-*.f64N/A
lower-pow.f64N/A
+-commutativeN/A
unpow2N/A
unpow2N/A
lower-hypot.f64N/A
lower-cos.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-atan2.f6470.4
Applied rewrites70.4%
Taylor expanded in x.re around -inf
Applied rewrites50.3%
Taylor expanded in y.re around 0
Applied rewrites53.3%
Taylor expanded in x.im around 0
Applied rewrites63.1%
if 3.99999999999999963e-21 < x.im Initial program 30.4%
Taylor expanded in y.im around 0
*-commutativeN/A
lower-*.f64N/A
lower-pow.f64N/A
+-commutativeN/A
unpow2N/A
unpow2N/A
lower-hypot.f64N/A
lower-cos.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-atan2.f6461.0
Applied rewrites61.0%
Taylor expanded in x.re around -inf
Applied rewrites49.1%
Taylor expanded in y.re around 0
Applied rewrites54.8%
Taylor expanded in x.re around 0
Applied rewrites65.3%
(FPCore (x.re x.im y.re y.im) :precision binary64 (if (<= y.re -0.0019) (* (pow x.re y.re) 1.0) (if (<= y.re 1600.0) 1.0 (* (pow x.im y.re) 1.0))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double tmp;
if (y_46_re <= -0.0019) {
tmp = pow(x_46_re, y_46_re) * 1.0;
} else if (y_46_re <= 1600.0) {
tmp = 1.0;
} else {
tmp = pow(x_46_im, y_46_re) * 1.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) :: tmp
if (y_46re <= (-0.0019d0)) then
tmp = (x_46re ** y_46re) * 1.0d0
else if (y_46re <= 1600.0d0) then
tmp = 1.0d0
else
tmp = (x_46im ** y_46re) * 1.0d0
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 <= -0.0019) {
tmp = Math.pow(x_46_re, y_46_re) * 1.0;
} else if (y_46_re <= 1600.0) {
tmp = 1.0;
} else {
tmp = Math.pow(x_46_im, y_46_re) * 1.0;
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): tmp = 0 if y_46_re <= -0.0019: tmp = math.pow(x_46_re, y_46_re) * 1.0 elif y_46_re <= 1600.0: tmp = 1.0 else: tmp = math.pow(x_46_im, y_46_re) * 1.0 return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) tmp = 0.0 if (y_46_re <= -0.0019) tmp = Float64((x_46_re ^ y_46_re) * 1.0); elseif (y_46_re <= 1600.0) tmp = 1.0; else tmp = Float64((x_46_im ^ y_46_re) * 1.0); end return tmp end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im) tmp = 0.0; if (y_46_re <= -0.0019) tmp = (x_46_re ^ y_46_re) * 1.0; elseif (y_46_re <= 1600.0) tmp = 1.0; else tmp = (x_46_im ^ y_46_re) * 1.0; end tmp_2 = tmp; end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := If[LessEqual[y$46$re, -0.0019], N[(N[Power[x$46$re, y$46$re], $MachinePrecision] * 1.0), $MachinePrecision], If[LessEqual[y$46$re, 1600.0], 1.0, N[(N[Power[x$46$im, y$46$re], $MachinePrecision] * 1.0), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y.re \leq -0.0019:\\
\;\;\;\;{x.re}^{y.re} \cdot 1\\
\mathbf{elif}\;y.re \leq 1600:\\
\;\;\;\;1\\
\mathbf{else}:\\
\;\;\;\;{x.im}^{y.re} \cdot 1\\
\end{array}
\end{array}
if y.re < -0.0019Initial program 37.1%
Taylor expanded in y.im around 0
*-commutativeN/A
lower-*.f64N/A
lower-pow.f64N/A
+-commutativeN/A
unpow2N/A
unpow2N/A
lower-hypot.f64N/A
lower-cos.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-atan2.f6480.1
Applied rewrites80.1%
Taylor expanded in x.re around -inf
Applied rewrites77.3%
Taylor expanded in y.re around 0
Applied rewrites80.2%
Taylor expanded in x.im around 0
Applied rewrites67.5%
if -0.0019 < y.re < 1600Initial program 44.3%
Taylor expanded in y.im around 0
*-commutativeN/A
lower-*.f64N/A
lower-pow.f64N/A
+-commutativeN/A
unpow2N/A
unpow2N/A
lower-hypot.f64N/A
lower-cos.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-atan2.f6456.1
Applied rewrites56.1%
Taylor expanded in y.re around 0
Applied rewrites54.5%
if 1600 < y.re Initial program 37.1%
Taylor expanded in y.im around 0
*-commutativeN/A
lower-*.f64N/A
lower-pow.f64N/A
+-commutativeN/A
unpow2N/A
unpow2N/A
lower-hypot.f64N/A
lower-cos.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-atan2.f6464.6
Applied rewrites64.6%
Taylor expanded in x.re around -inf
Applied rewrites56.6%
Taylor expanded in y.re around 0
Applied rewrites67.9%
Taylor expanded in x.re around 0
Applied rewrites66.4%
(FPCore (x.re x.im y.re y.im) :precision binary64 (let* ((t_0 (* (pow x.im y.re) 1.0))) (if (<= y.re -0.0029) t_0 (if (<= y.re 1600.0) 1.0 t_0))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = pow(x_46_im, y_46_re) * 1.0;
double tmp;
if (y_46_re <= -0.0029) {
tmp = t_0;
} else if (y_46_re <= 1600.0) {
tmp = 1.0;
} 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 = (x_46im ** y_46re) * 1.0d0
if (y_46re <= (-0.0029d0)) then
tmp = t_0
else if (y_46re <= 1600.0d0) then
tmp = 1.0d0
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 = Math.pow(x_46_im, y_46_re) * 1.0;
double tmp;
if (y_46_re <= -0.0029) {
tmp = t_0;
} else if (y_46_re <= 1600.0) {
tmp = 1.0;
} else {
tmp = t_0;
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): t_0 = math.pow(x_46_im, y_46_re) * 1.0 tmp = 0 if y_46_re <= -0.0029: tmp = t_0 elif y_46_re <= 1600.0: tmp = 1.0 else: tmp = t_0 return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = Float64((x_46_im ^ y_46_re) * 1.0) tmp = 0.0 if (y_46_re <= -0.0029) tmp = t_0; elseif (y_46_re <= 1600.0) tmp = 1.0; 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 = (x_46_im ^ y_46_re) * 1.0; tmp = 0.0; if (y_46_re <= -0.0029) tmp = t_0; elseif (y_46_re <= 1600.0) tmp = 1.0; 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[(N[Power[x$46$im, y$46$re], $MachinePrecision] * 1.0), $MachinePrecision]}, If[LessEqual[y$46$re, -0.0029], t$95$0, If[LessEqual[y$46$re, 1600.0], 1.0, t$95$0]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := {x.im}^{y.re} \cdot 1\\
\mathbf{if}\;y.re \leq -0.0029:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;y.re \leq 1600:\\
\;\;\;\;1\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
if y.re < -0.0029 or 1600 < y.re Initial program 37.1%
Taylor expanded in y.im around 0
*-commutativeN/A
lower-*.f64N/A
lower-pow.f64N/A
+-commutativeN/A
unpow2N/A
unpow2N/A
lower-hypot.f64N/A
lower-cos.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-atan2.f6472.8
Applied rewrites72.8%
Taylor expanded in x.re around -inf
Applied rewrites67.6%
Taylor expanded in y.re around 0
Applied rewrites74.4%
Taylor expanded in x.re around 0
Applied rewrites58.0%
if -0.0029 < y.re < 1600Initial program 44.3%
Taylor expanded in y.im around 0
*-commutativeN/A
lower-*.f64N/A
lower-pow.f64N/A
+-commutativeN/A
unpow2N/A
unpow2N/A
lower-hypot.f64N/A
lower-cos.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-atan2.f6456.1
Applied rewrites56.1%
Taylor expanded in y.re around 0
Applied rewrites54.5%
(FPCore (x.re x.im y.re y.im) :precision binary64 1.0)
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
return 1.0;
}
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 = 1.0d0
end function
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
return 1.0;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): return 1.0
function code(x_46_re, x_46_im, y_46_re, y_46_im) return 1.0 end
function tmp = code(x_46_re, x_46_im, y_46_re, y_46_im) tmp = 1.0; end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := 1.0
\begin{array}{l}
\\
1
\end{array}
Initial program 40.6%
Taylor expanded in y.im around 0
*-commutativeN/A
lower-*.f64N/A
lower-pow.f64N/A
+-commutativeN/A
unpow2N/A
unpow2N/A
lower-hypot.f64N/A
lower-cos.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-atan2.f6464.7
Applied rewrites64.7%
Taylor expanded in y.re around 0
Applied rewrites27.8%
herbie shell --seed 2024259
(FPCore (x.re x.im y.re y.im)
:name "powComplex, real part"
:precision binary64
(* (exp (- (* (log (sqrt (+ (* x.re x.re) (* x.im x.im)))) y.re) (* (atan2 x.im x.re) y.im))) (cos (+ (* (log (sqrt (+ (* x.re x.re) (* x.im x.im)))) y.im) (* (atan2 x.im x.re) y.re)))))