
(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 14 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 (fma x.re x.re (* x.im x.im)))
(t_1 (cos (* y.re (atan2 x.im x.re)))))
(if (<= y.re -5.5e-25)
(*
(exp
(-
(* y.re (log (sqrt (+ (* x.re x.re) (* x.im x.im)))))
(* (atan2 x.im x.re) y.im)))
t_1)
(if (<= y.re 215.0)
(* t_1 (exp (* (atan2 x.im x.re) (- y.im))))
(* (pow (* t_0 t_0) (* y.re 0.25)) 1.0)))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = fma(x_46_re, x_46_re, (x_46_im * x_46_im));
double t_1 = cos((y_46_re * atan2(x_46_im, x_46_re)));
double tmp;
if (y_46_re <= -5.5e-25) {
tmp = exp(((y_46_re * log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))) - (atan2(x_46_im, x_46_re) * y_46_im))) * t_1;
} else if (y_46_re <= 215.0) {
tmp = t_1 * exp((atan2(x_46_im, x_46_re) * -y_46_im));
} else {
tmp = pow((t_0 * t_0), (y_46_re * 0.25)) * 1.0;
}
return tmp;
}
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = fma(x_46_re, x_46_re, Float64(x_46_im * x_46_im)) t_1 = cos(Float64(y_46_re * atan(x_46_im, x_46_re))) tmp = 0.0 if (y_46_re <= -5.5e-25) tmp = Float64(exp(Float64(Float64(y_46_re * log(sqrt(Float64(Float64(x_46_re * x_46_re) + Float64(x_46_im * x_46_im))))) - Float64(atan(x_46_im, x_46_re) * y_46_im))) * t_1); elseif (y_46_re <= 215.0) tmp = Float64(t_1 * exp(Float64(atan(x_46_im, x_46_re) * Float64(-y_46_im)))); else tmp = Float64((Float64(t_0 * t_0) ^ Float64(y_46_re * 0.25)) * 1.0); end return tmp end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[(x$46$re * x$46$re + N[(x$46$im * x$46$im), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[Cos[N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[y$46$re, -5.5e-25], N[(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[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * t$95$1), $MachinePrecision], If[LessEqual[y$46$re, 215.0], N[(t$95$1 * N[Exp[N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * (-y$46$im)), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(N[Power[N[(t$95$0 * t$95$0), $MachinePrecision], N[(y$46$re * 0.25), $MachinePrecision]], $MachinePrecision] * 1.0), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \mathsf{fma}\left(x.re, x.re, x.im \cdot x.im\right)\\
t_1 := \cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\\
\mathbf{if}\;y.re \leq -5.5 \cdot 10^{-25}:\\
\;\;\;\;e^{y.re \cdot \log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot t\_1\\
\mathbf{elif}\;y.re \leq 215:\\
\;\;\;\;t\_1 \cdot e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot \left(-y.im\right)}\\
\mathbf{else}:\\
\;\;\;\;{\left(t\_0 \cdot t\_0\right)}^{\left(y.re \cdot 0.25\right)} \cdot 1\\
\end{array}
\end{array}
if y.re < -5.50000000000000004e-25Initial program 48.7%
Taylor expanded in y.im around 0
lower-*.f64N/A
lower-atan2.f6477.1
Applied rewrites77.1%
if -5.50000000000000004e-25 < y.re < 215Initial program 40.2%
Taylor expanded in y.im around 0
lower-*.f64N/A
lower-atan2.f6446.3
Applied rewrites46.3%
Taylor expanded in y.re around 0
neg-mul-1N/A
*-commutativeN/A
distribute-rgt-neg-inN/A
neg-mul-1N/A
lower-*.f64N/A
lower-atan2.f64N/A
neg-mul-1N/A
lower-neg.f6483.2
Applied rewrites83.2%
if 215 < y.re Initial program 26.2%
Taylor expanded in y.im around 0
lower-*.f64N/A
lower-cos.f64N/A
lower-*.f64N/A
lower-atan2.f64N/A
lower-pow.f64N/A
lower-sqrt.f64N/A
unpow2N/A
lower-fma.f64N/A
unpow2N/A
lower-*.f6458.6
Applied rewrites58.6%
Taylor expanded in y.re around 0
Applied rewrites67.8%
Applied rewrites67.8%
Applied rewrites67.8%
Final simplification77.4%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (cos (* y.re (atan2 x.im x.re))))
(t_1 (fma x.re x.re (* x.im x.im))))
(if (<= y.re -215000000.0)
(* t_0 (pow (fma 0.5 (/ (* x.re x.re) x.im) x.im) y.re))
(if (<= y.re 215.0)
(* t_0 (exp (* (atan2 x.im x.re) (- y.im))))
(* (pow (* t_1 t_1) (* y.re 0.25)) 1.0)))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = cos((y_46_re * atan2(x_46_im, x_46_re)));
double t_1 = fma(x_46_re, x_46_re, (x_46_im * x_46_im));
double tmp;
if (y_46_re <= -215000000.0) {
tmp = t_0 * pow(fma(0.5, ((x_46_re * x_46_re) / x_46_im), x_46_im), y_46_re);
} else if (y_46_re <= 215.0) {
tmp = t_0 * exp((atan2(x_46_im, x_46_re) * -y_46_im));
} else {
tmp = pow((t_1 * t_1), (y_46_re * 0.25)) * 1.0;
}
return tmp;
}
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = cos(Float64(y_46_re * atan(x_46_im, x_46_re))) t_1 = fma(x_46_re, x_46_re, Float64(x_46_im * x_46_im)) tmp = 0.0 if (y_46_re <= -215000000.0) tmp = Float64(t_0 * (fma(0.5, Float64(Float64(x_46_re * x_46_re) / x_46_im), x_46_im) ^ y_46_re)); elseif (y_46_re <= 215.0) tmp = Float64(t_0 * exp(Float64(atan(x_46_im, x_46_re) * Float64(-y_46_im)))); else tmp = Float64((Float64(t_1 * t_1) ^ Float64(y_46_re * 0.25)) * 1.0); end return tmp end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[Cos[N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$1 = N[(x$46$re * x$46$re + N[(x$46$im * x$46$im), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y$46$re, -215000000.0], N[(t$95$0 * N[Power[N[(0.5 * N[(N[(x$46$re * x$46$re), $MachinePrecision] / x$46$im), $MachinePrecision] + x$46$im), $MachinePrecision], y$46$re], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$re, 215.0], N[(t$95$0 * N[Exp[N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * (-y$46$im)), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(N[Power[N[(t$95$1 * t$95$1), $MachinePrecision], N[(y$46$re * 0.25), $MachinePrecision]], $MachinePrecision] * 1.0), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\\
t_1 := \mathsf{fma}\left(x.re, x.re, x.im \cdot x.im\right)\\
\mathbf{if}\;y.re \leq -215000000:\\
\;\;\;\;t\_0 \cdot {\left(\mathsf{fma}\left(0.5, \frac{x.re \cdot x.re}{x.im}, x.im\right)\right)}^{y.re}\\
\mathbf{elif}\;y.re \leq 215:\\
\;\;\;\;t\_0 \cdot e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot \left(-y.im\right)}\\
\mathbf{else}:\\
\;\;\;\;{\left(t\_1 \cdot t\_1\right)}^{\left(y.re \cdot 0.25\right)} \cdot 1\\
\end{array}
\end{array}
if y.re < -2.15e8Initial program 47.2%
Taylor expanded in y.im around 0
lower-*.f64N/A
lower-cos.f64N/A
lower-*.f64N/A
lower-atan2.f64N/A
lower-pow.f64N/A
lower-sqrt.f64N/A
unpow2N/A
lower-fma.f64N/A
unpow2N/A
lower-*.f6476.5
Applied rewrites76.5%
Taylor expanded in x.re around 0
Applied rewrites76.6%
if -2.15e8 < y.re < 215Initial program 41.5%
Taylor expanded in y.im around 0
lower-*.f64N/A
lower-atan2.f6445.7
Applied rewrites45.7%
Taylor expanded in y.re around 0
neg-mul-1N/A
*-commutativeN/A
distribute-rgt-neg-inN/A
neg-mul-1N/A
lower-*.f64N/A
lower-atan2.f64N/A
neg-mul-1N/A
lower-neg.f6480.5
Applied rewrites80.5%
if 215 < y.re Initial program 26.2%
Taylor expanded in y.im around 0
lower-*.f64N/A
lower-cos.f64N/A
lower-*.f64N/A
lower-atan2.f64N/A
lower-pow.f64N/A
lower-sqrt.f64N/A
unpow2N/A
lower-fma.f64N/A
unpow2N/A
lower-*.f6458.6
Applied rewrites58.6%
Taylor expanded in y.re around 0
Applied rewrites67.8%
Applied rewrites67.8%
Applied rewrites67.8%
Final simplification76.2%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (fma x.re x.re (* x.im x.im))))
(if (<= y.re -215000000.0)
(*
(cos (* y.re (atan2 x.im x.re)))
(pow (fma 0.5 (/ (* x.re x.re) x.im) x.im) y.re))
(if (<= y.re 215.0)
(* (exp (* (atan2 x.im x.re) (- y.im))) 1.0)
(* (pow (* t_0 t_0) (* y.re 0.25)) 1.0)))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = fma(x_46_re, x_46_re, (x_46_im * x_46_im));
double tmp;
if (y_46_re <= -215000000.0) {
tmp = cos((y_46_re * atan2(x_46_im, x_46_re))) * pow(fma(0.5, ((x_46_re * x_46_re) / x_46_im), x_46_im), y_46_re);
} else if (y_46_re <= 215.0) {
tmp = exp((atan2(x_46_im, x_46_re) * -y_46_im)) * 1.0;
} else {
tmp = pow((t_0 * t_0), (y_46_re * 0.25)) * 1.0;
}
return tmp;
}
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = fma(x_46_re, x_46_re, Float64(x_46_im * x_46_im)) tmp = 0.0 if (y_46_re <= -215000000.0) tmp = Float64(cos(Float64(y_46_re * atan(x_46_im, x_46_re))) * (fma(0.5, Float64(Float64(x_46_re * x_46_re) / x_46_im), x_46_im) ^ y_46_re)); elseif (y_46_re <= 215.0) tmp = Float64(exp(Float64(atan(x_46_im, x_46_re) * Float64(-y_46_im))) * 1.0); else tmp = Float64((Float64(t_0 * t_0) ^ Float64(y_46_re * 0.25)) * 1.0); end return tmp end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[(x$46$re * x$46$re + N[(x$46$im * x$46$im), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y$46$re, -215000000.0], N[(N[Cos[N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Power[N[(0.5 * N[(N[(x$46$re * x$46$re), $MachinePrecision] / x$46$im), $MachinePrecision] + x$46$im), $MachinePrecision], y$46$re], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$re, 215.0], N[(N[Exp[N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * (-y$46$im)), $MachinePrecision]], $MachinePrecision] * 1.0), $MachinePrecision], N[(N[Power[N[(t$95$0 * t$95$0), $MachinePrecision], N[(y$46$re * 0.25), $MachinePrecision]], $MachinePrecision] * 1.0), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \mathsf{fma}\left(x.re, x.re, x.im \cdot x.im\right)\\
\mathbf{if}\;y.re \leq -215000000:\\
\;\;\;\;\cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {\left(\mathsf{fma}\left(0.5, \frac{x.re \cdot x.re}{x.im}, x.im\right)\right)}^{y.re}\\
\mathbf{elif}\;y.re \leq 215:\\
\;\;\;\;e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot \left(-y.im\right)} \cdot 1\\
\mathbf{else}:\\
\;\;\;\;{\left(t\_0 \cdot t\_0\right)}^{\left(y.re \cdot 0.25\right)} \cdot 1\\
\end{array}
\end{array}
if y.re < -2.15e8Initial program 47.2%
Taylor expanded in y.im around 0
lower-*.f64N/A
lower-cos.f64N/A
lower-*.f64N/A
lower-atan2.f64N/A
lower-pow.f64N/A
lower-sqrt.f64N/A
unpow2N/A
lower-fma.f64N/A
unpow2N/A
lower-*.f6476.5
Applied rewrites76.5%
Taylor expanded in x.re around 0
Applied rewrites76.6%
if -2.15e8 < y.re < 215Initial program 41.5%
Taylor expanded in x.re around 0
lower-*.f64N/A
lower-cos.f64N/A
lower-fma.f64N/A
lower-log.f64N/A
lower-*.f64N/A
lower-atan2.f64N/A
lower-exp.f64N/A
lower--.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-log.f64N/A
lower-*.f64N/A
lower-atan2.f6440.9
Applied rewrites40.9%
Taylor expanded in y.re around 0
Applied rewrites40.5%
Taylor expanded in y.im around 0
Applied rewrites80.5%
if 215 < y.re Initial program 26.2%
Taylor expanded in y.im around 0
lower-*.f64N/A
lower-cos.f64N/A
lower-*.f64N/A
lower-atan2.f64N/A
lower-pow.f64N/A
lower-sqrt.f64N/A
unpow2N/A
lower-fma.f64N/A
unpow2N/A
lower-*.f6458.6
Applied rewrites58.6%
Taylor expanded in y.re around 0
Applied rewrites67.8%
Applied rewrites67.8%
Applied rewrites67.8%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (fma x.re x.re (* x.im x.im))))
(if (<= y.re -0.34)
(*
(cos (* y.re (atan2 x.im x.re)))
(pow (sqrt (fma x.im x.im (* x.re x.re))) y.re))
(if (<= y.re 215.0)
(* (exp (* (atan2 x.im x.re) (- y.im))) 1.0)
(* (pow (* t_0 t_0) (* y.re 0.25)) 1.0)))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = fma(x_46_re, x_46_re, (x_46_im * x_46_im));
double tmp;
if (y_46_re <= -0.34) {
tmp = cos((y_46_re * atan2(x_46_im, x_46_re))) * pow(sqrt(fma(x_46_im, x_46_im, (x_46_re * x_46_re))), y_46_re);
} else if (y_46_re <= 215.0) {
tmp = exp((atan2(x_46_im, x_46_re) * -y_46_im)) * 1.0;
} else {
tmp = pow((t_0 * t_0), (y_46_re * 0.25)) * 1.0;
}
return tmp;
}
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = fma(x_46_re, x_46_re, Float64(x_46_im * x_46_im)) tmp = 0.0 if (y_46_re <= -0.34) tmp = Float64(cos(Float64(y_46_re * atan(x_46_im, x_46_re))) * (sqrt(fma(x_46_im, x_46_im, Float64(x_46_re * x_46_re))) ^ y_46_re)); elseif (y_46_re <= 215.0) tmp = Float64(exp(Float64(atan(x_46_im, x_46_re) * Float64(-y_46_im))) * 1.0); else tmp = Float64((Float64(t_0 * t_0) ^ Float64(y_46_re * 0.25)) * 1.0); end return tmp end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[(x$46$re * x$46$re + N[(x$46$im * x$46$im), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y$46$re, -0.34], N[(N[Cos[N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Power[N[Sqrt[N[(x$46$im * x$46$im + N[(x$46$re * x$46$re), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], y$46$re], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$re, 215.0], N[(N[Exp[N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * (-y$46$im)), $MachinePrecision]], $MachinePrecision] * 1.0), $MachinePrecision], N[(N[Power[N[(t$95$0 * t$95$0), $MachinePrecision], N[(y$46$re * 0.25), $MachinePrecision]], $MachinePrecision] * 1.0), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \mathsf{fma}\left(x.re, x.re, x.im \cdot x.im\right)\\
\mathbf{if}\;y.re \leq -0.34:\\
\;\;\;\;\cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {\left(\sqrt{\mathsf{fma}\left(x.im, x.im, x.re \cdot x.re\right)}\right)}^{y.re}\\
\mathbf{elif}\;y.re \leq 215:\\
\;\;\;\;e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot \left(-y.im\right)} \cdot 1\\
\mathbf{else}:\\
\;\;\;\;{\left(t\_0 \cdot t\_0\right)}^{\left(y.re \cdot 0.25\right)} \cdot 1\\
\end{array}
\end{array}
if y.re < -0.340000000000000024Initial program 47.2%
Taylor expanded in y.im around 0
lower-*.f64N/A
lower-cos.f64N/A
lower-*.f64N/A
lower-atan2.f64N/A
lower-pow.f64N/A
lower-sqrt.f64N/A
unpow2N/A
lower-fma.f64N/A
unpow2N/A
lower-*.f6476.5
Applied rewrites76.5%
if -0.340000000000000024 < y.re < 215Initial program 41.5%
Taylor expanded in x.re around 0
lower-*.f64N/A
lower-cos.f64N/A
lower-fma.f64N/A
lower-log.f64N/A
lower-*.f64N/A
lower-atan2.f64N/A
lower-exp.f64N/A
lower--.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-log.f64N/A
lower-*.f64N/A
lower-atan2.f6440.9
Applied rewrites40.9%
Taylor expanded in y.re around 0
Applied rewrites40.5%
Taylor expanded in y.im around 0
Applied rewrites80.5%
if 215 < y.re Initial program 26.2%
Taylor expanded in y.im around 0
lower-*.f64N/A
lower-cos.f64N/A
lower-*.f64N/A
lower-atan2.f64N/A
lower-pow.f64N/A
lower-sqrt.f64N/A
unpow2N/A
lower-fma.f64N/A
unpow2N/A
lower-*.f6458.6
Applied rewrites58.6%
Taylor expanded in y.re around 0
Applied rewrites67.8%
Applied rewrites67.8%
Applied rewrites67.8%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (fma x.re x.re (* x.im x.im))))
(if (<= y.re -250000000.0)
(* 1.0 (pow (fma 0.5 (/ (* x.re x.re) x.im) x.im) y.re))
(if (<= y.re 215.0)
(* (exp (* (atan2 x.im x.re) (- y.im))) 1.0)
(* (pow (* t_0 t_0) (* y.re 0.25)) 1.0)))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = fma(x_46_re, x_46_re, (x_46_im * x_46_im));
double tmp;
if (y_46_re <= -250000000.0) {
tmp = 1.0 * pow(fma(0.5, ((x_46_re * x_46_re) / x_46_im), x_46_im), y_46_re);
} else if (y_46_re <= 215.0) {
tmp = exp((atan2(x_46_im, x_46_re) * -y_46_im)) * 1.0;
} else {
tmp = pow((t_0 * t_0), (y_46_re * 0.25)) * 1.0;
}
return tmp;
}
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = fma(x_46_re, x_46_re, Float64(x_46_im * x_46_im)) tmp = 0.0 if (y_46_re <= -250000000.0) tmp = Float64(1.0 * (fma(0.5, Float64(Float64(x_46_re * x_46_re) / x_46_im), x_46_im) ^ y_46_re)); elseif (y_46_re <= 215.0) tmp = Float64(exp(Float64(atan(x_46_im, x_46_re) * Float64(-y_46_im))) * 1.0); else tmp = Float64((Float64(t_0 * t_0) ^ Float64(y_46_re * 0.25)) * 1.0); end return tmp end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[(x$46$re * x$46$re + N[(x$46$im * x$46$im), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y$46$re, -250000000.0], N[(1.0 * N[Power[N[(0.5 * N[(N[(x$46$re * x$46$re), $MachinePrecision] / x$46$im), $MachinePrecision] + x$46$im), $MachinePrecision], y$46$re], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$re, 215.0], N[(N[Exp[N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * (-y$46$im)), $MachinePrecision]], $MachinePrecision] * 1.0), $MachinePrecision], N[(N[Power[N[(t$95$0 * t$95$0), $MachinePrecision], N[(y$46$re * 0.25), $MachinePrecision]], $MachinePrecision] * 1.0), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \mathsf{fma}\left(x.re, x.re, x.im \cdot x.im\right)\\
\mathbf{if}\;y.re \leq -250000000:\\
\;\;\;\;1 \cdot {\left(\mathsf{fma}\left(0.5, \frac{x.re \cdot x.re}{x.im}, x.im\right)\right)}^{y.re}\\
\mathbf{elif}\;y.re \leq 215:\\
\;\;\;\;e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot \left(-y.im\right)} \cdot 1\\
\mathbf{else}:\\
\;\;\;\;{\left(t\_0 \cdot t\_0\right)}^{\left(y.re \cdot 0.25\right)} \cdot 1\\
\end{array}
\end{array}
if y.re < -2.5e8Initial program 47.2%
Taylor expanded in y.im around 0
lower-*.f64N/A
lower-cos.f64N/A
lower-*.f64N/A
lower-atan2.f64N/A
lower-pow.f64N/A
lower-sqrt.f64N/A
unpow2N/A
lower-fma.f64N/A
unpow2N/A
lower-*.f6476.5
Applied rewrites76.5%
Taylor expanded in y.re around 0
Applied rewrites73.8%
Taylor expanded in x.re around 0
Applied rewrites75.2%
if -2.5e8 < y.re < 215Initial program 41.5%
Taylor expanded in x.re around 0
lower-*.f64N/A
lower-cos.f64N/A
lower-fma.f64N/A
lower-log.f64N/A
lower-*.f64N/A
lower-atan2.f64N/A
lower-exp.f64N/A
lower--.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-log.f64N/A
lower-*.f64N/A
lower-atan2.f6440.9
Applied rewrites40.9%
Taylor expanded in y.re around 0
Applied rewrites40.5%
Taylor expanded in y.im around 0
Applied rewrites80.5%
if 215 < y.re Initial program 26.2%
Taylor expanded in y.im around 0
lower-*.f64N/A
lower-cos.f64N/A
lower-*.f64N/A
lower-atan2.f64N/A
lower-pow.f64N/A
lower-sqrt.f64N/A
unpow2N/A
lower-fma.f64N/A
unpow2N/A
lower-*.f6458.6
Applied rewrites58.6%
Taylor expanded in y.re around 0
Applied rewrites67.8%
Applied rewrites67.8%
Applied rewrites67.8%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (fma x.re x.re (* x.im x.im))))
(if (<= y.re -0.014)
(* 1.0 (pow (fma 0.5 (/ (* x.re x.re) x.im) x.im) y.re))
(if (<= y.re 2.3e-19)
(- 1.0 (* (atan2 x.im x.re) y.im))
(* (pow (* t_0 t_0) (* y.re 0.25)) 1.0)))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = fma(x_46_re, x_46_re, (x_46_im * x_46_im));
double tmp;
if (y_46_re <= -0.014) {
tmp = 1.0 * pow(fma(0.5, ((x_46_re * x_46_re) / x_46_im), x_46_im), y_46_re);
} else if (y_46_re <= 2.3e-19) {
tmp = 1.0 - (atan2(x_46_im, x_46_re) * y_46_im);
} else {
tmp = pow((t_0 * t_0), (y_46_re * 0.25)) * 1.0;
}
return tmp;
}
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = fma(x_46_re, x_46_re, Float64(x_46_im * x_46_im)) tmp = 0.0 if (y_46_re <= -0.014) tmp = Float64(1.0 * (fma(0.5, Float64(Float64(x_46_re * x_46_re) / x_46_im), x_46_im) ^ y_46_re)); elseif (y_46_re <= 2.3e-19) tmp = Float64(1.0 - Float64(atan(x_46_im, x_46_re) * y_46_im)); else tmp = Float64((Float64(t_0 * t_0) ^ Float64(y_46_re * 0.25)) * 1.0); end return tmp end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[(x$46$re * x$46$re + N[(x$46$im * x$46$im), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y$46$re, -0.014], N[(1.0 * N[Power[N[(0.5 * N[(N[(x$46$re * x$46$re), $MachinePrecision] / x$46$im), $MachinePrecision] + x$46$im), $MachinePrecision], y$46$re], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$re, 2.3e-19], N[(1.0 - N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$im), $MachinePrecision]), $MachinePrecision], N[(N[Power[N[(t$95$0 * t$95$0), $MachinePrecision], N[(y$46$re * 0.25), $MachinePrecision]], $MachinePrecision] * 1.0), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \mathsf{fma}\left(x.re, x.re, x.im \cdot x.im\right)\\
\mathbf{if}\;y.re \leq -0.014:\\
\;\;\;\;1 \cdot {\left(\mathsf{fma}\left(0.5, \frac{x.re \cdot x.re}{x.im}, x.im\right)\right)}^{y.re}\\
\mathbf{elif}\;y.re \leq 2.3 \cdot 10^{-19}:\\
\;\;\;\;1 - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im\\
\mathbf{else}:\\
\;\;\;\;{\left(t\_0 \cdot t\_0\right)}^{\left(y.re \cdot 0.25\right)} \cdot 1\\
\end{array}
\end{array}
if y.re < -0.0140000000000000003Initial program 47.2%
Taylor expanded in y.im around 0
lower-*.f64N/A
lower-cos.f64N/A
lower-*.f64N/A
lower-atan2.f64N/A
lower-pow.f64N/A
lower-sqrt.f64N/A
unpow2N/A
lower-fma.f64N/A
unpow2N/A
lower-*.f6476.5
Applied rewrites76.5%
Taylor expanded in y.re around 0
Applied rewrites73.8%
Taylor expanded in x.re around 0
Applied rewrites75.2%
if -0.0140000000000000003 < y.re < 2.2999999999999998e-19Initial program 40.4%
Taylor expanded in x.re around 0
lower-*.f64N/A
lower-cos.f64N/A
lower-fma.f64N/A
lower-log.f64N/A
lower-*.f64N/A
lower-atan2.f64N/A
lower-exp.f64N/A
lower--.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-log.f64N/A
lower-*.f64N/A
lower-atan2.f6440.6
Applied rewrites40.6%
Taylor expanded in y.re around 0
Applied rewrites40.6%
Taylor expanded in y.im around 0
Applied rewrites46.5%
if 2.2999999999999998e-19 < y.re Initial program 29.0%
Taylor expanded in y.im around 0
lower-*.f64N/A
lower-cos.f64N/A
lower-*.f64N/A
lower-atan2.f64N/A
lower-pow.f64N/A
lower-sqrt.f64N/A
unpow2N/A
lower-fma.f64N/A
unpow2N/A
lower-*.f6458.2
Applied rewrites58.2%
Taylor expanded in y.re around 0
Applied rewrites66.8%
Applied rewrites66.8%
Applied rewrites66.8%
Final simplification60.0%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(if (<= y.re -0.014)
(* 1.0 (pow (fma 0.5 (/ (* x.re x.re) x.im) x.im) y.re))
(if (<= y.re 2.7e-19)
(- 1.0 (* (atan2 x.im x.re) y.im))
(* 1.0 (pow (fma x.re x.re (* x.im x.im)) (* y.re 0.5))))))
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.014) {
tmp = 1.0 * pow(fma(0.5, ((x_46_re * x_46_re) / x_46_im), x_46_im), y_46_re);
} else if (y_46_re <= 2.7e-19) {
tmp = 1.0 - (atan2(x_46_im, x_46_re) * y_46_im);
} else {
tmp = 1.0 * pow(fma(x_46_re, x_46_re, (x_46_im * x_46_im)), (y_46_re * 0.5));
}
return tmp;
}
function code(x_46_re, x_46_im, y_46_re, y_46_im) tmp = 0.0 if (y_46_re <= -0.014) tmp = Float64(1.0 * (fma(0.5, Float64(Float64(x_46_re * x_46_re) / x_46_im), x_46_im) ^ y_46_re)); elseif (y_46_re <= 2.7e-19) tmp = Float64(1.0 - Float64(atan(x_46_im, x_46_re) * y_46_im)); else tmp = Float64(1.0 * (fma(x_46_re, x_46_re, Float64(x_46_im * x_46_im)) ^ Float64(y_46_re * 0.5))); end return tmp end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := If[LessEqual[y$46$re, -0.014], N[(1.0 * N[Power[N[(0.5 * N[(N[(x$46$re * x$46$re), $MachinePrecision] / x$46$im), $MachinePrecision] + x$46$im), $MachinePrecision], y$46$re], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$re, 2.7e-19], N[(1.0 - N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$im), $MachinePrecision]), $MachinePrecision], N[(1.0 * N[Power[N[(x$46$re * x$46$re + N[(x$46$im * x$46$im), $MachinePrecision]), $MachinePrecision], N[(y$46$re * 0.5), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y.re \leq -0.014:\\
\;\;\;\;1 \cdot {\left(\mathsf{fma}\left(0.5, \frac{x.re \cdot x.re}{x.im}, x.im\right)\right)}^{y.re}\\
\mathbf{elif}\;y.re \leq 2.7 \cdot 10^{-19}:\\
\;\;\;\;1 - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im\\
\mathbf{else}:\\
\;\;\;\;1 \cdot {\left(\mathsf{fma}\left(x.re, x.re, x.im \cdot x.im\right)\right)}^{\left(y.re \cdot 0.5\right)}\\
\end{array}
\end{array}
if y.re < -0.0140000000000000003Initial program 47.2%
Taylor expanded in y.im around 0
lower-*.f64N/A
lower-cos.f64N/A
lower-*.f64N/A
lower-atan2.f64N/A
lower-pow.f64N/A
lower-sqrt.f64N/A
unpow2N/A
lower-fma.f64N/A
unpow2N/A
lower-*.f6476.5
Applied rewrites76.5%
Taylor expanded in y.re around 0
Applied rewrites73.8%
Taylor expanded in x.re around 0
Applied rewrites75.2%
if -0.0140000000000000003 < y.re < 2.7000000000000001e-19Initial program 40.4%
Taylor expanded in x.re around 0
lower-*.f64N/A
lower-cos.f64N/A
lower-fma.f64N/A
lower-log.f64N/A
lower-*.f64N/A
lower-atan2.f64N/A
lower-exp.f64N/A
lower--.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-log.f64N/A
lower-*.f64N/A
lower-atan2.f6440.6
Applied rewrites40.6%
Taylor expanded in y.re around 0
Applied rewrites40.6%
Taylor expanded in y.im around 0
Applied rewrites46.5%
if 2.7000000000000001e-19 < y.re Initial program 29.0%
Taylor expanded in y.im around 0
lower-*.f64N/A
lower-cos.f64N/A
lower-*.f64N/A
lower-atan2.f64N/A
lower-pow.f64N/A
lower-sqrt.f64N/A
unpow2N/A
lower-fma.f64N/A
unpow2N/A
lower-*.f6458.2
Applied rewrites58.2%
Taylor expanded in y.re around 0
Applied rewrites66.8%
Applied rewrites66.8%
Final simplification60.0%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (* 1.0 (pow (fma x.re x.re (* x.im x.im)) (* y.re 0.5)))))
(if (<= y.re -5e-25)
t_0
(if (<= y.re 2.7e-19) (- 1.0 (* (atan2 x.im x.re) y.im)) t_0))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = 1.0 * pow(fma(x_46_re, x_46_re, (x_46_im * x_46_im)), (y_46_re * 0.5));
double tmp;
if (y_46_re <= -5e-25) {
tmp = t_0;
} else if (y_46_re <= 2.7e-19) {
tmp = 1.0 - (atan2(x_46_im, x_46_re) * y_46_im);
} else {
tmp = t_0;
}
return tmp;
}
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = Float64(1.0 * (fma(x_46_re, x_46_re, Float64(x_46_im * x_46_im)) ^ Float64(y_46_re * 0.5))) tmp = 0.0 if (y_46_re <= -5e-25) tmp = t_0; elseif (y_46_re <= 2.7e-19) tmp = Float64(1.0 - Float64(atan(x_46_im, x_46_re) * y_46_im)); else tmp = t_0; end return tmp end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[(1.0 * N[Power[N[(x$46$re * x$46$re + N[(x$46$im * x$46$im), $MachinePrecision]), $MachinePrecision], N[(y$46$re * 0.5), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y$46$re, -5e-25], t$95$0, If[LessEqual[y$46$re, 2.7e-19], N[(1.0 - N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$im), $MachinePrecision]), $MachinePrecision], t$95$0]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := 1 \cdot {\left(\mathsf{fma}\left(x.re, x.re, x.im \cdot x.im\right)\right)}^{\left(y.re \cdot 0.5\right)}\\
\mathbf{if}\;y.re \leq -5 \cdot 10^{-25}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;y.re \leq 2.7 \cdot 10^{-19}:\\
\;\;\;\;1 - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
if y.re < -4.99999999999999962e-25 or 2.7000000000000001e-19 < y.re Initial program 39.5%
Taylor expanded in y.im around 0
lower-*.f64N/A
lower-cos.f64N/A
lower-*.f64N/A
lower-atan2.f64N/A
lower-pow.f64N/A
lower-sqrt.f64N/A
unpow2N/A
lower-fma.f64N/A
unpow2N/A
lower-*.f6465.5
Applied rewrites65.5%
Taylor expanded in y.re around 0
Applied rewrites68.2%
Applied rewrites68.2%
if -4.99999999999999962e-25 < y.re < 2.7000000000000001e-19Initial program 38.9%
Taylor expanded in x.re around 0
lower-*.f64N/A
lower-cos.f64N/A
lower-fma.f64N/A
lower-log.f64N/A
lower-*.f64N/A
lower-atan2.f64N/A
lower-exp.f64N/A
lower--.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-log.f64N/A
lower-*.f64N/A
lower-atan2.f6441.0
Applied rewrites41.0%
Taylor expanded in y.re around 0
Applied rewrites41.0%
Taylor expanded in y.im around 0
Applied rewrites48.4%
Final simplification59.8%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(if (<= x.im -1.25e-27)
(* 1.0 (pow (- x.im) y.re))
(if (<= x.im 1.9e-60)
(* 1.0 (pow (* x.re x.re) (* y.re 0.5)))
(* 1.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 tmp;
if (x_46_im <= -1.25e-27) {
tmp = 1.0 * pow(-x_46_im, y_46_re);
} else if (x_46_im <= 1.9e-60) {
tmp = 1.0 * pow((x_46_re * x_46_re), (y_46_re * 0.5));
} else {
tmp = 1.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) :: tmp
if (x_46im <= (-1.25d-27)) then
tmp = 1.0d0 * (-x_46im ** y_46re)
else if (x_46im <= 1.9d-60) then
tmp = 1.0d0 * ((x_46re * x_46re) ** (y_46re * 0.5d0))
else
tmp = 1.0d0 * (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 tmp;
if (x_46_im <= -1.25e-27) {
tmp = 1.0 * Math.pow(-x_46_im, y_46_re);
} else if (x_46_im <= 1.9e-60) {
tmp = 1.0 * Math.pow((x_46_re * x_46_re), (y_46_re * 0.5));
} else {
tmp = 1.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): tmp = 0 if x_46_im <= -1.25e-27: tmp = 1.0 * math.pow(-x_46_im, y_46_re) elif x_46_im <= 1.9e-60: tmp = 1.0 * math.pow((x_46_re * x_46_re), (y_46_re * 0.5)) else: tmp = 1.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) tmp = 0.0 if (x_46_im <= -1.25e-27) tmp = Float64(1.0 * (Float64(-x_46_im) ^ y_46_re)); elseif (x_46_im <= 1.9e-60) tmp = Float64(1.0 * (Float64(x_46_re * x_46_re) ^ Float64(y_46_re * 0.5))); else tmp = Float64(1.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) tmp = 0.0; if (x_46_im <= -1.25e-27) tmp = 1.0 * (-x_46_im ^ y_46_re); elseif (x_46_im <= 1.9e-60) tmp = 1.0 * ((x_46_re * x_46_re) ^ (y_46_re * 0.5)); else tmp = 1.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_] := If[LessEqual[x$46$im, -1.25e-27], N[(1.0 * N[Power[(-x$46$im), y$46$re], $MachinePrecision]), $MachinePrecision], If[LessEqual[x$46$im, 1.9e-60], N[(1.0 * N[Power[N[(x$46$re * x$46$re), $MachinePrecision], N[(y$46$re * 0.5), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(1.0 * N[Power[x$46$im, y$46$re], $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x.im \leq -1.25 \cdot 10^{-27}:\\
\;\;\;\;1 \cdot {\left(-x.im\right)}^{y.re}\\
\mathbf{elif}\;x.im \leq 1.9 \cdot 10^{-60}:\\
\;\;\;\;1 \cdot {\left(x.re \cdot x.re\right)}^{\left(y.re \cdot 0.5\right)}\\
\mathbf{else}:\\
\;\;\;\;1 \cdot {x.im}^{y.re}\\
\end{array}
\end{array}
if x.im < -1.25e-27Initial program 36.2%
Taylor expanded in y.im around 0
lower-*.f64N/A
lower-cos.f64N/A
lower-*.f64N/A
lower-atan2.f64N/A
lower-pow.f64N/A
lower-sqrt.f64N/A
unpow2N/A
lower-fma.f64N/A
unpow2N/A
lower-*.f6446.1
Applied rewrites46.1%
Taylor expanded in y.re around 0
Applied rewrites49.0%
Taylor expanded in x.im around -inf
Applied rewrites63.9%
if -1.25e-27 < x.im < 1.89999999999999997e-60Initial program 42.2%
Taylor expanded in y.im around 0
lower-*.f64N/A
lower-cos.f64N/A
lower-*.f64N/A
lower-atan2.f64N/A
lower-pow.f64N/A
lower-sqrt.f64N/A
unpow2N/A
lower-fma.f64N/A
unpow2N/A
lower-*.f6452.4
Applied rewrites52.4%
Taylor expanded in y.re around 0
Applied rewrites51.4%
Applied rewrites51.4%
Taylor expanded in x.re around inf
Applied rewrites51.4%
if 1.89999999999999997e-60 < x.im Initial program 38.1%
Taylor expanded in y.im around 0
lower-*.f64N/A
lower-cos.f64N/A
lower-*.f64N/A
lower-atan2.f64N/A
lower-pow.f64N/A
lower-sqrt.f64N/A
unpow2N/A
lower-fma.f64N/A
unpow2N/A
lower-*.f6450.3
Applied rewrites50.3%
Taylor expanded in y.re around 0
Applied rewrites53.8%
Taylor expanded in x.re around 0
Applied rewrites61.2%
Final simplification58.0%
(FPCore (x.re x.im y.re y.im) :precision binary64 (if (<= x.im -5e-169) (* 1.0 (pow (- x.im) y.re)) (if (<= x.im 2.2e-71) (* 1.0 (pow (- x.re) y.re)) (* 1.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 tmp;
if (x_46_im <= -5e-169) {
tmp = 1.0 * pow(-x_46_im, y_46_re);
} else if (x_46_im <= 2.2e-71) {
tmp = 1.0 * pow(-x_46_re, y_46_re);
} else {
tmp = 1.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) :: tmp
if (x_46im <= (-5d-169)) then
tmp = 1.0d0 * (-x_46im ** y_46re)
else if (x_46im <= 2.2d-71) then
tmp = 1.0d0 * (-x_46re ** y_46re)
else
tmp = 1.0d0 * (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 tmp;
if (x_46_im <= -5e-169) {
tmp = 1.0 * Math.pow(-x_46_im, y_46_re);
} else if (x_46_im <= 2.2e-71) {
tmp = 1.0 * Math.pow(-x_46_re, y_46_re);
} else {
tmp = 1.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): tmp = 0 if x_46_im <= -5e-169: tmp = 1.0 * math.pow(-x_46_im, y_46_re) elif x_46_im <= 2.2e-71: tmp = 1.0 * math.pow(-x_46_re, y_46_re) else: tmp = 1.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) tmp = 0.0 if (x_46_im <= -5e-169) tmp = Float64(1.0 * (Float64(-x_46_im) ^ y_46_re)); elseif (x_46_im <= 2.2e-71) tmp = Float64(1.0 * (Float64(-x_46_re) ^ y_46_re)); else tmp = Float64(1.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) tmp = 0.0; if (x_46_im <= -5e-169) tmp = 1.0 * (-x_46_im ^ y_46_re); elseif (x_46_im <= 2.2e-71) tmp = 1.0 * (-x_46_re ^ y_46_re); else tmp = 1.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_] := If[LessEqual[x$46$im, -5e-169], N[(1.0 * N[Power[(-x$46$im), y$46$re], $MachinePrecision]), $MachinePrecision], If[LessEqual[x$46$im, 2.2e-71], N[(1.0 * N[Power[(-x$46$re), y$46$re], $MachinePrecision]), $MachinePrecision], N[(1.0 * N[Power[x$46$im, y$46$re], $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x.im \leq -5 \cdot 10^{-169}:\\
\;\;\;\;1 \cdot {\left(-x.im\right)}^{y.re}\\
\mathbf{elif}\;x.im \leq 2.2 \cdot 10^{-71}:\\
\;\;\;\;1 \cdot {\left(-x.re\right)}^{y.re}\\
\mathbf{else}:\\
\;\;\;\;1 \cdot {x.im}^{y.re}\\
\end{array}
\end{array}
if x.im < -5.0000000000000002e-169Initial program 45.5%
Taylor expanded in y.im around 0
lower-*.f64N/A
lower-cos.f64N/A
lower-*.f64N/A
lower-atan2.f64N/A
lower-pow.f64N/A
lower-sqrt.f64N/A
unpow2N/A
lower-fma.f64N/A
unpow2N/A
lower-*.f6450.0
Applied rewrites50.0%
Taylor expanded in y.re around 0
Applied rewrites51.0%
Taylor expanded in x.im around -inf
Applied rewrites58.4%
if -5.0000000000000002e-169 < x.im < 2.19999999999999997e-71Initial program 30.5%
Taylor expanded in y.im around 0
lower-*.f64N/A
lower-cos.f64N/A
lower-*.f64N/A
lower-atan2.f64N/A
lower-pow.f64N/A
lower-sqrt.f64N/A
unpow2N/A
lower-fma.f64N/A
unpow2N/A
lower-*.f6450.3
Applied rewrites50.3%
Taylor expanded in y.re around 0
Applied rewrites50.3%
Taylor expanded in x.re around -inf
Applied rewrites53.9%
if 2.19999999999999997e-71 < x.im Initial program 38.8%
Taylor expanded in y.im around 0
lower-*.f64N/A
lower-cos.f64N/A
lower-*.f64N/A
lower-atan2.f64N/A
lower-pow.f64N/A
lower-sqrt.f64N/A
unpow2N/A
lower-fma.f64N/A
unpow2N/A
lower-*.f6449.7
Applied rewrites49.7%
Taylor expanded in y.re around 0
Applied rewrites53.2%
Taylor expanded in x.re around 0
Applied rewrites60.4%
(FPCore (x.re x.im y.re y.im) :precision binary64 (if (<= x.im -5.3e-179) (* 1.0 (pow (- x.im) y.re)) (if (<= x.im 2.6e-71) (* 1.0 (pow x.re y.re)) (* 1.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 tmp;
if (x_46_im <= -5.3e-179) {
tmp = 1.0 * pow(-x_46_im, y_46_re);
} else if (x_46_im <= 2.6e-71) {
tmp = 1.0 * pow(x_46_re, y_46_re);
} else {
tmp = 1.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) :: tmp
if (x_46im <= (-5.3d-179)) then
tmp = 1.0d0 * (-x_46im ** y_46re)
else if (x_46im <= 2.6d-71) then
tmp = 1.0d0 * (x_46re ** y_46re)
else
tmp = 1.0d0 * (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 tmp;
if (x_46_im <= -5.3e-179) {
tmp = 1.0 * Math.pow(-x_46_im, y_46_re);
} else if (x_46_im <= 2.6e-71) {
tmp = 1.0 * Math.pow(x_46_re, y_46_re);
} else {
tmp = 1.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): tmp = 0 if x_46_im <= -5.3e-179: tmp = 1.0 * math.pow(-x_46_im, y_46_re) elif x_46_im <= 2.6e-71: tmp = 1.0 * math.pow(x_46_re, y_46_re) else: tmp = 1.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) tmp = 0.0 if (x_46_im <= -5.3e-179) tmp = Float64(1.0 * (Float64(-x_46_im) ^ y_46_re)); elseif (x_46_im <= 2.6e-71) tmp = Float64(1.0 * (x_46_re ^ y_46_re)); else tmp = Float64(1.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) tmp = 0.0; if (x_46_im <= -5.3e-179) tmp = 1.0 * (-x_46_im ^ y_46_re); elseif (x_46_im <= 2.6e-71) tmp = 1.0 * (x_46_re ^ y_46_re); else tmp = 1.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_] := If[LessEqual[x$46$im, -5.3e-179], N[(1.0 * N[Power[(-x$46$im), y$46$re], $MachinePrecision]), $MachinePrecision], If[LessEqual[x$46$im, 2.6e-71], N[(1.0 * N[Power[x$46$re, y$46$re], $MachinePrecision]), $MachinePrecision], N[(1.0 * N[Power[x$46$im, y$46$re], $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x.im \leq -5.3 \cdot 10^{-179}:\\
\;\;\;\;1 \cdot {\left(-x.im\right)}^{y.re}\\
\mathbf{elif}\;x.im \leq 2.6 \cdot 10^{-71}:\\
\;\;\;\;1 \cdot {x.re}^{y.re}\\
\mathbf{else}:\\
\;\;\;\;1 \cdot {x.im}^{y.re}\\
\end{array}
\end{array}
if x.im < -5.29999999999999994e-179Initial program 44.6%
Taylor expanded in y.im around 0
lower-*.f64N/A
lower-cos.f64N/A
lower-*.f64N/A
lower-atan2.f64N/A
lower-pow.f64N/A
lower-sqrt.f64N/A
unpow2N/A
lower-fma.f64N/A
unpow2N/A
lower-*.f6450.0
Applied rewrites50.0%
Taylor expanded in y.re around 0
Applied rewrites50.0%
Taylor expanded in x.im around -inf
Applied rewrites58.2%
if -5.29999999999999994e-179 < x.im < 2.5999999999999999e-71Initial program 31.4%
Taylor expanded in y.im around 0
lower-*.f64N/A
lower-cos.f64N/A
lower-*.f64N/A
lower-atan2.f64N/A
lower-pow.f64N/A
lower-sqrt.f64N/A
unpow2N/A
lower-fma.f64N/A
unpow2N/A
lower-*.f6450.3
Applied rewrites50.3%
Taylor expanded in y.re around 0
Applied rewrites51.8%
Taylor expanded in x.im around 0
Applied rewrites51.4%
if 2.5999999999999999e-71 < x.im Initial program 38.8%
Taylor expanded in y.im around 0
lower-*.f64N/A
lower-cos.f64N/A
lower-*.f64N/A
lower-atan2.f64N/A
lower-pow.f64N/A
lower-sqrt.f64N/A
unpow2N/A
lower-fma.f64N/A
unpow2N/A
lower-*.f6449.7
Applied rewrites49.7%
Taylor expanded in y.re around 0
Applied rewrites53.2%
Taylor expanded in x.re around 0
Applied rewrites60.4%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (* 1.0 (pow x.re y.re))))
(if (<= x.re -3.6e-15)
t_0
(if (<= x.re 1.6e-110) (* 1.0 (pow x.im y.re)) t_0))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = 1.0 * pow(x_46_re, y_46_re);
double tmp;
if (x_46_re <= -3.6e-15) {
tmp = t_0;
} else if (x_46_re <= 1.6e-110) {
tmp = 1.0 * pow(x_46_im, y_46_re);
} else {
tmp = t_0;
}
return tmp;
}
real(8) function code(x_46re, x_46im, y_46re, y_46im)
real(8), intent (in) :: x_46re
real(8), intent (in) :: x_46im
real(8), intent (in) :: y_46re
real(8), intent (in) :: y_46im
real(8) :: t_0
real(8) :: tmp
t_0 = 1.0d0 * (x_46re ** y_46re)
if (x_46re <= (-3.6d-15)) then
tmp = t_0
else if (x_46re <= 1.6d-110) then
tmp = 1.0d0 * (x_46im ** y_46re)
else
tmp = t_0
end if
code = tmp
end function
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = 1.0 * Math.pow(x_46_re, y_46_re);
double tmp;
if (x_46_re <= -3.6e-15) {
tmp = t_0;
} else if (x_46_re <= 1.6e-110) {
tmp = 1.0 * Math.pow(x_46_im, y_46_re);
} else {
tmp = t_0;
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): t_0 = 1.0 * math.pow(x_46_re, y_46_re) tmp = 0 if x_46_re <= -3.6e-15: tmp = t_0 elif x_46_re <= 1.6e-110: tmp = 1.0 * math.pow(x_46_im, y_46_re) else: tmp = t_0 return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = Float64(1.0 * (x_46_re ^ y_46_re)) tmp = 0.0 if (x_46_re <= -3.6e-15) tmp = t_0; elseif (x_46_re <= 1.6e-110) tmp = Float64(1.0 * (x_46_im ^ y_46_re)); else tmp = t_0; end return tmp end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = 1.0 * (x_46_re ^ y_46_re); tmp = 0.0; if (x_46_re <= -3.6e-15) tmp = t_0; elseif (x_46_re <= 1.6e-110) tmp = 1.0 * (x_46_im ^ y_46_re); else tmp = t_0; end tmp_2 = tmp; end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[(1.0 * N[Power[x$46$re, y$46$re], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x$46$re, -3.6e-15], t$95$0, If[LessEqual[x$46$re, 1.6e-110], N[(1.0 * N[Power[x$46$im, y$46$re], $MachinePrecision]), $MachinePrecision], t$95$0]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := 1 \cdot {x.re}^{y.re}\\
\mathbf{if}\;x.re \leq -3.6 \cdot 10^{-15}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;x.re \leq 1.6 \cdot 10^{-110}:\\
\;\;\;\;1 \cdot {x.im}^{y.re}\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
if x.re < -3.6000000000000001e-15 or 1.60000000000000014e-110 < x.re Initial program 36.1%
Taylor expanded in y.im around 0
lower-*.f64N/A
lower-cos.f64N/A
lower-*.f64N/A
lower-atan2.f64N/A
lower-pow.f64N/A
lower-sqrt.f64N/A
unpow2N/A
lower-fma.f64N/A
unpow2N/A
lower-*.f6450.1
Applied rewrites50.1%
Taylor expanded in y.re around 0
Applied rewrites50.7%
Taylor expanded in x.im around 0
Applied rewrites53.7%
if -3.6000000000000001e-15 < x.re < 1.60000000000000014e-110Initial program 44.3%
Taylor expanded in y.im around 0
lower-*.f64N/A
lower-cos.f64N/A
lower-*.f64N/A
lower-atan2.f64N/A
lower-pow.f64N/A
lower-sqrt.f64N/A
unpow2N/A
lower-fma.f64N/A
unpow2N/A
lower-*.f6449.9
Applied rewrites49.9%
Taylor expanded in y.re around 0
Applied rewrites52.9%
Taylor expanded in x.re around 0
Applied rewrites50.4%
(FPCore (x.re x.im y.re y.im) :precision binary64 (let* ((t_0 (* 1.0 (pow x.im y.re)))) (if (<= y.re -1.95e+23) t_0 (if (<= y.re 2.95e-8) 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 = 1.0 * pow(x_46_im, y_46_re);
double tmp;
if (y_46_re <= -1.95e+23) {
tmp = t_0;
} else if (y_46_re <= 2.95e-8) {
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 = 1.0d0 * (x_46im ** y_46re)
if (y_46re <= (-1.95d+23)) then
tmp = t_0
else if (y_46re <= 2.95d-8) 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 = 1.0 * Math.pow(x_46_im, y_46_re);
double tmp;
if (y_46_re <= -1.95e+23) {
tmp = t_0;
} else if (y_46_re <= 2.95e-8) {
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 = 1.0 * math.pow(x_46_im, y_46_re) tmp = 0 if y_46_re <= -1.95e+23: tmp = t_0 elif y_46_re <= 2.95e-8: 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(1.0 * (x_46_im ^ y_46_re)) tmp = 0.0 if (y_46_re <= -1.95e+23) tmp = t_0; elseif (y_46_re <= 2.95e-8) 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 = 1.0 * (x_46_im ^ y_46_re); tmp = 0.0; if (y_46_re <= -1.95e+23) tmp = t_0; elseif (y_46_re <= 2.95e-8) 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[(1.0 * N[Power[x$46$im, y$46$re], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y$46$re, -1.95e+23], t$95$0, If[LessEqual[y$46$re, 2.95e-8], 1.0, t$95$0]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := 1 \cdot {x.im}^{y.re}\\
\mathbf{if}\;y.re \leq -1.95 \cdot 10^{+23}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;y.re \leq 2.95 \cdot 10^{-8}:\\
\;\;\;\;1\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
if y.re < -1.95e23 or 2.9499999999999999e-8 < y.re Initial program 37.2%
Taylor expanded in y.im around 0
lower-*.f64N/A
lower-cos.f64N/A
lower-*.f64N/A
lower-atan2.f64N/A
lower-pow.f64N/A
lower-sqrt.f64N/A
unpow2N/A
lower-fma.f64N/A
unpow2N/A
lower-*.f6468.0
Applied rewrites68.0%
Taylor expanded in y.re around 0
Applied rewrites70.9%
Taylor expanded in x.re around 0
Applied rewrites52.3%
if -1.95e23 < y.re < 2.9499999999999999e-8Initial program 41.5%
Taylor expanded in y.im around 0
lower-*.f64N/A
lower-cos.f64N/A
lower-*.f64N/A
lower-atan2.f64N/A
lower-pow.f64N/A
lower-sqrt.f64N/A
unpow2N/A
lower-fma.f64N/A
unpow2N/A
lower-*.f6429.2
Applied rewrites29.2%
Taylor expanded in y.re around 0
Applied rewrites45.7%
(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 39.2%
Taylor expanded in y.im around 0
lower-*.f64N/A
lower-cos.f64N/A
lower-*.f64N/A
lower-atan2.f64N/A
lower-pow.f64N/A
lower-sqrt.f64N/A
unpow2N/A
lower-fma.f64N/A
unpow2N/A
lower-*.f6450.0
Applied rewrites50.0%
Taylor expanded in y.re around 0
Applied rewrites22.8%
herbie shell --seed 2024231
(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)))))