
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (* (* 3.0 x1) x1))
(t_1 (+ (* x1 x1) 1.0))
(t_2 (/ (- (+ t_0 (* 2.0 x2)) x1) t_1)))
(+
x1
(+
(+
(+
(+
(*
(+
(* (* (* 2.0 x1) t_2) (- t_2 3.0))
(* (* x1 x1) (- (* 4.0 t_2) 6.0)))
t_1)
(* t_0 t_2))
(* (* x1 x1) x1))
x1)
(* 3.0 (/ (- (- t_0 (* 2.0 x2)) x1) t_1))))))
double code(double x1, double x2) {
double t_0 = (3.0 * x1) * x1;
double t_1 = (x1 * x1) + 1.0;
double t_2 = ((t_0 + (2.0 * x2)) - x1) / t_1;
return x1 + (((((((((2.0 * x1) * t_2) * (t_2 - 3.0)) + ((x1 * x1) * ((4.0 * t_2) - 6.0))) * t_1) + (t_0 * t_2)) + ((x1 * x1) * x1)) + x1) + (3.0 * (((t_0 - (2.0 * x2)) - x1) / t_1)));
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
real(8) :: t_0
real(8) :: t_1
real(8) :: t_2
t_0 = (3.0d0 * x1) * x1
t_1 = (x1 * x1) + 1.0d0
t_2 = ((t_0 + (2.0d0 * x2)) - x1) / t_1
code = x1 + (((((((((2.0d0 * x1) * t_2) * (t_2 - 3.0d0)) + ((x1 * x1) * ((4.0d0 * t_2) - 6.0d0))) * t_1) + (t_0 * t_2)) + ((x1 * x1) * x1)) + x1) + (3.0d0 * (((t_0 - (2.0d0 * x2)) - x1) / t_1)))
end function
public static double code(double x1, double x2) {
double t_0 = (3.0 * x1) * x1;
double t_1 = (x1 * x1) + 1.0;
double t_2 = ((t_0 + (2.0 * x2)) - x1) / t_1;
return x1 + (((((((((2.0 * x1) * t_2) * (t_2 - 3.0)) + ((x1 * x1) * ((4.0 * t_2) - 6.0))) * t_1) + (t_0 * t_2)) + ((x1 * x1) * x1)) + x1) + (3.0 * (((t_0 - (2.0 * x2)) - x1) / t_1)));
}
def code(x1, x2): t_0 = (3.0 * x1) * x1 t_1 = (x1 * x1) + 1.0 t_2 = ((t_0 + (2.0 * x2)) - x1) / t_1 return x1 + (((((((((2.0 * x1) * t_2) * (t_2 - 3.0)) + ((x1 * x1) * ((4.0 * t_2) - 6.0))) * t_1) + (t_0 * t_2)) + ((x1 * x1) * x1)) + x1) + (3.0 * (((t_0 - (2.0 * x2)) - x1) / t_1)))
function code(x1, x2) t_0 = Float64(Float64(3.0 * x1) * x1) t_1 = Float64(Float64(x1 * x1) + 1.0) t_2 = Float64(Float64(Float64(t_0 + Float64(2.0 * x2)) - x1) / t_1) return Float64(x1 + Float64(Float64(Float64(Float64(Float64(Float64(Float64(Float64(Float64(2.0 * x1) * t_2) * Float64(t_2 - 3.0)) + Float64(Float64(x1 * x1) * Float64(Float64(4.0 * t_2) - 6.0))) * t_1) + Float64(t_0 * t_2)) + Float64(Float64(x1 * x1) * x1)) + x1) + Float64(3.0 * Float64(Float64(Float64(t_0 - Float64(2.0 * x2)) - x1) / t_1)))) end
function tmp = code(x1, x2) t_0 = (3.0 * x1) * x1; t_1 = (x1 * x1) + 1.0; t_2 = ((t_0 + (2.0 * x2)) - x1) / t_1; tmp = x1 + (((((((((2.0 * x1) * t_2) * (t_2 - 3.0)) + ((x1 * x1) * ((4.0 * t_2) - 6.0))) * t_1) + (t_0 * t_2)) + ((x1 * x1) * x1)) + x1) + (3.0 * (((t_0 - (2.0 * x2)) - x1) / t_1))); end
code[x1_, x2_] := Block[{t$95$0 = N[(N[(3.0 * x1), $MachinePrecision] * x1), $MachinePrecision]}, Block[{t$95$1 = N[(N[(x1 * x1), $MachinePrecision] + 1.0), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[(t$95$0 + N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$1), $MachinePrecision]}, N[(x1 + N[(N[(N[(N[(N[(N[(N[(N[(N[(2.0 * x1), $MachinePrecision] * t$95$2), $MachinePrecision] * N[(t$95$2 - 3.0), $MachinePrecision]), $MachinePrecision] + N[(N[(x1 * x1), $MachinePrecision] * N[(N[(4.0 * t$95$2), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * t$95$1), $MachinePrecision] + N[(t$95$0 * t$95$2), $MachinePrecision]), $MachinePrecision] + N[(N[(x1 * x1), $MachinePrecision] * x1), $MachinePrecision]), $MachinePrecision] + x1), $MachinePrecision] + N[(3.0 * N[(N[(N[(t$95$0 - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \left(3 \cdot x1\right) \cdot x1\\
t_1 := x1 \cdot x1 + 1\\
t_2 := \frac{\left(t\_0 + 2 \cdot x2\right) - x1}{t\_1}\\
x1 + \left(\left(\left(\left(\left(\left(\left(2 \cdot x1\right) \cdot t\_2\right) \cdot \left(t\_2 - 3\right) + \left(x1 \cdot x1\right) \cdot \left(4 \cdot t\_2 - 6\right)\right) \cdot t\_1 + t\_0 \cdot t\_2\right) + \left(x1 \cdot x1\right) \cdot x1\right) + x1\right) + 3 \cdot \frac{\left(t\_0 - 2 \cdot x2\right) - x1}{t\_1}\right)
\end{array}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 23 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (* (* 3.0 x1) x1))
(t_1 (+ (* x1 x1) 1.0))
(t_2 (/ (- (+ t_0 (* 2.0 x2)) x1) t_1)))
(+
x1
(+
(+
(+
(+
(*
(+
(* (* (* 2.0 x1) t_2) (- t_2 3.0))
(* (* x1 x1) (- (* 4.0 t_2) 6.0)))
t_1)
(* t_0 t_2))
(* (* x1 x1) x1))
x1)
(* 3.0 (/ (- (- t_0 (* 2.0 x2)) x1) t_1))))))
double code(double x1, double x2) {
double t_0 = (3.0 * x1) * x1;
double t_1 = (x1 * x1) + 1.0;
double t_2 = ((t_0 + (2.0 * x2)) - x1) / t_1;
return x1 + (((((((((2.0 * x1) * t_2) * (t_2 - 3.0)) + ((x1 * x1) * ((4.0 * t_2) - 6.0))) * t_1) + (t_0 * t_2)) + ((x1 * x1) * x1)) + x1) + (3.0 * (((t_0 - (2.0 * x2)) - x1) / t_1)));
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
real(8) :: t_0
real(8) :: t_1
real(8) :: t_2
t_0 = (3.0d0 * x1) * x1
t_1 = (x1 * x1) + 1.0d0
t_2 = ((t_0 + (2.0d0 * x2)) - x1) / t_1
code = x1 + (((((((((2.0d0 * x1) * t_2) * (t_2 - 3.0d0)) + ((x1 * x1) * ((4.0d0 * t_2) - 6.0d0))) * t_1) + (t_0 * t_2)) + ((x1 * x1) * x1)) + x1) + (3.0d0 * (((t_0 - (2.0d0 * x2)) - x1) / t_1)))
end function
public static double code(double x1, double x2) {
double t_0 = (3.0 * x1) * x1;
double t_1 = (x1 * x1) + 1.0;
double t_2 = ((t_0 + (2.0 * x2)) - x1) / t_1;
return x1 + (((((((((2.0 * x1) * t_2) * (t_2 - 3.0)) + ((x1 * x1) * ((4.0 * t_2) - 6.0))) * t_1) + (t_0 * t_2)) + ((x1 * x1) * x1)) + x1) + (3.0 * (((t_0 - (2.0 * x2)) - x1) / t_1)));
}
def code(x1, x2): t_0 = (3.0 * x1) * x1 t_1 = (x1 * x1) + 1.0 t_2 = ((t_0 + (2.0 * x2)) - x1) / t_1 return x1 + (((((((((2.0 * x1) * t_2) * (t_2 - 3.0)) + ((x1 * x1) * ((4.0 * t_2) - 6.0))) * t_1) + (t_0 * t_2)) + ((x1 * x1) * x1)) + x1) + (3.0 * (((t_0 - (2.0 * x2)) - x1) / t_1)))
function code(x1, x2) t_0 = Float64(Float64(3.0 * x1) * x1) t_1 = Float64(Float64(x1 * x1) + 1.0) t_2 = Float64(Float64(Float64(t_0 + Float64(2.0 * x2)) - x1) / t_1) return Float64(x1 + Float64(Float64(Float64(Float64(Float64(Float64(Float64(Float64(Float64(2.0 * x1) * t_2) * Float64(t_2 - 3.0)) + Float64(Float64(x1 * x1) * Float64(Float64(4.0 * t_2) - 6.0))) * t_1) + Float64(t_0 * t_2)) + Float64(Float64(x1 * x1) * x1)) + x1) + Float64(3.0 * Float64(Float64(Float64(t_0 - Float64(2.0 * x2)) - x1) / t_1)))) end
function tmp = code(x1, x2) t_0 = (3.0 * x1) * x1; t_1 = (x1 * x1) + 1.0; t_2 = ((t_0 + (2.0 * x2)) - x1) / t_1; tmp = x1 + (((((((((2.0 * x1) * t_2) * (t_2 - 3.0)) + ((x1 * x1) * ((4.0 * t_2) - 6.0))) * t_1) + (t_0 * t_2)) + ((x1 * x1) * x1)) + x1) + (3.0 * (((t_0 - (2.0 * x2)) - x1) / t_1))); end
code[x1_, x2_] := Block[{t$95$0 = N[(N[(3.0 * x1), $MachinePrecision] * x1), $MachinePrecision]}, Block[{t$95$1 = N[(N[(x1 * x1), $MachinePrecision] + 1.0), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[(t$95$0 + N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$1), $MachinePrecision]}, N[(x1 + N[(N[(N[(N[(N[(N[(N[(N[(N[(2.0 * x1), $MachinePrecision] * t$95$2), $MachinePrecision] * N[(t$95$2 - 3.0), $MachinePrecision]), $MachinePrecision] + N[(N[(x1 * x1), $MachinePrecision] * N[(N[(4.0 * t$95$2), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * t$95$1), $MachinePrecision] + N[(t$95$0 * t$95$2), $MachinePrecision]), $MachinePrecision] + N[(N[(x1 * x1), $MachinePrecision] * x1), $MachinePrecision]), $MachinePrecision] + x1), $MachinePrecision] + N[(3.0 * N[(N[(N[(t$95$0 - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \left(3 \cdot x1\right) \cdot x1\\
t_1 := x1 \cdot x1 + 1\\
t_2 := \frac{\left(t\_0 + 2 \cdot x2\right) - x1}{t\_1}\\
x1 + \left(\left(\left(\left(\left(\left(\left(2 \cdot x1\right) \cdot t\_2\right) \cdot \left(t\_2 - 3\right) + \left(x1 \cdot x1\right) \cdot \left(4 \cdot t\_2 - 6\right)\right) \cdot t\_1 + t\_0 \cdot t\_2\right) + \left(x1 \cdot x1\right) \cdot x1\right) + x1\right) + 3 \cdot \frac{\left(t\_0 - 2 \cdot x2\right) - x1}{t\_1}\right)
\end{array}
\end{array}
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (+ (* x1 x1) 1.0))
(t_1 (* x1 (* x1 3.0)))
(t_2 (- (+ t_1 (* 2.0 x2)) x1))
(t_3 (/ t_2 t_0))
(t_4 (- -1.0 (* x1 x1)))
(t_5 (/ t_2 t_4))
(t_6
(+
x1
(+
(+
x1
(+
(+
(*
t_4
(+
(* (* x1 x1) (+ 6.0 (* 4.0 t_5)))
(* (* (* x1 2.0) t_3) (+ 3.0 t_5))))
(* t_1 t_3))
(* x1 (* x1 x1))))
(* 3.0 (/ (- (- t_1 (* 2.0 x2)) x1) t_0))))))
(if (<= t_6 INFINITY) t_6 (* (* x1 x1) (* (* x1 x1) 6.0)))))
double code(double x1, double x2) {
double t_0 = (x1 * x1) + 1.0;
double t_1 = x1 * (x1 * 3.0);
double t_2 = (t_1 + (2.0 * x2)) - x1;
double t_3 = t_2 / t_0;
double t_4 = -1.0 - (x1 * x1);
double t_5 = t_2 / t_4;
double t_6 = x1 + ((x1 + (((t_4 * (((x1 * x1) * (6.0 + (4.0 * t_5))) + (((x1 * 2.0) * t_3) * (3.0 + t_5)))) + (t_1 * t_3)) + (x1 * (x1 * x1)))) + (3.0 * (((t_1 - (2.0 * x2)) - x1) / t_0)));
double tmp;
if (t_6 <= ((double) INFINITY)) {
tmp = t_6;
} else {
tmp = (x1 * x1) * ((x1 * x1) * 6.0);
}
return tmp;
}
public static double code(double x1, double x2) {
double t_0 = (x1 * x1) + 1.0;
double t_1 = x1 * (x1 * 3.0);
double t_2 = (t_1 + (2.0 * x2)) - x1;
double t_3 = t_2 / t_0;
double t_4 = -1.0 - (x1 * x1);
double t_5 = t_2 / t_4;
double t_6 = x1 + ((x1 + (((t_4 * (((x1 * x1) * (6.0 + (4.0 * t_5))) + (((x1 * 2.0) * t_3) * (3.0 + t_5)))) + (t_1 * t_3)) + (x1 * (x1 * x1)))) + (3.0 * (((t_1 - (2.0 * x2)) - x1) / t_0)));
double tmp;
if (t_6 <= Double.POSITIVE_INFINITY) {
tmp = t_6;
} else {
tmp = (x1 * x1) * ((x1 * x1) * 6.0);
}
return tmp;
}
def code(x1, x2): t_0 = (x1 * x1) + 1.0 t_1 = x1 * (x1 * 3.0) t_2 = (t_1 + (2.0 * x2)) - x1 t_3 = t_2 / t_0 t_4 = -1.0 - (x1 * x1) t_5 = t_2 / t_4 t_6 = x1 + ((x1 + (((t_4 * (((x1 * x1) * (6.0 + (4.0 * t_5))) + (((x1 * 2.0) * t_3) * (3.0 + t_5)))) + (t_1 * t_3)) + (x1 * (x1 * x1)))) + (3.0 * (((t_1 - (2.0 * x2)) - x1) / t_0))) tmp = 0 if t_6 <= math.inf: tmp = t_6 else: tmp = (x1 * x1) * ((x1 * x1) * 6.0) return tmp
function code(x1, x2) t_0 = Float64(Float64(x1 * x1) + 1.0) t_1 = Float64(x1 * Float64(x1 * 3.0)) t_2 = Float64(Float64(t_1 + Float64(2.0 * x2)) - x1) t_3 = Float64(t_2 / t_0) t_4 = Float64(-1.0 - Float64(x1 * x1)) t_5 = Float64(t_2 / t_4) t_6 = Float64(x1 + Float64(Float64(x1 + Float64(Float64(Float64(t_4 * Float64(Float64(Float64(x1 * x1) * Float64(6.0 + Float64(4.0 * t_5))) + Float64(Float64(Float64(x1 * 2.0) * t_3) * Float64(3.0 + t_5)))) + Float64(t_1 * t_3)) + Float64(x1 * Float64(x1 * x1)))) + Float64(3.0 * Float64(Float64(Float64(t_1 - Float64(2.0 * x2)) - x1) / t_0)))) tmp = 0.0 if (t_6 <= Inf) tmp = t_6; else tmp = Float64(Float64(x1 * x1) * Float64(Float64(x1 * x1) * 6.0)); end return tmp end
function tmp_2 = code(x1, x2) t_0 = (x1 * x1) + 1.0; t_1 = x1 * (x1 * 3.0); t_2 = (t_1 + (2.0 * x2)) - x1; t_3 = t_2 / t_0; t_4 = -1.0 - (x1 * x1); t_5 = t_2 / t_4; t_6 = x1 + ((x1 + (((t_4 * (((x1 * x1) * (6.0 + (4.0 * t_5))) + (((x1 * 2.0) * t_3) * (3.0 + t_5)))) + (t_1 * t_3)) + (x1 * (x1 * x1)))) + (3.0 * (((t_1 - (2.0 * x2)) - x1) / t_0))); tmp = 0.0; if (t_6 <= Inf) tmp = t_6; else tmp = (x1 * x1) * ((x1 * x1) * 6.0); end tmp_2 = tmp; end
code[x1_, x2_] := Block[{t$95$0 = N[(N[(x1 * x1), $MachinePrecision] + 1.0), $MachinePrecision]}, Block[{t$95$1 = N[(x1 * N[(x1 * 3.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(t$95$1 + N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision]}, Block[{t$95$3 = N[(t$95$2 / t$95$0), $MachinePrecision]}, Block[{t$95$4 = N[(-1.0 - N[(x1 * x1), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$5 = N[(t$95$2 / t$95$4), $MachinePrecision]}, Block[{t$95$6 = N[(x1 + N[(N[(x1 + N[(N[(N[(t$95$4 * N[(N[(N[(x1 * x1), $MachinePrecision] * N[(6.0 + N[(4.0 * t$95$5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(N[(x1 * 2.0), $MachinePrecision] * t$95$3), $MachinePrecision] * N[(3.0 + t$95$5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(t$95$1 * t$95$3), $MachinePrecision]), $MachinePrecision] + N[(x1 * N[(x1 * x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(3.0 * N[(N[(N[(t$95$1 - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$6, Infinity], t$95$6, N[(N[(x1 * x1), $MachinePrecision] * N[(N[(x1 * x1), $MachinePrecision] * 6.0), $MachinePrecision]), $MachinePrecision]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x1 \cdot x1 + 1\\
t_1 := x1 \cdot \left(x1 \cdot 3\right)\\
t_2 := \left(t\_1 + 2 \cdot x2\right) - x1\\
t_3 := \frac{t\_2}{t\_0}\\
t_4 := -1 - x1 \cdot x1\\
t_5 := \frac{t\_2}{t\_4}\\
t_6 := x1 + \left(\left(x1 + \left(\left(t\_4 \cdot \left(\left(x1 \cdot x1\right) \cdot \left(6 + 4 \cdot t\_5\right) + \left(\left(x1 \cdot 2\right) \cdot t\_3\right) \cdot \left(3 + t\_5\right)\right) + t\_1 \cdot t\_3\right) + x1 \cdot \left(x1 \cdot x1\right)\right)\right) + 3 \cdot \frac{\left(t\_1 - 2 \cdot x2\right) - x1}{t\_0}\right)\\
\mathbf{if}\;t\_6 \leq \infty:\\
\;\;\;\;t\_6\\
\mathbf{else}:\\
\;\;\;\;\left(x1 \cdot x1\right) \cdot \left(\left(x1 \cdot x1\right) \cdot 6\right)\\
\end{array}
\end{array}
if (+.f64 x1 (+.f64 (+.f64 (+.f64 (+.f64 (*.f64 (+.f64 (*.f64 (*.f64 (*.f64 #s(literal 2 binary64) x1) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64)))) (-.f64 (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))) #s(literal 3 binary64))) (*.f64 (*.f64 x1 x1) (-.f64 (*.f64 #s(literal 4 binary64) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64)))) #s(literal 6 binary64)))) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))) (*.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))))) (*.f64 (*.f64 x1 x1) x1)) x1) (*.f64 #s(literal 3 binary64) (/.f64 (-.f64 (-.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64)))))) < +inf.0Initial program 99.5%
if +inf.0 < (+.f64 x1 (+.f64 (+.f64 (+.f64 (+.f64 (*.f64 (+.f64 (*.f64 (*.f64 (*.f64 #s(literal 2 binary64) x1) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64)))) (-.f64 (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))) #s(literal 3 binary64))) (*.f64 (*.f64 x1 x1) (-.f64 (*.f64 #s(literal 4 binary64) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64)))) #s(literal 6 binary64)))) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))) (*.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))))) (*.f64 (*.f64 x1 x1) x1)) x1) (*.f64 #s(literal 3 binary64) (/.f64 (-.f64 (-.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64)))))) Initial program 0.0%
Simplified16.9%
Taylor expanded in x1 around inf
*-lowering-*.f64N/A
pow-lowering-pow.f64100.0%
Simplified100.0%
metadata-evalN/A
pow-prod-upN/A
pow2N/A
pow2N/A
*-commutativeN/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64100.0%
Applied egg-rr100.0%
Final simplification99.6%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (* (* x1 x1) 9.0))
(t_1 (- (* 2.0 x2) (* x1 (- 1.0 (* x1 3.0)))))
(t_2 (+ (* x1 x1) 1.0))
(t_3 (/ t_2 t_1)))
(if (<= x1 -5e+153)
t_0
(if (<= x1 1850000.0)
(+
(+
x1
(*
t_2
(+
x1
(+
(* x1 (* x1 -6.0))
(/ (* x1 (+ (+ -6.0 (/ 2.0 t_3)) (* x1 4.0))) t_3)))))
(*
3.0
(*
(/ -1.0 (- -1.0 (* x1 x1)))
(+ (* (* x1 x1) t_1) (+ (* x1 (+ (* x1 3.0) -1.0)) (* x2 -2.0))))))
(+
x1
(+
t_0
(*
t_2
(*
(* x1 x1)
(+
6.0
(/
(-
(/
(+
(- (* x2 8.0) (/ (+ -6.0 (+ (* (* 2.0 x2) -6.0) 18.0)) x1))
-18.0)
x1)
3.0)
x1))))))))))
double code(double x1, double x2) {
double t_0 = (x1 * x1) * 9.0;
double t_1 = (2.0 * x2) - (x1 * (1.0 - (x1 * 3.0)));
double t_2 = (x1 * x1) + 1.0;
double t_3 = t_2 / t_1;
double tmp;
if (x1 <= -5e+153) {
tmp = t_0;
} else if (x1 <= 1850000.0) {
tmp = (x1 + (t_2 * (x1 + ((x1 * (x1 * -6.0)) + ((x1 * ((-6.0 + (2.0 / t_3)) + (x1 * 4.0))) / t_3))))) + (3.0 * ((-1.0 / (-1.0 - (x1 * x1))) * (((x1 * x1) * t_1) + ((x1 * ((x1 * 3.0) + -1.0)) + (x2 * -2.0)))));
} else {
tmp = x1 + (t_0 + (t_2 * ((x1 * x1) * (6.0 + ((((((x2 * 8.0) - ((-6.0 + (((2.0 * x2) * -6.0) + 18.0)) / x1)) + -18.0) / x1) - 3.0) / x1)))));
}
return tmp;
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
real(8) :: t_0
real(8) :: t_1
real(8) :: t_2
real(8) :: t_3
real(8) :: tmp
t_0 = (x1 * x1) * 9.0d0
t_1 = (2.0d0 * x2) - (x1 * (1.0d0 - (x1 * 3.0d0)))
t_2 = (x1 * x1) + 1.0d0
t_3 = t_2 / t_1
if (x1 <= (-5d+153)) then
tmp = t_0
else if (x1 <= 1850000.0d0) then
tmp = (x1 + (t_2 * (x1 + ((x1 * (x1 * (-6.0d0))) + ((x1 * (((-6.0d0) + (2.0d0 / t_3)) + (x1 * 4.0d0))) / t_3))))) + (3.0d0 * (((-1.0d0) / ((-1.0d0) - (x1 * x1))) * (((x1 * x1) * t_1) + ((x1 * ((x1 * 3.0d0) + (-1.0d0))) + (x2 * (-2.0d0))))))
else
tmp = x1 + (t_0 + (t_2 * ((x1 * x1) * (6.0d0 + ((((((x2 * 8.0d0) - (((-6.0d0) + (((2.0d0 * x2) * (-6.0d0)) + 18.0d0)) / x1)) + (-18.0d0)) / x1) - 3.0d0) / x1)))))
end if
code = tmp
end function
public static double code(double x1, double x2) {
double t_0 = (x1 * x1) * 9.0;
double t_1 = (2.0 * x2) - (x1 * (1.0 - (x1 * 3.0)));
double t_2 = (x1 * x1) + 1.0;
double t_3 = t_2 / t_1;
double tmp;
if (x1 <= -5e+153) {
tmp = t_0;
} else if (x1 <= 1850000.0) {
tmp = (x1 + (t_2 * (x1 + ((x1 * (x1 * -6.0)) + ((x1 * ((-6.0 + (2.0 / t_3)) + (x1 * 4.0))) / t_3))))) + (3.0 * ((-1.0 / (-1.0 - (x1 * x1))) * (((x1 * x1) * t_1) + ((x1 * ((x1 * 3.0) + -1.0)) + (x2 * -2.0)))));
} else {
tmp = x1 + (t_0 + (t_2 * ((x1 * x1) * (6.0 + ((((((x2 * 8.0) - ((-6.0 + (((2.0 * x2) * -6.0) + 18.0)) / x1)) + -18.0) / x1) - 3.0) / x1)))));
}
return tmp;
}
def code(x1, x2): t_0 = (x1 * x1) * 9.0 t_1 = (2.0 * x2) - (x1 * (1.0 - (x1 * 3.0))) t_2 = (x1 * x1) + 1.0 t_3 = t_2 / t_1 tmp = 0 if x1 <= -5e+153: tmp = t_0 elif x1 <= 1850000.0: tmp = (x1 + (t_2 * (x1 + ((x1 * (x1 * -6.0)) + ((x1 * ((-6.0 + (2.0 / t_3)) + (x1 * 4.0))) / t_3))))) + (3.0 * ((-1.0 / (-1.0 - (x1 * x1))) * (((x1 * x1) * t_1) + ((x1 * ((x1 * 3.0) + -1.0)) + (x2 * -2.0))))) else: tmp = x1 + (t_0 + (t_2 * ((x1 * x1) * (6.0 + ((((((x2 * 8.0) - ((-6.0 + (((2.0 * x2) * -6.0) + 18.0)) / x1)) + -18.0) / x1) - 3.0) / x1))))) return tmp
function code(x1, x2) t_0 = Float64(Float64(x1 * x1) * 9.0) t_1 = Float64(Float64(2.0 * x2) - Float64(x1 * Float64(1.0 - Float64(x1 * 3.0)))) t_2 = Float64(Float64(x1 * x1) + 1.0) t_3 = Float64(t_2 / t_1) tmp = 0.0 if (x1 <= -5e+153) tmp = t_0; elseif (x1 <= 1850000.0) tmp = Float64(Float64(x1 + Float64(t_2 * Float64(x1 + Float64(Float64(x1 * Float64(x1 * -6.0)) + Float64(Float64(x1 * Float64(Float64(-6.0 + Float64(2.0 / t_3)) + Float64(x1 * 4.0))) / t_3))))) + Float64(3.0 * Float64(Float64(-1.0 / Float64(-1.0 - Float64(x1 * x1))) * Float64(Float64(Float64(x1 * x1) * t_1) + Float64(Float64(x1 * Float64(Float64(x1 * 3.0) + -1.0)) + Float64(x2 * -2.0)))))); else tmp = Float64(x1 + Float64(t_0 + Float64(t_2 * Float64(Float64(x1 * x1) * Float64(6.0 + Float64(Float64(Float64(Float64(Float64(Float64(x2 * 8.0) - Float64(Float64(-6.0 + Float64(Float64(Float64(2.0 * x2) * -6.0) + 18.0)) / x1)) + -18.0) / x1) - 3.0) / x1)))))); end return tmp end
function tmp_2 = code(x1, x2) t_0 = (x1 * x1) * 9.0; t_1 = (2.0 * x2) - (x1 * (1.0 - (x1 * 3.0))); t_2 = (x1 * x1) + 1.0; t_3 = t_2 / t_1; tmp = 0.0; if (x1 <= -5e+153) tmp = t_0; elseif (x1 <= 1850000.0) tmp = (x1 + (t_2 * (x1 + ((x1 * (x1 * -6.0)) + ((x1 * ((-6.0 + (2.0 / t_3)) + (x1 * 4.0))) / t_3))))) + (3.0 * ((-1.0 / (-1.0 - (x1 * x1))) * (((x1 * x1) * t_1) + ((x1 * ((x1 * 3.0) + -1.0)) + (x2 * -2.0))))); else tmp = x1 + (t_0 + (t_2 * ((x1 * x1) * (6.0 + ((((((x2 * 8.0) - ((-6.0 + (((2.0 * x2) * -6.0) + 18.0)) / x1)) + -18.0) / x1) - 3.0) / x1))))); end tmp_2 = tmp; end
code[x1_, x2_] := Block[{t$95$0 = N[(N[(x1 * x1), $MachinePrecision] * 9.0), $MachinePrecision]}, Block[{t$95$1 = N[(N[(2.0 * x2), $MachinePrecision] - N[(x1 * N[(1.0 - N[(x1 * 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(x1 * x1), $MachinePrecision] + 1.0), $MachinePrecision]}, Block[{t$95$3 = N[(t$95$2 / t$95$1), $MachinePrecision]}, If[LessEqual[x1, -5e+153], t$95$0, If[LessEqual[x1, 1850000.0], N[(N[(x1 + N[(t$95$2 * N[(x1 + N[(N[(x1 * N[(x1 * -6.0), $MachinePrecision]), $MachinePrecision] + N[(N[(x1 * N[(N[(-6.0 + N[(2.0 / t$95$3), $MachinePrecision]), $MachinePrecision] + N[(x1 * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / t$95$3), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(3.0 * N[(N[(-1.0 / N[(-1.0 - N[(x1 * x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[(N[(x1 * x1), $MachinePrecision] * t$95$1), $MachinePrecision] + N[(N[(x1 * N[(N[(x1 * 3.0), $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision] + N[(x2 * -2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x1 + N[(t$95$0 + N[(t$95$2 * N[(N[(x1 * x1), $MachinePrecision] * N[(6.0 + N[(N[(N[(N[(N[(N[(x2 * 8.0), $MachinePrecision] - N[(N[(-6.0 + N[(N[(N[(2.0 * x2), $MachinePrecision] * -6.0), $MachinePrecision] + 18.0), $MachinePrecision]), $MachinePrecision] / x1), $MachinePrecision]), $MachinePrecision] + -18.0), $MachinePrecision] / x1), $MachinePrecision] - 3.0), $MachinePrecision] / x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \left(x1 \cdot x1\right) \cdot 9\\
t_1 := 2 \cdot x2 - x1 \cdot \left(1 - x1 \cdot 3\right)\\
t_2 := x1 \cdot x1 + 1\\
t_3 := \frac{t\_2}{t\_1}\\
\mathbf{if}\;x1 \leq -5 \cdot 10^{+153}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;x1 \leq 1850000:\\
\;\;\;\;\left(x1 + t\_2 \cdot \left(x1 + \left(x1 \cdot \left(x1 \cdot -6\right) + \frac{x1 \cdot \left(\left(-6 + \frac{2}{t\_3}\right) + x1 \cdot 4\right)}{t\_3}\right)\right)\right) + 3 \cdot \left(\frac{-1}{-1 - x1 \cdot x1} \cdot \left(\left(x1 \cdot x1\right) \cdot t\_1 + \left(x1 \cdot \left(x1 \cdot 3 + -1\right) + x2 \cdot -2\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x1 + \left(t\_0 + t\_2 \cdot \left(\left(x1 \cdot x1\right) \cdot \left(6 + \frac{\frac{\left(x2 \cdot 8 - \frac{-6 + \left(\left(2 \cdot x2\right) \cdot -6 + 18\right)}{x1}\right) + -18}{x1} - 3}{x1}\right)\right)\right)\\
\end{array}
\end{array}
if x1 < -5.00000000000000018e153Initial program 0.0%
Simplified0.0%
Taylor expanded in x1 around 0
+-lowering-+.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
associate--l+N/A
+-lowering-+.f64N/A
Simplified60.6%
Taylor expanded in x2 around 0
*-lowering-*.f64N/A
sub-negN/A
metadata-evalN/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64100.0%
Simplified100.0%
Taylor expanded in x1 around inf
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64100.0%
Simplified100.0%
if -5.00000000000000018e153 < x1 < 1.85e6Initial program 92.3%
Simplified98.3%
Applied egg-rr98.3%
if 1.85e6 < x1 Initial program 53.5%
Simplified48.1%
Taylor expanded in x1 around inf
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6453.5%
Simplified53.5%
Taylor expanded in x1 around -inf
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
mul-1-negN/A
unsub-negN/A
--lowering--.f64N/A
/-lowering-/.f64N/A
Simplified94.6%
Final simplification97.7%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (- (* 2.0 x2) (* x1 (- 1.0 (* x1 3.0)))))
(t_1 (* (* x1 x1) 9.0))
(t_2 (+ (* x1 x1) 1.0)))
(if (<= x1 -6.4e+41)
(+
x1
(+
t_1
(*
t_2
(* (* x1 x1) (+ 6.0 (/ (- (/ (+ (* x2 8.0) -18.0) x1) 3.0) x1))))))
(if (<= x1 1850000.0)
(+
x1
(+
(*
t_2
(+
x1
(+
(* (* x1 x1) -6.0)
(*
(/ t_0 t_2)
(+ (* x1 (+ -6.0 (/ 2.0 (/ t_2 t_0)))) (* (* x1 x1) 4.0))))))
(+ (* x2 -6.0) (* x1 (+ (* (* x1 3.0) (+ 3.0 (* x2 4.0))) -3.0)))))
(+
x1
(+
t_1
(*
t_2
(*
(* x1 x1)
(+
6.0
(/
(-
(/
(+
(- (* x2 8.0) (/ (+ -6.0 (+ (* (* 2.0 x2) -6.0) 18.0)) x1))
-18.0)
x1)
3.0)
x1))))))))))
double code(double x1, double x2) {
double t_0 = (2.0 * x2) - (x1 * (1.0 - (x1 * 3.0)));
double t_1 = (x1 * x1) * 9.0;
double t_2 = (x1 * x1) + 1.0;
double tmp;
if (x1 <= -6.4e+41) {
tmp = x1 + (t_1 + (t_2 * ((x1 * x1) * (6.0 + (((((x2 * 8.0) + -18.0) / x1) - 3.0) / x1)))));
} else if (x1 <= 1850000.0) {
tmp = x1 + ((t_2 * (x1 + (((x1 * x1) * -6.0) + ((t_0 / t_2) * ((x1 * (-6.0 + (2.0 / (t_2 / t_0)))) + ((x1 * x1) * 4.0)))))) + ((x2 * -6.0) + (x1 * (((x1 * 3.0) * (3.0 + (x2 * 4.0))) + -3.0))));
} else {
tmp = x1 + (t_1 + (t_2 * ((x1 * x1) * (6.0 + ((((((x2 * 8.0) - ((-6.0 + (((2.0 * x2) * -6.0) + 18.0)) / x1)) + -18.0) / x1) - 3.0) / x1)))));
}
return tmp;
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
real(8) :: t_0
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_0 = (2.0d0 * x2) - (x1 * (1.0d0 - (x1 * 3.0d0)))
t_1 = (x1 * x1) * 9.0d0
t_2 = (x1 * x1) + 1.0d0
if (x1 <= (-6.4d+41)) then
tmp = x1 + (t_1 + (t_2 * ((x1 * x1) * (6.0d0 + (((((x2 * 8.0d0) + (-18.0d0)) / x1) - 3.0d0) / x1)))))
else if (x1 <= 1850000.0d0) then
tmp = x1 + ((t_2 * (x1 + (((x1 * x1) * (-6.0d0)) + ((t_0 / t_2) * ((x1 * ((-6.0d0) + (2.0d0 / (t_2 / t_0)))) + ((x1 * x1) * 4.0d0)))))) + ((x2 * (-6.0d0)) + (x1 * (((x1 * 3.0d0) * (3.0d0 + (x2 * 4.0d0))) + (-3.0d0)))))
else
tmp = x1 + (t_1 + (t_2 * ((x1 * x1) * (6.0d0 + ((((((x2 * 8.0d0) - (((-6.0d0) + (((2.0d0 * x2) * (-6.0d0)) + 18.0d0)) / x1)) + (-18.0d0)) / x1) - 3.0d0) / x1)))))
end if
code = tmp
end function
public static double code(double x1, double x2) {
double t_0 = (2.0 * x2) - (x1 * (1.0 - (x1 * 3.0)));
double t_1 = (x1 * x1) * 9.0;
double t_2 = (x1 * x1) + 1.0;
double tmp;
if (x1 <= -6.4e+41) {
tmp = x1 + (t_1 + (t_2 * ((x1 * x1) * (6.0 + (((((x2 * 8.0) + -18.0) / x1) - 3.0) / x1)))));
} else if (x1 <= 1850000.0) {
tmp = x1 + ((t_2 * (x1 + (((x1 * x1) * -6.0) + ((t_0 / t_2) * ((x1 * (-6.0 + (2.0 / (t_2 / t_0)))) + ((x1 * x1) * 4.0)))))) + ((x2 * -6.0) + (x1 * (((x1 * 3.0) * (3.0 + (x2 * 4.0))) + -3.0))));
} else {
tmp = x1 + (t_1 + (t_2 * ((x1 * x1) * (6.0 + ((((((x2 * 8.0) - ((-6.0 + (((2.0 * x2) * -6.0) + 18.0)) / x1)) + -18.0) / x1) - 3.0) / x1)))));
}
return tmp;
}
def code(x1, x2): t_0 = (2.0 * x2) - (x1 * (1.0 - (x1 * 3.0))) t_1 = (x1 * x1) * 9.0 t_2 = (x1 * x1) + 1.0 tmp = 0 if x1 <= -6.4e+41: tmp = x1 + (t_1 + (t_2 * ((x1 * x1) * (6.0 + (((((x2 * 8.0) + -18.0) / x1) - 3.0) / x1))))) elif x1 <= 1850000.0: tmp = x1 + ((t_2 * (x1 + (((x1 * x1) * -6.0) + ((t_0 / t_2) * ((x1 * (-6.0 + (2.0 / (t_2 / t_0)))) + ((x1 * x1) * 4.0)))))) + ((x2 * -6.0) + (x1 * (((x1 * 3.0) * (3.0 + (x2 * 4.0))) + -3.0)))) else: tmp = x1 + (t_1 + (t_2 * ((x1 * x1) * (6.0 + ((((((x2 * 8.0) - ((-6.0 + (((2.0 * x2) * -6.0) + 18.0)) / x1)) + -18.0) / x1) - 3.0) / x1))))) return tmp
function code(x1, x2) t_0 = Float64(Float64(2.0 * x2) - Float64(x1 * Float64(1.0 - Float64(x1 * 3.0)))) t_1 = Float64(Float64(x1 * x1) * 9.0) t_2 = Float64(Float64(x1 * x1) + 1.0) tmp = 0.0 if (x1 <= -6.4e+41) tmp = Float64(x1 + Float64(t_1 + Float64(t_2 * Float64(Float64(x1 * x1) * Float64(6.0 + Float64(Float64(Float64(Float64(Float64(x2 * 8.0) + -18.0) / x1) - 3.0) / x1)))))); elseif (x1 <= 1850000.0) tmp = Float64(x1 + Float64(Float64(t_2 * Float64(x1 + Float64(Float64(Float64(x1 * x1) * -6.0) + Float64(Float64(t_0 / t_2) * Float64(Float64(x1 * Float64(-6.0 + Float64(2.0 / Float64(t_2 / t_0)))) + Float64(Float64(x1 * x1) * 4.0)))))) + Float64(Float64(x2 * -6.0) + Float64(x1 * Float64(Float64(Float64(x1 * 3.0) * Float64(3.0 + Float64(x2 * 4.0))) + -3.0))))); else tmp = Float64(x1 + Float64(t_1 + Float64(t_2 * Float64(Float64(x1 * x1) * Float64(6.0 + Float64(Float64(Float64(Float64(Float64(Float64(x2 * 8.0) - Float64(Float64(-6.0 + Float64(Float64(Float64(2.0 * x2) * -6.0) + 18.0)) / x1)) + -18.0) / x1) - 3.0) / x1)))))); end return tmp end
function tmp_2 = code(x1, x2) t_0 = (2.0 * x2) - (x1 * (1.0 - (x1 * 3.0))); t_1 = (x1 * x1) * 9.0; t_2 = (x1 * x1) + 1.0; tmp = 0.0; if (x1 <= -6.4e+41) tmp = x1 + (t_1 + (t_2 * ((x1 * x1) * (6.0 + (((((x2 * 8.0) + -18.0) / x1) - 3.0) / x1))))); elseif (x1 <= 1850000.0) tmp = x1 + ((t_2 * (x1 + (((x1 * x1) * -6.0) + ((t_0 / t_2) * ((x1 * (-6.0 + (2.0 / (t_2 / t_0)))) + ((x1 * x1) * 4.0)))))) + ((x2 * -6.0) + (x1 * (((x1 * 3.0) * (3.0 + (x2 * 4.0))) + -3.0)))); else tmp = x1 + (t_1 + (t_2 * ((x1 * x1) * (6.0 + ((((((x2 * 8.0) - ((-6.0 + (((2.0 * x2) * -6.0) + 18.0)) / x1)) + -18.0) / x1) - 3.0) / x1))))); end tmp_2 = tmp; end
code[x1_, x2_] := Block[{t$95$0 = N[(N[(2.0 * x2), $MachinePrecision] - N[(x1 * N[(1.0 - N[(x1 * 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(N[(x1 * x1), $MachinePrecision] * 9.0), $MachinePrecision]}, Block[{t$95$2 = N[(N[(x1 * x1), $MachinePrecision] + 1.0), $MachinePrecision]}, If[LessEqual[x1, -6.4e+41], N[(x1 + N[(t$95$1 + N[(t$95$2 * N[(N[(x1 * x1), $MachinePrecision] * N[(6.0 + N[(N[(N[(N[(N[(x2 * 8.0), $MachinePrecision] + -18.0), $MachinePrecision] / x1), $MachinePrecision] - 3.0), $MachinePrecision] / x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 1850000.0], N[(x1 + N[(N[(t$95$2 * N[(x1 + N[(N[(N[(x1 * x1), $MachinePrecision] * -6.0), $MachinePrecision] + N[(N[(t$95$0 / t$95$2), $MachinePrecision] * N[(N[(x1 * N[(-6.0 + N[(2.0 / N[(t$95$2 / t$95$0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(x1 * x1), $MachinePrecision] * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(x2 * -6.0), $MachinePrecision] + N[(x1 * N[(N[(N[(x1 * 3.0), $MachinePrecision] * N[(3.0 + N[(x2 * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + -3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x1 + N[(t$95$1 + N[(t$95$2 * N[(N[(x1 * x1), $MachinePrecision] * N[(6.0 + N[(N[(N[(N[(N[(N[(x2 * 8.0), $MachinePrecision] - N[(N[(-6.0 + N[(N[(N[(2.0 * x2), $MachinePrecision] * -6.0), $MachinePrecision] + 18.0), $MachinePrecision]), $MachinePrecision] / x1), $MachinePrecision]), $MachinePrecision] + -18.0), $MachinePrecision] / x1), $MachinePrecision] - 3.0), $MachinePrecision] / x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := 2 \cdot x2 - x1 \cdot \left(1 - x1 \cdot 3\right)\\
t_1 := \left(x1 \cdot x1\right) \cdot 9\\
t_2 := x1 \cdot x1 + 1\\
\mathbf{if}\;x1 \leq -6.4 \cdot 10^{+41}:\\
\;\;\;\;x1 + \left(t\_1 + t\_2 \cdot \left(\left(x1 \cdot x1\right) \cdot \left(6 + \frac{\frac{x2 \cdot 8 + -18}{x1} - 3}{x1}\right)\right)\right)\\
\mathbf{elif}\;x1 \leq 1850000:\\
\;\;\;\;x1 + \left(t\_2 \cdot \left(x1 + \left(\left(x1 \cdot x1\right) \cdot -6 + \frac{t\_0}{t\_2} \cdot \left(x1 \cdot \left(-6 + \frac{2}{\frac{t\_2}{t\_0}}\right) + \left(x1 \cdot x1\right) \cdot 4\right)\right)\right) + \left(x2 \cdot -6 + x1 \cdot \left(\left(x1 \cdot 3\right) \cdot \left(3 + x2 \cdot 4\right) + -3\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x1 + \left(t\_1 + t\_2 \cdot \left(\left(x1 \cdot x1\right) \cdot \left(6 + \frac{\frac{\left(x2 \cdot 8 - \frac{-6 + \left(\left(2 \cdot x2\right) \cdot -6 + 18\right)}{x1}\right) + -18}{x1} - 3}{x1}\right)\right)\right)\\
\end{array}
\end{array}
if x1 < -6.40000000000000019e41Initial program 29.5%
Simplified45.2%
Taylor expanded in x1 around inf
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6448.3%
Simplified48.3%
Taylor expanded in x1 around -inf
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
mul-1-negN/A
unsub-negN/A
--lowering--.f64N/A
/-lowering-/.f64N/A
mul-1-negN/A
unsub-negN/A
--lowering--.f64N/A
/-lowering-/.f64N/A
sub-negN/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
metadata-eval96.8%
Simplified96.8%
if -6.40000000000000019e41 < x1 < 1.85e6Initial program 99.4%
Simplified99.4%
+-commutativeN/A
+-lowering-+.f64N/A
Applied egg-rr99.4%
Taylor expanded in x1 around 0
+-lowering-+.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
sub-negN/A
metadata-evalN/A
+-lowering-+.f64N/A
associate-*r*N/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
+-commutativeN/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f6499.4%
Simplified99.4%
if 1.85e6 < x1 Initial program 53.5%
Simplified48.1%
Taylor expanded in x1 around inf
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6453.5%
Simplified53.5%
Taylor expanded in x1 around -inf
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
mul-1-negN/A
unsub-negN/A
--lowering--.f64N/A
/-lowering-/.f64N/A
Simplified94.6%
Final simplification97.7%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (- (* 2.0 x2) (* x1 (- 1.0 (* x1 3.0)))))
(t_1 (* (* x1 x1) 9.0))
(t_2 (+ (* x1 x1) 1.0)))
(if (<= x1 -1.8e+41)
(+
x1
(+
t_1
(*
t_2
(* (* x1 x1) (+ 6.0 (/ (- (/ (+ (* x2 8.0) -18.0) x1) 3.0) x1))))))
(if (<= x1 1850000.0)
(+
x1
(+
(+ (* x2 -6.0) (* x1 (+ (* (* x1 3.0) (+ 3.0 (* x2 4.0))) -3.0)))
(*
t_2
(+
x1
(+
(* (* x1 x1) -6.0)
(*
(/ t_0 t_2)
(+
(* (* x1 x1) 4.0)
(* x1 (- -6.0 (/ (* 2.0 t_0) (- -1.0 (* x1 x1))))))))))))
(+
x1
(+
t_1
(*
t_2
(*
(* x1 x1)
(+
6.0
(/
(-
(/
(+
(- (* x2 8.0) (/ (+ -6.0 (+ (* (* 2.0 x2) -6.0) 18.0)) x1))
-18.0)
x1)
3.0)
x1))))))))))
double code(double x1, double x2) {
double t_0 = (2.0 * x2) - (x1 * (1.0 - (x1 * 3.0)));
double t_1 = (x1 * x1) * 9.0;
double t_2 = (x1 * x1) + 1.0;
double tmp;
if (x1 <= -1.8e+41) {
tmp = x1 + (t_1 + (t_2 * ((x1 * x1) * (6.0 + (((((x2 * 8.0) + -18.0) / x1) - 3.0) / x1)))));
} else if (x1 <= 1850000.0) {
tmp = x1 + (((x2 * -6.0) + (x1 * (((x1 * 3.0) * (3.0 + (x2 * 4.0))) + -3.0))) + (t_2 * (x1 + (((x1 * x1) * -6.0) + ((t_0 / t_2) * (((x1 * x1) * 4.0) + (x1 * (-6.0 - ((2.0 * t_0) / (-1.0 - (x1 * x1)))))))))));
} else {
tmp = x1 + (t_1 + (t_2 * ((x1 * x1) * (6.0 + ((((((x2 * 8.0) - ((-6.0 + (((2.0 * x2) * -6.0) + 18.0)) / x1)) + -18.0) / x1) - 3.0) / x1)))));
}
return tmp;
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
real(8) :: t_0
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_0 = (2.0d0 * x2) - (x1 * (1.0d0 - (x1 * 3.0d0)))
t_1 = (x1 * x1) * 9.0d0
t_2 = (x1 * x1) + 1.0d0
if (x1 <= (-1.8d+41)) then
tmp = x1 + (t_1 + (t_2 * ((x1 * x1) * (6.0d0 + (((((x2 * 8.0d0) + (-18.0d0)) / x1) - 3.0d0) / x1)))))
else if (x1 <= 1850000.0d0) then
tmp = x1 + (((x2 * (-6.0d0)) + (x1 * (((x1 * 3.0d0) * (3.0d0 + (x2 * 4.0d0))) + (-3.0d0)))) + (t_2 * (x1 + (((x1 * x1) * (-6.0d0)) + ((t_0 / t_2) * (((x1 * x1) * 4.0d0) + (x1 * ((-6.0d0) - ((2.0d0 * t_0) / ((-1.0d0) - (x1 * x1)))))))))))
else
tmp = x1 + (t_1 + (t_2 * ((x1 * x1) * (6.0d0 + ((((((x2 * 8.0d0) - (((-6.0d0) + (((2.0d0 * x2) * (-6.0d0)) + 18.0d0)) / x1)) + (-18.0d0)) / x1) - 3.0d0) / x1)))))
end if
code = tmp
end function
public static double code(double x1, double x2) {
double t_0 = (2.0 * x2) - (x1 * (1.0 - (x1 * 3.0)));
double t_1 = (x1 * x1) * 9.0;
double t_2 = (x1 * x1) + 1.0;
double tmp;
if (x1 <= -1.8e+41) {
tmp = x1 + (t_1 + (t_2 * ((x1 * x1) * (6.0 + (((((x2 * 8.0) + -18.0) / x1) - 3.0) / x1)))));
} else if (x1 <= 1850000.0) {
tmp = x1 + (((x2 * -6.0) + (x1 * (((x1 * 3.0) * (3.0 + (x2 * 4.0))) + -3.0))) + (t_2 * (x1 + (((x1 * x1) * -6.0) + ((t_0 / t_2) * (((x1 * x1) * 4.0) + (x1 * (-6.0 - ((2.0 * t_0) / (-1.0 - (x1 * x1)))))))))));
} else {
tmp = x1 + (t_1 + (t_2 * ((x1 * x1) * (6.0 + ((((((x2 * 8.0) - ((-6.0 + (((2.0 * x2) * -6.0) + 18.0)) / x1)) + -18.0) / x1) - 3.0) / x1)))));
}
return tmp;
}
def code(x1, x2): t_0 = (2.0 * x2) - (x1 * (1.0 - (x1 * 3.0))) t_1 = (x1 * x1) * 9.0 t_2 = (x1 * x1) + 1.0 tmp = 0 if x1 <= -1.8e+41: tmp = x1 + (t_1 + (t_2 * ((x1 * x1) * (6.0 + (((((x2 * 8.0) + -18.0) / x1) - 3.0) / x1))))) elif x1 <= 1850000.0: tmp = x1 + (((x2 * -6.0) + (x1 * (((x1 * 3.0) * (3.0 + (x2 * 4.0))) + -3.0))) + (t_2 * (x1 + (((x1 * x1) * -6.0) + ((t_0 / t_2) * (((x1 * x1) * 4.0) + (x1 * (-6.0 - ((2.0 * t_0) / (-1.0 - (x1 * x1))))))))))) else: tmp = x1 + (t_1 + (t_2 * ((x1 * x1) * (6.0 + ((((((x2 * 8.0) - ((-6.0 + (((2.0 * x2) * -6.0) + 18.0)) / x1)) + -18.0) / x1) - 3.0) / x1))))) return tmp
function code(x1, x2) t_0 = Float64(Float64(2.0 * x2) - Float64(x1 * Float64(1.0 - Float64(x1 * 3.0)))) t_1 = Float64(Float64(x1 * x1) * 9.0) t_2 = Float64(Float64(x1 * x1) + 1.0) tmp = 0.0 if (x1 <= -1.8e+41) tmp = Float64(x1 + Float64(t_1 + Float64(t_2 * Float64(Float64(x1 * x1) * Float64(6.0 + Float64(Float64(Float64(Float64(Float64(x2 * 8.0) + -18.0) / x1) - 3.0) / x1)))))); elseif (x1 <= 1850000.0) tmp = Float64(x1 + Float64(Float64(Float64(x2 * -6.0) + Float64(x1 * Float64(Float64(Float64(x1 * 3.0) * Float64(3.0 + Float64(x2 * 4.0))) + -3.0))) + Float64(t_2 * Float64(x1 + Float64(Float64(Float64(x1 * x1) * -6.0) + Float64(Float64(t_0 / t_2) * Float64(Float64(Float64(x1 * x1) * 4.0) + Float64(x1 * Float64(-6.0 - Float64(Float64(2.0 * t_0) / Float64(-1.0 - Float64(x1 * x1)))))))))))); else tmp = Float64(x1 + Float64(t_1 + Float64(t_2 * Float64(Float64(x1 * x1) * Float64(6.0 + Float64(Float64(Float64(Float64(Float64(Float64(x2 * 8.0) - Float64(Float64(-6.0 + Float64(Float64(Float64(2.0 * x2) * -6.0) + 18.0)) / x1)) + -18.0) / x1) - 3.0) / x1)))))); end return tmp end
function tmp_2 = code(x1, x2) t_0 = (2.0 * x2) - (x1 * (1.0 - (x1 * 3.0))); t_1 = (x1 * x1) * 9.0; t_2 = (x1 * x1) + 1.0; tmp = 0.0; if (x1 <= -1.8e+41) tmp = x1 + (t_1 + (t_2 * ((x1 * x1) * (6.0 + (((((x2 * 8.0) + -18.0) / x1) - 3.0) / x1))))); elseif (x1 <= 1850000.0) tmp = x1 + (((x2 * -6.0) + (x1 * (((x1 * 3.0) * (3.0 + (x2 * 4.0))) + -3.0))) + (t_2 * (x1 + (((x1 * x1) * -6.0) + ((t_0 / t_2) * (((x1 * x1) * 4.0) + (x1 * (-6.0 - ((2.0 * t_0) / (-1.0 - (x1 * x1))))))))))); else tmp = x1 + (t_1 + (t_2 * ((x1 * x1) * (6.0 + ((((((x2 * 8.0) - ((-6.0 + (((2.0 * x2) * -6.0) + 18.0)) / x1)) + -18.0) / x1) - 3.0) / x1))))); end tmp_2 = tmp; end
code[x1_, x2_] := Block[{t$95$0 = N[(N[(2.0 * x2), $MachinePrecision] - N[(x1 * N[(1.0 - N[(x1 * 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(N[(x1 * x1), $MachinePrecision] * 9.0), $MachinePrecision]}, Block[{t$95$2 = N[(N[(x1 * x1), $MachinePrecision] + 1.0), $MachinePrecision]}, If[LessEqual[x1, -1.8e+41], N[(x1 + N[(t$95$1 + N[(t$95$2 * N[(N[(x1 * x1), $MachinePrecision] * N[(6.0 + N[(N[(N[(N[(N[(x2 * 8.0), $MachinePrecision] + -18.0), $MachinePrecision] / x1), $MachinePrecision] - 3.0), $MachinePrecision] / x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 1850000.0], N[(x1 + N[(N[(N[(x2 * -6.0), $MachinePrecision] + N[(x1 * N[(N[(N[(x1 * 3.0), $MachinePrecision] * N[(3.0 + N[(x2 * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + -3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(t$95$2 * N[(x1 + N[(N[(N[(x1 * x1), $MachinePrecision] * -6.0), $MachinePrecision] + N[(N[(t$95$0 / t$95$2), $MachinePrecision] * N[(N[(N[(x1 * x1), $MachinePrecision] * 4.0), $MachinePrecision] + N[(x1 * N[(-6.0 - N[(N[(2.0 * t$95$0), $MachinePrecision] / N[(-1.0 - N[(x1 * x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x1 + N[(t$95$1 + N[(t$95$2 * N[(N[(x1 * x1), $MachinePrecision] * N[(6.0 + N[(N[(N[(N[(N[(N[(x2 * 8.0), $MachinePrecision] - N[(N[(-6.0 + N[(N[(N[(2.0 * x2), $MachinePrecision] * -6.0), $MachinePrecision] + 18.0), $MachinePrecision]), $MachinePrecision] / x1), $MachinePrecision]), $MachinePrecision] + -18.0), $MachinePrecision] / x1), $MachinePrecision] - 3.0), $MachinePrecision] / x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := 2 \cdot x2 - x1 \cdot \left(1 - x1 \cdot 3\right)\\
t_1 := \left(x1 \cdot x1\right) \cdot 9\\
t_2 := x1 \cdot x1 + 1\\
\mathbf{if}\;x1 \leq -1.8 \cdot 10^{+41}:\\
\;\;\;\;x1 + \left(t\_1 + t\_2 \cdot \left(\left(x1 \cdot x1\right) \cdot \left(6 + \frac{\frac{x2 \cdot 8 + -18}{x1} - 3}{x1}\right)\right)\right)\\
\mathbf{elif}\;x1 \leq 1850000:\\
\;\;\;\;x1 + \left(\left(x2 \cdot -6 + x1 \cdot \left(\left(x1 \cdot 3\right) \cdot \left(3 + x2 \cdot 4\right) + -3\right)\right) + t\_2 \cdot \left(x1 + \left(\left(x1 \cdot x1\right) \cdot -6 + \frac{t\_0}{t\_2} \cdot \left(\left(x1 \cdot x1\right) \cdot 4 + x1 \cdot \left(-6 - \frac{2 \cdot t\_0}{-1 - x1 \cdot x1}\right)\right)\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x1 + \left(t\_1 + t\_2 \cdot \left(\left(x1 \cdot x1\right) \cdot \left(6 + \frac{\frac{\left(x2 \cdot 8 - \frac{-6 + \left(\left(2 \cdot x2\right) \cdot -6 + 18\right)}{x1}\right) + -18}{x1} - 3}{x1}\right)\right)\right)\\
\end{array}
\end{array}
if x1 < -1.80000000000000013e41Initial program 29.5%
Simplified45.2%
Taylor expanded in x1 around inf
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6448.3%
Simplified48.3%
Taylor expanded in x1 around -inf
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
mul-1-negN/A
unsub-negN/A
--lowering--.f64N/A
/-lowering-/.f64N/A
mul-1-negN/A
unsub-negN/A
--lowering--.f64N/A
/-lowering-/.f64N/A
sub-negN/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
metadata-eval96.8%
Simplified96.8%
if -1.80000000000000013e41 < x1 < 1.85e6Initial program 99.4%
Simplified99.4%
Taylor expanded in x1 around 0
+-lowering-+.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
sub-negN/A
metadata-evalN/A
+-lowering-+.f64N/A
associate-*r*N/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
+-commutativeN/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f6499.4%
Simplified99.4%
if 1.85e6 < x1 Initial program 53.5%
Simplified48.1%
Taylor expanded in x1 around inf
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6453.5%
Simplified53.5%
Taylor expanded in x1 around -inf
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
mul-1-negN/A
unsub-negN/A
--lowering--.f64N/A
/-lowering-/.f64N/A
Simplified94.6%
Final simplification97.7%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (* (* x1 x1) 9.0))
(t_1 (- (* 2.0 x2) (* x1 (- 1.0 (* x1 3.0)))))
(t_2 (+ (* x1 x1) 1.0)))
(if (<= x1 -5e+153)
t_0
(if (<= x1 -5.3e-8)
(+
x1
(+
(*
t_2
(+
x1
(+
(* (* x1 x1) -6.0)
(*
(/ t_1 t_2)
(+
(* (* x1 x1) 4.0)
(* x1 (- -6.0 (/ (* 2.0 t_1) (- -1.0 (* x1 x1))))))))))
(* (* x1 x1) (+ 9.0 (/ -3.0 x1)))))
(if (<= x1 1.6e+27)
(+
(* x1 (+ -1.0 (* x1 9.0)))
(* x2 (+ -6.0 (+ (* x1 (+ (* x1 12.0) -12.0)) (* x2 (* x1 8.0))))))
(+
x1
(+
t_0
(*
t_2
(*
(* x1 x1)
(+
6.0
(/
(-
(/
(+
(- (* x2 8.0) (/ (+ -6.0 (+ (* (* 2.0 x2) -6.0) 18.0)) x1))
-18.0)
x1)
3.0)
x1)))))))))))
double code(double x1, double x2) {
double t_0 = (x1 * x1) * 9.0;
double t_1 = (2.0 * x2) - (x1 * (1.0 - (x1 * 3.0)));
double t_2 = (x1 * x1) + 1.0;
double tmp;
if (x1 <= -5e+153) {
tmp = t_0;
} else if (x1 <= -5.3e-8) {
tmp = x1 + ((t_2 * (x1 + (((x1 * x1) * -6.0) + ((t_1 / t_2) * (((x1 * x1) * 4.0) + (x1 * (-6.0 - ((2.0 * t_1) / (-1.0 - (x1 * x1)))))))))) + ((x1 * x1) * (9.0 + (-3.0 / x1))));
} else if (x1 <= 1.6e+27) {
tmp = (x1 * (-1.0 + (x1 * 9.0))) + (x2 * (-6.0 + ((x1 * ((x1 * 12.0) + -12.0)) + (x2 * (x1 * 8.0)))));
} else {
tmp = x1 + (t_0 + (t_2 * ((x1 * x1) * (6.0 + ((((((x2 * 8.0) - ((-6.0 + (((2.0 * x2) * -6.0) + 18.0)) / x1)) + -18.0) / x1) - 3.0) / x1)))));
}
return tmp;
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
real(8) :: t_0
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_0 = (x1 * x1) * 9.0d0
t_1 = (2.0d0 * x2) - (x1 * (1.0d0 - (x1 * 3.0d0)))
t_2 = (x1 * x1) + 1.0d0
if (x1 <= (-5d+153)) then
tmp = t_0
else if (x1 <= (-5.3d-8)) then
tmp = x1 + ((t_2 * (x1 + (((x1 * x1) * (-6.0d0)) + ((t_1 / t_2) * (((x1 * x1) * 4.0d0) + (x1 * ((-6.0d0) - ((2.0d0 * t_1) / ((-1.0d0) - (x1 * x1)))))))))) + ((x1 * x1) * (9.0d0 + ((-3.0d0) / x1))))
else if (x1 <= 1.6d+27) then
tmp = (x1 * ((-1.0d0) + (x1 * 9.0d0))) + (x2 * ((-6.0d0) + ((x1 * ((x1 * 12.0d0) + (-12.0d0))) + (x2 * (x1 * 8.0d0)))))
else
tmp = x1 + (t_0 + (t_2 * ((x1 * x1) * (6.0d0 + ((((((x2 * 8.0d0) - (((-6.0d0) + (((2.0d0 * x2) * (-6.0d0)) + 18.0d0)) / x1)) + (-18.0d0)) / x1) - 3.0d0) / x1)))))
end if
code = tmp
end function
public static double code(double x1, double x2) {
double t_0 = (x1 * x1) * 9.0;
double t_1 = (2.0 * x2) - (x1 * (1.0 - (x1 * 3.0)));
double t_2 = (x1 * x1) + 1.0;
double tmp;
if (x1 <= -5e+153) {
tmp = t_0;
} else if (x1 <= -5.3e-8) {
tmp = x1 + ((t_2 * (x1 + (((x1 * x1) * -6.0) + ((t_1 / t_2) * (((x1 * x1) * 4.0) + (x1 * (-6.0 - ((2.0 * t_1) / (-1.0 - (x1 * x1)))))))))) + ((x1 * x1) * (9.0 + (-3.0 / x1))));
} else if (x1 <= 1.6e+27) {
tmp = (x1 * (-1.0 + (x1 * 9.0))) + (x2 * (-6.0 + ((x1 * ((x1 * 12.0) + -12.0)) + (x2 * (x1 * 8.0)))));
} else {
tmp = x1 + (t_0 + (t_2 * ((x1 * x1) * (6.0 + ((((((x2 * 8.0) - ((-6.0 + (((2.0 * x2) * -6.0) + 18.0)) / x1)) + -18.0) / x1) - 3.0) / x1)))));
}
return tmp;
}
def code(x1, x2): t_0 = (x1 * x1) * 9.0 t_1 = (2.0 * x2) - (x1 * (1.0 - (x1 * 3.0))) t_2 = (x1 * x1) + 1.0 tmp = 0 if x1 <= -5e+153: tmp = t_0 elif x1 <= -5.3e-8: tmp = x1 + ((t_2 * (x1 + (((x1 * x1) * -6.0) + ((t_1 / t_2) * (((x1 * x1) * 4.0) + (x1 * (-6.0 - ((2.0 * t_1) / (-1.0 - (x1 * x1)))))))))) + ((x1 * x1) * (9.0 + (-3.0 / x1)))) elif x1 <= 1.6e+27: tmp = (x1 * (-1.0 + (x1 * 9.0))) + (x2 * (-6.0 + ((x1 * ((x1 * 12.0) + -12.0)) + (x2 * (x1 * 8.0))))) else: tmp = x1 + (t_0 + (t_2 * ((x1 * x1) * (6.0 + ((((((x2 * 8.0) - ((-6.0 + (((2.0 * x2) * -6.0) + 18.0)) / x1)) + -18.0) / x1) - 3.0) / x1))))) return tmp
function code(x1, x2) t_0 = Float64(Float64(x1 * x1) * 9.0) t_1 = Float64(Float64(2.0 * x2) - Float64(x1 * Float64(1.0 - Float64(x1 * 3.0)))) t_2 = Float64(Float64(x1 * x1) + 1.0) tmp = 0.0 if (x1 <= -5e+153) tmp = t_0; elseif (x1 <= -5.3e-8) tmp = Float64(x1 + Float64(Float64(t_2 * Float64(x1 + Float64(Float64(Float64(x1 * x1) * -6.0) + Float64(Float64(t_1 / t_2) * Float64(Float64(Float64(x1 * x1) * 4.0) + Float64(x1 * Float64(-6.0 - Float64(Float64(2.0 * t_1) / Float64(-1.0 - Float64(x1 * x1)))))))))) + Float64(Float64(x1 * x1) * Float64(9.0 + Float64(-3.0 / x1))))); elseif (x1 <= 1.6e+27) tmp = Float64(Float64(x1 * Float64(-1.0 + Float64(x1 * 9.0))) + Float64(x2 * Float64(-6.0 + Float64(Float64(x1 * Float64(Float64(x1 * 12.0) + -12.0)) + Float64(x2 * Float64(x1 * 8.0)))))); else tmp = Float64(x1 + Float64(t_0 + Float64(t_2 * Float64(Float64(x1 * x1) * Float64(6.0 + Float64(Float64(Float64(Float64(Float64(Float64(x2 * 8.0) - Float64(Float64(-6.0 + Float64(Float64(Float64(2.0 * x2) * -6.0) + 18.0)) / x1)) + -18.0) / x1) - 3.0) / x1)))))); end return tmp end
function tmp_2 = code(x1, x2) t_0 = (x1 * x1) * 9.0; t_1 = (2.0 * x2) - (x1 * (1.0 - (x1 * 3.0))); t_2 = (x1 * x1) + 1.0; tmp = 0.0; if (x1 <= -5e+153) tmp = t_0; elseif (x1 <= -5.3e-8) tmp = x1 + ((t_2 * (x1 + (((x1 * x1) * -6.0) + ((t_1 / t_2) * (((x1 * x1) * 4.0) + (x1 * (-6.0 - ((2.0 * t_1) / (-1.0 - (x1 * x1)))))))))) + ((x1 * x1) * (9.0 + (-3.0 / x1)))); elseif (x1 <= 1.6e+27) tmp = (x1 * (-1.0 + (x1 * 9.0))) + (x2 * (-6.0 + ((x1 * ((x1 * 12.0) + -12.0)) + (x2 * (x1 * 8.0))))); else tmp = x1 + (t_0 + (t_2 * ((x1 * x1) * (6.0 + ((((((x2 * 8.0) - ((-6.0 + (((2.0 * x2) * -6.0) + 18.0)) / x1)) + -18.0) / x1) - 3.0) / x1))))); end tmp_2 = tmp; end
code[x1_, x2_] := Block[{t$95$0 = N[(N[(x1 * x1), $MachinePrecision] * 9.0), $MachinePrecision]}, Block[{t$95$1 = N[(N[(2.0 * x2), $MachinePrecision] - N[(x1 * N[(1.0 - N[(x1 * 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(x1 * x1), $MachinePrecision] + 1.0), $MachinePrecision]}, If[LessEqual[x1, -5e+153], t$95$0, If[LessEqual[x1, -5.3e-8], N[(x1 + N[(N[(t$95$2 * N[(x1 + N[(N[(N[(x1 * x1), $MachinePrecision] * -6.0), $MachinePrecision] + N[(N[(t$95$1 / t$95$2), $MachinePrecision] * N[(N[(N[(x1 * x1), $MachinePrecision] * 4.0), $MachinePrecision] + N[(x1 * N[(-6.0 - N[(N[(2.0 * t$95$1), $MachinePrecision] / N[(-1.0 - N[(x1 * x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(x1 * x1), $MachinePrecision] * N[(9.0 + N[(-3.0 / x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 1.6e+27], N[(N[(x1 * N[(-1.0 + N[(x1 * 9.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(x2 * N[(-6.0 + N[(N[(x1 * N[(N[(x1 * 12.0), $MachinePrecision] + -12.0), $MachinePrecision]), $MachinePrecision] + N[(x2 * N[(x1 * 8.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x1 + N[(t$95$0 + N[(t$95$2 * N[(N[(x1 * x1), $MachinePrecision] * N[(6.0 + N[(N[(N[(N[(N[(N[(x2 * 8.0), $MachinePrecision] - N[(N[(-6.0 + N[(N[(N[(2.0 * x2), $MachinePrecision] * -6.0), $MachinePrecision] + 18.0), $MachinePrecision]), $MachinePrecision] / x1), $MachinePrecision]), $MachinePrecision] + -18.0), $MachinePrecision] / x1), $MachinePrecision] - 3.0), $MachinePrecision] / x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \left(x1 \cdot x1\right) \cdot 9\\
t_1 := 2 \cdot x2 - x1 \cdot \left(1 - x1 \cdot 3\right)\\
t_2 := x1 \cdot x1 + 1\\
\mathbf{if}\;x1 \leq -5 \cdot 10^{+153}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;x1 \leq -5.3 \cdot 10^{-8}:\\
\;\;\;\;x1 + \left(t\_2 \cdot \left(x1 + \left(\left(x1 \cdot x1\right) \cdot -6 + \frac{t\_1}{t\_2} \cdot \left(\left(x1 \cdot x1\right) \cdot 4 + x1 \cdot \left(-6 - \frac{2 \cdot t\_1}{-1 - x1 \cdot x1}\right)\right)\right)\right) + \left(x1 \cdot x1\right) \cdot \left(9 + \frac{-3}{x1}\right)\right)\\
\mathbf{elif}\;x1 \leq 1.6 \cdot 10^{+27}:\\
\;\;\;\;x1 \cdot \left(-1 + x1 \cdot 9\right) + x2 \cdot \left(-6 + \left(x1 \cdot \left(x1 \cdot 12 + -12\right) + x2 \cdot \left(x1 \cdot 8\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x1 + \left(t\_0 + t\_2 \cdot \left(\left(x1 \cdot x1\right) \cdot \left(6 + \frac{\frac{\left(x2 \cdot 8 - \frac{-6 + \left(\left(2 \cdot x2\right) \cdot -6 + 18\right)}{x1}\right) + -18}{x1} - 3}{x1}\right)\right)\right)\\
\end{array}
\end{array}
if x1 < -5.00000000000000018e153Initial program 0.0%
Simplified0.0%
Taylor expanded in x1 around 0
+-lowering-+.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
associate--l+N/A
+-lowering-+.f64N/A
Simplified60.6%
Taylor expanded in x2 around 0
*-lowering-*.f64N/A
sub-negN/A
metadata-evalN/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64100.0%
Simplified100.0%
Taylor expanded in x1 around inf
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64100.0%
Simplified100.0%
if -5.00000000000000018e153 < x1 < -5.2999999999999998e-8Initial program 69.4%
Simplified94.5%
Taylor expanded in x1 around inf
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
sub-negN/A
+-lowering-+.f64N/A
associate-*r/N/A
metadata-evalN/A
distribute-neg-fracN/A
metadata-evalN/A
/-lowering-/.f6499.4%
Simplified99.4%
if -5.2999999999999998e-8 < x1 < 1.60000000000000008e27Initial program 99.5%
Simplified97.9%
Taylor expanded in x1 around 0
+-lowering-+.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
associate--l+N/A
+-lowering-+.f64N/A
Simplified89.7%
Taylor expanded in x2 around 0
+-lowering-+.f64N/A
*-lowering-*.f64N/A
sub-negN/A
metadata-evalN/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
sub-negN/A
metadata-evalN/A
+-lowering-+.f64N/A
Simplified98.5%
if 1.60000000000000008e27 < x1 Initial program 49.9%
Simplified48.0%
Taylor expanded in x1 around inf
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6449.9%
Simplified49.9%
Taylor expanded in x1 around -inf
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
mul-1-negN/A
unsub-negN/A
--lowering--.f64N/A
/-lowering-/.f64N/A
Simplified98.0%
Final simplification98.7%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0
(+
x1
(+
(* (* x1 x1) 9.0)
(*
(+ (* x1 x1) 1.0)
(*
(* x1 x1)
(+
6.0
(/
(-
(/
(+
(- (* x2 8.0) (/ (+ -6.0 (+ (* (* 2.0 x2) -6.0) 18.0)) x1))
-18.0)
x1)
3.0)
x1))))))))
(if (<= x1 -6.2)
t_0
(if (<= x1 1.35e+25)
(+
(* x1 (+ -1.0 (* x1 9.0)))
(* x2 (+ -6.0 (+ (* x1 (+ (* x1 12.0) -12.0)) (* x2 (* x1 8.0))))))
t_0))))
double code(double x1, double x2) {
double t_0 = x1 + (((x1 * x1) * 9.0) + (((x1 * x1) + 1.0) * ((x1 * x1) * (6.0 + ((((((x2 * 8.0) - ((-6.0 + (((2.0 * x2) * -6.0) + 18.0)) / x1)) + -18.0) / x1) - 3.0) / x1)))));
double tmp;
if (x1 <= -6.2) {
tmp = t_0;
} else if (x1 <= 1.35e+25) {
tmp = (x1 * (-1.0 + (x1 * 9.0))) + (x2 * (-6.0 + ((x1 * ((x1 * 12.0) + -12.0)) + (x2 * (x1 * 8.0)))));
} else {
tmp = t_0;
}
return tmp;
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
real(8) :: t_0
real(8) :: tmp
t_0 = x1 + (((x1 * x1) * 9.0d0) + (((x1 * x1) + 1.0d0) * ((x1 * x1) * (6.0d0 + ((((((x2 * 8.0d0) - (((-6.0d0) + (((2.0d0 * x2) * (-6.0d0)) + 18.0d0)) / x1)) + (-18.0d0)) / x1) - 3.0d0) / x1)))))
if (x1 <= (-6.2d0)) then
tmp = t_0
else if (x1 <= 1.35d+25) then
tmp = (x1 * ((-1.0d0) + (x1 * 9.0d0))) + (x2 * ((-6.0d0) + ((x1 * ((x1 * 12.0d0) + (-12.0d0))) + (x2 * (x1 * 8.0d0)))))
else
tmp = t_0
end if
code = tmp
end function
public static double code(double x1, double x2) {
double t_0 = x1 + (((x1 * x1) * 9.0) + (((x1 * x1) + 1.0) * ((x1 * x1) * (6.0 + ((((((x2 * 8.0) - ((-6.0 + (((2.0 * x2) * -6.0) + 18.0)) / x1)) + -18.0) / x1) - 3.0) / x1)))));
double tmp;
if (x1 <= -6.2) {
tmp = t_0;
} else if (x1 <= 1.35e+25) {
tmp = (x1 * (-1.0 + (x1 * 9.0))) + (x2 * (-6.0 + ((x1 * ((x1 * 12.0) + -12.0)) + (x2 * (x1 * 8.0)))));
} else {
tmp = t_0;
}
return tmp;
}
def code(x1, x2): t_0 = x1 + (((x1 * x1) * 9.0) + (((x1 * x1) + 1.0) * ((x1 * x1) * (6.0 + ((((((x2 * 8.0) - ((-6.0 + (((2.0 * x2) * -6.0) + 18.0)) / x1)) + -18.0) / x1) - 3.0) / x1))))) tmp = 0 if x1 <= -6.2: tmp = t_0 elif x1 <= 1.35e+25: tmp = (x1 * (-1.0 + (x1 * 9.0))) + (x2 * (-6.0 + ((x1 * ((x1 * 12.0) + -12.0)) + (x2 * (x1 * 8.0))))) else: tmp = t_0 return tmp
function code(x1, x2) t_0 = Float64(x1 + Float64(Float64(Float64(x1 * x1) * 9.0) + Float64(Float64(Float64(x1 * x1) + 1.0) * Float64(Float64(x1 * x1) * Float64(6.0 + Float64(Float64(Float64(Float64(Float64(Float64(x2 * 8.0) - Float64(Float64(-6.0 + Float64(Float64(Float64(2.0 * x2) * -6.0) + 18.0)) / x1)) + -18.0) / x1) - 3.0) / x1)))))) tmp = 0.0 if (x1 <= -6.2) tmp = t_0; elseif (x1 <= 1.35e+25) tmp = Float64(Float64(x1 * Float64(-1.0 + Float64(x1 * 9.0))) + Float64(x2 * Float64(-6.0 + Float64(Float64(x1 * Float64(Float64(x1 * 12.0) + -12.0)) + Float64(x2 * Float64(x1 * 8.0)))))); else tmp = t_0; end return tmp end
function tmp_2 = code(x1, x2) t_0 = x1 + (((x1 * x1) * 9.0) + (((x1 * x1) + 1.0) * ((x1 * x1) * (6.0 + ((((((x2 * 8.0) - ((-6.0 + (((2.0 * x2) * -6.0) + 18.0)) / x1)) + -18.0) / x1) - 3.0) / x1))))); tmp = 0.0; if (x1 <= -6.2) tmp = t_0; elseif (x1 <= 1.35e+25) tmp = (x1 * (-1.0 + (x1 * 9.0))) + (x2 * (-6.0 + ((x1 * ((x1 * 12.0) + -12.0)) + (x2 * (x1 * 8.0))))); else tmp = t_0; end tmp_2 = tmp; end
code[x1_, x2_] := Block[{t$95$0 = N[(x1 + N[(N[(N[(x1 * x1), $MachinePrecision] * 9.0), $MachinePrecision] + N[(N[(N[(x1 * x1), $MachinePrecision] + 1.0), $MachinePrecision] * N[(N[(x1 * x1), $MachinePrecision] * N[(6.0 + N[(N[(N[(N[(N[(N[(x2 * 8.0), $MachinePrecision] - N[(N[(-6.0 + N[(N[(N[(2.0 * x2), $MachinePrecision] * -6.0), $MachinePrecision] + 18.0), $MachinePrecision]), $MachinePrecision] / x1), $MachinePrecision]), $MachinePrecision] + -18.0), $MachinePrecision] / x1), $MachinePrecision] - 3.0), $MachinePrecision] / x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x1, -6.2], t$95$0, If[LessEqual[x1, 1.35e+25], N[(N[(x1 * N[(-1.0 + N[(x1 * 9.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(x2 * N[(-6.0 + N[(N[(x1 * N[(N[(x1 * 12.0), $MachinePrecision] + -12.0), $MachinePrecision]), $MachinePrecision] + N[(x2 * N[(x1 * 8.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$0]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x1 + \left(\left(x1 \cdot x1\right) \cdot 9 + \left(x1 \cdot x1 + 1\right) \cdot \left(\left(x1 \cdot x1\right) \cdot \left(6 + \frac{\frac{\left(x2 \cdot 8 - \frac{-6 + \left(\left(2 \cdot x2\right) \cdot -6 + 18\right)}{x1}\right) + -18}{x1} - 3}{x1}\right)\right)\right)\\
\mathbf{if}\;x1 \leq -6.2:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;x1 \leq 1.35 \cdot 10^{+25}:\\
\;\;\;\;x1 \cdot \left(-1 + x1 \cdot 9\right) + x2 \cdot \left(-6 + \left(x1 \cdot \left(x1 \cdot 12 + -12\right) + x2 \cdot \left(x1 \cdot 8\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
if x1 < -6.20000000000000018 or 1.35e25 < x1 Initial program 41.6%
Simplified49.0%
Taylor expanded in x1 around inf
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6450.9%
Simplified50.9%
Taylor expanded in x1 around -inf
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
mul-1-negN/A
unsub-negN/A
--lowering--.f64N/A
/-lowering-/.f64N/A
Simplified96.1%
if -6.20000000000000018 < x1 < 1.35e25Initial program 99.5%
Simplified98.0%
Taylor expanded in x1 around 0
+-lowering-+.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
associate--l+N/A
+-lowering-+.f64N/A
Simplified88.7%
Taylor expanded in x2 around 0
+-lowering-+.f64N/A
*-lowering-*.f64N/A
sub-negN/A
metadata-evalN/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
sub-negN/A
metadata-evalN/A
+-lowering-+.f64N/A
Simplified97.3%
Final simplification96.7%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (/ (+ (* x2 8.0) -18.0) x1)) (t_1 (+ (* x1 x1) 1.0)))
(if (<= x1 -6.2)
(+
x1
(+
(* (* x1 x1) (+ 9.0 (/ -3.0 x1)))
(* t_1 (+ x1 (* (* x1 x1) (+ 6.0 (/ (- t_0 4.0) x1)))))))
(if (<= x1 1.35e+25)
(+
(* x1 (+ -1.0 (* x1 9.0)))
(* x2 (+ -6.0 (+ (* x1 (+ (* x1 12.0) -12.0)) (* x2 (* x1 8.0))))))
(+
x1
(+
(* (* x1 x1) 9.0)
(* t_1 (* (* x1 x1) (+ 6.0 (/ (- t_0 3.0) x1))))))))))
double code(double x1, double x2) {
double t_0 = ((x2 * 8.0) + -18.0) / x1;
double t_1 = (x1 * x1) + 1.0;
double tmp;
if (x1 <= -6.2) {
tmp = x1 + (((x1 * x1) * (9.0 + (-3.0 / x1))) + (t_1 * (x1 + ((x1 * x1) * (6.0 + ((t_0 - 4.0) / x1))))));
} else if (x1 <= 1.35e+25) {
tmp = (x1 * (-1.0 + (x1 * 9.0))) + (x2 * (-6.0 + ((x1 * ((x1 * 12.0) + -12.0)) + (x2 * (x1 * 8.0)))));
} else {
tmp = x1 + (((x1 * x1) * 9.0) + (t_1 * ((x1 * x1) * (6.0 + ((t_0 - 3.0) / x1)))));
}
return tmp;
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
real(8) :: t_0
real(8) :: t_1
real(8) :: tmp
t_0 = ((x2 * 8.0d0) + (-18.0d0)) / x1
t_1 = (x1 * x1) + 1.0d0
if (x1 <= (-6.2d0)) then
tmp = x1 + (((x1 * x1) * (9.0d0 + ((-3.0d0) / x1))) + (t_1 * (x1 + ((x1 * x1) * (6.0d0 + ((t_0 - 4.0d0) / x1))))))
else if (x1 <= 1.35d+25) then
tmp = (x1 * ((-1.0d0) + (x1 * 9.0d0))) + (x2 * ((-6.0d0) + ((x1 * ((x1 * 12.0d0) + (-12.0d0))) + (x2 * (x1 * 8.0d0)))))
else
tmp = x1 + (((x1 * x1) * 9.0d0) + (t_1 * ((x1 * x1) * (6.0d0 + ((t_0 - 3.0d0) / x1)))))
end if
code = tmp
end function
public static double code(double x1, double x2) {
double t_0 = ((x2 * 8.0) + -18.0) / x1;
double t_1 = (x1 * x1) + 1.0;
double tmp;
if (x1 <= -6.2) {
tmp = x1 + (((x1 * x1) * (9.0 + (-3.0 / x1))) + (t_1 * (x1 + ((x1 * x1) * (6.0 + ((t_0 - 4.0) / x1))))));
} else if (x1 <= 1.35e+25) {
tmp = (x1 * (-1.0 + (x1 * 9.0))) + (x2 * (-6.0 + ((x1 * ((x1 * 12.0) + -12.0)) + (x2 * (x1 * 8.0)))));
} else {
tmp = x1 + (((x1 * x1) * 9.0) + (t_1 * ((x1 * x1) * (6.0 + ((t_0 - 3.0) / x1)))));
}
return tmp;
}
def code(x1, x2): t_0 = ((x2 * 8.0) + -18.0) / x1 t_1 = (x1 * x1) + 1.0 tmp = 0 if x1 <= -6.2: tmp = x1 + (((x1 * x1) * (9.0 + (-3.0 / x1))) + (t_1 * (x1 + ((x1 * x1) * (6.0 + ((t_0 - 4.0) / x1)))))) elif x1 <= 1.35e+25: tmp = (x1 * (-1.0 + (x1 * 9.0))) + (x2 * (-6.0 + ((x1 * ((x1 * 12.0) + -12.0)) + (x2 * (x1 * 8.0))))) else: tmp = x1 + (((x1 * x1) * 9.0) + (t_1 * ((x1 * x1) * (6.0 + ((t_0 - 3.0) / x1))))) return tmp
function code(x1, x2) t_0 = Float64(Float64(Float64(x2 * 8.0) + -18.0) / x1) t_1 = Float64(Float64(x1 * x1) + 1.0) tmp = 0.0 if (x1 <= -6.2) tmp = Float64(x1 + Float64(Float64(Float64(x1 * x1) * Float64(9.0 + Float64(-3.0 / x1))) + Float64(t_1 * Float64(x1 + Float64(Float64(x1 * x1) * Float64(6.0 + Float64(Float64(t_0 - 4.0) / x1))))))); elseif (x1 <= 1.35e+25) tmp = Float64(Float64(x1 * Float64(-1.0 + Float64(x1 * 9.0))) + Float64(x2 * Float64(-6.0 + Float64(Float64(x1 * Float64(Float64(x1 * 12.0) + -12.0)) + Float64(x2 * Float64(x1 * 8.0)))))); else tmp = Float64(x1 + Float64(Float64(Float64(x1 * x1) * 9.0) + Float64(t_1 * Float64(Float64(x1 * x1) * Float64(6.0 + Float64(Float64(t_0 - 3.0) / x1)))))); end return tmp end
function tmp_2 = code(x1, x2) t_0 = ((x2 * 8.0) + -18.0) / x1; t_1 = (x1 * x1) + 1.0; tmp = 0.0; if (x1 <= -6.2) tmp = x1 + (((x1 * x1) * (9.0 + (-3.0 / x1))) + (t_1 * (x1 + ((x1 * x1) * (6.0 + ((t_0 - 4.0) / x1)))))); elseif (x1 <= 1.35e+25) tmp = (x1 * (-1.0 + (x1 * 9.0))) + (x2 * (-6.0 + ((x1 * ((x1 * 12.0) + -12.0)) + (x2 * (x1 * 8.0))))); else tmp = x1 + (((x1 * x1) * 9.0) + (t_1 * ((x1 * x1) * (6.0 + ((t_0 - 3.0) / x1))))); end tmp_2 = tmp; end
code[x1_, x2_] := Block[{t$95$0 = N[(N[(N[(x2 * 8.0), $MachinePrecision] + -18.0), $MachinePrecision] / x1), $MachinePrecision]}, Block[{t$95$1 = N[(N[(x1 * x1), $MachinePrecision] + 1.0), $MachinePrecision]}, If[LessEqual[x1, -6.2], N[(x1 + N[(N[(N[(x1 * x1), $MachinePrecision] * N[(9.0 + N[(-3.0 / x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(t$95$1 * N[(x1 + N[(N[(x1 * x1), $MachinePrecision] * N[(6.0 + N[(N[(t$95$0 - 4.0), $MachinePrecision] / x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 1.35e+25], N[(N[(x1 * N[(-1.0 + N[(x1 * 9.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(x2 * N[(-6.0 + N[(N[(x1 * N[(N[(x1 * 12.0), $MachinePrecision] + -12.0), $MachinePrecision]), $MachinePrecision] + N[(x2 * N[(x1 * 8.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x1 + N[(N[(N[(x1 * x1), $MachinePrecision] * 9.0), $MachinePrecision] + N[(t$95$1 * N[(N[(x1 * x1), $MachinePrecision] * N[(6.0 + N[(N[(t$95$0 - 3.0), $MachinePrecision] / x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x2 \cdot 8 + -18}{x1}\\
t_1 := x1 \cdot x1 + 1\\
\mathbf{if}\;x1 \leq -6.2:\\
\;\;\;\;x1 + \left(\left(x1 \cdot x1\right) \cdot \left(9 + \frac{-3}{x1}\right) + t\_1 \cdot \left(x1 + \left(x1 \cdot x1\right) \cdot \left(6 + \frac{t\_0 - 4}{x1}\right)\right)\right)\\
\mathbf{elif}\;x1 \leq 1.35 \cdot 10^{+25}:\\
\;\;\;\;x1 \cdot \left(-1 + x1 \cdot 9\right) + x2 \cdot \left(-6 + \left(x1 \cdot \left(x1 \cdot 12 + -12\right) + x2 \cdot \left(x1 \cdot 8\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x1 + \left(\left(x1 \cdot x1\right) \cdot 9 + t\_1 \cdot \left(\left(x1 \cdot x1\right) \cdot \left(6 + \frac{t\_0 - 3}{x1}\right)\right)\right)\\
\end{array}
\end{array}
if x1 < -6.20000000000000018Initial program 35.5%
Simplified49.8%
Taylor expanded in x1 around -inf
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
mul-1-negN/A
unsub-negN/A
--lowering--.f64N/A
/-lowering-/.f64N/A
mul-1-negN/A
unsub-negN/A
--lowering--.f64N/A
/-lowering-/.f64N/A
sub-negN/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
metadata-eval47.5%
Simplified47.5%
Taylor expanded in x1 around inf
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
sub-negN/A
+-lowering-+.f64N/A
associate-*r/N/A
metadata-evalN/A
distribute-neg-fracN/A
metadata-evalN/A
/-lowering-/.f6494.6%
Simplified94.6%
if -6.20000000000000018 < x1 < 1.35e25Initial program 99.5%
Simplified98.0%
Taylor expanded in x1 around 0
+-lowering-+.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
associate--l+N/A
+-lowering-+.f64N/A
Simplified88.7%
Taylor expanded in x2 around 0
+-lowering-+.f64N/A
*-lowering-*.f64N/A
sub-negN/A
metadata-evalN/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
sub-negN/A
metadata-evalN/A
+-lowering-+.f64N/A
Simplified97.3%
if 1.35e25 < x1 Initial program 49.9%
Simplified48.0%
Taylor expanded in x1 around inf
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6449.9%
Simplified49.9%
Taylor expanded in x1 around -inf
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
mul-1-negN/A
unsub-negN/A
--lowering--.f64N/A
/-lowering-/.f64N/A
mul-1-negN/A
unsub-negN/A
--lowering--.f64N/A
/-lowering-/.f64N/A
sub-negN/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
metadata-eval98.0%
Simplified98.0%
Final simplification96.7%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0
(+
x1
(+
(* (* x1 x1) 9.0)
(*
(+ (* x1 x1) 1.0)
(*
(* x1 x1)
(+ 6.0 (/ (- (/ (+ (* x2 8.0) -18.0) x1) 3.0) x1))))))))
(if (<= x1 -6.2)
t_0
(if (<= x1 1.35e+25)
(+
(* x1 (+ -1.0 (* x1 9.0)))
(* x2 (+ -6.0 (+ (* x1 (+ (* x1 12.0) -12.0)) (* x2 (* x1 8.0))))))
t_0))))
double code(double x1, double x2) {
double t_0 = x1 + (((x1 * x1) * 9.0) + (((x1 * x1) + 1.0) * ((x1 * x1) * (6.0 + (((((x2 * 8.0) + -18.0) / x1) - 3.0) / x1)))));
double tmp;
if (x1 <= -6.2) {
tmp = t_0;
} else if (x1 <= 1.35e+25) {
tmp = (x1 * (-1.0 + (x1 * 9.0))) + (x2 * (-6.0 + ((x1 * ((x1 * 12.0) + -12.0)) + (x2 * (x1 * 8.0)))));
} else {
tmp = t_0;
}
return tmp;
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
real(8) :: t_0
real(8) :: tmp
t_0 = x1 + (((x1 * x1) * 9.0d0) + (((x1 * x1) + 1.0d0) * ((x1 * x1) * (6.0d0 + (((((x2 * 8.0d0) + (-18.0d0)) / x1) - 3.0d0) / x1)))))
if (x1 <= (-6.2d0)) then
tmp = t_0
else if (x1 <= 1.35d+25) then
tmp = (x1 * ((-1.0d0) + (x1 * 9.0d0))) + (x2 * ((-6.0d0) + ((x1 * ((x1 * 12.0d0) + (-12.0d0))) + (x2 * (x1 * 8.0d0)))))
else
tmp = t_0
end if
code = tmp
end function
public static double code(double x1, double x2) {
double t_0 = x1 + (((x1 * x1) * 9.0) + (((x1 * x1) + 1.0) * ((x1 * x1) * (6.0 + (((((x2 * 8.0) + -18.0) / x1) - 3.0) / x1)))));
double tmp;
if (x1 <= -6.2) {
tmp = t_0;
} else if (x1 <= 1.35e+25) {
tmp = (x1 * (-1.0 + (x1 * 9.0))) + (x2 * (-6.0 + ((x1 * ((x1 * 12.0) + -12.0)) + (x2 * (x1 * 8.0)))));
} else {
tmp = t_0;
}
return tmp;
}
def code(x1, x2): t_0 = x1 + (((x1 * x1) * 9.0) + (((x1 * x1) + 1.0) * ((x1 * x1) * (6.0 + (((((x2 * 8.0) + -18.0) / x1) - 3.0) / x1))))) tmp = 0 if x1 <= -6.2: tmp = t_0 elif x1 <= 1.35e+25: tmp = (x1 * (-1.0 + (x1 * 9.0))) + (x2 * (-6.0 + ((x1 * ((x1 * 12.0) + -12.0)) + (x2 * (x1 * 8.0))))) else: tmp = t_0 return tmp
function code(x1, x2) t_0 = Float64(x1 + Float64(Float64(Float64(x1 * x1) * 9.0) + Float64(Float64(Float64(x1 * x1) + 1.0) * Float64(Float64(x1 * x1) * Float64(6.0 + Float64(Float64(Float64(Float64(Float64(x2 * 8.0) + -18.0) / x1) - 3.0) / x1)))))) tmp = 0.0 if (x1 <= -6.2) tmp = t_0; elseif (x1 <= 1.35e+25) tmp = Float64(Float64(x1 * Float64(-1.0 + Float64(x1 * 9.0))) + Float64(x2 * Float64(-6.0 + Float64(Float64(x1 * Float64(Float64(x1 * 12.0) + -12.0)) + Float64(x2 * Float64(x1 * 8.0)))))); else tmp = t_0; end return tmp end
function tmp_2 = code(x1, x2) t_0 = x1 + (((x1 * x1) * 9.0) + (((x1 * x1) + 1.0) * ((x1 * x1) * (6.0 + (((((x2 * 8.0) + -18.0) / x1) - 3.0) / x1))))); tmp = 0.0; if (x1 <= -6.2) tmp = t_0; elseif (x1 <= 1.35e+25) tmp = (x1 * (-1.0 + (x1 * 9.0))) + (x2 * (-6.0 + ((x1 * ((x1 * 12.0) + -12.0)) + (x2 * (x1 * 8.0))))); else tmp = t_0; end tmp_2 = tmp; end
code[x1_, x2_] := Block[{t$95$0 = N[(x1 + N[(N[(N[(x1 * x1), $MachinePrecision] * 9.0), $MachinePrecision] + N[(N[(N[(x1 * x1), $MachinePrecision] + 1.0), $MachinePrecision] * N[(N[(x1 * x1), $MachinePrecision] * N[(6.0 + N[(N[(N[(N[(N[(x2 * 8.0), $MachinePrecision] + -18.0), $MachinePrecision] / x1), $MachinePrecision] - 3.0), $MachinePrecision] / x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x1, -6.2], t$95$0, If[LessEqual[x1, 1.35e+25], N[(N[(x1 * N[(-1.0 + N[(x1 * 9.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(x2 * N[(-6.0 + N[(N[(x1 * N[(N[(x1 * 12.0), $MachinePrecision] + -12.0), $MachinePrecision]), $MachinePrecision] + N[(x2 * N[(x1 * 8.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$0]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x1 + \left(\left(x1 \cdot x1\right) \cdot 9 + \left(x1 \cdot x1 + 1\right) \cdot \left(\left(x1 \cdot x1\right) \cdot \left(6 + \frac{\frac{x2 \cdot 8 + -18}{x1} - 3}{x1}\right)\right)\right)\\
\mathbf{if}\;x1 \leq -6.2:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;x1 \leq 1.35 \cdot 10^{+25}:\\
\;\;\;\;x1 \cdot \left(-1 + x1 \cdot 9\right) + x2 \cdot \left(-6 + \left(x1 \cdot \left(x1 \cdot 12 + -12\right) + x2 \cdot \left(x1 \cdot 8\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
if x1 < -6.20000000000000018 or 1.35e25 < x1 Initial program 41.6%
Simplified49.0%
Taylor expanded in x1 around inf
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6450.9%
Simplified50.9%
Taylor expanded in x1 around -inf
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
mul-1-negN/A
unsub-negN/A
--lowering--.f64N/A
/-lowering-/.f64N/A
mul-1-negN/A
unsub-negN/A
--lowering--.f64N/A
/-lowering-/.f64N/A
sub-negN/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
metadata-eval96.1%
Simplified96.1%
if -6.20000000000000018 < x1 < 1.35e25Initial program 99.5%
Simplified98.0%
Taylor expanded in x1 around 0
+-lowering-+.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
associate--l+N/A
+-lowering-+.f64N/A
Simplified88.7%
Taylor expanded in x2 around 0
+-lowering-+.f64N/A
*-lowering-*.f64N/A
sub-negN/A
metadata-evalN/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
sub-negN/A
metadata-evalN/A
+-lowering-+.f64N/A
Simplified97.3%
Final simplification96.7%
(FPCore (x1 x2)
:precision binary64
(if (<= x1 -1.12e-7)
(* x1 (+ -2.0 (* x1 (+ 15.0 (* x1 (+ -3.0 (* x1 6.0)))))))
(if (<= x1 -5.4e-169)
(+ (* x2 -6.0) (* x1 (* 8.0 (* x2 x2))))
(if (<= x1 4.5e-35)
(+ (* x2 -6.0) (* x1 (+ -1.0 (* x1 9.0))))
(if (<= x1 1.8e+58)
(+ x1 (/ (* 8.0 (* x1 (* x2 x2))) (+ (* x1 x1) 1.0)))
(* x1 (* x1 (* (* x1 x1) 6.0))))))))
double code(double x1, double x2) {
double tmp;
if (x1 <= -1.12e-7) {
tmp = x1 * (-2.0 + (x1 * (15.0 + (x1 * (-3.0 + (x1 * 6.0))))));
} else if (x1 <= -5.4e-169) {
tmp = (x2 * -6.0) + (x1 * (8.0 * (x2 * x2)));
} else if (x1 <= 4.5e-35) {
tmp = (x2 * -6.0) + (x1 * (-1.0 + (x1 * 9.0)));
} else if (x1 <= 1.8e+58) {
tmp = x1 + ((8.0 * (x1 * (x2 * x2))) / ((x1 * x1) + 1.0));
} else {
tmp = x1 * (x1 * ((x1 * x1) * 6.0));
}
return tmp;
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
real(8) :: tmp
if (x1 <= (-1.12d-7)) then
tmp = x1 * ((-2.0d0) + (x1 * (15.0d0 + (x1 * ((-3.0d0) + (x1 * 6.0d0))))))
else if (x1 <= (-5.4d-169)) then
tmp = (x2 * (-6.0d0)) + (x1 * (8.0d0 * (x2 * x2)))
else if (x1 <= 4.5d-35) then
tmp = (x2 * (-6.0d0)) + (x1 * ((-1.0d0) + (x1 * 9.0d0)))
else if (x1 <= 1.8d+58) then
tmp = x1 + ((8.0d0 * (x1 * (x2 * x2))) / ((x1 * x1) + 1.0d0))
else
tmp = x1 * (x1 * ((x1 * x1) * 6.0d0))
end if
code = tmp
end function
public static double code(double x1, double x2) {
double tmp;
if (x1 <= -1.12e-7) {
tmp = x1 * (-2.0 + (x1 * (15.0 + (x1 * (-3.0 + (x1 * 6.0))))));
} else if (x1 <= -5.4e-169) {
tmp = (x2 * -6.0) + (x1 * (8.0 * (x2 * x2)));
} else if (x1 <= 4.5e-35) {
tmp = (x2 * -6.0) + (x1 * (-1.0 + (x1 * 9.0)));
} else if (x1 <= 1.8e+58) {
tmp = x1 + ((8.0 * (x1 * (x2 * x2))) / ((x1 * x1) + 1.0));
} else {
tmp = x1 * (x1 * ((x1 * x1) * 6.0));
}
return tmp;
}
def code(x1, x2): tmp = 0 if x1 <= -1.12e-7: tmp = x1 * (-2.0 + (x1 * (15.0 + (x1 * (-3.0 + (x1 * 6.0)))))) elif x1 <= -5.4e-169: tmp = (x2 * -6.0) + (x1 * (8.0 * (x2 * x2))) elif x1 <= 4.5e-35: tmp = (x2 * -6.0) + (x1 * (-1.0 + (x1 * 9.0))) elif x1 <= 1.8e+58: tmp = x1 + ((8.0 * (x1 * (x2 * x2))) / ((x1 * x1) + 1.0)) else: tmp = x1 * (x1 * ((x1 * x1) * 6.0)) return tmp
function code(x1, x2) tmp = 0.0 if (x1 <= -1.12e-7) tmp = Float64(x1 * Float64(-2.0 + Float64(x1 * Float64(15.0 + Float64(x1 * Float64(-3.0 + Float64(x1 * 6.0))))))); elseif (x1 <= -5.4e-169) tmp = Float64(Float64(x2 * -6.0) + Float64(x1 * Float64(8.0 * Float64(x2 * x2)))); elseif (x1 <= 4.5e-35) tmp = Float64(Float64(x2 * -6.0) + Float64(x1 * Float64(-1.0 + Float64(x1 * 9.0)))); elseif (x1 <= 1.8e+58) tmp = Float64(x1 + Float64(Float64(8.0 * Float64(x1 * Float64(x2 * x2))) / Float64(Float64(x1 * x1) + 1.0))); else tmp = Float64(x1 * Float64(x1 * Float64(Float64(x1 * x1) * 6.0))); end return tmp end
function tmp_2 = code(x1, x2) tmp = 0.0; if (x1 <= -1.12e-7) tmp = x1 * (-2.0 + (x1 * (15.0 + (x1 * (-3.0 + (x1 * 6.0)))))); elseif (x1 <= -5.4e-169) tmp = (x2 * -6.0) + (x1 * (8.0 * (x2 * x2))); elseif (x1 <= 4.5e-35) tmp = (x2 * -6.0) + (x1 * (-1.0 + (x1 * 9.0))); elseif (x1 <= 1.8e+58) tmp = x1 + ((8.0 * (x1 * (x2 * x2))) / ((x1 * x1) + 1.0)); else tmp = x1 * (x1 * ((x1 * x1) * 6.0)); end tmp_2 = tmp; end
code[x1_, x2_] := If[LessEqual[x1, -1.12e-7], N[(x1 * N[(-2.0 + N[(x1 * N[(15.0 + N[(x1 * N[(-3.0 + N[(x1 * 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, -5.4e-169], N[(N[(x2 * -6.0), $MachinePrecision] + N[(x1 * N[(8.0 * N[(x2 * x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 4.5e-35], N[(N[(x2 * -6.0), $MachinePrecision] + N[(x1 * N[(-1.0 + N[(x1 * 9.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 1.8e+58], N[(x1 + N[(N[(8.0 * N[(x1 * N[(x2 * x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(N[(x1 * x1), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x1 * N[(x1 * N[(N[(x1 * x1), $MachinePrecision] * 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x1 \leq -1.12 \cdot 10^{-7}:\\
\;\;\;\;x1 \cdot \left(-2 + x1 \cdot \left(15 + x1 \cdot \left(-3 + x1 \cdot 6\right)\right)\right)\\
\mathbf{elif}\;x1 \leq -5.4 \cdot 10^{-169}:\\
\;\;\;\;x2 \cdot -6 + x1 \cdot \left(8 \cdot \left(x2 \cdot x2\right)\right)\\
\mathbf{elif}\;x1 \leq 4.5 \cdot 10^{-35}:\\
\;\;\;\;x2 \cdot -6 + x1 \cdot \left(-1 + x1 \cdot 9\right)\\
\mathbf{elif}\;x1 \leq 1.8 \cdot 10^{+58}:\\
\;\;\;\;x1 + \frac{8 \cdot \left(x1 \cdot \left(x2 \cdot x2\right)\right)}{x1 \cdot x1 + 1}\\
\mathbf{else}:\\
\;\;\;\;x1 \cdot \left(x1 \cdot \left(\left(x1 \cdot x1\right) \cdot 6\right)\right)\\
\end{array}
\end{array}
if x1 < -1.12e-7Initial program 38.0%
Simplified51.8%
Taylor expanded in x1 around inf
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6449.6%
Simplified49.6%
Taylor expanded in x1 around inf
*-commutativeN/A
*-lowering-*.f64N/A
sub-negN/A
+-lowering-+.f64N/A
associate-*r/N/A
metadata-evalN/A
distribute-neg-fracN/A
metadata-evalN/A
/-lowering-/.f64N/A
unpow2N/A
*-lowering-*.f6487.3%
Simplified87.3%
Taylor expanded in x1 around 0
*-lowering-*.f64N/A
sub-negN/A
metadata-evalN/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
sub-negN/A
metadata-evalN/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f6487.4%
Simplified87.4%
if -1.12e-7 < x1 < -5.4000000000000003e-169Initial program 99.4%
Simplified99.4%
Taylor expanded in x1 around 0
+-lowering-+.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
associate--l+N/A
+-lowering-+.f64N/A
Simplified91.5%
Taylor expanded in x2 around inf
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6470.5%
Simplified70.5%
if -5.4000000000000003e-169 < x1 < 4.5000000000000001e-35Initial program 99.5%
Simplified99.5%
Taylor expanded in x1 around 0
+-lowering-+.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
associate--l+N/A
+-lowering-+.f64N/A
Simplified90.8%
Taylor expanded in x2 around 0
*-lowering-*.f64N/A
sub-negN/A
metadata-evalN/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f6489.2%
Simplified89.2%
if 4.5000000000000001e-35 < x1 < 1.79999999999999998e58Initial program 99.7%
Simplified84.6%
Taylor expanded in x2 around inf
associate-*r/N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
unpow2N/A
*-lowering-*.f6461.8%
Simplified61.8%
if 1.79999999999999998e58 < x1 Initial program 42.2%
Simplified42.2%
Taylor expanded in x1 around inf
*-lowering-*.f64N/A
pow-lowering-pow.f6497.8%
Simplified97.8%
metadata-evalN/A
pow-prod-upN/A
pow2N/A
pow2N/A
*-commutativeN/A
*-lowering-*.f64N/A
associate-*l*N/A
cube-multN/A
*-lowering-*.f64N/A
cube-multN/A
*-lowering-*.f64N/A
*-lowering-*.f6497.7%
Applied egg-rr97.7%
associate-*l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f6497.8%
Applied egg-rr97.8%
Final simplification86.4%
(FPCore (x1 x2)
:precision binary64
(if (<= x1 -6.2)
(* x1 (+ -2.0 (* x1 (+ 15.0 (* x1 (+ -3.0 (* x1 6.0)))))))
(if (<= x1 1.7e+58)
(+
(* x1 (+ -1.0 (* x1 9.0)))
(* x2 (+ -6.0 (+ (* x1 (+ (* x1 12.0) -12.0)) (* x2 (* x1 8.0))))))
(* x1 (* x1 (* (* x1 x1) 6.0))))))
double code(double x1, double x2) {
double tmp;
if (x1 <= -6.2) {
tmp = x1 * (-2.0 + (x1 * (15.0 + (x1 * (-3.0 + (x1 * 6.0))))));
} else if (x1 <= 1.7e+58) {
tmp = (x1 * (-1.0 + (x1 * 9.0))) + (x2 * (-6.0 + ((x1 * ((x1 * 12.0) + -12.0)) + (x2 * (x1 * 8.0)))));
} else {
tmp = x1 * (x1 * ((x1 * x1) * 6.0));
}
return tmp;
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
real(8) :: tmp
if (x1 <= (-6.2d0)) then
tmp = x1 * ((-2.0d0) + (x1 * (15.0d0 + (x1 * ((-3.0d0) + (x1 * 6.0d0))))))
else if (x1 <= 1.7d+58) then
tmp = (x1 * ((-1.0d0) + (x1 * 9.0d0))) + (x2 * ((-6.0d0) + ((x1 * ((x1 * 12.0d0) + (-12.0d0))) + (x2 * (x1 * 8.0d0)))))
else
tmp = x1 * (x1 * ((x1 * x1) * 6.0d0))
end if
code = tmp
end function
public static double code(double x1, double x2) {
double tmp;
if (x1 <= -6.2) {
tmp = x1 * (-2.0 + (x1 * (15.0 + (x1 * (-3.0 + (x1 * 6.0))))));
} else if (x1 <= 1.7e+58) {
tmp = (x1 * (-1.0 + (x1 * 9.0))) + (x2 * (-6.0 + ((x1 * ((x1 * 12.0) + -12.0)) + (x2 * (x1 * 8.0)))));
} else {
tmp = x1 * (x1 * ((x1 * x1) * 6.0));
}
return tmp;
}
def code(x1, x2): tmp = 0 if x1 <= -6.2: tmp = x1 * (-2.0 + (x1 * (15.0 + (x1 * (-3.0 + (x1 * 6.0)))))) elif x1 <= 1.7e+58: tmp = (x1 * (-1.0 + (x1 * 9.0))) + (x2 * (-6.0 + ((x1 * ((x1 * 12.0) + -12.0)) + (x2 * (x1 * 8.0))))) else: tmp = x1 * (x1 * ((x1 * x1) * 6.0)) return tmp
function code(x1, x2) tmp = 0.0 if (x1 <= -6.2) tmp = Float64(x1 * Float64(-2.0 + Float64(x1 * Float64(15.0 + Float64(x1 * Float64(-3.0 + Float64(x1 * 6.0))))))); elseif (x1 <= 1.7e+58) tmp = Float64(Float64(x1 * Float64(-1.0 + Float64(x1 * 9.0))) + Float64(x2 * Float64(-6.0 + Float64(Float64(x1 * Float64(Float64(x1 * 12.0) + -12.0)) + Float64(x2 * Float64(x1 * 8.0)))))); else tmp = Float64(x1 * Float64(x1 * Float64(Float64(x1 * x1) * 6.0))); end return tmp end
function tmp_2 = code(x1, x2) tmp = 0.0; if (x1 <= -6.2) tmp = x1 * (-2.0 + (x1 * (15.0 + (x1 * (-3.0 + (x1 * 6.0)))))); elseif (x1 <= 1.7e+58) tmp = (x1 * (-1.0 + (x1 * 9.0))) + (x2 * (-6.0 + ((x1 * ((x1 * 12.0) + -12.0)) + (x2 * (x1 * 8.0))))); else tmp = x1 * (x1 * ((x1 * x1) * 6.0)); end tmp_2 = tmp; end
code[x1_, x2_] := If[LessEqual[x1, -6.2], N[(x1 * N[(-2.0 + N[(x1 * N[(15.0 + N[(x1 * N[(-3.0 + N[(x1 * 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 1.7e+58], N[(N[(x1 * N[(-1.0 + N[(x1 * 9.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(x2 * N[(-6.0 + N[(N[(x1 * N[(N[(x1 * 12.0), $MachinePrecision] + -12.0), $MachinePrecision]), $MachinePrecision] + N[(x2 * N[(x1 * 8.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x1 * N[(x1 * N[(N[(x1 * x1), $MachinePrecision] * 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x1 \leq -6.2:\\
\;\;\;\;x1 \cdot \left(-2 + x1 \cdot \left(15 + x1 \cdot \left(-3 + x1 \cdot 6\right)\right)\right)\\
\mathbf{elif}\;x1 \leq 1.7 \cdot 10^{+58}:\\
\;\;\;\;x1 \cdot \left(-1 + x1 \cdot 9\right) + x2 \cdot \left(-6 + \left(x1 \cdot \left(x1 \cdot 12 + -12\right) + x2 \cdot \left(x1 \cdot 8\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x1 \cdot \left(x1 \cdot \left(\left(x1 \cdot x1\right) \cdot 6\right)\right)\\
\end{array}
\end{array}
if x1 < -6.20000000000000018Initial program 35.5%
Simplified49.8%
Taylor expanded in x1 around inf
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6451.7%
Simplified51.7%
Taylor expanded in x1 around inf
*-commutativeN/A
*-lowering-*.f64N/A
sub-negN/A
+-lowering-+.f64N/A
associate-*r/N/A
metadata-evalN/A
distribute-neg-fracN/A
metadata-evalN/A
/-lowering-/.f64N/A
unpow2N/A
*-lowering-*.f6490.2%
Simplified90.2%
Taylor expanded in x1 around 0
*-lowering-*.f64N/A
sub-negN/A
metadata-evalN/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
sub-negN/A
metadata-evalN/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f6490.3%
Simplified90.3%
if -6.20000000000000018 < x1 < 1.7e58Initial program 99.5%
Simplified97.3%
Taylor expanded in x1 around 0
+-lowering-+.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
associate--l+N/A
+-lowering-+.f64N/A
Simplified86.6%
Taylor expanded in x2 around 0
+-lowering-+.f64N/A
*-lowering-*.f64N/A
sub-negN/A
metadata-evalN/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
sub-negN/A
metadata-evalN/A
+-lowering-+.f64N/A
Simplified94.8%
if 1.7e58 < x1 Initial program 42.2%
Simplified42.2%
Taylor expanded in x1 around inf
*-lowering-*.f64N/A
pow-lowering-pow.f6497.8%
Simplified97.8%
metadata-evalN/A
pow-prod-upN/A
pow2N/A
pow2N/A
*-commutativeN/A
*-lowering-*.f64N/A
associate-*l*N/A
cube-multN/A
*-lowering-*.f64N/A
cube-multN/A
*-lowering-*.f64N/A
*-lowering-*.f6497.7%
Applied egg-rr97.7%
associate-*l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f6497.8%
Applied egg-rr97.8%
Final simplification94.1%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (+ (* x2 -6.0) (* x1 (* 8.0 (* x2 x2))))))
(if (<= x1 -1.12e-7)
(* x1 (+ -2.0 (* x1 (+ 15.0 (* x1 (+ -3.0 (* x1 6.0)))))))
(if (<= x1 -2.2e-164)
t_0
(if (<= x1 1.1e-36)
(+ (* x2 -6.0) (* x1 (+ -1.0 (* x1 9.0))))
(if (<= x1 1.7e+58) t_0 (* x1 (* x1 (* (* x1 x1) 6.0)))))))))
double code(double x1, double x2) {
double t_0 = (x2 * -6.0) + (x1 * (8.0 * (x2 * x2)));
double tmp;
if (x1 <= -1.12e-7) {
tmp = x1 * (-2.0 + (x1 * (15.0 + (x1 * (-3.0 + (x1 * 6.0))))));
} else if (x1 <= -2.2e-164) {
tmp = t_0;
} else if (x1 <= 1.1e-36) {
tmp = (x2 * -6.0) + (x1 * (-1.0 + (x1 * 9.0)));
} else if (x1 <= 1.7e+58) {
tmp = t_0;
} else {
tmp = x1 * (x1 * ((x1 * x1) * 6.0));
}
return tmp;
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
real(8) :: t_0
real(8) :: tmp
t_0 = (x2 * (-6.0d0)) + (x1 * (8.0d0 * (x2 * x2)))
if (x1 <= (-1.12d-7)) then
tmp = x1 * ((-2.0d0) + (x1 * (15.0d0 + (x1 * ((-3.0d0) + (x1 * 6.0d0))))))
else if (x1 <= (-2.2d-164)) then
tmp = t_0
else if (x1 <= 1.1d-36) then
tmp = (x2 * (-6.0d0)) + (x1 * ((-1.0d0) + (x1 * 9.0d0)))
else if (x1 <= 1.7d+58) then
tmp = t_0
else
tmp = x1 * (x1 * ((x1 * x1) * 6.0d0))
end if
code = tmp
end function
public static double code(double x1, double x2) {
double t_0 = (x2 * -6.0) + (x1 * (8.0 * (x2 * x2)));
double tmp;
if (x1 <= -1.12e-7) {
tmp = x1 * (-2.0 + (x1 * (15.0 + (x1 * (-3.0 + (x1 * 6.0))))));
} else if (x1 <= -2.2e-164) {
tmp = t_0;
} else if (x1 <= 1.1e-36) {
tmp = (x2 * -6.0) + (x1 * (-1.0 + (x1 * 9.0)));
} else if (x1 <= 1.7e+58) {
tmp = t_0;
} else {
tmp = x1 * (x1 * ((x1 * x1) * 6.0));
}
return tmp;
}
def code(x1, x2): t_0 = (x2 * -6.0) + (x1 * (8.0 * (x2 * x2))) tmp = 0 if x1 <= -1.12e-7: tmp = x1 * (-2.0 + (x1 * (15.0 + (x1 * (-3.0 + (x1 * 6.0)))))) elif x1 <= -2.2e-164: tmp = t_0 elif x1 <= 1.1e-36: tmp = (x2 * -6.0) + (x1 * (-1.0 + (x1 * 9.0))) elif x1 <= 1.7e+58: tmp = t_0 else: tmp = x1 * (x1 * ((x1 * x1) * 6.0)) return tmp
function code(x1, x2) t_0 = Float64(Float64(x2 * -6.0) + Float64(x1 * Float64(8.0 * Float64(x2 * x2)))) tmp = 0.0 if (x1 <= -1.12e-7) tmp = Float64(x1 * Float64(-2.0 + Float64(x1 * Float64(15.0 + Float64(x1 * Float64(-3.0 + Float64(x1 * 6.0))))))); elseif (x1 <= -2.2e-164) tmp = t_0; elseif (x1 <= 1.1e-36) tmp = Float64(Float64(x2 * -6.0) + Float64(x1 * Float64(-1.0 + Float64(x1 * 9.0)))); elseif (x1 <= 1.7e+58) tmp = t_0; else tmp = Float64(x1 * Float64(x1 * Float64(Float64(x1 * x1) * 6.0))); end return tmp end
function tmp_2 = code(x1, x2) t_0 = (x2 * -6.0) + (x1 * (8.0 * (x2 * x2))); tmp = 0.0; if (x1 <= -1.12e-7) tmp = x1 * (-2.0 + (x1 * (15.0 + (x1 * (-3.0 + (x1 * 6.0)))))); elseif (x1 <= -2.2e-164) tmp = t_0; elseif (x1 <= 1.1e-36) tmp = (x2 * -6.0) + (x1 * (-1.0 + (x1 * 9.0))); elseif (x1 <= 1.7e+58) tmp = t_0; else tmp = x1 * (x1 * ((x1 * x1) * 6.0)); end tmp_2 = tmp; end
code[x1_, x2_] := Block[{t$95$0 = N[(N[(x2 * -6.0), $MachinePrecision] + N[(x1 * N[(8.0 * N[(x2 * x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x1, -1.12e-7], N[(x1 * N[(-2.0 + N[(x1 * N[(15.0 + N[(x1 * N[(-3.0 + N[(x1 * 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, -2.2e-164], t$95$0, If[LessEqual[x1, 1.1e-36], N[(N[(x2 * -6.0), $MachinePrecision] + N[(x1 * N[(-1.0 + N[(x1 * 9.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 1.7e+58], t$95$0, N[(x1 * N[(x1 * N[(N[(x1 * x1), $MachinePrecision] * 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x2 \cdot -6 + x1 \cdot \left(8 \cdot \left(x2 \cdot x2\right)\right)\\
\mathbf{if}\;x1 \leq -1.12 \cdot 10^{-7}:\\
\;\;\;\;x1 \cdot \left(-2 + x1 \cdot \left(15 + x1 \cdot \left(-3 + x1 \cdot 6\right)\right)\right)\\
\mathbf{elif}\;x1 \leq -2.2 \cdot 10^{-164}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;x1 \leq 1.1 \cdot 10^{-36}:\\
\;\;\;\;x2 \cdot -6 + x1 \cdot \left(-1 + x1 \cdot 9\right)\\
\mathbf{elif}\;x1 \leq 1.7 \cdot 10^{+58}:\\
\;\;\;\;t\_0\\
\mathbf{else}:\\
\;\;\;\;x1 \cdot \left(x1 \cdot \left(\left(x1 \cdot x1\right) \cdot 6\right)\right)\\
\end{array}
\end{array}
if x1 < -1.12e-7Initial program 38.0%
Simplified51.8%
Taylor expanded in x1 around inf
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6449.6%
Simplified49.6%
Taylor expanded in x1 around inf
*-commutativeN/A
*-lowering-*.f64N/A
sub-negN/A
+-lowering-+.f64N/A
associate-*r/N/A
metadata-evalN/A
distribute-neg-fracN/A
metadata-evalN/A
/-lowering-/.f64N/A
unpow2N/A
*-lowering-*.f6487.3%
Simplified87.3%
Taylor expanded in x1 around 0
*-lowering-*.f64N/A
sub-negN/A
metadata-evalN/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
sub-negN/A
metadata-evalN/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f6487.4%
Simplified87.4%
if -1.12e-7 < x1 < -2.19999999999999988e-164 or 1.1e-36 < x1 < 1.7e58Initial program 99.6%
Simplified92.4%
Taylor expanded in x1 around 0
+-lowering-+.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
associate--l+N/A
+-lowering-+.f64N/A
Simplified79.8%
Taylor expanded in x2 around inf
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6466.3%
Simplified66.3%
if -2.19999999999999988e-164 < x1 < 1.1e-36Initial program 99.5%
Simplified99.5%
Taylor expanded in x1 around 0
+-lowering-+.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
associate--l+N/A
+-lowering-+.f64N/A
Simplified90.8%
Taylor expanded in x2 around 0
*-lowering-*.f64N/A
sub-negN/A
metadata-evalN/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f6489.2%
Simplified89.2%
if 1.7e58 < x1 Initial program 42.2%
Simplified42.2%
Taylor expanded in x1 around inf
*-lowering-*.f64N/A
pow-lowering-pow.f6497.8%
Simplified97.8%
metadata-evalN/A
pow-prod-upN/A
pow2N/A
pow2N/A
*-commutativeN/A
*-lowering-*.f64N/A
associate-*l*N/A
cube-multN/A
*-lowering-*.f64N/A
cube-multN/A
*-lowering-*.f64N/A
*-lowering-*.f6497.7%
Applied egg-rr97.7%
associate-*l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f6497.8%
Applied egg-rr97.8%
Final simplification86.4%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (+ (* x2 -6.0) (* x1 (* 8.0 (* x2 x2))))))
(if (<= x1 -1.12e-7)
(* (* x1 (* x1 x1)) (* x1 6.0))
(if (<= x1 -2.2e-164)
t_0
(if (<= x1 1.9e-38)
(+ (* x2 -6.0) (* x1 (+ -1.0 (* x1 9.0))))
(if (<= x1 1.7e+58) t_0 (* x1 (* x1 (* (* x1 x1) 6.0)))))))))
double code(double x1, double x2) {
double t_0 = (x2 * -6.0) + (x1 * (8.0 * (x2 * x2)));
double tmp;
if (x1 <= -1.12e-7) {
tmp = (x1 * (x1 * x1)) * (x1 * 6.0);
} else if (x1 <= -2.2e-164) {
tmp = t_0;
} else if (x1 <= 1.9e-38) {
tmp = (x2 * -6.0) + (x1 * (-1.0 + (x1 * 9.0)));
} else if (x1 <= 1.7e+58) {
tmp = t_0;
} else {
tmp = x1 * (x1 * ((x1 * x1) * 6.0));
}
return tmp;
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
real(8) :: t_0
real(8) :: tmp
t_0 = (x2 * (-6.0d0)) + (x1 * (8.0d0 * (x2 * x2)))
if (x1 <= (-1.12d-7)) then
tmp = (x1 * (x1 * x1)) * (x1 * 6.0d0)
else if (x1 <= (-2.2d-164)) then
tmp = t_0
else if (x1 <= 1.9d-38) then
tmp = (x2 * (-6.0d0)) + (x1 * ((-1.0d0) + (x1 * 9.0d0)))
else if (x1 <= 1.7d+58) then
tmp = t_0
else
tmp = x1 * (x1 * ((x1 * x1) * 6.0d0))
end if
code = tmp
end function
public static double code(double x1, double x2) {
double t_0 = (x2 * -6.0) + (x1 * (8.0 * (x2 * x2)));
double tmp;
if (x1 <= -1.12e-7) {
tmp = (x1 * (x1 * x1)) * (x1 * 6.0);
} else if (x1 <= -2.2e-164) {
tmp = t_0;
} else if (x1 <= 1.9e-38) {
tmp = (x2 * -6.0) + (x1 * (-1.0 + (x1 * 9.0)));
} else if (x1 <= 1.7e+58) {
tmp = t_0;
} else {
tmp = x1 * (x1 * ((x1 * x1) * 6.0));
}
return tmp;
}
def code(x1, x2): t_0 = (x2 * -6.0) + (x1 * (8.0 * (x2 * x2))) tmp = 0 if x1 <= -1.12e-7: tmp = (x1 * (x1 * x1)) * (x1 * 6.0) elif x1 <= -2.2e-164: tmp = t_0 elif x1 <= 1.9e-38: tmp = (x2 * -6.0) + (x1 * (-1.0 + (x1 * 9.0))) elif x1 <= 1.7e+58: tmp = t_0 else: tmp = x1 * (x1 * ((x1 * x1) * 6.0)) return tmp
function code(x1, x2) t_0 = Float64(Float64(x2 * -6.0) + Float64(x1 * Float64(8.0 * Float64(x2 * x2)))) tmp = 0.0 if (x1 <= -1.12e-7) tmp = Float64(Float64(x1 * Float64(x1 * x1)) * Float64(x1 * 6.0)); elseif (x1 <= -2.2e-164) tmp = t_0; elseif (x1 <= 1.9e-38) tmp = Float64(Float64(x2 * -6.0) + Float64(x1 * Float64(-1.0 + Float64(x1 * 9.0)))); elseif (x1 <= 1.7e+58) tmp = t_0; else tmp = Float64(x1 * Float64(x1 * Float64(Float64(x1 * x1) * 6.0))); end return tmp end
function tmp_2 = code(x1, x2) t_0 = (x2 * -6.0) + (x1 * (8.0 * (x2 * x2))); tmp = 0.0; if (x1 <= -1.12e-7) tmp = (x1 * (x1 * x1)) * (x1 * 6.0); elseif (x1 <= -2.2e-164) tmp = t_0; elseif (x1 <= 1.9e-38) tmp = (x2 * -6.0) + (x1 * (-1.0 + (x1 * 9.0))); elseif (x1 <= 1.7e+58) tmp = t_0; else tmp = x1 * (x1 * ((x1 * x1) * 6.0)); end tmp_2 = tmp; end
code[x1_, x2_] := Block[{t$95$0 = N[(N[(x2 * -6.0), $MachinePrecision] + N[(x1 * N[(8.0 * N[(x2 * x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x1, -1.12e-7], N[(N[(x1 * N[(x1 * x1), $MachinePrecision]), $MachinePrecision] * N[(x1 * 6.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, -2.2e-164], t$95$0, If[LessEqual[x1, 1.9e-38], N[(N[(x2 * -6.0), $MachinePrecision] + N[(x1 * N[(-1.0 + N[(x1 * 9.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 1.7e+58], t$95$0, N[(x1 * N[(x1 * N[(N[(x1 * x1), $MachinePrecision] * 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x2 \cdot -6 + x1 \cdot \left(8 \cdot \left(x2 \cdot x2\right)\right)\\
\mathbf{if}\;x1 \leq -1.12 \cdot 10^{-7}:\\
\;\;\;\;\left(x1 \cdot \left(x1 \cdot x1\right)\right) \cdot \left(x1 \cdot 6\right)\\
\mathbf{elif}\;x1 \leq -2.2 \cdot 10^{-164}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;x1 \leq 1.9 \cdot 10^{-38}:\\
\;\;\;\;x2 \cdot -6 + x1 \cdot \left(-1 + x1 \cdot 9\right)\\
\mathbf{elif}\;x1 \leq 1.7 \cdot 10^{+58}:\\
\;\;\;\;t\_0\\
\mathbf{else}:\\
\;\;\;\;x1 \cdot \left(x1 \cdot \left(\left(x1 \cdot x1\right) \cdot 6\right)\right)\\
\end{array}
\end{array}
if x1 < -1.12e-7Initial program 38.0%
Simplified51.8%
Taylor expanded in x1 around inf
*-lowering-*.f64N/A
pow-lowering-pow.f6487.1%
Simplified87.1%
metadata-evalN/A
pow-prod-upN/A
pow2N/A
pow2N/A
*-commutativeN/A
*-lowering-*.f64N/A
associate-*l*N/A
cube-multN/A
*-lowering-*.f64N/A
cube-multN/A
*-lowering-*.f64N/A
*-lowering-*.f6487.0%
Applied egg-rr87.0%
*-commutativeN/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f6487.1%
Applied egg-rr87.1%
if -1.12e-7 < x1 < -2.19999999999999988e-164 or 1.9e-38 < x1 < 1.7e58Initial program 99.6%
Simplified92.4%
Taylor expanded in x1 around 0
+-lowering-+.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
associate--l+N/A
+-lowering-+.f64N/A
Simplified79.8%
Taylor expanded in x2 around inf
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6466.3%
Simplified66.3%
if -2.19999999999999988e-164 < x1 < 1.9e-38Initial program 99.5%
Simplified99.5%
Taylor expanded in x1 around 0
+-lowering-+.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
associate--l+N/A
+-lowering-+.f64N/A
Simplified90.8%
Taylor expanded in x2 around 0
*-lowering-*.f64N/A
sub-negN/A
metadata-evalN/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f6489.2%
Simplified89.2%
if 1.7e58 < x1 Initial program 42.2%
Simplified42.2%
Taylor expanded in x1 around inf
*-lowering-*.f64N/A
pow-lowering-pow.f6497.8%
Simplified97.8%
metadata-evalN/A
pow-prod-upN/A
pow2N/A
pow2N/A
*-commutativeN/A
*-lowering-*.f64N/A
associate-*l*N/A
cube-multN/A
*-lowering-*.f64N/A
cube-multN/A
*-lowering-*.f64N/A
*-lowering-*.f6497.7%
Applied egg-rr97.7%
associate-*l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f6497.8%
Applied egg-rr97.8%
Final simplification86.3%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (+ (* x2 -6.0) (* x1 (* 8.0 (* x2 x2))))))
(if (<= x1 -1.12e-7)
(* (* x1 (* x1 x1)) (* x1 6.0))
(if (<= x1 -2.2e-164)
t_0
(if (<= x1 2.15e-41)
(- (* x2 -6.0) x1)
(if (<= x1 1.7e+58) t_0 (* x1 (* x1 (* (* x1 x1) 6.0)))))))))
double code(double x1, double x2) {
double t_0 = (x2 * -6.0) + (x1 * (8.0 * (x2 * x2)));
double tmp;
if (x1 <= -1.12e-7) {
tmp = (x1 * (x1 * x1)) * (x1 * 6.0);
} else if (x1 <= -2.2e-164) {
tmp = t_0;
} else if (x1 <= 2.15e-41) {
tmp = (x2 * -6.0) - x1;
} else if (x1 <= 1.7e+58) {
tmp = t_0;
} else {
tmp = x1 * (x1 * ((x1 * x1) * 6.0));
}
return tmp;
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
real(8) :: t_0
real(8) :: tmp
t_0 = (x2 * (-6.0d0)) + (x1 * (8.0d0 * (x2 * x2)))
if (x1 <= (-1.12d-7)) then
tmp = (x1 * (x1 * x1)) * (x1 * 6.0d0)
else if (x1 <= (-2.2d-164)) then
tmp = t_0
else if (x1 <= 2.15d-41) then
tmp = (x2 * (-6.0d0)) - x1
else if (x1 <= 1.7d+58) then
tmp = t_0
else
tmp = x1 * (x1 * ((x1 * x1) * 6.0d0))
end if
code = tmp
end function
public static double code(double x1, double x2) {
double t_0 = (x2 * -6.0) + (x1 * (8.0 * (x2 * x2)));
double tmp;
if (x1 <= -1.12e-7) {
tmp = (x1 * (x1 * x1)) * (x1 * 6.0);
} else if (x1 <= -2.2e-164) {
tmp = t_0;
} else if (x1 <= 2.15e-41) {
tmp = (x2 * -6.0) - x1;
} else if (x1 <= 1.7e+58) {
tmp = t_0;
} else {
tmp = x1 * (x1 * ((x1 * x1) * 6.0));
}
return tmp;
}
def code(x1, x2): t_0 = (x2 * -6.0) + (x1 * (8.0 * (x2 * x2))) tmp = 0 if x1 <= -1.12e-7: tmp = (x1 * (x1 * x1)) * (x1 * 6.0) elif x1 <= -2.2e-164: tmp = t_0 elif x1 <= 2.15e-41: tmp = (x2 * -6.0) - x1 elif x1 <= 1.7e+58: tmp = t_0 else: tmp = x1 * (x1 * ((x1 * x1) * 6.0)) return tmp
function code(x1, x2) t_0 = Float64(Float64(x2 * -6.0) + Float64(x1 * Float64(8.0 * Float64(x2 * x2)))) tmp = 0.0 if (x1 <= -1.12e-7) tmp = Float64(Float64(x1 * Float64(x1 * x1)) * Float64(x1 * 6.0)); elseif (x1 <= -2.2e-164) tmp = t_0; elseif (x1 <= 2.15e-41) tmp = Float64(Float64(x2 * -6.0) - x1); elseif (x1 <= 1.7e+58) tmp = t_0; else tmp = Float64(x1 * Float64(x1 * Float64(Float64(x1 * x1) * 6.0))); end return tmp end
function tmp_2 = code(x1, x2) t_0 = (x2 * -6.0) + (x1 * (8.0 * (x2 * x2))); tmp = 0.0; if (x1 <= -1.12e-7) tmp = (x1 * (x1 * x1)) * (x1 * 6.0); elseif (x1 <= -2.2e-164) tmp = t_0; elseif (x1 <= 2.15e-41) tmp = (x2 * -6.0) - x1; elseif (x1 <= 1.7e+58) tmp = t_0; else tmp = x1 * (x1 * ((x1 * x1) * 6.0)); end tmp_2 = tmp; end
code[x1_, x2_] := Block[{t$95$0 = N[(N[(x2 * -6.0), $MachinePrecision] + N[(x1 * N[(8.0 * N[(x2 * x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x1, -1.12e-7], N[(N[(x1 * N[(x1 * x1), $MachinePrecision]), $MachinePrecision] * N[(x1 * 6.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, -2.2e-164], t$95$0, If[LessEqual[x1, 2.15e-41], N[(N[(x2 * -6.0), $MachinePrecision] - x1), $MachinePrecision], If[LessEqual[x1, 1.7e+58], t$95$0, N[(x1 * N[(x1 * N[(N[(x1 * x1), $MachinePrecision] * 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x2 \cdot -6 + x1 \cdot \left(8 \cdot \left(x2 \cdot x2\right)\right)\\
\mathbf{if}\;x1 \leq -1.12 \cdot 10^{-7}:\\
\;\;\;\;\left(x1 \cdot \left(x1 \cdot x1\right)\right) \cdot \left(x1 \cdot 6\right)\\
\mathbf{elif}\;x1 \leq -2.2 \cdot 10^{-164}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;x1 \leq 2.15 \cdot 10^{-41}:\\
\;\;\;\;x2 \cdot -6 - x1\\
\mathbf{elif}\;x1 \leq 1.7 \cdot 10^{+58}:\\
\;\;\;\;t\_0\\
\mathbf{else}:\\
\;\;\;\;x1 \cdot \left(x1 \cdot \left(\left(x1 \cdot x1\right) \cdot 6\right)\right)\\
\end{array}
\end{array}
if x1 < -1.12e-7Initial program 38.0%
Simplified51.8%
Taylor expanded in x1 around inf
*-lowering-*.f64N/A
pow-lowering-pow.f6487.1%
Simplified87.1%
metadata-evalN/A
pow-prod-upN/A
pow2N/A
pow2N/A
*-commutativeN/A
*-lowering-*.f64N/A
associate-*l*N/A
cube-multN/A
*-lowering-*.f64N/A
cube-multN/A
*-lowering-*.f64N/A
*-lowering-*.f6487.0%
Applied egg-rr87.0%
*-commutativeN/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f6487.1%
Applied egg-rr87.1%
if -1.12e-7 < x1 < -2.19999999999999988e-164 or 2.1499999999999999e-41 < x1 < 1.7e58Initial program 99.6%
Simplified92.4%
Taylor expanded in x1 around 0
+-lowering-+.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
associate--l+N/A
+-lowering-+.f64N/A
Simplified79.8%
Taylor expanded in x2 around inf
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6466.3%
Simplified66.3%
if -2.19999999999999988e-164 < x1 < 2.1499999999999999e-41Initial program 99.5%
Simplified99.5%
Taylor expanded in x1 around 0
+-lowering-+.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
associate--l+N/A
+-lowering-+.f64N/A
Simplified90.8%
Taylor expanded in x2 around 0
*-lowering-*.f64N/A
sub-negN/A
metadata-evalN/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f6489.2%
Simplified89.2%
Taylor expanded in x1 around 0
mul-1-negN/A
unsub-negN/A
--lowering--.f64N/A
*-lowering-*.f6489.2%
Simplified89.2%
if 1.7e58 < x1 Initial program 42.2%
Simplified42.2%
Taylor expanded in x1 around inf
*-lowering-*.f64N/A
pow-lowering-pow.f6497.8%
Simplified97.8%
metadata-evalN/A
pow-prod-upN/A
pow2N/A
pow2N/A
*-commutativeN/A
*-lowering-*.f64N/A
associate-*l*N/A
cube-multN/A
*-lowering-*.f64N/A
cube-multN/A
*-lowering-*.f64N/A
*-lowering-*.f6497.7%
Applied egg-rr97.7%
associate-*l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f6497.8%
Applied egg-rr97.8%
Final simplification86.3%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (* 8.0 (* x1 (* x2 x2)))))
(if (<= x1 -1.12e-7)
(* (* x1 (* x1 x1)) (* x1 6.0))
(if (<= x1 -5.1e-46)
t_0
(if (<= x1 4.6e-40)
(- (* x2 -6.0) x1)
(if (<= x1 1.7e+58) t_0 (* x1 (* x1 (* (* x1 x1) 6.0)))))))))
double code(double x1, double x2) {
double t_0 = 8.0 * (x1 * (x2 * x2));
double tmp;
if (x1 <= -1.12e-7) {
tmp = (x1 * (x1 * x1)) * (x1 * 6.0);
} else if (x1 <= -5.1e-46) {
tmp = t_0;
} else if (x1 <= 4.6e-40) {
tmp = (x2 * -6.0) - x1;
} else if (x1 <= 1.7e+58) {
tmp = t_0;
} else {
tmp = x1 * (x1 * ((x1 * x1) * 6.0));
}
return tmp;
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
real(8) :: t_0
real(8) :: tmp
t_0 = 8.0d0 * (x1 * (x2 * x2))
if (x1 <= (-1.12d-7)) then
tmp = (x1 * (x1 * x1)) * (x1 * 6.0d0)
else if (x1 <= (-5.1d-46)) then
tmp = t_0
else if (x1 <= 4.6d-40) then
tmp = (x2 * (-6.0d0)) - x1
else if (x1 <= 1.7d+58) then
tmp = t_0
else
tmp = x1 * (x1 * ((x1 * x1) * 6.0d0))
end if
code = tmp
end function
public static double code(double x1, double x2) {
double t_0 = 8.0 * (x1 * (x2 * x2));
double tmp;
if (x1 <= -1.12e-7) {
tmp = (x1 * (x1 * x1)) * (x1 * 6.0);
} else if (x1 <= -5.1e-46) {
tmp = t_0;
} else if (x1 <= 4.6e-40) {
tmp = (x2 * -6.0) - x1;
} else if (x1 <= 1.7e+58) {
tmp = t_0;
} else {
tmp = x1 * (x1 * ((x1 * x1) * 6.0));
}
return tmp;
}
def code(x1, x2): t_0 = 8.0 * (x1 * (x2 * x2)) tmp = 0 if x1 <= -1.12e-7: tmp = (x1 * (x1 * x1)) * (x1 * 6.0) elif x1 <= -5.1e-46: tmp = t_0 elif x1 <= 4.6e-40: tmp = (x2 * -6.0) - x1 elif x1 <= 1.7e+58: tmp = t_0 else: tmp = x1 * (x1 * ((x1 * x1) * 6.0)) return tmp
function code(x1, x2) t_0 = Float64(8.0 * Float64(x1 * Float64(x2 * x2))) tmp = 0.0 if (x1 <= -1.12e-7) tmp = Float64(Float64(x1 * Float64(x1 * x1)) * Float64(x1 * 6.0)); elseif (x1 <= -5.1e-46) tmp = t_0; elseif (x1 <= 4.6e-40) tmp = Float64(Float64(x2 * -6.0) - x1); elseif (x1 <= 1.7e+58) tmp = t_0; else tmp = Float64(x1 * Float64(x1 * Float64(Float64(x1 * x1) * 6.0))); end return tmp end
function tmp_2 = code(x1, x2) t_0 = 8.0 * (x1 * (x2 * x2)); tmp = 0.0; if (x1 <= -1.12e-7) tmp = (x1 * (x1 * x1)) * (x1 * 6.0); elseif (x1 <= -5.1e-46) tmp = t_0; elseif (x1 <= 4.6e-40) tmp = (x2 * -6.0) - x1; elseif (x1 <= 1.7e+58) tmp = t_0; else tmp = x1 * (x1 * ((x1 * x1) * 6.0)); end tmp_2 = tmp; end
code[x1_, x2_] := Block[{t$95$0 = N[(8.0 * N[(x1 * N[(x2 * x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x1, -1.12e-7], N[(N[(x1 * N[(x1 * x1), $MachinePrecision]), $MachinePrecision] * N[(x1 * 6.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, -5.1e-46], t$95$0, If[LessEqual[x1, 4.6e-40], N[(N[(x2 * -6.0), $MachinePrecision] - x1), $MachinePrecision], If[LessEqual[x1, 1.7e+58], t$95$0, N[(x1 * N[(x1 * N[(N[(x1 * x1), $MachinePrecision] * 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := 8 \cdot \left(x1 \cdot \left(x2 \cdot x2\right)\right)\\
\mathbf{if}\;x1 \leq -1.12 \cdot 10^{-7}:\\
\;\;\;\;\left(x1 \cdot \left(x1 \cdot x1\right)\right) \cdot \left(x1 \cdot 6\right)\\
\mathbf{elif}\;x1 \leq -5.1 \cdot 10^{-46}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;x1 \leq 4.6 \cdot 10^{-40}:\\
\;\;\;\;x2 \cdot -6 - x1\\
\mathbf{elif}\;x1 \leq 1.7 \cdot 10^{+58}:\\
\;\;\;\;t\_0\\
\mathbf{else}:\\
\;\;\;\;x1 \cdot \left(x1 \cdot \left(\left(x1 \cdot x1\right) \cdot 6\right)\right)\\
\end{array}
\end{array}
if x1 < -1.12e-7Initial program 38.0%
Simplified51.8%
Taylor expanded in x1 around inf
*-lowering-*.f64N/A
pow-lowering-pow.f6487.1%
Simplified87.1%
metadata-evalN/A
pow-prod-upN/A
pow2N/A
pow2N/A
*-commutativeN/A
*-lowering-*.f64N/A
associate-*l*N/A
cube-multN/A
*-lowering-*.f64N/A
cube-multN/A
*-lowering-*.f64N/A
*-lowering-*.f6487.0%
Applied egg-rr87.0%
*-commutativeN/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f6487.1%
Applied egg-rr87.1%
if -1.12e-7 < x1 < -5.0999999999999997e-46 or 4.6e-40 < x1 < 1.7e58Initial program 99.7%
Simplified88.9%
Taylor expanded in x1 around 0
+-lowering-+.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
associate--l+N/A
+-lowering-+.f64N/A
Simplified76.3%
Taylor expanded in x2 around inf
*-lowering-*.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6467.3%
Simplified67.3%
if -5.0999999999999997e-46 < x1 < 4.6e-40Initial program 99.5%
Simplified99.5%
Taylor expanded in x1 around 0
+-lowering-+.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
associate--l+N/A
+-lowering-+.f64N/A
Simplified90.3%
Taylor expanded in x2 around 0
*-lowering-*.f64N/A
sub-negN/A
metadata-evalN/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f6484.4%
Simplified84.4%
Taylor expanded in x1 around 0
mul-1-negN/A
unsub-negN/A
--lowering--.f64N/A
*-lowering-*.f6484.4%
Simplified84.4%
if 1.7e58 < x1 Initial program 42.2%
Simplified42.2%
Taylor expanded in x1 around inf
*-lowering-*.f64N/A
pow-lowering-pow.f6497.8%
Simplified97.8%
metadata-evalN/A
pow-prod-upN/A
pow2N/A
pow2N/A
*-commutativeN/A
*-lowering-*.f64N/A
associate-*l*N/A
cube-multN/A
*-lowering-*.f64N/A
cube-multN/A
*-lowering-*.f64N/A
*-lowering-*.f6497.7%
Applied egg-rr97.7%
associate-*l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f6497.8%
Applied egg-rr97.8%
Final simplification85.7%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (* 8.0 (* x1 (* x2 x2)))))
(if (<= x1 -1.12e-7)
(* (* x1 (* x1 x1)) (* x1 6.0))
(if (<= x1 -4.8e-48)
t_0
(if (<= x1 8.5e-35)
(- (* x2 -6.0) x1)
(if (<= x1 1.6e+27) t_0 (* (* x1 x1) (* (* x1 x1) 6.0))))))))
double code(double x1, double x2) {
double t_0 = 8.0 * (x1 * (x2 * x2));
double tmp;
if (x1 <= -1.12e-7) {
tmp = (x1 * (x1 * x1)) * (x1 * 6.0);
} else if (x1 <= -4.8e-48) {
tmp = t_0;
} else if (x1 <= 8.5e-35) {
tmp = (x2 * -6.0) - x1;
} else if (x1 <= 1.6e+27) {
tmp = t_0;
} else {
tmp = (x1 * x1) * ((x1 * x1) * 6.0);
}
return tmp;
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
real(8) :: t_0
real(8) :: tmp
t_0 = 8.0d0 * (x1 * (x2 * x2))
if (x1 <= (-1.12d-7)) then
tmp = (x1 * (x1 * x1)) * (x1 * 6.0d0)
else if (x1 <= (-4.8d-48)) then
tmp = t_0
else if (x1 <= 8.5d-35) then
tmp = (x2 * (-6.0d0)) - x1
else if (x1 <= 1.6d+27) then
tmp = t_0
else
tmp = (x1 * x1) * ((x1 * x1) * 6.0d0)
end if
code = tmp
end function
public static double code(double x1, double x2) {
double t_0 = 8.0 * (x1 * (x2 * x2));
double tmp;
if (x1 <= -1.12e-7) {
tmp = (x1 * (x1 * x1)) * (x1 * 6.0);
} else if (x1 <= -4.8e-48) {
tmp = t_0;
} else if (x1 <= 8.5e-35) {
tmp = (x2 * -6.0) - x1;
} else if (x1 <= 1.6e+27) {
tmp = t_0;
} else {
tmp = (x1 * x1) * ((x1 * x1) * 6.0);
}
return tmp;
}
def code(x1, x2): t_0 = 8.0 * (x1 * (x2 * x2)) tmp = 0 if x1 <= -1.12e-7: tmp = (x1 * (x1 * x1)) * (x1 * 6.0) elif x1 <= -4.8e-48: tmp = t_0 elif x1 <= 8.5e-35: tmp = (x2 * -6.0) - x1 elif x1 <= 1.6e+27: tmp = t_0 else: tmp = (x1 * x1) * ((x1 * x1) * 6.0) return tmp
function code(x1, x2) t_0 = Float64(8.0 * Float64(x1 * Float64(x2 * x2))) tmp = 0.0 if (x1 <= -1.12e-7) tmp = Float64(Float64(x1 * Float64(x1 * x1)) * Float64(x1 * 6.0)); elseif (x1 <= -4.8e-48) tmp = t_0; elseif (x1 <= 8.5e-35) tmp = Float64(Float64(x2 * -6.0) - x1); elseif (x1 <= 1.6e+27) tmp = t_0; else tmp = Float64(Float64(x1 * x1) * Float64(Float64(x1 * x1) * 6.0)); end return tmp end
function tmp_2 = code(x1, x2) t_0 = 8.0 * (x1 * (x2 * x2)); tmp = 0.0; if (x1 <= -1.12e-7) tmp = (x1 * (x1 * x1)) * (x1 * 6.0); elseif (x1 <= -4.8e-48) tmp = t_0; elseif (x1 <= 8.5e-35) tmp = (x2 * -6.0) - x1; elseif (x1 <= 1.6e+27) tmp = t_0; else tmp = (x1 * x1) * ((x1 * x1) * 6.0); end tmp_2 = tmp; end
code[x1_, x2_] := Block[{t$95$0 = N[(8.0 * N[(x1 * N[(x2 * x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x1, -1.12e-7], N[(N[(x1 * N[(x1 * x1), $MachinePrecision]), $MachinePrecision] * N[(x1 * 6.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, -4.8e-48], t$95$0, If[LessEqual[x1, 8.5e-35], N[(N[(x2 * -6.0), $MachinePrecision] - x1), $MachinePrecision], If[LessEqual[x1, 1.6e+27], t$95$0, N[(N[(x1 * x1), $MachinePrecision] * N[(N[(x1 * x1), $MachinePrecision] * 6.0), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := 8 \cdot \left(x1 \cdot \left(x2 \cdot x2\right)\right)\\
\mathbf{if}\;x1 \leq -1.12 \cdot 10^{-7}:\\
\;\;\;\;\left(x1 \cdot \left(x1 \cdot x1\right)\right) \cdot \left(x1 \cdot 6\right)\\
\mathbf{elif}\;x1 \leq -4.8 \cdot 10^{-48}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;x1 \leq 8.5 \cdot 10^{-35}:\\
\;\;\;\;x2 \cdot -6 - x1\\
\mathbf{elif}\;x1 \leq 1.6 \cdot 10^{+27}:\\
\;\;\;\;t\_0\\
\mathbf{else}:\\
\;\;\;\;\left(x1 \cdot x1\right) \cdot \left(\left(x1 \cdot x1\right) \cdot 6\right)\\
\end{array}
\end{array}
if x1 < -1.12e-7Initial program 38.0%
Simplified51.8%
Taylor expanded in x1 around inf
*-lowering-*.f64N/A
pow-lowering-pow.f6487.1%
Simplified87.1%
metadata-evalN/A
pow-prod-upN/A
pow2N/A
pow2N/A
*-commutativeN/A
*-lowering-*.f64N/A
associate-*l*N/A
cube-multN/A
*-lowering-*.f64N/A
cube-multN/A
*-lowering-*.f64N/A
*-lowering-*.f6487.0%
Applied egg-rr87.0%
*-commutativeN/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f6487.1%
Applied egg-rr87.1%
if -1.12e-7 < x1 < -4.8e-48 or 8.5000000000000001e-35 < x1 < 1.60000000000000008e27Initial program 99.7%
Simplified90.1%
Taylor expanded in x1 around 0
+-lowering-+.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
associate--l+N/A
+-lowering-+.f64N/A
Simplified86.5%
Taylor expanded in x2 around inf
*-lowering-*.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6474.7%
Simplified74.7%
if -4.8e-48 < x1 < 8.5000000000000001e-35Initial program 99.5%
Simplified99.5%
Taylor expanded in x1 around 0
+-lowering-+.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
associate--l+N/A
+-lowering-+.f64N/A
Simplified90.3%
Taylor expanded in x2 around 0
*-lowering-*.f64N/A
sub-negN/A
metadata-evalN/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f6484.4%
Simplified84.4%
Taylor expanded in x1 around 0
mul-1-negN/A
unsub-negN/A
--lowering--.f64N/A
*-lowering-*.f6484.4%
Simplified84.4%
if 1.60000000000000008e27 < x1 Initial program 49.9%
Simplified48.0%
Taylor expanded in x1 around inf
*-lowering-*.f64N/A
pow-lowering-pow.f6490.7%
Simplified90.7%
metadata-evalN/A
pow-prod-upN/A
pow2N/A
pow2N/A
*-commutativeN/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f6490.7%
Applied egg-rr90.7%
Final simplification85.7%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (* (* x1 x1) (* (* x1 x1) 6.0))) (t_1 (* 8.0 (* x1 (* x2 x2)))))
(if (<= x1 -1.12e-7)
t_0
(if (<= x1 -2.3e-47)
t_1
(if (<= x1 3.2e-40)
(- (* x2 -6.0) x1)
(if (<= x1 1.35e+25) t_1 t_0))))))
double code(double x1, double x2) {
double t_0 = (x1 * x1) * ((x1 * x1) * 6.0);
double t_1 = 8.0 * (x1 * (x2 * x2));
double tmp;
if (x1 <= -1.12e-7) {
tmp = t_0;
} else if (x1 <= -2.3e-47) {
tmp = t_1;
} else if (x1 <= 3.2e-40) {
tmp = (x2 * -6.0) - x1;
} else if (x1 <= 1.35e+25) {
tmp = t_1;
} else {
tmp = t_0;
}
return tmp;
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
real(8) :: t_0
real(8) :: t_1
real(8) :: tmp
t_0 = (x1 * x1) * ((x1 * x1) * 6.0d0)
t_1 = 8.0d0 * (x1 * (x2 * x2))
if (x1 <= (-1.12d-7)) then
tmp = t_0
else if (x1 <= (-2.3d-47)) then
tmp = t_1
else if (x1 <= 3.2d-40) then
tmp = (x2 * (-6.0d0)) - x1
else if (x1 <= 1.35d+25) then
tmp = t_1
else
tmp = t_0
end if
code = tmp
end function
public static double code(double x1, double x2) {
double t_0 = (x1 * x1) * ((x1 * x1) * 6.0);
double t_1 = 8.0 * (x1 * (x2 * x2));
double tmp;
if (x1 <= -1.12e-7) {
tmp = t_0;
} else if (x1 <= -2.3e-47) {
tmp = t_1;
} else if (x1 <= 3.2e-40) {
tmp = (x2 * -6.0) - x1;
} else if (x1 <= 1.35e+25) {
tmp = t_1;
} else {
tmp = t_0;
}
return tmp;
}
def code(x1, x2): t_0 = (x1 * x1) * ((x1 * x1) * 6.0) t_1 = 8.0 * (x1 * (x2 * x2)) tmp = 0 if x1 <= -1.12e-7: tmp = t_0 elif x1 <= -2.3e-47: tmp = t_1 elif x1 <= 3.2e-40: tmp = (x2 * -6.0) - x1 elif x1 <= 1.35e+25: tmp = t_1 else: tmp = t_0 return tmp
function code(x1, x2) t_0 = Float64(Float64(x1 * x1) * Float64(Float64(x1 * x1) * 6.0)) t_1 = Float64(8.0 * Float64(x1 * Float64(x2 * x2))) tmp = 0.0 if (x1 <= -1.12e-7) tmp = t_0; elseif (x1 <= -2.3e-47) tmp = t_1; elseif (x1 <= 3.2e-40) tmp = Float64(Float64(x2 * -6.0) - x1); elseif (x1 <= 1.35e+25) tmp = t_1; else tmp = t_0; end return tmp end
function tmp_2 = code(x1, x2) t_0 = (x1 * x1) * ((x1 * x1) * 6.0); t_1 = 8.0 * (x1 * (x2 * x2)); tmp = 0.0; if (x1 <= -1.12e-7) tmp = t_0; elseif (x1 <= -2.3e-47) tmp = t_1; elseif (x1 <= 3.2e-40) tmp = (x2 * -6.0) - x1; elseif (x1 <= 1.35e+25) tmp = t_1; else tmp = t_0; end tmp_2 = tmp; end
code[x1_, x2_] := Block[{t$95$0 = N[(N[(x1 * x1), $MachinePrecision] * N[(N[(x1 * x1), $MachinePrecision] * 6.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(8.0 * N[(x1 * N[(x2 * x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x1, -1.12e-7], t$95$0, If[LessEqual[x1, -2.3e-47], t$95$1, If[LessEqual[x1, 3.2e-40], N[(N[(x2 * -6.0), $MachinePrecision] - x1), $MachinePrecision], If[LessEqual[x1, 1.35e+25], t$95$1, t$95$0]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \left(x1 \cdot x1\right) \cdot \left(\left(x1 \cdot x1\right) \cdot 6\right)\\
t_1 := 8 \cdot \left(x1 \cdot \left(x2 \cdot x2\right)\right)\\
\mathbf{if}\;x1 \leq -1.12 \cdot 10^{-7}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;x1 \leq -2.3 \cdot 10^{-47}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;x1 \leq 3.2 \cdot 10^{-40}:\\
\;\;\;\;x2 \cdot -6 - x1\\
\mathbf{elif}\;x1 \leq 1.35 \cdot 10^{+25}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
if x1 < -1.12e-7 or 1.35e25 < x1 Initial program 43.0%
Simplified50.2%
Taylor expanded in x1 around inf
*-lowering-*.f64N/A
pow-lowering-pow.f6488.6%
Simplified88.6%
metadata-evalN/A
pow-prod-upN/A
pow2N/A
pow2N/A
*-commutativeN/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f6488.5%
Applied egg-rr88.5%
if -1.12e-7 < x1 < -2.29999999999999982e-47 or 3.20000000000000002e-40 < x1 < 1.35e25Initial program 99.7%
Simplified90.1%
Taylor expanded in x1 around 0
+-lowering-+.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
associate--l+N/A
+-lowering-+.f64N/A
Simplified86.5%
Taylor expanded in x2 around inf
*-lowering-*.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6474.7%
Simplified74.7%
if -2.29999999999999982e-47 < x1 < 3.20000000000000002e-40Initial program 99.5%
Simplified99.5%
Taylor expanded in x1 around 0
+-lowering-+.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
associate--l+N/A
+-lowering-+.f64N/A
Simplified90.3%
Taylor expanded in x2 around 0
*-lowering-*.f64N/A
sub-negN/A
metadata-evalN/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f6484.4%
Simplified84.4%
Taylor expanded in x1 around 0
mul-1-negN/A
unsub-negN/A
--lowering--.f64N/A
*-lowering-*.f6484.4%
Simplified84.4%
Final simplification85.6%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (* x1 (+ -2.0 (* x1 15.0)))) (t_1 (* 8.0 (* x1 (* x2 x2)))))
(if (<= x1 -1.8e+97)
t_0
(if (<= x1 -1.12e-46)
t_1
(if (<= x1 3.2e-35)
(- (* x2 -6.0) x1)
(if (<= x1 4.8e+132) t_1 t_0))))))
double code(double x1, double x2) {
double t_0 = x1 * (-2.0 + (x1 * 15.0));
double t_1 = 8.0 * (x1 * (x2 * x2));
double tmp;
if (x1 <= -1.8e+97) {
tmp = t_0;
} else if (x1 <= -1.12e-46) {
tmp = t_1;
} else if (x1 <= 3.2e-35) {
tmp = (x2 * -6.0) - x1;
} else if (x1 <= 4.8e+132) {
tmp = t_1;
} else {
tmp = t_0;
}
return tmp;
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
real(8) :: t_0
real(8) :: t_1
real(8) :: tmp
t_0 = x1 * ((-2.0d0) + (x1 * 15.0d0))
t_1 = 8.0d0 * (x1 * (x2 * x2))
if (x1 <= (-1.8d+97)) then
tmp = t_0
else if (x1 <= (-1.12d-46)) then
tmp = t_1
else if (x1 <= 3.2d-35) then
tmp = (x2 * (-6.0d0)) - x1
else if (x1 <= 4.8d+132) then
tmp = t_1
else
tmp = t_0
end if
code = tmp
end function
public static double code(double x1, double x2) {
double t_0 = x1 * (-2.0 + (x1 * 15.0));
double t_1 = 8.0 * (x1 * (x2 * x2));
double tmp;
if (x1 <= -1.8e+97) {
tmp = t_0;
} else if (x1 <= -1.12e-46) {
tmp = t_1;
} else if (x1 <= 3.2e-35) {
tmp = (x2 * -6.0) - x1;
} else if (x1 <= 4.8e+132) {
tmp = t_1;
} else {
tmp = t_0;
}
return tmp;
}
def code(x1, x2): t_0 = x1 * (-2.0 + (x1 * 15.0)) t_1 = 8.0 * (x1 * (x2 * x2)) tmp = 0 if x1 <= -1.8e+97: tmp = t_0 elif x1 <= -1.12e-46: tmp = t_1 elif x1 <= 3.2e-35: tmp = (x2 * -6.0) - x1 elif x1 <= 4.8e+132: tmp = t_1 else: tmp = t_0 return tmp
function code(x1, x2) t_0 = Float64(x1 * Float64(-2.0 + Float64(x1 * 15.0))) t_1 = Float64(8.0 * Float64(x1 * Float64(x2 * x2))) tmp = 0.0 if (x1 <= -1.8e+97) tmp = t_0; elseif (x1 <= -1.12e-46) tmp = t_1; elseif (x1 <= 3.2e-35) tmp = Float64(Float64(x2 * -6.0) - x1); elseif (x1 <= 4.8e+132) tmp = t_1; else tmp = t_0; end return tmp end
function tmp_2 = code(x1, x2) t_0 = x1 * (-2.0 + (x1 * 15.0)); t_1 = 8.0 * (x1 * (x2 * x2)); tmp = 0.0; if (x1 <= -1.8e+97) tmp = t_0; elseif (x1 <= -1.12e-46) tmp = t_1; elseif (x1 <= 3.2e-35) tmp = (x2 * -6.0) - x1; elseif (x1 <= 4.8e+132) tmp = t_1; else tmp = t_0; end tmp_2 = tmp; end
code[x1_, x2_] := Block[{t$95$0 = N[(x1 * N[(-2.0 + N[(x1 * 15.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(8.0 * N[(x1 * N[(x2 * x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x1, -1.8e+97], t$95$0, If[LessEqual[x1, -1.12e-46], t$95$1, If[LessEqual[x1, 3.2e-35], N[(N[(x2 * -6.0), $MachinePrecision] - x1), $MachinePrecision], If[LessEqual[x1, 4.8e+132], t$95$1, t$95$0]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x1 \cdot \left(-2 + x1 \cdot 15\right)\\
t_1 := 8 \cdot \left(x1 \cdot \left(x2 \cdot x2\right)\right)\\
\mathbf{if}\;x1 \leq -1.8 \cdot 10^{+97}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;x1 \leq -1.12 \cdot 10^{-46}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;x1 \leq 3.2 \cdot 10^{-35}:\\
\;\;\;\;x2 \cdot -6 - x1\\
\mathbf{elif}\;x1 \leq 4.8 \cdot 10^{+132}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
if x1 < -1.79999999999999983e97 or 4.8000000000000002e132 < x1 Initial program 7.8%
Simplified23.4%
Taylor expanded in x1 around inf
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6423.4%
Simplified23.4%
Taylor expanded in x1 around inf
*-commutativeN/A
*-lowering-*.f64N/A
sub-negN/A
+-lowering-+.f64N/A
associate-*r/N/A
metadata-evalN/A
distribute-neg-fracN/A
metadata-evalN/A
/-lowering-/.f64N/A
unpow2N/A
*-lowering-*.f64100.0%
Simplified100.0%
Taylor expanded in x1 around 0
*-lowering-*.f64N/A
sub-negN/A
metadata-evalN/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f6478.6%
Simplified78.6%
if -1.79999999999999983e97 < x1 < -1.11999999999999997e-46 or 3.1999999999999998e-35 < x1 < 4.8000000000000002e132Initial program 99.5%
Simplified92.3%
Taylor expanded in x1 around 0
+-lowering-+.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
associate--l+N/A
+-lowering-+.f64N/A
Simplified45.3%
Taylor expanded in x2 around inf
*-lowering-*.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6441.4%
Simplified41.4%
if -1.11999999999999997e-46 < x1 < 3.1999999999999998e-35Initial program 99.5%
Simplified99.5%
Taylor expanded in x1 around 0
+-lowering-+.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
associate--l+N/A
+-lowering-+.f64N/A
Simplified90.3%
Taylor expanded in x2 around 0
*-lowering-*.f64N/A
sub-negN/A
metadata-evalN/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f6484.4%
Simplified84.4%
Taylor expanded in x1 around 0
mul-1-negN/A
unsub-negN/A
--lowering--.f64N/A
*-lowering-*.f6484.4%
Simplified84.4%
Final simplification71.1%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (* (* x1 x1) 9.0)) (t_1 (* 8.0 (* x1 (* x2 x2)))))
(if (<= x1 -1.42e+97)
t_0
(if (<= x1 -1.3e-44)
t_1
(if (<= x1 5.5e-37)
(- (* x2 -6.0) x1)
(if (<= x1 4.8e+132) t_1 t_0))))))
double code(double x1, double x2) {
double t_0 = (x1 * x1) * 9.0;
double t_1 = 8.0 * (x1 * (x2 * x2));
double tmp;
if (x1 <= -1.42e+97) {
tmp = t_0;
} else if (x1 <= -1.3e-44) {
tmp = t_1;
} else if (x1 <= 5.5e-37) {
tmp = (x2 * -6.0) - x1;
} else if (x1 <= 4.8e+132) {
tmp = t_1;
} else {
tmp = t_0;
}
return tmp;
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
real(8) :: t_0
real(8) :: t_1
real(8) :: tmp
t_0 = (x1 * x1) * 9.0d0
t_1 = 8.0d0 * (x1 * (x2 * x2))
if (x1 <= (-1.42d+97)) then
tmp = t_0
else if (x1 <= (-1.3d-44)) then
tmp = t_1
else if (x1 <= 5.5d-37) then
tmp = (x2 * (-6.0d0)) - x1
else if (x1 <= 4.8d+132) then
tmp = t_1
else
tmp = t_0
end if
code = tmp
end function
public static double code(double x1, double x2) {
double t_0 = (x1 * x1) * 9.0;
double t_1 = 8.0 * (x1 * (x2 * x2));
double tmp;
if (x1 <= -1.42e+97) {
tmp = t_0;
} else if (x1 <= -1.3e-44) {
tmp = t_1;
} else if (x1 <= 5.5e-37) {
tmp = (x2 * -6.0) - x1;
} else if (x1 <= 4.8e+132) {
tmp = t_1;
} else {
tmp = t_0;
}
return tmp;
}
def code(x1, x2): t_0 = (x1 * x1) * 9.0 t_1 = 8.0 * (x1 * (x2 * x2)) tmp = 0 if x1 <= -1.42e+97: tmp = t_0 elif x1 <= -1.3e-44: tmp = t_1 elif x1 <= 5.5e-37: tmp = (x2 * -6.0) - x1 elif x1 <= 4.8e+132: tmp = t_1 else: tmp = t_0 return tmp
function code(x1, x2) t_0 = Float64(Float64(x1 * x1) * 9.0) t_1 = Float64(8.0 * Float64(x1 * Float64(x2 * x2))) tmp = 0.0 if (x1 <= -1.42e+97) tmp = t_0; elseif (x1 <= -1.3e-44) tmp = t_1; elseif (x1 <= 5.5e-37) tmp = Float64(Float64(x2 * -6.0) - x1); elseif (x1 <= 4.8e+132) tmp = t_1; else tmp = t_0; end return tmp end
function tmp_2 = code(x1, x2) t_0 = (x1 * x1) * 9.0; t_1 = 8.0 * (x1 * (x2 * x2)); tmp = 0.0; if (x1 <= -1.42e+97) tmp = t_0; elseif (x1 <= -1.3e-44) tmp = t_1; elseif (x1 <= 5.5e-37) tmp = (x2 * -6.0) - x1; elseif (x1 <= 4.8e+132) tmp = t_1; else tmp = t_0; end tmp_2 = tmp; end
code[x1_, x2_] := Block[{t$95$0 = N[(N[(x1 * x1), $MachinePrecision] * 9.0), $MachinePrecision]}, Block[{t$95$1 = N[(8.0 * N[(x1 * N[(x2 * x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x1, -1.42e+97], t$95$0, If[LessEqual[x1, -1.3e-44], t$95$1, If[LessEqual[x1, 5.5e-37], N[(N[(x2 * -6.0), $MachinePrecision] - x1), $MachinePrecision], If[LessEqual[x1, 4.8e+132], t$95$1, t$95$0]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \left(x1 \cdot x1\right) \cdot 9\\
t_1 := 8 \cdot \left(x1 \cdot \left(x2 \cdot x2\right)\right)\\
\mathbf{if}\;x1 \leq -1.42 \cdot 10^{+97}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;x1 \leq -1.3 \cdot 10^{-44}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;x1 \leq 5.5 \cdot 10^{-37}:\\
\;\;\;\;x2 \cdot -6 - x1\\
\mathbf{elif}\;x1 \leq 4.8 \cdot 10^{+132}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
if x1 < -1.41999999999999991e97 or 4.8000000000000002e132 < x1 Initial program 7.8%
Simplified23.4%
Taylor expanded in x1 around 0
+-lowering-+.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
associate--l+N/A
+-lowering-+.f64N/A
Simplified53.2%
Taylor expanded in x2 around 0
*-lowering-*.f64N/A
sub-negN/A
metadata-evalN/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f6478.5%
Simplified78.5%
Taylor expanded in x1 around inf
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6478.6%
Simplified78.6%
if -1.41999999999999991e97 < x1 < -1.2999999999999999e-44 or 5.4999999999999998e-37 < x1 < 4.8000000000000002e132Initial program 99.5%
Simplified92.3%
Taylor expanded in x1 around 0
+-lowering-+.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
associate--l+N/A
+-lowering-+.f64N/A
Simplified45.3%
Taylor expanded in x2 around inf
*-lowering-*.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6441.4%
Simplified41.4%
if -1.2999999999999999e-44 < x1 < 5.4999999999999998e-37Initial program 99.5%
Simplified99.5%
Taylor expanded in x1 around 0
+-lowering-+.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
associate--l+N/A
+-lowering-+.f64N/A
Simplified90.3%
Taylor expanded in x2 around 0
*-lowering-*.f64N/A
sub-negN/A
metadata-evalN/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f6484.4%
Simplified84.4%
Taylor expanded in x1 around 0
mul-1-negN/A
unsub-negN/A
--lowering--.f64N/A
*-lowering-*.f6484.4%
Simplified84.4%
Final simplification71.1%
(FPCore (x1 x2)
:precision binary64
(if (<= x1 -6.2)
(* x1 (+ -2.0 (* x1 (+ 15.0 (* x1 (+ -3.0 (* x1 6.0)))))))
(if (<= x1 1.75e+25)
(+ (* x2 -6.0) (* x1 (+ -1.0 (* 4.0 (* x2 (+ (* 2.0 x2) -3.0))))))
(* (* x1 x1) (* (* x1 x1) 6.0)))))
double code(double x1, double x2) {
double tmp;
if (x1 <= -6.2) {
tmp = x1 * (-2.0 + (x1 * (15.0 + (x1 * (-3.0 + (x1 * 6.0))))));
} else if (x1 <= 1.75e+25) {
tmp = (x2 * -6.0) + (x1 * (-1.0 + (4.0 * (x2 * ((2.0 * x2) + -3.0)))));
} else {
tmp = (x1 * x1) * ((x1 * x1) * 6.0);
}
return tmp;
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
real(8) :: tmp
if (x1 <= (-6.2d0)) then
tmp = x1 * ((-2.0d0) + (x1 * (15.0d0 + (x1 * ((-3.0d0) + (x1 * 6.0d0))))))
else if (x1 <= 1.75d+25) then
tmp = (x2 * (-6.0d0)) + (x1 * ((-1.0d0) + (4.0d0 * (x2 * ((2.0d0 * x2) + (-3.0d0))))))
else
tmp = (x1 * x1) * ((x1 * x1) * 6.0d0)
end if
code = tmp
end function
public static double code(double x1, double x2) {
double tmp;
if (x1 <= -6.2) {
tmp = x1 * (-2.0 + (x1 * (15.0 + (x1 * (-3.0 + (x1 * 6.0))))));
} else if (x1 <= 1.75e+25) {
tmp = (x2 * -6.0) + (x1 * (-1.0 + (4.0 * (x2 * ((2.0 * x2) + -3.0)))));
} else {
tmp = (x1 * x1) * ((x1 * x1) * 6.0);
}
return tmp;
}
def code(x1, x2): tmp = 0 if x1 <= -6.2: tmp = x1 * (-2.0 + (x1 * (15.0 + (x1 * (-3.0 + (x1 * 6.0)))))) elif x1 <= 1.75e+25: tmp = (x2 * -6.0) + (x1 * (-1.0 + (4.0 * (x2 * ((2.0 * x2) + -3.0))))) else: tmp = (x1 * x1) * ((x1 * x1) * 6.0) return tmp
function code(x1, x2) tmp = 0.0 if (x1 <= -6.2) tmp = Float64(x1 * Float64(-2.0 + Float64(x1 * Float64(15.0 + Float64(x1 * Float64(-3.0 + Float64(x1 * 6.0))))))); elseif (x1 <= 1.75e+25) tmp = Float64(Float64(x2 * -6.0) + Float64(x1 * Float64(-1.0 + Float64(4.0 * Float64(x2 * Float64(Float64(2.0 * x2) + -3.0)))))); else tmp = Float64(Float64(x1 * x1) * Float64(Float64(x1 * x1) * 6.0)); end return tmp end
function tmp_2 = code(x1, x2) tmp = 0.0; if (x1 <= -6.2) tmp = x1 * (-2.0 + (x1 * (15.0 + (x1 * (-3.0 + (x1 * 6.0)))))); elseif (x1 <= 1.75e+25) tmp = (x2 * -6.0) + (x1 * (-1.0 + (4.0 * (x2 * ((2.0 * x2) + -3.0))))); else tmp = (x1 * x1) * ((x1 * x1) * 6.0); end tmp_2 = tmp; end
code[x1_, x2_] := If[LessEqual[x1, -6.2], N[(x1 * N[(-2.0 + N[(x1 * N[(15.0 + N[(x1 * N[(-3.0 + N[(x1 * 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 1.75e+25], N[(N[(x2 * -6.0), $MachinePrecision] + N[(x1 * N[(-1.0 + N[(4.0 * N[(x2 * N[(N[(2.0 * x2), $MachinePrecision] + -3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x1 * x1), $MachinePrecision] * N[(N[(x1 * x1), $MachinePrecision] * 6.0), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x1 \leq -6.2:\\
\;\;\;\;x1 \cdot \left(-2 + x1 \cdot \left(15 + x1 \cdot \left(-3 + x1 \cdot 6\right)\right)\right)\\
\mathbf{elif}\;x1 \leq 1.75 \cdot 10^{+25}:\\
\;\;\;\;x2 \cdot -6 + x1 \cdot \left(-1 + 4 \cdot \left(x2 \cdot \left(2 \cdot x2 + -3\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\left(x1 \cdot x1\right) \cdot \left(\left(x1 \cdot x1\right) \cdot 6\right)\\
\end{array}
\end{array}
if x1 < -6.20000000000000018Initial program 35.5%
Simplified49.8%
Taylor expanded in x1 around inf
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6451.7%
Simplified51.7%
Taylor expanded in x1 around inf
*-commutativeN/A
*-lowering-*.f64N/A
sub-negN/A
+-lowering-+.f64N/A
associate-*r/N/A
metadata-evalN/A
distribute-neg-fracN/A
metadata-evalN/A
/-lowering-/.f64N/A
unpow2N/A
*-lowering-*.f6490.2%
Simplified90.2%
Taylor expanded in x1 around 0
*-lowering-*.f64N/A
sub-negN/A
metadata-evalN/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
sub-negN/A
metadata-evalN/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f6490.3%
Simplified90.3%
if -6.20000000000000018 < x1 < 1.75e25Initial program 99.5%
Taylor expanded in x1 around 0
+-lowering-+.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
sub-negN/A
metadata-evalN/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
sub-negN/A
metadata-evalN/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f6488.9%
Simplified88.9%
if 1.75e25 < x1 Initial program 49.9%
Simplified48.0%
Taylor expanded in x1 around inf
*-lowering-*.f64N/A
pow-lowering-pow.f6490.7%
Simplified90.7%
metadata-evalN/A
pow-prod-upN/A
pow2N/A
pow2N/A
*-commutativeN/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f6490.7%
Applied egg-rr90.7%
Final simplification89.7%
(FPCore (x1 x2) :precision binary64 (let* ((t_0 (* (* x1 x1) 9.0))) (if (<= x1 -3.8e+72) t_0 (if (<= x1 6.5) (- (* x2 -6.0) x1) t_0))))
double code(double x1, double x2) {
double t_0 = (x1 * x1) * 9.0;
double tmp;
if (x1 <= -3.8e+72) {
tmp = t_0;
} else if (x1 <= 6.5) {
tmp = (x2 * -6.0) - x1;
} else {
tmp = t_0;
}
return tmp;
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
real(8) :: t_0
real(8) :: tmp
t_0 = (x1 * x1) * 9.0d0
if (x1 <= (-3.8d+72)) then
tmp = t_0
else if (x1 <= 6.5d0) then
tmp = (x2 * (-6.0d0)) - x1
else
tmp = t_0
end if
code = tmp
end function
public static double code(double x1, double x2) {
double t_0 = (x1 * x1) * 9.0;
double tmp;
if (x1 <= -3.8e+72) {
tmp = t_0;
} else if (x1 <= 6.5) {
tmp = (x2 * -6.0) - x1;
} else {
tmp = t_0;
}
return tmp;
}
def code(x1, x2): t_0 = (x1 * x1) * 9.0 tmp = 0 if x1 <= -3.8e+72: tmp = t_0 elif x1 <= 6.5: tmp = (x2 * -6.0) - x1 else: tmp = t_0 return tmp
function code(x1, x2) t_0 = Float64(Float64(x1 * x1) * 9.0) tmp = 0.0 if (x1 <= -3.8e+72) tmp = t_0; elseif (x1 <= 6.5) tmp = Float64(Float64(x2 * -6.0) - x1); else tmp = t_0; end return tmp end
function tmp_2 = code(x1, x2) t_0 = (x1 * x1) * 9.0; tmp = 0.0; if (x1 <= -3.8e+72) tmp = t_0; elseif (x1 <= 6.5) tmp = (x2 * -6.0) - x1; else tmp = t_0; end tmp_2 = tmp; end
code[x1_, x2_] := Block[{t$95$0 = N[(N[(x1 * x1), $MachinePrecision] * 9.0), $MachinePrecision]}, If[LessEqual[x1, -3.8e+72], t$95$0, If[LessEqual[x1, 6.5], N[(N[(x2 * -6.0), $MachinePrecision] - x1), $MachinePrecision], t$95$0]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \left(x1 \cdot x1\right) \cdot 9\\
\mathbf{if}\;x1 \leq -3.8 \cdot 10^{+72}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;x1 \leq 6.5:\\
\;\;\;\;x2 \cdot -6 - x1\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
if x1 < -3.80000000000000006e72 or 6.5 < x1 Initial program 35.4%
Simplified43.6%
Taylor expanded in x1 around 0
+-lowering-+.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
associate--l+N/A
+-lowering-+.f64N/A
Simplified46.4%
Taylor expanded in x2 around 0
*-lowering-*.f64N/A
sub-negN/A
metadata-evalN/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f6456.5%
Simplified56.5%
Taylor expanded in x1 around inf
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6456.6%
Simplified56.6%
if -3.80000000000000006e72 < x1 < 6.5Initial program 99.4%
Simplified98.0%
Taylor expanded in x1 around 0
+-lowering-+.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
associate--l+N/A
+-lowering-+.f64N/A
Simplified82.6%
Taylor expanded in x2 around 0
*-lowering-*.f64N/A
sub-negN/A
metadata-evalN/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f6467.6%
Simplified67.6%
Taylor expanded in x1 around 0
mul-1-negN/A
unsub-negN/A
--lowering--.f64N/A
*-lowering-*.f6467.1%
Simplified67.1%
Final simplification62.6%
(FPCore (x1 x2) :precision binary64 (let* ((t_0 (* (* x1 x1) 9.0))) (if (<= x1 -5.2e-28) t_0 (if (<= x1 1.35e+25) (* x2 -6.0) t_0))))
double code(double x1, double x2) {
double t_0 = (x1 * x1) * 9.0;
double tmp;
if (x1 <= -5.2e-28) {
tmp = t_0;
} else if (x1 <= 1.35e+25) {
tmp = x2 * -6.0;
} else {
tmp = t_0;
}
return tmp;
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
real(8) :: t_0
real(8) :: tmp
t_0 = (x1 * x1) * 9.0d0
if (x1 <= (-5.2d-28)) then
tmp = t_0
else if (x1 <= 1.35d+25) then
tmp = x2 * (-6.0d0)
else
tmp = t_0
end if
code = tmp
end function
public static double code(double x1, double x2) {
double t_0 = (x1 * x1) * 9.0;
double tmp;
if (x1 <= -5.2e-28) {
tmp = t_0;
} else if (x1 <= 1.35e+25) {
tmp = x2 * -6.0;
} else {
tmp = t_0;
}
return tmp;
}
def code(x1, x2): t_0 = (x1 * x1) * 9.0 tmp = 0 if x1 <= -5.2e-28: tmp = t_0 elif x1 <= 1.35e+25: tmp = x2 * -6.0 else: tmp = t_0 return tmp
function code(x1, x2) t_0 = Float64(Float64(x1 * x1) * 9.0) tmp = 0.0 if (x1 <= -5.2e-28) tmp = t_0; elseif (x1 <= 1.35e+25) tmp = Float64(x2 * -6.0); else tmp = t_0; end return tmp end
function tmp_2 = code(x1, x2) t_0 = (x1 * x1) * 9.0; tmp = 0.0; if (x1 <= -5.2e-28) tmp = t_0; elseif (x1 <= 1.35e+25) tmp = x2 * -6.0; else tmp = t_0; end tmp_2 = tmp; end
code[x1_, x2_] := Block[{t$95$0 = N[(N[(x1 * x1), $MachinePrecision] * 9.0), $MachinePrecision]}, If[LessEqual[x1, -5.2e-28], t$95$0, If[LessEqual[x1, 1.35e+25], N[(x2 * -6.0), $MachinePrecision], t$95$0]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \left(x1 \cdot x1\right) \cdot 9\\
\mathbf{if}\;x1 \leq -5.2 \cdot 10^{-28}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;x1 \leq 1.35 \cdot 10^{+25}:\\
\;\;\;\;x2 \cdot -6\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
if x1 < -5.2e-28 or 1.35e25 < x1 Initial program 45.2%
Simplified52.1%
Taylor expanded in x1 around 0
+-lowering-+.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
associate--l+N/A
+-lowering-+.f64N/A
Simplified45.4%
Taylor expanded in x2 around 0
*-lowering-*.f64N/A
sub-negN/A
metadata-evalN/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f6450.2%
Simplified50.2%
Taylor expanded in x1 around inf
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6448.7%
Simplified48.7%
if -5.2e-28 < x1 < 1.35e25Initial program 99.5%
Simplified97.9%
Taylor expanded in x1 around 0
*-lowering-*.f6456.5%
Simplified56.5%
Final simplification52.6%
(FPCore (x1 x2) :precision binary64 (* x2 -6.0))
double code(double x1, double x2) {
return x2 * -6.0;
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
code = x2 * (-6.0d0)
end function
public static double code(double x1, double x2) {
return x2 * -6.0;
}
def code(x1, x2): return x2 * -6.0
function code(x1, x2) return Float64(x2 * -6.0) end
function tmp = code(x1, x2) tmp = x2 * -6.0; end
code[x1_, x2_] := N[(x2 * -6.0), $MachinePrecision]
\begin{array}{l}
\\
x2 \cdot -6
\end{array}
Initial program 71.9%
Simplified74.6%
Taylor expanded in x1 around 0
*-lowering-*.f6429.1%
Simplified29.1%
Final simplification29.1%
(FPCore (x1 x2) :precision binary64 x1)
double code(double x1, double x2) {
return x1;
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
code = x1
end function
public static double code(double x1, double x2) {
return x1;
}
def code(x1, x2): return x1
function code(x1, x2) return x1 end
function tmp = code(x1, x2) tmp = x1; end
code[x1_, x2_] := x1
\begin{array}{l}
\\
x1
\end{array}
Initial program 71.9%
Simplified74.6%
Taylor expanded in x1 around 0
*-lowering-*.f6428.9%
Simplified28.9%
Taylor expanded in x1 around inf
Simplified3.1%
herbie shell --seed 2024139
(FPCore (x1 x2)
:name "Rosa's FloatVsDoubleBenchmark"
:precision binary64
(+ x1 (+ (+ (+ (+ (* (+ (* (* (* 2.0 x1) (/ (- (+ (* (* 3.0 x1) x1) (* 2.0 x2)) x1) (+ (* x1 x1) 1.0))) (- (/ (- (+ (* (* 3.0 x1) x1) (* 2.0 x2)) x1) (+ (* x1 x1) 1.0)) 3.0)) (* (* x1 x1) (- (* 4.0 (/ (- (+ (* (* 3.0 x1) x1) (* 2.0 x2)) x1) (+ (* x1 x1) 1.0))) 6.0))) (+ (* x1 x1) 1.0)) (* (* (* 3.0 x1) x1) (/ (- (+ (* (* 3.0 x1) x1) (* 2.0 x2)) x1) (+ (* x1 x1) 1.0)))) (* (* x1 x1) x1)) x1) (* 3.0 (/ (- (- (* (* 3.0 x1) x1) (* 2.0 x2)) x1) (+ (* x1 x1) 1.0))))))