
(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 22 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) (fma 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)))
(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_1 (fma 2.0 x2 x1)) (fma x1 x1 1.0))
(fma
x1
(* x1 (/ t_0 (/ (fma x1 x1 1.0) 3.0)))
(*
(fma x1 x1 1.0)
(+
x1
(+
(* x1 (* x1 -6.0))
(*
(/ t_0 (fma x1 x1 1.0))
(+
(* x1 (+ -6.0 (/ t_0 (/ (fma x1 x1 1.0) 2.0))))
(* (* x1 x1) 4.0)))))))))
(+ x1 (+ (+ x1 (* 6.0 (pow x1 4.0))) (* 3.0 (- (* x2 -2.0) x1)))))))
double code(double x1, double x2) {
double t_0 = fma(x1, (x1 * 3.0), fma(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 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_1 - fma(2.0, x2, x1)) / fma(x1, x1, 1.0)), fma(x1, (x1 * (t_0 / (fma(x1, x1, 1.0) / 3.0))), (fma(x1, x1, 1.0) * (x1 + ((x1 * (x1 * -6.0)) + ((t_0 / fma(x1, x1, 1.0)) * ((x1 * (-6.0 + (t_0 / (fma(x1, x1, 1.0) / 2.0)))) + ((x1 * x1) * 4.0))))))));
} else {
tmp = x1 + ((x1 + (6.0 * pow(x1, 4.0))) + (3.0 * ((x2 * -2.0) - x1)));
}
return tmp;
}
function code(x1, x2) t_0 = fma(x1, Float64(x1 * 3.0), fma(2.0, x2, Float64(-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) 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_1 - fma(2.0, x2, x1)) / fma(x1, x1, 1.0)), fma(x1, Float64(x1 * Float64(t_0 / Float64(fma(x1, x1, 1.0) / 3.0))), Float64(fma(x1, x1, 1.0) * Float64(x1 + Float64(Float64(x1 * Float64(x1 * -6.0)) + Float64(Float64(t_0 / fma(x1, x1, 1.0)) * Float64(Float64(x1 * Float64(-6.0 + Float64(t_0 / Float64(fma(x1, x1, 1.0) / 2.0)))) + Float64(Float64(x1 * x1) * 4.0))))))))); else tmp = Float64(x1 + Float64(Float64(x1 + Float64(6.0 * (x1 ^ 4.0))) + Float64(3.0 * Float64(Float64(x2 * -2.0) - x1)))); end return tmp end
code[x1_, x2_] := Block[{t$95$0 = N[(x1 * N[(x1 * 3.0), $MachinePrecision] + N[(2.0 * x2 + (-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]}, 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$1 - N[(2.0 * x2 + x1), $MachinePrecision]), $MachinePrecision] / N[(x1 * x1 + 1.0), $MachinePrecision]), $MachinePrecision] + N[(x1 * N[(x1 * N[(t$95$0 / N[(N[(x1 * x1 + 1.0), $MachinePrecision] / 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(x1 * x1 + 1.0), $MachinePrecision] * N[(x1 + N[(N[(x1 * N[(x1 * -6.0), $MachinePrecision]), $MachinePrecision] + N[(N[(t$95$0 / N[(x1 * x1 + 1.0), $MachinePrecision]), $MachinePrecision] * N[(N[(x1 * N[(-6.0 + N[(t$95$0 / N[(N[(x1 * x1 + 1.0), $MachinePrecision] / 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(x1 * x1), $MachinePrecision] * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x1 + N[(N[(x1 + N[(6.0 * N[Power[x1, 4.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(3.0 * N[(N[(x2 * -2.0), $MachinePrecision] - x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \mathsf{fma}\left(x1, x1 \cdot 3, \mathsf{fma}\left(2, x2, -x1\right)\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}\\
\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_1 - \mathsf{fma}\left(2, x2, x1\right)}{\mathsf{fma}\left(x1, x1, 1\right)}, \mathsf{fma}\left(x1, x1 \cdot \frac{t_0}{\frac{\mathsf{fma}\left(x1, x1, 1\right)}{3}}, \mathsf{fma}\left(x1, x1, 1\right) \cdot \left(x1 + \left(x1 \cdot \left(x1 \cdot -6\right) + \frac{t_0}{\mathsf{fma}\left(x1, x1, 1\right)} \cdot \left(x1 \cdot \left(-6 + \frac{t_0}{\frac{\mathsf{fma}\left(x1, x1, 1\right)}{2}}\right) + \left(x1 \cdot x1\right) \cdot 4\right)\right)\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x1 + \left(\left(x1 + 6 \cdot {x1}^{4}\right) + 3 \cdot \left(x2 \cdot -2 - x1\right)\right)\\
\end{array}
\end{array}
if (+.f64 x1 (+.f64 (+.f64 (+.f64 (+.f64 (*.f64 (+.f64 (*.f64 (*.f64 (*.f64 2 x1) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 3 x1) x1) (*.f64 2 x2)) x1) (+.f64 (*.f64 x1 x1) 1))) (-.f64 (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 3 x1) x1) (*.f64 2 x2)) x1) (+.f64 (*.f64 x1 x1) 1)) 3)) (*.f64 (*.f64 x1 x1) (-.f64 (*.f64 4 (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 3 x1) x1) (*.f64 2 x2)) x1) (+.f64 (*.f64 x1 x1) 1))) 6))) (+.f64 (*.f64 x1 x1) 1)) (*.f64 (*.f64 (*.f64 3 x1) x1) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 3 x1) x1) (*.f64 2 x2)) x1) (+.f64 (*.f64 x1 x1) 1)))) (*.f64 (*.f64 x1 x1) x1)) x1) (*.f64 3 (/.f64 (-.f64 (-.f64 (*.f64 (*.f64 3 x1) x1) (*.f64 2 x2)) x1) (+.f64 (*.f64 x1 x1) 1))))) < +inf.0Initial program 99.4%
Simplified99.7%
if +inf.0 < (+.f64 x1 (+.f64 (+.f64 (+.f64 (+.f64 (*.f64 (+.f64 (*.f64 (*.f64 (*.f64 2 x1) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 3 x1) x1) (*.f64 2 x2)) x1) (+.f64 (*.f64 x1 x1) 1))) (-.f64 (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 3 x1) x1) (*.f64 2 x2)) x1) (+.f64 (*.f64 x1 x1) 1)) 3)) (*.f64 (*.f64 x1 x1) (-.f64 (*.f64 4 (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 3 x1) x1) (*.f64 2 x2)) x1) (+.f64 (*.f64 x1 x1) 1))) 6))) (+.f64 (*.f64 x1 x1) 1)) (*.f64 (*.f64 (*.f64 3 x1) x1) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 3 x1) x1) (*.f64 2 x2)) x1) (+.f64 (*.f64 x1 x1) 1)))) (*.f64 (*.f64 x1 x1) x1)) x1) (*.f64 3 (/.f64 (-.f64 (-.f64 (*.f64 (*.f64 3 x1) x1) (*.f64 2 x2)) x1) (+.f64 (*.f64 x1 x1) 1))))) Initial program 0.0%
Taylor expanded in x1 around inf 0.0%
Taylor expanded in x1 around 0 0.0%
+-commutative0.0%
neg-mul-10.0%
unsub-neg0.0%
*-commutative0.0%
Simplified0.0%
Taylor expanded in x1 around inf 100.0%
*-commutative100.0%
Simplified100.0%
Final simplification99.8%
(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_2
(+
(* (* (* x1 2.0) t_3) (- t_3 3.0))
(* (* x1 x1) (- (* t_3 4.0) 6.0)))))
(t_5 (* 3.0 (- (* x2 -2.0) x1))))
(if (<=
(+
x1
(+
(+ x1 (+ (+ t_4 (* t_1 t_3)) t_0))
(* 3.0 (/ (- (- t_1 (* 2.0 x2)) x1) t_2))))
INFINITY)
(+ x1 (+ t_5 (+ x1 (+ t_0 (+ t_4 (* 3.0 t_1))))))
(+ x1 (+ (+ x1 (* 6.0 (pow x1 4.0))) t_5)))))
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_2 * ((((x1 * 2.0) * t_3) * (t_3 - 3.0)) + ((x1 * x1) * ((t_3 * 4.0) - 6.0)));
double t_5 = 3.0 * ((x2 * -2.0) - x1);
double tmp;
if ((x1 + ((x1 + ((t_4 + (t_1 * t_3)) + t_0)) + (3.0 * (((t_1 - (2.0 * x2)) - x1) / t_2)))) <= ((double) INFINITY)) {
tmp = x1 + (t_5 + (x1 + (t_0 + (t_4 + (3.0 * t_1)))));
} else {
tmp = x1 + ((x1 + (6.0 * pow(x1, 4.0))) + t_5);
}
return tmp;
}
public static 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_2 * ((((x1 * 2.0) * t_3) * (t_3 - 3.0)) + ((x1 * x1) * ((t_3 * 4.0) - 6.0)));
double t_5 = 3.0 * ((x2 * -2.0) - x1);
double tmp;
if ((x1 + ((x1 + ((t_4 + (t_1 * t_3)) + t_0)) + (3.0 * (((t_1 - (2.0 * x2)) - x1) / t_2)))) <= Double.POSITIVE_INFINITY) {
tmp = x1 + (t_5 + (x1 + (t_0 + (t_4 + (3.0 * t_1)))));
} else {
tmp = x1 + ((x1 + (6.0 * Math.pow(x1, 4.0))) + t_5);
}
return tmp;
}
def code(x1, x2): 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_2 * ((((x1 * 2.0) * t_3) * (t_3 - 3.0)) + ((x1 * x1) * ((t_3 * 4.0) - 6.0))) t_5 = 3.0 * ((x2 * -2.0) - x1) tmp = 0 if (x1 + ((x1 + ((t_4 + (t_1 * t_3)) + t_0)) + (3.0 * (((t_1 - (2.0 * x2)) - x1) / t_2)))) <= math.inf: tmp = x1 + (t_5 + (x1 + (t_0 + (t_4 + (3.0 * t_1))))) else: tmp = x1 + ((x1 + (6.0 * math.pow(x1, 4.0))) + t_5) 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_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)))) t_5 = Float64(3.0 * Float64(Float64(x2 * -2.0) - x1)) tmp = 0.0 if (Float64(x1 + Float64(Float64(x1 + Float64(Float64(t_4 + Float64(t_1 * t_3)) + t_0)) + Float64(3.0 * Float64(Float64(Float64(t_1 - Float64(2.0 * x2)) - x1) / t_2)))) <= Inf) tmp = Float64(x1 + Float64(t_5 + Float64(x1 + Float64(t_0 + Float64(t_4 + Float64(3.0 * t_1)))))); else tmp = Float64(x1 + Float64(Float64(x1 + Float64(6.0 * (x1 ^ 4.0))) + t_5)); end return tmp end
function tmp_2 = code(x1, x2) 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_2 * ((((x1 * 2.0) * t_3) * (t_3 - 3.0)) + ((x1 * x1) * ((t_3 * 4.0) - 6.0))); t_5 = 3.0 * ((x2 * -2.0) - x1); tmp = 0.0; if ((x1 + ((x1 + ((t_4 + (t_1 * t_3)) + t_0)) + (3.0 * (((t_1 - (2.0 * x2)) - x1) / t_2)))) <= Inf) tmp = x1 + (t_5 + (x1 + (t_0 + (t_4 + (3.0 * t_1))))); else tmp = x1 + ((x1 + (6.0 * (x1 ^ 4.0))) + t_5); end tmp_2 = tmp; end
code[x1_, x2_] := Block[{t$95$0 = N[(x1 * N[(x1 * x1), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(x1 * N[(x1 * 3.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(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$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]}, Block[{t$95$5 = N[(3.0 * N[(N[(x2 * -2.0), $MachinePrecision] - x1), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(x1 + N[(N[(x1 + N[(N[(t$95$4 + N[(t$95$1 * t$95$3), $MachinePrecision]), $MachinePrecision] + t$95$0), $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[(t$95$5 + N[(x1 + N[(t$95$0 + N[(t$95$4 + N[(3.0 * t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x1 + N[(N[(x1 + N[(6.0 * N[Power[x1, 4.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + t$95$5), $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_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_5 := 3 \cdot \left(x2 \cdot -2 - x1\right)\\
\mathbf{if}\;x1 + \left(\left(x1 + \left(\left(t_4 + t_1 \cdot t_3\right) + t_0\right)\right) + 3 \cdot \frac{\left(t_1 - 2 \cdot x2\right) - x1}{t_2}\right) \leq \infty:\\
\;\;\;\;x1 + \left(t_5 + \left(x1 + \left(t_0 + \left(t_4 + 3 \cdot t_1\right)\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x1 + \left(\left(x1 + 6 \cdot {x1}^{4}\right) + t_5\right)\\
\end{array}
\end{array}
if (+.f64 x1 (+.f64 (+.f64 (+.f64 (+.f64 (*.f64 (+.f64 (*.f64 (*.f64 (*.f64 2 x1) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 3 x1) x1) (*.f64 2 x2)) x1) (+.f64 (*.f64 x1 x1) 1))) (-.f64 (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 3 x1) x1) (*.f64 2 x2)) x1) (+.f64 (*.f64 x1 x1) 1)) 3)) (*.f64 (*.f64 x1 x1) (-.f64 (*.f64 4 (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 3 x1) x1) (*.f64 2 x2)) x1) (+.f64 (*.f64 x1 x1) 1))) 6))) (+.f64 (*.f64 x1 x1) 1)) (*.f64 (*.f64 (*.f64 3 x1) x1) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 3 x1) x1) (*.f64 2 x2)) x1) (+.f64 (*.f64 x1 x1) 1)))) (*.f64 (*.f64 x1 x1) x1)) x1) (*.f64 3 (/.f64 (-.f64 (-.f64 (*.f64 (*.f64 3 x1) x1) (*.f64 2 x2)) x1) (+.f64 (*.f64 x1 x1) 1))))) < +inf.0Initial program 99.4%
Taylor expanded in x1 around inf 98.5%
Taylor expanded in x1 around 0 99.4%
+-commutative99.4%
neg-mul-199.4%
unsub-neg99.4%
*-commutative99.4%
Simplified99.4%
if +inf.0 < (+.f64 x1 (+.f64 (+.f64 (+.f64 (+.f64 (*.f64 (+.f64 (*.f64 (*.f64 (*.f64 2 x1) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 3 x1) x1) (*.f64 2 x2)) x1) (+.f64 (*.f64 x1 x1) 1))) (-.f64 (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 3 x1) x1) (*.f64 2 x2)) x1) (+.f64 (*.f64 x1 x1) 1)) 3)) (*.f64 (*.f64 x1 x1) (-.f64 (*.f64 4 (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 3 x1) x1) (*.f64 2 x2)) x1) (+.f64 (*.f64 x1 x1) 1))) 6))) (+.f64 (*.f64 x1 x1) 1)) (*.f64 (*.f64 (*.f64 3 x1) x1) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 3 x1) x1) (*.f64 2 x2)) x1) (+.f64 (*.f64 x1 x1) 1)))) (*.f64 (*.f64 x1 x1) x1)) x1) (*.f64 3 (/.f64 (-.f64 (-.f64 (*.f64 (*.f64 3 x1) x1) (*.f64 2 x2)) x1) (+.f64 (*.f64 x1 x1) 1))))) Initial program 0.0%
Taylor expanded in x1 around inf 0.0%
Taylor expanded in x1 around 0 0.0%
+-commutative0.0%
neg-mul-10.0%
unsub-neg0.0%
*-commutative0.0%
Simplified0.0%
Taylor expanded in x1 around inf 100.0%
*-commutative100.0%
Simplified100.0%
Final simplification99.6%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (* 3.0 (- (* x2 -2.0) x1)))
(t_1 (* x1 (* x1 3.0)))
(t_2 (* x1 (* x1 x1)))
(t_3 (+ (* x1 x1) 1.0))
(t_4 (/ (- (+ t_1 (* 2.0 x2)) x1) t_3))
(t_5 (* 3.0 t_1)))
(if (<= x1 -2.25e+104)
(+ x1 (fma x1 -2.0 (* x1 (* x1 9.0))))
(if (<= x1 5e+78)
(+
x1
(+
t_0
(+
x1
(+
t_2
(+
(*
t_3
(+
(* (* (* x1 2.0) t_4) (- t_4 3.0))
(* (* x1 x1) (- (* t_4 4.0) 6.0))))
t_5)))))
(+ x1 (+ t_0 (+ x1 (+ t_2 (+ t_5 (* t_3 (* x1 (* x1 6.0))))))))))))
double code(double x1, double x2) {
double t_0 = 3.0 * ((x2 * -2.0) - x1);
double t_1 = x1 * (x1 * 3.0);
double t_2 = x1 * (x1 * x1);
double t_3 = (x1 * x1) + 1.0;
double t_4 = ((t_1 + (2.0 * x2)) - x1) / t_3;
double t_5 = 3.0 * t_1;
double tmp;
if (x1 <= -2.25e+104) {
tmp = x1 + fma(x1, -2.0, (x1 * (x1 * 9.0)));
} else if (x1 <= 5e+78) {
tmp = x1 + (t_0 + (x1 + (t_2 + ((t_3 * ((((x1 * 2.0) * t_4) * (t_4 - 3.0)) + ((x1 * x1) * ((t_4 * 4.0) - 6.0)))) + t_5))));
} else {
tmp = x1 + (t_0 + (x1 + (t_2 + (t_5 + (t_3 * (x1 * (x1 * 6.0)))))));
}
return tmp;
}
function code(x1, x2) t_0 = Float64(3.0 * Float64(Float64(x2 * -2.0) - x1)) t_1 = Float64(x1 * Float64(x1 * 3.0)) t_2 = Float64(x1 * Float64(x1 * x1)) t_3 = Float64(Float64(x1 * x1) + 1.0) t_4 = Float64(Float64(Float64(t_1 + Float64(2.0 * x2)) - x1) / t_3) t_5 = Float64(3.0 * t_1) tmp = 0.0 if (x1 <= -2.25e+104) tmp = Float64(x1 + fma(x1, -2.0, Float64(x1 * Float64(x1 * 9.0)))); elseif (x1 <= 5e+78) tmp = Float64(x1 + Float64(t_0 + Float64(x1 + Float64(t_2 + Float64(Float64(t_3 * Float64(Float64(Float64(Float64(x1 * 2.0) * t_4) * Float64(t_4 - 3.0)) + Float64(Float64(x1 * x1) * Float64(Float64(t_4 * 4.0) - 6.0)))) + t_5))))); else tmp = Float64(x1 + Float64(t_0 + Float64(x1 + Float64(t_2 + Float64(t_5 + Float64(t_3 * Float64(x1 * Float64(x1 * 6.0)))))))); end return tmp end
code[x1_, x2_] := Block[{t$95$0 = N[(3.0 * N[(N[(x2 * -2.0), $MachinePrecision] - x1), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(x1 * N[(x1 * 3.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x1 * N[(x1 * x1), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[(x1 * x1), $MachinePrecision] + 1.0), $MachinePrecision]}, Block[{t$95$4 = N[(N[(N[(t$95$1 + N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$3), $MachinePrecision]}, Block[{t$95$5 = N[(3.0 * t$95$1), $MachinePrecision]}, If[LessEqual[x1, -2.25e+104], N[(x1 + N[(x1 * -2.0 + N[(x1 * N[(x1 * 9.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 5e+78], N[(x1 + N[(t$95$0 + N[(x1 + N[(t$95$2 + N[(N[(t$95$3 * N[(N[(N[(N[(x1 * 2.0), $MachinePrecision] * t$95$4), $MachinePrecision] * N[(t$95$4 - 3.0), $MachinePrecision]), $MachinePrecision] + N[(N[(x1 * x1), $MachinePrecision] * N[(N[(t$95$4 * 4.0), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + t$95$5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x1 + N[(t$95$0 + N[(x1 + N[(t$95$2 + N[(t$95$5 + N[(t$95$3 * N[(x1 * N[(x1 * 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := 3 \cdot \left(x2 \cdot -2 - x1\right)\\
t_1 := x1 \cdot \left(x1 \cdot 3\right)\\
t_2 := x1 \cdot \left(x1 \cdot x1\right)\\
t_3 := x1 \cdot x1 + 1\\
t_4 := \frac{\left(t_1 + 2 \cdot x2\right) - x1}{t_3}\\
t_5 := 3 \cdot t_1\\
\mathbf{if}\;x1 \leq -2.25 \cdot 10^{+104}:\\
\;\;\;\;x1 + \mathsf{fma}\left(x1, -2, x1 \cdot \left(x1 \cdot 9\right)\right)\\
\mathbf{elif}\;x1 \leq 5 \cdot 10^{+78}:\\
\;\;\;\;x1 + \left(t_0 + \left(x1 + \left(t_2 + \left(t_3 \cdot \left(\left(\left(x1 \cdot 2\right) \cdot t_4\right) \cdot \left(t_4 - 3\right) + \left(x1 \cdot x1\right) \cdot \left(t_4 \cdot 4 - 6\right)\right) + t_5\right)\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x1 + \left(t_0 + \left(x1 + \left(t_2 + \left(t_5 + t_3 \cdot \left(x1 \cdot \left(x1 \cdot 6\right)\right)\right)\right)\right)\right)\\
\end{array}
\end{array}
if x1 < -2.2499999999999999e104Initial program 0.0%
Taylor expanded in x1 around 0 0.0%
Taylor expanded in x1 around 0 44.8%
+-commutative44.8%
neg-mul-144.8%
unsub-neg44.8%
+-commutative44.8%
*-commutative44.8%
fma-def44.8%
unpow244.8%
cancel-sign-sub-inv44.8%
metadata-eval44.8%
*-commutative44.8%
Simplified44.8%
Taylor expanded in x1 around inf 44.8%
Taylor expanded in x2 around 0 82.2%
+-commutative82.2%
*-commutative82.2%
fma-def82.2%
*-commutative82.2%
unpow282.2%
associate-*l*82.2%
Simplified82.2%
if -2.2499999999999999e104 < x1 < 4.99999999999999984e78Initial program 99.4%
Taylor expanded in x1 around inf 98.4%
Taylor expanded in x1 around 0 99.4%
+-commutative99.4%
neg-mul-199.4%
unsub-neg99.4%
*-commutative99.4%
Simplified99.4%
if 4.99999999999999984e78 < x1 Initial program 31.7%
Taylor expanded in x1 around inf 31.7%
Taylor expanded in x1 around 0 31.7%
+-commutative31.7%
neg-mul-131.7%
unsub-neg31.7%
*-commutative31.7%
Simplified31.7%
Taylor expanded in x1 around inf 100.0%
*-commutative100.0%
unpow2100.0%
associate-*l*100.0%
Simplified100.0%
Final simplification96.0%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (* 3.0 (- (* x2 -2.0) x1)))
(t_1 (* x1 (* x1 3.0)))
(t_2 (* x1 (* x1 x1)))
(t_3 (+ (* x1 x1) 1.0))
(t_4 (/ (- (+ t_1 (* 2.0 x2)) x1) t_3))
(t_5 (* 3.0 t_1)))
(if (<= x1 -5.6e+102)
(+ x1 (* 3.0 (* (* x1 x1) (- 3.0 (* x2 -2.0)))))
(if (<= x1 1e+79)
(+
x1
(+
t_0
(+
x1
(+
t_2
(+
(*
t_3
(+
(* (* (* x1 2.0) t_4) (- t_4 3.0))
(* (* x1 x1) (- (* t_4 4.0) 6.0))))
t_5)))))
(+ x1 (+ t_0 (+ x1 (+ t_2 (+ t_5 (* t_3 (* x1 (* x1 6.0))))))))))))
double code(double x1, double x2) {
double t_0 = 3.0 * ((x2 * -2.0) - x1);
double t_1 = x1 * (x1 * 3.0);
double t_2 = x1 * (x1 * x1);
double t_3 = (x1 * x1) + 1.0;
double t_4 = ((t_1 + (2.0 * x2)) - x1) / t_3;
double t_5 = 3.0 * t_1;
double tmp;
if (x1 <= -5.6e+102) {
tmp = x1 + (3.0 * ((x1 * x1) * (3.0 - (x2 * -2.0))));
} else if (x1 <= 1e+79) {
tmp = x1 + (t_0 + (x1 + (t_2 + ((t_3 * ((((x1 * 2.0) * t_4) * (t_4 - 3.0)) + ((x1 * x1) * ((t_4 * 4.0) - 6.0)))) + t_5))));
} else {
tmp = x1 + (t_0 + (x1 + (t_2 + (t_5 + (t_3 * (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) :: t_3
real(8) :: t_4
real(8) :: t_5
real(8) :: tmp
t_0 = 3.0d0 * ((x2 * (-2.0d0)) - x1)
t_1 = x1 * (x1 * 3.0d0)
t_2 = x1 * (x1 * x1)
t_3 = (x1 * x1) + 1.0d0
t_4 = ((t_1 + (2.0d0 * x2)) - x1) / t_3
t_5 = 3.0d0 * t_1
if (x1 <= (-5.6d+102)) then
tmp = x1 + (3.0d0 * ((x1 * x1) * (3.0d0 - (x2 * (-2.0d0)))))
else if (x1 <= 1d+79) then
tmp = x1 + (t_0 + (x1 + (t_2 + ((t_3 * ((((x1 * 2.0d0) * t_4) * (t_4 - 3.0d0)) + ((x1 * x1) * ((t_4 * 4.0d0) - 6.0d0)))) + t_5))))
else
tmp = x1 + (t_0 + (x1 + (t_2 + (t_5 + (t_3 * (x1 * (x1 * 6.0d0)))))))
end if
code = tmp
end function
public static double code(double x1, double x2) {
double t_0 = 3.0 * ((x2 * -2.0) - x1);
double t_1 = x1 * (x1 * 3.0);
double t_2 = x1 * (x1 * x1);
double t_3 = (x1 * x1) + 1.0;
double t_4 = ((t_1 + (2.0 * x2)) - x1) / t_3;
double t_5 = 3.0 * t_1;
double tmp;
if (x1 <= -5.6e+102) {
tmp = x1 + (3.0 * ((x1 * x1) * (3.0 - (x2 * -2.0))));
} else if (x1 <= 1e+79) {
tmp = x1 + (t_0 + (x1 + (t_2 + ((t_3 * ((((x1 * 2.0) * t_4) * (t_4 - 3.0)) + ((x1 * x1) * ((t_4 * 4.0) - 6.0)))) + t_5))));
} else {
tmp = x1 + (t_0 + (x1 + (t_2 + (t_5 + (t_3 * (x1 * (x1 * 6.0)))))));
}
return tmp;
}
def code(x1, x2): t_0 = 3.0 * ((x2 * -2.0) - x1) t_1 = x1 * (x1 * 3.0) t_2 = x1 * (x1 * x1) t_3 = (x1 * x1) + 1.0 t_4 = ((t_1 + (2.0 * x2)) - x1) / t_3 t_5 = 3.0 * t_1 tmp = 0 if x1 <= -5.6e+102: tmp = x1 + (3.0 * ((x1 * x1) * (3.0 - (x2 * -2.0)))) elif x1 <= 1e+79: tmp = x1 + (t_0 + (x1 + (t_2 + ((t_3 * ((((x1 * 2.0) * t_4) * (t_4 - 3.0)) + ((x1 * x1) * ((t_4 * 4.0) - 6.0)))) + t_5)))) else: tmp = x1 + (t_0 + (x1 + (t_2 + (t_5 + (t_3 * (x1 * (x1 * 6.0))))))) return tmp
function code(x1, x2) t_0 = Float64(3.0 * Float64(Float64(x2 * -2.0) - x1)) t_1 = Float64(x1 * Float64(x1 * 3.0)) t_2 = Float64(x1 * Float64(x1 * x1)) t_3 = Float64(Float64(x1 * x1) + 1.0) t_4 = Float64(Float64(Float64(t_1 + Float64(2.0 * x2)) - x1) / t_3) t_5 = Float64(3.0 * t_1) tmp = 0.0 if (x1 <= -5.6e+102) tmp = Float64(x1 + Float64(3.0 * Float64(Float64(x1 * x1) * Float64(3.0 - Float64(x2 * -2.0))))); elseif (x1 <= 1e+79) tmp = Float64(x1 + Float64(t_0 + Float64(x1 + Float64(t_2 + Float64(Float64(t_3 * Float64(Float64(Float64(Float64(x1 * 2.0) * t_4) * Float64(t_4 - 3.0)) + Float64(Float64(x1 * x1) * Float64(Float64(t_4 * 4.0) - 6.0)))) + t_5))))); else tmp = Float64(x1 + Float64(t_0 + Float64(x1 + Float64(t_2 + Float64(t_5 + Float64(t_3 * Float64(x1 * Float64(x1 * 6.0)))))))); end return tmp end
function tmp_2 = code(x1, x2) t_0 = 3.0 * ((x2 * -2.0) - x1); t_1 = x1 * (x1 * 3.0); t_2 = x1 * (x1 * x1); t_3 = (x1 * x1) + 1.0; t_4 = ((t_1 + (2.0 * x2)) - x1) / t_3; t_5 = 3.0 * t_1; tmp = 0.0; if (x1 <= -5.6e+102) tmp = x1 + (3.0 * ((x1 * x1) * (3.0 - (x2 * -2.0)))); elseif (x1 <= 1e+79) tmp = x1 + (t_0 + (x1 + (t_2 + ((t_3 * ((((x1 * 2.0) * t_4) * (t_4 - 3.0)) + ((x1 * x1) * ((t_4 * 4.0) - 6.0)))) + t_5)))); else tmp = x1 + (t_0 + (x1 + (t_2 + (t_5 + (t_3 * (x1 * (x1 * 6.0))))))); end tmp_2 = tmp; end
code[x1_, x2_] := Block[{t$95$0 = N[(3.0 * N[(N[(x2 * -2.0), $MachinePrecision] - x1), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(x1 * N[(x1 * 3.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x1 * N[(x1 * x1), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[(x1 * x1), $MachinePrecision] + 1.0), $MachinePrecision]}, Block[{t$95$4 = N[(N[(N[(t$95$1 + N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$3), $MachinePrecision]}, Block[{t$95$5 = N[(3.0 * t$95$1), $MachinePrecision]}, If[LessEqual[x1, -5.6e+102], N[(x1 + N[(3.0 * N[(N[(x1 * x1), $MachinePrecision] * N[(3.0 - N[(x2 * -2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 1e+79], N[(x1 + N[(t$95$0 + N[(x1 + N[(t$95$2 + N[(N[(t$95$3 * N[(N[(N[(N[(x1 * 2.0), $MachinePrecision] * t$95$4), $MachinePrecision] * N[(t$95$4 - 3.0), $MachinePrecision]), $MachinePrecision] + N[(N[(x1 * x1), $MachinePrecision] * N[(N[(t$95$4 * 4.0), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + t$95$5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x1 + N[(t$95$0 + N[(x1 + N[(t$95$2 + N[(t$95$5 + N[(t$95$3 * N[(x1 * N[(x1 * 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := 3 \cdot \left(x2 \cdot -2 - x1\right)\\
t_1 := x1 \cdot \left(x1 \cdot 3\right)\\
t_2 := x1 \cdot \left(x1 \cdot x1\right)\\
t_3 := x1 \cdot x1 + 1\\
t_4 := \frac{\left(t_1 + 2 \cdot x2\right) - x1}{t_3}\\
t_5 := 3 \cdot t_1\\
\mathbf{if}\;x1 \leq -5.6 \cdot 10^{+102}:\\
\;\;\;\;x1 + 3 \cdot \left(\left(x1 \cdot x1\right) \cdot \left(3 - x2 \cdot -2\right)\right)\\
\mathbf{elif}\;x1 \leq 10^{+79}:\\
\;\;\;\;x1 + \left(t_0 + \left(x1 + \left(t_2 + \left(t_3 \cdot \left(\left(\left(x1 \cdot 2\right) \cdot t_4\right) \cdot \left(t_4 - 3\right) + \left(x1 \cdot x1\right) \cdot \left(t_4 \cdot 4 - 6\right)\right) + t_5\right)\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x1 + \left(t_0 + \left(x1 + \left(t_2 + \left(t_5 + t_3 \cdot \left(x1 \cdot \left(x1 \cdot 6\right)\right)\right)\right)\right)\right)\\
\end{array}
\end{array}
if x1 < -5.60000000000000037e102Initial program 0.0%
Taylor expanded in x1 around 0 0.0%
Taylor expanded in x1 around 0 44.8%
+-commutative44.8%
neg-mul-144.8%
unsub-neg44.8%
+-commutative44.8%
*-commutative44.8%
fma-def44.8%
unpow244.8%
cancel-sign-sub-inv44.8%
metadata-eval44.8%
*-commutative44.8%
Simplified44.8%
Taylor expanded in x1 around inf 44.8%
Taylor expanded in x1 around inf 71.7%
unpow271.7%
metadata-eval71.7%
cancel-sign-sub-inv71.7%
*-commutative71.7%
Simplified71.7%
if -5.60000000000000037e102 < x1 < 9.99999999999999967e78Initial program 99.4%
Taylor expanded in x1 around inf 98.4%
Taylor expanded in x1 around 0 99.4%
+-commutative99.4%
neg-mul-199.4%
unsub-neg99.4%
*-commutative99.4%
Simplified99.4%
if 9.99999999999999967e78 < x1 Initial program 31.7%
Taylor expanded in x1 around inf 31.7%
Taylor expanded in x1 around 0 31.7%
+-commutative31.7%
neg-mul-131.7%
unsub-neg31.7%
*-commutative31.7%
Simplified31.7%
Taylor expanded in x1 around inf 100.0%
*-commutative100.0%
unpow2100.0%
associate-*l*100.0%
Simplified100.0%
Final simplification93.9%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (* x1 (* x1 x1)))
(t_1 (* x1 (* x1 3.0)))
(t_2 (* 3.0 t_1))
(t_3 (+ (* x1 x1) 1.0))
(t_4 (/ (- (+ t_1 (* 2.0 x2)) x1) t_3))
(t_5
(+
x1
(+
(+
x1
(+
t_0
(+
t_2
(*
t_3
(+ (* (* (* x1 2.0) t_4) (- t_4 3.0)) (* (* x1 x1) 6.0))))))
(* 3.0 (* x2 -2.0))))))
(if (<= x1 -5.6e+102)
(+ x1 (* 3.0 (* (* x1 x1) (- 3.0 (* x2 -2.0)))))
(if (<= x1 -0.05)
t_5
(if (<= x1 0.048)
(+
x1
(+
(* 3.0 (/ (- (- t_1 (* 2.0 x2)) x1) t_3))
(+ x1 (* 4.0 (* x2 (* x1 (- (* 2.0 x2) 3.0)))))))
(if (<= x1 2e+76)
t_5
(+
x1
(+
(* 3.0 (- (* x2 -2.0) x1))
(+ x1 (+ t_0 (+ t_2 (* t_3 (* x1 (* x1 6.0))))))))))))))
double code(double x1, double x2) {
double t_0 = x1 * (x1 * x1);
double t_1 = x1 * (x1 * 3.0);
double t_2 = 3.0 * t_1;
double t_3 = (x1 * x1) + 1.0;
double t_4 = ((t_1 + (2.0 * x2)) - x1) / t_3;
double t_5 = x1 + ((x1 + (t_0 + (t_2 + (t_3 * ((((x1 * 2.0) * t_4) * (t_4 - 3.0)) + ((x1 * x1) * 6.0)))))) + (3.0 * (x2 * -2.0)));
double tmp;
if (x1 <= -5.6e+102) {
tmp = x1 + (3.0 * ((x1 * x1) * (3.0 - (x2 * -2.0))));
} else if (x1 <= -0.05) {
tmp = t_5;
} else if (x1 <= 0.048) {
tmp = x1 + ((3.0 * (((t_1 - (2.0 * x2)) - x1) / t_3)) + (x1 + (4.0 * (x2 * (x1 * ((2.0 * x2) - 3.0))))));
} else if (x1 <= 2e+76) {
tmp = t_5;
} else {
tmp = x1 + ((3.0 * ((x2 * -2.0) - x1)) + (x1 + (t_0 + (t_2 + (t_3 * (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) :: t_3
real(8) :: t_4
real(8) :: t_5
real(8) :: tmp
t_0 = x1 * (x1 * x1)
t_1 = x1 * (x1 * 3.0d0)
t_2 = 3.0d0 * t_1
t_3 = (x1 * x1) + 1.0d0
t_4 = ((t_1 + (2.0d0 * x2)) - x1) / t_3
t_5 = x1 + ((x1 + (t_0 + (t_2 + (t_3 * ((((x1 * 2.0d0) * t_4) * (t_4 - 3.0d0)) + ((x1 * x1) * 6.0d0)))))) + (3.0d0 * (x2 * (-2.0d0))))
if (x1 <= (-5.6d+102)) then
tmp = x1 + (3.0d0 * ((x1 * x1) * (3.0d0 - (x2 * (-2.0d0)))))
else if (x1 <= (-0.05d0)) then
tmp = t_5
else if (x1 <= 0.048d0) then
tmp = x1 + ((3.0d0 * (((t_1 - (2.0d0 * x2)) - x1) / t_3)) + (x1 + (4.0d0 * (x2 * (x1 * ((2.0d0 * x2) - 3.0d0))))))
else if (x1 <= 2d+76) then
tmp = t_5
else
tmp = x1 + ((3.0d0 * ((x2 * (-2.0d0)) - x1)) + (x1 + (t_0 + (t_2 + (t_3 * (x1 * (x1 * 6.0d0)))))))
end if
code = tmp
end function
public static double code(double x1, double x2) {
double t_0 = x1 * (x1 * x1);
double t_1 = x1 * (x1 * 3.0);
double t_2 = 3.0 * t_1;
double t_3 = (x1 * x1) + 1.0;
double t_4 = ((t_1 + (2.0 * x2)) - x1) / t_3;
double t_5 = x1 + ((x1 + (t_0 + (t_2 + (t_3 * ((((x1 * 2.0) * t_4) * (t_4 - 3.0)) + ((x1 * x1) * 6.0)))))) + (3.0 * (x2 * -2.0)));
double tmp;
if (x1 <= -5.6e+102) {
tmp = x1 + (3.0 * ((x1 * x1) * (3.0 - (x2 * -2.0))));
} else if (x1 <= -0.05) {
tmp = t_5;
} else if (x1 <= 0.048) {
tmp = x1 + ((3.0 * (((t_1 - (2.0 * x2)) - x1) / t_3)) + (x1 + (4.0 * (x2 * (x1 * ((2.0 * x2) - 3.0))))));
} else if (x1 <= 2e+76) {
tmp = t_5;
} else {
tmp = x1 + ((3.0 * ((x2 * -2.0) - x1)) + (x1 + (t_0 + (t_2 + (t_3 * (x1 * (x1 * 6.0)))))));
}
return tmp;
}
def code(x1, x2): t_0 = x1 * (x1 * x1) t_1 = x1 * (x1 * 3.0) t_2 = 3.0 * t_1 t_3 = (x1 * x1) + 1.0 t_4 = ((t_1 + (2.0 * x2)) - x1) / t_3 t_5 = x1 + ((x1 + (t_0 + (t_2 + (t_3 * ((((x1 * 2.0) * t_4) * (t_4 - 3.0)) + ((x1 * x1) * 6.0)))))) + (3.0 * (x2 * -2.0))) tmp = 0 if x1 <= -5.6e+102: tmp = x1 + (3.0 * ((x1 * x1) * (3.0 - (x2 * -2.0)))) elif x1 <= -0.05: tmp = t_5 elif x1 <= 0.048: tmp = x1 + ((3.0 * (((t_1 - (2.0 * x2)) - x1) / t_3)) + (x1 + (4.0 * (x2 * (x1 * ((2.0 * x2) - 3.0)))))) elif x1 <= 2e+76: tmp = t_5 else: tmp = x1 + ((3.0 * ((x2 * -2.0) - x1)) + (x1 + (t_0 + (t_2 + (t_3 * (x1 * (x1 * 6.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(3.0 * t_1) t_3 = Float64(Float64(x1 * x1) + 1.0) t_4 = Float64(Float64(Float64(t_1 + Float64(2.0 * x2)) - x1) / t_3) t_5 = Float64(x1 + Float64(Float64(x1 + Float64(t_0 + Float64(t_2 + Float64(t_3 * Float64(Float64(Float64(Float64(x1 * 2.0) * t_4) * Float64(t_4 - 3.0)) + Float64(Float64(x1 * x1) * 6.0)))))) + Float64(3.0 * Float64(x2 * -2.0)))) tmp = 0.0 if (x1 <= -5.6e+102) tmp = Float64(x1 + Float64(3.0 * Float64(Float64(x1 * x1) * Float64(3.0 - Float64(x2 * -2.0))))); elseif (x1 <= -0.05) tmp = t_5; elseif (x1 <= 0.048) tmp = Float64(x1 + Float64(Float64(3.0 * Float64(Float64(Float64(t_1 - Float64(2.0 * x2)) - x1) / t_3)) + Float64(x1 + Float64(4.0 * Float64(x2 * Float64(x1 * Float64(Float64(2.0 * x2) - 3.0))))))); elseif (x1 <= 2e+76) tmp = t_5; else tmp = Float64(x1 + Float64(Float64(3.0 * Float64(Float64(x2 * -2.0) - x1)) + Float64(x1 + Float64(t_0 + Float64(t_2 + Float64(t_3 * Float64(x1 * Float64(x1 * 6.0)))))))); end return tmp end
function tmp_2 = code(x1, x2) t_0 = x1 * (x1 * x1); t_1 = x1 * (x1 * 3.0); t_2 = 3.0 * t_1; t_3 = (x1 * x1) + 1.0; t_4 = ((t_1 + (2.0 * x2)) - x1) / t_3; t_5 = x1 + ((x1 + (t_0 + (t_2 + (t_3 * ((((x1 * 2.0) * t_4) * (t_4 - 3.0)) + ((x1 * x1) * 6.0)))))) + (3.0 * (x2 * -2.0))); tmp = 0.0; if (x1 <= -5.6e+102) tmp = x1 + (3.0 * ((x1 * x1) * (3.0 - (x2 * -2.0)))); elseif (x1 <= -0.05) tmp = t_5; elseif (x1 <= 0.048) tmp = x1 + ((3.0 * (((t_1 - (2.0 * x2)) - x1) / t_3)) + (x1 + (4.0 * (x2 * (x1 * ((2.0 * x2) - 3.0)))))); elseif (x1 <= 2e+76) tmp = t_5; else tmp = x1 + ((3.0 * ((x2 * -2.0) - x1)) + (x1 + (t_0 + (t_2 + (t_3 * (x1 * (x1 * 6.0))))))); end tmp_2 = tmp; end
code[x1_, x2_] := Block[{t$95$0 = N[(x1 * N[(x1 * x1), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(x1 * N[(x1 * 3.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(3.0 * t$95$1), $MachinePrecision]}, Block[{t$95$3 = N[(N[(x1 * x1), $MachinePrecision] + 1.0), $MachinePrecision]}, Block[{t$95$4 = N[(N[(N[(t$95$1 + N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$3), $MachinePrecision]}, Block[{t$95$5 = N[(x1 + N[(N[(x1 + N[(t$95$0 + N[(t$95$2 + N[(t$95$3 * N[(N[(N[(N[(x1 * 2.0), $MachinePrecision] * t$95$4), $MachinePrecision] * N[(t$95$4 - 3.0), $MachinePrecision]), $MachinePrecision] + N[(N[(x1 * x1), $MachinePrecision] * 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(3.0 * N[(x2 * -2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x1, -5.6e+102], N[(x1 + N[(3.0 * N[(N[(x1 * x1), $MachinePrecision] * N[(3.0 - N[(x2 * -2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, -0.05], t$95$5, If[LessEqual[x1, 0.048], N[(x1 + N[(N[(3.0 * N[(N[(N[(t$95$1 - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$3), $MachinePrecision]), $MachinePrecision] + N[(x1 + N[(4.0 * N[(x2 * N[(x1 * N[(N[(2.0 * x2), $MachinePrecision] - 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 2e+76], t$95$5, N[(x1 + N[(N[(3.0 * N[(N[(x2 * -2.0), $MachinePrecision] - x1), $MachinePrecision]), $MachinePrecision] + N[(x1 + N[(t$95$0 + N[(t$95$2 + N[(t$95$3 * N[(x1 * N[(x1 * 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x1 \cdot \left(x1 \cdot x1\right)\\
t_1 := x1 \cdot \left(x1 \cdot 3\right)\\
t_2 := 3 \cdot t_1\\
t_3 := x1 \cdot x1 + 1\\
t_4 := \frac{\left(t_1 + 2 \cdot x2\right) - x1}{t_3}\\
t_5 := x1 + \left(\left(x1 + \left(t_0 + \left(t_2 + t_3 \cdot \left(\left(\left(x1 \cdot 2\right) \cdot t_4\right) \cdot \left(t_4 - 3\right) + \left(x1 \cdot x1\right) \cdot 6\right)\right)\right)\right) + 3 \cdot \left(x2 \cdot -2\right)\right)\\
\mathbf{if}\;x1 \leq -5.6 \cdot 10^{+102}:\\
\;\;\;\;x1 + 3 \cdot \left(\left(x1 \cdot x1\right) \cdot \left(3 - x2 \cdot -2\right)\right)\\
\mathbf{elif}\;x1 \leq -0.05:\\
\;\;\;\;t_5\\
\mathbf{elif}\;x1 \leq 0.048:\\
\;\;\;\;x1 + \left(3 \cdot \frac{\left(t_1 - 2 \cdot x2\right) - x1}{t_3} + \left(x1 + 4 \cdot \left(x2 \cdot \left(x1 \cdot \left(2 \cdot x2 - 3\right)\right)\right)\right)\right)\\
\mathbf{elif}\;x1 \leq 2 \cdot 10^{+76}:\\
\;\;\;\;t_5\\
\mathbf{else}:\\
\;\;\;\;x1 + \left(3 \cdot \left(x2 \cdot -2 - x1\right) + \left(x1 + \left(t_0 + \left(t_2 + t_3 \cdot \left(x1 \cdot \left(x1 \cdot 6\right)\right)\right)\right)\right)\right)\\
\end{array}
\end{array}
if x1 < -5.60000000000000037e102Initial program 0.0%
Taylor expanded in x1 around 0 0.0%
Taylor expanded in x1 around 0 44.8%
+-commutative44.8%
neg-mul-144.8%
unsub-neg44.8%
+-commutative44.8%
*-commutative44.8%
fma-def44.8%
unpow244.8%
cancel-sign-sub-inv44.8%
metadata-eval44.8%
*-commutative44.8%
Simplified44.8%
Taylor expanded in x1 around inf 44.8%
Taylor expanded in x1 around inf 71.7%
unpow271.7%
metadata-eval71.7%
cancel-sign-sub-inv71.7%
*-commutative71.7%
Simplified71.7%
if -5.60000000000000037e102 < x1 < -0.050000000000000003 or 0.048000000000000001 < x1 < 2.0000000000000001e76Initial program 99.5%
Taylor expanded in x1 around inf 99.1%
Taylor expanded in x1 around inf 92.4%
Taylor expanded in x1 around 0 92.4%
*-commutative30.0%
Simplified92.4%
if -0.050000000000000003 < x1 < 0.048000000000000001Initial program 99.4%
Taylor expanded in x1 around 0 98.6%
if 2.0000000000000001e76 < x1 Initial program 31.7%
Taylor expanded in x1 around inf 31.7%
Taylor expanded in x1 around 0 31.7%
+-commutative31.7%
neg-mul-131.7%
unsub-neg31.7%
*-commutative31.7%
Simplified31.7%
Taylor expanded in x1 around inf 100.0%
*-commutative100.0%
unpow2100.0%
associate-*l*100.0%
Simplified100.0%
Final simplification92.5%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (* 3.0 (- (* x2 -2.0) x1)))
(t_1 (* x1 (* x1 x1)))
(t_2 (* x1 (* x1 3.0)))
(t_3 (* 3.0 t_2))
(t_4 (+ (* x1 x1) 1.0))
(t_5 (/ (- (+ t_2 (* 2.0 x2)) x1) t_4)))
(if (<= x1 -5.6e+102)
(+ x1 (* 3.0 (* (* x1 x1) (- 3.0 (* x2 -2.0)))))
(if (<= x1 2e+76)
(+
x1
(+
t_0
(+
x1
(+
t_1
(+
t_3
(*
t_4
(+ (* (* (* x1 2.0) t_5) (- t_5 3.0)) (* (* x1 x1) 6.0))))))))
(+ x1 (+ t_0 (+ x1 (+ t_1 (+ t_3 (* t_4 (* x1 (* x1 6.0))))))))))))
double code(double x1, double x2) {
double t_0 = 3.0 * ((x2 * -2.0) - x1);
double t_1 = x1 * (x1 * x1);
double t_2 = x1 * (x1 * 3.0);
double t_3 = 3.0 * t_2;
double t_4 = (x1 * x1) + 1.0;
double t_5 = ((t_2 + (2.0 * x2)) - x1) / t_4;
double tmp;
if (x1 <= -5.6e+102) {
tmp = x1 + (3.0 * ((x1 * x1) * (3.0 - (x2 * -2.0))));
} else if (x1 <= 2e+76) {
tmp = x1 + (t_0 + (x1 + (t_1 + (t_3 + (t_4 * ((((x1 * 2.0) * t_5) * (t_5 - 3.0)) + ((x1 * x1) * 6.0)))))));
} else {
tmp = x1 + (t_0 + (x1 + (t_1 + (t_3 + (t_4 * (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) :: t_3
real(8) :: t_4
real(8) :: t_5
real(8) :: tmp
t_0 = 3.0d0 * ((x2 * (-2.0d0)) - x1)
t_1 = x1 * (x1 * x1)
t_2 = x1 * (x1 * 3.0d0)
t_3 = 3.0d0 * t_2
t_4 = (x1 * x1) + 1.0d0
t_5 = ((t_2 + (2.0d0 * x2)) - x1) / t_4
if (x1 <= (-5.6d+102)) then
tmp = x1 + (3.0d0 * ((x1 * x1) * (3.0d0 - (x2 * (-2.0d0)))))
else if (x1 <= 2d+76) then
tmp = x1 + (t_0 + (x1 + (t_1 + (t_3 + (t_4 * ((((x1 * 2.0d0) * t_5) * (t_5 - 3.0d0)) + ((x1 * x1) * 6.0d0)))))))
else
tmp = x1 + (t_0 + (x1 + (t_1 + (t_3 + (t_4 * (x1 * (x1 * 6.0d0)))))))
end if
code = tmp
end function
public static double code(double x1, double x2) {
double t_0 = 3.0 * ((x2 * -2.0) - x1);
double t_1 = x1 * (x1 * x1);
double t_2 = x1 * (x1 * 3.0);
double t_3 = 3.0 * t_2;
double t_4 = (x1 * x1) + 1.0;
double t_5 = ((t_2 + (2.0 * x2)) - x1) / t_4;
double tmp;
if (x1 <= -5.6e+102) {
tmp = x1 + (3.0 * ((x1 * x1) * (3.0 - (x2 * -2.0))));
} else if (x1 <= 2e+76) {
tmp = x1 + (t_0 + (x1 + (t_1 + (t_3 + (t_4 * ((((x1 * 2.0) * t_5) * (t_5 - 3.0)) + ((x1 * x1) * 6.0)))))));
} else {
tmp = x1 + (t_0 + (x1 + (t_1 + (t_3 + (t_4 * (x1 * (x1 * 6.0)))))));
}
return tmp;
}
def code(x1, x2): t_0 = 3.0 * ((x2 * -2.0) - x1) t_1 = x1 * (x1 * x1) t_2 = x1 * (x1 * 3.0) t_3 = 3.0 * t_2 t_4 = (x1 * x1) + 1.0 t_5 = ((t_2 + (2.0 * x2)) - x1) / t_4 tmp = 0 if x1 <= -5.6e+102: tmp = x1 + (3.0 * ((x1 * x1) * (3.0 - (x2 * -2.0)))) elif x1 <= 2e+76: tmp = x1 + (t_0 + (x1 + (t_1 + (t_3 + (t_4 * ((((x1 * 2.0) * t_5) * (t_5 - 3.0)) + ((x1 * x1) * 6.0))))))) else: tmp = x1 + (t_0 + (x1 + (t_1 + (t_3 + (t_4 * (x1 * (x1 * 6.0))))))) return tmp
function code(x1, x2) t_0 = Float64(3.0 * Float64(Float64(x2 * -2.0) - x1)) t_1 = Float64(x1 * Float64(x1 * x1)) t_2 = Float64(x1 * Float64(x1 * 3.0)) t_3 = Float64(3.0 * t_2) t_4 = Float64(Float64(x1 * x1) + 1.0) t_5 = Float64(Float64(Float64(t_2 + Float64(2.0 * x2)) - x1) / t_4) tmp = 0.0 if (x1 <= -5.6e+102) tmp = Float64(x1 + Float64(3.0 * Float64(Float64(x1 * x1) * Float64(3.0 - Float64(x2 * -2.0))))); elseif (x1 <= 2e+76) tmp = Float64(x1 + Float64(t_0 + Float64(x1 + Float64(t_1 + Float64(t_3 + Float64(t_4 * Float64(Float64(Float64(Float64(x1 * 2.0) * t_5) * Float64(t_5 - 3.0)) + Float64(Float64(x1 * x1) * 6.0)))))))); else tmp = Float64(x1 + Float64(t_0 + Float64(x1 + Float64(t_1 + Float64(t_3 + Float64(t_4 * Float64(x1 * Float64(x1 * 6.0)))))))); end return tmp end
function tmp_2 = code(x1, x2) t_0 = 3.0 * ((x2 * -2.0) - x1); t_1 = x1 * (x1 * x1); t_2 = x1 * (x1 * 3.0); t_3 = 3.0 * t_2; t_4 = (x1 * x1) + 1.0; t_5 = ((t_2 + (2.0 * x2)) - x1) / t_4; tmp = 0.0; if (x1 <= -5.6e+102) tmp = x1 + (3.0 * ((x1 * x1) * (3.0 - (x2 * -2.0)))); elseif (x1 <= 2e+76) tmp = x1 + (t_0 + (x1 + (t_1 + (t_3 + (t_4 * ((((x1 * 2.0) * t_5) * (t_5 - 3.0)) + ((x1 * x1) * 6.0))))))); else tmp = x1 + (t_0 + (x1 + (t_1 + (t_3 + (t_4 * (x1 * (x1 * 6.0))))))); end tmp_2 = tmp; end
code[x1_, x2_] := Block[{t$95$0 = N[(3.0 * N[(N[(x2 * -2.0), $MachinePrecision] - x1), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(x1 * N[(x1 * x1), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x1 * N[(x1 * 3.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(3.0 * t$95$2), $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, -5.6e+102], N[(x1 + N[(3.0 * N[(N[(x1 * x1), $MachinePrecision] * N[(3.0 - N[(x2 * -2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 2e+76], N[(x1 + N[(t$95$0 + N[(x1 + N[(t$95$1 + N[(t$95$3 + N[(t$95$4 * N[(N[(N[(N[(x1 * 2.0), $MachinePrecision] * t$95$5), $MachinePrecision] * N[(t$95$5 - 3.0), $MachinePrecision]), $MachinePrecision] + N[(N[(x1 * x1), $MachinePrecision] * 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x1 + N[(t$95$0 + N[(x1 + N[(t$95$1 + N[(t$95$3 + N[(t$95$4 * N[(x1 * N[(x1 * 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := 3 \cdot \left(x2 \cdot -2 - x1\right)\\
t_1 := x1 \cdot \left(x1 \cdot x1\right)\\
t_2 := x1 \cdot \left(x1 \cdot 3\right)\\
t_3 := 3 \cdot t_2\\
t_4 := x1 \cdot x1 + 1\\
t_5 := \frac{\left(t_2 + 2 \cdot x2\right) - x1}{t_4}\\
\mathbf{if}\;x1 \leq -5.6 \cdot 10^{+102}:\\
\;\;\;\;x1 + 3 \cdot \left(\left(x1 \cdot x1\right) \cdot \left(3 - x2 \cdot -2\right)\right)\\
\mathbf{elif}\;x1 \leq 2 \cdot 10^{+76}:\\
\;\;\;\;x1 + \left(t_0 + \left(x1 + \left(t_1 + \left(t_3 + t_4 \cdot \left(\left(\left(x1 \cdot 2\right) \cdot t_5\right) \cdot \left(t_5 - 3\right) + \left(x1 \cdot x1\right) \cdot 6\right)\right)\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x1 + \left(t_0 + \left(x1 + \left(t_1 + \left(t_3 + t_4 \cdot \left(x1 \cdot \left(x1 \cdot 6\right)\right)\right)\right)\right)\right)\\
\end{array}
\end{array}
if x1 < -5.60000000000000037e102Initial program 0.0%
Taylor expanded in x1 around 0 0.0%
Taylor expanded in x1 around 0 44.8%
+-commutative44.8%
neg-mul-144.8%
unsub-neg44.8%
+-commutative44.8%
*-commutative44.8%
fma-def44.8%
unpow244.8%
cancel-sign-sub-inv44.8%
metadata-eval44.8%
*-commutative44.8%
Simplified44.8%
Taylor expanded in x1 around inf 44.8%
Taylor expanded in x1 around inf 71.7%
unpow271.7%
metadata-eval71.7%
cancel-sign-sub-inv71.7%
*-commutative71.7%
Simplified71.7%
if -5.60000000000000037e102 < x1 < 2.0000000000000001e76Initial program 99.4%
Taylor expanded in x1 around inf 98.4%
Taylor expanded in x1 around inf 96.9%
Taylor expanded in x1 around 0 96.9%
+-commutative99.4%
neg-mul-199.4%
unsub-neg99.4%
*-commutative99.4%
Simplified96.9%
if 2.0000000000000001e76 < x1 Initial program 31.7%
Taylor expanded in x1 around inf 31.7%
Taylor expanded in x1 around 0 31.7%
+-commutative31.7%
neg-mul-131.7%
unsub-neg31.7%
*-commutative31.7%
Simplified31.7%
Taylor expanded in x1 around inf 100.0%
*-commutative100.0%
unpow2100.0%
associate-*l*100.0%
Simplified100.0%
Final simplification92.3%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (* x1 (* x1 x1)))
(t_1 (* x1 (* x1 3.0)))
(t_2 (* 3.0 t_1))
(t_3 (+ (* x1 x1) 1.0))
(t_4 (* 3.0 (/ (- (- t_1 (* 2.0 x2)) x1) t_3))))
(if (<= x1 -5.6e+102)
(+ x1 (* 3.0 (* (* x1 x1) (- 3.0 (* x2 -2.0)))))
(if (<= x1 -2.05e+17)
(+
x1
(+
t_4
(+
x1
(+
t_0
(+
t_2
(*
t_3
(+
(* (* x1 x1) (- (* (/ (- (+ t_1 (* 2.0 x2)) x1) t_3) 4.0) 6.0))
(+ x1 x1))))))))
(if (<= x1 12800.0)
(+ x1 (+ t_4 (+ x1 (* 4.0 (* x2 (* x1 (- (* 2.0 x2) 3.0)))))))
(+
x1
(+
(* 3.0 (- (* x2 -2.0) x1))
(+ x1 (+ t_0 (+ t_2 (* t_3 (* (* x1 x1) 6.0))))))))))))
double code(double x1, double x2) {
double t_0 = x1 * (x1 * x1);
double t_1 = x1 * (x1 * 3.0);
double t_2 = 3.0 * t_1;
double t_3 = (x1 * x1) + 1.0;
double t_4 = 3.0 * (((t_1 - (2.0 * x2)) - x1) / t_3);
double tmp;
if (x1 <= -5.6e+102) {
tmp = x1 + (3.0 * ((x1 * x1) * (3.0 - (x2 * -2.0))));
} else if (x1 <= -2.05e+17) {
tmp = x1 + (t_4 + (x1 + (t_0 + (t_2 + (t_3 * (((x1 * x1) * (((((t_1 + (2.0 * x2)) - x1) / t_3) * 4.0) - 6.0)) + (x1 + x1)))))));
} else if (x1 <= 12800.0) {
tmp = x1 + (t_4 + (x1 + (4.0 * (x2 * (x1 * ((2.0 * x2) - 3.0))))));
} else {
tmp = x1 + ((3.0 * ((x2 * -2.0) - x1)) + (x1 + (t_0 + (t_2 + (t_3 * ((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) :: t_3
real(8) :: t_4
real(8) :: tmp
t_0 = x1 * (x1 * x1)
t_1 = x1 * (x1 * 3.0d0)
t_2 = 3.0d0 * t_1
t_3 = (x1 * x1) + 1.0d0
t_4 = 3.0d0 * (((t_1 - (2.0d0 * x2)) - x1) / t_3)
if (x1 <= (-5.6d+102)) then
tmp = x1 + (3.0d0 * ((x1 * x1) * (3.0d0 - (x2 * (-2.0d0)))))
else if (x1 <= (-2.05d+17)) then
tmp = x1 + (t_4 + (x1 + (t_0 + (t_2 + (t_3 * (((x1 * x1) * (((((t_1 + (2.0d0 * x2)) - x1) / t_3) * 4.0d0) - 6.0d0)) + (x1 + x1)))))))
else if (x1 <= 12800.0d0) then
tmp = x1 + (t_4 + (x1 + (4.0d0 * (x2 * (x1 * ((2.0d0 * x2) - 3.0d0))))))
else
tmp = x1 + ((3.0d0 * ((x2 * (-2.0d0)) - x1)) + (x1 + (t_0 + (t_2 + (t_3 * ((x1 * x1) * 6.0d0))))))
end if
code = tmp
end function
public static double code(double x1, double x2) {
double t_0 = x1 * (x1 * x1);
double t_1 = x1 * (x1 * 3.0);
double t_2 = 3.0 * t_1;
double t_3 = (x1 * x1) + 1.0;
double t_4 = 3.0 * (((t_1 - (2.0 * x2)) - x1) / t_3);
double tmp;
if (x1 <= -5.6e+102) {
tmp = x1 + (3.0 * ((x1 * x1) * (3.0 - (x2 * -2.0))));
} else if (x1 <= -2.05e+17) {
tmp = x1 + (t_4 + (x1 + (t_0 + (t_2 + (t_3 * (((x1 * x1) * (((((t_1 + (2.0 * x2)) - x1) / t_3) * 4.0) - 6.0)) + (x1 + x1)))))));
} else if (x1 <= 12800.0) {
tmp = x1 + (t_4 + (x1 + (4.0 * (x2 * (x1 * ((2.0 * x2) - 3.0))))));
} else {
tmp = x1 + ((3.0 * ((x2 * -2.0) - x1)) + (x1 + (t_0 + (t_2 + (t_3 * ((x1 * x1) * 6.0))))));
}
return tmp;
}
def code(x1, x2): t_0 = x1 * (x1 * x1) t_1 = x1 * (x1 * 3.0) t_2 = 3.0 * t_1 t_3 = (x1 * x1) + 1.0 t_4 = 3.0 * (((t_1 - (2.0 * x2)) - x1) / t_3) tmp = 0 if x1 <= -5.6e+102: tmp = x1 + (3.0 * ((x1 * x1) * (3.0 - (x2 * -2.0)))) elif x1 <= -2.05e+17: tmp = x1 + (t_4 + (x1 + (t_0 + (t_2 + (t_3 * (((x1 * x1) * (((((t_1 + (2.0 * x2)) - x1) / t_3) * 4.0) - 6.0)) + (x1 + x1))))))) elif x1 <= 12800.0: tmp = x1 + (t_4 + (x1 + (4.0 * (x2 * (x1 * ((2.0 * x2) - 3.0)))))) else: tmp = x1 + ((3.0 * ((x2 * -2.0) - x1)) + (x1 + (t_0 + (t_2 + (t_3 * ((x1 * x1) * 6.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(3.0 * t_1) t_3 = Float64(Float64(x1 * x1) + 1.0) t_4 = Float64(3.0 * Float64(Float64(Float64(t_1 - Float64(2.0 * x2)) - x1) / t_3)) tmp = 0.0 if (x1 <= -5.6e+102) tmp = Float64(x1 + Float64(3.0 * Float64(Float64(x1 * x1) * Float64(3.0 - Float64(x2 * -2.0))))); elseif (x1 <= -2.05e+17) tmp = Float64(x1 + Float64(t_4 + Float64(x1 + Float64(t_0 + Float64(t_2 + 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(x1 + x1)))))))); elseif (x1 <= 12800.0) tmp = Float64(x1 + Float64(t_4 + Float64(x1 + Float64(4.0 * Float64(x2 * Float64(x1 * Float64(Float64(2.0 * x2) - 3.0))))))); else tmp = Float64(x1 + Float64(Float64(3.0 * Float64(Float64(x2 * -2.0) - x1)) + Float64(x1 + Float64(t_0 + Float64(t_2 + Float64(t_3 * Float64(Float64(x1 * x1) * 6.0))))))); end return tmp end
function tmp_2 = code(x1, x2) t_0 = x1 * (x1 * x1); t_1 = x1 * (x1 * 3.0); t_2 = 3.0 * t_1; t_3 = (x1 * x1) + 1.0; t_4 = 3.0 * (((t_1 - (2.0 * x2)) - x1) / t_3); tmp = 0.0; if (x1 <= -5.6e+102) tmp = x1 + (3.0 * ((x1 * x1) * (3.0 - (x2 * -2.0)))); elseif (x1 <= -2.05e+17) tmp = x1 + (t_4 + (x1 + (t_0 + (t_2 + (t_3 * (((x1 * x1) * (((((t_1 + (2.0 * x2)) - x1) / t_3) * 4.0) - 6.0)) + (x1 + x1))))))); elseif (x1 <= 12800.0) tmp = x1 + (t_4 + (x1 + (4.0 * (x2 * (x1 * ((2.0 * x2) - 3.0)))))); else tmp = x1 + ((3.0 * ((x2 * -2.0) - x1)) + (x1 + (t_0 + (t_2 + (t_3 * ((x1 * x1) * 6.0)))))); end tmp_2 = tmp; end
code[x1_, x2_] := Block[{t$95$0 = N[(x1 * N[(x1 * x1), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(x1 * N[(x1 * 3.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(3.0 * t$95$1), $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$1 - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$3), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x1, -5.6e+102], N[(x1 + N[(3.0 * N[(N[(x1 * x1), $MachinePrecision] * N[(3.0 - N[(x2 * -2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, -2.05e+17], N[(x1 + N[(t$95$4 + N[(x1 + N[(t$95$0 + N[(t$95$2 + 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[(x1 + x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 12800.0], N[(x1 + N[(t$95$4 + N[(x1 + N[(4.0 * N[(x2 * N[(x1 * N[(N[(2.0 * x2), $MachinePrecision] - 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x1 + N[(N[(3.0 * N[(N[(x2 * -2.0), $MachinePrecision] - x1), $MachinePrecision]), $MachinePrecision] + N[(x1 + N[(t$95$0 + N[(t$95$2 + N[(t$95$3 * N[(N[(x1 * x1), $MachinePrecision] * 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x1 \cdot \left(x1 \cdot x1\right)\\
t_1 := x1 \cdot \left(x1 \cdot 3\right)\\
t_2 := 3 \cdot t_1\\
t_3 := x1 \cdot x1 + 1\\
t_4 := 3 \cdot \frac{\left(t_1 - 2 \cdot x2\right) - x1}{t_3}\\
\mathbf{if}\;x1 \leq -5.6 \cdot 10^{+102}:\\
\;\;\;\;x1 + 3 \cdot \left(\left(x1 \cdot x1\right) \cdot \left(3 - x2 \cdot -2\right)\right)\\
\mathbf{elif}\;x1 \leq -2.05 \cdot 10^{+17}:\\
\;\;\;\;x1 + \left(t_4 + \left(x1 + \left(t_0 + \left(t_2 + 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) + \left(x1 + x1\right)\right)\right)\right)\right)\right)\\
\mathbf{elif}\;x1 \leq 12800:\\
\;\;\;\;x1 + \left(t_4 + \left(x1 + 4 \cdot \left(x2 \cdot \left(x1 \cdot \left(2 \cdot x2 - 3\right)\right)\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x1 + \left(3 \cdot \left(x2 \cdot -2 - x1\right) + \left(x1 + \left(t_0 + \left(t_2 + t_3 \cdot \left(\left(x1 \cdot x1\right) \cdot 6\right)\right)\right)\right)\right)\\
\end{array}
\end{array}
if x1 < -5.60000000000000037e102Initial program 0.0%
Taylor expanded in x1 around 0 0.0%
Taylor expanded in x1 around 0 44.8%
+-commutative44.8%
neg-mul-144.8%
unsub-neg44.8%
+-commutative44.8%
*-commutative44.8%
fma-def44.8%
unpow244.8%
cancel-sign-sub-inv44.8%
metadata-eval44.8%
*-commutative44.8%
Simplified44.8%
Taylor expanded in x1 around inf 44.8%
Taylor expanded in x1 around inf 71.7%
unpow271.7%
metadata-eval71.7%
cancel-sign-sub-inv71.7%
*-commutative71.7%
Simplified71.7%
if -5.60000000000000037e102 < x1 < -2.05e17Initial program 99.4%
Taylor expanded in x1 around 0 78.2%
Taylor expanded in x1 around inf 92.2%
rem-log-exp21.5%
*-commutative21.5%
exp-lft-sqr21.5%
log-prod21.5%
rem-log-exp21.5%
rem-log-exp92.2%
Simplified92.2%
Taylor expanded in x1 around inf 92.2%
if -2.05e17 < x1 < 12800Initial program 99.4%
Taylor expanded in x1 around 0 96.6%
if 12800 < x1 Initial program 52.4%
Taylor expanded in x1 around inf 52.1%
Taylor expanded in x1 around 0 52.4%
+-commutative52.4%
neg-mul-152.4%
unsub-neg52.4%
*-commutative52.4%
Simplified52.4%
Taylor expanded in x1 around inf 87.9%
*-commutative87.9%
unpow287.9%
Simplified87.9%
Final simplification89.3%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (+ (* x1 x1) 1.0)) (t_1 (* x1 (* x1 3.0))))
(if (<= x1 -5.6e+102)
(+ x1 (* 3.0 (* (* x1 x1) (- 3.0 (* x2 -2.0)))))
(if (or (<= x1 -8e+34) (not (<= x1 11000.0)))
(+
x1
(+
(* 3.0 (- (* x2 -2.0) x1))
(+
x1
(+ (* x1 (* x1 x1)) (+ (* 3.0 t_1) (* t_0 (* x1 (* x1 6.0))))))))
(+
x1
(+
(* 3.0 (/ (- (- t_1 (* 2.0 x2)) x1) t_0))
(+ x1 (* 4.0 (* x2 (* x1 (- (* 2.0 x2) 3.0)))))))))))
double code(double x1, double x2) {
double t_0 = (x1 * x1) + 1.0;
double t_1 = x1 * (x1 * 3.0);
double tmp;
if (x1 <= -5.6e+102) {
tmp = x1 + (3.0 * ((x1 * x1) * (3.0 - (x2 * -2.0))));
} else if ((x1 <= -8e+34) || !(x1 <= 11000.0)) {
tmp = x1 + ((3.0 * ((x2 * -2.0) - x1)) + (x1 + ((x1 * (x1 * x1)) + ((3.0 * t_1) + (t_0 * (x1 * (x1 * 6.0)))))));
} else {
tmp = x1 + ((3.0 * (((t_1 - (2.0 * x2)) - x1) / t_0)) + (x1 + (4.0 * (x2 * (x1 * ((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) :: t_1
real(8) :: tmp
t_0 = (x1 * x1) + 1.0d0
t_1 = x1 * (x1 * 3.0d0)
if (x1 <= (-5.6d+102)) then
tmp = x1 + (3.0d0 * ((x1 * x1) * (3.0d0 - (x2 * (-2.0d0)))))
else if ((x1 <= (-8d+34)) .or. (.not. (x1 <= 11000.0d0))) then
tmp = x1 + ((3.0d0 * ((x2 * (-2.0d0)) - x1)) + (x1 + ((x1 * (x1 * x1)) + ((3.0d0 * t_1) + (t_0 * (x1 * (x1 * 6.0d0)))))))
else
tmp = x1 + ((3.0d0 * (((t_1 - (2.0d0 * x2)) - x1) / t_0)) + (x1 + (4.0d0 * (x2 * (x1 * ((2.0d0 * x2) - 3.0d0))))))
end if
code = tmp
end function
public static double code(double x1, double x2) {
double t_0 = (x1 * x1) + 1.0;
double t_1 = x1 * (x1 * 3.0);
double tmp;
if (x1 <= -5.6e+102) {
tmp = x1 + (3.0 * ((x1 * x1) * (3.0 - (x2 * -2.0))));
} else if ((x1 <= -8e+34) || !(x1 <= 11000.0)) {
tmp = x1 + ((3.0 * ((x2 * -2.0) - x1)) + (x1 + ((x1 * (x1 * x1)) + ((3.0 * t_1) + (t_0 * (x1 * (x1 * 6.0)))))));
} else {
tmp = x1 + ((3.0 * (((t_1 - (2.0 * x2)) - x1) / t_0)) + (x1 + (4.0 * (x2 * (x1 * ((2.0 * x2) - 3.0))))));
}
return tmp;
}
def code(x1, x2): t_0 = (x1 * x1) + 1.0 t_1 = x1 * (x1 * 3.0) tmp = 0 if x1 <= -5.6e+102: tmp = x1 + (3.0 * ((x1 * x1) * (3.0 - (x2 * -2.0)))) elif (x1 <= -8e+34) or not (x1 <= 11000.0): tmp = x1 + ((3.0 * ((x2 * -2.0) - x1)) + (x1 + ((x1 * (x1 * x1)) + ((3.0 * t_1) + (t_0 * (x1 * (x1 * 6.0))))))) else: tmp = x1 + ((3.0 * (((t_1 - (2.0 * x2)) - x1) / t_0)) + (x1 + (4.0 * (x2 * (x1 * ((2.0 * x2) - 3.0)))))) return tmp
function code(x1, x2) t_0 = Float64(Float64(x1 * x1) + 1.0) t_1 = Float64(x1 * Float64(x1 * 3.0)) tmp = 0.0 if (x1 <= -5.6e+102) tmp = Float64(x1 + Float64(3.0 * Float64(Float64(x1 * x1) * Float64(3.0 - Float64(x2 * -2.0))))); elseif ((x1 <= -8e+34) || !(x1 <= 11000.0)) tmp = Float64(x1 + Float64(Float64(3.0 * Float64(Float64(x2 * -2.0) - x1)) + Float64(x1 + Float64(Float64(x1 * Float64(x1 * x1)) + Float64(Float64(3.0 * t_1) + Float64(t_0 * Float64(x1 * Float64(x1 * 6.0)))))))); else tmp = Float64(x1 + Float64(Float64(3.0 * Float64(Float64(Float64(t_1 - Float64(2.0 * x2)) - x1) / t_0)) + Float64(x1 + Float64(4.0 * Float64(x2 * Float64(x1 * Float64(Float64(2.0 * x2) - 3.0))))))); end return tmp end
function tmp_2 = code(x1, x2) t_0 = (x1 * x1) + 1.0; t_1 = x1 * (x1 * 3.0); tmp = 0.0; if (x1 <= -5.6e+102) tmp = x1 + (3.0 * ((x1 * x1) * (3.0 - (x2 * -2.0)))); elseif ((x1 <= -8e+34) || ~((x1 <= 11000.0))) tmp = x1 + ((3.0 * ((x2 * -2.0) - x1)) + (x1 + ((x1 * (x1 * x1)) + ((3.0 * t_1) + (t_0 * (x1 * (x1 * 6.0))))))); else tmp = x1 + ((3.0 * (((t_1 - (2.0 * x2)) - x1) / t_0)) + (x1 + (4.0 * (x2 * (x1 * ((2.0 * x2) - 3.0)))))); end tmp_2 = tmp; end
code[x1_, x2_] := Block[{t$95$0 = N[(N[(x1 * x1), $MachinePrecision] + 1.0), $MachinePrecision]}, Block[{t$95$1 = N[(x1 * N[(x1 * 3.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x1, -5.6e+102], N[(x1 + N[(3.0 * N[(N[(x1 * x1), $MachinePrecision] * N[(3.0 - N[(x2 * -2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[x1, -8e+34], N[Not[LessEqual[x1, 11000.0]], $MachinePrecision]], N[(x1 + N[(N[(3.0 * N[(N[(x2 * -2.0), $MachinePrecision] - x1), $MachinePrecision]), $MachinePrecision] + N[(x1 + N[(N[(x1 * N[(x1 * x1), $MachinePrecision]), $MachinePrecision] + N[(N[(3.0 * t$95$1), $MachinePrecision] + N[(t$95$0 * N[(x1 * N[(x1 * 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $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[(4.0 * N[(x2 * N[(x1 * N[(N[(2.0 * x2), $MachinePrecision] - 3.0), $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)\\
\mathbf{if}\;x1 \leq -5.6 \cdot 10^{+102}:\\
\;\;\;\;x1 + 3 \cdot \left(\left(x1 \cdot x1\right) \cdot \left(3 - x2 \cdot -2\right)\right)\\
\mathbf{elif}\;x1 \leq -8 \cdot 10^{+34} \lor \neg \left(x1 \leq 11000\right):\\
\;\;\;\;x1 + \left(3 \cdot \left(x2 \cdot -2 - x1\right) + \left(x1 + \left(x1 \cdot \left(x1 \cdot x1\right) + \left(3 \cdot t_1 + t_0 \cdot \left(x1 \cdot \left(x1 \cdot 6\right)\right)\right)\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x1 + \left(3 \cdot \frac{\left(t_1 - 2 \cdot x2\right) - x1}{t_0} + \left(x1 + 4 \cdot \left(x2 \cdot \left(x1 \cdot \left(2 \cdot x2 - 3\right)\right)\right)\right)\right)\\
\end{array}
\end{array}
if x1 < -5.60000000000000037e102Initial program 0.0%
Taylor expanded in x1 around 0 0.0%
Taylor expanded in x1 around 0 44.8%
+-commutative44.8%
neg-mul-144.8%
unsub-neg44.8%
+-commutative44.8%
*-commutative44.8%
fma-def44.8%
unpow244.8%
cancel-sign-sub-inv44.8%
metadata-eval44.8%
*-commutative44.8%
Simplified44.8%
Taylor expanded in x1 around inf 44.8%
Taylor expanded in x1 around inf 71.7%
unpow271.7%
metadata-eval71.7%
cancel-sign-sub-inv71.7%
*-commutative71.7%
Simplified71.7%
if -5.60000000000000037e102 < x1 < -7.99999999999999956e34 or 11000 < x1 Initial program 60.3%
Taylor expanded in x1 around inf 60.1%
Taylor expanded in x1 around 0 60.3%
+-commutative60.3%
neg-mul-160.3%
unsub-neg60.3%
*-commutative60.3%
Simplified60.3%
Taylor expanded in x1 around inf 87.1%
*-commutative87.1%
unpow287.1%
associate-*l*87.2%
Simplified87.2%
if -7.99999999999999956e34 < x1 < 11000Initial program 99.4%
Taylor expanded in x1 around 0 95.9%
Final simplification88.6%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (* 3.0 (- (* x2 -2.0) x1)))
(t_1 (* x1 (* x1 x1)))
(t_2 (* x1 (* x1 3.0)))
(t_3 (* 3.0 t_2))
(t_4 (+ (* x1 x1) 1.0)))
(if (<= x1 -5.6e+102)
(+ x1 (* 3.0 (* (* x1 x1) (- 3.0 (* x2 -2.0)))))
(if (<= x1 -3.5e+34)
(+ x1 (+ t_0 (+ x1 (+ t_1 (+ t_3 (* t_4 (* x1 (* x1 6.0))))))))
(if (<= x1 2000.0)
(+
x1
(+
(* 3.0 (/ (- (- t_2 (* 2.0 x2)) x1) t_4))
(+ x1 (* 4.0 (* x2 (* x1 (- (* 2.0 x2) 3.0)))))))
(+ x1 (+ t_0 (+ x1 (+ t_1 (+ t_3 (* t_4 (* (* x1 x1) 6.0))))))))))))
double code(double x1, double x2) {
double t_0 = 3.0 * ((x2 * -2.0) - x1);
double t_1 = x1 * (x1 * x1);
double t_2 = x1 * (x1 * 3.0);
double t_3 = 3.0 * t_2;
double t_4 = (x1 * x1) + 1.0;
double tmp;
if (x1 <= -5.6e+102) {
tmp = x1 + (3.0 * ((x1 * x1) * (3.0 - (x2 * -2.0))));
} else if (x1 <= -3.5e+34) {
tmp = x1 + (t_0 + (x1 + (t_1 + (t_3 + (t_4 * (x1 * (x1 * 6.0)))))));
} else if (x1 <= 2000.0) {
tmp = x1 + ((3.0 * (((t_2 - (2.0 * x2)) - x1) / t_4)) + (x1 + (4.0 * (x2 * (x1 * ((2.0 * x2) - 3.0))))));
} else {
tmp = x1 + (t_0 + (x1 + (t_1 + (t_3 + (t_4 * ((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) :: t_3
real(8) :: t_4
real(8) :: tmp
t_0 = 3.0d0 * ((x2 * (-2.0d0)) - x1)
t_1 = x1 * (x1 * x1)
t_2 = x1 * (x1 * 3.0d0)
t_3 = 3.0d0 * t_2
t_4 = (x1 * x1) + 1.0d0
if (x1 <= (-5.6d+102)) then
tmp = x1 + (3.0d0 * ((x1 * x1) * (3.0d0 - (x2 * (-2.0d0)))))
else if (x1 <= (-3.5d+34)) then
tmp = x1 + (t_0 + (x1 + (t_1 + (t_3 + (t_4 * (x1 * (x1 * 6.0d0)))))))
else if (x1 <= 2000.0d0) then
tmp = x1 + ((3.0d0 * (((t_2 - (2.0d0 * x2)) - x1) / t_4)) + (x1 + (4.0d0 * (x2 * (x1 * ((2.0d0 * x2) - 3.0d0))))))
else
tmp = x1 + (t_0 + (x1 + (t_1 + (t_3 + (t_4 * ((x1 * x1) * 6.0d0))))))
end if
code = tmp
end function
public static double code(double x1, double x2) {
double t_0 = 3.0 * ((x2 * -2.0) - x1);
double t_1 = x1 * (x1 * x1);
double t_2 = x1 * (x1 * 3.0);
double t_3 = 3.0 * t_2;
double t_4 = (x1 * x1) + 1.0;
double tmp;
if (x1 <= -5.6e+102) {
tmp = x1 + (3.0 * ((x1 * x1) * (3.0 - (x2 * -2.0))));
} else if (x1 <= -3.5e+34) {
tmp = x1 + (t_0 + (x1 + (t_1 + (t_3 + (t_4 * (x1 * (x1 * 6.0)))))));
} else if (x1 <= 2000.0) {
tmp = x1 + ((3.0 * (((t_2 - (2.0 * x2)) - x1) / t_4)) + (x1 + (4.0 * (x2 * (x1 * ((2.0 * x2) - 3.0))))));
} else {
tmp = x1 + (t_0 + (x1 + (t_1 + (t_3 + (t_4 * ((x1 * x1) * 6.0))))));
}
return tmp;
}
def code(x1, x2): t_0 = 3.0 * ((x2 * -2.0) - x1) t_1 = x1 * (x1 * x1) t_2 = x1 * (x1 * 3.0) t_3 = 3.0 * t_2 t_4 = (x1 * x1) + 1.0 tmp = 0 if x1 <= -5.6e+102: tmp = x1 + (3.0 * ((x1 * x1) * (3.0 - (x2 * -2.0)))) elif x1 <= -3.5e+34: tmp = x1 + (t_0 + (x1 + (t_1 + (t_3 + (t_4 * (x1 * (x1 * 6.0))))))) elif x1 <= 2000.0: tmp = x1 + ((3.0 * (((t_2 - (2.0 * x2)) - x1) / t_4)) + (x1 + (4.0 * (x2 * (x1 * ((2.0 * x2) - 3.0)))))) else: tmp = x1 + (t_0 + (x1 + (t_1 + (t_3 + (t_4 * ((x1 * x1) * 6.0)))))) return tmp
function code(x1, x2) t_0 = Float64(3.0 * Float64(Float64(x2 * -2.0) - x1)) t_1 = Float64(x1 * Float64(x1 * x1)) t_2 = Float64(x1 * Float64(x1 * 3.0)) t_3 = Float64(3.0 * t_2) t_4 = Float64(Float64(x1 * x1) + 1.0) tmp = 0.0 if (x1 <= -5.6e+102) tmp = Float64(x1 + Float64(3.0 * Float64(Float64(x1 * x1) * Float64(3.0 - Float64(x2 * -2.0))))); elseif (x1 <= -3.5e+34) tmp = Float64(x1 + Float64(t_0 + Float64(x1 + Float64(t_1 + Float64(t_3 + Float64(t_4 * Float64(x1 * Float64(x1 * 6.0)))))))); elseif (x1 <= 2000.0) tmp = Float64(x1 + Float64(Float64(3.0 * Float64(Float64(Float64(t_2 - Float64(2.0 * x2)) - x1) / t_4)) + Float64(x1 + Float64(4.0 * Float64(x2 * Float64(x1 * Float64(Float64(2.0 * x2) - 3.0))))))); else tmp = Float64(x1 + Float64(t_0 + Float64(x1 + Float64(t_1 + Float64(t_3 + Float64(t_4 * Float64(Float64(x1 * x1) * 6.0))))))); end return tmp end
function tmp_2 = code(x1, x2) t_0 = 3.0 * ((x2 * -2.0) - x1); t_1 = x1 * (x1 * x1); t_2 = x1 * (x1 * 3.0); t_3 = 3.0 * t_2; t_4 = (x1 * x1) + 1.0; tmp = 0.0; if (x1 <= -5.6e+102) tmp = x1 + (3.0 * ((x1 * x1) * (3.0 - (x2 * -2.0)))); elseif (x1 <= -3.5e+34) tmp = x1 + (t_0 + (x1 + (t_1 + (t_3 + (t_4 * (x1 * (x1 * 6.0))))))); elseif (x1 <= 2000.0) tmp = x1 + ((3.0 * (((t_2 - (2.0 * x2)) - x1) / t_4)) + (x1 + (4.0 * (x2 * (x1 * ((2.0 * x2) - 3.0)))))); else tmp = x1 + (t_0 + (x1 + (t_1 + (t_3 + (t_4 * ((x1 * x1) * 6.0)))))); end tmp_2 = tmp; end
code[x1_, x2_] := Block[{t$95$0 = N[(3.0 * N[(N[(x2 * -2.0), $MachinePrecision] - x1), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(x1 * N[(x1 * x1), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x1 * N[(x1 * 3.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(3.0 * t$95$2), $MachinePrecision]}, Block[{t$95$4 = N[(N[(x1 * x1), $MachinePrecision] + 1.0), $MachinePrecision]}, If[LessEqual[x1, -5.6e+102], N[(x1 + N[(3.0 * N[(N[(x1 * x1), $MachinePrecision] * N[(3.0 - N[(x2 * -2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, -3.5e+34], N[(x1 + N[(t$95$0 + N[(x1 + N[(t$95$1 + N[(t$95$3 + N[(t$95$4 * N[(x1 * N[(x1 * 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 2000.0], 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[(4.0 * N[(x2 * N[(x1 * N[(N[(2.0 * x2), $MachinePrecision] - 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x1 + N[(t$95$0 + N[(x1 + N[(t$95$1 + N[(t$95$3 + N[(t$95$4 * N[(N[(x1 * x1), $MachinePrecision] * 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := 3 \cdot \left(x2 \cdot -2 - x1\right)\\
t_1 := x1 \cdot \left(x1 \cdot x1\right)\\
t_2 := x1 \cdot \left(x1 \cdot 3\right)\\
t_3 := 3 \cdot t_2\\
t_4 := x1 \cdot x1 + 1\\
\mathbf{if}\;x1 \leq -5.6 \cdot 10^{+102}:\\
\;\;\;\;x1 + 3 \cdot \left(\left(x1 \cdot x1\right) \cdot \left(3 - x2 \cdot -2\right)\right)\\
\mathbf{elif}\;x1 \leq -3.5 \cdot 10^{+34}:\\
\;\;\;\;x1 + \left(t_0 + \left(x1 + \left(t_1 + \left(t_3 + t_4 \cdot \left(x1 \cdot \left(x1 \cdot 6\right)\right)\right)\right)\right)\right)\\
\mathbf{elif}\;x1 \leq 2000:\\
\;\;\;\;x1 + \left(3 \cdot \frac{\left(t_2 - 2 \cdot x2\right) - x1}{t_4} + \left(x1 + 4 \cdot \left(x2 \cdot \left(x1 \cdot \left(2 \cdot x2 - 3\right)\right)\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x1 + \left(t_0 + \left(x1 + \left(t_1 + \left(t_3 + t_4 \cdot \left(\left(x1 \cdot x1\right) \cdot 6\right)\right)\right)\right)\right)\\
\end{array}
\end{array}
if x1 < -5.60000000000000037e102Initial program 0.0%
Taylor expanded in x1 around 0 0.0%
Taylor expanded in x1 around 0 44.8%
+-commutative44.8%
neg-mul-144.8%
unsub-neg44.8%
+-commutative44.8%
*-commutative44.8%
fma-def44.8%
unpow244.8%
cancel-sign-sub-inv44.8%
metadata-eval44.8%
*-commutative44.8%
Simplified44.8%
Taylor expanded in x1 around inf 44.8%
Taylor expanded in x1 around inf 71.7%
unpow271.7%
metadata-eval71.7%
cancel-sign-sub-inv71.7%
*-commutative71.7%
Simplified71.7%
if -5.60000000000000037e102 < x1 < -3.49999999999999998e34Initial program 99.3%
Taylor expanded in x1 around inf 99.3%
Taylor expanded in x1 around 0 99.3%
+-commutative99.3%
neg-mul-199.3%
unsub-neg99.3%
*-commutative99.3%
Simplified99.3%
Taylor expanded in x1 around inf 83.2%
*-commutative83.2%
unpow283.2%
associate-*l*83.5%
Simplified83.5%
if -3.49999999999999998e34 < x1 < 2e3Initial program 99.4%
Taylor expanded in x1 around 0 95.9%
if 2e3 < x1 Initial program 52.4%
Taylor expanded in x1 around inf 52.1%
Taylor expanded in x1 around 0 52.4%
+-commutative52.4%
neg-mul-152.4%
unsub-neg52.4%
*-commutative52.4%
Simplified52.4%
Taylor expanded in x1 around inf 87.9%
*-commutative87.9%
unpow287.9%
Simplified87.9%
Final simplification88.6%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (+ x1 (* 4.0 (* x2 (* x1 (- (* 2.0 x2) 3.0)))))))
(if (<= x1 -4.8e+64)
(+ x1 (* 3.0 (* (* x1 x1) (- 3.0 (* x2 -2.0)))))
(if (<= x1 1.8)
(+
x1
(+
(* 3.0 (/ (- (- (* x1 (* x1 3.0)) (* 2.0 x2)) x1) (+ (* x1 x1) 1.0)))
t_0))
(+ x1 (+ t_0 (* 3.0 (- (* (* x1 x1) (+ x1 3.0)) x1))))))))
double code(double x1, double x2) {
double t_0 = x1 + (4.0 * (x2 * (x1 * ((2.0 * x2) - 3.0))));
double tmp;
if (x1 <= -4.8e+64) {
tmp = x1 + (3.0 * ((x1 * x1) * (3.0 - (x2 * -2.0))));
} else if (x1 <= 1.8) {
tmp = x1 + ((3.0 * ((((x1 * (x1 * 3.0)) - (2.0 * x2)) - x1) / ((x1 * x1) + 1.0))) + t_0);
} else {
tmp = x1 + (t_0 + (3.0 * (((x1 * x1) * (x1 + 3.0)) - x1)));
}
return tmp;
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
real(8) :: t_0
real(8) :: tmp
t_0 = x1 + (4.0d0 * (x2 * (x1 * ((2.0d0 * x2) - 3.0d0))))
if (x1 <= (-4.8d+64)) then
tmp = x1 + (3.0d0 * ((x1 * x1) * (3.0d0 - (x2 * (-2.0d0)))))
else if (x1 <= 1.8d0) then
tmp = x1 + ((3.0d0 * ((((x1 * (x1 * 3.0d0)) - (2.0d0 * x2)) - x1) / ((x1 * x1) + 1.0d0))) + t_0)
else
tmp = x1 + (t_0 + (3.0d0 * (((x1 * x1) * (x1 + 3.0d0)) - x1)))
end if
code = tmp
end function
public static double code(double x1, double x2) {
double t_0 = x1 + (4.0 * (x2 * (x1 * ((2.0 * x2) - 3.0))));
double tmp;
if (x1 <= -4.8e+64) {
tmp = x1 + (3.0 * ((x1 * x1) * (3.0 - (x2 * -2.0))));
} else if (x1 <= 1.8) {
tmp = x1 + ((3.0 * ((((x1 * (x1 * 3.0)) - (2.0 * x2)) - x1) / ((x1 * x1) + 1.0))) + t_0);
} else {
tmp = x1 + (t_0 + (3.0 * (((x1 * x1) * (x1 + 3.0)) - x1)));
}
return tmp;
}
def code(x1, x2): t_0 = x1 + (4.0 * (x2 * (x1 * ((2.0 * x2) - 3.0)))) tmp = 0 if x1 <= -4.8e+64: tmp = x1 + (3.0 * ((x1 * x1) * (3.0 - (x2 * -2.0)))) elif x1 <= 1.8: tmp = x1 + ((3.0 * ((((x1 * (x1 * 3.0)) - (2.0 * x2)) - x1) / ((x1 * x1) + 1.0))) + t_0) else: tmp = x1 + (t_0 + (3.0 * (((x1 * x1) * (x1 + 3.0)) - x1))) return tmp
function code(x1, x2) t_0 = Float64(x1 + Float64(4.0 * Float64(x2 * Float64(x1 * Float64(Float64(2.0 * x2) - 3.0))))) tmp = 0.0 if (x1 <= -4.8e+64) tmp = Float64(x1 + Float64(3.0 * Float64(Float64(x1 * x1) * Float64(3.0 - Float64(x2 * -2.0))))); elseif (x1 <= 1.8) tmp = Float64(x1 + Float64(Float64(3.0 * Float64(Float64(Float64(Float64(x1 * Float64(x1 * 3.0)) - Float64(2.0 * x2)) - x1) / Float64(Float64(x1 * x1) + 1.0))) + t_0)); else tmp = Float64(x1 + Float64(t_0 + Float64(3.0 * Float64(Float64(Float64(x1 * x1) * Float64(x1 + 3.0)) - x1)))); end return tmp end
function tmp_2 = code(x1, x2) t_0 = x1 + (4.0 * (x2 * (x1 * ((2.0 * x2) - 3.0)))); tmp = 0.0; if (x1 <= -4.8e+64) tmp = x1 + (3.0 * ((x1 * x1) * (3.0 - (x2 * -2.0)))); elseif (x1 <= 1.8) tmp = x1 + ((3.0 * ((((x1 * (x1 * 3.0)) - (2.0 * x2)) - x1) / ((x1 * x1) + 1.0))) + t_0); else tmp = x1 + (t_0 + (3.0 * (((x1 * x1) * (x1 + 3.0)) - x1))); end tmp_2 = tmp; end
code[x1_, x2_] := Block[{t$95$0 = N[(x1 + N[(4.0 * N[(x2 * N[(x1 * N[(N[(2.0 * x2), $MachinePrecision] - 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x1, -4.8e+64], N[(x1 + N[(3.0 * N[(N[(x1 * x1), $MachinePrecision] * N[(3.0 - N[(x2 * -2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 1.8], 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] + t$95$0), $MachinePrecision]), $MachinePrecision], N[(x1 + N[(t$95$0 + N[(3.0 * N[(N[(N[(x1 * x1), $MachinePrecision] * N[(x1 + 3.0), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x1 + 4 \cdot \left(x2 \cdot \left(x1 \cdot \left(2 \cdot x2 - 3\right)\right)\right)\\
\mathbf{if}\;x1 \leq -4.8 \cdot 10^{+64}:\\
\;\;\;\;x1 + 3 \cdot \left(\left(x1 \cdot x1\right) \cdot \left(3 - x2 \cdot -2\right)\right)\\
\mathbf{elif}\;x1 \leq 1.8:\\
\;\;\;\;x1 + \left(3 \cdot \frac{\left(x1 \cdot \left(x1 \cdot 3\right) - 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1} + t_0\right)\\
\mathbf{else}:\\
\;\;\;\;x1 + \left(t_0 + 3 \cdot \left(\left(x1 \cdot x1\right) \cdot \left(x1 + 3\right) - x1\right)\right)\\
\end{array}
\end{array}
if x1 < -4.79999999999999999e64Initial program 11.8%
Taylor expanded in x1 around 0 0.1%
Taylor expanded in x1 around 0 39.7%
+-commutative39.7%
neg-mul-139.7%
unsub-neg39.7%
+-commutative39.7%
*-commutative39.7%
fma-def39.7%
unpow239.7%
cancel-sign-sub-inv39.7%
metadata-eval39.7%
*-commutative39.7%
Simplified39.7%
Taylor expanded in x1 around inf 39.7%
Taylor expanded in x1 around inf 65.2%
unpow265.2%
metadata-eval65.2%
cancel-sign-sub-inv65.2%
*-commutative65.2%
Simplified65.2%
if -4.79999999999999999e64 < x1 < 1.80000000000000004Initial program 99.4%
Taylor expanded in x1 around 0 94.5%
if 1.80000000000000004 < x1 Initial program 53.1%
Taylor expanded in x1 around 0 18.8%
Taylor expanded in x1 around 0 55.7%
+-commutative55.7%
neg-mul-155.7%
unsub-neg55.7%
*-commutative55.7%
fma-def55.7%
+-commutative55.7%
cube-mult55.7%
unpow255.7%
distribute-rgt-out62.4%
unpow262.4%
cancel-sign-sub-inv62.4%
metadata-eval62.4%
Simplified62.4%
Taylor expanded in x2 around 0 74.1%
+-commutative74.1%
unpow274.1%
Simplified74.1%
Final simplification82.9%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (+ x1 (* 4.0 (* x2 (* x1 (- (* 2.0 x2) 3.0)))))))
(if (<= x1 -8.1e+62)
(+ x1 (* 3.0 (* (* x1 x1) (- 3.0 (* x2 -2.0)))))
(if (<= x1 1.36e-34)
(+ x1 (+ (* 3.0 (- (* x2 -2.0) x1)) t_0))
(+ x1 (+ t_0 (* 3.0 (- (* (* x1 x1) (+ x1 3.0)) x1))))))))
double code(double x1, double x2) {
double t_0 = x1 + (4.0 * (x2 * (x1 * ((2.0 * x2) - 3.0))));
double tmp;
if (x1 <= -8.1e+62) {
tmp = x1 + (3.0 * ((x1 * x1) * (3.0 - (x2 * -2.0))));
} else if (x1 <= 1.36e-34) {
tmp = x1 + ((3.0 * ((x2 * -2.0) - x1)) + t_0);
} else {
tmp = x1 + (t_0 + (3.0 * (((x1 * x1) * (x1 + 3.0)) - x1)));
}
return tmp;
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
real(8) :: t_0
real(8) :: tmp
t_0 = x1 + (4.0d0 * (x2 * (x1 * ((2.0d0 * x2) - 3.0d0))))
if (x1 <= (-8.1d+62)) then
tmp = x1 + (3.0d0 * ((x1 * x1) * (3.0d0 - (x2 * (-2.0d0)))))
else if (x1 <= 1.36d-34) then
tmp = x1 + ((3.0d0 * ((x2 * (-2.0d0)) - x1)) + t_0)
else
tmp = x1 + (t_0 + (3.0d0 * (((x1 * x1) * (x1 + 3.0d0)) - x1)))
end if
code = tmp
end function
public static double code(double x1, double x2) {
double t_0 = x1 + (4.0 * (x2 * (x1 * ((2.0 * x2) - 3.0))));
double tmp;
if (x1 <= -8.1e+62) {
tmp = x1 + (3.0 * ((x1 * x1) * (3.0 - (x2 * -2.0))));
} else if (x1 <= 1.36e-34) {
tmp = x1 + ((3.0 * ((x2 * -2.0) - x1)) + t_0);
} else {
tmp = x1 + (t_0 + (3.0 * (((x1 * x1) * (x1 + 3.0)) - x1)));
}
return tmp;
}
def code(x1, x2): t_0 = x1 + (4.0 * (x2 * (x1 * ((2.0 * x2) - 3.0)))) tmp = 0 if x1 <= -8.1e+62: tmp = x1 + (3.0 * ((x1 * x1) * (3.0 - (x2 * -2.0)))) elif x1 <= 1.36e-34: tmp = x1 + ((3.0 * ((x2 * -2.0) - x1)) + t_0) else: tmp = x1 + (t_0 + (3.0 * (((x1 * x1) * (x1 + 3.0)) - x1))) return tmp
function code(x1, x2) t_0 = Float64(x1 + Float64(4.0 * Float64(x2 * Float64(x1 * Float64(Float64(2.0 * x2) - 3.0))))) tmp = 0.0 if (x1 <= -8.1e+62) tmp = Float64(x1 + Float64(3.0 * Float64(Float64(x1 * x1) * Float64(3.0 - Float64(x2 * -2.0))))); elseif (x1 <= 1.36e-34) tmp = Float64(x1 + Float64(Float64(3.0 * Float64(Float64(x2 * -2.0) - x1)) + t_0)); else tmp = Float64(x1 + Float64(t_0 + Float64(3.0 * Float64(Float64(Float64(x1 * x1) * Float64(x1 + 3.0)) - x1)))); end return tmp end
function tmp_2 = code(x1, x2) t_0 = x1 + (4.0 * (x2 * (x1 * ((2.0 * x2) - 3.0)))); tmp = 0.0; if (x1 <= -8.1e+62) tmp = x1 + (3.0 * ((x1 * x1) * (3.0 - (x2 * -2.0)))); elseif (x1 <= 1.36e-34) tmp = x1 + ((3.0 * ((x2 * -2.0) - x1)) + t_0); else tmp = x1 + (t_0 + (3.0 * (((x1 * x1) * (x1 + 3.0)) - x1))); end tmp_2 = tmp; end
code[x1_, x2_] := Block[{t$95$0 = N[(x1 + N[(4.0 * N[(x2 * N[(x1 * N[(N[(2.0 * x2), $MachinePrecision] - 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x1, -8.1e+62], N[(x1 + N[(3.0 * N[(N[(x1 * x1), $MachinePrecision] * N[(3.0 - N[(x2 * -2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 1.36e-34], N[(x1 + N[(N[(3.0 * N[(N[(x2 * -2.0), $MachinePrecision] - x1), $MachinePrecision]), $MachinePrecision] + t$95$0), $MachinePrecision]), $MachinePrecision], N[(x1 + N[(t$95$0 + N[(3.0 * N[(N[(N[(x1 * x1), $MachinePrecision] * N[(x1 + 3.0), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x1 + 4 \cdot \left(x2 \cdot \left(x1 \cdot \left(2 \cdot x2 - 3\right)\right)\right)\\
\mathbf{if}\;x1 \leq -8.1 \cdot 10^{+62}:\\
\;\;\;\;x1 + 3 \cdot \left(\left(x1 \cdot x1\right) \cdot \left(3 - x2 \cdot -2\right)\right)\\
\mathbf{elif}\;x1 \leq 1.36 \cdot 10^{-34}:\\
\;\;\;\;x1 + \left(3 \cdot \left(x2 \cdot -2 - x1\right) + t_0\right)\\
\mathbf{else}:\\
\;\;\;\;x1 + \left(t_0 + 3 \cdot \left(\left(x1 \cdot x1\right) \cdot \left(x1 + 3\right) - x1\right)\right)\\
\end{array}
\end{array}
if x1 < -8.09999999999999998e62Initial program 11.8%
Taylor expanded in x1 around 0 0.1%
Taylor expanded in x1 around 0 39.7%
+-commutative39.7%
neg-mul-139.7%
unsub-neg39.7%
+-commutative39.7%
*-commutative39.7%
fma-def39.7%
unpow239.7%
cancel-sign-sub-inv39.7%
metadata-eval39.7%
*-commutative39.7%
Simplified39.7%
Taylor expanded in x1 around inf 39.7%
Taylor expanded in x1 around inf 65.2%
unpow265.2%
metadata-eval65.2%
cancel-sign-sub-inv65.2%
*-commutative65.2%
Simplified65.2%
if -8.09999999999999998e62 < x1 < 1.3600000000000001e-34Initial program 99.4%
Taylor expanded in x1 around 0 94.7%
Taylor expanded in x1 around 0 94.7%
+-commutative99.4%
neg-mul-199.4%
unsub-neg99.4%
*-commutative99.4%
Simplified94.7%
if 1.3600000000000001e-34 < x1 Initial program 59.7%
Taylor expanded in x1 around 0 29.1%
Taylor expanded in x1 around 0 60.7%
+-commutative60.7%
neg-mul-160.7%
unsub-neg60.7%
*-commutative60.7%
fma-def60.7%
+-commutative60.7%
cube-mult60.7%
unpow260.7%
distribute-rgt-out66.5%
unpow266.5%
cancel-sign-sub-inv66.5%
metadata-eval66.5%
Simplified66.5%
Taylor expanded in x2 around 0 76.5%
+-commutative76.5%
unpow276.5%
Simplified76.5%
Final simplification82.9%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0
(+
x1
(+ (* x1 (- (* 4.0 (* x2 (- (* 2.0 x2) 3.0))) 2.0)) (* x2 -6.0)))))
(if (<= x1 -2.15e+63)
(+ x1 (* 3.0 (* (* x1 x1) (- 3.0 (* x2 -2.0)))))
(if (<= x1 -1.9e-178)
t_0
(if (<= x1 3.5e-229)
(+ x1 (+ (* 3.0 (* x2 -2.0)) (+ x1 (* 4.0 (* x2 (* x2 (+ x1 x1)))))))
(if (<= x1 3.8e+102)
t_0
(+ x1 (+ x1 (* 3.0 (- (* (* x1 x1) (+ x1 3.0)) x1))))))))))
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 tmp;
if (x1 <= -2.15e+63) {
tmp = x1 + (3.0 * ((x1 * x1) * (3.0 - (x2 * -2.0))));
} else if (x1 <= -1.9e-178) {
tmp = t_0;
} else if (x1 <= 3.5e-229) {
tmp = x1 + ((3.0 * (x2 * -2.0)) + (x1 + (4.0 * (x2 * (x2 * (x1 + x1))))));
} else if (x1 <= 3.8e+102) {
tmp = t_0;
} else {
tmp = x1 + (x1 + (3.0 * (((x1 * x1) * (x1 + 3.0)) - x1)));
}
return tmp;
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
real(8) :: t_0
real(8) :: tmp
t_0 = x1 + ((x1 * ((4.0d0 * (x2 * ((2.0d0 * x2) - 3.0d0))) - 2.0d0)) + (x2 * (-6.0d0)))
if (x1 <= (-2.15d+63)) then
tmp = x1 + (3.0d0 * ((x1 * x1) * (3.0d0 - (x2 * (-2.0d0)))))
else if (x1 <= (-1.9d-178)) then
tmp = t_0
else if (x1 <= 3.5d-229) then
tmp = x1 + ((3.0d0 * (x2 * (-2.0d0))) + (x1 + (4.0d0 * (x2 * (x2 * (x1 + x1))))))
else if (x1 <= 3.8d+102) then
tmp = t_0
else
tmp = x1 + (x1 + (3.0d0 * (((x1 * x1) * (x1 + 3.0d0)) - x1)))
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 tmp;
if (x1 <= -2.15e+63) {
tmp = x1 + (3.0 * ((x1 * x1) * (3.0 - (x2 * -2.0))));
} else if (x1 <= -1.9e-178) {
tmp = t_0;
} else if (x1 <= 3.5e-229) {
tmp = x1 + ((3.0 * (x2 * -2.0)) + (x1 + (4.0 * (x2 * (x2 * (x1 + x1))))));
} else if (x1 <= 3.8e+102) {
tmp = t_0;
} else {
tmp = x1 + (x1 + (3.0 * (((x1 * x1) * (x1 + 3.0)) - x1)));
}
return tmp;
}
def code(x1, x2): t_0 = x1 + ((x1 * ((4.0 * (x2 * ((2.0 * x2) - 3.0))) - 2.0)) + (x2 * -6.0)) tmp = 0 if x1 <= -2.15e+63: tmp = x1 + (3.0 * ((x1 * x1) * (3.0 - (x2 * -2.0)))) elif x1 <= -1.9e-178: tmp = t_0 elif x1 <= 3.5e-229: tmp = x1 + ((3.0 * (x2 * -2.0)) + (x1 + (4.0 * (x2 * (x2 * (x1 + x1)))))) elif x1 <= 3.8e+102: tmp = t_0 else: tmp = x1 + (x1 + (3.0 * (((x1 * x1) * (x1 + 3.0)) - x1))) 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))) tmp = 0.0 if (x1 <= -2.15e+63) tmp = Float64(x1 + Float64(3.0 * Float64(Float64(x1 * x1) * Float64(3.0 - Float64(x2 * -2.0))))); elseif (x1 <= -1.9e-178) tmp = t_0; elseif (x1 <= 3.5e-229) tmp = Float64(x1 + Float64(Float64(3.0 * Float64(x2 * -2.0)) + Float64(x1 + Float64(4.0 * Float64(x2 * Float64(x2 * Float64(x1 + x1))))))); elseif (x1 <= 3.8e+102) tmp = t_0; else tmp = Float64(x1 + Float64(x1 + Float64(3.0 * Float64(Float64(Float64(x1 * x1) * Float64(x1 + 3.0)) - x1)))); 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)); tmp = 0.0; if (x1 <= -2.15e+63) tmp = x1 + (3.0 * ((x1 * x1) * (3.0 - (x2 * -2.0)))); elseif (x1 <= -1.9e-178) tmp = t_0; elseif (x1 <= 3.5e-229) tmp = x1 + ((3.0 * (x2 * -2.0)) + (x1 + (4.0 * (x2 * (x2 * (x1 + x1)))))); elseif (x1 <= 3.8e+102) tmp = t_0; else tmp = x1 + (x1 + (3.0 * (((x1 * x1) * (x1 + 3.0)) - x1))); 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]}, If[LessEqual[x1, -2.15e+63], N[(x1 + N[(3.0 * N[(N[(x1 * x1), $MachinePrecision] * N[(3.0 - N[(x2 * -2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, -1.9e-178], t$95$0, If[LessEqual[x1, 3.5e-229], N[(x1 + N[(N[(3.0 * N[(x2 * -2.0), $MachinePrecision]), $MachinePrecision] + N[(x1 + N[(4.0 * N[(x2 * N[(x2 * N[(x1 + x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 3.8e+102], t$95$0, N[(x1 + N[(x1 + N[(3.0 * N[(N[(N[(x1 * x1), $MachinePrecision] * N[(x1 + 3.0), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]
\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)\\
\mathbf{if}\;x1 \leq -2.15 \cdot 10^{+63}:\\
\;\;\;\;x1 + 3 \cdot \left(\left(x1 \cdot x1\right) \cdot \left(3 - x2 \cdot -2\right)\right)\\
\mathbf{elif}\;x1 \leq -1.9 \cdot 10^{-178}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;x1 \leq 3.5 \cdot 10^{-229}:\\
\;\;\;\;x1 + \left(3 \cdot \left(x2 \cdot -2\right) + \left(x1 + 4 \cdot \left(x2 \cdot \left(x2 \cdot \left(x1 + x1\right)\right)\right)\right)\right)\\
\mathbf{elif}\;x1 \leq 3.8 \cdot 10^{+102}:\\
\;\;\;\;t_0\\
\mathbf{else}:\\
\;\;\;\;x1 + \left(x1 + 3 \cdot \left(\left(x1 \cdot x1\right) \cdot \left(x1 + 3\right) - x1\right)\right)\\
\end{array}
\end{array}
if x1 < -2.15e63Initial program 11.8%
Taylor expanded in x1 around 0 0.1%
Taylor expanded in x1 around 0 39.7%
+-commutative39.7%
neg-mul-139.7%
unsub-neg39.7%
+-commutative39.7%
*-commutative39.7%
fma-def39.7%
unpow239.7%
cancel-sign-sub-inv39.7%
metadata-eval39.7%
*-commutative39.7%
Simplified39.7%
Taylor expanded in x1 around inf 39.7%
Taylor expanded in x1 around inf 65.2%
unpow265.2%
metadata-eval65.2%
cancel-sign-sub-inv65.2%
*-commutative65.2%
Simplified65.2%
if -2.15e63 < x1 < -1.90000000000000007e-178 or 3.5000000000000003e-229 < x1 < 3.79999999999999979e102Initial program 99.3%
Taylor expanded in x1 around 0 80.8%
Taylor expanded in x1 around 0 76.9%
+-commutative76.9%
neg-mul-176.9%
unsub-neg76.9%
+-commutative76.9%
*-commutative76.9%
fma-def76.9%
unpow276.9%
cancel-sign-sub-inv76.9%
metadata-eval76.9%
*-commutative76.9%
Simplified76.9%
Taylor expanded in x1 around 0 78.1%
if -1.90000000000000007e-178 < x1 < 3.5000000000000003e-229Initial program 99.6%
Taylor expanded in x1 around 0 99.6%
Taylor expanded in x1 around 0 92.4%
*-commutative92.4%
Simplified92.4%
Taylor expanded in x2 around inf 92.4%
associate-*r*92.4%
*-commutative92.4%
associate-*l*92.4%
rem-log-exp69.0%
*-commutative69.0%
exp-lft-sqr69.0%
log-prod69.0%
rem-log-exp76.4%
rem-log-exp92.4%
Simplified92.4%
if 3.79999999999999979e102 < x1 Initial program 20.0%
Taylor expanded in x1 around 0 6.4%
Taylor expanded in x1 around 0 80.0%
+-commutative80.0%
neg-mul-180.0%
unsub-neg80.0%
*-commutative80.0%
fma-def80.0%
+-commutative80.0%
cube-mult80.0%
unpow280.0%
distribute-rgt-out91.4%
unpow291.4%
cancel-sign-sub-inv91.4%
metadata-eval91.4%
Simplified91.4%
Taylor expanded in x2 around 0 100.0%
+-commutative100.0%
unpow2100.0%
Simplified100.0%
Final simplification80.4%
(FPCore (x1 x2)
:precision binary64
(if (<= x1 -1.55e+66)
(+ x1 (* 3.0 (* (* x1 x1) (- 3.0 (* x2 -2.0)))))
(if (<= x1 3.8e+102)
(+
x1
(+
(* 3.0 (- (* x2 -2.0) x1))
(+ x1 (* 4.0 (* x2 (* x1 (- (* 2.0 x2) 3.0)))))))
(+ x1 (+ x1 (* 3.0 (- (* (* x1 x1) (+ x1 3.0)) x1)))))))
double code(double x1, double x2) {
double tmp;
if (x1 <= -1.55e+66) {
tmp = x1 + (3.0 * ((x1 * x1) * (3.0 - (x2 * -2.0))));
} else if (x1 <= 3.8e+102) {
tmp = x1 + ((3.0 * ((x2 * -2.0) - x1)) + (x1 + (4.0 * (x2 * (x1 * ((2.0 * x2) - 3.0))))));
} else {
tmp = x1 + (x1 + (3.0 * (((x1 * x1) * (x1 + 3.0)) - x1)));
}
return tmp;
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
real(8) :: tmp
if (x1 <= (-1.55d+66)) then
tmp = x1 + (3.0d0 * ((x1 * x1) * (3.0d0 - (x2 * (-2.0d0)))))
else if (x1 <= 3.8d+102) then
tmp = x1 + ((3.0d0 * ((x2 * (-2.0d0)) - x1)) + (x1 + (4.0d0 * (x2 * (x1 * ((2.0d0 * x2) - 3.0d0))))))
else
tmp = x1 + (x1 + (3.0d0 * (((x1 * x1) * (x1 + 3.0d0)) - x1)))
end if
code = tmp
end function
public static double code(double x1, double x2) {
double tmp;
if (x1 <= -1.55e+66) {
tmp = x1 + (3.0 * ((x1 * x1) * (3.0 - (x2 * -2.0))));
} else if (x1 <= 3.8e+102) {
tmp = x1 + ((3.0 * ((x2 * -2.0) - x1)) + (x1 + (4.0 * (x2 * (x1 * ((2.0 * x2) - 3.0))))));
} else {
tmp = x1 + (x1 + (3.0 * (((x1 * x1) * (x1 + 3.0)) - x1)));
}
return tmp;
}
def code(x1, x2): tmp = 0 if x1 <= -1.55e+66: tmp = x1 + (3.0 * ((x1 * x1) * (3.0 - (x2 * -2.0)))) elif x1 <= 3.8e+102: tmp = x1 + ((3.0 * ((x2 * -2.0) - x1)) + (x1 + (4.0 * (x2 * (x1 * ((2.0 * x2) - 3.0)))))) else: tmp = x1 + (x1 + (3.0 * (((x1 * x1) * (x1 + 3.0)) - x1))) return tmp
function code(x1, x2) tmp = 0.0 if (x1 <= -1.55e+66) tmp = Float64(x1 + Float64(3.0 * Float64(Float64(x1 * x1) * Float64(3.0 - Float64(x2 * -2.0))))); elseif (x1 <= 3.8e+102) tmp = Float64(x1 + Float64(Float64(3.0 * Float64(Float64(x2 * -2.0) - x1)) + Float64(x1 + Float64(4.0 * Float64(x2 * Float64(x1 * Float64(Float64(2.0 * x2) - 3.0))))))); else tmp = Float64(x1 + Float64(x1 + Float64(3.0 * Float64(Float64(Float64(x1 * x1) * Float64(x1 + 3.0)) - x1)))); end return tmp end
function tmp_2 = code(x1, x2) tmp = 0.0; if (x1 <= -1.55e+66) tmp = x1 + (3.0 * ((x1 * x1) * (3.0 - (x2 * -2.0)))); elseif (x1 <= 3.8e+102) tmp = x1 + ((3.0 * ((x2 * -2.0) - x1)) + (x1 + (4.0 * (x2 * (x1 * ((2.0 * x2) - 3.0)))))); else tmp = x1 + (x1 + (3.0 * (((x1 * x1) * (x1 + 3.0)) - x1))); end tmp_2 = tmp; end
code[x1_, x2_] := If[LessEqual[x1, -1.55e+66], N[(x1 + N[(3.0 * N[(N[(x1 * x1), $MachinePrecision] * N[(3.0 - N[(x2 * -2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 3.8e+102], N[(x1 + N[(N[(3.0 * N[(N[(x2 * -2.0), $MachinePrecision] - x1), $MachinePrecision]), $MachinePrecision] + N[(x1 + N[(4.0 * N[(x2 * N[(x1 * N[(N[(2.0 * x2), $MachinePrecision] - 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x1 + N[(x1 + N[(3.0 * N[(N[(N[(x1 * x1), $MachinePrecision] * N[(x1 + 3.0), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x1 \leq -1.55 \cdot 10^{+66}:\\
\;\;\;\;x1 + 3 \cdot \left(\left(x1 \cdot x1\right) \cdot \left(3 - x2 \cdot -2\right)\right)\\
\mathbf{elif}\;x1 \leq 3.8 \cdot 10^{+102}:\\
\;\;\;\;x1 + \left(3 \cdot \left(x2 \cdot -2 - x1\right) + \left(x1 + 4 \cdot \left(x2 \cdot \left(x1 \cdot \left(2 \cdot x2 - 3\right)\right)\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x1 + \left(x1 + 3 \cdot \left(\left(x1 \cdot x1\right) \cdot \left(x1 + 3\right) - x1\right)\right)\\
\end{array}
\end{array}
if x1 < -1.55000000000000009e66Initial program 11.8%
Taylor expanded in x1 around 0 0.1%
Taylor expanded in x1 around 0 39.7%
+-commutative39.7%
neg-mul-139.7%
unsub-neg39.7%
+-commutative39.7%
*-commutative39.7%
fma-def39.7%
unpow239.7%
cancel-sign-sub-inv39.7%
metadata-eval39.7%
*-commutative39.7%
Simplified39.7%
Taylor expanded in x1 around inf 39.7%
Taylor expanded in x1 around inf 65.2%
unpow265.2%
metadata-eval65.2%
cancel-sign-sub-inv65.2%
*-commutative65.2%
Simplified65.2%
if -1.55000000000000009e66 < x1 < 3.79999999999999979e102Initial program 99.4%
Taylor expanded in x1 around 0 85.5%
Taylor expanded in x1 around 0 84.9%
+-commutative99.4%
neg-mul-199.4%
unsub-neg99.4%
*-commutative99.4%
Simplified84.9%
if 3.79999999999999979e102 < x1 Initial program 20.0%
Taylor expanded in x1 around 0 6.4%
Taylor expanded in x1 around 0 80.0%
+-commutative80.0%
neg-mul-180.0%
unsub-neg80.0%
*-commutative80.0%
fma-def80.0%
+-commutative80.0%
cube-mult80.0%
unpow280.0%
distribute-rgt-out91.4%
unpow291.4%
cancel-sign-sub-inv91.4%
metadata-eval91.4%
Simplified91.4%
Taylor expanded in x2 around 0 100.0%
+-commutative100.0%
unpow2100.0%
Simplified100.0%
Final simplification82.4%
(FPCore (x1 x2)
:precision binary64
(if (<= x1 -9e+61)
(+ x1 (* 3.0 (* (* x1 x1) (- 3.0 (* x2 -2.0)))))
(if (<= x1 -5.2e-120)
(+ x1 (+ (* x2 -6.0) (* x1 (* 8.0 (* x2 x2)))))
(if (<= x1 3.05e-12)
(+ (* x2 (- (* x1 -12.0) 6.0)) (+ x1 (* x1 -2.0)))
(if (<= x1 3.3e+102)
(* x1 (+ 2.0 (* 4.0 (* x2 (- (* 2.0 x2) 3.0)))))
(+ x1 (+ x1 (* 3.0 (- (* (* x1 x1) (+ x1 3.0)) x1)))))))))
double code(double x1, double x2) {
double tmp;
if (x1 <= -9e+61) {
tmp = x1 + (3.0 * ((x1 * x1) * (3.0 - (x2 * -2.0))));
} else if (x1 <= -5.2e-120) {
tmp = x1 + ((x2 * -6.0) + (x1 * (8.0 * (x2 * x2))));
} else if (x1 <= 3.05e-12) {
tmp = (x2 * ((x1 * -12.0) - 6.0)) + (x1 + (x1 * -2.0));
} else if (x1 <= 3.3e+102) {
tmp = x1 * (2.0 + (4.0 * (x2 * ((2.0 * x2) - 3.0))));
} else {
tmp = x1 + (x1 + (3.0 * (((x1 * x1) * (x1 + 3.0)) - x1)));
}
return tmp;
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
real(8) :: tmp
if (x1 <= (-9d+61)) then
tmp = x1 + (3.0d0 * ((x1 * x1) * (3.0d0 - (x2 * (-2.0d0)))))
else if (x1 <= (-5.2d-120)) then
tmp = x1 + ((x2 * (-6.0d0)) + (x1 * (8.0d0 * (x2 * x2))))
else if (x1 <= 3.05d-12) then
tmp = (x2 * ((x1 * (-12.0d0)) - 6.0d0)) + (x1 + (x1 * (-2.0d0)))
else if (x1 <= 3.3d+102) then
tmp = x1 * (2.0d0 + (4.0d0 * (x2 * ((2.0d0 * x2) - 3.0d0))))
else
tmp = x1 + (x1 + (3.0d0 * (((x1 * x1) * (x1 + 3.0d0)) - x1)))
end if
code = tmp
end function
public static double code(double x1, double x2) {
double tmp;
if (x1 <= -9e+61) {
tmp = x1 + (3.0 * ((x1 * x1) * (3.0 - (x2 * -2.0))));
} else if (x1 <= -5.2e-120) {
tmp = x1 + ((x2 * -6.0) + (x1 * (8.0 * (x2 * x2))));
} else if (x1 <= 3.05e-12) {
tmp = (x2 * ((x1 * -12.0) - 6.0)) + (x1 + (x1 * -2.0));
} else if (x1 <= 3.3e+102) {
tmp = x1 * (2.0 + (4.0 * (x2 * ((2.0 * x2) - 3.0))));
} else {
tmp = x1 + (x1 + (3.0 * (((x1 * x1) * (x1 + 3.0)) - x1)));
}
return tmp;
}
def code(x1, x2): tmp = 0 if x1 <= -9e+61: tmp = x1 + (3.0 * ((x1 * x1) * (3.0 - (x2 * -2.0)))) elif x1 <= -5.2e-120: tmp = x1 + ((x2 * -6.0) + (x1 * (8.0 * (x2 * x2)))) elif x1 <= 3.05e-12: tmp = (x2 * ((x1 * -12.0) - 6.0)) + (x1 + (x1 * -2.0)) elif x1 <= 3.3e+102: tmp = x1 * (2.0 + (4.0 * (x2 * ((2.0 * x2) - 3.0)))) else: tmp = x1 + (x1 + (3.0 * (((x1 * x1) * (x1 + 3.0)) - x1))) return tmp
function code(x1, x2) tmp = 0.0 if (x1 <= -9e+61) tmp = Float64(x1 + Float64(3.0 * Float64(Float64(x1 * x1) * Float64(3.0 - Float64(x2 * -2.0))))); elseif (x1 <= -5.2e-120) tmp = Float64(x1 + Float64(Float64(x2 * -6.0) + Float64(x1 * Float64(8.0 * Float64(x2 * x2))))); elseif (x1 <= 3.05e-12) tmp = Float64(Float64(x2 * Float64(Float64(x1 * -12.0) - 6.0)) + Float64(x1 + Float64(x1 * -2.0))); elseif (x1 <= 3.3e+102) tmp = Float64(x1 * Float64(2.0 + Float64(4.0 * Float64(x2 * Float64(Float64(2.0 * x2) - 3.0))))); else tmp = Float64(x1 + Float64(x1 + Float64(3.0 * Float64(Float64(Float64(x1 * x1) * Float64(x1 + 3.0)) - x1)))); end return tmp end
function tmp_2 = code(x1, x2) tmp = 0.0; if (x1 <= -9e+61) tmp = x1 + (3.0 * ((x1 * x1) * (3.0 - (x2 * -2.0)))); elseif (x1 <= -5.2e-120) tmp = x1 + ((x2 * -6.0) + (x1 * (8.0 * (x2 * x2)))); elseif (x1 <= 3.05e-12) tmp = (x2 * ((x1 * -12.0) - 6.0)) + (x1 + (x1 * -2.0)); elseif (x1 <= 3.3e+102) tmp = x1 * (2.0 + (4.0 * (x2 * ((2.0 * x2) - 3.0)))); else tmp = x1 + (x1 + (3.0 * (((x1 * x1) * (x1 + 3.0)) - x1))); end tmp_2 = tmp; end
code[x1_, x2_] := If[LessEqual[x1, -9e+61], N[(x1 + N[(3.0 * N[(N[(x1 * x1), $MachinePrecision] * N[(3.0 - N[(x2 * -2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, -5.2e-120], N[(x1 + N[(N[(x2 * -6.0), $MachinePrecision] + N[(x1 * N[(8.0 * N[(x2 * x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 3.05e-12], N[(N[(x2 * N[(N[(x1 * -12.0), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision] + N[(x1 + N[(x1 * -2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 3.3e+102], N[(x1 * N[(2.0 + N[(4.0 * N[(x2 * N[(N[(2.0 * x2), $MachinePrecision] - 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x1 + N[(x1 + N[(3.0 * N[(N[(N[(x1 * x1), $MachinePrecision] * N[(x1 + 3.0), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x1 \leq -9 \cdot 10^{+61}:\\
\;\;\;\;x1 + 3 \cdot \left(\left(x1 \cdot x1\right) \cdot \left(3 - x2 \cdot -2\right)\right)\\
\mathbf{elif}\;x1 \leq -5.2 \cdot 10^{-120}:\\
\;\;\;\;x1 + \left(x2 \cdot -6 + x1 \cdot \left(8 \cdot \left(x2 \cdot x2\right)\right)\right)\\
\mathbf{elif}\;x1 \leq 3.05 \cdot 10^{-12}:\\
\;\;\;\;x2 \cdot \left(x1 \cdot -12 - 6\right) + \left(x1 + x1 \cdot -2\right)\\
\mathbf{elif}\;x1 \leq 3.3 \cdot 10^{+102}:\\
\;\;\;\;x1 \cdot \left(2 + 4 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x1 + \left(x1 + 3 \cdot \left(\left(x1 \cdot x1\right) \cdot \left(x1 + 3\right) - x1\right)\right)\\
\end{array}
\end{array}
if x1 < -9e61Initial program 11.8%
Taylor expanded in x1 around 0 0.1%
Taylor expanded in x1 around 0 39.7%
+-commutative39.7%
neg-mul-139.7%
unsub-neg39.7%
+-commutative39.7%
*-commutative39.7%
fma-def39.7%
unpow239.7%
cancel-sign-sub-inv39.7%
metadata-eval39.7%
*-commutative39.7%
Simplified39.7%
Taylor expanded in x1 around inf 39.7%
Taylor expanded in x1 around inf 65.2%
unpow265.2%
metadata-eval65.2%
cancel-sign-sub-inv65.2%
*-commutative65.2%
Simplified65.2%
if -9e61 < x1 < -5.2000000000000002e-120Initial program 99.4%
Taylor expanded in x1 around 0 83.4%
Taylor expanded in x1 around 0 81.5%
+-commutative81.5%
neg-mul-181.5%
unsub-neg81.5%
+-commutative81.5%
*-commutative81.5%
fma-def81.5%
unpow281.5%
cancel-sign-sub-inv81.5%
metadata-eval81.5%
*-commutative81.5%
Simplified81.5%
Taylor expanded in x1 around 0 83.4%
Taylor expanded in x2 around inf 63.2%
associate-*r*63.2%
unpow263.2%
Simplified63.2%
if -5.2000000000000002e-120 < x1 < 3.0500000000000001e-12Initial program 99.4%
Taylor expanded in x1 around 0 99.4%
Taylor expanded in x1 around 0 99.4%
+-commutative99.4%
neg-mul-199.4%
unsub-neg99.4%
+-commutative99.4%
*-commutative99.4%
fma-def99.4%
unpow299.4%
cancel-sign-sub-inv99.4%
metadata-eval99.4%
*-commutative99.4%
Simplified99.4%
Taylor expanded in x1 around 0 86.2%
Taylor expanded in x2 around 0 76.5%
if 3.0500000000000001e-12 < x1 < 3.29999999999999999e102Initial program 99.4%
Taylor expanded in x1 around 0 37.9%
Taylor expanded in x1 around 0 36.7%
*-commutative36.7%
Simplified36.7%
Taylor expanded in x1 around inf 36.7%
if 3.29999999999999999e102 < x1 Initial program 20.0%
Taylor expanded in x1 around 0 6.4%
Taylor expanded in x1 around 0 80.0%
+-commutative80.0%
neg-mul-180.0%
unsub-neg80.0%
*-commutative80.0%
fma-def80.0%
+-commutative80.0%
cube-mult80.0%
unpow280.0%
distribute-rgt-out91.4%
unpow291.4%
cancel-sign-sub-inv91.4%
metadata-eval91.4%
Simplified91.4%
Taylor expanded in x2 around 0 100.0%
+-commutative100.0%
unpow2100.0%
Simplified100.0%
Final simplification71.0%
(FPCore (x1 x2)
:precision binary64
(if (<= x1 -1.8e+64)
(+ x1 (* 3.0 (* (* x1 x1) (- 3.0 (* x2 -2.0)))))
(if (<= x1 3.7e+102)
(+ x1 (+ (* x1 (- (* 4.0 (* x2 (- (* 2.0 x2) 3.0))) 2.0)) (* x2 -6.0)))
(+ x1 (+ x1 (* 3.0 (- (* (* x1 x1) (+ x1 3.0)) x1)))))))
double code(double x1, double x2) {
double tmp;
if (x1 <= -1.8e+64) {
tmp = x1 + (3.0 * ((x1 * x1) * (3.0 - (x2 * -2.0))));
} else if (x1 <= 3.7e+102) {
tmp = x1 + ((x1 * ((4.0 * (x2 * ((2.0 * x2) - 3.0))) - 2.0)) + (x2 * -6.0));
} else {
tmp = x1 + (x1 + (3.0 * (((x1 * x1) * (x1 + 3.0)) - x1)));
}
return tmp;
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
real(8) :: tmp
if (x1 <= (-1.8d+64)) then
tmp = x1 + (3.0d0 * ((x1 * x1) * (3.0d0 - (x2 * (-2.0d0)))))
else if (x1 <= 3.7d+102) then
tmp = x1 + ((x1 * ((4.0d0 * (x2 * ((2.0d0 * x2) - 3.0d0))) - 2.0d0)) + (x2 * (-6.0d0)))
else
tmp = x1 + (x1 + (3.0d0 * (((x1 * x1) * (x1 + 3.0d0)) - x1)))
end if
code = tmp
end function
public static double code(double x1, double x2) {
double tmp;
if (x1 <= -1.8e+64) {
tmp = x1 + (3.0 * ((x1 * x1) * (3.0 - (x2 * -2.0))));
} else if (x1 <= 3.7e+102) {
tmp = x1 + ((x1 * ((4.0 * (x2 * ((2.0 * x2) - 3.0))) - 2.0)) + (x2 * -6.0));
} else {
tmp = x1 + (x1 + (3.0 * (((x1 * x1) * (x1 + 3.0)) - x1)));
}
return tmp;
}
def code(x1, x2): tmp = 0 if x1 <= -1.8e+64: tmp = x1 + (3.0 * ((x1 * x1) * (3.0 - (x2 * -2.0)))) elif x1 <= 3.7e+102: tmp = x1 + ((x1 * ((4.0 * (x2 * ((2.0 * x2) - 3.0))) - 2.0)) + (x2 * -6.0)) else: tmp = x1 + (x1 + (3.0 * (((x1 * x1) * (x1 + 3.0)) - x1))) return tmp
function code(x1, x2) tmp = 0.0 if (x1 <= -1.8e+64) tmp = Float64(x1 + Float64(3.0 * Float64(Float64(x1 * x1) * Float64(3.0 - Float64(x2 * -2.0))))); elseif (x1 <= 3.7e+102) tmp = Float64(x1 + Float64(Float64(x1 * Float64(Float64(4.0 * Float64(x2 * Float64(Float64(2.0 * x2) - 3.0))) - 2.0)) + Float64(x2 * -6.0))); else tmp = Float64(x1 + Float64(x1 + Float64(3.0 * Float64(Float64(Float64(x1 * x1) * Float64(x1 + 3.0)) - x1)))); end return tmp end
function tmp_2 = code(x1, x2) tmp = 0.0; if (x1 <= -1.8e+64) tmp = x1 + (3.0 * ((x1 * x1) * (3.0 - (x2 * -2.0)))); elseif (x1 <= 3.7e+102) tmp = x1 + ((x1 * ((4.0 * (x2 * ((2.0 * x2) - 3.0))) - 2.0)) + (x2 * -6.0)); else tmp = x1 + (x1 + (3.0 * (((x1 * x1) * (x1 + 3.0)) - x1))); end tmp_2 = tmp; end
code[x1_, x2_] := If[LessEqual[x1, -1.8e+64], N[(x1 + N[(3.0 * N[(N[(x1 * x1), $MachinePrecision] * N[(3.0 - N[(x2 * -2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 3.7e+102], 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], N[(x1 + N[(x1 + N[(3.0 * N[(N[(N[(x1 * x1), $MachinePrecision] * N[(x1 + 3.0), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x1 \leq -1.8 \cdot 10^{+64}:\\
\;\;\;\;x1 + 3 \cdot \left(\left(x1 \cdot x1\right) \cdot \left(3 - x2 \cdot -2\right)\right)\\
\mathbf{elif}\;x1 \leq 3.7 \cdot 10^{+102}:\\
\;\;\;\;x1 + \left(x1 \cdot \left(4 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right) - 2\right) + x2 \cdot -6\right)\\
\mathbf{else}:\\
\;\;\;\;x1 + \left(x1 + 3 \cdot \left(\left(x1 \cdot x1\right) \cdot \left(x1 + 3\right) - x1\right)\right)\\
\end{array}
\end{array}
if x1 < -1.80000000000000007e64Initial program 11.8%
Taylor expanded in x1 around 0 0.1%
Taylor expanded in x1 around 0 39.7%
+-commutative39.7%
neg-mul-139.7%
unsub-neg39.7%
+-commutative39.7%
*-commutative39.7%
fma-def39.7%
unpow239.7%
cancel-sign-sub-inv39.7%
metadata-eval39.7%
*-commutative39.7%
Simplified39.7%
Taylor expanded in x1 around inf 39.7%
Taylor expanded in x1 around inf 65.2%
unpow265.2%
metadata-eval65.2%
cancel-sign-sub-inv65.2%
*-commutative65.2%
Simplified65.2%
if -1.80000000000000007e64 < x1 < 3.70000000000000023e102Initial program 99.4%
Taylor expanded in x1 around 0 85.5%
Taylor expanded in x1 around 0 82.5%
+-commutative82.5%
neg-mul-182.5%
unsub-neg82.5%
+-commutative82.5%
*-commutative82.5%
fma-def82.5%
unpow282.5%
cancel-sign-sub-inv82.5%
metadata-eval82.5%
*-commutative82.5%
Simplified82.5%
Taylor expanded in x1 around 0 77.1%
if 3.70000000000000023e102 < x1 Initial program 20.0%
Taylor expanded in x1 around 0 6.4%
Taylor expanded in x1 around 0 80.0%
+-commutative80.0%
neg-mul-180.0%
unsub-neg80.0%
*-commutative80.0%
fma-def80.0%
+-commutative80.0%
cube-mult80.0%
unpow280.0%
distribute-rgt-out91.4%
unpow291.4%
cancel-sign-sub-inv91.4%
metadata-eval91.4%
Simplified91.4%
Taylor expanded in x2 around 0 100.0%
+-commutative100.0%
unpow2100.0%
Simplified100.0%
Final simplification77.5%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (+ x1 (* 3.0 (* (* x1 x1) (- 3.0 (* x2 -2.0)))))))
(if (<= x1 -1.65e+65)
t_0
(if (<= x1 -5.2e-120)
(+ x1 (+ (* x2 -6.0) (* x1 (* 8.0 (* x2 x2)))))
(if (<= x1 7.2e-13)
(+ x1 (+ (* x2 -6.0) (* x1 -2.0)))
(if (<= x1 3.3e+184)
(* x1 (+ 2.0 (* 4.0 (* x2 (- (* 2.0 x2) 3.0)))))
t_0))))))
double code(double x1, double x2) {
double t_0 = x1 + (3.0 * ((x1 * x1) * (3.0 - (x2 * -2.0))));
double tmp;
if (x1 <= -1.65e+65) {
tmp = t_0;
} else if (x1 <= -5.2e-120) {
tmp = x1 + ((x2 * -6.0) + (x1 * (8.0 * (x2 * x2))));
} else if (x1 <= 7.2e-13) {
tmp = x1 + ((x2 * -6.0) + (x1 * -2.0));
} else if (x1 <= 3.3e+184) {
tmp = x1 * (2.0 + (4.0 * (x2 * ((2.0 * x2) - 3.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 + (3.0d0 * ((x1 * x1) * (3.0d0 - (x2 * (-2.0d0)))))
if (x1 <= (-1.65d+65)) then
tmp = t_0
else if (x1 <= (-5.2d-120)) then
tmp = x1 + ((x2 * (-6.0d0)) + (x1 * (8.0d0 * (x2 * x2))))
else if (x1 <= 7.2d-13) then
tmp = x1 + ((x2 * (-6.0d0)) + (x1 * (-2.0d0)))
else if (x1 <= 3.3d+184) then
tmp = x1 * (2.0d0 + (4.0d0 * (x2 * ((2.0d0 * x2) - 3.0d0))))
else
tmp = t_0
end if
code = tmp
end function
public static double code(double x1, double x2) {
double t_0 = x1 + (3.0 * ((x1 * x1) * (3.0 - (x2 * -2.0))));
double tmp;
if (x1 <= -1.65e+65) {
tmp = t_0;
} else if (x1 <= -5.2e-120) {
tmp = x1 + ((x2 * -6.0) + (x1 * (8.0 * (x2 * x2))));
} else if (x1 <= 7.2e-13) {
tmp = x1 + ((x2 * -6.0) + (x1 * -2.0));
} else if (x1 <= 3.3e+184) {
tmp = x1 * (2.0 + (4.0 * (x2 * ((2.0 * x2) - 3.0))));
} else {
tmp = t_0;
}
return tmp;
}
def code(x1, x2): t_0 = x1 + (3.0 * ((x1 * x1) * (3.0 - (x2 * -2.0)))) tmp = 0 if x1 <= -1.65e+65: tmp = t_0 elif x1 <= -5.2e-120: tmp = x1 + ((x2 * -6.0) + (x1 * (8.0 * (x2 * x2)))) elif x1 <= 7.2e-13: tmp = x1 + ((x2 * -6.0) + (x1 * -2.0)) elif x1 <= 3.3e+184: tmp = x1 * (2.0 + (4.0 * (x2 * ((2.0 * x2) - 3.0)))) else: tmp = t_0 return tmp
function code(x1, x2) t_0 = Float64(x1 + Float64(3.0 * Float64(Float64(x1 * x1) * Float64(3.0 - Float64(x2 * -2.0))))) tmp = 0.0 if (x1 <= -1.65e+65) tmp = t_0; elseif (x1 <= -5.2e-120) tmp = Float64(x1 + Float64(Float64(x2 * -6.0) + Float64(x1 * Float64(8.0 * Float64(x2 * x2))))); elseif (x1 <= 7.2e-13) tmp = Float64(x1 + Float64(Float64(x2 * -6.0) + Float64(x1 * -2.0))); elseif (x1 <= 3.3e+184) tmp = Float64(x1 * Float64(2.0 + Float64(4.0 * Float64(x2 * Float64(Float64(2.0 * x2) - 3.0))))); else tmp = t_0; end return tmp end
function tmp_2 = code(x1, x2) t_0 = x1 + (3.0 * ((x1 * x1) * (3.0 - (x2 * -2.0)))); tmp = 0.0; if (x1 <= -1.65e+65) tmp = t_0; elseif (x1 <= -5.2e-120) tmp = x1 + ((x2 * -6.0) + (x1 * (8.0 * (x2 * x2)))); elseif (x1 <= 7.2e-13) tmp = x1 + ((x2 * -6.0) + (x1 * -2.0)); elseif (x1 <= 3.3e+184) tmp = x1 * (2.0 + (4.0 * (x2 * ((2.0 * x2) - 3.0)))); else tmp = t_0; end tmp_2 = tmp; end
code[x1_, x2_] := Block[{t$95$0 = N[(x1 + N[(3.0 * N[(N[(x1 * x1), $MachinePrecision] * N[(3.0 - N[(x2 * -2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x1, -1.65e+65], t$95$0, If[LessEqual[x1, -5.2e-120], N[(x1 + N[(N[(x2 * -6.0), $MachinePrecision] + N[(x1 * N[(8.0 * N[(x2 * x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 7.2e-13], N[(x1 + N[(N[(x2 * -6.0), $MachinePrecision] + N[(x1 * -2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 3.3e+184], N[(x1 * N[(2.0 + N[(4.0 * N[(x2 * N[(N[(2.0 * x2), $MachinePrecision] - 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$0]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x1 + 3 \cdot \left(\left(x1 \cdot x1\right) \cdot \left(3 - x2 \cdot -2\right)\right)\\
\mathbf{if}\;x1 \leq -1.65 \cdot 10^{+65}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;x1 \leq -5.2 \cdot 10^{-120}:\\
\;\;\;\;x1 + \left(x2 \cdot -6 + x1 \cdot \left(8 \cdot \left(x2 \cdot x2\right)\right)\right)\\
\mathbf{elif}\;x1 \leq 7.2 \cdot 10^{-13}:\\
\;\;\;\;x1 + \left(x2 \cdot -6 + x1 \cdot -2\right)\\
\mathbf{elif}\;x1 \leq 3.3 \cdot 10^{+184}:\\
\;\;\;\;x1 \cdot \left(2 + 4 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t_0\\
\end{array}
\end{array}
if x1 < -1.65000000000000012e65 or 3.2999999999999998e184 < x1 Initial program 8.5%
Taylor expanded in x1 around 0 0.0%
Taylor expanded in x1 around 0 54.2%
+-commutative54.2%
neg-mul-154.2%
unsub-neg54.2%
+-commutative54.2%
*-commutative54.2%
fma-def54.2%
unpow254.2%
cancel-sign-sub-inv54.2%
metadata-eval54.2%
*-commutative54.2%
Simplified54.2%
Taylor expanded in x1 around inf 54.2%
Taylor expanded in x1 around inf 72.5%
unpow272.5%
metadata-eval72.5%
cancel-sign-sub-inv72.5%
*-commutative72.5%
Simplified72.5%
if -1.65000000000000012e65 < x1 < -5.2000000000000002e-120Initial program 99.4%
Taylor expanded in x1 around 0 83.4%
Taylor expanded in x1 around 0 81.5%
+-commutative81.5%
neg-mul-181.5%
unsub-neg81.5%
+-commutative81.5%
*-commutative81.5%
fma-def81.5%
unpow281.5%
cancel-sign-sub-inv81.5%
metadata-eval81.5%
*-commutative81.5%
Simplified81.5%
Taylor expanded in x1 around 0 83.4%
Taylor expanded in x2 around inf 63.2%
associate-*r*63.2%
unpow263.2%
Simplified63.2%
if -5.2000000000000002e-120 < x1 < 7.1999999999999996e-13Initial program 99.4%
Taylor expanded in x1 around 0 99.4%
Taylor expanded in x1 around 0 99.4%
+-commutative99.4%
neg-mul-199.4%
unsub-neg99.4%
+-commutative99.4%
*-commutative99.4%
fma-def99.4%
unpow299.4%
cancel-sign-sub-inv99.4%
metadata-eval99.4%
*-commutative99.4%
Simplified99.4%
Taylor expanded in x1 around 0 86.2%
Taylor expanded in x2 around 0 76.5%
*-commutative76.5%
Simplified76.5%
if 7.1999999999999996e-13 < x1 < 3.2999999999999998e184Initial program 86.8%
Taylor expanded in x1 around 0 31.9%
Taylor expanded in x1 around 0 41.5%
*-commutative41.5%
Simplified41.5%
Taylor expanded in x1 around inf 41.5%
Final simplification68.0%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (+ x1 (* 3.0 (* (* x1 x1) (- 3.0 (* x2 -2.0)))))))
(if (<= x1 -6.2e+65)
t_0
(if (<= x1 -6.5e-120)
(+ x1 (+ (* x2 -6.0) (* x1 (* 8.0 (* x2 x2)))))
(if (<= x1 6.4e-10)
(+ (* x2 (- (* x1 -12.0) 6.0)) (+ x1 (* x1 -2.0)))
(if (<= x1 3.3e+184)
(* x1 (+ 2.0 (* 4.0 (* x2 (- (* 2.0 x2) 3.0)))))
t_0))))))
double code(double x1, double x2) {
double t_0 = x1 + (3.0 * ((x1 * x1) * (3.0 - (x2 * -2.0))));
double tmp;
if (x1 <= -6.2e+65) {
tmp = t_0;
} else if (x1 <= -6.5e-120) {
tmp = x1 + ((x2 * -6.0) + (x1 * (8.0 * (x2 * x2))));
} else if (x1 <= 6.4e-10) {
tmp = (x2 * ((x1 * -12.0) - 6.0)) + (x1 + (x1 * -2.0));
} else if (x1 <= 3.3e+184) {
tmp = x1 * (2.0 + (4.0 * (x2 * ((2.0 * x2) - 3.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 + (3.0d0 * ((x1 * x1) * (3.0d0 - (x2 * (-2.0d0)))))
if (x1 <= (-6.2d+65)) then
tmp = t_0
else if (x1 <= (-6.5d-120)) then
tmp = x1 + ((x2 * (-6.0d0)) + (x1 * (8.0d0 * (x2 * x2))))
else if (x1 <= 6.4d-10) then
tmp = (x2 * ((x1 * (-12.0d0)) - 6.0d0)) + (x1 + (x1 * (-2.0d0)))
else if (x1 <= 3.3d+184) then
tmp = x1 * (2.0d0 + (4.0d0 * (x2 * ((2.0d0 * x2) - 3.0d0))))
else
tmp = t_0
end if
code = tmp
end function
public static double code(double x1, double x2) {
double t_0 = x1 + (3.0 * ((x1 * x1) * (3.0 - (x2 * -2.0))));
double tmp;
if (x1 <= -6.2e+65) {
tmp = t_0;
} else if (x1 <= -6.5e-120) {
tmp = x1 + ((x2 * -6.0) + (x1 * (8.0 * (x2 * x2))));
} else if (x1 <= 6.4e-10) {
tmp = (x2 * ((x1 * -12.0) - 6.0)) + (x1 + (x1 * -2.0));
} else if (x1 <= 3.3e+184) {
tmp = x1 * (2.0 + (4.0 * (x2 * ((2.0 * x2) - 3.0))));
} else {
tmp = t_0;
}
return tmp;
}
def code(x1, x2): t_0 = x1 + (3.0 * ((x1 * x1) * (3.0 - (x2 * -2.0)))) tmp = 0 if x1 <= -6.2e+65: tmp = t_0 elif x1 <= -6.5e-120: tmp = x1 + ((x2 * -6.0) + (x1 * (8.0 * (x2 * x2)))) elif x1 <= 6.4e-10: tmp = (x2 * ((x1 * -12.0) - 6.0)) + (x1 + (x1 * -2.0)) elif x1 <= 3.3e+184: tmp = x1 * (2.0 + (4.0 * (x2 * ((2.0 * x2) - 3.0)))) else: tmp = t_0 return tmp
function code(x1, x2) t_0 = Float64(x1 + Float64(3.0 * Float64(Float64(x1 * x1) * Float64(3.0 - Float64(x2 * -2.0))))) tmp = 0.0 if (x1 <= -6.2e+65) tmp = t_0; elseif (x1 <= -6.5e-120) tmp = Float64(x1 + Float64(Float64(x2 * -6.0) + Float64(x1 * Float64(8.0 * Float64(x2 * x2))))); elseif (x1 <= 6.4e-10) tmp = Float64(Float64(x2 * Float64(Float64(x1 * -12.0) - 6.0)) + Float64(x1 + Float64(x1 * -2.0))); elseif (x1 <= 3.3e+184) tmp = Float64(x1 * Float64(2.0 + Float64(4.0 * Float64(x2 * Float64(Float64(2.0 * x2) - 3.0))))); else tmp = t_0; end return tmp end
function tmp_2 = code(x1, x2) t_0 = x1 + (3.0 * ((x1 * x1) * (3.0 - (x2 * -2.0)))); tmp = 0.0; if (x1 <= -6.2e+65) tmp = t_0; elseif (x1 <= -6.5e-120) tmp = x1 + ((x2 * -6.0) + (x1 * (8.0 * (x2 * x2)))); elseif (x1 <= 6.4e-10) tmp = (x2 * ((x1 * -12.0) - 6.0)) + (x1 + (x1 * -2.0)); elseif (x1 <= 3.3e+184) tmp = x1 * (2.0 + (4.0 * (x2 * ((2.0 * x2) - 3.0)))); else tmp = t_0; end tmp_2 = tmp; end
code[x1_, x2_] := Block[{t$95$0 = N[(x1 + N[(3.0 * N[(N[(x1 * x1), $MachinePrecision] * N[(3.0 - N[(x2 * -2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x1, -6.2e+65], t$95$0, If[LessEqual[x1, -6.5e-120], N[(x1 + N[(N[(x2 * -6.0), $MachinePrecision] + N[(x1 * N[(8.0 * N[(x2 * x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 6.4e-10], N[(N[(x2 * N[(N[(x1 * -12.0), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision] + N[(x1 + N[(x1 * -2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 3.3e+184], N[(x1 * N[(2.0 + N[(4.0 * N[(x2 * N[(N[(2.0 * x2), $MachinePrecision] - 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$0]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x1 + 3 \cdot \left(\left(x1 \cdot x1\right) \cdot \left(3 - x2 \cdot -2\right)\right)\\
\mathbf{if}\;x1 \leq -6.2 \cdot 10^{+65}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;x1 \leq -6.5 \cdot 10^{-120}:\\
\;\;\;\;x1 + \left(x2 \cdot -6 + x1 \cdot \left(8 \cdot \left(x2 \cdot x2\right)\right)\right)\\
\mathbf{elif}\;x1 \leq 6.4 \cdot 10^{-10}:\\
\;\;\;\;x2 \cdot \left(x1 \cdot -12 - 6\right) + \left(x1 + x1 \cdot -2\right)\\
\mathbf{elif}\;x1 \leq 3.3 \cdot 10^{+184}:\\
\;\;\;\;x1 \cdot \left(2 + 4 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t_0\\
\end{array}
\end{array}
if x1 < -6.19999999999999981e65 or 3.2999999999999998e184 < x1 Initial program 8.5%
Taylor expanded in x1 around 0 0.0%
Taylor expanded in x1 around 0 54.2%
+-commutative54.2%
neg-mul-154.2%
unsub-neg54.2%
+-commutative54.2%
*-commutative54.2%
fma-def54.2%
unpow254.2%
cancel-sign-sub-inv54.2%
metadata-eval54.2%
*-commutative54.2%
Simplified54.2%
Taylor expanded in x1 around inf 54.2%
Taylor expanded in x1 around inf 72.5%
unpow272.5%
metadata-eval72.5%
cancel-sign-sub-inv72.5%
*-commutative72.5%
Simplified72.5%
if -6.19999999999999981e65 < x1 < -6.50000000000000029e-120Initial program 99.4%
Taylor expanded in x1 around 0 83.4%
Taylor expanded in x1 around 0 81.5%
+-commutative81.5%
neg-mul-181.5%
unsub-neg81.5%
+-commutative81.5%
*-commutative81.5%
fma-def81.5%
unpow281.5%
cancel-sign-sub-inv81.5%
metadata-eval81.5%
*-commutative81.5%
Simplified81.5%
Taylor expanded in x1 around 0 83.4%
Taylor expanded in x2 around inf 63.2%
associate-*r*63.2%
unpow263.2%
Simplified63.2%
if -6.50000000000000029e-120 < x1 < 6.39999999999999961e-10Initial program 99.4%
Taylor expanded in x1 around 0 99.4%
Taylor expanded in x1 around 0 99.4%
+-commutative99.4%
neg-mul-199.4%
unsub-neg99.4%
+-commutative99.4%
*-commutative99.4%
fma-def99.4%
unpow299.4%
cancel-sign-sub-inv99.4%
metadata-eval99.4%
*-commutative99.4%
Simplified99.4%
Taylor expanded in x1 around 0 86.2%
Taylor expanded in x2 around 0 76.5%
if 6.39999999999999961e-10 < x1 < 3.2999999999999998e184Initial program 86.8%
Taylor expanded in x1 around 0 31.9%
Taylor expanded in x1 around 0 41.5%
*-commutative41.5%
Simplified41.5%
Taylor expanded in x1 around inf 41.5%
Final simplification68.0%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (+ x1 (* 3.0 (* (* x1 x1) (- 3.0 (* x2 -2.0)))))))
(if (<= x1 -40000.0)
t_0
(if (<= x1 1.02e-12)
(+ x1 (+ (* x2 -6.0) (* x1 -2.0)))
(if (<= x1 3.3e+184)
(* x1 (+ 2.0 (* 4.0 (* x2 (- (* 2.0 x2) 3.0)))))
t_0)))))
double code(double x1, double x2) {
double t_0 = x1 + (3.0 * ((x1 * x1) * (3.0 - (x2 * -2.0))));
double tmp;
if (x1 <= -40000.0) {
tmp = t_0;
} else if (x1 <= 1.02e-12) {
tmp = x1 + ((x2 * -6.0) + (x1 * -2.0));
} else if (x1 <= 3.3e+184) {
tmp = x1 * (2.0 + (4.0 * (x2 * ((2.0 * x2) - 3.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 + (3.0d0 * ((x1 * x1) * (3.0d0 - (x2 * (-2.0d0)))))
if (x1 <= (-40000.0d0)) then
tmp = t_0
else if (x1 <= 1.02d-12) then
tmp = x1 + ((x2 * (-6.0d0)) + (x1 * (-2.0d0)))
else if (x1 <= 3.3d+184) then
tmp = x1 * (2.0d0 + (4.0d0 * (x2 * ((2.0d0 * x2) - 3.0d0))))
else
tmp = t_0
end if
code = tmp
end function
public static double code(double x1, double x2) {
double t_0 = x1 + (3.0 * ((x1 * x1) * (3.0 - (x2 * -2.0))));
double tmp;
if (x1 <= -40000.0) {
tmp = t_0;
} else if (x1 <= 1.02e-12) {
tmp = x1 + ((x2 * -6.0) + (x1 * -2.0));
} else if (x1 <= 3.3e+184) {
tmp = x1 * (2.0 + (4.0 * (x2 * ((2.0 * x2) - 3.0))));
} else {
tmp = t_0;
}
return tmp;
}
def code(x1, x2): t_0 = x1 + (3.0 * ((x1 * x1) * (3.0 - (x2 * -2.0)))) tmp = 0 if x1 <= -40000.0: tmp = t_0 elif x1 <= 1.02e-12: tmp = x1 + ((x2 * -6.0) + (x1 * -2.0)) elif x1 <= 3.3e+184: tmp = x1 * (2.0 + (4.0 * (x2 * ((2.0 * x2) - 3.0)))) else: tmp = t_0 return tmp
function code(x1, x2) t_0 = Float64(x1 + Float64(3.0 * Float64(Float64(x1 * x1) * Float64(3.0 - Float64(x2 * -2.0))))) tmp = 0.0 if (x1 <= -40000.0) tmp = t_0; elseif (x1 <= 1.02e-12) tmp = Float64(x1 + Float64(Float64(x2 * -6.0) + Float64(x1 * -2.0))); elseif (x1 <= 3.3e+184) tmp = Float64(x1 * Float64(2.0 + Float64(4.0 * Float64(x2 * Float64(Float64(2.0 * x2) - 3.0))))); else tmp = t_0; end return tmp end
function tmp_2 = code(x1, x2) t_0 = x1 + (3.0 * ((x1 * x1) * (3.0 - (x2 * -2.0)))); tmp = 0.0; if (x1 <= -40000.0) tmp = t_0; elseif (x1 <= 1.02e-12) tmp = x1 + ((x2 * -6.0) + (x1 * -2.0)); elseif (x1 <= 3.3e+184) tmp = x1 * (2.0 + (4.0 * (x2 * ((2.0 * x2) - 3.0)))); else tmp = t_0; end tmp_2 = tmp; end
code[x1_, x2_] := Block[{t$95$0 = N[(x1 + N[(3.0 * N[(N[(x1 * x1), $MachinePrecision] * N[(3.0 - N[(x2 * -2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x1, -40000.0], t$95$0, If[LessEqual[x1, 1.02e-12], N[(x1 + N[(N[(x2 * -6.0), $MachinePrecision] + N[(x1 * -2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 3.3e+184], N[(x1 * N[(2.0 + N[(4.0 * N[(x2 * N[(N[(2.0 * x2), $MachinePrecision] - 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$0]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x1 + 3 \cdot \left(\left(x1 \cdot x1\right) \cdot \left(3 - x2 \cdot -2\right)\right)\\
\mathbf{if}\;x1 \leq -40000:\\
\;\;\;\;t_0\\
\mathbf{elif}\;x1 \leq 1.02 \cdot 10^{-12}:\\
\;\;\;\;x1 + \left(x2 \cdot -6 + x1 \cdot -2\right)\\
\mathbf{elif}\;x1 \leq 3.3 \cdot 10^{+184}:\\
\;\;\;\;x1 \cdot \left(2 + 4 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t_0\\
\end{array}
\end{array}
if x1 < -4e4 or 3.2999999999999998e184 < x1 Initial program 19.3%
Taylor expanded in x1 around 0 5.6%
Taylor expanded in x1 around 0 52.6%
+-commutative52.6%
neg-mul-152.6%
unsub-neg52.6%
+-commutative52.6%
*-commutative52.6%
fma-def52.6%
unpow252.6%
cancel-sign-sub-inv52.6%
metadata-eval52.6%
*-commutative52.6%
Simplified52.6%
Taylor expanded in x1 around inf 52.6%
Taylor expanded in x1 around inf 66.6%
unpow266.6%
metadata-eval66.6%
cancel-sign-sub-inv66.6%
*-commutative66.6%
Simplified66.6%
if -4e4 < x1 < 1.02e-12Initial program 99.4%
Taylor expanded in x1 around 0 99.3%
Taylor expanded in x1 around 0 99.3%
+-commutative99.3%
neg-mul-199.3%
unsub-neg99.3%
+-commutative99.3%
*-commutative99.3%
fma-def99.3%
unpow299.3%
cancel-sign-sub-inv99.3%
metadata-eval99.3%
*-commutative99.3%
Simplified99.3%
Taylor expanded in x1 around 0 88.7%
Taylor expanded in x2 around 0 73.4%
*-commutative73.4%
Simplified73.4%
if 1.02e-12 < x1 < 3.2999999999999998e184Initial program 86.8%
Taylor expanded in x1 around 0 31.9%
Taylor expanded in x1 around 0 41.5%
*-commutative41.5%
Simplified41.5%
Taylor expanded in x1 around inf 41.5%
Final simplification66.1%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (+ x1 (* (* x2 x2) (* x1 8.0)))) (t_1 (+ x1 (* x2 -6.0))))
(if (<= x2 -2.35e+116)
t_0
(if (<= x2 -2.9e-151)
t_1
(if (<= x2 1.6e-98) (- x1) (if (<= x2 5.5e+113) t_1 t_0))))))
double code(double x1, double x2) {
double t_0 = x1 + ((x2 * x2) * (x1 * 8.0));
double t_1 = x1 + (x2 * -6.0);
double tmp;
if (x2 <= -2.35e+116) {
tmp = t_0;
} else if (x2 <= -2.9e-151) {
tmp = t_1;
} else if (x2 <= 1.6e-98) {
tmp = -x1;
} else if (x2 <= 5.5e+113) {
tmp = t_1;
} 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) :: tmp
t_0 = x1 + ((x2 * x2) * (x1 * 8.0d0))
t_1 = x1 + (x2 * (-6.0d0))
if (x2 <= (-2.35d+116)) then
tmp = t_0
else if (x2 <= (-2.9d-151)) then
tmp = t_1
else if (x2 <= 1.6d-98) then
tmp = -x1
else if (x2 <= 5.5d+113) then
tmp = t_1
else
tmp = t_0
end if
code = tmp
end function
public static double code(double x1, double x2) {
double t_0 = x1 + ((x2 * x2) * (x1 * 8.0));
double t_1 = x1 + (x2 * -6.0);
double tmp;
if (x2 <= -2.35e+116) {
tmp = t_0;
} else if (x2 <= -2.9e-151) {
tmp = t_1;
} else if (x2 <= 1.6e-98) {
tmp = -x1;
} else if (x2 <= 5.5e+113) {
tmp = t_1;
} else {
tmp = t_0;
}
return tmp;
}
def code(x1, x2): t_0 = x1 + ((x2 * x2) * (x1 * 8.0)) t_1 = x1 + (x2 * -6.0) tmp = 0 if x2 <= -2.35e+116: tmp = t_0 elif x2 <= -2.9e-151: tmp = t_1 elif x2 <= 1.6e-98: tmp = -x1 elif x2 <= 5.5e+113: tmp = t_1 else: tmp = t_0 return tmp
function code(x1, x2) t_0 = Float64(x1 + Float64(Float64(x2 * x2) * Float64(x1 * 8.0))) t_1 = Float64(x1 + Float64(x2 * -6.0)) tmp = 0.0 if (x2 <= -2.35e+116) tmp = t_0; elseif (x2 <= -2.9e-151) tmp = t_1; elseif (x2 <= 1.6e-98) tmp = Float64(-x1); elseif (x2 <= 5.5e+113) tmp = t_1; else tmp = t_0; end return tmp end
function tmp_2 = code(x1, x2) t_0 = x1 + ((x2 * x2) * (x1 * 8.0)); t_1 = x1 + (x2 * -6.0); tmp = 0.0; if (x2 <= -2.35e+116) tmp = t_0; elseif (x2 <= -2.9e-151) tmp = t_1; elseif (x2 <= 1.6e-98) tmp = -x1; elseif (x2 <= 5.5e+113) tmp = t_1; else tmp = t_0; end tmp_2 = tmp; end
code[x1_, x2_] := Block[{t$95$0 = N[(x1 + N[(N[(x2 * x2), $MachinePrecision] * N[(x1 * 8.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(x1 + N[(x2 * -6.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x2, -2.35e+116], t$95$0, If[LessEqual[x2, -2.9e-151], t$95$1, If[LessEqual[x2, 1.6e-98], (-x1), If[LessEqual[x2, 5.5e+113], t$95$1, t$95$0]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x1 + \left(x2 \cdot x2\right) \cdot \left(x1 \cdot 8\right)\\
t_1 := x1 + x2 \cdot -6\\
\mathbf{if}\;x2 \leq -2.35 \cdot 10^{+116}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;x2 \leq -2.9 \cdot 10^{-151}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;x2 \leq 1.6 \cdot 10^{-98}:\\
\;\;\;\;-x1\\
\mathbf{elif}\;x2 \leq 5.5 \cdot 10^{+113}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;t_0\\
\end{array}
\end{array}
if x2 < -2.3500000000000002e116 or 5.5000000000000001e113 < x2 Initial program 70.1%
Taylor expanded in x1 around 0 65.4%
Taylor expanded in x1 around 0 61.8%
+-commutative61.8%
neg-mul-161.8%
unsub-neg61.8%
+-commutative61.8%
*-commutative61.8%
fma-def61.8%
unpow261.8%
cancel-sign-sub-inv61.8%
metadata-eval61.8%
*-commutative61.8%
Simplified61.8%
Taylor expanded in x2 around inf 53.8%
*-commutative53.8%
associate-*l*53.8%
unpow253.8%
Simplified53.8%
if -2.3500000000000002e116 < x2 < -2.90000000000000013e-151 or 1.6e-98 < x2 < 5.5000000000000001e113Initial program 68.7%
Taylor expanded in x1 around 0 52.3%
Taylor expanded in x1 around 0 68.8%
+-commutative68.8%
neg-mul-168.8%
unsub-neg68.8%
+-commutative68.8%
*-commutative68.8%
fma-def68.8%
unpow268.8%
cancel-sign-sub-inv68.8%
metadata-eval68.8%
*-commutative68.8%
Simplified68.8%
Taylor expanded in x1 around 0 43.4%
*-commutative43.4%
Simplified43.4%
if -2.90000000000000013e-151 < x2 < 1.6e-98Initial program 66.3%
Taylor expanded in x1 around 0 47.4%
Taylor expanded in x1 around 0 80.9%
+-commutative80.9%
neg-mul-180.9%
unsub-neg80.9%
+-commutative80.9%
*-commutative80.9%
fma-def80.9%
unpow280.9%
cancel-sign-sub-inv80.9%
metadata-eval80.9%
*-commutative80.9%
Simplified80.9%
Taylor expanded in x1 around 0 48.6%
Taylor expanded in x2 around 0 38.0%
distribute-rgt1-in38.0%
metadata-eval38.0%
mul-1-neg38.0%
Simplified38.0%
Final simplification45.0%
(FPCore (x1 x2) :precision binary64 (if (or (<= x2 -4.7e+112) (not (<= x2 8.2e+100))) (+ x1 (* (* x2 x2) (* x1 8.0))) (+ x1 (+ (* x2 -6.0) (* x1 -2.0)))))
double code(double x1, double x2) {
double tmp;
if ((x2 <= -4.7e+112) || !(x2 <= 8.2e+100)) {
tmp = x1 + ((x2 * x2) * (x1 * 8.0));
} else {
tmp = x1 + ((x2 * -6.0) + (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+112)) .or. (.not. (x2 <= 8.2d+100))) then
tmp = x1 + ((x2 * x2) * (x1 * 8.0d0))
else
tmp = x1 + ((x2 * (-6.0d0)) + (x1 * (-2.0d0)))
end if
code = tmp
end function
public static double code(double x1, double x2) {
double tmp;
if ((x2 <= -4.7e+112) || !(x2 <= 8.2e+100)) {
tmp = x1 + ((x2 * x2) * (x1 * 8.0));
} else {
tmp = x1 + ((x2 * -6.0) + (x1 * -2.0));
}
return tmp;
}
def code(x1, x2): tmp = 0 if (x2 <= -4.7e+112) or not (x2 <= 8.2e+100): tmp = x1 + ((x2 * x2) * (x1 * 8.0)) else: tmp = x1 + ((x2 * -6.0) + (x1 * -2.0)) return tmp
function code(x1, x2) tmp = 0.0 if ((x2 <= -4.7e+112) || !(x2 <= 8.2e+100)) tmp = Float64(x1 + Float64(Float64(x2 * x2) * Float64(x1 * 8.0))); else tmp = Float64(x1 + Float64(Float64(x2 * -6.0) + Float64(x1 * -2.0))); end return tmp end
function tmp_2 = code(x1, x2) tmp = 0.0; if ((x2 <= -4.7e+112) || ~((x2 <= 8.2e+100))) tmp = x1 + ((x2 * x2) * (x1 * 8.0)); else tmp = x1 + ((x2 * -6.0) + (x1 * -2.0)); end tmp_2 = tmp; end
code[x1_, x2_] := If[Or[LessEqual[x2, -4.7e+112], N[Not[LessEqual[x2, 8.2e+100]], $MachinePrecision]], N[(x1 + N[(N[(x2 * x2), $MachinePrecision] * N[(x1 * 8.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x1 + N[(N[(x2 * -6.0), $MachinePrecision] + N[(x1 * -2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x2 \leq -4.7 \cdot 10^{+112} \lor \neg \left(x2 \leq 8.2 \cdot 10^{+100}\right):\\
\;\;\;\;x1 + \left(x2 \cdot x2\right) \cdot \left(x1 \cdot 8\right)\\
\mathbf{else}:\\
\;\;\;\;x1 + \left(x2 \cdot -6 + x1 \cdot -2\right)\\
\end{array}
\end{array}
if x2 < -4.69999999999999997e112 or 8.2000000000000006e100 < x2 Initial program 69.6%
Taylor expanded in x1 around 0 65.1%
Taylor expanded in x1 around 0 62.7%
+-commutative62.7%
neg-mul-162.7%
unsub-neg62.7%
+-commutative62.7%
*-commutative62.7%
fma-def62.7%
unpow262.7%
cancel-sign-sub-inv62.7%
metadata-eval62.7%
*-commutative62.7%
Simplified62.7%
Taylor expanded in x2 around inf 53.7%
*-commutative53.7%
associate-*l*53.7%
unpow253.7%
Simplified53.7%
if -4.69999999999999997e112 < x2 < 8.2000000000000006e100Initial program 67.7%
Taylor expanded in x1 around 0 49.9%
Taylor expanded in x1 around 0 74.5%
+-commutative74.5%
neg-mul-174.5%
unsub-neg74.5%
+-commutative74.5%
*-commutative74.5%
fma-def74.5%
unpow274.5%
cancel-sign-sub-inv74.5%
metadata-eval74.5%
*-commutative74.5%
Simplified74.5%
Taylor expanded in x1 around 0 51.0%
Taylor expanded in x2 around 0 49.0%
*-commutative49.0%
Simplified49.0%
Final simplification50.6%
(FPCore (x1 x2) :precision binary64 (if (or (<= x2 -2.3e-149) (not (<= x2 8e-99))) (+ x1 (* x2 -6.0)) (- x1)))
double code(double x1, double x2) {
double tmp;
if ((x2 <= -2.3e-149) || !(x2 <= 8e-99)) {
tmp = x1 + (x2 * -6.0);
} else {
tmp = -x1;
}
return tmp;
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
real(8) :: tmp
if ((x2 <= (-2.3d-149)) .or. (.not. (x2 <= 8d-99))) then
tmp = x1 + (x2 * (-6.0d0))
else
tmp = -x1
end if
code = tmp
end function
public static double code(double x1, double x2) {
double tmp;
if ((x2 <= -2.3e-149) || !(x2 <= 8e-99)) {
tmp = x1 + (x2 * -6.0);
} else {
tmp = -x1;
}
return tmp;
}
def code(x1, x2): tmp = 0 if (x2 <= -2.3e-149) or not (x2 <= 8e-99): tmp = x1 + (x2 * -6.0) else: tmp = -x1 return tmp
function code(x1, x2) tmp = 0.0 if ((x2 <= -2.3e-149) || !(x2 <= 8e-99)) tmp = Float64(x1 + Float64(x2 * -6.0)); else tmp = Float64(-x1); end return tmp end
function tmp_2 = code(x1, x2) tmp = 0.0; if ((x2 <= -2.3e-149) || ~((x2 <= 8e-99))) tmp = x1 + (x2 * -6.0); else tmp = -x1; end tmp_2 = tmp; end
code[x1_, x2_] := If[Or[LessEqual[x2, -2.3e-149], N[Not[LessEqual[x2, 8e-99]], $MachinePrecision]], N[(x1 + N[(x2 * -6.0), $MachinePrecision]), $MachinePrecision], (-x1)]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x2 \leq -2.3 \cdot 10^{-149} \lor \neg \left(x2 \leq 8 \cdot 10^{-99}\right):\\
\;\;\;\;x1 + x2 \cdot -6\\
\mathbf{else}:\\
\;\;\;\;-x1\\
\end{array}
\end{array}
if x2 < -2.3e-149 or 8.0000000000000002e-99 < x2 Initial program 69.4%
Taylor expanded in x1 around 0 58.7%
Taylor expanded in x1 around 0 65.4%
+-commutative65.4%
neg-mul-165.4%
unsub-neg65.4%
+-commutative65.4%
*-commutative65.4%
fma-def65.4%
unpow265.4%
cancel-sign-sub-inv65.4%
metadata-eval65.4%
*-commutative65.4%
Simplified65.4%
Taylor expanded in x1 around 0 28.8%
*-commutative28.8%
Simplified28.8%
if -2.3e-149 < x2 < 8.0000000000000002e-99Initial program 66.3%
Taylor expanded in x1 around 0 47.4%
Taylor expanded in x1 around 0 80.9%
+-commutative80.9%
neg-mul-180.9%
unsub-neg80.9%
+-commutative80.9%
*-commutative80.9%
fma-def80.9%
unpow280.9%
cancel-sign-sub-inv80.9%
metadata-eval80.9%
*-commutative80.9%
Simplified80.9%
Taylor expanded in x1 around 0 48.6%
Taylor expanded in x2 around 0 38.0%
distribute-rgt1-in38.0%
metadata-eval38.0%
mul-1-neg38.0%
Simplified38.0%
Final simplification31.8%
(FPCore (x1 x2) :precision binary64 (- x1))
double code(double x1, double x2) {
return -x1;
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
code = -x1
end function
public static double code(double x1, double x2) {
return -x1;
}
def code(x1, x2): return -x1
function code(x1, x2) return Float64(-x1) end
function tmp = code(x1, x2) tmp = -x1; end
code[x1_, x2_] := (-x1)
\begin{array}{l}
\\
-x1
\end{array}
Initial program 68.4%
Taylor expanded in x1 around 0 55.0%
Taylor expanded in x1 around 0 70.6%
+-commutative70.6%
neg-mul-170.6%
unsub-neg70.6%
+-commutative70.6%
*-commutative70.6%
fma-def70.6%
unpow270.6%
cancel-sign-sub-inv70.6%
metadata-eval70.6%
*-commutative70.6%
Simplified70.6%
Taylor expanded in x1 around 0 54.2%
Taylor expanded in x2 around 0 15.6%
distribute-rgt1-in15.6%
metadata-eval15.6%
mul-1-neg15.6%
Simplified15.6%
Final simplification15.6%
herbie shell --seed 2023224
(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))))))