
(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 12 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}
(FPCore (x.re x.im) :precision binary64 (if (or (<= x.im -5e+102) (not (<= x.im 1e+60))) (* x.im (* (- x.re x.im) (+ x.im x.re))) (- (* (* x.re 3.0) (* x.im x.re)) (pow x.im 3.0))))
double code(double x_46_re, double x_46_im) {
double tmp;
if ((x_46_im <= -5e+102) || !(x_46_im <= 1e+60)) {
tmp = x_46_im * ((x_46_re - x_46_im) * (x_46_im + x_46_re));
} else {
tmp = ((x_46_re * 3.0) * (x_46_im * x_46_re)) - pow(x_46_im, 3.0);
}
return tmp;
}
real(8) function code(x_46re, x_46im)
real(8), intent (in) :: x_46re
real(8), intent (in) :: x_46im
real(8) :: tmp
if ((x_46im <= (-5d+102)) .or. (.not. (x_46im <= 1d+60))) then
tmp = x_46im * ((x_46re - x_46im) * (x_46im + x_46re))
else
tmp = ((x_46re * 3.0d0) * (x_46im * x_46re)) - (x_46im ** 3.0d0)
end if
code = tmp
end function
public static double code(double x_46_re, double x_46_im) {
double tmp;
if ((x_46_im <= -5e+102) || !(x_46_im <= 1e+60)) {
tmp = x_46_im * ((x_46_re - x_46_im) * (x_46_im + x_46_re));
} else {
tmp = ((x_46_re * 3.0) * (x_46_im * x_46_re)) - Math.pow(x_46_im, 3.0);
}
return tmp;
}
def code(x_46_re, x_46_im): tmp = 0 if (x_46_im <= -5e+102) or not (x_46_im <= 1e+60): tmp = x_46_im * ((x_46_re - x_46_im) * (x_46_im + x_46_re)) else: tmp = ((x_46_re * 3.0) * (x_46_im * x_46_re)) - math.pow(x_46_im, 3.0) return tmp
function code(x_46_re, x_46_im) tmp = 0.0 if ((x_46_im <= -5e+102) || !(x_46_im <= 1e+60)) tmp = Float64(x_46_im * Float64(Float64(x_46_re - x_46_im) * Float64(x_46_im + x_46_re))); else tmp = Float64(Float64(Float64(x_46_re * 3.0) * Float64(x_46_im * x_46_re)) - (x_46_im ^ 3.0)); end return tmp end
function tmp_2 = code(x_46_re, x_46_im) tmp = 0.0; if ((x_46_im <= -5e+102) || ~((x_46_im <= 1e+60))) tmp = x_46_im * ((x_46_re - x_46_im) * (x_46_im + x_46_re)); else tmp = ((x_46_re * 3.0) * (x_46_im * x_46_re)) - (x_46_im ^ 3.0); end tmp_2 = tmp; end
code[x$46$re_, x$46$im_] := If[Or[LessEqual[x$46$im, -5e+102], N[Not[LessEqual[x$46$im, 1e+60]], $MachinePrecision]], N[(x$46$im * N[(N[(x$46$re - x$46$im), $MachinePrecision] * N[(x$46$im + x$46$re), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(x$46$re * 3.0), $MachinePrecision] * N[(x$46$im * x$46$re), $MachinePrecision]), $MachinePrecision] - N[Power[x$46$im, 3.0], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x.im \leq -5 \cdot 10^{+102} \lor \neg \left(x.im \leq 10^{+60}\right):\\
\;\;\;\;x.im \cdot \left(\left(x.re - x.im\right) \cdot \left(x.im + x.re\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\left(x.re \cdot 3\right) \cdot \left(x.im \cdot x.re\right) - {x.im}^{3}\\
\end{array}
\end{array}
if x.im < -5e102 or 9.9999999999999995e59 < x.im Initial program 70.7%
*-commutative70.7%
*-commutative70.7%
flip-+0.0%
+-inverses0.0%
+-inverses0.0%
+-inverses0.0%
+-inverses0.0%
flip-+78.3%
distribute-lft-in78.3%
Applied egg-rr78.3%
+-commutative78.3%
add-cube-cbrt78.3%
fma-def78.3%
Applied egg-rr0.0%
Simplified84.8%
difference-of-squares100.0%
*-commutative100.0%
Applied egg-rr100.0%
if -5e102 < x.im < 9.9999999999999995e59Initial program 88.4%
+-commutative88.4%
*-commutative88.4%
sub-neg88.4%
distribute-lft-in88.4%
associate-+r+88.4%
distribute-rgt-neg-out88.4%
unsub-neg88.4%
associate-*r*99.7%
distribute-rgt-out99.7%
*-commutative99.7%
count-299.7%
distribute-lft1-in99.7%
metadata-eval99.7%
*-commutative99.7%
*-commutative99.7%
associate-*r*99.7%
cube-unmult99.8%
Simplified99.8%
Taylor expanded in x.re around 0 99.8%
sub-neg99.8%
*-commutative99.8%
*-commutative99.8%
associate-*l*99.8%
Applied egg-rr99.8%
Simplified99.8%
Final simplification99.9%
(FPCore (x.re x.im) :precision binary64 (if (or (<= x.im -5e+102) (not (<= x.im 2e+60))) (* x.im (* (- x.re x.im) (+ x.im x.re))) (- (* x.re (* 3.0 (* x.im x.re))) (pow x.im 3.0))))
double code(double x_46_re, double x_46_im) {
double tmp;
if ((x_46_im <= -5e+102) || !(x_46_im <= 2e+60)) {
tmp = x_46_im * ((x_46_re - x_46_im) * (x_46_im + x_46_re));
} else {
tmp = (x_46_re * (3.0 * (x_46_im * x_46_re))) - pow(x_46_im, 3.0);
}
return tmp;
}
real(8) function code(x_46re, x_46im)
real(8), intent (in) :: x_46re
real(8), intent (in) :: x_46im
real(8) :: tmp
if ((x_46im <= (-5d+102)) .or. (.not. (x_46im <= 2d+60))) then
tmp = x_46im * ((x_46re - x_46im) * (x_46im + x_46re))
else
tmp = (x_46re * (3.0d0 * (x_46im * x_46re))) - (x_46im ** 3.0d0)
end if
code = tmp
end function
public static double code(double x_46_re, double x_46_im) {
double tmp;
if ((x_46_im <= -5e+102) || !(x_46_im <= 2e+60)) {
tmp = x_46_im * ((x_46_re - x_46_im) * (x_46_im + x_46_re));
} else {
tmp = (x_46_re * (3.0 * (x_46_im * x_46_re))) - Math.pow(x_46_im, 3.0);
}
return tmp;
}
def code(x_46_re, x_46_im): tmp = 0 if (x_46_im <= -5e+102) or not (x_46_im <= 2e+60): tmp = x_46_im * ((x_46_re - x_46_im) * (x_46_im + x_46_re)) else: tmp = (x_46_re * (3.0 * (x_46_im * x_46_re))) - math.pow(x_46_im, 3.0) return tmp
function code(x_46_re, x_46_im) tmp = 0.0 if ((x_46_im <= -5e+102) || !(x_46_im <= 2e+60)) tmp = Float64(x_46_im * Float64(Float64(x_46_re - x_46_im) * Float64(x_46_im + x_46_re))); else tmp = Float64(Float64(x_46_re * Float64(3.0 * Float64(x_46_im * x_46_re))) - (x_46_im ^ 3.0)); end return tmp end
function tmp_2 = code(x_46_re, x_46_im) tmp = 0.0; if ((x_46_im <= -5e+102) || ~((x_46_im <= 2e+60))) tmp = x_46_im * ((x_46_re - x_46_im) * (x_46_im + x_46_re)); else tmp = (x_46_re * (3.0 * (x_46_im * x_46_re))) - (x_46_im ^ 3.0); end tmp_2 = tmp; end
code[x$46$re_, x$46$im_] := If[Or[LessEqual[x$46$im, -5e+102], N[Not[LessEqual[x$46$im, 2e+60]], $MachinePrecision]], N[(x$46$im * N[(N[(x$46$re - x$46$im), $MachinePrecision] * N[(x$46$im + x$46$re), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x$46$re * N[(3.0 * N[(x$46$im * x$46$re), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[Power[x$46$im, 3.0], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x.im \leq -5 \cdot 10^{+102} \lor \neg \left(x.im \leq 2 \cdot 10^{+60}\right):\\
\;\;\;\;x.im \cdot \left(\left(x.re - x.im\right) \cdot \left(x.im + x.re\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x.re \cdot \left(3 \cdot \left(x.im \cdot x.re\right)\right) - {x.im}^{3}\\
\end{array}
\end{array}
if x.im < -5e102 or 1.9999999999999999e60 < x.im Initial program 70.7%
*-commutative70.7%
*-commutative70.7%
flip-+0.0%
+-inverses0.0%
+-inverses0.0%
+-inverses0.0%
+-inverses0.0%
flip-+78.3%
distribute-lft-in78.3%
Applied egg-rr78.3%
+-commutative78.3%
add-cube-cbrt78.3%
fma-def78.3%
Applied egg-rr0.0%
Simplified84.8%
difference-of-squares100.0%
*-commutative100.0%
Applied egg-rr100.0%
if -5e102 < x.im < 1.9999999999999999e60Initial program 88.4%
+-commutative88.4%
*-commutative88.4%
sub-neg88.4%
distribute-lft-in88.4%
associate-+r+88.4%
distribute-rgt-neg-out88.4%
unsub-neg88.4%
associate-*r*99.7%
distribute-rgt-out99.7%
*-commutative99.7%
count-299.7%
distribute-lft1-in99.7%
metadata-eval99.7%
*-commutative99.7%
*-commutative99.7%
associate-*r*99.7%
cube-unmult99.8%
Simplified99.8%
Taylor expanded in x.re around 0 99.8%
Final simplification99.9%
(FPCore (x.re x.im) :precision binary64 (if (or (<= x.im -5e+102) (not (<= x.im 2.1e+60))) (* x.im (* (- x.re x.im) (+ x.im x.re))) (- (* x.re (* x.re (* x.im 3.0))) (pow x.im 3.0))))
double code(double x_46_re, double x_46_im) {
double tmp;
if ((x_46_im <= -5e+102) || !(x_46_im <= 2.1e+60)) {
tmp = x_46_im * ((x_46_re - x_46_im) * (x_46_im + x_46_re));
} else {
tmp = (x_46_re * (x_46_re * (x_46_im * 3.0))) - pow(x_46_im, 3.0);
}
return tmp;
}
real(8) function code(x_46re, x_46im)
real(8), intent (in) :: x_46re
real(8), intent (in) :: x_46im
real(8) :: tmp
if ((x_46im <= (-5d+102)) .or. (.not. (x_46im <= 2.1d+60))) then
tmp = x_46im * ((x_46re - x_46im) * (x_46im + x_46re))
else
tmp = (x_46re * (x_46re * (x_46im * 3.0d0))) - (x_46im ** 3.0d0)
end if
code = tmp
end function
public static double code(double x_46_re, double x_46_im) {
double tmp;
if ((x_46_im <= -5e+102) || !(x_46_im <= 2.1e+60)) {
tmp = x_46_im * ((x_46_re - x_46_im) * (x_46_im + x_46_re));
} else {
tmp = (x_46_re * (x_46_re * (x_46_im * 3.0))) - Math.pow(x_46_im, 3.0);
}
return tmp;
}
def code(x_46_re, x_46_im): tmp = 0 if (x_46_im <= -5e+102) or not (x_46_im <= 2.1e+60): tmp = x_46_im * ((x_46_re - x_46_im) * (x_46_im + x_46_re)) else: tmp = (x_46_re * (x_46_re * (x_46_im * 3.0))) - math.pow(x_46_im, 3.0) return tmp
function code(x_46_re, x_46_im) tmp = 0.0 if ((x_46_im <= -5e+102) || !(x_46_im <= 2.1e+60)) tmp = Float64(x_46_im * Float64(Float64(x_46_re - x_46_im) * Float64(x_46_im + x_46_re))); else tmp = Float64(Float64(x_46_re * Float64(x_46_re * Float64(x_46_im * 3.0))) - (x_46_im ^ 3.0)); end return tmp end
function tmp_2 = code(x_46_re, x_46_im) tmp = 0.0; if ((x_46_im <= -5e+102) || ~((x_46_im <= 2.1e+60))) tmp = x_46_im * ((x_46_re - x_46_im) * (x_46_im + x_46_re)); else tmp = (x_46_re * (x_46_re * (x_46_im * 3.0))) - (x_46_im ^ 3.0); end tmp_2 = tmp; end
code[x$46$re_, x$46$im_] := If[Or[LessEqual[x$46$im, -5e+102], N[Not[LessEqual[x$46$im, 2.1e+60]], $MachinePrecision]], N[(x$46$im * N[(N[(x$46$re - x$46$im), $MachinePrecision] * N[(x$46$im + x$46$re), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x$46$re * N[(x$46$re * N[(x$46$im * 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[Power[x$46$im, 3.0], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x.im \leq -5 \cdot 10^{+102} \lor \neg \left(x.im \leq 2.1 \cdot 10^{+60}\right):\\
\;\;\;\;x.im \cdot \left(\left(x.re - x.im\right) \cdot \left(x.im + x.re\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x.re \cdot \left(x.re \cdot \left(x.im \cdot 3\right)\right) - {x.im}^{3}\\
\end{array}
\end{array}
if x.im < -5e102 or 2.1000000000000001e60 < x.im Initial program 70.7%
*-commutative70.7%
*-commutative70.7%
flip-+0.0%
+-inverses0.0%
+-inverses0.0%
+-inverses0.0%
+-inverses0.0%
flip-+78.3%
distribute-lft-in78.3%
Applied egg-rr78.3%
+-commutative78.3%
add-cube-cbrt78.3%
fma-def78.3%
Applied egg-rr0.0%
Simplified84.8%
difference-of-squares100.0%
*-commutative100.0%
Applied egg-rr100.0%
if -5e102 < x.im < 2.1000000000000001e60Initial program 88.4%
+-commutative88.4%
*-commutative88.4%
sub-neg88.4%
distribute-lft-in88.4%
associate-+r+88.4%
distribute-rgt-neg-out88.4%
unsub-neg88.4%
associate-*r*99.7%
distribute-rgt-out99.7%
*-commutative99.7%
count-299.7%
distribute-lft1-in99.7%
metadata-eval99.7%
*-commutative99.7%
*-commutative99.7%
associate-*r*99.7%
cube-unmult99.8%
Simplified99.8%
Final simplification99.9%
(FPCore (x.re x.im) :precision binary64 (if (<= x.re 7.4e+146) (* x.im (- (* 3.0 (* x.re x.re)) (* x.im x.im))) (* (* x.re 3.0) (* x.im x.re))))
double code(double x_46_re, double x_46_im) {
double tmp;
if (x_46_re <= 7.4e+146) {
tmp = x_46_im * ((3.0 * (x_46_re * x_46_re)) - (x_46_im * x_46_im));
} else {
tmp = (x_46_re * 3.0) * (x_46_im * x_46_re);
}
return tmp;
}
real(8) function code(x_46re, x_46im)
real(8), intent (in) :: x_46re
real(8), intent (in) :: x_46im
real(8) :: tmp
if (x_46re <= 7.4d+146) then
tmp = x_46im * ((3.0d0 * (x_46re * x_46re)) - (x_46im * x_46im))
else
tmp = (x_46re * 3.0d0) * (x_46im * x_46re)
end if
code = tmp
end function
public static double code(double x_46_re, double x_46_im) {
double tmp;
if (x_46_re <= 7.4e+146) {
tmp = x_46_im * ((3.0 * (x_46_re * x_46_re)) - (x_46_im * x_46_im));
} else {
tmp = (x_46_re * 3.0) * (x_46_im * x_46_re);
}
return tmp;
}
def code(x_46_re, x_46_im): tmp = 0 if x_46_re <= 7.4e+146: tmp = x_46_im * ((3.0 * (x_46_re * x_46_re)) - (x_46_im * x_46_im)) else: tmp = (x_46_re * 3.0) * (x_46_im * x_46_re) return tmp
function code(x_46_re, x_46_im) tmp = 0.0 if (x_46_re <= 7.4e+146) tmp = Float64(x_46_im * Float64(Float64(3.0 * Float64(x_46_re * x_46_re)) - Float64(x_46_im * x_46_im))); else tmp = Float64(Float64(x_46_re * 3.0) * Float64(x_46_im * x_46_re)); end return tmp end
function tmp_2 = code(x_46_re, x_46_im) tmp = 0.0; if (x_46_re <= 7.4e+146) tmp = x_46_im * ((3.0 * (x_46_re * x_46_re)) - (x_46_im * x_46_im)); else tmp = (x_46_re * 3.0) * (x_46_im * x_46_re); end tmp_2 = tmp; end
code[x$46$re_, x$46$im_] := If[LessEqual[x$46$re, 7.4e+146], N[(x$46$im * N[(N[(3.0 * N[(x$46$re * x$46$re), $MachinePrecision]), $MachinePrecision] - N[(x$46$im * x$46$im), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x$46$re * 3.0), $MachinePrecision] * N[(x$46$im * x$46$re), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x.re \leq 7.4 \cdot 10^{+146}:\\
\;\;\;\;x.im \cdot \left(3 \cdot \left(x.re \cdot x.re\right) - x.im \cdot x.im\right)\\
\mathbf{else}:\\
\;\;\;\;\left(x.re \cdot 3\right) \cdot \left(x.im \cdot x.re\right)\\
\end{array}
\end{array}
if x.re < 7.40000000000000009e146Initial program 87.3%
+-commutative87.3%
*-commutative87.3%
sub-neg87.3%
distribute-lft-in85.0%
associate-+r+85.0%
distribute-rgt-neg-out85.0%
unsub-neg85.0%
associate-*r*88.4%
distribute-rgt-out88.4%
*-commutative88.4%
count-288.4%
distribute-lft1-in88.4%
metadata-eval88.4%
*-commutative88.4%
*-commutative88.4%
associate-*r*88.4%
cube-unmult88.4%
Simplified88.4%
Taylor expanded in x.re around 0 88.4%
sub-neg88.4%
*-commutative88.4%
*-commutative88.4%
associate-*l*88.5%
Applied egg-rr88.5%
Simplified88.5%
associate-*l*85.1%
cube-mult85.0%
distribute-lft-out--93.2%
*-commutative93.2%
associate-*r*93.2%
Applied egg-rr93.2%
if 7.40000000000000009e146 < x.re Initial program 51.0%
+-commutative51.0%
*-commutative51.0%
sub-neg51.0%
distribute-lft-in42.9%
associate-+r+42.9%
distribute-rgt-neg-out42.9%
unsub-neg42.9%
associate-*r*72.8%
distribute-rgt-out72.9%
*-commutative72.9%
count-272.9%
distribute-lft1-in72.9%
metadata-eval72.9%
*-commutative72.9%
*-commutative72.9%
associate-*r*72.9%
cube-unmult72.9%
Simplified72.9%
Taylor expanded in x.re around 0 72.9%
sub-neg72.9%
*-commutative72.9%
*-commutative72.9%
associate-*l*72.8%
Applied egg-rr72.8%
Simplified72.8%
Taylor expanded in x.im around 0 64.5%
unpow264.5%
associate-*r*64.5%
*-commutative64.5%
associate-*l*64.5%
associate-*r*94.6%
*-commutative94.6%
associate-*l*94.5%
Simplified94.5%
expm1-log1p-u44.2%
expm1-udef44.2%
*-commutative44.2%
*-commutative44.2%
associate-*l*44.2%
Applied egg-rr44.2%
Simplified94.5%
Final simplification93.4%
(FPCore (x.re x.im) :precision binary64 (if (<= x.re 1.4e+23) (* x.im (* x.im (- x.im))) (* 3.0 (* x.im (* x.re x.re)))))
double code(double x_46_re, double x_46_im) {
double tmp;
if (x_46_re <= 1.4e+23) {
tmp = x_46_im * (x_46_im * -x_46_im);
} else {
tmp = 3.0 * (x_46_im * (x_46_re * x_46_re));
}
return tmp;
}
real(8) function code(x_46re, x_46im)
real(8), intent (in) :: x_46re
real(8), intent (in) :: x_46im
real(8) :: tmp
if (x_46re <= 1.4d+23) then
tmp = x_46im * (x_46im * -x_46im)
else
tmp = 3.0d0 * (x_46im * (x_46re * x_46re))
end if
code = tmp
end function
public static double code(double x_46_re, double x_46_im) {
double tmp;
if (x_46_re <= 1.4e+23) {
tmp = x_46_im * (x_46_im * -x_46_im);
} else {
tmp = 3.0 * (x_46_im * (x_46_re * x_46_re));
}
return tmp;
}
def code(x_46_re, x_46_im): tmp = 0 if x_46_re <= 1.4e+23: tmp = x_46_im * (x_46_im * -x_46_im) else: tmp = 3.0 * (x_46_im * (x_46_re * x_46_re)) return tmp
function code(x_46_re, x_46_im) tmp = 0.0 if (x_46_re <= 1.4e+23) tmp = Float64(x_46_im * Float64(x_46_im * Float64(-x_46_im))); else tmp = Float64(3.0 * Float64(x_46_im * Float64(x_46_re * x_46_re))); end return tmp end
function tmp_2 = code(x_46_re, x_46_im) tmp = 0.0; if (x_46_re <= 1.4e+23) tmp = x_46_im * (x_46_im * -x_46_im); else tmp = 3.0 * (x_46_im * (x_46_re * x_46_re)); end tmp_2 = tmp; end
code[x$46$re_, x$46$im_] := If[LessEqual[x$46$re, 1.4e+23], N[(x$46$im * N[(x$46$im * (-x$46$im)), $MachinePrecision]), $MachinePrecision], N[(3.0 * N[(x$46$im * N[(x$46$re * x$46$re), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x.re \leq 1.4 \cdot 10^{+23}:\\
\;\;\;\;x.im \cdot \left(x.im \cdot \left(-x.im\right)\right)\\
\mathbf{else}:\\
\;\;\;\;3 \cdot \left(x.im \cdot \left(x.re \cdot x.re\right)\right)\\
\end{array}
\end{array}
if x.re < 1.4e23Initial program 88.3%
+-commutative88.3%
*-commutative88.3%
sub-neg88.3%
distribute-lft-in85.7%
associate-+r+85.8%
distribute-rgt-neg-out85.8%
unsub-neg85.8%
associate-*r*89.6%
distribute-rgt-out89.5%
*-commutative89.5%
count-289.5%
distribute-lft1-in89.5%
metadata-eval89.5%
*-commutative89.5%
*-commutative89.5%
associate-*r*89.6%
cube-unmult89.6%
Simplified89.6%
Taylor expanded in x.re around 0 89.6%
sub-neg89.6%
*-commutative89.6%
*-commutative89.6%
associate-*l*89.6%
Applied egg-rr89.6%
Simplified89.6%
associate-*l*85.8%
cube-mult85.7%
distribute-lft-out--92.4%
*-commutative92.4%
associate-*r*92.4%
Applied egg-rr92.4%
Taylor expanded in x.re around 0 70.4%
unpow270.4%
mul-1-neg70.4%
distribute-rgt-neg-out70.4%
Simplified70.4%
if 1.4e23 < x.re Initial program 61.9%
+-commutative61.9%
*-commutative61.9%
sub-neg61.9%
distribute-lft-in57.0%
associate-+r+57.0%
distribute-rgt-neg-out57.0%
unsub-neg57.0%
associate-*r*75.2%
distribute-rgt-out75.2%
*-commutative75.2%
count-275.2%
distribute-lft1-in75.2%
metadata-eval75.2%
*-commutative75.2%
*-commutative75.2%
associate-*r*75.2%
cube-unmult75.2%
Simplified75.2%
Taylor expanded in x.re around 0 75.2%
sub-neg75.2%
*-commutative75.2%
*-commutative75.2%
associate-*l*75.2%
Applied egg-rr75.2%
Simplified75.2%
Taylor expanded in x.im around 0 68.5%
unpow268.5%
*-commutative68.5%
Simplified68.5%
Final simplification69.9%
(FPCore (x.re x.im) :precision binary64 (if (<= x.re 7e+21) (* x.im (* x.im (- x.im))) (* 3.0 (* x.re (* x.im x.re)))))
double code(double x_46_re, double x_46_im) {
double tmp;
if (x_46_re <= 7e+21) {
tmp = x_46_im * (x_46_im * -x_46_im);
} else {
tmp = 3.0 * (x_46_re * (x_46_im * x_46_re));
}
return tmp;
}
real(8) function code(x_46re, x_46im)
real(8), intent (in) :: x_46re
real(8), intent (in) :: x_46im
real(8) :: tmp
if (x_46re <= 7d+21) then
tmp = x_46im * (x_46im * -x_46im)
else
tmp = 3.0d0 * (x_46re * (x_46im * x_46re))
end if
code = tmp
end function
public static double code(double x_46_re, double x_46_im) {
double tmp;
if (x_46_re <= 7e+21) {
tmp = x_46_im * (x_46_im * -x_46_im);
} else {
tmp = 3.0 * (x_46_re * (x_46_im * x_46_re));
}
return tmp;
}
def code(x_46_re, x_46_im): tmp = 0 if x_46_re <= 7e+21: tmp = x_46_im * (x_46_im * -x_46_im) else: tmp = 3.0 * (x_46_re * (x_46_im * x_46_re)) return tmp
function code(x_46_re, x_46_im) tmp = 0.0 if (x_46_re <= 7e+21) tmp = Float64(x_46_im * Float64(x_46_im * Float64(-x_46_im))); else tmp = Float64(3.0 * Float64(x_46_re * Float64(x_46_im * x_46_re))); end return tmp end
function tmp_2 = code(x_46_re, x_46_im) tmp = 0.0; if (x_46_re <= 7e+21) tmp = x_46_im * (x_46_im * -x_46_im); else tmp = 3.0 * (x_46_re * (x_46_im * x_46_re)); end tmp_2 = tmp; end
code[x$46$re_, x$46$im_] := If[LessEqual[x$46$re, 7e+21], N[(x$46$im * N[(x$46$im * (-x$46$im)), $MachinePrecision]), $MachinePrecision], N[(3.0 * N[(x$46$re * N[(x$46$im * x$46$re), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x.re \leq 7 \cdot 10^{+21}:\\
\;\;\;\;x.im \cdot \left(x.im \cdot \left(-x.im\right)\right)\\
\mathbf{else}:\\
\;\;\;\;3 \cdot \left(x.re \cdot \left(x.im \cdot x.re\right)\right)\\
\end{array}
\end{array}
if x.re < 7e21Initial program 88.3%
+-commutative88.3%
*-commutative88.3%
sub-neg88.3%
distribute-lft-in85.7%
associate-+r+85.8%
distribute-rgt-neg-out85.8%
unsub-neg85.8%
associate-*r*89.6%
distribute-rgt-out89.5%
*-commutative89.5%
count-289.5%
distribute-lft1-in89.5%
metadata-eval89.5%
*-commutative89.5%
*-commutative89.5%
associate-*r*89.6%
cube-unmult89.6%
Simplified89.6%
Taylor expanded in x.re around 0 89.6%
sub-neg89.6%
*-commutative89.6%
*-commutative89.6%
associate-*l*89.6%
Applied egg-rr89.6%
Simplified89.6%
associate-*l*85.8%
cube-mult85.7%
distribute-lft-out--92.4%
*-commutative92.4%
associate-*r*92.4%
Applied egg-rr92.4%
Taylor expanded in x.re around 0 70.4%
unpow270.4%
mul-1-neg70.4%
distribute-rgt-neg-out70.4%
Simplified70.4%
if 7e21 < x.re Initial program 61.9%
+-commutative61.9%
*-commutative61.9%
sub-neg61.9%
distribute-lft-in57.0%
associate-+r+57.0%
distribute-rgt-neg-out57.0%
unsub-neg57.0%
associate-*r*75.2%
distribute-rgt-out75.2%
*-commutative75.2%
count-275.2%
distribute-lft1-in75.2%
metadata-eval75.2%
*-commutative75.2%
*-commutative75.2%
associate-*r*75.2%
cube-unmult75.2%
Simplified75.2%
Taylor expanded in x.re around 0 75.2%
sub-neg75.2%
*-commutative75.2%
*-commutative75.2%
associate-*l*75.2%
Applied egg-rr75.2%
Simplified75.2%
associate-*l*57.0%
cube-mult57.0%
distribute-lft-out--70.1%
*-commutative70.1%
associate-*r*70.1%
Applied egg-rr70.1%
Taylor expanded in x.im around 0 68.5%
unpow268.5%
*-commutative68.5%
associate-*r*86.6%
*-commutative86.6%
*-commutative86.6%
Simplified86.6%
Final simplification74.2%
(FPCore (x.re x.im) :precision binary64 (if (<= x.re 1.22e+23) (* x.im (* x.im (- x.im))) (* x.re (* 3.0 (* x.im x.re)))))
double code(double x_46_re, double x_46_im) {
double tmp;
if (x_46_re <= 1.22e+23) {
tmp = x_46_im * (x_46_im * -x_46_im);
} else {
tmp = x_46_re * (3.0 * (x_46_im * x_46_re));
}
return tmp;
}
real(8) function code(x_46re, x_46im)
real(8), intent (in) :: x_46re
real(8), intent (in) :: x_46im
real(8) :: tmp
if (x_46re <= 1.22d+23) then
tmp = x_46im * (x_46im * -x_46im)
else
tmp = x_46re * (3.0d0 * (x_46im * x_46re))
end if
code = tmp
end function
public static double code(double x_46_re, double x_46_im) {
double tmp;
if (x_46_re <= 1.22e+23) {
tmp = x_46_im * (x_46_im * -x_46_im);
} else {
tmp = x_46_re * (3.0 * (x_46_im * x_46_re));
}
return tmp;
}
def code(x_46_re, x_46_im): tmp = 0 if x_46_re <= 1.22e+23: tmp = x_46_im * (x_46_im * -x_46_im) else: tmp = x_46_re * (3.0 * (x_46_im * x_46_re)) return tmp
function code(x_46_re, x_46_im) tmp = 0.0 if (x_46_re <= 1.22e+23) tmp = Float64(x_46_im * Float64(x_46_im * Float64(-x_46_im))); else tmp = Float64(x_46_re * Float64(3.0 * Float64(x_46_im * x_46_re))); end return tmp end
function tmp_2 = code(x_46_re, x_46_im) tmp = 0.0; if (x_46_re <= 1.22e+23) tmp = x_46_im * (x_46_im * -x_46_im); else tmp = x_46_re * (3.0 * (x_46_im * x_46_re)); end tmp_2 = tmp; end
code[x$46$re_, x$46$im_] := If[LessEqual[x$46$re, 1.22e+23], N[(x$46$im * N[(x$46$im * (-x$46$im)), $MachinePrecision]), $MachinePrecision], N[(x$46$re * N[(3.0 * N[(x$46$im * x$46$re), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x.re \leq 1.22 \cdot 10^{+23}:\\
\;\;\;\;x.im \cdot \left(x.im \cdot \left(-x.im\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x.re \cdot \left(3 \cdot \left(x.im \cdot x.re\right)\right)\\
\end{array}
\end{array}
if x.re < 1.22e23Initial program 88.3%
+-commutative88.3%
*-commutative88.3%
sub-neg88.3%
distribute-lft-in85.7%
associate-+r+85.8%
distribute-rgt-neg-out85.8%
unsub-neg85.8%
associate-*r*89.6%
distribute-rgt-out89.5%
*-commutative89.5%
count-289.5%
distribute-lft1-in89.5%
metadata-eval89.5%
*-commutative89.5%
*-commutative89.5%
associate-*r*89.6%
cube-unmult89.6%
Simplified89.6%
Taylor expanded in x.re around 0 89.6%
sub-neg89.6%
*-commutative89.6%
*-commutative89.6%
associate-*l*89.6%
Applied egg-rr89.6%
Simplified89.6%
associate-*l*85.8%
cube-mult85.7%
distribute-lft-out--92.4%
*-commutative92.4%
associate-*r*92.4%
Applied egg-rr92.4%
Taylor expanded in x.re around 0 70.4%
unpow270.4%
mul-1-neg70.4%
distribute-rgt-neg-out70.4%
Simplified70.4%
if 1.22e23 < x.re Initial program 61.9%
+-commutative61.9%
*-commutative61.9%
sub-neg61.9%
distribute-lft-in57.0%
associate-+r+57.0%
distribute-rgt-neg-out57.0%
unsub-neg57.0%
associate-*r*75.2%
distribute-rgt-out75.2%
*-commutative75.2%
count-275.2%
distribute-lft1-in75.2%
metadata-eval75.2%
*-commutative75.2%
*-commutative75.2%
associate-*r*75.2%
cube-unmult75.2%
Simplified75.2%
Taylor expanded in x.re around 0 75.2%
sub-neg75.2%
*-commutative75.2%
*-commutative75.2%
associate-*l*75.2%
Applied egg-rr75.2%
Simplified75.2%
Taylor expanded in x.im around 0 68.5%
unpow268.5%
associate-*r*68.5%
*-commutative68.5%
associate-*l*68.5%
associate-*r*86.7%
*-commutative86.7%
associate-*l*86.7%
Simplified86.7%
Final simplification74.3%
(FPCore (x.re x.im) :precision binary64 (if (<= x.re 3.4e+22) (* x.im (* x.im (- x.im))) (* (* x.re 3.0) (* x.im x.re))))
double code(double x_46_re, double x_46_im) {
double tmp;
if (x_46_re <= 3.4e+22) {
tmp = x_46_im * (x_46_im * -x_46_im);
} else {
tmp = (x_46_re * 3.0) * (x_46_im * x_46_re);
}
return tmp;
}
real(8) function code(x_46re, x_46im)
real(8), intent (in) :: x_46re
real(8), intent (in) :: x_46im
real(8) :: tmp
if (x_46re <= 3.4d+22) then
tmp = x_46im * (x_46im * -x_46im)
else
tmp = (x_46re * 3.0d0) * (x_46im * x_46re)
end if
code = tmp
end function
public static double code(double x_46_re, double x_46_im) {
double tmp;
if (x_46_re <= 3.4e+22) {
tmp = x_46_im * (x_46_im * -x_46_im);
} else {
tmp = (x_46_re * 3.0) * (x_46_im * x_46_re);
}
return tmp;
}
def code(x_46_re, x_46_im): tmp = 0 if x_46_re <= 3.4e+22: tmp = x_46_im * (x_46_im * -x_46_im) else: tmp = (x_46_re * 3.0) * (x_46_im * x_46_re) return tmp
function code(x_46_re, x_46_im) tmp = 0.0 if (x_46_re <= 3.4e+22) tmp = Float64(x_46_im * Float64(x_46_im * Float64(-x_46_im))); else tmp = Float64(Float64(x_46_re * 3.0) * Float64(x_46_im * x_46_re)); end return tmp end
function tmp_2 = code(x_46_re, x_46_im) tmp = 0.0; if (x_46_re <= 3.4e+22) tmp = x_46_im * (x_46_im * -x_46_im); else tmp = (x_46_re * 3.0) * (x_46_im * x_46_re); end tmp_2 = tmp; end
code[x$46$re_, x$46$im_] := If[LessEqual[x$46$re, 3.4e+22], N[(x$46$im * N[(x$46$im * (-x$46$im)), $MachinePrecision]), $MachinePrecision], N[(N[(x$46$re * 3.0), $MachinePrecision] * N[(x$46$im * x$46$re), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x.re \leq 3.4 \cdot 10^{+22}:\\
\;\;\;\;x.im \cdot \left(x.im \cdot \left(-x.im\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\left(x.re \cdot 3\right) \cdot \left(x.im \cdot x.re\right)\\
\end{array}
\end{array}
if x.re < 3.4e22Initial program 88.3%
+-commutative88.3%
*-commutative88.3%
sub-neg88.3%
distribute-lft-in85.7%
associate-+r+85.8%
distribute-rgt-neg-out85.8%
unsub-neg85.8%
associate-*r*89.6%
distribute-rgt-out89.5%
*-commutative89.5%
count-289.5%
distribute-lft1-in89.5%
metadata-eval89.5%
*-commutative89.5%
*-commutative89.5%
associate-*r*89.6%
cube-unmult89.6%
Simplified89.6%
Taylor expanded in x.re around 0 89.6%
sub-neg89.6%
*-commutative89.6%
*-commutative89.6%
associate-*l*89.6%
Applied egg-rr89.6%
Simplified89.6%
associate-*l*85.8%
cube-mult85.7%
distribute-lft-out--92.4%
*-commutative92.4%
associate-*r*92.4%
Applied egg-rr92.4%
Taylor expanded in x.re around 0 70.4%
unpow270.4%
mul-1-neg70.4%
distribute-rgt-neg-out70.4%
Simplified70.4%
if 3.4e22 < x.re Initial program 61.9%
+-commutative61.9%
*-commutative61.9%
sub-neg61.9%
distribute-lft-in57.0%
associate-+r+57.0%
distribute-rgt-neg-out57.0%
unsub-neg57.0%
associate-*r*75.2%
distribute-rgt-out75.2%
*-commutative75.2%
count-275.2%
distribute-lft1-in75.2%
metadata-eval75.2%
*-commutative75.2%
*-commutative75.2%
associate-*r*75.2%
cube-unmult75.2%
Simplified75.2%
Taylor expanded in x.re around 0 75.2%
sub-neg75.2%
*-commutative75.2%
*-commutative75.2%
associate-*l*75.2%
Applied egg-rr75.2%
Simplified75.2%
Taylor expanded in x.im around 0 68.5%
unpow268.5%
associate-*r*68.5%
*-commutative68.5%
associate-*l*68.5%
associate-*r*86.7%
*-commutative86.7%
associate-*l*86.7%
Simplified86.7%
expm1-log1p-u50.5%
expm1-udef41.1%
*-commutative41.1%
*-commutative41.1%
associate-*l*41.1%
Applied egg-rr41.1%
Simplified86.7%
Final simplification74.3%
(FPCore (x.re x.im) :precision binary64 (* x.im (* x.im (- x.im))))
double code(double x_46_re, double x_46_im) {
return x_46_im * (x_46_im * -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_46im * (x_46im * -x_46im)
end function
public static double code(double x_46_re, double x_46_im) {
return x_46_im * (x_46_im * -x_46_im);
}
def code(x_46_re, x_46_im): return x_46_im * (x_46_im * -x_46_im)
function code(x_46_re, x_46_im) return Float64(x_46_im * Float64(x_46_im * Float64(-x_46_im))) end
function tmp = code(x_46_re, x_46_im) tmp = x_46_im * (x_46_im * -x_46_im); end
code[x$46$re_, x$46$im_] := N[(x$46$im * N[(x$46$im * (-x$46$im)), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x.im \cdot \left(x.im \cdot \left(-x.im\right)\right)
\end{array}
Initial program 82.0%
+-commutative82.0%
*-commutative82.0%
sub-neg82.0%
distribute-lft-in78.9%
associate-+r+78.9%
distribute-rgt-neg-out78.9%
unsub-neg78.9%
associate-*r*86.1%
distribute-rgt-out86.1%
*-commutative86.1%
count-286.1%
distribute-lft1-in86.1%
metadata-eval86.1%
*-commutative86.1%
*-commutative86.1%
associate-*r*86.1%
cube-unmult86.2%
Simplified86.2%
Taylor expanded in x.re around 0 86.2%
sub-neg86.2%
*-commutative86.2%
*-commutative86.2%
associate-*l*86.2%
Applied egg-rr86.2%
Simplified86.2%
associate-*l*79.0%
cube-mult78.9%
distribute-lft-out--87.1%
*-commutative87.1%
associate-*r*87.1%
Applied egg-rr87.1%
Taylor expanded in x.re around 0 57.0%
unpow257.0%
mul-1-neg57.0%
distribute-rgt-neg-out57.0%
Simplified57.0%
Final simplification57.0%
(FPCore (x.re x.im) :precision binary64 -10.0)
double code(double x_46_re, double x_46_im) {
return -10.0;
}
real(8) function code(x_46re, x_46im)
real(8), intent (in) :: x_46re
real(8), intent (in) :: x_46im
code = -10.0d0
end function
public static double code(double x_46_re, double x_46_im) {
return -10.0;
}
def code(x_46_re, x_46_im): return -10.0
function code(x_46_re, x_46_im) return -10.0 end
function tmp = code(x_46_re, x_46_im) tmp = -10.0; end
code[x$46$re_, x$46$im_] := -10.0
\begin{array}{l}
\\
-10
\end{array}
Initial program 82.0%
+-commutative82.0%
*-commutative82.0%
sub-neg82.0%
distribute-lft-in78.9%
associate-+r+78.9%
distribute-rgt-neg-out78.9%
unsub-neg78.9%
associate-*r*86.1%
distribute-rgt-out86.1%
*-commutative86.1%
count-286.1%
distribute-lft1-in86.1%
metadata-eval86.1%
*-commutative86.1%
*-commutative86.1%
associate-*r*86.1%
cube-unmult86.2%
Simplified86.2%
associate-*r*86.2%
associate-*l*86.2%
flip--22.7%
div-inv22.3%
swap-sqr22.3%
pow222.3%
metadata-eval22.3%
pow-prod-up22.3%
metadata-eval22.3%
associate-*l*22.2%
associate-*r*22.2%
fma-def22.2%
Applied egg-rr22.2%
Simplified2.6%
Final simplification2.6%
(FPCore (x.re x.im) :precision binary64 0.1)
double code(double x_46_re, double x_46_im) {
return 0.1;
}
real(8) function code(x_46re, x_46im)
real(8), intent (in) :: x_46re
real(8), intent (in) :: x_46im
code = 0.1d0
end function
public static double code(double x_46_re, double x_46_im) {
return 0.1;
}
def code(x_46_re, x_46_im): return 0.1
function code(x_46_re, x_46_im) return 0.1 end
function tmp = code(x_46_re, x_46_im) tmp = 0.1; end
code[x$46$re_, x$46$im_] := 0.1
\begin{array}{l}
\\
0.1
\end{array}
Initial program 82.0%
+-commutative82.0%
*-commutative82.0%
sub-neg82.0%
distribute-lft-in78.9%
associate-+r+78.9%
distribute-rgt-neg-out78.9%
unsub-neg78.9%
associate-*r*86.1%
distribute-rgt-out86.1%
*-commutative86.1%
count-286.1%
distribute-lft1-in86.1%
metadata-eval86.1%
*-commutative86.1%
*-commutative86.1%
associate-*r*86.1%
cube-unmult86.2%
Simplified86.2%
sub-neg86.2%
associate-*r*86.2%
associate-*l*86.2%
flip3-+13.5%
associate-*r*13.1%
associate-*r*13.0%
unpow-prod-down7.6%
pow27.6%
pow-pow7.7%
metadata-eval7.7%
Applied egg-rr7.7%
Simplified2.8%
Final simplification2.8%
(FPCore (x.re x.im) :precision binary64 10.0)
double code(double x_46_re, double x_46_im) {
return 10.0;
}
real(8) function code(x_46re, x_46im)
real(8), intent (in) :: x_46re
real(8), intent (in) :: x_46im
code = 10.0d0
end function
public static double code(double x_46_re, double x_46_im) {
return 10.0;
}
def code(x_46_re, x_46_im): return 10.0
function code(x_46_re, x_46_im) return 10.0 end
function tmp = code(x_46_re, x_46_im) tmp = 10.0; end
code[x$46$re_, x$46$im_] := 10.0
\begin{array}{l}
\\
10
\end{array}
Initial program 82.0%
+-commutative82.0%
*-commutative82.0%
sub-neg82.0%
distribute-lft-in78.9%
associate-+r+78.9%
distribute-rgt-neg-out78.9%
unsub-neg78.9%
associate-*r*86.1%
distribute-rgt-out86.1%
*-commutative86.1%
count-286.1%
distribute-lft1-in86.1%
metadata-eval86.1%
*-commutative86.1%
*-commutative86.1%
associate-*r*86.1%
cube-unmult86.2%
Simplified86.2%
associate-*r*86.2%
associate-*l*86.2%
flip--22.7%
swap-sqr22.7%
pow222.7%
metadata-eval22.7%
pow-prod-up22.6%
metadata-eval22.6%
associate-*l*22.6%
associate-*r*22.6%
fma-def22.6%
Applied egg-rr22.6%
Simplified2.8%
Final simplification2.8%
(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 2023217
(FPCore (x.re x.im)
:name "math.cube on complex, imaginary part"
:precision binary64
:herbie-target
(+ (* (* x.re x.im) (* 2.0 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)))