
(FPCore (x.re x.im) :precision binary64 (- (* (- (* x.re x.re) (* x.im x.im)) x.re) (* (+ (* x.re x.im) (* x.im x.re)) x.im)))
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_re) - (((x_46_re * x_46_im) + (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_46re) - (x_46im * x_46im)) * x_46re) - (((x_46re * x_46im) + (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_re) - (x_46_im * x_46_im)) * x_46_re) - (((x_46_re * x_46_im) + (x_46_im * x_46_re)) * x_46_im);
}
def code(x_46_re, x_46_im): return (((x_46_re * x_46_re) - (x_46_im * x_46_im)) * x_46_re) - (((x_46_re * x_46_im) + (x_46_im * x_46_re)) * x_46_im)
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_re) - Float64(Float64(Float64(x_46_re * x_46_im) + Float64(x_46_im * x_46_re)) * x_46_im)) 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_re) - (((x_46_re * x_46_im) + (x_46_im * x_46_re)) * x_46_im); 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$re), $MachinePrecision] - N[(N[(N[(x$46$re * x$46$im), $MachinePrecision] + N[(x$46$im * x$46$re), $MachinePrecision]), $MachinePrecision] * x$46$im), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(x.re \cdot x.re - x.im \cdot x.im\right) \cdot x.re - \left(x.re \cdot x.im + x.im \cdot x.re\right) \cdot x.im
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 9 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x.re x.im) :precision binary64 (- (* (- (* x.re x.re) (* x.im x.im)) x.re) (* (+ (* x.re x.im) (* x.im x.re)) x.im)))
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_re) - (((x_46_re * x_46_im) + (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_46re) - (x_46im * x_46im)) * x_46re) - (((x_46re * x_46im) + (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_re) - (x_46_im * x_46_im)) * x_46_re) - (((x_46_re * x_46_im) + (x_46_im * x_46_re)) * x_46_im);
}
def code(x_46_re, x_46_im): return (((x_46_re * x_46_re) - (x_46_im * x_46_im)) * x_46_re) - (((x_46_re * x_46_im) + (x_46_im * x_46_re)) * x_46_im)
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_re) - Float64(Float64(Float64(x_46_re * x_46_im) + Float64(x_46_im * x_46_re)) * x_46_im)) 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_re) - (((x_46_re * x_46_im) + (x_46_im * x_46_re)) * x_46_im); 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$re), $MachinePrecision] - N[(N[(N[(x$46$re * x$46$im), $MachinePrecision] + N[(x$46$im * x$46$re), $MachinePrecision]), $MachinePrecision] * x$46$im), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(x.re \cdot x.re - x.im \cdot x.im\right) \cdot x.re - \left(x.re \cdot x.im + x.im \cdot x.re\right) \cdot x.im
\end{array}
(FPCore (x.re x.im)
:precision binary64
(if (<=
(-
(* x.re (- (* x.re x.re) (* x.im x.im)))
(* x.im (+ (* x.re x.im) (* x.re x.im))))
INFINITY)
(- (* (+ x.re x.im) (* x.re (- x.re x.im))) (* x.im (* x.re (+ x.im x.im))))
(pow x.re 3.0)))
double code(double x_46_re, double x_46_im) {
double tmp;
if (((x_46_re * ((x_46_re * x_46_re) - (x_46_im * x_46_im))) - (x_46_im * ((x_46_re * x_46_im) + (x_46_re * x_46_im)))) <= ((double) INFINITY)) {
tmp = ((x_46_re + x_46_im) * (x_46_re * (x_46_re - x_46_im))) - (x_46_im * (x_46_re * (x_46_im + x_46_im)));
} else {
tmp = pow(x_46_re, 3.0);
}
return tmp;
}
public static double code(double x_46_re, double x_46_im) {
double tmp;
if (((x_46_re * ((x_46_re * x_46_re) - (x_46_im * x_46_im))) - (x_46_im * ((x_46_re * x_46_im) + (x_46_re * x_46_im)))) <= Double.POSITIVE_INFINITY) {
tmp = ((x_46_re + x_46_im) * (x_46_re * (x_46_re - x_46_im))) - (x_46_im * (x_46_re * (x_46_im + x_46_im)));
} else {
tmp = Math.pow(x_46_re, 3.0);
}
return tmp;
}
def code(x_46_re, x_46_im): tmp = 0 if ((x_46_re * ((x_46_re * x_46_re) - (x_46_im * x_46_im))) - (x_46_im * ((x_46_re * x_46_im) + (x_46_re * x_46_im)))) <= math.inf: tmp = ((x_46_re + x_46_im) * (x_46_re * (x_46_re - x_46_im))) - (x_46_im * (x_46_re * (x_46_im + x_46_im))) else: tmp = math.pow(x_46_re, 3.0) return tmp
function code(x_46_re, x_46_im) tmp = 0.0 if (Float64(Float64(x_46_re * Float64(Float64(x_46_re * x_46_re) - Float64(x_46_im * x_46_im))) - Float64(x_46_im * Float64(Float64(x_46_re * x_46_im) + Float64(x_46_re * x_46_im)))) <= Inf) tmp = Float64(Float64(Float64(x_46_re + x_46_im) * Float64(x_46_re * Float64(x_46_re - x_46_im))) - Float64(x_46_im * Float64(x_46_re * Float64(x_46_im + x_46_im)))); else tmp = x_46_re ^ 3.0; end return tmp end
function tmp_2 = code(x_46_re, x_46_im) tmp = 0.0; if (((x_46_re * ((x_46_re * x_46_re) - (x_46_im * x_46_im))) - (x_46_im * ((x_46_re * x_46_im) + (x_46_re * x_46_im)))) <= Inf) tmp = ((x_46_re + x_46_im) * (x_46_re * (x_46_re - x_46_im))) - (x_46_im * (x_46_re * (x_46_im + x_46_im))); else tmp = x_46_re ^ 3.0; end tmp_2 = tmp; end
code[x$46$re_, x$46$im_] := If[LessEqual[N[(N[(x$46$re * N[(N[(x$46$re * x$46$re), $MachinePrecision] - N[(x$46$im * x$46$im), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(x$46$im * N[(N[(x$46$re * x$46$im), $MachinePrecision] + N[(x$46$re * x$46$im), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], Infinity], N[(N[(N[(x$46$re + x$46$im), $MachinePrecision] * N[(x$46$re * N[(x$46$re - x$46$im), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(x$46$im * N[(x$46$re * N[(x$46$im + x$46$im), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[Power[x$46$re, 3.0], $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x.re \cdot \left(x.re \cdot x.re - x.im \cdot x.im\right) - x.im \cdot \left(x.re \cdot x.im + x.re \cdot x.im\right) \leq \infty:\\
\;\;\;\;\left(x.re + x.im\right) \cdot \left(x.re \cdot \left(x.re - x.im\right)\right) - x.im \cdot \left(x.re \cdot \left(x.im + x.im\right)\right)\\
\mathbf{else}:\\
\;\;\;\;{x.re}^{3}\\
\end{array}
\end{array}
if (-.f64 (*.f64 (-.f64 (*.f64 x.re x.re) (*.f64 x.im x.im)) x.re) (*.f64 (+.f64 (*.f64 x.re x.im) (*.f64 x.im x.re)) x.im)) < +inf.0Initial program 92.1%
*-commutative92.1%
*-commutative92.1%
*-commutative92.1%
distribute-lft-out92.1%
Simplified92.1%
add-log-exp52.3%
exp-prod54.2%
Applied egg-rr54.2%
log-pow46.0%
difference-of-squares46.0%
add-log-exp92.1%
associate-*l*99.7%
Applied egg-rr99.7%
if +inf.0 < (-.f64 (*.f64 (-.f64 (*.f64 x.re x.re) (*.f64 x.im x.im)) x.re) (*.f64 (+.f64 (*.f64 x.re x.im) (*.f64 x.im x.re)) x.im)) Initial program 0.0%
*-commutative0.0%
distribute-lft-out0.0%
associate-*l*0.0%
*-commutative0.0%
distribute-rgt-out--41.7%
associate--l-41.7%
associate--l-41.7%
sub-neg41.7%
associate--l+41.7%
fma-udef69.4%
neg-mul-169.4%
count-269.4%
associate-*l*69.4%
distribute-rgt-out--69.4%
associate-*r*69.4%
metadata-eval69.4%
Simplified69.4%
Taylor expanded in x.re around inf 72.2%
Final simplification95.8%
(FPCore (x.re x.im)
:precision binary64
(if (<=
(-
(* x.re (- (* x.re x.re) (* x.im x.im)))
(* x.im (+ (* x.re x.im) (* x.re x.im))))
INFINITY)
(- (* (+ x.re x.im) (* x.re (- x.re x.im))) (* x.im (* x.re (+ x.im x.im))))
(* x.re (* (* x.im x.im) 3.0))))
double code(double x_46_re, double x_46_im) {
double tmp;
if (((x_46_re * ((x_46_re * x_46_re) - (x_46_im * x_46_im))) - (x_46_im * ((x_46_re * x_46_im) + (x_46_re * x_46_im)))) <= ((double) INFINITY)) {
tmp = ((x_46_re + x_46_im) * (x_46_re * (x_46_re - x_46_im))) - (x_46_im * (x_46_re * (x_46_im + x_46_im)));
} else {
tmp = x_46_re * ((x_46_im * x_46_im) * 3.0);
}
return tmp;
}
public static double code(double x_46_re, double x_46_im) {
double tmp;
if (((x_46_re * ((x_46_re * x_46_re) - (x_46_im * x_46_im))) - (x_46_im * ((x_46_re * x_46_im) + (x_46_re * x_46_im)))) <= Double.POSITIVE_INFINITY) {
tmp = ((x_46_re + x_46_im) * (x_46_re * (x_46_re - x_46_im))) - (x_46_im * (x_46_re * (x_46_im + x_46_im)));
} else {
tmp = x_46_re * ((x_46_im * x_46_im) * 3.0);
}
return tmp;
}
def code(x_46_re, x_46_im): tmp = 0 if ((x_46_re * ((x_46_re * x_46_re) - (x_46_im * x_46_im))) - (x_46_im * ((x_46_re * x_46_im) + (x_46_re * x_46_im)))) <= math.inf: tmp = ((x_46_re + x_46_im) * (x_46_re * (x_46_re - x_46_im))) - (x_46_im * (x_46_re * (x_46_im + x_46_im))) else: tmp = x_46_re * ((x_46_im * x_46_im) * 3.0) return tmp
function code(x_46_re, x_46_im) tmp = 0.0 if (Float64(Float64(x_46_re * Float64(Float64(x_46_re * x_46_re) - Float64(x_46_im * x_46_im))) - Float64(x_46_im * Float64(Float64(x_46_re * x_46_im) + Float64(x_46_re * x_46_im)))) <= Inf) tmp = Float64(Float64(Float64(x_46_re + x_46_im) * Float64(x_46_re * Float64(x_46_re - x_46_im))) - Float64(x_46_im * Float64(x_46_re * Float64(x_46_im + x_46_im)))); else tmp = Float64(x_46_re * Float64(Float64(x_46_im * 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_re * ((x_46_re * x_46_re) - (x_46_im * x_46_im))) - (x_46_im * ((x_46_re * x_46_im) + (x_46_re * x_46_im)))) <= Inf) tmp = ((x_46_re + x_46_im) * (x_46_re * (x_46_re - x_46_im))) - (x_46_im * (x_46_re * (x_46_im + x_46_im))); else tmp = x_46_re * ((x_46_im * x_46_im) * 3.0); end tmp_2 = tmp; end
code[x$46$re_, x$46$im_] := If[LessEqual[N[(N[(x$46$re * N[(N[(x$46$re * x$46$re), $MachinePrecision] - N[(x$46$im * x$46$im), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(x$46$im * N[(N[(x$46$re * x$46$im), $MachinePrecision] + N[(x$46$re * x$46$im), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], Infinity], N[(N[(N[(x$46$re + x$46$im), $MachinePrecision] * N[(x$46$re * N[(x$46$re - x$46$im), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(x$46$im * N[(x$46$re * N[(x$46$im + x$46$im), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x$46$re * N[(N[(x$46$im * x$46$im), $MachinePrecision] * 3.0), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x.re \cdot \left(x.re \cdot x.re - x.im \cdot x.im\right) - x.im \cdot \left(x.re \cdot x.im + x.re \cdot x.im\right) \leq \infty:\\
\;\;\;\;\left(x.re + x.im\right) \cdot \left(x.re \cdot \left(x.re - x.im\right)\right) - x.im \cdot \left(x.re \cdot \left(x.im + x.im\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x.re \cdot \left(\left(x.im \cdot x.im\right) \cdot 3\right)\\
\end{array}
\end{array}
if (-.f64 (*.f64 (-.f64 (*.f64 x.re x.re) (*.f64 x.im x.im)) x.re) (*.f64 (+.f64 (*.f64 x.re x.im) (*.f64 x.im x.re)) x.im)) < +inf.0Initial program 92.1%
*-commutative92.1%
*-commutative92.1%
*-commutative92.1%
distribute-lft-out92.1%
Simplified92.1%
add-log-exp52.3%
exp-prod54.2%
Applied egg-rr54.2%
log-pow46.0%
difference-of-squares46.0%
add-log-exp92.1%
associate-*l*99.7%
Applied egg-rr99.7%
if +inf.0 < (-.f64 (*.f64 (-.f64 (*.f64 x.re x.re) (*.f64 x.im x.im)) x.re) (*.f64 (+.f64 (*.f64 x.re x.im) (*.f64 x.im x.re)) x.im)) Initial program 0.0%
*-commutative0.0%
*-commutative0.0%
*-commutative0.0%
distribute-lft-out0.0%
Simplified0.0%
add-log-exp0.0%
exp-prod0.0%
Applied egg-rr0.0%
Taylor expanded in x.re around 0 27.8%
associate-*r*27.8%
neg-mul-127.8%
unpow227.8%
Simplified27.8%
sub-neg27.8%
distribute-rgt-neg-in27.8%
distribute-lft-neg-in27.8%
add-sqr-sqrt13.9%
sqrt-unprod13.9%
sqr-neg13.9%
sqrt-unprod0.0%
add-sqr-sqrt0.0%
associate-*r*0.0%
add-sqr-sqrt0.0%
sqrt-unprod38.9%
sqr-neg38.9%
sqrt-unprod38.9%
add-sqr-sqrt72.2%
associate-*r*72.2%
Applied egg-rr72.2%
associate-*l*72.2%
*-commutative72.2%
*-commutative72.2%
associate-*r*72.2%
distribute-rgt-out72.2%
count-272.2%
associate-*r*72.2%
distribute-rgt1-in72.2%
metadata-eval72.2%
Simplified72.2%
Final simplification95.8%
(FPCore (x.re x.im)
:precision binary64
(if (<= x.im -8e+153)
(* x.im (* x.im (* x.re -3.0)))
(if (<= x.im 4.8e+139)
(* x.re (+ (* x.re x.re) (* x.im (* x.im -3.0))))
(- (* x.im (* x.re (- x.im))) (* x.im (* x.re (+ x.im x.im)))))))
double code(double x_46_re, double x_46_im) {
double tmp;
if (x_46_im <= -8e+153) {
tmp = x_46_im * (x_46_im * (x_46_re * -3.0));
} else if (x_46_im <= 4.8e+139) {
tmp = x_46_re * ((x_46_re * x_46_re) + (x_46_im * (x_46_im * -3.0)));
} else {
tmp = (x_46_im * (x_46_re * -x_46_im)) - (x_46_im * (x_46_re * (x_46_im + x_46_im)));
}
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 <= (-8d+153)) then
tmp = x_46im * (x_46im * (x_46re * (-3.0d0)))
else if (x_46im <= 4.8d+139) then
tmp = x_46re * ((x_46re * x_46re) + (x_46im * (x_46im * (-3.0d0))))
else
tmp = (x_46im * (x_46re * -x_46im)) - (x_46im * (x_46re * (x_46im + x_46im)))
end if
code = tmp
end function
public static double code(double x_46_re, double x_46_im) {
double tmp;
if (x_46_im <= -8e+153) {
tmp = x_46_im * (x_46_im * (x_46_re * -3.0));
} else if (x_46_im <= 4.8e+139) {
tmp = x_46_re * ((x_46_re * x_46_re) + (x_46_im * (x_46_im * -3.0)));
} else {
tmp = (x_46_im * (x_46_re * -x_46_im)) - (x_46_im * (x_46_re * (x_46_im + x_46_im)));
}
return tmp;
}
def code(x_46_re, x_46_im): tmp = 0 if x_46_im <= -8e+153: tmp = x_46_im * (x_46_im * (x_46_re * -3.0)) elif x_46_im <= 4.8e+139: tmp = x_46_re * ((x_46_re * x_46_re) + (x_46_im * (x_46_im * -3.0))) else: tmp = (x_46_im * (x_46_re * -x_46_im)) - (x_46_im * (x_46_re * (x_46_im + x_46_im))) return tmp
function code(x_46_re, x_46_im) tmp = 0.0 if (x_46_im <= -8e+153) tmp = Float64(x_46_im * Float64(x_46_im * Float64(x_46_re * -3.0))); elseif (x_46_im <= 4.8e+139) tmp = Float64(x_46_re * Float64(Float64(x_46_re * x_46_re) + Float64(x_46_im * Float64(x_46_im * -3.0)))); else tmp = Float64(Float64(x_46_im * Float64(x_46_re * Float64(-x_46_im))) - Float64(x_46_im * Float64(x_46_re * Float64(x_46_im + x_46_im)))); end return tmp end
function tmp_2 = code(x_46_re, x_46_im) tmp = 0.0; if (x_46_im <= -8e+153) tmp = x_46_im * (x_46_im * (x_46_re * -3.0)); elseif (x_46_im <= 4.8e+139) tmp = x_46_re * ((x_46_re * x_46_re) + (x_46_im * (x_46_im * -3.0))); else tmp = (x_46_im * (x_46_re * -x_46_im)) - (x_46_im * (x_46_re * (x_46_im + x_46_im))); end tmp_2 = tmp; end
code[x$46$re_, x$46$im_] := If[LessEqual[x$46$im, -8e+153], N[(x$46$im * N[(x$46$im * N[(x$46$re * -3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x$46$im, 4.8e+139], N[(x$46$re * N[(N[(x$46$re * x$46$re), $MachinePrecision] + N[(x$46$im * N[(x$46$im * -3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x$46$im * N[(x$46$re * (-x$46$im)), $MachinePrecision]), $MachinePrecision] - N[(x$46$im * N[(x$46$re * N[(x$46$im + x$46$im), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x.im \leq -8 \cdot 10^{+153}:\\
\;\;\;\;x.im \cdot \left(x.im \cdot \left(x.re \cdot -3\right)\right)\\
\mathbf{elif}\;x.im \leq 4.8 \cdot 10^{+139}:\\
\;\;\;\;x.re \cdot \left(x.re \cdot x.re + x.im \cdot \left(x.im \cdot -3\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x.im \cdot \left(x.re \cdot \left(-x.im\right)\right) - x.im \cdot \left(x.re \cdot \left(x.im + x.im\right)\right)\\
\end{array}
\end{array}
if x.im < -8e153Initial program 50.1%
*-commutative50.1%
*-commutative50.1%
*-commutative50.1%
distribute-lft-out50.1%
Simplified50.1%
add-log-exp50.1%
exp-prod53.1%
Applied egg-rr53.1%
log-pow31.4%
difference-of-squares42.9%
add-log-exp61.5%
associate-*l*82.6%
Applied egg-rr82.6%
Taylor expanded in x.re around 0 61.5%
unpow261.5%
unpow261.5%
distribute-rgt-out--61.5%
metadata-eval61.5%
*-commutative61.5%
associate-*l*61.5%
*-commutative61.5%
associate-*l*82.8%
Simplified82.8%
if -8e153 < x.im < 4.80000000000000016e139Initial program 91.3%
*-commutative91.3%
distribute-lft-out91.3%
associate-*l*91.3%
*-commutative91.3%
distribute-rgt-out--99.7%
associate--l-99.7%
associate--l-99.7%
sub-neg99.7%
associate--l+99.7%
fma-udef99.7%
neg-mul-199.7%
count-299.7%
associate-*l*99.7%
distribute-rgt-out--99.7%
associate-*r*99.7%
metadata-eval99.7%
Simplified99.7%
fma-udef99.7%
Applied egg-rr99.7%
if 4.80000000000000016e139 < x.im Initial program 53.3%
*-commutative53.3%
*-commutative53.3%
*-commutative53.3%
distribute-lft-out53.3%
Simplified53.3%
add-log-exp48.3%
exp-prod51.4%
Applied egg-rr51.4%
log-pow21.8%
difference-of-squares35.5%
add-log-exp67.0%
associate-*l*88.5%
Applied egg-rr88.5%
Taylor expanded in x.re around 0 67.0%
mul-1-neg67.0%
unpow267.0%
associate-*l*88.5%
distribute-rgt-neg-in88.5%
Simplified88.5%
Final simplification95.5%
(FPCore (x.re x.im) :precision binary64 (if (or (<= x.im -8e+153) (not (<= x.im 4.8e+139))) (* x.im (* x.im (* x.re -3.0))) (* x.re (+ (* x.re x.re) (* x.im (* x.im -3.0))))))
double code(double x_46_re, double x_46_im) {
double tmp;
if ((x_46_im <= -8e+153) || !(x_46_im <= 4.8e+139)) {
tmp = x_46_im * (x_46_im * (x_46_re * -3.0));
} else {
tmp = x_46_re * ((x_46_re * x_46_re) + (x_46_im * (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 <= (-8d+153)) .or. (.not. (x_46im <= 4.8d+139))) then
tmp = x_46im * (x_46im * (x_46re * (-3.0d0)))
else
tmp = x_46re * ((x_46re * x_46re) + (x_46im * (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 <= -8e+153) || !(x_46_im <= 4.8e+139)) {
tmp = x_46_im * (x_46_im * (x_46_re * -3.0));
} else {
tmp = x_46_re * ((x_46_re * x_46_re) + (x_46_im * (x_46_im * -3.0)));
}
return tmp;
}
def code(x_46_re, x_46_im): tmp = 0 if (x_46_im <= -8e+153) or not (x_46_im <= 4.8e+139): tmp = x_46_im * (x_46_im * (x_46_re * -3.0)) else: tmp = x_46_re * ((x_46_re * x_46_re) + (x_46_im * (x_46_im * -3.0))) return tmp
function code(x_46_re, x_46_im) tmp = 0.0 if ((x_46_im <= -8e+153) || !(x_46_im <= 4.8e+139)) tmp = Float64(x_46_im * Float64(x_46_im * Float64(x_46_re * -3.0))); else tmp = Float64(x_46_re * Float64(Float64(x_46_re * x_46_re) + Float64(x_46_im * Float64(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 <= -8e+153) || ~((x_46_im <= 4.8e+139))) tmp = x_46_im * (x_46_im * (x_46_re * -3.0)); else tmp = x_46_re * ((x_46_re * x_46_re) + (x_46_im * (x_46_im * -3.0))); end tmp_2 = tmp; end
code[x$46$re_, x$46$im_] := If[Or[LessEqual[x$46$im, -8e+153], N[Not[LessEqual[x$46$im, 4.8e+139]], $MachinePrecision]], N[(x$46$im * N[(x$46$im * N[(x$46$re * -3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x$46$re * N[(N[(x$46$re * x$46$re), $MachinePrecision] + N[(x$46$im * N[(x$46$im * -3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x.im \leq -8 \cdot 10^{+153} \lor \neg \left(x.im \leq 4.8 \cdot 10^{+139}\right):\\
\;\;\;\;x.im \cdot \left(x.im \cdot \left(x.re \cdot -3\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x.re \cdot \left(x.re \cdot x.re + x.im \cdot \left(x.im \cdot -3\right)\right)\\
\end{array}
\end{array}
if x.im < -8e153 or 4.80000000000000016e139 < x.im Initial program 51.9%
*-commutative51.9%
*-commutative51.9%
*-commutative51.9%
distribute-lft-out51.9%
Simplified51.9%
add-log-exp49.1%
exp-prod52.1%
Applied egg-rr52.1%
log-pow26.1%
difference-of-squares38.7%
add-log-exp64.6%
associate-*l*85.9%
Applied egg-rr85.9%
Taylor expanded in x.re around 0 63.4%
unpow263.4%
unpow263.4%
distribute-rgt-out--63.4%
metadata-eval63.4%
*-commutative63.4%
associate-*l*64.6%
*-commutative64.6%
associate-*l*86.0%
Simplified86.0%
if -8e153 < x.im < 4.80000000000000016e139Initial program 91.3%
*-commutative91.3%
distribute-lft-out91.3%
associate-*l*91.3%
*-commutative91.3%
distribute-rgt-out--99.7%
associate--l-99.7%
associate--l-99.7%
sub-neg99.7%
associate--l+99.7%
fma-udef99.7%
neg-mul-199.7%
count-299.7%
associate-*l*99.7%
distribute-rgt-out--99.7%
associate-*r*99.7%
metadata-eval99.7%
Simplified99.7%
fma-udef99.7%
Applied egg-rr99.7%
Final simplification95.4%
(FPCore (x.re x.im) :precision binary64 (if (or (<= x.re -1.75e+177) (not (<= x.re 5.5e+149))) (* x.re (* (* x.im x.im) 3.0)) (* x.im (* x.im (* x.re -3.0)))))
double code(double x_46_re, double x_46_im) {
double tmp;
if ((x_46_re <= -1.75e+177) || !(x_46_re <= 5.5e+149)) {
tmp = x_46_re * ((x_46_im * x_46_im) * 3.0);
} else {
tmp = x_46_im * (x_46_im * (x_46_re * -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_46re <= (-1.75d+177)) .or. (.not. (x_46re <= 5.5d+149))) then
tmp = x_46re * ((x_46im * x_46im) * 3.0d0)
else
tmp = x_46im * (x_46im * (x_46re * (-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_re <= -1.75e+177) || !(x_46_re <= 5.5e+149)) {
tmp = x_46_re * ((x_46_im * x_46_im) * 3.0);
} else {
tmp = x_46_im * (x_46_im * (x_46_re * -3.0));
}
return tmp;
}
def code(x_46_re, x_46_im): tmp = 0 if (x_46_re <= -1.75e+177) or not (x_46_re <= 5.5e+149): tmp = x_46_re * ((x_46_im * x_46_im) * 3.0) else: tmp = x_46_im * (x_46_im * (x_46_re * -3.0)) return tmp
function code(x_46_re, x_46_im) tmp = 0.0 if ((x_46_re <= -1.75e+177) || !(x_46_re <= 5.5e+149)) tmp = Float64(x_46_re * Float64(Float64(x_46_im * x_46_im) * 3.0)); else tmp = Float64(x_46_im * Float64(x_46_im * Float64(x_46_re * -3.0))); end return tmp end
function tmp_2 = code(x_46_re, x_46_im) tmp = 0.0; if ((x_46_re <= -1.75e+177) || ~((x_46_re <= 5.5e+149))) tmp = x_46_re * ((x_46_im * x_46_im) * 3.0); else tmp = x_46_im * (x_46_im * (x_46_re * -3.0)); end tmp_2 = tmp; end
code[x$46$re_, x$46$im_] := If[Or[LessEqual[x$46$re, -1.75e+177], N[Not[LessEqual[x$46$re, 5.5e+149]], $MachinePrecision]], N[(x$46$re * N[(N[(x$46$im * x$46$im), $MachinePrecision] * 3.0), $MachinePrecision]), $MachinePrecision], N[(x$46$im * N[(x$46$im * N[(x$46$re * -3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x.re \leq -1.75 \cdot 10^{+177} \lor \neg \left(x.re \leq 5.5 \cdot 10^{+149}\right):\\
\;\;\;\;x.re \cdot \left(\left(x.im \cdot x.im\right) \cdot 3\right)\\
\mathbf{else}:\\
\;\;\;\;x.im \cdot \left(x.im \cdot \left(x.re \cdot -3\right)\right)\\
\end{array}
\end{array}
if x.re < -1.74999999999999996e177 or 5.49999999999999999e149 < x.re Initial program 47.5%
*-commutative47.5%
*-commutative47.5%
*-commutative47.5%
distribute-lft-out47.5%
Simplified47.5%
add-log-exp47.5%
exp-prod47.5%
Applied egg-rr47.5%
Taylor expanded in x.re around 0 11.9%
associate-*r*11.9%
neg-mul-111.9%
unpow211.9%
Simplified11.9%
sub-neg11.9%
distribute-rgt-neg-in11.9%
distribute-lft-neg-in11.9%
add-sqr-sqrt3.5%
sqrt-unprod29.6%
sqr-neg29.6%
sqrt-unprod0.9%
add-sqr-sqrt1.5%
associate-*r*1.5%
add-sqr-sqrt0.6%
sqrt-unprod49.3%
sqr-neg49.3%
sqrt-unprod23.8%
add-sqr-sqrt42.4%
associate-*r*42.4%
Applied egg-rr42.4%
associate-*l*42.4%
*-commutative42.4%
*-commutative42.4%
associate-*r*42.3%
distribute-rgt-out42.3%
count-242.3%
associate-*r*42.3%
distribute-rgt1-in42.3%
metadata-eval42.3%
Simplified42.3%
if -1.74999999999999996e177 < x.re < 5.49999999999999999e149Initial program 89.0%
*-commutative89.0%
*-commutative89.0%
*-commutative89.0%
distribute-lft-out89.0%
Simplified89.0%
add-log-exp44.1%
exp-prod46.2%
Applied egg-rr46.2%
log-pow37.0%
difference-of-squares38.5%
add-log-exp90.5%
associate-*l*99.1%
Applied egg-rr99.1%
Taylor expanded in x.re around 0 57.9%
unpow257.9%
unpow257.9%
distribute-rgt-out--57.9%
metadata-eval57.9%
*-commutative57.9%
associate-*l*58.5%
*-commutative58.5%
associate-*l*67.1%
Simplified67.1%
Final simplification61.2%
(FPCore (x.re x.im)
:precision binary64
(if (<= x.re -1.55e+174)
(* x.re (* (* x.im x.im) 3.0))
(if (<= x.re 6.2e+148)
(* x.im (* x.im (* x.re -3.0)))
(* (* x.im x.im) (* x.re 3.0)))))
double code(double x_46_re, double x_46_im) {
double tmp;
if (x_46_re <= -1.55e+174) {
tmp = x_46_re * ((x_46_im * x_46_im) * 3.0);
} else if (x_46_re <= 6.2e+148) {
tmp = x_46_im * (x_46_im * (x_46_re * -3.0));
} else {
tmp = (x_46_im * x_46_im) * (x_46_re * 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_46re <= (-1.55d+174)) then
tmp = x_46re * ((x_46im * x_46im) * 3.0d0)
else if (x_46re <= 6.2d+148) then
tmp = x_46im * (x_46im * (x_46re * (-3.0d0)))
else
tmp = (x_46im * x_46im) * (x_46re * 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_re <= -1.55e+174) {
tmp = x_46_re * ((x_46_im * x_46_im) * 3.0);
} else if (x_46_re <= 6.2e+148) {
tmp = x_46_im * (x_46_im * (x_46_re * -3.0));
} else {
tmp = (x_46_im * x_46_im) * (x_46_re * 3.0);
}
return tmp;
}
def code(x_46_re, x_46_im): tmp = 0 if x_46_re <= -1.55e+174: tmp = x_46_re * ((x_46_im * x_46_im) * 3.0) elif x_46_re <= 6.2e+148: tmp = x_46_im * (x_46_im * (x_46_re * -3.0)) else: tmp = (x_46_im * x_46_im) * (x_46_re * 3.0) return tmp
function code(x_46_re, x_46_im) tmp = 0.0 if (x_46_re <= -1.55e+174) tmp = Float64(x_46_re * Float64(Float64(x_46_im * x_46_im) * 3.0)); elseif (x_46_re <= 6.2e+148) tmp = Float64(x_46_im * Float64(x_46_im * Float64(x_46_re * -3.0))); else tmp = Float64(Float64(x_46_im * x_46_im) * Float64(x_46_re * 3.0)); end return tmp end
function tmp_2 = code(x_46_re, x_46_im) tmp = 0.0; if (x_46_re <= -1.55e+174) tmp = x_46_re * ((x_46_im * x_46_im) * 3.0); elseif (x_46_re <= 6.2e+148) tmp = x_46_im * (x_46_im * (x_46_re * -3.0)); else tmp = (x_46_im * x_46_im) * (x_46_re * 3.0); end tmp_2 = tmp; end
code[x$46$re_, x$46$im_] := If[LessEqual[x$46$re, -1.55e+174], N[(x$46$re * N[(N[(x$46$im * x$46$im), $MachinePrecision] * 3.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[x$46$re, 6.2e+148], N[(x$46$im * N[(x$46$im * N[(x$46$re * -3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x$46$im * x$46$im), $MachinePrecision] * N[(x$46$re * 3.0), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x.re \leq -1.55 \cdot 10^{+174}:\\
\;\;\;\;x.re \cdot \left(\left(x.im \cdot x.im\right) \cdot 3\right)\\
\mathbf{elif}\;x.re \leq 6.2 \cdot 10^{+148}:\\
\;\;\;\;x.im \cdot \left(x.im \cdot \left(x.re \cdot -3\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\left(x.im \cdot x.im\right) \cdot \left(x.re \cdot 3\right)\\
\end{array}
\end{array}
if x.re < -1.55e174Initial program 45.8%
*-commutative45.8%
*-commutative45.8%
*-commutative45.8%
distribute-lft-out45.8%
Simplified45.8%
add-log-exp45.8%
exp-prod45.8%
Applied egg-rr45.8%
Taylor expanded in x.re around 0 8.8%
associate-*r*8.8%
neg-mul-18.8%
unpow28.8%
Simplified8.8%
sub-neg8.8%
distribute-rgt-neg-in8.8%
distribute-lft-neg-in8.8%
add-sqr-sqrt8.8%
sqrt-unprod8.3%
sqr-neg8.3%
sqrt-unprod0.0%
add-sqr-sqrt1.4%
associate-*r*1.4%
add-sqr-sqrt1.4%
sqrt-unprod0.0%
sqr-neg0.0%
sqrt-unprod0.0%
add-sqr-sqrt47.3%
associate-*r*47.3%
Applied egg-rr47.3%
associate-*l*47.3%
*-commutative47.3%
*-commutative47.3%
associate-*r*47.2%
distribute-rgt-out47.2%
count-247.2%
associate-*r*47.2%
distribute-rgt1-in47.2%
metadata-eval47.2%
Simplified47.2%
if -1.55e174 < x.re < 6.19999999999999951e148Initial program 89.0%
*-commutative89.0%
*-commutative89.0%
*-commutative89.0%
distribute-lft-out89.0%
Simplified89.0%
add-log-exp44.1%
exp-prod46.2%
Applied egg-rr46.2%
log-pow37.0%
difference-of-squares38.5%
add-log-exp90.5%
associate-*l*99.1%
Applied egg-rr99.1%
Taylor expanded in x.re around 0 57.9%
unpow257.9%
unpow257.9%
distribute-rgt-out--57.9%
metadata-eval57.9%
*-commutative57.9%
associate-*l*58.5%
*-commutative58.5%
associate-*l*67.1%
Simplified67.1%
if 6.19999999999999951e148 < x.re Initial program 48.6%
*-commutative48.6%
*-commutative48.6%
*-commutative48.6%
distribute-lft-out48.6%
Simplified48.6%
add-log-exp48.6%
exp-prod48.6%
Applied egg-rr48.6%
Taylor expanded in x.re around 0 13.9%
associate-*r*13.9%
neg-mul-113.9%
unpow213.9%
Simplified13.9%
sub-neg13.9%
distribute-rgt-neg-in13.9%
distribute-lft-neg-in13.9%
add-sqr-sqrt0.0%
sqrt-unprod43.4%
sqr-neg43.4%
sqrt-unprod1.5%
add-sqr-sqrt1.5%
associate-*r*1.5%
add-sqr-sqrt0.0%
sqrt-unprod81.2%
sqr-neg81.2%
sqrt-unprod39.3%
add-sqr-sqrt39.3%
associate-*r*39.3%
Applied egg-rr39.3%
associate-*l*39.3%
*-commutative39.3%
*-commutative39.3%
associate-*r*39.2%
distribute-rgt-out39.2%
count-239.2%
associate-*r*39.2%
distribute-rgt1-in39.2%
metadata-eval39.2%
Simplified39.2%
Taylor expanded in x.re around 0 39.2%
associate-*r*41.8%
unpow241.8%
Simplified41.8%
Final simplification61.6%
(FPCore (x.re x.im) :precision binary64 (* -3.0 (* x.re (* x.im x.im))))
double code(double x_46_re, double x_46_im) {
return -3.0 * (x_46_re * (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 = (-3.0d0) * (x_46re * (x_46im * x_46im))
end function
public static double code(double x_46_re, double x_46_im) {
return -3.0 * (x_46_re * (x_46_im * x_46_im));
}
def code(x_46_re, x_46_im): return -3.0 * (x_46_re * (x_46_im * x_46_im))
function code(x_46_re, x_46_im) return Float64(-3.0 * Float64(x_46_re * Float64(x_46_im * x_46_im))) end
function tmp = code(x_46_re, x_46_im) tmp = -3.0 * (x_46_re * (x_46_im * x_46_im)); end
code[x$46$re_, x$46$im_] := N[(-3.0 * N[(x$46$re * N[(x$46$im * x$46$im), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
-3 \cdot \left(x.re \cdot \left(x.im \cdot x.im\right)\right)
\end{array}
Initial program 79.1%
*-commutative79.1%
distribute-lft-out79.1%
associate-*l*79.1%
*-commutative79.1%
distribute-rgt-out--84.6%
associate--l-84.6%
associate--l-84.6%
sub-neg84.6%
associate--l+84.6%
fma-udef88.5%
neg-mul-188.5%
count-288.5%
associate-*l*88.5%
distribute-rgt-out--88.5%
associate-*r*88.5%
metadata-eval88.5%
Simplified88.5%
Taylor expanded in x.re around 0 47.4%
Simplified47.4%
Final simplification47.4%
(FPCore (x.re x.im) :precision binary64 (* x.im (* (* x.re x.im) -3.0)))
double code(double x_46_re, double x_46_im) {
return x_46_im * ((x_46_re * x_46_im) * -3.0);
}
real(8) function code(x_46re, x_46im)
real(8), intent (in) :: x_46re
real(8), intent (in) :: x_46im
code = x_46im * ((x_46re * x_46im) * (-3.0d0))
end function
public static double code(double x_46_re, double x_46_im) {
return x_46_im * ((x_46_re * x_46_im) * -3.0);
}
def code(x_46_re, x_46_im): return x_46_im * ((x_46_re * x_46_im) * -3.0)
function code(x_46_re, x_46_im) return Float64(x_46_im * Float64(Float64(x_46_re * x_46_im) * -3.0)) end
function tmp = code(x_46_re, x_46_im) tmp = x_46_im * ((x_46_re * x_46_im) * -3.0); end
code[x$46$re_, x$46$im_] := N[(x$46$im * N[(N[(x$46$re * x$46$im), $MachinePrecision] * -3.0), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x.im \cdot \left(\left(x.re \cdot x.im\right) \cdot -3\right)
\end{array}
Initial program 79.1%
*-commutative79.1%
*-commutative79.1%
*-commutative79.1%
distribute-lft-out79.1%
Simplified79.1%
add-log-exp44.9%
exp-prod46.5%
Applied egg-rr46.5%
log-pow39.5%
difference-of-squares43.4%
add-log-exp83.0%
associate-*l*89.6%
Applied egg-rr89.6%
Taylor expanded in x.re around 0 47.0%
unpow247.0%
unpow247.0%
distribute-rgt-out--47.0%
metadata-eval47.0%
*-commutative47.0%
associate-*l*47.4%
*-commutative47.4%
associate-*l*53.9%
Simplified53.9%
Taylor expanded in x.im around 0 53.9%
Final simplification53.9%
(FPCore (x.re x.im) :precision binary64 (* x.im (* x.im (* x.re -3.0))))
double code(double x_46_re, double x_46_im) {
return x_46_im * (x_46_im * (x_46_re * -3.0));
}
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_46re * (-3.0d0)))
end function
public static double code(double x_46_re, double x_46_im) {
return x_46_im * (x_46_im * (x_46_re * -3.0));
}
def code(x_46_re, x_46_im): return x_46_im * (x_46_im * (x_46_re * -3.0))
function code(x_46_re, x_46_im) return Float64(x_46_im * Float64(x_46_im * Float64(x_46_re * -3.0))) end
function tmp = code(x_46_re, x_46_im) tmp = x_46_im * (x_46_im * (x_46_re * -3.0)); end
code[x$46$re_, x$46$im_] := N[(x$46$im * N[(x$46$im * N[(x$46$re * -3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x.im \cdot \left(x.im \cdot \left(x.re \cdot -3\right)\right)
\end{array}
Initial program 79.1%
*-commutative79.1%
*-commutative79.1%
*-commutative79.1%
distribute-lft-out79.1%
Simplified79.1%
add-log-exp44.9%
exp-prod46.5%
Applied egg-rr46.5%
log-pow39.5%
difference-of-squares43.4%
add-log-exp83.0%
associate-*l*89.6%
Applied egg-rr89.6%
Taylor expanded in x.re around 0 47.0%
unpow247.0%
unpow247.0%
distribute-rgt-out--47.0%
metadata-eval47.0%
*-commutative47.0%
associate-*l*47.4%
*-commutative47.4%
associate-*l*53.9%
Simplified53.9%
Final simplification53.9%
(FPCore (x.re x.im) :precision binary64 (+ (* (* x.re x.re) (- x.re x.im)) (* (* x.re x.im) (- x.re (* 3.0 x.im)))))
double code(double x_46_re, double x_46_im) {
return ((x_46_re * x_46_re) * (x_46_re - x_46_im)) + ((x_46_re * x_46_im) * (x_46_re - (3.0 * 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_46re) * (x_46re - x_46im)) + ((x_46re * x_46im) * (x_46re - (3.0d0 * x_46im)))
end function
public static double code(double x_46_re, double x_46_im) {
return ((x_46_re * x_46_re) * (x_46_re - x_46_im)) + ((x_46_re * x_46_im) * (x_46_re - (3.0 * x_46_im)));
}
def code(x_46_re, x_46_im): return ((x_46_re * x_46_re) * (x_46_re - x_46_im)) + ((x_46_re * x_46_im) * (x_46_re - (3.0 * x_46_im)))
function code(x_46_re, x_46_im) return Float64(Float64(Float64(x_46_re * x_46_re) * Float64(x_46_re - x_46_im)) + Float64(Float64(x_46_re * x_46_im) * Float64(x_46_re - Float64(3.0 * x_46_im)))) end
function tmp = code(x_46_re, x_46_im) tmp = ((x_46_re * x_46_re) * (x_46_re - x_46_im)) + ((x_46_re * x_46_im) * (x_46_re - (3.0 * x_46_im))); end
code[x$46$re_, x$46$im_] := N[(N[(N[(x$46$re * x$46$re), $MachinePrecision] * N[(x$46$re - x$46$im), $MachinePrecision]), $MachinePrecision] + N[(N[(x$46$re * x$46$im), $MachinePrecision] * N[(x$46$re - N[(3.0 * x$46$im), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(x.re \cdot x.re\right) \cdot \left(x.re - x.im\right) + \left(x.re \cdot x.im\right) \cdot \left(x.re - 3 \cdot x.im\right)
\end{array}
herbie shell --seed 2023196
(FPCore (x.re x.im)
:name "math.cube on complex, real part"
:precision binary64
:herbie-target
(+ (* (* x.re x.re) (- x.re x.im)) (* (* x.re x.im) (- x.re (* 3.0 x.im))))
(- (* (- (* x.re x.re) (* x.im x.im)) x.re) (* (+ (* x.re x.im) (* x.im x.re)) x.im)))