
(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 15 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)
(fma
(- 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 = fma((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;
}
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 = fma(Float64(x_46_re - x_46_im), Float64(x_46_re * Float64(x_46_re + x_46_im)), Float64(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
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[(x$46$re - x$46$im), $MachinePrecision] * N[(x$46$re * 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], 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:\\
\;\;\;\;\mathsf{fma}\left(x.re - x.im, x.re \cdot \left(x.re + x.im\right), \left(-x.im\right) \cdot \left(x.re \cdot \left(x.im + x.im\right)\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 91.9%
sqr-neg91.9%
difference-of-squares91.9%
sub-neg91.9%
associate-*l*99.8%
sub-neg99.8%
remove-double-neg99.8%
+-commutative99.8%
*-commutative99.8%
*-commutative99.8%
distribute-rgt-out99.8%
Simplified99.8%
cancel-sign-sub-inv99.8%
fma-def99.8%
*-commutative99.8%
Applied egg-rr99.8%
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%
sqr-neg0.0%
difference-of-squares22.9%
sub-neg22.9%
associate-*l*22.9%
sub-neg22.9%
remove-double-neg22.9%
+-commutative22.9%
*-commutative22.9%
*-commutative22.9%
distribute-rgt-out22.9%
Simplified22.9%
Taylor expanded in x.re around inf 77.1%
Final simplification96.7%
(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 91.9%
sqr-neg91.9%
difference-of-squares91.9%
sub-neg91.9%
associate-*l*99.8%
sub-neg99.8%
remove-double-neg99.8%
+-commutative99.8%
*-commutative99.8%
*-commutative99.8%
distribute-rgt-out99.8%
Simplified99.8%
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%
sqr-neg0.0%
difference-of-squares22.9%
sub-neg22.9%
associate-*l*22.9%
sub-neg22.9%
remove-double-neg22.9%
+-commutative22.9%
*-commutative22.9%
*-commutative22.9%
distribute-rgt-out22.9%
Simplified22.9%
Taylor expanded in x.re around inf 77.1%
Final simplification96.7%
(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))))
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);
}
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);
}
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) 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(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_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); 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[(x$46$im * x$46$im), $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(x.im \cdot x.im\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 91.9%
sqr-neg91.9%
difference-of-squares91.9%
sub-neg91.9%
associate-*l*99.8%
sub-neg99.8%
remove-double-neg99.8%
+-commutative99.8%
*-commutative99.8%
*-commutative99.8%
distribute-rgt-out99.8%
Simplified99.8%
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%
sqr-neg0.0%
difference-of-squares22.9%
sub-neg22.9%
associate-*l*22.9%
sub-neg22.9%
remove-double-neg22.9%
+-commutative22.9%
*-commutative22.9%
*-commutative22.9%
distribute-rgt-out22.9%
Simplified22.9%
Taylor expanded in x.im around 0 22.9%
associate-*r*22.9%
*-commutative22.9%
*-commutative22.9%
unpow222.9%
associate-*l*22.9%
*-commutative22.9%
count-222.9%
Simplified22.9%
Taylor expanded in x.re around 0 22.9%
associate-*r*22.9%
neg-mul-122.9%
unpow222.9%
distribute-rgt-neg-in22.9%
Simplified22.9%
Applied egg-rr77.1%
Final simplification96.7%
(FPCore (x.re x.im)
:precision binary64
(if (<= x.re -2.3e+144)
(* x.im (* x.re (- x.im x.re)))
(if (<= x.re 2.8e+153)
(- (* (* x.re x.im) (- x.re x.im)) (* x.im (* x.re (+ x.im x.im))))
(* (* x.re x.re) x.im))))
double code(double x_46_re, double x_46_im) {
double tmp;
if (x_46_re <= -2.3e+144) {
tmp = x_46_im * (x_46_re * (x_46_im - x_46_re));
} else if (x_46_re <= 2.8e+153) {
tmp = ((x_46_re * x_46_im) * (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_re) * 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_46re <= (-2.3d+144)) then
tmp = x_46im * (x_46re * (x_46im - x_46re))
else if (x_46re <= 2.8d+153) then
tmp = ((x_46re * x_46im) * (x_46re - x_46im)) - (x_46im * (x_46re * (x_46im + x_46im)))
else
tmp = (x_46re * x_46re) * 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_re <= -2.3e+144) {
tmp = x_46_im * (x_46_re * (x_46_im - x_46_re));
} else if (x_46_re <= 2.8e+153) {
tmp = ((x_46_re * x_46_im) * (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_re) * x_46_im;
}
return tmp;
}
def code(x_46_re, x_46_im): tmp = 0 if x_46_re <= -2.3e+144: tmp = x_46_im * (x_46_re * (x_46_im - x_46_re)) elif x_46_re <= 2.8e+153: tmp = ((x_46_re * x_46_im) * (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_re) * x_46_im return tmp
function code(x_46_re, x_46_im) tmp = 0.0 if (x_46_re <= -2.3e+144) tmp = Float64(x_46_im * Float64(x_46_re * Float64(x_46_im - x_46_re))); elseif (x_46_re <= 2.8e+153) tmp = Float64(Float64(Float64(x_46_re * x_46_im) * 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(Float64(x_46_re * x_46_re) * x_46_im); end return tmp end
function tmp_2 = code(x_46_re, x_46_im) tmp = 0.0; if (x_46_re <= -2.3e+144) tmp = x_46_im * (x_46_re * (x_46_im - x_46_re)); elseif (x_46_re <= 2.8e+153) tmp = ((x_46_re * x_46_im) * (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_re) * x_46_im; end tmp_2 = tmp; end
code[x$46$re_, x$46$im_] := If[LessEqual[x$46$re, -2.3e+144], N[(x$46$im * N[(x$46$re * N[(x$46$im - x$46$re), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x$46$re, 2.8e+153], N[(N[(N[(x$46$re * x$46$im), $MachinePrecision] * 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], N[(N[(x$46$re * x$46$re), $MachinePrecision] * x$46$im), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x.re \leq -2.3 \cdot 10^{+144}:\\
\;\;\;\;x.im \cdot \left(x.re \cdot \left(x.im - x.re\right)\right)\\
\mathbf{elif}\;x.re \leq 2.8 \cdot 10^{+153}:\\
\;\;\;\;\left(x.re \cdot x.im\right) \cdot \left(x.re - x.im\right) - x.im \cdot \left(x.re \cdot \left(x.im + x.im\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\left(x.re \cdot x.re\right) \cdot x.im\\
\end{array}
\end{array}
if x.re < -2.3000000000000001e144Initial program 42.5%
sqr-neg42.5%
difference-of-squares62.5%
sub-neg62.5%
associate-*l*62.5%
sub-neg62.5%
remove-double-neg62.5%
+-commutative62.5%
*-commutative62.5%
*-commutative62.5%
distribute-rgt-out62.5%
Simplified62.5%
cancel-sign-sub-inv62.5%
fma-def62.5%
*-commutative62.5%
Applied egg-rr62.5%
Taylor expanded in x.re around 0 30.7%
*-commutative30.7%
Simplified30.7%
Applied egg-rr38.3%
+-lft-identity38.3%
*-commutative38.3%
associate-*l*50.1%
Simplified50.1%
if -2.3000000000000001e144 < x.re < 2.79999999999999985e153Initial program 90.5%
sqr-neg90.5%
difference-of-squares90.5%
sub-neg90.5%
associate-*l*99.7%
sub-neg99.7%
remove-double-neg99.7%
+-commutative99.7%
*-commutative99.7%
*-commutative99.7%
distribute-rgt-out99.7%
Simplified99.7%
Taylor expanded in x.re around 0 75.8%
*-commutative75.8%
Simplified75.8%
if 2.79999999999999985e153 < x.re Initial program 58.6%
sqr-neg58.6%
difference-of-squares58.6%
sub-neg58.6%
associate-*l*58.6%
sub-neg58.6%
remove-double-neg58.6%
+-commutative58.6%
*-commutative58.6%
*-commutative58.6%
distribute-rgt-out58.6%
Simplified58.6%
Taylor expanded in x.re around 0 15.4%
*-commutative15.4%
Simplified15.4%
Taylor expanded in x.re around inf 69.0%
unpow269.0%
Simplified69.0%
Final simplification71.0%
(FPCore (x.re x.im) :precision binary64 (if (<= x.im 1.5e+35) (+ (* x.re (- (* x.re x.re) (* x.im x.im))) (* x.im (* x.im (* x.re -2.0)))) (* (* x.re x.im) (- x.re (* x.im 3.0)))))
double code(double x_46_re, double x_46_im) {
double tmp;
if (x_46_im <= 1.5e+35) {
tmp = (x_46_re * ((x_46_re * x_46_re) - (x_46_im * x_46_im))) + (x_46_im * (x_46_im * (x_46_re * -2.0)));
} else {
tmp = (x_46_re * x_46_im) * (x_46_re - (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 <= 1.5d+35) then
tmp = (x_46re * ((x_46re * x_46re) - (x_46im * x_46im))) + (x_46im * (x_46im * (x_46re * (-2.0d0))))
else
tmp = (x_46re * x_46im) * (x_46re - (x_46im * 3.0d0))
end if
code = tmp
end function
public static double code(double x_46_re, double x_46_im) {
double tmp;
if (x_46_im <= 1.5e+35) {
tmp = (x_46_re * ((x_46_re * x_46_re) - (x_46_im * x_46_im))) + (x_46_im * (x_46_im * (x_46_re * -2.0)));
} else {
tmp = (x_46_re * x_46_im) * (x_46_re - (x_46_im * 3.0));
}
return tmp;
}
def code(x_46_re, x_46_im): tmp = 0 if x_46_im <= 1.5e+35: tmp = (x_46_re * ((x_46_re * x_46_re) - (x_46_im * x_46_im))) + (x_46_im * (x_46_im * (x_46_re * -2.0))) else: tmp = (x_46_re * x_46_im) * (x_46_re - (x_46_im * 3.0)) return tmp
function code(x_46_re, x_46_im) tmp = 0.0 if (x_46_im <= 1.5e+35) tmp = 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(x_46_im * Float64(x_46_re * -2.0)))); else tmp = Float64(Float64(x_46_re * x_46_im) * Float64(x_46_re - 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 <= 1.5e+35) tmp = (x_46_re * ((x_46_re * x_46_re) - (x_46_im * x_46_im))) + (x_46_im * (x_46_im * (x_46_re * -2.0))); else tmp = (x_46_re * x_46_im) * (x_46_re - (x_46_im * 3.0)); end tmp_2 = tmp; end
code[x$46$re_, x$46$im_] := If[LessEqual[x$46$im, 1.5e+35], 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[(x$46$im * N[(x$46$re * -2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x$46$re * x$46$im), $MachinePrecision] * N[(x$46$re - N[(x$46$im * 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x.im \leq 1.5 \cdot 10^{+35}:\\
\;\;\;\;x.re \cdot \left(x.re \cdot x.re - x.im \cdot x.im\right) + x.im \cdot \left(x.im \cdot \left(x.re \cdot -2\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\left(x.re \cdot x.im\right) \cdot \left(x.re - x.im \cdot 3\right)\\
\end{array}
\end{array}
if x.im < 1.49999999999999995e35Initial program 89.5%
sqr-neg89.5%
*-commutative89.5%
fma-neg89.5%
sqr-neg89.5%
+-commutative89.5%
*-commutative89.5%
*-commutative89.5%
distribute-lft-out89.5%
associate-*r*89.5%
distribute-rgt-neg-in89.5%
distribute-neg-out89.5%
neg-mul-189.5%
neg-mul-189.5%
distribute-rgt-out89.5%
metadata-eval89.5%
Simplified89.5%
fma-udef89.5%
associate-*l*89.5%
Applied egg-rr89.5%
if 1.49999999999999995e35 < x.im Initial program 52.4%
sqr-neg52.4%
difference-of-squares56.7%
sub-neg56.7%
associate-*l*71.2%
sub-neg71.2%
remove-double-neg71.2%
+-commutative71.2%
*-commutative71.2%
*-commutative71.2%
distribute-rgt-out71.2%
Simplified71.2%
cancel-sign-sub-inv71.2%
fma-def71.3%
*-commutative71.3%
Applied egg-rr71.3%
Taylor expanded in x.re around 0 69.8%
*-commutative69.8%
Simplified69.8%
Taylor expanded in x.re around 0 52.4%
unpow252.4%
associate-*r*52.4%
*-commutative52.4%
*-commutative52.4%
distribute-rgt-out58.1%
unpow258.1%
unpow258.1%
distribute-rgt-out58.1%
metadata-eval58.1%
metadata-eval58.1%
distribute-rgt-neg-in58.1%
associate-*r*58.1%
unsub-neg58.1%
distribute-lft-out--52.4%
*-commutative52.4%
associate-*r*66.9%
distribute-lft-out--82.6%
Simplified82.6%
Final simplification87.6%
(FPCore (x.re x.im) :precision binary64 (if (<= x.im 6.5e-31) (- (* (* x.re x.re) (- x.re x.im)) (* x.im (* x.re (+ x.im x.im)))) (* (* x.re x.im) (- x.re (* x.im 3.0)))))
double code(double x_46_re, double x_46_im) {
double tmp;
if (x_46_im <= 6.5e-31) {
tmp = ((x_46_re * 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_re - (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 <= 6.5d-31) then
tmp = ((x_46re * x_46re) * (x_46re - x_46im)) - (x_46im * (x_46re * (x_46im + x_46im)))
else
tmp = (x_46re * x_46im) * (x_46re - (x_46im * 3.0d0))
end if
code = tmp
end function
public static double code(double x_46_re, double x_46_im) {
double tmp;
if (x_46_im <= 6.5e-31) {
tmp = ((x_46_re * 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_re - (x_46_im * 3.0));
}
return tmp;
}
def code(x_46_re, x_46_im): tmp = 0 if x_46_im <= 6.5e-31: tmp = ((x_46_re * 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_re - (x_46_im * 3.0)) return tmp
function code(x_46_re, x_46_im) tmp = 0.0 if (x_46_im <= 6.5e-31) tmp = Float64(Float64(Float64(x_46_re * 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(Float64(x_46_re * x_46_im) * Float64(x_46_re - 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 <= 6.5e-31) tmp = ((x_46_re * 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_re - (x_46_im * 3.0)); end tmp_2 = tmp; end
code[x$46$re_, x$46$im_] := If[LessEqual[x$46$im, 6.5e-31], N[(N[(N[(x$46$re * x$46$re), $MachinePrecision] * 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], N[(N[(x$46$re * x$46$im), $MachinePrecision] * N[(x$46$re - N[(x$46$im * 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x.im \leq 6.5 \cdot 10^{-31}:\\
\;\;\;\;\left(x.re \cdot x.re\right) \cdot \left(x.re - x.im\right) - x.im \cdot \left(x.re \cdot \left(x.im + x.im\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\left(x.re \cdot x.im\right) \cdot \left(x.re - x.im \cdot 3\right)\\
\end{array}
\end{array}
if x.im < 6.49999999999999967e-31Initial program 89.1%
sqr-neg89.1%
difference-of-squares91.9%
sub-neg91.9%
associate-*l*95.9%
sub-neg95.9%
remove-double-neg95.9%
+-commutative95.9%
*-commutative95.9%
*-commutative95.9%
distribute-rgt-out95.9%
Simplified95.9%
Taylor expanded in x.re around inf 76.8%
unpow276.8%
Simplified76.8%
if 6.49999999999999967e-31 < x.im Initial program 56.7%
sqr-neg56.7%
difference-of-squares60.6%
sub-neg60.6%
associate-*l*73.8%
sub-neg73.8%
remove-double-neg73.8%
+-commutative73.8%
*-commutative73.8%
*-commutative73.8%
distribute-rgt-out73.8%
Simplified73.8%
cancel-sign-sub-inv73.8%
fma-def73.9%
*-commutative73.9%
Applied egg-rr73.9%
Taylor expanded in x.re around 0 70.2%
*-commutative70.2%
Simplified70.2%
Taylor expanded in x.re around 0 54.3%
unpow254.3%
associate-*r*54.3%
*-commutative54.3%
*-commutative54.3%
distribute-rgt-out59.5%
unpow259.5%
unpow259.5%
distribute-rgt-out59.5%
metadata-eval59.5%
metadata-eval59.5%
distribute-rgt-neg-in59.5%
associate-*r*59.4%
unsub-neg59.4%
distribute-lft-out--54.3%
*-commutative54.3%
associate-*r*67.5%
distribute-lft-out--81.8%
Simplified81.8%
Final simplification78.3%
(FPCore (x.re x.im)
:precision binary64
(if (<= x.re -6.6e+145)
(* x.im (* x.re (- x.im x.re)))
(if (<= x.re 1.5e+154)
(* (* x.re x.im) (- x.re (* x.im 3.0)))
(* (* x.re x.re) x.im))))
double code(double x_46_re, double x_46_im) {
double tmp;
if (x_46_re <= -6.6e+145) {
tmp = x_46_im * (x_46_re * (x_46_im - x_46_re));
} else if (x_46_re <= 1.5e+154) {
tmp = (x_46_re * x_46_im) * (x_46_re - (x_46_im * 3.0));
} else {
tmp = (x_46_re * x_46_re) * 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_46re <= (-6.6d+145)) then
tmp = x_46im * (x_46re * (x_46im - x_46re))
else if (x_46re <= 1.5d+154) then
tmp = (x_46re * x_46im) * (x_46re - (x_46im * 3.0d0))
else
tmp = (x_46re * x_46re) * 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_re <= -6.6e+145) {
tmp = x_46_im * (x_46_re * (x_46_im - x_46_re));
} else if (x_46_re <= 1.5e+154) {
tmp = (x_46_re * x_46_im) * (x_46_re - (x_46_im * 3.0));
} else {
tmp = (x_46_re * x_46_re) * x_46_im;
}
return tmp;
}
def code(x_46_re, x_46_im): tmp = 0 if x_46_re <= -6.6e+145: tmp = x_46_im * (x_46_re * (x_46_im - x_46_re)) elif x_46_re <= 1.5e+154: tmp = (x_46_re * x_46_im) * (x_46_re - (x_46_im * 3.0)) else: tmp = (x_46_re * x_46_re) * x_46_im return tmp
function code(x_46_re, x_46_im) tmp = 0.0 if (x_46_re <= -6.6e+145) tmp = Float64(x_46_im * Float64(x_46_re * Float64(x_46_im - x_46_re))); elseif (x_46_re <= 1.5e+154) tmp = Float64(Float64(x_46_re * x_46_im) * Float64(x_46_re - Float64(x_46_im * 3.0))); else tmp = Float64(Float64(x_46_re * x_46_re) * x_46_im); end return tmp end
function tmp_2 = code(x_46_re, x_46_im) tmp = 0.0; if (x_46_re <= -6.6e+145) tmp = x_46_im * (x_46_re * (x_46_im - x_46_re)); elseif (x_46_re <= 1.5e+154) tmp = (x_46_re * x_46_im) * (x_46_re - (x_46_im * 3.0)); else tmp = (x_46_re * x_46_re) * x_46_im; end tmp_2 = tmp; end
code[x$46$re_, x$46$im_] := If[LessEqual[x$46$re, -6.6e+145], N[(x$46$im * N[(x$46$re * N[(x$46$im - x$46$re), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x$46$re, 1.5e+154], N[(N[(x$46$re * x$46$im), $MachinePrecision] * N[(x$46$re - N[(x$46$im * 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x$46$re * x$46$re), $MachinePrecision] * x$46$im), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x.re \leq -6.6 \cdot 10^{+145}:\\
\;\;\;\;x.im \cdot \left(x.re \cdot \left(x.im - x.re\right)\right)\\
\mathbf{elif}\;x.re \leq 1.5 \cdot 10^{+154}:\\
\;\;\;\;\left(x.re \cdot x.im\right) \cdot \left(x.re - x.im \cdot 3\right)\\
\mathbf{else}:\\
\;\;\;\;\left(x.re \cdot x.re\right) \cdot x.im\\
\end{array}
\end{array}
if x.re < -6.60000000000000054e145Initial program 42.5%
sqr-neg42.5%
difference-of-squares62.5%
sub-neg62.5%
associate-*l*62.5%
sub-neg62.5%
remove-double-neg62.5%
+-commutative62.5%
*-commutative62.5%
*-commutative62.5%
distribute-rgt-out62.5%
Simplified62.5%
cancel-sign-sub-inv62.5%
fma-def62.5%
*-commutative62.5%
Applied egg-rr62.5%
Taylor expanded in x.re around 0 30.7%
*-commutative30.7%
Simplified30.7%
Applied egg-rr38.3%
+-lft-identity38.3%
*-commutative38.3%
associate-*l*50.1%
Simplified50.1%
if -6.60000000000000054e145 < x.re < 1.50000000000000013e154Initial program 90.5%
sqr-neg90.5%
difference-of-squares90.5%
sub-neg90.5%
associate-*l*99.7%
sub-neg99.7%
remove-double-neg99.7%
+-commutative99.7%
*-commutative99.7%
*-commutative99.7%
distribute-rgt-out99.7%
Simplified99.7%
cancel-sign-sub-inv99.7%
fma-def99.8%
*-commutative99.8%
Applied egg-rr99.8%
Taylor expanded in x.re around 0 75.9%
*-commutative75.9%
Simplified75.9%
Taylor expanded in x.re around 0 63.3%
unpow263.3%
associate-*r*63.3%
*-commutative63.3%
*-commutative63.3%
distribute-rgt-out64.4%
unpow264.4%
unpow264.4%
distribute-rgt-out64.4%
metadata-eval64.4%
metadata-eval64.4%
distribute-rgt-neg-in64.4%
associate-*r*64.3%
unsub-neg64.3%
distribute-lft-out--63.3%
*-commutative63.3%
associate-*r*72.6%
distribute-lft-out--75.8%
Simplified75.8%
if 1.50000000000000013e154 < x.re Initial program 58.6%
sqr-neg58.6%
difference-of-squares58.6%
sub-neg58.6%
associate-*l*58.6%
sub-neg58.6%
remove-double-neg58.6%
+-commutative58.6%
*-commutative58.6%
*-commutative58.6%
distribute-rgt-out58.6%
Simplified58.6%
Taylor expanded in x.re around 0 15.4%
*-commutative15.4%
Simplified15.4%
Taylor expanded in x.re around inf 69.0%
unpow269.0%
Simplified69.0%
Final simplification71.0%
(FPCore (x.re x.im)
:precision binary64
(if (<= x.re -1.05e+202)
(* x.im (* x.re x.im))
(if (<= x.re 6.2e+141)
(* x.im (* (* x.re x.im) -3.0))
(* (* x.re x.re) x.im))))
double code(double x_46_re, double x_46_im) {
double tmp;
if (x_46_re <= -1.05e+202) {
tmp = x_46_im * (x_46_re * x_46_im);
} else if (x_46_re <= 6.2e+141) {
tmp = x_46_im * ((x_46_re * x_46_im) * -3.0);
} else {
tmp = (x_46_re * x_46_re) * 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_46re <= (-1.05d+202)) then
tmp = x_46im * (x_46re * x_46im)
else if (x_46re <= 6.2d+141) then
tmp = x_46im * ((x_46re * x_46im) * (-3.0d0))
else
tmp = (x_46re * x_46re) * 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_re <= -1.05e+202) {
tmp = x_46_im * (x_46_re * x_46_im);
} else if (x_46_re <= 6.2e+141) {
tmp = x_46_im * ((x_46_re * x_46_im) * -3.0);
} else {
tmp = (x_46_re * x_46_re) * x_46_im;
}
return tmp;
}
def code(x_46_re, x_46_im): tmp = 0 if x_46_re <= -1.05e+202: tmp = x_46_im * (x_46_re * x_46_im) elif x_46_re <= 6.2e+141: tmp = x_46_im * ((x_46_re * x_46_im) * -3.0) else: tmp = (x_46_re * x_46_re) * x_46_im return tmp
function code(x_46_re, x_46_im) tmp = 0.0 if (x_46_re <= -1.05e+202) tmp = Float64(x_46_im * Float64(x_46_re * x_46_im)); elseif (x_46_re <= 6.2e+141) tmp = Float64(x_46_im * Float64(Float64(x_46_re * x_46_im) * -3.0)); else tmp = Float64(Float64(x_46_re * x_46_re) * x_46_im); end return tmp end
function tmp_2 = code(x_46_re, x_46_im) tmp = 0.0; if (x_46_re <= -1.05e+202) tmp = x_46_im * (x_46_re * x_46_im); elseif (x_46_re <= 6.2e+141) tmp = x_46_im * ((x_46_re * x_46_im) * -3.0); else tmp = (x_46_re * x_46_re) * x_46_im; end tmp_2 = tmp; end
code[x$46$re_, x$46$im_] := If[LessEqual[x$46$re, -1.05e+202], N[(x$46$im * N[(x$46$re * x$46$im), $MachinePrecision]), $MachinePrecision], If[LessEqual[x$46$re, 6.2e+141], N[(x$46$im * N[(N[(x$46$re * x$46$im), $MachinePrecision] * -3.0), $MachinePrecision]), $MachinePrecision], N[(N[(x$46$re * x$46$re), $MachinePrecision] * x$46$im), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x.re \leq -1.05 \cdot 10^{+202}:\\
\;\;\;\;x.im \cdot \left(x.re \cdot x.im\right)\\
\mathbf{elif}\;x.re \leq 6.2 \cdot 10^{+141}:\\
\;\;\;\;x.im \cdot \left(\left(x.re \cdot x.im\right) \cdot -3\right)\\
\mathbf{else}:\\
\;\;\;\;\left(x.re \cdot x.re\right) \cdot x.im\\
\end{array}
\end{array}
if x.re < -1.05e202Initial program 36.7%
sqr-neg36.7%
difference-of-squares53.3%
sub-neg53.3%
associate-*l*53.3%
sub-neg53.3%
remove-double-neg53.3%
+-commutative53.3%
*-commutative53.3%
*-commutative53.3%
distribute-rgt-out53.3%
Simplified53.3%
Taylor expanded in x.im around 0 53.3%
associate-*r*53.3%
*-commutative53.3%
*-commutative53.3%
unpow253.3%
associate-*l*53.3%
*-commutative53.3%
count-253.3%
Simplified53.3%
Taylor expanded in x.re around 0 17.0%
associate-*r*17.0%
neg-mul-117.0%
unpow217.0%
distribute-rgt-neg-in17.0%
Simplified17.0%
Applied egg-rr47.9%
if -1.05e202 < x.re < 6.20000000000000007e141Initial program 88.9%
sqr-neg88.9%
difference-of-squares90.4%
sub-neg90.4%
associate-*l*99.3%
sub-neg99.3%
remove-double-neg99.3%
+-commutative99.3%
*-commutative99.3%
*-commutative99.3%
distribute-rgt-out99.3%
Simplified99.3%
Taylor expanded in x.re around 0 64.4%
distribute-rgt-out--64.4%
unpow264.4%
metadata-eval64.4%
associate-*r*64.4%
associate-*r*73.3%
*-commutative73.3%
associate-*l*73.2%
Simplified73.2%
Taylor expanded in x.re around 0 73.2%
if 6.20000000000000007e141 < x.re Initial program 58.6%
sqr-neg58.6%
difference-of-squares58.6%
sub-neg58.6%
associate-*l*58.6%
sub-neg58.6%
remove-double-neg58.6%
+-commutative58.6%
*-commutative58.6%
*-commutative58.6%
distribute-rgt-out58.6%
Simplified58.6%
Taylor expanded in x.re around 0 15.4%
*-commutative15.4%
Simplified15.4%
Taylor expanded in x.re around inf 69.0%
unpow269.0%
Simplified69.0%
Final simplification69.8%
(FPCore (x.re x.im)
:precision binary64
(if (<= x.re -3.6e+201)
(* x.im (* x.re x.im))
(if (<= x.re 7.5e+140)
(* x.im (* x.re (* x.im -3.0)))
(* (* x.re x.re) x.im))))
double code(double x_46_re, double x_46_im) {
double tmp;
if (x_46_re <= -3.6e+201) {
tmp = x_46_im * (x_46_re * x_46_im);
} else if (x_46_re <= 7.5e+140) {
tmp = x_46_im * (x_46_re * (x_46_im * -3.0));
} else {
tmp = (x_46_re * x_46_re) * 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_46re <= (-3.6d+201)) then
tmp = x_46im * (x_46re * x_46im)
else if (x_46re <= 7.5d+140) then
tmp = x_46im * (x_46re * (x_46im * (-3.0d0)))
else
tmp = (x_46re * x_46re) * 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_re <= -3.6e+201) {
tmp = x_46_im * (x_46_re * x_46_im);
} else if (x_46_re <= 7.5e+140) {
tmp = x_46_im * (x_46_re * (x_46_im * -3.0));
} else {
tmp = (x_46_re * x_46_re) * x_46_im;
}
return tmp;
}
def code(x_46_re, x_46_im): tmp = 0 if x_46_re <= -3.6e+201: tmp = x_46_im * (x_46_re * x_46_im) elif x_46_re <= 7.5e+140: tmp = x_46_im * (x_46_re * (x_46_im * -3.0)) else: tmp = (x_46_re * x_46_re) * x_46_im return tmp
function code(x_46_re, x_46_im) tmp = 0.0 if (x_46_re <= -3.6e+201) tmp = Float64(x_46_im * Float64(x_46_re * x_46_im)); elseif (x_46_re <= 7.5e+140) tmp = Float64(x_46_im * Float64(x_46_re * Float64(x_46_im * -3.0))); else tmp = Float64(Float64(x_46_re * x_46_re) * x_46_im); end return tmp end
function tmp_2 = code(x_46_re, x_46_im) tmp = 0.0; if (x_46_re <= -3.6e+201) tmp = x_46_im * (x_46_re * x_46_im); elseif (x_46_re <= 7.5e+140) tmp = x_46_im * (x_46_re * (x_46_im * -3.0)); else tmp = (x_46_re * x_46_re) * x_46_im; end tmp_2 = tmp; end
code[x$46$re_, x$46$im_] := If[LessEqual[x$46$re, -3.6e+201], N[(x$46$im * N[(x$46$re * x$46$im), $MachinePrecision]), $MachinePrecision], If[LessEqual[x$46$re, 7.5e+140], N[(x$46$im * N[(x$46$re * N[(x$46$im * -3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x$46$re * x$46$re), $MachinePrecision] * x$46$im), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x.re \leq -3.6 \cdot 10^{+201}:\\
\;\;\;\;x.im \cdot \left(x.re \cdot x.im\right)\\
\mathbf{elif}\;x.re \leq 7.5 \cdot 10^{+140}:\\
\;\;\;\;x.im \cdot \left(x.re \cdot \left(x.im \cdot -3\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\left(x.re \cdot x.re\right) \cdot x.im\\
\end{array}
\end{array}
if x.re < -3.59999999999999976e201Initial program 36.7%
sqr-neg36.7%
difference-of-squares53.3%
sub-neg53.3%
associate-*l*53.3%
sub-neg53.3%
remove-double-neg53.3%
+-commutative53.3%
*-commutative53.3%
*-commutative53.3%
distribute-rgt-out53.3%
Simplified53.3%
Taylor expanded in x.im around 0 53.3%
associate-*r*53.3%
*-commutative53.3%
*-commutative53.3%
unpow253.3%
associate-*l*53.3%
*-commutative53.3%
count-253.3%
Simplified53.3%
Taylor expanded in x.re around 0 17.0%
associate-*r*17.0%
neg-mul-117.0%
unpow217.0%
distribute-rgt-neg-in17.0%
Simplified17.0%
Applied egg-rr47.9%
if -3.59999999999999976e201 < x.re < 7.4999999999999997e140Initial program 88.9%
sqr-neg88.9%
difference-of-squares90.4%
sub-neg90.4%
associate-*l*99.3%
sub-neg99.3%
remove-double-neg99.3%
+-commutative99.3%
*-commutative99.3%
*-commutative99.3%
distribute-rgt-out99.3%
Simplified99.3%
Taylor expanded in x.re around 0 64.4%
distribute-rgt-out--64.4%
unpow264.4%
metadata-eval64.4%
associate-*r*64.4%
associate-*r*73.3%
*-commutative73.3%
associate-*l*73.2%
Simplified73.2%
if 7.4999999999999997e140 < x.re Initial program 58.6%
sqr-neg58.6%
difference-of-squares58.6%
sub-neg58.6%
associate-*l*58.6%
sub-neg58.6%
remove-double-neg58.6%
+-commutative58.6%
*-commutative58.6%
*-commutative58.6%
distribute-rgt-out58.6%
Simplified58.6%
Taylor expanded in x.re around 0 15.4%
*-commutative15.4%
Simplified15.4%
Taylor expanded in x.re around inf 69.0%
unpow269.0%
Simplified69.0%
Final simplification69.8%
(FPCore (x.re x.im)
:precision binary64
(if (<= x.re -1.9e+141)
(* x.im (* x.re (- x.im x.re)))
(if (<= x.re 5.2e+150)
(* x.im (* x.re (* x.im -3.0)))
(* (* x.re x.re) x.im))))
double code(double x_46_re, double x_46_im) {
double tmp;
if (x_46_re <= -1.9e+141) {
tmp = x_46_im * (x_46_re * (x_46_im - x_46_re));
} else if (x_46_re <= 5.2e+150) {
tmp = x_46_im * (x_46_re * (x_46_im * -3.0));
} else {
tmp = (x_46_re * x_46_re) * 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_46re <= (-1.9d+141)) then
tmp = x_46im * (x_46re * (x_46im - x_46re))
else if (x_46re <= 5.2d+150) then
tmp = x_46im * (x_46re * (x_46im * (-3.0d0)))
else
tmp = (x_46re * x_46re) * 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_re <= -1.9e+141) {
tmp = x_46_im * (x_46_re * (x_46_im - x_46_re));
} else if (x_46_re <= 5.2e+150) {
tmp = x_46_im * (x_46_re * (x_46_im * -3.0));
} else {
tmp = (x_46_re * x_46_re) * x_46_im;
}
return tmp;
}
def code(x_46_re, x_46_im): tmp = 0 if x_46_re <= -1.9e+141: tmp = x_46_im * (x_46_re * (x_46_im - x_46_re)) elif x_46_re <= 5.2e+150: tmp = x_46_im * (x_46_re * (x_46_im * -3.0)) else: tmp = (x_46_re * x_46_re) * x_46_im return tmp
function code(x_46_re, x_46_im) tmp = 0.0 if (x_46_re <= -1.9e+141) tmp = Float64(x_46_im * Float64(x_46_re * Float64(x_46_im - x_46_re))); elseif (x_46_re <= 5.2e+150) tmp = Float64(x_46_im * Float64(x_46_re * Float64(x_46_im * -3.0))); else tmp = Float64(Float64(x_46_re * x_46_re) * x_46_im); end return tmp end
function tmp_2 = code(x_46_re, x_46_im) tmp = 0.0; if (x_46_re <= -1.9e+141) tmp = x_46_im * (x_46_re * (x_46_im - x_46_re)); elseif (x_46_re <= 5.2e+150) tmp = x_46_im * (x_46_re * (x_46_im * -3.0)); else tmp = (x_46_re * x_46_re) * x_46_im; end tmp_2 = tmp; end
code[x$46$re_, x$46$im_] := If[LessEqual[x$46$re, -1.9e+141], N[(x$46$im * N[(x$46$re * N[(x$46$im - x$46$re), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x$46$re, 5.2e+150], N[(x$46$im * N[(x$46$re * N[(x$46$im * -3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x$46$re * x$46$re), $MachinePrecision] * x$46$im), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x.re \leq -1.9 \cdot 10^{+141}:\\
\;\;\;\;x.im \cdot \left(x.re \cdot \left(x.im - x.re\right)\right)\\
\mathbf{elif}\;x.re \leq 5.2 \cdot 10^{+150}:\\
\;\;\;\;x.im \cdot \left(x.re \cdot \left(x.im \cdot -3\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\left(x.re \cdot x.re\right) \cdot x.im\\
\end{array}
\end{array}
if x.re < -1.89999999999999988e141Initial program 42.5%
sqr-neg42.5%
difference-of-squares62.5%
sub-neg62.5%
associate-*l*62.5%
sub-neg62.5%
remove-double-neg62.5%
+-commutative62.5%
*-commutative62.5%
*-commutative62.5%
distribute-rgt-out62.5%
Simplified62.5%
cancel-sign-sub-inv62.5%
fma-def62.5%
*-commutative62.5%
Applied egg-rr62.5%
Taylor expanded in x.re around 0 30.7%
*-commutative30.7%
Simplified30.7%
Applied egg-rr38.3%
+-lft-identity38.3%
*-commutative38.3%
associate-*l*50.1%
Simplified50.1%
if -1.89999999999999988e141 < x.re < 5.20000000000000012e150Initial program 90.5%
sqr-neg90.5%
difference-of-squares90.5%
sub-neg90.5%
associate-*l*99.7%
sub-neg99.7%
remove-double-neg99.7%
+-commutative99.7%
*-commutative99.7%
*-commutative99.7%
distribute-rgt-out99.7%
Simplified99.7%
Taylor expanded in x.re around 0 66.2%
distribute-rgt-out--66.2%
unpow266.2%
metadata-eval66.2%
associate-*r*66.2%
associate-*r*75.5%
*-commutative75.5%
associate-*l*75.5%
Simplified75.5%
if 5.20000000000000012e150 < x.re Initial program 58.6%
sqr-neg58.6%
difference-of-squares58.6%
sub-neg58.6%
associate-*l*58.6%
sub-neg58.6%
remove-double-neg58.6%
+-commutative58.6%
*-commutative58.6%
*-commutative58.6%
distribute-rgt-out58.6%
Simplified58.6%
Taylor expanded in x.re around 0 15.4%
*-commutative15.4%
Simplified15.4%
Taylor expanded in x.re around inf 69.0%
unpow269.0%
Simplified69.0%
Final simplification70.8%
(FPCore (x.re x.im)
:precision binary64
(if (<= x.re -1.45e+143)
(* x.im (* x.re (- x.im x.re)))
(if (<= x.re 5.2e+146)
(* -3.0 (* x.im (* x.re x.im)))
(* (* x.re x.re) x.im))))
double code(double x_46_re, double x_46_im) {
double tmp;
if (x_46_re <= -1.45e+143) {
tmp = x_46_im * (x_46_re * (x_46_im - x_46_re));
} else if (x_46_re <= 5.2e+146) {
tmp = -3.0 * (x_46_im * (x_46_re * x_46_im));
} else {
tmp = (x_46_re * x_46_re) * 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_46re <= (-1.45d+143)) then
tmp = x_46im * (x_46re * (x_46im - x_46re))
else if (x_46re <= 5.2d+146) then
tmp = (-3.0d0) * (x_46im * (x_46re * x_46im))
else
tmp = (x_46re * x_46re) * 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_re <= -1.45e+143) {
tmp = x_46_im * (x_46_re * (x_46_im - x_46_re));
} else if (x_46_re <= 5.2e+146) {
tmp = -3.0 * (x_46_im * (x_46_re * x_46_im));
} else {
tmp = (x_46_re * x_46_re) * x_46_im;
}
return tmp;
}
def code(x_46_re, x_46_im): tmp = 0 if x_46_re <= -1.45e+143: tmp = x_46_im * (x_46_re * (x_46_im - x_46_re)) elif x_46_re <= 5.2e+146: tmp = -3.0 * (x_46_im * (x_46_re * x_46_im)) else: tmp = (x_46_re * x_46_re) * x_46_im return tmp
function code(x_46_re, x_46_im) tmp = 0.0 if (x_46_re <= -1.45e+143) tmp = Float64(x_46_im * Float64(x_46_re * Float64(x_46_im - x_46_re))); elseif (x_46_re <= 5.2e+146) tmp = Float64(-3.0 * Float64(x_46_im * Float64(x_46_re * x_46_im))); else tmp = Float64(Float64(x_46_re * x_46_re) * x_46_im); end return tmp end
function tmp_2 = code(x_46_re, x_46_im) tmp = 0.0; if (x_46_re <= -1.45e+143) tmp = x_46_im * (x_46_re * (x_46_im - x_46_re)); elseif (x_46_re <= 5.2e+146) tmp = -3.0 * (x_46_im * (x_46_re * x_46_im)); else tmp = (x_46_re * x_46_re) * x_46_im; end tmp_2 = tmp; end
code[x$46$re_, x$46$im_] := If[LessEqual[x$46$re, -1.45e+143], N[(x$46$im * N[(x$46$re * N[(x$46$im - x$46$re), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x$46$re, 5.2e+146], N[(-3.0 * N[(x$46$im * N[(x$46$re * x$46$im), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x$46$re * x$46$re), $MachinePrecision] * x$46$im), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x.re \leq -1.45 \cdot 10^{+143}:\\
\;\;\;\;x.im \cdot \left(x.re \cdot \left(x.im - x.re\right)\right)\\
\mathbf{elif}\;x.re \leq 5.2 \cdot 10^{+146}:\\
\;\;\;\;-3 \cdot \left(x.im \cdot \left(x.re \cdot x.im\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\left(x.re \cdot x.re\right) \cdot x.im\\
\end{array}
\end{array}
if x.re < -1.4499999999999999e143Initial program 42.5%
sqr-neg42.5%
difference-of-squares62.5%
sub-neg62.5%
associate-*l*62.5%
sub-neg62.5%
remove-double-neg62.5%
+-commutative62.5%
*-commutative62.5%
*-commutative62.5%
distribute-rgt-out62.5%
Simplified62.5%
cancel-sign-sub-inv62.5%
fma-def62.5%
*-commutative62.5%
Applied egg-rr62.5%
Taylor expanded in x.re around 0 30.7%
*-commutative30.7%
Simplified30.7%
Applied egg-rr38.3%
+-lft-identity38.3%
*-commutative38.3%
associate-*l*50.1%
Simplified50.1%
if -1.4499999999999999e143 < x.re < 5.20000000000000028e146Initial program 90.5%
sqr-neg90.5%
difference-of-squares90.5%
sub-neg90.5%
associate-*l*99.7%
sub-neg99.7%
remove-double-neg99.7%
+-commutative99.7%
*-commutative99.7%
*-commutative99.7%
distribute-rgt-out99.7%
Simplified99.7%
cancel-sign-sub-inv99.7%
fma-def99.8%
*-commutative99.8%
Applied egg-rr99.8%
Taylor expanded in x.re around 0 75.9%
*-commutative75.9%
Simplified75.9%
Taylor expanded in x.re around 0 66.2%
unpow266.2%
unpow266.2%
distribute-rgt-out66.2%
associate-*r*66.2%
associate-*r*75.6%
*-commutative75.6%
metadata-eval75.6%
Simplified75.6%
if 5.20000000000000028e146 < x.re Initial program 58.6%
sqr-neg58.6%
difference-of-squares58.6%
sub-neg58.6%
associate-*l*58.6%
sub-neg58.6%
remove-double-neg58.6%
+-commutative58.6%
*-commutative58.6%
*-commutative58.6%
distribute-rgt-out58.6%
Simplified58.6%
Taylor expanded in x.re around 0 15.4%
*-commutative15.4%
Simplified15.4%
Taylor expanded in x.re around inf 69.0%
unpow269.0%
Simplified69.0%
Final simplification70.9%
(FPCore (x.re x.im) :precision binary64 (if (<= x.re -1.05e+202) (* x.im (* x.re x.im)) (if (<= x.re 1.2e+151) (* x.re (- (* x.im x.im))) (* (* x.re x.re) x.im))))
double code(double x_46_re, double x_46_im) {
double tmp;
if (x_46_re <= -1.05e+202) {
tmp = x_46_im * (x_46_re * x_46_im);
} else if (x_46_re <= 1.2e+151) {
tmp = x_46_re * -(x_46_im * x_46_im);
} else {
tmp = (x_46_re * x_46_re) * 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_46re <= (-1.05d+202)) then
tmp = x_46im * (x_46re * x_46im)
else if (x_46re <= 1.2d+151) then
tmp = x_46re * -(x_46im * x_46im)
else
tmp = (x_46re * x_46re) * 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_re <= -1.05e+202) {
tmp = x_46_im * (x_46_re * x_46_im);
} else if (x_46_re <= 1.2e+151) {
tmp = x_46_re * -(x_46_im * x_46_im);
} else {
tmp = (x_46_re * x_46_re) * x_46_im;
}
return tmp;
}
def code(x_46_re, x_46_im): tmp = 0 if x_46_re <= -1.05e+202: tmp = x_46_im * (x_46_re * x_46_im) elif x_46_re <= 1.2e+151: tmp = x_46_re * -(x_46_im * x_46_im) else: tmp = (x_46_re * x_46_re) * x_46_im return tmp
function code(x_46_re, x_46_im) tmp = 0.0 if (x_46_re <= -1.05e+202) tmp = Float64(x_46_im * Float64(x_46_re * x_46_im)); elseif (x_46_re <= 1.2e+151) tmp = Float64(x_46_re * Float64(-Float64(x_46_im * x_46_im))); else tmp = Float64(Float64(x_46_re * x_46_re) * x_46_im); end return tmp end
function tmp_2 = code(x_46_re, x_46_im) tmp = 0.0; if (x_46_re <= -1.05e+202) tmp = x_46_im * (x_46_re * x_46_im); elseif (x_46_re <= 1.2e+151) tmp = x_46_re * -(x_46_im * x_46_im); else tmp = (x_46_re * x_46_re) * x_46_im; end tmp_2 = tmp; end
code[x$46$re_, x$46$im_] := If[LessEqual[x$46$re, -1.05e+202], N[(x$46$im * N[(x$46$re * x$46$im), $MachinePrecision]), $MachinePrecision], If[LessEqual[x$46$re, 1.2e+151], N[(x$46$re * (-N[(x$46$im * x$46$im), $MachinePrecision])), $MachinePrecision], N[(N[(x$46$re * x$46$re), $MachinePrecision] * x$46$im), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x.re \leq -1.05 \cdot 10^{+202}:\\
\;\;\;\;x.im \cdot \left(x.re \cdot x.im\right)\\
\mathbf{elif}\;x.re \leq 1.2 \cdot 10^{+151}:\\
\;\;\;\;x.re \cdot \left(-x.im \cdot x.im\right)\\
\mathbf{else}:\\
\;\;\;\;\left(x.re \cdot x.re\right) \cdot x.im\\
\end{array}
\end{array}
if x.re < -1.05e202Initial program 36.7%
sqr-neg36.7%
difference-of-squares53.3%
sub-neg53.3%
associate-*l*53.3%
sub-neg53.3%
remove-double-neg53.3%
+-commutative53.3%
*-commutative53.3%
*-commutative53.3%
distribute-rgt-out53.3%
Simplified53.3%
Taylor expanded in x.im around 0 53.3%
associate-*r*53.3%
*-commutative53.3%
*-commutative53.3%
unpow253.3%
associate-*l*53.3%
*-commutative53.3%
count-253.3%
Simplified53.3%
Taylor expanded in x.re around 0 17.0%
associate-*r*17.0%
neg-mul-117.0%
unpow217.0%
distribute-rgt-neg-in17.0%
Simplified17.0%
Applied egg-rr47.9%
if -1.05e202 < x.re < 1.20000000000000005e151Initial program 88.9%
sqr-neg88.9%
difference-of-squares90.4%
sub-neg90.4%
associate-*l*99.3%
sub-neg99.3%
remove-double-neg99.3%
+-commutative99.3%
*-commutative99.3%
*-commutative99.3%
distribute-rgt-out99.3%
Simplified99.3%
Taylor expanded in x.im around 0 90.4%
associate-*r*90.4%
*-commutative90.4%
*-commutative90.4%
unpow290.4%
associate-*l*90.4%
*-commutative90.4%
count-290.4%
Simplified90.4%
Taylor expanded in x.re around 0 64.4%
associate-*r*64.4%
neg-mul-164.4%
unpow264.4%
distribute-rgt-neg-in64.4%
Simplified64.4%
*-commutative64.4%
cancel-sign-sub-inv64.4%
distribute-lft-neg-in64.4%
associate-*r*64.5%
add-sqr-sqrt31.6%
sqrt-unprod42.4%
sqr-neg42.4%
sqrt-prod11.1%
add-sqr-sqrt21.4%
associate-*r*20.6%
*-commutative20.6%
*-commutative20.6%
distribute-lft-out20.6%
add-sqr-sqrt9.9%
sqrt-unprod21.1%
sqr-neg21.1%
sqrt-prod11.2%
add-sqr-sqrt21.1%
flip-+0.0%
Applied egg-rr42.8%
distribute-lft-neg-in42.8%
Simplified42.8%
if 1.20000000000000005e151 < x.re Initial program 58.6%
sqr-neg58.6%
difference-of-squares58.6%
sub-neg58.6%
associate-*l*58.6%
sub-neg58.6%
remove-double-neg58.6%
+-commutative58.6%
*-commutative58.6%
*-commutative58.6%
distribute-rgt-out58.6%
Simplified58.6%
Taylor expanded in x.re around 0 15.4%
*-commutative15.4%
Simplified15.4%
Taylor expanded in x.re around inf 69.0%
unpow269.0%
Simplified69.0%
Final simplification46.4%
(FPCore (x.re x.im) :precision binary64 (if (<= x.re -3.6e+201) (* x.re (* x.im x.im)) (* (* x.re x.re) x.im)))
double code(double x_46_re, double x_46_im) {
double tmp;
if (x_46_re <= -3.6e+201) {
tmp = x_46_re * (x_46_im * x_46_im);
} else {
tmp = (x_46_re * x_46_re) * 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_46re <= (-3.6d+201)) then
tmp = x_46re * (x_46im * x_46im)
else
tmp = (x_46re * x_46re) * 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_re <= -3.6e+201) {
tmp = x_46_re * (x_46_im * x_46_im);
} else {
tmp = (x_46_re * x_46_re) * x_46_im;
}
return tmp;
}
def code(x_46_re, x_46_im): tmp = 0 if x_46_re <= -3.6e+201: tmp = x_46_re * (x_46_im * x_46_im) else: tmp = (x_46_re * x_46_re) * x_46_im return tmp
function code(x_46_re, x_46_im) tmp = 0.0 if (x_46_re <= -3.6e+201) tmp = Float64(x_46_re * Float64(x_46_im * x_46_im)); else tmp = Float64(Float64(x_46_re * x_46_re) * x_46_im); end return tmp end
function tmp_2 = code(x_46_re, x_46_im) tmp = 0.0; if (x_46_re <= -3.6e+201) tmp = x_46_re * (x_46_im * x_46_im); else tmp = (x_46_re * x_46_re) * x_46_im; end tmp_2 = tmp; end
code[x$46$re_, x$46$im_] := If[LessEqual[x$46$re, -3.6e+201], N[(x$46$re * N[(x$46$im * x$46$im), $MachinePrecision]), $MachinePrecision], N[(N[(x$46$re * x$46$re), $MachinePrecision] * x$46$im), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x.re \leq -3.6 \cdot 10^{+201}:\\
\;\;\;\;x.re \cdot \left(x.im \cdot x.im\right)\\
\mathbf{else}:\\
\;\;\;\;\left(x.re \cdot x.re\right) \cdot x.im\\
\end{array}
\end{array}
if x.re < -3.59999999999999976e201Initial program 36.7%
sqr-neg36.7%
difference-of-squares53.3%
sub-neg53.3%
associate-*l*53.3%
sub-neg53.3%
remove-double-neg53.3%
+-commutative53.3%
*-commutative53.3%
*-commutative53.3%
distribute-rgt-out53.3%
Simplified53.3%
Taylor expanded in x.im around 0 53.3%
associate-*r*53.3%
*-commutative53.3%
*-commutative53.3%
unpow253.3%
associate-*l*53.3%
*-commutative53.3%
count-253.3%
Simplified53.3%
Taylor expanded in x.re around 0 17.0%
associate-*r*17.0%
neg-mul-117.0%
unpow217.0%
distribute-rgt-neg-in17.0%
Simplified17.0%
Applied egg-rr47.8%
if -3.59999999999999976e201 < x.re Initial program 85.0%
sqr-neg85.0%
difference-of-squares86.4%
sub-neg86.4%
associate-*l*94.0%
sub-neg94.0%
remove-double-neg94.0%
+-commutative94.0%
*-commutative94.0%
*-commutative94.0%
distribute-rgt-out94.0%
Simplified94.0%
Taylor expanded in x.re around 0 66.1%
*-commutative66.1%
Simplified66.1%
Taylor expanded in x.re around inf 30.6%
unpow230.6%
Simplified30.6%
Final simplification32.6%
(FPCore (x.re x.im) :precision binary64 (if (<= x.re -4.8e+203) (* x.im (* x.re x.im)) (* (* x.re x.re) x.im)))
double code(double x_46_re, double x_46_im) {
double tmp;
if (x_46_re <= -4.8e+203) {
tmp = x_46_im * (x_46_re * x_46_im);
} else {
tmp = (x_46_re * x_46_re) * 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_46re <= (-4.8d+203)) then
tmp = x_46im * (x_46re * x_46im)
else
tmp = (x_46re * x_46re) * 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_re <= -4.8e+203) {
tmp = x_46_im * (x_46_re * x_46_im);
} else {
tmp = (x_46_re * x_46_re) * x_46_im;
}
return tmp;
}
def code(x_46_re, x_46_im): tmp = 0 if x_46_re <= -4.8e+203: tmp = x_46_im * (x_46_re * x_46_im) else: tmp = (x_46_re * x_46_re) * x_46_im return tmp
function code(x_46_re, x_46_im) tmp = 0.0 if (x_46_re <= -4.8e+203) tmp = Float64(x_46_im * Float64(x_46_re * x_46_im)); else tmp = Float64(Float64(x_46_re * x_46_re) * x_46_im); end return tmp end
function tmp_2 = code(x_46_re, x_46_im) tmp = 0.0; if (x_46_re <= -4.8e+203) tmp = x_46_im * (x_46_re * x_46_im); else tmp = (x_46_re * x_46_re) * x_46_im; end tmp_2 = tmp; end
code[x$46$re_, x$46$im_] := If[LessEqual[x$46$re, -4.8e+203], N[(x$46$im * N[(x$46$re * x$46$im), $MachinePrecision]), $MachinePrecision], N[(N[(x$46$re * x$46$re), $MachinePrecision] * x$46$im), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x.re \leq -4.8 \cdot 10^{+203}:\\
\;\;\;\;x.im \cdot \left(x.re \cdot x.im\right)\\
\mathbf{else}:\\
\;\;\;\;\left(x.re \cdot x.re\right) \cdot x.im\\
\end{array}
\end{array}
if x.re < -4.8000000000000002e203Initial program 36.7%
sqr-neg36.7%
difference-of-squares53.3%
sub-neg53.3%
associate-*l*53.3%
sub-neg53.3%
remove-double-neg53.3%
+-commutative53.3%
*-commutative53.3%
*-commutative53.3%
distribute-rgt-out53.3%
Simplified53.3%
Taylor expanded in x.im around 0 53.3%
associate-*r*53.3%
*-commutative53.3%
*-commutative53.3%
unpow253.3%
associate-*l*53.3%
*-commutative53.3%
count-253.3%
Simplified53.3%
Taylor expanded in x.re around 0 17.0%
associate-*r*17.0%
neg-mul-117.0%
unpow217.0%
distribute-rgt-neg-in17.0%
Simplified17.0%
Applied egg-rr47.9%
if -4.8000000000000002e203 < x.re Initial program 85.0%
sqr-neg85.0%
difference-of-squares86.4%
sub-neg86.4%
associate-*l*94.0%
sub-neg94.0%
remove-double-neg94.0%
+-commutative94.0%
*-commutative94.0%
*-commutative94.0%
distribute-rgt-out94.0%
Simplified94.0%
Taylor expanded in x.re around 0 66.1%
*-commutative66.1%
Simplified66.1%
Taylor expanded in x.re around inf 30.6%
unpow230.6%
Simplified30.6%
Final simplification32.6%
(FPCore (x.re x.im) :precision binary64 (* (* x.re x.re) x.im))
double code(double x_46_re, double x_46_im) {
return (x_46_re * 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
end function
public static double code(double x_46_re, double x_46_im) {
return (x_46_re * x_46_re) * x_46_im;
}
def code(x_46_re, x_46_im): return (x_46_re * x_46_re) * x_46_im
function code(x_46_re, x_46_im) return Float64(Float64(x_46_re * 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; end
code[x$46$re_, x$46$im_] := N[(N[(x$46$re * x$46$re), $MachinePrecision] * x$46$im), $MachinePrecision]
\begin{array}{l}
\\
\left(x.re \cdot x.re\right) \cdot x.im
\end{array}
Initial program 79.4%
sqr-neg79.4%
difference-of-squares82.5%
sub-neg82.5%
associate-*l*89.3%
sub-neg89.3%
remove-double-neg89.3%
+-commutative89.3%
*-commutative89.3%
*-commutative89.3%
distribute-rgt-out89.3%
Simplified89.3%
Taylor expanded in x.re around 0 61.9%
*-commutative61.9%
Simplified61.9%
Taylor expanded in x.re around inf 32.1%
unpow232.1%
Simplified32.1%
Final simplification32.1%
(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 2023291
(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)))