
(FPCore (x.re x.im) :precision binary64 (+ (* (- (* x.re x.re) (* x.im x.im)) x.im) (* (+ (* x.re x.im) (* x.im x.re)) x.re)))
double code(double x_46_re, double x_46_im) {
return (((x_46_re * x_46_re) - (x_46_im * x_46_im)) * x_46_im) + (((x_46_re * x_46_im) + (x_46_im * x_46_re)) * x_46_re);
}
real(8) function code(x_46re, x_46im)
real(8), intent (in) :: x_46re
real(8), intent (in) :: x_46im
code = (((x_46re * x_46re) - (x_46im * x_46im)) * x_46im) + (((x_46re * x_46im) + (x_46im * x_46re)) * x_46re)
end function
public static double code(double x_46_re, double x_46_im) {
return (((x_46_re * x_46_re) - (x_46_im * x_46_im)) * x_46_im) + (((x_46_re * x_46_im) + (x_46_im * x_46_re)) * x_46_re);
}
def code(x_46_re, x_46_im): return (((x_46_re * x_46_re) - (x_46_im * x_46_im)) * x_46_im) + (((x_46_re * x_46_im) + (x_46_im * x_46_re)) * x_46_re)
function code(x_46_re, x_46_im) return Float64(Float64(Float64(Float64(x_46_re * x_46_re) - Float64(x_46_im * x_46_im)) * x_46_im) + Float64(Float64(Float64(x_46_re * x_46_im) + Float64(x_46_im * x_46_re)) * x_46_re)) end
function tmp = code(x_46_re, x_46_im) tmp = (((x_46_re * x_46_re) - (x_46_im * x_46_im)) * x_46_im) + (((x_46_re * x_46_im) + (x_46_im * x_46_re)) * x_46_re); end
code[x$46$re_, x$46$im_] := N[(N[(N[(N[(x$46$re * x$46$re), $MachinePrecision] - N[(x$46$im * x$46$im), $MachinePrecision]), $MachinePrecision] * x$46$im), $MachinePrecision] + N[(N[(N[(x$46$re * x$46$im), $MachinePrecision] + N[(x$46$im * x$46$re), $MachinePrecision]), $MachinePrecision] * x$46$re), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(x.re \cdot x.re - x.im \cdot x.im\right) \cdot x.im + \left(x.re \cdot x.im + x.im \cdot x.re\right) \cdot x.re
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 8 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x.re x.im) :precision binary64 (+ (* (- (* x.re x.re) (* x.im x.im)) x.im) (* (+ (* x.re x.im) (* x.im x.re)) x.re)))
double code(double x_46_re, double x_46_im) {
return (((x_46_re * x_46_re) - (x_46_im * x_46_im)) * x_46_im) + (((x_46_re * x_46_im) + (x_46_im * x_46_re)) * x_46_re);
}
real(8) function code(x_46re, x_46im)
real(8), intent (in) :: x_46re
real(8), intent (in) :: x_46im
code = (((x_46re * x_46re) - (x_46im * x_46im)) * x_46im) + (((x_46re * x_46im) + (x_46im * x_46re)) * x_46re)
end function
public static double code(double x_46_re, double x_46_im) {
return (((x_46_re * x_46_re) - (x_46_im * x_46_im)) * x_46_im) + (((x_46_re * x_46_im) + (x_46_im * x_46_re)) * x_46_re);
}
def code(x_46_re, x_46_im): return (((x_46_re * x_46_re) - (x_46_im * x_46_im)) * x_46_im) + (((x_46_re * x_46_im) + (x_46_im * x_46_re)) * x_46_re)
function code(x_46_re, x_46_im) return Float64(Float64(Float64(Float64(x_46_re * x_46_re) - Float64(x_46_im * x_46_im)) * x_46_im) + Float64(Float64(Float64(x_46_re * x_46_im) + Float64(x_46_im * x_46_re)) * x_46_re)) end
function tmp = code(x_46_re, x_46_im) tmp = (((x_46_re * x_46_re) - (x_46_im * x_46_im)) * x_46_im) + (((x_46_re * x_46_im) + (x_46_im * x_46_re)) * x_46_re); end
code[x$46$re_, x$46$im_] := N[(N[(N[(N[(x$46$re * x$46$re), $MachinePrecision] - N[(x$46$im * x$46$im), $MachinePrecision]), $MachinePrecision] * x$46$im), $MachinePrecision] + N[(N[(N[(x$46$re * x$46$im), $MachinePrecision] + N[(x$46$im * x$46$re), $MachinePrecision]), $MachinePrecision] * x$46$re), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(x.re \cdot x.re - x.im \cdot x.im\right) \cdot x.im + \left(x.re \cdot x.im + x.im \cdot x.re\right) \cdot x.re
\end{array}
x.re_m = (fabs.f64 x.re) (FPCore (x.re_m x.im) :precision binary64 (if (<= x.re_m 2.25e-79) (pow (- 0.0 x.im) 3.0) (* (- 3.0 (/ (* x.im (/ x.im x.re_m)) x.re_m)) (* x.re_m (* x.re_m x.im)))))
x.re_m = fabs(x_46_re);
double code(double x_46_re_m, double x_46_im) {
double tmp;
if (x_46_re_m <= 2.25e-79) {
tmp = pow((0.0 - x_46_im), 3.0);
} else {
tmp = (3.0 - ((x_46_im * (x_46_im / x_46_re_m)) / x_46_re_m)) * (x_46_re_m * (x_46_re_m * x_46_im));
}
return tmp;
}
x.re_m = abs(x_46re)
real(8) function code(x_46re_m, x_46im)
real(8), intent (in) :: x_46re_m
real(8), intent (in) :: x_46im
real(8) :: tmp
if (x_46re_m <= 2.25d-79) then
tmp = (0.0d0 - x_46im) ** 3.0d0
else
tmp = (3.0d0 - ((x_46im * (x_46im / x_46re_m)) / x_46re_m)) * (x_46re_m * (x_46re_m * x_46im))
end if
code = tmp
end function
x.re_m = Math.abs(x_46_re);
public static double code(double x_46_re_m, double x_46_im) {
double tmp;
if (x_46_re_m <= 2.25e-79) {
tmp = Math.pow((0.0 - x_46_im), 3.0);
} else {
tmp = (3.0 - ((x_46_im * (x_46_im / x_46_re_m)) / x_46_re_m)) * (x_46_re_m * (x_46_re_m * x_46_im));
}
return tmp;
}
x.re_m = math.fabs(x_46_re) def code(x_46_re_m, x_46_im): tmp = 0 if x_46_re_m <= 2.25e-79: tmp = math.pow((0.0 - x_46_im), 3.0) else: tmp = (3.0 - ((x_46_im * (x_46_im / x_46_re_m)) / x_46_re_m)) * (x_46_re_m * (x_46_re_m * x_46_im)) return tmp
x.re_m = abs(x_46_re) function code(x_46_re_m, x_46_im) tmp = 0.0 if (x_46_re_m <= 2.25e-79) tmp = Float64(0.0 - x_46_im) ^ 3.0; else tmp = Float64(Float64(3.0 - Float64(Float64(x_46_im * Float64(x_46_im / x_46_re_m)) / x_46_re_m)) * Float64(x_46_re_m * Float64(x_46_re_m * x_46_im))); end return tmp end
x.re_m = abs(x_46_re); function tmp_2 = code(x_46_re_m, x_46_im) tmp = 0.0; if (x_46_re_m <= 2.25e-79) tmp = (0.0 - x_46_im) ^ 3.0; else tmp = (3.0 - ((x_46_im * (x_46_im / x_46_re_m)) / x_46_re_m)) * (x_46_re_m * (x_46_re_m * x_46_im)); end tmp_2 = tmp; end
x.re_m = N[Abs[x$46$re], $MachinePrecision] code[x$46$re$95$m_, x$46$im_] := If[LessEqual[x$46$re$95$m, 2.25e-79], N[Power[N[(0.0 - x$46$im), $MachinePrecision], 3.0], $MachinePrecision], N[(N[(3.0 - N[(N[(x$46$im * N[(x$46$im / x$46$re$95$m), $MachinePrecision]), $MachinePrecision] / x$46$re$95$m), $MachinePrecision]), $MachinePrecision] * N[(x$46$re$95$m * N[(x$46$re$95$m * x$46$im), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
x.re_m = \left|x.re\right|
\\
\begin{array}{l}
\mathbf{if}\;x.re\_m \leq 2.25 \cdot 10^{-79}:\\
\;\;\;\;{\left(0 - x.im\right)}^{3}\\
\mathbf{else}:\\
\;\;\;\;\left(3 - \frac{x.im \cdot \frac{x.im}{x.re\_m}}{x.re\_m}\right) \cdot \left(x.re\_m \cdot \left(x.re\_m \cdot x.im\right)\right)\\
\end{array}
\end{array}
if x.re < 2.2500000000000001e-79Initial program 88.3%
+-commutativeN/A
*-commutativeN/A
distribute-lft-outN/A
associate-*l*N/A
*-commutativeN/A
distribute-lft-outN/A
*-lowering-*.f64N/A
associate-+r-N/A
--lowering--.f64N/A
distribute-rgt-outN/A
*-lowering-*.f64N/A
count-2N/A
distribute-lft1-inN/A
metadata-evalN/A
*-commutativeN/A
*-lowering-*.f64N/A
*-lowering-*.f6491.5%
Simplified91.5%
Taylor expanded in x.im around inf
mul-1-negN/A
neg-sub0N/A
--lowering--.f64N/A
cube-multN/A
unpow2N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6471.8%
Simplified71.8%
sub0-negN/A
cube-unmultN/A
cube-negN/A
pow-lowering-pow.f64N/A
neg-sub0N/A
--lowering--.f6471.9%
Applied egg-rr71.9%
if 2.2500000000000001e-79 < x.re Initial program 78.1%
difference-of-squaresN/A
associate-*l*N/A
*-lowering-*.f64N/A
+-commutativeN/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
--lowering--.f6491.3%
Applied egg-rr91.3%
Taylor expanded in x.re around inf
+-commutativeN/A
+-commutativeN/A
associate-+r+N/A
associate-+l+N/A
+-commutativeN/A
Simplified83.6%
associate-*r*N/A
*-commutativeN/A
*-lowering-*.f64N/A
--lowering--.f64N/A
associate-/r*N/A
/-lowering-/.f64N/A
associate-/l*N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
associate-*l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f6499.8%
Applied egg-rr99.8%
x.re_m = (fabs.f64 x.re)
(FPCore (x.re_m x.im)
:precision binary64
(let* ((t_0 (* x.im (- (* x.re_m x.re_m) (* x.im x.im)))))
(if (<= (+ t_0 (* x.re_m (+ (* x.re_m x.im) (* x.re_m x.im)))) 1e+203)
(+ t_0 (* x.im (* (* x.re_m x.re_m) 2.0)))
(*
(- 3.0 (/ (* x.im (/ x.im x.re_m)) x.re_m))
(* x.re_m (* x.re_m x.im))))))x.re_m = fabs(x_46_re);
double code(double x_46_re_m, double x_46_im) {
double t_0 = x_46_im * ((x_46_re_m * x_46_re_m) - (x_46_im * x_46_im));
double tmp;
if ((t_0 + (x_46_re_m * ((x_46_re_m * x_46_im) + (x_46_re_m * x_46_im)))) <= 1e+203) {
tmp = t_0 + (x_46_im * ((x_46_re_m * x_46_re_m) * 2.0));
} else {
tmp = (3.0 - ((x_46_im * (x_46_im / x_46_re_m)) / x_46_re_m)) * (x_46_re_m * (x_46_re_m * x_46_im));
}
return tmp;
}
x.re_m = abs(x_46re)
real(8) function code(x_46re_m, x_46im)
real(8), intent (in) :: x_46re_m
real(8), intent (in) :: x_46im
real(8) :: t_0
real(8) :: tmp
t_0 = x_46im * ((x_46re_m * x_46re_m) - (x_46im * x_46im))
if ((t_0 + (x_46re_m * ((x_46re_m * x_46im) + (x_46re_m * x_46im)))) <= 1d+203) then
tmp = t_0 + (x_46im * ((x_46re_m * x_46re_m) * 2.0d0))
else
tmp = (3.0d0 - ((x_46im * (x_46im / x_46re_m)) / x_46re_m)) * (x_46re_m * (x_46re_m * x_46im))
end if
code = tmp
end function
x.re_m = Math.abs(x_46_re);
public static double code(double x_46_re_m, double x_46_im) {
double t_0 = x_46_im * ((x_46_re_m * x_46_re_m) - (x_46_im * x_46_im));
double tmp;
if ((t_0 + (x_46_re_m * ((x_46_re_m * x_46_im) + (x_46_re_m * x_46_im)))) <= 1e+203) {
tmp = t_0 + (x_46_im * ((x_46_re_m * x_46_re_m) * 2.0));
} else {
tmp = (3.0 - ((x_46_im * (x_46_im / x_46_re_m)) / x_46_re_m)) * (x_46_re_m * (x_46_re_m * x_46_im));
}
return tmp;
}
x.re_m = math.fabs(x_46_re) def code(x_46_re_m, x_46_im): t_0 = x_46_im * ((x_46_re_m * x_46_re_m) - (x_46_im * x_46_im)) tmp = 0 if (t_0 + (x_46_re_m * ((x_46_re_m * x_46_im) + (x_46_re_m * x_46_im)))) <= 1e+203: tmp = t_0 + (x_46_im * ((x_46_re_m * x_46_re_m) * 2.0)) else: tmp = (3.0 - ((x_46_im * (x_46_im / x_46_re_m)) / x_46_re_m)) * (x_46_re_m * (x_46_re_m * x_46_im)) return tmp
x.re_m = abs(x_46_re) function code(x_46_re_m, x_46_im) t_0 = Float64(x_46_im * Float64(Float64(x_46_re_m * x_46_re_m) - Float64(x_46_im * x_46_im))) tmp = 0.0 if (Float64(t_0 + Float64(x_46_re_m * Float64(Float64(x_46_re_m * x_46_im) + Float64(x_46_re_m * x_46_im)))) <= 1e+203) tmp = Float64(t_0 + Float64(x_46_im * Float64(Float64(x_46_re_m * x_46_re_m) * 2.0))); else tmp = Float64(Float64(3.0 - Float64(Float64(x_46_im * Float64(x_46_im / x_46_re_m)) / x_46_re_m)) * Float64(x_46_re_m * Float64(x_46_re_m * x_46_im))); end return tmp end
x.re_m = abs(x_46_re); function tmp_2 = code(x_46_re_m, x_46_im) t_0 = x_46_im * ((x_46_re_m * x_46_re_m) - (x_46_im * x_46_im)); tmp = 0.0; if ((t_0 + (x_46_re_m * ((x_46_re_m * x_46_im) + (x_46_re_m * x_46_im)))) <= 1e+203) tmp = t_0 + (x_46_im * ((x_46_re_m * x_46_re_m) * 2.0)); else tmp = (3.0 - ((x_46_im * (x_46_im / x_46_re_m)) / x_46_re_m)) * (x_46_re_m * (x_46_re_m * x_46_im)); end tmp_2 = tmp; end
x.re_m = N[Abs[x$46$re], $MachinePrecision]
code[x$46$re$95$m_, x$46$im_] := Block[{t$95$0 = N[(x$46$im * N[(N[(x$46$re$95$m * x$46$re$95$m), $MachinePrecision] - N[(x$46$im * x$46$im), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(t$95$0 + N[(x$46$re$95$m * N[(N[(x$46$re$95$m * x$46$im), $MachinePrecision] + N[(x$46$re$95$m * x$46$im), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 1e+203], N[(t$95$0 + N[(x$46$im * N[(N[(x$46$re$95$m * x$46$re$95$m), $MachinePrecision] * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(3.0 - N[(N[(x$46$im * N[(x$46$im / x$46$re$95$m), $MachinePrecision]), $MachinePrecision] / x$46$re$95$m), $MachinePrecision]), $MachinePrecision] * N[(x$46$re$95$m * N[(x$46$re$95$m * x$46$im), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
x.re_m = \left|x.re\right|
\\
\begin{array}{l}
t_0 := x.im \cdot \left(x.re\_m \cdot x.re\_m - x.im \cdot x.im\right)\\
\mathbf{if}\;t\_0 + x.re\_m \cdot \left(x.re\_m \cdot x.im + x.re\_m \cdot x.im\right) \leq 10^{+203}:\\
\;\;\;\;t\_0 + x.im \cdot \left(\left(x.re\_m \cdot x.re\_m\right) \cdot 2\right)\\
\mathbf{else}:\\
\;\;\;\;\left(3 - \frac{x.im \cdot \frac{x.im}{x.re\_m}}{x.re\_m}\right) \cdot \left(x.re\_m \cdot \left(x.re\_m \cdot x.im\right)\right)\\
\end{array}
\end{array}
if (+.f64 (*.f64 (-.f64 (*.f64 x.re x.re) (*.f64 x.im x.im)) x.im) (*.f64 (+.f64 (*.f64 x.re x.im) (*.f64 x.im x.re)) x.re)) < 9.9999999999999999e202Initial program 93.0%
Taylor expanded in x.re around 0
associate-*r*N/A
*-commutativeN/A
associate-*r*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6493.0%
Simplified93.0%
if 9.9999999999999999e202 < (+.f64 (*.f64 (-.f64 (*.f64 x.re x.re) (*.f64 x.im x.im)) x.im) (*.f64 (+.f64 (*.f64 x.re x.im) (*.f64 x.im x.re)) x.re)) Initial program 67.6%
difference-of-squaresN/A
associate-*l*N/A
*-lowering-*.f64N/A
+-commutativeN/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
--lowering--.f6478.9%
Applied egg-rr78.9%
Taylor expanded in x.re around inf
+-commutativeN/A
+-commutativeN/A
associate-+r+N/A
associate-+l+N/A
+-commutativeN/A
Simplified61.1%
associate-*r*N/A
*-commutativeN/A
*-lowering-*.f64N/A
--lowering--.f64N/A
associate-/r*N/A
/-lowering-/.f64N/A
associate-/l*N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
associate-*l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f6494.7%
Applied egg-rr94.7%
Final simplification93.5%
x.re_m = (fabs.f64 x.re) (FPCore (x.re_m x.im) :precision binary64 (if (<= x.re_m 100.0) (* x.im (- (* x.re_m (* x.re_m 3.0)) (* x.im x.im))) (* (- 3.0 (/ (* x.im (/ x.im x.re_m)) x.re_m)) (* x.re_m (* x.re_m x.im)))))
x.re_m = fabs(x_46_re);
double code(double x_46_re_m, double x_46_im) {
double tmp;
if (x_46_re_m <= 100.0) {
tmp = x_46_im * ((x_46_re_m * (x_46_re_m * 3.0)) - (x_46_im * x_46_im));
} else {
tmp = (3.0 - ((x_46_im * (x_46_im / x_46_re_m)) / x_46_re_m)) * (x_46_re_m * (x_46_re_m * x_46_im));
}
return tmp;
}
x.re_m = abs(x_46re)
real(8) function code(x_46re_m, x_46im)
real(8), intent (in) :: x_46re_m
real(8), intent (in) :: x_46im
real(8) :: tmp
if (x_46re_m <= 100.0d0) then
tmp = x_46im * ((x_46re_m * (x_46re_m * 3.0d0)) - (x_46im * x_46im))
else
tmp = (3.0d0 - ((x_46im * (x_46im / x_46re_m)) / x_46re_m)) * (x_46re_m * (x_46re_m * x_46im))
end if
code = tmp
end function
x.re_m = Math.abs(x_46_re);
public static double code(double x_46_re_m, double x_46_im) {
double tmp;
if (x_46_re_m <= 100.0) {
tmp = x_46_im * ((x_46_re_m * (x_46_re_m * 3.0)) - (x_46_im * x_46_im));
} else {
tmp = (3.0 - ((x_46_im * (x_46_im / x_46_re_m)) / x_46_re_m)) * (x_46_re_m * (x_46_re_m * x_46_im));
}
return tmp;
}
x.re_m = math.fabs(x_46_re) def code(x_46_re_m, x_46_im): tmp = 0 if x_46_re_m <= 100.0: tmp = x_46_im * ((x_46_re_m * (x_46_re_m * 3.0)) - (x_46_im * x_46_im)) else: tmp = (3.0 - ((x_46_im * (x_46_im / x_46_re_m)) / x_46_re_m)) * (x_46_re_m * (x_46_re_m * x_46_im)) return tmp
x.re_m = abs(x_46_re) function code(x_46_re_m, x_46_im) tmp = 0.0 if (x_46_re_m <= 100.0) tmp = Float64(x_46_im * Float64(Float64(x_46_re_m * Float64(x_46_re_m * 3.0)) - Float64(x_46_im * x_46_im))); else tmp = Float64(Float64(3.0 - Float64(Float64(x_46_im * Float64(x_46_im / x_46_re_m)) / x_46_re_m)) * Float64(x_46_re_m * Float64(x_46_re_m * x_46_im))); end return tmp end
x.re_m = abs(x_46_re); function tmp_2 = code(x_46_re_m, x_46_im) tmp = 0.0; if (x_46_re_m <= 100.0) tmp = x_46_im * ((x_46_re_m * (x_46_re_m * 3.0)) - (x_46_im * x_46_im)); else tmp = (3.0 - ((x_46_im * (x_46_im / x_46_re_m)) / x_46_re_m)) * (x_46_re_m * (x_46_re_m * x_46_im)); end tmp_2 = tmp; end
x.re_m = N[Abs[x$46$re], $MachinePrecision] code[x$46$re$95$m_, x$46$im_] := If[LessEqual[x$46$re$95$m, 100.0], N[(x$46$im * N[(N[(x$46$re$95$m * N[(x$46$re$95$m * 3.0), $MachinePrecision]), $MachinePrecision] - N[(x$46$im * x$46$im), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(3.0 - N[(N[(x$46$im * N[(x$46$im / x$46$re$95$m), $MachinePrecision]), $MachinePrecision] / x$46$re$95$m), $MachinePrecision]), $MachinePrecision] * N[(x$46$re$95$m * N[(x$46$re$95$m * x$46$im), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
x.re_m = \left|x.re\right|
\\
\begin{array}{l}
\mathbf{if}\;x.re\_m \leq 100:\\
\;\;\;\;x.im \cdot \left(x.re\_m \cdot \left(x.re\_m \cdot 3\right) - x.im \cdot x.im\right)\\
\mathbf{else}:\\
\;\;\;\;\left(3 - \frac{x.im \cdot \frac{x.im}{x.re\_m}}{x.re\_m}\right) \cdot \left(x.re\_m \cdot \left(x.re\_m \cdot x.im\right)\right)\\
\end{array}
\end{array}
if x.re < 100Initial program 89.1%
+-commutativeN/A
*-commutativeN/A
distribute-lft-outN/A
associate-*l*N/A
*-commutativeN/A
distribute-lft-outN/A
*-lowering-*.f64N/A
associate-+r-N/A
--lowering--.f64N/A
distribute-rgt-outN/A
*-lowering-*.f64N/A
count-2N/A
distribute-lft1-inN/A
metadata-evalN/A
*-commutativeN/A
*-lowering-*.f64N/A
*-lowering-*.f6492.1%
Simplified92.1%
if 100 < x.re Initial program 72.8%
difference-of-squaresN/A
associate-*l*N/A
*-lowering-*.f64N/A
+-commutativeN/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
--lowering--.f6489.3%
Applied egg-rr89.3%
Taylor expanded in x.re around inf
+-commutativeN/A
+-commutativeN/A
associate-+r+N/A
associate-+l+N/A
+-commutativeN/A
Simplified81.4%
associate-*r*N/A
*-commutativeN/A
*-lowering-*.f64N/A
--lowering--.f64N/A
associate-/r*N/A
/-lowering-/.f64N/A
associate-/l*N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
associate-*l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f6499.8%
Applied egg-rr99.8%
x.re_m = (fabs.f64 x.re) (FPCore (x.re_m x.im) :precision binary64 (if (<= x.re_m 2.8e+57) (* x.im (- (* x.re_m (* x.re_m 3.0)) (* x.im x.im))) (* x.re_m (* x.re_m (* x.im (- 3.0 (/ (* x.im (/ x.im x.re_m)) x.re_m)))))))
x.re_m = fabs(x_46_re);
double code(double x_46_re_m, double x_46_im) {
double tmp;
if (x_46_re_m <= 2.8e+57) {
tmp = x_46_im * ((x_46_re_m * (x_46_re_m * 3.0)) - (x_46_im * x_46_im));
} else {
tmp = x_46_re_m * (x_46_re_m * (x_46_im * (3.0 - ((x_46_im * (x_46_im / x_46_re_m)) / x_46_re_m))));
}
return tmp;
}
x.re_m = abs(x_46re)
real(8) function code(x_46re_m, x_46im)
real(8), intent (in) :: x_46re_m
real(8), intent (in) :: x_46im
real(8) :: tmp
if (x_46re_m <= 2.8d+57) then
tmp = x_46im * ((x_46re_m * (x_46re_m * 3.0d0)) - (x_46im * x_46im))
else
tmp = x_46re_m * (x_46re_m * (x_46im * (3.0d0 - ((x_46im * (x_46im / x_46re_m)) / x_46re_m))))
end if
code = tmp
end function
x.re_m = Math.abs(x_46_re);
public static double code(double x_46_re_m, double x_46_im) {
double tmp;
if (x_46_re_m <= 2.8e+57) {
tmp = x_46_im * ((x_46_re_m * (x_46_re_m * 3.0)) - (x_46_im * x_46_im));
} else {
tmp = x_46_re_m * (x_46_re_m * (x_46_im * (3.0 - ((x_46_im * (x_46_im / x_46_re_m)) / x_46_re_m))));
}
return tmp;
}
x.re_m = math.fabs(x_46_re) def code(x_46_re_m, x_46_im): tmp = 0 if x_46_re_m <= 2.8e+57: tmp = x_46_im * ((x_46_re_m * (x_46_re_m * 3.0)) - (x_46_im * x_46_im)) else: tmp = x_46_re_m * (x_46_re_m * (x_46_im * (3.0 - ((x_46_im * (x_46_im / x_46_re_m)) / x_46_re_m)))) return tmp
x.re_m = abs(x_46_re) function code(x_46_re_m, x_46_im) tmp = 0.0 if (x_46_re_m <= 2.8e+57) tmp = Float64(x_46_im * Float64(Float64(x_46_re_m * Float64(x_46_re_m * 3.0)) - Float64(x_46_im * x_46_im))); else tmp = Float64(x_46_re_m * Float64(x_46_re_m * Float64(x_46_im * Float64(3.0 - Float64(Float64(x_46_im * Float64(x_46_im / x_46_re_m)) / x_46_re_m))))); end return tmp end
x.re_m = abs(x_46_re); function tmp_2 = code(x_46_re_m, x_46_im) tmp = 0.0; if (x_46_re_m <= 2.8e+57) tmp = x_46_im * ((x_46_re_m * (x_46_re_m * 3.0)) - (x_46_im * x_46_im)); else tmp = x_46_re_m * (x_46_re_m * (x_46_im * (3.0 - ((x_46_im * (x_46_im / x_46_re_m)) / x_46_re_m)))); end tmp_2 = tmp; end
x.re_m = N[Abs[x$46$re], $MachinePrecision] code[x$46$re$95$m_, x$46$im_] := If[LessEqual[x$46$re$95$m, 2.8e+57], N[(x$46$im * N[(N[(x$46$re$95$m * N[(x$46$re$95$m * 3.0), $MachinePrecision]), $MachinePrecision] - N[(x$46$im * x$46$im), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x$46$re$95$m * N[(x$46$re$95$m * N[(x$46$im * N[(3.0 - N[(N[(x$46$im * N[(x$46$im / x$46$re$95$m), $MachinePrecision]), $MachinePrecision] / x$46$re$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
x.re_m = \left|x.re\right|
\\
\begin{array}{l}
\mathbf{if}\;x.re\_m \leq 2.8 \cdot 10^{+57}:\\
\;\;\;\;x.im \cdot \left(x.re\_m \cdot \left(x.re\_m \cdot 3\right) - x.im \cdot x.im\right)\\
\mathbf{else}:\\
\;\;\;\;x.re\_m \cdot \left(x.re\_m \cdot \left(x.im \cdot \left(3 - \frac{x.im \cdot \frac{x.im}{x.re\_m}}{x.re\_m}\right)\right)\right)\\
\end{array}
\end{array}
if x.re < 2.8e57Initial program 89.5%
+-commutativeN/A
*-commutativeN/A
distribute-lft-outN/A
associate-*l*N/A
*-commutativeN/A
distribute-lft-outN/A
*-lowering-*.f64N/A
associate-+r-N/A
--lowering--.f64N/A
distribute-rgt-outN/A
*-lowering-*.f64N/A
count-2N/A
distribute-lft1-inN/A
metadata-evalN/A
*-commutativeN/A
*-lowering-*.f64N/A
*-lowering-*.f6492.4%
Simplified92.4%
if 2.8e57 < x.re Initial program 69.0%
difference-of-squaresN/A
associate-*l*N/A
*-lowering-*.f64N/A
+-commutativeN/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
--lowering--.f6487.8%
Applied egg-rr87.8%
Taylor expanded in x.re around inf
+-commutativeN/A
+-commutativeN/A
associate-+r+N/A
associate-+l+N/A
+-commutativeN/A
Simplified78.8%
associate-*l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
--lowering--.f64N/A
associate-/r*N/A
/-lowering-/.f64N/A
associate-/l*N/A
*-lowering-*.f64N/A
/-lowering-/.f6499.8%
Applied egg-rr99.8%
Final simplification93.8%
x.re_m = (fabs.f64 x.re) (FPCore (x.re_m x.im) :precision binary64 (if (<= x.re_m 7.8e+153) (* x.im (- (* x.re_m (* x.re_m 3.0)) (* x.im x.im))) (* (* x.re_m x.im) (* x.re_m 3.0))))
x.re_m = fabs(x_46_re);
double code(double x_46_re_m, double x_46_im) {
double tmp;
if (x_46_re_m <= 7.8e+153) {
tmp = x_46_im * ((x_46_re_m * (x_46_re_m * 3.0)) - (x_46_im * x_46_im));
} else {
tmp = (x_46_re_m * x_46_im) * (x_46_re_m * 3.0);
}
return tmp;
}
x.re_m = abs(x_46re)
real(8) function code(x_46re_m, x_46im)
real(8), intent (in) :: x_46re_m
real(8), intent (in) :: x_46im
real(8) :: tmp
if (x_46re_m <= 7.8d+153) then
tmp = x_46im * ((x_46re_m * (x_46re_m * 3.0d0)) - (x_46im * x_46im))
else
tmp = (x_46re_m * x_46im) * (x_46re_m * 3.0d0)
end if
code = tmp
end function
x.re_m = Math.abs(x_46_re);
public static double code(double x_46_re_m, double x_46_im) {
double tmp;
if (x_46_re_m <= 7.8e+153) {
tmp = x_46_im * ((x_46_re_m * (x_46_re_m * 3.0)) - (x_46_im * x_46_im));
} else {
tmp = (x_46_re_m * x_46_im) * (x_46_re_m * 3.0);
}
return tmp;
}
x.re_m = math.fabs(x_46_re) def code(x_46_re_m, x_46_im): tmp = 0 if x_46_re_m <= 7.8e+153: tmp = x_46_im * ((x_46_re_m * (x_46_re_m * 3.0)) - (x_46_im * x_46_im)) else: tmp = (x_46_re_m * x_46_im) * (x_46_re_m * 3.0) return tmp
x.re_m = abs(x_46_re) function code(x_46_re_m, x_46_im) tmp = 0.0 if (x_46_re_m <= 7.8e+153) tmp = Float64(x_46_im * Float64(Float64(x_46_re_m * Float64(x_46_re_m * 3.0)) - Float64(x_46_im * x_46_im))); else tmp = Float64(Float64(x_46_re_m * x_46_im) * Float64(x_46_re_m * 3.0)); end return tmp end
x.re_m = abs(x_46_re); function tmp_2 = code(x_46_re_m, x_46_im) tmp = 0.0; if (x_46_re_m <= 7.8e+153) tmp = x_46_im * ((x_46_re_m * (x_46_re_m * 3.0)) - (x_46_im * x_46_im)); else tmp = (x_46_re_m * x_46_im) * (x_46_re_m * 3.0); end tmp_2 = tmp; end
x.re_m = N[Abs[x$46$re], $MachinePrecision] code[x$46$re$95$m_, x$46$im_] := If[LessEqual[x$46$re$95$m, 7.8e+153], N[(x$46$im * N[(N[(x$46$re$95$m * N[(x$46$re$95$m * 3.0), $MachinePrecision]), $MachinePrecision] - N[(x$46$im * x$46$im), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x$46$re$95$m * x$46$im), $MachinePrecision] * N[(x$46$re$95$m * 3.0), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
x.re_m = \left|x.re\right|
\\
\begin{array}{l}
\mathbf{if}\;x.re\_m \leq 7.8 \cdot 10^{+153}:\\
\;\;\;\;x.im \cdot \left(x.re\_m \cdot \left(x.re\_m \cdot 3\right) - x.im \cdot x.im\right)\\
\mathbf{else}:\\
\;\;\;\;\left(x.re\_m \cdot x.im\right) \cdot \left(x.re\_m \cdot 3\right)\\
\end{array}
\end{array}
if x.re < 7.79999999999999966e153Initial program 88.2%
+-commutativeN/A
*-commutativeN/A
distribute-lft-outN/A
associate-*l*N/A
*-commutativeN/A
distribute-lft-outN/A
*-lowering-*.f64N/A
associate-+r-N/A
--lowering--.f64N/A
distribute-rgt-outN/A
*-lowering-*.f64N/A
count-2N/A
distribute-lft1-inN/A
metadata-evalN/A
*-commutativeN/A
*-lowering-*.f64N/A
*-lowering-*.f6493.0%
Simplified93.0%
if 7.79999999999999966e153 < x.re Initial program 63.9%
+-commutativeN/A
*-commutativeN/A
distribute-lft-outN/A
associate-*l*N/A
*-commutativeN/A
distribute-lft-outN/A
*-lowering-*.f64N/A
associate-+r-N/A
--lowering--.f64N/A
distribute-rgt-outN/A
*-lowering-*.f64N/A
count-2N/A
distribute-lft1-inN/A
metadata-evalN/A
*-commutativeN/A
*-lowering-*.f64N/A
*-lowering-*.f6463.9%
Simplified63.9%
Taylor expanded in x.re around inf
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6470.8%
Simplified70.8%
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
associate-*l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f6496.4%
Applied egg-rr96.4%
Final simplification93.4%
x.re_m = (fabs.f64 x.re) (FPCore (x.re_m x.im) :precision binary64 (if (<= x.re_m 1e+28) (* x.im (* x.im (- 0.0 x.im))) (* x.re_m (* 3.0 (* x.re_m x.im)))))
x.re_m = fabs(x_46_re);
double code(double x_46_re_m, double x_46_im) {
double tmp;
if (x_46_re_m <= 1e+28) {
tmp = x_46_im * (x_46_im * (0.0 - x_46_im));
} else {
tmp = x_46_re_m * (3.0 * (x_46_re_m * x_46_im));
}
return tmp;
}
x.re_m = abs(x_46re)
real(8) function code(x_46re_m, x_46im)
real(8), intent (in) :: x_46re_m
real(8), intent (in) :: x_46im
real(8) :: tmp
if (x_46re_m <= 1d+28) then
tmp = x_46im * (x_46im * (0.0d0 - x_46im))
else
tmp = x_46re_m * (3.0d0 * (x_46re_m * x_46im))
end if
code = tmp
end function
x.re_m = Math.abs(x_46_re);
public static double code(double x_46_re_m, double x_46_im) {
double tmp;
if (x_46_re_m <= 1e+28) {
tmp = x_46_im * (x_46_im * (0.0 - x_46_im));
} else {
tmp = x_46_re_m * (3.0 * (x_46_re_m * x_46_im));
}
return tmp;
}
x.re_m = math.fabs(x_46_re) def code(x_46_re_m, x_46_im): tmp = 0 if x_46_re_m <= 1e+28: tmp = x_46_im * (x_46_im * (0.0 - x_46_im)) else: tmp = x_46_re_m * (3.0 * (x_46_re_m * x_46_im)) return tmp
x.re_m = abs(x_46_re) function code(x_46_re_m, x_46_im) tmp = 0.0 if (x_46_re_m <= 1e+28) tmp = Float64(x_46_im * Float64(x_46_im * Float64(0.0 - x_46_im))); else tmp = Float64(x_46_re_m * Float64(3.0 * Float64(x_46_re_m * x_46_im))); end return tmp end
x.re_m = abs(x_46_re); function tmp_2 = code(x_46_re_m, x_46_im) tmp = 0.0; if (x_46_re_m <= 1e+28) tmp = x_46_im * (x_46_im * (0.0 - x_46_im)); else tmp = x_46_re_m * (3.0 * (x_46_re_m * x_46_im)); end tmp_2 = tmp; end
x.re_m = N[Abs[x$46$re], $MachinePrecision] code[x$46$re$95$m_, x$46$im_] := If[LessEqual[x$46$re$95$m, 1e+28], N[(x$46$im * N[(x$46$im * N[(0.0 - x$46$im), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x$46$re$95$m * N[(3.0 * N[(x$46$re$95$m * x$46$im), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
x.re_m = \left|x.re\right|
\\
\begin{array}{l}
\mathbf{if}\;x.re\_m \leq 10^{+28}:\\
\;\;\;\;x.im \cdot \left(x.im \cdot \left(0 - x.im\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x.re\_m \cdot \left(3 \cdot \left(x.re\_m \cdot x.im\right)\right)\\
\end{array}
\end{array}
if x.re < 9.99999999999999958e27Initial program 89.2%
+-commutativeN/A
*-commutativeN/A
distribute-lft-outN/A
associate-*l*N/A
*-commutativeN/A
distribute-lft-outN/A
*-lowering-*.f64N/A
associate-+r-N/A
--lowering--.f64N/A
distribute-rgt-outN/A
*-lowering-*.f64N/A
count-2N/A
distribute-lft1-inN/A
metadata-evalN/A
*-commutativeN/A
*-lowering-*.f64N/A
*-lowering-*.f6492.2%
Simplified92.2%
Taylor expanded in x.im around inf
mul-1-negN/A
neg-sub0N/A
--lowering--.f64N/A
cube-multN/A
unpow2N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6471.1%
Simplified71.1%
sub0-negN/A
associate-*r*N/A
distribute-lft-neg-inN/A
*-lowering-*.f64N/A
neg-lowering-neg.f64N/A
*-lowering-*.f6471.1%
Applied egg-rr71.1%
if 9.99999999999999958e27 < x.re Initial program 71.3%
+-commutativeN/A
*-commutativeN/A
distribute-lft-outN/A
associate-*l*N/A
*-commutativeN/A
distribute-lft-outN/A
*-lowering-*.f64N/A
associate-+r-N/A
--lowering--.f64N/A
distribute-rgt-outN/A
*-lowering-*.f64N/A
count-2N/A
distribute-lft1-inN/A
metadata-evalN/A
*-commutativeN/A
*-lowering-*.f64N/A
*-lowering-*.f6480.4%
Simplified80.4%
Taylor expanded in x.im around 0
associate-*r*N/A
unpow2N/A
associate-*r*N/A
*-commutativeN/A
*-lowering-*.f64N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f6486.9%
Simplified86.9%
Final simplification74.5%
x.re_m = (fabs.f64 x.re) (FPCore (x.re_m x.im) :precision binary64 (if (<= x.re_m 1.3e+28) (* x.im (* x.im (- 0.0 x.im))) (* x.im (* 3.0 (* x.re_m x.re_m)))))
x.re_m = fabs(x_46_re);
double code(double x_46_re_m, double x_46_im) {
double tmp;
if (x_46_re_m <= 1.3e+28) {
tmp = x_46_im * (x_46_im * (0.0 - x_46_im));
} else {
tmp = x_46_im * (3.0 * (x_46_re_m * x_46_re_m));
}
return tmp;
}
x.re_m = abs(x_46re)
real(8) function code(x_46re_m, x_46im)
real(8), intent (in) :: x_46re_m
real(8), intent (in) :: x_46im
real(8) :: tmp
if (x_46re_m <= 1.3d+28) then
tmp = x_46im * (x_46im * (0.0d0 - x_46im))
else
tmp = x_46im * (3.0d0 * (x_46re_m * x_46re_m))
end if
code = tmp
end function
x.re_m = Math.abs(x_46_re);
public static double code(double x_46_re_m, double x_46_im) {
double tmp;
if (x_46_re_m <= 1.3e+28) {
tmp = x_46_im * (x_46_im * (0.0 - x_46_im));
} else {
tmp = x_46_im * (3.0 * (x_46_re_m * x_46_re_m));
}
return tmp;
}
x.re_m = math.fabs(x_46_re) def code(x_46_re_m, x_46_im): tmp = 0 if x_46_re_m <= 1.3e+28: tmp = x_46_im * (x_46_im * (0.0 - x_46_im)) else: tmp = x_46_im * (3.0 * (x_46_re_m * x_46_re_m)) return tmp
x.re_m = abs(x_46_re) function code(x_46_re_m, x_46_im) tmp = 0.0 if (x_46_re_m <= 1.3e+28) tmp = Float64(x_46_im * Float64(x_46_im * Float64(0.0 - x_46_im))); else tmp = Float64(x_46_im * Float64(3.0 * Float64(x_46_re_m * x_46_re_m))); end return tmp end
x.re_m = abs(x_46_re); function tmp_2 = code(x_46_re_m, x_46_im) tmp = 0.0; if (x_46_re_m <= 1.3e+28) tmp = x_46_im * (x_46_im * (0.0 - x_46_im)); else tmp = x_46_im * (3.0 * (x_46_re_m * x_46_re_m)); end tmp_2 = tmp; end
x.re_m = N[Abs[x$46$re], $MachinePrecision] code[x$46$re$95$m_, x$46$im_] := If[LessEqual[x$46$re$95$m, 1.3e+28], N[(x$46$im * N[(x$46$im * N[(0.0 - x$46$im), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x$46$im * N[(3.0 * N[(x$46$re$95$m * x$46$re$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
x.re_m = \left|x.re\right|
\\
\begin{array}{l}
\mathbf{if}\;x.re\_m \leq 1.3 \cdot 10^{+28}:\\
\;\;\;\;x.im \cdot \left(x.im \cdot \left(0 - x.im\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x.im \cdot \left(3 \cdot \left(x.re\_m \cdot x.re\_m\right)\right)\\
\end{array}
\end{array}
if x.re < 1.3000000000000001e28Initial program 89.2%
+-commutativeN/A
*-commutativeN/A
distribute-lft-outN/A
associate-*l*N/A
*-commutativeN/A
distribute-lft-outN/A
*-lowering-*.f64N/A
associate-+r-N/A
--lowering--.f64N/A
distribute-rgt-outN/A
*-lowering-*.f64N/A
count-2N/A
distribute-lft1-inN/A
metadata-evalN/A
*-commutativeN/A
*-lowering-*.f64N/A
*-lowering-*.f6492.2%
Simplified92.2%
Taylor expanded in x.im around inf
mul-1-negN/A
neg-sub0N/A
--lowering--.f64N/A
cube-multN/A
unpow2N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6471.1%
Simplified71.1%
sub0-negN/A
associate-*r*N/A
distribute-lft-neg-inN/A
*-lowering-*.f64N/A
neg-lowering-neg.f64N/A
*-lowering-*.f6471.1%
Applied egg-rr71.1%
if 1.3000000000000001e28 < x.re Initial program 71.3%
+-commutativeN/A
*-commutativeN/A
distribute-lft-outN/A
associate-*l*N/A
*-commutativeN/A
distribute-lft-outN/A
*-lowering-*.f64N/A
associate-+r-N/A
--lowering--.f64N/A
distribute-rgt-outN/A
*-lowering-*.f64N/A
count-2N/A
distribute-lft1-inN/A
metadata-evalN/A
*-commutativeN/A
*-lowering-*.f64N/A
*-lowering-*.f6480.4%
Simplified80.4%
Taylor expanded in x.re around inf
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6473.0%
Simplified73.0%
Final simplification71.5%
x.re_m = (fabs.f64 x.re) (FPCore (x.re_m x.im) :precision binary64 (* x.im (* x.im (- 0.0 x.im))))
x.re_m = fabs(x_46_re);
double code(double x_46_re_m, double x_46_im) {
return x_46_im * (x_46_im * (0.0 - x_46_im));
}
x.re_m = abs(x_46re)
real(8) function code(x_46re_m, x_46im)
real(8), intent (in) :: x_46re_m
real(8), intent (in) :: x_46im
code = x_46im * (x_46im * (0.0d0 - x_46im))
end function
x.re_m = Math.abs(x_46_re);
public static double code(double x_46_re_m, double x_46_im) {
return x_46_im * (x_46_im * (0.0 - x_46_im));
}
x.re_m = math.fabs(x_46_re) def code(x_46_re_m, x_46_im): return x_46_im * (x_46_im * (0.0 - x_46_im))
x.re_m = abs(x_46_re) function code(x_46_re_m, x_46_im) return Float64(x_46_im * Float64(x_46_im * Float64(0.0 - x_46_im))) end
x.re_m = abs(x_46_re); function tmp = code(x_46_re_m, x_46_im) tmp = x_46_im * (x_46_im * (0.0 - x_46_im)); end
x.re_m = N[Abs[x$46$re], $MachinePrecision] code[x$46$re$95$m_, x$46$im_] := N[(x$46$im * N[(x$46$im * N[(0.0 - x$46$im), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
x.re_m = \left|x.re\right|
\\
x.im \cdot \left(x.im \cdot \left(0 - x.im\right)\right)
\end{array}
Initial program 85.5%
+-commutativeN/A
*-commutativeN/A
distribute-lft-outN/A
associate-*l*N/A
*-commutativeN/A
distribute-lft-outN/A
*-lowering-*.f64N/A
associate-+r-N/A
--lowering--.f64N/A
distribute-rgt-outN/A
*-lowering-*.f64N/A
count-2N/A
distribute-lft1-inN/A
metadata-evalN/A
*-commutativeN/A
*-lowering-*.f64N/A
*-lowering-*.f6489.7%
Simplified89.7%
Taylor expanded in x.im around inf
mul-1-negN/A
neg-sub0N/A
--lowering--.f64N/A
cube-multN/A
unpow2N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6459.2%
Simplified59.2%
sub0-negN/A
associate-*r*N/A
distribute-lft-neg-inN/A
*-lowering-*.f64N/A
neg-lowering-neg.f64N/A
*-lowering-*.f6459.2%
Applied egg-rr59.2%
Final simplification59.2%
(FPCore (x.re x.im) :precision binary64 (+ (* (* x.re x.im) (* 2.0 x.re)) (* (* x.im (- x.re x.im)) (+ x.re x.im))))
double code(double x_46_re, double x_46_im) {
return ((x_46_re * x_46_im) * (2.0 * x_46_re)) + ((x_46_im * (x_46_re - x_46_im)) * (x_46_re + x_46_im));
}
real(8) function code(x_46re, x_46im)
real(8), intent (in) :: x_46re
real(8), intent (in) :: x_46im
code = ((x_46re * x_46im) * (2.0d0 * x_46re)) + ((x_46im * (x_46re - x_46im)) * (x_46re + x_46im))
end function
public static double code(double x_46_re, double x_46_im) {
return ((x_46_re * x_46_im) * (2.0 * x_46_re)) + ((x_46_im * (x_46_re - x_46_im)) * (x_46_re + x_46_im));
}
def code(x_46_re, x_46_im): return ((x_46_re * x_46_im) * (2.0 * x_46_re)) + ((x_46_im * (x_46_re - x_46_im)) * (x_46_re + x_46_im))
function code(x_46_re, x_46_im) return Float64(Float64(Float64(x_46_re * x_46_im) * Float64(2.0 * x_46_re)) + Float64(Float64(x_46_im * Float64(x_46_re - x_46_im)) * Float64(x_46_re + x_46_im))) end
function tmp = code(x_46_re, x_46_im) tmp = ((x_46_re * x_46_im) * (2.0 * x_46_re)) + ((x_46_im * (x_46_re - x_46_im)) * (x_46_re + x_46_im)); end
code[x$46$re_, x$46$im_] := N[(N[(N[(x$46$re * x$46$im), $MachinePrecision] * N[(2.0 * x$46$re), $MachinePrecision]), $MachinePrecision] + N[(N[(x$46$im * N[(x$46$re - x$46$im), $MachinePrecision]), $MachinePrecision] * N[(x$46$re + x$46$im), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(x.re \cdot x.im\right) \cdot \left(2 \cdot x.re\right) + \left(x.im \cdot \left(x.re - x.im\right)\right) \cdot \left(x.re + x.im\right)
\end{array}
herbie shell --seed 2024160
(FPCore (x.re x.im)
:name "math.cube on complex, imaginary part"
:precision binary64
:alt
(! :herbie-platform default (+ (* (* x.re x.im) (* 2 x.re)) (* (* x.im (- x.re x.im)) (+ x.re x.im))))
(+ (* (- (* x.re x.re) (* x.im x.im)) x.im) (* (+ (* x.re x.im) (* x.im x.re)) x.re)))