
(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 26 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (* (* 3.0 x1) x1))
(t_1 (+ (* x1 x1) 1.0))
(t_2 (/ (- (+ t_0 (* 2.0 x2)) x1) t_1)))
(+
x1
(+
(+
(+
(+
(*
(+
(* (* (* 2.0 x1) t_2) (- t_2 3.0))
(* (* x1 x1) (- (* 4.0 t_2) 6.0)))
t_1)
(* t_0 t_2))
(* (* x1 x1) x1))
x1)
(* 3.0 (/ (- (- t_0 (* 2.0 x2)) x1) t_1))))))
double code(double x1, double x2) {
double t_0 = (3.0 * x1) * x1;
double t_1 = (x1 * x1) + 1.0;
double t_2 = ((t_0 + (2.0 * x2)) - x1) / t_1;
return x1 + (((((((((2.0 * x1) * t_2) * (t_2 - 3.0)) + ((x1 * x1) * ((4.0 * t_2) - 6.0))) * t_1) + (t_0 * t_2)) + ((x1 * x1) * x1)) + x1) + (3.0 * (((t_0 - (2.0 * x2)) - x1) / t_1)));
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
real(8) :: t_0
real(8) :: t_1
real(8) :: t_2
t_0 = (3.0d0 * x1) * x1
t_1 = (x1 * x1) + 1.0d0
t_2 = ((t_0 + (2.0d0 * x2)) - x1) / t_1
code = x1 + (((((((((2.0d0 * x1) * t_2) * (t_2 - 3.0d0)) + ((x1 * x1) * ((4.0d0 * t_2) - 6.0d0))) * t_1) + (t_0 * t_2)) + ((x1 * x1) * x1)) + x1) + (3.0d0 * (((t_0 - (2.0d0 * x2)) - x1) / t_1)))
end function
public static double code(double x1, double x2) {
double t_0 = (3.0 * x1) * x1;
double t_1 = (x1 * x1) + 1.0;
double t_2 = ((t_0 + (2.0 * x2)) - x1) / t_1;
return x1 + (((((((((2.0 * x1) * t_2) * (t_2 - 3.0)) + ((x1 * x1) * ((4.0 * t_2) - 6.0))) * t_1) + (t_0 * t_2)) + ((x1 * x1) * x1)) + x1) + (3.0 * (((t_0 - (2.0 * x2)) - x1) / t_1)));
}
def code(x1, x2): t_0 = (3.0 * x1) * x1 t_1 = (x1 * x1) + 1.0 t_2 = ((t_0 + (2.0 * x2)) - x1) / t_1 return x1 + (((((((((2.0 * x1) * t_2) * (t_2 - 3.0)) + ((x1 * x1) * ((4.0 * t_2) - 6.0))) * t_1) + (t_0 * t_2)) + ((x1 * x1) * x1)) + x1) + (3.0 * (((t_0 - (2.0 * x2)) - x1) / t_1)))
function code(x1, x2) t_0 = Float64(Float64(3.0 * x1) * x1) t_1 = Float64(Float64(x1 * x1) + 1.0) t_2 = Float64(Float64(Float64(t_0 + Float64(2.0 * x2)) - x1) / t_1) return Float64(x1 + Float64(Float64(Float64(Float64(Float64(Float64(Float64(Float64(Float64(2.0 * x1) * t_2) * Float64(t_2 - 3.0)) + Float64(Float64(x1 * x1) * Float64(Float64(4.0 * t_2) - 6.0))) * t_1) + Float64(t_0 * t_2)) + Float64(Float64(x1 * x1) * x1)) + x1) + Float64(3.0 * Float64(Float64(Float64(t_0 - Float64(2.0 * x2)) - x1) / t_1)))) end
function tmp = code(x1, x2) t_0 = (3.0 * x1) * x1; t_1 = (x1 * x1) + 1.0; t_2 = ((t_0 + (2.0 * x2)) - x1) / t_1; tmp = x1 + (((((((((2.0 * x1) * t_2) * (t_2 - 3.0)) + ((x1 * x1) * ((4.0 * t_2) - 6.0))) * t_1) + (t_0 * t_2)) + ((x1 * x1) * x1)) + x1) + (3.0 * (((t_0 - (2.0 * x2)) - x1) / t_1))); end
code[x1_, x2_] := Block[{t$95$0 = N[(N[(3.0 * x1), $MachinePrecision] * x1), $MachinePrecision]}, Block[{t$95$1 = N[(N[(x1 * x1), $MachinePrecision] + 1.0), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[(t$95$0 + N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$1), $MachinePrecision]}, N[(x1 + N[(N[(N[(N[(N[(N[(N[(N[(N[(2.0 * x1), $MachinePrecision] * t$95$2), $MachinePrecision] * N[(t$95$2 - 3.0), $MachinePrecision]), $MachinePrecision] + N[(N[(x1 * x1), $MachinePrecision] * N[(N[(4.0 * t$95$2), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * t$95$1), $MachinePrecision] + N[(t$95$0 * t$95$2), $MachinePrecision]), $MachinePrecision] + N[(N[(x1 * x1), $MachinePrecision] * x1), $MachinePrecision]), $MachinePrecision] + x1), $MachinePrecision] + N[(3.0 * N[(N[(N[(t$95$0 - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \left(3 \cdot x1\right) \cdot x1\\
t_1 := x1 \cdot x1 + 1\\
t_2 := \frac{\left(t\_0 + 2 \cdot x2\right) - x1}{t\_1}\\
x1 + \left(\left(\left(\left(\left(\left(\left(2 \cdot x1\right) \cdot t\_2\right) \cdot \left(t\_2 - 3\right) + \left(x1 \cdot x1\right) \cdot \left(4 \cdot t\_2 - 6\right)\right) \cdot t\_1 + t\_0 \cdot t\_2\right) + \left(x1 \cdot x1\right) \cdot x1\right) + x1\right) + 3 \cdot \frac{\left(t\_0 - 2 \cdot x2\right) - x1}{t\_1}\right)
\end{array}
\end{array}
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (* x1 (* x1 x1)))
(t_1 (* x1 (* x1 3.0)))
(t_2 (+ t_1 (* 2.0 x2)))
(t_3 (+ (* x1 x1) 1.0))
(t_4 (- -1.0 (* x1 x1)))
(t_5 (/ (- x1 t_2) t_4))
(t_6 (* (* x1 2.0) t_5))
(t_7 (* t_5 4.0))
(t_8 (* 3.0 (/ (- x1 (- t_1 (* 2.0 x2))) t_4))))
(if (<=
(+
x1
(+
(+
x1
(+
(+
(* t_3 (+ (* t_6 (- t_5 3.0)) (* (* x1 x1) (- t_7 6.0))))
(* t_1 t_5))
t_0))
t_8))
INFINITY)
(+
x1
(-
t_8
(-
(-
(+
(* t_1 (/ (- t_2 x1) t_4))
(*
t_3
(+
(* (* x1 x1) (- 6.0 t_7))
(*
t_6
(+
3.0
(/
1.0
(/
(fma x1 x1 1.0)
(- x1 (fma 3.0 (pow x1 2.0) (* 2.0 x2))))))))))
t_0)
x1)))
(+
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 * x1);
double t_1 = x1 * (x1 * 3.0);
double t_2 = t_1 + (2.0 * x2);
double t_3 = (x1 * x1) + 1.0;
double t_4 = -1.0 - (x1 * x1);
double t_5 = (x1 - t_2) / t_4;
double t_6 = (x1 * 2.0) * t_5;
double t_7 = t_5 * 4.0;
double t_8 = 3.0 * ((x1 - (t_1 - (2.0 * x2))) / t_4);
double tmp;
if ((x1 + ((x1 + (((t_3 * ((t_6 * (t_5 - 3.0)) + ((x1 * x1) * (t_7 - 6.0)))) + (t_1 * t_5)) + t_0)) + t_8)) <= ((double) INFINITY)) {
tmp = x1 + (t_8 - ((((t_1 * ((t_2 - x1) / t_4)) + (t_3 * (((x1 * x1) * (6.0 - t_7)) + (t_6 * (3.0 + (1.0 / (fma(x1, x1, 1.0) / (x1 - fma(3.0, pow(x1, 2.0), (2.0 * x2)))))))))) - t_0) - x1));
} 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(x1 * Float64(x1 * x1)) t_1 = Float64(x1 * Float64(x1 * 3.0)) t_2 = Float64(t_1 + Float64(2.0 * x2)) t_3 = Float64(Float64(x1 * x1) + 1.0) t_4 = Float64(-1.0 - Float64(x1 * x1)) t_5 = Float64(Float64(x1 - t_2) / t_4) t_6 = Float64(Float64(x1 * 2.0) * t_5) t_7 = Float64(t_5 * 4.0) t_8 = Float64(3.0 * Float64(Float64(x1 - Float64(t_1 - Float64(2.0 * x2))) / t_4)) tmp = 0.0 if (Float64(x1 + Float64(Float64(x1 + Float64(Float64(Float64(t_3 * Float64(Float64(t_6 * Float64(t_5 - 3.0)) + Float64(Float64(x1 * x1) * Float64(t_7 - 6.0)))) + Float64(t_1 * t_5)) + t_0)) + t_8)) <= Inf) tmp = Float64(x1 + Float64(t_8 - Float64(Float64(Float64(Float64(t_1 * Float64(Float64(t_2 - x1) / t_4)) + Float64(t_3 * Float64(Float64(Float64(x1 * x1) * Float64(6.0 - t_7)) + Float64(t_6 * Float64(3.0 + Float64(1.0 / Float64(fma(x1, x1, 1.0) / Float64(x1 - fma(3.0, (x1 ^ 2.0), Float64(2.0 * x2)))))))))) - t_0) - x1))); 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[(x1 * N[(x1 * x1), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(x1 * N[(x1 * 3.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(t$95$1 + N[(2.0 * x2), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[(x1 * x1), $MachinePrecision] + 1.0), $MachinePrecision]}, Block[{t$95$4 = N[(-1.0 - N[(x1 * x1), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$5 = N[(N[(x1 - t$95$2), $MachinePrecision] / t$95$4), $MachinePrecision]}, Block[{t$95$6 = N[(N[(x1 * 2.0), $MachinePrecision] * t$95$5), $MachinePrecision]}, Block[{t$95$7 = N[(t$95$5 * 4.0), $MachinePrecision]}, Block[{t$95$8 = N[(3.0 * N[(N[(x1 - N[(t$95$1 - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / t$95$4), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(x1 + N[(N[(x1 + N[(N[(N[(t$95$3 * N[(N[(t$95$6 * N[(t$95$5 - 3.0), $MachinePrecision]), $MachinePrecision] + N[(N[(x1 * x1), $MachinePrecision] * N[(t$95$7 - 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(t$95$1 * t$95$5), $MachinePrecision]), $MachinePrecision] + t$95$0), $MachinePrecision]), $MachinePrecision] + t$95$8), $MachinePrecision]), $MachinePrecision], Infinity], N[(x1 + N[(t$95$8 - N[(N[(N[(N[(t$95$1 * N[(N[(t$95$2 - x1), $MachinePrecision] / t$95$4), $MachinePrecision]), $MachinePrecision] + N[(t$95$3 * N[(N[(N[(x1 * x1), $MachinePrecision] * N[(6.0 - t$95$7), $MachinePrecision]), $MachinePrecision] + N[(t$95$6 * N[(3.0 + N[(1.0 / N[(N[(x1 * x1 + 1.0), $MachinePrecision] / N[(x1 - N[(3.0 * N[Power[x1, 2.0], $MachinePrecision] + N[(2.0 * x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision] - x1), $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 \left(x1 \cdot x1\right)\\
t_1 := x1 \cdot \left(x1 \cdot 3\right)\\
t_2 := t\_1 + 2 \cdot x2\\
t_3 := x1 \cdot x1 + 1\\
t_4 := -1 - x1 \cdot x1\\
t_5 := \frac{x1 - t\_2}{t\_4}\\
t_6 := \left(x1 \cdot 2\right) \cdot t\_5\\
t_7 := t\_5 \cdot 4\\
t_8 := 3 \cdot \frac{x1 - \left(t\_1 - 2 \cdot x2\right)}{t\_4}\\
\mathbf{if}\;x1 + \left(\left(x1 + \left(\left(t\_3 \cdot \left(t\_6 \cdot \left(t\_5 - 3\right) + \left(x1 \cdot x1\right) \cdot \left(t\_7 - 6\right)\right) + t\_1 \cdot t\_5\right) + t\_0\right)\right) + t\_8\right) \leq \infty:\\
\;\;\;\;x1 + \left(t\_8 - \left(\left(\left(t\_1 \cdot \frac{t\_2 - x1}{t\_4} + t\_3 \cdot \left(\left(x1 \cdot x1\right) \cdot \left(6 - t\_7\right) + t\_6 \cdot \left(3 + \frac{1}{\frac{\mathsf{fma}\left(x1, x1, 1\right)}{x1 - \mathsf{fma}\left(3, {x1}^{2}, 2 \cdot x2\right)}}\right)\right)\right) - t\_0\right) - x1\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.3%
clear-num99.3%
inv-pow99.3%
fma-define99.3%
associate-*r*99.3%
fma-define99.3%
pow299.3%
Applied egg-rr99.3%
unpow-199.3%
Simplified99.3%
if +inf.0 < (+.f64 x1 (+.f64 (+.f64 (+.f64 (+.f64 (*.f64 (+.f64 (*.f64 (*.f64 (*.f64 #s(literal 2 binary64) x1) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64)))) (-.f64 (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))) #s(literal 3 binary64))) (*.f64 (*.f64 x1 x1) (-.f64 (*.f64 #s(literal 4 binary64) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64)))) #s(literal 6 binary64)))) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))) (*.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))))) (*.f64 (*.f64 x1 x1) x1)) x1) (*.f64 #s(literal 3 binary64) (/.f64 (-.f64 (-.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64)))))) Initial program 0.0%
Taylor expanded in x1 around -inf 19.1%
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 (- -1.0 (* x1 x1)))
(t_2 (/ (- x1 (+ t_0 (* 2.0 x2))) t_1))
(t_3
(+
x1
(+
(+
x1
(+
(+
(*
(+ (* x1 x1) 1.0)
(+
(* (* (* x1 2.0) t_2) (- t_2 3.0))
(* (* x1 x1) (- (* t_2 4.0) 6.0))))
(* t_0 t_2))
(* x1 (* x1 x1))))
(* 3.0 (/ (- x1 (- t_0 (* 2.0 x2))) t_1))))))
(if (<= t_3 INFINITY) t_3 (+ x1 (+ 9.0 (+ x1 (* 6.0 (pow x1 4.0))))))))
double code(double x1, double x2) {
double t_0 = x1 * (x1 * 3.0);
double t_1 = -1.0 - (x1 * x1);
double t_2 = (x1 - (t_0 + (2.0 * x2))) / t_1;
double t_3 = x1 + ((x1 + (((((x1 * x1) + 1.0) * ((((x1 * 2.0) * t_2) * (t_2 - 3.0)) + ((x1 * x1) * ((t_2 * 4.0) - 6.0)))) + (t_0 * t_2)) + (x1 * (x1 * x1)))) + (3.0 * ((x1 - (t_0 - (2.0 * x2))) / t_1)));
double tmp;
if (t_3 <= ((double) INFINITY)) {
tmp = t_3;
} else {
tmp = x1 + (9.0 + (x1 + (6.0 * pow(x1, 4.0))));
}
return tmp;
}
public static double code(double x1, double x2) {
double t_0 = x1 * (x1 * 3.0);
double t_1 = -1.0 - (x1 * x1);
double t_2 = (x1 - (t_0 + (2.0 * x2))) / t_1;
double t_3 = x1 + ((x1 + (((((x1 * x1) + 1.0) * ((((x1 * 2.0) * t_2) * (t_2 - 3.0)) + ((x1 * x1) * ((t_2 * 4.0) - 6.0)))) + (t_0 * t_2)) + (x1 * (x1 * x1)))) + (3.0 * ((x1 - (t_0 - (2.0 * x2))) / t_1)));
double tmp;
if (t_3 <= Double.POSITIVE_INFINITY) {
tmp = t_3;
} else {
tmp = x1 + (9.0 + (x1 + (6.0 * Math.pow(x1, 4.0))));
}
return tmp;
}
def code(x1, x2): t_0 = x1 * (x1 * 3.0) t_1 = -1.0 - (x1 * x1) t_2 = (x1 - (t_0 + (2.0 * x2))) / t_1 t_3 = x1 + ((x1 + (((((x1 * x1) + 1.0) * ((((x1 * 2.0) * t_2) * (t_2 - 3.0)) + ((x1 * x1) * ((t_2 * 4.0) - 6.0)))) + (t_0 * t_2)) + (x1 * (x1 * x1)))) + (3.0 * ((x1 - (t_0 - (2.0 * x2))) / t_1))) tmp = 0 if t_3 <= math.inf: tmp = t_3 else: tmp = x1 + (9.0 + (x1 + (6.0 * math.pow(x1, 4.0)))) return tmp
function code(x1, x2) t_0 = Float64(x1 * Float64(x1 * 3.0)) t_1 = Float64(-1.0 - Float64(x1 * x1)) t_2 = Float64(Float64(x1 - Float64(t_0 + Float64(2.0 * x2))) / t_1) t_3 = Float64(x1 + Float64(Float64(x1 + Float64(Float64(Float64(Float64(Float64(x1 * x1) + 1.0) * Float64(Float64(Float64(Float64(x1 * 2.0) * t_2) * Float64(t_2 - 3.0)) + Float64(Float64(x1 * x1) * Float64(Float64(t_2 * 4.0) - 6.0)))) + Float64(t_0 * t_2)) + Float64(x1 * Float64(x1 * x1)))) + Float64(3.0 * Float64(Float64(x1 - Float64(t_0 - Float64(2.0 * x2))) / t_1)))) tmp = 0.0 if (t_3 <= Inf) tmp = t_3; else tmp = Float64(x1 + Float64(9.0 + Float64(x1 + Float64(6.0 * (x1 ^ 4.0))))); end return tmp end
function tmp_2 = code(x1, x2) t_0 = x1 * (x1 * 3.0); t_1 = -1.0 - (x1 * x1); t_2 = (x1 - (t_0 + (2.0 * x2))) / t_1; t_3 = x1 + ((x1 + (((((x1 * x1) + 1.0) * ((((x1 * 2.0) * t_2) * (t_2 - 3.0)) + ((x1 * x1) * ((t_2 * 4.0) - 6.0)))) + (t_0 * t_2)) + (x1 * (x1 * x1)))) + (3.0 * ((x1 - (t_0 - (2.0 * x2))) / t_1))); tmp = 0.0; if (t_3 <= Inf) tmp = t_3; else tmp = x1 + (9.0 + (x1 + (6.0 * (x1 ^ 4.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[(-1.0 - N[(x1 * x1), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(x1 - N[(t$95$0 + N[(2.0 * x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / t$95$1), $MachinePrecision]}, Block[{t$95$3 = N[(x1 + N[(N[(x1 + N[(N[(N[(N[(N[(x1 * x1), $MachinePrecision] + 1.0), $MachinePrecision] * N[(N[(N[(N[(x1 * 2.0), $MachinePrecision] * t$95$2), $MachinePrecision] * N[(t$95$2 - 3.0), $MachinePrecision]), $MachinePrecision] + N[(N[(x1 * x1), $MachinePrecision] * N[(N[(t$95$2 * 4.0), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(t$95$0 * t$95$2), $MachinePrecision]), $MachinePrecision] + N[(x1 * N[(x1 * x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(3.0 * N[(N[(x1 - N[(t$95$0 - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$3, Infinity], t$95$3, N[(x1 + N[(9.0 + N[(x1 + N[(6.0 * N[Power[x1, 4.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x1 \cdot \left(x1 \cdot 3\right)\\
t_1 := -1 - x1 \cdot x1\\
t_2 := \frac{x1 - \left(t\_0 + 2 \cdot x2\right)}{t\_1}\\
t_3 := x1 + \left(\left(x1 + \left(\left(\left(x1 \cdot x1 + 1\right) \cdot \left(\left(\left(x1 \cdot 2\right) \cdot t\_2\right) \cdot \left(t\_2 - 3\right) + \left(x1 \cdot x1\right) \cdot \left(t\_2 \cdot 4 - 6\right)\right) + t\_0 \cdot t\_2\right) + x1 \cdot \left(x1 \cdot x1\right)\right)\right) + 3 \cdot \frac{x1 - \left(t\_0 - 2 \cdot x2\right)}{t\_1}\right)\\
\mathbf{if}\;t\_3 \leq \infty:\\
\;\;\;\;t\_3\\
\mathbf{else}:\\
\;\;\;\;x1 + \left(9 + \left(x1 + 6 \cdot {x1}^{4}\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.3%
if +inf.0 < (+.f64 x1 (+.f64 (+.f64 (+.f64 (+.f64 (*.f64 (+.f64 (*.f64 (*.f64 (*.f64 #s(literal 2 binary64) x1) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64)))) (-.f64 (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))) #s(literal 3 binary64))) (*.f64 (*.f64 x1 x1) (-.f64 (*.f64 #s(literal 4 binary64) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64)))) #s(literal 6 binary64)))) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))) (*.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))))) (*.f64 (*.f64 x1 x1) x1)) x1) (*.f64 #s(literal 3 binary64) (/.f64 (-.f64 (-.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64)))))) Initial program 0.0%
Taylor expanded in x1 around 0 0.0%
+-commutative0.0%
mul-1-neg0.0%
unsub-neg0.0%
Simplified0.0%
Taylor expanded in x1 around inf 0.0%
Taylor expanded in x1 around inf 98.9%
*-commutative98.9%
Simplified98.9%
Final simplification99.2%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (* x1 (* x1 3.0)))
(t_1 (- -1.0 (* x1 x1)))
(t_2 (/ (- x1 (+ t_0 (* 2.0 x2))) t_1))
(t_3
(+
x1
(+
(+
x1
(+
(+
(*
(+ (* x1 x1) 1.0)
(+
(* (* (* x1 2.0) t_2) (- t_2 3.0))
(* (* x1 x1) (- (* t_2 4.0) 6.0))))
(* t_0 t_2))
(* x1 (* x1 x1))))
(* 3.0 (/ (- x1 (- t_0 (* 2.0 x2))) t_1))))))
(if (<= t_3 INFINITY)
t_3
(+
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 = -1.0 - (x1 * x1);
double t_2 = (x1 - (t_0 + (2.0 * x2))) / t_1;
double t_3 = x1 + ((x1 + (((((x1 * x1) + 1.0) * ((((x1 * 2.0) * t_2) * (t_2 - 3.0)) + ((x1 * x1) * ((t_2 * 4.0) - 6.0)))) + (t_0 * t_2)) + (x1 * (x1 * x1)))) + (3.0 * ((x1 - (t_0 - (2.0 * x2))) / t_1)));
double tmp;
if (t_3 <= ((double) INFINITY)) {
tmp = t_3;
} 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 = -1.0 - (x1 * x1);
double t_2 = (x1 - (t_0 + (2.0 * x2))) / t_1;
double t_3 = x1 + ((x1 + (((((x1 * x1) + 1.0) * ((((x1 * 2.0) * t_2) * (t_2 - 3.0)) + ((x1 * x1) * ((t_2 * 4.0) - 6.0)))) + (t_0 * t_2)) + (x1 * (x1 * x1)))) + (3.0 * ((x1 - (t_0 - (2.0 * x2))) / t_1)));
double tmp;
if (t_3 <= Double.POSITIVE_INFINITY) {
tmp = t_3;
} 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 = -1.0 - (x1 * x1) t_2 = (x1 - (t_0 + (2.0 * x2))) / t_1 t_3 = x1 + ((x1 + (((((x1 * x1) + 1.0) * ((((x1 * 2.0) * t_2) * (t_2 - 3.0)) + ((x1 * x1) * ((t_2 * 4.0) - 6.0)))) + (t_0 * t_2)) + (x1 * (x1 * x1)))) + (3.0 * ((x1 - (t_0 - (2.0 * x2))) / t_1))) tmp = 0 if t_3 <= math.inf: tmp = t_3 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(-1.0 - Float64(x1 * x1)) t_2 = Float64(Float64(x1 - Float64(t_0 + Float64(2.0 * x2))) / t_1) t_3 = Float64(x1 + Float64(Float64(x1 + Float64(Float64(Float64(Float64(Float64(x1 * x1) + 1.0) * Float64(Float64(Float64(Float64(x1 * 2.0) * t_2) * Float64(t_2 - 3.0)) + Float64(Float64(x1 * x1) * Float64(Float64(t_2 * 4.0) - 6.0)))) + Float64(t_0 * t_2)) + Float64(x1 * Float64(x1 * x1)))) + Float64(3.0 * Float64(Float64(x1 - Float64(t_0 - Float64(2.0 * x2))) / t_1)))) tmp = 0.0 if (t_3 <= Inf) tmp = t_3; 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 = -1.0 - (x1 * x1); t_2 = (x1 - (t_0 + (2.0 * x2))) / t_1; t_3 = x1 + ((x1 + (((((x1 * x1) + 1.0) * ((((x1 * 2.0) * t_2) * (t_2 - 3.0)) + ((x1 * x1) * ((t_2 * 4.0) - 6.0)))) + (t_0 * t_2)) + (x1 * (x1 * x1)))) + (3.0 * ((x1 - (t_0 - (2.0 * x2))) / t_1))); tmp = 0.0; if (t_3 <= Inf) tmp = t_3; 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[(-1.0 - N[(x1 * x1), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(x1 - N[(t$95$0 + N[(2.0 * x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / t$95$1), $MachinePrecision]}, Block[{t$95$3 = N[(x1 + N[(N[(x1 + N[(N[(N[(N[(N[(x1 * x1), $MachinePrecision] + 1.0), $MachinePrecision] * N[(N[(N[(N[(x1 * 2.0), $MachinePrecision] * t$95$2), $MachinePrecision] * N[(t$95$2 - 3.0), $MachinePrecision]), $MachinePrecision] + N[(N[(x1 * x1), $MachinePrecision] * N[(N[(t$95$2 * 4.0), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(t$95$0 * t$95$2), $MachinePrecision]), $MachinePrecision] + N[(x1 * N[(x1 * x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(3.0 * N[(N[(x1 - N[(t$95$0 - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$3, Infinity], t$95$3, 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 := -1 - x1 \cdot x1\\
t_2 := \frac{x1 - \left(t\_0 + 2 \cdot x2\right)}{t\_1}\\
t_3 := x1 + \left(\left(x1 + \left(\left(\left(x1 \cdot x1 + 1\right) \cdot \left(\left(\left(x1 \cdot 2\right) \cdot t\_2\right) \cdot \left(t\_2 - 3\right) + \left(x1 \cdot x1\right) \cdot \left(t\_2 \cdot 4 - 6\right)\right) + t\_0 \cdot t\_2\right) + x1 \cdot \left(x1 \cdot x1\right)\right)\right) + 3 \cdot \frac{x1 - \left(t\_0 - 2 \cdot x2\right)}{t\_1}\right)\\
\mathbf{if}\;t\_3 \leq \infty:\\
\;\;\;\;t\_3\\
\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.3%
if +inf.0 < (+.f64 x1 (+.f64 (+.f64 (+.f64 (+.f64 (*.f64 (+.f64 (*.f64 (*.f64 (*.f64 #s(literal 2 binary64) x1) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64)))) (-.f64 (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))) #s(literal 3 binary64))) (*.f64 (*.f64 x1 x1) (-.f64 (*.f64 #s(literal 4 binary64) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64)))) #s(literal 6 binary64)))) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))) (*.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))))) (*.f64 (*.f64 x1 x1) x1)) x1) (*.f64 #s(literal 3 binary64) (/.f64 (-.f64 (-.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64)))))) Initial program 0.0%
Taylor expanded in x1 around -inf 19.1%
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)))
(t_2 (+ x1 (+ 9.0 (+ x1 (* 6.0 (pow x1 4.0))))))
(t_3 (* x1 (* x1 x1)))
(t_4 (+ (* x1 x1) 1.0))
(t_5 (- -1.0 (* x1 x1)))
(t_6 (/ (- x1 t_1) t_5))
(t_7 (- t_6 3.0))
(t_8 (* (* x1 x1) (- (* t_6 4.0) 6.0))))
(if (<= x1 -5e+102)
t_2
(if (<= x1 -0.018)
(+
x1
(+
(+
x1
(+ (+ (* t_4 (+ (* (* (* x1 2.0) t_6) t_7) t_8)) (* t_0 t_6)) t_3))
9.0))
(if (<= x1 2.4e+46)
(+
x1
(+
(* 3.0 (/ (- x1 (- t_0 (* 2.0 x2))) t_5))
(+
x1
(-
t_3
(+
(* t_0 (/ (- t_1 x1) t_5))
(* t_4 (- (* t_7 (* (* x1 2.0) (- x1 (* 2.0 x2)))) t_8)))))))
t_2)))))
double code(double x1, double x2) {
double t_0 = x1 * (x1 * 3.0);
double t_1 = t_0 + (2.0 * x2);
double t_2 = x1 + (9.0 + (x1 + (6.0 * pow(x1, 4.0))));
double t_3 = x1 * (x1 * x1);
double t_4 = (x1 * x1) + 1.0;
double t_5 = -1.0 - (x1 * x1);
double t_6 = (x1 - t_1) / t_5;
double t_7 = t_6 - 3.0;
double t_8 = (x1 * x1) * ((t_6 * 4.0) - 6.0);
double tmp;
if (x1 <= -5e+102) {
tmp = t_2;
} else if (x1 <= -0.018) {
tmp = x1 + ((x1 + (((t_4 * ((((x1 * 2.0) * t_6) * t_7) + t_8)) + (t_0 * t_6)) + t_3)) + 9.0);
} else if (x1 <= 2.4e+46) {
tmp = x1 + ((3.0 * ((x1 - (t_0 - (2.0 * x2))) / t_5)) + (x1 + (t_3 - ((t_0 * ((t_1 - x1) / t_5)) + (t_4 * ((t_7 * ((x1 * 2.0) * (x1 - (2.0 * x2)))) - t_8))))));
} else {
tmp = t_2;
}
return tmp;
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
real(8) :: t_0
real(8) :: t_1
real(8) :: t_2
real(8) :: t_3
real(8) :: t_4
real(8) :: t_5
real(8) :: t_6
real(8) :: t_7
real(8) :: t_8
real(8) :: tmp
t_0 = x1 * (x1 * 3.0d0)
t_1 = t_0 + (2.0d0 * x2)
t_2 = x1 + (9.0d0 + (x1 + (6.0d0 * (x1 ** 4.0d0))))
t_3 = x1 * (x1 * x1)
t_4 = (x1 * x1) + 1.0d0
t_5 = (-1.0d0) - (x1 * x1)
t_6 = (x1 - t_1) / t_5
t_7 = t_6 - 3.0d0
t_8 = (x1 * x1) * ((t_6 * 4.0d0) - 6.0d0)
if (x1 <= (-5d+102)) then
tmp = t_2
else if (x1 <= (-0.018d0)) then
tmp = x1 + ((x1 + (((t_4 * ((((x1 * 2.0d0) * t_6) * t_7) + t_8)) + (t_0 * t_6)) + t_3)) + 9.0d0)
else if (x1 <= 2.4d+46) then
tmp = x1 + ((3.0d0 * ((x1 - (t_0 - (2.0d0 * x2))) / t_5)) + (x1 + (t_3 - ((t_0 * ((t_1 - x1) / t_5)) + (t_4 * ((t_7 * ((x1 * 2.0d0) * (x1 - (2.0d0 * x2)))) - t_8))))))
else
tmp = t_2
end if
code = tmp
end function
public static double code(double x1, double x2) {
double t_0 = x1 * (x1 * 3.0);
double t_1 = t_0 + (2.0 * x2);
double t_2 = x1 + (9.0 + (x1 + (6.0 * Math.pow(x1, 4.0))));
double t_3 = x1 * (x1 * x1);
double t_4 = (x1 * x1) + 1.0;
double t_5 = -1.0 - (x1 * x1);
double t_6 = (x1 - t_1) / t_5;
double t_7 = t_6 - 3.0;
double t_8 = (x1 * x1) * ((t_6 * 4.0) - 6.0);
double tmp;
if (x1 <= -5e+102) {
tmp = t_2;
} else if (x1 <= -0.018) {
tmp = x1 + ((x1 + (((t_4 * ((((x1 * 2.0) * t_6) * t_7) + t_8)) + (t_0 * t_6)) + t_3)) + 9.0);
} else if (x1 <= 2.4e+46) {
tmp = x1 + ((3.0 * ((x1 - (t_0 - (2.0 * x2))) / t_5)) + (x1 + (t_3 - ((t_0 * ((t_1 - x1) / t_5)) + (t_4 * ((t_7 * ((x1 * 2.0) * (x1 - (2.0 * x2)))) - t_8))))));
} else {
tmp = t_2;
}
return tmp;
}
def code(x1, x2): t_0 = x1 * (x1 * 3.0) t_1 = t_0 + (2.0 * x2) t_2 = x1 + (9.0 + (x1 + (6.0 * math.pow(x1, 4.0)))) t_3 = x1 * (x1 * x1) t_4 = (x1 * x1) + 1.0 t_5 = -1.0 - (x1 * x1) t_6 = (x1 - t_1) / t_5 t_7 = t_6 - 3.0 t_8 = (x1 * x1) * ((t_6 * 4.0) - 6.0) tmp = 0 if x1 <= -5e+102: tmp = t_2 elif x1 <= -0.018: tmp = x1 + ((x1 + (((t_4 * ((((x1 * 2.0) * t_6) * t_7) + t_8)) + (t_0 * t_6)) + t_3)) + 9.0) elif x1 <= 2.4e+46: tmp = x1 + ((3.0 * ((x1 - (t_0 - (2.0 * x2))) / t_5)) + (x1 + (t_3 - ((t_0 * ((t_1 - x1) / t_5)) + (t_4 * ((t_7 * ((x1 * 2.0) * (x1 - (2.0 * x2)))) - t_8)))))) else: tmp = t_2 return tmp
function code(x1, x2) t_0 = Float64(x1 * Float64(x1 * 3.0)) t_1 = Float64(t_0 + Float64(2.0 * x2)) t_2 = Float64(x1 + Float64(9.0 + Float64(x1 + Float64(6.0 * (x1 ^ 4.0))))) t_3 = Float64(x1 * Float64(x1 * x1)) t_4 = Float64(Float64(x1 * x1) + 1.0) t_5 = Float64(-1.0 - Float64(x1 * x1)) t_6 = Float64(Float64(x1 - t_1) / t_5) t_7 = Float64(t_6 - 3.0) t_8 = Float64(Float64(x1 * x1) * Float64(Float64(t_6 * 4.0) - 6.0)) tmp = 0.0 if (x1 <= -5e+102) tmp = t_2; elseif (x1 <= -0.018) tmp = Float64(x1 + Float64(Float64(x1 + Float64(Float64(Float64(t_4 * Float64(Float64(Float64(Float64(x1 * 2.0) * t_6) * t_7) + t_8)) + Float64(t_0 * t_6)) + t_3)) + 9.0)); elseif (x1 <= 2.4e+46) tmp = Float64(x1 + Float64(Float64(3.0 * Float64(Float64(x1 - Float64(t_0 - Float64(2.0 * x2))) / t_5)) + Float64(x1 + Float64(t_3 - Float64(Float64(t_0 * Float64(Float64(t_1 - x1) / t_5)) + Float64(t_4 * Float64(Float64(t_7 * Float64(Float64(x1 * 2.0) * Float64(x1 - Float64(2.0 * x2)))) - t_8))))))); else tmp = t_2; end return tmp end
function tmp_2 = code(x1, x2) t_0 = x1 * (x1 * 3.0); t_1 = t_0 + (2.0 * x2); t_2 = x1 + (9.0 + (x1 + (6.0 * (x1 ^ 4.0)))); t_3 = x1 * (x1 * x1); t_4 = (x1 * x1) + 1.0; t_5 = -1.0 - (x1 * x1); t_6 = (x1 - t_1) / t_5; t_7 = t_6 - 3.0; t_8 = (x1 * x1) * ((t_6 * 4.0) - 6.0); tmp = 0.0; if (x1 <= -5e+102) tmp = t_2; elseif (x1 <= -0.018) tmp = x1 + ((x1 + (((t_4 * ((((x1 * 2.0) * t_6) * t_7) + t_8)) + (t_0 * t_6)) + t_3)) + 9.0); elseif (x1 <= 2.4e+46) tmp = x1 + ((3.0 * ((x1 - (t_0 - (2.0 * x2))) / t_5)) + (x1 + (t_3 - ((t_0 * ((t_1 - x1) / t_5)) + (t_4 * ((t_7 * ((x1 * 2.0) * (x1 - (2.0 * x2)))) - t_8)))))); else tmp = t_2; end tmp_2 = tmp; end
code[x1_, x2_] := Block[{t$95$0 = N[(x1 * N[(x1 * 3.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(t$95$0 + N[(2.0 * x2), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x1 + N[(9.0 + N[(x1 + N[(6.0 * N[Power[x1, 4.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(x1 * N[(x1 * x1), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[(N[(x1 * x1), $MachinePrecision] + 1.0), $MachinePrecision]}, Block[{t$95$5 = N[(-1.0 - N[(x1 * x1), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$6 = N[(N[(x1 - t$95$1), $MachinePrecision] / t$95$5), $MachinePrecision]}, Block[{t$95$7 = N[(t$95$6 - 3.0), $MachinePrecision]}, Block[{t$95$8 = N[(N[(x1 * x1), $MachinePrecision] * N[(N[(t$95$6 * 4.0), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x1, -5e+102], t$95$2, If[LessEqual[x1, -0.018], N[(x1 + N[(N[(x1 + N[(N[(N[(t$95$4 * N[(N[(N[(N[(x1 * 2.0), $MachinePrecision] * t$95$6), $MachinePrecision] * t$95$7), $MachinePrecision] + t$95$8), $MachinePrecision]), $MachinePrecision] + N[(t$95$0 * t$95$6), $MachinePrecision]), $MachinePrecision] + t$95$3), $MachinePrecision]), $MachinePrecision] + 9.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 2.4e+46], N[(x1 + N[(N[(3.0 * N[(N[(x1 - N[(t$95$0 - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / t$95$5), $MachinePrecision]), $MachinePrecision] + N[(x1 + N[(t$95$3 - N[(N[(t$95$0 * N[(N[(t$95$1 - x1), $MachinePrecision] / t$95$5), $MachinePrecision]), $MachinePrecision] + N[(t$95$4 * N[(N[(t$95$7 * N[(N[(x1 * 2.0), $MachinePrecision] * N[(x1 - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$8), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$2]]]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x1 \cdot \left(x1 \cdot 3\right)\\
t_1 := t\_0 + 2 \cdot x2\\
t_2 := x1 + \left(9 + \left(x1 + 6 \cdot {x1}^{4}\right)\right)\\
t_3 := x1 \cdot \left(x1 \cdot x1\right)\\
t_4 := x1 \cdot x1 + 1\\
t_5 := -1 - x1 \cdot x1\\
t_6 := \frac{x1 - t\_1}{t\_5}\\
t_7 := t\_6 - 3\\
t_8 := \left(x1 \cdot x1\right) \cdot \left(t\_6 \cdot 4 - 6\right)\\
\mathbf{if}\;x1 \leq -5 \cdot 10^{+102}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;x1 \leq -0.018:\\
\;\;\;\;x1 + \left(\left(x1 + \left(\left(t\_4 \cdot \left(\left(\left(x1 \cdot 2\right) \cdot t\_6\right) \cdot t\_7 + t\_8\right) + t\_0 \cdot t\_6\right) + t\_3\right)\right) + 9\right)\\
\mathbf{elif}\;x1 \leq 2.4 \cdot 10^{+46}:\\
\;\;\;\;x1 + \left(3 \cdot \frac{x1 - \left(t\_0 - 2 \cdot x2\right)}{t\_5} + \left(x1 + \left(t\_3 - \left(t\_0 \cdot \frac{t\_1 - x1}{t\_5} + t\_4 \cdot \left(t\_7 \cdot \left(\left(x1 \cdot 2\right) \cdot \left(x1 - 2 \cdot x2\right)\right) - t\_8\right)\right)\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if x1 < -5e102 or 2.40000000000000008e46 < x1 Initial program 24.1%
Taylor expanded in x1 around 0 20.9%
+-commutative20.9%
mul-1-neg20.9%
unsub-neg20.9%
Simplified20.9%
Taylor expanded in x1 around inf 20.9%
Taylor expanded in x1 around inf 97.6%
*-commutative97.6%
Simplified97.6%
if -5e102 < x1 < -0.0179999999999999986Initial program 99.0%
Taylor expanded in x1 around inf 95.5%
if -0.0179999999999999986 < x1 < 2.40000000000000008e46Initial program 99.2%
Taylor expanded in x1 around 0 97.2%
+-commutative97.2%
mul-1-neg97.2%
unsub-neg97.2%
Simplified97.2%
Final simplification97.3%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (* x1 (* x1 3.0)))
(t_1 (+ t_0 (* 2.0 x2)))
(t_2 (+ x1 (+ 9.0 (+ x1 (* 6.0 (pow x1 4.0))))))
(t_3 (* x1 (* x1 x1)))
(t_4 (+ (* x1 x1) 1.0))
(t_5 (- -1.0 (* x1 x1)))
(t_6 (/ (- x1 t_1) t_5))
(t_7 (* (* x1 2.0) t_6))
(t_8 (* t_6 4.0)))
(if (<= x1 -5e+102)
t_2
(if (<= x1 -0.00085)
(+
x1
(+
(+
x1
(+
(+
(* t_4 (+ (* t_7 (- t_6 3.0)) (* (* x1 x1) (- t_8 6.0))))
(* t_0 t_6))
t_3))
9.0))
(if (<= x1 2.3e+46)
(+
x1
(-
(* 3.0 (/ (- x1 (- t_0 (* 2.0 x2))) t_5))
(-
(-
(+
(* t_0 (/ (- t_1 x1) t_5))
(*
t_4
(+
(* (* x1 x1) (- 6.0 t_8))
(* t_7 (+ 3.0 (/ -1.0 (/ 0.5 x2)))))))
t_3)
x1)))
t_2)))))
double code(double x1, double x2) {
double t_0 = x1 * (x1 * 3.0);
double t_1 = t_0 + (2.0 * x2);
double t_2 = x1 + (9.0 + (x1 + (6.0 * pow(x1, 4.0))));
double t_3 = x1 * (x1 * x1);
double t_4 = (x1 * x1) + 1.0;
double t_5 = -1.0 - (x1 * x1);
double t_6 = (x1 - t_1) / t_5;
double t_7 = (x1 * 2.0) * t_6;
double t_8 = t_6 * 4.0;
double tmp;
if (x1 <= -5e+102) {
tmp = t_2;
} else if (x1 <= -0.00085) {
tmp = x1 + ((x1 + (((t_4 * ((t_7 * (t_6 - 3.0)) + ((x1 * x1) * (t_8 - 6.0)))) + (t_0 * t_6)) + t_3)) + 9.0);
} else if (x1 <= 2.3e+46) {
tmp = x1 + ((3.0 * ((x1 - (t_0 - (2.0 * x2))) / t_5)) - ((((t_0 * ((t_1 - x1) / t_5)) + (t_4 * (((x1 * x1) * (6.0 - t_8)) + (t_7 * (3.0 + (-1.0 / (0.5 / x2))))))) - t_3) - x1));
} else {
tmp = t_2;
}
return tmp;
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
real(8) :: t_0
real(8) :: t_1
real(8) :: t_2
real(8) :: t_3
real(8) :: t_4
real(8) :: t_5
real(8) :: t_6
real(8) :: t_7
real(8) :: t_8
real(8) :: tmp
t_0 = x1 * (x1 * 3.0d0)
t_1 = t_0 + (2.0d0 * x2)
t_2 = x1 + (9.0d0 + (x1 + (6.0d0 * (x1 ** 4.0d0))))
t_3 = x1 * (x1 * x1)
t_4 = (x1 * x1) + 1.0d0
t_5 = (-1.0d0) - (x1 * x1)
t_6 = (x1 - t_1) / t_5
t_7 = (x1 * 2.0d0) * t_6
t_8 = t_6 * 4.0d0
if (x1 <= (-5d+102)) then
tmp = t_2
else if (x1 <= (-0.00085d0)) then
tmp = x1 + ((x1 + (((t_4 * ((t_7 * (t_6 - 3.0d0)) + ((x1 * x1) * (t_8 - 6.0d0)))) + (t_0 * t_6)) + t_3)) + 9.0d0)
else if (x1 <= 2.3d+46) then
tmp = x1 + ((3.0d0 * ((x1 - (t_0 - (2.0d0 * x2))) / t_5)) - ((((t_0 * ((t_1 - x1) / t_5)) + (t_4 * (((x1 * x1) * (6.0d0 - t_8)) + (t_7 * (3.0d0 + ((-1.0d0) / (0.5d0 / x2))))))) - t_3) - x1))
else
tmp = t_2
end if
code = tmp
end function
public static double code(double x1, double x2) {
double t_0 = x1 * (x1 * 3.0);
double t_1 = t_0 + (2.0 * x2);
double t_2 = x1 + (9.0 + (x1 + (6.0 * Math.pow(x1, 4.0))));
double t_3 = x1 * (x1 * x1);
double t_4 = (x1 * x1) + 1.0;
double t_5 = -1.0 - (x1 * x1);
double t_6 = (x1 - t_1) / t_5;
double t_7 = (x1 * 2.0) * t_6;
double t_8 = t_6 * 4.0;
double tmp;
if (x1 <= -5e+102) {
tmp = t_2;
} else if (x1 <= -0.00085) {
tmp = x1 + ((x1 + (((t_4 * ((t_7 * (t_6 - 3.0)) + ((x1 * x1) * (t_8 - 6.0)))) + (t_0 * t_6)) + t_3)) + 9.0);
} else if (x1 <= 2.3e+46) {
tmp = x1 + ((3.0 * ((x1 - (t_0 - (2.0 * x2))) / t_5)) - ((((t_0 * ((t_1 - x1) / t_5)) + (t_4 * (((x1 * x1) * (6.0 - t_8)) + (t_7 * (3.0 + (-1.0 / (0.5 / x2))))))) - t_3) - x1));
} else {
tmp = t_2;
}
return tmp;
}
def code(x1, x2): t_0 = x1 * (x1 * 3.0) t_1 = t_0 + (2.0 * x2) t_2 = x1 + (9.0 + (x1 + (6.0 * math.pow(x1, 4.0)))) t_3 = x1 * (x1 * x1) t_4 = (x1 * x1) + 1.0 t_5 = -1.0 - (x1 * x1) t_6 = (x1 - t_1) / t_5 t_7 = (x1 * 2.0) * t_6 t_8 = t_6 * 4.0 tmp = 0 if x1 <= -5e+102: tmp = t_2 elif x1 <= -0.00085: tmp = x1 + ((x1 + (((t_4 * ((t_7 * (t_6 - 3.0)) + ((x1 * x1) * (t_8 - 6.0)))) + (t_0 * t_6)) + t_3)) + 9.0) elif x1 <= 2.3e+46: tmp = x1 + ((3.0 * ((x1 - (t_0 - (2.0 * x2))) / t_5)) - ((((t_0 * ((t_1 - x1) / t_5)) + (t_4 * (((x1 * x1) * (6.0 - t_8)) + (t_7 * (3.0 + (-1.0 / (0.5 / x2))))))) - t_3) - x1)) else: tmp = t_2 return tmp
function code(x1, x2) t_0 = Float64(x1 * Float64(x1 * 3.0)) t_1 = Float64(t_0 + Float64(2.0 * x2)) t_2 = Float64(x1 + Float64(9.0 + Float64(x1 + Float64(6.0 * (x1 ^ 4.0))))) t_3 = Float64(x1 * Float64(x1 * x1)) t_4 = Float64(Float64(x1 * x1) + 1.0) t_5 = Float64(-1.0 - Float64(x1 * x1)) t_6 = Float64(Float64(x1 - t_1) / t_5) t_7 = Float64(Float64(x1 * 2.0) * t_6) t_8 = Float64(t_6 * 4.0) tmp = 0.0 if (x1 <= -5e+102) tmp = t_2; elseif (x1 <= -0.00085) tmp = Float64(x1 + Float64(Float64(x1 + Float64(Float64(Float64(t_4 * Float64(Float64(t_7 * Float64(t_6 - 3.0)) + Float64(Float64(x1 * x1) * Float64(t_8 - 6.0)))) + Float64(t_0 * t_6)) + t_3)) + 9.0)); elseif (x1 <= 2.3e+46) tmp = Float64(x1 + Float64(Float64(3.0 * Float64(Float64(x1 - Float64(t_0 - Float64(2.0 * x2))) / t_5)) - Float64(Float64(Float64(Float64(t_0 * Float64(Float64(t_1 - x1) / t_5)) + Float64(t_4 * Float64(Float64(Float64(x1 * x1) * Float64(6.0 - t_8)) + Float64(t_7 * Float64(3.0 + Float64(-1.0 / Float64(0.5 / x2))))))) - t_3) - x1))); else tmp = t_2; end return tmp end
function tmp_2 = code(x1, x2) t_0 = x1 * (x1 * 3.0); t_1 = t_0 + (2.0 * x2); t_2 = x1 + (9.0 + (x1 + (6.0 * (x1 ^ 4.0)))); t_3 = x1 * (x1 * x1); t_4 = (x1 * x1) + 1.0; t_5 = -1.0 - (x1 * x1); t_6 = (x1 - t_1) / t_5; t_7 = (x1 * 2.0) * t_6; t_8 = t_6 * 4.0; tmp = 0.0; if (x1 <= -5e+102) tmp = t_2; elseif (x1 <= -0.00085) tmp = x1 + ((x1 + (((t_4 * ((t_7 * (t_6 - 3.0)) + ((x1 * x1) * (t_8 - 6.0)))) + (t_0 * t_6)) + t_3)) + 9.0); elseif (x1 <= 2.3e+46) tmp = x1 + ((3.0 * ((x1 - (t_0 - (2.0 * x2))) / t_5)) - ((((t_0 * ((t_1 - x1) / t_5)) + (t_4 * (((x1 * x1) * (6.0 - t_8)) + (t_7 * (3.0 + (-1.0 / (0.5 / x2))))))) - t_3) - x1)); else tmp = t_2; end tmp_2 = tmp; end
code[x1_, x2_] := Block[{t$95$0 = N[(x1 * N[(x1 * 3.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(t$95$0 + N[(2.0 * x2), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x1 + N[(9.0 + N[(x1 + N[(6.0 * N[Power[x1, 4.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(x1 * N[(x1 * x1), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[(N[(x1 * x1), $MachinePrecision] + 1.0), $MachinePrecision]}, Block[{t$95$5 = N[(-1.0 - N[(x1 * x1), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$6 = N[(N[(x1 - t$95$1), $MachinePrecision] / t$95$5), $MachinePrecision]}, Block[{t$95$7 = N[(N[(x1 * 2.0), $MachinePrecision] * t$95$6), $MachinePrecision]}, Block[{t$95$8 = N[(t$95$6 * 4.0), $MachinePrecision]}, If[LessEqual[x1, -5e+102], t$95$2, If[LessEqual[x1, -0.00085], N[(x1 + N[(N[(x1 + N[(N[(N[(t$95$4 * N[(N[(t$95$7 * N[(t$95$6 - 3.0), $MachinePrecision]), $MachinePrecision] + N[(N[(x1 * x1), $MachinePrecision] * N[(t$95$8 - 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(t$95$0 * t$95$6), $MachinePrecision]), $MachinePrecision] + t$95$3), $MachinePrecision]), $MachinePrecision] + 9.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 2.3e+46], N[(x1 + N[(N[(3.0 * N[(N[(x1 - N[(t$95$0 - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / t$95$5), $MachinePrecision]), $MachinePrecision] - N[(N[(N[(N[(t$95$0 * N[(N[(t$95$1 - x1), $MachinePrecision] / t$95$5), $MachinePrecision]), $MachinePrecision] + N[(t$95$4 * N[(N[(N[(x1 * x1), $MachinePrecision] * N[(6.0 - t$95$8), $MachinePrecision]), $MachinePrecision] + N[(t$95$7 * N[(3.0 + N[(-1.0 / N[(0.5 / x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$3), $MachinePrecision] - x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$2]]]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x1 \cdot \left(x1 \cdot 3\right)\\
t_1 := t\_0 + 2 \cdot x2\\
t_2 := x1 + \left(9 + \left(x1 + 6 \cdot {x1}^{4}\right)\right)\\
t_3 := x1 \cdot \left(x1 \cdot x1\right)\\
t_4 := x1 \cdot x1 + 1\\
t_5 := -1 - x1 \cdot x1\\
t_6 := \frac{x1 - t\_1}{t\_5}\\
t_7 := \left(x1 \cdot 2\right) \cdot t\_6\\
t_8 := t\_6 \cdot 4\\
\mathbf{if}\;x1 \leq -5 \cdot 10^{+102}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;x1 \leq -0.00085:\\
\;\;\;\;x1 + \left(\left(x1 + \left(\left(t\_4 \cdot \left(t\_7 \cdot \left(t\_6 - 3\right) + \left(x1 \cdot x1\right) \cdot \left(t\_8 - 6\right)\right) + t\_0 \cdot t\_6\right) + t\_3\right)\right) + 9\right)\\
\mathbf{elif}\;x1 \leq 2.3 \cdot 10^{+46}:\\
\;\;\;\;x1 + \left(3 \cdot \frac{x1 - \left(t\_0 - 2 \cdot x2\right)}{t\_5} - \left(\left(\left(t\_0 \cdot \frac{t\_1 - x1}{t\_5} + t\_4 \cdot \left(\left(x1 \cdot x1\right) \cdot \left(6 - t\_8\right) + t\_7 \cdot \left(3 + \frac{-1}{\frac{0.5}{x2}}\right)\right)\right) - t\_3\right) - x1\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if x1 < -5e102 or 2.3000000000000001e46 < x1 Initial program 24.1%
Taylor expanded in x1 around 0 20.9%
+-commutative20.9%
mul-1-neg20.9%
unsub-neg20.9%
Simplified20.9%
Taylor expanded in x1 around inf 20.9%
Taylor expanded in x1 around inf 97.6%
*-commutative97.6%
Simplified97.6%
if -5e102 < x1 < -8.49999999999999953e-4Initial program 99.0%
Taylor expanded in x1 around inf 95.5%
if -8.49999999999999953e-4 < x1 < 2.3000000000000001e46Initial program 99.2%
clear-num99.2%
inv-pow99.2%
fma-define99.2%
associate-*r*99.2%
fma-define99.2%
pow299.2%
Applied egg-rr99.2%
unpow-199.2%
Simplified99.2%
Taylor expanded in x1 around 0 97.3%
Final simplification97.3%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (- -1.0 (* x1 x1)))
(t_1 (+ (* x1 x1) 1.0))
(t_2 (* x1 (* x1 x1)))
(t_3 (* x1 (* x1 3.0)))
(t_4 (/ (- x1 (+ t_3 (* 2.0 x2))) t_0))
(t_5 (* t_3 t_4))
(t_6 (* (* x1 x1) (- (* t_4 4.0) 6.0)))
(t_7
(+
x1
(+
(+
x1
(+ (+ (* t_1 (+ (* (* (* x1 2.0) t_4) (- t_4 3.0)) t_6)) t_5) t_2))
9.0))))
(if (<= x1 -5e+102)
(+ x1 (- (* x2 -6.0) (* x1 (- 2.0 (* x1 (+ 9.0 (* x1 -19.0)))))))
(if (<= x1 -0.00085)
t_7
(if (<= x1 0.0142)
(+
x1
(+
(* 3.0 (/ (- x1 (- t_3 (* 2.0 x2))) t_0))
(+
x1
(+
t_2
(-
t_5
(*
t_1
(-
(* (- (* 2.0 x2) 3.0) (* (* x1 2.0) (- x1 (* 2.0 x2))))
t_6)))))))
(if (<= x1 1e+154)
t_7
(+ x1 (+ (* x2 -6.0) (* x1 (- (* x1 9.0) 2.0))))))))))
double code(double x1, double x2) {
double t_0 = -1.0 - (x1 * x1);
double t_1 = (x1 * x1) + 1.0;
double t_2 = x1 * (x1 * x1);
double t_3 = x1 * (x1 * 3.0);
double t_4 = (x1 - (t_3 + (2.0 * x2))) / t_0;
double t_5 = t_3 * t_4;
double t_6 = (x1 * x1) * ((t_4 * 4.0) - 6.0);
double t_7 = x1 + ((x1 + (((t_1 * ((((x1 * 2.0) * t_4) * (t_4 - 3.0)) + t_6)) + t_5) + t_2)) + 9.0);
double tmp;
if (x1 <= -5e+102) {
tmp = x1 + ((x2 * -6.0) - (x1 * (2.0 - (x1 * (9.0 + (x1 * -19.0))))));
} else if (x1 <= -0.00085) {
tmp = t_7;
} else if (x1 <= 0.0142) {
tmp = x1 + ((3.0 * ((x1 - (t_3 - (2.0 * x2))) / t_0)) + (x1 + (t_2 + (t_5 - (t_1 * ((((2.0 * x2) - 3.0) * ((x1 * 2.0) * (x1 - (2.0 * x2)))) - t_6))))));
} else if (x1 <= 1e+154) {
tmp = t_7;
} 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) :: t_3
real(8) :: t_4
real(8) :: t_5
real(8) :: t_6
real(8) :: t_7
real(8) :: tmp
t_0 = (-1.0d0) - (x1 * x1)
t_1 = (x1 * x1) + 1.0d0
t_2 = x1 * (x1 * x1)
t_3 = x1 * (x1 * 3.0d0)
t_4 = (x1 - (t_3 + (2.0d0 * x2))) / t_0
t_5 = t_3 * t_4
t_6 = (x1 * x1) * ((t_4 * 4.0d0) - 6.0d0)
t_7 = x1 + ((x1 + (((t_1 * ((((x1 * 2.0d0) * t_4) * (t_4 - 3.0d0)) + t_6)) + t_5) + t_2)) + 9.0d0)
if (x1 <= (-5d+102)) then
tmp = x1 + ((x2 * (-6.0d0)) - (x1 * (2.0d0 - (x1 * (9.0d0 + (x1 * (-19.0d0)))))))
else if (x1 <= (-0.00085d0)) then
tmp = t_7
else if (x1 <= 0.0142d0) then
tmp = x1 + ((3.0d0 * ((x1 - (t_3 - (2.0d0 * x2))) / t_0)) + (x1 + (t_2 + (t_5 - (t_1 * ((((2.0d0 * x2) - 3.0d0) * ((x1 * 2.0d0) * (x1 - (2.0d0 * x2)))) - t_6))))))
else if (x1 <= 1d+154) then
tmp = t_7
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 = -1.0 - (x1 * x1);
double t_1 = (x1 * x1) + 1.0;
double t_2 = x1 * (x1 * x1);
double t_3 = x1 * (x1 * 3.0);
double t_4 = (x1 - (t_3 + (2.0 * x2))) / t_0;
double t_5 = t_3 * t_4;
double t_6 = (x1 * x1) * ((t_4 * 4.0) - 6.0);
double t_7 = x1 + ((x1 + (((t_1 * ((((x1 * 2.0) * t_4) * (t_4 - 3.0)) + t_6)) + t_5) + t_2)) + 9.0);
double tmp;
if (x1 <= -5e+102) {
tmp = x1 + ((x2 * -6.0) - (x1 * (2.0 - (x1 * (9.0 + (x1 * -19.0))))));
} else if (x1 <= -0.00085) {
tmp = t_7;
} else if (x1 <= 0.0142) {
tmp = x1 + ((3.0 * ((x1 - (t_3 - (2.0 * x2))) / t_0)) + (x1 + (t_2 + (t_5 - (t_1 * ((((2.0 * x2) - 3.0) * ((x1 * 2.0) * (x1 - (2.0 * x2)))) - t_6))))));
} else if (x1 <= 1e+154) {
tmp = t_7;
} else {
tmp = x1 + ((x2 * -6.0) + (x1 * ((x1 * 9.0) - 2.0)));
}
return tmp;
}
def code(x1, x2): t_0 = -1.0 - (x1 * x1) t_1 = (x1 * x1) + 1.0 t_2 = x1 * (x1 * x1) t_3 = x1 * (x1 * 3.0) t_4 = (x1 - (t_3 + (2.0 * x2))) / t_0 t_5 = t_3 * t_4 t_6 = (x1 * x1) * ((t_4 * 4.0) - 6.0) t_7 = x1 + ((x1 + (((t_1 * ((((x1 * 2.0) * t_4) * (t_4 - 3.0)) + t_6)) + t_5) + t_2)) + 9.0) tmp = 0 if x1 <= -5e+102: tmp = x1 + ((x2 * -6.0) - (x1 * (2.0 - (x1 * (9.0 + (x1 * -19.0)))))) elif x1 <= -0.00085: tmp = t_7 elif x1 <= 0.0142: tmp = x1 + ((3.0 * ((x1 - (t_3 - (2.0 * x2))) / t_0)) + (x1 + (t_2 + (t_5 - (t_1 * ((((2.0 * x2) - 3.0) * ((x1 * 2.0) * (x1 - (2.0 * x2)))) - t_6)))))) elif x1 <= 1e+154: tmp = t_7 else: tmp = x1 + ((x2 * -6.0) + (x1 * ((x1 * 9.0) - 2.0))) return tmp
function code(x1, x2) t_0 = Float64(-1.0 - Float64(x1 * x1)) t_1 = Float64(Float64(x1 * x1) + 1.0) t_2 = Float64(x1 * Float64(x1 * x1)) t_3 = Float64(x1 * Float64(x1 * 3.0)) t_4 = Float64(Float64(x1 - Float64(t_3 + Float64(2.0 * x2))) / t_0) t_5 = Float64(t_3 * t_4) t_6 = Float64(Float64(x1 * x1) * Float64(Float64(t_4 * 4.0) - 6.0)) t_7 = Float64(x1 + Float64(Float64(x1 + Float64(Float64(Float64(t_1 * Float64(Float64(Float64(Float64(x1 * 2.0) * t_4) * Float64(t_4 - 3.0)) + t_6)) + t_5) + t_2)) + 9.0)) tmp = 0.0 if (x1 <= -5e+102) tmp = Float64(x1 + Float64(Float64(x2 * -6.0) - Float64(x1 * Float64(2.0 - Float64(x1 * Float64(9.0 + Float64(x1 * -19.0))))))); elseif (x1 <= -0.00085) tmp = t_7; elseif (x1 <= 0.0142) tmp = Float64(x1 + Float64(Float64(3.0 * Float64(Float64(x1 - Float64(t_3 - Float64(2.0 * x2))) / t_0)) + Float64(x1 + Float64(t_2 + Float64(t_5 - Float64(t_1 * Float64(Float64(Float64(Float64(2.0 * x2) - 3.0) * Float64(Float64(x1 * 2.0) * Float64(x1 - Float64(2.0 * x2)))) - t_6))))))); elseif (x1 <= 1e+154) tmp = t_7; 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 = -1.0 - (x1 * x1); t_1 = (x1 * x1) + 1.0; t_2 = x1 * (x1 * x1); t_3 = x1 * (x1 * 3.0); t_4 = (x1 - (t_3 + (2.0 * x2))) / t_0; t_5 = t_3 * t_4; t_6 = (x1 * x1) * ((t_4 * 4.0) - 6.0); t_7 = x1 + ((x1 + (((t_1 * ((((x1 * 2.0) * t_4) * (t_4 - 3.0)) + t_6)) + t_5) + t_2)) + 9.0); tmp = 0.0; if (x1 <= -5e+102) tmp = x1 + ((x2 * -6.0) - (x1 * (2.0 - (x1 * (9.0 + (x1 * -19.0)))))); elseif (x1 <= -0.00085) tmp = t_7; elseif (x1 <= 0.0142) tmp = x1 + ((3.0 * ((x1 - (t_3 - (2.0 * x2))) / t_0)) + (x1 + (t_2 + (t_5 - (t_1 * ((((2.0 * x2) - 3.0) * ((x1 * 2.0) * (x1 - (2.0 * x2)))) - t_6)))))); elseif (x1 <= 1e+154) tmp = t_7; 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[(-1.0 - N[(x1 * x1), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(N[(x1 * x1), $MachinePrecision] + 1.0), $MachinePrecision]}, Block[{t$95$2 = N[(x1 * N[(x1 * x1), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(x1 * N[(x1 * 3.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[(N[(x1 - N[(t$95$3 + N[(2.0 * x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / t$95$0), $MachinePrecision]}, Block[{t$95$5 = N[(t$95$3 * t$95$4), $MachinePrecision]}, Block[{t$95$6 = N[(N[(x1 * x1), $MachinePrecision] * N[(N[(t$95$4 * 4.0), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$7 = N[(x1 + N[(N[(x1 + N[(N[(N[(t$95$1 * N[(N[(N[(N[(x1 * 2.0), $MachinePrecision] * t$95$4), $MachinePrecision] * N[(t$95$4 - 3.0), $MachinePrecision]), $MachinePrecision] + t$95$6), $MachinePrecision]), $MachinePrecision] + t$95$5), $MachinePrecision] + t$95$2), $MachinePrecision]), $MachinePrecision] + 9.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x1, -5e+102], N[(x1 + N[(N[(x2 * -6.0), $MachinePrecision] - N[(x1 * N[(2.0 - N[(x1 * N[(9.0 + N[(x1 * -19.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, -0.00085], t$95$7, If[LessEqual[x1, 0.0142], N[(x1 + N[(N[(3.0 * N[(N[(x1 - N[(t$95$3 - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / t$95$0), $MachinePrecision]), $MachinePrecision] + N[(x1 + N[(t$95$2 + N[(t$95$5 - N[(t$95$1 * N[(N[(N[(N[(2.0 * x2), $MachinePrecision] - 3.0), $MachinePrecision] * N[(N[(x1 * 2.0), $MachinePrecision] * N[(x1 - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$6), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 1e+154], t$95$7, 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 := -1 - x1 \cdot x1\\
t_1 := x1 \cdot x1 + 1\\
t_2 := x1 \cdot \left(x1 \cdot x1\right)\\
t_3 := x1 \cdot \left(x1 \cdot 3\right)\\
t_4 := \frac{x1 - \left(t\_3 + 2 \cdot x2\right)}{t\_0}\\
t_5 := t\_3 \cdot t\_4\\
t_6 := \left(x1 \cdot x1\right) \cdot \left(t\_4 \cdot 4 - 6\right)\\
t_7 := x1 + \left(\left(x1 + \left(\left(t\_1 \cdot \left(\left(\left(x1 \cdot 2\right) \cdot t\_4\right) \cdot \left(t\_4 - 3\right) + t\_6\right) + t\_5\right) + t\_2\right)\right) + 9\right)\\
\mathbf{if}\;x1 \leq -5 \cdot 10^{+102}:\\
\;\;\;\;x1 + \left(x2 \cdot -6 - x1 \cdot \left(2 - x1 \cdot \left(9 + x1 \cdot -19\right)\right)\right)\\
\mathbf{elif}\;x1 \leq -0.00085:\\
\;\;\;\;t\_7\\
\mathbf{elif}\;x1 \leq 0.0142:\\
\;\;\;\;x1 + \left(3 \cdot \frac{x1 - \left(t\_3 - 2 \cdot x2\right)}{t\_0} + \left(x1 + \left(t\_2 + \left(t\_5 - t\_1 \cdot \left(\left(2 \cdot x2 - 3\right) \cdot \left(\left(x1 \cdot 2\right) \cdot \left(x1 - 2 \cdot x2\right)\right) - t\_6\right)\right)\right)\right)\right)\\
\mathbf{elif}\;x1 \leq 10^{+154}:\\
\;\;\;\;t\_7\\
\mathbf{else}:\\
\;\;\;\;x1 + \left(x2 \cdot -6 + x1 \cdot \left(x1 \cdot 9 - 2\right)\right)\\
\end{array}
\end{array}
if x1 < -5e102Initial program 3.6%
Taylor expanded in x1 around 0 3.6%
Taylor expanded in x1 around 0 74.5%
Taylor expanded in x2 around 0 94.5%
*-commutative94.5%
Simplified94.5%
if -5e102 < x1 < -8.49999999999999953e-4 or 0.014200000000000001 < x1 < 1.00000000000000004e154Initial program 97.5%
Taylor expanded in x1 around inf 96.2%
if -8.49999999999999953e-4 < x1 < 0.014200000000000001Initial program 99.2%
Taylor expanded in x1 around 0 98.2%
+-commutative98.2%
mul-1-neg98.2%
unsub-neg98.2%
Simplified98.2%
Taylor expanded in x1 around 0 98.2%
if 1.00000000000000004e154 < x1 Initial program 0.0%
Taylor expanded in x1 around 0 0.0%
Taylor expanded in x1 around 0 77.5%
Taylor expanded in x2 around 0 100.0%
*-commutative100.0%
Simplified100.0%
Final simplification97.3%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (* x1 (* x1 3.0)))
(t_1 (+ x1 (+ 9.0 (+ x1 (* 6.0 (pow x1 4.0))))))
(t_2 (* x1 (* x1 x1)))
(t_3 (+ (* x1 x1) 1.0))
(t_4 (- -1.0 (* x1 x1)))
(t_5 (/ (- x1 (+ t_0 (* 2.0 x2))) t_4))
(t_6 (* (* x1 x1) (- (* t_5 4.0) 6.0)))
(t_7 (* t_0 t_5)))
(if (<= x1 -5e+102)
t_1
(if (<= x1 -0.0032)
(+
x1
(+
(+
x1
(+ (+ (* t_3 (+ (* (* (* x1 2.0) t_5) (- t_5 3.0)) t_6)) t_7) t_2))
9.0))
(if (<= x1 1.1e+43)
(+
x1
(+
(* 3.0 (/ (- x1 (- t_0 (* 2.0 x2))) t_4))
(+
x1
(+
t_2
(-
t_7
(*
t_3
(-
(* (- (* 2.0 x2) 3.0) (* (* x1 2.0) (- x1 (* 2.0 x2))))
t_6)))))))
t_1)))))
double code(double x1, double x2) {
double t_0 = x1 * (x1 * 3.0);
double t_1 = x1 + (9.0 + (x1 + (6.0 * pow(x1, 4.0))));
double t_2 = x1 * (x1 * x1);
double t_3 = (x1 * x1) + 1.0;
double t_4 = -1.0 - (x1 * x1);
double t_5 = (x1 - (t_0 + (2.0 * x2))) / t_4;
double t_6 = (x1 * x1) * ((t_5 * 4.0) - 6.0);
double t_7 = t_0 * t_5;
double tmp;
if (x1 <= -5e+102) {
tmp = t_1;
} else if (x1 <= -0.0032) {
tmp = x1 + ((x1 + (((t_3 * ((((x1 * 2.0) * t_5) * (t_5 - 3.0)) + t_6)) + t_7) + t_2)) + 9.0);
} else if (x1 <= 1.1e+43) {
tmp = x1 + ((3.0 * ((x1 - (t_0 - (2.0 * x2))) / t_4)) + (x1 + (t_2 + (t_7 - (t_3 * ((((2.0 * x2) - 3.0) * ((x1 * 2.0) * (x1 - (2.0 * x2)))) - t_6))))));
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
real(8) :: t_0
real(8) :: t_1
real(8) :: t_2
real(8) :: t_3
real(8) :: t_4
real(8) :: t_5
real(8) :: t_6
real(8) :: t_7
real(8) :: tmp
t_0 = x1 * (x1 * 3.0d0)
t_1 = x1 + (9.0d0 + (x1 + (6.0d0 * (x1 ** 4.0d0))))
t_2 = x1 * (x1 * x1)
t_3 = (x1 * x1) + 1.0d0
t_4 = (-1.0d0) - (x1 * x1)
t_5 = (x1 - (t_0 + (2.0d0 * x2))) / t_4
t_6 = (x1 * x1) * ((t_5 * 4.0d0) - 6.0d0)
t_7 = t_0 * t_5
if (x1 <= (-5d+102)) then
tmp = t_1
else if (x1 <= (-0.0032d0)) then
tmp = x1 + ((x1 + (((t_3 * ((((x1 * 2.0d0) * t_5) * (t_5 - 3.0d0)) + t_6)) + t_7) + t_2)) + 9.0d0)
else if (x1 <= 1.1d+43) then
tmp = x1 + ((3.0d0 * ((x1 - (t_0 - (2.0d0 * x2))) / t_4)) + (x1 + (t_2 + (t_7 - (t_3 * ((((2.0d0 * x2) - 3.0d0) * ((x1 * 2.0d0) * (x1 - (2.0d0 * x2)))) - t_6))))))
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x1, double x2) {
double t_0 = x1 * (x1 * 3.0);
double t_1 = x1 + (9.0 + (x1 + (6.0 * Math.pow(x1, 4.0))));
double t_2 = x1 * (x1 * x1);
double t_3 = (x1 * x1) + 1.0;
double t_4 = -1.0 - (x1 * x1);
double t_5 = (x1 - (t_0 + (2.0 * x2))) / t_4;
double t_6 = (x1 * x1) * ((t_5 * 4.0) - 6.0);
double t_7 = t_0 * t_5;
double tmp;
if (x1 <= -5e+102) {
tmp = t_1;
} else if (x1 <= -0.0032) {
tmp = x1 + ((x1 + (((t_3 * ((((x1 * 2.0) * t_5) * (t_5 - 3.0)) + t_6)) + t_7) + t_2)) + 9.0);
} else if (x1 <= 1.1e+43) {
tmp = x1 + ((3.0 * ((x1 - (t_0 - (2.0 * x2))) / t_4)) + (x1 + (t_2 + (t_7 - (t_3 * ((((2.0 * x2) - 3.0) * ((x1 * 2.0) * (x1 - (2.0 * x2)))) - t_6))))));
} else {
tmp = t_1;
}
return tmp;
}
def code(x1, x2): t_0 = x1 * (x1 * 3.0) t_1 = x1 + (9.0 + (x1 + (6.0 * math.pow(x1, 4.0)))) t_2 = x1 * (x1 * x1) t_3 = (x1 * x1) + 1.0 t_4 = -1.0 - (x1 * x1) t_5 = (x1 - (t_0 + (2.0 * x2))) / t_4 t_6 = (x1 * x1) * ((t_5 * 4.0) - 6.0) t_7 = t_0 * t_5 tmp = 0 if x1 <= -5e+102: tmp = t_1 elif x1 <= -0.0032: tmp = x1 + ((x1 + (((t_3 * ((((x1 * 2.0) * t_5) * (t_5 - 3.0)) + t_6)) + t_7) + t_2)) + 9.0) elif x1 <= 1.1e+43: tmp = x1 + ((3.0 * ((x1 - (t_0 - (2.0 * x2))) / t_4)) + (x1 + (t_2 + (t_7 - (t_3 * ((((2.0 * x2) - 3.0) * ((x1 * 2.0) * (x1 - (2.0 * x2)))) - t_6)))))) else: tmp = t_1 return tmp
function code(x1, x2) t_0 = Float64(x1 * Float64(x1 * 3.0)) t_1 = Float64(x1 + Float64(9.0 + Float64(x1 + Float64(6.0 * (x1 ^ 4.0))))) t_2 = Float64(x1 * Float64(x1 * x1)) t_3 = Float64(Float64(x1 * x1) + 1.0) t_4 = Float64(-1.0 - Float64(x1 * x1)) t_5 = Float64(Float64(x1 - Float64(t_0 + Float64(2.0 * x2))) / t_4) t_6 = Float64(Float64(x1 * x1) * Float64(Float64(t_5 * 4.0) - 6.0)) t_7 = Float64(t_0 * t_5) tmp = 0.0 if (x1 <= -5e+102) tmp = t_1; elseif (x1 <= -0.0032) tmp = Float64(x1 + Float64(Float64(x1 + Float64(Float64(Float64(t_3 * Float64(Float64(Float64(Float64(x1 * 2.0) * t_5) * Float64(t_5 - 3.0)) + t_6)) + t_7) + t_2)) + 9.0)); elseif (x1 <= 1.1e+43) tmp = Float64(x1 + Float64(Float64(3.0 * Float64(Float64(x1 - Float64(t_0 - Float64(2.0 * x2))) / t_4)) + Float64(x1 + Float64(t_2 + Float64(t_7 - Float64(t_3 * Float64(Float64(Float64(Float64(2.0 * x2) - 3.0) * Float64(Float64(x1 * 2.0) * Float64(x1 - Float64(2.0 * x2)))) - t_6))))))); else tmp = t_1; end return tmp end
function tmp_2 = code(x1, x2) t_0 = x1 * (x1 * 3.0); t_1 = x1 + (9.0 + (x1 + (6.0 * (x1 ^ 4.0)))); t_2 = x1 * (x1 * x1); t_3 = (x1 * x1) + 1.0; t_4 = -1.0 - (x1 * x1); t_5 = (x1 - (t_0 + (2.0 * x2))) / t_4; t_6 = (x1 * x1) * ((t_5 * 4.0) - 6.0); t_7 = t_0 * t_5; tmp = 0.0; if (x1 <= -5e+102) tmp = t_1; elseif (x1 <= -0.0032) tmp = x1 + ((x1 + (((t_3 * ((((x1 * 2.0) * t_5) * (t_5 - 3.0)) + t_6)) + t_7) + t_2)) + 9.0); elseif (x1 <= 1.1e+43) tmp = x1 + ((3.0 * ((x1 - (t_0 - (2.0 * x2))) / t_4)) + (x1 + (t_2 + (t_7 - (t_3 * ((((2.0 * x2) - 3.0) * ((x1 * 2.0) * (x1 - (2.0 * x2)))) - t_6)))))); else tmp = t_1; end tmp_2 = tmp; end
code[x1_, x2_] := Block[{t$95$0 = N[(x1 * N[(x1 * 3.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(x1 + N[(9.0 + N[(x1 + N[(6.0 * N[Power[x1, 4.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x1 * N[(x1 * x1), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[(x1 * x1), $MachinePrecision] + 1.0), $MachinePrecision]}, Block[{t$95$4 = N[(-1.0 - N[(x1 * x1), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$5 = N[(N[(x1 - N[(t$95$0 + N[(2.0 * x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / t$95$4), $MachinePrecision]}, Block[{t$95$6 = N[(N[(x1 * x1), $MachinePrecision] * N[(N[(t$95$5 * 4.0), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$7 = N[(t$95$0 * t$95$5), $MachinePrecision]}, If[LessEqual[x1, -5e+102], t$95$1, If[LessEqual[x1, -0.0032], N[(x1 + N[(N[(x1 + N[(N[(N[(t$95$3 * N[(N[(N[(N[(x1 * 2.0), $MachinePrecision] * t$95$5), $MachinePrecision] * N[(t$95$5 - 3.0), $MachinePrecision]), $MachinePrecision] + t$95$6), $MachinePrecision]), $MachinePrecision] + t$95$7), $MachinePrecision] + t$95$2), $MachinePrecision]), $MachinePrecision] + 9.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 1.1e+43], N[(x1 + N[(N[(3.0 * N[(N[(x1 - N[(t$95$0 - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / t$95$4), $MachinePrecision]), $MachinePrecision] + N[(x1 + N[(t$95$2 + N[(t$95$7 - N[(t$95$3 * N[(N[(N[(N[(2.0 * x2), $MachinePrecision] - 3.0), $MachinePrecision] * N[(N[(x1 * 2.0), $MachinePrecision] * N[(x1 - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$6), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x1 \cdot \left(x1 \cdot 3\right)\\
t_1 := x1 + \left(9 + \left(x1 + 6 \cdot {x1}^{4}\right)\right)\\
t_2 := x1 \cdot \left(x1 \cdot x1\right)\\
t_3 := x1 \cdot x1 + 1\\
t_4 := -1 - x1 \cdot x1\\
t_5 := \frac{x1 - \left(t\_0 + 2 \cdot x2\right)}{t\_4}\\
t_6 := \left(x1 \cdot x1\right) \cdot \left(t\_5 \cdot 4 - 6\right)\\
t_7 := t\_0 \cdot t\_5\\
\mathbf{if}\;x1 \leq -5 \cdot 10^{+102}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;x1 \leq -0.0032:\\
\;\;\;\;x1 + \left(\left(x1 + \left(\left(t\_3 \cdot \left(\left(\left(x1 \cdot 2\right) \cdot t\_5\right) \cdot \left(t\_5 - 3\right) + t\_6\right) + t\_7\right) + t\_2\right)\right) + 9\right)\\
\mathbf{elif}\;x1 \leq 1.1 \cdot 10^{+43}:\\
\;\;\;\;x1 + \left(3 \cdot \frac{x1 - \left(t\_0 - 2 \cdot x2\right)}{t\_4} + \left(x1 + \left(t\_2 + \left(t\_7 - t\_3 \cdot \left(\left(2 \cdot x2 - 3\right) \cdot \left(\left(x1 \cdot 2\right) \cdot \left(x1 - 2 \cdot x2\right)\right) - t\_6\right)\right)\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if x1 < -5e102 or 1.1e43 < x1 Initial program 24.1%
Taylor expanded in x1 around 0 20.9%
+-commutative20.9%
mul-1-neg20.9%
unsub-neg20.9%
Simplified20.9%
Taylor expanded in x1 around inf 20.9%
Taylor expanded in x1 around inf 97.6%
*-commutative97.6%
Simplified97.6%
if -5e102 < x1 < -0.00320000000000000015Initial program 99.0%
Taylor expanded in x1 around inf 95.5%
if -0.00320000000000000015 < x1 < 1.1e43Initial program 99.2%
Taylor expanded in x1 around 0 97.2%
+-commutative97.2%
mul-1-neg97.2%
unsub-neg97.2%
Simplified97.2%
Taylor expanded in x1 around 0 96.7%
Final simplification97.0%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (* x1 (* x1 3.0)))
(t_1 (/ (- x1 (+ t_0 (* 2.0 x2))) (- -1.0 (* x1 x1)))))
(if (or (<= x1 -7.8e+101) (not (<= x1 2.4e+46)))
(+ x1 (+ 9.0 (+ x1 (* 6.0 (pow x1 4.0)))))
(+
x1
(-
(*
3.0
(+ (* x2 -2.0) (* x1 (+ -1.0 (* x1 (- (+ x1 3.0) (* x2 -2.0)))))))
(-
(-
(+
(* t_0 (- x1 (* 2.0 x2)))
(*
(+ (* x1 x1) 1.0)
(+
(* (* x1 x1) (- 6.0 (* t_1 4.0)))
(* (* (* x1 2.0) t_1) (- 3.0 t_1)))))
(* x1 (* x1 x1)))
x1))))))
double code(double x1, double x2) {
double t_0 = x1 * (x1 * 3.0);
double t_1 = (x1 - (t_0 + (2.0 * x2))) / (-1.0 - (x1 * x1));
double tmp;
if ((x1 <= -7.8e+101) || !(x1 <= 2.4e+46)) {
tmp = x1 + (9.0 + (x1 + (6.0 * pow(x1, 4.0))));
} else {
tmp = x1 + ((3.0 * ((x2 * -2.0) + (x1 * (-1.0 + (x1 * ((x1 + 3.0) - (x2 * -2.0))))))) - ((((t_0 * (x1 - (2.0 * x2))) + (((x1 * x1) + 1.0) * (((x1 * x1) * (6.0 - (t_1 * 4.0))) + (((x1 * 2.0) * t_1) * (3.0 - t_1))))) - (x1 * (x1 * x1))) - x1));
}
return tmp;
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
real(8) :: t_0
real(8) :: t_1
real(8) :: tmp
t_0 = x1 * (x1 * 3.0d0)
t_1 = (x1 - (t_0 + (2.0d0 * x2))) / ((-1.0d0) - (x1 * x1))
if ((x1 <= (-7.8d+101)) .or. (.not. (x1 <= 2.4d+46))) then
tmp = x1 + (9.0d0 + (x1 + (6.0d0 * (x1 ** 4.0d0))))
else
tmp = x1 + ((3.0d0 * ((x2 * (-2.0d0)) + (x1 * ((-1.0d0) + (x1 * ((x1 + 3.0d0) - (x2 * (-2.0d0)))))))) - ((((t_0 * (x1 - (2.0d0 * x2))) + (((x1 * x1) + 1.0d0) * (((x1 * x1) * (6.0d0 - (t_1 * 4.0d0))) + (((x1 * 2.0d0) * t_1) * (3.0d0 - t_1))))) - (x1 * (x1 * x1))) - x1))
end if
code = tmp
end function
public static double code(double x1, double x2) {
double t_0 = x1 * (x1 * 3.0);
double t_1 = (x1 - (t_0 + (2.0 * x2))) / (-1.0 - (x1 * x1));
double tmp;
if ((x1 <= -7.8e+101) || !(x1 <= 2.4e+46)) {
tmp = x1 + (9.0 + (x1 + (6.0 * Math.pow(x1, 4.0))));
} else {
tmp = x1 + ((3.0 * ((x2 * -2.0) + (x1 * (-1.0 + (x1 * ((x1 + 3.0) - (x2 * -2.0))))))) - ((((t_0 * (x1 - (2.0 * x2))) + (((x1 * x1) + 1.0) * (((x1 * x1) * (6.0 - (t_1 * 4.0))) + (((x1 * 2.0) * t_1) * (3.0 - t_1))))) - (x1 * (x1 * x1))) - x1));
}
return tmp;
}
def code(x1, x2): t_0 = x1 * (x1 * 3.0) t_1 = (x1 - (t_0 + (2.0 * x2))) / (-1.0 - (x1 * x1)) tmp = 0 if (x1 <= -7.8e+101) or not (x1 <= 2.4e+46): tmp = x1 + (9.0 + (x1 + (6.0 * math.pow(x1, 4.0)))) else: tmp = x1 + ((3.0 * ((x2 * -2.0) + (x1 * (-1.0 + (x1 * ((x1 + 3.0) - (x2 * -2.0))))))) - ((((t_0 * (x1 - (2.0 * x2))) + (((x1 * x1) + 1.0) * (((x1 * x1) * (6.0 - (t_1 * 4.0))) + (((x1 * 2.0) * t_1) * (3.0 - t_1))))) - (x1 * (x1 * x1))) - x1)) return tmp
function code(x1, x2) t_0 = Float64(x1 * Float64(x1 * 3.0)) t_1 = Float64(Float64(x1 - Float64(t_0 + Float64(2.0 * x2))) / Float64(-1.0 - Float64(x1 * x1))) tmp = 0.0 if ((x1 <= -7.8e+101) || !(x1 <= 2.4e+46)) tmp = Float64(x1 + Float64(9.0 + Float64(x1 + Float64(6.0 * (x1 ^ 4.0))))); else tmp = Float64(x1 + Float64(Float64(3.0 * Float64(Float64(x2 * -2.0) + Float64(x1 * Float64(-1.0 + Float64(x1 * Float64(Float64(x1 + 3.0) - Float64(x2 * -2.0))))))) - Float64(Float64(Float64(Float64(t_0 * Float64(x1 - Float64(2.0 * x2))) + Float64(Float64(Float64(x1 * x1) + 1.0) * Float64(Float64(Float64(x1 * x1) * Float64(6.0 - Float64(t_1 * 4.0))) + Float64(Float64(Float64(x1 * 2.0) * t_1) * Float64(3.0 - t_1))))) - Float64(x1 * Float64(x1 * x1))) - x1))); end return tmp end
function tmp_2 = code(x1, x2) t_0 = x1 * (x1 * 3.0); t_1 = (x1 - (t_0 + (2.0 * x2))) / (-1.0 - (x1 * x1)); tmp = 0.0; if ((x1 <= -7.8e+101) || ~((x1 <= 2.4e+46))) tmp = x1 + (9.0 + (x1 + (6.0 * (x1 ^ 4.0)))); else tmp = x1 + ((3.0 * ((x2 * -2.0) + (x1 * (-1.0 + (x1 * ((x1 + 3.0) - (x2 * -2.0))))))) - ((((t_0 * (x1 - (2.0 * x2))) + (((x1 * x1) + 1.0) * (((x1 * x1) * (6.0 - (t_1 * 4.0))) + (((x1 * 2.0) * t_1) * (3.0 - t_1))))) - (x1 * (x1 * x1))) - 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[(x1 - N[(t$95$0 + N[(2.0 * x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(-1.0 - N[(x1 * x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[Or[LessEqual[x1, -7.8e+101], N[Not[LessEqual[x1, 2.4e+46]], $MachinePrecision]], N[(x1 + N[(9.0 + N[(x1 + N[(6.0 * N[Power[x1, 4.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x1 + N[(N[(3.0 * N[(N[(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] - N[(N[(N[(N[(t$95$0 * N[(x1 - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(N[(x1 * x1), $MachinePrecision] + 1.0), $MachinePrecision] * N[(N[(N[(x1 * x1), $MachinePrecision] * N[(6.0 - N[(t$95$1 * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(N[(x1 * 2.0), $MachinePrecision] * t$95$1), $MachinePrecision] * N[(3.0 - t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(x1 * N[(x1 * x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x1 \cdot \left(x1 \cdot 3\right)\\
t_1 := \frac{x1 - \left(t\_0 + 2 \cdot x2\right)}{-1 - x1 \cdot x1}\\
\mathbf{if}\;x1 \leq -7.8 \cdot 10^{+101} \lor \neg \left(x1 \leq 2.4 \cdot 10^{+46}\right):\\
\;\;\;\;x1 + \left(9 + \left(x1 + 6 \cdot {x1}^{4}\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x1 + \left(3 \cdot \left(x2 \cdot -2 + x1 \cdot \left(-1 + x1 \cdot \left(\left(x1 + 3\right) - x2 \cdot -2\right)\right)\right) - \left(\left(\left(t\_0 \cdot \left(x1 - 2 \cdot x2\right) + \left(x1 \cdot x1 + 1\right) \cdot \left(\left(x1 \cdot x1\right) \cdot \left(6 - t\_1 \cdot 4\right) + \left(\left(x1 \cdot 2\right) \cdot t\_1\right) \cdot \left(3 - t\_1\right)\right)\right) - x1 \cdot \left(x1 \cdot x1\right)\right) - x1\right)\right)\\
\end{array}
\end{array}
if x1 < -7.8e101 or 2.40000000000000008e46 < x1 Initial program 24.1%
Taylor expanded in x1 around 0 20.9%
+-commutative20.9%
mul-1-neg20.9%
unsub-neg20.9%
Simplified20.9%
Taylor expanded in x1 around inf 20.9%
Taylor expanded in x1 around inf 97.6%
*-commutative97.6%
Simplified97.6%
if -7.8e101 < x1 < 2.40000000000000008e46Initial program 99.2%
Taylor expanded in x1 around 0 96.5%
Taylor expanded in x1 around 0 98.1%
+-commutative93.1%
mul-1-neg93.1%
unsub-neg93.1%
Simplified98.1%
Final simplification97.9%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (* x1 (* x1 x1)))
(t_1 (* (* x1 2.0) (- x1 (* 2.0 x2))))
(t_2 (- -1.0 (* x1 x1)))
(t_3 (+ (* x1 x1) 1.0))
(t_4 (- (* 2.0 x2) 3.0))
(t_5 (* x1 (* x1 3.0)))
(t_6 (+ t_5 (* 2.0 x2)))
(t_7 (/ (- x1 t_6) t_2))
(t_8 (* t_7 4.0))
(t_9 (* (* x1 x1) (- t_8 6.0)))
(t_10 (* t_5 t_7)))
(if (<= x1 -2.15e+102)
(+ x1 (- (* x2 -6.0) (* x1 (- 2.0 (* x1 (+ 9.0 (* x1 -19.0)))))))
(if (<= x1 -0.82)
(+
x1
(-
9.0
(-
(-
(+ (* t_5 (/ (- t_6 x1) t_2)) (* t_3 (- (* (- t_7 3.0) t_1) t_9)))
t_0)
x1)))
(if (<= x1 0.72)
(+
x1
(+
(* 3.0 (/ (- x1 (- t_5 (* 2.0 x2))) t_2))
(+ x1 (+ t_0 (- t_10 (* t_3 (- (* t_4 t_1) t_9)))))))
(if (<= x1 4e+153)
(+
x1
(+
9.0
(+
x1
(+
t_0
(+
t_10
(*
(- (* (* x1 x1) (- 6.0 t_8)) (* 4.0 (* x1 (* x2 t_4))))
t_2))))))
(+ x1 (+ (* x2 -6.0) (* x1 (- (* x1 9.0) 2.0))))))))))
double code(double x1, double x2) {
double t_0 = x1 * (x1 * x1);
double t_1 = (x1 * 2.0) * (x1 - (2.0 * x2));
double t_2 = -1.0 - (x1 * x1);
double t_3 = (x1 * x1) + 1.0;
double t_4 = (2.0 * x2) - 3.0;
double t_5 = x1 * (x1 * 3.0);
double t_6 = t_5 + (2.0 * x2);
double t_7 = (x1 - t_6) / t_2;
double t_8 = t_7 * 4.0;
double t_9 = (x1 * x1) * (t_8 - 6.0);
double t_10 = t_5 * t_7;
double tmp;
if (x1 <= -2.15e+102) {
tmp = x1 + ((x2 * -6.0) - (x1 * (2.0 - (x1 * (9.0 + (x1 * -19.0))))));
} else if (x1 <= -0.82) {
tmp = x1 + (9.0 - ((((t_5 * ((t_6 - x1) / t_2)) + (t_3 * (((t_7 - 3.0) * t_1) - t_9))) - t_0) - x1));
} else if (x1 <= 0.72) {
tmp = x1 + ((3.0 * ((x1 - (t_5 - (2.0 * x2))) / t_2)) + (x1 + (t_0 + (t_10 - (t_3 * ((t_4 * t_1) - t_9))))));
} else if (x1 <= 4e+153) {
tmp = x1 + (9.0 + (x1 + (t_0 + (t_10 + ((((x1 * x1) * (6.0 - t_8)) - (4.0 * (x1 * (x2 * t_4)))) * t_2)))));
} 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_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 * x1)
t_1 = (x1 * 2.0d0) * (x1 - (2.0d0 * x2))
t_2 = (-1.0d0) - (x1 * x1)
t_3 = (x1 * x1) + 1.0d0
t_4 = (2.0d0 * x2) - 3.0d0
t_5 = x1 * (x1 * 3.0d0)
t_6 = t_5 + (2.0d0 * x2)
t_7 = (x1 - t_6) / t_2
t_8 = t_7 * 4.0d0
t_9 = (x1 * x1) * (t_8 - 6.0d0)
t_10 = t_5 * t_7
if (x1 <= (-2.15d+102)) then
tmp = x1 + ((x2 * (-6.0d0)) - (x1 * (2.0d0 - (x1 * (9.0d0 + (x1 * (-19.0d0)))))))
else if (x1 <= (-0.82d0)) then
tmp = x1 + (9.0d0 - ((((t_5 * ((t_6 - x1) / t_2)) + (t_3 * (((t_7 - 3.0d0) * t_1) - t_9))) - t_0) - x1))
else if (x1 <= 0.72d0) then
tmp = x1 + ((3.0d0 * ((x1 - (t_5 - (2.0d0 * x2))) / t_2)) + (x1 + (t_0 + (t_10 - (t_3 * ((t_4 * t_1) - t_9))))))
else if (x1 <= 4d+153) then
tmp = x1 + (9.0d0 + (x1 + (t_0 + (t_10 + ((((x1 * x1) * (6.0d0 - t_8)) - (4.0d0 * (x1 * (x2 * t_4)))) * t_2)))))
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 * (x1 * x1);
double t_1 = (x1 * 2.0) * (x1 - (2.0 * x2));
double t_2 = -1.0 - (x1 * x1);
double t_3 = (x1 * x1) + 1.0;
double t_4 = (2.0 * x2) - 3.0;
double t_5 = x1 * (x1 * 3.0);
double t_6 = t_5 + (2.0 * x2);
double t_7 = (x1 - t_6) / t_2;
double t_8 = t_7 * 4.0;
double t_9 = (x1 * x1) * (t_8 - 6.0);
double t_10 = t_5 * t_7;
double tmp;
if (x1 <= -2.15e+102) {
tmp = x1 + ((x2 * -6.0) - (x1 * (2.0 - (x1 * (9.0 + (x1 * -19.0))))));
} else if (x1 <= -0.82) {
tmp = x1 + (9.0 - ((((t_5 * ((t_6 - x1) / t_2)) + (t_3 * (((t_7 - 3.0) * t_1) - t_9))) - t_0) - x1));
} else if (x1 <= 0.72) {
tmp = x1 + ((3.0 * ((x1 - (t_5 - (2.0 * x2))) / t_2)) + (x1 + (t_0 + (t_10 - (t_3 * ((t_4 * t_1) - t_9))))));
} else if (x1 <= 4e+153) {
tmp = x1 + (9.0 + (x1 + (t_0 + (t_10 + ((((x1 * x1) * (6.0 - t_8)) - (4.0 * (x1 * (x2 * t_4)))) * t_2)))));
} else {
tmp = x1 + ((x2 * -6.0) + (x1 * ((x1 * 9.0) - 2.0)));
}
return tmp;
}
def code(x1, x2): t_0 = x1 * (x1 * x1) t_1 = (x1 * 2.0) * (x1 - (2.0 * x2)) t_2 = -1.0 - (x1 * x1) t_3 = (x1 * x1) + 1.0 t_4 = (2.0 * x2) - 3.0 t_5 = x1 * (x1 * 3.0) t_6 = t_5 + (2.0 * x2) t_7 = (x1 - t_6) / t_2 t_8 = t_7 * 4.0 t_9 = (x1 * x1) * (t_8 - 6.0) t_10 = t_5 * t_7 tmp = 0 if x1 <= -2.15e+102: tmp = x1 + ((x2 * -6.0) - (x1 * (2.0 - (x1 * (9.0 + (x1 * -19.0)))))) elif x1 <= -0.82: tmp = x1 + (9.0 - ((((t_5 * ((t_6 - x1) / t_2)) + (t_3 * (((t_7 - 3.0) * t_1) - t_9))) - t_0) - x1)) elif x1 <= 0.72: tmp = x1 + ((3.0 * ((x1 - (t_5 - (2.0 * x2))) / t_2)) + (x1 + (t_0 + (t_10 - (t_3 * ((t_4 * t_1) - t_9)))))) elif x1 <= 4e+153: tmp = x1 + (9.0 + (x1 + (t_0 + (t_10 + ((((x1 * x1) * (6.0 - t_8)) - (4.0 * (x1 * (x2 * t_4)))) * t_2))))) else: tmp = x1 + ((x2 * -6.0) + (x1 * ((x1 * 9.0) - 2.0))) return tmp
function code(x1, x2) t_0 = Float64(x1 * Float64(x1 * x1)) t_1 = Float64(Float64(x1 * 2.0) * Float64(x1 - Float64(2.0 * x2))) t_2 = Float64(-1.0 - Float64(x1 * x1)) t_3 = Float64(Float64(x1 * x1) + 1.0) t_4 = Float64(Float64(2.0 * x2) - 3.0) t_5 = Float64(x1 * Float64(x1 * 3.0)) t_6 = Float64(t_5 + Float64(2.0 * x2)) t_7 = Float64(Float64(x1 - t_6) / t_2) t_8 = Float64(t_7 * 4.0) t_9 = Float64(Float64(x1 * x1) * Float64(t_8 - 6.0)) t_10 = Float64(t_5 * t_7) tmp = 0.0 if (x1 <= -2.15e+102) tmp = Float64(x1 + Float64(Float64(x2 * -6.0) - Float64(x1 * Float64(2.0 - Float64(x1 * Float64(9.0 + Float64(x1 * -19.0))))))); elseif (x1 <= -0.82) tmp = Float64(x1 + Float64(9.0 - Float64(Float64(Float64(Float64(t_5 * Float64(Float64(t_6 - x1) / t_2)) + Float64(t_3 * Float64(Float64(Float64(t_7 - 3.0) * t_1) - t_9))) - t_0) - x1))); elseif (x1 <= 0.72) tmp = Float64(x1 + Float64(Float64(3.0 * Float64(Float64(x1 - Float64(t_5 - Float64(2.0 * x2))) / t_2)) + Float64(x1 + Float64(t_0 + Float64(t_10 - Float64(t_3 * Float64(Float64(t_4 * t_1) - t_9))))))); elseif (x1 <= 4e+153) tmp = Float64(x1 + Float64(9.0 + Float64(x1 + Float64(t_0 + Float64(t_10 + Float64(Float64(Float64(Float64(x1 * x1) * Float64(6.0 - t_8)) - Float64(4.0 * Float64(x1 * Float64(x2 * t_4)))) * t_2)))))); 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 * (x1 * x1); t_1 = (x1 * 2.0) * (x1 - (2.0 * x2)); t_2 = -1.0 - (x1 * x1); t_3 = (x1 * x1) + 1.0; t_4 = (2.0 * x2) - 3.0; t_5 = x1 * (x1 * 3.0); t_6 = t_5 + (2.0 * x2); t_7 = (x1 - t_6) / t_2; t_8 = t_7 * 4.0; t_9 = (x1 * x1) * (t_8 - 6.0); t_10 = t_5 * t_7; tmp = 0.0; if (x1 <= -2.15e+102) tmp = x1 + ((x2 * -6.0) - (x1 * (2.0 - (x1 * (9.0 + (x1 * -19.0)))))); elseif (x1 <= -0.82) tmp = x1 + (9.0 - ((((t_5 * ((t_6 - x1) / t_2)) + (t_3 * (((t_7 - 3.0) * t_1) - t_9))) - t_0) - x1)); elseif (x1 <= 0.72) tmp = x1 + ((3.0 * ((x1 - (t_5 - (2.0 * x2))) / t_2)) + (x1 + (t_0 + (t_10 - (t_3 * ((t_4 * t_1) - t_9)))))); elseif (x1 <= 4e+153) tmp = x1 + (9.0 + (x1 + (t_0 + (t_10 + ((((x1 * x1) * (6.0 - t_8)) - (4.0 * (x1 * (x2 * t_4)))) * t_2))))); 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[(x1 * x1), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(N[(x1 * 2.0), $MachinePrecision] * N[(x1 - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(-1.0 - N[(x1 * x1), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[(x1 * x1), $MachinePrecision] + 1.0), $MachinePrecision]}, Block[{t$95$4 = N[(N[(2.0 * x2), $MachinePrecision] - 3.0), $MachinePrecision]}, Block[{t$95$5 = N[(x1 * N[(x1 * 3.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$6 = N[(t$95$5 + N[(2.0 * x2), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$7 = N[(N[(x1 - t$95$6), $MachinePrecision] / t$95$2), $MachinePrecision]}, Block[{t$95$8 = N[(t$95$7 * 4.0), $MachinePrecision]}, Block[{t$95$9 = N[(N[(x1 * x1), $MachinePrecision] * N[(t$95$8 - 6.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$10 = N[(t$95$5 * t$95$7), $MachinePrecision]}, If[LessEqual[x1, -2.15e+102], N[(x1 + N[(N[(x2 * -6.0), $MachinePrecision] - N[(x1 * N[(2.0 - N[(x1 * N[(9.0 + N[(x1 * -19.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, -0.82], N[(x1 + N[(9.0 - N[(N[(N[(N[(t$95$5 * N[(N[(t$95$6 - x1), $MachinePrecision] / t$95$2), $MachinePrecision]), $MachinePrecision] + N[(t$95$3 * N[(N[(N[(t$95$7 - 3.0), $MachinePrecision] * t$95$1), $MachinePrecision] - t$95$9), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision] - x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 0.72], N[(x1 + N[(N[(3.0 * N[(N[(x1 - N[(t$95$5 - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / t$95$2), $MachinePrecision]), $MachinePrecision] + N[(x1 + N[(t$95$0 + N[(t$95$10 - N[(t$95$3 * N[(N[(t$95$4 * t$95$1), $MachinePrecision] - t$95$9), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 4e+153], N[(x1 + N[(9.0 + N[(x1 + N[(t$95$0 + N[(t$95$10 + N[(N[(N[(N[(x1 * x1), $MachinePrecision] * N[(6.0 - t$95$8), $MachinePrecision]), $MachinePrecision] - N[(4.0 * N[(x1 * N[(x2 * t$95$4), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * t$95$2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x1 + N[(N[(x2 * -6.0), $MachinePrecision] + N[(x1 * N[(N[(x1 * 9.0), $MachinePrecision] - 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x1 \cdot \left(x1 \cdot x1\right)\\
t_1 := \left(x1 \cdot 2\right) \cdot \left(x1 - 2 \cdot x2\right)\\
t_2 := -1 - x1 \cdot x1\\
t_3 := x1 \cdot x1 + 1\\
t_4 := 2 \cdot x2 - 3\\
t_5 := x1 \cdot \left(x1 \cdot 3\right)\\
t_6 := t\_5 + 2 \cdot x2\\
t_7 := \frac{x1 - t\_6}{t\_2}\\
t_8 := t\_7 \cdot 4\\
t_9 := \left(x1 \cdot x1\right) \cdot \left(t\_8 - 6\right)\\
t_10 := t\_5 \cdot t\_7\\
\mathbf{if}\;x1 \leq -2.15 \cdot 10^{+102}:\\
\;\;\;\;x1 + \left(x2 \cdot -6 - x1 \cdot \left(2 - x1 \cdot \left(9 + x1 \cdot -19\right)\right)\right)\\
\mathbf{elif}\;x1 \leq -0.82:\\
\;\;\;\;x1 + \left(9 - \left(\left(\left(t\_5 \cdot \frac{t\_6 - x1}{t\_2} + t\_3 \cdot \left(\left(t\_7 - 3\right) \cdot t\_1 - t\_9\right)\right) - t\_0\right) - x1\right)\right)\\
\mathbf{elif}\;x1 \leq 0.72:\\
\;\;\;\;x1 + \left(3 \cdot \frac{x1 - \left(t\_5 - 2 \cdot x2\right)}{t\_2} + \left(x1 + \left(t\_0 + \left(t\_10 - t\_3 \cdot \left(t\_4 \cdot t\_1 - t\_9\right)\right)\right)\right)\right)\\
\mathbf{elif}\;x1 \leq 4 \cdot 10^{+153}:\\
\;\;\;\;x1 + \left(9 + \left(x1 + \left(t\_0 + \left(t\_10 + \left(\left(x1 \cdot x1\right) \cdot \left(6 - t\_8\right) - 4 \cdot \left(x1 \cdot \left(x2 \cdot t\_4\right)\right)\right) \cdot t\_2\right)\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x1 + \left(x2 \cdot -6 + x1 \cdot \left(x1 \cdot 9 - 2\right)\right)\\
\end{array}
\end{array}
if x1 < -2.15e102Initial program 3.6%
Taylor expanded in x1 around 0 3.6%
Taylor expanded in x1 around 0 74.5%
Taylor expanded in x2 around 0 94.5%
*-commutative94.5%
Simplified94.5%
if -2.15e102 < x1 < -0.819999999999999951Initial program 99.0%
Taylor expanded in x1 around 0 67.0%
+-commutative67.0%
mul-1-neg67.0%
unsub-neg67.0%
Simplified67.0%
Taylor expanded in x1 around inf 67.0%
if -0.819999999999999951 < x1 < 0.71999999999999997Initial program 99.2%
Taylor expanded in x1 around 0 98.2%
+-commutative98.2%
mul-1-neg98.2%
unsub-neg98.2%
Simplified98.2%
Taylor expanded in x1 around 0 98.2%
if 0.71999999999999997 < x1 < 4e153Initial program 96.7%
Taylor expanded in x1 around 0 80.6%
+-commutative80.6%
mul-1-neg80.6%
unsub-neg80.6%
Simplified80.6%
Taylor expanded in x1 around inf 80.6%
Taylor expanded in x1 around 0 93.8%
if 4e153 < x1 Initial program 0.0%
Taylor expanded in x1 around 0 0.0%
Taylor expanded in x1 around 0 77.5%
Taylor expanded in x2 around 0 100.0%
*-commutative100.0%
Simplified100.0%
Final simplification94.9%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (* x1 (* x1 x1)))
(t_1 (- -1.0 (* x1 x1)))
(t_2 (* x1 (* x1 3.0)))
(t_3 (+ t_2 (* 2.0 x2)))
(t_4 (/ (- x1 t_3) t_1))
(t_5 (* t_4 4.0)))
(if (<= x1 -3e+102)
(+ x1 (- (* x2 -6.0) (* x1 (- 2.0 (* x1 (+ 9.0 (* x1 -19.0)))))))
(if (<= x1 -0.48)
(+
x1
(-
9.0
(-
(-
(+
(* t_2 (/ (- t_3 x1) t_1))
(*
(+ (* x1 x1) 1.0)
(-
(* (- t_4 3.0) (* (* x1 2.0) (- x1 (* 2.0 x2))))
(* (* x1 x1) (- t_5 6.0)))))
t_0)
x1)))
(if (<= x1 1.9)
(+
x1
(+
(* 3.0 (/ (- x1 (- t_2 (* 2.0 x2))) t_1))
(+ x1 (* 4.0 (* x2 (+ (* x1 -3.0) (* 2.0 (* x1 x2))))))))
(if (<= x1 4e+153)
(+
x1
(+
9.0
(+
x1
(+
t_0
(+
(* t_2 t_4)
(*
(-
(* (* x1 x1) (- 6.0 t_5))
(* 4.0 (* x1 (* x2 (- (* 2.0 x2) 3.0)))))
t_1))))))
(+ x1 (+ (* x2 -6.0) (* x1 (- (* x1 9.0) 2.0))))))))))
double code(double x1, double x2) {
double t_0 = x1 * (x1 * x1);
double t_1 = -1.0 - (x1 * x1);
double t_2 = x1 * (x1 * 3.0);
double t_3 = t_2 + (2.0 * x2);
double t_4 = (x1 - t_3) / t_1;
double t_5 = t_4 * 4.0;
double tmp;
if (x1 <= -3e+102) {
tmp = x1 + ((x2 * -6.0) - (x1 * (2.0 - (x1 * (9.0 + (x1 * -19.0))))));
} else if (x1 <= -0.48) {
tmp = x1 + (9.0 - ((((t_2 * ((t_3 - x1) / t_1)) + (((x1 * x1) + 1.0) * (((t_4 - 3.0) * ((x1 * 2.0) * (x1 - (2.0 * x2)))) - ((x1 * x1) * (t_5 - 6.0))))) - t_0) - x1));
} else if (x1 <= 1.9) {
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 <= 4e+153) {
tmp = x1 + (9.0 + (x1 + (t_0 + ((t_2 * t_4) + ((((x1 * x1) * (6.0 - t_5)) - (4.0 * (x1 * (x2 * ((2.0 * x2) - 3.0))))) * t_1)))));
} 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) :: t_3
real(8) :: t_4
real(8) :: t_5
real(8) :: tmp
t_0 = x1 * (x1 * x1)
t_1 = (-1.0d0) - (x1 * x1)
t_2 = x1 * (x1 * 3.0d0)
t_3 = t_2 + (2.0d0 * x2)
t_4 = (x1 - t_3) / t_1
t_5 = t_4 * 4.0d0
if (x1 <= (-3d+102)) then
tmp = x1 + ((x2 * (-6.0d0)) - (x1 * (2.0d0 - (x1 * (9.0d0 + (x1 * (-19.0d0)))))))
else if (x1 <= (-0.48d0)) then
tmp = x1 + (9.0d0 - ((((t_2 * ((t_3 - x1) / t_1)) + (((x1 * x1) + 1.0d0) * (((t_4 - 3.0d0) * ((x1 * 2.0d0) * (x1 - (2.0d0 * x2)))) - ((x1 * x1) * (t_5 - 6.0d0))))) - t_0) - x1))
else if (x1 <= 1.9d0) 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 <= 4d+153) then
tmp = x1 + (9.0d0 + (x1 + (t_0 + ((t_2 * t_4) + ((((x1 * x1) * (6.0d0 - t_5)) - (4.0d0 * (x1 * (x2 * ((2.0d0 * x2) - 3.0d0))))) * t_1)))))
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 * (x1 * x1);
double t_1 = -1.0 - (x1 * x1);
double t_2 = x1 * (x1 * 3.0);
double t_3 = t_2 + (2.0 * x2);
double t_4 = (x1 - t_3) / t_1;
double t_5 = t_4 * 4.0;
double tmp;
if (x1 <= -3e+102) {
tmp = x1 + ((x2 * -6.0) - (x1 * (2.0 - (x1 * (9.0 + (x1 * -19.0))))));
} else if (x1 <= -0.48) {
tmp = x1 + (9.0 - ((((t_2 * ((t_3 - x1) / t_1)) + (((x1 * x1) + 1.0) * (((t_4 - 3.0) * ((x1 * 2.0) * (x1 - (2.0 * x2)))) - ((x1 * x1) * (t_5 - 6.0))))) - t_0) - x1));
} else if (x1 <= 1.9) {
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 <= 4e+153) {
tmp = x1 + (9.0 + (x1 + (t_0 + ((t_2 * t_4) + ((((x1 * x1) * (6.0 - t_5)) - (4.0 * (x1 * (x2 * ((2.0 * x2) - 3.0))))) * t_1)))));
} else {
tmp = x1 + ((x2 * -6.0) + (x1 * ((x1 * 9.0) - 2.0)));
}
return tmp;
}
def code(x1, x2): t_0 = x1 * (x1 * x1) t_1 = -1.0 - (x1 * x1) t_2 = x1 * (x1 * 3.0) t_3 = t_2 + (2.0 * x2) t_4 = (x1 - t_3) / t_1 t_5 = t_4 * 4.0 tmp = 0 if x1 <= -3e+102: tmp = x1 + ((x2 * -6.0) - (x1 * (2.0 - (x1 * (9.0 + (x1 * -19.0)))))) elif x1 <= -0.48: tmp = x1 + (9.0 - ((((t_2 * ((t_3 - x1) / t_1)) + (((x1 * x1) + 1.0) * (((t_4 - 3.0) * ((x1 * 2.0) * (x1 - (2.0 * x2)))) - ((x1 * x1) * (t_5 - 6.0))))) - t_0) - x1)) elif x1 <= 1.9: 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 <= 4e+153: tmp = x1 + (9.0 + (x1 + (t_0 + ((t_2 * t_4) + ((((x1 * x1) * (6.0 - t_5)) - (4.0 * (x1 * (x2 * ((2.0 * x2) - 3.0))))) * t_1))))) else: tmp = x1 + ((x2 * -6.0) + (x1 * ((x1 * 9.0) - 2.0))) return tmp
function code(x1, x2) t_0 = Float64(x1 * Float64(x1 * x1)) t_1 = Float64(-1.0 - Float64(x1 * x1)) t_2 = Float64(x1 * Float64(x1 * 3.0)) t_3 = Float64(t_2 + Float64(2.0 * x2)) t_4 = Float64(Float64(x1 - t_3) / t_1) t_5 = Float64(t_4 * 4.0) tmp = 0.0 if (x1 <= -3e+102) tmp = Float64(x1 + Float64(Float64(x2 * -6.0) - Float64(x1 * Float64(2.0 - Float64(x1 * Float64(9.0 + Float64(x1 * -19.0))))))); elseif (x1 <= -0.48) tmp = Float64(x1 + Float64(9.0 - Float64(Float64(Float64(Float64(t_2 * Float64(Float64(t_3 - x1) / t_1)) + Float64(Float64(Float64(x1 * x1) + 1.0) * Float64(Float64(Float64(t_4 - 3.0) * Float64(Float64(x1 * 2.0) * Float64(x1 - Float64(2.0 * x2)))) - Float64(Float64(x1 * x1) * Float64(t_5 - 6.0))))) - t_0) - x1))); elseif (x1 <= 1.9) 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 <= 4e+153) tmp = Float64(x1 + Float64(9.0 + Float64(x1 + Float64(t_0 + Float64(Float64(t_2 * t_4) + Float64(Float64(Float64(Float64(x1 * x1) * Float64(6.0 - t_5)) - Float64(4.0 * Float64(x1 * Float64(x2 * Float64(Float64(2.0 * x2) - 3.0))))) * t_1)))))); 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 * (x1 * x1); t_1 = -1.0 - (x1 * x1); t_2 = x1 * (x1 * 3.0); t_3 = t_2 + (2.0 * x2); t_4 = (x1 - t_3) / t_1; t_5 = t_4 * 4.0; tmp = 0.0; if (x1 <= -3e+102) tmp = x1 + ((x2 * -6.0) - (x1 * (2.0 - (x1 * (9.0 + (x1 * -19.0)))))); elseif (x1 <= -0.48) tmp = x1 + (9.0 - ((((t_2 * ((t_3 - x1) / t_1)) + (((x1 * x1) + 1.0) * (((t_4 - 3.0) * ((x1 * 2.0) * (x1 - (2.0 * x2)))) - ((x1 * x1) * (t_5 - 6.0))))) - t_0) - x1)); elseif (x1 <= 1.9) 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 <= 4e+153) tmp = x1 + (9.0 + (x1 + (t_0 + ((t_2 * t_4) + ((((x1 * x1) * (6.0 - t_5)) - (4.0 * (x1 * (x2 * ((2.0 * x2) - 3.0))))) * t_1))))); 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[(x1 * x1), $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[(t$95$2 + N[(2.0 * x2), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[(N[(x1 - t$95$3), $MachinePrecision] / t$95$1), $MachinePrecision]}, Block[{t$95$5 = N[(t$95$4 * 4.0), $MachinePrecision]}, If[LessEqual[x1, -3e+102], N[(x1 + N[(N[(x2 * -6.0), $MachinePrecision] - N[(x1 * N[(2.0 - N[(x1 * N[(9.0 + N[(x1 * -19.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, -0.48], N[(x1 + N[(9.0 - N[(N[(N[(N[(t$95$2 * N[(N[(t$95$3 - x1), $MachinePrecision] / t$95$1), $MachinePrecision]), $MachinePrecision] + N[(N[(N[(x1 * x1), $MachinePrecision] + 1.0), $MachinePrecision] * N[(N[(N[(t$95$4 - 3.0), $MachinePrecision] * N[(N[(x1 * 2.0), $MachinePrecision] * N[(x1 - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[(x1 * x1), $MachinePrecision] * N[(t$95$5 - 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision] - x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 1.9], 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, 4e+153], N[(x1 + N[(9.0 + N[(x1 + N[(t$95$0 + N[(N[(t$95$2 * t$95$4), $MachinePrecision] + N[(N[(N[(N[(x1 * x1), $MachinePrecision] * N[(6.0 - t$95$5), $MachinePrecision]), $MachinePrecision] - N[(4.0 * N[(x1 * N[(x2 * N[(N[(2.0 * x2), $MachinePrecision] - 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x1 + N[(N[(x2 * -6.0), $MachinePrecision] + N[(x1 * N[(N[(x1 * 9.0), $MachinePrecision] - 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x1 \cdot \left(x1 \cdot x1\right)\\
t_1 := -1 - x1 \cdot x1\\
t_2 := x1 \cdot \left(x1 \cdot 3\right)\\
t_3 := t\_2 + 2 \cdot x2\\
t_4 := \frac{x1 - t\_3}{t\_1}\\
t_5 := t\_4 \cdot 4\\
\mathbf{if}\;x1 \leq -3 \cdot 10^{+102}:\\
\;\;\;\;x1 + \left(x2 \cdot -6 - x1 \cdot \left(2 - x1 \cdot \left(9 + x1 \cdot -19\right)\right)\right)\\
\mathbf{elif}\;x1 \leq -0.48:\\
\;\;\;\;x1 + \left(9 - \left(\left(\left(t\_2 \cdot \frac{t\_3 - x1}{t\_1} + \left(x1 \cdot x1 + 1\right) \cdot \left(\left(t\_4 - 3\right) \cdot \left(\left(x1 \cdot 2\right) \cdot \left(x1 - 2 \cdot x2\right)\right) - \left(x1 \cdot x1\right) \cdot \left(t\_5 - 6\right)\right)\right) - t\_0\right) - x1\right)\right)\\
\mathbf{elif}\;x1 \leq 1.9:\\
\;\;\;\;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 4 \cdot 10^{+153}:\\
\;\;\;\;x1 + \left(9 + \left(x1 + \left(t\_0 + \left(t\_2 \cdot t\_4 + \left(\left(x1 \cdot x1\right) \cdot \left(6 - t\_5\right) - 4 \cdot \left(x1 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right)\right)\right) \cdot t\_1\right)\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x1 + \left(x2 \cdot -6 + x1 \cdot \left(x1 \cdot 9 - 2\right)\right)\\
\end{array}
\end{array}
if x1 < -2.9999999999999998e102Initial program 3.6%
Taylor expanded in x1 around 0 3.6%
Taylor expanded in x1 around 0 74.5%
Taylor expanded in x2 around 0 94.5%
*-commutative94.5%
Simplified94.5%
if -2.9999999999999998e102 < x1 < -0.47999999999999998Initial program 99.0%
Taylor expanded in x1 around 0 67.0%
+-commutative67.0%
mul-1-neg67.0%
unsub-neg67.0%
Simplified67.0%
Taylor expanded in x1 around inf 67.0%
if -0.47999999999999998 < x1 < 1.8999999999999999Initial program 99.2%
Taylor expanded in x1 around 0 87.9%
Taylor expanded in x2 around 0 98.2%
if 1.8999999999999999 < x1 < 4e153Initial program 96.7%
Taylor expanded in x1 around 0 80.6%
+-commutative80.6%
mul-1-neg80.6%
unsub-neg80.6%
Simplified80.6%
Taylor expanded in x1 around inf 80.6%
Taylor expanded in x1 around 0 93.8%
if 4e153 < x1 Initial program 0.0%
Taylor expanded in x1 around 0 0.0%
Taylor expanded in x1 around 0 77.5%
Taylor expanded in x2 around 0 100.0%
*-commutative100.0%
Simplified100.0%
Final simplification94.9%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (- (* 2.0 x2) 3.0))
(t_1 (- -1.0 (* x1 x1)))
(t_2 (* x1 (* x1 x1)))
(t_3 (* x1 (* x1 3.0)))
(t_4 (+ t_3 (* 2.0 x2)))
(t_5 (/ (- x1 t_4) t_1)))
(if (<= x1 -2.5e+102)
(+ x1 (- (* x2 -6.0) (* x1 (- 2.0 (* x1 (+ 9.0 (* x1 -19.0)))))))
(if (<= x1 -0.72)
(+
x1
(+
9.0
(+
x1
(-
t_2
(+
(* t_3 (/ (- t_4 x1) t_1))
(*
(+ (* x1 x1) 1.0)
(+
(* (* x1 x1) (- 6.0 (* 4.0 (+ 3.0 (/ (+ -1.0 (/ t_0 x1)) x1)))))
(* (- t_5 3.0) (* (* x1 2.0) (- x1 (* 2.0 x2)))))))))))
(if (<= x1 1.86)
(+
x1
(+
(* 3.0 (/ (- x1 (- t_3 (* 2.0 x2))) t_1))
(+ x1 (* 4.0 (* x2 (+ (* x1 -3.0) (* 2.0 (* x1 x2))))))))
(if (<= x1 4e+153)
(+
x1
(+
9.0
(+
x1
(+
t_2
(+
(* t_3 t_5)
(*
(-
(* (* x1 x1) (- 6.0 (* t_5 4.0)))
(* 4.0 (* x1 (* x2 t_0))))
t_1))))))
(+ x1 (+ (* x2 -6.0) (* x1 (- (* x1 9.0) 2.0))))))))))
double code(double x1, double x2) {
double t_0 = (2.0 * x2) - 3.0;
double t_1 = -1.0 - (x1 * x1);
double t_2 = x1 * (x1 * x1);
double t_3 = x1 * (x1 * 3.0);
double t_4 = t_3 + (2.0 * x2);
double t_5 = (x1 - t_4) / t_1;
double tmp;
if (x1 <= -2.5e+102) {
tmp = x1 + ((x2 * -6.0) - (x1 * (2.0 - (x1 * (9.0 + (x1 * -19.0))))));
} else if (x1 <= -0.72) {
tmp = x1 + (9.0 + (x1 + (t_2 - ((t_3 * ((t_4 - x1) / t_1)) + (((x1 * x1) + 1.0) * (((x1 * x1) * (6.0 - (4.0 * (3.0 + ((-1.0 + (t_0 / x1)) / x1))))) + ((t_5 - 3.0) * ((x1 * 2.0) * (x1 - (2.0 * x2))))))))));
} else if (x1 <= 1.86) {
tmp = x1 + ((3.0 * ((x1 - (t_3 - (2.0 * x2))) / t_1)) + (x1 + (4.0 * (x2 * ((x1 * -3.0) + (2.0 * (x1 * x2)))))));
} else if (x1 <= 4e+153) {
tmp = x1 + (9.0 + (x1 + (t_2 + ((t_3 * t_5) + ((((x1 * x1) * (6.0 - (t_5 * 4.0))) - (4.0 * (x1 * (x2 * t_0)))) * t_1)))));
} 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) :: t_3
real(8) :: t_4
real(8) :: t_5
real(8) :: tmp
t_0 = (2.0d0 * x2) - 3.0d0
t_1 = (-1.0d0) - (x1 * x1)
t_2 = x1 * (x1 * x1)
t_3 = x1 * (x1 * 3.0d0)
t_4 = t_3 + (2.0d0 * x2)
t_5 = (x1 - t_4) / t_1
if (x1 <= (-2.5d+102)) then
tmp = x1 + ((x2 * (-6.0d0)) - (x1 * (2.0d0 - (x1 * (9.0d0 + (x1 * (-19.0d0)))))))
else if (x1 <= (-0.72d0)) then
tmp = x1 + (9.0d0 + (x1 + (t_2 - ((t_3 * ((t_4 - x1) / t_1)) + (((x1 * x1) + 1.0d0) * (((x1 * x1) * (6.0d0 - (4.0d0 * (3.0d0 + (((-1.0d0) + (t_0 / x1)) / x1))))) + ((t_5 - 3.0d0) * ((x1 * 2.0d0) * (x1 - (2.0d0 * x2))))))))))
else if (x1 <= 1.86d0) then
tmp = x1 + ((3.0d0 * ((x1 - (t_3 - (2.0d0 * x2))) / t_1)) + (x1 + (4.0d0 * (x2 * ((x1 * (-3.0d0)) + (2.0d0 * (x1 * x2)))))))
else if (x1 <= 4d+153) then
tmp = x1 + (9.0d0 + (x1 + (t_2 + ((t_3 * t_5) + ((((x1 * x1) * (6.0d0 - (t_5 * 4.0d0))) - (4.0d0 * (x1 * (x2 * t_0)))) * t_1)))))
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 = (2.0 * x2) - 3.0;
double t_1 = -1.0 - (x1 * x1);
double t_2 = x1 * (x1 * x1);
double t_3 = x1 * (x1 * 3.0);
double t_4 = t_3 + (2.0 * x2);
double t_5 = (x1 - t_4) / t_1;
double tmp;
if (x1 <= -2.5e+102) {
tmp = x1 + ((x2 * -6.0) - (x1 * (2.0 - (x1 * (9.0 + (x1 * -19.0))))));
} else if (x1 <= -0.72) {
tmp = x1 + (9.0 + (x1 + (t_2 - ((t_3 * ((t_4 - x1) / t_1)) + (((x1 * x1) + 1.0) * (((x1 * x1) * (6.0 - (4.0 * (3.0 + ((-1.0 + (t_0 / x1)) / x1))))) + ((t_5 - 3.0) * ((x1 * 2.0) * (x1 - (2.0 * x2))))))))));
} else if (x1 <= 1.86) {
tmp = x1 + ((3.0 * ((x1 - (t_3 - (2.0 * x2))) / t_1)) + (x1 + (4.0 * (x2 * ((x1 * -3.0) + (2.0 * (x1 * x2)))))));
} else if (x1 <= 4e+153) {
tmp = x1 + (9.0 + (x1 + (t_2 + ((t_3 * t_5) + ((((x1 * x1) * (6.0 - (t_5 * 4.0))) - (4.0 * (x1 * (x2 * t_0)))) * t_1)))));
} else {
tmp = x1 + ((x2 * -6.0) + (x1 * ((x1 * 9.0) - 2.0)));
}
return tmp;
}
def code(x1, x2): t_0 = (2.0 * x2) - 3.0 t_1 = -1.0 - (x1 * x1) t_2 = x1 * (x1 * x1) t_3 = x1 * (x1 * 3.0) t_4 = t_3 + (2.0 * x2) t_5 = (x1 - t_4) / t_1 tmp = 0 if x1 <= -2.5e+102: tmp = x1 + ((x2 * -6.0) - (x1 * (2.0 - (x1 * (9.0 + (x1 * -19.0)))))) elif x1 <= -0.72: tmp = x1 + (9.0 + (x1 + (t_2 - ((t_3 * ((t_4 - x1) / t_1)) + (((x1 * x1) + 1.0) * (((x1 * x1) * (6.0 - (4.0 * (3.0 + ((-1.0 + (t_0 / x1)) / x1))))) + ((t_5 - 3.0) * ((x1 * 2.0) * (x1 - (2.0 * x2)))))))))) elif x1 <= 1.86: tmp = x1 + ((3.0 * ((x1 - (t_3 - (2.0 * x2))) / t_1)) + (x1 + (4.0 * (x2 * ((x1 * -3.0) + (2.0 * (x1 * x2))))))) elif x1 <= 4e+153: tmp = x1 + (9.0 + (x1 + (t_2 + ((t_3 * t_5) + ((((x1 * x1) * (6.0 - (t_5 * 4.0))) - (4.0 * (x1 * (x2 * t_0)))) * t_1))))) else: tmp = x1 + ((x2 * -6.0) + (x1 * ((x1 * 9.0) - 2.0))) return tmp
function code(x1, x2) t_0 = Float64(Float64(2.0 * x2) - 3.0) t_1 = Float64(-1.0 - Float64(x1 * x1)) t_2 = Float64(x1 * Float64(x1 * x1)) t_3 = Float64(x1 * Float64(x1 * 3.0)) t_4 = Float64(t_3 + Float64(2.0 * x2)) t_5 = Float64(Float64(x1 - t_4) / t_1) tmp = 0.0 if (x1 <= -2.5e+102) tmp = Float64(x1 + Float64(Float64(x2 * -6.0) - Float64(x1 * Float64(2.0 - Float64(x1 * Float64(9.0 + Float64(x1 * -19.0))))))); elseif (x1 <= -0.72) tmp = Float64(x1 + Float64(9.0 + Float64(x1 + Float64(t_2 - Float64(Float64(t_3 * Float64(Float64(t_4 - x1) / t_1)) + Float64(Float64(Float64(x1 * x1) + 1.0) * Float64(Float64(Float64(x1 * x1) * Float64(6.0 - Float64(4.0 * Float64(3.0 + Float64(Float64(-1.0 + Float64(t_0 / x1)) / x1))))) + Float64(Float64(t_5 - 3.0) * Float64(Float64(x1 * 2.0) * Float64(x1 - Float64(2.0 * x2))))))))))); elseif (x1 <= 1.86) tmp = Float64(x1 + Float64(Float64(3.0 * Float64(Float64(x1 - Float64(t_3 - 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 <= 4e+153) tmp = Float64(x1 + Float64(9.0 + Float64(x1 + Float64(t_2 + Float64(Float64(t_3 * t_5) + Float64(Float64(Float64(Float64(x1 * x1) * Float64(6.0 - Float64(t_5 * 4.0))) - Float64(4.0 * Float64(x1 * Float64(x2 * t_0)))) * t_1)))))); 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 = (2.0 * x2) - 3.0; t_1 = -1.0 - (x1 * x1); t_2 = x1 * (x1 * x1); t_3 = x1 * (x1 * 3.0); t_4 = t_3 + (2.0 * x2); t_5 = (x1 - t_4) / t_1; tmp = 0.0; if (x1 <= -2.5e+102) tmp = x1 + ((x2 * -6.0) - (x1 * (2.0 - (x1 * (9.0 + (x1 * -19.0)))))); elseif (x1 <= -0.72) tmp = x1 + (9.0 + (x1 + (t_2 - ((t_3 * ((t_4 - x1) / t_1)) + (((x1 * x1) + 1.0) * (((x1 * x1) * (6.0 - (4.0 * (3.0 + ((-1.0 + (t_0 / x1)) / x1))))) + ((t_5 - 3.0) * ((x1 * 2.0) * (x1 - (2.0 * x2)))))))))); elseif (x1 <= 1.86) tmp = x1 + ((3.0 * ((x1 - (t_3 - (2.0 * x2))) / t_1)) + (x1 + (4.0 * (x2 * ((x1 * -3.0) + (2.0 * (x1 * x2))))))); elseif (x1 <= 4e+153) tmp = x1 + (9.0 + (x1 + (t_2 + ((t_3 * t_5) + ((((x1 * x1) * (6.0 - (t_5 * 4.0))) - (4.0 * (x1 * (x2 * t_0)))) * t_1))))); 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[(N[(2.0 * x2), $MachinePrecision] - 3.0), $MachinePrecision]}, Block[{t$95$1 = N[(-1.0 - N[(x1 * x1), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x1 * N[(x1 * x1), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(x1 * N[(x1 * 3.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[(t$95$3 + N[(2.0 * x2), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$5 = N[(N[(x1 - t$95$4), $MachinePrecision] / t$95$1), $MachinePrecision]}, If[LessEqual[x1, -2.5e+102], N[(x1 + N[(N[(x2 * -6.0), $MachinePrecision] - N[(x1 * N[(2.0 - N[(x1 * N[(9.0 + N[(x1 * -19.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, -0.72], N[(x1 + N[(9.0 + N[(x1 + N[(t$95$2 - N[(N[(t$95$3 * N[(N[(t$95$4 - x1), $MachinePrecision] / t$95$1), $MachinePrecision]), $MachinePrecision] + N[(N[(N[(x1 * x1), $MachinePrecision] + 1.0), $MachinePrecision] * N[(N[(N[(x1 * x1), $MachinePrecision] * N[(6.0 - N[(4.0 * N[(3.0 + N[(N[(-1.0 + N[(t$95$0 / x1), $MachinePrecision]), $MachinePrecision] / x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(t$95$5 - 3.0), $MachinePrecision] * N[(N[(x1 * 2.0), $MachinePrecision] * N[(x1 - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 1.86], N[(x1 + N[(N[(3.0 * N[(N[(x1 - N[(t$95$3 - 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, 4e+153], N[(x1 + N[(9.0 + N[(x1 + N[(t$95$2 + N[(N[(t$95$3 * t$95$5), $MachinePrecision] + N[(N[(N[(N[(x1 * x1), $MachinePrecision] * N[(6.0 - N[(t$95$5 * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(4.0 * N[(x1 * N[(x2 * t$95$0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x1 + N[(N[(x2 * -6.0), $MachinePrecision] + N[(x1 * N[(N[(x1 * 9.0), $MachinePrecision] - 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := 2 \cdot x2 - 3\\
t_1 := -1 - x1 \cdot x1\\
t_2 := x1 \cdot \left(x1 \cdot x1\right)\\
t_3 := x1 \cdot \left(x1 \cdot 3\right)\\
t_4 := t\_3 + 2 \cdot x2\\
t_5 := \frac{x1 - t\_4}{t\_1}\\
\mathbf{if}\;x1 \leq -2.5 \cdot 10^{+102}:\\
\;\;\;\;x1 + \left(x2 \cdot -6 - x1 \cdot \left(2 - x1 \cdot \left(9 + x1 \cdot -19\right)\right)\right)\\
\mathbf{elif}\;x1 \leq -0.72:\\
\;\;\;\;x1 + \left(9 + \left(x1 + \left(t\_2 - \left(t\_3 \cdot \frac{t\_4 - x1}{t\_1} + \left(x1 \cdot x1 + 1\right) \cdot \left(\left(x1 \cdot x1\right) \cdot \left(6 - 4 \cdot \left(3 + \frac{-1 + \frac{t\_0}{x1}}{x1}\right)\right) + \left(t\_5 - 3\right) \cdot \left(\left(x1 \cdot 2\right) \cdot \left(x1 - 2 \cdot x2\right)\right)\right)\right)\right)\right)\right)\\
\mathbf{elif}\;x1 \leq 1.86:\\
\;\;\;\;x1 + \left(3 \cdot \frac{x1 - \left(t\_3 - 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 4 \cdot 10^{+153}:\\
\;\;\;\;x1 + \left(9 + \left(x1 + \left(t\_2 + \left(t\_3 \cdot t\_5 + \left(\left(x1 \cdot x1\right) \cdot \left(6 - t\_5 \cdot 4\right) - 4 \cdot \left(x1 \cdot \left(x2 \cdot t\_0\right)\right)\right) \cdot t\_1\right)\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x1 + \left(x2 \cdot -6 + x1 \cdot \left(x1 \cdot 9 - 2\right)\right)\\
\end{array}
\end{array}
if x1 < -2.5e102Initial program 3.6%
Taylor expanded in x1 around 0 3.6%
Taylor expanded in x1 around 0 74.5%
Taylor expanded in x2 around 0 94.5%
*-commutative94.5%
Simplified94.5%
if -2.5e102 < x1 < -0.71999999999999997Initial program 99.0%
Taylor expanded in x1 around 0 67.0%
+-commutative67.0%
mul-1-neg67.0%
unsub-neg67.0%
Simplified67.0%
Taylor expanded in x1 around inf 67.0%
Taylor expanded in x1 around -inf 66.9%
if -0.71999999999999997 < x1 < 1.8600000000000001Initial program 99.2%
Taylor expanded in x1 around 0 87.9%
Taylor expanded in x2 around 0 98.2%
if 1.8600000000000001 < x1 < 4e153Initial program 96.7%
Taylor expanded in x1 around 0 80.6%
+-commutative80.6%
mul-1-neg80.6%
unsub-neg80.6%
Simplified80.6%
Taylor expanded in x1 around inf 80.6%
Taylor expanded in x1 around 0 93.8%
if 4e153 < x1 Initial program 0.0%
Taylor expanded in x1 around 0 0.0%
Taylor expanded in x1 around 0 77.5%
Taylor expanded in x2 around 0 100.0%
*-commutative100.0%
Simplified100.0%
Final simplification94.9%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (* x1 (* x1 x1)))
(t_1 (* x1 (* x1 3.0)))
(t_2 (+ t_1 (* 2.0 x2)))
(t_3 (- -1.0 (* x1 x1)))
(t_4 (/ (- x1 t_2) t_3))
(t_5 (* (* x1 x1) (- 6.0 (* t_4 4.0)))))
(if (<= x1 -1e+103)
(+ x1 (- (* x2 -6.0) (* x1 (- 2.0 (* x1 (+ 9.0 (* x1 -19.0)))))))
(if (<= x1 -0.65)
(+
x1
(+
9.0
(+
x1
(-
t_0
(+
(* t_1 (/ (- t_2 x1) t_3))
(*
(+ (* x1 x1) 1.0)
(+
(*
(* (* x1 2.0) (- (* 2.0 x2) x1))
(/ (- (+ 1.0 (/ 3.0 x1)) (* 2.0 (/ x2 x1))) x1))
t_5)))))))
(if (<= x1 1.86)
(+
x1
(+
(* 3.0 (/ (- x1 (- t_1 (* 2.0 x2))) t_3))
(+ x1 (* 4.0 (* x2 (+ (* x1 -3.0) (* 2.0 (* x1 x2))))))))
(if (<= x1 4e+153)
(+
x1
(+
9.0
(+
x1
(+
t_0
(+
(* t_1 t_4)
(* (- t_5 (* 4.0 (* x1 (* x2 (- (* 2.0 x2) 3.0))))) t_3))))))
(+ x1 (+ (* x2 -6.0) (* x1 (- (* x1 9.0) 2.0))))))))))
double code(double x1, double x2) {
double t_0 = x1 * (x1 * x1);
double t_1 = x1 * (x1 * 3.0);
double t_2 = t_1 + (2.0 * x2);
double t_3 = -1.0 - (x1 * x1);
double t_4 = (x1 - t_2) / t_3;
double t_5 = (x1 * x1) * (6.0 - (t_4 * 4.0));
double tmp;
if (x1 <= -1e+103) {
tmp = x1 + ((x2 * -6.0) - (x1 * (2.0 - (x1 * (9.0 + (x1 * -19.0))))));
} else if (x1 <= -0.65) {
tmp = x1 + (9.0 + (x1 + (t_0 - ((t_1 * ((t_2 - x1) / t_3)) + (((x1 * x1) + 1.0) * ((((x1 * 2.0) * ((2.0 * x2) - x1)) * (((1.0 + (3.0 / x1)) - (2.0 * (x2 / x1))) / x1)) + t_5))))));
} else if (x1 <= 1.86) {
tmp = x1 + ((3.0 * ((x1 - (t_1 - (2.0 * x2))) / t_3)) + (x1 + (4.0 * (x2 * ((x1 * -3.0) + (2.0 * (x1 * x2)))))));
} else if (x1 <= 4e+153) {
tmp = x1 + (9.0 + (x1 + (t_0 + ((t_1 * t_4) + ((t_5 - (4.0 * (x1 * (x2 * ((2.0 * x2) - 3.0))))) * t_3)))));
} 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) :: t_3
real(8) :: t_4
real(8) :: t_5
real(8) :: tmp
t_0 = x1 * (x1 * x1)
t_1 = x1 * (x1 * 3.0d0)
t_2 = t_1 + (2.0d0 * x2)
t_3 = (-1.0d0) - (x1 * x1)
t_4 = (x1 - t_2) / t_3
t_5 = (x1 * x1) * (6.0d0 - (t_4 * 4.0d0))
if (x1 <= (-1d+103)) then
tmp = x1 + ((x2 * (-6.0d0)) - (x1 * (2.0d0 - (x1 * (9.0d0 + (x1 * (-19.0d0)))))))
else if (x1 <= (-0.65d0)) then
tmp = x1 + (9.0d0 + (x1 + (t_0 - ((t_1 * ((t_2 - x1) / t_3)) + (((x1 * x1) + 1.0d0) * ((((x1 * 2.0d0) * ((2.0d0 * x2) - x1)) * (((1.0d0 + (3.0d0 / x1)) - (2.0d0 * (x2 / x1))) / x1)) + t_5))))))
else if (x1 <= 1.86d0) then
tmp = x1 + ((3.0d0 * ((x1 - (t_1 - (2.0d0 * x2))) / t_3)) + (x1 + (4.0d0 * (x2 * ((x1 * (-3.0d0)) + (2.0d0 * (x1 * x2)))))))
else if (x1 <= 4d+153) then
tmp = x1 + (9.0d0 + (x1 + (t_0 + ((t_1 * t_4) + ((t_5 - (4.0d0 * (x1 * (x2 * ((2.0d0 * x2) - 3.0d0))))) * t_3)))))
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 * (x1 * x1);
double t_1 = x1 * (x1 * 3.0);
double t_2 = t_1 + (2.0 * x2);
double t_3 = -1.0 - (x1 * x1);
double t_4 = (x1 - t_2) / t_3;
double t_5 = (x1 * x1) * (6.0 - (t_4 * 4.0));
double tmp;
if (x1 <= -1e+103) {
tmp = x1 + ((x2 * -6.0) - (x1 * (2.0 - (x1 * (9.0 + (x1 * -19.0))))));
} else if (x1 <= -0.65) {
tmp = x1 + (9.0 + (x1 + (t_0 - ((t_1 * ((t_2 - x1) / t_3)) + (((x1 * x1) + 1.0) * ((((x1 * 2.0) * ((2.0 * x2) - x1)) * (((1.0 + (3.0 / x1)) - (2.0 * (x2 / x1))) / x1)) + t_5))))));
} else if (x1 <= 1.86) {
tmp = x1 + ((3.0 * ((x1 - (t_1 - (2.0 * x2))) / t_3)) + (x1 + (4.0 * (x2 * ((x1 * -3.0) + (2.0 * (x1 * x2)))))));
} else if (x1 <= 4e+153) {
tmp = x1 + (9.0 + (x1 + (t_0 + ((t_1 * t_4) + ((t_5 - (4.0 * (x1 * (x2 * ((2.0 * x2) - 3.0))))) * t_3)))));
} else {
tmp = x1 + ((x2 * -6.0) + (x1 * ((x1 * 9.0) - 2.0)));
}
return tmp;
}
def code(x1, x2): t_0 = x1 * (x1 * x1) t_1 = x1 * (x1 * 3.0) t_2 = t_1 + (2.0 * x2) t_3 = -1.0 - (x1 * x1) t_4 = (x1 - t_2) / t_3 t_5 = (x1 * x1) * (6.0 - (t_4 * 4.0)) tmp = 0 if x1 <= -1e+103: tmp = x1 + ((x2 * -6.0) - (x1 * (2.0 - (x1 * (9.0 + (x1 * -19.0)))))) elif x1 <= -0.65: tmp = x1 + (9.0 + (x1 + (t_0 - ((t_1 * ((t_2 - x1) / t_3)) + (((x1 * x1) + 1.0) * ((((x1 * 2.0) * ((2.0 * x2) - x1)) * (((1.0 + (3.0 / x1)) - (2.0 * (x2 / x1))) / x1)) + t_5)))))) elif x1 <= 1.86: tmp = x1 + ((3.0 * ((x1 - (t_1 - (2.0 * x2))) / t_3)) + (x1 + (4.0 * (x2 * ((x1 * -3.0) + (2.0 * (x1 * x2))))))) elif x1 <= 4e+153: tmp = x1 + (9.0 + (x1 + (t_0 + ((t_1 * t_4) + ((t_5 - (4.0 * (x1 * (x2 * ((2.0 * x2) - 3.0))))) * t_3))))) else: tmp = x1 + ((x2 * -6.0) + (x1 * ((x1 * 9.0) - 2.0))) return tmp
function code(x1, x2) t_0 = Float64(x1 * Float64(x1 * x1)) t_1 = Float64(x1 * Float64(x1 * 3.0)) t_2 = Float64(t_1 + Float64(2.0 * x2)) t_3 = Float64(-1.0 - Float64(x1 * x1)) t_4 = Float64(Float64(x1 - t_2) / t_3) t_5 = Float64(Float64(x1 * x1) * Float64(6.0 - Float64(t_4 * 4.0))) tmp = 0.0 if (x1 <= -1e+103) tmp = Float64(x1 + Float64(Float64(x2 * -6.0) - Float64(x1 * Float64(2.0 - Float64(x1 * Float64(9.0 + Float64(x1 * -19.0))))))); elseif (x1 <= -0.65) tmp = Float64(x1 + Float64(9.0 + Float64(x1 + Float64(t_0 - Float64(Float64(t_1 * Float64(Float64(t_2 - x1) / t_3)) + Float64(Float64(Float64(x1 * x1) + 1.0) * Float64(Float64(Float64(Float64(x1 * 2.0) * Float64(Float64(2.0 * x2) - x1)) * Float64(Float64(Float64(1.0 + Float64(3.0 / x1)) - Float64(2.0 * Float64(x2 / x1))) / x1)) + t_5))))))); elseif (x1 <= 1.86) tmp = Float64(x1 + Float64(Float64(3.0 * Float64(Float64(x1 - Float64(t_1 - Float64(2.0 * x2))) / t_3)) + Float64(x1 + Float64(4.0 * Float64(x2 * Float64(Float64(x1 * -3.0) + Float64(2.0 * Float64(x1 * x2)))))))); elseif (x1 <= 4e+153) tmp = Float64(x1 + Float64(9.0 + Float64(x1 + Float64(t_0 + Float64(Float64(t_1 * t_4) + Float64(Float64(t_5 - Float64(4.0 * Float64(x1 * Float64(x2 * Float64(Float64(2.0 * x2) - 3.0))))) * t_3)))))); 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 * (x1 * x1); t_1 = x1 * (x1 * 3.0); t_2 = t_1 + (2.0 * x2); t_3 = -1.0 - (x1 * x1); t_4 = (x1 - t_2) / t_3; t_5 = (x1 * x1) * (6.0 - (t_4 * 4.0)); tmp = 0.0; if (x1 <= -1e+103) tmp = x1 + ((x2 * -6.0) - (x1 * (2.0 - (x1 * (9.0 + (x1 * -19.0)))))); elseif (x1 <= -0.65) tmp = x1 + (9.0 + (x1 + (t_0 - ((t_1 * ((t_2 - x1) / t_3)) + (((x1 * x1) + 1.0) * ((((x1 * 2.0) * ((2.0 * x2) - x1)) * (((1.0 + (3.0 / x1)) - (2.0 * (x2 / x1))) / x1)) + t_5)))))); elseif (x1 <= 1.86) tmp = x1 + ((3.0 * ((x1 - (t_1 - (2.0 * x2))) / t_3)) + (x1 + (4.0 * (x2 * ((x1 * -3.0) + (2.0 * (x1 * x2))))))); elseif (x1 <= 4e+153) tmp = x1 + (9.0 + (x1 + (t_0 + ((t_1 * t_4) + ((t_5 - (4.0 * (x1 * (x2 * ((2.0 * x2) - 3.0))))) * t_3))))); 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[(x1 * x1), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(x1 * N[(x1 * 3.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(t$95$1 + N[(2.0 * x2), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(-1.0 - N[(x1 * x1), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[(N[(x1 - t$95$2), $MachinePrecision] / t$95$3), $MachinePrecision]}, Block[{t$95$5 = N[(N[(x1 * x1), $MachinePrecision] * N[(6.0 - N[(t$95$4 * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x1, -1e+103], N[(x1 + N[(N[(x2 * -6.0), $MachinePrecision] - N[(x1 * N[(2.0 - N[(x1 * N[(9.0 + N[(x1 * -19.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, -0.65], N[(x1 + N[(9.0 + N[(x1 + N[(t$95$0 - N[(N[(t$95$1 * N[(N[(t$95$2 - x1), $MachinePrecision] / t$95$3), $MachinePrecision]), $MachinePrecision] + N[(N[(N[(x1 * x1), $MachinePrecision] + 1.0), $MachinePrecision] * N[(N[(N[(N[(x1 * 2.0), $MachinePrecision] * N[(N[(2.0 * x2), $MachinePrecision] - x1), $MachinePrecision]), $MachinePrecision] * N[(N[(N[(1.0 + N[(3.0 / x1), $MachinePrecision]), $MachinePrecision] - N[(2.0 * N[(x2 / x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / x1), $MachinePrecision]), $MachinePrecision] + t$95$5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 1.86], N[(x1 + N[(N[(3.0 * N[(N[(x1 - N[(t$95$1 - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / t$95$3), $MachinePrecision]), $MachinePrecision] + N[(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, 4e+153], N[(x1 + N[(9.0 + N[(x1 + N[(t$95$0 + N[(N[(t$95$1 * t$95$4), $MachinePrecision] + N[(N[(t$95$5 - N[(4.0 * N[(x1 * N[(x2 * N[(N[(2.0 * x2), $MachinePrecision] - 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * t$95$3), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x1 + N[(N[(x2 * -6.0), $MachinePrecision] + N[(x1 * N[(N[(x1 * 9.0), $MachinePrecision] - 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x1 \cdot \left(x1 \cdot x1\right)\\
t_1 := x1 \cdot \left(x1 \cdot 3\right)\\
t_2 := t\_1 + 2 \cdot x2\\
t_3 := -1 - x1 \cdot x1\\
t_4 := \frac{x1 - t\_2}{t\_3}\\
t_5 := \left(x1 \cdot x1\right) \cdot \left(6 - t\_4 \cdot 4\right)\\
\mathbf{if}\;x1 \leq -1 \cdot 10^{+103}:\\
\;\;\;\;x1 + \left(x2 \cdot -6 - x1 \cdot \left(2 - x1 \cdot \left(9 + x1 \cdot -19\right)\right)\right)\\
\mathbf{elif}\;x1 \leq -0.65:\\
\;\;\;\;x1 + \left(9 + \left(x1 + \left(t\_0 - \left(t\_1 \cdot \frac{t\_2 - x1}{t\_3} + \left(x1 \cdot x1 + 1\right) \cdot \left(\left(\left(x1 \cdot 2\right) \cdot \left(2 \cdot x2 - x1\right)\right) \cdot \frac{\left(1 + \frac{3}{x1}\right) - 2 \cdot \frac{x2}{x1}}{x1} + t\_5\right)\right)\right)\right)\right)\\
\mathbf{elif}\;x1 \leq 1.86:\\
\;\;\;\;x1 + \left(3 \cdot \frac{x1 - \left(t\_1 - 2 \cdot x2\right)}{t\_3} + \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 4 \cdot 10^{+153}:\\
\;\;\;\;x1 + \left(9 + \left(x1 + \left(t\_0 + \left(t\_1 \cdot t\_4 + \left(t\_5 - 4 \cdot \left(x1 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right)\right)\right) \cdot t\_3\right)\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x1 + \left(x2 \cdot -6 + x1 \cdot \left(x1 \cdot 9 - 2\right)\right)\\
\end{array}
\end{array}
if x1 < -1e103Initial program 3.6%
Taylor expanded in x1 around 0 3.6%
Taylor expanded in x1 around 0 74.5%
Taylor expanded in x2 around 0 94.5%
*-commutative94.5%
Simplified94.5%
if -1e103 < x1 < -0.650000000000000022Initial program 99.0%
Taylor expanded in x1 around 0 67.0%
+-commutative67.0%
mul-1-neg67.0%
unsub-neg67.0%
Simplified67.0%
Taylor expanded in x1 around inf 67.0%
Taylor expanded in x1 around inf 62.9%
associate-*r/62.9%
metadata-eval62.9%
Simplified62.9%
if -0.650000000000000022 < x1 < 1.8600000000000001Initial program 99.2%
Taylor expanded in x1 around 0 87.9%
Taylor expanded in x2 around 0 98.2%
if 1.8600000000000001 < x1 < 4e153Initial program 96.7%
Taylor expanded in x1 around 0 80.6%
+-commutative80.6%
mul-1-neg80.6%
unsub-neg80.6%
Simplified80.6%
Taylor expanded in x1 around inf 80.6%
Taylor expanded in x1 around 0 93.8%
if 4e153 < x1 Initial program 0.0%
Taylor expanded in x1 around 0 0.0%
Taylor expanded in x1 around 0 77.5%
Taylor expanded in x2 around 0 100.0%
*-commutative100.0%
Simplified100.0%
Final simplification94.7%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (- -1.0 (* x1 x1)))
(t_1 (* x1 (* x1 3.0)))
(t_2 (/ (- x1 (+ t_1 (* 2.0 x2))) t_0))
(t_3
(+
x1
(+
9.0
(+
x1
(+
(* x1 (* x1 x1))
(+
(* t_1 t_2)
(*
(-
(* (* x1 x1) (- 6.0 (* t_2 4.0)))
(* 4.0 (* x1 (* x2 (- (* 2.0 x2) 3.0)))))
t_0))))))))
(if (<= x1 -2.1e+102)
(+ x1 (- (* x2 -6.0) (* x1 (- 2.0 (* x1 (+ 9.0 (* x1 -19.0)))))))
(if (<= x1 -0.48)
t_3
(if (<= x1 0.62)
(+
x1
(+
(* 3.0 (/ (- x1 (- t_1 (* 2.0 x2))) t_0))
(+ x1 (* 4.0 (* x2 (+ (* x1 -3.0) (* 2.0 (* x1 x2))))))))
(if (<= x1 4e+153)
t_3
(+ x1 (+ (* x2 -6.0) (* x1 (- (* x1 9.0) 2.0))))))))))
double code(double x1, double x2) {
double t_0 = -1.0 - (x1 * x1);
double t_1 = x1 * (x1 * 3.0);
double t_2 = (x1 - (t_1 + (2.0 * x2))) / t_0;
double t_3 = x1 + (9.0 + (x1 + ((x1 * (x1 * x1)) + ((t_1 * t_2) + ((((x1 * x1) * (6.0 - (t_2 * 4.0))) - (4.0 * (x1 * (x2 * ((2.0 * x2) - 3.0))))) * t_0)))));
double tmp;
if (x1 <= -2.1e+102) {
tmp = x1 + ((x2 * -6.0) - (x1 * (2.0 - (x1 * (9.0 + (x1 * -19.0))))));
} else if (x1 <= -0.48) {
tmp = t_3;
} else if (x1 <= 0.62) {
tmp = x1 + ((3.0 * ((x1 - (t_1 - (2.0 * x2))) / t_0)) + (x1 + (4.0 * (x2 * ((x1 * -3.0) + (2.0 * (x1 * x2)))))));
} else if (x1 <= 4e+153) {
tmp = t_3;
} 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) :: t_3
real(8) :: tmp
t_0 = (-1.0d0) - (x1 * x1)
t_1 = x1 * (x1 * 3.0d0)
t_2 = (x1 - (t_1 + (2.0d0 * x2))) / t_0
t_3 = x1 + (9.0d0 + (x1 + ((x1 * (x1 * x1)) + ((t_1 * t_2) + ((((x1 * x1) * (6.0d0 - (t_2 * 4.0d0))) - (4.0d0 * (x1 * (x2 * ((2.0d0 * x2) - 3.0d0))))) * t_0)))))
if (x1 <= (-2.1d+102)) then
tmp = x1 + ((x2 * (-6.0d0)) - (x1 * (2.0d0 - (x1 * (9.0d0 + (x1 * (-19.0d0)))))))
else if (x1 <= (-0.48d0)) then
tmp = t_3
else if (x1 <= 0.62d0) then
tmp = x1 + ((3.0d0 * ((x1 - (t_1 - (2.0d0 * x2))) / t_0)) + (x1 + (4.0d0 * (x2 * ((x1 * (-3.0d0)) + (2.0d0 * (x1 * x2)))))))
else if (x1 <= 4d+153) then
tmp = t_3
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 = -1.0 - (x1 * x1);
double t_1 = x1 * (x1 * 3.0);
double t_2 = (x1 - (t_1 + (2.0 * x2))) / t_0;
double t_3 = x1 + (9.0 + (x1 + ((x1 * (x1 * x1)) + ((t_1 * t_2) + ((((x1 * x1) * (6.0 - (t_2 * 4.0))) - (4.0 * (x1 * (x2 * ((2.0 * x2) - 3.0))))) * t_0)))));
double tmp;
if (x1 <= -2.1e+102) {
tmp = x1 + ((x2 * -6.0) - (x1 * (2.0 - (x1 * (9.0 + (x1 * -19.0))))));
} else if (x1 <= -0.48) {
tmp = t_3;
} else if (x1 <= 0.62) {
tmp = x1 + ((3.0 * ((x1 - (t_1 - (2.0 * x2))) / t_0)) + (x1 + (4.0 * (x2 * ((x1 * -3.0) + (2.0 * (x1 * x2)))))));
} else if (x1 <= 4e+153) {
tmp = t_3;
} else {
tmp = x1 + ((x2 * -6.0) + (x1 * ((x1 * 9.0) - 2.0)));
}
return tmp;
}
def code(x1, x2): t_0 = -1.0 - (x1 * x1) t_1 = x1 * (x1 * 3.0) t_2 = (x1 - (t_1 + (2.0 * x2))) / t_0 t_3 = x1 + (9.0 + (x1 + ((x1 * (x1 * x1)) + ((t_1 * t_2) + ((((x1 * x1) * (6.0 - (t_2 * 4.0))) - (4.0 * (x1 * (x2 * ((2.0 * x2) - 3.0))))) * t_0))))) tmp = 0 if x1 <= -2.1e+102: tmp = x1 + ((x2 * -6.0) - (x1 * (2.0 - (x1 * (9.0 + (x1 * -19.0)))))) elif x1 <= -0.48: tmp = t_3 elif x1 <= 0.62: tmp = x1 + ((3.0 * ((x1 - (t_1 - (2.0 * x2))) / t_0)) + (x1 + (4.0 * (x2 * ((x1 * -3.0) + (2.0 * (x1 * x2))))))) elif x1 <= 4e+153: tmp = t_3 else: tmp = x1 + ((x2 * -6.0) + (x1 * ((x1 * 9.0) - 2.0))) return tmp
function code(x1, x2) t_0 = Float64(-1.0 - Float64(x1 * x1)) t_1 = Float64(x1 * Float64(x1 * 3.0)) t_2 = Float64(Float64(x1 - Float64(t_1 + Float64(2.0 * x2))) / t_0) t_3 = Float64(x1 + Float64(9.0 + Float64(x1 + Float64(Float64(x1 * Float64(x1 * x1)) + Float64(Float64(t_1 * t_2) + Float64(Float64(Float64(Float64(x1 * x1) * Float64(6.0 - Float64(t_2 * 4.0))) - Float64(4.0 * Float64(x1 * Float64(x2 * Float64(Float64(2.0 * x2) - 3.0))))) * t_0)))))) tmp = 0.0 if (x1 <= -2.1e+102) tmp = Float64(x1 + Float64(Float64(x2 * -6.0) - Float64(x1 * Float64(2.0 - Float64(x1 * Float64(9.0 + Float64(x1 * -19.0))))))); elseif (x1 <= -0.48) tmp = t_3; elseif (x1 <= 0.62) tmp = Float64(x1 + Float64(Float64(3.0 * Float64(Float64(x1 - Float64(t_1 - Float64(2.0 * x2))) / t_0)) + Float64(x1 + Float64(4.0 * Float64(x2 * Float64(Float64(x1 * -3.0) + Float64(2.0 * Float64(x1 * x2)))))))); elseif (x1 <= 4e+153) tmp = t_3; 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 = -1.0 - (x1 * x1); t_1 = x1 * (x1 * 3.0); t_2 = (x1 - (t_1 + (2.0 * x2))) / t_0; t_3 = x1 + (9.0 + (x1 + ((x1 * (x1 * x1)) + ((t_1 * t_2) + ((((x1 * x1) * (6.0 - (t_2 * 4.0))) - (4.0 * (x1 * (x2 * ((2.0 * x2) - 3.0))))) * t_0))))); tmp = 0.0; if (x1 <= -2.1e+102) tmp = x1 + ((x2 * -6.0) - (x1 * (2.0 - (x1 * (9.0 + (x1 * -19.0)))))); elseif (x1 <= -0.48) tmp = t_3; elseif (x1 <= 0.62) tmp = x1 + ((3.0 * ((x1 - (t_1 - (2.0 * x2))) / t_0)) + (x1 + (4.0 * (x2 * ((x1 * -3.0) + (2.0 * (x1 * x2))))))); elseif (x1 <= 4e+153) tmp = t_3; 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[(-1.0 - N[(x1 * x1), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(x1 * N[(x1 * 3.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(x1 - N[(t$95$1 + N[(2.0 * x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / t$95$0), $MachinePrecision]}, Block[{t$95$3 = N[(x1 + N[(9.0 + N[(x1 + N[(N[(x1 * N[(x1 * x1), $MachinePrecision]), $MachinePrecision] + N[(N[(t$95$1 * t$95$2), $MachinePrecision] + N[(N[(N[(N[(x1 * x1), $MachinePrecision] * N[(6.0 - N[(t$95$2 * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(4.0 * N[(x1 * N[(x2 * N[(N[(2.0 * x2), $MachinePrecision] - 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * t$95$0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x1, -2.1e+102], N[(x1 + N[(N[(x2 * -6.0), $MachinePrecision] - N[(x1 * N[(2.0 - N[(x1 * N[(9.0 + N[(x1 * -19.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, -0.48], t$95$3, If[LessEqual[x1, 0.62], N[(x1 + N[(N[(3.0 * N[(N[(x1 - N[(t$95$1 - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / t$95$0), $MachinePrecision]), $MachinePrecision] + N[(x1 + N[(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, 4e+153], t$95$3, 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 := -1 - x1 \cdot x1\\
t_1 := x1 \cdot \left(x1 \cdot 3\right)\\
t_2 := \frac{x1 - \left(t\_1 + 2 \cdot x2\right)}{t\_0}\\
t_3 := x1 + \left(9 + \left(x1 + \left(x1 \cdot \left(x1 \cdot x1\right) + \left(t\_1 \cdot t\_2 + \left(\left(x1 \cdot x1\right) \cdot \left(6 - t\_2 \cdot 4\right) - 4 \cdot \left(x1 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right)\right)\right) \cdot t\_0\right)\right)\right)\right)\\
\mathbf{if}\;x1 \leq -2.1 \cdot 10^{+102}:\\
\;\;\;\;x1 + \left(x2 \cdot -6 - x1 \cdot \left(2 - x1 \cdot \left(9 + x1 \cdot -19\right)\right)\right)\\
\mathbf{elif}\;x1 \leq -0.48:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;x1 \leq 0.62:\\
\;\;\;\;x1 + \left(3 \cdot \frac{x1 - \left(t\_1 - 2 \cdot x2\right)}{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 4 \cdot 10^{+153}:\\
\;\;\;\;t\_3\\
\mathbf{else}:\\
\;\;\;\;x1 + \left(x2 \cdot -6 + x1 \cdot \left(x1 \cdot 9 - 2\right)\right)\\
\end{array}
\end{array}
if x1 < -2.10000000000000001e102Initial program 3.6%
Taylor expanded in x1 around 0 3.6%
Taylor expanded in x1 around 0 74.5%
Taylor expanded in x2 around 0 94.5%
*-commutative94.5%
Simplified94.5%
if -2.10000000000000001e102 < x1 < -0.47999999999999998 or 0.619999999999999996 < x1 < 4e153Initial program 97.5%
Taylor expanded in x1 around 0 75.7%
+-commutative75.7%
mul-1-neg75.7%
unsub-neg75.7%
Simplified75.7%
Taylor expanded in x1 around inf 75.7%
Taylor expanded in x1 around 0 82.4%
if -0.47999999999999998 < x1 < 0.619999999999999996Initial program 99.2%
Taylor expanded in x1 around 0 87.9%
Taylor expanded in x2 around 0 98.2%
if 4e153 < x1 Initial program 0.0%
Taylor expanded in x1 around 0 0.0%
Taylor expanded in x1 around 0 77.5%
Taylor expanded in x2 around 0 100.0%
*-commutative100.0%
Simplified100.0%
Final simplification94.6%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (- -1.0 (* x1 x1)))
(t_1 (* x1 (* x1 3.0)))
(t_2 (/ (- x1 (+ t_1 (* 2.0 x2))) t_0))
(t_3
(+
x1
(+
9.0
(+
x1
(+
(* x1 (* x1 x1))
(+
(* t_1 t_2)
(*
(+ (* x1 x1) 1.0)
(+ (* x1 2.0) (* (* x1 x1) (- (* t_2 4.0) 6.0)))))))))))
(if (<= x1 -1e+103)
(+ x1 (- (* x2 -6.0) (* x1 (- 2.0 (* x1 (+ 9.0 (* x1 -19.0)))))))
(if (<= x1 -2.2)
t_3
(if (<= x1 7200.0)
(+
x1
(+
(* 3.0 (/ (- x1 (- t_1 (* 2.0 x2))) t_0))
(+ x1 (* 4.0 (* x2 (+ (* x1 -3.0) (* 2.0 (* x1 x2))))))))
(if (<= x1 1e+154)
t_3
(+ x1 (+ (* x2 -6.0) (* x1 (- (* x1 9.0) 2.0))))))))))
double code(double x1, double x2) {
double t_0 = -1.0 - (x1 * x1);
double t_1 = x1 * (x1 * 3.0);
double t_2 = (x1 - (t_1 + (2.0 * x2))) / t_0;
double t_3 = x1 + (9.0 + (x1 + ((x1 * (x1 * x1)) + ((t_1 * t_2) + (((x1 * x1) + 1.0) * ((x1 * 2.0) + ((x1 * x1) * ((t_2 * 4.0) - 6.0))))))));
double tmp;
if (x1 <= -1e+103) {
tmp = x1 + ((x2 * -6.0) - (x1 * (2.0 - (x1 * (9.0 + (x1 * -19.0))))));
} else if (x1 <= -2.2) {
tmp = t_3;
} else if (x1 <= 7200.0) {
tmp = x1 + ((3.0 * ((x1 - (t_1 - (2.0 * x2))) / t_0)) + (x1 + (4.0 * (x2 * ((x1 * -3.0) + (2.0 * (x1 * x2)))))));
} else if (x1 <= 1e+154) {
tmp = t_3;
} 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) :: t_3
real(8) :: tmp
t_0 = (-1.0d0) - (x1 * x1)
t_1 = x1 * (x1 * 3.0d0)
t_2 = (x1 - (t_1 + (2.0d0 * x2))) / t_0
t_3 = x1 + (9.0d0 + (x1 + ((x1 * (x1 * x1)) + ((t_1 * t_2) + (((x1 * x1) + 1.0d0) * ((x1 * 2.0d0) + ((x1 * x1) * ((t_2 * 4.0d0) - 6.0d0))))))))
if (x1 <= (-1d+103)) then
tmp = x1 + ((x2 * (-6.0d0)) - (x1 * (2.0d0 - (x1 * (9.0d0 + (x1 * (-19.0d0)))))))
else if (x1 <= (-2.2d0)) then
tmp = t_3
else if (x1 <= 7200.0d0) then
tmp = x1 + ((3.0d0 * ((x1 - (t_1 - (2.0d0 * x2))) / t_0)) + (x1 + (4.0d0 * (x2 * ((x1 * (-3.0d0)) + (2.0d0 * (x1 * x2)))))))
else if (x1 <= 1d+154) then
tmp = t_3
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 = -1.0 - (x1 * x1);
double t_1 = x1 * (x1 * 3.0);
double t_2 = (x1 - (t_1 + (2.0 * x2))) / t_0;
double t_3 = x1 + (9.0 + (x1 + ((x1 * (x1 * x1)) + ((t_1 * t_2) + (((x1 * x1) + 1.0) * ((x1 * 2.0) + ((x1 * x1) * ((t_2 * 4.0) - 6.0))))))));
double tmp;
if (x1 <= -1e+103) {
tmp = x1 + ((x2 * -6.0) - (x1 * (2.0 - (x1 * (9.0 + (x1 * -19.0))))));
} else if (x1 <= -2.2) {
tmp = t_3;
} else if (x1 <= 7200.0) {
tmp = x1 + ((3.0 * ((x1 - (t_1 - (2.0 * x2))) / t_0)) + (x1 + (4.0 * (x2 * ((x1 * -3.0) + (2.0 * (x1 * x2)))))));
} else if (x1 <= 1e+154) {
tmp = t_3;
} else {
tmp = x1 + ((x2 * -6.0) + (x1 * ((x1 * 9.0) - 2.0)));
}
return tmp;
}
def code(x1, x2): t_0 = -1.0 - (x1 * x1) t_1 = x1 * (x1 * 3.0) t_2 = (x1 - (t_1 + (2.0 * x2))) / t_0 t_3 = x1 + (9.0 + (x1 + ((x1 * (x1 * x1)) + ((t_1 * t_2) + (((x1 * x1) + 1.0) * ((x1 * 2.0) + ((x1 * x1) * ((t_2 * 4.0) - 6.0)))))))) tmp = 0 if x1 <= -1e+103: tmp = x1 + ((x2 * -6.0) - (x1 * (2.0 - (x1 * (9.0 + (x1 * -19.0)))))) elif x1 <= -2.2: tmp = t_3 elif x1 <= 7200.0: tmp = x1 + ((3.0 * ((x1 - (t_1 - (2.0 * x2))) / t_0)) + (x1 + (4.0 * (x2 * ((x1 * -3.0) + (2.0 * (x1 * x2))))))) elif x1 <= 1e+154: tmp = t_3 else: tmp = x1 + ((x2 * -6.0) + (x1 * ((x1 * 9.0) - 2.0))) return tmp
function code(x1, x2) t_0 = Float64(-1.0 - Float64(x1 * x1)) t_1 = Float64(x1 * Float64(x1 * 3.0)) t_2 = Float64(Float64(x1 - Float64(t_1 + Float64(2.0 * x2))) / t_0) t_3 = Float64(x1 + Float64(9.0 + Float64(x1 + Float64(Float64(x1 * Float64(x1 * x1)) + Float64(Float64(t_1 * t_2) + Float64(Float64(Float64(x1 * x1) + 1.0) * Float64(Float64(x1 * 2.0) + Float64(Float64(x1 * x1) * Float64(Float64(t_2 * 4.0) - 6.0))))))))) tmp = 0.0 if (x1 <= -1e+103) tmp = Float64(x1 + Float64(Float64(x2 * -6.0) - Float64(x1 * Float64(2.0 - Float64(x1 * Float64(9.0 + Float64(x1 * -19.0))))))); elseif (x1 <= -2.2) tmp = t_3; elseif (x1 <= 7200.0) tmp = Float64(x1 + Float64(Float64(3.0 * Float64(Float64(x1 - Float64(t_1 - Float64(2.0 * x2))) / t_0)) + Float64(x1 + Float64(4.0 * Float64(x2 * Float64(Float64(x1 * -3.0) + Float64(2.0 * Float64(x1 * x2)))))))); elseif (x1 <= 1e+154) tmp = t_3; 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 = -1.0 - (x1 * x1); t_1 = x1 * (x1 * 3.0); t_2 = (x1 - (t_1 + (2.0 * x2))) / t_0; t_3 = x1 + (9.0 + (x1 + ((x1 * (x1 * x1)) + ((t_1 * t_2) + (((x1 * x1) + 1.0) * ((x1 * 2.0) + ((x1 * x1) * ((t_2 * 4.0) - 6.0)))))))); tmp = 0.0; if (x1 <= -1e+103) tmp = x1 + ((x2 * -6.0) - (x1 * (2.0 - (x1 * (9.0 + (x1 * -19.0)))))); elseif (x1 <= -2.2) tmp = t_3; elseif (x1 <= 7200.0) tmp = x1 + ((3.0 * ((x1 - (t_1 - (2.0 * x2))) / t_0)) + (x1 + (4.0 * (x2 * ((x1 * -3.0) + (2.0 * (x1 * x2))))))); elseif (x1 <= 1e+154) tmp = t_3; 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[(-1.0 - N[(x1 * x1), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(x1 * N[(x1 * 3.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(x1 - N[(t$95$1 + N[(2.0 * x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / t$95$0), $MachinePrecision]}, Block[{t$95$3 = N[(x1 + N[(9.0 + N[(x1 + N[(N[(x1 * N[(x1 * x1), $MachinePrecision]), $MachinePrecision] + N[(N[(t$95$1 * t$95$2), $MachinePrecision] + N[(N[(N[(x1 * x1), $MachinePrecision] + 1.0), $MachinePrecision] * N[(N[(x1 * 2.0), $MachinePrecision] + N[(N[(x1 * x1), $MachinePrecision] * N[(N[(t$95$2 * 4.0), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x1, -1e+103], N[(x1 + N[(N[(x2 * -6.0), $MachinePrecision] - N[(x1 * N[(2.0 - N[(x1 * N[(9.0 + N[(x1 * -19.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, -2.2], t$95$3, If[LessEqual[x1, 7200.0], N[(x1 + N[(N[(3.0 * N[(N[(x1 - N[(t$95$1 - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / t$95$0), $MachinePrecision]), $MachinePrecision] + N[(x1 + N[(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, 1e+154], t$95$3, 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 := -1 - x1 \cdot x1\\
t_1 := x1 \cdot \left(x1 \cdot 3\right)\\
t_2 := \frac{x1 - \left(t\_1 + 2 \cdot x2\right)}{t\_0}\\
t_3 := x1 + \left(9 + \left(x1 + \left(x1 \cdot \left(x1 \cdot x1\right) + \left(t\_1 \cdot t\_2 + \left(x1 \cdot x1 + 1\right) \cdot \left(x1 \cdot 2 + \left(x1 \cdot x1\right) \cdot \left(t\_2 \cdot 4 - 6\right)\right)\right)\right)\right)\right)\\
\mathbf{if}\;x1 \leq -1 \cdot 10^{+103}:\\
\;\;\;\;x1 + \left(x2 \cdot -6 - x1 \cdot \left(2 - x1 \cdot \left(9 + x1 \cdot -19\right)\right)\right)\\
\mathbf{elif}\;x1 \leq -2.2:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;x1 \leq 7200:\\
\;\;\;\;x1 + \left(3 \cdot \frac{x1 - \left(t\_1 - 2 \cdot x2\right)}{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 10^{+154}:\\
\;\;\;\;t\_3\\
\mathbf{else}:\\
\;\;\;\;x1 + \left(x2 \cdot -6 + x1 \cdot \left(x1 \cdot 9 - 2\right)\right)\\
\end{array}
\end{array}
if x1 < -1e103Initial program 3.6%
Taylor expanded in x1 around 0 3.6%
Taylor expanded in x1 around 0 74.5%
Taylor expanded in x2 around 0 94.5%
*-commutative94.5%
Simplified94.5%
if -1e103 < x1 < -2.2000000000000002 or 7200 < x1 < 1.00000000000000004e154Initial program 97.5%
Taylor expanded in x1 around 0 75.7%
+-commutative75.7%
mul-1-neg75.7%
unsub-neg75.7%
Simplified75.7%
Taylor expanded in x1 around inf 75.7%
Taylor expanded in x1 around inf 79.0%
if -2.2000000000000002 < x1 < 7200Initial program 99.2%
Taylor expanded in x1 around 0 87.9%
Taylor expanded in x2 around 0 98.2%
if 1.00000000000000004e154 < x1 Initial program 0.0%
Taylor expanded in x1 around 0 0.0%
Taylor expanded in x1 around 0 77.5%
Taylor expanded in x2 around 0 100.0%
*-commutative100.0%
Simplified100.0%
Final simplification93.9%
(FPCore (x1 x2)
:precision binary64
(if (<= x1 -1e+93)
(+ x1 (- (* x2 -6.0) (* x1 (- 2.0 (* x1 (+ 9.0 (* x1 -19.0)))))))
(if (<= x1 2.2e+90)
(+
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
(-
(* x2 -6.0)
(*
x1
(+
2.0
(-
(* 4.0 (* x2 (- 3.0 (* 2.0 x2))))
(* x1 (+ (* x1 3.0) (* x2 6.0)))))))))))
double code(double x1, double x2) {
double tmp;
if (x1 <= -1e+93) {
tmp = x1 + ((x2 * -6.0) - (x1 * (2.0 - (x1 * (9.0 + (x1 * -19.0))))));
} else if (x1 <= 2.2e+90) {
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 + ((x2 * -6.0) - (x1 * (2.0 + ((4.0 * (x2 * (3.0 - (2.0 * x2)))) - (x1 * ((x1 * 3.0) + (x2 * 6.0)))))));
}
return tmp;
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
real(8) :: tmp
if (x1 <= (-1d+93)) then
tmp = x1 + ((x2 * (-6.0d0)) - (x1 * (2.0d0 - (x1 * (9.0d0 + (x1 * (-19.0d0)))))))
else if (x1 <= 2.2d+90) 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 + ((x2 * (-6.0d0)) - (x1 * (2.0d0 + ((4.0d0 * (x2 * (3.0d0 - (2.0d0 * x2)))) - (x1 * ((x1 * 3.0d0) + (x2 * 6.0d0)))))))
end if
code = tmp
end function
public static double code(double x1, double x2) {
double tmp;
if (x1 <= -1e+93) {
tmp = x1 + ((x2 * -6.0) - (x1 * (2.0 - (x1 * (9.0 + (x1 * -19.0))))));
} else if (x1 <= 2.2e+90) {
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 + ((x2 * -6.0) - (x1 * (2.0 + ((4.0 * (x2 * (3.0 - (2.0 * x2)))) - (x1 * ((x1 * 3.0) + (x2 * 6.0)))))));
}
return tmp;
}
def code(x1, x2): tmp = 0 if x1 <= -1e+93: tmp = x1 + ((x2 * -6.0) - (x1 * (2.0 - (x1 * (9.0 + (x1 * -19.0)))))) elif x1 <= 2.2e+90: 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 + ((x2 * -6.0) - (x1 * (2.0 + ((4.0 * (x2 * (3.0 - (2.0 * x2)))) - (x1 * ((x1 * 3.0) + (x2 * 6.0))))))) return tmp
function code(x1, x2) tmp = 0.0 if (x1 <= -1e+93) tmp = Float64(x1 + Float64(Float64(x2 * -6.0) - Float64(x1 * Float64(2.0 - Float64(x1 * Float64(9.0 + Float64(x1 * -19.0))))))); elseif (x1 <= 2.2e+90) 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(x2 * -6.0) - Float64(x1 * Float64(2.0 + Float64(Float64(4.0 * Float64(x2 * Float64(3.0 - Float64(2.0 * x2)))) - Float64(x1 * Float64(Float64(x1 * 3.0) + Float64(x2 * 6.0)))))))); end return tmp end
function tmp_2 = code(x1, x2) tmp = 0.0; if (x1 <= -1e+93) tmp = x1 + ((x2 * -6.0) - (x1 * (2.0 - (x1 * (9.0 + (x1 * -19.0)))))); elseif (x1 <= 2.2e+90) 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 + ((x2 * -6.0) - (x1 * (2.0 + ((4.0 * (x2 * (3.0 - (2.0 * x2)))) - (x1 * ((x1 * 3.0) + (x2 * 6.0))))))); end tmp_2 = tmp; end
code[x1_, x2_] := If[LessEqual[x1, -1e+93], N[(x1 + N[(N[(x2 * -6.0), $MachinePrecision] - N[(x1 * N[(2.0 - N[(x1 * N[(9.0 + N[(x1 * -19.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 2.2e+90], 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[(x2 * -6.0), $MachinePrecision] - N[(x1 * N[(2.0 + N[(N[(4.0 * N[(x2 * N[(3.0 - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(x1 * N[(N[(x1 * 3.0), $MachinePrecision] + N[(x2 * 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x1 \leq -1 \cdot 10^{+93}:\\
\;\;\;\;x1 + \left(x2 \cdot -6 - x1 \cdot \left(2 - x1 \cdot \left(9 + x1 \cdot -19\right)\right)\right)\\
\mathbf{elif}\;x1 \leq 2.2 \cdot 10^{+90}:\\
\;\;\;\;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(x2 \cdot -6 - x1 \cdot \left(2 + \left(4 \cdot \left(x2 \cdot \left(3 - 2 \cdot x2\right)\right) - x1 \cdot \left(x1 \cdot 3 + x2 \cdot 6\right)\right)\right)\right)\\
\end{array}
\end{array}
if x1 < -1.00000000000000004e93Initial program 7.0%
Taylor expanded in x1 around 0 7.0%
Taylor expanded in x1 around 0 72.3%
Taylor expanded in x2 around 0 91.6%
*-commutative91.6%
Simplified91.6%
if -1.00000000000000004e93 < x1 < 2.1999999999999999e90Initial program 99.2%
Taylor expanded in x1 around 0 75.6%
Taylor expanded in x2 around 0 83.9%
if 2.1999999999999999e90 < x1 Initial program 33.9%
Taylor expanded in x1 around 0 17.0%
Taylor expanded in x1 around 0 44.0%
*-commutative44.0%
Simplified44.0%
Taylor expanded in x1 around 0 89.0%
Final simplification86.9%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (* x2 (- 3.0 (* 2.0 x2)))))
(if (<= x1 -4.8e+94)
(+ x1 (- (* x2 -6.0) (* x1 (- 2.0 (* x1 (+ 9.0 (* x1 -19.0)))))))
(if (<= x1 -5.2e-261)
(-
x1
(+
(- (* 4.0 (* x1 t_0)) x1)
(*
3.0
(/ (- x1 (- (* x1 (* x1 3.0)) (* 2.0 x2))) (+ (* x1 x1) 1.0)))))
(if (<= x1 1.75e-256)
(+ x1 (+ (* x2 -6.0) (* x1 (- (* x1 9.0) 2.0))))
(+
x1
(-
(* x2 -6.0)
(*
x1
(+ 2.0 (- (* 4.0 t_0) (* x1 (+ (* x1 3.0) (* x2 6.0)))))))))))))
double code(double x1, double x2) {
double t_0 = x2 * (3.0 - (2.0 * x2));
double tmp;
if (x1 <= -4.8e+94) {
tmp = x1 + ((x2 * -6.0) - (x1 * (2.0 - (x1 * (9.0 + (x1 * -19.0))))));
} else if (x1 <= -5.2e-261) {
tmp = x1 - (((4.0 * (x1 * t_0)) - x1) + (3.0 * ((x1 - ((x1 * (x1 * 3.0)) - (2.0 * x2))) / ((x1 * x1) + 1.0))));
} else if (x1 <= 1.75e-256) {
tmp = x1 + ((x2 * -6.0) + (x1 * ((x1 * 9.0) - 2.0)));
} else {
tmp = x1 + ((x2 * -6.0) - (x1 * (2.0 + ((4.0 * t_0) - (x1 * ((x1 * 3.0) + (x2 * 6.0)))))));
}
return tmp;
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
real(8) :: t_0
real(8) :: tmp
t_0 = x2 * (3.0d0 - (2.0d0 * x2))
if (x1 <= (-4.8d+94)) then
tmp = x1 + ((x2 * (-6.0d0)) - (x1 * (2.0d0 - (x1 * (9.0d0 + (x1 * (-19.0d0)))))))
else if (x1 <= (-5.2d-261)) then
tmp = x1 - (((4.0d0 * (x1 * t_0)) - x1) + (3.0d0 * ((x1 - ((x1 * (x1 * 3.0d0)) - (2.0d0 * x2))) / ((x1 * x1) + 1.0d0))))
else if (x1 <= 1.75d-256) then
tmp = x1 + ((x2 * (-6.0d0)) + (x1 * ((x1 * 9.0d0) - 2.0d0)))
else
tmp = x1 + ((x2 * (-6.0d0)) - (x1 * (2.0d0 + ((4.0d0 * t_0) - (x1 * ((x1 * 3.0d0) + (x2 * 6.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 <= -4.8e+94) {
tmp = x1 + ((x2 * -6.0) - (x1 * (2.0 - (x1 * (9.0 + (x1 * -19.0))))));
} else if (x1 <= -5.2e-261) {
tmp = x1 - (((4.0 * (x1 * t_0)) - x1) + (3.0 * ((x1 - ((x1 * (x1 * 3.0)) - (2.0 * x2))) / ((x1 * x1) + 1.0))));
} else if (x1 <= 1.75e-256) {
tmp = x1 + ((x2 * -6.0) + (x1 * ((x1 * 9.0) - 2.0)));
} else {
tmp = x1 + ((x2 * -6.0) - (x1 * (2.0 + ((4.0 * t_0) - (x1 * ((x1 * 3.0) + (x2 * 6.0)))))));
}
return tmp;
}
def code(x1, x2): t_0 = x2 * (3.0 - (2.0 * x2)) tmp = 0 if x1 <= -4.8e+94: tmp = x1 + ((x2 * -6.0) - (x1 * (2.0 - (x1 * (9.0 + (x1 * -19.0)))))) elif x1 <= -5.2e-261: tmp = x1 - (((4.0 * (x1 * t_0)) - x1) + (3.0 * ((x1 - ((x1 * (x1 * 3.0)) - (2.0 * x2))) / ((x1 * x1) + 1.0)))) elif x1 <= 1.75e-256: tmp = x1 + ((x2 * -6.0) + (x1 * ((x1 * 9.0) - 2.0))) else: tmp = x1 + ((x2 * -6.0) - (x1 * (2.0 + ((4.0 * t_0) - (x1 * ((x1 * 3.0) + (x2 * 6.0))))))) return tmp
function code(x1, x2) t_0 = Float64(x2 * Float64(3.0 - Float64(2.0 * x2))) tmp = 0.0 if (x1 <= -4.8e+94) tmp = Float64(x1 + Float64(Float64(x2 * -6.0) - Float64(x1 * Float64(2.0 - Float64(x1 * Float64(9.0 + Float64(x1 * -19.0))))))); elseif (x1 <= -5.2e-261) tmp = Float64(x1 - Float64(Float64(Float64(4.0 * Float64(x1 * t_0)) - x1) + Float64(3.0 * Float64(Float64(x1 - Float64(Float64(x1 * Float64(x1 * 3.0)) - Float64(2.0 * x2))) / Float64(Float64(x1 * x1) + 1.0))))); elseif (x1 <= 1.75e-256) tmp = Float64(x1 + Float64(Float64(x2 * -6.0) + Float64(x1 * Float64(Float64(x1 * 9.0) - 2.0)))); else tmp = Float64(x1 + Float64(Float64(x2 * -6.0) - Float64(x1 * Float64(2.0 + Float64(Float64(4.0 * t_0) - Float64(x1 * Float64(Float64(x1 * 3.0) + Float64(x2 * 6.0)))))))); end return tmp end
function tmp_2 = code(x1, x2) t_0 = x2 * (3.0 - (2.0 * x2)); tmp = 0.0; if (x1 <= -4.8e+94) tmp = x1 + ((x2 * -6.0) - (x1 * (2.0 - (x1 * (9.0 + (x1 * -19.0)))))); elseif (x1 <= -5.2e-261) tmp = x1 - (((4.0 * (x1 * t_0)) - x1) + (3.0 * ((x1 - ((x1 * (x1 * 3.0)) - (2.0 * x2))) / ((x1 * x1) + 1.0)))); elseif (x1 <= 1.75e-256) tmp = x1 + ((x2 * -6.0) + (x1 * ((x1 * 9.0) - 2.0))); else tmp = x1 + ((x2 * -6.0) - (x1 * (2.0 + ((4.0 * t_0) - (x1 * ((x1 * 3.0) + (x2 * 6.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, -4.8e+94], N[(x1 + N[(N[(x2 * -6.0), $MachinePrecision] - N[(x1 * N[(2.0 - N[(x1 * N[(9.0 + N[(x1 * -19.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, -5.2e-261], N[(x1 - N[(N[(N[(4.0 * N[(x1 * t$95$0), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] + N[(3.0 * N[(N[(x1 - N[(N[(x1 * N[(x1 * 3.0), $MachinePrecision]), $MachinePrecision] - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(N[(x1 * x1), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 1.75e-256], N[(x1 + N[(N[(x2 * -6.0), $MachinePrecision] + N[(x1 * N[(N[(x1 * 9.0), $MachinePrecision] - 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x1 + N[(N[(x2 * -6.0), $MachinePrecision] - N[(x1 * N[(2.0 + N[(N[(4.0 * t$95$0), $MachinePrecision] - N[(x1 * N[(N[(x1 * 3.0), $MachinePrecision] + N[(x2 * 6.0), $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 -4.8 \cdot 10^{+94}:\\
\;\;\;\;x1 + \left(x2 \cdot -6 - x1 \cdot \left(2 - x1 \cdot \left(9 + x1 \cdot -19\right)\right)\right)\\
\mathbf{elif}\;x1 \leq -5.2 \cdot 10^{-261}:\\
\;\;\;\;x1 - \left(\left(4 \cdot \left(x1 \cdot t\_0\right) - x1\right) + 3 \cdot \frac{x1 - \left(x1 \cdot \left(x1 \cdot 3\right) - 2 \cdot x2\right)}{x1 \cdot x1 + 1}\right)\\
\mathbf{elif}\;x1 \leq 1.75 \cdot 10^{-256}:\\
\;\;\;\;x1 + \left(x2 \cdot -6 + x1 \cdot \left(x1 \cdot 9 - 2\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x1 + \left(x2 \cdot -6 - x1 \cdot \left(2 + \left(4 \cdot t\_0 - x1 \cdot \left(x1 \cdot 3 + x2 \cdot 6\right)\right)\right)\right)\\
\end{array}
\end{array}
if x1 < -4.79999999999999965e94Initial program 7.0%
Taylor expanded in x1 around 0 7.0%
Taylor expanded in x1 around 0 72.3%
Taylor expanded in x2 around 0 91.6%
*-commutative91.6%
Simplified91.6%
if -4.79999999999999965e94 < x1 < -5.2000000000000002e-261Initial program 99.1%
Taylor expanded in x1 around 0 72.8%
if -5.2000000000000002e-261 < x1 < 1.75000000000000007e-256Initial program 99.7%
Taylor expanded in x1 around 0 99.7%
Taylor expanded in x1 around 0 62.7%
Taylor expanded in x2 around 0 99.7%
*-commutative99.7%
Simplified99.7%
if 1.75000000000000007e-256 < x1 Initial program 65.7%
Taylor expanded in x1 around 0 49.1%
Taylor expanded in x1 around 0 62.4%
*-commutative62.4%
Simplified62.4%
Taylor expanded in x1 around 0 85.0%
Final simplification85.0%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (* 4.0 (* x2 (- 3.0 (* 2.0 x2))))))
(if (<= x1 -1.6e+94)
(+ x1 (- (* x2 -6.0) (* x1 (- 2.0 (* x1 (+ 9.0 (* x1 -19.0)))))))
(if (<= x1 -3.3e-261)
(- x1 (- (* x1 (+ 2.0 t_0)) (* x2 -6.0)))
(if (<= x1 4.6e-258)
(+ x1 (+ (* x2 -6.0) (* x1 (- (* x1 9.0) 2.0))))
(+
x1
(-
(* x2 -6.0)
(* x1 (+ 2.0 (- t_0 (* x1 (+ (* x1 3.0) (* x2 6.0)))))))))))))
double code(double x1, double x2) {
double t_0 = 4.0 * (x2 * (3.0 - (2.0 * x2)));
double tmp;
if (x1 <= -1.6e+94) {
tmp = x1 + ((x2 * -6.0) - (x1 * (2.0 - (x1 * (9.0 + (x1 * -19.0))))));
} else if (x1 <= -3.3e-261) {
tmp = x1 - ((x1 * (2.0 + t_0)) - (x2 * -6.0));
} else if (x1 <= 4.6e-258) {
tmp = x1 + ((x2 * -6.0) + (x1 * ((x1 * 9.0) - 2.0)));
} else {
tmp = x1 + ((x2 * -6.0) - (x1 * (2.0 + (t_0 - (x1 * ((x1 * 3.0) + (x2 * 6.0)))))));
}
return tmp;
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
real(8) :: t_0
real(8) :: tmp
t_0 = 4.0d0 * (x2 * (3.0d0 - (2.0d0 * x2)))
if (x1 <= (-1.6d+94)) then
tmp = x1 + ((x2 * (-6.0d0)) - (x1 * (2.0d0 - (x1 * (9.0d0 + (x1 * (-19.0d0)))))))
else if (x1 <= (-3.3d-261)) then
tmp = x1 - ((x1 * (2.0d0 + t_0)) - (x2 * (-6.0d0)))
else if (x1 <= 4.6d-258) then
tmp = x1 + ((x2 * (-6.0d0)) + (x1 * ((x1 * 9.0d0) - 2.0d0)))
else
tmp = x1 + ((x2 * (-6.0d0)) - (x1 * (2.0d0 + (t_0 - (x1 * ((x1 * 3.0d0) + (x2 * 6.0d0)))))))
end if
code = tmp
end function
public static double code(double x1, double x2) {
double t_0 = 4.0 * (x2 * (3.0 - (2.0 * x2)));
double tmp;
if (x1 <= -1.6e+94) {
tmp = x1 + ((x2 * -6.0) - (x1 * (2.0 - (x1 * (9.0 + (x1 * -19.0))))));
} else if (x1 <= -3.3e-261) {
tmp = x1 - ((x1 * (2.0 + t_0)) - (x2 * -6.0));
} else if (x1 <= 4.6e-258) {
tmp = x1 + ((x2 * -6.0) + (x1 * ((x1 * 9.0) - 2.0)));
} else {
tmp = x1 + ((x2 * -6.0) - (x1 * (2.0 + (t_0 - (x1 * ((x1 * 3.0) + (x2 * 6.0)))))));
}
return tmp;
}
def code(x1, x2): t_0 = 4.0 * (x2 * (3.0 - (2.0 * x2))) tmp = 0 if x1 <= -1.6e+94: tmp = x1 + ((x2 * -6.0) - (x1 * (2.0 - (x1 * (9.0 + (x1 * -19.0)))))) elif x1 <= -3.3e-261: tmp = x1 - ((x1 * (2.0 + t_0)) - (x2 * -6.0)) elif x1 <= 4.6e-258: tmp = x1 + ((x2 * -6.0) + (x1 * ((x1 * 9.0) - 2.0))) else: tmp = x1 + ((x2 * -6.0) - (x1 * (2.0 + (t_0 - (x1 * ((x1 * 3.0) + (x2 * 6.0))))))) return tmp
function code(x1, x2) t_0 = Float64(4.0 * Float64(x2 * Float64(3.0 - Float64(2.0 * x2)))) tmp = 0.0 if (x1 <= -1.6e+94) tmp = Float64(x1 + Float64(Float64(x2 * -6.0) - Float64(x1 * Float64(2.0 - Float64(x1 * Float64(9.0 + Float64(x1 * -19.0))))))); elseif (x1 <= -3.3e-261) tmp = Float64(x1 - Float64(Float64(x1 * Float64(2.0 + t_0)) - Float64(x2 * -6.0))); elseif (x1 <= 4.6e-258) tmp = Float64(x1 + Float64(Float64(x2 * -6.0) + Float64(x1 * Float64(Float64(x1 * 9.0) - 2.0)))); else tmp = Float64(x1 + Float64(Float64(x2 * -6.0) - Float64(x1 * Float64(2.0 + Float64(t_0 - Float64(x1 * Float64(Float64(x1 * 3.0) + Float64(x2 * 6.0)))))))); end return tmp end
function tmp_2 = code(x1, x2) t_0 = 4.0 * (x2 * (3.0 - (2.0 * x2))); tmp = 0.0; if (x1 <= -1.6e+94) tmp = x1 + ((x2 * -6.0) - (x1 * (2.0 - (x1 * (9.0 + (x1 * -19.0)))))); elseif (x1 <= -3.3e-261) tmp = x1 - ((x1 * (2.0 + t_0)) - (x2 * -6.0)); elseif (x1 <= 4.6e-258) tmp = x1 + ((x2 * -6.0) + (x1 * ((x1 * 9.0) - 2.0))); else tmp = x1 + ((x2 * -6.0) - (x1 * (2.0 + (t_0 - (x1 * ((x1 * 3.0) + (x2 * 6.0))))))); end tmp_2 = tmp; end
code[x1_, x2_] := Block[{t$95$0 = N[(4.0 * N[(x2 * N[(3.0 - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x1, -1.6e+94], N[(x1 + N[(N[(x2 * -6.0), $MachinePrecision] - N[(x1 * N[(2.0 - N[(x1 * N[(9.0 + N[(x1 * -19.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, -3.3e-261], N[(x1 - N[(N[(x1 * N[(2.0 + t$95$0), $MachinePrecision]), $MachinePrecision] - N[(x2 * -6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 4.6e-258], N[(x1 + N[(N[(x2 * -6.0), $MachinePrecision] + N[(x1 * N[(N[(x1 * 9.0), $MachinePrecision] - 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x1 + N[(N[(x2 * -6.0), $MachinePrecision] - N[(x1 * N[(2.0 + N[(t$95$0 - N[(x1 * N[(N[(x1 * 3.0), $MachinePrecision] + N[(x2 * 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := 4 \cdot \left(x2 \cdot \left(3 - 2 \cdot x2\right)\right)\\
\mathbf{if}\;x1 \leq -1.6 \cdot 10^{+94}:\\
\;\;\;\;x1 + \left(x2 \cdot -6 - x1 \cdot \left(2 - x1 \cdot \left(9 + x1 \cdot -19\right)\right)\right)\\
\mathbf{elif}\;x1 \leq -3.3 \cdot 10^{-261}:\\
\;\;\;\;x1 - \left(x1 \cdot \left(2 + t\_0\right) - x2 \cdot -6\right)\\
\mathbf{elif}\;x1 \leq 4.6 \cdot 10^{-258}:\\
\;\;\;\;x1 + \left(x2 \cdot -6 + x1 \cdot \left(x1 \cdot 9 - 2\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x1 + \left(x2 \cdot -6 - x1 \cdot \left(2 + \left(t\_0 - x1 \cdot \left(x1 \cdot 3 + x2 \cdot 6\right)\right)\right)\right)\\
\end{array}
\end{array}
if x1 < -1.60000000000000007e94Initial program 7.0%
Taylor expanded in x1 around 0 7.0%
Taylor expanded in x1 around 0 72.3%
Taylor expanded in x2 around 0 91.6%
*-commutative91.6%
Simplified91.6%
if -1.60000000000000007e94 < x1 < -3.2999999999999998e-261Initial program 99.1%
Taylor expanded in x1 around 0 94.4%
Taylor expanded in x1 around 0 72.1%
if -3.2999999999999998e-261 < x1 < 4.59999999999999986e-258Initial program 99.7%
Taylor expanded in x1 around 0 99.7%
Taylor expanded in x1 around 0 62.7%
Taylor expanded in x2 around 0 99.7%
*-commutative99.7%
Simplified99.7%
if 4.59999999999999986e-258 < x1 Initial program 65.7%
Taylor expanded in x1 around 0 49.1%
Taylor expanded in x1 around 0 62.4%
*-commutative62.4%
Simplified62.4%
Taylor expanded in x1 around 0 85.0%
Final simplification84.8%
(FPCore (x1 x2)
:precision binary64
(if (<= x1 -4.5e+94)
(+ x1 (- (* x2 -6.0) (* x1 (- 2.0 (* x1 (+ 9.0 (* x1 -19.0)))))))
(if (or (<= x1 -5.2e-261) (and (not (<= x1 1.75e-256)) (<= x1 4.5e+153)))
(- x1 (- (* x1 (+ 2.0 (* 4.0 (* x2 (- 3.0 (* 2.0 x2)))))) (* x2 -6.0)))
(+ x1 (+ (* x2 -6.0) (* x1 (- (* x1 9.0) 2.0)))))))
double code(double x1, double x2) {
double tmp;
if (x1 <= -4.5e+94) {
tmp = x1 + ((x2 * -6.0) - (x1 * (2.0 - (x1 * (9.0 + (x1 * -19.0))))));
} else if ((x1 <= -5.2e-261) || (!(x1 <= 1.75e-256) && (x1 <= 4.5e+153))) {
tmp = x1 - ((x1 * (2.0 + (4.0 * (x2 * (3.0 - (2.0 * x2)))))) - (x2 * -6.0));
} else {
tmp = x1 + ((x2 * -6.0) + (x1 * ((x1 * 9.0) - 2.0)));
}
return tmp;
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
real(8) :: tmp
if (x1 <= (-4.5d+94)) then
tmp = x1 + ((x2 * (-6.0d0)) - (x1 * (2.0d0 - (x1 * (9.0d0 + (x1 * (-19.0d0)))))))
else if ((x1 <= (-5.2d-261)) .or. (.not. (x1 <= 1.75d-256)) .and. (x1 <= 4.5d+153)) then
tmp = x1 - ((x1 * (2.0d0 + (4.0d0 * (x2 * (3.0d0 - (2.0d0 * x2)))))) - (x2 * (-6.0d0)))
else
tmp = x1 + ((x2 * (-6.0d0)) + (x1 * ((x1 * 9.0d0) - 2.0d0)))
end if
code = tmp
end function
public static double code(double x1, double x2) {
double tmp;
if (x1 <= -4.5e+94) {
tmp = x1 + ((x2 * -6.0) - (x1 * (2.0 - (x1 * (9.0 + (x1 * -19.0))))));
} else if ((x1 <= -5.2e-261) || (!(x1 <= 1.75e-256) && (x1 <= 4.5e+153))) {
tmp = x1 - ((x1 * (2.0 + (4.0 * (x2 * (3.0 - (2.0 * x2)))))) - (x2 * -6.0));
} else {
tmp = x1 + ((x2 * -6.0) + (x1 * ((x1 * 9.0) - 2.0)));
}
return tmp;
}
def code(x1, x2): tmp = 0 if x1 <= -4.5e+94: tmp = x1 + ((x2 * -6.0) - (x1 * (2.0 - (x1 * (9.0 + (x1 * -19.0)))))) elif (x1 <= -5.2e-261) or (not (x1 <= 1.75e-256) and (x1 <= 4.5e+153)): tmp = x1 - ((x1 * (2.0 + (4.0 * (x2 * (3.0 - (2.0 * x2)))))) - (x2 * -6.0)) else: tmp = x1 + ((x2 * -6.0) + (x1 * ((x1 * 9.0) - 2.0))) return tmp
function code(x1, x2) tmp = 0.0 if (x1 <= -4.5e+94) tmp = Float64(x1 + Float64(Float64(x2 * -6.0) - Float64(x1 * Float64(2.0 - Float64(x1 * Float64(9.0 + Float64(x1 * -19.0))))))); elseif ((x1 <= -5.2e-261) || (!(x1 <= 1.75e-256) && (x1 <= 4.5e+153))) tmp = Float64(x1 - Float64(Float64(x1 * Float64(2.0 + Float64(4.0 * Float64(x2 * Float64(3.0 - Float64(2.0 * x2)))))) - Float64(x2 * -6.0))); else tmp = Float64(x1 + Float64(Float64(x2 * -6.0) + Float64(x1 * Float64(Float64(x1 * 9.0) - 2.0)))); end return tmp end
function tmp_2 = code(x1, x2) tmp = 0.0; if (x1 <= -4.5e+94) tmp = x1 + ((x2 * -6.0) - (x1 * (2.0 - (x1 * (9.0 + (x1 * -19.0)))))); elseif ((x1 <= -5.2e-261) || (~((x1 <= 1.75e-256)) && (x1 <= 4.5e+153))) tmp = x1 - ((x1 * (2.0 + (4.0 * (x2 * (3.0 - (2.0 * x2)))))) - (x2 * -6.0)); else tmp = x1 + ((x2 * -6.0) + (x1 * ((x1 * 9.0) - 2.0))); end tmp_2 = tmp; end
code[x1_, x2_] := If[LessEqual[x1, -4.5e+94], N[(x1 + N[(N[(x2 * -6.0), $MachinePrecision] - N[(x1 * N[(2.0 - N[(x1 * N[(9.0 + N[(x1 * -19.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[x1, -5.2e-261], And[N[Not[LessEqual[x1, 1.75e-256]], $MachinePrecision], LessEqual[x1, 4.5e+153]]], N[(x1 - N[(N[(x1 * N[(2.0 + N[(4.0 * N[(x2 * N[(3.0 - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(x2 * -6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x1 + N[(N[(x2 * -6.0), $MachinePrecision] + N[(x1 * N[(N[(x1 * 9.0), $MachinePrecision] - 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x1 \leq -4.5 \cdot 10^{+94}:\\
\;\;\;\;x1 + \left(x2 \cdot -6 - x1 \cdot \left(2 - x1 \cdot \left(9 + x1 \cdot -19\right)\right)\right)\\
\mathbf{elif}\;x1 \leq -5.2 \cdot 10^{-261} \lor \neg \left(x1 \leq 1.75 \cdot 10^{-256}\right) \land x1 \leq 4.5 \cdot 10^{+153}:\\
\;\;\;\;x1 - \left(x1 \cdot \left(2 + 4 \cdot \left(x2 \cdot \left(3 - 2 \cdot x2\right)\right)\right) - x2 \cdot -6\right)\\
\mathbf{else}:\\
\;\;\;\;x1 + \left(x2 \cdot -6 + x1 \cdot \left(x1 \cdot 9 - 2\right)\right)\\
\end{array}
\end{array}
if x1 < -4.49999999999999972e94Initial program 7.0%
Taylor expanded in x1 around 0 7.0%
Taylor expanded in x1 around 0 72.3%
Taylor expanded in x2 around 0 91.6%
*-commutative91.6%
Simplified91.6%
if -4.49999999999999972e94 < x1 < -5.2000000000000002e-261 or 1.75000000000000007e-256 < x1 < 4.5000000000000001e153Initial program 98.5%
Taylor expanded in x1 around 0 91.6%
Taylor expanded in x1 around 0 72.2%
if -5.2000000000000002e-261 < x1 < 1.75000000000000007e-256 or 4.5000000000000001e153 < x1 Initial program 34.3%
Taylor expanded in x1 around 0 34.3%
Taylor expanded in x1 around 0 72.4%
Taylor expanded in x2 around 0 99.9%
*-commutative99.9%
Simplified99.9%
Final simplification83.1%
(FPCore (x1 x2)
:precision binary64
(if (<= x2 -1.85e+249)
(* x1 (+ 2.0 (* 4.0 (* x2 (- (* 2.0 x2) 3.0)))))
(if (or (<= x2 -7.4e+174) (and (not (<= x2 -5.5e+111)) (<= x2 4e+190)))
(+ x1 (+ (* x2 -6.0) (* x1 (- (* x1 9.0) 2.0))))
(+ 9.0 (+ (* x1 2.0) (* x2 (+ (* x1 -12.0) (* (* x1 x2) 8.0))))))))
double code(double x1, double x2) {
double tmp;
if (x2 <= -1.85e+249) {
tmp = x1 * (2.0 + (4.0 * (x2 * ((2.0 * x2) - 3.0))));
} else if ((x2 <= -7.4e+174) || (!(x2 <= -5.5e+111) && (x2 <= 4e+190))) {
tmp = x1 + ((x2 * -6.0) + (x1 * ((x1 * 9.0) - 2.0)));
} else {
tmp = 9.0 + ((x1 * 2.0) + (x2 * ((x1 * -12.0) + ((x1 * x2) * 8.0))));
}
return tmp;
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
real(8) :: tmp
if (x2 <= (-1.85d+249)) then
tmp = x1 * (2.0d0 + (4.0d0 * (x2 * ((2.0d0 * x2) - 3.0d0))))
else if ((x2 <= (-7.4d+174)) .or. (.not. (x2 <= (-5.5d+111))) .and. (x2 <= 4d+190)) then
tmp = x1 + ((x2 * (-6.0d0)) + (x1 * ((x1 * 9.0d0) - 2.0d0)))
else
tmp = 9.0d0 + ((x1 * 2.0d0) + (x2 * ((x1 * (-12.0d0)) + ((x1 * x2) * 8.0d0))))
end if
code = tmp
end function
public static double code(double x1, double x2) {
double tmp;
if (x2 <= -1.85e+249) {
tmp = x1 * (2.0 + (4.0 * (x2 * ((2.0 * x2) - 3.0))));
} else if ((x2 <= -7.4e+174) || (!(x2 <= -5.5e+111) && (x2 <= 4e+190))) {
tmp = x1 + ((x2 * -6.0) + (x1 * ((x1 * 9.0) - 2.0)));
} else {
tmp = 9.0 + ((x1 * 2.0) + (x2 * ((x1 * -12.0) + ((x1 * x2) * 8.0))));
}
return tmp;
}
def code(x1, x2): tmp = 0 if x2 <= -1.85e+249: tmp = x1 * (2.0 + (4.0 * (x2 * ((2.0 * x2) - 3.0)))) elif (x2 <= -7.4e+174) or (not (x2 <= -5.5e+111) and (x2 <= 4e+190)): tmp = x1 + ((x2 * -6.0) + (x1 * ((x1 * 9.0) - 2.0))) else: tmp = 9.0 + ((x1 * 2.0) + (x2 * ((x1 * -12.0) + ((x1 * x2) * 8.0)))) return tmp
function code(x1, x2) tmp = 0.0 if (x2 <= -1.85e+249) tmp = Float64(x1 * Float64(2.0 + Float64(4.0 * Float64(x2 * Float64(Float64(2.0 * x2) - 3.0))))); elseif ((x2 <= -7.4e+174) || (!(x2 <= -5.5e+111) && (x2 <= 4e+190))) tmp = Float64(x1 + Float64(Float64(x2 * -6.0) + Float64(x1 * Float64(Float64(x1 * 9.0) - 2.0)))); else tmp = Float64(9.0 + Float64(Float64(x1 * 2.0) + Float64(x2 * Float64(Float64(x1 * -12.0) + Float64(Float64(x1 * x2) * 8.0))))); end return tmp end
function tmp_2 = code(x1, x2) tmp = 0.0; if (x2 <= -1.85e+249) tmp = x1 * (2.0 + (4.0 * (x2 * ((2.0 * x2) - 3.0)))); elseif ((x2 <= -7.4e+174) || (~((x2 <= -5.5e+111)) && (x2 <= 4e+190))) tmp = x1 + ((x2 * -6.0) + (x1 * ((x1 * 9.0) - 2.0))); else tmp = 9.0 + ((x1 * 2.0) + (x2 * ((x1 * -12.0) + ((x1 * x2) * 8.0)))); end tmp_2 = tmp; end
code[x1_, x2_] := If[LessEqual[x2, -1.85e+249], N[(x1 * N[(2.0 + N[(4.0 * N[(x2 * N[(N[(2.0 * x2), $MachinePrecision] - 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[x2, -7.4e+174], And[N[Not[LessEqual[x2, -5.5e+111]], $MachinePrecision], LessEqual[x2, 4e+190]]], N[(x1 + N[(N[(x2 * -6.0), $MachinePrecision] + N[(x1 * N[(N[(x1 * 9.0), $MachinePrecision] - 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(9.0 + N[(N[(x1 * 2.0), $MachinePrecision] + N[(x2 * N[(N[(x1 * -12.0), $MachinePrecision] + N[(N[(x1 * x2), $MachinePrecision] * 8.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x2 \leq -1.85 \cdot 10^{+249}:\\
\;\;\;\;x1 \cdot \left(2 + 4 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right)\right)\\
\mathbf{elif}\;x2 \leq -7.4 \cdot 10^{+174} \lor \neg \left(x2 \leq -5.5 \cdot 10^{+111}\right) \land x2 \leq 4 \cdot 10^{+190}:\\
\;\;\;\;x1 + \left(x2 \cdot -6 + x1 \cdot \left(x1 \cdot 9 - 2\right)\right)\\
\mathbf{else}:\\
\;\;\;\;9 + \left(x1 \cdot 2 + x2 \cdot \left(x1 \cdot -12 + \left(x1 \cdot x2\right) \cdot 8\right)\right)\\
\end{array}
\end{array}
if x2 < -1.8499999999999999e249Initial program 58.3%
Taylor expanded in x1 around 0 58.3%
Taylor expanded in x1 around inf 75.0%
Taylor expanded in x1 around inf 75.0%
if -1.8499999999999999e249 < x2 < -7.4000000000000004e174 or -5.4999999999999998e111 < x2 < 4.0000000000000003e190Initial program 61.3%
Taylor expanded in x1 around 0 59.6%
Taylor expanded in x1 around 0 67.0%
Taylor expanded in x2 around 0 71.9%
*-commutative71.9%
Simplified71.9%
if -7.4000000000000004e174 < x2 < -5.4999999999999998e111 or 4.0000000000000003e190 < x2 Initial program 72.8%
Taylor expanded in x1 around 0 57.7%
Taylor expanded in x1 around inf 73.9%
Taylor expanded in x2 around 0 81.1%
Final simplification73.4%
(FPCore (x1 x2)
:precision binary64
(if (<= x1 -6.4e+72)
(+ 9.0 (+ (* x1 2.0) (* (* x1 x2) -12.0)))
(if (or (<= x1 -4.8e-104) (not (<= x1 2.15e-57)))
(* x1 (+ 2.0 (* 4.0 (* x2 (- (* 2.0 x2) 3.0)))))
(+ x1 (* x2 -6.0)))))
double code(double x1, double x2) {
double tmp;
if (x1 <= -6.4e+72) {
tmp = 9.0 + ((x1 * 2.0) + ((x1 * x2) * -12.0));
} else if ((x1 <= -4.8e-104) || !(x1 <= 2.15e-57)) {
tmp = x1 * (2.0 + (4.0 * (x2 * ((2.0 * x2) - 3.0))));
} else {
tmp = x1 + (x2 * -6.0);
}
return tmp;
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
real(8) :: tmp
if (x1 <= (-6.4d+72)) then
tmp = 9.0d0 + ((x1 * 2.0d0) + ((x1 * x2) * (-12.0d0)))
else if ((x1 <= (-4.8d-104)) .or. (.not. (x1 <= 2.15d-57))) then
tmp = x1 * (2.0d0 + (4.0d0 * (x2 * ((2.0d0 * x2) - 3.0d0))))
else
tmp = x1 + (x2 * (-6.0d0))
end if
code = tmp
end function
public static double code(double x1, double x2) {
double tmp;
if (x1 <= -6.4e+72) {
tmp = 9.0 + ((x1 * 2.0) + ((x1 * x2) * -12.0));
} else if ((x1 <= -4.8e-104) || !(x1 <= 2.15e-57)) {
tmp = x1 * (2.0 + (4.0 * (x2 * ((2.0 * x2) - 3.0))));
} else {
tmp = x1 + (x2 * -6.0);
}
return tmp;
}
def code(x1, x2): tmp = 0 if x1 <= -6.4e+72: tmp = 9.0 + ((x1 * 2.0) + ((x1 * x2) * -12.0)) elif (x1 <= -4.8e-104) or not (x1 <= 2.15e-57): tmp = x1 * (2.0 + (4.0 * (x2 * ((2.0 * x2) - 3.0)))) else: tmp = x1 + (x2 * -6.0) return tmp
function code(x1, x2) tmp = 0.0 if (x1 <= -6.4e+72) tmp = Float64(9.0 + Float64(Float64(x1 * 2.0) + Float64(Float64(x1 * x2) * -12.0))); elseif ((x1 <= -4.8e-104) || !(x1 <= 2.15e-57)) tmp = Float64(x1 * Float64(2.0 + Float64(4.0 * Float64(x2 * Float64(Float64(2.0 * x2) - 3.0))))); else tmp = Float64(x1 + Float64(x2 * -6.0)); end return tmp end
function tmp_2 = code(x1, x2) tmp = 0.0; if (x1 <= -6.4e+72) tmp = 9.0 + ((x1 * 2.0) + ((x1 * x2) * -12.0)); elseif ((x1 <= -4.8e-104) || ~((x1 <= 2.15e-57))) tmp = x1 * (2.0 + (4.0 * (x2 * ((2.0 * x2) - 3.0)))); else tmp = x1 + (x2 * -6.0); end tmp_2 = tmp; end
code[x1_, x2_] := If[LessEqual[x1, -6.4e+72], N[(9.0 + N[(N[(x1 * 2.0), $MachinePrecision] + N[(N[(x1 * x2), $MachinePrecision] * -12.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[x1, -4.8e-104], N[Not[LessEqual[x1, 2.15e-57]], $MachinePrecision]], N[(x1 * N[(2.0 + N[(4.0 * N[(x2 * N[(N[(2.0 * x2), $MachinePrecision] - 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x1 + N[(x2 * -6.0), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x1 \leq -6.4 \cdot 10^{+72}:\\
\;\;\;\;9 + \left(x1 \cdot 2 + \left(x1 \cdot x2\right) \cdot -12\right)\\
\mathbf{elif}\;x1 \leq -4.8 \cdot 10^{-104} \lor \neg \left(x1 \leq 2.15 \cdot 10^{-57}\right):\\
\;\;\;\;x1 \cdot \left(2 + 4 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x1 + x2 \cdot -6\\
\end{array}
\end{array}
if x1 < -6.4000000000000003e72Initial program 10.2%
Taylor expanded in x1 around 0 5.2%
Taylor expanded in x1 around inf 5.2%
Taylor expanded in x2 around 0 19.4%
if -6.4000000000000003e72 < x1 < -4.8000000000000001e-104 or 2.15000000000000011e-57 < x1 Initial program 65.0%
Taylor expanded in x1 around 0 38.7%
Taylor expanded in x1 around inf 36.9%
Taylor expanded in x1 around inf 36.3%
if -4.8000000000000001e-104 < x1 < 2.15000000000000011e-57Initial program 99.4%
Taylor expanded in x1 around 0 99.4%
Taylor expanded in x1 around 0 64.4%
*-commutative64.4%
Simplified64.4%
Final simplification40.9%
(FPCore (x1 x2) :precision binary64 (if (or (<= x2 -4.8e+248) (not (<= x2 4e+191))) (* x1 (+ 2.0 (* 4.0 (* x2 (- (* 2.0 x2) 3.0))))) (+ x1 (+ (* x2 -6.0) (* x1 (- (* x1 9.0) 2.0))))))
double code(double x1, double x2) {
double tmp;
if ((x2 <= -4.8e+248) || !(x2 <= 4e+191)) {
tmp = x1 * (2.0 + (4.0 * (x2 * ((2.0 * x2) - 3.0))));
} else {
tmp = x1 + ((x2 * -6.0) + (x1 * ((x1 * 9.0) - 2.0)));
}
return tmp;
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
real(8) :: tmp
if ((x2 <= (-4.8d+248)) .or. (.not. (x2 <= 4d+191))) then
tmp = x1 * (2.0d0 + (4.0d0 * (x2 * ((2.0d0 * x2) - 3.0d0))))
else
tmp = x1 + ((x2 * (-6.0d0)) + (x1 * ((x1 * 9.0d0) - 2.0d0)))
end if
code = tmp
end function
public static double code(double x1, double x2) {
double tmp;
if ((x2 <= -4.8e+248) || !(x2 <= 4e+191)) {
tmp = x1 * (2.0 + (4.0 * (x2 * ((2.0 * x2) - 3.0))));
} else {
tmp = x1 + ((x2 * -6.0) + (x1 * ((x1 * 9.0) - 2.0)));
}
return tmp;
}
def code(x1, x2): tmp = 0 if (x2 <= -4.8e+248) or not (x2 <= 4e+191): tmp = x1 * (2.0 + (4.0 * (x2 * ((2.0 * x2) - 3.0)))) else: tmp = x1 + ((x2 * -6.0) + (x1 * ((x1 * 9.0) - 2.0))) return tmp
function code(x1, x2) tmp = 0.0 if ((x2 <= -4.8e+248) || !(x2 <= 4e+191)) tmp = Float64(x1 * Float64(2.0 + Float64(4.0 * Float64(x2 * Float64(Float64(2.0 * x2) - 3.0))))); else tmp = Float64(x1 + Float64(Float64(x2 * -6.0) + Float64(x1 * Float64(Float64(x1 * 9.0) - 2.0)))); end return tmp end
function tmp_2 = code(x1, x2) tmp = 0.0; if ((x2 <= -4.8e+248) || ~((x2 <= 4e+191))) tmp = x1 * (2.0 + (4.0 * (x2 * ((2.0 * x2) - 3.0)))); else tmp = x1 + ((x2 * -6.0) + (x1 * ((x1 * 9.0) - 2.0))); end tmp_2 = tmp; end
code[x1_, x2_] := If[Or[LessEqual[x2, -4.8e+248], N[Not[LessEqual[x2, 4e+191]], $MachinePrecision]], N[(x1 * N[(2.0 + N[(4.0 * N[(x2 * N[(N[(2.0 * x2), $MachinePrecision] - 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x1 + N[(N[(x2 * -6.0), $MachinePrecision] + N[(x1 * N[(N[(x1 * 9.0), $MachinePrecision] - 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x2 \leq -4.8 \cdot 10^{+248} \lor \neg \left(x2 \leq 4 \cdot 10^{+191}\right):\\
\;\;\;\;x1 \cdot \left(2 + 4 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x1 + \left(x2 \cdot -6 + x1 \cdot \left(x1 \cdot 9 - 2\right)\right)\\
\end{array}
\end{array}
if x2 < -4.8e248 or 4.00000000000000029e191 < x2 Initial program 69.4%
Taylor expanded in x1 around 0 56.3%
Taylor expanded in x1 around inf 70.2%
Taylor expanded in x1 around inf 70.2%
if -4.8e248 < x2 < 4.00000000000000029e191Initial program 61.8%
Taylor expanded in x1 around 0 58.3%
Taylor expanded in x1 around 0 66.7%
Taylor expanded in x2 around 0 69.7%
*-commutative69.7%
Simplified69.7%
Final simplification69.8%
(FPCore (x1 x2)
:precision binary64
(if (<= x1 8.2e-45)
(+ x1 (- (* x2 -6.0) (* x1 (- 2.0 (* x1 (+ 9.0 (* x1 -19.0)))))))
(if (<= x1 4.5e+153)
(* x1 (+ 2.0 (* 4.0 (* x2 (- (* 2.0 x2) 3.0)))))
(+ x1 (+ (* x2 -6.0) (* x1 (- (* x1 9.0) 2.0)))))))
double code(double x1, double x2) {
double tmp;
if (x1 <= 8.2e-45) {
tmp = x1 + ((x2 * -6.0) - (x1 * (2.0 - (x1 * (9.0 + (x1 * -19.0))))));
} else if (x1 <= 4.5e+153) {
tmp = x1 * (2.0 + (4.0 * (x2 * ((2.0 * x2) - 3.0))));
} else {
tmp = x1 + ((x2 * -6.0) + (x1 * ((x1 * 9.0) - 2.0)));
}
return tmp;
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
real(8) :: tmp
if (x1 <= 8.2d-45) then
tmp = x1 + ((x2 * (-6.0d0)) - (x1 * (2.0d0 - (x1 * (9.0d0 + (x1 * (-19.0d0)))))))
else if (x1 <= 4.5d+153) then
tmp = x1 * (2.0d0 + (4.0d0 * (x2 * ((2.0d0 * x2) - 3.0d0))))
else
tmp = x1 + ((x2 * (-6.0d0)) + (x1 * ((x1 * 9.0d0) - 2.0d0)))
end if
code = tmp
end function
public static double code(double x1, double x2) {
double tmp;
if (x1 <= 8.2e-45) {
tmp = x1 + ((x2 * -6.0) - (x1 * (2.0 - (x1 * (9.0 + (x1 * -19.0))))));
} else if (x1 <= 4.5e+153) {
tmp = x1 * (2.0 + (4.0 * (x2 * ((2.0 * x2) - 3.0))));
} else {
tmp = x1 + ((x2 * -6.0) + (x1 * ((x1 * 9.0) - 2.0)));
}
return tmp;
}
def code(x1, x2): tmp = 0 if x1 <= 8.2e-45: tmp = x1 + ((x2 * -6.0) - (x1 * (2.0 - (x1 * (9.0 + (x1 * -19.0)))))) elif x1 <= 4.5e+153: tmp = x1 * (2.0 + (4.0 * (x2 * ((2.0 * x2) - 3.0)))) else: tmp = x1 + ((x2 * -6.0) + (x1 * ((x1 * 9.0) - 2.0))) return tmp
function code(x1, x2) tmp = 0.0 if (x1 <= 8.2e-45) tmp = Float64(x1 + Float64(Float64(x2 * -6.0) - Float64(x1 * Float64(2.0 - Float64(x1 * Float64(9.0 + Float64(x1 * -19.0))))))); elseif (x1 <= 4.5e+153) tmp = Float64(x1 * Float64(2.0 + Float64(4.0 * Float64(x2 * Float64(Float64(2.0 * x2) - 3.0))))); else tmp = Float64(x1 + Float64(Float64(x2 * -6.0) + Float64(x1 * Float64(Float64(x1 * 9.0) - 2.0)))); end return tmp end
function tmp_2 = code(x1, x2) tmp = 0.0; if (x1 <= 8.2e-45) tmp = x1 + ((x2 * -6.0) - (x1 * (2.0 - (x1 * (9.0 + (x1 * -19.0)))))); elseif (x1 <= 4.5e+153) tmp = x1 * (2.0 + (4.0 * (x2 * ((2.0 * x2) - 3.0)))); else tmp = x1 + ((x2 * -6.0) + (x1 * ((x1 * 9.0) - 2.0))); end tmp_2 = tmp; end
code[x1_, x2_] := If[LessEqual[x1, 8.2e-45], N[(x1 + N[(N[(x2 * -6.0), $MachinePrecision] - N[(x1 * N[(2.0 - N[(x1 * N[(9.0 + N[(x1 * -19.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 4.5e+153], N[(x1 * N[(2.0 + N[(4.0 * N[(x2 * N[(N[(2.0 * x2), $MachinePrecision] - 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x1 + N[(N[(x2 * -6.0), $MachinePrecision] + N[(x1 * N[(N[(x1 * 9.0), $MachinePrecision] - 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x1 \leq 8.2 \cdot 10^{-45}:\\
\;\;\;\;x1 + \left(x2 \cdot -6 - x1 \cdot \left(2 - x1 \cdot \left(9 + x1 \cdot -19\right)\right)\right)\\
\mathbf{elif}\;x1 \leq 4.5 \cdot 10^{+153}:\\
\;\;\;\;x1 \cdot \left(2 + 4 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x1 + \left(x2 \cdot -6 + x1 \cdot \left(x1 \cdot 9 - 2\right)\right)\\
\end{array}
\end{array}
if x1 < 8.1999999999999998e-45Initial program 69.0%
Taylor expanded in x1 around 0 67.5%
Taylor expanded in x1 around 0 70.0%
Taylor expanded in x2 around 0 77.7%
*-commutative77.7%
Simplified77.7%
if 8.1999999999999998e-45 < x1 < 4.5000000000000001e153Initial program 97.1%
Taylor expanded in x1 around 0 51.6%
Taylor expanded in x1 around inf 42.9%
Taylor expanded in x1 around inf 42.9%
if 4.5000000000000001e153 < x1 Initial program 0.0%
Taylor expanded in x1 around 0 0.0%
Taylor expanded in x1 around 0 77.5%
Taylor expanded in x2 around 0 100.0%
*-commutative100.0%
Simplified100.0%
Final simplification75.5%
(FPCore (x1 x2) :precision binary64 (if (or (<= x1 -1.55e-12) (not (<= x1 1.1e+43))) (+ 9.0 (+ (* x1 2.0) (* (* x1 x2) -12.0))) (+ x1 (* x2 -6.0))))
double code(double x1, double x2) {
double tmp;
if ((x1 <= -1.55e-12) || !(x1 <= 1.1e+43)) {
tmp = 9.0 + ((x1 * 2.0) + ((x1 * x2) * -12.0));
} else {
tmp = x1 + (x2 * -6.0);
}
return tmp;
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
real(8) :: tmp
if ((x1 <= (-1.55d-12)) .or. (.not. (x1 <= 1.1d+43))) then
tmp = 9.0d0 + ((x1 * 2.0d0) + ((x1 * x2) * (-12.0d0)))
else
tmp = x1 + (x2 * (-6.0d0))
end if
code = tmp
end function
public static double code(double x1, double x2) {
double tmp;
if ((x1 <= -1.55e-12) || !(x1 <= 1.1e+43)) {
tmp = 9.0 + ((x1 * 2.0) + ((x1 * x2) * -12.0));
} else {
tmp = x1 + (x2 * -6.0);
}
return tmp;
}
def code(x1, x2): tmp = 0 if (x1 <= -1.55e-12) or not (x1 <= 1.1e+43): tmp = 9.0 + ((x1 * 2.0) + ((x1 * x2) * -12.0)) else: tmp = x1 + (x2 * -6.0) return tmp
function code(x1, x2) tmp = 0.0 if ((x1 <= -1.55e-12) || !(x1 <= 1.1e+43)) tmp = Float64(9.0 + Float64(Float64(x1 * 2.0) + Float64(Float64(x1 * x2) * -12.0))); else tmp = Float64(x1 + Float64(x2 * -6.0)); end return tmp end
function tmp_2 = code(x1, x2) tmp = 0.0; if ((x1 <= -1.55e-12) || ~((x1 <= 1.1e+43))) tmp = 9.0 + ((x1 * 2.0) + ((x1 * x2) * -12.0)); else tmp = x1 + (x2 * -6.0); end tmp_2 = tmp; end
code[x1_, x2_] := If[Or[LessEqual[x1, -1.55e-12], N[Not[LessEqual[x1, 1.1e+43]], $MachinePrecision]], N[(9.0 + N[(N[(x1 * 2.0), $MachinePrecision] + N[(N[(x1 * x2), $MachinePrecision] * -12.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x1 + N[(x2 * -6.0), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x1 \leq -1.55 \cdot 10^{-12} \lor \neg \left(x1 \leq 1.1 \cdot 10^{+43}\right):\\
\;\;\;\;9 + \left(x1 \cdot 2 + \left(x1 \cdot x2\right) \cdot -12\right)\\
\mathbf{else}:\\
\;\;\;\;x1 + x2 \cdot -6\\
\end{array}
\end{array}
if x1 < -1.5500000000000001e-12 or 1.1e43 < x1 Initial program 34.5%
Taylor expanded in x1 around 0 13.5%
Taylor expanded in x1 around inf 23.9%
Taylor expanded in x2 around 0 17.0%
if -1.5500000000000001e-12 < x1 < 1.1e43Initial program 99.2%
Taylor expanded in x1 around 0 98.4%
Taylor expanded in x1 around 0 46.8%
*-commutative46.8%
Simplified46.8%
Final simplification30.0%
(FPCore (x1 x2) :precision binary64 (+ (* x1 2.0) 9.0))
double code(double x1, double x2) {
return (x1 * 2.0) + 9.0;
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
code = (x1 * 2.0d0) + 9.0d0
end function
public static double code(double x1, double x2) {
return (x1 * 2.0) + 9.0;
}
def code(x1, x2): return (x1 * 2.0) + 9.0
function code(x1, x2) return Float64(Float64(x1 * 2.0) + 9.0) end
function tmp = code(x1, x2) tmp = (x1 * 2.0) + 9.0; end
code[x1_, x2_] := N[(N[(x1 * 2.0), $MachinePrecision] + 9.0), $MachinePrecision]
\begin{array}{l}
\\
x1 \cdot 2 + 9
\end{array}
Initial program 62.8%
Taylor expanded in x1 around 0 45.4%
Taylor expanded in x1 around inf 23.0%
Taylor expanded in x2 around 0 3.3%
*-commutative3.3%
Simplified3.3%
Final simplification3.3%
(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 62.8%
Taylor expanded in x1 around 0 59.1%
Taylor expanded in x1 around 0 22.2%
*-commutative22.2%
Simplified22.2%
Final simplification22.2%
(FPCore (x1 x2) :precision binary64 9.0)
double code(double x1, double x2) {
return 9.0;
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
code = 9.0d0
end function
public static double code(double x1, double x2) {
return 9.0;
}
def code(x1, x2): return 9.0
function code(x1, x2) return 9.0 end
function tmp = code(x1, x2) tmp = 9.0; end
code[x1_, x2_] := 9.0
\begin{array}{l}
\\
9
\end{array}
Initial program 62.8%
Taylor expanded in x1 around 0 45.4%
Taylor expanded in x1 around inf 23.0%
Taylor expanded in x1 around 0 3.3%
Final simplification3.3%
herbie shell --seed 2024078
(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))))))