
(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) 1.0))
(t_1 (* x1 (* x1 3.0)))
(t_2 (* 3.0 (* x1 x1)))
(t_3 (- -1.0 (* x1 x1)))
(t_4 (- x1 (+ t_1 (* 2.0 x2))))
(t_5 (/ t_4 t_0))
(t_6 (/ t_4 t_3))
(t_7 (fma x1 (* x1 3.0) (* 2.0 x2)))
(t_8 (/ (- t_7 x1) (fma x1 x1 1.0)))
(t_9 (/ (- x1 t_7) (fma x1 x1 1.0))))
(if (<=
(+
x1
(-
(* 3.0 (/ (- x1 (- t_1 (* 2.0 x2))) t_3))
(-
(-
(+
(* t_1 t_5)
(*
t_0
(-
(* (* t_6 (* x1 2.0)) (+ 3.0 t_5))
(* (* x1 x1) (- (* t_6 4.0) 6.0)))))
(* x1 (* x1 x1)))
x1)))
INFINITY)
(+
x1
(fma
3.0
(/ (- t_2 (fma 2.0 x2 x1)) (fma x1 x1 1.0))
(+
x1
(fma
(fma x1 x1 1.0)
(fma x1 (* x1 (fma t_8 4.0 -6.0)) (* (* x1 (* 2.0 t_9)) (- t_9 -3.0)))
(fma t_2 t_8 (pow x1 3.0))))))
(+
x1
(+
(+ x1 (* (pow x1 4.0) (- 6.0 (/ (- 3.0 (/ (* x2 8.0) x1)) x1))))
9.0)))))
double code(double x1, double x2) {
double t_0 = (x1 * x1) + 1.0;
double t_1 = x1 * (x1 * 3.0);
double t_2 = 3.0 * (x1 * x1);
double t_3 = -1.0 - (x1 * x1);
double t_4 = x1 - (t_1 + (2.0 * x2));
double t_5 = t_4 / t_0;
double t_6 = t_4 / t_3;
double t_7 = fma(x1, (x1 * 3.0), (2.0 * x2));
double t_8 = (t_7 - x1) / fma(x1, x1, 1.0);
double t_9 = (x1 - t_7) / fma(x1, x1, 1.0);
double tmp;
if ((x1 + ((3.0 * ((x1 - (t_1 - (2.0 * x2))) / t_3)) - ((((t_1 * t_5) + (t_0 * (((t_6 * (x1 * 2.0)) * (3.0 + t_5)) - ((x1 * x1) * ((t_6 * 4.0) - 6.0))))) - (x1 * (x1 * x1))) - x1))) <= ((double) INFINITY)) {
tmp = x1 + fma(3.0, ((t_2 - fma(2.0, x2, x1)) / fma(x1, x1, 1.0)), (x1 + fma(fma(x1, x1, 1.0), fma(x1, (x1 * fma(t_8, 4.0, -6.0)), ((x1 * (2.0 * t_9)) * (t_9 - -3.0))), fma(t_2, t_8, pow(x1, 3.0)))));
} else {
tmp = x1 + ((x1 + (pow(x1, 4.0) * (6.0 - ((3.0 - ((x2 * 8.0) / x1)) / x1)))) + 9.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(3.0 * Float64(x1 * x1)) t_3 = Float64(-1.0 - Float64(x1 * x1)) t_4 = Float64(x1 - Float64(t_1 + Float64(2.0 * x2))) t_5 = Float64(t_4 / t_0) t_6 = Float64(t_4 / t_3) t_7 = fma(x1, Float64(x1 * 3.0), Float64(2.0 * x2)) t_8 = Float64(Float64(t_7 - x1) / fma(x1, x1, 1.0)) t_9 = Float64(Float64(x1 - t_7) / fma(x1, x1, 1.0)) tmp = 0.0 if (Float64(x1 + Float64(Float64(3.0 * Float64(Float64(x1 - Float64(t_1 - Float64(2.0 * x2))) / t_3)) - Float64(Float64(Float64(Float64(t_1 * t_5) + Float64(t_0 * Float64(Float64(Float64(t_6 * Float64(x1 * 2.0)) * Float64(3.0 + t_5)) - Float64(Float64(x1 * x1) * Float64(Float64(t_6 * 4.0) - 6.0))))) - Float64(x1 * Float64(x1 * x1))) - x1))) <= Inf) tmp = Float64(x1 + fma(3.0, Float64(Float64(t_2 - fma(2.0, x2, x1)) / fma(x1, x1, 1.0)), Float64(x1 + fma(fma(x1, x1, 1.0), fma(x1, Float64(x1 * fma(t_8, 4.0, -6.0)), Float64(Float64(x1 * Float64(2.0 * t_9)) * Float64(t_9 - -3.0))), fma(t_2, t_8, (x1 ^ 3.0)))))); else tmp = Float64(x1 + Float64(Float64(x1 + Float64((x1 ^ 4.0) * Float64(6.0 - Float64(Float64(3.0 - Float64(Float64(x2 * 8.0) / x1)) / x1)))) + 9.0)); end return 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[(3.0 * N[(x1 * x1), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(-1.0 - N[(x1 * x1), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[(x1 - N[(t$95$1 + N[(2.0 * x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$5 = N[(t$95$4 / t$95$0), $MachinePrecision]}, Block[{t$95$6 = N[(t$95$4 / t$95$3), $MachinePrecision]}, Block[{t$95$7 = N[(x1 * N[(x1 * 3.0), $MachinePrecision] + N[(2.0 * x2), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$8 = N[(N[(t$95$7 - x1), $MachinePrecision] / N[(x1 * x1 + 1.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$9 = N[(N[(x1 - t$95$7), $MachinePrecision] / N[(x1 * x1 + 1.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(x1 + N[(N[(3.0 * N[(N[(x1 - N[(t$95$1 - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / t$95$3), $MachinePrecision]), $MachinePrecision] - N[(N[(N[(N[(t$95$1 * t$95$5), $MachinePrecision] + N[(t$95$0 * N[(N[(N[(t$95$6 * N[(x1 * 2.0), $MachinePrecision]), $MachinePrecision] * N[(3.0 + t$95$5), $MachinePrecision]), $MachinePrecision] - N[(N[(x1 * x1), $MachinePrecision] * N[(N[(t$95$6 * 4.0), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(x1 * N[(x1 * x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], Infinity], N[(x1 + N[(3.0 * N[(N[(t$95$2 - N[(2.0 * x2 + x1), $MachinePrecision]), $MachinePrecision] / N[(x1 * x1 + 1.0), $MachinePrecision]), $MachinePrecision] + N[(x1 + N[(N[(x1 * x1 + 1.0), $MachinePrecision] * N[(x1 * N[(x1 * N[(t$95$8 * 4.0 + -6.0), $MachinePrecision]), $MachinePrecision] + N[(N[(x1 * N[(2.0 * t$95$9), $MachinePrecision]), $MachinePrecision] * N[(t$95$9 - -3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(t$95$2 * t$95$8 + N[Power[x1, 3.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x1 + N[(N[(x1 + N[(N[Power[x1, 4.0], $MachinePrecision] * N[(6.0 - N[(N[(3.0 - N[(N[(x2 * 8.0), $MachinePrecision] / x1), $MachinePrecision]), $MachinePrecision] / x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + 9.0), $MachinePrecision]), $MachinePrecision]]]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x1 \cdot x1 + 1\\
t_1 := x1 \cdot \left(x1 \cdot 3\right)\\
t_2 := 3 \cdot \left(x1 \cdot x1\right)\\
t_3 := -1 - x1 \cdot x1\\
t_4 := x1 - \left(t\_1 + 2 \cdot x2\right)\\
t_5 := \frac{t\_4}{t\_0}\\
t_6 := \frac{t\_4}{t\_3}\\
t_7 := \mathsf{fma}\left(x1, x1 \cdot 3, 2 \cdot x2\right)\\
t_8 := \frac{t\_7 - x1}{\mathsf{fma}\left(x1, x1, 1\right)}\\
t_9 := \frac{x1 - t\_7}{\mathsf{fma}\left(x1, x1, 1\right)}\\
\mathbf{if}\;x1 + \left(3 \cdot \frac{x1 - \left(t\_1 - 2 \cdot x2\right)}{t\_3} - \left(\left(\left(t\_1 \cdot t\_5 + t\_0 \cdot \left(\left(t\_6 \cdot \left(x1 \cdot 2\right)\right) \cdot \left(3 + t\_5\right) - \left(x1 \cdot x1\right) \cdot \left(t\_6 \cdot 4 - 6\right)\right)\right) - x1 \cdot \left(x1 \cdot x1\right)\right) - x1\right)\right) \leq \infty:\\
\;\;\;\;x1 + \mathsf{fma}\left(3, \frac{t\_2 - \mathsf{fma}\left(2, x2, x1\right)}{\mathsf{fma}\left(x1, x1, 1\right)}, x1 + \mathsf{fma}\left(\mathsf{fma}\left(x1, x1, 1\right), \mathsf{fma}\left(x1, x1 \cdot \mathsf{fma}\left(t\_8, 4, -6\right), \left(x1 \cdot \left(2 \cdot t\_9\right)\right) \cdot \left(t\_9 - -3\right)\right), \mathsf{fma}\left(t\_2, t\_8, {x1}^{3}\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x1 + \left(\left(x1 + {x1}^{4} \cdot \left(6 - \frac{3 - \frac{x2 \cdot 8}{x1}}{x1}\right)\right) + 9\right)\\
\end{array}
\end{array}
if (+.f64 x1 (+.f64 (+.f64 (+.f64 (+.f64 (*.f64 (+.f64 (*.f64 (*.f64 (*.f64 2 x1) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 3 x1) x1) (*.f64 2 x2)) x1) (+.f64 (*.f64 x1 x1) 1))) (-.f64 (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 3 x1) x1) (*.f64 2 x2)) x1) (+.f64 (*.f64 x1 x1) 1)) 3)) (*.f64 (*.f64 x1 x1) (-.f64 (*.f64 4 (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 3 x1) x1) (*.f64 2 x2)) x1) (+.f64 (*.f64 x1 x1) 1))) 6))) (+.f64 (*.f64 x1 x1) 1)) (*.f64 (*.f64 (*.f64 3 x1) x1) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 3 x1) x1) (*.f64 2 x2)) x1) (+.f64 (*.f64 x1 x1) 1)))) (*.f64 (*.f64 x1 x1) x1)) x1) (*.f64 3 (/.f64 (-.f64 (-.f64 (*.f64 (*.f64 3 x1) x1) (*.f64 2 x2)) x1) (+.f64 (*.f64 x1 x1) 1))))) < +inf.0Initial program 99.4%
Simplified99.6%
if +inf.0 < (+.f64 x1 (+.f64 (+.f64 (+.f64 (+.f64 (*.f64 (+.f64 (*.f64 (*.f64 (*.f64 2 x1) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 3 x1) x1) (*.f64 2 x2)) x1) (+.f64 (*.f64 x1 x1) 1))) (-.f64 (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 3 x1) x1) (*.f64 2 x2)) x1) (+.f64 (*.f64 x1 x1) 1)) 3)) (*.f64 (*.f64 x1 x1) (-.f64 (*.f64 4 (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 3 x1) x1) (*.f64 2 x2)) x1) (+.f64 (*.f64 x1 x1) 1))) 6))) (+.f64 (*.f64 x1 x1) 1)) (*.f64 (*.f64 (*.f64 3 x1) x1) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 3 x1) x1) (*.f64 2 x2)) x1) (+.f64 (*.f64 x1 x1) 1)))) (*.f64 (*.f64 x1 x1) x1)) x1) (*.f64 3 (/.f64 (-.f64 (-.f64 (*.f64 (*.f64 3 x1) x1) (*.f64 2 x2)) x1) (+.f64 (*.f64 x1 x1) 1))))) Initial program 0.0%
Taylor expanded in x1 around -inf 21.3%
Taylor expanded in x1 around inf 100.0%
Taylor expanded in x2 around inf 100.0%
*-commutative100.0%
Simplified100.0%
Final simplification99.7%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (+ (* x1 x1) 1.0))
(t_1 (* x1 (* x1 3.0)))
(t_2 (- x1 (+ t_1 (* 2.0 x2))))
(t_3 (/ t_2 t_0))
(t_4 (- -1.0 (* x1 x1)))
(t_5 (/ t_2 t_4))
(t_6
(+
x1
(-
(* 3.0 (/ (- x1 (- t_1 (* 2.0 x2))) t_4))
(-
(-
(+
(* t_1 t_3)
(*
t_0
(-
(* (* t_5 (* x1 2.0)) (+ 3.0 t_3))
(* (* x1 x1) (- (* t_5 4.0) 6.0)))))
(* x1 (* x1 x1)))
x1)))))
(if (<= t_6 INFINITY)
t_6
(+
x1
(+
(+ x1 (* (pow x1 4.0) (- 6.0 (/ (- 3.0 (/ (* x2 8.0) x1)) x1))))
9.0)))))
double code(double x1, double x2) {
double t_0 = (x1 * x1) + 1.0;
double t_1 = x1 * (x1 * 3.0);
double t_2 = x1 - (t_1 + (2.0 * x2));
double t_3 = t_2 / t_0;
double t_4 = -1.0 - (x1 * x1);
double t_5 = t_2 / t_4;
double t_6 = x1 + ((3.0 * ((x1 - (t_1 - (2.0 * x2))) / t_4)) - ((((t_1 * t_3) + (t_0 * (((t_5 * (x1 * 2.0)) * (3.0 + t_3)) - ((x1 * x1) * ((t_5 * 4.0) - 6.0))))) - (x1 * (x1 * x1))) - x1));
double tmp;
if (t_6 <= ((double) INFINITY)) {
tmp = t_6;
} else {
tmp = x1 + ((x1 + (pow(x1, 4.0) * (6.0 - ((3.0 - ((x2 * 8.0) / x1)) / x1)))) + 9.0);
}
return tmp;
}
public static double code(double x1, double x2) {
double t_0 = (x1 * x1) + 1.0;
double t_1 = x1 * (x1 * 3.0);
double t_2 = x1 - (t_1 + (2.0 * x2));
double t_3 = t_2 / t_0;
double t_4 = -1.0 - (x1 * x1);
double t_5 = t_2 / t_4;
double t_6 = x1 + ((3.0 * ((x1 - (t_1 - (2.0 * x2))) / t_4)) - ((((t_1 * t_3) + (t_0 * (((t_5 * (x1 * 2.0)) * (3.0 + t_3)) - ((x1 * x1) * ((t_5 * 4.0) - 6.0))))) - (x1 * (x1 * x1))) - x1));
double tmp;
if (t_6 <= Double.POSITIVE_INFINITY) {
tmp = t_6;
} else {
tmp = x1 + ((x1 + (Math.pow(x1, 4.0) * (6.0 - ((3.0 - ((x2 * 8.0) / x1)) / x1)))) + 9.0);
}
return tmp;
}
def code(x1, x2): t_0 = (x1 * x1) + 1.0 t_1 = x1 * (x1 * 3.0) t_2 = x1 - (t_1 + (2.0 * x2)) t_3 = t_2 / t_0 t_4 = -1.0 - (x1 * x1) t_5 = t_2 / t_4 t_6 = x1 + ((3.0 * ((x1 - (t_1 - (2.0 * x2))) / t_4)) - ((((t_1 * t_3) + (t_0 * (((t_5 * (x1 * 2.0)) * (3.0 + t_3)) - ((x1 * x1) * ((t_5 * 4.0) - 6.0))))) - (x1 * (x1 * x1))) - x1)) tmp = 0 if t_6 <= math.inf: tmp = t_6 else: tmp = x1 + ((x1 + (math.pow(x1, 4.0) * (6.0 - ((3.0 - ((x2 * 8.0) / x1)) / x1)))) + 9.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(x1 - Float64(t_1 + Float64(2.0 * x2))) t_3 = Float64(t_2 / t_0) t_4 = Float64(-1.0 - Float64(x1 * x1)) t_5 = Float64(t_2 / t_4) t_6 = Float64(x1 + Float64(Float64(3.0 * Float64(Float64(x1 - Float64(t_1 - Float64(2.0 * x2))) / t_4)) - Float64(Float64(Float64(Float64(t_1 * t_3) + Float64(t_0 * Float64(Float64(Float64(t_5 * Float64(x1 * 2.0)) * Float64(3.0 + t_3)) - Float64(Float64(x1 * x1) * Float64(Float64(t_5 * 4.0) - 6.0))))) - Float64(x1 * Float64(x1 * x1))) - x1))) tmp = 0.0 if (t_6 <= Inf) tmp = t_6; else tmp = Float64(x1 + Float64(Float64(x1 + Float64((x1 ^ 4.0) * Float64(6.0 - Float64(Float64(3.0 - Float64(Float64(x2 * 8.0) / x1)) / x1)))) + 9.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 = x1 - (t_1 + (2.0 * x2)); t_3 = t_2 / t_0; t_4 = -1.0 - (x1 * x1); t_5 = t_2 / t_4; t_6 = x1 + ((3.0 * ((x1 - (t_1 - (2.0 * x2))) / t_4)) - ((((t_1 * t_3) + (t_0 * (((t_5 * (x1 * 2.0)) * (3.0 + t_3)) - ((x1 * x1) * ((t_5 * 4.0) - 6.0))))) - (x1 * (x1 * x1))) - x1)); tmp = 0.0; if (t_6 <= Inf) tmp = t_6; else tmp = x1 + ((x1 + ((x1 ^ 4.0) * (6.0 - ((3.0 - ((x2 * 8.0) / x1)) / x1)))) + 9.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[(x1 - N[(t$95$1 + N[(2.0 * x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(t$95$2 / t$95$0), $MachinePrecision]}, Block[{t$95$4 = N[(-1.0 - N[(x1 * x1), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$5 = N[(t$95$2 / t$95$4), $MachinePrecision]}, Block[{t$95$6 = N[(x1 + N[(N[(3.0 * N[(N[(x1 - N[(t$95$1 - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / t$95$4), $MachinePrecision]), $MachinePrecision] - N[(N[(N[(N[(t$95$1 * t$95$3), $MachinePrecision] + N[(t$95$0 * N[(N[(N[(t$95$5 * N[(x1 * 2.0), $MachinePrecision]), $MachinePrecision] * N[(3.0 + t$95$3), $MachinePrecision]), $MachinePrecision] - N[(N[(x1 * x1), $MachinePrecision] * N[(N[(t$95$5 * 4.0), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(x1 * N[(x1 * x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$6, Infinity], t$95$6, N[(x1 + N[(N[(x1 + N[(N[Power[x1, 4.0], $MachinePrecision] * N[(6.0 - N[(N[(3.0 - N[(N[(x2 * 8.0), $MachinePrecision] / x1), $MachinePrecision]), $MachinePrecision] / x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + 9.0), $MachinePrecision]), $MachinePrecision]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x1 \cdot x1 + 1\\
t_1 := x1 \cdot \left(x1 \cdot 3\right)\\
t_2 := x1 - \left(t\_1 + 2 \cdot x2\right)\\
t_3 := \frac{t\_2}{t\_0}\\
t_4 := -1 - x1 \cdot x1\\
t_5 := \frac{t\_2}{t\_4}\\
t_6 := x1 + \left(3 \cdot \frac{x1 - \left(t\_1 - 2 \cdot x2\right)}{t\_4} - \left(\left(\left(t\_1 \cdot t\_3 + t\_0 \cdot \left(\left(t\_5 \cdot \left(x1 \cdot 2\right)\right) \cdot \left(3 + t\_3\right) - \left(x1 \cdot x1\right) \cdot \left(t\_5 \cdot 4 - 6\right)\right)\right) - x1 \cdot \left(x1 \cdot x1\right)\right) - x1\right)\right)\\
\mathbf{if}\;t\_6 \leq \infty:\\
\;\;\;\;t\_6\\
\mathbf{else}:\\
\;\;\;\;x1 + \left(\left(x1 + {x1}^{4} \cdot \left(6 - \frac{3 - \frac{x2 \cdot 8}{x1}}{x1}\right)\right) + 9\right)\\
\end{array}
\end{array}
if (+.f64 x1 (+.f64 (+.f64 (+.f64 (+.f64 (*.f64 (+.f64 (*.f64 (*.f64 (*.f64 2 x1) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 3 x1) x1) (*.f64 2 x2)) x1) (+.f64 (*.f64 x1 x1) 1))) (-.f64 (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 3 x1) x1) (*.f64 2 x2)) x1) (+.f64 (*.f64 x1 x1) 1)) 3)) (*.f64 (*.f64 x1 x1) (-.f64 (*.f64 4 (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 3 x1) x1) (*.f64 2 x2)) x1) (+.f64 (*.f64 x1 x1) 1))) 6))) (+.f64 (*.f64 x1 x1) 1)) (*.f64 (*.f64 (*.f64 3 x1) x1) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 3 x1) x1) (*.f64 2 x2)) x1) (+.f64 (*.f64 x1 x1) 1)))) (*.f64 (*.f64 x1 x1) x1)) x1) (*.f64 3 (/.f64 (-.f64 (-.f64 (*.f64 (*.f64 3 x1) x1) (*.f64 2 x2)) x1) (+.f64 (*.f64 x1 x1) 1))))) < +inf.0Initial program 99.4%
if +inf.0 < (+.f64 x1 (+.f64 (+.f64 (+.f64 (+.f64 (*.f64 (+.f64 (*.f64 (*.f64 (*.f64 2 x1) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 3 x1) x1) (*.f64 2 x2)) x1) (+.f64 (*.f64 x1 x1) 1))) (-.f64 (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 3 x1) x1) (*.f64 2 x2)) x1) (+.f64 (*.f64 x1 x1) 1)) 3)) (*.f64 (*.f64 x1 x1) (-.f64 (*.f64 4 (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 3 x1) x1) (*.f64 2 x2)) x1) (+.f64 (*.f64 x1 x1) 1))) 6))) (+.f64 (*.f64 x1 x1) 1)) (*.f64 (*.f64 (*.f64 3 x1) x1) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 3 x1) x1) (*.f64 2 x2)) x1) (+.f64 (*.f64 x1 x1) 1)))) (*.f64 (*.f64 x1 x1) x1)) x1) (*.f64 3 (/.f64 (-.f64 (-.f64 (*.f64 (*.f64 3 x1) x1) (*.f64 2 x2)) x1) (+.f64 (*.f64 x1 x1) 1))))) Initial program 0.0%
Taylor expanded in x1 around -inf 21.3%
Taylor expanded in x1 around inf 100.0%
Taylor expanded in x2 around inf 100.0%
*-commutative100.0%
Simplified100.0%
Final simplification99.6%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (- -1.0 (* x1 x1)))
(t_1 (* x1 (* x1 3.0)))
(t_2 (- x1 (+ t_1 (* 2.0 x2))))
(t_3 (/ t_2 t_0)))
(if (or (<= x1 -9e+65) (not (<= x1 2.65e+44)))
(+
x1
(+ (+ x1 (* (pow x1 4.0) (- 6.0 (/ (- 3.0 (/ (* x2 8.0) x1)) x1)))) 9.0))
(+
x1
(+
(* 3.0 (/ (- x1 (- t_1 (* 2.0 x2))) t_0))
(+
x1
(+
(* x1 (* x1 x1))
(+
(*
(-
(* (* t_3 (* x1 2.0)) (+ 3.0 (/ t_2 (+ (* x1 x1) 1.0))))
(* (* x1 x1) (- (* t_3 4.0) 6.0)))
t_0)
(* 3.0 t_1)))))))))
double code(double x1, double x2) {
double t_0 = -1.0 - (x1 * x1);
double t_1 = x1 * (x1 * 3.0);
double t_2 = x1 - (t_1 + (2.0 * x2));
double t_3 = t_2 / t_0;
double tmp;
if ((x1 <= -9e+65) || !(x1 <= 2.65e+44)) {
tmp = x1 + ((x1 + (pow(x1, 4.0) * (6.0 - ((3.0 - ((x2 * 8.0) / x1)) / x1)))) + 9.0);
} else {
tmp = x1 + ((3.0 * ((x1 - (t_1 - (2.0 * x2))) / t_0)) + (x1 + ((x1 * (x1 * x1)) + (((((t_3 * (x1 * 2.0)) * (3.0 + (t_2 / ((x1 * x1) + 1.0)))) - ((x1 * x1) * ((t_3 * 4.0) - 6.0))) * t_0) + (3.0 * 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 = (-1.0d0) - (x1 * x1)
t_1 = x1 * (x1 * 3.0d0)
t_2 = x1 - (t_1 + (2.0d0 * x2))
t_3 = t_2 / t_0
if ((x1 <= (-9d+65)) .or. (.not. (x1 <= 2.65d+44))) then
tmp = x1 + ((x1 + ((x1 ** 4.0d0) * (6.0d0 - ((3.0d0 - ((x2 * 8.0d0) / x1)) / x1)))) + 9.0d0)
else
tmp = x1 + ((3.0d0 * ((x1 - (t_1 - (2.0d0 * x2))) / t_0)) + (x1 + ((x1 * (x1 * x1)) + (((((t_3 * (x1 * 2.0d0)) * (3.0d0 + (t_2 / ((x1 * x1) + 1.0d0)))) - ((x1 * x1) * ((t_3 * 4.0d0) - 6.0d0))) * t_0) + (3.0d0 * t_1)))))
end if
code = tmp
end function
public static double code(double x1, double x2) {
double t_0 = -1.0 - (x1 * x1);
double t_1 = x1 * (x1 * 3.0);
double t_2 = x1 - (t_1 + (2.0 * x2));
double t_3 = t_2 / t_0;
double tmp;
if ((x1 <= -9e+65) || !(x1 <= 2.65e+44)) {
tmp = x1 + ((x1 + (Math.pow(x1, 4.0) * (6.0 - ((3.0 - ((x2 * 8.0) / x1)) / x1)))) + 9.0);
} else {
tmp = x1 + ((3.0 * ((x1 - (t_1 - (2.0 * x2))) / t_0)) + (x1 + ((x1 * (x1 * x1)) + (((((t_3 * (x1 * 2.0)) * (3.0 + (t_2 / ((x1 * x1) + 1.0)))) - ((x1 * x1) * ((t_3 * 4.0) - 6.0))) * t_0) + (3.0 * t_1)))));
}
return tmp;
}
def code(x1, x2): t_0 = -1.0 - (x1 * x1) t_1 = x1 * (x1 * 3.0) t_2 = x1 - (t_1 + (2.0 * x2)) t_3 = t_2 / t_0 tmp = 0 if (x1 <= -9e+65) or not (x1 <= 2.65e+44): tmp = x1 + ((x1 + (math.pow(x1, 4.0) * (6.0 - ((3.0 - ((x2 * 8.0) / x1)) / x1)))) + 9.0) else: tmp = x1 + ((3.0 * ((x1 - (t_1 - (2.0 * x2))) / t_0)) + (x1 + ((x1 * (x1 * x1)) + (((((t_3 * (x1 * 2.0)) * (3.0 + (t_2 / ((x1 * x1) + 1.0)))) - ((x1 * x1) * ((t_3 * 4.0) - 6.0))) * t_0) + (3.0 * t_1))))) return tmp
function code(x1, x2) t_0 = Float64(-1.0 - Float64(x1 * x1)) t_1 = Float64(x1 * Float64(x1 * 3.0)) t_2 = Float64(x1 - Float64(t_1 + Float64(2.0 * x2))) t_3 = Float64(t_2 / t_0) tmp = 0.0 if ((x1 <= -9e+65) || !(x1 <= 2.65e+44)) tmp = Float64(x1 + Float64(Float64(x1 + Float64((x1 ^ 4.0) * Float64(6.0 - Float64(Float64(3.0 - Float64(Float64(x2 * 8.0) / x1)) / x1)))) + 9.0)); else tmp = Float64(x1 + Float64(Float64(3.0 * Float64(Float64(x1 - Float64(t_1 - Float64(2.0 * x2))) / t_0)) + Float64(x1 + Float64(Float64(x1 * Float64(x1 * x1)) + Float64(Float64(Float64(Float64(Float64(t_3 * Float64(x1 * 2.0)) * Float64(3.0 + Float64(t_2 / Float64(Float64(x1 * x1) + 1.0)))) - Float64(Float64(x1 * x1) * Float64(Float64(t_3 * 4.0) - 6.0))) * t_0) + Float64(3.0 * t_1)))))); end return tmp end
function tmp_2 = code(x1, x2) t_0 = -1.0 - (x1 * x1); t_1 = x1 * (x1 * 3.0); t_2 = x1 - (t_1 + (2.0 * x2)); t_3 = t_2 / t_0; tmp = 0.0; if ((x1 <= -9e+65) || ~((x1 <= 2.65e+44))) tmp = x1 + ((x1 + ((x1 ^ 4.0) * (6.0 - ((3.0 - ((x2 * 8.0) / x1)) / x1)))) + 9.0); else tmp = x1 + ((3.0 * ((x1 - (t_1 - (2.0 * x2))) / t_0)) + (x1 + ((x1 * (x1 * x1)) + (((((t_3 * (x1 * 2.0)) * (3.0 + (t_2 / ((x1 * x1) + 1.0)))) - ((x1 * x1) * ((t_3 * 4.0) - 6.0))) * t_0) + (3.0 * t_1))))); end tmp_2 = tmp; end
code[x1_, x2_] := Block[{t$95$0 = N[(-1.0 - N[(x1 * x1), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(x1 * N[(x1 * 3.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x1 - N[(t$95$1 + N[(2.0 * x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(t$95$2 / t$95$0), $MachinePrecision]}, If[Or[LessEqual[x1, -9e+65], N[Not[LessEqual[x1, 2.65e+44]], $MachinePrecision]], N[(x1 + N[(N[(x1 + N[(N[Power[x1, 4.0], $MachinePrecision] * N[(6.0 - N[(N[(3.0 - N[(N[(x2 * 8.0), $MachinePrecision] / x1), $MachinePrecision]), $MachinePrecision] / x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + 9.0), $MachinePrecision]), $MachinePrecision], N[(x1 + N[(N[(3.0 * N[(N[(x1 - N[(t$95$1 - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / t$95$0), $MachinePrecision]), $MachinePrecision] + N[(x1 + N[(N[(x1 * N[(x1 * x1), $MachinePrecision]), $MachinePrecision] + N[(N[(N[(N[(N[(t$95$3 * N[(x1 * 2.0), $MachinePrecision]), $MachinePrecision] * N[(3.0 + N[(t$95$2 / N[(N[(x1 * x1), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]), $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$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := -1 - x1 \cdot x1\\
t_1 := x1 \cdot \left(x1 \cdot 3\right)\\
t_2 := x1 - \left(t\_1 + 2 \cdot x2\right)\\
t_3 := \frac{t\_2}{t\_0}\\
\mathbf{if}\;x1 \leq -9 \cdot 10^{+65} \lor \neg \left(x1 \leq 2.65 \cdot 10^{+44}\right):\\
\;\;\;\;x1 + \left(\left(x1 + {x1}^{4} \cdot \left(6 - \frac{3 - \frac{x2 \cdot 8}{x1}}{x1}\right)\right) + 9\right)\\
\mathbf{else}:\\
\;\;\;\;x1 + \left(3 \cdot \frac{x1 - \left(t\_1 - 2 \cdot x2\right)}{t\_0} + \left(x1 + \left(x1 \cdot \left(x1 \cdot x1\right) + \left(\left(\left(t\_3 \cdot \left(x1 \cdot 2\right)\right) \cdot \left(3 + \frac{t\_2}{x1 \cdot x1 + 1}\right) - \left(x1 \cdot x1\right) \cdot \left(t\_3 \cdot 4 - 6\right)\right) \cdot t\_0 + 3 \cdot t\_1\right)\right)\right)\right)\\
\end{array}
\end{array}
if x1 < -9e65 or 2.65e44 < x1 Initial program 26.4%
Taylor expanded in x1 around -inf 42.1%
Taylor expanded in x1 around inf 100.0%
Taylor expanded in x2 around inf 100.0%
*-commutative100.0%
Simplified100.0%
if -9e65 < x1 < 2.65e44Initial program 99.4%
Taylor expanded in x1 around inf 99.2%
Final simplification99.5%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (- -1.0 (* x1 x1)))
(t_1 (* x1 (* x1 3.0)))
(t_2 (- x1 (+ t_1 (* 2.0 x2))))
(t_3 (/ t_2 t_0)))
(if (or (<= x1 -2e+103) (not (<= x1 2.15e+49)))
(+ x1 (+ 9.0 (+ x1 (* 6.0 (pow x1 4.0)))))
(+
x1
(+
(* 3.0 (/ (- x1 (- t_1 (* 2.0 x2))) t_0))
(+
x1
(+
(* x1 (* x1 x1))
(+
(*
(-
(* (* t_3 (* x1 2.0)) (+ 3.0 (/ t_2 (+ (* x1 x1) 1.0))))
(* (* x1 x1) (- (* t_3 4.0) 6.0)))
t_0)
(* 3.0 t_1)))))))))
double code(double x1, double x2) {
double t_0 = -1.0 - (x1 * x1);
double t_1 = x1 * (x1 * 3.0);
double t_2 = x1 - (t_1 + (2.0 * x2));
double t_3 = t_2 / t_0;
double tmp;
if ((x1 <= -2e+103) || !(x1 <= 2.15e+49)) {
tmp = x1 + (9.0 + (x1 + (6.0 * pow(x1, 4.0))));
} else {
tmp = x1 + ((3.0 * ((x1 - (t_1 - (2.0 * x2))) / t_0)) + (x1 + ((x1 * (x1 * x1)) + (((((t_3 * (x1 * 2.0)) * (3.0 + (t_2 / ((x1 * x1) + 1.0)))) - ((x1 * x1) * ((t_3 * 4.0) - 6.0))) * t_0) + (3.0 * 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 = (-1.0d0) - (x1 * x1)
t_1 = x1 * (x1 * 3.0d0)
t_2 = x1 - (t_1 + (2.0d0 * x2))
t_3 = t_2 / t_0
if ((x1 <= (-2d+103)) .or. (.not. (x1 <= 2.15d+49))) then
tmp = x1 + (9.0d0 + (x1 + (6.0d0 * (x1 ** 4.0d0))))
else
tmp = x1 + ((3.0d0 * ((x1 - (t_1 - (2.0d0 * x2))) / t_0)) + (x1 + ((x1 * (x1 * x1)) + (((((t_3 * (x1 * 2.0d0)) * (3.0d0 + (t_2 / ((x1 * x1) + 1.0d0)))) - ((x1 * x1) * ((t_3 * 4.0d0) - 6.0d0))) * t_0) + (3.0d0 * t_1)))))
end if
code = tmp
end function
public static double code(double x1, double x2) {
double t_0 = -1.0 - (x1 * x1);
double t_1 = x1 * (x1 * 3.0);
double t_2 = x1 - (t_1 + (2.0 * x2));
double t_3 = t_2 / t_0;
double tmp;
if ((x1 <= -2e+103) || !(x1 <= 2.15e+49)) {
tmp = x1 + (9.0 + (x1 + (6.0 * Math.pow(x1, 4.0))));
} else {
tmp = x1 + ((3.0 * ((x1 - (t_1 - (2.0 * x2))) / t_0)) + (x1 + ((x1 * (x1 * x1)) + (((((t_3 * (x1 * 2.0)) * (3.0 + (t_2 / ((x1 * x1) + 1.0)))) - ((x1 * x1) * ((t_3 * 4.0) - 6.0))) * t_0) + (3.0 * t_1)))));
}
return tmp;
}
def code(x1, x2): t_0 = -1.0 - (x1 * x1) t_1 = x1 * (x1 * 3.0) t_2 = x1 - (t_1 + (2.0 * x2)) t_3 = t_2 / t_0 tmp = 0 if (x1 <= -2e+103) or not (x1 <= 2.15e+49): tmp = x1 + (9.0 + (x1 + (6.0 * math.pow(x1, 4.0)))) else: tmp = x1 + ((3.0 * ((x1 - (t_1 - (2.0 * x2))) / t_0)) + (x1 + ((x1 * (x1 * x1)) + (((((t_3 * (x1 * 2.0)) * (3.0 + (t_2 / ((x1 * x1) + 1.0)))) - ((x1 * x1) * ((t_3 * 4.0) - 6.0))) * t_0) + (3.0 * t_1))))) return tmp
function code(x1, x2) t_0 = Float64(-1.0 - Float64(x1 * x1)) t_1 = Float64(x1 * Float64(x1 * 3.0)) t_2 = Float64(x1 - Float64(t_1 + Float64(2.0 * x2))) t_3 = Float64(t_2 / t_0) tmp = 0.0 if ((x1 <= -2e+103) || !(x1 <= 2.15e+49)) tmp = Float64(x1 + Float64(9.0 + Float64(x1 + Float64(6.0 * (x1 ^ 4.0))))); else tmp = Float64(x1 + Float64(Float64(3.0 * Float64(Float64(x1 - Float64(t_1 - Float64(2.0 * x2))) / t_0)) + Float64(x1 + Float64(Float64(x1 * Float64(x1 * x1)) + Float64(Float64(Float64(Float64(Float64(t_3 * Float64(x1 * 2.0)) * Float64(3.0 + Float64(t_2 / Float64(Float64(x1 * x1) + 1.0)))) - Float64(Float64(x1 * x1) * Float64(Float64(t_3 * 4.0) - 6.0))) * t_0) + Float64(3.0 * t_1)))))); end return tmp end
function tmp_2 = code(x1, x2) t_0 = -1.0 - (x1 * x1); t_1 = x1 * (x1 * 3.0); t_2 = x1 - (t_1 + (2.0 * x2)); t_3 = t_2 / t_0; tmp = 0.0; if ((x1 <= -2e+103) || ~((x1 <= 2.15e+49))) tmp = x1 + (9.0 + (x1 + (6.0 * (x1 ^ 4.0)))); else tmp = x1 + ((3.0 * ((x1 - (t_1 - (2.0 * x2))) / t_0)) + (x1 + ((x1 * (x1 * x1)) + (((((t_3 * (x1 * 2.0)) * (3.0 + (t_2 / ((x1 * x1) + 1.0)))) - ((x1 * x1) * ((t_3 * 4.0) - 6.0))) * t_0) + (3.0 * t_1))))); end tmp_2 = tmp; end
code[x1_, x2_] := Block[{t$95$0 = N[(-1.0 - N[(x1 * x1), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(x1 * N[(x1 * 3.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x1 - N[(t$95$1 + N[(2.0 * x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(t$95$2 / t$95$0), $MachinePrecision]}, If[Or[LessEqual[x1, -2e+103], N[Not[LessEqual[x1, 2.15e+49]], $MachinePrecision]], N[(x1 + N[(9.0 + N[(x1 + N[(6.0 * N[Power[x1, 4.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x1 + N[(N[(3.0 * N[(N[(x1 - N[(t$95$1 - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / t$95$0), $MachinePrecision]), $MachinePrecision] + N[(x1 + N[(N[(x1 * N[(x1 * x1), $MachinePrecision]), $MachinePrecision] + N[(N[(N[(N[(N[(t$95$3 * N[(x1 * 2.0), $MachinePrecision]), $MachinePrecision] * N[(3.0 + N[(t$95$2 / N[(N[(x1 * x1), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]), $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$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := -1 - x1 \cdot x1\\
t_1 := x1 \cdot \left(x1 \cdot 3\right)\\
t_2 := x1 - \left(t\_1 + 2 \cdot x2\right)\\
t_3 := \frac{t\_2}{t\_0}\\
\mathbf{if}\;x1 \leq -2 \cdot 10^{+103} \lor \neg \left(x1 \leq 2.15 \cdot 10^{+49}\right):\\
\;\;\;\;x1 + \left(9 + \left(x1 + 6 \cdot {x1}^{4}\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x1 + \left(3 \cdot \frac{x1 - \left(t\_1 - 2 \cdot x2\right)}{t\_0} + \left(x1 + \left(x1 \cdot \left(x1 \cdot x1\right) + \left(\left(\left(t\_3 \cdot \left(x1 \cdot 2\right)\right) \cdot \left(3 + \frac{t\_2}{x1 \cdot x1 + 1}\right) - \left(x1 \cdot x1\right) \cdot \left(t\_3 \cdot 4 - 6\right)\right) \cdot t\_0 + 3 \cdot t\_1\right)\right)\right)\right)\\
\end{array}
\end{array}
if x1 < -2e103 or 2.15e49 < x1 Initial program 19.5%
Taylor expanded in x1 around -inf 36.9%
Taylor expanded in x1 around inf 100.0%
Taylor expanded in x1 around inf 98.9%
if -2e103 < x1 < 2.15e49Initial program 98.8%
Taylor expanded in x1 around inf 98.6%
Final simplification98.7%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (* x1 (* x1 3.0)))
(t_1 (- x1 (+ t_0 (* 2.0 x2))))
(t_2 (- -1.0 (* x1 x1))))
(if (or (<= x1 -2e+103) (not (<= x1 1.6e+75)))
(+ x1 (+ 9.0 (+ x1 (* 6.0 (pow x1 4.0)))))
(-
x1
(-
(* 3.0 (/ (- (- t_0 (* 2.0 x2)) x1) t_2))
(+
x1
(+
(* x1 (* x1 x1))
(+
(* 3.0 t_0)
(*
(-
(* (* (/ t_1 t_2) (* x1 2.0)) (+ 3.0 (/ t_1 (+ (* x1 x1) 1.0))))
(* (* x1 x1) 6.0))
t_2)))))))))
double code(double x1, double x2) {
double t_0 = x1 * (x1 * 3.0);
double t_1 = x1 - (t_0 + (2.0 * x2));
double t_2 = -1.0 - (x1 * x1);
double tmp;
if ((x1 <= -2e+103) || !(x1 <= 1.6e+75)) {
tmp = x1 + (9.0 + (x1 + (6.0 * pow(x1, 4.0))));
} else {
tmp = x1 - ((3.0 * (((t_0 - (2.0 * x2)) - x1) / t_2)) - (x1 + ((x1 * (x1 * x1)) + ((3.0 * t_0) + (((((t_1 / t_2) * (x1 * 2.0)) * (3.0 + (t_1 / ((x1 * x1) + 1.0)))) - ((x1 * x1) * 6.0)) * t_2)))));
}
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 * 3.0d0)
t_1 = x1 - (t_0 + (2.0d0 * x2))
t_2 = (-1.0d0) - (x1 * x1)
if ((x1 <= (-2d+103)) .or. (.not. (x1 <= 1.6d+75))) then
tmp = x1 + (9.0d0 + (x1 + (6.0d0 * (x1 ** 4.0d0))))
else
tmp = x1 - ((3.0d0 * (((t_0 - (2.0d0 * x2)) - x1) / t_2)) - (x1 + ((x1 * (x1 * x1)) + ((3.0d0 * t_0) + (((((t_1 / t_2) * (x1 * 2.0d0)) * (3.0d0 + (t_1 / ((x1 * x1) + 1.0d0)))) - ((x1 * x1) * 6.0d0)) * t_2)))))
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 - (t_0 + (2.0 * x2));
double t_2 = -1.0 - (x1 * x1);
double tmp;
if ((x1 <= -2e+103) || !(x1 <= 1.6e+75)) {
tmp = x1 + (9.0 + (x1 + (6.0 * Math.pow(x1, 4.0))));
} else {
tmp = x1 - ((3.0 * (((t_0 - (2.0 * x2)) - x1) / t_2)) - (x1 + ((x1 * (x1 * x1)) + ((3.0 * t_0) + (((((t_1 / t_2) * (x1 * 2.0)) * (3.0 + (t_1 / ((x1 * x1) + 1.0)))) - ((x1 * x1) * 6.0)) * t_2)))));
}
return tmp;
}
def code(x1, x2): t_0 = x1 * (x1 * 3.0) t_1 = x1 - (t_0 + (2.0 * x2)) t_2 = -1.0 - (x1 * x1) tmp = 0 if (x1 <= -2e+103) or not (x1 <= 1.6e+75): tmp = x1 + (9.0 + (x1 + (6.0 * math.pow(x1, 4.0)))) else: tmp = x1 - ((3.0 * (((t_0 - (2.0 * x2)) - x1) / t_2)) - (x1 + ((x1 * (x1 * x1)) + ((3.0 * t_0) + (((((t_1 / t_2) * (x1 * 2.0)) * (3.0 + (t_1 / ((x1 * x1) + 1.0)))) - ((x1 * x1) * 6.0)) * t_2))))) return tmp
function code(x1, x2) t_0 = Float64(x1 * Float64(x1 * 3.0)) t_1 = Float64(x1 - Float64(t_0 + Float64(2.0 * x2))) t_2 = Float64(-1.0 - Float64(x1 * x1)) tmp = 0.0 if ((x1 <= -2e+103) || !(x1 <= 1.6e+75)) tmp = Float64(x1 + Float64(9.0 + Float64(x1 + Float64(6.0 * (x1 ^ 4.0))))); else tmp = Float64(x1 - Float64(Float64(3.0 * Float64(Float64(Float64(t_0 - Float64(2.0 * x2)) - x1) / t_2)) - Float64(x1 + Float64(Float64(x1 * Float64(x1 * x1)) + Float64(Float64(3.0 * t_0) + Float64(Float64(Float64(Float64(Float64(t_1 / t_2) * Float64(x1 * 2.0)) * Float64(3.0 + Float64(t_1 / Float64(Float64(x1 * x1) + 1.0)))) - Float64(Float64(x1 * x1) * 6.0)) * t_2)))))); end return tmp end
function tmp_2 = code(x1, x2) t_0 = x1 * (x1 * 3.0); t_1 = x1 - (t_0 + (2.0 * x2)); t_2 = -1.0 - (x1 * x1); tmp = 0.0; if ((x1 <= -2e+103) || ~((x1 <= 1.6e+75))) tmp = x1 + (9.0 + (x1 + (6.0 * (x1 ^ 4.0)))); else tmp = x1 - ((3.0 * (((t_0 - (2.0 * x2)) - x1) / t_2)) - (x1 + ((x1 * (x1 * x1)) + ((3.0 * t_0) + (((((t_1 / t_2) * (x1 * 2.0)) * (3.0 + (t_1 / ((x1 * x1) + 1.0)))) - ((x1 * x1) * 6.0)) * t_2))))); 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[(x1 - N[(t$95$0 + N[(2.0 * x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(-1.0 - N[(x1 * x1), $MachinePrecision]), $MachinePrecision]}, If[Or[LessEqual[x1, -2e+103], N[Not[LessEqual[x1, 1.6e+75]], $MachinePrecision]], N[(x1 + N[(9.0 + N[(x1 + N[(6.0 * N[Power[x1, 4.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x1 - N[(N[(3.0 * N[(N[(N[(t$95$0 - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$2), $MachinePrecision]), $MachinePrecision] - N[(x1 + N[(N[(x1 * N[(x1 * x1), $MachinePrecision]), $MachinePrecision] + N[(N[(3.0 * t$95$0), $MachinePrecision] + N[(N[(N[(N[(N[(t$95$1 / t$95$2), $MachinePrecision] * N[(x1 * 2.0), $MachinePrecision]), $MachinePrecision] * N[(3.0 + N[(t$95$1 / N[(N[(x1 * x1), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[(x1 * x1), $MachinePrecision] * 6.0), $MachinePrecision]), $MachinePrecision] * t$95$2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x1 \cdot \left(x1 \cdot 3\right)\\
t_1 := x1 - \left(t\_0 + 2 \cdot x2\right)\\
t_2 := -1 - x1 \cdot x1\\
\mathbf{if}\;x1 \leq -2 \cdot 10^{+103} \lor \neg \left(x1 \leq 1.6 \cdot 10^{+75}\right):\\
\;\;\;\;x1 + \left(9 + \left(x1 + 6 \cdot {x1}^{4}\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x1 - \left(3 \cdot \frac{\left(t\_0 - 2 \cdot x2\right) - x1}{t\_2} - \left(x1 + \left(x1 \cdot \left(x1 \cdot x1\right) + \left(3 \cdot t\_0 + \left(\left(\frac{t\_1}{t\_2} \cdot \left(x1 \cdot 2\right)\right) \cdot \left(3 + \frac{t\_1}{x1 \cdot x1 + 1}\right) - \left(x1 \cdot x1\right) \cdot 6\right) \cdot t\_2\right)\right)\right)\right)\\
\end{array}
\end{array}
if x1 < -2e103 or 1.59999999999999992e75 < x1 Initial program 16.8%
Taylor expanded in x1 around -inf 34.8%
Taylor expanded in x1 around inf 100.0%
Taylor expanded in x1 around inf 98.9%
if -2e103 < x1 < 1.59999999999999992e75Initial program 98.8%
Taylor expanded in x1 around inf 98.6%
Taylor expanded in x1 around inf 97.1%
Final simplification97.7%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (* x1 (* x1 3.0)))
(t_1 (- x1 (+ t_0 (* 2.0 x2))))
(t_2 (/ t_1 (+ (* x1 x1) 1.0)))
(t_3 (- -1.0 (* x1 x1))))
(if (or (<= x1 -1e+98) (not (<= x1 1.6e+75)))
(+ x1 (+ 9.0 (+ x1 (* 6.0 (pow x1 4.0)))))
(+
x1
(+
(* 3.0 (/ (- x1 (- t_0 (* 2.0 x2))) t_3))
(+
x1
(-
(* x1 (* x1 x1))
(-
(* t_0 t_2)
(*
(- (* (* (/ t_1 t_3) (* x1 2.0)) (+ 3.0 t_2)) (* (* x1 x1) 6.0))
t_3)))))))))
double code(double x1, double x2) {
double t_0 = x1 * (x1 * 3.0);
double t_1 = x1 - (t_0 + (2.0 * x2));
double t_2 = t_1 / ((x1 * x1) + 1.0);
double t_3 = -1.0 - (x1 * x1);
double tmp;
if ((x1 <= -1e+98) || !(x1 <= 1.6e+75)) {
tmp = x1 + (9.0 + (x1 + (6.0 * pow(x1, 4.0))));
} else {
tmp = x1 + ((3.0 * ((x1 - (t_0 - (2.0 * x2))) / t_3)) + (x1 + ((x1 * (x1 * x1)) - ((t_0 * t_2) - (((((t_1 / t_3) * (x1 * 2.0)) * (3.0 + t_2)) - ((x1 * x1) * 6.0)) * 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 - (t_0 + (2.0d0 * x2))
t_2 = t_1 / ((x1 * x1) + 1.0d0)
t_3 = (-1.0d0) - (x1 * x1)
if ((x1 <= (-1d+98)) .or. (.not. (x1 <= 1.6d+75))) then
tmp = x1 + (9.0d0 + (x1 + (6.0d0 * (x1 ** 4.0d0))))
else
tmp = x1 + ((3.0d0 * ((x1 - (t_0 - (2.0d0 * x2))) / t_3)) + (x1 + ((x1 * (x1 * x1)) - ((t_0 * t_2) - (((((t_1 / t_3) * (x1 * 2.0d0)) * (3.0d0 + t_2)) - ((x1 * x1) * 6.0d0)) * 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 - (t_0 + (2.0 * x2));
double t_2 = t_1 / ((x1 * x1) + 1.0);
double t_3 = -1.0 - (x1 * x1);
double tmp;
if ((x1 <= -1e+98) || !(x1 <= 1.6e+75)) {
tmp = x1 + (9.0 + (x1 + (6.0 * Math.pow(x1, 4.0))));
} else {
tmp = x1 + ((3.0 * ((x1 - (t_0 - (2.0 * x2))) / t_3)) + (x1 + ((x1 * (x1 * x1)) - ((t_0 * t_2) - (((((t_1 / t_3) * (x1 * 2.0)) * (3.0 + t_2)) - ((x1 * x1) * 6.0)) * t_3)))));
}
return tmp;
}
def code(x1, x2): t_0 = x1 * (x1 * 3.0) t_1 = x1 - (t_0 + (2.0 * x2)) t_2 = t_1 / ((x1 * x1) + 1.0) t_3 = -1.0 - (x1 * x1) tmp = 0 if (x1 <= -1e+98) or not (x1 <= 1.6e+75): tmp = x1 + (9.0 + (x1 + (6.0 * math.pow(x1, 4.0)))) else: tmp = x1 + ((3.0 * ((x1 - (t_0 - (2.0 * x2))) / t_3)) + (x1 + ((x1 * (x1 * x1)) - ((t_0 * t_2) - (((((t_1 / t_3) * (x1 * 2.0)) * (3.0 + t_2)) - ((x1 * x1) * 6.0)) * t_3))))) return tmp
function code(x1, x2) t_0 = Float64(x1 * Float64(x1 * 3.0)) t_1 = Float64(x1 - Float64(t_0 + Float64(2.0 * x2))) t_2 = Float64(t_1 / Float64(Float64(x1 * x1) + 1.0)) t_3 = Float64(-1.0 - Float64(x1 * x1)) tmp = 0.0 if ((x1 <= -1e+98) || !(x1 <= 1.6e+75)) tmp = Float64(x1 + Float64(9.0 + Float64(x1 + Float64(6.0 * (x1 ^ 4.0))))); else tmp = Float64(x1 + Float64(Float64(3.0 * Float64(Float64(x1 - Float64(t_0 - Float64(2.0 * x2))) / t_3)) + Float64(x1 + Float64(Float64(x1 * Float64(x1 * x1)) - Float64(Float64(t_0 * t_2) - Float64(Float64(Float64(Float64(Float64(t_1 / t_3) * Float64(x1 * 2.0)) * Float64(3.0 + t_2)) - Float64(Float64(x1 * x1) * 6.0)) * t_3)))))); end return tmp end
function tmp_2 = code(x1, x2) t_0 = x1 * (x1 * 3.0); t_1 = x1 - (t_0 + (2.0 * x2)); t_2 = t_1 / ((x1 * x1) + 1.0); t_3 = -1.0 - (x1 * x1); tmp = 0.0; if ((x1 <= -1e+98) || ~((x1 <= 1.6e+75))) tmp = x1 + (9.0 + (x1 + (6.0 * (x1 ^ 4.0)))); else tmp = x1 + ((3.0 * ((x1 - (t_0 - (2.0 * x2))) / t_3)) + (x1 + ((x1 * (x1 * x1)) - ((t_0 * t_2) - (((((t_1 / t_3) * (x1 * 2.0)) * (3.0 + t_2)) - ((x1 * x1) * 6.0)) * 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[(x1 - N[(t$95$0 + N[(2.0 * x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(t$95$1 / N[(N[(x1 * x1), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(-1.0 - N[(x1 * x1), $MachinePrecision]), $MachinePrecision]}, If[Or[LessEqual[x1, -1e+98], N[Not[LessEqual[x1, 1.6e+75]], $MachinePrecision]], N[(x1 + N[(9.0 + N[(x1 + N[(6.0 * N[Power[x1, 4.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x1 + N[(N[(3.0 * N[(N[(x1 - N[(t$95$0 - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / t$95$3), $MachinePrecision]), $MachinePrecision] + N[(x1 + N[(N[(x1 * N[(x1 * x1), $MachinePrecision]), $MachinePrecision] - N[(N[(t$95$0 * t$95$2), $MachinePrecision] - N[(N[(N[(N[(N[(t$95$1 / t$95$3), $MachinePrecision] * N[(x1 * 2.0), $MachinePrecision]), $MachinePrecision] * N[(3.0 + t$95$2), $MachinePrecision]), $MachinePrecision] - N[(N[(x1 * x1), $MachinePrecision] * 6.0), $MachinePrecision]), $MachinePrecision] * t$95$3), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x1 \cdot \left(x1 \cdot 3\right)\\
t_1 := x1 - \left(t\_0 + 2 \cdot x2\right)\\
t_2 := \frac{t\_1}{x1 \cdot x1 + 1}\\
t_3 := -1 - x1 \cdot x1\\
\mathbf{if}\;x1 \leq -1 \cdot 10^{+98} \lor \neg \left(x1 \leq 1.6 \cdot 10^{+75}\right):\\
\;\;\;\;x1 + \left(9 + \left(x1 + 6 \cdot {x1}^{4}\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x1 + \left(3 \cdot \frac{x1 - \left(t\_0 - 2 \cdot x2\right)}{t\_3} + \left(x1 + \left(x1 \cdot \left(x1 \cdot x1\right) - \left(t\_0 \cdot t\_2 - \left(\left(\frac{t\_1}{t\_3} \cdot \left(x1 \cdot 2\right)\right) \cdot \left(3 + t\_2\right) - \left(x1 \cdot x1\right) \cdot 6\right) \cdot t\_3\right)\right)\right)\right)\\
\end{array}
\end{array}
if x1 < -9.99999999999999998e97 or 1.59999999999999992e75 < x1 Initial program 16.8%
Taylor expanded in x1 around -inf 34.8%
Taylor expanded in x1 around inf 100.0%
Taylor expanded in x1 around inf 98.9%
if -9.99999999999999998e97 < x1 < 1.59999999999999992e75Initial program 98.8%
Taylor expanded in x1 around inf 97.1%
Final simplification97.7%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (* x1 (* x1 3.0)))
(t_1 (- x1 (+ t_0 (* 2.0 x2))))
(t_2 (- -1.0 (* x1 x1)))
(t_3
(+
x1
(+
(* x1 (* x1 x1))
(+
(* 3.0 t_0)
(*
(-
(* (* (/ t_1 t_2) (* x1 2.0)) (+ 3.0 (/ t_1 (+ (* x1 x1) 1.0))))
(* (* x1 x1) 6.0))
t_2))))))
(if (<= x1 -4.5e+153)
(+ x1 (+ (* x2 -6.0) (* x1 (- (* x1 9.0) 2.0))))
(if (<= x1 -5.2e+102)
(+
x1
(+
(* 3.0 (/ (- x1 (- t_0 (* 2.0 x2))) t_2))
(+
x1
(*
x1
(+ 2.0 (* x1 (- (+ (* x1 -4.0) (+ (* x2 6.0) (* x2 8.0))) 6.0)))))))
(if (<= x1 -7.2e+38)
(+ x1 (+ t_3 (* 3.0 (* x2 -2.0))))
(if (<= x1 3.9e+102)
(+
x1
(+
t_3
(*
3.0
(+ (* x2 -2.0) (* x1 (+ -1.0 (* x1 (- 3.0 (* x2 -2.0)))))))))
(+ x1 (+ x1 (* 3.0 (* x1 (+ -1.0 (* x1 (+ x1 3.0)))))))))))))
double code(double x1, double x2) {
double t_0 = x1 * (x1 * 3.0);
double t_1 = x1 - (t_0 + (2.0 * x2));
double t_2 = -1.0 - (x1 * x1);
double t_3 = x1 + ((x1 * (x1 * x1)) + ((3.0 * t_0) + (((((t_1 / t_2) * (x1 * 2.0)) * (3.0 + (t_1 / ((x1 * x1) + 1.0)))) - ((x1 * x1) * 6.0)) * t_2)));
double tmp;
if (x1 <= -4.5e+153) {
tmp = x1 + ((x2 * -6.0) + (x1 * ((x1 * 9.0) - 2.0)));
} else if (x1 <= -5.2e+102) {
tmp = x1 + ((3.0 * ((x1 - (t_0 - (2.0 * x2))) / t_2)) + (x1 + (x1 * (2.0 + (x1 * (((x1 * -4.0) + ((x2 * 6.0) + (x2 * 8.0))) - 6.0))))));
} else if (x1 <= -7.2e+38) {
tmp = x1 + (t_3 + (3.0 * (x2 * -2.0)));
} else if (x1 <= 3.9e+102) {
tmp = x1 + (t_3 + (3.0 * ((x2 * -2.0) + (x1 * (-1.0 + (x1 * (3.0 - (x2 * -2.0))))))));
} else {
tmp = x1 + (x1 + (3.0 * (x1 * (-1.0 + (x1 * (x1 + 3.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) :: t_3
real(8) :: tmp
t_0 = x1 * (x1 * 3.0d0)
t_1 = x1 - (t_0 + (2.0d0 * x2))
t_2 = (-1.0d0) - (x1 * x1)
t_3 = x1 + ((x1 * (x1 * x1)) + ((3.0d0 * t_0) + (((((t_1 / t_2) * (x1 * 2.0d0)) * (3.0d0 + (t_1 / ((x1 * x1) + 1.0d0)))) - ((x1 * x1) * 6.0d0)) * t_2)))
if (x1 <= (-4.5d+153)) then
tmp = x1 + ((x2 * (-6.0d0)) + (x1 * ((x1 * 9.0d0) - 2.0d0)))
else if (x1 <= (-5.2d+102)) then
tmp = x1 + ((3.0d0 * ((x1 - (t_0 - (2.0d0 * x2))) / t_2)) + (x1 + (x1 * (2.0d0 + (x1 * (((x1 * (-4.0d0)) + ((x2 * 6.0d0) + (x2 * 8.0d0))) - 6.0d0))))))
else if (x1 <= (-7.2d+38)) then
tmp = x1 + (t_3 + (3.0d0 * (x2 * (-2.0d0))))
else if (x1 <= 3.9d+102) then
tmp = x1 + (t_3 + (3.0d0 * ((x2 * (-2.0d0)) + (x1 * ((-1.0d0) + (x1 * (3.0d0 - (x2 * (-2.0d0)))))))))
else
tmp = x1 + (x1 + (3.0d0 * (x1 * ((-1.0d0) + (x1 * (x1 + 3.0d0))))))
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 - (t_0 + (2.0 * x2));
double t_2 = -1.0 - (x1 * x1);
double t_3 = x1 + ((x1 * (x1 * x1)) + ((3.0 * t_0) + (((((t_1 / t_2) * (x1 * 2.0)) * (3.0 + (t_1 / ((x1 * x1) + 1.0)))) - ((x1 * x1) * 6.0)) * t_2)));
double tmp;
if (x1 <= -4.5e+153) {
tmp = x1 + ((x2 * -6.0) + (x1 * ((x1 * 9.0) - 2.0)));
} else if (x1 <= -5.2e+102) {
tmp = x1 + ((3.0 * ((x1 - (t_0 - (2.0 * x2))) / t_2)) + (x1 + (x1 * (2.0 + (x1 * (((x1 * -4.0) + ((x2 * 6.0) + (x2 * 8.0))) - 6.0))))));
} else if (x1 <= -7.2e+38) {
tmp = x1 + (t_3 + (3.0 * (x2 * -2.0)));
} else if (x1 <= 3.9e+102) {
tmp = x1 + (t_3 + (3.0 * ((x2 * -2.0) + (x1 * (-1.0 + (x1 * (3.0 - (x2 * -2.0))))))));
} else {
tmp = x1 + (x1 + (3.0 * (x1 * (-1.0 + (x1 * (x1 + 3.0))))));
}
return tmp;
}
def code(x1, x2): t_0 = x1 * (x1 * 3.0) t_1 = x1 - (t_0 + (2.0 * x2)) t_2 = -1.0 - (x1 * x1) t_3 = x1 + ((x1 * (x1 * x1)) + ((3.0 * t_0) + (((((t_1 / t_2) * (x1 * 2.0)) * (3.0 + (t_1 / ((x1 * x1) + 1.0)))) - ((x1 * x1) * 6.0)) * t_2))) tmp = 0 if x1 <= -4.5e+153: tmp = x1 + ((x2 * -6.0) + (x1 * ((x1 * 9.0) - 2.0))) elif x1 <= -5.2e+102: tmp = x1 + ((3.0 * ((x1 - (t_0 - (2.0 * x2))) / t_2)) + (x1 + (x1 * (2.0 + (x1 * (((x1 * -4.0) + ((x2 * 6.0) + (x2 * 8.0))) - 6.0)))))) elif x1 <= -7.2e+38: tmp = x1 + (t_3 + (3.0 * (x2 * -2.0))) elif x1 <= 3.9e+102: tmp = x1 + (t_3 + (3.0 * ((x2 * -2.0) + (x1 * (-1.0 + (x1 * (3.0 - (x2 * -2.0)))))))) else: tmp = x1 + (x1 + (3.0 * (x1 * (-1.0 + (x1 * (x1 + 3.0)))))) return tmp
function code(x1, x2) t_0 = Float64(x1 * Float64(x1 * 3.0)) t_1 = Float64(x1 - Float64(t_0 + Float64(2.0 * x2))) t_2 = Float64(-1.0 - Float64(x1 * x1)) t_3 = Float64(x1 + Float64(Float64(x1 * Float64(x1 * x1)) + Float64(Float64(3.0 * t_0) + Float64(Float64(Float64(Float64(Float64(t_1 / t_2) * Float64(x1 * 2.0)) * Float64(3.0 + Float64(t_1 / Float64(Float64(x1 * x1) + 1.0)))) - Float64(Float64(x1 * x1) * 6.0)) * t_2)))) tmp = 0.0 if (x1 <= -4.5e+153) tmp = Float64(x1 + Float64(Float64(x2 * -6.0) + Float64(x1 * Float64(Float64(x1 * 9.0) - 2.0)))); elseif (x1 <= -5.2e+102) tmp = Float64(x1 + Float64(Float64(3.0 * Float64(Float64(x1 - Float64(t_0 - Float64(2.0 * x2))) / t_2)) + Float64(x1 + Float64(x1 * Float64(2.0 + Float64(x1 * Float64(Float64(Float64(x1 * -4.0) + Float64(Float64(x2 * 6.0) + Float64(x2 * 8.0))) - 6.0))))))); elseif (x1 <= -7.2e+38) tmp = Float64(x1 + Float64(t_3 + Float64(3.0 * Float64(x2 * -2.0)))); elseif (x1 <= 3.9e+102) tmp = Float64(x1 + Float64(t_3 + Float64(3.0 * Float64(Float64(x2 * -2.0) + Float64(x1 * Float64(-1.0 + Float64(x1 * Float64(3.0 - Float64(x2 * -2.0))))))))); else tmp = Float64(x1 + Float64(x1 + Float64(3.0 * Float64(x1 * Float64(-1.0 + Float64(x1 * Float64(x1 + 3.0))))))); end return tmp end
function tmp_2 = code(x1, x2) t_0 = x1 * (x1 * 3.0); t_1 = x1 - (t_0 + (2.0 * x2)); t_2 = -1.0 - (x1 * x1); t_3 = x1 + ((x1 * (x1 * x1)) + ((3.0 * t_0) + (((((t_1 / t_2) * (x1 * 2.0)) * (3.0 + (t_1 / ((x1 * x1) + 1.0)))) - ((x1 * x1) * 6.0)) * t_2))); tmp = 0.0; if (x1 <= -4.5e+153) tmp = x1 + ((x2 * -6.0) + (x1 * ((x1 * 9.0) - 2.0))); elseif (x1 <= -5.2e+102) tmp = x1 + ((3.0 * ((x1 - (t_0 - (2.0 * x2))) / t_2)) + (x1 + (x1 * (2.0 + (x1 * (((x1 * -4.0) + ((x2 * 6.0) + (x2 * 8.0))) - 6.0)))))); elseif (x1 <= -7.2e+38) tmp = x1 + (t_3 + (3.0 * (x2 * -2.0))); elseif (x1 <= 3.9e+102) tmp = x1 + (t_3 + (3.0 * ((x2 * -2.0) + (x1 * (-1.0 + (x1 * (3.0 - (x2 * -2.0)))))))); else tmp = x1 + (x1 + (3.0 * (x1 * (-1.0 + (x1 * (x1 + 3.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[(x1 - N[(t$95$0 + N[(2.0 * x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(-1.0 - N[(x1 * x1), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(x1 + N[(N[(x1 * N[(x1 * x1), $MachinePrecision]), $MachinePrecision] + N[(N[(3.0 * t$95$0), $MachinePrecision] + N[(N[(N[(N[(N[(t$95$1 / t$95$2), $MachinePrecision] * N[(x1 * 2.0), $MachinePrecision]), $MachinePrecision] * N[(3.0 + N[(t$95$1 / N[(N[(x1 * x1), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[(x1 * x1), $MachinePrecision] * 6.0), $MachinePrecision]), $MachinePrecision] * t$95$2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x1, -4.5e+153], N[(x1 + N[(N[(x2 * -6.0), $MachinePrecision] + N[(x1 * N[(N[(x1 * 9.0), $MachinePrecision] - 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, -5.2e+102], N[(x1 + N[(N[(3.0 * N[(N[(x1 - N[(t$95$0 - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / t$95$2), $MachinePrecision]), $MachinePrecision] + N[(x1 + N[(x1 * N[(2.0 + N[(x1 * N[(N[(N[(x1 * -4.0), $MachinePrecision] + N[(N[(x2 * 6.0), $MachinePrecision] + N[(x2 * 8.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, -7.2e+38], N[(x1 + N[(t$95$3 + N[(3.0 * N[(x2 * -2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 3.9e+102], N[(x1 + N[(t$95$3 + N[(3.0 * N[(N[(x2 * -2.0), $MachinePrecision] + N[(x1 * N[(-1.0 + N[(x1 * N[(3.0 - N[(x2 * -2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x1 + N[(x1 + N[(3.0 * N[(x1 * N[(-1.0 + N[(x1 * N[(x1 + 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x1 \cdot \left(x1 \cdot 3\right)\\
t_1 := x1 - \left(t\_0 + 2 \cdot x2\right)\\
t_2 := -1 - x1 \cdot x1\\
t_3 := x1 + \left(x1 \cdot \left(x1 \cdot x1\right) + \left(3 \cdot t\_0 + \left(\left(\frac{t\_1}{t\_2} \cdot \left(x1 \cdot 2\right)\right) \cdot \left(3 + \frac{t\_1}{x1 \cdot x1 + 1}\right) - \left(x1 \cdot x1\right) \cdot 6\right) \cdot t\_2\right)\right)\\
\mathbf{if}\;x1 \leq -4.5 \cdot 10^{+153}:\\
\;\;\;\;x1 + \left(x2 \cdot -6 + x1 \cdot \left(x1 \cdot 9 - 2\right)\right)\\
\mathbf{elif}\;x1 \leq -5.2 \cdot 10^{+102}:\\
\;\;\;\;x1 + \left(3 \cdot \frac{x1 - \left(t\_0 - 2 \cdot x2\right)}{t\_2} + \left(x1 + x1 \cdot \left(2 + x1 \cdot \left(\left(x1 \cdot -4 + \left(x2 \cdot 6 + x2 \cdot 8\right)\right) - 6\right)\right)\right)\right)\\
\mathbf{elif}\;x1 \leq -7.2 \cdot 10^{+38}:\\
\;\;\;\;x1 + \left(t\_3 + 3 \cdot \left(x2 \cdot -2\right)\right)\\
\mathbf{elif}\;x1 \leq 3.9 \cdot 10^{+102}:\\
\;\;\;\;x1 + \left(t\_3 + 3 \cdot \left(x2 \cdot -2 + x1 \cdot \left(-1 + x1 \cdot \left(3 - x2 \cdot -2\right)\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x1 + \left(x1 + 3 \cdot \left(x1 \cdot \left(-1 + x1 \cdot \left(x1 + 3\right)\right)\right)\right)\\
\end{array}
\end{array}
if x1 < -4.5000000000000001e153Initial program 0.0%
Taylor expanded in x1 around 0 0.0%
Taylor expanded in x1 around 0 0.0%
Taylor expanded in x1 around 0 67.6%
Taylor expanded in x2 around 0 100.0%
*-commutative100.0%
Simplified100.0%
if -4.5000000000000001e153 < x1 < -5.20000000000000013e102Initial program 0.0%
Taylor expanded in x1 around 0 0.0%
+-commutative0.0%
mul-1-neg0.0%
sub-neg0.0%
Simplified0.0%
Taylor expanded in x1 around inf 0.0%
*-commutative0.0%
Simplified0.0%
Taylor expanded in x1 around 0 93.3%
if -5.20000000000000013e102 < x1 < -7.19999999999999938e38Initial program 92.5%
Taylor expanded in x1 around inf 92.5%
Taylor expanded in x1 around inf 85.4%
Taylor expanded in x1 around 0 85.4%
*-commutative85.4%
Simplified85.4%
if -7.19999999999999938e38 < x1 < 3.8999999999999998e102Initial program 99.3%
Taylor expanded in x1 around inf 99.2%
Taylor expanded in x1 around inf 98.2%
Taylor expanded in x1 around 0 97.0%
if 3.8999999999999998e102 < x1 Initial program 26.5%
Taylor expanded in x1 around 0 15.3%
Taylor expanded in x1 around 0 79.4%
Taylor expanded in x2 around 0 97.1%
Final simplification96.6%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (+ x1 (+ (* x2 -6.0) (* x1 (- (* x1 9.0) 2.0)))))
(t_1 (* x1 (* x1 3.0)))
(t_2 (- t_1 (* 2.0 x2)))
(t_3 (- -1.0 (* x1 x1)))
(t_4 (- x1 (+ t_1 (* 2.0 x2)))))
(if (<= x1 -4.5e+153)
t_0
(if (<= x1 -3.6e+102)
(+
x1
(+
(* 3.0 (/ (- x1 t_2) t_3))
(+
x1
(*
x1
(+ 2.0 (* x1 (- (+ (* x1 -4.0) (+ (* x2 6.0) (* x2 8.0))) 6.0)))))))
(if (<= x1 4.2e+144)
(-
x1
(-
(* 3.0 (/ (- t_2 x1) t_3))
(+
x1
(+
(* x1 (* x1 x1))
(+
(* 3.0 t_1)
(*
(-
(*
(* (/ t_4 t_3) (* x1 2.0))
(+ 3.0 (/ t_4 (+ (* x1 x1) 1.0))))
(* (* x1 x1) 6.0))
t_3))))))
t_0)))))
double code(double x1, double x2) {
double t_0 = x1 + ((x2 * -6.0) + (x1 * ((x1 * 9.0) - 2.0)));
double t_1 = x1 * (x1 * 3.0);
double t_2 = t_1 - (2.0 * x2);
double t_3 = -1.0 - (x1 * x1);
double t_4 = x1 - (t_1 + (2.0 * x2));
double tmp;
if (x1 <= -4.5e+153) {
tmp = t_0;
} else if (x1 <= -3.6e+102) {
tmp = x1 + ((3.0 * ((x1 - t_2) / t_3)) + (x1 + (x1 * (2.0 + (x1 * (((x1 * -4.0) + ((x2 * 6.0) + (x2 * 8.0))) - 6.0))))));
} else if (x1 <= 4.2e+144) {
tmp = x1 - ((3.0 * ((t_2 - x1) / t_3)) - (x1 + ((x1 * (x1 * x1)) + ((3.0 * t_1) + (((((t_4 / t_3) * (x1 * 2.0)) * (3.0 + (t_4 / ((x1 * x1) + 1.0)))) - ((x1 * x1) * 6.0)) * t_3)))));
} else {
tmp = t_0;
}
return tmp;
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
real(8) :: t_0
real(8) :: t_1
real(8) :: t_2
real(8) :: t_3
real(8) :: t_4
real(8) :: tmp
t_0 = x1 + ((x2 * (-6.0d0)) + (x1 * ((x1 * 9.0d0) - 2.0d0)))
t_1 = x1 * (x1 * 3.0d0)
t_2 = t_1 - (2.0d0 * x2)
t_3 = (-1.0d0) - (x1 * x1)
t_4 = x1 - (t_1 + (2.0d0 * x2))
if (x1 <= (-4.5d+153)) then
tmp = t_0
else if (x1 <= (-3.6d+102)) then
tmp = x1 + ((3.0d0 * ((x1 - t_2) / t_3)) + (x1 + (x1 * (2.0d0 + (x1 * (((x1 * (-4.0d0)) + ((x2 * 6.0d0) + (x2 * 8.0d0))) - 6.0d0))))))
else if (x1 <= 4.2d+144) then
tmp = x1 - ((3.0d0 * ((t_2 - x1) / t_3)) - (x1 + ((x1 * (x1 * x1)) + ((3.0d0 * t_1) + (((((t_4 / t_3) * (x1 * 2.0d0)) * (3.0d0 + (t_4 / ((x1 * x1) + 1.0d0)))) - ((x1 * x1) * 6.0d0)) * t_3)))))
else
tmp = t_0
end if
code = tmp
end function
public static double code(double x1, double x2) {
double t_0 = x1 + ((x2 * -6.0) + (x1 * ((x1 * 9.0) - 2.0)));
double t_1 = x1 * (x1 * 3.0);
double t_2 = t_1 - (2.0 * x2);
double t_3 = -1.0 - (x1 * x1);
double t_4 = x1 - (t_1 + (2.0 * x2));
double tmp;
if (x1 <= -4.5e+153) {
tmp = t_0;
} else if (x1 <= -3.6e+102) {
tmp = x1 + ((3.0 * ((x1 - t_2) / t_3)) + (x1 + (x1 * (2.0 + (x1 * (((x1 * -4.0) + ((x2 * 6.0) + (x2 * 8.0))) - 6.0))))));
} else if (x1 <= 4.2e+144) {
tmp = x1 - ((3.0 * ((t_2 - x1) / t_3)) - (x1 + ((x1 * (x1 * x1)) + ((3.0 * t_1) + (((((t_4 / t_3) * (x1 * 2.0)) * (3.0 + (t_4 / ((x1 * x1) + 1.0)))) - ((x1 * x1) * 6.0)) * t_3)))));
} else {
tmp = t_0;
}
return tmp;
}
def code(x1, x2): t_0 = x1 + ((x2 * -6.0) + (x1 * ((x1 * 9.0) - 2.0))) t_1 = x1 * (x1 * 3.0) t_2 = t_1 - (2.0 * x2) t_3 = -1.0 - (x1 * x1) t_4 = x1 - (t_1 + (2.0 * x2)) tmp = 0 if x1 <= -4.5e+153: tmp = t_0 elif x1 <= -3.6e+102: tmp = x1 + ((3.0 * ((x1 - t_2) / t_3)) + (x1 + (x1 * (2.0 + (x1 * (((x1 * -4.0) + ((x2 * 6.0) + (x2 * 8.0))) - 6.0)))))) elif x1 <= 4.2e+144: tmp = x1 - ((3.0 * ((t_2 - x1) / t_3)) - (x1 + ((x1 * (x1 * x1)) + ((3.0 * t_1) + (((((t_4 / t_3) * (x1 * 2.0)) * (3.0 + (t_4 / ((x1 * x1) + 1.0)))) - ((x1 * x1) * 6.0)) * t_3))))) else: tmp = t_0 return tmp
function code(x1, x2) t_0 = Float64(x1 + Float64(Float64(x2 * -6.0) + Float64(x1 * Float64(Float64(x1 * 9.0) - 2.0)))) t_1 = Float64(x1 * Float64(x1 * 3.0)) t_2 = Float64(t_1 - Float64(2.0 * x2)) t_3 = Float64(-1.0 - Float64(x1 * x1)) t_4 = Float64(x1 - Float64(t_1 + Float64(2.0 * x2))) tmp = 0.0 if (x1 <= -4.5e+153) tmp = t_0; elseif (x1 <= -3.6e+102) tmp = Float64(x1 + Float64(Float64(3.0 * Float64(Float64(x1 - t_2) / t_3)) + Float64(x1 + Float64(x1 * Float64(2.0 + Float64(x1 * Float64(Float64(Float64(x1 * -4.0) + Float64(Float64(x2 * 6.0) + Float64(x2 * 8.0))) - 6.0))))))); elseif (x1 <= 4.2e+144) tmp = Float64(x1 - Float64(Float64(3.0 * Float64(Float64(t_2 - x1) / t_3)) - Float64(x1 + Float64(Float64(x1 * Float64(x1 * x1)) + Float64(Float64(3.0 * t_1) + Float64(Float64(Float64(Float64(Float64(t_4 / t_3) * Float64(x1 * 2.0)) * Float64(3.0 + Float64(t_4 / Float64(Float64(x1 * x1) + 1.0)))) - Float64(Float64(x1 * x1) * 6.0)) * t_3)))))); else tmp = t_0; end return tmp end
function tmp_2 = code(x1, x2) t_0 = x1 + ((x2 * -6.0) + (x1 * ((x1 * 9.0) - 2.0))); t_1 = x1 * (x1 * 3.0); t_2 = t_1 - (2.0 * x2); t_3 = -1.0 - (x1 * x1); t_4 = x1 - (t_1 + (2.0 * x2)); tmp = 0.0; if (x1 <= -4.5e+153) tmp = t_0; elseif (x1 <= -3.6e+102) tmp = x1 + ((3.0 * ((x1 - t_2) / t_3)) + (x1 + (x1 * (2.0 + (x1 * (((x1 * -4.0) + ((x2 * 6.0) + (x2 * 8.0))) - 6.0)))))); elseif (x1 <= 4.2e+144) tmp = x1 - ((3.0 * ((t_2 - x1) / t_3)) - (x1 + ((x1 * (x1 * x1)) + ((3.0 * t_1) + (((((t_4 / t_3) * (x1 * 2.0)) * (3.0 + (t_4 / ((x1 * x1) + 1.0)))) - ((x1 * x1) * 6.0)) * t_3))))); else tmp = t_0; end tmp_2 = tmp; end
code[x1_, x2_] := Block[{t$95$0 = N[(x1 + N[(N[(x2 * -6.0), $MachinePrecision] + N[(x1 * N[(N[(x1 * 9.0), $MachinePrecision] - 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(x1 * N[(x1 * 3.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(t$95$1 - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(-1.0 - N[(x1 * x1), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[(x1 - N[(t$95$1 + N[(2.0 * x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x1, -4.5e+153], t$95$0, If[LessEqual[x1, -3.6e+102], N[(x1 + N[(N[(3.0 * N[(N[(x1 - t$95$2), $MachinePrecision] / t$95$3), $MachinePrecision]), $MachinePrecision] + N[(x1 + N[(x1 * N[(2.0 + N[(x1 * N[(N[(N[(x1 * -4.0), $MachinePrecision] + N[(N[(x2 * 6.0), $MachinePrecision] + N[(x2 * 8.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 4.2e+144], N[(x1 - N[(N[(3.0 * N[(N[(t$95$2 - x1), $MachinePrecision] / t$95$3), $MachinePrecision]), $MachinePrecision] - N[(x1 + N[(N[(x1 * N[(x1 * x1), $MachinePrecision]), $MachinePrecision] + N[(N[(3.0 * t$95$1), $MachinePrecision] + N[(N[(N[(N[(N[(t$95$4 / t$95$3), $MachinePrecision] * N[(x1 * 2.0), $MachinePrecision]), $MachinePrecision] * N[(3.0 + N[(t$95$4 / N[(N[(x1 * x1), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[(x1 * x1), $MachinePrecision] * 6.0), $MachinePrecision]), $MachinePrecision] * t$95$3), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$0]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x1 + \left(x2 \cdot -6 + x1 \cdot \left(x1 \cdot 9 - 2\right)\right)\\
t_1 := x1 \cdot \left(x1 \cdot 3\right)\\
t_2 := t\_1 - 2 \cdot x2\\
t_3 := -1 - x1 \cdot x1\\
t_4 := x1 - \left(t\_1 + 2 \cdot x2\right)\\
\mathbf{if}\;x1 \leq -4.5 \cdot 10^{+153}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;x1 \leq -3.6 \cdot 10^{+102}:\\
\;\;\;\;x1 + \left(3 \cdot \frac{x1 - t\_2}{t\_3} + \left(x1 + x1 \cdot \left(2 + x1 \cdot \left(\left(x1 \cdot -4 + \left(x2 \cdot 6 + x2 \cdot 8\right)\right) - 6\right)\right)\right)\right)\\
\mathbf{elif}\;x1 \leq 4.2 \cdot 10^{+144}:\\
\;\;\;\;x1 - \left(3 \cdot \frac{t\_2 - x1}{t\_3} - \left(x1 + \left(x1 \cdot \left(x1 \cdot x1\right) + \left(3 \cdot t\_1 + \left(\left(\frac{t\_4}{t\_3} \cdot \left(x1 \cdot 2\right)\right) \cdot \left(3 + \frac{t\_4}{x1 \cdot x1 + 1}\right) - \left(x1 \cdot x1\right) \cdot 6\right) \cdot t\_3\right)\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
if x1 < -4.5000000000000001e153 or 4.19999999999999993e144 < x1 Initial program 0.0%
Taylor expanded in x1 around 0 0.0%
Taylor expanded in x1 around 0 32.2%
Taylor expanded in x1 around 0 66.1%
Taylor expanded in x2 around 0 98.3%
*-commutative98.3%
Simplified98.3%
if -4.5000000000000001e153 < x1 < -3.6000000000000002e102Initial program 0.0%
Taylor expanded in x1 around 0 0.0%
+-commutative0.0%
mul-1-neg0.0%
sub-neg0.0%
Simplified0.0%
Taylor expanded in x1 around inf 0.0%
*-commutative0.0%
Simplified0.0%
Taylor expanded in x1 around 0 93.3%
if -3.6000000000000002e102 < x1 < 4.19999999999999993e144Initial program 98.9%
Taylor expanded in x1 around inf 98.7%
Taylor expanded in x1 around inf 97.3%
Final simplification97.3%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (* x1 (* x1 3.0)))
(t_1 (* x1 (- (* x1 9.0) 2.0)))
(t_2 (+ x1 (+ (* x2 -6.0) t_1)))
(t_3 (- x1 (+ t_0 (* 2.0 x2))))
(t_4 (- -1.0 (* x1 x1)))
(t_5
(+
x1
(+
(+
x1
(+
(* x1 (* x1 x1))
(+
(* 3.0 t_0)
(*
(-
(*
(* (/ t_3 t_4) (* x1 2.0))
(+ 3.0 (/ t_3 (+ (* x1 x1) 1.0))))
(* (* x1 x1) 6.0))
t_4))))
(* 3.0 (* x2 -2.0))))))
(if (<= x1 -4.5e+153)
t_2
(if (<= x1 -3.9e+102)
(+
x1
(+
(* 3.0 (/ (- x1 (- t_0 (* 2.0 x2))) t_4))
(+
x1
(*
x1
(+ 2.0 (* x1 (- (+ (* x1 -4.0) (+ (* x2 6.0) (* x2 8.0))) 6.0)))))))
(if (<= x1 -0.0051)
t_5
(if (<= x1 2.9e-23)
(+
x1
(-
t_1
(* x2 (+ 6.0 (- (* x1 (- 12.0 (* x1 6.0))) (* 8.0 (* x1 x2)))))))
(if (<= x1 4.2e+144) t_5 t_2)))))))
double code(double x1, double x2) {
double t_0 = x1 * (x1 * 3.0);
double t_1 = x1 * ((x1 * 9.0) - 2.0);
double t_2 = x1 + ((x2 * -6.0) + t_1);
double t_3 = x1 - (t_0 + (2.0 * x2));
double t_4 = -1.0 - (x1 * x1);
double t_5 = x1 + ((x1 + ((x1 * (x1 * x1)) + ((3.0 * t_0) + (((((t_3 / t_4) * (x1 * 2.0)) * (3.0 + (t_3 / ((x1 * x1) + 1.0)))) - ((x1 * x1) * 6.0)) * t_4)))) + (3.0 * (x2 * -2.0)));
double tmp;
if (x1 <= -4.5e+153) {
tmp = t_2;
} else if (x1 <= -3.9e+102) {
tmp = x1 + ((3.0 * ((x1 - (t_0 - (2.0 * x2))) / t_4)) + (x1 + (x1 * (2.0 + (x1 * (((x1 * -4.0) + ((x2 * 6.0) + (x2 * 8.0))) - 6.0))))));
} else if (x1 <= -0.0051) {
tmp = t_5;
} else if (x1 <= 2.9e-23) {
tmp = x1 + (t_1 - (x2 * (6.0 + ((x1 * (12.0 - (x1 * 6.0))) - (8.0 * (x1 * x2))))));
} else if (x1 <= 4.2e+144) {
tmp = t_5;
} else {
tmp = t_2;
}
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) :: t_5
real(8) :: tmp
t_0 = x1 * (x1 * 3.0d0)
t_1 = x1 * ((x1 * 9.0d0) - 2.0d0)
t_2 = x1 + ((x2 * (-6.0d0)) + t_1)
t_3 = x1 - (t_0 + (2.0d0 * x2))
t_4 = (-1.0d0) - (x1 * x1)
t_5 = x1 + ((x1 + ((x1 * (x1 * x1)) + ((3.0d0 * t_0) + (((((t_3 / t_4) * (x1 * 2.0d0)) * (3.0d0 + (t_3 / ((x1 * x1) + 1.0d0)))) - ((x1 * x1) * 6.0d0)) * t_4)))) + (3.0d0 * (x2 * (-2.0d0))))
if (x1 <= (-4.5d+153)) then
tmp = t_2
else if (x1 <= (-3.9d+102)) then
tmp = x1 + ((3.0d0 * ((x1 - (t_0 - (2.0d0 * x2))) / t_4)) + (x1 + (x1 * (2.0d0 + (x1 * (((x1 * (-4.0d0)) + ((x2 * 6.0d0) + (x2 * 8.0d0))) - 6.0d0))))))
else if (x1 <= (-0.0051d0)) then
tmp = t_5
else if (x1 <= 2.9d-23) then
tmp = x1 + (t_1 - (x2 * (6.0d0 + ((x1 * (12.0d0 - (x1 * 6.0d0))) - (8.0d0 * (x1 * x2))))))
else if (x1 <= 4.2d+144) then
tmp = t_5
else
tmp = t_2
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 * 9.0) - 2.0);
double t_2 = x1 + ((x2 * -6.0) + t_1);
double t_3 = x1 - (t_0 + (2.0 * x2));
double t_4 = -1.0 - (x1 * x1);
double t_5 = x1 + ((x1 + ((x1 * (x1 * x1)) + ((3.0 * t_0) + (((((t_3 / t_4) * (x1 * 2.0)) * (3.0 + (t_3 / ((x1 * x1) + 1.0)))) - ((x1 * x1) * 6.0)) * t_4)))) + (3.0 * (x2 * -2.0)));
double tmp;
if (x1 <= -4.5e+153) {
tmp = t_2;
} else if (x1 <= -3.9e+102) {
tmp = x1 + ((3.0 * ((x1 - (t_0 - (2.0 * x2))) / t_4)) + (x1 + (x1 * (2.0 + (x1 * (((x1 * -4.0) + ((x2 * 6.0) + (x2 * 8.0))) - 6.0))))));
} else if (x1 <= -0.0051) {
tmp = t_5;
} else if (x1 <= 2.9e-23) {
tmp = x1 + (t_1 - (x2 * (6.0 + ((x1 * (12.0 - (x1 * 6.0))) - (8.0 * (x1 * x2))))));
} else if (x1 <= 4.2e+144) {
tmp = t_5;
} else {
tmp = t_2;
}
return tmp;
}
def code(x1, x2): t_0 = x1 * (x1 * 3.0) t_1 = x1 * ((x1 * 9.0) - 2.0) t_2 = x1 + ((x2 * -6.0) + t_1) t_3 = x1 - (t_0 + (2.0 * x2)) t_4 = -1.0 - (x1 * x1) t_5 = x1 + ((x1 + ((x1 * (x1 * x1)) + ((3.0 * t_0) + (((((t_3 / t_4) * (x1 * 2.0)) * (3.0 + (t_3 / ((x1 * x1) + 1.0)))) - ((x1 * x1) * 6.0)) * t_4)))) + (3.0 * (x2 * -2.0))) tmp = 0 if x1 <= -4.5e+153: tmp = t_2 elif x1 <= -3.9e+102: tmp = x1 + ((3.0 * ((x1 - (t_0 - (2.0 * x2))) / t_4)) + (x1 + (x1 * (2.0 + (x1 * (((x1 * -4.0) + ((x2 * 6.0) + (x2 * 8.0))) - 6.0)))))) elif x1 <= -0.0051: tmp = t_5 elif x1 <= 2.9e-23: tmp = x1 + (t_1 - (x2 * (6.0 + ((x1 * (12.0 - (x1 * 6.0))) - (8.0 * (x1 * x2)))))) elif x1 <= 4.2e+144: tmp = t_5 else: tmp = t_2 return tmp
function code(x1, x2) t_0 = Float64(x1 * Float64(x1 * 3.0)) t_1 = Float64(x1 * Float64(Float64(x1 * 9.0) - 2.0)) t_2 = Float64(x1 + Float64(Float64(x2 * -6.0) + t_1)) t_3 = Float64(x1 - Float64(t_0 + Float64(2.0 * x2))) t_4 = Float64(-1.0 - Float64(x1 * x1)) t_5 = Float64(x1 + Float64(Float64(x1 + Float64(Float64(x1 * Float64(x1 * x1)) + Float64(Float64(3.0 * t_0) + Float64(Float64(Float64(Float64(Float64(t_3 / t_4) * Float64(x1 * 2.0)) * Float64(3.0 + Float64(t_3 / Float64(Float64(x1 * x1) + 1.0)))) - Float64(Float64(x1 * x1) * 6.0)) * t_4)))) + Float64(3.0 * Float64(x2 * -2.0)))) tmp = 0.0 if (x1 <= -4.5e+153) tmp = t_2; elseif (x1 <= -3.9e+102) tmp = Float64(x1 + Float64(Float64(3.0 * Float64(Float64(x1 - Float64(t_0 - Float64(2.0 * x2))) / t_4)) + Float64(x1 + Float64(x1 * Float64(2.0 + Float64(x1 * Float64(Float64(Float64(x1 * -4.0) + Float64(Float64(x2 * 6.0) + Float64(x2 * 8.0))) - 6.0))))))); elseif (x1 <= -0.0051) tmp = t_5; elseif (x1 <= 2.9e-23) tmp = Float64(x1 + Float64(t_1 - Float64(x2 * Float64(6.0 + Float64(Float64(x1 * Float64(12.0 - Float64(x1 * 6.0))) - Float64(8.0 * Float64(x1 * x2))))))); elseif (x1 <= 4.2e+144) tmp = t_5; else tmp = t_2; end return tmp end
function tmp_2 = code(x1, x2) t_0 = x1 * (x1 * 3.0); t_1 = x1 * ((x1 * 9.0) - 2.0); t_2 = x1 + ((x2 * -6.0) + t_1); t_3 = x1 - (t_0 + (2.0 * x2)); t_4 = -1.0 - (x1 * x1); t_5 = x1 + ((x1 + ((x1 * (x1 * x1)) + ((3.0 * t_0) + (((((t_3 / t_4) * (x1 * 2.0)) * (3.0 + (t_3 / ((x1 * x1) + 1.0)))) - ((x1 * x1) * 6.0)) * t_4)))) + (3.0 * (x2 * -2.0))); tmp = 0.0; if (x1 <= -4.5e+153) tmp = t_2; elseif (x1 <= -3.9e+102) tmp = x1 + ((3.0 * ((x1 - (t_0 - (2.0 * x2))) / t_4)) + (x1 + (x1 * (2.0 + (x1 * (((x1 * -4.0) + ((x2 * 6.0) + (x2 * 8.0))) - 6.0)))))); elseif (x1 <= -0.0051) tmp = t_5; elseif (x1 <= 2.9e-23) tmp = x1 + (t_1 - (x2 * (6.0 + ((x1 * (12.0 - (x1 * 6.0))) - (8.0 * (x1 * x2)))))); elseif (x1 <= 4.2e+144) tmp = t_5; else tmp = t_2; 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[(x1 * N[(N[(x1 * 9.0), $MachinePrecision] - 2.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x1 + N[(N[(x2 * -6.0), $MachinePrecision] + t$95$1), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(x1 - N[(t$95$0 + N[(2.0 * x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[(-1.0 - N[(x1 * x1), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$5 = N[(x1 + N[(N[(x1 + N[(N[(x1 * N[(x1 * x1), $MachinePrecision]), $MachinePrecision] + N[(N[(3.0 * t$95$0), $MachinePrecision] + N[(N[(N[(N[(N[(t$95$3 / t$95$4), $MachinePrecision] * N[(x1 * 2.0), $MachinePrecision]), $MachinePrecision] * N[(3.0 + N[(t$95$3 / N[(N[(x1 * x1), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[(x1 * x1), $MachinePrecision] * 6.0), $MachinePrecision]), $MachinePrecision] * t$95$4), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(3.0 * N[(x2 * -2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x1, -4.5e+153], t$95$2, If[LessEqual[x1, -3.9e+102], N[(x1 + N[(N[(3.0 * N[(N[(x1 - N[(t$95$0 - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / t$95$4), $MachinePrecision]), $MachinePrecision] + N[(x1 + N[(x1 * N[(2.0 + N[(x1 * N[(N[(N[(x1 * -4.0), $MachinePrecision] + N[(N[(x2 * 6.0), $MachinePrecision] + N[(x2 * 8.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, -0.0051], t$95$5, If[LessEqual[x1, 2.9e-23], N[(x1 + N[(t$95$1 - N[(x2 * N[(6.0 + N[(N[(x1 * N[(12.0 - N[(x1 * 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(8.0 * N[(x1 * x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 4.2e+144], t$95$5, t$95$2]]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x1 \cdot \left(x1 \cdot 3\right)\\
t_1 := x1 \cdot \left(x1 \cdot 9 - 2\right)\\
t_2 := x1 + \left(x2 \cdot -6 + t\_1\right)\\
t_3 := x1 - \left(t\_0 + 2 \cdot x2\right)\\
t_4 := -1 - x1 \cdot x1\\
t_5 := x1 + \left(\left(x1 + \left(x1 \cdot \left(x1 \cdot x1\right) + \left(3 \cdot t\_0 + \left(\left(\frac{t\_3}{t\_4} \cdot \left(x1 \cdot 2\right)\right) \cdot \left(3 + \frac{t\_3}{x1 \cdot x1 + 1}\right) - \left(x1 \cdot x1\right) \cdot 6\right) \cdot t\_4\right)\right)\right) + 3 \cdot \left(x2 \cdot -2\right)\right)\\
\mathbf{if}\;x1 \leq -4.5 \cdot 10^{+153}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;x1 \leq -3.9 \cdot 10^{+102}:\\
\;\;\;\;x1 + \left(3 \cdot \frac{x1 - \left(t\_0 - 2 \cdot x2\right)}{t\_4} + \left(x1 + x1 \cdot \left(2 + x1 \cdot \left(\left(x1 \cdot -4 + \left(x2 \cdot 6 + x2 \cdot 8\right)\right) - 6\right)\right)\right)\right)\\
\mathbf{elif}\;x1 \leq -0.0051:\\
\;\;\;\;t\_5\\
\mathbf{elif}\;x1 \leq 2.9 \cdot 10^{-23}:\\
\;\;\;\;x1 + \left(t\_1 - x2 \cdot \left(6 + \left(x1 \cdot \left(12 - x1 \cdot 6\right) - 8 \cdot \left(x1 \cdot x2\right)\right)\right)\right)\\
\mathbf{elif}\;x1 \leq 4.2 \cdot 10^{+144}:\\
\;\;\;\;t\_5\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if x1 < -4.5000000000000001e153 or 4.19999999999999993e144 < x1 Initial program 0.0%
Taylor expanded in x1 around 0 0.0%
Taylor expanded in x1 around 0 32.2%
Taylor expanded in x1 around 0 66.1%
Taylor expanded in x2 around 0 98.3%
*-commutative98.3%
Simplified98.3%
if -4.5000000000000001e153 < x1 < -3.8999999999999998e102Initial program 0.0%
Taylor expanded in x1 around 0 0.0%
+-commutative0.0%
mul-1-neg0.0%
sub-neg0.0%
Simplified0.0%
Taylor expanded in x1 around inf 0.0%
*-commutative0.0%
Simplified0.0%
Taylor expanded in x1 around 0 93.3%
if -3.8999999999999998e102 < x1 < -0.0051000000000000004 or 2.9000000000000002e-23 < x1 < 4.19999999999999993e144Initial program 97.8%
Taylor expanded in x1 around inf 97.8%
Taylor expanded in x1 around inf 93.9%
Taylor expanded in x1 around 0 93.9%
*-commutative93.9%
Simplified93.9%
if -0.0051000000000000004 < x1 < 2.9000000000000002e-23Initial program 99.4%
Taylor expanded in x1 around 0 87.3%
Taylor expanded in x1 around 0 87.3%
Taylor expanded in x1 around 0 87.6%
Taylor expanded in x2 around 0 99.7%
Final simplification97.6%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (+ (* x1 x1) 1.0))
(t_1 (* (* x1 x1) 6.0))
(t_2 (* x1 (* x1 x1)))
(t_3 (* x1 (* x1 3.0)))
(t_4 (* 3.0 t_3))
(t_5 (- x1 (+ t_3 (* 2.0 x2))))
(t_6 (- -1.0 (* x1 x1)))
(t_7 (* 3.0 (/ (- x1 (- t_3 (* 2.0 x2))) t_6)))
(t_8 (/ t_5 t_6)))
(if (<= x1 -2e+154)
(+ x1 (+ (* x2 -6.0) (* x1 (- (* x1 9.0) 2.0))))
(if (<= x1 -5e+102)
(+
x1
(+
t_7
(+
x1
(*
x1
(+ 2.0 (* x1 (- (+ (* x1 -4.0) (+ (* x2 6.0) (* x2 8.0))) 6.0)))))))
(if (<= x1 -0.00018)
(+
x1
(+
(+
x1
(+
t_2
(+
t_4
(* (- (* (* t_8 (* x1 2.0)) (+ 3.0 (/ t_5 t_0))) t_1) t_6))))
(* 3.0 (* x2 -2.0))))
(if (<= x1 2e+97)
(+
x1
(+
t_7
(+
x1
(+
t_2
(+
t_4
(*
t_0
(+ t_1 (* (- t_8 3.0) (* (- (* 2.0 x2) x1) (* x1 2.0))))))))))
(+ x1 (+ x1 (* 3.0 (* x1 (+ -1.0 (* x1 (+ x1 3.0)))))))))))))
double code(double x1, double x2) {
double t_0 = (x1 * x1) + 1.0;
double t_1 = (x1 * x1) * 6.0;
double t_2 = x1 * (x1 * x1);
double t_3 = x1 * (x1 * 3.0);
double t_4 = 3.0 * t_3;
double t_5 = x1 - (t_3 + (2.0 * x2));
double t_6 = -1.0 - (x1 * x1);
double t_7 = 3.0 * ((x1 - (t_3 - (2.0 * x2))) / t_6);
double t_8 = t_5 / t_6;
double tmp;
if (x1 <= -2e+154) {
tmp = x1 + ((x2 * -6.0) + (x1 * ((x1 * 9.0) - 2.0)));
} else if (x1 <= -5e+102) {
tmp = x1 + (t_7 + (x1 + (x1 * (2.0 + (x1 * (((x1 * -4.0) + ((x2 * 6.0) + (x2 * 8.0))) - 6.0))))));
} else if (x1 <= -0.00018) {
tmp = x1 + ((x1 + (t_2 + (t_4 + ((((t_8 * (x1 * 2.0)) * (3.0 + (t_5 / t_0))) - t_1) * t_6)))) + (3.0 * (x2 * -2.0)));
} else if (x1 <= 2e+97) {
tmp = x1 + (t_7 + (x1 + (t_2 + (t_4 + (t_0 * (t_1 + ((t_8 - 3.0) * (((2.0 * x2) - x1) * (x1 * 2.0)))))))));
} else {
tmp = x1 + (x1 + (3.0 * (x1 * (-1.0 + (x1 * (x1 + 3.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) :: t_3
real(8) :: t_4
real(8) :: t_5
real(8) :: t_6
real(8) :: t_7
real(8) :: t_8
real(8) :: tmp
t_0 = (x1 * x1) + 1.0d0
t_1 = (x1 * x1) * 6.0d0
t_2 = x1 * (x1 * x1)
t_3 = x1 * (x1 * 3.0d0)
t_4 = 3.0d0 * t_3
t_5 = x1 - (t_3 + (2.0d0 * x2))
t_6 = (-1.0d0) - (x1 * x1)
t_7 = 3.0d0 * ((x1 - (t_3 - (2.0d0 * x2))) / t_6)
t_8 = t_5 / t_6
if (x1 <= (-2d+154)) then
tmp = x1 + ((x2 * (-6.0d0)) + (x1 * ((x1 * 9.0d0) - 2.0d0)))
else if (x1 <= (-5d+102)) then
tmp = x1 + (t_7 + (x1 + (x1 * (2.0d0 + (x1 * (((x1 * (-4.0d0)) + ((x2 * 6.0d0) + (x2 * 8.0d0))) - 6.0d0))))))
else if (x1 <= (-0.00018d0)) then
tmp = x1 + ((x1 + (t_2 + (t_4 + ((((t_8 * (x1 * 2.0d0)) * (3.0d0 + (t_5 / t_0))) - t_1) * t_6)))) + (3.0d0 * (x2 * (-2.0d0))))
else if (x1 <= 2d+97) then
tmp = x1 + (t_7 + (x1 + (t_2 + (t_4 + (t_0 * (t_1 + ((t_8 - 3.0d0) * (((2.0d0 * x2) - x1) * (x1 * 2.0d0)))))))))
else
tmp = x1 + (x1 + (3.0d0 * (x1 * ((-1.0d0) + (x1 * (x1 + 3.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) * 6.0;
double t_2 = x1 * (x1 * x1);
double t_3 = x1 * (x1 * 3.0);
double t_4 = 3.0 * t_3;
double t_5 = x1 - (t_3 + (2.0 * x2));
double t_6 = -1.0 - (x1 * x1);
double t_7 = 3.0 * ((x1 - (t_3 - (2.0 * x2))) / t_6);
double t_8 = t_5 / t_6;
double tmp;
if (x1 <= -2e+154) {
tmp = x1 + ((x2 * -6.0) + (x1 * ((x1 * 9.0) - 2.0)));
} else if (x1 <= -5e+102) {
tmp = x1 + (t_7 + (x1 + (x1 * (2.0 + (x1 * (((x1 * -4.0) + ((x2 * 6.0) + (x2 * 8.0))) - 6.0))))));
} else if (x1 <= -0.00018) {
tmp = x1 + ((x1 + (t_2 + (t_4 + ((((t_8 * (x1 * 2.0)) * (3.0 + (t_5 / t_0))) - t_1) * t_6)))) + (3.0 * (x2 * -2.0)));
} else if (x1 <= 2e+97) {
tmp = x1 + (t_7 + (x1 + (t_2 + (t_4 + (t_0 * (t_1 + ((t_8 - 3.0) * (((2.0 * x2) - x1) * (x1 * 2.0)))))))));
} else {
tmp = x1 + (x1 + (3.0 * (x1 * (-1.0 + (x1 * (x1 + 3.0))))));
}
return tmp;
}
def code(x1, x2): t_0 = (x1 * x1) + 1.0 t_1 = (x1 * x1) * 6.0 t_2 = x1 * (x1 * x1) t_3 = x1 * (x1 * 3.0) t_4 = 3.0 * t_3 t_5 = x1 - (t_3 + (2.0 * x2)) t_6 = -1.0 - (x1 * x1) t_7 = 3.0 * ((x1 - (t_3 - (2.0 * x2))) / t_6) t_8 = t_5 / t_6 tmp = 0 if x1 <= -2e+154: tmp = x1 + ((x2 * -6.0) + (x1 * ((x1 * 9.0) - 2.0))) elif x1 <= -5e+102: tmp = x1 + (t_7 + (x1 + (x1 * (2.0 + (x1 * (((x1 * -4.0) + ((x2 * 6.0) + (x2 * 8.0))) - 6.0)))))) elif x1 <= -0.00018: tmp = x1 + ((x1 + (t_2 + (t_4 + ((((t_8 * (x1 * 2.0)) * (3.0 + (t_5 / t_0))) - t_1) * t_6)))) + (3.0 * (x2 * -2.0))) elif x1 <= 2e+97: tmp = x1 + (t_7 + (x1 + (t_2 + (t_4 + (t_0 * (t_1 + ((t_8 - 3.0) * (((2.0 * x2) - x1) * (x1 * 2.0))))))))) else: tmp = x1 + (x1 + (3.0 * (x1 * (-1.0 + (x1 * (x1 + 3.0)))))) return tmp
function code(x1, x2) t_0 = Float64(Float64(x1 * x1) + 1.0) t_1 = Float64(Float64(x1 * x1) * 6.0) t_2 = Float64(x1 * Float64(x1 * x1)) t_3 = Float64(x1 * Float64(x1 * 3.0)) t_4 = Float64(3.0 * t_3) t_5 = Float64(x1 - Float64(t_3 + Float64(2.0 * x2))) t_6 = Float64(-1.0 - Float64(x1 * x1)) t_7 = Float64(3.0 * Float64(Float64(x1 - Float64(t_3 - Float64(2.0 * x2))) / t_6)) t_8 = Float64(t_5 / t_6) tmp = 0.0 if (x1 <= -2e+154) tmp = Float64(x1 + Float64(Float64(x2 * -6.0) + Float64(x1 * Float64(Float64(x1 * 9.0) - 2.0)))); elseif (x1 <= -5e+102) tmp = Float64(x1 + Float64(t_7 + Float64(x1 + Float64(x1 * Float64(2.0 + Float64(x1 * Float64(Float64(Float64(x1 * -4.0) + Float64(Float64(x2 * 6.0) + Float64(x2 * 8.0))) - 6.0))))))); elseif (x1 <= -0.00018) tmp = Float64(x1 + Float64(Float64(x1 + Float64(t_2 + Float64(t_4 + Float64(Float64(Float64(Float64(t_8 * Float64(x1 * 2.0)) * Float64(3.0 + Float64(t_5 / t_0))) - t_1) * t_6)))) + Float64(3.0 * Float64(x2 * -2.0)))); elseif (x1 <= 2e+97) tmp = Float64(x1 + Float64(t_7 + Float64(x1 + Float64(t_2 + Float64(t_4 + Float64(t_0 * Float64(t_1 + Float64(Float64(t_8 - 3.0) * Float64(Float64(Float64(2.0 * x2) - x1) * Float64(x1 * 2.0)))))))))); else tmp = Float64(x1 + Float64(x1 + Float64(3.0 * Float64(x1 * Float64(-1.0 + Float64(x1 * Float64(x1 + 3.0))))))); end return tmp end
function tmp_2 = code(x1, x2) t_0 = (x1 * x1) + 1.0; t_1 = (x1 * x1) * 6.0; t_2 = x1 * (x1 * x1); t_3 = x1 * (x1 * 3.0); t_4 = 3.0 * t_3; t_5 = x1 - (t_3 + (2.0 * x2)); t_6 = -1.0 - (x1 * x1); t_7 = 3.0 * ((x1 - (t_3 - (2.0 * x2))) / t_6); t_8 = t_5 / t_6; tmp = 0.0; if (x1 <= -2e+154) tmp = x1 + ((x2 * -6.0) + (x1 * ((x1 * 9.0) - 2.0))); elseif (x1 <= -5e+102) tmp = x1 + (t_7 + (x1 + (x1 * (2.0 + (x1 * (((x1 * -4.0) + ((x2 * 6.0) + (x2 * 8.0))) - 6.0)))))); elseif (x1 <= -0.00018) tmp = x1 + ((x1 + (t_2 + (t_4 + ((((t_8 * (x1 * 2.0)) * (3.0 + (t_5 / t_0))) - t_1) * t_6)))) + (3.0 * (x2 * -2.0))); elseif (x1 <= 2e+97) tmp = x1 + (t_7 + (x1 + (t_2 + (t_4 + (t_0 * (t_1 + ((t_8 - 3.0) * (((2.0 * x2) - x1) * (x1 * 2.0))))))))); else tmp = x1 + (x1 + (3.0 * (x1 * (-1.0 + (x1 * (x1 + 3.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[(N[(x1 * x1), $MachinePrecision] * 6.0), $MachinePrecision]}, Block[{t$95$2 = N[(x1 * N[(x1 * x1), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(x1 * N[(x1 * 3.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[(3.0 * t$95$3), $MachinePrecision]}, Block[{t$95$5 = N[(x1 - N[(t$95$3 + N[(2.0 * x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$6 = N[(-1.0 - N[(x1 * x1), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$7 = N[(3.0 * N[(N[(x1 - N[(t$95$3 - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / t$95$6), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$8 = N[(t$95$5 / t$95$6), $MachinePrecision]}, If[LessEqual[x1, -2e+154], N[(x1 + N[(N[(x2 * -6.0), $MachinePrecision] + N[(x1 * N[(N[(x1 * 9.0), $MachinePrecision] - 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, -5e+102], N[(x1 + N[(t$95$7 + N[(x1 + N[(x1 * N[(2.0 + N[(x1 * N[(N[(N[(x1 * -4.0), $MachinePrecision] + N[(N[(x2 * 6.0), $MachinePrecision] + N[(x2 * 8.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, -0.00018], N[(x1 + N[(N[(x1 + N[(t$95$2 + N[(t$95$4 + N[(N[(N[(N[(t$95$8 * N[(x1 * 2.0), $MachinePrecision]), $MachinePrecision] * N[(3.0 + N[(t$95$5 / t$95$0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision] * t$95$6), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(3.0 * N[(x2 * -2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 2e+97], N[(x1 + N[(t$95$7 + N[(x1 + N[(t$95$2 + N[(t$95$4 + N[(t$95$0 * N[(t$95$1 + N[(N[(t$95$8 - 3.0), $MachinePrecision] * N[(N[(N[(2.0 * x2), $MachinePrecision] - x1), $MachinePrecision] * N[(x1 * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x1 + N[(x1 + N[(3.0 * N[(x1 * N[(-1.0 + N[(x1 * N[(x1 + 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x1 \cdot x1 + 1\\
t_1 := \left(x1 \cdot x1\right) \cdot 6\\
t_2 := x1 \cdot \left(x1 \cdot x1\right)\\
t_3 := x1 \cdot \left(x1 \cdot 3\right)\\
t_4 := 3 \cdot t\_3\\
t_5 := x1 - \left(t\_3 + 2 \cdot x2\right)\\
t_6 := -1 - x1 \cdot x1\\
t_7 := 3 \cdot \frac{x1 - \left(t\_3 - 2 \cdot x2\right)}{t\_6}\\
t_8 := \frac{t\_5}{t\_6}\\
\mathbf{if}\;x1 \leq -2 \cdot 10^{+154}:\\
\;\;\;\;x1 + \left(x2 \cdot -6 + x1 \cdot \left(x1 \cdot 9 - 2\right)\right)\\
\mathbf{elif}\;x1 \leq -5 \cdot 10^{+102}:\\
\;\;\;\;x1 + \left(t\_7 + \left(x1 + x1 \cdot \left(2 + x1 \cdot \left(\left(x1 \cdot -4 + \left(x2 \cdot 6 + x2 \cdot 8\right)\right) - 6\right)\right)\right)\right)\\
\mathbf{elif}\;x1 \leq -0.00018:\\
\;\;\;\;x1 + \left(\left(x1 + \left(t\_2 + \left(t\_4 + \left(\left(t\_8 \cdot \left(x1 \cdot 2\right)\right) \cdot \left(3 + \frac{t\_5}{t\_0}\right) - t\_1\right) \cdot t\_6\right)\right)\right) + 3 \cdot \left(x2 \cdot -2\right)\right)\\
\mathbf{elif}\;x1 \leq 2 \cdot 10^{+97}:\\
\;\;\;\;x1 + \left(t\_7 + \left(x1 + \left(t\_2 + \left(t\_4 + t\_0 \cdot \left(t\_1 + \left(t\_8 - 3\right) \cdot \left(\left(2 \cdot x2 - x1\right) \cdot \left(x1 \cdot 2\right)\right)\right)\right)\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x1 + \left(x1 + 3 \cdot \left(x1 \cdot \left(-1 + x1 \cdot \left(x1 + 3\right)\right)\right)\right)\\
\end{array}
\end{array}
if x1 < -2.00000000000000007e154Initial program 0.0%
Taylor expanded in x1 around 0 0.0%
Taylor expanded in x1 around 0 0.0%
Taylor expanded in x1 around 0 67.6%
Taylor expanded in x2 around 0 100.0%
*-commutative100.0%
Simplified100.0%
if -2.00000000000000007e154 < x1 < -5e102Initial program 0.0%
Taylor expanded in x1 around 0 0.0%
+-commutative0.0%
mul-1-neg0.0%
sub-neg0.0%
Simplified0.0%
Taylor expanded in x1 around inf 0.0%
*-commutative0.0%
Simplified0.0%
Taylor expanded in x1 around 0 93.3%
if -5e102 < x1 < -1.80000000000000011e-4Initial program 95.9%
Taylor expanded in x1 around inf 95.9%
Taylor expanded in x1 around inf 87.0%
Taylor expanded in x1 around 0 87.0%
*-commutative87.0%
Simplified87.0%
if -1.80000000000000011e-4 < x1 < 2.0000000000000001e97Initial program 99.4%
Taylor expanded in x1 around inf 99.2%
Taylor expanded in x1 around inf 99.2%
Taylor expanded in x1 around 0 97.3%
+-commutative97.4%
mul-1-neg97.4%
sub-neg97.4%
Simplified97.3%
if 2.0000000000000001e97 < x1 Initial program 26.5%
Taylor expanded in x1 around 0 15.3%
Taylor expanded in x1 around 0 79.4%
Taylor expanded in x2 around 0 97.1%
Final simplification96.2%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (* x1 (* x1 3.0)))
(t_1 (* x1 (- (* x1 9.0) 2.0)))
(t_2 (+ x1 (+ (* x2 -6.0) t_1)))
(t_3 (- -1.0 (* x1 x1)))
(t_4 (* 3.0 (/ (- x1 (- t_0 (* 2.0 x2))) t_3)))
(t_5
(+
x1
(-
t_4
(-
(-
(-
(*
(+
(* (* x1 x1) (- (* (/ (- x1 (+ t_0 (* 2.0 x2))) t_3) 4.0) 6.0))
(* x1 2.0))
t_3)
(* 3.0 t_0))
(* x1 (* x1 x1)))
x1)))))
(if (<= x1 -4.5e+153)
t_2
(if (<= x1 -5.6e+102)
(+
x1
(+
t_4
(+
x1
(*
x1
(+ 2.0 (* x1 (- (+ (* x1 -4.0) (+ (* x2 6.0) (* x2 8.0))) 6.0)))))))
(if (<= x1 -6.8e+30)
t_5
(if (<= x1 23000000000000.0)
(+
x1
(-
t_1
(* x2 (+ 6.0 (- (* x1 (- 12.0 (* x1 6.0))) (* 8.0 (* x1 x2)))))))
(if (<= x1 4.2e+144) t_5 t_2)))))))
double code(double x1, double x2) {
double t_0 = x1 * (x1 * 3.0);
double t_1 = x1 * ((x1 * 9.0) - 2.0);
double t_2 = x1 + ((x2 * -6.0) + t_1);
double t_3 = -1.0 - (x1 * x1);
double t_4 = 3.0 * ((x1 - (t_0 - (2.0 * x2))) / t_3);
double t_5 = x1 + (t_4 - (((((((x1 * x1) * ((((x1 - (t_0 + (2.0 * x2))) / t_3) * 4.0) - 6.0)) + (x1 * 2.0)) * t_3) - (3.0 * t_0)) - (x1 * (x1 * x1))) - x1));
double tmp;
if (x1 <= -4.5e+153) {
tmp = t_2;
} else if (x1 <= -5.6e+102) {
tmp = x1 + (t_4 + (x1 + (x1 * (2.0 + (x1 * (((x1 * -4.0) + ((x2 * 6.0) + (x2 * 8.0))) - 6.0))))));
} else if (x1 <= -6.8e+30) {
tmp = t_5;
} else if (x1 <= 23000000000000.0) {
tmp = x1 + (t_1 - (x2 * (6.0 + ((x1 * (12.0 - (x1 * 6.0))) - (8.0 * (x1 * x2))))));
} else if (x1 <= 4.2e+144) {
tmp = t_5;
} else {
tmp = t_2;
}
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) :: t_5
real(8) :: tmp
t_0 = x1 * (x1 * 3.0d0)
t_1 = x1 * ((x1 * 9.0d0) - 2.0d0)
t_2 = x1 + ((x2 * (-6.0d0)) + t_1)
t_3 = (-1.0d0) - (x1 * x1)
t_4 = 3.0d0 * ((x1 - (t_0 - (2.0d0 * x2))) / t_3)
t_5 = x1 + (t_4 - (((((((x1 * x1) * ((((x1 - (t_0 + (2.0d0 * x2))) / t_3) * 4.0d0) - 6.0d0)) + (x1 * 2.0d0)) * t_3) - (3.0d0 * t_0)) - (x1 * (x1 * x1))) - x1))
if (x1 <= (-4.5d+153)) then
tmp = t_2
else if (x1 <= (-5.6d+102)) then
tmp = x1 + (t_4 + (x1 + (x1 * (2.0d0 + (x1 * (((x1 * (-4.0d0)) + ((x2 * 6.0d0) + (x2 * 8.0d0))) - 6.0d0))))))
else if (x1 <= (-6.8d+30)) then
tmp = t_5
else if (x1 <= 23000000000000.0d0) then
tmp = x1 + (t_1 - (x2 * (6.0d0 + ((x1 * (12.0d0 - (x1 * 6.0d0))) - (8.0d0 * (x1 * x2))))))
else if (x1 <= 4.2d+144) then
tmp = t_5
else
tmp = t_2
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 * 9.0) - 2.0);
double t_2 = x1 + ((x2 * -6.0) + t_1);
double t_3 = -1.0 - (x1 * x1);
double t_4 = 3.0 * ((x1 - (t_0 - (2.0 * x2))) / t_3);
double t_5 = x1 + (t_4 - (((((((x1 * x1) * ((((x1 - (t_0 + (2.0 * x2))) / t_3) * 4.0) - 6.0)) + (x1 * 2.0)) * t_3) - (3.0 * t_0)) - (x1 * (x1 * x1))) - x1));
double tmp;
if (x1 <= -4.5e+153) {
tmp = t_2;
} else if (x1 <= -5.6e+102) {
tmp = x1 + (t_4 + (x1 + (x1 * (2.0 + (x1 * (((x1 * -4.0) + ((x2 * 6.0) + (x2 * 8.0))) - 6.0))))));
} else if (x1 <= -6.8e+30) {
tmp = t_5;
} else if (x1 <= 23000000000000.0) {
tmp = x1 + (t_1 - (x2 * (6.0 + ((x1 * (12.0 - (x1 * 6.0))) - (8.0 * (x1 * x2))))));
} else if (x1 <= 4.2e+144) {
tmp = t_5;
} else {
tmp = t_2;
}
return tmp;
}
def code(x1, x2): t_0 = x1 * (x1 * 3.0) t_1 = x1 * ((x1 * 9.0) - 2.0) t_2 = x1 + ((x2 * -6.0) + t_1) t_3 = -1.0 - (x1 * x1) t_4 = 3.0 * ((x1 - (t_0 - (2.0 * x2))) / t_3) t_5 = x1 + (t_4 - (((((((x1 * x1) * ((((x1 - (t_0 + (2.0 * x2))) / t_3) * 4.0) - 6.0)) + (x1 * 2.0)) * t_3) - (3.0 * t_0)) - (x1 * (x1 * x1))) - x1)) tmp = 0 if x1 <= -4.5e+153: tmp = t_2 elif x1 <= -5.6e+102: tmp = x1 + (t_4 + (x1 + (x1 * (2.0 + (x1 * (((x1 * -4.0) + ((x2 * 6.0) + (x2 * 8.0))) - 6.0)))))) elif x1 <= -6.8e+30: tmp = t_5 elif x1 <= 23000000000000.0: tmp = x1 + (t_1 - (x2 * (6.0 + ((x1 * (12.0 - (x1 * 6.0))) - (8.0 * (x1 * x2)))))) elif x1 <= 4.2e+144: tmp = t_5 else: tmp = t_2 return tmp
function code(x1, x2) t_0 = Float64(x1 * Float64(x1 * 3.0)) t_1 = Float64(x1 * Float64(Float64(x1 * 9.0) - 2.0)) t_2 = Float64(x1 + Float64(Float64(x2 * -6.0) + t_1)) t_3 = Float64(-1.0 - Float64(x1 * x1)) t_4 = Float64(3.0 * Float64(Float64(x1 - Float64(t_0 - Float64(2.0 * x2))) / t_3)) t_5 = Float64(x1 + Float64(t_4 - Float64(Float64(Float64(Float64(Float64(Float64(Float64(x1 * x1) * Float64(Float64(Float64(Float64(x1 - Float64(t_0 + Float64(2.0 * x2))) / t_3) * 4.0) - 6.0)) + Float64(x1 * 2.0)) * t_3) - Float64(3.0 * t_0)) - Float64(x1 * Float64(x1 * x1))) - x1))) tmp = 0.0 if (x1 <= -4.5e+153) tmp = t_2; elseif (x1 <= -5.6e+102) tmp = Float64(x1 + Float64(t_4 + Float64(x1 + Float64(x1 * Float64(2.0 + Float64(x1 * Float64(Float64(Float64(x1 * -4.0) + Float64(Float64(x2 * 6.0) + Float64(x2 * 8.0))) - 6.0))))))); elseif (x1 <= -6.8e+30) tmp = t_5; elseif (x1 <= 23000000000000.0) tmp = Float64(x1 + Float64(t_1 - Float64(x2 * Float64(6.0 + Float64(Float64(x1 * Float64(12.0 - Float64(x1 * 6.0))) - Float64(8.0 * Float64(x1 * x2))))))); elseif (x1 <= 4.2e+144) tmp = t_5; else tmp = t_2; end return tmp end
function tmp_2 = code(x1, x2) t_0 = x1 * (x1 * 3.0); t_1 = x1 * ((x1 * 9.0) - 2.0); t_2 = x1 + ((x2 * -6.0) + t_1); t_3 = -1.0 - (x1 * x1); t_4 = 3.0 * ((x1 - (t_0 - (2.0 * x2))) / t_3); t_5 = x1 + (t_4 - (((((((x1 * x1) * ((((x1 - (t_0 + (2.0 * x2))) / t_3) * 4.0) - 6.0)) + (x1 * 2.0)) * t_3) - (3.0 * t_0)) - (x1 * (x1 * x1))) - x1)); tmp = 0.0; if (x1 <= -4.5e+153) tmp = t_2; elseif (x1 <= -5.6e+102) tmp = x1 + (t_4 + (x1 + (x1 * (2.0 + (x1 * (((x1 * -4.0) + ((x2 * 6.0) + (x2 * 8.0))) - 6.0)))))); elseif (x1 <= -6.8e+30) tmp = t_5; elseif (x1 <= 23000000000000.0) tmp = x1 + (t_1 - (x2 * (6.0 + ((x1 * (12.0 - (x1 * 6.0))) - (8.0 * (x1 * x2)))))); elseif (x1 <= 4.2e+144) tmp = t_5; else tmp = t_2; 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[(x1 * N[(N[(x1 * 9.0), $MachinePrecision] - 2.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x1 + N[(N[(x2 * -6.0), $MachinePrecision] + t$95$1), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(-1.0 - N[(x1 * x1), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[(3.0 * N[(N[(x1 - N[(t$95$0 - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / t$95$3), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$5 = N[(x1 + N[(t$95$4 - N[(N[(N[(N[(N[(N[(N[(x1 * x1), $MachinePrecision] * N[(N[(N[(N[(x1 - N[(t$95$0 + N[(2.0 * x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / t$95$3), $MachinePrecision] * 4.0), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision] + N[(x1 * 2.0), $MachinePrecision]), $MachinePrecision] * t$95$3), $MachinePrecision] - N[(3.0 * t$95$0), $MachinePrecision]), $MachinePrecision] - N[(x1 * N[(x1 * x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x1, -4.5e+153], t$95$2, If[LessEqual[x1, -5.6e+102], N[(x1 + N[(t$95$4 + N[(x1 + N[(x1 * N[(2.0 + N[(x1 * N[(N[(N[(x1 * -4.0), $MachinePrecision] + N[(N[(x2 * 6.0), $MachinePrecision] + N[(x2 * 8.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, -6.8e+30], t$95$5, If[LessEqual[x1, 23000000000000.0], N[(x1 + N[(t$95$1 - N[(x2 * N[(6.0 + N[(N[(x1 * N[(12.0 - N[(x1 * 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(8.0 * N[(x1 * x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 4.2e+144], t$95$5, t$95$2]]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x1 \cdot \left(x1 \cdot 3\right)\\
t_1 := x1 \cdot \left(x1 \cdot 9 - 2\right)\\
t_2 := x1 + \left(x2 \cdot -6 + t\_1\right)\\
t_3 := -1 - x1 \cdot x1\\
t_4 := 3 \cdot \frac{x1 - \left(t\_0 - 2 \cdot x2\right)}{t\_3}\\
t_5 := x1 + \left(t\_4 - \left(\left(\left(\left(\left(x1 \cdot x1\right) \cdot \left(\frac{x1 - \left(t\_0 + 2 \cdot x2\right)}{t\_3} \cdot 4 - 6\right) + x1 \cdot 2\right) \cdot t\_3 - 3 \cdot t\_0\right) - x1 \cdot \left(x1 \cdot x1\right)\right) - x1\right)\right)\\
\mathbf{if}\;x1 \leq -4.5 \cdot 10^{+153}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;x1 \leq -5.6 \cdot 10^{+102}:\\
\;\;\;\;x1 + \left(t\_4 + \left(x1 + x1 \cdot \left(2 + x1 \cdot \left(\left(x1 \cdot -4 + \left(x2 \cdot 6 + x2 \cdot 8\right)\right) - 6\right)\right)\right)\right)\\
\mathbf{elif}\;x1 \leq -6.8 \cdot 10^{+30}:\\
\;\;\;\;t\_5\\
\mathbf{elif}\;x1 \leq 23000000000000:\\
\;\;\;\;x1 + \left(t\_1 - x2 \cdot \left(6 + \left(x1 \cdot \left(12 - x1 \cdot 6\right) - 8 \cdot \left(x1 \cdot x2\right)\right)\right)\right)\\
\mathbf{elif}\;x1 \leq 4.2 \cdot 10^{+144}:\\
\;\;\;\;t\_5\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if x1 < -4.5000000000000001e153 or 4.19999999999999993e144 < x1 Initial program 0.0%
Taylor expanded in x1 around 0 0.0%
Taylor expanded in x1 around 0 32.2%
Taylor expanded in x1 around 0 66.1%
Taylor expanded in x2 around 0 98.3%
*-commutative98.3%
Simplified98.3%
if -4.5000000000000001e153 < x1 < -5.60000000000000037e102Initial program 0.0%
Taylor expanded in x1 around 0 0.0%
+-commutative0.0%
mul-1-neg0.0%
sub-neg0.0%
Simplified0.0%
Taylor expanded in x1 around inf 0.0%
*-commutative0.0%
Simplified0.0%
Taylor expanded in x1 around 0 93.3%
if -5.60000000000000037e102 < x1 < -6.8000000000000005e30 or 2.3e13 < x1 < 4.19999999999999993e144Initial program 97.3%
Taylor expanded in x1 around 0 83.5%
+-commutative83.5%
mul-1-neg83.5%
sub-neg83.5%
Simplified83.5%
Taylor expanded in x1 around inf 79.2%
*-commutative79.2%
Simplified79.2%
Taylor expanded in x1 around inf 79.2%
if -6.8000000000000005e30 < x1 < 2.3e13Initial program 99.4%
Taylor expanded in x1 around 0 83.5%
Taylor expanded in x1 around 0 83.5%
Taylor expanded in x1 around 0 83.9%
Taylor expanded in x2 around 0 95.2%
Final simplification92.7%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (* x1 (* x1 3.0)))
(t_1 (* x1 (- (* x1 9.0) 2.0)))
(t_2 (+ x1 (+ (* x2 -6.0) t_1)))
(t_3 (- -1.0 (* x1 x1)))
(t_4 (* 3.0 (/ (- x1 (- t_0 (* 2.0 x2))) t_3)))
(t_5 (- 3.0 (* 2.0 x2))))
(if (<= x1 -4.5e+150)
t_2
(if (<= x1 -1.6e+84)
(+
x1
(+
t_4
(+
x1
(*
x1
(-
2.0
(*
x1
(+
6.0
(-
(-
(*
x1
(-
4.0
(* x1 (- (+ (* 3.0 t_5) (+ (* x2 8.0) (* 4.0 t_5))) 6.0))))
(* x2 8.0))
(* x2 6.0)))))))))
(if (<= x1 2e+14)
(+
x1
(-
t_1
(* x2 (+ 6.0 (- (* x1 (- 12.0 (* x1 6.0))) (* 8.0 (* x1 x2)))))))
(if (<= x1 4.2e+144)
(+
x1
(-
t_4
(-
(-
(-
(* (+ (* (* x1 x1) 6.0) (* x1 2.0)) t_3)
(* t_0 (/ (- x1 (+ t_0 (* 2.0 x2))) t_3)))
(* x1 (* x1 x1)))
x1)))
t_2))))))
double code(double x1, double x2) {
double t_0 = x1 * (x1 * 3.0);
double t_1 = x1 * ((x1 * 9.0) - 2.0);
double t_2 = x1 + ((x2 * -6.0) + t_1);
double t_3 = -1.0 - (x1 * x1);
double t_4 = 3.0 * ((x1 - (t_0 - (2.0 * x2))) / t_3);
double t_5 = 3.0 - (2.0 * x2);
double tmp;
if (x1 <= -4.5e+150) {
tmp = t_2;
} else if (x1 <= -1.6e+84) {
tmp = x1 + (t_4 + (x1 + (x1 * (2.0 - (x1 * (6.0 + (((x1 * (4.0 - (x1 * (((3.0 * t_5) + ((x2 * 8.0) + (4.0 * t_5))) - 6.0)))) - (x2 * 8.0)) - (x2 * 6.0))))))));
} else if (x1 <= 2e+14) {
tmp = x1 + (t_1 - (x2 * (6.0 + ((x1 * (12.0 - (x1 * 6.0))) - (8.0 * (x1 * x2))))));
} else if (x1 <= 4.2e+144) {
tmp = x1 + (t_4 - (((((((x1 * x1) * 6.0) + (x1 * 2.0)) * t_3) - (t_0 * ((x1 - (t_0 + (2.0 * x2))) / t_3))) - (x1 * (x1 * x1))) - x1));
} else {
tmp = t_2;
}
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) :: t_5
real(8) :: tmp
t_0 = x1 * (x1 * 3.0d0)
t_1 = x1 * ((x1 * 9.0d0) - 2.0d0)
t_2 = x1 + ((x2 * (-6.0d0)) + t_1)
t_3 = (-1.0d0) - (x1 * x1)
t_4 = 3.0d0 * ((x1 - (t_0 - (2.0d0 * x2))) / t_3)
t_5 = 3.0d0 - (2.0d0 * x2)
if (x1 <= (-4.5d+150)) then
tmp = t_2
else if (x1 <= (-1.6d+84)) then
tmp = x1 + (t_4 + (x1 + (x1 * (2.0d0 - (x1 * (6.0d0 + (((x1 * (4.0d0 - (x1 * (((3.0d0 * t_5) + ((x2 * 8.0d0) + (4.0d0 * t_5))) - 6.0d0)))) - (x2 * 8.0d0)) - (x2 * 6.0d0))))))))
else if (x1 <= 2d+14) then
tmp = x1 + (t_1 - (x2 * (6.0d0 + ((x1 * (12.0d0 - (x1 * 6.0d0))) - (8.0d0 * (x1 * x2))))))
else if (x1 <= 4.2d+144) then
tmp = x1 + (t_4 - (((((((x1 * x1) * 6.0d0) + (x1 * 2.0d0)) * t_3) - (t_0 * ((x1 - (t_0 + (2.0d0 * x2))) / t_3))) - (x1 * (x1 * x1))) - x1))
else
tmp = t_2
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 * 9.0) - 2.0);
double t_2 = x1 + ((x2 * -6.0) + t_1);
double t_3 = -1.0 - (x1 * x1);
double t_4 = 3.0 * ((x1 - (t_0 - (2.0 * x2))) / t_3);
double t_5 = 3.0 - (2.0 * x2);
double tmp;
if (x1 <= -4.5e+150) {
tmp = t_2;
} else if (x1 <= -1.6e+84) {
tmp = x1 + (t_4 + (x1 + (x1 * (2.0 - (x1 * (6.0 + (((x1 * (4.0 - (x1 * (((3.0 * t_5) + ((x2 * 8.0) + (4.0 * t_5))) - 6.0)))) - (x2 * 8.0)) - (x2 * 6.0))))))));
} else if (x1 <= 2e+14) {
tmp = x1 + (t_1 - (x2 * (6.0 + ((x1 * (12.0 - (x1 * 6.0))) - (8.0 * (x1 * x2))))));
} else if (x1 <= 4.2e+144) {
tmp = x1 + (t_4 - (((((((x1 * x1) * 6.0) + (x1 * 2.0)) * t_3) - (t_0 * ((x1 - (t_0 + (2.0 * x2))) / t_3))) - (x1 * (x1 * x1))) - x1));
} else {
tmp = t_2;
}
return tmp;
}
def code(x1, x2): t_0 = x1 * (x1 * 3.0) t_1 = x1 * ((x1 * 9.0) - 2.0) t_2 = x1 + ((x2 * -6.0) + t_1) t_3 = -1.0 - (x1 * x1) t_4 = 3.0 * ((x1 - (t_0 - (2.0 * x2))) / t_3) t_5 = 3.0 - (2.0 * x2) tmp = 0 if x1 <= -4.5e+150: tmp = t_2 elif x1 <= -1.6e+84: tmp = x1 + (t_4 + (x1 + (x1 * (2.0 - (x1 * (6.0 + (((x1 * (4.0 - (x1 * (((3.0 * t_5) + ((x2 * 8.0) + (4.0 * t_5))) - 6.0)))) - (x2 * 8.0)) - (x2 * 6.0)))))))) elif x1 <= 2e+14: tmp = x1 + (t_1 - (x2 * (6.0 + ((x1 * (12.0 - (x1 * 6.0))) - (8.0 * (x1 * x2)))))) elif x1 <= 4.2e+144: tmp = x1 + (t_4 - (((((((x1 * x1) * 6.0) + (x1 * 2.0)) * t_3) - (t_0 * ((x1 - (t_0 + (2.0 * x2))) / t_3))) - (x1 * (x1 * x1))) - x1)) else: tmp = t_2 return tmp
function code(x1, x2) t_0 = Float64(x1 * Float64(x1 * 3.0)) t_1 = Float64(x1 * Float64(Float64(x1 * 9.0) - 2.0)) t_2 = Float64(x1 + Float64(Float64(x2 * -6.0) + t_1)) t_3 = Float64(-1.0 - Float64(x1 * x1)) t_4 = Float64(3.0 * Float64(Float64(x1 - Float64(t_0 - Float64(2.0 * x2))) / t_3)) t_5 = Float64(3.0 - Float64(2.0 * x2)) tmp = 0.0 if (x1 <= -4.5e+150) tmp = t_2; elseif (x1 <= -1.6e+84) tmp = Float64(x1 + Float64(t_4 + Float64(x1 + Float64(x1 * Float64(2.0 - Float64(x1 * Float64(6.0 + Float64(Float64(Float64(x1 * Float64(4.0 - Float64(x1 * Float64(Float64(Float64(3.0 * t_5) + Float64(Float64(x2 * 8.0) + Float64(4.0 * t_5))) - 6.0)))) - Float64(x2 * 8.0)) - Float64(x2 * 6.0))))))))); elseif (x1 <= 2e+14) tmp = Float64(x1 + Float64(t_1 - Float64(x2 * Float64(6.0 + Float64(Float64(x1 * Float64(12.0 - Float64(x1 * 6.0))) - Float64(8.0 * Float64(x1 * x2))))))); elseif (x1 <= 4.2e+144) tmp = Float64(x1 + Float64(t_4 - Float64(Float64(Float64(Float64(Float64(Float64(Float64(x1 * x1) * 6.0) + Float64(x1 * 2.0)) * t_3) - Float64(t_0 * Float64(Float64(x1 - Float64(t_0 + Float64(2.0 * x2))) / t_3))) - Float64(x1 * Float64(x1 * x1))) - x1))); else tmp = t_2; end return tmp end
function tmp_2 = code(x1, x2) t_0 = x1 * (x1 * 3.0); t_1 = x1 * ((x1 * 9.0) - 2.0); t_2 = x1 + ((x2 * -6.0) + t_1); t_3 = -1.0 - (x1 * x1); t_4 = 3.0 * ((x1 - (t_0 - (2.0 * x2))) / t_3); t_5 = 3.0 - (2.0 * x2); tmp = 0.0; if (x1 <= -4.5e+150) tmp = t_2; elseif (x1 <= -1.6e+84) tmp = x1 + (t_4 + (x1 + (x1 * (2.0 - (x1 * (6.0 + (((x1 * (4.0 - (x1 * (((3.0 * t_5) + ((x2 * 8.0) + (4.0 * t_5))) - 6.0)))) - (x2 * 8.0)) - (x2 * 6.0)))))))); elseif (x1 <= 2e+14) tmp = x1 + (t_1 - (x2 * (6.0 + ((x1 * (12.0 - (x1 * 6.0))) - (8.0 * (x1 * x2)))))); elseif (x1 <= 4.2e+144) tmp = x1 + (t_4 - (((((((x1 * x1) * 6.0) + (x1 * 2.0)) * t_3) - (t_0 * ((x1 - (t_0 + (2.0 * x2))) / t_3))) - (x1 * (x1 * x1))) - x1)); else tmp = t_2; 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[(x1 * N[(N[(x1 * 9.0), $MachinePrecision] - 2.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x1 + N[(N[(x2 * -6.0), $MachinePrecision] + t$95$1), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(-1.0 - N[(x1 * x1), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[(3.0 * N[(N[(x1 - N[(t$95$0 - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / t$95$3), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$5 = N[(3.0 - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x1, -4.5e+150], t$95$2, If[LessEqual[x1, -1.6e+84], N[(x1 + N[(t$95$4 + N[(x1 + N[(x1 * N[(2.0 - N[(x1 * N[(6.0 + N[(N[(N[(x1 * N[(4.0 - N[(x1 * N[(N[(N[(3.0 * t$95$5), $MachinePrecision] + N[(N[(x2 * 8.0), $MachinePrecision] + N[(4.0 * t$95$5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(x2 * 8.0), $MachinePrecision]), $MachinePrecision] - N[(x2 * 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 2e+14], N[(x1 + N[(t$95$1 - N[(x2 * N[(6.0 + N[(N[(x1 * N[(12.0 - N[(x1 * 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(8.0 * N[(x1 * x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 4.2e+144], N[(x1 + N[(t$95$4 - N[(N[(N[(N[(N[(N[(N[(x1 * x1), $MachinePrecision] * 6.0), $MachinePrecision] + N[(x1 * 2.0), $MachinePrecision]), $MachinePrecision] * t$95$3), $MachinePrecision] - N[(t$95$0 * N[(N[(x1 - N[(t$95$0 + N[(2.0 * x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / t$95$3), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(x1 * N[(x1 * x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$2]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x1 \cdot \left(x1 \cdot 3\right)\\
t_1 := x1 \cdot \left(x1 \cdot 9 - 2\right)\\
t_2 := x1 + \left(x2 \cdot -6 + t\_1\right)\\
t_3 := -1 - x1 \cdot x1\\
t_4 := 3 \cdot \frac{x1 - \left(t\_0 - 2 \cdot x2\right)}{t\_3}\\
t_5 := 3 - 2 \cdot x2\\
\mathbf{if}\;x1 \leq -4.5 \cdot 10^{+150}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;x1 \leq -1.6 \cdot 10^{+84}:\\
\;\;\;\;x1 + \left(t\_4 + \left(x1 + x1 \cdot \left(2 - x1 \cdot \left(6 + \left(\left(x1 \cdot \left(4 - x1 \cdot \left(\left(3 \cdot t\_5 + \left(x2 \cdot 8 + 4 \cdot t\_5\right)\right) - 6\right)\right) - x2 \cdot 8\right) - x2 \cdot 6\right)\right)\right)\right)\right)\\
\mathbf{elif}\;x1 \leq 2 \cdot 10^{+14}:\\
\;\;\;\;x1 + \left(t\_1 - x2 \cdot \left(6 + \left(x1 \cdot \left(12 - x1 \cdot 6\right) - 8 \cdot \left(x1 \cdot x2\right)\right)\right)\right)\\
\mathbf{elif}\;x1 \leq 4.2 \cdot 10^{+144}:\\
\;\;\;\;x1 + \left(t\_4 - \left(\left(\left(\left(\left(x1 \cdot x1\right) \cdot 6 + x1 \cdot 2\right) \cdot t\_3 - t\_0 \cdot \frac{x1 - \left(t\_0 + 2 \cdot x2\right)}{t\_3}\right) - x1 \cdot \left(x1 \cdot x1\right)\right) - x1\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if x1 < -4.5e150 or 4.19999999999999993e144 < x1 Initial program 0.0%
Taylor expanded in x1 around 0 0.0%
Taylor expanded in x1 around 0 31.7%
Taylor expanded in x1 around 0 66.7%
Taylor expanded in x2 around 0 96.9%
*-commutative96.9%
Simplified96.9%
if -4.5e150 < x1 < -1.60000000000000005e84Initial program 17.6%
Taylor expanded in x1 around 0 17.6%
+-commutative17.6%
mul-1-neg17.6%
sub-neg17.6%
Simplified17.6%
Taylor expanded in x1 around inf 17.6%
*-commutative17.6%
Simplified17.6%
Taylor expanded in x1 around 0 88.2%
if -1.60000000000000005e84 < x1 < 2e14Initial program 98.7%
Taylor expanded in x1 around 0 78.0%
Taylor expanded in x1 around 0 75.9%
Taylor expanded in x1 around 0 77.2%
Taylor expanded in x2 around 0 89.3%
if 2e14 < x1 < 4.19999999999999993e144Initial program 99.3%
Taylor expanded in x1 around 0 86.2%
+-commutative86.2%
mul-1-neg86.2%
sub-neg86.2%
Simplified86.2%
Taylor expanded in x1 around inf 82.9%
*-commutative82.9%
Simplified82.9%
Taylor expanded in x1 around inf 80.1%
Final simplification89.9%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (* x1 (- (* x1 9.0) 2.0))) (t_1 (- 3.0 (* 2.0 x2))))
(if (<= x1 -4.5e+150)
(+ x1 (+ (* x2 -6.0) t_0))
(if (<= x1 -1.6e+84)
(+
x1
(+
(* 3.0 (/ (- x1 (- (* x1 (* x1 3.0)) (* 2.0 x2))) (- -1.0 (* x1 x1))))
(+
x1
(*
x1
(-
2.0
(*
x1
(+
6.0
(-
(-
(*
x1
(-
4.0
(* x1 (- (+ (* 3.0 t_1) (+ (* x2 8.0) (* 4.0 t_1))) 6.0))))
(* x2 8.0))
(* x2 6.0)))))))))
(if (<= x1 16500000000000.0)
(+
x1
(-
t_0
(* x2 (+ 6.0 (- (* x1 (- 12.0 (* x1 6.0))) (* 8.0 (* x1 x2)))))))
(+
x1
(+
(* 3.0 (* x1 (+ -1.0 (* x1 (+ x1 3.0)))))
(- x1 (* 4.0 (* x1 (* x2 t_1)))))))))))
double code(double x1, double x2) {
double t_0 = x1 * ((x1 * 9.0) - 2.0);
double t_1 = 3.0 - (2.0 * x2);
double tmp;
if (x1 <= -4.5e+150) {
tmp = x1 + ((x2 * -6.0) + t_0);
} else if (x1 <= -1.6e+84) {
tmp = x1 + ((3.0 * ((x1 - ((x1 * (x1 * 3.0)) - (2.0 * x2))) / (-1.0 - (x1 * x1)))) + (x1 + (x1 * (2.0 - (x1 * (6.0 + (((x1 * (4.0 - (x1 * (((3.0 * t_1) + ((x2 * 8.0) + (4.0 * t_1))) - 6.0)))) - (x2 * 8.0)) - (x2 * 6.0))))))));
} else if (x1 <= 16500000000000.0) {
tmp = x1 + (t_0 - (x2 * (6.0 + ((x1 * (12.0 - (x1 * 6.0))) - (8.0 * (x1 * x2))))));
} else {
tmp = x1 + ((3.0 * (x1 * (-1.0 + (x1 * (x1 + 3.0))))) + (x1 - (4.0 * (x1 * (x2 * 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 = x1 * ((x1 * 9.0d0) - 2.0d0)
t_1 = 3.0d0 - (2.0d0 * x2)
if (x1 <= (-4.5d+150)) then
tmp = x1 + ((x2 * (-6.0d0)) + t_0)
else if (x1 <= (-1.6d+84)) then
tmp = x1 + ((3.0d0 * ((x1 - ((x1 * (x1 * 3.0d0)) - (2.0d0 * x2))) / ((-1.0d0) - (x1 * x1)))) + (x1 + (x1 * (2.0d0 - (x1 * (6.0d0 + (((x1 * (4.0d0 - (x1 * (((3.0d0 * t_1) + ((x2 * 8.0d0) + (4.0d0 * t_1))) - 6.0d0)))) - (x2 * 8.0d0)) - (x2 * 6.0d0))))))))
else if (x1 <= 16500000000000.0d0) then
tmp = x1 + (t_0 - (x2 * (6.0d0 + ((x1 * (12.0d0 - (x1 * 6.0d0))) - (8.0d0 * (x1 * x2))))))
else
tmp = x1 + ((3.0d0 * (x1 * ((-1.0d0) + (x1 * (x1 + 3.0d0))))) + (x1 - (4.0d0 * (x1 * (x2 * t_1)))))
end if
code = tmp
end function
public static double code(double x1, double x2) {
double t_0 = x1 * ((x1 * 9.0) - 2.0);
double t_1 = 3.0 - (2.0 * x2);
double tmp;
if (x1 <= -4.5e+150) {
tmp = x1 + ((x2 * -6.0) + t_0);
} else if (x1 <= -1.6e+84) {
tmp = x1 + ((3.0 * ((x1 - ((x1 * (x1 * 3.0)) - (2.0 * x2))) / (-1.0 - (x1 * x1)))) + (x1 + (x1 * (2.0 - (x1 * (6.0 + (((x1 * (4.0 - (x1 * (((3.0 * t_1) + ((x2 * 8.0) + (4.0 * t_1))) - 6.0)))) - (x2 * 8.0)) - (x2 * 6.0))))))));
} else if (x1 <= 16500000000000.0) {
tmp = x1 + (t_0 - (x2 * (6.0 + ((x1 * (12.0 - (x1 * 6.0))) - (8.0 * (x1 * x2))))));
} else {
tmp = x1 + ((3.0 * (x1 * (-1.0 + (x1 * (x1 + 3.0))))) + (x1 - (4.0 * (x1 * (x2 * t_1)))));
}
return tmp;
}
def code(x1, x2): t_0 = x1 * ((x1 * 9.0) - 2.0) t_1 = 3.0 - (2.0 * x2) tmp = 0 if x1 <= -4.5e+150: tmp = x1 + ((x2 * -6.0) + t_0) elif x1 <= -1.6e+84: tmp = x1 + ((3.0 * ((x1 - ((x1 * (x1 * 3.0)) - (2.0 * x2))) / (-1.0 - (x1 * x1)))) + (x1 + (x1 * (2.0 - (x1 * (6.0 + (((x1 * (4.0 - (x1 * (((3.0 * t_1) + ((x2 * 8.0) + (4.0 * t_1))) - 6.0)))) - (x2 * 8.0)) - (x2 * 6.0)))))))) elif x1 <= 16500000000000.0: tmp = x1 + (t_0 - (x2 * (6.0 + ((x1 * (12.0 - (x1 * 6.0))) - (8.0 * (x1 * x2)))))) else: tmp = x1 + ((3.0 * (x1 * (-1.0 + (x1 * (x1 + 3.0))))) + (x1 - (4.0 * (x1 * (x2 * t_1))))) return tmp
function code(x1, x2) t_0 = Float64(x1 * Float64(Float64(x1 * 9.0) - 2.0)) t_1 = Float64(3.0 - Float64(2.0 * x2)) tmp = 0.0 if (x1 <= -4.5e+150) tmp = Float64(x1 + Float64(Float64(x2 * -6.0) + t_0)); elseif (x1 <= -1.6e+84) tmp = Float64(x1 + Float64(Float64(3.0 * Float64(Float64(x1 - Float64(Float64(x1 * Float64(x1 * 3.0)) - Float64(2.0 * x2))) / Float64(-1.0 - Float64(x1 * x1)))) + Float64(x1 + Float64(x1 * Float64(2.0 - Float64(x1 * Float64(6.0 + Float64(Float64(Float64(x1 * Float64(4.0 - Float64(x1 * Float64(Float64(Float64(3.0 * t_1) + Float64(Float64(x2 * 8.0) + Float64(4.0 * t_1))) - 6.0)))) - Float64(x2 * 8.0)) - Float64(x2 * 6.0))))))))); elseif (x1 <= 16500000000000.0) tmp = Float64(x1 + Float64(t_0 - Float64(x2 * Float64(6.0 + Float64(Float64(x1 * Float64(12.0 - Float64(x1 * 6.0))) - Float64(8.0 * Float64(x1 * x2))))))); else tmp = Float64(x1 + Float64(Float64(3.0 * Float64(x1 * Float64(-1.0 + Float64(x1 * Float64(x1 + 3.0))))) + Float64(x1 - Float64(4.0 * Float64(x1 * Float64(x2 * t_1)))))); end return tmp end
function tmp_2 = code(x1, x2) t_0 = x1 * ((x1 * 9.0) - 2.0); t_1 = 3.0 - (2.0 * x2); tmp = 0.0; if (x1 <= -4.5e+150) tmp = x1 + ((x2 * -6.0) + t_0); elseif (x1 <= -1.6e+84) tmp = x1 + ((3.0 * ((x1 - ((x1 * (x1 * 3.0)) - (2.0 * x2))) / (-1.0 - (x1 * x1)))) + (x1 + (x1 * (2.0 - (x1 * (6.0 + (((x1 * (4.0 - (x1 * (((3.0 * t_1) + ((x2 * 8.0) + (4.0 * t_1))) - 6.0)))) - (x2 * 8.0)) - (x2 * 6.0)))))))); elseif (x1 <= 16500000000000.0) tmp = x1 + (t_0 - (x2 * (6.0 + ((x1 * (12.0 - (x1 * 6.0))) - (8.0 * (x1 * x2)))))); else tmp = x1 + ((3.0 * (x1 * (-1.0 + (x1 * (x1 + 3.0))))) + (x1 - (4.0 * (x1 * (x2 * t_1))))); end tmp_2 = tmp; end
code[x1_, x2_] := Block[{t$95$0 = N[(x1 * N[(N[(x1 * 9.0), $MachinePrecision] - 2.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(3.0 - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x1, -4.5e+150], N[(x1 + N[(N[(x2 * -6.0), $MachinePrecision] + t$95$0), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, -1.6e+84], N[(x1 + N[(N[(3.0 * N[(N[(x1 - N[(N[(x1 * N[(x1 * 3.0), $MachinePrecision]), $MachinePrecision] - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(-1.0 - N[(x1 * x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(x1 + N[(x1 * N[(2.0 - N[(x1 * N[(6.0 + N[(N[(N[(x1 * N[(4.0 - N[(x1 * N[(N[(N[(3.0 * t$95$1), $MachinePrecision] + N[(N[(x2 * 8.0), $MachinePrecision] + N[(4.0 * t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(x2 * 8.0), $MachinePrecision]), $MachinePrecision] - N[(x2 * 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 16500000000000.0], N[(x1 + N[(t$95$0 - N[(x2 * N[(6.0 + N[(N[(x1 * N[(12.0 - N[(x1 * 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(8.0 * N[(x1 * x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x1 + N[(N[(3.0 * N[(x1 * N[(-1.0 + N[(x1 * N[(x1 + 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(x1 - N[(4.0 * N[(x1 * N[(x2 * t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x1 \cdot \left(x1 \cdot 9 - 2\right)\\
t_1 := 3 - 2 \cdot x2\\
\mathbf{if}\;x1 \leq -4.5 \cdot 10^{+150}:\\
\;\;\;\;x1 + \left(x2 \cdot -6 + t\_0\right)\\
\mathbf{elif}\;x1 \leq -1.6 \cdot 10^{+84}:\\
\;\;\;\;x1 + \left(3 \cdot \frac{x1 - \left(x1 \cdot \left(x1 \cdot 3\right) - 2 \cdot x2\right)}{-1 - x1 \cdot x1} + \left(x1 + x1 \cdot \left(2 - x1 \cdot \left(6 + \left(\left(x1 \cdot \left(4 - x1 \cdot \left(\left(3 \cdot t\_1 + \left(x2 \cdot 8 + 4 \cdot t\_1\right)\right) - 6\right)\right) - x2 \cdot 8\right) - x2 \cdot 6\right)\right)\right)\right)\right)\\
\mathbf{elif}\;x1 \leq 16500000000000:\\
\;\;\;\;x1 + \left(t\_0 - x2 \cdot \left(6 + \left(x1 \cdot \left(12 - x1 \cdot 6\right) - 8 \cdot \left(x1 \cdot x2\right)\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x1 + \left(3 \cdot \left(x1 \cdot \left(-1 + x1 \cdot \left(x1 + 3\right)\right)\right) + \left(x1 - 4 \cdot \left(x1 \cdot \left(x2 \cdot t\_1\right)\right)\right)\right)\\
\end{array}
\end{array}
if x1 < -4.5e150Initial program 0.0%
Taylor expanded in x1 around 0 0.0%
Taylor expanded in x1 around 0 0.0%
Taylor expanded in x1 around 0 68.6%
Taylor expanded in x2 around 0 97.5%
*-commutative97.5%
Simplified97.5%
if -4.5e150 < x1 < -1.60000000000000005e84Initial program 17.6%
Taylor expanded in x1 around 0 17.6%
+-commutative17.6%
mul-1-neg17.6%
sub-neg17.6%
Simplified17.6%
Taylor expanded in x1 around inf 17.6%
*-commutative17.6%
Simplified17.6%
Taylor expanded in x1 around 0 88.2%
if -1.60000000000000005e84 < x1 < 1.65e13Initial program 98.7%
Taylor expanded in x1 around 0 78.0%
Taylor expanded in x1 around 0 75.9%
Taylor expanded in x1 around 0 77.2%
Taylor expanded in x2 around 0 89.3%
if 1.65e13 < x1 Initial program 54.2%
Taylor expanded in x1 around 0 21.9%
Taylor expanded in x1 around 0 58.6%
Taylor expanded in x2 around 0 73.1%
Final simplification86.9%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (* x1 (- (* x1 9.0) 2.0))))
(if (<= x1 -4.5e+153)
(+ x1 (+ (* x2 -6.0) t_0))
(if (<= x1 -9.6e+67)
(+
x1
(+
(* 3.0 (/ (- x1 (- (* x1 (* x1 3.0)) (* 2.0 x2))) (- -1.0 (* x1 x1))))
(+
x1
(*
x1
(+ 2.0 (* x1 (- (+ (* x1 -4.0) (+ (* x2 6.0) (* x2 8.0))) 6.0)))))))
(if (<= x1 16500000000000.0)
(+
x1
(-
t_0
(* x2 (+ 6.0 (- (* x1 (- 12.0 (* x1 6.0))) (* 8.0 (* x1 x2)))))))
(+
x1
(+
(* 3.0 (* x1 (+ -1.0 (* x1 (+ x1 3.0)))))
(- x1 (* 4.0 (* x1 (* x2 (- 3.0 (* 2.0 x2)))))))))))))
double code(double x1, double x2) {
double t_0 = x1 * ((x1 * 9.0) - 2.0);
double tmp;
if (x1 <= -4.5e+153) {
tmp = x1 + ((x2 * -6.0) + t_0);
} else if (x1 <= -9.6e+67) {
tmp = x1 + ((3.0 * ((x1 - ((x1 * (x1 * 3.0)) - (2.0 * x2))) / (-1.0 - (x1 * x1)))) + (x1 + (x1 * (2.0 + (x1 * (((x1 * -4.0) + ((x2 * 6.0) + (x2 * 8.0))) - 6.0))))));
} else if (x1 <= 16500000000000.0) {
tmp = x1 + (t_0 - (x2 * (6.0 + ((x1 * (12.0 - (x1 * 6.0))) - (8.0 * (x1 * x2))))));
} else {
tmp = x1 + ((3.0 * (x1 * (-1.0 + (x1 * (x1 + 3.0))))) + (x1 - (4.0 * (x1 * (x2 * (3.0 - (2.0 * 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 = x1 * ((x1 * 9.0d0) - 2.0d0)
if (x1 <= (-4.5d+153)) then
tmp = x1 + ((x2 * (-6.0d0)) + t_0)
else if (x1 <= (-9.6d+67)) then
tmp = x1 + ((3.0d0 * ((x1 - ((x1 * (x1 * 3.0d0)) - (2.0d0 * x2))) / ((-1.0d0) - (x1 * x1)))) + (x1 + (x1 * (2.0d0 + (x1 * (((x1 * (-4.0d0)) + ((x2 * 6.0d0) + (x2 * 8.0d0))) - 6.0d0))))))
else if (x1 <= 16500000000000.0d0) then
tmp = x1 + (t_0 - (x2 * (6.0d0 + ((x1 * (12.0d0 - (x1 * 6.0d0))) - (8.0d0 * (x1 * x2))))))
else
tmp = x1 + ((3.0d0 * (x1 * ((-1.0d0) + (x1 * (x1 + 3.0d0))))) + (x1 - (4.0d0 * (x1 * (x2 * (3.0d0 - (2.0d0 * x2)))))))
end if
code = tmp
end function
public static double code(double x1, double x2) {
double t_0 = x1 * ((x1 * 9.0) - 2.0);
double tmp;
if (x1 <= -4.5e+153) {
tmp = x1 + ((x2 * -6.0) + t_0);
} else if (x1 <= -9.6e+67) {
tmp = x1 + ((3.0 * ((x1 - ((x1 * (x1 * 3.0)) - (2.0 * x2))) / (-1.0 - (x1 * x1)))) + (x1 + (x1 * (2.0 + (x1 * (((x1 * -4.0) + ((x2 * 6.0) + (x2 * 8.0))) - 6.0))))));
} else if (x1 <= 16500000000000.0) {
tmp = x1 + (t_0 - (x2 * (6.0 + ((x1 * (12.0 - (x1 * 6.0))) - (8.0 * (x1 * x2))))));
} else {
tmp = x1 + ((3.0 * (x1 * (-1.0 + (x1 * (x1 + 3.0))))) + (x1 - (4.0 * (x1 * (x2 * (3.0 - (2.0 * x2)))))));
}
return tmp;
}
def code(x1, x2): t_0 = x1 * ((x1 * 9.0) - 2.0) tmp = 0 if x1 <= -4.5e+153: tmp = x1 + ((x2 * -6.0) + t_0) elif x1 <= -9.6e+67: tmp = x1 + ((3.0 * ((x1 - ((x1 * (x1 * 3.0)) - (2.0 * x2))) / (-1.0 - (x1 * x1)))) + (x1 + (x1 * (2.0 + (x1 * (((x1 * -4.0) + ((x2 * 6.0) + (x2 * 8.0))) - 6.0)))))) elif x1 <= 16500000000000.0: tmp = x1 + (t_0 - (x2 * (6.0 + ((x1 * (12.0 - (x1 * 6.0))) - (8.0 * (x1 * x2)))))) else: tmp = x1 + ((3.0 * (x1 * (-1.0 + (x1 * (x1 + 3.0))))) + (x1 - (4.0 * (x1 * (x2 * (3.0 - (2.0 * x2))))))) return tmp
function code(x1, x2) t_0 = Float64(x1 * Float64(Float64(x1 * 9.0) - 2.0)) tmp = 0.0 if (x1 <= -4.5e+153) tmp = Float64(x1 + Float64(Float64(x2 * -6.0) + t_0)); elseif (x1 <= -9.6e+67) tmp = Float64(x1 + Float64(Float64(3.0 * Float64(Float64(x1 - Float64(Float64(x1 * Float64(x1 * 3.0)) - Float64(2.0 * x2))) / Float64(-1.0 - Float64(x1 * x1)))) + Float64(x1 + Float64(x1 * Float64(2.0 + Float64(x1 * Float64(Float64(Float64(x1 * -4.0) + Float64(Float64(x2 * 6.0) + Float64(x2 * 8.0))) - 6.0))))))); elseif (x1 <= 16500000000000.0) tmp = Float64(x1 + Float64(t_0 - Float64(x2 * Float64(6.0 + Float64(Float64(x1 * Float64(12.0 - Float64(x1 * 6.0))) - Float64(8.0 * Float64(x1 * x2))))))); else tmp = Float64(x1 + Float64(Float64(3.0 * Float64(x1 * Float64(-1.0 + Float64(x1 * Float64(x1 + 3.0))))) + Float64(x1 - Float64(4.0 * Float64(x1 * Float64(x2 * Float64(3.0 - Float64(2.0 * x2)))))))); end return tmp end
function tmp_2 = code(x1, x2) t_0 = x1 * ((x1 * 9.0) - 2.0); tmp = 0.0; if (x1 <= -4.5e+153) tmp = x1 + ((x2 * -6.0) + t_0); elseif (x1 <= -9.6e+67) tmp = x1 + ((3.0 * ((x1 - ((x1 * (x1 * 3.0)) - (2.0 * x2))) / (-1.0 - (x1 * x1)))) + (x1 + (x1 * (2.0 + (x1 * (((x1 * -4.0) + ((x2 * 6.0) + (x2 * 8.0))) - 6.0)))))); elseif (x1 <= 16500000000000.0) tmp = x1 + (t_0 - (x2 * (6.0 + ((x1 * (12.0 - (x1 * 6.0))) - (8.0 * (x1 * x2)))))); else tmp = x1 + ((3.0 * (x1 * (-1.0 + (x1 * (x1 + 3.0))))) + (x1 - (4.0 * (x1 * (x2 * (3.0 - (2.0 * x2))))))); end tmp_2 = tmp; end
code[x1_, x2_] := Block[{t$95$0 = N[(x1 * N[(N[(x1 * 9.0), $MachinePrecision] - 2.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x1, -4.5e+153], N[(x1 + N[(N[(x2 * -6.0), $MachinePrecision] + t$95$0), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, -9.6e+67], N[(x1 + N[(N[(3.0 * N[(N[(x1 - N[(N[(x1 * N[(x1 * 3.0), $MachinePrecision]), $MachinePrecision] - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(-1.0 - N[(x1 * x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(x1 + N[(x1 * N[(2.0 + N[(x1 * N[(N[(N[(x1 * -4.0), $MachinePrecision] + N[(N[(x2 * 6.0), $MachinePrecision] + N[(x2 * 8.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 16500000000000.0], N[(x1 + N[(t$95$0 - N[(x2 * N[(6.0 + N[(N[(x1 * N[(12.0 - N[(x1 * 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(8.0 * N[(x1 * x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x1 + N[(N[(3.0 * N[(x1 * N[(-1.0 + N[(x1 * N[(x1 + 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(x1 - N[(4.0 * N[(x1 * N[(x2 * N[(3.0 - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x1 \cdot \left(x1 \cdot 9 - 2\right)\\
\mathbf{if}\;x1 \leq -4.5 \cdot 10^{+153}:\\
\;\;\;\;x1 + \left(x2 \cdot -6 + t\_0\right)\\
\mathbf{elif}\;x1 \leq -9.6 \cdot 10^{+67}:\\
\;\;\;\;x1 + \left(3 \cdot \frac{x1 - \left(x1 \cdot \left(x1 \cdot 3\right) - 2 \cdot x2\right)}{-1 - x1 \cdot x1} + \left(x1 + x1 \cdot \left(2 + x1 \cdot \left(\left(x1 \cdot -4 + \left(x2 \cdot 6 + x2 \cdot 8\right)\right) - 6\right)\right)\right)\right)\\
\mathbf{elif}\;x1 \leq 16500000000000:\\
\;\;\;\;x1 + \left(t\_0 - x2 \cdot \left(6 + \left(x1 \cdot \left(12 - x1 \cdot 6\right) - 8 \cdot \left(x1 \cdot x2\right)\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x1 + \left(3 \cdot \left(x1 \cdot \left(-1 + x1 \cdot \left(x1 + 3\right)\right)\right) + \left(x1 - 4 \cdot \left(x1 \cdot \left(x2 \cdot \left(3 - 2 \cdot x2\right)\right)\right)\right)\right)\\
\end{array}
\end{array}
if x1 < -4.5000000000000001e153Initial program 0.0%
Taylor expanded in x1 around 0 0.0%
Taylor expanded in x1 around 0 0.0%
Taylor expanded in x1 around 0 67.6%
Taylor expanded in x2 around 0 100.0%
*-commutative100.0%
Simplified100.0%
if -4.5000000000000001e153 < x1 < -9.60000000000000007e67Initial program 31.7%
Taylor expanded in x1 around 0 27.2%
+-commutative27.2%
mul-1-neg27.2%
sub-neg27.2%
Simplified27.2%
Taylor expanded in x1 around inf 31.7%
*-commutative31.7%
Simplified31.7%
Taylor expanded in x1 around 0 73.7%
if -9.60000000000000007e67 < x1 < 1.65e13Initial program 98.7%
Taylor expanded in x1 around 0 78.7%
Taylor expanded in x1 around 0 76.7%
Taylor expanded in x1 around 0 77.9%
Taylor expanded in x2 around 0 90.4%
if 1.65e13 < x1 Initial program 54.2%
Taylor expanded in x1 around 0 21.9%
Taylor expanded in x1 around 0 58.6%
Taylor expanded in x2 around 0 73.1%
Final simplification86.5%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (* x2 (- 3.0 (* 2.0 x2)))) (t_1 (* x1 (- (* x1 9.0) 2.0))))
(if (<= x1 -2.2e+154)
(+ x1 (+ (* x2 -6.0) t_1))
(if (<= x1 -1.26e+70)
(+
x1
(+
(* x2 -6.0)
(*
x1
(- (- (* x2 (+ (* x1 6.0) (* 9.0 (/ x1 x2)))) (* 4.0 t_0)) 2.0))))
(if (<= x1 16500000000000.0)
(+
x1
(-
t_1
(* x2 (+ 6.0 (- (* x1 (- 12.0 (* x1 6.0))) (* 8.0 (* x1 x2)))))))
(+
x1
(+
(* 3.0 (* x1 (+ -1.0 (* x1 (+ x1 3.0)))))
(- x1 (* 4.0 (* x1 t_0))))))))))
double code(double x1, double x2) {
double t_0 = x2 * (3.0 - (2.0 * x2));
double t_1 = x1 * ((x1 * 9.0) - 2.0);
double tmp;
if (x1 <= -2.2e+154) {
tmp = x1 + ((x2 * -6.0) + t_1);
} else if (x1 <= -1.26e+70) {
tmp = x1 + ((x2 * -6.0) + (x1 * (((x2 * ((x1 * 6.0) + (9.0 * (x1 / x2)))) - (4.0 * t_0)) - 2.0)));
} else if (x1 <= 16500000000000.0) {
tmp = x1 + (t_1 - (x2 * (6.0 + ((x1 * (12.0 - (x1 * 6.0))) - (8.0 * (x1 * x2))))));
} else {
tmp = x1 + ((3.0 * (x1 * (-1.0 + (x1 * (x1 + 3.0))))) + (x1 - (4.0 * (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) :: t_1
real(8) :: tmp
t_0 = x2 * (3.0d0 - (2.0d0 * x2))
t_1 = x1 * ((x1 * 9.0d0) - 2.0d0)
if (x1 <= (-2.2d+154)) then
tmp = x1 + ((x2 * (-6.0d0)) + t_1)
else if (x1 <= (-1.26d+70)) then
tmp = x1 + ((x2 * (-6.0d0)) + (x1 * (((x2 * ((x1 * 6.0d0) + (9.0d0 * (x1 / x2)))) - (4.0d0 * t_0)) - 2.0d0)))
else if (x1 <= 16500000000000.0d0) then
tmp = x1 + (t_1 - (x2 * (6.0d0 + ((x1 * (12.0d0 - (x1 * 6.0d0))) - (8.0d0 * (x1 * x2))))))
else
tmp = x1 + ((3.0d0 * (x1 * ((-1.0d0) + (x1 * (x1 + 3.0d0))))) + (x1 - (4.0d0 * (x1 * t_0))))
end if
code = tmp
end function
public static double code(double x1, double x2) {
double t_0 = x2 * (3.0 - (2.0 * x2));
double t_1 = x1 * ((x1 * 9.0) - 2.0);
double tmp;
if (x1 <= -2.2e+154) {
tmp = x1 + ((x2 * -6.0) + t_1);
} else if (x1 <= -1.26e+70) {
tmp = x1 + ((x2 * -6.0) + (x1 * (((x2 * ((x1 * 6.0) + (9.0 * (x1 / x2)))) - (4.0 * t_0)) - 2.0)));
} else if (x1 <= 16500000000000.0) {
tmp = x1 + (t_1 - (x2 * (6.0 + ((x1 * (12.0 - (x1 * 6.0))) - (8.0 * (x1 * x2))))));
} else {
tmp = x1 + ((3.0 * (x1 * (-1.0 + (x1 * (x1 + 3.0))))) + (x1 - (4.0 * (x1 * t_0))));
}
return tmp;
}
def code(x1, x2): t_0 = x2 * (3.0 - (2.0 * x2)) t_1 = x1 * ((x1 * 9.0) - 2.0) tmp = 0 if x1 <= -2.2e+154: tmp = x1 + ((x2 * -6.0) + t_1) elif x1 <= -1.26e+70: tmp = x1 + ((x2 * -6.0) + (x1 * (((x2 * ((x1 * 6.0) + (9.0 * (x1 / x2)))) - (4.0 * t_0)) - 2.0))) elif x1 <= 16500000000000.0: tmp = x1 + (t_1 - (x2 * (6.0 + ((x1 * (12.0 - (x1 * 6.0))) - (8.0 * (x1 * x2)))))) else: tmp = x1 + ((3.0 * (x1 * (-1.0 + (x1 * (x1 + 3.0))))) + (x1 - (4.0 * (x1 * t_0)))) return tmp
function code(x1, x2) t_0 = Float64(x2 * Float64(3.0 - Float64(2.0 * x2))) t_1 = Float64(x1 * Float64(Float64(x1 * 9.0) - 2.0)) tmp = 0.0 if (x1 <= -2.2e+154) tmp = Float64(x1 + Float64(Float64(x2 * -6.0) + t_1)); elseif (x1 <= -1.26e+70) tmp = Float64(x1 + Float64(Float64(x2 * -6.0) + Float64(x1 * Float64(Float64(Float64(x2 * Float64(Float64(x1 * 6.0) + Float64(9.0 * Float64(x1 / x2)))) - Float64(4.0 * t_0)) - 2.0)))); elseif (x1 <= 16500000000000.0) tmp = Float64(x1 + Float64(t_1 - Float64(x2 * Float64(6.0 + Float64(Float64(x1 * Float64(12.0 - Float64(x1 * 6.0))) - Float64(8.0 * Float64(x1 * x2))))))); else tmp = Float64(x1 + Float64(Float64(3.0 * Float64(x1 * Float64(-1.0 + Float64(x1 * Float64(x1 + 3.0))))) + Float64(x1 - Float64(4.0 * Float64(x1 * t_0))))); end return tmp end
function tmp_2 = code(x1, x2) t_0 = x2 * (3.0 - (2.0 * x2)); t_1 = x1 * ((x1 * 9.0) - 2.0); tmp = 0.0; if (x1 <= -2.2e+154) tmp = x1 + ((x2 * -6.0) + t_1); elseif (x1 <= -1.26e+70) tmp = x1 + ((x2 * -6.0) + (x1 * (((x2 * ((x1 * 6.0) + (9.0 * (x1 / x2)))) - (4.0 * t_0)) - 2.0))); elseif (x1 <= 16500000000000.0) tmp = x1 + (t_1 - (x2 * (6.0 + ((x1 * (12.0 - (x1 * 6.0))) - (8.0 * (x1 * x2)))))); else tmp = x1 + ((3.0 * (x1 * (-1.0 + (x1 * (x1 + 3.0))))) + (x1 - (4.0 * (x1 * t_0)))); end tmp_2 = tmp; end
code[x1_, x2_] := Block[{t$95$0 = N[(x2 * N[(3.0 - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(x1 * N[(N[(x1 * 9.0), $MachinePrecision] - 2.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x1, -2.2e+154], N[(x1 + N[(N[(x2 * -6.0), $MachinePrecision] + t$95$1), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, -1.26e+70], N[(x1 + N[(N[(x2 * -6.0), $MachinePrecision] + N[(x1 * N[(N[(N[(x2 * N[(N[(x1 * 6.0), $MachinePrecision] + N[(9.0 * N[(x1 / x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(4.0 * t$95$0), $MachinePrecision]), $MachinePrecision] - 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 16500000000000.0], N[(x1 + N[(t$95$1 - N[(x2 * N[(6.0 + N[(N[(x1 * N[(12.0 - N[(x1 * 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(8.0 * N[(x1 * x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x1 + N[(N[(3.0 * N[(x1 * N[(-1.0 + N[(x1 * N[(x1 + 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(x1 - N[(4.0 * N[(x1 * t$95$0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x2 \cdot \left(3 - 2 \cdot x2\right)\\
t_1 := x1 \cdot \left(x1 \cdot 9 - 2\right)\\
\mathbf{if}\;x1 \leq -2.2 \cdot 10^{+154}:\\
\;\;\;\;x1 + \left(x2 \cdot -6 + t\_1\right)\\
\mathbf{elif}\;x1 \leq -1.26 \cdot 10^{+70}:\\
\;\;\;\;x1 + \left(x2 \cdot -6 + x1 \cdot \left(\left(x2 \cdot \left(x1 \cdot 6 + 9 \cdot \frac{x1}{x2}\right) - 4 \cdot t\_0\right) - 2\right)\right)\\
\mathbf{elif}\;x1 \leq 16500000000000:\\
\;\;\;\;x1 + \left(t\_1 - x2 \cdot \left(6 + \left(x1 \cdot \left(12 - x1 \cdot 6\right) - 8 \cdot \left(x1 \cdot x2\right)\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x1 + \left(3 \cdot \left(x1 \cdot \left(-1 + x1 \cdot \left(x1 + 3\right)\right)\right) + \left(x1 - 4 \cdot \left(x1 \cdot t\_0\right)\right)\right)\\
\end{array}
\end{array}
if x1 < -2.2000000000000001e154Initial program 0.0%
Taylor expanded in x1 around 0 0.0%
Taylor expanded in x1 around 0 0.0%
Taylor expanded in x1 around 0 66.7%
Taylor expanded in x2 around 0 100.0%
*-commutative100.0%
Simplified100.0%
if -2.2000000000000001e154 < x1 < -1.26000000000000001e70Initial program 30.4%
Taylor expanded in x1 around 0 8.9%
Taylor expanded in x1 around 0 8.7%
Taylor expanded in x1 around 0 21.2%
Taylor expanded in x2 around inf 41.6%
if -1.26000000000000001e70 < x1 < 1.65e13Initial program 98.7%
Taylor expanded in x1 around 0 78.7%
Taylor expanded in x1 around 0 76.7%
Taylor expanded in x1 around 0 77.9%
Taylor expanded in x2 around 0 90.4%
if 1.65e13 < x1 Initial program 54.2%
Taylor expanded in x1 around 0 21.9%
Taylor expanded in x1 around 0 58.6%
Taylor expanded in x2 around 0 73.1%
Final simplification83.5%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0
(+
x1
(- (* x2 -6.0) (* x1 (+ 2.0 (* 4.0 (* x2 (- 3.0 (* 2.0 x2)))))))))
(t_1 (+ x1 (+ (* x2 -6.0) (* x1 (- (* x1 9.0) 2.0))))))
(if (<= x1 -2.5e+84)
t_1
(if (<= x1 -3.8e-157)
t_0
(if (<= x1 2.3e-212)
t_1
(if (<= x1 4.6e+91)
t_0
(+ x1 (+ x1 (* 3.0 (* x1 (+ -1.0 (* x1 (+ x1 3.0)))))))))))))
double code(double x1, double x2) {
double t_0 = x1 + ((x2 * -6.0) - (x1 * (2.0 + (4.0 * (x2 * (3.0 - (2.0 * x2)))))));
double t_1 = x1 + ((x2 * -6.0) + (x1 * ((x1 * 9.0) - 2.0)));
double tmp;
if (x1 <= -2.5e+84) {
tmp = t_1;
} else if (x1 <= -3.8e-157) {
tmp = t_0;
} else if (x1 <= 2.3e-212) {
tmp = t_1;
} else if (x1 <= 4.6e+91) {
tmp = t_0;
} else {
tmp = x1 + (x1 + (3.0 * (x1 * (-1.0 + (x1 * (x1 + 3.0))))));
}
return tmp;
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
real(8) :: t_0
real(8) :: t_1
real(8) :: tmp
t_0 = x1 + ((x2 * (-6.0d0)) - (x1 * (2.0d0 + (4.0d0 * (x2 * (3.0d0 - (2.0d0 * x2)))))))
t_1 = x1 + ((x2 * (-6.0d0)) + (x1 * ((x1 * 9.0d0) - 2.0d0)))
if (x1 <= (-2.5d+84)) then
tmp = t_1
else if (x1 <= (-3.8d-157)) then
tmp = t_0
else if (x1 <= 2.3d-212) then
tmp = t_1
else if (x1 <= 4.6d+91) then
tmp = t_0
else
tmp = x1 + (x1 + (3.0d0 * (x1 * ((-1.0d0) + (x1 * (x1 + 3.0d0))))))
end if
code = tmp
end function
public static double code(double x1, double x2) {
double t_0 = x1 + ((x2 * -6.0) - (x1 * (2.0 + (4.0 * (x2 * (3.0 - (2.0 * x2)))))));
double t_1 = x1 + ((x2 * -6.0) + (x1 * ((x1 * 9.0) - 2.0)));
double tmp;
if (x1 <= -2.5e+84) {
tmp = t_1;
} else if (x1 <= -3.8e-157) {
tmp = t_0;
} else if (x1 <= 2.3e-212) {
tmp = t_1;
} else if (x1 <= 4.6e+91) {
tmp = t_0;
} else {
tmp = x1 + (x1 + (3.0 * (x1 * (-1.0 + (x1 * (x1 + 3.0))))));
}
return tmp;
}
def code(x1, x2): t_0 = x1 + ((x2 * -6.0) - (x1 * (2.0 + (4.0 * (x2 * (3.0 - (2.0 * x2))))))) t_1 = x1 + ((x2 * -6.0) + (x1 * ((x1 * 9.0) - 2.0))) tmp = 0 if x1 <= -2.5e+84: tmp = t_1 elif x1 <= -3.8e-157: tmp = t_0 elif x1 <= 2.3e-212: tmp = t_1 elif x1 <= 4.6e+91: tmp = t_0 else: tmp = x1 + (x1 + (3.0 * (x1 * (-1.0 + (x1 * (x1 + 3.0)))))) return tmp
function code(x1, x2) t_0 = Float64(x1 + Float64(Float64(x2 * -6.0) - Float64(x1 * Float64(2.0 + Float64(4.0 * Float64(x2 * Float64(3.0 - Float64(2.0 * x2)))))))) t_1 = Float64(x1 + Float64(Float64(x2 * -6.0) + Float64(x1 * Float64(Float64(x1 * 9.0) - 2.0)))) tmp = 0.0 if (x1 <= -2.5e+84) tmp = t_1; elseif (x1 <= -3.8e-157) tmp = t_0; elseif (x1 <= 2.3e-212) tmp = t_1; elseif (x1 <= 4.6e+91) tmp = t_0; else tmp = Float64(x1 + Float64(x1 + Float64(3.0 * Float64(x1 * Float64(-1.0 + Float64(x1 * Float64(x1 + 3.0))))))); end return tmp end
function tmp_2 = code(x1, x2) t_0 = x1 + ((x2 * -6.0) - (x1 * (2.0 + (4.0 * (x2 * (3.0 - (2.0 * x2))))))); t_1 = x1 + ((x2 * -6.0) + (x1 * ((x1 * 9.0) - 2.0))); tmp = 0.0; if (x1 <= -2.5e+84) tmp = t_1; elseif (x1 <= -3.8e-157) tmp = t_0; elseif (x1 <= 2.3e-212) tmp = t_1; elseif (x1 <= 4.6e+91) tmp = t_0; else tmp = x1 + (x1 + (3.0 * (x1 * (-1.0 + (x1 * (x1 + 3.0)))))); end tmp_2 = tmp; end
code[x1_, x2_] := Block[{t$95$0 = N[(x1 + N[(N[(x2 * -6.0), $MachinePrecision] - N[(x1 * N[(2.0 + N[(4.0 * N[(x2 * N[(3.0 - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(x1 + N[(N[(x2 * -6.0), $MachinePrecision] + N[(x1 * N[(N[(x1 * 9.0), $MachinePrecision] - 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x1, -2.5e+84], t$95$1, If[LessEqual[x1, -3.8e-157], t$95$0, If[LessEqual[x1, 2.3e-212], t$95$1, If[LessEqual[x1, 4.6e+91], t$95$0, N[(x1 + N[(x1 + N[(3.0 * N[(x1 * N[(-1.0 + N[(x1 * N[(x1 + 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x1 + \left(x2 \cdot -6 - x1 \cdot \left(2 + 4 \cdot \left(x2 \cdot \left(3 - 2 \cdot x2\right)\right)\right)\right)\\
t_1 := x1 + \left(x2 \cdot -6 + x1 \cdot \left(x1 \cdot 9 - 2\right)\right)\\
\mathbf{if}\;x1 \leq -2.5 \cdot 10^{+84}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;x1 \leq -3.8 \cdot 10^{-157}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;x1 \leq 2.3 \cdot 10^{-212}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;x1 \leq 4.6 \cdot 10^{+91}:\\
\;\;\;\;t\_0\\
\mathbf{else}:\\
\;\;\;\;x1 + \left(x1 + 3 \cdot \left(x1 \cdot \left(-1 + x1 \cdot \left(x1 + 3\right)\right)\right)\right)\\
\end{array}
\end{array}
if x1 < -2.5e84 or -3.8000000000000002e-157 < x1 < 2.3000000000000001e-212Initial program 48.3%
Taylor expanded in x1 around 0 34.1%
Taylor expanded in x1 around 0 34.1%
Taylor expanded in x1 around 0 60.2%
Taylor expanded in x2 around 0 78.9%
*-commutative78.9%
Simplified78.9%
if -2.5e84 < x1 < -3.8000000000000002e-157 or 2.3000000000000001e-212 < x1 < 4.59999999999999982e91Initial program 98.4%
Taylor expanded in x1 around 0 73.0%
Taylor expanded in x1 around 0 69.1%
Taylor expanded in x1 around 0 73.2%
if 4.59999999999999982e91 < x1 Initial program 32.4%
Taylor expanded in x1 around 0 14.4%
Taylor expanded in x1 around 0 73.7%
Taylor expanded in x2 around 0 89.9%
Final simplification77.7%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0
(+
x1
(- (* x2 -6.0) (* x1 (+ 2.0 (* 4.0 (* x2 (- 3.0 (* 2.0 x2))))))))))
(if (<= x1 -2.4e+84)
(+ x1 (+ (* x2 -6.0) (* x1 (- (* x1 9.0) 2.0))))
(if (<= x1 -3.8e-157)
t_0
(if (<= x1 1.2e-212)
(-
x1
(+
(* x1 (- 2.0 (* x1 9.0)))
(* x2 (+ 6.0 (* x1 (- 12.0 (* x1 6.0)))))))
(if (<= x1 4.6e+91)
t_0
(+ x1 (+ x1 (* 3.0 (* x1 (+ -1.0 (* x1 (+ x1 3.0)))))))))))))
double code(double x1, double x2) {
double t_0 = x1 + ((x2 * -6.0) - (x1 * (2.0 + (4.0 * (x2 * (3.0 - (2.0 * x2)))))));
double tmp;
if (x1 <= -2.4e+84) {
tmp = x1 + ((x2 * -6.0) + (x1 * ((x1 * 9.0) - 2.0)));
} else if (x1 <= -3.8e-157) {
tmp = t_0;
} else if (x1 <= 1.2e-212) {
tmp = x1 - ((x1 * (2.0 - (x1 * 9.0))) + (x2 * (6.0 + (x1 * (12.0 - (x1 * 6.0))))));
} else if (x1 <= 4.6e+91) {
tmp = t_0;
} else {
tmp = x1 + (x1 + (3.0 * (x1 * (-1.0 + (x1 * (x1 + 3.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 + ((x2 * (-6.0d0)) - (x1 * (2.0d0 + (4.0d0 * (x2 * (3.0d0 - (2.0d0 * x2)))))))
if (x1 <= (-2.4d+84)) then
tmp = x1 + ((x2 * (-6.0d0)) + (x1 * ((x1 * 9.0d0) - 2.0d0)))
else if (x1 <= (-3.8d-157)) then
tmp = t_0
else if (x1 <= 1.2d-212) then
tmp = x1 - ((x1 * (2.0d0 - (x1 * 9.0d0))) + (x2 * (6.0d0 + (x1 * (12.0d0 - (x1 * 6.0d0))))))
else if (x1 <= 4.6d+91) then
tmp = t_0
else
tmp = x1 + (x1 + (3.0d0 * (x1 * ((-1.0d0) + (x1 * (x1 + 3.0d0))))))
end if
code = tmp
end function
public static double code(double x1, double x2) {
double t_0 = x1 + ((x2 * -6.0) - (x1 * (2.0 + (4.0 * (x2 * (3.0 - (2.0 * x2)))))));
double tmp;
if (x1 <= -2.4e+84) {
tmp = x1 + ((x2 * -6.0) + (x1 * ((x1 * 9.0) - 2.0)));
} else if (x1 <= -3.8e-157) {
tmp = t_0;
} else if (x1 <= 1.2e-212) {
tmp = x1 - ((x1 * (2.0 - (x1 * 9.0))) + (x2 * (6.0 + (x1 * (12.0 - (x1 * 6.0))))));
} else if (x1 <= 4.6e+91) {
tmp = t_0;
} else {
tmp = x1 + (x1 + (3.0 * (x1 * (-1.0 + (x1 * (x1 + 3.0))))));
}
return tmp;
}
def code(x1, x2): t_0 = x1 + ((x2 * -6.0) - (x1 * (2.0 + (4.0 * (x2 * (3.0 - (2.0 * x2))))))) tmp = 0 if x1 <= -2.4e+84: tmp = x1 + ((x2 * -6.0) + (x1 * ((x1 * 9.0) - 2.0))) elif x1 <= -3.8e-157: tmp = t_0 elif x1 <= 1.2e-212: tmp = x1 - ((x1 * (2.0 - (x1 * 9.0))) + (x2 * (6.0 + (x1 * (12.0 - (x1 * 6.0)))))) elif x1 <= 4.6e+91: tmp = t_0 else: tmp = x1 + (x1 + (3.0 * (x1 * (-1.0 + (x1 * (x1 + 3.0)))))) return tmp
function code(x1, x2) t_0 = Float64(x1 + Float64(Float64(x2 * -6.0) - Float64(x1 * Float64(2.0 + Float64(4.0 * Float64(x2 * Float64(3.0 - Float64(2.0 * x2)))))))) tmp = 0.0 if (x1 <= -2.4e+84) tmp = Float64(x1 + Float64(Float64(x2 * -6.0) + Float64(x1 * Float64(Float64(x1 * 9.0) - 2.0)))); elseif (x1 <= -3.8e-157) tmp = t_0; elseif (x1 <= 1.2e-212) tmp = Float64(x1 - Float64(Float64(x1 * Float64(2.0 - Float64(x1 * 9.0))) + Float64(x2 * Float64(6.0 + Float64(x1 * Float64(12.0 - Float64(x1 * 6.0))))))); elseif (x1 <= 4.6e+91) tmp = t_0; else tmp = Float64(x1 + Float64(x1 + Float64(3.0 * Float64(x1 * Float64(-1.0 + Float64(x1 * Float64(x1 + 3.0))))))); end return tmp end
function tmp_2 = code(x1, x2) t_0 = x1 + ((x2 * -6.0) - (x1 * (2.0 + (4.0 * (x2 * (3.0 - (2.0 * x2))))))); tmp = 0.0; if (x1 <= -2.4e+84) tmp = x1 + ((x2 * -6.0) + (x1 * ((x1 * 9.0) - 2.0))); elseif (x1 <= -3.8e-157) tmp = t_0; elseif (x1 <= 1.2e-212) tmp = x1 - ((x1 * (2.0 - (x1 * 9.0))) + (x2 * (6.0 + (x1 * (12.0 - (x1 * 6.0)))))); elseif (x1 <= 4.6e+91) tmp = t_0; else tmp = x1 + (x1 + (3.0 * (x1 * (-1.0 + (x1 * (x1 + 3.0)))))); end tmp_2 = tmp; end
code[x1_, x2_] := Block[{t$95$0 = N[(x1 + N[(N[(x2 * -6.0), $MachinePrecision] - N[(x1 * N[(2.0 + N[(4.0 * N[(x2 * N[(3.0 - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x1, -2.4e+84], N[(x1 + N[(N[(x2 * -6.0), $MachinePrecision] + N[(x1 * N[(N[(x1 * 9.0), $MachinePrecision] - 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, -3.8e-157], t$95$0, If[LessEqual[x1, 1.2e-212], N[(x1 - N[(N[(x1 * N[(2.0 - N[(x1 * 9.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(x2 * N[(6.0 + N[(x1 * N[(12.0 - N[(x1 * 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 4.6e+91], t$95$0, N[(x1 + N[(x1 + N[(3.0 * N[(x1 * N[(-1.0 + N[(x1 * N[(x1 + 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x1 + \left(x2 \cdot -6 - x1 \cdot \left(2 + 4 \cdot \left(x2 \cdot \left(3 - 2 \cdot x2\right)\right)\right)\right)\\
\mathbf{if}\;x1 \leq -2.4 \cdot 10^{+84}:\\
\;\;\;\;x1 + \left(x2 \cdot -6 + x1 \cdot \left(x1 \cdot 9 - 2\right)\right)\\
\mathbf{elif}\;x1 \leq -3.8 \cdot 10^{-157}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;x1 \leq 1.2 \cdot 10^{-212}:\\
\;\;\;\;x1 - \left(x1 \cdot \left(2 - x1 \cdot 9\right) + x2 \cdot \left(6 + x1 \cdot \left(12 - x1 \cdot 6\right)\right)\right)\\
\mathbf{elif}\;x1 \leq 4.6 \cdot 10^{+91}:\\
\;\;\;\;t\_0\\
\mathbf{else}:\\
\;\;\;\;x1 + \left(x1 + 3 \cdot \left(x1 \cdot \left(-1 + x1 \cdot \left(x1 + 3\right)\right)\right)\right)\\
\end{array}
\end{array}
if x1 < -2.4e84Initial program 5.8%
Taylor expanded in x1 around 0 0.1%
Taylor expanded in x1 around 0 0.0%
Taylor expanded in x1 around 0 47.7%
Taylor expanded in x2 around 0 67.9%
*-commutative67.9%
Simplified67.9%
if -2.4e84 < x1 < -3.8000000000000002e-157 or 1.19999999999999995e-212 < x1 < 4.59999999999999982e91Initial program 98.4%
Taylor expanded in x1 around 0 73.0%
Taylor expanded in x1 around 0 69.1%
Taylor expanded in x1 around 0 73.2%
if -3.8000000000000002e-157 < x1 < 1.19999999999999995e-212Initial program 99.6%
Taylor expanded in x1 around 0 75.3%
Taylor expanded in x1 around 0 75.3%
Taylor expanded in x1 around 0 75.3%
Taylor expanded in x2 around 0 92.3%
if 4.59999999999999982e91 < x1 Initial program 32.4%
Taylor expanded in x1 around 0 14.4%
Taylor expanded in x1 around 0 73.7%
Taylor expanded in x2 around 0 89.9%
Final simplification77.7%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (* x1 (- (* x1 9.0) 2.0))))
(if (<= x1 -2.2e+154)
(+ x1 (+ (* x2 -6.0) t_0))
(if (<= x1 4.6e+91)
(+
x1
(-
t_0
(* x2 (+ 6.0 (- (* x1 (- 12.0 (* x1 6.0))) (* 8.0 (* x1 x2)))))))
(+ x1 (+ x1 (* 3.0 (* x1 (+ -1.0 (* x1 (+ x1 3.0)))))))))))
double code(double x1, double x2) {
double t_0 = x1 * ((x1 * 9.0) - 2.0);
double tmp;
if (x1 <= -2.2e+154) {
tmp = x1 + ((x2 * -6.0) + t_0);
} else if (x1 <= 4.6e+91) {
tmp = x1 + (t_0 - (x2 * (6.0 + ((x1 * (12.0 - (x1 * 6.0))) - (8.0 * (x1 * x2))))));
} else {
tmp = x1 + (x1 + (3.0 * (x1 * (-1.0 + (x1 * (x1 + 3.0))))));
}
return tmp;
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
real(8) :: t_0
real(8) :: tmp
t_0 = x1 * ((x1 * 9.0d0) - 2.0d0)
if (x1 <= (-2.2d+154)) then
tmp = x1 + ((x2 * (-6.0d0)) + t_0)
else if (x1 <= 4.6d+91) then
tmp = x1 + (t_0 - (x2 * (6.0d0 + ((x1 * (12.0d0 - (x1 * 6.0d0))) - (8.0d0 * (x1 * x2))))))
else
tmp = x1 + (x1 + (3.0d0 * (x1 * ((-1.0d0) + (x1 * (x1 + 3.0d0))))))
end if
code = tmp
end function
public static double code(double x1, double x2) {
double t_0 = x1 * ((x1 * 9.0) - 2.0);
double tmp;
if (x1 <= -2.2e+154) {
tmp = x1 + ((x2 * -6.0) + t_0);
} else if (x1 <= 4.6e+91) {
tmp = x1 + (t_0 - (x2 * (6.0 + ((x1 * (12.0 - (x1 * 6.0))) - (8.0 * (x1 * x2))))));
} else {
tmp = x1 + (x1 + (3.0 * (x1 * (-1.0 + (x1 * (x1 + 3.0))))));
}
return tmp;
}
def code(x1, x2): t_0 = x1 * ((x1 * 9.0) - 2.0) tmp = 0 if x1 <= -2.2e+154: tmp = x1 + ((x2 * -6.0) + t_0) elif x1 <= 4.6e+91: tmp = x1 + (t_0 - (x2 * (6.0 + ((x1 * (12.0 - (x1 * 6.0))) - (8.0 * (x1 * x2)))))) else: tmp = x1 + (x1 + (3.0 * (x1 * (-1.0 + (x1 * (x1 + 3.0)))))) return tmp
function code(x1, x2) t_0 = Float64(x1 * Float64(Float64(x1 * 9.0) - 2.0)) tmp = 0.0 if (x1 <= -2.2e+154) tmp = Float64(x1 + Float64(Float64(x2 * -6.0) + t_0)); elseif (x1 <= 4.6e+91) tmp = Float64(x1 + Float64(t_0 - Float64(x2 * Float64(6.0 + Float64(Float64(x1 * Float64(12.0 - Float64(x1 * 6.0))) - Float64(8.0 * Float64(x1 * x2))))))); else tmp = Float64(x1 + Float64(x1 + Float64(3.0 * Float64(x1 * Float64(-1.0 + Float64(x1 * Float64(x1 + 3.0))))))); end return tmp end
function tmp_2 = code(x1, x2) t_0 = x1 * ((x1 * 9.0) - 2.0); tmp = 0.0; if (x1 <= -2.2e+154) tmp = x1 + ((x2 * -6.0) + t_0); elseif (x1 <= 4.6e+91) tmp = x1 + (t_0 - (x2 * (6.0 + ((x1 * (12.0 - (x1 * 6.0))) - (8.0 * (x1 * x2)))))); else tmp = x1 + (x1 + (3.0 * (x1 * (-1.0 + (x1 * (x1 + 3.0)))))); end tmp_2 = tmp; end
code[x1_, x2_] := Block[{t$95$0 = N[(x1 * N[(N[(x1 * 9.0), $MachinePrecision] - 2.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x1, -2.2e+154], N[(x1 + N[(N[(x2 * -6.0), $MachinePrecision] + t$95$0), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 4.6e+91], N[(x1 + N[(t$95$0 - N[(x2 * N[(6.0 + N[(N[(x1 * N[(12.0 - N[(x1 * 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(8.0 * N[(x1 * x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x1 + N[(x1 + N[(3.0 * N[(x1 * N[(-1.0 + N[(x1 * N[(x1 + 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x1 \cdot \left(x1 \cdot 9 - 2\right)\\
\mathbf{if}\;x1 \leq -2.2 \cdot 10^{+154}:\\
\;\;\;\;x1 + \left(x2 \cdot -6 + t\_0\right)\\
\mathbf{elif}\;x1 \leq 4.6 \cdot 10^{+91}:\\
\;\;\;\;x1 + \left(t\_0 - x2 \cdot \left(6 + \left(x1 \cdot \left(12 - x1 \cdot 6\right) - 8 \cdot \left(x1 \cdot x2\right)\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x1 + \left(x1 + 3 \cdot \left(x1 \cdot \left(-1 + x1 \cdot \left(x1 + 3\right)\right)\right)\right)\\
\end{array}
\end{array}
if x1 < -2.2000000000000001e154Initial program 0.0%
Taylor expanded in x1 around 0 0.0%
Taylor expanded in x1 around 0 0.0%
Taylor expanded in x1 around 0 66.7%
Taylor expanded in x2 around 0 100.0%
*-commutative100.0%
Simplified100.0%
if -2.2000000000000001e154 < x1 < 4.59999999999999982e91Initial program 90.3%
Taylor expanded in x1 around 0 66.1%
Taylor expanded in x1 around 0 63.5%
Taylor expanded in x1 around 0 66.4%
Taylor expanded in x2 around 0 76.6%
if 4.59999999999999982e91 < x1 Initial program 32.4%
Taylor expanded in x1 around 0 14.4%
Taylor expanded in x1 around 0 73.7%
Taylor expanded in x2 around 0 89.9%
Final simplification81.5%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (* x1 (- (* x1 9.0) 2.0))))
(if (<= x1 -2.2e+154)
(+ x1 (+ (* x2 -6.0) t_0))
(if (<= x1 16500000000000.0)
(+
x1
(-
t_0
(* x2 (+ 6.0 (- (* x1 (- 12.0 (* x1 6.0))) (* 8.0 (* x1 x2)))))))
(+
x1
(+
(* 3.0 (* x1 (+ -1.0 (* x1 (+ x1 3.0)))))
(- x1 (* 4.0 (* x1 (* x2 (- 3.0 (* 2.0 x2))))))))))))
double code(double x1, double x2) {
double t_0 = x1 * ((x1 * 9.0) - 2.0);
double tmp;
if (x1 <= -2.2e+154) {
tmp = x1 + ((x2 * -6.0) + t_0);
} else if (x1 <= 16500000000000.0) {
tmp = x1 + (t_0 - (x2 * (6.0 + ((x1 * (12.0 - (x1 * 6.0))) - (8.0 * (x1 * x2))))));
} else {
tmp = x1 + ((3.0 * (x1 * (-1.0 + (x1 * (x1 + 3.0))))) + (x1 - (4.0 * (x1 * (x2 * (3.0 - (2.0 * 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 = x1 * ((x1 * 9.0d0) - 2.0d0)
if (x1 <= (-2.2d+154)) then
tmp = x1 + ((x2 * (-6.0d0)) + t_0)
else if (x1 <= 16500000000000.0d0) then
tmp = x1 + (t_0 - (x2 * (6.0d0 + ((x1 * (12.0d0 - (x1 * 6.0d0))) - (8.0d0 * (x1 * x2))))))
else
tmp = x1 + ((3.0d0 * (x1 * ((-1.0d0) + (x1 * (x1 + 3.0d0))))) + (x1 - (4.0d0 * (x1 * (x2 * (3.0d0 - (2.0d0 * x2)))))))
end if
code = tmp
end function
public static double code(double x1, double x2) {
double t_0 = x1 * ((x1 * 9.0) - 2.0);
double tmp;
if (x1 <= -2.2e+154) {
tmp = x1 + ((x2 * -6.0) + t_0);
} else if (x1 <= 16500000000000.0) {
tmp = x1 + (t_0 - (x2 * (6.0 + ((x1 * (12.0 - (x1 * 6.0))) - (8.0 * (x1 * x2))))));
} else {
tmp = x1 + ((3.0 * (x1 * (-1.0 + (x1 * (x1 + 3.0))))) + (x1 - (4.0 * (x1 * (x2 * (3.0 - (2.0 * x2)))))));
}
return tmp;
}
def code(x1, x2): t_0 = x1 * ((x1 * 9.0) - 2.0) tmp = 0 if x1 <= -2.2e+154: tmp = x1 + ((x2 * -6.0) + t_0) elif x1 <= 16500000000000.0: tmp = x1 + (t_0 - (x2 * (6.0 + ((x1 * (12.0 - (x1 * 6.0))) - (8.0 * (x1 * x2)))))) else: tmp = x1 + ((3.0 * (x1 * (-1.0 + (x1 * (x1 + 3.0))))) + (x1 - (4.0 * (x1 * (x2 * (3.0 - (2.0 * x2))))))) return tmp
function code(x1, x2) t_0 = Float64(x1 * Float64(Float64(x1 * 9.0) - 2.0)) tmp = 0.0 if (x1 <= -2.2e+154) tmp = Float64(x1 + Float64(Float64(x2 * -6.0) + t_0)); elseif (x1 <= 16500000000000.0) tmp = Float64(x1 + Float64(t_0 - Float64(x2 * Float64(6.0 + Float64(Float64(x1 * Float64(12.0 - Float64(x1 * 6.0))) - Float64(8.0 * Float64(x1 * x2))))))); else tmp = Float64(x1 + Float64(Float64(3.0 * Float64(x1 * Float64(-1.0 + Float64(x1 * Float64(x1 + 3.0))))) + Float64(x1 - Float64(4.0 * Float64(x1 * Float64(x2 * Float64(3.0 - Float64(2.0 * x2)))))))); end return tmp end
function tmp_2 = code(x1, x2) t_0 = x1 * ((x1 * 9.0) - 2.0); tmp = 0.0; if (x1 <= -2.2e+154) tmp = x1 + ((x2 * -6.0) + t_0); elseif (x1 <= 16500000000000.0) tmp = x1 + (t_0 - (x2 * (6.0 + ((x1 * (12.0 - (x1 * 6.0))) - (8.0 * (x1 * x2)))))); else tmp = x1 + ((3.0 * (x1 * (-1.0 + (x1 * (x1 + 3.0))))) + (x1 - (4.0 * (x1 * (x2 * (3.0 - (2.0 * x2))))))); end tmp_2 = tmp; end
code[x1_, x2_] := Block[{t$95$0 = N[(x1 * N[(N[(x1 * 9.0), $MachinePrecision] - 2.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x1, -2.2e+154], N[(x1 + N[(N[(x2 * -6.0), $MachinePrecision] + t$95$0), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 16500000000000.0], N[(x1 + N[(t$95$0 - N[(x2 * N[(6.0 + N[(N[(x1 * N[(12.0 - N[(x1 * 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(8.0 * N[(x1 * x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x1 + N[(N[(3.0 * N[(x1 * N[(-1.0 + N[(x1 * N[(x1 + 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(x1 - N[(4.0 * N[(x1 * N[(x2 * N[(3.0 - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x1 \cdot \left(x1 \cdot 9 - 2\right)\\
\mathbf{if}\;x1 \leq -2.2 \cdot 10^{+154}:\\
\;\;\;\;x1 + \left(x2 \cdot -6 + t\_0\right)\\
\mathbf{elif}\;x1 \leq 16500000000000:\\
\;\;\;\;x1 + \left(t\_0 - x2 \cdot \left(6 + \left(x1 \cdot \left(12 - x1 \cdot 6\right) - 8 \cdot \left(x1 \cdot x2\right)\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x1 + \left(3 \cdot \left(x1 \cdot \left(-1 + x1 \cdot \left(x1 + 3\right)\right)\right) + \left(x1 - 4 \cdot \left(x1 \cdot \left(x2 \cdot \left(3 - 2 \cdot x2\right)\right)\right)\right)\right)\\
\end{array}
\end{array}
if x1 < -2.2000000000000001e154Initial program 0.0%
Taylor expanded in x1 around 0 0.0%
Taylor expanded in x1 around 0 0.0%
Taylor expanded in x1 around 0 66.7%
Taylor expanded in x2 around 0 100.0%
*-commutative100.0%
Simplified100.0%
if -2.2000000000000001e154 < x1 < 1.65e13Initial program 89.4%
Taylor expanded in x1 around 0 69.2%
Taylor expanded in x1 around 0 67.4%
Taylor expanded in x1 around 0 70.1%
Taylor expanded in x2 around 0 80.9%
if 1.65e13 < x1 Initial program 54.2%
Taylor expanded in x1 around 0 21.9%
Taylor expanded in x1 around 0 58.6%
Taylor expanded in x2 around 0 73.1%
Final simplification81.7%
(FPCore (x1 x2)
:precision binary64
(if (<= x1 -1.65e+84)
(+ x1 (+ 9.0 (+ x1 (* x1 (* x2 -12.0)))))
(if (or (<= x1 -5.5e-77) (not (<= x1 2.1e-106)))
(* x1 (- 2.0 (* 4.0 (* x2 (- 3.0 (* 2.0 x2))))))
(+ x1 (* x2 -6.0)))))
double code(double x1, double x2) {
double tmp;
if (x1 <= -1.65e+84) {
tmp = x1 + (9.0 + (x1 + (x1 * (x2 * -12.0))));
} else if ((x1 <= -5.5e-77) || !(x1 <= 2.1e-106)) {
tmp = x1 * (2.0 - (4.0 * (x2 * (3.0 - (2.0 * x2)))));
} else {
tmp = x1 + (x2 * -6.0);
}
return tmp;
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
real(8) :: tmp
if (x1 <= (-1.65d+84)) then
tmp = x1 + (9.0d0 + (x1 + (x1 * (x2 * (-12.0d0)))))
else if ((x1 <= (-5.5d-77)) .or. (.not. (x1 <= 2.1d-106))) then
tmp = x1 * (2.0d0 - (4.0d0 * (x2 * (3.0d0 - (2.0d0 * x2)))))
else
tmp = x1 + (x2 * (-6.0d0))
end if
code = tmp
end function
public static double code(double x1, double x2) {
double tmp;
if (x1 <= -1.65e+84) {
tmp = x1 + (9.0 + (x1 + (x1 * (x2 * -12.0))));
} else if ((x1 <= -5.5e-77) || !(x1 <= 2.1e-106)) {
tmp = x1 * (2.0 - (4.0 * (x2 * (3.0 - (2.0 * x2)))));
} else {
tmp = x1 + (x2 * -6.0);
}
return tmp;
}
def code(x1, x2): tmp = 0 if x1 <= -1.65e+84: tmp = x1 + (9.0 + (x1 + (x1 * (x2 * -12.0)))) elif (x1 <= -5.5e-77) or not (x1 <= 2.1e-106): tmp = x1 * (2.0 - (4.0 * (x2 * (3.0 - (2.0 * x2))))) else: tmp = x1 + (x2 * -6.0) return tmp
function code(x1, x2) tmp = 0.0 if (x1 <= -1.65e+84) tmp = Float64(x1 + Float64(9.0 + Float64(x1 + Float64(x1 * Float64(x2 * -12.0))))); elseif ((x1 <= -5.5e-77) || !(x1 <= 2.1e-106)) tmp = Float64(x1 * Float64(2.0 - Float64(4.0 * Float64(x2 * Float64(3.0 - Float64(2.0 * x2)))))); else tmp = Float64(x1 + Float64(x2 * -6.0)); end return tmp end
function tmp_2 = code(x1, x2) tmp = 0.0; if (x1 <= -1.65e+84) tmp = x1 + (9.0 + (x1 + (x1 * (x2 * -12.0)))); elseif ((x1 <= -5.5e-77) || ~((x1 <= 2.1e-106))) tmp = x1 * (2.0 - (4.0 * (x2 * (3.0 - (2.0 * x2))))); else tmp = x1 + (x2 * -6.0); end tmp_2 = tmp; end
code[x1_, x2_] := If[LessEqual[x1, -1.65e+84], N[(x1 + N[(9.0 + N[(x1 + N[(x1 * N[(x2 * -12.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[x1, -5.5e-77], N[Not[LessEqual[x1, 2.1e-106]], $MachinePrecision]], N[(x1 * N[(2.0 - N[(4.0 * N[(x2 * N[(3.0 - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x1 + N[(x2 * -6.0), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x1 \leq -1.65 \cdot 10^{+84}:\\
\;\;\;\;x1 + \left(9 + \left(x1 + x1 \cdot \left(x2 \cdot -12\right)\right)\right)\\
\mathbf{elif}\;x1 \leq -5.5 \cdot 10^{-77} \lor \neg \left(x1 \leq 2.1 \cdot 10^{-106}\right):\\
\;\;\;\;x1 \cdot \left(2 - 4 \cdot \left(x2 \cdot \left(3 - 2 \cdot x2\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x1 + x2 \cdot -6\\
\end{array}
\end{array}
if x1 < -1.65000000000000008e84Initial program 5.8%
Taylor expanded in x1 around 0 0.1%
Taylor expanded in x1 around inf 0.1%
Taylor expanded in x2 around 0 14.2%
associate-*r*14.2%
*-commutative14.2%
associate-*l*14.2%
Simplified14.2%
if -1.65000000000000008e84 < x1 < -5.49999999999999998e-77 or 2.10000000000000003e-106 < x1 Initial program 77.3%
Taylor expanded in x1 around 0 47.8%
Taylor expanded in x1 around inf 49.8%
Taylor expanded in x1 around inf 49.6%
if -5.49999999999999998e-77 < x1 < 2.10000000000000003e-106Initial program 99.5%
Taylor expanded in x1 around 0 83.2%
Taylor expanded in x1 around 0 83.2%
Taylor expanded in x1 around 0 61.9%
*-commutative61.9%
Simplified61.9%
Final simplification46.6%
(FPCore (x1 x2) :precision binary64 (if (or (<= x2 -3.35e+133) (not (<= x2 5.4e+96))) (+ x1 (+ 9.0 (+ x1 (* x2 (+ (* 8.0 (* x1 x2)) (* x1 -12.0)))))) (+ x1 (+ (* x2 -6.0) (* x1 (- (* x1 9.0) 2.0))))))
double code(double x1, double x2) {
double tmp;
if ((x2 <= -3.35e+133) || !(x2 <= 5.4e+96)) {
tmp = x1 + (9.0 + (x1 + (x2 * ((8.0 * (x1 * x2)) + (x1 * -12.0)))));
} else {
tmp = x1 + ((x2 * -6.0) + (x1 * ((x1 * 9.0) - 2.0)));
}
return tmp;
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
real(8) :: tmp
if ((x2 <= (-3.35d+133)) .or. (.not. (x2 <= 5.4d+96))) then
tmp = x1 + (9.0d0 + (x1 + (x2 * ((8.0d0 * (x1 * x2)) + (x1 * (-12.0d0))))))
else
tmp = x1 + ((x2 * (-6.0d0)) + (x1 * ((x1 * 9.0d0) - 2.0d0)))
end if
code = tmp
end function
public static double code(double x1, double x2) {
double tmp;
if ((x2 <= -3.35e+133) || !(x2 <= 5.4e+96)) {
tmp = x1 + (9.0 + (x1 + (x2 * ((8.0 * (x1 * x2)) + (x1 * -12.0)))));
} else {
tmp = x1 + ((x2 * -6.0) + (x1 * ((x1 * 9.0) - 2.0)));
}
return tmp;
}
def code(x1, x2): tmp = 0 if (x2 <= -3.35e+133) or not (x2 <= 5.4e+96): tmp = x1 + (9.0 + (x1 + (x2 * ((8.0 * (x1 * x2)) + (x1 * -12.0))))) else: tmp = x1 + ((x2 * -6.0) + (x1 * ((x1 * 9.0) - 2.0))) return tmp
function code(x1, x2) tmp = 0.0 if ((x2 <= -3.35e+133) || !(x2 <= 5.4e+96)) tmp = Float64(x1 + Float64(9.0 + Float64(x1 + Float64(x2 * Float64(Float64(8.0 * Float64(x1 * x2)) + Float64(x1 * -12.0)))))); else tmp = Float64(x1 + Float64(Float64(x2 * -6.0) + Float64(x1 * Float64(Float64(x1 * 9.0) - 2.0)))); end return tmp end
function tmp_2 = code(x1, x2) tmp = 0.0; if ((x2 <= -3.35e+133) || ~((x2 <= 5.4e+96))) tmp = x1 + (9.0 + (x1 + (x2 * ((8.0 * (x1 * x2)) + (x1 * -12.0))))); else tmp = x1 + ((x2 * -6.0) + (x1 * ((x1 * 9.0) - 2.0))); end tmp_2 = tmp; end
code[x1_, x2_] := If[Or[LessEqual[x2, -3.35e+133], N[Not[LessEqual[x2, 5.4e+96]], $MachinePrecision]], N[(x1 + N[(9.0 + N[(x1 + N[(x2 * N[(N[(8.0 * N[(x1 * x2), $MachinePrecision]), $MachinePrecision] + N[(x1 * -12.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x1 + N[(N[(x2 * -6.0), $MachinePrecision] + N[(x1 * N[(N[(x1 * 9.0), $MachinePrecision] - 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x2 \leq -3.35 \cdot 10^{+133} \lor \neg \left(x2 \leq 5.4 \cdot 10^{+96}\right):\\
\;\;\;\;x1 + \left(9 + \left(x1 + x2 \cdot \left(8 \cdot \left(x1 \cdot x2\right) + x1 \cdot -12\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x1 + \left(x2 \cdot -6 + x1 \cdot \left(x1 \cdot 9 - 2\right)\right)\\
\end{array}
\end{array}
if x2 < -3.35000000000000015e133 or 5.40000000000000044e96 < x2 Initial program 75.7%
Taylor expanded in x1 around 0 52.2%
Taylor expanded in x1 around inf 62.6%
Taylor expanded in x2 around 0 70.2%
if -3.35000000000000015e133 < x2 < 5.40000000000000044e96Initial program 67.5%
Taylor expanded in x1 around 0 49.0%
Taylor expanded in x1 around 0 60.3%
Taylor expanded in x1 around 0 70.0%
Taylor expanded in x2 around 0 71.8%
*-commutative71.8%
Simplified71.8%
Final simplification71.2%
(FPCore (x1 x2) :precision binary64 (if (or (<= x2 -3.35e+133) (not (<= x2 5.4e+96))) (* x1 (- 2.0 (* 4.0 (* x2 (- 3.0 (* 2.0 x2)))))) (+ x1 (+ (* x2 -6.0) (* x1 (- (* x1 9.0) 2.0))))))
double code(double x1, double x2) {
double tmp;
if ((x2 <= -3.35e+133) || !(x2 <= 5.4e+96)) {
tmp = x1 * (2.0 - (4.0 * (x2 * (3.0 - (2.0 * x2)))));
} else {
tmp = x1 + ((x2 * -6.0) + (x1 * ((x1 * 9.0) - 2.0)));
}
return tmp;
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
real(8) :: tmp
if ((x2 <= (-3.35d+133)) .or. (.not. (x2 <= 5.4d+96))) then
tmp = x1 * (2.0d0 - (4.0d0 * (x2 * (3.0d0 - (2.0d0 * x2)))))
else
tmp = x1 + ((x2 * (-6.0d0)) + (x1 * ((x1 * 9.0d0) - 2.0d0)))
end if
code = tmp
end function
public static double code(double x1, double x2) {
double tmp;
if ((x2 <= -3.35e+133) || !(x2 <= 5.4e+96)) {
tmp = x1 * (2.0 - (4.0 * (x2 * (3.0 - (2.0 * x2)))));
} else {
tmp = x1 + ((x2 * -6.0) + (x1 * ((x1 * 9.0) - 2.0)));
}
return tmp;
}
def code(x1, x2): tmp = 0 if (x2 <= -3.35e+133) or not (x2 <= 5.4e+96): tmp = x1 * (2.0 - (4.0 * (x2 * (3.0 - (2.0 * x2))))) else: tmp = x1 + ((x2 * -6.0) + (x1 * ((x1 * 9.0) - 2.0))) return tmp
function code(x1, x2) tmp = 0.0 if ((x2 <= -3.35e+133) || !(x2 <= 5.4e+96)) tmp = Float64(x1 * Float64(2.0 - Float64(4.0 * Float64(x2 * Float64(3.0 - Float64(2.0 * x2)))))); else tmp = Float64(x1 + Float64(Float64(x2 * -6.0) + Float64(x1 * Float64(Float64(x1 * 9.0) - 2.0)))); end return tmp end
function tmp_2 = code(x1, x2) tmp = 0.0; if ((x2 <= -3.35e+133) || ~((x2 <= 5.4e+96))) tmp = x1 * (2.0 - (4.0 * (x2 * (3.0 - (2.0 * x2))))); else tmp = x1 + ((x2 * -6.0) + (x1 * ((x1 * 9.0) - 2.0))); end tmp_2 = tmp; end
code[x1_, x2_] := If[Or[LessEqual[x2, -3.35e+133], N[Not[LessEqual[x2, 5.4e+96]], $MachinePrecision]], N[(x1 * N[(2.0 - N[(4.0 * N[(x2 * N[(3.0 - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x1 + N[(N[(x2 * -6.0), $MachinePrecision] + N[(x1 * N[(N[(x1 * 9.0), $MachinePrecision] - 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x2 \leq -3.35 \cdot 10^{+133} \lor \neg \left(x2 \leq 5.4 \cdot 10^{+96}\right):\\
\;\;\;\;x1 \cdot \left(2 - 4 \cdot \left(x2 \cdot \left(3 - 2 \cdot x2\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x1 + \left(x2 \cdot -6 + x1 \cdot \left(x1 \cdot 9 - 2\right)\right)\\
\end{array}
\end{array}
if x2 < -3.35000000000000015e133 or 5.40000000000000044e96 < x2 Initial program 75.7%
Taylor expanded in x1 around 0 52.2%
Taylor expanded in x1 around inf 62.6%
Taylor expanded in x1 around inf 62.6%
if -3.35000000000000015e133 < x2 < 5.40000000000000044e96Initial program 67.5%
Taylor expanded in x1 around 0 49.0%
Taylor expanded in x1 around 0 60.3%
Taylor expanded in x1 around 0 70.0%
Taylor expanded in x2 around 0 71.8%
*-commutative71.8%
Simplified71.8%
Final simplification68.7%
(FPCore (x1 x2) :precision binary64 (if (or (<= x1 -4.1e-70) (not (<= x1 1.5))) (+ x1 (+ 9.0 (+ x1 (* x1 (* x2 -12.0))))) (+ x1 (* x2 -6.0))))
double code(double x1, double x2) {
double tmp;
if ((x1 <= -4.1e-70) || !(x1 <= 1.5)) {
tmp = x1 + (9.0 + (x1 + (x1 * (x2 * -12.0))));
} else {
tmp = x1 + (x2 * -6.0);
}
return tmp;
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
real(8) :: tmp
if ((x1 <= (-4.1d-70)) .or. (.not. (x1 <= 1.5d0))) then
tmp = x1 + (9.0d0 + (x1 + (x1 * (x2 * (-12.0d0)))))
else
tmp = x1 + (x2 * (-6.0d0))
end if
code = tmp
end function
public static double code(double x1, double x2) {
double tmp;
if ((x1 <= -4.1e-70) || !(x1 <= 1.5)) {
tmp = x1 + (9.0 + (x1 + (x1 * (x2 * -12.0))));
} else {
tmp = x1 + (x2 * -6.0);
}
return tmp;
}
def code(x1, x2): tmp = 0 if (x1 <= -4.1e-70) or not (x1 <= 1.5): tmp = x1 + (9.0 + (x1 + (x1 * (x2 * -12.0)))) else: tmp = x1 + (x2 * -6.0) return tmp
function code(x1, x2) tmp = 0.0 if ((x1 <= -4.1e-70) || !(x1 <= 1.5)) tmp = Float64(x1 + Float64(9.0 + Float64(x1 + Float64(x1 * Float64(x2 * -12.0))))); else tmp = Float64(x1 + Float64(x2 * -6.0)); end return tmp end
function tmp_2 = code(x1, x2) tmp = 0.0; if ((x1 <= -4.1e-70) || ~((x1 <= 1.5))) tmp = x1 + (9.0 + (x1 + (x1 * (x2 * -12.0)))); else tmp = x1 + (x2 * -6.0); end tmp_2 = tmp; end
code[x1_, x2_] := If[Or[LessEqual[x1, -4.1e-70], N[Not[LessEqual[x1, 1.5]], $MachinePrecision]], N[(x1 + N[(9.0 + N[(x1 + N[(x1 * N[(x2 * -12.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x1 + N[(x2 * -6.0), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x1 \leq -4.1 \cdot 10^{-70} \lor \neg \left(x1 \leq 1.5\right):\\
\;\;\;\;x1 + \left(9 + \left(x1 + x1 \cdot \left(x2 \cdot -12\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x1 + x2 \cdot -6\\
\end{array}
\end{array}
if x1 < -4.09999999999999977e-70 or 1.5 < x1 Initial program 48.7%
Taylor expanded in x1 around 0 23.8%
Taylor expanded in x1 around inf 30.6%
Taylor expanded in x2 around 0 14.3%
associate-*r*14.1%
*-commutative14.1%
associate-*l*14.3%
Simplified14.3%
if -4.09999999999999977e-70 < x1 < 1.5Initial program 99.4%
Taylor expanded in x1 around 0 85.6%
Taylor expanded in x1 around 0 85.6%
Taylor expanded in x1 around 0 52.8%
*-commutative52.8%
Simplified52.8%
Final simplification30.7%
(FPCore (x1 x2) :precision binary64 (+ x1 (* x2 -6.0)))
double code(double x1, double x2) {
return x1 + (x2 * -6.0);
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
code = x1 + (x2 * (-6.0d0))
end function
public static double code(double x1, double x2) {
return x1 + (x2 * -6.0);
}
def code(x1, x2): return x1 + (x2 * -6.0)
function code(x1, x2) return Float64(x1 + Float64(x2 * -6.0)) end
function tmp = code(x1, x2) tmp = x1 + (x2 * -6.0); end
code[x1_, x2_] := N[(x1 + N[(x2 * -6.0), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x1 + x2 \cdot -6
\end{array}
Initial program 70.3%
Taylor expanded in x1 around 0 50.1%
Taylor expanded in x1 around 0 56.8%
Taylor expanded in x1 around 0 24.2%
*-commutative24.2%
Simplified24.2%
Final simplification24.2%
(FPCore (x1 x2) :precision binary64 9.0)
double code(double x1, double x2) {
return 9.0;
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
code = 9.0d0
end function
public static double code(double x1, double x2) {
return 9.0;
}
def code(x1, x2): return 9.0
function code(x1, x2) return 9.0 end
function tmp = code(x1, x2) tmp = 9.0; end
code[x1_, x2_] := 9.0
\begin{array}{l}
\\
9
\end{array}
Initial program 70.3%
Taylor expanded in x1 around 0 50.1%
Taylor expanded in x1 around inf 26.6%
Taylor expanded in x1 around 0 3.3%
Final simplification3.3%
herbie shell --seed 2024076
(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))))))