
(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 7 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}
x.re\_m = (fabs.f64 x.re)
x.re\_s = (copysign.f64 #s(literal 1 binary64) x.re)
(FPCore (x.re_s x.re_m x.im)
:precision binary64
(*
x.re_s
(if (<= x.re_m 4.3e+86)
(- (pow x.re_m 3.0) (* x.im (* x.re_m (* 3.0 x.im))))
(+ (* (+ x.re_m x.im) (* x.re_m (- x.re_m x.im))) (* x.im 0.0)))))x.re\_m = fabs(x_46_re);
x.re\_s = copysign(1.0, x_46_re);
double code(double x_46_re_s, double x_46_re_m, double x_46_im) {
double tmp;
if (x_46_re_m <= 4.3e+86) {
tmp = pow(x_46_re_m, 3.0) - (x_46_im * (x_46_re_m * (3.0 * x_46_im)));
} else {
tmp = ((x_46_re_m + x_46_im) * (x_46_re_m * (x_46_re_m - x_46_im))) + (x_46_im * 0.0);
}
return x_46_re_s * tmp;
}
x.re\_m = abs(x_46re)
x.re\_s = copysign(1.0d0, x_46re)
real(8) function code(x_46re_s, x_46re_m, x_46im)
real(8), intent (in) :: x_46re_s
real(8), intent (in) :: x_46re_m
real(8), intent (in) :: x_46im
real(8) :: tmp
if (x_46re_m <= 4.3d+86) then
tmp = (x_46re_m ** 3.0d0) - (x_46im * (x_46re_m * (3.0d0 * x_46im)))
else
tmp = ((x_46re_m + x_46im) * (x_46re_m * (x_46re_m - x_46im))) + (x_46im * 0.0d0)
end if
code = x_46re_s * tmp
end function
x.re\_m = Math.abs(x_46_re);
x.re\_s = Math.copySign(1.0, x_46_re);
public static double code(double x_46_re_s, double x_46_re_m, double x_46_im) {
double tmp;
if (x_46_re_m <= 4.3e+86) {
tmp = Math.pow(x_46_re_m, 3.0) - (x_46_im * (x_46_re_m * (3.0 * x_46_im)));
} else {
tmp = ((x_46_re_m + x_46_im) * (x_46_re_m * (x_46_re_m - x_46_im))) + (x_46_im * 0.0);
}
return x_46_re_s * tmp;
}
x.re\_m = math.fabs(x_46_re) x.re\_s = math.copysign(1.0, x_46_re) def code(x_46_re_s, x_46_re_m, x_46_im): tmp = 0 if x_46_re_m <= 4.3e+86: tmp = math.pow(x_46_re_m, 3.0) - (x_46_im * (x_46_re_m * (3.0 * x_46_im))) else: tmp = ((x_46_re_m + x_46_im) * (x_46_re_m * (x_46_re_m - x_46_im))) + (x_46_im * 0.0) return x_46_re_s * tmp
x.re\_m = abs(x_46_re) x.re\_s = copysign(1.0, x_46_re) function code(x_46_re_s, x_46_re_m, x_46_im) tmp = 0.0 if (x_46_re_m <= 4.3e+86) tmp = Float64((x_46_re_m ^ 3.0) - Float64(x_46_im * Float64(x_46_re_m * Float64(3.0 * x_46_im)))); else tmp = Float64(Float64(Float64(x_46_re_m + x_46_im) * Float64(x_46_re_m * Float64(x_46_re_m - x_46_im))) + Float64(x_46_im * 0.0)); end return Float64(x_46_re_s * tmp) end
x.re\_m = abs(x_46_re); x.re\_s = sign(x_46_re) * abs(1.0); function tmp_2 = code(x_46_re_s, x_46_re_m, x_46_im) tmp = 0.0; if (x_46_re_m <= 4.3e+86) tmp = (x_46_re_m ^ 3.0) - (x_46_im * (x_46_re_m * (3.0 * x_46_im))); else tmp = ((x_46_re_m + x_46_im) * (x_46_re_m * (x_46_re_m - x_46_im))) + (x_46_im * 0.0); end tmp_2 = x_46_re_s * tmp; end
x.re\_m = N[Abs[x$46$re], $MachinePrecision]
x.re\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[x$46$re]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[x$46$re$95$s_, x$46$re$95$m_, x$46$im_] := N[(x$46$re$95$s * If[LessEqual[x$46$re$95$m, 4.3e+86], N[(N[Power[x$46$re$95$m, 3.0], $MachinePrecision] - N[(x$46$im * N[(x$46$re$95$m * N[(3.0 * x$46$im), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(x$46$re$95$m + x$46$im), $MachinePrecision] * N[(x$46$re$95$m * N[(x$46$re$95$m - x$46$im), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(x$46$im * 0.0), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
x.re\_m = \left|x.re\right|
\\
x.re\_s = \mathsf{copysign}\left(1, x.re\right)
\\
x.re\_s \cdot \begin{array}{l}
\mathbf{if}\;x.re\_m \leq 4.3 \cdot 10^{+86}:\\
\;\;\;\;{x.re\_m}^{3} - x.im \cdot \left(x.re\_m \cdot \left(3 \cdot x.im\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\left(x.re\_m + x.im\right) \cdot \left(x.re\_m \cdot \left(x.re\_m - x.im\right)\right) + x.im \cdot 0\\
\end{array}
\end{array}
if x.re < 4.3000000000000002e86Initial program 81.5%
Simplified79.6%
associate-*r*79.6%
associate-*r*89.4%
*-commutative89.4%
Applied egg-rr89.4%
if 4.3000000000000002e86 < x.re Initial program 58.7%
difference-of-squares69.6%
associate-*l*69.6%
Applied egg-rr69.6%
flip-+0.0%
*-commutative0.0%
*-commutative0.0%
div-sub0.0%
*-commutative0.0%
*-commutative0.0%
Applied egg-rr0.0%
+-inverses100.0%
Simplified100.0%
Final simplification91.3%
x.re\_m = (fabs.f64 x.re)
x.re\_s = (copysign.f64 #s(literal 1 binary64) x.re)
(FPCore (x.re_s x.re_m x.im)
:precision binary64
(*
x.re_s
(if (or (<= x.im 1.6e+27) (and (not (<= x.im 2.8e+83)) (<= x.im 1.12e+113)))
(* x.re_m (* x.re_m x.re_m))
(* -3.0 (* x.im (* x.re_m x.im))))))x.re\_m = fabs(x_46_re);
x.re\_s = copysign(1.0, x_46_re);
double code(double x_46_re_s, double x_46_re_m, double x_46_im) {
double tmp;
if ((x_46_im <= 1.6e+27) || (!(x_46_im <= 2.8e+83) && (x_46_im <= 1.12e+113))) {
tmp = x_46_re_m * (x_46_re_m * x_46_re_m);
} else {
tmp = -3.0 * (x_46_im * (x_46_re_m * x_46_im));
}
return x_46_re_s * tmp;
}
x.re\_m = abs(x_46re)
x.re\_s = copysign(1.0d0, x_46re)
real(8) function code(x_46re_s, x_46re_m, x_46im)
real(8), intent (in) :: x_46re_s
real(8), intent (in) :: x_46re_m
real(8), intent (in) :: x_46im
real(8) :: tmp
if ((x_46im <= 1.6d+27) .or. (.not. (x_46im <= 2.8d+83)) .and. (x_46im <= 1.12d+113)) then
tmp = x_46re_m * (x_46re_m * x_46re_m)
else
tmp = (-3.0d0) * (x_46im * (x_46re_m * x_46im))
end if
code = x_46re_s * tmp
end function
x.re\_m = Math.abs(x_46_re);
x.re\_s = Math.copySign(1.0, x_46_re);
public static double code(double x_46_re_s, double x_46_re_m, double x_46_im) {
double tmp;
if ((x_46_im <= 1.6e+27) || (!(x_46_im <= 2.8e+83) && (x_46_im <= 1.12e+113))) {
tmp = x_46_re_m * (x_46_re_m * x_46_re_m);
} else {
tmp = -3.0 * (x_46_im * (x_46_re_m * x_46_im));
}
return x_46_re_s * tmp;
}
x.re\_m = math.fabs(x_46_re) x.re\_s = math.copysign(1.0, x_46_re) def code(x_46_re_s, x_46_re_m, x_46_im): tmp = 0 if (x_46_im <= 1.6e+27) or (not (x_46_im <= 2.8e+83) and (x_46_im <= 1.12e+113)): tmp = x_46_re_m * (x_46_re_m * x_46_re_m) else: tmp = -3.0 * (x_46_im * (x_46_re_m * x_46_im)) return x_46_re_s * tmp
x.re\_m = abs(x_46_re) x.re\_s = copysign(1.0, x_46_re) function code(x_46_re_s, x_46_re_m, x_46_im) tmp = 0.0 if ((x_46_im <= 1.6e+27) || (!(x_46_im <= 2.8e+83) && (x_46_im <= 1.12e+113))) tmp = Float64(x_46_re_m * Float64(x_46_re_m * x_46_re_m)); else tmp = Float64(-3.0 * Float64(x_46_im * Float64(x_46_re_m * x_46_im))); end return Float64(x_46_re_s * tmp) end
x.re\_m = abs(x_46_re); x.re\_s = sign(x_46_re) * abs(1.0); function tmp_2 = code(x_46_re_s, x_46_re_m, x_46_im) tmp = 0.0; if ((x_46_im <= 1.6e+27) || (~((x_46_im <= 2.8e+83)) && (x_46_im <= 1.12e+113))) tmp = x_46_re_m * (x_46_re_m * x_46_re_m); else tmp = -3.0 * (x_46_im * (x_46_re_m * x_46_im)); end tmp_2 = x_46_re_s * tmp; end
x.re\_m = N[Abs[x$46$re], $MachinePrecision]
x.re\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[x$46$re]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[x$46$re$95$s_, x$46$re$95$m_, x$46$im_] := N[(x$46$re$95$s * If[Or[LessEqual[x$46$im, 1.6e+27], And[N[Not[LessEqual[x$46$im, 2.8e+83]], $MachinePrecision], LessEqual[x$46$im, 1.12e+113]]], N[(x$46$re$95$m * N[(x$46$re$95$m * x$46$re$95$m), $MachinePrecision]), $MachinePrecision], N[(-3.0 * N[(x$46$im * N[(x$46$re$95$m * x$46$im), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
x.re\_m = \left|x.re\right|
\\
x.re\_s = \mathsf{copysign}\left(1, x.re\right)
\\
x.re\_s \cdot \begin{array}{l}
\mathbf{if}\;x.im \leq 1.6 \cdot 10^{+27} \lor \neg \left(x.im \leq 2.8 \cdot 10^{+83}\right) \land x.im \leq 1.12 \cdot 10^{+113}:\\
\;\;\;\;x.re\_m \cdot \left(x.re\_m \cdot x.re\_m\right)\\
\mathbf{else}:\\
\;\;\;\;-3 \cdot \left(x.im \cdot \left(x.re\_m \cdot x.im\right)\right)\\
\end{array}
\end{array}
if x.im < 1.60000000000000008e27 or 2.8e83 < x.im < 1.1200000000000001e113Initial program 82.8%
difference-of-squares86.3%
associate-*l*91.4%
Applied egg-rr91.4%
Taylor expanded in x.re around inf 63.6%
cube-unmult63.6%
Simplified63.6%
if 1.60000000000000008e27 < x.im < 2.8e83 or 1.1200000000000001e113 < x.im Initial program 57.4%
Simplified48.3%
associate-*r*48.3%
associate-*r*67.1%
*-commutative67.1%
Applied egg-rr67.1%
cube-unmult67.1%
cancel-sign-sub-inv67.1%
associate-*r*67.1%
Applied egg-rr67.1%
associate-*l*67.1%
Applied egg-rr67.1%
Taylor expanded in x.re around 0 61.1%
*-commutative61.1%
unpow261.1%
associate-*l*79.8%
*-commutative79.8%
*-commutative79.8%
Simplified79.8%
Final simplification67.1%
x.re\_m = (fabs.f64 x.re)
x.re\_s = (copysign.f64 #s(literal 1 binary64) x.re)
(FPCore (x.re_s x.re_m x.im)
:precision binary64
(let* ((t_0 (* x.re_m (* x.re_m x.re_m))))
(*
x.re_s
(if (<= x.im 1.5e+27)
t_0
(if (<= x.im 4.4e+83)
(* -3.0 (* x.im (* x.re_m x.im)))
(if (<= x.im 1.2e+113) t_0 (* (* x.re_m x.im) (* x.im -3.0))))))))x.re\_m = fabs(x_46_re);
x.re\_s = copysign(1.0, x_46_re);
double code(double x_46_re_s, double x_46_re_m, double x_46_im) {
double t_0 = x_46_re_m * (x_46_re_m * x_46_re_m);
double tmp;
if (x_46_im <= 1.5e+27) {
tmp = t_0;
} else if (x_46_im <= 4.4e+83) {
tmp = -3.0 * (x_46_im * (x_46_re_m * x_46_im));
} else if (x_46_im <= 1.2e+113) {
tmp = t_0;
} else {
tmp = (x_46_re_m * x_46_im) * (x_46_im * -3.0);
}
return x_46_re_s * tmp;
}
x.re\_m = abs(x_46re)
x.re\_s = copysign(1.0d0, x_46re)
real(8) function code(x_46re_s, x_46re_m, x_46im)
real(8), intent (in) :: x_46re_s
real(8), intent (in) :: x_46re_m
real(8), intent (in) :: x_46im
real(8) :: t_0
real(8) :: tmp
t_0 = x_46re_m * (x_46re_m * x_46re_m)
if (x_46im <= 1.5d+27) then
tmp = t_0
else if (x_46im <= 4.4d+83) then
tmp = (-3.0d0) * (x_46im * (x_46re_m * x_46im))
else if (x_46im <= 1.2d+113) then
tmp = t_0
else
tmp = (x_46re_m * x_46im) * (x_46im * (-3.0d0))
end if
code = x_46re_s * tmp
end function
x.re\_m = Math.abs(x_46_re);
x.re\_s = Math.copySign(1.0, x_46_re);
public static double code(double x_46_re_s, double x_46_re_m, double x_46_im) {
double t_0 = x_46_re_m * (x_46_re_m * x_46_re_m);
double tmp;
if (x_46_im <= 1.5e+27) {
tmp = t_0;
} else if (x_46_im <= 4.4e+83) {
tmp = -3.0 * (x_46_im * (x_46_re_m * x_46_im));
} else if (x_46_im <= 1.2e+113) {
tmp = t_0;
} else {
tmp = (x_46_re_m * x_46_im) * (x_46_im * -3.0);
}
return x_46_re_s * tmp;
}
x.re\_m = math.fabs(x_46_re) x.re\_s = math.copysign(1.0, x_46_re) def code(x_46_re_s, x_46_re_m, x_46_im): t_0 = x_46_re_m * (x_46_re_m * x_46_re_m) tmp = 0 if x_46_im <= 1.5e+27: tmp = t_0 elif x_46_im <= 4.4e+83: tmp = -3.0 * (x_46_im * (x_46_re_m * x_46_im)) elif x_46_im <= 1.2e+113: tmp = t_0 else: tmp = (x_46_re_m * x_46_im) * (x_46_im * -3.0) return x_46_re_s * tmp
x.re\_m = abs(x_46_re) x.re\_s = copysign(1.0, x_46_re) function code(x_46_re_s, x_46_re_m, x_46_im) t_0 = Float64(x_46_re_m * Float64(x_46_re_m * x_46_re_m)) tmp = 0.0 if (x_46_im <= 1.5e+27) tmp = t_0; elseif (x_46_im <= 4.4e+83) tmp = Float64(-3.0 * Float64(x_46_im * Float64(x_46_re_m * x_46_im))); elseif (x_46_im <= 1.2e+113) tmp = t_0; else tmp = Float64(Float64(x_46_re_m * x_46_im) * Float64(x_46_im * -3.0)); end return Float64(x_46_re_s * tmp) end
x.re\_m = abs(x_46_re); x.re\_s = sign(x_46_re) * abs(1.0); function tmp_2 = code(x_46_re_s, x_46_re_m, x_46_im) t_0 = x_46_re_m * (x_46_re_m * x_46_re_m); tmp = 0.0; if (x_46_im <= 1.5e+27) tmp = t_0; elseif (x_46_im <= 4.4e+83) tmp = -3.0 * (x_46_im * (x_46_re_m * x_46_im)); elseif (x_46_im <= 1.2e+113) tmp = t_0; else tmp = (x_46_re_m * x_46_im) * (x_46_im * -3.0); end tmp_2 = x_46_re_s * tmp; end
x.re\_m = N[Abs[x$46$re], $MachinePrecision]
x.re\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[x$46$re]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[x$46$re$95$s_, x$46$re$95$m_, x$46$im_] := Block[{t$95$0 = N[(x$46$re$95$m * N[(x$46$re$95$m * x$46$re$95$m), $MachinePrecision]), $MachinePrecision]}, N[(x$46$re$95$s * If[LessEqual[x$46$im, 1.5e+27], t$95$0, If[LessEqual[x$46$im, 4.4e+83], N[(-3.0 * N[(x$46$im * N[(x$46$re$95$m * x$46$im), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x$46$im, 1.2e+113], t$95$0, N[(N[(x$46$re$95$m * x$46$im), $MachinePrecision] * N[(x$46$im * -3.0), $MachinePrecision]), $MachinePrecision]]]]), $MachinePrecision]]
\begin{array}{l}
x.re\_m = \left|x.re\right|
\\
x.re\_s = \mathsf{copysign}\left(1, x.re\right)
\\
\begin{array}{l}
t_0 := x.re\_m \cdot \left(x.re\_m \cdot x.re\_m\right)\\
x.re\_s \cdot \begin{array}{l}
\mathbf{if}\;x.im \leq 1.5 \cdot 10^{+27}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;x.im \leq 4.4 \cdot 10^{+83}:\\
\;\;\;\;-3 \cdot \left(x.im \cdot \left(x.re\_m \cdot x.im\right)\right)\\
\mathbf{elif}\;x.im \leq 1.2 \cdot 10^{+113}:\\
\;\;\;\;t\_0\\
\mathbf{else}:\\
\;\;\;\;\left(x.re\_m \cdot x.im\right) \cdot \left(x.im \cdot -3\right)\\
\end{array}
\end{array}
\end{array}
if x.im < 1.49999999999999988e27 or 4.39999999999999997e83 < x.im < 1.19999999999999992e113Initial program 82.8%
difference-of-squares86.3%
associate-*l*91.4%
Applied egg-rr91.4%
Taylor expanded in x.re around inf 63.6%
cube-unmult63.6%
Simplified63.6%
if 1.49999999999999988e27 < x.im < 4.39999999999999997e83Initial program 99.7%
Simplified99.7%
associate-*r*99.6%
associate-*r*99.4%
*-commutative99.4%
Applied egg-rr99.4%
cube-unmult99.4%
cancel-sign-sub-inv99.4%
associate-*r*99.6%
Applied egg-rr99.6%
associate-*l*99.4%
Applied egg-rr99.4%
Taylor expanded in x.re around 0 72.3%
*-commutative72.3%
unpow272.3%
associate-*l*72.5%
*-commutative72.5%
*-commutative72.5%
Simplified72.5%
if 1.19999999999999992e113 < x.im Initial program 46.9%
difference-of-squares58.2%
associate-*l*81.6%
Applied egg-rr81.6%
Taylor expanded in x.re around 0 58.2%
distribute-rgt-out--58.2%
metadata-eval58.2%
*-commutative58.2%
*-commutative58.2%
associate-*r*58.2%
metadata-eval58.2%
distribute-lft-neg-in58.2%
associate-*r*58.2%
*-commutative58.2%
unpow258.2%
associate-*r*58.2%
*-commutative58.2%
distribute-rgt-neg-in58.2%
distribute-rgt-neg-in58.2%
distribute-rgt-neg-in58.2%
metadata-eval58.2%
Simplified58.2%
associate-*r*81.7%
Applied egg-rr81.7%
Final simplification67.1%
x.re\_m = (fabs.f64 x.re)
x.re\_s = (copysign.f64 #s(literal 1 binary64) x.re)
(FPCore (x.re_s x.re_m x.im)
:precision binary64
(*
x.re_s
(if (<= x.re_m 1e+62)
(- (* x.re_m (* x.re_m x.re_m)) (* x.im (* x.re_m (* 3.0 x.im))))
(+ (* (+ x.re_m x.im) (* x.re_m (- x.re_m x.im))) (* x.im 0.0)))))x.re\_m = fabs(x_46_re);
x.re\_s = copysign(1.0, x_46_re);
double code(double x_46_re_s, double x_46_re_m, double x_46_im) {
double tmp;
if (x_46_re_m <= 1e+62) {
tmp = (x_46_re_m * (x_46_re_m * x_46_re_m)) - (x_46_im * (x_46_re_m * (3.0 * x_46_im)));
} else {
tmp = ((x_46_re_m + x_46_im) * (x_46_re_m * (x_46_re_m - x_46_im))) + (x_46_im * 0.0);
}
return x_46_re_s * tmp;
}
x.re\_m = abs(x_46re)
x.re\_s = copysign(1.0d0, x_46re)
real(8) function code(x_46re_s, x_46re_m, x_46im)
real(8), intent (in) :: x_46re_s
real(8), intent (in) :: x_46re_m
real(8), intent (in) :: x_46im
real(8) :: tmp
if (x_46re_m <= 1d+62) then
tmp = (x_46re_m * (x_46re_m * x_46re_m)) - (x_46im * (x_46re_m * (3.0d0 * x_46im)))
else
tmp = ((x_46re_m + x_46im) * (x_46re_m * (x_46re_m - x_46im))) + (x_46im * 0.0d0)
end if
code = x_46re_s * tmp
end function
x.re\_m = Math.abs(x_46_re);
x.re\_s = Math.copySign(1.0, x_46_re);
public static double code(double x_46_re_s, double x_46_re_m, double x_46_im) {
double tmp;
if (x_46_re_m <= 1e+62) {
tmp = (x_46_re_m * (x_46_re_m * x_46_re_m)) - (x_46_im * (x_46_re_m * (3.0 * x_46_im)));
} else {
tmp = ((x_46_re_m + x_46_im) * (x_46_re_m * (x_46_re_m - x_46_im))) + (x_46_im * 0.0);
}
return x_46_re_s * tmp;
}
x.re\_m = math.fabs(x_46_re) x.re\_s = math.copysign(1.0, x_46_re) def code(x_46_re_s, x_46_re_m, x_46_im): tmp = 0 if x_46_re_m <= 1e+62: tmp = (x_46_re_m * (x_46_re_m * x_46_re_m)) - (x_46_im * (x_46_re_m * (3.0 * x_46_im))) else: tmp = ((x_46_re_m + x_46_im) * (x_46_re_m * (x_46_re_m - x_46_im))) + (x_46_im * 0.0) return x_46_re_s * tmp
x.re\_m = abs(x_46_re) x.re\_s = copysign(1.0, x_46_re) function code(x_46_re_s, x_46_re_m, x_46_im) tmp = 0.0 if (x_46_re_m <= 1e+62) tmp = Float64(Float64(x_46_re_m * Float64(x_46_re_m * x_46_re_m)) - Float64(x_46_im * Float64(x_46_re_m * Float64(3.0 * x_46_im)))); else tmp = Float64(Float64(Float64(x_46_re_m + x_46_im) * Float64(x_46_re_m * Float64(x_46_re_m - x_46_im))) + Float64(x_46_im * 0.0)); end return Float64(x_46_re_s * tmp) end
x.re\_m = abs(x_46_re); x.re\_s = sign(x_46_re) * abs(1.0); function tmp_2 = code(x_46_re_s, x_46_re_m, x_46_im) tmp = 0.0; if (x_46_re_m <= 1e+62) tmp = (x_46_re_m * (x_46_re_m * x_46_re_m)) - (x_46_im * (x_46_re_m * (3.0 * x_46_im))); else tmp = ((x_46_re_m + x_46_im) * (x_46_re_m * (x_46_re_m - x_46_im))) + (x_46_im * 0.0); end tmp_2 = x_46_re_s * tmp; end
x.re\_m = N[Abs[x$46$re], $MachinePrecision]
x.re\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[x$46$re]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[x$46$re$95$s_, x$46$re$95$m_, x$46$im_] := N[(x$46$re$95$s * If[LessEqual[x$46$re$95$m, 1e+62], N[(N[(x$46$re$95$m * N[(x$46$re$95$m * x$46$re$95$m), $MachinePrecision]), $MachinePrecision] - N[(x$46$im * N[(x$46$re$95$m * N[(3.0 * x$46$im), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(x$46$re$95$m + x$46$im), $MachinePrecision] * N[(x$46$re$95$m * N[(x$46$re$95$m - x$46$im), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(x$46$im * 0.0), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
x.re\_m = \left|x.re\right|
\\
x.re\_s = \mathsf{copysign}\left(1, x.re\right)
\\
x.re\_s \cdot \begin{array}{l}
\mathbf{if}\;x.re\_m \leq 10^{+62}:\\
\;\;\;\;x.re\_m \cdot \left(x.re\_m \cdot x.re\_m\right) - x.im \cdot \left(x.re\_m \cdot \left(3 \cdot x.im\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\left(x.re\_m + x.im\right) \cdot \left(x.re\_m \cdot \left(x.re\_m - x.im\right)\right) + x.im \cdot 0\\
\end{array}
\end{array}
if x.re < 1.00000000000000004e62Initial program 80.8%
Simplified78.9%
associate-*r*78.9%
associate-*r*89.0%
*-commutative89.0%
Applied egg-rr89.0%
cube-unmult89.0%
cancel-sign-sub-inv89.0%
associate-*r*88.9%
Applied egg-rr88.9%
associate-*l*89.0%
Applied egg-rr89.0%
if 1.00000000000000004e62 < x.re Initial program 64.1%
difference-of-squares73.6%
associate-*l*73.6%
Applied egg-rr73.6%
flip-+0.0%
*-commutative0.0%
*-commutative0.0%
div-sub0.0%
*-commutative0.0%
*-commutative0.0%
Applied egg-rr0.0%
+-inverses100.0%
Simplified100.0%
Final simplification91.3%
x.re\_m = (fabs.f64 x.re)
x.re\_s = (copysign.f64 #s(literal 1 binary64) x.re)
(FPCore (x.re_s x.re_m x.im)
:precision binary64
(*
x.re_s
(if (<= x.re_m 1e+62)
(+ (* x.re_m (* x.re_m x.re_m)) (* -3.0 (* x.im (* x.re_m x.im))))
(+ (* (+ x.re_m x.im) (* x.re_m (- x.re_m x.im))) (* x.im 0.0)))))x.re\_m = fabs(x_46_re);
x.re\_s = copysign(1.0, x_46_re);
double code(double x_46_re_s, double x_46_re_m, double x_46_im) {
double tmp;
if (x_46_re_m <= 1e+62) {
tmp = (x_46_re_m * (x_46_re_m * x_46_re_m)) + (-3.0 * (x_46_im * (x_46_re_m * x_46_im)));
} else {
tmp = ((x_46_re_m + x_46_im) * (x_46_re_m * (x_46_re_m - x_46_im))) + (x_46_im * 0.0);
}
return x_46_re_s * tmp;
}
x.re\_m = abs(x_46re)
x.re\_s = copysign(1.0d0, x_46re)
real(8) function code(x_46re_s, x_46re_m, x_46im)
real(8), intent (in) :: x_46re_s
real(8), intent (in) :: x_46re_m
real(8), intent (in) :: x_46im
real(8) :: tmp
if (x_46re_m <= 1d+62) then
tmp = (x_46re_m * (x_46re_m * x_46re_m)) + ((-3.0d0) * (x_46im * (x_46re_m * x_46im)))
else
tmp = ((x_46re_m + x_46im) * (x_46re_m * (x_46re_m - x_46im))) + (x_46im * 0.0d0)
end if
code = x_46re_s * tmp
end function
x.re\_m = Math.abs(x_46_re);
x.re\_s = Math.copySign(1.0, x_46_re);
public static double code(double x_46_re_s, double x_46_re_m, double x_46_im) {
double tmp;
if (x_46_re_m <= 1e+62) {
tmp = (x_46_re_m * (x_46_re_m * x_46_re_m)) + (-3.0 * (x_46_im * (x_46_re_m * x_46_im)));
} else {
tmp = ((x_46_re_m + x_46_im) * (x_46_re_m * (x_46_re_m - x_46_im))) + (x_46_im * 0.0);
}
return x_46_re_s * tmp;
}
x.re\_m = math.fabs(x_46_re) x.re\_s = math.copysign(1.0, x_46_re) def code(x_46_re_s, x_46_re_m, x_46_im): tmp = 0 if x_46_re_m <= 1e+62: tmp = (x_46_re_m * (x_46_re_m * x_46_re_m)) + (-3.0 * (x_46_im * (x_46_re_m * x_46_im))) else: tmp = ((x_46_re_m + x_46_im) * (x_46_re_m * (x_46_re_m - x_46_im))) + (x_46_im * 0.0) return x_46_re_s * tmp
x.re\_m = abs(x_46_re) x.re\_s = copysign(1.0, x_46_re) function code(x_46_re_s, x_46_re_m, x_46_im) tmp = 0.0 if (x_46_re_m <= 1e+62) tmp = Float64(Float64(x_46_re_m * Float64(x_46_re_m * x_46_re_m)) + Float64(-3.0 * Float64(x_46_im * Float64(x_46_re_m * x_46_im)))); else tmp = Float64(Float64(Float64(x_46_re_m + x_46_im) * Float64(x_46_re_m * Float64(x_46_re_m - x_46_im))) + Float64(x_46_im * 0.0)); end return Float64(x_46_re_s * tmp) end
x.re\_m = abs(x_46_re); x.re\_s = sign(x_46_re) * abs(1.0); function tmp_2 = code(x_46_re_s, x_46_re_m, x_46_im) tmp = 0.0; if (x_46_re_m <= 1e+62) tmp = (x_46_re_m * (x_46_re_m * x_46_re_m)) + (-3.0 * (x_46_im * (x_46_re_m * x_46_im))); else tmp = ((x_46_re_m + x_46_im) * (x_46_re_m * (x_46_re_m - x_46_im))) + (x_46_im * 0.0); end tmp_2 = x_46_re_s * tmp; end
x.re\_m = N[Abs[x$46$re], $MachinePrecision]
x.re\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[x$46$re]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[x$46$re$95$s_, x$46$re$95$m_, x$46$im_] := N[(x$46$re$95$s * If[LessEqual[x$46$re$95$m, 1e+62], N[(N[(x$46$re$95$m * N[(x$46$re$95$m * x$46$re$95$m), $MachinePrecision]), $MachinePrecision] + N[(-3.0 * N[(x$46$im * N[(x$46$re$95$m * x$46$im), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(x$46$re$95$m + x$46$im), $MachinePrecision] * N[(x$46$re$95$m * N[(x$46$re$95$m - x$46$im), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(x$46$im * 0.0), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
x.re\_m = \left|x.re\right|
\\
x.re\_s = \mathsf{copysign}\left(1, x.re\right)
\\
x.re\_s \cdot \begin{array}{l}
\mathbf{if}\;x.re\_m \leq 10^{+62}:\\
\;\;\;\;x.re\_m \cdot \left(x.re\_m \cdot x.re\_m\right) + -3 \cdot \left(x.im \cdot \left(x.re\_m \cdot x.im\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\left(x.re\_m + x.im\right) \cdot \left(x.re\_m \cdot \left(x.re\_m - x.im\right)\right) + x.im \cdot 0\\
\end{array}
\end{array}
if x.re < 1.00000000000000004e62Initial program 80.8%
Simplified78.9%
associate-*r*78.9%
associate-*r*89.0%
*-commutative89.0%
Applied egg-rr89.0%
cube-unmult89.0%
cancel-sign-sub-inv89.0%
associate-*r*88.9%
Applied egg-rr88.9%
*-commutative88.9%
distribute-rgt-neg-in88.9%
metadata-eval88.9%
Applied egg-rr88.9%
associate-*r*89.0%
*-commutative89.0%
Simplified89.0%
if 1.00000000000000004e62 < x.re Initial program 64.1%
difference-of-squares73.6%
associate-*l*73.6%
Applied egg-rr73.6%
flip-+0.0%
*-commutative0.0%
*-commutative0.0%
div-sub0.0%
*-commutative0.0%
*-commutative0.0%
Applied egg-rr0.0%
+-inverses100.0%
Simplified100.0%
Final simplification91.2%
x.re\_m = (fabs.f64 x.re)
x.re\_s = (copysign.f64 #s(literal 1 binary64) x.re)
(FPCore (x.re_s x.re_m x.im)
:precision binary64
(*
x.re_s
(if (<= x.im 3.7e+151)
(* x.re_m (- (* x.re_m x.re_m) (* x.im (* 3.0 x.im))))
(* (* x.re_m x.im) (* x.im -3.0)))))x.re\_m = fabs(x_46_re);
x.re\_s = copysign(1.0, x_46_re);
double code(double x_46_re_s, double x_46_re_m, double x_46_im) {
double tmp;
if (x_46_im <= 3.7e+151) {
tmp = x_46_re_m * ((x_46_re_m * x_46_re_m) - (x_46_im * (3.0 * x_46_im)));
} else {
tmp = (x_46_re_m * x_46_im) * (x_46_im * -3.0);
}
return x_46_re_s * tmp;
}
x.re\_m = abs(x_46re)
x.re\_s = copysign(1.0d0, x_46re)
real(8) function code(x_46re_s, x_46re_m, x_46im)
real(8), intent (in) :: x_46re_s
real(8), intent (in) :: x_46re_m
real(8), intent (in) :: x_46im
real(8) :: tmp
if (x_46im <= 3.7d+151) then
tmp = x_46re_m * ((x_46re_m * x_46re_m) - (x_46im * (3.0d0 * x_46im)))
else
tmp = (x_46re_m * x_46im) * (x_46im * (-3.0d0))
end if
code = x_46re_s * tmp
end function
x.re\_m = Math.abs(x_46_re);
x.re\_s = Math.copySign(1.0, x_46_re);
public static double code(double x_46_re_s, double x_46_re_m, double x_46_im) {
double tmp;
if (x_46_im <= 3.7e+151) {
tmp = x_46_re_m * ((x_46_re_m * x_46_re_m) - (x_46_im * (3.0 * x_46_im)));
} else {
tmp = (x_46_re_m * x_46_im) * (x_46_im * -3.0);
}
return x_46_re_s * tmp;
}
x.re\_m = math.fabs(x_46_re) x.re\_s = math.copysign(1.0, x_46_re) def code(x_46_re_s, x_46_re_m, x_46_im): tmp = 0 if x_46_im <= 3.7e+151: tmp = x_46_re_m * ((x_46_re_m * x_46_re_m) - (x_46_im * (3.0 * x_46_im))) else: tmp = (x_46_re_m * x_46_im) * (x_46_im * -3.0) return x_46_re_s * tmp
x.re\_m = abs(x_46_re) x.re\_s = copysign(1.0, x_46_re) function code(x_46_re_s, x_46_re_m, x_46_im) tmp = 0.0 if (x_46_im <= 3.7e+151) tmp = Float64(x_46_re_m * Float64(Float64(x_46_re_m * x_46_re_m) - Float64(x_46_im * Float64(3.0 * x_46_im)))); else tmp = Float64(Float64(x_46_re_m * x_46_im) * Float64(x_46_im * -3.0)); end return Float64(x_46_re_s * tmp) end
x.re\_m = abs(x_46_re); x.re\_s = sign(x_46_re) * abs(1.0); function tmp_2 = code(x_46_re_s, x_46_re_m, x_46_im) tmp = 0.0; if (x_46_im <= 3.7e+151) tmp = x_46_re_m * ((x_46_re_m * x_46_re_m) - (x_46_im * (3.0 * x_46_im))); else tmp = (x_46_re_m * x_46_im) * (x_46_im * -3.0); end tmp_2 = x_46_re_s * tmp; end
x.re\_m = N[Abs[x$46$re], $MachinePrecision]
x.re\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[x$46$re]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[x$46$re$95$s_, x$46$re$95$m_, x$46$im_] := N[(x$46$re$95$s * If[LessEqual[x$46$im, 3.7e+151], N[(x$46$re$95$m * N[(N[(x$46$re$95$m * x$46$re$95$m), $MachinePrecision] - N[(x$46$im * N[(3.0 * x$46$im), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x$46$re$95$m * x$46$im), $MachinePrecision] * N[(x$46$im * -3.0), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
x.re\_m = \left|x.re\right|
\\
x.re\_s = \mathsf{copysign}\left(1, x.re\right)
\\
x.re\_s \cdot \begin{array}{l}
\mathbf{if}\;x.im \leq 3.7 \cdot 10^{+151}:\\
\;\;\;\;x.re\_m \cdot \left(x.re\_m \cdot x.re\_m - x.im \cdot \left(3 \cdot x.im\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\left(x.re\_m \cdot x.im\right) \cdot \left(x.im \cdot -3\right)\\
\end{array}
\end{array}
if x.im < 3.6999999999999997e151Initial program 83.7%
Simplified81.4%
cube-mult81.4%
distribute-lft-out--88.7%
*-commutative88.7%
associate-*l*88.7%
Applied egg-rr88.7%
if 3.6999999999999997e151 < x.im Initial program 41.1%
difference-of-squares54.3%
associate-*l*81.4%
Applied egg-rr81.4%
Taylor expanded in x.re around 0 54.3%
distribute-rgt-out--54.3%
metadata-eval54.3%
*-commutative54.3%
*-commutative54.3%
associate-*r*54.3%
metadata-eval54.3%
distribute-lft-neg-in54.3%
associate-*r*54.3%
*-commutative54.3%
unpow254.3%
associate-*r*54.3%
*-commutative54.3%
distribute-rgt-neg-in54.3%
distribute-rgt-neg-in54.3%
distribute-rgt-neg-in54.3%
metadata-eval54.3%
Simplified54.3%
associate-*r*81.5%
Applied egg-rr81.5%
Final simplification87.6%
x.re\_m = (fabs.f64 x.re) x.re\_s = (copysign.f64 #s(literal 1 binary64) x.re) (FPCore (x.re_s x.re_m x.im) :precision binary64 (* x.re_s (* x.re_m (* x.re_m x.re_m))))
x.re\_m = fabs(x_46_re);
x.re\_s = copysign(1.0, x_46_re);
double code(double x_46_re_s, double x_46_re_m, double x_46_im) {
return x_46_re_s * (x_46_re_m * (x_46_re_m * x_46_re_m));
}
x.re\_m = abs(x_46re)
x.re\_s = copysign(1.0d0, x_46re)
real(8) function code(x_46re_s, x_46re_m, x_46im)
real(8), intent (in) :: x_46re_s
real(8), intent (in) :: x_46re_m
real(8), intent (in) :: x_46im
code = x_46re_s * (x_46re_m * (x_46re_m * x_46re_m))
end function
x.re\_m = Math.abs(x_46_re);
x.re\_s = Math.copySign(1.0, x_46_re);
public static double code(double x_46_re_s, double x_46_re_m, double x_46_im) {
return x_46_re_s * (x_46_re_m * (x_46_re_m * x_46_re_m));
}
x.re\_m = math.fabs(x_46_re) x.re\_s = math.copysign(1.0, x_46_re) def code(x_46_re_s, x_46_re_m, x_46_im): return x_46_re_s * (x_46_re_m * (x_46_re_m * x_46_re_m))
x.re\_m = abs(x_46_re) x.re\_s = copysign(1.0, x_46_re) function code(x_46_re_s, x_46_re_m, x_46_im) return Float64(x_46_re_s * Float64(x_46_re_m * Float64(x_46_re_m * x_46_re_m))) end
x.re\_m = abs(x_46_re); x.re\_s = sign(x_46_re) * abs(1.0); function tmp = code(x_46_re_s, x_46_re_m, x_46_im) tmp = x_46_re_s * (x_46_re_m * (x_46_re_m * x_46_re_m)); end
x.re\_m = N[Abs[x$46$re], $MachinePrecision]
x.re\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[x$46$re]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[x$46$re$95$s_, x$46$re$95$m_, x$46$im_] := N[(x$46$re$95$s * N[(x$46$re$95$m * N[(x$46$re$95$m * x$46$re$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
x.re\_m = \left|x.re\right|
\\
x.re\_s = \mathsf{copysign}\left(1, x.re\right)
\\
x.re\_s \cdot \left(x.re\_m \cdot \left(x.re\_m \cdot x.re\_m\right)\right)
\end{array}
Initial program 77.4%
difference-of-squares82.1%
associate-*l*90.1%
Applied egg-rr90.1%
Taylor expanded in x.re around inf 54.5%
cube-unmult54.5%
Simplified54.5%
(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 2024107
(FPCore (x.re x.im)
:name "math.cube on complex, real part"
:precision binary64
:alt
(+ (* (* 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)))