
(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 23 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 (/ (- (fma x1 (* x1 3.0) (* 2.0 x2)) x1) (fma x1 x1 1.0)))
(t_1 (* x1 (* x1 3.0)))
(t_2 (+ (* x1 x1) 1.0))
(t_3 (/ (- (+ t_1 (* 2.0 x2)) x1) t_2))
(t_4 (* 3.0 (* x1 x1))))
(if (<=
(+
x1
(+
(+
x1
(+
(+
(*
t_2
(+
(* (* (* x1 2.0) t_3) (- t_3 3.0))
(* (* x1 x1) (- (* t_3 4.0) 6.0))))
(* t_1 t_3))
(* x1 (* x1 x1))))
(* 3.0 (/ (- (- t_1 (* 2.0 x2)) x1) t_2))))
INFINITY)
(+
x1
(fma
3.0
(/ (- t_4 (fma 2.0 x2 x1)) (fma x1 x1 1.0))
(+
x1
(fma
(fma x1 x1 1.0)
(fma x1 (* x1 (fma t_0 4.0 -6.0)) (* (* x1 (* 2.0 t_0)) (+ t_0 -3.0)))
(fma t_4 t_0 (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 = (fma(x1, (x1 * 3.0), (2.0 * x2)) - x1) / fma(x1, x1, 1.0);
double t_1 = x1 * (x1 * 3.0);
double t_2 = (x1 * x1) + 1.0;
double t_3 = ((t_1 + (2.0 * x2)) - x1) / t_2;
double t_4 = 3.0 * (x1 * x1);
double tmp;
if ((x1 + ((x1 + (((t_2 * ((((x1 * 2.0) * t_3) * (t_3 - 3.0)) + ((x1 * x1) * ((t_3 * 4.0) - 6.0)))) + (t_1 * t_3)) + (x1 * (x1 * x1)))) + (3.0 * (((t_1 - (2.0 * x2)) - x1) / t_2)))) <= ((double) INFINITY)) {
tmp = x1 + fma(3.0, ((t_4 - fma(2.0, x2, x1)) / fma(x1, x1, 1.0)), (x1 + fma(fma(x1, x1, 1.0), fma(x1, (x1 * fma(t_0, 4.0, -6.0)), ((x1 * (2.0 * t_0)) * (t_0 + -3.0))), fma(t_4, t_0, 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(Float64(fma(x1, Float64(x1 * 3.0), Float64(2.0 * x2)) - x1) / fma(x1, x1, 1.0)) t_1 = Float64(x1 * Float64(x1 * 3.0)) t_2 = Float64(Float64(x1 * x1) + 1.0) t_3 = Float64(Float64(Float64(t_1 + Float64(2.0 * x2)) - x1) / t_2) t_4 = Float64(3.0 * Float64(x1 * x1)) tmp = 0.0 if (Float64(x1 + Float64(Float64(x1 + Float64(Float64(Float64(t_2 * Float64(Float64(Float64(Float64(x1 * 2.0) * t_3) * Float64(t_3 - 3.0)) + Float64(Float64(x1 * x1) * Float64(Float64(t_3 * 4.0) - 6.0)))) + Float64(t_1 * t_3)) + Float64(x1 * Float64(x1 * x1)))) + Float64(3.0 * Float64(Float64(Float64(t_1 - Float64(2.0 * x2)) - x1) / t_2)))) <= Inf) tmp = Float64(x1 + fma(3.0, Float64(Float64(t_4 - fma(2.0, x2, x1)) / fma(x1, x1, 1.0)), Float64(x1 + fma(fma(x1, x1, 1.0), fma(x1, Float64(x1 * fma(t_0, 4.0, -6.0)), Float64(Float64(x1 * Float64(2.0 * t_0)) * Float64(t_0 + -3.0))), fma(t_4, t_0, (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[(N[(N[(x1 * N[(x1 * 3.0), $MachinePrecision] + N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / N[(x1 * x1 + 1.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(x1 * N[(x1 * 3.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(x1 * x1), $MachinePrecision] + 1.0), $MachinePrecision]}, Block[{t$95$3 = N[(N[(N[(t$95$1 + N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$2), $MachinePrecision]}, Block[{t$95$4 = N[(3.0 * N[(x1 * x1), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(x1 + N[(N[(x1 + N[(N[(N[(t$95$2 * N[(N[(N[(N[(x1 * 2.0), $MachinePrecision] * t$95$3), $MachinePrecision] * N[(t$95$3 - 3.0), $MachinePrecision]), $MachinePrecision] + N[(N[(x1 * x1), $MachinePrecision] * N[(N[(t$95$3 * 4.0), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(t$95$1 * t$95$3), $MachinePrecision]), $MachinePrecision] + N[(x1 * N[(x1 * x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(3.0 * N[(N[(N[(t$95$1 - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], Infinity], N[(x1 + N[(3.0 * N[(N[(t$95$4 - 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$0 * 4.0 + -6.0), $MachinePrecision]), $MachinePrecision] + N[(N[(x1 * N[(2.0 * t$95$0), $MachinePrecision]), $MachinePrecision] * N[(t$95$0 + -3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(t$95$4 * t$95$0 + 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 := \frac{\mathsf{fma}\left(x1, x1 \cdot 3, 2 \cdot x2\right) - x1}{\mathsf{fma}\left(x1, x1, 1\right)}\\
t_1 := x1 \cdot \left(x1 \cdot 3\right)\\
t_2 := x1 \cdot x1 + 1\\
t_3 := \frac{\left(t\_1 + 2 \cdot x2\right) - x1}{t\_2}\\
t_4 := 3 \cdot \left(x1 \cdot x1\right)\\
\mathbf{if}\;x1 + \left(\left(x1 + \left(\left(t\_2 \cdot \left(\left(\left(x1 \cdot 2\right) \cdot t\_3\right) \cdot \left(t\_3 - 3\right) + \left(x1 \cdot x1\right) \cdot \left(t\_3 \cdot 4 - 6\right)\right) + t\_1 \cdot t\_3\right) + x1 \cdot \left(x1 \cdot x1\right)\right)\right) + 3 \cdot \frac{\left(t\_1 - 2 \cdot x2\right) - x1}{t\_2}\right) \leq \infty:\\
\;\;\;\;x1 + \mathsf{fma}\left(3, \frac{t\_4 - \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\_0, 4, -6\right), \left(x1 \cdot \left(2 \cdot t\_0\right)\right) \cdot \left(t\_0 + -3\right)\right), \mathsf{fma}\left(t\_4, t\_0, {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.6%
if +inf.0 < (+.f64 x1 (+.f64 (+.f64 (+.f64 (+.f64 (*.f64 (+.f64 (*.f64 (*.f64 (*.f64 #s(literal 2 binary64) x1) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64)))) (-.f64 (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))) #s(literal 3 binary64))) (*.f64 (*.f64 x1 x1) (-.f64 (*.f64 #s(literal 4 binary64) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64)))) #s(literal 6 binary64)))) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))) (*.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))))) (*.f64 (*.f64 x1 x1) x1)) x1) (*.f64 #s(literal 3 binary64) (/.f64 (-.f64 (-.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64)))))) Initial program 0.0%
Taylor expanded in x1 around 0 0.0%
*-commutative0.0%
Simplified0.0%
Taylor expanded in x1 around inf 100.0%
Final simplification99.8%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (* x1 (* x1 x1)))
(t_1 (+ (* x1 x1) 1.0))
(t_2 (* x1 (* x1 3.0)))
(t_3 (/ (- (+ t_2 (* 2.0 x2)) x1) t_1))
(t_4 (* t_2 t_3))
(t_5 (* (* (* x1 2.0) t_3) (- t_3 3.0)))
(t_6 (* 3.0 (/ (- (- t_2 (* 2.0 x2)) x1) t_1)))
(t_7 (+ 1.0 (pow x1 2.0))))
(if (<=
(+
x1
(+
(+
x1
(+ (+ (* t_1 (+ t_5 (* (* x1 x1) (- (* t_3 4.0) 6.0)))) t_4) t_0))
t_6))
INFINITY)
(+
x1
(+
t_6
(+
x1
(+
t_0
(+
t_4
(*
t_1
(+
t_5
(*
(* x1 x1)
(-
(*
4.0
(+
(+ (* 2.0 (/ x2 t_7)) (* 3.0 (/ (pow x1 2.0) t_7)))
(/ x1 (- -1.0 (pow x1 2.0)))))
6.0)))))))))
(+ x1 (+ (+ x1 (* 6.0 (pow x1 4.0))) (* 3.0 (* x2 -2.0)))))))
double code(double x1, double x2) {
double t_0 = x1 * (x1 * x1);
double t_1 = (x1 * x1) + 1.0;
double t_2 = x1 * (x1 * 3.0);
double t_3 = ((t_2 + (2.0 * x2)) - x1) / t_1;
double t_4 = t_2 * t_3;
double t_5 = ((x1 * 2.0) * t_3) * (t_3 - 3.0);
double t_6 = 3.0 * (((t_2 - (2.0 * x2)) - x1) / t_1);
double t_7 = 1.0 + pow(x1, 2.0);
double tmp;
if ((x1 + ((x1 + (((t_1 * (t_5 + ((x1 * x1) * ((t_3 * 4.0) - 6.0)))) + t_4) + t_0)) + t_6)) <= ((double) INFINITY)) {
tmp = x1 + (t_6 + (x1 + (t_0 + (t_4 + (t_1 * (t_5 + ((x1 * x1) * ((4.0 * (((2.0 * (x2 / t_7)) + (3.0 * (pow(x1, 2.0) / t_7))) + (x1 / (-1.0 - pow(x1, 2.0))))) - 6.0))))))));
} else {
tmp = x1 + ((x1 + (6.0 * pow(x1, 4.0))) + (3.0 * (x2 * -2.0)));
}
return tmp;
}
public static double code(double x1, double x2) {
double t_0 = x1 * (x1 * x1);
double t_1 = (x1 * x1) + 1.0;
double t_2 = x1 * (x1 * 3.0);
double t_3 = ((t_2 + (2.0 * x2)) - x1) / t_1;
double t_4 = t_2 * t_3;
double t_5 = ((x1 * 2.0) * t_3) * (t_3 - 3.0);
double t_6 = 3.0 * (((t_2 - (2.0 * x2)) - x1) / t_1);
double t_7 = 1.0 + Math.pow(x1, 2.0);
double tmp;
if ((x1 + ((x1 + (((t_1 * (t_5 + ((x1 * x1) * ((t_3 * 4.0) - 6.0)))) + t_4) + t_0)) + t_6)) <= Double.POSITIVE_INFINITY) {
tmp = x1 + (t_6 + (x1 + (t_0 + (t_4 + (t_1 * (t_5 + ((x1 * x1) * ((4.0 * (((2.0 * (x2 / t_7)) + (3.0 * (Math.pow(x1, 2.0) / t_7))) + (x1 / (-1.0 - Math.pow(x1, 2.0))))) - 6.0))))))));
} else {
tmp = x1 + ((x1 + (6.0 * Math.pow(x1, 4.0))) + (3.0 * (x2 * -2.0)));
}
return tmp;
}
def code(x1, x2): t_0 = x1 * (x1 * x1) t_1 = (x1 * x1) + 1.0 t_2 = x1 * (x1 * 3.0) t_3 = ((t_2 + (2.0 * x2)) - x1) / t_1 t_4 = t_2 * t_3 t_5 = ((x1 * 2.0) * t_3) * (t_3 - 3.0) t_6 = 3.0 * (((t_2 - (2.0 * x2)) - x1) / t_1) t_7 = 1.0 + math.pow(x1, 2.0) tmp = 0 if (x1 + ((x1 + (((t_1 * (t_5 + ((x1 * x1) * ((t_3 * 4.0) - 6.0)))) + t_4) + t_0)) + t_6)) <= math.inf: tmp = x1 + (t_6 + (x1 + (t_0 + (t_4 + (t_1 * (t_5 + ((x1 * x1) * ((4.0 * (((2.0 * (x2 / t_7)) + (3.0 * (math.pow(x1, 2.0) / t_7))) + (x1 / (-1.0 - math.pow(x1, 2.0))))) - 6.0)))))))) else: tmp = x1 + ((x1 + (6.0 * math.pow(x1, 4.0))) + (3.0 * (x2 * -2.0))) return tmp
function code(x1, x2) t_0 = Float64(x1 * Float64(x1 * x1)) t_1 = Float64(Float64(x1 * x1) + 1.0) t_2 = Float64(x1 * Float64(x1 * 3.0)) t_3 = Float64(Float64(Float64(t_2 + Float64(2.0 * x2)) - x1) / t_1) t_4 = Float64(t_2 * t_3) t_5 = Float64(Float64(Float64(x1 * 2.0) * t_3) * Float64(t_3 - 3.0)) t_6 = Float64(3.0 * Float64(Float64(Float64(t_2 - Float64(2.0 * x2)) - x1) / t_1)) t_7 = Float64(1.0 + (x1 ^ 2.0)) tmp = 0.0 if (Float64(x1 + Float64(Float64(x1 + Float64(Float64(Float64(t_1 * Float64(t_5 + Float64(Float64(x1 * x1) * Float64(Float64(t_3 * 4.0) - 6.0)))) + t_4) + t_0)) + t_6)) <= Inf) tmp = Float64(x1 + Float64(t_6 + Float64(x1 + Float64(t_0 + Float64(t_4 + Float64(t_1 * Float64(t_5 + Float64(Float64(x1 * x1) * Float64(Float64(4.0 * Float64(Float64(Float64(2.0 * Float64(x2 / t_7)) + Float64(3.0 * Float64((x1 ^ 2.0) / t_7))) + Float64(x1 / Float64(-1.0 - (x1 ^ 2.0))))) - 6.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
function tmp_2 = code(x1, x2) t_0 = x1 * (x1 * x1); t_1 = (x1 * x1) + 1.0; t_2 = x1 * (x1 * 3.0); t_3 = ((t_2 + (2.0 * x2)) - x1) / t_1; t_4 = t_2 * t_3; t_5 = ((x1 * 2.0) * t_3) * (t_3 - 3.0); t_6 = 3.0 * (((t_2 - (2.0 * x2)) - x1) / t_1); t_7 = 1.0 + (x1 ^ 2.0); tmp = 0.0; if ((x1 + ((x1 + (((t_1 * (t_5 + ((x1 * x1) * ((t_3 * 4.0) - 6.0)))) + t_4) + t_0)) + t_6)) <= Inf) tmp = x1 + (t_6 + (x1 + (t_0 + (t_4 + (t_1 * (t_5 + ((x1 * x1) * ((4.0 * (((2.0 * (x2 / t_7)) + (3.0 * ((x1 ^ 2.0) / t_7))) + (x1 / (-1.0 - (x1 ^ 2.0))))) - 6.0)))))))); else tmp = x1 + ((x1 + (6.0 * (x1 ^ 4.0))) + (3.0 * (x2 * -2.0))); end tmp_2 = tmp; end
code[x1_, x2_] := Block[{t$95$0 = N[(x1 * N[(x1 * x1), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(N[(x1 * x1), $MachinePrecision] + 1.0), $MachinePrecision]}, Block[{t$95$2 = N[(x1 * N[(x1 * 3.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[(N[(t$95$2 + N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$1), $MachinePrecision]}, Block[{t$95$4 = N[(t$95$2 * t$95$3), $MachinePrecision]}, Block[{t$95$5 = N[(N[(N[(x1 * 2.0), $MachinePrecision] * t$95$3), $MachinePrecision] * N[(t$95$3 - 3.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$6 = N[(3.0 * N[(N[(N[(t$95$2 - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$1), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$7 = N[(1.0 + N[Power[x1, 2.0], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(x1 + N[(N[(x1 + N[(N[(N[(t$95$1 * N[(t$95$5 + N[(N[(x1 * x1), $MachinePrecision] * N[(N[(t$95$3 * 4.0), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + t$95$4), $MachinePrecision] + t$95$0), $MachinePrecision]), $MachinePrecision] + t$95$6), $MachinePrecision]), $MachinePrecision], Infinity], N[(x1 + N[(t$95$6 + N[(x1 + N[(t$95$0 + N[(t$95$4 + N[(t$95$1 * N[(t$95$5 + N[(N[(x1 * x1), $MachinePrecision] * N[(N[(4.0 * N[(N[(N[(2.0 * N[(x2 / t$95$7), $MachinePrecision]), $MachinePrecision] + N[(3.0 * N[(N[Power[x1, 2.0], $MachinePrecision] / t$95$7), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(x1 / N[(-1.0 - N[Power[x1, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $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 := x1 \cdot \left(x1 \cdot x1\right)\\
t_1 := x1 \cdot x1 + 1\\
t_2 := x1 \cdot \left(x1 \cdot 3\right)\\
t_3 := \frac{\left(t\_2 + 2 \cdot x2\right) - x1}{t\_1}\\
t_4 := t\_2 \cdot t\_3\\
t_5 := \left(\left(x1 \cdot 2\right) \cdot t\_3\right) \cdot \left(t\_3 - 3\right)\\
t_6 := 3 \cdot \frac{\left(t\_2 - 2 \cdot x2\right) - x1}{t\_1}\\
t_7 := 1 + {x1}^{2}\\
\mathbf{if}\;x1 + \left(\left(x1 + \left(\left(t\_1 \cdot \left(t\_5 + \left(x1 \cdot x1\right) \cdot \left(t\_3 \cdot 4 - 6\right)\right) + t\_4\right) + t\_0\right)\right) + t\_6\right) \leq \infty:\\
\;\;\;\;x1 + \left(t\_6 + \left(x1 + \left(t\_0 + \left(t\_4 + t\_1 \cdot \left(t\_5 + \left(x1 \cdot x1\right) \cdot \left(4 \cdot \left(\left(2 \cdot \frac{x2}{t\_7} + 3 \cdot \frac{{x1}^{2}}{t\_7}\right) + \frac{x1}{-1 - {x1}^{2}}\right) - 6\right)\right)\right)\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%
Taylor expanded in x2 around 0 99.5%
if +inf.0 < (+.f64 x1 (+.f64 (+.f64 (+.f64 (+.f64 (*.f64 (+.f64 (*.f64 (*.f64 (*.f64 #s(literal 2 binary64) x1) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64)))) (-.f64 (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))) #s(literal 3 binary64))) (*.f64 (*.f64 x1 x1) (-.f64 (*.f64 #s(literal 4 binary64) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64)))) #s(literal 6 binary64)))) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))) (*.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))))) (*.f64 (*.f64 x1 x1) x1)) x1) (*.f64 #s(literal 3 binary64) (/.f64 (-.f64 (-.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64)))))) Initial program 0.0%
Taylor expanded in x1 around 0 0.0%
*-commutative0.0%
Simplified0.0%
Taylor expanded in x1 around inf 100.0%
Final simplification99.6%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (* x1 (* x1 3.0)))
(t_1 (+ (* x1 x1) 1.0))
(t_2 (/ (- (+ t_0 (* 2.0 x2)) x1) t_1))
(t_3
(+
x1
(+
(+
x1
(+
(+
(*
t_1
(+
(* (* (* x1 2.0) t_2) (- t_2 3.0))
(* (* x1 x1) (- (* t_2 4.0) 6.0))))
(* t_0 t_2))
(* x1 (* x1 x1))))
(* 3.0 (/ (- (- t_0 (* 2.0 x2)) x1) t_1))))))
(if (<= t_3 INFINITY)
t_3
(+ x1 (+ (+ x1 (* 6.0 (pow x1 4.0))) (* 3.0 (* x2 -2.0)))))))
double code(double x1, double x2) {
double t_0 = x1 * (x1 * 3.0);
double t_1 = (x1 * x1) + 1.0;
double t_2 = ((t_0 + (2.0 * x2)) - x1) / t_1;
double t_3 = x1 + ((x1 + (((t_1 * ((((x1 * 2.0) * t_2) * (t_2 - 3.0)) + ((x1 * x1) * ((t_2 * 4.0) - 6.0)))) + (t_0 * t_2)) + (x1 * (x1 * x1)))) + (3.0 * (((t_0 - (2.0 * x2)) - x1) / t_1)));
double tmp;
if (t_3 <= ((double) INFINITY)) {
tmp = t_3;
} else {
tmp = x1 + ((x1 + (6.0 * pow(x1, 4.0))) + (3.0 * (x2 * -2.0)));
}
return tmp;
}
public static double code(double x1, double x2) {
double t_0 = x1 * (x1 * 3.0);
double t_1 = (x1 * x1) + 1.0;
double t_2 = ((t_0 + (2.0 * x2)) - x1) / t_1;
double t_3 = x1 + ((x1 + (((t_1 * ((((x1 * 2.0) * t_2) * (t_2 - 3.0)) + ((x1 * x1) * ((t_2 * 4.0) - 6.0)))) + (t_0 * t_2)) + (x1 * (x1 * x1)))) + (3.0 * (((t_0 - (2.0 * x2)) - x1) / t_1)));
double tmp;
if (t_3 <= Double.POSITIVE_INFINITY) {
tmp = t_3;
} else {
tmp = x1 + ((x1 + (6.0 * Math.pow(x1, 4.0))) + (3.0 * (x2 * -2.0)));
}
return tmp;
}
def code(x1, x2): t_0 = x1 * (x1 * 3.0) t_1 = (x1 * x1) + 1.0 t_2 = ((t_0 + (2.0 * x2)) - x1) / t_1 t_3 = x1 + ((x1 + (((t_1 * ((((x1 * 2.0) * t_2) * (t_2 - 3.0)) + ((x1 * x1) * ((t_2 * 4.0) - 6.0)))) + (t_0 * t_2)) + (x1 * (x1 * x1)))) + (3.0 * (((t_0 - (2.0 * x2)) - x1) / t_1))) tmp = 0 if t_3 <= math.inf: tmp = t_3 else: tmp = x1 + ((x1 + (6.0 * math.pow(x1, 4.0))) + (3.0 * (x2 * -2.0))) return tmp
function code(x1, x2) t_0 = Float64(x1 * Float64(x1 * 3.0)) t_1 = Float64(Float64(x1 * x1) + 1.0) t_2 = Float64(Float64(Float64(t_0 + Float64(2.0 * x2)) - x1) / t_1) t_3 = Float64(x1 + Float64(Float64(x1 + Float64(Float64(Float64(t_1 * Float64(Float64(Float64(Float64(x1 * 2.0) * t_2) * Float64(t_2 - 3.0)) + Float64(Float64(x1 * x1) * Float64(Float64(t_2 * 4.0) - 6.0)))) + Float64(t_0 * t_2)) + Float64(x1 * Float64(x1 * x1)))) + Float64(3.0 * Float64(Float64(Float64(t_0 - Float64(2.0 * x2)) - x1) / t_1)))) tmp = 0.0 if (t_3 <= Inf) tmp = t_3; else tmp = Float64(x1 + Float64(Float64(x1 + Float64(6.0 * (x1 ^ 4.0))) + Float64(3.0 * Float64(x2 * -2.0)))); end return tmp end
function tmp_2 = code(x1, x2) t_0 = x1 * (x1 * 3.0); t_1 = (x1 * x1) + 1.0; t_2 = ((t_0 + (2.0 * x2)) - x1) / t_1; t_3 = x1 + ((x1 + (((t_1 * ((((x1 * 2.0) * t_2) * (t_2 - 3.0)) + ((x1 * x1) * ((t_2 * 4.0) - 6.0)))) + (t_0 * t_2)) + (x1 * (x1 * x1)))) + (3.0 * (((t_0 - (2.0 * x2)) - x1) / t_1))); tmp = 0.0; if (t_3 <= Inf) tmp = t_3; else tmp = x1 + ((x1 + (6.0 * (x1 ^ 4.0))) + (3.0 * (x2 * -2.0))); end tmp_2 = tmp; end
code[x1_, x2_] := Block[{t$95$0 = N[(x1 * N[(x1 * 3.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(N[(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]}, Block[{t$95$3 = N[(x1 + N[(N[(x1 + N[(N[(N[(t$95$1 * N[(N[(N[(N[(x1 * 2.0), $MachinePrecision] * t$95$2), $MachinePrecision] * N[(t$95$2 - 3.0), $MachinePrecision]), $MachinePrecision] + N[(N[(x1 * x1), $MachinePrecision] * N[(N[(t$95$2 * 4.0), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(t$95$0 * t$95$2), $MachinePrecision]), $MachinePrecision] + N[(x1 * N[(x1 * x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(3.0 * N[(N[(N[(t$95$0 - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$3, Infinity], t$95$3, N[(x1 + N[(N[(x1 + N[(6.0 * N[Power[x1, 4.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(3.0 * N[(x2 * -2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x1 \cdot \left(x1 \cdot 3\right)\\
t_1 := x1 \cdot x1 + 1\\
t_2 := \frac{\left(t\_0 + 2 \cdot x2\right) - x1}{t\_1}\\
t_3 := x1 + \left(\left(x1 + \left(\left(t\_1 \cdot \left(\left(\left(x1 \cdot 2\right) \cdot t\_2\right) \cdot \left(t\_2 - 3\right) + \left(x1 \cdot x1\right) \cdot \left(t\_2 \cdot 4 - 6\right)\right) + t\_0 \cdot t\_2\right) + x1 \cdot \left(x1 \cdot x1\right)\right)\right) + 3 \cdot \frac{\left(t\_0 - 2 \cdot x2\right) - x1}{t\_1}\right)\\
\mathbf{if}\;t\_3 \leq \infty:\\
\;\;\;\;t\_3\\
\mathbf{else}:\\
\;\;\;\;x1 + \left(\left(x1 + 6 \cdot {x1}^{4}\right) + 3 \cdot \left(x2 \cdot -2\right)\right)\\
\end{array}
\end{array}
if (+.f64 x1 (+.f64 (+.f64 (+.f64 (+.f64 (*.f64 (+.f64 (*.f64 (*.f64 (*.f64 #s(literal 2 binary64) x1) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64)))) (-.f64 (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))) #s(literal 3 binary64))) (*.f64 (*.f64 x1 x1) (-.f64 (*.f64 #s(literal 4 binary64) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64)))) #s(literal 6 binary64)))) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))) (*.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))))) (*.f64 (*.f64 x1 x1) x1)) x1) (*.f64 #s(literal 3 binary64) (/.f64 (-.f64 (-.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64)))))) < +inf.0Initial program 99.4%
if +inf.0 < (+.f64 x1 (+.f64 (+.f64 (+.f64 (+.f64 (*.f64 (+.f64 (*.f64 (*.f64 (*.f64 #s(literal 2 binary64) x1) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64)))) (-.f64 (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))) #s(literal 3 binary64))) (*.f64 (*.f64 x1 x1) (-.f64 (*.f64 #s(literal 4 binary64) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64)))) #s(literal 6 binary64)))) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))) (*.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))))) (*.f64 (*.f64 x1 x1) x1)) x1) (*.f64 #s(literal 3 binary64) (/.f64 (-.f64 (-.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64)))))) Initial program 0.0%
Taylor expanded in x1 around 0 0.0%
*-commutative0.0%
Simplified0.0%
Taylor expanded in x1 around inf 100.0%
Final simplification99.6%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (+ (* x1 x1) 1.0))
(t_1 (* x1 (* x1 3.0)))
(t_2 (/ (- (+ t_1 (* 2.0 x2)) x1) t_0)))
(if (<= x1 -8.5e+72)
(+ x1 (+ (+ x1 (* 6.0 (pow x1 4.0))) (* 3.0 (* x2 -2.0))))
(if (<= x1 2e+152)
(+
x1
(+
(* 3.0 (/ (- (- t_1 (* 2.0 x2)) x1) t_0))
(+
x1
(+
(* x1 (* x1 x1))
(+
(*
t_0
(+
(* (* (* x1 2.0) t_2) (- t_2 3.0))
(* (* x1 x1) (- (* t_2 4.0) 6.0))))
(* 3.0 t_1))))))
(* x1 (+ (* x1 9.0) -1.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 tmp;
if (x1 <= -8.5e+72) {
tmp = x1 + ((x1 + (6.0 * pow(x1, 4.0))) + (3.0 * (x2 * -2.0)));
} else if (x1 <= 2e+152) {
tmp = x1 + ((3.0 * (((t_1 - (2.0 * x2)) - x1) / t_0)) + (x1 + ((x1 * (x1 * x1)) + ((t_0 * ((((x1 * 2.0) * t_2) * (t_2 - 3.0)) + ((x1 * x1) * ((t_2 * 4.0) - 6.0)))) + (3.0 * t_1)))));
} else {
tmp = x1 * ((x1 * 9.0) + -1.0);
}
return tmp;
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
real(8) :: t_0
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_0 = (x1 * x1) + 1.0d0
t_1 = x1 * (x1 * 3.0d0)
t_2 = ((t_1 + (2.0d0 * x2)) - x1) / t_0
if (x1 <= (-8.5d+72)) then
tmp = x1 + ((x1 + (6.0d0 * (x1 ** 4.0d0))) + (3.0d0 * (x2 * (-2.0d0))))
else if (x1 <= 2d+152) then
tmp = x1 + ((3.0d0 * (((t_1 - (2.0d0 * x2)) - x1) / t_0)) + (x1 + ((x1 * (x1 * x1)) + ((t_0 * ((((x1 * 2.0d0) * t_2) * (t_2 - 3.0d0)) + ((x1 * x1) * ((t_2 * 4.0d0) - 6.0d0)))) + (3.0d0 * t_1)))))
else
tmp = x1 * ((x1 * 9.0d0) + (-1.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 tmp;
if (x1 <= -8.5e+72) {
tmp = x1 + ((x1 + (6.0 * Math.pow(x1, 4.0))) + (3.0 * (x2 * -2.0)));
} else if (x1 <= 2e+152) {
tmp = x1 + ((3.0 * (((t_1 - (2.0 * x2)) - x1) / t_0)) + (x1 + ((x1 * (x1 * x1)) + ((t_0 * ((((x1 * 2.0) * t_2) * (t_2 - 3.0)) + ((x1 * x1) * ((t_2 * 4.0) - 6.0)))) + (3.0 * t_1)))));
} else {
tmp = x1 * ((x1 * 9.0) + -1.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 tmp = 0 if x1 <= -8.5e+72: tmp = x1 + ((x1 + (6.0 * math.pow(x1, 4.0))) + (3.0 * (x2 * -2.0))) elif x1 <= 2e+152: tmp = x1 + ((3.0 * (((t_1 - (2.0 * x2)) - x1) / t_0)) + (x1 + ((x1 * (x1 * x1)) + ((t_0 * ((((x1 * 2.0) * t_2) * (t_2 - 3.0)) + ((x1 * x1) * ((t_2 * 4.0) - 6.0)))) + (3.0 * t_1))))) else: tmp = x1 * ((x1 * 9.0) + -1.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) tmp = 0.0 if (x1 <= -8.5e+72) tmp = Float64(x1 + Float64(Float64(x1 + Float64(6.0 * (x1 ^ 4.0))) + Float64(3.0 * Float64(x2 * -2.0)))); elseif (x1 <= 2e+152) tmp = Float64(x1 + Float64(Float64(3.0 * Float64(Float64(Float64(t_1 - Float64(2.0 * x2)) - x1) / t_0)) + Float64(x1 + Float64(Float64(x1 * Float64(x1 * x1)) + Float64(Float64(t_0 * Float64(Float64(Float64(Float64(x1 * 2.0) * t_2) * Float64(t_2 - 3.0)) + Float64(Float64(x1 * x1) * Float64(Float64(t_2 * 4.0) - 6.0)))) + Float64(3.0 * t_1)))))); else tmp = Float64(x1 * Float64(Float64(x1 * 9.0) + -1.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; tmp = 0.0; if (x1 <= -8.5e+72) tmp = x1 + ((x1 + (6.0 * (x1 ^ 4.0))) + (3.0 * (x2 * -2.0))); elseif (x1 <= 2e+152) tmp = x1 + ((3.0 * (((t_1 - (2.0 * x2)) - x1) / t_0)) + (x1 + ((x1 * (x1 * x1)) + ((t_0 * ((((x1 * 2.0) * t_2) * (t_2 - 3.0)) + ((x1 * x1) * ((t_2 * 4.0) - 6.0)))) + (3.0 * t_1))))); else tmp = x1 * ((x1 * 9.0) + -1.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]}, If[LessEqual[x1, -8.5e+72], 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], If[LessEqual[x1, 2e+152], 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[(x1 + N[(N[(x1 * N[(x1 * x1), $MachinePrecision]), $MachinePrecision] + N[(N[(t$95$0 * N[(N[(N[(N[(x1 * 2.0), $MachinePrecision] * t$95$2), $MachinePrecision] * N[(t$95$2 - 3.0), $MachinePrecision]), $MachinePrecision] + N[(N[(x1 * x1), $MachinePrecision] * N[(N[(t$95$2 * 4.0), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(3.0 * t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x1 * N[(N[(x1 * 9.0), $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x1 \cdot x1 + 1\\
t_1 := x1 \cdot \left(x1 \cdot 3\right)\\
t_2 := \frac{\left(t\_1 + 2 \cdot x2\right) - x1}{t\_0}\\
\mathbf{if}\;x1 \leq -8.5 \cdot 10^{+72}:\\
\;\;\;\;x1 + \left(\left(x1 + 6 \cdot {x1}^{4}\right) + 3 \cdot \left(x2 \cdot -2\right)\right)\\
\mathbf{elif}\;x1 \leq 2 \cdot 10^{+152}:\\
\;\;\;\;x1 + \left(3 \cdot \frac{\left(t\_1 - 2 \cdot x2\right) - x1}{t\_0} + \left(x1 + \left(x1 \cdot \left(x1 \cdot x1\right) + \left(t\_0 \cdot \left(\left(\left(x1 \cdot 2\right) \cdot t\_2\right) \cdot \left(t\_2 - 3\right) + \left(x1 \cdot x1\right) \cdot \left(t\_2 \cdot 4 - 6\right)\right) + 3 \cdot t\_1\right)\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x1 \cdot \left(x1 \cdot 9 + -1\right)\\
\end{array}
\end{array}
if x1 < -8.5000000000000004e72Initial program 8.3%
Taylor expanded in x1 around 0 8.3%
*-commutative8.3%
Simplified8.3%
Taylor expanded in x1 around inf 100.0%
if -8.5000000000000004e72 < x1 < 2.0000000000000001e152Initial program 99.4%
Taylor expanded in x1 around inf 99.0%
if 2.0000000000000001e152 < x1 Initial program 0.0%
Simplified0.0%
Taylor expanded in x1 around 0 80.0%
Taylor expanded in x2 around 0 100.0%
Taylor expanded in x2 around inf 100.0%
Taylor expanded in x2 around 0 100.0%
Final simplification99.3%
(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)))
(if (<= x1 -5.6e+102)
(* x2 (- (/ (* x1 (* x1 9.0)) x2) 6.0))
(if (<= x1 2e+152)
(+
x1
(+
(* 3.0 (/ (- (- t_1 (* 2.0 x2)) x1) t_0))
(+
x1
(+
(* x1 (* x1 x1))
(+
(*
t_0
(+
(* (* (* x1 2.0) t_2) (- t_2 3.0))
(* (* x1 x1) (- (* t_2 4.0) 6.0))))
(* 3.0 t_1))))))
(* x1 (+ (* x1 9.0) -1.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 tmp;
if (x1 <= -5.6e+102) {
tmp = x2 * (((x1 * (x1 * 9.0)) / x2) - 6.0);
} else if (x1 <= 2e+152) {
tmp = x1 + ((3.0 * (((t_1 - (2.0 * x2)) - x1) / t_0)) + (x1 + ((x1 * (x1 * x1)) + ((t_0 * ((((x1 * 2.0) * t_2) * (t_2 - 3.0)) + ((x1 * x1) * ((t_2 * 4.0) - 6.0)))) + (3.0 * t_1)))));
} else {
tmp = x1 * ((x1 * 9.0) + -1.0);
}
return tmp;
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
real(8) :: t_0
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_0 = (x1 * x1) + 1.0d0
t_1 = x1 * (x1 * 3.0d0)
t_2 = ((t_1 + (2.0d0 * x2)) - x1) / t_0
if (x1 <= (-5.6d+102)) then
tmp = x2 * (((x1 * (x1 * 9.0d0)) / x2) - 6.0d0)
else if (x1 <= 2d+152) then
tmp = x1 + ((3.0d0 * (((t_1 - (2.0d0 * x2)) - x1) / t_0)) + (x1 + ((x1 * (x1 * x1)) + ((t_0 * ((((x1 * 2.0d0) * t_2) * (t_2 - 3.0d0)) + ((x1 * x1) * ((t_2 * 4.0d0) - 6.0d0)))) + (3.0d0 * t_1)))))
else
tmp = x1 * ((x1 * 9.0d0) + (-1.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 tmp;
if (x1 <= -5.6e+102) {
tmp = x2 * (((x1 * (x1 * 9.0)) / x2) - 6.0);
} else if (x1 <= 2e+152) {
tmp = x1 + ((3.0 * (((t_1 - (2.0 * x2)) - x1) / t_0)) + (x1 + ((x1 * (x1 * x1)) + ((t_0 * ((((x1 * 2.0) * t_2) * (t_2 - 3.0)) + ((x1 * x1) * ((t_2 * 4.0) - 6.0)))) + (3.0 * t_1)))));
} else {
tmp = x1 * ((x1 * 9.0) + -1.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 tmp = 0 if x1 <= -5.6e+102: tmp = x2 * (((x1 * (x1 * 9.0)) / x2) - 6.0) elif x1 <= 2e+152: tmp = x1 + ((3.0 * (((t_1 - (2.0 * x2)) - x1) / t_0)) + (x1 + ((x1 * (x1 * x1)) + ((t_0 * ((((x1 * 2.0) * t_2) * (t_2 - 3.0)) + ((x1 * x1) * ((t_2 * 4.0) - 6.0)))) + (3.0 * t_1))))) else: tmp = x1 * ((x1 * 9.0) + -1.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) tmp = 0.0 if (x1 <= -5.6e+102) tmp = Float64(x2 * Float64(Float64(Float64(x1 * Float64(x1 * 9.0)) / x2) - 6.0)); elseif (x1 <= 2e+152) tmp = Float64(x1 + Float64(Float64(3.0 * Float64(Float64(Float64(t_1 - Float64(2.0 * x2)) - x1) / t_0)) + Float64(x1 + Float64(Float64(x1 * Float64(x1 * x1)) + Float64(Float64(t_0 * Float64(Float64(Float64(Float64(x1 * 2.0) * t_2) * Float64(t_2 - 3.0)) + Float64(Float64(x1 * x1) * Float64(Float64(t_2 * 4.0) - 6.0)))) + Float64(3.0 * t_1)))))); else tmp = Float64(x1 * Float64(Float64(x1 * 9.0) + -1.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; tmp = 0.0; if (x1 <= -5.6e+102) tmp = x2 * (((x1 * (x1 * 9.0)) / x2) - 6.0); elseif (x1 <= 2e+152) tmp = x1 + ((3.0 * (((t_1 - (2.0 * x2)) - x1) / t_0)) + (x1 + ((x1 * (x1 * x1)) + ((t_0 * ((((x1 * 2.0) * t_2) * (t_2 - 3.0)) + ((x1 * x1) * ((t_2 * 4.0) - 6.0)))) + (3.0 * t_1))))); else tmp = x1 * ((x1 * 9.0) + -1.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]}, If[LessEqual[x1, -5.6e+102], N[(x2 * N[(N[(N[(x1 * N[(x1 * 9.0), $MachinePrecision]), $MachinePrecision] / x2), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 2e+152], 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[(x1 + N[(N[(x1 * N[(x1 * x1), $MachinePrecision]), $MachinePrecision] + N[(N[(t$95$0 * N[(N[(N[(N[(x1 * 2.0), $MachinePrecision] * t$95$2), $MachinePrecision] * N[(t$95$2 - 3.0), $MachinePrecision]), $MachinePrecision] + N[(N[(x1 * x1), $MachinePrecision] * N[(N[(t$95$2 * 4.0), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(3.0 * t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x1 * N[(N[(x1 * 9.0), $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x1 \cdot x1 + 1\\
t_1 := x1 \cdot \left(x1 \cdot 3\right)\\
t_2 := \frac{\left(t\_1 + 2 \cdot x2\right) - x1}{t\_0}\\
\mathbf{if}\;x1 \leq -5.6 \cdot 10^{+102}:\\
\;\;\;\;x2 \cdot \left(\frac{x1 \cdot \left(x1 \cdot 9\right)}{x2} - 6\right)\\
\mathbf{elif}\;x1 \leq 2 \cdot 10^{+152}:\\
\;\;\;\;x1 + \left(3 \cdot \frac{\left(t\_1 - 2 \cdot x2\right) - x1}{t\_0} + \left(x1 + \left(x1 \cdot \left(x1 \cdot x1\right) + \left(t\_0 \cdot \left(\left(\left(x1 \cdot 2\right) \cdot t\_2\right) \cdot \left(t\_2 - 3\right) + \left(x1 \cdot x1\right) \cdot \left(t\_2 \cdot 4 - 6\right)\right) + 3 \cdot t\_1\right)\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x1 \cdot \left(x1 \cdot 9 + -1\right)\\
\end{array}
\end{array}
if x1 < -5.60000000000000037e102Initial program 0.0%
Simplified0.0%
Taylor expanded in x1 around 0 58.8%
Taylor expanded in x2 around 0 83.1%
Taylor expanded in x2 around inf 91.6%
Taylor expanded in x1 around inf 91.6%
*-commutative91.6%
Simplified91.6%
if -5.60000000000000037e102 < x1 < 2.0000000000000001e152Initial program 99.4%
Taylor expanded in x1 around inf 99.0%
if 2.0000000000000001e152 < x1 Initial program 0.0%
Simplified0.0%
Taylor expanded in x1 around 0 80.0%
Taylor expanded in x2 around 0 100.0%
Taylor expanded in x2 around inf 100.0%
Taylor expanded in x2 around 0 100.0%
Final simplification97.5%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (* x1 (* x1 3.0)))
(t_1 (+ (* x1 x1) 1.0))
(t_2 (/ (- (+ t_0 (* 2.0 x2)) x1) t_1)))
(if (<= x1 -5.6e+102)
(* x2 (- (/ (* x1 (* x1 9.0)) x2) 6.0))
(if (<= x1 2e+152)
(+
x1
(+
(* 3.0 (* x2 -2.0))
(+
x1
(+
(* x1 (* x1 x1))
(+
(*
t_1
(+
(* (* (* x1 2.0) t_2) (- t_2 3.0))
(* (* x1 x1) (- (* t_2 4.0) 6.0))))
(* t_0 (- 3.0 (/ 1.0 x1))))))))
(* x1 (+ (* x1 9.0) -1.0))))))
double code(double x1, double x2) {
double t_0 = x1 * (x1 * 3.0);
double t_1 = (x1 * x1) + 1.0;
double t_2 = ((t_0 + (2.0 * x2)) - x1) / t_1;
double tmp;
if (x1 <= -5.6e+102) {
tmp = x2 * (((x1 * (x1 * 9.0)) / x2) - 6.0);
} else if (x1 <= 2e+152) {
tmp = x1 + ((3.0 * (x2 * -2.0)) + (x1 + ((x1 * (x1 * x1)) + ((t_1 * ((((x1 * 2.0) * t_2) * (t_2 - 3.0)) + ((x1 * x1) * ((t_2 * 4.0) - 6.0)))) + (t_0 * (3.0 - (1.0 / x1)))))));
} else {
tmp = x1 * ((x1 * 9.0) + -1.0);
}
return tmp;
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
real(8) :: t_0
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_0 = x1 * (x1 * 3.0d0)
t_1 = (x1 * x1) + 1.0d0
t_2 = ((t_0 + (2.0d0 * x2)) - x1) / t_1
if (x1 <= (-5.6d+102)) then
tmp = x2 * (((x1 * (x1 * 9.0d0)) / x2) - 6.0d0)
else if (x1 <= 2d+152) then
tmp = x1 + ((3.0d0 * (x2 * (-2.0d0))) + (x1 + ((x1 * (x1 * x1)) + ((t_1 * ((((x1 * 2.0d0) * t_2) * (t_2 - 3.0d0)) + ((x1 * x1) * ((t_2 * 4.0d0) - 6.0d0)))) + (t_0 * (3.0d0 - (1.0d0 / x1)))))))
else
tmp = x1 * ((x1 * 9.0d0) + (-1.0d0))
end if
code = tmp
end function
public static double code(double x1, double x2) {
double t_0 = x1 * (x1 * 3.0);
double t_1 = (x1 * x1) + 1.0;
double t_2 = ((t_0 + (2.0 * x2)) - x1) / t_1;
double tmp;
if (x1 <= -5.6e+102) {
tmp = x2 * (((x1 * (x1 * 9.0)) / x2) - 6.0);
} else if (x1 <= 2e+152) {
tmp = x1 + ((3.0 * (x2 * -2.0)) + (x1 + ((x1 * (x1 * x1)) + ((t_1 * ((((x1 * 2.0) * t_2) * (t_2 - 3.0)) + ((x1 * x1) * ((t_2 * 4.0) - 6.0)))) + (t_0 * (3.0 - (1.0 / x1)))))));
} else {
tmp = x1 * ((x1 * 9.0) + -1.0);
}
return tmp;
}
def code(x1, x2): t_0 = x1 * (x1 * 3.0) t_1 = (x1 * x1) + 1.0 t_2 = ((t_0 + (2.0 * x2)) - x1) / t_1 tmp = 0 if x1 <= -5.6e+102: tmp = x2 * (((x1 * (x1 * 9.0)) / x2) - 6.0) elif x1 <= 2e+152: tmp = x1 + ((3.0 * (x2 * -2.0)) + (x1 + ((x1 * (x1 * x1)) + ((t_1 * ((((x1 * 2.0) * t_2) * (t_2 - 3.0)) + ((x1 * x1) * ((t_2 * 4.0) - 6.0)))) + (t_0 * (3.0 - (1.0 / x1))))))) else: tmp = x1 * ((x1 * 9.0) + -1.0) return tmp
function code(x1, x2) t_0 = Float64(x1 * Float64(x1 * 3.0)) t_1 = Float64(Float64(x1 * x1) + 1.0) t_2 = Float64(Float64(Float64(t_0 + Float64(2.0 * x2)) - x1) / t_1) tmp = 0.0 if (x1 <= -5.6e+102) tmp = Float64(x2 * Float64(Float64(Float64(x1 * Float64(x1 * 9.0)) / x2) - 6.0)); elseif (x1 <= 2e+152) tmp = Float64(x1 + Float64(Float64(3.0 * Float64(x2 * -2.0)) + Float64(x1 + Float64(Float64(x1 * Float64(x1 * x1)) + Float64(Float64(t_1 * Float64(Float64(Float64(Float64(x1 * 2.0) * t_2) * Float64(t_2 - 3.0)) + Float64(Float64(x1 * x1) * Float64(Float64(t_2 * 4.0) - 6.0)))) + Float64(t_0 * Float64(3.0 - Float64(1.0 / x1)))))))); else tmp = Float64(x1 * Float64(Float64(x1 * 9.0) + -1.0)); end return tmp end
function tmp_2 = code(x1, x2) t_0 = x1 * (x1 * 3.0); t_1 = (x1 * x1) + 1.0; t_2 = ((t_0 + (2.0 * x2)) - x1) / t_1; tmp = 0.0; if (x1 <= -5.6e+102) tmp = x2 * (((x1 * (x1 * 9.0)) / x2) - 6.0); elseif (x1 <= 2e+152) tmp = x1 + ((3.0 * (x2 * -2.0)) + (x1 + ((x1 * (x1 * x1)) + ((t_1 * ((((x1 * 2.0) * t_2) * (t_2 - 3.0)) + ((x1 * x1) * ((t_2 * 4.0) - 6.0)))) + (t_0 * (3.0 - (1.0 / x1))))))); else tmp = x1 * ((x1 * 9.0) + -1.0); end tmp_2 = tmp; end
code[x1_, x2_] := Block[{t$95$0 = N[(x1 * N[(x1 * 3.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(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]}, If[LessEqual[x1, -5.6e+102], N[(x2 * N[(N[(N[(x1 * N[(x1 * 9.0), $MachinePrecision]), $MachinePrecision] / x2), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 2e+152], N[(x1 + N[(N[(3.0 * N[(x2 * -2.0), $MachinePrecision]), $MachinePrecision] + N[(x1 + N[(N[(x1 * N[(x1 * x1), $MachinePrecision]), $MachinePrecision] + N[(N[(t$95$1 * N[(N[(N[(N[(x1 * 2.0), $MachinePrecision] * t$95$2), $MachinePrecision] * N[(t$95$2 - 3.0), $MachinePrecision]), $MachinePrecision] + N[(N[(x1 * x1), $MachinePrecision] * N[(N[(t$95$2 * 4.0), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(t$95$0 * N[(3.0 - N[(1.0 / x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x1 * N[(N[(x1 * 9.0), $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x1 \cdot \left(x1 \cdot 3\right)\\
t_1 := x1 \cdot x1 + 1\\
t_2 := \frac{\left(t\_0 + 2 \cdot x2\right) - x1}{t\_1}\\
\mathbf{if}\;x1 \leq -5.6 \cdot 10^{+102}:\\
\;\;\;\;x2 \cdot \left(\frac{x1 \cdot \left(x1 \cdot 9\right)}{x2} - 6\right)\\
\mathbf{elif}\;x1 \leq 2 \cdot 10^{+152}:\\
\;\;\;\;x1 + \left(3 \cdot \left(x2 \cdot -2\right) + \left(x1 + \left(x1 \cdot \left(x1 \cdot x1\right) + \left(t\_1 \cdot \left(\left(\left(x1 \cdot 2\right) \cdot t\_2\right) \cdot \left(t\_2 - 3\right) + \left(x1 \cdot x1\right) \cdot \left(t\_2 \cdot 4 - 6\right)\right) + t\_0 \cdot \left(3 - \frac{1}{x1}\right)\right)\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x1 \cdot \left(x1 \cdot 9 + -1\right)\\
\end{array}
\end{array}
if x1 < -5.60000000000000037e102Initial program 0.0%
Simplified0.0%
Taylor expanded in x1 around 0 58.8%
Taylor expanded in x2 around 0 83.1%
Taylor expanded in x2 around inf 91.6%
Taylor expanded in x1 around inf 91.6%
*-commutative91.6%
Simplified91.6%
if -5.60000000000000037e102 < x1 < 2.0000000000000001e152Initial program 99.4%
Taylor expanded in x1 around 0 86.1%
*-commutative86.1%
Simplified86.1%
Taylor expanded in x1 around inf 96.7%
if 2.0000000000000001e152 < x1 Initial program 0.0%
Simplified0.0%
Taylor expanded in x1 around 0 80.0%
Taylor expanded in x2 around 0 100.0%
Taylor expanded in x2 around inf 100.0%
Taylor expanded in x2 around 0 100.0%
Final simplification96.0%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (* x1 (+ (* x1 9.0) -1.0)))
(t_1 (* x1 (* x1 3.0)))
(t_2 (+ (* x1 x1) 1.0))
(t_3 (/ (- (+ t_1 (* 2.0 x2)) x1) t_2))
(t_4
(+
x1
(+
(* 3.0 (/ (- (- t_1 (* 2.0 x2)) x1) t_2))
(+
x1
(+
(* x1 (* x1 x1))
(+
(* t_1 t_3)
(* t_2 (+ (* (* x1 x1) 6.0) (* (* (* x1 2.0) t_3) 0.0))))))))))
(if (<= x1 -5.6e+102)
(* x2 (- (/ (* x1 (* x1 9.0)) x2) 6.0))
(if (<= x1 -130.0)
t_4
(if (<= x1 3.2e+24)
(+
(* x2 -6.0)
(+ t_0 (* x2 (+ (* 8.0 (* x1 x2)) (* x1 (- (* x1 12.0) 12.0))))))
(if (<= x1 5e+153) t_4 t_0))))))
double code(double x1, double x2) {
double t_0 = x1 * ((x1 * 9.0) + -1.0);
double t_1 = x1 * (x1 * 3.0);
double t_2 = (x1 * x1) + 1.0;
double t_3 = ((t_1 + (2.0 * x2)) - x1) / t_2;
double t_4 = x1 + ((3.0 * (((t_1 - (2.0 * x2)) - x1) / t_2)) + (x1 + ((x1 * (x1 * x1)) + ((t_1 * t_3) + (t_2 * (((x1 * x1) * 6.0) + (((x1 * 2.0) * t_3) * 0.0)))))));
double tmp;
if (x1 <= -5.6e+102) {
tmp = x2 * (((x1 * (x1 * 9.0)) / x2) - 6.0);
} else if (x1 <= -130.0) {
tmp = t_4;
} else if (x1 <= 3.2e+24) {
tmp = (x2 * -6.0) + (t_0 + (x2 * ((8.0 * (x1 * x2)) + (x1 * ((x1 * 12.0) - 12.0)))));
} else if (x1 <= 5e+153) {
tmp = t_4;
} else {
tmp = t_0;
}
return tmp;
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
real(8) :: t_0
real(8) :: t_1
real(8) :: t_2
real(8) :: t_3
real(8) :: t_4
real(8) :: tmp
t_0 = x1 * ((x1 * 9.0d0) + (-1.0d0))
t_1 = x1 * (x1 * 3.0d0)
t_2 = (x1 * x1) + 1.0d0
t_3 = ((t_1 + (2.0d0 * x2)) - x1) / t_2
t_4 = x1 + ((3.0d0 * (((t_1 - (2.0d0 * x2)) - x1) / t_2)) + (x1 + ((x1 * (x1 * x1)) + ((t_1 * t_3) + (t_2 * (((x1 * x1) * 6.0d0) + (((x1 * 2.0d0) * t_3) * 0.0d0)))))))
if (x1 <= (-5.6d+102)) then
tmp = x2 * (((x1 * (x1 * 9.0d0)) / x2) - 6.0d0)
else if (x1 <= (-130.0d0)) then
tmp = t_4
else if (x1 <= 3.2d+24) then
tmp = (x2 * (-6.0d0)) + (t_0 + (x2 * ((8.0d0 * (x1 * x2)) + (x1 * ((x1 * 12.0d0) - 12.0d0)))))
else if (x1 <= 5d+153) then
tmp = t_4
else
tmp = t_0
end if
code = tmp
end function
public static double code(double x1, double x2) {
double t_0 = x1 * ((x1 * 9.0) + -1.0);
double t_1 = x1 * (x1 * 3.0);
double t_2 = (x1 * x1) + 1.0;
double t_3 = ((t_1 + (2.0 * x2)) - x1) / t_2;
double t_4 = x1 + ((3.0 * (((t_1 - (2.0 * x2)) - x1) / t_2)) + (x1 + ((x1 * (x1 * x1)) + ((t_1 * t_3) + (t_2 * (((x1 * x1) * 6.0) + (((x1 * 2.0) * t_3) * 0.0)))))));
double tmp;
if (x1 <= -5.6e+102) {
tmp = x2 * (((x1 * (x1 * 9.0)) / x2) - 6.0);
} else if (x1 <= -130.0) {
tmp = t_4;
} else if (x1 <= 3.2e+24) {
tmp = (x2 * -6.0) + (t_0 + (x2 * ((8.0 * (x1 * x2)) + (x1 * ((x1 * 12.0) - 12.0)))));
} else if (x1 <= 5e+153) {
tmp = t_4;
} else {
tmp = t_0;
}
return tmp;
}
def code(x1, x2): t_0 = x1 * ((x1 * 9.0) + -1.0) t_1 = x1 * (x1 * 3.0) t_2 = (x1 * x1) + 1.0 t_3 = ((t_1 + (2.0 * x2)) - x1) / t_2 t_4 = x1 + ((3.0 * (((t_1 - (2.0 * x2)) - x1) / t_2)) + (x1 + ((x1 * (x1 * x1)) + ((t_1 * t_3) + (t_2 * (((x1 * x1) * 6.0) + (((x1 * 2.0) * t_3) * 0.0))))))) tmp = 0 if x1 <= -5.6e+102: tmp = x2 * (((x1 * (x1 * 9.0)) / x2) - 6.0) elif x1 <= -130.0: tmp = t_4 elif x1 <= 3.2e+24: tmp = (x2 * -6.0) + (t_0 + (x2 * ((8.0 * (x1 * x2)) + (x1 * ((x1 * 12.0) - 12.0))))) elif x1 <= 5e+153: tmp = t_4 else: tmp = t_0 return tmp
function code(x1, x2) t_0 = Float64(x1 * Float64(Float64(x1 * 9.0) + -1.0)) t_1 = Float64(x1 * Float64(x1 * 3.0)) t_2 = Float64(Float64(x1 * x1) + 1.0) t_3 = Float64(Float64(Float64(t_1 + Float64(2.0 * x2)) - x1) / t_2) t_4 = 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(t_1 * t_3) + Float64(t_2 * Float64(Float64(Float64(x1 * x1) * 6.0) + Float64(Float64(Float64(x1 * 2.0) * t_3) * 0.0)))))))) tmp = 0.0 if (x1 <= -5.6e+102) tmp = Float64(x2 * Float64(Float64(Float64(x1 * Float64(x1 * 9.0)) / x2) - 6.0)); elseif (x1 <= -130.0) tmp = t_4; elseif (x1 <= 3.2e+24) tmp = Float64(Float64(x2 * -6.0) + Float64(t_0 + Float64(x2 * Float64(Float64(8.0 * Float64(x1 * x2)) + Float64(x1 * Float64(Float64(x1 * 12.0) - 12.0)))))); elseif (x1 <= 5e+153) tmp = t_4; else tmp = t_0; end return tmp end
function tmp_2 = code(x1, x2) t_0 = x1 * ((x1 * 9.0) + -1.0); t_1 = x1 * (x1 * 3.0); t_2 = (x1 * x1) + 1.0; t_3 = ((t_1 + (2.0 * x2)) - x1) / t_2; t_4 = x1 + ((3.0 * (((t_1 - (2.0 * x2)) - x1) / t_2)) + (x1 + ((x1 * (x1 * x1)) + ((t_1 * t_3) + (t_2 * (((x1 * x1) * 6.0) + (((x1 * 2.0) * t_3) * 0.0))))))); tmp = 0.0; if (x1 <= -5.6e+102) tmp = x2 * (((x1 * (x1 * 9.0)) / x2) - 6.0); elseif (x1 <= -130.0) tmp = t_4; elseif (x1 <= 3.2e+24) tmp = (x2 * -6.0) + (t_0 + (x2 * ((8.0 * (x1 * x2)) + (x1 * ((x1 * 12.0) - 12.0))))); elseif (x1 <= 5e+153) tmp = t_4; else tmp = t_0; end tmp_2 = tmp; end
code[x1_, x2_] := Block[{t$95$0 = N[(x1 * N[(N[(x1 * 9.0), $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(x1 * N[(x1 * 3.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(x1 * x1), $MachinePrecision] + 1.0), $MachinePrecision]}, Block[{t$95$3 = N[(N[(N[(t$95$1 + N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$2), $MachinePrecision]}, Block[{t$95$4 = 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[(t$95$1 * t$95$3), $MachinePrecision] + N[(t$95$2 * N[(N[(N[(x1 * x1), $MachinePrecision] * 6.0), $MachinePrecision] + N[(N[(N[(x1 * 2.0), $MachinePrecision] * t$95$3), $MachinePrecision] * 0.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x1, -5.6e+102], N[(x2 * N[(N[(N[(x1 * N[(x1 * 9.0), $MachinePrecision]), $MachinePrecision] / x2), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, -130.0], t$95$4, If[LessEqual[x1, 3.2e+24], N[(N[(x2 * -6.0), $MachinePrecision] + N[(t$95$0 + N[(x2 * N[(N[(8.0 * N[(x1 * x2), $MachinePrecision]), $MachinePrecision] + N[(x1 * N[(N[(x1 * 12.0), $MachinePrecision] - 12.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 5e+153], t$95$4, t$95$0]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x1 \cdot \left(x1 \cdot 9 + -1\right)\\
t_1 := x1 \cdot \left(x1 \cdot 3\right)\\
t_2 := x1 \cdot x1 + 1\\
t_3 := \frac{\left(t\_1 + 2 \cdot x2\right) - x1}{t\_2}\\
t_4 := 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(t\_1 \cdot t\_3 + t\_2 \cdot \left(\left(x1 \cdot x1\right) \cdot 6 + \left(\left(x1 \cdot 2\right) \cdot t\_3\right) \cdot 0\right)\right)\right)\right)\right)\\
\mathbf{if}\;x1 \leq -5.6 \cdot 10^{+102}:\\
\;\;\;\;x2 \cdot \left(\frac{x1 \cdot \left(x1 \cdot 9\right)}{x2} - 6\right)\\
\mathbf{elif}\;x1 \leq -130:\\
\;\;\;\;t\_4\\
\mathbf{elif}\;x1 \leq 3.2 \cdot 10^{+24}:\\
\;\;\;\;x2 \cdot -6 + \left(t\_0 + x2 \cdot \left(8 \cdot \left(x1 \cdot x2\right) + x1 \cdot \left(x1 \cdot 12 - 12\right)\right)\right)\\
\mathbf{elif}\;x1 \leq 5 \cdot 10^{+153}:\\
\;\;\;\;t\_4\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
if x1 < -5.60000000000000037e102Initial program 0.0%
Simplified0.0%
Taylor expanded in x1 around 0 58.8%
Taylor expanded in x2 around 0 83.1%
Taylor expanded in x2 around inf 91.6%
Taylor expanded in x1 around inf 91.6%
*-commutative91.6%
Simplified91.6%
if -5.60000000000000037e102 < x1 < -130 or 3.1999999999999997e24 < x1 < 5.00000000000000018e153Initial program 99.3%
Taylor expanded in x1 around inf 86.1%
Taylor expanded in x1 around inf 83.7%
if -130 < x1 < 3.1999999999999997e24Initial program 99.5%
Simplified99.8%
Taylor expanded in x1 around 0 85.2%
Taylor expanded in x2 around 0 97.6%
if 5.00000000000000018e153 < x1 Initial program 0.0%
Simplified0.0%
Taylor expanded in x1 around 0 80.0%
Taylor expanded in x2 around 0 100.0%
Taylor expanded in x2 around inf 100.0%
Taylor expanded in x2 around 0 100.0%
Final simplification94.2%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (* x1 (* x1 3.0)))
(t_1 (+ (* x1 x1) 1.0))
(t_2 (/ (- (+ t_0 (* 2.0 x2)) x1) t_1)))
(if (<= x1 -5.6e+102)
(* x2 (- (/ (* x1 (* x1 9.0)) x2) 6.0))
(if (<= x1 2e+152)
(+
x1
(+
(* 3.0 (/ (- (- t_0 (* 2.0 x2)) x1) t_1))
(+
x1
(+
(* x1 (* x1 x1))
(+
(* 3.0 t_0)
(*
t_1
(+ (* (* (* x1 2.0) t_2) (- t_2 3.0)) (* (* x1 x1) 6.0))))))))
(* x1 (+ (* x1 9.0) -1.0))))))
double code(double x1, double x2) {
double t_0 = x1 * (x1 * 3.0);
double t_1 = (x1 * x1) + 1.0;
double t_2 = ((t_0 + (2.0 * x2)) - x1) / t_1;
double tmp;
if (x1 <= -5.6e+102) {
tmp = x2 * (((x1 * (x1 * 9.0)) / x2) - 6.0);
} else if (x1 <= 2e+152) {
tmp = x1 + ((3.0 * (((t_0 - (2.0 * x2)) - x1) / t_1)) + (x1 + ((x1 * (x1 * x1)) + ((3.0 * t_0) + (t_1 * ((((x1 * 2.0) * t_2) * (t_2 - 3.0)) + ((x1 * x1) * 6.0)))))));
} else {
tmp = x1 * ((x1 * 9.0) + -1.0);
}
return tmp;
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
real(8) :: t_0
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_0 = x1 * (x1 * 3.0d0)
t_1 = (x1 * x1) + 1.0d0
t_2 = ((t_0 + (2.0d0 * x2)) - x1) / t_1
if (x1 <= (-5.6d+102)) then
tmp = x2 * (((x1 * (x1 * 9.0d0)) / x2) - 6.0d0)
else if (x1 <= 2d+152) then
tmp = x1 + ((3.0d0 * (((t_0 - (2.0d0 * x2)) - x1) / t_1)) + (x1 + ((x1 * (x1 * x1)) + ((3.0d0 * t_0) + (t_1 * ((((x1 * 2.0d0) * t_2) * (t_2 - 3.0d0)) + ((x1 * x1) * 6.0d0)))))))
else
tmp = x1 * ((x1 * 9.0d0) + (-1.0d0))
end if
code = tmp
end function
public static double code(double x1, double x2) {
double t_0 = x1 * (x1 * 3.0);
double t_1 = (x1 * x1) + 1.0;
double t_2 = ((t_0 + (2.0 * x2)) - x1) / t_1;
double tmp;
if (x1 <= -5.6e+102) {
tmp = x2 * (((x1 * (x1 * 9.0)) / x2) - 6.0);
} else if (x1 <= 2e+152) {
tmp = x1 + ((3.0 * (((t_0 - (2.0 * x2)) - x1) / t_1)) + (x1 + ((x1 * (x1 * x1)) + ((3.0 * t_0) + (t_1 * ((((x1 * 2.0) * t_2) * (t_2 - 3.0)) + ((x1 * x1) * 6.0)))))));
} else {
tmp = x1 * ((x1 * 9.0) + -1.0);
}
return tmp;
}
def code(x1, x2): t_0 = x1 * (x1 * 3.0) t_1 = (x1 * x1) + 1.0 t_2 = ((t_0 + (2.0 * x2)) - x1) / t_1 tmp = 0 if x1 <= -5.6e+102: tmp = x2 * (((x1 * (x1 * 9.0)) / x2) - 6.0) elif x1 <= 2e+152: tmp = x1 + ((3.0 * (((t_0 - (2.0 * x2)) - x1) / t_1)) + (x1 + ((x1 * (x1 * x1)) + ((3.0 * t_0) + (t_1 * ((((x1 * 2.0) * t_2) * (t_2 - 3.0)) + ((x1 * x1) * 6.0))))))) else: tmp = x1 * ((x1 * 9.0) + -1.0) return tmp
function code(x1, x2) t_0 = Float64(x1 * Float64(x1 * 3.0)) t_1 = Float64(Float64(x1 * x1) + 1.0) t_2 = Float64(Float64(Float64(t_0 + Float64(2.0 * x2)) - x1) / t_1) tmp = 0.0 if (x1 <= -5.6e+102) tmp = Float64(x2 * Float64(Float64(Float64(x1 * Float64(x1 * 9.0)) / x2) - 6.0)); elseif (x1 <= 2e+152) tmp = Float64(x1 + Float64(Float64(3.0 * Float64(Float64(Float64(t_0 - Float64(2.0 * x2)) - x1) / t_1)) + Float64(x1 + Float64(Float64(x1 * Float64(x1 * x1)) + Float64(Float64(3.0 * t_0) + Float64(t_1 * Float64(Float64(Float64(Float64(x1 * 2.0) * t_2) * Float64(t_2 - 3.0)) + Float64(Float64(x1 * x1) * 6.0)))))))); else tmp = Float64(x1 * Float64(Float64(x1 * 9.0) + -1.0)); end return tmp end
function tmp_2 = code(x1, x2) t_0 = x1 * (x1 * 3.0); t_1 = (x1 * x1) + 1.0; t_2 = ((t_0 + (2.0 * x2)) - x1) / t_1; tmp = 0.0; if (x1 <= -5.6e+102) tmp = x2 * (((x1 * (x1 * 9.0)) / x2) - 6.0); elseif (x1 <= 2e+152) tmp = x1 + ((3.0 * (((t_0 - (2.0 * x2)) - x1) / t_1)) + (x1 + ((x1 * (x1 * x1)) + ((3.0 * t_0) + (t_1 * ((((x1 * 2.0) * t_2) * (t_2 - 3.0)) + ((x1 * x1) * 6.0))))))); else tmp = x1 * ((x1 * 9.0) + -1.0); end tmp_2 = tmp; end
code[x1_, x2_] := Block[{t$95$0 = N[(x1 * N[(x1 * 3.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(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]}, If[LessEqual[x1, -5.6e+102], N[(x2 * N[(N[(N[(x1 * N[(x1 * 9.0), $MachinePrecision]), $MachinePrecision] / x2), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 2e+152], N[(x1 + N[(N[(3.0 * N[(N[(N[(t$95$0 - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$1), $MachinePrecision]), $MachinePrecision] + N[(x1 + N[(N[(x1 * N[(x1 * x1), $MachinePrecision]), $MachinePrecision] + N[(N[(3.0 * t$95$0), $MachinePrecision] + N[(t$95$1 * N[(N[(N[(N[(x1 * 2.0), $MachinePrecision] * t$95$2), $MachinePrecision] * N[(t$95$2 - 3.0), $MachinePrecision]), $MachinePrecision] + N[(N[(x1 * x1), $MachinePrecision] * 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x1 * N[(N[(x1 * 9.0), $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x1 \cdot \left(x1 \cdot 3\right)\\
t_1 := x1 \cdot x1 + 1\\
t_2 := \frac{\left(t\_0 + 2 \cdot x2\right) - x1}{t\_1}\\
\mathbf{if}\;x1 \leq -5.6 \cdot 10^{+102}:\\
\;\;\;\;x2 \cdot \left(\frac{x1 \cdot \left(x1 \cdot 9\right)}{x2} - 6\right)\\
\mathbf{elif}\;x1 \leq 2 \cdot 10^{+152}:\\
\;\;\;\;x1 + \left(3 \cdot \frac{\left(t\_0 - 2 \cdot x2\right) - x1}{t\_1} + \left(x1 + \left(x1 \cdot \left(x1 \cdot x1\right) + \left(3 \cdot t\_0 + t\_1 \cdot \left(\left(\left(x1 \cdot 2\right) \cdot t\_2\right) \cdot \left(t\_2 - 3\right) + \left(x1 \cdot x1\right) \cdot 6\right)\right)\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x1 \cdot \left(x1 \cdot 9 + -1\right)\\
\end{array}
\end{array}
if x1 < -5.60000000000000037e102Initial program 0.0%
Simplified0.0%
Taylor expanded in x1 around 0 58.8%
Taylor expanded in x2 around 0 83.1%
Taylor expanded in x2 around inf 91.6%
Taylor expanded in x1 around inf 91.6%
*-commutative91.6%
Simplified91.6%
if -5.60000000000000037e102 < x1 < 2.0000000000000001e152Initial program 99.4%
Taylor expanded in x1 around inf 95.4%
Taylor expanded in x1 around inf 95.4%
if 2.0000000000000001e152 < x1 Initial program 0.0%
Simplified0.0%
Taylor expanded in x1 around 0 80.0%
Taylor expanded in x2 around 0 100.0%
Taylor expanded in x2 around inf 100.0%
Taylor expanded in x2 around 0 100.0%
Final simplification95.2%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (* x1 (+ (* x1 9.0) -1.0)))
(t_1 (* x1 (* x1 3.0)))
(t_2 (+ (* x1 x1) 1.0))
(t_3
(+
x1
(+
(* 3.0 (/ (- (- t_1 (* 2.0 x2)) x1) t_2))
(+
x1
(+
(* x1 (* x1 x1))
(+
(* t_1 (/ (- (+ t_1 (* 2.0 x2)) x1) t_2))
(*
t_2
(+
(* (* (* x1 2.0) (- (* 2.0 x2) x1)) (- (* 2.0 x2) 3.0))
(* x2 8.0))))))))))
(if (<= x1 -5.8e+100)
(* x2 (- (/ (* x1 (* x1 9.0)) x2) 6.0))
(if (<= x1 -0.175)
t_3
(if (<= x1 2.7)
(+
(* x2 -6.0)
(+ t_0 (* x2 (+ (* 8.0 (* x1 x2)) (* x1 (- (* x1 12.0) 12.0))))))
(if (<= x1 4.5e+153) t_3 t_0))))))
double code(double x1, double x2) {
double t_0 = x1 * ((x1 * 9.0) + -1.0);
double t_1 = x1 * (x1 * 3.0);
double t_2 = (x1 * x1) + 1.0;
double t_3 = x1 + ((3.0 * (((t_1 - (2.0 * x2)) - x1) / t_2)) + (x1 + ((x1 * (x1 * x1)) + ((t_1 * (((t_1 + (2.0 * x2)) - x1) / t_2)) + (t_2 * ((((x1 * 2.0) * ((2.0 * x2) - x1)) * ((2.0 * x2) - 3.0)) + (x2 * 8.0)))))));
double tmp;
if (x1 <= -5.8e+100) {
tmp = x2 * (((x1 * (x1 * 9.0)) / x2) - 6.0);
} else if (x1 <= -0.175) {
tmp = t_3;
} else if (x1 <= 2.7) {
tmp = (x2 * -6.0) + (t_0 + (x2 * ((8.0 * (x1 * x2)) + (x1 * ((x1 * 12.0) - 12.0)))));
} else if (x1 <= 4.5e+153) {
tmp = t_3;
} else {
tmp = t_0;
}
return tmp;
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
real(8) :: t_0
real(8) :: t_1
real(8) :: t_2
real(8) :: t_3
real(8) :: tmp
t_0 = x1 * ((x1 * 9.0d0) + (-1.0d0))
t_1 = x1 * (x1 * 3.0d0)
t_2 = (x1 * x1) + 1.0d0
t_3 = x1 + ((3.0d0 * (((t_1 - (2.0d0 * x2)) - x1) / t_2)) + (x1 + ((x1 * (x1 * x1)) + ((t_1 * (((t_1 + (2.0d0 * x2)) - x1) / t_2)) + (t_2 * ((((x1 * 2.0d0) * ((2.0d0 * x2) - x1)) * ((2.0d0 * x2) - 3.0d0)) + (x2 * 8.0d0)))))))
if (x1 <= (-5.8d+100)) then
tmp = x2 * (((x1 * (x1 * 9.0d0)) / x2) - 6.0d0)
else if (x1 <= (-0.175d0)) then
tmp = t_3
else if (x1 <= 2.7d0) then
tmp = (x2 * (-6.0d0)) + (t_0 + (x2 * ((8.0d0 * (x1 * x2)) + (x1 * ((x1 * 12.0d0) - 12.0d0)))))
else if (x1 <= 4.5d+153) then
tmp = t_3
else
tmp = t_0
end if
code = tmp
end function
public static double code(double x1, double x2) {
double t_0 = x1 * ((x1 * 9.0) + -1.0);
double t_1 = x1 * (x1 * 3.0);
double t_2 = (x1 * x1) + 1.0;
double t_3 = x1 + ((3.0 * (((t_1 - (2.0 * x2)) - x1) / t_2)) + (x1 + ((x1 * (x1 * x1)) + ((t_1 * (((t_1 + (2.0 * x2)) - x1) / t_2)) + (t_2 * ((((x1 * 2.0) * ((2.0 * x2) - x1)) * ((2.0 * x2) - 3.0)) + (x2 * 8.0)))))));
double tmp;
if (x1 <= -5.8e+100) {
tmp = x2 * (((x1 * (x1 * 9.0)) / x2) - 6.0);
} else if (x1 <= -0.175) {
tmp = t_3;
} else if (x1 <= 2.7) {
tmp = (x2 * -6.0) + (t_0 + (x2 * ((8.0 * (x1 * x2)) + (x1 * ((x1 * 12.0) - 12.0)))));
} else if (x1 <= 4.5e+153) {
tmp = t_3;
} else {
tmp = t_0;
}
return tmp;
}
def code(x1, x2): t_0 = x1 * ((x1 * 9.0) + -1.0) t_1 = x1 * (x1 * 3.0) t_2 = (x1 * x1) + 1.0 t_3 = x1 + ((3.0 * (((t_1 - (2.0 * x2)) - x1) / t_2)) + (x1 + ((x1 * (x1 * x1)) + ((t_1 * (((t_1 + (2.0 * x2)) - x1) / t_2)) + (t_2 * ((((x1 * 2.0) * ((2.0 * x2) - x1)) * ((2.0 * x2) - 3.0)) + (x2 * 8.0))))))) tmp = 0 if x1 <= -5.8e+100: tmp = x2 * (((x1 * (x1 * 9.0)) / x2) - 6.0) elif x1 <= -0.175: tmp = t_3 elif x1 <= 2.7: tmp = (x2 * -6.0) + (t_0 + (x2 * ((8.0 * (x1 * x2)) + (x1 * ((x1 * 12.0) - 12.0))))) elif x1 <= 4.5e+153: tmp = t_3 else: tmp = t_0 return tmp
function code(x1, x2) t_0 = Float64(x1 * Float64(Float64(x1 * 9.0) + -1.0)) t_1 = Float64(x1 * Float64(x1 * 3.0)) t_2 = Float64(Float64(x1 * x1) + 1.0) t_3 = 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(t_1 * Float64(Float64(Float64(t_1 + Float64(2.0 * x2)) - x1) / t_2)) + Float64(t_2 * Float64(Float64(Float64(Float64(x1 * 2.0) * Float64(Float64(2.0 * x2) - x1)) * Float64(Float64(2.0 * x2) - 3.0)) + Float64(x2 * 8.0)))))))) tmp = 0.0 if (x1 <= -5.8e+100) tmp = Float64(x2 * Float64(Float64(Float64(x1 * Float64(x1 * 9.0)) / x2) - 6.0)); elseif (x1 <= -0.175) tmp = t_3; elseif (x1 <= 2.7) tmp = Float64(Float64(x2 * -6.0) + Float64(t_0 + Float64(x2 * Float64(Float64(8.0 * Float64(x1 * x2)) + Float64(x1 * Float64(Float64(x1 * 12.0) - 12.0)))))); elseif (x1 <= 4.5e+153) tmp = t_3; else tmp = t_0; end return tmp end
function tmp_2 = code(x1, x2) t_0 = x1 * ((x1 * 9.0) + -1.0); t_1 = x1 * (x1 * 3.0); t_2 = (x1 * x1) + 1.0; t_3 = x1 + ((3.0 * (((t_1 - (2.0 * x2)) - x1) / t_2)) + (x1 + ((x1 * (x1 * x1)) + ((t_1 * (((t_1 + (2.0 * x2)) - x1) / t_2)) + (t_2 * ((((x1 * 2.0) * ((2.0 * x2) - x1)) * ((2.0 * x2) - 3.0)) + (x2 * 8.0))))))); tmp = 0.0; if (x1 <= -5.8e+100) tmp = x2 * (((x1 * (x1 * 9.0)) / x2) - 6.0); elseif (x1 <= -0.175) tmp = t_3; elseif (x1 <= 2.7) tmp = (x2 * -6.0) + (t_0 + (x2 * ((8.0 * (x1 * x2)) + (x1 * ((x1 * 12.0) - 12.0))))); elseif (x1 <= 4.5e+153) tmp = t_3; else tmp = t_0; end tmp_2 = tmp; end
code[x1_, x2_] := Block[{t$95$0 = N[(x1 * N[(N[(x1 * 9.0), $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(x1 * N[(x1 * 3.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(x1 * x1), $MachinePrecision] + 1.0), $MachinePrecision]}, Block[{t$95$3 = 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[(t$95$1 * N[(N[(N[(t$95$1 + N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$2), $MachinePrecision]), $MachinePrecision] + N[(t$95$2 * N[(N[(N[(N[(x1 * 2.0), $MachinePrecision] * N[(N[(2.0 * x2), $MachinePrecision] - x1), $MachinePrecision]), $MachinePrecision] * N[(N[(2.0 * x2), $MachinePrecision] - 3.0), $MachinePrecision]), $MachinePrecision] + N[(x2 * 8.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x1, -5.8e+100], N[(x2 * N[(N[(N[(x1 * N[(x1 * 9.0), $MachinePrecision]), $MachinePrecision] / x2), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, -0.175], t$95$3, If[LessEqual[x1, 2.7], N[(N[(x2 * -6.0), $MachinePrecision] + N[(t$95$0 + N[(x2 * N[(N[(8.0 * N[(x1 * x2), $MachinePrecision]), $MachinePrecision] + N[(x1 * N[(N[(x1 * 12.0), $MachinePrecision] - 12.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 4.5e+153], t$95$3, t$95$0]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x1 \cdot \left(x1 \cdot 9 + -1\right)\\
t_1 := x1 \cdot \left(x1 \cdot 3\right)\\
t_2 := x1 \cdot x1 + 1\\
t_3 := 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(t\_1 \cdot \frac{\left(t\_1 + 2 \cdot x2\right) - x1}{t\_2} + t\_2 \cdot \left(\left(\left(x1 \cdot 2\right) \cdot \left(2 \cdot x2 - x1\right)\right) \cdot \left(2 \cdot x2 - 3\right) + x2 \cdot 8\right)\right)\right)\right)\right)\\
\mathbf{if}\;x1 \leq -5.8 \cdot 10^{+100}:\\
\;\;\;\;x2 \cdot \left(\frac{x1 \cdot \left(x1 \cdot 9\right)}{x2} - 6\right)\\
\mathbf{elif}\;x1 \leq -0.175:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;x1 \leq 2.7:\\
\;\;\;\;x2 \cdot -6 + \left(t\_0 + x2 \cdot \left(8 \cdot \left(x1 \cdot x2\right) + x1 \cdot \left(x1 \cdot 12 - 12\right)\right)\right)\\
\mathbf{elif}\;x1 \leq 4.5 \cdot 10^{+153}:\\
\;\;\;\;t\_3\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
if x1 < -5.8000000000000001e100Initial program 1.8%
Simplified1.8%
Taylor expanded in x1 around 0 57.7%
Taylor expanded in x2 around 0 81.7%
Taylor expanded in x2 around inf 90.1%
Taylor expanded in x1 around inf 90.1%
*-commutative90.1%
Simplified90.1%
if -5.8000000000000001e100 < x1 < -0.17499999999999999 or 2.7000000000000002 < x1 < 4.5000000000000001e153Initial program 99.3%
Taylor expanded in x1 around -inf 98.4%
Taylor expanded in x2 around inf 36.2%
*-commutative36.2%
Simplified36.2%
Taylor expanded in x1 around 0 18.3%
Taylor expanded in x1 around 0 70.7%
+-commutative70.7%
neg-mul-170.7%
unsub-neg70.7%
Simplified70.7%
if -0.17499999999999999 < x1 < 2.7000000000000002Initial program 99.4%
Simplified99.8%
Taylor expanded in x1 around 0 86.9%
Taylor expanded in x2 around 0 99.8%
if 4.5000000000000001e153 < x1 Initial program 0.0%
Simplified0.0%
Taylor expanded in x1 around 0 80.0%
Taylor expanded in x2 around 0 100.0%
Taylor expanded in x2 around inf 100.0%
Taylor expanded in x2 around 0 100.0%
Final simplification92.2%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (* x1 (+ (* x1 9.0) -1.0)))
(t_1 (* x1 (* x1 3.0)))
(t_2 (+ (* x1 x1) 1.0)))
(if (<= x1 -2.3e+44)
(* x2 (- (/ (* x1 (* x1 9.0)) x2) 6.0))
(if (<= x1 1.7e+23)
(+
(* x2 -6.0)
(+ t_0 (* x2 (+ (* 8.0 (* x1 x2)) (* x1 (- (* x1 12.0) 12.0))))))
(if (<= x1 4.5e+153)
(+
x1
(+
(* 3.0 (/ (- (- t_1 (* 2.0 x2)) x1) t_2))
(+
x1
(+
(* x1 (* x1 x1))
(+
(* t_1 (/ (- (+ t_1 (* 2.0 x2)) x1) t_2))
(*
t_2
(+
(* x2 8.0)
(* (- (* 2.0 x2) 3.0) (* (* x1 2.0) (* 2.0 x2))))))))))
t_0)))))
double code(double x1, double x2) {
double t_0 = x1 * ((x1 * 9.0) + -1.0);
double t_1 = x1 * (x1 * 3.0);
double t_2 = (x1 * x1) + 1.0;
double tmp;
if (x1 <= -2.3e+44) {
tmp = x2 * (((x1 * (x1 * 9.0)) / x2) - 6.0);
} else if (x1 <= 1.7e+23) {
tmp = (x2 * -6.0) + (t_0 + (x2 * ((8.0 * (x1 * x2)) + (x1 * ((x1 * 12.0) - 12.0)))));
} else if (x1 <= 4.5e+153) {
tmp = x1 + ((3.0 * (((t_1 - (2.0 * x2)) - x1) / t_2)) + (x1 + ((x1 * (x1 * x1)) + ((t_1 * (((t_1 + (2.0 * x2)) - x1) / t_2)) + (t_2 * ((x2 * 8.0) + (((2.0 * x2) - 3.0) * ((x1 * 2.0) * (2.0 * x2)))))))));
} else {
tmp = t_0;
}
return tmp;
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
real(8) :: t_0
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_0 = x1 * ((x1 * 9.0d0) + (-1.0d0))
t_1 = x1 * (x1 * 3.0d0)
t_2 = (x1 * x1) + 1.0d0
if (x1 <= (-2.3d+44)) then
tmp = x2 * (((x1 * (x1 * 9.0d0)) / x2) - 6.0d0)
else if (x1 <= 1.7d+23) then
tmp = (x2 * (-6.0d0)) + (t_0 + (x2 * ((8.0d0 * (x1 * x2)) + (x1 * ((x1 * 12.0d0) - 12.0d0)))))
else if (x1 <= 4.5d+153) then
tmp = x1 + ((3.0d0 * (((t_1 - (2.0d0 * x2)) - x1) / t_2)) + (x1 + ((x1 * (x1 * x1)) + ((t_1 * (((t_1 + (2.0d0 * x2)) - x1) / t_2)) + (t_2 * ((x2 * 8.0d0) + (((2.0d0 * x2) - 3.0d0) * ((x1 * 2.0d0) * (2.0d0 * x2)))))))))
else
tmp = t_0
end if
code = tmp
end function
public static double code(double x1, double x2) {
double t_0 = x1 * ((x1 * 9.0) + -1.0);
double t_1 = x1 * (x1 * 3.0);
double t_2 = (x1 * x1) + 1.0;
double tmp;
if (x1 <= -2.3e+44) {
tmp = x2 * (((x1 * (x1 * 9.0)) / x2) - 6.0);
} else if (x1 <= 1.7e+23) {
tmp = (x2 * -6.0) + (t_0 + (x2 * ((8.0 * (x1 * x2)) + (x1 * ((x1 * 12.0) - 12.0)))));
} else if (x1 <= 4.5e+153) {
tmp = x1 + ((3.0 * (((t_1 - (2.0 * x2)) - x1) / t_2)) + (x1 + ((x1 * (x1 * x1)) + ((t_1 * (((t_1 + (2.0 * x2)) - x1) / t_2)) + (t_2 * ((x2 * 8.0) + (((2.0 * x2) - 3.0) * ((x1 * 2.0) * (2.0 * x2)))))))));
} else {
tmp = t_0;
}
return tmp;
}
def code(x1, x2): t_0 = x1 * ((x1 * 9.0) + -1.0) t_1 = x1 * (x1 * 3.0) t_2 = (x1 * x1) + 1.0 tmp = 0 if x1 <= -2.3e+44: tmp = x2 * (((x1 * (x1 * 9.0)) / x2) - 6.0) elif x1 <= 1.7e+23: tmp = (x2 * -6.0) + (t_0 + (x2 * ((8.0 * (x1 * x2)) + (x1 * ((x1 * 12.0) - 12.0))))) elif x1 <= 4.5e+153: tmp = x1 + ((3.0 * (((t_1 - (2.0 * x2)) - x1) / t_2)) + (x1 + ((x1 * (x1 * x1)) + ((t_1 * (((t_1 + (2.0 * x2)) - x1) / t_2)) + (t_2 * ((x2 * 8.0) + (((2.0 * x2) - 3.0) * ((x1 * 2.0) * (2.0 * x2))))))))) else: tmp = t_0 return tmp
function code(x1, x2) t_0 = Float64(x1 * Float64(Float64(x1 * 9.0) + -1.0)) t_1 = Float64(x1 * Float64(x1 * 3.0)) t_2 = Float64(Float64(x1 * x1) + 1.0) tmp = 0.0 if (x1 <= -2.3e+44) tmp = Float64(x2 * Float64(Float64(Float64(x1 * Float64(x1 * 9.0)) / x2) - 6.0)); elseif (x1 <= 1.7e+23) tmp = Float64(Float64(x2 * -6.0) + Float64(t_0 + Float64(x2 * Float64(Float64(8.0 * Float64(x1 * x2)) + Float64(x1 * Float64(Float64(x1 * 12.0) - 12.0)))))); elseif (x1 <= 4.5e+153) 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(t_1 * Float64(Float64(Float64(t_1 + Float64(2.0 * x2)) - x1) / t_2)) + Float64(t_2 * Float64(Float64(x2 * 8.0) + Float64(Float64(Float64(2.0 * x2) - 3.0) * Float64(Float64(x1 * 2.0) * Float64(2.0 * x2)))))))))); else tmp = t_0; end return tmp end
function tmp_2 = code(x1, x2) t_0 = x1 * ((x1 * 9.0) + -1.0); t_1 = x1 * (x1 * 3.0); t_2 = (x1 * x1) + 1.0; tmp = 0.0; if (x1 <= -2.3e+44) tmp = x2 * (((x1 * (x1 * 9.0)) / x2) - 6.0); elseif (x1 <= 1.7e+23) tmp = (x2 * -6.0) + (t_0 + (x2 * ((8.0 * (x1 * x2)) + (x1 * ((x1 * 12.0) - 12.0))))); elseif (x1 <= 4.5e+153) tmp = x1 + ((3.0 * (((t_1 - (2.0 * x2)) - x1) / t_2)) + (x1 + ((x1 * (x1 * x1)) + ((t_1 * (((t_1 + (2.0 * x2)) - x1) / t_2)) + (t_2 * ((x2 * 8.0) + (((2.0 * x2) - 3.0) * ((x1 * 2.0) * (2.0 * x2))))))))); else tmp = t_0; end tmp_2 = tmp; end
code[x1_, x2_] := Block[{t$95$0 = N[(x1 * N[(N[(x1 * 9.0), $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(x1 * N[(x1 * 3.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(x1 * x1), $MachinePrecision] + 1.0), $MachinePrecision]}, If[LessEqual[x1, -2.3e+44], N[(x2 * N[(N[(N[(x1 * N[(x1 * 9.0), $MachinePrecision]), $MachinePrecision] / x2), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 1.7e+23], N[(N[(x2 * -6.0), $MachinePrecision] + N[(t$95$0 + N[(x2 * N[(N[(8.0 * N[(x1 * x2), $MachinePrecision]), $MachinePrecision] + N[(x1 * N[(N[(x1 * 12.0), $MachinePrecision] - 12.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 4.5e+153], 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[(t$95$1 * N[(N[(N[(t$95$1 + N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$2), $MachinePrecision]), $MachinePrecision] + N[(t$95$2 * N[(N[(x2 * 8.0), $MachinePrecision] + N[(N[(N[(2.0 * x2), $MachinePrecision] - 3.0), $MachinePrecision] * N[(N[(x1 * 2.0), $MachinePrecision] * N[(2.0 * x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$0]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x1 \cdot \left(x1 \cdot 9 + -1\right)\\
t_1 := x1 \cdot \left(x1 \cdot 3\right)\\
t_2 := x1 \cdot x1 + 1\\
\mathbf{if}\;x1 \leq -2.3 \cdot 10^{+44}:\\
\;\;\;\;x2 \cdot \left(\frac{x1 \cdot \left(x1 \cdot 9\right)}{x2} - 6\right)\\
\mathbf{elif}\;x1 \leq 1.7 \cdot 10^{+23}:\\
\;\;\;\;x2 \cdot -6 + \left(t\_0 + x2 \cdot \left(8 \cdot \left(x1 \cdot x2\right) + x1 \cdot \left(x1 \cdot 12 - 12\right)\right)\right)\\
\mathbf{elif}\;x1 \leq 4.5 \cdot 10^{+153}:\\
\;\;\;\;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(t\_1 \cdot \frac{\left(t\_1 + 2 \cdot x2\right) - x1}{t\_2} + t\_2 \cdot \left(x2 \cdot 8 + \left(2 \cdot x2 - 3\right) \cdot \left(\left(x1 \cdot 2\right) \cdot \left(2 \cdot x2\right)\right)\right)\right)\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
if x1 < -2.30000000000000004e44Initial program 17.8%
Simplified17.8%
Taylor expanded in x1 around 0 48.8%
Taylor expanded in x2 around 0 69.1%
Taylor expanded in x2 around inf 79.0%
Taylor expanded in x1 around inf 79.0%
*-commutative79.0%
Simplified79.0%
if -2.30000000000000004e44 < x1 < 1.69999999999999996e23Initial program 99.4%
Simplified99.7%
Taylor expanded in x1 around 0 81.5%
Taylor expanded in x2 around 0 93.4%
if 1.69999999999999996e23 < x1 < 4.5000000000000001e153Initial program 99.5%
Taylor expanded in x1 around -inf 99.6%
Taylor expanded in x2 around inf 43.9%
*-commutative43.9%
Simplified43.9%
Taylor expanded in x1 around 0 23.1%
Taylor expanded in x1 around 0 55.2%
if 4.5000000000000001e153 < x1 Initial program 0.0%
Simplified0.0%
Taylor expanded in x1 around 0 80.0%
Taylor expanded in x2 around 0 100.0%
Taylor expanded in x2 around inf 100.0%
Taylor expanded in x2 around 0 100.0%
Final simplification86.5%
(FPCore (x1 x2)
:precision binary64
(if (or (<= x1 -2.3e+44) (not (<= x1 4.2e+96)))
(* x2 (- (/ (* x1 (* x1 9.0)) x2) 6.0))
(+
(* x2 -6.0)
(+
(* x1 (+ (* x1 9.0) -1.0))
(* x2 (+ (* 8.0 (* x1 x2)) (* x1 (- (* x1 12.0) 12.0))))))))
double code(double x1, double x2) {
double tmp;
if ((x1 <= -2.3e+44) || !(x1 <= 4.2e+96)) {
tmp = x2 * (((x1 * (x1 * 9.0)) / x2) - 6.0);
} else {
tmp = (x2 * -6.0) + ((x1 * ((x1 * 9.0) + -1.0)) + (x2 * ((8.0 * (x1 * x2)) + (x1 * ((x1 * 12.0) - 12.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.3d+44)) .or. (.not. (x1 <= 4.2d+96))) then
tmp = x2 * (((x1 * (x1 * 9.0d0)) / x2) - 6.0d0)
else
tmp = (x2 * (-6.0d0)) + ((x1 * ((x1 * 9.0d0) + (-1.0d0))) + (x2 * ((8.0d0 * (x1 * x2)) + (x1 * ((x1 * 12.0d0) - 12.0d0)))))
end if
code = tmp
end function
public static double code(double x1, double x2) {
double tmp;
if ((x1 <= -2.3e+44) || !(x1 <= 4.2e+96)) {
tmp = x2 * (((x1 * (x1 * 9.0)) / x2) - 6.0);
} else {
tmp = (x2 * -6.0) + ((x1 * ((x1 * 9.0) + -1.0)) + (x2 * ((8.0 * (x1 * x2)) + (x1 * ((x1 * 12.0) - 12.0)))));
}
return tmp;
}
def code(x1, x2): tmp = 0 if (x1 <= -2.3e+44) or not (x1 <= 4.2e+96): tmp = x2 * (((x1 * (x1 * 9.0)) / x2) - 6.0) else: tmp = (x2 * -6.0) + ((x1 * ((x1 * 9.0) + -1.0)) + (x2 * ((8.0 * (x1 * x2)) + (x1 * ((x1 * 12.0) - 12.0))))) return tmp
function code(x1, x2) tmp = 0.0 if ((x1 <= -2.3e+44) || !(x1 <= 4.2e+96)) tmp = Float64(x2 * Float64(Float64(Float64(x1 * Float64(x1 * 9.0)) / x2) - 6.0)); else tmp = Float64(Float64(x2 * -6.0) + Float64(Float64(x1 * Float64(Float64(x1 * 9.0) + -1.0)) + Float64(x2 * Float64(Float64(8.0 * Float64(x1 * x2)) + Float64(x1 * Float64(Float64(x1 * 12.0) - 12.0)))))); end return tmp end
function tmp_2 = code(x1, x2) tmp = 0.0; if ((x1 <= -2.3e+44) || ~((x1 <= 4.2e+96))) tmp = x2 * (((x1 * (x1 * 9.0)) / x2) - 6.0); else tmp = (x2 * -6.0) + ((x1 * ((x1 * 9.0) + -1.0)) + (x2 * ((8.0 * (x1 * x2)) + (x1 * ((x1 * 12.0) - 12.0))))); end tmp_2 = tmp; end
code[x1_, x2_] := If[Or[LessEqual[x1, -2.3e+44], N[Not[LessEqual[x1, 4.2e+96]], $MachinePrecision]], N[(x2 * N[(N[(N[(x1 * N[(x1 * 9.0), $MachinePrecision]), $MachinePrecision] / x2), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision], N[(N[(x2 * -6.0), $MachinePrecision] + N[(N[(x1 * N[(N[(x1 * 9.0), $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision] + N[(x2 * N[(N[(8.0 * N[(x1 * x2), $MachinePrecision]), $MachinePrecision] + N[(x1 * N[(N[(x1 * 12.0), $MachinePrecision] - 12.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x1 \leq -2.3 \cdot 10^{+44} \lor \neg \left(x1 \leq 4.2 \cdot 10^{+96}\right):\\
\;\;\;\;x2 \cdot \left(\frac{x1 \cdot \left(x1 \cdot 9\right)}{x2} - 6\right)\\
\mathbf{else}:\\
\;\;\;\;x2 \cdot -6 + \left(x1 \cdot \left(x1 \cdot 9 + -1\right) + x2 \cdot \left(8 \cdot \left(x1 \cdot x2\right) + x1 \cdot \left(x1 \cdot 12 - 12\right)\right)\right)\\
\end{array}
\end{array}
if x1 < -2.30000000000000004e44 or 4.2000000000000002e96 < x1 Initial program 19.6%
Simplified19.6%
Taylor expanded in x1 around 0 57.3%
Taylor expanded in x2 around 0 73.2%
Taylor expanded in x2 around inf 83.3%
Taylor expanded in x1 around inf 83.3%
*-commutative83.3%
Simplified83.3%
if -2.30000000000000004e44 < x1 < 4.2000000000000002e96Initial program 99.4%
Simplified99.6%
Taylor expanded in x1 around 0 74.4%
Taylor expanded in x2 around 0 85.5%
Final simplification84.6%
(FPCore (x1 x2)
:precision binary64
(if (<= x1 4.9e-160)
(* x2 (- (* x1 (+ (/ (* x1 9.0) x2) (/ -1.0 x2))) 6.0))
(if (<= x1 1.4e+116)
(+
(* x2 -6.0)
(*
x1
(+
(+ (* x1 9.0) (* x2 (- (* x2 (+ 8.0 (* 12.0 (/ x1 x2)))) 12.0)))
-1.0)))
(* x2 (- (/ (* x1 (* x1 9.0)) x2) 6.0)))))
double code(double x1, double x2) {
double tmp;
if (x1 <= 4.9e-160) {
tmp = x2 * ((x1 * (((x1 * 9.0) / x2) + (-1.0 / x2))) - 6.0);
} else if (x1 <= 1.4e+116) {
tmp = (x2 * -6.0) + (x1 * (((x1 * 9.0) + (x2 * ((x2 * (8.0 + (12.0 * (x1 / x2)))) - 12.0))) + -1.0));
} else {
tmp = x2 * (((x1 * (x1 * 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 <= 4.9d-160) then
tmp = x2 * ((x1 * (((x1 * 9.0d0) / x2) + ((-1.0d0) / x2))) - 6.0d0)
else if (x1 <= 1.4d+116) then
tmp = (x2 * (-6.0d0)) + (x1 * (((x1 * 9.0d0) + (x2 * ((x2 * (8.0d0 + (12.0d0 * (x1 / x2)))) - 12.0d0))) + (-1.0d0)))
else
tmp = x2 * (((x1 * (x1 * 9.0d0)) / x2) - 6.0d0)
end if
code = tmp
end function
public static double code(double x1, double x2) {
double tmp;
if (x1 <= 4.9e-160) {
tmp = x2 * ((x1 * (((x1 * 9.0) / x2) + (-1.0 / x2))) - 6.0);
} else if (x1 <= 1.4e+116) {
tmp = (x2 * -6.0) + (x1 * (((x1 * 9.0) + (x2 * ((x2 * (8.0 + (12.0 * (x1 / x2)))) - 12.0))) + -1.0));
} else {
tmp = x2 * (((x1 * (x1 * 9.0)) / x2) - 6.0);
}
return tmp;
}
def code(x1, x2): tmp = 0 if x1 <= 4.9e-160: tmp = x2 * ((x1 * (((x1 * 9.0) / x2) + (-1.0 / x2))) - 6.0) elif x1 <= 1.4e+116: tmp = (x2 * -6.0) + (x1 * (((x1 * 9.0) + (x2 * ((x2 * (8.0 + (12.0 * (x1 / x2)))) - 12.0))) + -1.0)) else: tmp = x2 * (((x1 * (x1 * 9.0)) / x2) - 6.0) return tmp
function code(x1, x2) tmp = 0.0 if (x1 <= 4.9e-160) tmp = Float64(x2 * Float64(Float64(x1 * Float64(Float64(Float64(x1 * 9.0) / x2) + Float64(-1.0 / x2))) - 6.0)); elseif (x1 <= 1.4e+116) tmp = Float64(Float64(x2 * -6.0) + Float64(x1 * Float64(Float64(Float64(x1 * 9.0) + Float64(x2 * Float64(Float64(x2 * Float64(8.0 + Float64(12.0 * Float64(x1 / x2)))) - 12.0))) + -1.0))); else tmp = Float64(x2 * Float64(Float64(Float64(x1 * Float64(x1 * 9.0)) / x2) - 6.0)); end return tmp end
function tmp_2 = code(x1, x2) tmp = 0.0; if (x1 <= 4.9e-160) tmp = x2 * ((x1 * (((x1 * 9.0) / x2) + (-1.0 / x2))) - 6.0); elseif (x1 <= 1.4e+116) tmp = (x2 * -6.0) + (x1 * (((x1 * 9.0) + (x2 * ((x2 * (8.0 + (12.0 * (x1 / x2)))) - 12.0))) + -1.0)); else tmp = x2 * (((x1 * (x1 * 9.0)) / x2) - 6.0); end tmp_2 = tmp; end
code[x1_, x2_] := If[LessEqual[x1, 4.9e-160], N[(x2 * N[(N[(x1 * N[(N[(N[(x1 * 9.0), $MachinePrecision] / x2), $MachinePrecision] + N[(-1.0 / x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 1.4e+116], N[(N[(x2 * -6.0), $MachinePrecision] + N[(x1 * N[(N[(N[(x1 * 9.0), $MachinePrecision] + N[(x2 * N[(N[(x2 * N[(8.0 + N[(12.0 * N[(x1 / x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - 12.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x2 * N[(N[(N[(x1 * N[(x1 * 9.0), $MachinePrecision]), $MachinePrecision] / x2), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x1 \leq 4.9 \cdot 10^{-160}:\\
\;\;\;\;x2 \cdot \left(x1 \cdot \left(\frac{x1 \cdot 9}{x2} + \frac{-1}{x2}\right) - 6\right)\\
\mathbf{elif}\;x1 \leq 1.4 \cdot 10^{+116}:\\
\;\;\;\;x2 \cdot -6 + x1 \cdot \left(\left(x1 \cdot 9 + x2 \cdot \left(x2 \cdot \left(8 + 12 \cdot \frac{x1}{x2}\right) - 12\right)\right) + -1\right)\\
\mathbf{else}:\\
\;\;\;\;x2 \cdot \left(\frac{x1 \cdot \left(x1 \cdot 9\right)}{x2} - 6\right)\\
\end{array}
\end{array}
if x1 < 4.8999999999999999e-160Initial program 64.5%
Simplified64.7%
Taylor expanded in x1 around 0 66.2%
Taylor expanded in x2 around 0 76.3%
Taylor expanded in x2 around inf 80.5%
Taylor expanded in x1 around 0 80.5%
associate-*r/80.5%
*-commutative80.5%
Simplified80.5%
if 4.8999999999999999e-160 < x1 < 1.40000000000000002e116Initial program 99.4%
Simplified99.6%
Taylor expanded in x1 around 0 64.1%
Taylor expanded in x2 around 0 65.8%
Taylor expanded in x2 around inf 67.4%
if 1.40000000000000002e116 < x1 Initial program 14.6%
Simplified14.6%
Taylor expanded in x1 around 0 73.7%
Taylor expanded in x2 around 0 86.4%
Taylor expanded in x2 around inf 93.3%
Taylor expanded in x1 around inf 93.3%
*-commutative93.3%
Simplified93.3%
Final simplification79.6%
(FPCore (x1 x2)
:precision binary64
(if (<= x1 6.2e-161)
(* x2 (- (* x1 (+ (/ (* x1 9.0) x2) (/ -1.0 x2))) 6.0))
(if (<= x1 2.9e+97)
(+
(* x2 -6.0)
(*
x1
(+ (+ (* x1 9.0) (* x2 (- (+ (* x1 12.0) (* x2 8.0)) 12.0))) -1.0)))
(* x2 (- (/ (* x1 (* x1 9.0)) x2) 6.0)))))
double code(double x1, double x2) {
double tmp;
if (x1 <= 6.2e-161) {
tmp = x2 * ((x1 * (((x1 * 9.0) / x2) + (-1.0 / x2))) - 6.0);
} else if (x1 <= 2.9e+97) {
tmp = (x2 * -6.0) + (x1 * (((x1 * 9.0) + (x2 * (((x1 * 12.0) + (x2 * 8.0)) - 12.0))) + -1.0));
} else {
tmp = x2 * (((x1 * (x1 * 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 <= 6.2d-161) then
tmp = x2 * ((x1 * (((x1 * 9.0d0) / x2) + ((-1.0d0) / x2))) - 6.0d0)
else if (x1 <= 2.9d+97) then
tmp = (x2 * (-6.0d0)) + (x1 * (((x1 * 9.0d0) + (x2 * (((x1 * 12.0d0) + (x2 * 8.0d0)) - 12.0d0))) + (-1.0d0)))
else
tmp = x2 * (((x1 * (x1 * 9.0d0)) / x2) - 6.0d0)
end if
code = tmp
end function
public static double code(double x1, double x2) {
double tmp;
if (x1 <= 6.2e-161) {
tmp = x2 * ((x1 * (((x1 * 9.0) / x2) + (-1.0 / x2))) - 6.0);
} else if (x1 <= 2.9e+97) {
tmp = (x2 * -6.0) + (x1 * (((x1 * 9.0) + (x2 * (((x1 * 12.0) + (x2 * 8.0)) - 12.0))) + -1.0));
} else {
tmp = x2 * (((x1 * (x1 * 9.0)) / x2) - 6.0);
}
return tmp;
}
def code(x1, x2): tmp = 0 if x1 <= 6.2e-161: tmp = x2 * ((x1 * (((x1 * 9.0) / x2) + (-1.0 / x2))) - 6.0) elif x1 <= 2.9e+97: tmp = (x2 * -6.0) + (x1 * (((x1 * 9.0) + (x2 * (((x1 * 12.0) + (x2 * 8.0)) - 12.0))) + -1.0)) else: tmp = x2 * (((x1 * (x1 * 9.0)) / x2) - 6.0) return tmp
function code(x1, x2) tmp = 0.0 if (x1 <= 6.2e-161) tmp = Float64(x2 * Float64(Float64(x1 * Float64(Float64(Float64(x1 * 9.0) / x2) + Float64(-1.0 / x2))) - 6.0)); elseif (x1 <= 2.9e+97) tmp = Float64(Float64(x2 * -6.0) + Float64(x1 * Float64(Float64(Float64(x1 * 9.0) + Float64(x2 * Float64(Float64(Float64(x1 * 12.0) + Float64(x2 * 8.0)) - 12.0))) + -1.0))); else tmp = Float64(x2 * Float64(Float64(Float64(x1 * Float64(x1 * 9.0)) / x2) - 6.0)); end return tmp end
function tmp_2 = code(x1, x2) tmp = 0.0; if (x1 <= 6.2e-161) tmp = x2 * ((x1 * (((x1 * 9.0) / x2) + (-1.0 / x2))) - 6.0); elseif (x1 <= 2.9e+97) tmp = (x2 * -6.0) + (x1 * (((x1 * 9.0) + (x2 * (((x1 * 12.0) + (x2 * 8.0)) - 12.0))) + -1.0)); else tmp = x2 * (((x1 * (x1 * 9.0)) / x2) - 6.0); end tmp_2 = tmp; end
code[x1_, x2_] := If[LessEqual[x1, 6.2e-161], N[(x2 * N[(N[(x1 * N[(N[(N[(x1 * 9.0), $MachinePrecision] / x2), $MachinePrecision] + N[(-1.0 / x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 2.9e+97], N[(N[(x2 * -6.0), $MachinePrecision] + N[(x1 * N[(N[(N[(x1 * 9.0), $MachinePrecision] + N[(x2 * N[(N[(N[(x1 * 12.0), $MachinePrecision] + N[(x2 * 8.0), $MachinePrecision]), $MachinePrecision] - 12.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x2 * N[(N[(N[(x1 * N[(x1 * 9.0), $MachinePrecision]), $MachinePrecision] / x2), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x1 \leq 6.2 \cdot 10^{-161}:\\
\;\;\;\;x2 \cdot \left(x1 \cdot \left(\frac{x1 \cdot 9}{x2} + \frac{-1}{x2}\right) - 6\right)\\
\mathbf{elif}\;x1 \leq 2.9 \cdot 10^{+97}:\\
\;\;\;\;x2 \cdot -6 + x1 \cdot \left(\left(x1 \cdot 9 + x2 \cdot \left(\left(x1 \cdot 12 + x2 \cdot 8\right) - 12\right)\right) + -1\right)\\
\mathbf{else}:\\
\;\;\;\;x2 \cdot \left(\frac{x1 \cdot \left(x1 \cdot 9\right)}{x2} - 6\right)\\
\end{array}
\end{array}
if x1 < 6.1999999999999997e-161Initial program 64.5%
Simplified64.7%
Taylor expanded in x1 around 0 66.2%
Taylor expanded in x2 around 0 76.3%
Taylor expanded in x2 around inf 80.5%
Taylor expanded in x1 around 0 80.5%
associate-*r/80.5%
*-commutative80.5%
Simplified80.5%
if 6.1999999999999997e-161 < x1 < 2.89999999999999987e97Initial program 99.4%
Simplified99.6%
Taylor expanded in x1 around 0 66.6%
Taylor expanded in x2 around 0 68.4%
if 2.89999999999999987e97 < x1 Initial program 22.2%
Simplified22.2%
Taylor expanded in x1 around 0 69.8%
Taylor expanded in x2 around 0 79.3%
Taylor expanded in x2 around inf 89.7%
Taylor expanded in x1 around inf 89.7%
*-commutative89.7%
Simplified89.7%
Final simplification79.6%
(FPCore (x1 x2)
:precision binary64
(if (<= x1 4.1e-159)
(* x2 (- (* x1 (+ (/ (* x1 9.0) x2) (/ -1.0 x2))) 6.0))
(if (<= x1 1.45e+96)
(+ (* x2 -6.0) (* x1 (+ (* x2 (- (* x2 8.0) 12.0)) -1.0)))
(* x2 (- (/ (* x1 (* x1 9.0)) x2) 6.0)))))
double code(double x1, double x2) {
double tmp;
if (x1 <= 4.1e-159) {
tmp = x2 * ((x1 * (((x1 * 9.0) / x2) + (-1.0 / x2))) - 6.0);
} else if (x1 <= 1.45e+96) {
tmp = (x2 * -6.0) + (x1 * ((x2 * ((x2 * 8.0) - 12.0)) + -1.0));
} else {
tmp = x2 * (((x1 * (x1 * 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 <= 4.1d-159) then
tmp = x2 * ((x1 * (((x1 * 9.0d0) / x2) + ((-1.0d0) / x2))) - 6.0d0)
else if (x1 <= 1.45d+96) then
tmp = (x2 * (-6.0d0)) + (x1 * ((x2 * ((x2 * 8.0d0) - 12.0d0)) + (-1.0d0)))
else
tmp = x2 * (((x1 * (x1 * 9.0d0)) / x2) - 6.0d0)
end if
code = tmp
end function
public static double code(double x1, double x2) {
double tmp;
if (x1 <= 4.1e-159) {
tmp = x2 * ((x1 * (((x1 * 9.0) / x2) + (-1.0 / x2))) - 6.0);
} else if (x1 <= 1.45e+96) {
tmp = (x2 * -6.0) + (x1 * ((x2 * ((x2 * 8.0) - 12.0)) + -1.0));
} else {
tmp = x2 * (((x1 * (x1 * 9.0)) / x2) - 6.0);
}
return tmp;
}
def code(x1, x2): tmp = 0 if x1 <= 4.1e-159: tmp = x2 * ((x1 * (((x1 * 9.0) / x2) + (-1.0 / x2))) - 6.0) elif x1 <= 1.45e+96: tmp = (x2 * -6.0) + (x1 * ((x2 * ((x2 * 8.0) - 12.0)) + -1.0)) else: tmp = x2 * (((x1 * (x1 * 9.0)) / x2) - 6.0) return tmp
function code(x1, x2) tmp = 0.0 if (x1 <= 4.1e-159) tmp = Float64(x2 * Float64(Float64(x1 * Float64(Float64(Float64(x1 * 9.0) / x2) + Float64(-1.0 / x2))) - 6.0)); elseif (x1 <= 1.45e+96) tmp = Float64(Float64(x2 * -6.0) + Float64(x1 * Float64(Float64(x2 * Float64(Float64(x2 * 8.0) - 12.0)) + -1.0))); else tmp = Float64(x2 * Float64(Float64(Float64(x1 * Float64(x1 * 9.0)) / x2) - 6.0)); end return tmp end
function tmp_2 = code(x1, x2) tmp = 0.0; if (x1 <= 4.1e-159) tmp = x2 * ((x1 * (((x1 * 9.0) / x2) + (-1.0 / x2))) - 6.0); elseif (x1 <= 1.45e+96) tmp = (x2 * -6.0) + (x1 * ((x2 * ((x2 * 8.0) - 12.0)) + -1.0)); else tmp = x2 * (((x1 * (x1 * 9.0)) / x2) - 6.0); end tmp_2 = tmp; end
code[x1_, x2_] := If[LessEqual[x1, 4.1e-159], N[(x2 * N[(N[(x1 * N[(N[(N[(x1 * 9.0), $MachinePrecision] / x2), $MachinePrecision] + N[(-1.0 / x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 1.45e+96], N[(N[(x2 * -6.0), $MachinePrecision] + N[(x1 * N[(N[(x2 * N[(N[(x2 * 8.0), $MachinePrecision] - 12.0), $MachinePrecision]), $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x2 * N[(N[(N[(x1 * N[(x1 * 9.0), $MachinePrecision]), $MachinePrecision] / x2), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x1 \leq 4.1 \cdot 10^{-159}:\\
\;\;\;\;x2 \cdot \left(x1 \cdot \left(\frac{x1 \cdot 9}{x2} + \frac{-1}{x2}\right) - 6\right)\\
\mathbf{elif}\;x1 \leq 1.45 \cdot 10^{+96}:\\
\;\;\;\;x2 \cdot -6 + x1 \cdot \left(x2 \cdot \left(x2 \cdot 8 - 12\right) + -1\right)\\
\mathbf{else}:\\
\;\;\;\;x2 \cdot \left(\frac{x1 \cdot \left(x1 \cdot 9\right)}{x2} - 6\right)\\
\end{array}
\end{array}
if x1 < 4.10000000000000014e-159Initial program 64.5%
Simplified64.7%
Taylor expanded in x1 around 0 66.2%
Taylor expanded in x2 around 0 76.3%
Taylor expanded in x2 around inf 80.5%
Taylor expanded in x1 around 0 80.5%
associate-*r/80.5%
*-commutative80.5%
Simplified80.5%
if 4.10000000000000014e-159 < x1 < 1.44999999999999989e96Initial program 99.4%
Simplified99.6%
Taylor expanded in x1 around 0 66.6%
Taylor expanded in x2 around 0 68.4%
Taylor expanded in x1 around 0 67.2%
if 1.44999999999999989e96 < x1 Initial program 22.2%
Simplified22.2%
Taylor expanded in x1 around 0 69.8%
Taylor expanded in x2 around 0 79.3%
Taylor expanded in x2 around inf 89.7%
Taylor expanded in x1 around inf 89.7%
*-commutative89.7%
Simplified89.7%
Final simplification79.3%
(FPCore (x1 x2) :precision binary64 (if (or (<= x1 -3.7e+52) (not (<= x1 1.9e+51))) (* x2 (- (/ (* x1 (* x1 9.0)) x2) 6.0)) (+ (* x1 (+ (* x1 9.0) -1.0)) (* x2 -6.0))))
double code(double x1, double x2) {
double tmp;
if ((x1 <= -3.7e+52) || !(x1 <= 1.9e+51)) {
tmp = x2 * (((x1 * (x1 * 9.0)) / x2) - 6.0);
} else {
tmp = (x1 * ((x1 * 9.0) + -1.0)) + (x2 * -6.0);
}
return tmp;
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
real(8) :: tmp
if ((x1 <= (-3.7d+52)) .or. (.not. (x1 <= 1.9d+51))) then
tmp = x2 * (((x1 * (x1 * 9.0d0)) / x2) - 6.0d0)
else
tmp = (x1 * ((x1 * 9.0d0) + (-1.0d0))) + (x2 * (-6.0d0))
end if
code = tmp
end function
public static double code(double x1, double x2) {
double tmp;
if ((x1 <= -3.7e+52) || !(x1 <= 1.9e+51)) {
tmp = x2 * (((x1 * (x1 * 9.0)) / x2) - 6.0);
} else {
tmp = (x1 * ((x1 * 9.0) + -1.0)) + (x2 * -6.0);
}
return tmp;
}
def code(x1, x2): tmp = 0 if (x1 <= -3.7e+52) or not (x1 <= 1.9e+51): tmp = x2 * (((x1 * (x1 * 9.0)) / x2) - 6.0) else: tmp = (x1 * ((x1 * 9.0) + -1.0)) + (x2 * -6.0) return tmp
function code(x1, x2) tmp = 0.0 if ((x1 <= -3.7e+52) || !(x1 <= 1.9e+51)) tmp = Float64(x2 * Float64(Float64(Float64(x1 * Float64(x1 * 9.0)) / x2) - 6.0)); else tmp = Float64(Float64(x1 * Float64(Float64(x1 * 9.0) + -1.0)) + Float64(x2 * -6.0)); end return tmp end
function tmp_2 = code(x1, x2) tmp = 0.0; if ((x1 <= -3.7e+52) || ~((x1 <= 1.9e+51))) tmp = x2 * (((x1 * (x1 * 9.0)) / x2) - 6.0); else tmp = (x1 * ((x1 * 9.0) + -1.0)) + (x2 * -6.0); end tmp_2 = tmp; end
code[x1_, x2_] := If[Or[LessEqual[x1, -3.7e+52], N[Not[LessEqual[x1, 1.9e+51]], $MachinePrecision]], N[(x2 * N[(N[(N[(x1 * N[(x1 * 9.0), $MachinePrecision]), $MachinePrecision] / x2), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision], N[(N[(x1 * N[(N[(x1 * 9.0), $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision] + N[(x2 * -6.0), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x1 \leq -3.7 \cdot 10^{+52} \lor \neg \left(x1 \leq 1.9 \cdot 10^{+51}\right):\\
\;\;\;\;x2 \cdot \left(\frac{x1 \cdot \left(x1 \cdot 9\right)}{x2} - 6\right)\\
\mathbf{else}:\\
\;\;\;\;x1 \cdot \left(x1 \cdot 9 + -1\right) + x2 \cdot -6\\
\end{array}
\end{array}
if x1 < -3.7e52 or 1.8999999999999999e51 < x1 Initial program 24.3%
Simplified24.3%
Taylor expanded in x1 around 0 55.7%
Taylor expanded in x2 around 0 69.1%
Taylor expanded in x2 around inf 78.6%
Taylor expanded in x1 around inf 78.6%
*-commutative78.6%
Simplified78.6%
if -3.7e52 < x1 < 1.8999999999999999e51Initial program 99.4%
Simplified99.6%
Taylor expanded in x1 around 0 76.6%
Taylor expanded in x2 around 0 68.4%
Final simplification73.1%
(FPCore (x1 x2) :precision binary64 (if (or (<= x1 -1.18e+24) (not (<= x1 1.5e-12))) (* x2 (- (/ (* x1 (* x1 9.0)) x2) 6.0)) (- (* x2 -6.0) x1)))
double code(double x1, double x2) {
double tmp;
if ((x1 <= -1.18e+24) || !(x1 <= 1.5e-12)) {
tmp = x2 * (((x1 * (x1 * 9.0)) / x2) - 6.0);
} else {
tmp = (x2 * -6.0) - x1;
}
return tmp;
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
real(8) :: tmp
if ((x1 <= (-1.18d+24)) .or. (.not. (x1 <= 1.5d-12))) then
tmp = x2 * (((x1 * (x1 * 9.0d0)) / x2) - 6.0d0)
else
tmp = (x2 * (-6.0d0)) - x1
end if
code = tmp
end function
public static double code(double x1, double x2) {
double tmp;
if ((x1 <= -1.18e+24) || !(x1 <= 1.5e-12)) {
tmp = x2 * (((x1 * (x1 * 9.0)) / x2) - 6.0);
} else {
tmp = (x2 * -6.0) - x1;
}
return tmp;
}
def code(x1, x2): tmp = 0 if (x1 <= -1.18e+24) or not (x1 <= 1.5e-12): tmp = x2 * (((x1 * (x1 * 9.0)) / x2) - 6.0) else: tmp = (x2 * -6.0) - x1 return tmp
function code(x1, x2) tmp = 0.0 if ((x1 <= -1.18e+24) || !(x1 <= 1.5e-12)) tmp = Float64(x2 * Float64(Float64(Float64(x1 * Float64(x1 * 9.0)) / x2) - 6.0)); else tmp = Float64(Float64(x2 * -6.0) - x1); end return tmp end
function tmp_2 = code(x1, x2) tmp = 0.0; if ((x1 <= -1.18e+24) || ~((x1 <= 1.5e-12))) tmp = x2 * (((x1 * (x1 * 9.0)) / x2) - 6.0); else tmp = (x2 * -6.0) - x1; end tmp_2 = tmp; end
code[x1_, x2_] := If[Or[LessEqual[x1, -1.18e+24], N[Not[LessEqual[x1, 1.5e-12]], $MachinePrecision]], N[(x2 * N[(N[(N[(x1 * N[(x1 * 9.0), $MachinePrecision]), $MachinePrecision] / x2), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision], N[(N[(x2 * -6.0), $MachinePrecision] - x1), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x1 \leq -1.18 \cdot 10^{+24} \lor \neg \left(x1 \leq 1.5 \cdot 10^{-12}\right):\\
\;\;\;\;x2 \cdot \left(\frac{x1 \cdot \left(x1 \cdot 9\right)}{x2} - 6\right)\\
\mathbf{else}:\\
\;\;\;\;x2 \cdot -6 - x1\\
\end{array}
\end{array}
if x1 < -1.17999999999999997e24 or 1.5000000000000001e-12 < x1 Initial program 34.1%
Simplified34.1%
Taylor expanded in x1 around 0 51.9%
Taylor expanded in x2 around 0 60.6%
Taylor expanded in x2 around inf 68.9%
Taylor expanded in x1 around inf 68.9%
*-commutative68.9%
Simplified68.9%
if -1.17999999999999997e24 < x1 < 1.5000000000000001e-12Initial program 99.4%
Simplified99.7%
Taylor expanded in x1 around 0 84.1%
Taylor expanded in x2 around 0 78.0%
Taylor expanded in x1 around 0 77.7%
mul-1-neg77.7%
unsub-neg77.7%
*-commutative77.7%
Simplified77.7%
Final simplification73.0%
(FPCore (x1 x2) :precision binary64 (if (or (<= x1 -3.4e+132) (not (<= x1 1.15e-19))) (* x1 (+ (* x1 9.0) -1.0)) (* x2 (- (/ x1 (- x2)) 6.0))))
double code(double x1, double x2) {
double tmp;
if ((x1 <= -3.4e+132) || !(x1 <= 1.15e-19)) {
tmp = x1 * ((x1 * 9.0) + -1.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 <= (-3.4d+132)) .or. (.not. (x1 <= 1.15d-19))) then
tmp = x1 * ((x1 * 9.0d0) + (-1.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 <= -3.4e+132) || !(x1 <= 1.15e-19)) {
tmp = x1 * ((x1 * 9.0) + -1.0);
} else {
tmp = x2 * ((x1 / -x2) - 6.0);
}
return tmp;
}
def code(x1, x2): tmp = 0 if (x1 <= -3.4e+132) or not (x1 <= 1.15e-19): tmp = x1 * ((x1 * 9.0) + -1.0) else: tmp = x2 * ((x1 / -x2) - 6.0) return tmp
function code(x1, x2) tmp = 0.0 if ((x1 <= -3.4e+132) || !(x1 <= 1.15e-19)) tmp = Float64(x1 * Float64(Float64(x1 * 9.0) + -1.0)); else tmp = Float64(x2 * Float64(Float64(x1 / Float64(-x2)) - 6.0)); end return tmp end
function tmp_2 = code(x1, x2) tmp = 0.0; if ((x1 <= -3.4e+132) || ~((x1 <= 1.15e-19))) tmp = x1 * ((x1 * 9.0) + -1.0); else tmp = x2 * ((x1 / -x2) - 6.0); end tmp_2 = tmp; end
code[x1_, x2_] := If[Or[LessEqual[x1, -3.4e+132], N[Not[LessEqual[x1, 1.15e-19]], $MachinePrecision]], N[(x1 * N[(N[(x1 * 9.0), $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision], N[(x2 * N[(N[(x1 / (-x2)), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x1 \leq -3.4 \cdot 10^{+132} \lor \neg \left(x1 \leq 1.15 \cdot 10^{-19}\right):\\
\;\;\;\;x1 \cdot \left(x1 \cdot 9 + -1\right)\\
\mathbf{else}:\\
\;\;\;\;x2 \cdot \left(\frac{x1}{-x2} - 6\right)\\
\end{array}
\end{array}
if x1 < -3.40000000000000025e132 or 1.1499999999999999e-19 < x1 Initial program 29.5%
Simplified29.5%
Taylor expanded in x1 around 0 61.3%
Taylor expanded in x2 around 0 70.3%
Taylor expanded in x2 around inf 74.3%
Taylor expanded in x2 around 0 70.4%
if -3.40000000000000025e132 < x1 < 1.1499999999999999e-19Initial program 94.3%
Simplified94.6%
Taylor expanded in x1 around 0 71.7%
Taylor expanded in x2 around 0 67.3%
Taylor expanded in x2 around inf 72.1%
Taylor expanded in x1 around 0 69.8%
associate-*r/69.8%
neg-mul-169.8%
Simplified69.8%
Final simplification70.1%
(FPCore (x1 x2) :precision binary64 (if (<= x2 1.25e+45) (* x2 (- (/ (* x1 (+ (* x1 9.0) -1.0)) x2) 6.0)) (+ (* x2 -6.0) (* x1 (+ (* x1 (* x2 12.0)) -1.0)))))
double code(double x1, double x2) {
double tmp;
if (x2 <= 1.25e+45) {
tmp = x2 * (((x1 * ((x1 * 9.0) + -1.0)) / x2) - 6.0);
} else {
tmp = (x2 * -6.0) + (x1 * ((x1 * (x2 * 12.0)) + -1.0));
}
return tmp;
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
real(8) :: tmp
if (x2 <= 1.25d+45) then
tmp = x2 * (((x1 * ((x1 * 9.0d0) + (-1.0d0))) / x2) - 6.0d0)
else
tmp = (x2 * (-6.0d0)) + (x1 * ((x1 * (x2 * 12.0d0)) + (-1.0d0)))
end if
code = tmp
end function
public static double code(double x1, double x2) {
double tmp;
if (x2 <= 1.25e+45) {
tmp = x2 * (((x1 * ((x1 * 9.0) + -1.0)) / x2) - 6.0);
} else {
tmp = (x2 * -6.0) + (x1 * ((x1 * (x2 * 12.0)) + -1.0));
}
return tmp;
}
def code(x1, x2): tmp = 0 if x2 <= 1.25e+45: tmp = x2 * (((x1 * ((x1 * 9.0) + -1.0)) / x2) - 6.0) else: tmp = (x2 * -6.0) + (x1 * ((x1 * (x2 * 12.0)) + -1.0)) return tmp
function code(x1, x2) tmp = 0.0 if (x2 <= 1.25e+45) tmp = Float64(x2 * Float64(Float64(Float64(x1 * Float64(Float64(x1 * 9.0) + -1.0)) / x2) - 6.0)); else tmp = Float64(Float64(x2 * -6.0) + Float64(x1 * Float64(Float64(x1 * Float64(x2 * 12.0)) + -1.0))); end return tmp end
function tmp_2 = code(x1, x2) tmp = 0.0; if (x2 <= 1.25e+45) tmp = x2 * (((x1 * ((x1 * 9.0) + -1.0)) / x2) - 6.0); else tmp = (x2 * -6.0) + (x1 * ((x1 * (x2 * 12.0)) + -1.0)); end tmp_2 = tmp; end
code[x1_, x2_] := If[LessEqual[x2, 1.25e+45], N[(x2 * N[(N[(N[(x1 * N[(N[(x1 * 9.0), $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision] / x2), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision], N[(N[(x2 * -6.0), $MachinePrecision] + N[(x1 * N[(N[(x1 * N[(x2 * 12.0), $MachinePrecision]), $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x2 \leq 1.25 \cdot 10^{+45}:\\
\;\;\;\;x2 \cdot \left(\frac{x1 \cdot \left(x1 \cdot 9 + -1\right)}{x2} - 6\right)\\
\mathbf{else}:\\
\;\;\;\;x2 \cdot -6 + x1 \cdot \left(x1 \cdot \left(x2 \cdot 12\right) + -1\right)\\
\end{array}
\end{array}
if x2 < 1.25e45Initial program 65.2%
Simplified65.4%
Taylor expanded in x1 around 0 67.5%
Taylor expanded in x2 around 0 73.5%
Taylor expanded in x2 around inf 79.2%
if 1.25e45 < x2 Initial program 62.0%
Simplified62.0%
Taylor expanded in x1 around 0 64.9%
Taylor expanded in x1 around inf 66.1%
Taylor expanded in x2 around inf 66.1%
Taylor expanded in x2 around 0 66.1%
*-commutative66.1%
Simplified66.1%
Final simplification76.2%
(FPCore (x1 x2) :precision binary64 (if (or (<= x1 -9.5e+14) (not (<= x1 1.15e-19))) (* x1 (+ (* x1 9.0) -1.0)) (- (* x2 -6.0) x1)))
double code(double x1, double x2) {
double tmp;
if ((x1 <= -9.5e+14) || !(x1 <= 1.15e-19)) {
tmp = x1 * ((x1 * 9.0) + -1.0);
} else {
tmp = (x2 * -6.0) - x1;
}
return tmp;
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
real(8) :: tmp
if ((x1 <= (-9.5d+14)) .or. (.not. (x1 <= 1.15d-19))) then
tmp = x1 * ((x1 * 9.0d0) + (-1.0d0))
else
tmp = (x2 * (-6.0d0)) - x1
end if
code = tmp
end function
public static double code(double x1, double x2) {
double tmp;
if ((x1 <= -9.5e+14) || !(x1 <= 1.15e-19)) {
tmp = x1 * ((x1 * 9.0) + -1.0);
} else {
tmp = (x2 * -6.0) - x1;
}
return tmp;
}
def code(x1, x2): tmp = 0 if (x1 <= -9.5e+14) or not (x1 <= 1.15e-19): tmp = x1 * ((x1 * 9.0) + -1.0) else: tmp = (x2 * -6.0) - x1 return tmp
function code(x1, x2) tmp = 0.0 if ((x1 <= -9.5e+14) || !(x1 <= 1.15e-19)) tmp = Float64(x1 * Float64(Float64(x1 * 9.0) + -1.0)); else tmp = Float64(Float64(x2 * -6.0) - x1); end return tmp end
function tmp_2 = code(x1, x2) tmp = 0.0; if ((x1 <= -9.5e+14) || ~((x1 <= 1.15e-19))) tmp = x1 * ((x1 * 9.0) + -1.0); else tmp = (x2 * -6.0) - x1; end tmp_2 = tmp; end
code[x1_, x2_] := If[Or[LessEqual[x1, -9.5e+14], N[Not[LessEqual[x1, 1.15e-19]], $MachinePrecision]], N[(x1 * N[(N[(x1 * 9.0), $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision], N[(N[(x2 * -6.0), $MachinePrecision] - x1), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x1 \leq -9.5 \cdot 10^{+14} \lor \neg \left(x1 \leq 1.15 \cdot 10^{-19}\right):\\
\;\;\;\;x1 \cdot \left(x1 \cdot 9 + -1\right)\\
\mathbf{else}:\\
\;\;\;\;x2 \cdot -6 - x1\\
\end{array}
\end{array}
if x1 < -9.5e14 or 1.1499999999999999e-19 < x1 Initial program 35.5%
Simplified35.5%
Taylor expanded in x1 around 0 52.3%
Taylor expanded in x2 around 0 60.1%
Taylor expanded in x2 around inf 68.2%
Taylor expanded in x2 around 0 60.2%
if -9.5e14 < x1 < 1.1499999999999999e-19Initial program 99.4%
Simplified99.7%
Taylor expanded in x1 around 0 84.5%
Taylor expanded in x2 around 0 79.1%
Taylor expanded in x1 around 0 79.1%
mul-1-neg79.1%
unsub-neg79.1%
*-commutative79.1%
Simplified79.1%
Final simplification68.7%
(FPCore (x1 x2) :precision binary64 (if (or (<= x1 -3.8e-146) (not (<= x1 5.1e-99))) (- x1) (* x2 -6.0)))
double code(double x1, double x2) {
double tmp;
if ((x1 <= -3.8e-146) || !(x1 <= 5.1e-99)) {
tmp = -x1;
} else {
tmp = x2 * -6.0;
}
return tmp;
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
real(8) :: tmp
if ((x1 <= (-3.8d-146)) .or. (.not. (x1 <= 5.1d-99))) then
tmp = -x1
else
tmp = x2 * (-6.0d0)
end if
code = tmp
end function
public static double code(double x1, double x2) {
double tmp;
if ((x1 <= -3.8e-146) || !(x1 <= 5.1e-99)) {
tmp = -x1;
} else {
tmp = x2 * -6.0;
}
return tmp;
}
def code(x1, x2): tmp = 0 if (x1 <= -3.8e-146) or not (x1 <= 5.1e-99): tmp = -x1 else: tmp = x2 * -6.0 return tmp
function code(x1, x2) tmp = 0.0 if ((x1 <= -3.8e-146) || !(x1 <= 5.1e-99)) tmp = Float64(-x1); else tmp = Float64(x2 * -6.0); end return tmp end
function tmp_2 = code(x1, x2) tmp = 0.0; if ((x1 <= -3.8e-146) || ~((x1 <= 5.1e-99))) tmp = -x1; else tmp = x2 * -6.0; end tmp_2 = tmp; end
code[x1_, x2_] := If[Or[LessEqual[x1, -3.8e-146], N[Not[LessEqual[x1, 5.1e-99]], $MachinePrecision]], (-x1), N[(x2 * -6.0), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x1 \leq -3.8 \cdot 10^{-146} \lor \neg \left(x1 \leq 5.1 \cdot 10^{-99}\right):\\
\;\;\;\;-x1\\
\mathbf{else}:\\
\;\;\;\;x2 \cdot -6\\
\end{array}
\end{array}
if x1 < -3.79999999999999994e-146 or 5.0999999999999999e-99 < x1 Initial program 47.3%
Simplified47.4%
Taylor expanded in x1 around 0 59.6%
Taylor expanded in x2 around 0 59.8%
Taylor expanded in x1 around 0 14.0%
mul-1-neg14.0%
unsub-neg14.0%
*-commutative14.0%
Simplified14.0%
Taylor expanded in x2 around 0 11.2%
neg-mul-111.2%
Simplified11.2%
if -3.79999999999999994e-146 < x1 < 5.0999999999999999e-99Initial program 99.7%
Simplified99.8%
Taylor expanded in x1 around 0 79.4%
*-commutative79.4%
Simplified79.4%
Final simplification33.6%
(FPCore (x1 x2) :precision binary64 (* x2 (- (/ (* x1 (+ (* x1 9.0) -1.0)) x2) 6.0)))
double code(double x1, double x2) {
return x2 * (((x1 * ((x1 * 9.0) + -1.0)) / x2) - 6.0);
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
code = x2 * (((x1 * ((x1 * 9.0d0) + (-1.0d0))) / x2) - 6.0d0)
end function
public static double code(double x1, double x2) {
return x2 * (((x1 * ((x1 * 9.0) + -1.0)) / x2) - 6.0);
}
def code(x1, x2): return x2 * (((x1 * ((x1 * 9.0) + -1.0)) / x2) - 6.0)
function code(x1, x2) return Float64(x2 * Float64(Float64(Float64(x1 * Float64(Float64(x1 * 9.0) + -1.0)) / x2) - 6.0)) end
function tmp = code(x1, x2) tmp = x2 * (((x1 * ((x1 * 9.0) + -1.0)) / x2) - 6.0); end
code[x1_, x2_] := N[(x2 * N[(N[(N[(x1 * N[(N[(x1 * 9.0), $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision] / x2), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x2 \cdot \left(\frac{x1 \cdot \left(x1 \cdot 9 + -1\right)}{x2} - 6\right)
\end{array}
Initial program 64.5%
Simplified64.6%
Taylor expanded in x1 around 0 66.9%
Taylor expanded in x2 around 0 68.7%
Taylor expanded in x2 around inf 73.1%
Final simplification73.1%
(FPCore (x1 x2) :precision binary64 (- (* x2 -6.0) x1))
double code(double x1, double x2) {
return (x2 * -6.0) - x1;
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
code = (x2 * (-6.0d0)) - x1
end function
public static double code(double x1, double x2) {
return (x2 * -6.0) - x1;
}
def code(x1, x2): return (x2 * -6.0) - x1
function code(x1, x2) return Float64(Float64(x2 * -6.0) - x1) end
function tmp = code(x1, x2) tmp = (x2 * -6.0) - x1; end
code[x1_, x2_] := N[(N[(x2 * -6.0), $MachinePrecision] - x1), $MachinePrecision]
\begin{array}{l}
\\
x2 \cdot -6 - x1
\end{array}
Initial program 64.5%
Simplified64.6%
Taylor expanded in x1 around 0 66.9%
Taylor expanded in x2 around 0 68.7%
Taylor expanded in x1 around 0 37.9%
mul-1-neg37.9%
unsub-neg37.9%
*-commutative37.9%
Simplified37.9%
(FPCore (x1 x2) :precision binary64 (- x1))
double code(double x1, double x2) {
return -x1;
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
code = -x1
end function
public static double code(double x1, double x2) {
return -x1;
}
def code(x1, x2): return -x1
function code(x1, x2) return Float64(-x1) end
function tmp = code(x1, x2) tmp = -x1; end
code[x1_, x2_] := (-x1)
\begin{array}{l}
\\
-x1
\end{array}
Initial program 64.5%
Simplified64.6%
Taylor expanded in x1 around 0 66.9%
Taylor expanded in x2 around 0 68.7%
Taylor expanded in x1 around 0 37.9%
mul-1-neg37.9%
unsub-neg37.9%
*-commutative37.9%
Simplified37.9%
Taylor expanded in x2 around 0 10.9%
neg-mul-110.9%
Simplified10.9%
herbie shell --seed 2024137
(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))))))