
(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 34 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (* (* 3.0 x1) x1))
(t_1 (+ (* x1 x1) 1.0))
(t_2 (/ (- (+ t_0 (* 2.0 x2)) x1) t_1)))
(+
x1
(+
(+
(+
(+
(*
(+
(* (* (* 2.0 x1) t_2) (- t_2 3.0))
(* (* x1 x1) (- (* 4.0 t_2) 6.0)))
t_1)
(* t_0 t_2))
(* (* x1 x1) x1))
x1)
(* 3.0 (/ (- (- t_0 (* 2.0 x2)) x1) t_1))))))
double code(double x1, double x2) {
double t_0 = (3.0 * x1) * x1;
double t_1 = (x1 * x1) + 1.0;
double t_2 = ((t_0 + (2.0 * x2)) - x1) / t_1;
return x1 + (((((((((2.0 * x1) * t_2) * (t_2 - 3.0)) + ((x1 * x1) * ((4.0 * t_2) - 6.0))) * t_1) + (t_0 * t_2)) + ((x1 * x1) * x1)) + x1) + (3.0 * (((t_0 - (2.0 * x2)) - x1) / t_1)));
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
real(8) :: t_0
real(8) :: t_1
real(8) :: t_2
t_0 = (3.0d0 * x1) * x1
t_1 = (x1 * x1) + 1.0d0
t_2 = ((t_0 + (2.0d0 * x2)) - x1) / t_1
code = x1 + (((((((((2.0d0 * x1) * t_2) * (t_2 - 3.0d0)) + ((x1 * x1) * ((4.0d0 * t_2) - 6.0d0))) * t_1) + (t_0 * t_2)) + ((x1 * x1) * x1)) + x1) + (3.0d0 * (((t_0 - (2.0d0 * x2)) - x1) / t_1)))
end function
public static double code(double x1, double x2) {
double t_0 = (3.0 * x1) * x1;
double t_1 = (x1 * x1) + 1.0;
double t_2 = ((t_0 + (2.0 * x2)) - x1) / t_1;
return x1 + (((((((((2.0 * x1) * t_2) * (t_2 - 3.0)) + ((x1 * x1) * ((4.0 * t_2) - 6.0))) * t_1) + (t_0 * t_2)) + ((x1 * x1) * x1)) + x1) + (3.0 * (((t_0 - (2.0 * x2)) - x1) / t_1)));
}
def code(x1, x2): t_0 = (3.0 * x1) * x1 t_1 = (x1 * x1) + 1.0 t_2 = ((t_0 + (2.0 * x2)) - x1) / t_1 return x1 + (((((((((2.0 * x1) * t_2) * (t_2 - 3.0)) + ((x1 * x1) * ((4.0 * t_2) - 6.0))) * t_1) + (t_0 * t_2)) + ((x1 * x1) * x1)) + x1) + (3.0 * (((t_0 - (2.0 * x2)) - x1) / t_1)))
function code(x1, x2) t_0 = Float64(Float64(3.0 * x1) * x1) t_1 = Float64(Float64(x1 * x1) + 1.0) t_2 = Float64(Float64(Float64(t_0 + Float64(2.0 * x2)) - x1) / t_1) return Float64(x1 + Float64(Float64(Float64(Float64(Float64(Float64(Float64(Float64(Float64(2.0 * x1) * t_2) * Float64(t_2 - 3.0)) + Float64(Float64(x1 * x1) * Float64(Float64(4.0 * t_2) - 6.0))) * t_1) + Float64(t_0 * t_2)) + Float64(Float64(x1 * x1) * x1)) + x1) + Float64(3.0 * Float64(Float64(Float64(t_0 - Float64(2.0 * x2)) - x1) / t_1)))) end
function tmp = code(x1, x2) t_0 = (3.0 * x1) * x1; t_1 = (x1 * x1) + 1.0; t_2 = ((t_0 + (2.0 * x2)) - x1) / t_1; tmp = x1 + (((((((((2.0 * x1) * t_2) * (t_2 - 3.0)) + ((x1 * x1) * ((4.0 * t_2) - 6.0))) * t_1) + (t_0 * t_2)) + ((x1 * x1) * x1)) + x1) + (3.0 * (((t_0 - (2.0 * x2)) - x1) / t_1))); end
code[x1_, x2_] := Block[{t$95$0 = N[(N[(3.0 * x1), $MachinePrecision] * x1), $MachinePrecision]}, Block[{t$95$1 = N[(N[(x1 * x1), $MachinePrecision] + 1.0), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[(t$95$0 + N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$1), $MachinePrecision]}, N[(x1 + N[(N[(N[(N[(N[(N[(N[(N[(N[(2.0 * x1), $MachinePrecision] * t$95$2), $MachinePrecision] * N[(t$95$2 - 3.0), $MachinePrecision]), $MachinePrecision] + N[(N[(x1 * x1), $MachinePrecision] * N[(N[(4.0 * t$95$2), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * t$95$1), $MachinePrecision] + N[(t$95$0 * t$95$2), $MachinePrecision]), $MachinePrecision] + N[(N[(x1 * x1), $MachinePrecision] * x1), $MachinePrecision]), $MachinePrecision] + x1), $MachinePrecision] + N[(3.0 * N[(N[(N[(t$95$0 - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \left(3 \cdot x1\right) \cdot x1\\
t_1 := x1 \cdot x1 + 1\\
t_2 := \frac{\left(t\_0 + 2 \cdot x2\right) - x1}{t\_1}\\
x1 + \left(\left(\left(\left(\left(\left(\left(2 \cdot x1\right) \cdot t\_2\right) \cdot \left(t\_2 - 3\right) + \left(x1 \cdot x1\right) \cdot \left(4 \cdot t\_2 - 6\right)\right) \cdot t\_1 + t\_0 \cdot t\_2\right) + \left(x1 \cdot x1\right) \cdot x1\right) + x1\right) + 3 \cdot \frac{\left(t\_0 - 2 \cdot x2\right) - x1}{t\_1}\right)
\end{array}
\end{array}
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (/ (- (fma x1 (* x1 3.0) (* 2.0 x2)) x1) (fma x1 x1 1.0)))
(t_1 (* x1 (* x1 3.0)))
(t_2 (+ (* x1 x1) 1.0))
(t_3 (/ (- (+ t_1 (* 2.0 x2)) x1) t_2))
(t_4 (* 3.0 (* x1 x1))))
(if (<=
(+
x1
(+
(+
x1
(+
(+
(*
t_2
(+
(* (* (* x1 2.0) t_3) (- t_3 3.0))
(* (* x1 x1) (- (* t_3 4.0) 6.0))))
(* t_1 t_3))
(* x1 (* x1 x1))))
(* 3.0 (/ (- (- t_1 (* 2.0 x2)) x1) t_2))))
INFINITY)
(+
x1
(fma
3.0
(/ (- t_4 (fma 2.0 x2 x1)) (fma x1 x1 1.0))
(+
x1
(fma
(fma x1 x1 1.0)
(fma x1 (* x1 (fma t_0 4.0 -6.0)) (* (* x1 (* 2.0 t_0)) (+ t_0 -3.0)))
(fma t_4 t_0 (pow x1 3.0))))))
(+ x1 (+ (+ x1 (* (pow x1 4.0) (- 6.0 (/ 3.0 x1)))) 9.0)))))
double code(double x1, double x2) {
double t_0 = (fma(x1, (x1 * 3.0), (2.0 * x2)) - x1) / fma(x1, x1, 1.0);
double t_1 = x1 * (x1 * 3.0);
double t_2 = (x1 * x1) + 1.0;
double t_3 = ((t_1 + (2.0 * x2)) - x1) / t_2;
double t_4 = 3.0 * (x1 * x1);
double tmp;
if ((x1 + ((x1 + (((t_2 * ((((x1 * 2.0) * t_3) * (t_3 - 3.0)) + ((x1 * x1) * ((t_3 * 4.0) - 6.0)))) + (t_1 * t_3)) + (x1 * (x1 * x1)))) + (3.0 * (((t_1 - (2.0 * x2)) - x1) / t_2)))) <= ((double) INFINITY)) {
tmp = x1 + fma(3.0, ((t_4 - fma(2.0, x2, x1)) / fma(x1, x1, 1.0)), (x1 + fma(fma(x1, x1, 1.0), fma(x1, (x1 * fma(t_0, 4.0, -6.0)), ((x1 * (2.0 * t_0)) * (t_0 + -3.0))), fma(t_4, t_0, pow(x1, 3.0)))));
} else {
tmp = x1 + ((x1 + (pow(x1, 4.0) * (6.0 - (3.0 / x1)))) + 9.0);
}
return tmp;
}
function code(x1, x2) t_0 = Float64(Float64(fma(x1, Float64(x1 * 3.0), Float64(2.0 * x2)) - x1) / fma(x1, x1, 1.0)) t_1 = Float64(x1 * Float64(x1 * 3.0)) t_2 = Float64(Float64(x1 * x1) + 1.0) t_3 = Float64(Float64(Float64(t_1 + Float64(2.0 * x2)) - x1) / t_2) t_4 = Float64(3.0 * Float64(x1 * x1)) tmp = 0.0 if (Float64(x1 + Float64(Float64(x1 + Float64(Float64(Float64(t_2 * Float64(Float64(Float64(Float64(x1 * 2.0) * t_3) * Float64(t_3 - 3.0)) + Float64(Float64(x1 * x1) * Float64(Float64(t_3 * 4.0) - 6.0)))) + Float64(t_1 * t_3)) + Float64(x1 * Float64(x1 * x1)))) + Float64(3.0 * Float64(Float64(Float64(t_1 - Float64(2.0 * x2)) - x1) / t_2)))) <= Inf) tmp = Float64(x1 + fma(3.0, Float64(Float64(t_4 - fma(2.0, x2, x1)) / fma(x1, x1, 1.0)), Float64(x1 + fma(fma(x1, x1, 1.0), fma(x1, Float64(x1 * fma(t_0, 4.0, -6.0)), Float64(Float64(x1 * Float64(2.0 * t_0)) * Float64(t_0 + -3.0))), fma(t_4, t_0, (x1 ^ 3.0)))))); else tmp = Float64(x1 + Float64(Float64(x1 + Float64((x1 ^ 4.0) * Float64(6.0 - Float64(3.0 / x1)))) + 9.0)); end return tmp end
code[x1_, x2_] := Block[{t$95$0 = N[(N[(N[(x1 * N[(x1 * 3.0), $MachinePrecision] + N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / N[(x1 * x1 + 1.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(x1 * N[(x1 * 3.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(x1 * x1), $MachinePrecision] + 1.0), $MachinePrecision]}, Block[{t$95$3 = N[(N[(N[(t$95$1 + N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$2), $MachinePrecision]}, Block[{t$95$4 = N[(3.0 * N[(x1 * x1), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(x1 + N[(N[(x1 + N[(N[(N[(t$95$2 * N[(N[(N[(N[(x1 * 2.0), $MachinePrecision] * t$95$3), $MachinePrecision] * N[(t$95$3 - 3.0), $MachinePrecision]), $MachinePrecision] + N[(N[(x1 * x1), $MachinePrecision] * N[(N[(t$95$3 * 4.0), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(t$95$1 * t$95$3), $MachinePrecision]), $MachinePrecision] + N[(x1 * N[(x1 * x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(3.0 * N[(N[(N[(t$95$1 - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], Infinity], N[(x1 + N[(3.0 * N[(N[(t$95$4 - N[(2.0 * x2 + x1), $MachinePrecision]), $MachinePrecision] / N[(x1 * x1 + 1.0), $MachinePrecision]), $MachinePrecision] + N[(x1 + N[(N[(x1 * x1 + 1.0), $MachinePrecision] * N[(x1 * N[(x1 * N[(t$95$0 * 4.0 + -6.0), $MachinePrecision]), $MachinePrecision] + N[(N[(x1 * N[(2.0 * t$95$0), $MachinePrecision]), $MachinePrecision] * N[(t$95$0 + -3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(t$95$4 * t$95$0 + N[Power[x1, 3.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x1 + N[(N[(x1 + N[(N[Power[x1, 4.0], $MachinePrecision] * N[(6.0 - N[(3.0 / x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + 9.0), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{\mathsf{fma}\left(x1, x1 \cdot 3, 2 \cdot x2\right) - x1}{\mathsf{fma}\left(x1, x1, 1\right)}\\
t_1 := x1 \cdot \left(x1 \cdot 3\right)\\
t_2 := x1 \cdot x1 + 1\\
t_3 := \frac{\left(t\_1 + 2 \cdot x2\right) - x1}{t\_2}\\
t_4 := 3 \cdot \left(x1 \cdot x1\right)\\
\mathbf{if}\;x1 + \left(\left(x1 + \left(\left(t\_2 \cdot \left(\left(\left(x1 \cdot 2\right) \cdot t\_3\right) \cdot \left(t\_3 - 3\right) + \left(x1 \cdot x1\right) \cdot \left(t\_3 \cdot 4 - 6\right)\right) + t\_1 \cdot t\_3\right) + x1 \cdot \left(x1 \cdot x1\right)\right)\right) + 3 \cdot \frac{\left(t\_1 - 2 \cdot x2\right) - x1}{t\_2}\right) \leq \infty:\\
\;\;\;\;x1 + \mathsf{fma}\left(3, \frac{t\_4 - \mathsf{fma}\left(2, x2, x1\right)}{\mathsf{fma}\left(x1, x1, 1\right)}, x1 + \mathsf{fma}\left(\mathsf{fma}\left(x1, x1, 1\right), \mathsf{fma}\left(x1, x1 \cdot \mathsf{fma}\left(t\_0, 4, -6\right), \left(x1 \cdot \left(2 \cdot t\_0\right)\right) \cdot \left(t\_0 + -3\right)\right), \mathsf{fma}\left(t\_4, t\_0, {x1}^{3}\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x1 + \left(\left(x1 + {x1}^{4} \cdot \left(6 - \frac{3}{x1}\right)\right) + 9\right)\\
\end{array}
\end{array}
if (+.f64 x1 (+.f64 (+.f64 (+.f64 (+.f64 (*.f64 (+.f64 (*.f64 (*.f64 (*.f64 #s(literal 2 binary64) x1) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64)))) (-.f64 (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))) #s(literal 3 binary64))) (*.f64 (*.f64 x1 x1) (-.f64 (*.f64 #s(literal 4 binary64) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64)))) #s(literal 6 binary64)))) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))) (*.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))))) (*.f64 (*.f64 x1 x1) x1)) x1) (*.f64 #s(literal 3 binary64) (/.f64 (-.f64 (-.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64)))))) < +inf.0Initial program 99.4%
Simplified99.6%
if +inf.0 < (+.f64 x1 (+.f64 (+.f64 (+.f64 (+.f64 (*.f64 (+.f64 (*.f64 (*.f64 (*.f64 #s(literal 2 binary64) x1) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64)))) (-.f64 (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))) #s(literal 3 binary64))) (*.f64 (*.f64 x1 x1) (-.f64 (*.f64 #s(literal 4 binary64) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64)))) #s(literal 6 binary64)))) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))) (*.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))))) (*.f64 (*.f64 x1 x1) x1)) x1) (*.f64 #s(literal 3 binary64) (/.f64 (-.f64 (-.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64)))))) Initial program 0.0%
Taylor expanded in x1 around inf 7.4%
associate-*r/7.4%
metadata-eval7.4%
Simplified7.4%
Taylor expanded in x1 around inf 98.5%
Final simplification99.3%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (* x1 (* x1 x1)))
(t_1 (* x1 (* x1 3.0)))
(t_2 (+ (* x1 x1) 1.0))
(t_3 (/ (- (+ t_1 (* 2.0 x2)) x1) t_2))
(t_4 (* t_1 t_3))
(t_5 (* (* (* x1 2.0) t_3) (- t_3 3.0)))
(t_6 (* 3.0 (/ (- (- t_1 (* 2.0 x2)) x1) t_2))))
(if (<=
(+
x1
(+
(+
x1
(+ (+ (* t_2 (+ t_5 (* (* x1 x1) (- (* t_3 4.0) 6.0)))) t_4) t_0))
t_6))
INFINITY)
(+
x1
(+
t_6
(+
x1
(+
t_0
(+
t_4
(*
t_2
(+
t_5
(*
(* x1 x1)
(-
(*
4.0
(/ (fma 3.0 (pow x1 2.0) (- (* 2.0 x2) x1)) (fma x1 x1 1.0)))
6.0)))))))))
(+ x1 (+ (+ x1 (* (pow x1 4.0) (- 6.0 (/ 3.0 x1)))) 9.0)))))
double code(double x1, double x2) {
double t_0 = x1 * (x1 * x1);
double t_1 = x1 * (x1 * 3.0);
double t_2 = (x1 * x1) + 1.0;
double t_3 = ((t_1 + (2.0 * x2)) - x1) / t_2;
double t_4 = t_1 * t_3;
double t_5 = ((x1 * 2.0) * t_3) * (t_3 - 3.0);
double t_6 = 3.0 * (((t_1 - (2.0 * x2)) - x1) / t_2);
double tmp;
if ((x1 + ((x1 + (((t_2 * (t_5 + ((x1 * x1) * ((t_3 * 4.0) - 6.0)))) + t_4) + t_0)) + t_6)) <= ((double) INFINITY)) {
tmp = x1 + (t_6 + (x1 + (t_0 + (t_4 + (t_2 * (t_5 + ((x1 * x1) * ((4.0 * (fma(3.0, pow(x1, 2.0), ((2.0 * x2) - x1)) / fma(x1, x1, 1.0))) - 6.0))))))));
} else {
tmp = x1 + ((x1 + (pow(x1, 4.0) * (6.0 - (3.0 / x1)))) + 9.0);
}
return tmp;
}
function code(x1, x2) t_0 = Float64(x1 * Float64(x1 * x1)) t_1 = Float64(x1 * Float64(x1 * 3.0)) t_2 = Float64(Float64(x1 * x1) + 1.0) t_3 = Float64(Float64(Float64(t_1 + Float64(2.0 * x2)) - x1) / t_2) t_4 = Float64(t_1 * t_3) t_5 = Float64(Float64(Float64(x1 * 2.0) * t_3) * Float64(t_3 - 3.0)) t_6 = Float64(3.0 * Float64(Float64(Float64(t_1 - Float64(2.0 * x2)) - x1) / t_2)) tmp = 0.0 if (Float64(x1 + Float64(Float64(x1 + Float64(Float64(Float64(t_2 * Float64(t_5 + Float64(Float64(x1 * x1) * Float64(Float64(t_3 * 4.0) - 6.0)))) + t_4) + t_0)) + t_6)) <= Inf) tmp = Float64(x1 + Float64(t_6 + Float64(x1 + Float64(t_0 + Float64(t_4 + Float64(t_2 * Float64(t_5 + Float64(Float64(x1 * x1) * Float64(Float64(4.0 * Float64(fma(3.0, (x1 ^ 2.0), Float64(Float64(2.0 * x2) - x1)) / fma(x1, x1, 1.0))) - 6.0))))))))); else tmp = Float64(x1 + Float64(Float64(x1 + Float64((x1 ^ 4.0) * Float64(6.0 - Float64(3.0 / x1)))) + 9.0)); end return tmp end
code[x1_, x2_] := Block[{t$95$0 = N[(x1 * N[(x1 * x1), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(x1 * N[(x1 * 3.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(x1 * x1), $MachinePrecision] + 1.0), $MachinePrecision]}, Block[{t$95$3 = N[(N[(N[(t$95$1 + N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$2), $MachinePrecision]}, Block[{t$95$4 = N[(t$95$1 * t$95$3), $MachinePrecision]}, Block[{t$95$5 = N[(N[(N[(x1 * 2.0), $MachinePrecision] * t$95$3), $MachinePrecision] * N[(t$95$3 - 3.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$6 = N[(3.0 * N[(N[(N[(t$95$1 - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$2), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(x1 + N[(N[(x1 + N[(N[(N[(t$95$2 * N[(t$95$5 + N[(N[(x1 * x1), $MachinePrecision] * N[(N[(t$95$3 * 4.0), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + t$95$4), $MachinePrecision] + t$95$0), $MachinePrecision]), $MachinePrecision] + t$95$6), $MachinePrecision]), $MachinePrecision], Infinity], N[(x1 + N[(t$95$6 + N[(x1 + N[(t$95$0 + N[(t$95$4 + N[(t$95$2 * N[(t$95$5 + N[(N[(x1 * x1), $MachinePrecision] * N[(N[(4.0 * N[(N[(3.0 * N[Power[x1, 2.0], $MachinePrecision] + N[(N[(2.0 * x2), $MachinePrecision] - x1), $MachinePrecision]), $MachinePrecision] / N[(x1 * x1 + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x1 + N[(N[(x1 + N[(N[Power[x1, 4.0], $MachinePrecision] * N[(6.0 - N[(3.0 / x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + 9.0), $MachinePrecision]), $MachinePrecision]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x1 \cdot \left(x1 \cdot x1\right)\\
t_1 := x1 \cdot \left(x1 \cdot 3\right)\\
t_2 := x1 \cdot x1 + 1\\
t_3 := \frac{\left(t\_1 + 2 \cdot x2\right) - x1}{t\_2}\\
t_4 := t\_1 \cdot t\_3\\
t_5 := \left(\left(x1 \cdot 2\right) \cdot t\_3\right) \cdot \left(t\_3 - 3\right)\\
t_6 := 3 \cdot \frac{\left(t\_1 - 2 \cdot x2\right) - x1}{t\_2}\\
\mathbf{if}\;x1 + \left(\left(x1 + \left(\left(t\_2 \cdot \left(t\_5 + \left(x1 \cdot x1\right) \cdot \left(t\_3 \cdot 4 - 6\right)\right) + t\_4\right) + t\_0\right)\right) + t\_6\right) \leq \infty:\\
\;\;\;\;x1 + \left(t\_6 + \left(x1 + \left(t\_0 + \left(t\_4 + t\_2 \cdot \left(t\_5 + \left(x1 \cdot x1\right) \cdot \left(4 \cdot \frac{\mathsf{fma}\left(3, {x1}^{2}, 2 \cdot x2 - x1\right)}{\mathsf{fma}\left(x1, x1, 1\right)} - 6\right)\right)\right)\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x1 + \left(\left(x1 + {x1}^{4} \cdot \left(6 - \frac{3}{x1}\right)\right) + 9\right)\\
\end{array}
\end{array}
if (+.f64 x1 (+.f64 (+.f64 (+.f64 (+.f64 (*.f64 (+.f64 (*.f64 (*.f64 (*.f64 #s(literal 2 binary64) x1) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64)))) (-.f64 (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))) #s(literal 3 binary64))) (*.f64 (*.f64 x1 x1) (-.f64 (*.f64 #s(literal 4 binary64) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64)))) #s(literal 6 binary64)))) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))) (*.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))))) (*.f64 (*.f64 x1 x1) x1)) x1) (*.f64 #s(literal 3 binary64) (/.f64 (-.f64 (-.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64)))))) < +inf.0Initial program 99.4%
fma-define99.4%
*-un-lft-identity99.4%
associate--l+99.4%
associate-*r*99.5%
fma-define99.5%
pow299.5%
Applied egg-rr99.5%
*-lft-identity99.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%
Taylor expanded in x1 around inf 7.4%
associate-*r/7.4%
metadata-eval7.4%
Simplified7.4%
Taylor expanded in x1 around inf 98.5%
Final simplification99.2%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (* x1 (* x1 3.0)))
(t_1 (+ (* x1 x1) 1.0))
(t_2 (/ (- (+ t_0 (* 2.0 x2)) x1) t_1))
(t_3
(+
x1
(+
(+
x1
(+
(+
(*
t_1
(+
(* (* (* x1 2.0) t_2) (- t_2 3.0))
(* (* x1 x1) (- (* t_2 4.0) 6.0))))
(* t_0 t_2))
(* x1 (* x1 x1))))
(* 3.0 (/ (- (- t_0 (* 2.0 x2)) x1) t_1))))))
(if (<= t_3 INFINITY)
t_3
(+ x1 (+ (+ x1 (* (pow x1 4.0) (- 6.0 (/ 3.0 x1)))) 9.0)))))
double code(double x1, double x2) {
double t_0 = x1 * (x1 * 3.0);
double t_1 = (x1 * x1) + 1.0;
double t_2 = ((t_0 + (2.0 * x2)) - x1) / t_1;
double t_3 = x1 + ((x1 + (((t_1 * ((((x1 * 2.0) * t_2) * (t_2 - 3.0)) + ((x1 * x1) * ((t_2 * 4.0) - 6.0)))) + (t_0 * t_2)) + (x1 * (x1 * x1)))) + (3.0 * (((t_0 - (2.0 * x2)) - x1) / t_1)));
double tmp;
if (t_3 <= ((double) INFINITY)) {
tmp = t_3;
} else {
tmp = x1 + ((x1 + (pow(x1, 4.0) * (6.0 - (3.0 / x1)))) + 9.0);
}
return tmp;
}
public static double code(double x1, double x2) {
double t_0 = x1 * (x1 * 3.0);
double t_1 = (x1 * x1) + 1.0;
double t_2 = ((t_0 + (2.0 * x2)) - x1) / t_1;
double t_3 = x1 + ((x1 + (((t_1 * ((((x1 * 2.0) * t_2) * (t_2 - 3.0)) + ((x1 * x1) * ((t_2 * 4.0) - 6.0)))) + (t_0 * t_2)) + (x1 * (x1 * x1)))) + (3.0 * (((t_0 - (2.0 * x2)) - x1) / t_1)));
double tmp;
if (t_3 <= Double.POSITIVE_INFINITY) {
tmp = t_3;
} else {
tmp = x1 + ((x1 + (Math.pow(x1, 4.0) * (6.0 - (3.0 / x1)))) + 9.0);
}
return tmp;
}
def code(x1, x2): t_0 = x1 * (x1 * 3.0) t_1 = (x1 * x1) + 1.0 t_2 = ((t_0 + (2.0 * x2)) - x1) / t_1 t_3 = x1 + ((x1 + (((t_1 * ((((x1 * 2.0) * t_2) * (t_2 - 3.0)) + ((x1 * x1) * ((t_2 * 4.0) - 6.0)))) + (t_0 * t_2)) + (x1 * (x1 * x1)))) + (3.0 * (((t_0 - (2.0 * x2)) - x1) / t_1))) tmp = 0 if t_3 <= math.inf: tmp = t_3 else: tmp = x1 + ((x1 + (math.pow(x1, 4.0) * (6.0 - (3.0 / x1)))) + 9.0) return tmp
function code(x1, x2) t_0 = Float64(x1 * Float64(x1 * 3.0)) t_1 = Float64(Float64(x1 * x1) + 1.0) t_2 = Float64(Float64(Float64(t_0 + Float64(2.0 * x2)) - x1) / t_1) t_3 = Float64(x1 + Float64(Float64(x1 + Float64(Float64(Float64(t_1 * Float64(Float64(Float64(Float64(x1 * 2.0) * t_2) * Float64(t_2 - 3.0)) + Float64(Float64(x1 * x1) * Float64(Float64(t_2 * 4.0) - 6.0)))) + Float64(t_0 * t_2)) + Float64(x1 * Float64(x1 * x1)))) + Float64(3.0 * Float64(Float64(Float64(t_0 - Float64(2.0 * x2)) - x1) / t_1)))) tmp = 0.0 if (t_3 <= Inf) tmp = t_3; else tmp = Float64(x1 + Float64(Float64(x1 + Float64((x1 ^ 4.0) * Float64(6.0 - Float64(3.0 / x1)))) + 9.0)); end return tmp end
function tmp_2 = code(x1, x2) t_0 = x1 * (x1 * 3.0); t_1 = (x1 * x1) + 1.0; t_2 = ((t_0 + (2.0 * x2)) - x1) / t_1; t_3 = x1 + ((x1 + (((t_1 * ((((x1 * 2.0) * t_2) * (t_2 - 3.0)) + ((x1 * x1) * ((t_2 * 4.0) - 6.0)))) + (t_0 * t_2)) + (x1 * (x1 * x1)))) + (3.0 * (((t_0 - (2.0 * x2)) - x1) / t_1))); tmp = 0.0; if (t_3 <= Inf) tmp = t_3; else tmp = x1 + ((x1 + ((x1 ^ 4.0) * (6.0 - (3.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[(x1 * x1), $MachinePrecision] + 1.0), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[(t$95$0 + N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$1), $MachinePrecision]}, Block[{t$95$3 = N[(x1 + N[(N[(x1 + N[(N[(N[(t$95$1 * N[(N[(N[(N[(x1 * 2.0), $MachinePrecision] * t$95$2), $MachinePrecision] * N[(t$95$2 - 3.0), $MachinePrecision]), $MachinePrecision] + N[(N[(x1 * x1), $MachinePrecision] * N[(N[(t$95$2 * 4.0), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(t$95$0 * t$95$2), $MachinePrecision]), $MachinePrecision] + N[(x1 * N[(x1 * x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(3.0 * N[(N[(N[(t$95$0 - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$3, Infinity], t$95$3, N[(x1 + N[(N[(x1 + N[(N[Power[x1, 4.0], $MachinePrecision] * N[(6.0 - N[(3.0 / x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + 9.0), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x1 \cdot \left(x1 \cdot 3\right)\\
t_1 := x1 \cdot x1 + 1\\
t_2 := \frac{\left(t\_0 + 2 \cdot x2\right) - x1}{t\_1}\\
t_3 := x1 + \left(\left(x1 + \left(\left(t\_1 \cdot \left(\left(\left(x1 \cdot 2\right) \cdot t\_2\right) \cdot \left(t\_2 - 3\right) + \left(x1 \cdot x1\right) \cdot \left(t\_2 \cdot 4 - 6\right)\right) + t\_0 \cdot t\_2\right) + x1 \cdot \left(x1 \cdot x1\right)\right)\right) + 3 \cdot \frac{\left(t\_0 - 2 \cdot x2\right) - x1}{t\_1}\right)\\
\mathbf{if}\;t\_3 \leq \infty:\\
\;\;\;\;t\_3\\
\mathbf{else}:\\
\;\;\;\;x1 + \left(\left(x1 + {x1}^{4} \cdot \left(6 - \frac{3}{x1}\right)\right) + 9\right)\\
\end{array}
\end{array}
if (+.f64 x1 (+.f64 (+.f64 (+.f64 (+.f64 (*.f64 (+.f64 (*.f64 (*.f64 (*.f64 #s(literal 2 binary64) x1) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64)))) (-.f64 (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))) #s(literal 3 binary64))) (*.f64 (*.f64 x1 x1) (-.f64 (*.f64 #s(literal 4 binary64) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64)))) #s(literal 6 binary64)))) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))) (*.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))))) (*.f64 (*.f64 x1 x1) x1)) x1) (*.f64 #s(literal 3 binary64) (/.f64 (-.f64 (-.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64)))))) < +inf.0Initial program 99.4%
if +inf.0 < (+.f64 x1 (+.f64 (+.f64 (+.f64 (+.f64 (*.f64 (+.f64 (*.f64 (*.f64 (*.f64 #s(literal 2 binary64) x1) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64)))) (-.f64 (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))) #s(literal 3 binary64))) (*.f64 (*.f64 x1 x1) (-.f64 (*.f64 #s(literal 4 binary64) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64)))) #s(literal 6 binary64)))) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))) (*.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))))) (*.f64 (*.f64 x1 x1) x1)) x1) (*.f64 #s(literal 3 binary64) (/.f64 (-.f64 (-.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64)))))) Initial program 0.0%
Taylor expanded in x1 around inf 7.4%
associate-*r/7.4%
metadata-eval7.4%
Simplified7.4%
Taylor expanded in x1 around inf 98.5%
Final simplification99.2%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (* x1 (* x1 3.0)))
(t_1 (+ (* x1 x1) 1.0))
(t_2 (/ (- (+ t_0 (* 2.0 x2)) x1) t_1)))
(if (or (<= x1 -2e+95) (not (<= x1 1e+58)))
(+ x1 (+ (+ x1 (* (pow x1 4.0) (- 6.0 (/ 3.0 x1)))) 9.0))
(+
x1
(+
(+
x1
(+
(* x1 (* x1 x1))
(+
(*
t_1
(+
(* (* (* x1 2.0) t_2) (- t_2 3.0))
(* (* x1 x1) (- (* t_2 4.0) 6.0))))
(* t_0 (- (* 2.0 x2) x1)))))
(*
3.0
(+ (* x2 -2.0) (* x1 (+ (* x1 (- (+ x1 3.0) (* x2 -2.0))) -1.0)))))))))
double code(double x1, double x2) {
double t_0 = x1 * (x1 * 3.0);
double t_1 = (x1 * x1) + 1.0;
double t_2 = ((t_0 + (2.0 * x2)) - x1) / t_1;
double tmp;
if ((x1 <= -2e+95) || !(x1 <= 1e+58)) {
tmp = x1 + ((x1 + (pow(x1, 4.0) * (6.0 - (3.0 / x1)))) + 9.0);
} else {
tmp = x1 + ((x1 + ((x1 * (x1 * x1)) + ((t_1 * ((((x1 * 2.0) * t_2) * (t_2 - 3.0)) + ((x1 * x1) * ((t_2 * 4.0) - 6.0)))) + (t_0 * ((2.0 * x2) - x1))))) + (3.0 * ((x2 * -2.0) + (x1 * ((x1 * ((x1 + 3.0) - (x2 * -2.0))) + -1.0)))));
}
return tmp;
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
real(8) :: t_0
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_0 = x1 * (x1 * 3.0d0)
t_1 = (x1 * x1) + 1.0d0
t_2 = ((t_0 + (2.0d0 * x2)) - x1) / t_1
if ((x1 <= (-2d+95)) .or. (.not. (x1 <= 1d+58))) then
tmp = x1 + ((x1 + ((x1 ** 4.0d0) * (6.0d0 - (3.0d0 / x1)))) + 9.0d0)
else
tmp = x1 + ((x1 + ((x1 * (x1 * x1)) + ((t_1 * ((((x1 * 2.0d0) * t_2) * (t_2 - 3.0d0)) + ((x1 * x1) * ((t_2 * 4.0d0) - 6.0d0)))) + (t_0 * ((2.0d0 * x2) - x1))))) + (3.0d0 * ((x2 * (-2.0d0)) + (x1 * ((x1 * ((x1 + 3.0d0) - (x2 * (-2.0d0)))) + (-1.0d0))))))
end if
code = tmp
end function
public static double code(double x1, double x2) {
double t_0 = x1 * (x1 * 3.0);
double t_1 = (x1 * x1) + 1.0;
double t_2 = ((t_0 + (2.0 * x2)) - x1) / t_1;
double tmp;
if ((x1 <= -2e+95) || !(x1 <= 1e+58)) {
tmp = x1 + ((x1 + (Math.pow(x1, 4.0) * (6.0 - (3.0 / x1)))) + 9.0);
} else {
tmp = x1 + ((x1 + ((x1 * (x1 * x1)) + ((t_1 * ((((x1 * 2.0) * t_2) * (t_2 - 3.0)) + ((x1 * x1) * ((t_2 * 4.0) - 6.0)))) + (t_0 * ((2.0 * x2) - x1))))) + (3.0 * ((x2 * -2.0) + (x1 * ((x1 * ((x1 + 3.0) - (x2 * -2.0))) + -1.0)))));
}
return tmp;
}
def code(x1, x2): t_0 = x1 * (x1 * 3.0) t_1 = (x1 * x1) + 1.0 t_2 = ((t_0 + (2.0 * x2)) - x1) / t_1 tmp = 0 if (x1 <= -2e+95) or not (x1 <= 1e+58): tmp = x1 + ((x1 + (math.pow(x1, 4.0) * (6.0 - (3.0 / x1)))) + 9.0) else: tmp = x1 + ((x1 + ((x1 * (x1 * x1)) + ((t_1 * ((((x1 * 2.0) * t_2) * (t_2 - 3.0)) + ((x1 * x1) * ((t_2 * 4.0) - 6.0)))) + (t_0 * ((2.0 * x2) - x1))))) + (3.0 * ((x2 * -2.0) + (x1 * ((x1 * ((x1 + 3.0) - (x2 * -2.0))) + -1.0))))) return tmp
function code(x1, x2) t_0 = Float64(x1 * Float64(x1 * 3.0)) t_1 = Float64(Float64(x1 * x1) + 1.0) t_2 = Float64(Float64(Float64(t_0 + Float64(2.0 * x2)) - x1) / t_1) tmp = 0.0 if ((x1 <= -2e+95) || !(x1 <= 1e+58)) tmp = Float64(x1 + Float64(Float64(x1 + Float64((x1 ^ 4.0) * Float64(6.0 - Float64(3.0 / x1)))) + 9.0)); else tmp = Float64(x1 + Float64(Float64(x1 + Float64(Float64(x1 * Float64(x1 * x1)) + Float64(Float64(t_1 * Float64(Float64(Float64(Float64(x1 * 2.0) * t_2) * Float64(t_2 - 3.0)) + Float64(Float64(x1 * x1) * Float64(Float64(t_2 * 4.0) - 6.0)))) + Float64(t_0 * Float64(Float64(2.0 * x2) - x1))))) + Float64(3.0 * Float64(Float64(x2 * -2.0) + Float64(x1 * Float64(Float64(x1 * Float64(Float64(x1 + 3.0) - Float64(x2 * -2.0))) + -1.0)))))); end return tmp end
function tmp_2 = code(x1, x2) t_0 = x1 * (x1 * 3.0); t_1 = (x1 * x1) + 1.0; t_2 = ((t_0 + (2.0 * x2)) - x1) / t_1; tmp = 0.0; if ((x1 <= -2e+95) || ~((x1 <= 1e+58))) tmp = x1 + ((x1 + ((x1 ^ 4.0) * (6.0 - (3.0 / x1)))) + 9.0); else tmp = x1 + ((x1 + ((x1 * (x1 * x1)) + ((t_1 * ((((x1 * 2.0) * t_2) * (t_2 - 3.0)) + ((x1 * x1) * ((t_2 * 4.0) - 6.0)))) + (t_0 * ((2.0 * x2) - x1))))) + (3.0 * ((x2 * -2.0) + (x1 * ((x1 * ((x1 + 3.0) - (x2 * -2.0))) + -1.0))))); end tmp_2 = tmp; end
code[x1_, x2_] := Block[{t$95$0 = N[(x1 * N[(x1 * 3.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(N[(x1 * x1), $MachinePrecision] + 1.0), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[(t$95$0 + N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$1), $MachinePrecision]}, If[Or[LessEqual[x1, -2e+95], N[Not[LessEqual[x1, 1e+58]], $MachinePrecision]], N[(x1 + N[(N[(x1 + N[(N[Power[x1, 4.0], $MachinePrecision] * N[(6.0 - N[(3.0 / x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + 9.0), $MachinePrecision]), $MachinePrecision], N[(x1 + N[(N[(x1 + N[(N[(x1 * N[(x1 * x1), $MachinePrecision]), $MachinePrecision] + N[(N[(t$95$1 * N[(N[(N[(N[(x1 * 2.0), $MachinePrecision] * t$95$2), $MachinePrecision] * N[(t$95$2 - 3.0), $MachinePrecision]), $MachinePrecision] + N[(N[(x1 * x1), $MachinePrecision] * N[(N[(t$95$2 * 4.0), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(t$95$0 * N[(N[(2.0 * x2), $MachinePrecision] - x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(3.0 * N[(N[(x2 * -2.0), $MachinePrecision] + N[(x1 * N[(N[(x1 * N[(N[(x1 + 3.0), $MachinePrecision] - N[(x2 * -2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x1 \cdot \left(x1 \cdot 3\right)\\
t_1 := x1 \cdot x1 + 1\\
t_2 := \frac{\left(t\_0 + 2 \cdot x2\right) - x1}{t\_1}\\
\mathbf{if}\;x1 \leq -2 \cdot 10^{+95} \lor \neg \left(x1 \leq 10^{+58}\right):\\
\;\;\;\;x1 + \left(\left(x1 + {x1}^{4} \cdot \left(6 - \frac{3}{x1}\right)\right) + 9\right)\\
\mathbf{else}:\\
\;\;\;\;x1 + \left(\left(x1 + \left(x1 \cdot \left(x1 \cdot x1\right) + \left(t\_1 \cdot \left(\left(\left(x1 \cdot 2\right) \cdot t\_2\right) \cdot \left(t\_2 - 3\right) + \left(x1 \cdot x1\right) \cdot \left(t\_2 \cdot 4 - 6\right)\right) + t\_0 \cdot \left(2 \cdot x2 - x1\right)\right)\right)\right) + 3 \cdot \left(x2 \cdot -2 + x1 \cdot \left(x1 \cdot \left(\left(x1 + 3\right) - x2 \cdot -2\right) + -1\right)\right)\right)\\
\end{array}
\end{array}
if x1 < -2.00000000000000004e95 or 9.99999999999999944e57 < x1 Initial program 26.8%
Taylor expanded in x1 around inf 31.3%
associate-*r/31.3%
metadata-eval31.3%
Simplified31.3%
Taylor expanded in x1 around inf 98.0%
if -2.00000000000000004e95 < x1 < 9.99999999999999944e57Initial program 99.4%
Taylor expanded in x1 around 0 96.6%
+-commutative96.6%
mul-1-neg96.6%
sub-neg96.6%
Simplified96.6%
Taylor expanded in x1 around 0 97.5%
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_0)))
(if (or (<= x1 -4e+105) (not (<= x1 1e+58)))
(+ x1 (+ (+ x1 (* (pow x1 4.0) (- 6.0 (/ 3.0 x1)))) 9.0))
(+
x1
(+
(* 3.0 (/ (- (- t_1 (* 2.0 x2)) x1) t_0))
(+
x1
(+
(* x1 (* x1 x1))
(+
(* t_1 t_2)
(*
t_0
(+ (* (* (* x1 2.0) t_2) (- t_2 3.0)) (* (* x1 x1) 6.0)))))))))))
double code(double x1, double x2) {
double t_0 = (x1 * x1) + 1.0;
double t_1 = x1 * (x1 * 3.0);
double t_2 = ((t_1 + (2.0 * x2)) - x1) / t_0;
double tmp;
if ((x1 <= -4e+105) || !(x1 <= 1e+58)) {
tmp = x1 + ((x1 + (pow(x1, 4.0) * (6.0 - (3.0 / x1)))) + 9.0);
} else {
tmp = x1 + ((3.0 * (((t_1 - (2.0 * x2)) - x1) / t_0)) + (x1 + ((x1 * (x1 * x1)) + ((t_1 * t_2) + (t_0 * ((((x1 * 2.0) * t_2) * (t_2 - 3.0)) + ((x1 * x1) * 6.0)))))));
}
return tmp;
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
real(8) :: t_0
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_0 = (x1 * x1) + 1.0d0
t_1 = x1 * (x1 * 3.0d0)
t_2 = ((t_1 + (2.0d0 * x2)) - x1) / t_0
if ((x1 <= (-4d+105)) .or. (.not. (x1 <= 1d+58))) then
tmp = x1 + ((x1 + ((x1 ** 4.0d0) * (6.0d0 - (3.0d0 / x1)))) + 9.0d0)
else
tmp = x1 + ((3.0d0 * (((t_1 - (2.0d0 * x2)) - x1) / t_0)) + (x1 + ((x1 * (x1 * x1)) + ((t_1 * t_2) + (t_0 * ((((x1 * 2.0d0) * t_2) * (t_2 - 3.0d0)) + ((x1 * x1) * 6.0d0)))))))
end if
code = tmp
end function
public static double code(double x1, double x2) {
double t_0 = (x1 * x1) + 1.0;
double t_1 = x1 * (x1 * 3.0);
double t_2 = ((t_1 + (2.0 * x2)) - x1) / t_0;
double tmp;
if ((x1 <= -4e+105) || !(x1 <= 1e+58)) {
tmp = x1 + ((x1 + (Math.pow(x1, 4.0) * (6.0 - (3.0 / x1)))) + 9.0);
} else {
tmp = x1 + ((3.0 * (((t_1 - (2.0 * x2)) - x1) / t_0)) + (x1 + ((x1 * (x1 * x1)) + ((t_1 * t_2) + (t_0 * ((((x1 * 2.0) * t_2) * (t_2 - 3.0)) + ((x1 * x1) * 6.0)))))));
}
return tmp;
}
def code(x1, x2): t_0 = (x1 * x1) + 1.0 t_1 = x1 * (x1 * 3.0) t_2 = ((t_1 + (2.0 * x2)) - x1) / t_0 tmp = 0 if (x1 <= -4e+105) or not (x1 <= 1e+58): tmp = x1 + ((x1 + (math.pow(x1, 4.0) * (6.0 - (3.0 / x1)))) + 9.0) else: tmp = x1 + ((3.0 * (((t_1 - (2.0 * x2)) - x1) / t_0)) + (x1 + ((x1 * (x1 * x1)) + ((t_1 * t_2) + (t_0 * ((((x1 * 2.0) * t_2) * (t_2 - 3.0)) + ((x1 * x1) * 6.0))))))) return tmp
function code(x1, x2) t_0 = Float64(Float64(x1 * x1) + 1.0) t_1 = Float64(x1 * Float64(x1 * 3.0)) t_2 = Float64(Float64(Float64(t_1 + Float64(2.0 * x2)) - x1) / t_0) tmp = 0.0 if ((x1 <= -4e+105) || !(x1 <= 1e+58)) tmp = Float64(x1 + Float64(Float64(x1 + Float64((x1 ^ 4.0) * Float64(6.0 - Float64(3.0 / x1)))) + 9.0)); else 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_2) + Float64(t_0 * Float64(Float64(Float64(Float64(x1 * 2.0) * t_2) * Float64(t_2 - 3.0)) + Float64(Float64(x1 * x1) * 6.0)))))))); end return tmp end
function tmp_2 = code(x1, x2) t_0 = (x1 * x1) + 1.0; t_1 = x1 * (x1 * 3.0); t_2 = ((t_1 + (2.0 * x2)) - x1) / t_0; tmp = 0.0; if ((x1 <= -4e+105) || ~((x1 <= 1e+58))) tmp = x1 + ((x1 + ((x1 ^ 4.0) * (6.0 - (3.0 / x1)))) + 9.0); else tmp = x1 + ((3.0 * (((t_1 - (2.0 * x2)) - x1) / t_0)) + (x1 + ((x1 * (x1 * x1)) + ((t_1 * t_2) + (t_0 * ((((x1 * 2.0) * t_2) * (t_2 - 3.0)) + ((x1 * x1) * 6.0))))))); end tmp_2 = tmp; end
code[x1_, x2_] := Block[{t$95$0 = N[(N[(x1 * x1), $MachinePrecision] + 1.0), $MachinePrecision]}, Block[{t$95$1 = N[(x1 * N[(x1 * 3.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[(t$95$1 + N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$0), $MachinePrecision]}, If[Or[LessEqual[x1, -4e+105], N[Not[LessEqual[x1, 1e+58]], $MachinePrecision]], N[(x1 + N[(N[(x1 + N[(N[Power[x1, 4.0], $MachinePrecision] * N[(6.0 - N[(3.0 / x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + 9.0), $MachinePrecision]), $MachinePrecision], 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$2), $MachinePrecision] + N[(t$95$0 * N[(N[(N[(N[(x1 * 2.0), $MachinePrecision] * t$95$2), $MachinePrecision] * N[(t$95$2 - 3.0), $MachinePrecision]), $MachinePrecision] + N[(N[(x1 * x1), $MachinePrecision] * 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x1 \cdot x1 + 1\\
t_1 := x1 \cdot \left(x1 \cdot 3\right)\\
t_2 := \frac{\left(t\_1 + 2 \cdot x2\right) - x1}{t\_0}\\
\mathbf{if}\;x1 \leq -4 \cdot 10^{+105} \lor \neg \left(x1 \leq 10^{+58}\right):\\
\;\;\;\;x1 + \left(\left(x1 + {x1}^{4} \cdot \left(6 - \frac{3}{x1}\right)\right) + 9\right)\\
\mathbf{else}:\\
\;\;\;\;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\_2 + t\_0 \cdot \left(\left(\left(x1 \cdot 2\right) \cdot t\_2\right) \cdot \left(t\_2 - 3\right) + \left(x1 \cdot x1\right) \cdot 6\right)\right)\right)\right)\right)\\
\end{array}
\end{array}
if x1 < -3.9999999999999998e105 or 9.99999999999999944e57 < x1 Initial program 26.8%
Taylor expanded in x1 around inf 31.3%
associate-*r/31.3%
metadata-eval31.3%
Simplified31.3%
Taylor expanded in x1 around inf 98.0%
if -3.9999999999999998e105 < x1 < 9.99999999999999944e57Initial program 99.4%
fma-define99.4%
*-un-lft-identity99.4%
associate--l+99.4%
associate-*r*99.4%
fma-define99.4%
pow299.4%
Applied egg-rr99.4%
*-lft-identity99.4%
Simplified99.4%
Taylor expanded in x1 around inf 97.4%
Final simplification97.6%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (* x1 (* x1 3.0)))
(t_1 (+ (* x1 x1) 1.0))
(t_2 (/ (- (+ t_0 (* 2.0 x2)) x1) t_1)))
(if (or (<= x1 -1.25e+106) (not (<= x1 2.35e+144)))
(+ x1 (+ x1 (* 3.0 (* x1 (+ (* x1 3.0) -1.0)))))
(+
x1
(+
(* 3.0 (/ (- (- t_0 (* 2.0 x2)) x1) t_1))
(+
x1
(+
(* x1 (* x1 x1))
(+
(* t_0 t_2)
(*
t_1
(+ (* (* (* x1 2.0) t_2) (- t_2 3.0)) (* (* x1 x1) 6.0)))))))))))
double code(double x1, double x2) {
double t_0 = x1 * (x1 * 3.0);
double t_1 = (x1 * x1) + 1.0;
double t_2 = ((t_0 + (2.0 * x2)) - x1) / t_1;
double tmp;
if ((x1 <= -1.25e+106) || !(x1 <= 2.35e+144)) {
tmp = x1 + (x1 + (3.0 * (x1 * ((x1 * 3.0) + -1.0))));
} else {
tmp = x1 + ((3.0 * (((t_0 - (2.0 * x2)) - x1) / t_1)) + (x1 + ((x1 * (x1 * x1)) + ((t_0 * t_2) + (t_1 * ((((x1 * 2.0) * t_2) * (t_2 - 3.0)) + ((x1 * x1) * 6.0)))))));
}
return tmp;
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
real(8) :: t_0
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_0 = x1 * (x1 * 3.0d0)
t_1 = (x1 * x1) + 1.0d0
t_2 = ((t_0 + (2.0d0 * x2)) - x1) / t_1
if ((x1 <= (-1.25d+106)) .or. (.not. (x1 <= 2.35d+144))) then
tmp = x1 + (x1 + (3.0d0 * (x1 * ((x1 * 3.0d0) + (-1.0d0)))))
else
tmp = x1 + ((3.0d0 * (((t_0 - (2.0d0 * x2)) - x1) / t_1)) + (x1 + ((x1 * (x1 * x1)) + ((t_0 * t_2) + (t_1 * ((((x1 * 2.0d0) * t_2) * (t_2 - 3.0d0)) + ((x1 * x1) * 6.0d0)))))))
end if
code = tmp
end function
public static double code(double x1, double x2) {
double t_0 = x1 * (x1 * 3.0);
double t_1 = (x1 * x1) + 1.0;
double t_2 = ((t_0 + (2.0 * x2)) - x1) / t_1;
double tmp;
if ((x1 <= -1.25e+106) || !(x1 <= 2.35e+144)) {
tmp = x1 + (x1 + (3.0 * (x1 * ((x1 * 3.0) + -1.0))));
} else {
tmp = x1 + ((3.0 * (((t_0 - (2.0 * x2)) - x1) / t_1)) + (x1 + ((x1 * (x1 * x1)) + ((t_0 * t_2) + (t_1 * ((((x1 * 2.0) * t_2) * (t_2 - 3.0)) + ((x1 * x1) * 6.0)))))));
}
return tmp;
}
def code(x1, x2): t_0 = x1 * (x1 * 3.0) t_1 = (x1 * x1) + 1.0 t_2 = ((t_0 + (2.0 * x2)) - x1) / t_1 tmp = 0 if (x1 <= -1.25e+106) or not (x1 <= 2.35e+144): tmp = x1 + (x1 + (3.0 * (x1 * ((x1 * 3.0) + -1.0)))) else: tmp = x1 + ((3.0 * (((t_0 - (2.0 * x2)) - x1) / t_1)) + (x1 + ((x1 * (x1 * x1)) + ((t_0 * t_2) + (t_1 * ((((x1 * 2.0) * t_2) * (t_2 - 3.0)) + ((x1 * x1) * 6.0))))))) return tmp
function code(x1, x2) t_0 = Float64(x1 * Float64(x1 * 3.0)) t_1 = Float64(Float64(x1 * x1) + 1.0) t_2 = Float64(Float64(Float64(t_0 + Float64(2.0 * x2)) - x1) / t_1) tmp = 0.0 if ((x1 <= -1.25e+106) || !(x1 <= 2.35e+144)) tmp = Float64(x1 + Float64(x1 + Float64(3.0 * Float64(x1 * Float64(Float64(x1 * 3.0) + -1.0))))); else tmp = Float64(x1 + Float64(Float64(3.0 * Float64(Float64(Float64(t_0 - Float64(2.0 * x2)) - x1) / t_1)) + Float64(x1 + Float64(Float64(x1 * Float64(x1 * x1)) + Float64(Float64(t_0 * t_2) + Float64(t_1 * Float64(Float64(Float64(Float64(x1 * 2.0) * t_2) * Float64(t_2 - 3.0)) + Float64(Float64(x1 * x1) * 6.0)))))))); end return tmp end
function tmp_2 = code(x1, x2) t_0 = x1 * (x1 * 3.0); t_1 = (x1 * x1) + 1.0; t_2 = ((t_0 + (2.0 * x2)) - x1) / t_1; tmp = 0.0; if ((x1 <= -1.25e+106) || ~((x1 <= 2.35e+144))) tmp = x1 + (x1 + (3.0 * (x1 * ((x1 * 3.0) + -1.0)))); else tmp = x1 + ((3.0 * (((t_0 - (2.0 * x2)) - x1) / t_1)) + (x1 + ((x1 * (x1 * x1)) + ((t_0 * t_2) + (t_1 * ((((x1 * 2.0) * t_2) * (t_2 - 3.0)) + ((x1 * x1) * 6.0))))))); end tmp_2 = tmp; end
code[x1_, x2_] := Block[{t$95$0 = N[(x1 * N[(x1 * 3.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(N[(x1 * x1), $MachinePrecision] + 1.0), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[(t$95$0 + N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$1), $MachinePrecision]}, If[Or[LessEqual[x1, -1.25e+106], N[Not[LessEqual[x1, 2.35e+144]], $MachinePrecision]], N[(x1 + N[(x1 + N[(3.0 * N[(x1 * N[(N[(x1 * 3.0), $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x1 + N[(N[(3.0 * N[(N[(N[(t$95$0 - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$1), $MachinePrecision]), $MachinePrecision] + N[(x1 + N[(N[(x1 * N[(x1 * x1), $MachinePrecision]), $MachinePrecision] + N[(N[(t$95$0 * t$95$2), $MachinePrecision] + N[(t$95$1 * N[(N[(N[(N[(x1 * 2.0), $MachinePrecision] * t$95$2), $MachinePrecision] * N[(t$95$2 - 3.0), $MachinePrecision]), $MachinePrecision] + N[(N[(x1 * x1), $MachinePrecision] * 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x1 \cdot \left(x1 \cdot 3\right)\\
t_1 := x1 \cdot x1 + 1\\
t_2 := \frac{\left(t\_0 + 2 \cdot x2\right) - x1}{t\_1}\\
\mathbf{if}\;x1 \leq -1.25 \cdot 10^{+106} \lor \neg \left(x1 \leq 2.35 \cdot 10^{+144}\right):\\
\;\;\;\;x1 + \left(x1 + 3 \cdot \left(x1 \cdot \left(x1 \cdot 3 + -1\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x1 + \left(3 \cdot \frac{\left(t\_0 - 2 \cdot x2\right) - x1}{t\_1} + \left(x1 + \left(x1 \cdot \left(x1 \cdot x1\right) + \left(t\_0 \cdot t\_2 + t\_1 \cdot \left(\left(\left(x1 \cdot 2\right) \cdot t\_2\right) \cdot \left(t\_2 - 3\right) + \left(x1 \cdot x1\right) \cdot 6\right)\right)\right)\right)\right)\\
\end{array}
\end{array}
if x1 < -1.25e106 or 2.3500000000000001e144 < x1 Initial program 0.0%
Taylor expanded in x1 around 0 0.0%
Taylor expanded in x1 around 0 59.1%
Taylor expanded in x2 around 0 91.7%
if -1.25e106 < x1 < 2.3500000000000001e144Initial program 99.4%
fma-define99.4%
*-un-lft-identity99.4%
associate--l+99.4%
associate-*r*99.5%
fma-define99.5%
pow299.5%
Applied egg-rr99.5%
*-lft-identity99.5%
Simplified99.5%
Taylor expanded in x1 around inf 97.3%
Final simplification95.8%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (- (* 2.0 x2) 3.0))
(t_1 (* 4.0 (* x2 t_0)))
(t_2 (+ x1 (+ x1 (* 3.0 (* x1 (+ (* x1 3.0) -1.0))))))
(t_3 (* x1 (* x1 3.0)))
(t_4 (+ (* x1 x1) 1.0))
(t_5 (* 3.0 (/ (- (- t_3 (* 2.0 x2)) x1) t_4)))
(t_6 (/ (- (+ t_3 (* 2.0 x2)) x1) t_4))
(t_7 (* (* x1 x1) (- (* t_6 4.0) 6.0)))
(t_8 (* x1 (* x1 x1)))
(t_9 (- (* 2.0 x2) x1)))
(if (<= x1 -4.5e+153)
t_2
(if (<= x1 -1.55)
(+
x1
(+
t_5
(+
x1
(*
x1
(+
t_1
(*
x1
(-
(+
(* x2 6.0)
(+
(* x2 8.0)
(*
x1
(-
(+
t_1
(* x1 (- (+ (* x2 8.0) (* 4.0 (- 3.0 (* 2.0 x2)))) 6.0)))
6.0))))
6.0)))))))
(if (<= x1 1550000000.0)
(+
x1
(+
t_5
(+
x1
(+
t_8
(+ (* t_3 t_9) (* t_4 (+ t_7 (* (* (* x1 2.0) t_9) t_0))))))))
(if (<= x1 2.35e+144)
(+
x1
(+
t_5
(+
x1
(+ t_8 (+ (* t_3 t_6) (* t_4 (+ t_7 (/ (* x2 12.0) x1))))))))
t_2))))))
double code(double x1, double x2) {
double t_0 = (2.0 * x2) - 3.0;
double t_1 = 4.0 * (x2 * t_0);
double t_2 = x1 + (x1 + (3.0 * (x1 * ((x1 * 3.0) + -1.0))));
double t_3 = x1 * (x1 * 3.0);
double t_4 = (x1 * x1) + 1.0;
double t_5 = 3.0 * (((t_3 - (2.0 * x2)) - x1) / t_4);
double t_6 = ((t_3 + (2.0 * x2)) - x1) / t_4;
double t_7 = (x1 * x1) * ((t_6 * 4.0) - 6.0);
double t_8 = x1 * (x1 * x1);
double t_9 = (2.0 * x2) - x1;
double tmp;
if (x1 <= -4.5e+153) {
tmp = t_2;
} else if (x1 <= -1.55) {
tmp = x1 + (t_5 + (x1 + (x1 * (t_1 + (x1 * (((x2 * 6.0) + ((x2 * 8.0) + (x1 * ((t_1 + (x1 * (((x2 * 8.0) + (4.0 * (3.0 - (2.0 * x2)))) - 6.0))) - 6.0)))) - 6.0))))));
} else if (x1 <= 1550000000.0) {
tmp = x1 + (t_5 + (x1 + (t_8 + ((t_3 * t_9) + (t_4 * (t_7 + (((x1 * 2.0) * t_9) * t_0)))))));
} else if (x1 <= 2.35e+144) {
tmp = x1 + (t_5 + (x1 + (t_8 + ((t_3 * t_6) + (t_4 * (t_7 + ((x2 * 12.0) / x1)))))));
} else {
tmp = t_2;
}
return tmp;
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
real(8) :: t_0
real(8) :: t_1
real(8) :: t_2
real(8) :: t_3
real(8) :: t_4
real(8) :: t_5
real(8) :: t_6
real(8) :: t_7
real(8) :: t_8
real(8) :: t_9
real(8) :: tmp
t_0 = (2.0d0 * x2) - 3.0d0
t_1 = 4.0d0 * (x2 * t_0)
t_2 = x1 + (x1 + (3.0d0 * (x1 * ((x1 * 3.0d0) + (-1.0d0)))))
t_3 = x1 * (x1 * 3.0d0)
t_4 = (x1 * x1) + 1.0d0
t_5 = 3.0d0 * (((t_3 - (2.0d0 * x2)) - x1) / t_4)
t_6 = ((t_3 + (2.0d0 * x2)) - x1) / t_4
t_7 = (x1 * x1) * ((t_6 * 4.0d0) - 6.0d0)
t_8 = x1 * (x1 * x1)
t_9 = (2.0d0 * x2) - x1
if (x1 <= (-4.5d+153)) then
tmp = t_2
else if (x1 <= (-1.55d0)) then
tmp = x1 + (t_5 + (x1 + (x1 * (t_1 + (x1 * (((x2 * 6.0d0) + ((x2 * 8.0d0) + (x1 * ((t_1 + (x1 * (((x2 * 8.0d0) + (4.0d0 * (3.0d0 - (2.0d0 * x2)))) - 6.0d0))) - 6.0d0)))) - 6.0d0))))))
else if (x1 <= 1550000000.0d0) then
tmp = x1 + (t_5 + (x1 + (t_8 + ((t_3 * t_9) + (t_4 * (t_7 + (((x1 * 2.0d0) * t_9) * t_0)))))))
else if (x1 <= 2.35d+144) then
tmp = x1 + (t_5 + (x1 + (t_8 + ((t_3 * t_6) + (t_4 * (t_7 + ((x2 * 12.0d0) / x1)))))))
else
tmp = t_2
end if
code = tmp
end function
public static double code(double x1, double x2) {
double t_0 = (2.0 * x2) - 3.0;
double t_1 = 4.0 * (x2 * t_0);
double t_2 = x1 + (x1 + (3.0 * (x1 * ((x1 * 3.0) + -1.0))));
double t_3 = x1 * (x1 * 3.0);
double t_4 = (x1 * x1) + 1.0;
double t_5 = 3.0 * (((t_3 - (2.0 * x2)) - x1) / t_4);
double t_6 = ((t_3 + (2.0 * x2)) - x1) / t_4;
double t_7 = (x1 * x1) * ((t_6 * 4.0) - 6.0);
double t_8 = x1 * (x1 * x1);
double t_9 = (2.0 * x2) - x1;
double tmp;
if (x1 <= -4.5e+153) {
tmp = t_2;
} else if (x1 <= -1.55) {
tmp = x1 + (t_5 + (x1 + (x1 * (t_1 + (x1 * (((x2 * 6.0) + ((x2 * 8.0) + (x1 * ((t_1 + (x1 * (((x2 * 8.0) + (4.0 * (3.0 - (2.0 * x2)))) - 6.0))) - 6.0)))) - 6.0))))));
} else if (x1 <= 1550000000.0) {
tmp = x1 + (t_5 + (x1 + (t_8 + ((t_3 * t_9) + (t_4 * (t_7 + (((x1 * 2.0) * t_9) * t_0)))))));
} else if (x1 <= 2.35e+144) {
tmp = x1 + (t_5 + (x1 + (t_8 + ((t_3 * t_6) + (t_4 * (t_7 + ((x2 * 12.0) / x1)))))));
} else {
tmp = t_2;
}
return tmp;
}
def code(x1, x2): t_0 = (2.0 * x2) - 3.0 t_1 = 4.0 * (x2 * t_0) t_2 = x1 + (x1 + (3.0 * (x1 * ((x1 * 3.0) + -1.0)))) t_3 = x1 * (x1 * 3.0) t_4 = (x1 * x1) + 1.0 t_5 = 3.0 * (((t_3 - (2.0 * x2)) - x1) / t_4) t_6 = ((t_3 + (2.0 * x2)) - x1) / t_4 t_7 = (x1 * x1) * ((t_6 * 4.0) - 6.0) t_8 = x1 * (x1 * x1) t_9 = (2.0 * x2) - x1 tmp = 0 if x1 <= -4.5e+153: tmp = t_2 elif x1 <= -1.55: tmp = x1 + (t_5 + (x1 + (x1 * (t_1 + (x1 * (((x2 * 6.0) + ((x2 * 8.0) + (x1 * ((t_1 + (x1 * (((x2 * 8.0) + (4.0 * (3.0 - (2.0 * x2)))) - 6.0))) - 6.0)))) - 6.0)))))) elif x1 <= 1550000000.0: tmp = x1 + (t_5 + (x1 + (t_8 + ((t_3 * t_9) + (t_4 * (t_7 + (((x1 * 2.0) * t_9) * t_0))))))) elif x1 <= 2.35e+144: tmp = x1 + (t_5 + (x1 + (t_8 + ((t_3 * t_6) + (t_4 * (t_7 + ((x2 * 12.0) / x1))))))) else: tmp = t_2 return tmp
function code(x1, x2) t_0 = Float64(Float64(2.0 * x2) - 3.0) t_1 = Float64(4.0 * Float64(x2 * t_0)) t_2 = Float64(x1 + Float64(x1 + Float64(3.0 * Float64(x1 * Float64(Float64(x1 * 3.0) + -1.0))))) t_3 = Float64(x1 * Float64(x1 * 3.0)) t_4 = Float64(Float64(x1 * x1) + 1.0) t_5 = Float64(3.0 * Float64(Float64(Float64(t_3 - Float64(2.0 * x2)) - x1) / t_4)) t_6 = Float64(Float64(Float64(t_3 + Float64(2.0 * x2)) - x1) / t_4) t_7 = Float64(Float64(x1 * x1) * Float64(Float64(t_6 * 4.0) - 6.0)) t_8 = Float64(x1 * Float64(x1 * x1)) t_9 = Float64(Float64(2.0 * x2) - x1) tmp = 0.0 if (x1 <= -4.5e+153) tmp = t_2; elseif (x1 <= -1.55) tmp = Float64(x1 + Float64(t_5 + Float64(x1 + Float64(x1 * Float64(t_1 + Float64(x1 * Float64(Float64(Float64(x2 * 6.0) + Float64(Float64(x2 * 8.0) + Float64(x1 * Float64(Float64(t_1 + Float64(x1 * Float64(Float64(Float64(x2 * 8.0) + Float64(4.0 * Float64(3.0 - Float64(2.0 * x2)))) - 6.0))) - 6.0)))) - 6.0))))))); elseif (x1 <= 1550000000.0) tmp = Float64(x1 + Float64(t_5 + Float64(x1 + Float64(t_8 + Float64(Float64(t_3 * t_9) + Float64(t_4 * Float64(t_7 + Float64(Float64(Float64(x1 * 2.0) * t_9) * t_0)))))))); elseif (x1 <= 2.35e+144) tmp = Float64(x1 + Float64(t_5 + Float64(x1 + Float64(t_8 + Float64(Float64(t_3 * t_6) + Float64(t_4 * Float64(t_7 + Float64(Float64(x2 * 12.0) / x1)))))))); else tmp = t_2; end return tmp end
function tmp_2 = code(x1, x2) t_0 = (2.0 * x2) - 3.0; t_1 = 4.0 * (x2 * t_0); t_2 = x1 + (x1 + (3.0 * (x1 * ((x1 * 3.0) + -1.0)))); t_3 = x1 * (x1 * 3.0); t_4 = (x1 * x1) + 1.0; t_5 = 3.0 * (((t_3 - (2.0 * x2)) - x1) / t_4); t_6 = ((t_3 + (2.0 * x2)) - x1) / t_4; t_7 = (x1 * x1) * ((t_6 * 4.0) - 6.0); t_8 = x1 * (x1 * x1); t_9 = (2.0 * x2) - x1; tmp = 0.0; if (x1 <= -4.5e+153) tmp = t_2; elseif (x1 <= -1.55) tmp = x1 + (t_5 + (x1 + (x1 * (t_1 + (x1 * (((x2 * 6.0) + ((x2 * 8.0) + (x1 * ((t_1 + (x1 * (((x2 * 8.0) + (4.0 * (3.0 - (2.0 * x2)))) - 6.0))) - 6.0)))) - 6.0)))))); elseif (x1 <= 1550000000.0) tmp = x1 + (t_5 + (x1 + (t_8 + ((t_3 * t_9) + (t_4 * (t_7 + (((x1 * 2.0) * t_9) * t_0))))))); elseif (x1 <= 2.35e+144) tmp = x1 + (t_5 + (x1 + (t_8 + ((t_3 * t_6) + (t_4 * (t_7 + ((x2 * 12.0) / x1))))))); else tmp = t_2; end tmp_2 = tmp; end
code[x1_, x2_] := Block[{t$95$0 = N[(N[(2.0 * x2), $MachinePrecision] - 3.0), $MachinePrecision]}, Block[{t$95$1 = N[(4.0 * N[(x2 * t$95$0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x1 + N[(x1 + N[(3.0 * N[(x1 * N[(N[(x1 * 3.0), $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(x1 * N[(x1 * 3.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[(N[(x1 * x1), $MachinePrecision] + 1.0), $MachinePrecision]}, Block[{t$95$5 = N[(3.0 * N[(N[(N[(t$95$3 - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$4), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$6 = N[(N[(N[(t$95$3 + N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$4), $MachinePrecision]}, Block[{t$95$7 = N[(N[(x1 * x1), $MachinePrecision] * N[(N[(t$95$6 * 4.0), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$8 = N[(x1 * N[(x1 * x1), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$9 = N[(N[(2.0 * x2), $MachinePrecision] - x1), $MachinePrecision]}, If[LessEqual[x1, -4.5e+153], t$95$2, If[LessEqual[x1, -1.55], N[(x1 + N[(t$95$5 + N[(x1 + N[(x1 * N[(t$95$1 + N[(x1 * N[(N[(N[(x2 * 6.0), $MachinePrecision] + N[(N[(x2 * 8.0), $MachinePrecision] + N[(x1 * N[(N[(t$95$1 + N[(x1 * N[(N[(N[(x2 * 8.0), $MachinePrecision] + N[(4.0 * N[(3.0 - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 1550000000.0], N[(x1 + N[(t$95$5 + N[(x1 + N[(t$95$8 + N[(N[(t$95$3 * t$95$9), $MachinePrecision] + N[(t$95$4 * N[(t$95$7 + N[(N[(N[(x1 * 2.0), $MachinePrecision] * t$95$9), $MachinePrecision] * t$95$0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 2.35e+144], N[(x1 + N[(t$95$5 + N[(x1 + N[(t$95$8 + N[(N[(t$95$3 * t$95$6), $MachinePrecision] + N[(t$95$4 * N[(t$95$7 + N[(N[(x2 * 12.0), $MachinePrecision] / x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$2]]]]]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := 2 \cdot x2 - 3\\
t_1 := 4 \cdot \left(x2 \cdot t\_0\right)\\
t_2 := x1 + \left(x1 + 3 \cdot \left(x1 \cdot \left(x1 \cdot 3 + -1\right)\right)\right)\\
t_3 := x1 \cdot \left(x1 \cdot 3\right)\\
t_4 := x1 \cdot x1 + 1\\
t_5 := 3 \cdot \frac{\left(t\_3 - 2 \cdot x2\right) - x1}{t\_4}\\
t_6 := \frac{\left(t\_3 + 2 \cdot x2\right) - x1}{t\_4}\\
t_7 := \left(x1 \cdot x1\right) \cdot \left(t\_6 \cdot 4 - 6\right)\\
t_8 := x1 \cdot \left(x1 \cdot x1\right)\\
t_9 := 2 \cdot x2 - x1\\
\mathbf{if}\;x1 \leq -4.5 \cdot 10^{+153}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;x1 \leq -1.55:\\
\;\;\;\;x1 + \left(t\_5 + \left(x1 + x1 \cdot \left(t\_1 + x1 \cdot \left(\left(x2 \cdot 6 + \left(x2 \cdot 8 + x1 \cdot \left(\left(t\_1 + x1 \cdot \left(\left(x2 \cdot 8 + 4 \cdot \left(3 - 2 \cdot x2\right)\right) - 6\right)\right) - 6\right)\right)\right) - 6\right)\right)\right)\right)\\
\mathbf{elif}\;x1 \leq 1550000000:\\
\;\;\;\;x1 + \left(t\_5 + \left(x1 + \left(t\_8 + \left(t\_3 \cdot t\_9 + t\_4 \cdot \left(t\_7 + \left(\left(x1 \cdot 2\right) \cdot t\_9\right) \cdot t\_0\right)\right)\right)\right)\right)\\
\mathbf{elif}\;x1 \leq 2.35 \cdot 10^{+144}:\\
\;\;\;\;x1 + \left(t\_5 + \left(x1 + \left(t\_8 + \left(t\_3 \cdot t\_6 + t\_4 \cdot \left(t\_7 + \frac{x2 \cdot 12}{x1}\right)\right)\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if x1 < -4.5000000000000001e153 or 2.3500000000000001e144 < x1 Initial program 0.0%
Taylor expanded in x1 around 0 0.0%
Taylor expanded in x1 around 0 63.5%
Taylor expanded in x2 around 0 98.4%
if -4.5000000000000001e153 < x1 < -1.55000000000000004Initial program 79.4%
Taylor expanded in x1 around 0 65.6%
+-commutative65.6%
mul-1-neg65.6%
sub-neg65.6%
Simplified65.6%
Taylor expanded in x1 around 0 46.8%
+-commutative65.6%
mul-1-neg65.6%
sub-neg65.6%
Simplified46.8%
Taylor expanded in x1 around 0 34.6%
Taylor expanded in x1 around 0 54.7%
if -1.55000000000000004 < x1 < 1.55e9Initial program 99.4%
Taylor expanded in x1 around 0 98.6%
+-commutative98.6%
mul-1-neg98.6%
sub-neg98.6%
Simplified98.6%
Taylor expanded in x1 around 0 97.2%
+-commutative98.6%
mul-1-neg98.6%
sub-neg98.6%
Simplified97.2%
Taylor expanded in x1 around 0 96.8%
if 1.55e9 < x1 < 2.3500000000000001e144Initial program 99.5%
Taylor expanded in x2 around inf 99.5%
associate-*r/99.5%
*-commutative99.5%
associate-*r/99.5%
+-commutative99.5%
unpow299.5%
fma-undefine99.5%
Simplified99.5%
Taylor expanded in x1 around inf 94.0%
associate-*r/94.0%
*-commutative94.0%
Simplified94.0%
Final simplification92.7%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (+ (* x1 x1) 1.0))
(t_1 (* x1 (* x1 3.0)))
(t_2 (- (* 2.0 x2) x1))
(t_3 (+ x1 (+ x1 (* 3.0 (* x1 (+ (* x1 3.0) -1.0))))))
(t_4 (* x1 (* x1 x1)))
(t_5 (/ (- (+ t_1 (* 2.0 x2)) x1) t_0))
(t_6 (* (* x1 x1) (- (* t_5 4.0) 6.0)))
(t_7 (* t_1 t_2))
(t_8 (* 3.0 (/ (- (- t_1 (* 2.0 x2)) x1) t_0))))
(if (<= x1 -5.3e+116)
t_3
(if (<= x1 -1.1)
(+
x1
(+
9.0
(+
x1
(+
t_4
(+
t_7
(*
t_0
(+
t_6
(*
(* (* x1 2.0) t_5)
(/ (+ (* 2.0 (/ x2 x1)) (- -1.0 (/ 3.0 x1))) x1)))))))))
(if (<= x1 420000000.0)
(+
x1
(+
t_8
(+
x1
(+
t_4
(+
t_7
(* t_0 (+ t_6 (* (* (* x1 2.0) t_2) (- (* 2.0 x2) 3.0)))))))))
(if (<= x1 2.35e+144)
(+
x1
(+
t_8
(+
x1
(+ t_4 (+ (* t_1 t_5) (* t_0 (+ t_6 (/ (* x2 12.0) x1))))))))
t_3))))))
double code(double x1, double x2) {
double t_0 = (x1 * x1) + 1.0;
double t_1 = x1 * (x1 * 3.0);
double t_2 = (2.0 * x2) - x1;
double t_3 = x1 + (x1 + (3.0 * (x1 * ((x1 * 3.0) + -1.0))));
double t_4 = x1 * (x1 * x1);
double t_5 = ((t_1 + (2.0 * x2)) - x1) / t_0;
double t_6 = (x1 * x1) * ((t_5 * 4.0) - 6.0);
double t_7 = t_1 * t_2;
double t_8 = 3.0 * (((t_1 - (2.0 * x2)) - x1) / t_0);
double tmp;
if (x1 <= -5.3e+116) {
tmp = t_3;
} else if (x1 <= -1.1) {
tmp = x1 + (9.0 + (x1 + (t_4 + (t_7 + (t_0 * (t_6 + (((x1 * 2.0) * t_5) * (((2.0 * (x2 / x1)) + (-1.0 - (3.0 / x1))) / x1))))))));
} else if (x1 <= 420000000.0) {
tmp = x1 + (t_8 + (x1 + (t_4 + (t_7 + (t_0 * (t_6 + (((x1 * 2.0) * t_2) * ((2.0 * x2) - 3.0))))))));
} else if (x1 <= 2.35e+144) {
tmp = x1 + (t_8 + (x1 + (t_4 + ((t_1 * t_5) + (t_0 * (t_6 + ((x2 * 12.0) / x1)))))));
} else {
tmp = t_3;
}
return tmp;
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
real(8) :: t_0
real(8) :: t_1
real(8) :: t_2
real(8) :: t_3
real(8) :: t_4
real(8) :: t_5
real(8) :: t_6
real(8) :: t_7
real(8) :: t_8
real(8) :: tmp
t_0 = (x1 * x1) + 1.0d0
t_1 = x1 * (x1 * 3.0d0)
t_2 = (2.0d0 * x2) - x1
t_3 = x1 + (x1 + (3.0d0 * (x1 * ((x1 * 3.0d0) + (-1.0d0)))))
t_4 = x1 * (x1 * x1)
t_5 = ((t_1 + (2.0d0 * x2)) - x1) / t_0
t_6 = (x1 * x1) * ((t_5 * 4.0d0) - 6.0d0)
t_7 = t_1 * t_2
t_8 = 3.0d0 * (((t_1 - (2.0d0 * x2)) - x1) / t_0)
if (x1 <= (-5.3d+116)) then
tmp = t_3
else if (x1 <= (-1.1d0)) then
tmp = x1 + (9.0d0 + (x1 + (t_4 + (t_7 + (t_0 * (t_6 + (((x1 * 2.0d0) * t_5) * (((2.0d0 * (x2 / x1)) + ((-1.0d0) - (3.0d0 / x1))) / x1))))))))
else if (x1 <= 420000000.0d0) then
tmp = x1 + (t_8 + (x1 + (t_4 + (t_7 + (t_0 * (t_6 + (((x1 * 2.0d0) * t_2) * ((2.0d0 * x2) - 3.0d0))))))))
else if (x1 <= 2.35d+144) then
tmp = x1 + (t_8 + (x1 + (t_4 + ((t_1 * t_5) + (t_0 * (t_6 + ((x2 * 12.0d0) / x1)))))))
else
tmp = t_3
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 = (2.0 * x2) - x1;
double t_3 = x1 + (x1 + (3.0 * (x1 * ((x1 * 3.0) + -1.0))));
double t_4 = x1 * (x1 * x1);
double t_5 = ((t_1 + (2.0 * x2)) - x1) / t_0;
double t_6 = (x1 * x1) * ((t_5 * 4.0) - 6.0);
double t_7 = t_1 * t_2;
double t_8 = 3.0 * (((t_1 - (2.0 * x2)) - x1) / t_0);
double tmp;
if (x1 <= -5.3e+116) {
tmp = t_3;
} else if (x1 <= -1.1) {
tmp = x1 + (9.0 + (x1 + (t_4 + (t_7 + (t_0 * (t_6 + (((x1 * 2.0) * t_5) * (((2.0 * (x2 / x1)) + (-1.0 - (3.0 / x1))) / x1))))))));
} else if (x1 <= 420000000.0) {
tmp = x1 + (t_8 + (x1 + (t_4 + (t_7 + (t_0 * (t_6 + (((x1 * 2.0) * t_2) * ((2.0 * x2) - 3.0))))))));
} else if (x1 <= 2.35e+144) {
tmp = x1 + (t_8 + (x1 + (t_4 + ((t_1 * t_5) + (t_0 * (t_6 + ((x2 * 12.0) / x1)))))));
} else {
tmp = t_3;
}
return tmp;
}
def code(x1, x2): t_0 = (x1 * x1) + 1.0 t_1 = x1 * (x1 * 3.0) t_2 = (2.0 * x2) - x1 t_3 = x1 + (x1 + (3.0 * (x1 * ((x1 * 3.0) + -1.0)))) t_4 = x1 * (x1 * x1) t_5 = ((t_1 + (2.0 * x2)) - x1) / t_0 t_6 = (x1 * x1) * ((t_5 * 4.0) - 6.0) t_7 = t_1 * t_2 t_8 = 3.0 * (((t_1 - (2.0 * x2)) - x1) / t_0) tmp = 0 if x1 <= -5.3e+116: tmp = t_3 elif x1 <= -1.1: tmp = x1 + (9.0 + (x1 + (t_4 + (t_7 + (t_0 * (t_6 + (((x1 * 2.0) * t_5) * (((2.0 * (x2 / x1)) + (-1.0 - (3.0 / x1))) / x1)))))))) elif x1 <= 420000000.0: tmp = x1 + (t_8 + (x1 + (t_4 + (t_7 + (t_0 * (t_6 + (((x1 * 2.0) * t_2) * ((2.0 * x2) - 3.0)))))))) elif x1 <= 2.35e+144: tmp = x1 + (t_8 + (x1 + (t_4 + ((t_1 * t_5) + (t_0 * (t_6 + ((x2 * 12.0) / x1))))))) else: tmp = t_3 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(2.0 * x2) - x1) t_3 = Float64(x1 + Float64(x1 + Float64(3.0 * Float64(x1 * Float64(Float64(x1 * 3.0) + -1.0))))) t_4 = Float64(x1 * Float64(x1 * x1)) t_5 = Float64(Float64(Float64(t_1 + Float64(2.0 * x2)) - x1) / t_0) t_6 = Float64(Float64(x1 * x1) * Float64(Float64(t_5 * 4.0) - 6.0)) t_7 = Float64(t_1 * t_2) t_8 = Float64(3.0 * Float64(Float64(Float64(t_1 - Float64(2.0 * x2)) - x1) / t_0)) tmp = 0.0 if (x1 <= -5.3e+116) tmp = t_3; elseif (x1 <= -1.1) tmp = Float64(x1 + Float64(9.0 + Float64(x1 + Float64(t_4 + Float64(t_7 + Float64(t_0 * Float64(t_6 + Float64(Float64(Float64(x1 * 2.0) * t_5) * Float64(Float64(Float64(2.0 * Float64(x2 / x1)) + Float64(-1.0 - Float64(3.0 / x1))) / x1))))))))); elseif (x1 <= 420000000.0) tmp = Float64(x1 + Float64(t_8 + Float64(x1 + Float64(t_4 + Float64(t_7 + Float64(t_0 * Float64(t_6 + Float64(Float64(Float64(x1 * 2.0) * t_2) * Float64(Float64(2.0 * x2) - 3.0))))))))); elseif (x1 <= 2.35e+144) tmp = Float64(x1 + Float64(t_8 + Float64(x1 + Float64(t_4 + Float64(Float64(t_1 * t_5) + Float64(t_0 * Float64(t_6 + Float64(Float64(x2 * 12.0) / x1)))))))); else tmp = t_3; end return tmp end
function tmp_2 = code(x1, x2) t_0 = (x1 * x1) + 1.0; t_1 = x1 * (x1 * 3.0); t_2 = (2.0 * x2) - x1; t_3 = x1 + (x1 + (3.0 * (x1 * ((x1 * 3.0) + -1.0)))); t_4 = x1 * (x1 * x1); t_5 = ((t_1 + (2.0 * x2)) - x1) / t_0; t_6 = (x1 * x1) * ((t_5 * 4.0) - 6.0); t_7 = t_1 * t_2; t_8 = 3.0 * (((t_1 - (2.0 * x2)) - x1) / t_0); tmp = 0.0; if (x1 <= -5.3e+116) tmp = t_3; elseif (x1 <= -1.1) tmp = x1 + (9.0 + (x1 + (t_4 + (t_7 + (t_0 * (t_6 + (((x1 * 2.0) * t_5) * (((2.0 * (x2 / x1)) + (-1.0 - (3.0 / x1))) / x1)))))))); elseif (x1 <= 420000000.0) tmp = x1 + (t_8 + (x1 + (t_4 + (t_7 + (t_0 * (t_6 + (((x1 * 2.0) * t_2) * ((2.0 * x2) - 3.0)))))))); elseif (x1 <= 2.35e+144) tmp = x1 + (t_8 + (x1 + (t_4 + ((t_1 * t_5) + (t_0 * (t_6 + ((x2 * 12.0) / x1))))))); else tmp = t_3; 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[(2.0 * x2), $MachinePrecision] - x1), $MachinePrecision]}, Block[{t$95$3 = N[(x1 + N[(x1 + N[(3.0 * N[(x1 * N[(N[(x1 * 3.0), $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[(x1 * N[(x1 * x1), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$5 = N[(N[(N[(t$95$1 + N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$0), $MachinePrecision]}, Block[{t$95$6 = N[(N[(x1 * x1), $MachinePrecision] * N[(N[(t$95$5 * 4.0), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$7 = N[(t$95$1 * t$95$2), $MachinePrecision]}, Block[{t$95$8 = N[(3.0 * N[(N[(N[(t$95$1 - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x1, -5.3e+116], t$95$3, If[LessEqual[x1, -1.1], N[(x1 + N[(9.0 + N[(x1 + N[(t$95$4 + N[(t$95$7 + N[(t$95$0 * N[(t$95$6 + N[(N[(N[(x1 * 2.0), $MachinePrecision] * t$95$5), $MachinePrecision] * N[(N[(N[(2.0 * N[(x2 / x1), $MachinePrecision]), $MachinePrecision] + N[(-1.0 - N[(3.0 / x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 420000000.0], N[(x1 + N[(t$95$8 + N[(x1 + N[(t$95$4 + N[(t$95$7 + N[(t$95$0 * N[(t$95$6 + N[(N[(N[(x1 * 2.0), $MachinePrecision] * t$95$2), $MachinePrecision] * N[(N[(2.0 * x2), $MachinePrecision] - 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 2.35e+144], N[(x1 + N[(t$95$8 + N[(x1 + N[(t$95$4 + N[(N[(t$95$1 * t$95$5), $MachinePrecision] + N[(t$95$0 * N[(t$95$6 + N[(N[(x2 * 12.0), $MachinePrecision] / x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$3]]]]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x1 \cdot x1 + 1\\
t_1 := x1 \cdot \left(x1 \cdot 3\right)\\
t_2 := 2 \cdot x2 - x1\\
t_3 := x1 + \left(x1 + 3 \cdot \left(x1 \cdot \left(x1 \cdot 3 + -1\right)\right)\right)\\
t_4 := x1 \cdot \left(x1 \cdot x1\right)\\
t_5 := \frac{\left(t\_1 + 2 \cdot x2\right) - x1}{t\_0}\\
t_6 := \left(x1 \cdot x1\right) \cdot \left(t\_5 \cdot 4 - 6\right)\\
t_7 := t\_1 \cdot t\_2\\
t_8 := 3 \cdot \frac{\left(t\_1 - 2 \cdot x2\right) - x1}{t\_0}\\
\mathbf{if}\;x1 \leq -5.3 \cdot 10^{+116}:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;x1 \leq -1.1:\\
\;\;\;\;x1 + \left(9 + \left(x1 + \left(t\_4 + \left(t\_7 + t\_0 \cdot \left(t\_6 + \left(\left(x1 \cdot 2\right) \cdot t\_5\right) \cdot \frac{2 \cdot \frac{x2}{x1} + \left(-1 - \frac{3}{x1}\right)}{x1}\right)\right)\right)\right)\right)\\
\mathbf{elif}\;x1 \leq 420000000:\\
\;\;\;\;x1 + \left(t\_8 + \left(x1 + \left(t\_4 + \left(t\_7 + t\_0 \cdot \left(t\_6 + \left(\left(x1 \cdot 2\right) \cdot t\_2\right) \cdot \left(2 \cdot x2 - 3\right)\right)\right)\right)\right)\right)\\
\mathbf{elif}\;x1 \leq 2.35 \cdot 10^{+144}:\\
\;\;\;\;x1 + \left(t\_8 + \left(x1 + \left(t\_4 + \left(t\_1 \cdot t\_5 + t\_0 \cdot \left(t\_6 + \frac{x2 \cdot 12}{x1}\right)\right)\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t\_3\\
\end{array}
\end{array}
if x1 < -5.3000000000000002e116 or 2.3500000000000001e144 < x1 Initial program 0.0%
Taylor expanded in x1 around 0 0.0%
Taylor expanded in x1 around 0 59.1%
Taylor expanded in x2 around 0 91.7%
if -5.3000000000000002e116 < x1 < -1.1000000000000001Initial program 99.3%
Taylor expanded in x1 around 0 82.0%
+-commutative82.0%
mul-1-neg82.0%
sub-neg82.0%
Simplified82.0%
Taylor expanded in x1 around inf 82.0%
associate-*r/82.0%
metadata-eval82.0%
Simplified82.0%
Taylor expanded in x1 around inf 82.0%
if -1.1000000000000001 < x1 < 4.2e8Initial program 99.4%
Taylor expanded in x1 around 0 98.6%
+-commutative98.6%
mul-1-neg98.6%
sub-neg98.6%
Simplified98.6%
Taylor expanded in x1 around 0 97.2%
+-commutative98.6%
mul-1-neg98.6%
sub-neg98.6%
Simplified97.2%
Taylor expanded in x1 around 0 96.8%
if 4.2e8 < x1 < 2.3500000000000001e144Initial program 99.5%
Taylor expanded in x2 around inf 99.5%
associate-*r/99.5%
*-commutative99.5%
associate-*r/99.5%
+-commutative99.5%
unpow299.5%
fma-undefine99.5%
Simplified99.5%
Taylor expanded in x1 around inf 94.0%
associate-*r/94.0%
*-commutative94.0%
Simplified94.0%
Final simplification93.9%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (- (* 2.0 x2) x1))
(t_1 (* x1 (* x1 3.0)))
(t_2 (+ (* x1 x1) 1.0))
(t_3 (/ (- (+ t_1 (* 2.0 x2)) x1) t_2))
(t_4 (+ x1 (+ x1 (* 3.0 (* x1 (+ (* x1 3.0) -1.0))))))
(t_5 (* x1 (* x1 x1)))
(t_6
(+
x1
(+
9.0
(+
x1
(+
t_5
(+
(* t_1 t_3)
(*
t_2
(+ (* (* (* x1 2.0) t_3) (- t_3 3.0)) (* (* x1 x1) 6.0))))))))))
(if (<= x1 -1.8e+104)
t_4
(if (<= x1 -0.0032)
t_6
(if (<= x1 4.3e-5)
(+
x1
(+
(* 3.0 (/ (- (- t_1 (* 2.0 x2)) x1) t_2))
(+
x1
(+
t_5
(+
(* t_1 t_0)
(*
t_2
(+
(* (* x1 x1) (- (* t_3 4.0) 6.0))
(* (* (* x1 2.0) t_0) (- (* 2.0 x2) 3.0)))))))))
(if (<= x1 2.35e+144) t_6 t_4))))))
double code(double x1, double x2) {
double t_0 = (2.0 * x2) - x1;
double t_1 = x1 * (x1 * 3.0);
double t_2 = (x1 * x1) + 1.0;
double t_3 = ((t_1 + (2.0 * x2)) - x1) / t_2;
double t_4 = x1 + (x1 + (3.0 * (x1 * ((x1 * 3.0) + -1.0))));
double t_5 = x1 * (x1 * x1);
double t_6 = x1 + (9.0 + (x1 + (t_5 + ((t_1 * t_3) + (t_2 * ((((x1 * 2.0) * t_3) * (t_3 - 3.0)) + ((x1 * x1) * 6.0)))))));
double tmp;
if (x1 <= -1.8e+104) {
tmp = t_4;
} else if (x1 <= -0.0032) {
tmp = t_6;
} else if (x1 <= 4.3e-5) {
tmp = x1 + ((3.0 * (((t_1 - (2.0 * x2)) - x1) / t_2)) + (x1 + (t_5 + ((t_1 * t_0) + (t_2 * (((x1 * x1) * ((t_3 * 4.0) - 6.0)) + (((x1 * 2.0) * t_0) * ((2.0 * x2) - 3.0))))))));
} else if (x1 <= 2.35e+144) {
tmp = t_6;
} else {
tmp = t_4;
}
return tmp;
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
real(8) :: t_0
real(8) :: t_1
real(8) :: t_2
real(8) :: t_3
real(8) :: t_4
real(8) :: t_5
real(8) :: t_6
real(8) :: tmp
t_0 = (2.0d0 * x2) - x1
t_1 = x1 * (x1 * 3.0d0)
t_2 = (x1 * x1) + 1.0d0
t_3 = ((t_1 + (2.0d0 * x2)) - x1) / t_2
t_4 = x1 + (x1 + (3.0d0 * (x1 * ((x1 * 3.0d0) + (-1.0d0)))))
t_5 = x1 * (x1 * x1)
t_6 = x1 + (9.0d0 + (x1 + (t_5 + ((t_1 * t_3) + (t_2 * ((((x1 * 2.0d0) * t_3) * (t_3 - 3.0d0)) + ((x1 * x1) * 6.0d0)))))))
if (x1 <= (-1.8d+104)) then
tmp = t_4
else if (x1 <= (-0.0032d0)) then
tmp = t_6
else if (x1 <= 4.3d-5) then
tmp = x1 + ((3.0d0 * (((t_1 - (2.0d0 * x2)) - x1) / t_2)) + (x1 + (t_5 + ((t_1 * t_0) + (t_2 * (((x1 * x1) * ((t_3 * 4.0d0) - 6.0d0)) + (((x1 * 2.0d0) * t_0) * ((2.0d0 * x2) - 3.0d0))))))))
else if (x1 <= 2.35d+144) then
tmp = t_6
else
tmp = t_4
end if
code = tmp
end function
public static double code(double x1, double x2) {
double t_0 = (2.0 * x2) - x1;
double t_1 = x1 * (x1 * 3.0);
double t_2 = (x1 * x1) + 1.0;
double t_3 = ((t_1 + (2.0 * x2)) - x1) / t_2;
double t_4 = x1 + (x1 + (3.0 * (x1 * ((x1 * 3.0) + -1.0))));
double t_5 = x1 * (x1 * x1);
double t_6 = x1 + (9.0 + (x1 + (t_5 + ((t_1 * t_3) + (t_2 * ((((x1 * 2.0) * t_3) * (t_3 - 3.0)) + ((x1 * x1) * 6.0)))))));
double tmp;
if (x1 <= -1.8e+104) {
tmp = t_4;
} else if (x1 <= -0.0032) {
tmp = t_6;
} else if (x1 <= 4.3e-5) {
tmp = x1 + ((3.0 * (((t_1 - (2.0 * x2)) - x1) / t_2)) + (x1 + (t_5 + ((t_1 * t_0) + (t_2 * (((x1 * x1) * ((t_3 * 4.0) - 6.0)) + (((x1 * 2.0) * t_0) * ((2.0 * x2) - 3.0))))))));
} else if (x1 <= 2.35e+144) {
tmp = t_6;
} else {
tmp = t_4;
}
return tmp;
}
def code(x1, x2): t_0 = (2.0 * x2) - x1 t_1 = x1 * (x1 * 3.0) t_2 = (x1 * x1) + 1.0 t_3 = ((t_1 + (2.0 * x2)) - x1) / t_2 t_4 = x1 + (x1 + (3.0 * (x1 * ((x1 * 3.0) + -1.0)))) t_5 = x1 * (x1 * x1) t_6 = x1 + (9.0 + (x1 + (t_5 + ((t_1 * t_3) + (t_2 * ((((x1 * 2.0) * t_3) * (t_3 - 3.0)) + ((x1 * x1) * 6.0))))))) tmp = 0 if x1 <= -1.8e+104: tmp = t_4 elif x1 <= -0.0032: tmp = t_6 elif x1 <= 4.3e-5: tmp = x1 + ((3.0 * (((t_1 - (2.0 * x2)) - x1) / t_2)) + (x1 + (t_5 + ((t_1 * t_0) + (t_2 * (((x1 * x1) * ((t_3 * 4.0) - 6.0)) + (((x1 * 2.0) * t_0) * ((2.0 * x2) - 3.0)))))))) elif x1 <= 2.35e+144: tmp = t_6 else: tmp = t_4 return tmp
function code(x1, x2) t_0 = Float64(Float64(2.0 * x2) - x1) t_1 = Float64(x1 * Float64(x1 * 3.0)) t_2 = Float64(Float64(x1 * x1) + 1.0) t_3 = Float64(Float64(Float64(t_1 + Float64(2.0 * x2)) - x1) / t_2) t_4 = Float64(x1 + Float64(x1 + Float64(3.0 * Float64(x1 * Float64(Float64(x1 * 3.0) + -1.0))))) t_5 = Float64(x1 * Float64(x1 * x1)) t_6 = Float64(x1 + Float64(9.0 + Float64(x1 + Float64(t_5 + Float64(Float64(t_1 * t_3) + Float64(t_2 * Float64(Float64(Float64(Float64(x1 * 2.0) * t_3) * Float64(t_3 - 3.0)) + Float64(Float64(x1 * x1) * 6.0)))))))) tmp = 0.0 if (x1 <= -1.8e+104) tmp = t_4; elseif (x1 <= -0.0032) tmp = t_6; elseif (x1 <= 4.3e-5) tmp = Float64(x1 + Float64(Float64(3.0 * Float64(Float64(Float64(t_1 - Float64(2.0 * x2)) - x1) / t_2)) + Float64(x1 + Float64(t_5 + Float64(Float64(t_1 * t_0) + Float64(t_2 * Float64(Float64(Float64(x1 * x1) * Float64(Float64(t_3 * 4.0) - 6.0)) + Float64(Float64(Float64(x1 * 2.0) * t_0) * Float64(Float64(2.0 * x2) - 3.0))))))))); elseif (x1 <= 2.35e+144) tmp = t_6; else tmp = t_4; end return tmp end
function tmp_2 = code(x1, x2) t_0 = (2.0 * x2) - x1; t_1 = x1 * (x1 * 3.0); t_2 = (x1 * x1) + 1.0; t_3 = ((t_1 + (2.0 * x2)) - x1) / t_2; t_4 = x1 + (x1 + (3.0 * (x1 * ((x1 * 3.0) + -1.0)))); t_5 = x1 * (x1 * x1); t_6 = x1 + (9.0 + (x1 + (t_5 + ((t_1 * t_3) + (t_2 * ((((x1 * 2.0) * t_3) * (t_3 - 3.0)) + ((x1 * x1) * 6.0))))))); tmp = 0.0; if (x1 <= -1.8e+104) tmp = t_4; elseif (x1 <= -0.0032) tmp = t_6; elseif (x1 <= 4.3e-5) tmp = x1 + ((3.0 * (((t_1 - (2.0 * x2)) - x1) / t_2)) + (x1 + (t_5 + ((t_1 * t_0) + (t_2 * (((x1 * x1) * ((t_3 * 4.0) - 6.0)) + (((x1 * 2.0) * t_0) * ((2.0 * x2) - 3.0)))))))); elseif (x1 <= 2.35e+144) tmp = t_6; else tmp = t_4; end tmp_2 = tmp; end
code[x1_, x2_] := Block[{t$95$0 = N[(N[(2.0 * x2), $MachinePrecision] - x1), $MachinePrecision]}, Block[{t$95$1 = N[(x1 * N[(x1 * 3.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(x1 * x1), $MachinePrecision] + 1.0), $MachinePrecision]}, Block[{t$95$3 = N[(N[(N[(t$95$1 + N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$2), $MachinePrecision]}, Block[{t$95$4 = N[(x1 + N[(x1 + N[(3.0 * N[(x1 * N[(N[(x1 * 3.0), $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$5 = N[(x1 * N[(x1 * x1), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$6 = N[(x1 + N[(9.0 + N[(x1 + N[(t$95$5 + N[(N[(t$95$1 * t$95$3), $MachinePrecision] + N[(t$95$2 * N[(N[(N[(N[(x1 * 2.0), $MachinePrecision] * t$95$3), $MachinePrecision] * N[(t$95$3 - 3.0), $MachinePrecision]), $MachinePrecision] + N[(N[(x1 * x1), $MachinePrecision] * 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x1, -1.8e+104], t$95$4, If[LessEqual[x1, -0.0032], t$95$6, If[LessEqual[x1, 4.3e-5], N[(x1 + N[(N[(3.0 * N[(N[(N[(t$95$1 - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$2), $MachinePrecision]), $MachinePrecision] + N[(x1 + N[(t$95$5 + N[(N[(t$95$1 * t$95$0), $MachinePrecision] + N[(t$95$2 * N[(N[(N[(x1 * x1), $MachinePrecision] * N[(N[(t$95$3 * 4.0), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision] + N[(N[(N[(x1 * 2.0), $MachinePrecision] * t$95$0), $MachinePrecision] * N[(N[(2.0 * x2), $MachinePrecision] - 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 2.35e+144], t$95$6, t$95$4]]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := 2 \cdot x2 - x1\\
t_1 := x1 \cdot \left(x1 \cdot 3\right)\\
t_2 := x1 \cdot x1 + 1\\
t_3 := \frac{\left(t\_1 + 2 \cdot x2\right) - x1}{t\_2}\\
t_4 := x1 + \left(x1 + 3 \cdot \left(x1 \cdot \left(x1 \cdot 3 + -1\right)\right)\right)\\
t_5 := x1 \cdot \left(x1 \cdot x1\right)\\
t_6 := x1 + \left(9 + \left(x1 + \left(t\_5 + \left(t\_1 \cdot t\_3 + t\_2 \cdot \left(\left(\left(x1 \cdot 2\right) \cdot t\_3\right) \cdot \left(t\_3 - 3\right) + \left(x1 \cdot x1\right) \cdot 6\right)\right)\right)\right)\right)\\
\mathbf{if}\;x1 \leq -1.8 \cdot 10^{+104}:\\
\;\;\;\;t\_4\\
\mathbf{elif}\;x1 \leq -0.0032:\\
\;\;\;\;t\_6\\
\mathbf{elif}\;x1 \leq 4.3 \cdot 10^{-5}:\\
\;\;\;\;x1 + \left(3 \cdot \frac{\left(t\_1 - 2 \cdot x2\right) - x1}{t\_2} + \left(x1 + \left(t\_5 + \left(t\_1 \cdot t\_0 + t\_2 \cdot \left(\left(x1 \cdot x1\right) \cdot \left(t\_3 \cdot 4 - 6\right) + \left(\left(x1 \cdot 2\right) \cdot t\_0\right) \cdot \left(2 \cdot x2 - 3\right)\right)\right)\right)\right)\right)\\
\mathbf{elif}\;x1 \leq 2.35 \cdot 10^{+144}:\\
\;\;\;\;t\_6\\
\mathbf{else}:\\
\;\;\;\;t\_4\\
\end{array}
\end{array}
if x1 < -1.8e104 or 2.3500000000000001e144 < x1 Initial program 0.0%
Taylor expanded in x1 around 0 0.0%
Taylor expanded in x1 around 0 59.1%
Taylor expanded in x2 around 0 91.7%
if -1.8e104 < x1 < -0.00320000000000000015 or 4.3000000000000002e-5 < x1 < 2.3500000000000001e144Initial program 99.4%
fma-define99.4%
*-un-lft-identity99.4%
associate--l+99.4%
associate-*r*99.6%
fma-define99.6%
pow299.6%
Applied egg-rr99.6%
*-lft-identity99.6%
Simplified99.6%
Taylor expanded in x1 around inf 94.6%
Taylor expanded in x1 around inf 94.6%
if -0.00320000000000000015 < x1 < 4.3000000000000002e-5Initial program 99.5%
Taylor expanded in x1 around 0 99.2%
+-commutative99.2%
mul-1-neg99.2%
sub-neg99.2%
Simplified99.2%
Taylor expanded in x1 around 0 99.0%
+-commutative99.2%
mul-1-neg99.2%
sub-neg99.2%
Simplified99.0%
Taylor expanded in x1 around 0 99.0%
Final simplification96.0%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (* 4.0 (* x2 (- (* 2.0 x2) 3.0))))
(t_1 (- (* 2.0 x2) x1))
(t_2 (* x1 (* x1 3.0)))
(t_3 (- 3.0 (* x2 -2.0)))
(t_4 (+ (* x1 x1) 1.0))
(t_5 (/ (- (+ t_2 (* 2.0 x2)) x1) t_4)))
(if (<= x1 -4.5e+153)
(+ x1 (+ x1 (* 3.0 (* x1 (+ (* x1 3.0) -1.0)))))
(if (<= x1 -1.2)
(+
x1
(+
(* 3.0 (/ (- (- t_2 (* 2.0 x2)) x1) t_4))
(+
x1
(*
x1
(+
t_0
(*
x1
(-
(+
(* x2 6.0)
(+
(* x2 8.0)
(*
x1
(-
(+
t_0
(* x1 (- (+ (* x2 8.0) (* 4.0 (- 3.0 (* 2.0 x2)))) 6.0)))
6.0))))
6.0)))))))
(if (<= x1 4.3e-5)
(+
x1
(+
(+ x1 (* 4.0 (* x2 (+ (* x1 -3.0) (* 2.0 (* x1 x2))))))
(* 3.0 (+ (* x2 -2.0) (* x1 (+ (* x1 t_3) -1.0))))))
(if (<= x1 4.5e+92)
(+
x1
(+
9.0
(+
x1
(+
(* x1 (* x1 x1))
(+
(* t_2 t_1)
(*
t_4
(+
(* (* x1 x1) (- (* t_5 4.0) 6.0))
(* (- t_5 3.0) (* (* x1 2.0) t_1)))))))))
(+
x1
(+
(* x1 (- (+ t_0 (* x1 (+ (* x1 3.0) (* 3.0 t_3)))) 2.0))
(* x2 -6.0)))))))))
double code(double x1, double x2) {
double t_0 = 4.0 * (x2 * ((2.0 * x2) - 3.0));
double t_1 = (2.0 * x2) - x1;
double t_2 = x1 * (x1 * 3.0);
double t_3 = 3.0 - (x2 * -2.0);
double t_4 = (x1 * x1) + 1.0;
double t_5 = ((t_2 + (2.0 * x2)) - x1) / t_4;
double tmp;
if (x1 <= -4.5e+153) {
tmp = x1 + (x1 + (3.0 * (x1 * ((x1 * 3.0) + -1.0))));
} else if (x1 <= -1.2) {
tmp = x1 + ((3.0 * (((t_2 - (2.0 * x2)) - x1) / t_4)) + (x1 + (x1 * (t_0 + (x1 * (((x2 * 6.0) + ((x2 * 8.0) + (x1 * ((t_0 + (x1 * (((x2 * 8.0) + (4.0 * (3.0 - (2.0 * x2)))) - 6.0))) - 6.0)))) - 6.0))))));
} else if (x1 <= 4.3e-5) {
tmp = x1 + ((x1 + (4.0 * (x2 * ((x1 * -3.0) + (2.0 * (x1 * x2)))))) + (3.0 * ((x2 * -2.0) + (x1 * ((x1 * t_3) + -1.0)))));
} else if (x1 <= 4.5e+92) {
tmp = x1 + (9.0 + (x1 + ((x1 * (x1 * x1)) + ((t_2 * t_1) + (t_4 * (((x1 * x1) * ((t_5 * 4.0) - 6.0)) + ((t_5 - 3.0) * ((x1 * 2.0) * t_1))))))));
} else {
tmp = x1 + ((x1 * ((t_0 + (x1 * ((x1 * 3.0) + (3.0 * t_3)))) - 2.0)) + (x2 * -6.0));
}
return tmp;
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
real(8) :: t_0
real(8) :: t_1
real(8) :: t_2
real(8) :: t_3
real(8) :: t_4
real(8) :: t_5
real(8) :: tmp
t_0 = 4.0d0 * (x2 * ((2.0d0 * x2) - 3.0d0))
t_1 = (2.0d0 * x2) - x1
t_2 = x1 * (x1 * 3.0d0)
t_3 = 3.0d0 - (x2 * (-2.0d0))
t_4 = (x1 * x1) + 1.0d0
t_5 = ((t_2 + (2.0d0 * x2)) - x1) / t_4
if (x1 <= (-4.5d+153)) then
tmp = x1 + (x1 + (3.0d0 * (x1 * ((x1 * 3.0d0) + (-1.0d0)))))
else if (x1 <= (-1.2d0)) then
tmp = x1 + ((3.0d0 * (((t_2 - (2.0d0 * x2)) - x1) / t_4)) + (x1 + (x1 * (t_0 + (x1 * (((x2 * 6.0d0) + ((x2 * 8.0d0) + (x1 * ((t_0 + (x1 * (((x2 * 8.0d0) + (4.0d0 * (3.0d0 - (2.0d0 * x2)))) - 6.0d0))) - 6.0d0)))) - 6.0d0))))))
else if (x1 <= 4.3d-5) then
tmp = x1 + ((x1 + (4.0d0 * (x2 * ((x1 * (-3.0d0)) + (2.0d0 * (x1 * x2)))))) + (3.0d0 * ((x2 * (-2.0d0)) + (x1 * ((x1 * t_3) + (-1.0d0))))))
else if (x1 <= 4.5d+92) then
tmp = x1 + (9.0d0 + (x1 + ((x1 * (x1 * x1)) + ((t_2 * t_1) + (t_4 * (((x1 * x1) * ((t_5 * 4.0d0) - 6.0d0)) + ((t_5 - 3.0d0) * ((x1 * 2.0d0) * t_1))))))))
else
tmp = x1 + ((x1 * ((t_0 + (x1 * ((x1 * 3.0d0) + (3.0d0 * t_3)))) - 2.0d0)) + (x2 * (-6.0d0)))
end if
code = tmp
end function
public static double code(double x1, double x2) {
double t_0 = 4.0 * (x2 * ((2.0 * x2) - 3.0));
double t_1 = (2.0 * x2) - x1;
double t_2 = x1 * (x1 * 3.0);
double t_3 = 3.0 - (x2 * -2.0);
double t_4 = (x1 * x1) + 1.0;
double t_5 = ((t_2 + (2.0 * x2)) - x1) / t_4;
double tmp;
if (x1 <= -4.5e+153) {
tmp = x1 + (x1 + (3.0 * (x1 * ((x1 * 3.0) + -1.0))));
} else if (x1 <= -1.2) {
tmp = x1 + ((3.0 * (((t_2 - (2.0 * x2)) - x1) / t_4)) + (x1 + (x1 * (t_0 + (x1 * (((x2 * 6.0) + ((x2 * 8.0) + (x1 * ((t_0 + (x1 * (((x2 * 8.0) + (4.0 * (3.0 - (2.0 * x2)))) - 6.0))) - 6.0)))) - 6.0))))));
} else if (x1 <= 4.3e-5) {
tmp = x1 + ((x1 + (4.0 * (x2 * ((x1 * -3.0) + (2.0 * (x1 * x2)))))) + (3.0 * ((x2 * -2.0) + (x1 * ((x1 * t_3) + -1.0)))));
} else if (x1 <= 4.5e+92) {
tmp = x1 + (9.0 + (x1 + ((x1 * (x1 * x1)) + ((t_2 * t_1) + (t_4 * (((x1 * x1) * ((t_5 * 4.0) - 6.0)) + ((t_5 - 3.0) * ((x1 * 2.0) * t_1))))))));
} else {
tmp = x1 + ((x1 * ((t_0 + (x1 * ((x1 * 3.0) + (3.0 * t_3)))) - 2.0)) + (x2 * -6.0));
}
return tmp;
}
def code(x1, x2): t_0 = 4.0 * (x2 * ((2.0 * x2) - 3.0)) t_1 = (2.0 * x2) - x1 t_2 = x1 * (x1 * 3.0) t_3 = 3.0 - (x2 * -2.0) t_4 = (x1 * x1) + 1.0 t_5 = ((t_2 + (2.0 * x2)) - x1) / t_4 tmp = 0 if x1 <= -4.5e+153: tmp = x1 + (x1 + (3.0 * (x1 * ((x1 * 3.0) + -1.0)))) elif x1 <= -1.2: tmp = x1 + ((3.0 * (((t_2 - (2.0 * x2)) - x1) / t_4)) + (x1 + (x1 * (t_0 + (x1 * (((x2 * 6.0) + ((x2 * 8.0) + (x1 * ((t_0 + (x1 * (((x2 * 8.0) + (4.0 * (3.0 - (2.0 * x2)))) - 6.0))) - 6.0)))) - 6.0)))))) elif x1 <= 4.3e-5: tmp = x1 + ((x1 + (4.0 * (x2 * ((x1 * -3.0) + (2.0 * (x1 * x2)))))) + (3.0 * ((x2 * -2.0) + (x1 * ((x1 * t_3) + -1.0))))) elif x1 <= 4.5e+92: tmp = x1 + (9.0 + (x1 + ((x1 * (x1 * x1)) + ((t_2 * t_1) + (t_4 * (((x1 * x1) * ((t_5 * 4.0) - 6.0)) + ((t_5 - 3.0) * ((x1 * 2.0) * t_1)))))))) else: tmp = x1 + ((x1 * ((t_0 + (x1 * ((x1 * 3.0) + (3.0 * t_3)))) - 2.0)) + (x2 * -6.0)) return tmp
function code(x1, x2) t_0 = Float64(4.0 * Float64(x2 * Float64(Float64(2.0 * x2) - 3.0))) t_1 = Float64(Float64(2.0 * x2) - x1) t_2 = Float64(x1 * Float64(x1 * 3.0)) t_3 = Float64(3.0 - Float64(x2 * -2.0)) t_4 = Float64(Float64(x1 * x1) + 1.0) t_5 = Float64(Float64(Float64(t_2 + Float64(2.0 * x2)) - x1) / t_4) tmp = 0.0 if (x1 <= -4.5e+153) tmp = Float64(x1 + Float64(x1 + Float64(3.0 * Float64(x1 * Float64(Float64(x1 * 3.0) + -1.0))))); elseif (x1 <= -1.2) tmp = Float64(x1 + Float64(Float64(3.0 * Float64(Float64(Float64(t_2 - Float64(2.0 * x2)) - x1) / t_4)) + Float64(x1 + Float64(x1 * Float64(t_0 + Float64(x1 * Float64(Float64(Float64(x2 * 6.0) + Float64(Float64(x2 * 8.0) + Float64(x1 * Float64(Float64(t_0 + Float64(x1 * Float64(Float64(Float64(x2 * 8.0) + Float64(4.0 * Float64(3.0 - Float64(2.0 * x2)))) - 6.0))) - 6.0)))) - 6.0))))))); elseif (x1 <= 4.3e-5) tmp = Float64(x1 + Float64(Float64(x1 + Float64(4.0 * Float64(x2 * Float64(Float64(x1 * -3.0) + Float64(2.0 * Float64(x1 * x2)))))) + Float64(3.0 * Float64(Float64(x2 * -2.0) + Float64(x1 * Float64(Float64(x1 * t_3) + -1.0)))))); elseif (x1 <= 4.5e+92) tmp = Float64(x1 + Float64(9.0 + Float64(x1 + Float64(Float64(x1 * Float64(x1 * x1)) + Float64(Float64(t_2 * t_1) + Float64(t_4 * Float64(Float64(Float64(x1 * x1) * Float64(Float64(t_5 * 4.0) - 6.0)) + Float64(Float64(t_5 - 3.0) * Float64(Float64(x1 * 2.0) * t_1))))))))); else tmp = Float64(x1 + Float64(Float64(x1 * Float64(Float64(t_0 + Float64(x1 * Float64(Float64(x1 * 3.0) + Float64(3.0 * t_3)))) - 2.0)) + Float64(x2 * -6.0))); end return tmp end
function tmp_2 = code(x1, x2) t_0 = 4.0 * (x2 * ((2.0 * x2) - 3.0)); t_1 = (2.0 * x2) - x1; t_2 = x1 * (x1 * 3.0); t_3 = 3.0 - (x2 * -2.0); t_4 = (x1 * x1) + 1.0; t_5 = ((t_2 + (2.0 * x2)) - x1) / t_4; tmp = 0.0; if (x1 <= -4.5e+153) tmp = x1 + (x1 + (3.0 * (x1 * ((x1 * 3.0) + -1.0)))); elseif (x1 <= -1.2) tmp = x1 + ((3.0 * (((t_2 - (2.0 * x2)) - x1) / t_4)) + (x1 + (x1 * (t_0 + (x1 * (((x2 * 6.0) + ((x2 * 8.0) + (x1 * ((t_0 + (x1 * (((x2 * 8.0) + (4.0 * (3.0 - (2.0 * x2)))) - 6.0))) - 6.0)))) - 6.0)))))); elseif (x1 <= 4.3e-5) tmp = x1 + ((x1 + (4.0 * (x2 * ((x1 * -3.0) + (2.0 * (x1 * x2)))))) + (3.0 * ((x2 * -2.0) + (x1 * ((x1 * t_3) + -1.0))))); elseif (x1 <= 4.5e+92) tmp = x1 + (9.0 + (x1 + ((x1 * (x1 * x1)) + ((t_2 * t_1) + (t_4 * (((x1 * x1) * ((t_5 * 4.0) - 6.0)) + ((t_5 - 3.0) * ((x1 * 2.0) * t_1)))))))); else tmp = x1 + ((x1 * ((t_0 + (x1 * ((x1 * 3.0) + (3.0 * t_3)))) - 2.0)) + (x2 * -6.0)); end tmp_2 = tmp; end
code[x1_, x2_] := Block[{t$95$0 = N[(4.0 * N[(x2 * N[(N[(2.0 * x2), $MachinePrecision] - 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(N[(2.0 * x2), $MachinePrecision] - x1), $MachinePrecision]}, Block[{t$95$2 = N[(x1 * N[(x1 * 3.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(3.0 - N[(x2 * -2.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[(N[(x1 * x1), $MachinePrecision] + 1.0), $MachinePrecision]}, Block[{t$95$5 = N[(N[(N[(t$95$2 + N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$4), $MachinePrecision]}, If[LessEqual[x1, -4.5e+153], N[(x1 + N[(x1 + N[(3.0 * N[(x1 * N[(N[(x1 * 3.0), $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, -1.2], N[(x1 + N[(N[(3.0 * N[(N[(N[(t$95$2 - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$4), $MachinePrecision]), $MachinePrecision] + N[(x1 + N[(x1 * N[(t$95$0 + N[(x1 * N[(N[(N[(x2 * 6.0), $MachinePrecision] + N[(N[(x2 * 8.0), $MachinePrecision] + N[(x1 * N[(N[(t$95$0 + N[(x1 * N[(N[(N[(x2 * 8.0), $MachinePrecision] + N[(4.0 * N[(3.0 - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 4.3e-5], N[(x1 + N[(N[(x1 + N[(4.0 * N[(x2 * N[(N[(x1 * -3.0), $MachinePrecision] + N[(2.0 * N[(x1 * x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(3.0 * N[(N[(x2 * -2.0), $MachinePrecision] + N[(x1 * N[(N[(x1 * t$95$3), $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 4.5e+92], N[(x1 + N[(9.0 + N[(x1 + N[(N[(x1 * N[(x1 * x1), $MachinePrecision]), $MachinePrecision] + N[(N[(t$95$2 * t$95$1), $MachinePrecision] + N[(t$95$4 * N[(N[(N[(x1 * x1), $MachinePrecision] * N[(N[(t$95$5 * 4.0), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision] + N[(N[(t$95$5 - 3.0), $MachinePrecision] * N[(N[(x1 * 2.0), $MachinePrecision] * t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x1 + N[(N[(x1 * N[(N[(t$95$0 + N[(x1 * N[(N[(x1 * 3.0), $MachinePrecision] + N[(3.0 * t$95$3), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - 2.0), $MachinePrecision]), $MachinePrecision] + N[(x2 * -6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := 4 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right)\\
t_1 := 2 \cdot x2 - x1\\
t_2 := x1 \cdot \left(x1 \cdot 3\right)\\
t_3 := 3 - x2 \cdot -2\\
t_4 := x1 \cdot x1 + 1\\
t_5 := \frac{\left(t\_2 + 2 \cdot x2\right) - x1}{t\_4}\\
\mathbf{if}\;x1 \leq -4.5 \cdot 10^{+153}:\\
\;\;\;\;x1 + \left(x1 + 3 \cdot \left(x1 \cdot \left(x1 \cdot 3 + -1\right)\right)\right)\\
\mathbf{elif}\;x1 \leq -1.2:\\
\;\;\;\;x1 + \left(3 \cdot \frac{\left(t\_2 - 2 \cdot x2\right) - x1}{t\_4} + \left(x1 + x1 \cdot \left(t\_0 + x1 \cdot \left(\left(x2 \cdot 6 + \left(x2 \cdot 8 + x1 \cdot \left(\left(t\_0 + x1 \cdot \left(\left(x2 \cdot 8 + 4 \cdot \left(3 - 2 \cdot x2\right)\right) - 6\right)\right) - 6\right)\right)\right) - 6\right)\right)\right)\right)\\
\mathbf{elif}\;x1 \leq 4.3 \cdot 10^{-5}:\\
\;\;\;\;x1 + \left(\left(x1 + 4 \cdot \left(x2 \cdot \left(x1 \cdot -3 + 2 \cdot \left(x1 \cdot x2\right)\right)\right)\right) + 3 \cdot \left(x2 \cdot -2 + x1 \cdot \left(x1 \cdot t\_3 + -1\right)\right)\right)\\
\mathbf{elif}\;x1 \leq 4.5 \cdot 10^{+92}:\\
\;\;\;\;x1 + \left(9 + \left(x1 + \left(x1 \cdot \left(x1 \cdot x1\right) + \left(t\_2 \cdot t\_1 + t\_4 \cdot \left(\left(x1 \cdot x1\right) \cdot \left(t\_5 \cdot 4 - 6\right) + \left(t\_5 - 3\right) \cdot \left(\left(x1 \cdot 2\right) \cdot t\_1\right)\right)\right)\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x1 + \left(x1 \cdot \left(\left(t\_0 + x1 \cdot \left(x1 \cdot 3 + 3 \cdot t\_3\right)\right) - 2\right) + x2 \cdot -6\right)\\
\end{array}
\end{array}
if x1 < -4.5000000000000001e153Initial program 0.0%
Taylor expanded in x1 around 0 0.0%
Taylor expanded in x1 around 0 58.6%
Taylor expanded in x2 around 0 100.0%
if -4.5000000000000001e153 < x1 < -1.19999999999999996Initial program 79.4%
Taylor expanded in x1 around 0 65.6%
+-commutative65.6%
mul-1-neg65.6%
sub-neg65.6%
Simplified65.6%
Taylor expanded in x1 around 0 46.8%
+-commutative65.6%
mul-1-neg65.6%
sub-neg65.6%
Simplified46.8%
Taylor expanded in x1 around 0 34.6%
Taylor expanded in x1 around 0 54.7%
if -1.19999999999999996 < x1 < 4.3000000000000002e-5Initial program 99.5%
Taylor expanded in x1 around 0 89.3%
Taylor expanded in x1 around 0 89.3%
Taylor expanded in x2 around 0 99.0%
if 4.3000000000000002e-5 < x1 < 4.4999999999999999e92Initial program 99.1%
Taylor expanded in x1 around 0 93.0%
+-commutative93.0%
mul-1-neg93.0%
sub-neg93.0%
Simplified93.0%
Taylor expanded in x1 around 0 82.8%
+-commutative93.0%
mul-1-neg93.0%
sub-neg93.0%
Simplified82.8%
Taylor expanded in x1 around inf 82.8%
if 4.4999999999999999e92 < x1 Initial program 32.0%
Taylor expanded in x1 around 0 11.0%
Taylor expanded in x1 around 0 90.4%
Final simplification91.5%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (- (* 2.0 x2) 3.0))
(t_1 (* 4.0 (* x2 t_0)))
(t_2 (* x1 (* x1 3.0)))
(t_3 (+ (* x1 x1) 1.0))
(t_4 (* 3.0 (/ (- (- t_2 (* 2.0 x2)) x1) t_3)))
(t_5 (/ (- (+ t_2 (* 2.0 x2)) x1) t_3))
(t_6 (* (* x1 x1) (- (* t_5 4.0) 6.0)))
(t_7 (* x1 (* x1 x1)))
(t_8 (- (* 2.0 x2) x1))
(t_9 (* (* x1 2.0) t_8))
(t_10 (* t_2 t_8)))
(if (<= x1 -4.5e+153)
(+ x1 (+ x1 (* 3.0 (* x1 (+ (* x1 3.0) -1.0)))))
(if (<= x1 -1.55)
(+
x1
(+
t_4
(+
x1
(*
x1
(+
t_1
(*
x1
(-
(+
(* x2 6.0)
(+
(* x2 8.0)
(*
x1
(-
(+
t_1
(* x1 (- (+ (* x2 8.0) (* 4.0 (- 3.0 (* 2.0 x2)))) 6.0)))
6.0))))
6.0)))))))
(if (<= x1 4.3e-5)
(+ x1 (+ t_4 (+ x1 (+ t_7 (+ t_10 (* t_3 (+ t_6 (* t_9 t_0))))))))
(if (<= x1 4.5e+92)
(+
x1
(+
9.0
(+ x1 (+ t_7 (+ t_10 (* t_3 (+ t_6 (* (- t_5 3.0) t_9))))))))
(+
x1
(+
(*
x1
(-
(+ t_1 (* x1 (+ (* x1 3.0) (* 3.0 (- 3.0 (* x2 -2.0))))))
2.0))
(* x2 -6.0)))))))))
double code(double x1, double x2) {
double t_0 = (2.0 * x2) - 3.0;
double t_1 = 4.0 * (x2 * t_0);
double t_2 = x1 * (x1 * 3.0);
double t_3 = (x1 * x1) + 1.0;
double t_4 = 3.0 * (((t_2 - (2.0 * x2)) - x1) / t_3);
double t_5 = ((t_2 + (2.0 * x2)) - x1) / t_3;
double t_6 = (x1 * x1) * ((t_5 * 4.0) - 6.0);
double t_7 = x1 * (x1 * x1);
double t_8 = (2.0 * x2) - x1;
double t_9 = (x1 * 2.0) * t_8;
double t_10 = t_2 * t_8;
double tmp;
if (x1 <= -4.5e+153) {
tmp = x1 + (x1 + (3.0 * (x1 * ((x1 * 3.0) + -1.0))));
} else if (x1 <= -1.55) {
tmp = x1 + (t_4 + (x1 + (x1 * (t_1 + (x1 * (((x2 * 6.0) + ((x2 * 8.0) + (x1 * ((t_1 + (x1 * (((x2 * 8.0) + (4.0 * (3.0 - (2.0 * x2)))) - 6.0))) - 6.0)))) - 6.0))))));
} else if (x1 <= 4.3e-5) {
tmp = x1 + (t_4 + (x1 + (t_7 + (t_10 + (t_3 * (t_6 + (t_9 * t_0)))))));
} else if (x1 <= 4.5e+92) {
tmp = x1 + (9.0 + (x1 + (t_7 + (t_10 + (t_3 * (t_6 + ((t_5 - 3.0) * t_9)))))));
} else {
tmp = x1 + ((x1 * ((t_1 + (x1 * ((x1 * 3.0) + (3.0 * (3.0 - (x2 * -2.0)))))) - 2.0)) + (x2 * -6.0));
}
return tmp;
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
real(8) :: t_0
real(8) :: t_1
real(8) :: t_10
real(8) :: t_2
real(8) :: t_3
real(8) :: t_4
real(8) :: t_5
real(8) :: t_6
real(8) :: t_7
real(8) :: t_8
real(8) :: t_9
real(8) :: tmp
t_0 = (2.0d0 * x2) - 3.0d0
t_1 = 4.0d0 * (x2 * t_0)
t_2 = x1 * (x1 * 3.0d0)
t_3 = (x1 * x1) + 1.0d0
t_4 = 3.0d0 * (((t_2 - (2.0d0 * x2)) - x1) / t_3)
t_5 = ((t_2 + (2.0d0 * x2)) - x1) / t_3
t_6 = (x1 * x1) * ((t_5 * 4.0d0) - 6.0d0)
t_7 = x1 * (x1 * x1)
t_8 = (2.0d0 * x2) - x1
t_9 = (x1 * 2.0d0) * t_8
t_10 = t_2 * t_8
if (x1 <= (-4.5d+153)) then
tmp = x1 + (x1 + (3.0d0 * (x1 * ((x1 * 3.0d0) + (-1.0d0)))))
else if (x1 <= (-1.55d0)) then
tmp = x1 + (t_4 + (x1 + (x1 * (t_1 + (x1 * (((x2 * 6.0d0) + ((x2 * 8.0d0) + (x1 * ((t_1 + (x1 * (((x2 * 8.0d0) + (4.0d0 * (3.0d0 - (2.0d0 * x2)))) - 6.0d0))) - 6.0d0)))) - 6.0d0))))))
else if (x1 <= 4.3d-5) then
tmp = x1 + (t_4 + (x1 + (t_7 + (t_10 + (t_3 * (t_6 + (t_9 * t_0)))))))
else if (x1 <= 4.5d+92) then
tmp = x1 + (9.0d0 + (x1 + (t_7 + (t_10 + (t_3 * (t_6 + ((t_5 - 3.0d0) * t_9)))))))
else
tmp = x1 + ((x1 * ((t_1 + (x1 * ((x1 * 3.0d0) + (3.0d0 * (3.0d0 - (x2 * (-2.0d0))))))) - 2.0d0)) + (x2 * (-6.0d0)))
end if
code = tmp
end function
public static double code(double x1, double x2) {
double t_0 = (2.0 * x2) - 3.0;
double t_1 = 4.0 * (x2 * t_0);
double t_2 = x1 * (x1 * 3.0);
double t_3 = (x1 * x1) + 1.0;
double t_4 = 3.0 * (((t_2 - (2.0 * x2)) - x1) / t_3);
double t_5 = ((t_2 + (2.0 * x2)) - x1) / t_3;
double t_6 = (x1 * x1) * ((t_5 * 4.0) - 6.0);
double t_7 = x1 * (x1 * x1);
double t_8 = (2.0 * x2) - x1;
double t_9 = (x1 * 2.0) * t_8;
double t_10 = t_2 * t_8;
double tmp;
if (x1 <= -4.5e+153) {
tmp = x1 + (x1 + (3.0 * (x1 * ((x1 * 3.0) + -1.0))));
} else if (x1 <= -1.55) {
tmp = x1 + (t_4 + (x1 + (x1 * (t_1 + (x1 * (((x2 * 6.0) + ((x2 * 8.0) + (x1 * ((t_1 + (x1 * (((x2 * 8.0) + (4.0 * (3.0 - (2.0 * x2)))) - 6.0))) - 6.0)))) - 6.0))))));
} else if (x1 <= 4.3e-5) {
tmp = x1 + (t_4 + (x1 + (t_7 + (t_10 + (t_3 * (t_6 + (t_9 * t_0)))))));
} else if (x1 <= 4.5e+92) {
tmp = x1 + (9.0 + (x1 + (t_7 + (t_10 + (t_3 * (t_6 + ((t_5 - 3.0) * t_9)))))));
} else {
tmp = x1 + ((x1 * ((t_1 + (x1 * ((x1 * 3.0) + (3.0 * (3.0 - (x2 * -2.0)))))) - 2.0)) + (x2 * -6.0));
}
return tmp;
}
def code(x1, x2): t_0 = (2.0 * x2) - 3.0 t_1 = 4.0 * (x2 * t_0) t_2 = x1 * (x1 * 3.0) t_3 = (x1 * x1) + 1.0 t_4 = 3.0 * (((t_2 - (2.0 * x2)) - x1) / t_3) t_5 = ((t_2 + (2.0 * x2)) - x1) / t_3 t_6 = (x1 * x1) * ((t_5 * 4.0) - 6.0) t_7 = x1 * (x1 * x1) t_8 = (2.0 * x2) - x1 t_9 = (x1 * 2.0) * t_8 t_10 = t_2 * t_8 tmp = 0 if x1 <= -4.5e+153: tmp = x1 + (x1 + (3.0 * (x1 * ((x1 * 3.0) + -1.0)))) elif x1 <= -1.55: tmp = x1 + (t_4 + (x1 + (x1 * (t_1 + (x1 * (((x2 * 6.0) + ((x2 * 8.0) + (x1 * ((t_1 + (x1 * (((x2 * 8.0) + (4.0 * (3.0 - (2.0 * x2)))) - 6.0))) - 6.0)))) - 6.0)))))) elif x1 <= 4.3e-5: tmp = x1 + (t_4 + (x1 + (t_7 + (t_10 + (t_3 * (t_6 + (t_9 * t_0))))))) elif x1 <= 4.5e+92: tmp = x1 + (9.0 + (x1 + (t_7 + (t_10 + (t_3 * (t_6 + ((t_5 - 3.0) * t_9))))))) else: tmp = x1 + ((x1 * ((t_1 + (x1 * ((x1 * 3.0) + (3.0 * (3.0 - (x2 * -2.0)))))) - 2.0)) + (x2 * -6.0)) return tmp
function code(x1, x2) t_0 = Float64(Float64(2.0 * x2) - 3.0) t_1 = Float64(4.0 * Float64(x2 * t_0)) t_2 = Float64(x1 * Float64(x1 * 3.0)) t_3 = Float64(Float64(x1 * x1) + 1.0) t_4 = Float64(3.0 * Float64(Float64(Float64(t_2 - Float64(2.0 * x2)) - x1) / t_3)) t_5 = Float64(Float64(Float64(t_2 + Float64(2.0 * x2)) - x1) / t_3) t_6 = Float64(Float64(x1 * x1) * Float64(Float64(t_5 * 4.0) - 6.0)) t_7 = Float64(x1 * Float64(x1 * x1)) t_8 = Float64(Float64(2.0 * x2) - x1) t_9 = Float64(Float64(x1 * 2.0) * t_8) t_10 = Float64(t_2 * t_8) tmp = 0.0 if (x1 <= -4.5e+153) tmp = Float64(x1 + Float64(x1 + Float64(3.0 * Float64(x1 * Float64(Float64(x1 * 3.0) + -1.0))))); elseif (x1 <= -1.55) tmp = Float64(x1 + Float64(t_4 + Float64(x1 + Float64(x1 * Float64(t_1 + Float64(x1 * Float64(Float64(Float64(x2 * 6.0) + Float64(Float64(x2 * 8.0) + Float64(x1 * Float64(Float64(t_1 + Float64(x1 * Float64(Float64(Float64(x2 * 8.0) + Float64(4.0 * Float64(3.0 - Float64(2.0 * x2)))) - 6.0))) - 6.0)))) - 6.0))))))); elseif (x1 <= 4.3e-5) tmp = Float64(x1 + Float64(t_4 + Float64(x1 + Float64(t_7 + Float64(t_10 + Float64(t_3 * Float64(t_6 + Float64(t_9 * t_0)))))))); elseif (x1 <= 4.5e+92) tmp = Float64(x1 + Float64(9.0 + Float64(x1 + Float64(t_7 + Float64(t_10 + Float64(t_3 * Float64(t_6 + Float64(Float64(t_5 - 3.0) * t_9)))))))); else tmp = Float64(x1 + Float64(Float64(x1 * Float64(Float64(t_1 + Float64(x1 * Float64(Float64(x1 * 3.0) + Float64(3.0 * Float64(3.0 - Float64(x2 * -2.0)))))) - 2.0)) + Float64(x2 * -6.0))); end return tmp end
function tmp_2 = code(x1, x2) t_0 = (2.0 * x2) - 3.0; t_1 = 4.0 * (x2 * t_0); t_2 = x1 * (x1 * 3.0); t_3 = (x1 * x1) + 1.0; t_4 = 3.0 * (((t_2 - (2.0 * x2)) - x1) / t_3); t_5 = ((t_2 + (2.0 * x2)) - x1) / t_3; t_6 = (x1 * x1) * ((t_5 * 4.0) - 6.0); t_7 = x1 * (x1 * x1); t_8 = (2.0 * x2) - x1; t_9 = (x1 * 2.0) * t_8; t_10 = t_2 * t_8; tmp = 0.0; if (x1 <= -4.5e+153) tmp = x1 + (x1 + (3.0 * (x1 * ((x1 * 3.0) + -1.0)))); elseif (x1 <= -1.55) tmp = x1 + (t_4 + (x1 + (x1 * (t_1 + (x1 * (((x2 * 6.0) + ((x2 * 8.0) + (x1 * ((t_1 + (x1 * (((x2 * 8.0) + (4.0 * (3.0 - (2.0 * x2)))) - 6.0))) - 6.0)))) - 6.0)))))); elseif (x1 <= 4.3e-5) tmp = x1 + (t_4 + (x1 + (t_7 + (t_10 + (t_3 * (t_6 + (t_9 * t_0))))))); elseif (x1 <= 4.5e+92) tmp = x1 + (9.0 + (x1 + (t_7 + (t_10 + (t_3 * (t_6 + ((t_5 - 3.0) * t_9))))))); else tmp = x1 + ((x1 * ((t_1 + (x1 * ((x1 * 3.0) + (3.0 * (3.0 - (x2 * -2.0)))))) - 2.0)) + (x2 * -6.0)); end tmp_2 = tmp; end
code[x1_, x2_] := Block[{t$95$0 = N[(N[(2.0 * x2), $MachinePrecision] - 3.0), $MachinePrecision]}, Block[{t$95$1 = N[(4.0 * N[(x2 * t$95$0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x1 * N[(x1 * 3.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[(x1 * x1), $MachinePrecision] + 1.0), $MachinePrecision]}, Block[{t$95$4 = N[(3.0 * N[(N[(N[(t$95$2 - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$3), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$5 = N[(N[(N[(t$95$2 + N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$3), $MachinePrecision]}, Block[{t$95$6 = N[(N[(x1 * x1), $MachinePrecision] * N[(N[(t$95$5 * 4.0), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$7 = N[(x1 * N[(x1 * x1), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$8 = N[(N[(2.0 * x2), $MachinePrecision] - x1), $MachinePrecision]}, Block[{t$95$9 = N[(N[(x1 * 2.0), $MachinePrecision] * t$95$8), $MachinePrecision]}, Block[{t$95$10 = N[(t$95$2 * t$95$8), $MachinePrecision]}, If[LessEqual[x1, -4.5e+153], N[(x1 + N[(x1 + N[(3.0 * N[(x1 * N[(N[(x1 * 3.0), $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, -1.55], N[(x1 + N[(t$95$4 + N[(x1 + N[(x1 * N[(t$95$1 + N[(x1 * N[(N[(N[(x2 * 6.0), $MachinePrecision] + N[(N[(x2 * 8.0), $MachinePrecision] + N[(x1 * N[(N[(t$95$1 + N[(x1 * N[(N[(N[(x2 * 8.0), $MachinePrecision] + N[(4.0 * N[(3.0 - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 4.3e-5], N[(x1 + N[(t$95$4 + N[(x1 + N[(t$95$7 + N[(t$95$10 + N[(t$95$3 * N[(t$95$6 + N[(t$95$9 * t$95$0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 4.5e+92], N[(x1 + N[(9.0 + N[(x1 + N[(t$95$7 + N[(t$95$10 + N[(t$95$3 * N[(t$95$6 + N[(N[(t$95$5 - 3.0), $MachinePrecision] * t$95$9), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x1 + N[(N[(x1 * N[(N[(t$95$1 + N[(x1 * N[(N[(x1 * 3.0), $MachinePrecision] + N[(3.0 * N[(3.0 - N[(x2 * -2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - 2.0), $MachinePrecision]), $MachinePrecision] + N[(x2 * -6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := 2 \cdot x2 - 3\\
t_1 := 4 \cdot \left(x2 \cdot t\_0\right)\\
t_2 := x1 \cdot \left(x1 \cdot 3\right)\\
t_3 := x1 \cdot x1 + 1\\
t_4 := 3 \cdot \frac{\left(t\_2 - 2 \cdot x2\right) - x1}{t\_3}\\
t_5 := \frac{\left(t\_2 + 2 \cdot x2\right) - x1}{t\_3}\\
t_6 := \left(x1 \cdot x1\right) \cdot \left(t\_5 \cdot 4 - 6\right)\\
t_7 := x1 \cdot \left(x1 \cdot x1\right)\\
t_8 := 2 \cdot x2 - x1\\
t_9 := \left(x1 \cdot 2\right) \cdot t\_8\\
t_10 := t\_2 \cdot t\_8\\
\mathbf{if}\;x1 \leq -4.5 \cdot 10^{+153}:\\
\;\;\;\;x1 + \left(x1 + 3 \cdot \left(x1 \cdot \left(x1 \cdot 3 + -1\right)\right)\right)\\
\mathbf{elif}\;x1 \leq -1.55:\\
\;\;\;\;x1 + \left(t\_4 + \left(x1 + x1 \cdot \left(t\_1 + x1 \cdot \left(\left(x2 \cdot 6 + \left(x2 \cdot 8 + x1 \cdot \left(\left(t\_1 + x1 \cdot \left(\left(x2 \cdot 8 + 4 \cdot \left(3 - 2 \cdot x2\right)\right) - 6\right)\right) - 6\right)\right)\right) - 6\right)\right)\right)\right)\\
\mathbf{elif}\;x1 \leq 4.3 \cdot 10^{-5}:\\
\;\;\;\;x1 + \left(t\_4 + \left(x1 + \left(t\_7 + \left(t\_10 + t\_3 \cdot \left(t\_6 + t\_9 \cdot t\_0\right)\right)\right)\right)\right)\\
\mathbf{elif}\;x1 \leq 4.5 \cdot 10^{+92}:\\
\;\;\;\;x1 + \left(9 + \left(x1 + \left(t\_7 + \left(t\_10 + t\_3 \cdot \left(t\_6 + \left(t\_5 - 3\right) \cdot t\_9\right)\right)\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x1 + \left(x1 \cdot \left(\left(t\_1 + x1 \cdot \left(x1 \cdot 3 + 3 \cdot \left(3 - x2 \cdot -2\right)\right)\right) - 2\right) + x2 \cdot -6\right)\\
\end{array}
\end{array}
if x1 < -4.5000000000000001e153Initial program 0.0%
Taylor expanded in x1 around 0 0.0%
Taylor expanded in x1 around 0 58.6%
Taylor expanded in x2 around 0 100.0%
if -4.5000000000000001e153 < x1 < -1.55000000000000004Initial program 79.4%
Taylor expanded in x1 around 0 65.6%
+-commutative65.6%
mul-1-neg65.6%
sub-neg65.6%
Simplified65.6%
Taylor expanded in x1 around 0 46.8%
+-commutative65.6%
mul-1-neg65.6%
sub-neg65.6%
Simplified46.8%
Taylor expanded in x1 around 0 34.6%
Taylor expanded in x1 around 0 54.7%
if -1.55000000000000004 < x1 < 4.3000000000000002e-5Initial program 99.5%
Taylor expanded in x1 around 0 99.2%
+-commutative99.2%
mul-1-neg99.2%
sub-neg99.2%
Simplified99.2%
Taylor expanded in x1 around 0 99.0%
+-commutative99.2%
mul-1-neg99.2%
sub-neg99.2%
Simplified99.0%
Taylor expanded in x1 around 0 99.0%
if 4.3000000000000002e-5 < x1 < 4.4999999999999999e92Initial program 99.1%
Taylor expanded in x1 around 0 93.0%
+-commutative93.0%
mul-1-neg93.0%
sub-neg93.0%
Simplified93.0%
Taylor expanded in x1 around 0 82.8%
+-commutative93.0%
mul-1-neg93.0%
sub-neg93.0%
Simplified82.8%
Taylor expanded in x1 around inf 82.8%
if 4.4999999999999999e92 < x1 Initial program 32.0%
Taylor expanded in x1 around 0 11.0%
Taylor expanded in x1 around 0 90.4%
Final simplification91.5%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (+ (* x1 x1) 1.0))
(t_1 (* x1 (* x1 3.0)))
(t_2 (/ (- (+ t_1 (* 2.0 x2)) x1) t_0)))
(if (or (<= x1 -2.7e+114) (not (<= x1 2.35e+144)))
(+ x1 (+ x1 (* 3.0 (* x1 (+ (* x1 3.0) -1.0)))))
(+
x1
(+
(* 3.0 (/ (- (- t_1 (* 2.0 x2)) x1) t_0))
(+
x1
(+
(* x1 (* x1 x1))
(+
(* t_0 (+ (* (* (* x1 2.0) t_2) (- t_2 3.0)) (* (* x1 x1) 6.0)))
(* t_1 (* 2.0 x2))))))))))
double code(double x1, double x2) {
double t_0 = (x1 * x1) + 1.0;
double t_1 = x1 * (x1 * 3.0);
double t_2 = ((t_1 + (2.0 * x2)) - x1) / t_0;
double tmp;
if ((x1 <= -2.7e+114) || !(x1 <= 2.35e+144)) {
tmp = x1 + (x1 + (3.0 * (x1 * ((x1 * 3.0) + -1.0))));
} else {
tmp = x1 + ((3.0 * (((t_1 - (2.0 * x2)) - x1) / t_0)) + (x1 + ((x1 * (x1 * x1)) + ((t_0 * ((((x1 * 2.0) * t_2) * (t_2 - 3.0)) + ((x1 * x1) * 6.0))) + (t_1 * (2.0 * x2))))));
}
return tmp;
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
real(8) :: t_0
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_0 = (x1 * x1) + 1.0d0
t_1 = x1 * (x1 * 3.0d0)
t_2 = ((t_1 + (2.0d0 * x2)) - x1) / t_0
if ((x1 <= (-2.7d+114)) .or. (.not. (x1 <= 2.35d+144))) then
tmp = x1 + (x1 + (3.0d0 * (x1 * ((x1 * 3.0d0) + (-1.0d0)))))
else
tmp = x1 + ((3.0d0 * (((t_1 - (2.0d0 * x2)) - x1) / t_0)) + (x1 + ((x1 * (x1 * x1)) + ((t_0 * ((((x1 * 2.0d0) * t_2) * (t_2 - 3.0d0)) + ((x1 * x1) * 6.0d0))) + (t_1 * (2.0d0 * x2))))))
end if
code = tmp
end function
public static double code(double x1, double x2) {
double t_0 = (x1 * x1) + 1.0;
double t_1 = x1 * (x1 * 3.0);
double t_2 = ((t_1 + (2.0 * x2)) - x1) / t_0;
double tmp;
if ((x1 <= -2.7e+114) || !(x1 <= 2.35e+144)) {
tmp = x1 + (x1 + (3.0 * (x1 * ((x1 * 3.0) + -1.0))));
} else {
tmp = x1 + ((3.0 * (((t_1 - (2.0 * x2)) - x1) / t_0)) + (x1 + ((x1 * (x1 * x1)) + ((t_0 * ((((x1 * 2.0) * t_2) * (t_2 - 3.0)) + ((x1 * x1) * 6.0))) + (t_1 * (2.0 * x2))))));
}
return tmp;
}
def code(x1, x2): t_0 = (x1 * x1) + 1.0 t_1 = x1 * (x1 * 3.0) t_2 = ((t_1 + (2.0 * x2)) - x1) / t_0 tmp = 0 if (x1 <= -2.7e+114) or not (x1 <= 2.35e+144): tmp = x1 + (x1 + (3.0 * (x1 * ((x1 * 3.0) + -1.0)))) else: tmp = x1 + ((3.0 * (((t_1 - (2.0 * x2)) - x1) / t_0)) + (x1 + ((x1 * (x1 * x1)) + ((t_0 * ((((x1 * 2.0) * t_2) * (t_2 - 3.0)) + ((x1 * x1) * 6.0))) + (t_1 * (2.0 * x2)))))) return tmp
function code(x1, x2) t_0 = Float64(Float64(x1 * x1) + 1.0) t_1 = Float64(x1 * Float64(x1 * 3.0)) t_2 = Float64(Float64(Float64(t_1 + Float64(2.0 * x2)) - x1) / t_0) tmp = 0.0 if ((x1 <= -2.7e+114) || !(x1 <= 2.35e+144)) tmp = Float64(x1 + Float64(x1 + Float64(3.0 * Float64(x1 * Float64(Float64(x1 * 3.0) + -1.0))))); else tmp = Float64(x1 + Float64(Float64(3.0 * Float64(Float64(Float64(t_1 - Float64(2.0 * x2)) - x1) / t_0)) + Float64(x1 + Float64(Float64(x1 * Float64(x1 * x1)) + Float64(Float64(t_0 * Float64(Float64(Float64(Float64(x1 * 2.0) * t_2) * Float64(t_2 - 3.0)) + Float64(Float64(x1 * x1) * 6.0))) + Float64(t_1 * Float64(2.0 * x2))))))); end return tmp end
function tmp_2 = code(x1, x2) t_0 = (x1 * x1) + 1.0; t_1 = x1 * (x1 * 3.0); t_2 = ((t_1 + (2.0 * x2)) - x1) / t_0; tmp = 0.0; if ((x1 <= -2.7e+114) || ~((x1 <= 2.35e+144))) tmp = x1 + (x1 + (3.0 * (x1 * ((x1 * 3.0) + -1.0)))); else tmp = x1 + ((3.0 * (((t_1 - (2.0 * x2)) - x1) / t_0)) + (x1 + ((x1 * (x1 * x1)) + ((t_0 * ((((x1 * 2.0) * t_2) * (t_2 - 3.0)) + ((x1 * x1) * 6.0))) + (t_1 * (2.0 * x2)))))); end tmp_2 = tmp; end
code[x1_, x2_] := Block[{t$95$0 = N[(N[(x1 * x1), $MachinePrecision] + 1.0), $MachinePrecision]}, Block[{t$95$1 = N[(x1 * N[(x1 * 3.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[(t$95$1 + N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$0), $MachinePrecision]}, If[Or[LessEqual[x1, -2.7e+114], N[Not[LessEqual[x1, 2.35e+144]], $MachinePrecision]], N[(x1 + N[(x1 + N[(3.0 * N[(x1 * N[(N[(x1 * 3.0), $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x1 + N[(N[(3.0 * N[(N[(N[(t$95$1 - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$0), $MachinePrecision]), $MachinePrecision] + N[(x1 + N[(N[(x1 * N[(x1 * x1), $MachinePrecision]), $MachinePrecision] + N[(N[(t$95$0 * N[(N[(N[(N[(x1 * 2.0), $MachinePrecision] * t$95$2), $MachinePrecision] * N[(t$95$2 - 3.0), $MachinePrecision]), $MachinePrecision] + N[(N[(x1 * x1), $MachinePrecision] * 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(t$95$1 * N[(2.0 * x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x1 \cdot x1 + 1\\
t_1 := x1 \cdot \left(x1 \cdot 3\right)\\
t_2 := \frac{\left(t\_1 + 2 \cdot x2\right) - x1}{t\_0}\\
\mathbf{if}\;x1 \leq -2.7 \cdot 10^{+114} \lor \neg \left(x1 \leq 2.35 \cdot 10^{+144}\right):\\
\;\;\;\;x1 + \left(x1 + 3 \cdot \left(x1 \cdot \left(x1 \cdot 3 + -1\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x1 + \left(3 \cdot \frac{\left(t\_1 - 2 \cdot x2\right) - x1}{t\_0} + \left(x1 + \left(x1 \cdot \left(x1 \cdot x1\right) + \left(t\_0 \cdot \left(\left(\left(x1 \cdot 2\right) \cdot t\_2\right) \cdot \left(t\_2 - 3\right) + \left(x1 \cdot x1\right) \cdot 6\right) + t\_1 \cdot \left(2 \cdot x2\right)\right)\right)\right)\right)\\
\end{array}
\end{array}
if x1 < -2.7e114 or 2.3500000000000001e144 < x1 Initial program 0.0%
Taylor expanded in x1 around 0 0.0%
Taylor expanded in x1 around 0 59.1%
Taylor expanded in x2 around 0 91.7%
if -2.7e114 < x1 < 2.3500000000000001e144Initial program 99.4%
fma-define99.4%
*-un-lft-identity99.4%
associate--l+99.4%
associate-*r*99.5%
fma-define99.5%
pow299.5%
Applied egg-rr99.5%
*-lft-identity99.5%
Simplified99.5%
Taylor expanded in x1 around inf 97.3%
Taylor expanded in x1 around 0 94.7%
Final simplification93.9%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (+ x1 (+ x1 (* 3.0 (* x1 (+ (* x1 3.0) -1.0))))))
(t_1 (* 4.0 (* x2 (- (* 2.0 x2) 3.0))))
(t_2
(+
x1
(+
(*
3.0
(/ (- (- (* x1 (* x1 3.0)) (* 2.0 x2)) x1) (+ (* x1 x1) 1.0)))
(+
x1
(*
x1
(+
t_1
(*
x1
(-
(+
(* x2 6.0)
(+
(* x2 8.0)
(*
x1
(-
(+
t_1
(* x1 (- (+ (* x2 8.0) (* 4.0 (- 3.0 (* 2.0 x2)))) 6.0)))
6.0))))
6.0)))))))))
(if (<= x1 -4.5e+153)
t_0
(if (<= x1 -1.1)
t_2
(if (<= x1 17000000.0)
(+
x1
(+
(+ x1 (* 4.0 (* x2 (+ (* x1 -3.0) (* 2.0 (* x1 x2))))))
(* 3.0 (+ (* x2 -2.0) (* x1 (+ (* x1 (- 3.0 (* x2 -2.0))) -1.0))))))
(if (<= x1 2.35e+144) t_2 t_0))))))
double code(double x1, double x2) {
double t_0 = x1 + (x1 + (3.0 * (x1 * ((x1 * 3.0) + -1.0))));
double t_1 = 4.0 * (x2 * ((2.0 * x2) - 3.0));
double t_2 = x1 + ((3.0 * ((((x1 * (x1 * 3.0)) - (2.0 * x2)) - x1) / ((x1 * x1) + 1.0))) + (x1 + (x1 * (t_1 + (x1 * (((x2 * 6.0) + ((x2 * 8.0) + (x1 * ((t_1 + (x1 * (((x2 * 8.0) + (4.0 * (3.0 - (2.0 * x2)))) - 6.0))) - 6.0)))) - 6.0))))));
double tmp;
if (x1 <= -4.5e+153) {
tmp = t_0;
} else if (x1 <= -1.1) {
tmp = t_2;
} else if (x1 <= 17000000.0) {
tmp = x1 + ((x1 + (4.0 * (x2 * ((x1 * -3.0) + (2.0 * (x1 * x2)))))) + (3.0 * ((x2 * -2.0) + (x1 * ((x1 * (3.0 - (x2 * -2.0))) + -1.0)))));
} else if (x1 <= 2.35e+144) {
tmp = t_2;
} else {
tmp = t_0;
}
return tmp;
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
real(8) :: t_0
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_0 = x1 + (x1 + (3.0d0 * (x1 * ((x1 * 3.0d0) + (-1.0d0)))))
t_1 = 4.0d0 * (x2 * ((2.0d0 * x2) - 3.0d0))
t_2 = x1 + ((3.0d0 * ((((x1 * (x1 * 3.0d0)) - (2.0d0 * x2)) - x1) / ((x1 * x1) + 1.0d0))) + (x1 + (x1 * (t_1 + (x1 * (((x2 * 6.0d0) + ((x2 * 8.0d0) + (x1 * ((t_1 + (x1 * (((x2 * 8.0d0) + (4.0d0 * (3.0d0 - (2.0d0 * x2)))) - 6.0d0))) - 6.0d0)))) - 6.0d0))))))
if (x1 <= (-4.5d+153)) then
tmp = t_0
else if (x1 <= (-1.1d0)) then
tmp = t_2
else if (x1 <= 17000000.0d0) then
tmp = x1 + ((x1 + (4.0d0 * (x2 * ((x1 * (-3.0d0)) + (2.0d0 * (x1 * x2)))))) + (3.0d0 * ((x2 * (-2.0d0)) + (x1 * ((x1 * (3.0d0 - (x2 * (-2.0d0)))) + (-1.0d0))))))
else if (x1 <= 2.35d+144) then
tmp = t_2
else
tmp = t_0
end if
code = tmp
end function
public static double code(double x1, double x2) {
double t_0 = x1 + (x1 + (3.0 * (x1 * ((x1 * 3.0) + -1.0))));
double t_1 = 4.0 * (x2 * ((2.0 * x2) - 3.0));
double t_2 = x1 + ((3.0 * ((((x1 * (x1 * 3.0)) - (2.0 * x2)) - x1) / ((x1 * x1) + 1.0))) + (x1 + (x1 * (t_1 + (x1 * (((x2 * 6.0) + ((x2 * 8.0) + (x1 * ((t_1 + (x1 * (((x2 * 8.0) + (4.0 * (3.0 - (2.0 * x2)))) - 6.0))) - 6.0)))) - 6.0))))));
double tmp;
if (x1 <= -4.5e+153) {
tmp = t_0;
} else if (x1 <= -1.1) {
tmp = t_2;
} else if (x1 <= 17000000.0) {
tmp = x1 + ((x1 + (4.0 * (x2 * ((x1 * -3.0) + (2.0 * (x1 * x2)))))) + (3.0 * ((x2 * -2.0) + (x1 * ((x1 * (3.0 - (x2 * -2.0))) + -1.0)))));
} else if (x1 <= 2.35e+144) {
tmp = t_2;
} else {
tmp = t_0;
}
return tmp;
}
def code(x1, x2): t_0 = x1 + (x1 + (3.0 * (x1 * ((x1 * 3.0) + -1.0)))) t_1 = 4.0 * (x2 * ((2.0 * x2) - 3.0)) t_2 = x1 + ((3.0 * ((((x1 * (x1 * 3.0)) - (2.0 * x2)) - x1) / ((x1 * x1) + 1.0))) + (x1 + (x1 * (t_1 + (x1 * (((x2 * 6.0) + ((x2 * 8.0) + (x1 * ((t_1 + (x1 * (((x2 * 8.0) + (4.0 * (3.0 - (2.0 * x2)))) - 6.0))) - 6.0)))) - 6.0)))))) tmp = 0 if x1 <= -4.5e+153: tmp = t_0 elif x1 <= -1.1: tmp = t_2 elif x1 <= 17000000.0: tmp = x1 + ((x1 + (4.0 * (x2 * ((x1 * -3.0) + (2.0 * (x1 * x2)))))) + (3.0 * ((x2 * -2.0) + (x1 * ((x1 * (3.0 - (x2 * -2.0))) + -1.0))))) elif x1 <= 2.35e+144: tmp = t_2 else: tmp = t_0 return tmp
function code(x1, x2) t_0 = Float64(x1 + Float64(x1 + Float64(3.0 * Float64(x1 * Float64(Float64(x1 * 3.0) + -1.0))))) t_1 = Float64(4.0 * Float64(x2 * Float64(Float64(2.0 * x2) - 3.0))) t_2 = Float64(x1 + Float64(Float64(3.0 * Float64(Float64(Float64(Float64(x1 * Float64(x1 * 3.0)) - Float64(2.0 * x2)) - x1) / Float64(Float64(x1 * x1) + 1.0))) + Float64(x1 + Float64(x1 * Float64(t_1 + Float64(x1 * Float64(Float64(Float64(x2 * 6.0) + Float64(Float64(x2 * 8.0) + Float64(x1 * Float64(Float64(t_1 + Float64(x1 * Float64(Float64(Float64(x2 * 8.0) + Float64(4.0 * Float64(3.0 - Float64(2.0 * x2)))) - 6.0))) - 6.0)))) - 6.0))))))) tmp = 0.0 if (x1 <= -4.5e+153) tmp = t_0; elseif (x1 <= -1.1) tmp = t_2; elseif (x1 <= 17000000.0) tmp = Float64(x1 + Float64(Float64(x1 + Float64(4.0 * Float64(x2 * Float64(Float64(x1 * -3.0) + Float64(2.0 * Float64(x1 * x2)))))) + Float64(3.0 * Float64(Float64(x2 * -2.0) + Float64(x1 * Float64(Float64(x1 * Float64(3.0 - Float64(x2 * -2.0))) + -1.0)))))); elseif (x1 <= 2.35e+144) tmp = t_2; else tmp = t_0; end return tmp end
function tmp_2 = code(x1, x2) t_0 = x1 + (x1 + (3.0 * (x1 * ((x1 * 3.0) + -1.0)))); t_1 = 4.0 * (x2 * ((2.0 * x2) - 3.0)); t_2 = x1 + ((3.0 * ((((x1 * (x1 * 3.0)) - (2.0 * x2)) - x1) / ((x1 * x1) + 1.0))) + (x1 + (x1 * (t_1 + (x1 * (((x2 * 6.0) + ((x2 * 8.0) + (x1 * ((t_1 + (x1 * (((x2 * 8.0) + (4.0 * (3.0 - (2.0 * x2)))) - 6.0))) - 6.0)))) - 6.0)))))); tmp = 0.0; if (x1 <= -4.5e+153) tmp = t_0; elseif (x1 <= -1.1) tmp = t_2; elseif (x1 <= 17000000.0) tmp = x1 + ((x1 + (4.0 * (x2 * ((x1 * -3.0) + (2.0 * (x1 * x2)))))) + (3.0 * ((x2 * -2.0) + (x1 * ((x1 * (3.0 - (x2 * -2.0))) + -1.0))))); elseif (x1 <= 2.35e+144) tmp = t_2; else tmp = t_0; end tmp_2 = tmp; end
code[x1_, x2_] := Block[{t$95$0 = N[(x1 + N[(x1 + N[(3.0 * N[(x1 * N[(N[(x1 * 3.0), $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(4.0 * N[(x2 * N[(N[(2.0 * x2), $MachinePrecision] - 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x1 + N[(N[(3.0 * N[(N[(N[(N[(x1 * N[(x1 * 3.0), $MachinePrecision]), $MachinePrecision] - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / N[(N[(x1 * x1), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(x1 + N[(x1 * N[(t$95$1 + N[(x1 * N[(N[(N[(x2 * 6.0), $MachinePrecision] + N[(N[(x2 * 8.0), $MachinePrecision] + N[(x1 * N[(N[(t$95$1 + N[(x1 * N[(N[(N[(x2 * 8.0), $MachinePrecision] + N[(4.0 * N[(3.0 - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x1, -4.5e+153], t$95$0, If[LessEqual[x1, -1.1], t$95$2, If[LessEqual[x1, 17000000.0], N[(x1 + N[(N[(x1 + N[(4.0 * N[(x2 * N[(N[(x1 * -3.0), $MachinePrecision] + N[(2.0 * N[(x1 * x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(3.0 * N[(N[(x2 * -2.0), $MachinePrecision] + N[(x1 * N[(N[(x1 * N[(3.0 - N[(x2 * -2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 2.35e+144], t$95$2, t$95$0]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x1 + \left(x1 + 3 \cdot \left(x1 \cdot \left(x1 \cdot 3 + -1\right)\right)\right)\\
t_1 := 4 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right)\\
t_2 := x1 + \left(3 \cdot \frac{\left(x1 \cdot \left(x1 \cdot 3\right) - 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1} + \left(x1 + x1 \cdot \left(t\_1 + x1 \cdot \left(\left(x2 \cdot 6 + \left(x2 \cdot 8 + x1 \cdot \left(\left(t\_1 + x1 \cdot \left(\left(x2 \cdot 8 + 4 \cdot \left(3 - 2 \cdot x2\right)\right) - 6\right)\right) - 6\right)\right)\right) - 6\right)\right)\right)\right)\\
\mathbf{if}\;x1 \leq -4.5 \cdot 10^{+153}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;x1 \leq -1.1:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;x1 \leq 17000000:\\
\;\;\;\;x1 + \left(\left(x1 + 4 \cdot \left(x2 \cdot \left(x1 \cdot -3 + 2 \cdot \left(x1 \cdot x2\right)\right)\right)\right) + 3 \cdot \left(x2 \cdot -2 + x1 \cdot \left(x1 \cdot \left(3 - x2 \cdot -2\right) + -1\right)\right)\right)\\
\mathbf{elif}\;x1 \leq 2.35 \cdot 10^{+144}:\\
\;\;\;\;t\_2\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
if x1 < -4.5000000000000001e153 or 2.3500000000000001e144 < x1 Initial program 0.0%
Taylor expanded in x1 around 0 0.0%
Taylor expanded in x1 around 0 63.5%
Taylor expanded in x2 around 0 98.4%
if -4.5000000000000001e153 < x1 < -1.1000000000000001 or 1.7e7 < x1 < 2.3500000000000001e144Initial program 91.4%
Taylor expanded in x1 around 0 63.0%
+-commutative63.0%
mul-1-neg63.0%
sub-neg63.0%
Simplified63.0%
Taylor expanded in x1 around 0 52.3%
+-commutative63.0%
mul-1-neg63.0%
sub-neg63.0%
Simplified52.3%
Taylor expanded in x1 around 0 46.1%
Taylor expanded in x1 around 0 71.6%
if -1.1000000000000001 < x1 < 1.7e7Initial program 99.4%
Taylor expanded in x1 around 0 88.1%
Taylor expanded in x1 around 0 88.1%
Taylor expanded in x2 around 0 97.4%
Final simplification91.4%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (* x1 (* x1 3.0)))
(t_1 (+ (* x1 x1) 1.0))
(t_2 (* 3.0 (/ (- (- t_0 (* 2.0 x2)) x1) t_1)))
(t_3
(+
x1
(+
t_2
(+
x1
(+
(* x1 (* x1 x1))
(+
(* t_0 (- (* 2.0 x2) x1))
(*
t_1
(+
(* (* x1 x1) (- (* (/ (- (+ t_0 (* 2.0 x2)) x1) t_1) 4.0) 6.0))
-6.0)))))))))
(if (<= x1 -1e+108)
(+ x1 (+ x1 (* 3.0 (* x1 (+ (* x1 3.0) -1.0)))))
(if (<= x1 -5.1e+32)
t_3
(if (<= x1 18000000000.0)
(+ x1 (+ t_2 (+ x1 (* 4.0 (* x2 (+ (* x1 -3.0) (* 2.0 (* x1 x2))))))))
(if (<= x1 4.5e+92)
t_3
(+
x1
(+
(*
x1
(-
(+
(* 4.0 (* x2 (- (* 2.0 x2) 3.0)))
(* x1 (+ (* x1 3.0) (* 3.0 (- 3.0 (* x2 -2.0))))))
2.0))
(* x2 -6.0)))))))))
double code(double x1, double x2) {
double t_0 = x1 * (x1 * 3.0);
double t_1 = (x1 * x1) + 1.0;
double t_2 = 3.0 * (((t_0 - (2.0 * x2)) - x1) / t_1);
double t_3 = x1 + (t_2 + (x1 + ((x1 * (x1 * x1)) + ((t_0 * ((2.0 * x2) - x1)) + (t_1 * (((x1 * x1) * (((((t_0 + (2.0 * x2)) - x1) / t_1) * 4.0) - 6.0)) + -6.0))))));
double tmp;
if (x1 <= -1e+108) {
tmp = x1 + (x1 + (3.0 * (x1 * ((x1 * 3.0) + -1.0))));
} else if (x1 <= -5.1e+32) {
tmp = t_3;
} else if (x1 <= 18000000000.0) {
tmp = x1 + (t_2 + (x1 + (4.0 * (x2 * ((x1 * -3.0) + (2.0 * (x1 * x2)))))));
} else if (x1 <= 4.5e+92) {
tmp = t_3;
} else {
tmp = x1 + ((x1 * (((4.0 * (x2 * ((2.0 * x2) - 3.0))) + (x1 * ((x1 * 3.0) + (3.0 * (3.0 - (x2 * -2.0)))))) - 2.0)) + (x2 * -6.0));
}
return tmp;
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
real(8) :: t_0
real(8) :: t_1
real(8) :: t_2
real(8) :: t_3
real(8) :: tmp
t_0 = x1 * (x1 * 3.0d0)
t_1 = (x1 * x1) + 1.0d0
t_2 = 3.0d0 * (((t_0 - (2.0d0 * x2)) - x1) / t_1)
t_3 = x1 + (t_2 + (x1 + ((x1 * (x1 * x1)) + ((t_0 * ((2.0d0 * x2) - x1)) + (t_1 * (((x1 * x1) * (((((t_0 + (2.0d0 * x2)) - x1) / t_1) * 4.0d0) - 6.0d0)) + (-6.0d0)))))))
if (x1 <= (-1d+108)) then
tmp = x1 + (x1 + (3.0d0 * (x1 * ((x1 * 3.0d0) + (-1.0d0)))))
else if (x1 <= (-5.1d+32)) then
tmp = t_3
else if (x1 <= 18000000000.0d0) then
tmp = x1 + (t_2 + (x1 + (4.0d0 * (x2 * ((x1 * (-3.0d0)) + (2.0d0 * (x1 * x2)))))))
else if (x1 <= 4.5d+92) then
tmp = t_3
else
tmp = x1 + ((x1 * (((4.0d0 * (x2 * ((2.0d0 * x2) - 3.0d0))) + (x1 * ((x1 * 3.0d0) + (3.0d0 * (3.0d0 - (x2 * (-2.0d0))))))) - 2.0d0)) + (x2 * (-6.0d0)))
end if
code = tmp
end function
public static double code(double x1, double x2) {
double t_0 = x1 * (x1 * 3.0);
double t_1 = (x1 * x1) + 1.0;
double t_2 = 3.0 * (((t_0 - (2.0 * x2)) - x1) / t_1);
double t_3 = x1 + (t_2 + (x1 + ((x1 * (x1 * x1)) + ((t_0 * ((2.0 * x2) - x1)) + (t_1 * (((x1 * x1) * (((((t_0 + (2.0 * x2)) - x1) / t_1) * 4.0) - 6.0)) + -6.0))))));
double tmp;
if (x1 <= -1e+108) {
tmp = x1 + (x1 + (3.0 * (x1 * ((x1 * 3.0) + -1.0))));
} else if (x1 <= -5.1e+32) {
tmp = t_3;
} else if (x1 <= 18000000000.0) {
tmp = x1 + (t_2 + (x1 + (4.0 * (x2 * ((x1 * -3.0) + (2.0 * (x1 * x2)))))));
} else if (x1 <= 4.5e+92) {
tmp = t_3;
} else {
tmp = x1 + ((x1 * (((4.0 * (x2 * ((2.0 * x2) - 3.0))) + (x1 * ((x1 * 3.0) + (3.0 * (3.0 - (x2 * -2.0)))))) - 2.0)) + (x2 * -6.0));
}
return tmp;
}
def code(x1, x2): t_0 = x1 * (x1 * 3.0) t_1 = (x1 * x1) + 1.0 t_2 = 3.0 * (((t_0 - (2.0 * x2)) - x1) / t_1) t_3 = x1 + (t_2 + (x1 + ((x1 * (x1 * x1)) + ((t_0 * ((2.0 * x2) - x1)) + (t_1 * (((x1 * x1) * (((((t_0 + (2.0 * x2)) - x1) / t_1) * 4.0) - 6.0)) + -6.0)))))) tmp = 0 if x1 <= -1e+108: tmp = x1 + (x1 + (3.0 * (x1 * ((x1 * 3.0) + -1.0)))) elif x1 <= -5.1e+32: tmp = t_3 elif x1 <= 18000000000.0: tmp = x1 + (t_2 + (x1 + (4.0 * (x2 * ((x1 * -3.0) + (2.0 * (x1 * x2))))))) elif x1 <= 4.5e+92: tmp = t_3 else: tmp = x1 + ((x1 * (((4.0 * (x2 * ((2.0 * x2) - 3.0))) + (x1 * ((x1 * 3.0) + (3.0 * (3.0 - (x2 * -2.0)))))) - 2.0)) + (x2 * -6.0)) return tmp
function code(x1, x2) t_0 = Float64(x1 * Float64(x1 * 3.0)) t_1 = Float64(Float64(x1 * x1) + 1.0) t_2 = Float64(3.0 * Float64(Float64(Float64(t_0 - Float64(2.0 * x2)) - x1) / t_1)) t_3 = Float64(x1 + Float64(t_2 + Float64(x1 + Float64(Float64(x1 * Float64(x1 * x1)) + Float64(Float64(t_0 * Float64(Float64(2.0 * x2) - x1)) + Float64(t_1 * Float64(Float64(Float64(x1 * x1) * Float64(Float64(Float64(Float64(Float64(t_0 + Float64(2.0 * x2)) - x1) / t_1) * 4.0) - 6.0)) + -6.0))))))) tmp = 0.0 if (x1 <= -1e+108) tmp = Float64(x1 + Float64(x1 + Float64(3.0 * Float64(x1 * Float64(Float64(x1 * 3.0) + -1.0))))); elseif (x1 <= -5.1e+32) tmp = t_3; elseif (x1 <= 18000000000.0) tmp = Float64(x1 + Float64(t_2 + Float64(x1 + Float64(4.0 * Float64(x2 * Float64(Float64(x1 * -3.0) + Float64(2.0 * Float64(x1 * x2)))))))); elseif (x1 <= 4.5e+92) tmp = t_3; else tmp = Float64(x1 + Float64(Float64(x1 * Float64(Float64(Float64(4.0 * Float64(x2 * Float64(Float64(2.0 * x2) - 3.0))) + Float64(x1 * Float64(Float64(x1 * 3.0) + Float64(3.0 * Float64(3.0 - Float64(x2 * -2.0)))))) - 2.0)) + Float64(x2 * -6.0))); end return tmp end
function tmp_2 = code(x1, x2) t_0 = x1 * (x1 * 3.0); t_1 = (x1 * x1) + 1.0; t_2 = 3.0 * (((t_0 - (2.0 * x2)) - x1) / t_1); t_3 = x1 + (t_2 + (x1 + ((x1 * (x1 * x1)) + ((t_0 * ((2.0 * x2) - x1)) + (t_1 * (((x1 * x1) * (((((t_0 + (2.0 * x2)) - x1) / t_1) * 4.0) - 6.0)) + -6.0)))))); tmp = 0.0; if (x1 <= -1e+108) tmp = x1 + (x1 + (3.0 * (x1 * ((x1 * 3.0) + -1.0)))); elseif (x1 <= -5.1e+32) tmp = t_3; elseif (x1 <= 18000000000.0) tmp = x1 + (t_2 + (x1 + (4.0 * (x2 * ((x1 * -3.0) + (2.0 * (x1 * x2))))))); elseif (x1 <= 4.5e+92) tmp = t_3; else tmp = x1 + ((x1 * (((4.0 * (x2 * ((2.0 * x2) - 3.0))) + (x1 * ((x1 * 3.0) + (3.0 * (3.0 - (x2 * -2.0)))))) - 2.0)) + (x2 * -6.0)); end tmp_2 = tmp; end
code[x1_, x2_] := Block[{t$95$0 = N[(x1 * N[(x1 * 3.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(N[(x1 * x1), $MachinePrecision] + 1.0), $MachinePrecision]}, Block[{t$95$2 = N[(3.0 * N[(N[(N[(t$95$0 - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$1), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(x1 + N[(t$95$2 + N[(x1 + N[(N[(x1 * N[(x1 * x1), $MachinePrecision]), $MachinePrecision] + N[(N[(t$95$0 * N[(N[(2.0 * x2), $MachinePrecision] - x1), $MachinePrecision]), $MachinePrecision] + N[(t$95$1 * N[(N[(N[(x1 * x1), $MachinePrecision] * N[(N[(N[(N[(N[(t$95$0 + N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$1), $MachinePrecision] * 4.0), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision] + -6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x1, -1e+108], N[(x1 + N[(x1 + N[(3.0 * N[(x1 * N[(N[(x1 * 3.0), $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, -5.1e+32], t$95$3, If[LessEqual[x1, 18000000000.0], N[(x1 + N[(t$95$2 + N[(x1 + N[(4.0 * N[(x2 * N[(N[(x1 * -3.0), $MachinePrecision] + N[(2.0 * N[(x1 * x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 4.5e+92], t$95$3, N[(x1 + N[(N[(x1 * N[(N[(N[(4.0 * N[(x2 * N[(N[(2.0 * x2), $MachinePrecision] - 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(x1 * N[(N[(x1 * 3.0), $MachinePrecision] + N[(3.0 * N[(3.0 - N[(x2 * -2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - 2.0), $MachinePrecision]), $MachinePrecision] + N[(x2 * -6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x1 \cdot \left(x1 \cdot 3\right)\\
t_1 := x1 \cdot x1 + 1\\
t_2 := 3 \cdot \frac{\left(t\_0 - 2 \cdot x2\right) - x1}{t\_1}\\
t_3 := x1 + \left(t\_2 + \left(x1 + \left(x1 \cdot \left(x1 \cdot x1\right) + \left(t\_0 \cdot \left(2 \cdot x2 - x1\right) + t\_1 \cdot \left(\left(x1 \cdot x1\right) \cdot \left(\frac{\left(t\_0 + 2 \cdot x2\right) - x1}{t\_1} \cdot 4 - 6\right) + -6\right)\right)\right)\right)\right)\\
\mathbf{if}\;x1 \leq -1 \cdot 10^{+108}:\\
\;\;\;\;x1 + \left(x1 + 3 \cdot \left(x1 \cdot \left(x1 \cdot 3 + -1\right)\right)\right)\\
\mathbf{elif}\;x1 \leq -5.1 \cdot 10^{+32}:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;x1 \leq 18000000000:\\
\;\;\;\;x1 + \left(t\_2 + \left(x1 + 4 \cdot \left(x2 \cdot \left(x1 \cdot -3 + 2 \cdot \left(x1 \cdot x2\right)\right)\right)\right)\right)\\
\mathbf{elif}\;x1 \leq 4.5 \cdot 10^{+92}:\\
\;\;\;\;t\_3\\
\mathbf{else}:\\
\;\;\;\;x1 + \left(x1 \cdot \left(\left(4 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right) + x1 \cdot \left(x1 \cdot 3 + 3 \cdot \left(3 - x2 \cdot -2\right)\right)\right) - 2\right) + x2 \cdot -6\right)\\
\end{array}
\end{array}
if x1 < -1e108Initial program 0.0%
Taylor expanded in x1 around 0 0.0%
Taylor expanded in x1 around 0 50.6%
Taylor expanded in x2 around 0 86.4%
if -1e108 < x1 < -5.10000000000000004e32 or 1.8e10 < x1 < 4.4999999999999999e92Initial program 99.1%
Taylor expanded in x1 around 0 93.3%
+-commutative93.3%
mul-1-neg93.3%
sub-neg93.3%
Simplified93.3%
Taylor expanded in x1 around inf 93.2%
associate-*r/93.2%
metadata-eval93.2%
Simplified93.2%
Taylor expanded in x1 around inf 83.6%
if -5.10000000000000004e32 < x1 < 1.8e10Initial program 99.4%
Taylor expanded in x1 around 0 83.7%
Taylor expanded in x2 around 0 92.4%
if 4.4999999999999999e92 < x1 Initial program 32.0%
Taylor expanded in x1 around 0 11.0%
Taylor expanded in x1 around 0 90.4%
Final simplification90.2%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (- 3.0 (* x2 -2.0)))
(t_1 (* x1 (* x1 3.0)))
(t_2 (* x2 (- (* 2.0 x2) 3.0)))
(t_3 (+ (* x1 x1) 1.0))
(t_4
(+
x1
(+
(+
x1
(+
(* x1 (* x1 x1))
(+
(* t_1 (- (* 2.0 x2) x1))
(*
t_3
(+
(* (* x1 x1) (- (* (/ (- (+ t_1 (* 2.0 x2)) x1) t_3) 4.0) 6.0))
(* 4.0 (* x1 t_2)))))))
(* 3.0 (* x2 -2.0))))))
(if (<= x1 -8e+91)
(+ x1 (+ x1 (* 3.0 (* x1 (+ (* x1 3.0) -1.0)))))
(if (<= x1 -1.45)
t_4
(if (<= x1 17000000.0)
(+
x1
(+
(+ x1 (* 4.0 (* x2 (+ (* x1 -3.0) (* 2.0 (* x1 x2))))))
(* 3.0 (+ (* x2 -2.0) (* x1 (+ (* x1 t_0) -1.0))))))
(if (<= x1 4.5e+92)
t_4
(+
x1
(+
(* x1 (- (+ (* 4.0 t_2) (* x1 (+ (* x1 3.0) (* 3.0 t_0)))) 2.0))
(* x2 -6.0)))))))))
double code(double x1, double x2) {
double t_0 = 3.0 - (x2 * -2.0);
double t_1 = x1 * (x1 * 3.0);
double t_2 = x2 * ((2.0 * x2) - 3.0);
double t_3 = (x1 * x1) + 1.0;
double t_4 = x1 + ((x1 + ((x1 * (x1 * x1)) + ((t_1 * ((2.0 * x2) - x1)) + (t_3 * (((x1 * x1) * (((((t_1 + (2.0 * x2)) - x1) / t_3) * 4.0) - 6.0)) + (4.0 * (x1 * t_2))))))) + (3.0 * (x2 * -2.0)));
double tmp;
if (x1 <= -8e+91) {
tmp = x1 + (x1 + (3.0 * (x1 * ((x1 * 3.0) + -1.0))));
} else if (x1 <= -1.45) {
tmp = t_4;
} else if (x1 <= 17000000.0) {
tmp = x1 + ((x1 + (4.0 * (x2 * ((x1 * -3.0) + (2.0 * (x1 * x2)))))) + (3.0 * ((x2 * -2.0) + (x1 * ((x1 * t_0) + -1.0)))));
} else if (x1 <= 4.5e+92) {
tmp = t_4;
} else {
tmp = x1 + ((x1 * (((4.0 * t_2) + (x1 * ((x1 * 3.0) + (3.0 * t_0)))) - 2.0)) + (x2 * -6.0));
}
return tmp;
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
real(8) :: t_0
real(8) :: t_1
real(8) :: t_2
real(8) :: t_3
real(8) :: t_4
real(8) :: tmp
t_0 = 3.0d0 - (x2 * (-2.0d0))
t_1 = x1 * (x1 * 3.0d0)
t_2 = x2 * ((2.0d0 * x2) - 3.0d0)
t_3 = (x1 * x1) + 1.0d0
t_4 = x1 + ((x1 + ((x1 * (x1 * x1)) + ((t_1 * ((2.0d0 * x2) - x1)) + (t_3 * (((x1 * x1) * (((((t_1 + (2.0d0 * x2)) - x1) / t_3) * 4.0d0) - 6.0d0)) + (4.0d0 * (x1 * t_2))))))) + (3.0d0 * (x2 * (-2.0d0))))
if (x1 <= (-8d+91)) then
tmp = x1 + (x1 + (3.0d0 * (x1 * ((x1 * 3.0d0) + (-1.0d0)))))
else if (x1 <= (-1.45d0)) then
tmp = t_4
else if (x1 <= 17000000.0d0) then
tmp = x1 + ((x1 + (4.0d0 * (x2 * ((x1 * (-3.0d0)) + (2.0d0 * (x1 * x2)))))) + (3.0d0 * ((x2 * (-2.0d0)) + (x1 * ((x1 * t_0) + (-1.0d0))))))
else if (x1 <= 4.5d+92) then
tmp = t_4
else
tmp = x1 + ((x1 * (((4.0d0 * t_2) + (x1 * ((x1 * 3.0d0) + (3.0d0 * t_0)))) - 2.0d0)) + (x2 * (-6.0d0)))
end if
code = tmp
end function
public static double code(double x1, double x2) {
double t_0 = 3.0 - (x2 * -2.0);
double t_1 = x1 * (x1 * 3.0);
double t_2 = x2 * ((2.0 * x2) - 3.0);
double t_3 = (x1 * x1) + 1.0;
double t_4 = x1 + ((x1 + ((x1 * (x1 * x1)) + ((t_1 * ((2.0 * x2) - x1)) + (t_3 * (((x1 * x1) * (((((t_1 + (2.0 * x2)) - x1) / t_3) * 4.0) - 6.0)) + (4.0 * (x1 * t_2))))))) + (3.0 * (x2 * -2.0)));
double tmp;
if (x1 <= -8e+91) {
tmp = x1 + (x1 + (3.0 * (x1 * ((x1 * 3.0) + -1.0))));
} else if (x1 <= -1.45) {
tmp = t_4;
} else if (x1 <= 17000000.0) {
tmp = x1 + ((x1 + (4.0 * (x2 * ((x1 * -3.0) + (2.0 * (x1 * x2)))))) + (3.0 * ((x2 * -2.0) + (x1 * ((x1 * t_0) + -1.0)))));
} else if (x1 <= 4.5e+92) {
tmp = t_4;
} else {
tmp = x1 + ((x1 * (((4.0 * t_2) + (x1 * ((x1 * 3.0) + (3.0 * t_0)))) - 2.0)) + (x2 * -6.0));
}
return tmp;
}
def code(x1, x2): t_0 = 3.0 - (x2 * -2.0) t_1 = x1 * (x1 * 3.0) t_2 = x2 * ((2.0 * x2) - 3.0) t_3 = (x1 * x1) + 1.0 t_4 = x1 + ((x1 + ((x1 * (x1 * x1)) + ((t_1 * ((2.0 * x2) - x1)) + (t_3 * (((x1 * x1) * (((((t_1 + (2.0 * x2)) - x1) / t_3) * 4.0) - 6.0)) + (4.0 * (x1 * t_2))))))) + (3.0 * (x2 * -2.0))) tmp = 0 if x1 <= -8e+91: tmp = x1 + (x1 + (3.0 * (x1 * ((x1 * 3.0) + -1.0)))) elif x1 <= -1.45: tmp = t_4 elif x1 <= 17000000.0: tmp = x1 + ((x1 + (4.0 * (x2 * ((x1 * -3.0) + (2.0 * (x1 * x2)))))) + (3.0 * ((x2 * -2.0) + (x1 * ((x1 * t_0) + -1.0))))) elif x1 <= 4.5e+92: tmp = t_4 else: tmp = x1 + ((x1 * (((4.0 * t_2) + (x1 * ((x1 * 3.0) + (3.0 * t_0)))) - 2.0)) + (x2 * -6.0)) return tmp
function code(x1, x2) t_0 = Float64(3.0 - Float64(x2 * -2.0)) t_1 = Float64(x1 * Float64(x1 * 3.0)) t_2 = Float64(x2 * Float64(Float64(2.0 * x2) - 3.0)) t_3 = Float64(Float64(x1 * x1) + 1.0) t_4 = Float64(x1 + Float64(Float64(x1 + Float64(Float64(x1 * Float64(x1 * x1)) + Float64(Float64(t_1 * Float64(Float64(2.0 * x2) - x1)) + Float64(t_3 * Float64(Float64(Float64(x1 * x1) * Float64(Float64(Float64(Float64(Float64(t_1 + Float64(2.0 * x2)) - x1) / t_3) * 4.0) - 6.0)) + Float64(4.0 * Float64(x1 * t_2))))))) + Float64(3.0 * Float64(x2 * -2.0)))) tmp = 0.0 if (x1 <= -8e+91) tmp = Float64(x1 + Float64(x1 + Float64(3.0 * Float64(x1 * Float64(Float64(x1 * 3.0) + -1.0))))); elseif (x1 <= -1.45) tmp = t_4; elseif (x1 <= 17000000.0) tmp = Float64(x1 + Float64(Float64(x1 + Float64(4.0 * Float64(x2 * Float64(Float64(x1 * -3.0) + Float64(2.0 * Float64(x1 * x2)))))) + Float64(3.0 * Float64(Float64(x2 * -2.0) + Float64(x1 * Float64(Float64(x1 * t_0) + -1.0)))))); elseif (x1 <= 4.5e+92) tmp = t_4; else tmp = Float64(x1 + Float64(Float64(x1 * Float64(Float64(Float64(4.0 * t_2) + Float64(x1 * Float64(Float64(x1 * 3.0) + Float64(3.0 * t_0)))) - 2.0)) + Float64(x2 * -6.0))); end return tmp end
function tmp_2 = code(x1, x2) t_0 = 3.0 - (x2 * -2.0); t_1 = x1 * (x1 * 3.0); t_2 = x2 * ((2.0 * x2) - 3.0); t_3 = (x1 * x1) + 1.0; t_4 = x1 + ((x1 + ((x1 * (x1 * x1)) + ((t_1 * ((2.0 * x2) - x1)) + (t_3 * (((x1 * x1) * (((((t_1 + (2.0 * x2)) - x1) / t_3) * 4.0) - 6.0)) + (4.0 * (x1 * t_2))))))) + (3.0 * (x2 * -2.0))); tmp = 0.0; if (x1 <= -8e+91) tmp = x1 + (x1 + (3.0 * (x1 * ((x1 * 3.0) + -1.0)))); elseif (x1 <= -1.45) tmp = t_4; elseif (x1 <= 17000000.0) tmp = x1 + ((x1 + (4.0 * (x2 * ((x1 * -3.0) + (2.0 * (x1 * x2)))))) + (3.0 * ((x2 * -2.0) + (x1 * ((x1 * t_0) + -1.0))))); elseif (x1 <= 4.5e+92) tmp = t_4; else tmp = x1 + ((x1 * (((4.0 * t_2) + (x1 * ((x1 * 3.0) + (3.0 * t_0)))) - 2.0)) + (x2 * -6.0)); end tmp_2 = tmp; end
code[x1_, x2_] := Block[{t$95$0 = N[(3.0 - N[(x2 * -2.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(x1 * N[(x1 * 3.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x2 * N[(N[(2.0 * x2), $MachinePrecision] - 3.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[(x1 * x1), $MachinePrecision] + 1.0), $MachinePrecision]}, Block[{t$95$4 = N[(x1 + N[(N[(x1 + N[(N[(x1 * N[(x1 * x1), $MachinePrecision]), $MachinePrecision] + N[(N[(t$95$1 * N[(N[(2.0 * x2), $MachinePrecision] - x1), $MachinePrecision]), $MachinePrecision] + N[(t$95$3 * N[(N[(N[(x1 * x1), $MachinePrecision] * N[(N[(N[(N[(N[(t$95$1 + N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$3), $MachinePrecision] * 4.0), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision] + N[(4.0 * N[(x1 * t$95$2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(3.0 * N[(x2 * -2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x1, -8e+91], N[(x1 + N[(x1 + N[(3.0 * N[(x1 * N[(N[(x1 * 3.0), $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, -1.45], t$95$4, If[LessEqual[x1, 17000000.0], N[(x1 + N[(N[(x1 + N[(4.0 * N[(x2 * N[(N[(x1 * -3.0), $MachinePrecision] + N[(2.0 * N[(x1 * x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(3.0 * N[(N[(x2 * -2.0), $MachinePrecision] + N[(x1 * N[(N[(x1 * t$95$0), $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 4.5e+92], t$95$4, N[(x1 + N[(N[(x1 * N[(N[(N[(4.0 * t$95$2), $MachinePrecision] + N[(x1 * N[(N[(x1 * 3.0), $MachinePrecision] + N[(3.0 * t$95$0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - 2.0), $MachinePrecision]), $MachinePrecision] + N[(x2 * -6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := 3 - x2 \cdot -2\\
t_1 := x1 \cdot \left(x1 \cdot 3\right)\\
t_2 := x2 \cdot \left(2 \cdot x2 - 3\right)\\
t_3 := x1 \cdot x1 + 1\\
t_4 := x1 + \left(\left(x1 + \left(x1 \cdot \left(x1 \cdot x1\right) + \left(t\_1 \cdot \left(2 \cdot x2 - x1\right) + t\_3 \cdot \left(\left(x1 \cdot x1\right) \cdot \left(\frac{\left(t\_1 + 2 \cdot x2\right) - x1}{t\_3} \cdot 4 - 6\right) + 4 \cdot \left(x1 \cdot t\_2\right)\right)\right)\right)\right) + 3 \cdot \left(x2 \cdot -2\right)\right)\\
\mathbf{if}\;x1 \leq -8 \cdot 10^{+91}:\\
\;\;\;\;x1 + \left(x1 + 3 \cdot \left(x1 \cdot \left(x1 \cdot 3 + -1\right)\right)\right)\\
\mathbf{elif}\;x1 \leq -1.45:\\
\;\;\;\;t\_4\\
\mathbf{elif}\;x1 \leq 17000000:\\
\;\;\;\;x1 + \left(\left(x1 + 4 \cdot \left(x2 \cdot \left(x1 \cdot -3 + 2 \cdot \left(x1 \cdot x2\right)\right)\right)\right) + 3 \cdot \left(x2 \cdot -2 + x1 \cdot \left(x1 \cdot t\_0 + -1\right)\right)\right)\\
\mathbf{elif}\;x1 \leq 4.5 \cdot 10^{+92}:\\
\;\;\;\;t\_4\\
\mathbf{else}:\\
\;\;\;\;x1 + \left(x1 \cdot \left(\left(4 \cdot t\_2 + x1 \cdot \left(x1 \cdot 3 + 3 \cdot t\_0\right)\right) - 2\right) + x2 \cdot -6\right)\\
\end{array}
\end{array}
if x1 < -8.00000000000000064e91Initial program 2.9%
Taylor expanded in x1 around 0 0.0%
Taylor expanded in x1 around 0 49.2%
Taylor expanded in x2 around 0 84.0%
if -8.00000000000000064e91 < x1 < -1.44999999999999996 or 1.7e7 < x1 < 4.4999999999999999e92Initial program 99.1%
Taylor expanded in x1 around 0 87.6%
+-commutative87.6%
mul-1-neg87.6%
sub-neg87.6%
Simplified87.6%
Taylor expanded in x1 around 0 73.5%
+-commutative87.6%
mul-1-neg87.6%
sub-neg87.6%
Simplified73.5%
Taylor expanded in x1 around 0 63.9%
Taylor expanded in x1 around 0 63.9%
*-commutative63.9%
Simplified63.9%
if -1.44999999999999996 < x1 < 1.7e7Initial program 99.4%
Taylor expanded in x1 around 0 88.1%
Taylor expanded in x1 around 0 88.1%
Taylor expanded in x2 around 0 97.4%
if 4.4999999999999999e92 < x1 Initial program 32.0%
Taylor expanded in x1 around 0 11.0%
Taylor expanded in x1 around 0 90.4%
Final simplification89.0%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (+ (* x1 x1) 1.0))
(t_1 (- 3.0 (* x2 -2.0)))
(t_2 (* x1 (* x1 3.0)))
(t_3 (* x2 (- (* 2.0 x2) 3.0)))
(t_4
(+
x1
(+
9.0
(+
x1
(+
(* x1 (* x1 x1))
(+
(* t_2 (- (* 2.0 x2) x1))
(*
t_0
(+
(* (* x1 x1) (- (* (/ (- (+ t_2 (* 2.0 x2)) x1) t_0) 4.0) 6.0))
(* 4.0 (* x1 t_3)))))))))))
(if (<= x1 -8e+91)
(+ x1 (+ x1 (* 3.0 (* x1 (+ (* x1 3.0) -1.0)))))
(if (<= x1 -0.55)
t_4
(if (<= x1 17000000.0)
(+
x1
(+
(+ x1 (* 4.0 (* x2 (+ (* x1 -3.0) (* 2.0 (* x1 x2))))))
(* 3.0 (+ (* x2 -2.0) (* x1 (+ (* x1 t_1) -1.0))))))
(if (<= x1 4.5e+92)
t_4
(+
x1
(+
(* x1 (- (+ (* 4.0 t_3) (* x1 (+ (* x1 3.0) (* 3.0 t_1)))) 2.0))
(* x2 -6.0)))))))))
double code(double x1, double x2) {
double t_0 = (x1 * x1) + 1.0;
double t_1 = 3.0 - (x2 * -2.0);
double t_2 = x1 * (x1 * 3.0);
double t_3 = x2 * ((2.0 * x2) - 3.0);
double t_4 = x1 + (9.0 + (x1 + ((x1 * (x1 * x1)) + ((t_2 * ((2.0 * x2) - x1)) + (t_0 * (((x1 * x1) * (((((t_2 + (2.0 * x2)) - x1) / t_0) * 4.0) - 6.0)) + (4.0 * (x1 * t_3))))))));
double tmp;
if (x1 <= -8e+91) {
tmp = x1 + (x1 + (3.0 * (x1 * ((x1 * 3.0) + -1.0))));
} else if (x1 <= -0.55) {
tmp = t_4;
} else if (x1 <= 17000000.0) {
tmp = x1 + ((x1 + (4.0 * (x2 * ((x1 * -3.0) + (2.0 * (x1 * x2)))))) + (3.0 * ((x2 * -2.0) + (x1 * ((x1 * t_1) + -1.0)))));
} else if (x1 <= 4.5e+92) {
tmp = t_4;
} else {
tmp = x1 + ((x1 * (((4.0 * t_3) + (x1 * ((x1 * 3.0) + (3.0 * t_1)))) - 2.0)) + (x2 * -6.0));
}
return tmp;
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
real(8) :: t_0
real(8) :: t_1
real(8) :: t_2
real(8) :: t_3
real(8) :: t_4
real(8) :: tmp
t_0 = (x1 * x1) + 1.0d0
t_1 = 3.0d0 - (x2 * (-2.0d0))
t_2 = x1 * (x1 * 3.0d0)
t_3 = x2 * ((2.0d0 * x2) - 3.0d0)
t_4 = x1 + (9.0d0 + (x1 + ((x1 * (x1 * x1)) + ((t_2 * ((2.0d0 * x2) - x1)) + (t_0 * (((x1 * x1) * (((((t_2 + (2.0d0 * x2)) - x1) / t_0) * 4.0d0) - 6.0d0)) + (4.0d0 * (x1 * t_3))))))))
if (x1 <= (-8d+91)) then
tmp = x1 + (x1 + (3.0d0 * (x1 * ((x1 * 3.0d0) + (-1.0d0)))))
else if (x1 <= (-0.55d0)) then
tmp = t_4
else if (x1 <= 17000000.0d0) then
tmp = x1 + ((x1 + (4.0d0 * (x2 * ((x1 * (-3.0d0)) + (2.0d0 * (x1 * x2)))))) + (3.0d0 * ((x2 * (-2.0d0)) + (x1 * ((x1 * t_1) + (-1.0d0))))))
else if (x1 <= 4.5d+92) then
tmp = t_4
else
tmp = x1 + ((x1 * (((4.0d0 * t_3) + (x1 * ((x1 * 3.0d0) + (3.0d0 * t_1)))) - 2.0d0)) + (x2 * (-6.0d0)))
end if
code = tmp
end function
public static double code(double x1, double x2) {
double t_0 = (x1 * x1) + 1.0;
double t_1 = 3.0 - (x2 * -2.0);
double t_2 = x1 * (x1 * 3.0);
double t_3 = x2 * ((2.0 * x2) - 3.0);
double t_4 = x1 + (9.0 + (x1 + ((x1 * (x1 * x1)) + ((t_2 * ((2.0 * x2) - x1)) + (t_0 * (((x1 * x1) * (((((t_2 + (2.0 * x2)) - x1) / t_0) * 4.0) - 6.0)) + (4.0 * (x1 * t_3))))))));
double tmp;
if (x1 <= -8e+91) {
tmp = x1 + (x1 + (3.0 * (x1 * ((x1 * 3.0) + -1.0))));
} else if (x1 <= -0.55) {
tmp = t_4;
} else if (x1 <= 17000000.0) {
tmp = x1 + ((x1 + (4.0 * (x2 * ((x1 * -3.0) + (2.0 * (x1 * x2)))))) + (3.0 * ((x2 * -2.0) + (x1 * ((x1 * t_1) + -1.0)))));
} else if (x1 <= 4.5e+92) {
tmp = t_4;
} else {
tmp = x1 + ((x1 * (((4.0 * t_3) + (x1 * ((x1 * 3.0) + (3.0 * t_1)))) - 2.0)) + (x2 * -6.0));
}
return tmp;
}
def code(x1, x2): t_0 = (x1 * x1) + 1.0 t_1 = 3.0 - (x2 * -2.0) t_2 = x1 * (x1 * 3.0) t_3 = x2 * ((2.0 * x2) - 3.0) t_4 = x1 + (9.0 + (x1 + ((x1 * (x1 * x1)) + ((t_2 * ((2.0 * x2) - x1)) + (t_0 * (((x1 * x1) * (((((t_2 + (2.0 * x2)) - x1) / t_0) * 4.0) - 6.0)) + (4.0 * (x1 * t_3)))))))) tmp = 0 if x1 <= -8e+91: tmp = x1 + (x1 + (3.0 * (x1 * ((x1 * 3.0) + -1.0)))) elif x1 <= -0.55: tmp = t_4 elif x1 <= 17000000.0: tmp = x1 + ((x1 + (4.0 * (x2 * ((x1 * -3.0) + (2.0 * (x1 * x2)))))) + (3.0 * ((x2 * -2.0) + (x1 * ((x1 * t_1) + -1.0))))) elif x1 <= 4.5e+92: tmp = t_4 else: tmp = x1 + ((x1 * (((4.0 * t_3) + (x1 * ((x1 * 3.0) + (3.0 * t_1)))) - 2.0)) + (x2 * -6.0)) return tmp
function code(x1, x2) t_0 = Float64(Float64(x1 * x1) + 1.0) t_1 = Float64(3.0 - Float64(x2 * -2.0)) t_2 = Float64(x1 * Float64(x1 * 3.0)) t_3 = Float64(x2 * Float64(Float64(2.0 * x2) - 3.0)) t_4 = Float64(x1 + Float64(9.0 + Float64(x1 + Float64(Float64(x1 * Float64(x1 * x1)) + Float64(Float64(t_2 * Float64(Float64(2.0 * x2) - x1)) + Float64(t_0 * Float64(Float64(Float64(x1 * x1) * Float64(Float64(Float64(Float64(Float64(t_2 + Float64(2.0 * x2)) - x1) / t_0) * 4.0) - 6.0)) + Float64(4.0 * Float64(x1 * t_3))))))))) tmp = 0.0 if (x1 <= -8e+91) tmp = Float64(x1 + Float64(x1 + Float64(3.0 * Float64(x1 * Float64(Float64(x1 * 3.0) + -1.0))))); elseif (x1 <= -0.55) tmp = t_4; elseif (x1 <= 17000000.0) tmp = Float64(x1 + Float64(Float64(x1 + Float64(4.0 * Float64(x2 * Float64(Float64(x1 * -3.0) + Float64(2.0 * Float64(x1 * x2)))))) + Float64(3.0 * Float64(Float64(x2 * -2.0) + Float64(x1 * Float64(Float64(x1 * t_1) + -1.0)))))); elseif (x1 <= 4.5e+92) tmp = t_4; else tmp = Float64(x1 + Float64(Float64(x1 * Float64(Float64(Float64(4.0 * t_3) + Float64(x1 * Float64(Float64(x1 * 3.0) + Float64(3.0 * t_1)))) - 2.0)) + Float64(x2 * -6.0))); end return tmp end
function tmp_2 = code(x1, x2) t_0 = (x1 * x1) + 1.0; t_1 = 3.0 - (x2 * -2.0); t_2 = x1 * (x1 * 3.0); t_3 = x2 * ((2.0 * x2) - 3.0); t_4 = x1 + (9.0 + (x1 + ((x1 * (x1 * x1)) + ((t_2 * ((2.0 * x2) - x1)) + (t_0 * (((x1 * x1) * (((((t_2 + (2.0 * x2)) - x1) / t_0) * 4.0) - 6.0)) + (4.0 * (x1 * t_3)))))))); tmp = 0.0; if (x1 <= -8e+91) tmp = x1 + (x1 + (3.0 * (x1 * ((x1 * 3.0) + -1.0)))); elseif (x1 <= -0.55) tmp = t_4; elseif (x1 <= 17000000.0) tmp = x1 + ((x1 + (4.0 * (x2 * ((x1 * -3.0) + (2.0 * (x1 * x2)))))) + (3.0 * ((x2 * -2.0) + (x1 * ((x1 * t_1) + -1.0))))); elseif (x1 <= 4.5e+92) tmp = t_4; else tmp = x1 + ((x1 * (((4.0 * t_3) + (x1 * ((x1 * 3.0) + (3.0 * t_1)))) - 2.0)) + (x2 * -6.0)); end tmp_2 = tmp; end
code[x1_, x2_] := Block[{t$95$0 = N[(N[(x1 * x1), $MachinePrecision] + 1.0), $MachinePrecision]}, Block[{t$95$1 = N[(3.0 - N[(x2 * -2.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x1 * N[(x1 * 3.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(x2 * N[(N[(2.0 * x2), $MachinePrecision] - 3.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[(x1 + N[(9.0 + N[(x1 + N[(N[(x1 * N[(x1 * x1), $MachinePrecision]), $MachinePrecision] + N[(N[(t$95$2 * N[(N[(2.0 * x2), $MachinePrecision] - x1), $MachinePrecision]), $MachinePrecision] + N[(t$95$0 * N[(N[(N[(x1 * x1), $MachinePrecision] * N[(N[(N[(N[(N[(t$95$2 + N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$0), $MachinePrecision] * 4.0), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision] + N[(4.0 * N[(x1 * t$95$3), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x1, -8e+91], N[(x1 + N[(x1 + N[(3.0 * N[(x1 * N[(N[(x1 * 3.0), $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, -0.55], t$95$4, If[LessEqual[x1, 17000000.0], N[(x1 + N[(N[(x1 + N[(4.0 * N[(x2 * N[(N[(x1 * -3.0), $MachinePrecision] + N[(2.0 * N[(x1 * x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(3.0 * N[(N[(x2 * -2.0), $MachinePrecision] + N[(x1 * N[(N[(x1 * t$95$1), $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 4.5e+92], t$95$4, N[(x1 + N[(N[(x1 * N[(N[(N[(4.0 * t$95$3), $MachinePrecision] + N[(x1 * N[(N[(x1 * 3.0), $MachinePrecision] + N[(3.0 * t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - 2.0), $MachinePrecision]), $MachinePrecision] + N[(x2 * -6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x1 \cdot x1 + 1\\
t_1 := 3 - x2 \cdot -2\\
t_2 := x1 \cdot \left(x1 \cdot 3\right)\\
t_3 := x2 \cdot \left(2 \cdot x2 - 3\right)\\
t_4 := x1 + \left(9 + \left(x1 + \left(x1 \cdot \left(x1 \cdot x1\right) + \left(t\_2 \cdot \left(2 \cdot x2 - x1\right) + t\_0 \cdot \left(\left(x1 \cdot x1\right) \cdot \left(\frac{\left(t\_2 + 2 \cdot x2\right) - x1}{t\_0} \cdot 4 - 6\right) + 4 \cdot \left(x1 \cdot t\_3\right)\right)\right)\right)\right)\right)\\
\mathbf{if}\;x1 \leq -8 \cdot 10^{+91}:\\
\;\;\;\;x1 + \left(x1 + 3 \cdot \left(x1 \cdot \left(x1 \cdot 3 + -1\right)\right)\right)\\
\mathbf{elif}\;x1 \leq -0.55:\\
\;\;\;\;t\_4\\
\mathbf{elif}\;x1 \leq 17000000:\\
\;\;\;\;x1 + \left(\left(x1 + 4 \cdot \left(x2 \cdot \left(x1 \cdot -3 + 2 \cdot \left(x1 \cdot x2\right)\right)\right)\right) + 3 \cdot \left(x2 \cdot -2 + x1 \cdot \left(x1 \cdot t\_1 + -1\right)\right)\right)\\
\mathbf{elif}\;x1 \leq 4.5 \cdot 10^{+92}:\\
\;\;\;\;t\_4\\
\mathbf{else}:\\
\;\;\;\;x1 + \left(x1 \cdot \left(\left(4 \cdot t\_3 + x1 \cdot \left(x1 \cdot 3 + 3 \cdot t\_1\right)\right) - 2\right) + x2 \cdot -6\right)\\
\end{array}
\end{array}
if x1 < -8.00000000000000064e91Initial program 2.9%
Taylor expanded in x1 around 0 0.0%
Taylor expanded in x1 around 0 49.2%
Taylor expanded in x2 around 0 84.0%
if -8.00000000000000064e91 < x1 < -0.55000000000000004 or 1.7e7 < x1 < 4.4999999999999999e92Initial program 99.1%
Taylor expanded in x1 around 0 87.6%
+-commutative87.6%
mul-1-neg87.6%
sub-neg87.6%
Simplified87.6%
Taylor expanded in x1 around 0 73.5%
+-commutative87.6%
mul-1-neg87.6%
sub-neg87.6%
Simplified73.5%
Taylor expanded in x1 around 0 63.9%
Taylor expanded in x1 around inf 63.9%
if -0.55000000000000004 < x1 < 1.7e7Initial program 99.4%
Taylor expanded in x1 around 0 88.1%
Taylor expanded in x1 around 0 88.1%
Taylor expanded in x2 around 0 97.4%
if 4.4999999999999999e92 < x1 Initial program 32.0%
Taylor expanded in x1 around 0 11.0%
Taylor expanded in x1 around 0 90.4%
Final simplification89.0%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (- 3.0 (* x2 -2.0))) (t_1 (* x2 (- (* 2.0 x2) 3.0))))
(if (<= x1 -9.8e+148)
(+ x1 (+ x1 (* 3.0 (* x1 (+ (* x1 3.0) -1.0)))))
(if (<= x1 -8.6e+30)
(+ x1 (+ (+ x1 (* 4.0 (* x1 t_1))) (* x2 (- (* -3.0 (/ x1 x2)) 6.0))))
(if (<= x1 5e+76)
(+
x1
(+
(+ x1 (* 4.0 (* x2 (+ (* x1 -3.0) (* 2.0 (* x1 x2))))))
(* 3.0 (+ (* x2 -2.0) (* x1 (+ (* x1 t_0) -1.0))))))
(if (<= x1 1.1e+97)
(* x2 (- (/ x1 x2) 6.0))
(+
x1
(+
(* x1 (- (+ (* 4.0 t_1) (* x1 (+ (* x1 3.0) (* 3.0 t_0)))) 2.0))
(* x2 -6.0)))))))))
double code(double x1, double x2) {
double t_0 = 3.0 - (x2 * -2.0);
double t_1 = x2 * ((2.0 * x2) - 3.0);
double tmp;
if (x1 <= -9.8e+148) {
tmp = x1 + (x1 + (3.0 * (x1 * ((x1 * 3.0) + -1.0))));
} else if (x1 <= -8.6e+30) {
tmp = x1 + ((x1 + (4.0 * (x1 * t_1))) + (x2 * ((-3.0 * (x1 / x2)) - 6.0)));
} else if (x1 <= 5e+76) {
tmp = x1 + ((x1 + (4.0 * (x2 * ((x1 * -3.0) + (2.0 * (x1 * x2)))))) + (3.0 * ((x2 * -2.0) + (x1 * ((x1 * t_0) + -1.0)))));
} else if (x1 <= 1.1e+97) {
tmp = x2 * ((x1 / x2) - 6.0);
} else {
tmp = x1 + ((x1 * (((4.0 * t_1) + (x1 * ((x1 * 3.0) + (3.0 * t_0)))) - 2.0)) + (x2 * -6.0));
}
return tmp;
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
real(8) :: t_0
real(8) :: t_1
real(8) :: tmp
t_0 = 3.0d0 - (x2 * (-2.0d0))
t_1 = x2 * ((2.0d0 * x2) - 3.0d0)
if (x1 <= (-9.8d+148)) then
tmp = x1 + (x1 + (3.0d0 * (x1 * ((x1 * 3.0d0) + (-1.0d0)))))
else if (x1 <= (-8.6d+30)) then
tmp = x1 + ((x1 + (4.0d0 * (x1 * t_1))) + (x2 * (((-3.0d0) * (x1 / x2)) - 6.0d0)))
else if (x1 <= 5d+76) then
tmp = x1 + ((x1 + (4.0d0 * (x2 * ((x1 * (-3.0d0)) + (2.0d0 * (x1 * x2)))))) + (3.0d0 * ((x2 * (-2.0d0)) + (x1 * ((x1 * t_0) + (-1.0d0))))))
else if (x1 <= 1.1d+97) then
tmp = x2 * ((x1 / x2) - 6.0d0)
else
tmp = x1 + ((x1 * (((4.0d0 * t_1) + (x1 * ((x1 * 3.0d0) + (3.0d0 * t_0)))) - 2.0d0)) + (x2 * (-6.0d0)))
end if
code = tmp
end function
public static double code(double x1, double x2) {
double t_0 = 3.0 - (x2 * -2.0);
double t_1 = x2 * ((2.0 * x2) - 3.0);
double tmp;
if (x1 <= -9.8e+148) {
tmp = x1 + (x1 + (3.0 * (x1 * ((x1 * 3.0) + -1.0))));
} else if (x1 <= -8.6e+30) {
tmp = x1 + ((x1 + (4.0 * (x1 * t_1))) + (x2 * ((-3.0 * (x1 / x2)) - 6.0)));
} else if (x1 <= 5e+76) {
tmp = x1 + ((x1 + (4.0 * (x2 * ((x1 * -3.0) + (2.0 * (x1 * x2)))))) + (3.0 * ((x2 * -2.0) + (x1 * ((x1 * t_0) + -1.0)))));
} else if (x1 <= 1.1e+97) {
tmp = x2 * ((x1 / x2) - 6.0);
} else {
tmp = x1 + ((x1 * (((4.0 * t_1) + (x1 * ((x1 * 3.0) + (3.0 * t_0)))) - 2.0)) + (x2 * -6.0));
}
return tmp;
}
def code(x1, x2): t_0 = 3.0 - (x2 * -2.0) t_1 = x2 * ((2.0 * x2) - 3.0) tmp = 0 if x1 <= -9.8e+148: tmp = x1 + (x1 + (3.0 * (x1 * ((x1 * 3.0) + -1.0)))) elif x1 <= -8.6e+30: tmp = x1 + ((x1 + (4.0 * (x1 * t_1))) + (x2 * ((-3.0 * (x1 / x2)) - 6.0))) elif x1 <= 5e+76: tmp = x1 + ((x1 + (4.0 * (x2 * ((x1 * -3.0) + (2.0 * (x1 * x2)))))) + (3.0 * ((x2 * -2.0) + (x1 * ((x1 * t_0) + -1.0))))) elif x1 <= 1.1e+97: tmp = x2 * ((x1 / x2) - 6.0) else: tmp = x1 + ((x1 * (((4.0 * t_1) + (x1 * ((x1 * 3.0) + (3.0 * t_0)))) - 2.0)) + (x2 * -6.0)) return tmp
function code(x1, x2) t_0 = Float64(3.0 - Float64(x2 * -2.0)) t_1 = Float64(x2 * Float64(Float64(2.0 * x2) - 3.0)) tmp = 0.0 if (x1 <= -9.8e+148) tmp = Float64(x1 + Float64(x1 + Float64(3.0 * Float64(x1 * Float64(Float64(x1 * 3.0) + -1.0))))); elseif (x1 <= -8.6e+30) tmp = Float64(x1 + Float64(Float64(x1 + Float64(4.0 * Float64(x1 * t_1))) + Float64(x2 * Float64(Float64(-3.0 * Float64(x1 / x2)) - 6.0)))); elseif (x1 <= 5e+76) tmp = Float64(x1 + Float64(Float64(x1 + Float64(4.0 * Float64(x2 * Float64(Float64(x1 * -3.0) + Float64(2.0 * Float64(x1 * x2)))))) + Float64(3.0 * Float64(Float64(x2 * -2.0) + Float64(x1 * Float64(Float64(x1 * t_0) + -1.0)))))); elseif (x1 <= 1.1e+97) tmp = Float64(x2 * Float64(Float64(x1 / x2) - 6.0)); else tmp = Float64(x1 + Float64(Float64(x1 * Float64(Float64(Float64(4.0 * t_1) + Float64(x1 * Float64(Float64(x1 * 3.0) + Float64(3.0 * t_0)))) - 2.0)) + Float64(x2 * -6.0))); end return tmp end
function tmp_2 = code(x1, x2) t_0 = 3.0 - (x2 * -2.0); t_1 = x2 * ((2.0 * x2) - 3.0); tmp = 0.0; if (x1 <= -9.8e+148) tmp = x1 + (x1 + (3.0 * (x1 * ((x1 * 3.0) + -1.0)))); elseif (x1 <= -8.6e+30) tmp = x1 + ((x1 + (4.0 * (x1 * t_1))) + (x2 * ((-3.0 * (x1 / x2)) - 6.0))); elseif (x1 <= 5e+76) tmp = x1 + ((x1 + (4.0 * (x2 * ((x1 * -3.0) + (2.0 * (x1 * x2)))))) + (3.0 * ((x2 * -2.0) + (x1 * ((x1 * t_0) + -1.0))))); elseif (x1 <= 1.1e+97) tmp = x2 * ((x1 / x2) - 6.0); else tmp = x1 + ((x1 * (((4.0 * t_1) + (x1 * ((x1 * 3.0) + (3.0 * t_0)))) - 2.0)) + (x2 * -6.0)); end tmp_2 = tmp; end
code[x1_, x2_] := Block[{t$95$0 = N[(3.0 - N[(x2 * -2.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(x2 * N[(N[(2.0 * x2), $MachinePrecision] - 3.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x1, -9.8e+148], N[(x1 + N[(x1 + N[(3.0 * N[(x1 * N[(N[(x1 * 3.0), $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, -8.6e+30], N[(x1 + N[(N[(x1 + N[(4.0 * N[(x1 * t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(x2 * N[(N[(-3.0 * N[(x1 / x2), $MachinePrecision]), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 5e+76], N[(x1 + N[(N[(x1 + N[(4.0 * N[(x2 * N[(N[(x1 * -3.0), $MachinePrecision] + N[(2.0 * N[(x1 * x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(3.0 * N[(N[(x2 * -2.0), $MachinePrecision] + N[(x1 * N[(N[(x1 * t$95$0), $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 1.1e+97], N[(x2 * N[(N[(x1 / x2), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision], N[(x1 + N[(N[(x1 * N[(N[(N[(4.0 * t$95$1), $MachinePrecision] + N[(x1 * N[(N[(x1 * 3.0), $MachinePrecision] + N[(3.0 * t$95$0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - 2.0), $MachinePrecision]), $MachinePrecision] + N[(x2 * -6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := 3 - x2 \cdot -2\\
t_1 := x2 \cdot \left(2 \cdot x2 - 3\right)\\
\mathbf{if}\;x1 \leq -9.8 \cdot 10^{+148}:\\
\;\;\;\;x1 + \left(x1 + 3 \cdot \left(x1 \cdot \left(x1 \cdot 3 + -1\right)\right)\right)\\
\mathbf{elif}\;x1 \leq -8.6 \cdot 10^{+30}:\\
\;\;\;\;x1 + \left(\left(x1 + 4 \cdot \left(x1 \cdot t\_1\right)\right) + x2 \cdot \left(-3 \cdot \frac{x1}{x2} - 6\right)\right)\\
\mathbf{elif}\;x1 \leq 5 \cdot 10^{+76}:\\
\;\;\;\;x1 + \left(\left(x1 + 4 \cdot \left(x2 \cdot \left(x1 \cdot -3 + 2 \cdot \left(x1 \cdot x2\right)\right)\right)\right) + 3 \cdot \left(x2 \cdot -2 + x1 \cdot \left(x1 \cdot t\_0 + -1\right)\right)\right)\\
\mathbf{elif}\;x1 \leq 1.1 \cdot 10^{+97}:\\
\;\;\;\;x2 \cdot \left(\frac{x1}{x2} - 6\right)\\
\mathbf{else}:\\
\;\;\;\;x1 + \left(x1 \cdot \left(\left(4 \cdot t\_1 + x1 \cdot \left(x1 \cdot 3 + 3 \cdot t\_0\right)\right) - 2\right) + x2 \cdot -6\right)\\
\end{array}
\end{array}
if x1 < -9.8e148Initial program 0.0%
Taylor expanded in x1 around 0 0.0%
Taylor expanded in x1 around 0 58.6%
Taylor expanded in x2 around 0 100.0%
if -9.8e148 < x1 < -8.6e30Initial program 74.6%
Taylor expanded in x1 around 0 21.3%
Taylor expanded in x1 around 0 22.9%
*-commutative22.9%
fma-define22.9%
*-commutative22.9%
Simplified22.9%
Taylor expanded in x2 around inf 42.1%
if -8.6e30 < x1 < 4.99999999999999991e76Initial program 99.4%
Taylor expanded in x1 around 0 77.6%
Taylor expanded in x1 around 0 77.8%
Taylor expanded in x2 around 0 85.8%
if 4.99999999999999991e76 < x1 < 1.1e97Initial program 99.7%
Taylor expanded in x1 around 0 23.1%
Taylor expanded in x1 around 0 4.1%
*-commutative4.1%
Simplified4.1%
Taylor expanded in x2 around inf 45.3%
if 1.1e97 < x1 Initial program 29.2%
Taylor expanded in x1 around 0 9.2%
Taylor expanded in x1 around 0 91.9%
Final simplification84.3%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (+ x1 (* x1 (+ 1.0 (* 4.0 (* x2 (- (* 2.0 x2) 3.0)))))))
(t_1 (+ x1 (+ x1 (* 3.0 (* x1 (+ (* x1 3.0) -1.0)))))))
(if (<= x1 -4.8e+91)
t_1
(if (<= x1 -1.32e-36)
t_0
(if (<= x1 -1.35e-167)
(+ x1 (* x1 (- (* x2 (+ -12.0 (/ -6.0 x1))) 2.0)))
(if (<= x1 1.65e-254)
(* x2 -6.0)
(if (<= x1 6.7e-43)
(+ x1 (* x1 (- (/ (* x2 -6.0) x1) 2.0)))
(if (<= x1 2.35e+144) t_0 t_1))))))))
double code(double x1, double x2) {
double t_0 = x1 + (x1 * (1.0 + (4.0 * (x2 * ((2.0 * x2) - 3.0)))));
double t_1 = x1 + (x1 + (3.0 * (x1 * ((x1 * 3.0) + -1.0))));
double tmp;
if (x1 <= -4.8e+91) {
tmp = t_1;
} else if (x1 <= -1.32e-36) {
tmp = t_0;
} else if (x1 <= -1.35e-167) {
tmp = x1 + (x1 * ((x2 * (-12.0 + (-6.0 / x1))) - 2.0));
} else if (x1 <= 1.65e-254) {
tmp = x2 * -6.0;
} else if (x1 <= 6.7e-43) {
tmp = x1 + (x1 * (((x2 * -6.0) / x1) - 2.0));
} else if (x1 <= 2.35e+144) {
tmp = t_0;
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
real(8) :: t_0
real(8) :: t_1
real(8) :: tmp
t_0 = x1 + (x1 * (1.0d0 + (4.0d0 * (x2 * ((2.0d0 * x2) - 3.0d0)))))
t_1 = x1 + (x1 + (3.0d0 * (x1 * ((x1 * 3.0d0) + (-1.0d0)))))
if (x1 <= (-4.8d+91)) then
tmp = t_1
else if (x1 <= (-1.32d-36)) then
tmp = t_0
else if (x1 <= (-1.35d-167)) then
tmp = x1 + (x1 * ((x2 * ((-12.0d0) + ((-6.0d0) / x1))) - 2.0d0))
else if (x1 <= 1.65d-254) then
tmp = x2 * (-6.0d0)
else if (x1 <= 6.7d-43) then
tmp = x1 + (x1 * (((x2 * (-6.0d0)) / x1) - 2.0d0))
else if (x1 <= 2.35d+144) then
tmp = t_0
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x1, double x2) {
double t_0 = x1 + (x1 * (1.0 + (4.0 * (x2 * ((2.0 * x2) - 3.0)))));
double t_1 = x1 + (x1 + (3.0 * (x1 * ((x1 * 3.0) + -1.0))));
double tmp;
if (x1 <= -4.8e+91) {
tmp = t_1;
} else if (x1 <= -1.32e-36) {
tmp = t_0;
} else if (x1 <= -1.35e-167) {
tmp = x1 + (x1 * ((x2 * (-12.0 + (-6.0 / x1))) - 2.0));
} else if (x1 <= 1.65e-254) {
tmp = x2 * -6.0;
} else if (x1 <= 6.7e-43) {
tmp = x1 + (x1 * (((x2 * -6.0) / x1) - 2.0));
} else if (x1 <= 2.35e+144) {
tmp = t_0;
} else {
tmp = t_1;
}
return tmp;
}
def code(x1, x2): t_0 = x1 + (x1 * (1.0 + (4.0 * (x2 * ((2.0 * x2) - 3.0))))) t_1 = x1 + (x1 + (3.0 * (x1 * ((x1 * 3.0) + -1.0)))) tmp = 0 if x1 <= -4.8e+91: tmp = t_1 elif x1 <= -1.32e-36: tmp = t_0 elif x1 <= -1.35e-167: tmp = x1 + (x1 * ((x2 * (-12.0 + (-6.0 / x1))) - 2.0)) elif x1 <= 1.65e-254: tmp = x2 * -6.0 elif x1 <= 6.7e-43: tmp = x1 + (x1 * (((x2 * -6.0) / x1) - 2.0)) elif x1 <= 2.35e+144: tmp = t_0 else: tmp = t_1 return tmp
function code(x1, x2) t_0 = Float64(x1 + Float64(x1 * Float64(1.0 + Float64(4.0 * Float64(x2 * Float64(Float64(2.0 * x2) - 3.0)))))) t_1 = Float64(x1 + Float64(x1 + Float64(3.0 * Float64(x1 * Float64(Float64(x1 * 3.0) + -1.0))))) tmp = 0.0 if (x1 <= -4.8e+91) tmp = t_1; elseif (x1 <= -1.32e-36) tmp = t_0; elseif (x1 <= -1.35e-167) tmp = Float64(x1 + Float64(x1 * Float64(Float64(x2 * Float64(-12.0 + Float64(-6.0 / x1))) - 2.0))); elseif (x1 <= 1.65e-254) tmp = Float64(x2 * -6.0); elseif (x1 <= 6.7e-43) tmp = Float64(x1 + Float64(x1 * Float64(Float64(Float64(x2 * -6.0) / x1) - 2.0))); elseif (x1 <= 2.35e+144) tmp = t_0; else tmp = t_1; end return tmp end
function tmp_2 = code(x1, x2) t_0 = x1 + (x1 * (1.0 + (4.0 * (x2 * ((2.0 * x2) - 3.0))))); t_1 = x1 + (x1 + (3.0 * (x1 * ((x1 * 3.0) + -1.0)))); tmp = 0.0; if (x1 <= -4.8e+91) tmp = t_1; elseif (x1 <= -1.32e-36) tmp = t_0; elseif (x1 <= -1.35e-167) tmp = x1 + (x1 * ((x2 * (-12.0 + (-6.0 / x1))) - 2.0)); elseif (x1 <= 1.65e-254) tmp = x2 * -6.0; elseif (x1 <= 6.7e-43) tmp = x1 + (x1 * (((x2 * -6.0) / x1) - 2.0)); elseif (x1 <= 2.35e+144) tmp = t_0; else tmp = t_1; end tmp_2 = tmp; end
code[x1_, x2_] := Block[{t$95$0 = N[(x1 + N[(x1 * N[(1.0 + N[(4.0 * N[(x2 * N[(N[(2.0 * x2), $MachinePrecision] - 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(x1 + N[(x1 + N[(3.0 * N[(x1 * N[(N[(x1 * 3.0), $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x1, -4.8e+91], t$95$1, If[LessEqual[x1, -1.32e-36], t$95$0, If[LessEqual[x1, -1.35e-167], N[(x1 + N[(x1 * N[(N[(x2 * N[(-12.0 + N[(-6.0 / x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 1.65e-254], N[(x2 * -6.0), $MachinePrecision], If[LessEqual[x1, 6.7e-43], N[(x1 + N[(x1 * N[(N[(N[(x2 * -6.0), $MachinePrecision] / x1), $MachinePrecision] - 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 2.35e+144], t$95$0, t$95$1]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x1 + x1 \cdot \left(1 + 4 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right)\right)\\
t_1 := x1 + \left(x1 + 3 \cdot \left(x1 \cdot \left(x1 \cdot 3 + -1\right)\right)\right)\\
\mathbf{if}\;x1 \leq -4.8 \cdot 10^{+91}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;x1 \leq -1.32 \cdot 10^{-36}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;x1 \leq -1.35 \cdot 10^{-167}:\\
\;\;\;\;x1 + x1 \cdot \left(x2 \cdot \left(-12 + \frac{-6}{x1}\right) - 2\right)\\
\mathbf{elif}\;x1 \leq 1.65 \cdot 10^{-254}:\\
\;\;\;\;x2 \cdot -6\\
\mathbf{elif}\;x1 \leq 6.7 \cdot 10^{-43}:\\
\;\;\;\;x1 + x1 \cdot \left(\frac{x2 \cdot -6}{x1} - 2\right)\\
\mathbf{elif}\;x1 \leq 2.35 \cdot 10^{+144}:\\
\;\;\;\;t\_0\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if x1 < -4.79999999999999966e91 or 2.3500000000000001e144 < x1 Initial program 1.4%
Taylor expanded in x1 around 0 0.0%
Taylor expanded in x1 around 0 58.3%
Taylor expanded in x2 around 0 90.5%
if -4.79999999999999966e91 < x1 < -1.31999999999999993e-36 or 6.6999999999999998e-43 < x1 < 2.3500000000000001e144Initial program 99.3%
Taylor expanded in x1 around 0 39.6%
Taylor expanded in x1 around inf 33.2%
if -1.31999999999999993e-36 < x1 < -1.35e-167Initial program 99.4%
Taylor expanded in x1 around 0 94.4%
Taylor expanded in x1 around 0 94.4%
*-commutative94.4%
fma-define94.5%
*-commutative94.5%
Simplified94.5%
Taylor expanded in x1 around inf 94.7%
Taylor expanded in x2 around 0 89.5%
mul-1-neg89.5%
distribute-rgt-neg-in89.5%
distribute-neg-in89.5%
metadata-eval89.5%
associate-*r/89.5%
metadata-eval89.5%
distribute-neg-frac89.5%
metadata-eval89.5%
Simplified89.5%
if -1.35e-167 < x1 < 1.65000000000000008e-254Initial program 99.5%
Taylor expanded in x1 around 0 89.2%
Taylor expanded in x1 around 0 91.3%
*-commutative91.3%
Simplified91.3%
Taylor expanded in x1 around 0 91.7%
*-commutative91.7%
Simplified91.7%
if 1.65000000000000008e-254 < x1 < 6.6999999999999998e-43Initial program 99.5%
Taylor expanded in x1 around 0 85.7%
Taylor expanded in x1 around 0 85.7%
*-commutative85.7%
fma-define85.7%
*-commutative85.7%
Simplified85.7%
Taylor expanded in x1 around inf 78.9%
Taylor expanded in x1 around 0 69.1%
associate-*r/69.2%
*-commutative69.2%
Simplified69.2%
Final simplification70.1%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (+ x1 (* x1 (- (* 4.0 (* x2 (- (* 2.0 x2) 3.0))) 2.0))))
(t_1 (+ x1 (+ x1 (* 3.0 (* x1 (+ (* x1 3.0) -1.0)))))))
(if (<= x1 -7.6e+91)
t_1
(if (<= x1 -1.25e-65)
t_0
(if (<= x1 -1.35e-167)
(+ x1 (* x1 (- (* x2 (+ -12.0 (/ -6.0 x1))) 2.0)))
(if (<= x1 4e-252)
(* x2 -6.0)
(if (<= x1 3.9e-69)
(+ x1 (* x1 (- (/ (* x2 -6.0) x1) 2.0)))
(if (<= x1 2.35e+144) t_0 t_1))))))))
double code(double x1, double x2) {
double t_0 = x1 + (x1 * ((4.0 * (x2 * ((2.0 * x2) - 3.0))) - 2.0));
double t_1 = x1 + (x1 + (3.0 * (x1 * ((x1 * 3.0) + -1.0))));
double tmp;
if (x1 <= -7.6e+91) {
tmp = t_1;
} else if (x1 <= -1.25e-65) {
tmp = t_0;
} else if (x1 <= -1.35e-167) {
tmp = x1 + (x1 * ((x2 * (-12.0 + (-6.0 / x1))) - 2.0));
} else if (x1 <= 4e-252) {
tmp = x2 * -6.0;
} else if (x1 <= 3.9e-69) {
tmp = x1 + (x1 * (((x2 * -6.0) / x1) - 2.0));
} else if (x1 <= 2.35e+144) {
tmp = t_0;
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
real(8) :: t_0
real(8) :: t_1
real(8) :: tmp
t_0 = x1 + (x1 * ((4.0d0 * (x2 * ((2.0d0 * x2) - 3.0d0))) - 2.0d0))
t_1 = x1 + (x1 + (3.0d0 * (x1 * ((x1 * 3.0d0) + (-1.0d0)))))
if (x1 <= (-7.6d+91)) then
tmp = t_1
else if (x1 <= (-1.25d-65)) then
tmp = t_0
else if (x1 <= (-1.35d-167)) then
tmp = x1 + (x1 * ((x2 * ((-12.0d0) + ((-6.0d0) / x1))) - 2.0d0))
else if (x1 <= 4d-252) then
tmp = x2 * (-6.0d0)
else if (x1 <= 3.9d-69) then
tmp = x1 + (x1 * (((x2 * (-6.0d0)) / x1) - 2.0d0))
else if (x1 <= 2.35d+144) then
tmp = t_0
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x1, double x2) {
double t_0 = x1 + (x1 * ((4.0 * (x2 * ((2.0 * x2) - 3.0))) - 2.0));
double t_1 = x1 + (x1 + (3.0 * (x1 * ((x1 * 3.0) + -1.0))));
double tmp;
if (x1 <= -7.6e+91) {
tmp = t_1;
} else if (x1 <= -1.25e-65) {
tmp = t_0;
} else if (x1 <= -1.35e-167) {
tmp = x1 + (x1 * ((x2 * (-12.0 + (-6.0 / x1))) - 2.0));
} else if (x1 <= 4e-252) {
tmp = x2 * -6.0;
} else if (x1 <= 3.9e-69) {
tmp = x1 + (x1 * (((x2 * -6.0) / x1) - 2.0));
} else if (x1 <= 2.35e+144) {
tmp = t_0;
} else {
tmp = t_1;
}
return tmp;
}
def code(x1, x2): t_0 = x1 + (x1 * ((4.0 * (x2 * ((2.0 * x2) - 3.0))) - 2.0)) t_1 = x1 + (x1 + (3.0 * (x1 * ((x1 * 3.0) + -1.0)))) tmp = 0 if x1 <= -7.6e+91: tmp = t_1 elif x1 <= -1.25e-65: tmp = t_0 elif x1 <= -1.35e-167: tmp = x1 + (x1 * ((x2 * (-12.0 + (-6.0 / x1))) - 2.0)) elif x1 <= 4e-252: tmp = x2 * -6.0 elif x1 <= 3.9e-69: tmp = x1 + (x1 * (((x2 * -6.0) / x1) - 2.0)) elif x1 <= 2.35e+144: tmp = t_0 else: tmp = t_1 return tmp
function code(x1, x2) t_0 = Float64(x1 + Float64(x1 * Float64(Float64(4.0 * Float64(x2 * Float64(Float64(2.0 * x2) - 3.0))) - 2.0))) t_1 = Float64(x1 + Float64(x1 + Float64(3.0 * Float64(x1 * Float64(Float64(x1 * 3.0) + -1.0))))) tmp = 0.0 if (x1 <= -7.6e+91) tmp = t_1; elseif (x1 <= -1.25e-65) tmp = t_0; elseif (x1 <= -1.35e-167) tmp = Float64(x1 + Float64(x1 * Float64(Float64(x2 * Float64(-12.0 + Float64(-6.0 / x1))) - 2.0))); elseif (x1 <= 4e-252) tmp = Float64(x2 * -6.0); elseif (x1 <= 3.9e-69) tmp = Float64(x1 + Float64(x1 * Float64(Float64(Float64(x2 * -6.0) / x1) - 2.0))); elseif (x1 <= 2.35e+144) tmp = t_0; else tmp = t_1; end return tmp end
function tmp_2 = code(x1, x2) t_0 = x1 + (x1 * ((4.0 * (x2 * ((2.0 * x2) - 3.0))) - 2.0)); t_1 = x1 + (x1 + (3.0 * (x1 * ((x1 * 3.0) + -1.0)))); tmp = 0.0; if (x1 <= -7.6e+91) tmp = t_1; elseif (x1 <= -1.25e-65) tmp = t_0; elseif (x1 <= -1.35e-167) tmp = x1 + (x1 * ((x2 * (-12.0 + (-6.0 / x1))) - 2.0)); elseif (x1 <= 4e-252) tmp = x2 * -6.0; elseif (x1 <= 3.9e-69) tmp = x1 + (x1 * (((x2 * -6.0) / x1) - 2.0)); elseif (x1 <= 2.35e+144) tmp = t_0; else tmp = t_1; end tmp_2 = tmp; end
code[x1_, x2_] := Block[{t$95$0 = N[(x1 + N[(x1 * N[(N[(4.0 * N[(x2 * N[(N[(2.0 * x2), $MachinePrecision] - 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(x1 + N[(x1 + N[(3.0 * N[(x1 * N[(N[(x1 * 3.0), $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x1, -7.6e+91], t$95$1, If[LessEqual[x1, -1.25e-65], t$95$0, If[LessEqual[x1, -1.35e-167], N[(x1 + N[(x1 * N[(N[(x2 * N[(-12.0 + N[(-6.0 / x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 4e-252], N[(x2 * -6.0), $MachinePrecision], If[LessEqual[x1, 3.9e-69], N[(x1 + N[(x1 * N[(N[(N[(x2 * -6.0), $MachinePrecision] / x1), $MachinePrecision] - 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 2.35e+144], t$95$0, t$95$1]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x1 + x1 \cdot \left(4 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right) - 2\right)\\
t_1 := x1 + \left(x1 + 3 \cdot \left(x1 \cdot \left(x1 \cdot 3 + -1\right)\right)\right)\\
\mathbf{if}\;x1 \leq -7.6 \cdot 10^{+91}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;x1 \leq -1.25 \cdot 10^{-65}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;x1 \leq -1.35 \cdot 10^{-167}:\\
\;\;\;\;x1 + x1 \cdot \left(x2 \cdot \left(-12 + \frac{-6}{x1}\right) - 2\right)\\
\mathbf{elif}\;x1 \leq 4 \cdot 10^{-252}:\\
\;\;\;\;x2 \cdot -6\\
\mathbf{elif}\;x1 \leq 3.9 \cdot 10^{-69}:\\
\;\;\;\;x1 + x1 \cdot \left(\frac{x2 \cdot -6}{x1} - 2\right)\\
\mathbf{elif}\;x1 \leq 2.35 \cdot 10^{+144}:\\
\;\;\;\;t\_0\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if x1 < -7.5999999999999995e91 or 2.3500000000000001e144 < x1 Initial program 1.4%
Taylor expanded in x1 around 0 0.0%
Taylor expanded in x1 around 0 58.3%
Taylor expanded in x2 around 0 90.5%
if -7.5999999999999995e91 < x1 < -1.24999999999999996e-65 or 3.89999999999999981e-69 < x1 < 2.3500000000000001e144Initial program 99.4%
Taylor expanded in x1 around 0 45.4%
Taylor expanded in x1 around 0 44.1%
*-commutative44.1%
fma-define44.1%
*-commutative44.1%
Simplified44.1%
Taylor expanded in x1 around inf 43.7%
if -1.24999999999999996e-65 < x1 < -1.35e-167Initial program 99.3%
Taylor expanded in x1 around 0 93.7%
Taylor expanded in x1 around 0 93.7%
*-commutative93.7%
fma-define93.8%
*-commutative93.8%
Simplified93.8%
Taylor expanded in x1 around inf 94.1%
Taylor expanded in x2 around 0 93.9%
mul-1-neg93.9%
distribute-rgt-neg-in93.9%
distribute-neg-in93.9%
metadata-eval93.9%
associate-*r/93.9%
metadata-eval93.9%
distribute-neg-frac93.9%
metadata-eval93.9%
Simplified93.9%
if -1.35e-167 < x1 < 3.99999999999999977e-252Initial program 99.5%
Taylor expanded in x1 around 0 89.2%
Taylor expanded in x1 around 0 91.3%
*-commutative91.3%
Simplified91.3%
Taylor expanded in x1 around 0 91.7%
*-commutative91.7%
Simplified91.7%
if 3.99999999999999977e-252 < x1 < 3.89999999999999981e-69Initial program 99.5%
Taylor expanded in x1 around 0 83.7%
Taylor expanded in x1 around 0 83.7%
*-commutative83.7%
fma-define83.7%
*-commutative83.7%
Simplified83.7%
Taylor expanded in x1 around inf 75.8%
Taylor expanded in x1 around 0 69.5%
associate-*r/69.5%
*-commutative69.5%
Simplified69.5%
Final simplification72.6%
(FPCore (x1 x2)
:precision binary64
(if (<= x1 -6e+91)
(+ x1 (+ x1 (* 3.0 (* x1 (+ (* x1 3.0) -1.0)))))
(if (<= x1 3.2e-130)
(+
x1
(+ x1 (+ (* x1 -3.0) (* x2 (- (+ (* x1 -12.0) (* 8.0 (* x1 x2))) 6.0)))))
(+
x1
(+
(*
x1
(-
(+
(* 4.0 (* x2 (- (* 2.0 x2) 3.0)))
(* x1 (+ (* x1 3.0) (* 3.0 (- 3.0 (* x2 -2.0))))))
2.0))
(* x2 -6.0))))))
double code(double x1, double x2) {
double tmp;
if (x1 <= -6e+91) {
tmp = x1 + (x1 + (3.0 * (x1 * ((x1 * 3.0) + -1.0))));
} else if (x1 <= 3.2e-130) {
tmp = x1 + (x1 + ((x1 * -3.0) + (x2 * (((x1 * -12.0) + (8.0 * (x1 * x2))) - 6.0))));
} else {
tmp = x1 + ((x1 * (((4.0 * (x2 * ((2.0 * x2) - 3.0))) + (x1 * ((x1 * 3.0) + (3.0 * (3.0 - (x2 * -2.0)))))) - 2.0)) + (x2 * -6.0));
}
return tmp;
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
real(8) :: tmp
if (x1 <= (-6d+91)) then
tmp = x1 + (x1 + (3.0d0 * (x1 * ((x1 * 3.0d0) + (-1.0d0)))))
else if (x1 <= 3.2d-130) then
tmp = x1 + (x1 + ((x1 * (-3.0d0)) + (x2 * (((x1 * (-12.0d0)) + (8.0d0 * (x1 * x2))) - 6.0d0))))
else
tmp = x1 + ((x1 * (((4.0d0 * (x2 * ((2.0d0 * x2) - 3.0d0))) + (x1 * ((x1 * 3.0d0) + (3.0d0 * (3.0d0 - (x2 * (-2.0d0))))))) - 2.0d0)) + (x2 * (-6.0d0)))
end if
code = tmp
end function
public static double code(double x1, double x2) {
double tmp;
if (x1 <= -6e+91) {
tmp = x1 + (x1 + (3.0 * (x1 * ((x1 * 3.0) + -1.0))));
} else if (x1 <= 3.2e-130) {
tmp = x1 + (x1 + ((x1 * -3.0) + (x2 * (((x1 * -12.0) + (8.0 * (x1 * x2))) - 6.0))));
} else {
tmp = x1 + ((x1 * (((4.0 * (x2 * ((2.0 * x2) - 3.0))) + (x1 * ((x1 * 3.0) + (3.0 * (3.0 - (x2 * -2.0)))))) - 2.0)) + (x2 * -6.0));
}
return tmp;
}
def code(x1, x2): tmp = 0 if x1 <= -6e+91: tmp = x1 + (x1 + (3.0 * (x1 * ((x1 * 3.0) + -1.0)))) elif x1 <= 3.2e-130: tmp = x1 + (x1 + ((x1 * -3.0) + (x2 * (((x1 * -12.0) + (8.0 * (x1 * x2))) - 6.0)))) else: tmp = x1 + ((x1 * (((4.0 * (x2 * ((2.0 * x2) - 3.0))) + (x1 * ((x1 * 3.0) + (3.0 * (3.0 - (x2 * -2.0)))))) - 2.0)) + (x2 * -6.0)) return tmp
function code(x1, x2) tmp = 0.0 if (x1 <= -6e+91) tmp = Float64(x1 + Float64(x1 + Float64(3.0 * Float64(x1 * Float64(Float64(x1 * 3.0) + -1.0))))); elseif (x1 <= 3.2e-130) tmp = Float64(x1 + Float64(x1 + Float64(Float64(x1 * -3.0) + Float64(x2 * Float64(Float64(Float64(x1 * -12.0) + Float64(8.0 * Float64(x1 * x2))) - 6.0))))); else tmp = Float64(x1 + Float64(Float64(x1 * Float64(Float64(Float64(4.0 * Float64(x2 * Float64(Float64(2.0 * x2) - 3.0))) + Float64(x1 * Float64(Float64(x1 * 3.0) + Float64(3.0 * Float64(3.0 - Float64(x2 * -2.0)))))) - 2.0)) + Float64(x2 * -6.0))); end return tmp end
function tmp_2 = code(x1, x2) tmp = 0.0; if (x1 <= -6e+91) tmp = x1 + (x1 + (3.0 * (x1 * ((x1 * 3.0) + -1.0)))); elseif (x1 <= 3.2e-130) tmp = x1 + (x1 + ((x1 * -3.0) + (x2 * (((x1 * -12.0) + (8.0 * (x1 * x2))) - 6.0)))); else tmp = x1 + ((x1 * (((4.0 * (x2 * ((2.0 * x2) - 3.0))) + (x1 * ((x1 * 3.0) + (3.0 * (3.0 - (x2 * -2.0)))))) - 2.0)) + (x2 * -6.0)); end tmp_2 = tmp; end
code[x1_, x2_] := If[LessEqual[x1, -6e+91], N[(x1 + N[(x1 + N[(3.0 * N[(x1 * N[(N[(x1 * 3.0), $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 3.2e-130], N[(x1 + N[(x1 + N[(N[(x1 * -3.0), $MachinePrecision] + N[(x2 * N[(N[(N[(x1 * -12.0), $MachinePrecision] + N[(8.0 * N[(x1 * x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x1 + N[(N[(x1 * N[(N[(N[(4.0 * N[(x2 * N[(N[(2.0 * x2), $MachinePrecision] - 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(x1 * N[(N[(x1 * 3.0), $MachinePrecision] + N[(3.0 * N[(3.0 - N[(x2 * -2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - 2.0), $MachinePrecision]), $MachinePrecision] + N[(x2 * -6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x1 \leq -6 \cdot 10^{+91}:\\
\;\;\;\;x1 + \left(x1 + 3 \cdot \left(x1 \cdot \left(x1 \cdot 3 + -1\right)\right)\right)\\
\mathbf{elif}\;x1 \leq 3.2 \cdot 10^{-130}:\\
\;\;\;\;x1 + \left(x1 + \left(x1 \cdot -3 + x2 \cdot \left(\left(x1 \cdot -12 + 8 \cdot \left(x1 \cdot x2\right)\right) - 6\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x1 + \left(x1 \cdot \left(\left(4 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right) + x1 \cdot \left(x1 \cdot 3 + 3 \cdot \left(3 - x2 \cdot -2\right)\right)\right) - 2\right) + x2 \cdot -6\right)\\
\end{array}
\end{array}
if x1 < -6.00000000000000012e91Initial program 2.9%
Taylor expanded in x1 around 0 0.0%
Taylor expanded in x1 around 0 49.2%
Taylor expanded in x2 around 0 84.0%
if -6.00000000000000012e91 < x1 < 3.2e-130Initial program 99.5%
Taylor expanded in x1 around 0 77.6%
Taylor expanded in x1 around 0 77.6%
*-commutative77.6%
fma-define77.6%
*-commutative77.6%
Simplified77.6%
Taylor expanded in x2 around 0 87.5%
if 3.2e-130 < x1 Initial program 64.5%
Taylor expanded in x1 around 0 34.2%
Taylor expanded in x1 around 0 75.6%
Final simplification82.5%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0
(+
x1
(+ (* x1 (- (* 4.0 (* x2 (- (* 2.0 x2) 3.0))) 2.0)) (* x2 -6.0))))
(t_1 (+ x1 (+ x1 (* 3.0 (* x1 (+ (* x1 3.0) -1.0)))))))
(if (<= x1 -7.5e+91)
t_1
(if (<= x1 -1.45e-211)
t_0
(if (<= x1 7e-266)
(+ x1 (+ x1 (+ (* x1 -3.0) (* x2 (- (* x1 -12.0) 6.0)))))
(if (<= x1 2.35e+144) t_0 t_1))))))
double code(double x1, double x2) {
double t_0 = x1 + ((x1 * ((4.0 * (x2 * ((2.0 * x2) - 3.0))) - 2.0)) + (x2 * -6.0));
double t_1 = x1 + (x1 + (3.0 * (x1 * ((x1 * 3.0) + -1.0))));
double tmp;
if (x1 <= -7.5e+91) {
tmp = t_1;
} else if (x1 <= -1.45e-211) {
tmp = t_0;
} else if (x1 <= 7e-266) {
tmp = x1 + (x1 + ((x1 * -3.0) + (x2 * ((x1 * -12.0) - 6.0))));
} else if (x1 <= 2.35e+144) {
tmp = t_0;
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
real(8) :: t_0
real(8) :: t_1
real(8) :: tmp
t_0 = x1 + ((x1 * ((4.0d0 * (x2 * ((2.0d0 * x2) - 3.0d0))) - 2.0d0)) + (x2 * (-6.0d0)))
t_1 = x1 + (x1 + (3.0d0 * (x1 * ((x1 * 3.0d0) + (-1.0d0)))))
if (x1 <= (-7.5d+91)) then
tmp = t_1
else if (x1 <= (-1.45d-211)) then
tmp = t_0
else if (x1 <= 7d-266) then
tmp = x1 + (x1 + ((x1 * (-3.0d0)) + (x2 * ((x1 * (-12.0d0)) - 6.0d0))))
else if (x1 <= 2.35d+144) then
tmp = t_0
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x1, double x2) {
double t_0 = x1 + ((x1 * ((4.0 * (x2 * ((2.0 * x2) - 3.0))) - 2.0)) + (x2 * -6.0));
double t_1 = x1 + (x1 + (3.0 * (x1 * ((x1 * 3.0) + -1.0))));
double tmp;
if (x1 <= -7.5e+91) {
tmp = t_1;
} else if (x1 <= -1.45e-211) {
tmp = t_0;
} else if (x1 <= 7e-266) {
tmp = x1 + (x1 + ((x1 * -3.0) + (x2 * ((x1 * -12.0) - 6.0))));
} else if (x1 <= 2.35e+144) {
tmp = t_0;
} else {
tmp = t_1;
}
return tmp;
}
def code(x1, x2): t_0 = x1 + ((x1 * ((4.0 * (x2 * ((2.0 * x2) - 3.0))) - 2.0)) + (x2 * -6.0)) t_1 = x1 + (x1 + (3.0 * (x1 * ((x1 * 3.0) + -1.0)))) tmp = 0 if x1 <= -7.5e+91: tmp = t_1 elif x1 <= -1.45e-211: tmp = t_0 elif x1 <= 7e-266: tmp = x1 + (x1 + ((x1 * -3.0) + (x2 * ((x1 * -12.0) - 6.0)))) elif x1 <= 2.35e+144: tmp = t_0 else: tmp = t_1 return tmp
function code(x1, x2) t_0 = Float64(x1 + Float64(Float64(x1 * Float64(Float64(4.0 * Float64(x2 * Float64(Float64(2.0 * x2) - 3.0))) - 2.0)) + Float64(x2 * -6.0))) t_1 = Float64(x1 + Float64(x1 + Float64(3.0 * Float64(x1 * Float64(Float64(x1 * 3.0) + -1.0))))) tmp = 0.0 if (x1 <= -7.5e+91) tmp = t_1; elseif (x1 <= -1.45e-211) tmp = t_0; elseif (x1 <= 7e-266) tmp = Float64(x1 + Float64(x1 + Float64(Float64(x1 * -3.0) + Float64(x2 * Float64(Float64(x1 * -12.0) - 6.0))))); elseif (x1 <= 2.35e+144) tmp = t_0; else tmp = t_1; end return tmp end
function tmp_2 = code(x1, x2) t_0 = x1 + ((x1 * ((4.0 * (x2 * ((2.0 * x2) - 3.0))) - 2.0)) + (x2 * -6.0)); t_1 = x1 + (x1 + (3.0 * (x1 * ((x1 * 3.0) + -1.0)))); tmp = 0.0; if (x1 <= -7.5e+91) tmp = t_1; elseif (x1 <= -1.45e-211) tmp = t_0; elseif (x1 <= 7e-266) tmp = x1 + (x1 + ((x1 * -3.0) + (x2 * ((x1 * -12.0) - 6.0)))); elseif (x1 <= 2.35e+144) tmp = t_0; else tmp = t_1; end tmp_2 = tmp; end
code[x1_, x2_] := Block[{t$95$0 = N[(x1 + N[(N[(x1 * N[(N[(4.0 * N[(x2 * N[(N[(2.0 * x2), $MachinePrecision] - 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - 2.0), $MachinePrecision]), $MachinePrecision] + N[(x2 * -6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(x1 + N[(x1 + N[(3.0 * N[(x1 * N[(N[(x1 * 3.0), $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x1, -7.5e+91], t$95$1, If[LessEqual[x1, -1.45e-211], t$95$0, If[LessEqual[x1, 7e-266], N[(x1 + N[(x1 + N[(N[(x1 * -3.0), $MachinePrecision] + N[(x2 * N[(N[(x1 * -12.0), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 2.35e+144], t$95$0, t$95$1]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x1 + \left(x1 \cdot \left(4 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right) - 2\right) + x2 \cdot -6\right)\\
t_1 := x1 + \left(x1 + 3 \cdot \left(x1 \cdot \left(x1 \cdot 3 + -1\right)\right)\right)\\
\mathbf{if}\;x1 \leq -7.5 \cdot 10^{+91}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;x1 \leq -1.45 \cdot 10^{-211}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;x1 \leq 7 \cdot 10^{-266}:\\
\;\;\;\;x1 + \left(x1 + \left(x1 \cdot -3 + x2 \cdot \left(x1 \cdot -12 - 6\right)\right)\right)\\
\mathbf{elif}\;x1 \leq 2.35 \cdot 10^{+144}:\\
\;\;\;\;t\_0\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if x1 < -7.50000000000000033e91 or 2.3500000000000001e144 < x1 Initial program 1.4%
Taylor expanded in x1 around 0 0.0%
Taylor expanded in x1 around 0 58.3%
Taylor expanded in x2 around 0 90.5%
if -7.50000000000000033e91 < x1 < -1.45000000000000007e-211 or 7.00000000000000058e-266 < x1 < 2.3500000000000001e144Initial program 99.4%
Taylor expanded in x1 around 0 65.6%
Taylor expanded in x1 around 0 65.1%
if -1.45000000000000007e-211 < x1 < 7.00000000000000058e-266Initial program 99.6%
Taylor expanded in x1 around 0 85.3%
Taylor expanded in x1 around 0 85.3%
*-commutative85.3%
fma-define85.4%
*-commutative85.4%
Simplified85.4%
Taylor expanded in x2 around 0 98.6%
Final simplification76.4%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (+ x1 (+ x1 (* 3.0 (* x1 (+ (* x1 3.0) -1.0)))))))
(if (<= x1 -7e+91)
t_0
(if (<= x1 -1.35e-167)
(+ x1 (* x1 (- (* x2 (+ -12.0 (/ -6.0 x1))) 2.0)))
(if (<= x1 4e-252)
(* x2 -6.0)
(if (<= x1 4.3e-5)
(+ x1 (* x1 (- (/ (* x2 -6.0) x1) 2.0)))
(if (<= x1 1.05e+134) (* x2 (- (/ x1 x2) 6.0)) t_0)))))))
double code(double x1, double x2) {
double t_0 = x1 + (x1 + (3.0 * (x1 * ((x1 * 3.0) + -1.0))));
double tmp;
if (x1 <= -7e+91) {
tmp = t_0;
} else if (x1 <= -1.35e-167) {
tmp = x1 + (x1 * ((x2 * (-12.0 + (-6.0 / x1))) - 2.0));
} else if (x1 <= 4e-252) {
tmp = x2 * -6.0;
} else if (x1 <= 4.3e-5) {
tmp = x1 + (x1 * (((x2 * -6.0) / x1) - 2.0));
} else if (x1 <= 1.05e+134) {
tmp = x2 * ((x1 / x2) - 6.0);
} else {
tmp = t_0;
}
return tmp;
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
real(8) :: t_0
real(8) :: tmp
t_0 = x1 + (x1 + (3.0d0 * (x1 * ((x1 * 3.0d0) + (-1.0d0)))))
if (x1 <= (-7d+91)) then
tmp = t_0
else if (x1 <= (-1.35d-167)) then
tmp = x1 + (x1 * ((x2 * ((-12.0d0) + ((-6.0d0) / x1))) - 2.0d0))
else if (x1 <= 4d-252) then
tmp = x2 * (-6.0d0)
else if (x1 <= 4.3d-5) then
tmp = x1 + (x1 * (((x2 * (-6.0d0)) / x1) - 2.0d0))
else if (x1 <= 1.05d+134) then
tmp = x2 * ((x1 / x2) - 6.0d0)
else
tmp = t_0
end if
code = tmp
end function
public static double code(double x1, double x2) {
double t_0 = x1 + (x1 + (3.0 * (x1 * ((x1 * 3.0) + -1.0))));
double tmp;
if (x1 <= -7e+91) {
tmp = t_0;
} else if (x1 <= -1.35e-167) {
tmp = x1 + (x1 * ((x2 * (-12.0 + (-6.0 / x1))) - 2.0));
} else if (x1 <= 4e-252) {
tmp = x2 * -6.0;
} else if (x1 <= 4.3e-5) {
tmp = x1 + (x1 * (((x2 * -6.0) / x1) - 2.0));
} else if (x1 <= 1.05e+134) {
tmp = x2 * ((x1 / x2) - 6.0);
} else {
tmp = t_0;
}
return tmp;
}
def code(x1, x2): t_0 = x1 + (x1 + (3.0 * (x1 * ((x1 * 3.0) + -1.0)))) tmp = 0 if x1 <= -7e+91: tmp = t_0 elif x1 <= -1.35e-167: tmp = x1 + (x1 * ((x2 * (-12.0 + (-6.0 / x1))) - 2.0)) elif x1 <= 4e-252: tmp = x2 * -6.0 elif x1 <= 4.3e-5: tmp = x1 + (x1 * (((x2 * -6.0) / x1) - 2.0)) elif x1 <= 1.05e+134: tmp = x2 * ((x1 / x2) - 6.0) else: tmp = t_0 return tmp
function code(x1, x2) t_0 = Float64(x1 + Float64(x1 + Float64(3.0 * Float64(x1 * Float64(Float64(x1 * 3.0) + -1.0))))) tmp = 0.0 if (x1 <= -7e+91) tmp = t_0; elseif (x1 <= -1.35e-167) tmp = Float64(x1 + Float64(x1 * Float64(Float64(x2 * Float64(-12.0 + Float64(-6.0 / x1))) - 2.0))); elseif (x1 <= 4e-252) tmp = Float64(x2 * -6.0); elseif (x1 <= 4.3e-5) tmp = Float64(x1 + Float64(x1 * Float64(Float64(Float64(x2 * -6.0) / x1) - 2.0))); elseif (x1 <= 1.05e+134) tmp = Float64(x2 * Float64(Float64(x1 / x2) - 6.0)); else tmp = t_0; end return tmp end
function tmp_2 = code(x1, x2) t_0 = x1 + (x1 + (3.0 * (x1 * ((x1 * 3.0) + -1.0)))); tmp = 0.0; if (x1 <= -7e+91) tmp = t_0; elseif (x1 <= -1.35e-167) tmp = x1 + (x1 * ((x2 * (-12.0 + (-6.0 / x1))) - 2.0)); elseif (x1 <= 4e-252) tmp = x2 * -6.0; elseif (x1 <= 4.3e-5) tmp = x1 + (x1 * (((x2 * -6.0) / x1) - 2.0)); elseif (x1 <= 1.05e+134) tmp = x2 * ((x1 / x2) - 6.0); else tmp = t_0; end tmp_2 = tmp; end
code[x1_, x2_] := Block[{t$95$0 = N[(x1 + N[(x1 + N[(3.0 * N[(x1 * N[(N[(x1 * 3.0), $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x1, -7e+91], t$95$0, If[LessEqual[x1, -1.35e-167], N[(x1 + N[(x1 * N[(N[(x2 * N[(-12.0 + N[(-6.0 / x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 4e-252], N[(x2 * -6.0), $MachinePrecision], If[LessEqual[x1, 4.3e-5], N[(x1 + N[(x1 * N[(N[(N[(x2 * -6.0), $MachinePrecision] / x1), $MachinePrecision] - 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 1.05e+134], N[(x2 * N[(N[(x1 / x2), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision], t$95$0]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x1 + \left(x1 + 3 \cdot \left(x1 \cdot \left(x1 \cdot 3 + -1\right)\right)\right)\\
\mathbf{if}\;x1 \leq -7 \cdot 10^{+91}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;x1 \leq -1.35 \cdot 10^{-167}:\\
\;\;\;\;x1 + x1 \cdot \left(x2 \cdot \left(-12 + \frac{-6}{x1}\right) - 2\right)\\
\mathbf{elif}\;x1 \leq 4 \cdot 10^{-252}:\\
\;\;\;\;x2 \cdot -6\\
\mathbf{elif}\;x1 \leq 4.3 \cdot 10^{-5}:\\
\;\;\;\;x1 + x1 \cdot \left(\frac{x2 \cdot -6}{x1} - 2\right)\\
\mathbf{elif}\;x1 \leq 1.05 \cdot 10^{+134}:\\
\;\;\;\;x2 \cdot \left(\frac{x1}{x2} - 6\right)\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
if x1 < -7.00000000000000001e91 or 1.05e134 < x1 Initial program 4.2%
Taylor expanded in x1 around 0 1.5%
Taylor expanded in x1 around 0 58.2%
Taylor expanded in x2 around 0 88.1%
if -7.00000000000000001e91 < x1 < -1.35e-167Initial program 99.3%
Taylor expanded in x1 around 0 66.5%
Taylor expanded in x1 around 0 66.3%
*-commutative66.3%
fma-define66.4%
*-commutative66.4%
Simplified66.4%
Taylor expanded in x1 around inf 66.4%
Taylor expanded in x2 around 0 46.0%
mul-1-neg46.0%
distribute-rgt-neg-in46.0%
distribute-neg-in46.0%
metadata-eval46.0%
associate-*r/46.0%
metadata-eval46.0%
distribute-neg-frac46.0%
metadata-eval46.0%
Simplified46.0%
if -1.35e-167 < x1 < 3.99999999999999977e-252Initial program 99.5%
Taylor expanded in x1 around 0 89.2%
Taylor expanded in x1 around 0 91.3%
*-commutative91.3%
Simplified91.3%
Taylor expanded in x1 around 0 91.7%
*-commutative91.7%
Simplified91.7%
if 3.99999999999999977e-252 < x1 < 4.3000000000000002e-5Initial program 99.4%
Taylor expanded in x1 around 0 86.5%
Taylor expanded in x1 around 0 86.4%
*-commutative86.4%
fma-define86.4%
*-commutative86.4%
Simplified86.4%
Taylor expanded in x1 around inf 80.1%
Taylor expanded in x1 around 0 66.9%
associate-*r/66.9%
*-commutative66.9%
Simplified66.9%
if 4.3000000000000002e-5 < x1 < 1.05e134Initial program 99.4%
Taylor expanded in x1 around 0 28.2%
Taylor expanded in x1 around 0 4.5%
*-commutative4.5%
Simplified4.5%
Taylor expanded in x2 around inf 16.8%
Final simplification65.6%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (+ x1 (* x1 (- (* x2 (- (- (* x2 8.0) 12.0) (/ 6.0 x1))) 2.0))))
(t_1 (+ x1 (+ x1 (* 3.0 (* x1 (+ (* x1 3.0) -1.0)))))))
(if (<= x1 -6.4e+91)
t_1
(if (<= x1 -1.22e-166)
t_0
(if (<= x1 4e-252)
(+ x1 (+ x1 (+ (* x1 -3.0) (* x2 (- (* x1 -12.0) 6.0)))))
(if (<= x1 2.35e+144) t_0 t_1))))))
double code(double x1, double x2) {
double t_0 = x1 + (x1 * ((x2 * (((x2 * 8.0) - 12.0) - (6.0 / x1))) - 2.0));
double t_1 = x1 + (x1 + (3.0 * (x1 * ((x1 * 3.0) + -1.0))));
double tmp;
if (x1 <= -6.4e+91) {
tmp = t_1;
} else if (x1 <= -1.22e-166) {
tmp = t_0;
} else if (x1 <= 4e-252) {
tmp = x1 + (x1 + ((x1 * -3.0) + (x2 * ((x1 * -12.0) - 6.0))));
} else if (x1 <= 2.35e+144) {
tmp = t_0;
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
real(8) :: t_0
real(8) :: t_1
real(8) :: tmp
t_0 = x1 + (x1 * ((x2 * (((x2 * 8.0d0) - 12.0d0) - (6.0d0 / x1))) - 2.0d0))
t_1 = x1 + (x1 + (3.0d0 * (x1 * ((x1 * 3.0d0) + (-1.0d0)))))
if (x1 <= (-6.4d+91)) then
tmp = t_1
else if (x1 <= (-1.22d-166)) then
tmp = t_0
else if (x1 <= 4d-252) then
tmp = x1 + (x1 + ((x1 * (-3.0d0)) + (x2 * ((x1 * (-12.0d0)) - 6.0d0))))
else if (x1 <= 2.35d+144) then
tmp = t_0
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x1, double x2) {
double t_0 = x1 + (x1 * ((x2 * (((x2 * 8.0) - 12.0) - (6.0 / x1))) - 2.0));
double t_1 = x1 + (x1 + (3.0 * (x1 * ((x1 * 3.0) + -1.0))));
double tmp;
if (x1 <= -6.4e+91) {
tmp = t_1;
} else if (x1 <= -1.22e-166) {
tmp = t_0;
} else if (x1 <= 4e-252) {
tmp = x1 + (x1 + ((x1 * -3.0) + (x2 * ((x1 * -12.0) - 6.0))));
} else if (x1 <= 2.35e+144) {
tmp = t_0;
} else {
tmp = t_1;
}
return tmp;
}
def code(x1, x2): t_0 = x1 + (x1 * ((x2 * (((x2 * 8.0) - 12.0) - (6.0 / x1))) - 2.0)) t_1 = x1 + (x1 + (3.0 * (x1 * ((x1 * 3.0) + -1.0)))) tmp = 0 if x1 <= -6.4e+91: tmp = t_1 elif x1 <= -1.22e-166: tmp = t_0 elif x1 <= 4e-252: tmp = x1 + (x1 + ((x1 * -3.0) + (x2 * ((x1 * -12.0) - 6.0)))) elif x1 <= 2.35e+144: tmp = t_0 else: tmp = t_1 return tmp
function code(x1, x2) t_0 = Float64(x1 + Float64(x1 * Float64(Float64(x2 * Float64(Float64(Float64(x2 * 8.0) - 12.0) - Float64(6.0 / x1))) - 2.0))) t_1 = Float64(x1 + Float64(x1 + Float64(3.0 * Float64(x1 * Float64(Float64(x1 * 3.0) + -1.0))))) tmp = 0.0 if (x1 <= -6.4e+91) tmp = t_1; elseif (x1 <= -1.22e-166) tmp = t_0; elseif (x1 <= 4e-252) tmp = Float64(x1 + Float64(x1 + Float64(Float64(x1 * -3.0) + Float64(x2 * Float64(Float64(x1 * -12.0) - 6.0))))); elseif (x1 <= 2.35e+144) tmp = t_0; else tmp = t_1; end return tmp end
function tmp_2 = code(x1, x2) t_0 = x1 + (x1 * ((x2 * (((x2 * 8.0) - 12.0) - (6.0 / x1))) - 2.0)); t_1 = x1 + (x1 + (3.0 * (x1 * ((x1 * 3.0) + -1.0)))); tmp = 0.0; if (x1 <= -6.4e+91) tmp = t_1; elseif (x1 <= -1.22e-166) tmp = t_0; elseif (x1 <= 4e-252) tmp = x1 + (x1 + ((x1 * -3.0) + (x2 * ((x1 * -12.0) - 6.0)))); elseif (x1 <= 2.35e+144) tmp = t_0; else tmp = t_1; end tmp_2 = tmp; end
code[x1_, x2_] := Block[{t$95$0 = N[(x1 + N[(x1 * N[(N[(x2 * N[(N[(N[(x2 * 8.0), $MachinePrecision] - 12.0), $MachinePrecision] - N[(6.0 / x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(x1 + N[(x1 + N[(3.0 * N[(x1 * N[(N[(x1 * 3.0), $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x1, -6.4e+91], t$95$1, If[LessEqual[x1, -1.22e-166], t$95$0, If[LessEqual[x1, 4e-252], N[(x1 + N[(x1 + N[(N[(x1 * -3.0), $MachinePrecision] + N[(x2 * N[(N[(x1 * -12.0), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 2.35e+144], t$95$0, t$95$1]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x1 + x1 \cdot \left(x2 \cdot \left(\left(x2 \cdot 8 - 12\right) - \frac{6}{x1}\right) - 2\right)\\
t_1 := x1 + \left(x1 + 3 \cdot \left(x1 \cdot \left(x1 \cdot 3 + -1\right)\right)\right)\\
\mathbf{if}\;x1 \leq -6.4 \cdot 10^{+91}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;x1 \leq -1.22 \cdot 10^{-166}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;x1 \leq 4 \cdot 10^{-252}:\\
\;\;\;\;x1 + \left(x1 + \left(x1 \cdot -3 + x2 \cdot \left(x1 \cdot -12 - 6\right)\right)\right)\\
\mathbf{elif}\;x1 \leq 2.35 \cdot 10^{+144}:\\
\;\;\;\;t\_0\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if x1 < -6.39999999999999979e91 or 2.3500000000000001e144 < x1 Initial program 1.4%
Taylor expanded in x1 around 0 0.0%
Taylor expanded in x1 around 0 58.3%
Taylor expanded in x2 around 0 90.5%
if -6.39999999999999979e91 < x1 < -1.22e-166 or 3.99999999999999977e-252 < x1 < 2.3500000000000001e144Initial program 99.4%
Taylor expanded in x1 around 0 62.5%
Taylor expanded in x1 around 0 61.8%
*-commutative61.8%
fma-define61.8%
*-commutative61.8%
Simplified61.8%
Taylor expanded in x1 around inf 59.5%
Taylor expanded in x2 around 0 60.6%
associate--r+60.6%
*-commutative60.6%
associate-*r/60.6%
metadata-eval60.6%
Simplified60.6%
if -1.22e-166 < x1 < 3.99999999999999977e-252Initial program 99.5%
Taylor expanded in x1 around 0 89.2%
Taylor expanded in x1 around 0 89.2%
*-commutative89.2%
fma-define89.3%
*-commutative89.3%
Simplified89.3%
Taylor expanded in x2 around 0 98.8%
Final simplification75.6%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (+ x1 (* x1 (- (* 4.0 (* x2 (- (* 2.0 x2) 3.0))) 2.0))))
(t_1 (+ x1 (+ x1 (* 3.0 (* x1 (+ (* x1 3.0) -1.0)))))))
(if (<= x1 -6.2e+91)
t_1
(if (<= x1 -2.6e-75)
t_0
(if (<= x1 1.5e-124)
(+ x1 (+ x1 (+ (* x1 -3.0) (* x2 (- (* x1 -12.0) 6.0)))))
(if (<= x1 2.35e+144) t_0 t_1))))))
double code(double x1, double x2) {
double t_0 = x1 + (x1 * ((4.0 * (x2 * ((2.0 * x2) - 3.0))) - 2.0));
double t_1 = x1 + (x1 + (3.0 * (x1 * ((x1 * 3.0) + -1.0))));
double tmp;
if (x1 <= -6.2e+91) {
tmp = t_1;
} else if (x1 <= -2.6e-75) {
tmp = t_0;
} else if (x1 <= 1.5e-124) {
tmp = x1 + (x1 + ((x1 * -3.0) + (x2 * ((x1 * -12.0) - 6.0))));
} else if (x1 <= 2.35e+144) {
tmp = t_0;
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
real(8) :: t_0
real(8) :: t_1
real(8) :: tmp
t_0 = x1 + (x1 * ((4.0d0 * (x2 * ((2.0d0 * x2) - 3.0d0))) - 2.0d0))
t_1 = x1 + (x1 + (3.0d0 * (x1 * ((x1 * 3.0d0) + (-1.0d0)))))
if (x1 <= (-6.2d+91)) then
tmp = t_1
else if (x1 <= (-2.6d-75)) then
tmp = t_0
else if (x1 <= 1.5d-124) then
tmp = x1 + (x1 + ((x1 * (-3.0d0)) + (x2 * ((x1 * (-12.0d0)) - 6.0d0))))
else if (x1 <= 2.35d+144) then
tmp = t_0
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x1, double x2) {
double t_0 = x1 + (x1 * ((4.0 * (x2 * ((2.0 * x2) - 3.0))) - 2.0));
double t_1 = x1 + (x1 + (3.0 * (x1 * ((x1 * 3.0) + -1.0))));
double tmp;
if (x1 <= -6.2e+91) {
tmp = t_1;
} else if (x1 <= -2.6e-75) {
tmp = t_0;
} else if (x1 <= 1.5e-124) {
tmp = x1 + (x1 + ((x1 * -3.0) + (x2 * ((x1 * -12.0) - 6.0))));
} else if (x1 <= 2.35e+144) {
tmp = t_0;
} else {
tmp = t_1;
}
return tmp;
}
def code(x1, x2): t_0 = x1 + (x1 * ((4.0 * (x2 * ((2.0 * x2) - 3.0))) - 2.0)) t_1 = x1 + (x1 + (3.0 * (x1 * ((x1 * 3.0) + -1.0)))) tmp = 0 if x1 <= -6.2e+91: tmp = t_1 elif x1 <= -2.6e-75: tmp = t_0 elif x1 <= 1.5e-124: tmp = x1 + (x1 + ((x1 * -3.0) + (x2 * ((x1 * -12.0) - 6.0)))) elif x1 <= 2.35e+144: tmp = t_0 else: tmp = t_1 return tmp
function code(x1, x2) t_0 = Float64(x1 + Float64(x1 * Float64(Float64(4.0 * Float64(x2 * Float64(Float64(2.0 * x2) - 3.0))) - 2.0))) t_1 = Float64(x1 + Float64(x1 + Float64(3.0 * Float64(x1 * Float64(Float64(x1 * 3.0) + -1.0))))) tmp = 0.0 if (x1 <= -6.2e+91) tmp = t_1; elseif (x1 <= -2.6e-75) tmp = t_0; elseif (x1 <= 1.5e-124) tmp = Float64(x1 + Float64(x1 + Float64(Float64(x1 * -3.0) + Float64(x2 * Float64(Float64(x1 * -12.0) - 6.0))))); elseif (x1 <= 2.35e+144) tmp = t_0; else tmp = t_1; end return tmp end
function tmp_2 = code(x1, x2) t_0 = x1 + (x1 * ((4.0 * (x2 * ((2.0 * x2) - 3.0))) - 2.0)); t_1 = x1 + (x1 + (3.0 * (x1 * ((x1 * 3.0) + -1.0)))); tmp = 0.0; if (x1 <= -6.2e+91) tmp = t_1; elseif (x1 <= -2.6e-75) tmp = t_0; elseif (x1 <= 1.5e-124) tmp = x1 + (x1 + ((x1 * -3.0) + (x2 * ((x1 * -12.0) - 6.0)))); elseif (x1 <= 2.35e+144) tmp = t_0; else tmp = t_1; end tmp_2 = tmp; end
code[x1_, x2_] := Block[{t$95$0 = N[(x1 + N[(x1 * N[(N[(4.0 * N[(x2 * N[(N[(2.0 * x2), $MachinePrecision] - 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(x1 + N[(x1 + N[(3.0 * N[(x1 * N[(N[(x1 * 3.0), $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x1, -6.2e+91], t$95$1, If[LessEqual[x1, -2.6e-75], t$95$0, If[LessEqual[x1, 1.5e-124], N[(x1 + N[(x1 + N[(N[(x1 * -3.0), $MachinePrecision] + N[(x2 * N[(N[(x1 * -12.0), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 2.35e+144], t$95$0, t$95$1]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x1 + x1 \cdot \left(4 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right) - 2\right)\\
t_1 := x1 + \left(x1 + 3 \cdot \left(x1 \cdot \left(x1 \cdot 3 + -1\right)\right)\right)\\
\mathbf{if}\;x1 \leq -6.2 \cdot 10^{+91}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;x1 \leq -2.6 \cdot 10^{-75}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;x1 \leq 1.5 \cdot 10^{-124}:\\
\;\;\;\;x1 + \left(x1 + \left(x1 \cdot -3 + x2 \cdot \left(x1 \cdot -12 - 6\right)\right)\right)\\
\mathbf{elif}\;x1 \leq 2.35 \cdot 10^{+144}:\\
\;\;\;\;t\_0\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if x1 < -6.19999999999999995e91 or 2.3500000000000001e144 < x1 Initial program 1.4%
Taylor expanded in x1 around 0 0.0%
Taylor expanded in x1 around 0 58.3%
Taylor expanded in x2 around 0 90.5%
if -6.19999999999999995e91 < x1 < -2.6e-75 or 1.5e-124 < x1 < 2.3500000000000001e144Initial program 99.3%
Taylor expanded in x1 around 0 50.7%
Taylor expanded in x1 around 0 49.6%
*-commutative49.6%
fma-define49.6%
*-commutative49.6%
Simplified49.6%
Taylor expanded in x1 around inf 47.1%
if -2.6e-75 < x1 < 1.5e-124Initial program 99.5%
Taylor expanded in x1 around 0 86.7%
Taylor expanded in x1 around 0 86.8%
*-commutative86.8%
fma-define86.8%
*-commutative86.8%
Simplified86.8%
Taylor expanded in x2 around 0 84.6%
Final simplification72.9%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (* 3.0 (* x1 (+ (* x1 3.0) -1.0)))))
(if (<= x1 -7.5e+91)
(+ x1 (+ x1 t_0))
(if (<= x1 5e-18)
(+
x1
(+
x1
(+ (* x1 -3.0) (* x2 (- (+ (* x1 -12.0) (* 8.0 (* x1 x2))) 6.0)))))
(+ x1 (+ t_0 (+ x1 (* 4.0 (* x1 (* x2 (- (* 2.0 x2) 3.0)))))))))))
double code(double x1, double x2) {
double t_0 = 3.0 * (x1 * ((x1 * 3.0) + -1.0));
double tmp;
if (x1 <= -7.5e+91) {
tmp = x1 + (x1 + t_0);
} else if (x1 <= 5e-18) {
tmp = x1 + (x1 + ((x1 * -3.0) + (x2 * (((x1 * -12.0) + (8.0 * (x1 * x2))) - 6.0))));
} else {
tmp = x1 + (t_0 + (x1 + (4.0 * (x1 * (x2 * ((2.0 * x2) - 3.0))))));
}
return tmp;
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
real(8) :: t_0
real(8) :: tmp
t_0 = 3.0d0 * (x1 * ((x1 * 3.0d0) + (-1.0d0)))
if (x1 <= (-7.5d+91)) then
tmp = x1 + (x1 + t_0)
else if (x1 <= 5d-18) then
tmp = x1 + (x1 + ((x1 * (-3.0d0)) + (x2 * (((x1 * (-12.0d0)) + (8.0d0 * (x1 * x2))) - 6.0d0))))
else
tmp = x1 + (t_0 + (x1 + (4.0d0 * (x1 * (x2 * ((2.0d0 * x2) - 3.0d0))))))
end if
code = tmp
end function
public static double code(double x1, double x2) {
double t_0 = 3.0 * (x1 * ((x1 * 3.0) + -1.0));
double tmp;
if (x1 <= -7.5e+91) {
tmp = x1 + (x1 + t_0);
} else if (x1 <= 5e-18) {
tmp = x1 + (x1 + ((x1 * -3.0) + (x2 * (((x1 * -12.0) + (8.0 * (x1 * x2))) - 6.0))));
} else {
tmp = x1 + (t_0 + (x1 + (4.0 * (x1 * (x2 * ((2.0 * x2) - 3.0))))));
}
return tmp;
}
def code(x1, x2): t_0 = 3.0 * (x1 * ((x1 * 3.0) + -1.0)) tmp = 0 if x1 <= -7.5e+91: tmp = x1 + (x1 + t_0) elif x1 <= 5e-18: tmp = x1 + (x1 + ((x1 * -3.0) + (x2 * (((x1 * -12.0) + (8.0 * (x1 * x2))) - 6.0)))) else: tmp = x1 + (t_0 + (x1 + (4.0 * (x1 * (x2 * ((2.0 * x2) - 3.0)))))) return tmp
function code(x1, x2) t_0 = Float64(3.0 * Float64(x1 * Float64(Float64(x1 * 3.0) + -1.0))) tmp = 0.0 if (x1 <= -7.5e+91) tmp = Float64(x1 + Float64(x1 + t_0)); elseif (x1 <= 5e-18) tmp = Float64(x1 + Float64(x1 + Float64(Float64(x1 * -3.0) + Float64(x2 * Float64(Float64(Float64(x1 * -12.0) + Float64(8.0 * Float64(x1 * x2))) - 6.0))))); else tmp = Float64(x1 + Float64(t_0 + Float64(x1 + Float64(4.0 * Float64(x1 * Float64(x2 * Float64(Float64(2.0 * x2) - 3.0))))))); end return tmp end
function tmp_2 = code(x1, x2) t_0 = 3.0 * (x1 * ((x1 * 3.0) + -1.0)); tmp = 0.0; if (x1 <= -7.5e+91) tmp = x1 + (x1 + t_0); elseif (x1 <= 5e-18) tmp = x1 + (x1 + ((x1 * -3.0) + (x2 * (((x1 * -12.0) + (8.0 * (x1 * x2))) - 6.0)))); else tmp = x1 + (t_0 + (x1 + (4.0 * (x1 * (x2 * ((2.0 * x2) - 3.0)))))); end tmp_2 = tmp; end
code[x1_, x2_] := Block[{t$95$0 = N[(3.0 * N[(x1 * N[(N[(x1 * 3.0), $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x1, -7.5e+91], N[(x1 + N[(x1 + t$95$0), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 5e-18], N[(x1 + N[(x1 + N[(N[(x1 * -3.0), $MachinePrecision] + N[(x2 * N[(N[(N[(x1 * -12.0), $MachinePrecision] + N[(8.0 * N[(x1 * x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x1 + N[(t$95$0 + N[(x1 + N[(4.0 * N[(x1 * N[(x2 * N[(N[(2.0 * x2), $MachinePrecision] - 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := 3 \cdot \left(x1 \cdot \left(x1 \cdot 3 + -1\right)\right)\\
\mathbf{if}\;x1 \leq -7.5 \cdot 10^{+91}:\\
\;\;\;\;x1 + \left(x1 + t\_0\right)\\
\mathbf{elif}\;x1 \leq 5 \cdot 10^{-18}:\\
\;\;\;\;x1 + \left(x1 + \left(x1 \cdot -3 + x2 \cdot \left(\left(x1 \cdot -12 + 8 \cdot \left(x1 \cdot x2\right)\right) - 6\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x1 + \left(t\_0 + \left(x1 + 4 \cdot \left(x1 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right)\right)\right)\right)\\
\end{array}
\end{array}
if x1 < -7.50000000000000033e91Initial program 2.9%
Taylor expanded in x1 around 0 0.0%
Taylor expanded in x1 around 0 49.2%
Taylor expanded in x2 around 0 84.0%
if -7.50000000000000033e91 < x1 < 5.00000000000000036e-18Initial program 99.4%
Taylor expanded in x1 around 0 80.6%
Taylor expanded in x1 around 0 80.6%
*-commutative80.6%
fma-define80.6%
*-commutative80.6%
Simplified80.6%
Taylor expanded in x2 around 0 89.1%
if 5.00000000000000036e-18 < x1 Initial program 55.5%
Taylor expanded in x1 around 0 17.3%
Taylor expanded in x1 around 0 43.5%
Taylor expanded in x2 around 0 60.6%
Final simplification79.8%
(FPCore (x1 x2)
:precision binary64
(if (or (<= x1 -5.6e+91) (not (<= x1 2.3e+144)))
(+ x1 (+ x1 (* 3.0 (* x1 (+ (* x1 3.0) -1.0)))))
(+
x1
(+ x1 (+ (* x1 -3.0) (* x2 (- (+ (* x1 -12.0) (* 8.0 (* x1 x2))) 6.0)))))))
double code(double x1, double x2) {
double tmp;
if ((x1 <= -5.6e+91) || !(x1 <= 2.3e+144)) {
tmp = x1 + (x1 + (3.0 * (x1 * ((x1 * 3.0) + -1.0))));
} else {
tmp = x1 + (x1 + ((x1 * -3.0) + (x2 * (((x1 * -12.0) + (8.0 * (x1 * x2))) - 6.0))));
}
return tmp;
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
real(8) :: tmp
if ((x1 <= (-5.6d+91)) .or. (.not. (x1 <= 2.3d+144))) then
tmp = x1 + (x1 + (3.0d0 * (x1 * ((x1 * 3.0d0) + (-1.0d0)))))
else
tmp = x1 + (x1 + ((x1 * (-3.0d0)) + (x2 * (((x1 * (-12.0d0)) + (8.0d0 * (x1 * x2))) - 6.0d0))))
end if
code = tmp
end function
public static double code(double x1, double x2) {
double tmp;
if ((x1 <= -5.6e+91) || !(x1 <= 2.3e+144)) {
tmp = x1 + (x1 + (3.0 * (x1 * ((x1 * 3.0) + -1.0))));
} else {
tmp = x1 + (x1 + ((x1 * -3.0) + (x2 * (((x1 * -12.0) + (8.0 * (x1 * x2))) - 6.0))));
}
return tmp;
}
def code(x1, x2): tmp = 0 if (x1 <= -5.6e+91) or not (x1 <= 2.3e+144): tmp = x1 + (x1 + (3.0 * (x1 * ((x1 * 3.0) + -1.0)))) else: tmp = x1 + (x1 + ((x1 * -3.0) + (x2 * (((x1 * -12.0) + (8.0 * (x1 * x2))) - 6.0)))) return tmp
function code(x1, x2) tmp = 0.0 if ((x1 <= -5.6e+91) || !(x1 <= 2.3e+144)) tmp = Float64(x1 + Float64(x1 + Float64(3.0 * Float64(x1 * Float64(Float64(x1 * 3.0) + -1.0))))); else tmp = Float64(x1 + Float64(x1 + Float64(Float64(x1 * -3.0) + Float64(x2 * Float64(Float64(Float64(x1 * -12.0) + Float64(8.0 * Float64(x1 * x2))) - 6.0))))); end return tmp end
function tmp_2 = code(x1, x2) tmp = 0.0; if ((x1 <= -5.6e+91) || ~((x1 <= 2.3e+144))) tmp = x1 + (x1 + (3.0 * (x1 * ((x1 * 3.0) + -1.0)))); else tmp = x1 + (x1 + ((x1 * -3.0) + (x2 * (((x1 * -12.0) + (8.0 * (x1 * x2))) - 6.0)))); end tmp_2 = tmp; end
code[x1_, x2_] := If[Or[LessEqual[x1, -5.6e+91], N[Not[LessEqual[x1, 2.3e+144]], $MachinePrecision]], N[(x1 + N[(x1 + N[(3.0 * N[(x1 * N[(N[(x1 * 3.0), $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x1 + N[(x1 + N[(N[(x1 * -3.0), $MachinePrecision] + N[(x2 * N[(N[(N[(x1 * -12.0), $MachinePrecision] + N[(8.0 * N[(x1 * x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x1 \leq -5.6 \cdot 10^{+91} \lor \neg \left(x1 \leq 2.3 \cdot 10^{+144}\right):\\
\;\;\;\;x1 + \left(x1 + 3 \cdot \left(x1 \cdot \left(x1 \cdot 3 + -1\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x1 + \left(x1 + \left(x1 \cdot -3 + x2 \cdot \left(\left(x1 \cdot -12 + 8 \cdot \left(x1 \cdot x2\right)\right) - 6\right)\right)\right)\\
\end{array}
\end{array}
if x1 < -5.5999999999999997e91 or 2.3000000000000001e144 < x1 Initial program 1.4%
Taylor expanded in x1 around 0 0.0%
Taylor expanded in x1 around 0 58.3%
Taylor expanded in x2 around 0 90.5%
if -5.5999999999999997e91 < x1 < 2.3000000000000001e144Initial program 99.4%
Taylor expanded in x1 around 0 69.2%
Taylor expanded in x1 around 0 68.7%
*-commutative68.7%
fma-define68.7%
*-commutative68.7%
Simplified68.7%
Taylor expanded in x2 around 0 75.2%
Final simplification79.3%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (+ x1 (* x1 (- (* -6.0 (/ x2 x1)) 2.0)))))
(if (<= x1 -1.35e-167)
t_0
(if (<= x1 1.65e-254)
(* x2 -6.0)
(if (<= x1 4.3e-5) t_0 (* x2 (- (/ x1 x2) 6.0)))))))
double code(double x1, double x2) {
double t_0 = x1 + (x1 * ((-6.0 * (x2 / x1)) - 2.0));
double tmp;
if (x1 <= -1.35e-167) {
tmp = t_0;
} else if (x1 <= 1.65e-254) {
tmp = x2 * -6.0;
} else if (x1 <= 4.3e-5) {
tmp = t_0;
} else {
tmp = x2 * ((x1 / x2) - 6.0);
}
return tmp;
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
real(8) :: t_0
real(8) :: tmp
t_0 = x1 + (x1 * (((-6.0d0) * (x2 / x1)) - 2.0d0))
if (x1 <= (-1.35d-167)) then
tmp = t_0
else if (x1 <= 1.65d-254) then
tmp = x2 * (-6.0d0)
else if (x1 <= 4.3d-5) then
tmp = t_0
else
tmp = x2 * ((x1 / x2) - 6.0d0)
end if
code = tmp
end function
public static double code(double x1, double x2) {
double t_0 = x1 + (x1 * ((-6.0 * (x2 / x1)) - 2.0));
double tmp;
if (x1 <= -1.35e-167) {
tmp = t_0;
} else if (x1 <= 1.65e-254) {
tmp = x2 * -6.0;
} else if (x1 <= 4.3e-5) {
tmp = t_0;
} else {
tmp = x2 * ((x1 / x2) - 6.0);
}
return tmp;
}
def code(x1, x2): t_0 = x1 + (x1 * ((-6.0 * (x2 / x1)) - 2.0)) tmp = 0 if x1 <= -1.35e-167: tmp = t_0 elif x1 <= 1.65e-254: tmp = x2 * -6.0 elif x1 <= 4.3e-5: tmp = t_0 else: tmp = x2 * ((x1 / x2) - 6.0) return tmp
function code(x1, x2) t_0 = Float64(x1 + Float64(x1 * Float64(Float64(-6.0 * Float64(x2 / x1)) - 2.0))) tmp = 0.0 if (x1 <= -1.35e-167) tmp = t_0; elseif (x1 <= 1.65e-254) tmp = Float64(x2 * -6.0); elseif (x1 <= 4.3e-5) tmp = t_0; else tmp = Float64(x2 * Float64(Float64(x1 / x2) - 6.0)); end return tmp end
function tmp_2 = code(x1, x2) t_0 = x1 + (x1 * ((-6.0 * (x2 / x1)) - 2.0)); tmp = 0.0; if (x1 <= -1.35e-167) tmp = t_0; elseif (x1 <= 1.65e-254) tmp = x2 * -6.0; elseif (x1 <= 4.3e-5) tmp = t_0; else tmp = x2 * ((x1 / x2) - 6.0); end tmp_2 = tmp; end
code[x1_, x2_] := Block[{t$95$0 = N[(x1 + N[(x1 * N[(N[(-6.0 * N[(x2 / x1), $MachinePrecision]), $MachinePrecision] - 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x1, -1.35e-167], t$95$0, If[LessEqual[x1, 1.65e-254], N[(x2 * -6.0), $MachinePrecision], If[LessEqual[x1, 4.3e-5], t$95$0, N[(x2 * N[(N[(x1 / x2), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x1 + x1 \cdot \left(-6 \cdot \frac{x2}{x1} - 2\right)\\
\mathbf{if}\;x1 \leq -1.35 \cdot 10^{-167}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;x1 \leq 1.65 \cdot 10^{-254}:\\
\;\;\;\;x2 \cdot -6\\
\mathbf{elif}\;x1 \leq 4.3 \cdot 10^{-5}:\\
\;\;\;\;t\_0\\
\mathbf{else}:\\
\;\;\;\;x2 \cdot \left(\frac{x1}{x2} - 6\right)\\
\end{array}
\end{array}
if x1 < -1.35e-167 or 1.65000000000000008e-254 < x1 < 4.3000000000000002e-5Initial program 74.0%
Taylor expanded in x1 around 0 56.5%
Taylor expanded in x1 around 0 57.3%
*-commutative57.3%
fma-define57.3%
*-commutative57.3%
Simplified57.3%
Taylor expanded in x1 around inf 55.0%
Taylor expanded in x1 around 0 42.6%
if -1.35e-167 < x1 < 1.65000000000000008e-254Initial program 99.5%
Taylor expanded in x1 around 0 89.2%
Taylor expanded in x1 around 0 91.3%
*-commutative91.3%
Simplified91.3%
Taylor expanded in x1 around 0 91.7%
*-commutative91.7%
Simplified91.7%
if 4.3000000000000002e-5 < x1 Initial program 55.0%
Taylor expanded in x1 around 0 16.2%
Taylor expanded in x1 around 0 5.3%
*-commutative5.3%
Simplified5.3%
Taylor expanded in x2 around inf 30.2%
Final simplification47.9%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (+ x1 (* x1 (- (/ (* x2 -6.0) x1) 2.0)))))
(if (<= x1 -1.35e-167)
t_0
(if (<= x1 1.3e-252)
(* x2 -6.0)
(if (<= x1 4.3e-5) t_0 (* x2 (- (/ x1 x2) 6.0)))))))
double code(double x1, double x2) {
double t_0 = x1 + (x1 * (((x2 * -6.0) / x1) - 2.0));
double tmp;
if (x1 <= -1.35e-167) {
tmp = t_0;
} else if (x1 <= 1.3e-252) {
tmp = x2 * -6.0;
} else if (x1 <= 4.3e-5) {
tmp = t_0;
} else {
tmp = x2 * ((x1 / x2) - 6.0);
}
return tmp;
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
real(8) :: t_0
real(8) :: tmp
t_0 = x1 + (x1 * (((x2 * (-6.0d0)) / x1) - 2.0d0))
if (x1 <= (-1.35d-167)) then
tmp = t_0
else if (x1 <= 1.3d-252) then
tmp = x2 * (-6.0d0)
else if (x1 <= 4.3d-5) then
tmp = t_0
else
tmp = x2 * ((x1 / x2) - 6.0d0)
end if
code = tmp
end function
public static double code(double x1, double x2) {
double t_0 = x1 + (x1 * (((x2 * -6.0) / x1) - 2.0));
double tmp;
if (x1 <= -1.35e-167) {
tmp = t_0;
} else if (x1 <= 1.3e-252) {
tmp = x2 * -6.0;
} else if (x1 <= 4.3e-5) {
tmp = t_0;
} else {
tmp = x2 * ((x1 / x2) - 6.0);
}
return tmp;
}
def code(x1, x2): t_0 = x1 + (x1 * (((x2 * -6.0) / x1) - 2.0)) tmp = 0 if x1 <= -1.35e-167: tmp = t_0 elif x1 <= 1.3e-252: tmp = x2 * -6.0 elif x1 <= 4.3e-5: tmp = t_0 else: tmp = x2 * ((x1 / x2) - 6.0) return tmp
function code(x1, x2) t_0 = Float64(x1 + Float64(x1 * Float64(Float64(Float64(x2 * -6.0) / x1) - 2.0))) tmp = 0.0 if (x1 <= -1.35e-167) tmp = t_0; elseif (x1 <= 1.3e-252) tmp = Float64(x2 * -6.0); elseif (x1 <= 4.3e-5) tmp = t_0; else tmp = Float64(x2 * Float64(Float64(x1 / x2) - 6.0)); end return tmp end
function tmp_2 = code(x1, x2) t_0 = x1 + (x1 * (((x2 * -6.0) / x1) - 2.0)); tmp = 0.0; if (x1 <= -1.35e-167) tmp = t_0; elseif (x1 <= 1.3e-252) tmp = x2 * -6.0; elseif (x1 <= 4.3e-5) tmp = t_0; else tmp = x2 * ((x1 / x2) - 6.0); end tmp_2 = tmp; end
code[x1_, x2_] := Block[{t$95$0 = N[(x1 + N[(x1 * N[(N[(N[(x2 * -6.0), $MachinePrecision] / x1), $MachinePrecision] - 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x1, -1.35e-167], t$95$0, If[LessEqual[x1, 1.3e-252], N[(x2 * -6.0), $MachinePrecision], If[LessEqual[x1, 4.3e-5], t$95$0, N[(x2 * N[(N[(x1 / x2), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x1 + x1 \cdot \left(\frac{x2 \cdot -6}{x1} - 2\right)\\
\mathbf{if}\;x1 \leq -1.35 \cdot 10^{-167}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;x1 \leq 1.3 \cdot 10^{-252}:\\
\;\;\;\;x2 \cdot -6\\
\mathbf{elif}\;x1 \leq 4.3 \cdot 10^{-5}:\\
\;\;\;\;t\_0\\
\mathbf{else}:\\
\;\;\;\;x2 \cdot \left(\frac{x1}{x2} - 6\right)\\
\end{array}
\end{array}
if x1 < -1.35e-167 or 1.3e-252 < x1 < 4.3000000000000002e-5Initial program 74.0%
Taylor expanded in x1 around 0 56.5%
Taylor expanded in x1 around 0 57.3%
*-commutative57.3%
fma-define57.3%
*-commutative57.3%
Simplified57.3%
Taylor expanded in x1 around inf 55.0%
Taylor expanded in x1 around 0 42.6%
associate-*r/42.6%
*-commutative42.6%
Simplified42.6%
if -1.35e-167 < x1 < 1.3e-252Initial program 99.5%
Taylor expanded in x1 around 0 89.2%
Taylor expanded in x1 around 0 91.3%
*-commutative91.3%
Simplified91.3%
Taylor expanded in x1 around 0 91.7%
*-commutative91.7%
Simplified91.7%
if 4.3000000000000002e-5 < x1 Initial program 55.0%
Taylor expanded in x1 around 0 16.2%
Taylor expanded in x1 around 0 5.3%
*-commutative5.3%
Simplified5.3%
Taylor expanded in x2 around inf 30.2%
Final simplification47.9%
(FPCore (x1 x2)
:precision binary64
(if (<= x1 -2.1e-167)
(+ x1 (* x1 (- (* x2 (+ -12.0 (/ -6.0 x1))) 2.0)))
(if (<= x1 4e-252)
(* x2 -6.0)
(if (<= x1 4.3e-5)
(+ x1 (* x1 (- (/ (* x2 -6.0) x1) 2.0)))
(* x2 (- (/ x1 x2) 6.0))))))
double code(double x1, double x2) {
double tmp;
if (x1 <= -2.1e-167) {
tmp = x1 + (x1 * ((x2 * (-12.0 + (-6.0 / x1))) - 2.0));
} else if (x1 <= 4e-252) {
tmp = x2 * -6.0;
} else if (x1 <= 4.3e-5) {
tmp = x1 + (x1 * (((x2 * -6.0) / x1) - 2.0));
} else {
tmp = x2 * ((x1 / x2) - 6.0);
}
return tmp;
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
real(8) :: tmp
if (x1 <= (-2.1d-167)) then
tmp = x1 + (x1 * ((x2 * ((-12.0d0) + ((-6.0d0) / x1))) - 2.0d0))
else if (x1 <= 4d-252) then
tmp = x2 * (-6.0d0)
else if (x1 <= 4.3d-5) then
tmp = x1 + (x1 * (((x2 * (-6.0d0)) / x1) - 2.0d0))
else
tmp = x2 * ((x1 / x2) - 6.0d0)
end if
code = tmp
end function
public static double code(double x1, double x2) {
double tmp;
if (x1 <= -2.1e-167) {
tmp = x1 + (x1 * ((x2 * (-12.0 + (-6.0 / x1))) - 2.0));
} else if (x1 <= 4e-252) {
tmp = x2 * -6.0;
} else if (x1 <= 4.3e-5) {
tmp = x1 + (x1 * (((x2 * -6.0) / x1) - 2.0));
} else {
tmp = x2 * ((x1 / x2) - 6.0);
}
return tmp;
}
def code(x1, x2): tmp = 0 if x1 <= -2.1e-167: tmp = x1 + (x1 * ((x2 * (-12.0 + (-6.0 / x1))) - 2.0)) elif x1 <= 4e-252: tmp = x2 * -6.0 elif x1 <= 4.3e-5: tmp = x1 + (x1 * (((x2 * -6.0) / x1) - 2.0)) else: tmp = x2 * ((x1 / x2) - 6.0) return tmp
function code(x1, x2) tmp = 0.0 if (x1 <= -2.1e-167) tmp = Float64(x1 + Float64(x1 * Float64(Float64(x2 * Float64(-12.0 + Float64(-6.0 / x1))) - 2.0))); elseif (x1 <= 4e-252) tmp = Float64(x2 * -6.0); elseif (x1 <= 4.3e-5) tmp = Float64(x1 + Float64(x1 * Float64(Float64(Float64(x2 * -6.0) / x1) - 2.0))); else tmp = Float64(x2 * Float64(Float64(x1 / x2) - 6.0)); end return tmp end
function tmp_2 = code(x1, x2) tmp = 0.0; if (x1 <= -2.1e-167) tmp = x1 + (x1 * ((x2 * (-12.0 + (-6.0 / x1))) - 2.0)); elseif (x1 <= 4e-252) tmp = x2 * -6.0; elseif (x1 <= 4.3e-5) tmp = x1 + (x1 * (((x2 * -6.0) / x1) - 2.0)); else tmp = x2 * ((x1 / x2) - 6.0); end tmp_2 = tmp; end
code[x1_, x2_] := If[LessEqual[x1, -2.1e-167], N[(x1 + N[(x1 * N[(N[(x2 * N[(-12.0 + N[(-6.0 / x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 4e-252], N[(x2 * -6.0), $MachinePrecision], If[LessEqual[x1, 4.3e-5], N[(x1 + N[(x1 * N[(N[(N[(x2 * -6.0), $MachinePrecision] / x1), $MachinePrecision] - 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x2 * N[(N[(x1 / x2), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x1 \leq -2.1 \cdot 10^{-167}:\\
\;\;\;\;x1 + x1 \cdot \left(x2 \cdot \left(-12 + \frac{-6}{x1}\right) - 2\right)\\
\mathbf{elif}\;x1 \leq 4 \cdot 10^{-252}:\\
\;\;\;\;x2 \cdot -6\\
\mathbf{elif}\;x1 \leq 4.3 \cdot 10^{-5}:\\
\;\;\;\;x1 + x1 \cdot \left(\frac{x2 \cdot -6}{x1} - 2\right)\\
\mathbf{else}:\\
\;\;\;\;x2 \cdot \left(\frac{x1}{x2} - 6\right)\\
\end{array}
\end{array}
if x1 < -2.10000000000000017e-167Initial program 58.6%
Taylor expanded in x1 around 0 38.5%
Taylor expanded in x1 around 0 39.8%
*-commutative39.8%
fma-define39.8%
*-commutative39.8%
Simplified39.8%
Taylor expanded in x1 around inf 39.9%
Taylor expanded in x2 around 0 35.5%
mul-1-neg35.5%
distribute-rgt-neg-in35.5%
distribute-neg-in35.5%
metadata-eval35.5%
associate-*r/35.5%
metadata-eval35.5%
distribute-neg-frac35.5%
metadata-eval35.5%
Simplified35.5%
if -2.10000000000000017e-167 < x1 < 3.99999999999999977e-252Initial program 99.5%
Taylor expanded in x1 around 0 89.2%
Taylor expanded in x1 around 0 91.3%
*-commutative91.3%
Simplified91.3%
Taylor expanded in x1 around 0 91.7%
*-commutative91.7%
Simplified91.7%
if 3.99999999999999977e-252 < x1 < 4.3000000000000002e-5Initial program 99.4%
Taylor expanded in x1 around 0 86.5%
Taylor expanded in x1 around 0 86.4%
*-commutative86.4%
fma-define86.4%
*-commutative86.4%
Simplified86.4%
Taylor expanded in x1 around inf 80.1%
Taylor expanded in x1 around 0 66.9%
associate-*r/66.9%
*-commutative66.9%
Simplified66.9%
if 4.3000000000000002e-5 < x1 Initial program 55.0%
Taylor expanded in x1 around 0 16.2%
Taylor expanded in x1 around 0 5.3%
*-commutative5.3%
Simplified5.3%
Taylor expanded in x2 around inf 30.2%
Final simplification50.4%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (+ x1 (* x1 -2.0))))
(if (<= x1 -3.8e-128)
t_0
(if (<= x1 3.9e-118)
(* x2 -6.0)
(if (<= x1 0.185) t_0 (* x2 (- (/ x1 x2) 6.0)))))))
double code(double x1, double x2) {
double t_0 = x1 + (x1 * -2.0);
double tmp;
if (x1 <= -3.8e-128) {
tmp = t_0;
} else if (x1 <= 3.9e-118) {
tmp = x2 * -6.0;
} else if (x1 <= 0.185) {
tmp = t_0;
} else {
tmp = x2 * ((x1 / x2) - 6.0);
}
return tmp;
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
real(8) :: t_0
real(8) :: tmp
t_0 = x1 + (x1 * (-2.0d0))
if (x1 <= (-3.8d-128)) then
tmp = t_0
else if (x1 <= 3.9d-118) then
tmp = x2 * (-6.0d0)
else if (x1 <= 0.185d0) then
tmp = t_0
else
tmp = x2 * ((x1 / x2) - 6.0d0)
end if
code = tmp
end function
public static double code(double x1, double x2) {
double t_0 = x1 + (x1 * -2.0);
double tmp;
if (x1 <= -3.8e-128) {
tmp = t_0;
} else if (x1 <= 3.9e-118) {
tmp = x2 * -6.0;
} else if (x1 <= 0.185) {
tmp = t_0;
} else {
tmp = x2 * ((x1 / x2) - 6.0);
}
return tmp;
}
def code(x1, x2): t_0 = x1 + (x1 * -2.0) tmp = 0 if x1 <= -3.8e-128: tmp = t_0 elif x1 <= 3.9e-118: tmp = x2 * -6.0 elif x1 <= 0.185: tmp = t_0 else: tmp = x2 * ((x1 / x2) - 6.0) return tmp
function code(x1, x2) t_0 = Float64(x1 + Float64(x1 * -2.0)) tmp = 0.0 if (x1 <= -3.8e-128) tmp = t_0; elseif (x1 <= 3.9e-118) tmp = Float64(x2 * -6.0); elseif (x1 <= 0.185) tmp = t_0; else tmp = Float64(x2 * Float64(Float64(x1 / x2) - 6.0)); end return tmp end
function tmp_2 = code(x1, x2) t_0 = x1 + (x1 * -2.0); tmp = 0.0; if (x1 <= -3.8e-128) tmp = t_0; elseif (x1 <= 3.9e-118) tmp = x2 * -6.0; elseif (x1 <= 0.185) tmp = t_0; else tmp = x2 * ((x1 / x2) - 6.0); end tmp_2 = tmp; end
code[x1_, x2_] := Block[{t$95$0 = N[(x1 + N[(x1 * -2.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x1, -3.8e-128], t$95$0, If[LessEqual[x1, 3.9e-118], N[(x2 * -6.0), $MachinePrecision], If[LessEqual[x1, 0.185], t$95$0, N[(x2 * N[(N[(x1 / x2), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x1 + x1 \cdot -2\\
\mathbf{if}\;x1 \leq -3.8 \cdot 10^{-128}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;x1 \leq 3.9 \cdot 10^{-118}:\\
\;\;\;\;x2 \cdot -6\\
\mathbf{elif}\;x1 \leq 0.185:\\
\;\;\;\;t\_0\\
\mathbf{else}:\\
\;\;\;\;x2 \cdot \left(\frac{x1}{x2} - 6\right)\\
\end{array}
\end{array}
if x1 < -3.8000000000000002e-128 or 3.90000000000000001e-118 < x1 < 0.185Initial program 62.6%
Taylor expanded in x1 around 0 44.0%
Taylor expanded in x1 around 0 45.1%
*-commutative45.1%
fma-define45.1%
*-commutative45.1%
Simplified45.1%
Taylor expanded in x2 around 0 19.4%
distribute-rgt1-in19.6%
metadata-eval19.6%
Simplified19.6%
if -3.8000000000000002e-128 < x1 < 3.90000000000000001e-118Initial program 99.5%
Taylor expanded in x1 around 0 86.8%
Taylor expanded in x1 around 0 74.2%
*-commutative74.2%
Simplified74.2%
Taylor expanded in x1 around 0 74.5%
*-commutative74.5%
Simplified74.5%
if 0.185 < x1 Initial program 54.4%
Taylor expanded in x1 around 0 15.6%
Taylor expanded in x1 around 0 5.4%
*-commutative5.4%
Simplified5.4%
Taylor expanded in x2 around inf 30.6%
Final simplification41.9%
(FPCore (x1 x2) :precision binary64 (if (or (<= x2 -4.7e-129) (not (<= x2 1.8e-215))) (* x2 -6.0) (+ x1 (* x1 -2.0))))
double code(double x1, double x2) {
double tmp;
if ((x2 <= -4.7e-129) || !(x2 <= 1.8e-215)) {
tmp = x2 * -6.0;
} else {
tmp = x1 + (x1 * -2.0);
}
return tmp;
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
real(8) :: tmp
if ((x2 <= (-4.7d-129)) .or. (.not. (x2 <= 1.8d-215))) then
tmp = x2 * (-6.0d0)
else
tmp = x1 + (x1 * (-2.0d0))
end if
code = tmp
end function
public static double code(double x1, double x2) {
double tmp;
if ((x2 <= -4.7e-129) || !(x2 <= 1.8e-215)) {
tmp = x2 * -6.0;
} else {
tmp = x1 + (x1 * -2.0);
}
return tmp;
}
def code(x1, x2): tmp = 0 if (x2 <= -4.7e-129) or not (x2 <= 1.8e-215): tmp = x2 * -6.0 else: tmp = x1 + (x1 * -2.0) return tmp
function code(x1, x2) tmp = 0.0 if ((x2 <= -4.7e-129) || !(x2 <= 1.8e-215)) tmp = Float64(x2 * -6.0); else tmp = Float64(x1 + Float64(x1 * -2.0)); end return tmp end
function tmp_2 = code(x1, x2) tmp = 0.0; if ((x2 <= -4.7e-129) || ~((x2 <= 1.8e-215))) tmp = x2 * -6.0; else tmp = x1 + (x1 * -2.0); end tmp_2 = tmp; end
code[x1_, x2_] := If[Or[LessEqual[x2, -4.7e-129], N[Not[LessEqual[x2, 1.8e-215]], $MachinePrecision]], N[(x2 * -6.0), $MachinePrecision], N[(x1 + N[(x1 * -2.0), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x2 \leq -4.7 \cdot 10^{-129} \lor \neg \left(x2 \leq 1.8 \cdot 10^{-215}\right):\\
\;\;\;\;x2 \cdot -6\\
\mathbf{else}:\\
\;\;\;\;x1 + x1 \cdot -2\\
\end{array}
\end{array}
if x2 < -4.7000000000000002e-129 or 1.7999999999999999e-215 < x2 Initial program 75.0%
Taylor expanded in x1 around 0 53.7%
Taylor expanded in x1 around 0 35.0%
*-commutative35.0%
Simplified35.0%
Taylor expanded in x1 around 0 34.6%
*-commutative34.6%
Simplified34.6%
if -4.7000000000000002e-129 < x2 < 1.7999999999999999e-215Initial program 65.3%
Taylor expanded in x1 around 0 38.4%
Taylor expanded in x1 around 0 38.3%
*-commutative38.3%
fma-define38.3%
*-commutative38.3%
Simplified38.3%
Taylor expanded in x2 around 0 30.1%
distribute-rgt1-in30.5%
metadata-eval30.5%
Simplified30.5%
Final simplification33.7%
(FPCore (x1 x2) :precision binary64 (if (or (<= x2 -4.7e-129) (not (<= x2 1.95e-247))) (+ x1 (* x2 -6.0)) (+ x1 (* x1 -2.0))))
double code(double x1, double x2) {
double tmp;
if ((x2 <= -4.7e-129) || !(x2 <= 1.95e-247)) {
tmp = x1 + (x2 * -6.0);
} else {
tmp = x1 + (x1 * -2.0);
}
return tmp;
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
real(8) :: tmp
if ((x2 <= (-4.7d-129)) .or. (.not. (x2 <= 1.95d-247))) then
tmp = x1 + (x2 * (-6.0d0))
else
tmp = x1 + (x1 * (-2.0d0))
end if
code = tmp
end function
public static double code(double x1, double x2) {
double tmp;
if ((x2 <= -4.7e-129) || !(x2 <= 1.95e-247)) {
tmp = x1 + (x2 * -6.0);
} else {
tmp = x1 + (x1 * -2.0);
}
return tmp;
}
def code(x1, x2): tmp = 0 if (x2 <= -4.7e-129) or not (x2 <= 1.95e-247): tmp = x1 + (x2 * -6.0) else: tmp = x1 + (x1 * -2.0) return tmp
function code(x1, x2) tmp = 0.0 if ((x2 <= -4.7e-129) || !(x2 <= 1.95e-247)) tmp = Float64(x1 + Float64(x2 * -6.0)); else tmp = Float64(x1 + Float64(x1 * -2.0)); end return tmp end
function tmp_2 = code(x1, x2) tmp = 0.0; if ((x2 <= -4.7e-129) || ~((x2 <= 1.95e-247))) tmp = x1 + (x2 * -6.0); else tmp = x1 + (x1 * -2.0); end tmp_2 = tmp; end
code[x1_, x2_] := If[Or[LessEqual[x2, -4.7e-129], N[Not[LessEqual[x2, 1.95e-247]], $MachinePrecision]], N[(x1 + N[(x2 * -6.0), $MachinePrecision]), $MachinePrecision], N[(x1 + N[(x1 * -2.0), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x2 \leq -4.7 \cdot 10^{-129} \lor \neg \left(x2 \leq 1.95 \cdot 10^{-247}\right):\\
\;\;\;\;x1 + x2 \cdot -6\\
\mathbf{else}:\\
\;\;\;\;x1 + x1 \cdot -2\\
\end{array}
\end{array}
if x2 < -4.7000000000000002e-129 or 1.9500000000000001e-247 < x2 Initial program 74.4%
Taylor expanded in x1 around 0 53.0%
Taylor expanded in x1 around 0 34.5%
*-commutative34.5%
Simplified34.5%
if -4.7000000000000002e-129 < x2 < 1.9500000000000001e-247Initial program 67.3%
Taylor expanded in x1 around 0 40.6%
Taylor expanded in x1 around 0 40.5%
*-commutative40.5%
fma-define40.5%
*-commutative40.5%
Simplified40.5%
Taylor expanded in x2 around 0 31.8%
distribute-rgt1-in32.2%
metadata-eval32.2%
Simplified32.2%
Final simplification34.1%
(FPCore (x1 x2) :precision binary64 (* x2 -6.0))
double code(double x1, double x2) {
return x2 * -6.0;
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
code = x2 * (-6.0d0)
end function
public static double code(double x1, double x2) {
return x2 * -6.0;
}
def code(x1, x2): return x2 * -6.0
function code(x1, x2) return Float64(x2 * -6.0) end
function tmp = code(x1, x2) tmp = x2 * -6.0; end
code[x1_, x2_] := N[(x2 * -6.0), $MachinePrecision]
\begin{array}{l}
\\
x2 \cdot -6
\end{array}
Initial program 73.0%
Taylor expanded in x1 around 0 50.6%
Taylor expanded in x1 around 0 29.7%
*-commutative29.7%
Simplified29.7%
Taylor expanded in x1 around 0 29.3%
*-commutative29.3%
Simplified29.3%
Final simplification29.3%
(FPCore (x1 x2) :precision binary64 x1)
double code(double x1, double x2) {
return x1;
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
code = x1
end function
public static double code(double x1, double x2) {
return x1;
}
def code(x1, x2): return x1
function code(x1, x2) return x1 end
function tmp = code(x1, x2) tmp = x1; end
code[x1_, x2_] := x1
\begin{array}{l}
\\
x1
\end{array}
Initial program 73.0%
Taylor expanded in x1 around 0 50.6%
Taylor expanded in x1 around 0 29.7%
*-commutative29.7%
Simplified29.7%
Taylor expanded in x1 around inf 3.5%
Final simplification3.5%
herbie shell --seed 2024095
(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))))))