
(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 29 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (* (* 3.0 x1) x1))
(t_1 (+ (* x1 x1) 1.0))
(t_2 (/ (- (+ t_0 (* 2.0 x2)) x1) t_1)))
(+
x1
(+
(+
(+
(+
(*
(+
(* (* (* 2.0 x1) t_2) (- t_2 3.0))
(* (* x1 x1) (- (* 4.0 t_2) 6.0)))
t_1)
(* t_0 t_2))
(* (* x1 x1) x1))
x1)
(* 3.0 (/ (- (- t_0 (* 2.0 x2)) x1) t_1))))))
double code(double x1, double x2) {
double t_0 = (3.0 * x1) * x1;
double t_1 = (x1 * x1) + 1.0;
double t_2 = ((t_0 + (2.0 * x2)) - x1) / t_1;
return x1 + (((((((((2.0 * x1) * t_2) * (t_2 - 3.0)) + ((x1 * x1) * ((4.0 * t_2) - 6.0))) * t_1) + (t_0 * t_2)) + ((x1 * x1) * x1)) + x1) + (3.0 * (((t_0 - (2.0 * x2)) - x1) / t_1)));
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
real(8) :: t_0
real(8) :: t_1
real(8) :: t_2
t_0 = (3.0d0 * x1) * x1
t_1 = (x1 * x1) + 1.0d0
t_2 = ((t_0 + (2.0d0 * x2)) - x1) / t_1
code = x1 + (((((((((2.0d0 * x1) * t_2) * (t_2 - 3.0d0)) + ((x1 * x1) * ((4.0d0 * t_2) - 6.0d0))) * t_1) + (t_0 * t_2)) + ((x1 * x1) * x1)) + x1) + (3.0d0 * (((t_0 - (2.0d0 * x2)) - x1) / t_1)))
end function
public static double code(double x1, double x2) {
double t_0 = (3.0 * x1) * x1;
double t_1 = (x1 * x1) + 1.0;
double t_2 = ((t_0 + (2.0 * x2)) - x1) / t_1;
return x1 + (((((((((2.0 * x1) * t_2) * (t_2 - 3.0)) + ((x1 * x1) * ((4.0 * t_2) - 6.0))) * t_1) + (t_0 * t_2)) + ((x1 * x1) * x1)) + x1) + (3.0 * (((t_0 - (2.0 * x2)) - x1) / t_1)));
}
def code(x1, x2): t_0 = (3.0 * x1) * x1 t_1 = (x1 * x1) + 1.0 t_2 = ((t_0 + (2.0 * x2)) - x1) / t_1 return x1 + (((((((((2.0 * x1) * t_2) * (t_2 - 3.0)) + ((x1 * x1) * ((4.0 * t_2) - 6.0))) * t_1) + (t_0 * t_2)) + ((x1 * x1) * x1)) + x1) + (3.0 * (((t_0 - (2.0 * x2)) - x1) / t_1)))
function code(x1, x2) t_0 = Float64(Float64(3.0 * x1) * x1) t_1 = Float64(Float64(x1 * x1) + 1.0) t_2 = Float64(Float64(Float64(t_0 + Float64(2.0 * x2)) - x1) / t_1) return Float64(x1 + Float64(Float64(Float64(Float64(Float64(Float64(Float64(Float64(Float64(2.0 * x1) * t_2) * Float64(t_2 - 3.0)) + Float64(Float64(x1 * x1) * Float64(Float64(4.0 * t_2) - 6.0))) * t_1) + Float64(t_0 * t_2)) + Float64(Float64(x1 * x1) * x1)) + x1) + Float64(3.0 * Float64(Float64(Float64(t_0 - Float64(2.0 * x2)) - x1) / t_1)))) end
function tmp = code(x1, x2) t_0 = (3.0 * x1) * x1; t_1 = (x1 * x1) + 1.0; t_2 = ((t_0 + (2.0 * x2)) - x1) / t_1; tmp = x1 + (((((((((2.0 * x1) * t_2) * (t_2 - 3.0)) + ((x1 * x1) * ((4.0 * t_2) - 6.0))) * t_1) + (t_0 * t_2)) + ((x1 * x1) * x1)) + x1) + (3.0 * (((t_0 - (2.0 * x2)) - x1) / t_1))); end
code[x1_, x2_] := Block[{t$95$0 = N[(N[(3.0 * x1), $MachinePrecision] * x1), $MachinePrecision]}, Block[{t$95$1 = N[(N[(x1 * x1), $MachinePrecision] + 1.0), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[(t$95$0 + N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$1), $MachinePrecision]}, N[(x1 + N[(N[(N[(N[(N[(N[(N[(N[(N[(2.0 * x1), $MachinePrecision] * t$95$2), $MachinePrecision] * N[(t$95$2 - 3.0), $MachinePrecision]), $MachinePrecision] + N[(N[(x1 * x1), $MachinePrecision] * N[(N[(4.0 * t$95$2), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * t$95$1), $MachinePrecision] + N[(t$95$0 * t$95$2), $MachinePrecision]), $MachinePrecision] + N[(N[(x1 * x1), $MachinePrecision] * x1), $MachinePrecision]), $MachinePrecision] + x1), $MachinePrecision] + N[(3.0 * N[(N[(N[(t$95$0 - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \left(3 \cdot x1\right) \cdot x1\\
t_1 := x1 \cdot x1 + 1\\
t_2 := \frac{\left(t\_0 + 2 \cdot x2\right) - x1}{t\_1}\\
x1 + \left(\left(\left(\left(\left(\left(\left(2 \cdot x1\right) \cdot t\_2\right) \cdot \left(t\_2 - 3\right) + \left(x1 \cdot x1\right) \cdot \left(4 \cdot t\_2 - 6\right)\right) \cdot t\_1 + t\_0 \cdot t\_2\right) + \left(x1 \cdot x1\right) \cdot x1\right) + x1\right) + 3 \cdot \frac{\left(t\_0 - 2 \cdot x2\right) - x1}{t\_1}\right)
\end{array}
\end{array}
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (+ (* x1 x1) 1.0))
(t_1 (/ (- (fma x1 (* x1 3.0) (* 2.0 x2)) x1) (fma x1 x1 1.0)))
(t_2 (* x1 (* x1 3.0)))
(t_3 (- (+ t_2 (* 2.0 x2)) x1))
(t_4 (/ t_3 t_0))
(t_5 (/ t_3 (- -1.0 (* x1 x1))))
(t_6 (* 3.0 (* x1 x1))))
(if (<=
(+
x1
(+
(+
x1
(+
(-
(* t_2 t_4)
(*
t_0
(+
(* (* x1 x1) (+ 6.0 (* 4.0 t_5)))
(* (* (* x1 2.0) t_4) (+ 3.0 t_5)))))
(* x1 (* x1 x1))))
(* 3.0 (/ (- (- t_2 (* 2.0 x2)) x1) t_0))))
INFINITY)
(+
x1
(fma
3.0
(/ (- t_6 (fma 2.0 x2 x1)) (fma x1 x1 1.0))
(+
x1
(fma
(fma x1 x1 1.0)
(fma x1 (* x1 (fma t_1 4.0 -6.0)) (* (* x1 (* 2.0 t_1)) (+ t_1 -3.0)))
(fma t_6 t_1 (pow x1 3.0))))))
(+
x1
(+
9.0
(+
x1
(*
(pow x1 4.0)
(+
6.0
(/ (- (/ (+ 9.0 (* 4.0 (- (* 2.0 x2) 3.0))) x1) 3.0) x1)))))))))
double code(double x1, double x2) {
double t_0 = (x1 * x1) + 1.0;
double t_1 = (fma(x1, (x1 * 3.0), (2.0 * x2)) - x1) / fma(x1, x1, 1.0);
double t_2 = x1 * (x1 * 3.0);
double t_3 = (t_2 + (2.0 * x2)) - x1;
double t_4 = t_3 / t_0;
double t_5 = t_3 / (-1.0 - (x1 * x1));
double t_6 = 3.0 * (x1 * x1);
double tmp;
if ((x1 + ((x1 + (((t_2 * t_4) - (t_0 * (((x1 * x1) * (6.0 + (4.0 * t_5))) + (((x1 * 2.0) * t_4) * (3.0 + t_5))))) + (x1 * (x1 * x1)))) + (3.0 * (((t_2 - (2.0 * x2)) - x1) / t_0)))) <= ((double) INFINITY)) {
tmp = x1 + fma(3.0, ((t_6 - fma(2.0, x2, x1)) / fma(x1, x1, 1.0)), (x1 + fma(fma(x1, x1, 1.0), fma(x1, (x1 * fma(t_1, 4.0, -6.0)), ((x1 * (2.0 * t_1)) * (t_1 + -3.0))), fma(t_6, t_1, pow(x1, 3.0)))));
} else {
tmp = x1 + (9.0 + (x1 + (pow(x1, 4.0) * (6.0 + ((((9.0 + (4.0 * ((2.0 * x2) - 3.0))) / x1) - 3.0) / x1)))));
}
return tmp;
}
function code(x1, x2) t_0 = Float64(Float64(x1 * x1) + 1.0) t_1 = Float64(Float64(fma(x1, Float64(x1 * 3.0), Float64(2.0 * x2)) - x1) / fma(x1, x1, 1.0)) t_2 = Float64(x1 * Float64(x1 * 3.0)) t_3 = Float64(Float64(t_2 + Float64(2.0 * x2)) - x1) t_4 = Float64(t_3 / t_0) t_5 = Float64(t_3 / Float64(-1.0 - Float64(x1 * x1))) t_6 = Float64(3.0 * Float64(x1 * x1)) tmp = 0.0 if (Float64(x1 + Float64(Float64(x1 + Float64(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) * t_4) * Float64(3.0 + t_5))))) + Float64(x1 * Float64(x1 * x1)))) + Float64(3.0 * Float64(Float64(Float64(t_2 - Float64(2.0 * x2)) - x1) / t_0)))) <= Inf) tmp = Float64(x1 + fma(3.0, Float64(Float64(t_6 - fma(2.0, x2, x1)) / fma(x1, x1, 1.0)), Float64(x1 + fma(fma(x1, x1, 1.0), fma(x1, Float64(x1 * fma(t_1, 4.0, -6.0)), Float64(Float64(x1 * Float64(2.0 * t_1)) * Float64(t_1 + -3.0))), fma(t_6, t_1, (x1 ^ 3.0)))))); else tmp = Float64(x1 + Float64(9.0 + Float64(x1 + Float64((x1 ^ 4.0) * Float64(6.0 + Float64(Float64(Float64(Float64(9.0 + Float64(4.0 * Float64(Float64(2.0 * x2) - 3.0))) / x1) - 3.0) / x1)))))); end return tmp end
code[x1_, x2_] := Block[{t$95$0 = N[(N[(x1 * x1), $MachinePrecision] + 1.0), $MachinePrecision]}, Block[{t$95$1 = N[(N[(N[(x1 * N[(x1 * 3.0), $MachinePrecision] + N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / N[(x1 * x1 + 1.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x1 * N[(x1 * 3.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[(t$95$2 + N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision]}, Block[{t$95$4 = N[(t$95$3 / t$95$0), $MachinePrecision]}, Block[{t$95$5 = N[(t$95$3 / N[(-1.0 - N[(x1 * x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$6 = N[(3.0 * N[(x1 * x1), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(x1 + N[(N[(x1 + N[(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] * t$95$4), $MachinePrecision] * N[(3.0 + t$95$5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(x1 * N[(x1 * x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(3.0 * N[(N[(N[(t$95$2 - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], Infinity], N[(x1 + N[(3.0 * N[(N[(t$95$6 - N[(2.0 * x2 + x1), $MachinePrecision]), $MachinePrecision] / N[(x1 * x1 + 1.0), $MachinePrecision]), $MachinePrecision] + N[(x1 + N[(N[(x1 * x1 + 1.0), $MachinePrecision] * N[(x1 * N[(x1 * N[(t$95$1 * 4.0 + -6.0), $MachinePrecision]), $MachinePrecision] + N[(N[(x1 * N[(2.0 * t$95$1), $MachinePrecision]), $MachinePrecision] * N[(t$95$1 + -3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(t$95$6 * t$95$1 + N[Power[x1, 3.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x1 + N[(9.0 + N[(x1 + N[(N[Power[x1, 4.0], $MachinePrecision] * N[(6.0 + N[(N[(N[(N[(9.0 + N[(4.0 * N[(N[(2.0 * x2), $MachinePrecision] - 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / x1), $MachinePrecision] - 3.0), $MachinePrecision] / x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x1 \cdot x1 + 1\\
t_1 := \frac{\mathsf{fma}\left(x1, x1 \cdot 3, 2 \cdot x2\right) - x1}{\mathsf{fma}\left(x1, x1, 1\right)}\\
t_2 := x1 \cdot \left(x1 \cdot 3\right)\\
t_3 := \left(t\_2 + 2 \cdot x2\right) - x1\\
t_4 := \frac{t\_3}{t\_0}\\
t_5 := \frac{t\_3}{-1 - x1 \cdot x1}\\
t_6 := 3 \cdot \left(x1 \cdot x1\right)\\
\mathbf{if}\;x1 + \left(\left(x1 + \left(\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 t\_4\right) \cdot \left(3 + t\_5\right)\right)\right) + x1 \cdot \left(x1 \cdot x1\right)\right)\right) + 3 \cdot \frac{\left(t\_2 - 2 \cdot x2\right) - x1}{t\_0}\right) \leq \infty:\\
\;\;\;\;x1 + \mathsf{fma}\left(3, \frac{t\_6 - \mathsf{fma}\left(2, x2, x1\right)}{\mathsf{fma}\left(x1, x1, 1\right)}, x1 + \mathsf{fma}\left(\mathsf{fma}\left(x1, x1, 1\right), \mathsf{fma}\left(x1, x1 \cdot \mathsf{fma}\left(t\_1, 4, -6\right), \left(x1 \cdot \left(2 \cdot t\_1\right)\right) \cdot \left(t\_1 + -3\right)\right), \mathsf{fma}\left(t\_6, t\_1, {x1}^{3}\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x1 + \left(9 + \left(x1 + {x1}^{4} \cdot \left(6 + \frac{\frac{9 + 4 \cdot \left(2 \cdot x2 - 3\right)}{x1} - 3}{x1}\right)\right)\right)\\
\end{array}
\end{array}
if (+.f64 x1 (+.f64 (+.f64 (+.f64 (+.f64 (*.f64 (+.f64 (*.f64 (*.f64 (*.f64 #s(literal 2 binary64) x1) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64)))) (-.f64 (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))) #s(literal 3 binary64))) (*.f64 (*.f64 x1 x1) (-.f64 (*.f64 #s(literal 4 binary64) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64)))) #s(literal 6 binary64)))) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))) (*.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))))) (*.f64 (*.f64 x1 x1) x1)) x1) (*.f64 #s(literal 3 binary64) (/.f64 (-.f64 (-.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64)))))) < +inf.0Initial program 99.4%
Simplified99.7%
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 12.5%
Taylor expanded in x1 around inf 100.0%
Final simplification99.8%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (* x1 (* x1 3.0)))
(t_1 (- (+ t_0 (* 2.0 x2)) x1))
(t_2 (+ (* x1 x1) 1.0))
(t_3 (/ t_1 t_2))
(t_4 (/ t_1 (- -1.0 (* x1 x1))))
(t_5
(+
x1
(+
(+
x1
(+
(-
(* t_0 t_3)
(*
t_2
(+
(* (* x1 x1) (+ 6.0 (* 4.0 t_4)))
(* (* (* x1 2.0) t_3) (+ 3.0 t_4)))))
(* x1 (* x1 x1))))
(* 3.0 (/ (- (- t_0 (* 2.0 x2)) x1) t_2))))))
(if (<= t_5 INFINITY)
t_5
(+
x1
(+
9.0
(+
x1
(*
(pow x1 4.0)
(+
6.0
(/ (- (/ (+ 9.0 (* 4.0 (- (* 2.0 x2) 3.0))) x1) 3.0) x1)))))))))
double code(double x1, double x2) {
double t_0 = x1 * (x1 * 3.0);
double t_1 = (t_0 + (2.0 * x2)) - x1;
double t_2 = (x1 * x1) + 1.0;
double t_3 = t_1 / t_2;
double t_4 = t_1 / (-1.0 - (x1 * x1));
double t_5 = x1 + ((x1 + (((t_0 * t_3) - (t_2 * (((x1 * x1) * (6.0 + (4.0 * t_4))) + (((x1 * 2.0) * t_3) * (3.0 + t_4))))) + (x1 * (x1 * x1)))) + (3.0 * (((t_0 - (2.0 * x2)) - x1) / t_2)));
double tmp;
if (t_5 <= ((double) INFINITY)) {
tmp = t_5;
} else {
tmp = x1 + (9.0 + (x1 + (pow(x1, 4.0) * (6.0 + ((((9.0 + (4.0 * ((2.0 * x2) - 3.0))) / x1) - 3.0) / x1)))));
}
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)) - x1;
double t_2 = (x1 * x1) + 1.0;
double t_3 = t_1 / t_2;
double t_4 = t_1 / (-1.0 - (x1 * x1));
double t_5 = x1 + ((x1 + (((t_0 * t_3) - (t_2 * (((x1 * x1) * (6.0 + (4.0 * t_4))) + (((x1 * 2.0) * t_3) * (3.0 + t_4))))) + (x1 * (x1 * x1)))) + (3.0 * (((t_0 - (2.0 * x2)) - x1) / t_2)));
double tmp;
if (t_5 <= Double.POSITIVE_INFINITY) {
tmp = t_5;
} else {
tmp = x1 + (9.0 + (x1 + (Math.pow(x1, 4.0) * (6.0 + ((((9.0 + (4.0 * ((2.0 * x2) - 3.0))) / x1) - 3.0) / x1)))));
}
return tmp;
}
def code(x1, x2): t_0 = x1 * (x1 * 3.0) t_1 = (t_0 + (2.0 * x2)) - x1 t_2 = (x1 * x1) + 1.0 t_3 = t_1 / t_2 t_4 = t_1 / (-1.0 - (x1 * x1)) t_5 = x1 + ((x1 + (((t_0 * t_3) - (t_2 * (((x1 * x1) * (6.0 + (4.0 * t_4))) + (((x1 * 2.0) * t_3) * (3.0 + t_4))))) + (x1 * (x1 * x1)))) + (3.0 * (((t_0 - (2.0 * x2)) - x1) / t_2))) tmp = 0 if t_5 <= math.inf: tmp = t_5 else: tmp = x1 + (9.0 + (x1 + (math.pow(x1, 4.0) * (6.0 + ((((9.0 + (4.0 * ((2.0 * x2) - 3.0))) / x1) - 3.0) / x1))))) return tmp
function code(x1, x2) t_0 = Float64(x1 * Float64(x1 * 3.0)) t_1 = Float64(Float64(t_0 + Float64(2.0 * x2)) - x1) t_2 = Float64(Float64(x1 * x1) + 1.0) t_3 = Float64(t_1 / t_2) t_4 = Float64(t_1 / Float64(-1.0 - Float64(x1 * x1))) t_5 = Float64(x1 + Float64(Float64(x1 + Float64(Float64(Float64(t_0 * t_3) - Float64(t_2 * Float64(Float64(Float64(x1 * x1) * Float64(6.0 + Float64(4.0 * t_4))) + Float64(Float64(Float64(x1 * 2.0) * t_3) * Float64(3.0 + t_4))))) + Float64(x1 * Float64(x1 * x1)))) + Float64(3.0 * Float64(Float64(Float64(t_0 - Float64(2.0 * x2)) - x1) / t_2)))) tmp = 0.0 if (t_5 <= Inf) tmp = t_5; else tmp = Float64(x1 + Float64(9.0 + Float64(x1 + Float64((x1 ^ 4.0) * Float64(6.0 + Float64(Float64(Float64(Float64(9.0 + Float64(4.0 * Float64(Float64(2.0 * x2) - 3.0))) / x1) - 3.0) / x1)))))); end return tmp end
function tmp_2 = code(x1, x2) t_0 = x1 * (x1 * 3.0); t_1 = (t_0 + (2.0 * x2)) - x1; t_2 = (x1 * x1) + 1.0; t_3 = t_1 / t_2; t_4 = t_1 / (-1.0 - (x1 * x1)); t_5 = x1 + ((x1 + (((t_0 * t_3) - (t_2 * (((x1 * x1) * (6.0 + (4.0 * t_4))) + (((x1 * 2.0) * t_3) * (3.0 + t_4))))) + (x1 * (x1 * x1)))) + (3.0 * (((t_0 - (2.0 * x2)) - x1) / t_2))); tmp = 0.0; if (t_5 <= Inf) tmp = t_5; else tmp = x1 + (9.0 + (x1 + ((x1 ^ 4.0) * (6.0 + ((((9.0 + (4.0 * ((2.0 * x2) - 3.0))) / x1) - 3.0) / x1))))); end tmp_2 = tmp; end
code[x1_, x2_] := Block[{t$95$0 = N[(x1 * N[(x1 * 3.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(N[(t$95$0 + N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision]}, Block[{t$95$2 = N[(N[(x1 * x1), $MachinePrecision] + 1.0), $MachinePrecision]}, Block[{t$95$3 = N[(t$95$1 / t$95$2), $MachinePrecision]}, Block[{t$95$4 = N[(t$95$1 / N[(-1.0 - N[(x1 * x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$5 = N[(x1 + N[(N[(x1 + N[(N[(N[(t$95$0 * t$95$3), $MachinePrecision] - N[(t$95$2 * N[(N[(N[(x1 * x1), $MachinePrecision] * N[(6.0 + N[(4.0 * t$95$4), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(N[(x1 * 2.0), $MachinePrecision] * t$95$3), $MachinePrecision] * N[(3.0 + t$95$4), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(x1 * N[(x1 * x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(3.0 * N[(N[(N[(t$95$0 - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$5, Infinity], t$95$5, N[(x1 + N[(9.0 + N[(x1 + N[(N[Power[x1, 4.0], $MachinePrecision] * N[(6.0 + N[(N[(N[(N[(9.0 + N[(4.0 * N[(N[(2.0 * x2), $MachinePrecision] - 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / x1), $MachinePrecision] - 3.0), $MachinePrecision] / x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x1 \cdot \left(x1 \cdot 3\right)\\
t_1 := \left(t\_0 + 2 \cdot x2\right) - x1\\
t_2 := x1 \cdot x1 + 1\\
t_3 := \frac{t\_1}{t\_2}\\
t_4 := \frac{t\_1}{-1 - x1 \cdot x1}\\
t_5 := x1 + \left(\left(x1 + \left(\left(t\_0 \cdot t\_3 - t\_2 \cdot \left(\left(x1 \cdot x1\right) \cdot \left(6 + 4 \cdot t\_4\right) + \left(\left(x1 \cdot 2\right) \cdot t\_3\right) \cdot \left(3 + t\_4\right)\right)\right) + x1 \cdot \left(x1 \cdot x1\right)\right)\right) + 3 \cdot \frac{\left(t\_0 - 2 \cdot x2\right) - x1}{t\_2}\right)\\
\mathbf{if}\;t\_5 \leq \infty:\\
\;\;\;\;t\_5\\
\mathbf{else}:\\
\;\;\;\;x1 + \left(9 + \left(x1 + {x1}^{4} \cdot \left(6 + \frac{\frac{9 + 4 \cdot \left(2 \cdot x2 - 3\right)}{x1} - 3}{x1}\right)\right)\right)\\
\end{array}
\end{array}
if (+.f64 x1 (+.f64 (+.f64 (+.f64 (+.f64 (*.f64 (+.f64 (*.f64 (*.f64 (*.f64 #s(literal 2 binary64) x1) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64)))) (-.f64 (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))) #s(literal 3 binary64))) (*.f64 (*.f64 x1 x1) (-.f64 (*.f64 #s(literal 4 binary64) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64)))) #s(literal 6 binary64)))) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))) (*.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))))) (*.f64 (*.f64 x1 x1) x1)) x1) (*.f64 #s(literal 3 binary64) (/.f64 (-.f64 (-.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64)))))) < +inf.0Initial program 99.4%
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 12.5%
Taylor expanded in x1 around inf 100.0%
Final simplification99.6%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (* x1 (* x1 3.0)))
(t_1 (- (+ t_0 (* 2.0 x2)) x1))
(t_2 (+ (* x1 x1) 1.0))
(t_3 (/ t_1 t_2))
(t_4 (/ t_1 (- -1.0 (* x1 x1))))
(t_5
(+
x1
(+
(+
x1
(+
(-
(* t_0 t_3)
(*
t_2
(+
(* (* x1 x1) (+ 6.0 (* 4.0 t_4)))
(* (* (* x1 2.0) t_3) (+ 3.0 t_4)))))
(* x1 (* x1 x1))))
(* 3.0 (/ (- (- t_0 (* 2.0 x2)) x1) t_2))))))
(if (<= t_5 INFINITY)
t_5
(+ x1 (+ (+ x1 (* 6.0 (pow x1 4.0))) (* 3.0 (* x2 -2.0)))))))
double code(double x1, double x2) {
double t_0 = x1 * (x1 * 3.0);
double t_1 = (t_0 + (2.0 * x2)) - x1;
double t_2 = (x1 * x1) + 1.0;
double t_3 = t_1 / t_2;
double t_4 = t_1 / (-1.0 - (x1 * x1));
double t_5 = x1 + ((x1 + (((t_0 * t_3) - (t_2 * (((x1 * x1) * (6.0 + (4.0 * t_4))) + (((x1 * 2.0) * t_3) * (3.0 + t_4))))) + (x1 * (x1 * x1)))) + (3.0 * (((t_0 - (2.0 * x2)) - x1) / t_2)));
double tmp;
if (t_5 <= ((double) INFINITY)) {
tmp = t_5;
} else {
tmp = x1 + ((x1 + (6.0 * pow(x1, 4.0))) + (3.0 * (x2 * -2.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)) - x1;
double t_2 = (x1 * x1) + 1.0;
double t_3 = t_1 / t_2;
double t_4 = t_1 / (-1.0 - (x1 * x1));
double t_5 = x1 + ((x1 + (((t_0 * t_3) - (t_2 * (((x1 * x1) * (6.0 + (4.0 * t_4))) + (((x1 * 2.0) * t_3) * (3.0 + t_4))))) + (x1 * (x1 * x1)))) + (3.0 * (((t_0 - (2.0 * x2)) - x1) / t_2)));
double tmp;
if (t_5 <= Double.POSITIVE_INFINITY) {
tmp = t_5;
} else {
tmp = x1 + ((x1 + (6.0 * Math.pow(x1, 4.0))) + (3.0 * (x2 * -2.0)));
}
return tmp;
}
def code(x1, x2): t_0 = x1 * (x1 * 3.0) t_1 = (t_0 + (2.0 * x2)) - x1 t_2 = (x1 * x1) + 1.0 t_3 = t_1 / t_2 t_4 = t_1 / (-1.0 - (x1 * x1)) t_5 = x1 + ((x1 + (((t_0 * t_3) - (t_2 * (((x1 * x1) * (6.0 + (4.0 * t_4))) + (((x1 * 2.0) * t_3) * (3.0 + t_4))))) + (x1 * (x1 * x1)))) + (3.0 * (((t_0 - (2.0 * x2)) - x1) / t_2))) tmp = 0 if t_5 <= math.inf: tmp = t_5 else: tmp = x1 + ((x1 + (6.0 * math.pow(x1, 4.0))) + (3.0 * (x2 * -2.0))) return tmp
function code(x1, x2) t_0 = Float64(x1 * Float64(x1 * 3.0)) t_1 = Float64(Float64(t_0 + Float64(2.0 * x2)) - x1) t_2 = Float64(Float64(x1 * x1) + 1.0) t_3 = Float64(t_1 / t_2) t_4 = Float64(t_1 / Float64(-1.0 - Float64(x1 * x1))) t_5 = Float64(x1 + Float64(Float64(x1 + Float64(Float64(Float64(t_0 * t_3) - Float64(t_2 * Float64(Float64(Float64(x1 * x1) * Float64(6.0 + Float64(4.0 * t_4))) + Float64(Float64(Float64(x1 * 2.0) * t_3) * Float64(3.0 + t_4))))) + Float64(x1 * Float64(x1 * x1)))) + Float64(3.0 * Float64(Float64(Float64(t_0 - Float64(2.0 * x2)) - x1) / t_2)))) tmp = 0.0 if (t_5 <= Inf) tmp = t_5; else tmp = Float64(x1 + Float64(Float64(x1 + Float64(6.0 * (x1 ^ 4.0))) + Float64(3.0 * Float64(x2 * -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)) - x1; t_2 = (x1 * x1) + 1.0; t_3 = t_1 / t_2; t_4 = t_1 / (-1.0 - (x1 * x1)); t_5 = x1 + ((x1 + (((t_0 * t_3) - (t_2 * (((x1 * x1) * (6.0 + (4.0 * t_4))) + (((x1 * 2.0) * t_3) * (3.0 + t_4))))) + (x1 * (x1 * x1)))) + (3.0 * (((t_0 - (2.0 * x2)) - x1) / t_2))); tmp = 0.0; if (t_5 <= Inf) tmp = t_5; else tmp = x1 + ((x1 + (6.0 * (x1 ^ 4.0))) + (3.0 * (x2 * -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[(N[(t$95$0 + N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision]}, Block[{t$95$2 = N[(N[(x1 * x1), $MachinePrecision] + 1.0), $MachinePrecision]}, Block[{t$95$3 = N[(t$95$1 / t$95$2), $MachinePrecision]}, Block[{t$95$4 = N[(t$95$1 / N[(-1.0 - N[(x1 * x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$5 = N[(x1 + N[(N[(x1 + N[(N[(N[(t$95$0 * t$95$3), $MachinePrecision] - N[(t$95$2 * N[(N[(N[(x1 * x1), $MachinePrecision] * N[(6.0 + N[(4.0 * t$95$4), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(N[(x1 * 2.0), $MachinePrecision] * t$95$3), $MachinePrecision] * N[(3.0 + t$95$4), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(x1 * N[(x1 * x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(3.0 * N[(N[(N[(t$95$0 - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$5, Infinity], t$95$5, N[(x1 + N[(N[(x1 + N[(6.0 * N[Power[x1, 4.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(3.0 * N[(x2 * -2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x1 \cdot \left(x1 \cdot 3\right)\\
t_1 := \left(t\_0 + 2 \cdot x2\right) - x1\\
t_2 := x1 \cdot x1 + 1\\
t_3 := \frac{t\_1}{t\_2}\\
t_4 := \frac{t\_1}{-1 - x1 \cdot x1}\\
t_5 := x1 + \left(\left(x1 + \left(\left(t\_0 \cdot t\_3 - t\_2 \cdot \left(\left(x1 \cdot x1\right) \cdot \left(6 + 4 \cdot t\_4\right) + \left(\left(x1 \cdot 2\right) \cdot t\_3\right) \cdot \left(3 + t\_4\right)\right)\right) + x1 \cdot \left(x1 \cdot x1\right)\right)\right) + 3 \cdot \frac{\left(t\_0 - 2 \cdot x2\right) - x1}{t\_2}\right)\\
\mathbf{if}\;t\_5 \leq \infty:\\
\;\;\;\;t\_5\\
\mathbf{else}:\\
\;\;\;\;x1 + \left(\left(x1 + 6 \cdot {x1}^{4}\right) + 3 \cdot \left(x2 \cdot -2\right)\right)\\
\end{array}
\end{array}
if (+.f64 x1 (+.f64 (+.f64 (+.f64 (+.f64 (*.f64 (+.f64 (*.f64 (*.f64 (*.f64 #s(literal 2 binary64) x1) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64)))) (-.f64 (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))) #s(literal 3 binary64))) (*.f64 (*.f64 x1 x1) (-.f64 (*.f64 #s(literal 4 binary64) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64)))) #s(literal 6 binary64)))) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))) (*.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))))) (*.f64 (*.f64 x1 x1) x1)) x1) (*.f64 #s(literal 3 binary64) (/.f64 (-.f64 (-.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64)))))) < +inf.0Initial program 99.4%
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 0 0.0%
*-commutative0.0%
Simplified0.0%
Taylor expanded in x1 around inf 97.5%
Final simplification98.8%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (+ (* x1 x1) 1.0))
(t_1 (* 3.0 (* x2 -2.0)))
(t_2 (+ x1 (+ x1 (* 3.0 (* x1 (+ (* x1 3.0) -1.0))))))
(t_3 (* x1 (* x1 x1)))
(t_4 (* x1 (* x1 3.0)))
(t_5 (- (+ t_4 (* 2.0 x2)) x1))
(t_6 (/ t_5 t_0))
(t_7 (* (* x1 2.0) t_6))
(t_8 (/ t_5 (- -1.0 (* x1 x1))))
(t_9 (- (* 2.0 x2) 3.0))
(t_10 (* t_4 t_6)))
(if (<= x1 -1e+144)
t_2
(if (<= x1 -3.4e+106)
(+ x1 (+ t_1 (+ x1 (* x1 (+ (* 4.0 (* x2 t_9)) (* x1 (* x1 -22.0)))))))
(if (<= x1 -0.008)
(+
x1
(+
t_1
(+
x1
(+
t_3
(+
t_10
(*
t_0
(+
(* t_7 (- t_6 3.0))
(*
(* x1 x1)
(- (* 4.0 (+ 3.0 (/ (+ -1.0 (/ t_9 x1)) x1))) 6.0)))))))))
(if (<= x1 0.00015)
(+
x1
(+
(* 3.0 (/ (- (- t_4 (* 2.0 x2)) x1) t_0))
(+ x1 (* 4.0 (* x2 (+ (* x1 -3.0) (* 2.0 (* x1 x2))))))))
(if (<= x1 5e+153)
(+
x1
(+
(+
x1
(+
(-
t_10
(*
t_0
(+ (* (* x1 x1) (+ 6.0 (* 4.0 t_8))) (* t_7 (+ 3.0 t_8)))))
t_3))
t_1))
t_2)))))))
double code(double x1, double x2) {
double t_0 = (x1 * x1) + 1.0;
double t_1 = 3.0 * (x2 * -2.0);
double t_2 = x1 + (x1 + (3.0 * (x1 * ((x1 * 3.0) + -1.0))));
double t_3 = x1 * (x1 * x1);
double t_4 = x1 * (x1 * 3.0);
double t_5 = (t_4 + (2.0 * x2)) - x1;
double t_6 = t_5 / t_0;
double t_7 = (x1 * 2.0) * t_6;
double t_8 = t_5 / (-1.0 - (x1 * x1));
double t_9 = (2.0 * x2) - 3.0;
double t_10 = t_4 * t_6;
double tmp;
if (x1 <= -1e+144) {
tmp = t_2;
} else if (x1 <= -3.4e+106) {
tmp = x1 + (t_1 + (x1 + (x1 * ((4.0 * (x2 * t_9)) + (x1 * (x1 * -22.0))))));
} else if (x1 <= -0.008) {
tmp = x1 + (t_1 + (x1 + (t_3 + (t_10 + (t_0 * ((t_7 * (t_6 - 3.0)) + ((x1 * x1) * ((4.0 * (3.0 + ((-1.0 + (t_9 / x1)) / x1))) - 6.0))))))));
} else if (x1 <= 0.00015) {
tmp = x1 + ((3.0 * (((t_4 - (2.0 * x2)) - x1) / t_0)) + (x1 + (4.0 * (x2 * ((x1 * -3.0) + (2.0 * (x1 * x2)))))));
} else if (x1 <= 5e+153) {
tmp = x1 + ((x1 + ((t_10 - (t_0 * (((x1 * x1) * (6.0 + (4.0 * t_8))) + (t_7 * (3.0 + t_8))))) + t_3)) + t_1);
} 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_10
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 = x1 + (x1 + (3.0d0 * (x1 * ((x1 * 3.0d0) + (-1.0d0)))))
t_3 = x1 * (x1 * x1)
t_4 = x1 * (x1 * 3.0d0)
t_5 = (t_4 + (2.0d0 * x2)) - x1
t_6 = t_5 / t_0
t_7 = (x1 * 2.0d0) * t_6
t_8 = t_5 / ((-1.0d0) - (x1 * x1))
t_9 = (2.0d0 * x2) - 3.0d0
t_10 = t_4 * t_6
if (x1 <= (-1d+144)) then
tmp = t_2
else if (x1 <= (-3.4d+106)) then
tmp = x1 + (t_1 + (x1 + (x1 * ((4.0d0 * (x2 * t_9)) + (x1 * (x1 * (-22.0d0)))))))
else if (x1 <= (-0.008d0)) then
tmp = x1 + (t_1 + (x1 + (t_3 + (t_10 + (t_0 * ((t_7 * (t_6 - 3.0d0)) + ((x1 * x1) * ((4.0d0 * (3.0d0 + (((-1.0d0) + (t_9 / x1)) / x1))) - 6.0d0))))))))
else if (x1 <= 0.00015d0) then
tmp = x1 + ((3.0d0 * (((t_4 - (2.0d0 * x2)) - x1) / t_0)) + (x1 + (4.0d0 * (x2 * ((x1 * (-3.0d0)) + (2.0d0 * (x1 * x2)))))))
else if (x1 <= 5d+153) then
tmp = x1 + ((x1 + ((t_10 - (t_0 * (((x1 * x1) * (6.0d0 + (4.0d0 * t_8))) + (t_7 * (3.0d0 + t_8))))) + t_3)) + t_1)
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 = 3.0 * (x2 * -2.0);
double t_2 = x1 + (x1 + (3.0 * (x1 * ((x1 * 3.0) + -1.0))));
double t_3 = x1 * (x1 * x1);
double t_4 = x1 * (x1 * 3.0);
double t_5 = (t_4 + (2.0 * x2)) - x1;
double t_6 = t_5 / t_0;
double t_7 = (x1 * 2.0) * t_6;
double t_8 = t_5 / (-1.0 - (x1 * x1));
double t_9 = (2.0 * x2) - 3.0;
double t_10 = t_4 * t_6;
double tmp;
if (x1 <= -1e+144) {
tmp = t_2;
} else if (x1 <= -3.4e+106) {
tmp = x1 + (t_1 + (x1 + (x1 * ((4.0 * (x2 * t_9)) + (x1 * (x1 * -22.0))))));
} else if (x1 <= -0.008) {
tmp = x1 + (t_1 + (x1 + (t_3 + (t_10 + (t_0 * ((t_7 * (t_6 - 3.0)) + ((x1 * x1) * ((4.0 * (3.0 + ((-1.0 + (t_9 / x1)) / x1))) - 6.0))))))));
} else if (x1 <= 0.00015) {
tmp = x1 + ((3.0 * (((t_4 - (2.0 * x2)) - x1) / t_0)) + (x1 + (4.0 * (x2 * ((x1 * -3.0) + (2.0 * (x1 * x2)))))));
} else if (x1 <= 5e+153) {
tmp = x1 + ((x1 + ((t_10 - (t_0 * (((x1 * x1) * (6.0 + (4.0 * t_8))) + (t_7 * (3.0 + t_8))))) + t_3)) + t_1);
} else {
tmp = t_2;
}
return tmp;
}
def code(x1, x2): t_0 = (x1 * x1) + 1.0 t_1 = 3.0 * (x2 * -2.0) t_2 = x1 + (x1 + (3.0 * (x1 * ((x1 * 3.0) + -1.0)))) t_3 = x1 * (x1 * x1) t_4 = x1 * (x1 * 3.0) t_5 = (t_4 + (2.0 * x2)) - x1 t_6 = t_5 / t_0 t_7 = (x1 * 2.0) * t_6 t_8 = t_5 / (-1.0 - (x1 * x1)) t_9 = (2.0 * x2) - 3.0 t_10 = t_4 * t_6 tmp = 0 if x1 <= -1e+144: tmp = t_2 elif x1 <= -3.4e+106: tmp = x1 + (t_1 + (x1 + (x1 * ((4.0 * (x2 * t_9)) + (x1 * (x1 * -22.0)))))) elif x1 <= -0.008: tmp = x1 + (t_1 + (x1 + (t_3 + (t_10 + (t_0 * ((t_7 * (t_6 - 3.0)) + ((x1 * x1) * ((4.0 * (3.0 + ((-1.0 + (t_9 / x1)) / x1))) - 6.0)))))))) elif x1 <= 0.00015: tmp = x1 + ((3.0 * (((t_4 - (2.0 * x2)) - x1) / t_0)) + (x1 + (4.0 * (x2 * ((x1 * -3.0) + (2.0 * (x1 * x2))))))) elif x1 <= 5e+153: tmp = x1 + ((x1 + ((t_10 - (t_0 * (((x1 * x1) * (6.0 + (4.0 * t_8))) + (t_7 * (3.0 + t_8))))) + t_3)) + t_1) else: tmp = t_2 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(x1 + Float64(x1 + Float64(3.0 * Float64(x1 * Float64(Float64(x1 * 3.0) + -1.0))))) t_3 = Float64(x1 * Float64(x1 * x1)) t_4 = Float64(x1 * Float64(x1 * 3.0)) t_5 = Float64(Float64(t_4 + Float64(2.0 * x2)) - x1) t_6 = Float64(t_5 / t_0) t_7 = Float64(Float64(x1 * 2.0) * t_6) t_8 = Float64(t_5 / Float64(-1.0 - Float64(x1 * x1))) t_9 = Float64(Float64(2.0 * x2) - 3.0) t_10 = Float64(t_4 * t_6) tmp = 0.0 if (x1 <= -1e+144) tmp = t_2; elseif (x1 <= -3.4e+106) tmp = Float64(x1 + Float64(t_1 + Float64(x1 + Float64(x1 * Float64(Float64(4.0 * Float64(x2 * t_9)) + Float64(x1 * Float64(x1 * -22.0))))))); elseif (x1 <= -0.008) tmp = Float64(x1 + Float64(t_1 + Float64(x1 + Float64(t_3 + Float64(t_10 + Float64(t_0 * Float64(Float64(t_7 * Float64(t_6 - 3.0)) + Float64(Float64(x1 * x1) * Float64(Float64(4.0 * Float64(3.0 + Float64(Float64(-1.0 + Float64(t_9 / x1)) / x1))) - 6.0))))))))); elseif (x1 <= 0.00015) tmp = Float64(x1 + Float64(Float64(3.0 * Float64(Float64(Float64(t_4 - Float64(2.0 * x2)) - x1) / t_0)) + Float64(x1 + Float64(4.0 * Float64(x2 * Float64(Float64(x1 * -3.0) + Float64(2.0 * Float64(x1 * x2)))))))); elseif (x1 <= 5e+153) tmp = Float64(x1 + Float64(Float64(x1 + Float64(Float64(t_10 - Float64(t_0 * Float64(Float64(Float64(x1 * x1) * Float64(6.0 + Float64(4.0 * t_8))) + Float64(t_7 * Float64(3.0 + t_8))))) + t_3)) + t_1)); else tmp = t_2; 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 = x1 + (x1 + (3.0 * (x1 * ((x1 * 3.0) + -1.0)))); t_3 = x1 * (x1 * x1); t_4 = x1 * (x1 * 3.0); t_5 = (t_4 + (2.0 * x2)) - x1; t_6 = t_5 / t_0; t_7 = (x1 * 2.0) * t_6; t_8 = t_5 / (-1.0 - (x1 * x1)); t_9 = (2.0 * x2) - 3.0; t_10 = t_4 * t_6; tmp = 0.0; if (x1 <= -1e+144) tmp = t_2; elseif (x1 <= -3.4e+106) tmp = x1 + (t_1 + (x1 + (x1 * ((4.0 * (x2 * t_9)) + (x1 * (x1 * -22.0)))))); elseif (x1 <= -0.008) tmp = x1 + (t_1 + (x1 + (t_3 + (t_10 + (t_0 * ((t_7 * (t_6 - 3.0)) + ((x1 * x1) * ((4.0 * (3.0 + ((-1.0 + (t_9 / x1)) / x1))) - 6.0)))))))); elseif (x1 <= 0.00015) tmp = x1 + ((3.0 * (((t_4 - (2.0 * x2)) - x1) / t_0)) + (x1 + (4.0 * (x2 * ((x1 * -3.0) + (2.0 * (x1 * x2))))))); elseif (x1 <= 5e+153) tmp = x1 + ((x1 + ((t_10 - (t_0 * (((x1 * x1) * (6.0 + (4.0 * t_8))) + (t_7 * (3.0 + t_8))))) + t_3)) + t_1); 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[(3.0 * N[(x2 * -2.0), $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 * x1), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[(x1 * N[(x1 * 3.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$5 = N[(N[(t$95$4 + N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision]}, Block[{t$95$6 = N[(t$95$5 / t$95$0), $MachinePrecision]}, Block[{t$95$7 = N[(N[(x1 * 2.0), $MachinePrecision] * t$95$6), $MachinePrecision]}, Block[{t$95$8 = N[(t$95$5 / N[(-1.0 - N[(x1 * x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$9 = N[(N[(2.0 * x2), $MachinePrecision] - 3.0), $MachinePrecision]}, Block[{t$95$10 = N[(t$95$4 * t$95$6), $MachinePrecision]}, If[LessEqual[x1, -1e+144], t$95$2, If[LessEqual[x1, -3.4e+106], N[(x1 + N[(t$95$1 + N[(x1 + N[(x1 * N[(N[(4.0 * N[(x2 * t$95$9), $MachinePrecision]), $MachinePrecision] + N[(x1 * N[(x1 * -22.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, -0.008], N[(x1 + N[(t$95$1 + N[(x1 + N[(t$95$3 + N[(t$95$10 + N[(t$95$0 * N[(N[(t$95$7 * N[(t$95$6 - 3.0), $MachinePrecision]), $MachinePrecision] + N[(N[(x1 * x1), $MachinePrecision] * N[(N[(4.0 * N[(3.0 + N[(N[(-1.0 + N[(t$95$9 / x1), $MachinePrecision]), $MachinePrecision] / x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 0.00015], N[(x1 + N[(N[(3.0 * N[(N[(N[(t$95$4 - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$0), $MachinePrecision]), $MachinePrecision] + N[(x1 + N[(4.0 * N[(x2 * N[(N[(x1 * -3.0), $MachinePrecision] + N[(2.0 * N[(x1 * x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 5e+153], N[(x1 + N[(N[(x1 + N[(N[(t$95$10 - N[(t$95$0 * N[(N[(N[(x1 * x1), $MachinePrecision] * N[(6.0 + N[(4.0 * t$95$8), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(t$95$7 * N[(3.0 + t$95$8), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + t$95$3), $MachinePrecision]), $MachinePrecision] + t$95$1), $MachinePrecision]), $MachinePrecision], t$95$2]]]]]]]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x1 \cdot x1 + 1\\
t_1 := 3 \cdot \left(x2 \cdot -2\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 x1\right)\\
t_4 := x1 \cdot \left(x1 \cdot 3\right)\\
t_5 := \left(t\_4 + 2 \cdot x2\right) - x1\\
t_6 := \frac{t\_5}{t\_0}\\
t_7 := \left(x1 \cdot 2\right) \cdot t\_6\\
t_8 := \frac{t\_5}{-1 - x1 \cdot x1}\\
t_9 := 2 \cdot x2 - 3\\
t_10 := t\_4 \cdot t\_6\\
\mathbf{if}\;x1 \leq -1 \cdot 10^{+144}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;x1 \leq -3.4 \cdot 10^{+106}:\\
\;\;\;\;x1 + \left(t\_1 + \left(x1 + x1 \cdot \left(4 \cdot \left(x2 \cdot t\_9\right) + x1 \cdot \left(x1 \cdot -22\right)\right)\right)\right)\\
\mathbf{elif}\;x1 \leq -0.008:\\
\;\;\;\;x1 + \left(t\_1 + \left(x1 + \left(t\_3 + \left(t\_10 + t\_0 \cdot \left(t\_7 \cdot \left(t\_6 - 3\right) + \left(x1 \cdot x1\right) \cdot \left(4 \cdot \left(3 + \frac{-1 + \frac{t\_9}{x1}}{x1}\right) - 6\right)\right)\right)\right)\right)\right)\\
\mathbf{elif}\;x1 \leq 0.00015:\\
\;\;\;\;x1 + \left(3 \cdot \frac{\left(t\_4 - 2 \cdot x2\right) - x1}{t\_0} + \left(x1 + 4 \cdot \left(x2 \cdot \left(x1 \cdot -3 + 2 \cdot \left(x1 \cdot x2\right)\right)\right)\right)\right)\\
\mathbf{elif}\;x1 \leq 5 \cdot 10^{+153}:\\
\;\;\;\;x1 + \left(\left(x1 + \left(\left(t\_10 - t\_0 \cdot \left(\left(x1 \cdot x1\right) \cdot \left(6 + 4 \cdot t\_8\right) + t\_7 \cdot \left(3 + t\_8\right)\right)\right) + t\_3\right)\right) + t\_1\right)\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if x1 < -1.00000000000000002e144 or 5.00000000000000018e153 < x1 Initial program 0.0%
Taylor expanded in x1 around 0 0.0%
Taylor expanded in x1 around 0 60.6%
Taylor expanded in x2 around 0 98.7%
if -1.00000000000000002e144 < x1 < -3.39999999999999994e106Initial program 0.0%
Taylor expanded in x1 around 0 0.0%
*-commutative0.0%
Simplified0.0%
Taylor expanded in x1 around 0 75.0%
Taylor expanded in x2 around 0 75.0%
*-commutative75.0%
Simplified75.0%
if -3.39999999999999994e106 < x1 < -0.0080000000000000002Initial program 99.3%
Taylor expanded in x1 around 0 99.3%
*-commutative99.3%
Simplified99.3%
Taylor expanded in x1 around -inf 99.4%
if -0.0080000000000000002 < x1 < 1.49999999999999987e-4Initial program 99.4%
Taylor expanded in x1 around 0 89.3%
Taylor expanded in x2 around 0 99.4%
if 1.49999999999999987e-4 < x1 < 5.00000000000000018e153Initial program 96.2%
Taylor expanded in x1 around 0 96.2%
*-commutative96.2%
Simplified96.2%
Final simplification98.1%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (+ (* x1 x1) 1.0))
(t_1 (* 3.0 (* x2 -2.0)))
(t_2 (+ x1 (+ x1 (* 3.0 (* x1 (+ (* x1 3.0) -1.0))))))
(t_3 (* x1 (* x1 x1)))
(t_4 (* x1 (* x1 3.0)))
(t_5 (- (+ t_4 (* 2.0 x2)) x1))
(t_6 (/ t_5 t_0))
(t_7 (* (* x1 2.0) t_6))
(t_8 (/ t_5 (- -1.0 (* x1 x1))))
(t_9 (- (* 2.0 x2) 3.0))
(t_10 (* t_4 t_6)))
(if (<= x1 -1e+144)
t_2
(if (<= x1 -3.4e+106)
(+ x1 (+ t_1 (+ x1 (* x1 (+ (* 4.0 (* x2 t_9)) (* x1 (* x1 -22.0)))))))
(if (<= x1 -0.0042)
(+
x1
(+
t_1
(+
x1
(+
t_3
(+
t_10
(*
t_0
(+
(* t_7 (- t_6 3.0))
(*
(* x1 x1)
(- (* 4.0 (+ 3.0 (/ (+ -1.0 (/ t_9 x1)) x1))) 6.0)))))))))
(if (<= x1 0.00085)
(+
x1
(+
(* 3.0 (/ (- (- t_4 (* 2.0 x2)) x1) t_0))
(+ x1 (* 4.0 (* x2 (+ (* x1 -3.0) (* 2.0 (* x1 x2))))))))
(if (<= x1 2e+153)
(+
x1
(+
(+
x1
(+
(-
t_10
(*
t_0
(+ (* (* x1 x1) (+ 6.0 (* 4.0 t_8))) (* t_7 (+ 3.0 t_8)))))
t_3))
9.0))
t_2)))))))
double code(double x1, double x2) {
double t_0 = (x1 * x1) + 1.0;
double t_1 = 3.0 * (x2 * -2.0);
double t_2 = x1 + (x1 + (3.0 * (x1 * ((x1 * 3.0) + -1.0))));
double t_3 = x1 * (x1 * x1);
double t_4 = x1 * (x1 * 3.0);
double t_5 = (t_4 + (2.0 * x2)) - x1;
double t_6 = t_5 / t_0;
double t_7 = (x1 * 2.0) * t_6;
double t_8 = t_5 / (-1.0 - (x1 * x1));
double t_9 = (2.0 * x2) - 3.0;
double t_10 = t_4 * t_6;
double tmp;
if (x1 <= -1e+144) {
tmp = t_2;
} else if (x1 <= -3.4e+106) {
tmp = x1 + (t_1 + (x1 + (x1 * ((4.0 * (x2 * t_9)) + (x1 * (x1 * -22.0))))));
} else if (x1 <= -0.0042) {
tmp = x1 + (t_1 + (x1 + (t_3 + (t_10 + (t_0 * ((t_7 * (t_6 - 3.0)) + ((x1 * x1) * ((4.0 * (3.0 + ((-1.0 + (t_9 / x1)) / x1))) - 6.0))))))));
} else if (x1 <= 0.00085) {
tmp = x1 + ((3.0 * (((t_4 - (2.0 * x2)) - x1) / t_0)) + (x1 + (4.0 * (x2 * ((x1 * -3.0) + (2.0 * (x1 * x2)))))));
} else if (x1 <= 2e+153) {
tmp = x1 + ((x1 + ((t_10 - (t_0 * (((x1 * x1) * (6.0 + (4.0 * t_8))) + (t_7 * (3.0 + t_8))))) + t_3)) + 9.0);
} 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_10
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 = x1 + (x1 + (3.0d0 * (x1 * ((x1 * 3.0d0) + (-1.0d0)))))
t_3 = x1 * (x1 * x1)
t_4 = x1 * (x1 * 3.0d0)
t_5 = (t_4 + (2.0d0 * x2)) - x1
t_6 = t_5 / t_0
t_7 = (x1 * 2.0d0) * t_6
t_8 = t_5 / ((-1.0d0) - (x1 * x1))
t_9 = (2.0d0 * x2) - 3.0d0
t_10 = t_4 * t_6
if (x1 <= (-1d+144)) then
tmp = t_2
else if (x1 <= (-3.4d+106)) then
tmp = x1 + (t_1 + (x1 + (x1 * ((4.0d0 * (x2 * t_9)) + (x1 * (x1 * (-22.0d0)))))))
else if (x1 <= (-0.0042d0)) then
tmp = x1 + (t_1 + (x1 + (t_3 + (t_10 + (t_0 * ((t_7 * (t_6 - 3.0d0)) + ((x1 * x1) * ((4.0d0 * (3.0d0 + (((-1.0d0) + (t_9 / x1)) / x1))) - 6.0d0))))))))
else if (x1 <= 0.00085d0) then
tmp = x1 + ((3.0d0 * (((t_4 - (2.0d0 * x2)) - x1) / t_0)) + (x1 + (4.0d0 * (x2 * ((x1 * (-3.0d0)) + (2.0d0 * (x1 * x2)))))))
else if (x1 <= 2d+153) then
tmp = x1 + ((x1 + ((t_10 - (t_0 * (((x1 * x1) * (6.0d0 + (4.0d0 * t_8))) + (t_7 * (3.0d0 + t_8))))) + t_3)) + 9.0d0)
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 = 3.0 * (x2 * -2.0);
double t_2 = x1 + (x1 + (3.0 * (x1 * ((x1 * 3.0) + -1.0))));
double t_3 = x1 * (x1 * x1);
double t_4 = x1 * (x1 * 3.0);
double t_5 = (t_4 + (2.0 * x2)) - x1;
double t_6 = t_5 / t_0;
double t_7 = (x1 * 2.0) * t_6;
double t_8 = t_5 / (-1.0 - (x1 * x1));
double t_9 = (2.0 * x2) - 3.0;
double t_10 = t_4 * t_6;
double tmp;
if (x1 <= -1e+144) {
tmp = t_2;
} else if (x1 <= -3.4e+106) {
tmp = x1 + (t_1 + (x1 + (x1 * ((4.0 * (x2 * t_9)) + (x1 * (x1 * -22.0))))));
} else if (x1 <= -0.0042) {
tmp = x1 + (t_1 + (x1 + (t_3 + (t_10 + (t_0 * ((t_7 * (t_6 - 3.0)) + ((x1 * x1) * ((4.0 * (3.0 + ((-1.0 + (t_9 / x1)) / x1))) - 6.0))))))));
} else if (x1 <= 0.00085) {
tmp = x1 + ((3.0 * (((t_4 - (2.0 * x2)) - x1) / t_0)) + (x1 + (4.0 * (x2 * ((x1 * -3.0) + (2.0 * (x1 * x2)))))));
} else if (x1 <= 2e+153) {
tmp = x1 + ((x1 + ((t_10 - (t_0 * (((x1 * x1) * (6.0 + (4.0 * t_8))) + (t_7 * (3.0 + t_8))))) + t_3)) + 9.0);
} else {
tmp = t_2;
}
return tmp;
}
def code(x1, x2): t_0 = (x1 * x1) + 1.0 t_1 = 3.0 * (x2 * -2.0) t_2 = x1 + (x1 + (3.0 * (x1 * ((x1 * 3.0) + -1.0)))) t_3 = x1 * (x1 * x1) t_4 = x1 * (x1 * 3.0) t_5 = (t_4 + (2.0 * x2)) - x1 t_6 = t_5 / t_0 t_7 = (x1 * 2.0) * t_6 t_8 = t_5 / (-1.0 - (x1 * x1)) t_9 = (2.0 * x2) - 3.0 t_10 = t_4 * t_6 tmp = 0 if x1 <= -1e+144: tmp = t_2 elif x1 <= -3.4e+106: tmp = x1 + (t_1 + (x1 + (x1 * ((4.0 * (x2 * t_9)) + (x1 * (x1 * -22.0)))))) elif x1 <= -0.0042: tmp = x1 + (t_1 + (x1 + (t_3 + (t_10 + (t_0 * ((t_7 * (t_6 - 3.0)) + ((x1 * x1) * ((4.0 * (3.0 + ((-1.0 + (t_9 / x1)) / x1))) - 6.0)))))))) elif x1 <= 0.00085: tmp = x1 + ((3.0 * (((t_4 - (2.0 * x2)) - x1) / t_0)) + (x1 + (4.0 * (x2 * ((x1 * -3.0) + (2.0 * (x1 * x2))))))) elif x1 <= 2e+153: tmp = x1 + ((x1 + ((t_10 - (t_0 * (((x1 * x1) * (6.0 + (4.0 * t_8))) + (t_7 * (3.0 + t_8))))) + t_3)) + 9.0) else: tmp = t_2 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(x1 + Float64(x1 + Float64(3.0 * Float64(x1 * Float64(Float64(x1 * 3.0) + -1.0))))) t_3 = Float64(x1 * Float64(x1 * x1)) t_4 = Float64(x1 * Float64(x1 * 3.0)) t_5 = Float64(Float64(t_4 + Float64(2.0 * x2)) - x1) t_6 = Float64(t_5 / t_0) t_7 = Float64(Float64(x1 * 2.0) * t_6) t_8 = Float64(t_5 / Float64(-1.0 - Float64(x1 * x1))) t_9 = Float64(Float64(2.0 * x2) - 3.0) t_10 = Float64(t_4 * t_6) tmp = 0.0 if (x1 <= -1e+144) tmp = t_2; elseif (x1 <= -3.4e+106) tmp = Float64(x1 + Float64(t_1 + Float64(x1 + Float64(x1 * Float64(Float64(4.0 * Float64(x2 * t_9)) + Float64(x1 * Float64(x1 * -22.0))))))); elseif (x1 <= -0.0042) tmp = Float64(x1 + Float64(t_1 + Float64(x1 + Float64(t_3 + Float64(t_10 + Float64(t_0 * Float64(Float64(t_7 * Float64(t_6 - 3.0)) + Float64(Float64(x1 * x1) * Float64(Float64(4.0 * Float64(3.0 + Float64(Float64(-1.0 + Float64(t_9 / x1)) / x1))) - 6.0))))))))); elseif (x1 <= 0.00085) tmp = Float64(x1 + Float64(Float64(3.0 * Float64(Float64(Float64(t_4 - Float64(2.0 * x2)) - x1) / t_0)) + Float64(x1 + Float64(4.0 * Float64(x2 * Float64(Float64(x1 * -3.0) + Float64(2.0 * Float64(x1 * x2)))))))); elseif (x1 <= 2e+153) tmp = Float64(x1 + Float64(Float64(x1 + Float64(Float64(t_10 - Float64(t_0 * Float64(Float64(Float64(x1 * x1) * Float64(6.0 + Float64(4.0 * t_8))) + Float64(t_7 * Float64(3.0 + t_8))))) + t_3)) + 9.0)); else tmp = t_2; 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 = x1 + (x1 + (3.0 * (x1 * ((x1 * 3.0) + -1.0)))); t_3 = x1 * (x1 * x1); t_4 = x1 * (x1 * 3.0); t_5 = (t_4 + (2.0 * x2)) - x1; t_6 = t_5 / t_0; t_7 = (x1 * 2.0) * t_6; t_8 = t_5 / (-1.0 - (x1 * x1)); t_9 = (2.0 * x2) - 3.0; t_10 = t_4 * t_6; tmp = 0.0; if (x1 <= -1e+144) tmp = t_2; elseif (x1 <= -3.4e+106) tmp = x1 + (t_1 + (x1 + (x1 * ((4.0 * (x2 * t_9)) + (x1 * (x1 * -22.0)))))); elseif (x1 <= -0.0042) tmp = x1 + (t_1 + (x1 + (t_3 + (t_10 + (t_0 * ((t_7 * (t_6 - 3.0)) + ((x1 * x1) * ((4.0 * (3.0 + ((-1.0 + (t_9 / x1)) / x1))) - 6.0)))))))); elseif (x1 <= 0.00085) tmp = x1 + ((3.0 * (((t_4 - (2.0 * x2)) - x1) / t_0)) + (x1 + (4.0 * (x2 * ((x1 * -3.0) + (2.0 * (x1 * x2))))))); elseif (x1 <= 2e+153) tmp = x1 + ((x1 + ((t_10 - (t_0 * (((x1 * x1) * (6.0 + (4.0 * t_8))) + (t_7 * (3.0 + t_8))))) + t_3)) + 9.0); 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[(3.0 * N[(x2 * -2.0), $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 * x1), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[(x1 * N[(x1 * 3.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$5 = N[(N[(t$95$4 + N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision]}, Block[{t$95$6 = N[(t$95$5 / t$95$0), $MachinePrecision]}, Block[{t$95$7 = N[(N[(x1 * 2.0), $MachinePrecision] * t$95$6), $MachinePrecision]}, Block[{t$95$8 = N[(t$95$5 / N[(-1.0 - N[(x1 * x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$9 = N[(N[(2.0 * x2), $MachinePrecision] - 3.0), $MachinePrecision]}, Block[{t$95$10 = N[(t$95$4 * t$95$6), $MachinePrecision]}, If[LessEqual[x1, -1e+144], t$95$2, If[LessEqual[x1, -3.4e+106], N[(x1 + N[(t$95$1 + N[(x1 + N[(x1 * N[(N[(4.0 * N[(x2 * t$95$9), $MachinePrecision]), $MachinePrecision] + N[(x1 * N[(x1 * -22.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, -0.0042], N[(x1 + N[(t$95$1 + N[(x1 + N[(t$95$3 + N[(t$95$10 + N[(t$95$0 * N[(N[(t$95$7 * N[(t$95$6 - 3.0), $MachinePrecision]), $MachinePrecision] + N[(N[(x1 * x1), $MachinePrecision] * N[(N[(4.0 * N[(3.0 + N[(N[(-1.0 + N[(t$95$9 / x1), $MachinePrecision]), $MachinePrecision] / x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 0.00085], N[(x1 + N[(N[(3.0 * N[(N[(N[(t$95$4 - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$0), $MachinePrecision]), $MachinePrecision] + N[(x1 + N[(4.0 * N[(x2 * N[(N[(x1 * -3.0), $MachinePrecision] + N[(2.0 * N[(x1 * x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 2e+153], N[(x1 + N[(N[(x1 + N[(N[(t$95$10 - N[(t$95$0 * N[(N[(N[(x1 * x1), $MachinePrecision] * N[(6.0 + N[(4.0 * t$95$8), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(t$95$7 * N[(3.0 + t$95$8), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + t$95$3), $MachinePrecision]), $MachinePrecision] + 9.0), $MachinePrecision]), $MachinePrecision], t$95$2]]]]]]]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x1 \cdot x1 + 1\\
t_1 := 3 \cdot \left(x2 \cdot -2\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 x1\right)\\
t_4 := x1 \cdot \left(x1 \cdot 3\right)\\
t_5 := \left(t\_4 + 2 \cdot x2\right) - x1\\
t_6 := \frac{t\_5}{t\_0}\\
t_7 := \left(x1 \cdot 2\right) \cdot t\_6\\
t_8 := \frac{t\_5}{-1 - x1 \cdot x1}\\
t_9 := 2 \cdot x2 - 3\\
t_10 := t\_4 \cdot t\_6\\
\mathbf{if}\;x1 \leq -1 \cdot 10^{+144}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;x1 \leq -3.4 \cdot 10^{+106}:\\
\;\;\;\;x1 + \left(t\_1 + \left(x1 + x1 \cdot \left(4 \cdot \left(x2 \cdot t\_9\right) + x1 \cdot \left(x1 \cdot -22\right)\right)\right)\right)\\
\mathbf{elif}\;x1 \leq -0.0042:\\
\;\;\;\;x1 + \left(t\_1 + \left(x1 + \left(t\_3 + \left(t\_10 + t\_0 \cdot \left(t\_7 \cdot \left(t\_6 - 3\right) + \left(x1 \cdot x1\right) \cdot \left(4 \cdot \left(3 + \frac{-1 + \frac{t\_9}{x1}}{x1}\right) - 6\right)\right)\right)\right)\right)\right)\\
\mathbf{elif}\;x1 \leq 0.00085:\\
\;\;\;\;x1 + \left(3 \cdot \frac{\left(t\_4 - 2 \cdot x2\right) - x1}{t\_0} + \left(x1 + 4 \cdot \left(x2 \cdot \left(x1 \cdot -3 + 2 \cdot \left(x1 \cdot x2\right)\right)\right)\right)\right)\\
\mathbf{elif}\;x1 \leq 2 \cdot 10^{+153}:\\
\;\;\;\;x1 + \left(\left(x1 + \left(\left(t\_10 - t\_0 \cdot \left(\left(x1 \cdot x1\right) \cdot \left(6 + 4 \cdot t\_8\right) + t\_7 \cdot \left(3 + t\_8\right)\right)\right) + t\_3\right)\right) + 9\right)\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if x1 < -1.00000000000000002e144 or 2e153 < x1 Initial program 0.0%
Taylor expanded in x1 around 0 0.0%
Taylor expanded in x1 around 0 60.6%
Taylor expanded in x2 around 0 98.7%
if -1.00000000000000002e144 < x1 < -3.39999999999999994e106Initial program 0.0%
Taylor expanded in x1 around 0 0.0%
*-commutative0.0%
Simplified0.0%
Taylor expanded in x1 around 0 75.0%
Taylor expanded in x2 around 0 75.0%
*-commutative75.0%
Simplified75.0%
if -3.39999999999999994e106 < x1 < -0.00419999999999999974Initial program 99.3%
Taylor expanded in x1 around 0 99.3%
*-commutative99.3%
Simplified99.3%
Taylor expanded in x1 around -inf 99.4%
if -0.00419999999999999974 < x1 < 8.49999999999999953e-4Initial program 99.4%
Taylor expanded in x1 around 0 89.3%
Taylor expanded in x2 around 0 99.4%
if 8.49999999999999953e-4 < x1 < 2e153Initial program 96.2%
Taylor expanded in x1 around inf 96.2%
Final simplification98.1%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (+ (* x1 x1) 1.0))
(t_1 (* 3.0 (* x2 -2.0)))
(t_2 (+ x1 (+ x1 (* 3.0 (* x1 (+ (* x1 3.0) -1.0))))))
(t_3 (* x1 (* x1 x1)))
(t_4 (* x1 (* x1 3.0)))
(t_5 (- (+ t_4 (* 2.0 x2)) x1))
(t_6 (/ t_5 (- -1.0 (* x1 x1))))
(t_7 (/ t_5 t_0))
(t_8 (* (* x1 2.0) t_7))
(t_9 (* t_4 t_7)))
(if (<= x1 -1e+144)
t_2
(if (<= x1 -3.4e+106)
(+
x1
(+
t_1
(+
x1
(* x1 (+ (* 4.0 (* x2 (- (* 2.0 x2) 3.0))) (* x1 (* x1 -22.0)))))))
(if (<= x1 -0.65)
(+
x1
(+
t_1
(+
x1
(+
t_3
(+
t_9
(*
t_0
(+
(* (* x1 x1) (- (* t_7 4.0) 6.0))
(* t_8 (/ (+ (* 2.0 (/ x2 x1)) (- -1.0 (/ 3.0 x1))) x1)))))))))
(if (<= x1 0.0034)
(+
x1
(+
(* 3.0 (/ (- (- t_4 (* 2.0 x2)) x1) t_0))
(+ x1 (* 4.0 (* x2 (+ (* x1 -3.0) (* 2.0 (* x1 x2))))))))
(if (<= x1 2e+153)
(+
x1
(+
(+
x1
(+
(-
t_9
(*
t_0
(+ (* (* x1 x1) (+ 6.0 (* 4.0 t_6))) (* t_8 (+ 3.0 t_6)))))
t_3))
9.0))
t_2)))))))
double code(double x1, double x2) {
double t_0 = (x1 * x1) + 1.0;
double t_1 = 3.0 * (x2 * -2.0);
double t_2 = x1 + (x1 + (3.0 * (x1 * ((x1 * 3.0) + -1.0))));
double t_3 = x1 * (x1 * x1);
double t_4 = x1 * (x1 * 3.0);
double t_5 = (t_4 + (2.0 * x2)) - x1;
double t_6 = t_5 / (-1.0 - (x1 * x1));
double t_7 = t_5 / t_0;
double t_8 = (x1 * 2.0) * t_7;
double t_9 = t_4 * t_7;
double tmp;
if (x1 <= -1e+144) {
tmp = t_2;
} else if (x1 <= -3.4e+106) {
tmp = x1 + (t_1 + (x1 + (x1 * ((4.0 * (x2 * ((2.0 * x2) - 3.0))) + (x1 * (x1 * -22.0))))));
} else if (x1 <= -0.65) {
tmp = x1 + (t_1 + (x1 + (t_3 + (t_9 + (t_0 * (((x1 * x1) * ((t_7 * 4.0) - 6.0)) + (t_8 * (((2.0 * (x2 / x1)) + (-1.0 - (3.0 / x1))) / x1))))))));
} else if (x1 <= 0.0034) {
tmp = x1 + ((3.0 * (((t_4 - (2.0 * x2)) - x1) / t_0)) + (x1 + (4.0 * (x2 * ((x1 * -3.0) + (2.0 * (x1 * x2)))))));
} else if (x1 <= 2e+153) {
tmp = x1 + ((x1 + ((t_9 - (t_0 * (((x1 * x1) * (6.0 + (4.0 * t_6))) + (t_8 * (3.0 + t_6))))) + t_3)) + 9.0);
} 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) :: t_9
real(8) :: tmp
t_0 = (x1 * x1) + 1.0d0
t_1 = 3.0d0 * (x2 * (-2.0d0))
t_2 = x1 + (x1 + (3.0d0 * (x1 * ((x1 * 3.0d0) + (-1.0d0)))))
t_3 = x1 * (x1 * x1)
t_4 = x1 * (x1 * 3.0d0)
t_5 = (t_4 + (2.0d0 * x2)) - x1
t_6 = t_5 / ((-1.0d0) - (x1 * x1))
t_7 = t_5 / t_0
t_8 = (x1 * 2.0d0) * t_7
t_9 = t_4 * t_7
if (x1 <= (-1d+144)) then
tmp = t_2
else if (x1 <= (-3.4d+106)) then
tmp = x1 + (t_1 + (x1 + (x1 * ((4.0d0 * (x2 * ((2.0d0 * x2) - 3.0d0))) + (x1 * (x1 * (-22.0d0)))))))
else if (x1 <= (-0.65d0)) then
tmp = x1 + (t_1 + (x1 + (t_3 + (t_9 + (t_0 * (((x1 * x1) * ((t_7 * 4.0d0) - 6.0d0)) + (t_8 * (((2.0d0 * (x2 / x1)) + ((-1.0d0) - (3.0d0 / x1))) / x1))))))))
else if (x1 <= 0.0034d0) then
tmp = x1 + ((3.0d0 * (((t_4 - (2.0d0 * x2)) - x1) / t_0)) + (x1 + (4.0d0 * (x2 * ((x1 * (-3.0d0)) + (2.0d0 * (x1 * x2)))))))
else if (x1 <= 2d+153) then
tmp = x1 + ((x1 + ((t_9 - (t_0 * (((x1 * x1) * (6.0d0 + (4.0d0 * t_6))) + (t_8 * (3.0d0 + t_6))))) + t_3)) + 9.0d0)
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 = 3.0 * (x2 * -2.0);
double t_2 = x1 + (x1 + (3.0 * (x1 * ((x1 * 3.0) + -1.0))));
double t_3 = x1 * (x1 * x1);
double t_4 = x1 * (x1 * 3.0);
double t_5 = (t_4 + (2.0 * x2)) - x1;
double t_6 = t_5 / (-1.0 - (x1 * x1));
double t_7 = t_5 / t_0;
double t_8 = (x1 * 2.0) * t_7;
double t_9 = t_4 * t_7;
double tmp;
if (x1 <= -1e+144) {
tmp = t_2;
} else if (x1 <= -3.4e+106) {
tmp = x1 + (t_1 + (x1 + (x1 * ((4.0 * (x2 * ((2.0 * x2) - 3.0))) + (x1 * (x1 * -22.0))))));
} else if (x1 <= -0.65) {
tmp = x1 + (t_1 + (x1 + (t_3 + (t_9 + (t_0 * (((x1 * x1) * ((t_7 * 4.0) - 6.0)) + (t_8 * (((2.0 * (x2 / x1)) + (-1.0 - (3.0 / x1))) / x1))))))));
} else if (x1 <= 0.0034) {
tmp = x1 + ((3.0 * (((t_4 - (2.0 * x2)) - x1) / t_0)) + (x1 + (4.0 * (x2 * ((x1 * -3.0) + (2.0 * (x1 * x2)))))));
} else if (x1 <= 2e+153) {
tmp = x1 + ((x1 + ((t_9 - (t_0 * (((x1 * x1) * (6.0 + (4.0 * t_6))) + (t_8 * (3.0 + t_6))))) + t_3)) + 9.0);
} else {
tmp = t_2;
}
return tmp;
}
def code(x1, x2): t_0 = (x1 * x1) + 1.0 t_1 = 3.0 * (x2 * -2.0) t_2 = x1 + (x1 + (3.0 * (x1 * ((x1 * 3.0) + -1.0)))) t_3 = x1 * (x1 * x1) t_4 = x1 * (x1 * 3.0) t_5 = (t_4 + (2.0 * x2)) - x1 t_6 = t_5 / (-1.0 - (x1 * x1)) t_7 = t_5 / t_0 t_8 = (x1 * 2.0) * t_7 t_9 = t_4 * t_7 tmp = 0 if x1 <= -1e+144: tmp = t_2 elif x1 <= -3.4e+106: tmp = x1 + (t_1 + (x1 + (x1 * ((4.0 * (x2 * ((2.0 * x2) - 3.0))) + (x1 * (x1 * -22.0)))))) elif x1 <= -0.65: tmp = x1 + (t_1 + (x1 + (t_3 + (t_9 + (t_0 * (((x1 * x1) * ((t_7 * 4.0) - 6.0)) + (t_8 * (((2.0 * (x2 / x1)) + (-1.0 - (3.0 / x1))) / x1)))))))) elif x1 <= 0.0034: tmp = x1 + ((3.0 * (((t_4 - (2.0 * x2)) - x1) / t_0)) + (x1 + (4.0 * (x2 * ((x1 * -3.0) + (2.0 * (x1 * x2))))))) elif x1 <= 2e+153: tmp = x1 + ((x1 + ((t_9 - (t_0 * (((x1 * x1) * (6.0 + (4.0 * t_6))) + (t_8 * (3.0 + t_6))))) + t_3)) + 9.0) else: tmp = t_2 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(x1 + Float64(x1 + Float64(3.0 * Float64(x1 * Float64(Float64(x1 * 3.0) + -1.0))))) t_3 = Float64(x1 * Float64(x1 * x1)) t_4 = Float64(x1 * Float64(x1 * 3.0)) t_5 = Float64(Float64(t_4 + Float64(2.0 * x2)) - x1) t_6 = Float64(t_5 / Float64(-1.0 - Float64(x1 * x1))) t_7 = Float64(t_5 / t_0) t_8 = Float64(Float64(x1 * 2.0) * t_7) t_9 = Float64(t_4 * t_7) tmp = 0.0 if (x1 <= -1e+144) tmp = t_2; elseif (x1 <= -3.4e+106) tmp = Float64(x1 + Float64(t_1 + Float64(x1 + Float64(x1 * Float64(Float64(4.0 * Float64(x2 * Float64(Float64(2.0 * x2) - 3.0))) + Float64(x1 * Float64(x1 * -22.0))))))); elseif (x1 <= -0.65) tmp = Float64(x1 + Float64(t_1 + Float64(x1 + Float64(t_3 + Float64(t_9 + Float64(t_0 * Float64(Float64(Float64(x1 * x1) * Float64(Float64(t_7 * 4.0) - 6.0)) + Float64(t_8 * Float64(Float64(Float64(2.0 * Float64(x2 / x1)) + Float64(-1.0 - Float64(3.0 / x1))) / x1))))))))); elseif (x1 <= 0.0034) tmp = Float64(x1 + Float64(Float64(3.0 * Float64(Float64(Float64(t_4 - Float64(2.0 * x2)) - x1) / t_0)) + Float64(x1 + Float64(4.0 * Float64(x2 * Float64(Float64(x1 * -3.0) + Float64(2.0 * Float64(x1 * x2)))))))); elseif (x1 <= 2e+153) tmp = Float64(x1 + Float64(Float64(x1 + Float64(Float64(t_9 - Float64(t_0 * Float64(Float64(Float64(x1 * x1) * Float64(6.0 + Float64(4.0 * t_6))) + Float64(t_8 * Float64(3.0 + t_6))))) + t_3)) + 9.0)); else tmp = t_2; 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 = x1 + (x1 + (3.0 * (x1 * ((x1 * 3.0) + -1.0)))); t_3 = x1 * (x1 * x1); t_4 = x1 * (x1 * 3.0); t_5 = (t_4 + (2.0 * x2)) - x1; t_6 = t_5 / (-1.0 - (x1 * x1)); t_7 = t_5 / t_0; t_8 = (x1 * 2.0) * t_7; t_9 = t_4 * t_7; tmp = 0.0; if (x1 <= -1e+144) tmp = t_2; elseif (x1 <= -3.4e+106) tmp = x1 + (t_1 + (x1 + (x1 * ((4.0 * (x2 * ((2.0 * x2) - 3.0))) + (x1 * (x1 * -22.0)))))); elseif (x1 <= -0.65) tmp = x1 + (t_1 + (x1 + (t_3 + (t_9 + (t_0 * (((x1 * x1) * ((t_7 * 4.0) - 6.0)) + (t_8 * (((2.0 * (x2 / x1)) + (-1.0 - (3.0 / x1))) / x1)))))))); elseif (x1 <= 0.0034) tmp = x1 + ((3.0 * (((t_4 - (2.0 * x2)) - x1) / t_0)) + (x1 + (4.0 * (x2 * ((x1 * -3.0) + (2.0 * (x1 * x2))))))); elseif (x1 <= 2e+153) tmp = x1 + ((x1 + ((t_9 - (t_0 * (((x1 * x1) * (6.0 + (4.0 * t_6))) + (t_8 * (3.0 + t_6))))) + t_3)) + 9.0); 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[(3.0 * N[(x2 * -2.0), $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 * x1), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[(x1 * N[(x1 * 3.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$5 = N[(N[(t$95$4 + N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision]}, Block[{t$95$6 = N[(t$95$5 / N[(-1.0 - N[(x1 * x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$7 = N[(t$95$5 / t$95$0), $MachinePrecision]}, Block[{t$95$8 = N[(N[(x1 * 2.0), $MachinePrecision] * t$95$7), $MachinePrecision]}, Block[{t$95$9 = N[(t$95$4 * t$95$7), $MachinePrecision]}, If[LessEqual[x1, -1e+144], t$95$2, If[LessEqual[x1, -3.4e+106], N[(x1 + N[(t$95$1 + N[(x1 + N[(x1 * N[(N[(4.0 * N[(x2 * N[(N[(2.0 * x2), $MachinePrecision] - 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(x1 * N[(x1 * -22.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, -0.65], N[(x1 + N[(t$95$1 + N[(x1 + N[(t$95$3 + N[(t$95$9 + N[(t$95$0 * N[(N[(N[(x1 * x1), $MachinePrecision] * N[(N[(t$95$7 * 4.0), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision] + N[(t$95$8 * N[(N[(N[(2.0 * N[(x2 / x1), $MachinePrecision]), $MachinePrecision] + N[(-1.0 - N[(3.0 / x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 0.0034], N[(x1 + N[(N[(3.0 * N[(N[(N[(t$95$4 - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$0), $MachinePrecision]), $MachinePrecision] + N[(x1 + N[(4.0 * N[(x2 * N[(N[(x1 * -3.0), $MachinePrecision] + N[(2.0 * N[(x1 * x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 2e+153], N[(x1 + N[(N[(x1 + N[(N[(t$95$9 - N[(t$95$0 * N[(N[(N[(x1 * x1), $MachinePrecision] * N[(6.0 + N[(4.0 * t$95$6), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(t$95$8 * N[(3.0 + t$95$6), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + t$95$3), $MachinePrecision]), $MachinePrecision] + 9.0), $MachinePrecision]), $MachinePrecision], t$95$2]]]]]]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x1 \cdot x1 + 1\\
t_1 := 3 \cdot \left(x2 \cdot -2\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 x1\right)\\
t_4 := x1 \cdot \left(x1 \cdot 3\right)\\
t_5 := \left(t\_4 + 2 \cdot x2\right) - x1\\
t_6 := \frac{t\_5}{-1 - x1 \cdot x1}\\
t_7 := \frac{t\_5}{t\_0}\\
t_8 := \left(x1 \cdot 2\right) \cdot t\_7\\
t_9 := t\_4 \cdot t\_7\\
\mathbf{if}\;x1 \leq -1 \cdot 10^{+144}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;x1 \leq -3.4 \cdot 10^{+106}:\\
\;\;\;\;x1 + \left(t\_1 + \left(x1 + x1 \cdot \left(4 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right) + x1 \cdot \left(x1 \cdot -22\right)\right)\right)\right)\\
\mathbf{elif}\;x1 \leq -0.65:\\
\;\;\;\;x1 + \left(t\_1 + \left(x1 + \left(t\_3 + \left(t\_9 + t\_0 \cdot \left(\left(x1 \cdot x1\right) \cdot \left(t\_7 \cdot 4 - 6\right) + t\_8 \cdot \frac{2 \cdot \frac{x2}{x1} + \left(-1 - \frac{3}{x1}\right)}{x1}\right)\right)\right)\right)\right)\\
\mathbf{elif}\;x1 \leq 0.0034:\\
\;\;\;\;x1 + \left(3 \cdot \frac{\left(t\_4 - 2 \cdot x2\right) - x1}{t\_0} + \left(x1 + 4 \cdot \left(x2 \cdot \left(x1 \cdot -3 + 2 \cdot \left(x1 \cdot x2\right)\right)\right)\right)\right)\\
\mathbf{elif}\;x1 \leq 2 \cdot 10^{+153}:\\
\;\;\;\;x1 + \left(\left(x1 + \left(\left(t\_9 - t\_0 \cdot \left(\left(x1 \cdot x1\right) \cdot \left(6 + 4 \cdot t\_6\right) + t\_8 \cdot \left(3 + t\_6\right)\right)\right) + t\_3\right)\right) + 9\right)\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if x1 < -1.00000000000000002e144 or 2e153 < x1 Initial program 0.0%
Taylor expanded in x1 around 0 0.0%
Taylor expanded in x1 around 0 60.6%
Taylor expanded in x2 around 0 98.7%
if -1.00000000000000002e144 < x1 < -3.39999999999999994e106Initial program 0.0%
Taylor expanded in x1 around 0 0.0%
*-commutative0.0%
Simplified0.0%
Taylor expanded in x1 around 0 75.0%
Taylor expanded in x2 around 0 75.0%
*-commutative75.0%
Simplified75.0%
if -3.39999999999999994e106 < x1 < -0.650000000000000022Initial program 99.3%
Taylor expanded in x1 around 0 99.3%
*-commutative99.3%
Simplified99.3%
Taylor expanded in x1 around inf 99.3%
associate-*r/99.3%
metadata-eval99.3%
Simplified99.3%
if -0.650000000000000022 < x1 < 0.00339999999999999981Initial program 99.4%
Taylor expanded in x1 around 0 89.3%
Taylor expanded in x2 around 0 99.4%
if 0.00339999999999999981 < x1 < 2e153Initial program 96.2%
Taylor expanded in x1 around inf 96.2%
Final simplification98.1%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (+ (* x1 x1) 1.0))
(t_1 (* 3.0 (* x2 -2.0)))
(t_2 (- -1.0 (* x1 x1)))
(t_3 (* x1 (* x1 3.0)))
(t_4 (- (+ t_3 (* 2.0 x2)) x1))
(t_5 (/ t_4 t_0))
(t_6 (+ x1 (+ x1 (* 3.0 (* x1 (+ (* x1 3.0) -1.0))))))
(t_7
(+
x1
(+
t_1
(+
x1
(+
(* x1 (* x1 x1))
(-
(* t_3 t_5)
(*
t_0
(+
(*
(* (* x1 2.0) t_5)
(/ (- (+ 1.0 (/ 3.0 x1)) (* 2.0 (/ x2 x1))) x1))
(* (* x1 x1) (+ 6.0 (* 4.0 (/ t_4 t_2)))))))))))))
(if (<= x1 -1e+144)
t_6
(if (<= x1 -3.4e+106)
(+
x1
(+
t_1
(+
x1
(* x1 (- (* x1 (* x1 -22.0)) (* 4.0 (* x2 (- 3.0 (* 2.0 x2)))))))))
(if (<= x1 -1.4)
t_7
(if (<= x1 0.042)
(+
x1
(+
(* 3.0 (/ (- x1 (- t_3 (* 2.0 x2))) t_2))
(+ x1 (* 4.0 (* x2 (+ (* x1 -3.0) (* 2.0 (* x1 x2))))))))
(if (<= x1 2e+153) t_7 t_6)))))))
double code(double x1, double x2) {
double t_0 = (x1 * x1) + 1.0;
double t_1 = 3.0 * (x2 * -2.0);
double t_2 = -1.0 - (x1 * x1);
double t_3 = x1 * (x1 * 3.0);
double t_4 = (t_3 + (2.0 * x2)) - x1;
double t_5 = t_4 / t_0;
double t_6 = x1 + (x1 + (3.0 * (x1 * ((x1 * 3.0) + -1.0))));
double t_7 = x1 + (t_1 + (x1 + ((x1 * (x1 * x1)) + ((t_3 * t_5) - (t_0 * ((((x1 * 2.0) * t_5) * (((1.0 + (3.0 / x1)) - (2.0 * (x2 / x1))) / x1)) + ((x1 * x1) * (6.0 + (4.0 * (t_4 / t_2))))))))));
double tmp;
if (x1 <= -1e+144) {
tmp = t_6;
} else if (x1 <= -3.4e+106) {
tmp = x1 + (t_1 + (x1 + (x1 * ((x1 * (x1 * -22.0)) - (4.0 * (x2 * (3.0 - (2.0 * x2))))))));
} else if (x1 <= -1.4) {
tmp = t_7;
} else if (x1 <= 0.042) {
tmp = x1 + ((3.0 * ((x1 - (t_3 - (2.0 * x2))) / t_2)) + (x1 + (4.0 * (x2 * ((x1 * -3.0) + (2.0 * (x1 * x2)))))));
} else if (x1 <= 2e+153) {
tmp = t_7;
} else {
tmp = t_6;
}
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 = 3.0d0 * (x2 * (-2.0d0))
t_2 = (-1.0d0) - (x1 * x1)
t_3 = x1 * (x1 * 3.0d0)
t_4 = (t_3 + (2.0d0 * x2)) - x1
t_5 = t_4 / t_0
t_6 = x1 + (x1 + (3.0d0 * (x1 * ((x1 * 3.0d0) + (-1.0d0)))))
t_7 = x1 + (t_1 + (x1 + ((x1 * (x1 * x1)) + ((t_3 * t_5) - (t_0 * ((((x1 * 2.0d0) * t_5) * (((1.0d0 + (3.0d0 / x1)) - (2.0d0 * (x2 / x1))) / x1)) + ((x1 * x1) * (6.0d0 + (4.0d0 * (t_4 / t_2))))))))))
if (x1 <= (-1d+144)) then
tmp = t_6
else if (x1 <= (-3.4d+106)) then
tmp = x1 + (t_1 + (x1 + (x1 * ((x1 * (x1 * (-22.0d0))) - (4.0d0 * (x2 * (3.0d0 - (2.0d0 * x2))))))))
else if (x1 <= (-1.4d0)) then
tmp = t_7
else if (x1 <= 0.042d0) then
tmp = x1 + ((3.0d0 * ((x1 - (t_3 - (2.0d0 * x2))) / t_2)) + (x1 + (4.0d0 * (x2 * ((x1 * (-3.0d0)) + (2.0d0 * (x1 * x2)))))))
else if (x1 <= 2d+153) then
tmp = t_7
else
tmp = t_6
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 = -1.0 - (x1 * x1);
double t_3 = x1 * (x1 * 3.0);
double t_4 = (t_3 + (2.0 * x2)) - x1;
double t_5 = t_4 / t_0;
double t_6 = x1 + (x1 + (3.0 * (x1 * ((x1 * 3.0) + -1.0))));
double t_7 = x1 + (t_1 + (x1 + ((x1 * (x1 * x1)) + ((t_3 * t_5) - (t_0 * ((((x1 * 2.0) * t_5) * (((1.0 + (3.0 / x1)) - (2.0 * (x2 / x1))) / x1)) + ((x1 * x1) * (6.0 + (4.0 * (t_4 / t_2))))))))));
double tmp;
if (x1 <= -1e+144) {
tmp = t_6;
} else if (x1 <= -3.4e+106) {
tmp = x1 + (t_1 + (x1 + (x1 * ((x1 * (x1 * -22.0)) - (4.0 * (x2 * (3.0 - (2.0 * x2))))))));
} else if (x1 <= -1.4) {
tmp = t_7;
} else if (x1 <= 0.042) {
tmp = x1 + ((3.0 * ((x1 - (t_3 - (2.0 * x2))) / t_2)) + (x1 + (4.0 * (x2 * ((x1 * -3.0) + (2.0 * (x1 * x2)))))));
} else if (x1 <= 2e+153) {
tmp = t_7;
} else {
tmp = t_6;
}
return tmp;
}
def code(x1, x2): t_0 = (x1 * x1) + 1.0 t_1 = 3.0 * (x2 * -2.0) t_2 = -1.0 - (x1 * x1) t_3 = x1 * (x1 * 3.0) t_4 = (t_3 + (2.0 * x2)) - x1 t_5 = t_4 / t_0 t_6 = x1 + (x1 + (3.0 * (x1 * ((x1 * 3.0) + -1.0)))) t_7 = x1 + (t_1 + (x1 + ((x1 * (x1 * x1)) + ((t_3 * t_5) - (t_0 * ((((x1 * 2.0) * t_5) * (((1.0 + (3.0 / x1)) - (2.0 * (x2 / x1))) / x1)) + ((x1 * x1) * (6.0 + (4.0 * (t_4 / t_2)))))))))) tmp = 0 if x1 <= -1e+144: tmp = t_6 elif x1 <= -3.4e+106: tmp = x1 + (t_1 + (x1 + (x1 * ((x1 * (x1 * -22.0)) - (4.0 * (x2 * (3.0 - (2.0 * x2)))))))) elif x1 <= -1.4: tmp = t_7 elif x1 <= 0.042: tmp = x1 + ((3.0 * ((x1 - (t_3 - (2.0 * x2))) / t_2)) + (x1 + (4.0 * (x2 * ((x1 * -3.0) + (2.0 * (x1 * x2))))))) elif x1 <= 2e+153: tmp = t_7 else: tmp = t_6 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(-1.0 - Float64(x1 * x1)) t_3 = Float64(x1 * Float64(x1 * 3.0)) t_4 = Float64(Float64(t_3 + Float64(2.0 * x2)) - x1) t_5 = Float64(t_4 / t_0) t_6 = Float64(x1 + Float64(x1 + Float64(3.0 * Float64(x1 * Float64(Float64(x1 * 3.0) + -1.0))))) t_7 = Float64(x1 + Float64(t_1 + Float64(x1 + Float64(Float64(x1 * Float64(x1 * x1)) + Float64(Float64(t_3 * t_5) - Float64(t_0 * Float64(Float64(Float64(Float64(x1 * 2.0) * t_5) * Float64(Float64(Float64(1.0 + Float64(3.0 / x1)) - Float64(2.0 * Float64(x2 / x1))) / x1)) + Float64(Float64(x1 * x1) * Float64(6.0 + Float64(4.0 * Float64(t_4 / t_2))))))))))) tmp = 0.0 if (x1 <= -1e+144) tmp = t_6; elseif (x1 <= -3.4e+106) tmp = Float64(x1 + Float64(t_1 + Float64(x1 + Float64(x1 * Float64(Float64(x1 * Float64(x1 * -22.0)) - Float64(4.0 * Float64(x2 * Float64(3.0 - Float64(2.0 * x2))))))))); elseif (x1 <= -1.4) tmp = t_7; elseif (x1 <= 0.042) tmp = Float64(x1 + Float64(Float64(3.0 * Float64(Float64(x1 - Float64(t_3 - Float64(2.0 * x2))) / t_2)) + Float64(x1 + Float64(4.0 * Float64(x2 * Float64(Float64(x1 * -3.0) + Float64(2.0 * Float64(x1 * x2)))))))); elseif (x1 <= 2e+153) tmp = t_7; else tmp = t_6; 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 = -1.0 - (x1 * x1); t_3 = x1 * (x1 * 3.0); t_4 = (t_3 + (2.0 * x2)) - x1; t_5 = t_4 / t_0; t_6 = x1 + (x1 + (3.0 * (x1 * ((x1 * 3.0) + -1.0)))); t_7 = x1 + (t_1 + (x1 + ((x1 * (x1 * x1)) + ((t_3 * t_5) - (t_0 * ((((x1 * 2.0) * t_5) * (((1.0 + (3.0 / x1)) - (2.0 * (x2 / x1))) / x1)) + ((x1 * x1) * (6.0 + (4.0 * (t_4 / t_2)))))))))); tmp = 0.0; if (x1 <= -1e+144) tmp = t_6; elseif (x1 <= -3.4e+106) tmp = x1 + (t_1 + (x1 + (x1 * ((x1 * (x1 * -22.0)) - (4.0 * (x2 * (3.0 - (2.0 * x2)))))))); elseif (x1 <= -1.4) tmp = t_7; elseif (x1 <= 0.042) tmp = x1 + ((3.0 * ((x1 - (t_3 - (2.0 * x2))) / t_2)) + (x1 + (4.0 * (x2 * ((x1 * -3.0) + (2.0 * (x1 * x2))))))); elseif (x1 <= 2e+153) tmp = t_7; else tmp = t_6; 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[(-1.0 - N[(x1 * x1), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(x1 * N[(x1 * 3.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[(N[(t$95$3 + N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision]}, Block[{t$95$5 = N[(t$95$4 / t$95$0), $MachinePrecision]}, Block[{t$95$6 = 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$7 = N[(x1 + N[(t$95$1 + N[(x1 + N[(N[(x1 * N[(x1 * x1), $MachinePrecision]), $MachinePrecision] + N[(N[(t$95$3 * t$95$5), $MachinePrecision] - 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] - N[(2.0 * N[(x2 / x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / x1), $MachinePrecision]), $MachinePrecision] + N[(N[(x1 * x1), $MachinePrecision] * N[(6.0 + N[(4.0 * N[(t$95$4 / t$95$2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x1, -1e+144], t$95$6, If[LessEqual[x1, -3.4e+106], N[(x1 + N[(t$95$1 + N[(x1 + N[(x1 * N[(N[(x1 * N[(x1 * -22.0), $MachinePrecision]), $MachinePrecision] - N[(4.0 * N[(x2 * N[(3.0 - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, -1.4], t$95$7, If[LessEqual[x1, 0.042], N[(x1 + N[(N[(3.0 * N[(N[(x1 - N[(t$95$3 - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / t$95$2), $MachinePrecision]), $MachinePrecision] + N[(x1 + N[(4.0 * N[(x2 * N[(N[(x1 * -3.0), $MachinePrecision] + N[(2.0 * N[(x1 * x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 2e+153], t$95$7, t$95$6]]]]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x1 \cdot x1 + 1\\
t_1 := 3 \cdot \left(x2 \cdot -2\right)\\
t_2 := -1 - x1 \cdot x1\\
t_3 := x1 \cdot \left(x1 \cdot 3\right)\\
t_4 := \left(t\_3 + 2 \cdot x2\right) - x1\\
t_5 := \frac{t\_4}{t\_0}\\
t_6 := x1 + \left(x1 + 3 \cdot \left(x1 \cdot \left(x1 \cdot 3 + -1\right)\right)\right)\\
t_7 := x1 + \left(t\_1 + \left(x1 + \left(x1 \cdot \left(x1 \cdot x1\right) + \left(t\_3 \cdot t\_5 - t\_0 \cdot \left(\left(\left(x1 \cdot 2\right) \cdot t\_5\right) \cdot \frac{\left(1 + \frac{3}{x1}\right) - 2 \cdot \frac{x2}{x1}}{x1} + \left(x1 \cdot x1\right) \cdot \left(6 + 4 \cdot \frac{t\_4}{t\_2}\right)\right)\right)\right)\right)\right)\\
\mathbf{if}\;x1 \leq -1 \cdot 10^{+144}:\\
\;\;\;\;t\_6\\
\mathbf{elif}\;x1 \leq -3.4 \cdot 10^{+106}:\\
\;\;\;\;x1 + \left(t\_1 + \left(x1 + x1 \cdot \left(x1 \cdot \left(x1 \cdot -22\right) - 4 \cdot \left(x2 \cdot \left(3 - 2 \cdot x2\right)\right)\right)\right)\right)\\
\mathbf{elif}\;x1 \leq -1.4:\\
\;\;\;\;t\_7\\
\mathbf{elif}\;x1 \leq 0.042:\\
\;\;\;\;x1 + \left(3 \cdot \frac{x1 - \left(t\_3 - 2 \cdot x2\right)}{t\_2} + \left(x1 + 4 \cdot \left(x2 \cdot \left(x1 \cdot -3 + 2 \cdot \left(x1 \cdot x2\right)\right)\right)\right)\right)\\
\mathbf{elif}\;x1 \leq 2 \cdot 10^{+153}:\\
\;\;\;\;t\_7\\
\mathbf{else}:\\
\;\;\;\;t\_6\\
\end{array}
\end{array}
if x1 < -1.00000000000000002e144 or 2e153 < x1 Initial program 0.0%
Taylor expanded in x1 around 0 0.0%
Taylor expanded in x1 around 0 60.6%
Taylor expanded in x2 around 0 98.7%
if -1.00000000000000002e144 < x1 < -3.39999999999999994e106Initial program 0.0%
Taylor expanded in x1 around 0 0.0%
*-commutative0.0%
Simplified0.0%
Taylor expanded in x1 around 0 75.0%
Taylor expanded in x2 around 0 75.0%
*-commutative75.0%
Simplified75.0%
if -3.39999999999999994e106 < x1 < -1.3999999999999999 or 0.0420000000000000026 < x1 < 2e153Initial program 97.2%
Taylor expanded in x1 around 0 97.2%
*-commutative97.2%
Simplified97.2%
Taylor expanded in x1 around inf 97.1%
associate-*r/97.1%
metadata-eval97.1%
Simplified97.1%
if -1.3999999999999999 < x1 < 0.0420000000000000026Initial program 99.4%
Taylor expanded in x1 around 0 89.3%
Taylor expanded in x2 around 0 99.4%
Final simplification98.0%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (+ (* x1 x1) 1.0))
(t_1 (* 3.0 (* x2 -2.0)))
(t_2 (+ x1 (+ (+ x1 (* 6.0 (pow x1 4.0))) t_1)))
(t_3 (* x1 (* x1 3.0)))
(t_4 (/ (- (+ t_3 (* 2.0 x2)) x1) t_0)))
(if (<= x1 -3.4e+106)
t_2
(if (<= x1 -0.01)
(+
x1
(+
t_1
(+
x1
(+
(* x1 (* x1 x1))
(+
(* t_3 t_4)
(*
t_0
(-
(* (* (* x1 2.0) t_4) (- t_4 3.0))
(*
(* x1 x1)
(-
6.0
(*
4.0
(+ 3.0 (/ (+ -1.0 (/ (- (* 2.0 x2) 3.0) x1)) x1))))))))))))
(if (<= x1 8.5e+21)
(+
x1
(+
(* 3.0 (/ (- x1 (- t_3 (* 2.0 x2))) (- -1.0 (* x1 x1))))
(+ x1 (* 4.0 (* x2 (+ (* x1 -3.0) (* 2.0 (* x1 x2))))))))
t_2)))))
double code(double x1, double x2) {
double t_0 = (x1 * x1) + 1.0;
double t_1 = 3.0 * (x2 * -2.0);
double t_2 = x1 + ((x1 + (6.0 * pow(x1, 4.0))) + t_1);
double t_3 = x1 * (x1 * 3.0);
double t_4 = ((t_3 + (2.0 * x2)) - x1) / t_0;
double tmp;
if (x1 <= -3.4e+106) {
tmp = t_2;
} else if (x1 <= -0.01) {
tmp = x1 + (t_1 + (x1 + ((x1 * (x1 * x1)) + ((t_3 * t_4) + (t_0 * ((((x1 * 2.0) * t_4) * (t_4 - 3.0)) - ((x1 * x1) * (6.0 - (4.0 * (3.0 + ((-1.0 + (((2.0 * x2) - 3.0) / x1)) / x1)))))))))));
} else if (x1 <= 8.5e+21) {
tmp = x1 + ((3.0 * ((x1 - (t_3 - (2.0 * x2))) / (-1.0 - (x1 * x1)))) + (x1 + (4.0 * (x2 * ((x1 * -3.0) + (2.0 * (x1 * x2)))))));
} 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) :: tmp
t_0 = (x1 * x1) + 1.0d0
t_1 = 3.0d0 * (x2 * (-2.0d0))
t_2 = x1 + ((x1 + (6.0d0 * (x1 ** 4.0d0))) + t_1)
t_3 = x1 * (x1 * 3.0d0)
t_4 = ((t_3 + (2.0d0 * x2)) - x1) / t_0
if (x1 <= (-3.4d+106)) then
tmp = t_2
else if (x1 <= (-0.01d0)) then
tmp = x1 + (t_1 + (x1 + ((x1 * (x1 * x1)) + ((t_3 * t_4) + (t_0 * ((((x1 * 2.0d0) * t_4) * (t_4 - 3.0d0)) - ((x1 * x1) * (6.0d0 - (4.0d0 * (3.0d0 + (((-1.0d0) + (((2.0d0 * x2) - 3.0d0) / x1)) / x1)))))))))))
else if (x1 <= 8.5d+21) then
tmp = x1 + ((3.0d0 * ((x1 - (t_3 - (2.0d0 * x2))) / ((-1.0d0) - (x1 * x1)))) + (x1 + (4.0d0 * (x2 * ((x1 * (-3.0d0)) + (2.0d0 * (x1 * x2)))))))
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 = 3.0 * (x2 * -2.0);
double t_2 = x1 + ((x1 + (6.0 * Math.pow(x1, 4.0))) + t_1);
double t_3 = x1 * (x1 * 3.0);
double t_4 = ((t_3 + (2.0 * x2)) - x1) / t_0;
double tmp;
if (x1 <= -3.4e+106) {
tmp = t_2;
} else if (x1 <= -0.01) {
tmp = x1 + (t_1 + (x1 + ((x1 * (x1 * x1)) + ((t_3 * t_4) + (t_0 * ((((x1 * 2.0) * t_4) * (t_4 - 3.0)) - ((x1 * x1) * (6.0 - (4.0 * (3.0 + ((-1.0 + (((2.0 * x2) - 3.0) / x1)) / x1)))))))))));
} else if (x1 <= 8.5e+21) {
tmp = x1 + ((3.0 * ((x1 - (t_3 - (2.0 * x2))) / (-1.0 - (x1 * x1)))) + (x1 + (4.0 * (x2 * ((x1 * -3.0) + (2.0 * (x1 * x2)))))));
} else {
tmp = t_2;
}
return tmp;
}
def code(x1, x2): t_0 = (x1 * x1) + 1.0 t_1 = 3.0 * (x2 * -2.0) t_2 = x1 + ((x1 + (6.0 * math.pow(x1, 4.0))) + t_1) t_3 = x1 * (x1 * 3.0) t_4 = ((t_3 + (2.0 * x2)) - x1) / t_0 tmp = 0 if x1 <= -3.4e+106: tmp = t_2 elif x1 <= -0.01: tmp = x1 + (t_1 + (x1 + ((x1 * (x1 * x1)) + ((t_3 * t_4) + (t_0 * ((((x1 * 2.0) * t_4) * (t_4 - 3.0)) - ((x1 * x1) * (6.0 - (4.0 * (3.0 + ((-1.0 + (((2.0 * x2) - 3.0) / x1)) / x1))))))))))) elif x1 <= 8.5e+21: tmp = x1 + ((3.0 * ((x1 - (t_3 - (2.0 * x2))) / (-1.0 - (x1 * x1)))) + (x1 + (4.0 * (x2 * ((x1 * -3.0) + (2.0 * (x1 * x2))))))) else: tmp = t_2 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(x1 + Float64(Float64(x1 + Float64(6.0 * (x1 ^ 4.0))) + t_1)) t_3 = Float64(x1 * Float64(x1 * 3.0)) t_4 = Float64(Float64(Float64(t_3 + Float64(2.0 * x2)) - x1) / t_0) tmp = 0.0 if (x1 <= -3.4e+106) tmp = t_2; elseif (x1 <= -0.01) tmp = Float64(x1 + Float64(t_1 + Float64(x1 + Float64(Float64(x1 * Float64(x1 * x1)) + Float64(Float64(t_3 * t_4) + Float64(t_0 * Float64(Float64(Float64(Float64(x1 * 2.0) * t_4) * Float64(t_4 - 3.0)) - 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)))))))))))); elseif (x1 <= 8.5e+21) tmp = Float64(x1 + Float64(Float64(3.0 * Float64(Float64(x1 - Float64(t_3 - Float64(2.0 * x2))) / Float64(-1.0 - Float64(x1 * x1)))) + Float64(x1 + Float64(4.0 * Float64(x2 * Float64(Float64(x1 * -3.0) + Float64(2.0 * Float64(x1 * x2)))))))); else tmp = t_2; 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 = x1 + ((x1 + (6.0 * (x1 ^ 4.0))) + t_1); t_3 = x1 * (x1 * 3.0); t_4 = ((t_3 + (2.0 * x2)) - x1) / t_0; tmp = 0.0; if (x1 <= -3.4e+106) tmp = t_2; elseif (x1 <= -0.01) tmp = x1 + (t_1 + (x1 + ((x1 * (x1 * x1)) + ((t_3 * t_4) + (t_0 * ((((x1 * 2.0) * t_4) * (t_4 - 3.0)) - ((x1 * x1) * (6.0 - (4.0 * (3.0 + ((-1.0 + (((2.0 * x2) - 3.0) / x1)) / x1))))))))))); elseif (x1 <= 8.5e+21) tmp = x1 + ((3.0 * ((x1 - (t_3 - (2.0 * x2))) / (-1.0 - (x1 * x1)))) + (x1 + (4.0 * (x2 * ((x1 * -3.0) + (2.0 * (x1 * x2))))))); 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[(3.0 * N[(x2 * -2.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x1 + N[(N[(x1 + N[(6.0 * N[Power[x1, 4.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + t$95$1), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(x1 * N[(x1 * 3.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[(N[(N[(t$95$3 + N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$0), $MachinePrecision]}, If[LessEqual[x1, -3.4e+106], t$95$2, If[LessEqual[x1, -0.01], N[(x1 + N[(t$95$1 + N[(x1 + N[(N[(x1 * N[(x1 * x1), $MachinePrecision]), $MachinePrecision] + N[(N[(t$95$3 * t$95$4), $MachinePrecision] + N[(t$95$0 * N[(N[(N[(N[(x1 * 2.0), $MachinePrecision] * t$95$4), $MachinePrecision] * N[(t$95$4 - 3.0), $MachinePrecision]), $MachinePrecision] - 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]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 8.5e+21], N[(x1 + N[(N[(3.0 * N[(N[(x1 - N[(t$95$3 - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(-1.0 - N[(x1 * x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(x1 + N[(4.0 * N[(x2 * N[(N[(x1 * -3.0), $MachinePrecision] + N[(2.0 * N[(x1 * x2), $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 := 3 \cdot \left(x2 \cdot -2\right)\\
t_2 := x1 + \left(\left(x1 + 6 \cdot {x1}^{4}\right) + t\_1\right)\\
t_3 := x1 \cdot \left(x1 \cdot 3\right)\\
t_4 := \frac{\left(t\_3 + 2 \cdot x2\right) - x1}{t\_0}\\
\mathbf{if}\;x1 \leq -3.4 \cdot 10^{+106}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;x1 \leq -0.01:\\
\;\;\;\;x1 + \left(t\_1 + \left(x1 + \left(x1 \cdot \left(x1 \cdot x1\right) + \left(t\_3 \cdot t\_4 + t\_0 \cdot \left(\left(\left(x1 \cdot 2\right) \cdot t\_4\right) \cdot \left(t\_4 - 3\right) - \left(x1 \cdot x1\right) \cdot \left(6 - 4 \cdot \left(3 + \frac{-1 + \frac{2 \cdot x2 - 3}{x1}}{x1}\right)\right)\right)\right)\right)\right)\right)\\
\mathbf{elif}\;x1 \leq 8.5 \cdot 10^{+21}:\\
\;\;\;\;x1 + \left(3 \cdot \frac{x1 - \left(t\_3 - 2 \cdot x2\right)}{-1 - x1 \cdot x1} + \left(x1 + 4 \cdot \left(x2 \cdot \left(x1 \cdot -3 + 2 \cdot \left(x1 \cdot x2\right)\right)\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if x1 < -3.39999999999999994e106 or 8.5e21 < x1 Initial program 25.1%
Taylor expanded in x1 around 0 25.1%
*-commutative25.1%
Simplified25.1%
Taylor expanded in x1 around inf 95.4%
if -3.39999999999999994e106 < x1 < -0.0100000000000000002Initial program 99.3%
Taylor expanded in x1 around 0 99.3%
*-commutative99.3%
Simplified99.3%
Taylor expanded in x1 around -inf 99.4%
if -0.0100000000000000002 < x1 < 8.5e21Initial program 99.4%
Taylor expanded in x1 around 0 88.9%
Taylor expanded in x2 around 0 98.7%
Final simplification97.4%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (+ (* x1 x1) 1.0))
(t_1 (- -1.0 (* x1 x1)))
(t_2 (* x1 (* x1 3.0)))
(t_3 (- (+ t_2 (* 2.0 x2)) x1))
(t_4 (/ t_3 t_0)))
(if (or (<= x1 -3.4e+106) (not (<= x1 1.3e+58)))
(+ x1 (+ (+ x1 (* 6.0 (pow x1 4.0))) (* 3.0 (* x2 -2.0))))
(+
x1
(+
(* 3.0 (/ (- (- t_2 (* 2.0 x2)) x1) t_0))
(+
x1
(+
(* x1 (* x1 x1))
(+
(* t_2 t_4)
(*
(+
(* (* x1 x1) (+ 6.0 (* 4.0 (/ t_3 t_1))))
(* (- t_4 3.0) (* (* x1 2.0) (- x1 (* 2.0 x2)))))
t_1)))))))))
double code(double x1, double x2) {
double t_0 = (x1 * x1) + 1.0;
double t_1 = -1.0 - (x1 * x1);
double t_2 = x1 * (x1 * 3.0);
double t_3 = (t_2 + (2.0 * x2)) - x1;
double t_4 = t_3 / t_0;
double tmp;
if ((x1 <= -3.4e+106) || !(x1 <= 1.3e+58)) {
tmp = x1 + ((x1 + (6.0 * pow(x1, 4.0))) + (3.0 * (x2 * -2.0)));
} else {
tmp = x1 + ((3.0 * (((t_2 - (2.0 * x2)) - x1) / t_0)) + (x1 + ((x1 * (x1 * x1)) + ((t_2 * t_4) + ((((x1 * x1) * (6.0 + (4.0 * (t_3 / t_1)))) + ((t_4 - 3.0) * ((x1 * 2.0) * (x1 - (2.0 * x2))))) * t_1)))));
}
return tmp;
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
real(8) :: t_0
real(8) :: t_1
real(8) :: t_2
real(8) :: t_3
real(8) :: t_4
real(8) :: tmp
t_0 = (x1 * x1) + 1.0d0
t_1 = (-1.0d0) - (x1 * x1)
t_2 = x1 * (x1 * 3.0d0)
t_3 = (t_2 + (2.0d0 * x2)) - x1
t_4 = t_3 / t_0
if ((x1 <= (-3.4d+106)) .or. (.not. (x1 <= 1.3d+58))) then
tmp = x1 + ((x1 + (6.0d0 * (x1 ** 4.0d0))) + (3.0d0 * (x2 * (-2.0d0))))
else
tmp = x1 + ((3.0d0 * (((t_2 - (2.0d0 * x2)) - x1) / t_0)) + (x1 + ((x1 * (x1 * x1)) + ((t_2 * t_4) + ((((x1 * x1) * (6.0d0 + (4.0d0 * (t_3 / t_1)))) + ((t_4 - 3.0d0) * ((x1 * 2.0d0) * (x1 - (2.0d0 * x2))))) * 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 = -1.0 - (x1 * x1);
double t_2 = x1 * (x1 * 3.0);
double t_3 = (t_2 + (2.0 * x2)) - x1;
double t_4 = t_3 / t_0;
double tmp;
if ((x1 <= -3.4e+106) || !(x1 <= 1.3e+58)) {
tmp = x1 + ((x1 + (6.0 * Math.pow(x1, 4.0))) + (3.0 * (x2 * -2.0)));
} else {
tmp = x1 + ((3.0 * (((t_2 - (2.0 * x2)) - x1) / t_0)) + (x1 + ((x1 * (x1 * x1)) + ((t_2 * t_4) + ((((x1 * x1) * (6.0 + (4.0 * (t_3 / t_1)))) + ((t_4 - 3.0) * ((x1 * 2.0) * (x1 - (2.0 * x2))))) * t_1)))));
}
return tmp;
}
def code(x1, x2): t_0 = (x1 * x1) + 1.0 t_1 = -1.0 - (x1 * x1) t_2 = x1 * (x1 * 3.0) t_3 = (t_2 + (2.0 * x2)) - x1 t_4 = t_3 / t_0 tmp = 0 if (x1 <= -3.4e+106) or not (x1 <= 1.3e+58): tmp = x1 + ((x1 + (6.0 * math.pow(x1, 4.0))) + (3.0 * (x2 * -2.0))) else: tmp = x1 + ((3.0 * (((t_2 - (2.0 * x2)) - x1) / t_0)) + (x1 + ((x1 * (x1 * x1)) + ((t_2 * t_4) + ((((x1 * x1) * (6.0 + (4.0 * (t_3 / t_1)))) + ((t_4 - 3.0) * ((x1 * 2.0) * (x1 - (2.0 * x2))))) * t_1))))) return tmp
function code(x1, x2) t_0 = Float64(Float64(x1 * x1) + 1.0) t_1 = Float64(-1.0 - Float64(x1 * x1)) t_2 = Float64(x1 * Float64(x1 * 3.0)) t_3 = Float64(Float64(t_2 + Float64(2.0 * x2)) - x1) t_4 = Float64(t_3 / t_0) tmp = 0.0 if ((x1 <= -3.4e+106) || !(x1 <= 1.3e+58)) tmp = Float64(x1 + Float64(Float64(x1 + Float64(6.0 * (x1 ^ 4.0))) + Float64(3.0 * Float64(x2 * -2.0)))); else tmp = Float64(x1 + Float64(Float64(3.0 * Float64(Float64(Float64(t_2 - Float64(2.0 * x2)) - x1) / t_0)) + Float64(x1 + Float64(Float64(x1 * Float64(x1 * x1)) + Float64(Float64(t_2 * t_4) + Float64(Float64(Float64(Float64(x1 * x1) * Float64(6.0 + Float64(4.0 * Float64(t_3 / t_1)))) + Float64(Float64(t_4 - 3.0) * Float64(Float64(x1 * 2.0) * Float64(x1 - Float64(2.0 * x2))))) * t_1)))))); end return tmp end
function tmp_2 = code(x1, x2) t_0 = (x1 * x1) + 1.0; t_1 = -1.0 - (x1 * x1); t_2 = x1 * (x1 * 3.0); t_3 = (t_2 + (2.0 * x2)) - x1; t_4 = t_3 / t_0; tmp = 0.0; if ((x1 <= -3.4e+106) || ~((x1 <= 1.3e+58))) tmp = x1 + ((x1 + (6.0 * (x1 ^ 4.0))) + (3.0 * (x2 * -2.0))); else tmp = x1 + ((3.0 * (((t_2 - (2.0 * x2)) - x1) / t_0)) + (x1 + ((x1 * (x1 * x1)) + ((t_2 * t_4) + ((((x1 * x1) * (6.0 + (4.0 * (t_3 / t_1)))) + ((t_4 - 3.0) * ((x1 * 2.0) * (x1 - (2.0 * x2))))) * 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[(-1.0 - N[(x1 * x1), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x1 * N[(x1 * 3.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[(t$95$2 + N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision]}, Block[{t$95$4 = N[(t$95$3 / t$95$0), $MachinePrecision]}, If[Or[LessEqual[x1, -3.4e+106], N[Not[LessEqual[x1, 1.3e+58]], $MachinePrecision]], N[(x1 + N[(N[(x1 + N[(6.0 * N[Power[x1, 4.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(3.0 * N[(x2 * -2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x1 + N[(N[(3.0 * N[(N[(N[(t$95$2 - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$0), $MachinePrecision]), $MachinePrecision] + N[(x1 + N[(N[(x1 * N[(x1 * x1), $MachinePrecision]), $MachinePrecision] + N[(N[(t$95$2 * t$95$4), $MachinePrecision] + N[(N[(N[(N[(x1 * x1), $MachinePrecision] * N[(6.0 + N[(4.0 * N[(t$95$3 / t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(t$95$4 - 3.0), $MachinePrecision] * N[(N[(x1 * 2.0), $MachinePrecision] * N[(x1 - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x1 \cdot x1 + 1\\
t_1 := -1 - x1 \cdot x1\\
t_2 := x1 \cdot \left(x1 \cdot 3\right)\\
t_3 := \left(t\_2 + 2 \cdot x2\right) - x1\\
t_4 := \frac{t\_3}{t\_0}\\
\mathbf{if}\;x1 \leq -3.4 \cdot 10^{+106} \lor \neg \left(x1 \leq 1.3 \cdot 10^{+58}\right):\\
\;\;\;\;x1 + \left(\left(x1 + 6 \cdot {x1}^{4}\right) + 3 \cdot \left(x2 \cdot -2\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x1 + \left(3 \cdot \frac{\left(t\_2 - 2 \cdot x2\right) - x1}{t\_0} + \left(x1 + \left(x1 \cdot \left(x1 \cdot x1\right) + \left(t\_2 \cdot t\_4 + \left(\left(x1 \cdot x1\right) \cdot \left(6 + 4 \cdot \frac{t\_3}{t\_1}\right) + \left(t\_4 - 3\right) \cdot \left(\left(x1 \cdot 2\right) \cdot \left(x1 - 2 \cdot x2\right)\right)\right) \cdot t\_1\right)\right)\right)\right)\\
\end{array}
\end{array}
if x1 < -3.39999999999999994e106 or 1.29999999999999994e58 < x1 Initial program 19.1%
Taylor expanded in x1 around 0 19.1%
*-commutative19.1%
Simplified19.1%
Taylor expanded in x1 around inf 98.0%
if -3.39999999999999994e106 < x1 < 1.29999999999999994e58Initial program 99.3%
Taylor expanded in x1 around 0 95.3%
+-commutative95.3%
mul-1-neg95.3%
sub-neg95.3%
Simplified95.3%
Final simplification96.3%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (* 3.0 (* x2 -2.0)))
(t_1 (- -1.0 (* x1 x1)))
(t_2 (* x1 (* x1 3.0)))
(t_3 (- (+ t_2 (* 2.0 x2)) x1))
(t_4 (/ t_3 (+ (* x1 x1) 1.0)))
(t_5 (+ x1 (+ x1 (* 3.0 (* x1 (+ (* x1 3.0) -1.0))))))
(t_6
(+
x1
(+
t_0
(+
x1
(+
(* x1 (* x1 x1))
(-
(* t_2 t_4)
(*
(- (* (* x1 x1) 6.0) (* (- t_4 3.0) (* (* x1 2.0) (/ t_3 t_1))))
t_1))))))))
(if (<= x1 -1e+144)
t_5
(if (<= x1 -7.3e+84)
(+
x1
(+
t_0
(+
x1
(* x1 (- (* x1 (* x1 -22.0)) (* 4.0 (* x2 (- 3.0 (* 2.0 x2)))))))))
(if (<= x1 -0.00072)
t_6
(if (<= x1 0.00086)
(+
x1
(+
(* 3.0 (/ (- x1 (- t_2 (* 2.0 x2))) t_1))
(+ x1 (* 4.0 (* x2 (+ (* x1 -3.0) (* 2.0 (* x1 x2))))))))
(if (<= x1 2e+153) t_6 t_5)))))))
double code(double x1, double x2) {
double t_0 = 3.0 * (x2 * -2.0);
double t_1 = -1.0 - (x1 * x1);
double t_2 = x1 * (x1 * 3.0);
double t_3 = (t_2 + (2.0 * x2)) - x1;
double t_4 = t_3 / ((x1 * x1) + 1.0);
double t_5 = x1 + (x1 + (3.0 * (x1 * ((x1 * 3.0) + -1.0))));
double t_6 = x1 + (t_0 + (x1 + ((x1 * (x1 * x1)) + ((t_2 * t_4) - ((((x1 * x1) * 6.0) - ((t_4 - 3.0) * ((x1 * 2.0) * (t_3 / t_1)))) * t_1)))));
double tmp;
if (x1 <= -1e+144) {
tmp = t_5;
} else if (x1 <= -7.3e+84) {
tmp = x1 + (t_0 + (x1 + (x1 * ((x1 * (x1 * -22.0)) - (4.0 * (x2 * (3.0 - (2.0 * x2))))))));
} else if (x1 <= -0.00072) {
tmp = t_6;
} else if (x1 <= 0.00086) {
tmp = x1 + ((3.0 * ((x1 - (t_2 - (2.0 * x2))) / t_1)) + (x1 + (4.0 * (x2 * ((x1 * -3.0) + (2.0 * (x1 * x2)))))));
} else if (x1 <= 2e+153) {
tmp = t_6;
} else {
tmp = t_5;
}
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) :: tmp
t_0 = 3.0d0 * (x2 * (-2.0d0))
t_1 = (-1.0d0) - (x1 * x1)
t_2 = x1 * (x1 * 3.0d0)
t_3 = (t_2 + (2.0d0 * x2)) - x1
t_4 = t_3 / ((x1 * x1) + 1.0d0)
t_5 = x1 + (x1 + (3.0d0 * (x1 * ((x1 * 3.0d0) + (-1.0d0)))))
t_6 = x1 + (t_0 + (x1 + ((x1 * (x1 * x1)) + ((t_2 * t_4) - ((((x1 * x1) * 6.0d0) - ((t_4 - 3.0d0) * ((x1 * 2.0d0) * (t_3 / t_1)))) * t_1)))))
if (x1 <= (-1d+144)) then
tmp = t_5
else if (x1 <= (-7.3d+84)) then
tmp = x1 + (t_0 + (x1 + (x1 * ((x1 * (x1 * (-22.0d0))) - (4.0d0 * (x2 * (3.0d0 - (2.0d0 * x2))))))))
else if (x1 <= (-0.00072d0)) then
tmp = t_6
else if (x1 <= 0.00086d0) then
tmp = x1 + ((3.0d0 * ((x1 - (t_2 - (2.0d0 * x2))) / t_1)) + (x1 + (4.0d0 * (x2 * ((x1 * (-3.0d0)) + (2.0d0 * (x1 * x2)))))))
else if (x1 <= 2d+153) then
tmp = t_6
else
tmp = t_5
end if
code = tmp
end function
public static double code(double x1, double x2) {
double t_0 = 3.0 * (x2 * -2.0);
double t_1 = -1.0 - (x1 * x1);
double t_2 = x1 * (x1 * 3.0);
double t_3 = (t_2 + (2.0 * x2)) - x1;
double t_4 = t_3 / ((x1 * x1) + 1.0);
double t_5 = x1 + (x1 + (3.0 * (x1 * ((x1 * 3.0) + -1.0))));
double t_6 = x1 + (t_0 + (x1 + ((x1 * (x1 * x1)) + ((t_2 * t_4) - ((((x1 * x1) * 6.0) - ((t_4 - 3.0) * ((x1 * 2.0) * (t_3 / t_1)))) * t_1)))));
double tmp;
if (x1 <= -1e+144) {
tmp = t_5;
} else if (x1 <= -7.3e+84) {
tmp = x1 + (t_0 + (x1 + (x1 * ((x1 * (x1 * -22.0)) - (4.0 * (x2 * (3.0 - (2.0 * x2))))))));
} else if (x1 <= -0.00072) {
tmp = t_6;
} else if (x1 <= 0.00086) {
tmp = x1 + ((3.0 * ((x1 - (t_2 - (2.0 * x2))) / t_1)) + (x1 + (4.0 * (x2 * ((x1 * -3.0) + (2.0 * (x1 * x2)))))));
} else if (x1 <= 2e+153) {
tmp = t_6;
} else {
tmp = t_5;
}
return tmp;
}
def code(x1, x2): t_0 = 3.0 * (x2 * -2.0) t_1 = -1.0 - (x1 * x1) t_2 = x1 * (x1 * 3.0) t_3 = (t_2 + (2.0 * x2)) - x1 t_4 = t_3 / ((x1 * x1) + 1.0) t_5 = x1 + (x1 + (3.0 * (x1 * ((x1 * 3.0) + -1.0)))) t_6 = x1 + (t_0 + (x1 + ((x1 * (x1 * x1)) + ((t_2 * t_4) - ((((x1 * x1) * 6.0) - ((t_4 - 3.0) * ((x1 * 2.0) * (t_3 / t_1)))) * t_1))))) tmp = 0 if x1 <= -1e+144: tmp = t_5 elif x1 <= -7.3e+84: tmp = x1 + (t_0 + (x1 + (x1 * ((x1 * (x1 * -22.0)) - (4.0 * (x2 * (3.0 - (2.0 * x2)))))))) elif x1 <= -0.00072: tmp = t_6 elif x1 <= 0.00086: tmp = x1 + ((3.0 * ((x1 - (t_2 - (2.0 * x2))) / t_1)) + (x1 + (4.0 * (x2 * ((x1 * -3.0) + (2.0 * (x1 * x2))))))) elif x1 <= 2e+153: tmp = t_6 else: tmp = t_5 return tmp
function code(x1, x2) t_0 = Float64(3.0 * Float64(x2 * -2.0)) t_1 = Float64(-1.0 - Float64(x1 * x1)) t_2 = Float64(x1 * Float64(x1 * 3.0)) t_3 = Float64(Float64(t_2 + Float64(2.0 * x2)) - x1) t_4 = Float64(t_3 / Float64(Float64(x1 * x1) + 1.0)) t_5 = Float64(x1 + Float64(x1 + Float64(3.0 * Float64(x1 * Float64(Float64(x1 * 3.0) + -1.0))))) t_6 = Float64(x1 + Float64(t_0 + Float64(x1 + Float64(Float64(x1 * Float64(x1 * x1)) + Float64(Float64(t_2 * t_4) - Float64(Float64(Float64(Float64(x1 * x1) * 6.0) - Float64(Float64(t_4 - 3.0) * Float64(Float64(x1 * 2.0) * Float64(t_3 / t_1)))) * t_1)))))) tmp = 0.0 if (x1 <= -1e+144) tmp = t_5; elseif (x1 <= -7.3e+84) tmp = Float64(x1 + Float64(t_0 + Float64(x1 + Float64(x1 * Float64(Float64(x1 * Float64(x1 * -22.0)) - Float64(4.0 * Float64(x2 * Float64(3.0 - Float64(2.0 * x2))))))))); elseif (x1 <= -0.00072) tmp = t_6; elseif (x1 <= 0.00086) tmp = Float64(x1 + Float64(Float64(3.0 * Float64(Float64(x1 - Float64(t_2 - Float64(2.0 * x2))) / t_1)) + Float64(x1 + Float64(4.0 * Float64(x2 * Float64(Float64(x1 * -3.0) + Float64(2.0 * Float64(x1 * x2)))))))); elseif (x1 <= 2e+153) tmp = t_6; else tmp = t_5; end return tmp end
function tmp_2 = code(x1, x2) t_0 = 3.0 * (x2 * -2.0); t_1 = -1.0 - (x1 * x1); t_2 = x1 * (x1 * 3.0); t_3 = (t_2 + (2.0 * x2)) - x1; t_4 = t_3 / ((x1 * x1) + 1.0); t_5 = x1 + (x1 + (3.0 * (x1 * ((x1 * 3.0) + -1.0)))); t_6 = x1 + (t_0 + (x1 + ((x1 * (x1 * x1)) + ((t_2 * t_4) - ((((x1 * x1) * 6.0) - ((t_4 - 3.0) * ((x1 * 2.0) * (t_3 / t_1)))) * t_1))))); tmp = 0.0; if (x1 <= -1e+144) tmp = t_5; elseif (x1 <= -7.3e+84) tmp = x1 + (t_0 + (x1 + (x1 * ((x1 * (x1 * -22.0)) - (4.0 * (x2 * (3.0 - (2.0 * x2)))))))); elseif (x1 <= -0.00072) tmp = t_6; elseif (x1 <= 0.00086) tmp = x1 + ((3.0 * ((x1 - (t_2 - (2.0 * x2))) / t_1)) + (x1 + (4.0 * (x2 * ((x1 * -3.0) + (2.0 * (x1 * x2))))))); elseif (x1 <= 2e+153) tmp = t_6; else tmp = t_5; end tmp_2 = tmp; end
code[x1_, x2_] := Block[{t$95$0 = N[(3.0 * N[(x2 * -2.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(-1.0 - N[(x1 * x1), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x1 * N[(x1 * 3.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[(t$95$2 + N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision]}, Block[{t$95$4 = N[(t$95$3 / N[(N[(x1 * x1), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$5 = 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$6 = N[(x1 + N[(t$95$0 + N[(x1 + N[(N[(x1 * N[(x1 * x1), $MachinePrecision]), $MachinePrecision] + N[(N[(t$95$2 * t$95$4), $MachinePrecision] - N[(N[(N[(N[(x1 * x1), $MachinePrecision] * 6.0), $MachinePrecision] - N[(N[(t$95$4 - 3.0), $MachinePrecision] * N[(N[(x1 * 2.0), $MachinePrecision] * N[(t$95$3 / t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x1, -1e+144], t$95$5, If[LessEqual[x1, -7.3e+84], N[(x1 + N[(t$95$0 + N[(x1 + N[(x1 * N[(N[(x1 * N[(x1 * -22.0), $MachinePrecision]), $MachinePrecision] - N[(4.0 * N[(x2 * N[(3.0 - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, -0.00072], t$95$6, If[LessEqual[x1, 0.00086], N[(x1 + N[(N[(3.0 * N[(N[(x1 - N[(t$95$2 - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / t$95$1), $MachinePrecision]), $MachinePrecision] + N[(x1 + N[(4.0 * N[(x2 * N[(N[(x1 * -3.0), $MachinePrecision] + N[(2.0 * N[(x1 * x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 2e+153], t$95$6, t$95$5]]]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := 3 \cdot \left(x2 \cdot -2\right)\\
t_1 := -1 - x1 \cdot x1\\
t_2 := x1 \cdot \left(x1 \cdot 3\right)\\
t_3 := \left(t\_2 + 2 \cdot x2\right) - x1\\
t_4 := \frac{t\_3}{x1 \cdot x1 + 1}\\
t_5 := x1 + \left(x1 + 3 \cdot \left(x1 \cdot \left(x1 \cdot 3 + -1\right)\right)\right)\\
t_6 := x1 + \left(t\_0 + \left(x1 + \left(x1 \cdot \left(x1 \cdot x1\right) + \left(t\_2 \cdot t\_4 - \left(\left(x1 \cdot x1\right) \cdot 6 - \left(t\_4 - 3\right) \cdot \left(\left(x1 \cdot 2\right) \cdot \frac{t\_3}{t\_1}\right)\right) \cdot t\_1\right)\right)\right)\right)\\
\mathbf{if}\;x1 \leq -1 \cdot 10^{+144}:\\
\;\;\;\;t\_5\\
\mathbf{elif}\;x1 \leq -7.3 \cdot 10^{+84}:\\
\;\;\;\;x1 + \left(t\_0 + \left(x1 + x1 \cdot \left(x1 \cdot \left(x1 \cdot -22\right) - 4 \cdot \left(x2 \cdot \left(3 - 2 \cdot x2\right)\right)\right)\right)\right)\\
\mathbf{elif}\;x1 \leq -0.00072:\\
\;\;\;\;t\_6\\
\mathbf{elif}\;x1 \leq 0.00086:\\
\;\;\;\;x1 + \left(3 \cdot \frac{x1 - \left(t\_2 - 2 \cdot x2\right)}{t\_1} + \left(x1 + 4 \cdot \left(x2 \cdot \left(x1 \cdot -3 + 2 \cdot \left(x1 \cdot x2\right)\right)\right)\right)\right)\\
\mathbf{elif}\;x1 \leq 2 \cdot 10^{+153}:\\
\;\;\;\;t\_6\\
\mathbf{else}:\\
\;\;\;\;t\_5\\
\end{array}
\end{array}
if x1 < -1.00000000000000002e144 or 2e153 < x1 Initial program 0.0%
Taylor expanded in x1 around 0 0.0%
Taylor expanded in x1 around 0 60.6%
Taylor expanded in x2 around 0 98.7%
if -1.00000000000000002e144 < x1 < -7.3e84Initial program 27.3%
Taylor expanded in x1 around 0 27.3%
*-commutative27.3%
Simplified27.3%
Taylor expanded in x1 around 0 55.4%
Taylor expanded in x2 around 0 73.6%
*-commutative73.6%
Simplified73.6%
if -7.3e84 < x1 < -7.20000000000000045e-4 or 8.59999999999999979e-4 < x1 < 2e153Initial program 97.0%
Taylor expanded in x1 around 0 97.0%
*-commutative97.0%
Simplified97.0%
associate-*r*97.0%
add-cbrt-cube72.8%
pow1/371.3%
pow371.3%
*-commutative71.3%
unpow-prod-down71.3%
pow271.3%
pow-pow71.3%
metadata-eval71.3%
metadata-eval71.3%
Applied egg-rr71.3%
unpow1/372.9%
Simplified72.9%
Taylor expanded in x1 around inf 91.2%
if -7.20000000000000045e-4 < x1 < 8.59999999999999979e-4Initial program 99.4%
Taylor expanded in x1 around 0 89.3%
Taylor expanded in x2 around 0 99.4%
Final simplification96.8%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (* 3.0 (* x2 -2.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)) x1))
(t_4 (* x1 (* x1 x1)))
(t_5 (+ (* x1 x1) 1.0))
(t_6 (/ t_3 t_5)))
(if (<= x1 -1e+144)
t_1
(if (<= x1 -3.4e+106)
(+
x1
(+
t_0
(+
x1
(* x1 (+ (* 4.0 (* x2 (- (* 2.0 x2) 3.0))) (* x1 (* x1 -22.0)))))))
(if (<= x1 -0.6)
(+
x1
(+
t_0
(+
x1
(+
t_4
(+
(*
t_5
(+
(* (* x1 x1) (- (* t_6 4.0) 6.0))
(*
(* (* x1 2.0) t_6)
(/ (+ (* 2.0 (/ x2 x1)) (- -1.0 (/ 3.0 x1))) x1))))
(* t_2 (* 2.0 x2)))))))
(if (<= x1 2.75e+16)
(+
x1
(+
(* 3.0 (/ (- (- t_2 (* 2.0 x2)) x1) t_5))
(+ x1 (* 4.0 (* x2 (+ (* x1 -3.0) (* 2.0 (* x1 x2))))))))
(if (<= x1 2e+153)
(+
x1
(+
t_0
(+
x1
(+
t_4
(+
(* t_2 t_6)
(*
t_5
(-
-6.0
(*
(* x1 x1)
(+ 6.0 (* 4.0 (/ t_3 (- -1.0 (* x1 x1)))))))))))))
t_1)))))))
double code(double x1, double x2) {
double t_0 = 3.0 * (x2 * -2.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)) - x1;
double t_4 = x1 * (x1 * x1);
double t_5 = (x1 * x1) + 1.0;
double t_6 = t_3 / t_5;
double tmp;
if (x1 <= -1e+144) {
tmp = t_1;
} else if (x1 <= -3.4e+106) {
tmp = x1 + (t_0 + (x1 + (x1 * ((4.0 * (x2 * ((2.0 * x2) - 3.0))) + (x1 * (x1 * -22.0))))));
} else if (x1 <= -0.6) {
tmp = x1 + (t_0 + (x1 + (t_4 + ((t_5 * (((x1 * x1) * ((t_6 * 4.0) - 6.0)) + (((x1 * 2.0) * t_6) * (((2.0 * (x2 / x1)) + (-1.0 - (3.0 / x1))) / x1)))) + (t_2 * (2.0 * x2))))));
} else if (x1 <= 2.75e+16) {
tmp = x1 + ((3.0 * (((t_2 - (2.0 * x2)) - x1) / t_5)) + (x1 + (4.0 * (x2 * ((x1 * -3.0) + (2.0 * (x1 * x2)))))));
} else if (x1 <= 2e+153) {
tmp = x1 + (t_0 + (x1 + (t_4 + ((t_2 * t_6) + (t_5 * (-6.0 - ((x1 * x1) * (6.0 + (4.0 * (t_3 / (-1.0 - (x1 * 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) :: tmp
t_0 = 3.0d0 * (x2 * (-2.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)) - x1
t_4 = x1 * (x1 * x1)
t_5 = (x1 * x1) + 1.0d0
t_6 = t_3 / t_5
if (x1 <= (-1d+144)) then
tmp = t_1
else if (x1 <= (-3.4d+106)) then
tmp = x1 + (t_0 + (x1 + (x1 * ((4.0d0 * (x2 * ((2.0d0 * x2) - 3.0d0))) + (x1 * (x1 * (-22.0d0)))))))
else if (x1 <= (-0.6d0)) then
tmp = x1 + (t_0 + (x1 + (t_4 + ((t_5 * (((x1 * x1) * ((t_6 * 4.0d0) - 6.0d0)) + (((x1 * 2.0d0) * t_6) * (((2.0d0 * (x2 / x1)) + ((-1.0d0) - (3.0d0 / x1))) / x1)))) + (t_2 * (2.0d0 * x2))))))
else if (x1 <= 2.75d+16) then
tmp = x1 + ((3.0d0 * (((t_2 - (2.0d0 * x2)) - x1) / t_5)) + (x1 + (4.0d0 * (x2 * ((x1 * (-3.0d0)) + (2.0d0 * (x1 * x2)))))))
else if (x1 <= 2d+153) then
tmp = x1 + (t_0 + (x1 + (t_4 + ((t_2 * t_6) + (t_5 * ((-6.0d0) - ((x1 * x1) * (6.0d0 + (4.0d0 * (t_3 / ((-1.0d0) - (x1 * x1))))))))))))
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x1, double x2) {
double t_0 = 3.0 * (x2 * -2.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)) - x1;
double t_4 = x1 * (x1 * x1);
double t_5 = (x1 * x1) + 1.0;
double t_6 = t_3 / t_5;
double tmp;
if (x1 <= -1e+144) {
tmp = t_1;
} else if (x1 <= -3.4e+106) {
tmp = x1 + (t_0 + (x1 + (x1 * ((4.0 * (x2 * ((2.0 * x2) - 3.0))) + (x1 * (x1 * -22.0))))));
} else if (x1 <= -0.6) {
tmp = x1 + (t_0 + (x1 + (t_4 + ((t_5 * (((x1 * x1) * ((t_6 * 4.0) - 6.0)) + (((x1 * 2.0) * t_6) * (((2.0 * (x2 / x1)) + (-1.0 - (3.0 / x1))) / x1)))) + (t_2 * (2.0 * x2))))));
} else if (x1 <= 2.75e+16) {
tmp = x1 + ((3.0 * (((t_2 - (2.0 * x2)) - x1) / t_5)) + (x1 + (4.0 * (x2 * ((x1 * -3.0) + (2.0 * (x1 * x2)))))));
} else if (x1 <= 2e+153) {
tmp = x1 + (t_0 + (x1 + (t_4 + ((t_2 * t_6) + (t_5 * (-6.0 - ((x1 * x1) * (6.0 + (4.0 * (t_3 / (-1.0 - (x1 * x1))))))))))));
} else {
tmp = t_1;
}
return tmp;
}
def code(x1, x2): t_0 = 3.0 * (x2 * -2.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)) - x1 t_4 = x1 * (x1 * x1) t_5 = (x1 * x1) + 1.0 t_6 = t_3 / t_5 tmp = 0 if x1 <= -1e+144: tmp = t_1 elif x1 <= -3.4e+106: tmp = x1 + (t_0 + (x1 + (x1 * ((4.0 * (x2 * ((2.0 * x2) - 3.0))) + (x1 * (x1 * -22.0)))))) elif x1 <= -0.6: tmp = x1 + (t_0 + (x1 + (t_4 + ((t_5 * (((x1 * x1) * ((t_6 * 4.0) - 6.0)) + (((x1 * 2.0) * t_6) * (((2.0 * (x2 / x1)) + (-1.0 - (3.0 / x1))) / x1)))) + (t_2 * (2.0 * x2)))))) elif x1 <= 2.75e+16: tmp = x1 + ((3.0 * (((t_2 - (2.0 * x2)) - x1) / t_5)) + (x1 + (4.0 * (x2 * ((x1 * -3.0) + (2.0 * (x1 * x2))))))) elif x1 <= 2e+153: tmp = x1 + (t_0 + (x1 + (t_4 + ((t_2 * t_6) + (t_5 * (-6.0 - ((x1 * x1) * (6.0 + (4.0 * (t_3 / (-1.0 - (x1 * x1)))))))))))) else: tmp = t_1 return tmp
function code(x1, x2) t_0 = Float64(3.0 * Float64(x2 * -2.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(Float64(t_2 + Float64(2.0 * x2)) - x1) t_4 = Float64(x1 * Float64(x1 * x1)) t_5 = Float64(Float64(x1 * x1) + 1.0) t_6 = Float64(t_3 / t_5) tmp = 0.0 if (x1 <= -1e+144) tmp = t_1; elseif (x1 <= -3.4e+106) tmp = Float64(x1 + Float64(t_0 + Float64(x1 + Float64(x1 * Float64(Float64(4.0 * Float64(x2 * Float64(Float64(2.0 * x2) - 3.0))) + Float64(x1 * Float64(x1 * -22.0))))))); elseif (x1 <= -0.6) tmp = Float64(x1 + Float64(t_0 + Float64(x1 + Float64(t_4 + Float64(Float64(t_5 * Float64(Float64(Float64(x1 * x1) * Float64(Float64(t_6 * 4.0) - 6.0)) + Float64(Float64(Float64(x1 * 2.0) * t_6) * Float64(Float64(Float64(2.0 * Float64(x2 / x1)) + Float64(-1.0 - Float64(3.0 / x1))) / x1)))) + Float64(t_2 * Float64(2.0 * x2))))))); elseif (x1 <= 2.75e+16) tmp = Float64(x1 + Float64(Float64(3.0 * Float64(Float64(Float64(t_2 - Float64(2.0 * x2)) - x1) / t_5)) + Float64(x1 + Float64(4.0 * Float64(x2 * Float64(Float64(x1 * -3.0) + Float64(2.0 * Float64(x1 * x2)))))))); elseif (x1 <= 2e+153) tmp = Float64(x1 + Float64(t_0 + Float64(x1 + Float64(t_4 + Float64(Float64(t_2 * t_6) + Float64(t_5 * Float64(-6.0 - Float64(Float64(x1 * x1) * Float64(6.0 + Float64(4.0 * Float64(t_3 / Float64(-1.0 - Float64(x1 * x1))))))))))))); else tmp = t_1; end return tmp end
function tmp_2 = code(x1, x2) t_0 = 3.0 * (x2 * -2.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)) - x1; t_4 = x1 * (x1 * x1); t_5 = (x1 * x1) + 1.0; t_6 = t_3 / t_5; tmp = 0.0; if (x1 <= -1e+144) tmp = t_1; elseif (x1 <= -3.4e+106) tmp = x1 + (t_0 + (x1 + (x1 * ((4.0 * (x2 * ((2.0 * x2) - 3.0))) + (x1 * (x1 * -22.0)))))); elseif (x1 <= -0.6) tmp = x1 + (t_0 + (x1 + (t_4 + ((t_5 * (((x1 * x1) * ((t_6 * 4.0) - 6.0)) + (((x1 * 2.0) * t_6) * (((2.0 * (x2 / x1)) + (-1.0 - (3.0 / x1))) / x1)))) + (t_2 * (2.0 * x2)))))); elseif (x1 <= 2.75e+16) tmp = x1 + ((3.0 * (((t_2 - (2.0 * x2)) - x1) / t_5)) + (x1 + (4.0 * (x2 * ((x1 * -3.0) + (2.0 * (x1 * x2))))))); elseif (x1 <= 2e+153) tmp = x1 + (t_0 + (x1 + (t_4 + ((t_2 * t_6) + (t_5 * (-6.0 - ((x1 * x1) * (6.0 + (4.0 * (t_3 / (-1.0 - (x1 * x1)))))))))))); else tmp = t_1; end tmp_2 = tmp; end
code[x1_, x2_] := Block[{t$95$0 = N[(3.0 * N[(x2 * -2.0), $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]}, Block[{t$95$2 = N[(x1 * N[(x1 * 3.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[(t$95$2 + N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision]}, Block[{t$95$4 = N[(x1 * N[(x1 * x1), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$5 = N[(N[(x1 * x1), $MachinePrecision] + 1.0), $MachinePrecision]}, Block[{t$95$6 = N[(t$95$3 / t$95$5), $MachinePrecision]}, If[LessEqual[x1, -1e+144], t$95$1, If[LessEqual[x1, -3.4e+106], N[(x1 + N[(t$95$0 + N[(x1 + N[(x1 * N[(N[(4.0 * N[(x2 * N[(N[(2.0 * x2), $MachinePrecision] - 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(x1 * N[(x1 * -22.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, -0.6], N[(x1 + N[(t$95$0 + N[(x1 + N[(t$95$4 + N[(N[(t$95$5 * N[(N[(N[(x1 * x1), $MachinePrecision] * N[(N[(t$95$6 * 4.0), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision] + N[(N[(N[(x1 * 2.0), $MachinePrecision] * t$95$6), $MachinePrecision] * N[(N[(N[(2.0 * N[(x2 / x1), $MachinePrecision]), $MachinePrecision] + N[(-1.0 - N[(3.0 / x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(t$95$2 * N[(2.0 * x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 2.75e+16], N[(x1 + N[(N[(3.0 * N[(N[(N[(t$95$2 - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$5), $MachinePrecision]), $MachinePrecision] + N[(x1 + N[(4.0 * N[(x2 * N[(N[(x1 * -3.0), $MachinePrecision] + N[(2.0 * N[(x1 * x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 2e+153], N[(x1 + N[(t$95$0 + N[(x1 + N[(t$95$4 + N[(N[(t$95$2 * t$95$6), $MachinePrecision] + N[(t$95$5 * N[(-6.0 - N[(N[(x1 * x1), $MachinePrecision] * N[(6.0 + N[(4.0 * N[(t$95$3 / N[(-1.0 - N[(x1 * x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := 3 \cdot \left(x2 \cdot -2\right)\\
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 := \left(t\_2 + 2 \cdot x2\right) - x1\\
t_4 := x1 \cdot \left(x1 \cdot x1\right)\\
t_5 := x1 \cdot x1 + 1\\
t_6 := \frac{t\_3}{t\_5}\\
\mathbf{if}\;x1 \leq -1 \cdot 10^{+144}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;x1 \leq -3.4 \cdot 10^{+106}:\\
\;\;\;\;x1 + \left(t\_0 + \left(x1 + x1 \cdot \left(4 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right) + x1 \cdot \left(x1 \cdot -22\right)\right)\right)\right)\\
\mathbf{elif}\;x1 \leq -0.6:\\
\;\;\;\;x1 + \left(t\_0 + \left(x1 + \left(t\_4 + \left(t\_5 \cdot \left(\left(x1 \cdot x1\right) \cdot \left(t\_6 \cdot 4 - 6\right) + \left(\left(x1 \cdot 2\right) \cdot t\_6\right) \cdot \frac{2 \cdot \frac{x2}{x1} + \left(-1 - \frac{3}{x1}\right)}{x1}\right) + t\_2 \cdot \left(2 \cdot x2\right)\right)\right)\right)\right)\\
\mathbf{elif}\;x1 \leq 2.75 \cdot 10^{+16}:\\
\;\;\;\;x1 + \left(3 \cdot \frac{\left(t\_2 - 2 \cdot x2\right) - x1}{t\_5} + \left(x1 + 4 \cdot \left(x2 \cdot \left(x1 \cdot -3 + 2 \cdot \left(x1 \cdot x2\right)\right)\right)\right)\right)\\
\mathbf{elif}\;x1 \leq 2 \cdot 10^{+153}:\\
\;\;\;\;x1 + \left(t\_0 + \left(x1 + \left(t\_4 + \left(t\_2 \cdot t\_6 + t\_5 \cdot \left(-6 - \left(x1 \cdot x1\right) \cdot \left(6 + 4 \cdot \frac{t\_3}{-1 - x1 \cdot x1}\right)\right)\right)\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if x1 < -1.00000000000000002e144 or 2e153 < x1 Initial program 0.0%
Taylor expanded in x1 around 0 0.0%
Taylor expanded in x1 around 0 60.6%
Taylor expanded in x2 around 0 98.7%
if -1.00000000000000002e144 < x1 < -3.39999999999999994e106Initial program 0.0%
Taylor expanded in x1 around 0 0.0%
*-commutative0.0%
Simplified0.0%
Taylor expanded in x1 around 0 75.0%
Taylor expanded in x2 around 0 75.0%
*-commutative75.0%
Simplified75.0%
if -3.39999999999999994e106 < x1 < -0.599999999999999978Initial program 99.3%
Taylor expanded in x1 around 0 99.3%
*-commutative99.3%
Simplified99.3%
Taylor expanded in x1 around inf 99.3%
associate-*r/99.3%
metadata-eval99.3%
Simplified99.3%
Taylor expanded in x1 around 0 83.4%
if -0.599999999999999978 < x1 < 2.75e16Initial program 99.4%
Taylor expanded in x1 around 0 88.9%
Taylor expanded in x2 around 0 98.7%
if 2.75e16 < x1 < 2e153Initial program 95.9%
Taylor expanded in x1 around 0 95.9%
*-commutative95.9%
Simplified95.9%
Taylor expanded in x1 around inf 95.9%
associate-*r/95.9%
metadata-eval95.9%
Simplified95.9%
Taylor expanded in x1 around inf 90.1%
Final simplification96.2%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (+ (* x1 x1) 1.0))
(t_1 (* 3.0 (* x2 -2.0)))
(t_2 (* x1 (* x1 3.0)))
(t_3 (- (+ t_2 (* 2.0 x2)) x1))
(t_4 (+ x1 (+ x1 (* 3.0 (* x1 (+ (* x1 3.0) -1.0))))))
(t_5
(+
x1
(+
t_1
(+
x1
(+
(* x1 (* x1 x1))
(+
(* t_2 (/ t_3 t_0))
(*
t_0
(-
-6.0
(*
(* x1 x1)
(+ 6.0 (* 4.0 (/ t_3 (- -1.0 (* x1 x1)))))))))))))))
(if (<= x1 -1e+144)
t_4
(if (<= x1 -3.4e+106)
(+
x1
(+
t_1
(+
x1
(* x1 (+ (* 4.0 (* x2 (- (* 2.0 x2) 3.0))) (* x1 (* x1 -22.0)))))))
(if (<= x1 -5.1e+14)
t_5
(if (<= x1 520000000.0)
(+
x1
(+
(* 3.0 (/ (- (- t_2 (* 2.0 x2)) x1) t_0))
(+ x1 (* 4.0 (* x2 (+ (* x1 -3.0) (* 2.0 (* x1 x2))))))))
(if (<= x1 2e+153) t_5 t_4)))))))
double code(double x1, double x2) {
double t_0 = (x1 * x1) + 1.0;
double t_1 = 3.0 * (x2 * -2.0);
double t_2 = x1 * (x1 * 3.0);
double t_3 = (t_2 + (2.0 * x2)) - x1;
double t_4 = x1 + (x1 + (3.0 * (x1 * ((x1 * 3.0) + -1.0))));
double t_5 = x1 + (t_1 + (x1 + ((x1 * (x1 * x1)) + ((t_2 * (t_3 / t_0)) + (t_0 * (-6.0 - ((x1 * x1) * (6.0 + (4.0 * (t_3 / (-1.0 - (x1 * x1))))))))))));
double tmp;
if (x1 <= -1e+144) {
tmp = t_4;
} else if (x1 <= -3.4e+106) {
tmp = x1 + (t_1 + (x1 + (x1 * ((4.0 * (x2 * ((2.0 * x2) - 3.0))) + (x1 * (x1 * -22.0))))));
} else if (x1 <= -5.1e+14) {
tmp = t_5;
} else if (x1 <= 520000000.0) {
tmp = x1 + ((3.0 * (((t_2 - (2.0 * x2)) - x1) / t_0)) + (x1 + (4.0 * (x2 * ((x1 * -3.0) + (2.0 * (x1 * x2)))))));
} else if (x1 <= 2e+153) {
tmp = t_5;
} else {
tmp = t_4;
}
return tmp;
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
real(8) :: t_0
real(8) :: t_1
real(8) :: t_2
real(8) :: t_3
real(8) :: t_4
real(8) :: t_5
real(8) :: tmp
t_0 = (x1 * x1) + 1.0d0
t_1 = 3.0d0 * (x2 * (-2.0d0))
t_2 = x1 * (x1 * 3.0d0)
t_3 = (t_2 + (2.0d0 * x2)) - x1
t_4 = x1 + (x1 + (3.0d0 * (x1 * ((x1 * 3.0d0) + (-1.0d0)))))
t_5 = x1 + (t_1 + (x1 + ((x1 * (x1 * x1)) + ((t_2 * (t_3 / t_0)) + (t_0 * ((-6.0d0) - ((x1 * x1) * (6.0d0 + (4.0d0 * (t_3 / ((-1.0d0) - (x1 * x1))))))))))))
if (x1 <= (-1d+144)) then
tmp = t_4
else if (x1 <= (-3.4d+106)) then
tmp = x1 + (t_1 + (x1 + (x1 * ((4.0d0 * (x2 * ((2.0d0 * x2) - 3.0d0))) + (x1 * (x1 * (-22.0d0)))))))
else if (x1 <= (-5.1d+14)) then
tmp = t_5
else if (x1 <= 520000000.0d0) then
tmp = x1 + ((3.0d0 * (((t_2 - (2.0d0 * x2)) - x1) / t_0)) + (x1 + (4.0d0 * (x2 * ((x1 * (-3.0d0)) + (2.0d0 * (x1 * x2)))))))
else if (x1 <= 2d+153) then
tmp = t_5
else
tmp = t_4
end if
code = tmp
end function
public static double code(double x1, double x2) {
double t_0 = (x1 * x1) + 1.0;
double t_1 = 3.0 * (x2 * -2.0);
double t_2 = x1 * (x1 * 3.0);
double t_3 = (t_2 + (2.0 * x2)) - x1;
double t_4 = x1 + (x1 + (3.0 * (x1 * ((x1 * 3.0) + -1.0))));
double t_5 = x1 + (t_1 + (x1 + ((x1 * (x1 * x1)) + ((t_2 * (t_3 / t_0)) + (t_0 * (-6.0 - ((x1 * x1) * (6.0 + (4.0 * (t_3 / (-1.0 - (x1 * x1))))))))))));
double tmp;
if (x1 <= -1e+144) {
tmp = t_4;
} else if (x1 <= -3.4e+106) {
tmp = x1 + (t_1 + (x1 + (x1 * ((4.0 * (x2 * ((2.0 * x2) - 3.0))) + (x1 * (x1 * -22.0))))));
} else if (x1 <= -5.1e+14) {
tmp = t_5;
} else if (x1 <= 520000000.0) {
tmp = x1 + ((3.0 * (((t_2 - (2.0 * x2)) - x1) / t_0)) + (x1 + (4.0 * (x2 * ((x1 * -3.0) + (2.0 * (x1 * x2)))))));
} else if (x1 <= 2e+153) {
tmp = t_5;
} else {
tmp = t_4;
}
return tmp;
}
def code(x1, x2): t_0 = (x1 * x1) + 1.0 t_1 = 3.0 * (x2 * -2.0) t_2 = x1 * (x1 * 3.0) t_3 = (t_2 + (2.0 * x2)) - x1 t_4 = x1 + (x1 + (3.0 * (x1 * ((x1 * 3.0) + -1.0)))) t_5 = x1 + (t_1 + (x1 + ((x1 * (x1 * x1)) + ((t_2 * (t_3 / t_0)) + (t_0 * (-6.0 - ((x1 * x1) * (6.0 + (4.0 * (t_3 / (-1.0 - (x1 * x1)))))))))))) tmp = 0 if x1 <= -1e+144: tmp = t_4 elif x1 <= -3.4e+106: tmp = x1 + (t_1 + (x1 + (x1 * ((4.0 * (x2 * ((2.0 * x2) - 3.0))) + (x1 * (x1 * -22.0)))))) elif x1 <= -5.1e+14: tmp = t_5 elif x1 <= 520000000.0: tmp = x1 + ((3.0 * (((t_2 - (2.0 * x2)) - x1) / t_0)) + (x1 + (4.0 * (x2 * ((x1 * -3.0) + (2.0 * (x1 * x2))))))) elif x1 <= 2e+153: tmp = t_5 else: tmp = t_4 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(x1 * Float64(x1 * 3.0)) t_3 = Float64(Float64(t_2 + Float64(2.0 * x2)) - x1) t_4 = Float64(x1 + Float64(x1 + Float64(3.0 * Float64(x1 * Float64(Float64(x1 * 3.0) + -1.0))))) t_5 = Float64(x1 + Float64(t_1 + Float64(x1 + Float64(Float64(x1 * Float64(x1 * x1)) + Float64(Float64(t_2 * Float64(t_3 / t_0)) + Float64(t_0 * Float64(-6.0 - Float64(Float64(x1 * x1) * Float64(6.0 + Float64(4.0 * Float64(t_3 / Float64(-1.0 - Float64(x1 * x1))))))))))))) tmp = 0.0 if (x1 <= -1e+144) tmp = t_4; elseif (x1 <= -3.4e+106) tmp = Float64(x1 + Float64(t_1 + Float64(x1 + Float64(x1 * Float64(Float64(4.0 * Float64(x2 * Float64(Float64(2.0 * x2) - 3.0))) + Float64(x1 * Float64(x1 * -22.0))))))); elseif (x1 <= -5.1e+14) tmp = t_5; elseif (x1 <= 520000000.0) tmp = Float64(x1 + Float64(Float64(3.0 * Float64(Float64(Float64(t_2 - Float64(2.0 * x2)) - x1) / t_0)) + Float64(x1 + Float64(4.0 * Float64(x2 * Float64(Float64(x1 * -3.0) + Float64(2.0 * Float64(x1 * x2)))))))); elseif (x1 <= 2e+153) tmp = t_5; else tmp = t_4; 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 = x1 * (x1 * 3.0); t_3 = (t_2 + (2.0 * x2)) - x1; t_4 = x1 + (x1 + (3.0 * (x1 * ((x1 * 3.0) + -1.0)))); t_5 = x1 + (t_1 + (x1 + ((x1 * (x1 * x1)) + ((t_2 * (t_3 / t_0)) + (t_0 * (-6.0 - ((x1 * x1) * (6.0 + (4.0 * (t_3 / (-1.0 - (x1 * x1)))))))))))); tmp = 0.0; if (x1 <= -1e+144) tmp = t_4; elseif (x1 <= -3.4e+106) tmp = x1 + (t_1 + (x1 + (x1 * ((4.0 * (x2 * ((2.0 * x2) - 3.0))) + (x1 * (x1 * -22.0)))))); elseif (x1 <= -5.1e+14) tmp = t_5; elseif (x1 <= 520000000.0) tmp = x1 + ((3.0 * (((t_2 - (2.0 * x2)) - x1) / t_0)) + (x1 + (4.0 * (x2 * ((x1 * -3.0) + (2.0 * (x1 * x2))))))); elseif (x1 <= 2e+153) tmp = t_5; else tmp = t_4; end tmp_2 = tmp; end
code[x1_, x2_] := Block[{t$95$0 = N[(N[(x1 * x1), $MachinePrecision] + 1.0), $MachinePrecision]}, Block[{t$95$1 = N[(3.0 * N[(x2 * -2.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x1 * N[(x1 * 3.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[(t$95$2 + N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision]}, Block[{t$95$4 = 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$5 = N[(x1 + N[(t$95$1 + N[(x1 + N[(N[(x1 * N[(x1 * x1), $MachinePrecision]), $MachinePrecision] + N[(N[(t$95$2 * N[(t$95$3 / t$95$0), $MachinePrecision]), $MachinePrecision] + N[(t$95$0 * N[(-6.0 - N[(N[(x1 * x1), $MachinePrecision] * N[(6.0 + N[(4.0 * N[(t$95$3 / N[(-1.0 - N[(x1 * x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x1, -1e+144], t$95$4, If[LessEqual[x1, -3.4e+106], N[(x1 + N[(t$95$1 + N[(x1 + N[(x1 * N[(N[(4.0 * N[(x2 * N[(N[(2.0 * x2), $MachinePrecision] - 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(x1 * N[(x1 * -22.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, -5.1e+14], t$95$5, If[LessEqual[x1, 520000000.0], N[(x1 + N[(N[(3.0 * N[(N[(N[(t$95$2 - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$0), $MachinePrecision]), $MachinePrecision] + N[(x1 + N[(4.0 * N[(x2 * N[(N[(x1 * -3.0), $MachinePrecision] + N[(2.0 * N[(x1 * x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 2e+153], t$95$5, t$95$4]]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x1 \cdot x1 + 1\\
t_1 := 3 \cdot \left(x2 \cdot -2\right)\\
t_2 := x1 \cdot \left(x1 \cdot 3\right)\\
t_3 := \left(t\_2 + 2 \cdot x2\right) - x1\\
t_4 := x1 + \left(x1 + 3 \cdot \left(x1 \cdot \left(x1 \cdot 3 + -1\right)\right)\right)\\
t_5 := x1 + \left(t\_1 + \left(x1 + \left(x1 \cdot \left(x1 \cdot x1\right) + \left(t\_2 \cdot \frac{t\_3}{t\_0} + t\_0 \cdot \left(-6 - \left(x1 \cdot x1\right) \cdot \left(6 + 4 \cdot \frac{t\_3}{-1 - x1 \cdot x1}\right)\right)\right)\right)\right)\right)\\
\mathbf{if}\;x1 \leq -1 \cdot 10^{+144}:\\
\;\;\;\;t\_4\\
\mathbf{elif}\;x1 \leq -3.4 \cdot 10^{+106}:\\
\;\;\;\;x1 + \left(t\_1 + \left(x1 + x1 \cdot \left(4 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right) + x1 \cdot \left(x1 \cdot -22\right)\right)\right)\right)\\
\mathbf{elif}\;x1 \leq -5.1 \cdot 10^{+14}:\\
\;\;\;\;t\_5\\
\mathbf{elif}\;x1 \leq 520000000:\\
\;\;\;\;x1 + \left(3 \cdot \frac{\left(t\_2 - 2 \cdot x2\right) - x1}{t\_0} + \left(x1 + 4 \cdot \left(x2 \cdot \left(x1 \cdot -3 + 2 \cdot \left(x1 \cdot x2\right)\right)\right)\right)\right)\\
\mathbf{elif}\;x1 \leq 2 \cdot 10^{+153}:\\
\;\;\;\;t\_5\\
\mathbf{else}:\\
\;\;\;\;t\_4\\
\end{array}
\end{array}
if x1 < -1.00000000000000002e144 or 2e153 < x1 Initial program 0.0%
Taylor expanded in x1 around 0 0.0%
Taylor expanded in x1 around 0 60.6%
Taylor expanded in x2 around 0 98.7%
if -1.00000000000000002e144 < x1 < -3.39999999999999994e106Initial program 0.0%
Taylor expanded in x1 around 0 0.0%
*-commutative0.0%
Simplified0.0%
Taylor expanded in x1 around 0 75.0%
Taylor expanded in x2 around 0 75.0%
*-commutative75.0%
Simplified75.0%
if -3.39999999999999994e106 < x1 < -5.1e14 or 5.2e8 < x1 < 2e153Initial program 96.9%
Taylor expanded in x1 around 0 96.9%
*-commutative96.9%
Simplified96.9%
Taylor expanded in x1 around inf 97.0%
associate-*r/97.0%
metadata-eval97.0%
Simplified97.0%
Taylor expanded in x1 around inf 85.6%
if -5.1e14 < x1 < 5.2e8Initial program 99.4%
Taylor expanded in x1 around 0 88.3%
Taylor expanded in x2 around 0 98.1%
Final simplification95.6%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (* 3.0 (* x2 -2.0))) (t_1 (* x2 (- (* 2.0 x2) 3.0))))
(if (<= x1 -1e+144)
(+ x1 (+ x1 (* 3.0 (* x1 (+ (* x1 3.0) -1.0)))))
(if (<= x1 -5.1e+14)
(+ x1 (+ t_0 (+ x1 (* x1 (+ (* 4.0 t_1) (* x1 (* x1 -22.0)))))))
(if (<= x1 -6.5e-285)
(+ x1 (+ (+ x1 (* 4.0 (* x1 t_1))) (* 3.0 (- (* x2 -2.0) x1))))
(if (<= x1 2.3e-239)
(+
x1
(+
t_0
(- x1 (* x2 (- (* x1 (- 12.0 (* x1 6.0))) (* (* x1 x2) 8.0))))))
(if (<= x1 2.45e+144)
(+
x1
(+
(* x2 -6.0)
(*
x1
(-
(-
(* 3.0 (* x1 (- 3.0 (* x2 -2.0))))
(* 4.0 (* x2 (- 3.0 (* 2.0 x2)))))
2.0))))
(+ x1 (+ (* x2 -6.0) (* x1 (- (* x1 9.0) 2.0)))))))))))
double code(double x1, double x2) {
double t_0 = 3.0 * (x2 * -2.0);
double t_1 = x2 * ((2.0 * x2) - 3.0);
double tmp;
if (x1 <= -1e+144) {
tmp = x1 + (x1 + (3.0 * (x1 * ((x1 * 3.0) + -1.0))));
} else if (x1 <= -5.1e+14) {
tmp = x1 + (t_0 + (x1 + (x1 * ((4.0 * t_1) + (x1 * (x1 * -22.0))))));
} else if (x1 <= -6.5e-285) {
tmp = x1 + ((x1 + (4.0 * (x1 * t_1))) + (3.0 * ((x2 * -2.0) - x1)));
} else if (x1 <= 2.3e-239) {
tmp = x1 + (t_0 + (x1 - (x2 * ((x1 * (12.0 - (x1 * 6.0))) - ((x1 * x2) * 8.0)))));
} else if (x1 <= 2.45e+144) {
tmp = x1 + ((x2 * -6.0) + (x1 * (((3.0 * (x1 * (3.0 - (x2 * -2.0)))) - (4.0 * (x2 * (3.0 - (2.0 * x2))))) - 2.0)));
} else {
tmp = x1 + ((x2 * -6.0) + (x1 * ((x1 * 9.0) - 2.0)));
}
return tmp;
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
real(8) :: t_0
real(8) :: t_1
real(8) :: tmp
t_0 = 3.0d0 * (x2 * (-2.0d0))
t_1 = x2 * ((2.0d0 * x2) - 3.0d0)
if (x1 <= (-1d+144)) then
tmp = x1 + (x1 + (3.0d0 * (x1 * ((x1 * 3.0d0) + (-1.0d0)))))
else if (x1 <= (-5.1d+14)) then
tmp = x1 + (t_0 + (x1 + (x1 * ((4.0d0 * t_1) + (x1 * (x1 * (-22.0d0)))))))
else if (x1 <= (-6.5d-285)) then
tmp = x1 + ((x1 + (4.0d0 * (x1 * t_1))) + (3.0d0 * ((x2 * (-2.0d0)) - x1)))
else if (x1 <= 2.3d-239) then
tmp = x1 + (t_0 + (x1 - (x2 * ((x1 * (12.0d0 - (x1 * 6.0d0))) - ((x1 * x2) * 8.0d0)))))
else if (x1 <= 2.45d+144) then
tmp = x1 + ((x2 * (-6.0d0)) + (x1 * (((3.0d0 * (x1 * (3.0d0 - (x2 * (-2.0d0))))) - (4.0d0 * (x2 * (3.0d0 - (2.0d0 * x2))))) - 2.0d0)))
else
tmp = x1 + ((x2 * (-6.0d0)) + (x1 * ((x1 * 9.0d0) - 2.0d0)))
end if
code = tmp
end function
public static double code(double x1, double x2) {
double t_0 = 3.0 * (x2 * -2.0);
double t_1 = x2 * ((2.0 * x2) - 3.0);
double tmp;
if (x1 <= -1e+144) {
tmp = x1 + (x1 + (3.0 * (x1 * ((x1 * 3.0) + -1.0))));
} else if (x1 <= -5.1e+14) {
tmp = x1 + (t_0 + (x1 + (x1 * ((4.0 * t_1) + (x1 * (x1 * -22.0))))));
} else if (x1 <= -6.5e-285) {
tmp = x1 + ((x1 + (4.0 * (x1 * t_1))) + (3.0 * ((x2 * -2.0) - x1)));
} else if (x1 <= 2.3e-239) {
tmp = x1 + (t_0 + (x1 - (x2 * ((x1 * (12.0 - (x1 * 6.0))) - ((x1 * x2) * 8.0)))));
} else if (x1 <= 2.45e+144) {
tmp = x1 + ((x2 * -6.0) + (x1 * (((3.0 * (x1 * (3.0 - (x2 * -2.0)))) - (4.0 * (x2 * (3.0 - (2.0 * x2))))) - 2.0)));
} else {
tmp = x1 + ((x2 * -6.0) + (x1 * ((x1 * 9.0) - 2.0)));
}
return tmp;
}
def code(x1, x2): t_0 = 3.0 * (x2 * -2.0) t_1 = x2 * ((2.0 * x2) - 3.0) tmp = 0 if x1 <= -1e+144: tmp = x1 + (x1 + (3.0 * (x1 * ((x1 * 3.0) + -1.0)))) elif x1 <= -5.1e+14: tmp = x1 + (t_0 + (x1 + (x1 * ((4.0 * t_1) + (x1 * (x1 * -22.0)))))) elif x1 <= -6.5e-285: tmp = x1 + ((x1 + (4.0 * (x1 * t_1))) + (3.0 * ((x2 * -2.0) - x1))) elif x1 <= 2.3e-239: tmp = x1 + (t_0 + (x1 - (x2 * ((x1 * (12.0 - (x1 * 6.0))) - ((x1 * x2) * 8.0))))) elif x1 <= 2.45e+144: tmp = x1 + ((x2 * -6.0) + (x1 * (((3.0 * (x1 * (3.0 - (x2 * -2.0)))) - (4.0 * (x2 * (3.0 - (2.0 * x2))))) - 2.0))) else: tmp = x1 + ((x2 * -6.0) + (x1 * ((x1 * 9.0) - 2.0))) return tmp
function code(x1, x2) t_0 = Float64(3.0 * Float64(x2 * -2.0)) t_1 = Float64(x2 * Float64(Float64(2.0 * x2) - 3.0)) tmp = 0.0 if (x1 <= -1e+144) tmp = Float64(x1 + Float64(x1 + Float64(3.0 * Float64(x1 * Float64(Float64(x1 * 3.0) + -1.0))))); elseif (x1 <= -5.1e+14) tmp = Float64(x1 + Float64(t_0 + Float64(x1 + Float64(x1 * Float64(Float64(4.0 * t_1) + Float64(x1 * Float64(x1 * -22.0))))))); elseif (x1 <= -6.5e-285) tmp = Float64(x1 + Float64(Float64(x1 + Float64(4.0 * Float64(x1 * t_1))) + Float64(3.0 * Float64(Float64(x2 * -2.0) - x1)))); elseif (x1 <= 2.3e-239) tmp = Float64(x1 + Float64(t_0 + Float64(x1 - Float64(x2 * Float64(Float64(x1 * Float64(12.0 - Float64(x1 * 6.0))) - Float64(Float64(x1 * x2) * 8.0)))))); elseif (x1 <= 2.45e+144) tmp = Float64(x1 + Float64(Float64(x2 * -6.0) + Float64(x1 * Float64(Float64(Float64(3.0 * Float64(x1 * Float64(3.0 - Float64(x2 * -2.0)))) - Float64(4.0 * Float64(x2 * Float64(3.0 - Float64(2.0 * x2))))) - 2.0)))); else tmp = Float64(x1 + Float64(Float64(x2 * -6.0) + Float64(x1 * Float64(Float64(x1 * 9.0) - 2.0)))); end return tmp end
function tmp_2 = code(x1, x2) t_0 = 3.0 * (x2 * -2.0); t_1 = x2 * ((2.0 * x2) - 3.0); tmp = 0.0; if (x1 <= -1e+144) tmp = x1 + (x1 + (3.0 * (x1 * ((x1 * 3.0) + -1.0)))); elseif (x1 <= -5.1e+14) tmp = x1 + (t_0 + (x1 + (x1 * ((4.0 * t_1) + (x1 * (x1 * -22.0)))))); elseif (x1 <= -6.5e-285) tmp = x1 + ((x1 + (4.0 * (x1 * t_1))) + (3.0 * ((x2 * -2.0) - x1))); elseif (x1 <= 2.3e-239) tmp = x1 + (t_0 + (x1 - (x2 * ((x1 * (12.0 - (x1 * 6.0))) - ((x1 * x2) * 8.0))))); elseif (x1 <= 2.45e+144) tmp = x1 + ((x2 * -6.0) + (x1 * (((3.0 * (x1 * (3.0 - (x2 * -2.0)))) - (4.0 * (x2 * (3.0 - (2.0 * x2))))) - 2.0))); else tmp = x1 + ((x2 * -6.0) + (x1 * ((x1 * 9.0) - 2.0))); end tmp_2 = tmp; end
code[x1_, x2_] := Block[{t$95$0 = N[(3.0 * N[(x2 * -2.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(x2 * N[(N[(2.0 * x2), $MachinePrecision] - 3.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x1, -1e+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, -5.1e+14], N[(x1 + N[(t$95$0 + N[(x1 + N[(x1 * N[(N[(4.0 * t$95$1), $MachinePrecision] + N[(x1 * N[(x1 * -22.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, -6.5e-285], N[(x1 + N[(N[(x1 + N[(4.0 * N[(x1 * t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(3.0 * N[(N[(x2 * -2.0), $MachinePrecision] - x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 2.3e-239], N[(x1 + N[(t$95$0 + N[(x1 - N[(x2 * N[(N[(x1 * N[(12.0 - N[(x1 * 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[(x1 * x2), $MachinePrecision] * 8.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 2.45e+144], N[(x1 + N[(N[(x2 * -6.0), $MachinePrecision] + N[(x1 * N[(N[(N[(3.0 * N[(x1 * N[(3.0 - N[(x2 * -2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(4.0 * N[(x2 * N[(3.0 - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x1 + N[(N[(x2 * -6.0), $MachinePrecision] + N[(x1 * N[(N[(x1 * 9.0), $MachinePrecision] - 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := 3 \cdot \left(x2 \cdot -2\right)\\
t_1 := x2 \cdot \left(2 \cdot x2 - 3\right)\\
\mathbf{if}\;x1 \leq -1 \cdot 10^{+144}:\\
\;\;\;\;x1 + \left(x1 + 3 \cdot \left(x1 \cdot \left(x1 \cdot 3 + -1\right)\right)\right)\\
\mathbf{elif}\;x1 \leq -5.1 \cdot 10^{+14}:\\
\;\;\;\;x1 + \left(t\_0 + \left(x1 + x1 \cdot \left(4 \cdot t\_1 + x1 \cdot \left(x1 \cdot -22\right)\right)\right)\right)\\
\mathbf{elif}\;x1 \leq -6.5 \cdot 10^{-285}:\\
\;\;\;\;x1 + \left(\left(x1 + 4 \cdot \left(x1 \cdot t\_1\right)\right) + 3 \cdot \left(x2 \cdot -2 - x1\right)\right)\\
\mathbf{elif}\;x1 \leq 2.3 \cdot 10^{-239}:\\
\;\;\;\;x1 + \left(t\_0 + \left(x1 - x2 \cdot \left(x1 \cdot \left(12 - x1 \cdot 6\right) - \left(x1 \cdot x2\right) \cdot 8\right)\right)\right)\\
\mathbf{elif}\;x1 \leq 2.45 \cdot 10^{+144}:\\
\;\;\;\;x1 + \left(x2 \cdot -6 + x1 \cdot \left(\left(3 \cdot \left(x1 \cdot \left(3 - x2 \cdot -2\right)\right) - 4 \cdot \left(x2 \cdot \left(3 - 2 \cdot x2\right)\right)\right) - 2\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x1 + \left(x2 \cdot -6 + x1 \cdot \left(x1 \cdot 9 - 2\right)\right)\\
\end{array}
\end{array}
if x1 < -1.00000000000000002e144Initial program 0.0%
Taylor expanded in x1 around 0 0.0%
Taylor expanded in x1 around 0 43.9%
Taylor expanded in x2 around 0 97.8%
if -1.00000000000000002e144 < x1 < -5.1e14Initial program 61.4%
Taylor expanded in x1 around 0 61.4%
*-commutative61.4%
Simplified61.4%
Taylor expanded in x1 around 0 30.9%
Taylor expanded in x2 around 0 50.8%
*-commutative50.8%
Simplified50.8%
if -5.1e14 < x1 < -6.5e-285Initial program 99.3%
Taylor expanded in x1 around 0 93.7%
Taylor expanded in x1 around 0 93.7%
mul-1-neg93.7%
unsub-neg93.7%
*-commutative93.7%
Simplified93.7%
if -6.5e-285 < x1 < 2.2999999999999999e-239Initial program 99.8%
Taylor expanded in x1 around 0 98.7%
*-commutative98.7%
Simplified98.7%
Taylor expanded in x1 around 0 50.5%
Taylor expanded in x2 around 0 98.7%
if 2.2999999999999999e-239 < x1 < 2.45e144Initial program 98.1%
Taylor expanded in x1 around 0 69.0%
Taylor expanded in x1 around 0 69.0%
Taylor expanded in x1 around 0 70.6%
if 2.45e144 < x1 Initial program 3.2%
Taylor expanded in x1 around 0 0.2%
Taylor expanded in x1 around 0 80.6%
Taylor expanded in x1 around 0 80.6%
Taylor expanded in x2 around 0 97.1%
*-commutative97.1%
Simplified97.1%
Final simplification84.3%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (* x2 (- 3.0 (* 2.0 x2)))))
(if (<= x1 -1e+144)
(+ x1 (+ x1 (* 3.0 (* x1 (+ (* x1 3.0) -1.0)))))
(if (<= x1 -3.8e-12)
(+
x1
(+
(* 3.0 (* x2 -2.0))
(+ x1 (* x1 (- (* x1 (* x1 -22.0)) (* 4.0 t_0))))))
(if (<= x1 1e-113)
(+
x1
(+
(*
3.0
(/ (- x1 (- (* x1 (* x1 3.0)) (* 2.0 x2))) (- -1.0 (* x1 x1))))
(+ x1 (* 4.0 (* x2 (+ (* x1 -3.0) (* 2.0 (* x1 x2))))))))
(+
x1
(+
(- x1 (* 4.0 (* x1 t_0)))
(*
3.0
(+
(* x2 -2.0)
(* x1 (- -1.0 (* x1 (- (* x2 -2.0) (+ x1 3.0))))))))))))))
double code(double x1, double x2) {
double t_0 = x2 * (3.0 - (2.0 * x2));
double tmp;
if (x1 <= -1e+144) {
tmp = x1 + (x1 + (3.0 * (x1 * ((x1 * 3.0) + -1.0))));
} else if (x1 <= -3.8e-12) {
tmp = x1 + ((3.0 * (x2 * -2.0)) + (x1 + (x1 * ((x1 * (x1 * -22.0)) - (4.0 * t_0)))));
} else if (x1 <= 1e-113) {
tmp = x1 + ((3.0 * ((x1 - ((x1 * (x1 * 3.0)) - (2.0 * x2))) / (-1.0 - (x1 * x1)))) + (x1 + (4.0 * (x2 * ((x1 * -3.0) + (2.0 * (x1 * x2)))))));
} else {
tmp = x1 + ((x1 - (4.0 * (x1 * t_0))) + (3.0 * ((x2 * -2.0) + (x1 * (-1.0 - (x1 * ((x2 * -2.0) - (x1 + 3.0))))))));
}
return tmp;
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
real(8) :: t_0
real(8) :: tmp
t_0 = x2 * (3.0d0 - (2.0d0 * x2))
if (x1 <= (-1d+144)) then
tmp = x1 + (x1 + (3.0d0 * (x1 * ((x1 * 3.0d0) + (-1.0d0)))))
else if (x1 <= (-3.8d-12)) then
tmp = x1 + ((3.0d0 * (x2 * (-2.0d0))) + (x1 + (x1 * ((x1 * (x1 * (-22.0d0))) - (4.0d0 * t_0)))))
else if (x1 <= 1d-113) then
tmp = x1 + ((3.0d0 * ((x1 - ((x1 * (x1 * 3.0d0)) - (2.0d0 * x2))) / ((-1.0d0) - (x1 * x1)))) + (x1 + (4.0d0 * (x2 * ((x1 * (-3.0d0)) + (2.0d0 * (x1 * x2)))))))
else
tmp = x1 + ((x1 - (4.0d0 * (x1 * t_0))) + (3.0d0 * ((x2 * (-2.0d0)) + (x1 * ((-1.0d0) - (x1 * ((x2 * (-2.0d0)) - (x1 + 3.0d0))))))))
end if
code = tmp
end function
public static double code(double x1, double x2) {
double t_0 = x2 * (3.0 - (2.0 * x2));
double tmp;
if (x1 <= -1e+144) {
tmp = x1 + (x1 + (3.0 * (x1 * ((x1 * 3.0) + -1.0))));
} else if (x1 <= -3.8e-12) {
tmp = x1 + ((3.0 * (x2 * -2.0)) + (x1 + (x1 * ((x1 * (x1 * -22.0)) - (4.0 * t_0)))));
} else if (x1 <= 1e-113) {
tmp = x1 + ((3.0 * ((x1 - ((x1 * (x1 * 3.0)) - (2.0 * x2))) / (-1.0 - (x1 * x1)))) + (x1 + (4.0 * (x2 * ((x1 * -3.0) + (2.0 * (x1 * x2)))))));
} else {
tmp = x1 + ((x1 - (4.0 * (x1 * t_0))) + (3.0 * ((x2 * -2.0) + (x1 * (-1.0 - (x1 * ((x2 * -2.0) - (x1 + 3.0))))))));
}
return tmp;
}
def code(x1, x2): t_0 = x2 * (3.0 - (2.0 * x2)) tmp = 0 if x1 <= -1e+144: tmp = x1 + (x1 + (3.0 * (x1 * ((x1 * 3.0) + -1.0)))) elif x1 <= -3.8e-12: tmp = x1 + ((3.0 * (x2 * -2.0)) + (x1 + (x1 * ((x1 * (x1 * -22.0)) - (4.0 * t_0))))) elif x1 <= 1e-113: tmp = x1 + ((3.0 * ((x1 - ((x1 * (x1 * 3.0)) - (2.0 * x2))) / (-1.0 - (x1 * x1)))) + (x1 + (4.0 * (x2 * ((x1 * -3.0) + (2.0 * (x1 * x2))))))) else: tmp = x1 + ((x1 - (4.0 * (x1 * t_0))) + (3.0 * ((x2 * -2.0) + (x1 * (-1.0 - (x1 * ((x2 * -2.0) - (x1 + 3.0)))))))) return tmp
function code(x1, x2) t_0 = Float64(x2 * Float64(3.0 - Float64(2.0 * x2))) tmp = 0.0 if (x1 <= -1e+144) tmp = Float64(x1 + Float64(x1 + Float64(3.0 * Float64(x1 * Float64(Float64(x1 * 3.0) + -1.0))))); elseif (x1 <= -3.8e-12) tmp = Float64(x1 + Float64(Float64(3.0 * Float64(x2 * -2.0)) + Float64(x1 + Float64(x1 * Float64(Float64(x1 * Float64(x1 * -22.0)) - Float64(4.0 * t_0)))))); elseif (x1 <= 1e-113) tmp = Float64(x1 + Float64(Float64(3.0 * Float64(Float64(x1 - Float64(Float64(x1 * Float64(x1 * 3.0)) - Float64(2.0 * x2))) / Float64(-1.0 - Float64(x1 * x1)))) + Float64(x1 + Float64(4.0 * Float64(x2 * Float64(Float64(x1 * -3.0) + Float64(2.0 * Float64(x1 * x2)))))))); else tmp = Float64(x1 + Float64(Float64(x1 - Float64(4.0 * Float64(x1 * t_0))) + Float64(3.0 * Float64(Float64(x2 * -2.0) + Float64(x1 * Float64(-1.0 - Float64(x1 * Float64(Float64(x2 * -2.0) - Float64(x1 + 3.0))))))))); end return tmp end
function tmp_2 = code(x1, x2) t_0 = x2 * (3.0 - (2.0 * x2)); tmp = 0.0; if (x1 <= -1e+144) tmp = x1 + (x1 + (3.0 * (x1 * ((x1 * 3.0) + -1.0)))); elseif (x1 <= -3.8e-12) tmp = x1 + ((3.0 * (x2 * -2.0)) + (x1 + (x1 * ((x1 * (x1 * -22.0)) - (4.0 * t_0))))); elseif (x1 <= 1e-113) tmp = x1 + ((3.0 * ((x1 - ((x1 * (x1 * 3.0)) - (2.0 * x2))) / (-1.0 - (x1 * x1)))) + (x1 + (4.0 * (x2 * ((x1 * -3.0) + (2.0 * (x1 * x2))))))); else tmp = x1 + ((x1 - (4.0 * (x1 * t_0))) + (3.0 * ((x2 * -2.0) + (x1 * (-1.0 - (x1 * ((x2 * -2.0) - (x1 + 3.0)))))))); end tmp_2 = tmp; end
code[x1_, x2_] := Block[{t$95$0 = N[(x2 * N[(3.0 - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x1, -1e+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, -3.8e-12], N[(x1 + N[(N[(3.0 * N[(x2 * -2.0), $MachinePrecision]), $MachinePrecision] + N[(x1 + N[(x1 * N[(N[(x1 * N[(x1 * -22.0), $MachinePrecision]), $MachinePrecision] - N[(4.0 * t$95$0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 1e-113], N[(x1 + N[(N[(3.0 * N[(N[(x1 - N[(N[(x1 * N[(x1 * 3.0), $MachinePrecision]), $MachinePrecision] - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(-1.0 - N[(x1 * x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(x1 + N[(4.0 * N[(x2 * N[(N[(x1 * -3.0), $MachinePrecision] + N[(2.0 * N[(x1 * x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x1 + N[(N[(x1 - N[(4.0 * N[(x1 * t$95$0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(3.0 * N[(N[(x2 * -2.0), $MachinePrecision] + N[(x1 * N[(-1.0 - N[(x1 * N[(N[(x2 * -2.0), $MachinePrecision] - N[(x1 + 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x2 \cdot \left(3 - 2 \cdot x2\right)\\
\mathbf{if}\;x1 \leq -1 \cdot 10^{+144}:\\
\;\;\;\;x1 + \left(x1 + 3 \cdot \left(x1 \cdot \left(x1 \cdot 3 + -1\right)\right)\right)\\
\mathbf{elif}\;x1 \leq -3.8 \cdot 10^{-12}:\\
\;\;\;\;x1 + \left(3 \cdot \left(x2 \cdot -2\right) + \left(x1 + x1 \cdot \left(x1 \cdot \left(x1 \cdot -22\right) - 4 \cdot t\_0\right)\right)\right)\\
\mathbf{elif}\;x1 \leq 10^{-113}:\\
\;\;\;\;x1 + \left(3 \cdot \frac{x1 - \left(x1 \cdot \left(x1 \cdot 3\right) - 2 \cdot x2\right)}{-1 - x1 \cdot x1} + \left(x1 + 4 \cdot \left(x2 \cdot \left(x1 \cdot -3 + 2 \cdot \left(x1 \cdot x2\right)\right)\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x1 + \left(\left(x1 - 4 \cdot \left(x1 \cdot t\_0\right)\right) + 3 \cdot \left(x2 \cdot -2 + x1 \cdot \left(-1 - x1 \cdot \left(x2 \cdot -2 - \left(x1 + 3\right)\right)\right)\right)\right)\\
\end{array}
\end{array}
if x1 < -1.00000000000000002e144Initial program 0.0%
Taylor expanded in x1 around 0 0.0%
Taylor expanded in x1 around 0 43.9%
Taylor expanded in x2 around 0 97.8%
if -1.00000000000000002e144 < x1 < -3.79999999999999996e-12Initial program 68.8%
Taylor expanded in x1 around 0 68.8%
*-commutative68.8%
Simplified68.8%
Taylor expanded in x1 around 0 28.8%
Taylor expanded in x2 around 0 56.8%
*-commutative56.8%
Simplified56.8%
if -3.79999999999999996e-12 < x1 < 9.99999999999999979e-114Initial program 99.5%
Taylor expanded in x1 around 0 86.5%
Taylor expanded in x2 around 0 99.5%
if 9.99999999999999979e-114 < x1 Initial program 63.5%
Taylor expanded in x1 around 0 38.5%
Taylor expanded in x1 around 0 76.9%
Final simplification87.3%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0
(+
x1
(+
(* x2 -6.0)
(*
x1
(-
(+
(* 4.0 (* x2 (- (* 2.0 x2) 3.0)))
(* x2 (+ (* x1 6.0) (* 9.0 (/ x1 x2)))))
2.0))))))
(if (<= x1 -4e+142)
(+ x1 (+ x1 (* 3.0 (* x1 (+ (* x1 3.0) -1.0)))))
(if (<= x1 -4.1e-285)
t_0
(if (<= x1 3.6e-240)
(+
x1
(+
(* 3.0 (* x2 -2.0))
(- x1 (* x2 (- (* x1 (- 12.0 (* x1 6.0))) (* (* x1 x2) 8.0))))))
(if (<= x1 2.45e+144)
t_0
(+ x1 (+ (* x2 -6.0) (* x1 (- (* x1 9.0) 2.0))))))))))
double code(double x1, double x2) {
double t_0 = x1 + ((x2 * -6.0) + (x1 * (((4.0 * (x2 * ((2.0 * x2) - 3.0))) + (x2 * ((x1 * 6.0) + (9.0 * (x1 / x2))))) - 2.0)));
double tmp;
if (x1 <= -4e+142) {
tmp = x1 + (x1 + (3.0 * (x1 * ((x1 * 3.0) + -1.0))));
} else if (x1 <= -4.1e-285) {
tmp = t_0;
} else if (x1 <= 3.6e-240) {
tmp = x1 + ((3.0 * (x2 * -2.0)) + (x1 - (x2 * ((x1 * (12.0 - (x1 * 6.0))) - ((x1 * x2) * 8.0)))));
} else if (x1 <= 2.45e+144) {
tmp = t_0;
} else {
tmp = x1 + ((x2 * -6.0) + (x1 * ((x1 * 9.0) - 2.0)));
}
return tmp;
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
real(8) :: t_0
real(8) :: tmp
t_0 = x1 + ((x2 * (-6.0d0)) + (x1 * (((4.0d0 * (x2 * ((2.0d0 * x2) - 3.0d0))) + (x2 * ((x1 * 6.0d0) + (9.0d0 * (x1 / x2))))) - 2.0d0)))
if (x1 <= (-4d+142)) then
tmp = x1 + (x1 + (3.0d0 * (x1 * ((x1 * 3.0d0) + (-1.0d0)))))
else if (x1 <= (-4.1d-285)) then
tmp = t_0
else if (x1 <= 3.6d-240) then
tmp = x1 + ((3.0d0 * (x2 * (-2.0d0))) + (x1 - (x2 * ((x1 * (12.0d0 - (x1 * 6.0d0))) - ((x1 * x2) * 8.0d0)))))
else if (x1 <= 2.45d+144) then
tmp = t_0
else
tmp = x1 + ((x2 * (-6.0d0)) + (x1 * ((x1 * 9.0d0) - 2.0d0)))
end if
code = tmp
end function
public static double code(double x1, double x2) {
double t_0 = x1 + ((x2 * -6.0) + (x1 * (((4.0 * (x2 * ((2.0 * x2) - 3.0))) + (x2 * ((x1 * 6.0) + (9.0 * (x1 / x2))))) - 2.0)));
double tmp;
if (x1 <= -4e+142) {
tmp = x1 + (x1 + (3.0 * (x1 * ((x1 * 3.0) + -1.0))));
} else if (x1 <= -4.1e-285) {
tmp = t_0;
} else if (x1 <= 3.6e-240) {
tmp = x1 + ((3.0 * (x2 * -2.0)) + (x1 - (x2 * ((x1 * (12.0 - (x1 * 6.0))) - ((x1 * x2) * 8.0)))));
} else if (x1 <= 2.45e+144) {
tmp = t_0;
} else {
tmp = x1 + ((x2 * -6.0) + (x1 * ((x1 * 9.0) - 2.0)));
}
return tmp;
}
def code(x1, x2): t_0 = x1 + ((x2 * -6.0) + (x1 * (((4.0 * (x2 * ((2.0 * x2) - 3.0))) + (x2 * ((x1 * 6.0) + (9.0 * (x1 / x2))))) - 2.0))) tmp = 0 if x1 <= -4e+142: tmp = x1 + (x1 + (3.0 * (x1 * ((x1 * 3.0) + -1.0)))) elif x1 <= -4.1e-285: tmp = t_0 elif x1 <= 3.6e-240: tmp = x1 + ((3.0 * (x2 * -2.0)) + (x1 - (x2 * ((x1 * (12.0 - (x1 * 6.0))) - ((x1 * x2) * 8.0))))) elif x1 <= 2.45e+144: tmp = t_0 else: tmp = x1 + ((x2 * -6.0) + (x1 * ((x1 * 9.0) - 2.0))) return tmp
function code(x1, x2) t_0 = Float64(x1 + Float64(Float64(x2 * -6.0) + Float64(x1 * Float64(Float64(Float64(4.0 * Float64(x2 * Float64(Float64(2.0 * x2) - 3.0))) + Float64(x2 * Float64(Float64(x1 * 6.0) + Float64(9.0 * Float64(x1 / x2))))) - 2.0)))) tmp = 0.0 if (x1 <= -4e+142) tmp = Float64(x1 + Float64(x1 + Float64(3.0 * Float64(x1 * Float64(Float64(x1 * 3.0) + -1.0))))); elseif (x1 <= -4.1e-285) tmp = t_0; elseif (x1 <= 3.6e-240) tmp = Float64(x1 + Float64(Float64(3.0 * Float64(x2 * -2.0)) + Float64(x1 - Float64(x2 * Float64(Float64(x1 * Float64(12.0 - Float64(x1 * 6.0))) - Float64(Float64(x1 * x2) * 8.0)))))); elseif (x1 <= 2.45e+144) tmp = t_0; else tmp = Float64(x1 + Float64(Float64(x2 * -6.0) + Float64(x1 * Float64(Float64(x1 * 9.0) - 2.0)))); end return tmp end
function tmp_2 = code(x1, x2) t_0 = x1 + ((x2 * -6.0) + (x1 * (((4.0 * (x2 * ((2.0 * x2) - 3.0))) + (x2 * ((x1 * 6.0) + (9.0 * (x1 / x2))))) - 2.0))); tmp = 0.0; if (x1 <= -4e+142) tmp = x1 + (x1 + (3.0 * (x1 * ((x1 * 3.0) + -1.0)))); elseif (x1 <= -4.1e-285) tmp = t_0; elseif (x1 <= 3.6e-240) tmp = x1 + ((3.0 * (x2 * -2.0)) + (x1 - (x2 * ((x1 * (12.0 - (x1 * 6.0))) - ((x1 * x2) * 8.0))))); elseif (x1 <= 2.45e+144) tmp = t_0; else tmp = x1 + ((x2 * -6.0) + (x1 * ((x1 * 9.0) - 2.0))); end tmp_2 = tmp; end
code[x1_, x2_] := Block[{t$95$0 = N[(x1 + N[(N[(x2 * -6.0), $MachinePrecision] + N[(x1 * N[(N[(N[(4.0 * N[(x2 * N[(N[(2.0 * x2), $MachinePrecision] - 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(x2 * N[(N[(x1 * 6.0), $MachinePrecision] + N[(9.0 * N[(x1 / x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x1, -4e+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, -4.1e-285], t$95$0, If[LessEqual[x1, 3.6e-240], N[(x1 + N[(N[(3.0 * N[(x2 * -2.0), $MachinePrecision]), $MachinePrecision] + N[(x1 - N[(x2 * N[(N[(x1 * N[(12.0 - N[(x1 * 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[(x1 * x2), $MachinePrecision] * 8.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 2.45e+144], t$95$0, N[(x1 + N[(N[(x2 * -6.0), $MachinePrecision] + N[(x1 * N[(N[(x1 * 9.0), $MachinePrecision] - 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x1 + \left(x2 \cdot -6 + x1 \cdot \left(\left(4 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right) + x2 \cdot \left(x1 \cdot 6 + 9 \cdot \frac{x1}{x2}\right)\right) - 2\right)\right)\\
\mathbf{if}\;x1 \leq -4 \cdot 10^{+142}:\\
\;\;\;\;x1 + \left(x1 + 3 \cdot \left(x1 \cdot \left(x1 \cdot 3 + -1\right)\right)\right)\\
\mathbf{elif}\;x1 \leq -4.1 \cdot 10^{-285}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;x1 \leq 3.6 \cdot 10^{-240}:\\
\;\;\;\;x1 + \left(3 \cdot \left(x2 \cdot -2\right) + \left(x1 - x2 \cdot \left(x1 \cdot \left(12 - x1 \cdot 6\right) - \left(x1 \cdot x2\right) \cdot 8\right)\right)\right)\\
\mathbf{elif}\;x1 \leq 2.45 \cdot 10^{+144}:\\
\;\;\;\;t\_0\\
\mathbf{else}:\\
\;\;\;\;x1 + \left(x2 \cdot -6 + x1 \cdot \left(x1 \cdot 9 - 2\right)\right)\\
\end{array}
\end{array}
if x1 < -4.0000000000000002e142Initial program 0.0%
Taylor expanded in x1 around 0 0.0%
Taylor expanded in x1 around 0 42.9%
Taylor expanded in x2 around 0 95.7%
if -4.0000000000000002e142 < x1 < -4.1e-285 or 3.5999999999999999e-240 < x1 < 2.45e144Initial program 94.6%
Taylor expanded in x1 around 0 73.2%
Taylor expanded in x1 around 0 73.5%
Taylor expanded in x1 around 0 75.1%
Taylor expanded in x2 around inf 76.2%
if -4.1e-285 < x1 < 3.5999999999999999e-240Initial program 99.8%
Taylor expanded in x1 around 0 98.7%
*-commutative98.7%
Simplified98.7%
Taylor expanded in x1 around 0 50.5%
Taylor expanded in x2 around 0 98.7%
if 2.45e144 < x1 Initial program 3.2%
Taylor expanded in x1 around 0 0.2%
Taylor expanded in x1 around 0 80.6%
Taylor expanded in x1 around 0 80.6%
Taylor expanded in x2 around 0 97.1%
*-commutative97.1%
Simplified97.1%
Final simplification83.4%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (* 3.0 (* x2 -2.0))) (t_1 (* x2 (- (* 2.0 x2) 3.0))))
(if (<= x1 -1e+144)
(+ x1 (+ x1 (* 3.0 (* x1 (+ (* x1 3.0) -1.0)))))
(if (<= x1 -5.1e+14)
(+ x1 (+ t_0 (+ x1 (* x1 (+ (* 4.0 t_1) (* x1 (* x1 -22.0)))))))
(if (<= x1 -6.5e-285)
(+ x1 (+ (+ x1 (* 4.0 (* x1 t_1))) (* 3.0 (- (* x2 -2.0) x1))))
(if (<= x1 2.8e-239)
(+
x1
(+
t_0
(- x1 (* x2 (- (* x1 (- 12.0 (* x1 6.0))) (* (* x1 x2) 8.0))))))
(+
x1
(+
(* x2 -6.0)
(*
x1
(-
(* x1 (+ (* 3.0 (- 3.0 (* x2 -2.0))) (* 4.0 (/ t_1 x1))))
2.0))))))))))
double code(double x1, double x2) {
double t_0 = 3.0 * (x2 * -2.0);
double t_1 = x2 * ((2.0 * x2) - 3.0);
double tmp;
if (x1 <= -1e+144) {
tmp = x1 + (x1 + (3.0 * (x1 * ((x1 * 3.0) + -1.0))));
} else if (x1 <= -5.1e+14) {
tmp = x1 + (t_0 + (x1 + (x1 * ((4.0 * t_1) + (x1 * (x1 * -22.0))))));
} else if (x1 <= -6.5e-285) {
tmp = x1 + ((x1 + (4.0 * (x1 * t_1))) + (3.0 * ((x2 * -2.0) - x1)));
} else if (x1 <= 2.8e-239) {
tmp = x1 + (t_0 + (x1 - (x2 * ((x1 * (12.0 - (x1 * 6.0))) - ((x1 * x2) * 8.0)))));
} else {
tmp = x1 + ((x2 * -6.0) + (x1 * ((x1 * ((3.0 * (3.0 - (x2 * -2.0))) + (4.0 * (t_1 / x1)))) - 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) :: tmp
t_0 = 3.0d0 * (x2 * (-2.0d0))
t_1 = x2 * ((2.0d0 * x2) - 3.0d0)
if (x1 <= (-1d+144)) then
tmp = x1 + (x1 + (3.0d0 * (x1 * ((x1 * 3.0d0) + (-1.0d0)))))
else if (x1 <= (-5.1d+14)) then
tmp = x1 + (t_0 + (x1 + (x1 * ((4.0d0 * t_1) + (x1 * (x1 * (-22.0d0)))))))
else if (x1 <= (-6.5d-285)) then
tmp = x1 + ((x1 + (4.0d0 * (x1 * t_1))) + (3.0d0 * ((x2 * (-2.0d0)) - x1)))
else if (x1 <= 2.8d-239) then
tmp = x1 + (t_0 + (x1 - (x2 * ((x1 * (12.0d0 - (x1 * 6.0d0))) - ((x1 * x2) * 8.0d0)))))
else
tmp = x1 + ((x2 * (-6.0d0)) + (x1 * ((x1 * ((3.0d0 * (3.0d0 - (x2 * (-2.0d0)))) + (4.0d0 * (t_1 / x1)))) - 2.0d0)))
end if
code = tmp
end function
public static double code(double x1, double x2) {
double t_0 = 3.0 * (x2 * -2.0);
double t_1 = x2 * ((2.0 * x2) - 3.0);
double tmp;
if (x1 <= -1e+144) {
tmp = x1 + (x1 + (3.0 * (x1 * ((x1 * 3.0) + -1.0))));
} else if (x1 <= -5.1e+14) {
tmp = x1 + (t_0 + (x1 + (x1 * ((4.0 * t_1) + (x1 * (x1 * -22.0))))));
} else if (x1 <= -6.5e-285) {
tmp = x1 + ((x1 + (4.0 * (x1 * t_1))) + (3.0 * ((x2 * -2.0) - x1)));
} else if (x1 <= 2.8e-239) {
tmp = x1 + (t_0 + (x1 - (x2 * ((x1 * (12.0 - (x1 * 6.0))) - ((x1 * x2) * 8.0)))));
} else {
tmp = x1 + ((x2 * -6.0) + (x1 * ((x1 * ((3.0 * (3.0 - (x2 * -2.0))) + (4.0 * (t_1 / x1)))) - 2.0)));
}
return tmp;
}
def code(x1, x2): t_0 = 3.0 * (x2 * -2.0) t_1 = x2 * ((2.0 * x2) - 3.0) tmp = 0 if x1 <= -1e+144: tmp = x1 + (x1 + (3.0 * (x1 * ((x1 * 3.0) + -1.0)))) elif x1 <= -5.1e+14: tmp = x1 + (t_0 + (x1 + (x1 * ((4.0 * t_1) + (x1 * (x1 * -22.0)))))) elif x1 <= -6.5e-285: tmp = x1 + ((x1 + (4.0 * (x1 * t_1))) + (3.0 * ((x2 * -2.0) - x1))) elif x1 <= 2.8e-239: tmp = x1 + (t_0 + (x1 - (x2 * ((x1 * (12.0 - (x1 * 6.0))) - ((x1 * x2) * 8.0))))) else: tmp = x1 + ((x2 * -6.0) + (x1 * ((x1 * ((3.0 * (3.0 - (x2 * -2.0))) + (4.0 * (t_1 / x1)))) - 2.0))) return tmp
function code(x1, x2) t_0 = Float64(3.0 * Float64(x2 * -2.0)) t_1 = Float64(x2 * Float64(Float64(2.0 * x2) - 3.0)) tmp = 0.0 if (x1 <= -1e+144) tmp = Float64(x1 + Float64(x1 + Float64(3.0 * Float64(x1 * Float64(Float64(x1 * 3.0) + -1.0))))); elseif (x1 <= -5.1e+14) tmp = Float64(x1 + Float64(t_0 + Float64(x1 + Float64(x1 * Float64(Float64(4.0 * t_1) + Float64(x1 * Float64(x1 * -22.0))))))); elseif (x1 <= -6.5e-285) tmp = Float64(x1 + Float64(Float64(x1 + Float64(4.0 * Float64(x1 * t_1))) + Float64(3.0 * Float64(Float64(x2 * -2.0) - x1)))); elseif (x1 <= 2.8e-239) tmp = Float64(x1 + Float64(t_0 + Float64(x1 - Float64(x2 * Float64(Float64(x1 * Float64(12.0 - Float64(x1 * 6.0))) - Float64(Float64(x1 * x2) * 8.0)))))); else tmp = Float64(x1 + Float64(Float64(x2 * -6.0) + Float64(x1 * Float64(Float64(x1 * Float64(Float64(3.0 * Float64(3.0 - Float64(x2 * -2.0))) + Float64(4.0 * Float64(t_1 / x1)))) - 2.0)))); end return tmp end
function tmp_2 = code(x1, x2) t_0 = 3.0 * (x2 * -2.0); t_1 = x2 * ((2.0 * x2) - 3.0); tmp = 0.0; if (x1 <= -1e+144) tmp = x1 + (x1 + (3.0 * (x1 * ((x1 * 3.0) + -1.0)))); elseif (x1 <= -5.1e+14) tmp = x1 + (t_0 + (x1 + (x1 * ((4.0 * t_1) + (x1 * (x1 * -22.0)))))); elseif (x1 <= -6.5e-285) tmp = x1 + ((x1 + (4.0 * (x1 * t_1))) + (3.0 * ((x2 * -2.0) - x1))); elseif (x1 <= 2.8e-239) tmp = x1 + (t_0 + (x1 - (x2 * ((x1 * (12.0 - (x1 * 6.0))) - ((x1 * x2) * 8.0))))); else tmp = x1 + ((x2 * -6.0) + (x1 * ((x1 * ((3.0 * (3.0 - (x2 * -2.0))) + (4.0 * (t_1 / x1)))) - 2.0))); end tmp_2 = tmp; end
code[x1_, x2_] := Block[{t$95$0 = N[(3.0 * N[(x2 * -2.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(x2 * N[(N[(2.0 * x2), $MachinePrecision] - 3.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x1, -1e+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, -5.1e+14], N[(x1 + N[(t$95$0 + N[(x1 + N[(x1 * N[(N[(4.0 * t$95$1), $MachinePrecision] + N[(x1 * N[(x1 * -22.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, -6.5e-285], N[(x1 + N[(N[(x1 + N[(4.0 * N[(x1 * t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(3.0 * N[(N[(x2 * -2.0), $MachinePrecision] - x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 2.8e-239], N[(x1 + N[(t$95$0 + N[(x1 - N[(x2 * N[(N[(x1 * N[(12.0 - N[(x1 * 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[(x1 * x2), $MachinePrecision] * 8.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x1 + N[(N[(x2 * -6.0), $MachinePrecision] + N[(x1 * N[(N[(x1 * N[(N[(3.0 * N[(3.0 - N[(x2 * -2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(4.0 * N[(t$95$1 / x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := 3 \cdot \left(x2 \cdot -2\right)\\
t_1 := x2 \cdot \left(2 \cdot x2 - 3\right)\\
\mathbf{if}\;x1 \leq -1 \cdot 10^{+144}:\\
\;\;\;\;x1 + \left(x1 + 3 \cdot \left(x1 \cdot \left(x1 \cdot 3 + -1\right)\right)\right)\\
\mathbf{elif}\;x1 \leq -5.1 \cdot 10^{+14}:\\
\;\;\;\;x1 + \left(t\_0 + \left(x1 + x1 \cdot \left(4 \cdot t\_1 + x1 \cdot \left(x1 \cdot -22\right)\right)\right)\right)\\
\mathbf{elif}\;x1 \leq -6.5 \cdot 10^{-285}:\\
\;\;\;\;x1 + \left(\left(x1 + 4 \cdot \left(x1 \cdot t\_1\right)\right) + 3 \cdot \left(x2 \cdot -2 - x1\right)\right)\\
\mathbf{elif}\;x1 \leq 2.8 \cdot 10^{-239}:\\
\;\;\;\;x1 + \left(t\_0 + \left(x1 - x2 \cdot \left(x1 \cdot \left(12 - x1 \cdot 6\right) - \left(x1 \cdot x2\right) \cdot 8\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x1 + \left(x2 \cdot -6 + x1 \cdot \left(x1 \cdot \left(3 \cdot \left(3 - x2 \cdot -2\right) + 4 \cdot \frac{t\_1}{x1}\right) - 2\right)\right)\\
\end{array}
\end{array}
if x1 < -1.00000000000000002e144Initial program 0.0%
Taylor expanded in x1 around 0 0.0%
Taylor expanded in x1 around 0 43.9%
Taylor expanded in x2 around 0 97.8%
if -1.00000000000000002e144 < x1 < -5.1e14Initial program 61.4%
Taylor expanded in x1 around 0 61.4%
*-commutative61.4%
Simplified61.4%
Taylor expanded in x1 around 0 30.9%
Taylor expanded in x2 around 0 50.8%
*-commutative50.8%
Simplified50.8%
if -5.1e14 < x1 < -6.5e-285Initial program 99.3%
Taylor expanded in x1 around 0 93.7%
Taylor expanded in x1 around 0 93.7%
mul-1-neg93.7%
unsub-neg93.7%
*-commutative93.7%
Simplified93.7%
if -6.5e-285 < x1 < 2.80000000000000013e-239Initial program 99.8%
Taylor expanded in x1 around 0 98.7%
*-commutative98.7%
Simplified98.7%
Taylor expanded in x1 around 0 50.5%
Taylor expanded in x2 around 0 98.7%
if 2.80000000000000013e-239 < x1 Initial program 71.6%
Taylor expanded in x1 around 0 49.8%
Taylor expanded in x1 around 0 72.3%
Taylor expanded in x1 around 0 73.4%
Taylor expanded in x1 around inf 75.2%
Final simplification83.1%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (* x2 (- (* 2.0 x2) 3.0))))
(if (<= x1 -4e+142)
(+ x1 (+ x1 (* 3.0 (* x1 (+ (* x1 3.0) -1.0)))))
(if (<= x1 -6.2e-285)
(+
x1
(+
(* x2 -6.0)
(*
x1
(- (+ (* 4.0 t_0) (* x2 (+ (* x1 6.0) (* 9.0 (/ x1 x2))))) 2.0))))
(if (<= x1 2.8e-239)
(+
x1
(+
(* 3.0 (* x2 -2.0))
(- x1 (* x2 (- (* x1 (- 12.0 (* x1 6.0))) (* (* x1 x2) 8.0))))))
(+
x1
(+
(+ x1 (* 4.0 (* x1 t_0)))
(*
3.0
(+
(* x2 -2.0)
(* x1 (+ -1.0 (* x1 (- (+ x1 3.0) (* x2 -2.0))))))))))))))
double code(double x1, double x2) {
double t_0 = x2 * ((2.0 * x2) - 3.0);
double tmp;
if (x1 <= -4e+142) {
tmp = x1 + (x1 + (3.0 * (x1 * ((x1 * 3.0) + -1.0))));
} else if (x1 <= -6.2e-285) {
tmp = x1 + ((x2 * -6.0) + (x1 * (((4.0 * t_0) + (x2 * ((x1 * 6.0) + (9.0 * (x1 / x2))))) - 2.0)));
} else if (x1 <= 2.8e-239) {
tmp = x1 + ((3.0 * (x2 * -2.0)) + (x1 - (x2 * ((x1 * (12.0 - (x1 * 6.0))) - ((x1 * x2) * 8.0)))));
} else {
tmp = x1 + ((x1 + (4.0 * (x1 * t_0))) + (3.0 * ((x2 * -2.0) + (x1 * (-1.0 + (x1 * ((x1 + 3.0) - (x2 * -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) :: tmp
t_0 = x2 * ((2.0d0 * x2) - 3.0d0)
if (x1 <= (-4d+142)) then
tmp = x1 + (x1 + (3.0d0 * (x1 * ((x1 * 3.0d0) + (-1.0d0)))))
else if (x1 <= (-6.2d-285)) then
tmp = x1 + ((x2 * (-6.0d0)) + (x1 * (((4.0d0 * t_0) + (x2 * ((x1 * 6.0d0) + (9.0d0 * (x1 / x2))))) - 2.0d0)))
else if (x1 <= 2.8d-239) then
tmp = x1 + ((3.0d0 * (x2 * (-2.0d0))) + (x1 - (x2 * ((x1 * (12.0d0 - (x1 * 6.0d0))) - ((x1 * x2) * 8.0d0)))))
else
tmp = x1 + ((x1 + (4.0d0 * (x1 * t_0))) + (3.0d0 * ((x2 * (-2.0d0)) + (x1 * ((-1.0d0) + (x1 * ((x1 + 3.0d0) - (x2 * (-2.0d0)))))))))
end if
code = tmp
end function
public static double code(double x1, double x2) {
double t_0 = x2 * ((2.0 * x2) - 3.0);
double tmp;
if (x1 <= -4e+142) {
tmp = x1 + (x1 + (3.0 * (x1 * ((x1 * 3.0) + -1.0))));
} else if (x1 <= -6.2e-285) {
tmp = x1 + ((x2 * -6.0) + (x1 * (((4.0 * t_0) + (x2 * ((x1 * 6.0) + (9.0 * (x1 / x2))))) - 2.0)));
} else if (x1 <= 2.8e-239) {
tmp = x1 + ((3.0 * (x2 * -2.0)) + (x1 - (x2 * ((x1 * (12.0 - (x1 * 6.0))) - ((x1 * x2) * 8.0)))));
} else {
tmp = x1 + ((x1 + (4.0 * (x1 * t_0))) + (3.0 * ((x2 * -2.0) + (x1 * (-1.0 + (x1 * ((x1 + 3.0) - (x2 * -2.0))))))));
}
return tmp;
}
def code(x1, x2): t_0 = x2 * ((2.0 * x2) - 3.0) tmp = 0 if x1 <= -4e+142: tmp = x1 + (x1 + (3.0 * (x1 * ((x1 * 3.0) + -1.0)))) elif x1 <= -6.2e-285: tmp = x1 + ((x2 * -6.0) + (x1 * (((4.0 * t_0) + (x2 * ((x1 * 6.0) + (9.0 * (x1 / x2))))) - 2.0))) elif x1 <= 2.8e-239: tmp = x1 + ((3.0 * (x2 * -2.0)) + (x1 - (x2 * ((x1 * (12.0 - (x1 * 6.0))) - ((x1 * x2) * 8.0))))) else: tmp = x1 + ((x1 + (4.0 * (x1 * t_0))) + (3.0 * ((x2 * -2.0) + (x1 * (-1.0 + (x1 * ((x1 + 3.0) - (x2 * -2.0)))))))) return tmp
function code(x1, x2) t_0 = Float64(x2 * Float64(Float64(2.0 * x2) - 3.0)) tmp = 0.0 if (x1 <= -4e+142) tmp = Float64(x1 + Float64(x1 + Float64(3.0 * Float64(x1 * Float64(Float64(x1 * 3.0) + -1.0))))); elseif (x1 <= -6.2e-285) tmp = Float64(x1 + Float64(Float64(x2 * -6.0) + Float64(x1 * Float64(Float64(Float64(4.0 * t_0) + Float64(x2 * Float64(Float64(x1 * 6.0) + Float64(9.0 * Float64(x1 / x2))))) - 2.0)))); elseif (x1 <= 2.8e-239) tmp = Float64(x1 + Float64(Float64(3.0 * Float64(x2 * -2.0)) + Float64(x1 - Float64(x2 * Float64(Float64(x1 * Float64(12.0 - Float64(x1 * 6.0))) - Float64(Float64(x1 * x2) * 8.0)))))); else tmp = Float64(x1 + Float64(Float64(x1 + Float64(4.0 * Float64(x1 * t_0))) + Float64(3.0 * Float64(Float64(x2 * -2.0) + Float64(x1 * Float64(-1.0 + Float64(x1 * Float64(Float64(x1 + 3.0) - Float64(x2 * -2.0))))))))); end return tmp end
function tmp_2 = code(x1, x2) t_0 = x2 * ((2.0 * x2) - 3.0); tmp = 0.0; if (x1 <= -4e+142) tmp = x1 + (x1 + (3.0 * (x1 * ((x1 * 3.0) + -1.0)))); elseif (x1 <= -6.2e-285) tmp = x1 + ((x2 * -6.0) + (x1 * (((4.0 * t_0) + (x2 * ((x1 * 6.0) + (9.0 * (x1 / x2))))) - 2.0))); elseif (x1 <= 2.8e-239) tmp = x1 + ((3.0 * (x2 * -2.0)) + (x1 - (x2 * ((x1 * (12.0 - (x1 * 6.0))) - ((x1 * x2) * 8.0))))); else tmp = x1 + ((x1 + (4.0 * (x1 * t_0))) + (3.0 * ((x2 * -2.0) + (x1 * (-1.0 + (x1 * ((x1 + 3.0) - (x2 * -2.0)))))))); end tmp_2 = tmp; end
code[x1_, x2_] := Block[{t$95$0 = N[(x2 * N[(N[(2.0 * x2), $MachinePrecision] - 3.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x1, -4e+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, -6.2e-285], N[(x1 + N[(N[(x2 * -6.0), $MachinePrecision] + N[(x1 * N[(N[(N[(4.0 * t$95$0), $MachinePrecision] + N[(x2 * N[(N[(x1 * 6.0), $MachinePrecision] + N[(9.0 * N[(x1 / x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 2.8e-239], N[(x1 + N[(N[(3.0 * N[(x2 * -2.0), $MachinePrecision]), $MachinePrecision] + N[(x1 - N[(x2 * N[(N[(x1 * N[(12.0 - N[(x1 * 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[(x1 * x2), $MachinePrecision] * 8.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x1 + N[(N[(x1 + N[(4.0 * N[(x1 * t$95$0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(3.0 * N[(N[(x2 * -2.0), $MachinePrecision] + N[(x1 * N[(-1.0 + N[(x1 * N[(N[(x1 + 3.0), $MachinePrecision] - N[(x2 * -2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x2 \cdot \left(2 \cdot x2 - 3\right)\\
\mathbf{if}\;x1 \leq -4 \cdot 10^{+142}:\\
\;\;\;\;x1 + \left(x1 + 3 \cdot \left(x1 \cdot \left(x1 \cdot 3 + -1\right)\right)\right)\\
\mathbf{elif}\;x1 \leq -6.2 \cdot 10^{-285}:\\
\;\;\;\;x1 + \left(x2 \cdot -6 + x1 \cdot \left(\left(4 \cdot t\_0 + x2 \cdot \left(x1 \cdot 6 + 9 \cdot \frac{x1}{x2}\right)\right) - 2\right)\right)\\
\mathbf{elif}\;x1 \leq 2.8 \cdot 10^{-239}:\\
\;\;\;\;x1 + \left(3 \cdot \left(x2 \cdot -2\right) + \left(x1 - x2 \cdot \left(x1 \cdot \left(12 - x1 \cdot 6\right) - \left(x1 \cdot x2\right) \cdot 8\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x1 + \left(\left(x1 + 4 \cdot \left(x1 \cdot t\_0\right)\right) + 3 \cdot \left(x2 \cdot -2 + x1 \cdot \left(-1 + x1 \cdot \left(\left(x1 + 3\right) - x2 \cdot -2\right)\right)\right)\right)\\
\end{array}
\end{array}
if x1 < -4.0000000000000002e142Initial program 0.0%
Taylor expanded in x1 around 0 0.0%
Taylor expanded in x1 around 0 42.9%
Taylor expanded in x2 around 0 95.7%
if -4.0000000000000002e142 < x1 < -6.2000000000000002e-285Initial program 91.3%
Taylor expanded in x1 around 0 77.1%
Taylor expanded in x1 around 0 77.7%
Taylor expanded in x1 around 0 79.3%
Taylor expanded in x2 around inf 80.4%
if -6.2000000000000002e-285 < x1 < 2.80000000000000013e-239Initial program 99.8%
Taylor expanded in x1 around 0 98.7%
*-commutative98.7%
Simplified98.7%
Taylor expanded in x1 around 0 50.5%
Taylor expanded in x2 around 0 98.7%
if 2.80000000000000013e-239 < x1 Initial program 71.6%
Taylor expanded in x1 around 0 49.8%
Taylor expanded in x1 around 0 79.5%
Final simplification83.6%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (* 3.0 (* x2 -2.0)))
(t_1 (* x2 (- (* 2.0 x2) 3.0)))
(t_2 (* 4.0 t_1)))
(if (<= x1 -1e+144)
(+ x1 (+ x1 (* 3.0 (* x1 (+ (* x1 3.0) -1.0)))))
(if (<= x1 -5.1e+14)
(+ x1 (+ t_0 (+ x1 (* x1 (+ t_2 (* x1 (* x1 -22.0)))))))
(if (<= x1 -6.4e-285)
(+ x1 (+ (+ x1 (* 4.0 (* x1 t_1))) (* 3.0 (- (* x2 -2.0) x1))))
(if (<= x1 1.85e-239)
(+
x1
(+
t_0
(- x1 (* x2 (- (* x1 (- 12.0 (* x1 6.0))) (* (* x1 x2) 8.0))))))
(if (<= x1 2.45e+144)
(+ x1 (+ (* x2 -6.0) (* x1 (- t_2 2.0))))
(+ x1 (+ (* x2 -6.0) (* x1 (- (* x1 9.0) 2.0)))))))))))
double code(double x1, double x2) {
double t_0 = 3.0 * (x2 * -2.0);
double t_1 = x2 * ((2.0 * x2) - 3.0);
double t_2 = 4.0 * t_1;
double tmp;
if (x1 <= -1e+144) {
tmp = x1 + (x1 + (3.0 * (x1 * ((x1 * 3.0) + -1.0))));
} else if (x1 <= -5.1e+14) {
tmp = x1 + (t_0 + (x1 + (x1 * (t_2 + (x1 * (x1 * -22.0))))));
} else if (x1 <= -6.4e-285) {
tmp = x1 + ((x1 + (4.0 * (x1 * t_1))) + (3.0 * ((x2 * -2.0) - x1)));
} else if (x1 <= 1.85e-239) {
tmp = x1 + (t_0 + (x1 - (x2 * ((x1 * (12.0 - (x1 * 6.0))) - ((x1 * x2) * 8.0)))));
} else if (x1 <= 2.45e+144) {
tmp = x1 + ((x2 * -6.0) + (x1 * (t_2 - 2.0)));
} else {
tmp = x1 + ((x2 * -6.0) + (x1 * ((x1 * 9.0) - 2.0)));
}
return tmp;
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
real(8) :: t_0
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_0 = 3.0d0 * (x2 * (-2.0d0))
t_1 = x2 * ((2.0d0 * x2) - 3.0d0)
t_2 = 4.0d0 * t_1
if (x1 <= (-1d+144)) then
tmp = x1 + (x1 + (3.0d0 * (x1 * ((x1 * 3.0d0) + (-1.0d0)))))
else if (x1 <= (-5.1d+14)) then
tmp = x1 + (t_0 + (x1 + (x1 * (t_2 + (x1 * (x1 * (-22.0d0)))))))
else if (x1 <= (-6.4d-285)) then
tmp = x1 + ((x1 + (4.0d0 * (x1 * t_1))) + (3.0d0 * ((x2 * (-2.0d0)) - x1)))
else if (x1 <= 1.85d-239) then
tmp = x1 + (t_0 + (x1 - (x2 * ((x1 * (12.0d0 - (x1 * 6.0d0))) - ((x1 * x2) * 8.0d0)))))
else if (x1 <= 2.45d+144) then
tmp = x1 + ((x2 * (-6.0d0)) + (x1 * (t_2 - 2.0d0)))
else
tmp = x1 + ((x2 * (-6.0d0)) + (x1 * ((x1 * 9.0d0) - 2.0d0)))
end if
code = tmp
end function
public static double code(double x1, double x2) {
double t_0 = 3.0 * (x2 * -2.0);
double t_1 = x2 * ((2.0 * x2) - 3.0);
double t_2 = 4.0 * t_1;
double tmp;
if (x1 <= -1e+144) {
tmp = x1 + (x1 + (3.0 * (x1 * ((x1 * 3.0) + -1.0))));
} else if (x1 <= -5.1e+14) {
tmp = x1 + (t_0 + (x1 + (x1 * (t_2 + (x1 * (x1 * -22.0))))));
} else if (x1 <= -6.4e-285) {
tmp = x1 + ((x1 + (4.0 * (x1 * t_1))) + (3.0 * ((x2 * -2.0) - x1)));
} else if (x1 <= 1.85e-239) {
tmp = x1 + (t_0 + (x1 - (x2 * ((x1 * (12.0 - (x1 * 6.0))) - ((x1 * x2) * 8.0)))));
} else if (x1 <= 2.45e+144) {
tmp = x1 + ((x2 * -6.0) + (x1 * (t_2 - 2.0)));
} else {
tmp = x1 + ((x2 * -6.0) + (x1 * ((x1 * 9.0) - 2.0)));
}
return tmp;
}
def code(x1, x2): t_0 = 3.0 * (x2 * -2.0) t_1 = x2 * ((2.0 * x2) - 3.0) t_2 = 4.0 * t_1 tmp = 0 if x1 <= -1e+144: tmp = x1 + (x1 + (3.0 * (x1 * ((x1 * 3.0) + -1.0)))) elif x1 <= -5.1e+14: tmp = x1 + (t_0 + (x1 + (x1 * (t_2 + (x1 * (x1 * -22.0)))))) elif x1 <= -6.4e-285: tmp = x1 + ((x1 + (4.0 * (x1 * t_1))) + (3.0 * ((x2 * -2.0) - x1))) elif x1 <= 1.85e-239: tmp = x1 + (t_0 + (x1 - (x2 * ((x1 * (12.0 - (x1 * 6.0))) - ((x1 * x2) * 8.0))))) elif x1 <= 2.45e+144: tmp = x1 + ((x2 * -6.0) + (x1 * (t_2 - 2.0))) else: tmp = x1 + ((x2 * -6.0) + (x1 * ((x1 * 9.0) - 2.0))) return tmp
function code(x1, x2) t_0 = Float64(3.0 * Float64(x2 * -2.0)) t_1 = Float64(x2 * Float64(Float64(2.0 * x2) - 3.0)) t_2 = Float64(4.0 * t_1) tmp = 0.0 if (x1 <= -1e+144) tmp = Float64(x1 + Float64(x1 + Float64(3.0 * Float64(x1 * Float64(Float64(x1 * 3.0) + -1.0))))); elseif (x1 <= -5.1e+14) tmp = Float64(x1 + Float64(t_0 + Float64(x1 + Float64(x1 * Float64(t_2 + Float64(x1 * Float64(x1 * -22.0))))))); elseif (x1 <= -6.4e-285) tmp = Float64(x1 + Float64(Float64(x1 + Float64(4.0 * Float64(x1 * t_1))) + Float64(3.0 * Float64(Float64(x2 * -2.0) - x1)))); elseif (x1 <= 1.85e-239) tmp = Float64(x1 + Float64(t_0 + Float64(x1 - Float64(x2 * Float64(Float64(x1 * Float64(12.0 - Float64(x1 * 6.0))) - Float64(Float64(x1 * x2) * 8.0)))))); elseif (x1 <= 2.45e+144) tmp = Float64(x1 + Float64(Float64(x2 * -6.0) + Float64(x1 * Float64(t_2 - 2.0)))); else tmp = Float64(x1 + Float64(Float64(x2 * -6.0) + Float64(x1 * Float64(Float64(x1 * 9.0) - 2.0)))); end return tmp end
function tmp_2 = code(x1, x2) t_0 = 3.0 * (x2 * -2.0); t_1 = x2 * ((2.0 * x2) - 3.0); t_2 = 4.0 * t_1; tmp = 0.0; if (x1 <= -1e+144) tmp = x1 + (x1 + (3.0 * (x1 * ((x1 * 3.0) + -1.0)))); elseif (x1 <= -5.1e+14) tmp = x1 + (t_0 + (x1 + (x1 * (t_2 + (x1 * (x1 * -22.0)))))); elseif (x1 <= -6.4e-285) tmp = x1 + ((x1 + (4.0 * (x1 * t_1))) + (3.0 * ((x2 * -2.0) - x1))); elseif (x1 <= 1.85e-239) tmp = x1 + (t_0 + (x1 - (x2 * ((x1 * (12.0 - (x1 * 6.0))) - ((x1 * x2) * 8.0))))); elseif (x1 <= 2.45e+144) tmp = x1 + ((x2 * -6.0) + (x1 * (t_2 - 2.0))); else tmp = x1 + ((x2 * -6.0) + (x1 * ((x1 * 9.0) - 2.0))); end tmp_2 = tmp; end
code[x1_, x2_] := Block[{t$95$0 = N[(3.0 * N[(x2 * -2.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(x2 * N[(N[(2.0 * x2), $MachinePrecision] - 3.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(4.0 * t$95$1), $MachinePrecision]}, If[LessEqual[x1, -1e+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, -5.1e+14], N[(x1 + N[(t$95$0 + N[(x1 + N[(x1 * N[(t$95$2 + N[(x1 * N[(x1 * -22.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, -6.4e-285], N[(x1 + N[(N[(x1 + N[(4.0 * N[(x1 * t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(3.0 * N[(N[(x2 * -2.0), $MachinePrecision] - x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 1.85e-239], N[(x1 + N[(t$95$0 + N[(x1 - N[(x2 * N[(N[(x1 * N[(12.0 - N[(x1 * 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[(x1 * x2), $MachinePrecision] * 8.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 2.45e+144], N[(x1 + N[(N[(x2 * -6.0), $MachinePrecision] + N[(x1 * N[(t$95$2 - 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x1 + N[(N[(x2 * -6.0), $MachinePrecision] + N[(x1 * N[(N[(x1 * 9.0), $MachinePrecision] - 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := 3 \cdot \left(x2 \cdot -2\right)\\
t_1 := x2 \cdot \left(2 \cdot x2 - 3\right)\\
t_2 := 4 \cdot t\_1\\
\mathbf{if}\;x1 \leq -1 \cdot 10^{+144}:\\
\;\;\;\;x1 + \left(x1 + 3 \cdot \left(x1 \cdot \left(x1 \cdot 3 + -1\right)\right)\right)\\
\mathbf{elif}\;x1 \leq -5.1 \cdot 10^{+14}:\\
\;\;\;\;x1 + \left(t\_0 + \left(x1 + x1 \cdot \left(t\_2 + x1 \cdot \left(x1 \cdot -22\right)\right)\right)\right)\\
\mathbf{elif}\;x1 \leq -6.4 \cdot 10^{-285}:\\
\;\;\;\;x1 + \left(\left(x1 + 4 \cdot \left(x1 \cdot t\_1\right)\right) + 3 \cdot \left(x2 \cdot -2 - x1\right)\right)\\
\mathbf{elif}\;x1 \leq 1.85 \cdot 10^{-239}:\\
\;\;\;\;x1 + \left(t\_0 + \left(x1 - x2 \cdot \left(x1 \cdot \left(12 - x1 \cdot 6\right) - \left(x1 \cdot x2\right) \cdot 8\right)\right)\right)\\
\mathbf{elif}\;x1 \leq 2.45 \cdot 10^{+144}:\\
\;\;\;\;x1 + \left(x2 \cdot -6 + x1 \cdot \left(t\_2 - 2\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x1 + \left(x2 \cdot -6 + x1 \cdot \left(x1 \cdot 9 - 2\right)\right)\\
\end{array}
\end{array}
if x1 < -1.00000000000000002e144Initial program 0.0%
Taylor expanded in x1 around 0 0.0%
Taylor expanded in x1 around 0 43.9%
Taylor expanded in x2 around 0 97.8%
if -1.00000000000000002e144 < x1 < -5.1e14Initial program 61.4%
Taylor expanded in x1 around 0 61.4%
*-commutative61.4%
Simplified61.4%
Taylor expanded in x1 around 0 30.9%
Taylor expanded in x2 around 0 50.8%
*-commutative50.8%
Simplified50.8%
if -5.1e14 < x1 < -6.40000000000000032e-285Initial program 99.3%
Taylor expanded in x1 around 0 93.7%
Taylor expanded in x1 around 0 93.7%
mul-1-neg93.7%
unsub-neg93.7%
*-commutative93.7%
Simplified93.7%
if -6.40000000000000032e-285 < x1 < 1.85000000000000008e-239Initial program 99.8%
Taylor expanded in x1 around 0 98.7%
*-commutative98.7%
Simplified98.7%
Taylor expanded in x1 around 0 50.5%
Taylor expanded in x2 around 0 98.7%
if 1.85000000000000008e-239 < x1 < 2.45e144Initial program 98.1%
Taylor expanded in x1 around 0 69.0%
Taylor expanded in x1 around 0 69.0%
Taylor expanded in x1 around 0 67.9%
if 2.45e144 < x1 Initial program 3.2%
Taylor expanded in x1 around 0 0.2%
Taylor expanded in x1 around 0 80.6%
Taylor expanded in x1 around 0 80.6%
Taylor expanded in x2 around 0 97.1%
*-commutative97.1%
Simplified97.1%
Final simplification83.5%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (* x2 (- (* 2.0 x2) 3.0))))
(if (<= x1 -4.4e+153)
(+ x1 (+ x1 (* 3.0 (* x1 (+ (* x1 3.0) -1.0)))))
(if (<= x1 -2.4e+64)
(+ x1 (+ (* x2 -6.0) (* x1 (- (* x1 (+ 9.0 (* x2 6.0))) 2.0))))
(if (<= x1 -6.5e-285)
(+ x1 (+ (+ x1 (* 4.0 (* x1 t_0))) (* 3.0 (- (* x2 -2.0) x1))))
(if (<= x1 2.6e-239)
(+
x1
(+
(* 3.0 (* x2 -2.0))
(- x1 (* x2 (- (* x1 (- 12.0 (* x1 6.0))) (* (* x1 x2) 8.0))))))
(if (<= x1 2.45e+144)
(+ x1 (+ (* x2 -6.0) (* x1 (- (* 4.0 t_0) 2.0))))
(+ x1 (+ (* x2 -6.0) (* x1 (- (* x1 9.0) 2.0)))))))))))
double code(double x1, double x2) {
double t_0 = x2 * ((2.0 * x2) - 3.0);
double tmp;
if (x1 <= -4.4e+153) {
tmp = x1 + (x1 + (3.0 * (x1 * ((x1 * 3.0) + -1.0))));
} else if (x1 <= -2.4e+64) {
tmp = x1 + ((x2 * -6.0) + (x1 * ((x1 * (9.0 + (x2 * 6.0))) - 2.0)));
} else if (x1 <= -6.5e-285) {
tmp = x1 + ((x1 + (4.0 * (x1 * t_0))) + (3.0 * ((x2 * -2.0) - x1)));
} else if (x1 <= 2.6e-239) {
tmp = x1 + ((3.0 * (x2 * -2.0)) + (x1 - (x2 * ((x1 * (12.0 - (x1 * 6.0))) - ((x1 * x2) * 8.0)))));
} else if (x1 <= 2.45e+144) {
tmp = x1 + ((x2 * -6.0) + (x1 * ((4.0 * t_0) - 2.0)));
} else {
tmp = x1 + ((x2 * -6.0) + (x1 * ((x1 * 9.0) - 2.0)));
}
return tmp;
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
real(8) :: t_0
real(8) :: tmp
t_0 = x2 * ((2.0d0 * x2) - 3.0d0)
if (x1 <= (-4.4d+153)) then
tmp = x1 + (x1 + (3.0d0 * (x1 * ((x1 * 3.0d0) + (-1.0d0)))))
else if (x1 <= (-2.4d+64)) then
tmp = x1 + ((x2 * (-6.0d0)) + (x1 * ((x1 * (9.0d0 + (x2 * 6.0d0))) - 2.0d0)))
else if (x1 <= (-6.5d-285)) then
tmp = x1 + ((x1 + (4.0d0 * (x1 * t_0))) + (3.0d0 * ((x2 * (-2.0d0)) - x1)))
else if (x1 <= 2.6d-239) then
tmp = x1 + ((3.0d0 * (x2 * (-2.0d0))) + (x1 - (x2 * ((x1 * (12.0d0 - (x1 * 6.0d0))) - ((x1 * x2) * 8.0d0)))))
else if (x1 <= 2.45d+144) then
tmp = x1 + ((x2 * (-6.0d0)) + (x1 * ((4.0d0 * t_0) - 2.0d0)))
else
tmp = x1 + ((x2 * (-6.0d0)) + (x1 * ((x1 * 9.0d0) - 2.0d0)))
end if
code = tmp
end function
public static double code(double x1, double x2) {
double t_0 = x2 * ((2.0 * x2) - 3.0);
double tmp;
if (x1 <= -4.4e+153) {
tmp = x1 + (x1 + (3.0 * (x1 * ((x1 * 3.0) + -1.0))));
} else if (x1 <= -2.4e+64) {
tmp = x1 + ((x2 * -6.0) + (x1 * ((x1 * (9.0 + (x2 * 6.0))) - 2.0)));
} else if (x1 <= -6.5e-285) {
tmp = x1 + ((x1 + (4.0 * (x1 * t_0))) + (3.0 * ((x2 * -2.0) - x1)));
} else if (x1 <= 2.6e-239) {
tmp = x1 + ((3.0 * (x2 * -2.0)) + (x1 - (x2 * ((x1 * (12.0 - (x1 * 6.0))) - ((x1 * x2) * 8.0)))));
} else if (x1 <= 2.45e+144) {
tmp = x1 + ((x2 * -6.0) + (x1 * ((4.0 * t_0) - 2.0)));
} else {
tmp = x1 + ((x2 * -6.0) + (x1 * ((x1 * 9.0) - 2.0)));
}
return tmp;
}
def code(x1, x2): t_0 = x2 * ((2.0 * x2) - 3.0) tmp = 0 if x1 <= -4.4e+153: tmp = x1 + (x1 + (3.0 * (x1 * ((x1 * 3.0) + -1.0)))) elif x1 <= -2.4e+64: tmp = x1 + ((x2 * -6.0) + (x1 * ((x1 * (9.0 + (x2 * 6.0))) - 2.0))) elif x1 <= -6.5e-285: tmp = x1 + ((x1 + (4.0 * (x1 * t_0))) + (3.0 * ((x2 * -2.0) - x1))) elif x1 <= 2.6e-239: tmp = x1 + ((3.0 * (x2 * -2.0)) + (x1 - (x2 * ((x1 * (12.0 - (x1 * 6.0))) - ((x1 * x2) * 8.0))))) elif x1 <= 2.45e+144: tmp = x1 + ((x2 * -6.0) + (x1 * ((4.0 * t_0) - 2.0))) else: tmp = x1 + ((x2 * -6.0) + (x1 * ((x1 * 9.0) - 2.0))) return tmp
function code(x1, x2) t_0 = Float64(x2 * Float64(Float64(2.0 * x2) - 3.0)) 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 <= -2.4e+64) tmp = Float64(x1 + Float64(Float64(x2 * -6.0) + Float64(x1 * Float64(Float64(x1 * Float64(9.0 + Float64(x2 * 6.0))) - 2.0)))); elseif (x1 <= -6.5e-285) tmp = Float64(x1 + Float64(Float64(x1 + Float64(4.0 * Float64(x1 * t_0))) + Float64(3.0 * Float64(Float64(x2 * -2.0) - x1)))); elseif (x1 <= 2.6e-239) tmp = Float64(x1 + Float64(Float64(3.0 * Float64(x2 * -2.0)) + Float64(x1 - Float64(x2 * Float64(Float64(x1 * Float64(12.0 - Float64(x1 * 6.0))) - Float64(Float64(x1 * x2) * 8.0)))))); elseif (x1 <= 2.45e+144) tmp = Float64(x1 + Float64(Float64(x2 * -6.0) + Float64(x1 * Float64(Float64(4.0 * t_0) - 2.0)))); else tmp = Float64(x1 + Float64(Float64(x2 * -6.0) + Float64(x1 * Float64(Float64(x1 * 9.0) - 2.0)))); end return tmp end
function tmp_2 = code(x1, x2) t_0 = x2 * ((2.0 * x2) - 3.0); tmp = 0.0; if (x1 <= -4.4e+153) tmp = x1 + (x1 + (3.0 * (x1 * ((x1 * 3.0) + -1.0)))); elseif (x1 <= -2.4e+64) tmp = x1 + ((x2 * -6.0) + (x1 * ((x1 * (9.0 + (x2 * 6.0))) - 2.0))); elseif (x1 <= -6.5e-285) tmp = x1 + ((x1 + (4.0 * (x1 * t_0))) + (3.0 * ((x2 * -2.0) - x1))); elseif (x1 <= 2.6e-239) tmp = x1 + ((3.0 * (x2 * -2.0)) + (x1 - (x2 * ((x1 * (12.0 - (x1 * 6.0))) - ((x1 * x2) * 8.0))))); elseif (x1 <= 2.45e+144) tmp = x1 + ((x2 * -6.0) + (x1 * ((4.0 * t_0) - 2.0))); else tmp = x1 + ((x2 * -6.0) + (x1 * ((x1 * 9.0) - 2.0))); end tmp_2 = tmp; end
code[x1_, x2_] := Block[{t$95$0 = N[(x2 * N[(N[(2.0 * x2), $MachinePrecision] - 3.0), $MachinePrecision]), $MachinePrecision]}, 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, -2.4e+64], N[(x1 + N[(N[(x2 * -6.0), $MachinePrecision] + N[(x1 * N[(N[(x1 * N[(9.0 + N[(x2 * 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, -6.5e-285], N[(x1 + N[(N[(x1 + N[(4.0 * N[(x1 * t$95$0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(3.0 * N[(N[(x2 * -2.0), $MachinePrecision] - x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 2.6e-239], N[(x1 + N[(N[(3.0 * N[(x2 * -2.0), $MachinePrecision]), $MachinePrecision] + N[(x1 - N[(x2 * N[(N[(x1 * N[(12.0 - N[(x1 * 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[(x1 * x2), $MachinePrecision] * 8.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 2.45e+144], N[(x1 + N[(N[(x2 * -6.0), $MachinePrecision] + N[(x1 * N[(N[(4.0 * t$95$0), $MachinePrecision] - 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x1 + N[(N[(x2 * -6.0), $MachinePrecision] + N[(x1 * N[(N[(x1 * 9.0), $MachinePrecision] - 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x2 \cdot \left(2 \cdot x2 - 3\right)\\
\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 -2.4 \cdot 10^{+64}:\\
\;\;\;\;x1 + \left(x2 \cdot -6 + x1 \cdot \left(x1 \cdot \left(9 + x2 \cdot 6\right) - 2\right)\right)\\
\mathbf{elif}\;x1 \leq -6.5 \cdot 10^{-285}:\\
\;\;\;\;x1 + \left(\left(x1 + 4 \cdot \left(x1 \cdot t\_0\right)\right) + 3 \cdot \left(x2 \cdot -2 - x1\right)\right)\\
\mathbf{elif}\;x1 \leq 2.6 \cdot 10^{-239}:\\
\;\;\;\;x1 + \left(3 \cdot \left(x2 \cdot -2\right) + \left(x1 - x2 \cdot \left(x1 \cdot \left(12 - x1 \cdot 6\right) - \left(x1 \cdot x2\right) \cdot 8\right)\right)\right)\\
\mathbf{elif}\;x1 \leq 2.45 \cdot 10^{+144}:\\
\;\;\;\;x1 + \left(x2 \cdot -6 + x1 \cdot \left(4 \cdot t\_0 - 2\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x1 + \left(x2 \cdot -6 + x1 \cdot \left(x1 \cdot 9 - 2\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 45.0%
Taylor expanded in x2 around 0 100.0%
if -4.3999999999999999e153 < x1 < -2.39999999999999999e64Initial program 30.6%
Taylor expanded in x1 around 0 15.6%
Taylor expanded in x1 around 0 25.7%
Taylor expanded in x1 around 0 33.4%
Taylor expanded in x1 around inf 56.5%
associate-*r*56.5%
*-commutative56.5%
associate-*r*56.5%
cancel-sign-sub-inv56.5%
metadata-eval56.5%
distribute-lft-in56.5%
metadata-eval56.5%
metadata-eval56.5%
distribute-lft-neg-in56.5%
distribute-rgt-neg-in56.5%
associate-*r*56.5%
metadata-eval56.5%
distribute-lft-neg-in56.5%
metadata-eval56.5%
*-commutative56.5%
Simplified56.5%
if -2.39999999999999999e64 < x1 < -6.5e-285Initial program 99.3%
Taylor expanded in x1 around 0 85.6%
Taylor expanded in x1 around 0 85.7%
mul-1-neg85.7%
unsub-neg85.7%
*-commutative85.7%
Simplified85.7%
if -6.5e-285 < x1 < 2.60000000000000003e-239Initial program 99.8%
Taylor expanded in x1 around 0 98.7%
*-commutative98.7%
Simplified98.7%
Taylor expanded in x1 around 0 50.5%
Taylor expanded in x2 around 0 98.7%
if 2.60000000000000003e-239 < x1 < 2.45e144Initial program 98.1%
Taylor expanded in x1 around 0 69.0%
Taylor expanded in x1 around 0 69.0%
Taylor expanded in x1 around 0 67.9%
if 2.45e144 < x1 Initial program 3.2%
Taylor expanded in x1 around 0 0.2%
Taylor expanded in x1 around 0 80.6%
Taylor expanded in x1 around 0 80.6%
Taylor expanded in x2 around 0 97.1%
*-commutative97.1%
Simplified97.1%
Final simplification83.1%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (+ x1 (+ (* x2 -6.0) (* x1 (- (* x1 (+ 9.0 (* x2 6.0))) 2.0)))))
(t_1 (* x2 (- 3.0 (* 2.0 x2)))))
(if (<= x1 -4.4e+153)
(+ x1 (+ x1 (* 3.0 (* x1 (+ (* x1 3.0) -1.0)))))
(if (<= x1 -5.2e+64)
t_0
(if (<= x1 -1.16e-191)
(+ x1 (+ (- x1 (* 4.0 (* x1 t_1))) (* 3.0 (- (* x2 -2.0) x1))))
(if (<= x1 3.6e-251)
t_0
(if (<= x1 2.45e+144)
(+ x1 (- (* x2 -6.0) (* x1 (+ 2.0 (* 4.0 t_1)))))
(+ x1 (- (* x2 -6.0) (* x1 (- 2.0 (* x1 9.0))))))))))))
double code(double x1, double x2) {
double t_0 = x1 + ((x2 * -6.0) + (x1 * ((x1 * (9.0 + (x2 * 6.0))) - 2.0)));
double t_1 = x2 * (3.0 - (2.0 * x2));
double tmp;
if (x1 <= -4.4e+153) {
tmp = x1 + (x1 + (3.0 * (x1 * ((x1 * 3.0) + -1.0))));
} else if (x1 <= -5.2e+64) {
tmp = t_0;
} else if (x1 <= -1.16e-191) {
tmp = x1 + ((x1 - (4.0 * (x1 * t_1))) + (3.0 * ((x2 * -2.0) - x1)));
} else if (x1 <= 3.6e-251) {
tmp = t_0;
} else if (x1 <= 2.45e+144) {
tmp = x1 + ((x2 * -6.0) - (x1 * (2.0 + (4.0 * t_1))));
} else {
tmp = x1 + ((x2 * -6.0) - (x1 * (2.0 - (x1 * 9.0))));
}
return tmp;
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
real(8) :: t_0
real(8) :: t_1
real(8) :: tmp
t_0 = x1 + ((x2 * (-6.0d0)) + (x1 * ((x1 * (9.0d0 + (x2 * 6.0d0))) - 2.0d0)))
t_1 = x2 * (3.0d0 - (2.0d0 * x2))
if (x1 <= (-4.4d+153)) then
tmp = x1 + (x1 + (3.0d0 * (x1 * ((x1 * 3.0d0) + (-1.0d0)))))
else if (x1 <= (-5.2d+64)) then
tmp = t_0
else if (x1 <= (-1.16d-191)) then
tmp = x1 + ((x1 - (4.0d0 * (x1 * t_1))) + (3.0d0 * ((x2 * (-2.0d0)) - x1)))
else if (x1 <= 3.6d-251) then
tmp = t_0
else if (x1 <= 2.45d+144) then
tmp = x1 + ((x2 * (-6.0d0)) - (x1 * (2.0d0 + (4.0d0 * t_1))))
else
tmp = x1 + ((x2 * (-6.0d0)) - (x1 * (2.0d0 - (x1 * 9.0d0))))
end if
code = tmp
end function
public static double code(double x1, double x2) {
double t_0 = x1 + ((x2 * -6.0) + (x1 * ((x1 * (9.0 + (x2 * 6.0))) - 2.0)));
double t_1 = x2 * (3.0 - (2.0 * x2));
double tmp;
if (x1 <= -4.4e+153) {
tmp = x1 + (x1 + (3.0 * (x1 * ((x1 * 3.0) + -1.0))));
} else if (x1 <= -5.2e+64) {
tmp = t_0;
} else if (x1 <= -1.16e-191) {
tmp = x1 + ((x1 - (4.0 * (x1 * t_1))) + (3.0 * ((x2 * -2.0) - x1)));
} else if (x1 <= 3.6e-251) {
tmp = t_0;
} else if (x1 <= 2.45e+144) {
tmp = x1 + ((x2 * -6.0) - (x1 * (2.0 + (4.0 * t_1))));
} else {
tmp = x1 + ((x2 * -6.0) - (x1 * (2.0 - (x1 * 9.0))));
}
return tmp;
}
def code(x1, x2): t_0 = x1 + ((x2 * -6.0) + (x1 * ((x1 * (9.0 + (x2 * 6.0))) - 2.0))) t_1 = x2 * (3.0 - (2.0 * x2)) tmp = 0 if x1 <= -4.4e+153: tmp = x1 + (x1 + (3.0 * (x1 * ((x1 * 3.0) + -1.0)))) elif x1 <= -5.2e+64: tmp = t_0 elif x1 <= -1.16e-191: tmp = x1 + ((x1 - (4.0 * (x1 * t_1))) + (3.0 * ((x2 * -2.0) - x1))) elif x1 <= 3.6e-251: tmp = t_0 elif x1 <= 2.45e+144: tmp = x1 + ((x2 * -6.0) - (x1 * (2.0 + (4.0 * t_1)))) else: tmp = x1 + ((x2 * -6.0) - (x1 * (2.0 - (x1 * 9.0)))) return tmp
function code(x1, x2) t_0 = Float64(x1 + Float64(Float64(x2 * -6.0) + Float64(x1 * Float64(Float64(x1 * Float64(9.0 + Float64(x2 * 6.0))) - 2.0)))) t_1 = Float64(x2 * Float64(3.0 - Float64(2.0 * 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 <= -5.2e+64) tmp = t_0; elseif (x1 <= -1.16e-191) tmp = Float64(x1 + Float64(Float64(x1 - Float64(4.0 * Float64(x1 * t_1))) + Float64(3.0 * Float64(Float64(x2 * -2.0) - x1)))); elseif (x1 <= 3.6e-251) tmp = t_0; elseif (x1 <= 2.45e+144) tmp = Float64(x1 + Float64(Float64(x2 * -6.0) - Float64(x1 * Float64(2.0 + Float64(4.0 * t_1))))); else tmp = Float64(x1 + Float64(Float64(x2 * -6.0) - Float64(x1 * Float64(2.0 - Float64(x1 * 9.0))))); end return tmp end
function tmp_2 = code(x1, x2) t_0 = x1 + ((x2 * -6.0) + (x1 * ((x1 * (9.0 + (x2 * 6.0))) - 2.0))); t_1 = x2 * (3.0 - (2.0 * x2)); tmp = 0.0; if (x1 <= -4.4e+153) tmp = x1 + (x1 + (3.0 * (x1 * ((x1 * 3.0) + -1.0)))); elseif (x1 <= -5.2e+64) tmp = t_0; elseif (x1 <= -1.16e-191) tmp = x1 + ((x1 - (4.0 * (x1 * t_1))) + (3.0 * ((x2 * -2.0) - x1))); elseif (x1 <= 3.6e-251) tmp = t_0; elseif (x1 <= 2.45e+144) tmp = x1 + ((x2 * -6.0) - (x1 * (2.0 + (4.0 * t_1)))); else tmp = x1 + ((x2 * -6.0) - (x1 * (2.0 - (x1 * 9.0)))); end tmp_2 = tmp; end
code[x1_, x2_] := Block[{t$95$0 = N[(x1 + N[(N[(x2 * -6.0), $MachinePrecision] + N[(x1 * N[(N[(x1 * N[(9.0 + N[(x2 * 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(x2 * N[(3.0 - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, 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, -5.2e+64], t$95$0, If[LessEqual[x1, -1.16e-191], N[(x1 + N[(N[(x1 - N[(4.0 * N[(x1 * t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(3.0 * N[(N[(x2 * -2.0), $MachinePrecision] - x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 3.6e-251], t$95$0, If[LessEqual[x1, 2.45e+144], N[(x1 + N[(N[(x2 * -6.0), $MachinePrecision] - N[(x1 * N[(2.0 + N[(4.0 * t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x1 + N[(N[(x2 * -6.0), $MachinePrecision] - N[(x1 * N[(2.0 - N[(x1 * 9.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x1 + \left(x2 \cdot -6 + x1 \cdot \left(x1 \cdot \left(9 + x2 \cdot 6\right) - 2\right)\right)\\
t_1 := x2 \cdot \left(3 - 2 \cdot x2\right)\\
\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 -5.2 \cdot 10^{+64}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;x1 \leq -1.16 \cdot 10^{-191}:\\
\;\;\;\;x1 + \left(\left(x1 - 4 \cdot \left(x1 \cdot t\_1\right)\right) + 3 \cdot \left(x2 \cdot -2 - x1\right)\right)\\
\mathbf{elif}\;x1 \leq 3.6 \cdot 10^{-251}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;x1 \leq 2.45 \cdot 10^{+144}:\\
\;\;\;\;x1 + \left(x2 \cdot -6 - x1 \cdot \left(2 + 4 \cdot t\_1\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x1 + \left(x2 \cdot -6 - x1 \cdot \left(2 - x1 \cdot 9\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 45.0%
Taylor expanded in x2 around 0 100.0%
if -4.3999999999999999e153 < x1 < -5.19999999999999994e64 or -1.16000000000000007e-191 < x1 < 3.6000000000000001e-251Initial program 80.1%
Taylor expanded in x1 around 0 58.9%
Taylor expanded in x1 around 0 61.7%
Taylor expanded in x1 around 0 64.1%
Taylor expanded in x1 around inf 85.6%
associate-*r*85.6%
*-commutative85.6%
associate-*r*85.6%
cancel-sign-sub-inv85.6%
metadata-eval85.6%
distribute-lft-in85.6%
metadata-eval85.6%
metadata-eval85.6%
distribute-lft-neg-in85.6%
distribute-rgt-neg-in85.6%
associate-*r*85.6%
metadata-eval85.6%
distribute-lft-neg-in85.6%
metadata-eval85.6%
*-commutative85.6%
Simplified85.6%
if -5.19999999999999994e64 < x1 < -1.16000000000000007e-191Initial program 99.3%
Taylor expanded in x1 around 0 82.7%
Taylor expanded in x1 around 0 83.0%
mul-1-neg83.0%
unsub-neg83.0%
*-commutative83.0%
Simplified83.0%
if 3.6000000000000001e-251 < x1 < 2.45e144Initial program 98.2%
Taylor expanded in x1 around 0 68.6%
Taylor expanded in x1 around 0 68.7%
Taylor expanded in x1 around 0 67.6%
if 2.45e144 < x1 Initial program 3.2%
Taylor expanded in x1 around 0 0.2%
Taylor expanded in x1 around 0 80.6%
Taylor expanded in x1 around 0 80.6%
Taylor expanded in x2 around 0 97.1%
*-commutative97.1%
Simplified97.1%
Final simplification82.9%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (+ x1 (+ (* x2 -6.0) (* x1 (- (* x1 (+ 9.0 (* x2 6.0))) 2.0)))))
(t_1
(+
x1
(- (* x2 -6.0) (* x1 (+ 2.0 (* 4.0 (* x2 (- 3.0 (* 2.0 x2))))))))))
(if (<= x1 -1e+155)
(+ x1 (+ x1 (* 3.0 (* x1 (+ (* x1 3.0) -1.0)))))
(if (<= x1 -1.2e+63)
t_0
(if (<= x1 -6.5e-192)
t_1
(if (<= x1 8.5e-259)
t_0
(if (<= x1 2.45e+144)
t_1
(+ x1 (- (* x2 -6.0) (* x1 (- 2.0 (* x1 9.0))))))))))))
double code(double x1, double x2) {
double t_0 = x1 + ((x2 * -6.0) + (x1 * ((x1 * (9.0 + (x2 * 6.0))) - 2.0)));
double t_1 = x1 + ((x2 * -6.0) - (x1 * (2.0 + (4.0 * (x2 * (3.0 - (2.0 * x2)))))));
double tmp;
if (x1 <= -1e+155) {
tmp = x1 + (x1 + (3.0 * (x1 * ((x1 * 3.0) + -1.0))));
} else if (x1 <= -1.2e+63) {
tmp = t_0;
} else if (x1 <= -6.5e-192) {
tmp = t_1;
} else if (x1 <= 8.5e-259) {
tmp = t_0;
} else if (x1 <= 2.45e+144) {
tmp = t_1;
} else {
tmp = x1 + ((x2 * -6.0) - (x1 * (2.0 - (x1 * 9.0))));
}
return tmp;
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
real(8) :: t_0
real(8) :: t_1
real(8) :: tmp
t_0 = x1 + ((x2 * (-6.0d0)) + (x1 * ((x1 * (9.0d0 + (x2 * 6.0d0))) - 2.0d0)))
t_1 = x1 + ((x2 * (-6.0d0)) - (x1 * (2.0d0 + (4.0d0 * (x2 * (3.0d0 - (2.0d0 * x2)))))))
if (x1 <= (-1d+155)) then
tmp = x1 + (x1 + (3.0d0 * (x1 * ((x1 * 3.0d0) + (-1.0d0)))))
else if (x1 <= (-1.2d+63)) then
tmp = t_0
else if (x1 <= (-6.5d-192)) then
tmp = t_1
else if (x1 <= 8.5d-259) then
tmp = t_0
else if (x1 <= 2.45d+144) then
tmp = t_1
else
tmp = x1 + ((x2 * (-6.0d0)) - (x1 * (2.0d0 - (x1 * 9.0d0))))
end if
code = tmp
end function
public static double code(double x1, double x2) {
double t_0 = x1 + ((x2 * -6.0) + (x1 * ((x1 * (9.0 + (x2 * 6.0))) - 2.0)));
double t_1 = x1 + ((x2 * -6.0) - (x1 * (2.0 + (4.0 * (x2 * (3.0 - (2.0 * x2)))))));
double tmp;
if (x1 <= -1e+155) {
tmp = x1 + (x1 + (3.0 * (x1 * ((x1 * 3.0) + -1.0))));
} else if (x1 <= -1.2e+63) {
tmp = t_0;
} else if (x1 <= -6.5e-192) {
tmp = t_1;
} else if (x1 <= 8.5e-259) {
tmp = t_0;
} else if (x1 <= 2.45e+144) {
tmp = t_1;
} else {
tmp = x1 + ((x2 * -6.0) - (x1 * (2.0 - (x1 * 9.0))));
}
return tmp;
}
def code(x1, x2): t_0 = x1 + ((x2 * -6.0) + (x1 * ((x1 * (9.0 + (x2 * 6.0))) - 2.0))) t_1 = x1 + ((x2 * -6.0) - (x1 * (2.0 + (4.0 * (x2 * (3.0 - (2.0 * x2))))))) tmp = 0 if x1 <= -1e+155: tmp = x1 + (x1 + (3.0 * (x1 * ((x1 * 3.0) + -1.0)))) elif x1 <= -1.2e+63: tmp = t_0 elif x1 <= -6.5e-192: tmp = t_1 elif x1 <= 8.5e-259: tmp = t_0 elif x1 <= 2.45e+144: tmp = t_1 else: tmp = x1 + ((x2 * -6.0) - (x1 * (2.0 - (x1 * 9.0)))) return tmp
function code(x1, x2) t_0 = Float64(x1 + Float64(Float64(x2 * -6.0) + Float64(x1 * Float64(Float64(x1 * Float64(9.0 + Float64(x2 * 6.0))) - 2.0)))) t_1 = Float64(x1 + Float64(Float64(x2 * -6.0) - Float64(x1 * Float64(2.0 + Float64(4.0 * Float64(x2 * Float64(3.0 - Float64(2.0 * x2)))))))) tmp = 0.0 if (x1 <= -1e+155) tmp = Float64(x1 + Float64(x1 + Float64(3.0 * Float64(x1 * Float64(Float64(x1 * 3.0) + -1.0))))); elseif (x1 <= -1.2e+63) tmp = t_0; elseif (x1 <= -6.5e-192) tmp = t_1; elseif (x1 <= 8.5e-259) tmp = t_0; elseif (x1 <= 2.45e+144) tmp = t_1; else tmp = Float64(x1 + Float64(Float64(x2 * -6.0) - Float64(x1 * Float64(2.0 - Float64(x1 * 9.0))))); end return tmp end
function tmp_2 = code(x1, x2) t_0 = x1 + ((x2 * -6.0) + (x1 * ((x1 * (9.0 + (x2 * 6.0))) - 2.0))); t_1 = x1 + ((x2 * -6.0) - (x1 * (2.0 + (4.0 * (x2 * (3.0 - (2.0 * x2))))))); tmp = 0.0; if (x1 <= -1e+155) tmp = x1 + (x1 + (3.0 * (x1 * ((x1 * 3.0) + -1.0)))); elseif (x1 <= -1.2e+63) tmp = t_0; elseif (x1 <= -6.5e-192) tmp = t_1; elseif (x1 <= 8.5e-259) tmp = t_0; elseif (x1 <= 2.45e+144) tmp = t_1; else tmp = x1 + ((x2 * -6.0) - (x1 * (2.0 - (x1 * 9.0)))); end tmp_2 = tmp; end
code[x1_, x2_] := Block[{t$95$0 = N[(x1 + N[(N[(x2 * -6.0), $MachinePrecision] + N[(x1 * N[(N[(x1 * N[(9.0 + N[(x2 * 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(x1 + N[(N[(x2 * -6.0), $MachinePrecision] - N[(x1 * N[(2.0 + N[(4.0 * N[(x2 * N[(3.0 - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x1, -1e+155], 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.2e+63], t$95$0, If[LessEqual[x1, -6.5e-192], t$95$1, If[LessEqual[x1, 8.5e-259], t$95$0, If[LessEqual[x1, 2.45e+144], t$95$1, N[(x1 + N[(N[(x2 * -6.0), $MachinePrecision] - N[(x1 * N[(2.0 - N[(x1 * 9.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x1 + \left(x2 \cdot -6 + x1 \cdot \left(x1 \cdot \left(9 + x2 \cdot 6\right) - 2\right)\right)\\
t_1 := x1 + \left(x2 \cdot -6 - x1 \cdot \left(2 + 4 \cdot \left(x2 \cdot \left(3 - 2 \cdot x2\right)\right)\right)\right)\\
\mathbf{if}\;x1 \leq -1 \cdot 10^{+155}:\\
\;\;\;\;x1 + \left(x1 + 3 \cdot \left(x1 \cdot \left(x1 \cdot 3 + -1\right)\right)\right)\\
\mathbf{elif}\;x1 \leq -1.2 \cdot 10^{+63}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;x1 \leq -6.5 \cdot 10^{-192}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;x1 \leq 8.5 \cdot 10^{-259}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;x1 \leq 2.45 \cdot 10^{+144}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;x1 + \left(x2 \cdot -6 - x1 \cdot \left(2 - x1 \cdot 9\right)\right)\\
\end{array}
\end{array}
if x1 < -1.00000000000000001e155Initial program 0.0%
Taylor expanded in x1 around 0 0.0%
Taylor expanded in x1 around 0 45.0%
Taylor expanded in x2 around 0 100.0%
if -1.00000000000000001e155 < x1 < -1.2e63 or -6.49999999999999966e-192 < x1 < 8.4999999999999994e-259Initial program 80.1%
Taylor expanded in x1 around 0 58.9%
Taylor expanded in x1 around 0 61.7%
Taylor expanded in x1 around 0 64.1%
Taylor expanded in x1 around inf 85.6%
associate-*r*85.6%
*-commutative85.6%
associate-*r*85.6%
cancel-sign-sub-inv85.6%
metadata-eval85.6%
distribute-lft-in85.6%
metadata-eval85.6%
metadata-eval85.6%
distribute-lft-neg-in85.6%
distribute-rgt-neg-in85.6%
associate-*r*85.6%
metadata-eval85.6%
distribute-lft-neg-in85.6%
metadata-eval85.6%
*-commutative85.6%
Simplified85.6%
if -1.2e63 < x1 < -6.49999999999999966e-192 or 8.4999999999999994e-259 < x1 < 2.45e144Initial program 98.6%
Taylor expanded in x1 around 0 74.4%
Taylor expanded in x1 around 0 73.9%
Taylor expanded in x1 around 0 73.4%
if 2.45e144 < x1 Initial program 3.2%
Taylor expanded in x1 around 0 0.2%
Taylor expanded in x1 around 0 80.6%
Taylor expanded in x1 around 0 80.6%
Taylor expanded in x2 around 0 97.1%
*-commutative97.1%
Simplified97.1%
Final simplification82.6%
(FPCore (x1 x2)
:precision binary64
(if (<= x1 -4.4e+153)
(+ x1 (+ x1 (* 3.0 (* x1 (+ (* x1 3.0) -1.0)))))
(if (<= x1 2.45e+144)
(+ x1 (+ (* x2 -6.0) (* x1 (- (* x1 (+ 9.0 (* x2 6.0))) 2.0))))
(+ x1 (- (* x2 -6.0) (* x1 (- 2.0 (* x1 9.0))))))))
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 <= 2.45e+144) {
tmp = x1 + ((x2 * -6.0) + (x1 * ((x1 * (9.0 + (x2 * 6.0))) - 2.0)));
} else {
tmp = x1 + ((x2 * -6.0) - (x1 * (2.0 - (x1 * 9.0))));
}
return tmp;
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
real(8) :: tmp
if (x1 <= (-4.4d+153)) then
tmp = x1 + (x1 + (3.0d0 * (x1 * ((x1 * 3.0d0) + (-1.0d0)))))
else if (x1 <= 2.45d+144) then
tmp = x1 + ((x2 * (-6.0d0)) + (x1 * ((x1 * (9.0d0 + (x2 * 6.0d0))) - 2.0d0)))
else
tmp = x1 + ((x2 * (-6.0d0)) - (x1 * (2.0d0 - (x1 * 9.0d0))))
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 <= 2.45e+144) {
tmp = x1 + ((x2 * -6.0) + (x1 * ((x1 * (9.0 + (x2 * 6.0))) - 2.0)));
} else {
tmp = x1 + ((x2 * -6.0) - (x1 * (2.0 - (x1 * 9.0))));
}
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 <= 2.45e+144: tmp = x1 + ((x2 * -6.0) + (x1 * ((x1 * (9.0 + (x2 * 6.0))) - 2.0))) else: tmp = x1 + ((x2 * -6.0) - (x1 * (2.0 - (x1 * 9.0)))) 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 <= 2.45e+144) tmp = Float64(x1 + Float64(Float64(x2 * -6.0) + Float64(x1 * Float64(Float64(x1 * Float64(9.0 + Float64(x2 * 6.0))) - 2.0)))); else tmp = Float64(x1 + Float64(Float64(x2 * -6.0) - Float64(x1 * Float64(2.0 - Float64(x1 * 9.0))))); 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 <= 2.45e+144) tmp = x1 + ((x2 * -6.0) + (x1 * ((x1 * (9.0 + (x2 * 6.0))) - 2.0))); else tmp = x1 + ((x2 * -6.0) - (x1 * (2.0 - (x1 * 9.0)))); 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, 2.45e+144], N[(x1 + N[(N[(x2 * -6.0), $MachinePrecision] + N[(x1 * N[(N[(x1 * N[(9.0 + N[(x2 * 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x1 + N[(N[(x2 * -6.0), $MachinePrecision] - N[(x1 * N[(2.0 - N[(x1 * 9.0), $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 2.45 \cdot 10^{+144}:\\
\;\;\;\;x1 + \left(x2 \cdot -6 + x1 \cdot \left(x1 \cdot \left(9 + x2 \cdot 6\right) - 2\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x1 + \left(x2 \cdot -6 - x1 \cdot \left(2 - x1 \cdot 9\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 45.0%
Taylor expanded in x2 around 0 100.0%
if -4.3999999999999999e153 < x1 < 2.45e144Initial program 94.0%
Taylor expanded in x1 around 0 70.5%
Taylor expanded in x1 around 0 70.8%
Taylor expanded in x1 around 0 72.3%
Taylor expanded in x1 around inf 62.2%
associate-*r*62.2%
*-commutative62.2%
associate-*r*62.2%
cancel-sign-sub-inv62.2%
metadata-eval62.2%
distribute-lft-in62.2%
metadata-eval62.2%
metadata-eval62.2%
distribute-lft-neg-in62.2%
distribute-rgt-neg-in62.2%
associate-*r*62.2%
metadata-eval62.2%
distribute-lft-neg-in62.2%
metadata-eval62.2%
*-commutative62.2%
Simplified62.2%
if 2.45e144 < x1 Initial program 3.2%
Taylor expanded in x1 around 0 0.2%
Taylor expanded in x1 around 0 80.6%
Taylor expanded in x1 around 0 80.6%
Taylor expanded in x2 around 0 97.1%
*-commutative97.1%
Simplified97.1%
Final simplification72.4%
(FPCore (x1 x2) :precision binary64 (if (or (<= x1 -9e+60) (not (<= x1 1.25e-23))) (+ x1 (+ x1 (* 3.0 (* x1 (+ (* x1 3.0) -1.0))))) (+ x1 (+ (* x2 -6.0) (* x1 -2.0)))))
double code(double x1, double x2) {
double tmp;
if ((x1 <= -9e+60) || !(x1 <= 1.25e-23)) {
tmp = x1 + (x1 + (3.0 * (x1 * ((x1 * 3.0) + -1.0))));
} else {
tmp = x1 + ((x2 * -6.0) + (x1 * -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 <= (-9d+60)) .or. (.not. (x1 <= 1.25d-23))) then
tmp = x1 + (x1 + (3.0d0 * (x1 * ((x1 * 3.0d0) + (-1.0d0)))))
else
tmp = x1 + ((x2 * (-6.0d0)) + (x1 * (-2.0d0)))
end if
code = tmp
end function
public static double code(double x1, double x2) {
double tmp;
if ((x1 <= -9e+60) || !(x1 <= 1.25e-23)) {
tmp = x1 + (x1 + (3.0 * (x1 * ((x1 * 3.0) + -1.0))));
} else {
tmp = x1 + ((x2 * -6.0) + (x1 * -2.0));
}
return tmp;
}
def code(x1, x2): tmp = 0 if (x1 <= -9e+60) or not (x1 <= 1.25e-23): tmp = x1 + (x1 + (3.0 * (x1 * ((x1 * 3.0) + -1.0)))) else: tmp = x1 + ((x2 * -6.0) + (x1 * -2.0)) return tmp
function code(x1, x2) tmp = 0.0 if ((x1 <= -9e+60) || !(x1 <= 1.25e-23)) tmp = Float64(x1 + Float64(x1 + Float64(3.0 * Float64(x1 * Float64(Float64(x1 * 3.0) + -1.0))))); else tmp = Float64(x1 + Float64(Float64(x2 * -6.0) + Float64(x1 * -2.0))); end return tmp end
function tmp_2 = code(x1, x2) tmp = 0.0; if ((x1 <= -9e+60) || ~((x1 <= 1.25e-23))) tmp = x1 + (x1 + (3.0 * (x1 * ((x1 * 3.0) + -1.0)))); else tmp = x1 + ((x2 * -6.0) + (x1 * -2.0)); end tmp_2 = tmp; end
code[x1_, x2_] := If[Or[LessEqual[x1, -9e+60], N[Not[LessEqual[x1, 1.25e-23]], $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[(x2 * -6.0), $MachinePrecision] + N[(x1 * -2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x1 \leq -9 \cdot 10^{+60} \lor \neg \left(x1 \leq 1.25 \cdot 10^{-23}\right):\\
\;\;\;\;x1 + \left(x1 + 3 \cdot \left(x1 \cdot \left(x1 \cdot 3 + -1\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x1 + \left(x2 \cdot -6 + x1 \cdot -2\right)\\
\end{array}
\end{array}
if x1 < -9.00000000000000026e60 or 1.2500000000000001e-23 < x1 Initial program 31.4%
Taylor expanded in x1 around 0 11.4%
Taylor expanded in x1 around 0 49.2%
Taylor expanded in x2 around 0 63.6%
if -9.00000000000000026e60 < x1 < 1.2500000000000001e-23Initial program 99.4%
Taylor expanded in x1 around 0 84.3%
Taylor expanded in x1 around 0 83.8%
Taylor expanded in x2 around 0 70.3%
Taylor expanded in x1 around 0 69.8%
Final simplification67.0%
(FPCore (x1 x2) :precision binary64 (if (<= x1 1.35) (+ x1 (+ (* x2 -6.0) (* x1 -2.0))) (* x2 (- (/ x1 x2) 6.0))))
double code(double x1, double x2) {
double tmp;
if (x1 <= 1.35) {
tmp = x1 + ((x2 * -6.0) + (x1 * -2.0));
} else {
tmp = x2 * ((x1 / x2) - 6.0);
}
return tmp;
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
real(8) :: tmp
if (x1 <= 1.35d0) then
tmp = x1 + ((x2 * (-6.0d0)) + (x1 * (-2.0d0)))
else
tmp = x2 * ((x1 / x2) - 6.0d0)
end if
code = tmp
end function
public static double code(double x1, double x2) {
double tmp;
if (x1 <= 1.35) {
tmp = x1 + ((x2 * -6.0) + (x1 * -2.0));
} else {
tmp = x2 * ((x1 / x2) - 6.0);
}
return tmp;
}
def code(x1, x2): tmp = 0 if x1 <= 1.35: tmp = x1 + ((x2 * -6.0) + (x1 * -2.0)) else: tmp = x2 * ((x1 / x2) - 6.0) return tmp
function code(x1, x2) tmp = 0.0 if (x1 <= 1.35) tmp = Float64(x1 + Float64(Float64(x2 * -6.0) + Float64(x1 * -2.0))); else tmp = Float64(x2 * Float64(Float64(x1 / x2) - 6.0)); end return tmp end
function tmp_2 = code(x1, x2) tmp = 0.0; if (x1 <= 1.35) tmp = x1 + ((x2 * -6.0) + (x1 * -2.0)); else tmp = x2 * ((x1 / x2) - 6.0); end tmp_2 = tmp; end
code[x1_, x2_] := If[LessEqual[x1, 1.35], N[(x1 + N[(N[(x2 * -6.0), $MachinePrecision] + N[(x1 * -2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x2 * N[(N[(x1 / x2), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x1 \leq 1.35:\\
\;\;\;\;x1 + \left(x2 \cdot -6 + x1 \cdot -2\right)\\
\mathbf{else}:\\
\;\;\;\;x2 \cdot \left(\frac{x1}{x2} - 6\right)\\
\end{array}
\end{array}
if x1 < 1.3500000000000001Initial program 74.5%
Taylor expanded in x1 around 0 62.9%
Taylor expanded in x1 around 0 72.3%
Taylor expanded in x2 around 0 70.0%
Taylor expanded in x1 around 0 51.7%
if 1.3500000000000001 < x1 Initial program 48.0%
Taylor expanded in x1 around 0 12.2%
Taylor expanded in x1 around 0 53.8%
Taylor expanded in x1 around 0 5.1%
Taylor expanded in x2 around inf 20.7%
Final simplification44.5%
(FPCore (x1 x2) :precision binary64 (+ x1 (- (* x2 -6.0) (* x1 (- 2.0 (* x1 9.0))))))
double code(double x1, double x2) {
return x1 + ((x2 * -6.0) - (x1 * (2.0 - (x1 * 9.0))));
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
code = x1 + ((x2 * (-6.0d0)) - (x1 * (2.0d0 - (x1 * 9.0d0))))
end function
public static double code(double x1, double x2) {
return x1 + ((x2 * -6.0) - (x1 * (2.0 - (x1 * 9.0))));
}
def code(x1, x2): return x1 + ((x2 * -6.0) - (x1 * (2.0 - (x1 * 9.0))))
function code(x1, x2) return Float64(x1 + Float64(Float64(x2 * -6.0) - Float64(x1 * Float64(2.0 - Float64(x1 * 9.0))))) end
function tmp = code(x1, x2) tmp = x1 + ((x2 * -6.0) - (x1 * (2.0 - (x1 * 9.0)))); end
code[x1_, x2_] := N[(x1 + N[(N[(x2 * -6.0), $MachinePrecision] - N[(x1 * N[(2.0 - N[(x1 * 9.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x1 + \left(x2 \cdot -6 - x1 \cdot \left(2 - x1 \cdot 9\right)\right)
\end{array}
Initial program 68.3%
Taylor expanded in x1 around 0 51.0%
Taylor expanded in x1 around 0 68.0%
Taylor expanded in x1 around 0 71.4%
Taylor expanded in x2 around 0 66.6%
*-commutative66.6%
Simplified66.6%
Final simplification66.6%
(FPCore (x1 x2) :precision binary64 (* x2 (- (/ x1 x2) 6.0)))
double code(double x1, double x2) {
return x2 * ((x1 / x2) - 6.0);
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
code = x2 * ((x1 / x2) - 6.0d0)
end function
public static double code(double x1, double x2) {
return x2 * ((x1 / x2) - 6.0);
}
def code(x1, x2): return x2 * ((x1 / x2) - 6.0)
function code(x1, x2) return Float64(x2 * Float64(Float64(x1 / x2) - 6.0)) end
function tmp = code(x1, x2) tmp = x2 * ((x1 / x2) - 6.0); end
code[x1_, x2_] := N[(x2 * N[(N[(x1 / x2), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x2 \cdot \left(\frac{x1}{x2} - 6\right)
\end{array}
Initial program 68.3%
Taylor expanded in x1 around 0 51.0%
Taylor expanded in x1 around 0 68.0%
Taylor expanded in x1 around 0 27.1%
Taylor expanded in x2 around inf 30.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 68.3%
Taylor expanded in x1 around 0 51.0%
Taylor expanded in x1 around 0 68.0%
Taylor expanded in x1 around 0 27.1%
Final simplification27.1%
(FPCore (x1 x2) :precision binary64 (* x2 -6.0))
double code(double x1, double x2) {
return x2 * -6.0;
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
code = x2 * (-6.0d0)
end function
public static double code(double x1, double x2) {
return x2 * -6.0;
}
def code(x1, x2): return x2 * -6.0
function code(x1, x2) return Float64(x2 * -6.0) end
function tmp = code(x1, x2) tmp = x2 * -6.0; end
code[x1_, x2_] := N[(x2 * -6.0), $MachinePrecision]
\begin{array}{l}
\\
x2 \cdot -6
\end{array}
Initial program 68.3%
Taylor expanded in x1 around 0 51.0%
Taylor expanded in x1 around 0 68.0%
Taylor expanded in x1 around 0 27.1%
Taylor expanded in x1 around 0 26.9%
*-commutative26.9%
Simplified26.9%
(FPCore (x1 x2) :precision binary64 x1)
double code(double x1, double x2) {
return x1;
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
code = x1
end function
public static double code(double x1, double x2) {
return x1;
}
def code(x1, x2): return x1
function code(x1, x2) return x1 end
function tmp = code(x1, x2) tmp = x1; end
code[x1_, x2_] := x1
\begin{array}{l}
\\
x1
\end{array}
Initial program 68.3%
Taylor expanded in x1 around 0 51.0%
Taylor expanded in x1 around 0 68.0%
Taylor expanded in x1 around 0 27.1%
Taylor expanded in x1 around inf 3.1%
herbie shell --seed 2024103
(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))))))