
(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 (- -1.0 (* x1 x1)))
(t_1 (* 3.0 (* x1 x1)))
(t_2 (fma x1 (* x1 3.0) (* 2.0 x2)))
(t_3 (/ (- t_2 x1) (fma x1 x1 1.0)))
(t_4 (/ (- x1 t_2) (fma x1 x1 1.0)))
(t_5 (* x1 (* x1 3.0)))
(t_6 (- (+ t_5 (* 2.0 x2)) x1))
(t_7 (/ t_6 t_0))
(t_8 (+ (* x1 x1) 1.0))
(t_9 (/ t_6 t_8)))
(if (<=
(-
x1
(+
(* 3.0 (/ (- (- t_5 (* 2.0 x2)) x1) t_0))
(-
(-
(+
(* t_5 t_7)
(*
t_8
(+
(* (* x1 x1) (+ 6.0 (* 4.0 t_7)))
(* (* t_9 (* x1 2.0)) (- 3.0 t_9)))))
(* x1 (* x1 x1)))
x1)))
INFINITY)
(+
x1
(fma
3.0
(/ (- t_1 (fma 2.0 x2 x1)) (fma x1 x1 1.0))
(+
x1
(fma
(fma x1 x1 1.0)
(fma x1 (* x1 (fma t_3 4.0 -6.0)) (* (* x1 (* 2.0 t_4)) (- t_4 -3.0)))
(fma t_1 t_3 (pow x1 3.0))))))
(+ x1 (+ (+ x1 (* 6.0 (pow x1 4.0))) (* 3.0 (* x2 -2.0)))))))
double code(double x1, double x2) {
double t_0 = -1.0 - (x1 * x1);
double t_1 = 3.0 * (x1 * x1);
double t_2 = fma(x1, (x1 * 3.0), (2.0 * x2));
double t_3 = (t_2 - x1) / fma(x1, x1, 1.0);
double t_4 = (x1 - t_2) / fma(x1, x1, 1.0);
double t_5 = x1 * (x1 * 3.0);
double t_6 = (t_5 + (2.0 * x2)) - x1;
double t_7 = t_6 / t_0;
double t_8 = (x1 * x1) + 1.0;
double t_9 = t_6 / t_8;
double tmp;
if ((x1 - ((3.0 * (((t_5 - (2.0 * x2)) - x1) / t_0)) + ((((t_5 * t_7) + (t_8 * (((x1 * x1) * (6.0 + (4.0 * t_7))) + ((t_9 * (x1 * 2.0)) * (3.0 - t_9))))) - (x1 * (x1 * x1))) - x1))) <= ((double) INFINITY)) {
tmp = x1 + fma(3.0, ((t_1 - fma(2.0, x2, x1)) / fma(x1, x1, 1.0)), (x1 + fma(fma(x1, x1, 1.0), fma(x1, (x1 * fma(t_3, 4.0, -6.0)), ((x1 * (2.0 * t_4)) * (t_4 - -3.0))), fma(t_1, t_3, pow(x1, 3.0)))));
} else {
tmp = x1 + ((x1 + (6.0 * pow(x1, 4.0))) + (3.0 * (x2 * -2.0)));
}
return tmp;
}
function code(x1, x2) t_0 = Float64(-1.0 - Float64(x1 * x1)) t_1 = Float64(3.0 * Float64(x1 * x1)) t_2 = fma(x1, Float64(x1 * 3.0), Float64(2.0 * x2)) t_3 = Float64(Float64(t_2 - x1) / fma(x1, x1, 1.0)) t_4 = Float64(Float64(x1 - t_2) / fma(x1, x1, 1.0)) t_5 = Float64(x1 * Float64(x1 * 3.0)) t_6 = Float64(Float64(t_5 + Float64(2.0 * x2)) - x1) t_7 = Float64(t_6 / t_0) t_8 = Float64(Float64(x1 * x1) + 1.0) t_9 = Float64(t_6 / t_8) tmp = 0.0 if (Float64(x1 - Float64(Float64(3.0 * Float64(Float64(Float64(t_5 - Float64(2.0 * x2)) - x1) / t_0)) + Float64(Float64(Float64(Float64(t_5 * t_7) + Float64(t_8 * Float64(Float64(Float64(x1 * x1) * Float64(6.0 + Float64(4.0 * t_7))) + Float64(Float64(t_9 * Float64(x1 * 2.0)) * Float64(3.0 - t_9))))) - Float64(x1 * Float64(x1 * x1))) - x1))) <= Inf) tmp = Float64(x1 + fma(3.0, Float64(Float64(t_1 - fma(2.0, x2, x1)) / fma(x1, x1, 1.0)), Float64(x1 + fma(fma(x1, x1, 1.0), fma(x1, Float64(x1 * fma(t_3, 4.0, -6.0)), Float64(Float64(x1 * Float64(2.0 * t_4)) * Float64(t_4 - -3.0))), fma(t_1, t_3, (x1 ^ 3.0)))))); else tmp = Float64(x1 + Float64(Float64(x1 + Float64(6.0 * (x1 ^ 4.0))) + Float64(3.0 * Float64(x2 * -2.0)))); end return tmp end
code[x1_, x2_] := Block[{t$95$0 = N[(-1.0 - N[(x1 * x1), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(3.0 * N[(x1 * x1), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x1 * N[(x1 * 3.0), $MachinePrecision] + N[(2.0 * x2), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[(t$95$2 - x1), $MachinePrecision] / N[(x1 * x1 + 1.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[(N[(x1 - t$95$2), $MachinePrecision] / N[(x1 * x1 + 1.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$5 = N[(x1 * N[(x1 * 3.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$6 = N[(N[(t$95$5 + N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision]}, Block[{t$95$7 = N[(t$95$6 / t$95$0), $MachinePrecision]}, Block[{t$95$8 = N[(N[(x1 * x1), $MachinePrecision] + 1.0), $MachinePrecision]}, Block[{t$95$9 = N[(t$95$6 / t$95$8), $MachinePrecision]}, If[LessEqual[N[(x1 - N[(N[(3.0 * N[(N[(N[(t$95$5 - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$0), $MachinePrecision]), $MachinePrecision] + N[(N[(N[(N[(t$95$5 * t$95$7), $MachinePrecision] + N[(t$95$8 * N[(N[(N[(x1 * x1), $MachinePrecision] * N[(6.0 + N[(4.0 * t$95$7), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(t$95$9 * N[(x1 * 2.0), $MachinePrecision]), $MachinePrecision] * N[(3.0 - t$95$9), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(x1 * N[(x1 * x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], Infinity], N[(x1 + N[(3.0 * N[(N[(t$95$1 - N[(2.0 * x2 + x1), $MachinePrecision]), $MachinePrecision] / N[(x1 * x1 + 1.0), $MachinePrecision]), $MachinePrecision] + N[(x1 + N[(N[(x1 * x1 + 1.0), $MachinePrecision] * N[(x1 * N[(x1 * N[(t$95$3 * 4.0 + -6.0), $MachinePrecision]), $MachinePrecision] + N[(N[(x1 * N[(2.0 * t$95$4), $MachinePrecision]), $MachinePrecision] * N[(t$95$4 - -3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(t$95$1 * t$95$3 + N[Power[x1, 3.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x1 + N[(N[(x1 + N[(6.0 * N[Power[x1, 4.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(3.0 * N[(x2 * -2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := -1 - x1 \cdot x1\\
t_1 := 3 \cdot \left(x1 \cdot x1\right)\\
t_2 := \mathsf{fma}\left(x1, x1 \cdot 3, 2 \cdot x2\right)\\
t_3 := \frac{t\_2 - x1}{\mathsf{fma}\left(x1, x1, 1\right)}\\
t_4 := \frac{x1 - t\_2}{\mathsf{fma}\left(x1, x1, 1\right)}\\
t_5 := x1 \cdot \left(x1 \cdot 3\right)\\
t_6 := \left(t\_5 + 2 \cdot x2\right) - x1\\
t_7 := \frac{t\_6}{t\_0}\\
t_8 := x1 \cdot x1 + 1\\
t_9 := \frac{t\_6}{t\_8}\\
\mathbf{if}\;x1 - \left(3 \cdot \frac{\left(t\_5 - 2 \cdot x2\right) - x1}{t\_0} + \left(\left(\left(t\_5 \cdot t\_7 + t\_8 \cdot \left(\left(x1 \cdot x1\right) \cdot \left(6 + 4 \cdot t\_7\right) + \left(t\_9 \cdot \left(x1 \cdot 2\right)\right) \cdot \left(3 - t\_9\right)\right)\right) - x1 \cdot \left(x1 \cdot x1\right)\right) - x1\right)\right) \leq \infty:\\
\;\;\;\;x1 + \mathsf{fma}\left(3, \frac{t\_1 - \mathsf{fma}\left(2, x2, x1\right)}{\mathsf{fma}\left(x1, x1, 1\right)}, x1 + \mathsf{fma}\left(\mathsf{fma}\left(x1, x1, 1\right), \mathsf{fma}\left(x1, x1 \cdot \mathsf{fma}\left(t\_3, 4, -6\right), \left(x1 \cdot \left(2 \cdot t\_4\right)\right) \cdot \left(t\_4 - -3\right)\right), \mathsf{fma}\left(t\_1, t\_3, {x1}^{3}\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x1 + \left(\left(x1 + 6 \cdot {x1}^{4}\right) + 3 \cdot \left(x2 \cdot -2\right)\right)\\
\end{array}
\end{array}
if (+.f64 x1 (+.f64 (+.f64 (+.f64 (+.f64 (*.f64 (+.f64 (*.f64 (*.f64 (*.f64 #s(literal 2 binary64) x1) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64)))) (-.f64 (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))) #s(literal 3 binary64))) (*.f64 (*.f64 x1 x1) (-.f64 (*.f64 #s(literal 4 binary64) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64)))) #s(literal 6 binary64)))) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))) (*.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))))) (*.f64 (*.f64 x1 x1) x1)) x1) (*.f64 #s(literal 3 binary64) (/.f64 (-.f64 (-.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64)))))) < +inf.0Initial program 99.4%
Simplified99.7%
if +inf.0 < (+.f64 x1 (+.f64 (+.f64 (+.f64 (+.f64 (*.f64 (+.f64 (*.f64 (*.f64 (*.f64 #s(literal 2 binary64) x1) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64)))) (-.f64 (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))) #s(literal 3 binary64))) (*.f64 (*.f64 x1 x1) (-.f64 (*.f64 #s(literal 4 binary64) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64)))) #s(literal 6 binary64)))) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))) (*.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))))) (*.f64 (*.f64 x1 x1) x1)) x1) (*.f64 #s(literal 3 binary64) (/.f64 (-.f64 (-.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64)))))) Initial program 0.0%
Taylor expanded in x1 around inf 15.4%
Taylor expanded in x1 around 0 98.7%
*-commutative98.7%
Simplified98.7%
Final simplification99.4%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (- -1.0 (* x1 x1)))
(t_1 (* x1 (* x1 3.0)))
(t_2 (- (+ t_1 (* 2.0 x2)) x1))
(t_3 (/ t_2 t_0))
(t_4 (+ (* x1 x1) 1.0))
(t_5 (/ t_2 t_4))
(t_6
(-
x1
(+
(* 3.0 (/ (- (- t_1 (* 2.0 x2)) x1) t_0))
(-
(-
(+
(* t_1 t_3)
(*
t_4
(+
(* (* x1 x1) (+ 6.0 (* 4.0 t_3)))
(* (* t_5 (* x1 2.0)) (- 3.0 t_5)))))
(* x1 (* x1 x1)))
x1)))))
(if (<= t_6 INFINITY)
t_6
(+ x1 (+ (+ x1 (* 6.0 (pow x1 4.0))) (* 3.0 (* x2 -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 = (t_1 + (2.0 * x2)) - x1;
double t_3 = t_2 / t_0;
double t_4 = (x1 * x1) + 1.0;
double t_5 = t_2 / t_4;
double t_6 = x1 - ((3.0 * (((t_1 - (2.0 * x2)) - x1) / t_0)) + ((((t_1 * t_3) + (t_4 * (((x1 * x1) * (6.0 + (4.0 * t_3))) + ((t_5 * (x1 * 2.0)) * (3.0 - t_5))))) - (x1 * (x1 * x1))) - x1));
double tmp;
if (t_6 <= ((double) INFINITY)) {
tmp = t_6;
} else {
tmp = x1 + ((x1 + (6.0 * pow(x1, 4.0))) + (3.0 * (x2 * -2.0)));
}
return tmp;
}
public static double code(double x1, double x2) {
double t_0 = -1.0 - (x1 * x1);
double t_1 = x1 * (x1 * 3.0);
double t_2 = (t_1 + (2.0 * x2)) - x1;
double t_3 = t_2 / t_0;
double t_4 = (x1 * x1) + 1.0;
double t_5 = t_2 / t_4;
double t_6 = x1 - ((3.0 * (((t_1 - (2.0 * x2)) - x1) / t_0)) + ((((t_1 * t_3) + (t_4 * (((x1 * x1) * (6.0 + (4.0 * t_3))) + ((t_5 * (x1 * 2.0)) * (3.0 - t_5))))) - (x1 * (x1 * x1))) - x1));
double tmp;
if (t_6 <= Double.POSITIVE_INFINITY) {
tmp = t_6;
} else {
tmp = x1 + ((x1 + (6.0 * Math.pow(x1, 4.0))) + (3.0 * (x2 * -2.0)));
}
return tmp;
}
def code(x1, x2): t_0 = -1.0 - (x1 * x1) t_1 = x1 * (x1 * 3.0) t_2 = (t_1 + (2.0 * x2)) - x1 t_3 = t_2 / t_0 t_4 = (x1 * x1) + 1.0 t_5 = t_2 / t_4 t_6 = x1 - ((3.0 * (((t_1 - (2.0 * x2)) - x1) / t_0)) + ((((t_1 * t_3) + (t_4 * (((x1 * x1) * (6.0 + (4.0 * t_3))) + ((t_5 * (x1 * 2.0)) * (3.0 - t_5))))) - (x1 * (x1 * x1))) - x1)) tmp = 0 if t_6 <= math.inf: tmp = t_6 else: tmp = x1 + ((x1 + (6.0 * math.pow(x1, 4.0))) + (3.0 * (x2 * -2.0))) return tmp
function code(x1, x2) t_0 = Float64(-1.0 - Float64(x1 * x1)) t_1 = Float64(x1 * Float64(x1 * 3.0)) t_2 = Float64(Float64(t_1 + Float64(2.0 * x2)) - x1) t_3 = Float64(t_2 / t_0) t_4 = Float64(Float64(x1 * x1) + 1.0) t_5 = Float64(t_2 / t_4) t_6 = Float64(x1 - Float64(Float64(3.0 * Float64(Float64(Float64(t_1 - Float64(2.0 * x2)) - x1) / t_0)) + Float64(Float64(Float64(Float64(t_1 * t_3) + Float64(t_4 * Float64(Float64(Float64(x1 * x1) * Float64(6.0 + Float64(4.0 * t_3))) + Float64(Float64(t_5 * Float64(x1 * 2.0)) * Float64(3.0 - t_5))))) - Float64(x1 * Float64(x1 * x1))) - x1))) tmp = 0.0 if (t_6 <= Inf) tmp = t_6; else tmp = Float64(x1 + Float64(Float64(x1 + Float64(6.0 * (x1 ^ 4.0))) + Float64(3.0 * Float64(x2 * -2.0)))); end return tmp end
function tmp_2 = code(x1, x2) t_0 = -1.0 - (x1 * x1); t_1 = x1 * (x1 * 3.0); t_2 = (t_1 + (2.0 * x2)) - x1; t_3 = t_2 / t_0; t_4 = (x1 * x1) + 1.0; t_5 = t_2 / t_4; t_6 = x1 - ((3.0 * (((t_1 - (2.0 * x2)) - x1) / t_0)) + ((((t_1 * t_3) + (t_4 * (((x1 * x1) * (6.0 + (4.0 * t_3))) + ((t_5 * (x1 * 2.0)) * (3.0 - t_5))))) - (x1 * (x1 * x1))) - x1)); tmp = 0.0; if (t_6 <= Inf) tmp = t_6; else tmp = x1 + ((x1 + (6.0 * (x1 ^ 4.0))) + (3.0 * (x2 * -2.0))); end tmp_2 = tmp; end
code[x1_, x2_] := Block[{t$95$0 = N[(-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[(t$95$1 + N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision]}, Block[{t$95$3 = N[(t$95$2 / t$95$0), $MachinePrecision]}, Block[{t$95$4 = N[(N[(x1 * x1), $MachinePrecision] + 1.0), $MachinePrecision]}, Block[{t$95$5 = N[(t$95$2 / t$95$4), $MachinePrecision]}, Block[{t$95$6 = N[(x1 - N[(N[(3.0 * N[(N[(N[(t$95$1 - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$0), $MachinePrecision]), $MachinePrecision] + N[(N[(N[(N[(t$95$1 * t$95$3), $MachinePrecision] + N[(t$95$4 * N[(N[(N[(x1 * x1), $MachinePrecision] * N[(6.0 + N[(4.0 * t$95$3), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(t$95$5 * N[(x1 * 2.0), $MachinePrecision]), $MachinePrecision] * N[(3.0 - t$95$5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(x1 * N[(x1 * x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$6, Infinity], t$95$6, N[(x1 + N[(N[(x1 + N[(6.0 * N[Power[x1, 4.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(3.0 * N[(x2 * -2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := -1 - x1 \cdot x1\\
t_1 := x1 \cdot \left(x1 \cdot 3\right)\\
t_2 := \left(t\_1 + 2 \cdot x2\right) - x1\\
t_3 := \frac{t\_2}{t\_0}\\
t_4 := x1 \cdot x1 + 1\\
t_5 := \frac{t\_2}{t\_4}\\
t_6 := x1 - \left(3 \cdot \frac{\left(t\_1 - 2 \cdot x2\right) - x1}{t\_0} + \left(\left(\left(t\_1 \cdot t\_3 + t\_4 \cdot \left(\left(x1 \cdot x1\right) \cdot \left(6 + 4 \cdot t\_3\right) + \left(t\_5 \cdot \left(x1 \cdot 2\right)\right) \cdot \left(3 - t\_5\right)\right)\right) - x1 \cdot \left(x1 \cdot x1\right)\right) - x1\right)\right)\\
\mathbf{if}\;t\_6 \leq \infty:\\
\;\;\;\;t\_6\\
\mathbf{else}:\\
\;\;\;\;x1 + \left(\left(x1 + 6 \cdot {x1}^{4}\right) + 3 \cdot \left(x2 \cdot -2\right)\right)\\
\end{array}
\end{array}
if (+.f64 x1 (+.f64 (+.f64 (+.f64 (+.f64 (*.f64 (+.f64 (*.f64 (*.f64 (*.f64 #s(literal 2 binary64) x1) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64)))) (-.f64 (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))) #s(literal 3 binary64))) (*.f64 (*.f64 x1 x1) (-.f64 (*.f64 #s(literal 4 binary64) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64)))) #s(literal 6 binary64)))) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))) (*.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))))) (*.f64 (*.f64 x1 x1) x1)) x1) (*.f64 #s(literal 3 binary64) (/.f64 (-.f64 (-.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64)))))) < +inf.0Initial program 99.4%
if +inf.0 < (+.f64 x1 (+.f64 (+.f64 (+.f64 (+.f64 (*.f64 (+.f64 (*.f64 (*.f64 (*.f64 #s(literal 2 binary64) x1) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64)))) (-.f64 (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))) #s(literal 3 binary64))) (*.f64 (*.f64 x1 x1) (-.f64 (*.f64 #s(literal 4 binary64) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64)))) #s(literal 6 binary64)))) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))) (*.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))))) (*.f64 (*.f64 x1 x1) x1)) x1) (*.f64 #s(literal 3 binary64) (/.f64 (-.f64 (-.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64)))))) Initial program 0.0%
Taylor expanded in x1 around inf 15.4%
Taylor expanded in x1 around 0 98.7%
*-commutative98.7%
Simplified98.7%
Final simplification99.2%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (+ (* x1 x1) 1.0))
(t_1 (- -1.0 (* x1 x1)))
(t_2 (* x1 (* x1 3.0)))
(t_3 (- (+ t_2 (* 2.0 x2)) x1))
(t_4 (/ t_3 t_0))
(t_5 (- (- t_2 (* 2.0 x2)) x1)))
(if (<= x1 -1.2e+154)
(+ x1 (- (* x2 -6.0) (* x1 (+ 2.0 (* 3.0 (* x1 (- (* x2 -2.0) 3.0)))))))
(if (<= x1 -5.6e+102)
(+
x1
(+
(* 3.0 (/ t_5 t_0))
(+ x1 (* x1 (+ 2.0 (* x1 (+ 3.0 (- (* x2 8.0) x1))))))))
(if (<= x1 5e+102)
(-
x1
(-
(* 3.0 (/ t_5 t_1))
(+
x1
(+
(* x1 (* x1 x1))
(-
(* 3.0 t_2)
(*
t_0
(+
(* (* x1 x1) (+ 6.0 (* 4.0 (/ t_3 t_1))))
(* (* t_4 (* x1 2.0)) (- 3.0 t_4)))))))))
(- x1 (- (* x1 (- 2.0 (* x1 (+ (* x1 3.0) 9.0)))) (* x2 -6.0))))))))
double code(double x1, double x2) {
double t_0 = (x1 * x1) + 1.0;
double t_1 = -1.0 - (x1 * x1);
double t_2 = x1 * (x1 * 3.0);
double t_3 = (t_2 + (2.0 * x2)) - x1;
double t_4 = t_3 / t_0;
double t_5 = (t_2 - (2.0 * x2)) - x1;
double tmp;
if (x1 <= -1.2e+154) {
tmp = x1 + ((x2 * -6.0) - (x1 * (2.0 + (3.0 * (x1 * ((x2 * -2.0) - 3.0))))));
} else if (x1 <= -5.6e+102) {
tmp = x1 + ((3.0 * (t_5 / t_0)) + (x1 + (x1 * (2.0 + (x1 * (3.0 + ((x2 * 8.0) - x1)))))));
} else if (x1 <= 5e+102) {
tmp = x1 - ((3.0 * (t_5 / t_1)) - (x1 + ((x1 * (x1 * x1)) + ((3.0 * t_2) - (t_0 * (((x1 * x1) * (6.0 + (4.0 * (t_3 / t_1)))) + ((t_4 * (x1 * 2.0)) * (3.0 - t_4))))))));
} else {
tmp = x1 - ((x1 * (2.0 - (x1 * ((x1 * 3.0) + 9.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) :: t_1
real(8) :: t_2
real(8) :: t_3
real(8) :: t_4
real(8) :: t_5
real(8) :: tmp
t_0 = (x1 * x1) + 1.0d0
t_1 = (-1.0d0) - (x1 * x1)
t_2 = x1 * (x1 * 3.0d0)
t_3 = (t_2 + (2.0d0 * x2)) - x1
t_4 = t_3 / t_0
t_5 = (t_2 - (2.0d0 * x2)) - x1
if (x1 <= (-1.2d+154)) then
tmp = x1 + ((x2 * (-6.0d0)) - (x1 * (2.0d0 + (3.0d0 * (x1 * ((x2 * (-2.0d0)) - 3.0d0))))))
else if (x1 <= (-5.6d+102)) then
tmp = x1 + ((3.0d0 * (t_5 / t_0)) + (x1 + (x1 * (2.0d0 + (x1 * (3.0d0 + ((x2 * 8.0d0) - x1)))))))
else if (x1 <= 5d+102) then
tmp = x1 - ((3.0d0 * (t_5 / t_1)) - (x1 + ((x1 * (x1 * x1)) + ((3.0d0 * t_2) - (t_0 * (((x1 * x1) * (6.0d0 + (4.0d0 * (t_3 / t_1)))) + ((t_4 * (x1 * 2.0d0)) * (3.0d0 - t_4))))))))
else
tmp = x1 - ((x1 * (2.0d0 - (x1 * ((x1 * 3.0d0) + 9.0d0)))) - (x2 * (-6.0d0)))
end if
code = tmp
end function
public static double code(double x1, double x2) {
double t_0 = (x1 * x1) + 1.0;
double t_1 = -1.0 - (x1 * x1);
double t_2 = x1 * (x1 * 3.0);
double t_3 = (t_2 + (2.0 * x2)) - x1;
double t_4 = t_3 / t_0;
double t_5 = (t_2 - (2.0 * x2)) - x1;
double tmp;
if (x1 <= -1.2e+154) {
tmp = x1 + ((x2 * -6.0) - (x1 * (2.0 + (3.0 * (x1 * ((x2 * -2.0) - 3.0))))));
} else if (x1 <= -5.6e+102) {
tmp = x1 + ((3.0 * (t_5 / t_0)) + (x1 + (x1 * (2.0 + (x1 * (3.0 + ((x2 * 8.0) - x1)))))));
} else if (x1 <= 5e+102) {
tmp = x1 - ((3.0 * (t_5 / t_1)) - (x1 + ((x1 * (x1 * x1)) + ((3.0 * t_2) - (t_0 * (((x1 * x1) * (6.0 + (4.0 * (t_3 / t_1)))) + ((t_4 * (x1 * 2.0)) * (3.0 - t_4))))))));
} else {
tmp = x1 - ((x1 * (2.0 - (x1 * ((x1 * 3.0) + 9.0)))) - (x2 * -6.0));
}
return tmp;
}
def code(x1, x2): t_0 = (x1 * x1) + 1.0 t_1 = -1.0 - (x1 * x1) t_2 = x1 * (x1 * 3.0) t_3 = (t_2 + (2.0 * x2)) - x1 t_4 = t_3 / t_0 t_5 = (t_2 - (2.0 * x2)) - x1 tmp = 0 if x1 <= -1.2e+154: tmp = x1 + ((x2 * -6.0) - (x1 * (2.0 + (3.0 * (x1 * ((x2 * -2.0) - 3.0)))))) elif x1 <= -5.6e+102: tmp = x1 + ((3.0 * (t_5 / t_0)) + (x1 + (x1 * (2.0 + (x1 * (3.0 + ((x2 * 8.0) - x1))))))) elif x1 <= 5e+102: tmp = x1 - ((3.0 * (t_5 / t_1)) - (x1 + ((x1 * (x1 * x1)) + ((3.0 * t_2) - (t_0 * (((x1 * x1) * (6.0 + (4.0 * (t_3 / t_1)))) + ((t_4 * (x1 * 2.0)) * (3.0 - t_4)))))))) else: tmp = x1 - ((x1 * (2.0 - (x1 * ((x1 * 3.0) + 9.0)))) - (x2 * -6.0)) return tmp
function code(x1, x2) t_0 = Float64(Float64(x1 * x1) + 1.0) t_1 = Float64(-1.0 - Float64(x1 * x1)) t_2 = Float64(x1 * Float64(x1 * 3.0)) t_3 = Float64(Float64(t_2 + Float64(2.0 * x2)) - x1) t_4 = Float64(t_3 / t_0) t_5 = Float64(Float64(t_2 - Float64(2.0 * x2)) - x1) tmp = 0.0 if (x1 <= -1.2e+154) tmp = Float64(x1 + Float64(Float64(x2 * -6.0) - Float64(x1 * Float64(2.0 + Float64(3.0 * Float64(x1 * Float64(Float64(x2 * -2.0) - 3.0))))))); elseif (x1 <= -5.6e+102) tmp = Float64(x1 + Float64(Float64(3.0 * Float64(t_5 / t_0)) + Float64(x1 + Float64(x1 * Float64(2.0 + Float64(x1 * Float64(3.0 + Float64(Float64(x2 * 8.0) - x1)))))))); elseif (x1 <= 5e+102) tmp = Float64(x1 - Float64(Float64(3.0 * Float64(t_5 / t_1)) - Float64(x1 + Float64(Float64(x1 * Float64(x1 * x1)) + Float64(Float64(3.0 * t_2) - Float64(t_0 * Float64(Float64(Float64(x1 * x1) * Float64(6.0 + Float64(4.0 * Float64(t_3 / t_1)))) + Float64(Float64(t_4 * Float64(x1 * 2.0)) * Float64(3.0 - t_4))))))))); else tmp = Float64(x1 - Float64(Float64(x1 * Float64(2.0 - Float64(x1 * Float64(Float64(x1 * 3.0) + 9.0)))) - Float64(x2 * -6.0))); end return tmp end
function tmp_2 = code(x1, x2) t_0 = (x1 * x1) + 1.0; t_1 = -1.0 - (x1 * x1); t_2 = x1 * (x1 * 3.0); t_3 = (t_2 + (2.0 * x2)) - x1; t_4 = t_3 / t_0; t_5 = (t_2 - (2.0 * x2)) - x1; tmp = 0.0; if (x1 <= -1.2e+154) tmp = x1 + ((x2 * -6.0) - (x1 * (2.0 + (3.0 * (x1 * ((x2 * -2.0) - 3.0)))))); elseif (x1 <= -5.6e+102) tmp = x1 + ((3.0 * (t_5 / t_0)) + (x1 + (x1 * (2.0 + (x1 * (3.0 + ((x2 * 8.0) - x1))))))); elseif (x1 <= 5e+102) tmp = x1 - ((3.0 * (t_5 / t_1)) - (x1 + ((x1 * (x1 * x1)) + ((3.0 * t_2) - (t_0 * (((x1 * x1) * (6.0 + (4.0 * (t_3 / t_1)))) + ((t_4 * (x1 * 2.0)) * (3.0 - t_4)))))))); else tmp = x1 - ((x1 * (2.0 - (x1 * ((x1 * 3.0) + 9.0)))) - (x2 * -6.0)); end tmp_2 = tmp; end
code[x1_, x2_] := Block[{t$95$0 = N[(N[(x1 * x1), $MachinePrecision] + 1.0), $MachinePrecision]}, Block[{t$95$1 = N[(-1.0 - N[(x1 * x1), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x1 * N[(x1 * 3.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[(t$95$2 + N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision]}, Block[{t$95$4 = N[(t$95$3 / t$95$0), $MachinePrecision]}, Block[{t$95$5 = N[(N[(t$95$2 - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision]}, If[LessEqual[x1, -1.2e+154], N[(x1 + N[(N[(x2 * -6.0), $MachinePrecision] - N[(x1 * N[(2.0 + N[(3.0 * N[(x1 * N[(N[(x2 * -2.0), $MachinePrecision] - 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, -5.6e+102], N[(x1 + N[(N[(3.0 * N[(t$95$5 / t$95$0), $MachinePrecision]), $MachinePrecision] + N[(x1 + N[(x1 * N[(2.0 + N[(x1 * N[(3.0 + N[(N[(x2 * 8.0), $MachinePrecision] - x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 5e+102], N[(x1 - N[(N[(3.0 * N[(t$95$5 / t$95$1), $MachinePrecision]), $MachinePrecision] - N[(x1 + N[(N[(x1 * N[(x1 * x1), $MachinePrecision]), $MachinePrecision] + N[(N[(3.0 * t$95$2), $MachinePrecision] - N[(t$95$0 * N[(N[(N[(x1 * x1), $MachinePrecision] * N[(6.0 + N[(4.0 * N[(t$95$3 / t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(t$95$4 * N[(x1 * 2.0), $MachinePrecision]), $MachinePrecision] * N[(3.0 - t$95$4), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x1 - N[(N[(x1 * N[(2.0 - N[(x1 * N[(N[(x1 * 3.0), $MachinePrecision] + 9.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(x2 * -6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x1 \cdot x1 + 1\\
t_1 := -1 - x1 \cdot x1\\
t_2 := x1 \cdot \left(x1 \cdot 3\right)\\
t_3 := \left(t\_2 + 2 \cdot x2\right) - x1\\
t_4 := \frac{t\_3}{t\_0}\\
t_5 := \left(t\_2 - 2 \cdot x2\right) - x1\\
\mathbf{if}\;x1 \leq -1.2 \cdot 10^{+154}:\\
\;\;\;\;x1 + \left(x2 \cdot -6 - x1 \cdot \left(2 + 3 \cdot \left(x1 \cdot \left(x2 \cdot -2 - 3\right)\right)\right)\right)\\
\mathbf{elif}\;x1 \leq -5.6 \cdot 10^{+102}:\\
\;\;\;\;x1 + \left(3 \cdot \frac{t\_5}{t\_0} + \left(x1 + x1 \cdot \left(2 + x1 \cdot \left(3 + \left(x2 \cdot 8 - x1\right)\right)\right)\right)\right)\\
\mathbf{elif}\;x1 \leq 5 \cdot 10^{+102}:\\
\;\;\;\;x1 - \left(3 \cdot \frac{t\_5}{t\_1} - \left(x1 + \left(x1 \cdot \left(x1 \cdot x1\right) + \left(3 \cdot t\_2 - t\_0 \cdot \left(\left(x1 \cdot x1\right) \cdot \left(6 + 4 \cdot \frac{t\_3}{t\_1}\right) + \left(t\_4 \cdot \left(x1 \cdot 2\right)\right) \cdot \left(3 - t\_4\right)\right)\right)\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x1 - \left(x1 \cdot \left(2 - x1 \cdot \left(x1 \cdot 3 + 9\right)\right) - x2 \cdot -6\right)\\
\end{array}
\end{array}
if x1 < -1.20000000000000007e154Initial program 0.0%
Taylor expanded in x1 around inf 0.0%
Taylor expanded in x1 around 0 86.5%
if -1.20000000000000007e154 < x1 < -5.60000000000000037e102Initial program 0.0%
Taylor expanded in x1 around 0 0.0%
+-commutative0.0%
mul-1-neg0.0%
sub-neg0.0%
Simplified0.0%
Taylor expanded in x1 around inf 0.0%
Taylor expanded in x1 around inf 0.0%
*-commutative0.0%
Simplified0.0%
Taylor expanded in x1 around 0 83.3%
if -5.60000000000000037e102 < x1 < 5e102Initial program 99.3%
Taylor expanded in x1 around inf 99.2%
if 5e102 < x1 Initial program 29.3%
Taylor expanded in x1 around 0 8.4%
Taylor expanded in x1 around 0 90.2%
Taylor expanded in x2 around 0 97.6%
*-commutative97.6%
Simplified97.6%
Final simplification96.3%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (+ (* x1 x1) 1.0))
(t_1 (* x1 (* x1 3.0)))
(t_2 (- -1.0 (* x1 x1)))
(t_3 (- (+ t_1 (* 2.0 x2)) x1))
(t_4 (/ t_3 t_0)))
(if (or (<= x1 -1.7e+75) (not (<= x1 2.45e+38)))
(+ x1 (+ (+ x1 (* 6.0 (pow x1 4.0))) (* 3.0 (* x2 -2.0))))
(-
x1
(-
(* 3.0 (/ (- (- t_1 (* 2.0 x2)) x1) t_2))
(+
x1
(+
(* x1 (* x1 x1))
(-
(* 3.0 t_1)
(*
t_0
(+
(* (* x1 x1) (+ 6.0 (* 4.0 (/ t_3 t_2))))
(* (* t_4 (* x1 2.0)) (- 3.0 t_4))))))))))))
double code(double x1, double x2) {
double t_0 = (x1 * x1) + 1.0;
double t_1 = x1 * (x1 * 3.0);
double t_2 = -1.0 - (x1 * x1);
double t_3 = (t_1 + (2.0 * x2)) - x1;
double t_4 = t_3 / t_0;
double tmp;
if ((x1 <= -1.7e+75) || !(x1 <= 2.45e+38)) {
tmp = x1 + ((x1 + (6.0 * pow(x1, 4.0))) + (3.0 * (x2 * -2.0)));
} else {
tmp = x1 - ((3.0 * (((t_1 - (2.0 * x2)) - x1) / t_2)) - (x1 + ((x1 * (x1 * x1)) + ((3.0 * t_1) - (t_0 * (((x1 * x1) * (6.0 + (4.0 * (t_3 / t_2)))) + ((t_4 * (x1 * 2.0)) * (3.0 - t_4))))))));
}
return tmp;
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
real(8) :: t_0
real(8) :: t_1
real(8) :: t_2
real(8) :: t_3
real(8) :: t_4
real(8) :: tmp
t_0 = (x1 * x1) + 1.0d0
t_1 = x1 * (x1 * 3.0d0)
t_2 = (-1.0d0) - (x1 * x1)
t_3 = (t_1 + (2.0d0 * x2)) - x1
t_4 = t_3 / t_0
if ((x1 <= (-1.7d+75)) .or. (.not. (x1 <= 2.45d+38))) then
tmp = x1 + ((x1 + (6.0d0 * (x1 ** 4.0d0))) + (3.0d0 * (x2 * (-2.0d0))))
else
tmp = x1 - ((3.0d0 * (((t_1 - (2.0d0 * x2)) - x1) / t_2)) - (x1 + ((x1 * (x1 * x1)) + ((3.0d0 * t_1) - (t_0 * (((x1 * x1) * (6.0d0 + (4.0d0 * (t_3 / t_2)))) + ((t_4 * (x1 * 2.0d0)) * (3.0d0 - t_4))))))))
end if
code = tmp
end function
public static double code(double x1, double x2) {
double t_0 = (x1 * x1) + 1.0;
double t_1 = x1 * (x1 * 3.0);
double t_2 = -1.0 - (x1 * x1);
double t_3 = (t_1 + (2.0 * x2)) - x1;
double t_4 = t_3 / t_0;
double tmp;
if ((x1 <= -1.7e+75) || !(x1 <= 2.45e+38)) {
tmp = x1 + ((x1 + (6.0 * Math.pow(x1, 4.0))) + (3.0 * (x2 * -2.0)));
} else {
tmp = x1 - ((3.0 * (((t_1 - (2.0 * x2)) - x1) / t_2)) - (x1 + ((x1 * (x1 * x1)) + ((3.0 * t_1) - (t_0 * (((x1 * x1) * (6.0 + (4.0 * (t_3 / t_2)))) + ((t_4 * (x1 * 2.0)) * (3.0 - t_4))))))));
}
return tmp;
}
def code(x1, x2): t_0 = (x1 * x1) + 1.0 t_1 = x1 * (x1 * 3.0) t_2 = -1.0 - (x1 * x1) t_3 = (t_1 + (2.0 * x2)) - x1 t_4 = t_3 / t_0 tmp = 0 if (x1 <= -1.7e+75) or not (x1 <= 2.45e+38): tmp = x1 + ((x1 + (6.0 * math.pow(x1, 4.0))) + (3.0 * (x2 * -2.0))) else: tmp = x1 - ((3.0 * (((t_1 - (2.0 * x2)) - x1) / t_2)) - (x1 + ((x1 * (x1 * x1)) + ((3.0 * t_1) - (t_0 * (((x1 * x1) * (6.0 + (4.0 * (t_3 / t_2)))) + ((t_4 * (x1 * 2.0)) * (3.0 - t_4)))))))) return tmp
function code(x1, x2) t_0 = Float64(Float64(x1 * x1) + 1.0) t_1 = Float64(x1 * Float64(x1 * 3.0)) t_2 = Float64(-1.0 - Float64(x1 * x1)) t_3 = Float64(Float64(t_1 + Float64(2.0 * x2)) - x1) t_4 = Float64(t_3 / t_0) tmp = 0.0 if ((x1 <= -1.7e+75) || !(x1 <= 2.45e+38)) tmp = Float64(x1 + Float64(Float64(x1 + Float64(6.0 * (x1 ^ 4.0))) + Float64(3.0 * Float64(x2 * -2.0)))); else tmp = Float64(x1 - Float64(Float64(3.0 * Float64(Float64(Float64(t_1 - Float64(2.0 * x2)) - x1) / t_2)) - Float64(x1 + Float64(Float64(x1 * Float64(x1 * x1)) + Float64(Float64(3.0 * t_1) - Float64(t_0 * Float64(Float64(Float64(x1 * x1) * Float64(6.0 + Float64(4.0 * Float64(t_3 / t_2)))) + Float64(Float64(t_4 * Float64(x1 * 2.0)) * Float64(3.0 - t_4))))))))); end return tmp end
function tmp_2 = code(x1, x2) t_0 = (x1 * x1) + 1.0; t_1 = x1 * (x1 * 3.0); t_2 = -1.0 - (x1 * x1); t_3 = (t_1 + (2.0 * x2)) - x1; t_4 = t_3 / t_0; tmp = 0.0; if ((x1 <= -1.7e+75) || ~((x1 <= 2.45e+38))) tmp = x1 + ((x1 + (6.0 * (x1 ^ 4.0))) + (3.0 * (x2 * -2.0))); else tmp = x1 - ((3.0 * (((t_1 - (2.0 * x2)) - x1) / t_2)) - (x1 + ((x1 * (x1 * x1)) + ((3.0 * t_1) - (t_0 * (((x1 * x1) * (6.0 + (4.0 * (t_3 / t_2)))) + ((t_4 * (x1 * 2.0)) * (3.0 - t_4)))))))); end tmp_2 = tmp; end
code[x1_, x2_] := Block[{t$95$0 = N[(N[(x1 * x1), $MachinePrecision] + 1.0), $MachinePrecision]}, Block[{t$95$1 = N[(x1 * N[(x1 * 3.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(-1.0 - N[(x1 * x1), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[(t$95$1 + N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision]}, Block[{t$95$4 = N[(t$95$3 / t$95$0), $MachinePrecision]}, If[Or[LessEqual[x1, -1.7e+75], N[Not[LessEqual[x1, 2.45e+38]], $MachinePrecision]], N[(x1 + N[(N[(x1 + N[(6.0 * N[Power[x1, 4.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(3.0 * N[(x2 * -2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x1 - N[(N[(3.0 * N[(N[(N[(t$95$1 - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$2), $MachinePrecision]), $MachinePrecision] - N[(x1 + N[(N[(x1 * N[(x1 * x1), $MachinePrecision]), $MachinePrecision] + N[(N[(3.0 * t$95$1), $MachinePrecision] - N[(t$95$0 * N[(N[(N[(x1 * x1), $MachinePrecision] * N[(6.0 + N[(4.0 * N[(t$95$3 / t$95$2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(t$95$4 * N[(x1 * 2.0), $MachinePrecision]), $MachinePrecision] * N[(3.0 - t$95$4), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x1 \cdot x1 + 1\\
t_1 := x1 \cdot \left(x1 \cdot 3\right)\\
t_2 := -1 - x1 \cdot x1\\
t_3 := \left(t\_1 + 2 \cdot x2\right) - x1\\
t_4 := \frac{t\_3}{t\_0}\\
\mathbf{if}\;x1 \leq -1.7 \cdot 10^{+75} \lor \neg \left(x1 \leq 2.45 \cdot 10^{+38}\right):\\
\;\;\;\;x1 + \left(\left(x1 + 6 \cdot {x1}^{4}\right) + 3 \cdot \left(x2 \cdot -2\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x1 - \left(3 \cdot \frac{\left(t\_1 - 2 \cdot x2\right) - x1}{t\_2} - \left(x1 + \left(x1 \cdot \left(x1 \cdot x1\right) + \left(3 \cdot t\_1 - t\_0 \cdot \left(\left(x1 \cdot x1\right) \cdot \left(6 + 4 \cdot \frac{t\_3}{t\_2}\right) + \left(t\_4 \cdot \left(x1 \cdot 2\right)\right) \cdot \left(3 - t\_4\right)\right)\right)\right)\right)\right)\\
\end{array}
\end{array}
if x1 < -1.70000000000000006e75 or 2.45000000000000001e38 < x1 Initial program 24.9%
Taylor expanded in x1 around inf 36.5%
Taylor expanded in x1 around 0 99.0%
*-commutative99.0%
Simplified99.0%
if -1.70000000000000006e75 < x1 < 2.45000000000000001e38Initial program 99.3%
Taylor expanded in x1 around inf 99.1%
Final simplification99.1%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (+ (* x1 x1) 1.0))
(t_1 (* x1 (* x1 3.0)))
(t_2 (- (+ t_1 (* 2.0 x2)) x1))
(t_3 (* 3.0 (/ (- (- t_1 (* 2.0 x2)) x1) t_0)))
(t_4 (/ t_2 t_0)))
(if (<= x1 -1.32e+154)
(+ x1 (- (* x2 -6.0) (* x1 (+ 2.0 (* 3.0 (* x1 (- (* x2 -2.0) 3.0)))))))
(if (<= x1 -5.6e+102)
(+ x1 (+ t_3 (+ x1 (* x1 (+ 2.0 (* x1 (+ 3.0 (- (* x2 8.0) x1))))))))
(if (<= x1 1e+101)
(+
x1
(-
t_3
(-
(-
(+
(* t_1 (/ t_2 (- -1.0 (* x1 x1))))
(* t_0 (- (* (* t_4 (* x1 2.0)) (- 3.0 t_4)) (* (* x1 x1) 6.0))))
(* x1 (* x1 x1)))
x1)))
(- x1 (- (* x1 (- 2.0 (* x1 (+ (* x1 3.0) 9.0)))) (* x2 -6.0))))))))
double code(double x1, double x2) {
double t_0 = (x1 * x1) + 1.0;
double t_1 = x1 * (x1 * 3.0);
double t_2 = (t_1 + (2.0 * x2)) - x1;
double t_3 = 3.0 * (((t_1 - (2.0 * x2)) - x1) / t_0);
double t_4 = t_2 / t_0;
double tmp;
if (x1 <= -1.32e+154) {
tmp = x1 + ((x2 * -6.0) - (x1 * (2.0 + (3.0 * (x1 * ((x2 * -2.0) - 3.0))))));
} else if (x1 <= -5.6e+102) {
tmp = x1 + (t_3 + (x1 + (x1 * (2.0 + (x1 * (3.0 + ((x2 * 8.0) - x1)))))));
} else if (x1 <= 1e+101) {
tmp = x1 + (t_3 - ((((t_1 * (t_2 / (-1.0 - (x1 * x1)))) + (t_0 * (((t_4 * (x1 * 2.0)) * (3.0 - t_4)) - ((x1 * x1) * 6.0)))) - (x1 * (x1 * x1))) - x1));
} else {
tmp = x1 - ((x1 * (2.0 - (x1 * ((x1 * 3.0) + 9.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) :: t_1
real(8) :: t_2
real(8) :: t_3
real(8) :: t_4
real(8) :: tmp
t_0 = (x1 * x1) + 1.0d0
t_1 = x1 * (x1 * 3.0d0)
t_2 = (t_1 + (2.0d0 * x2)) - x1
t_3 = 3.0d0 * (((t_1 - (2.0d0 * x2)) - x1) / t_0)
t_4 = t_2 / t_0
if (x1 <= (-1.32d+154)) then
tmp = x1 + ((x2 * (-6.0d0)) - (x1 * (2.0d0 + (3.0d0 * (x1 * ((x2 * (-2.0d0)) - 3.0d0))))))
else if (x1 <= (-5.6d+102)) then
tmp = x1 + (t_3 + (x1 + (x1 * (2.0d0 + (x1 * (3.0d0 + ((x2 * 8.0d0) - x1)))))))
else if (x1 <= 1d+101) then
tmp = x1 + (t_3 - ((((t_1 * (t_2 / ((-1.0d0) - (x1 * x1)))) + (t_0 * (((t_4 * (x1 * 2.0d0)) * (3.0d0 - t_4)) - ((x1 * x1) * 6.0d0)))) - (x1 * (x1 * x1))) - x1))
else
tmp = x1 - ((x1 * (2.0d0 - (x1 * ((x1 * 3.0d0) + 9.0d0)))) - (x2 * (-6.0d0)))
end if
code = tmp
end function
public static double code(double x1, double x2) {
double t_0 = (x1 * x1) + 1.0;
double t_1 = x1 * (x1 * 3.0);
double t_2 = (t_1 + (2.0 * x2)) - x1;
double t_3 = 3.0 * (((t_1 - (2.0 * x2)) - x1) / t_0);
double t_4 = t_2 / t_0;
double tmp;
if (x1 <= -1.32e+154) {
tmp = x1 + ((x2 * -6.0) - (x1 * (2.0 + (3.0 * (x1 * ((x2 * -2.0) - 3.0))))));
} else if (x1 <= -5.6e+102) {
tmp = x1 + (t_3 + (x1 + (x1 * (2.0 + (x1 * (3.0 + ((x2 * 8.0) - x1)))))));
} else if (x1 <= 1e+101) {
tmp = x1 + (t_3 - ((((t_1 * (t_2 / (-1.0 - (x1 * x1)))) + (t_0 * (((t_4 * (x1 * 2.0)) * (3.0 - t_4)) - ((x1 * x1) * 6.0)))) - (x1 * (x1 * x1))) - x1));
} else {
tmp = x1 - ((x1 * (2.0 - (x1 * ((x1 * 3.0) + 9.0)))) - (x2 * -6.0));
}
return tmp;
}
def code(x1, x2): t_0 = (x1 * x1) + 1.0 t_1 = x1 * (x1 * 3.0) t_2 = (t_1 + (2.0 * x2)) - x1 t_3 = 3.0 * (((t_1 - (2.0 * x2)) - x1) / t_0) t_4 = t_2 / t_0 tmp = 0 if x1 <= -1.32e+154: tmp = x1 + ((x2 * -6.0) - (x1 * (2.0 + (3.0 * (x1 * ((x2 * -2.0) - 3.0)))))) elif x1 <= -5.6e+102: tmp = x1 + (t_3 + (x1 + (x1 * (2.0 + (x1 * (3.0 + ((x2 * 8.0) - x1))))))) elif x1 <= 1e+101: tmp = x1 + (t_3 - ((((t_1 * (t_2 / (-1.0 - (x1 * x1)))) + (t_0 * (((t_4 * (x1 * 2.0)) * (3.0 - t_4)) - ((x1 * x1) * 6.0)))) - (x1 * (x1 * x1))) - x1)) else: tmp = x1 - ((x1 * (2.0 - (x1 * ((x1 * 3.0) + 9.0)))) - (x2 * -6.0)) return tmp
function code(x1, x2) t_0 = Float64(Float64(x1 * x1) + 1.0) t_1 = Float64(x1 * Float64(x1 * 3.0)) t_2 = Float64(Float64(t_1 + Float64(2.0 * x2)) - x1) t_3 = Float64(3.0 * Float64(Float64(Float64(t_1 - Float64(2.0 * x2)) - x1) / t_0)) t_4 = Float64(t_2 / t_0) tmp = 0.0 if (x1 <= -1.32e+154) tmp = Float64(x1 + Float64(Float64(x2 * -6.0) - Float64(x1 * Float64(2.0 + Float64(3.0 * Float64(x1 * Float64(Float64(x2 * -2.0) - 3.0))))))); elseif (x1 <= -5.6e+102) tmp = Float64(x1 + Float64(t_3 + Float64(x1 + Float64(x1 * Float64(2.0 + Float64(x1 * Float64(3.0 + Float64(Float64(x2 * 8.0) - x1)))))))); elseif (x1 <= 1e+101) tmp = Float64(x1 + Float64(t_3 - Float64(Float64(Float64(Float64(t_1 * Float64(t_2 / Float64(-1.0 - Float64(x1 * x1)))) + Float64(t_0 * Float64(Float64(Float64(t_4 * Float64(x1 * 2.0)) * Float64(3.0 - t_4)) - Float64(Float64(x1 * x1) * 6.0)))) - Float64(x1 * Float64(x1 * x1))) - x1))); else tmp = Float64(x1 - Float64(Float64(x1 * Float64(2.0 - Float64(x1 * Float64(Float64(x1 * 3.0) + 9.0)))) - Float64(x2 * -6.0))); end return tmp end
function tmp_2 = code(x1, x2) t_0 = (x1 * x1) + 1.0; t_1 = x1 * (x1 * 3.0); t_2 = (t_1 + (2.0 * x2)) - x1; t_3 = 3.0 * (((t_1 - (2.0 * x2)) - x1) / t_0); t_4 = t_2 / t_0; tmp = 0.0; if (x1 <= -1.32e+154) tmp = x1 + ((x2 * -6.0) - (x1 * (2.0 + (3.0 * (x1 * ((x2 * -2.0) - 3.0)))))); elseif (x1 <= -5.6e+102) tmp = x1 + (t_3 + (x1 + (x1 * (2.0 + (x1 * (3.0 + ((x2 * 8.0) - x1))))))); elseif (x1 <= 1e+101) tmp = x1 + (t_3 - ((((t_1 * (t_2 / (-1.0 - (x1 * x1)))) + (t_0 * (((t_4 * (x1 * 2.0)) * (3.0 - t_4)) - ((x1 * x1) * 6.0)))) - (x1 * (x1 * x1))) - x1)); else tmp = x1 - ((x1 * (2.0 - (x1 * ((x1 * 3.0) + 9.0)))) - (x2 * -6.0)); end tmp_2 = tmp; end
code[x1_, x2_] := Block[{t$95$0 = N[(N[(x1 * x1), $MachinePrecision] + 1.0), $MachinePrecision]}, Block[{t$95$1 = N[(x1 * N[(x1 * 3.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(t$95$1 + N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision]}, Block[{t$95$3 = N[(3.0 * N[(N[(N[(t$95$1 - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[(t$95$2 / t$95$0), $MachinePrecision]}, If[LessEqual[x1, -1.32e+154], N[(x1 + N[(N[(x2 * -6.0), $MachinePrecision] - N[(x1 * N[(2.0 + N[(3.0 * N[(x1 * N[(N[(x2 * -2.0), $MachinePrecision] - 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, -5.6e+102], N[(x1 + N[(t$95$3 + N[(x1 + N[(x1 * N[(2.0 + N[(x1 * N[(3.0 + N[(N[(x2 * 8.0), $MachinePrecision] - x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 1e+101], N[(x1 + N[(t$95$3 - N[(N[(N[(N[(t$95$1 * N[(t$95$2 / N[(-1.0 - N[(x1 * x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(t$95$0 * N[(N[(N[(t$95$4 * N[(x1 * 2.0), $MachinePrecision]), $MachinePrecision] * N[(3.0 - t$95$4), $MachinePrecision]), $MachinePrecision] - N[(N[(x1 * x1), $MachinePrecision] * 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(x1 * N[(x1 * x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x1 - N[(N[(x1 * N[(2.0 - N[(x1 * N[(N[(x1 * 3.0), $MachinePrecision] + 9.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(x2 * -6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x1 \cdot x1 + 1\\
t_1 := x1 \cdot \left(x1 \cdot 3\right)\\
t_2 := \left(t\_1 + 2 \cdot x2\right) - x1\\
t_3 := 3 \cdot \frac{\left(t\_1 - 2 \cdot x2\right) - x1}{t\_0}\\
t_4 := \frac{t\_2}{t\_0}\\
\mathbf{if}\;x1 \leq -1.32 \cdot 10^{+154}:\\
\;\;\;\;x1 + \left(x2 \cdot -6 - x1 \cdot \left(2 + 3 \cdot \left(x1 \cdot \left(x2 \cdot -2 - 3\right)\right)\right)\right)\\
\mathbf{elif}\;x1 \leq -5.6 \cdot 10^{+102}:\\
\;\;\;\;x1 + \left(t\_3 + \left(x1 + x1 \cdot \left(2 + x1 \cdot \left(3 + \left(x2 \cdot 8 - x1\right)\right)\right)\right)\right)\\
\mathbf{elif}\;x1 \leq 10^{+101}:\\
\;\;\;\;x1 + \left(t\_3 - \left(\left(\left(t\_1 \cdot \frac{t\_2}{-1 - x1 \cdot x1} + t\_0 \cdot \left(\left(t\_4 \cdot \left(x1 \cdot 2\right)\right) \cdot \left(3 - t\_4\right) - \left(x1 \cdot x1\right) \cdot 6\right)\right) - x1 \cdot \left(x1 \cdot x1\right)\right) - x1\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x1 - \left(x1 \cdot \left(2 - x1 \cdot \left(x1 \cdot 3 + 9\right)\right) - x2 \cdot -6\right)\\
\end{array}
\end{array}
if x1 < -1.31999999999999998e154Initial program 0.0%
Taylor expanded in x1 around inf 0.0%
Taylor expanded in x1 around 0 86.5%
if -1.31999999999999998e154 < x1 < -5.60000000000000037e102Initial program 0.0%
Taylor expanded in x1 around 0 0.0%
+-commutative0.0%
mul-1-neg0.0%
sub-neg0.0%
Simplified0.0%
Taylor expanded in x1 around inf 0.0%
Taylor expanded in x1 around inf 0.0%
*-commutative0.0%
Simplified0.0%
Taylor expanded in x1 around 0 83.3%
if -5.60000000000000037e102 < x1 < 9.9999999999999998e100Initial program 99.3%
Taylor expanded in x1 around inf 96.3%
if 9.9999999999999998e100 < x1 Initial program 29.3%
Taylor expanded in x1 around 0 8.4%
Taylor expanded in x1 around 0 90.2%
Taylor expanded in x2 around 0 97.6%
*-commutative97.6%
Simplified97.6%
Final simplification94.5%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (+ (* x1 x1) 1.0))
(t_1 (* x1 (* x1 3.0)))
(t_2 (/ (- (+ t_1 (* 2.0 x2)) x1) t_0))
(t_3 (* 3.0 (/ (- (- t_1 (* 2.0 x2)) x1) t_0))))
(if (<= x1 -1.32e+154)
(+ x1 (- (* x2 -6.0) (* x1 (+ 2.0 (* 3.0 (* x1 (- (* x2 -2.0) 3.0)))))))
(if (<= x1 -5.6e+102)
(+ x1 (+ t_3 (+ x1 (* x1 (+ 2.0 (* x1 (+ 3.0 (- (* x2 8.0) x1))))))))
(if (<= x1 1e+101)
(+
x1
(+
t_3
(+
x1
(-
(* x1 (* x1 x1))
(-
(* t_0 (- (* (* t_2 (* x1 2.0)) (- 3.0 t_2)) (* (* x1 x1) 6.0)))
(* 3.0 t_1))))))
(- x1 (- (* x1 (- 2.0 (* x1 (+ (* x1 3.0) 9.0)))) (* x2 -6.0))))))))
double code(double x1, double x2) {
double t_0 = (x1 * x1) + 1.0;
double t_1 = x1 * (x1 * 3.0);
double t_2 = ((t_1 + (2.0 * x2)) - x1) / t_0;
double t_3 = 3.0 * (((t_1 - (2.0 * x2)) - x1) / t_0);
double tmp;
if (x1 <= -1.32e+154) {
tmp = x1 + ((x2 * -6.0) - (x1 * (2.0 + (3.0 * (x1 * ((x2 * -2.0) - 3.0))))));
} else if (x1 <= -5.6e+102) {
tmp = x1 + (t_3 + (x1 + (x1 * (2.0 + (x1 * (3.0 + ((x2 * 8.0) - x1)))))));
} else if (x1 <= 1e+101) {
tmp = x1 + (t_3 + (x1 + ((x1 * (x1 * x1)) - ((t_0 * (((t_2 * (x1 * 2.0)) * (3.0 - t_2)) - ((x1 * x1) * 6.0))) - (3.0 * t_1)))));
} else {
tmp = x1 - ((x1 * (2.0 - (x1 * ((x1 * 3.0) + 9.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) :: t_1
real(8) :: t_2
real(8) :: t_3
real(8) :: tmp
t_0 = (x1 * x1) + 1.0d0
t_1 = x1 * (x1 * 3.0d0)
t_2 = ((t_1 + (2.0d0 * x2)) - x1) / t_0
t_3 = 3.0d0 * (((t_1 - (2.0d0 * x2)) - x1) / t_0)
if (x1 <= (-1.32d+154)) then
tmp = x1 + ((x2 * (-6.0d0)) - (x1 * (2.0d0 + (3.0d0 * (x1 * ((x2 * (-2.0d0)) - 3.0d0))))))
else if (x1 <= (-5.6d+102)) then
tmp = x1 + (t_3 + (x1 + (x1 * (2.0d0 + (x1 * (3.0d0 + ((x2 * 8.0d0) - x1)))))))
else if (x1 <= 1d+101) then
tmp = x1 + (t_3 + (x1 + ((x1 * (x1 * x1)) - ((t_0 * (((t_2 * (x1 * 2.0d0)) * (3.0d0 - t_2)) - ((x1 * x1) * 6.0d0))) - (3.0d0 * t_1)))))
else
tmp = x1 - ((x1 * (2.0d0 - (x1 * ((x1 * 3.0d0) + 9.0d0)))) - (x2 * (-6.0d0)))
end if
code = tmp
end function
public static double code(double x1, double x2) {
double t_0 = (x1 * x1) + 1.0;
double t_1 = x1 * (x1 * 3.0);
double t_2 = ((t_1 + (2.0 * x2)) - x1) / t_0;
double t_3 = 3.0 * (((t_1 - (2.0 * x2)) - x1) / t_0);
double tmp;
if (x1 <= -1.32e+154) {
tmp = x1 + ((x2 * -6.0) - (x1 * (2.0 + (3.0 * (x1 * ((x2 * -2.0) - 3.0))))));
} else if (x1 <= -5.6e+102) {
tmp = x1 + (t_3 + (x1 + (x1 * (2.0 + (x1 * (3.0 + ((x2 * 8.0) - x1)))))));
} else if (x1 <= 1e+101) {
tmp = x1 + (t_3 + (x1 + ((x1 * (x1 * x1)) - ((t_0 * (((t_2 * (x1 * 2.0)) * (3.0 - t_2)) - ((x1 * x1) * 6.0))) - (3.0 * t_1)))));
} else {
tmp = x1 - ((x1 * (2.0 - (x1 * ((x1 * 3.0) + 9.0)))) - (x2 * -6.0));
}
return tmp;
}
def code(x1, x2): t_0 = (x1 * x1) + 1.0 t_1 = x1 * (x1 * 3.0) t_2 = ((t_1 + (2.0 * x2)) - x1) / t_0 t_3 = 3.0 * (((t_1 - (2.0 * x2)) - x1) / t_0) tmp = 0 if x1 <= -1.32e+154: tmp = x1 + ((x2 * -6.0) - (x1 * (2.0 + (3.0 * (x1 * ((x2 * -2.0) - 3.0)))))) elif x1 <= -5.6e+102: tmp = x1 + (t_3 + (x1 + (x1 * (2.0 + (x1 * (3.0 + ((x2 * 8.0) - x1))))))) elif x1 <= 1e+101: tmp = x1 + (t_3 + (x1 + ((x1 * (x1 * x1)) - ((t_0 * (((t_2 * (x1 * 2.0)) * (3.0 - t_2)) - ((x1 * x1) * 6.0))) - (3.0 * t_1))))) else: tmp = x1 - ((x1 * (2.0 - (x1 * ((x1 * 3.0) + 9.0)))) - (x2 * -6.0)) return tmp
function code(x1, x2) t_0 = Float64(Float64(x1 * x1) + 1.0) t_1 = Float64(x1 * Float64(x1 * 3.0)) t_2 = Float64(Float64(Float64(t_1 + Float64(2.0 * x2)) - x1) / t_0) t_3 = Float64(3.0 * Float64(Float64(Float64(t_1 - Float64(2.0 * x2)) - x1) / t_0)) tmp = 0.0 if (x1 <= -1.32e+154) tmp = Float64(x1 + Float64(Float64(x2 * -6.0) - Float64(x1 * Float64(2.0 + Float64(3.0 * Float64(x1 * Float64(Float64(x2 * -2.0) - 3.0))))))); elseif (x1 <= -5.6e+102) tmp = Float64(x1 + Float64(t_3 + Float64(x1 + Float64(x1 * Float64(2.0 + Float64(x1 * Float64(3.0 + Float64(Float64(x2 * 8.0) - x1)))))))); elseif (x1 <= 1e+101) tmp = Float64(x1 + Float64(t_3 + Float64(x1 + Float64(Float64(x1 * Float64(x1 * x1)) - Float64(Float64(t_0 * Float64(Float64(Float64(t_2 * Float64(x1 * 2.0)) * Float64(3.0 - t_2)) - Float64(Float64(x1 * x1) * 6.0))) - Float64(3.0 * t_1)))))); else tmp = Float64(x1 - Float64(Float64(x1 * Float64(2.0 - Float64(x1 * Float64(Float64(x1 * 3.0) + 9.0)))) - Float64(x2 * -6.0))); end return tmp end
function tmp_2 = code(x1, x2) t_0 = (x1 * x1) + 1.0; t_1 = x1 * (x1 * 3.0); t_2 = ((t_1 + (2.0 * x2)) - x1) / t_0; t_3 = 3.0 * (((t_1 - (2.0 * x2)) - x1) / t_0); tmp = 0.0; if (x1 <= -1.32e+154) tmp = x1 + ((x2 * -6.0) - (x1 * (2.0 + (3.0 * (x1 * ((x2 * -2.0) - 3.0)))))); elseif (x1 <= -5.6e+102) tmp = x1 + (t_3 + (x1 + (x1 * (2.0 + (x1 * (3.0 + ((x2 * 8.0) - x1))))))); elseif (x1 <= 1e+101) tmp = x1 + (t_3 + (x1 + ((x1 * (x1 * x1)) - ((t_0 * (((t_2 * (x1 * 2.0)) * (3.0 - t_2)) - ((x1 * x1) * 6.0))) - (3.0 * t_1))))); else tmp = x1 - ((x1 * (2.0 - (x1 * ((x1 * 3.0) + 9.0)))) - (x2 * -6.0)); end tmp_2 = tmp; end
code[x1_, x2_] := Block[{t$95$0 = N[(N[(x1 * x1), $MachinePrecision] + 1.0), $MachinePrecision]}, Block[{t$95$1 = N[(x1 * N[(x1 * 3.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[(t$95$1 + N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$0), $MachinePrecision]}, Block[{t$95$3 = N[(3.0 * N[(N[(N[(t$95$1 - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x1, -1.32e+154], N[(x1 + N[(N[(x2 * -6.0), $MachinePrecision] - N[(x1 * N[(2.0 + N[(3.0 * N[(x1 * N[(N[(x2 * -2.0), $MachinePrecision] - 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, -5.6e+102], N[(x1 + N[(t$95$3 + N[(x1 + N[(x1 * N[(2.0 + N[(x1 * N[(3.0 + N[(N[(x2 * 8.0), $MachinePrecision] - x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 1e+101], N[(x1 + N[(t$95$3 + N[(x1 + N[(N[(x1 * N[(x1 * x1), $MachinePrecision]), $MachinePrecision] - N[(N[(t$95$0 * N[(N[(N[(t$95$2 * N[(x1 * 2.0), $MachinePrecision]), $MachinePrecision] * N[(3.0 - t$95$2), $MachinePrecision]), $MachinePrecision] - N[(N[(x1 * x1), $MachinePrecision] * 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(3.0 * t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x1 - N[(N[(x1 * N[(2.0 - N[(x1 * N[(N[(x1 * 3.0), $MachinePrecision] + 9.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(x2 * -6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x1 \cdot x1 + 1\\
t_1 := x1 \cdot \left(x1 \cdot 3\right)\\
t_2 := \frac{\left(t\_1 + 2 \cdot x2\right) - x1}{t\_0}\\
t_3 := 3 \cdot \frac{\left(t\_1 - 2 \cdot x2\right) - x1}{t\_0}\\
\mathbf{if}\;x1 \leq -1.32 \cdot 10^{+154}:\\
\;\;\;\;x1 + \left(x2 \cdot -6 - x1 \cdot \left(2 + 3 \cdot \left(x1 \cdot \left(x2 \cdot -2 - 3\right)\right)\right)\right)\\
\mathbf{elif}\;x1 \leq -5.6 \cdot 10^{+102}:\\
\;\;\;\;x1 + \left(t\_3 + \left(x1 + x1 \cdot \left(2 + x1 \cdot \left(3 + \left(x2 \cdot 8 - x1\right)\right)\right)\right)\right)\\
\mathbf{elif}\;x1 \leq 10^{+101}:\\
\;\;\;\;x1 + \left(t\_3 + \left(x1 + \left(x1 \cdot \left(x1 \cdot x1\right) - \left(t\_0 \cdot \left(\left(t\_2 \cdot \left(x1 \cdot 2\right)\right) \cdot \left(3 - t\_2\right) - \left(x1 \cdot x1\right) \cdot 6\right) - 3 \cdot t\_1\right)\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x1 - \left(x1 \cdot \left(2 - x1 \cdot \left(x1 \cdot 3 + 9\right)\right) - x2 \cdot -6\right)\\
\end{array}
\end{array}
if x1 < -1.31999999999999998e154Initial program 0.0%
Taylor expanded in x1 around inf 0.0%
Taylor expanded in x1 around 0 86.5%
if -1.31999999999999998e154 < x1 < -5.60000000000000037e102Initial program 0.0%
Taylor expanded in x1 around 0 0.0%
+-commutative0.0%
mul-1-neg0.0%
sub-neg0.0%
Simplified0.0%
Taylor expanded in x1 around inf 0.0%
Taylor expanded in x1 around inf 0.0%
*-commutative0.0%
Simplified0.0%
Taylor expanded in x1 around 0 83.3%
if -5.60000000000000037e102 < x1 < 9.9999999999999998e100Initial program 99.3%
Taylor expanded in x1 around inf 99.2%
Taylor expanded in x1 around inf 96.3%
if 9.9999999999999998e100 < x1 Initial program 29.3%
Taylor expanded in x1 around 0 8.4%
Taylor expanded in x1 around 0 90.2%
Taylor expanded in x2 around 0 97.6%
*-commutative97.6%
Simplified97.6%
Final simplification94.5%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (+ (* x1 x1) 1.0))
(t_1 (* x1 (* x1 x1)))
(t_2 (* x1 (- 2.0 (* x1 (+ (* x1 3.0) 9.0)))))
(t_3 (* x1 (* x1 3.0)))
(t_4 (* 3.0 t_3))
(t_5 (- (- t_3 (* 2.0 x2)) x1))
(t_6 (* 3.0 (/ t_5 t_0)))
(t_7 (- -1.0 (* x1 x1))))
(if (<= x1 -1.25e+154)
(+ x1 (- (* x2 -6.0) (* x1 (+ 2.0 (* 3.0 (* x1 (- (* x2 -2.0) 3.0)))))))
(if (<= x1 -5.6e+102)
(+ x1 (+ t_6 (+ x1 (* x1 (+ 2.0 (* x1 (+ 3.0 (- (* x2 8.0) x1))))))))
(if (<= x1 -680.0)
(+
x1
(+
t_6
(+
x1
(+
t_1
(+
t_4
(*
t_0
(+
(* x1 2.0)
(*
(* x1 x1)
(-
(* 4.0 (+ 3.0 (/ (- -1.0 (/ (- 3.0 (* 2.0 x2)) x1)) x1)))
6.0)))))))))
(if (<= x1 7.5e+25)
(+
x1
(-
(* x2 -6.0)
(+ t_2 (* x2 (- (* x1 (- 12.0 (* x1 6.0))) (* 8.0 (* x1 x2)))))))
(if (<= x1 5e+102)
(-
x1
(+
(* 3.0 (/ t_5 t_7))
(-
(-
(-
(*
t_0
(-
(*
(* x1 x1)
(+ 6.0 (* 4.0 (/ (- (+ t_3 (* 2.0 x2)) x1) t_7))))
(* x1 2.0)))
t_4)
t_1)
x1)))
(- x1 (- t_2 (* x2 -6.0))))))))))
double code(double x1, double x2) {
double t_0 = (x1 * x1) + 1.0;
double t_1 = x1 * (x1 * x1);
double t_2 = x1 * (2.0 - (x1 * ((x1 * 3.0) + 9.0)));
double t_3 = x1 * (x1 * 3.0);
double t_4 = 3.0 * t_3;
double t_5 = (t_3 - (2.0 * x2)) - x1;
double t_6 = 3.0 * (t_5 / t_0);
double t_7 = -1.0 - (x1 * x1);
double tmp;
if (x1 <= -1.25e+154) {
tmp = x1 + ((x2 * -6.0) - (x1 * (2.0 + (3.0 * (x1 * ((x2 * -2.0) - 3.0))))));
} else if (x1 <= -5.6e+102) {
tmp = x1 + (t_6 + (x1 + (x1 * (2.0 + (x1 * (3.0 + ((x2 * 8.0) - x1)))))));
} else if (x1 <= -680.0) {
tmp = x1 + (t_6 + (x1 + (t_1 + (t_4 + (t_0 * ((x1 * 2.0) + ((x1 * x1) * ((4.0 * (3.0 + ((-1.0 - ((3.0 - (2.0 * x2)) / x1)) / x1))) - 6.0))))))));
} else if (x1 <= 7.5e+25) {
tmp = x1 + ((x2 * -6.0) - (t_2 + (x2 * ((x1 * (12.0 - (x1 * 6.0))) - (8.0 * (x1 * x2))))));
} else if (x1 <= 5e+102) {
tmp = x1 - ((3.0 * (t_5 / t_7)) + ((((t_0 * (((x1 * x1) * (6.0 + (4.0 * (((t_3 + (2.0 * x2)) - x1) / t_7)))) - (x1 * 2.0))) - t_4) - t_1) - x1));
} else {
tmp = x1 - (t_2 - (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) :: t_1
real(8) :: t_2
real(8) :: t_3
real(8) :: t_4
real(8) :: t_5
real(8) :: t_6
real(8) :: t_7
real(8) :: tmp
t_0 = (x1 * x1) + 1.0d0
t_1 = x1 * (x1 * x1)
t_2 = x1 * (2.0d0 - (x1 * ((x1 * 3.0d0) + 9.0d0)))
t_3 = x1 * (x1 * 3.0d0)
t_4 = 3.0d0 * t_3
t_5 = (t_3 - (2.0d0 * x2)) - x1
t_6 = 3.0d0 * (t_5 / t_0)
t_7 = (-1.0d0) - (x1 * x1)
if (x1 <= (-1.25d+154)) then
tmp = x1 + ((x2 * (-6.0d0)) - (x1 * (2.0d0 + (3.0d0 * (x1 * ((x2 * (-2.0d0)) - 3.0d0))))))
else if (x1 <= (-5.6d+102)) then
tmp = x1 + (t_6 + (x1 + (x1 * (2.0d0 + (x1 * (3.0d0 + ((x2 * 8.0d0) - x1)))))))
else if (x1 <= (-680.0d0)) then
tmp = x1 + (t_6 + (x1 + (t_1 + (t_4 + (t_0 * ((x1 * 2.0d0) + ((x1 * x1) * ((4.0d0 * (3.0d0 + (((-1.0d0) - ((3.0d0 - (2.0d0 * x2)) / x1)) / x1))) - 6.0d0))))))))
else if (x1 <= 7.5d+25) then
tmp = x1 + ((x2 * (-6.0d0)) - (t_2 + (x2 * ((x1 * (12.0d0 - (x1 * 6.0d0))) - (8.0d0 * (x1 * x2))))))
else if (x1 <= 5d+102) then
tmp = x1 - ((3.0d0 * (t_5 / t_7)) + ((((t_0 * (((x1 * x1) * (6.0d0 + (4.0d0 * (((t_3 + (2.0d0 * x2)) - x1) / t_7)))) - (x1 * 2.0d0))) - t_4) - t_1) - x1))
else
tmp = x1 - (t_2 - (x2 * (-6.0d0)))
end if
code = tmp
end function
public static double code(double x1, double x2) {
double t_0 = (x1 * x1) + 1.0;
double t_1 = x1 * (x1 * x1);
double t_2 = x1 * (2.0 - (x1 * ((x1 * 3.0) + 9.0)));
double t_3 = x1 * (x1 * 3.0);
double t_4 = 3.0 * t_3;
double t_5 = (t_3 - (2.0 * x2)) - x1;
double t_6 = 3.0 * (t_5 / t_0);
double t_7 = -1.0 - (x1 * x1);
double tmp;
if (x1 <= -1.25e+154) {
tmp = x1 + ((x2 * -6.0) - (x1 * (2.0 + (3.0 * (x1 * ((x2 * -2.0) - 3.0))))));
} else if (x1 <= -5.6e+102) {
tmp = x1 + (t_6 + (x1 + (x1 * (2.0 + (x1 * (3.0 + ((x2 * 8.0) - x1)))))));
} else if (x1 <= -680.0) {
tmp = x1 + (t_6 + (x1 + (t_1 + (t_4 + (t_0 * ((x1 * 2.0) + ((x1 * x1) * ((4.0 * (3.0 + ((-1.0 - ((3.0 - (2.0 * x2)) / x1)) / x1))) - 6.0))))))));
} else if (x1 <= 7.5e+25) {
tmp = x1 + ((x2 * -6.0) - (t_2 + (x2 * ((x1 * (12.0 - (x1 * 6.0))) - (8.0 * (x1 * x2))))));
} else if (x1 <= 5e+102) {
tmp = x1 - ((3.0 * (t_5 / t_7)) + ((((t_0 * (((x1 * x1) * (6.0 + (4.0 * (((t_3 + (2.0 * x2)) - x1) / t_7)))) - (x1 * 2.0))) - t_4) - t_1) - x1));
} else {
tmp = x1 - (t_2 - (x2 * -6.0));
}
return tmp;
}
def code(x1, x2): t_0 = (x1 * x1) + 1.0 t_1 = x1 * (x1 * x1) t_2 = x1 * (2.0 - (x1 * ((x1 * 3.0) + 9.0))) t_3 = x1 * (x1 * 3.0) t_4 = 3.0 * t_3 t_5 = (t_3 - (2.0 * x2)) - x1 t_6 = 3.0 * (t_5 / t_0) t_7 = -1.0 - (x1 * x1) tmp = 0 if x1 <= -1.25e+154: tmp = x1 + ((x2 * -6.0) - (x1 * (2.0 + (3.0 * (x1 * ((x2 * -2.0) - 3.0)))))) elif x1 <= -5.6e+102: tmp = x1 + (t_6 + (x1 + (x1 * (2.0 + (x1 * (3.0 + ((x2 * 8.0) - x1))))))) elif x1 <= -680.0: tmp = x1 + (t_6 + (x1 + (t_1 + (t_4 + (t_0 * ((x1 * 2.0) + ((x1 * x1) * ((4.0 * (3.0 + ((-1.0 - ((3.0 - (2.0 * x2)) / x1)) / x1))) - 6.0)))))))) elif x1 <= 7.5e+25: tmp = x1 + ((x2 * -6.0) - (t_2 + (x2 * ((x1 * (12.0 - (x1 * 6.0))) - (8.0 * (x1 * x2)))))) elif x1 <= 5e+102: tmp = x1 - ((3.0 * (t_5 / t_7)) + ((((t_0 * (((x1 * x1) * (6.0 + (4.0 * (((t_3 + (2.0 * x2)) - x1) / t_7)))) - (x1 * 2.0))) - t_4) - t_1) - x1)) else: tmp = x1 - (t_2 - (x2 * -6.0)) return tmp
function code(x1, x2) t_0 = Float64(Float64(x1 * x1) + 1.0) t_1 = Float64(x1 * Float64(x1 * x1)) t_2 = Float64(x1 * Float64(2.0 - Float64(x1 * Float64(Float64(x1 * 3.0) + 9.0)))) t_3 = Float64(x1 * Float64(x1 * 3.0)) t_4 = Float64(3.0 * t_3) t_5 = Float64(Float64(t_3 - Float64(2.0 * x2)) - x1) t_6 = Float64(3.0 * Float64(t_5 / t_0)) t_7 = Float64(-1.0 - Float64(x1 * x1)) tmp = 0.0 if (x1 <= -1.25e+154) tmp = Float64(x1 + Float64(Float64(x2 * -6.0) - Float64(x1 * Float64(2.0 + Float64(3.0 * Float64(x1 * Float64(Float64(x2 * -2.0) - 3.0))))))); elseif (x1 <= -5.6e+102) tmp = Float64(x1 + Float64(t_6 + Float64(x1 + Float64(x1 * Float64(2.0 + Float64(x1 * Float64(3.0 + Float64(Float64(x2 * 8.0) - x1)))))))); elseif (x1 <= -680.0) tmp = Float64(x1 + Float64(t_6 + Float64(x1 + Float64(t_1 + Float64(t_4 + Float64(t_0 * Float64(Float64(x1 * 2.0) + Float64(Float64(x1 * x1) * Float64(Float64(4.0 * Float64(3.0 + Float64(Float64(-1.0 - Float64(Float64(3.0 - Float64(2.0 * x2)) / x1)) / x1))) - 6.0))))))))); elseif (x1 <= 7.5e+25) tmp = Float64(x1 + Float64(Float64(x2 * -6.0) - Float64(t_2 + Float64(x2 * Float64(Float64(x1 * Float64(12.0 - Float64(x1 * 6.0))) - Float64(8.0 * Float64(x1 * x2))))))); elseif (x1 <= 5e+102) tmp = Float64(x1 - Float64(Float64(3.0 * Float64(t_5 / t_7)) + Float64(Float64(Float64(Float64(t_0 * Float64(Float64(Float64(x1 * x1) * Float64(6.0 + Float64(4.0 * Float64(Float64(Float64(t_3 + Float64(2.0 * x2)) - x1) / t_7)))) - Float64(x1 * 2.0))) - t_4) - t_1) - x1))); else tmp = Float64(x1 - Float64(t_2 - Float64(x2 * -6.0))); end return tmp end
function tmp_2 = code(x1, x2) t_0 = (x1 * x1) + 1.0; t_1 = x1 * (x1 * x1); t_2 = x1 * (2.0 - (x1 * ((x1 * 3.0) + 9.0))); t_3 = x1 * (x1 * 3.0); t_4 = 3.0 * t_3; t_5 = (t_3 - (2.0 * x2)) - x1; t_6 = 3.0 * (t_5 / t_0); t_7 = -1.0 - (x1 * x1); tmp = 0.0; if (x1 <= -1.25e+154) tmp = x1 + ((x2 * -6.0) - (x1 * (2.0 + (3.0 * (x1 * ((x2 * -2.0) - 3.0)))))); elseif (x1 <= -5.6e+102) tmp = x1 + (t_6 + (x1 + (x1 * (2.0 + (x1 * (3.0 + ((x2 * 8.0) - x1))))))); elseif (x1 <= -680.0) tmp = x1 + (t_6 + (x1 + (t_1 + (t_4 + (t_0 * ((x1 * 2.0) + ((x1 * x1) * ((4.0 * (3.0 + ((-1.0 - ((3.0 - (2.0 * x2)) / x1)) / x1))) - 6.0)))))))); elseif (x1 <= 7.5e+25) tmp = x1 + ((x2 * -6.0) - (t_2 + (x2 * ((x1 * (12.0 - (x1 * 6.0))) - (8.0 * (x1 * x2)))))); elseif (x1 <= 5e+102) tmp = x1 - ((3.0 * (t_5 / t_7)) + ((((t_0 * (((x1 * x1) * (6.0 + (4.0 * (((t_3 + (2.0 * x2)) - x1) / t_7)))) - (x1 * 2.0))) - t_4) - t_1) - x1)); else tmp = x1 - (t_2 - (x2 * -6.0)); end tmp_2 = tmp; end
code[x1_, x2_] := Block[{t$95$0 = N[(N[(x1 * x1), $MachinePrecision] + 1.0), $MachinePrecision]}, Block[{t$95$1 = N[(x1 * N[(x1 * x1), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x1 * N[(2.0 - N[(x1 * N[(N[(x1 * 3.0), $MachinePrecision] + 9.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(x1 * N[(x1 * 3.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[(3.0 * t$95$3), $MachinePrecision]}, Block[{t$95$5 = N[(N[(t$95$3 - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision]}, Block[{t$95$6 = N[(3.0 * N[(t$95$5 / t$95$0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$7 = N[(-1.0 - N[(x1 * x1), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x1, -1.25e+154], N[(x1 + N[(N[(x2 * -6.0), $MachinePrecision] - N[(x1 * N[(2.0 + N[(3.0 * N[(x1 * N[(N[(x2 * -2.0), $MachinePrecision] - 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, -5.6e+102], N[(x1 + N[(t$95$6 + N[(x1 + N[(x1 * N[(2.0 + N[(x1 * N[(3.0 + N[(N[(x2 * 8.0), $MachinePrecision] - x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, -680.0], N[(x1 + N[(t$95$6 + N[(x1 + N[(t$95$1 + N[(t$95$4 + N[(t$95$0 * N[(N[(x1 * 2.0), $MachinePrecision] + N[(N[(x1 * x1), $MachinePrecision] * N[(N[(4.0 * N[(3.0 + N[(N[(-1.0 - N[(N[(3.0 - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] / x1), $MachinePrecision]), $MachinePrecision] / x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 7.5e+25], N[(x1 + N[(N[(x2 * -6.0), $MachinePrecision] - N[(t$95$2 + N[(x2 * N[(N[(x1 * N[(12.0 - N[(x1 * 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(8.0 * N[(x1 * x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 5e+102], N[(x1 - N[(N[(3.0 * N[(t$95$5 / t$95$7), $MachinePrecision]), $MachinePrecision] + N[(N[(N[(N[(t$95$0 * N[(N[(N[(x1 * x1), $MachinePrecision] * N[(6.0 + N[(4.0 * N[(N[(N[(t$95$3 + N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$7), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(x1 * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$4), $MachinePrecision] - t$95$1), $MachinePrecision] - x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x1 - N[(t$95$2 - N[(x2 * -6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x1 \cdot x1 + 1\\
t_1 := x1 \cdot \left(x1 \cdot x1\right)\\
t_2 := x1 \cdot \left(2 - x1 \cdot \left(x1 \cdot 3 + 9\right)\right)\\
t_3 := x1 \cdot \left(x1 \cdot 3\right)\\
t_4 := 3 \cdot t\_3\\
t_5 := \left(t\_3 - 2 \cdot x2\right) - x1\\
t_6 := 3 \cdot \frac{t\_5}{t\_0}\\
t_7 := -1 - x1 \cdot x1\\
\mathbf{if}\;x1 \leq -1.25 \cdot 10^{+154}:\\
\;\;\;\;x1 + \left(x2 \cdot -6 - x1 \cdot \left(2 + 3 \cdot \left(x1 \cdot \left(x2 \cdot -2 - 3\right)\right)\right)\right)\\
\mathbf{elif}\;x1 \leq -5.6 \cdot 10^{+102}:\\
\;\;\;\;x1 + \left(t\_6 + \left(x1 + x1 \cdot \left(2 + x1 \cdot \left(3 + \left(x2 \cdot 8 - x1\right)\right)\right)\right)\right)\\
\mathbf{elif}\;x1 \leq -680:\\
\;\;\;\;x1 + \left(t\_6 + \left(x1 + \left(t\_1 + \left(t\_4 + t\_0 \cdot \left(x1 \cdot 2 + \left(x1 \cdot x1\right) \cdot \left(4 \cdot \left(3 + \frac{-1 - \frac{3 - 2 \cdot x2}{x1}}{x1}\right) - 6\right)\right)\right)\right)\right)\right)\\
\mathbf{elif}\;x1 \leq 7.5 \cdot 10^{+25}:\\
\;\;\;\;x1 + \left(x2 \cdot -6 - \left(t\_2 + x2 \cdot \left(x1 \cdot \left(12 - x1 \cdot 6\right) - 8 \cdot \left(x1 \cdot x2\right)\right)\right)\right)\\
\mathbf{elif}\;x1 \leq 5 \cdot 10^{+102}:\\
\;\;\;\;x1 - \left(3 \cdot \frac{t\_5}{t\_7} + \left(\left(\left(t\_0 \cdot \left(\left(x1 \cdot x1\right) \cdot \left(6 + 4 \cdot \frac{\left(t\_3 + 2 \cdot x2\right) - x1}{t\_7}\right) - x1 \cdot 2\right) - t\_4\right) - t\_1\right) - x1\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x1 - \left(t\_2 - x2 \cdot -6\right)\\
\end{array}
\end{array}
if x1 < -1.25000000000000001e154Initial program 0.0%
Taylor expanded in x1 around inf 0.0%
Taylor expanded in x1 around 0 86.5%
if -1.25000000000000001e154 < x1 < -5.60000000000000037e102Initial program 0.0%
Taylor expanded in x1 around 0 0.0%
+-commutative0.0%
mul-1-neg0.0%
sub-neg0.0%
Simplified0.0%
Taylor expanded in x1 around inf 0.0%
Taylor expanded in x1 around inf 0.0%
*-commutative0.0%
Simplified0.0%
Taylor expanded in x1 around 0 83.3%
if -5.60000000000000037e102 < x1 < -680Initial program 99.3%
Taylor expanded in x1 around 0 82.6%
+-commutative82.6%
mul-1-neg82.6%
sub-neg82.6%
Simplified82.6%
Taylor expanded in x1 around inf 82.6%
Taylor expanded in x1 around inf 84.3%
*-commutative84.3%
Simplified84.3%
Taylor expanded in x1 around -inf 84.4%
if -680 < x1 < 7.49999999999999993e25Initial program 99.3%
Taylor expanded in x1 around 0 87.1%
Taylor expanded in x1 around 0 87.5%
Taylor expanded in x2 around 0 98.5%
if 7.49999999999999993e25 < x1 < 5e102Initial program 99.4%
Taylor expanded in x1 around 0 85.6%
+-commutative85.6%
mul-1-neg85.6%
sub-neg85.6%
Simplified85.6%
Taylor expanded in x1 around inf 85.6%
Taylor expanded in x1 around inf 87.3%
*-commutative87.3%
Simplified87.3%
if 5e102 < x1 Initial program 29.3%
Taylor expanded in x1 around 0 8.4%
Taylor expanded in x1 around 0 90.2%
Taylor expanded in x2 around 0 97.6%
*-commutative97.6%
Simplified97.6%
Final simplification94.0%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (+ (* x1 x1) 1.0))
(t_1 (* x1 (* x1 3.0)))
(t_2 (- (- t_1 (* 2.0 x2)) x1)))
(if (<= x1 -1.32e+154)
(+ x1 (- (* x2 -6.0) (* x1 (+ 2.0 (* 3.0 (* x1 (- (* x2 -2.0) 3.0)))))))
(if (<= x1 -5.6e+102)
(+
x1
(+
(* 3.0 (/ t_2 t_0))
(+ x1 (* x1 (+ 2.0 (* x1 (+ 3.0 (- (* x2 8.0) x1))))))))
(if (<= x1 4e+102)
(-
x1
(+
(* 3.0 (/ t_2 (- -1.0 (* x1 x1))))
(-
(-
(-
(*
t_0
(-
(*
(- (/ (- (+ t_1 (* 2.0 x2)) x1) t_0) 3.0)
(* (* x1 2.0) (- x1 (* 2.0 x2))))
(* (* x1 x1) 6.0)))
(* 3.0 t_1))
(* x1 (* x1 x1)))
x1)))
(- x1 (- (* x1 (- 2.0 (* x1 (+ (* x1 3.0) 9.0)))) (* x2 -6.0))))))))
double code(double x1, double x2) {
double t_0 = (x1 * x1) + 1.0;
double t_1 = x1 * (x1 * 3.0);
double t_2 = (t_1 - (2.0 * x2)) - x1;
double tmp;
if (x1 <= -1.32e+154) {
tmp = x1 + ((x2 * -6.0) - (x1 * (2.0 + (3.0 * (x1 * ((x2 * -2.0) - 3.0))))));
} else if (x1 <= -5.6e+102) {
tmp = x1 + ((3.0 * (t_2 / t_0)) + (x1 + (x1 * (2.0 + (x1 * (3.0 + ((x2 * 8.0) - x1)))))));
} else if (x1 <= 4e+102) {
tmp = x1 - ((3.0 * (t_2 / (-1.0 - (x1 * x1)))) + ((((t_0 * ((((((t_1 + (2.0 * x2)) - x1) / t_0) - 3.0) * ((x1 * 2.0) * (x1 - (2.0 * x2)))) - ((x1 * x1) * 6.0))) - (3.0 * t_1)) - (x1 * (x1 * x1))) - x1));
} else {
tmp = x1 - ((x1 * (2.0 - (x1 * ((x1 * 3.0) + 9.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) :: t_1
real(8) :: t_2
real(8) :: tmp
t_0 = (x1 * x1) + 1.0d0
t_1 = x1 * (x1 * 3.0d0)
t_2 = (t_1 - (2.0d0 * x2)) - x1
if (x1 <= (-1.32d+154)) then
tmp = x1 + ((x2 * (-6.0d0)) - (x1 * (2.0d0 + (3.0d0 * (x1 * ((x2 * (-2.0d0)) - 3.0d0))))))
else if (x1 <= (-5.6d+102)) then
tmp = x1 + ((3.0d0 * (t_2 / t_0)) + (x1 + (x1 * (2.0d0 + (x1 * (3.0d0 + ((x2 * 8.0d0) - x1)))))))
else if (x1 <= 4d+102) then
tmp = x1 - ((3.0d0 * (t_2 / ((-1.0d0) - (x1 * x1)))) + ((((t_0 * ((((((t_1 + (2.0d0 * x2)) - x1) / t_0) - 3.0d0) * ((x1 * 2.0d0) * (x1 - (2.0d0 * x2)))) - ((x1 * x1) * 6.0d0))) - (3.0d0 * t_1)) - (x1 * (x1 * x1))) - x1))
else
tmp = x1 - ((x1 * (2.0d0 - (x1 * ((x1 * 3.0d0) + 9.0d0)))) - (x2 * (-6.0d0)))
end if
code = tmp
end function
public static double code(double x1, double x2) {
double t_0 = (x1 * x1) + 1.0;
double t_1 = x1 * (x1 * 3.0);
double t_2 = (t_1 - (2.0 * x2)) - x1;
double tmp;
if (x1 <= -1.32e+154) {
tmp = x1 + ((x2 * -6.0) - (x1 * (2.0 + (3.0 * (x1 * ((x2 * -2.0) - 3.0))))));
} else if (x1 <= -5.6e+102) {
tmp = x1 + ((3.0 * (t_2 / t_0)) + (x1 + (x1 * (2.0 + (x1 * (3.0 + ((x2 * 8.0) - x1)))))));
} else if (x1 <= 4e+102) {
tmp = x1 - ((3.0 * (t_2 / (-1.0 - (x1 * x1)))) + ((((t_0 * ((((((t_1 + (2.0 * x2)) - x1) / t_0) - 3.0) * ((x1 * 2.0) * (x1 - (2.0 * x2)))) - ((x1 * x1) * 6.0))) - (3.0 * t_1)) - (x1 * (x1 * x1))) - x1));
} else {
tmp = x1 - ((x1 * (2.0 - (x1 * ((x1 * 3.0) + 9.0)))) - (x2 * -6.0));
}
return tmp;
}
def code(x1, x2): t_0 = (x1 * x1) + 1.0 t_1 = x1 * (x1 * 3.0) t_2 = (t_1 - (2.0 * x2)) - x1 tmp = 0 if x1 <= -1.32e+154: tmp = x1 + ((x2 * -6.0) - (x1 * (2.0 + (3.0 * (x1 * ((x2 * -2.0) - 3.0)))))) elif x1 <= -5.6e+102: tmp = x1 + ((3.0 * (t_2 / t_0)) + (x1 + (x1 * (2.0 + (x1 * (3.0 + ((x2 * 8.0) - x1))))))) elif x1 <= 4e+102: tmp = x1 - ((3.0 * (t_2 / (-1.0 - (x1 * x1)))) + ((((t_0 * ((((((t_1 + (2.0 * x2)) - x1) / t_0) - 3.0) * ((x1 * 2.0) * (x1 - (2.0 * x2)))) - ((x1 * x1) * 6.0))) - (3.0 * t_1)) - (x1 * (x1 * x1))) - x1)) else: tmp = x1 - ((x1 * (2.0 - (x1 * ((x1 * 3.0) + 9.0)))) - (x2 * -6.0)) return tmp
function code(x1, x2) t_0 = Float64(Float64(x1 * x1) + 1.0) t_1 = Float64(x1 * Float64(x1 * 3.0)) t_2 = Float64(Float64(t_1 - Float64(2.0 * x2)) - x1) tmp = 0.0 if (x1 <= -1.32e+154) tmp = Float64(x1 + Float64(Float64(x2 * -6.0) - Float64(x1 * Float64(2.0 + Float64(3.0 * Float64(x1 * Float64(Float64(x2 * -2.0) - 3.0))))))); elseif (x1 <= -5.6e+102) tmp = Float64(x1 + Float64(Float64(3.0 * Float64(t_2 / t_0)) + Float64(x1 + Float64(x1 * Float64(2.0 + Float64(x1 * Float64(3.0 + Float64(Float64(x2 * 8.0) - x1)))))))); elseif (x1 <= 4e+102) tmp = Float64(x1 - Float64(Float64(3.0 * Float64(t_2 / Float64(-1.0 - Float64(x1 * x1)))) + Float64(Float64(Float64(Float64(t_0 * Float64(Float64(Float64(Float64(Float64(Float64(t_1 + Float64(2.0 * x2)) - x1) / t_0) - 3.0) * Float64(Float64(x1 * 2.0) * Float64(x1 - Float64(2.0 * x2)))) - Float64(Float64(x1 * x1) * 6.0))) - Float64(3.0 * t_1)) - Float64(x1 * Float64(x1 * x1))) - x1))); else tmp = Float64(x1 - Float64(Float64(x1 * Float64(2.0 - Float64(x1 * Float64(Float64(x1 * 3.0) + 9.0)))) - Float64(x2 * -6.0))); end return tmp end
function tmp_2 = code(x1, x2) t_0 = (x1 * x1) + 1.0; t_1 = x1 * (x1 * 3.0); t_2 = (t_1 - (2.0 * x2)) - x1; tmp = 0.0; if (x1 <= -1.32e+154) tmp = x1 + ((x2 * -6.0) - (x1 * (2.0 + (3.0 * (x1 * ((x2 * -2.0) - 3.0)))))); elseif (x1 <= -5.6e+102) tmp = x1 + ((3.0 * (t_2 / t_0)) + (x1 + (x1 * (2.0 + (x1 * (3.0 + ((x2 * 8.0) - x1))))))); elseif (x1 <= 4e+102) tmp = x1 - ((3.0 * (t_2 / (-1.0 - (x1 * x1)))) + ((((t_0 * ((((((t_1 + (2.0 * x2)) - x1) / t_0) - 3.0) * ((x1 * 2.0) * (x1 - (2.0 * x2)))) - ((x1 * x1) * 6.0))) - (3.0 * t_1)) - (x1 * (x1 * x1))) - x1)); else tmp = x1 - ((x1 * (2.0 - (x1 * ((x1 * 3.0) + 9.0)))) - (x2 * -6.0)); end tmp_2 = tmp; end
code[x1_, x2_] := Block[{t$95$0 = N[(N[(x1 * x1), $MachinePrecision] + 1.0), $MachinePrecision]}, Block[{t$95$1 = N[(x1 * N[(x1 * 3.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(t$95$1 - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision]}, If[LessEqual[x1, -1.32e+154], N[(x1 + N[(N[(x2 * -6.0), $MachinePrecision] - N[(x1 * N[(2.0 + N[(3.0 * N[(x1 * N[(N[(x2 * -2.0), $MachinePrecision] - 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, -5.6e+102], N[(x1 + N[(N[(3.0 * N[(t$95$2 / t$95$0), $MachinePrecision]), $MachinePrecision] + N[(x1 + N[(x1 * N[(2.0 + N[(x1 * N[(3.0 + N[(N[(x2 * 8.0), $MachinePrecision] - x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 4e+102], N[(x1 - N[(N[(3.0 * N[(t$95$2 / N[(-1.0 - N[(x1 * x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(N[(N[(t$95$0 * N[(N[(N[(N[(N[(N[(t$95$1 + N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$0), $MachinePrecision] - 3.0), $MachinePrecision] * N[(N[(x1 * 2.0), $MachinePrecision] * N[(x1 - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[(x1 * x1), $MachinePrecision] * 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(3.0 * t$95$1), $MachinePrecision]), $MachinePrecision] - N[(x1 * N[(x1 * x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x1 - N[(N[(x1 * N[(2.0 - N[(x1 * N[(N[(x1 * 3.0), $MachinePrecision] + 9.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(x2 * -6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x1 \cdot x1 + 1\\
t_1 := x1 \cdot \left(x1 \cdot 3\right)\\
t_2 := \left(t\_1 - 2 \cdot x2\right) - x1\\
\mathbf{if}\;x1 \leq -1.32 \cdot 10^{+154}:\\
\;\;\;\;x1 + \left(x2 \cdot -6 - x1 \cdot \left(2 + 3 \cdot \left(x1 \cdot \left(x2 \cdot -2 - 3\right)\right)\right)\right)\\
\mathbf{elif}\;x1 \leq -5.6 \cdot 10^{+102}:\\
\;\;\;\;x1 + \left(3 \cdot \frac{t\_2}{t\_0} + \left(x1 + x1 \cdot \left(2 + x1 \cdot \left(3 + \left(x2 \cdot 8 - x1\right)\right)\right)\right)\right)\\
\mathbf{elif}\;x1 \leq 4 \cdot 10^{+102}:\\
\;\;\;\;x1 - \left(3 \cdot \frac{t\_2}{-1 - x1 \cdot x1} + \left(\left(\left(t\_0 \cdot \left(\left(\frac{\left(t\_1 + 2 \cdot x2\right) - x1}{t\_0} - 3\right) \cdot \left(\left(x1 \cdot 2\right) \cdot \left(x1 - 2 \cdot x2\right)\right) - \left(x1 \cdot x1\right) \cdot 6\right) - 3 \cdot t\_1\right) - x1 \cdot \left(x1 \cdot x1\right)\right) - x1\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x1 - \left(x1 \cdot \left(2 - x1 \cdot \left(x1 \cdot 3 + 9\right)\right) - x2 \cdot -6\right)\\
\end{array}
\end{array}
if x1 < -1.31999999999999998e154Initial program 0.0%
Taylor expanded in x1 around inf 0.0%
Taylor expanded in x1 around 0 86.5%
if -1.31999999999999998e154 < x1 < -5.60000000000000037e102Initial program 0.0%
Taylor expanded in x1 around 0 0.0%
+-commutative0.0%
mul-1-neg0.0%
sub-neg0.0%
Simplified0.0%
Taylor expanded in x1 around inf 0.0%
Taylor expanded in x1 around inf 0.0%
*-commutative0.0%
Simplified0.0%
Taylor expanded in x1 around 0 83.3%
if -5.60000000000000037e102 < x1 < 3.99999999999999991e102Initial program 99.3%
Taylor expanded in x1 around 0 94.8%
+-commutative94.8%
mul-1-neg94.8%
sub-neg94.8%
Simplified94.8%
Taylor expanded in x1 around inf 94.6%
Taylor expanded in x1 around inf 94.6%
if 3.99999999999999991e102 < x1 Initial program 29.3%
Taylor expanded in x1 around 0 8.4%
Taylor expanded in x1 around 0 90.2%
Taylor expanded in x2 around 0 97.6%
*-commutative97.6%
Simplified97.6%
Final simplification93.3%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (+ (* x1 x1) 1.0))
(t_1 (* x1 (* x1 x1)))
(t_2 (* x1 (* x1 3.0)))
(t_3 (* 3.0 t_2))
(t_4 (* 3.0 (/ (- (- t_2 (* 2.0 x2)) x1) t_0)))
(t_5 (* x1 (- 2.0 (* x1 (+ (* x1 3.0) 9.0))))))
(if (<= x1 -1.32e+154)
(+ x1 (- (* x2 -6.0) (* x1 (+ 2.0 (* 3.0 (* x1 (- (* x2 -2.0) 3.0)))))))
(if (<= x1 -5.6e+102)
(+ x1 (+ t_4 (+ x1 (* x1 (+ 2.0 (* x1 (+ 3.0 (- (* x2 8.0) x1))))))))
(if (<= x1 -32500000.0)
(+
x1
(+
t_4
(+
x1
(+
t_1
(+
t_3
(*
t_0
(+
(* x1 2.0)
(*
(* x1 x1)
(-
(* 4.0 (+ 3.0 (/ (- -1.0 (/ (- 3.0 (* 2.0 x2)) x1)) x1)))
6.0)))))))))
(if (<= x1 7.2e+25)
(+
x1
(-
(* x2 -6.0)
(+ t_5 (* x2 (- (* x1 (- 12.0 (* x1 6.0))) (* 8.0 (* x1 x2)))))))
(if (<= x1 5e+102)
(-
x1
(-
(-
(-
(-
(*
t_0
(-
(*
(* x1 x1)
(+
6.0
(*
4.0
(/ (- (+ t_2 (* 2.0 x2)) x1) (- -1.0 (* x1 x1))))))
(* x1 2.0)))
t_3)
t_1)
x1)
(* 3.0 (* x2 -2.0))))
(- x1 (- t_5 (* x2 -6.0))))))))))
double code(double x1, double x2) {
double t_0 = (x1 * x1) + 1.0;
double t_1 = x1 * (x1 * x1);
double t_2 = x1 * (x1 * 3.0);
double t_3 = 3.0 * t_2;
double t_4 = 3.0 * (((t_2 - (2.0 * x2)) - x1) / t_0);
double t_5 = x1 * (2.0 - (x1 * ((x1 * 3.0) + 9.0)));
double tmp;
if (x1 <= -1.32e+154) {
tmp = x1 + ((x2 * -6.0) - (x1 * (2.0 + (3.0 * (x1 * ((x2 * -2.0) - 3.0))))));
} else if (x1 <= -5.6e+102) {
tmp = x1 + (t_4 + (x1 + (x1 * (2.0 + (x1 * (3.0 + ((x2 * 8.0) - x1)))))));
} else if (x1 <= -32500000.0) {
tmp = x1 + (t_4 + (x1 + (t_1 + (t_3 + (t_0 * ((x1 * 2.0) + ((x1 * x1) * ((4.0 * (3.0 + ((-1.0 - ((3.0 - (2.0 * x2)) / x1)) / x1))) - 6.0))))))));
} else if (x1 <= 7.2e+25) {
tmp = x1 + ((x2 * -6.0) - (t_5 + (x2 * ((x1 * (12.0 - (x1 * 6.0))) - (8.0 * (x1 * x2))))));
} else if (x1 <= 5e+102) {
tmp = x1 - (((((t_0 * (((x1 * x1) * (6.0 + (4.0 * (((t_2 + (2.0 * x2)) - x1) / (-1.0 - (x1 * x1)))))) - (x1 * 2.0))) - t_3) - t_1) - x1) - (3.0 * (x2 * -2.0)));
} else {
tmp = x1 - (t_5 - (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) :: t_1
real(8) :: t_2
real(8) :: t_3
real(8) :: t_4
real(8) :: t_5
real(8) :: tmp
t_0 = (x1 * x1) + 1.0d0
t_1 = x1 * (x1 * x1)
t_2 = x1 * (x1 * 3.0d0)
t_3 = 3.0d0 * t_2
t_4 = 3.0d0 * (((t_2 - (2.0d0 * x2)) - x1) / t_0)
t_5 = x1 * (2.0d0 - (x1 * ((x1 * 3.0d0) + 9.0d0)))
if (x1 <= (-1.32d+154)) then
tmp = x1 + ((x2 * (-6.0d0)) - (x1 * (2.0d0 + (3.0d0 * (x1 * ((x2 * (-2.0d0)) - 3.0d0))))))
else if (x1 <= (-5.6d+102)) then
tmp = x1 + (t_4 + (x1 + (x1 * (2.0d0 + (x1 * (3.0d0 + ((x2 * 8.0d0) - x1)))))))
else if (x1 <= (-32500000.0d0)) then
tmp = x1 + (t_4 + (x1 + (t_1 + (t_3 + (t_0 * ((x1 * 2.0d0) + ((x1 * x1) * ((4.0d0 * (3.0d0 + (((-1.0d0) - ((3.0d0 - (2.0d0 * x2)) / x1)) / x1))) - 6.0d0))))))))
else if (x1 <= 7.2d+25) then
tmp = x1 + ((x2 * (-6.0d0)) - (t_5 + (x2 * ((x1 * (12.0d0 - (x1 * 6.0d0))) - (8.0d0 * (x1 * x2))))))
else if (x1 <= 5d+102) then
tmp = x1 - (((((t_0 * (((x1 * x1) * (6.0d0 + (4.0d0 * (((t_2 + (2.0d0 * x2)) - x1) / ((-1.0d0) - (x1 * x1)))))) - (x1 * 2.0d0))) - t_3) - t_1) - x1) - (3.0d0 * (x2 * (-2.0d0))))
else
tmp = x1 - (t_5 - (x2 * (-6.0d0)))
end if
code = tmp
end function
public static double code(double x1, double x2) {
double t_0 = (x1 * x1) + 1.0;
double t_1 = x1 * (x1 * x1);
double t_2 = x1 * (x1 * 3.0);
double t_3 = 3.0 * t_2;
double t_4 = 3.0 * (((t_2 - (2.0 * x2)) - x1) / t_0);
double t_5 = x1 * (2.0 - (x1 * ((x1 * 3.0) + 9.0)));
double tmp;
if (x1 <= -1.32e+154) {
tmp = x1 + ((x2 * -6.0) - (x1 * (2.0 + (3.0 * (x1 * ((x2 * -2.0) - 3.0))))));
} else if (x1 <= -5.6e+102) {
tmp = x1 + (t_4 + (x1 + (x1 * (2.0 + (x1 * (3.0 + ((x2 * 8.0) - x1)))))));
} else if (x1 <= -32500000.0) {
tmp = x1 + (t_4 + (x1 + (t_1 + (t_3 + (t_0 * ((x1 * 2.0) + ((x1 * x1) * ((4.0 * (3.0 + ((-1.0 - ((3.0 - (2.0 * x2)) / x1)) / x1))) - 6.0))))))));
} else if (x1 <= 7.2e+25) {
tmp = x1 + ((x2 * -6.0) - (t_5 + (x2 * ((x1 * (12.0 - (x1 * 6.0))) - (8.0 * (x1 * x2))))));
} else if (x1 <= 5e+102) {
tmp = x1 - (((((t_0 * (((x1 * x1) * (6.0 + (4.0 * (((t_2 + (2.0 * x2)) - x1) / (-1.0 - (x1 * x1)))))) - (x1 * 2.0))) - t_3) - t_1) - x1) - (3.0 * (x2 * -2.0)));
} else {
tmp = x1 - (t_5 - (x2 * -6.0));
}
return tmp;
}
def code(x1, x2): t_0 = (x1 * x1) + 1.0 t_1 = x1 * (x1 * x1) t_2 = x1 * (x1 * 3.0) t_3 = 3.0 * t_2 t_4 = 3.0 * (((t_2 - (2.0 * x2)) - x1) / t_0) t_5 = x1 * (2.0 - (x1 * ((x1 * 3.0) + 9.0))) tmp = 0 if x1 <= -1.32e+154: tmp = x1 + ((x2 * -6.0) - (x1 * (2.0 + (3.0 * (x1 * ((x2 * -2.0) - 3.0)))))) elif x1 <= -5.6e+102: tmp = x1 + (t_4 + (x1 + (x1 * (2.0 + (x1 * (3.0 + ((x2 * 8.0) - x1))))))) elif x1 <= -32500000.0: tmp = x1 + (t_4 + (x1 + (t_1 + (t_3 + (t_0 * ((x1 * 2.0) + ((x1 * x1) * ((4.0 * (3.0 + ((-1.0 - ((3.0 - (2.0 * x2)) / x1)) / x1))) - 6.0)))))))) elif x1 <= 7.2e+25: tmp = x1 + ((x2 * -6.0) - (t_5 + (x2 * ((x1 * (12.0 - (x1 * 6.0))) - (8.0 * (x1 * x2)))))) elif x1 <= 5e+102: tmp = x1 - (((((t_0 * (((x1 * x1) * (6.0 + (4.0 * (((t_2 + (2.0 * x2)) - x1) / (-1.0 - (x1 * x1)))))) - (x1 * 2.0))) - t_3) - t_1) - x1) - (3.0 * (x2 * -2.0))) else: tmp = x1 - (t_5 - (x2 * -6.0)) return tmp
function code(x1, x2) t_0 = Float64(Float64(x1 * x1) + 1.0) t_1 = Float64(x1 * Float64(x1 * x1)) t_2 = Float64(x1 * Float64(x1 * 3.0)) t_3 = Float64(3.0 * t_2) t_4 = Float64(3.0 * Float64(Float64(Float64(t_2 - Float64(2.0 * x2)) - x1) / t_0)) t_5 = Float64(x1 * Float64(2.0 - Float64(x1 * Float64(Float64(x1 * 3.0) + 9.0)))) tmp = 0.0 if (x1 <= -1.32e+154) tmp = Float64(x1 + Float64(Float64(x2 * -6.0) - Float64(x1 * Float64(2.0 + Float64(3.0 * Float64(x1 * Float64(Float64(x2 * -2.0) - 3.0))))))); elseif (x1 <= -5.6e+102) tmp = Float64(x1 + Float64(t_4 + Float64(x1 + Float64(x1 * Float64(2.0 + Float64(x1 * Float64(3.0 + Float64(Float64(x2 * 8.0) - x1)))))))); elseif (x1 <= -32500000.0) tmp = Float64(x1 + Float64(t_4 + Float64(x1 + Float64(t_1 + Float64(t_3 + Float64(t_0 * Float64(Float64(x1 * 2.0) + Float64(Float64(x1 * x1) * Float64(Float64(4.0 * Float64(3.0 + Float64(Float64(-1.0 - Float64(Float64(3.0 - Float64(2.0 * x2)) / x1)) / x1))) - 6.0))))))))); elseif (x1 <= 7.2e+25) tmp = Float64(x1 + Float64(Float64(x2 * -6.0) - Float64(t_5 + Float64(x2 * Float64(Float64(x1 * Float64(12.0 - Float64(x1 * 6.0))) - Float64(8.0 * Float64(x1 * x2))))))); elseif (x1 <= 5e+102) tmp = Float64(x1 - Float64(Float64(Float64(Float64(Float64(t_0 * Float64(Float64(Float64(x1 * x1) * Float64(6.0 + Float64(4.0 * Float64(Float64(Float64(t_2 + Float64(2.0 * x2)) - x1) / Float64(-1.0 - Float64(x1 * x1)))))) - Float64(x1 * 2.0))) - t_3) - t_1) - x1) - Float64(3.0 * Float64(x2 * -2.0)))); else tmp = Float64(x1 - Float64(t_5 - Float64(x2 * -6.0))); end return tmp end
function tmp_2 = code(x1, x2) t_0 = (x1 * x1) + 1.0; t_1 = x1 * (x1 * x1); t_2 = x1 * (x1 * 3.0); t_3 = 3.0 * t_2; t_4 = 3.0 * (((t_2 - (2.0 * x2)) - x1) / t_0); t_5 = x1 * (2.0 - (x1 * ((x1 * 3.0) + 9.0))); tmp = 0.0; if (x1 <= -1.32e+154) tmp = x1 + ((x2 * -6.0) - (x1 * (2.0 + (3.0 * (x1 * ((x2 * -2.0) - 3.0)))))); elseif (x1 <= -5.6e+102) tmp = x1 + (t_4 + (x1 + (x1 * (2.0 + (x1 * (3.0 + ((x2 * 8.0) - x1))))))); elseif (x1 <= -32500000.0) tmp = x1 + (t_4 + (x1 + (t_1 + (t_3 + (t_0 * ((x1 * 2.0) + ((x1 * x1) * ((4.0 * (3.0 + ((-1.0 - ((3.0 - (2.0 * x2)) / x1)) / x1))) - 6.0)))))))); elseif (x1 <= 7.2e+25) tmp = x1 + ((x2 * -6.0) - (t_5 + (x2 * ((x1 * (12.0 - (x1 * 6.0))) - (8.0 * (x1 * x2)))))); elseif (x1 <= 5e+102) tmp = x1 - (((((t_0 * (((x1 * x1) * (6.0 + (4.0 * (((t_2 + (2.0 * x2)) - x1) / (-1.0 - (x1 * x1)))))) - (x1 * 2.0))) - t_3) - t_1) - x1) - (3.0 * (x2 * -2.0))); else tmp = x1 - (t_5 - (x2 * -6.0)); end tmp_2 = tmp; end
code[x1_, x2_] := Block[{t$95$0 = N[(N[(x1 * x1), $MachinePrecision] + 1.0), $MachinePrecision]}, Block[{t$95$1 = N[(x1 * N[(x1 * x1), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x1 * N[(x1 * 3.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(3.0 * t$95$2), $MachinePrecision]}, Block[{t$95$4 = N[(3.0 * N[(N[(N[(t$95$2 - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$5 = N[(x1 * N[(2.0 - N[(x1 * N[(N[(x1 * 3.0), $MachinePrecision] + 9.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x1, -1.32e+154], N[(x1 + N[(N[(x2 * -6.0), $MachinePrecision] - N[(x1 * N[(2.0 + N[(3.0 * N[(x1 * N[(N[(x2 * -2.0), $MachinePrecision] - 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, -5.6e+102], N[(x1 + N[(t$95$4 + N[(x1 + N[(x1 * N[(2.0 + N[(x1 * N[(3.0 + N[(N[(x2 * 8.0), $MachinePrecision] - x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, -32500000.0], N[(x1 + N[(t$95$4 + N[(x1 + N[(t$95$1 + N[(t$95$3 + N[(t$95$0 * N[(N[(x1 * 2.0), $MachinePrecision] + N[(N[(x1 * x1), $MachinePrecision] * N[(N[(4.0 * N[(3.0 + N[(N[(-1.0 - N[(N[(3.0 - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] / x1), $MachinePrecision]), $MachinePrecision] / x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 7.2e+25], N[(x1 + N[(N[(x2 * -6.0), $MachinePrecision] - N[(t$95$5 + N[(x2 * N[(N[(x1 * N[(12.0 - N[(x1 * 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(8.0 * N[(x1 * x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 5e+102], N[(x1 - N[(N[(N[(N[(N[(t$95$0 * N[(N[(N[(x1 * x1), $MachinePrecision] * N[(6.0 + N[(4.0 * N[(N[(N[(t$95$2 + N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / N[(-1.0 - N[(x1 * x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(x1 * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$3), $MachinePrecision] - t$95$1), $MachinePrecision] - x1), $MachinePrecision] - N[(3.0 * N[(x2 * -2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x1 - N[(t$95$5 - N[(x2 * -6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x1 \cdot x1 + 1\\
t_1 := x1 \cdot \left(x1 \cdot x1\right)\\
t_2 := x1 \cdot \left(x1 \cdot 3\right)\\
t_3 := 3 \cdot t\_2\\
t_4 := 3 \cdot \frac{\left(t\_2 - 2 \cdot x2\right) - x1}{t\_0}\\
t_5 := x1 \cdot \left(2 - x1 \cdot \left(x1 \cdot 3 + 9\right)\right)\\
\mathbf{if}\;x1 \leq -1.32 \cdot 10^{+154}:\\
\;\;\;\;x1 + \left(x2 \cdot -6 - x1 \cdot \left(2 + 3 \cdot \left(x1 \cdot \left(x2 \cdot -2 - 3\right)\right)\right)\right)\\
\mathbf{elif}\;x1 \leq -5.6 \cdot 10^{+102}:\\
\;\;\;\;x1 + \left(t\_4 + \left(x1 + x1 \cdot \left(2 + x1 \cdot \left(3 + \left(x2 \cdot 8 - x1\right)\right)\right)\right)\right)\\
\mathbf{elif}\;x1 \leq -32500000:\\
\;\;\;\;x1 + \left(t\_4 + \left(x1 + \left(t\_1 + \left(t\_3 + t\_0 \cdot \left(x1 \cdot 2 + \left(x1 \cdot x1\right) \cdot \left(4 \cdot \left(3 + \frac{-1 - \frac{3 - 2 \cdot x2}{x1}}{x1}\right) - 6\right)\right)\right)\right)\right)\right)\\
\mathbf{elif}\;x1 \leq 7.2 \cdot 10^{+25}:\\
\;\;\;\;x1 + \left(x2 \cdot -6 - \left(t\_5 + x2 \cdot \left(x1 \cdot \left(12 - x1 \cdot 6\right) - 8 \cdot \left(x1 \cdot x2\right)\right)\right)\right)\\
\mathbf{elif}\;x1 \leq 5 \cdot 10^{+102}:\\
\;\;\;\;x1 - \left(\left(\left(\left(t\_0 \cdot \left(\left(x1 \cdot x1\right) \cdot \left(6 + 4 \cdot \frac{\left(t\_2 + 2 \cdot x2\right) - x1}{-1 - x1 \cdot x1}\right) - x1 \cdot 2\right) - t\_3\right) - t\_1\right) - x1\right) - 3 \cdot \left(x2 \cdot -2\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x1 - \left(t\_5 - x2 \cdot -6\right)\\
\end{array}
\end{array}
if x1 < -1.31999999999999998e154Initial program 0.0%
Taylor expanded in x1 around inf 0.0%
Taylor expanded in x1 around 0 86.5%
if -1.31999999999999998e154 < x1 < -5.60000000000000037e102Initial program 0.0%
Taylor expanded in x1 around 0 0.0%
+-commutative0.0%
mul-1-neg0.0%
sub-neg0.0%
Simplified0.0%
Taylor expanded in x1 around inf 0.0%
Taylor expanded in x1 around inf 0.0%
*-commutative0.0%
Simplified0.0%
Taylor expanded in x1 around 0 83.3%
if -5.60000000000000037e102 < x1 < -3.25e7Initial program 99.3%
Taylor expanded in x1 around 0 82.6%
+-commutative82.6%
mul-1-neg82.6%
sub-neg82.6%
Simplified82.6%
Taylor expanded in x1 around inf 82.6%
Taylor expanded in x1 around inf 84.3%
*-commutative84.3%
Simplified84.3%
Taylor expanded in x1 around -inf 84.4%
if -3.25e7 < x1 < 7.20000000000000031e25Initial program 99.3%
Taylor expanded in x1 around 0 87.1%
Taylor expanded in x1 around 0 87.5%
Taylor expanded in x2 around 0 98.5%
if 7.20000000000000031e25 < x1 < 5e102Initial program 99.4%
Taylor expanded in x1 around 0 85.6%
+-commutative85.6%
mul-1-neg85.6%
sub-neg85.6%
Simplified85.6%
Taylor expanded in x1 around inf 85.6%
Taylor expanded in x1 around inf 87.3%
*-commutative87.3%
Simplified87.3%
Taylor expanded in x1 around 0 87.3%
*-commutative78.6%
Simplified87.3%
if 5e102 < x1 Initial program 29.3%
Taylor expanded in x1 around 0 8.4%
Taylor expanded in x1 around 0 90.2%
Taylor expanded in x2 around 0 97.6%
*-commutative97.6%
Simplified97.6%
Final simplification94.0%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (+ (* x1 x1) 1.0))
(t_1 (* x1 (- 2.0 (* x1 (+ (* x1 3.0) 9.0)))))
(t_2 (* x1 (* x1 3.0)))
(t_3
(-
x1
(-
(-
(-
(-
(*
t_0
(-
(*
(* x1 x1)
(+
6.0
(* 4.0 (/ (- (+ t_2 (* 2.0 x2)) x1) (- -1.0 (* x1 x1))))))
(* x1 2.0)))
(* 3.0 t_2))
(* x1 (* x1 x1)))
x1)
(* 3.0 (* x2 -2.0))))))
(if (<= x1 -1.1e+154)
(+ x1 (- (* x2 -6.0) (* x1 (+ 2.0 (* 3.0 (* x1 (- (* x2 -2.0) 3.0)))))))
(if (<= x1 -5.6e+102)
(+
x1
(+
(* 3.0 (/ (- (- t_2 (* 2.0 x2)) x1) t_0))
(+ x1 (* x1 (+ 2.0 (* x1 (+ 3.0 (- (* x2 8.0) x1))))))))
(if (<= x1 -14600.0)
t_3
(if (<= x1 7.2e+25)
(+
x1
(-
(* x2 -6.0)
(+ t_1 (* x2 (- (* x1 (- 12.0 (* x1 6.0))) (* 8.0 (* x1 x2)))))))
(if (<= x1 1e+101) t_3 (- x1 (- t_1 (* x2 -6.0))))))))))
double code(double x1, double x2) {
double t_0 = (x1 * x1) + 1.0;
double t_1 = x1 * (2.0 - (x1 * ((x1 * 3.0) + 9.0)));
double t_2 = x1 * (x1 * 3.0);
double t_3 = x1 - (((((t_0 * (((x1 * x1) * (6.0 + (4.0 * (((t_2 + (2.0 * x2)) - x1) / (-1.0 - (x1 * x1)))))) - (x1 * 2.0))) - (3.0 * t_2)) - (x1 * (x1 * x1))) - x1) - (3.0 * (x2 * -2.0)));
double tmp;
if (x1 <= -1.1e+154) {
tmp = x1 + ((x2 * -6.0) - (x1 * (2.0 + (3.0 * (x1 * ((x2 * -2.0) - 3.0))))));
} else if (x1 <= -5.6e+102) {
tmp = x1 + ((3.0 * (((t_2 - (2.0 * x2)) - x1) / t_0)) + (x1 + (x1 * (2.0 + (x1 * (3.0 + ((x2 * 8.0) - x1)))))));
} else if (x1 <= -14600.0) {
tmp = t_3;
} else if (x1 <= 7.2e+25) {
tmp = x1 + ((x2 * -6.0) - (t_1 + (x2 * ((x1 * (12.0 - (x1 * 6.0))) - (8.0 * (x1 * x2))))));
} else if (x1 <= 1e+101) {
tmp = t_3;
} else {
tmp = x1 - (t_1 - (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) :: t_1
real(8) :: t_2
real(8) :: t_3
real(8) :: tmp
t_0 = (x1 * x1) + 1.0d0
t_1 = x1 * (2.0d0 - (x1 * ((x1 * 3.0d0) + 9.0d0)))
t_2 = x1 * (x1 * 3.0d0)
t_3 = x1 - (((((t_0 * (((x1 * x1) * (6.0d0 + (4.0d0 * (((t_2 + (2.0d0 * x2)) - x1) / ((-1.0d0) - (x1 * x1)))))) - (x1 * 2.0d0))) - (3.0d0 * t_2)) - (x1 * (x1 * x1))) - x1) - (3.0d0 * (x2 * (-2.0d0))))
if (x1 <= (-1.1d+154)) then
tmp = x1 + ((x2 * (-6.0d0)) - (x1 * (2.0d0 + (3.0d0 * (x1 * ((x2 * (-2.0d0)) - 3.0d0))))))
else if (x1 <= (-5.6d+102)) then
tmp = x1 + ((3.0d0 * (((t_2 - (2.0d0 * x2)) - x1) / t_0)) + (x1 + (x1 * (2.0d0 + (x1 * (3.0d0 + ((x2 * 8.0d0) - x1)))))))
else if (x1 <= (-14600.0d0)) then
tmp = t_3
else if (x1 <= 7.2d+25) then
tmp = x1 + ((x2 * (-6.0d0)) - (t_1 + (x2 * ((x1 * (12.0d0 - (x1 * 6.0d0))) - (8.0d0 * (x1 * x2))))))
else if (x1 <= 1d+101) then
tmp = t_3
else
tmp = x1 - (t_1 - (x2 * (-6.0d0)))
end if
code = tmp
end function
public static double code(double x1, double x2) {
double t_0 = (x1 * x1) + 1.0;
double t_1 = x1 * (2.0 - (x1 * ((x1 * 3.0) + 9.0)));
double t_2 = x1 * (x1 * 3.0);
double t_3 = x1 - (((((t_0 * (((x1 * x1) * (6.0 + (4.0 * (((t_2 + (2.0 * x2)) - x1) / (-1.0 - (x1 * x1)))))) - (x1 * 2.0))) - (3.0 * t_2)) - (x1 * (x1 * x1))) - x1) - (3.0 * (x2 * -2.0)));
double tmp;
if (x1 <= -1.1e+154) {
tmp = x1 + ((x2 * -6.0) - (x1 * (2.0 + (3.0 * (x1 * ((x2 * -2.0) - 3.0))))));
} else if (x1 <= -5.6e+102) {
tmp = x1 + ((3.0 * (((t_2 - (2.0 * x2)) - x1) / t_0)) + (x1 + (x1 * (2.0 + (x1 * (3.0 + ((x2 * 8.0) - x1)))))));
} else if (x1 <= -14600.0) {
tmp = t_3;
} else if (x1 <= 7.2e+25) {
tmp = x1 + ((x2 * -6.0) - (t_1 + (x2 * ((x1 * (12.0 - (x1 * 6.0))) - (8.0 * (x1 * x2))))));
} else if (x1 <= 1e+101) {
tmp = t_3;
} else {
tmp = x1 - (t_1 - (x2 * -6.0));
}
return tmp;
}
def code(x1, x2): t_0 = (x1 * x1) + 1.0 t_1 = x1 * (2.0 - (x1 * ((x1 * 3.0) + 9.0))) t_2 = x1 * (x1 * 3.0) t_3 = x1 - (((((t_0 * (((x1 * x1) * (6.0 + (4.0 * (((t_2 + (2.0 * x2)) - x1) / (-1.0 - (x1 * x1)))))) - (x1 * 2.0))) - (3.0 * t_2)) - (x1 * (x1 * x1))) - x1) - (3.0 * (x2 * -2.0))) tmp = 0 if x1 <= -1.1e+154: tmp = x1 + ((x2 * -6.0) - (x1 * (2.0 + (3.0 * (x1 * ((x2 * -2.0) - 3.0)))))) elif x1 <= -5.6e+102: tmp = x1 + ((3.0 * (((t_2 - (2.0 * x2)) - x1) / t_0)) + (x1 + (x1 * (2.0 + (x1 * (3.0 + ((x2 * 8.0) - x1))))))) elif x1 <= -14600.0: tmp = t_3 elif x1 <= 7.2e+25: tmp = x1 + ((x2 * -6.0) - (t_1 + (x2 * ((x1 * (12.0 - (x1 * 6.0))) - (8.0 * (x1 * x2)))))) elif x1 <= 1e+101: tmp = t_3 else: tmp = x1 - (t_1 - (x2 * -6.0)) return tmp
function code(x1, x2) t_0 = Float64(Float64(x1 * x1) + 1.0) t_1 = Float64(x1 * Float64(2.0 - Float64(x1 * Float64(Float64(x1 * 3.0) + 9.0)))) t_2 = Float64(x1 * Float64(x1 * 3.0)) t_3 = Float64(x1 - Float64(Float64(Float64(Float64(Float64(t_0 * Float64(Float64(Float64(x1 * x1) * Float64(6.0 + Float64(4.0 * Float64(Float64(Float64(t_2 + Float64(2.0 * x2)) - x1) / Float64(-1.0 - Float64(x1 * x1)))))) - Float64(x1 * 2.0))) - Float64(3.0 * t_2)) - Float64(x1 * Float64(x1 * x1))) - x1) - Float64(3.0 * Float64(x2 * -2.0)))) tmp = 0.0 if (x1 <= -1.1e+154) tmp = Float64(x1 + Float64(Float64(x2 * -6.0) - Float64(x1 * Float64(2.0 + Float64(3.0 * Float64(x1 * Float64(Float64(x2 * -2.0) - 3.0))))))); elseif (x1 <= -5.6e+102) tmp = Float64(x1 + Float64(Float64(3.0 * Float64(Float64(Float64(t_2 - Float64(2.0 * x2)) - x1) / t_0)) + Float64(x1 + Float64(x1 * Float64(2.0 + Float64(x1 * Float64(3.0 + Float64(Float64(x2 * 8.0) - x1)))))))); elseif (x1 <= -14600.0) tmp = t_3; elseif (x1 <= 7.2e+25) tmp = Float64(x1 + Float64(Float64(x2 * -6.0) - Float64(t_1 + Float64(x2 * Float64(Float64(x1 * Float64(12.0 - Float64(x1 * 6.0))) - Float64(8.0 * Float64(x1 * x2))))))); elseif (x1 <= 1e+101) tmp = t_3; else tmp = Float64(x1 - Float64(t_1 - Float64(x2 * -6.0))); end return tmp end
function tmp_2 = code(x1, x2) t_0 = (x1 * x1) + 1.0; t_1 = x1 * (2.0 - (x1 * ((x1 * 3.0) + 9.0))); t_2 = x1 * (x1 * 3.0); t_3 = x1 - (((((t_0 * (((x1 * x1) * (6.0 + (4.0 * (((t_2 + (2.0 * x2)) - x1) / (-1.0 - (x1 * x1)))))) - (x1 * 2.0))) - (3.0 * t_2)) - (x1 * (x1 * x1))) - x1) - (3.0 * (x2 * -2.0))); tmp = 0.0; if (x1 <= -1.1e+154) tmp = x1 + ((x2 * -6.0) - (x1 * (2.0 + (3.0 * (x1 * ((x2 * -2.0) - 3.0)))))); elseif (x1 <= -5.6e+102) tmp = x1 + ((3.0 * (((t_2 - (2.0 * x2)) - x1) / t_0)) + (x1 + (x1 * (2.0 + (x1 * (3.0 + ((x2 * 8.0) - x1))))))); elseif (x1 <= -14600.0) tmp = t_3; elseif (x1 <= 7.2e+25) tmp = x1 + ((x2 * -6.0) - (t_1 + (x2 * ((x1 * (12.0 - (x1 * 6.0))) - (8.0 * (x1 * x2)))))); elseif (x1 <= 1e+101) tmp = t_3; else tmp = x1 - (t_1 - (x2 * -6.0)); end tmp_2 = tmp; end
code[x1_, x2_] := Block[{t$95$0 = N[(N[(x1 * x1), $MachinePrecision] + 1.0), $MachinePrecision]}, Block[{t$95$1 = N[(x1 * N[(2.0 - N[(x1 * N[(N[(x1 * 3.0), $MachinePrecision] + 9.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x1 * N[(x1 * 3.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(x1 - N[(N[(N[(N[(N[(t$95$0 * N[(N[(N[(x1 * x1), $MachinePrecision] * N[(6.0 + N[(4.0 * N[(N[(N[(t$95$2 + N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / N[(-1.0 - N[(x1 * x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(x1 * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(3.0 * t$95$2), $MachinePrecision]), $MachinePrecision] - N[(x1 * N[(x1 * x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] - N[(3.0 * N[(x2 * -2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x1, -1.1e+154], N[(x1 + N[(N[(x2 * -6.0), $MachinePrecision] - N[(x1 * N[(2.0 + N[(3.0 * N[(x1 * N[(N[(x2 * -2.0), $MachinePrecision] - 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, -5.6e+102], N[(x1 + N[(N[(3.0 * N[(N[(N[(t$95$2 - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$0), $MachinePrecision]), $MachinePrecision] + N[(x1 + N[(x1 * N[(2.0 + N[(x1 * N[(3.0 + N[(N[(x2 * 8.0), $MachinePrecision] - x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, -14600.0], t$95$3, If[LessEqual[x1, 7.2e+25], N[(x1 + N[(N[(x2 * -6.0), $MachinePrecision] - N[(t$95$1 + N[(x2 * N[(N[(x1 * N[(12.0 - N[(x1 * 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(8.0 * N[(x1 * x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 1e+101], t$95$3, N[(x1 - N[(t$95$1 - N[(x2 * -6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x1 \cdot x1 + 1\\
t_1 := x1 \cdot \left(2 - x1 \cdot \left(x1 \cdot 3 + 9\right)\right)\\
t_2 := x1 \cdot \left(x1 \cdot 3\right)\\
t_3 := x1 - \left(\left(\left(\left(t\_0 \cdot \left(\left(x1 \cdot x1\right) \cdot \left(6 + 4 \cdot \frac{\left(t\_2 + 2 \cdot x2\right) - x1}{-1 - x1 \cdot x1}\right) - x1 \cdot 2\right) - 3 \cdot t\_2\right) - x1 \cdot \left(x1 \cdot x1\right)\right) - x1\right) - 3 \cdot \left(x2 \cdot -2\right)\right)\\
\mathbf{if}\;x1 \leq -1.1 \cdot 10^{+154}:\\
\;\;\;\;x1 + \left(x2 \cdot -6 - x1 \cdot \left(2 + 3 \cdot \left(x1 \cdot \left(x2 \cdot -2 - 3\right)\right)\right)\right)\\
\mathbf{elif}\;x1 \leq -5.6 \cdot 10^{+102}:\\
\;\;\;\;x1 + \left(3 \cdot \frac{\left(t\_2 - 2 \cdot x2\right) - x1}{t\_0} + \left(x1 + x1 \cdot \left(2 + x1 \cdot \left(3 + \left(x2 \cdot 8 - x1\right)\right)\right)\right)\right)\\
\mathbf{elif}\;x1 \leq -14600:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;x1 \leq 7.2 \cdot 10^{+25}:\\
\;\;\;\;x1 + \left(x2 \cdot -6 - \left(t\_1 + x2 \cdot \left(x1 \cdot \left(12 - x1 \cdot 6\right) - 8 \cdot \left(x1 \cdot x2\right)\right)\right)\right)\\
\mathbf{elif}\;x1 \leq 10^{+101}:\\
\;\;\;\;t\_3\\
\mathbf{else}:\\
\;\;\;\;x1 - \left(t\_1 - x2 \cdot -6\right)\\
\end{array}
\end{array}
if x1 < -1.1000000000000001e154Initial program 0.0%
Taylor expanded in x1 around inf 0.0%
Taylor expanded in x1 around 0 86.5%
if -1.1000000000000001e154 < x1 < -5.60000000000000037e102Initial program 0.0%
Taylor expanded in x1 around 0 0.0%
+-commutative0.0%
mul-1-neg0.0%
sub-neg0.0%
Simplified0.0%
Taylor expanded in x1 around inf 0.0%
Taylor expanded in x1 around inf 0.0%
*-commutative0.0%
Simplified0.0%
Taylor expanded in x1 around 0 83.3%
if -5.60000000000000037e102 < x1 < -14600 or 7.20000000000000031e25 < x1 < 9.9999999999999998e100Initial program 99.3%
Taylor expanded in x1 around 0 83.7%
+-commutative83.7%
mul-1-neg83.7%
sub-neg83.7%
Simplified83.7%
Taylor expanded in x1 around inf 83.7%
Taylor expanded in x1 around inf 85.4%
*-commutative85.4%
Simplified85.4%
Taylor expanded in x1 around 0 85.4%
*-commutative73.2%
Simplified85.4%
if -14600 < x1 < 7.20000000000000031e25Initial program 99.3%
Taylor expanded in x1 around 0 87.1%
Taylor expanded in x1 around 0 87.5%
Taylor expanded in x2 around 0 98.5%
if 9.9999999999999998e100 < x1 Initial program 29.3%
Taylor expanded in x1 around 0 8.4%
Taylor expanded in x1 around 0 90.2%
Taylor expanded in x2 around 0 97.6%
*-commutative97.6%
Simplified97.6%
Final simplification94.0%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0
(+
x1
(+
(*
3.0
(/ (- (- (* x1 (* x1 3.0)) (* 2.0 x2)) x1) (+ (* x1 x1) 1.0)))
(+
x1
(*
x1
(+
2.0
(*
x1
(+
3.0
(+
(* x2 8.0)
(*
x1
(+
-1.0
(*
x1
(-
(+ (* x2 8.0) (* 4.0 (- 3.0 (* 2.0 x2))))
6.0)))))))))))))
(t_1 (* x1 (- 2.0 (* x1 (+ (* x1 3.0) 9.0))))))
(if (<= x1 -5.4e+153)
(+ x1 (- (* x2 -6.0) (* x1 (+ 2.0 (* 3.0 (* x1 (- (* x2 -2.0) 3.0)))))))
(if (<= x1 -350000.0)
t_0
(if (<= x1 7.2e+25)
(+
x1
(-
(* x2 -6.0)
(+ t_1 (* x2 (- (* x1 (- 12.0 (* x1 6.0))) (* 8.0 (* x1 x2)))))))
(if (<= x1 8.5e+104) t_0 (- x1 (- t_1 (* x2 -6.0)))))))))
double code(double x1, double x2) {
double t_0 = x1 + ((3.0 * ((((x1 * (x1 * 3.0)) - (2.0 * x2)) - x1) / ((x1 * x1) + 1.0))) + (x1 + (x1 * (2.0 + (x1 * (3.0 + ((x2 * 8.0) + (x1 * (-1.0 + (x1 * (((x2 * 8.0) + (4.0 * (3.0 - (2.0 * x2)))) - 6.0)))))))))));
double t_1 = x1 * (2.0 - (x1 * ((x1 * 3.0) + 9.0)));
double tmp;
if (x1 <= -5.4e+153) {
tmp = x1 + ((x2 * -6.0) - (x1 * (2.0 + (3.0 * (x1 * ((x2 * -2.0) - 3.0))))));
} else if (x1 <= -350000.0) {
tmp = t_0;
} else if (x1 <= 7.2e+25) {
tmp = x1 + ((x2 * -6.0) - (t_1 + (x2 * ((x1 * (12.0 - (x1 * 6.0))) - (8.0 * (x1 * x2))))));
} else if (x1 <= 8.5e+104) {
tmp = t_0;
} else {
tmp = x1 - (t_1 - (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) :: t_1
real(8) :: tmp
t_0 = x1 + ((3.0d0 * ((((x1 * (x1 * 3.0d0)) - (2.0d0 * x2)) - x1) / ((x1 * x1) + 1.0d0))) + (x1 + (x1 * (2.0d0 + (x1 * (3.0d0 + ((x2 * 8.0d0) + (x1 * ((-1.0d0) + (x1 * (((x2 * 8.0d0) + (4.0d0 * (3.0d0 - (2.0d0 * x2)))) - 6.0d0)))))))))))
t_1 = x1 * (2.0d0 - (x1 * ((x1 * 3.0d0) + 9.0d0)))
if (x1 <= (-5.4d+153)) then
tmp = x1 + ((x2 * (-6.0d0)) - (x1 * (2.0d0 + (3.0d0 * (x1 * ((x2 * (-2.0d0)) - 3.0d0))))))
else if (x1 <= (-350000.0d0)) then
tmp = t_0
else if (x1 <= 7.2d+25) then
tmp = x1 + ((x2 * (-6.0d0)) - (t_1 + (x2 * ((x1 * (12.0d0 - (x1 * 6.0d0))) - (8.0d0 * (x1 * x2))))))
else if (x1 <= 8.5d+104) then
tmp = t_0
else
tmp = x1 - (t_1 - (x2 * (-6.0d0)))
end if
code = tmp
end function
public static double code(double x1, double x2) {
double t_0 = x1 + ((3.0 * ((((x1 * (x1 * 3.0)) - (2.0 * x2)) - x1) / ((x1 * x1) + 1.0))) + (x1 + (x1 * (2.0 + (x1 * (3.0 + ((x2 * 8.0) + (x1 * (-1.0 + (x1 * (((x2 * 8.0) + (4.0 * (3.0 - (2.0 * x2)))) - 6.0)))))))))));
double t_1 = x1 * (2.0 - (x1 * ((x1 * 3.0) + 9.0)));
double tmp;
if (x1 <= -5.4e+153) {
tmp = x1 + ((x2 * -6.0) - (x1 * (2.0 + (3.0 * (x1 * ((x2 * -2.0) - 3.0))))));
} else if (x1 <= -350000.0) {
tmp = t_0;
} else if (x1 <= 7.2e+25) {
tmp = x1 + ((x2 * -6.0) - (t_1 + (x2 * ((x1 * (12.0 - (x1 * 6.0))) - (8.0 * (x1 * x2))))));
} else if (x1 <= 8.5e+104) {
tmp = t_0;
} else {
tmp = x1 - (t_1 - (x2 * -6.0));
}
return tmp;
}
def code(x1, x2): t_0 = x1 + ((3.0 * ((((x1 * (x1 * 3.0)) - (2.0 * x2)) - x1) / ((x1 * x1) + 1.0))) + (x1 + (x1 * (2.0 + (x1 * (3.0 + ((x2 * 8.0) + (x1 * (-1.0 + (x1 * (((x2 * 8.0) + (4.0 * (3.0 - (2.0 * x2)))) - 6.0))))))))))) t_1 = x1 * (2.0 - (x1 * ((x1 * 3.0) + 9.0))) tmp = 0 if x1 <= -5.4e+153: tmp = x1 + ((x2 * -6.0) - (x1 * (2.0 + (3.0 * (x1 * ((x2 * -2.0) - 3.0)))))) elif x1 <= -350000.0: tmp = t_0 elif x1 <= 7.2e+25: tmp = x1 + ((x2 * -6.0) - (t_1 + (x2 * ((x1 * (12.0 - (x1 * 6.0))) - (8.0 * (x1 * x2)))))) elif x1 <= 8.5e+104: tmp = t_0 else: tmp = x1 - (t_1 - (x2 * -6.0)) return tmp
function code(x1, x2) t_0 = Float64(x1 + Float64(Float64(3.0 * Float64(Float64(Float64(Float64(x1 * Float64(x1 * 3.0)) - Float64(2.0 * x2)) - x1) / Float64(Float64(x1 * x1) + 1.0))) + Float64(x1 + Float64(x1 * Float64(2.0 + Float64(x1 * Float64(3.0 + Float64(Float64(x2 * 8.0) + Float64(x1 * Float64(-1.0 + Float64(x1 * Float64(Float64(Float64(x2 * 8.0) + Float64(4.0 * Float64(3.0 - Float64(2.0 * x2)))) - 6.0)))))))))))) t_1 = Float64(x1 * Float64(2.0 - Float64(x1 * Float64(Float64(x1 * 3.0) + 9.0)))) tmp = 0.0 if (x1 <= -5.4e+153) tmp = Float64(x1 + Float64(Float64(x2 * -6.0) - Float64(x1 * Float64(2.0 + Float64(3.0 * Float64(x1 * Float64(Float64(x2 * -2.0) - 3.0))))))); elseif (x1 <= -350000.0) tmp = t_0; elseif (x1 <= 7.2e+25) tmp = Float64(x1 + Float64(Float64(x2 * -6.0) - Float64(t_1 + Float64(x2 * Float64(Float64(x1 * Float64(12.0 - Float64(x1 * 6.0))) - Float64(8.0 * Float64(x1 * x2))))))); elseif (x1 <= 8.5e+104) tmp = t_0; else tmp = Float64(x1 - Float64(t_1 - Float64(x2 * -6.0))); end return tmp end
function tmp_2 = code(x1, x2) t_0 = x1 + ((3.0 * ((((x1 * (x1 * 3.0)) - (2.0 * x2)) - x1) / ((x1 * x1) + 1.0))) + (x1 + (x1 * (2.0 + (x1 * (3.0 + ((x2 * 8.0) + (x1 * (-1.0 + (x1 * (((x2 * 8.0) + (4.0 * (3.0 - (2.0 * x2)))) - 6.0))))))))))); t_1 = x1 * (2.0 - (x1 * ((x1 * 3.0) + 9.0))); tmp = 0.0; if (x1 <= -5.4e+153) tmp = x1 + ((x2 * -6.0) - (x1 * (2.0 + (3.0 * (x1 * ((x2 * -2.0) - 3.0)))))); elseif (x1 <= -350000.0) tmp = t_0; elseif (x1 <= 7.2e+25) tmp = x1 + ((x2 * -6.0) - (t_1 + (x2 * ((x1 * (12.0 - (x1 * 6.0))) - (8.0 * (x1 * x2)))))); elseif (x1 <= 8.5e+104) tmp = t_0; else tmp = x1 - (t_1 - (x2 * -6.0)); end tmp_2 = tmp; end
code[x1_, x2_] := Block[{t$95$0 = N[(x1 + N[(N[(3.0 * N[(N[(N[(N[(x1 * N[(x1 * 3.0), $MachinePrecision]), $MachinePrecision] - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / N[(N[(x1 * x1), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(x1 + N[(x1 * N[(2.0 + N[(x1 * N[(3.0 + N[(N[(x2 * 8.0), $MachinePrecision] + N[(x1 * N[(-1.0 + N[(x1 * N[(N[(N[(x2 * 8.0), $MachinePrecision] + N[(4.0 * N[(3.0 - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(x1 * N[(2.0 - N[(x1 * N[(N[(x1 * 3.0), $MachinePrecision] + 9.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x1, -5.4e+153], N[(x1 + N[(N[(x2 * -6.0), $MachinePrecision] - N[(x1 * N[(2.0 + N[(3.0 * N[(x1 * N[(N[(x2 * -2.0), $MachinePrecision] - 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, -350000.0], t$95$0, If[LessEqual[x1, 7.2e+25], N[(x1 + N[(N[(x2 * -6.0), $MachinePrecision] - N[(t$95$1 + N[(x2 * N[(N[(x1 * N[(12.0 - N[(x1 * 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(8.0 * N[(x1 * x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 8.5e+104], t$95$0, N[(x1 - N[(t$95$1 - N[(x2 * -6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x1 + \left(3 \cdot \frac{\left(x1 \cdot \left(x1 \cdot 3\right) - 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1} + \left(x1 + x1 \cdot \left(2 + x1 \cdot \left(3 + \left(x2 \cdot 8 + x1 \cdot \left(-1 + x1 \cdot \left(\left(x2 \cdot 8 + 4 \cdot \left(3 - 2 \cdot x2\right)\right) - 6\right)\right)\right)\right)\right)\right)\right)\\
t_1 := x1 \cdot \left(2 - x1 \cdot \left(x1 \cdot 3 + 9\right)\right)\\
\mathbf{if}\;x1 \leq -5.4 \cdot 10^{+153}:\\
\;\;\;\;x1 + \left(x2 \cdot -6 - x1 \cdot \left(2 + 3 \cdot \left(x1 \cdot \left(x2 \cdot -2 - 3\right)\right)\right)\right)\\
\mathbf{elif}\;x1 \leq -350000:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;x1 \leq 7.2 \cdot 10^{+25}:\\
\;\;\;\;x1 + \left(x2 \cdot -6 - \left(t\_1 + x2 \cdot \left(x1 \cdot \left(12 - x1 \cdot 6\right) - 8 \cdot \left(x1 \cdot x2\right)\right)\right)\right)\\
\mathbf{elif}\;x1 \leq 8.5 \cdot 10^{+104}:\\
\;\;\;\;t\_0\\
\mathbf{else}:\\
\;\;\;\;x1 - \left(t\_1 - x2 \cdot -6\right)\\
\end{array}
\end{array}
if x1 < -5.4000000000000001e153Initial program 0.0%
Taylor expanded in x1 around inf 0.0%
Taylor expanded in x1 around 0 86.5%
if -5.4000000000000001e153 < x1 < -3.5e5 or 7.20000000000000031e25 < x1 < 8.4999999999999999e104Initial program 74.0%
Taylor expanded in x1 around 0 62.7%
+-commutative62.7%
mul-1-neg62.7%
sub-neg62.7%
Simplified62.7%
Taylor expanded in x1 around inf 62.7%
Taylor expanded in x1 around inf 63.9%
*-commutative63.9%
Simplified63.9%
Taylor expanded in x1 around 0 65.2%
if -3.5e5 < x1 < 7.20000000000000031e25Initial program 99.3%
Taylor expanded in x1 around 0 87.1%
Taylor expanded in x1 around 0 87.5%
Taylor expanded in x2 around 0 98.5%
if 8.4999999999999999e104 < x1 Initial program 28.2%
Taylor expanded in x1 around 0 8.7%
Taylor expanded in x1 around 0 92.3%
Taylor expanded in x2 around 0 100.0%
*-commutative100.0%
Simplified100.0%
Final simplification90.3%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (* x1 (- 2.0 (* x1 (+ (* x1 3.0) 9.0)))))
(t_1 (* x1 (* x1 3.0)))
(t_2 (* 3.0 (/ (- (- t_1 (* 2.0 x2)) x1) (+ (* x1 x1) 1.0)))))
(if (<= x1 -5.4e+153)
(+ x1 (- (* x2 -6.0) (* x1 (+ 2.0 (* 3.0 (* x1 (- (* x2 -2.0) 3.0)))))))
(if (<= x1 -700000000000.0)
(+
x1
(+
t_2
(+
x1
(*
x1
(+
2.0
(*
x1
(+
3.0
(+
(* x2 8.0)
(*
x1
(+
-1.0
(*
x1
(- (+ (* x2 8.0) (* 4.0 (- 3.0 (* 2.0 x2)))) 6.0))))))))))))
(if (<= x1 7.2e+25)
(+
x1
(-
(* x2 -6.0)
(+ t_0 (* x2 (- (* x1 (- 12.0 (* x1 6.0))) (* 8.0 (* x1 x2)))))))
(if (<= x1 1e+101)
(+
x1
(+
t_2
(-
x1
(-
(-
(* (+ (* (* x1 x1) 6.0) (* x1 2.0)) (- -1.0 (* x1 x1)))
(* 3.0 t_1))
(* x1 (* x1 x1))))))
(- x1 (- t_0 (* x2 -6.0)))))))))
double code(double x1, double x2) {
double t_0 = x1 * (2.0 - (x1 * ((x1 * 3.0) + 9.0)));
double t_1 = x1 * (x1 * 3.0);
double t_2 = 3.0 * (((t_1 - (2.0 * x2)) - x1) / ((x1 * x1) + 1.0));
double tmp;
if (x1 <= -5.4e+153) {
tmp = x1 + ((x2 * -6.0) - (x1 * (2.0 + (3.0 * (x1 * ((x2 * -2.0) - 3.0))))));
} else if (x1 <= -700000000000.0) {
tmp = x1 + (t_2 + (x1 + (x1 * (2.0 + (x1 * (3.0 + ((x2 * 8.0) + (x1 * (-1.0 + (x1 * (((x2 * 8.0) + (4.0 * (3.0 - (2.0 * x2)))) - 6.0)))))))))));
} else if (x1 <= 7.2e+25) {
tmp = x1 + ((x2 * -6.0) - (t_0 + (x2 * ((x1 * (12.0 - (x1 * 6.0))) - (8.0 * (x1 * x2))))));
} else if (x1 <= 1e+101) {
tmp = x1 + (t_2 + (x1 - ((((((x1 * x1) * 6.0) + (x1 * 2.0)) * (-1.0 - (x1 * x1))) - (3.0 * t_1)) - (x1 * (x1 * x1)))));
} else {
tmp = x1 - (t_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) :: t_1
real(8) :: t_2
real(8) :: tmp
t_0 = x1 * (2.0d0 - (x1 * ((x1 * 3.0d0) + 9.0d0)))
t_1 = x1 * (x1 * 3.0d0)
t_2 = 3.0d0 * (((t_1 - (2.0d0 * x2)) - x1) / ((x1 * x1) + 1.0d0))
if (x1 <= (-5.4d+153)) then
tmp = x1 + ((x2 * (-6.0d0)) - (x1 * (2.0d0 + (3.0d0 * (x1 * ((x2 * (-2.0d0)) - 3.0d0))))))
else if (x1 <= (-700000000000.0d0)) then
tmp = x1 + (t_2 + (x1 + (x1 * (2.0d0 + (x1 * (3.0d0 + ((x2 * 8.0d0) + (x1 * ((-1.0d0) + (x1 * (((x2 * 8.0d0) + (4.0d0 * (3.0d0 - (2.0d0 * x2)))) - 6.0d0)))))))))))
else if (x1 <= 7.2d+25) then
tmp = x1 + ((x2 * (-6.0d0)) - (t_0 + (x2 * ((x1 * (12.0d0 - (x1 * 6.0d0))) - (8.0d0 * (x1 * x2))))))
else if (x1 <= 1d+101) then
tmp = x1 + (t_2 + (x1 - ((((((x1 * x1) * 6.0d0) + (x1 * 2.0d0)) * ((-1.0d0) - (x1 * x1))) - (3.0d0 * t_1)) - (x1 * (x1 * x1)))))
else
tmp = x1 - (t_0 - (x2 * (-6.0d0)))
end if
code = tmp
end function
public static double code(double x1, double x2) {
double t_0 = x1 * (2.0 - (x1 * ((x1 * 3.0) + 9.0)));
double t_1 = x1 * (x1 * 3.0);
double t_2 = 3.0 * (((t_1 - (2.0 * x2)) - x1) / ((x1 * x1) + 1.0));
double tmp;
if (x1 <= -5.4e+153) {
tmp = x1 + ((x2 * -6.0) - (x1 * (2.0 + (3.0 * (x1 * ((x2 * -2.0) - 3.0))))));
} else if (x1 <= -700000000000.0) {
tmp = x1 + (t_2 + (x1 + (x1 * (2.0 + (x1 * (3.0 + ((x2 * 8.0) + (x1 * (-1.0 + (x1 * (((x2 * 8.0) + (4.0 * (3.0 - (2.0 * x2)))) - 6.0)))))))))));
} else if (x1 <= 7.2e+25) {
tmp = x1 + ((x2 * -6.0) - (t_0 + (x2 * ((x1 * (12.0 - (x1 * 6.0))) - (8.0 * (x1 * x2))))));
} else if (x1 <= 1e+101) {
tmp = x1 + (t_2 + (x1 - ((((((x1 * x1) * 6.0) + (x1 * 2.0)) * (-1.0 - (x1 * x1))) - (3.0 * t_1)) - (x1 * (x1 * x1)))));
} else {
tmp = x1 - (t_0 - (x2 * -6.0));
}
return tmp;
}
def code(x1, x2): t_0 = x1 * (2.0 - (x1 * ((x1 * 3.0) + 9.0))) t_1 = x1 * (x1 * 3.0) t_2 = 3.0 * (((t_1 - (2.0 * x2)) - x1) / ((x1 * x1) + 1.0)) tmp = 0 if x1 <= -5.4e+153: tmp = x1 + ((x2 * -6.0) - (x1 * (2.0 + (3.0 * (x1 * ((x2 * -2.0) - 3.0)))))) elif x1 <= -700000000000.0: tmp = x1 + (t_2 + (x1 + (x1 * (2.0 + (x1 * (3.0 + ((x2 * 8.0) + (x1 * (-1.0 + (x1 * (((x2 * 8.0) + (4.0 * (3.0 - (2.0 * x2)))) - 6.0))))))))))) elif x1 <= 7.2e+25: tmp = x1 + ((x2 * -6.0) - (t_0 + (x2 * ((x1 * (12.0 - (x1 * 6.0))) - (8.0 * (x1 * x2)))))) elif x1 <= 1e+101: tmp = x1 + (t_2 + (x1 - ((((((x1 * x1) * 6.0) + (x1 * 2.0)) * (-1.0 - (x1 * x1))) - (3.0 * t_1)) - (x1 * (x1 * x1))))) else: tmp = x1 - (t_0 - (x2 * -6.0)) return tmp
function code(x1, x2) t_0 = Float64(x1 * Float64(2.0 - Float64(x1 * Float64(Float64(x1 * 3.0) + 9.0)))) t_1 = Float64(x1 * Float64(x1 * 3.0)) t_2 = Float64(3.0 * Float64(Float64(Float64(t_1 - Float64(2.0 * x2)) - x1) / Float64(Float64(x1 * x1) + 1.0))) tmp = 0.0 if (x1 <= -5.4e+153) tmp = Float64(x1 + Float64(Float64(x2 * -6.0) - Float64(x1 * Float64(2.0 + Float64(3.0 * Float64(x1 * Float64(Float64(x2 * -2.0) - 3.0))))))); elseif (x1 <= -700000000000.0) tmp = Float64(x1 + Float64(t_2 + Float64(x1 + Float64(x1 * Float64(2.0 + Float64(x1 * Float64(3.0 + Float64(Float64(x2 * 8.0) + Float64(x1 * Float64(-1.0 + Float64(x1 * Float64(Float64(Float64(x2 * 8.0) + Float64(4.0 * Float64(3.0 - Float64(2.0 * x2)))) - 6.0)))))))))))); elseif (x1 <= 7.2e+25) tmp = Float64(x1 + Float64(Float64(x2 * -6.0) - Float64(t_0 + Float64(x2 * Float64(Float64(x1 * Float64(12.0 - Float64(x1 * 6.0))) - Float64(8.0 * Float64(x1 * x2))))))); elseif (x1 <= 1e+101) tmp = Float64(x1 + Float64(t_2 + Float64(x1 - Float64(Float64(Float64(Float64(Float64(Float64(x1 * x1) * 6.0) + Float64(x1 * 2.0)) * Float64(-1.0 - Float64(x1 * x1))) - Float64(3.0 * t_1)) - Float64(x1 * Float64(x1 * x1)))))); else tmp = Float64(x1 - Float64(t_0 - Float64(x2 * -6.0))); end return tmp end
function tmp_2 = code(x1, x2) t_0 = x1 * (2.0 - (x1 * ((x1 * 3.0) + 9.0))); t_1 = x1 * (x1 * 3.0); t_2 = 3.0 * (((t_1 - (2.0 * x2)) - x1) / ((x1 * x1) + 1.0)); tmp = 0.0; if (x1 <= -5.4e+153) tmp = x1 + ((x2 * -6.0) - (x1 * (2.0 + (3.0 * (x1 * ((x2 * -2.0) - 3.0)))))); elseif (x1 <= -700000000000.0) tmp = x1 + (t_2 + (x1 + (x1 * (2.0 + (x1 * (3.0 + ((x2 * 8.0) + (x1 * (-1.0 + (x1 * (((x2 * 8.0) + (4.0 * (3.0 - (2.0 * x2)))) - 6.0))))))))))); elseif (x1 <= 7.2e+25) tmp = x1 + ((x2 * -6.0) - (t_0 + (x2 * ((x1 * (12.0 - (x1 * 6.0))) - (8.0 * (x1 * x2)))))); elseif (x1 <= 1e+101) tmp = x1 + (t_2 + (x1 - ((((((x1 * x1) * 6.0) + (x1 * 2.0)) * (-1.0 - (x1 * x1))) - (3.0 * t_1)) - (x1 * (x1 * x1))))); else tmp = x1 - (t_0 - (x2 * -6.0)); end tmp_2 = tmp; end
code[x1_, x2_] := Block[{t$95$0 = N[(x1 * N[(2.0 - N[(x1 * N[(N[(x1 * 3.0), $MachinePrecision] + 9.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(x1 * N[(x1 * 3.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(3.0 * N[(N[(N[(t$95$1 - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / N[(N[(x1 * x1), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x1, -5.4e+153], N[(x1 + N[(N[(x2 * -6.0), $MachinePrecision] - N[(x1 * N[(2.0 + N[(3.0 * N[(x1 * N[(N[(x2 * -2.0), $MachinePrecision] - 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, -700000000000.0], N[(x1 + N[(t$95$2 + N[(x1 + N[(x1 * N[(2.0 + N[(x1 * N[(3.0 + N[(N[(x2 * 8.0), $MachinePrecision] + N[(x1 * N[(-1.0 + N[(x1 * N[(N[(N[(x2 * 8.0), $MachinePrecision] + N[(4.0 * N[(3.0 - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 7.2e+25], N[(x1 + N[(N[(x2 * -6.0), $MachinePrecision] - N[(t$95$0 + N[(x2 * N[(N[(x1 * N[(12.0 - N[(x1 * 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(8.0 * N[(x1 * x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 1e+101], N[(x1 + N[(t$95$2 + N[(x1 - N[(N[(N[(N[(N[(N[(x1 * x1), $MachinePrecision] * 6.0), $MachinePrecision] + N[(x1 * 2.0), $MachinePrecision]), $MachinePrecision] * N[(-1.0 - N[(x1 * x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(3.0 * t$95$1), $MachinePrecision]), $MachinePrecision] - N[(x1 * N[(x1 * x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x1 - N[(t$95$0 - N[(x2 * -6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x1 \cdot \left(2 - x1 \cdot \left(x1 \cdot 3 + 9\right)\right)\\
t_1 := x1 \cdot \left(x1 \cdot 3\right)\\
t_2 := 3 \cdot \frac{\left(t\_1 - 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\\
\mathbf{if}\;x1 \leq -5.4 \cdot 10^{+153}:\\
\;\;\;\;x1 + \left(x2 \cdot -6 - x1 \cdot \left(2 + 3 \cdot \left(x1 \cdot \left(x2 \cdot -2 - 3\right)\right)\right)\right)\\
\mathbf{elif}\;x1 \leq -700000000000:\\
\;\;\;\;x1 + \left(t\_2 + \left(x1 + x1 \cdot \left(2 + x1 \cdot \left(3 + \left(x2 \cdot 8 + x1 \cdot \left(-1 + x1 \cdot \left(\left(x2 \cdot 8 + 4 \cdot \left(3 - 2 \cdot x2\right)\right) - 6\right)\right)\right)\right)\right)\right)\right)\\
\mathbf{elif}\;x1 \leq 7.2 \cdot 10^{+25}:\\
\;\;\;\;x1 + \left(x2 \cdot -6 - \left(t\_0 + x2 \cdot \left(x1 \cdot \left(12 - x1 \cdot 6\right) - 8 \cdot \left(x1 \cdot x2\right)\right)\right)\right)\\
\mathbf{elif}\;x1 \leq 10^{+101}:\\
\;\;\;\;x1 + \left(t\_2 + \left(x1 - \left(\left(\left(\left(x1 \cdot x1\right) \cdot 6 + x1 \cdot 2\right) \cdot \left(-1 - x1 \cdot x1\right) - 3 \cdot t\_1\right) - x1 \cdot \left(x1 \cdot x1\right)\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x1 - \left(t\_0 - x2 \cdot -6\right)\\
\end{array}
\end{array}
if x1 < -5.4000000000000001e153Initial program 0.0%
Taylor expanded in x1 around inf 0.0%
Taylor expanded in x1 around 0 86.5%
if -5.4000000000000001e153 < x1 < -7e11Initial program 65.3%
Taylor expanded in x1 around 0 54.2%
+-commutative54.2%
mul-1-neg54.2%
sub-neg54.2%
Simplified54.2%
Taylor expanded in x1 around inf 54.2%
Taylor expanded in x1 around inf 55.4%
*-commutative55.4%
Simplified55.4%
Taylor expanded in x1 around 0 67.0%
if -7e11 < x1 < 7.20000000000000031e25Initial program 99.3%
Taylor expanded in x1 around 0 87.1%
Taylor expanded in x1 around 0 87.5%
Taylor expanded in x2 around 0 98.5%
if 7.20000000000000031e25 < x1 < 9.9999999999999998e100Initial program 99.4%
Taylor expanded in x1 around 0 85.6%
+-commutative85.6%
mul-1-neg85.6%
sub-neg85.6%
Simplified85.6%
Taylor expanded in x1 around inf 85.6%
Taylor expanded in x1 around inf 87.3%
*-commutative87.3%
Simplified87.3%
Taylor expanded in x1 around inf 78.3%
if 9.9999999999999998e100 < x1 Initial program 29.3%
Taylor expanded in x1 around 0 8.4%
Taylor expanded in x1 around 0 90.2%
Taylor expanded in x2 around 0 97.6%
*-commutative97.6%
Simplified97.6%
Final simplification91.2%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (* x1 (- 2.0 (* x1 (+ (* x1 3.0) 9.0))))))
(if (<= x1 -1.3e+154)
(+ x1 (- (* x2 -6.0) (* x1 (+ 2.0 (* 3.0 (* x1 (- (* x2 -2.0) 3.0)))))))
(if (<= x1 -6e+39)
(+
x1
(+
(* 3.0 (/ (- (- (* x1 (* x1 3.0)) (* 2.0 x2)) x1) (+ (* x1 x1) 1.0)))
(+ x1 (* x1 (+ 2.0 (* x1 (+ 3.0 (- (* x2 8.0) x1))))))))
(if (<= x1 2.05e+88)
(+
x1
(-
(* x2 -6.0)
(+ t_0 (* x2 (- (* x1 (- 12.0 (* x1 6.0))) (* 8.0 (* x1 x2)))))))
(- x1 (- t_0 (* x2 -6.0))))))))
double code(double x1, double x2) {
double t_0 = x1 * (2.0 - (x1 * ((x1 * 3.0) + 9.0)));
double tmp;
if (x1 <= -1.3e+154) {
tmp = x1 + ((x2 * -6.0) - (x1 * (2.0 + (3.0 * (x1 * ((x2 * -2.0) - 3.0))))));
} else if (x1 <= -6e+39) {
tmp = x1 + ((3.0 * ((((x1 * (x1 * 3.0)) - (2.0 * x2)) - x1) / ((x1 * x1) + 1.0))) + (x1 + (x1 * (2.0 + (x1 * (3.0 + ((x2 * 8.0) - x1)))))));
} else if (x1 <= 2.05e+88) {
tmp = x1 + ((x2 * -6.0) - (t_0 + (x2 * ((x1 * (12.0 - (x1 * 6.0))) - (8.0 * (x1 * x2))))));
} else {
tmp = x1 - (t_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 = x1 * (2.0d0 - (x1 * ((x1 * 3.0d0) + 9.0d0)))
if (x1 <= (-1.3d+154)) then
tmp = x1 + ((x2 * (-6.0d0)) - (x1 * (2.0d0 + (3.0d0 * (x1 * ((x2 * (-2.0d0)) - 3.0d0))))))
else if (x1 <= (-6d+39)) then
tmp = x1 + ((3.0d0 * ((((x1 * (x1 * 3.0d0)) - (2.0d0 * x2)) - x1) / ((x1 * x1) + 1.0d0))) + (x1 + (x1 * (2.0d0 + (x1 * (3.0d0 + ((x2 * 8.0d0) - x1)))))))
else if (x1 <= 2.05d+88) then
tmp = x1 + ((x2 * (-6.0d0)) - (t_0 + (x2 * ((x1 * (12.0d0 - (x1 * 6.0d0))) - (8.0d0 * (x1 * x2))))))
else
tmp = x1 - (t_0 - (x2 * (-6.0d0)))
end if
code = tmp
end function
public static double code(double x1, double x2) {
double t_0 = x1 * (2.0 - (x1 * ((x1 * 3.0) + 9.0)));
double tmp;
if (x1 <= -1.3e+154) {
tmp = x1 + ((x2 * -6.0) - (x1 * (2.0 + (3.0 * (x1 * ((x2 * -2.0) - 3.0))))));
} else if (x1 <= -6e+39) {
tmp = x1 + ((3.0 * ((((x1 * (x1 * 3.0)) - (2.0 * x2)) - x1) / ((x1 * x1) + 1.0))) + (x1 + (x1 * (2.0 + (x1 * (3.0 + ((x2 * 8.0) - x1)))))));
} else if (x1 <= 2.05e+88) {
tmp = x1 + ((x2 * -6.0) - (t_0 + (x2 * ((x1 * (12.0 - (x1 * 6.0))) - (8.0 * (x1 * x2))))));
} else {
tmp = x1 - (t_0 - (x2 * -6.0));
}
return tmp;
}
def code(x1, x2): t_0 = x1 * (2.0 - (x1 * ((x1 * 3.0) + 9.0))) tmp = 0 if x1 <= -1.3e+154: tmp = x1 + ((x2 * -6.0) - (x1 * (2.0 + (3.0 * (x1 * ((x2 * -2.0) - 3.0)))))) elif x1 <= -6e+39: tmp = x1 + ((3.0 * ((((x1 * (x1 * 3.0)) - (2.0 * x2)) - x1) / ((x1 * x1) + 1.0))) + (x1 + (x1 * (2.0 + (x1 * (3.0 + ((x2 * 8.0) - x1))))))) elif x1 <= 2.05e+88: tmp = x1 + ((x2 * -6.0) - (t_0 + (x2 * ((x1 * (12.0 - (x1 * 6.0))) - (8.0 * (x1 * x2)))))) else: tmp = x1 - (t_0 - (x2 * -6.0)) return tmp
function code(x1, x2) t_0 = Float64(x1 * Float64(2.0 - Float64(x1 * Float64(Float64(x1 * 3.0) + 9.0)))) tmp = 0.0 if (x1 <= -1.3e+154) tmp = Float64(x1 + Float64(Float64(x2 * -6.0) - Float64(x1 * Float64(2.0 + Float64(3.0 * Float64(x1 * Float64(Float64(x2 * -2.0) - 3.0))))))); elseif (x1 <= -6e+39) tmp = Float64(x1 + Float64(Float64(3.0 * Float64(Float64(Float64(Float64(x1 * Float64(x1 * 3.0)) - Float64(2.0 * x2)) - x1) / Float64(Float64(x1 * x1) + 1.0))) + Float64(x1 + Float64(x1 * Float64(2.0 + Float64(x1 * Float64(3.0 + Float64(Float64(x2 * 8.0) - x1)))))))); elseif (x1 <= 2.05e+88) tmp = Float64(x1 + Float64(Float64(x2 * -6.0) - Float64(t_0 + Float64(x2 * Float64(Float64(x1 * Float64(12.0 - Float64(x1 * 6.0))) - Float64(8.0 * Float64(x1 * x2))))))); else tmp = Float64(x1 - Float64(t_0 - Float64(x2 * -6.0))); end return tmp end
function tmp_2 = code(x1, x2) t_0 = x1 * (2.0 - (x1 * ((x1 * 3.0) + 9.0))); tmp = 0.0; if (x1 <= -1.3e+154) tmp = x1 + ((x2 * -6.0) - (x1 * (2.0 + (3.0 * (x1 * ((x2 * -2.0) - 3.0)))))); elseif (x1 <= -6e+39) tmp = x1 + ((3.0 * ((((x1 * (x1 * 3.0)) - (2.0 * x2)) - x1) / ((x1 * x1) + 1.0))) + (x1 + (x1 * (2.0 + (x1 * (3.0 + ((x2 * 8.0) - x1))))))); elseif (x1 <= 2.05e+88) tmp = x1 + ((x2 * -6.0) - (t_0 + (x2 * ((x1 * (12.0 - (x1 * 6.0))) - (8.0 * (x1 * x2)))))); else tmp = x1 - (t_0 - (x2 * -6.0)); end tmp_2 = tmp; end
code[x1_, x2_] := Block[{t$95$0 = N[(x1 * N[(2.0 - N[(x1 * N[(N[(x1 * 3.0), $MachinePrecision] + 9.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x1, -1.3e+154], N[(x1 + N[(N[(x2 * -6.0), $MachinePrecision] - N[(x1 * N[(2.0 + N[(3.0 * N[(x1 * N[(N[(x2 * -2.0), $MachinePrecision] - 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, -6e+39], N[(x1 + N[(N[(3.0 * N[(N[(N[(N[(x1 * N[(x1 * 3.0), $MachinePrecision]), $MachinePrecision] - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / N[(N[(x1 * x1), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(x1 + N[(x1 * N[(2.0 + N[(x1 * N[(3.0 + N[(N[(x2 * 8.0), $MachinePrecision] - x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 2.05e+88], N[(x1 + N[(N[(x2 * -6.0), $MachinePrecision] - N[(t$95$0 + N[(x2 * N[(N[(x1 * N[(12.0 - N[(x1 * 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(8.0 * N[(x1 * x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x1 - N[(t$95$0 - N[(x2 * -6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x1 \cdot \left(2 - x1 \cdot \left(x1 \cdot 3 + 9\right)\right)\\
\mathbf{if}\;x1 \leq -1.3 \cdot 10^{+154}:\\
\;\;\;\;x1 + \left(x2 \cdot -6 - x1 \cdot \left(2 + 3 \cdot \left(x1 \cdot \left(x2 \cdot -2 - 3\right)\right)\right)\right)\\
\mathbf{elif}\;x1 \leq -6 \cdot 10^{+39}:\\
\;\;\;\;x1 + \left(3 \cdot \frac{\left(x1 \cdot \left(x1 \cdot 3\right) - 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1} + \left(x1 + x1 \cdot \left(2 + x1 \cdot \left(3 + \left(x2 \cdot 8 - x1\right)\right)\right)\right)\right)\\
\mathbf{elif}\;x1 \leq 2.05 \cdot 10^{+88}:\\
\;\;\;\;x1 + \left(x2 \cdot -6 - \left(t\_0 + x2 \cdot \left(x1 \cdot \left(12 - x1 \cdot 6\right) - 8 \cdot \left(x1 \cdot x2\right)\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x1 - \left(t\_0 - x2 \cdot -6\right)\\
\end{array}
\end{array}
if x1 < -1.29999999999999994e154Initial program 0.0%
Taylor expanded in x1 around inf 0.0%
Taylor expanded in x1 around 0 86.5%
if -1.29999999999999994e154 < x1 < -5.9999999999999999e39Initial program 55.2%
Taylor expanded in x1 around 0 47.6%
+-commutative47.6%
mul-1-neg47.6%
sub-neg47.6%
Simplified47.6%
Taylor expanded in x1 around inf 47.6%
Taylor expanded in x1 around inf 53.6%
*-commutative53.6%
Simplified53.6%
Taylor expanded in x1 around 0 49.2%
if -5.9999999999999999e39 < x1 < 2.05000000000000014e88Initial program 99.3%
Taylor expanded in x1 around 0 79.2%
Taylor expanded in x1 around 0 79.7%
Taylor expanded in x2 around 0 89.1%
if 2.05000000000000014e88 < x1 Initial program 32.6%
Taylor expanded in x1 around 0 8.2%
Taylor expanded in x1 around 0 86.5%
Taylor expanded in x2 around 0 93.4%
*-commutative93.4%
Simplified93.4%
Final simplification85.3%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (* x1 (- 2.0 (* x1 (+ (* x1 3.0) 9.0))))))
(if (<= x1 -1.75e+40)
(+ x1 (- (* x2 -6.0) (* x1 (+ 2.0 (* 3.0 (* x1 (- (* x2 -2.0) 3.0)))))))
(if (<= x1 4.2e+89)
(+
x1
(-
(* x2 -6.0)
(+ t_0 (* x2 (- (* x1 (- 12.0 (* x1 6.0))) (* 8.0 (* x1 x2)))))))
(- x1 (- t_0 (* x2 -6.0)))))))
double code(double x1, double x2) {
double t_0 = x1 * (2.0 - (x1 * ((x1 * 3.0) + 9.0)));
double tmp;
if (x1 <= -1.75e+40) {
tmp = x1 + ((x2 * -6.0) - (x1 * (2.0 + (3.0 * (x1 * ((x2 * -2.0) - 3.0))))));
} else if (x1 <= 4.2e+89) {
tmp = x1 + ((x2 * -6.0) - (t_0 + (x2 * ((x1 * (12.0 - (x1 * 6.0))) - (8.0 * (x1 * x2))))));
} else {
tmp = x1 - (t_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 = x1 * (2.0d0 - (x1 * ((x1 * 3.0d0) + 9.0d0)))
if (x1 <= (-1.75d+40)) then
tmp = x1 + ((x2 * (-6.0d0)) - (x1 * (2.0d0 + (3.0d0 * (x1 * ((x2 * (-2.0d0)) - 3.0d0))))))
else if (x1 <= 4.2d+89) then
tmp = x1 + ((x2 * (-6.0d0)) - (t_0 + (x2 * ((x1 * (12.0d0 - (x1 * 6.0d0))) - (8.0d0 * (x1 * x2))))))
else
tmp = x1 - (t_0 - (x2 * (-6.0d0)))
end if
code = tmp
end function
public static double code(double x1, double x2) {
double t_0 = x1 * (2.0 - (x1 * ((x1 * 3.0) + 9.0)));
double tmp;
if (x1 <= -1.75e+40) {
tmp = x1 + ((x2 * -6.0) - (x1 * (2.0 + (3.0 * (x1 * ((x2 * -2.0) - 3.0))))));
} else if (x1 <= 4.2e+89) {
tmp = x1 + ((x2 * -6.0) - (t_0 + (x2 * ((x1 * (12.0 - (x1 * 6.0))) - (8.0 * (x1 * x2))))));
} else {
tmp = x1 - (t_0 - (x2 * -6.0));
}
return tmp;
}
def code(x1, x2): t_0 = x1 * (2.0 - (x1 * ((x1 * 3.0) + 9.0))) tmp = 0 if x1 <= -1.75e+40: tmp = x1 + ((x2 * -6.0) - (x1 * (2.0 + (3.0 * (x1 * ((x2 * -2.0) - 3.0)))))) elif x1 <= 4.2e+89: tmp = x1 + ((x2 * -6.0) - (t_0 + (x2 * ((x1 * (12.0 - (x1 * 6.0))) - (8.0 * (x1 * x2)))))) else: tmp = x1 - (t_0 - (x2 * -6.0)) return tmp
function code(x1, x2) t_0 = Float64(x1 * Float64(2.0 - Float64(x1 * Float64(Float64(x1 * 3.0) + 9.0)))) tmp = 0.0 if (x1 <= -1.75e+40) tmp = Float64(x1 + Float64(Float64(x2 * -6.0) - Float64(x1 * Float64(2.0 + Float64(3.0 * Float64(x1 * Float64(Float64(x2 * -2.0) - 3.0))))))); elseif (x1 <= 4.2e+89) tmp = Float64(x1 + Float64(Float64(x2 * -6.0) - Float64(t_0 + Float64(x2 * Float64(Float64(x1 * Float64(12.0 - Float64(x1 * 6.0))) - Float64(8.0 * Float64(x1 * x2))))))); else tmp = Float64(x1 - Float64(t_0 - Float64(x2 * -6.0))); end return tmp end
function tmp_2 = code(x1, x2) t_0 = x1 * (2.0 - (x1 * ((x1 * 3.0) + 9.0))); tmp = 0.0; if (x1 <= -1.75e+40) tmp = x1 + ((x2 * -6.0) - (x1 * (2.0 + (3.0 * (x1 * ((x2 * -2.0) - 3.0)))))); elseif (x1 <= 4.2e+89) tmp = x1 + ((x2 * -6.0) - (t_0 + (x2 * ((x1 * (12.0 - (x1 * 6.0))) - (8.0 * (x1 * x2)))))); else tmp = x1 - (t_0 - (x2 * -6.0)); end tmp_2 = tmp; end
code[x1_, x2_] := Block[{t$95$0 = N[(x1 * N[(2.0 - N[(x1 * N[(N[(x1 * 3.0), $MachinePrecision] + 9.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x1, -1.75e+40], N[(x1 + N[(N[(x2 * -6.0), $MachinePrecision] - N[(x1 * N[(2.0 + N[(3.0 * N[(x1 * N[(N[(x2 * -2.0), $MachinePrecision] - 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 4.2e+89], N[(x1 + N[(N[(x2 * -6.0), $MachinePrecision] - N[(t$95$0 + N[(x2 * N[(N[(x1 * N[(12.0 - N[(x1 * 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(8.0 * N[(x1 * x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x1 - N[(t$95$0 - N[(x2 * -6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x1 \cdot \left(2 - x1 \cdot \left(x1 \cdot 3 + 9\right)\right)\\
\mathbf{if}\;x1 \leq -1.75 \cdot 10^{+40}:\\
\;\;\;\;x1 + \left(x2 \cdot -6 - x1 \cdot \left(2 + 3 \cdot \left(x1 \cdot \left(x2 \cdot -2 - 3\right)\right)\right)\right)\\
\mathbf{elif}\;x1 \leq 4.2 \cdot 10^{+89}:\\
\;\;\;\;x1 + \left(x2 \cdot -6 - \left(t\_0 + x2 \cdot \left(x1 \cdot \left(12 - x1 \cdot 6\right) - 8 \cdot \left(x1 \cdot x2\right)\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x1 - \left(t\_0 - x2 \cdot -6\right)\\
\end{array}
\end{array}
if x1 < -1.75e40Initial program 23.3%
Taylor expanded in x1 around inf 39.0%
Taylor expanded in x1 around 0 58.1%
if -1.75e40 < x1 < 4.19999999999999972e89Initial program 99.3%
Taylor expanded in x1 around 0 79.2%
Taylor expanded in x1 around 0 79.7%
Taylor expanded in x2 around 0 89.1%
if 4.19999999999999972e89 < x1 Initial program 32.6%
Taylor expanded in x1 around 0 8.2%
Taylor expanded in x1 around 0 86.5%
Taylor expanded in x2 around 0 93.4%
*-commutative93.4%
Simplified93.4%
Final simplification82.1%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (* 4.0 (* x2 (- (* 2.0 x2) 3.0)))))
(if (<= x1 -2e+39)
(+ x1 (- (* x2 -6.0) (* x1 (+ 2.0 (* 3.0 (* x1 (- (* x2 -2.0) 3.0)))))))
(if (<= x1 -5e-155)
(+ x1 (+ (* x2 -6.0) (* x1 (- (+ t_0 (* 6.0 (* x1 x2))) 2.0))))
(if (<= x1 2.8e-235)
(+ x1 (+ (* x2 -6.0) (* x1 -2.0)))
(if (<= x1 4.2e+89)
(+ x1 (+ (* x2 -6.0) (* x1 (- t_0 2.0))))
(-
x1
(- (* x1 (- 2.0 (* x1 (+ (* x1 3.0) 9.0)))) (* x2 -6.0)))))))))
double code(double x1, double x2) {
double t_0 = 4.0 * (x2 * ((2.0 * x2) - 3.0));
double tmp;
if (x1 <= -2e+39) {
tmp = x1 + ((x2 * -6.0) - (x1 * (2.0 + (3.0 * (x1 * ((x2 * -2.0) - 3.0))))));
} else if (x1 <= -5e-155) {
tmp = x1 + ((x2 * -6.0) + (x1 * ((t_0 + (6.0 * (x1 * x2))) - 2.0)));
} else if (x1 <= 2.8e-235) {
tmp = x1 + ((x2 * -6.0) + (x1 * -2.0));
} else if (x1 <= 4.2e+89) {
tmp = x1 + ((x2 * -6.0) + (x1 * (t_0 - 2.0)));
} else {
tmp = x1 - ((x1 * (2.0 - (x1 * ((x1 * 3.0) + 9.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 * ((2.0d0 * x2) - 3.0d0))
if (x1 <= (-2d+39)) then
tmp = x1 + ((x2 * (-6.0d0)) - (x1 * (2.0d0 + (3.0d0 * (x1 * ((x2 * (-2.0d0)) - 3.0d0))))))
else if (x1 <= (-5d-155)) then
tmp = x1 + ((x2 * (-6.0d0)) + (x1 * ((t_0 + (6.0d0 * (x1 * x2))) - 2.0d0)))
else if (x1 <= 2.8d-235) then
tmp = x1 + ((x2 * (-6.0d0)) + (x1 * (-2.0d0)))
else if (x1 <= 4.2d+89) then
tmp = x1 + ((x2 * (-6.0d0)) + (x1 * (t_0 - 2.0d0)))
else
tmp = x1 - ((x1 * (2.0d0 - (x1 * ((x1 * 3.0d0) + 9.0d0)))) - (x2 * (-6.0d0)))
end if
code = tmp
end function
public static double code(double x1, double x2) {
double t_0 = 4.0 * (x2 * ((2.0 * x2) - 3.0));
double tmp;
if (x1 <= -2e+39) {
tmp = x1 + ((x2 * -6.0) - (x1 * (2.0 + (3.0 * (x1 * ((x2 * -2.0) - 3.0))))));
} else if (x1 <= -5e-155) {
tmp = x1 + ((x2 * -6.0) + (x1 * ((t_0 + (6.0 * (x1 * x2))) - 2.0)));
} else if (x1 <= 2.8e-235) {
tmp = x1 + ((x2 * -6.0) + (x1 * -2.0));
} else if (x1 <= 4.2e+89) {
tmp = x1 + ((x2 * -6.0) + (x1 * (t_0 - 2.0)));
} else {
tmp = x1 - ((x1 * (2.0 - (x1 * ((x1 * 3.0) + 9.0)))) - (x2 * -6.0));
}
return tmp;
}
def code(x1, x2): t_0 = 4.0 * (x2 * ((2.0 * x2) - 3.0)) tmp = 0 if x1 <= -2e+39: tmp = x1 + ((x2 * -6.0) - (x1 * (2.0 + (3.0 * (x1 * ((x2 * -2.0) - 3.0)))))) elif x1 <= -5e-155: tmp = x1 + ((x2 * -6.0) + (x1 * ((t_0 + (6.0 * (x1 * x2))) - 2.0))) elif x1 <= 2.8e-235: tmp = x1 + ((x2 * -6.0) + (x1 * -2.0)) elif x1 <= 4.2e+89: tmp = x1 + ((x2 * -6.0) + (x1 * (t_0 - 2.0))) else: tmp = x1 - ((x1 * (2.0 - (x1 * ((x1 * 3.0) + 9.0)))) - (x2 * -6.0)) return tmp
function code(x1, x2) t_0 = Float64(4.0 * Float64(x2 * Float64(Float64(2.0 * x2) - 3.0))) tmp = 0.0 if (x1 <= -2e+39) tmp = Float64(x1 + Float64(Float64(x2 * -6.0) - Float64(x1 * Float64(2.0 + Float64(3.0 * Float64(x1 * Float64(Float64(x2 * -2.0) - 3.0))))))); elseif (x1 <= -5e-155) tmp = Float64(x1 + Float64(Float64(x2 * -6.0) + Float64(x1 * Float64(Float64(t_0 + Float64(6.0 * Float64(x1 * x2))) - 2.0)))); elseif (x1 <= 2.8e-235) tmp = Float64(x1 + Float64(Float64(x2 * -6.0) + Float64(x1 * -2.0))); elseif (x1 <= 4.2e+89) tmp = Float64(x1 + Float64(Float64(x2 * -6.0) + Float64(x1 * Float64(t_0 - 2.0)))); else tmp = Float64(x1 - Float64(Float64(x1 * Float64(2.0 - Float64(x1 * Float64(Float64(x1 * 3.0) + 9.0)))) - Float64(x2 * -6.0))); end return tmp end
function tmp_2 = code(x1, x2) t_0 = 4.0 * (x2 * ((2.0 * x2) - 3.0)); tmp = 0.0; if (x1 <= -2e+39) tmp = x1 + ((x2 * -6.0) - (x1 * (2.0 + (3.0 * (x1 * ((x2 * -2.0) - 3.0)))))); elseif (x1 <= -5e-155) tmp = x1 + ((x2 * -6.0) + (x1 * ((t_0 + (6.0 * (x1 * x2))) - 2.0))); elseif (x1 <= 2.8e-235) tmp = x1 + ((x2 * -6.0) + (x1 * -2.0)); elseif (x1 <= 4.2e+89) tmp = x1 + ((x2 * -6.0) + (x1 * (t_0 - 2.0))); else tmp = x1 - ((x1 * (2.0 - (x1 * ((x1 * 3.0) + 9.0)))) - (x2 * -6.0)); end tmp_2 = tmp; end
code[x1_, x2_] := Block[{t$95$0 = N[(4.0 * N[(x2 * N[(N[(2.0 * x2), $MachinePrecision] - 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x1, -2e+39], N[(x1 + N[(N[(x2 * -6.0), $MachinePrecision] - N[(x1 * N[(2.0 + N[(3.0 * N[(x1 * N[(N[(x2 * -2.0), $MachinePrecision] - 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, -5e-155], N[(x1 + N[(N[(x2 * -6.0), $MachinePrecision] + N[(x1 * N[(N[(t$95$0 + N[(6.0 * N[(x1 * x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 2.8e-235], N[(x1 + N[(N[(x2 * -6.0), $MachinePrecision] + N[(x1 * -2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 4.2e+89], N[(x1 + N[(N[(x2 * -6.0), $MachinePrecision] + N[(x1 * N[(t$95$0 - 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x1 - N[(N[(x1 * N[(2.0 - N[(x1 * N[(N[(x1 * 3.0), $MachinePrecision] + 9.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(x2 * -6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := 4 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right)\\
\mathbf{if}\;x1 \leq -2 \cdot 10^{+39}:\\
\;\;\;\;x1 + \left(x2 \cdot -6 - x1 \cdot \left(2 + 3 \cdot \left(x1 \cdot \left(x2 \cdot -2 - 3\right)\right)\right)\right)\\
\mathbf{elif}\;x1 \leq -5 \cdot 10^{-155}:\\
\;\;\;\;x1 + \left(x2 \cdot -6 + x1 \cdot \left(\left(t\_0 + 6 \cdot \left(x1 \cdot x2\right)\right) - 2\right)\right)\\
\mathbf{elif}\;x1 \leq 2.8 \cdot 10^{-235}:\\
\;\;\;\;x1 + \left(x2 \cdot -6 + x1 \cdot -2\right)\\
\mathbf{elif}\;x1 \leq 4.2 \cdot 10^{+89}:\\
\;\;\;\;x1 + \left(x2 \cdot -6 + x1 \cdot \left(t\_0 - 2\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x1 - \left(x1 \cdot \left(2 - x1 \cdot \left(x1 \cdot 3 + 9\right)\right) - x2 \cdot -6\right)\\
\end{array}
\end{array}
if x1 < -1.99999999999999988e39Initial program 23.3%
Taylor expanded in x1 around inf 39.0%
Taylor expanded in x1 around 0 58.1%
if -1.99999999999999988e39 < x1 < -4.9999999999999999e-155Initial program 99.0%
Taylor expanded in x1 around 0 80.0%
Taylor expanded in x1 around 0 80.6%
Taylor expanded in x2 around inf 80.2%
if -4.9999999999999999e-155 < x1 < 2.79999999999999995e-235Initial program 99.4%
Taylor expanded in x1 around 0 82.1%
Taylor expanded in x1 around 0 82.5%
Taylor expanded in x2 around inf 82.5%
*-commutative82.5%
associate-*r*82.5%
Simplified82.5%
Taylor expanded in x2 around 0 98.3%
*-commutative98.3%
Simplified98.3%
if 2.79999999999999995e-235 < x1 < 4.19999999999999972e89Initial program 99.4%
Taylor expanded in x1 around 0 75.4%
Taylor expanded in x1 around 0 75.3%
if 4.19999999999999972e89 < x1 Initial program 32.6%
Taylor expanded in x1 around 0 8.2%
Taylor expanded in x1 around 0 86.5%
Taylor expanded in x2 around 0 93.4%
*-commutative93.4%
Simplified93.4%
Final simplification80.2%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0
(+
x1
(+ (* x2 -6.0) (* x1 (- (* 4.0 (* x2 (- (* 2.0 x2) 3.0))) 2.0))))))
(if (<= x1 -1.85e+40)
(+ x1 (- (* x2 -6.0) (* x1 (+ 2.0 (* 3.0 (* x1 (- (* x2 -2.0) 3.0)))))))
(if (<= x1 -5e-155)
t_0
(if (<= x1 1.15e-234)
(+ x1 (+ (* x2 -6.0) (* x1 -2.0)))
(if (<= x1 4.2e+89)
t_0
(-
x1
(- (* x1 (- 2.0 (* x1 (+ (* x1 3.0) 9.0)))) (* x2 -6.0)))))))))
double code(double x1, double x2) {
double t_0 = x1 + ((x2 * -6.0) + (x1 * ((4.0 * (x2 * ((2.0 * x2) - 3.0))) - 2.0)));
double tmp;
if (x1 <= -1.85e+40) {
tmp = x1 + ((x2 * -6.0) - (x1 * (2.0 + (3.0 * (x1 * ((x2 * -2.0) - 3.0))))));
} else if (x1 <= -5e-155) {
tmp = t_0;
} else if (x1 <= 1.15e-234) {
tmp = x1 + ((x2 * -6.0) + (x1 * -2.0));
} else if (x1 <= 4.2e+89) {
tmp = t_0;
} else {
tmp = x1 - ((x1 * (2.0 - (x1 * ((x1 * 3.0) + 9.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 = x1 + ((x2 * (-6.0d0)) + (x1 * ((4.0d0 * (x2 * ((2.0d0 * x2) - 3.0d0))) - 2.0d0)))
if (x1 <= (-1.85d+40)) then
tmp = x1 + ((x2 * (-6.0d0)) - (x1 * (2.0d0 + (3.0d0 * (x1 * ((x2 * (-2.0d0)) - 3.0d0))))))
else if (x1 <= (-5d-155)) then
tmp = t_0
else if (x1 <= 1.15d-234) then
tmp = x1 + ((x2 * (-6.0d0)) + (x1 * (-2.0d0)))
else if (x1 <= 4.2d+89) then
tmp = t_0
else
tmp = x1 - ((x1 * (2.0d0 - (x1 * ((x1 * 3.0d0) + 9.0d0)))) - (x2 * (-6.0d0)))
end if
code = tmp
end function
public static double code(double x1, double x2) {
double t_0 = x1 + ((x2 * -6.0) + (x1 * ((4.0 * (x2 * ((2.0 * x2) - 3.0))) - 2.0)));
double tmp;
if (x1 <= -1.85e+40) {
tmp = x1 + ((x2 * -6.0) - (x1 * (2.0 + (3.0 * (x1 * ((x2 * -2.0) - 3.0))))));
} else if (x1 <= -5e-155) {
tmp = t_0;
} else if (x1 <= 1.15e-234) {
tmp = x1 + ((x2 * -6.0) + (x1 * -2.0));
} else if (x1 <= 4.2e+89) {
tmp = t_0;
} else {
tmp = x1 - ((x1 * (2.0 - (x1 * ((x1 * 3.0) + 9.0)))) - (x2 * -6.0));
}
return tmp;
}
def code(x1, x2): t_0 = x1 + ((x2 * -6.0) + (x1 * ((4.0 * (x2 * ((2.0 * x2) - 3.0))) - 2.0))) tmp = 0 if x1 <= -1.85e+40: tmp = x1 + ((x2 * -6.0) - (x1 * (2.0 + (3.0 * (x1 * ((x2 * -2.0) - 3.0)))))) elif x1 <= -5e-155: tmp = t_0 elif x1 <= 1.15e-234: tmp = x1 + ((x2 * -6.0) + (x1 * -2.0)) elif x1 <= 4.2e+89: tmp = t_0 else: tmp = x1 - ((x1 * (2.0 - (x1 * ((x1 * 3.0) + 9.0)))) - (x2 * -6.0)) return tmp
function code(x1, x2) t_0 = Float64(x1 + Float64(Float64(x2 * -6.0) + Float64(x1 * Float64(Float64(4.0 * Float64(x2 * Float64(Float64(2.0 * x2) - 3.0))) - 2.0)))) tmp = 0.0 if (x1 <= -1.85e+40) tmp = Float64(x1 + Float64(Float64(x2 * -6.0) - Float64(x1 * Float64(2.0 + Float64(3.0 * Float64(x1 * Float64(Float64(x2 * -2.0) - 3.0))))))); elseif (x1 <= -5e-155) tmp = t_0; elseif (x1 <= 1.15e-234) tmp = Float64(x1 + Float64(Float64(x2 * -6.0) + Float64(x1 * -2.0))); elseif (x1 <= 4.2e+89) tmp = t_0; else tmp = Float64(x1 - Float64(Float64(x1 * Float64(2.0 - Float64(x1 * Float64(Float64(x1 * 3.0) + 9.0)))) - Float64(x2 * -6.0))); end return tmp end
function tmp_2 = code(x1, x2) t_0 = x1 + ((x2 * -6.0) + (x1 * ((4.0 * (x2 * ((2.0 * x2) - 3.0))) - 2.0))); tmp = 0.0; if (x1 <= -1.85e+40) tmp = x1 + ((x2 * -6.0) - (x1 * (2.0 + (3.0 * (x1 * ((x2 * -2.0) - 3.0)))))); elseif (x1 <= -5e-155) tmp = t_0; elseif (x1 <= 1.15e-234) tmp = x1 + ((x2 * -6.0) + (x1 * -2.0)); elseif (x1 <= 4.2e+89) tmp = t_0; else tmp = x1 - ((x1 * (2.0 - (x1 * ((x1 * 3.0) + 9.0)))) - (x2 * -6.0)); end tmp_2 = tmp; end
code[x1_, x2_] := Block[{t$95$0 = N[(x1 + N[(N[(x2 * -6.0), $MachinePrecision] + N[(x1 * N[(N[(4.0 * N[(x2 * N[(N[(2.0 * x2), $MachinePrecision] - 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x1, -1.85e+40], N[(x1 + N[(N[(x2 * -6.0), $MachinePrecision] - N[(x1 * N[(2.0 + N[(3.0 * N[(x1 * N[(N[(x2 * -2.0), $MachinePrecision] - 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, -5e-155], t$95$0, If[LessEqual[x1, 1.15e-234], N[(x1 + N[(N[(x2 * -6.0), $MachinePrecision] + N[(x1 * -2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 4.2e+89], t$95$0, N[(x1 - N[(N[(x1 * N[(2.0 - N[(x1 * N[(N[(x1 * 3.0), $MachinePrecision] + 9.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(x2 * -6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x1 + \left(x2 \cdot -6 + x1 \cdot \left(4 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right) - 2\right)\right)\\
\mathbf{if}\;x1 \leq -1.85 \cdot 10^{+40}:\\
\;\;\;\;x1 + \left(x2 \cdot -6 - x1 \cdot \left(2 + 3 \cdot \left(x1 \cdot \left(x2 \cdot -2 - 3\right)\right)\right)\right)\\
\mathbf{elif}\;x1 \leq -5 \cdot 10^{-155}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;x1 \leq 1.15 \cdot 10^{-234}:\\
\;\;\;\;x1 + \left(x2 \cdot -6 + x1 \cdot -2\right)\\
\mathbf{elif}\;x1 \leq 4.2 \cdot 10^{+89}:\\
\;\;\;\;t\_0\\
\mathbf{else}:\\
\;\;\;\;x1 - \left(x1 \cdot \left(2 - x1 \cdot \left(x1 \cdot 3 + 9\right)\right) - x2 \cdot -6\right)\\
\end{array}
\end{array}
if x1 < -1.85e40Initial program 23.3%
Taylor expanded in x1 around inf 39.0%
Taylor expanded in x1 around 0 58.1%
if -1.85e40 < x1 < -4.9999999999999999e-155 or 1.14999999999999995e-234 < x1 < 4.19999999999999972e89Initial program 99.2%
Taylor expanded in x1 around 0 77.1%
Taylor expanded in x1 around 0 77.2%
if -4.9999999999999999e-155 < x1 < 1.14999999999999995e-234Initial program 99.4%
Taylor expanded in x1 around 0 82.1%
Taylor expanded in x1 around 0 82.5%
Taylor expanded in x2 around inf 82.5%
*-commutative82.5%
associate-*r*82.5%
Simplified82.5%
Taylor expanded in x2 around 0 98.3%
*-commutative98.3%
Simplified98.3%
if 4.19999999999999972e89 < x1 Initial program 32.6%
Taylor expanded in x1 around 0 8.2%
Taylor expanded in x1 around 0 86.5%
Taylor expanded in x2 around 0 93.4%
*-commutative93.4%
Simplified93.4%
Final simplification80.2%
(FPCore (x1 x2)
:precision binary64
(if (<= x1 -1.85e+40)
(+ x1 (- (* x2 -6.0) (* x1 (+ 2.0 (* 3.0 (* x1 (- (* x2 -2.0) 3.0)))))))
(if (<= x1 4.1e+89)
(+
x1
(+
(* x2 -6.0)
(+
(* x2 (+ (* 8.0 (* x1 x2)) (* x1 (- (* x1 6.0) 12.0))))
(* x1 -2.0))))
(- x1 (- (* x1 (- 2.0 (* x1 (+ (* x1 3.0) 9.0)))) (* x2 -6.0))))))
double code(double x1, double x2) {
double tmp;
if (x1 <= -1.85e+40) {
tmp = x1 + ((x2 * -6.0) - (x1 * (2.0 + (3.0 * (x1 * ((x2 * -2.0) - 3.0))))));
} else if (x1 <= 4.1e+89) {
tmp = x1 + ((x2 * -6.0) + ((x2 * ((8.0 * (x1 * x2)) + (x1 * ((x1 * 6.0) - 12.0)))) + (x1 * -2.0)));
} else {
tmp = x1 - ((x1 * (2.0 - (x1 * ((x1 * 3.0) + 9.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 <= (-1.85d+40)) then
tmp = x1 + ((x2 * (-6.0d0)) - (x1 * (2.0d0 + (3.0d0 * (x1 * ((x2 * (-2.0d0)) - 3.0d0))))))
else if (x1 <= 4.1d+89) then
tmp = x1 + ((x2 * (-6.0d0)) + ((x2 * ((8.0d0 * (x1 * x2)) + (x1 * ((x1 * 6.0d0) - 12.0d0)))) + (x1 * (-2.0d0))))
else
tmp = x1 - ((x1 * (2.0d0 - (x1 * ((x1 * 3.0d0) + 9.0d0)))) - (x2 * (-6.0d0)))
end if
code = tmp
end function
public static double code(double x1, double x2) {
double tmp;
if (x1 <= -1.85e+40) {
tmp = x1 + ((x2 * -6.0) - (x1 * (2.0 + (3.0 * (x1 * ((x2 * -2.0) - 3.0))))));
} else if (x1 <= 4.1e+89) {
tmp = x1 + ((x2 * -6.0) + ((x2 * ((8.0 * (x1 * x2)) + (x1 * ((x1 * 6.0) - 12.0)))) + (x1 * -2.0)));
} else {
tmp = x1 - ((x1 * (2.0 - (x1 * ((x1 * 3.0) + 9.0)))) - (x2 * -6.0));
}
return tmp;
}
def code(x1, x2): tmp = 0 if x1 <= -1.85e+40: tmp = x1 + ((x2 * -6.0) - (x1 * (2.0 + (3.0 * (x1 * ((x2 * -2.0) - 3.0)))))) elif x1 <= 4.1e+89: tmp = x1 + ((x2 * -6.0) + ((x2 * ((8.0 * (x1 * x2)) + (x1 * ((x1 * 6.0) - 12.0)))) + (x1 * -2.0))) else: tmp = x1 - ((x1 * (2.0 - (x1 * ((x1 * 3.0) + 9.0)))) - (x2 * -6.0)) return tmp
function code(x1, x2) tmp = 0.0 if (x1 <= -1.85e+40) tmp = Float64(x1 + Float64(Float64(x2 * -6.0) - Float64(x1 * Float64(2.0 + Float64(3.0 * Float64(x1 * Float64(Float64(x2 * -2.0) - 3.0))))))); elseif (x1 <= 4.1e+89) tmp = Float64(x1 + Float64(Float64(x2 * -6.0) + Float64(Float64(x2 * Float64(Float64(8.0 * Float64(x1 * x2)) + Float64(x1 * Float64(Float64(x1 * 6.0) - 12.0)))) + Float64(x1 * -2.0)))); else tmp = Float64(x1 - Float64(Float64(x1 * Float64(2.0 - Float64(x1 * Float64(Float64(x1 * 3.0) + 9.0)))) - Float64(x2 * -6.0))); end return tmp end
function tmp_2 = code(x1, x2) tmp = 0.0; if (x1 <= -1.85e+40) tmp = x1 + ((x2 * -6.0) - (x1 * (2.0 + (3.0 * (x1 * ((x2 * -2.0) - 3.0)))))); elseif (x1 <= 4.1e+89) tmp = x1 + ((x2 * -6.0) + ((x2 * ((8.0 * (x1 * x2)) + (x1 * ((x1 * 6.0) - 12.0)))) + (x1 * -2.0))); else tmp = x1 - ((x1 * (2.0 - (x1 * ((x1 * 3.0) + 9.0)))) - (x2 * -6.0)); end tmp_2 = tmp; end
code[x1_, x2_] := If[LessEqual[x1, -1.85e+40], N[(x1 + N[(N[(x2 * -6.0), $MachinePrecision] - N[(x1 * N[(2.0 + N[(3.0 * N[(x1 * N[(N[(x2 * -2.0), $MachinePrecision] - 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 4.1e+89], N[(x1 + N[(N[(x2 * -6.0), $MachinePrecision] + N[(N[(x2 * N[(N[(8.0 * N[(x1 * x2), $MachinePrecision]), $MachinePrecision] + N[(x1 * N[(N[(x1 * 6.0), $MachinePrecision] - 12.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(x1 * -2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x1 - N[(N[(x1 * N[(2.0 - N[(x1 * N[(N[(x1 * 3.0), $MachinePrecision] + 9.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(x2 * -6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x1 \leq -1.85 \cdot 10^{+40}:\\
\;\;\;\;x1 + \left(x2 \cdot -6 - x1 \cdot \left(2 + 3 \cdot \left(x1 \cdot \left(x2 \cdot -2 - 3\right)\right)\right)\right)\\
\mathbf{elif}\;x1 \leq 4.1 \cdot 10^{+89}:\\
\;\;\;\;x1 + \left(x2 \cdot -6 + \left(x2 \cdot \left(8 \cdot \left(x1 \cdot x2\right) + x1 \cdot \left(x1 \cdot 6 - 12\right)\right) + x1 \cdot -2\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x1 - \left(x1 \cdot \left(2 - x1 \cdot \left(x1 \cdot 3 + 9\right)\right) - x2 \cdot -6\right)\\
\end{array}
\end{array}
if x1 < -1.85e40Initial program 23.3%
Taylor expanded in x1 around inf 39.0%
Taylor expanded in x1 around 0 58.1%
if -1.85e40 < x1 < 4.09999999999999985e89Initial program 99.3%
Taylor expanded in x1 around 0 79.2%
Taylor expanded in x1 around 0 79.7%
Taylor expanded in x2 around inf 79.3%
*-commutative79.3%
associate-*r*79.3%
Simplified79.3%
Taylor expanded in x2 around 0 88.8%
if 4.09999999999999985e89 < x1 Initial program 32.6%
Taylor expanded in x1 around 0 8.2%
Taylor expanded in x1 around 0 86.5%
Taylor expanded in x2 around 0 93.4%
*-commutative93.4%
Simplified93.4%
Final simplification81.9%
(FPCore (x1 x2)
:precision binary64
(if (<= x1 1.95e-23)
(+ x1 (- (* x2 -6.0) (* x1 (+ 2.0 (* 3.0 (* x1 (- (* x2 -2.0) 3.0)))))))
(if (<= x1 4.2e+89)
(- x1 (* x1 (+ -1.0 (* 4.0 (* x2 (- 3.0 (* 2.0 x2)))))))
(- x1 (- (* x1 (- 2.0 (* x1 (+ (* x1 3.0) 9.0)))) (* x2 -6.0))))))
double code(double x1, double x2) {
double tmp;
if (x1 <= 1.95e-23) {
tmp = x1 + ((x2 * -6.0) - (x1 * (2.0 + (3.0 * (x1 * ((x2 * -2.0) - 3.0))))));
} else if (x1 <= 4.2e+89) {
tmp = x1 - (x1 * (-1.0 + (4.0 * (x2 * (3.0 - (2.0 * x2))))));
} else {
tmp = x1 - ((x1 * (2.0 - (x1 * ((x1 * 3.0) + 9.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 <= 1.95d-23) then
tmp = x1 + ((x2 * (-6.0d0)) - (x1 * (2.0d0 + (3.0d0 * (x1 * ((x2 * (-2.0d0)) - 3.0d0))))))
else if (x1 <= 4.2d+89) then
tmp = x1 - (x1 * ((-1.0d0) + (4.0d0 * (x2 * (3.0d0 - (2.0d0 * x2))))))
else
tmp = x1 - ((x1 * (2.0d0 - (x1 * ((x1 * 3.0d0) + 9.0d0)))) - (x2 * (-6.0d0)))
end if
code = tmp
end function
public static double code(double x1, double x2) {
double tmp;
if (x1 <= 1.95e-23) {
tmp = x1 + ((x2 * -6.0) - (x1 * (2.0 + (3.0 * (x1 * ((x2 * -2.0) - 3.0))))));
} else if (x1 <= 4.2e+89) {
tmp = x1 - (x1 * (-1.0 + (4.0 * (x2 * (3.0 - (2.0 * x2))))));
} else {
tmp = x1 - ((x1 * (2.0 - (x1 * ((x1 * 3.0) + 9.0)))) - (x2 * -6.0));
}
return tmp;
}
def code(x1, x2): tmp = 0 if x1 <= 1.95e-23: tmp = x1 + ((x2 * -6.0) - (x1 * (2.0 + (3.0 * (x1 * ((x2 * -2.0) - 3.0)))))) elif x1 <= 4.2e+89: tmp = x1 - (x1 * (-1.0 + (4.0 * (x2 * (3.0 - (2.0 * x2)))))) else: tmp = x1 - ((x1 * (2.0 - (x1 * ((x1 * 3.0) + 9.0)))) - (x2 * -6.0)) return tmp
function code(x1, x2) tmp = 0.0 if (x1 <= 1.95e-23) tmp = Float64(x1 + Float64(Float64(x2 * -6.0) - Float64(x1 * Float64(2.0 + Float64(3.0 * Float64(x1 * Float64(Float64(x2 * -2.0) - 3.0))))))); elseif (x1 <= 4.2e+89) tmp = Float64(x1 - Float64(x1 * Float64(-1.0 + Float64(4.0 * Float64(x2 * Float64(3.0 - Float64(2.0 * x2))))))); else tmp = Float64(x1 - Float64(Float64(x1 * Float64(2.0 - Float64(x1 * Float64(Float64(x1 * 3.0) + 9.0)))) - Float64(x2 * -6.0))); end return tmp end
function tmp_2 = code(x1, x2) tmp = 0.0; if (x1 <= 1.95e-23) tmp = x1 + ((x2 * -6.0) - (x1 * (2.0 + (3.0 * (x1 * ((x2 * -2.0) - 3.0)))))); elseif (x1 <= 4.2e+89) tmp = x1 - (x1 * (-1.0 + (4.0 * (x2 * (3.0 - (2.0 * x2)))))); else tmp = x1 - ((x1 * (2.0 - (x1 * ((x1 * 3.0) + 9.0)))) - (x2 * -6.0)); end tmp_2 = tmp; end
code[x1_, x2_] := If[LessEqual[x1, 1.95e-23], N[(x1 + N[(N[(x2 * -6.0), $MachinePrecision] - N[(x1 * N[(2.0 + N[(3.0 * N[(x1 * N[(N[(x2 * -2.0), $MachinePrecision] - 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 4.2e+89], N[(x1 - N[(x1 * N[(-1.0 + N[(4.0 * N[(x2 * N[(3.0 - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x1 - N[(N[(x1 * N[(2.0 - N[(x1 * N[(N[(x1 * 3.0), $MachinePrecision] + 9.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(x2 * -6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x1 \leq 1.95 \cdot 10^{-23}:\\
\;\;\;\;x1 + \left(x2 \cdot -6 - x1 \cdot \left(2 + 3 \cdot \left(x1 \cdot \left(x2 \cdot -2 - 3\right)\right)\right)\right)\\
\mathbf{elif}\;x1 \leq 4.2 \cdot 10^{+89}:\\
\;\;\;\;x1 - x1 \cdot \left(-1 + 4 \cdot \left(x2 \cdot \left(3 - 2 \cdot x2\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x1 - \left(x1 \cdot \left(2 - x1 \cdot \left(x1 \cdot 3 + 9\right)\right) - x2 \cdot -6\right)\\
\end{array}
\end{array}
if x1 < 1.95e-23Initial program 74.1%
Taylor expanded in x1 around inf 67.4%
Taylor expanded in x1 around 0 73.3%
if 1.95e-23 < x1 < 4.19999999999999972e89Initial program 99.5%
Taylor expanded in x1 around 0 43.7%
Taylor expanded in x1 around inf 43.7%
if 4.19999999999999972e89 < x1 Initial program 32.6%
Taylor expanded in x1 around 0 8.2%
Taylor expanded in x1 around 0 86.5%
Taylor expanded in x2 around 0 93.4%
*-commutative93.4%
Simplified93.4%
Final simplification74.4%
(FPCore (x1 x2)
:precision binary64
(if (<= x1 5e-23)
(+ x1 (+ (* x2 -6.0) (* x1 (- (* 6.0 (* x1 x2)) 2.0))))
(if (<= x1 4.2e+89)
(- x1 (* x1 (+ -1.0 (* 4.0 (* x2 (- 3.0 (* 2.0 x2)))))))
(- x1 (- (* x1 (- 2.0 (* x1 (+ (* x1 3.0) 9.0)))) (* x2 -6.0))))))
double code(double x1, double x2) {
double tmp;
if (x1 <= 5e-23) {
tmp = x1 + ((x2 * -6.0) + (x1 * ((6.0 * (x1 * x2)) - 2.0)));
} else if (x1 <= 4.2e+89) {
tmp = x1 - (x1 * (-1.0 + (4.0 * (x2 * (3.0 - (2.0 * x2))))));
} else {
tmp = x1 - ((x1 * (2.0 - (x1 * ((x1 * 3.0) + 9.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 <= 5d-23) then
tmp = x1 + ((x2 * (-6.0d0)) + (x1 * ((6.0d0 * (x1 * x2)) - 2.0d0)))
else if (x1 <= 4.2d+89) then
tmp = x1 - (x1 * ((-1.0d0) + (4.0d0 * (x2 * (3.0d0 - (2.0d0 * x2))))))
else
tmp = x1 - ((x1 * (2.0d0 - (x1 * ((x1 * 3.0d0) + 9.0d0)))) - (x2 * (-6.0d0)))
end if
code = tmp
end function
public static double code(double x1, double x2) {
double tmp;
if (x1 <= 5e-23) {
tmp = x1 + ((x2 * -6.0) + (x1 * ((6.0 * (x1 * x2)) - 2.0)));
} else if (x1 <= 4.2e+89) {
tmp = x1 - (x1 * (-1.0 + (4.0 * (x2 * (3.0 - (2.0 * x2))))));
} else {
tmp = x1 - ((x1 * (2.0 - (x1 * ((x1 * 3.0) + 9.0)))) - (x2 * -6.0));
}
return tmp;
}
def code(x1, x2): tmp = 0 if x1 <= 5e-23: tmp = x1 + ((x2 * -6.0) + (x1 * ((6.0 * (x1 * x2)) - 2.0))) elif x1 <= 4.2e+89: tmp = x1 - (x1 * (-1.0 + (4.0 * (x2 * (3.0 - (2.0 * x2)))))) else: tmp = x1 - ((x1 * (2.0 - (x1 * ((x1 * 3.0) + 9.0)))) - (x2 * -6.0)) return tmp
function code(x1, x2) tmp = 0.0 if (x1 <= 5e-23) tmp = Float64(x1 + Float64(Float64(x2 * -6.0) + Float64(x1 * Float64(Float64(6.0 * Float64(x1 * x2)) - 2.0)))); elseif (x1 <= 4.2e+89) tmp = Float64(x1 - Float64(x1 * Float64(-1.0 + Float64(4.0 * Float64(x2 * Float64(3.0 - Float64(2.0 * x2))))))); else tmp = Float64(x1 - Float64(Float64(x1 * Float64(2.0 - Float64(x1 * Float64(Float64(x1 * 3.0) + 9.0)))) - Float64(x2 * -6.0))); end return tmp end
function tmp_2 = code(x1, x2) tmp = 0.0; if (x1 <= 5e-23) tmp = x1 + ((x2 * -6.0) + (x1 * ((6.0 * (x1 * x2)) - 2.0))); elseif (x1 <= 4.2e+89) tmp = x1 - (x1 * (-1.0 + (4.0 * (x2 * (3.0 - (2.0 * x2)))))); else tmp = x1 - ((x1 * (2.0 - (x1 * ((x1 * 3.0) + 9.0)))) - (x2 * -6.0)); end tmp_2 = tmp; end
code[x1_, x2_] := If[LessEqual[x1, 5e-23], N[(x1 + N[(N[(x2 * -6.0), $MachinePrecision] + N[(x1 * N[(N[(6.0 * N[(x1 * x2), $MachinePrecision]), $MachinePrecision] - 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 4.2e+89], N[(x1 - N[(x1 * N[(-1.0 + N[(4.0 * N[(x2 * N[(3.0 - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x1 - N[(N[(x1 * N[(2.0 - N[(x1 * N[(N[(x1 * 3.0), $MachinePrecision] + 9.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(x2 * -6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x1 \leq 5 \cdot 10^{-23}:\\
\;\;\;\;x1 + \left(x2 \cdot -6 + x1 \cdot \left(6 \cdot \left(x1 \cdot x2\right) - 2\right)\right)\\
\mathbf{elif}\;x1 \leq 4.2 \cdot 10^{+89}:\\
\;\;\;\;x1 - x1 \cdot \left(-1 + 4 \cdot \left(x2 \cdot \left(3 - 2 \cdot x2\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x1 - \left(x1 \cdot \left(2 - x1 \cdot \left(x1 \cdot 3 + 9\right)\right) - x2 \cdot -6\right)\\
\end{array}
\end{array}
if x1 < 5.0000000000000002e-23Initial program 74.1%
Taylor expanded in x1 around 0 57.2%
Taylor expanded in x1 around 0 57.5%
Taylor expanded in x2 around inf 63.2%
*-commutative63.2%
associate-*r*63.2%
Simplified63.2%
Taylor expanded in x1 around inf 66.0%
if 5.0000000000000002e-23 < x1 < 4.19999999999999972e89Initial program 99.5%
Taylor expanded in x1 around 0 43.7%
Taylor expanded in x1 around inf 43.7%
if 4.19999999999999972e89 < x1 Initial program 32.6%
Taylor expanded in x1 around 0 8.2%
Taylor expanded in x1 around 0 86.5%
Taylor expanded in x2 around 0 93.4%
*-commutative93.4%
Simplified93.4%
Final simplification68.8%
(FPCore (x1 x2)
:precision binary64
(if (<= x1 2.7e-23)
(+ x1 (+ (* x2 -6.0) (* x1 (- (* 6.0 (* x1 x2)) 2.0))))
(if (<= x1 3.5e+208)
(- x1 (* x1 (+ -1.0 (* 4.0 (* x2 (- 3.0 (* 2.0 x2)))))))
(* x2 (- (/ x1 x2) 6.0)))))
double code(double x1, double x2) {
double tmp;
if (x1 <= 2.7e-23) {
tmp = x1 + ((x2 * -6.0) + (x1 * ((6.0 * (x1 * x2)) - 2.0)));
} else if (x1 <= 3.5e+208) {
tmp = x1 - (x1 * (-1.0 + (4.0 * (x2 * (3.0 - (2.0 * x2))))));
} else {
tmp = x2 * ((x1 / x2) - 6.0);
}
return tmp;
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
real(8) :: tmp
if (x1 <= 2.7d-23) then
tmp = x1 + ((x2 * (-6.0d0)) + (x1 * ((6.0d0 * (x1 * x2)) - 2.0d0)))
else if (x1 <= 3.5d+208) then
tmp = x1 - (x1 * ((-1.0d0) + (4.0d0 * (x2 * (3.0d0 - (2.0d0 * x2))))))
else
tmp = x2 * ((x1 / x2) - 6.0d0)
end if
code = tmp
end function
public static double code(double x1, double x2) {
double tmp;
if (x1 <= 2.7e-23) {
tmp = x1 + ((x2 * -6.0) + (x1 * ((6.0 * (x1 * x2)) - 2.0)));
} else if (x1 <= 3.5e+208) {
tmp = x1 - (x1 * (-1.0 + (4.0 * (x2 * (3.0 - (2.0 * x2))))));
} else {
tmp = x2 * ((x1 / x2) - 6.0);
}
return tmp;
}
def code(x1, x2): tmp = 0 if x1 <= 2.7e-23: tmp = x1 + ((x2 * -6.0) + (x1 * ((6.0 * (x1 * x2)) - 2.0))) elif x1 <= 3.5e+208: tmp = x1 - (x1 * (-1.0 + (4.0 * (x2 * (3.0 - (2.0 * x2)))))) else: tmp = x2 * ((x1 / x2) - 6.0) return tmp
function code(x1, x2) tmp = 0.0 if (x1 <= 2.7e-23) tmp = Float64(x1 + Float64(Float64(x2 * -6.0) + Float64(x1 * Float64(Float64(6.0 * Float64(x1 * x2)) - 2.0)))); elseif (x1 <= 3.5e+208) tmp = Float64(x1 - Float64(x1 * Float64(-1.0 + Float64(4.0 * Float64(x2 * Float64(3.0 - Float64(2.0 * x2))))))); else tmp = Float64(x2 * Float64(Float64(x1 / x2) - 6.0)); end return tmp end
function tmp_2 = code(x1, x2) tmp = 0.0; if (x1 <= 2.7e-23) tmp = x1 + ((x2 * -6.0) + (x1 * ((6.0 * (x1 * x2)) - 2.0))); elseif (x1 <= 3.5e+208) tmp = x1 - (x1 * (-1.0 + (4.0 * (x2 * (3.0 - (2.0 * x2)))))); else tmp = x2 * ((x1 / x2) - 6.0); end tmp_2 = tmp; end
code[x1_, x2_] := If[LessEqual[x1, 2.7e-23], N[(x1 + N[(N[(x2 * -6.0), $MachinePrecision] + N[(x1 * N[(N[(6.0 * N[(x1 * x2), $MachinePrecision]), $MachinePrecision] - 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 3.5e+208], N[(x1 - N[(x1 * N[(-1.0 + N[(4.0 * N[(x2 * N[(3.0 - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x2 * N[(N[(x1 / x2), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x1 \leq 2.7 \cdot 10^{-23}:\\
\;\;\;\;x1 + \left(x2 \cdot -6 + x1 \cdot \left(6 \cdot \left(x1 \cdot x2\right) - 2\right)\right)\\
\mathbf{elif}\;x1 \leq 3.5 \cdot 10^{+208}:\\
\;\;\;\;x1 - x1 \cdot \left(-1 + 4 \cdot \left(x2 \cdot \left(3 - 2 \cdot x2\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x2 \cdot \left(\frac{x1}{x2} - 6\right)\\
\end{array}
\end{array}
if x1 < 2.69999999999999985e-23Initial program 74.1%
Taylor expanded in x1 around 0 57.2%
Taylor expanded in x1 around 0 57.5%
Taylor expanded in x2 around inf 63.2%
*-commutative63.2%
associate-*r*63.2%
Simplified63.2%
Taylor expanded in x1 around inf 66.0%
if 2.69999999999999985e-23 < x1 < 3.50000000000000016e208Initial program 75.3%
Taylor expanded in x1 around 0 27.3%
Taylor expanded in x1 around inf 38.9%
if 3.50000000000000016e208 < x1 Initial program 0.0%
Taylor expanded in x1 around 0 0.0%
Taylor expanded in x1 around 0 9.3%
*-commutative9.3%
Simplified9.3%
Taylor expanded in x2 around inf 70.4%
Final simplification61.5%
(FPCore (x1 x2)
:precision binary64
(if (<= x1 4.3e-24)
(+ x1 (+ (* x2 -6.0) (* x1 -2.0)))
(if (<= x1 3.3e+208)
(- x1 (* x1 (+ -1.0 (* 4.0 (* x2 (- 3.0 (* 2.0 x2)))))))
(* x2 (- (/ x1 x2) 6.0)))))
double code(double x1, double x2) {
double tmp;
if (x1 <= 4.3e-24) {
tmp = x1 + ((x2 * -6.0) + (x1 * -2.0));
} else if (x1 <= 3.3e+208) {
tmp = x1 - (x1 * (-1.0 + (4.0 * (x2 * (3.0 - (2.0 * x2))))));
} else {
tmp = x2 * ((x1 / x2) - 6.0);
}
return tmp;
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
real(8) :: tmp
if (x1 <= 4.3d-24) then
tmp = x1 + ((x2 * (-6.0d0)) + (x1 * (-2.0d0)))
else if (x1 <= 3.3d+208) then
tmp = x1 - (x1 * ((-1.0d0) + (4.0d0 * (x2 * (3.0d0 - (2.0d0 * x2))))))
else
tmp = x2 * ((x1 / x2) - 6.0d0)
end if
code = tmp
end function
public static double code(double x1, double x2) {
double tmp;
if (x1 <= 4.3e-24) {
tmp = x1 + ((x2 * -6.0) + (x1 * -2.0));
} else if (x1 <= 3.3e+208) {
tmp = x1 - (x1 * (-1.0 + (4.0 * (x2 * (3.0 - (2.0 * x2))))));
} else {
tmp = x2 * ((x1 / x2) - 6.0);
}
return tmp;
}
def code(x1, x2): tmp = 0 if x1 <= 4.3e-24: tmp = x1 + ((x2 * -6.0) + (x1 * -2.0)) elif x1 <= 3.3e+208: tmp = x1 - (x1 * (-1.0 + (4.0 * (x2 * (3.0 - (2.0 * x2)))))) else: tmp = x2 * ((x1 / x2) - 6.0) return tmp
function code(x1, x2) tmp = 0.0 if (x1 <= 4.3e-24) tmp = Float64(x1 + Float64(Float64(x2 * -6.0) + Float64(x1 * -2.0))); elseif (x1 <= 3.3e+208) tmp = Float64(x1 - Float64(x1 * Float64(-1.0 + Float64(4.0 * Float64(x2 * Float64(3.0 - Float64(2.0 * x2))))))); else tmp = Float64(x2 * Float64(Float64(x1 / x2) - 6.0)); end return tmp end
function tmp_2 = code(x1, x2) tmp = 0.0; if (x1 <= 4.3e-24) tmp = x1 + ((x2 * -6.0) + (x1 * -2.0)); elseif (x1 <= 3.3e+208) tmp = x1 - (x1 * (-1.0 + (4.0 * (x2 * (3.0 - (2.0 * x2)))))); else tmp = x2 * ((x1 / x2) - 6.0); end tmp_2 = tmp; end
code[x1_, x2_] := If[LessEqual[x1, 4.3e-24], N[(x1 + N[(N[(x2 * -6.0), $MachinePrecision] + N[(x1 * -2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 3.3e+208], N[(x1 - N[(x1 * N[(-1.0 + N[(4.0 * N[(x2 * N[(3.0 - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x2 * N[(N[(x1 / x2), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x1 \leq 4.3 \cdot 10^{-24}:\\
\;\;\;\;x1 + \left(x2 \cdot -6 + x1 \cdot -2\right)\\
\mathbf{elif}\;x1 \leq 3.3 \cdot 10^{+208}:\\
\;\;\;\;x1 - x1 \cdot \left(-1 + 4 \cdot \left(x2 \cdot \left(3 - 2 \cdot x2\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x2 \cdot \left(\frac{x1}{x2} - 6\right)\\
\end{array}
\end{array}
if x1 < 4.3000000000000003e-24Initial program 74.1%
Taylor expanded in x1 around 0 57.2%
Taylor expanded in x1 around 0 57.5%
Taylor expanded in x2 around inf 63.2%
*-commutative63.2%
associate-*r*63.2%
Simplified63.2%
Taylor expanded in x2 around 0 54.8%
*-commutative54.8%
Simplified54.8%
if 4.3000000000000003e-24 < x1 < 3.3e208Initial program 75.3%
Taylor expanded in x1 around 0 27.3%
Taylor expanded in x1 around inf 38.9%
if 3.3e208 < x1 Initial program 0.0%
Taylor expanded in x1 around 0 0.0%
Taylor expanded in x1 around 0 9.3%
*-commutative9.3%
Simplified9.3%
Taylor expanded in x2 around inf 70.4%
Final simplification53.1%
(FPCore (x1 x2) :precision binary64 (if (<= x1 1.85e+24) (+ x1 (+ (* x2 -6.0) (* x1 -2.0))) (* x2 (- (/ x1 x2) 6.0))))
double code(double x1, double x2) {
double tmp;
if (x1 <= 1.85e+24) {
tmp = x1 + ((x2 * -6.0) + (x1 * -2.0));
} else {
tmp = x2 * ((x1 / x2) - 6.0);
}
return tmp;
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
real(8) :: tmp
if (x1 <= 1.85d+24) then
tmp = x1 + ((x2 * (-6.0d0)) + (x1 * (-2.0d0)))
else
tmp = x2 * ((x1 / x2) - 6.0d0)
end if
code = tmp
end function
public static double code(double x1, double x2) {
double tmp;
if (x1 <= 1.85e+24) {
tmp = x1 + ((x2 * -6.0) + (x1 * -2.0));
} else {
tmp = x2 * ((x1 / x2) - 6.0);
}
return tmp;
}
def code(x1, x2): tmp = 0 if x1 <= 1.85e+24: tmp = x1 + ((x2 * -6.0) + (x1 * -2.0)) else: tmp = x2 * ((x1 / x2) - 6.0) return tmp
function code(x1, x2) tmp = 0.0 if (x1 <= 1.85e+24) tmp = Float64(x1 + Float64(Float64(x2 * -6.0) + Float64(x1 * -2.0))); else tmp = Float64(x2 * Float64(Float64(x1 / x2) - 6.0)); end return tmp end
function tmp_2 = code(x1, x2) tmp = 0.0; if (x1 <= 1.85e+24) tmp = x1 + ((x2 * -6.0) + (x1 * -2.0)); else tmp = x2 * ((x1 / x2) - 6.0); end tmp_2 = tmp; end
code[x1_, x2_] := If[LessEqual[x1, 1.85e+24], N[(x1 + N[(N[(x2 * -6.0), $MachinePrecision] + N[(x1 * -2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x2 * N[(N[(x1 / x2), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x1 \leq 1.85 \cdot 10^{+24}:\\
\;\;\;\;x1 + \left(x2 \cdot -6 + x1 \cdot -2\right)\\
\mathbf{else}:\\
\;\;\;\;x2 \cdot \left(\frac{x1}{x2} - 6\right)\\
\end{array}
\end{array}
if x1 < 1.85e24Initial program 74.9%
Taylor expanded in x1 around 0 58.1%
Taylor expanded in x1 around 0 58.4%
Taylor expanded in x2 around inf 63.9%
*-commutative63.9%
associate-*r*63.9%
Simplified63.9%
Taylor expanded in x2 around 0 53.3%
*-commutative53.3%
Simplified53.3%
if 1.85e24 < x1 Initial program 49.0%
Taylor expanded in x1 around 0 12.4%
Taylor expanded in x1 around 0 5.6%
*-commutative5.6%
Simplified5.6%
Taylor expanded in x2 around inf 31.6%
Final simplification48.4%
(FPCore (x1 x2) :precision binary64 (* x2 (- (/ x1 x2) 6.0)))
double code(double x1, double x2) {
return x2 * ((x1 / x2) - 6.0);
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
code = x2 * ((x1 / x2) - 6.0d0)
end function
public static double code(double x1, double x2) {
return x2 * ((x1 / x2) - 6.0);
}
def code(x1, x2): return x2 * ((x1 / x2) - 6.0)
function code(x1, x2) return Float64(x2 * Float64(Float64(x1 / x2) - 6.0)) end
function tmp = code(x1, x2) tmp = x2 * ((x1 / x2) - 6.0); end
code[x1_, x2_] := N[(x2 * N[(N[(x1 / x2), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x2 \cdot \left(\frac{x1}{x2} - 6\right)
\end{array}
Initial program 69.1%
Taylor expanded in x1 around 0 47.9%
Taylor expanded in x1 around 0 28.9%
*-commutative28.9%
Simplified28.9%
Taylor expanded in x2 around inf 34.7%
(FPCore (x1 x2) :precision binary64 (+ x1 (* x2 -6.0)))
double code(double x1, double x2) {
return x1 + (x2 * -6.0);
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
code = x1 + (x2 * (-6.0d0))
end function
public static double code(double x1, double x2) {
return x1 + (x2 * -6.0);
}
def code(x1, x2): return x1 + (x2 * -6.0)
function code(x1, x2) return Float64(x1 + Float64(x2 * -6.0)) end
function tmp = code(x1, x2) tmp = x1 + (x2 * -6.0); end
code[x1_, x2_] := N[(x1 + N[(x2 * -6.0), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x1 + x2 \cdot -6
\end{array}
Initial program 69.1%
Taylor expanded in x1 around 0 47.9%
Taylor expanded in x1 around 0 28.9%
*-commutative28.9%
Simplified28.9%
(FPCore (x1 x2) :precision binary64 (* x2 -6.0))
double code(double x1, double x2) {
return x2 * -6.0;
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
code = x2 * (-6.0d0)
end function
public static double code(double x1, double x2) {
return x2 * -6.0;
}
def code(x1, x2): return x2 * -6.0
function code(x1, x2) return Float64(x2 * -6.0) end
function tmp = code(x1, x2) tmp = x2 * -6.0; end
code[x1_, x2_] := N[(x2 * -6.0), $MachinePrecision]
\begin{array}{l}
\\
x2 \cdot -6
\end{array}
Initial program 69.1%
Taylor expanded in x1 around 0 47.9%
Taylor expanded in x1 around 0 28.9%
*-commutative28.9%
Simplified28.9%
Taylor expanded in x1 around 0 28.8%
*-commutative28.8%
Simplified28.8%
(FPCore (x1 x2) :precision binary64 x1)
double code(double x1, double x2) {
return x1;
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
code = x1
end function
public static double code(double x1, double x2) {
return x1;
}
def code(x1, x2): return x1
function code(x1, x2) return x1 end
function tmp = code(x1, x2) tmp = x1; end
code[x1_, x2_] := x1
\begin{array}{l}
\\
x1
\end{array}
Initial program 69.1%
Taylor expanded in x1 around 0 47.9%
Taylor expanded in x1 around 0 28.9%
*-commutative28.9%
Simplified28.9%
Taylor expanded in x1 around inf 3.2%
herbie shell --seed 2024106
(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))))))