
(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 25 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 x1)))
(t_1 (+ (* x1 x1) 1.0))
(t_2 (* x1 (* x1 3.0)))
(t_3 (/ (- (+ t_2 (* 2.0 x2)) x1) t_1))
(t_4 (* t_2 t_3))
(t_5 (* (* x1 x1) (- (* t_3 4.0) 6.0)))
(t_6 (* (* x1 2.0) t_3))
(t_7 (* 3.0 (/ (- (- t_2 (* 2.0 x2)) x1) t_1))))
(if (<=
(+
x1
(+ (+ x1 (+ (+ (* (+ (* t_6 (- t_3 3.0)) t_5) t_1) t_4) t_0)) t_7))
INFINITY)
(+
x1
(+
t_7
(+
x1
(+
t_0
(+
t_4
(*
(+
t_5
(*
t_6
(-
(* (/ 1.0 t_1) (pow (/ 1.0 (+ t_2 (- (* 2.0 x2) x1))) -1.0))
3.0)))
t_1))))))
(*
x1
(+ 1.0 (* x1 (+ (+ -3.0 (* x1 (+ (* x1 6.0) -3.0))) (* x2 8.0))))))))
double code(double x1, double x2) {
double t_0 = x1 * (x1 * x1);
double t_1 = (x1 * x1) + 1.0;
double t_2 = x1 * (x1 * 3.0);
double t_3 = ((t_2 + (2.0 * x2)) - x1) / t_1;
double t_4 = t_2 * t_3;
double t_5 = (x1 * x1) * ((t_3 * 4.0) - 6.0);
double t_6 = (x1 * 2.0) * t_3;
double t_7 = 3.0 * (((t_2 - (2.0 * x2)) - x1) / t_1);
double tmp;
if ((x1 + ((x1 + (((((t_6 * (t_3 - 3.0)) + t_5) * t_1) + t_4) + t_0)) + t_7)) <= ((double) INFINITY)) {
tmp = x1 + (t_7 + (x1 + (t_0 + (t_4 + ((t_5 + (t_6 * (((1.0 / t_1) * pow((1.0 / (t_2 + ((2.0 * x2) - x1))), -1.0)) - 3.0))) * t_1)))));
} else {
tmp = x1 * (1.0 + (x1 * ((-3.0 + (x1 * ((x1 * 6.0) + -3.0))) + (x2 * 8.0))));
}
return tmp;
}
public static double code(double x1, double x2) {
double t_0 = x1 * (x1 * x1);
double t_1 = (x1 * x1) + 1.0;
double t_2 = x1 * (x1 * 3.0);
double t_3 = ((t_2 + (2.0 * x2)) - x1) / t_1;
double t_4 = t_2 * t_3;
double t_5 = (x1 * x1) * ((t_3 * 4.0) - 6.0);
double t_6 = (x1 * 2.0) * t_3;
double t_7 = 3.0 * (((t_2 - (2.0 * x2)) - x1) / t_1);
double tmp;
if ((x1 + ((x1 + (((((t_6 * (t_3 - 3.0)) + t_5) * t_1) + t_4) + t_0)) + t_7)) <= Double.POSITIVE_INFINITY) {
tmp = x1 + (t_7 + (x1 + (t_0 + (t_4 + ((t_5 + (t_6 * (((1.0 / t_1) * Math.pow((1.0 / (t_2 + ((2.0 * x2) - x1))), -1.0)) - 3.0))) * t_1)))));
} else {
tmp = x1 * (1.0 + (x1 * ((-3.0 + (x1 * ((x1 * 6.0) + -3.0))) + (x2 * 8.0))));
}
return tmp;
}
def code(x1, x2): t_0 = x1 * (x1 * x1) t_1 = (x1 * x1) + 1.0 t_2 = x1 * (x1 * 3.0) t_3 = ((t_2 + (2.0 * x2)) - x1) / t_1 t_4 = t_2 * t_3 t_5 = (x1 * x1) * ((t_3 * 4.0) - 6.0) t_6 = (x1 * 2.0) * t_3 t_7 = 3.0 * (((t_2 - (2.0 * x2)) - x1) / t_1) tmp = 0 if (x1 + ((x1 + (((((t_6 * (t_3 - 3.0)) + t_5) * t_1) + t_4) + t_0)) + t_7)) <= math.inf: tmp = x1 + (t_7 + (x1 + (t_0 + (t_4 + ((t_5 + (t_6 * (((1.0 / t_1) * math.pow((1.0 / (t_2 + ((2.0 * x2) - x1))), -1.0)) - 3.0))) * t_1))))) else: tmp = x1 * (1.0 + (x1 * ((-3.0 + (x1 * ((x1 * 6.0) + -3.0))) + (x2 * 8.0)))) return tmp
function code(x1, x2) t_0 = Float64(x1 * Float64(x1 * x1)) t_1 = Float64(Float64(x1 * x1) + 1.0) t_2 = Float64(x1 * Float64(x1 * 3.0)) t_3 = Float64(Float64(Float64(t_2 + Float64(2.0 * x2)) - x1) / t_1) t_4 = Float64(t_2 * t_3) t_5 = Float64(Float64(x1 * x1) * Float64(Float64(t_3 * 4.0) - 6.0)) t_6 = Float64(Float64(x1 * 2.0) * t_3) t_7 = Float64(3.0 * Float64(Float64(Float64(t_2 - Float64(2.0 * x2)) - x1) / t_1)) tmp = 0.0 if (Float64(x1 + Float64(Float64(x1 + Float64(Float64(Float64(Float64(Float64(t_6 * Float64(t_3 - 3.0)) + t_5) * t_1) + t_4) + t_0)) + t_7)) <= Inf) tmp = Float64(x1 + Float64(t_7 + Float64(x1 + Float64(t_0 + Float64(t_4 + Float64(Float64(t_5 + Float64(t_6 * Float64(Float64(Float64(1.0 / t_1) * (Float64(1.0 / Float64(t_2 + Float64(Float64(2.0 * x2) - x1))) ^ -1.0)) - 3.0))) * t_1)))))); else tmp = Float64(x1 * Float64(1.0 + Float64(x1 * Float64(Float64(-3.0 + Float64(x1 * Float64(Float64(x1 * 6.0) + -3.0))) + Float64(x2 * 8.0))))); end return tmp end
function tmp_2 = code(x1, x2) t_0 = x1 * (x1 * x1); t_1 = (x1 * x1) + 1.0; t_2 = x1 * (x1 * 3.0); t_3 = ((t_2 + (2.0 * x2)) - x1) / t_1; t_4 = t_2 * t_3; t_5 = (x1 * x1) * ((t_3 * 4.0) - 6.0); t_6 = (x1 * 2.0) * t_3; t_7 = 3.0 * (((t_2 - (2.0 * x2)) - x1) / t_1); tmp = 0.0; if ((x1 + ((x1 + (((((t_6 * (t_3 - 3.0)) + t_5) * t_1) + t_4) + t_0)) + t_7)) <= Inf) tmp = x1 + (t_7 + (x1 + (t_0 + (t_4 + ((t_5 + (t_6 * (((1.0 / t_1) * ((1.0 / (t_2 + ((2.0 * x2) - x1))) ^ -1.0)) - 3.0))) * t_1))))); else tmp = x1 * (1.0 + (x1 * ((-3.0 + (x1 * ((x1 * 6.0) + -3.0))) + (x2 * 8.0)))); end tmp_2 = tmp; end
code[x1_, x2_] := Block[{t$95$0 = N[(x1 * N[(x1 * x1), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(N[(x1 * x1), $MachinePrecision] + 1.0), $MachinePrecision]}, Block[{t$95$2 = N[(x1 * N[(x1 * 3.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[(N[(t$95$2 + N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$1), $MachinePrecision]}, Block[{t$95$4 = N[(t$95$2 * t$95$3), $MachinePrecision]}, Block[{t$95$5 = N[(N[(x1 * x1), $MachinePrecision] * N[(N[(t$95$3 * 4.0), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$6 = N[(N[(x1 * 2.0), $MachinePrecision] * t$95$3), $MachinePrecision]}, Block[{t$95$7 = N[(3.0 * N[(N[(N[(t$95$2 - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$1), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(x1 + N[(N[(x1 + N[(N[(N[(N[(N[(t$95$6 * N[(t$95$3 - 3.0), $MachinePrecision]), $MachinePrecision] + t$95$5), $MachinePrecision] * t$95$1), $MachinePrecision] + t$95$4), $MachinePrecision] + t$95$0), $MachinePrecision]), $MachinePrecision] + t$95$7), $MachinePrecision]), $MachinePrecision], Infinity], N[(x1 + N[(t$95$7 + N[(x1 + N[(t$95$0 + N[(t$95$4 + N[(N[(t$95$5 + N[(t$95$6 * N[(N[(N[(1.0 / t$95$1), $MachinePrecision] * N[Power[N[(1.0 / N[(t$95$2 + N[(N[(2.0 * x2), $MachinePrecision] - x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], -1.0], $MachinePrecision]), $MachinePrecision] - 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x1 * N[(1.0 + N[(x1 * N[(N[(-3.0 + N[(x1 * N[(N[(x1 * 6.0), $MachinePrecision] + -3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(x2 * 8.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x1 \cdot \left(x1 \cdot x1\right)\\
t_1 := x1 \cdot x1 + 1\\
t_2 := x1 \cdot \left(x1 \cdot 3\right)\\
t_3 := \frac{\left(t\_2 + 2 \cdot x2\right) - x1}{t\_1}\\
t_4 := t\_2 \cdot t\_3\\
t_5 := \left(x1 \cdot x1\right) \cdot \left(t\_3 \cdot 4 - 6\right)\\
t_6 := \left(x1 \cdot 2\right) \cdot t\_3\\
t_7 := 3 \cdot \frac{\left(t\_2 - 2 \cdot x2\right) - x1}{t\_1}\\
\mathbf{if}\;x1 + \left(\left(x1 + \left(\left(\left(t\_6 \cdot \left(t\_3 - 3\right) + t\_5\right) \cdot t\_1 + t\_4\right) + t\_0\right)\right) + t\_7\right) \leq \infty:\\
\;\;\;\;x1 + \left(t\_7 + \left(x1 + \left(t\_0 + \left(t\_4 + \left(t\_5 + t\_6 \cdot \left(\frac{1}{t\_1} \cdot {\left(\frac{1}{t\_2 + \left(2 \cdot x2 - x1\right)}\right)}^{-1} - 3\right)\right) \cdot t\_1\right)\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x1 \cdot \left(1 + x1 \cdot \left(\left(-3 + x1 \cdot \left(x1 \cdot 6 + -3\right)\right) + x2 \cdot 8\right)\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%
clear-numN/A
inv-powN/A
div-invN/A
unpow-prod-downN/A
inv-powN/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
pow-lowering-pow.f64N/A
Applied egg-rr99.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%
Taylor expanded in x1 around -inf
*-lowering-*.f64N/A
pow-lowering-pow.f64N/A
mul-1-negN/A
unsub-negN/A
--lowering--.f64N/A
/-lowering-/.f64N/A
Simplified98.6%
+-commutativeN/A
+-lowering-+.f64N/A
Applied egg-rr98.6%
Taylor expanded in x1 around 0
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
associate--l+N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
sub-negN/A
metadata-evalN/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
sub-negN/A
metadata-evalN/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f6498.6%
Simplified98.6%
Final simplification99.3%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (* x1 (* x1 3.0)))
(t_1 (+ (* x1 x1) 1.0))
(t_2 (/ (- (+ t_0 (* 2.0 x2)) x1) t_1))
(t_3
(+
x1
(+
(+
x1
(+
(+
(*
(+
(* (* (* x1 2.0) t_2) (- t_2 3.0))
(* (* x1 x1) (- (* t_2 4.0) 6.0)))
t_1)
(* t_0 t_2))
(* x1 (* x1 x1))))
(* 3.0 (/ (- (- t_0 (* 2.0 x2)) x1) t_1))))))
(if (<= t_3 INFINITY)
t_3
(*
x1
(+ 1.0 (* x1 (+ (+ -3.0 (* x1 (+ (* x1 6.0) -3.0))) (* x2 8.0))))))))
double code(double x1, double x2) {
double t_0 = x1 * (x1 * 3.0);
double t_1 = (x1 * x1) + 1.0;
double t_2 = ((t_0 + (2.0 * x2)) - x1) / t_1;
double t_3 = x1 + ((x1 + (((((((x1 * 2.0) * t_2) * (t_2 - 3.0)) + ((x1 * x1) * ((t_2 * 4.0) - 6.0))) * t_1) + (t_0 * t_2)) + (x1 * (x1 * x1)))) + (3.0 * (((t_0 - (2.0 * x2)) - x1) / t_1)));
double tmp;
if (t_3 <= ((double) INFINITY)) {
tmp = t_3;
} else {
tmp = x1 * (1.0 + (x1 * ((-3.0 + (x1 * ((x1 * 6.0) + -3.0))) + (x2 * 8.0))));
}
return tmp;
}
public static double code(double x1, double x2) {
double t_0 = x1 * (x1 * 3.0);
double t_1 = (x1 * x1) + 1.0;
double t_2 = ((t_0 + (2.0 * x2)) - x1) / t_1;
double t_3 = x1 + ((x1 + (((((((x1 * 2.0) * t_2) * (t_2 - 3.0)) + ((x1 * x1) * ((t_2 * 4.0) - 6.0))) * t_1) + (t_0 * t_2)) + (x1 * (x1 * x1)))) + (3.0 * (((t_0 - (2.0 * x2)) - x1) / t_1)));
double tmp;
if (t_3 <= Double.POSITIVE_INFINITY) {
tmp = t_3;
} else {
tmp = x1 * (1.0 + (x1 * ((-3.0 + (x1 * ((x1 * 6.0) + -3.0))) + (x2 * 8.0))));
}
return tmp;
}
def code(x1, x2): t_0 = x1 * (x1 * 3.0) t_1 = (x1 * x1) + 1.0 t_2 = ((t_0 + (2.0 * x2)) - x1) / t_1 t_3 = x1 + ((x1 + (((((((x1 * 2.0) * t_2) * (t_2 - 3.0)) + ((x1 * x1) * ((t_2 * 4.0) - 6.0))) * t_1) + (t_0 * t_2)) + (x1 * (x1 * x1)))) + (3.0 * (((t_0 - (2.0 * x2)) - x1) / t_1))) tmp = 0 if t_3 <= math.inf: tmp = t_3 else: tmp = x1 * (1.0 + (x1 * ((-3.0 + (x1 * ((x1 * 6.0) + -3.0))) + (x2 * 8.0)))) return tmp
function code(x1, x2) t_0 = Float64(x1 * Float64(x1 * 3.0)) t_1 = Float64(Float64(x1 * x1) + 1.0) t_2 = Float64(Float64(Float64(t_0 + Float64(2.0 * x2)) - x1) / t_1) t_3 = Float64(x1 + Float64(Float64(x1 + Float64(Float64(Float64(Float64(Float64(Float64(Float64(x1 * 2.0) * t_2) * Float64(t_2 - 3.0)) + Float64(Float64(x1 * x1) * Float64(Float64(t_2 * 4.0) - 6.0))) * t_1) + Float64(t_0 * t_2)) + Float64(x1 * Float64(x1 * x1)))) + Float64(3.0 * Float64(Float64(Float64(t_0 - Float64(2.0 * x2)) - x1) / t_1)))) tmp = 0.0 if (t_3 <= Inf) tmp = t_3; else tmp = Float64(x1 * Float64(1.0 + Float64(x1 * Float64(Float64(-3.0 + Float64(x1 * Float64(Float64(x1 * 6.0) + -3.0))) + Float64(x2 * 8.0))))); end return tmp end
function tmp_2 = code(x1, x2) t_0 = x1 * (x1 * 3.0); t_1 = (x1 * x1) + 1.0; t_2 = ((t_0 + (2.0 * x2)) - x1) / t_1; t_3 = x1 + ((x1 + (((((((x1 * 2.0) * t_2) * (t_2 - 3.0)) + ((x1 * x1) * ((t_2 * 4.0) - 6.0))) * t_1) + (t_0 * t_2)) + (x1 * (x1 * x1)))) + (3.0 * (((t_0 - (2.0 * x2)) - x1) / t_1))); tmp = 0.0; if (t_3 <= Inf) tmp = t_3; else tmp = x1 * (1.0 + (x1 * ((-3.0 + (x1 * ((x1 * 6.0) + -3.0))) + (x2 * 8.0)))); end tmp_2 = tmp; end
code[x1_, x2_] := Block[{t$95$0 = N[(x1 * N[(x1 * 3.0), $MachinePrecision]), $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]}, Block[{t$95$3 = N[(x1 + N[(N[(x1 + N[(N[(N[(N[(N[(N[(N[(x1 * 2.0), $MachinePrecision] * t$95$2), $MachinePrecision] * N[(t$95$2 - 3.0), $MachinePrecision]), $MachinePrecision] + N[(N[(x1 * x1), $MachinePrecision] * N[(N[(t$95$2 * 4.0), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * t$95$1), $MachinePrecision] + N[(t$95$0 * t$95$2), $MachinePrecision]), $MachinePrecision] + N[(x1 * N[(x1 * x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $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]}, If[LessEqual[t$95$3, Infinity], t$95$3, N[(x1 * N[(1.0 + N[(x1 * N[(N[(-3.0 + N[(x1 * N[(N[(x1 * 6.0), $MachinePrecision] + -3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(x2 * 8.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x1 \cdot \left(x1 \cdot 3\right)\\
t_1 := x1 \cdot x1 + 1\\
t_2 := \frac{\left(t\_0 + 2 \cdot x2\right) - x1}{t\_1}\\
t_3 := x1 + \left(\left(x1 + \left(\left(\left(\left(\left(x1 \cdot 2\right) \cdot t\_2\right) \cdot \left(t\_2 - 3\right) + \left(x1 \cdot x1\right) \cdot \left(t\_2 \cdot 4 - 6\right)\right) \cdot t\_1 + t\_0 \cdot t\_2\right) + x1 \cdot \left(x1 \cdot x1\right)\right)\right) + 3 \cdot \frac{\left(t\_0 - 2 \cdot x2\right) - x1}{t\_1}\right)\\
\mathbf{if}\;t\_3 \leq \infty:\\
\;\;\;\;t\_3\\
\mathbf{else}:\\
\;\;\;\;x1 \cdot \left(1 + x1 \cdot \left(\left(-3 + x1 \cdot \left(x1 \cdot 6 + -3\right)\right) + x2 \cdot 8\right)\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%
Taylor expanded in x1 around -inf
*-lowering-*.f64N/A
pow-lowering-pow.f64N/A
mul-1-negN/A
unsub-negN/A
--lowering--.f64N/A
/-lowering-/.f64N/A
Simplified98.6%
+-commutativeN/A
+-lowering-+.f64N/A
Applied egg-rr98.6%
Taylor expanded in x1 around 0
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
associate--l+N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
sub-negN/A
metadata-evalN/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
sub-negN/A
metadata-evalN/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f6498.6%
Simplified98.6%
Final simplification99.3%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (+ (* x1 x1) 1.0))
(t_1 (* x1 (* x1 x1)))
(t_2 (* x1 (* x1 3.0)))
(t_3 (/ (- (+ t_2 (* 2.0 x2)) x1) t_0)))
(if (<= x1 -5e+102)
(* 6.0 (* (* x1 x1) (* x1 x1)))
(if (<= x1 1400000000000.0)
(+
x1
(+
(* 3.0 (/ (- (- t_2 (* 2.0 x2)) x1) t_0))
(+
x1
(+
t_1
(+
(*
(+
(* (* (* x1 2.0) t_3) (- t_3 3.0))
(* (* x1 x1) (- (* t_3 4.0) 6.0)))
t_0)
(* 3.0 t_2))))))
(+
x1
(* (+ 6.0 (/ (+ -3.0 (/ (+ -3.0 (* x2 8.0)) x1)) x1)) (* x1 t_1)))))))
double code(double x1, double x2) {
double t_0 = (x1 * x1) + 1.0;
double t_1 = x1 * (x1 * x1);
double t_2 = x1 * (x1 * 3.0);
double t_3 = ((t_2 + (2.0 * x2)) - x1) / t_0;
double tmp;
if (x1 <= -5e+102) {
tmp = 6.0 * ((x1 * x1) * (x1 * x1));
} else if (x1 <= 1400000000000.0) {
tmp = x1 + ((3.0 * (((t_2 - (2.0 * x2)) - x1) / t_0)) + (x1 + (t_1 + ((((((x1 * 2.0) * t_3) * (t_3 - 3.0)) + ((x1 * x1) * ((t_3 * 4.0) - 6.0))) * t_0) + (3.0 * t_2)))));
} else {
tmp = x1 + ((6.0 + ((-3.0 + ((-3.0 + (x2 * 8.0)) / x1)) / x1)) * (x1 * t_1));
}
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) + 1.0d0
t_1 = x1 * (x1 * x1)
t_2 = x1 * (x1 * 3.0d0)
t_3 = ((t_2 + (2.0d0 * x2)) - x1) / t_0
if (x1 <= (-5d+102)) then
tmp = 6.0d0 * ((x1 * x1) * (x1 * x1))
else if (x1 <= 1400000000000.0d0) then
tmp = x1 + ((3.0d0 * (((t_2 - (2.0d0 * x2)) - x1) / t_0)) + (x1 + (t_1 + ((((((x1 * 2.0d0) * t_3) * (t_3 - 3.0d0)) + ((x1 * x1) * ((t_3 * 4.0d0) - 6.0d0))) * t_0) + (3.0d0 * t_2)))))
else
tmp = x1 + ((6.0d0 + (((-3.0d0) + (((-3.0d0) + (x2 * 8.0d0)) / x1)) / x1)) * (x1 * t_1))
end if
code = tmp
end function
public static double code(double x1, double x2) {
double t_0 = (x1 * x1) + 1.0;
double t_1 = x1 * (x1 * x1);
double t_2 = x1 * (x1 * 3.0);
double t_3 = ((t_2 + (2.0 * x2)) - x1) / t_0;
double tmp;
if (x1 <= -5e+102) {
tmp = 6.0 * ((x1 * x1) * (x1 * x1));
} else if (x1 <= 1400000000000.0) {
tmp = x1 + ((3.0 * (((t_2 - (2.0 * x2)) - x1) / t_0)) + (x1 + (t_1 + ((((((x1 * 2.0) * t_3) * (t_3 - 3.0)) + ((x1 * x1) * ((t_3 * 4.0) - 6.0))) * t_0) + (3.0 * t_2)))));
} else {
tmp = x1 + ((6.0 + ((-3.0 + ((-3.0 + (x2 * 8.0)) / x1)) / x1)) * (x1 * t_1));
}
return tmp;
}
def code(x1, x2): t_0 = (x1 * x1) + 1.0 t_1 = x1 * (x1 * x1) t_2 = x1 * (x1 * 3.0) t_3 = ((t_2 + (2.0 * x2)) - x1) / t_0 tmp = 0 if x1 <= -5e+102: tmp = 6.0 * ((x1 * x1) * (x1 * x1)) elif x1 <= 1400000000000.0: tmp = x1 + ((3.0 * (((t_2 - (2.0 * x2)) - x1) / t_0)) + (x1 + (t_1 + ((((((x1 * 2.0) * t_3) * (t_3 - 3.0)) + ((x1 * x1) * ((t_3 * 4.0) - 6.0))) * t_0) + (3.0 * t_2))))) else: tmp = x1 + ((6.0 + ((-3.0 + ((-3.0 + (x2 * 8.0)) / x1)) / x1)) * (x1 * t_1)) return tmp
function code(x1, x2) t_0 = Float64(Float64(x1 * x1) + 1.0) t_1 = Float64(x1 * Float64(x1 * x1)) t_2 = Float64(x1 * Float64(x1 * 3.0)) t_3 = Float64(Float64(Float64(t_2 + Float64(2.0 * x2)) - x1) / t_0) tmp = 0.0 if (x1 <= -5e+102) tmp = Float64(6.0 * Float64(Float64(x1 * x1) * Float64(x1 * x1))); elseif (x1 <= 1400000000000.0) tmp = Float64(x1 + Float64(Float64(3.0 * Float64(Float64(Float64(t_2 - Float64(2.0 * x2)) - x1) / t_0)) + Float64(x1 + Float64(t_1 + Float64(Float64(Float64(Float64(Float64(Float64(x1 * 2.0) * t_3) * Float64(t_3 - 3.0)) + Float64(Float64(x1 * x1) * Float64(Float64(t_3 * 4.0) - 6.0))) * t_0) + Float64(3.0 * t_2)))))); else tmp = Float64(x1 + Float64(Float64(6.0 + Float64(Float64(-3.0 + Float64(Float64(-3.0 + Float64(x2 * 8.0)) / x1)) / x1)) * Float64(x1 * t_1))); end return tmp end
function tmp_2 = code(x1, x2) t_0 = (x1 * x1) + 1.0; t_1 = x1 * (x1 * x1); t_2 = x1 * (x1 * 3.0); t_3 = ((t_2 + (2.0 * x2)) - x1) / t_0; tmp = 0.0; if (x1 <= -5e+102) tmp = 6.0 * ((x1 * x1) * (x1 * x1)); elseif (x1 <= 1400000000000.0) tmp = x1 + ((3.0 * (((t_2 - (2.0 * x2)) - x1) / t_0)) + (x1 + (t_1 + ((((((x1 * 2.0) * t_3) * (t_3 - 3.0)) + ((x1 * x1) * ((t_3 * 4.0) - 6.0))) * t_0) + (3.0 * t_2))))); else tmp = x1 + ((6.0 + ((-3.0 + ((-3.0 + (x2 * 8.0)) / x1)) / x1)) * (x1 * t_1)); 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 * x1), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x1 * N[(x1 * 3.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[(N[(t$95$2 + N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$0), $MachinePrecision]}, If[LessEqual[x1, -5e+102], N[(6.0 * N[(N[(x1 * x1), $MachinePrecision] * N[(x1 * x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 1400000000000.0], N[(x1 + N[(N[(3.0 * N[(N[(N[(t$95$2 - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$0), $MachinePrecision]), $MachinePrecision] + N[(x1 + N[(t$95$1 + N[(N[(N[(N[(N[(N[(x1 * 2.0), $MachinePrecision] * t$95$3), $MachinePrecision] * N[(t$95$3 - 3.0), $MachinePrecision]), $MachinePrecision] + N[(N[(x1 * x1), $MachinePrecision] * N[(N[(t$95$3 * 4.0), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * t$95$0), $MachinePrecision] + N[(3.0 * t$95$2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x1 + N[(N[(6.0 + N[(N[(-3.0 + N[(N[(-3.0 + N[(x2 * 8.0), $MachinePrecision]), $MachinePrecision] / x1), $MachinePrecision]), $MachinePrecision] / x1), $MachinePrecision]), $MachinePrecision] * N[(x1 * t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x1 \cdot x1 + 1\\
t_1 := x1 \cdot \left(x1 \cdot x1\right)\\
t_2 := x1 \cdot \left(x1 \cdot 3\right)\\
t_3 := \frac{\left(t\_2 + 2 \cdot x2\right) - x1}{t\_0}\\
\mathbf{if}\;x1 \leq -5 \cdot 10^{+102}:\\
\;\;\;\;6 \cdot \left(\left(x1 \cdot x1\right) \cdot \left(x1 \cdot x1\right)\right)\\
\mathbf{elif}\;x1 \leq 1400000000000:\\
\;\;\;\;x1 + \left(3 \cdot \frac{\left(t\_2 - 2 \cdot x2\right) - x1}{t\_0} + \left(x1 + \left(t\_1 + \left(\left(\left(\left(x1 \cdot 2\right) \cdot t\_3\right) \cdot \left(t\_3 - 3\right) + \left(x1 \cdot x1\right) \cdot \left(t\_3 \cdot 4 - 6\right)\right) \cdot t\_0 + 3 \cdot t\_2\right)\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x1 + \left(6 + \frac{-3 + \frac{-3 + x2 \cdot 8}{x1}}{x1}\right) \cdot \left(x1 \cdot t\_1\right)\\
\end{array}
\end{array}
if x1 < -5e102Initial program 0.0%
clear-numN/A
inv-powN/A
div-invN/A
unpow-prod-downN/A
inv-powN/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
pow-lowering-pow.f64N/A
Applied egg-rr0.0%
Applied egg-rr0.0%
Taylor expanded in x1 around inf
Simplified0.0%
Taylor expanded in x1 around inf
*-lowering-*.f64N/A
metadata-evalN/A
pow-sqrN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64100.0%
Simplified100.0%
if -5e102 < x1 < 1.4e12Initial program 99.5%
Taylor expanded in x1 around inf
Simplified98.1%
if 1.4e12 < x1 Initial program 43.1%
Taylor expanded in x1 around -inf
*-lowering-*.f64N/A
pow-lowering-pow.f64N/A
mul-1-negN/A
unsub-negN/A
--lowering--.f64N/A
/-lowering-/.f64N/A
Simplified97.7%
+-commutativeN/A
+-lowering-+.f64N/A
Applied egg-rr97.7%
Final simplification98.4%
(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))))
(if (<= x1 -3e+102)
(* 6.0 (* (* x1 x1) (* x1 x1)))
(if (<= x1 3.05e+65)
(+
x1
(+
(+
(/ 3.0 (/ t_0 (+ t_1 (- (* x2 -2.0) x1))))
(+
(*
t_0
(+
(* (/ (* x1 2.0) (/ t_0 t_2)) (+ -3.0 (/ t_2 t_0)))
(* (* x1 x1) (+ (/ 4.0 0.3333333333333333) -6.0))))
(/ t_1 0.3333333333333333)))
(* x1 t_0)))
(*
x1
(+ 1.0 (* x1 (+ (+ -3.0 (* x1 (+ (* x1 6.0) -3.0))) (* x2 8.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 tmp;
if (x1 <= -3e+102) {
tmp = 6.0 * ((x1 * x1) * (x1 * x1));
} else if (x1 <= 3.05e+65) {
tmp = x1 + (((3.0 / (t_0 / (t_1 + ((x2 * -2.0) - x1)))) + ((t_0 * ((((x1 * 2.0) / (t_0 / t_2)) * (-3.0 + (t_2 / t_0))) + ((x1 * x1) * ((4.0 / 0.3333333333333333) + -6.0)))) + (t_1 / 0.3333333333333333))) + (x1 * t_0));
} else {
tmp = x1 * (1.0 + (x1 * ((-3.0 + (x1 * ((x1 * 6.0) + -3.0))) + (x2 * 8.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) :: t_2
real(8) :: tmp
t_0 = (x1 * x1) + 1.0d0
t_1 = x1 * (x1 * 3.0d0)
t_2 = t_1 + ((2.0d0 * x2) - x1)
if (x1 <= (-3d+102)) then
tmp = 6.0d0 * ((x1 * x1) * (x1 * x1))
else if (x1 <= 3.05d+65) then
tmp = x1 + (((3.0d0 / (t_0 / (t_1 + ((x2 * (-2.0d0)) - x1)))) + ((t_0 * ((((x1 * 2.0d0) / (t_0 / t_2)) * ((-3.0d0) + (t_2 / t_0))) + ((x1 * x1) * ((4.0d0 / 0.3333333333333333d0) + (-6.0d0))))) + (t_1 / 0.3333333333333333d0))) + (x1 * t_0))
else
tmp = x1 * (1.0d0 + (x1 * (((-3.0d0) + (x1 * ((x1 * 6.0d0) + (-3.0d0)))) + (x2 * 8.0d0))))
end if
code = tmp
end function
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 tmp;
if (x1 <= -3e+102) {
tmp = 6.0 * ((x1 * x1) * (x1 * x1));
} else if (x1 <= 3.05e+65) {
tmp = x1 + (((3.0 / (t_0 / (t_1 + ((x2 * -2.0) - x1)))) + ((t_0 * ((((x1 * 2.0) / (t_0 / t_2)) * (-3.0 + (t_2 / t_0))) + ((x1 * x1) * ((4.0 / 0.3333333333333333) + -6.0)))) + (t_1 / 0.3333333333333333))) + (x1 * t_0));
} else {
tmp = x1 * (1.0 + (x1 * ((-3.0 + (x1 * ((x1 * 6.0) + -3.0))) + (x2 * 8.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) tmp = 0 if x1 <= -3e+102: tmp = 6.0 * ((x1 * x1) * (x1 * x1)) elif x1 <= 3.05e+65: tmp = x1 + (((3.0 / (t_0 / (t_1 + ((x2 * -2.0) - x1)))) + ((t_0 * ((((x1 * 2.0) / (t_0 / t_2)) * (-3.0 + (t_2 / t_0))) + ((x1 * x1) * ((4.0 / 0.3333333333333333) + -6.0)))) + (t_1 / 0.3333333333333333))) + (x1 * t_0)) else: tmp = x1 * (1.0 + (x1 * ((-3.0 + (x1 * ((x1 * 6.0) + -3.0))) + (x2 * 8.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(t_1 + Float64(Float64(2.0 * x2) - x1)) tmp = 0.0 if (x1 <= -3e+102) tmp = Float64(6.0 * Float64(Float64(x1 * x1) * Float64(x1 * x1))); elseif (x1 <= 3.05e+65) tmp = Float64(x1 + Float64(Float64(Float64(3.0 / Float64(t_0 / Float64(t_1 + Float64(Float64(x2 * -2.0) - x1)))) + Float64(Float64(t_0 * Float64(Float64(Float64(Float64(x1 * 2.0) / Float64(t_0 / t_2)) * Float64(-3.0 + Float64(t_2 / t_0))) + Float64(Float64(x1 * x1) * Float64(Float64(4.0 / 0.3333333333333333) + -6.0)))) + Float64(t_1 / 0.3333333333333333))) + Float64(x1 * t_0))); else tmp = Float64(x1 * Float64(1.0 + Float64(x1 * Float64(Float64(-3.0 + Float64(x1 * Float64(Float64(x1 * 6.0) + -3.0))) + Float64(x2 * 8.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); tmp = 0.0; if (x1 <= -3e+102) tmp = 6.0 * ((x1 * x1) * (x1 * x1)); elseif (x1 <= 3.05e+65) tmp = x1 + (((3.0 / (t_0 / (t_1 + ((x2 * -2.0) - x1)))) + ((t_0 * ((((x1 * 2.0) / (t_0 / t_2)) * (-3.0 + (t_2 / t_0))) + ((x1 * x1) * ((4.0 / 0.3333333333333333) + -6.0)))) + (t_1 / 0.3333333333333333))) + (x1 * t_0)); else tmp = x1 * (1.0 + (x1 * ((-3.0 + (x1 * ((x1 * 6.0) + -3.0))) + (x2 * 8.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[(t$95$1 + N[(N[(2.0 * x2), $MachinePrecision] - x1), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x1, -3e+102], N[(6.0 * N[(N[(x1 * x1), $MachinePrecision] * N[(x1 * x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 3.05e+65], N[(x1 + N[(N[(N[(3.0 / N[(t$95$0 / N[(t$95$1 + N[(N[(x2 * -2.0), $MachinePrecision] - x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(t$95$0 * N[(N[(N[(N[(x1 * 2.0), $MachinePrecision] / N[(t$95$0 / t$95$2), $MachinePrecision]), $MachinePrecision] * N[(-3.0 + N[(t$95$2 / t$95$0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(x1 * x1), $MachinePrecision] * N[(N[(4.0 / 0.3333333333333333), $MachinePrecision] + -6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(t$95$1 / 0.3333333333333333), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(x1 * t$95$0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x1 * N[(1.0 + N[(x1 * N[(N[(-3.0 + N[(x1 * N[(N[(x1 * 6.0), $MachinePrecision] + -3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(x2 * 8.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $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 := t\_1 + \left(2 \cdot x2 - x1\right)\\
\mathbf{if}\;x1 \leq -3 \cdot 10^{+102}:\\
\;\;\;\;6 \cdot \left(\left(x1 \cdot x1\right) \cdot \left(x1 \cdot x1\right)\right)\\
\mathbf{elif}\;x1 \leq 3.05 \cdot 10^{+65}:\\
\;\;\;\;x1 + \left(\left(\frac{3}{\frac{t\_0}{t\_1 + \left(x2 \cdot -2 - x1\right)}} + \left(t\_0 \cdot \left(\frac{x1 \cdot 2}{\frac{t\_0}{t\_2}} \cdot \left(-3 + \frac{t\_2}{t\_0}\right) + \left(x1 \cdot x1\right) \cdot \left(\frac{4}{0.3333333333333333} + -6\right)\right) + \frac{t\_1}{0.3333333333333333}\right)\right) + x1 \cdot t\_0\right)\\
\mathbf{else}:\\
\;\;\;\;x1 \cdot \left(1 + x1 \cdot \left(\left(-3 + x1 \cdot \left(x1 \cdot 6 + -3\right)\right) + x2 \cdot 8\right)\right)\\
\end{array}
\end{array}
if x1 < -2.9999999999999998e102Initial program 0.0%
clear-numN/A
inv-powN/A
div-invN/A
unpow-prod-downN/A
inv-powN/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
pow-lowering-pow.f64N/A
Applied egg-rr0.0%
Applied egg-rr0.0%
Taylor expanded in x1 around inf
Simplified0.0%
Taylor expanded in x1 around inf
*-lowering-*.f64N/A
metadata-evalN/A
pow-sqrN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64100.0%
Simplified100.0%
if -2.9999999999999998e102 < x1 < 3.04999999999999982e65Initial program 98.9%
clear-numN/A
inv-powN/A
div-invN/A
unpow-prod-downN/A
inv-powN/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
pow-lowering-pow.f64N/A
Applied egg-rr98.9%
Applied egg-rr98.8%
Taylor expanded in x1 around inf
Simplified97.5%
Taylor expanded in x1 around inf
Simplified95.8%
if 3.04999999999999982e65 < x1 Initial program 38.5%
Taylor expanded in x1 around -inf
*-lowering-*.f64N/A
pow-lowering-pow.f64N/A
mul-1-negN/A
unsub-negN/A
--lowering--.f64N/A
/-lowering-/.f64N/A
Simplified100.0%
+-commutativeN/A
+-lowering-+.f64N/A
Applied egg-rr100.0%
Taylor expanded in x1 around 0
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
associate--l+N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
sub-negN/A
metadata-evalN/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
sub-negN/A
metadata-evalN/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64100.0%
Simplified100.0%
Final simplification97.2%
(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_0 t_2))
(t_4 (* x1 (* x1 x1))))
(if (<= x1 -5e+102)
(* 6.0 (* (* x1 x1) (* x1 x1)))
(if (<= x1 -1050000000.0)
(+
x1
(+
(* x1 t_0)
(+
(/ 3.0 0.3333333333333333)
(+
(/ t_1 0.3333333333333333)
(*
t_0
(+
(* (/ (* x1 2.0) t_3) (+ -3.0 (/ t_2 t_0)))
(* (* x1 x1) (+ -6.0 (/ 4.0 t_3)))))))))
(if (<= x1 850000000000.0)
(+
x1
(+
(* 3.0 (/ (- (- t_1 (* 2.0 x2)) x1) t_0))
(+
x1
(+
t_4
(+
(* t_1 (/ (- (+ t_1 (* 2.0 x2)) x1) t_0))
(* t_0 (/ (/ (* x1 (* 8.0 (* x2 x2))) t_0) t_0)))))))
(+
x1
(*
(+ 6.0 (/ (+ -3.0 (/ (+ -3.0 (* x2 8.0)) x1)) x1))
(* x1 t_4))))))))
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_0 / t_2;
double t_4 = x1 * (x1 * x1);
double tmp;
if (x1 <= -5e+102) {
tmp = 6.0 * ((x1 * x1) * (x1 * x1));
} else if (x1 <= -1050000000.0) {
tmp = x1 + ((x1 * t_0) + ((3.0 / 0.3333333333333333) + ((t_1 / 0.3333333333333333) + (t_0 * ((((x1 * 2.0) / t_3) * (-3.0 + (t_2 / t_0))) + ((x1 * x1) * (-6.0 + (4.0 / t_3))))))));
} else if (x1 <= 850000000000.0) {
tmp = x1 + ((3.0 * (((t_1 - (2.0 * x2)) - x1) / t_0)) + (x1 + (t_4 + ((t_1 * (((t_1 + (2.0 * x2)) - x1) / t_0)) + (t_0 * (((x1 * (8.0 * (x2 * x2))) / t_0) / t_0))))));
} else {
tmp = x1 + ((6.0 + ((-3.0 + ((-3.0 + (x2 * 8.0)) / x1)) / x1)) * (x1 * t_4));
}
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) :: t_4
real(8) :: tmp
t_0 = (x1 * x1) + 1.0d0
t_1 = x1 * (x1 * 3.0d0)
t_2 = t_1 + ((2.0d0 * x2) - x1)
t_3 = t_0 / t_2
t_4 = x1 * (x1 * x1)
if (x1 <= (-5d+102)) then
tmp = 6.0d0 * ((x1 * x1) * (x1 * x1))
else if (x1 <= (-1050000000.0d0)) then
tmp = x1 + ((x1 * t_0) + ((3.0d0 / 0.3333333333333333d0) + ((t_1 / 0.3333333333333333d0) + (t_0 * ((((x1 * 2.0d0) / t_3) * ((-3.0d0) + (t_2 / t_0))) + ((x1 * x1) * ((-6.0d0) + (4.0d0 / t_3))))))))
else if (x1 <= 850000000000.0d0) then
tmp = x1 + ((3.0d0 * (((t_1 - (2.0d0 * x2)) - x1) / t_0)) + (x1 + (t_4 + ((t_1 * (((t_1 + (2.0d0 * x2)) - x1) / t_0)) + (t_0 * (((x1 * (8.0d0 * (x2 * x2))) / t_0) / t_0))))))
else
tmp = x1 + ((6.0d0 + (((-3.0d0) + (((-3.0d0) + (x2 * 8.0d0)) / x1)) / x1)) * (x1 * t_4))
end if
code = tmp
end function
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_0 / t_2;
double t_4 = x1 * (x1 * x1);
double tmp;
if (x1 <= -5e+102) {
tmp = 6.0 * ((x1 * x1) * (x1 * x1));
} else if (x1 <= -1050000000.0) {
tmp = x1 + ((x1 * t_0) + ((3.0 / 0.3333333333333333) + ((t_1 / 0.3333333333333333) + (t_0 * ((((x1 * 2.0) / t_3) * (-3.0 + (t_2 / t_0))) + ((x1 * x1) * (-6.0 + (4.0 / t_3))))))));
} else if (x1 <= 850000000000.0) {
tmp = x1 + ((3.0 * (((t_1 - (2.0 * x2)) - x1) / t_0)) + (x1 + (t_4 + ((t_1 * (((t_1 + (2.0 * x2)) - x1) / t_0)) + (t_0 * (((x1 * (8.0 * (x2 * x2))) / t_0) / t_0))))));
} else {
tmp = x1 + ((6.0 + ((-3.0 + ((-3.0 + (x2 * 8.0)) / x1)) / x1)) * (x1 * t_4));
}
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_0 / t_2 t_4 = x1 * (x1 * x1) tmp = 0 if x1 <= -5e+102: tmp = 6.0 * ((x1 * x1) * (x1 * x1)) elif x1 <= -1050000000.0: tmp = x1 + ((x1 * t_0) + ((3.0 / 0.3333333333333333) + ((t_1 / 0.3333333333333333) + (t_0 * ((((x1 * 2.0) / t_3) * (-3.0 + (t_2 / t_0))) + ((x1 * x1) * (-6.0 + (4.0 / t_3)))))))) elif x1 <= 850000000000.0: tmp = x1 + ((3.0 * (((t_1 - (2.0 * x2)) - x1) / t_0)) + (x1 + (t_4 + ((t_1 * (((t_1 + (2.0 * x2)) - x1) / t_0)) + (t_0 * (((x1 * (8.0 * (x2 * x2))) / t_0) / t_0)))))) else: tmp = x1 + ((6.0 + ((-3.0 + ((-3.0 + (x2 * 8.0)) / x1)) / x1)) * (x1 * t_4)) 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(t_1 + Float64(Float64(2.0 * x2) - x1)) t_3 = Float64(t_0 / t_2) t_4 = Float64(x1 * Float64(x1 * x1)) tmp = 0.0 if (x1 <= -5e+102) tmp = Float64(6.0 * Float64(Float64(x1 * x1) * Float64(x1 * x1))); elseif (x1 <= -1050000000.0) tmp = Float64(x1 + Float64(Float64(x1 * t_0) + Float64(Float64(3.0 / 0.3333333333333333) + Float64(Float64(t_1 / 0.3333333333333333) + Float64(t_0 * Float64(Float64(Float64(Float64(x1 * 2.0) / t_3) * Float64(-3.0 + Float64(t_2 / t_0))) + Float64(Float64(x1 * x1) * Float64(-6.0 + Float64(4.0 / t_3))))))))); elseif (x1 <= 850000000000.0) tmp = Float64(x1 + Float64(Float64(3.0 * Float64(Float64(Float64(t_1 - Float64(2.0 * x2)) - x1) / t_0)) + Float64(x1 + Float64(t_4 + Float64(Float64(t_1 * Float64(Float64(Float64(t_1 + Float64(2.0 * x2)) - x1) / t_0)) + Float64(t_0 * Float64(Float64(Float64(x1 * Float64(8.0 * Float64(x2 * x2))) / t_0) / t_0))))))); else tmp = Float64(x1 + Float64(Float64(6.0 + Float64(Float64(-3.0 + Float64(Float64(-3.0 + Float64(x2 * 8.0)) / x1)) / x1)) * Float64(x1 * t_4))); 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_0 / t_2; t_4 = x1 * (x1 * x1); tmp = 0.0; if (x1 <= -5e+102) tmp = 6.0 * ((x1 * x1) * (x1 * x1)); elseif (x1 <= -1050000000.0) tmp = x1 + ((x1 * t_0) + ((3.0 / 0.3333333333333333) + ((t_1 / 0.3333333333333333) + (t_0 * ((((x1 * 2.0) / t_3) * (-3.0 + (t_2 / t_0))) + ((x1 * x1) * (-6.0 + (4.0 / t_3)))))))); elseif (x1 <= 850000000000.0) tmp = x1 + ((3.0 * (((t_1 - (2.0 * x2)) - x1) / t_0)) + (x1 + (t_4 + ((t_1 * (((t_1 + (2.0 * x2)) - x1) / t_0)) + (t_0 * (((x1 * (8.0 * (x2 * x2))) / t_0) / t_0)))))); else tmp = x1 + ((6.0 + ((-3.0 + ((-3.0 + (x2 * 8.0)) / x1)) / x1)) * (x1 * t_4)); 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[(t$95$1 + N[(N[(2.0 * x2), $MachinePrecision] - x1), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(t$95$0 / t$95$2), $MachinePrecision]}, Block[{t$95$4 = N[(x1 * N[(x1 * x1), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x1, -5e+102], N[(6.0 * N[(N[(x1 * x1), $MachinePrecision] * N[(x1 * x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, -1050000000.0], N[(x1 + N[(N[(x1 * t$95$0), $MachinePrecision] + N[(N[(3.0 / 0.3333333333333333), $MachinePrecision] + N[(N[(t$95$1 / 0.3333333333333333), $MachinePrecision] + N[(t$95$0 * N[(N[(N[(N[(x1 * 2.0), $MachinePrecision] / t$95$3), $MachinePrecision] * N[(-3.0 + N[(t$95$2 / t$95$0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(x1 * x1), $MachinePrecision] * N[(-6.0 + N[(4.0 / t$95$3), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 850000000000.0], N[(x1 + N[(N[(3.0 * N[(N[(N[(t$95$1 - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$0), $MachinePrecision]), $MachinePrecision] + N[(x1 + N[(t$95$4 + N[(N[(t$95$1 * N[(N[(N[(t$95$1 + N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$0), $MachinePrecision]), $MachinePrecision] + N[(t$95$0 * N[(N[(N[(x1 * N[(8.0 * N[(x2 * x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / t$95$0), $MachinePrecision] / t$95$0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x1 + N[(N[(6.0 + N[(N[(-3.0 + N[(N[(-3.0 + N[(x2 * 8.0), $MachinePrecision]), $MachinePrecision] / x1), $MachinePrecision]), $MachinePrecision] / x1), $MachinePrecision]), $MachinePrecision] * N[(x1 * t$95$4), $MachinePrecision]), $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 := t\_1 + \left(2 \cdot x2 - x1\right)\\
t_3 := \frac{t\_0}{t\_2}\\
t_4 := x1 \cdot \left(x1 \cdot x1\right)\\
\mathbf{if}\;x1 \leq -5 \cdot 10^{+102}:\\
\;\;\;\;6 \cdot \left(\left(x1 \cdot x1\right) \cdot \left(x1 \cdot x1\right)\right)\\
\mathbf{elif}\;x1 \leq -1050000000:\\
\;\;\;\;x1 + \left(x1 \cdot t\_0 + \left(\frac{3}{0.3333333333333333} + \left(\frac{t\_1}{0.3333333333333333} + t\_0 \cdot \left(\frac{x1 \cdot 2}{t\_3} \cdot \left(-3 + \frac{t\_2}{t\_0}\right) + \left(x1 \cdot x1\right) \cdot \left(-6 + \frac{4}{t\_3}\right)\right)\right)\right)\right)\\
\mathbf{elif}\;x1 \leq 850000000000:\\
\;\;\;\;x1 + \left(3 \cdot \frac{\left(t\_1 - 2 \cdot x2\right) - x1}{t\_0} + \left(x1 + \left(t\_4 + \left(t\_1 \cdot \frac{\left(t\_1 + 2 \cdot x2\right) - x1}{t\_0} + t\_0 \cdot \frac{\frac{x1 \cdot \left(8 \cdot \left(x2 \cdot x2\right)\right)}{t\_0}}{t\_0}\right)\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x1 + \left(6 + \frac{-3 + \frac{-3 + x2 \cdot 8}{x1}}{x1}\right) \cdot \left(x1 \cdot t\_4\right)\\
\end{array}
\end{array}
if x1 < -5e102Initial program 0.0%
clear-numN/A
inv-powN/A
div-invN/A
unpow-prod-downN/A
inv-powN/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
pow-lowering-pow.f64N/A
Applied egg-rr0.0%
Applied egg-rr0.0%
Taylor expanded in x1 around inf
Simplified0.0%
Taylor expanded in x1 around inf
*-lowering-*.f64N/A
metadata-evalN/A
pow-sqrN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64100.0%
Simplified100.0%
if -5e102 < x1 < -1.05e9Initial program 99.5%
clear-numN/A
inv-powN/A
div-invN/A
unpow-prod-downN/A
inv-powN/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
pow-lowering-pow.f64N/A
Applied egg-rr99.5%
Applied egg-rr99.5%
Taylor expanded in x1 around inf
Simplified99.5%
Taylor expanded in x1 around inf
Simplified99.5%
if -1.05e9 < x1 < 8.5e11Initial program 99.5%
Taylor expanded in x2 around inf
associate-*r/N/A
unpow2N/A
associate-/r*N/A
associate-*r*N/A
associate-*l/N/A
associate-*r/N/A
/-lowering-/.f64N/A
Simplified87.3%
if 8.5e11 < x1 Initial program 43.1%
Taylor expanded in x1 around -inf
*-lowering-*.f64N/A
pow-lowering-pow.f64N/A
mul-1-negN/A
unsub-negN/A
--lowering--.f64N/A
/-lowering-/.f64N/A
Simplified97.7%
+-commutativeN/A
+-lowering-+.f64N/A
Applied egg-rr97.7%
Final simplification92.7%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (* x1 (* x1 3.0)))
(t_1 (+ (* x1 x1) 1.0))
(t_2 (* x1 (* x1 x1)))
(t_3 (* x1 t_2)))
(if (<= x1 -6200000000.0)
(+
x1
(*
t_3
(*
x2
(+
(/ 6.0 x2)
(-
(/ 8.0 (* x1 x1))
(+ (/ 3.0 (* x2 (* x1 x1))) (/ 3.0 (* x1 x2))))))))
(if (<= x1 950000000000.0)
(+
x1
(+
(* 3.0 (/ (- (- t_0 (* 2.0 x2)) x1) t_1))
(+
x1
(+
t_2
(+
(* t_0 (/ (- (+ t_0 (* 2.0 x2)) x1) t_1))
(* t_1 (/ (/ (* x1 (* 8.0 (* x2 x2))) t_1) t_1)))))))
(+ x1 (* (+ 6.0 (/ (+ -3.0 (/ (+ -3.0 (* x2 8.0)) x1)) x1)) t_3))))))
double code(double x1, double x2) {
double t_0 = x1 * (x1 * 3.0);
double t_1 = (x1 * x1) + 1.0;
double t_2 = x1 * (x1 * x1);
double t_3 = x1 * t_2;
double tmp;
if (x1 <= -6200000000.0) {
tmp = x1 + (t_3 * (x2 * ((6.0 / x2) + ((8.0 / (x1 * x1)) - ((3.0 / (x2 * (x1 * x1))) + (3.0 / (x1 * x2)))))));
} else if (x1 <= 950000000000.0) {
tmp = x1 + ((3.0 * (((t_0 - (2.0 * x2)) - x1) / t_1)) + (x1 + (t_2 + ((t_0 * (((t_0 + (2.0 * x2)) - x1) / t_1)) + (t_1 * (((x1 * (8.0 * (x2 * x2))) / t_1) / t_1))))));
} else {
tmp = x1 + ((6.0 + ((-3.0 + ((-3.0 + (x2 * 8.0)) / x1)) / x1)) * t_3);
}
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 * 3.0d0)
t_1 = (x1 * x1) + 1.0d0
t_2 = x1 * (x1 * x1)
t_3 = x1 * t_2
if (x1 <= (-6200000000.0d0)) then
tmp = x1 + (t_3 * (x2 * ((6.0d0 / x2) + ((8.0d0 / (x1 * x1)) - ((3.0d0 / (x2 * (x1 * x1))) + (3.0d0 / (x1 * x2)))))))
else if (x1 <= 950000000000.0d0) then
tmp = x1 + ((3.0d0 * (((t_0 - (2.0d0 * x2)) - x1) / t_1)) + (x1 + (t_2 + ((t_0 * (((t_0 + (2.0d0 * x2)) - x1) / t_1)) + (t_1 * (((x1 * (8.0d0 * (x2 * x2))) / t_1) / t_1))))))
else
tmp = x1 + ((6.0d0 + (((-3.0d0) + (((-3.0d0) + (x2 * 8.0d0)) / x1)) / x1)) * t_3)
end if
code = tmp
end function
public static double code(double x1, double x2) {
double t_0 = x1 * (x1 * 3.0);
double t_1 = (x1 * x1) + 1.0;
double t_2 = x1 * (x1 * x1);
double t_3 = x1 * t_2;
double tmp;
if (x1 <= -6200000000.0) {
tmp = x1 + (t_3 * (x2 * ((6.0 / x2) + ((8.0 / (x1 * x1)) - ((3.0 / (x2 * (x1 * x1))) + (3.0 / (x1 * x2)))))));
} else if (x1 <= 950000000000.0) {
tmp = x1 + ((3.0 * (((t_0 - (2.0 * x2)) - x1) / t_1)) + (x1 + (t_2 + ((t_0 * (((t_0 + (2.0 * x2)) - x1) / t_1)) + (t_1 * (((x1 * (8.0 * (x2 * x2))) / t_1) / t_1))))));
} else {
tmp = x1 + ((6.0 + ((-3.0 + ((-3.0 + (x2 * 8.0)) / x1)) / x1)) * t_3);
}
return tmp;
}
def code(x1, x2): t_0 = x1 * (x1 * 3.0) t_1 = (x1 * x1) + 1.0 t_2 = x1 * (x1 * x1) t_3 = x1 * t_2 tmp = 0 if x1 <= -6200000000.0: tmp = x1 + (t_3 * (x2 * ((6.0 / x2) + ((8.0 / (x1 * x1)) - ((3.0 / (x2 * (x1 * x1))) + (3.0 / (x1 * x2))))))) elif x1 <= 950000000000.0: tmp = x1 + ((3.0 * (((t_0 - (2.0 * x2)) - x1) / t_1)) + (x1 + (t_2 + ((t_0 * (((t_0 + (2.0 * x2)) - x1) / t_1)) + (t_1 * (((x1 * (8.0 * (x2 * x2))) / t_1) / t_1)))))) else: tmp = x1 + ((6.0 + ((-3.0 + ((-3.0 + (x2 * 8.0)) / x1)) / x1)) * t_3) return tmp
function code(x1, x2) t_0 = Float64(x1 * Float64(x1 * 3.0)) t_1 = Float64(Float64(x1 * x1) + 1.0) t_2 = Float64(x1 * Float64(x1 * x1)) t_3 = Float64(x1 * t_2) tmp = 0.0 if (x1 <= -6200000000.0) tmp = Float64(x1 + Float64(t_3 * Float64(x2 * Float64(Float64(6.0 / x2) + Float64(Float64(8.0 / Float64(x1 * x1)) - Float64(Float64(3.0 / Float64(x2 * Float64(x1 * x1))) + Float64(3.0 / Float64(x1 * x2)))))))); elseif (x1 <= 950000000000.0) tmp = Float64(x1 + Float64(Float64(3.0 * Float64(Float64(Float64(t_0 - Float64(2.0 * x2)) - x1) / t_1)) + Float64(x1 + Float64(t_2 + Float64(Float64(t_0 * Float64(Float64(Float64(t_0 + Float64(2.0 * x2)) - x1) / t_1)) + Float64(t_1 * Float64(Float64(Float64(x1 * Float64(8.0 * Float64(x2 * x2))) / t_1) / t_1))))))); else tmp = Float64(x1 + Float64(Float64(6.0 + Float64(Float64(-3.0 + Float64(Float64(-3.0 + Float64(x2 * 8.0)) / x1)) / x1)) * t_3)); end return tmp end
function tmp_2 = code(x1, x2) t_0 = x1 * (x1 * 3.0); t_1 = (x1 * x1) + 1.0; t_2 = x1 * (x1 * x1); t_3 = x1 * t_2; tmp = 0.0; if (x1 <= -6200000000.0) tmp = x1 + (t_3 * (x2 * ((6.0 / x2) + ((8.0 / (x1 * x1)) - ((3.0 / (x2 * (x1 * x1))) + (3.0 / (x1 * x2))))))); elseif (x1 <= 950000000000.0) tmp = x1 + ((3.0 * (((t_0 - (2.0 * x2)) - x1) / t_1)) + (x1 + (t_2 + ((t_0 * (((t_0 + (2.0 * x2)) - x1) / t_1)) + (t_1 * (((x1 * (8.0 * (x2 * x2))) / t_1) / t_1)))))); else tmp = x1 + ((6.0 + ((-3.0 + ((-3.0 + (x2 * 8.0)) / x1)) / x1)) * t_3); end tmp_2 = tmp; end
code[x1_, x2_] := Block[{t$95$0 = N[(x1 * N[(x1 * 3.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(N[(x1 * x1), $MachinePrecision] + 1.0), $MachinePrecision]}, Block[{t$95$2 = N[(x1 * N[(x1 * x1), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(x1 * t$95$2), $MachinePrecision]}, If[LessEqual[x1, -6200000000.0], N[(x1 + N[(t$95$3 * N[(x2 * N[(N[(6.0 / x2), $MachinePrecision] + N[(N[(8.0 / N[(x1 * x1), $MachinePrecision]), $MachinePrecision] - N[(N[(3.0 / N[(x2 * N[(x1 * x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(3.0 / N[(x1 * x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 950000000000.0], N[(x1 + N[(N[(3.0 * N[(N[(N[(t$95$0 - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$1), $MachinePrecision]), $MachinePrecision] + N[(x1 + N[(t$95$2 + N[(N[(t$95$0 * N[(N[(N[(t$95$0 + N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$1), $MachinePrecision]), $MachinePrecision] + N[(t$95$1 * N[(N[(N[(x1 * N[(8.0 * N[(x2 * x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / t$95$1), $MachinePrecision] / t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x1 + N[(N[(6.0 + N[(N[(-3.0 + N[(N[(-3.0 + N[(x2 * 8.0), $MachinePrecision]), $MachinePrecision] / x1), $MachinePrecision]), $MachinePrecision] / x1), $MachinePrecision]), $MachinePrecision] * t$95$3), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x1 \cdot \left(x1 \cdot 3\right)\\
t_1 := x1 \cdot x1 + 1\\
t_2 := x1 \cdot \left(x1 \cdot x1\right)\\
t_3 := x1 \cdot t\_2\\
\mathbf{if}\;x1 \leq -6200000000:\\
\;\;\;\;x1 + t\_3 \cdot \left(x2 \cdot \left(\frac{6}{x2} + \left(\frac{8}{x1 \cdot x1} - \left(\frac{3}{x2 \cdot \left(x1 \cdot x1\right)} + \frac{3}{x1 \cdot x2}\right)\right)\right)\right)\\
\mathbf{elif}\;x1 \leq 950000000000:\\
\;\;\;\;x1 + \left(3 \cdot \frac{\left(t\_0 - 2 \cdot x2\right) - x1}{t\_1} + \left(x1 + \left(t\_2 + \left(t\_0 \cdot \frac{\left(t\_0 + 2 \cdot x2\right) - x1}{t\_1} + t\_1 \cdot \frac{\frac{x1 \cdot \left(8 \cdot \left(x2 \cdot x2\right)\right)}{t\_1}}{t\_1}\right)\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x1 + \left(6 + \frac{-3 + \frac{-3 + x2 \cdot 8}{x1}}{x1}\right) \cdot t\_3\\
\end{array}
\end{array}
if x1 < -6.2e9Initial program 33.6%
Taylor expanded in x1 around -inf
*-lowering-*.f64N/A
pow-lowering-pow.f64N/A
mul-1-negN/A
unsub-negN/A
--lowering--.f64N/A
/-lowering-/.f64N/A
Simplified91.1%
+-commutativeN/A
+-lowering-+.f64N/A
Applied egg-rr91.1%
Taylor expanded in x2 around inf
*-lowering-*.f64N/A
associate--l+N/A
+-lowering-+.f64N/A
associate-*r/N/A
metadata-evalN/A
/-lowering-/.f64N/A
metadata-evalN/A
associate-*r/N/A
--lowering--.f64N/A
associate-*r/N/A
metadata-evalN/A
/-lowering-/.f64N/A
unpow2N/A
*-lowering-*.f64N/A
+-commutativeN/A
+-lowering-+.f64N/A
Simplified91.1%
if -6.2e9 < x1 < 9.5e11Initial program 99.5%
Taylor expanded in x2 around inf
associate-*r/N/A
unpow2N/A
associate-/r*N/A
associate-*r*N/A
associate-*l/N/A
associate-*r/N/A
/-lowering-/.f64N/A
Simplified87.3%
if 9.5e11 < x1 Initial program 43.1%
Taylor expanded in x1 around -inf
*-lowering-*.f64N/A
pow-lowering-pow.f64N/A
mul-1-negN/A
unsub-negN/A
--lowering--.f64N/A
/-lowering-/.f64N/A
Simplified97.7%
+-commutativeN/A
+-lowering-+.f64N/A
Applied egg-rr97.7%
Final simplification90.2%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (* x1 (* x1 (* x1 x1)))))
(if (<= x1 -1050000000.0)
(+
x1
(*
t_0
(*
x2
(+
(/ 6.0 x2)
(-
(/ 8.0 (* x1 x1))
(+ (/ 3.0 (* x2 (* x1 x1))) (/ 3.0 (* x1 x2))))))))
(if (<= x1 225000.0)
(+
(* x2 -6.0)
(*
x1
(+
(* (* x2 4.0) (+ (* 2.0 x2) -3.0))
(+
-1.0
(*
x1
(+
(* 2.0 (+ (* x2 -2.0) (+ 3.0 (* x2 -2.0))))
(+ -6.0 (+ (+ 9.0 (* 3.0 (* 2.0 x2))) (* x2 14.0)))))))))
(+ x1 (* (+ 6.0 (/ (+ -3.0 (/ (+ -3.0 (* x2 8.0)) x1)) x1)) t_0))))))
double code(double x1, double x2) {
double t_0 = x1 * (x1 * (x1 * x1));
double tmp;
if (x1 <= -1050000000.0) {
tmp = x1 + (t_0 * (x2 * ((6.0 / x2) + ((8.0 / (x1 * x1)) - ((3.0 / (x2 * (x1 * x1))) + (3.0 / (x1 * x2)))))));
} else if (x1 <= 225000.0) {
tmp = (x2 * -6.0) + (x1 * (((x2 * 4.0) * ((2.0 * x2) + -3.0)) + (-1.0 + (x1 * ((2.0 * ((x2 * -2.0) + (3.0 + (x2 * -2.0)))) + (-6.0 + ((9.0 + (3.0 * (2.0 * x2))) + (x2 * 14.0))))))));
} else {
tmp = x1 + ((6.0 + ((-3.0 + ((-3.0 + (x2 * 8.0)) / x1)) / x1)) * 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 * x1))
if (x1 <= (-1050000000.0d0)) then
tmp = x1 + (t_0 * (x2 * ((6.0d0 / x2) + ((8.0d0 / (x1 * x1)) - ((3.0d0 / (x2 * (x1 * x1))) + (3.0d0 / (x1 * x2)))))))
else if (x1 <= 225000.0d0) then
tmp = (x2 * (-6.0d0)) + (x1 * (((x2 * 4.0d0) * ((2.0d0 * x2) + (-3.0d0))) + ((-1.0d0) + (x1 * ((2.0d0 * ((x2 * (-2.0d0)) + (3.0d0 + (x2 * (-2.0d0))))) + ((-6.0d0) + ((9.0d0 + (3.0d0 * (2.0d0 * x2))) + (x2 * 14.0d0))))))))
else
tmp = x1 + ((6.0d0 + (((-3.0d0) + (((-3.0d0) + (x2 * 8.0d0)) / x1)) / x1)) * t_0)
end if
code = tmp
end function
public static double code(double x1, double x2) {
double t_0 = x1 * (x1 * (x1 * x1));
double tmp;
if (x1 <= -1050000000.0) {
tmp = x1 + (t_0 * (x2 * ((6.0 / x2) + ((8.0 / (x1 * x1)) - ((3.0 / (x2 * (x1 * x1))) + (3.0 / (x1 * x2)))))));
} else if (x1 <= 225000.0) {
tmp = (x2 * -6.0) + (x1 * (((x2 * 4.0) * ((2.0 * x2) + -3.0)) + (-1.0 + (x1 * ((2.0 * ((x2 * -2.0) + (3.0 + (x2 * -2.0)))) + (-6.0 + ((9.0 + (3.0 * (2.0 * x2))) + (x2 * 14.0))))))));
} else {
tmp = x1 + ((6.0 + ((-3.0 + ((-3.0 + (x2 * 8.0)) / x1)) / x1)) * t_0);
}
return tmp;
}
def code(x1, x2): t_0 = x1 * (x1 * (x1 * x1)) tmp = 0 if x1 <= -1050000000.0: tmp = x1 + (t_0 * (x2 * ((6.0 / x2) + ((8.0 / (x1 * x1)) - ((3.0 / (x2 * (x1 * x1))) + (3.0 / (x1 * x2))))))) elif x1 <= 225000.0: tmp = (x2 * -6.0) + (x1 * (((x2 * 4.0) * ((2.0 * x2) + -3.0)) + (-1.0 + (x1 * ((2.0 * ((x2 * -2.0) + (3.0 + (x2 * -2.0)))) + (-6.0 + ((9.0 + (3.0 * (2.0 * x2))) + (x2 * 14.0)))))))) else: tmp = x1 + ((6.0 + ((-3.0 + ((-3.0 + (x2 * 8.0)) / x1)) / x1)) * t_0) return tmp
function code(x1, x2) t_0 = Float64(x1 * Float64(x1 * Float64(x1 * x1))) tmp = 0.0 if (x1 <= -1050000000.0) tmp = Float64(x1 + Float64(t_0 * Float64(x2 * Float64(Float64(6.0 / x2) + Float64(Float64(8.0 / Float64(x1 * x1)) - Float64(Float64(3.0 / Float64(x2 * Float64(x1 * x1))) + Float64(3.0 / Float64(x1 * x2)))))))); elseif (x1 <= 225000.0) tmp = Float64(Float64(x2 * -6.0) + Float64(x1 * Float64(Float64(Float64(x2 * 4.0) * Float64(Float64(2.0 * x2) + -3.0)) + Float64(-1.0 + Float64(x1 * Float64(Float64(2.0 * Float64(Float64(x2 * -2.0) + Float64(3.0 + Float64(x2 * -2.0)))) + Float64(-6.0 + Float64(Float64(9.0 + Float64(3.0 * Float64(2.0 * x2))) + Float64(x2 * 14.0))))))))); else tmp = Float64(x1 + Float64(Float64(6.0 + Float64(Float64(-3.0 + Float64(Float64(-3.0 + Float64(x2 * 8.0)) / x1)) / x1)) * t_0)); end return tmp end
function tmp_2 = code(x1, x2) t_0 = x1 * (x1 * (x1 * x1)); tmp = 0.0; if (x1 <= -1050000000.0) tmp = x1 + (t_0 * (x2 * ((6.0 / x2) + ((8.0 / (x1 * x1)) - ((3.0 / (x2 * (x1 * x1))) + (3.0 / (x1 * x2))))))); elseif (x1 <= 225000.0) tmp = (x2 * -6.0) + (x1 * (((x2 * 4.0) * ((2.0 * x2) + -3.0)) + (-1.0 + (x1 * ((2.0 * ((x2 * -2.0) + (3.0 + (x2 * -2.0)))) + (-6.0 + ((9.0 + (3.0 * (2.0 * x2))) + (x2 * 14.0)))))))); else tmp = x1 + ((6.0 + ((-3.0 + ((-3.0 + (x2 * 8.0)) / x1)) / x1)) * t_0); end tmp_2 = tmp; end
code[x1_, x2_] := Block[{t$95$0 = N[(x1 * N[(x1 * N[(x1 * x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x1, -1050000000.0], N[(x1 + N[(t$95$0 * N[(x2 * N[(N[(6.0 / x2), $MachinePrecision] + N[(N[(8.0 / N[(x1 * x1), $MachinePrecision]), $MachinePrecision] - N[(N[(3.0 / N[(x2 * N[(x1 * x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(3.0 / N[(x1 * x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 225000.0], N[(N[(x2 * -6.0), $MachinePrecision] + N[(x1 * N[(N[(N[(x2 * 4.0), $MachinePrecision] * N[(N[(2.0 * x2), $MachinePrecision] + -3.0), $MachinePrecision]), $MachinePrecision] + N[(-1.0 + N[(x1 * N[(N[(2.0 * N[(N[(x2 * -2.0), $MachinePrecision] + N[(3.0 + N[(x2 * -2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(-6.0 + N[(N[(9.0 + N[(3.0 * N[(2.0 * x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(x2 * 14.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x1 + N[(N[(6.0 + N[(N[(-3.0 + N[(N[(-3.0 + N[(x2 * 8.0), $MachinePrecision]), $MachinePrecision] / x1), $MachinePrecision]), $MachinePrecision] / x1), $MachinePrecision]), $MachinePrecision] * t$95$0), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x1 \cdot \left(x1 \cdot \left(x1 \cdot x1\right)\right)\\
\mathbf{if}\;x1 \leq -1050000000:\\
\;\;\;\;x1 + t\_0 \cdot \left(x2 \cdot \left(\frac{6}{x2} + \left(\frac{8}{x1 \cdot x1} - \left(\frac{3}{x2 \cdot \left(x1 \cdot x1\right)} + \frac{3}{x1 \cdot x2}\right)\right)\right)\right)\\
\mathbf{elif}\;x1 \leq 225000:\\
\;\;\;\;x2 \cdot -6 + x1 \cdot \left(\left(x2 \cdot 4\right) \cdot \left(2 \cdot x2 + -3\right) + \left(-1 + x1 \cdot \left(2 \cdot \left(x2 \cdot -2 + \left(3 + x2 \cdot -2\right)\right) + \left(-6 + \left(\left(9 + 3 \cdot \left(2 \cdot x2\right)\right) + x2 \cdot 14\right)\right)\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x1 + \left(6 + \frac{-3 + \frac{-3 + x2 \cdot 8}{x1}}{x1}\right) \cdot t\_0\\
\end{array}
\end{array}
if x1 < -1.05e9Initial program 33.6%
Taylor expanded in x1 around -inf
*-lowering-*.f64N/A
pow-lowering-pow.f64N/A
mul-1-negN/A
unsub-negN/A
--lowering--.f64N/A
/-lowering-/.f64N/A
Simplified91.1%
+-commutativeN/A
+-lowering-+.f64N/A
Applied egg-rr91.1%
Taylor expanded in x2 around inf
*-lowering-*.f64N/A
associate--l+N/A
+-lowering-+.f64N/A
associate-*r/N/A
metadata-evalN/A
/-lowering-/.f64N/A
metadata-evalN/A
associate-*r/N/A
--lowering--.f64N/A
associate-*r/N/A
metadata-evalN/A
/-lowering-/.f64N/A
unpow2N/A
*-lowering-*.f64N/A
+-commutativeN/A
+-lowering-+.f64N/A
Simplified91.1%
if -1.05e9 < x1 < 225000Initial program 99.5%
clear-numN/A
inv-powN/A
div-invN/A
unpow-prod-downN/A
inv-powN/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
pow-lowering-pow.f64N/A
Applied egg-rr99.5%
Applied egg-rr99.3%
Taylor expanded in x1 around 0
Simplified87.2%
if 225000 < x1 Initial program 47.8%
Taylor expanded in x1 around -inf
*-lowering-*.f64N/A
pow-lowering-pow.f64N/A
mul-1-negN/A
unsub-negN/A
--lowering--.f64N/A
/-lowering-/.f64N/A
Simplified92.9%
+-commutativeN/A
+-lowering-+.f64N/A
Applied egg-rr92.9%
Final simplification89.4%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (* x1 (* x1 (* x1 x1)))))
(if (<= x1 -1050000000.0)
(+
x1
(*
t_0
(*
x2
(+
(/ 6.0 x2)
(-
(/ 8.0 (* x1 x1))
(+ (/ 3.0 (* x2 (* x1 x1))) (/ 3.0 (* x1 x2))))))))
(if (<= x1 340000.0)
(+
x1
(+
(* 3.0 (/ (- (- (* x1 (* x1 3.0)) (* 2.0 x2)) x1) (+ (* x1 x1) 1.0)))
(+ x1 (* 4.0 (* x1 (* x2 (+ (* 2.0 x2) -3.0)))))))
(+ x1 (* (+ 6.0 (/ (+ -3.0 (/ (+ -3.0 (* x2 8.0)) x1)) x1)) t_0))))))
double code(double x1, double x2) {
double t_0 = x1 * (x1 * (x1 * x1));
double tmp;
if (x1 <= -1050000000.0) {
tmp = x1 + (t_0 * (x2 * ((6.0 / x2) + ((8.0 / (x1 * x1)) - ((3.0 / (x2 * (x1 * x1))) + (3.0 / (x1 * x2)))))));
} else if (x1 <= 340000.0) {
tmp = x1 + ((3.0 * ((((x1 * (x1 * 3.0)) - (2.0 * x2)) - x1) / ((x1 * x1) + 1.0))) + (x1 + (4.0 * (x1 * (x2 * ((2.0 * x2) + -3.0))))));
} else {
tmp = x1 + ((6.0 + ((-3.0 + ((-3.0 + (x2 * 8.0)) / x1)) / x1)) * 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 * x1))
if (x1 <= (-1050000000.0d0)) then
tmp = x1 + (t_0 * (x2 * ((6.0d0 / x2) + ((8.0d0 / (x1 * x1)) - ((3.0d0 / (x2 * (x1 * x1))) + (3.0d0 / (x1 * x2)))))))
else if (x1 <= 340000.0d0) then
tmp = x1 + ((3.0d0 * ((((x1 * (x1 * 3.0d0)) - (2.0d0 * x2)) - x1) / ((x1 * x1) + 1.0d0))) + (x1 + (4.0d0 * (x1 * (x2 * ((2.0d0 * x2) + (-3.0d0)))))))
else
tmp = x1 + ((6.0d0 + (((-3.0d0) + (((-3.0d0) + (x2 * 8.0d0)) / x1)) / x1)) * t_0)
end if
code = tmp
end function
public static double code(double x1, double x2) {
double t_0 = x1 * (x1 * (x1 * x1));
double tmp;
if (x1 <= -1050000000.0) {
tmp = x1 + (t_0 * (x2 * ((6.0 / x2) + ((8.0 / (x1 * x1)) - ((3.0 / (x2 * (x1 * x1))) + (3.0 / (x1 * x2)))))));
} else if (x1 <= 340000.0) {
tmp = x1 + ((3.0 * ((((x1 * (x1 * 3.0)) - (2.0 * x2)) - x1) / ((x1 * x1) + 1.0))) + (x1 + (4.0 * (x1 * (x2 * ((2.0 * x2) + -3.0))))));
} else {
tmp = x1 + ((6.0 + ((-3.0 + ((-3.0 + (x2 * 8.0)) / x1)) / x1)) * t_0);
}
return tmp;
}
def code(x1, x2): t_0 = x1 * (x1 * (x1 * x1)) tmp = 0 if x1 <= -1050000000.0: tmp = x1 + (t_0 * (x2 * ((6.0 / x2) + ((8.0 / (x1 * x1)) - ((3.0 / (x2 * (x1 * x1))) + (3.0 / (x1 * x2))))))) elif x1 <= 340000.0: tmp = x1 + ((3.0 * ((((x1 * (x1 * 3.0)) - (2.0 * x2)) - x1) / ((x1 * x1) + 1.0))) + (x1 + (4.0 * (x1 * (x2 * ((2.0 * x2) + -3.0)))))) else: tmp = x1 + ((6.0 + ((-3.0 + ((-3.0 + (x2 * 8.0)) / x1)) / x1)) * t_0) return tmp
function code(x1, x2) t_0 = Float64(x1 * Float64(x1 * Float64(x1 * x1))) tmp = 0.0 if (x1 <= -1050000000.0) tmp = Float64(x1 + Float64(t_0 * Float64(x2 * Float64(Float64(6.0 / x2) + Float64(Float64(8.0 / Float64(x1 * x1)) - Float64(Float64(3.0 / Float64(x2 * Float64(x1 * x1))) + Float64(3.0 / Float64(x1 * x2)))))))); elseif (x1 <= 340000.0) tmp = Float64(x1 + Float64(Float64(3.0 * Float64(Float64(Float64(Float64(x1 * Float64(x1 * 3.0)) - Float64(2.0 * x2)) - x1) / Float64(Float64(x1 * x1) + 1.0))) + Float64(x1 + Float64(4.0 * Float64(x1 * Float64(x2 * Float64(Float64(2.0 * x2) + -3.0))))))); else tmp = Float64(x1 + Float64(Float64(6.0 + Float64(Float64(-3.0 + Float64(Float64(-3.0 + Float64(x2 * 8.0)) / x1)) / x1)) * t_0)); end return tmp end
function tmp_2 = code(x1, x2) t_0 = x1 * (x1 * (x1 * x1)); tmp = 0.0; if (x1 <= -1050000000.0) tmp = x1 + (t_0 * (x2 * ((6.0 / x2) + ((8.0 / (x1 * x1)) - ((3.0 / (x2 * (x1 * x1))) + (3.0 / (x1 * x2))))))); elseif (x1 <= 340000.0) tmp = x1 + ((3.0 * ((((x1 * (x1 * 3.0)) - (2.0 * x2)) - x1) / ((x1 * x1) + 1.0))) + (x1 + (4.0 * (x1 * (x2 * ((2.0 * x2) + -3.0)))))); else tmp = x1 + ((6.0 + ((-3.0 + ((-3.0 + (x2 * 8.0)) / x1)) / x1)) * t_0); end tmp_2 = tmp; end
code[x1_, x2_] := Block[{t$95$0 = N[(x1 * N[(x1 * N[(x1 * x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x1, -1050000000.0], N[(x1 + N[(t$95$0 * N[(x2 * N[(N[(6.0 / x2), $MachinePrecision] + N[(N[(8.0 / N[(x1 * x1), $MachinePrecision]), $MachinePrecision] - N[(N[(3.0 / N[(x2 * N[(x1 * x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(3.0 / N[(x1 * x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 340000.0], N[(x1 + N[(N[(3.0 * N[(N[(N[(N[(x1 * N[(x1 * 3.0), $MachinePrecision]), $MachinePrecision] - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / N[(N[(x1 * x1), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(x1 + N[(4.0 * N[(x1 * N[(x2 * N[(N[(2.0 * x2), $MachinePrecision] + -3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x1 + N[(N[(6.0 + N[(N[(-3.0 + N[(N[(-3.0 + N[(x2 * 8.0), $MachinePrecision]), $MachinePrecision] / x1), $MachinePrecision]), $MachinePrecision] / x1), $MachinePrecision]), $MachinePrecision] * t$95$0), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x1 \cdot \left(x1 \cdot \left(x1 \cdot x1\right)\right)\\
\mathbf{if}\;x1 \leq -1050000000:\\
\;\;\;\;x1 + t\_0 \cdot \left(x2 \cdot \left(\frac{6}{x2} + \left(\frac{8}{x1 \cdot x1} - \left(\frac{3}{x2 \cdot \left(x1 \cdot x1\right)} + \frac{3}{x1 \cdot x2}\right)\right)\right)\right)\\
\mathbf{elif}\;x1 \leq 340000:\\
\;\;\;\;x1 + \left(3 \cdot \frac{\left(x1 \cdot \left(x1 \cdot 3\right) - 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1} + \left(x1 + 4 \cdot \left(x1 \cdot \left(x2 \cdot \left(2 \cdot x2 + -3\right)\right)\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x1 + \left(6 + \frac{-3 + \frac{-3 + x2 \cdot 8}{x1}}{x1}\right) \cdot t\_0\\
\end{array}
\end{array}
if x1 < -1.05e9Initial program 33.6%
Taylor expanded in x1 around -inf
*-lowering-*.f64N/A
pow-lowering-pow.f64N/A
mul-1-negN/A
unsub-negN/A
--lowering--.f64N/A
/-lowering-/.f64N/A
Simplified91.1%
+-commutativeN/A
+-lowering-+.f64N/A
Applied egg-rr91.1%
Taylor expanded in x2 around inf
*-lowering-*.f64N/A
associate--l+N/A
+-lowering-+.f64N/A
associate-*r/N/A
metadata-evalN/A
/-lowering-/.f64N/A
metadata-evalN/A
associate-*r/N/A
--lowering--.f64N/A
associate-*r/N/A
metadata-evalN/A
/-lowering-/.f64N/A
unpow2N/A
*-lowering-*.f64N/A
+-commutativeN/A
+-lowering-+.f64N/A
Simplified91.1%
if -1.05e9 < x1 < 3.4e5Initial program 99.5%
Taylor expanded in x1 around 0
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
sub-negN/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
metadata-eval86.9%
Simplified86.9%
if 3.4e5 < x1 Initial program 47.8%
Taylor expanded in x1 around -inf
*-lowering-*.f64N/A
pow-lowering-pow.f64N/A
mul-1-negN/A
unsub-negN/A
--lowering--.f64N/A
/-lowering-/.f64N/A
Simplified92.9%
+-commutativeN/A
+-lowering-+.f64N/A
Applied egg-rr92.9%
Final simplification89.3%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0
(+
x1
(*
(+ 6.0 (/ (+ -3.0 (/ (+ -3.0 (* x2 8.0)) x1)) x1))
(* x1 (* x1 (* x1 x1)))))))
(if (<= x1 -1150000000.0)
t_0
(if (<= x1 225000.0)
(+
x1
(+
(* 3.0 (/ (- (- (* x1 (* x1 3.0)) (* 2.0 x2)) x1) (+ (* x1 x1) 1.0)))
(+ x1 (* 4.0 (* x1 (* x2 (+ (* 2.0 x2) -3.0)))))))
t_0))))
double code(double x1, double x2) {
double t_0 = x1 + ((6.0 + ((-3.0 + ((-3.0 + (x2 * 8.0)) / x1)) / x1)) * (x1 * (x1 * (x1 * x1))));
double tmp;
if (x1 <= -1150000000.0) {
tmp = t_0;
} else if (x1 <= 225000.0) {
tmp = x1 + ((3.0 * ((((x1 * (x1 * 3.0)) - (2.0 * x2)) - x1) / ((x1 * x1) + 1.0))) + (x1 + (4.0 * (x1 * (x2 * ((2.0 * x2) + -3.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 + ((6.0d0 + (((-3.0d0) + (((-3.0d0) + (x2 * 8.0d0)) / x1)) / x1)) * (x1 * (x1 * (x1 * x1))))
if (x1 <= (-1150000000.0d0)) then
tmp = t_0
else if (x1 <= 225000.0d0) then
tmp = x1 + ((3.0d0 * ((((x1 * (x1 * 3.0d0)) - (2.0d0 * x2)) - x1) / ((x1 * x1) + 1.0d0))) + (x1 + (4.0d0 * (x1 * (x2 * ((2.0d0 * x2) + (-3.0d0)))))))
else
tmp = t_0
end if
code = tmp
end function
public static double code(double x1, double x2) {
double t_0 = x1 + ((6.0 + ((-3.0 + ((-3.0 + (x2 * 8.0)) / x1)) / x1)) * (x1 * (x1 * (x1 * x1))));
double tmp;
if (x1 <= -1150000000.0) {
tmp = t_0;
} else if (x1 <= 225000.0) {
tmp = x1 + ((3.0 * ((((x1 * (x1 * 3.0)) - (2.0 * x2)) - x1) / ((x1 * x1) + 1.0))) + (x1 + (4.0 * (x1 * (x2 * ((2.0 * x2) + -3.0))))));
} else {
tmp = t_0;
}
return tmp;
}
def code(x1, x2): t_0 = x1 + ((6.0 + ((-3.0 + ((-3.0 + (x2 * 8.0)) / x1)) / x1)) * (x1 * (x1 * (x1 * x1)))) tmp = 0 if x1 <= -1150000000.0: tmp = t_0 elif x1 <= 225000.0: tmp = x1 + ((3.0 * ((((x1 * (x1 * 3.0)) - (2.0 * x2)) - x1) / ((x1 * x1) + 1.0))) + (x1 + (4.0 * (x1 * (x2 * ((2.0 * x2) + -3.0)))))) else: tmp = t_0 return tmp
function code(x1, x2) t_0 = Float64(x1 + Float64(Float64(6.0 + Float64(Float64(-3.0 + Float64(Float64(-3.0 + Float64(x2 * 8.0)) / x1)) / x1)) * Float64(x1 * Float64(x1 * Float64(x1 * x1))))) tmp = 0.0 if (x1 <= -1150000000.0) tmp = t_0; elseif (x1 <= 225000.0) tmp = Float64(x1 + Float64(Float64(3.0 * Float64(Float64(Float64(Float64(x1 * Float64(x1 * 3.0)) - Float64(2.0 * x2)) - x1) / Float64(Float64(x1 * x1) + 1.0))) + Float64(x1 + Float64(4.0 * Float64(x1 * Float64(x2 * Float64(Float64(2.0 * x2) + -3.0))))))); else tmp = t_0; end return tmp end
function tmp_2 = code(x1, x2) t_0 = x1 + ((6.0 + ((-3.0 + ((-3.0 + (x2 * 8.0)) / x1)) / x1)) * (x1 * (x1 * (x1 * x1)))); tmp = 0.0; if (x1 <= -1150000000.0) tmp = t_0; elseif (x1 <= 225000.0) tmp = x1 + ((3.0 * ((((x1 * (x1 * 3.0)) - (2.0 * x2)) - x1) / ((x1 * x1) + 1.0))) + (x1 + (4.0 * (x1 * (x2 * ((2.0 * x2) + -3.0)))))); else tmp = t_0; end tmp_2 = tmp; end
code[x1_, x2_] := Block[{t$95$0 = N[(x1 + N[(N[(6.0 + N[(N[(-3.0 + N[(N[(-3.0 + N[(x2 * 8.0), $MachinePrecision]), $MachinePrecision] / x1), $MachinePrecision]), $MachinePrecision] / x1), $MachinePrecision]), $MachinePrecision] * N[(x1 * N[(x1 * N[(x1 * x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x1, -1150000000.0], t$95$0, If[LessEqual[x1, 225000.0], N[(x1 + N[(N[(3.0 * N[(N[(N[(N[(x1 * N[(x1 * 3.0), $MachinePrecision]), $MachinePrecision] - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / N[(N[(x1 * x1), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(x1 + N[(4.0 * N[(x1 * N[(x2 * N[(N[(2.0 * x2), $MachinePrecision] + -3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$0]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x1 + \left(6 + \frac{-3 + \frac{-3 + x2 \cdot 8}{x1}}{x1}\right) \cdot \left(x1 \cdot \left(x1 \cdot \left(x1 \cdot x1\right)\right)\right)\\
\mathbf{if}\;x1 \leq -1150000000:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;x1 \leq 225000:\\
\;\;\;\;x1 + \left(3 \cdot \frac{\left(x1 \cdot \left(x1 \cdot 3\right) - 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1} + \left(x1 + 4 \cdot \left(x1 \cdot \left(x2 \cdot \left(2 \cdot x2 + -3\right)\right)\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
if x1 < -1.15e9 or 225000 < x1 Initial program 39.2%
Taylor expanded in x1 around -inf
*-lowering-*.f64N/A
pow-lowering-pow.f64N/A
mul-1-negN/A
unsub-negN/A
--lowering--.f64N/A
/-lowering-/.f64N/A
Simplified91.8%
+-commutativeN/A
+-lowering-+.f64N/A
Applied egg-rr91.8%
if -1.15e9 < x1 < 225000Initial program 99.5%
Taylor expanded in x1 around 0
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
sub-negN/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
metadata-eval86.9%
Simplified86.9%
Final simplification89.3%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (/ (* x2 (* x2 (* x1 8.0))) (+ (* x1 x1) 1.0)))
(t_1 (+ 6.0 (/ -3.0 x1))))
(if (<= x1 -780000000000.0)
(+ x1 (* (* x1 (* x1 (* x1 x1))) t_1))
(if (<= x1 -8.8e-125)
t_0
(if (<= x1 7e-48)
(+ x1 (* -6.0 (+ x1 x2)))
(if (<= x1 820000000000.0) t_0 (* (* (* x1 x1) (* x1 x1)) t_1)))))))
double code(double x1, double x2) {
double t_0 = (x2 * (x2 * (x1 * 8.0))) / ((x1 * x1) + 1.0);
double t_1 = 6.0 + (-3.0 / x1);
double tmp;
if (x1 <= -780000000000.0) {
tmp = x1 + ((x1 * (x1 * (x1 * x1))) * t_1);
} else if (x1 <= -8.8e-125) {
tmp = t_0;
} else if (x1 <= 7e-48) {
tmp = x1 + (-6.0 * (x1 + x2));
} else if (x1 <= 820000000000.0) {
tmp = t_0;
} else {
tmp = ((x1 * x1) * (x1 * x1)) * t_1;
}
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 * (x2 * (x1 * 8.0d0))) / ((x1 * x1) + 1.0d0)
t_1 = 6.0d0 + ((-3.0d0) / x1)
if (x1 <= (-780000000000.0d0)) then
tmp = x1 + ((x1 * (x1 * (x1 * x1))) * t_1)
else if (x1 <= (-8.8d-125)) then
tmp = t_0
else if (x1 <= 7d-48) then
tmp = x1 + ((-6.0d0) * (x1 + x2))
else if (x1 <= 820000000000.0d0) then
tmp = t_0
else
tmp = ((x1 * x1) * (x1 * x1)) * t_1
end if
code = tmp
end function
public static double code(double x1, double x2) {
double t_0 = (x2 * (x2 * (x1 * 8.0))) / ((x1 * x1) + 1.0);
double t_1 = 6.0 + (-3.0 / x1);
double tmp;
if (x1 <= -780000000000.0) {
tmp = x1 + ((x1 * (x1 * (x1 * x1))) * t_1);
} else if (x1 <= -8.8e-125) {
tmp = t_0;
} else if (x1 <= 7e-48) {
tmp = x1 + (-6.0 * (x1 + x2));
} else if (x1 <= 820000000000.0) {
tmp = t_0;
} else {
tmp = ((x1 * x1) * (x1 * x1)) * t_1;
}
return tmp;
}
def code(x1, x2): t_0 = (x2 * (x2 * (x1 * 8.0))) / ((x1 * x1) + 1.0) t_1 = 6.0 + (-3.0 / x1) tmp = 0 if x1 <= -780000000000.0: tmp = x1 + ((x1 * (x1 * (x1 * x1))) * t_1) elif x1 <= -8.8e-125: tmp = t_0 elif x1 <= 7e-48: tmp = x1 + (-6.0 * (x1 + x2)) elif x1 <= 820000000000.0: tmp = t_0 else: tmp = ((x1 * x1) * (x1 * x1)) * t_1 return tmp
function code(x1, x2) t_0 = Float64(Float64(x2 * Float64(x2 * Float64(x1 * 8.0))) / Float64(Float64(x1 * x1) + 1.0)) t_1 = Float64(6.0 + Float64(-3.0 / x1)) tmp = 0.0 if (x1 <= -780000000000.0) tmp = Float64(x1 + Float64(Float64(x1 * Float64(x1 * Float64(x1 * x1))) * t_1)); elseif (x1 <= -8.8e-125) tmp = t_0; elseif (x1 <= 7e-48) tmp = Float64(x1 + Float64(-6.0 * Float64(x1 + x2))); elseif (x1 <= 820000000000.0) tmp = t_0; else tmp = Float64(Float64(Float64(x1 * x1) * Float64(x1 * x1)) * t_1); end return tmp end
function tmp_2 = code(x1, x2) t_0 = (x2 * (x2 * (x1 * 8.0))) / ((x1 * x1) + 1.0); t_1 = 6.0 + (-3.0 / x1); tmp = 0.0; if (x1 <= -780000000000.0) tmp = x1 + ((x1 * (x1 * (x1 * x1))) * t_1); elseif (x1 <= -8.8e-125) tmp = t_0; elseif (x1 <= 7e-48) tmp = x1 + (-6.0 * (x1 + x2)); elseif (x1 <= 820000000000.0) tmp = t_0; else tmp = ((x1 * x1) * (x1 * x1)) * t_1; end tmp_2 = tmp; end
code[x1_, x2_] := Block[{t$95$0 = N[(N[(x2 * N[(x2 * N[(x1 * 8.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(N[(x1 * x1), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(6.0 + N[(-3.0 / x1), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x1, -780000000000.0], N[(x1 + N[(N[(x1 * N[(x1 * N[(x1 * x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * t$95$1), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, -8.8e-125], t$95$0, If[LessEqual[x1, 7e-48], N[(x1 + N[(-6.0 * N[(x1 + x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 820000000000.0], t$95$0, N[(N[(N[(x1 * x1), $MachinePrecision] * N[(x1 * x1), $MachinePrecision]), $MachinePrecision] * t$95$1), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x2 \cdot \left(x2 \cdot \left(x1 \cdot 8\right)\right)}{x1 \cdot x1 + 1}\\
t_1 := 6 + \frac{-3}{x1}\\
\mathbf{if}\;x1 \leq -780000000000:\\
\;\;\;\;x1 + \left(x1 \cdot \left(x1 \cdot \left(x1 \cdot x1\right)\right)\right) \cdot t\_1\\
\mathbf{elif}\;x1 \leq -8.8 \cdot 10^{-125}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;x1 \leq 7 \cdot 10^{-48}:\\
\;\;\;\;x1 + -6 \cdot \left(x1 + x2\right)\\
\mathbf{elif}\;x1 \leq 820000000000:\\
\;\;\;\;t\_0\\
\mathbf{else}:\\
\;\;\;\;\left(\left(x1 \cdot x1\right) \cdot \left(x1 \cdot x1\right)\right) \cdot t\_1\\
\end{array}
\end{array}
if x1 < -7.8e11Initial program 32.7%
Taylor expanded in x1 around -inf
*-lowering-*.f64N/A
pow-lowering-pow.f64N/A
mul-1-negN/A
unsub-negN/A
--lowering--.f64N/A
/-lowering-/.f64N/A
Simplified91.9%
+-commutativeN/A
+-lowering-+.f64N/A
Applied egg-rr91.9%
Taylor expanded in x1 around inf
sub-negN/A
+-lowering-+.f64N/A
associate-*r/N/A
metadata-evalN/A
distribute-neg-fracN/A
metadata-evalN/A
/-lowering-/.f6490.4%
Simplified90.4%
if -7.8e11 < x1 < -8.79999999999999979e-125 or 6.99999999999999982e-48 < x1 < 8.2e11Initial program 99.2%
Taylor expanded in x2 around inf
Simplified58.4%
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-*.f6445.9%
Simplified45.9%
/-lowering-/.f64N/A
associate-*r*N/A
associate-*r*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f6455.8%
Applied egg-rr55.8%
if -8.79999999999999979e-125 < x1 < 6.99999999999999982e-48Initial program 99.6%
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
/-lowering-/.f64N/A
metadata-eval71.3%
Simplified71.3%
Taylor expanded in x1 around 0
distribute-lft-outN/A
*-lowering-*.f64N/A
+-lowering-+.f6468.6%
Simplified68.6%
if 8.2e11 < x1 Initial program 43.1%
clear-numN/A
inv-powN/A
div-invN/A
unpow-prod-downN/A
inv-powN/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
pow-lowering-pow.f64N/A
Applied egg-rr43.1%
Applied egg-rr43.1%
Taylor expanded in x1 around inf
Simplified43.1%
Taylor expanded in x1 around inf
*-lowering-*.f64N/A
metadata-evalN/A
pow-sqrN/A
*-lowering-*.f64N/A
unpow2N/A
*-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-/.f6493.4%
Simplified93.4%
Final simplification76.8%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (/ (* x2 (* x2 (* x1 8.0))) (+ (* x1 x1) 1.0)))
(t_1 (* (* (* x1 x1) (* x1 x1)) (+ 6.0 (/ -3.0 x1)))))
(if (<= x1 -48000000000.0)
t_1
(if (<= x1 -2.3e-125)
t_0
(if (<= x1 7e-48)
(+ x1 (* -6.0 (+ x1 x2)))
(if (<= x1 900000000000.0) t_0 t_1))))))
double code(double x1, double x2) {
double t_0 = (x2 * (x2 * (x1 * 8.0))) / ((x1 * x1) + 1.0);
double t_1 = ((x1 * x1) * (x1 * x1)) * (6.0 + (-3.0 / x1));
double tmp;
if (x1 <= -48000000000.0) {
tmp = t_1;
} else if (x1 <= -2.3e-125) {
tmp = t_0;
} else if (x1 <= 7e-48) {
tmp = x1 + (-6.0 * (x1 + x2));
} else if (x1 <= 900000000000.0) {
tmp = t_0;
} else {
tmp = t_1;
}
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 * (x2 * (x1 * 8.0d0))) / ((x1 * x1) + 1.0d0)
t_1 = ((x1 * x1) * (x1 * x1)) * (6.0d0 + ((-3.0d0) / x1))
if (x1 <= (-48000000000.0d0)) then
tmp = t_1
else if (x1 <= (-2.3d-125)) then
tmp = t_0
else if (x1 <= 7d-48) then
tmp = x1 + ((-6.0d0) * (x1 + x2))
else if (x1 <= 900000000000.0d0) then
tmp = t_0
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x1, double x2) {
double t_0 = (x2 * (x2 * (x1 * 8.0))) / ((x1 * x1) + 1.0);
double t_1 = ((x1 * x1) * (x1 * x1)) * (6.0 + (-3.0 / x1));
double tmp;
if (x1 <= -48000000000.0) {
tmp = t_1;
} else if (x1 <= -2.3e-125) {
tmp = t_0;
} else if (x1 <= 7e-48) {
tmp = x1 + (-6.0 * (x1 + x2));
} else if (x1 <= 900000000000.0) {
tmp = t_0;
} else {
tmp = t_1;
}
return tmp;
}
def code(x1, x2): t_0 = (x2 * (x2 * (x1 * 8.0))) / ((x1 * x1) + 1.0) t_1 = ((x1 * x1) * (x1 * x1)) * (6.0 + (-3.0 / x1)) tmp = 0 if x1 <= -48000000000.0: tmp = t_1 elif x1 <= -2.3e-125: tmp = t_0 elif x1 <= 7e-48: tmp = x1 + (-6.0 * (x1 + x2)) elif x1 <= 900000000000.0: tmp = t_0 else: tmp = t_1 return tmp
function code(x1, x2) t_0 = Float64(Float64(x2 * Float64(x2 * Float64(x1 * 8.0))) / Float64(Float64(x1 * x1) + 1.0)) t_1 = Float64(Float64(Float64(x1 * x1) * Float64(x1 * x1)) * Float64(6.0 + Float64(-3.0 / x1))) tmp = 0.0 if (x1 <= -48000000000.0) tmp = t_1; elseif (x1 <= -2.3e-125) tmp = t_0; elseif (x1 <= 7e-48) tmp = Float64(x1 + Float64(-6.0 * Float64(x1 + x2))); elseif (x1 <= 900000000000.0) tmp = t_0; else tmp = t_1; end return tmp end
function tmp_2 = code(x1, x2) t_0 = (x2 * (x2 * (x1 * 8.0))) / ((x1 * x1) + 1.0); t_1 = ((x1 * x1) * (x1 * x1)) * (6.0 + (-3.0 / x1)); tmp = 0.0; if (x1 <= -48000000000.0) tmp = t_1; elseif (x1 <= -2.3e-125) tmp = t_0; elseif (x1 <= 7e-48) tmp = x1 + (-6.0 * (x1 + x2)); elseif (x1 <= 900000000000.0) tmp = t_0; else tmp = t_1; end tmp_2 = tmp; end
code[x1_, x2_] := Block[{t$95$0 = N[(N[(x2 * N[(x2 * N[(x1 * 8.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(N[(x1 * x1), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(N[(N[(x1 * x1), $MachinePrecision] * N[(x1 * x1), $MachinePrecision]), $MachinePrecision] * N[(6.0 + N[(-3.0 / x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x1, -48000000000.0], t$95$1, If[LessEqual[x1, -2.3e-125], t$95$0, If[LessEqual[x1, 7e-48], N[(x1 + N[(-6.0 * N[(x1 + x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 900000000000.0], t$95$0, t$95$1]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x2 \cdot \left(x2 \cdot \left(x1 \cdot 8\right)\right)}{x1 \cdot x1 + 1}\\
t_1 := \left(\left(x1 \cdot x1\right) \cdot \left(x1 \cdot x1\right)\right) \cdot \left(6 + \frac{-3}{x1}\right)\\
\mathbf{if}\;x1 \leq -48000000000:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;x1 \leq -2.3 \cdot 10^{-125}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;x1 \leq 7 \cdot 10^{-48}:\\
\;\;\;\;x1 + -6 \cdot \left(x1 + x2\right)\\
\mathbf{elif}\;x1 \leq 900000000000:\\
\;\;\;\;t\_0\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if x1 < -4.8e10 or 9e11 < x1 Initial program 36.6%
clear-numN/A
inv-powN/A
div-invN/A
unpow-prod-downN/A
inv-powN/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
pow-lowering-pow.f64N/A
Applied egg-rr36.6%
Applied egg-rr36.6%
Taylor expanded in x1 around inf
Simplified36.6%
Taylor expanded in x1 around inf
*-lowering-*.f64N/A
metadata-evalN/A
pow-sqrN/A
*-lowering-*.f64N/A
unpow2N/A
*-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-/.f6491.5%
Simplified91.5%
if -4.8e10 < x1 < -2.2999999999999999e-125 or 6.99999999999999982e-48 < x1 < 9e11Initial program 99.2%
Taylor expanded in x2 around inf
Simplified58.4%
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-*.f6445.9%
Simplified45.9%
/-lowering-/.f64N/A
associate-*r*N/A
associate-*r*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f6455.8%
Applied egg-rr55.8%
if -2.2999999999999999e-125 < x1 < 6.99999999999999982e-48Initial program 99.6%
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
/-lowering-/.f64N/A
metadata-eval71.3%
Simplified71.3%
Taylor expanded in x1 around 0
distribute-lft-outN/A
*-lowering-*.f64N/A
+-lowering-+.f6468.6%
Simplified68.6%
Final simplification76.8%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (/ (* 8.0 (* x1 (* x2 x2))) (+ (* x1 x1) 1.0)))
(t_1 (* (* (* x1 x1) (* x1 x1)) (+ 6.0 (/ -3.0 x1)))))
(if (<= x1 -15500000000000.0)
t_1
(if (<= x1 -4.2e-53)
t_0
(if (<= x1 1.3e-36)
(+ x1 (* -6.0 (+ x1 x2)))
(if (<= x1 1050000000000.0) t_0 t_1))))))
double code(double x1, double x2) {
double t_0 = (8.0 * (x1 * (x2 * x2))) / ((x1 * x1) + 1.0);
double t_1 = ((x1 * x1) * (x1 * x1)) * (6.0 + (-3.0 / x1));
double tmp;
if (x1 <= -15500000000000.0) {
tmp = t_1;
} else if (x1 <= -4.2e-53) {
tmp = t_0;
} else if (x1 <= 1.3e-36) {
tmp = x1 + (-6.0 * (x1 + x2));
} else if (x1 <= 1050000000000.0) {
tmp = t_0;
} else {
tmp = t_1;
}
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 = (8.0d0 * (x1 * (x2 * x2))) / ((x1 * x1) + 1.0d0)
t_1 = ((x1 * x1) * (x1 * x1)) * (6.0d0 + ((-3.0d0) / x1))
if (x1 <= (-15500000000000.0d0)) then
tmp = t_1
else if (x1 <= (-4.2d-53)) then
tmp = t_0
else if (x1 <= 1.3d-36) then
tmp = x1 + ((-6.0d0) * (x1 + x2))
else if (x1 <= 1050000000000.0d0) then
tmp = t_0
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x1, double x2) {
double t_0 = (8.0 * (x1 * (x2 * x2))) / ((x1 * x1) + 1.0);
double t_1 = ((x1 * x1) * (x1 * x1)) * (6.0 + (-3.0 / x1));
double tmp;
if (x1 <= -15500000000000.0) {
tmp = t_1;
} else if (x1 <= -4.2e-53) {
tmp = t_0;
} else if (x1 <= 1.3e-36) {
tmp = x1 + (-6.0 * (x1 + x2));
} else if (x1 <= 1050000000000.0) {
tmp = t_0;
} else {
tmp = t_1;
}
return tmp;
}
def code(x1, x2): t_0 = (8.0 * (x1 * (x2 * x2))) / ((x1 * x1) + 1.0) t_1 = ((x1 * x1) * (x1 * x1)) * (6.0 + (-3.0 / x1)) tmp = 0 if x1 <= -15500000000000.0: tmp = t_1 elif x1 <= -4.2e-53: tmp = t_0 elif x1 <= 1.3e-36: tmp = x1 + (-6.0 * (x1 + x2)) elif x1 <= 1050000000000.0: tmp = t_0 else: tmp = t_1 return tmp
function code(x1, x2) t_0 = Float64(Float64(8.0 * Float64(x1 * Float64(x2 * x2))) / Float64(Float64(x1 * x1) + 1.0)) t_1 = Float64(Float64(Float64(x1 * x1) * Float64(x1 * x1)) * Float64(6.0 + Float64(-3.0 / x1))) tmp = 0.0 if (x1 <= -15500000000000.0) tmp = t_1; elseif (x1 <= -4.2e-53) tmp = t_0; elseif (x1 <= 1.3e-36) tmp = Float64(x1 + Float64(-6.0 * Float64(x1 + x2))); elseif (x1 <= 1050000000000.0) tmp = t_0; else tmp = t_1; end return tmp end
function tmp_2 = code(x1, x2) t_0 = (8.0 * (x1 * (x2 * x2))) / ((x1 * x1) + 1.0); t_1 = ((x1 * x1) * (x1 * x1)) * (6.0 + (-3.0 / x1)); tmp = 0.0; if (x1 <= -15500000000000.0) tmp = t_1; elseif (x1 <= -4.2e-53) tmp = t_0; elseif (x1 <= 1.3e-36) tmp = x1 + (-6.0 * (x1 + x2)); elseif (x1 <= 1050000000000.0) tmp = t_0; else tmp = t_1; end tmp_2 = tmp; end
code[x1_, x2_] := Block[{t$95$0 = N[(N[(8.0 * N[(x1 * N[(x2 * x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(N[(x1 * x1), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(N[(N[(x1 * x1), $MachinePrecision] * N[(x1 * x1), $MachinePrecision]), $MachinePrecision] * N[(6.0 + N[(-3.0 / x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x1, -15500000000000.0], t$95$1, If[LessEqual[x1, -4.2e-53], t$95$0, If[LessEqual[x1, 1.3e-36], N[(x1 + N[(-6.0 * N[(x1 + x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 1050000000000.0], t$95$0, t$95$1]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{8 \cdot \left(x1 \cdot \left(x2 \cdot x2\right)\right)}{x1 \cdot x1 + 1}\\
t_1 := \left(\left(x1 \cdot x1\right) \cdot \left(x1 \cdot x1\right)\right) \cdot \left(6 + \frac{-3}{x1}\right)\\
\mathbf{if}\;x1 \leq -15500000000000:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;x1 \leq -4.2 \cdot 10^{-53}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;x1 \leq 1.3 \cdot 10^{-36}:\\
\;\;\;\;x1 + -6 \cdot \left(x1 + x2\right)\\
\mathbf{elif}\;x1 \leq 1050000000000:\\
\;\;\;\;t\_0\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if x1 < -1.55e13 or 1.05e12 < x1 Initial program 36.6%
clear-numN/A
inv-powN/A
div-invN/A
unpow-prod-downN/A
inv-powN/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
pow-lowering-pow.f64N/A
Applied egg-rr36.6%
Applied egg-rr36.6%
Taylor expanded in x1 around inf
Simplified36.6%
Taylor expanded in x1 around inf
*-lowering-*.f64N/A
metadata-evalN/A
pow-sqrN/A
*-lowering-*.f64N/A
unpow2N/A
*-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-/.f6491.5%
Simplified91.5%
if -1.55e13 < x1 < -4.19999999999999955e-53 or 1.3e-36 < x1 < 1.05e12Initial program 99.1%
Taylor expanded in x2 around inf
Simplified62.5%
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-*.f6459.2%
Simplified59.2%
if -4.19999999999999955e-53 < x1 < 1.3e-36Initial program 99.6%
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
/-lowering-/.f64N/A
metadata-eval66.1%
Simplified66.1%
Taylor expanded in x1 around 0
distribute-lft-outN/A
*-lowering-*.f64N/A
+-lowering-+.f6463.8%
Simplified63.8%
Final simplification75.9%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (* (* (* x1 x1) (* x1 x1)) (+ 6.0 (/ -3.0 x1)))))
(if (<= x1 -23000000000.0)
t_0
(if (<= x1 -3.8e-52)
(* 8.0 (* x1 (* x2 x2)))
(if (<= x1 1.4e-27)
(+ x1 (* -6.0 (+ x1 x2)))
(if (<= x1 560000000000.0) (/ (* 8.0 (* x2 x2)) x1) t_0))))))
double code(double x1, double x2) {
double t_0 = ((x1 * x1) * (x1 * x1)) * (6.0 + (-3.0 / x1));
double tmp;
if (x1 <= -23000000000.0) {
tmp = t_0;
} else if (x1 <= -3.8e-52) {
tmp = 8.0 * (x1 * (x2 * x2));
} else if (x1 <= 1.4e-27) {
tmp = x1 + (-6.0 * (x1 + x2));
} else if (x1 <= 560000000000.0) {
tmp = (8.0 * (x2 * x2)) / 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) * (x1 * x1)) * (6.0d0 + ((-3.0d0) / x1))
if (x1 <= (-23000000000.0d0)) then
tmp = t_0
else if (x1 <= (-3.8d-52)) then
tmp = 8.0d0 * (x1 * (x2 * x2))
else if (x1 <= 1.4d-27) then
tmp = x1 + ((-6.0d0) * (x1 + x2))
else if (x1 <= 560000000000.0d0) then
tmp = (8.0d0 * (x2 * x2)) / x1
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 + (-3.0 / x1));
double tmp;
if (x1 <= -23000000000.0) {
tmp = t_0;
} else if (x1 <= -3.8e-52) {
tmp = 8.0 * (x1 * (x2 * x2));
} else if (x1 <= 1.4e-27) {
tmp = x1 + (-6.0 * (x1 + x2));
} else if (x1 <= 560000000000.0) {
tmp = (8.0 * (x2 * x2)) / x1;
} else {
tmp = t_0;
}
return tmp;
}
def code(x1, x2): t_0 = ((x1 * x1) * (x1 * x1)) * (6.0 + (-3.0 / x1)) tmp = 0 if x1 <= -23000000000.0: tmp = t_0 elif x1 <= -3.8e-52: tmp = 8.0 * (x1 * (x2 * x2)) elif x1 <= 1.4e-27: tmp = x1 + (-6.0 * (x1 + x2)) elif x1 <= 560000000000.0: tmp = (8.0 * (x2 * x2)) / x1 else: tmp = t_0 return tmp
function code(x1, x2) t_0 = Float64(Float64(Float64(x1 * x1) * Float64(x1 * x1)) * Float64(6.0 + Float64(-3.0 / x1))) tmp = 0.0 if (x1 <= -23000000000.0) tmp = t_0; elseif (x1 <= -3.8e-52) tmp = Float64(8.0 * Float64(x1 * Float64(x2 * x2))); elseif (x1 <= 1.4e-27) tmp = Float64(x1 + Float64(-6.0 * Float64(x1 + x2))); elseif (x1 <= 560000000000.0) tmp = Float64(Float64(8.0 * Float64(x2 * x2)) / x1); else tmp = t_0; end return tmp end
function tmp_2 = code(x1, x2) t_0 = ((x1 * x1) * (x1 * x1)) * (6.0 + (-3.0 / x1)); tmp = 0.0; if (x1 <= -23000000000.0) tmp = t_0; elseif (x1 <= -3.8e-52) tmp = 8.0 * (x1 * (x2 * x2)); elseif (x1 <= 1.4e-27) tmp = x1 + (-6.0 * (x1 + x2)); elseif (x1 <= 560000000000.0) tmp = (8.0 * (x2 * x2)) / x1; else tmp = t_0; end tmp_2 = tmp; end
code[x1_, x2_] := Block[{t$95$0 = N[(N[(N[(x1 * x1), $MachinePrecision] * N[(x1 * x1), $MachinePrecision]), $MachinePrecision] * N[(6.0 + N[(-3.0 / x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x1, -23000000000.0], t$95$0, If[LessEqual[x1, -3.8e-52], N[(8.0 * N[(x1 * N[(x2 * x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 1.4e-27], N[(x1 + N[(-6.0 * N[(x1 + x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 560000000000.0], N[(N[(8.0 * N[(x2 * x2), $MachinePrecision]), $MachinePrecision] / x1), $MachinePrecision], t$95$0]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \left(\left(x1 \cdot x1\right) \cdot \left(x1 \cdot x1\right)\right) \cdot \left(6 + \frac{-3}{x1}\right)\\
\mathbf{if}\;x1 \leq -23000000000:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;x1 \leq -3.8 \cdot 10^{-52}:\\
\;\;\;\;8 \cdot \left(x1 \cdot \left(x2 \cdot x2\right)\right)\\
\mathbf{elif}\;x1 \leq 1.4 \cdot 10^{-27}:\\
\;\;\;\;x1 + -6 \cdot \left(x1 + x2\right)\\
\mathbf{elif}\;x1 \leq 560000000000:\\
\;\;\;\;\frac{8 \cdot \left(x2 \cdot x2\right)}{x1}\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
if x1 < -2.3e10 or 5.6e11 < x1 Initial program 36.6%
clear-numN/A
inv-powN/A
div-invN/A
unpow-prod-downN/A
inv-powN/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
pow-lowering-pow.f64N/A
Applied egg-rr36.6%
Applied egg-rr36.6%
Taylor expanded in x1 around inf
Simplified36.6%
Taylor expanded in x1 around inf
*-lowering-*.f64N/A
metadata-evalN/A
pow-sqrN/A
*-lowering-*.f64N/A
unpow2N/A
*-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-/.f6491.5%
Simplified91.5%
if -2.3e10 < x1 < -3.8000000000000003e-52Initial program 99.3%
Taylor expanded in x2 around inf
Simplified65.2%
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.7%
Simplified61.7%
Taylor expanded in x1 around 0
*-lowering-*.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6451.8%
Simplified51.8%
if -3.8000000000000003e-52 < x1 < 1.4e-27Initial program 99.6%
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
/-lowering-/.f64N/A
metadata-eval65.0%
Simplified65.0%
Taylor expanded in x1 around 0
distribute-lft-outN/A
*-lowering-*.f64N/A
+-lowering-+.f6462.8%
Simplified62.8%
if 1.4e-27 < x1 < 5.6e11Initial program 98.6%
Taylor expanded in x2 around inf
Simplified60.1%
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-*.f6456.5%
Simplified56.5%
Taylor expanded in x1 around inf
associate-*r/N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6456.4%
Simplified56.4%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0
(+
x1
(*
(+ 6.0 (/ (+ -3.0 (/ (+ -3.0 (* x2 8.0)) x1)) x1))
(* x1 (* x1 (* x1 x1)))))))
(if (<= x1 -1660000000.0)
t_0
(if (<= x1 220000.0)
(+ (* x2 -6.0) (* x1 (+ -1.0 (* (* x2 4.0) (+ (* 2.0 x2) -3.0)))))
t_0))))
double code(double x1, double x2) {
double t_0 = x1 + ((6.0 + ((-3.0 + ((-3.0 + (x2 * 8.0)) / x1)) / x1)) * (x1 * (x1 * (x1 * x1))));
double tmp;
if (x1 <= -1660000000.0) {
tmp = t_0;
} else if (x1 <= 220000.0) {
tmp = (x2 * -6.0) + (x1 * (-1.0 + ((x2 * 4.0) * ((2.0 * x2) + -3.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 + ((6.0d0 + (((-3.0d0) + (((-3.0d0) + (x2 * 8.0d0)) / x1)) / x1)) * (x1 * (x1 * (x1 * x1))))
if (x1 <= (-1660000000.0d0)) then
tmp = t_0
else if (x1 <= 220000.0d0) then
tmp = (x2 * (-6.0d0)) + (x1 * ((-1.0d0) + ((x2 * 4.0d0) * ((2.0d0 * x2) + (-3.0d0)))))
else
tmp = t_0
end if
code = tmp
end function
public static double code(double x1, double x2) {
double t_0 = x1 + ((6.0 + ((-3.0 + ((-3.0 + (x2 * 8.0)) / x1)) / x1)) * (x1 * (x1 * (x1 * x1))));
double tmp;
if (x1 <= -1660000000.0) {
tmp = t_0;
} else if (x1 <= 220000.0) {
tmp = (x2 * -6.0) + (x1 * (-1.0 + ((x2 * 4.0) * ((2.0 * x2) + -3.0))));
} else {
tmp = t_0;
}
return tmp;
}
def code(x1, x2): t_0 = x1 + ((6.0 + ((-3.0 + ((-3.0 + (x2 * 8.0)) / x1)) / x1)) * (x1 * (x1 * (x1 * x1)))) tmp = 0 if x1 <= -1660000000.0: tmp = t_0 elif x1 <= 220000.0: tmp = (x2 * -6.0) + (x1 * (-1.0 + ((x2 * 4.0) * ((2.0 * x2) + -3.0)))) else: tmp = t_0 return tmp
function code(x1, x2) t_0 = Float64(x1 + Float64(Float64(6.0 + Float64(Float64(-3.0 + Float64(Float64(-3.0 + Float64(x2 * 8.0)) / x1)) / x1)) * Float64(x1 * Float64(x1 * Float64(x1 * x1))))) tmp = 0.0 if (x1 <= -1660000000.0) tmp = t_0; elseif (x1 <= 220000.0) tmp = Float64(Float64(x2 * -6.0) + Float64(x1 * Float64(-1.0 + Float64(Float64(x2 * 4.0) * Float64(Float64(2.0 * x2) + -3.0))))); else tmp = t_0; end return tmp end
function tmp_2 = code(x1, x2) t_0 = x1 + ((6.0 + ((-3.0 + ((-3.0 + (x2 * 8.0)) / x1)) / x1)) * (x1 * (x1 * (x1 * x1)))); tmp = 0.0; if (x1 <= -1660000000.0) tmp = t_0; elseif (x1 <= 220000.0) tmp = (x2 * -6.0) + (x1 * (-1.0 + ((x2 * 4.0) * ((2.0 * x2) + -3.0)))); else tmp = t_0; end tmp_2 = tmp; end
code[x1_, x2_] := Block[{t$95$0 = N[(x1 + N[(N[(6.0 + N[(N[(-3.0 + N[(N[(-3.0 + N[(x2 * 8.0), $MachinePrecision]), $MachinePrecision] / x1), $MachinePrecision]), $MachinePrecision] / x1), $MachinePrecision]), $MachinePrecision] * N[(x1 * N[(x1 * N[(x1 * x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x1, -1660000000.0], t$95$0, If[LessEqual[x1, 220000.0], N[(N[(x2 * -6.0), $MachinePrecision] + N[(x1 * N[(-1.0 + N[(N[(x2 * 4.0), $MachinePrecision] * N[(N[(2.0 * x2), $MachinePrecision] + -3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$0]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x1 + \left(6 + \frac{-3 + \frac{-3 + x2 \cdot 8}{x1}}{x1}\right) \cdot \left(x1 \cdot \left(x1 \cdot \left(x1 \cdot x1\right)\right)\right)\\
\mathbf{if}\;x1 \leq -1660000000:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;x1 \leq 220000:\\
\;\;\;\;x2 \cdot -6 + x1 \cdot \left(-1 + \left(x2 \cdot 4\right) \cdot \left(2 \cdot x2 + -3\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
if x1 < -1.66e9 or 2.2e5 < x1 Initial program 39.2%
Taylor expanded in x1 around -inf
*-lowering-*.f64N/A
pow-lowering-pow.f64N/A
mul-1-negN/A
unsub-negN/A
--lowering--.f64N/A
/-lowering-/.f64N/A
Simplified91.8%
+-commutativeN/A
+-lowering-+.f64N/A
Applied egg-rr91.8%
if -1.66e9 < x1 < 2.2e5Initial program 99.5%
clear-numN/A
inv-powN/A
div-invN/A
unpow-prod-downN/A
inv-powN/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
pow-lowering-pow.f64N/A
Applied egg-rr99.5%
Applied egg-rr99.3%
Taylor expanded in x1 around 0
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
sub-negN/A
metadata-evalN/A
+-lowering-+.f64N/A
associate-*r*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
sub-negN/A
metadata-evalN/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f6486.5%
Simplified86.5%
Final simplification89.1%
(FPCore (x1 x2)
:precision binary64
(if (<= x1 -350000000000.0)
(+ x1 (* 6.0 (* x1 (* x1 (* x1 x1)))))
(if (<= x1 -1.05e-51)
(* 8.0 (* x1 (* x2 x2)))
(if (<= x1 2.4e-27)
(+ x1 (* -6.0 (+ x1 x2)))
(if (<= x1 1000000000000.0)
(/ (* 8.0 (* x2 x2)) x1)
(* 6.0 (* (* x1 x1) (* x1 x1))))))))
double code(double x1, double x2) {
double tmp;
if (x1 <= -350000000000.0) {
tmp = x1 + (6.0 * (x1 * (x1 * (x1 * x1))));
} else if (x1 <= -1.05e-51) {
tmp = 8.0 * (x1 * (x2 * x2));
} else if (x1 <= 2.4e-27) {
tmp = x1 + (-6.0 * (x1 + x2));
} else if (x1 <= 1000000000000.0) {
tmp = (8.0 * (x2 * x2)) / x1;
} else {
tmp = 6.0 * ((x1 * x1) * (x1 * x1));
}
return tmp;
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
real(8) :: tmp
if (x1 <= (-350000000000.0d0)) then
tmp = x1 + (6.0d0 * (x1 * (x1 * (x1 * x1))))
else if (x1 <= (-1.05d-51)) then
tmp = 8.0d0 * (x1 * (x2 * x2))
else if (x1 <= 2.4d-27) then
tmp = x1 + ((-6.0d0) * (x1 + x2))
else if (x1 <= 1000000000000.0d0) then
tmp = (8.0d0 * (x2 * x2)) / x1
else
tmp = 6.0d0 * ((x1 * x1) * (x1 * x1))
end if
code = tmp
end function
public static double code(double x1, double x2) {
double tmp;
if (x1 <= -350000000000.0) {
tmp = x1 + (6.0 * (x1 * (x1 * (x1 * x1))));
} else if (x1 <= -1.05e-51) {
tmp = 8.0 * (x1 * (x2 * x2));
} else if (x1 <= 2.4e-27) {
tmp = x1 + (-6.0 * (x1 + x2));
} else if (x1 <= 1000000000000.0) {
tmp = (8.0 * (x2 * x2)) / x1;
} else {
tmp = 6.0 * ((x1 * x1) * (x1 * x1));
}
return tmp;
}
def code(x1, x2): tmp = 0 if x1 <= -350000000000.0: tmp = x1 + (6.0 * (x1 * (x1 * (x1 * x1)))) elif x1 <= -1.05e-51: tmp = 8.0 * (x1 * (x2 * x2)) elif x1 <= 2.4e-27: tmp = x1 + (-6.0 * (x1 + x2)) elif x1 <= 1000000000000.0: tmp = (8.0 * (x2 * x2)) / x1 else: tmp = 6.0 * ((x1 * x1) * (x1 * x1)) return tmp
function code(x1, x2) tmp = 0.0 if (x1 <= -350000000000.0) tmp = Float64(x1 + Float64(6.0 * Float64(x1 * Float64(x1 * Float64(x1 * x1))))); elseif (x1 <= -1.05e-51) tmp = Float64(8.0 * Float64(x1 * Float64(x2 * x2))); elseif (x1 <= 2.4e-27) tmp = Float64(x1 + Float64(-6.0 * Float64(x1 + x2))); elseif (x1 <= 1000000000000.0) tmp = Float64(Float64(8.0 * Float64(x2 * x2)) / x1); else tmp = Float64(6.0 * Float64(Float64(x1 * x1) * Float64(x1 * x1))); end return tmp end
function tmp_2 = code(x1, x2) tmp = 0.0; if (x1 <= -350000000000.0) tmp = x1 + (6.0 * (x1 * (x1 * (x1 * x1)))); elseif (x1 <= -1.05e-51) tmp = 8.0 * (x1 * (x2 * x2)); elseif (x1 <= 2.4e-27) tmp = x1 + (-6.0 * (x1 + x2)); elseif (x1 <= 1000000000000.0) tmp = (8.0 * (x2 * x2)) / x1; else tmp = 6.0 * ((x1 * x1) * (x1 * x1)); end tmp_2 = tmp; end
code[x1_, x2_] := If[LessEqual[x1, -350000000000.0], N[(x1 + N[(6.0 * N[(x1 * N[(x1 * N[(x1 * x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, -1.05e-51], N[(8.0 * N[(x1 * N[(x2 * x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 2.4e-27], N[(x1 + N[(-6.0 * N[(x1 + x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 1000000000000.0], N[(N[(8.0 * N[(x2 * x2), $MachinePrecision]), $MachinePrecision] / x1), $MachinePrecision], N[(6.0 * N[(N[(x1 * x1), $MachinePrecision] * N[(x1 * x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x1 \leq -350000000000:\\
\;\;\;\;x1 + 6 \cdot \left(x1 \cdot \left(x1 \cdot \left(x1 \cdot x1\right)\right)\right)\\
\mathbf{elif}\;x1 \leq -1.05 \cdot 10^{-51}:\\
\;\;\;\;8 \cdot \left(x1 \cdot \left(x2 \cdot x2\right)\right)\\
\mathbf{elif}\;x1 \leq 2.4 \cdot 10^{-27}:\\
\;\;\;\;x1 + -6 \cdot \left(x1 + x2\right)\\
\mathbf{elif}\;x1 \leq 1000000000000:\\
\;\;\;\;\frac{8 \cdot \left(x2 \cdot x2\right)}{x1}\\
\mathbf{else}:\\
\;\;\;\;6 \cdot \left(\left(x1 \cdot x1\right) \cdot \left(x1 \cdot x1\right)\right)\\
\end{array}
\end{array}
if x1 < -3.5e11Initial program 32.7%
Taylor expanded in x1 around -inf
*-lowering-*.f64N/A
pow-lowering-pow.f64N/A
mul-1-negN/A
unsub-negN/A
--lowering--.f64N/A
/-lowering-/.f64N/A
Simplified91.9%
+-commutativeN/A
+-lowering-+.f64N/A
Applied egg-rr91.9%
Taylor expanded in x1 around inf
Simplified90.3%
if -3.5e11 < x1 < -1.05000000000000001e-51Initial program 99.3%
Taylor expanded in x2 around inf
Simplified65.2%
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.7%
Simplified61.7%
Taylor expanded in x1 around 0
*-lowering-*.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6451.8%
Simplified51.8%
if -1.05000000000000001e-51 < x1 < 2.40000000000000002e-27Initial program 99.6%
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
/-lowering-/.f64N/A
metadata-eval65.0%
Simplified65.0%
Taylor expanded in x1 around 0
distribute-lft-outN/A
*-lowering-*.f64N/A
+-lowering-+.f6462.8%
Simplified62.8%
if 2.40000000000000002e-27 < x1 < 1e12Initial program 98.6%
Taylor expanded in x2 around inf
Simplified60.1%
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-*.f6456.5%
Simplified56.5%
Taylor expanded in x1 around inf
associate-*r/N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6456.4%
Simplified56.4%
if 1e12 < x1 Initial program 43.1%
clear-numN/A
inv-powN/A
div-invN/A
unpow-prod-downN/A
inv-powN/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
pow-lowering-pow.f64N/A
Applied egg-rr43.1%
Applied egg-rr43.1%
Taylor expanded in x1 around inf
Simplified43.1%
Taylor expanded in x1 around inf
*-lowering-*.f64N/A
metadata-evalN/A
pow-sqrN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6493.1%
Simplified93.1%
Final simplification74.8%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (* 6.0 (* (* x1 x1) (* x1 x1)))))
(if (<= x1 -36000000000.0)
t_0
(if (<= x1 -3.65e-53)
(* 8.0 (* x1 (* x2 x2)))
(if (<= x1 3.7e-26)
(+ x1 (* -6.0 (+ x1 x2)))
(if (<= x1 620000000000.0) (/ (* 8.0 (* x2 x2)) x1) t_0))))))
double code(double x1, double x2) {
double t_0 = 6.0 * ((x1 * x1) * (x1 * x1));
double tmp;
if (x1 <= -36000000000.0) {
tmp = t_0;
} else if (x1 <= -3.65e-53) {
tmp = 8.0 * (x1 * (x2 * x2));
} else if (x1 <= 3.7e-26) {
tmp = x1 + (-6.0 * (x1 + x2));
} else if (x1 <= 620000000000.0) {
tmp = (8.0 * (x2 * x2)) / 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 = 6.0d0 * ((x1 * x1) * (x1 * x1))
if (x1 <= (-36000000000.0d0)) then
tmp = t_0
else if (x1 <= (-3.65d-53)) then
tmp = 8.0d0 * (x1 * (x2 * x2))
else if (x1 <= 3.7d-26) then
tmp = x1 + ((-6.0d0) * (x1 + x2))
else if (x1 <= 620000000000.0d0) then
tmp = (8.0d0 * (x2 * x2)) / x1
else
tmp = t_0
end if
code = tmp
end function
public static double code(double x1, double x2) {
double t_0 = 6.0 * ((x1 * x1) * (x1 * x1));
double tmp;
if (x1 <= -36000000000.0) {
tmp = t_0;
} else if (x1 <= -3.65e-53) {
tmp = 8.0 * (x1 * (x2 * x2));
} else if (x1 <= 3.7e-26) {
tmp = x1 + (-6.0 * (x1 + x2));
} else if (x1 <= 620000000000.0) {
tmp = (8.0 * (x2 * x2)) / x1;
} else {
tmp = t_0;
}
return tmp;
}
def code(x1, x2): t_0 = 6.0 * ((x1 * x1) * (x1 * x1)) tmp = 0 if x1 <= -36000000000.0: tmp = t_0 elif x1 <= -3.65e-53: tmp = 8.0 * (x1 * (x2 * x2)) elif x1 <= 3.7e-26: tmp = x1 + (-6.0 * (x1 + x2)) elif x1 <= 620000000000.0: tmp = (8.0 * (x2 * x2)) / x1 else: tmp = t_0 return tmp
function code(x1, x2) t_0 = Float64(6.0 * Float64(Float64(x1 * x1) * Float64(x1 * x1))) tmp = 0.0 if (x1 <= -36000000000.0) tmp = t_0; elseif (x1 <= -3.65e-53) tmp = Float64(8.0 * Float64(x1 * Float64(x2 * x2))); elseif (x1 <= 3.7e-26) tmp = Float64(x1 + Float64(-6.0 * Float64(x1 + x2))); elseif (x1 <= 620000000000.0) tmp = Float64(Float64(8.0 * Float64(x2 * x2)) / x1); else tmp = t_0; end return tmp end
function tmp_2 = code(x1, x2) t_0 = 6.0 * ((x1 * x1) * (x1 * x1)); tmp = 0.0; if (x1 <= -36000000000.0) tmp = t_0; elseif (x1 <= -3.65e-53) tmp = 8.0 * (x1 * (x2 * x2)); elseif (x1 <= 3.7e-26) tmp = x1 + (-6.0 * (x1 + x2)); elseif (x1 <= 620000000000.0) tmp = (8.0 * (x2 * x2)) / x1; else tmp = t_0; end tmp_2 = tmp; end
code[x1_, x2_] := Block[{t$95$0 = N[(6.0 * N[(N[(x1 * x1), $MachinePrecision] * N[(x1 * x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x1, -36000000000.0], t$95$0, If[LessEqual[x1, -3.65e-53], N[(8.0 * N[(x1 * N[(x2 * x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 3.7e-26], N[(x1 + N[(-6.0 * N[(x1 + x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 620000000000.0], N[(N[(8.0 * N[(x2 * x2), $MachinePrecision]), $MachinePrecision] / x1), $MachinePrecision], t$95$0]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := 6 \cdot \left(\left(x1 \cdot x1\right) \cdot \left(x1 \cdot x1\right)\right)\\
\mathbf{if}\;x1 \leq -36000000000:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;x1 \leq -3.65 \cdot 10^{-53}:\\
\;\;\;\;8 \cdot \left(x1 \cdot \left(x2 \cdot x2\right)\right)\\
\mathbf{elif}\;x1 \leq 3.7 \cdot 10^{-26}:\\
\;\;\;\;x1 + -6 \cdot \left(x1 + x2\right)\\
\mathbf{elif}\;x1 \leq 620000000000:\\
\;\;\;\;\frac{8 \cdot \left(x2 \cdot x2\right)}{x1}\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
if x1 < -3.6e10 or 6.2e11 < x1 Initial program 36.6%
clear-numN/A
inv-powN/A
div-invN/A
unpow-prod-downN/A
inv-powN/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
pow-lowering-pow.f64N/A
Applied egg-rr36.6%
Applied egg-rr36.6%
Taylor expanded in x1 around inf
Simplified36.6%
Taylor expanded in x1 around inf
*-lowering-*.f64N/A
metadata-evalN/A
pow-sqrN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6491.3%
Simplified91.3%
if -3.6e10 < x1 < -3.65000000000000008e-53Initial program 99.3%
Taylor expanded in x2 around inf
Simplified65.2%
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.7%
Simplified61.7%
Taylor expanded in x1 around 0
*-lowering-*.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6451.8%
Simplified51.8%
if -3.65000000000000008e-53 < x1 < 3.6999999999999999e-26Initial program 99.6%
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
/-lowering-/.f64N/A
metadata-eval65.0%
Simplified65.0%
Taylor expanded in x1 around 0
distribute-lft-outN/A
*-lowering-*.f64N/A
+-lowering-+.f6462.8%
Simplified62.8%
if 3.6999999999999999e-26 < x1 < 6.2e11Initial program 98.6%
Taylor expanded in x2 around inf
Simplified60.1%
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-*.f6456.5%
Simplified56.5%
Taylor expanded in x1 around inf
associate-*r/N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6456.4%
Simplified56.4%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0
(*
x1
(+ 1.0 (* x1 (+ (+ -3.0 (* x1 (+ (* x1 6.0) -3.0))) (* x2 8.0)))))))
(if (<= x1 -1050000000.0)
t_0
(if (<= x1 260000.0)
(+ (* x2 -6.0) (* x1 (+ -1.0 (* (* x2 4.0) (+ (* 2.0 x2) -3.0)))))
t_0))))
double code(double x1, double x2) {
double t_0 = x1 * (1.0 + (x1 * ((-3.0 + (x1 * ((x1 * 6.0) + -3.0))) + (x2 * 8.0))));
double tmp;
if (x1 <= -1050000000.0) {
tmp = t_0;
} else if (x1 <= 260000.0) {
tmp = (x2 * -6.0) + (x1 * (-1.0 + ((x2 * 4.0) * ((2.0 * x2) + -3.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 * (1.0d0 + (x1 * (((-3.0d0) + (x1 * ((x1 * 6.0d0) + (-3.0d0)))) + (x2 * 8.0d0))))
if (x1 <= (-1050000000.0d0)) then
tmp = t_0
else if (x1 <= 260000.0d0) then
tmp = (x2 * (-6.0d0)) + (x1 * ((-1.0d0) + ((x2 * 4.0d0) * ((2.0d0 * x2) + (-3.0d0)))))
else
tmp = t_0
end if
code = tmp
end function
public static double code(double x1, double x2) {
double t_0 = x1 * (1.0 + (x1 * ((-3.0 + (x1 * ((x1 * 6.0) + -3.0))) + (x2 * 8.0))));
double tmp;
if (x1 <= -1050000000.0) {
tmp = t_0;
} else if (x1 <= 260000.0) {
tmp = (x2 * -6.0) + (x1 * (-1.0 + ((x2 * 4.0) * ((2.0 * x2) + -3.0))));
} else {
tmp = t_0;
}
return tmp;
}
def code(x1, x2): t_0 = x1 * (1.0 + (x1 * ((-3.0 + (x1 * ((x1 * 6.0) + -3.0))) + (x2 * 8.0)))) tmp = 0 if x1 <= -1050000000.0: tmp = t_0 elif x1 <= 260000.0: tmp = (x2 * -6.0) + (x1 * (-1.0 + ((x2 * 4.0) * ((2.0 * x2) + -3.0)))) else: tmp = t_0 return tmp
function code(x1, x2) t_0 = Float64(x1 * Float64(1.0 + Float64(x1 * Float64(Float64(-3.0 + Float64(x1 * Float64(Float64(x1 * 6.0) + -3.0))) + Float64(x2 * 8.0))))) tmp = 0.0 if (x1 <= -1050000000.0) tmp = t_0; elseif (x1 <= 260000.0) tmp = Float64(Float64(x2 * -6.0) + Float64(x1 * Float64(-1.0 + Float64(Float64(x2 * 4.0) * Float64(Float64(2.0 * x2) + -3.0))))); else tmp = t_0; end return tmp end
function tmp_2 = code(x1, x2) t_0 = x1 * (1.0 + (x1 * ((-3.0 + (x1 * ((x1 * 6.0) + -3.0))) + (x2 * 8.0)))); tmp = 0.0; if (x1 <= -1050000000.0) tmp = t_0; elseif (x1 <= 260000.0) tmp = (x2 * -6.0) + (x1 * (-1.0 + ((x2 * 4.0) * ((2.0 * x2) + -3.0)))); else tmp = t_0; end tmp_2 = tmp; end
code[x1_, x2_] := Block[{t$95$0 = N[(x1 * N[(1.0 + N[(x1 * N[(N[(-3.0 + N[(x1 * N[(N[(x1 * 6.0), $MachinePrecision] + -3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(x2 * 8.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x1, -1050000000.0], t$95$0, If[LessEqual[x1, 260000.0], N[(N[(x2 * -6.0), $MachinePrecision] + N[(x1 * N[(-1.0 + N[(N[(x2 * 4.0), $MachinePrecision] * N[(N[(2.0 * x2), $MachinePrecision] + -3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$0]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x1 \cdot \left(1 + x1 \cdot \left(\left(-3 + x1 \cdot \left(x1 \cdot 6 + -3\right)\right) + x2 \cdot 8\right)\right)\\
\mathbf{if}\;x1 \leq -1050000000:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;x1 \leq 260000:\\
\;\;\;\;x2 \cdot -6 + x1 \cdot \left(-1 + \left(x2 \cdot 4\right) \cdot \left(2 \cdot x2 + -3\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
if x1 < -1.05e9 or 2.6e5 < x1 Initial program 39.2%
Taylor expanded in x1 around -inf
*-lowering-*.f64N/A
pow-lowering-pow.f64N/A
mul-1-negN/A
unsub-negN/A
--lowering--.f64N/A
/-lowering-/.f64N/A
Simplified91.8%
+-commutativeN/A
+-lowering-+.f64N/A
Applied egg-rr91.8%
Taylor expanded in x1 around 0
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
associate--l+N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
sub-negN/A
metadata-evalN/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
sub-negN/A
metadata-evalN/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f6491.8%
Simplified91.8%
if -1.05e9 < x1 < 2.6e5Initial program 99.5%
clear-numN/A
inv-powN/A
div-invN/A
unpow-prod-downN/A
inv-powN/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
pow-lowering-pow.f64N/A
Applied egg-rr99.5%
Applied egg-rr99.3%
Taylor expanded in x1 around 0
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
sub-negN/A
metadata-evalN/A
+-lowering-+.f64N/A
associate-*r*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
sub-negN/A
metadata-evalN/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f6486.5%
Simplified86.5%
Final simplification89.0%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (* 8.0 (* x1 (* x2 x2)))))
(if (<= x1 -1.05e+92)
(* 8.0 (* x2 (* x1 x1)))
(if (<= x1 -4.6e-54)
t_0
(if (<= x1 1.3e-36)
(+ x1 (* -6.0 (+ x1 x2)))
(if (<= x1 1.65e+229) t_0 (* x2 (+ -6.0 (/ x1 x2)))))))))
double code(double x1, double x2) {
double t_0 = 8.0 * (x1 * (x2 * x2));
double tmp;
if (x1 <= -1.05e+92) {
tmp = 8.0 * (x2 * (x1 * x1));
} else if (x1 <= -4.6e-54) {
tmp = t_0;
} else if (x1 <= 1.3e-36) {
tmp = x1 + (-6.0 * (x1 + x2));
} else if (x1 <= 1.65e+229) {
tmp = t_0;
} else {
tmp = x2 * (-6.0 + (x1 / x2));
}
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.05d+92)) then
tmp = 8.0d0 * (x2 * (x1 * x1))
else if (x1 <= (-4.6d-54)) then
tmp = t_0
else if (x1 <= 1.3d-36) then
tmp = x1 + ((-6.0d0) * (x1 + x2))
else if (x1 <= 1.65d+229) then
tmp = t_0
else
tmp = x2 * ((-6.0d0) + (x1 / x2))
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.05e+92) {
tmp = 8.0 * (x2 * (x1 * x1));
} else if (x1 <= -4.6e-54) {
tmp = t_0;
} else if (x1 <= 1.3e-36) {
tmp = x1 + (-6.0 * (x1 + x2));
} else if (x1 <= 1.65e+229) {
tmp = t_0;
} else {
tmp = x2 * (-6.0 + (x1 / x2));
}
return tmp;
}
def code(x1, x2): t_0 = 8.0 * (x1 * (x2 * x2)) tmp = 0 if x1 <= -1.05e+92: tmp = 8.0 * (x2 * (x1 * x1)) elif x1 <= -4.6e-54: tmp = t_0 elif x1 <= 1.3e-36: tmp = x1 + (-6.0 * (x1 + x2)) elif x1 <= 1.65e+229: tmp = t_0 else: tmp = x2 * (-6.0 + (x1 / x2)) return tmp
function code(x1, x2) t_0 = Float64(8.0 * Float64(x1 * Float64(x2 * x2))) tmp = 0.0 if (x1 <= -1.05e+92) tmp = Float64(8.0 * Float64(x2 * Float64(x1 * x1))); elseif (x1 <= -4.6e-54) tmp = t_0; elseif (x1 <= 1.3e-36) tmp = Float64(x1 + Float64(-6.0 * Float64(x1 + x2))); elseif (x1 <= 1.65e+229) tmp = t_0; else tmp = Float64(x2 * Float64(-6.0 + Float64(x1 / x2))); end return tmp end
function tmp_2 = code(x1, x2) t_0 = 8.0 * (x1 * (x2 * x2)); tmp = 0.0; if (x1 <= -1.05e+92) tmp = 8.0 * (x2 * (x1 * x1)); elseif (x1 <= -4.6e-54) tmp = t_0; elseif (x1 <= 1.3e-36) tmp = x1 + (-6.0 * (x1 + x2)); elseif (x1 <= 1.65e+229) tmp = t_0; else tmp = x2 * (-6.0 + (x1 / x2)); 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.05e+92], N[(8.0 * N[(x2 * N[(x1 * x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, -4.6e-54], t$95$0, If[LessEqual[x1, 1.3e-36], N[(x1 + N[(-6.0 * N[(x1 + x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 1.65e+229], t$95$0, N[(x2 * N[(-6.0 + N[(x1 / x2), $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.05 \cdot 10^{+92}:\\
\;\;\;\;8 \cdot \left(x2 \cdot \left(x1 \cdot x1\right)\right)\\
\mathbf{elif}\;x1 \leq -4.6 \cdot 10^{-54}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;x1 \leq 1.3 \cdot 10^{-36}:\\
\;\;\;\;x1 + -6 \cdot \left(x1 + x2\right)\\
\mathbf{elif}\;x1 \leq 1.65 \cdot 10^{+229}:\\
\;\;\;\;t\_0\\
\mathbf{else}:\\
\;\;\;\;x2 \cdot \left(-6 + \frac{x1}{x2}\right)\\
\end{array}
\end{array}
if x1 < -1.04999999999999993e92Initial program 7.5%
Taylor expanded in x2 around inf
Simplified6.1%
Taylor expanded in x1 around inf
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6442.1%
Simplified42.1%
if -1.04999999999999993e92 < x1 < -4.5999999999999998e-54 or 1.3e-36 < x1 < 1.65e229Initial program 80.9%
Taylor expanded in x2 around inf
Simplified38.1%
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-*.f6435.4%
Simplified35.4%
Taylor expanded in x1 around 0
*-lowering-*.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6440.3%
Simplified40.3%
if -4.5999999999999998e-54 < x1 < 1.3e-36Initial program 99.6%
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
/-lowering-/.f64N/A
metadata-eval66.1%
Simplified66.1%
Taylor expanded in x1 around 0
distribute-lft-outN/A
*-lowering-*.f64N/A
+-lowering-+.f6463.8%
Simplified63.8%
if 1.65e229 < x1 Initial program 0.0%
Taylor expanded in x1 around 0
*-commutativeN/A
*-lowering-*.f649.1%
Simplified9.1%
Taylor expanded in x2 around inf
*-lowering-*.f64N/A
sub-negN/A
metadata-evalN/A
+-lowering-+.f64N/A
/-lowering-/.f6479.5%
Simplified79.5%
Final simplification52.0%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (* 8.0 (* x1 (* x2 x2)))))
(if (<= x1 -5.8e+91)
(* 8.0 (* x2 (* x1 x1)))
(if (<= x1 -3.4e-52)
t_0
(if (<= x1 2.75e-101)
(* x2 -6.0)
(if (<= x1 2.4e+230) t_0 (* x2 (+ -6.0 (/ x1 x2)))))))))
double code(double x1, double x2) {
double t_0 = 8.0 * (x1 * (x2 * x2));
double tmp;
if (x1 <= -5.8e+91) {
tmp = 8.0 * (x2 * (x1 * x1));
} else if (x1 <= -3.4e-52) {
tmp = t_0;
} else if (x1 <= 2.75e-101) {
tmp = x2 * -6.0;
} else if (x1 <= 2.4e+230) {
tmp = t_0;
} else {
tmp = x2 * (-6.0 + (x1 / x2));
}
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 <= (-5.8d+91)) then
tmp = 8.0d0 * (x2 * (x1 * x1))
else if (x1 <= (-3.4d-52)) then
tmp = t_0
else if (x1 <= 2.75d-101) then
tmp = x2 * (-6.0d0)
else if (x1 <= 2.4d+230) then
tmp = t_0
else
tmp = x2 * ((-6.0d0) + (x1 / x2))
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 <= -5.8e+91) {
tmp = 8.0 * (x2 * (x1 * x1));
} else if (x1 <= -3.4e-52) {
tmp = t_0;
} else if (x1 <= 2.75e-101) {
tmp = x2 * -6.0;
} else if (x1 <= 2.4e+230) {
tmp = t_0;
} else {
tmp = x2 * (-6.0 + (x1 / x2));
}
return tmp;
}
def code(x1, x2): t_0 = 8.0 * (x1 * (x2 * x2)) tmp = 0 if x1 <= -5.8e+91: tmp = 8.0 * (x2 * (x1 * x1)) elif x1 <= -3.4e-52: tmp = t_0 elif x1 <= 2.75e-101: tmp = x2 * -6.0 elif x1 <= 2.4e+230: tmp = t_0 else: tmp = x2 * (-6.0 + (x1 / x2)) return tmp
function code(x1, x2) t_0 = Float64(8.0 * Float64(x1 * Float64(x2 * x2))) tmp = 0.0 if (x1 <= -5.8e+91) tmp = Float64(8.0 * Float64(x2 * Float64(x1 * x1))); elseif (x1 <= -3.4e-52) tmp = t_0; elseif (x1 <= 2.75e-101) tmp = Float64(x2 * -6.0); elseif (x1 <= 2.4e+230) tmp = t_0; else tmp = Float64(x2 * Float64(-6.0 + Float64(x1 / x2))); end return tmp end
function tmp_2 = code(x1, x2) t_0 = 8.0 * (x1 * (x2 * x2)); tmp = 0.0; if (x1 <= -5.8e+91) tmp = 8.0 * (x2 * (x1 * x1)); elseif (x1 <= -3.4e-52) tmp = t_0; elseif (x1 <= 2.75e-101) tmp = x2 * -6.0; elseif (x1 <= 2.4e+230) tmp = t_0; else tmp = x2 * (-6.0 + (x1 / x2)); 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, -5.8e+91], N[(8.0 * N[(x2 * N[(x1 * x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, -3.4e-52], t$95$0, If[LessEqual[x1, 2.75e-101], N[(x2 * -6.0), $MachinePrecision], If[LessEqual[x1, 2.4e+230], t$95$0, N[(x2 * N[(-6.0 + N[(x1 / x2), $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 -5.8 \cdot 10^{+91}:\\
\;\;\;\;8 \cdot \left(x2 \cdot \left(x1 \cdot x1\right)\right)\\
\mathbf{elif}\;x1 \leq -3.4 \cdot 10^{-52}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;x1 \leq 2.75 \cdot 10^{-101}:\\
\;\;\;\;x2 \cdot -6\\
\mathbf{elif}\;x1 \leq 2.4 \cdot 10^{+230}:\\
\;\;\;\;t\_0\\
\mathbf{else}:\\
\;\;\;\;x2 \cdot \left(-6 + \frac{x1}{x2}\right)\\
\end{array}
\end{array}
if x1 < -5.80000000000000028e91Initial program 7.5%
Taylor expanded in x2 around inf
Simplified6.1%
Taylor expanded in x1 around inf
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6442.1%
Simplified42.1%
if -5.80000000000000028e91 < x1 < -3.40000000000000017e-52 or 2.74999999999999986e-101 < x1 < 2.39999999999999998e230Initial program 83.4%
Taylor expanded in x2 around inf
Simplified37.1%
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-*.f6433.0%
Simplified33.0%
Taylor expanded in x1 around 0
*-lowering-*.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6437.3%
Simplified37.3%
if -3.40000000000000017e-52 < x1 < 2.74999999999999986e-101Initial program 99.6%
Taylor expanded in x1 around 0
*-commutativeN/A
*-lowering-*.f6468.5%
Simplified68.5%
Taylor expanded in x1 around 0
*-commutativeN/A
*-lowering-*.f6468.7%
Simplified68.7%
if 2.39999999999999998e230 < x1 Initial program 0.0%
Taylor expanded in x1 around 0
*-commutativeN/A
*-lowering-*.f649.1%
Simplified9.1%
Taylor expanded in x2 around inf
*-lowering-*.f64N/A
sub-negN/A
metadata-evalN/A
+-lowering-+.f64N/A
/-lowering-/.f6479.5%
Simplified79.5%
Final simplification51.3%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (+ 6.0 (/ -3.0 x1))))
(if (<= x1 -23000000000.0)
(+ x1 (* (* x1 (* x1 (* x1 x1))) t_0))
(if (<= x1 410000.0)
(+ (* x2 -6.0) (* x1 (+ -1.0 (* (* x2 4.0) (+ (* 2.0 x2) -3.0)))))
(* (* (* x1 x1) (* x1 x1)) t_0)))))
double code(double x1, double x2) {
double t_0 = 6.0 + (-3.0 / x1);
double tmp;
if (x1 <= -23000000000.0) {
tmp = x1 + ((x1 * (x1 * (x1 * x1))) * t_0);
} else if (x1 <= 410000.0) {
tmp = (x2 * -6.0) + (x1 * (-1.0 + ((x2 * 4.0) * ((2.0 * x2) + -3.0))));
} else {
tmp = ((x1 * x1) * (x1 * x1)) * 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 = 6.0d0 + ((-3.0d0) / x1)
if (x1 <= (-23000000000.0d0)) then
tmp = x1 + ((x1 * (x1 * (x1 * x1))) * t_0)
else if (x1 <= 410000.0d0) then
tmp = (x2 * (-6.0d0)) + (x1 * ((-1.0d0) + ((x2 * 4.0d0) * ((2.0d0 * x2) + (-3.0d0)))))
else
tmp = ((x1 * x1) * (x1 * x1)) * t_0
end if
code = tmp
end function
public static double code(double x1, double x2) {
double t_0 = 6.0 + (-3.0 / x1);
double tmp;
if (x1 <= -23000000000.0) {
tmp = x1 + ((x1 * (x1 * (x1 * x1))) * t_0);
} else if (x1 <= 410000.0) {
tmp = (x2 * -6.0) + (x1 * (-1.0 + ((x2 * 4.0) * ((2.0 * x2) + -3.0))));
} else {
tmp = ((x1 * x1) * (x1 * x1)) * t_0;
}
return tmp;
}
def code(x1, x2): t_0 = 6.0 + (-3.0 / x1) tmp = 0 if x1 <= -23000000000.0: tmp = x1 + ((x1 * (x1 * (x1 * x1))) * t_0) elif x1 <= 410000.0: tmp = (x2 * -6.0) + (x1 * (-1.0 + ((x2 * 4.0) * ((2.0 * x2) + -3.0)))) else: tmp = ((x1 * x1) * (x1 * x1)) * t_0 return tmp
function code(x1, x2) t_0 = Float64(6.0 + Float64(-3.0 / x1)) tmp = 0.0 if (x1 <= -23000000000.0) tmp = Float64(x1 + Float64(Float64(x1 * Float64(x1 * Float64(x1 * x1))) * t_0)); elseif (x1 <= 410000.0) tmp = Float64(Float64(x2 * -6.0) + Float64(x1 * Float64(-1.0 + Float64(Float64(x2 * 4.0) * Float64(Float64(2.0 * x2) + -3.0))))); else tmp = Float64(Float64(Float64(x1 * x1) * Float64(x1 * x1)) * t_0); end return tmp end
function tmp_2 = code(x1, x2) t_0 = 6.0 + (-3.0 / x1); tmp = 0.0; if (x1 <= -23000000000.0) tmp = x1 + ((x1 * (x1 * (x1 * x1))) * t_0); elseif (x1 <= 410000.0) tmp = (x2 * -6.0) + (x1 * (-1.0 + ((x2 * 4.0) * ((2.0 * x2) + -3.0)))); else tmp = ((x1 * x1) * (x1 * x1)) * t_0; end tmp_2 = tmp; end
code[x1_, x2_] := Block[{t$95$0 = N[(6.0 + N[(-3.0 / x1), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x1, -23000000000.0], N[(x1 + N[(N[(x1 * N[(x1 * N[(x1 * x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * t$95$0), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 410000.0], N[(N[(x2 * -6.0), $MachinePrecision] + N[(x1 * N[(-1.0 + N[(N[(x2 * 4.0), $MachinePrecision] * N[(N[(2.0 * x2), $MachinePrecision] + -3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(x1 * x1), $MachinePrecision] * N[(x1 * x1), $MachinePrecision]), $MachinePrecision] * t$95$0), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := 6 + \frac{-3}{x1}\\
\mathbf{if}\;x1 \leq -23000000000:\\
\;\;\;\;x1 + \left(x1 \cdot \left(x1 \cdot \left(x1 \cdot x1\right)\right)\right) \cdot t\_0\\
\mathbf{elif}\;x1 \leq 410000:\\
\;\;\;\;x2 \cdot -6 + x1 \cdot \left(-1 + \left(x2 \cdot 4\right) \cdot \left(2 \cdot x2 + -3\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\left(\left(x1 \cdot x1\right) \cdot \left(x1 \cdot x1\right)\right) \cdot t\_0\\
\end{array}
\end{array}
if x1 < -2.3e10Initial program 32.7%
Taylor expanded in x1 around -inf
*-lowering-*.f64N/A
pow-lowering-pow.f64N/A
mul-1-negN/A
unsub-negN/A
--lowering--.f64N/A
/-lowering-/.f64N/A
Simplified91.9%
+-commutativeN/A
+-lowering-+.f64N/A
Applied egg-rr91.9%
Taylor expanded in x1 around inf
sub-negN/A
+-lowering-+.f64N/A
associate-*r/N/A
metadata-evalN/A
distribute-neg-fracN/A
metadata-evalN/A
/-lowering-/.f6490.4%
Simplified90.4%
if -2.3e10 < x1 < 4.1e5Initial program 99.5%
clear-numN/A
inv-powN/A
div-invN/A
unpow-prod-downN/A
inv-powN/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
pow-lowering-pow.f64N/A
Applied egg-rr99.5%
Applied egg-rr99.4%
Taylor expanded in x1 around 0
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
sub-negN/A
metadata-evalN/A
+-lowering-+.f64N/A
associate-*r*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
sub-negN/A
metadata-evalN/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f6486.0%
Simplified86.0%
if 4.1e5 < x1 Initial program 47.8%
clear-numN/A
inv-powN/A
div-invN/A
unpow-prod-downN/A
inv-powN/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
pow-lowering-pow.f64N/A
Applied egg-rr47.8%
Applied egg-rr47.7%
Taylor expanded in x1 around inf
Simplified47.7%
Taylor expanded in x1 around inf
*-lowering-*.f64N/A
metadata-evalN/A
pow-sqrN/A
*-lowering-*.f64N/A
unpow2N/A
*-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-/.f6487.9%
Simplified87.9%
Final simplification87.6%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (+ 6.0 (/ -3.0 x1))))
(if (<= x1 -128000000000.0)
(+ x1 (* (* x1 (* x1 (* x1 x1))) t_0))
(if (<= x1 580000.0)
(+ (* x2 -6.0) (* x1 (+ 1.0 (* (* x2 x2) (+ 8.0 (/ -12.0 x2))))))
(* (* (* x1 x1) (* x1 x1)) t_0)))))
double code(double x1, double x2) {
double t_0 = 6.0 + (-3.0 / x1);
double tmp;
if (x1 <= -128000000000.0) {
tmp = x1 + ((x1 * (x1 * (x1 * x1))) * t_0);
} else if (x1 <= 580000.0) {
tmp = (x2 * -6.0) + (x1 * (1.0 + ((x2 * x2) * (8.0 + (-12.0 / x2)))));
} else {
tmp = ((x1 * x1) * (x1 * x1)) * 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 = 6.0d0 + ((-3.0d0) / x1)
if (x1 <= (-128000000000.0d0)) then
tmp = x1 + ((x1 * (x1 * (x1 * x1))) * t_0)
else if (x1 <= 580000.0d0) then
tmp = (x2 * (-6.0d0)) + (x1 * (1.0d0 + ((x2 * x2) * (8.0d0 + ((-12.0d0) / x2)))))
else
tmp = ((x1 * x1) * (x1 * x1)) * t_0
end if
code = tmp
end function
public static double code(double x1, double x2) {
double t_0 = 6.0 + (-3.0 / x1);
double tmp;
if (x1 <= -128000000000.0) {
tmp = x1 + ((x1 * (x1 * (x1 * x1))) * t_0);
} else if (x1 <= 580000.0) {
tmp = (x2 * -6.0) + (x1 * (1.0 + ((x2 * x2) * (8.0 + (-12.0 / x2)))));
} else {
tmp = ((x1 * x1) * (x1 * x1)) * t_0;
}
return tmp;
}
def code(x1, x2): t_0 = 6.0 + (-3.0 / x1) tmp = 0 if x1 <= -128000000000.0: tmp = x1 + ((x1 * (x1 * (x1 * x1))) * t_0) elif x1 <= 580000.0: tmp = (x2 * -6.0) + (x1 * (1.0 + ((x2 * x2) * (8.0 + (-12.0 / x2))))) else: tmp = ((x1 * x1) * (x1 * x1)) * t_0 return tmp
function code(x1, x2) t_0 = Float64(6.0 + Float64(-3.0 / x1)) tmp = 0.0 if (x1 <= -128000000000.0) tmp = Float64(x1 + Float64(Float64(x1 * Float64(x1 * Float64(x1 * x1))) * t_0)); elseif (x1 <= 580000.0) tmp = Float64(Float64(x2 * -6.0) + Float64(x1 * Float64(1.0 + Float64(Float64(x2 * x2) * Float64(8.0 + Float64(-12.0 / x2)))))); else tmp = Float64(Float64(Float64(x1 * x1) * Float64(x1 * x1)) * t_0); end return tmp end
function tmp_2 = code(x1, x2) t_0 = 6.0 + (-3.0 / x1); tmp = 0.0; if (x1 <= -128000000000.0) tmp = x1 + ((x1 * (x1 * (x1 * x1))) * t_0); elseif (x1 <= 580000.0) tmp = (x2 * -6.0) + (x1 * (1.0 + ((x2 * x2) * (8.0 + (-12.0 / x2))))); else tmp = ((x1 * x1) * (x1 * x1)) * t_0; end tmp_2 = tmp; end
code[x1_, x2_] := Block[{t$95$0 = N[(6.0 + N[(-3.0 / x1), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x1, -128000000000.0], N[(x1 + N[(N[(x1 * N[(x1 * N[(x1 * x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * t$95$0), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 580000.0], N[(N[(x2 * -6.0), $MachinePrecision] + N[(x1 * N[(1.0 + N[(N[(x2 * x2), $MachinePrecision] * N[(8.0 + N[(-12.0 / x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(x1 * x1), $MachinePrecision] * N[(x1 * x1), $MachinePrecision]), $MachinePrecision] * t$95$0), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := 6 + \frac{-3}{x1}\\
\mathbf{if}\;x1 \leq -128000000000:\\
\;\;\;\;x1 + \left(x1 \cdot \left(x1 \cdot \left(x1 \cdot x1\right)\right)\right) \cdot t\_0\\
\mathbf{elif}\;x1 \leq 580000:\\
\;\;\;\;x2 \cdot -6 + x1 \cdot \left(1 + \left(x2 \cdot x2\right) \cdot \left(8 + \frac{-12}{x2}\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\left(\left(x1 \cdot x1\right) \cdot \left(x1 \cdot x1\right)\right) \cdot t\_0\\
\end{array}
\end{array}
if x1 < -1.28e11Initial program 32.7%
Taylor expanded in x1 around -inf
*-lowering-*.f64N/A
pow-lowering-pow.f64N/A
mul-1-negN/A
unsub-negN/A
--lowering--.f64N/A
/-lowering-/.f64N/A
Simplified91.9%
+-commutativeN/A
+-lowering-+.f64N/A
Applied egg-rr91.9%
Taylor expanded in x1 around inf
sub-negN/A
+-lowering-+.f64N/A
associate-*r/N/A
metadata-evalN/A
distribute-neg-fracN/A
metadata-evalN/A
/-lowering-/.f6490.4%
Simplified90.4%
if -1.28e11 < x1 < 5.8e5Initial program 99.5%
Taylor expanded in x2 around inf
Simplified63.4%
Taylor expanded in x1 around 0
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-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-/.f6467.5%
Simplified67.5%
if 5.8e5 < x1 Initial program 47.8%
clear-numN/A
inv-powN/A
div-invN/A
unpow-prod-downN/A
inv-powN/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
pow-lowering-pow.f64N/A
Applied egg-rr47.8%
Applied egg-rr47.7%
Taylor expanded in x1 around inf
Simplified47.7%
Taylor expanded in x1 around inf
*-lowering-*.f64N/A
metadata-evalN/A
pow-sqrN/A
*-lowering-*.f64N/A
unpow2N/A
*-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-/.f6487.9%
Simplified87.9%
Final simplification77.9%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (* 8.0 (* x1 (* x2 x2)))))
(if (<= x1 -5.8e+91)
(* 8.0 (* x2 (* x1 x1)))
(if (<= x1 -2e-49) t_0 (if (<= x1 7.5e-101) (* x2 -6.0) t_0)))))
double code(double x1, double x2) {
double t_0 = 8.0 * (x1 * (x2 * x2));
double tmp;
if (x1 <= -5.8e+91) {
tmp = 8.0 * (x2 * (x1 * x1));
} else if (x1 <= -2e-49) {
tmp = t_0;
} else if (x1 <= 7.5e-101) {
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 = 8.0d0 * (x1 * (x2 * x2))
if (x1 <= (-5.8d+91)) then
tmp = 8.0d0 * (x2 * (x1 * x1))
else if (x1 <= (-2d-49)) then
tmp = t_0
else if (x1 <= 7.5d-101) 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 = 8.0 * (x1 * (x2 * x2));
double tmp;
if (x1 <= -5.8e+91) {
tmp = 8.0 * (x2 * (x1 * x1));
} else if (x1 <= -2e-49) {
tmp = t_0;
} else if (x1 <= 7.5e-101) {
tmp = x2 * -6.0;
} else {
tmp = t_0;
}
return tmp;
}
def code(x1, x2): t_0 = 8.0 * (x1 * (x2 * x2)) tmp = 0 if x1 <= -5.8e+91: tmp = 8.0 * (x2 * (x1 * x1)) elif x1 <= -2e-49: tmp = t_0 elif x1 <= 7.5e-101: tmp = x2 * -6.0 else: tmp = t_0 return tmp
function code(x1, x2) t_0 = Float64(8.0 * Float64(x1 * Float64(x2 * x2))) tmp = 0.0 if (x1 <= -5.8e+91) tmp = Float64(8.0 * Float64(x2 * Float64(x1 * x1))); elseif (x1 <= -2e-49) tmp = t_0; elseif (x1 <= 7.5e-101) tmp = Float64(x2 * -6.0); else tmp = t_0; end return tmp end
function tmp_2 = code(x1, x2) t_0 = 8.0 * (x1 * (x2 * x2)); tmp = 0.0; if (x1 <= -5.8e+91) tmp = 8.0 * (x2 * (x1 * x1)); elseif (x1 <= -2e-49) tmp = t_0; elseif (x1 <= 7.5e-101) tmp = x2 * -6.0; else tmp = t_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, -5.8e+91], N[(8.0 * N[(x2 * N[(x1 * x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, -2e-49], t$95$0, If[LessEqual[x1, 7.5e-101], N[(x2 * -6.0), $MachinePrecision], t$95$0]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := 8 \cdot \left(x1 \cdot \left(x2 \cdot x2\right)\right)\\
\mathbf{if}\;x1 \leq -5.8 \cdot 10^{+91}:\\
\;\;\;\;8 \cdot \left(x2 \cdot \left(x1 \cdot x1\right)\right)\\
\mathbf{elif}\;x1 \leq -2 \cdot 10^{-49}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;x1 \leq 7.5 \cdot 10^{-101}:\\
\;\;\;\;x2 \cdot -6\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
if x1 < -5.80000000000000028e91Initial program 7.5%
Taylor expanded in x2 around inf
Simplified6.1%
Taylor expanded in x1 around inf
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6442.1%
Simplified42.1%
if -5.80000000000000028e91 < x1 < -1.99999999999999987e-49 or 7.5000000000000001e-101 < x1 Initial program 76.6%
Taylor expanded in x2 around inf
Simplified34.0%
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-*.f6430.4%
Simplified30.4%
Taylor expanded in x1 around 0
*-lowering-*.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6436.2%
Simplified36.2%
if -1.99999999999999987e-49 < x1 < 7.5000000000000001e-101Initial program 99.6%
Taylor expanded in x1 around 0
*-commutativeN/A
*-lowering-*.f6468.5%
Simplified68.5%
Taylor expanded in x1 around 0
*-commutativeN/A
*-lowering-*.f6468.7%
Simplified68.7%
(FPCore (x1 x2) :precision binary64 (let* ((t_0 (* 8.0 (* x1 (* x2 x2))))) (if (<= x2 -9.4e+145) t_0 (if (<= x2 6.8e+52) (* x2 -6.0) t_0))))
double code(double x1, double x2) {
double t_0 = 8.0 * (x1 * (x2 * x2));
double tmp;
if (x2 <= -9.4e+145) {
tmp = t_0;
} else if (x2 <= 6.8e+52) {
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 = 8.0d0 * (x1 * (x2 * x2))
if (x2 <= (-9.4d+145)) then
tmp = t_0
else if (x2 <= 6.8d+52) 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 = 8.0 * (x1 * (x2 * x2));
double tmp;
if (x2 <= -9.4e+145) {
tmp = t_0;
} else if (x2 <= 6.8e+52) {
tmp = x2 * -6.0;
} else {
tmp = t_0;
}
return tmp;
}
def code(x1, x2): t_0 = 8.0 * (x1 * (x2 * x2)) tmp = 0 if x2 <= -9.4e+145: tmp = t_0 elif x2 <= 6.8e+52: tmp = x2 * -6.0 else: tmp = t_0 return tmp
function code(x1, x2) t_0 = Float64(8.0 * Float64(x1 * Float64(x2 * x2))) tmp = 0.0 if (x2 <= -9.4e+145) tmp = t_0; elseif (x2 <= 6.8e+52) tmp = Float64(x2 * -6.0); else tmp = t_0; end return tmp end
function tmp_2 = code(x1, x2) t_0 = 8.0 * (x1 * (x2 * x2)); tmp = 0.0; if (x2 <= -9.4e+145) tmp = t_0; elseif (x2 <= 6.8e+52) tmp = x2 * -6.0; else tmp = t_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[x2, -9.4e+145], t$95$0, If[LessEqual[x2, 6.8e+52], N[(x2 * -6.0), $MachinePrecision], t$95$0]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := 8 \cdot \left(x1 \cdot \left(x2 \cdot x2\right)\right)\\
\mathbf{if}\;x2 \leq -9.4 \cdot 10^{+145}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;x2 \leq 6.8 \cdot 10^{+52}:\\
\;\;\;\;x2 \cdot -6\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
if x2 < -9.4000000000000004e145 or 6.8e52 < x2 Initial program 70.6%
Taylor expanded in x2 around inf
Simplified51.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-*.f6448.2%
Simplified48.2%
Taylor expanded in x1 around 0
*-lowering-*.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6455.4%
Simplified55.4%
if -9.4000000000000004e145 < x2 < 6.8e52Initial program 70.8%
Taylor expanded in x1 around 0
*-commutativeN/A
*-lowering-*.f6435.7%
Simplified35.7%
Taylor expanded in x1 around 0
*-commutativeN/A
*-lowering-*.f6435.9%
Simplified35.9%
(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 70.7%
Taylor expanded in x1 around 0
*-commutativeN/A
*-lowering-*.f6428.0%
Simplified28.0%
Taylor expanded in x1 around 0
*-commutativeN/A
*-lowering-*.f6428.1%
Simplified28.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 70.7%
Taylor expanded in x1 around 0
*-commutativeN/A
*-lowering-*.f6428.0%
Simplified28.0%
Taylor expanded in x1 around inf
Simplified3.1%
herbie shell --seed 2024192
(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))))))