
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (* (* 3.0 x1) x1))
(t_1 (+ (* x1 x1) 1.0))
(t_2 (/ (- (+ t_0 (* 2.0 x2)) x1) t_1)))
(+
x1
(+
(+
(+
(+
(*
(+
(* (* (* 2.0 x1) t_2) (- t_2 3.0))
(* (* x1 x1) (- (* 4.0 t_2) 6.0)))
t_1)
(* t_0 t_2))
(* (* x1 x1) x1))
x1)
(* 3.0 (/ (- (- t_0 (* 2.0 x2)) x1) t_1))))))
double code(double x1, double x2) {
double t_0 = (3.0 * x1) * x1;
double t_1 = (x1 * x1) + 1.0;
double t_2 = ((t_0 + (2.0 * x2)) - x1) / t_1;
return x1 + (((((((((2.0 * x1) * t_2) * (t_2 - 3.0)) + ((x1 * x1) * ((4.0 * t_2) - 6.0))) * t_1) + (t_0 * t_2)) + ((x1 * x1) * x1)) + x1) + (3.0 * (((t_0 - (2.0 * x2)) - x1) / t_1)));
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
real(8) :: t_0
real(8) :: t_1
real(8) :: t_2
t_0 = (3.0d0 * x1) * x1
t_1 = (x1 * x1) + 1.0d0
t_2 = ((t_0 + (2.0d0 * x2)) - x1) / t_1
code = x1 + (((((((((2.0d0 * x1) * t_2) * (t_2 - 3.0d0)) + ((x1 * x1) * ((4.0d0 * t_2) - 6.0d0))) * t_1) + (t_0 * t_2)) + ((x1 * x1) * x1)) + x1) + (3.0d0 * (((t_0 - (2.0d0 * x2)) - x1) / t_1)))
end function
public static double code(double x1, double x2) {
double t_0 = (3.0 * x1) * x1;
double t_1 = (x1 * x1) + 1.0;
double t_2 = ((t_0 + (2.0 * x2)) - x1) / t_1;
return x1 + (((((((((2.0 * x1) * t_2) * (t_2 - 3.0)) + ((x1 * x1) * ((4.0 * t_2) - 6.0))) * t_1) + (t_0 * t_2)) + ((x1 * x1) * x1)) + x1) + (3.0 * (((t_0 - (2.0 * x2)) - x1) / t_1)));
}
def code(x1, x2): t_0 = (3.0 * x1) * x1 t_1 = (x1 * x1) + 1.0 t_2 = ((t_0 + (2.0 * x2)) - x1) / t_1 return x1 + (((((((((2.0 * x1) * t_2) * (t_2 - 3.0)) + ((x1 * x1) * ((4.0 * t_2) - 6.0))) * t_1) + (t_0 * t_2)) + ((x1 * x1) * x1)) + x1) + (3.0 * (((t_0 - (2.0 * x2)) - x1) / t_1)))
function code(x1, x2) t_0 = Float64(Float64(3.0 * x1) * x1) t_1 = Float64(Float64(x1 * x1) + 1.0) t_2 = Float64(Float64(Float64(t_0 + Float64(2.0 * x2)) - x1) / t_1) return Float64(x1 + Float64(Float64(Float64(Float64(Float64(Float64(Float64(Float64(Float64(2.0 * x1) * t_2) * Float64(t_2 - 3.0)) + Float64(Float64(x1 * x1) * Float64(Float64(4.0 * t_2) - 6.0))) * t_1) + Float64(t_0 * t_2)) + Float64(Float64(x1 * x1) * x1)) + x1) + Float64(3.0 * Float64(Float64(Float64(t_0 - Float64(2.0 * x2)) - x1) / t_1)))) end
function tmp = code(x1, x2) t_0 = (3.0 * x1) * x1; t_1 = (x1 * x1) + 1.0; t_2 = ((t_0 + (2.0 * x2)) - x1) / t_1; tmp = x1 + (((((((((2.0 * x1) * t_2) * (t_2 - 3.0)) + ((x1 * x1) * ((4.0 * t_2) - 6.0))) * t_1) + (t_0 * t_2)) + ((x1 * x1) * x1)) + x1) + (3.0 * (((t_0 - (2.0 * x2)) - x1) / t_1))); end
code[x1_, x2_] := Block[{t$95$0 = N[(N[(3.0 * x1), $MachinePrecision] * x1), $MachinePrecision]}, Block[{t$95$1 = N[(N[(x1 * x1), $MachinePrecision] + 1.0), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[(t$95$0 + N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$1), $MachinePrecision]}, N[(x1 + N[(N[(N[(N[(N[(N[(N[(N[(N[(2.0 * x1), $MachinePrecision] * t$95$2), $MachinePrecision] * N[(t$95$2 - 3.0), $MachinePrecision]), $MachinePrecision] + N[(N[(x1 * x1), $MachinePrecision] * N[(N[(4.0 * t$95$2), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * t$95$1), $MachinePrecision] + N[(t$95$0 * t$95$2), $MachinePrecision]), $MachinePrecision] + N[(N[(x1 * x1), $MachinePrecision] * x1), $MachinePrecision]), $MachinePrecision] + x1), $MachinePrecision] + N[(3.0 * N[(N[(N[(t$95$0 - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \left(3 \cdot x1\right) \cdot x1\\
t_1 := x1 \cdot x1 + 1\\
t_2 := \frac{\left(t\_0 + 2 \cdot x2\right) - x1}{t\_1}\\
x1 + \left(\left(\left(\left(\left(\left(\left(2 \cdot x1\right) \cdot t\_2\right) \cdot \left(t\_2 - 3\right) + \left(x1 \cdot x1\right) \cdot \left(4 \cdot t\_2 - 6\right)\right) \cdot t\_1 + t\_0 \cdot t\_2\right) + \left(x1 \cdot x1\right) \cdot x1\right) + x1\right) + 3 \cdot \frac{\left(t\_0 - 2 \cdot x2\right) - x1}{t\_1}\right)
\end{array}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 27 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (* (* 3.0 x1) x1))
(t_1 (+ (* x1 x1) 1.0))
(t_2 (/ (- (+ t_0 (* 2.0 x2)) x1) t_1)))
(+
x1
(+
(+
(+
(+
(*
(+
(* (* (* 2.0 x1) t_2) (- t_2 3.0))
(* (* x1 x1) (- (* 4.0 t_2) 6.0)))
t_1)
(* t_0 t_2))
(* (* x1 x1) x1))
x1)
(* 3.0 (/ (- (- t_0 (* 2.0 x2)) x1) t_1))))))
double code(double x1, double x2) {
double t_0 = (3.0 * x1) * x1;
double t_1 = (x1 * x1) + 1.0;
double t_2 = ((t_0 + (2.0 * x2)) - x1) / t_1;
return x1 + (((((((((2.0 * x1) * t_2) * (t_2 - 3.0)) + ((x1 * x1) * ((4.0 * t_2) - 6.0))) * t_1) + (t_0 * t_2)) + ((x1 * x1) * x1)) + x1) + (3.0 * (((t_0 - (2.0 * x2)) - x1) / t_1)));
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
real(8) :: t_0
real(8) :: t_1
real(8) :: t_2
t_0 = (3.0d0 * x1) * x1
t_1 = (x1 * x1) + 1.0d0
t_2 = ((t_0 + (2.0d0 * x2)) - x1) / t_1
code = x1 + (((((((((2.0d0 * x1) * t_2) * (t_2 - 3.0d0)) + ((x1 * x1) * ((4.0d0 * t_2) - 6.0d0))) * t_1) + (t_0 * t_2)) + ((x1 * x1) * x1)) + x1) + (3.0d0 * (((t_0 - (2.0d0 * x2)) - x1) / t_1)))
end function
public static double code(double x1, double x2) {
double t_0 = (3.0 * x1) * x1;
double t_1 = (x1 * x1) + 1.0;
double t_2 = ((t_0 + (2.0 * x2)) - x1) / t_1;
return x1 + (((((((((2.0 * x1) * t_2) * (t_2 - 3.0)) + ((x1 * x1) * ((4.0 * t_2) - 6.0))) * t_1) + (t_0 * t_2)) + ((x1 * x1) * x1)) + x1) + (3.0 * (((t_0 - (2.0 * x2)) - x1) / t_1)));
}
def code(x1, x2): t_0 = (3.0 * x1) * x1 t_1 = (x1 * x1) + 1.0 t_2 = ((t_0 + (2.0 * x2)) - x1) / t_1 return x1 + (((((((((2.0 * x1) * t_2) * (t_2 - 3.0)) + ((x1 * x1) * ((4.0 * t_2) - 6.0))) * t_1) + (t_0 * t_2)) + ((x1 * x1) * x1)) + x1) + (3.0 * (((t_0 - (2.0 * x2)) - x1) / t_1)))
function code(x1, x2) t_0 = Float64(Float64(3.0 * x1) * x1) t_1 = Float64(Float64(x1 * x1) + 1.0) t_2 = Float64(Float64(Float64(t_0 + Float64(2.0 * x2)) - x1) / t_1) return Float64(x1 + Float64(Float64(Float64(Float64(Float64(Float64(Float64(Float64(Float64(2.0 * x1) * t_2) * Float64(t_2 - 3.0)) + Float64(Float64(x1 * x1) * Float64(Float64(4.0 * t_2) - 6.0))) * t_1) + Float64(t_0 * t_2)) + Float64(Float64(x1 * x1) * x1)) + x1) + Float64(3.0 * Float64(Float64(Float64(t_0 - Float64(2.0 * x2)) - x1) / t_1)))) end
function tmp = code(x1, x2) t_0 = (3.0 * x1) * x1; t_1 = (x1 * x1) + 1.0; t_2 = ((t_0 + (2.0 * x2)) - x1) / t_1; tmp = x1 + (((((((((2.0 * x1) * t_2) * (t_2 - 3.0)) + ((x1 * x1) * ((4.0 * t_2) - 6.0))) * t_1) + (t_0 * t_2)) + ((x1 * x1) * x1)) + x1) + (3.0 * (((t_0 - (2.0 * x2)) - x1) / t_1))); end
code[x1_, x2_] := Block[{t$95$0 = N[(N[(3.0 * x1), $MachinePrecision] * x1), $MachinePrecision]}, Block[{t$95$1 = N[(N[(x1 * x1), $MachinePrecision] + 1.0), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[(t$95$0 + N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$1), $MachinePrecision]}, N[(x1 + N[(N[(N[(N[(N[(N[(N[(N[(N[(2.0 * x1), $MachinePrecision] * t$95$2), $MachinePrecision] * N[(t$95$2 - 3.0), $MachinePrecision]), $MachinePrecision] + N[(N[(x1 * x1), $MachinePrecision] * N[(N[(4.0 * t$95$2), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * t$95$1), $MachinePrecision] + N[(t$95$0 * t$95$2), $MachinePrecision]), $MachinePrecision] + N[(N[(x1 * x1), $MachinePrecision] * x1), $MachinePrecision]), $MachinePrecision] + x1), $MachinePrecision] + N[(3.0 * N[(N[(N[(t$95$0 - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \left(3 \cdot x1\right) \cdot x1\\
t_1 := x1 \cdot x1 + 1\\
t_2 := \frac{\left(t\_0 + 2 \cdot x2\right) - x1}{t\_1}\\
x1 + \left(\left(\left(\left(\left(\left(\left(2 \cdot x1\right) \cdot t\_2\right) \cdot \left(t\_2 - 3\right) + \left(x1 \cdot x1\right) \cdot \left(4 \cdot t\_2 - 6\right)\right) \cdot t\_1 + t\_0 \cdot t\_2\right) + \left(x1 \cdot x1\right) \cdot x1\right) + x1\right) + 3 \cdot \frac{\left(t\_0 - 2 \cdot x2\right) - x1}{t\_1}\right)
\end{array}
\end{array}
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (- -1.0 (* x1 x1)))
(t_1 (* x1 (* x1 3.0)))
(t_2 (* 3.0 (* x1 x1)))
(t_3 (- (+ t_1 (* 2.0 x2)) x1))
(t_4 (/ t_3 t_0))
(t_5 (fma x1 (* x1 3.0) (* 2.0 x2)))
(t_6 (/ (- t_5 x1) (fma x1 x1 1.0)))
(t_7 (/ (- x1 t_5) (fma x1 x1 1.0))))
(if (<=
(-
x1
(+
(* 3.0 (/ (- (- t_1 (* 2.0 x2)) x1) t_0))
(-
(-
(-
(* t_1 t_4)
(*
t_0
(+
(* (* x1 x1) (+ 6.0 (* 4.0 t_4)))
(* (* (* x1 2.0) (/ t_3 (+ (* x1 x1) 1.0))) (+ 3.0 t_4)))))
(* x1 (* x1 x1)))
x1)))
INFINITY)
(+
x1
(fma
3.0
(/ (- t_2 (fma 2.0 x2 x1)) (fma x1 x1 1.0))
(+
x1
(fma
(fma x1 x1 1.0)
(fma x1 (* x1 (fma t_6 4.0 -6.0)) (* (* x1 (* 2.0 t_7)) (- t_7 -3.0)))
(fma t_2 t_6 (pow x1 3.0))))))
(*
(pow x1 4.0)
(+
6.0
(/
(-
(/
(+
9.0
(+
(/ (+ -1.0 (* -2.0 (+ -1.0 (* 3.0 (- 3.0 (* 2.0 x2)))))) x1)
(* 4.0 (- (* 2.0 x2) 3.0))))
x1)
3.0)
x1))))))
double code(double x1, double x2) {
double t_0 = -1.0 - (x1 * x1);
double t_1 = x1 * (x1 * 3.0);
double t_2 = 3.0 * (x1 * x1);
double t_3 = (t_1 + (2.0 * x2)) - x1;
double t_4 = t_3 / t_0;
double t_5 = fma(x1, (x1 * 3.0), (2.0 * x2));
double t_6 = (t_5 - x1) / fma(x1, x1, 1.0);
double t_7 = (x1 - t_5) / fma(x1, x1, 1.0);
double tmp;
if ((x1 - ((3.0 * (((t_1 - (2.0 * x2)) - x1) / t_0)) + ((((t_1 * t_4) - (t_0 * (((x1 * x1) * (6.0 + (4.0 * t_4))) + (((x1 * 2.0) * (t_3 / ((x1 * x1) + 1.0))) * (3.0 + t_4))))) - (x1 * (x1 * x1))) - x1))) <= ((double) INFINITY)) {
tmp = x1 + fma(3.0, ((t_2 - fma(2.0, x2, x1)) / fma(x1, x1, 1.0)), (x1 + fma(fma(x1, x1, 1.0), fma(x1, (x1 * fma(t_6, 4.0, -6.0)), ((x1 * (2.0 * t_7)) * (t_7 - -3.0))), fma(t_2, t_6, pow(x1, 3.0)))));
} else {
tmp = pow(x1, 4.0) * (6.0 + ((((9.0 + (((-1.0 + (-2.0 * (-1.0 + (3.0 * (3.0 - (2.0 * x2)))))) / x1) + (4.0 * ((2.0 * x2) - 3.0)))) / x1) - 3.0) / x1));
}
return tmp;
}
function code(x1, x2) t_0 = Float64(-1.0 - Float64(x1 * x1)) t_1 = Float64(x1 * Float64(x1 * 3.0)) t_2 = Float64(3.0 * Float64(x1 * x1)) t_3 = Float64(Float64(t_1 + Float64(2.0 * x2)) - x1) t_4 = Float64(t_3 / t_0) t_5 = fma(x1, Float64(x1 * 3.0), Float64(2.0 * x2)) t_6 = Float64(Float64(t_5 - x1) / fma(x1, x1, 1.0)) t_7 = Float64(Float64(x1 - t_5) / fma(x1, x1, 1.0)) tmp = 0.0 if (Float64(x1 - Float64(Float64(3.0 * Float64(Float64(Float64(t_1 - Float64(2.0 * x2)) - x1) / t_0)) + Float64(Float64(Float64(Float64(t_1 * t_4) - Float64(t_0 * Float64(Float64(Float64(x1 * x1) * Float64(6.0 + Float64(4.0 * t_4))) + Float64(Float64(Float64(x1 * 2.0) * Float64(t_3 / Float64(Float64(x1 * x1) + 1.0))) * Float64(3.0 + t_4))))) - Float64(x1 * Float64(x1 * x1))) - x1))) <= Inf) tmp = Float64(x1 + fma(3.0, Float64(Float64(t_2 - fma(2.0, x2, x1)) / fma(x1, x1, 1.0)), Float64(x1 + fma(fma(x1, x1, 1.0), fma(x1, Float64(x1 * fma(t_6, 4.0, -6.0)), Float64(Float64(x1 * Float64(2.0 * t_7)) * Float64(t_7 - -3.0))), fma(t_2, t_6, (x1 ^ 3.0)))))); else tmp = Float64((x1 ^ 4.0) * Float64(6.0 + Float64(Float64(Float64(Float64(9.0 + Float64(Float64(Float64(-1.0 + Float64(-2.0 * Float64(-1.0 + Float64(3.0 * Float64(3.0 - Float64(2.0 * x2)))))) / x1) + Float64(4.0 * Float64(Float64(2.0 * x2) - 3.0)))) / x1) - 3.0) / x1))); end return tmp end
code[x1_, x2_] := Block[{t$95$0 = N[(-1.0 - N[(x1 * x1), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(x1 * N[(x1 * 3.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(3.0 * N[(x1 * x1), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[(t$95$1 + N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision]}, Block[{t$95$4 = N[(t$95$3 / t$95$0), $MachinePrecision]}, Block[{t$95$5 = N[(x1 * N[(x1 * 3.0), $MachinePrecision] + N[(2.0 * x2), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$6 = N[(N[(t$95$5 - x1), $MachinePrecision] / N[(x1 * x1 + 1.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$7 = N[(N[(x1 - t$95$5), $MachinePrecision] / N[(x1 * x1 + 1.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(x1 - N[(N[(3.0 * N[(N[(N[(t$95$1 - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$0), $MachinePrecision]), $MachinePrecision] + N[(N[(N[(N[(t$95$1 * t$95$4), $MachinePrecision] - N[(t$95$0 * N[(N[(N[(x1 * x1), $MachinePrecision] * N[(6.0 + N[(4.0 * t$95$4), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(N[(x1 * 2.0), $MachinePrecision] * N[(t$95$3 / N[(N[(x1 * x1), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(3.0 + t$95$4), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(x1 * N[(x1 * x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], Infinity], N[(x1 + N[(3.0 * N[(N[(t$95$2 - 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$6 * 4.0 + -6.0), $MachinePrecision]), $MachinePrecision] + N[(N[(x1 * N[(2.0 * t$95$7), $MachinePrecision]), $MachinePrecision] * N[(t$95$7 - -3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(t$95$2 * t$95$6 + N[Power[x1, 3.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[Power[x1, 4.0], $MachinePrecision] * N[(6.0 + N[(N[(N[(N[(9.0 + N[(N[(N[(-1.0 + N[(-2.0 * N[(-1.0 + N[(3.0 * N[(3.0 - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / x1), $MachinePrecision] + N[(4.0 * N[(N[(2.0 * x2), $MachinePrecision] - 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / x1), $MachinePrecision] - 3.0), $MachinePrecision] / x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := -1 - x1 \cdot x1\\
t_1 := x1 \cdot \left(x1 \cdot 3\right)\\
t_2 := 3 \cdot \left(x1 \cdot x1\right)\\
t_3 := \left(t\_1 + 2 \cdot x2\right) - x1\\
t_4 := \frac{t\_3}{t\_0}\\
t_5 := \mathsf{fma}\left(x1, x1 \cdot 3, 2 \cdot x2\right)\\
t_6 := \frac{t\_5 - x1}{\mathsf{fma}\left(x1, x1, 1\right)}\\
t_7 := \frac{x1 - t\_5}{\mathsf{fma}\left(x1, x1, 1\right)}\\
\mathbf{if}\;x1 - \left(3 \cdot \frac{\left(t\_1 - 2 \cdot x2\right) - x1}{t\_0} + \left(\left(\left(t\_1 \cdot t\_4 - t\_0 \cdot \left(\left(x1 \cdot x1\right) \cdot \left(6 + 4 \cdot t\_4\right) + \left(\left(x1 \cdot 2\right) \cdot \frac{t\_3}{x1 \cdot x1 + 1}\right) \cdot \left(3 + t\_4\right)\right)\right) - x1 \cdot \left(x1 \cdot x1\right)\right) - x1\right)\right) \leq \infty:\\
\;\;\;\;x1 + \mathsf{fma}\left(3, \frac{t\_2 - \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\_6, 4, -6\right), \left(x1 \cdot \left(2 \cdot t\_7\right)\right) \cdot \left(t\_7 - -3\right)\right), \mathsf{fma}\left(t\_2, t\_6, {x1}^{3}\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;{x1}^{4} \cdot \left(6 + \frac{\frac{9 + \left(\frac{-1 + -2 \cdot \left(-1 + 3 \cdot \left(3 - 2 \cdot x2\right)\right)}{x1} + 4 \cdot \left(2 \cdot x2 - 3\right)\right)}{x1} - 3}{x1}\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.5%
Simplified99.7%
if +inf.0 < (+.f64 x1 (+.f64 (+.f64 (+.f64 (+.f64 (*.f64 (+.f64 (*.f64 (*.f64 (*.f64 #s(literal 2 binary64) x1) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64)))) (-.f64 (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))) #s(literal 3 binary64))) (*.f64 (*.f64 x1 x1) (-.f64 (*.f64 #s(literal 4 binary64) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64)))) #s(literal 6 binary64)))) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))) (*.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))))) (*.f64 (*.f64 x1 x1) x1)) x1) (*.f64 #s(literal 3 binary64) (/.f64 (-.f64 (-.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64)))))) Initial program 0.0%
Simplified0.0%
Taylor expanded in x1 around -inf 100.0%
Final simplification99.8%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (- -1.0 (* x1 x1)))
(t_1 (+ (* x1 x1) 1.0))
(t_2 (* x1 (* x1 3.0)))
(t_3 (- (- t_2 (* 2.0 x2)) x1))
(t_4 (- (+ t_2 (* 2.0 x2)) x1))
(t_5 (/ t_4 t_1))
(t_6 (* (* x1 2.0) t_5))
(t_7 (/ t_4 t_0))
(t_8 (* x1 (* x1 x1))))
(if (<=
(-
x1
(+
(* 3.0 (/ t_3 t_0))
(-
(-
(-
(* t_2 t_7)
(* t_0 (+ (* (* x1 x1) (+ 6.0 (* 4.0 t_7))) (* t_6 (+ 3.0 t_7)))))
t_8)
x1)))
INFINITY)
(+
x1
(+
(* 3.0 (/ t_3 t_1))
(+
x1
(+
t_8
(+
(* t_2 t_5)
(*
t_1
(+
(* (* x1 x1) (- (* t_5 4.0) 6.0))
(*
t_6
(-
(/ (- (+ (* 2.0 x2) (exp (log (* 3.0 (pow x1 2.0))))) x1) t_1)
3.0)))))))))
(*
(pow x1 4.0)
(+
6.0
(/
(-
(/
(+
9.0
(+
(/ (+ -1.0 (* -2.0 (+ -1.0 (* 3.0 (- 3.0 (* 2.0 x2)))))) x1)
(* 4.0 (- (* 2.0 x2) 3.0))))
x1)
3.0)
x1))))))
double code(double x1, double x2) {
double t_0 = -1.0 - (x1 * x1);
double t_1 = (x1 * x1) + 1.0;
double t_2 = x1 * (x1 * 3.0);
double t_3 = (t_2 - (2.0 * x2)) - x1;
double t_4 = (t_2 + (2.0 * x2)) - x1;
double t_5 = t_4 / t_1;
double t_6 = (x1 * 2.0) * t_5;
double t_7 = t_4 / t_0;
double t_8 = x1 * (x1 * x1);
double tmp;
if ((x1 - ((3.0 * (t_3 / t_0)) + ((((t_2 * t_7) - (t_0 * (((x1 * x1) * (6.0 + (4.0 * t_7))) + (t_6 * (3.0 + t_7))))) - t_8) - x1))) <= ((double) INFINITY)) {
tmp = x1 + ((3.0 * (t_3 / t_1)) + (x1 + (t_8 + ((t_2 * t_5) + (t_1 * (((x1 * x1) * ((t_5 * 4.0) - 6.0)) + (t_6 * (((((2.0 * x2) + exp(log((3.0 * pow(x1, 2.0))))) - x1) / t_1) - 3.0))))))));
} else {
tmp = pow(x1, 4.0) * (6.0 + ((((9.0 + (((-1.0 + (-2.0 * (-1.0 + (3.0 * (3.0 - (2.0 * x2)))))) / x1) + (4.0 * ((2.0 * x2) - 3.0)))) / x1) - 3.0) / x1));
}
return tmp;
}
public static double code(double x1, double x2) {
double t_0 = -1.0 - (x1 * x1);
double t_1 = (x1 * x1) + 1.0;
double t_2 = x1 * (x1 * 3.0);
double t_3 = (t_2 - (2.0 * x2)) - x1;
double t_4 = (t_2 + (2.0 * x2)) - x1;
double t_5 = t_4 / t_1;
double t_6 = (x1 * 2.0) * t_5;
double t_7 = t_4 / t_0;
double t_8 = x1 * (x1 * x1);
double tmp;
if ((x1 - ((3.0 * (t_3 / t_0)) + ((((t_2 * t_7) - (t_0 * (((x1 * x1) * (6.0 + (4.0 * t_7))) + (t_6 * (3.0 + t_7))))) - t_8) - x1))) <= Double.POSITIVE_INFINITY) {
tmp = x1 + ((3.0 * (t_3 / t_1)) + (x1 + (t_8 + ((t_2 * t_5) + (t_1 * (((x1 * x1) * ((t_5 * 4.0) - 6.0)) + (t_6 * (((((2.0 * x2) + Math.exp(Math.log((3.0 * Math.pow(x1, 2.0))))) - x1) / t_1) - 3.0))))))));
} else {
tmp = Math.pow(x1, 4.0) * (6.0 + ((((9.0 + (((-1.0 + (-2.0 * (-1.0 + (3.0 * (3.0 - (2.0 * x2)))))) / x1) + (4.0 * ((2.0 * x2) - 3.0)))) / x1) - 3.0) / x1));
}
return tmp;
}
def code(x1, x2): t_0 = -1.0 - (x1 * x1) t_1 = (x1 * x1) + 1.0 t_2 = x1 * (x1 * 3.0) t_3 = (t_2 - (2.0 * x2)) - x1 t_4 = (t_2 + (2.0 * x2)) - x1 t_5 = t_4 / t_1 t_6 = (x1 * 2.0) * t_5 t_7 = t_4 / t_0 t_8 = x1 * (x1 * x1) tmp = 0 if (x1 - ((3.0 * (t_3 / t_0)) + ((((t_2 * t_7) - (t_0 * (((x1 * x1) * (6.0 + (4.0 * t_7))) + (t_6 * (3.0 + t_7))))) - t_8) - x1))) <= math.inf: tmp = x1 + ((3.0 * (t_3 / t_1)) + (x1 + (t_8 + ((t_2 * t_5) + (t_1 * (((x1 * x1) * ((t_5 * 4.0) - 6.0)) + (t_6 * (((((2.0 * x2) + math.exp(math.log((3.0 * math.pow(x1, 2.0))))) - x1) / t_1) - 3.0)))))))) else: tmp = math.pow(x1, 4.0) * (6.0 + ((((9.0 + (((-1.0 + (-2.0 * (-1.0 + (3.0 * (3.0 - (2.0 * x2)))))) / x1) + (4.0 * ((2.0 * x2) - 3.0)))) / x1) - 3.0) / x1)) return tmp
function code(x1, x2) t_0 = Float64(-1.0 - Float64(x1 * x1)) t_1 = Float64(Float64(x1 * x1) + 1.0) t_2 = Float64(x1 * Float64(x1 * 3.0)) t_3 = Float64(Float64(t_2 - Float64(2.0 * x2)) - x1) t_4 = Float64(Float64(t_2 + Float64(2.0 * x2)) - x1) t_5 = Float64(t_4 / t_1) t_6 = Float64(Float64(x1 * 2.0) * t_5) t_7 = Float64(t_4 / t_0) t_8 = Float64(x1 * Float64(x1 * x1)) tmp = 0.0 if (Float64(x1 - Float64(Float64(3.0 * Float64(t_3 / t_0)) + Float64(Float64(Float64(Float64(t_2 * t_7) - Float64(t_0 * Float64(Float64(Float64(x1 * x1) * Float64(6.0 + Float64(4.0 * t_7))) + Float64(t_6 * Float64(3.0 + t_7))))) - t_8) - x1))) <= Inf) tmp = Float64(x1 + Float64(Float64(3.0 * Float64(t_3 / t_1)) + Float64(x1 + Float64(t_8 + Float64(Float64(t_2 * t_5) + Float64(t_1 * Float64(Float64(Float64(x1 * x1) * Float64(Float64(t_5 * 4.0) - 6.0)) + Float64(t_6 * Float64(Float64(Float64(Float64(Float64(2.0 * x2) + exp(log(Float64(3.0 * (x1 ^ 2.0))))) - x1) / t_1) - 3.0))))))))); else tmp = Float64((x1 ^ 4.0) * Float64(6.0 + Float64(Float64(Float64(Float64(9.0 + Float64(Float64(Float64(-1.0 + Float64(-2.0 * Float64(-1.0 + Float64(3.0 * Float64(3.0 - Float64(2.0 * x2)))))) / x1) + Float64(4.0 * Float64(Float64(2.0 * x2) - 3.0)))) / x1) - 3.0) / x1))); end return tmp end
function tmp_2 = code(x1, x2) t_0 = -1.0 - (x1 * x1); t_1 = (x1 * x1) + 1.0; t_2 = x1 * (x1 * 3.0); t_3 = (t_2 - (2.0 * x2)) - x1; t_4 = (t_2 + (2.0 * x2)) - x1; t_5 = t_4 / t_1; t_6 = (x1 * 2.0) * t_5; t_7 = t_4 / t_0; t_8 = x1 * (x1 * x1); tmp = 0.0; if ((x1 - ((3.0 * (t_3 / t_0)) + ((((t_2 * t_7) - (t_0 * (((x1 * x1) * (6.0 + (4.0 * t_7))) + (t_6 * (3.0 + t_7))))) - t_8) - x1))) <= Inf) tmp = x1 + ((3.0 * (t_3 / t_1)) + (x1 + (t_8 + ((t_2 * t_5) + (t_1 * (((x1 * x1) * ((t_5 * 4.0) - 6.0)) + (t_6 * (((((2.0 * x2) + exp(log((3.0 * (x1 ^ 2.0))))) - x1) / t_1) - 3.0)))))))); else tmp = (x1 ^ 4.0) * (6.0 + ((((9.0 + (((-1.0 + (-2.0 * (-1.0 + (3.0 * (3.0 - (2.0 * x2)))))) / x1) + (4.0 * ((2.0 * x2) - 3.0)))) / x1) - 3.0) / x1)); end tmp_2 = tmp; end
code[x1_, x2_] := Block[{t$95$0 = N[(-1.0 - N[(x1 * x1), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(N[(x1 * x1), $MachinePrecision] + 1.0), $MachinePrecision]}, Block[{t$95$2 = N[(x1 * N[(x1 * 3.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[(t$95$2 - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision]}, Block[{t$95$4 = N[(N[(t$95$2 + N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision]}, Block[{t$95$5 = N[(t$95$4 / t$95$1), $MachinePrecision]}, Block[{t$95$6 = N[(N[(x1 * 2.0), $MachinePrecision] * t$95$5), $MachinePrecision]}, Block[{t$95$7 = N[(t$95$4 / t$95$0), $MachinePrecision]}, Block[{t$95$8 = N[(x1 * N[(x1 * x1), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(x1 - N[(N[(3.0 * N[(t$95$3 / t$95$0), $MachinePrecision]), $MachinePrecision] + N[(N[(N[(N[(t$95$2 * t$95$7), $MachinePrecision] - N[(t$95$0 * N[(N[(N[(x1 * x1), $MachinePrecision] * N[(6.0 + N[(4.0 * t$95$7), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(t$95$6 * N[(3.0 + t$95$7), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$8), $MachinePrecision] - x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], Infinity], N[(x1 + N[(N[(3.0 * N[(t$95$3 / t$95$1), $MachinePrecision]), $MachinePrecision] + N[(x1 + N[(t$95$8 + N[(N[(t$95$2 * t$95$5), $MachinePrecision] + N[(t$95$1 * N[(N[(N[(x1 * x1), $MachinePrecision] * N[(N[(t$95$5 * 4.0), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision] + N[(t$95$6 * N[(N[(N[(N[(N[(2.0 * x2), $MachinePrecision] + N[Exp[N[Log[N[(3.0 * N[Power[x1, 2.0], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$1), $MachinePrecision] - 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[Power[x1, 4.0], $MachinePrecision] * N[(6.0 + N[(N[(N[(N[(9.0 + N[(N[(N[(-1.0 + N[(-2.0 * N[(-1.0 + N[(3.0 * N[(3.0 - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / x1), $MachinePrecision] + N[(4.0 * N[(N[(2.0 * x2), $MachinePrecision] - 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / x1), $MachinePrecision] - 3.0), $MachinePrecision] / x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := -1 - x1 \cdot x1\\
t_1 := x1 \cdot x1 + 1\\
t_2 := x1 \cdot \left(x1 \cdot 3\right)\\
t_3 := \left(t\_2 - 2 \cdot x2\right) - x1\\
t_4 := \left(t\_2 + 2 \cdot x2\right) - x1\\
t_5 := \frac{t\_4}{t\_1}\\
t_6 := \left(x1 \cdot 2\right) \cdot t\_5\\
t_7 := \frac{t\_4}{t\_0}\\
t_8 := x1 \cdot \left(x1 \cdot x1\right)\\
\mathbf{if}\;x1 - \left(3 \cdot \frac{t\_3}{t\_0} + \left(\left(\left(t\_2 \cdot t\_7 - t\_0 \cdot \left(\left(x1 \cdot x1\right) \cdot \left(6 + 4 \cdot t\_7\right) + t\_6 \cdot \left(3 + t\_7\right)\right)\right) - t\_8\right) - x1\right)\right) \leq \infty:\\
\;\;\;\;x1 + \left(3 \cdot \frac{t\_3}{t\_1} + \left(x1 + \left(t\_8 + \left(t\_2 \cdot t\_5 + t\_1 \cdot \left(\left(x1 \cdot x1\right) \cdot \left(t\_5 \cdot 4 - 6\right) + t\_6 \cdot \left(\frac{\left(2 \cdot x2 + e^{\log \left(3 \cdot {x1}^{2}\right)}\right) - x1}{t\_1} - 3\right)\right)\right)\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;{x1}^{4} \cdot \left(6 + \frac{\frac{9 + \left(\frac{-1 + -2 \cdot \left(-1 + 3 \cdot \left(3 - 2 \cdot x2\right)\right)}{x1} + 4 \cdot \left(2 \cdot x2 - 3\right)\right)}{x1} - 3}{x1}\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.5%
associate-*r*99.5%
add-exp-log99.5%
pow299.5%
Applied egg-rr99.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%
Simplified0.0%
Taylor expanded in x1 around -inf 100.0%
Final simplification99.6%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (- -1.0 (* x1 x1)))
(t_1 (+ (* x1 x1) 1.0))
(t_2 (* x1 (* x1 3.0)))
(t_3 (- (- t_2 (* 2.0 x2)) x1))
(t_4 (- (+ t_2 (* 2.0 x2)) x1))
(t_5 (* (* x1 2.0) (/ t_4 t_1)))
(t_6 (/ t_4 t_0))
(t_7 (* t_2 t_6))
(t_8 (* (* x1 x1) (+ 6.0 (* 4.0 t_6))))
(t_9 (* x1 (* x1 x1))))
(if (<=
(-
x1
(+
(* 3.0 (/ t_3 t_0))
(- (- (- t_7 (* t_0 (+ t_8 (* t_5 (+ 3.0 t_6))))) t_9) x1)))
INFINITY)
(+
x1
(+
(* 3.0 (/ t_3 t_1))
(+
x1
(-
t_9
(-
t_7
(*
t_0
(+
t_8
(*
t_5
(+
3.0
(/
1.0
(/
(fma x1 x1 1.0)
(- x1 (fma 3.0 (pow x1 2.0) (* 2.0 x2))))))))))))))
(*
(pow x1 4.0)
(+
6.0
(/
(-
(/
(+
9.0
(+
(/ (+ -1.0 (* -2.0 (+ -1.0 (* 3.0 (- 3.0 (* 2.0 x2)))))) x1)
(* 4.0 (- (* 2.0 x2) 3.0))))
x1)
3.0)
x1))))))
double code(double x1, double x2) {
double t_0 = -1.0 - (x1 * x1);
double t_1 = (x1 * x1) + 1.0;
double t_2 = x1 * (x1 * 3.0);
double t_3 = (t_2 - (2.0 * x2)) - x1;
double t_4 = (t_2 + (2.0 * x2)) - x1;
double t_5 = (x1 * 2.0) * (t_4 / t_1);
double t_6 = t_4 / t_0;
double t_7 = t_2 * t_6;
double t_8 = (x1 * x1) * (6.0 + (4.0 * t_6));
double t_9 = x1 * (x1 * x1);
double tmp;
if ((x1 - ((3.0 * (t_3 / t_0)) + (((t_7 - (t_0 * (t_8 + (t_5 * (3.0 + t_6))))) - t_9) - x1))) <= ((double) INFINITY)) {
tmp = x1 + ((3.0 * (t_3 / t_1)) + (x1 + (t_9 - (t_7 - (t_0 * (t_8 + (t_5 * (3.0 + (1.0 / (fma(x1, x1, 1.0) / (x1 - fma(3.0, pow(x1, 2.0), (2.0 * x2)))))))))))));
} else {
tmp = pow(x1, 4.0) * (6.0 + ((((9.0 + (((-1.0 + (-2.0 * (-1.0 + (3.0 * (3.0 - (2.0 * x2)))))) / x1) + (4.0 * ((2.0 * x2) - 3.0)))) / x1) - 3.0) / x1));
}
return tmp;
}
function code(x1, x2) t_0 = Float64(-1.0 - Float64(x1 * x1)) t_1 = Float64(Float64(x1 * x1) + 1.0) t_2 = Float64(x1 * Float64(x1 * 3.0)) t_3 = Float64(Float64(t_2 - Float64(2.0 * x2)) - x1) t_4 = Float64(Float64(t_2 + Float64(2.0 * x2)) - x1) t_5 = Float64(Float64(x1 * 2.0) * Float64(t_4 / t_1)) t_6 = Float64(t_4 / t_0) t_7 = Float64(t_2 * t_6) t_8 = Float64(Float64(x1 * x1) * Float64(6.0 + Float64(4.0 * t_6))) t_9 = Float64(x1 * Float64(x1 * x1)) tmp = 0.0 if (Float64(x1 - Float64(Float64(3.0 * Float64(t_3 / t_0)) + Float64(Float64(Float64(t_7 - Float64(t_0 * Float64(t_8 + Float64(t_5 * Float64(3.0 + t_6))))) - t_9) - x1))) <= Inf) tmp = Float64(x1 + Float64(Float64(3.0 * Float64(t_3 / t_1)) + Float64(x1 + Float64(t_9 - Float64(t_7 - Float64(t_0 * Float64(t_8 + Float64(t_5 * Float64(3.0 + Float64(1.0 / Float64(fma(x1, x1, 1.0) / Float64(x1 - fma(3.0, (x1 ^ 2.0), Float64(2.0 * x2)))))))))))))); else tmp = Float64((x1 ^ 4.0) * Float64(6.0 + Float64(Float64(Float64(Float64(9.0 + Float64(Float64(Float64(-1.0 + Float64(-2.0 * Float64(-1.0 + Float64(3.0 * Float64(3.0 - Float64(2.0 * x2)))))) / x1) + Float64(4.0 * Float64(Float64(2.0 * x2) - 3.0)))) / x1) - 3.0) / x1))); end return tmp end
code[x1_, x2_] := Block[{t$95$0 = N[(-1.0 - N[(x1 * x1), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(N[(x1 * x1), $MachinePrecision] + 1.0), $MachinePrecision]}, Block[{t$95$2 = N[(x1 * N[(x1 * 3.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[(t$95$2 - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision]}, Block[{t$95$4 = N[(N[(t$95$2 + N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision]}, Block[{t$95$5 = N[(N[(x1 * 2.0), $MachinePrecision] * N[(t$95$4 / t$95$1), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$6 = N[(t$95$4 / t$95$0), $MachinePrecision]}, Block[{t$95$7 = N[(t$95$2 * t$95$6), $MachinePrecision]}, Block[{t$95$8 = N[(N[(x1 * x1), $MachinePrecision] * N[(6.0 + N[(4.0 * t$95$6), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$9 = N[(x1 * N[(x1 * x1), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(x1 - N[(N[(3.0 * N[(t$95$3 / t$95$0), $MachinePrecision]), $MachinePrecision] + N[(N[(N[(t$95$7 - N[(t$95$0 * N[(t$95$8 + N[(t$95$5 * N[(3.0 + t$95$6), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$9), $MachinePrecision] - x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], Infinity], N[(x1 + N[(N[(3.0 * N[(t$95$3 / t$95$1), $MachinePrecision]), $MachinePrecision] + N[(x1 + N[(t$95$9 - N[(t$95$7 - N[(t$95$0 * N[(t$95$8 + N[(t$95$5 * N[(3.0 + N[(1.0 / N[(N[(x1 * x1 + 1.0), $MachinePrecision] / N[(x1 - N[(3.0 * N[Power[x1, 2.0], $MachinePrecision] + N[(2.0 * x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[Power[x1, 4.0], $MachinePrecision] * N[(6.0 + N[(N[(N[(N[(9.0 + N[(N[(N[(-1.0 + N[(-2.0 * N[(-1.0 + N[(3.0 * N[(3.0 - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / x1), $MachinePrecision] + N[(4.0 * N[(N[(2.0 * x2), $MachinePrecision] - 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / x1), $MachinePrecision] - 3.0), $MachinePrecision] / x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := -1 - x1 \cdot x1\\
t_1 := x1 \cdot x1 + 1\\
t_2 := x1 \cdot \left(x1 \cdot 3\right)\\
t_3 := \left(t\_2 - 2 \cdot x2\right) - x1\\
t_4 := \left(t\_2 + 2 \cdot x2\right) - x1\\
t_5 := \left(x1 \cdot 2\right) \cdot \frac{t\_4}{t\_1}\\
t_6 := \frac{t\_4}{t\_0}\\
t_7 := t\_2 \cdot t\_6\\
t_8 := \left(x1 \cdot x1\right) \cdot \left(6 + 4 \cdot t\_6\right)\\
t_9 := x1 \cdot \left(x1 \cdot x1\right)\\
\mathbf{if}\;x1 - \left(3 \cdot \frac{t\_3}{t\_0} + \left(\left(\left(t\_7 - t\_0 \cdot \left(t\_8 + t\_5 \cdot \left(3 + t\_6\right)\right)\right) - t\_9\right) - x1\right)\right) \leq \infty:\\
\;\;\;\;x1 + \left(3 \cdot \frac{t\_3}{t\_1} + \left(x1 + \left(t\_9 - \left(t\_7 - t\_0 \cdot \left(t\_8 + t\_5 \cdot \left(3 + \frac{1}{\frac{\mathsf{fma}\left(x1, x1, 1\right)}{x1 - \mathsf{fma}\left(3, {x1}^{2}, 2 \cdot x2\right)}}\right)\right)\right)\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;{x1}^{4} \cdot \left(6 + \frac{\frac{9 + \left(\frac{-1 + -2 \cdot \left(-1 + 3 \cdot \left(3 - 2 \cdot x2\right)\right)}{x1} + 4 \cdot \left(2 \cdot x2 - 3\right)\right)}{x1} - 3}{x1}\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.5%
fma-define99.5%
clear-num99.5%
inv-pow99.5%
associate-*r*99.5%
fma-define99.5%
pow299.5%
Applied egg-rr99.5%
unpow-199.5%
Simplified99.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%
Simplified0.0%
Taylor expanded in x1 around -inf 100.0%
Final simplification99.6%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (- -1.0 (* x1 x1)))
(t_1 (* x1 (* x1 3.0)))
(t_2 (- (+ t_1 (* 2.0 x2)) x1))
(t_3 (/ t_2 t_0))
(t_4
(-
x1
(+
(* 3.0 (/ (- (- t_1 (* 2.0 x2)) x1) t_0))
(-
(-
(-
(* t_1 t_3)
(*
t_0
(+
(* (* x1 x1) (+ 6.0 (* 4.0 t_3)))
(* (* (* x1 2.0) (/ t_2 (+ (* x1 x1) 1.0))) (+ 3.0 t_3)))))
(* x1 (* x1 x1)))
x1)))))
(if (<= t_4 INFINITY)
t_4
(*
(pow x1 4.0)
(+
6.0
(/
(-
(/
(+
9.0
(+
(/ (+ -1.0 (* -2.0 (+ -1.0 (* 3.0 (- 3.0 (* 2.0 x2)))))) x1)
(* 4.0 (- (* 2.0 x2) 3.0))))
x1)
3.0)
x1))))))
double code(double x1, double x2) {
double t_0 = -1.0 - (x1 * x1);
double t_1 = x1 * (x1 * 3.0);
double t_2 = (t_1 + (2.0 * x2)) - x1;
double t_3 = t_2 / t_0;
double t_4 = x1 - ((3.0 * (((t_1 - (2.0 * x2)) - x1) / t_0)) + ((((t_1 * t_3) - (t_0 * (((x1 * x1) * (6.0 + (4.0 * t_3))) + (((x1 * 2.0) * (t_2 / ((x1 * x1) + 1.0))) * (3.0 + t_3))))) - (x1 * (x1 * x1))) - x1));
double tmp;
if (t_4 <= ((double) INFINITY)) {
tmp = t_4;
} else {
tmp = pow(x1, 4.0) * (6.0 + ((((9.0 + (((-1.0 + (-2.0 * (-1.0 + (3.0 * (3.0 - (2.0 * x2)))))) / x1) + (4.0 * ((2.0 * x2) - 3.0)))) / x1) - 3.0) / x1));
}
return tmp;
}
public static double code(double x1, double x2) {
double t_0 = -1.0 - (x1 * x1);
double t_1 = x1 * (x1 * 3.0);
double t_2 = (t_1 + (2.0 * x2)) - x1;
double t_3 = t_2 / t_0;
double t_4 = x1 - ((3.0 * (((t_1 - (2.0 * x2)) - x1) / t_0)) + ((((t_1 * t_3) - (t_0 * (((x1 * x1) * (6.0 + (4.0 * t_3))) + (((x1 * 2.0) * (t_2 / ((x1 * x1) + 1.0))) * (3.0 + t_3))))) - (x1 * (x1 * x1))) - x1));
double tmp;
if (t_4 <= Double.POSITIVE_INFINITY) {
tmp = t_4;
} else {
tmp = Math.pow(x1, 4.0) * (6.0 + ((((9.0 + (((-1.0 + (-2.0 * (-1.0 + (3.0 * (3.0 - (2.0 * x2)))))) / x1) + (4.0 * ((2.0 * x2) - 3.0)))) / x1) - 3.0) / x1));
}
return tmp;
}
def code(x1, x2): t_0 = -1.0 - (x1 * x1) t_1 = x1 * (x1 * 3.0) t_2 = (t_1 + (2.0 * x2)) - x1 t_3 = t_2 / t_0 t_4 = x1 - ((3.0 * (((t_1 - (2.0 * x2)) - x1) / t_0)) + ((((t_1 * t_3) - (t_0 * (((x1 * x1) * (6.0 + (4.0 * t_3))) + (((x1 * 2.0) * (t_2 / ((x1 * x1) + 1.0))) * (3.0 + t_3))))) - (x1 * (x1 * x1))) - x1)) tmp = 0 if t_4 <= math.inf: tmp = t_4 else: tmp = math.pow(x1, 4.0) * (6.0 + ((((9.0 + (((-1.0 + (-2.0 * (-1.0 + (3.0 * (3.0 - (2.0 * x2)))))) / x1) + (4.0 * ((2.0 * x2) - 3.0)))) / x1) - 3.0) / x1)) return tmp
function code(x1, x2) t_0 = Float64(-1.0 - Float64(x1 * x1)) t_1 = Float64(x1 * Float64(x1 * 3.0)) t_2 = Float64(Float64(t_1 + Float64(2.0 * x2)) - x1) t_3 = Float64(t_2 / t_0) t_4 = Float64(x1 - Float64(Float64(3.0 * Float64(Float64(Float64(t_1 - Float64(2.0 * x2)) - x1) / t_0)) + Float64(Float64(Float64(Float64(t_1 * t_3) - Float64(t_0 * Float64(Float64(Float64(x1 * x1) * Float64(6.0 + Float64(4.0 * t_3))) + Float64(Float64(Float64(x1 * 2.0) * Float64(t_2 / Float64(Float64(x1 * x1) + 1.0))) * Float64(3.0 + t_3))))) - Float64(x1 * Float64(x1 * x1))) - x1))) tmp = 0.0 if (t_4 <= Inf) tmp = t_4; else tmp = Float64((x1 ^ 4.0) * Float64(6.0 + Float64(Float64(Float64(Float64(9.0 + Float64(Float64(Float64(-1.0 + Float64(-2.0 * Float64(-1.0 + Float64(3.0 * Float64(3.0 - Float64(2.0 * x2)))))) / x1) + Float64(4.0 * Float64(Float64(2.0 * x2) - 3.0)))) / x1) - 3.0) / x1))); end return tmp end
function tmp_2 = code(x1, x2) t_0 = -1.0 - (x1 * x1); t_1 = x1 * (x1 * 3.0); t_2 = (t_1 + (2.0 * x2)) - x1; t_3 = t_2 / t_0; t_4 = x1 - ((3.0 * (((t_1 - (2.0 * x2)) - x1) / t_0)) + ((((t_1 * t_3) - (t_0 * (((x1 * x1) * (6.0 + (4.0 * t_3))) + (((x1 * 2.0) * (t_2 / ((x1 * x1) + 1.0))) * (3.0 + t_3))))) - (x1 * (x1 * x1))) - x1)); tmp = 0.0; if (t_4 <= Inf) tmp = t_4; else tmp = (x1 ^ 4.0) * (6.0 + ((((9.0 + (((-1.0 + (-2.0 * (-1.0 + (3.0 * (3.0 - (2.0 * x2)))))) / x1) + (4.0 * ((2.0 * x2) - 3.0)))) / x1) - 3.0) / x1)); end tmp_2 = tmp; end
code[x1_, x2_] := Block[{t$95$0 = N[(-1.0 - N[(x1 * x1), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(x1 * N[(x1 * 3.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(t$95$1 + N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision]}, Block[{t$95$3 = N[(t$95$2 / t$95$0), $MachinePrecision]}, Block[{t$95$4 = N[(x1 - N[(N[(3.0 * N[(N[(N[(t$95$1 - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$0), $MachinePrecision]), $MachinePrecision] + N[(N[(N[(N[(t$95$1 * t$95$3), $MachinePrecision] - N[(t$95$0 * N[(N[(N[(x1 * x1), $MachinePrecision] * N[(6.0 + N[(4.0 * t$95$3), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(N[(x1 * 2.0), $MachinePrecision] * N[(t$95$2 / N[(N[(x1 * x1), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(3.0 + t$95$3), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(x1 * N[(x1 * x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$4, Infinity], t$95$4, N[(N[Power[x1, 4.0], $MachinePrecision] * N[(6.0 + N[(N[(N[(N[(9.0 + N[(N[(N[(-1.0 + N[(-2.0 * N[(-1.0 + N[(3.0 * N[(3.0 - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / x1), $MachinePrecision] + N[(4.0 * N[(N[(2.0 * x2), $MachinePrecision] - 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / x1), $MachinePrecision] - 3.0), $MachinePrecision] / x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := -1 - x1 \cdot x1\\
t_1 := x1 \cdot \left(x1 \cdot 3\right)\\
t_2 := \left(t\_1 + 2 \cdot x2\right) - x1\\
t_3 := \frac{t\_2}{t\_0}\\
t_4 := x1 - \left(3 \cdot \frac{\left(t\_1 - 2 \cdot x2\right) - x1}{t\_0} + \left(\left(\left(t\_1 \cdot t\_3 - t\_0 \cdot \left(\left(x1 \cdot x1\right) \cdot \left(6 + 4 \cdot t\_3\right) + \left(\left(x1 \cdot 2\right) \cdot \frac{t\_2}{x1 \cdot x1 + 1}\right) \cdot \left(3 + t\_3\right)\right)\right) - x1 \cdot \left(x1 \cdot x1\right)\right) - x1\right)\right)\\
\mathbf{if}\;t\_4 \leq \infty:\\
\;\;\;\;t\_4\\
\mathbf{else}:\\
\;\;\;\;{x1}^{4} \cdot \left(6 + \frac{\frac{9 + \left(\frac{-1 + -2 \cdot \left(-1 + 3 \cdot \left(3 - 2 \cdot x2\right)\right)}{x1} + 4 \cdot \left(2 \cdot x2 - 3\right)\right)}{x1} - 3}{x1}\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.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%
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 (- (+ t_0 (* 2.0 x2)) x1))
(t_2 (- -1.0 (* x1 x1)))
(t_3 (/ t_1 t_2)))
(if (<= x1 -2e+103)
(* x1 (+ -1.0 (* x1 (+ 9.0 (* x1 -19.0)))))
(if (<= x1 5e+153)
(-
x1
(+
(* 3.0 (/ (- (- t_0 (* 2.0 x2)) x1) t_2))
(-
(-
(-
(* t_0 t_3)
(*
t_2
(+
(* (* x1 x1) (+ 6.0 (* 4.0 t_3)))
(* (* (* x1 2.0) (/ t_1 (+ (* x1 x1) 1.0))) (+ 3.0 t_3)))))
(* x1 (* x1 x1)))
x1)))
(+ (* x2 -6.0) (* x1 (+ -1.0 (* x1 9.0))))))))
double code(double x1, double x2) {
double t_0 = x1 * (x1 * 3.0);
double t_1 = (t_0 + (2.0 * x2)) - x1;
double t_2 = -1.0 - (x1 * x1);
double t_3 = t_1 / t_2;
double tmp;
if (x1 <= -2e+103) {
tmp = x1 * (-1.0 + (x1 * (9.0 + (x1 * -19.0))));
} else if (x1 <= 5e+153) {
tmp = x1 - ((3.0 * (((t_0 - (2.0 * x2)) - x1) / t_2)) + ((((t_0 * t_3) - (t_2 * (((x1 * x1) * (6.0 + (4.0 * t_3))) + (((x1 * 2.0) * (t_1 / ((x1 * x1) + 1.0))) * (3.0 + t_3))))) - (x1 * (x1 * x1))) - x1));
} else {
tmp = (x2 * -6.0) + (x1 * (-1.0 + (x1 * 9.0)));
}
return tmp;
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
real(8) :: t_0
real(8) :: t_1
real(8) :: t_2
real(8) :: t_3
real(8) :: tmp
t_0 = x1 * (x1 * 3.0d0)
t_1 = (t_0 + (2.0d0 * x2)) - x1
t_2 = (-1.0d0) - (x1 * x1)
t_3 = t_1 / t_2
if (x1 <= (-2d+103)) then
tmp = x1 * ((-1.0d0) + (x1 * (9.0d0 + (x1 * (-19.0d0)))))
else if (x1 <= 5d+153) then
tmp = x1 - ((3.0d0 * (((t_0 - (2.0d0 * x2)) - x1) / t_2)) + ((((t_0 * t_3) - (t_2 * (((x1 * x1) * (6.0d0 + (4.0d0 * t_3))) + (((x1 * 2.0d0) * (t_1 / ((x1 * x1) + 1.0d0))) * (3.0d0 + t_3))))) - (x1 * (x1 * x1))) - x1))
else
tmp = (x2 * (-6.0d0)) + (x1 * ((-1.0d0) + (x1 * 9.0d0)))
end if
code = tmp
end function
public static double code(double x1, double x2) {
double t_0 = x1 * (x1 * 3.0);
double t_1 = (t_0 + (2.0 * x2)) - x1;
double t_2 = -1.0 - (x1 * x1);
double t_3 = t_1 / t_2;
double tmp;
if (x1 <= -2e+103) {
tmp = x1 * (-1.0 + (x1 * (9.0 + (x1 * -19.0))));
} else if (x1 <= 5e+153) {
tmp = x1 - ((3.0 * (((t_0 - (2.0 * x2)) - x1) / t_2)) + ((((t_0 * t_3) - (t_2 * (((x1 * x1) * (6.0 + (4.0 * t_3))) + (((x1 * 2.0) * (t_1 / ((x1 * x1) + 1.0))) * (3.0 + t_3))))) - (x1 * (x1 * x1))) - x1));
} else {
tmp = (x2 * -6.0) + (x1 * (-1.0 + (x1 * 9.0)));
}
return tmp;
}
def code(x1, x2): t_0 = x1 * (x1 * 3.0) t_1 = (t_0 + (2.0 * x2)) - x1 t_2 = -1.0 - (x1 * x1) t_3 = t_1 / t_2 tmp = 0 if x1 <= -2e+103: tmp = x1 * (-1.0 + (x1 * (9.0 + (x1 * -19.0)))) elif x1 <= 5e+153: tmp = x1 - ((3.0 * (((t_0 - (2.0 * x2)) - x1) / t_2)) + ((((t_0 * t_3) - (t_2 * (((x1 * x1) * (6.0 + (4.0 * t_3))) + (((x1 * 2.0) * (t_1 / ((x1 * x1) + 1.0))) * (3.0 + t_3))))) - (x1 * (x1 * x1))) - x1)) else: tmp = (x2 * -6.0) + (x1 * (-1.0 + (x1 * 9.0))) return tmp
function code(x1, x2) t_0 = Float64(x1 * Float64(x1 * 3.0)) t_1 = Float64(Float64(t_0 + Float64(2.0 * x2)) - x1) t_2 = Float64(-1.0 - Float64(x1 * x1)) t_3 = Float64(t_1 / t_2) tmp = 0.0 if (x1 <= -2e+103) tmp = Float64(x1 * Float64(-1.0 + Float64(x1 * Float64(9.0 + Float64(x1 * -19.0))))); elseif (x1 <= 5e+153) tmp = Float64(x1 - Float64(Float64(3.0 * Float64(Float64(Float64(t_0 - Float64(2.0 * x2)) - x1) / t_2)) + Float64(Float64(Float64(Float64(t_0 * t_3) - Float64(t_2 * Float64(Float64(Float64(x1 * x1) * Float64(6.0 + Float64(4.0 * t_3))) + Float64(Float64(Float64(x1 * 2.0) * Float64(t_1 / Float64(Float64(x1 * x1) + 1.0))) * Float64(3.0 + t_3))))) - Float64(x1 * Float64(x1 * x1))) - x1))); else tmp = Float64(Float64(x2 * -6.0) + Float64(x1 * Float64(-1.0 + Float64(x1 * 9.0)))); end return tmp end
function tmp_2 = code(x1, x2) t_0 = x1 * (x1 * 3.0); t_1 = (t_0 + (2.0 * x2)) - x1; t_2 = -1.0 - (x1 * x1); t_3 = t_1 / t_2; tmp = 0.0; if (x1 <= -2e+103) tmp = x1 * (-1.0 + (x1 * (9.0 + (x1 * -19.0)))); elseif (x1 <= 5e+153) tmp = x1 - ((3.0 * (((t_0 - (2.0 * x2)) - x1) / t_2)) + ((((t_0 * t_3) - (t_2 * (((x1 * x1) * (6.0 + (4.0 * t_3))) + (((x1 * 2.0) * (t_1 / ((x1 * x1) + 1.0))) * (3.0 + t_3))))) - (x1 * (x1 * x1))) - x1)); else tmp = (x2 * -6.0) + (x1 * (-1.0 + (x1 * 9.0))); end tmp_2 = tmp; end
code[x1_, x2_] := Block[{t$95$0 = N[(x1 * N[(x1 * 3.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(N[(t$95$0 + N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision]}, Block[{t$95$2 = N[(-1.0 - N[(x1 * x1), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(t$95$1 / t$95$2), $MachinePrecision]}, If[LessEqual[x1, -2e+103], N[(x1 * N[(-1.0 + N[(x1 * N[(9.0 + N[(x1 * -19.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 5e+153], N[(x1 - N[(N[(3.0 * N[(N[(N[(t$95$0 - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$2), $MachinePrecision]), $MachinePrecision] + N[(N[(N[(N[(t$95$0 * t$95$3), $MachinePrecision] - N[(t$95$2 * N[(N[(N[(x1 * x1), $MachinePrecision] * N[(6.0 + N[(4.0 * t$95$3), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(N[(x1 * 2.0), $MachinePrecision] * N[(t$95$1 / N[(N[(x1 * x1), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(3.0 + t$95$3), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(x1 * N[(x1 * x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x2 * -6.0), $MachinePrecision] + N[(x1 * N[(-1.0 + N[(x1 * 9.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x1 \cdot \left(x1 \cdot 3\right)\\
t_1 := \left(t\_0 + 2 \cdot x2\right) - x1\\
t_2 := -1 - x1 \cdot x1\\
t_3 := \frac{t\_1}{t\_2}\\
\mathbf{if}\;x1 \leq -2 \cdot 10^{+103}:\\
\;\;\;\;x1 \cdot \left(-1 + x1 \cdot \left(9 + x1 \cdot -19\right)\right)\\
\mathbf{elif}\;x1 \leq 5 \cdot 10^{+153}:\\
\;\;\;\;x1 - \left(3 \cdot \frac{\left(t\_0 - 2 \cdot x2\right) - x1}{t\_2} + \left(\left(\left(t\_0 \cdot t\_3 - t\_2 \cdot \left(\left(x1 \cdot x1\right) \cdot \left(6 + 4 \cdot t\_3\right) + \left(\left(x1 \cdot 2\right) \cdot \frac{t\_1}{x1 \cdot x1 + 1}\right) \cdot \left(3 + t\_3\right)\right)\right) - x1 \cdot \left(x1 \cdot x1\right)\right) - x1\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x2 \cdot -6 + x1 \cdot \left(-1 + x1 \cdot 9\right)\\
\end{array}
\end{array}
if x1 < -2e103Initial program 0.0%
Simplified0.0%
Taylor expanded in x1 around 0 80.0%
Taylor expanded in x2 around 0 100.0%
*-commutative100.0%
Simplified100.0%
Taylor expanded in x2 around 0 100.0%
if -2e103 < x1 < 5.00000000000000018e153Initial program 99.5%
if 5.00000000000000018e153 < x1 Initial program 0.0%
Simplified0.0%
Taylor expanded in x1 around 0 0.0%
Taylor expanded in x2 around 0 0.0%
*-commutative0.0%
Simplified0.0%
Taylor expanded in x1 around 0 100.0%
*-commutative100.0%
Simplified100.0%
Final simplification99.6%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (* x1 (* x1 3.0)))
(t_1 (* x1 (* x1 x1)))
(t_2 (- -1.0 (* x1 x1)))
(t_3 (- (+ t_0 (* 2.0 x2)) x1))
(t_4 (/ t_3 t_2))
(t_5
(+
x1
(+
(+
x1
(+
t_1
(+
(*
t_2
(+
(* (* x1 x1) (+ 6.0 (* 4.0 t_4)))
(* (* (* x1 2.0) (/ t_3 (+ (* x1 x1) 1.0))) (+ 3.0 t_4))))
(* t_0 (+ 3.0 (/ -1.0 x1))))))
(* 3.0 (/ 1.0 (/ -0.5 x2)))))))
(if (<= x1 -5.5e+102)
(* x1 (+ -1.0 (* x1 (+ 9.0 (* x1 -19.0)))))
(if (<= x1 -5.1e-8)
t_5
(if (<= x1 5e-81)
(-
x1
(+
(* 3.0 (/ (- (- t_0 (* 2.0 x2)) x1) t_2))
(-
(-
(+ (* t_0 t_4) (* (* x2 (+ (* x1 -12.0) (* 8.0 (* x1 x2)))) t_2))
t_1)
x1)))
(if (<= x1 5e+153)
t_5
(+ (* x2 -6.0) (* x1 (+ -1.0 (* x1 9.0))))))))))
double code(double x1, double x2) {
double t_0 = x1 * (x1 * 3.0);
double t_1 = x1 * (x1 * x1);
double t_2 = -1.0 - (x1 * x1);
double t_3 = (t_0 + (2.0 * x2)) - x1;
double t_4 = t_3 / t_2;
double t_5 = x1 + ((x1 + (t_1 + ((t_2 * (((x1 * x1) * (6.0 + (4.0 * t_4))) + (((x1 * 2.0) * (t_3 / ((x1 * x1) + 1.0))) * (3.0 + t_4)))) + (t_0 * (3.0 + (-1.0 / x1)))))) + (3.0 * (1.0 / (-0.5 / x2))));
double tmp;
if (x1 <= -5.5e+102) {
tmp = x1 * (-1.0 + (x1 * (9.0 + (x1 * -19.0))));
} else if (x1 <= -5.1e-8) {
tmp = t_5;
} else if (x1 <= 5e-81) {
tmp = x1 - ((3.0 * (((t_0 - (2.0 * x2)) - x1) / t_2)) + ((((t_0 * t_4) + ((x2 * ((x1 * -12.0) + (8.0 * (x1 * x2)))) * t_2)) - t_1) - x1));
} else if (x1 <= 5e+153) {
tmp = t_5;
} else {
tmp = (x2 * -6.0) + (x1 * (-1.0 + (x1 * 9.0)));
}
return tmp;
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
real(8) :: t_0
real(8) :: t_1
real(8) :: t_2
real(8) :: t_3
real(8) :: t_4
real(8) :: t_5
real(8) :: tmp
t_0 = x1 * (x1 * 3.0d0)
t_1 = x1 * (x1 * x1)
t_2 = (-1.0d0) - (x1 * x1)
t_3 = (t_0 + (2.0d0 * x2)) - x1
t_4 = t_3 / t_2
t_5 = x1 + ((x1 + (t_1 + ((t_2 * (((x1 * x1) * (6.0d0 + (4.0d0 * t_4))) + (((x1 * 2.0d0) * (t_3 / ((x1 * x1) + 1.0d0))) * (3.0d0 + t_4)))) + (t_0 * (3.0d0 + ((-1.0d0) / x1)))))) + (3.0d0 * (1.0d0 / ((-0.5d0) / x2))))
if (x1 <= (-5.5d+102)) then
tmp = x1 * ((-1.0d0) + (x1 * (9.0d0 + (x1 * (-19.0d0)))))
else if (x1 <= (-5.1d-8)) then
tmp = t_5
else if (x1 <= 5d-81) then
tmp = x1 - ((3.0d0 * (((t_0 - (2.0d0 * x2)) - x1) / t_2)) + ((((t_0 * t_4) + ((x2 * ((x1 * (-12.0d0)) + (8.0d0 * (x1 * x2)))) * t_2)) - t_1) - x1))
else if (x1 <= 5d+153) then
tmp = t_5
else
tmp = (x2 * (-6.0d0)) + (x1 * ((-1.0d0) + (x1 * 9.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 * x1);
double t_2 = -1.0 - (x1 * x1);
double t_3 = (t_0 + (2.0 * x2)) - x1;
double t_4 = t_3 / t_2;
double t_5 = x1 + ((x1 + (t_1 + ((t_2 * (((x1 * x1) * (6.0 + (4.0 * t_4))) + (((x1 * 2.0) * (t_3 / ((x1 * x1) + 1.0))) * (3.0 + t_4)))) + (t_0 * (3.0 + (-1.0 / x1)))))) + (3.0 * (1.0 / (-0.5 / x2))));
double tmp;
if (x1 <= -5.5e+102) {
tmp = x1 * (-1.0 + (x1 * (9.0 + (x1 * -19.0))));
} else if (x1 <= -5.1e-8) {
tmp = t_5;
} else if (x1 <= 5e-81) {
tmp = x1 - ((3.0 * (((t_0 - (2.0 * x2)) - x1) / t_2)) + ((((t_0 * t_4) + ((x2 * ((x1 * -12.0) + (8.0 * (x1 * x2)))) * t_2)) - t_1) - x1));
} else if (x1 <= 5e+153) {
tmp = t_5;
} else {
tmp = (x2 * -6.0) + (x1 * (-1.0 + (x1 * 9.0)));
}
return tmp;
}
def code(x1, x2): t_0 = x1 * (x1 * 3.0) t_1 = x1 * (x1 * x1) t_2 = -1.0 - (x1 * x1) t_3 = (t_0 + (2.0 * x2)) - x1 t_4 = t_3 / t_2 t_5 = x1 + ((x1 + (t_1 + ((t_2 * (((x1 * x1) * (6.0 + (4.0 * t_4))) + (((x1 * 2.0) * (t_3 / ((x1 * x1) + 1.0))) * (3.0 + t_4)))) + (t_0 * (3.0 + (-1.0 / x1)))))) + (3.0 * (1.0 / (-0.5 / x2)))) tmp = 0 if x1 <= -5.5e+102: tmp = x1 * (-1.0 + (x1 * (9.0 + (x1 * -19.0)))) elif x1 <= -5.1e-8: tmp = t_5 elif x1 <= 5e-81: tmp = x1 - ((3.0 * (((t_0 - (2.0 * x2)) - x1) / t_2)) + ((((t_0 * t_4) + ((x2 * ((x1 * -12.0) + (8.0 * (x1 * x2)))) * t_2)) - t_1) - x1)) elif x1 <= 5e+153: tmp = t_5 else: tmp = (x2 * -6.0) + (x1 * (-1.0 + (x1 * 9.0))) return tmp
function code(x1, x2) t_0 = Float64(x1 * Float64(x1 * 3.0)) t_1 = Float64(x1 * Float64(x1 * x1)) t_2 = Float64(-1.0 - Float64(x1 * x1)) t_3 = Float64(Float64(t_0 + Float64(2.0 * x2)) - x1) t_4 = Float64(t_3 / t_2) t_5 = Float64(x1 + Float64(Float64(x1 + Float64(t_1 + Float64(Float64(t_2 * Float64(Float64(Float64(x1 * x1) * Float64(6.0 + Float64(4.0 * t_4))) + Float64(Float64(Float64(x1 * 2.0) * Float64(t_3 / Float64(Float64(x1 * x1) + 1.0))) * Float64(3.0 + t_4)))) + Float64(t_0 * Float64(3.0 + Float64(-1.0 / x1)))))) + Float64(3.0 * Float64(1.0 / Float64(-0.5 / x2))))) tmp = 0.0 if (x1 <= -5.5e+102) tmp = Float64(x1 * Float64(-1.0 + Float64(x1 * Float64(9.0 + Float64(x1 * -19.0))))); elseif (x1 <= -5.1e-8) tmp = t_5; elseif (x1 <= 5e-81) tmp = Float64(x1 - Float64(Float64(3.0 * Float64(Float64(Float64(t_0 - Float64(2.0 * x2)) - x1) / t_2)) + Float64(Float64(Float64(Float64(t_0 * t_4) + Float64(Float64(x2 * Float64(Float64(x1 * -12.0) + Float64(8.0 * Float64(x1 * x2)))) * t_2)) - t_1) - x1))); elseif (x1 <= 5e+153) tmp = t_5; else tmp = Float64(Float64(x2 * -6.0) + Float64(x1 * Float64(-1.0 + Float64(x1 * 9.0)))); end return tmp end
function tmp_2 = code(x1, x2) t_0 = x1 * (x1 * 3.0); t_1 = x1 * (x1 * x1); t_2 = -1.0 - (x1 * x1); t_3 = (t_0 + (2.0 * x2)) - x1; t_4 = t_3 / t_2; t_5 = x1 + ((x1 + (t_1 + ((t_2 * (((x1 * x1) * (6.0 + (4.0 * t_4))) + (((x1 * 2.0) * (t_3 / ((x1 * x1) + 1.0))) * (3.0 + t_4)))) + (t_0 * (3.0 + (-1.0 / x1)))))) + (3.0 * (1.0 / (-0.5 / x2)))); tmp = 0.0; if (x1 <= -5.5e+102) tmp = x1 * (-1.0 + (x1 * (9.0 + (x1 * -19.0)))); elseif (x1 <= -5.1e-8) tmp = t_5; elseif (x1 <= 5e-81) tmp = x1 - ((3.0 * (((t_0 - (2.0 * x2)) - x1) / t_2)) + ((((t_0 * t_4) + ((x2 * ((x1 * -12.0) + (8.0 * (x1 * x2)))) * t_2)) - t_1) - x1)); elseif (x1 <= 5e+153) tmp = t_5; else tmp = (x2 * -6.0) + (x1 * (-1.0 + (x1 * 9.0))); end tmp_2 = tmp; end
code[x1_, x2_] := Block[{t$95$0 = N[(x1 * N[(x1 * 3.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(x1 * N[(x1 * x1), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(-1.0 - N[(x1 * x1), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[(t$95$0 + N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision]}, Block[{t$95$4 = N[(t$95$3 / t$95$2), $MachinePrecision]}, Block[{t$95$5 = N[(x1 + N[(N[(x1 + N[(t$95$1 + N[(N[(t$95$2 * N[(N[(N[(x1 * x1), $MachinePrecision] * N[(6.0 + N[(4.0 * t$95$4), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(N[(x1 * 2.0), $MachinePrecision] * N[(t$95$3 / N[(N[(x1 * x1), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(3.0 + t$95$4), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(t$95$0 * N[(3.0 + N[(-1.0 / x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(3.0 * N[(1.0 / N[(-0.5 / x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x1, -5.5e+102], N[(x1 * N[(-1.0 + N[(x1 * N[(9.0 + N[(x1 * -19.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, -5.1e-8], t$95$5, If[LessEqual[x1, 5e-81], N[(x1 - N[(N[(3.0 * N[(N[(N[(t$95$0 - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$2), $MachinePrecision]), $MachinePrecision] + N[(N[(N[(N[(t$95$0 * t$95$4), $MachinePrecision] + N[(N[(x2 * N[(N[(x1 * -12.0), $MachinePrecision] + N[(8.0 * N[(x1 * x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * t$95$2), $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision] - x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 5e+153], t$95$5, N[(N[(x2 * -6.0), $MachinePrecision] + N[(x1 * N[(-1.0 + N[(x1 * 9.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x1 \cdot \left(x1 \cdot 3\right)\\
t_1 := x1 \cdot \left(x1 \cdot x1\right)\\
t_2 := -1 - x1 \cdot x1\\
t_3 := \left(t\_0 + 2 \cdot x2\right) - x1\\
t_4 := \frac{t\_3}{t\_2}\\
t_5 := x1 + \left(\left(x1 + \left(t\_1 + \left(t\_2 \cdot \left(\left(x1 \cdot x1\right) \cdot \left(6 + 4 \cdot t\_4\right) + \left(\left(x1 \cdot 2\right) \cdot \frac{t\_3}{x1 \cdot x1 + 1}\right) \cdot \left(3 + t\_4\right)\right) + t\_0 \cdot \left(3 + \frac{-1}{x1}\right)\right)\right)\right) + 3 \cdot \frac{1}{\frac{-0.5}{x2}}\right)\\
\mathbf{if}\;x1 \leq -5.5 \cdot 10^{+102}:\\
\;\;\;\;x1 \cdot \left(-1 + x1 \cdot \left(9 + x1 \cdot -19\right)\right)\\
\mathbf{elif}\;x1 \leq -5.1 \cdot 10^{-8}:\\
\;\;\;\;t\_5\\
\mathbf{elif}\;x1 \leq 5 \cdot 10^{-81}:\\
\;\;\;\;x1 - \left(3 \cdot \frac{\left(t\_0 - 2 \cdot x2\right) - x1}{t\_2} + \left(\left(\left(t\_0 \cdot t\_4 + \left(x2 \cdot \left(x1 \cdot -12 + 8 \cdot \left(x1 \cdot x2\right)\right)\right) \cdot t\_2\right) - t\_1\right) - x1\right)\right)\\
\mathbf{elif}\;x1 \leq 5 \cdot 10^{+153}:\\
\;\;\;\;t\_5\\
\mathbf{else}:\\
\;\;\;\;x2 \cdot -6 + x1 \cdot \left(-1 + x1 \cdot 9\right)\\
\end{array}
\end{array}
if x1 < -5.49999999999999981e102Initial program 0.0%
Simplified0.0%
Taylor expanded in x1 around 0 80.0%
Taylor expanded in x2 around 0 100.0%
*-commutative100.0%
Simplified100.0%
Taylor expanded in x2 around 0 100.0%
if -5.49999999999999981e102 < x1 < -5.10000000000000001e-8 or 4.99999999999999981e-81 < x1 < 5.00000000000000018e153Initial program 99.5%
fma-define99.5%
clear-num99.5%
inv-pow99.5%
associate--l-99.5%
associate-*r*99.5%
fma-undefine99.5%
fma-neg99.5%
pow299.5%
Applied egg-rr99.5%
unpow-199.5%
fma-undefine99.5%
unsub-neg99.5%
Simplified99.5%
Taylor expanded in x1 around 0 86.8%
Taylor expanded in x1 around inf 99.5%
if -5.10000000000000001e-8 < x1 < 4.99999999999999981e-81Initial program 99.5%
Taylor expanded in x1 around 0 99.5%
+-commutative99.5%
mul-1-neg99.5%
unsub-neg99.5%
Simplified99.5%
Taylor expanded in x1 around 0 90.0%
Taylor expanded in x2 around 0 99.5%
if 5.00000000000000018e153 < x1 Initial program 0.0%
Simplified0.0%
Taylor expanded in x1 around 0 0.0%
Taylor expanded in x2 around 0 0.0%
*-commutative0.0%
Simplified0.0%
Taylor expanded in x1 around 0 100.0%
*-commutative100.0%
Simplified100.0%
Final simplification99.6%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (- -1.0 (* x1 x1)))
(t_1 (* x1 (* x1 x1)))
(t_2 (* x1 (* x1 3.0)))
(t_3 (- (+ t_2 (* 2.0 x2)) x1))
(t_4 (/ t_3 t_0))
(t_5 (+ (* x1 x1) 1.0))
(t_6 (/ t_3 t_5)))
(if (<= x1 -5e+102)
(* x1 (+ -1.0 (* x1 (+ 9.0 (* x1 -19.0)))))
(if (<= x1 -7.8e+23)
(+
x1
(+
(+
x1
(-
t_1
(-
(* t_2 t_4)
(* t_0 (- (* (* (* x1 2.0) t_6) (+ 3.0 t_4)) (* (* x1 x1) 6.0))))))
(* 3.0 (/ 1.0 (/ -0.5 x2)))))
(if (<= x1 5.4e+25)
(-
x1
(-
(* 3.0 (/ (- (- t_2 (* 2.0 x2)) x1) t_0))
(+
x1
(+
t_1
(+
(*
t_5
(+
(* (* x1 x1) (- (* t_6 4.0) 6.0))
(* (* (* x1 2.0) (* 2.0 x2)) (- (- (* 2.0 x2) x1) 3.0))))
(* 3.0 t_2))))))
(if (<= x1 5e+153)
(-
x1
(-
(* 3.0 (/ -1.0 (/ -0.5 x2)))
(+
x1
(+
t_1
(-
(* t_2 t_6)
(*
(-
(* (- t_6 3.0) (* (* x1 2.0) 3.0))
(* (* x1 x1) (+ 6.0 (* 4.0 t_4))))
t_0))))))
(+ (* x2 -6.0) (* x1 (+ -1.0 (* x1 9.0))))))))))
double code(double x1, double x2) {
double t_0 = -1.0 - (x1 * x1);
double t_1 = x1 * (x1 * x1);
double t_2 = x1 * (x1 * 3.0);
double t_3 = (t_2 + (2.0 * x2)) - x1;
double t_4 = t_3 / t_0;
double t_5 = (x1 * x1) + 1.0;
double t_6 = t_3 / t_5;
double tmp;
if (x1 <= -5e+102) {
tmp = x1 * (-1.0 + (x1 * (9.0 + (x1 * -19.0))));
} else if (x1 <= -7.8e+23) {
tmp = x1 + ((x1 + (t_1 - ((t_2 * t_4) - (t_0 * ((((x1 * 2.0) * t_6) * (3.0 + t_4)) - ((x1 * x1) * 6.0)))))) + (3.0 * (1.0 / (-0.5 / x2))));
} else if (x1 <= 5.4e+25) {
tmp = x1 - ((3.0 * (((t_2 - (2.0 * x2)) - x1) / t_0)) - (x1 + (t_1 + ((t_5 * (((x1 * x1) * ((t_6 * 4.0) - 6.0)) + (((x1 * 2.0) * (2.0 * x2)) * (((2.0 * x2) - x1) - 3.0)))) + (3.0 * t_2)))));
} else if (x1 <= 5e+153) {
tmp = x1 - ((3.0 * (-1.0 / (-0.5 / x2))) - (x1 + (t_1 + ((t_2 * t_6) - ((((t_6 - 3.0) * ((x1 * 2.0) * 3.0)) - ((x1 * x1) * (6.0 + (4.0 * t_4)))) * t_0)))));
} else {
tmp = (x2 * -6.0) + (x1 * (-1.0 + (x1 * 9.0)));
}
return tmp;
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
real(8) :: t_0
real(8) :: t_1
real(8) :: t_2
real(8) :: t_3
real(8) :: t_4
real(8) :: t_5
real(8) :: t_6
real(8) :: tmp
t_0 = (-1.0d0) - (x1 * x1)
t_1 = x1 * (x1 * x1)
t_2 = x1 * (x1 * 3.0d0)
t_3 = (t_2 + (2.0d0 * x2)) - x1
t_4 = t_3 / t_0
t_5 = (x1 * x1) + 1.0d0
t_6 = t_3 / t_5
if (x1 <= (-5d+102)) then
tmp = x1 * ((-1.0d0) + (x1 * (9.0d0 + (x1 * (-19.0d0)))))
else if (x1 <= (-7.8d+23)) then
tmp = x1 + ((x1 + (t_1 - ((t_2 * t_4) - (t_0 * ((((x1 * 2.0d0) * t_6) * (3.0d0 + t_4)) - ((x1 * x1) * 6.0d0)))))) + (3.0d0 * (1.0d0 / ((-0.5d0) / x2))))
else if (x1 <= 5.4d+25) then
tmp = x1 - ((3.0d0 * (((t_2 - (2.0d0 * x2)) - x1) / t_0)) - (x1 + (t_1 + ((t_5 * (((x1 * x1) * ((t_6 * 4.0d0) - 6.0d0)) + (((x1 * 2.0d0) * (2.0d0 * x2)) * (((2.0d0 * x2) - x1) - 3.0d0)))) + (3.0d0 * t_2)))))
else if (x1 <= 5d+153) then
tmp = x1 - ((3.0d0 * ((-1.0d0) / ((-0.5d0) / x2))) - (x1 + (t_1 + ((t_2 * t_6) - ((((t_6 - 3.0d0) * ((x1 * 2.0d0) * 3.0d0)) - ((x1 * x1) * (6.0d0 + (4.0d0 * t_4)))) * t_0)))))
else
tmp = (x2 * (-6.0d0)) + (x1 * ((-1.0d0) + (x1 * 9.0d0)))
end if
code = tmp
end function
public static double code(double x1, double x2) {
double t_0 = -1.0 - (x1 * x1);
double t_1 = x1 * (x1 * x1);
double t_2 = x1 * (x1 * 3.0);
double t_3 = (t_2 + (2.0 * x2)) - x1;
double t_4 = t_3 / t_0;
double t_5 = (x1 * x1) + 1.0;
double t_6 = t_3 / t_5;
double tmp;
if (x1 <= -5e+102) {
tmp = x1 * (-1.0 + (x1 * (9.0 + (x1 * -19.0))));
} else if (x1 <= -7.8e+23) {
tmp = x1 + ((x1 + (t_1 - ((t_2 * t_4) - (t_0 * ((((x1 * 2.0) * t_6) * (3.0 + t_4)) - ((x1 * x1) * 6.0)))))) + (3.0 * (1.0 / (-0.5 / x2))));
} else if (x1 <= 5.4e+25) {
tmp = x1 - ((3.0 * (((t_2 - (2.0 * x2)) - x1) / t_0)) - (x1 + (t_1 + ((t_5 * (((x1 * x1) * ((t_6 * 4.0) - 6.0)) + (((x1 * 2.0) * (2.0 * x2)) * (((2.0 * x2) - x1) - 3.0)))) + (3.0 * t_2)))));
} else if (x1 <= 5e+153) {
tmp = x1 - ((3.0 * (-1.0 / (-0.5 / x2))) - (x1 + (t_1 + ((t_2 * t_6) - ((((t_6 - 3.0) * ((x1 * 2.0) * 3.0)) - ((x1 * x1) * (6.0 + (4.0 * t_4)))) * t_0)))));
} else {
tmp = (x2 * -6.0) + (x1 * (-1.0 + (x1 * 9.0)));
}
return tmp;
}
def code(x1, x2): t_0 = -1.0 - (x1 * x1) t_1 = x1 * (x1 * x1) t_2 = x1 * (x1 * 3.0) t_3 = (t_2 + (2.0 * x2)) - x1 t_4 = t_3 / t_0 t_5 = (x1 * x1) + 1.0 t_6 = t_3 / t_5 tmp = 0 if x1 <= -5e+102: tmp = x1 * (-1.0 + (x1 * (9.0 + (x1 * -19.0)))) elif x1 <= -7.8e+23: tmp = x1 + ((x1 + (t_1 - ((t_2 * t_4) - (t_0 * ((((x1 * 2.0) * t_6) * (3.0 + t_4)) - ((x1 * x1) * 6.0)))))) + (3.0 * (1.0 / (-0.5 / x2)))) elif x1 <= 5.4e+25: tmp = x1 - ((3.0 * (((t_2 - (2.0 * x2)) - x1) / t_0)) - (x1 + (t_1 + ((t_5 * (((x1 * x1) * ((t_6 * 4.0) - 6.0)) + (((x1 * 2.0) * (2.0 * x2)) * (((2.0 * x2) - x1) - 3.0)))) + (3.0 * t_2))))) elif x1 <= 5e+153: tmp = x1 - ((3.0 * (-1.0 / (-0.5 / x2))) - (x1 + (t_1 + ((t_2 * t_6) - ((((t_6 - 3.0) * ((x1 * 2.0) * 3.0)) - ((x1 * x1) * (6.0 + (4.0 * t_4)))) * t_0))))) else: tmp = (x2 * -6.0) + (x1 * (-1.0 + (x1 * 9.0))) return tmp
function code(x1, x2) t_0 = Float64(-1.0 - Float64(x1 * x1)) t_1 = Float64(x1 * Float64(x1 * x1)) t_2 = Float64(x1 * Float64(x1 * 3.0)) t_3 = Float64(Float64(t_2 + Float64(2.0 * x2)) - x1) t_4 = Float64(t_3 / t_0) t_5 = Float64(Float64(x1 * x1) + 1.0) t_6 = Float64(t_3 / t_5) tmp = 0.0 if (x1 <= -5e+102) tmp = Float64(x1 * Float64(-1.0 + Float64(x1 * Float64(9.0 + Float64(x1 * -19.0))))); elseif (x1 <= -7.8e+23) tmp = Float64(x1 + Float64(Float64(x1 + Float64(t_1 - Float64(Float64(t_2 * t_4) - Float64(t_0 * Float64(Float64(Float64(Float64(x1 * 2.0) * t_6) * Float64(3.0 + t_4)) - Float64(Float64(x1 * x1) * 6.0)))))) + Float64(3.0 * Float64(1.0 / Float64(-0.5 / x2))))); elseif (x1 <= 5.4e+25) tmp = Float64(x1 - Float64(Float64(3.0 * Float64(Float64(Float64(t_2 - Float64(2.0 * x2)) - x1) / t_0)) - Float64(x1 + Float64(t_1 + Float64(Float64(t_5 * Float64(Float64(Float64(x1 * x1) * Float64(Float64(t_6 * 4.0) - 6.0)) + Float64(Float64(Float64(x1 * 2.0) * Float64(2.0 * x2)) * Float64(Float64(Float64(2.0 * x2) - x1) - 3.0)))) + Float64(3.0 * t_2)))))); elseif (x1 <= 5e+153) tmp = Float64(x1 - Float64(Float64(3.0 * Float64(-1.0 / Float64(-0.5 / x2))) - Float64(x1 + Float64(t_1 + Float64(Float64(t_2 * t_6) - Float64(Float64(Float64(Float64(t_6 - 3.0) * Float64(Float64(x1 * 2.0) * 3.0)) - Float64(Float64(x1 * x1) * Float64(6.0 + Float64(4.0 * t_4)))) * t_0)))))); else tmp = Float64(Float64(x2 * -6.0) + Float64(x1 * Float64(-1.0 + Float64(x1 * 9.0)))); end return tmp end
function tmp_2 = code(x1, x2) t_0 = -1.0 - (x1 * x1); t_1 = x1 * (x1 * x1); t_2 = x1 * (x1 * 3.0); t_3 = (t_2 + (2.0 * x2)) - x1; t_4 = t_3 / t_0; t_5 = (x1 * x1) + 1.0; t_6 = t_3 / t_5; tmp = 0.0; if (x1 <= -5e+102) tmp = x1 * (-1.0 + (x1 * (9.0 + (x1 * -19.0)))); elseif (x1 <= -7.8e+23) tmp = x1 + ((x1 + (t_1 - ((t_2 * t_4) - (t_0 * ((((x1 * 2.0) * t_6) * (3.0 + t_4)) - ((x1 * x1) * 6.0)))))) + (3.0 * (1.0 / (-0.5 / x2)))); elseif (x1 <= 5.4e+25) tmp = x1 - ((3.0 * (((t_2 - (2.0 * x2)) - x1) / t_0)) - (x1 + (t_1 + ((t_5 * (((x1 * x1) * ((t_6 * 4.0) - 6.0)) + (((x1 * 2.0) * (2.0 * x2)) * (((2.0 * x2) - x1) - 3.0)))) + (3.0 * t_2))))); elseif (x1 <= 5e+153) tmp = x1 - ((3.0 * (-1.0 / (-0.5 / x2))) - (x1 + (t_1 + ((t_2 * t_6) - ((((t_6 - 3.0) * ((x1 * 2.0) * 3.0)) - ((x1 * x1) * (6.0 + (4.0 * t_4)))) * t_0))))); else tmp = (x2 * -6.0) + (x1 * (-1.0 + (x1 * 9.0))); end tmp_2 = tmp; end
code[x1_, x2_] := Block[{t$95$0 = N[(-1.0 - N[(x1 * x1), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(x1 * N[(x1 * x1), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x1 * N[(x1 * 3.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[(t$95$2 + N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision]}, Block[{t$95$4 = N[(t$95$3 / t$95$0), $MachinePrecision]}, Block[{t$95$5 = N[(N[(x1 * x1), $MachinePrecision] + 1.0), $MachinePrecision]}, Block[{t$95$6 = N[(t$95$3 / t$95$5), $MachinePrecision]}, If[LessEqual[x1, -5e+102], N[(x1 * N[(-1.0 + N[(x1 * N[(9.0 + N[(x1 * -19.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, -7.8e+23], N[(x1 + N[(N[(x1 + N[(t$95$1 - N[(N[(t$95$2 * t$95$4), $MachinePrecision] - N[(t$95$0 * N[(N[(N[(N[(x1 * 2.0), $MachinePrecision] * t$95$6), $MachinePrecision] * N[(3.0 + t$95$4), $MachinePrecision]), $MachinePrecision] - N[(N[(x1 * x1), $MachinePrecision] * 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(3.0 * N[(1.0 / N[(-0.5 / x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 5.4e+25], N[(x1 - N[(N[(3.0 * N[(N[(N[(t$95$2 - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$0), $MachinePrecision]), $MachinePrecision] - N[(x1 + N[(t$95$1 + N[(N[(t$95$5 * N[(N[(N[(x1 * x1), $MachinePrecision] * N[(N[(t$95$6 * 4.0), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision] + N[(N[(N[(x1 * 2.0), $MachinePrecision] * N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] * N[(N[(N[(2.0 * x2), $MachinePrecision] - x1), $MachinePrecision] - 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(3.0 * t$95$2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 5e+153], N[(x1 - N[(N[(3.0 * N[(-1.0 / N[(-0.5 / x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(x1 + N[(t$95$1 + N[(N[(t$95$2 * t$95$6), $MachinePrecision] - N[(N[(N[(N[(t$95$6 - 3.0), $MachinePrecision] * N[(N[(x1 * 2.0), $MachinePrecision] * 3.0), $MachinePrecision]), $MachinePrecision] - N[(N[(x1 * x1), $MachinePrecision] * N[(6.0 + N[(4.0 * t$95$4), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * t$95$0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x2 * -6.0), $MachinePrecision] + N[(x1 * N[(-1.0 + N[(x1 * 9.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := -1 - x1 \cdot x1\\
t_1 := x1 \cdot \left(x1 \cdot x1\right)\\
t_2 := x1 \cdot \left(x1 \cdot 3\right)\\
t_3 := \left(t\_2 + 2 \cdot x2\right) - x1\\
t_4 := \frac{t\_3}{t\_0}\\
t_5 := x1 \cdot x1 + 1\\
t_6 := \frac{t\_3}{t\_5}\\
\mathbf{if}\;x1 \leq -5 \cdot 10^{+102}:\\
\;\;\;\;x1 \cdot \left(-1 + x1 \cdot \left(9 + x1 \cdot -19\right)\right)\\
\mathbf{elif}\;x1 \leq -7.8 \cdot 10^{+23}:\\
\;\;\;\;x1 + \left(\left(x1 + \left(t\_1 - \left(t\_2 \cdot t\_4 - t\_0 \cdot \left(\left(\left(x1 \cdot 2\right) \cdot t\_6\right) \cdot \left(3 + t\_4\right) - \left(x1 \cdot x1\right) \cdot 6\right)\right)\right)\right) + 3 \cdot \frac{1}{\frac{-0.5}{x2}}\right)\\
\mathbf{elif}\;x1 \leq 5.4 \cdot 10^{+25}:\\
\;\;\;\;x1 - \left(3 \cdot \frac{\left(t\_2 - 2 \cdot x2\right) - x1}{t\_0} - \left(x1 + \left(t\_1 + \left(t\_5 \cdot \left(\left(x1 \cdot x1\right) \cdot \left(t\_6 \cdot 4 - 6\right) + \left(\left(x1 \cdot 2\right) \cdot \left(2 \cdot x2\right)\right) \cdot \left(\left(2 \cdot x2 - x1\right) - 3\right)\right) + 3 \cdot t\_2\right)\right)\right)\right)\\
\mathbf{elif}\;x1 \leq 5 \cdot 10^{+153}:\\
\;\;\;\;x1 - \left(3 \cdot \frac{-1}{\frac{-0.5}{x2}} - \left(x1 + \left(t\_1 + \left(t\_2 \cdot t\_6 - \left(\left(t\_6 - 3\right) \cdot \left(\left(x1 \cdot 2\right) \cdot 3\right) - \left(x1 \cdot x1\right) \cdot \left(6 + 4 \cdot t\_4\right)\right) \cdot t\_0\right)\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x2 \cdot -6 + x1 \cdot \left(-1 + x1 \cdot 9\right)\\
\end{array}
\end{array}
if x1 < -5e102Initial program 0.0%
Simplified0.0%
Taylor expanded in x1 around 0 80.0%
Taylor expanded in x2 around 0 100.0%
*-commutative100.0%
Simplified100.0%
Taylor expanded in x2 around 0 100.0%
if -5e102 < x1 < -7.8000000000000001e23Initial program 99.4%
fma-define99.4%
clear-num99.4%
inv-pow99.4%
associate--l-99.4%
associate-*r*99.4%
fma-undefine99.4%
fma-neg99.4%
pow299.4%
Applied egg-rr99.4%
unpow-199.4%
fma-undefine99.4%
unsub-neg99.4%
Simplified99.4%
Taylor expanded in x1 around 0 99.4%
Taylor expanded in x1 around inf 94.9%
if -7.8000000000000001e23 < x1 < 5.4e25Initial program 99.4%
Taylor expanded in x1 around 0 95.2%
+-commutative95.2%
mul-1-neg95.2%
unsub-neg95.2%
Simplified95.2%
Taylor expanded in x1 around 0 97.2%
Taylor expanded in x1 around inf 97.2%
if 5.4e25 < x1 < 5.00000000000000018e153Initial program 99.9%
fma-define99.9%
clear-num99.9%
inv-pow99.9%
associate--l-99.9%
associate-*r*99.9%
fma-undefine99.9%
fma-neg99.9%
pow299.9%
Applied egg-rr99.9%
unpow-199.9%
fma-undefine99.9%
unsub-neg99.9%
Simplified99.9%
Taylor expanded in x1 around 0 99.9%
Taylor expanded in x1 around inf 96.0%
if 5.00000000000000018e153 < x1 Initial program 0.0%
Simplified0.0%
Taylor expanded in x1 around 0 0.0%
Taylor expanded in x2 around 0 0.0%
*-commutative0.0%
Simplified0.0%
Taylor expanded in x1 around 0 100.0%
*-commutative100.0%
Simplified100.0%
Final simplification97.7%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (+ (* x1 x1) 1.0))
(t_1 (* x1 (* x1 3.0)))
(t_2 (- (+ t_1 (* 2.0 x2)) x1))
(t_3 (- -1.0 (* x1 x1)))
(t_4 (/ t_2 t_3)))
(if (<= x1 -2e+103)
(* x1 (+ -1.0 (* x1 (+ 9.0 (* x1 -19.0)))))
(if (<= x1 5e+153)
(+
x1
(+
(* 3.0 (/ (- (- t_1 (* 2.0 x2)) x1) t_0))
(+
x1
(-
(* x1 (* x1 x1))
(-
(* t_1 t_4)
(*
t_3
(-
(* (* (* x1 2.0) (/ t_2 t_0)) (+ 3.0 t_4))
(* (* x1 x1) 6.0))))))))
(+ (* x2 -6.0) (* x1 (+ -1.0 (* x1 9.0))))))))
double code(double x1, double x2) {
double t_0 = (x1 * x1) + 1.0;
double t_1 = x1 * (x1 * 3.0);
double t_2 = (t_1 + (2.0 * x2)) - x1;
double t_3 = -1.0 - (x1 * x1);
double t_4 = t_2 / t_3;
double tmp;
if (x1 <= -2e+103) {
tmp = x1 * (-1.0 + (x1 * (9.0 + (x1 * -19.0))));
} else if (x1 <= 5e+153) {
tmp = x1 + ((3.0 * (((t_1 - (2.0 * x2)) - x1) / t_0)) + (x1 + ((x1 * (x1 * x1)) - ((t_1 * t_4) - (t_3 * ((((x1 * 2.0) * (t_2 / t_0)) * (3.0 + t_4)) - ((x1 * x1) * 6.0)))))));
} else {
tmp = (x2 * -6.0) + (x1 * (-1.0 + (x1 * 9.0)));
}
return tmp;
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
real(8) :: t_0
real(8) :: t_1
real(8) :: t_2
real(8) :: t_3
real(8) :: t_4
real(8) :: tmp
t_0 = (x1 * x1) + 1.0d0
t_1 = x1 * (x1 * 3.0d0)
t_2 = (t_1 + (2.0d0 * x2)) - x1
t_3 = (-1.0d0) - (x1 * x1)
t_4 = t_2 / t_3
if (x1 <= (-2d+103)) then
tmp = x1 * ((-1.0d0) + (x1 * (9.0d0 + (x1 * (-19.0d0)))))
else if (x1 <= 5d+153) then
tmp = x1 + ((3.0d0 * (((t_1 - (2.0d0 * x2)) - x1) / t_0)) + (x1 + ((x1 * (x1 * x1)) - ((t_1 * t_4) - (t_3 * ((((x1 * 2.0d0) * (t_2 / t_0)) * (3.0d0 + t_4)) - ((x1 * x1) * 6.0d0)))))))
else
tmp = (x2 * (-6.0d0)) + (x1 * ((-1.0d0) + (x1 * 9.0d0)))
end if
code = tmp
end function
public static double code(double x1, double x2) {
double t_0 = (x1 * x1) + 1.0;
double t_1 = x1 * (x1 * 3.0);
double t_2 = (t_1 + (2.0 * x2)) - x1;
double t_3 = -1.0 - (x1 * x1);
double t_4 = t_2 / t_3;
double tmp;
if (x1 <= -2e+103) {
tmp = x1 * (-1.0 + (x1 * (9.0 + (x1 * -19.0))));
} else if (x1 <= 5e+153) {
tmp = x1 + ((3.0 * (((t_1 - (2.0 * x2)) - x1) / t_0)) + (x1 + ((x1 * (x1 * x1)) - ((t_1 * t_4) - (t_3 * ((((x1 * 2.0) * (t_2 / t_0)) * (3.0 + t_4)) - ((x1 * x1) * 6.0)))))));
} else {
tmp = (x2 * -6.0) + (x1 * (-1.0 + (x1 * 9.0)));
}
return tmp;
}
def code(x1, x2): t_0 = (x1 * x1) + 1.0 t_1 = x1 * (x1 * 3.0) t_2 = (t_1 + (2.0 * x2)) - x1 t_3 = -1.0 - (x1 * x1) t_4 = t_2 / t_3 tmp = 0 if x1 <= -2e+103: tmp = x1 * (-1.0 + (x1 * (9.0 + (x1 * -19.0)))) elif x1 <= 5e+153: tmp = x1 + ((3.0 * (((t_1 - (2.0 * x2)) - x1) / t_0)) + (x1 + ((x1 * (x1 * x1)) - ((t_1 * t_4) - (t_3 * ((((x1 * 2.0) * (t_2 / t_0)) * (3.0 + t_4)) - ((x1 * x1) * 6.0))))))) else: tmp = (x2 * -6.0) + (x1 * (-1.0 + (x1 * 9.0))) return tmp
function code(x1, x2) t_0 = Float64(Float64(x1 * x1) + 1.0) t_1 = Float64(x1 * Float64(x1 * 3.0)) t_2 = Float64(Float64(t_1 + Float64(2.0 * x2)) - x1) t_3 = Float64(-1.0 - Float64(x1 * x1)) t_4 = Float64(t_2 / t_3) tmp = 0.0 if (x1 <= -2e+103) tmp = Float64(x1 * Float64(-1.0 + Float64(x1 * Float64(9.0 + Float64(x1 * -19.0))))); elseif (x1 <= 5e+153) 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_1 * t_4) - Float64(t_3 * Float64(Float64(Float64(Float64(x1 * 2.0) * Float64(t_2 / t_0)) * Float64(3.0 + t_4)) - Float64(Float64(x1 * x1) * 6.0)))))))); else tmp = Float64(Float64(x2 * -6.0) + Float64(x1 * Float64(-1.0 + Float64(x1 * 9.0)))); end return tmp end
function tmp_2 = code(x1, x2) t_0 = (x1 * x1) + 1.0; t_1 = x1 * (x1 * 3.0); t_2 = (t_1 + (2.0 * x2)) - x1; t_3 = -1.0 - (x1 * x1); t_4 = t_2 / t_3; tmp = 0.0; if (x1 <= -2e+103) tmp = x1 * (-1.0 + (x1 * (9.0 + (x1 * -19.0)))); elseif (x1 <= 5e+153) tmp = x1 + ((3.0 * (((t_1 - (2.0 * x2)) - x1) / t_0)) + (x1 + ((x1 * (x1 * x1)) - ((t_1 * t_4) - (t_3 * ((((x1 * 2.0) * (t_2 / t_0)) * (3.0 + t_4)) - ((x1 * x1) * 6.0))))))); else tmp = (x2 * -6.0) + (x1 * (-1.0 + (x1 * 9.0))); end tmp_2 = tmp; end
code[x1_, x2_] := Block[{t$95$0 = N[(N[(x1 * x1), $MachinePrecision] + 1.0), $MachinePrecision]}, Block[{t$95$1 = N[(x1 * N[(x1 * 3.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(t$95$1 + N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision]}, Block[{t$95$3 = N[(-1.0 - N[(x1 * x1), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[(t$95$2 / t$95$3), $MachinePrecision]}, If[LessEqual[x1, -2e+103], N[(x1 * N[(-1.0 + N[(x1 * N[(9.0 + N[(x1 * -19.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 5e+153], 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$1 * t$95$4), $MachinePrecision] - N[(t$95$3 * N[(N[(N[(N[(x1 * 2.0), $MachinePrecision] * N[(t$95$2 / t$95$0), $MachinePrecision]), $MachinePrecision] * N[(3.0 + t$95$4), $MachinePrecision]), $MachinePrecision] - N[(N[(x1 * x1), $MachinePrecision] * 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x2 * -6.0), $MachinePrecision] + N[(x1 * N[(-1.0 + N[(x1 * 9.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x1 \cdot x1 + 1\\
t_1 := x1 \cdot \left(x1 \cdot 3\right)\\
t_2 := \left(t\_1 + 2 \cdot x2\right) - x1\\
t_3 := -1 - x1 \cdot x1\\
t_4 := \frac{t\_2}{t\_3}\\
\mathbf{if}\;x1 \leq -2 \cdot 10^{+103}:\\
\;\;\;\;x1 \cdot \left(-1 + x1 \cdot \left(9 + x1 \cdot -19\right)\right)\\
\mathbf{elif}\;x1 \leq 5 \cdot 10^{+153}:\\
\;\;\;\;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\_1 \cdot t\_4 - t\_3 \cdot \left(\left(\left(x1 \cdot 2\right) \cdot \frac{t\_2}{t\_0}\right) \cdot \left(3 + t\_4\right) - \left(x1 \cdot x1\right) \cdot 6\right)\right)\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x2 \cdot -6 + x1 \cdot \left(-1 + x1 \cdot 9\right)\\
\end{array}
\end{array}
if x1 < -2e103Initial program 0.0%
Simplified0.0%
Taylor expanded in x1 around 0 80.0%
Taylor expanded in x2 around 0 100.0%
*-commutative100.0%
Simplified100.0%
Taylor expanded in x2 around 0 100.0%
if -2e103 < x1 < 5.00000000000000018e153Initial program 99.5%
Taylor expanded in x1 around inf 96.0%
if 5.00000000000000018e153 < x1 Initial program 0.0%
Simplified0.0%
Taylor expanded in x1 around 0 0.0%
Taylor expanded in x2 around 0 0.0%
*-commutative0.0%
Simplified0.0%
Taylor expanded in x1 around 0 100.0%
*-commutative100.0%
Simplified100.0%
Final simplification97.1%
(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_4 (/ t_3 t_1))
(t_5 (- -1.0 (* x1 x1))))
(if (<= x1 -2.1e+102)
(* x1 (+ -1.0 (* x1 (+ 9.0 (* x1 -19.0)))))
(if (<= x1 7.8e+28)
(-
x1
(-
(* 3.0 (/ (- (- t_2 (* 2.0 x2)) x1) t_5))
(+
x1
(+
t_0
(+
(*
t_1
(+
(* (* x1 x1) (- (* t_4 4.0) 6.0))
(* (* (* x1 2.0) (* 2.0 x2)) (- (- (* 2.0 x2) x1) 3.0))))
(* 3.0 t_2))))))
(if (<= x1 5e+153)
(-
x1
(-
(* 3.0 (/ -1.0 (/ -0.5 x2)))
(+
x1
(+
t_0
(-
(* t_2 t_4)
(*
(-
(* (- t_4 3.0) (* (* x1 2.0) 3.0))
(* (* x1 x1) (+ 6.0 (* 4.0 (/ t_3 t_5)))))
t_5))))))
(+ (* x2 -6.0) (* x1 (+ -1.0 (* x1 9.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;
double t_4 = t_3 / t_1;
double t_5 = -1.0 - (x1 * x1);
double tmp;
if (x1 <= -2.1e+102) {
tmp = x1 * (-1.0 + (x1 * (9.0 + (x1 * -19.0))));
} else if (x1 <= 7.8e+28) {
tmp = x1 - ((3.0 * (((t_2 - (2.0 * x2)) - x1) / t_5)) - (x1 + (t_0 + ((t_1 * (((x1 * x1) * ((t_4 * 4.0) - 6.0)) + (((x1 * 2.0) * (2.0 * x2)) * (((2.0 * x2) - x1) - 3.0)))) + (3.0 * t_2)))));
} else if (x1 <= 5e+153) {
tmp = x1 - ((3.0 * (-1.0 / (-0.5 / x2))) - (x1 + (t_0 + ((t_2 * t_4) - ((((t_4 - 3.0) * ((x1 * 2.0) * 3.0)) - ((x1 * x1) * (6.0 + (4.0 * (t_3 / t_5))))) * t_5)))));
} else {
tmp = (x2 * -6.0) + (x1 * (-1.0 + (x1 * 9.0)));
}
return tmp;
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
real(8) :: t_0
real(8) :: t_1
real(8) :: t_2
real(8) :: t_3
real(8) :: t_4
real(8) :: t_5
real(8) :: tmp
t_0 = x1 * (x1 * x1)
t_1 = (x1 * x1) + 1.0d0
t_2 = x1 * (x1 * 3.0d0)
t_3 = (t_2 + (2.0d0 * x2)) - x1
t_4 = t_3 / t_1
t_5 = (-1.0d0) - (x1 * x1)
if (x1 <= (-2.1d+102)) then
tmp = x1 * ((-1.0d0) + (x1 * (9.0d0 + (x1 * (-19.0d0)))))
else if (x1 <= 7.8d+28) then
tmp = x1 - ((3.0d0 * (((t_2 - (2.0d0 * x2)) - x1) / t_5)) - (x1 + (t_0 + ((t_1 * (((x1 * x1) * ((t_4 * 4.0d0) - 6.0d0)) + (((x1 * 2.0d0) * (2.0d0 * x2)) * (((2.0d0 * x2) - x1) - 3.0d0)))) + (3.0d0 * t_2)))))
else if (x1 <= 5d+153) then
tmp = x1 - ((3.0d0 * ((-1.0d0) / ((-0.5d0) / x2))) - (x1 + (t_0 + ((t_2 * t_4) - ((((t_4 - 3.0d0) * ((x1 * 2.0d0) * 3.0d0)) - ((x1 * x1) * (6.0d0 + (4.0d0 * (t_3 / t_5))))) * t_5)))))
else
tmp = (x2 * (-6.0d0)) + (x1 * ((-1.0d0) + (x1 * 9.0d0)))
end if
code = tmp
end function
public static double code(double x1, double x2) {
double t_0 = x1 * (x1 * x1);
double t_1 = (x1 * x1) + 1.0;
double t_2 = x1 * (x1 * 3.0);
double t_3 = (t_2 + (2.0 * x2)) - x1;
double t_4 = t_3 / t_1;
double t_5 = -1.0 - (x1 * x1);
double tmp;
if (x1 <= -2.1e+102) {
tmp = x1 * (-1.0 + (x1 * (9.0 + (x1 * -19.0))));
} else if (x1 <= 7.8e+28) {
tmp = x1 - ((3.0 * (((t_2 - (2.0 * x2)) - x1) / t_5)) - (x1 + (t_0 + ((t_1 * (((x1 * x1) * ((t_4 * 4.0) - 6.0)) + (((x1 * 2.0) * (2.0 * x2)) * (((2.0 * x2) - x1) - 3.0)))) + (3.0 * t_2)))));
} else if (x1 <= 5e+153) {
tmp = x1 - ((3.0 * (-1.0 / (-0.5 / x2))) - (x1 + (t_0 + ((t_2 * t_4) - ((((t_4 - 3.0) * ((x1 * 2.0) * 3.0)) - ((x1 * x1) * (6.0 + (4.0 * (t_3 / t_5))))) * t_5)))));
} else {
tmp = (x2 * -6.0) + (x1 * (-1.0 + (x1 * 9.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_4 = t_3 / t_1 t_5 = -1.0 - (x1 * x1) tmp = 0 if x1 <= -2.1e+102: tmp = x1 * (-1.0 + (x1 * (9.0 + (x1 * -19.0)))) elif x1 <= 7.8e+28: tmp = x1 - ((3.0 * (((t_2 - (2.0 * x2)) - x1) / t_5)) - (x1 + (t_0 + ((t_1 * (((x1 * x1) * ((t_4 * 4.0) - 6.0)) + (((x1 * 2.0) * (2.0 * x2)) * (((2.0 * x2) - x1) - 3.0)))) + (3.0 * t_2))))) elif x1 <= 5e+153: tmp = x1 - ((3.0 * (-1.0 / (-0.5 / x2))) - (x1 + (t_0 + ((t_2 * t_4) - ((((t_4 - 3.0) * ((x1 * 2.0) * 3.0)) - ((x1 * x1) * (6.0 + (4.0 * (t_3 / t_5))))) * t_5))))) else: tmp = (x2 * -6.0) + (x1 * (-1.0 + (x1 * 9.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(t_2 + Float64(2.0 * x2)) - x1) t_4 = Float64(t_3 / t_1) t_5 = Float64(-1.0 - Float64(x1 * x1)) tmp = 0.0 if (x1 <= -2.1e+102) tmp = Float64(x1 * Float64(-1.0 + Float64(x1 * Float64(9.0 + Float64(x1 * -19.0))))); elseif (x1 <= 7.8e+28) tmp = Float64(x1 - Float64(Float64(3.0 * Float64(Float64(Float64(t_2 - Float64(2.0 * x2)) - x1) / t_5)) - Float64(x1 + Float64(t_0 + Float64(Float64(t_1 * Float64(Float64(Float64(x1 * x1) * Float64(Float64(t_4 * 4.0) - 6.0)) + Float64(Float64(Float64(x1 * 2.0) * Float64(2.0 * x2)) * Float64(Float64(Float64(2.0 * x2) - x1) - 3.0)))) + Float64(3.0 * t_2)))))); elseif (x1 <= 5e+153) tmp = Float64(x1 - Float64(Float64(3.0 * Float64(-1.0 / Float64(-0.5 / x2))) - Float64(x1 + Float64(t_0 + Float64(Float64(t_2 * t_4) - Float64(Float64(Float64(Float64(t_4 - 3.0) * Float64(Float64(x1 * 2.0) * 3.0)) - Float64(Float64(x1 * x1) * Float64(6.0 + Float64(4.0 * Float64(t_3 / t_5))))) * t_5)))))); else tmp = Float64(Float64(x2 * -6.0) + Float64(x1 * Float64(-1.0 + Float64(x1 * 9.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_4 = t_3 / t_1; t_5 = -1.0 - (x1 * x1); tmp = 0.0; if (x1 <= -2.1e+102) tmp = x1 * (-1.0 + (x1 * (9.0 + (x1 * -19.0)))); elseif (x1 <= 7.8e+28) tmp = x1 - ((3.0 * (((t_2 - (2.0 * x2)) - x1) / t_5)) - (x1 + (t_0 + ((t_1 * (((x1 * x1) * ((t_4 * 4.0) - 6.0)) + (((x1 * 2.0) * (2.0 * x2)) * (((2.0 * x2) - x1) - 3.0)))) + (3.0 * t_2))))); elseif (x1 <= 5e+153) tmp = x1 - ((3.0 * (-1.0 / (-0.5 / x2))) - (x1 + (t_0 + ((t_2 * t_4) - ((((t_4 - 3.0) * ((x1 * 2.0) * 3.0)) - ((x1 * x1) * (6.0 + (4.0 * (t_3 / t_5))))) * t_5))))); else tmp = (x2 * -6.0) + (x1 * (-1.0 + (x1 * 9.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[(t$95$2 + N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision]}, Block[{t$95$4 = N[(t$95$3 / t$95$1), $MachinePrecision]}, Block[{t$95$5 = N[(-1.0 - N[(x1 * x1), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x1, -2.1e+102], N[(x1 * N[(-1.0 + N[(x1 * N[(9.0 + N[(x1 * -19.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 7.8e+28], N[(x1 - N[(N[(3.0 * N[(N[(N[(t$95$2 - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$5), $MachinePrecision]), $MachinePrecision] - N[(x1 + N[(t$95$0 + N[(N[(t$95$1 * N[(N[(N[(x1 * x1), $MachinePrecision] * N[(N[(t$95$4 * 4.0), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision] + N[(N[(N[(x1 * 2.0), $MachinePrecision] * N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] * N[(N[(N[(2.0 * x2), $MachinePrecision] - x1), $MachinePrecision] - 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(3.0 * t$95$2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 5e+153], N[(x1 - N[(N[(3.0 * N[(-1.0 / N[(-0.5 / x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(x1 + N[(t$95$0 + N[(N[(t$95$2 * t$95$4), $MachinePrecision] - N[(N[(N[(N[(t$95$4 - 3.0), $MachinePrecision] * N[(N[(x1 * 2.0), $MachinePrecision] * 3.0), $MachinePrecision]), $MachinePrecision] - N[(N[(x1 * x1), $MachinePrecision] * N[(6.0 + N[(4.0 * N[(t$95$3 / t$95$5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * t$95$5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x2 * -6.0), $MachinePrecision] + N[(x1 * N[(-1.0 + N[(x1 * 9.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 := \left(t\_2 + 2 \cdot x2\right) - x1\\
t_4 := \frac{t\_3}{t\_1}\\
t_5 := -1 - x1 \cdot x1\\
\mathbf{if}\;x1 \leq -2.1 \cdot 10^{+102}:\\
\;\;\;\;x1 \cdot \left(-1 + x1 \cdot \left(9 + x1 \cdot -19\right)\right)\\
\mathbf{elif}\;x1 \leq 7.8 \cdot 10^{+28}:\\
\;\;\;\;x1 - \left(3 \cdot \frac{\left(t\_2 - 2 \cdot x2\right) - x1}{t\_5} - \left(x1 + \left(t\_0 + \left(t\_1 \cdot \left(\left(x1 \cdot x1\right) \cdot \left(t\_4 \cdot 4 - 6\right) + \left(\left(x1 \cdot 2\right) \cdot \left(2 \cdot x2\right)\right) \cdot \left(\left(2 \cdot x2 - x1\right) - 3\right)\right) + 3 \cdot t\_2\right)\right)\right)\right)\\
\mathbf{elif}\;x1 \leq 5 \cdot 10^{+153}:\\
\;\;\;\;x1 - \left(3 \cdot \frac{-1}{\frac{-0.5}{x2}} - \left(x1 + \left(t\_0 + \left(t\_2 \cdot t\_4 - \left(\left(t\_4 - 3\right) \cdot \left(\left(x1 \cdot 2\right) \cdot 3\right) - \left(x1 \cdot x1\right) \cdot \left(6 + 4 \cdot \frac{t\_3}{t\_5}\right)\right) \cdot t\_5\right)\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x2 \cdot -6 + x1 \cdot \left(-1 + x1 \cdot 9\right)\\
\end{array}
\end{array}
if x1 < -2.10000000000000001e102Initial program 0.0%
Simplified0.0%
Taylor expanded in x1 around 0 80.0%
Taylor expanded in x2 around 0 100.0%
*-commutative100.0%
Simplified100.0%
Taylor expanded in x2 around 0 100.0%
if -2.10000000000000001e102 < x1 < 7.7999999999999997e28Initial program 99.4%
Taylor expanded in x1 around 0 86.2%
+-commutative86.2%
mul-1-neg86.2%
unsub-neg86.2%
Simplified86.2%
Taylor expanded in x1 around 0 94.2%
Taylor expanded in x1 around inf 94.2%
if 7.7999999999999997e28 < x1 < 5.00000000000000018e153Initial program 99.9%
fma-define99.9%
clear-num99.9%
inv-pow99.9%
associate--l-99.9%
associate-*r*99.9%
fma-undefine99.9%
fma-neg99.9%
pow299.9%
Applied egg-rr99.9%
unpow-199.9%
fma-undefine99.9%
unsub-neg99.9%
Simplified99.9%
Taylor expanded in x1 around 0 99.9%
Taylor expanded in x1 around inf 96.0%
if 5.00000000000000018e153 < x1 Initial program 0.0%
Simplified0.0%
Taylor expanded in x1 around 0 0.0%
Taylor expanded in x2 around 0 0.0%
*-commutative0.0%
Simplified0.0%
Taylor expanded in x1 around 0 100.0%
*-commutative100.0%
Simplified100.0%
Final simplification96.0%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (+ (* x1 x1) 1.0)) (t_1 (* x1 (* x1 3.0))))
(if (<= x1 -2.2e+102)
(* x1 (+ -1.0 (* x1 (+ 9.0 (* x1 -19.0)))))
(if (<= x1 5e+153)
(-
x1
(-
(* 3.0 (/ (- (- t_1 (* 2.0 x2)) x1) (- -1.0 (* x1 x1))))
(+
x1
(+
(* x1 (* x1 x1))
(+
(*
t_0
(+
(* (* x1 x1) (- (* (/ (- (+ t_1 (* 2.0 x2)) x1) t_0) 4.0) 6.0))
(* (* (* x1 2.0) (* 2.0 x2)) (- (- (* 2.0 x2) x1) 3.0))))
(* 3.0 t_1))))))
(+ (* x2 -6.0) (* x1 (+ -1.0 (* x1 9.0))))))))
double code(double x1, double x2) {
double t_0 = (x1 * x1) + 1.0;
double t_1 = x1 * (x1 * 3.0);
double tmp;
if (x1 <= -2.2e+102) {
tmp = x1 * (-1.0 + (x1 * (9.0 + (x1 * -19.0))));
} else if (x1 <= 5e+153) {
tmp = x1 - ((3.0 * (((t_1 - (2.0 * x2)) - x1) / (-1.0 - (x1 * x1)))) - (x1 + ((x1 * (x1 * x1)) + ((t_0 * (((x1 * x1) * (((((t_1 + (2.0 * x2)) - x1) / t_0) * 4.0) - 6.0)) + (((x1 * 2.0) * (2.0 * x2)) * (((2.0 * x2) - x1) - 3.0)))) + (3.0 * t_1)))));
} else {
tmp = (x2 * -6.0) + (x1 * (-1.0 + (x1 * 9.0)));
}
return tmp;
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
real(8) :: t_0
real(8) :: t_1
real(8) :: tmp
t_0 = (x1 * x1) + 1.0d0
t_1 = x1 * (x1 * 3.0d0)
if (x1 <= (-2.2d+102)) then
tmp = x1 * ((-1.0d0) + (x1 * (9.0d0 + (x1 * (-19.0d0)))))
else if (x1 <= 5d+153) then
tmp = x1 - ((3.0d0 * (((t_1 - (2.0d0 * x2)) - x1) / ((-1.0d0) - (x1 * x1)))) - (x1 + ((x1 * (x1 * x1)) + ((t_0 * (((x1 * x1) * (((((t_1 + (2.0d0 * x2)) - x1) / t_0) * 4.0d0) - 6.0d0)) + (((x1 * 2.0d0) * (2.0d0 * x2)) * (((2.0d0 * x2) - x1) - 3.0d0)))) + (3.0d0 * t_1)))))
else
tmp = (x2 * (-6.0d0)) + (x1 * ((-1.0d0) + (x1 * 9.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 tmp;
if (x1 <= -2.2e+102) {
tmp = x1 * (-1.0 + (x1 * (9.0 + (x1 * -19.0))));
} else if (x1 <= 5e+153) {
tmp = x1 - ((3.0 * (((t_1 - (2.0 * x2)) - x1) / (-1.0 - (x1 * x1)))) - (x1 + ((x1 * (x1 * x1)) + ((t_0 * (((x1 * x1) * (((((t_1 + (2.0 * x2)) - x1) / t_0) * 4.0) - 6.0)) + (((x1 * 2.0) * (2.0 * x2)) * (((2.0 * x2) - x1) - 3.0)))) + (3.0 * t_1)))));
} else {
tmp = (x2 * -6.0) + (x1 * (-1.0 + (x1 * 9.0)));
}
return tmp;
}
def code(x1, x2): t_0 = (x1 * x1) + 1.0 t_1 = x1 * (x1 * 3.0) tmp = 0 if x1 <= -2.2e+102: tmp = x1 * (-1.0 + (x1 * (9.0 + (x1 * -19.0)))) elif x1 <= 5e+153: tmp = x1 - ((3.0 * (((t_1 - (2.0 * x2)) - x1) / (-1.0 - (x1 * x1)))) - (x1 + ((x1 * (x1 * x1)) + ((t_0 * (((x1 * x1) * (((((t_1 + (2.0 * x2)) - x1) / t_0) * 4.0) - 6.0)) + (((x1 * 2.0) * (2.0 * x2)) * (((2.0 * x2) - x1) - 3.0)))) + (3.0 * t_1))))) else: tmp = (x2 * -6.0) + (x1 * (-1.0 + (x1 * 9.0))) return tmp
function code(x1, x2) t_0 = Float64(Float64(x1 * x1) + 1.0) t_1 = Float64(x1 * Float64(x1 * 3.0)) tmp = 0.0 if (x1 <= -2.2e+102) tmp = Float64(x1 * Float64(-1.0 + Float64(x1 * Float64(9.0 + Float64(x1 * -19.0))))); elseif (x1 <= 5e+153) tmp = Float64(x1 - Float64(Float64(3.0 * Float64(Float64(Float64(t_1 - Float64(2.0 * x2)) - x1) / Float64(-1.0 - Float64(x1 * x1)))) - Float64(x1 + Float64(Float64(x1 * Float64(x1 * x1)) + Float64(Float64(t_0 * Float64(Float64(Float64(x1 * x1) * Float64(Float64(Float64(Float64(Float64(t_1 + Float64(2.0 * x2)) - x1) / t_0) * 4.0) - 6.0)) + Float64(Float64(Float64(x1 * 2.0) * Float64(2.0 * x2)) * Float64(Float64(Float64(2.0 * x2) - x1) - 3.0)))) + Float64(3.0 * t_1)))))); else tmp = Float64(Float64(x2 * -6.0) + Float64(x1 * Float64(-1.0 + Float64(x1 * 9.0)))); end return tmp end
function tmp_2 = code(x1, x2) t_0 = (x1 * x1) + 1.0; t_1 = x1 * (x1 * 3.0); tmp = 0.0; if (x1 <= -2.2e+102) tmp = x1 * (-1.0 + (x1 * (9.0 + (x1 * -19.0)))); elseif (x1 <= 5e+153) tmp = x1 - ((3.0 * (((t_1 - (2.0 * x2)) - x1) / (-1.0 - (x1 * x1)))) - (x1 + ((x1 * (x1 * x1)) + ((t_0 * (((x1 * x1) * (((((t_1 + (2.0 * x2)) - x1) / t_0) * 4.0) - 6.0)) + (((x1 * 2.0) * (2.0 * x2)) * (((2.0 * x2) - x1) - 3.0)))) + (3.0 * t_1))))); else tmp = (x2 * -6.0) + (x1 * (-1.0 + (x1 * 9.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]}, If[LessEqual[x1, -2.2e+102], N[(x1 * N[(-1.0 + N[(x1 * N[(9.0 + N[(x1 * -19.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 5e+153], N[(x1 - N[(N[(3.0 * N[(N[(N[(t$95$1 - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / N[(-1.0 - N[(x1 * x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(x1 + N[(N[(x1 * N[(x1 * x1), $MachinePrecision]), $MachinePrecision] + N[(N[(t$95$0 * N[(N[(N[(x1 * x1), $MachinePrecision] * N[(N[(N[(N[(N[(t$95$1 + N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$0), $MachinePrecision] * 4.0), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision] + N[(N[(N[(x1 * 2.0), $MachinePrecision] * N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] * N[(N[(N[(2.0 * x2), $MachinePrecision] - x1), $MachinePrecision] - 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(3.0 * t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x2 * -6.0), $MachinePrecision] + N[(x1 * N[(-1.0 + N[(x1 * 9.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x1 \cdot x1 + 1\\
t_1 := x1 \cdot \left(x1 \cdot 3\right)\\
\mathbf{if}\;x1 \leq -2.2 \cdot 10^{+102}:\\
\;\;\;\;x1 \cdot \left(-1 + x1 \cdot \left(9 + x1 \cdot -19\right)\right)\\
\mathbf{elif}\;x1 \leq 5 \cdot 10^{+153}:\\
\;\;\;\;x1 - \left(3 \cdot \frac{\left(t\_1 - 2 \cdot x2\right) - x1}{-1 - x1 \cdot x1} - \left(x1 + \left(x1 \cdot \left(x1 \cdot x1\right) + \left(t\_0 \cdot \left(\left(x1 \cdot x1\right) \cdot \left(\frac{\left(t\_1 + 2 \cdot x2\right) - x1}{t\_0} \cdot 4 - 6\right) + \left(\left(x1 \cdot 2\right) \cdot \left(2 \cdot x2\right)\right) \cdot \left(\left(2 \cdot x2 - x1\right) - 3\right)\right) + 3 \cdot t\_1\right)\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x2 \cdot -6 + x1 \cdot \left(-1 + x1 \cdot 9\right)\\
\end{array}
\end{array}
if x1 < -2.20000000000000007e102Initial program 0.0%
Simplified0.0%
Taylor expanded in x1 around 0 80.0%
Taylor expanded in x2 around 0 100.0%
*-commutative100.0%
Simplified100.0%
Taylor expanded in x2 around 0 100.0%
if -2.20000000000000007e102 < x1 < 5.00000000000000018e153Initial program 99.5%
Taylor expanded in x1 around 0 81.8%
+-commutative81.8%
mul-1-neg81.8%
unsub-neg81.8%
Simplified81.8%
Taylor expanded in x1 around 0 92.1%
Taylor expanded in x1 around inf 92.2%
if 5.00000000000000018e153 < x1 Initial program 0.0%
Simplified0.0%
Taylor expanded in x1 around 0 0.0%
Taylor expanded in x2 around 0 0.0%
*-commutative0.0%
Simplified0.0%
Taylor expanded in x1 around 0 100.0%
*-commutative100.0%
Simplified100.0%
Final simplification94.3%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (* x1 (* x1 3.0))) (t_1 (- -1.0 (* x1 x1))))
(if (<= x1 -2.1e+102)
(* x1 (+ -1.0 (* x1 (+ 9.0 (* x1 -19.0)))))
(if (<= x1 5e+153)
(-
x1
(+
(* 3.0 (/ (- (- t_0 (* 2.0 x2)) x1) t_1))
(-
(-
(+
(* t_0 (/ (- (+ t_0 (* 2.0 x2)) x1) t_1))
(*
(-
(* (* x1 x1) 6.0)
(* (* (* x1 2.0) (* 2.0 x2)) (+ 3.0 (- x1 (* 2.0 x2)))))
t_1))
(* x1 (* x1 x1)))
x1)))
(+ (* x2 -6.0) (* x1 (+ -1.0 (* x1 9.0))))))))
double code(double x1, double x2) {
double t_0 = x1 * (x1 * 3.0);
double t_1 = -1.0 - (x1 * x1);
double tmp;
if (x1 <= -2.1e+102) {
tmp = x1 * (-1.0 + (x1 * (9.0 + (x1 * -19.0))));
} else if (x1 <= 5e+153) {
tmp = x1 - ((3.0 * (((t_0 - (2.0 * x2)) - x1) / t_1)) + ((((t_0 * (((t_0 + (2.0 * x2)) - x1) / t_1)) + ((((x1 * x1) * 6.0) - (((x1 * 2.0) * (2.0 * x2)) * (3.0 + (x1 - (2.0 * x2))))) * t_1)) - (x1 * (x1 * x1))) - x1));
} else {
tmp = (x2 * -6.0) + (x1 * (-1.0 + (x1 * 9.0)));
}
return tmp;
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
real(8) :: t_0
real(8) :: t_1
real(8) :: tmp
t_0 = x1 * (x1 * 3.0d0)
t_1 = (-1.0d0) - (x1 * x1)
if (x1 <= (-2.1d+102)) then
tmp = x1 * ((-1.0d0) + (x1 * (9.0d0 + (x1 * (-19.0d0)))))
else if (x1 <= 5d+153) then
tmp = x1 - ((3.0d0 * (((t_0 - (2.0d0 * x2)) - x1) / t_1)) + ((((t_0 * (((t_0 + (2.0d0 * x2)) - x1) / t_1)) + ((((x1 * x1) * 6.0d0) - (((x1 * 2.0d0) * (2.0d0 * x2)) * (3.0d0 + (x1 - (2.0d0 * x2))))) * t_1)) - (x1 * (x1 * x1))) - x1))
else
tmp = (x2 * (-6.0d0)) + (x1 * ((-1.0d0) + (x1 * 9.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 = -1.0 - (x1 * x1);
double tmp;
if (x1 <= -2.1e+102) {
tmp = x1 * (-1.0 + (x1 * (9.0 + (x1 * -19.0))));
} else if (x1 <= 5e+153) {
tmp = x1 - ((3.0 * (((t_0 - (2.0 * x2)) - x1) / t_1)) + ((((t_0 * (((t_0 + (2.0 * x2)) - x1) / t_1)) + ((((x1 * x1) * 6.0) - (((x1 * 2.0) * (2.0 * x2)) * (3.0 + (x1 - (2.0 * x2))))) * t_1)) - (x1 * (x1 * x1))) - x1));
} else {
tmp = (x2 * -6.0) + (x1 * (-1.0 + (x1 * 9.0)));
}
return tmp;
}
def code(x1, x2): t_0 = x1 * (x1 * 3.0) t_1 = -1.0 - (x1 * x1) tmp = 0 if x1 <= -2.1e+102: tmp = x1 * (-1.0 + (x1 * (9.0 + (x1 * -19.0)))) elif x1 <= 5e+153: tmp = x1 - ((3.0 * (((t_0 - (2.0 * x2)) - x1) / t_1)) + ((((t_0 * (((t_0 + (2.0 * x2)) - x1) / t_1)) + ((((x1 * x1) * 6.0) - (((x1 * 2.0) * (2.0 * x2)) * (3.0 + (x1 - (2.0 * x2))))) * t_1)) - (x1 * (x1 * x1))) - x1)) else: tmp = (x2 * -6.0) + (x1 * (-1.0 + (x1 * 9.0))) return tmp
function code(x1, x2) t_0 = Float64(x1 * Float64(x1 * 3.0)) t_1 = Float64(-1.0 - Float64(x1 * x1)) tmp = 0.0 if (x1 <= -2.1e+102) tmp = Float64(x1 * Float64(-1.0 + Float64(x1 * Float64(9.0 + Float64(x1 * -19.0))))); elseif (x1 <= 5e+153) tmp = Float64(x1 - Float64(Float64(3.0 * Float64(Float64(Float64(t_0 - Float64(2.0 * x2)) - x1) / t_1)) + Float64(Float64(Float64(Float64(t_0 * Float64(Float64(Float64(t_0 + Float64(2.0 * x2)) - x1) / t_1)) + Float64(Float64(Float64(Float64(x1 * x1) * 6.0) - Float64(Float64(Float64(x1 * 2.0) * Float64(2.0 * x2)) * Float64(3.0 + Float64(x1 - Float64(2.0 * x2))))) * t_1)) - Float64(x1 * Float64(x1 * x1))) - x1))); else tmp = Float64(Float64(x2 * -6.0) + Float64(x1 * Float64(-1.0 + Float64(x1 * 9.0)))); end return tmp end
function tmp_2 = code(x1, x2) t_0 = x1 * (x1 * 3.0); t_1 = -1.0 - (x1 * x1); tmp = 0.0; if (x1 <= -2.1e+102) tmp = x1 * (-1.0 + (x1 * (9.0 + (x1 * -19.0)))); elseif (x1 <= 5e+153) tmp = x1 - ((3.0 * (((t_0 - (2.0 * x2)) - x1) / t_1)) + ((((t_0 * (((t_0 + (2.0 * x2)) - x1) / t_1)) + ((((x1 * x1) * 6.0) - (((x1 * 2.0) * (2.0 * x2)) * (3.0 + (x1 - (2.0 * x2))))) * t_1)) - (x1 * (x1 * x1))) - x1)); else tmp = (x2 * -6.0) + (x1 * (-1.0 + (x1 * 9.0))); end tmp_2 = tmp; end
code[x1_, x2_] := Block[{t$95$0 = N[(x1 * N[(x1 * 3.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(-1.0 - N[(x1 * x1), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x1, -2.1e+102], N[(x1 * N[(-1.0 + N[(x1 * N[(9.0 + N[(x1 * -19.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 5e+153], 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[(N[(N[(N[(t$95$0 * N[(N[(N[(t$95$0 + N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$1), $MachinePrecision]), $MachinePrecision] + N[(N[(N[(N[(x1 * x1), $MachinePrecision] * 6.0), $MachinePrecision] - N[(N[(N[(x1 * 2.0), $MachinePrecision] * N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] * N[(3.0 + N[(x1 - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * t$95$1), $MachinePrecision]), $MachinePrecision] - N[(x1 * N[(x1 * x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x2 * -6.0), $MachinePrecision] + N[(x1 * N[(-1.0 + N[(x1 * 9.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x1 \cdot \left(x1 \cdot 3\right)\\
t_1 := -1 - x1 \cdot x1\\
\mathbf{if}\;x1 \leq -2.1 \cdot 10^{+102}:\\
\;\;\;\;x1 \cdot \left(-1 + x1 \cdot \left(9 + x1 \cdot -19\right)\right)\\
\mathbf{elif}\;x1 \leq 5 \cdot 10^{+153}:\\
\;\;\;\;x1 - \left(3 \cdot \frac{\left(t\_0 - 2 \cdot x2\right) - x1}{t\_1} + \left(\left(\left(t\_0 \cdot \frac{\left(t\_0 + 2 \cdot x2\right) - x1}{t\_1} + \left(\left(x1 \cdot x1\right) \cdot 6 - \left(\left(x1 \cdot 2\right) \cdot \left(2 \cdot x2\right)\right) \cdot \left(3 + \left(x1 - 2 \cdot x2\right)\right)\right) \cdot t\_1\right) - x1 \cdot \left(x1 \cdot x1\right)\right) - x1\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x2 \cdot -6 + x1 \cdot \left(-1 + x1 \cdot 9\right)\\
\end{array}
\end{array}
if x1 < -2.10000000000000001e102Initial program 0.0%
Simplified0.0%
Taylor expanded in x1 around 0 80.0%
Taylor expanded in x2 around 0 100.0%
*-commutative100.0%
Simplified100.0%
Taylor expanded in x2 around 0 100.0%
if -2.10000000000000001e102 < x1 < 5.00000000000000018e153Initial program 99.5%
Taylor expanded in x1 around 0 81.8%
+-commutative81.8%
mul-1-neg81.8%
unsub-neg81.8%
Simplified81.8%
Taylor expanded in x1 around 0 92.1%
Taylor expanded in x1 around inf 92.0%
if 5.00000000000000018e153 < x1 Initial program 0.0%
Simplified0.0%
Taylor expanded in x1 around 0 0.0%
Taylor expanded in x2 around 0 0.0%
*-commutative0.0%
Simplified0.0%
Taylor expanded in x1 around 0 100.0%
*-commutative100.0%
Simplified100.0%
Final simplification94.2%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (* x1 (* x1 3.0))) (t_1 (* x1 (* x1 x1))) (t_2 (+ (* x1 x1) 1.0)))
(if (<= x1 -2.1e+102)
(* x1 (+ -1.0 (* x1 (+ 9.0 (* x1 -19.0)))))
(if (<= x1 2.9e+96)
(+
x1
(+
(+
x1
(+
t_1
(+
(*
t_2
(+
(* (* x1 x1) (- (* (/ (- (+ t_0 (* 2.0 x2)) x1) t_2) 4.0) 6.0))
(* (* (* x1 2.0) (* 2.0 x2)) (- (- (* 2.0 x2) x1) 3.0))))
(* t_0 (* 2.0 x2)))))
(* 3.0 (- (* x2 -2.0) x1))))
(if (<= x1 5e+153)
(-
x1
(+
(- (- (* 4.0 (* x1 (* x2 (- 3.0 (* 2.0 x2))))) t_1) x1)
(* 3.0 (/ (- (- t_0 (* 2.0 x2)) x1) (- -1.0 (* x1 x1))))))
(+ (* x2 -6.0) (* x1 (+ -1.0 (* x1 9.0)))))))))
double code(double x1, double x2) {
double t_0 = x1 * (x1 * 3.0);
double t_1 = x1 * (x1 * x1);
double t_2 = (x1 * x1) + 1.0;
double tmp;
if (x1 <= -2.1e+102) {
tmp = x1 * (-1.0 + (x1 * (9.0 + (x1 * -19.0))));
} else if (x1 <= 2.9e+96) {
tmp = x1 + ((x1 + (t_1 + ((t_2 * (((x1 * x1) * (((((t_0 + (2.0 * x2)) - x1) / t_2) * 4.0) - 6.0)) + (((x1 * 2.0) * (2.0 * x2)) * (((2.0 * x2) - x1) - 3.0)))) + (t_0 * (2.0 * x2))))) + (3.0 * ((x2 * -2.0) - x1)));
} else if (x1 <= 5e+153) {
tmp = x1 - ((((4.0 * (x1 * (x2 * (3.0 - (2.0 * x2))))) - t_1) - x1) + (3.0 * (((t_0 - (2.0 * x2)) - x1) / (-1.0 - (x1 * x1)))));
} else {
tmp = (x2 * -6.0) + (x1 * (-1.0 + (x1 * 9.0)));
}
return tmp;
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
real(8) :: t_0
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_0 = x1 * (x1 * 3.0d0)
t_1 = x1 * (x1 * x1)
t_2 = (x1 * x1) + 1.0d0
if (x1 <= (-2.1d+102)) then
tmp = x1 * ((-1.0d0) + (x1 * (9.0d0 + (x1 * (-19.0d0)))))
else if (x1 <= 2.9d+96) then
tmp = x1 + ((x1 + (t_1 + ((t_2 * (((x1 * x1) * (((((t_0 + (2.0d0 * x2)) - x1) / t_2) * 4.0d0) - 6.0d0)) + (((x1 * 2.0d0) * (2.0d0 * x2)) * (((2.0d0 * x2) - x1) - 3.0d0)))) + (t_0 * (2.0d0 * x2))))) + (3.0d0 * ((x2 * (-2.0d0)) - x1)))
else if (x1 <= 5d+153) then
tmp = x1 - ((((4.0d0 * (x1 * (x2 * (3.0d0 - (2.0d0 * x2))))) - t_1) - x1) + (3.0d0 * (((t_0 - (2.0d0 * x2)) - x1) / ((-1.0d0) - (x1 * x1)))))
else
tmp = (x2 * (-6.0d0)) + (x1 * ((-1.0d0) + (x1 * 9.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 * x1);
double t_2 = (x1 * x1) + 1.0;
double tmp;
if (x1 <= -2.1e+102) {
tmp = x1 * (-1.0 + (x1 * (9.0 + (x1 * -19.0))));
} else if (x1 <= 2.9e+96) {
tmp = x1 + ((x1 + (t_1 + ((t_2 * (((x1 * x1) * (((((t_0 + (2.0 * x2)) - x1) / t_2) * 4.0) - 6.0)) + (((x1 * 2.0) * (2.0 * x2)) * (((2.0 * x2) - x1) - 3.0)))) + (t_0 * (2.0 * x2))))) + (3.0 * ((x2 * -2.0) - x1)));
} else if (x1 <= 5e+153) {
tmp = x1 - ((((4.0 * (x1 * (x2 * (3.0 - (2.0 * x2))))) - t_1) - x1) + (3.0 * (((t_0 - (2.0 * x2)) - x1) / (-1.0 - (x1 * x1)))));
} else {
tmp = (x2 * -6.0) + (x1 * (-1.0 + (x1 * 9.0)));
}
return tmp;
}
def code(x1, x2): t_0 = x1 * (x1 * 3.0) t_1 = x1 * (x1 * x1) t_2 = (x1 * x1) + 1.0 tmp = 0 if x1 <= -2.1e+102: tmp = x1 * (-1.0 + (x1 * (9.0 + (x1 * -19.0)))) elif x1 <= 2.9e+96: tmp = x1 + ((x1 + (t_1 + ((t_2 * (((x1 * x1) * (((((t_0 + (2.0 * x2)) - x1) / t_2) * 4.0) - 6.0)) + (((x1 * 2.0) * (2.0 * x2)) * (((2.0 * x2) - x1) - 3.0)))) + (t_0 * (2.0 * x2))))) + (3.0 * ((x2 * -2.0) - x1))) elif x1 <= 5e+153: tmp = x1 - ((((4.0 * (x1 * (x2 * (3.0 - (2.0 * x2))))) - t_1) - x1) + (3.0 * (((t_0 - (2.0 * x2)) - x1) / (-1.0 - (x1 * x1))))) else: tmp = (x2 * -6.0) + (x1 * (-1.0 + (x1 * 9.0))) return tmp
function code(x1, x2) t_0 = Float64(x1 * Float64(x1 * 3.0)) t_1 = Float64(x1 * Float64(x1 * x1)) t_2 = Float64(Float64(x1 * x1) + 1.0) tmp = 0.0 if (x1 <= -2.1e+102) tmp = Float64(x1 * Float64(-1.0 + Float64(x1 * Float64(9.0 + Float64(x1 * -19.0))))); elseif (x1 <= 2.9e+96) tmp = Float64(x1 + Float64(Float64(x1 + Float64(t_1 + Float64(Float64(t_2 * Float64(Float64(Float64(x1 * x1) * Float64(Float64(Float64(Float64(Float64(t_0 + Float64(2.0 * x2)) - x1) / t_2) * 4.0) - 6.0)) + Float64(Float64(Float64(x1 * 2.0) * Float64(2.0 * x2)) * Float64(Float64(Float64(2.0 * x2) - x1) - 3.0)))) + Float64(t_0 * Float64(2.0 * x2))))) + Float64(3.0 * Float64(Float64(x2 * -2.0) - x1)))); elseif (x1 <= 5e+153) tmp = Float64(x1 - Float64(Float64(Float64(Float64(4.0 * Float64(x1 * Float64(x2 * Float64(3.0 - Float64(2.0 * x2))))) - t_1) - x1) + Float64(3.0 * Float64(Float64(Float64(t_0 - Float64(2.0 * x2)) - x1) / Float64(-1.0 - Float64(x1 * x1)))))); else tmp = Float64(Float64(x2 * -6.0) + Float64(x1 * Float64(-1.0 + Float64(x1 * 9.0)))); end return tmp end
function tmp_2 = code(x1, x2) t_0 = x1 * (x1 * 3.0); t_1 = x1 * (x1 * x1); t_2 = (x1 * x1) + 1.0; tmp = 0.0; if (x1 <= -2.1e+102) tmp = x1 * (-1.0 + (x1 * (9.0 + (x1 * -19.0)))); elseif (x1 <= 2.9e+96) tmp = x1 + ((x1 + (t_1 + ((t_2 * (((x1 * x1) * (((((t_0 + (2.0 * x2)) - x1) / t_2) * 4.0) - 6.0)) + (((x1 * 2.0) * (2.0 * x2)) * (((2.0 * x2) - x1) - 3.0)))) + (t_0 * (2.0 * x2))))) + (3.0 * ((x2 * -2.0) - x1))); elseif (x1 <= 5e+153) tmp = x1 - ((((4.0 * (x1 * (x2 * (3.0 - (2.0 * x2))))) - t_1) - x1) + (3.0 * (((t_0 - (2.0 * x2)) - x1) / (-1.0 - (x1 * x1))))); else tmp = (x2 * -6.0) + (x1 * (-1.0 + (x1 * 9.0))); end tmp_2 = tmp; end
code[x1_, x2_] := Block[{t$95$0 = N[(x1 * N[(x1 * 3.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(x1 * N[(x1 * x1), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(x1 * x1), $MachinePrecision] + 1.0), $MachinePrecision]}, If[LessEqual[x1, -2.1e+102], N[(x1 * N[(-1.0 + N[(x1 * N[(9.0 + N[(x1 * -19.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 2.9e+96], N[(x1 + N[(N[(x1 + N[(t$95$1 + N[(N[(t$95$2 * N[(N[(N[(x1 * x1), $MachinePrecision] * N[(N[(N[(N[(N[(t$95$0 + N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$2), $MachinePrecision] * 4.0), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision] + N[(N[(N[(x1 * 2.0), $MachinePrecision] * N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] * N[(N[(N[(2.0 * x2), $MachinePrecision] - x1), $MachinePrecision] - 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(t$95$0 * N[(2.0 * x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(3.0 * N[(N[(x2 * -2.0), $MachinePrecision] - x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 5e+153], N[(x1 - N[(N[(N[(N[(4.0 * N[(x1 * N[(x2 * N[(3.0 - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision] - x1), $MachinePrecision] + N[(3.0 * N[(N[(N[(t$95$0 - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / N[(-1.0 - N[(x1 * x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x2 * -6.0), $MachinePrecision] + N[(x1 * N[(-1.0 + N[(x1 * 9.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x1 \cdot \left(x1 \cdot 3\right)\\
t_1 := x1 \cdot \left(x1 \cdot x1\right)\\
t_2 := x1 \cdot x1 + 1\\
\mathbf{if}\;x1 \leq -2.1 \cdot 10^{+102}:\\
\;\;\;\;x1 \cdot \left(-1 + x1 \cdot \left(9 + x1 \cdot -19\right)\right)\\
\mathbf{elif}\;x1 \leq 2.9 \cdot 10^{+96}:\\
\;\;\;\;x1 + \left(\left(x1 + \left(t\_1 + \left(t\_2 \cdot \left(\left(x1 \cdot x1\right) \cdot \left(\frac{\left(t\_0 + 2 \cdot x2\right) - x1}{t\_2} \cdot 4 - 6\right) + \left(\left(x1 \cdot 2\right) \cdot \left(2 \cdot x2\right)\right) \cdot \left(\left(2 \cdot x2 - x1\right) - 3\right)\right) + t\_0 \cdot \left(2 \cdot x2\right)\right)\right)\right) + 3 \cdot \left(x2 \cdot -2 - x1\right)\right)\\
\mathbf{elif}\;x1 \leq 5 \cdot 10^{+153}:\\
\;\;\;\;x1 - \left(\left(\left(4 \cdot \left(x1 \cdot \left(x2 \cdot \left(3 - 2 \cdot x2\right)\right)\right) - t\_1\right) - x1\right) + 3 \cdot \frac{\left(t\_0 - 2 \cdot x2\right) - x1}{-1 - x1 \cdot x1}\right)\\
\mathbf{else}:\\
\;\;\;\;x2 \cdot -6 + x1 \cdot \left(-1 + x1 \cdot 9\right)\\
\end{array}
\end{array}
if x1 < -2.10000000000000001e102Initial program 0.0%
Simplified0.0%
Taylor expanded in x1 around 0 80.0%
Taylor expanded in x2 around 0 100.0%
*-commutative100.0%
Simplified100.0%
Taylor expanded in x2 around 0 100.0%
if -2.10000000000000001e102 < x1 < 2.89999999999999978e96Initial program 99.5%
Taylor expanded in x1 around 0 82.2%
+-commutative82.2%
mul-1-neg82.2%
unsub-neg82.2%
Simplified82.2%
Taylor expanded in x1 around 0 92.7%
Taylor expanded in x1 around 0 89.8%
Taylor expanded in x1 around 0 89.7%
mul-1-neg89.7%
unsub-neg89.7%
*-commutative89.7%
Simplified89.7%
if 2.89999999999999978e96 < x1 < 5.00000000000000018e153Initial program 100.0%
Taylor expanded in x1 around 0 76.9%
+-commutative76.9%
mul-1-neg76.9%
unsub-neg76.9%
Simplified76.9%
Taylor expanded in x1 around 0 100.0%
Taylor expanded in x1 around 0 100.0%
if 5.00000000000000018e153 < x1 Initial program 0.0%
Simplified0.0%
Taylor expanded in x1 around 0 0.0%
Taylor expanded in x2 around 0 0.0%
*-commutative0.0%
Simplified0.0%
Taylor expanded in x1 around 0 100.0%
*-commutative100.0%
Simplified100.0%
Final simplification93.1%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (- -1.0 (* x1 x1))) (t_1 (* x1 (* x1 3.0))))
(if (<= x1 -6e+73)
(* x2 (- (/ (* x1 (+ -1.0 (* x1 (+ 9.0 (* x1 -19.0))))) x2) 6.0))
(if (<= x1 5e+153)
(-
x1
(+
(* 3.0 (/ (- (- t_1 (* 2.0 x2)) x1) t_0))
(-
(-
(+
(* t_1 (/ (- (+ t_1 (* 2.0 x2)) x1) t_0))
(* (* x2 (+ (* x1 -12.0) (* 8.0 (* x1 x2)))) t_0))
(* x1 (* x1 x1)))
x1)))
(+ (* x2 -6.0) (* x1 (+ -1.0 (* x1 9.0))))))))
double code(double x1, double x2) {
double t_0 = -1.0 - (x1 * x1);
double t_1 = x1 * (x1 * 3.0);
double tmp;
if (x1 <= -6e+73) {
tmp = x2 * (((x1 * (-1.0 + (x1 * (9.0 + (x1 * -19.0))))) / x2) - 6.0);
} else if (x1 <= 5e+153) {
tmp = x1 - ((3.0 * (((t_1 - (2.0 * x2)) - x1) / t_0)) + ((((t_1 * (((t_1 + (2.0 * x2)) - x1) / t_0)) + ((x2 * ((x1 * -12.0) + (8.0 * (x1 * x2)))) * t_0)) - (x1 * (x1 * x1))) - x1));
} else {
tmp = (x2 * -6.0) + (x1 * (-1.0 + (x1 * 9.0)));
}
return tmp;
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
real(8) :: t_0
real(8) :: t_1
real(8) :: tmp
t_0 = (-1.0d0) - (x1 * x1)
t_1 = x1 * (x1 * 3.0d0)
if (x1 <= (-6d+73)) then
tmp = x2 * (((x1 * ((-1.0d0) + (x1 * (9.0d0 + (x1 * (-19.0d0)))))) / x2) - 6.0d0)
else if (x1 <= 5d+153) then
tmp = x1 - ((3.0d0 * (((t_1 - (2.0d0 * x2)) - x1) / t_0)) + ((((t_1 * (((t_1 + (2.0d0 * x2)) - x1) / t_0)) + ((x2 * ((x1 * (-12.0d0)) + (8.0d0 * (x1 * x2)))) * t_0)) - (x1 * (x1 * x1))) - x1))
else
tmp = (x2 * (-6.0d0)) + (x1 * ((-1.0d0) + (x1 * 9.0d0)))
end if
code = tmp
end function
public static double code(double x1, double x2) {
double t_0 = -1.0 - (x1 * x1);
double t_1 = x1 * (x1 * 3.0);
double tmp;
if (x1 <= -6e+73) {
tmp = x2 * (((x1 * (-1.0 + (x1 * (9.0 + (x1 * -19.0))))) / x2) - 6.0);
} else if (x1 <= 5e+153) {
tmp = x1 - ((3.0 * (((t_1 - (2.0 * x2)) - x1) / t_0)) + ((((t_1 * (((t_1 + (2.0 * x2)) - x1) / t_0)) + ((x2 * ((x1 * -12.0) + (8.0 * (x1 * x2)))) * t_0)) - (x1 * (x1 * x1))) - x1));
} else {
tmp = (x2 * -6.0) + (x1 * (-1.0 + (x1 * 9.0)));
}
return tmp;
}
def code(x1, x2): t_0 = -1.0 - (x1 * x1) t_1 = x1 * (x1 * 3.0) tmp = 0 if x1 <= -6e+73: tmp = x2 * (((x1 * (-1.0 + (x1 * (9.0 + (x1 * -19.0))))) / x2) - 6.0) elif x1 <= 5e+153: tmp = x1 - ((3.0 * (((t_1 - (2.0 * x2)) - x1) / t_0)) + ((((t_1 * (((t_1 + (2.0 * x2)) - x1) / t_0)) + ((x2 * ((x1 * -12.0) + (8.0 * (x1 * x2)))) * t_0)) - (x1 * (x1 * x1))) - x1)) else: tmp = (x2 * -6.0) + (x1 * (-1.0 + (x1 * 9.0))) return tmp
function code(x1, x2) t_0 = Float64(-1.0 - Float64(x1 * x1)) t_1 = Float64(x1 * Float64(x1 * 3.0)) tmp = 0.0 if (x1 <= -6e+73) tmp = Float64(x2 * Float64(Float64(Float64(x1 * Float64(-1.0 + Float64(x1 * Float64(9.0 + Float64(x1 * -19.0))))) / x2) - 6.0)); elseif (x1 <= 5e+153) tmp = Float64(x1 - Float64(Float64(3.0 * Float64(Float64(Float64(t_1 - Float64(2.0 * x2)) - x1) / t_0)) + Float64(Float64(Float64(Float64(t_1 * Float64(Float64(Float64(t_1 + Float64(2.0 * x2)) - x1) / t_0)) + Float64(Float64(x2 * Float64(Float64(x1 * -12.0) + Float64(8.0 * Float64(x1 * x2)))) * t_0)) - Float64(x1 * Float64(x1 * x1))) - x1))); else tmp = Float64(Float64(x2 * -6.0) + Float64(x1 * Float64(-1.0 + Float64(x1 * 9.0)))); end return tmp end
function tmp_2 = code(x1, x2) t_0 = -1.0 - (x1 * x1); t_1 = x1 * (x1 * 3.0); tmp = 0.0; if (x1 <= -6e+73) tmp = x2 * (((x1 * (-1.0 + (x1 * (9.0 + (x1 * -19.0))))) / x2) - 6.0); elseif (x1 <= 5e+153) tmp = x1 - ((3.0 * (((t_1 - (2.0 * x2)) - x1) / t_0)) + ((((t_1 * (((t_1 + (2.0 * x2)) - x1) / t_0)) + ((x2 * ((x1 * -12.0) + (8.0 * (x1 * x2)))) * t_0)) - (x1 * (x1 * x1))) - x1)); else tmp = (x2 * -6.0) + (x1 * (-1.0 + (x1 * 9.0))); end tmp_2 = tmp; end
code[x1_, x2_] := Block[{t$95$0 = N[(-1.0 - N[(x1 * x1), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(x1 * N[(x1 * 3.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x1, -6e+73], N[(x2 * N[(N[(N[(x1 * N[(-1.0 + N[(x1 * N[(9.0 + N[(x1 * -19.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / x2), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 5e+153], N[(x1 - N[(N[(3.0 * N[(N[(N[(t$95$1 - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$0), $MachinePrecision]), $MachinePrecision] + N[(N[(N[(N[(t$95$1 * N[(N[(N[(t$95$1 + N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$0), $MachinePrecision]), $MachinePrecision] + N[(N[(x2 * N[(N[(x1 * -12.0), $MachinePrecision] + N[(8.0 * N[(x1 * x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * t$95$0), $MachinePrecision]), $MachinePrecision] - N[(x1 * N[(x1 * x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x2 * -6.0), $MachinePrecision] + N[(x1 * N[(-1.0 + N[(x1 * 9.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := -1 - x1 \cdot x1\\
t_1 := x1 \cdot \left(x1 \cdot 3\right)\\
\mathbf{if}\;x1 \leq -6 \cdot 10^{+73}:\\
\;\;\;\;x2 \cdot \left(\frac{x1 \cdot \left(-1 + x1 \cdot \left(9 + x1 \cdot -19\right)\right)}{x2} - 6\right)\\
\mathbf{elif}\;x1 \leq 5 \cdot 10^{+153}:\\
\;\;\;\;x1 - \left(3 \cdot \frac{\left(t\_1 - 2 \cdot x2\right) - x1}{t\_0} + \left(\left(\left(t\_1 \cdot \frac{\left(t\_1 + 2 \cdot x2\right) - x1}{t\_0} + \left(x2 \cdot \left(x1 \cdot -12 + 8 \cdot \left(x1 \cdot x2\right)\right)\right) \cdot t\_0\right) - x1 \cdot \left(x1 \cdot x1\right)\right) - x1\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x2 \cdot -6 + x1 \cdot \left(-1 + x1 \cdot 9\right)\\
\end{array}
\end{array}
if x1 < -6.00000000000000021e73Initial program 15.1%
Simplified15.1%
Taylor expanded in x1 around 0 72.8%
Taylor expanded in x2 around 0 86.1%
*-commutative86.1%
Simplified86.1%
Taylor expanded in x2 around inf 89.4%
if -6.00000000000000021e73 < x1 < 5.00000000000000018e153Initial program 99.5%
Taylor expanded in x1 around 0 84.2%
+-commutative84.2%
mul-1-neg84.2%
unsub-neg84.2%
Simplified84.2%
Taylor expanded in x1 around 0 79.8%
Taylor expanded in x2 around 0 85.7%
if 5.00000000000000018e153 < x1 Initial program 0.0%
Simplified0.0%
Taylor expanded in x1 around 0 0.0%
Taylor expanded in x2 around 0 0.0%
*-commutative0.0%
Simplified0.0%
Taylor expanded in x1 around 0 100.0%
*-commutative100.0%
Simplified100.0%
Final simplification87.9%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (* 4.0 (* x2 (- 3.0 (* 2.0 x2))))))
(if (<= x1 -2.1e+102)
(* x1 (+ -1.0 (* x1 (+ 9.0 (* x1 -19.0)))))
(if (<= x1 4.5e+153)
(+
x1
(-
(* 3.0 (/ (- (- (* x1 (* x1 3.0)) (* 2.0 x2)) x1) (+ (* x1 x1) 1.0)))
(-
(-
(*
x1
(+
(*
x1
(-
(* x1 (+ 3.0 (+ (* 3.0 (* x1 (- (* 2.0 x2) 3.0))) t_0)))
(* x2 6.0)))
t_0))
(* x1 (* x1 x1)))
x1)))
(+ (* x2 -6.0) (* x1 (+ -1.0 (* x1 9.0))))))))
double code(double x1, double x2) {
double t_0 = 4.0 * (x2 * (3.0 - (2.0 * x2)));
double tmp;
if (x1 <= -2.1e+102) {
tmp = x1 * (-1.0 + (x1 * (9.0 + (x1 * -19.0))));
} else if (x1 <= 4.5e+153) {
tmp = x1 + ((3.0 * ((((x1 * (x1 * 3.0)) - (2.0 * x2)) - x1) / ((x1 * x1) + 1.0))) - (((x1 * ((x1 * ((x1 * (3.0 + ((3.0 * (x1 * ((2.0 * x2) - 3.0))) + t_0))) - (x2 * 6.0))) + t_0)) - (x1 * (x1 * x1))) - x1));
} else {
tmp = (x2 * -6.0) + (x1 * (-1.0 + (x1 * 9.0)));
}
return tmp;
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
real(8) :: t_0
real(8) :: tmp
t_0 = 4.0d0 * (x2 * (3.0d0 - (2.0d0 * x2)))
if (x1 <= (-2.1d+102)) then
tmp = x1 * ((-1.0d0) + (x1 * (9.0d0 + (x1 * (-19.0d0)))))
else if (x1 <= 4.5d+153) then
tmp = x1 + ((3.0d0 * ((((x1 * (x1 * 3.0d0)) - (2.0d0 * x2)) - x1) / ((x1 * x1) + 1.0d0))) - (((x1 * ((x1 * ((x1 * (3.0d0 + ((3.0d0 * (x1 * ((2.0d0 * x2) - 3.0d0))) + t_0))) - (x2 * 6.0d0))) + t_0)) - (x1 * (x1 * x1))) - x1))
else
tmp = (x2 * (-6.0d0)) + (x1 * ((-1.0d0) + (x1 * 9.0d0)))
end if
code = tmp
end function
public static double code(double x1, double x2) {
double t_0 = 4.0 * (x2 * (3.0 - (2.0 * x2)));
double tmp;
if (x1 <= -2.1e+102) {
tmp = x1 * (-1.0 + (x1 * (9.0 + (x1 * -19.0))));
} else if (x1 <= 4.5e+153) {
tmp = x1 + ((3.0 * ((((x1 * (x1 * 3.0)) - (2.0 * x2)) - x1) / ((x1 * x1) + 1.0))) - (((x1 * ((x1 * ((x1 * (3.0 + ((3.0 * (x1 * ((2.0 * x2) - 3.0))) + t_0))) - (x2 * 6.0))) + t_0)) - (x1 * (x1 * x1))) - x1));
} else {
tmp = (x2 * -6.0) + (x1 * (-1.0 + (x1 * 9.0)));
}
return tmp;
}
def code(x1, x2): t_0 = 4.0 * (x2 * (3.0 - (2.0 * x2))) tmp = 0 if x1 <= -2.1e+102: tmp = x1 * (-1.0 + (x1 * (9.0 + (x1 * -19.0)))) elif x1 <= 4.5e+153: tmp = x1 + ((3.0 * ((((x1 * (x1 * 3.0)) - (2.0 * x2)) - x1) / ((x1 * x1) + 1.0))) - (((x1 * ((x1 * ((x1 * (3.0 + ((3.0 * (x1 * ((2.0 * x2) - 3.0))) + t_0))) - (x2 * 6.0))) + t_0)) - (x1 * (x1 * x1))) - x1)) else: tmp = (x2 * -6.0) + (x1 * (-1.0 + (x1 * 9.0))) return tmp
function code(x1, x2) t_0 = Float64(4.0 * Float64(x2 * Float64(3.0 - Float64(2.0 * x2)))) tmp = 0.0 if (x1 <= -2.1e+102) tmp = Float64(x1 * Float64(-1.0 + Float64(x1 * Float64(9.0 + Float64(x1 * -19.0))))); elseif (x1 <= 4.5e+153) tmp = Float64(x1 + Float64(Float64(3.0 * Float64(Float64(Float64(Float64(x1 * Float64(x1 * 3.0)) - Float64(2.0 * x2)) - x1) / Float64(Float64(x1 * x1) + 1.0))) - Float64(Float64(Float64(x1 * Float64(Float64(x1 * Float64(Float64(x1 * Float64(3.0 + Float64(Float64(3.0 * Float64(x1 * Float64(Float64(2.0 * x2) - 3.0))) + t_0))) - Float64(x2 * 6.0))) + t_0)) - Float64(x1 * Float64(x1 * x1))) - x1))); else tmp = Float64(Float64(x2 * -6.0) + Float64(x1 * Float64(-1.0 + Float64(x1 * 9.0)))); end return tmp end
function tmp_2 = code(x1, x2) t_0 = 4.0 * (x2 * (3.0 - (2.0 * x2))); tmp = 0.0; if (x1 <= -2.1e+102) tmp = x1 * (-1.0 + (x1 * (9.0 + (x1 * -19.0)))); elseif (x1 <= 4.5e+153) tmp = x1 + ((3.0 * ((((x1 * (x1 * 3.0)) - (2.0 * x2)) - x1) / ((x1 * x1) + 1.0))) - (((x1 * ((x1 * ((x1 * (3.0 + ((3.0 * (x1 * ((2.0 * x2) - 3.0))) + t_0))) - (x2 * 6.0))) + t_0)) - (x1 * (x1 * x1))) - x1)); else tmp = (x2 * -6.0) + (x1 * (-1.0 + (x1 * 9.0))); end tmp_2 = tmp; end
code[x1_, x2_] := Block[{t$95$0 = N[(4.0 * N[(x2 * N[(3.0 - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x1, -2.1e+102], N[(x1 * N[(-1.0 + N[(x1 * N[(9.0 + N[(x1 * -19.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 4.5e+153], N[(x1 + N[(N[(3.0 * N[(N[(N[(N[(x1 * N[(x1 * 3.0), $MachinePrecision]), $MachinePrecision] - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / N[(N[(x1 * x1), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[(N[(x1 * N[(N[(x1 * N[(N[(x1 * N[(3.0 + N[(N[(3.0 * N[(x1 * N[(N[(2.0 * x2), $MachinePrecision] - 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + t$95$0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(x2 * 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + t$95$0), $MachinePrecision]), $MachinePrecision] - N[(x1 * N[(x1 * x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x2 * -6.0), $MachinePrecision] + N[(x1 * N[(-1.0 + N[(x1 * 9.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := 4 \cdot \left(x2 \cdot \left(3 - 2 \cdot x2\right)\right)\\
\mathbf{if}\;x1 \leq -2.1 \cdot 10^{+102}:\\
\;\;\;\;x1 \cdot \left(-1 + x1 \cdot \left(9 + x1 \cdot -19\right)\right)\\
\mathbf{elif}\;x1 \leq 4.5 \cdot 10^{+153}:\\
\;\;\;\;x1 + \left(3 \cdot \frac{\left(x1 \cdot \left(x1 \cdot 3\right) - 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1} - \left(\left(x1 \cdot \left(x1 \cdot \left(x1 \cdot \left(3 + \left(3 \cdot \left(x1 \cdot \left(2 \cdot x2 - 3\right)\right) + t\_0\right)\right) - x2 \cdot 6\right) + t\_0\right) - x1 \cdot \left(x1 \cdot x1\right)\right) - x1\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x2 \cdot -6 + x1 \cdot \left(-1 + x1 \cdot 9\right)\\
\end{array}
\end{array}
if x1 < -2.10000000000000001e102Initial program 0.0%
Simplified0.0%
Taylor expanded in x1 around 0 80.0%
Taylor expanded in x2 around 0 100.0%
*-commutative100.0%
Simplified100.0%
Taylor expanded in x2 around 0 100.0%
if -2.10000000000000001e102 < x1 < 4.5000000000000001e153Initial program 99.5%
Taylor expanded in x1 around 0 81.8%
+-commutative81.8%
mul-1-neg81.8%
unsub-neg81.8%
Simplified81.8%
Taylor expanded in x1 around 0 76.9%
Taylor expanded in x1 around 0 78.3%
if 4.5000000000000001e153 < x1 Initial program 0.0%
Simplified0.0%
Taylor expanded in x1 around 0 0.0%
Taylor expanded in x2 around 0 0.0%
*-commutative0.0%
Simplified0.0%
Taylor expanded in x1 around 0 100.0%
*-commutative100.0%
Simplified100.0%
Final simplification84.3%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (* x1 (* x1 3.0)))
(t_1 (* x1 (* x1 x1)))
(t_2 (- -1.0 (* x1 x1)))
(t_3 (* 3.0 (/ (- (- t_0 (* 2.0 x2)) x1) t_2))))
(if (<= x1 -2.1e+102)
(* x1 (+ -1.0 (* x1 (+ 9.0 (* x1 -19.0)))))
(if (<= x1 2.9e+96)
(-
x1
(+
t_3
(-
(-
(-
(*
(-
(* (* x1 x1) 6.0)
(* (* (* x1 2.0) (* 2.0 x2)) (+ 3.0 (- x1 (* 2.0 x2)))))
t_2)
(* t_0 (* 2.0 x2)))
t_1)
x1)))
(if (<= x1 5e+153)
(- x1 (+ (- (- (* 4.0 (* x1 (* x2 (- 3.0 (* 2.0 x2))))) t_1) x1) t_3))
(+ (* x2 -6.0) (* x1 (+ -1.0 (* x1 9.0)))))))))
double code(double x1, double x2) {
double t_0 = x1 * (x1 * 3.0);
double t_1 = x1 * (x1 * x1);
double t_2 = -1.0 - (x1 * x1);
double t_3 = 3.0 * (((t_0 - (2.0 * x2)) - x1) / t_2);
double tmp;
if (x1 <= -2.1e+102) {
tmp = x1 * (-1.0 + (x1 * (9.0 + (x1 * -19.0))));
} else if (x1 <= 2.9e+96) {
tmp = x1 - (t_3 + (((((((x1 * x1) * 6.0) - (((x1 * 2.0) * (2.0 * x2)) * (3.0 + (x1 - (2.0 * x2))))) * t_2) - (t_0 * (2.0 * x2))) - t_1) - x1));
} else if (x1 <= 5e+153) {
tmp = x1 - ((((4.0 * (x1 * (x2 * (3.0 - (2.0 * x2))))) - t_1) - x1) + t_3);
} else {
tmp = (x2 * -6.0) + (x1 * (-1.0 + (x1 * 9.0)));
}
return tmp;
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
real(8) :: t_0
real(8) :: t_1
real(8) :: t_2
real(8) :: t_3
real(8) :: tmp
t_0 = x1 * (x1 * 3.0d0)
t_1 = x1 * (x1 * x1)
t_2 = (-1.0d0) - (x1 * x1)
t_3 = 3.0d0 * (((t_0 - (2.0d0 * x2)) - x1) / t_2)
if (x1 <= (-2.1d+102)) then
tmp = x1 * ((-1.0d0) + (x1 * (9.0d0 + (x1 * (-19.0d0)))))
else if (x1 <= 2.9d+96) then
tmp = x1 - (t_3 + (((((((x1 * x1) * 6.0d0) - (((x1 * 2.0d0) * (2.0d0 * x2)) * (3.0d0 + (x1 - (2.0d0 * x2))))) * t_2) - (t_0 * (2.0d0 * x2))) - t_1) - x1))
else if (x1 <= 5d+153) then
tmp = x1 - ((((4.0d0 * (x1 * (x2 * (3.0d0 - (2.0d0 * x2))))) - t_1) - x1) + t_3)
else
tmp = (x2 * (-6.0d0)) + (x1 * ((-1.0d0) + (x1 * 9.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 * x1);
double t_2 = -1.0 - (x1 * x1);
double t_3 = 3.0 * (((t_0 - (2.0 * x2)) - x1) / t_2);
double tmp;
if (x1 <= -2.1e+102) {
tmp = x1 * (-1.0 + (x1 * (9.0 + (x1 * -19.0))));
} else if (x1 <= 2.9e+96) {
tmp = x1 - (t_3 + (((((((x1 * x1) * 6.0) - (((x1 * 2.0) * (2.0 * x2)) * (3.0 + (x1 - (2.0 * x2))))) * t_2) - (t_0 * (2.0 * x2))) - t_1) - x1));
} else if (x1 <= 5e+153) {
tmp = x1 - ((((4.0 * (x1 * (x2 * (3.0 - (2.0 * x2))))) - t_1) - x1) + t_3);
} else {
tmp = (x2 * -6.0) + (x1 * (-1.0 + (x1 * 9.0)));
}
return tmp;
}
def code(x1, x2): t_0 = x1 * (x1 * 3.0) t_1 = x1 * (x1 * x1) t_2 = -1.0 - (x1 * x1) t_3 = 3.0 * (((t_0 - (2.0 * x2)) - x1) / t_2) tmp = 0 if x1 <= -2.1e+102: tmp = x1 * (-1.0 + (x1 * (9.0 + (x1 * -19.0)))) elif x1 <= 2.9e+96: tmp = x1 - (t_3 + (((((((x1 * x1) * 6.0) - (((x1 * 2.0) * (2.0 * x2)) * (3.0 + (x1 - (2.0 * x2))))) * t_2) - (t_0 * (2.0 * x2))) - t_1) - x1)) elif x1 <= 5e+153: tmp = x1 - ((((4.0 * (x1 * (x2 * (3.0 - (2.0 * x2))))) - t_1) - x1) + t_3) else: tmp = (x2 * -6.0) + (x1 * (-1.0 + (x1 * 9.0))) return tmp
function code(x1, x2) t_0 = Float64(x1 * Float64(x1 * 3.0)) t_1 = Float64(x1 * Float64(x1 * x1)) t_2 = Float64(-1.0 - Float64(x1 * x1)) t_3 = Float64(3.0 * Float64(Float64(Float64(t_0 - Float64(2.0 * x2)) - x1) / t_2)) tmp = 0.0 if (x1 <= -2.1e+102) tmp = Float64(x1 * Float64(-1.0 + Float64(x1 * Float64(9.0 + Float64(x1 * -19.0))))); elseif (x1 <= 2.9e+96) tmp = Float64(x1 - Float64(t_3 + Float64(Float64(Float64(Float64(Float64(Float64(Float64(x1 * x1) * 6.0) - Float64(Float64(Float64(x1 * 2.0) * Float64(2.0 * x2)) * Float64(3.0 + Float64(x1 - Float64(2.0 * x2))))) * t_2) - Float64(t_0 * Float64(2.0 * x2))) - t_1) - x1))); elseif (x1 <= 5e+153) tmp = Float64(x1 - Float64(Float64(Float64(Float64(4.0 * Float64(x1 * Float64(x2 * Float64(3.0 - Float64(2.0 * x2))))) - t_1) - x1) + t_3)); else tmp = Float64(Float64(x2 * -6.0) + Float64(x1 * Float64(-1.0 + Float64(x1 * 9.0)))); end return tmp end
function tmp_2 = code(x1, x2) t_0 = x1 * (x1 * 3.0); t_1 = x1 * (x1 * x1); t_2 = -1.0 - (x1 * x1); t_3 = 3.0 * (((t_0 - (2.0 * x2)) - x1) / t_2); tmp = 0.0; if (x1 <= -2.1e+102) tmp = x1 * (-1.0 + (x1 * (9.0 + (x1 * -19.0)))); elseif (x1 <= 2.9e+96) tmp = x1 - (t_3 + (((((((x1 * x1) * 6.0) - (((x1 * 2.0) * (2.0 * x2)) * (3.0 + (x1 - (2.0 * x2))))) * t_2) - (t_0 * (2.0 * x2))) - t_1) - x1)); elseif (x1 <= 5e+153) tmp = x1 - ((((4.0 * (x1 * (x2 * (3.0 - (2.0 * x2))))) - t_1) - x1) + t_3); else tmp = (x2 * -6.0) + (x1 * (-1.0 + (x1 * 9.0))); end tmp_2 = tmp; end
code[x1_, x2_] := Block[{t$95$0 = N[(x1 * N[(x1 * 3.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(x1 * N[(x1 * x1), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(-1.0 - N[(x1 * x1), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(3.0 * N[(N[(N[(t$95$0 - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$2), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x1, -2.1e+102], N[(x1 * N[(-1.0 + N[(x1 * N[(9.0 + N[(x1 * -19.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 2.9e+96], N[(x1 - N[(t$95$3 + N[(N[(N[(N[(N[(N[(N[(x1 * x1), $MachinePrecision] * 6.0), $MachinePrecision] - N[(N[(N[(x1 * 2.0), $MachinePrecision] * N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] * N[(3.0 + N[(x1 - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * t$95$2), $MachinePrecision] - N[(t$95$0 * N[(2.0 * x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision] - x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 5e+153], N[(x1 - N[(N[(N[(N[(4.0 * N[(x1 * N[(x2 * N[(3.0 - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision] - x1), $MachinePrecision] + t$95$3), $MachinePrecision]), $MachinePrecision], N[(N[(x2 * -6.0), $MachinePrecision] + N[(x1 * N[(-1.0 + N[(x1 * 9.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x1 \cdot \left(x1 \cdot 3\right)\\
t_1 := x1 \cdot \left(x1 \cdot x1\right)\\
t_2 := -1 - x1 \cdot x1\\
t_3 := 3 \cdot \frac{\left(t\_0 - 2 \cdot x2\right) - x1}{t\_2}\\
\mathbf{if}\;x1 \leq -2.1 \cdot 10^{+102}:\\
\;\;\;\;x1 \cdot \left(-1 + x1 \cdot \left(9 + x1 \cdot -19\right)\right)\\
\mathbf{elif}\;x1 \leq 2.9 \cdot 10^{+96}:\\
\;\;\;\;x1 - \left(t\_3 + \left(\left(\left(\left(\left(x1 \cdot x1\right) \cdot 6 - \left(\left(x1 \cdot 2\right) \cdot \left(2 \cdot x2\right)\right) \cdot \left(3 + \left(x1 - 2 \cdot x2\right)\right)\right) \cdot t\_2 - t\_0 \cdot \left(2 \cdot x2\right)\right) - t\_1\right) - x1\right)\right)\\
\mathbf{elif}\;x1 \leq 5 \cdot 10^{+153}:\\
\;\;\;\;x1 - \left(\left(\left(4 \cdot \left(x1 \cdot \left(x2 \cdot \left(3 - 2 \cdot x2\right)\right)\right) - t\_1\right) - x1\right) + t\_3\right)\\
\mathbf{else}:\\
\;\;\;\;x2 \cdot -6 + x1 \cdot \left(-1 + x1 \cdot 9\right)\\
\end{array}
\end{array}
if x1 < -2.10000000000000001e102Initial program 0.0%
Simplified0.0%
Taylor expanded in x1 around 0 80.0%
Taylor expanded in x2 around 0 100.0%
*-commutative100.0%
Simplified100.0%
Taylor expanded in x2 around 0 100.0%
if -2.10000000000000001e102 < x1 < 2.89999999999999978e96Initial program 99.5%
Taylor expanded in x1 around 0 82.2%
+-commutative82.2%
mul-1-neg82.2%
unsub-neg82.2%
Simplified82.2%
Taylor expanded in x1 around 0 92.7%
Taylor expanded in x1 around 0 89.8%
Taylor expanded in x1 around inf 89.6%
if 2.89999999999999978e96 < x1 < 5.00000000000000018e153Initial program 100.0%
Taylor expanded in x1 around 0 76.9%
+-commutative76.9%
mul-1-neg76.9%
unsub-neg76.9%
Simplified76.9%
Taylor expanded in x1 around 0 100.0%
Taylor expanded in x1 around 0 100.0%
if 5.00000000000000018e153 < x1 Initial program 0.0%
Simplified0.0%
Taylor expanded in x1 around 0 0.0%
Taylor expanded in x2 around 0 0.0%
*-commutative0.0%
Simplified0.0%
Taylor expanded in x1 around 0 100.0%
*-commutative100.0%
Simplified100.0%
Final simplification93.0%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (* x1 (* x1 3.0))))
(if (<= x1 -6e+73)
(* x2 (- (/ (* x1 (+ -1.0 (* x1 (+ 9.0 (* x1 -19.0))))) x2) 6.0))
(if (<= x1 5e+153)
(-
x1
(+
(* 3.0 (/ (- (- t_0 (* 2.0 x2)) x1) (- -1.0 (* x1 x1))))
(-
(-
(-
(* (+ (* x1 x1) 1.0) (* 4.0 (* x1 (* x2 (- 3.0 (* 2.0 x2))))))
(* 3.0 t_0))
(* x1 (* x1 x1)))
x1)))
(+ (* x2 -6.0) (* x1 (+ -1.0 (* x1 9.0))))))))
double code(double x1, double x2) {
double t_0 = x1 * (x1 * 3.0);
double tmp;
if (x1 <= -6e+73) {
tmp = x2 * (((x1 * (-1.0 + (x1 * (9.0 + (x1 * -19.0))))) / x2) - 6.0);
} else if (x1 <= 5e+153) {
tmp = x1 - ((3.0 * (((t_0 - (2.0 * x2)) - x1) / (-1.0 - (x1 * x1)))) + ((((((x1 * x1) + 1.0) * (4.0 * (x1 * (x2 * (3.0 - (2.0 * x2)))))) - (3.0 * t_0)) - (x1 * (x1 * x1))) - x1));
} else {
tmp = (x2 * -6.0) + (x1 * (-1.0 + (x1 * 9.0)));
}
return tmp;
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
real(8) :: t_0
real(8) :: tmp
t_0 = x1 * (x1 * 3.0d0)
if (x1 <= (-6d+73)) then
tmp = x2 * (((x1 * ((-1.0d0) + (x1 * (9.0d0 + (x1 * (-19.0d0)))))) / x2) - 6.0d0)
else if (x1 <= 5d+153) then
tmp = x1 - ((3.0d0 * (((t_0 - (2.0d0 * x2)) - x1) / ((-1.0d0) - (x1 * x1)))) + ((((((x1 * x1) + 1.0d0) * (4.0d0 * (x1 * (x2 * (3.0d0 - (2.0d0 * x2)))))) - (3.0d0 * t_0)) - (x1 * (x1 * x1))) - x1))
else
tmp = (x2 * (-6.0d0)) + (x1 * ((-1.0d0) + (x1 * 9.0d0)))
end if
code = tmp
end function
public static double code(double x1, double x2) {
double t_0 = x1 * (x1 * 3.0);
double tmp;
if (x1 <= -6e+73) {
tmp = x2 * (((x1 * (-1.0 + (x1 * (9.0 + (x1 * -19.0))))) / x2) - 6.0);
} else if (x1 <= 5e+153) {
tmp = x1 - ((3.0 * (((t_0 - (2.0 * x2)) - x1) / (-1.0 - (x1 * x1)))) + ((((((x1 * x1) + 1.0) * (4.0 * (x1 * (x2 * (3.0 - (2.0 * x2)))))) - (3.0 * t_0)) - (x1 * (x1 * x1))) - x1));
} else {
tmp = (x2 * -6.0) + (x1 * (-1.0 + (x1 * 9.0)));
}
return tmp;
}
def code(x1, x2): t_0 = x1 * (x1 * 3.0) tmp = 0 if x1 <= -6e+73: tmp = x2 * (((x1 * (-1.0 + (x1 * (9.0 + (x1 * -19.0))))) / x2) - 6.0) elif x1 <= 5e+153: tmp = x1 - ((3.0 * (((t_0 - (2.0 * x2)) - x1) / (-1.0 - (x1 * x1)))) + ((((((x1 * x1) + 1.0) * (4.0 * (x1 * (x2 * (3.0 - (2.0 * x2)))))) - (3.0 * t_0)) - (x1 * (x1 * x1))) - x1)) else: tmp = (x2 * -6.0) + (x1 * (-1.0 + (x1 * 9.0))) return tmp
function code(x1, x2) t_0 = Float64(x1 * Float64(x1 * 3.0)) tmp = 0.0 if (x1 <= -6e+73) tmp = Float64(x2 * Float64(Float64(Float64(x1 * Float64(-1.0 + Float64(x1 * Float64(9.0 + Float64(x1 * -19.0))))) / x2) - 6.0)); elseif (x1 <= 5e+153) tmp = Float64(x1 - Float64(Float64(3.0 * Float64(Float64(Float64(t_0 - Float64(2.0 * x2)) - x1) / Float64(-1.0 - Float64(x1 * x1)))) + Float64(Float64(Float64(Float64(Float64(Float64(x1 * x1) + 1.0) * Float64(4.0 * Float64(x1 * Float64(x2 * Float64(3.0 - Float64(2.0 * x2)))))) - Float64(3.0 * t_0)) - Float64(x1 * Float64(x1 * x1))) - x1))); else tmp = Float64(Float64(x2 * -6.0) + Float64(x1 * Float64(-1.0 + Float64(x1 * 9.0)))); end return tmp end
function tmp_2 = code(x1, x2) t_0 = x1 * (x1 * 3.0); tmp = 0.0; if (x1 <= -6e+73) tmp = x2 * (((x1 * (-1.0 + (x1 * (9.0 + (x1 * -19.0))))) / x2) - 6.0); elseif (x1 <= 5e+153) tmp = x1 - ((3.0 * (((t_0 - (2.0 * x2)) - x1) / (-1.0 - (x1 * x1)))) + ((((((x1 * x1) + 1.0) * (4.0 * (x1 * (x2 * (3.0 - (2.0 * x2)))))) - (3.0 * t_0)) - (x1 * (x1 * x1))) - x1)); else tmp = (x2 * -6.0) + (x1 * (-1.0 + (x1 * 9.0))); end tmp_2 = tmp; end
code[x1_, x2_] := Block[{t$95$0 = N[(x1 * N[(x1 * 3.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x1, -6e+73], N[(x2 * N[(N[(N[(x1 * N[(-1.0 + N[(x1 * N[(9.0 + N[(x1 * -19.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / x2), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 5e+153], N[(x1 - N[(N[(3.0 * N[(N[(N[(t$95$0 - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / N[(-1.0 - N[(x1 * x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(N[(N[(N[(N[(x1 * x1), $MachinePrecision] + 1.0), $MachinePrecision] * N[(4.0 * N[(x1 * N[(x2 * N[(3.0 - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(3.0 * t$95$0), $MachinePrecision]), $MachinePrecision] - N[(x1 * N[(x1 * x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x2 * -6.0), $MachinePrecision] + N[(x1 * N[(-1.0 + N[(x1 * 9.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x1 \cdot \left(x1 \cdot 3\right)\\
\mathbf{if}\;x1 \leq -6 \cdot 10^{+73}:\\
\;\;\;\;x2 \cdot \left(\frac{x1 \cdot \left(-1 + x1 \cdot \left(9 + x1 \cdot -19\right)\right)}{x2} - 6\right)\\
\mathbf{elif}\;x1 \leq 5 \cdot 10^{+153}:\\
\;\;\;\;x1 - \left(3 \cdot \frac{\left(t\_0 - 2 \cdot x2\right) - x1}{-1 - x1 \cdot x1} + \left(\left(\left(\left(x1 \cdot x1 + 1\right) \cdot \left(4 \cdot \left(x1 \cdot \left(x2 \cdot \left(3 - 2 \cdot x2\right)\right)\right)\right) - 3 \cdot t\_0\right) - x1 \cdot \left(x1 \cdot x1\right)\right) - x1\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x2 \cdot -6 + x1 \cdot \left(-1 + x1 \cdot 9\right)\\
\end{array}
\end{array}
if x1 < -6.00000000000000021e73Initial program 15.1%
Simplified15.1%
Taylor expanded in x1 around 0 72.8%
Taylor expanded in x2 around 0 86.1%
*-commutative86.1%
Simplified86.1%
Taylor expanded in x2 around inf 89.4%
if -6.00000000000000021e73 < x1 < 5.00000000000000018e153Initial program 99.5%
Taylor expanded in x1 around 0 84.2%
+-commutative84.2%
mul-1-neg84.2%
unsub-neg84.2%
Simplified84.2%
Taylor expanded in x1 around 0 79.8%
Taylor expanded in x1 around inf 79.5%
if 5.00000000000000018e153 < x1 Initial program 0.0%
Simplified0.0%
Taylor expanded in x1 around 0 0.0%
Taylor expanded in x2 around 0 0.0%
*-commutative0.0%
Simplified0.0%
Taylor expanded in x1 around 0 100.0%
*-commutative100.0%
Simplified100.0%
Final simplification83.6%
(FPCore (x1 x2)
:precision binary64
(if (<= x1 -6e+73)
(* x2 (- (/ (* x1 (+ -1.0 (* x1 (+ 9.0 (* x1 -19.0))))) x2) 6.0))
(if (<= x1 1.28e+101)
(+ (* x2 -6.0) (* x1 (+ -1.0 (* 4.0 (* x2 (- (* 2.0 x2) 3.0))))))
(if (<= x1 3.2e+151)
(+
x1
(+
(* 3.0 (/ (- (- (* x1 (* x1 3.0)) (* 2.0 x2)) x1) (+ (* x1 x1) 1.0)))
(+ x1 (+ (* x1 (* x1 x1)) (* x1 (* x2 (+ -12.0 (* x1 6.0))))))))
(+ (* x2 -6.0) (* x1 (+ -1.0 (* x1 9.0))))))))
double code(double x1, double x2) {
double tmp;
if (x1 <= -6e+73) {
tmp = x2 * (((x1 * (-1.0 + (x1 * (9.0 + (x1 * -19.0))))) / x2) - 6.0);
} else if (x1 <= 1.28e+101) {
tmp = (x2 * -6.0) + (x1 * (-1.0 + (4.0 * (x2 * ((2.0 * x2) - 3.0)))));
} else if (x1 <= 3.2e+151) {
tmp = x1 + ((3.0 * ((((x1 * (x1 * 3.0)) - (2.0 * x2)) - x1) / ((x1 * x1) + 1.0))) + (x1 + ((x1 * (x1 * x1)) + (x1 * (x2 * (-12.0 + (x1 * 6.0)))))));
} else {
tmp = (x2 * -6.0) + (x1 * (-1.0 + (x1 * 9.0)));
}
return tmp;
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
real(8) :: tmp
if (x1 <= (-6d+73)) then
tmp = x2 * (((x1 * ((-1.0d0) + (x1 * (9.0d0 + (x1 * (-19.0d0)))))) / x2) - 6.0d0)
else if (x1 <= 1.28d+101) then
tmp = (x2 * (-6.0d0)) + (x1 * ((-1.0d0) + (4.0d0 * (x2 * ((2.0d0 * x2) - 3.0d0)))))
else if (x1 <= 3.2d+151) then
tmp = x1 + ((3.0d0 * ((((x1 * (x1 * 3.0d0)) - (2.0d0 * x2)) - x1) / ((x1 * x1) + 1.0d0))) + (x1 + ((x1 * (x1 * x1)) + (x1 * (x2 * ((-12.0d0) + (x1 * 6.0d0)))))))
else
tmp = (x2 * (-6.0d0)) + (x1 * ((-1.0d0) + (x1 * 9.0d0)))
end if
code = tmp
end function
public static double code(double x1, double x2) {
double tmp;
if (x1 <= -6e+73) {
tmp = x2 * (((x1 * (-1.0 + (x1 * (9.0 + (x1 * -19.0))))) / x2) - 6.0);
} else if (x1 <= 1.28e+101) {
tmp = (x2 * -6.0) + (x1 * (-1.0 + (4.0 * (x2 * ((2.0 * x2) - 3.0)))));
} else if (x1 <= 3.2e+151) {
tmp = x1 + ((3.0 * ((((x1 * (x1 * 3.0)) - (2.0 * x2)) - x1) / ((x1 * x1) + 1.0))) + (x1 + ((x1 * (x1 * x1)) + (x1 * (x2 * (-12.0 + (x1 * 6.0)))))));
} else {
tmp = (x2 * -6.0) + (x1 * (-1.0 + (x1 * 9.0)));
}
return tmp;
}
def code(x1, x2): tmp = 0 if x1 <= -6e+73: tmp = x2 * (((x1 * (-1.0 + (x1 * (9.0 + (x1 * -19.0))))) / x2) - 6.0) elif x1 <= 1.28e+101: tmp = (x2 * -6.0) + (x1 * (-1.0 + (4.0 * (x2 * ((2.0 * x2) - 3.0))))) elif x1 <= 3.2e+151: tmp = x1 + ((3.0 * ((((x1 * (x1 * 3.0)) - (2.0 * x2)) - x1) / ((x1 * x1) + 1.0))) + (x1 + ((x1 * (x1 * x1)) + (x1 * (x2 * (-12.0 + (x1 * 6.0))))))) else: tmp = (x2 * -6.0) + (x1 * (-1.0 + (x1 * 9.0))) return tmp
function code(x1, x2) tmp = 0.0 if (x1 <= -6e+73) tmp = Float64(x2 * Float64(Float64(Float64(x1 * Float64(-1.0 + Float64(x1 * Float64(9.0 + Float64(x1 * -19.0))))) / x2) - 6.0)); elseif (x1 <= 1.28e+101) tmp = Float64(Float64(x2 * -6.0) + Float64(x1 * Float64(-1.0 + Float64(4.0 * Float64(x2 * Float64(Float64(2.0 * x2) - 3.0)))))); elseif (x1 <= 3.2e+151) tmp = Float64(x1 + Float64(Float64(3.0 * Float64(Float64(Float64(Float64(x1 * Float64(x1 * 3.0)) - Float64(2.0 * x2)) - x1) / Float64(Float64(x1 * x1) + 1.0))) + Float64(x1 + Float64(Float64(x1 * Float64(x1 * x1)) + Float64(x1 * Float64(x2 * Float64(-12.0 + Float64(x1 * 6.0)))))))); else tmp = Float64(Float64(x2 * -6.0) + Float64(x1 * Float64(-1.0 + Float64(x1 * 9.0)))); end return tmp end
function tmp_2 = code(x1, x2) tmp = 0.0; if (x1 <= -6e+73) tmp = x2 * (((x1 * (-1.0 + (x1 * (9.0 + (x1 * -19.0))))) / x2) - 6.0); elseif (x1 <= 1.28e+101) tmp = (x2 * -6.0) + (x1 * (-1.0 + (4.0 * (x2 * ((2.0 * x2) - 3.0))))); elseif (x1 <= 3.2e+151) tmp = x1 + ((3.0 * ((((x1 * (x1 * 3.0)) - (2.0 * x2)) - x1) / ((x1 * x1) + 1.0))) + (x1 + ((x1 * (x1 * x1)) + (x1 * (x2 * (-12.0 + (x1 * 6.0))))))); else tmp = (x2 * -6.0) + (x1 * (-1.0 + (x1 * 9.0))); end tmp_2 = tmp; end
code[x1_, x2_] := If[LessEqual[x1, -6e+73], N[(x2 * N[(N[(N[(x1 * N[(-1.0 + N[(x1 * N[(9.0 + N[(x1 * -19.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / x2), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 1.28e+101], N[(N[(x2 * -6.0), $MachinePrecision] + N[(x1 * N[(-1.0 + N[(4.0 * N[(x2 * N[(N[(2.0 * x2), $MachinePrecision] - 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 3.2e+151], N[(x1 + N[(N[(3.0 * N[(N[(N[(N[(x1 * N[(x1 * 3.0), $MachinePrecision]), $MachinePrecision] - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / N[(N[(x1 * x1), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(x1 + N[(N[(x1 * N[(x1 * x1), $MachinePrecision]), $MachinePrecision] + N[(x1 * N[(x2 * N[(-12.0 + N[(x1 * 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x2 * -6.0), $MachinePrecision] + N[(x1 * N[(-1.0 + N[(x1 * 9.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x1 \leq -6 \cdot 10^{+73}:\\
\;\;\;\;x2 \cdot \left(\frac{x1 \cdot \left(-1 + x1 \cdot \left(9 + x1 \cdot -19\right)\right)}{x2} - 6\right)\\
\mathbf{elif}\;x1 \leq 1.28 \cdot 10^{+101}:\\
\;\;\;\;x2 \cdot -6 + x1 \cdot \left(-1 + 4 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right)\right)\\
\mathbf{elif}\;x1 \leq 3.2 \cdot 10^{+151}:\\
\;\;\;\;x1 + \left(3 \cdot \frac{\left(x1 \cdot \left(x1 \cdot 3\right) - 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1} + \left(x1 + \left(x1 \cdot \left(x1 \cdot x1\right) + x1 \cdot \left(x2 \cdot \left(-12 + x1 \cdot 6\right)\right)\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x2 \cdot -6 + x1 \cdot \left(-1 + x1 \cdot 9\right)\\
\end{array}
\end{array}
if x1 < -6.00000000000000021e73Initial program 15.1%
Simplified15.1%
Taylor expanded in x1 around 0 72.8%
Taylor expanded in x2 around 0 86.1%
*-commutative86.1%
Simplified86.1%
Taylor expanded in x2 around inf 89.4%
if -6.00000000000000021e73 < x1 < 1.28e101Initial program 99.4%
Simplified99.7%
Taylor expanded in x1 around 0 77.7%
if 1.28e101 < x1 < 3.19999999999999994e151Initial program 100.0%
Taylor expanded in x1 around 0 90.0%
+-commutative90.0%
mul-1-neg90.0%
unsub-neg90.0%
Simplified90.0%
Taylor expanded in x1 around 0 100.0%
Taylor expanded in x2 around 0 70.0%
*-commutative70.0%
Simplified70.0%
Taylor expanded in x1 around 0 90.0%
associate-*r*90.0%
distribute-rgt-out90.0%
Simplified90.0%
if 3.19999999999999994e151 < x1 Initial program 3.7%
Simplified3.7%
Taylor expanded in x1 around 0 0.0%
Taylor expanded in x2 around 0 0.0%
*-commutative0.0%
Simplified0.0%
Taylor expanded in x1 around 0 96.8%
*-commutative96.8%
Simplified96.8%
Final simplification82.6%
(FPCore (x1 x2)
:precision binary64
(if (<= x1 -5.6e+73)
(* x2 (- (/ (* x1 (+ -1.0 (* x1 (+ 9.0 (* x1 -19.0))))) x2) 6.0))
(if (<= x1 5e+153)
(-
x1
(+
(- (- (* 4.0 (* x1 (* x2 (- 3.0 (* 2.0 x2))))) (* x1 (* x1 x1))) x1)
(* 3.0 (/ (- (- (* x1 (* x1 3.0)) (* 2.0 x2)) x1) (- -1.0 (* x1 x1))))))
(+ (* x2 -6.0) (* x1 (+ -1.0 (* x1 9.0)))))))
double code(double x1, double x2) {
double tmp;
if (x1 <= -5.6e+73) {
tmp = x2 * (((x1 * (-1.0 + (x1 * (9.0 + (x1 * -19.0))))) / x2) - 6.0);
} else if (x1 <= 5e+153) {
tmp = x1 - ((((4.0 * (x1 * (x2 * (3.0 - (2.0 * x2))))) - (x1 * (x1 * x1))) - x1) + (3.0 * ((((x1 * (x1 * 3.0)) - (2.0 * x2)) - x1) / (-1.0 - (x1 * x1)))));
} else {
tmp = (x2 * -6.0) + (x1 * (-1.0 + (x1 * 9.0)));
}
return tmp;
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
real(8) :: tmp
if (x1 <= (-5.6d+73)) then
tmp = x2 * (((x1 * ((-1.0d0) + (x1 * (9.0d0 + (x1 * (-19.0d0)))))) / x2) - 6.0d0)
else if (x1 <= 5d+153) then
tmp = x1 - ((((4.0d0 * (x1 * (x2 * (3.0d0 - (2.0d0 * x2))))) - (x1 * (x1 * x1))) - x1) + (3.0d0 * ((((x1 * (x1 * 3.0d0)) - (2.0d0 * x2)) - x1) / ((-1.0d0) - (x1 * x1)))))
else
tmp = (x2 * (-6.0d0)) + (x1 * ((-1.0d0) + (x1 * 9.0d0)))
end if
code = tmp
end function
public static double code(double x1, double x2) {
double tmp;
if (x1 <= -5.6e+73) {
tmp = x2 * (((x1 * (-1.0 + (x1 * (9.0 + (x1 * -19.0))))) / x2) - 6.0);
} else if (x1 <= 5e+153) {
tmp = x1 - ((((4.0 * (x1 * (x2 * (3.0 - (2.0 * x2))))) - (x1 * (x1 * x1))) - x1) + (3.0 * ((((x1 * (x1 * 3.0)) - (2.0 * x2)) - x1) / (-1.0 - (x1 * x1)))));
} else {
tmp = (x2 * -6.0) + (x1 * (-1.0 + (x1 * 9.0)));
}
return tmp;
}
def code(x1, x2): tmp = 0 if x1 <= -5.6e+73: tmp = x2 * (((x1 * (-1.0 + (x1 * (9.0 + (x1 * -19.0))))) / x2) - 6.0) elif x1 <= 5e+153: tmp = x1 - ((((4.0 * (x1 * (x2 * (3.0 - (2.0 * x2))))) - (x1 * (x1 * x1))) - x1) + (3.0 * ((((x1 * (x1 * 3.0)) - (2.0 * x2)) - x1) / (-1.0 - (x1 * x1))))) else: tmp = (x2 * -6.0) + (x1 * (-1.0 + (x1 * 9.0))) return tmp
function code(x1, x2) tmp = 0.0 if (x1 <= -5.6e+73) tmp = Float64(x2 * Float64(Float64(Float64(x1 * Float64(-1.0 + Float64(x1 * Float64(9.0 + Float64(x1 * -19.0))))) / x2) - 6.0)); elseif (x1 <= 5e+153) tmp = Float64(x1 - Float64(Float64(Float64(Float64(4.0 * Float64(x1 * Float64(x2 * Float64(3.0 - Float64(2.0 * x2))))) - Float64(x1 * Float64(x1 * x1))) - x1) + Float64(3.0 * Float64(Float64(Float64(Float64(x1 * Float64(x1 * 3.0)) - Float64(2.0 * x2)) - x1) / Float64(-1.0 - Float64(x1 * x1)))))); else tmp = Float64(Float64(x2 * -6.0) + Float64(x1 * Float64(-1.0 + Float64(x1 * 9.0)))); end return tmp end
function tmp_2 = code(x1, x2) tmp = 0.0; if (x1 <= -5.6e+73) tmp = x2 * (((x1 * (-1.0 + (x1 * (9.0 + (x1 * -19.0))))) / x2) - 6.0); elseif (x1 <= 5e+153) tmp = x1 - ((((4.0 * (x1 * (x2 * (3.0 - (2.0 * x2))))) - (x1 * (x1 * x1))) - x1) + (3.0 * ((((x1 * (x1 * 3.0)) - (2.0 * x2)) - x1) / (-1.0 - (x1 * x1))))); else tmp = (x2 * -6.0) + (x1 * (-1.0 + (x1 * 9.0))); end tmp_2 = tmp; end
code[x1_, x2_] := If[LessEqual[x1, -5.6e+73], N[(x2 * N[(N[(N[(x1 * N[(-1.0 + N[(x1 * N[(9.0 + N[(x1 * -19.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / x2), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 5e+153], N[(x1 - N[(N[(N[(N[(4.0 * N[(x1 * N[(x2 * N[(3.0 - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(x1 * N[(x1 * x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] + N[(3.0 * N[(N[(N[(N[(x1 * N[(x1 * 3.0), $MachinePrecision]), $MachinePrecision] - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / N[(-1.0 - N[(x1 * x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x2 * -6.0), $MachinePrecision] + N[(x1 * N[(-1.0 + N[(x1 * 9.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x1 \leq -5.6 \cdot 10^{+73}:\\
\;\;\;\;x2 \cdot \left(\frac{x1 \cdot \left(-1 + x1 \cdot \left(9 + x1 \cdot -19\right)\right)}{x2} - 6\right)\\
\mathbf{elif}\;x1 \leq 5 \cdot 10^{+153}:\\
\;\;\;\;x1 - \left(\left(\left(4 \cdot \left(x1 \cdot \left(x2 \cdot \left(3 - 2 \cdot x2\right)\right)\right) - x1 \cdot \left(x1 \cdot x1\right)\right) - x1\right) + 3 \cdot \frac{\left(x1 \cdot \left(x1 \cdot 3\right) - 2 \cdot x2\right) - x1}{-1 - x1 \cdot x1}\right)\\
\mathbf{else}:\\
\;\;\;\;x2 \cdot -6 + x1 \cdot \left(-1 + x1 \cdot 9\right)\\
\end{array}
\end{array}
if x1 < -5.60000000000000016e73Initial program 15.1%
Simplified15.1%
Taylor expanded in x1 around 0 72.8%
Taylor expanded in x2 around 0 86.1%
*-commutative86.1%
Simplified86.1%
Taylor expanded in x2 around inf 89.4%
if -5.60000000000000016e73 < x1 < 5.00000000000000018e153Initial program 99.5%
Taylor expanded in x1 around 0 84.2%
+-commutative84.2%
mul-1-neg84.2%
unsub-neg84.2%
Simplified84.2%
Taylor expanded in x1 around 0 79.8%
Taylor expanded in x1 around 0 79.2%
if 5.00000000000000018e153 < x1 Initial program 0.0%
Simplified0.0%
Taylor expanded in x1 around 0 0.0%
Taylor expanded in x2 around 0 0.0%
*-commutative0.0%
Simplified0.0%
Taylor expanded in x1 around 0 100.0%
*-commutative100.0%
Simplified100.0%
Final simplification83.5%
(FPCore (x1 x2)
:precision binary64
(if (<= x1 -6e+73)
(* x2 (- (/ (* x1 (+ -1.0 (* x1 (+ 9.0 (* x1 -19.0))))) x2) 6.0))
(if (<= x1 4.8e+132)
(+ (* x2 -6.0) (* x1 (+ -1.0 (* 4.0 (* x2 (- (* 2.0 x2) 3.0))))))
(+ (* x2 -6.0) (* x1 (+ -1.0 (* x1 9.0)))))))
double code(double x1, double x2) {
double tmp;
if (x1 <= -6e+73) {
tmp = x2 * (((x1 * (-1.0 + (x1 * (9.0 + (x1 * -19.0))))) / x2) - 6.0);
} else if (x1 <= 4.8e+132) {
tmp = (x2 * -6.0) + (x1 * (-1.0 + (4.0 * (x2 * ((2.0 * x2) - 3.0)))));
} else {
tmp = (x2 * -6.0) + (x1 * (-1.0 + (x1 * 9.0)));
}
return tmp;
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
real(8) :: tmp
if (x1 <= (-6d+73)) then
tmp = x2 * (((x1 * ((-1.0d0) + (x1 * (9.0d0 + (x1 * (-19.0d0)))))) / x2) - 6.0d0)
else if (x1 <= 4.8d+132) then
tmp = (x2 * (-6.0d0)) + (x1 * ((-1.0d0) + (4.0d0 * (x2 * ((2.0d0 * x2) - 3.0d0)))))
else
tmp = (x2 * (-6.0d0)) + (x1 * ((-1.0d0) + (x1 * 9.0d0)))
end if
code = tmp
end function
public static double code(double x1, double x2) {
double tmp;
if (x1 <= -6e+73) {
tmp = x2 * (((x1 * (-1.0 + (x1 * (9.0 + (x1 * -19.0))))) / x2) - 6.0);
} else if (x1 <= 4.8e+132) {
tmp = (x2 * -6.0) + (x1 * (-1.0 + (4.0 * (x2 * ((2.0 * x2) - 3.0)))));
} else {
tmp = (x2 * -6.0) + (x1 * (-1.0 + (x1 * 9.0)));
}
return tmp;
}
def code(x1, x2): tmp = 0 if x1 <= -6e+73: tmp = x2 * (((x1 * (-1.0 + (x1 * (9.0 + (x1 * -19.0))))) / x2) - 6.0) elif x1 <= 4.8e+132: tmp = (x2 * -6.0) + (x1 * (-1.0 + (4.0 * (x2 * ((2.0 * x2) - 3.0))))) else: tmp = (x2 * -6.0) + (x1 * (-1.0 + (x1 * 9.0))) return tmp
function code(x1, x2) tmp = 0.0 if (x1 <= -6e+73) tmp = Float64(x2 * Float64(Float64(Float64(x1 * Float64(-1.0 + Float64(x1 * Float64(9.0 + Float64(x1 * -19.0))))) / x2) - 6.0)); elseif (x1 <= 4.8e+132) tmp = Float64(Float64(x2 * -6.0) + Float64(x1 * Float64(-1.0 + Float64(4.0 * Float64(x2 * Float64(Float64(2.0 * x2) - 3.0)))))); else tmp = Float64(Float64(x2 * -6.0) + Float64(x1 * Float64(-1.0 + Float64(x1 * 9.0)))); end return tmp end
function tmp_2 = code(x1, x2) tmp = 0.0; if (x1 <= -6e+73) tmp = x2 * (((x1 * (-1.0 + (x1 * (9.0 + (x1 * -19.0))))) / x2) - 6.0); elseif (x1 <= 4.8e+132) tmp = (x2 * -6.0) + (x1 * (-1.0 + (4.0 * (x2 * ((2.0 * x2) - 3.0))))); else tmp = (x2 * -6.0) + (x1 * (-1.0 + (x1 * 9.0))); end tmp_2 = tmp; end
code[x1_, x2_] := If[LessEqual[x1, -6e+73], N[(x2 * N[(N[(N[(x1 * N[(-1.0 + N[(x1 * N[(9.0 + N[(x1 * -19.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / x2), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 4.8e+132], N[(N[(x2 * -6.0), $MachinePrecision] + N[(x1 * N[(-1.0 + N[(4.0 * N[(x2 * N[(N[(2.0 * x2), $MachinePrecision] - 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x2 * -6.0), $MachinePrecision] + N[(x1 * N[(-1.0 + N[(x1 * 9.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x1 \leq -6 \cdot 10^{+73}:\\
\;\;\;\;x2 \cdot \left(\frac{x1 \cdot \left(-1 + x1 \cdot \left(9 + x1 \cdot -19\right)\right)}{x2} - 6\right)\\
\mathbf{elif}\;x1 \leq 4.8 \cdot 10^{+132}:\\
\;\;\;\;x2 \cdot -6 + x1 \cdot \left(-1 + 4 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x2 \cdot -6 + x1 \cdot \left(-1 + x1 \cdot 9\right)\\
\end{array}
\end{array}
if x1 < -6.00000000000000021e73Initial program 15.1%
Simplified15.1%
Taylor expanded in x1 around 0 72.8%
Taylor expanded in x2 around 0 86.1%
*-commutative86.1%
Simplified86.1%
Taylor expanded in x2 around inf 89.4%
if -6.00000000000000021e73 < x1 < 4.8000000000000002e132Initial program 99.5%
Simplified99.7%
Taylor expanded in x1 around 0 75.4%
if 4.8000000000000002e132 < x1 Initial program 10.3%
Simplified10.3%
Taylor expanded in x1 around 0 0.0%
Taylor expanded in x2 around 0 0.0%
*-commutative0.0%
Simplified0.0%
Taylor expanded in x1 around 0 90.7%
*-commutative90.7%
Simplified90.7%
Final simplification80.0%
(FPCore (x1 x2) :precision binary64 (if (<= x1 -4e-110) (* x2 (- (/ (* x1 (+ -1.0 (* x1 (+ 9.0 (* x1 -19.0))))) x2) 6.0)) (+ (* x2 -6.0) (* x1 (+ -1.0 (* x1 9.0))))))
double code(double x1, double x2) {
double tmp;
if (x1 <= -4e-110) {
tmp = x2 * (((x1 * (-1.0 + (x1 * (9.0 + (x1 * -19.0))))) / x2) - 6.0);
} else {
tmp = (x2 * -6.0) + (x1 * (-1.0 + (x1 * 9.0)));
}
return tmp;
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
real(8) :: tmp
if (x1 <= (-4d-110)) then
tmp = x2 * (((x1 * ((-1.0d0) + (x1 * (9.0d0 + (x1 * (-19.0d0)))))) / x2) - 6.0d0)
else
tmp = (x2 * (-6.0d0)) + (x1 * ((-1.0d0) + (x1 * 9.0d0)))
end if
code = tmp
end function
public static double code(double x1, double x2) {
double tmp;
if (x1 <= -4e-110) {
tmp = x2 * (((x1 * (-1.0 + (x1 * (9.0 + (x1 * -19.0))))) / x2) - 6.0);
} else {
tmp = (x2 * -6.0) + (x1 * (-1.0 + (x1 * 9.0)));
}
return tmp;
}
def code(x1, x2): tmp = 0 if x1 <= -4e-110: tmp = x2 * (((x1 * (-1.0 + (x1 * (9.0 + (x1 * -19.0))))) / x2) - 6.0) else: tmp = (x2 * -6.0) + (x1 * (-1.0 + (x1 * 9.0))) return tmp
function code(x1, x2) tmp = 0.0 if (x1 <= -4e-110) tmp = Float64(x2 * Float64(Float64(Float64(x1 * Float64(-1.0 + Float64(x1 * Float64(9.0 + Float64(x1 * -19.0))))) / x2) - 6.0)); else tmp = Float64(Float64(x2 * -6.0) + Float64(x1 * Float64(-1.0 + Float64(x1 * 9.0)))); end return tmp end
function tmp_2 = code(x1, x2) tmp = 0.0; if (x1 <= -4e-110) tmp = x2 * (((x1 * (-1.0 + (x1 * (9.0 + (x1 * -19.0))))) / x2) - 6.0); else tmp = (x2 * -6.0) + (x1 * (-1.0 + (x1 * 9.0))); end tmp_2 = tmp; end
code[x1_, x2_] := If[LessEqual[x1, -4e-110], N[(x2 * N[(N[(N[(x1 * N[(-1.0 + N[(x1 * N[(9.0 + N[(x1 * -19.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / x2), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision], N[(N[(x2 * -6.0), $MachinePrecision] + N[(x1 * N[(-1.0 + N[(x1 * 9.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x1 \leq -4 \cdot 10^{-110}:\\
\;\;\;\;x2 \cdot \left(\frac{x1 \cdot \left(-1 + x1 \cdot \left(9 + x1 \cdot -19\right)\right)}{x2} - 6\right)\\
\mathbf{else}:\\
\;\;\;\;x2 \cdot -6 + x1 \cdot \left(-1 + x1 \cdot 9\right)\\
\end{array}
\end{array}
if x1 < -4.0000000000000002e-110Initial program 46.8%
Simplified46.8%
Taylor expanded in x1 around 0 54.6%
Taylor expanded in x2 around 0 61.0%
*-commutative61.0%
Simplified61.0%
Taylor expanded in x2 around inf 63.1%
if -4.0000000000000002e-110 < x1 Initial program 84.4%
Simplified84.6%
Taylor expanded in x1 around 0 55.0%
Taylor expanded in x2 around 0 54.7%
*-commutative54.7%
Simplified54.7%
Taylor expanded in x1 around 0 70.7%
*-commutative70.7%
Simplified70.7%
Final simplification68.2%
(FPCore (x1 x2) :precision binary64 (if (<= x1 -5.1e-8) (+ (* x1 (+ -1.0 (* x1 (+ 9.0 (* x1 -19.0))))) (* x2 -6.0)) (+ (* x2 -6.0) (* x1 (+ -1.0 (* x1 9.0))))))
double code(double x1, double x2) {
double tmp;
if (x1 <= -5.1e-8) {
tmp = (x1 * (-1.0 + (x1 * (9.0 + (x1 * -19.0))))) + (x2 * -6.0);
} else {
tmp = (x2 * -6.0) + (x1 * (-1.0 + (x1 * 9.0)));
}
return tmp;
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
real(8) :: tmp
if (x1 <= (-5.1d-8)) then
tmp = (x1 * ((-1.0d0) + (x1 * (9.0d0 + (x1 * (-19.0d0)))))) + (x2 * (-6.0d0))
else
tmp = (x2 * (-6.0d0)) + (x1 * ((-1.0d0) + (x1 * 9.0d0)))
end if
code = tmp
end function
public static double code(double x1, double x2) {
double tmp;
if (x1 <= -5.1e-8) {
tmp = (x1 * (-1.0 + (x1 * (9.0 + (x1 * -19.0))))) + (x2 * -6.0);
} else {
tmp = (x2 * -6.0) + (x1 * (-1.0 + (x1 * 9.0)));
}
return tmp;
}
def code(x1, x2): tmp = 0 if x1 <= -5.1e-8: tmp = (x1 * (-1.0 + (x1 * (9.0 + (x1 * -19.0))))) + (x2 * -6.0) else: tmp = (x2 * -6.0) + (x1 * (-1.0 + (x1 * 9.0))) return tmp
function code(x1, x2) tmp = 0.0 if (x1 <= -5.1e-8) tmp = Float64(Float64(x1 * Float64(-1.0 + Float64(x1 * Float64(9.0 + Float64(x1 * -19.0))))) + Float64(x2 * -6.0)); else tmp = Float64(Float64(x2 * -6.0) + Float64(x1 * Float64(-1.0 + Float64(x1 * 9.0)))); end return tmp end
function tmp_2 = code(x1, x2) tmp = 0.0; if (x1 <= -5.1e-8) tmp = (x1 * (-1.0 + (x1 * (9.0 + (x1 * -19.0))))) + (x2 * -6.0); else tmp = (x2 * -6.0) + (x1 * (-1.0 + (x1 * 9.0))); end tmp_2 = tmp; end
code[x1_, x2_] := If[LessEqual[x1, -5.1e-8], N[(N[(x1 * N[(-1.0 + N[(x1 * N[(9.0 + N[(x1 * -19.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(x2 * -6.0), $MachinePrecision]), $MachinePrecision], N[(N[(x2 * -6.0), $MachinePrecision] + N[(x1 * N[(-1.0 + N[(x1 * 9.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x1 \leq -5.1 \cdot 10^{-8}:\\
\;\;\;\;x1 \cdot \left(-1 + x1 \cdot \left(9 + x1 \cdot -19\right)\right) + x2 \cdot -6\\
\mathbf{else}:\\
\;\;\;\;x2 \cdot -6 + x1 \cdot \left(-1 + x1 \cdot 9\right)\\
\end{array}
\end{array}
if x1 < -5.10000000000000001e-8Initial program 38.0%
Simplified38.1%
Taylor expanded in x1 around 0 56.7%
Taylor expanded in x2 around 0 66.6%
*-commutative66.6%
Simplified66.6%
if -5.10000000000000001e-8 < x1 Initial program 85.4%
Simplified85.6%
Taylor expanded in x1 around 0 54.1%
Taylor expanded in x2 around 0 52.9%
*-commutative52.9%
Simplified52.9%
Taylor expanded in x1 around 0 67.8%
*-commutative67.8%
Simplified67.8%
Final simplification67.5%
(FPCore (x1 x2) :precision binary64 (if (<= x1 -1.7e-13) (* x1 (+ -1.0 (* x1 (+ 9.0 (* x1 -19.0))))) (+ (* x2 -6.0) (* x1 (+ -1.0 (* x1 9.0))))))
double code(double x1, double x2) {
double tmp;
if (x1 <= -1.7e-13) {
tmp = x1 * (-1.0 + (x1 * (9.0 + (x1 * -19.0))));
} else {
tmp = (x2 * -6.0) + (x1 * (-1.0 + (x1 * 9.0)));
}
return tmp;
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
real(8) :: tmp
if (x1 <= (-1.7d-13)) then
tmp = x1 * ((-1.0d0) + (x1 * (9.0d0 + (x1 * (-19.0d0)))))
else
tmp = (x2 * (-6.0d0)) + (x1 * ((-1.0d0) + (x1 * 9.0d0)))
end if
code = tmp
end function
public static double code(double x1, double x2) {
double tmp;
if (x1 <= -1.7e-13) {
tmp = x1 * (-1.0 + (x1 * (9.0 + (x1 * -19.0))));
} else {
tmp = (x2 * -6.0) + (x1 * (-1.0 + (x1 * 9.0)));
}
return tmp;
}
def code(x1, x2): tmp = 0 if x1 <= -1.7e-13: tmp = x1 * (-1.0 + (x1 * (9.0 + (x1 * -19.0)))) else: tmp = (x2 * -6.0) + (x1 * (-1.0 + (x1 * 9.0))) return tmp
function code(x1, x2) tmp = 0.0 if (x1 <= -1.7e-13) tmp = Float64(x1 * Float64(-1.0 + Float64(x1 * Float64(9.0 + Float64(x1 * -19.0))))); else tmp = Float64(Float64(x2 * -6.0) + Float64(x1 * Float64(-1.0 + Float64(x1 * 9.0)))); end return tmp end
function tmp_2 = code(x1, x2) tmp = 0.0; if (x1 <= -1.7e-13) tmp = x1 * (-1.0 + (x1 * (9.0 + (x1 * -19.0)))); else tmp = (x2 * -6.0) + (x1 * (-1.0 + (x1 * 9.0))); end tmp_2 = tmp; end
code[x1_, x2_] := If[LessEqual[x1, -1.7e-13], N[(x1 * N[(-1.0 + N[(x1 * N[(9.0 + N[(x1 * -19.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x2 * -6.0), $MachinePrecision] + N[(x1 * N[(-1.0 + N[(x1 * 9.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x1 \leq -1.7 \cdot 10^{-13}:\\
\;\;\;\;x1 \cdot \left(-1 + x1 \cdot \left(9 + x1 \cdot -19\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x2 \cdot -6 + x1 \cdot \left(-1 + x1 \cdot 9\right)\\
\end{array}
\end{array}
if x1 < -1.70000000000000008e-13Initial program 39.7%
Simplified39.7%
Taylor expanded in x1 around 0 56.5%
Taylor expanded in x2 around 0 64.8%
*-commutative64.8%
Simplified64.8%
Taylor expanded in x2 around 0 64.7%
if -1.70000000000000008e-13 < x1 Initial program 85.3%
Simplified85.4%
Taylor expanded in x1 around 0 54.1%
Taylor expanded in x2 around 0 53.4%
*-commutative53.4%
Simplified53.4%
Taylor expanded in x1 around 0 68.6%
*-commutative68.6%
Simplified68.6%
Final simplification67.4%
(FPCore (x1 x2) :precision binary64 (if (<= x1 -1.5e-14) (* x1 (+ -1.0 (* x1 (+ 9.0 (* x1 -19.0))))) (- (* x2 -6.0) x1)))
double code(double x1, double x2) {
double tmp;
if (x1 <= -1.5e-14) {
tmp = x1 * (-1.0 + (x1 * (9.0 + (x1 * -19.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.5d-14)) then
tmp = x1 * ((-1.0d0) + (x1 * (9.0d0 + (x1 * (-19.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.5e-14) {
tmp = x1 * (-1.0 + (x1 * (9.0 + (x1 * -19.0))));
} else {
tmp = (x2 * -6.0) - x1;
}
return tmp;
}
def code(x1, x2): tmp = 0 if x1 <= -1.5e-14: tmp = x1 * (-1.0 + (x1 * (9.0 + (x1 * -19.0)))) else: tmp = (x2 * -6.0) - x1 return tmp
function code(x1, x2) tmp = 0.0 if (x1 <= -1.5e-14) tmp = Float64(x1 * Float64(-1.0 + Float64(x1 * Float64(9.0 + Float64(x1 * -19.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.5e-14) tmp = x1 * (-1.0 + (x1 * (9.0 + (x1 * -19.0)))); else tmp = (x2 * -6.0) - x1; end tmp_2 = tmp; end
code[x1_, x2_] := If[LessEqual[x1, -1.5e-14], N[(x1 * N[(-1.0 + N[(x1 * N[(9.0 + N[(x1 * -19.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x2 * -6.0), $MachinePrecision] - x1), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x1 \leq -1.5 \cdot 10^{-14}:\\
\;\;\;\;x1 \cdot \left(-1 + x1 \cdot \left(9 + x1 \cdot -19\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x2 \cdot -6 - x1\\
\end{array}
\end{array}
if x1 < -1.4999999999999999e-14Initial program 39.7%
Simplified39.7%
Taylor expanded in x1 around 0 56.5%
Taylor expanded in x2 around 0 64.8%
*-commutative64.8%
Simplified64.8%
Taylor expanded in x2 around 0 64.7%
if -1.4999999999999999e-14 < x1 Initial program 85.3%
Simplified85.4%
Taylor expanded in x1 around 0 54.1%
Taylor expanded in x2 around 0 53.4%
*-commutative53.4%
Simplified53.4%
Taylor expanded in x1 around 0 53.6%
*-commutative53.6%
mul-1-neg53.6%
unsub-neg53.6%
*-commutative53.6%
Simplified53.6%
Final simplification56.8%
(FPCore (x1 x2) :precision binary64 (if (or (<= x2 -9.5e-168) (not (<= x2 6.5e-235))) (* x2 -6.0) (- x1)))
double code(double x1, double x2) {
double tmp;
if ((x2 <= -9.5e-168) || !(x2 <= 6.5e-235)) {
tmp = x2 * -6.0;
} else {
tmp = -x1;
}
return tmp;
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
real(8) :: tmp
if ((x2 <= (-9.5d-168)) .or. (.not. (x2 <= 6.5d-235))) then
tmp = x2 * (-6.0d0)
else
tmp = -x1
end if
code = tmp
end function
public static double code(double x1, double x2) {
double tmp;
if ((x2 <= -9.5e-168) || !(x2 <= 6.5e-235)) {
tmp = x2 * -6.0;
} else {
tmp = -x1;
}
return tmp;
}
def code(x1, x2): tmp = 0 if (x2 <= -9.5e-168) or not (x2 <= 6.5e-235): tmp = x2 * -6.0 else: tmp = -x1 return tmp
function code(x1, x2) tmp = 0.0 if ((x2 <= -9.5e-168) || !(x2 <= 6.5e-235)) tmp = Float64(x2 * -6.0); else tmp = Float64(-x1); end return tmp end
function tmp_2 = code(x1, x2) tmp = 0.0; if ((x2 <= -9.5e-168) || ~((x2 <= 6.5e-235))) tmp = x2 * -6.0; else tmp = -x1; end tmp_2 = tmp; end
code[x1_, x2_] := If[Or[LessEqual[x2, -9.5e-168], N[Not[LessEqual[x2, 6.5e-235]], $MachinePrecision]], N[(x2 * -6.0), $MachinePrecision], (-x1)]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x2 \leq -9.5 \cdot 10^{-168} \lor \neg \left(x2 \leq 6.5 \cdot 10^{-235}\right):\\
\;\;\;\;x2 \cdot -6\\
\mathbf{else}:\\
\;\;\;\;-x1\\
\end{array}
\end{array}
if x2 < -9.49999999999999918e-168 or 6.49999999999999973e-235 < x2 Initial program 73.5%
Simplified73.6%
Taylor expanded in x1 around 0 33.2%
*-commutative33.2%
Simplified33.2%
if -9.49999999999999918e-168 < x2 < 6.49999999999999973e-235Initial program 62.5%
Simplified63.1%
Taylor expanded in x1 around 0 67.0%
Taylor expanded in x2 around 0 67.0%
*-commutative67.0%
Simplified67.0%
Taylor expanded in x1 around 0 44.4%
*-commutative44.4%
mul-1-neg44.4%
unsub-neg44.4%
*-commutative44.4%
Simplified44.4%
Taylor expanded in x2 around 0 40.2%
neg-mul-140.2%
Simplified40.2%
Final simplification34.3%
(FPCore (x1 x2) :precision binary64 (* x2 (- (- 6.0) (/ x1 x2))))
double code(double x1, double x2) {
return x2 * (-6.0 - (x1 / x2));
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
code = x2 * (-6.0d0 - (x1 / x2))
end function
public static double code(double x1, double x2) {
return x2 * (-6.0 - (x1 / x2));
}
def code(x1, x2): return x2 * (-6.0 - (x1 / x2))
function code(x1, x2) return Float64(x2 * Float64(Float64(-6.0) - Float64(x1 / x2))) end
function tmp = code(x1, x2) tmp = x2 * (-6.0 - (x1 / x2)); end
code[x1_, x2_] := N[(x2 * N[((-6.0) - N[(x1 / x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x2 \cdot \left(\left(-6\right) - \frac{x1}{x2}\right)
\end{array}
Initial program 71.9%
Simplified72.1%
Taylor expanded in x1 around 0 54.8%
Taylor expanded in x2 around 0 56.8%
*-commutative56.8%
Simplified56.8%
Taylor expanded in x1 around 0 39.9%
*-commutative39.9%
mul-1-neg39.9%
unsub-neg39.9%
*-commutative39.9%
Simplified39.9%
Taylor expanded in x2 around -inf 46.4%
mul-1-neg46.4%
*-commutative46.4%
distribute-rgt-neg-in46.4%
+-commutative46.4%
Simplified46.4%
Final simplification46.4%
(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 71.9%
Simplified72.1%
Taylor expanded in x1 around 0 54.8%
Taylor expanded in x2 around 0 56.8%
*-commutative56.8%
Simplified56.8%
Taylor expanded in x1 around 0 39.9%
*-commutative39.9%
mul-1-neg39.9%
unsub-neg39.9%
*-commutative39.9%
Simplified39.9%
Final simplification39.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 71.9%
Simplified72.1%
Taylor expanded in x1 around 0 54.8%
Taylor expanded in x2 around 0 56.8%
*-commutative56.8%
Simplified56.8%
Taylor expanded in x1 around 0 39.9%
*-commutative39.9%
mul-1-neg39.9%
unsub-neg39.9%
*-commutative39.9%
Simplified39.9%
Taylor expanded in x2 around 0 11.9%
neg-mul-111.9%
Simplified11.9%
herbie shell --seed 2024139
(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))))))