
(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 15 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x.re x.im) :precision binary64 (+ (* (- (* x.re x.re) (* x.im x.im)) x.im) (* (+ (* x.re x.im) (* x.im x.re)) x.re)))
double code(double x_46_re, double x_46_im) {
return (((x_46_re * x_46_re) - (x_46_im * x_46_im)) * x_46_im) + (((x_46_re * x_46_im) + (x_46_im * x_46_re)) * x_46_re);
}
real(8) function code(x_46re, x_46im)
real(8), intent (in) :: x_46re
real(8), intent (in) :: x_46im
code = (((x_46re * x_46re) - (x_46im * x_46im)) * x_46im) + (((x_46re * x_46im) + (x_46im * x_46re)) * x_46re)
end function
public static double code(double x_46_re, double x_46_im) {
return (((x_46_re * x_46_re) - (x_46_im * x_46_im)) * x_46_im) + (((x_46_re * x_46_im) + (x_46_im * x_46_re)) * x_46_re);
}
def code(x_46_re, x_46_im): return (((x_46_re * x_46_re) - (x_46_im * x_46_im)) * x_46_im) + (((x_46_re * x_46_im) + (x_46_im * x_46_re)) * x_46_re)
function code(x_46_re, x_46_im) return Float64(Float64(Float64(Float64(x_46_re * x_46_re) - Float64(x_46_im * x_46_im)) * x_46_im) + Float64(Float64(Float64(x_46_re * x_46_im) + Float64(x_46_im * x_46_re)) * x_46_re)) end
function tmp = code(x_46_re, x_46_im) tmp = (((x_46_re * x_46_re) - (x_46_im * x_46_im)) * x_46_im) + (((x_46_re * x_46_im) + (x_46_im * x_46_re)) * x_46_re); end
code[x$46$re_, x$46$im_] := N[(N[(N[(N[(x$46$re * x$46$re), $MachinePrecision] - N[(x$46$im * x$46$im), $MachinePrecision]), $MachinePrecision] * x$46$im), $MachinePrecision] + N[(N[(N[(x$46$re * x$46$im), $MachinePrecision] + N[(x$46$im * x$46$re), $MachinePrecision]), $MachinePrecision] * x$46$re), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(x.re \cdot x.re - x.im \cdot x.im\right) \cdot x.im + \left(x.re \cdot x.im + x.im \cdot x.re\right) \cdot x.re
\end{array}
x.re_m = (fabs.f64 x.re)
(FPCore (x.re_m x.im)
:precision binary64
(if (<=
(+
(* x.im (- (* x.re_m x.re_m) (* x.im x.im)))
(* x.re_m (+ (* x.re_m x.im) (* x.re_m x.im))))
INFINITY)
(+
(* (* x.im (+ x.re_m x.im)) (- x.re_m x.im))
(* x.re_m (* x.re_m (+ x.im x.im))))
(/
1.0
(/ 1.0 (fma x.im (* (+ x.re_m x.im) (- x.re_m x.im)) (+ x.im x.im))))))x.re_m = fabs(x_46_re);
double code(double x_46_re_m, double x_46_im) {
double tmp;
if (((x_46_im * ((x_46_re_m * x_46_re_m) - (x_46_im * x_46_im))) + (x_46_re_m * ((x_46_re_m * x_46_im) + (x_46_re_m * x_46_im)))) <= ((double) INFINITY)) {
tmp = ((x_46_im * (x_46_re_m + x_46_im)) * (x_46_re_m - x_46_im)) + (x_46_re_m * (x_46_re_m * (x_46_im + x_46_im)));
} else {
tmp = 1.0 / (1.0 / fma(x_46_im, ((x_46_re_m + x_46_im) * (x_46_re_m - x_46_im)), (x_46_im + x_46_im)));
}
return tmp;
}
x.re_m = abs(x_46_re) function code(x_46_re_m, x_46_im) tmp = 0.0 if (Float64(Float64(x_46_im * Float64(Float64(x_46_re_m * x_46_re_m) - Float64(x_46_im * x_46_im))) + Float64(x_46_re_m * Float64(Float64(x_46_re_m * x_46_im) + Float64(x_46_re_m * x_46_im)))) <= Inf) tmp = Float64(Float64(Float64(x_46_im * Float64(x_46_re_m + x_46_im)) * Float64(x_46_re_m - x_46_im)) + Float64(x_46_re_m * Float64(x_46_re_m * Float64(x_46_im + x_46_im)))); else tmp = Float64(1.0 / Float64(1.0 / fma(x_46_im, Float64(Float64(x_46_re_m + x_46_im) * Float64(x_46_re_m - x_46_im)), Float64(x_46_im + x_46_im)))); end return tmp end
x.re_m = N[Abs[x$46$re], $MachinePrecision] code[x$46$re$95$m_, x$46$im_] := If[LessEqual[N[(N[(x$46$im * N[(N[(x$46$re$95$m * x$46$re$95$m), $MachinePrecision] - N[(x$46$im * x$46$im), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(x$46$re$95$m * N[(N[(x$46$re$95$m * x$46$im), $MachinePrecision] + N[(x$46$re$95$m * x$46$im), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], Infinity], N[(N[(N[(x$46$im * N[(x$46$re$95$m + x$46$im), $MachinePrecision]), $MachinePrecision] * N[(x$46$re$95$m - x$46$im), $MachinePrecision]), $MachinePrecision] + N[(x$46$re$95$m * N[(x$46$re$95$m * N[(x$46$im + x$46$im), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(1.0 / N[(1.0 / N[(x$46$im * N[(N[(x$46$re$95$m + x$46$im), $MachinePrecision] * N[(x$46$re$95$m - x$46$im), $MachinePrecision]), $MachinePrecision] + N[(x$46$im + x$46$im), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
x.re_m = \left|x.re\right|
\\
\begin{array}{l}
\mathbf{if}\;x.im \cdot \left(x.re\_m \cdot x.re\_m - x.im \cdot x.im\right) + x.re\_m \cdot \left(x.re\_m \cdot x.im + x.re\_m \cdot x.im\right) \leq \infty:\\
\;\;\;\;\left(x.im \cdot \left(x.re\_m + x.im\right)\right) \cdot \left(x.re\_m - x.im\right) + x.re\_m \cdot \left(x.re\_m \cdot \left(x.im + x.im\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\frac{1}{\mathsf{fma}\left(x.im, \left(x.re\_m + x.im\right) \cdot \left(x.re\_m - x.im\right), x.im + x.im\right)}}\\
\end{array}
\end{array}
if (+.f64 (*.f64 (-.f64 (*.f64 x.re x.re) (*.f64 x.im x.im)) x.im) (*.f64 (+.f64 (*.f64 x.re x.im) (*.f64 x.im x.re)) x.re)) < +inf.0Initial program 93.5%
lift-*.f64N/A
lift-*.f64N/A
lift--.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-+.f64N/A
lift-*.f64N/A
lift-+.f6493.5
Applied egg-rr99.8%
if +inf.0 < (+.f64 (*.f64 (-.f64 (*.f64 x.re x.re) (*.f64 x.im x.im)) x.im) (*.f64 (+.f64 (*.f64 x.re x.im) (*.f64 x.im x.re)) x.re)) Initial program 0.0%
lift-*.f64N/A
lift-*.f64N/A
lift--.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-+.f64N/A
lift-*.f64N/A
+-commutativeN/A
lift-*.f64N/A
lower-fma.f6440.9
lift-+.f64N/A
lift-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
distribute-rgt-outN/A
lower-*.f64N/A
lower-+.f6440.9
lift-*.f64N/A
*-commutativeN/A
Applied egg-rr50.0%
Applied egg-rr100.0%
Final simplification99.8%
x.re_m = (fabs.f64 x.re)
(FPCore (x.re_m x.im)
:precision binary64
(let* ((t_0
(+
(* x.im (- (* x.re_m x.re_m) (* x.im x.im)))
(* x.re_m (+ (* x.re_m x.im) (* x.re_m x.im)))))
(t_1 (- (* x.im (* x.im x.im)))))
(if (<= t_0 -5e-323)
t_1
(if (<= t_0 INFINITY)
(* x.re_m (fma x.re_m (+ x.im x.im) (* x.re_m x.im)))
t_1))))x.re_m = fabs(x_46_re);
double code(double x_46_re_m, double x_46_im) {
double t_0 = (x_46_im * ((x_46_re_m * x_46_re_m) - (x_46_im * x_46_im))) + (x_46_re_m * ((x_46_re_m * x_46_im) + (x_46_re_m * x_46_im)));
double t_1 = -(x_46_im * (x_46_im * x_46_im));
double tmp;
if (t_0 <= -5e-323) {
tmp = t_1;
} else if (t_0 <= ((double) INFINITY)) {
tmp = x_46_re_m * fma(x_46_re_m, (x_46_im + x_46_im), (x_46_re_m * x_46_im));
} else {
tmp = t_1;
}
return tmp;
}
x.re_m = abs(x_46_re) function code(x_46_re_m, x_46_im) t_0 = Float64(Float64(x_46_im * Float64(Float64(x_46_re_m * x_46_re_m) - Float64(x_46_im * x_46_im))) + Float64(x_46_re_m * Float64(Float64(x_46_re_m * x_46_im) + Float64(x_46_re_m * x_46_im)))) t_1 = Float64(-Float64(x_46_im * Float64(x_46_im * x_46_im))) tmp = 0.0 if (t_0 <= -5e-323) tmp = t_1; elseif (t_0 <= Inf) tmp = Float64(x_46_re_m * fma(x_46_re_m, Float64(x_46_im + x_46_im), Float64(x_46_re_m * x_46_im))); else tmp = t_1; end return tmp end
x.re_m = N[Abs[x$46$re], $MachinePrecision]
code[x$46$re$95$m_, x$46$im_] := Block[{t$95$0 = N[(N[(x$46$im * N[(N[(x$46$re$95$m * x$46$re$95$m), $MachinePrecision] - N[(x$46$im * x$46$im), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(x$46$re$95$m * N[(N[(x$46$re$95$m * x$46$im), $MachinePrecision] + N[(x$46$re$95$m * x$46$im), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = (-N[(x$46$im * N[(x$46$im * x$46$im), $MachinePrecision]), $MachinePrecision])}, If[LessEqual[t$95$0, -5e-323], t$95$1, If[LessEqual[t$95$0, Infinity], N[(x$46$re$95$m * N[(x$46$re$95$m * N[(x$46$im + x$46$im), $MachinePrecision] + N[(x$46$re$95$m * x$46$im), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
x.re_m = \left|x.re\right|
\\
\begin{array}{l}
t_0 := x.im \cdot \left(x.re\_m \cdot x.re\_m - x.im \cdot x.im\right) + x.re\_m \cdot \left(x.re\_m \cdot x.im + x.re\_m \cdot x.im\right)\\
t_1 := -x.im \cdot \left(x.im \cdot x.im\right)\\
\mathbf{if}\;t\_0 \leq -5 \cdot 10^{-323}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t\_0 \leq \infty:\\
\;\;\;\;x.re\_m \cdot \mathsf{fma}\left(x.re\_m, x.im + x.im, x.re\_m \cdot x.im\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if (+.f64 (*.f64 (-.f64 (*.f64 x.re x.re) (*.f64 x.im x.im)) x.im) (*.f64 (+.f64 (*.f64 x.re x.im) (*.f64 x.im x.re)) x.re)) < -4.94066e-323 or +inf.0 < (+.f64 (*.f64 (-.f64 (*.f64 x.re x.re) (*.f64 x.im x.im)) x.im) (*.f64 (+.f64 (*.f64 x.re x.im) (*.f64 x.im x.re)) x.re)) Initial program 72.6%
Taylor expanded in x.re around 0
mul-1-negN/A
unpow3N/A
unpow2N/A
distribute-rgt-neg-inN/A
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
lower-neg.f6457.6
Simplified57.6%
if -4.94066e-323 < (+.f64 (*.f64 (-.f64 (*.f64 x.re x.re) (*.f64 x.im x.im)) x.im) (*.f64 (+.f64 (*.f64 x.re x.im) (*.f64 x.im x.re)) x.re)) < +inf.0Initial program 94.8%
lift-*.f64N/A
lift-*.f64N/A
lift--.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-+.f64N/A
lift-*.f64N/A
+-commutativeN/A
lift-*.f64N/A
lower-fma.f6494.8
lift-+.f64N/A
lift-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
distribute-rgt-outN/A
lower-*.f64N/A
lower-+.f6494.8
lift-*.f64N/A
*-commutativeN/A
Applied egg-rr99.8%
Taylor expanded in x.im around 0
lower-*.f64N/A
unpow2N/A
lower-*.f6460.0
Simplified60.0%
lift-+.f64N/A
lift-*.f64N/A
associate-*r*N/A
*-commutativeN/A
lift-*.f64N/A
distribute-rgt-outN/A
lower-*.f64N/A
lift-*.f64N/A
lower-fma.f6465.0
Applied egg-rr65.0%
Final simplification61.9%
x.re_m = (fabs.f64 x.re)
(FPCore (x.re_m x.im)
:precision binary64
(let* ((t_0
(+
(* x.im (- (* x.re_m x.re_m) (* x.im x.im)))
(* x.re_m (+ (* x.re_m x.im) (* x.re_m x.im)))))
(t_1 (- (* x.im (* x.im x.im)))))
(if (<= t_0 -5e-323)
t_1
(if (<= t_0 INFINITY) (* x.re_m (* x.re_m (* x.im 3.0))) t_1))))x.re_m = fabs(x_46_re);
double code(double x_46_re_m, double x_46_im) {
double t_0 = (x_46_im * ((x_46_re_m * x_46_re_m) - (x_46_im * x_46_im))) + (x_46_re_m * ((x_46_re_m * x_46_im) + (x_46_re_m * x_46_im)));
double t_1 = -(x_46_im * (x_46_im * x_46_im));
double tmp;
if (t_0 <= -5e-323) {
tmp = t_1;
} else if (t_0 <= ((double) INFINITY)) {
tmp = x_46_re_m * (x_46_re_m * (x_46_im * 3.0));
} else {
tmp = t_1;
}
return tmp;
}
x.re_m = Math.abs(x_46_re);
public static double code(double x_46_re_m, double x_46_im) {
double t_0 = (x_46_im * ((x_46_re_m * x_46_re_m) - (x_46_im * x_46_im))) + (x_46_re_m * ((x_46_re_m * x_46_im) + (x_46_re_m * x_46_im)));
double t_1 = -(x_46_im * (x_46_im * x_46_im));
double tmp;
if (t_0 <= -5e-323) {
tmp = t_1;
} else if (t_0 <= Double.POSITIVE_INFINITY) {
tmp = x_46_re_m * (x_46_re_m * (x_46_im * 3.0));
} else {
tmp = t_1;
}
return tmp;
}
x.re_m = math.fabs(x_46_re) def code(x_46_re_m, x_46_im): t_0 = (x_46_im * ((x_46_re_m * x_46_re_m) - (x_46_im * x_46_im))) + (x_46_re_m * ((x_46_re_m * x_46_im) + (x_46_re_m * x_46_im))) t_1 = -(x_46_im * (x_46_im * x_46_im)) tmp = 0 if t_0 <= -5e-323: tmp = t_1 elif t_0 <= math.inf: tmp = x_46_re_m * (x_46_re_m * (x_46_im * 3.0)) else: tmp = t_1 return tmp
x.re_m = abs(x_46_re) function code(x_46_re_m, x_46_im) t_0 = Float64(Float64(x_46_im * Float64(Float64(x_46_re_m * x_46_re_m) - Float64(x_46_im * x_46_im))) + Float64(x_46_re_m * Float64(Float64(x_46_re_m * x_46_im) + Float64(x_46_re_m * x_46_im)))) t_1 = Float64(-Float64(x_46_im * Float64(x_46_im * x_46_im))) tmp = 0.0 if (t_0 <= -5e-323) tmp = t_1; elseif (t_0 <= Inf) tmp = Float64(x_46_re_m * Float64(x_46_re_m * Float64(x_46_im * 3.0))); else tmp = t_1; end return tmp end
x.re_m = abs(x_46_re); function tmp_2 = code(x_46_re_m, x_46_im) t_0 = (x_46_im * ((x_46_re_m * x_46_re_m) - (x_46_im * x_46_im))) + (x_46_re_m * ((x_46_re_m * x_46_im) + (x_46_re_m * x_46_im))); t_1 = -(x_46_im * (x_46_im * x_46_im)); tmp = 0.0; if (t_0 <= -5e-323) tmp = t_1; elseif (t_0 <= Inf) tmp = x_46_re_m * (x_46_re_m * (x_46_im * 3.0)); else tmp = t_1; end tmp_2 = tmp; end
x.re_m = N[Abs[x$46$re], $MachinePrecision]
code[x$46$re$95$m_, x$46$im_] := Block[{t$95$0 = N[(N[(x$46$im * N[(N[(x$46$re$95$m * x$46$re$95$m), $MachinePrecision] - N[(x$46$im * x$46$im), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(x$46$re$95$m * N[(N[(x$46$re$95$m * x$46$im), $MachinePrecision] + N[(x$46$re$95$m * x$46$im), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = (-N[(x$46$im * N[(x$46$im * x$46$im), $MachinePrecision]), $MachinePrecision])}, If[LessEqual[t$95$0, -5e-323], t$95$1, If[LessEqual[t$95$0, Infinity], N[(x$46$re$95$m * N[(x$46$re$95$m * N[(x$46$im * 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
x.re_m = \left|x.re\right|
\\
\begin{array}{l}
t_0 := x.im \cdot \left(x.re\_m \cdot x.re\_m - x.im \cdot x.im\right) + x.re\_m \cdot \left(x.re\_m \cdot x.im + x.re\_m \cdot x.im\right)\\
t_1 := -x.im \cdot \left(x.im \cdot x.im\right)\\
\mathbf{if}\;t\_0 \leq -5 \cdot 10^{-323}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t\_0 \leq \infty:\\
\;\;\;\;x.re\_m \cdot \left(x.re\_m \cdot \left(x.im \cdot 3\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if (+.f64 (*.f64 (-.f64 (*.f64 x.re x.re) (*.f64 x.im x.im)) x.im) (*.f64 (+.f64 (*.f64 x.re x.im) (*.f64 x.im x.re)) x.re)) < -4.94066e-323 or +inf.0 < (+.f64 (*.f64 (-.f64 (*.f64 x.re x.re) (*.f64 x.im x.im)) x.im) (*.f64 (+.f64 (*.f64 x.re x.im) (*.f64 x.im x.re)) x.re)) Initial program 72.6%
Taylor expanded in x.re around 0
mul-1-negN/A
unpow3N/A
unpow2N/A
distribute-rgt-neg-inN/A
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
lower-neg.f6457.6
Simplified57.6%
if -4.94066e-323 < (+.f64 (*.f64 (-.f64 (*.f64 x.re x.re) (*.f64 x.im x.im)) x.im) (*.f64 (+.f64 (*.f64 x.re x.im) (*.f64 x.im x.re)) x.re)) < +inf.0Initial program 94.8%
Taylor expanded in x.re around inf
distribute-rgt1-inN/A
metadata-evalN/A
associate-*r*N/A
*-commutativeN/A
metadata-evalN/A
distribute-lft1-inN/A
*-rgt-identityN/A
*-inversesN/A
associate-/l*N/A
unpow2N/A
cube-multN/A
associate-/l*N/A
associate-*l/N/A
distribute-lft1-inN/A
metadata-evalN/A
associate-*r/N/A
associate-*l*N/A
metadata-evalN/A
metadata-evalN/A
distribute-lft-neg-inN/A
Simplified60.0%
lift-*.f64N/A
associate-*r*N/A
lift-*.f64N/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f6464.9
Applied egg-rr64.9%
Final simplification61.9%
x.re_m = (fabs.f64 x.re)
(FPCore (x.re_m x.im)
:precision binary64
(let* ((t_0
(+
(* x.im (- (* x.re_m x.re_m) (* x.im x.im)))
(* x.re_m (+ (* x.re_m x.im) (* x.re_m x.im)))))
(t_1 (- (* x.im (* x.im x.im)))))
(if (<= t_0 -5e-323)
t_1
(if (<= t_0 INFINITY) (* (* x.re_m x.im) (* x.re_m 3.0)) t_1))))x.re_m = fabs(x_46_re);
double code(double x_46_re_m, double x_46_im) {
double t_0 = (x_46_im * ((x_46_re_m * x_46_re_m) - (x_46_im * x_46_im))) + (x_46_re_m * ((x_46_re_m * x_46_im) + (x_46_re_m * x_46_im)));
double t_1 = -(x_46_im * (x_46_im * x_46_im));
double tmp;
if (t_0 <= -5e-323) {
tmp = t_1;
} else if (t_0 <= ((double) INFINITY)) {
tmp = (x_46_re_m * x_46_im) * (x_46_re_m * 3.0);
} else {
tmp = t_1;
}
return tmp;
}
x.re_m = Math.abs(x_46_re);
public static double code(double x_46_re_m, double x_46_im) {
double t_0 = (x_46_im * ((x_46_re_m * x_46_re_m) - (x_46_im * x_46_im))) + (x_46_re_m * ((x_46_re_m * x_46_im) + (x_46_re_m * x_46_im)));
double t_1 = -(x_46_im * (x_46_im * x_46_im));
double tmp;
if (t_0 <= -5e-323) {
tmp = t_1;
} else if (t_0 <= Double.POSITIVE_INFINITY) {
tmp = (x_46_re_m * x_46_im) * (x_46_re_m * 3.0);
} else {
tmp = t_1;
}
return tmp;
}
x.re_m = math.fabs(x_46_re) def code(x_46_re_m, x_46_im): t_0 = (x_46_im * ((x_46_re_m * x_46_re_m) - (x_46_im * x_46_im))) + (x_46_re_m * ((x_46_re_m * x_46_im) + (x_46_re_m * x_46_im))) t_1 = -(x_46_im * (x_46_im * x_46_im)) tmp = 0 if t_0 <= -5e-323: tmp = t_1 elif t_0 <= math.inf: tmp = (x_46_re_m * x_46_im) * (x_46_re_m * 3.0) else: tmp = t_1 return tmp
x.re_m = abs(x_46_re) function code(x_46_re_m, x_46_im) t_0 = Float64(Float64(x_46_im * Float64(Float64(x_46_re_m * x_46_re_m) - Float64(x_46_im * x_46_im))) + Float64(x_46_re_m * Float64(Float64(x_46_re_m * x_46_im) + Float64(x_46_re_m * x_46_im)))) t_1 = Float64(-Float64(x_46_im * Float64(x_46_im * x_46_im))) tmp = 0.0 if (t_0 <= -5e-323) tmp = t_1; elseif (t_0 <= Inf) tmp = Float64(Float64(x_46_re_m * x_46_im) * Float64(x_46_re_m * 3.0)); else tmp = t_1; end return tmp end
x.re_m = abs(x_46_re); function tmp_2 = code(x_46_re_m, x_46_im) t_0 = (x_46_im * ((x_46_re_m * x_46_re_m) - (x_46_im * x_46_im))) + (x_46_re_m * ((x_46_re_m * x_46_im) + (x_46_re_m * x_46_im))); t_1 = -(x_46_im * (x_46_im * x_46_im)); tmp = 0.0; if (t_0 <= -5e-323) tmp = t_1; elseif (t_0 <= Inf) tmp = (x_46_re_m * x_46_im) * (x_46_re_m * 3.0); else tmp = t_1; end tmp_2 = tmp; end
x.re_m = N[Abs[x$46$re], $MachinePrecision]
code[x$46$re$95$m_, x$46$im_] := Block[{t$95$0 = N[(N[(x$46$im * N[(N[(x$46$re$95$m * x$46$re$95$m), $MachinePrecision] - N[(x$46$im * x$46$im), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(x$46$re$95$m * N[(N[(x$46$re$95$m * x$46$im), $MachinePrecision] + N[(x$46$re$95$m * x$46$im), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = (-N[(x$46$im * N[(x$46$im * x$46$im), $MachinePrecision]), $MachinePrecision])}, If[LessEqual[t$95$0, -5e-323], t$95$1, If[LessEqual[t$95$0, Infinity], N[(N[(x$46$re$95$m * x$46$im), $MachinePrecision] * N[(x$46$re$95$m * 3.0), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
x.re_m = \left|x.re\right|
\\
\begin{array}{l}
t_0 := x.im \cdot \left(x.re\_m \cdot x.re\_m - x.im \cdot x.im\right) + x.re\_m \cdot \left(x.re\_m \cdot x.im + x.re\_m \cdot x.im\right)\\
t_1 := -x.im \cdot \left(x.im \cdot x.im\right)\\
\mathbf{if}\;t\_0 \leq -5 \cdot 10^{-323}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t\_0 \leq \infty:\\
\;\;\;\;\left(x.re\_m \cdot x.im\right) \cdot \left(x.re\_m \cdot 3\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if (+.f64 (*.f64 (-.f64 (*.f64 x.re x.re) (*.f64 x.im x.im)) x.im) (*.f64 (+.f64 (*.f64 x.re x.im) (*.f64 x.im x.re)) x.re)) < -4.94066e-323 or +inf.0 < (+.f64 (*.f64 (-.f64 (*.f64 x.re x.re) (*.f64 x.im x.im)) x.im) (*.f64 (+.f64 (*.f64 x.re x.im) (*.f64 x.im x.re)) x.re)) Initial program 72.6%
Taylor expanded in x.re around 0
mul-1-negN/A
unpow3N/A
unpow2N/A
distribute-rgt-neg-inN/A
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
lower-neg.f6457.6
Simplified57.6%
if -4.94066e-323 < (+.f64 (*.f64 (-.f64 (*.f64 x.re x.re) (*.f64 x.im x.im)) x.im) (*.f64 (+.f64 (*.f64 x.re x.im) (*.f64 x.im x.re)) x.re)) < +inf.0Initial program 94.8%
Taylor expanded in x.re around inf
distribute-rgt1-inN/A
metadata-evalN/A
associate-*r*N/A
*-commutativeN/A
metadata-evalN/A
distribute-lft1-inN/A
*-rgt-identityN/A
*-inversesN/A
associate-/l*N/A
unpow2N/A
cube-multN/A
associate-/l*N/A
associate-*l/N/A
distribute-lft1-inN/A
metadata-evalN/A
associate-*r/N/A
associate-*l*N/A
metadata-evalN/A
metadata-evalN/A
distribute-lft-neg-inN/A
Simplified60.0%
associate-*r*N/A
*-commutativeN/A
lift-*.f64N/A
*-commutativeN/A
associate-*l*N/A
lift-*.f64N/A
lower-*.f6464.9
lift-*.f64N/A
*-commutativeN/A
lower-*.f6464.9
Applied egg-rr64.9%
Final simplification61.8%
x.re_m = (fabs.f64 x.re)
(FPCore (x.re_m x.im)
:precision binary64
(let* ((t_0
(+
(* x.im (- (* x.re_m x.re_m) (* x.im x.im)))
(* x.re_m (+ (* x.re_m x.im) (* x.re_m x.im)))))
(t_1 (- (* x.im (* x.im x.im)))))
(if (<= t_0 -5e-323)
t_1
(if (<= t_0 INFINITY) (* 3.0 (* (* x.re_m x.re_m) x.im)) t_1))))x.re_m = fabs(x_46_re);
double code(double x_46_re_m, double x_46_im) {
double t_0 = (x_46_im * ((x_46_re_m * x_46_re_m) - (x_46_im * x_46_im))) + (x_46_re_m * ((x_46_re_m * x_46_im) + (x_46_re_m * x_46_im)));
double t_1 = -(x_46_im * (x_46_im * x_46_im));
double tmp;
if (t_0 <= -5e-323) {
tmp = t_1;
} else if (t_0 <= ((double) INFINITY)) {
tmp = 3.0 * ((x_46_re_m * x_46_re_m) * x_46_im);
} else {
tmp = t_1;
}
return tmp;
}
x.re_m = Math.abs(x_46_re);
public static double code(double x_46_re_m, double x_46_im) {
double t_0 = (x_46_im * ((x_46_re_m * x_46_re_m) - (x_46_im * x_46_im))) + (x_46_re_m * ((x_46_re_m * x_46_im) + (x_46_re_m * x_46_im)));
double t_1 = -(x_46_im * (x_46_im * x_46_im));
double tmp;
if (t_0 <= -5e-323) {
tmp = t_1;
} else if (t_0 <= Double.POSITIVE_INFINITY) {
tmp = 3.0 * ((x_46_re_m * x_46_re_m) * x_46_im);
} else {
tmp = t_1;
}
return tmp;
}
x.re_m = math.fabs(x_46_re) def code(x_46_re_m, x_46_im): t_0 = (x_46_im * ((x_46_re_m * x_46_re_m) - (x_46_im * x_46_im))) + (x_46_re_m * ((x_46_re_m * x_46_im) + (x_46_re_m * x_46_im))) t_1 = -(x_46_im * (x_46_im * x_46_im)) tmp = 0 if t_0 <= -5e-323: tmp = t_1 elif t_0 <= math.inf: tmp = 3.0 * ((x_46_re_m * x_46_re_m) * x_46_im) else: tmp = t_1 return tmp
x.re_m = abs(x_46_re) function code(x_46_re_m, x_46_im) t_0 = Float64(Float64(x_46_im * Float64(Float64(x_46_re_m * x_46_re_m) - Float64(x_46_im * x_46_im))) + Float64(x_46_re_m * Float64(Float64(x_46_re_m * x_46_im) + Float64(x_46_re_m * x_46_im)))) t_1 = Float64(-Float64(x_46_im * Float64(x_46_im * x_46_im))) tmp = 0.0 if (t_0 <= -5e-323) tmp = t_1; elseif (t_0 <= Inf) tmp = Float64(3.0 * Float64(Float64(x_46_re_m * x_46_re_m) * x_46_im)); else tmp = t_1; end return tmp end
x.re_m = abs(x_46_re); function tmp_2 = code(x_46_re_m, x_46_im) t_0 = (x_46_im * ((x_46_re_m * x_46_re_m) - (x_46_im * x_46_im))) + (x_46_re_m * ((x_46_re_m * x_46_im) + (x_46_re_m * x_46_im))); t_1 = -(x_46_im * (x_46_im * x_46_im)); tmp = 0.0; if (t_0 <= -5e-323) tmp = t_1; elseif (t_0 <= Inf) tmp = 3.0 * ((x_46_re_m * x_46_re_m) * x_46_im); else tmp = t_1; end tmp_2 = tmp; end
x.re_m = N[Abs[x$46$re], $MachinePrecision]
code[x$46$re$95$m_, x$46$im_] := Block[{t$95$0 = N[(N[(x$46$im * N[(N[(x$46$re$95$m * x$46$re$95$m), $MachinePrecision] - N[(x$46$im * x$46$im), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(x$46$re$95$m * N[(N[(x$46$re$95$m * x$46$im), $MachinePrecision] + N[(x$46$re$95$m * x$46$im), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = (-N[(x$46$im * N[(x$46$im * x$46$im), $MachinePrecision]), $MachinePrecision])}, If[LessEqual[t$95$0, -5e-323], t$95$1, If[LessEqual[t$95$0, Infinity], N[(3.0 * N[(N[(x$46$re$95$m * x$46$re$95$m), $MachinePrecision] * x$46$im), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
x.re_m = \left|x.re\right|
\\
\begin{array}{l}
t_0 := x.im \cdot \left(x.re\_m \cdot x.re\_m - x.im \cdot x.im\right) + x.re\_m \cdot \left(x.re\_m \cdot x.im + x.re\_m \cdot x.im\right)\\
t_1 := -x.im \cdot \left(x.im \cdot x.im\right)\\
\mathbf{if}\;t\_0 \leq -5 \cdot 10^{-323}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t\_0 \leq \infty:\\
\;\;\;\;3 \cdot \left(\left(x.re\_m \cdot x.re\_m\right) \cdot x.im\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if (+.f64 (*.f64 (-.f64 (*.f64 x.re x.re) (*.f64 x.im x.im)) x.im) (*.f64 (+.f64 (*.f64 x.re x.im) (*.f64 x.im x.re)) x.re)) < -4.94066e-323 or +inf.0 < (+.f64 (*.f64 (-.f64 (*.f64 x.re x.re) (*.f64 x.im x.im)) x.im) (*.f64 (+.f64 (*.f64 x.re x.im) (*.f64 x.im x.re)) x.re)) Initial program 72.6%
Taylor expanded in x.re around 0
mul-1-negN/A
unpow3N/A
unpow2N/A
distribute-rgt-neg-inN/A
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
lower-neg.f6457.6
Simplified57.6%
if -4.94066e-323 < (+.f64 (*.f64 (-.f64 (*.f64 x.re x.re) (*.f64 x.im x.im)) x.im) (*.f64 (+.f64 (*.f64 x.re x.im) (*.f64 x.im x.re)) x.re)) < +inf.0Initial program 94.8%
Taylor expanded in x.re around inf
distribute-rgt1-inN/A
metadata-evalN/A
associate-*r*N/A
*-commutativeN/A
metadata-evalN/A
distribute-lft1-inN/A
*-rgt-identityN/A
*-inversesN/A
associate-/l*N/A
unpow2N/A
cube-multN/A
associate-/l*N/A
associate-*l/N/A
distribute-lft1-inN/A
metadata-evalN/A
associate-*r/N/A
associate-*l*N/A
metadata-evalN/A
metadata-evalN/A
distribute-lft-neg-inN/A
Simplified60.0%
lift-*.f64N/A
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
lift-*.f64N/A
associate-*r*N/A
lift-*.f64N/A
lift-*.f64N/A
lower-*.f6464.9
lift-*.f64N/A
lift-*.f64N/A
associate-*r*N/A
lift-*.f64N/A
*-commutativeN/A
lift-*.f6460.0
Applied egg-rr60.0%
Final simplification59.0%
x.re_m = (fabs.f64 x.re)
(FPCore (x.re_m x.im)
:precision binary64
(let* ((t_0
(+
(* x.im (- (* x.re_m x.re_m) (* x.im x.im)))
(* x.re_m (+ (* x.re_m x.im) (* x.re_m x.im)))))
(t_1 (- (* x.im (* x.im x.im)))))
(if (<= t_0 -5e-323)
t_1
(if (<= t_0 INFINITY) (* x.im (* (* x.re_m x.re_m) 3.0)) t_1))))x.re_m = fabs(x_46_re);
double code(double x_46_re_m, double x_46_im) {
double t_0 = (x_46_im * ((x_46_re_m * x_46_re_m) - (x_46_im * x_46_im))) + (x_46_re_m * ((x_46_re_m * x_46_im) + (x_46_re_m * x_46_im)));
double t_1 = -(x_46_im * (x_46_im * x_46_im));
double tmp;
if (t_0 <= -5e-323) {
tmp = t_1;
} else if (t_0 <= ((double) INFINITY)) {
tmp = x_46_im * ((x_46_re_m * x_46_re_m) * 3.0);
} else {
tmp = t_1;
}
return tmp;
}
x.re_m = Math.abs(x_46_re);
public static double code(double x_46_re_m, double x_46_im) {
double t_0 = (x_46_im * ((x_46_re_m * x_46_re_m) - (x_46_im * x_46_im))) + (x_46_re_m * ((x_46_re_m * x_46_im) + (x_46_re_m * x_46_im)));
double t_1 = -(x_46_im * (x_46_im * x_46_im));
double tmp;
if (t_0 <= -5e-323) {
tmp = t_1;
} else if (t_0 <= Double.POSITIVE_INFINITY) {
tmp = x_46_im * ((x_46_re_m * x_46_re_m) * 3.0);
} else {
tmp = t_1;
}
return tmp;
}
x.re_m = math.fabs(x_46_re) def code(x_46_re_m, x_46_im): t_0 = (x_46_im * ((x_46_re_m * x_46_re_m) - (x_46_im * x_46_im))) + (x_46_re_m * ((x_46_re_m * x_46_im) + (x_46_re_m * x_46_im))) t_1 = -(x_46_im * (x_46_im * x_46_im)) tmp = 0 if t_0 <= -5e-323: tmp = t_1 elif t_0 <= math.inf: tmp = x_46_im * ((x_46_re_m * x_46_re_m) * 3.0) else: tmp = t_1 return tmp
x.re_m = abs(x_46_re) function code(x_46_re_m, x_46_im) t_0 = Float64(Float64(x_46_im * Float64(Float64(x_46_re_m * x_46_re_m) - Float64(x_46_im * x_46_im))) + Float64(x_46_re_m * Float64(Float64(x_46_re_m * x_46_im) + Float64(x_46_re_m * x_46_im)))) t_1 = Float64(-Float64(x_46_im * Float64(x_46_im * x_46_im))) tmp = 0.0 if (t_0 <= -5e-323) tmp = t_1; elseif (t_0 <= Inf) tmp = Float64(x_46_im * Float64(Float64(x_46_re_m * x_46_re_m) * 3.0)); else tmp = t_1; end return tmp end
x.re_m = abs(x_46_re); function tmp_2 = code(x_46_re_m, x_46_im) t_0 = (x_46_im * ((x_46_re_m * x_46_re_m) - (x_46_im * x_46_im))) + (x_46_re_m * ((x_46_re_m * x_46_im) + (x_46_re_m * x_46_im))); t_1 = -(x_46_im * (x_46_im * x_46_im)); tmp = 0.0; if (t_0 <= -5e-323) tmp = t_1; elseif (t_0 <= Inf) tmp = x_46_im * ((x_46_re_m * x_46_re_m) * 3.0); else tmp = t_1; end tmp_2 = tmp; end
x.re_m = N[Abs[x$46$re], $MachinePrecision]
code[x$46$re$95$m_, x$46$im_] := Block[{t$95$0 = N[(N[(x$46$im * N[(N[(x$46$re$95$m * x$46$re$95$m), $MachinePrecision] - N[(x$46$im * x$46$im), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(x$46$re$95$m * N[(N[(x$46$re$95$m * x$46$im), $MachinePrecision] + N[(x$46$re$95$m * x$46$im), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = (-N[(x$46$im * N[(x$46$im * x$46$im), $MachinePrecision]), $MachinePrecision])}, If[LessEqual[t$95$0, -5e-323], t$95$1, If[LessEqual[t$95$0, Infinity], N[(x$46$im * N[(N[(x$46$re$95$m * x$46$re$95$m), $MachinePrecision] * 3.0), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
x.re_m = \left|x.re\right|
\\
\begin{array}{l}
t_0 := x.im \cdot \left(x.re\_m \cdot x.re\_m - x.im \cdot x.im\right) + x.re\_m \cdot \left(x.re\_m \cdot x.im + x.re\_m \cdot x.im\right)\\
t_1 := -x.im \cdot \left(x.im \cdot x.im\right)\\
\mathbf{if}\;t\_0 \leq -5 \cdot 10^{-323}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t\_0 \leq \infty:\\
\;\;\;\;x.im \cdot \left(\left(x.re\_m \cdot x.re\_m\right) \cdot 3\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if (+.f64 (*.f64 (-.f64 (*.f64 x.re x.re) (*.f64 x.im x.im)) x.im) (*.f64 (+.f64 (*.f64 x.re x.im) (*.f64 x.im x.re)) x.re)) < -4.94066e-323 or +inf.0 < (+.f64 (*.f64 (-.f64 (*.f64 x.re x.re) (*.f64 x.im x.im)) x.im) (*.f64 (+.f64 (*.f64 x.re x.im) (*.f64 x.im x.re)) x.re)) Initial program 72.6%
Taylor expanded in x.re around 0
mul-1-negN/A
unpow3N/A
unpow2N/A
distribute-rgt-neg-inN/A
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
lower-neg.f6457.6
Simplified57.6%
if -4.94066e-323 < (+.f64 (*.f64 (-.f64 (*.f64 x.re x.re) (*.f64 x.im x.im)) x.im) (*.f64 (+.f64 (*.f64 x.re x.im) (*.f64 x.im x.re)) x.re)) < +inf.0Initial program 94.8%
Taylor expanded in x.re around inf
distribute-rgt1-inN/A
metadata-evalN/A
associate-*r*N/A
*-commutativeN/A
metadata-evalN/A
distribute-lft1-inN/A
*-rgt-identityN/A
*-inversesN/A
associate-/l*N/A
unpow2N/A
cube-multN/A
associate-/l*N/A
associate-*l/N/A
distribute-lft1-inN/A
metadata-evalN/A
associate-*r/N/A
associate-*l*N/A
metadata-evalN/A
metadata-evalN/A
distribute-lft-neg-inN/A
Simplified60.0%
Final simplification59.0%
x.re_m = (fabs.f64 x.re)
(FPCore (x.re_m x.im)
:precision binary64
(let* ((t_0
(+
(* x.im (- (* x.re_m x.re_m) (* x.im x.im)))
(* x.re_m (+ (* x.re_m x.im) (* x.re_m x.im)))))
(t_1 (- (* x.im (* x.im x.im)))))
(if (<= t_0 -5e-323)
t_1
(if (<= t_0 INFINITY) (* x.re_m (* x.re_m x.im)) t_1))))x.re_m = fabs(x_46_re);
double code(double x_46_re_m, double x_46_im) {
double t_0 = (x_46_im * ((x_46_re_m * x_46_re_m) - (x_46_im * x_46_im))) + (x_46_re_m * ((x_46_re_m * x_46_im) + (x_46_re_m * x_46_im)));
double t_1 = -(x_46_im * (x_46_im * x_46_im));
double tmp;
if (t_0 <= -5e-323) {
tmp = t_1;
} else if (t_0 <= ((double) INFINITY)) {
tmp = x_46_re_m * (x_46_re_m * x_46_im);
} else {
tmp = t_1;
}
return tmp;
}
x.re_m = Math.abs(x_46_re);
public static double code(double x_46_re_m, double x_46_im) {
double t_0 = (x_46_im * ((x_46_re_m * x_46_re_m) - (x_46_im * x_46_im))) + (x_46_re_m * ((x_46_re_m * x_46_im) + (x_46_re_m * x_46_im)));
double t_1 = -(x_46_im * (x_46_im * x_46_im));
double tmp;
if (t_0 <= -5e-323) {
tmp = t_1;
} else if (t_0 <= Double.POSITIVE_INFINITY) {
tmp = x_46_re_m * (x_46_re_m * x_46_im);
} else {
tmp = t_1;
}
return tmp;
}
x.re_m = math.fabs(x_46_re) def code(x_46_re_m, x_46_im): t_0 = (x_46_im * ((x_46_re_m * x_46_re_m) - (x_46_im * x_46_im))) + (x_46_re_m * ((x_46_re_m * x_46_im) + (x_46_re_m * x_46_im))) t_1 = -(x_46_im * (x_46_im * x_46_im)) tmp = 0 if t_0 <= -5e-323: tmp = t_1 elif t_0 <= math.inf: tmp = x_46_re_m * (x_46_re_m * x_46_im) else: tmp = t_1 return tmp
x.re_m = abs(x_46_re) function code(x_46_re_m, x_46_im) t_0 = Float64(Float64(x_46_im * Float64(Float64(x_46_re_m * x_46_re_m) - Float64(x_46_im * x_46_im))) + Float64(x_46_re_m * Float64(Float64(x_46_re_m * x_46_im) + Float64(x_46_re_m * x_46_im)))) t_1 = Float64(-Float64(x_46_im * Float64(x_46_im * x_46_im))) tmp = 0.0 if (t_0 <= -5e-323) tmp = t_1; elseif (t_0 <= Inf) tmp = Float64(x_46_re_m * Float64(x_46_re_m * x_46_im)); else tmp = t_1; end return tmp end
x.re_m = abs(x_46_re); function tmp_2 = code(x_46_re_m, x_46_im) t_0 = (x_46_im * ((x_46_re_m * x_46_re_m) - (x_46_im * x_46_im))) + (x_46_re_m * ((x_46_re_m * x_46_im) + (x_46_re_m * x_46_im))); t_1 = -(x_46_im * (x_46_im * x_46_im)); tmp = 0.0; if (t_0 <= -5e-323) tmp = t_1; elseif (t_0 <= Inf) tmp = x_46_re_m * (x_46_re_m * x_46_im); else tmp = t_1; end tmp_2 = tmp; end
x.re_m = N[Abs[x$46$re], $MachinePrecision]
code[x$46$re$95$m_, x$46$im_] := Block[{t$95$0 = N[(N[(x$46$im * N[(N[(x$46$re$95$m * x$46$re$95$m), $MachinePrecision] - N[(x$46$im * x$46$im), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(x$46$re$95$m * N[(N[(x$46$re$95$m * x$46$im), $MachinePrecision] + N[(x$46$re$95$m * x$46$im), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = (-N[(x$46$im * N[(x$46$im * x$46$im), $MachinePrecision]), $MachinePrecision])}, If[LessEqual[t$95$0, -5e-323], t$95$1, If[LessEqual[t$95$0, Infinity], N[(x$46$re$95$m * N[(x$46$re$95$m * x$46$im), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
x.re_m = \left|x.re\right|
\\
\begin{array}{l}
t_0 := x.im \cdot \left(x.re\_m \cdot x.re\_m - x.im \cdot x.im\right) + x.re\_m \cdot \left(x.re\_m \cdot x.im + x.re\_m \cdot x.im\right)\\
t_1 := -x.im \cdot \left(x.im \cdot x.im\right)\\
\mathbf{if}\;t\_0 \leq -5 \cdot 10^{-323}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t\_0 \leq \infty:\\
\;\;\;\;x.re\_m \cdot \left(x.re\_m \cdot x.im\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if (+.f64 (*.f64 (-.f64 (*.f64 x.re x.re) (*.f64 x.im x.im)) x.im) (*.f64 (+.f64 (*.f64 x.re x.im) (*.f64 x.im x.re)) x.re)) < -4.94066e-323 or +inf.0 < (+.f64 (*.f64 (-.f64 (*.f64 x.re x.re) (*.f64 x.im x.im)) x.im) (*.f64 (+.f64 (*.f64 x.re x.im) (*.f64 x.im x.re)) x.re)) Initial program 72.6%
Taylor expanded in x.re around 0
mul-1-negN/A
unpow3N/A
unpow2N/A
distribute-rgt-neg-inN/A
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
lower-neg.f6457.6
Simplified57.6%
if -4.94066e-323 < (+.f64 (*.f64 (-.f64 (*.f64 x.re x.re) (*.f64 x.im x.im)) x.im) (*.f64 (+.f64 (*.f64 x.re x.im) (*.f64 x.im x.re)) x.re)) < +inf.0Initial program 94.8%
Taylor expanded in x.re around inf
unpow2N/A
lower-*.f6460.0
Simplified60.0%
Applied egg-rr38.7%
Taylor expanded in x.re around inf
lower-*.f6443.3
Simplified43.3%
Final simplification49.3%
x.re_m = (fabs.f64 x.re)
(FPCore (x.re_m x.im)
:precision binary64
(if (<= x.im 5e-22)
(*
x.re_m
(fma
(fma x.im (/ x.im x.re_m) x.im)
(- x.re_m x.im)
(* x.im (+ x.re_m x.re_m))))
(* x.im (fma (* x.re_m 3.0) x.re_m (* x.im (- x.im))))))x.re_m = fabs(x_46_re);
double code(double x_46_re_m, double x_46_im) {
double tmp;
if (x_46_im <= 5e-22) {
tmp = x_46_re_m * fma(fma(x_46_im, (x_46_im / x_46_re_m), x_46_im), (x_46_re_m - x_46_im), (x_46_im * (x_46_re_m + x_46_re_m)));
} else {
tmp = x_46_im * fma((x_46_re_m * 3.0), x_46_re_m, (x_46_im * -x_46_im));
}
return tmp;
}
x.re_m = abs(x_46_re) function code(x_46_re_m, x_46_im) tmp = 0.0 if (x_46_im <= 5e-22) tmp = Float64(x_46_re_m * fma(fma(x_46_im, Float64(x_46_im / x_46_re_m), x_46_im), Float64(x_46_re_m - x_46_im), Float64(x_46_im * Float64(x_46_re_m + x_46_re_m)))); else tmp = Float64(x_46_im * fma(Float64(x_46_re_m * 3.0), x_46_re_m, Float64(x_46_im * Float64(-x_46_im)))); end return tmp end
x.re_m = N[Abs[x$46$re], $MachinePrecision] code[x$46$re$95$m_, x$46$im_] := If[LessEqual[x$46$im, 5e-22], N[(x$46$re$95$m * N[(N[(x$46$im * N[(x$46$im / x$46$re$95$m), $MachinePrecision] + x$46$im), $MachinePrecision] * N[(x$46$re$95$m - x$46$im), $MachinePrecision] + N[(x$46$im * N[(x$46$re$95$m + x$46$re$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x$46$im * N[(N[(x$46$re$95$m * 3.0), $MachinePrecision] * x$46$re$95$m + N[(x$46$im * (-x$46$im)), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
x.re_m = \left|x.re\right|
\\
\begin{array}{l}
\mathbf{if}\;x.im \leq 5 \cdot 10^{-22}:\\
\;\;\;\;x.re\_m \cdot \mathsf{fma}\left(\mathsf{fma}\left(x.im, \frac{x.im}{x.re\_m}, x.im\right), x.re\_m - x.im, x.im \cdot \left(x.re\_m + x.re\_m\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x.im \cdot \mathsf{fma}\left(x.re\_m \cdot 3, x.re\_m, x.im \cdot \left(-x.im\right)\right)\\
\end{array}
\end{array}
if x.im < 4.99999999999999954e-22Initial program 87.1%
lift-*.f64N/A
lift-*.f64N/A
lift--.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-+.f64N/A
lift-*.f64N/A
+-commutativeN/A
lift-*.f64N/A
lower-fma.f6489.2
lift-+.f64N/A
lift-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
distribute-rgt-outN/A
lower-*.f64N/A
lower-+.f6489.2
lift-*.f64N/A
*-commutativeN/A
Applied egg-rr97.2%
+-commutativeN/A
distribute-rgt-inN/A
lift-*.f64N/A
lower-fma.f6497.2
Applied egg-rr97.2%
Taylor expanded in x.re around inf
lower-*.f64N/A
+-commutativeN/A
unpow2N/A
associate-/l*N/A
lower-fma.f64N/A
lower-/.f6495.3
Simplified95.3%
lift-+.f64N/A
lift-*.f64N/A
lift-/.f64N/A
lift-fma.f64N/A
lift-*.f64N/A
lift--.f64N/A
lift-*.f64N/A
+-commutativeN/A
lift-*.f64N/A
lift-*.f64N/A
associate-*l*N/A
*-commutativeN/A
distribute-lft-outN/A
lower-*.f64N/A
lower-fma.f6493.4
lift-*.f64N/A
Applied egg-rr93.4%
if 4.99999999999999954e-22 < x.im Initial program 79.9%
Taylor expanded in x.re around 0
Simplified99.9%
lift-neg.f64N/A
lift-*.f64N/A
lift-*.f64N/A
+-commutativeN/A
lift-*.f64N/A
lift-*.f64N/A
associate-*r*N/A
lower-fma.f64N/A
*-commutativeN/A
lower-*.f64N/A
lift-neg.f64N/A
distribute-rgt-neg-outN/A
lift-*.f64N/A
lower-neg.f6498.2
Applied egg-rr98.2%
Final simplification94.5%
x.re_m = (fabs.f64 x.re)
(FPCore (x.re_m x.im)
:precision binary64
(if (<= x.im 4e+56)
(+
(* (* x.im (+ x.re_m x.im)) (- x.re_m x.im))
(* x.re_m (* x.re_m (+ x.im x.im))))
(* x.im (fma x.im (- x.im) (* (* x.re_m x.re_m) 3.0)))))x.re_m = fabs(x_46_re);
double code(double x_46_re_m, double x_46_im) {
double tmp;
if (x_46_im <= 4e+56) {
tmp = ((x_46_im * (x_46_re_m + x_46_im)) * (x_46_re_m - x_46_im)) + (x_46_re_m * (x_46_re_m * (x_46_im + x_46_im)));
} else {
tmp = x_46_im * fma(x_46_im, -x_46_im, ((x_46_re_m * x_46_re_m) * 3.0));
}
return tmp;
}
x.re_m = abs(x_46_re) function code(x_46_re_m, x_46_im) tmp = 0.0 if (x_46_im <= 4e+56) tmp = Float64(Float64(Float64(x_46_im * Float64(x_46_re_m + x_46_im)) * Float64(x_46_re_m - x_46_im)) + Float64(x_46_re_m * Float64(x_46_re_m * Float64(x_46_im + x_46_im)))); else tmp = Float64(x_46_im * fma(x_46_im, Float64(-x_46_im), Float64(Float64(x_46_re_m * x_46_re_m) * 3.0))); end return tmp end
x.re_m = N[Abs[x$46$re], $MachinePrecision] code[x$46$re$95$m_, x$46$im_] := If[LessEqual[x$46$im, 4e+56], N[(N[(N[(x$46$im * N[(x$46$re$95$m + x$46$im), $MachinePrecision]), $MachinePrecision] * N[(x$46$re$95$m - x$46$im), $MachinePrecision]), $MachinePrecision] + N[(x$46$re$95$m * N[(x$46$re$95$m * N[(x$46$im + x$46$im), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x$46$im * N[(x$46$im * (-x$46$im) + N[(N[(x$46$re$95$m * x$46$re$95$m), $MachinePrecision] * 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
x.re_m = \left|x.re\right|
\\
\begin{array}{l}
\mathbf{if}\;x.im \leq 4 \cdot 10^{+56}:\\
\;\;\;\;\left(x.im \cdot \left(x.re\_m + x.im\right)\right) \cdot \left(x.re\_m - x.im\right) + x.re\_m \cdot \left(x.re\_m \cdot \left(x.im + x.im\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x.im \cdot \mathsf{fma}\left(x.im, -x.im, \left(x.re\_m \cdot x.re\_m\right) \cdot 3\right)\\
\end{array}
\end{array}
if x.im < 4.00000000000000037e56Initial program 87.9%
lift-*.f64N/A
lift-*.f64N/A
lift--.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-+.f64N/A
lift-*.f64N/A
lift-+.f6487.9
Applied egg-rr95.5%
if 4.00000000000000037e56 < x.im Initial program 74.5%
Taylor expanded in x.re around 0
Simplified100.0%
Final simplification96.3%
x.re_m = (fabs.f64 x.re)
(FPCore (x.re_m x.im)
:precision binary64
(if (<= x.im 4e+56)
(fma
(* x.re_m (+ x.im x.im))
x.re_m
(* (* x.im (+ x.re_m x.im)) (- x.re_m x.im)))
(* x.im (fma x.im (- x.im) (* (* x.re_m x.re_m) 3.0)))))x.re_m = fabs(x_46_re);
double code(double x_46_re_m, double x_46_im) {
double tmp;
if (x_46_im <= 4e+56) {
tmp = fma((x_46_re_m * (x_46_im + x_46_im)), x_46_re_m, ((x_46_im * (x_46_re_m + x_46_im)) * (x_46_re_m - x_46_im)));
} else {
tmp = x_46_im * fma(x_46_im, -x_46_im, ((x_46_re_m * x_46_re_m) * 3.0));
}
return tmp;
}
x.re_m = abs(x_46_re) function code(x_46_re_m, x_46_im) tmp = 0.0 if (x_46_im <= 4e+56) tmp = fma(Float64(x_46_re_m * Float64(x_46_im + x_46_im)), x_46_re_m, Float64(Float64(x_46_im * Float64(x_46_re_m + x_46_im)) * Float64(x_46_re_m - x_46_im))); else tmp = Float64(x_46_im * fma(x_46_im, Float64(-x_46_im), Float64(Float64(x_46_re_m * x_46_re_m) * 3.0))); end return tmp end
x.re_m = N[Abs[x$46$re], $MachinePrecision] code[x$46$re$95$m_, x$46$im_] := If[LessEqual[x$46$im, 4e+56], N[(N[(x$46$re$95$m * N[(x$46$im + x$46$im), $MachinePrecision]), $MachinePrecision] * x$46$re$95$m + N[(N[(x$46$im * N[(x$46$re$95$m + x$46$im), $MachinePrecision]), $MachinePrecision] * N[(x$46$re$95$m - x$46$im), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x$46$im * N[(x$46$im * (-x$46$im) + N[(N[(x$46$re$95$m * x$46$re$95$m), $MachinePrecision] * 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
x.re_m = \left|x.re\right|
\\
\begin{array}{l}
\mathbf{if}\;x.im \leq 4 \cdot 10^{+56}:\\
\;\;\;\;\mathsf{fma}\left(x.re\_m \cdot \left(x.im + x.im\right), x.re\_m, \left(x.im \cdot \left(x.re\_m + x.im\right)\right) \cdot \left(x.re\_m - x.im\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x.im \cdot \mathsf{fma}\left(x.im, -x.im, \left(x.re\_m \cdot x.re\_m\right) \cdot 3\right)\\
\end{array}
\end{array}
if x.im < 4.00000000000000037e56Initial program 87.9%
lift-*.f64N/A
lift-*.f64N/A
lift--.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-+.f64N/A
lift-*.f64N/A
+-commutativeN/A
lift-*.f64N/A
lower-fma.f6489.8
lift-+.f64N/A
lift-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
distribute-rgt-outN/A
lower-*.f64N/A
lower-+.f6489.8
lift-*.f64N/A
*-commutativeN/A
Applied egg-rr97.4%
if 4.00000000000000037e56 < x.im Initial program 74.5%
Taylor expanded in x.re around 0
Simplified100.0%
Final simplification97.8%
x.re_m = (fabs.f64 x.re) (FPCore (x.re_m x.im) :precision binary64 (if (<= x.im 1.2e+57) (fma (* x.re_m (* x.re_m x.im)) 3.0 (- (* x.im (* x.im x.im)))) (* x.im (fma x.im (- x.im) (* (* x.re_m x.re_m) 3.0)))))
x.re_m = fabs(x_46_re);
double code(double x_46_re_m, double x_46_im) {
double tmp;
if (x_46_im <= 1.2e+57) {
tmp = fma((x_46_re_m * (x_46_re_m * x_46_im)), 3.0, -(x_46_im * (x_46_im * x_46_im)));
} else {
tmp = x_46_im * fma(x_46_im, -x_46_im, ((x_46_re_m * x_46_re_m) * 3.0));
}
return tmp;
}
x.re_m = abs(x_46_re) function code(x_46_re_m, x_46_im) tmp = 0.0 if (x_46_im <= 1.2e+57) tmp = fma(Float64(x_46_re_m * Float64(x_46_re_m * x_46_im)), 3.0, Float64(-Float64(x_46_im * Float64(x_46_im * x_46_im)))); else tmp = Float64(x_46_im * fma(x_46_im, Float64(-x_46_im), Float64(Float64(x_46_re_m * x_46_re_m) * 3.0))); end return tmp end
x.re_m = N[Abs[x$46$re], $MachinePrecision] code[x$46$re$95$m_, x$46$im_] := If[LessEqual[x$46$im, 1.2e+57], N[(N[(x$46$re$95$m * N[(x$46$re$95$m * x$46$im), $MachinePrecision]), $MachinePrecision] * 3.0 + (-N[(x$46$im * N[(x$46$im * x$46$im), $MachinePrecision]), $MachinePrecision])), $MachinePrecision], N[(x$46$im * N[(x$46$im * (-x$46$im) + N[(N[(x$46$re$95$m * x$46$re$95$m), $MachinePrecision] * 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
x.re_m = \left|x.re\right|
\\
\begin{array}{l}
\mathbf{if}\;x.im \leq 1.2 \cdot 10^{+57}:\\
\;\;\;\;\mathsf{fma}\left(x.re\_m \cdot \left(x.re\_m \cdot x.im\right), 3, -x.im \cdot \left(x.im \cdot x.im\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x.im \cdot \mathsf{fma}\left(x.im, -x.im, \left(x.re\_m \cdot x.re\_m\right) \cdot 3\right)\\
\end{array}
\end{array}
if x.im < 1.20000000000000002e57Initial program 87.9%
Taylor expanded in x.re around 0
Simplified91.7%
lift-neg.f64N/A
lift-*.f64N/A
lift-*.f64N/A
+-commutativeN/A
distribute-lft-inN/A
lift-*.f64N/A
lift-*.f64N/A
associate-*r*N/A
associate-*r*N/A
lower-fma.f64N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lift-neg.f64N/A
distribute-rgt-neg-outN/A
lift-*.f64N/A
distribute-rgt-neg-outN/A
lift-*.f64N/A
cube-multN/A
lower-neg.f64N/A
cube-multN/A
lift-*.f64N/A
Applied egg-rr96.4%
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
lift-*.f64N/A
associate-*r*N/A
*-commutativeN/A
lift-*.f64N/A
associate-*r*N/A
lift-*.f64N/A
associate-*r*N/A
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
lift-neg.f64N/A
lower-fma.f6487.4
Applied egg-rr94.5%
if 1.20000000000000002e57 < x.im Initial program 74.5%
Taylor expanded in x.re around 0
Simplified100.0%
Final simplification95.5%
x.re_m = (fabs.f64 x.re) (FPCore (x.re_m x.im) :precision binary64 (if (<= x.re_m 2.2e+149) (* x.im (fma x.im (- x.im) (* (* x.re_m x.re_m) 3.0))) (fma (* x.re_m (+ x.im x.im)) x.re_m (* x.re_m (* x.re_m x.im)))))
x.re_m = fabs(x_46_re);
double code(double x_46_re_m, double x_46_im) {
double tmp;
if (x_46_re_m <= 2.2e+149) {
tmp = x_46_im * fma(x_46_im, -x_46_im, ((x_46_re_m * x_46_re_m) * 3.0));
} else {
tmp = fma((x_46_re_m * (x_46_im + x_46_im)), x_46_re_m, (x_46_re_m * (x_46_re_m * x_46_im)));
}
return tmp;
}
x.re_m = abs(x_46_re) function code(x_46_re_m, x_46_im) tmp = 0.0 if (x_46_re_m <= 2.2e+149) tmp = Float64(x_46_im * fma(x_46_im, Float64(-x_46_im), Float64(Float64(x_46_re_m * x_46_re_m) * 3.0))); else tmp = fma(Float64(x_46_re_m * Float64(x_46_im + x_46_im)), x_46_re_m, Float64(x_46_re_m * Float64(x_46_re_m * x_46_im))); end return tmp end
x.re_m = N[Abs[x$46$re], $MachinePrecision] code[x$46$re$95$m_, x$46$im_] := If[LessEqual[x$46$re$95$m, 2.2e+149], N[(x$46$im * N[(x$46$im * (-x$46$im) + N[(N[(x$46$re$95$m * x$46$re$95$m), $MachinePrecision] * 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x$46$re$95$m * N[(x$46$im + x$46$im), $MachinePrecision]), $MachinePrecision] * x$46$re$95$m + N[(x$46$re$95$m * N[(x$46$re$95$m * x$46$im), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
x.re_m = \left|x.re\right|
\\
\begin{array}{l}
\mathbf{if}\;x.re\_m \leq 2.2 \cdot 10^{+149}:\\
\;\;\;\;x.im \cdot \mathsf{fma}\left(x.im, -x.im, \left(x.re\_m \cdot x.re\_m\right) \cdot 3\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(x.re\_m \cdot \left(x.im + x.im\right), x.re\_m, x.re\_m \cdot \left(x.re\_m \cdot x.im\right)\right)\\
\end{array}
\end{array}
if x.re < 2.2e149Initial program 90.0%
Taylor expanded in x.re around 0
Simplified97.7%
if 2.2e149 < x.re Initial program 45.6%
lift-*.f64N/A
lift-*.f64N/A
lift--.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-+.f64N/A
lift-*.f64N/A
+-commutativeN/A
lift-*.f64N/A
lower-fma.f6445.6
lift-+.f64N/A
lift-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
distribute-rgt-outN/A
lower-*.f64N/A
lower-+.f6445.6
lift-*.f64N/A
*-commutativeN/A
Applied egg-rr92.1%
Taylor expanded in x.im around 0
lower-*.f64N/A
unpow2N/A
lower-*.f6453.3
Simplified53.3%
associate-*r*N/A
*-commutativeN/A
lift-*.f64N/A
lower-*.f6492.1
Applied egg-rr92.1%
Final simplification97.2%
x.re_m = (fabs.f64 x.re) (FPCore (x.re_m x.im) :precision binary64 (if (<= x.re_m 2.4e+149) (* x.im (fma x.im (- x.im) (* (* x.re_m x.re_m) 3.0))) (* x.re_m (fma x.re_m (+ x.im x.im) (* x.re_m x.im)))))
x.re_m = fabs(x_46_re);
double code(double x_46_re_m, double x_46_im) {
double tmp;
if (x_46_re_m <= 2.4e+149) {
tmp = x_46_im * fma(x_46_im, -x_46_im, ((x_46_re_m * x_46_re_m) * 3.0));
} else {
tmp = x_46_re_m * fma(x_46_re_m, (x_46_im + x_46_im), (x_46_re_m * x_46_im));
}
return tmp;
}
x.re_m = abs(x_46_re) function code(x_46_re_m, x_46_im) tmp = 0.0 if (x_46_re_m <= 2.4e+149) tmp = Float64(x_46_im * fma(x_46_im, Float64(-x_46_im), Float64(Float64(x_46_re_m * x_46_re_m) * 3.0))); else tmp = Float64(x_46_re_m * fma(x_46_re_m, Float64(x_46_im + x_46_im), Float64(x_46_re_m * x_46_im))); end return tmp end
x.re_m = N[Abs[x$46$re], $MachinePrecision] code[x$46$re$95$m_, x$46$im_] := If[LessEqual[x$46$re$95$m, 2.4e+149], N[(x$46$im * N[(x$46$im * (-x$46$im) + N[(N[(x$46$re$95$m * x$46$re$95$m), $MachinePrecision] * 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x$46$re$95$m * N[(x$46$re$95$m * N[(x$46$im + x$46$im), $MachinePrecision] + N[(x$46$re$95$m * x$46$im), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
x.re_m = \left|x.re\right|
\\
\begin{array}{l}
\mathbf{if}\;x.re\_m \leq 2.4 \cdot 10^{+149}:\\
\;\;\;\;x.im \cdot \mathsf{fma}\left(x.im, -x.im, \left(x.re\_m \cdot x.re\_m\right) \cdot 3\right)\\
\mathbf{else}:\\
\;\;\;\;x.re\_m \cdot \mathsf{fma}\left(x.re\_m, x.im + x.im, x.re\_m \cdot x.im\right)\\
\end{array}
\end{array}
if x.re < 2.40000000000000012e149Initial program 90.0%
Taylor expanded in x.re around 0
Simplified97.7%
if 2.40000000000000012e149 < x.re Initial program 45.6%
lift-*.f64N/A
lift-*.f64N/A
lift--.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-+.f64N/A
lift-*.f64N/A
+-commutativeN/A
lift-*.f64N/A
lower-fma.f6445.6
lift-+.f64N/A
lift-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
distribute-rgt-outN/A
lower-*.f64N/A
lower-+.f6445.6
lift-*.f64N/A
*-commutativeN/A
Applied egg-rr92.1%
Taylor expanded in x.im around 0
lower-*.f64N/A
unpow2N/A
lower-*.f6453.3
Simplified53.3%
lift-+.f64N/A
lift-*.f64N/A
associate-*r*N/A
*-commutativeN/A
lift-*.f64N/A
distribute-rgt-outN/A
lower-*.f64N/A
lift-*.f64N/A
lower-fma.f6492.0
Applied egg-rr92.0%
Final simplification97.2%
x.re_m = (fabs.f64 x.re) (FPCore (x.re_m x.im) :precision binary64 (* x.re_m (* x.re_m x.im)))
x.re_m = fabs(x_46_re);
double code(double x_46_re_m, double x_46_im) {
return x_46_re_m * (x_46_re_m * x_46_im);
}
x.re_m = abs(x_46re)
real(8) function code(x_46re_m, x_46im)
real(8), intent (in) :: x_46re_m
real(8), intent (in) :: x_46im
code = x_46re_m * (x_46re_m * x_46im)
end function
x.re_m = Math.abs(x_46_re);
public static double code(double x_46_re_m, double x_46_im) {
return x_46_re_m * (x_46_re_m * x_46_im);
}
x.re_m = math.fabs(x_46_re) def code(x_46_re_m, x_46_im): return x_46_re_m * (x_46_re_m * x_46_im)
x.re_m = abs(x_46_re) function code(x_46_re_m, x_46_im) return Float64(x_46_re_m * Float64(x_46_re_m * x_46_im)) end
x.re_m = abs(x_46_re); function tmp = code(x_46_re_m, x_46_im) tmp = x_46_re_m * (x_46_re_m * x_46_im); end
x.re_m = N[Abs[x$46$re], $MachinePrecision] code[x$46$re$95$m_, x$46$im_] := N[(x$46$re$95$m * N[(x$46$re$95$m * x$46$im), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
x.re_m = \left|x.re\right|
\\
x.re\_m \cdot \left(x.re\_m \cdot x.im\right)
\end{array}
Initial program 85.5%
Taylor expanded in x.re around inf
unpow2N/A
lower-*.f6450.8
Simplified50.8%
Applied egg-rr29.4%
Taylor expanded in x.re around inf
lower-*.f6432.2
Simplified32.2%
Final simplification32.2%
x.re_m = (fabs.f64 x.re) (FPCore (x.re_m x.im) :precision binary64 (* (* x.re_m x.re_m) x.im))
x.re_m = fabs(x_46_re);
double code(double x_46_re_m, double x_46_im) {
return (x_46_re_m * x_46_re_m) * x_46_im;
}
x.re_m = abs(x_46re)
real(8) function code(x_46re_m, x_46im)
real(8), intent (in) :: x_46re_m
real(8), intent (in) :: x_46im
code = (x_46re_m * x_46re_m) * x_46im
end function
x.re_m = Math.abs(x_46_re);
public static double code(double x_46_re_m, double x_46_im) {
return (x_46_re_m * x_46_re_m) * x_46_im;
}
x.re_m = math.fabs(x_46_re) def code(x_46_re_m, x_46_im): return (x_46_re_m * x_46_re_m) * x_46_im
x.re_m = abs(x_46_re) function code(x_46_re_m, x_46_im) return Float64(Float64(x_46_re_m * x_46_re_m) * x_46_im) end
x.re_m = abs(x_46_re); function tmp = code(x_46_re_m, x_46_im) tmp = (x_46_re_m * x_46_re_m) * x_46_im; end
x.re_m = N[Abs[x$46$re], $MachinePrecision] code[x$46$re$95$m_, x$46$im_] := N[(N[(x$46$re$95$m * x$46$re$95$m), $MachinePrecision] * x$46$im), $MachinePrecision]
\begin{array}{l}
x.re_m = \left|x.re\right|
\\
\left(x.re\_m \cdot x.re\_m\right) \cdot x.im
\end{array}
Initial program 85.5%
Taylor expanded in x.re around inf
unpow2N/A
lower-*.f6450.8
Simplified50.8%
Applied egg-rr29.4%
Taylor expanded in x.re around inf
lower-*.f64N/A
unpow2N/A
lower-*.f6431.6
Simplified31.6%
Final simplification31.6%
(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 2024207
(FPCore (x.re x.im)
:name "math.cube on complex, imaginary part"
:precision binary64
:alt
(! :herbie-platform default (+ (* (* x.re x.im) (* 2 x.re)) (* (* x.im (- x.re x.im)) (+ x.re x.im))))
(+ (* (- (* x.re x.re) (* x.im x.im)) x.im) (* (+ (* x.re x.im) (* x.im x.re)) x.re)))