
(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 27 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 3.0)))
(t_1 (- x1 (- t_0 (* 2.0 x2))))
(t_2 (- -1.0 (* x1 x1)))
(t_3 (+ (* x1 x1) 1.0))
(t_4 (+ t_0 (* 2.0 x2)))
(t_5 (/ (- x1 t_4) t_3))
(t_6 (+ 3.0 t_5))
(t_7 (/ (- t_4 x1) t_3))
(t_8 (* t_0 t_7))
(t_9 (* x1 (* x1 x1))))
(if (<=
(+
x1
(+
(+
x1
(+
(+
(*
t_3
(- (* t_6 (* (* x1 2.0) t_5)) (* (* x1 x1) (+ 6.0 (* 4.0 t_5)))))
t_8)
t_9))
(* 3.0 (/ t_1 t_2))))
INFINITY)
(-
x1
(-
(* 3.0 (/ t_1 t_3))
(+
x1
(+
t_9
(-
t_8
(*
t_3
(+
(*
(* x1 x1)
(+
6.0
(* 4.0 (/ (- (+ (* 2.0 x2) (* 3.0 (pow x1 2.0))) x1) t_2))))
(* (* (* x1 2.0) t_7) t_6))))))))
(+ x1 (+ (+ x1 (* 6.0 (pow x1 4.0))) 9.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) + 1.0;
double t_4 = t_0 + (2.0 * x2);
double t_5 = (x1 - t_4) / t_3;
double t_6 = 3.0 + t_5;
double t_7 = (t_4 - x1) / t_3;
double t_8 = t_0 * t_7;
double t_9 = x1 * (x1 * x1);
double tmp;
if ((x1 + ((x1 + (((t_3 * ((t_6 * ((x1 * 2.0) * t_5)) - ((x1 * x1) * (6.0 + (4.0 * t_5))))) + t_8) + t_9)) + (3.0 * (t_1 / t_2)))) <= ((double) INFINITY)) {
tmp = x1 - ((3.0 * (t_1 / t_3)) - (x1 + (t_9 + (t_8 - (t_3 * (((x1 * x1) * (6.0 + (4.0 * ((((2.0 * x2) + (3.0 * pow(x1, 2.0))) - x1) / t_2)))) + (((x1 * 2.0) * t_7) * t_6)))))));
} else {
tmp = x1 + ((x1 + (6.0 * pow(x1, 4.0))) + 9.0);
}
return tmp;
}
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) + 1.0;
double t_4 = t_0 + (2.0 * x2);
double t_5 = (x1 - t_4) / t_3;
double t_6 = 3.0 + t_5;
double t_7 = (t_4 - x1) / t_3;
double t_8 = t_0 * t_7;
double t_9 = x1 * (x1 * x1);
double tmp;
if ((x1 + ((x1 + (((t_3 * ((t_6 * ((x1 * 2.0) * t_5)) - ((x1 * x1) * (6.0 + (4.0 * t_5))))) + t_8) + t_9)) + (3.0 * (t_1 / t_2)))) <= Double.POSITIVE_INFINITY) {
tmp = x1 - ((3.0 * (t_1 / t_3)) - (x1 + (t_9 + (t_8 - (t_3 * (((x1 * x1) * (6.0 + (4.0 * ((((2.0 * x2) + (3.0 * Math.pow(x1, 2.0))) - x1) / t_2)))) + (((x1 * 2.0) * t_7) * t_6)))))));
} else {
tmp = x1 + ((x1 + (6.0 * Math.pow(x1, 4.0))) + 9.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) + 1.0 t_4 = t_0 + (2.0 * x2) t_5 = (x1 - t_4) / t_3 t_6 = 3.0 + t_5 t_7 = (t_4 - x1) / t_3 t_8 = t_0 * t_7 t_9 = x1 * (x1 * x1) tmp = 0 if (x1 + ((x1 + (((t_3 * ((t_6 * ((x1 * 2.0) * t_5)) - ((x1 * x1) * (6.0 + (4.0 * t_5))))) + t_8) + t_9)) + (3.0 * (t_1 / t_2)))) <= math.inf: tmp = x1 - ((3.0 * (t_1 / t_3)) - (x1 + (t_9 + (t_8 - (t_3 * (((x1 * x1) * (6.0 + (4.0 * ((((2.0 * x2) + (3.0 * math.pow(x1, 2.0))) - x1) / t_2)))) + (((x1 * 2.0) * t_7) * t_6))))))) else: tmp = x1 + ((x1 + (6.0 * math.pow(x1, 4.0))) + 9.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(Float64(x1 * x1) + 1.0) t_4 = Float64(t_0 + Float64(2.0 * x2)) t_5 = Float64(Float64(x1 - t_4) / t_3) t_6 = Float64(3.0 + t_5) t_7 = Float64(Float64(t_4 - x1) / t_3) t_8 = Float64(t_0 * t_7) t_9 = Float64(x1 * Float64(x1 * x1)) tmp = 0.0 if (Float64(x1 + Float64(Float64(x1 + Float64(Float64(Float64(t_3 * Float64(Float64(t_6 * Float64(Float64(x1 * 2.0) * t_5)) - Float64(Float64(x1 * x1) * Float64(6.0 + Float64(4.0 * t_5))))) + t_8) + t_9)) + Float64(3.0 * Float64(t_1 / t_2)))) <= Inf) tmp = Float64(x1 - Float64(Float64(3.0 * Float64(t_1 / t_3)) - Float64(x1 + Float64(t_9 + Float64(t_8 - Float64(t_3 * Float64(Float64(Float64(x1 * x1) * Float64(6.0 + Float64(4.0 * Float64(Float64(Float64(Float64(2.0 * x2) + Float64(3.0 * (x1 ^ 2.0))) - x1) / t_2)))) + Float64(Float64(Float64(x1 * 2.0) * t_7) * t_6)))))))); else tmp = Float64(x1 + Float64(Float64(x1 + Float64(6.0 * (x1 ^ 4.0))) + 9.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) + 1.0; t_4 = t_0 + (2.0 * x2); t_5 = (x1 - t_4) / t_3; t_6 = 3.0 + t_5; t_7 = (t_4 - x1) / t_3; t_8 = t_0 * t_7; t_9 = x1 * (x1 * x1); tmp = 0.0; if ((x1 + ((x1 + (((t_3 * ((t_6 * ((x1 * 2.0) * t_5)) - ((x1 * x1) * (6.0 + (4.0 * t_5))))) + t_8) + t_9)) + (3.0 * (t_1 / t_2)))) <= Inf) tmp = x1 - ((3.0 * (t_1 / t_3)) - (x1 + (t_9 + (t_8 - (t_3 * (((x1 * x1) * (6.0 + (4.0 * ((((2.0 * x2) + (3.0 * (x1 ^ 2.0))) - x1) / t_2)))) + (((x1 * 2.0) * t_7) * t_6))))))); else tmp = x1 + ((x1 + (6.0 * (x1 ^ 4.0))) + 9.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[(N[(x1 * x1), $MachinePrecision] + 1.0), $MachinePrecision]}, Block[{t$95$4 = N[(t$95$0 + N[(2.0 * x2), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$5 = N[(N[(x1 - t$95$4), $MachinePrecision] / t$95$3), $MachinePrecision]}, Block[{t$95$6 = N[(3.0 + t$95$5), $MachinePrecision]}, Block[{t$95$7 = N[(N[(t$95$4 - x1), $MachinePrecision] / t$95$3), $MachinePrecision]}, Block[{t$95$8 = N[(t$95$0 * t$95$7), $MachinePrecision]}, Block[{t$95$9 = N[(x1 * N[(x1 * x1), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(x1 + N[(N[(x1 + N[(N[(N[(t$95$3 * N[(N[(t$95$6 * N[(N[(x1 * 2.0), $MachinePrecision] * t$95$5), $MachinePrecision]), $MachinePrecision] - N[(N[(x1 * x1), $MachinePrecision] * N[(6.0 + N[(4.0 * t$95$5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + t$95$8), $MachinePrecision] + t$95$9), $MachinePrecision]), $MachinePrecision] + N[(3.0 * N[(t$95$1 / t$95$2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], Infinity], N[(x1 - N[(N[(3.0 * N[(t$95$1 / t$95$3), $MachinePrecision]), $MachinePrecision] - N[(x1 + N[(t$95$9 + N[(t$95$8 - N[(t$95$3 * N[(N[(N[(x1 * x1), $MachinePrecision] * N[(6.0 + N[(4.0 * N[(N[(N[(N[(2.0 * x2), $MachinePrecision] + N[(3.0 * N[Power[x1, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(N[(x1 * 2.0), $MachinePrecision] * t$95$7), $MachinePrecision] * t$95$6), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x1 + N[(N[(x1 + N[(6.0 * N[Power[x1, 4.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + 9.0), $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 \cdot x1 + 1\\
t_4 := t\_0 + 2 \cdot x2\\
t_5 := \frac{x1 - t\_4}{t\_3}\\
t_6 := 3 + t\_5\\
t_7 := \frac{t\_4 - x1}{t\_3}\\
t_8 := t\_0 \cdot t\_7\\
t_9 := x1 \cdot \left(x1 \cdot x1\right)\\
\mathbf{if}\;x1 + \left(\left(x1 + \left(\left(t\_3 \cdot \left(t\_6 \cdot \left(\left(x1 \cdot 2\right) \cdot t\_5\right) - \left(x1 \cdot x1\right) \cdot \left(6 + 4 \cdot t\_5\right)\right) + t\_8\right) + t\_9\right)\right) + 3 \cdot \frac{t\_1}{t\_2}\right) \leq \infty:\\
\;\;\;\;x1 - \left(3 \cdot \frac{t\_1}{t\_3} - \left(x1 + \left(t\_9 + \left(t\_8 - t\_3 \cdot \left(\left(x1 \cdot x1\right) \cdot \left(6 + 4 \cdot \frac{\left(2 \cdot x2 + 3 \cdot {x1}^{2}\right) - x1}{t\_2}\right) + \left(\left(x1 \cdot 2\right) \cdot t\_7\right) \cdot t\_6\right)\right)\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x1 + \left(\left(x1 + 6 \cdot {x1}^{4}\right) + 9\right)\\
\end{array}
\end{array}
if (+.f64 x1 (+.f64 (+.f64 (+.f64 (+.f64 (*.f64 (+.f64 (*.f64 (*.f64 (*.f64 #s(literal 2 binary64) x1) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64)))) (-.f64 (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))) #s(literal 3 binary64))) (*.f64 (*.f64 x1 x1) (-.f64 (*.f64 #s(literal 4 binary64) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64)))) #s(literal 6 binary64)))) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))) (*.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))))) (*.f64 (*.f64 x1 x1) x1)) x1) (*.f64 #s(literal 3 binary64) (/.f64 (-.f64 (-.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64)))))) < +inf.0Initial program 99.3%
Taylor expanded in x1 around 0 99.3%
if +inf.0 < (+.f64 x1 (+.f64 (+.f64 (+.f64 (+.f64 (*.f64 (+.f64 (*.f64 (*.f64 (*.f64 #s(literal 2 binary64) x1) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64)))) (-.f64 (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))) #s(literal 3 binary64))) (*.f64 (*.f64 x1 x1) (-.f64 (*.f64 #s(literal 4 binary64) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64)))) #s(literal 6 binary64)))) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))) (*.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))))) (*.f64 (*.f64 x1 x1) x1)) x1) (*.f64 #s(literal 3 binary64) (/.f64 (-.f64 (-.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64)))))) Initial program 0.0%
Taylor expanded in x1 around -inf 6.8%
Taylor expanded in x1 around inf 6.8%
Taylor expanded in x1 around inf 100.0%
Final simplification99.5%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (* x1 (* x1 3.0)))
(t_1 (+ t_0 (* 2.0 x2)))
(t_2 (+ (* x1 x1) 1.0))
(t_3 (/ (- x1 t_1) t_2))
(t_4
(+
x1
(+
(+
(*
t_2
(-
(* (+ 3.0 t_3) (* (* x1 2.0) t_3))
(* (* x1 x1) (+ 6.0 (* 4.0 t_3)))))
(* t_0 (/ (- t_1 x1) t_2)))
(* x1 (* x1 x1))))))
(if (<=
(+ x1 (+ t_4 (* 3.0 (/ (- x1 (- t_0 (* 2.0 x2))) (- -1.0 (* x1 x1))))))
INFINITY)
(+ x1 (+ t_4 (* 3.0 (/ (- (* x1 (+ (* x1 3.0) -1.0)) (* 2.0 x2)) t_2))))
(+ x1 (+ (+ x1 (* 6.0 (pow x1 4.0))) 9.0)))))
double code(double x1, double x2) {
double t_0 = x1 * (x1 * 3.0);
double t_1 = t_0 + (2.0 * x2);
double t_2 = (x1 * x1) + 1.0;
double t_3 = (x1 - t_1) / t_2;
double t_4 = x1 + (((t_2 * (((3.0 + t_3) * ((x1 * 2.0) * t_3)) - ((x1 * x1) * (6.0 + (4.0 * t_3))))) + (t_0 * ((t_1 - x1) / t_2))) + (x1 * (x1 * x1)));
double tmp;
if ((x1 + (t_4 + (3.0 * ((x1 - (t_0 - (2.0 * x2))) / (-1.0 - (x1 * x1)))))) <= ((double) INFINITY)) {
tmp = x1 + (t_4 + (3.0 * (((x1 * ((x1 * 3.0) + -1.0)) - (2.0 * x2)) / t_2)));
} else {
tmp = x1 + ((x1 + (6.0 * pow(x1, 4.0))) + 9.0);
}
return tmp;
}
public static double code(double x1, double x2) {
double t_0 = x1 * (x1 * 3.0);
double t_1 = t_0 + (2.0 * x2);
double t_2 = (x1 * x1) + 1.0;
double t_3 = (x1 - t_1) / t_2;
double t_4 = x1 + (((t_2 * (((3.0 + t_3) * ((x1 * 2.0) * t_3)) - ((x1 * x1) * (6.0 + (4.0 * t_3))))) + (t_0 * ((t_1 - x1) / t_2))) + (x1 * (x1 * x1)));
double tmp;
if ((x1 + (t_4 + (3.0 * ((x1 - (t_0 - (2.0 * x2))) / (-1.0 - (x1 * x1)))))) <= Double.POSITIVE_INFINITY) {
tmp = x1 + (t_4 + (3.0 * (((x1 * ((x1 * 3.0) + -1.0)) - (2.0 * x2)) / t_2)));
} else {
tmp = x1 + ((x1 + (6.0 * Math.pow(x1, 4.0))) + 9.0);
}
return tmp;
}
def code(x1, x2): t_0 = x1 * (x1 * 3.0) t_1 = t_0 + (2.0 * x2) t_2 = (x1 * x1) + 1.0 t_3 = (x1 - t_1) / t_2 t_4 = x1 + (((t_2 * (((3.0 + t_3) * ((x1 * 2.0) * t_3)) - ((x1 * x1) * (6.0 + (4.0 * t_3))))) + (t_0 * ((t_1 - x1) / t_2))) + (x1 * (x1 * x1))) tmp = 0 if (x1 + (t_4 + (3.0 * ((x1 - (t_0 - (2.0 * x2))) / (-1.0 - (x1 * x1)))))) <= math.inf: tmp = x1 + (t_4 + (3.0 * (((x1 * ((x1 * 3.0) + -1.0)) - (2.0 * x2)) / t_2))) else: tmp = x1 + ((x1 + (6.0 * math.pow(x1, 4.0))) + 9.0) return tmp
function code(x1, x2) t_0 = Float64(x1 * Float64(x1 * 3.0)) t_1 = Float64(t_0 + Float64(2.0 * x2)) t_2 = Float64(Float64(x1 * x1) + 1.0) t_3 = Float64(Float64(x1 - t_1) / t_2) t_4 = Float64(x1 + Float64(Float64(Float64(t_2 * Float64(Float64(Float64(3.0 + t_3) * Float64(Float64(x1 * 2.0) * t_3)) - Float64(Float64(x1 * x1) * Float64(6.0 + Float64(4.0 * t_3))))) + Float64(t_0 * Float64(Float64(t_1 - x1) / t_2))) + Float64(x1 * Float64(x1 * x1)))) tmp = 0.0 if (Float64(x1 + Float64(t_4 + Float64(3.0 * Float64(Float64(x1 - Float64(t_0 - Float64(2.0 * x2))) / Float64(-1.0 - Float64(x1 * x1)))))) <= Inf) tmp = Float64(x1 + Float64(t_4 + Float64(3.0 * Float64(Float64(Float64(x1 * Float64(Float64(x1 * 3.0) + -1.0)) - Float64(2.0 * x2)) / t_2)))); else tmp = Float64(x1 + Float64(Float64(x1 + Float64(6.0 * (x1 ^ 4.0))) + 9.0)); end return tmp end
function tmp_2 = code(x1, x2) t_0 = x1 * (x1 * 3.0); t_1 = t_0 + (2.0 * x2); t_2 = (x1 * x1) + 1.0; t_3 = (x1 - t_1) / t_2; t_4 = x1 + (((t_2 * (((3.0 + t_3) * ((x1 * 2.0) * t_3)) - ((x1 * x1) * (6.0 + (4.0 * t_3))))) + (t_0 * ((t_1 - x1) / t_2))) + (x1 * (x1 * x1))); tmp = 0.0; if ((x1 + (t_4 + (3.0 * ((x1 - (t_0 - (2.0 * x2))) / (-1.0 - (x1 * x1)))))) <= Inf) tmp = x1 + (t_4 + (3.0 * (((x1 * ((x1 * 3.0) + -1.0)) - (2.0 * x2)) / t_2))); else tmp = x1 + ((x1 + (6.0 * (x1 ^ 4.0))) + 9.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[(t$95$0 + N[(2.0 * x2), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(x1 * x1), $MachinePrecision] + 1.0), $MachinePrecision]}, Block[{t$95$3 = N[(N[(x1 - t$95$1), $MachinePrecision] / t$95$2), $MachinePrecision]}, Block[{t$95$4 = N[(x1 + N[(N[(N[(t$95$2 * N[(N[(N[(3.0 + t$95$3), $MachinePrecision] * N[(N[(x1 * 2.0), $MachinePrecision] * t$95$3), $MachinePrecision]), $MachinePrecision] - N[(N[(x1 * x1), $MachinePrecision] * N[(6.0 + N[(4.0 * t$95$3), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(t$95$0 * N[(N[(t$95$1 - x1), $MachinePrecision] / t$95$2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(x1 * N[(x1 * x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(x1 + N[(t$95$4 + N[(3.0 * N[(N[(x1 - N[(t$95$0 - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(-1.0 - N[(x1 * x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], Infinity], N[(x1 + N[(t$95$4 + N[(3.0 * N[(N[(N[(x1 * N[(N[(x1 * 3.0), $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision] - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] / t$95$2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x1 + N[(N[(x1 + N[(6.0 * N[Power[x1, 4.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + 9.0), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x1 \cdot \left(x1 \cdot 3\right)\\
t_1 := t\_0 + 2 \cdot x2\\
t_2 := x1 \cdot x1 + 1\\
t_3 := \frac{x1 - t\_1}{t\_2}\\
t_4 := x1 + \left(\left(t\_2 \cdot \left(\left(3 + t\_3\right) \cdot \left(\left(x1 \cdot 2\right) \cdot t\_3\right) - \left(x1 \cdot x1\right) \cdot \left(6 + 4 \cdot t\_3\right)\right) + t\_0 \cdot \frac{t\_1 - x1}{t\_2}\right) + x1 \cdot \left(x1 \cdot x1\right)\right)\\
\mathbf{if}\;x1 + \left(t\_4 + 3 \cdot \frac{x1 - \left(t\_0 - 2 \cdot x2\right)}{-1 - x1 \cdot x1}\right) \leq \infty:\\
\;\;\;\;x1 + \left(t\_4 + 3 \cdot \frac{x1 \cdot \left(x1 \cdot 3 + -1\right) - 2 \cdot x2}{t\_2}\right)\\
\mathbf{else}:\\
\;\;\;\;x1 + \left(\left(x1 + 6 \cdot {x1}^{4}\right) + 9\right)\\
\end{array}
\end{array}
if (+.f64 x1 (+.f64 (+.f64 (+.f64 (+.f64 (*.f64 (+.f64 (*.f64 (*.f64 (*.f64 #s(literal 2 binary64) x1) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64)))) (-.f64 (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))) #s(literal 3 binary64))) (*.f64 (*.f64 x1 x1) (-.f64 (*.f64 #s(literal 4 binary64) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64)))) #s(literal 6 binary64)))) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))) (*.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))))) (*.f64 (*.f64 x1 x1) x1)) x1) (*.f64 #s(literal 3 binary64) (/.f64 (-.f64 (-.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64)))))) < +inf.0Initial program 99.3%
expm1-log1p-u83.0%
expm1-undefine83.1%
*-commutative83.1%
Applied egg-rr83.1%
Taylor expanded in x1 around 0 99.3%
if +inf.0 < (+.f64 x1 (+.f64 (+.f64 (+.f64 (+.f64 (*.f64 (+.f64 (*.f64 (*.f64 (*.f64 #s(literal 2 binary64) x1) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64)))) (-.f64 (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))) #s(literal 3 binary64))) (*.f64 (*.f64 x1 x1) (-.f64 (*.f64 #s(literal 4 binary64) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64)))) #s(literal 6 binary64)))) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))) (*.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))))) (*.f64 (*.f64 x1 x1) x1)) x1) (*.f64 #s(literal 3 binary64) (/.f64 (-.f64 (-.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64)))))) Initial program 0.0%
Taylor expanded in x1 around -inf 6.8%
Taylor expanded in x1 around inf 6.8%
Taylor expanded in x1 around inf 100.0%
Final simplification99.5%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (+ (* x1 x1) 1.0))
(t_1 (+ x1 (+ (+ x1 (* 6.0 (pow x1 4.0))) 9.0)))
(t_2 (* x1 (* x1 3.0)))
(t_3 (+ t_2 (* 2.0 x2)))
(t_4 (/ (- t_3 x1) t_0))
(t_5 (/ (- x1 t_3) t_0))
(t_6 (* x1 (* x1 x1)))
(t_7 (+ 3.0 t_5)))
(if (<= x1 -7.1e+106)
t_1
(if (<= x1 -0.0085)
(+
x1
(+
9.0
(+
x1
(-
t_6
(-
(* t_2 t_5)
(*
(- -1.0 (* x1 x1))
(+
(*
(* x1 x1)
(-
6.0
(* 4.0 (+ 3.0 (/ (+ -1.0 (/ (- (* 2.0 x2) 3.0) x1)) x1)))))
(* (* (* x1 2.0) t_4) t_7))))))))
(if (<= x1 0.0155)
(+
x1
(+
(* 3.0 (- (* x2 -2.0) (* x1 (- (* x1 (- (* x2 -2.0) 3.0)) -1.0))))
(+ x1 (* x2 (+ (* x1 -12.0) (* 8.0 (* x1 x2)))))))
(if (<= x1 1.2e+75)
(+
x1
(+
(+
x1
(+
(+
(*
t_0
(-
(* t_7 (* (* x1 2.0) t_5))
(* (* x1 x1) (+ 6.0 (* 4.0 t_5)))))
(* t_2 t_4))
t_6))
(* 3.0 (+ 3.0 (/ -1.0 x1)))))
t_1))))))
double code(double x1, double x2) {
double t_0 = (x1 * x1) + 1.0;
double t_1 = x1 + ((x1 + (6.0 * pow(x1, 4.0))) + 9.0);
double t_2 = x1 * (x1 * 3.0);
double t_3 = t_2 + (2.0 * x2);
double t_4 = (t_3 - x1) / t_0;
double t_5 = (x1 - t_3) / t_0;
double t_6 = x1 * (x1 * x1);
double t_7 = 3.0 + t_5;
double tmp;
if (x1 <= -7.1e+106) {
tmp = t_1;
} else if (x1 <= -0.0085) {
tmp = x1 + (9.0 + (x1 + (t_6 - ((t_2 * t_5) - ((-1.0 - (x1 * x1)) * (((x1 * x1) * (6.0 - (4.0 * (3.0 + ((-1.0 + (((2.0 * x2) - 3.0) / x1)) / x1))))) + (((x1 * 2.0) * t_4) * t_7)))))));
} else if (x1 <= 0.0155) {
tmp = x1 + ((3.0 * ((x2 * -2.0) - (x1 * ((x1 * ((x2 * -2.0) - 3.0)) - -1.0)))) + (x1 + (x2 * ((x1 * -12.0) + (8.0 * (x1 * x2))))));
} else if (x1 <= 1.2e+75) {
tmp = x1 + ((x1 + (((t_0 * ((t_7 * ((x1 * 2.0) * t_5)) - ((x1 * x1) * (6.0 + (4.0 * t_5))))) + (t_2 * t_4)) + t_6)) + (3.0 * (3.0 + (-1.0 / x1))));
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
real(8) :: t_0
real(8) :: t_1
real(8) :: t_2
real(8) :: t_3
real(8) :: t_4
real(8) :: t_5
real(8) :: t_6
real(8) :: t_7
real(8) :: tmp
t_0 = (x1 * x1) + 1.0d0
t_1 = x1 + ((x1 + (6.0d0 * (x1 ** 4.0d0))) + 9.0d0)
t_2 = x1 * (x1 * 3.0d0)
t_3 = t_2 + (2.0d0 * x2)
t_4 = (t_3 - x1) / t_0
t_5 = (x1 - t_3) / t_0
t_6 = x1 * (x1 * x1)
t_7 = 3.0d0 + t_5
if (x1 <= (-7.1d+106)) then
tmp = t_1
else if (x1 <= (-0.0085d0)) then
tmp = x1 + (9.0d0 + (x1 + (t_6 - ((t_2 * t_5) - (((-1.0d0) - (x1 * x1)) * (((x1 * x1) * (6.0d0 - (4.0d0 * (3.0d0 + (((-1.0d0) + (((2.0d0 * x2) - 3.0d0) / x1)) / x1))))) + (((x1 * 2.0d0) * t_4) * t_7)))))))
else if (x1 <= 0.0155d0) then
tmp = x1 + ((3.0d0 * ((x2 * (-2.0d0)) - (x1 * ((x1 * ((x2 * (-2.0d0)) - 3.0d0)) - (-1.0d0))))) + (x1 + (x2 * ((x1 * (-12.0d0)) + (8.0d0 * (x1 * x2))))))
else if (x1 <= 1.2d+75) then
tmp = x1 + ((x1 + (((t_0 * ((t_7 * ((x1 * 2.0d0) * t_5)) - ((x1 * x1) * (6.0d0 + (4.0d0 * t_5))))) + (t_2 * t_4)) + t_6)) + (3.0d0 * (3.0d0 + ((-1.0d0) / x1))))
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x1, double x2) {
double t_0 = (x1 * x1) + 1.0;
double t_1 = x1 + ((x1 + (6.0 * Math.pow(x1, 4.0))) + 9.0);
double t_2 = x1 * (x1 * 3.0);
double t_3 = t_2 + (2.0 * x2);
double t_4 = (t_3 - x1) / t_0;
double t_5 = (x1 - t_3) / t_0;
double t_6 = x1 * (x1 * x1);
double t_7 = 3.0 + t_5;
double tmp;
if (x1 <= -7.1e+106) {
tmp = t_1;
} else if (x1 <= -0.0085) {
tmp = x1 + (9.0 + (x1 + (t_6 - ((t_2 * t_5) - ((-1.0 - (x1 * x1)) * (((x1 * x1) * (6.0 - (4.0 * (3.0 + ((-1.0 + (((2.0 * x2) - 3.0) / x1)) / x1))))) + (((x1 * 2.0) * t_4) * t_7)))))));
} else if (x1 <= 0.0155) {
tmp = x1 + ((3.0 * ((x2 * -2.0) - (x1 * ((x1 * ((x2 * -2.0) - 3.0)) - -1.0)))) + (x1 + (x2 * ((x1 * -12.0) + (8.0 * (x1 * x2))))));
} else if (x1 <= 1.2e+75) {
tmp = x1 + ((x1 + (((t_0 * ((t_7 * ((x1 * 2.0) * t_5)) - ((x1 * x1) * (6.0 + (4.0 * t_5))))) + (t_2 * t_4)) + t_6)) + (3.0 * (3.0 + (-1.0 / x1))));
} else {
tmp = t_1;
}
return tmp;
}
def code(x1, x2): t_0 = (x1 * x1) + 1.0 t_1 = x1 + ((x1 + (6.0 * math.pow(x1, 4.0))) + 9.0) t_2 = x1 * (x1 * 3.0) t_3 = t_2 + (2.0 * x2) t_4 = (t_3 - x1) / t_0 t_5 = (x1 - t_3) / t_0 t_6 = x1 * (x1 * x1) t_7 = 3.0 + t_5 tmp = 0 if x1 <= -7.1e+106: tmp = t_1 elif x1 <= -0.0085: tmp = x1 + (9.0 + (x1 + (t_6 - ((t_2 * t_5) - ((-1.0 - (x1 * x1)) * (((x1 * x1) * (6.0 - (4.0 * (3.0 + ((-1.0 + (((2.0 * x2) - 3.0) / x1)) / x1))))) + (((x1 * 2.0) * t_4) * t_7))))))) elif x1 <= 0.0155: tmp = x1 + ((3.0 * ((x2 * -2.0) - (x1 * ((x1 * ((x2 * -2.0) - 3.0)) - -1.0)))) + (x1 + (x2 * ((x1 * -12.0) + (8.0 * (x1 * x2)))))) elif x1 <= 1.2e+75: tmp = x1 + ((x1 + (((t_0 * ((t_7 * ((x1 * 2.0) * t_5)) - ((x1 * x1) * (6.0 + (4.0 * t_5))))) + (t_2 * t_4)) + t_6)) + (3.0 * (3.0 + (-1.0 / x1)))) else: tmp = t_1 return tmp
function code(x1, x2) t_0 = Float64(Float64(x1 * x1) + 1.0) t_1 = Float64(x1 + Float64(Float64(x1 + Float64(6.0 * (x1 ^ 4.0))) + 9.0)) t_2 = Float64(x1 * Float64(x1 * 3.0)) t_3 = Float64(t_2 + Float64(2.0 * x2)) t_4 = Float64(Float64(t_3 - x1) / t_0) t_5 = Float64(Float64(x1 - t_3) / t_0) t_6 = Float64(x1 * Float64(x1 * x1)) t_7 = Float64(3.0 + t_5) tmp = 0.0 if (x1 <= -7.1e+106) tmp = t_1; elseif (x1 <= -0.0085) tmp = Float64(x1 + Float64(9.0 + Float64(x1 + Float64(t_6 - Float64(Float64(t_2 * t_5) - Float64(Float64(-1.0 - Float64(x1 * x1)) * Float64(Float64(Float64(x1 * x1) * Float64(6.0 - Float64(4.0 * Float64(3.0 + Float64(Float64(-1.0 + Float64(Float64(Float64(2.0 * x2) - 3.0) / x1)) / x1))))) + Float64(Float64(Float64(x1 * 2.0) * t_4) * t_7)))))))); elseif (x1 <= 0.0155) tmp = Float64(x1 + Float64(Float64(3.0 * Float64(Float64(x2 * -2.0) - Float64(x1 * Float64(Float64(x1 * Float64(Float64(x2 * -2.0) - 3.0)) - -1.0)))) + Float64(x1 + Float64(x2 * Float64(Float64(x1 * -12.0) + Float64(8.0 * Float64(x1 * x2))))))); elseif (x1 <= 1.2e+75) tmp = Float64(x1 + Float64(Float64(x1 + Float64(Float64(Float64(t_0 * Float64(Float64(t_7 * Float64(Float64(x1 * 2.0) * t_5)) - Float64(Float64(x1 * x1) * Float64(6.0 + Float64(4.0 * t_5))))) + Float64(t_2 * t_4)) + t_6)) + Float64(3.0 * Float64(3.0 + Float64(-1.0 / x1))))); else tmp = t_1; end return tmp end
function tmp_2 = code(x1, x2) t_0 = (x1 * x1) + 1.0; t_1 = x1 + ((x1 + (6.0 * (x1 ^ 4.0))) + 9.0); t_2 = x1 * (x1 * 3.0); t_3 = t_2 + (2.0 * x2); t_4 = (t_3 - x1) / t_0; t_5 = (x1 - t_3) / t_0; t_6 = x1 * (x1 * x1); t_7 = 3.0 + t_5; tmp = 0.0; if (x1 <= -7.1e+106) tmp = t_1; elseif (x1 <= -0.0085) tmp = x1 + (9.0 + (x1 + (t_6 - ((t_2 * t_5) - ((-1.0 - (x1 * x1)) * (((x1 * x1) * (6.0 - (4.0 * (3.0 + ((-1.0 + (((2.0 * x2) - 3.0) / x1)) / x1))))) + (((x1 * 2.0) * t_4) * t_7))))))); elseif (x1 <= 0.0155) tmp = x1 + ((3.0 * ((x2 * -2.0) - (x1 * ((x1 * ((x2 * -2.0) - 3.0)) - -1.0)))) + (x1 + (x2 * ((x1 * -12.0) + (8.0 * (x1 * x2)))))); elseif (x1 <= 1.2e+75) tmp = x1 + ((x1 + (((t_0 * ((t_7 * ((x1 * 2.0) * t_5)) - ((x1 * x1) * (6.0 + (4.0 * t_5))))) + (t_2 * t_4)) + t_6)) + (3.0 * (3.0 + (-1.0 / x1)))); else tmp = t_1; end tmp_2 = tmp; end
code[x1_, x2_] := Block[{t$95$0 = N[(N[(x1 * x1), $MachinePrecision] + 1.0), $MachinePrecision]}, Block[{t$95$1 = N[(x1 + N[(N[(x1 + N[(6.0 * N[Power[x1, 4.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + 9.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x1 * N[(x1 * 3.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(t$95$2 + N[(2.0 * x2), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[(N[(t$95$3 - x1), $MachinePrecision] / t$95$0), $MachinePrecision]}, Block[{t$95$5 = N[(N[(x1 - t$95$3), $MachinePrecision] / t$95$0), $MachinePrecision]}, Block[{t$95$6 = N[(x1 * N[(x1 * x1), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$7 = N[(3.0 + t$95$5), $MachinePrecision]}, If[LessEqual[x1, -7.1e+106], t$95$1, If[LessEqual[x1, -0.0085], N[(x1 + N[(9.0 + N[(x1 + N[(t$95$6 - N[(N[(t$95$2 * t$95$5), $MachinePrecision] - N[(N[(-1.0 - N[(x1 * x1), $MachinePrecision]), $MachinePrecision] * N[(N[(N[(x1 * x1), $MachinePrecision] * N[(6.0 - N[(4.0 * N[(3.0 + N[(N[(-1.0 + N[(N[(N[(2.0 * x2), $MachinePrecision] - 3.0), $MachinePrecision] / x1), $MachinePrecision]), $MachinePrecision] / x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(N[(x1 * 2.0), $MachinePrecision] * t$95$4), $MachinePrecision] * t$95$7), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 0.0155], N[(x1 + N[(N[(3.0 * N[(N[(x2 * -2.0), $MachinePrecision] - N[(x1 * N[(N[(x1 * N[(N[(x2 * -2.0), $MachinePrecision] - 3.0), $MachinePrecision]), $MachinePrecision] - -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(x1 + N[(x2 * N[(N[(x1 * -12.0), $MachinePrecision] + N[(8.0 * N[(x1 * x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 1.2e+75], N[(x1 + N[(N[(x1 + N[(N[(N[(t$95$0 * N[(N[(t$95$7 * N[(N[(x1 * 2.0), $MachinePrecision] * t$95$5), $MachinePrecision]), $MachinePrecision] - N[(N[(x1 * x1), $MachinePrecision] * N[(6.0 + N[(4.0 * t$95$5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(t$95$2 * t$95$4), $MachinePrecision]), $MachinePrecision] + t$95$6), $MachinePrecision]), $MachinePrecision] + N[(3.0 * N[(3.0 + N[(-1.0 / x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x1 \cdot x1 + 1\\
t_1 := x1 + \left(\left(x1 + 6 \cdot {x1}^{4}\right) + 9\right)\\
t_2 := x1 \cdot \left(x1 \cdot 3\right)\\
t_3 := t\_2 + 2 \cdot x2\\
t_4 := \frac{t\_3 - x1}{t\_0}\\
t_5 := \frac{x1 - t\_3}{t\_0}\\
t_6 := x1 \cdot \left(x1 \cdot x1\right)\\
t_7 := 3 + t\_5\\
\mathbf{if}\;x1 \leq -7.1 \cdot 10^{+106}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;x1 \leq -0.0085:\\
\;\;\;\;x1 + \left(9 + \left(x1 + \left(t\_6 - \left(t\_2 \cdot t\_5 - \left(-1 - x1 \cdot x1\right) \cdot \left(\left(x1 \cdot x1\right) \cdot \left(6 - 4 \cdot \left(3 + \frac{-1 + \frac{2 \cdot x2 - 3}{x1}}{x1}\right)\right) + \left(\left(x1 \cdot 2\right) \cdot t\_4\right) \cdot t\_7\right)\right)\right)\right)\right)\\
\mathbf{elif}\;x1 \leq 0.0155:\\
\;\;\;\;x1 + \left(3 \cdot \left(x2 \cdot -2 - x1 \cdot \left(x1 \cdot \left(x2 \cdot -2 - 3\right) - -1\right)\right) + \left(x1 + x2 \cdot \left(x1 \cdot -12 + 8 \cdot \left(x1 \cdot x2\right)\right)\right)\right)\\
\mathbf{elif}\;x1 \leq 1.2 \cdot 10^{+75}:\\
\;\;\;\;x1 + \left(\left(x1 + \left(\left(t\_0 \cdot \left(t\_7 \cdot \left(\left(x1 \cdot 2\right) \cdot t\_5\right) - \left(x1 \cdot x1\right) \cdot \left(6 + 4 \cdot t\_5\right)\right) + t\_2 \cdot t\_4\right) + t\_6\right)\right) + 3 \cdot \left(3 + \frac{-1}{x1}\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if x1 < -7.1000000000000003e106 or 1.2e75 < x1 Initial program 21.5%
Taylor expanded in x1 around -inf 26.9%
Taylor expanded in x1 around inf 24.7%
Taylor expanded in x1 around inf 97.8%
if -7.1000000000000003e106 < x1 < -0.0085000000000000006Initial program 99.0%
Taylor expanded in x1 around -inf 99.2%
Taylor expanded in x1 around inf 99.2%
if -0.0085000000000000006 < x1 < 0.0155Initial program 99.3%
Taylor expanded in x1 around 0 87.5%
Taylor expanded in x1 around 0 87.6%
Taylor expanded in x2 around 0 98.8%
if 0.0155 < x1 < 1.2e75Initial program 99.2%
Taylor expanded in x1 around inf 97.6%
Final simplification98.4%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (* x1 (* x1 3.0)))
(t_1 (+ t_0 (* 2.0 x2)))
(t_2 (+ (* x1 x1) 1.0))
(t_3 (/ (- x1 t_1) t_2)))
(if (or (<= x1 -7.1e+106) (not (<= x1 1.65e+49)))
(+ x1 (+ (+ x1 (* 6.0 (pow x1 4.0))) 9.0))
(+
x1
(+
(+
x1
(+
(+
(*
t_2
(-
(* (+ 3.0 t_3) (* (* x1 2.0) t_3))
(* (* x1 x1) (+ 6.0 (* 4.0 t_3)))))
(* t_0 (/ (- t_1 x1) t_2)))
(* x1 (* x1 x1))))
(* 3.0 (- (* x2 -2.0) (* x1 (- (* x1 (- (* x2 -2.0) 3.0)) -1.0)))))))))
double code(double x1, double x2) {
double t_0 = x1 * (x1 * 3.0);
double t_1 = t_0 + (2.0 * x2);
double t_2 = (x1 * x1) + 1.0;
double t_3 = (x1 - t_1) / t_2;
double tmp;
if ((x1 <= -7.1e+106) || !(x1 <= 1.65e+49)) {
tmp = x1 + ((x1 + (6.0 * pow(x1, 4.0))) + 9.0);
} else {
tmp = x1 + ((x1 + (((t_2 * (((3.0 + t_3) * ((x1 * 2.0) * t_3)) - ((x1 * x1) * (6.0 + (4.0 * t_3))))) + (t_0 * ((t_1 - x1) / t_2))) + (x1 * (x1 * x1)))) + (3.0 * ((x2 * -2.0) - (x1 * ((x1 * ((x2 * -2.0) - 3.0)) - -1.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 = t_0 + (2.0d0 * x2)
t_2 = (x1 * x1) + 1.0d0
t_3 = (x1 - t_1) / t_2
if ((x1 <= (-7.1d+106)) .or. (.not. (x1 <= 1.65d+49))) then
tmp = x1 + ((x1 + (6.0d0 * (x1 ** 4.0d0))) + 9.0d0)
else
tmp = x1 + ((x1 + (((t_2 * (((3.0d0 + t_3) * ((x1 * 2.0d0) * t_3)) - ((x1 * x1) * (6.0d0 + (4.0d0 * t_3))))) + (t_0 * ((t_1 - x1) / t_2))) + (x1 * (x1 * x1)))) + (3.0d0 * ((x2 * (-2.0d0)) - (x1 * ((x1 * ((x2 * (-2.0d0)) - 3.0d0)) - (-1.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 = t_0 + (2.0 * x2);
double t_2 = (x1 * x1) + 1.0;
double t_3 = (x1 - t_1) / t_2;
double tmp;
if ((x1 <= -7.1e+106) || !(x1 <= 1.65e+49)) {
tmp = x1 + ((x1 + (6.0 * Math.pow(x1, 4.0))) + 9.0);
} else {
tmp = x1 + ((x1 + (((t_2 * (((3.0 + t_3) * ((x1 * 2.0) * t_3)) - ((x1 * x1) * (6.0 + (4.0 * t_3))))) + (t_0 * ((t_1 - x1) / t_2))) + (x1 * (x1 * x1)))) + (3.0 * ((x2 * -2.0) - (x1 * ((x1 * ((x2 * -2.0) - 3.0)) - -1.0)))));
}
return tmp;
}
def code(x1, x2): t_0 = x1 * (x1 * 3.0) t_1 = t_0 + (2.0 * x2) t_2 = (x1 * x1) + 1.0 t_3 = (x1 - t_1) / t_2 tmp = 0 if (x1 <= -7.1e+106) or not (x1 <= 1.65e+49): tmp = x1 + ((x1 + (6.0 * math.pow(x1, 4.0))) + 9.0) else: tmp = x1 + ((x1 + (((t_2 * (((3.0 + t_3) * ((x1 * 2.0) * t_3)) - ((x1 * x1) * (6.0 + (4.0 * t_3))))) + (t_0 * ((t_1 - x1) / t_2))) + (x1 * (x1 * x1)))) + (3.0 * ((x2 * -2.0) - (x1 * ((x1 * ((x2 * -2.0) - 3.0)) - -1.0))))) return tmp
function code(x1, x2) t_0 = Float64(x1 * Float64(x1 * 3.0)) t_1 = Float64(t_0 + Float64(2.0 * x2)) t_2 = Float64(Float64(x1 * x1) + 1.0) t_3 = Float64(Float64(x1 - t_1) / t_2) tmp = 0.0 if ((x1 <= -7.1e+106) || !(x1 <= 1.65e+49)) tmp = Float64(x1 + Float64(Float64(x1 + Float64(6.0 * (x1 ^ 4.0))) + 9.0)); else tmp = Float64(x1 + Float64(Float64(x1 + Float64(Float64(Float64(t_2 * Float64(Float64(Float64(3.0 + t_3) * Float64(Float64(x1 * 2.0) * t_3)) - Float64(Float64(x1 * x1) * Float64(6.0 + Float64(4.0 * t_3))))) + Float64(t_0 * Float64(Float64(t_1 - x1) / t_2))) + Float64(x1 * Float64(x1 * x1)))) + Float64(3.0 * Float64(Float64(x2 * -2.0) - Float64(x1 * Float64(Float64(x1 * Float64(Float64(x2 * -2.0) - 3.0)) - -1.0)))))); end return tmp end
function tmp_2 = code(x1, x2) t_0 = x1 * (x1 * 3.0); t_1 = t_0 + (2.0 * x2); t_2 = (x1 * x1) + 1.0; t_3 = (x1 - t_1) / t_2; tmp = 0.0; if ((x1 <= -7.1e+106) || ~((x1 <= 1.65e+49))) tmp = x1 + ((x1 + (6.0 * (x1 ^ 4.0))) + 9.0); else tmp = x1 + ((x1 + (((t_2 * (((3.0 + t_3) * ((x1 * 2.0) * t_3)) - ((x1 * x1) * (6.0 + (4.0 * t_3))))) + (t_0 * ((t_1 - x1) / t_2))) + (x1 * (x1 * x1)))) + (3.0 * ((x2 * -2.0) - (x1 * ((x1 * ((x2 * -2.0) - 3.0)) - -1.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[(t$95$0 + N[(2.0 * x2), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(x1 * x1), $MachinePrecision] + 1.0), $MachinePrecision]}, Block[{t$95$3 = N[(N[(x1 - t$95$1), $MachinePrecision] / t$95$2), $MachinePrecision]}, If[Or[LessEqual[x1, -7.1e+106], N[Not[LessEqual[x1, 1.65e+49]], $MachinePrecision]], N[(x1 + N[(N[(x1 + N[(6.0 * N[Power[x1, 4.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + 9.0), $MachinePrecision]), $MachinePrecision], N[(x1 + N[(N[(x1 + N[(N[(N[(t$95$2 * N[(N[(N[(3.0 + t$95$3), $MachinePrecision] * N[(N[(x1 * 2.0), $MachinePrecision] * t$95$3), $MachinePrecision]), $MachinePrecision] - N[(N[(x1 * x1), $MachinePrecision] * N[(6.0 + N[(4.0 * t$95$3), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(t$95$0 * N[(N[(t$95$1 - x1), $MachinePrecision] / t$95$2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(x1 * N[(x1 * x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(3.0 * N[(N[(x2 * -2.0), $MachinePrecision] - N[(x1 * N[(N[(x1 * N[(N[(x2 * -2.0), $MachinePrecision] - 3.0), $MachinePrecision]), $MachinePrecision] - -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x1 \cdot \left(x1 \cdot 3\right)\\
t_1 := t\_0 + 2 \cdot x2\\
t_2 := x1 \cdot x1 + 1\\
t_3 := \frac{x1 - t\_1}{t\_2}\\
\mathbf{if}\;x1 \leq -7.1 \cdot 10^{+106} \lor \neg \left(x1 \leq 1.65 \cdot 10^{+49}\right):\\
\;\;\;\;x1 + \left(\left(x1 + 6 \cdot {x1}^{4}\right) + 9\right)\\
\mathbf{else}:\\
\;\;\;\;x1 + \left(\left(x1 + \left(\left(t\_2 \cdot \left(\left(3 + t\_3\right) \cdot \left(\left(x1 \cdot 2\right) \cdot t\_3\right) - \left(x1 \cdot x1\right) \cdot \left(6 + 4 \cdot t\_3\right)\right) + t\_0 \cdot \frac{t\_1 - x1}{t\_2}\right) + x1 \cdot \left(x1 \cdot x1\right)\right)\right) + 3 \cdot \left(x2 \cdot -2 - x1 \cdot \left(x1 \cdot \left(x2 \cdot -2 - 3\right) - -1\right)\right)\right)\\
\end{array}
\end{array}
if x1 < -7.1000000000000003e106 or 1.6499999999999999e49 < x1 Initial program 26.1%
Taylor expanded in x1 around -inf 30.3%
Taylor expanded in x1 around inf 28.3%
Taylor expanded in x1 around inf 97.0%
if -7.1000000000000003e106 < x1 < 1.6499999999999999e49Initial program 99.2%
Taylor expanded in x1 around 0 96.1%
Final simplification96.4%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (+ (* x1 x1) 1.0))
(t_1 (+ x1 (+ (+ x1 (* 6.0 (pow x1 4.0))) 9.0)))
(t_2 (* x1 (* x1 3.0)))
(t_3 (+ t_2 (* 2.0 x2)))
(t_4 (/ (- t_3 x1) t_0))
(t_5 (/ (- x1 t_3) t_0))
(t_6 (* x1 (* x1 x1)))
(t_7 (+ 3.0 t_5)))
(if (<= x1 -7.1e+106)
t_1
(if (<= x1 -0.034)
(+
x1
(+
9.0
(+
x1
(-
t_6
(-
(* t_2 t_5)
(*
(- -1.0 (* x1 x1))
(+
(*
(* x1 x1)
(-
6.0
(* 4.0 (+ 3.0 (/ (+ -1.0 (/ (- (* 2.0 x2) 3.0) x1)) x1)))))
(* (* (* x1 2.0) t_4) t_7))))))))
(if (<= x1 0.05)
(+
x1
(+
(* 3.0 (- (* x2 -2.0) (* x1 (- (* x1 (- (* x2 -2.0) 3.0)) -1.0))))
(+ x1 (* x2 (+ (* x1 -12.0) (* 8.0 (* x1 x2)))))))
(if (<= x1 1.2e+75)
(+
x1
(+
(+
x1
(+
(+
(*
t_0
(-
(* t_7 (* (* x1 2.0) t_5))
(* (* x1 x1) (+ 6.0 (* 4.0 t_5)))))
(* t_2 t_4))
t_6))
9.0))
t_1))))))
double code(double x1, double x2) {
double t_0 = (x1 * x1) + 1.0;
double t_1 = x1 + ((x1 + (6.0 * pow(x1, 4.0))) + 9.0);
double t_2 = x1 * (x1 * 3.0);
double t_3 = t_2 + (2.0 * x2);
double t_4 = (t_3 - x1) / t_0;
double t_5 = (x1 - t_3) / t_0;
double t_6 = x1 * (x1 * x1);
double t_7 = 3.0 + t_5;
double tmp;
if (x1 <= -7.1e+106) {
tmp = t_1;
} else if (x1 <= -0.034) {
tmp = x1 + (9.0 + (x1 + (t_6 - ((t_2 * t_5) - ((-1.0 - (x1 * x1)) * (((x1 * x1) * (6.0 - (4.0 * (3.0 + ((-1.0 + (((2.0 * x2) - 3.0) / x1)) / x1))))) + (((x1 * 2.0) * t_4) * t_7)))))));
} else if (x1 <= 0.05) {
tmp = x1 + ((3.0 * ((x2 * -2.0) - (x1 * ((x1 * ((x2 * -2.0) - 3.0)) - -1.0)))) + (x1 + (x2 * ((x1 * -12.0) + (8.0 * (x1 * x2))))));
} else if (x1 <= 1.2e+75) {
tmp = x1 + ((x1 + (((t_0 * ((t_7 * ((x1 * 2.0) * t_5)) - ((x1 * x1) * (6.0 + (4.0 * t_5))))) + (t_2 * t_4)) + t_6)) + 9.0);
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
real(8) :: t_0
real(8) :: t_1
real(8) :: t_2
real(8) :: t_3
real(8) :: t_4
real(8) :: t_5
real(8) :: t_6
real(8) :: t_7
real(8) :: tmp
t_0 = (x1 * x1) + 1.0d0
t_1 = x1 + ((x1 + (6.0d0 * (x1 ** 4.0d0))) + 9.0d0)
t_2 = x1 * (x1 * 3.0d0)
t_3 = t_2 + (2.0d0 * x2)
t_4 = (t_3 - x1) / t_0
t_5 = (x1 - t_3) / t_0
t_6 = x1 * (x1 * x1)
t_7 = 3.0d0 + t_5
if (x1 <= (-7.1d+106)) then
tmp = t_1
else if (x1 <= (-0.034d0)) then
tmp = x1 + (9.0d0 + (x1 + (t_6 - ((t_2 * t_5) - (((-1.0d0) - (x1 * x1)) * (((x1 * x1) * (6.0d0 - (4.0d0 * (3.0d0 + (((-1.0d0) + (((2.0d0 * x2) - 3.0d0) / x1)) / x1))))) + (((x1 * 2.0d0) * t_4) * t_7)))))))
else if (x1 <= 0.05d0) then
tmp = x1 + ((3.0d0 * ((x2 * (-2.0d0)) - (x1 * ((x1 * ((x2 * (-2.0d0)) - 3.0d0)) - (-1.0d0))))) + (x1 + (x2 * ((x1 * (-12.0d0)) + (8.0d0 * (x1 * x2))))))
else if (x1 <= 1.2d+75) then
tmp = x1 + ((x1 + (((t_0 * ((t_7 * ((x1 * 2.0d0) * t_5)) - ((x1 * x1) * (6.0d0 + (4.0d0 * t_5))))) + (t_2 * t_4)) + t_6)) + 9.0d0)
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x1, double x2) {
double t_0 = (x1 * x1) + 1.0;
double t_1 = x1 + ((x1 + (6.0 * Math.pow(x1, 4.0))) + 9.0);
double t_2 = x1 * (x1 * 3.0);
double t_3 = t_2 + (2.0 * x2);
double t_4 = (t_3 - x1) / t_0;
double t_5 = (x1 - t_3) / t_0;
double t_6 = x1 * (x1 * x1);
double t_7 = 3.0 + t_5;
double tmp;
if (x1 <= -7.1e+106) {
tmp = t_1;
} else if (x1 <= -0.034) {
tmp = x1 + (9.0 + (x1 + (t_6 - ((t_2 * t_5) - ((-1.0 - (x1 * x1)) * (((x1 * x1) * (6.0 - (4.0 * (3.0 + ((-1.0 + (((2.0 * x2) - 3.0) / x1)) / x1))))) + (((x1 * 2.0) * t_4) * t_7)))))));
} else if (x1 <= 0.05) {
tmp = x1 + ((3.0 * ((x2 * -2.0) - (x1 * ((x1 * ((x2 * -2.0) - 3.0)) - -1.0)))) + (x1 + (x2 * ((x1 * -12.0) + (8.0 * (x1 * x2))))));
} else if (x1 <= 1.2e+75) {
tmp = x1 + ((x1 + (((t_0 * ((t_7 * ((x1 * 2.0) * t_5)) - ((x1 * x1) * (6.0 + (4.0 * t_5))))) + (t_2 * t_4)) + t_6)) + 9.0);
} else {
tmp = t_1;
}
return tmp;
}
def code(x1, x2): t_0 = (x1 * x1) + 1.0 t_1 = x1 + ((x1 + (6.0 * math.pow(x1, 4.0))) + 9.0) t_2 = x1 * (x1 * 3.0) t_3 = t_2 + (2.0 * x2) t_4 = (t_3 - x1) / t_0 t_5 = (x1 - t_3) / t_0 t_6 = x1 * (x1 * x1) t_7 = 3.0 + t_5 tmp = 0 if x1 <= -7.1e+106: tmp = t_1 elif x1 <= -0.034: tmp = x1 + (9.0 + (x1 + (t_6 - ((t_2 * t_5) - ((-1.0 - (x1 * x1)) * (((x1 * x1) * (6.0 - (4.0 * (3.0 + ((-1.0 + (((2.0 * x2) - 3.0) / x1)) / x1))))) + (((x1 * 2.0) * t_4) * t_7))))))) elif x1 <= 0.05: tmp = x1 + ((3.0 * ((x2 * -2.0) - (x1 * ((x1 * ((x2 * -2.0) - 3.0)) - -1.0)))) + (x1 + (x2 * ((x1 * -12.0) + (8.0 * (x1 * x2)))))) elif x1 <= 1.2e+75: tmp = x1 + ((x1 + (((t_0 * ((t_7 * ((x1 * 2.0) * t_5)) - ((x1 * x1) * (6.0 + (4.0 * t_5))))) + (t_2 * t_4)) + t_6)) + 9.0) else: tmp = t_1 return tmp
function code(x1, x2) t_0 = Float64(Float64(x1 * x1) + 1.0) t_1 = Float64(x1 + Float64(Float64(x1 + Float64(6.0 * (x1 ^ 4.0))) + 9.0)) t_2 = Float64(x1 * Float64(x1 * 3.0)) t_3 = Float64(t_2 + Float64(2.0 * x2)) t_4 = Float64(Float64(t_3 - x1) / t_0) t_5 = Float64(Float64(x1 - t_3) / t_0) t_6 = Float64(x1 * Float64(x1 * x1)) t_7 = Float64(3.0 + t_5) tmp = 0.0 if (x1 <= -7.1e+106) tmp = t_1; elseif (x1 <= -0.034) tmp = Float64(x1 + Float64(9.0 + Float64(x1 + Float64(t_6 - Float64(Float64(t_2 * t_5) - Float64(Float64(-1.0 - Float64(x1 * x1)) * Float64(Float64(Float64(x1 * x1) * Float64(6.0 - Float64(4.0 * Float64(3.0 + Float64(Float64(-1.0 + Float64(Float64(Float64(2.0 * x2) - 3.0) / x1)) / x1))))) + Float64(Float64(Float64(x1 * 2.0) * t_4) * t_7)))))))); elseif (x1 <= 0.05) tmp = Float64(x1 + Float64(Float64(3.0 * Float64(Float64(x2 * -2.0) - Float64(x1 * Float64(Float64(x1 * Float64(Float64(x2 * -2.0) - 3.0)) - -1.0)))) + Float64(x1 + Float64(x2 * Float64(Float64(x1 * -12.0) + Float64(8.0 * Float64(x1 * x2))))))); elseif (x1 <= 1.2e+75) tmp = Float64(x1 + Float64(Float64(x1 + Float64(Float64(Float64(t_0 * Float64(Float64(t_7 * Float64(Float64(x1 * 2.0) * t_5)) - Float64(Float64(x1 * x1) * Float64(6.0 + Float64(4.0 * t_5))))) + Float64(t_2 * t_4)) + t_6)) + 9.0)); else tmp = t_1; end return tmp end
function tmp_2 = code(x1, x2) t_0 = (x1 * x1) + 1.0; t_1 = x1 + ((x1 + (6.0 * (x1 ^ 4.0))) + 9.0); t_2 = x1 * (x1 * 3.0); t_3 = t_2 + (2.0 * x2); t_4 = (t_3 - x1) / t_0; t_5 = (x1 - t_3) / t_0; t_6 = x1 * (x1 * x1); t_7 = 3.0 + t_5; tmp = 0.0; if (x1 <= -7.1e+106) tmp = t_1; elseif (x1 <= -0.034) tmp = x1 + (9.0 + (x1 + (t_6 - ((t_2 * t_5) - ((-1.0 - (x1 * x1)) * (((x1 * x1) * (6.0 - (4.0 * (3.0 + ((-1.0 + (((2.0 * x2) - 3.0) / x1)) / x1))))) + (((x1 * 2.0) * t_4) * t_7))))))); elseif (x1 <= 0.05) tmp = x1 + ((3.0 * ((x2 * -2.0) - (x1 * ((x1 * ((x2 * -2.0) - 3.0)) - -1.0)))) + (x1 + (x2 * ((x1 * -12.0) + (8.0 * (x1 * x2)))))); elseif (x1 <= 1.2e+75) tmp = x1 + ((x1 + (((t_0 * ((t_7 * ((x1 * 2.0) * t_5)) - ((x1 * x1) * (6.0 + (4.0 * t_5))))) + (t_2 * t_4)) + t_6)) + 9.0); else tmp = t_1; end tmp_2 = tmp; end
code[x1_, x2_] := Block[{t$95$0 = N[(N[(x1 * x1), $MachinePrecision] + 1.0), $MachinePrecision]}, Block[{t$95$1 = N[(x1 + N[(N[(x1 + N[(6.0 * N[Power[x1, 4.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + 9.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x1 * N[(x1 * 3.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(t$95$2 + N[(2.0 * x2), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[(N[(t$95$3 - x1), $MachinePrecision] / t$95$0), $MachinePrecision]}, Block[{t$95$5 = N[(N[(x1 - t$95$3), $MachinePrecision] / t$95$0), $MachinePrecision]}, Block[{t$95$6 = N[(x1 * N[(x1 * x1), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$7 = N[(3.0 + t$95$5), $MachinePrecision]}, If[LessEqual[x1, -7.1e+106], t$95$1, If[LessEqual[x1, -0.034], N[(x1 + N[(9.0 + N[(x1 + N[(t$95$6 - N[(N[(t$95$2 * t$95$5), $MachinePrecision] - N[(N[(-1.0 - N[(x1 * x1), $MachinePrecision]), $MachinePrecision] * N[(N[(N[(x1 * x1), $MachinePrecision] * N[(6.0 - N[(4.0 * N[(3.0 + N[(N[(-1.0 + N[(N[(N[(2.0 * x2), $MachinePrecision] - 3.0), $MachinePrecision] / x1), $MachinePrecision]), $MachinePrecision] / x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(N[(x1 * 2.0), $MachinePrecision] * t$95$4), $MachinePrecision] * t$95$7), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 0.05], N[(x1 + N[(N[(3.0 * N[(N[(x2 * -2.0), $MachinePrecision] - N[(x1 * N[(N[(x1 * N[(N[(x2 * -2.0), $MachinePrecision] - 3.0), $MachinePrecision]), $MachinePrecision] - -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(x1 + N[(x2 * N[(N[(x1 * -12.0), $MachinePrecision] + N[(8.0 * N[(x1 * x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 1.2e+75], N[(x1 + N[(N[(x1 + N[(N[(N[(t$95$0 * N[(N[(t$95$7 * N[(N[(x1 * 2.0), $MachinePrecision] * t$95$5), $MachinePrecision]), $MachinePrecision] - N[(N[(x1 * x1), $MachinePrecision] * N[(6.0 + N[(4.0 * t$95$5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(t$95$2 * t$95$4), $MachinePrecision]), $MachinePrecision] + t$95$6), $MachinePrecision]), $MachinePrecision] + 9.0), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x1 \cdot x1 + 1\\
t_1 := x1 + \left(\left(x1 + 6 \cdot {x1}^{4}\right) + 9\right)\\
t_2 := x1 \cdot \left(x1 \cdot 3\right)\\
t_3 := t\_2 + 2 \cdot x2\\
t_4 := \frac{t\_3 - x1}{t\_0}\\
t_5 := \frac{x1 - t\_3}{t\_0}\\
t_6 := x1 \cdot \left(x1 \cdot x1\right)\\
t_7 := 3 + t\_5\\
\mathbf{if}\;x1 \leq -7.1 \cdot 10^{+106}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;x1 \leq -0.034:\\
\;\;\;\;x1 + \left(9 + \left(x1 + \left(t\_6 - \left(t\_2 \cdot t\_5 - \left(-1 - x1 \cdot x1\right) \cdot \left(\left(x1 \cdot x1\right) \cdot \left(6 - 4 \cdot \left(3 + \frac{-1 + \frac{2 \cdot x2 - 3}{x1}}{x1}\right)\right) + \left(\left(x1 \cdot 2\right) \cdot t\_4\right) \cdot t\_7\right)\right)\right)\right)\right)\\
\mathbf{elif}\;x1 \leq 0.05:\\
\;\;\;\;x1 + \left(3 \cdot \left(x2 \cdot -2 - x1 \cdot \left(x1 \cdot \left(x2 \cdot -2 - 3\right) - -1\right)\right) + \left(x1 + x2 \cdot \left(x1 \cdot -12 + 8 \cdot \left(x1 \cdot x2\right)\right)\right)\right)\\
\mathbf{elif}\;x1 \leq 1.2 \cdot 10^{+75}:\\
\;\;\;\;x1 + \left(\left(x1 + \left(\left(t\_0 \cdot \left(t\_7 \cdot \left(\left(x1 \cdot 2\right) \cdot t\_5\right) - \left(x1 \cdot x1\right) \cdot \left(6 + 4 \cdot t\_5\right)\right) + t\_2 \cdot t\_4\right) + t\_6\right)\right) + 9\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if x1 < -7.1000000000000003e106 or 1.2e75 < x1 Initial program 21.5%
Taylor expanded in x1 around -inf 26.9%
Taylor expanded in x1 around inf 24.7%
Taylor expanded in x1 around inf 97.8%
if -7.1000000000000003e106 < x1 < -0.034000000000000002Initial program 99.0%
Taylor expanded in x1 around -inf 99.2%
Taylor expanded in x1 around inf 99.2%
if -0.034000000000000002 < x1 < 0.050000000000000003Initial program 99.3%
Taylor expanded in x1 around 0 87.5%
Taylor expanded in x1 around 0 87.6%
Taylor expanded in x2 around 0 98.8%
if 0.050000000000000003 < x1 < 1.2e75Initial program 99.2%
Taylor expanded in x1 around inf 97.2%
Final simplification98.4%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (+ (* x1 x1) 1.0))
(t_1 (+ x1 (+ (+ x1 (* 6.0 (pow x1 4.0))) 9.0)))
(t_2 (* x1 (* x1 3.0)))
(t_3 (+ t_2 (* 2.0 x2)))
(t_4 (/ (- x1 t_3) t_0))
(t_5
(+
x1
(+
9.0
(+
x1
(-
(* x1 (* x1 x1))
(-
(* t_2 t_4)
(*
(- -1.0 (* x1 x1))
(+
(*
(* x1 x1)
(-
6.0
(* 4.0 (+ 3.0 (/ (+ -1.0 (/ (- (* 2.0 x2) 3.0) x1)) x1)))))
(* (* (* x1 2.0) (/ (- t_3 x1) t_0)) (+ 3.0 t_4)))))))))))
(if (<= x1 -7.1e+106)
t_1
(if (<= x1 -0.017)
t_5
(if (<= x1 0.009)
(+
x1
(+
(* 3.0 (- (* x2 -2.0) (* x1 (- (* x1 (- (* x2 -2.0) 3.0)) -1.0))))
(+ x1 (* x2 (+ (* x1 -12.0) (* 8.0 (* x1 x2)))))))
(if (<= x1 1.2e+75) t_5 t_1))))))
double code(double x1, double x2) {
double t_0 = (x1 * x1) + 1.0;
double t_1 = x1 + ((x1 + (6.0 * pow(x1, 4.0))) + 9.0);
double t_2 = x1 * (x1 * 3.0);
double t_3 = t_2 + (2.0 * x2);
double t_4 = (x1 - t_3) / t_0;
double t_5 = x1 + (9.0 + (x1 + ((x1 * (x1 * x1)) - ((t_2 * t_4) - ((-1.0 - (x1 * x1)) * (((x1 * x1) * (6.0 - (4.0 * (3.0 + ((-1.0 + (((2.0 * x2) - 3.0) / x1)) / x1))))) + (((x1 * 2.0) * ((t_3 - x1) / t_0)) * (3.0 + t_4))))))));
double tmp;
if (x1 <= -7.1e+106) {
tmp = t_1;
} else if (x1 <= -0.017) {
tmp = t_5;
} else if (x1 <= 0.009) {
tmp = x1 + ((3.0 * ((x2 * -2.0) - (x1 * ((x1 * ((x2 * -2.0) - 3.0)) - -1.0)))) + (x1 + (x2 * ((x1 * -12.0) + (8.0 * (x1 * x2))))));
} else if (x1 <= 1.2e+75) {
tmp = t_5;
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
real(8) :: t_0
real(8) :: t_1
real(8) :: t_2
real(8) :: t_3
real(8) :: t_4
real(8) :: t_5
real(8) :: tmp
t_0 = (x1 * x1) + 1.0d0
t_1 = x1 + ((x1 + (6.0d0 * (x1 ** 4.0d0))) + 9.0d0)
t_2 = x1 * (x1 * 3.0d0)
t_3 = t_2 + (2.0d0 * x2)
t_4 = (x1 - t_3) / t_0
t_5 = x1 + (9.0d0 + (x1 + ((x1 * (x1 * x1)) - ((t_2 * t_4) - (((-1.0d0) - (x1 * x1)) * (((x1 * x1) * (6.0d0 - (4.0d0 * (3.0d0 + (((-1.0d0) + (((2.0d0 * x2) - 3.0d0) / x1)) / x1))))) + (((x1 * 2.0d0) * ((t_3 - x1) / t_0)) * (3.0d0 + t_4))))))))
if (x1 <= (-7.1d+106)) then
tmp = t_1
else if (x1 <= (-0.017d0)) then
tmp = t_5
else if (x1 <= 0.009d0) then
tmp = x1 + ((3.0d0 * ((x2 * (-2.0d0)) - (x1 * ((x1 * ((x2 * (-2.0d0)) - 3.0d0)) - (-1.0d0))))) + (x1 + (x2 * ((x1 * (-12.0d0)) + (8.0d0 * (x1 * x2))))))
else if (x1 <= 1.2d+75) then
tmp = t_5
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x1, double x2) {
double t_0 = (x1 * x1) + 1.0;
double t_1 = x1 + ((x1 + (6.0 * Math.pow(x1, 4.0))) + 9.0);
double t_2 = x1 * (x1 * 3.0);
double t_3 = t_2 + (2.0 * x2);
double t_4 = (x1 - t_3) / t_0;
double t_5 = x1 + (9.0 + (x1 + ((x1 * (x1 * x1)) - ((t_2 * t_4) - ((-1.0 - (x1 * x1)) * (((x1 * x1) * (6.0 - (4.0 * (3.0 + ((-1.0 + (((2.0 * x2) - 3.0) / x1)) / x1))))) + (((x1 * 2.0) * ((t_3 - x1) / t_0)) * (3.0 + t_4))))))));
double tmp;
if (x1 <= -7.1e+106) {
tmp = t_1;
} else if (x1 <= -0.017) {
tmp = t_5;
} else if (x1 <= 0.009) {
tmp = x1 + ((3.0 * ((x2 * -2.0) - (x1 * ((x1 * ((x2 * -2.0) - 3.0)) - -1.0)))) + (x1 + (x2 * ((x1 * -12.0) + (8.0 * (x1 * x2))))));
} else if (x1 <= 1.2e+75) {
tmp = t_5;
} else {
tmp = t_1;
}
return tmp;
}
def code(x1, x2): t_0 = (x1 * x1) + 1.0 t_1 = x1 + ((x1 + (6.0 * math.pow(x1, 4.0))) + 9.0) t_2 = x1 * (x1 * 3.0) t_3 = t_2 + (2.0 * x2) t_4 = (x1 - t_3) / t_0 t_5 = x1 + (9.0 + (x1 + ((x1 * (x1 * x1)) - ((t_2 * t_4) - ((-1.0 - (x1 * x1)) * (((x1 * x1) * (6.0 - (4.0 * (3.0 + ((-1.0 + (((2.0 * x2) - 3.0) / x1)) / x1))))) + (((x1 * 2.0) * ((t_3 - x1) / t_0)) * (3.0 + t_4)))))))) tmp = 0 if x1 <= -7.1e+106: tmp = t_1 elif x1 <= -0.017: tmp = t_5 elif x1 <= 0.009: tmp = x1 + ((3.0 * ((x2 * -2.0) - (x1 * ((x1 * ((x2 * -2.0) - 3.0)) - -1.0)))) + (x1 + (x2 * ((x1 * -12.0) + (8.0 * (x1 * x2)))))) elif x1 <= 1.2e+75: tmp = t_5 else: tmp = t_1 return tmp
function code(x1, x2) t_0 = Float64(Float64(x1 * x1) + 1.0) t_1 = Float64(x1 + Float64(Float64(x1 + Float64(6.0 * (x1 ^ 4.0))) + 9.0)) t_2 = Float64(x1 * Float64(x1 * 3.0)) t_3 = Float64(t_2 + Float64(2.0 * x2)) t_4 = Float64(Float64(x1 - t_3) / t_0) t_5 = Float64(x1 + Float64(9.0 + Float64(x1 + Float64(Float64(x1 * Float64(x1 * x1)) - Float64(Float64(t_2 * t_4) - Float64(Float64(-1.0 - Float64(x1 * x1)) * Float64(Float64(Float64(x1 * x1) * Float64(6.0 - Float64(4.0 * Float64(3.0 + Float64(Float64(-1.0 + Float64(Float64(Float64(2.0 * x2) - 3.0) / x1)) / x1))))) + Float64(Float64(Float64(x1 * 2.0) * Float64(Float64(t_3 - x1) / t_0)) * Float64(3.0 + t_4))))))))) tmp = 0.0 if (x1 <= -7.1e+106) tmp = t_1; elseif (x1 <= -0.017) tmp = t_5; elseif (x1 <= 0.009) tmp = Float64(x1 + Float64(Float64(3.0 * Float64(Float64(x2 * -2.0) - Float64(x1 * Float64(Float64(x1 * Float64(Float64(x2 * -2.0) - 3.0)) - -1.0)))) + Float64(x1 + Float64(x2 * Float64(Float64(x1 * -12.0) + Float64(8.0 * Float64(x1 * x2))))))); elseif (x1 <= 1.2e+75) tmp = t_5; else tmp = t_1; end return tmp end
function tmp_2 = code(x1, x2) t_0 = (x1 * x1) + 1.0; t_1 = x1 + ((x1 + (6.0 * (x1 ^ 4.0))) + 9.0); t_2 = x1 * (x1 * 3.0); t_3 = t_2 + (2.0 * x2); t_4 = (x1 - t_3) / t_0; t_5 = x1 + (9.0 + (x1 + ((x1 * (x1 * x1)) - ((t_2 * t_4) - ((-1.0 - (x1 * x1)) * (((x1 * x1) * (6.0 - (4.0 * (3.0 + ((-1.0 + (((2.0 * x2) - 3.0) / x1)) / x1))))) + (((x1 * 2.0) * ((t_3 - x1) / t_0)) * (3.0 + t_4)))))))); tmp = 0.0; if (x1 <= -7.1e+106) tmp = t_1; elseif (x1 <= -0.017) tmp = t_5; elseif (x1 <= 0.009) tmp = x1 + ((3.0 * ((x2 * -2.0) - (x1 * ((x1 * ((x2 * -2.0) - 3.0)) - -1.0)))) + (x1 + (x2 * ((x1 * -12.0) + (8.0 * (x1 * x2)))))); elseif (x1 <= 1.2e+75) tmp = t_5; else tmp = t_1; end tmp_2 = tmp; end
code[x1_, x2_] := Block[{t$95$0 = N[(N[(x1 * x1), $MachinePrecision] + 1.0), $MachinePrecision]}, Block[{t$95$1 = N[(x1 + N[(N[(x1 + N[(6.0 * N[Power[x1, 4.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + 9.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x1 * N[(x1 * 3.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(t$95$2 + N[(2.0 * x2), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[(N[(x1 - t$95$3), $MachinePrecision] / t$95$0), $MachinePrecision]}, Block[{t$95$5 = N[(x1 + N[(9.0 + N[(x1 + N[(N[(x1 * N[(x1 * x1), $MachinePrecision]), $MachinePrecision] - N[(N[(t$95$2 * t$95$4), $MachinePrecision] - N[(N[(-1.0 - N[(x1 * x1), $MachinePrecision]), $MachinePrecision] * N[(N[(N[(x1 * x1), $MachinePrecision] * N[(6.0 - N[(4.0 * N[(3.0 + N[(N[(-1.0 + N[(N[(N[(2.0 * x2), $MachinePrecision] - 3.0), $MachinePrecision] / x1), $MachinePrecision]), $MachinePrecision] / x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(N[(x1 * 2.0), $MachinePrecision] * N[(N[(t$95$3 - x1), $MachinePrecision] / t$95$0), $MachinePrecision]), $MachinePrecision] * N[(3.0 + t$95$4), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x1, -7.1e+106], t$95$1, If[LessEqual[x1, -0.017], t$95$5, If[LessEqual[x1, 0.009], N[(x1 + N[(N[(3.0 * N[(N[(x2 * -2.0), $MachinePrecision] - N[(x1 * N[(N[(x1 * N[(N[(x2 * -2.0), $MachinePrecision] - 3.0), $MachinePrecision]), $MachinePrecision] - -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(x1 + N[(x2 * N[(N[(x1 * -12.0), $MachinePrecision] + N[(8.0 * N[(x1 * x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 1.2e+75], t$95$5, t$95$1]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x1 \cdot x1 + 1\\
t_1 := x1 + \left(\left(x1 + 6 \cdot {x1}^{4}\right) + 9\right)\\
t_2 := x1 \cdot \left(x1 \cdot 3\right)\\
t_3 := t\_2 + 2 \cdot x2\\
t_4 := \frac{x1 - t\_3}{t\_0}\\
t_5 := x1 + \left(9 + \left(x1 + \left(x1 \cdot \left(x1 \cdot x1\right) - \left(t\_2 \cdot t\_4 - \left(-1 - x1 \cdot x1\right) \cdot \left(\left(x1 \cdot x1\right) \cdot \left(6 - 4 \cdot \left(3 + \frac{-1 + \frac{2 \cdot x2 - 3}{x1}}{x1}\right)\right) + \left(\left(x1 \cdot 2\right) \cdot \frac{t\_3 - x1}{t\_0}\right) \cdot \left(3 + t\_4\right)\right)\right)\right)\right)\right)\\
\mathbf{if}\;x1 \leq -7.1 \cdot 10^{+106}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;x1 \leq -0.017:\\
\;\;\;\;t\_5\\
\mathbf{elif}\;x1 \leq 0.009:\\
\;\;\;\;x1 + \left(3 \cdot \left(x2 \cdot -2 - x1 \cdot \left(x1 \cdot \left(x2 \cdot -2 - 3\right) - -1\right)\right) + \left(x1 + x2 \cdot \left(x1 \cdot -12 + 8 \cdot \left(x1 \cdot x2\right)\right)\right)\right)\\
\mathbf{elif}\;x1 \leq 1.2 \cdot 10^{+75}:\\
\;\;\;\;t\_5\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if x1 < -7.1000000000000003e106 or 1.2e75 < x1 Initial program 21.5%
Taylor expanded in x1 around -inf 26.9%
Taylor expanded in x1 around inf 24.7%
Taylor expanded in x1 around inf 97.8%
if -7.1000000000000003e106 < x1 < -0.017000000000000001 or 0.00899999999999999932 < x1 < 1.2e75Initial program 99.1%
Taylor expanded in x1 around -inf 98.2%
Taylor expanded in x1 around inf 98.2%
if -0.017000000000000001 < x1 < 0.00899999999999999932Initial program 99.3%
Taylor expanded in x1 around 0 87.5%
Taylor expanded in x1 around 0 87.6%
Taylor expanded in x2 around 0 98.8%
Final simplification98.4%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (* x1 (* x1 x1)))
(t_1 (+ (* x1 x1) 1.0))
(t_2 (* x1 (* x1 3.0)))
(t_3 (+ x1 (+ (+ x1 (* 6.0 (pow x1 4.0))) 9.0)))
(t_4 (- x1 (- t_2 (* 2.0 x2))))
(t_5 (+ t_2 (* 2.0 x2)))
(t_6 (/ (- x1 t_5) t_1))
(t_7 (+ 3.0 t_6)))
(if (<= x1 -7.1e+106)
t_3
(if (<= x1 -0.032)
(+
x1
(-
(* 3.0 (/ t_4 (- -1.0 (* x1 x1))))
(-
(-
(+
(* t_2 t_6)
(*
t_1
(-
(+ (* 4.0 (- 3.0 (* 2.0 x2))) (* x1 (- 4.0 (* x1 6.0))))
(* t_7 (* (* x1 2.0) t_6)))))
t_0)
x1)))
(if (<= x1 7.7e+49)
(-
x1
(-
(* 3.0 (/ t_4 t_1))
(+
x1
(+
t_0
(-
(* t_2 (/ (- t_5 x1) t_1))
(*
t_1
(+
(* (* x1 x1) (+ 6.0 (* 4.0 t_6)))
(* (* (* x1 2.0) (- (* 2.0 x2) x1)) t_7))))))))
t_3)))))
double code(double x1, double x2) {
double t_0 = x1 * (x1 * x1);
double t_1 = (x1 * x1) + 1.0;
double t_2 = x1 * (x1 * 3.0);
double t_3 = x1 + ((x1 + (6.0 * pow(x1, 4.0))) + 9.0);
double t_4 = x1 - (t_2 - (2.0 * x2));
double t_5 = t_2 + (2.0 * x2);
double t_6 = (x1 - t_5) / t_1;
double t_7 = 3.0 + t_6;
double tmp;
if (x1 <= -7.1e+106) {
tmp = t_3;
} else if (x1 <= -0.032) {
tmp = x1 + ((3.0 * (t_4 / (-1.0 - (x1 * x1)))) - ((((t_2 * t_6) + (t_1 * (((4.0 * (3.0 - (2.0 * x2))) + (x1 * (4.0 - (x1 * 6.0)))) - (t_7 * ((x1 * 2.0) * t_6))))) - t_0) - x1));
} else if (x1 <= 7.7e+49) {
tmp = x1 - ((3.0 * (t_4 / t_1)) - (x1 + (t_0 + ((t_2 * ((t_5 - x1) / t_1)) - (t_1 * (((x1 * x1) * (6.0 + (4.0 * t_6))) + (((x1 * 2.0) * ((2.0 * x2) - x1)) * t_7)))))));
} else {
tmp = 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) :: t_4
real(8) :: t_5
real(8) :: t_6
real(8) :: t_7
real(8) :: tmp
t_0 = x1 * (x1 * x1)
t_1 = (x1 * x1) + 1.0d0
t_2 = x1 * (x1 * 3.0d0)
t_3 = x1 + ((x1 + (6.0d0 * (x1 ** 4.0d0))) + 9.0d0)
t_4 = x1 - (t_2 - (2.0d0 * x2))
t_5 = t_2 + (2.0d0 * x2)
t_6 = (x1 - t_5) / t_1
t_7 = 3.0d0 + t_6
if (x1 <= (-7.1d+106)) then
tmp = t_3
else if (x1 <= (-0.032d0)) then
tmp = x1 + ((3.0d0 * (t_4 / ((-1.0d0) - (x1 * x1)))) - ((((t_2 * t_6) + (t_1 * (((4.0d0 * (3.0d0 - (2.0d0 * x2))) + (x1 * (4.0d0 - (x1 * 6.0d0)))) - (t_7 * ((x1 * 2.0d0) * t_6))))) - t_0) - x1))
else if (x1 <= 7.7d+49) then
tmp = x1 - ((3.0d0 * (t_4 / t_1)) - (x1 + (t_0 + ((t_2 * ((t_5 - x1) / t_1)) - (t_1 * (((x1 * x1) * (6.0d0 + (4.0d0 * t_6))) + (((x1 * 2.0d0) * ((2.0d0 * x2) - x1)) * t_7)))))))
else
tmp = t_3
end if
code = tmp
end function
public static double code(double x1, double x2) {
double t_0 = x1 * (x1 * x1);
double t_1 = (x1 * x1) + 1.0;
double t_2 = x1 * (x1 * 3.0);
double t_3 = x1 + ((x1 + (6.0 * Math.pow(x1, 4.0))) + 9.0);
double t_4 = x1 - (t_2 - (2.0 * x2));
double t_5 = t_2 + (2.0 * x2);
double t_6 = (x1 - t_5) / t_1;
double t_7 = 3.0 + t_6;
double tmp;
if (x1 <= -7.1e+106) {
tmp = t_3;
} else if (x1 <= -0.032) {
tmp = x1 + ((3.0 * (t_4 / (-1.0 - (x1 * x1)))) - ((((t_2 * t_6) + (t_1 * (((4.0 * (3.0 - (2.0 * x2))) + (x1 * (4.0 - (x1 * 6.0)))) - (t_7 * ((x1 * 2.0) * t_6))))) - t_0) - x1));
} else if (x1 <= 7.7e+49) {
tmp = x1 - ((3.0 * (t_4 / t_1)) - (x1 + (t_0 + ((t_2 * ((t_5 - x1) / t_1)) - (t_1 * (((x1 * x1) * (6.0 + (4.0 * t_6))) + (((x1 * 2.0) * ((2.0 * x2) - x1)) * t_7)))))));
} else {
tmp = t_3;
}
return tmp;
}
def code(x1, x2): t_0 = x1 * (x1 * x1) t_1 = (x1 * x1) + 1.0 t_2 = x1 * (x1 * 3.0) t_3 = x1 + ((x1 + (6.0 * math.pow(x1, 4.0))) + 9.0) t_4 = x1 - (t_2 - (2.0 * x2)) t_5 = t_2 + (2.0 * x2) t_6 = (x1 - t_5) / t_1 t_7 = 3.0 + t_6 tmp = 0 if x1 <= -7.1e+106: tmp = t_3 elif x1 <= -0.032: tmp = x1 + ((3.0 * (t_4 / (-1.0 - (x1 * x1)))) - ((((t_2 * t_6) + (t_1 * (((4.0 * (3.0 - (2.0 * x2))) + (x1 * (4.0 - (x1 * 6.0)))) - (t_7 * ((x1 * 2.0) * t_6))))) - t_0) - x1)) elif x1 <= 7.7e+49: tmp = x1 - ((3.0 * (t_4 / t_1)) - (x1 + (t_0 + ((t_2 * ((t_5 - x1) / t_1)) - (t_1 * (((x1 * x1) * (6.0 + (4.0 * t_6))) + (((x1 * 2.0) * ((2.0 * x2) - x1)) * t_7))))))) else: tmp = t_3 return tmp
function code(x1, x2) t_0 = Float64(x1 * Float64(x1 * x1)) t_1 = Float64(Float64(x1 * x1) + 1.0) t_2 = Float64(x1 * Float64(x1 * 3.0)) t_3 = Float64(x1 + Float64(Float64(x1 + Float64(6.0 * (x1 ^ 4.0))) + 9.0)) t_4 = Float64(x1 - Float64(t_2 - Float64(2.0 * x2))) t_5 = Float64(t_2 + Float64(2.0 * x2)) t_6 = Float64(Float64(x1 - t_5) / t_1) t_7 = Float64(3.0 + t_6) tmp = 0.0 if (x1 <= -7.1e+106) tmp = t_3; elseif (x1 <= -0.032) tmp = Float64(x1 + Float64(Float64(3.0 * Float64(t_4 / Float64(-1.0 - Float64(x1 * x1)))) - Float64(Float64(Float64(Float64(t_2 * t_6) + Float64(t_1 * Float64(Float64(Float64(4.0 * Float64(3.0 - Float64(2.0 * x2))) + Float64(x1 * Float64(4.0 - Float64(x1 * 6.0)))) - Float64(t_7 * Float64(Float64(x1 * 2.0) * t_6))))) - t_0) - x1))); elseif (x1 <= 7.7e+49) tmp = Float64(x1 - Float64(Float64(3.0 * Float64(t_4 / t_1)) - Float64(x1 + Float64(t_0 + Float64(Float64(t_2 * Float64(Float64(t_5 - x1) / t_1)) - Float64(t_1 * Float64(Float64(Float64(x1 * x1) * Float64(6.0 + Float64(4.0 * t_6))) + Float64(Float64(Float64(x1 * 2.0) * Float64(Float64(2.0 * x2) - x1)) * t_7)))))))); else tmp = t_3; end return tmp end
function tmp_2 = code(x1, x2) t_0 = x1 * (x1 * x1); t_1 = (x1 * x1) + 1.0; t_2 = x1 * (x1 * 3.0); t_3 = x1 + ((x1 + (6.0 * (x1 ^ 4.0))) + 9.0); t_4 = x1 - (t_2 - (2.0 * x2)); t_5 = t_2 + (2.0 * x2); t_6 = (x1 - t_5) / t_1; t_7 = 3.0 + t_6; tmp = 0.0; if (x1 <= -7.1e+106) tmp = t_3; elseif (x1 <= -0.032) tmp = x1 + ((3.0 * (t_4 / (-1.0 - (x1 * x1)))) - ((((t_2 * t_6) + (t_1 * (((4.0 * (3.0 - (2.0 * x2))) + (x1 * (4.0 - (x1 * 6.0)))) - (t_7 * ((x1 * 2.0) * t_6))))) - t_0) - x1)); elseif (x1 <= 7.7e+49) tmp = x1 - ((3.0 * (t_4 / t_1)) - (x1 + (t_0 + ((t_2 * ((t_5 - x1) / t_1)) - (t_1 * (((x1 * x1) * (6.0 + (4.0 * t_6))) + (((x1 * 2.0) * ((2.0 * x2) - x1)) * t_7))))))); else tmp = t_3; end tmp_2 = tmp; end
code[x1_, x2_] := Block[{t$95$0 = N[(x1 * N[(x1 * x1), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(N[(x1 * x1), $MachinePrecision] + 1.0), $MachinePrecision]}, Block[{t$95$2 = N[(x1 * N[(x1 * 3.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(x1 + N[(N[(x1 + N[(6.0 * N[Power[x1, 4.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + 9.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[(x1 - N[(t$95$2 - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$5 = N[(t$95$2 + N[(2.0 * x2), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$6 = N[(N[(x1 - t$95$5), $MachinePrecision] / t$95$1), $MachinePrecision]}, Block[{t$95$7 = N[(3.0 + t$95$6), $MachinePrecision]}, If[LessEqual[x1, -7.1e+106], t$95$3, If[LessEqual[x1, -0.032], N[(x1 + N[(N[(3.0 * N[(t$95$4 / N[(-1.0 - N[(x1 * x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[(N[(N[(t$95$2 * t$95$6), $MachinePrecision] + N[(t$95$1 * N[(N[(N[(4.0 * N[(3.0 - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(x1 * N[(4.0 - N[(x1 * 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(t$95$7 * N[(N[(x1 * 2.0), $MachinePrecision] * t$95$6), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision] - x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 7.7e+49], N[(x1 - N[(N[(3.0 * N[(t$95$4 / t$95$1), $MachinePrecision]), $MachinePrecision] - N[(x1 + N[(t$95$0 + N[(N[(t$95$2 * N[(N[(t$95$5 - x1), $MachinePrecision] / t$95$1), $MachinePrecision]), $MachinePrecision] - N[(t$95$1 * N[(N[(N[(x1 * x1), $MachinePrecision] * N[(6.0 + N[(4.0 * t$95$6), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(N[(x1 * 2.0), $MachinePrecision] * N[(N[(2.0 * x2), $MachinePrecision] - x1), $MachinePrecision]), $MachinePrecision] * t$95$7), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$3]]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x1 \cdot \left(x1 \cdot x1\right)\\
t_1 := x1 \cdot x1 + 1\\
t_2 := x1 \cdot \left(x1 \cdot 3\right)\\
t_3 := x1 + \left(\left(x1 + 6 \cdot {x1}^{4}\right) + 9\right)\\
t_4 := x1 - \left(t\_2 - 2 \cdot x2\right)\\
t_5 := t\_2 + 2 \cdot x2\\
t_6 := \frac{x1 - t\_5}{t\_1}\\
t_7 := 3 + t\_6\\
\mathbf{if}\;x1 \leq -7.1 \cdot 10^{+106}:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;x1 \leq -0.032:\\
\;\;\;\;x1 + \left(3 \cdot \frac{t\_4}{-1 - x1 \cdot x1} - \left(\left(\left(t\_2 \cdot t\_6 + t\_1 \cdot \left(\left(4 \cdot \left(3 - 2 \cdot x2\right) + x1 \cdot \left(4 - x1 \cdot 6\right)\right) - t\_7 \cdot \left(\left(x1 \cdot 2\right) \cdot t\_6\right)\right)\right) - t\_0\right) - x1\right)\right)\\
\mathbf{elif}\;x1 \leq 7.7 \cdot 10^{+49}:\\
\;\;\;\;x1 - \left(3 \cdot \frac{t\_4}{t\_1} - \left(x1 + \left(t\_0 + \left(t\_2 \cdot \frac{t\_5 - x1}{t\_1} - t\_1 \cdot \left(\left(x1 \cdot x1\right) \cdot \left(6 + 4 \cdot t\_6\right) + \left(\left(x1 \cdot 2\right) \cdot \left(2 \cdot x2 - x1\right)\right) \cdot t\_7\right)\right)\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t\_3\\
\end{array}
\end{array}
if x1 < -7.1000000000000003e106 or 7.7e49 < x1 Initial program 26.1%
Taylor expanded in x1 around -inf 30.3%
Taylor expanded in x1 around inf 28.3%
Taylor expanded in x1 around inf 97.0%
if -7.1000000000000003e106 < x1 < -0.032000000000000001Initial program 99.0%
Taylor expanded in x1 around -inf 99.2%
Taylor expanded in x1 around 0 99.4%
if -0.032000000000000001 < x1 < 7.7e49Initial program 99.3%
Taylor expanded in x1 around 0 96.7%
Final simplification97.2%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (+ (* x1 x1) 1.0))
(t_1 (+ x1 (+ (+ x1 (* 6.0 (pow x1 4.0))) 9.0)))
(t_2 (* x1 (* x1 3.0)))
(t_3 (+ t_2 (* 2.0 x2)))
(t_4 (/ (- t_3 x1) t_0))
(t_5 (/ (- x1 t_3) t_0))
(t_6 (* x1 (* x1 x1)))
(t_7 (+ 3.0 t_5)))
(if (<= x1 -7.1e+106)
t_1
(if (<= x1 -0.021)
(+
x1
(+
9.0
(+
x1
(-
t_6
(-
(* t_2 t_5)
(*
(- -1.0 (* x1 x1))
(+
(*
(* x1 x1)
(-
6.0
(* 4.0 (+ 3.0 (/ (+ -1.0 (/ (- (* 2.0 x2) 3.0) x1)) x1)))))
(* (* (* x1 2.0) t_4) t_7))))))))
(if (<= x1 6.4e+49)
(-
x1
(-
(* 3.0 (/ (- x1 (- t_2 (* 2.0 x2))) t_0))
(+
x1
(+
t_6
(-
(* t_2 t_4)
(*
t_0
(+
(* (* x1 x1) (+ 6.0 (* 4.0 t_5)))
(* (* (* x1 2.0) (- (* 2.0 x2) x1)) t_7))))))))
t_1)))))
double code(double x1, double x2) {
double t_0 = (x1 * x1) + 1.0;
double t_1 = x1 + ((x1 + (6.0 * pow(x1, 4.0))) + 9.0);
double t_2 = x1 * (x1 * 3.0);
double t_3 = t_2 + (2.0 * x2);
double t_4 = (t_3 - x1) / t_0;
double t_5 = (x1 - t_3) / t_0;
double t_6 = x1 * (x1 * x1);
double t_7 = 3.0 + t_5;
double tmp;
if (x1 <= -7.1e+106) {
tmp = t_1;
} else if (x1 <= -0.021) {
tmp = x1 + (9.0 + (x1 + (t_6 - ((t_2 * t_5) - ((-1.0 - (x1 * x1)) * (((x1 * x1) * (6.0 - (4.0 * (3.0 + ((-1.0 + (((2.0 * x2) - 3.0) / x1)) / x1))))) + (((x1 * 2.0) * t_4) * t_7)))))));
} else if (x1 <= 6.4e+49) {
tmp = x1 - ((3.0 * ((x1 - (t_2 - (2.0 * x2))) / t_0)) - (x1 + (t_6 + ((t_2 * t_4) - (t_0 * (((x1 * x1) * (6.0 + (4.0 * t_5))) + (((x1 * 2.0) * ((2.0 * x2) - x1)) * t_7)))))));
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
real(8) :: t_0
real(8) :: t_1
real(8) :: t_2
real(8) :: t_3
real(8) :: t_4
real(8) :: t_5
real(8) :: t_6
real(8) :: t_7
real(8) :: tmp
t_0 = (x1 * x1) + 1.0d0
t_1 = x1 + ((x1 + (6.0d0 * (x1 ** 4.0d0))) + 9.0d0)
t_2 = x1 * (x1 * 3.0d0)
t_3 = t_2 + (2.0d0 * x2)
t_4 = (t_3 - x1) / t_0
t_5 = (x1 - t_3) / t_0
t_6 = x1 * (x1 * x1)
t_7 = 3.0d0 + t_5
if (x1 <= (-7.1d+106)) then
tmp = t_1
else if (x1 <= (-0.021d0)) then
tmp = x1 + (9.0d0 + (x1 + (t_6 - ((t_2 * t_5) - (((-1.0d0) - (x1 * x1)) * (((x1 * x1) * (6.0d0 - (4.0d0 * (3.0d0 + (((-1.0d0) + (((2.0d0 * x2) - 3.0d0) / x1)) / x1))))) + (((x1 * 2.0d0) * t_4) * t_7)))))))
else if (x1 <= 6.4d+49) then
tmp = x1 - ((3.0d0 * ((x1 - (t_2 - (2.0d0 * x2))) / t_0)) - (x1 + (t_6 + ((t_2 * t_4) - (t_0 * (((x1 * x1) * (6.0d0 + (4.0d0 * t_5))) + (((x1 * 2.0d0) * ((2.0d0 * x2) - x1)) * t_7)))))))
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x1, double x2) {
double t_0 = (x1 * x1) + 1.0;
double t_1 = x1 + ((x1 + (6.0 * Math.pow(x1, 4.0))) + 9.0);
double t_2 = x1 * (x1 * 3.0);
double t_3 = t_2 + (2.0 * x2);
double t_4 = (t_3 - x1) / t_0;
double t_5 = (x1 - t_3) / t_0;
double t_6 = x1 * (x1 * x1);
double t_7 = 3.0 + t_5;
double tmp;
if (x1 <= -7.1e+106) {
tmp = t_1;
} else if (x1 <= -0.021) {
tmp = x1 + (9.0 + (x1 + (t_6 - ((t_2 * t_5) - ((-1.0 - (x1 * x1)) * (((x1 * x1) * (6.0 - (4.0 * (3.0 + ((-1.0 + (((2.0 * x2) - 3.0) / x1)) / x1))))) + (((x1 * 2.0) * t_4) * t_7)))))));
} else if (x1 <= 6.4e+49) {
tmp = x1 - ((3.0 * ((x1 - (t_2 - (2.0 * x2))) / t_0)) - (x1 + (t_6 + ((t_2 * t_4) - (t_0 * (((x1 * x1) * (6.0 + (4.0 * t_5))) + (((x1 * 2.0) * ((2.0 * x2) - x1)) * t_7)))))));
} else {
tmp = t_1;
}
return tmp;
}
def code(x1, x2): t_0 = (x1 * x1) + 1.0 t_1 = x1 + ((x1 + (6.0 * math.pow(x1, 4.0))) + 9.0) t_2 = x1 * (x1 * 3.0) t_3 = t_2 + (2.0 * x2) t_4 = (t_3 - x1) / t_0 t_5 = (x1 - t_3) / t_0 t_6 = x1 * (x1 * x1) t_7 = 3.0 + t_5 tmp = 0 if x1 <= -7.1e+106: tmp = t_1 elif x1 <= -0.021: tmp = x1 + (9.0 + (x1 + (t_6 - ((t_2 * t_5) - ((-1.0 - (x1 * x1)) * (((x1 * x1) * (6.0 - (4.0 * (3.0 + ((-1.0 + (((2.0 * x2) - 3.0) / x1)) / x1))))) + (((x1 * 2.0) * t_4) * t_7))))))) elif x1 <= 6.4e+49: tmp = x1 - ((3.0 * ((x1 - (t_2 - (2.0 * x2))) / t_0)) - (x1 + (t_6 + ((t_2 * t_4) - (t_0 * (((x1 * x1) * (6.0 + (4.0 * t_5))) + (((x1 * 2.0) * ((2.0 * x2) - x1)) * t_7))))))) else: tmp = t_1 return tmp
function code(x1, x2) t_0 = Float64(Float64(x1 * x1) + 1.0) t_1 = Float64(x1 + Float64(Float64(x1 + Float64(6.0 * (x1 ^ 4.0))) + 9.0)) t_2 = Float64(x1 * Float64(x1 * 3.0)) t_3 = Float64(t_2 + Float64(2.0 * x2)) t_4 = Float64(Float64(t_3 - x1) / t_0) t_5 = Float64(Float64(x1 - t_3) / t_0) t_6 = Float64(x1 * Float64(x1 * x1)) t_7 = Float64(3.0 + t_5) tmp = 0.0 if (x1 <= -7.1e+106) tmp = t_1; elseif (x1 <= -0.021) tmp = Float64(x1 + Float64(9.0 + Float64(x1 + Float64(t_6 - Float64(Float64(t_2 * t_5) - Float64(Float64(-1.0 - Float64(x1 * x1)) * Float64(Float64(Float64(x1 * x1) * Float64(6.0 - Float64(4.0 * Float64(3.0 + Float64(Float64(-1.0 + Float64(Float64(Float64(2.0 * x2) - 3.0) / x1)) / x1))))) + Float64(Float64(Float64(x1 * 2.0) * t_4) * t_7)))))))); elseif (x1 <= 6.4e+49) tmp = Float64(x1 - Float64(Float64(3.0 * Float64(Float64(x1 - Float64(t_2 - Float64(2.0 * x2))) / t_0)) - Float64(x1 + Float64(t_6 + Float64(Float64(t_2 * t_4) - Float64(t_0 * Float64(Float64(Float64(x1 * x1) * Float64(6.0 + Float64(4.0 * t_5))) + Float64(Float64(Float64(x1 * 2.0) * Float64(Float64(2.0 * x2) - x1)) * t_7)))))))); else tmp = t_1; end return tmp end
function tmp_2 = code(x1, x2) t_0 = (x1 * x1) + 1.0; t_1 = x1 + ((x1 + (6.0 * (x1 ^ 4.0))) + 9.0); t_2 = x1 * (x1 * 3.0); t_3 = t_2 + (2.0 * x2); t_4 = (t_3 - x1) / t_0; t_5 = (x1 - t_3) / t_0; t_6 = x1 * (x1 * x1); t_7 = 3.0 + t_5; tmp = 0.0; if (x1 <= -7.1e+106) tmp = t_1; elseif (x1 <= -0.021) tmp = x1 + (9.0 + (x1 + (t_6 - ((t_2 * t_5) - ((-1.0 - (x1 * x1)) * (((x1 * x1) * (6.0 - (4.0 * (3.0 + ((-1.0 + (((2.0 * x2) - 3.0) / x1)) / x1))))) + (((x1 * 2.0) * t_4) * t_7))))))); elseif (x1 <= 6.4e+49) tmp = x1 - ((3.0 * ((x1 - (t_2 - (2.0 * x2))) / t_0)) - (x1 + (t_6 + ((t_2 * t_4) - (t_0 * (((x1 * x1) * (6.0 + (4.0 * t_5))) + (((x1 * 2.0) * ((2.0 * x2) - x1)) * t_7))))))); else tmp = t_1; end tmp_2 = tmp; end
code[x1_, x2_] := Block[{t$95$0 = N[(N[(x1 * x1), $MachinePrecision] + 1.0), $MachinePrecision]}, Block[{t$95$1 = N[(x1 + N[(N[(x1 + N[(6.0 * N[Power[x1, 4.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + 9.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x1 * N[(x1 * 3.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(t$95$2 + N[(2.0 * x2), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[(N[(t$95$3 - x1), $MachinePrecision] / t$95$0), $MachinePrecision]}, Block[{t$95$5 = N[(N[(x1 - t$95$3), $MachinePrecision] / t$95$0), $MachinePrecision]}, Block[{t$95$6 = N[(x1 * N[(x1 * x1), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$7 = N[(3.0 + t$95$5), $MachinePrecision]}, If[LessEqual[x1, -7.1e+106], t$95$1, If[LessEqual[x1, -0.021], N[(x1 + N[(9.0 + N[(x1 + N[(t$95$6 - N[(N[(t$95$2 * t$95$5), $MachinePrecision] - N[(N[(-1.0 - N[(x1 * x1), $MachinePrecision]), $MachinePrecision] * N[(N[(N[(x1 * x1), $MachinePrecision] * N[(6.0 - N[(4.0 * N[(3.0 + N[(N[(-1.0 + N[(N[(N[(2.0 * x2), $MachinePrecision] - 3.0), $MachinePrecision] / x1), $MachinePrecision]), $MachinePrecision] / x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(N[(x1 * 2.0), $MachinePrecision] * t$95$4), $MachinePrecision] * t$95$7), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 6.4e+49], N[(x1 - N[(N[(3.0 * N[(N[(x1 - N[(t$95$2 - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / t$95$0), $MachinePrecision]), $MachinePrecision] - N[(x1 + N[(t$95$6 + N[(N[(t$95$2 * t$95$4), $MachinePrecision] - N[(t$95$0 * N[(N[(N[(x1 * x1), $MachinePrecision] * N[(6.0 + N[(4.0 * t$95$5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(N[(x1 * 2.0), $MachinePrecision] * N[(N[(2.0 * x2), $MachinePrecision] - x1), $MachinePrecision]), $MachinePrecision] * t$95$7), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x1 \cdot x1 + 1\\
t_1 := x1 + \left(\left(x1 + 6 \cdot {x1}^{4}\right) + 9\right)\\
t_2 := x1 \cdot \left(x1 \cdot 3\right)\\
t_3 := t\_2 + 2 \cdot x2\\
t_4 := \frac{t\_3 - x1}{t\_0}\\
t_5 := \frac{x1 - t\_3}{t\_0}\\
t_6 := x1 \cdot \left(x1 \cdot x1\right)\\
t_7 := 3 + t\_5\\
\mathbf{if}\;x1 \leq -7.1 \cdot 10^{+106}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;x1 \leq -0.021:\\
\;\;\;\;x1 + \left(9 + \left(x1 + \left(t\_6 - \left(t\_2 \cdot t\_5 - \left(-1 - x1 \cdot x1\right) \cdot \left(\left(x1 \cdot x1\right) \cdot \left(6 - 4 \cdot \left(3 + \frac{-1 + \frac{2 \cdot x2 - 3}{x1}}{x1}\right)\right) + \left(\left(x1 \cdot 2\right) \cdot t\_4\right) \cdot t\_7\right)\right)\right)\right)\right)\\
\mathbf{elif}\;x1 \leq 6.4 \cdot 10^{+49}:\\
\;\;\;\;x1 - \left(3 \cdot \frac{x1 - \left(t\_2 - 2 \cdot x2\right)}{t\_0} - \left(x1 + \left(t\_6 + \left(t\_2 \cdot t\_4 - t\_0 \cdot \left(\left(x1 \cdot x1\right) \cdot \left(6 + 4 \cdot t\_5\right) + \left(\left(x1 \cdot 2\right) \cdot \left(2 \cdot x2 - x1\right)\right) \cdot t\_7\right)\right)\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if x1 < -7.1000000000000003e106 or 6.40000000000000028e49 < x1 Initial program 26.1%
Taylor expanded in x1 around -inf 30.3%
Taylor expanded in x1 around inf 28.3%
Taylor expanded in x1 around inf 97.0%
if -7.1000000000000003e106 < x1 < -0.0210000000000000013Initial program 99.0%
Taylor expanded in x1 around -inf 99.2%
Taylor expanded in x1 around inf 99.2%
if -0.0210000000000000013 < x1 < 6.40000000000000028e49Initial program 99.3%
Taylor expanded in x1 around 0 96.7%
Final simplification97.1%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (+ x1 (+ x1 (* 3.0 (* x1 (+ (* x1 3.0) -1.0))))))
(t_1 (* x1 (* x1 3.0)))
(t_2 (+ t_1 (* 2.0 x2)))
(t_3 (+ (* x1 x1) 1.0))
(t_4 (/ (- x1 t_2) t_3))
(t_5
(+
x1
(+
9.0
(+
x1
(-
(* x1 (* x1 x1))
(-
(* t_1 t_4)
(*
(- -1.0 (* x1 x1))
(+
(*
(* x1 x1)
(-
6.0
(* 4.0 (+ 3.0 (/ (+ -1.0 (/ (- (* 2.0 x2) 3.0) x1)) x1)))))
(* (* (* x1 2.0) (/ (- t_2 x1) t_3)) (+ 3.0 t_4)))))))))))
(if (<= x1 -2.2e+140)
t_0
(if (<= x1 -0.016)
t_5
(if (<= x1 0.001)
(+
x1
(+
(* 3.0 (- (* x2 -2.0) (* x1 (- (* x1 (- (* x2 -2.0) 3.0)) -1.0))))
(+ x1 (* x2 (+ (* x1 -12.0) (* 8.0 (* x1 x2)))))))
(if (<= x1 5e+152) t_5 t_0))))))
double code(double x1, double x2) {
double t_0 = x1 + (x1 + (3.0 * (x1 * ((x1 * 3.0) + -1.0))));
double t_1 = x1 * (x1 * 3.0);
double t_2 = t_1 + (2.0 * x2);
double t_3 = (x1 * x1) + 1.0;
double t_4 = (x1 - t_2) / t_3;
double t_5 = x1 + (9.0 + (x1 + ((x1 * (x1 * x1)) - ((t_1 * t_4) - ((-1.0 - (x1 * x1)) * (((x1 * x1) * (6.0 - (4.0 * (3.0 + ((-1.0 + (((2.0 * x2) - 3.0) / x1)) / x1))))) + (((x1 * 2.0) * ((t_2 - x1) / t_3)) * (3.0 + t_4))))))));
double tmp;
if (x1 <= -2.2e+140) {
tmp = t_0;
} else if (x1 <= -0.016) {
tmp = t_5;
} else if (x1 <= 0.001) {
tmp = x1 + ((3.0 * ((x2 * -2.0) - (x1 * ((x1 * ((x2 * -2.0) - 3.0)) - -1.0)))) + (x1 + (x2 * ((x1 * -12.0) + (8.0 * (x1 * x2))))));
} else if (x1 <= 5e+152) {
tmp = t_5;
} 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) :: t_5
real(8) :: tmp
t_0 = x1 + (x1 + (3.0d0 * (x1 * ((x1 * 3.0d0) + (-1.0d0)))))
t_1 = x1 * (x1 * 3.0d0)
t_2 = t_1 + (2.0d0 * x2)
t_3 = (x1 * x1) + 1.0d0
t_4 = (x1 - t_2) / t_3
t_5 = x1 + (9.0d0 + (x1 + ((x1 * (x1 * x1)) - ((t_1 * t_4) - (((-1.0d0) - (x1 * x1)) * (((x1 * x1) * (6.0d0 - (4.0d0 * (3.0d0 + (((-1.0d0) + (((2.0d0 * x2) - 3.0d0) / x1)) / x1))))) + (((x1 * 2.0d0) * ((t_2 - x1) / t_3)) * (3.0d0 + t_4))))))))
if (x1 <= (-2.2d+140)) then
tmp = t_0
else if (x1 <= (-0.016d0)) then
tmp = t_5
else if (x1 <= 0.001d0) then
tmp = x1 + ((3.0d0 * ((x2 * (-2.0d0)) - (x1 * ((x1 * ((x2 * (-2.0d0)) - 3.0d0)) - (-1.0d0))))) + (x1 + (x2 * ((x1 * (-12.0d0)) + (8.0d0 * (x1 * x2))))))
else if (x1 <= 5d+152) then
tmp = t_5
else
tmp = t_0
end if
code = tmp
end function
public static double code(double x1, double x2) {
double t_0 = x1 + (x1 + (3.0 * (x1 * ((x1 * 3.0) + -1.0))));
double t_1 = x1 * (x1 * 3.0);
double t_2 = t_1 + (2.0 * x2);
double t_3 = (x1 * x1) + 1.0;
double t_4 = (x1 - t_2) / t_3;
double t_5 = x1 + (9.0 + (x1 + ((x1 * (x1 * x1)) - ((t_1 * t_4) - ((-1.0 - (x1 * x1)) * (((x1 * x1) * (6.0 - (4.0 * (3.0 + ((-1.0 + (((2.0 * x2) - 3.0) / x1)) / x1))))) + (((x1 * 2.0) * ((t_2 - x1) / t_3)) * (3.0 + t_4))))))));
double tmp;
if (x1 <= -2.2e+140) {
tmp = t_0;
} else if (x1 <= -0.016) {
tmp = t_5;
} else if (x1 <= 0.001) {
tmp = x1 + ((3.0 * ((x2 * -2.0) - (x1 * ((x1 * ((x2 * -2.0) - 3.0)) - -1.0)))) + (x1 + (x2 * ((x1 * -12.0) + (8.0 * (x1 * x2))))));
} else if (x1 <= 5e+152) {
tmp = t_5;
} else {
tmp = t_0;
}
return tmp;
}
def code(x1, x2): t_0 = x1 + (x1 + (3.0 * (x1 * ((x1 * 3.0) + -1.0)))) t_1 = x1 * (x1 * 3.0) t_2 = t_1 + (2.0 * x2) t_3 = (x1 * x1) + 1.0 t_4 = (x1 - t_2) / t_3 t_5 = x1 + (9.0 + (x1 + ((x1 * (x1 * x1)) - ((t_1 * t_4) - ((-1.0 - (x1 * x1)) * (((x1 * x1) * (6.0 - (4.0 * (3.0 + ((-1.0 + (((2.0 * x2) - 3.0) / x1)) / x1))))) + (((x1 * 2.0) * ((t_2 - x1) / t_3)) * (3.0 + t_4)))))))) tmp = 0 if x1 <= -2.2e+140: tmp = t_0 elif x1 <= -0.016: tmp = t_5 elif x1 <= 0.001: tmp = x1 + ((3.0 * ((x2 * -2.0) - (x1 * ((x1 * ((x2 * -2.0) - 3.0)) - -1.0)))) + (x1 + (x2 * ((x1 * -12.0) + (8.0 * (x1 * x2)))))) elif x1 <= 5e+152: tmp = t_5 else: tmp = t_0 return tmp
function code(x1, x2) t_0 = Float64(x1 + Float64(x1 + Float64(3.0 * Float64(x1 * Float64(Float64(x1 * 3.0) + -1.0))))) t_1 = Float64(x1 * Float64(x1 * 3.0)) t_2 = Float64(t_1 + Float64(2.0 * x2)) t_3 = Float64(Float64(x1 * x1) + 1.0) t_4 = Float64(Float64(x1 - t_2) / t_3) t_5 = Float64(x1 + Float64(9.0 + Float64(x1 + Float64(Float64(x1 * Float64(x1 * x1)) - Float64(Float64(t_1 * t_4) - Float64(Float64(-1.0 - Float64(x1 * x1)) * Float64(Float64(Float64(x1 * x1) * Float64(6.0 - Float64(4.0 * Float64(3.0 + Float64(Float64(-1.0 + Float64(Float64(Float64(2.0 * x2) - 3.0) / x1)) / x1))))) + Float64(Float64(Float64(x1 * 2.0) * Float64(Float64(t_2 - x1) / t_3)) * Float64(3.0 + t_4))))))))) tmp = 0.0 if (x1 <= -2.2e+140) tmp = t_0; elseif (x1 <= -0.016) tmp = t_5; elseif (x1 <= 0.001) tmp = Float64(x1 + Float64(Float64(3.0 * Float64(Float64(x2 * -2.0) - Float64(x1 * Float64(Float64(x1 * Float64(Float64(x2 * -2.0) - 3.0)) - -1.0)))) + Float64(x1 + Float64(x2 * Float64(Float64(x1 * -12.0) + Float64(8.0 * Float64(x1 * x2))))))); elseif (x1 <= 5e+152) tmp = t_5; else tmp = t_0; end return tmp end
function tmp_2 = code(x1, x2) t_0 = x1 + (x1 + (3.0 * (x1 * ((x1 * 3.0) + -1.0)))); t_1 = x1 * (x1 * 3.0); t_2 = t_1 + (2.0 * x2); t_3 = (x1 * x1) + 1.0; t_4 = (x1 - t_2) / t_3; t_5 = x1 + (9.0 + (x1 + ((x1 * (x1 * x1)) - ((t_1 * t_4) - ((-1.0 - (x1 * x1)) * (((x1 * x1) * (6.0 - (4.0 * (3.0 + ((-1.0 + (((2.0 * x2) - 3.0) / x1)) / x1))))) + (((x1 * 2.0) * ((t_2 - x1) / t_3)) * (3.0 + t_4)))))))); tmp = 0.0; if (x1 <= -2.2e+140) tmp = t_0; elseif (x1 <= -0.016) tmp = t_5; elseif (x1 <= 0.001) tmp = x1 + ((3.0 * ((x2 * -2.0) - (x1 * ((x1 * ((x2 * -2.0) - 3.0)) - -1.0)))) + (x1 + (x2 * ((x1 * -12.0) + (8.0 * (x1 * x2)))))); elseif (x1 <= 5e+152) tmp = t_5; else tmp = t_0; end tmp_2 = tmp; end
code[x1_, x2_] := Block[{t$95$0 = N[(x1 + N[(x1 + N[(3.0 * N[(x1 * N[(N[(x1 * 3.0), $MachinePrecision] + -1.0), $MachinePrecision]), $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[(N[(x1 * x1), $MachinePrecision] + 1.0), $MachinePrecision]}, Block[{t$95$4 = N[(N[(x1 - t$95$2), $MachinePrecision] / t$95$3), $MachinePrecision]}, Block[{t$95$5 = N[(x1 + N[(9.0 + N[(x1 + N[(N[(x1 * N[(x1 * x1), $MachinePrecision]), $MachinePrecision] - N[(N[(t$95$1 * t$95$4), $MachinePrecision] - N[(N[(-1.0 - N[(x1 * x1), $MachinePrecision]), $MachinePrecision] * N[(N[(N[(x1 * x1), $MachinePrecision] * N[(6.0 - N[(4.0 * N[(3.0 + N[(N[(-1.0 + N[(N[(N[(2.0 * x2), $MachinePrecision] - 3.0), $MachinePrecision] / x1), $MachinePrecision]), $MachinePrecision] / x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(N[(x1 * 2.0), $MachinePrecision] * N[(N[(t$95$2 - x1), $MachinePrecision] / t$95$3), $MachinePrecision]), $MachinePrecision] * N[(3.0 + t$95$4), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x1, -2.2e+140], t$95$0, If[LessEqual[x1, -0.016], t$95$5, If[LessEqual[x1, 0.001], N[(x1 + N[(N[(3.0 * N[(N[(x2 * -2.0), $MachinePrecision] - N[(x1 * N[(N[(x1 * N[(N[(x2 * -2.0), $MachinePrecision] - 3.0), $MachinePrecision]), $MachinePrecision] - -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(x1 + N[(x2 * N[(N[(x1 * -12.0), $MachinePrecision] + N[(8.0 * N[(x1 * x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 5e+152], t$95$5, t$95$0]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x1 + \left(x1 + 3 \cdot \left(x1 \cdot \left(x1 \cdot 3 + -1\right)\right)\right)\\
t_1 := x1 \cdot \left(x1 \cdot 3\right)\\
t_2 := t\_1 + 2 \cdot x2\\
t_3 := x1 \cdot x1 + 1\\
t_4 := \frac{x1 - t\_2}{t\_3}\\
t_5 := x1 + \left(9 + \left(x1 + \left(x1 \cdot \left(x1 \cdot x1\right) - \left(t\_1 \cdot t\_4 - \left(-1 - x1 \cdot x1\right) \cdot \left(\left(x1 \cdot x1\right) \cdot \left(6 - 4 \cdot \left(3 + \frac{-1 + \frac{2 \cdot x2 - 3}{x1}}{x1}\right)\right) + \left(\left(x1 \cdot 2\right) \cdot \frac{t\_2 - x1}{t\_3}\right) \cdot \left(3 + t\_4\right)\right)\right)\right)\right)\right)\\
\mathbf{if}\;x1 \leq -2.2 \cdot 10^{+140}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;x1 \leq -0.016:\\
\;\;\;\;t\_5\\
\mathbf{elif}\;x1 \leq 0.001:\\
\;\;\;\;x1 + \left(3 \cdot \left(x2 \cdot -2 - x1 \cdot \left(x1 \cdot \left(x2 \cdot -2 - 3\right) - -1\right)\right) + \left(x1 + x2 \cdot \left(x1 \cdot -12 + 8 \cdot \left(x1 \cdot x2\right)\right)\right)\right)\\
\mathbf{elif}\;x1 \leq 5 \cdot 10^{+152}:\\
\;\;\;\;t\_5\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
if x1 < -2.1999999999999998e140 or 5e152 < x1 Initial program 0.0%
Taylor expanded in x1 around 0 0.0%
Taylor expanded in x1 around 0 69.1%
Taylor expanded in x2 around 0 100.0%
if -2.1999999999999998e140 < x1 < -0.016 or 1e-3 < x1 < 5e152Initial program 92.4%
Taylor expanded in x1 around -inf 91.8%
Taylor expanded in x1 around inf 91.8%
if -0.016 < x1 < 1e-3Initial program 99.3%
Taylor expanded in x1 around 0 87.5%
Taylor expanded in x1 around 0 87.6%
Taylor expanded in x2 around 0 98.8%
Final simplification97.2%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (+ (* x1 x1) 1.0))
(t_1 (+ x1 (+ x1 (* 3.0 (* x1 (+ (* x1 3.0) -1.0))))))
(t_2 (* x1 (* x1 3.0)))
(t_3 (+ t_2 (* 2.0 x2)))
(t_4 (/ (- x1 t_3) t_0))
(t_5
(+
x1
(-
(* x2 -6.0)
(-
(-
(+
(* t_2 t_4)
(*
t_0
(+
(*
(* (* x1 2.0) (/ (- t_3 x1) t_0))
(/ (- (+ 1.0 (/ 3.0 x1)) (/ (* 2.0 x2) x1)) x1))
(* (* x1 x1) (+ 6.0 (* 4.0 t_4))))))
(* x1 (* x1 x1)))
x1)))))
(if (<= x1 -3.2e+140)
t_1
(if (<= x1 -0.75)
t_5
(if (<= x1 0.33)
(+
x1
(+
(* 3.0 (- (* x2 -2.0) (* x1 (- (* x1 (- (* x2 -2.0) 3.0)) -1.0))))
(+ x1 (* x2 (+ (* x1 -12.0) (* 8.0 (* x1 x2)))))))
(if (<= x1 5e+153) t_5 t_1))))))
double code(double x1, double x2) {
double t_0 = (x1 * x1) + 1.0;
double t_1 = x1 + (x1 + (3.0 * (x1 * ((x1 * 3.0) + -1.0))));
double t_2 = x1 * (x1 * 3.0);
double t_3 = t_2 + (2.0 * x2);
double t_4 = (x1 - t_3) / t_0;
double t_5 = x1 + ((x2 * -6.0) - ((((t_2 * t_4) + (t_0 * ((((x1 * 2.0) * ((t_3 - x1) / t_0)) * (((1.0 + (3.0 / x1)) - ((2.0 * x2) / x1)) / x1)) + ((x1 * x1) * (6.0 + (4.0 * t_4)))))) - (x1 * (x1 * x1))) - x1));
double tmp;
if (x1 <= -3.2e+140) {
tmp = t_1;
} else if (x1 <= -0.75) {
tmp = t_5;
} else if (x1 <= 0.33) {
tmp = x1 + ((3.0 * ((x2 * -2.0) - (x1 * ((x1 * ((x2 * -2.0) - 3.0)) - -1.0)))) + (x1 + (x2 * ((x1 * -12.0) + (8.0 * (x1 * x2))))));
} else if (x1 <= 5e+153) {
tmp = t_5;
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
real(8) :: t_0
real(8) :: t_1
real(8) :: t_2
real(8) :: t_3
real(8) :: t_4
real(8) :: t_5
real(8) :: tmp
t_0 = (x1 * x1) + 1.0d0
t_1 = x1 + (x1 + (3.0d0 * (x1 * ((x1 * 3.0d0) + (-1.0d0)))))
t_2 = x1 * (x1 * 3.0d0)
t_3 = t_2 + (2.0d0 * x2)
t_4 = (x1 - t_3) / t_0
t_5 = x1 + ((x2 * (-6.0d0)) - ((((t_2 * t_4) + (t_0 * ((((x1 * 2.0d0) * ((t_3 - x1) / t_0)) * (((1.0d0 + (3.0d0 / x1)) - ((2.0d0 * x2) / x1)) / x1)) + ((x1 * x1) * (6.0d0 + (4.0d0 * t_4)))))) - (x1 * (x1 * x1))) - x1))
if (x1 <= (-3.2d+140)) then
tmp = t_1
else if (x1 <= (-0.75d0)) then
tmp = t_5
else if (x1 <= 0.33d0) then
tmp = x1 + ((3.0d0 * ((x2 * (-2.0d0)) - (x1 * ((x1 * ((x2 * (-2.0d0)) - 3.0d0)) - (-1.0d0))))) + (x1 + (x2 * ((x1 * (-12.0d0)) + (8.0d0 * (x1 * x2))))))
else if (x1 <= 5d+153) then
tmp = t_5
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x1, double x2) {
double t_0 = (x1 * x1) + 1.0;
double t_1 = x1 + (x1 + (3.0 * (x1 * ((x1 * 3.0) + -1.0))));
double t_2 = x1 * (x1 * 3.0);
double t_3 = t_2 + (2.0 * x2);
double t_4 = (x1 - t_3) / t_0;
double t_5 = x1 + ((x2 * -6.0) - ((((t_2 * t_4) + (t_0 * ((((x1 * 2.0) * ((t_3 - x1) / t_0)) * (((1.0 + (3.0 / x1)) - ((2.0 * x2) / x1)) / x1)) + ((x1 * x1) * (6.0 + (4.0 * t_4)))))) - (x1 * (x1 * x1))) - x1));
double tmp;
if (x1 <= -3.2e+140) {
tmp = t_1;
} else if (x1 <= -0.75) {
tmp = t_5;
} else if (x1 <= 0.33) {
tmp = x1 + ((3.0 * ((x2 * -2.0) - (x1 * ((x1 * ((x2 * -2.0) - 3.0)) - -1.0)))) + (x1 + (x2 * ((x1 * -12.0) + (8.0 * (x1 * x2))))));
} else if (x1 <= 5e+153) {
tmp = t_5;
} else {
tmp = t_1;
}
return tmp;
}
def code(x1, x2): t_0 = (x1 * x1) + 1.0 t_1 = x1 + (x1 + (3.0 * (x1 * ((x1 * 3.0) + -1.0)))) t_2 = x1 * (x1 * 3.0) t_3 = t_2 + (2.0 * x2) t_4 = (x1 - t_3) / t_0 t_5 = x1 + ((x2 * -6.0) - ((((t_2 * t_4) + (t_0 * ((((x1 * 2.0) * ((t_3 - x1) / t_0)) * (((1.0 + (3.0 / x1)) - ((2.0 * x2) / x1)) / x1)) + ((x1 * x1) * (6.0 + (4.0 * t_4)))))) - (x1 * (x1 * x1))) - x1)) tmp = 0 if x1 <= -3.2e+140: tmp = t_1 elif x1 <= -0.75: tmp = t_5 elif x1 <= 0.33: tmp = x1 + ((3.0 * ((x2 * -2.0) - (x1 * ((x1 * ((x2 * -2.0) - 3.0)) - -1.0)))) + (x1 + (x2 * ((x1 * -12.0) + (8.0 * (x1 * x2)))))) elif x1 <= 5e+153: tmp = t_5 else: tmp = t_1 return tmp
function code(x1, x2) t_0 = Float64(Float64(x1 * x1) + 1.0) t_1 = Float64(x1 + Float64(x1 + Float64(3.0 * Float64(x1 * Float64(Float64(x1 * 3.0) + -1.0))))) t_2 = Float64(x1 * Float64(x1 * 3.0)) t_3 = Float64(t_2 + Float64(2.0 * x2)) t_4 = Float64(Float64(x1 - t_3) / t_0) t_5 = Float64(x1 + Float64(Float64(x2 * -6.0) - Float64(Float64(Float64(Float64(t_2 * t_4) + Float64(t_0 * Float64(Float64(Float64(Float64(x1 * 2.0) * Float64(Float64(t_3 - x1) / t_0)) * Float64(Float64(Float64(1.0 + Float64(3.0 / x1)) - Float64(Float64(2.0 * x2) / x1)) / x1)) + Float64(Float64(x1 * x1) * Float64(6.0 + Float64(4.0 * t_4)))))) - Float64(x1 * Float64(x1 * x1))) - x1))) tmp = 0.0 if (x1 <= -3.2e+140) tmp = t_1; elseif (x1 <= -0.75) tmp = t_5; elseif (x1 <= 0.33) tmp = Float64(x1 + Float64(Float64(3.0 * Float64(Float64(x2 * -2.0) - Float64(x1 * Float64(Float64(x1 * Float64(Float64(x2 * -2.0) - 3.0)) - -1.0)))) + Float64(x1 + Float64(x2 * Float64(Float64(x1 * -12.0) + Float64(8.0 * Float64(x1 * x2))))))); elseif (x1 <= 5e+153) tmp = t_5; else tmp = t_1; end return tmp end
function tmp_2 = code(x1, x2) t_0 = (x1 * x1) + 1.0; t_1 = x1 + (x1 + (3.0 * (x1 * ((x1 * 3.0) + -1.0)))); t_2 = x1 * (x1 * 3.0); t_3 = t_2 + (2.0 * x2); t_4 = (x1 - t_3) / t_0; t_5 = x1 + ((x2 * -6.0) - ((((t_2 * t_4) + (t_0 * ((((x1 * 2.0) * ((t_3 - x1) / t_0)) * (((1.0 + (3.0 / x1)) - ((2.0 * x2) / x1)) / x1)) + ((x1 * x1) * (6.0 + (4.0 * t_4)))))) - (x1 * (x1 * x1))) - x1)); tmp = 0.0; if (x1 <= -3.2e+140) tmp = t_1; elseif (x1 <= -0.75) tmp = t_5; elseif (x1 <= 0.33) tmp = x1 + ((3.0 * ((x2 * -2.0) - (x1 * ((x1 * ((x2 * -2.0) - 3.0)) - -1.0)))) + (x1 + (x2 * ((x1 * -12.0) + (8.0 * (x1 * x2)))))); elseif (x1 <= 5e+153) tmp = t_5; else tmp = t_1; end tmp_2 = tmp; end
code[x1_, x2_] := Block[{t$95$0 = N[(N[(x1 * x1), $MachinePrecision] + 1.0), $MachinePrecision]}, Block[{t$95$1 = N[(x1 + N[(x1 + N[(3.0 * N[(x1 * N[(N[(x1 * 3.0), $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x1 * N[(x1 * 3.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(t$95$2 + N[(2.0 * x2), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[(N[(x1 - t$95$3), $MachinePrecision] / t$95$0), $MachinePrecision]}, Block[{t$95$5 = N[(x1 + N[(N[(x2 * -6.0), $MachinePrecision] - N[(N[(N[(N[(t$95$2 * t$95$4), $MachinePrecision] + N[(t$95$0 * N[(N[(N[(N[(x1 * 2.0), $MachinePrecision] * N[(N[(t$95$3 - x1), $MachinePrecision] / t$95$0), $MachinePrecision]), $MachinePrecision] * N[(N[(N[(1.0 + N[(3.0 / x1), $MachinePrecision]), $MachinePrecision] - N[(N[(2.0 * x2), $MachinePrecision] / x1), $MachinePrecision]), $MachinePrecision] / x1), $MachinePrecision]), $MachinePrecision] + N[(N[(x1 * x1), $MachinePrecision] * N[(6.0 + N[(4.0 * t$95$4), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(x1 * N[(x1 * x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x1, -3.2e+140], t$95$1, If[LessEqual[x1, -0.75], t$95$5, If[LessEqual[x1, 0.33], N[(x1 + N[(N[(3.0 * N[(N[(x2 * -2.0), $MachinePrecision] - N[(x1 * N[(N[(x1 * N[(N[(x2 * -2.0), $MachinePrecision] - 3.0), $MachinePrecision]), $MachinePrecision] - -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(x1 + N[(x2 * N[(N[(x1 * -12.0), $MachinePrecision] + N[(8.0 * N[(x1 * x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 5e+153], t$95$5, t$95$1]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x1 \cdot x1 + 1\\
t_1 := x1 + \left(x1 + 3 \cdot \left(x1 \cdot \left(x1 \cdot 3 + -1\right)\right)\right)\\
t_2 := x1 \cdot \left(x1 \cdot 3\right)\\
t_3 := t\_2 + 2 \cdot x2\\
t_4 := \frac{x1 - t\_3}{t\_0}\\
t_5 := x1 + \left(x2 \cdot -6 - \left(\left(\left(t\_2 \cdot t\_4 + t\_0 \cdot \left(\left(\left(x1 \cdot 2\right) \cdot \frac{t\_3 - x1}{t\_0}\right) \cdot \frac{\left(1 + \frac{3}{x1}\right) - \frac{2 \cdot x2}{x1}}{x1} + \left(x1 \cdot x1\right) \cdot \left(6 + 4 \cdot t\_4\right)\right)\right) - x1 \cdot \left(x1 \cdot x1\right)\right) - x1\right)\right)\\
\mathbf{if}\;x1 \leq -3.2 \cdot 10^{+140}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;x1 \leq -0.75:\\
\;\;\;\;t\_5\\
\mathbf{elif}\;x1 \leq 0.33:\\
\;\;\;\;x1 + \left(3 \cdot \left(x2 \cdot -2 - x1 \cdot \left(x1 \cdot \left(x2 \cdot -2 - 3\right) - -1\right)\right) + \left(x1 + x2 \cdot \left(x1 \cdot -12 + 8 \cdot \left(x1 \cdot x2\right)\right)\right)\right)\\
\mathbf{elif}\;x1 \leq 5 \cdot 10^{+153}:\\
\;\;\;\;t\_5\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if x1 < -3.20000000000000011e140 or 5.00000000000000018e153 < x1 Initial program 0.0%
Taylor expanded in x1 around 0 0.0%
Taylor expanded in x1 around 0 69.1%
Taylor expanded in x2 around 0 100.0%
if -3.20000000000000011e140 < x1 < -0.75 or 0.330000000000000016 < x1 < 5.00000000000000018e153Initial program 92.1%
Taylor expanded in x1 around 0 91.5%
*-commutative91.5%
Simplified91.5%
Taylor expanded in x1 around inf 91.5%
associate-*r/91.5%
associate-*r/91.5%
metadata-eval91.5%
Simplified91.5%
Taylor expanded in x2 around 0 91.5%
*-commutative91.5%
Simplified91.5%
if -0.75 < x1 < 0.330000000000000016Initial program 99.3%
Taylor expanded in x1 around 0 86.0%
Taylor expanded in x1 around 0 86.0%
Taylor expanded in x2 around 0 97.0%
Final simplification96.3%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (+ (* x1 x1) 1.0))
(t_1 (* 3.0 (* x2 -2.0)))
(t_2 (+ 3.0 (/ (+ -1.0 (/ (- (* 2.0 x2) 3.0) x1)) x1)))
(t_3 (+ x1 (+ x1 (* 3.0 (* x1 (+ (* x1 3.0) -1.0))))))
(t_4 (* x1 (* x1 3.0)))
(t_5 (+ t_4 (* 2.0 x2)))
(t_6 (/ (- t_5 x1) t_0))
(t_7 (/ (* 2.0 x2) x1))
(t_8 (* t_4 (/ (- x1 t_5) t_0)))
(t_9 (* x1 (* x1 x1))))
(if (<= x1 -2.2e+140)
t_3
(if (<= x1 -0.7)
(+
x1
(-
t_1
(-
(-
(+
t_8
(*
t_0
(+
(* (* (* x1 2.0) t_6) (/ (- (+ 1.0 (/ 3.0 x1)) t_7) x1))
(* (* x1 x1) (- 6.0 (* 4.0 t_2))))))
t_9)
x1)))
(if (<= x1 1.26)
(+
x1
(+
(* 3.0 (- (* x2 -2.0) (* x1 (- (* x1 (- (* x2 -2.0) 3.0)) -1.0))))
(+ x1 (* x2 (+ (* x1 -12.0) (* 8.0 (* x1 x2)))))))
(if (<= x1 5e+152)
(+
x1
(+
t_1
(+
x1
(-
t_9
(-
t_8
(*
t_0
(+
(* (* x1 x1) (- (* t_6 4.0) 6.0))
(*
(/ (+ t_7 (- -1.0 (/ 3.0 x1))) x1)
(* (* x1 2.0) t_2)))))))))
t_3))))))
double code(double x1, double x2) {
double t_0 = (x1 * x1) + 1.0;
double t_1 = 3.0 * (x2 * -2.0);
double t_2 = 3.0 + ((-1.0 + (((2.0 * x2) - 3.0) / x1)) / x1);
double t_3 = x1 + (x1 + (3.0 * (x1 * ((x1 * 3.0) + -1.0))));
double t_4 = x1 * (x1 * 3.0);
double t_5 = t_4 + (2.0 * x2);
double t_6 = (t_5 - x1) / t_0;
double t_7 = (2.0 * x2) / x1;
double t_8 = t_4 * ((x1 - t_5) / t_0);
double t_9 = x1 * (x1 * x1);
double tmp;
if (x1 <= -2.2e+140) {
tmp = t_3;
} else if (x1 <= -0.7) {
tmp = x1 + (t_1 - (((t_8 + (t_0 * ((((x1 * 2.0) * t_6) * (((1.0 + (3.0 / x1)) - t_7) / x1)) + ((x1 * x1) * (6.0 - (4.0 * t_2)))))) - t_9) - x1));
} else if (x1 <= 1.26) {
tmp = x1 + ((3.0 * ((x2 * -2.0) - (x1 * ((x1 * ((x2 * -2.0) - 3.0)) - -1.0)))) + (x1 + (x2 * ((x1 * -12.0) + (8.0 * (x1 * x2))))));
} else if (x1 <= 5e+152) {
tmp = x1 + (t_1 + (x1 + (t_9 - (t_8 - (t_0 * (((x1 * x1) * ((t_6 * 4.0) - 6.0)) + (((t_7 + (-1.0 - (3.0 / x1))) / x1) * ((x1 * 2.0) * t_2))))))));
} else {
tmp = 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) :: t_4
real(8) :: t_5
real(8) :: t_6
real(8) :: t_7
real(8) :: t_8
real(8) :: t_9
real(8) :: tmp
t_0 = (x1 * x1) + 1.0d0
t_1 = 3.0d0 * (x2 * (-2.0d0))
t_2 = 3.0d0 + (((-1.0d0) + (((2.0d0 * x2) - 3.0d0) / x1)) / x1)
t_3 = x1 + (x1 + (3.0d0 * (x1 * ((x1 * 3.0d0) + (-1.0d0)))))
t_4 = x1 * (x1 * 3.0d0)
t_5 = t_4 + (2.0d0 * x2)
t_6 = (t_5 - x1) / t_0
t_7 = (2.0d0 * x2) / x1
t_8 = t_4 * ((x1 - t_5) / t_0)
t_9 = x1 * (x1 * x1)
if (x1 <= (-2.2d+140)) then
tmp = t_3
else if (x1 <= (-0.7d0)) then
tmp = x1 + (t_1 - (((t_8 + (t_0 * ((((x1 * 2.0d0) * t_6) * (((1.0d0 + (3.0d0 / x1)) - t_7) / x1)) + ((x1 * x1) * (6.0d0 - (4.0d0 * t_2)))))) - t_9) - x1))
else if (x1 <= 1.26d0) then
tmp = x1 + ((3.0d0 * ((x2 * (-2.0d0)) - (x1 * ((x1 * ((x2 * (-2.0d0)) - 3.0d0)) - (-1.0d0))))) + (x1 + (x2 * ((x1 * (-12.0d0)) + (8.0d0 * (x1 * x2))))))
else if (x1 <= 5d+152) then
tmp = x1 + (t_1 + (x1 + (t_9 - (t_8 - (t_0 * (((x1 * x1) * ((t_6 * 4.0d0) - 6.0d0)) + (((t_7 + ((-1.0d0) - (3.0d0 / x1))) / x1) * ((x1 * 2.0d0) * t_2))))))))
else
tmp = t_3
end if
code = tmp
end function
public static double code(double x1, double x2) {
double t_0 = (x1 * x1) + 1.0;
double t_1 = 3.0 * (x2 * -2.0);
double t_2 = 3.0 + ((-1.0 + (((2.0 * x2) - 3.0) / x1)) / x1);
double t_3 = x1 + (x1 + (3.0 * (x1 * ((x1 * 3.0) + -1.0))));
double t_4 = x1 * (x1 * 3.0);
double t_5 = t_4 + (2.0 * x2);
double t_6 = (t_5 - x1) / t_0;
double t_7 = (2.0 * x2) / x1;
double t_8 = t_4 * ((x1 - t_5) / t_0);
double t_9 = x1 * (x1 * x1);
double tmp;
if (x1 <= -2.2e+140) {
tmp = t_3;
} else if (x1 <= -0.7) {
tmp = x1 + (t_1 - (((t_8 + (t_0 * ((((x1 * 2.0) * t_6) * (((1.0 + (3.0 / x1)) - t_7) / x1)) + ((x1 * x1) * (6.0 - (4.0 * t_2)))))) - t_9) - x1));
} else if (x1 <= 1.26) {
tmp = x1 + ((3.0 * ((x2 * -2.0) - (x1 * ((x1 * ((x2 * -2.0) - 3.0)) - -1.0)))) + (x1 + (x2 * ((x1 * -12.0) + (8.0 * (x1 * x2))))));
} else if (x1 <= 5e+152) {
tmp = x1 + (t_1 + (x1 + (t_9 - (t_8 - (t_0 * (((x1 * x1) * ((t_6 * 4.0) - 6.0)) + (((t_7 + (-1.0 - (3.0 / x1))) / x1) * ((x1 * 2.0) * t_2))))))));
} else {
tmp = t_3;
}
return tmp;
}
def code(x1, x2): t_0 = (x1 * x1) + 1.0 t_1 = 3.0 * (x2 * -2.0) t_2 = 3.0 + ((-1.0 + (((2.0 * x2) - 3.0) / x1)) / x1) t_3 = x1 + (x1 + (3.0 * (x1 * ((x1 * 3.0) + -1.0)))) t_4 = x1 * (x1 * 3.0) t_5 = t_4 + (2.0 * x2) t_6 = (t_5 - x1) / t_0 t_7 = (2.0 * x2) / x1 t_8 = t_4 * ((x1 - t_5) / t_0) t_9 = x1 * (x1 * x1) tmp = 0 if x1 <= -2.2e+140: tmp = t_3 elif x1 <= -0.7: tmp = x1 + (t_1 - (((t_8 + (t_0 * ((((x1 * 2.0) * t_6) * (((1.0 + (3.0 / x1)) - t_7) / x1)) + ((x1 * x1) * (6.0 - (4.0 * t_2)))))) - t_9) - x1)) elif x1 <= 1.26: tmp = x1 + ((3.0 * ((x2 * -2.0) - (x1 * ((x1 * ((x2 * -2.0) - 3.0)) - -1.0)))) + (x1 + (x2 * ((x1 * -12.0) + (8.0 * (x1 * x2)))))) elif x1 <= 5e+152: tmp = x1 + (t_1 + (x1 + (t_9 - (t_8 - (t_0 * (((x1 * x1) * ((t_6 * 4.0) - 6.0)) + (((t_7 + (-1.0 - (3.0 / x1))) / x1) * ((x1 * 2.0) * t_2)))))))) else: tmp = t_3 return tmp
function code(x1, x2) t_0 = Float64(Float64(x1 * x1) + 1.0) t_1 = Float64(3.0 * Float64(x2 * -2.0)) t_2 = Float64(3.0 + Float64(Float64(-1.0 + Float64(Float64(Float64(2.0 * x2) - 3.0) / x1)) / x1)) t_3 = Float64(x1 + Float64(x1 + Float64(3.0 * Float64(x1 * Float64(Float64(x1 * 3.0) + -1.0))))) t_4 = Float64(x1 * Float64(x1 * 3.0)) t_5 = Float64(t_4 + Float64(2.0 * x2)) t_6 = Float64(Float64(t_5 - x1) / t_0) t_7 = Float64(Float64(2.0 * x2) / x1) t_8 = Float64(t_4 * Float64(Float64(x1 - t_5) / t_0)) t_9 = Float64(x1 * Float64(x1 * x1)) tmp = 0.0 if (x1 <= -2.2e+140) tmp = t_3; elseif (x1 <= -0.7) tmp = Float64(x1 + Float64(t_1 - Float64(Float64(Float64(t_8 + Float64(t_0 * Float64(Float64(Float64(Float64(x1 * 2.0) * t_6) * Float64(Float64(Float64(1.0 + Float64(3.0 / x1)) - t_7) / x1)) + Float64(Float64(x1 * x1) * Float64(6.0 - Float64(4.0 * t_2)))))) - t_9) - x1))); elseif (x1 <= 1.26) tmp = Float64(x1 + Float64(Float64(3.0 * Float64(Float64(x2 * -2.0) - Float64(x1 * Float64(Float64(x1 * Float64(Float64(x2 * -2.0) - 3.0)) - -1.0)))) + Float64(x1 + Float64(x2 * Float64(Float64(x1 * -12.0) + Float64(8.0 * Float64(x1 * x2))))))); elseif (x1 <= 5e+152) tmp = Float64(x1 + Float64(t_1 + Float64(x1 + Float64(t_9 - Float64(t_8 - Float64(t_0 * Float64(Float64(Float64(x1 * x1) * Float64(Float64(t_6 * 4.0) - 6.0)) + Float64(Float64(Float64(t_7 + Float64(-1.0 - Float64(3.0 / x1))) / x1) * Float64(Float64(x1 * 2.0) * t_2))))))))); else tmp = t_3; end return tmp end
function tmp_2 = code(x1, x2) t_0 = (x1 * x1) + 1.0; t_1 = 3.0 * (x2 * -2.0); t_2 = 3.0 + ((-1.0 + (((2.0 * x2) - 3.0) / x1)) / x1); t_3 = x1 + (x1 + (3.0 * (x1 * ((x1 * 3.0) + -1.0)))); t_4 = x1 * (x1 * 3.0); t_5 = t_4 + (2.0 * x2); t_6 = (t_5 - x1) / t_0; t_7 = (2.0 * x2) / x1; t_8 = t_4 * ((x1 - t_5) / t_0); t_9 = x1 * (x1 * x1); tmp = 0.0; if (x1 <= -2.2e+140) tmp = t_3; elseif (x1 <= -0.7) tmp = x1 + (t_1 - (((t_8 + (t_0 * ((((x1 * 2.0) * t_6) * (((1.0 + (3.0 / x1)) - t_7) / x1)) + ((x1 * x1) * (6.0 - (4.0 * t_2)))))) - t_9) - x1)); elseif (x1 <= 1.26) tmp = x1 + ((3.0 * ((x2 * -2.0) - (x1 * ((x1 * ((x2 * -2.0) - 3.0)) - -1.0)))) + (x1 + (x2 * ((x1 * -12.0) + (8.0 * (x1 * x2)))))); elseif (x1 <= 5e+152) tmp = x1 + (t_1 + (x1 + (t_9 - (t_8 - (t_0 * (((x1 * x1) * ((t_6 * 4.0) - 6.0)) + (((t_7 + (-1.0 - (3.0 / x1))) / x1) * ((x1 * 2.0) * t_2)))))))); else tmp = t_3; 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[(3.0 * N[(x2 * -2.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(3.0 + N[(N[(-1.0 + N[(N[(N[(2.0 * x2), $MachinePrecision] - 3.0), $MachinePrecision] / x1), $MachinePrecision]), $MachinePrecision] / x1), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(x1 + N[(x1 + N[(3.0 * N[(x1 * N[(N[(x1 * 3.0), $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[(x1 * N[(x1 * 3.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$5 = N[(t$95$4 + N[(2.0 * x2), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$6 = N[(N[(t$95$5 - x1), $MachinePrecision] / t$95$0), $MachinePrecision]}, Block[{t$95$7 = N[(N[(2.0 * x2), $MachinePrecision] / x1), $MachinePrecision]}, Block[{t$95$8 = N[(t$95$4 * N[(N[(x1 - t$95$5), $MachinePrecision] / t$95$0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$9 = N[(x1 * N[(x1 * x1), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x1, -2.2e+140], t$95$3, If[LessEqual[x1, -0.7], N[(x1 + N[(t$95$1 - N[(N[(N[(t$95$8 + N[(t$95$0 * N[(N[(N[(N[(x1 * 2.0), $MachinePrecision] * t$95$6), $MachinePrecision] * N[(N[(N[(1.0 + N[(3.0 / x1), $MachinePrecision]), $MachinePrecision] - t$95$7), $MachinePrecision] / x1), $MachinePrecision]), $MachinePrecision] + N[(N[(x1 * x1), $MachinePrecision] * N[(6.0 - N[(4.0 * t$95$2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$9), $MachinePrecision] - x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 1.26], N[(x1 + N[(N[(3.0 * N[(N[(x2 * -2.0), $MachinePrecision] - N[(x1 * N[(N[(x1 * N[(N[(x2 * -2.0), $MachinePrecision] - 3.0), $MachinePrecision]), $MachinePrecision] - -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(x1 + N[(x2 * N[(N[(x1 * -12.0), $MachinePrecision] + N[(8.0 * N[(x1 * x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 5e+152], N[(x1 + N[(t$95$1 + N[(x1 + N[(t$95$9 - N[(t$95$8 - N[(t$95$0 * N[(N[(N[(x1 * x1), $MachinePrecision] * N[(N[(t$95$6 * 4.0), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision] + N[(N[(N[(t$95$7 + N[(-1.0 - N[(3.0 / x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / x1), $MachinePrecision] * N[(N[(x1 * 2.0), $MachinePrecision] * t$95$2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$3]]]]]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x1 \cdot x1 + 1\\
t_1 := 3 \cdot \left(x2 \cdot -2\right)\\
t_2 := 3 + \frac{-1 + \frac{2 \cdot x2 - 3}{x1}}{x1}\\
t_3 := x1 + \left(x1 + 3 \cdot \left(x1 \cdot \left(x1 \cdot 3 + -1\right)\right)\right)\\
t_4 := x1 \cdot \left(x1 \cdot 3\right)\\
t_5 := t\_4 + 2 \cdot x2\\
t_6 := \frac{t\_5 - x1}{t\_0}\\
t_7 := \frac{2 \cdot x2}{x1}\\
t_8 := t\_4 \cdot \frac{x1 - t\_5}{t\_0}\\
t_9 := x1 \cdot \left(x1 \cdot x1\right)\\
\mathbf{if}\;x1 \leq -2.2 \cdot 10^{+140}:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;x1 \leq -0.7:\\
\;\;\;\;x1 + \left(t\_1 - \left(\left(\left(t\_8 + t\_0 \cdot \left(\left(\left(x1 \cdot 2\right) \cdot t\_6\right) \cdot \frac{\left(1 + \frac{3}{x1}\right) - t\_7}{x1} + \left(x1 \cdot x1\right) \cdot \left(6 - 4 \cdot t\_2\right)\right)\right) - t\_9\right) - x1\right)\right)\\
\mathbf{elif}\;x1 \leq 1.26:\\
\;\;\;\;x1 + \left(3 \cdot \left(x2 \cdot -2 - x1 \cdot \left(x1 \cdot \left(x2 \cdot -2 - 3\right) - -1\right)\right) + \left(x1 + x2 \cdot \left(x1 \cdot -12 + 8 \cdot \left(x1 \cdot x2\right)\right)\right)\right)\\
\mathbf{elif}\;x1 \leq 5 \cdot 10^{+152}:\\
\;\;\;\;x1 + \left(t\_1 + \left(x1 + \left(t\_9 - \left(t\_8 - t\_0 \cdot \left(\left(x1 \cdot x1\right) \cdot \left(t\_6 \cdot 4 - 6\right) + \frac{t\_7 + \left(-1 - \frac{3}{x1}\right)}{x1} \cdot \left(\left(x1 \cdot 2\right) \cdot t\_2\right)\right)\right)\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t\_3\\
\end{array}
\end{array}
if x1 < -2.1999999999999998e140 or 5e152 < x1 Initial program 0.0%
Taylor expanded in x1 around 0 0.0%
Taylor expanded in x1 around 0 69.1%
Taylor expanded in x2 around 0 100.0%
if -2.1999999999999998e140 < x1 < -0.69999999999999996Initial program 85.0%
Taylor expanded in x1 around 0 85.0%
*-commutative85.0%
Simplified85.0%
Taylor expanded in x1 around inf 85.0%
associate-*r/85.0%
associate-*r/85.0%
metadata-eval85.0%
Simplified85.0%
Taylor expanded in x1 around -inf 85.1%
if -0.69999999999999996 < x1 < 1.26000000000000001Initial program 99.3%
Taylor expanded in x1 around 0 86.0%
Taylor expanded in x1 around 0 86.0%
Taylor expanded in x2 around 0 97.0%
if 1.26000000000000001 < x1 < 5e152Initial program 99.5%
Taylor expanded in x1 around 0 98.2%
*-commutative98.2%
Simplified98.2%
Taylor expanded in x1 around inf 98.2%
associate-*r/98.2%
associate-*r/98.2%
metadata-eval98.2%
Simplified98.2%
Taylor expanded in x1 around -inf 98.2%
Final simplification96.4%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (+ (* x1 x1) 1.0))
(t_1 (* x1 (* x1 x1)))
(t_2 (+ x1 (+ x1 (* 3.0 (* x1 (+ (* x1 3.0) -1.0))))))
(t_3 (* x1 (* x1 3.0)))
(t_4 (+ t_3 (* 2.0 x2)))
(t_5 (/ (- t_4 x1) t_0))
(t_6 (/ (- x1 t_4) t_0))
(t_7 (* t_3 t_6))
(t_8 (/ (* 2.0 x2) x1)))
(if (<= x1 -2.2e+140)
t_2
(if (<= x1 -0.72)
(+
x1
(-
(* x2 -6.0)
(-
(-
(+
t_7
(*
t_0
(+
(* (* (* x1 2.0) t_5) (/ (- (+ 1.0 (/ 3.0 x1)) t_8) x1))
(* (* x1 x1) (+ 6.0 (* 4.0 t_6))))))
t_1)
x1)))
(if (<= x1 1.26)
(+
x1
(+
(* 3.0 (- (* x2 -2.0) (* x1 (- (* x1 (- (* x2 -2.0) 3.0)) -1.0))))
(+ x1 (* x2 (+ (* x1 -12.0) (* 8.0 (* x1 x2)))))))
(if (<= x1 5e+152)
(+
x1
(+
(* 3.0 (* x2 -2.0))
(+
x1
(-
t_1
(-
t_7
(*
t_0
(+
(* (* x1 x1) (- (* t_5 4.0) 6.0))
(*
(/ (+ t_8 (- -1.0 (/ 3.0 x1))) x1)
(*
(* x1 2.0)
(+ 3.0 (/ (+ -1.0 (/ (- (* 2.0 x2) 3.0) x1)) x1)))))))))))
t_2))))))
double code(double x1, double x2) {
double t_0 = (x1 * x1) + 1.0;
double t_1 = x1 * (x1 * x1);
double t_2 = x1 + (x1 + (3.0 * (x1 * ((x1 * 3.0) + -1.0))));
double t_3 = x1 * (x1 * 3.0);
double t_4 = t_3 + (2.0 * x2);
double t_5 = (t_4 - x1) / t_0;
double t_6 = (x1 - t_4) / t_0;
double t_7 = t_3 * t_6;
double t_8 = (2.0 * x2) / x1;
double tmp;
if (x1 <= -2.2e+140) {
tmp = t_2;
} else if (x1 <= -0.72) {
tmp = x1 + ((x2 * -6.0) - (((t_7 + (t_0 * ((((x1 * 2.0) * t_5) * (((1.0 + (3.0 / x1)) - t_8) / x1)) + ((x1 * x1) * (6.0 + (4.0 * t_6)))))) - t_1) - x1));
} else if (x1 <= 1.26) {
tmp = x1 + ((3.0 * ((x2 * -2.0) - (x1 * ((x1 * ((x2 * -2.0) - 3.0)) - -1.0)))) + (x1 + (x2 * ((x1 * -12.0) + (8.0 * (x1 * x2))))));
} else if (x1 <= 5e+152) {
tmp = x1 + ((3.0 * (x2 * -2.0)) + (x1 + (t_1 - (t_7 - (t_0 * (((x1 * x1) * ((t_5 * 4.0) - 6.0)) + (((t_8 + (-1.0 - (3.0 / x1))) / x1) * ((x1 * 2.0) * (3.0 + ((-1.0 + (((2.0 * x2) - 3.0) / 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) :: t_6
real(8) :: t_7
real(8) :: t_8
real(8) :: tmp
t_0 = (x1 * x1) + 1.0d0
t_1 = x1 * (x1 * x1)
t_2 = x1 + (x1 + (3.0d0 * (x1 * ((x1 * 3.0d0) + (-1.0d0)))))
t_3 = x1 * (x1 * 3.0d0)
t_4 = t_3 + (2.0d0 * x2)
t_5 = (t_4 - x1) / t_0
t_6 = (x1 - t_4) / t_0
t_7 = t_3 * t_6
t_8 = (2.0d0 * x2) / x1
if (x1 <= (-2.2d+140)) then
tmp = t_2
else if (x1 <= (-0.72d0)) then
tmp = x1 + ((x2 * (-6.0d0)) - (((t_7 + (t_0 * ((((x1 * 2.0d0) * t_5) * (((1.0d0 + (3.0d0 / x1)) - t_8) / x1)) + ((x1 * x1) * (6.0d0 + (4.0d0 * t_6)))))) - t_1) - x1))
else if (x1 <= 1.26d0) then
tmp = x1 + ((3.0d0 * ((x2 * (-2.0d0)) - (x1 * ((x1 * ((x2 * (-2.0d0)) - 3.0d0)) - (-1.0d0))))) + (x1 + (x2 * ((x1 * (-12.0d0)) + (8.0d0 * (x1 * x2))))))
else if (x1 <= 5d+152) then
tmp = x1 + ((3.0d0 * (x2 * (-2.0d0))) + (x1 + (t_1 - (t_7 - (t_0 * (((x1 * x1) * ((t_5 * 4.0d0) - 6.0d0)) + (((t_8 + ((-1.0d0) - (3.0d0 / x1))) / x1) * ((x1 * 2.0d0) * (3.0d0 + (((-1.0d0) + (((2.0d0 * x2) - 3.0d0) / 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) + 1.0;
double t_1 = x1 * (x1 * x1);
double t_2 = x1 + (x1 + (3.0 * (x1 * ((x1 * 3.0) + -1.0))));
double t_3 = x1 * (x1 * 3.0);
double t_4 = t_3 + (2.0 * x2);
double t_5 = (t_4 - x1) / t_0;
double t_6 = (x1 - t_4) / t_0;
double t_7 = t_3 * t_6;
double t_8 = (2.0 * x2) / x1;
double tmp;
if (x1 <= -2.2e+140) {
tmp = t_2;
} else if (x1 <= -0.72) {
tmp = x1 + ((x2 * -6.0) - (((t_7 + (t_0 * ((((x1 * 2.0) * t_5) * (((1.0 + (3.0 / x1)) - t_8) / x1)) + ((x1 * x1) * (6.0 + (4.0 * t_6)))))) - t_1) - x1));
} else if (x1 <= 1.26) {
tmp = x1 + ((3.0 * ((x2 * -2.0) - (x1 * ((x1 * ((x2 * -2.0) - 3.0)) - -1.0)))) + (x1 + (x2 * ((x1 * -12.0) + (8.0 * (x1 * x2))))));
} else if (x1 <= 5e+152) {
tmp = x1 + ((3.0 * (x2 * -2.0)) + (x1 + (t_1 - (t_7 - (t_0 * (((x1 * x1) * ((t_5 * 4.0) - 6.0)) + (((t_8 + (-1.0 - (3.0 / x1))) / x1) * ((x1 * 2.0) * (3.0 + ((-1.0 + (((2.0 * x2) - 3.0) / x1)) / x1))))))))));
} else {
tmp = t_2;
}
return tmp;
}
def code(x1, x2): t_0 = (x1 * x1) + 1.0 t_1 = x1 * (x1 * x1) t_2 = x1 + (x1 + (3.0 * (x1 * ((x1 * 3.0) + -1.0)))) t_3 = x1 * (x1 * 3.0) t_4 = t_3 + (2.0 * x2) t_5 = (t_4 - x1) / t_0 t_6 = (x1 - t_4) / t_0 t_7 = t_3 * t_6 t_8 = (2.0 * x2) / x1 tmp = 0 if x1 <= -2.2e+140: tmp = t_2 elif x1 <= -0.72: tmp = x1 + ((x2 * -6.0) - (((t_7 + (t_0 * ((((x1 * 2.0) * t_5) * (((1.0 + (3.0 / x1)) - t_8) / x1)) + ((x1 * x1) * (6.0 + (4.0 * t_6)))))) - t_1) - x1)) elif x1 <= 1.26: tmp = x1 + ((3.0 * ((x2 * -2.0) - (x1 * ((x1 * ((x2 * -2.0) - 3.0)) - -1.0)))) + (x1 + (x2 * ((x1 * -12.0) + (8.0 * (x1 * x2)))))) elif x1 <= 5e+152: tmp = x1 + ((3.0 * (x2 * -2.0)) + (x1 + (t_1 - (t_7 - (t_0 * (((x1 * x1) * ((t_5 * 4.0) - 6.0)) + (((t_8 + (-1.0 - (3.0 / x1))) / x1) * ((x1 * 2.0) * (3.0 + ((-1.0 + (((2.0 * x2) - 3.0) / x1)) / x1)))))))))) else: tmp = t_2 return tmp
function code(x1, x2) t_0 = Float64(Float64(x1 * x1) + 1.0) t_1 = Float64(x1 * Float64(x1 * x1)) t_2 = Float64(x1 + Float64(x1 + Float64(3.0 * Float64(x1 * Float64(Float64(x1 * 3.0) + -1.0))))) t_3 = Float64(x1 * Float64(x1 * 3.0)) t_4 = Float64(t_3 + Float64(2.0 * x2)) t_5 = Float64(Float64(t_4 - x1) / t_0) t_6 = Float64(Float64(x1 - t_4) / t_0) t_7 = Float64(t_3 * t_6) t_8 = Float64(Float64(2.0 * x2) / x1) tmp = 0.0 if (x1 <= -2.2e+140) tmp = t_2; elseif (x1 <= -0.72) tmp = Float64(x1 + Float64(Float64(x2 * -6.0) - Float64(Float64(Float64(t_7 + Float64(t_0 * Float64(Float64(Float64(Float64(x1 * 2.0) * t_5) * Float64(Float64(Float64(1.0 + Float64(3.0 / x1)) - t_8) / x1)) + Float64(Float64(x1 * x1) * Float64(6.0 + Float64(4.0 * t_6)))))) - t_1) - x1))); elseif (x1 <= 1.26) tmp = Float64(x1 + Float64(Float64(3.0 * Float64(Float64(x2 * -2.0) - Float64(x1 * Float64(Float64(x1 * Float64(Float64(x2 * -2.0) - 3.0)) - -1.0)))) + Float64(x1 + Float64(x2 * Float64(Float64(x1 * -12.0) + Float64(8.0 * Float64(x1 * x2))))))); elseif (x1 <= 5e+152) tmp = Float64(x1 + Float64(Float64(3.0 * Float64(x2 * -2.0)) + Float64(x1 + Float64(t_1 - Float64(t_7 - Float64(t_0 * Float64(Float64(Float64(x1 * x1) * Float64(Float64(t_5 * 4.0) - 6.0)) + Float64(Float64(Float64(t_8 + Float64(-1.0 - Float64(3.0 / x1))) / x1) * Float64(Float64(x1 * 2.0) * Float64(3.0 + Float64(Float64(-1.0 + Float64(Float64(Float64(2.0 * x2) - 3.0) / x1)) / x1))))))))))); else tmp = t_2; end return tmp end
function tmp_2 = code(x1, x2) t_0 = (x1 * x1) + 1.0; t_1 = x1 * (x1 * x1); t_2 = x1 + (x1 + (3.0 * (x1 * ((x1 * 3.0) + -1.0)))); t_3 = x1 * (x1 * 3.0); t_4 = t_3 + (2.0 * x2); t_5 = (t_4 - x1) / t_0; t_6 = (x1 - t_4) / t_0; t_7 = t_3 * t_6; t_8 = (2.0 * x2) / x1; tmp = 0.0; if (x1 <= -2.2e+140) tmp = t_2; elseif (x1 <= -0.72) tmp = x1 + ((x2 * -6.0) - (((t_7 + (t_0 * ((((x1 * 2.0) * t_5) * (((1.0 + (3.0 / x1)) - t_8) / x1)) + ((x1 * x1) * (6.0 + (4.0 * t_6)))))) - t_1) - x1)); elseif (x1 <= 1.26) tmp = x1 + ((3.0 * ((x2 * -2.0) - (x1 * ((x1 * ((x2 * -2.0) - 3.0)) - -1.0)))) + (x1 + (x2 * ((x1 * -12.0) + (8.0 * (x1 * x2)))))); elseif (x1 <= 5e+152) tmp = x1 + ((3.0 * (x2 * -2.0)) + (x1 + (t_1 - (t_7 - (t_0 * (((x1 * x1) * ((t_5 * 4.0) - 6.0)) + (((t_8 + (-1.0 - (3.0 / x1))) / x1) * ((x1 * 2.0) * (3.0 + ((-1.0 + (((2.0 * x2) - 3.0) / x1)) / x1)))))))))); else tmp = t_2; end tmp_2 = tmp; end
code[x1_, x2_] := Block[{t$95$0 = N[(N[(x1 * x1), $MachinePrecision] + 1.0), $MachinePrecision]}, Block[{t$95$1 = N[(x1 * N[(x1 * x1), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x1 + N[(x1 + N[(3.0 * N[(x1 * N[(N[(x1 * 3.0), $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(x1 * N[(x1 * 3.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[(t$95$3 + N[(2.0 * x2), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$5 = N[(N[(t$95$4 - x1), $MachinePrecision] / t$95$0), $MachinePrecision]}, Block[{t$95$6 = N[(N[(x1 - t$95$4), $MachinePrecision] / t$95$0), $MachinePrecision]}, Block[{t$95$7 = N[(t$95$3 * t$95$6), $MachinePrecision]}, Block[{t$95$8 = N[(N[(2.0 * x2), $MachinePrecision] / x1), $MachinePrecision]}, If[LessEqual[x1, -2.2e+140], t$95$2, If[LessEqual[x1, -0.72], N[(x1 + N[(N[(x2 * -6.0), $MachinePrecision] - N[(N[(N[(t$95$7 + N[(t$95$0 * N[(N[(N[(N[(x1 * 2.0), $MachinePrecision] * t$95$5), $MachinePrecision] * N[(N[(N[(1.0 + N[(3.0 / x1), $MachinePrecision]), $MachinePrecision] - t$95$8), $MachinePrecision] / x1), $MachinePrecision]), $MachinePrecision] + N[(N[(x1 * x1), $MachinePrecision] * N[(6.0 + N[(4.0 * t$95$6), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision] - x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 1.26], N[(x1 + N[(N[(3.0 * N[(N[(x2 * -2.0), $MachinePrecision] - N[(x1 * N[(N[(x1 * N[(N[(x2 * -2.0), $MachinePrecision] - 3.0), $MachinePrecision]), $MachinePrecision] - -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(x1 + N[(x2 * N[(N[(x1 * -12.0), $MachinePrecision] + N[(8.0 * N[(x1 * x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 5e+152], N[(x1 + N[(N[(3.0 * N[(x2 * -2.0), $MachinePrecision]), $MachinePrecision] + N[(x1 + N[(t$95$1 - N[(t$95$7 - N[(t$95$0 * N[(N[(N[(x1 * x1), $MachinePrecision] * N[(N[(t$95$5 * 4.0), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision] + N[(N[(N[(t$95$8 + N[(-1.0 - N[(3.0 / x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / x1), $MachinePrecision] * N[(N[(x1 * 2.0), $MachinePrecision] * N[(3.0 + N[(N[(-1.0 + N[(N[(N[(2.0 * x2), $MachinePrecision] - 3.0), $MachinePrecision] / x1), $MachinePrecision]), $MachinePrecision] / x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$2]]]]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x1 \cdot x1 + 1\\
t_1 := x1 \cdot \left(x1 \cdot x1\right)\\
t_2 := x1 + \left(x1 + 3 \cdot \left(x1 \cdot \left(x1 \cdot 3 + -1\right)\right)\right)\\
t_3 := x1 \cdot \left(x1 \cdot 3\right)\\
t_4 := t\_3 + 2 \cdot x2\\
t_5 := \frac{t\_4 - x1}{t\_0}\\
t_6 := \frac{x1 - t\_4}{t\_0}\\
t_7 := t\_3 \cdot t\_6\\
t_8 := \frac{2 \cdot x2}{x1}\\
\mathbf{if}\;x1 \leq -2.2 \cdot 10^{+140}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;x1 \leq -0.72:\\
\;\;\;\;x1 + \left(x2 \cdot -6 - \left(\left(\left(t\_7 + t\_0 \cdot \left(\left(\left(x1 \cdot 2\right) \cdot t\_5\right) \cdot \frac{\left(1 + \frac{3}{x1}\right) - t\_8}{x1} + \left(x1 \cdot x1\right) \cdot \left(6 + 4 \cdot t\_6\right)\right)\right) - t\_1\right) - x1\right)\right)\\
\mathbf{elif}\;x1 \leq 1.26:\\
\;\;\;\;x1 + \left(3 \cdot \left(x2 \cdot -2 - x1 \cdot \left(x1 \cdot \left(x2 \cdot -2 - 3\right) - -1\right)\right) + \left(x1 + x2 \cdot \left(x1 \cdot -12 + 8 \cdot \left(x1 \cdot x2\right)\right)\right)\right)\\
\mathbf{elif}\;x1 \leq 5 \cdot 10^{+152}:\\
\;\;\;\;x1 + \left(3 \cdot \left(x2 \cdot -2\right) + \left(x1 + \left(t\_1 - \left(t\_7 - t\_0 \cdot \left(\left(x1 \cdot x1\right) \cdot \left(t\_5 \cdot 4 - 6\right) + \frac{t\_8 + \left(-1 - \frac{3}{x1}\right)}{x1} \cdot \left(\left(x1 \cdot 2\right) \cdot \left(3 + \frac{-1 + \frac{2 \cdot x2 - 3}{x1}}{x1}\right)\right)\right)\right)\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if x1 < -2.1999999999999998e140 or 5e152 < x1 Initial program 0.0%
Taylor expanded in x1 around 0 0.0%
Taylor expanded in x1 around 0 69.1%
Taylor expanded in x2 around 0 100.0%
if -2.1999999999999998e140 < x1 < -0.71999999999999997Initial program 85.0%
Taylor expanded in x1 around 0 85.0%
*-commutative85.0%
Simplified85.0%
Taylor expanded in x1 around inf 85.0%
associate-*r/85.0%
associate-*r/85.0%
metadata-eval85.0%
Simplified85.0%
Taylor expanded in x2 around 0 85.0%
*-commutative85.0%
Simplified85.0%
if -0.71999999999999997 < x1 < 1.26000000000000001Initial program 99.3%
Taylor expanded in x1 around 0 86.0%
Taylor expanded in x1 around 0 86.0%
Taylor expanded in x2 around 0 97.0%
if 1.26000000000000001 < x1 < 5e152Initial program 99.5%
Taylor expanded in x1 around 0 98.2%
*-commutative98.2%
Simplified98.2%
Taylor expanded in x1 around inf 98.2%
associate-*r/98.2%
associate-*r/98.2%
metadata-eval98.2%
Simplified98.2%
Taylor expanded in x1 around -inf 98.2%
Final simplification96.3%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (* x1 (* x1 3.0)))
(t_1 (+ t_0 (* 2.0 x2)))
(t_2 (+ (* x1 x1) 1.0))
(t_3 (/ (- x1 t_1) t_2))
(t_4
(+
x1
(+
(* 3.0 (* x2 -2.0))
(+
x1
(+
(* x1 (* x1 x1))
(-
(* t_0 (* 2.0 x2))
(*
t_2
(+
(* (* x1 x1) (+ 6.0 (* 4.0 t_3)))
(* (* (* x1 2.0) (/ (- t_1 x1) t_2)) (+ 3.0 t_3)))))))))))
(if (<= x1 -2.2e+140)
(+ x1 (+ x1 (* 3.0 (* x1 (+ (* x1 3.0) -1.0)))))
(if (<= x1 -0.021)
t_4
(if (<= x1 0.0185)
(+
x1
(+
(* 3.0 (- (* x2 -2.0) (* x1 (- (* x1 (- (* x2 -2.0) 3.0)) -1.0))))
(+ x1 (* x2 (+ (* x1 -12.0) (* 8.0 (* x1 x2)))))))
(if (<= x1 8e+144)
t_4
(+
x1
(*
x1
(- (+ (* 4.0 (* x2 (- (* 2.0 x2) 3.0))) (* x1 9.0)) 2.0)))))))))
double code(double x1, double x2) {
double t_0 = x1 * (x1 * 3.0);
double t_1 = t_0 + (2.0 * x2);
double t_2 = (x1 * x1) + 1.0;
double t_3 = (x1 - t_1) / t_2;
double t_4 = x1 + ((3.0 * (x2 * -2.0)) + (x1 + ((x1 * (x1 * x1)) + ((t_0 * (2.0 * x2)) - (t_2 * (((x1 * x1) * (6.0 + (4.0 * t_3))) + (((x1 * 2.0) * ((t_1 - x1) / t_2)) * (3.0 + t_3))))))));
double tmp;
if (x1 <= -2.2e+140) {
tmp = x1 + (x1 + (3.0 * (x1 * ((x1 * 3.0) + -1.0))));
} else if (x1 <= -0.021) {
tmp = t_4;
} else if (x1 <= 0.0185) {
tmp = x1 + ((3.0 * ((x2 * -2.0) - (x1 * ((x1 * ((x2 * -2.0) - 3.0)) - -1.0)))) + (x1 + (x2 * ((x1 * -12.0) + (8.0 * (x1 * x2))))));
} else if (x1 <= 8e+144) {
tmp = t_4;
} else {
tmp = x1 + (x1 * (((4.0 * (x2 * ((2.0 * x2) - 3.0))) + (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) :: t_0
real(8) :: t_1
real(8) :: t_2
real(8) :: t_3
real(8) :: t_4
real(8) :: tmp
t_0 = x1 * (x1 * 3.0d0)
t_1 = t_0 + (2.0d0 * x2)
t_2 = (x1 * x1) + 1.0d0
t_3 = (x1 - t_1) / t_2
t_4 = x1 + ((3.0d0 * (x2 * (-2.0d0))) + (x1 + ((x1 * (x1 * x1)) + ((t_0 * (2.0d0 * x2)) - (t_2 * (((x1 * x1) * (6.0d0 + (4.0d0 * t_3))) + (((x1 * 2.0d0) * ((t_1 - x1) / t_2)) * (3.0d0 + t_3))))))))
if (x1 <= (-2.2d+140)) then
tmp = x1 + (x1 + (3.0d0 * (x1 * ((x1 * 3.0d0) + (-1.0d0)))))
else if (x1 <= (-0.021d0)) then
tmp = t_4
else if (x1 <= 0.0185d0) then
tmp = x1 + ((3.0d0 * ((x2 * (-2.0d0)) - (x1 * ((x1 * ((x2 * (-2.0d0)) - 3.0d0)) - (-1.0d0))))) + (x1 + (x2 * ((x1 * (-12.0d0)) + (8.0d0 * (x1 * x2))))))
else if (x1 <= 8d+144) then
tmp = t_4
else
tmp = x1 + (x1 * (((4.0d0 * (x2 * ((2.0d0 * x2) - 3.0d0))) + (x1 * 9.0d0)) - 2.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 = t_0 + (2.0 * x2);
double t_2 = (x1 * x1) + 1.0;
double t_3 = (x1 - t_1) / t_2;
double t_4 = x1 + ((3.0 * (x2 * -2.0)) + (x1 + ((x1 * (x1 * x1)) + ((t_0 * (2.0 * x2)) - (t_2 * (((x1 * x1) * (6.0 + (4.0 * t_3))) + (((x1 * 2.0) * ((t_1 - x1) / t_2)) * (3.0 + t_3))))))));
double tmp;
if (x1 <= -2.2e+140) {
tmp = x1 + (x1 + (3.0 * (x1 * ((x1 * 3.0) + -1.0))));
} else if (x1 <= -0.021) {
tmp = t_4;
} else if (x1 <= 0.0185) {
tmp = x1 + ((3.0 * ((x2 * -2.0) - (x1 * ((x1 * ((x2 * -2.0) - 3.0)) - -1.0)))) + (x1 + (x2 * ((x1 * -12.0) + (8.0 * (x1 * x2))))));
} else if (x1 <= 8e+144) {
tmp = t_4;
} else {
tmp = x1 + (x1 * (((4.0 * (x2 * ((2.0 * x2) - 3.0))) + (x1 * 9.0)) - 2.0));
}
return tmp;
}
def code(x1, x2): t_0 = x1 * (x1 * 3.0) t_1 = t_0 + (2.0 * x2) t_2 = (x1 * x1) + 1.0 t_3 = (x1 - t_1) / t_2 t_4 = x1 + ((3.0 * (x2 * -2.0)) + (x1 + ((x1 * (x1 * x1)) + ((t_0 * (2.0 * x2)) - (t_2 * (((x1 * x1) * (6.0 + (4.0 * t_3))) + (((x1 * 2.0) * ((t_1 - x1) / t_2)) * (3.0 + t_3)))))))) tmp = 0 if x1 <= -2.2e+140: tmp = x1 + (x1 + (3.0 * (x1 * ((x1 * 3.0) + -1.0)))) elif x1 <= -0.021: tmp = t_4 elif x1 <= 0.0185: tmp = x1 + ((3.0 * ((x2 * -2.0) - (x1 * ((x1 * ((x2 * -2.0) - 3.0)) - -1.0)))) + (x1 + (x2 * ((x1 * -12.0) + (8.0 * (x1 * x2)))))) elif x1 <= 8e+144: tmp = t_4 else: tmp = x1 + (x1 * (((4.0 * (x2 * ((2.0 * x2) - 3.0))) + (x1 * 9.0)) - 2.0)) return tmp
function code(x1, x2) t_0 = Float64(x1 * Float64(x1 * 3.0)) t_1 = Float64(t_0 + Float64(2.0 * x2)) t_2 = Float64(Float64(x1 * x1) + 1.0) t_3 = Float64(Float64(x1 - t_1) / t_2) t_4 = Float64(x1 + Float64(Float64(3.0 * Float64(x2 * -2.0)) + Float64(x1 + Float64(Float64(x1 * Float64(x1 * x1)) + Float64(Float64(t_0 * Float64(2.0 * x2)) - Float64(t_2 * Float64(Float64(Float64(x1 * x1) * Float64(6.0 + Float64(4.0 * t_3))) + Float64(Float64(Float64(x1 * 2.0) * Float64(Float64(t_1 - x1) / t_2)) * Float64(3.0 + t_3))))))))) tmp = 0.0 if (x1 <= -2.2e+140) tmp = Float64(x1 + Float64(x1 + Float64(3.0 * Float64(x1 * Float64(Float64(x1 * 3.0) + -1.0))))); elseif (x1 <= -0.021) tmp = t_4; elseif (x1 <= 0.0185) tmp = Float64(x1 + Float64(Float64(3.0 * Float64(Float64(x2 * -2.0) - Float64(x1 * Float64(Float64(x1 * Float64(Float64(x2 * -2.0) - 3.0)) - -1.0)))) + Float64(x1 + Float64(x2 * Float64(Float64(x1 * -12.0) + Float64(8.0 * Float64(x1 * x2))))))); elseif (x1 <= 8e+144) tmp = t_4; else tmp = Float64(x1 + Float64(x1 * Float64(Float64(Float64(4.0 * Float64(x2 * Float64(Float64(2.0 * x2) - 3.0))) + Float64(x1 * 9.0)) - 2.0))); end return tmp end
function tmp_2 = code(x1, x2) t_0 = x1 * (x1 * 3.0); t_1 = t_0 + (2.0 * x2); t_2 = (x1 * x1) + 1.0; t_3 = (x1 - t_1) / t_2; t_4 = x1 + ((3.0 * (x2 * -2.0)) + (x1 + ((x1 * (x1 * x1)) + ((t_0 * (2.0 * x2)) - (t_2 * (((x1 * x1) * (6.0 + (4.0 * t_3))) + (((x1 * 2.0) * ((t_1 - x1) / t_2)) * (3.0 + t_3)))))))); tmp = 0.0; if (x1 <= -2.2e+140) tmp = x1 + (x1 + (3.0 * (x1 * ((x1 * 3.0) + -1.0)))); elseif (x1 <= -0.021) tmp = t_4; elseif (x1 <= 0.0185) tmp = x1 + ((3.0 * ((x2 * -2.0) - (x1 * ((x1 * ((x2 * -2.0) - 3.0)) - -1.0)))) + (x1 + (x2 * ((x1 * -12.0) + (8.0 * (x1 * x2)))))); elseif (x1 <= 8e+144) tmp = t_4; else tmp = x1 + (x1 * (((4.0 * (x2 * ((2.0 * x2) - 3.0))) + (x1 * 9.0)) - 2.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[(t$95$0 + N[(2.0 * x2), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(x1 * x1), $MachinePrecision] + 1.0), $MachinePrecision]}, Block[{t$95$3 = N[(N[(x1 - t$95$1), $MachinePrecision] / t$95$2), $MachinePrecision]}, Block[{t$95$4 = N[(x1 + N[(N[(3.0 * N[(x2 * -2.0), $MachinePrecision]), $MachinePrecision] + N[(x1 + N[(N[(x1 * N[(x1 * x1), $MachinePrecision]), $MachinePrecision] + N[(N[(t$95$0 * N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - N[(t$95$2 * N[(N[(N[(x1 * x1), $MachinePrecision] * N[(6.0 + N[(4.0 * t$95$3), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(N[(x1 * 2.0), $MachinePrecision] * N[(N[(t$95$1 - x1), $MachinePrecision] / t$95$2), $MachinePrecision]), $MachinePrecision] * N[(3.0 + t$95$3), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x1, -2.2e+140], N[(x1 + N[(x1 + N[(3.0 * N[(x1 * N[(N[(x1 * 3.0), $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, -0.021], t$95$4, If[LessEqual[x1, 0.0185], N[(x1 + N[(N[(3.0 * N[(N[(x2 * -2.0), $MachinePrecision] - N[(x1 * N[(N[(x1 * N[(N[(x2 * -2.0), $MachinePrecision] - 3.0), $MachinePrecision]), $MachinePrecision] - -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(x1 + N[(x2 * N[(N[(x1 * -12.0), $MachinePrecision] + N[(8.0 * N[(x1 * x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 8e+144], t$95$4, N[(x1 + N[(x1 * N[(N[(N[(4.0 * N[(x2 * N[(N[(2.0 * x2), $MachinePrecision] - 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(x1 * 9.0), $MachinePrecision]), $MachinePrecision] - 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x1 \cdot \left(x1 \cdot 3\right)\\
t_1 := t\_0 + 2 \cdot x2\\
t_2 := x1 \cdot x1 + 1\\
t_3 := \frac{x1 - t\_1}{t\_2}\\
t_4 := x1 + \left(3 \cdot \left(x2 \cdot -2\right) + \left(x1 + \left(x1 \cdot \left(x1 \cdot x1\right) + \left(t\_0 \cdot \left(2 \cdot x2\right) - t\_2 \cdot \left(\left(x1 \cdot x1\right) \cdot \left(6 + 4 \cdot t\_3\right) + \left(\left(x1 \cdot 2\right) \cdot \frac{t\_1 - x1}{t\_2}\right) \cdot \left(3 + t\_3\right)\right)\right)\right)\right)\right)\\
\mathbf{if}\;x1 \leq -2.2 \cdot 10^{+140}:\\
\;\;\;\;x1 + \left(x1 + 3 \cdot \left(x1 \cdot \left(x1 \cdot 3 + -1\right)\right)\right)\\
\mathbf{elif}\;x1 \leq -0.021:\\
\;\;\;\;t\_4\\
\mathbf{elif}\;x1 \leq 0.0185:\\
\;\;\;\;x1 + \left(3 \cdot \left(x2 \cdot -2 - x1 \cdot \left(x1 \cdot \left(x2 \cdot -2 - 3\right) - -1\right)\right) + \left(x1 + x2 \cdot \left(x1 \cdot -12 + 8 \cdot \left(x1 \cdot x2\right)\right)\right)\right)\\
\mathbf{elif}\;x1 \leq 8 \cdot 10^{+144}:\\
\;\;\;\;t\_4\\
\mathbf{else}:\\
\;\;\;\;x1 + x1 \cdot \left(\left(4 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right) + x1 \cdot 9\right) - 2\right)\\
\end{array}
\end{array}
if x1 < -2.1999999999999998e140Initial program 0.0%
Taylor expanded in x1 around 0 0.0%
Taylor expanded in x1 around 0 64.1%
Taylor expanded in x2 around 0 100.0%
if -2.1999999999999998e140 < x1 < -0.0210000000000000013 or 0.0184999999999999991 < x1 < 8.00000000000000019e144Initial program 92.3%
Taylor expanded in x1 around 0 91.7%
*-commutative91.7%
Simplified91.7%
Taylor expanded in x1 around 0 81.7%
if -0.0210000000000000013 < x1 < 0.0184999999999999991Initial program 99.3%
Taylor expanded in x1 around 0 87.5%
Taylor expanded in x1 around 0 87.6%
Taylor expanded in x2 around 0 98.8%
if 8.00000000000000019e144 < x1 Initial program 3.3%
Taylor expanded in x1 around 0 3.3%
Taylor expanded in x1 around 0 73.3%
Taylor expanded in x2 around 0 100.0%
Taylor expanded in x1 around 0 100.0%
Final simplification94.4%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (* x1 (* x1 x1)))
(t_1 (* 3.0 (* x2 -2.0)))
(t_2 (+ (* x1 x1) 1.0))
(t_3 (+ x1 (+ x1 (* 3.0 (* x1 (+ (* x1 3.0) -1.0))))))
(t_4 (- -1.0 (* x1 x1)))
(t_5 (* x1 (* x1 3.0)))
(t_6 (+ t_5 (* 2.0 x2)))
(t_7 (/ (- x1 t_6) t_2))
(t_8 (* (* x1 x1) (+ 6.0 (* 4.0 t_7)))))
(if (<= x1 -2.2e+140)
t_3
(if (<= x1 -3.2e+21)
(+
x1
(+
t_1
(+ x1 (+ t_0 (+ (* t_5 (/ (- t_6 x1) t_2)) (* t_4 (- t_8 -6.0)))))))
(if (<= x1 3e+33)
(+
x1
(+
(* 3.0 (/ (- x1 (- t_5 (* 2.0 x2))) t_4))
(+ x1 (* x2 (+ (* x1 -12.0) (* 8.0 (* x1 x2)))))))
(if (<= x1 5e+153)
(+
x1
(+
t_1
(+
x1
(-
t_0
(-
(* t_5 t_7)
(* t_2 (- (* (* x1 (* x1 2.0)) (+ 3.0 t_7)) t_8)))))))
t_3))))))
double code(double x1, double x2) {
double t_0 = x1 * (x1 * x1);
double t_1 = 3.0 * (x2 * -2.0);
double t_2 = (x1 * x1) + 1.0;
double t_3 = x1 + (x1 + (3.0 * (x1 * ((x1 * 3.0) + -1.0))));
double t_4 = -1.0 - (x1 * x1);
double t_5 = x1 * (x1 * 3.0);
double t_6 = t_5 + (2.0 * x2);
double t_7 = (x1 - t_6) / t_2;
double t_8 = (x1 * x1) * (6.0 + (4.0 * t_7));
double tmp;
if (x1 <= -2.2e+140) {
tmp = t_3;
} else if (x1 <= -3.2e+21) {
tmp = x1 + (t_1 + (x1 + (t_0 + ((t_5 * ((t_6 - x1) / t_2)) + (t_4 * (t_8 - -6.0))))));
} else if (x1 <= 3e+33) {
tmp = x1 + ((3.0 * ((x1 - (t_5 - (2.0 * x2))) / t_4)) + (x1 + (x2 * ((x1 * -12.0) + (8.0 * (x1 * x2))))));
} else if (x1 <= 5e+153) {
tmp = x1 + (t_1 + (x1 + (t_0 - ((t_5 * t_7) - (t_2 * (((x1 * (x1 * 2.0)) * (3.0 + t_7)) - t_8))))));
} else {
tmp = 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) :: 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 * x1)
t_1 = 3.0d0 * (x2 * (-2.0d0))
t_2 = (x1 * x1) + 1.0d0
t_3 = x1 + (x1 + (3.0d0 * (x1 * ((x1 * 3.0d0) + (-1.0d0)))))
t_4 = (-1.0d0) - (x1 * x1)
t_5 = x1 * (x1 * 3.0d0)
t_6 = t_5 + (2.0d0 * x2)
t_7 = (x1 - t_6) / t_2
t_8 = (x1 * x1) * (6.0d0 + (4.0d0 * t_7))
if (x1 <= (-2.2d+140)) then
tmp = t_3
else if (x1 <= (-3.2d+21)) then
tmp = x1 + (t_1 + (x1 + (t_0 + ((t_5 * ((t_6 - x1) / t_2)) + (t_4 * (t_8 - (-6.0d0)))))))
else if (x1 <= 3d+33) then
tmp = x1 + ((3.0d0 * ((x1 - (t_5 - (2.0d0 * x2))) / t_4)) + (x1 + (x2 * ((x1 * (-12.0d0)) + (8.0d0 * (x1 * x2))))))
else if (x1 <= 5d+153) then
tmp = x1 + (t_1 + (x1 + (t_0 - ((t_5 * t_7) - (t_2 * (((x1 * (x1 * 2.0d0)) * (3.0d0 + t_7)) - t_8))))))
else
tmp = t_3
end if
code = tmp
end function
public static double code(double x1, double x2) {
double t_0 = x1 * (x1 * x1);
double t_1 = 3.0 * (x2 * -2.0);
double t_2 = (x1 * x1) + 1.0;
double t_3 = x1 + (x1 + (3.0 * (x1 * ((x1 * 3.0) + -1.0))));
double t_4 = -1.0 - (x1 * x1);
double t_5 = x1 * (x1 * 3.0);
double t_6 = t_5 + (2.0 * x2);
double t_7 = (x1 - t_6) / t_2;
double t_8 = (x1 * x1) * (6.0 + (4.0 * t_7));
double tmp;
if (x1 <= -2.2e+140) {
tmp = t_3;
} else if (x1 <= -3.2e+21) {
tmp = x1 + (t_1 + (x1 + (t_0 + ((t_5 * ((t_6 - x1) / t_2)) + (t_4 * (t_8 - -6.0))))));
} else if (x1 <= 3e+33) {
tmp = x1 + ((3.0 * ((x1 - (t_5 - (2.0 * x2))) / t_4)) + (x1 + (x2 * ((x1 * -12.0) + (8.0 * (x1 * x2))))));
} else if (x1 <= 5e+153) {
tmp = x1 + (t_1 + (x1 + (t_0 - ((t_5 * t_7) - (t_2 * (((x1 * (x1 * 2.0)) * (3.0 + t_7)) - t_8))))));
} else {
tmp = t_3;
}
return tmp;
}
def code(x1, x2): t_0 = x1 * (x1 * x1) t_1 = 3.0 * (x2 * -2.0) t_2 = (x1 * x1) + 1.0 t_3 = x1 + (x1 + (3.0 * (x1 * ((x1 * 3.0) + -1.0)))) t_4 = -1.0 - (x1 * x1) t_5 = x1 * (x1 * 3.0) t_6 = t_5 + (2.0 * x2) t_7 = (x1 - t_6) / t_2 t_8 = (x1 * x1) * (6.0 + (4.0 * t_7)) tmp = 0 if x1 <= -2.2e+140: tmp = t_3 elif x1 <= -3.2e+21: tmp = x1 + (t_1 + (x1 + (t_0 + ((t_5 * ((t_6 - x1) / t_2)) + (t_4 * (t_8 - -6.0)))))) elif x1 <= 3e+33: tmp = x1 + ((3.0 * ((x1 - (t_5 - (2.0 * x2))) / t_4)) + (x1 + (x2 * ((x1 * -12.0) + (8.0 * (x1 * x2)))))) elif x1 <= 5e+153: tmp = x1 + (t_1 + (x1 + (t_0 - ((t_5 * t_7) - (t_2 * (((x1 * (x1 * 2.0)) * (3.0 + t_7)) - t_8)))))) else: tmp = t_3 return tmp
function code(x1, x2) t_0 = Float64(x1 * Float64(x1 * x1)) t_1 = Float64(3.0 * Float64(x2 * -2.0)) t_2 = Float64(Float64(x1 * x1) + 1.0) t_3 = Float64(x1 + Float64(x1 + Float64(3.0 * Float64(x1 * Float64(Float64(x1 * 3.0) + -1.0))))) t_4 = Float64(-1.0 - Float64(x1 * x1)) t_5 = Float64(x1 * Float64(x1 * 3.0)) t_6 = Float64(t_5 + Float64(2.0 * x2)) t_7 = Float64(Float64(x1 - t_6) / t_2) t_8 = Float64(Float64(x1 * x1) * Float64(6.0 + Float64(4.0 * t_7))) tmp = 0.0 if (x1 <= -2.2e+140) tmp = t_3; elseif (x1 <= -3.2e+21) tmp = Float64(x1 + Float64(t_1 + Float64(x1 + Float64(t_0 + Float64(Float64(t_5 * Float64(Float64(t_6 - x1) / t_2)) + Float64(t_4 * Float64(t_8 - -6.0))))))); elseif (x1 <= 3e+33) tmp = Float64(x1 + Float64(Float64(3.0 * Float64(Float64(x1 - Float64(t_5 - Float64(2.0 * x2))) / t_4)) + Float64(x1 + Float64(x2 * Float64(Float64(x1 * -12.0) + Float64(8.0 * Float64(x1 * x2))))))); elseif (x1 <= 5e+153) tmp = Float64(x1 + Float64(t_1 + Float64(x1 + Float64(t_0 - Float64(Float64(t_5 * t_7) - Float64(t_2 * Float64(Float64(Float64(x1 * Float64(x1 * 2.0)) * Float64(3.0 + t_7)) - t_8))))))); else tmp = t_3; end return tmp end
function tmp_2 = code(x1, x2) t_0 = x1 * (x1 * x1); t_1 = 3.0 * (x2 * -2.0); t_2 = (x1 * x1) + 1.0; t_3 = x1 + (x1 + (3.0 * (x1 * ((x1 * 3.0) + -1.0)))); t_4 = -1.0 - (x1 * x1); t_5 = x1 * (x1 * 3.0); t_6 = t_5 + (2.0 * x2); t_7 = (x1 - t_6) / t_2; t_8 = (x1 * x1) * (6.0 + (4.0 * t_7)); tmp = 0.0; if (x1 <= -2.2e+140) tmp = t_3; elseif (x1 <= -3.2e+21) tmp = x1 + (t_1 + (x1 + (t_0 + ((t_5 * ((t_6 - x1) / t_2)) + (t_4 * (t_8 - -6.0)))))); elseif (x1 <= 3e+33) tmp = x1 + ((3.0 * ((x1 - (t_5 - (2.0 * x2))) / t_4)) + (x1 + (x2 * ((x1 * -12.0) + (8.0 * (x1 * x2)))))); elseif (x1 <= 5e+153) tmp = x1 + (t_1 + (x1 + (t_0 - ((t_5 * t_7) - (t_2 * (((x1 * (x1 * 2.0)) * (3.0 + t_7)) - t_8)))))); else tmp = t_3; end tmp_2 = tmp; end
code[x1_, x2_] := Block[{t$95$0 = N[(x1 * N[(x1 * x1), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(3.0 * N[(x2 * -2.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(x1 * x1), $MachinePrecision] + 1.0), $MachinePrecision]}, Block[{t$95$3 = N[(x1 + N[(x1 + N[(3.0 * N[(x1 * N[(N[(x1 * 3.0), $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[(-1.0 - N[(x1 * x1), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$5 = N[(x1 * N[(x1 * 3.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$6 = N[(t$95$5 + N[(2.0 * x2), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$7 = N[(N[(x1 - t$95$6), $MachinePrecision] / t$95$2), $MachinePrecision]}, Block[{t$95$8 = N[(N[(x1 * x1), $MachinePrecision] * N[(6.0 + N[(4.0 * t$95$7), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x1, -2.2e+140], t$95$3, If[LessEqual[x1, -3.2e+21], N[(x1 + N[(t$95$1 + N[(x1 + N[(t$95$0 + N[(N[(t$95$5 * N[(N[(t$95$6 - x1), $MachinePrecision] / t$95$2), $MachinePrecision]), $MachinePrecision] + N[(t$95$4 * N[(t$95$8 - -6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 3e+33], N[(x1 + N[(N[(3.0 * N[(N[(x1 - N[(t$95$5 - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / t$95$4), $MachinePrecision]), $MachinePrecision] + N[(x1 + N[(x2 * N[(N[(x1 * -12.0), $MachinePrecision] + N[(8.0 * N[(x1 * x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 5e+153], N[(x1 + N[(t$95$1 + N[(x1 + N[(t$95$0 - N[(N[(t$95$5 * t$95$7), $MachinePrecision] - N[(t$95$2 * N[(N[(N[(x1 * N[(x1 * 2.0), $MachinePrecision]), $MachinePrecision] * N[(3.0 + t$95$7), $MachinePrecision]), $MachinePrecision] - t$95$8), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$3]]]]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x1 \cdot \left(x1 \cdot x1\right)\\
t_1 := 3 \cdot \left(x2 \cdot -2\right)\\
t_2 := x1 \cdot x1 + 1\\
t_3 := x1 + \left(x1 + 3 \cdot \left(x1 \cdot \left(x1 \cdot 3 + -1\right)\right)\right)\\
t_4 := -1 - x1 \cdot x1\\
t_5 := x1 \cdot \left(x1 \cdot 3\right)\\
t_6 := t\_5 + 2 \cdot x2\\
t_7 := \frac{x1 - t\_6}{t\_2}\\
t_8 := \left(x1 \cdot x1\right) \cdot \left(6 + 4 \cdot t\_7\right)\\
\mathbf{if}\;x1 \leq -2.2 \cdot 10^{+140}:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;x1 \leq -3.2 \cdot 10^{+21}:\\
\;\;\;\;x1 + \left(t\_1 + \left(x1 + \left(t\_0 + \left(t\_5 \cdot \frac{t\_6 - x1}{t\_2} + t\_4 \cdot \left(t\_8 - -6\right)\right)\right)\right)\right)\\
\mathbf{elif}\;x1 \leq 3 \cdot 10^{+33}:\\
\;\;\;\;x1 + \left(3 \cdot \frac{x1 - \left(t\_5 - 2 \cdot x2\right)}{t\_4} + \left(x1 + x2 \cdot \left(x1 \cdot -12 + 8 \cdot \left(x1 \cdot x2\right)\right)\right)\right)\\
\mathbf{elif}\;x1 \leq 5 \cdot 10^{+153}:\\
\;\;\;\;x1 + \left(t\_1 + \left(x1 + \left(t\_0 - \left(t\_5 \cdot t\_7 - t\_2 \cdot \left(\left(x1 \cdot \left(x1 \cdot 2\right)\right) \cdot \left(3 + t\_7\right) - t\_8\right)\right)\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t\_3\\
\end{array}
\end{array}
if x1 < -2.1999999999999998e140 or 5.00000000000000018e153 < x1 Initial program 0.0%
Taylor expanded in x1 around 0 0.0%
Taylor expanded in x1 around 0 69.1%
Taylor expanded in x2 around 0 100.0%
if -2.1999999999999998e140 < x1 < -3.2e21Initial program 82.5%
Taylor expanded in x1 around 0 82.5%
*-commutative82.5%
Simplified82.5%
Taylor expanded in x1 around inf 82.5%
associate-*r/82.5%
associate-*r/82.5%
metadata-eval82.5%
Simplified82.5%
Taylor expanded in x1 around inf 76.2%
if -3.2e21 < x1 < 2.99999999999999984e33Initial program 99.3%
Taylor expanded in x1 around 0 83.7%
Taylor expanded in x2 around 0 93.7%
if 2.99999999999999984e33 < x1 < 5.00000000000000018e153Initial program 99.6%
Taylor expanded in x1 around 0 99.6%
*-commutative99.6%
Simplified99.6%
Taylor expanded in x1 around 0 89.4%
Taylor expanded in x1 around inf 96.1%
Simplified96.1%
Final simplification93.6%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (* x1 (* x1 x1)))
(t_1 (* 3.0 (* x2 -2.0)))
(t_2 (+ (* x1 x1) 1.0))
(t_3 (+ x1 (+ x1 (* 3.0 (* x1 (+ (* x1 3.0) -1.0))))))
(t_4 (- -1.0 (* x1 x1)))
(t_5 (* x1 (* x1 3.0)))
(t_6 (+ t_5 (* 2.0 x2)))
(t_7 (/ (- t_6 x1) t_2))
(t_8 (* t_5 t_7))
(t_9 (/ (- x1 t_6) t_2)))
(if (<= x1 -2.2e+140)
t_3
(if (<= x1 -3.2e+21)
(+
x1
(+
t_1
(+
x1
(+ t_0 (+ t_8 (* t_4 (- (* (* x1 x1) (+ 6.0 (* 4.0 t_9))) -6.0)))))))
(if (<= x1 3e+33)
(+
x1
(+
(* 3.0 (/ (- x1 (- t_5 (* 2.0 x2))) t_4))
(+ x1 (* x2 (+ (* x1 -12.0) (* 8.0 (* x1 x2)))))))
(if (<= x1 5e+153)
(+
x1
(+
t_1
(+
x1
(+
t_0
(+
t_8
(*
t_2
(+
(* (* x1 x1) (- (* t_7 4.0) 6.0))
(* (/ 1.0 x1) (* (* x1 2.0) t_9)))))))))
t_3))))))
double code(double x1, double x2) {
double t_0 = x1 * (x1 * x1);
double t_1 = 3.0 * (x2 * -2.0);
double t_2 = (x1 * x1) + 1.0;
double t_3 = x1 + (x1 + (3.0 * (x1 * ((x1 * 3.0) + -1.0))));
double t_4 = -1.0 - (x1 * x1);
double t_5 = x1 * (x1 * 3.0);
double t_6 = t_5 + (2.0 * x2);
double t_7 = (t_6 - x1) / t_2;
double t_8 = t_5 * t_7;
double t_9 = (x1 - t_6) / t_2;
double tmp;
if (x1 <= -2.2e+140) {
tmp = t_3;
} else if (x1 <= -3.2e+21) {
tmp = x1 + (t_1 + (x1 + (t_0 + (t_8 + (t_4 * (((x1 * x1) * (6.0 + (4.0 * t_9))) - -6.0))))));
} else if (x1 <= 3e+33) {
tmp = x1 + ((3.0 * ((x1 - (t_5 - (2.0 * x2))) / t_4)) + (x1 + (x2 * ((x1 * -12.0) + (8.0 * (x1 * x2))))));
} else if (x1 <= 5e+153) {
tmp = x1 + (t_1 + (x1 + (t_0 + (t_8 + (t_2 * (((x1 * x1) * ((t_7 * 4.0) - 6.0)) + ((1.0 / x1) * ((x1 * 2.0) * t_9))))))));
} else {
tmp = 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) :: t_4
real(8) :: t_5
real(8) :: t_6
real(8) :: t_7
real(8) :: t_8
real(8) :: t_9
real(8) :: tmp
t_0 = x1 * (x1 * x1)
t_1 = 3.0d0 * (x2 * (-2.0d0))
t_2 = (x1 * x1) + 1.0d0
t_3 = x1 + (x1 + (3.0d0 * (x1 * ((x1 * 3.0d0) + (-1.0d0)))))
t_4 = (-1.0d0) - (x1 * x1)
t_5 = x1 * (x1 * 3.0d0)
t_6 = t_5 + (2.0d0 * x2)
t_7 = (t_6 - x1) / t_2
t_8 = t_5 * t_7
t_9 = (x1 - t_6) / t_2
if (x1 <= (-2.2d+140)) then
tmp = t_3
else if (x1 <= (-3.2d+21)) then
tmp = x1 + (t_1 + (x1 + (t_0 + (t_8 + (t_4 * (((x1 * x1) * (6.0d0 + (4.0d0 * t_9))) - (-6.0d0)))))))
else if (x1 <= 3d+33) then
tmp = x1 + ((3.0d0 * ((x1 - (t_5 - (2.0d0 * x2))) / t_4)) + (x1 + (x2 * ((x1 * (-12.0d0)) + (8.0d0 * (x1 * x2))))))
else if (x1 <= 5d+153) then
tmp = x1 + (t_1 + (x1 + (t_0 + (t_8 + (t_2 * (((x1 * x1) * ((t_7 * 4.0d0) - 6.0d0)) + ((1.0d0 / x1) * ((x1 * 2.0d0) * t_9))))))))
else
tmp = t_3
end if
code = tmp
end function
public static double code(double x1, double x2) {
double t_0 = x1 * (x1 * x1);
double t_1 = 3.0 * (x2 * -2.0);
double t_2 = (x1 * x1) + 1.0;
double t_3 = x1 + (x1 + (3.0 * (x1 * ((x1 * 3.0) + -1.0))));
double t_4 = -1.0 - (x1 * x1);
double t_5 = x1 * (x1 * 3.0);
double t_6 = t_5 + (2.0 * x2);
double t_7 = (t_6 - x1) / t_2;
double t_8 = t_5 * t_7;
double t_9 = (x1 - t_6) / t_2;
double tmp;
if (x1 <= -2.2e+140) {
tmp = t_3;
} else if (x1 <= -3.2e+21) {
tmp = x1 + (t_1 + (x1 + (t_0 + (t_8 + (t_4 * (((x1 * x1) * (6.0 + (4.0 * t_9))) - -6.0))))));
} else if (x1 <= 3e+33) {
tmp = x1 + ((3.0 * ((x1 - (t_5 - (2.0 * x2))) / t_4)) + (x1 + (x2 * ((x1 * -12.0) + (8.0 * (x1 * x2))))));
} else if (x1 <= 5e+153) {
tmp = x1 + (t_1 + (x1 + (t_0 + (t_8 + (t_2 * (((x1 * x1) * ((t_7 * 4.0) - 6.0)) + ((1.0 / x1) * ((x1 * 2.0) * t_9))))))));
} else {
tmp = t_3;
}
return tmp;
}
def code(x1, x2): t_0 = x1 * (x1 * x1) t_1 = 3.0 * (x2 * -2.0) t_2 = (x1 * x1) + 1.0 t_3 = x1 + (x1 + (3.0 * (x1 * ((x1 * 3.0) + -1.0)))) t_4 = -1.0 - (x1 * x1) t_5 = x1 * (x1 * 3.0) t_6 = t_5 + (2.0 * x2) t_7 = (t_6 - x1) / t_2 t_8 = t_5 * t_7 t_9 = (x1 - t_6) / t_2 tmp = 0 if x1 <= -2.2e+140: tmp = t_3 elif x1 <= -3.2e+21: tmp = x1 + (t_1 + (x1 + (t_0 + (t_8 + (t_4 * (((x1 * x1) * (6.0 + (4.0 * t_9))) - -6.0)))))) elif x1 <= 3e+33: tmp = x1 + ((3.0 * ((x1 - (t_5 - (2.0 * x2))) / t_4)) + (x1 + (x2 * ((x1 * -12.0) + (8.0 * (x1 * x2)))))) elif x1 <= 5e+153: tmp = x1 + (t_1 + (x1 + (t_0 + (t_8 + (t_2 * (((x1 * x1) * ((t_7 * 4.0) - 6.0)) + ((1.0 / x1) * ((x1 * 2.0) * t_9)))))))) else: tmp = t_3 return tmp
function code(x1, x2) t_0 = Float64(x1 * Float64(x1 * x1)) t_1 = Float64(3.0 * Float64(x2 * -2.0)) t_2 = Float64(Float64(x1 * x1) + 1.0) t_3 = Float64(x1 + Float64(x1 + Float64(3.0 * Float64(x1 * Float64(Float64(x1 * 3.0) + -1.0))))) t_4 = Float64(-1.0 - Float64(x1 * x1)) t_5 = Float64(x1 * Float64(x1 * 3.0)) t_6 = Float64(t_5 + Float64(2.0 * x2)) t_7 = Float64(Float64(t_6 - x1) / t_2) t_8 = Float64(t_5 * t_7) t_9 = Float64(Float64(x1 - t_6) / t_2) tmp = 0.0 if (x1 <= -2.2e+140) tmp = t_3; elseif (x1 <= -3.2e+21) tmp = Float64(x1 + Float64(t_1 + Float64(x1 + Float64(t_0 + Float64(t_8 + Float64(t_4 * Float64(Float64(Float64(x1 * x1) * Float64(6.0 + Float64(4.0 * t_9))) - -6.0))))))); elseif (x1 <= 3e+33) tmp = Float64(x1 + Float64(Float64(3.0 * Float64(Float64(x1 - Float64(t_5 - Float64(2.0 * x2))) / t_4)) + Float64(x1 + Float64(x2 * Float64(Float64(x1 * -12.0) + Float64(8.0 * Float64(x1 * x2))))))); elseif (x1 <= 5e+153) tmp = Float64(x1 + Float64(t_1 + Float64(x1 + Float64(t_0 + Float64(t_8 + Float64(t_2 * Float64(Float64(Float64(x1 * x1) * Float64(Float64(t_7 * 4.0) - 6.0)) + Float64(Float64(1.0 / x1) * Float64(Float64(x1 * 2.0) * t_9))))))))); else tmp = t_3; end return tmp end
function tmp_2 = code(x1, x2) t_0 = x1 * (x1 * x1); t_1 = 3.0 * (x2 * -2.0); t_2 = (x1 * x1) + 1.0; t_3 = x1 + (x1 + (3.0 * (x1 * ((x1 * 3.0) + -1.0)))); t_4 = -1.0 - (x1 * x1); t_5 = x1 * (x1 * 3.0); t_6 = t_5 + (2.0 * x2); t_7 = (t_6 - x1) / t_2; t_8 = t_5 * t_7; t_9 = (x1 - t_6) / t_2; tmp = 0.0; if (x1 <= -2.2e+140) tmp = t_3; elseif (x1 <= -3.2e+21) tmp = x1 + (t_1 + (x1 + (t_0 + (t_8 + (t_4 * (((x1 * x1) * (6.0 + (4.0 * t_9))) - -6.0)))))); elseif (x1 <= 3e+33) tmp = x1 + ((3.0 * ((x1 - (t_5 - (2.0 * x2))) / t_4)) + (x1 + (x2 * ((x1 * -12.0) + (8.0 * (x1 * x2)))))); elseif (x1 <= 5e+153) tmp = x1 + (t_1 + (x1 + (t_0 + (t_8 + (t_2 * (((x1 * x1) * ((t_7 * 4.0) - 6.0)) + ((1.0 / x1) * ((x1 * 2.0) * t_9)))))))); else tmp = t_3; end tmp_2 = tmp; end
code[x1_, x2_] := Block[{t$95$0 = N[(x1 * N[(x1 * x1), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(3.0 * N[(x2 * -2.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(x1 * x1), $MachinePrecision] + 1.0), $MachinePrecision]}, Block[{t$95$3 = N[(x1 + N[(x1 + N[(3.0 * N[(x1 * N[(N[(x1 * 3.0), $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[(-1.0 - N[(x1 * x1), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$5 = N[(x1 * N[(x1 * 3.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$6 = N[(t$95$5 + N[(2.0 * x2), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$7 = N[(N[(t$95$6 - x1), $MachinePrecision] / t$95$2), $MachinePrecision]}, Block[{t$95$8 = N[(t$95$5 * t$95$7), $MachinePrecision]}, Block[{t$95$9 = N[(N[(x1 - t$95$6), $MachinePrecision] / t$95$2), $MachinePrecision]}, If[LessEqual[x1, -2.2e+140], t$95$3, If[LessEqual[x1, -3.2e+21], N[(x1 + N[(t$95$1 + N[(x1 + N[(t$95$0 + N[(t$95$8 + N[(t$95$4 * N[(N[(N[(x1 * x1), $MachinePrecision] * N[(6.0 + N[(4.0 * t$95$9), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - -6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 3e+33], N[(x1 + N[(N[(3.0 * N[(N[(x1 - N[(t$95$5 - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / t$95$4), $MachinePrecision]), $MachinePrecision] + N[(x1 + N[(x2 * N[(N[(x1 * -12.0), $MachinePrecision] + N[(8.0 * N[(x1 * x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 5e+153], N[(x1 + N[(t$95$1 + N[(x1 + N[(t$95$0 + N[(t$95$8 + N[(t$95$2 * N[(N[(N[(x1 * x1), $MachinePrecision] * N[(N[(t$95$7 * 4.0), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision] + N[(N[(1.0 / x1), $MachinePrecision] * N[(N[(x1 * 2.0), $MachinePrecision] * t$95$9), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$3]]]]]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x1 \cdot \left(x1 \cdot x1\right)\\
t_1 := 3 \cdot \left(x2 \cdot -2\right)\\
t_2 := x1 \cdot x1 + 1\\
t_3 := x1 + \left(x1 + 3 \cdot \left(x1 \cdot \left(x1 \cdot 3 + -1\right)\right)\right)\\
t_4 := -1 - x1 \cdot x1\\
t_5 := x1 \cdot \left(x1 \cdot 3\right)\\
t_6 := t\_5 + 2 \cdot x2\\
t_7 := \frac{t\_6 - x1}{t\_2}\\
t_8 := t\_5 \cdot t\_7\\
t_9 := \frac{x1 - t\_6}{t\_2}\\
\mathbf{if}\;x1 \leq -2.2 \cdot 10^{+140}:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;x1 \leq -3.2 \cdot 10^{+21}:\\
\;\;\;\;x1 + \left(t\_1 + \left(x1 + \left(t\_0 + \left(t\_8 + t\_4 \cdot \left(\left(x1 \cdot x1\right) \cdot \left(6 + 4 \cdot t\_9\right) - -6\right)\right)\right)\right)\right)\\
\mathbf{elif}\;x1 \leq 3 \cdot 10^{+33}:\\
\;\;\;\;x1 + \left(3 \cdot \frac{x1 - \left(t\_5 - 2 \cdot x2\right)}{t\_4} + \left(x1 + x2 \cdot \left(x1 \cdot -12 + 8 \cdot \left(x1 \cdot x2\right)\right)\right)\right)\\
\mathbf{elif}\;x1 \leq 5 \cdot 10^{+153}:\\
\;\;\;\;x1 + \left(t\_1 + \left(x1 + \left(t\_0 + \left(t\_8 + t\_2 \cdot \left(\left(x1 \cdot x1\right) \cdot \left(t\_7 \cdot 4 - 6\right) + \frac{1}{x1} \cdot \left(\left(x1 \cdot 2\right) \cdot t\_9\right)\right)\right)\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t\_3\\
\end{array}
\end{array}
if x1 < -2.1999999999999998e140 or 5.00000000000000018e153 < x1 Initial program 0.0%
Taylor expanded in x1 around 0 0.0%
Taylor expanded in x1 around 0 69.1%
Taylor expanded in x2 around 0 100.0%
if -2.1999999999999998e140 < x1 < -3.2e21Initial program 82.5%
Taylor expanded in x1 around 0 82.5%
*-commutative82.5%
Simplified82.5%
Taylor expanded in x1 around inf 82.5%
associate-*r/82.5%
associate-*r/82.5%
metadata-eval82.5%
Simplified82.5%
Taylor expanded in x1 around inf 76.2%
if -3.2e21 < x1 < 2.99999999999999984e33Initial program 99.3%
Taylor expanded in x1 around 0 83.7%
Taylor expanded in x2 around 0 93.7%
if 2.99999999999999984e33 < x1 < 5.00000000000000018e153Initial program 99.6%
Taylor expanded in x1 around 0 99.6%
*-commutative99.6%
Simplified99.6%
Taylor expanded in x1 around inf 96.0%
Final simplification93.6%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (+ (* x1 x1) 1.0))
(t_1 (* x1 (* x1 3.0)))
(t_2 (+ t_1 (* 2.0 x2)))
(t_3 (+ x1 (+ x1 (* 3.0 (* x1 (+ (* x1 3.0) -1.0))))))
(t_4 (- -1.0 (* x1 x1)))
(t_5
(+
x1
(+
(* 3.0 (* x2 -2.0))
(+
x1
(+
(* x1 (* x1 x1))
(+
(* t_1 (/ (- t_2 x1) t_0))
(*
t_4
(-
(* (* x1 x1) (+ 6.0 (* 4.0 (/ (- x1 t_2) t_0))))
-6.0)))))))))
(if (<= x1 -2.2e+140)
t_3
(if (<= x1 -3.2e+21)
t_5
(if (<= x1 3e+33)
(+
x1
(+
(* 3.0 (/ (- x1 (- t_1 (* 2.0 x2))) t_4))
(+ x1 (* x2 (+ (* x1 -12.0) (* 8.0 (* x1 x2)))))))
(if (<= x1 5e+152) t_5 t_3))))))
double code(double x1, double x2) {
double t_0 = (x1 * x1) + 1.0;
double t_1 = x1 * (x1 * 3.0);
double t_2 = t_1 + (2.0 * x2);
double t_3 = x1 + (x1 + (3.0 * (x1 * ((x1 * 3.0) + -1.0))));
double t_4 = -1.0 - (x1 * x1);
double t_5 = x1 + ((3.0 * (x2 * -2.0)) + (x1 + ((x1 * (x1 * x1)) + ((t_1 * ((t_2 - x1) / t_0)) + (t_4 * (((x1 * x1) * (6.0 + (4.0 * ((x1 - t_2) / t_0)))) - -6.0))))));
double tmp;
if (x1 <= -2.2e+140) {
tmp = t_3;
} else if (x1 <= -3.2e+21) {
tmp = t_5;
} else if (x1 <= 3e+33) {
tmp = x1 + ((3.0 * ((x1 - (t_1 - (2.0 * x2))) / t_4)) + (x1 + (x2 * ((x1 * -12.0) + (8.0 * (x1 * x2))))));
} else if (x1 <= 5e+152) {
tmp = t_5;
} else {
tmp = 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) :: t_4
real(8) :: t_5
real(8) :: tmp
t_0 = (x1 * x1) + 1.0d0
t_1 = x1 * (x1 * 3.0d0)
t_2 = t_1 + (2.0d0 * x2)
t_3 = x1 + (x1 + (3.0d0 * (x1 * ((x1 * 3.0d0) + (-1.0d0)))))
t_4 = (-1.0d0) - (x1 * x1)
t_5 = x1 + ((3.0d0 * (x2 * (-2.0d0))) + (x1 + ((x1 * (x1 * x1)) + ((t_1 * ((t_2 - x1) / t_0)) + (t_4 * (((x1 * x1) * (6.0d0 + (4.0d0 * ((x1 - t_2) / t_0)))) - (-6.0d0)))))))
if (x1 <= (-2.2d+140)) then
tmp = t_3
else if (x1 <= (-3.2d+21)) then
tmp = t_5
else if (x1 <= 3d+33) then
tmp = x1 + ((3.0d0 * ((x1 - (t_1 - (2.0d0 * x2))) / t_4)) + (x1 + (x2 * ((x1 * (-12.0d0)) + (8.0d0 * (x1 * x2))))))
else if (x1 <= 5d+152) then
tmp = t_5
else
tmp = t_3
end if
code = tmp
end function
public static double code(double x1, double x2) {
double t_0 = (x1 * x1) + 1.0;
double t_1 = x1 * (x1 * 3.0);
double t_2 = t_1 + (2.0 * x2);
double t_3 = x1 + (x1 + (3.0 * (x1 * ((x1 * 3.0) + -1.0))));
double t_4 = -1.0 - (x1 * x1);
double t_5 = x1 + ((3.0 * (x2 * -2.0)) + (x1 + ((x1 * (x1 * x1)) + ((t_1 * ((t_2 - x1) / t_0)) + (t_4 * (((x1 * x1) * (6.0 + (4.0 * ((x1 - t_2) / t_0)))) - -6.0))))));
double tmp;
if (x1 <= -2.2e+140) {
tmp = t_3;
} else if (x1 <= -3.2e+21) {
tmp = t_5;
} else if (x1 <= 3e+33) {
tmp = x1 + ((3.0 * ((x1 - (t_1 - (2.0 * x2))) / t_4)) + (x1 + (x2 * ((x1 * -12.0) + (8.0 * (x1 * x2))))));
} else if (x1 <= 5e+152) {
tmp = t_5;
} else {
tmp = t_3;
}
return tmp;
}
def code(x1, x2): t_0 = (x1 * x1) + 1.0 t_1 = x1 * (x1 * 3.0) t_2 = t_1 + (2.0 * x2) t_3 = x1 + (x1 + (3.0 * (x1 * ((x1 * 3.0) + -1.0)))) t_4 = -1.0 - (x1 * x1) t_5 = x1 + ((3.0 * (x2 * -2.0)) + (x1 + ((x1 * (x1 * x1)) + ((t_1 * ((t_2 - x1) / t_0)) + (t_4 * (((x1 * x1) * (6.0 + (4.0 * ((x1 - t_2) / t_0)))) - -6.0)))))) tmp = 0 if x1 <= -2.2e+140: tmp = t_3 elif x1 <= -3.2e+21: tmp = t_5 elif x1 <= 3e+33: tmp = x1 + ((3.0 * ((x1 - (t_1 - (2.0 * x2))) / t_4)) + (x1 + (x2 * ((x1 * -12.0) + (8.0 * (x1 * x2)))))) elif x1 <= 5e+152: tmp = t_5 else: tmp = t_3 return tmp
function code(x1, x2) t_0 = Float64(Float64(x1 * x1) + 1.0) t_1 = Float64(x1 * Float64(x1 * 3.0)) t_2 = Float64(t_1 + Float64(2.0 * x2)) t_3 = Float64(x1 + Float64(x1 + Float64(3.0 * Float64(x1 * Float64(Float64(x1 * 3.0) + -1.0))))) t_4 = Float64(-1.0 - Float64(x1 * x1)) t_5 = Float64(x1 + Float64(Float64(3.0 * Float64(x2 * -2.0)) + Float64(x1 + Float64(Float64(x1 * Float64(x1 * x1)) + Float64(Float64(t_1 * Float64(Float64(t_2 - x1) / t_0)) + Float64(t_4 * Float64(Float64(Float64(x1 * x1) * Float64(6.0 + Float64(4.0 * Float64(Float64(x1 - t_2) / t_0)))) - -6.0))))))) tmp = 0.0 if (x1 <= -2.2e+140) tmp = t_3; elseif (x1 <= -3.2e+21) tmp = t_5; elseif (x1 <= 3e+33) tmp = Float64(x1 + Float64(Float64(3.0 * Float64(Float64(x1 - Float64(t_1 - Float64(2.0 * x2))) / t_4)) + Float64(x1 + Float64(x2 * Float64(Float64(x1 * -12.0) + Float64(8.0 * Float64(x1 * x2))))))); elseif (x1 <= 5e+152) tmp = t_5; else tmp = t_3; end return tmp end
function tmp_2 = code(x1, x2) t_0 = (x1 * x1) + 1.0; t_1 = x1 * (x1 * 3.0); t_2 = t_1 + (2.0 * x2); t_3 = x1 + (x1 + (3.0 * (x1 * ((x1 * 3.0) + -1.0)))); t_4 = -1.0 - (x1 * x1); t_5 = x1 + ((3.0 * (x2 * -2.0)) + (x1 + ((x1 * (x1 * x1)) + ((t_1 * ((t_2 - x1) / t_0)) + (t_4 * (((x1 * x1) * (6.0 + (4.0 * ((x1 - t_2) / t_0)))) - -6.0)))))); tmp = 0.0; if (x1 <= -2.2e+140) tmp = t_3; elseif (x1 <= -3.2e+21) tmp = t_5; elseif (x1 <= 3e+33) tmp = x1 + ((3.0 * ((x1 - (t_1 - (2.0 * x2))) / t_4)) + (x1 + (x2 * ((x1 * -12.0) + (8.0 * (x1 * x2)))))); elseif (x1 <= 5e+152) tmp = t_5; else tmp = t_3; end tmp_2 = tmp; end
code[x1_, x2_] := Block[{t$95$0 = N[(N[(x1 * x1), $MachinePrecision] + 1.0), $MachinePrecision]}, Block[{t$95$1 = N[(x1 * N[(x1 * 3.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(t$95$1 + N[(2.0 * x2), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(x1 + N[(x1 + N[(3.0 * N[(x1 * N[(N[(x1 * 3.0), $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[(-1.0 - N[(x1 * x1), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$5 = N[(x1 + N[(N[(3.0 * N[(x2 * -2.0), $MachinePrecision]), $MachinePrecision] + N[(x1 + N[(N[(x1 * N[(x1 * x1), $MachinePrecision]), $MachinePrecision] + N[(N[(t$95$1 * N[(N[(t$95$2 - x1), $MachinePrecision] / t$95$0), $MachinePrecision]), $MachinePrecision] + N[(t$95$4 * N[(N[(N[(x1 * x1), $MachinePrecision] * N[(6.0 + N[(4.0 * N[(N[(x1 - t$95$2), $MachinePrecision] / t$95$0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - -6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x1, -2.2e+140], t$95$3, If[LessEqual[x1, -3.2e+21], t$95$5, If[LessEqual[x1, 3e+33], 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[(x1 + N[(x2 * N[(N[(x1 * -12.0), $MachinePrecision] + N[(8.0 * N[(x1 * x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 5e+152], t$95$5, t$95$3]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x1 \cdot x1 + 1\\
t_1 := x1 \cdot \left(x1 \cdot 3\right)\\
t_2 := t\_1 + 2 \cdot x2\\
t_3 := x1 + \left(x1 + 3 \cdot \left(x1 \cdot \left(x1 \cdot 3 + -1\right)\right)\right)\\
t_4 := -1 - x1 \cdot x1\\
t_5 := x1 + \left(3 \cdot \left(x2 \cdot -2\right) + \left(x1 + \left(x1 \cdot \left(x1 \cdot x1\right) + \left(t\_1 \cdot \frac{t\_2 - x1}{t\_0} + t\_4 \cdot \left(\left(x1 \cdot x1\right) \cdot \left(6 + 4 \cdot \frac{x1 - t\_2}{t\_0}\right) - -6\right)\right)\right)\right)\right)\\
\mathbf{if}\;x1 \leq -2.2 \cdot 10^{+140}:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;x1 \leq -3.2 \cdot 10^{+21}:\\
\;\;\;\;t\_5\\
\mathbf{elif}\;x1 \leq 3 \cdot 10^{+33}:\\
\;\;\;\;x1 + \left(3 \cdot \frac{x1 - \left(t\_1 - 2 \cdot x2\right)}{t\_4} + \left(x1 + x2 \cdot \left(x1 \cdot -12 + 8 \cdot \left(x1 \cdot x2\right)\right)\right)\right)\\
\mathbf{elif}\;x1 \leq 5 \cdot 10^{+152}:\\
\;\;\;\;t\_5\\
\mathbf{else}:\\
\;\;\;\;t\_3\\
\end{array}
\end{array}
if x1 < -2.1999999999999998e140 or 5e152 < x1 Initial program 0.0%
Taylor expanded in x1 around 0 0.0%
Taylor expanded in x1 around 0 69.1%
Taylor expanded in x2 around 0 100.0%
if -2.1999999999999998e140 < x1 < -3.2e21 or 2.99999999999999984e33 < x1 < 5e152Initial program 90.8%
Taylor expanded in x1 around 0 90.8%
*-commutative90.8%
Simplified90.8%
Taylor expanded in x1 around inf 90.8%
associate-*r/90.8%
associate-*r/90.8%
metadata-eval90.8%
Simplified90.8%
Taylor expanded in x1 around inf 85.7%
if -3.2e21 < x1 < 2.99999999999999984e33Initial program 99.3%
Taylor expanded in x1 around 0 83.7%
Taylor expanded in x2 around 0 93.7%
Final simplification93.6%
(FPCore (x1 x2)
:precision binary64
(if (<= x1 -4.4e+153)
(+ x1 (+ x1 (* 3.0 (* x1 (+ (* x1 3.0) -1.0)))))
(if (<= x1 4e-112)
(+
x1
(+
(+ x1 (* x2 (+ (* x1 -12.0) (* 8.0 (* x1 x2)))))
(*
3.0
(+
(* x2 -2.0)
(* x1 (+ -1.0 (* x2 (+ (* x1 2.0) (* 3.0 (/ x1 x2))))))))))
(+
x1
(-
(* x2 -6.0)
(*
x1
(+
2.0
(+
(* x1 (- (* 3.0 (- (* x2 -2.0) 3.0)) (* x1 3.0)))
(* 4.0 (* x2 (- 3.0 (* 2.0 x2))))))))))))
double code(double x1, double x2) {
double tmp;
if (x1 <= -4.4e+153) {
tmp = x1 + (x1 + (3.0 * (x1 * ((x1 * 3.0) + -1.0))));
} else if (x1 <= 4e-112) {
tmp = x1 + ((x1 + (x2 * ((x1 * -12.0) + (8.0 * (x1 * x2))))) + (3.0 * ((x2 * -2.0) + (x1 * (-1.0 + (x2 * ((x1 * 2.0) + (3.0 * (x1 / x2)))))))));
} else {
tmp = x1 + ((x2 * -6.0) - (x1 * (2.0 + ((x1 * ((3.0 * ((x2 * -2.0) - 3.0)) - (x1 * 3.0))) + (4.0 * (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) :: tmp
if (x1 <= (-4.4d+153)) then
tmp = x1 + (x1 + (3.0d0 * (x1 * ((x1 * 3.0d0) + (-1.0d0)))))
else if (x1 <= 4d-112) then
tmp = x1 + ((x1 + (x2 * ((x1 * (-12.0d0)) + (8.0d0 * (x1 * x2))))) + (3.0d0 * ((x2 * (-2.0d0)) + (x1 * ((-1.0d0) + (x2 * ((x1 * 2.0d0) + (3.0d0 * (x1 / x2)))))))))
else
tmp = x1 + ((x2 * (-6.0d0)) - (x1 * (2.0d0 + ((x1 * ((3.0d0 * ((x2 * (-2.0d0)) - 3.0d0)) - (x1 * 3.0d0))) + (4.0d0 * (x2 * (3.0d0 - (2.0d0 * x2))))))))
end if
code = tmp
end function
public static double code(double x1, double x2) {
double tmp;
if (x1 <= -4.4e+153) {
tmp = x1 + (x1 + (3.0 * (x1 * ((x1 * 3.0) + -1.0))));
} else if (x1 <= 4e-112) {
tmp = x1 + ((x1 + (x2 * ((x1 * -12.0) + (8.0 * (x1 * x2))))) + (3.0 * ((x2 * -2.0) + (x1 * (-1.0 + (x2 * ((x1 * 2.0) + (3.0 * (x1 / x2)))))))));
} else {
tmp = x1 + ((x2 * -6.0) - (x1 * (2.0 + ((x1 * ((3.0 * ((x2 * -2.0) - 3.0)) - (x1 * 3.0))) + (4.0 * (x2 * (3.0 - (2.0 * x2))))))));
}
return tmp;
}
def code(x1, x2): tmp = 0 if x1 <= -4.4e+153: tmp = x1 + (x1 + (3.0 * (x1 * ((x1 * 3.0) + -1.0)))) elif x1 <= 4e-112: tmp = x1 + ((x1 + (x2 * ((x1 * -12.0) + (8.0 * (x1 * x2))))) + (3.0 * ((x2 * -2.0) + (x1 * (-1.0 + (x2 * ((x1 * 2.0) + (3.0 * (x1 / x2))))))))) else: tmp = x1 + ((x2 * -6.0) - (x1 * (2.0 + ((x1 * ((3.0 * ((x2 * -2.0) - 3.0)) - (x1 * 3.0))) + (4.0 * (x2 * (3.0 - (2.0 * x2)))))))) return tmp
function code(x1, x2) tmp = 0.0 if (x1 <= -4.4e+153) tmp = Float64(x1 + Float64(x1 + Float64(3.0 * Float64(x1 * Float64(Float64(x1 * 3.0) + -1.0))))); elseif (x1 <= 4e-112) tmp = Float64(x1 + Float64(Float64(x1 + Float64(x2 * Float64(Float64(x1 * -12.0) + Float64(8.0 * Float64(x1 * x2))))) + Float64(3.0 * Float64(Float64(x2 * -2.0) + Float64(x1 * Float64(-1.0 + Float64(x2 * Float64(Float64(x1 * 2.0) + Float64(3.0 * Float64(x1 / x2)))))))))); else tmp = Float64(x1 + Float64(Float64(x2 * -6.0) - Float64(x1 * Float64(2.0 + Float64(Float64(x1 * Float64(Float64(3.0 * Float64(Float64(x2 * -2.0) - 3.0)) - Float64(x1 * 3.0))) + Float64(4.0 * Float64(x2 * Float64(3.0 - Float64(2.0 * x2))))))))); end return tmp end
function tmp_2 = code(x1, x2) tmp = 0.0; if (x1 <= -4.4e+153) tmp = x1 + (x1 + (3.0 * (x1 * ((x1 * 3.0) + -1.0)))); elseif (x1 <= 4e-112) tmp = x1 + ((x1 + (x2 * ((x1 * -12.0) + (8.0 * (x1 * x2))))) + (3.0 * ((x2 * -2.0) + (x1 * (-1.0 + (x2 * ((x1 * 2.0) + (3.0 * (x1 / x2))))))))); else tmp = x1 + ((x2 * -6.0) - (x1 * (2.0 + ((x1 * ((3.0 * ((x2 * -2.0) - 3.0)) - (x1 * 3.0))) + (4.0 * (x2 * (3.0 - (2.0 * x2)))))))); end tmp_2 = tmp; end
code[x1_, x2_] := If[LessEqual[x1, -4.4e+153], N[(x1 + N[(x1 + N[(3.0 * N[(x1 * N[(N[(x1 * 3.0), $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 4e-112], N[(x1 + N[(N[(x1 + N[(x2 * N[(N[(x1 * -12.0), $MachinePrecision] + N[(8.0 * N[(x1 * x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(3.0 * N[(N[(x2 * -2.0), $MachinePrecision] + N[(x1 * N[(-1.0 + N[(x2 * N[(N[(x1 * 2.0), $MachinePrecision] + N[(3.0 * N[(x1 / x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x1 + N[(N[(x2 * -6.0), $MachinePrecision] - N[(x1 * N[(2.0 + N[(N[(x1 * N[(N[(3.0 * N[(N[(x2 * -2.0), $MachinePrecision] - 3.0), $MachinePrecision]), $MachinePrecision] - N[(x1 * 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(4.0 * N[(x2 * N[(3.0 - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x1 \leq -4.4 \cdot 10^{+153}:\\
\;\;\;\;x1 + \left(x1 + 3 \cdot \left(x1 \cdot \left(x1 \cdot 3 + -1\right)\right)\right)\\
\mathbf{elif}\;x1 \leq 4 \cdot 10^{-112}:\\
\;\;\;\;x1 + \left(\left(x1 + x2 \cdot \left(x1 \cdot -12 + 8 \cdot \left(x1 \cdot x2\right)\right)\right) + 3 \cdot \left(x2 \cdot -2 + x1 \cdot \left(-1 + x2 \cdot \left(x1 \cdot 2 + 3 \cdot \frac{x1}{x2}\right)\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x1 + \left(x2 \cdot -6 - x1 \cdot \left(2 + \left(x1 \cdot \left(3 \cdot \left(x2 \cdot -2 - 3\right) - x1 \cdot 3\right) + 4 \cdot \left(x2 \cdot \left(3 - 2 \cdot x2\right)\right)\right)\right)\right)\\
\end{array}
\end{array}
if x1 < -4.3999999999999999e153Initial program 0.0%
Taylor expanded in x1 around 0 0.0%
Taylor expanded in x1 around 0 64.1%
Taylor expanded in x2 around 0 100.0%
if -4.3999999999999999e153 < x1 < 3.9999999999999998e-112Initial program 95.6%
Taylor expanded in x1 around 0 68.4%
Taylor expanded in x1 around 0 66.8%
Taylor expanded in x2 around 0 76.6%
Taylor expanded in x2 around inf 79.4%
if 3.9999999999999998e-112 < x1 Initial program 64.6%
Taylor expanded in x1 around 0 37.7%
Taylor expanded in x1 around 0 80.0%
Final simplification82.7%
(FPCore (x1 x2)
:precision binary64
(if (<= x1 -4.5e+142)
(+ x1 (+ x1 (* 3.0 (* x1 (+ (* x1 3.0) -1.0)))))
(if (<= x1 1.1e-111)
(+
x1
(+
(+ x1 (* x2 (+ (* x1 -12.0) (* 8.0 (* x1 x2)))))
(+ (* x2 -6.0) (* x1 -3.0))))
(+
x1
(-
(* x2 -6.0)
(*
x1
(+
2.0
(+
(* x1 (- (* 3.0 (- (* x2 -2.0) 3.0)) (* x1 3.0)))
(* 4.0 (* x2 (- 3.0 (* 2.0 x2))))))))))))
double code(double x1, double x2) {
double tmp;
if (x1 <= -4.5e+142) {
tmp = x1 + (x1 + (3.0 * (x1 * ((x1 * 3.0) + -1.0))));
} else if (x1 <= 1.1e-111) {
tmp = x1 + ((x1 + (x2 * ((x1 * -12.0) + (8.0 * (x1 * x2))))) + ((x2 * -6.0) + (x1 * -3.0)));
} else {
tmp = x1 + ((x2 * -6.0) - (x1 * (2.0 + ((x1 * ((3.0 * ((x2 * -2.0) - 3.0)) - (x1 * 3.0))) + (4.0 * (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) :: tmp
if (x1 <= (-4.5d+142)) then
tmp = x1 + (x1 + (3.0d0 * (x1 * ((x1 * 3.0d0) + (-1.0d0)))))
else if (x1 <= 1.1d-111) then
tmp = x1 + ((x1 + (x2 * ((x1 * (-12.0d0)) + (8.0d0 * (x1 * x2))))) + ((x2 * (-6.0d0)) + (x1 * (-3.0d0))))
else
tmp = x1 + ((x2 * (-6.0d0)) - (x1 * (2.0d0 + ((x1 * ((3.0d0 * ((x2 * (-2.0d0)) - 3.0d0)) - (x1 * 3.0d0))) + (4.0d0 * (x2 * (3.0d0 - (2.0d0 * x2))))))))
end if
code = tmp
end function
public static double code(double x1, double x2) {
double tmp;
if (x1 <= -4.5e+142) {
tmp = x1 + (x1 + (3.0 * (x1 * ((x1 * 3.0) + -1.0))));
} else if (x1 <= 1.1e-111) {
tmp = x1 + ((x1 + (x2 * ((x1 * -12.0) + (8.0 * (x1 * x2))))) + ((x2 * -6.0) + (x1 * -3.0)));
} else {
tmp = x1 + ((x2 * -6.0) - (x1 * (2.0 + ((x1 * ((3.0 * ((x2 * -2.0) - 3.0)) - (x1 * 3.0))) + (4.0 * (x2 * (3.0 - (2.0 * x2))))))));
}
return tmp;
}
def code(x1, x2): tmp = 0 if x1 <= -4.5e+142: tmp = x1 + (x1 + (3.0 * (x1 * ((x1 * 3.0) + -1.0)))) elif x1 <= 1.1e-111: tmp = x1 + ((x1 + (x2 * ((x1 * -12.0) + (8.0 * (x1 * x2))))) + ((x2 * -6.0) + (x1 * -3.0))) else: tmp = x1 + ((x2 * -6.0) - (x1 * (2.0 + ((x1 * ((3.0 * ((x2 * -2.0) - 3.0)) - (x1 * 3.0))) + (4.0 * (x2 * (3.0 - (2.0 * x2)))))))) return tmp
function code(x1, x2) tmp = 0.0 if (x1 <= -4.5e+142) tmp = Float64(x1 + Float64(x1 + Float64(3.0 * Float64(x1 * Float64(Float64(x1 * 3.0) + -1.0))))); elseif (x1 <= 1.1e-111) tmp = Float64(x1 + Float64(Float64(x1 + Float64(x2 * Float64(Float64(x1 * -12.0) + Float64(8.0 * Float64(x1 * x2))))) + Float64(Float64(x2 * -6.0) + Float64(x1 * -3.0)))); else tmp = Float64(x1 + Float64(Float64(x2 * -6.0) - Float64(x1 * Float64(2.0 + Float64(Float64(x1 * Float64(Float64(3.0 * Float64(Float64(x2 * -2.0) - 3.0)) - Float64(x1 * 3.0))) + Float64(4.0 * Float64(x2 * Float64(3.0 - Float64(2.0 * x2))))))))); end return tmp end
function tmp_2 = code(x1, x2) tmp = 0.0; if (x1 <= -4.5e+142) tmp = x1 + (x1 + (3.0 * (x1 * ((x1 * 3.0) + -1.0)))); elseif (x1 <= 1.1e-111) tmp = x1 + ((x1 + (x2 * ((x1 * -12.0) + (8.0 * (x1 * x2))))) + ((x2 * -6.0) + (x1 * -3.0))); else tmp = x1 + ((x2 * -6.0) - (x1 * (2.0 + ((x1 * ((3.0 * ((x2 * -2.0) - 3.0)) - (x1 * 3.0))) + (4.0 * (x2 * (3.0 - (2.0 * x2)))))))); end tmp_2 = tmp; end
code[x1_, x2_] := If[LessEqual[x1, -4.5e+142], N[(x1 + N[(x1 + N[(3.0 * N[(x1 * N[(N[(x1 * 3.0), $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 1.1e-111], N[(x1 + N[(N[(x1 + N[(x2 * N[(N[(x1 * -12.0), $MachinePrecision] + N[(8.0 * N[(x1 * x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(x2 * -6.0), $MachinePrecision] + N[(x1 * -3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x1 + N[(N[(x2 * -6.0), $MachinePrecision] - N[(x1 * N[(2.0 + N[(N[(x1 * N[(N[(3.0 * N[(N[(x2 * -2.0), $MachinePrecision] - 3.0), $MachinePrecision]), $MachinePrecision] - N[(x1 * 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(4.0 * N[(x2 * N[(3.0 - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x1 \leq -4.5 \cdot 10^{+142}:\\
\;\;\;\;x1 + \left(x1 + 3 \cdot \left(x1 \cdot \left(x1 \cdot 3 + -1\right)\right)\right)\\
\mathbf{elif}\;x1 \leq 1.1 \cdot 10^{-111}:\\
\;\;\;\;x1 + \left(\left(x1 + x2 \cdot \left(x1 \cdot -12 + 8 \cdot \left(x1 \cdot x2\right)\right)\right) + \left(x2 \cdot -6 + x1 \cdot -3\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x1 + \left(x2 \cdot -6 - x1 \cdot \left(2 + \left(x1 \cdot \left(3 \cdot \left(x2 \cdot -2 - 3\right) - x1 \cdot 3\right) + 4 \cdot \left(x2 \cdot \left(3 - 2 \cdot x2\right)\right)\right)\right)\right)\\
\end{array}
\end{array}
if x1 < -4.4999999999999999e142Initial program 0.0%
Taylor expanded in x1 around 0 0.0%
Taylor expanded in x1 around 0 64.1%
Taylor expanded in x2 around 0 100.0%
if -4.4999999999999999e142 < x1 < 1.1e-111Initial program 95.6%
Taylor expanded in x1 around 0 68.4%
Taylor expanded in x1 around 0 66.8%
Taylor expanded in x2 around 0 76.6%
Taylor expanded in x1 around 0 78.3%
if 1.1e-111 < x1 Initial program 64.6%
Taylor expanded in x1 around 0 37.7%
Taylor expanded in x1 around 0 80.0%
Final simplification82.2%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (- x1 (* x1 (+ 2.0 (* 4.0 (* x2 (- 3.0 (* 2.0 x2))))))))
(t_1 (+ x1 (+ x1 (* 3.0 (* x1 (+ (* x1 3.0) -1.0)))))))
(if (<= x1 -5.2e+140)
t_1
(if (<= x1 -1.3e-74)
t_0
(if (<= x1 3.8e-140)
(+ x1 (* x2 -6.0))
(if (<= x1 4.4e+153) t_0 t_1))))))
double code(double x1, double x2) {
double t_0 = x1 - (x1 * (2.0 + (4.0 * (x2 * (3.0 - (2.0 * x2))))));
double t_1 = x1 + (x1 + (3.0 * (x1 * ((x1 * 3.0) + -1.0))));
double tmp;
if (x1 <= -5.2e+140) {
tmp = t_1;
} else if (x1 <= -1.3e-74) {
tmp = t_0;
} else if (x1 <= 3.8e-140) {
tmp = x1 + (x2 * -6.0);
} else if (x1 <= 4.4e+153) {
tmp = t_0;
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
real(8) :: t_0
real(8) :: t_1
real(8) :: tmp
t_0 = x1 - (x1 * (2.0d0 + (4.0d0 * (x2 * (3.0d0 - (2.0d0 * x2))))))
t_1 = x1 + (x1 + (3.0d0 * (x1 * ((x1 * 3.0d0) + (-1.0d0)))))
if (x1 <= (-5.2d+140)) then
tmp = t_1
else if (x1 <= (-1.3d-74)) then
tmp = t_0
else if (x1 <= 3.8d-140) then
tmp = x1 + (x2 * (-6.0d0))
else if (x1 <= 4.4d+153) then
tmp = t_0
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x1, double x2) {
double t_0 = x1 - (x1 * (2.0 + (4.0 * (x2 * (3.0 - (2.0 * x2))))));
double t_1 = x1 + (x1 + (3.0 * (x1 * ((x1 * 3.0) + -1.0))));
double tmp;
if (x1 <= -5.2e+140) {
tmp = t_1;
} else if (x1 <= -1.3e-74) {
tmp = t_0;
} else if (x1 <= 3.8e-140) {
tmp = x1 + (x2 * -6.0);
} else if (x1 <= 4.4e+153) {
tmp = t_0;
} else {
tmp = t_1;
}
return tmp;
}
def code(x1, x2): t_0 = x1 - (x1 * (2.0 + (4.0 * (x2 * (3.0 - (2.0 * x2)))))) t_1 = x1 + (x1 + (3.0 * (x1 * ((x1 * 3.0) + -1.0)))) tmp = 0 if x1 <= -5.2e+140: tmp = t_1 elif x1 <= -1.3e-74: tmp = t_0 elif x1 <= 3.8e-140: tmp = x1 + (x2 * -6.0) elif x1 <= 4.4e+153: tmp = t_0 else: tmp = t_1 return tmp
function code(x1, x2) t_0 = Float64(x1 - Float64(x1 * Float64(2.0 + Float64(4.0 * Float64(x2 * Float64(3.0 - Float64(2.0 * x2))))))) t_1 = Float64(x1 + Float64(x1 + Float64(3.0 * Float64(x1 * Float64(Float64(x1 * 3.0) + -1.0))))) tmp = 0.0 if (x1 <= -5.2e+140) tmp = t_1; elseif (x1 <= -1.3e-74) tmp = t_0; elseif (x1 <= 3.8e-140) tmp = Float64(x1 + Float64(x2 * -6.0)); elseif (x1 <= 4.4e+153) tmp = t_0; else tmp = t_1; end return tmp end
function tmp_2 = code(x1, x2) t_0 = x1 - (x1 * (2.0 + (4.0 * (x2 * (3.0 - (2.0 * x2)))))); t_1 = x1 + (x1 + (3.0 * (x1 * ((x1 * 3.0) + -1.0)))); tmp = 0.0; if (x1 <= -5.2e+140) tmp = t_1; elseif (x1 <= -1.3e-74) tmp = t_0; elseif (x1 <= 3.8e-140) tmp = x1 + (x2 * -6.0); elseif (x1 <= 4.4e+153) tmp = t_0; else tmp = t_1; end tmp_2 = tmp; end
code[x1_, x2_] := Block[{t$95$0 = N[(x1 - N[(x1 * N[(2.0 + N[(4.0 * N[(x2 * N[(3.0 - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(x1 + N[(x1 + N[(3.0 * N[(x1 * N[(N[(x1 * 3.0), $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x1, -5.2e+140], t$95$1, If[LessEqual[x1, -1.3e-74], t$95$0, If[LessEqual[x1, 3.8e-140], N[(x1 + N[(x2 * -6.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 4.4e+153], t$95$0, t$95$1]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x1 - x1 \cdot \left(2 + 4 \cdot \left(x2 \cdot \left(3 - 2 \cdot x2\right)\right)\right)\\
t_1 := x1 + \left(x1 + 3 \cdot \left(x1 \cdot \left(x1 \cdot 3 + -1\right)\right)\right)\\
\mathbf{if}\;x1 \leq -5.2 \cdot 10^{+140}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;x1 \leq -1.3 \cdot 10^{-74}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;x1 \leq 3.8 \cdot 10^{-140}:\\
\;\;\;\;x1 + x2 \cdot -6\\
\mathbf{elif}\;x1 \leq 4.4 \cdot 10^{+153}:\\
\;\;\;\;t\_0\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if x1 < -5.2000000000000002e140 or 4.3999999999999999e153 < x1 Initial program 0.0%
Taylor expanded in x1 around 0 0.0%
Taylor expanded in x1 around 0 69.1%
Taylor expanded in x2 around 0 100.0%
if -5.2000000000000002e140 < x1 < -1.3e-74 or 3.79999999999999998e-140 < x1 < 4.3999999999999999e153Initial program 94.7%
Taylor expanded in x1 around 0 51.4%
Taylor expanded in x1 around 0 46.3%
Taylor expanded in x2 around 0 42.7%
Taylor expanded in x1 around 0 40.9%
if -1.3e-74 < x1 < 3.79999999999999998e-140Initial program 99.4%
Taylor expanded in x1 around 0 85.0%
Taylor expanded in x1 around 0 85.0%
Taylor expanded in x1 around 0 64.1%
*-commutative64.1%
Simplified64.1%
Final simplification63.7%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (- x1 (* x1 (- -1.0 (* x2 (- (* x2 8.0) 12.0))))))
(t_1 (+ x1 (+ x1 (* 3.0 (* x1 (+ (* x1 3.0) -1.0)))))))
(if (<= x1 -2.2e+140)
t_1
(if (<= x1 -3e-19)
t_0
(if (<= x1 3.9e-63)
(+ x1 (* x2 -6.0))
(if (<= x1 4.4e+153) t_0 t_1))))))
double code(double x1, double x2) {
double t_0 = x1 - (x1 * (-1.0 - (x2 * ((x2 * 8.0) - 12.0))));
double t_1 = x1 + (x1 + (3.0 * (x1 * ((x1 * 3.0) + -1.0))));
double tmp;
if (x1 <= -2.2e+140) {
tmp = t_1;
} else if (x1 <= -3e-19) {
tmp = t_0;
} else if (x1 <= 3.9e-63) {
tmp = x1 + (x2 * -6.0);
} else if (x1 <= 4.4e+153) {
tmp = t_0;
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
real(8) :: t_0
real(8) :: t_1
real(8) :: tmp
t_0 = x1 - (x1 * ((-1.0d0) - (x2 * ((x2 * 8.0d0) - 12.0d0))))
t_1 = x1 + (x1 + (3.0d0 * (x1 * ((x1 * 3.0d0) + (-1.0d0)))))
if (x1 <= (-2.2d+140)) then
tmp = t_1
else if (x1 <= (-3d-19)) then
tmp = t_0
else if (x1 <= 3.9d-63) then
tmp = x1 + (x2 * (-6.0d0))
else if (x1 <= 4.4d+153) then
tmp = t_0
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x1, double x2) {
double t_0 = x1 - (x1 * (-1.0 - (x2 * ((x2 * 8.0) - 12.0))));
double t_1 = x1 + (x1 + (3.0 * (x1 * ((x1 * 3.0) + -1.0))));
double tmp;
if (x1 <= -2.2e+140) {
tmp = t_1;
} else if (x1 <= -3e-19) {
tmp = t_0;
} else if (x1 <= 3.9e-63) {
tmp = x1 + (x2 * -6.0);
} else if (x1 <= 4.4e+153) {
tmp = t_0;
} else {
tmp = t_1;
}
return tmp;
}
def code(x1, x2): t_0 = x1 - (x1 * (-1.0 - (x2 * ((x2 * 8.0) - 12.0)))) t_1 = x1 + (x1 + (3.0 * (x1 * ((x1 * 3.0) + -1.0)))) tmp = 0 if x1 <= -2.2e+140: tmp = t_1 elif x1 <= -3e-19: tmp = t_0 elif x1 <= 3.9e-63: tmp = x1 + (x2 * -6.0) elif x1 <= 4.4e+153: tmp = t_0 else: tmp = t_1 return tmp
function code(x1, x2) t_0 = Float64(x1 - Float64(x1 * Float64(-1.0 - Float64(x2 * Float64(Float64(x2 * 8.0) - 12.0))))) t_1 = Float64(x1 + Float64(x1 + Float64(3.0 * Float64(x1 * Float64(Float64(x1 * 3.0) + -1.0))))) tmp = 0.0 if (x1 <= -2.2e+140) tmp = t_1; elseif (x1 <= -3e-19) tmp = t_0; elseif (x1 <= 3.9e-63) tmp = Float64(x1 + Float64(x2 * -6.0)); elseif (x1 <= 4.4e+153) tmp = t_0; else tmp = t_1; end return tmp end
function tmp_2 = code(x1, x2) t_0 = x1 - (x1 * (-1.0 - (x2 * ((x2 * 8.0) - 12.0)))); t_1 = x1 + (x1 + (3.0 * (x1 * ((x1 * 3.0) + -1.0)))); tmp = 0.0; if (x1 <= -2.2e+140) tmp = t_1; elseif (x1 <= -3e-19) tmp = t_0; elseif (x1 <= 3.9e-63) tmp = x1 + (x2 * -6.0); elseif (x1 <= 4.4e+153) tmp = t_0; else tmp = t_1; end tmp_2 = tmp; end
code[x1_, x2_] := Block[{t$95$0 = N[(x1 - N[(x1 * N[(-1.0 - N[(x2 * N[(N[(x2 * 8.0), $MachinePrecision] - 12.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(x1 + N[(x1 + N[(3.0 * N[(x1 * N[(N[(x1 * 3.0), $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x1, -2.2e+140], t$95$1, If[LessEqual[x1, -3e-19], t$95$0, If[LessEqual[x1, 3.9e-63], N[(x1 + N[(x2 * -6.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 4.4e+153], t$95$0, t$95$1]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x1 - x1 \cdot \left(-1 - x2 \cdot \left(x2 \cdot 8 - 12\right)\right)\\
t_1 := x1 + \left(x1 + 3 \cdot \left(x1 \cdot \left(x1 \cdot 3 + -1\right)\right)\right)\\
\mathbf{if}\;x1 \leq -2.2 \cdot 10^{+140}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;x1 \leq -3 \cdot 10^{-19}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;x1 \leq 3.9 \cdot 10^{-63}:\\
\;\;\;\;x1 + x2 \cdot -6\\
\mathbf{elif}\;x1 \leq 4.4 \cdot 10^{+153}:\\
\;\;\;\;t\_0\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if x1 < -2.1999999999999998e140 or 4.3999999999999999e153 < x1 Initial program 0.0%
Taylor expanded in x1 around 0 0.0%
Taylor expanded in x1 around 0 69.1%
Taylor expanded in x2 around 0 100.0%
if -2.1999999999999998e140 < x1 < -2.99999999999999993e-19 or 3.90000000000000022e-63 < x1 < 4.3999999999999999e153Initial program 93.4%
Taylor expanded in x1 around 0 40.3%
Taylor expanded in x1 around inf 30.9%
Taylor expanded in x2 around 0 30.9%
if -2.99999999999999993e-19 < x1 < 3.90000000000000022e-63Initial program 99.4%
Taylor expanded in x1 around 0 86.5%
Taylor expanded in x1 around 0 86.5%
Taylor expanded in x1 around 0 57.7%
*-commutative57.7%
Simplified57.7%
Final simplification59.9%
(FPCore (x1 x2)
:precision binary64
(if (<= x1 -3.1e+141)
(+ x1 (+ x1 (* 3.0 (* x1 (+ (* x1 3.0) -1.0)))))
(if (<= x1 1.1e-48)
(+
x1
(+
(+ x1 (* x2 (+ (* x1 -12.0) (* 8.0 (* x1 x2)))))
(+ (* x2 -6.0) (* x1 -3.0))))
(+ x1 (* x1 (- (+ (* 4.0 (* x2 (- (* 2.0 x2) 3.0))) (* x1 9.0)) 2.0))))))
double code(double x1, double x2) {
double tmp;
if (x1 <= -3.1e+141) {
tmp = x1 + (x1 + (3.0 * (x1 * ((x1 * 3.0) + -1.0))));
} else if (x1 <= 1.1e-48) {
tmp = x1 + ((x1 + (x2 * ((x1 * -12.0) + (8.0 * (x1 * x2))))) + ((x2 * -6.0) + (x1 * -3.0)));
} else {
tmp = x1 + (x1 * (((4.0 * (x2 * ((2.0 * x2) - 3.0))) + (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 (x1 <= (-3.1d+141)) then
tmp = x1 + (x1 + (3.0d0 * (x1 * ((x1 * 3.0d0) + (-1.0d0)))))
else if (x1 <= 1.1d-48) then
tmp = x1 + ((x1 + (x2 * ((x1 * (-12.0d0)) + (8.0d0 * (x1 * x2))))) + ((x2 * (-6.0d0)) + (x1 * (-3.0d0))))
else
tmp = x1 + (x1 * (((4.0d0 * (x2 * ((2.0d0 * x2) - 3.0d0))) + (x1 * 9.0d0)) - 2.0d0))
end if
code = tmp
end function
public static double code(double x1, double x2) {
double tmp;
if (x1 <= -3.1e+141) {
tmp = x1 + (x1 + (3.0 * (x1 * ((x1 * 3.0) + -1.0))));
} else if (x1 <= 1.1e-48) {
tmp = x1 + ((x1 + (x2 * ((x1 * -12.0) + (8.0 * (x1 * x2))))) + ((x2 * -6.0) + (x1 * -3.0)));
} else {
tmp = x1 + (x1 * (((4.0 * (x2 * ((2.0 * x2) - 3.0))) + (x1 * 9.0)) - 2.0));
}
return tmp;
}
def code(x1, x2): tmp = 0 if x1 <= -3.1e+141: tmp = x1 + (x1 + (3.0 * (x1 * ((x1 * 3.0) + -1.0)))) elif x1 <= 1.1e-48: tmp = x1 + ((x1 + (x2 * ((x1 * -12.0) + (8.0 * (x1 * x2))))) + ((x2 * -6.0) + (x1 * -3.0))) else: tmp = x1 + (x1 * (((4.0 * (x2 * ((2.0 * x2) - 3.0))) + (x1 * 9.0)) - 2.0)) return tmp
function code(x1, x2) tmp = 0.0 if (x1 <= -3.1e+141) tmp = Float64(x1 + Float64(x1 + Float64(3.0 * Float64(x1 * Float64(Float64(x1 * 3.0) + -1.0))))); elseif (x1 <= 1.1e-48) tmp = Float64(x1 + Float64(Float64(x1 + Float64(x2 * Float64(Float64(x1 * -12.0) + Float64(8.0 * Float64(x1 * x2))))) + Float64(Float64(x2 * -6.0) + Float64(x1 * -3.0)))); else tmp = Float64(x1 + Float64(x1 * Float64(Float64(Float64(4.0 * Float64(x2 * Float64(Float64(2.0 * x2) - 3.0))) + Float64(x1 * 9.0)) - 2.0))); end return tmp end
function tmp_2 = code(x1, x2) tmp = 0.0; if (x1 <= -3.1e+141) tmp = x1 + (x1 + (3.0 * (x1 * ((x1 * 3.0) + -1.0)))); elseif (x1 <= 1.1e-48) tmp = x1 + ((x1 + (x2 * ((x1 * -12.0) + (8.0 * (x1 * x2))))) + ((x2 * -6.0) + (x1 * -3.0))); else tmp = x1 + (x1 * (((4.0 * (x2 * ((2.0 * x2) - 3.0))) + (x1 * 9.0)) - 2.0)); end tmp_2 = tmp; end
code[x1_, x2_] := If[LessEqual[x1, -3.1e+141], N[(x1 + N[(x1 + N[(3.0 * N[(x1 * N[(N[(x1 * 3.0), $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 1.1e-48], N[(x1 + N[(N[(x1 + N[(x2 * N[(N[(x1 * -12.0), $MachinePrecision] + N[(8.0 * N[(x1 * x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(x2 * -6.0), $MachinePrecision] + N[(x1 * -3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x1 + N[(x1 * N[(N[(N[(4.0 * N[(x2 * N[(N[(2.0 * x2), $MachinePrecision] - 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(x1 * 9.0), $MachinePrecision]), $MachinePrecision] - 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x1 \leq -3.1 \cdot 10^{+141}:\\
\;\;\;\;x1 + \left(x1 + 3 \cdot \left(x1 \cdot \left(x1 \cdot 3 + -1\right)\right)\right)\\
\mathbf{elif}\;x1 \leq 1.1 \cdot 10^{-48}:\\
\;\;\;\;x1 + \left(\left(x1 + x2 \cdot \left(x1 \cdot -12 + 8 \cdot \left(x1 \cdot x2\right)\right)\right) + \left(x2 \cdot -6 + x1 \cdot -3\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x1 + x1 \cdot \left(\left(4 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right) + x1 \cdot 9\right) - 2\right)\\
\end{array}
\end{array}
if x1 < -3.10000000000000004e141Initial program 0.0%
Taylor expanded in x1 around 0 0.0%
Taylor expanded in x1 around 0 64.1%
Taylor expanded in x2 around 0 100.0%
if -3.10000000000000004e141 < x1 < 1.10000000000000006e-48Initial program 95.9%
Taylor expanded in x1 around 0 70.7%
Taylor expanded in x1 around 0 69.3%
Taylor expanded in x2 around 0 78.3%
Taylor expanded in x1 around 0 79.9%
if 1.10000000000000006e-48 < x1 Initial program 59.3%
Taylor expanded in x1 around 0 28.3%
Taylor expanded in x1 around 0 53.8%
Taylor expanded in x2 around 0 69.0%
Taylor expanded in x1 around 0 69.2%
Final simplification80.0%
(FPCore (x1 x2)
:precision binary64
(if (<= x1 -9.5e+144)
(+ x1 (+ x1 (* 3.0 (* x1 (+ (* x1 3.0) -1.0)))))
(if (<= x1 1.1e-48)
(- x1 (- (* x1 (- 2.0 (* x2 (- (* x2 8.0) 12.0)))) (* x2 -6.0)))
(+ x1 (* x1 (- (+ (* 4.0 (* x2 (- (* 2.0 x2) 3.0))) (* x1 9.0)) 2.0))))))
double code(double x1, double x2) {
double tmp;
if (x1 <= -9.5e+144) {
tmp = x1 + (x1 + (3.0 * (x1 * ((x1 * 3.0) + -1.0))));
} else if (x1 <= 1.1e-48) {
tmp = x1 - ((x1 * (2.0 - (x2 * ((x2 * 8.0) - 12.0)))) - (x2 * -6.0));
} else {
tmp = x1 + (x1 * (((4.0 * (x2 * ((2.0 * x2) - 3.0))) + (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 (x1 <= (-9.5d+144)) then
tmp = x1 + (x1 + (3.0d0 * (x1 * ((x1 * 3.0d0) + (-1.0d0)))))
else if (x1 <= 1.1d-48) then
tmp = x1 - ((x1 * (2.0d0 - (x2 * ((x2 * 8.0d0) - 12.0d0)))) - (x2 * (-6.0d0)))
else
tmp = x1 + (x1 * (((4.0d0 * (x2 * ((2.0d0 * x2) - 3.0d0))) + (x1 * 9.0d0)) - 2.0d0))
end if
code = tmp
end function
public static double code(double x1, double x2) {
double tmp;
if (x1 <= -9.5e+144) {
tmp = x1 + (x1 + (3.0 * (x1 * ((x1 * 3.0) + -1.0))));
} else if (x1 <= 1.1e-48) {
tmp = x1 - ((x1 * (2.0 - (x2 * ((x2 * 8.0) - 12.0)))) - (x2 * -6.0));
} else {
tmp = x1 + (x1 * (((4.0 * (x2 * ((2.0 * x2) - 3.0))) + (x1 * 9.0)) - 2.0));
}
return tmp;
}
def code(x1, x2): tmp = 0 if x1 <= -9.5e+144: tmp = x1 + (x1 + (3.0 * (x1 * ((x1 * 3.0) + -1.0)))) elif x1 <= 1.1e-48: tmp = x1 - ((x1 * (2.0 - (x2 * ((x2 * 8.0) - 12.0)))) - (x2 * -6.0)) else: tmp = x1 + (x1 * (((4.0 * (x2 * ((2.0 * x2) - 3.0))) + (x1 * 9.0)) - 2.0)) return tmp
function code(x1, x2) tmp = 0.0 if (x1 <= -9.5e+144) tmp = Float64(x1 + Float64(x1 + Float64(3.0 * Float64(x1 * Float64(Float64(x1 * 3.0) + -1.0))))); elseif (x1 <= 1.1e-48) tmp = Float64(x1 - Float64(Float64(x1 * Float64(2.0 - Float64(x2 * Float64(Float64(x2 * 8.0) - 12.0)))) - Float64(x2 * -6.0))); else tmp = Float64(x1 + Float64(x1 * Float64(Float64(Float64(4.0 * Float64(x2 * Float64(Float64(2.0 * x2) - 3.0))) + Float64(x1 * 9.0)) - 2.0))); end return tmp end
function tmp_2 = code(x1, x2) tmp = 0.0; if (x1 <= -9.5e+144) tmp = x1 + (x1 + (3.0 * (x1 * ((x1 * 3.0) + -1.0)))); elseif (x1 <= 1.1e-48) tmp = x1 - ((x1 * (2.0 - (x2 * ((x2 * 8.0) - 12.0)))) - (x2 * -6.0)); else tmp = x1 + (x1 * (((4.0 * (x2 * ((2.0 * x2) - 3.0))) + (x1 * 9.0)) - 2.0)); end tmp_2 = tmp; end
code[x1_, x2_] := If[LessEqual[x1, -9.5e+144], N[(x1 + N[(x1 + N[(3.0 * N[(x1 * N[(N[(x1 * 3.0), $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 1.1e-48], N[(x1 - N[(N[(x1 * N[(2.0 - N[(x2 * N[(N[(x2 * 8.0), $MachinePrecision] - 12.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(x2 * -6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x1 + N[(x1 * N[(N[(N[(4.0 * N[(x2 * N[(N[(2.0 * x2), $MachinePrecision] - 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(x1 * 9.0), $MachinePrecision]), $MachinePrecision] - 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x1 \leq -9.5 \cdot 10^{+144}:\\
\;\;\;\;x1 + \left(x1 + 3 \cdot \left(x1 \cdot \left(x1 \cdot 3 + -1\right)\right)\right)\\
\mathbf{elif}\;x1 \leq 1.1 \cdot 10^{-48}:\\
\;\;\;\;x1 - \left(x1 \cdot \left(2 - x2 \cdot \left(x2 \cdot 8 - 12\right)\right) - x2 \cdot -6\right)\\
\mathbf{else}:\\
\;\;\;\;x1 + x1 \cdot \left(\left(4 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right) + x1 \cdot 9\right) - 2\right)\\
\end{array}
\end{array}
if x1 < -9.50000000000000031e144Initial program 0.0%
Taylor expanded in x1 around 0 0.0%
Taylor expanded in x1 around 0 64.1%
Taylor expanded in x2 around 0 100.0%
if -9.50000000000000031e144 < x1 < 1.10000000000000006e-48Initial program 95.9%
Taylor expanded in x1 around 0 70.7%
Taylor expanded in x1 around 0 69.3%
Taylor expanded in x2 around 0 78.3%
Taylor expanded in x1 around 0 71.1%
if 1.10000000000000006e-48 < x1 Initial program 59.3%
Taylor expanded in x1 around 0 28.3%
Taylor expanded in x1 around 0 53.8%
Taylor expanded in x2 around 0 69.0%
Taylor expanded in x1 around 0 69.2%
Final simplification75.0%
(FPCore (x1 x2) :precision binary64 (if (or (<= x1 -3.8e+140) (not (<= x1 4.4e+153))) (+ x1 (+ x1 (* 3.0 (* x1 (+ (* x1 3.0) -1.0))))) (- x1 (- (* x1 (- 2.0 (* x2 (- (* x2 8.0) 12.0)))) (* x2 -6.0)))))
double code(double x1, double x2) {
double tmp;
if ((x1 <= -3.8e+140) || !(x1 <= 4.4e+153)) {
tmp = x1 + (x1 + (3.0 * (x1 * ((x1 * 3.0) + -1.0))));
} else {
tmp = x1 - ((x1 * (2.0 - (x2 * ((x2 * 8.0) - 12.0)))) - (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 <= (-3.8d+140)) .or. (.not. (x1 <= 4.4d+153))) then
tmp = x1 + (x1 + (3.0d0 * (x1 * ((x1 * 3.0d0) + (-1.0d0)))))
else
tmp = x1 - ((x1 * (2.0d0 - (x2 * ((x2 * 8.0d0) - 12.0d0)))) - (x2 * (-6.0d0)))
end if
code = tmp
end function
public static double code(double x1, double x2) {
double tmp;
if ((x1 <= -3.8e+140) || !(x1 <= 4.4e+153)) {
tmp = x1 + (x1 + (3.0 * (x1 * ((x1 * 3.0) + -1.0))));
} else {
tmp = x1 - ((x1 * (2.0 - (x2 * ((x2 * 8.0) - 12.0)))) - (x2 * -6.0));
}
return tmp;
}
def code(x1, x2): tmp = 0 if (x1 <= -3.8e+140) or not (x1 <= 4.4e+153): tmp = x1 + (x1 + (3.0 * (x1 * ((x1 * 3.0) + -1.0)))) else: tmp = x1 - ((x1 * (2.0 - (x2 * ((x2 * 8.0) - 12.0)))) - (x2 * -6.0)) return tmp
function code(x1, x2) tmp = 0.0 if ((x1 <= -3.8e+140) || !(x1 <= 4.4e+153)) tmp = Float64(x1 + Float64(x1 + Float64(3.0 * Float64(x1 * Float64(Float64(x1 * 3.0) + -1.0))))); else tmp = Float64(x1 - Float64(Float64(x1 * Float64(2.0 - Float64(x2 * Float64(Float64(x2 * 8.0) - 12.0)))) - Float64(x2 * -6.0))); end return tmp end
function tmp_2 = code(x1, x2) tmp = 0.0; if ((x1 <= -3.8e+140) || ~((x1 <= 4.4e+153))) tmp = x1 + (x1 + (3.0 * (x1 * ((x1 * 3.0) + -1.0)))); else tmp = x1 - ((x1 * (2.0 - (x2 * ((x2 * 8.0) - 12.0)))) - (x2 * -6.0)); end tmp_2 = tmp; end
code[x1_, x2_] := If[Or[LessEqual[x1, -3.8e+140], N[Not[LessEqual[x1, 4.4e+153]], $MachinePrecision]], N[(x1 + N[(x1 + N[(3.0 * N[(x1 * N[(N[(x1 * 3.0), $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x1 - N[(N[(x1 * N[(2.0 - N[(x2 * N[(N[(x2 * 8.0), $MachinePrecision] - 12.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(x2 * -6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x1 \leq -3.8 \cdot 10^{+140} \lor \neg \left(x1 \leq 4.4 \cdot 10^{+153}\right):\\
\;\;\;\;x1 + \left(x1 + 3 \cdot \left(x1 \cdot \left(x1 \cdot 3 + -1\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x1 - \left(x1 \cdot \left(2 - x2 \cdot \left(x2 \cdot 8 - 12\right)\right) - x2 \cdot -6\right)\\
\end{array}
\end{array}
if x1 < -3.8000000000000001e140 or 4.3999999999999999e153 < x1 Initial program 0.0%
Taylor expanded in x1 around 0 0.0%
Taylor expanded in x1 around 0 69.1%
Taylor expanded in x2 around 0 100.0%
if -3.8000000000000001e140 < x1 < 4.3999999999999999e153Initial program 96.6%
Taylor expanded in x1 around 0 65.4%
Taylor expanded in x1 around 0 62.4%
Taylor expanded in x2 around 0 69.3%
Taylor expanded in x1 around 0 65.0%
Final simplification74.3%
(FPCore (x1 x2) :precision binary64 (if (or (<= x2 -5.5e+88) (not (<= x2 4.2e+136))) (- x1 (* x1 (- -1.0 (* x2 (- (* x2 8.0) 12.0))))) (+ x1 (* x2 -6.0))))
double code(double x1, double x2) {
double tmp;
if ((x2 <= -5.5e+88) || !(x2 <= 4.2e+136)) {
tmp = x1 - (x1 * (-1.0 - (x2 * ((x2 * 8.0) - 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 ((x2 <= (-5.5d+88)) .or. (.not. (x2 <= 4.2d+136))) then
tmp = x1 - (x1 * ((-1.0d0) - (x2 * ((x2 * 8.0d0) - 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 ((x2 <= -5.5e+88) || !(x2 <= 4.2e+136)) {
tmp = x1 - (x1 * (-1.0 - (x2 * ((x2 * 8.0) - 12.0))));
} else {
tmp = x1 + (x2 * -6.0);
}
return tmp;
}
def code(x1, x2): tmp = 0 if (x2 <= -5.5e+88) or not (x2 <= 4.2e+136): tmp = x1 - (x1 * (-1.0 - (x2 * ((x2 * 8.0) - 12.0)))) else: tmp = x1 + (x2 * -6.0) return tmp
function code(x1, x2) tmp = 0.0 if ((x2 <= -5.5e+88) || !(x2 <= 4.2e+136)) tmp = Float64(x1 - Float64(x1 * Float64(-1.0 - Float64(x2 * Float64(Float64(x2 * 8.0) - 12.0))))); else tmp = Float64(x1 + Float64(x2 * -6.0)); end return tmp end
function tmp_2 = code(x1, x2) tmp = 0.0; if ((x2 <= -5.5e+88) || ~((x2 <= 4.2e+136))) tmp = x1 - (x1 * (-1.0 - (x2 * ((x2 * 8.0) - 12.0)))); else tmp = x1 + (x2 * -6.0); end tmp_2 = tmp; end
code[x1_, x2_] := If[Or[LessEqual[x2, -5.5e+88], N[Not[LessEqual[x2, 4.2e+136]], $MachinePrecision]], N[(x1 - N[(x1 * N[(-1.0 - N[(x2 * N[(N[(x2 * 8.0), $MachinePrecision] - 12.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x1 + N[(x2 * -6.0), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x2 \leq -5.5 \cdot 10^{+88} \lor \neg \left(x2 \leq 4.2 \cdot 10^{+136}\right):\\
\;\;\;\;x1 - x1 \cdot \left(-1 - x2 \cdot \left(x2 \cdot 8 - 12\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x1 + x2 \cdot -6\\
\end{array}
\end{array}
if x2 < -5.5e88 or 4.1999999999999998e136 < x2 Initial program 76.0%
Taylor expanded in x1 around 0 51.1%
Taylor expanded in x1 around inf 64.6%
Taylor expanded in x2 around 0 64.6%
if -5.5e88 < x2 < 4.1999999999999998e136Initial program 69.2%
Taylor expanded in x1 around 0 46.9%
Taylor expanded in x1 around 0 70.4%
Taylor expanded in x1 around 0 30.6%
*-commutative30.6%
Simplified30.6%
Final simplification39.5%
(FPCore (x1 x2) :precision binary64 (if (or (<= x1 -9.2e+33) (not (<= x1 6e+57))) (+ x1 (* x1 (+ 1.0 (* x2 -12.0)))) (+ x1 (* x2 -6.0))))
double code(double x1, double x2) {
double tmp;
if ((x1 <= -9.2e+33) || !(x1 <= 6e+57)) {
tmp = x1 + (x1 * (1.0 + (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 <= (-9.2d+33)) .or. (.not. (x1 <= 6d+57))) then
tmp = x1 + (x1 * (1.0d0 + (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 <= -9.2e+33) || !(x1 <= 6e+57)) {
tmp = x1 + (x1 * (1.0 + (x2 * -12.0)));
} else {
tmp = x1 + (x2 * -6.0);
}
return tmp;
}
def code(x1, x2): tmp = 0 if (x1 <= -9.2e+33) or not (x1 <= 6e+57): tmp = x1 + (x1 * (1.0 + (x2 * -12.0))) else: tmp = x1 + (x2 * -6.0) return tmp
function code(x1, x2) tmp = 0.0 if ((x1 <= -9.2e+33) || !(x1 <= 6e+57)) tmp = Float64(x1 + Float64(x1 * Float64(1.0 + 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 <= -9.2e+33) || ~((x1 <= 6e+57))) tmp = x1 + (x1 * (1.0 + (x2 * -12.0))); else tmp = x1 + (x2 * -6.0); end tmp_2 = tmp; end
code[x1_, x2_] := If[Or[LessEqual[x1, -9.2e+33], N[Not[LessEqual[x1, 6e+57]], $MachinePrecision]], N[(x1 + N[(x1 * N[(1.0 + N[(x2 * -12.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x1 + N[(x2 * -6.0), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x1 \leq -9.2 \cdot 10^{+33} \lor \neg \left(x1 \leq 6 \cdot 10^{+57}\right):\\
\;\;\;\;x1 + x1 \cdot \left(1 + x2 \cdot -12\right)\\
\mathbf{else}:\\
\;\;\;\;x1 + x2 \cdot -6\\
\end{array}
\end{array}
if x1 < -9.20000000000000042e33 or 5.9999999999999999e57 < x1 Initial program 37.9%
Taylor expanded in x1 around 0 10.9%
Taylor expanded in x1 around inf 22.9%
Taylor expanded in x2 around 0 12.9%
*-commutative12.9%
Simplified12.9%
if -9.20000000000000042e33 < x1 < 5.9999999999999999e57Initial program 99.2%
Taylor expanded in x1 around 0 79.8%
Taylor expanded in x1 around 0 78.5%
Taylor expanded in x1 around 0 44.3%
*-commutative44.3%
Simplified44.3%
Final simplification29.8%
(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 71.0%
Taylor expanded in x1 around 0 48.0%
Taylor expanded in x1 around 0 64.2%
Taylor expanded in x1 around 0 25.2%
*-commutative25.2%
Simplified25.2%
(FPCore (x1 x2) :precision binary64 (+ x1 x1))
double code(double x1, double x2) {
return x1 + x1;
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
code = x1 + x1
end function
public static double code(double x1, double x2) {
return x1 + x1;
}
def code(x1, x2): return x1 + x1
function code(x1, x2) return Float64(x1 + x1) end
function tmp = code(x1, x2) tmp = x1 + x1; end
code[x1_, x2_] := N[(x1 + x1), $MachinePrecision]
\begin{array}{l}
\\
x1 + x1
\end{array}
Initial program 71.0%
Taylor expanded in x1 around 0 48.0%
Taylor expanded in x1 around inf 21.9%
Taylor expanded in x2 around 0 3.4%
herbie shell --seed 2024129
(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))))))