
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (* (* 3.0 x1) x1))
(t_1 (+ (* x1 x1) 1.0))
(t_2 (/ (- (+ t_0 (* 2.0 x2)) x1) t_1)))
(+
x1
(+
(+
(+
(+
(*
(+
(* (* (* 2.0 x1) t_2) (- t_2 3.0))
(* (* x1 x1) (- (* 4.0 t_2) 6.0)))
t_1)
(* t_0 t_2))
(* (* x1 x1) x1))
x1)
(* 3.0 (/ (- (- t_0 (* 2.0 x2)) x1) t_1))))))
double code(double x1, double x2) {
double t_0 = (3.0 * x1) * x1;
double t_1 = (x1 * x1) + 1.0;
double t_2 = ((t_0 + (2.0 * x2)) - x1) / t_1;
return x1 + (((((((((2.0 * x1) * t_2) * (t_2 - 3.0)) + ((x1 * x1) * ((4.0 * t_2) - 6.0))) * t_1) + (t_0 * t_2)) + ((x1 * x1) * x1)) + x1) + (3.0 * (((t_0 - (2.0 * x2)) - x1) / t_1)));
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
real(8) :: t_0
real(8) :: t_1
real(8) :: t_2
t_0 = (3.0d0 * x1) * x1
t_1 = (x1 * x1) + 1.0d0
t_2 = ((t_0 + (2.0d0 * x2)) - x1) / t_1
code = x1 + (((((((((2.0d0 * x1) * t_2) * (t_2 - 3.0d0)) + ((x1 * x1) * ((4.0d0 * t_2) - 6.0d0))) * t_1) + (t_0 * t_2)) + ((x1 * x1) * x1)) + x1) + (3.0d0 * (((t_0 - (2.0d0 * x2)) - x1) / t_1)))
end function
public static double code(double x1, double x2) {
double t_0 = (3.0 * x1) * x1;
double t_1 = (x1 * x1) + 1.0;
double t_2 = ((t_0 + (2.0 * x2)) - x1) / t_1;
return x1 + (((((((((2.0 * x1) * t_2) * (t_2 - 3.0)) + ((x1 * x1) * ((4.0 * t_2) - 6.0))) * t_1) + (t_0 * t_2)) + ((x1 * x1) * x1)) + x1) + (3.0 * (((t_0 - (2.0 * x2)) - x1) / t_1)));
}
def code(x1, x2): t_0 = (3.0 * x1) * x1 t_1 = (x1 * x1) + 1.0 t_2 = ((t_0 + (2.0 * x2)) - x1) / t_1 return x1 + (((((((((2.0 * x1) * t_2) * (t_2 - 3.0)) + ((x1 * x1) * ((4.0 * t_2) - 6.0))) * t_1) + (t_0 * t_2)) + ((x1 * x1) * x1)) + x1) + (3.0 * (((t_0 - (2.0 * x2)) - x1) / t_1)))
function code(x1, x2) t_0 = Float64(Float64(3.0 * x1) * x1) t_1 = Float64(Float64(x1 * x1) + 1.0) t_2 = Float64(Float64(Float64(t_0 + Float64(2.0 * x2)) - x1) / t_1) return Float64(x1 + Float64(Float64(Float64(Float64(Float64(Float64(Float64(Float64(Float64(2.0 * x1) * t_2) * Float64(t_2 - 3.0)) + Float64(Float64(x1 * x1) * Float64(Float64(4.0 * t_2) - 6.0))) * t_1) + Float64(t_0 * t_2)) + Float64(Float64(x1 * x1) * x1)) + x1) + Float64(3.0 * Float64(Float64(Float64(t_0 - Float64(2.0 * x2)) - x1) / t_1)))) end
function tmp = code(x1, x2) t_0 = (3.0 * x1) * x1; t_1 = (x1 * x1) + 1.0; t_2 = ((t_0 + (2.0 * x2)) - x1) / t_1; tmp = x1 + (((((((((2.0 * x1) * t_2) * (t_2 - 3.0)) + ((x1 * x1) * ((4.0 * t_2) - 6.0))) * t_1) + (t_0 * t_2)) + ((x1 * x1) * x1)) + x1) + (3.0 * (((t_0 - (2.0 * x2)) - x1) / t_1))); end
code[x1_, x2_] := Block[{t$95$0 = N[(N[(3.0 * x1), $MachinePrecision] * x1), $MachinePrecision]}, Block[{t$95$1 = N[(N[(x1 * x1), $MachinePrecision] + 1.0), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[(t$95$0 + N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$1), $MachinePrecision]}, N[(x1 + N[(N[(N[(N[(N[(N[(N[(N[(N[(2.0 * x1), $MachinePrecision] * t$95$2), $MachinePrecision] * N[(t$95$2 - 3.0), $MachinePrecision]), $MachinePrecision] + N[(N[(x1 * x1), $MachinePrecision] * N[(N[(4.0 * t$95$2), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * t$95$1), $MachinePrecision] + N[(t$95$0 * t$95$2), $MachinePrecision]), $MachinePrecision] + N[(N[(x1 * x1), $MachinePrecision] * x1), $MachinePrecision]), $MachinePrecision] + x1), $MachinePrecision] + N[(3.0 * N[(N[(N[(t$95$0 - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \left(3 \cdot x1\right) \cdot x1\\
t_1 := x1 \cdot x1 + 1\\
t_2 := \frac{\left(t_0 + 2 \cdot x2\right) - x1}{t_1}\\
x1 + \left(\left(\left(\left(\left(\left(\left(2 \cdot x1\right) \cdot t_2\right) \cdot \left(t_2 - 3\right) + \left(x1 \cdot x1\right) \cdot \left(4 \cdot t_2 - 6\right)\right) \cdot t_1 + t_0 \cdot t_2\right) + \left(x1 \cdot x1\right) \cdot x1\right) + x1\right) + 3 \cdot \frac{\left(t_0 - 2 \cdot x2\right) - x1}{t_1}\right)
\end{array}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 26 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (* (* 3.0 x1) x1))
(t_1 (+ (* x1 x1) 1.0))
(t_2 (/ (- (+ t_0 (* 2.0 x2)) x1) t_1)))
(+
x1
(+
(+
(+
(+
(*
(+
(* (* (* 2.0 x1) t_2) (- t_2 3.0))
(* (* x1 x1) (- (* 4.0 t_2) 6.0)))
t_1)
(* t_0 t_2))
(* (* x1 x1) x1))
x1)
(* 3.0 (/ (- (- t_0 (* 2.0 x2)) x1) t_1))))))
double code(double x1, double x2) {
double t_0 = (3.0 * x1) * x1;
double t_1 = (x1 * x1) + 1.0;
double t_2 = ((t_0 + (2.0 * x2)) - x1) / t_1;
return x1 + (((((((((2.0 * x1) * t_2) * (t_2 - 3.0)) + ((x1 * x1) * ((4.0 * t_2) - 6.0))) * t_1) + (t_0 * t_2)) + ((x1 * x1) * x1)) + x1) + (3.0 * (((t_0 - (2.0 * x2)) - x1) / t_1)));
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
real(8) :: t_0
real(8) :: t_1
real(8) :: t_2
t_0 = (3.0d0 * x1) * x1
t_1 = (x1 * x1) + 1.0d0
t_2 = ((t_0 + (2.0d0 * x2)) - x1) / t_1
code = x1 + (((((((((2.0d0 * x1) * t_2) * (t_2 - 3.0d0)) + ((x1 * x1) * ((4.0d0 * t_2) - 6.0d0))) * t_1) + (t_0 * t_2)) + ((x1 * x1) * x1)) + x1) + (3.0d0 * (((t_0 - (2.0d0 * x2)) - x1) / t_1)))
end function
public static double code(double x1, double x2) {
double t_0 = (3.0 * x1) * x1;
double t_1 = (x1 * x1) + 1.0;
double t_2 = ((t_0 + (2.0 * x2)) - x1) / t_1;
return x1 + (((((((((2.0 * x1) * t_2) * (t_2 - 3.0)) + ((x1 * x1) * ((4.0 * t_2) - 6.0))) * t_1) + (t_0 * t_2)) + ((x1 * x1) * x1)) + x1) + (3.0 * (((t_0 - (2.0 * x2)) - x1) / t_1)));
}
def code(x1, x2): t_0 = (3.0 * x1) * x1 t_1 = (x1 * x1) + 1.0 t_2 = ((t_0 + (2.0 * x2)) - x1) / t_1 return x1 + (((((((((2.0 * x1) * t_2) * (t_2 - 3.0)) + ((x1 * x1) * ((4.0 * t_2) - 6.0))) * t_1) + (t_0 * t_2)) + ((x1 * x1) * x1)) + x1) + (3.0 * (((t_0 - (2.0 * x2)) - x1) / t_1)))
function code(x1, x2) t_0 = Float64(Float64(3.0 * x1) * x1) t_1 = Float64(Float64(x1 * x1) + 1.0) t_2 = Float64(Float64(Float64(t_0 + Float64(2.0 * x2)) - x1) / t_1) return Float64(x1 + Float64(Float64(Float64(Float64(Float64(Float64(Float64(Float64(Float64(2.0 * x1) * t_2) * Float64(t_2 - 3.0)) + Float64(Float64(x1 * x1) * Float64(Float64(4.0 * t_2) - 6.0))) * t_1) + Float64(t_0 * t_2)) + Float64(Float64(x1 * x1) * x1)) + x1) + Float64(3.0 * Float64(Float64(Float64(t_0 - Float64(2.0 * x2)) - x1) / t_1)))) end
function tmp = code(x1, x2) t_0 = (3.0 * x1) * x1; t_1 = (x1 * x1) + 1.0; t_2 = ((t_0 + (2.0 * x2)) - x1) / t_1; tmp = x1 + (((((((((2.0 * x1) * t_2) * (t_2 - 3.0)) + ((x1 * x1) * ((4.0 * t_2) - 6.0))) * t_1) + (t_0 * t_2)) + ((x1 * x1) * x1)) + x1) + (3.0 * (((t_0 - (2.0 * x2)) - x1) / t_1))); end
code[x1_, x2_] := Block[{t$95$0 = N[(N[(3.0 * x1), $MachinePrecision] * x1), $MachinePrecision]}, Block[{t$95$1 = N[(N[(x1 * x1), $MachinePrecision] + 1.0), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[(t$95$0 + N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$1), $MachinePrecision]}, N[(x1 + N[(N[(N[(N[(N[(N[(N[(N[(N[(2.0 * x1), $MachinePrecision] * t$95$2), $MachinePrecision] * N[(t$95$2 - 3.0), $MachinePrecision]), $MachinePrecision] + N[(N[(x1 * x1), $MachinePrecision] * N[(N[(4.0 * t$95$2), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * t$95$1), $MachinePrecision] + N[(t$95$0 * t$95$2), $MachinePrecision]), $MachinePrecision] + N[(N[(x1 * x1), $MachinePrecision] * x1), $MachinePrecision]), $MachinePrecision] + x1), $MachinePrecision] + N[(3.0 * N[(N[(N[(t$95$0 - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \left(3 \cdot x1\right) \cdot x1\\
t_1 := x1 \cdot x1 + 1\\
t_2 := \frac{\left(t_0 + 2 \cdot x2\right) - x1}{t_1}\\
x1 + \left(\left(\left(\left(\left(\left(\left(2 \cdot x1\right) \cdot t_2\right) \cdot \left(t_2 - 3\right) + \left(x1 \cdot x1\right) \cdot \left(4 \cdot t_2 - 6\right)\right) \cdot t_1 + t_0 \cdot t_2\right) + \left(x1 \cdot x1\right) \cdot x1\right) + x1\right) + 3 \cdot \frac{\left(t_0 - 2 \cdot x2\right) - x1}{t_1}\right)
\end{array}
\end{array}
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (+ 3.0 (* x2 2.0))) (t_1 (fma x1 (* x1 3.0) (fma 2.0 x2 (- x1)))))
(if (<= x1 -5.4e+153)
(+
x1
(+
(+ x1 (* 4.0 (* -3.0 (* x1 x2))))
(* 3.0 (- (fma (* x1 x1) t_0 (* x2 -2.0)) x1))))
(if (<= x1 5.4e+153)
(+
x1
(fma
3.0
(/ (- (* x1 (* x1 3.0)) (fma 2.0 x2 x1)) (fma x1 x1 1.0))
(fma
x1
(* x1 (/ t_1 (/ (fma x1 x1 1.0) 3.0)))
(*
(fma x1 x1 1.0)
(+
x1
(+
(* x1 (* x1 -6.0))
(*
(/ t_1 (fma x1 x1 1.0))
(+
(* x1 (+ -6.0 (/ t_1 (/ (fma x1 x1 1.0) 2.0))))
(* 4.0 (* x1 x1))))))))))
(+
x1
(fma
x1
(fma 4.0 (* x2 (fma 2.0 x2 -3.0)) -2.0)
(fma 3.0 (* x1 (* x1 t_0)) (* x2 -6.0))))))))
double code(double x1, double x2) {
double t_0 = 3.0 + (x2 * 2.0);
double t_1 = fma(x1, (x1 * 3.0), fma(2.0, x2, -x1));
double tmp;
if (x1 <= -5.4e+153) {
tmp = x1 + ((x1 + (4.0 * (-3.0 * (x1 * x2)))) + (3.0 * (fma((x1 * x1), t_0, (x2 * -2.0)) - x1)));
} else if (x1 <= 5.4e+153) {
tmp = x1 + fma(3.0, (((x1 * (x1 * 3.0)) - fma(2.0, x2, x1)) / fma(x1, x1, 1.0)), fma(x1, (x1 * (t_1 / (fma(x1, x1, 1.0) / 3.0))), (fma(x1, x1, 1.0) * (x1 + ((x1 * (x1 * -6.0)) + ((t_1 / fma(x1, x1, 1.0)) * ((x1 * (-6.0 + (t_1 / (fma(x1, x1, 1.0) / 2.0)))) + (4.0 * (x1 * x1)))))))));
} else {
tmp = x1 + fma(x1, fma(4.0, (x2 * fma(2.0, x2, -3.0)), -2.0), fma(3.0, (x1 * (x1 * t_0)), (x2 * -6.0)));
}
return tmp;
}
function code(x1, x2) t_0 = Float64(3.0 + Float64(x2 * 2.0)) t_1 = fma(x1, Float64(x1 * 3.0), fma(2.0, x2, Float64(-x1))) tmp = 0.0 if (x1 <= -5.4e+153) tmp = Float64(x1 + Float64(Float64(x1 + Float64(4.0 * Float64(-3.0 * Float64(x1 * x2)))) + Float64(3.0 * Float64(fma(Float64(x1 * x1), t_0, Float64(x2 * -2.0)) - x1)))); elseif (x1 <= 5.4e+153) tmp = Float64(x1 + fma(3.0, Float64(Float64(Float64(x1 * Float64(x1 * 3.0)) - fma(2.0, x2, x1)) / fma(x1, x1, 1.0)), fma(x1, Float64(x1 * Float64(t_1 / 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_1 / fma(x1, x1, 1.0)) * Float64(Float64(x1 * Float64(-6.0 + Float64(t_1 / Float64(fma(x1, x1, 1.0) / 2.0)))) + Float64(4.0 * Float64(x1 * x1)))))))))); else tmp = Float64(x1 + fma(x1, fma(4.0, Float64(x2 * fma(2.0, x2, -3.0)), -2.0), fma(3.0, Float64(x1 * Float64(x1 * t_0)), Float64(x2 * -6.0)))); end return tmp end
code[x1_, x2_] := Block[{t$95$0 = N[(3.0 + N[(x2 * 2.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(x1 * N[(x1 * 3.0), $MachinePrecision] + N[(2.0 * x2 + (-x1)), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x1, -5.4e+153], N[(x1 + N[(N[(x1 + N[(4.0 * N[(-3.0 * N[(x1 * x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(3.0 * N[(N[(N[(x1 * x1), $MachinePrecision] * t$95$0 + N[(x2 * -2.0), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 5.4e+153], N[(x1 + N[(3.0 * N[(N[(N[(x1 * N[(x1 * 3.0), $MachinePrecision]), $MachinePrecision] - N[(2.0 * x2 + x1), $MachinePrecision]), $MachinePrecision] / N[(x1 * x1 + 1.0), $MachinePrecision]), $MachinePrecision] + N[(x1 * N[(x1 * N[(t$95$1 / 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$1 / N[(x1 * x1 + 1.0), $MachinePrecision]), $MachinePrecision] * N[(N[(x1 * N[(-6.0 + N[(t$95$1 / N[(N[(x1 * x1 + 1.0), $MachinePrecision] / 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(4.0 * N[(x1 * x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x1 + N[(x1 * N[(4.0 * N[(x2 * N[(2.0 * x2 + -3.0), $MachinePrecision]), $MachinePrecision] + -2.0), $MachinePrecision] + N[(3.0 * N[(x1 * N[(x1 * t$95$0), $MachinePrecision]), $MachinePrecision] + N[(x2 * -6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := 3 + x2 \cdot 2\\
t_1 := \mathsf{fma}\left(x1, x1 \cdot 3, \mathsf{fma}\left(2, x2, -x1\right)\right)\\
\mathbf{if}\;x1 \leq -5.4 \cdot 10^{+153}:\\
\;\;\;\;x1 + \left(\left(x1 + 4 \cdot \left(-3 \cdot \left(x1 \cdot x2\right)\right)\right) + 3 \cdot \left(\mathsf{fma}\left(x1 \cdot x1, t_0, x2 \cdot -2\right) - x1\right)\right)\\
\mathbf{elif}\;x1 \leq 5.4 \cdot 10^{+153}:\\
\;\;\;\;x1 + \mathsf{fma}\left(3, \frac{x1 \cdot \left(x1 \cdot 3\right) - \mathsf{fma}\left(2, x2, x1\right)}{\mathsf{fma}\left(x1, x1, 1\right)}, \mathsf{fma}\left(x1, x1 \cdot \frac{t_1}{\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_1}{\mathsf{fma}\left(x1, x1, 1\right)} \cdot \left(x1 \cdot \left(-6 + \frac{t_1}{\frac{\mathsf{fma}\left(x1, x1, 1\right)}{2}}\right) + 4 \cdot \left(x1 \cdot x1\right)\right)\right)\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x1 + \mathsf{fma}\left(x1, \mathsf{fma}\left(4, x2 \cdot \mathsf{fma}\left(2, x2, -3\right), -2\right), \mathsf{fma}\left(3, x1 \cdot \left(x1 \cdot t_0\right), x2 \cdot -6\right)\right)\\
\end{array}
\end{array}
if x1 < -5.4000000000000001e153Initial program 0.0%
Taylor expanded in x1 around 0 0.0%
Taylor expanded in x2 around 0 0.0%
Taylor expanded in x1 around 0 87.5%
+-commutative87.5%
neg-mul-187.5%
unsub-neg87.5%
+-commutative87.5%
*-commutative87.5%
fma-def87.5%
unpow287.5%
cancel-sign-sub-inv87.5%
metadata-eval87.5%
*-commutative87.5%
Simplified87.5%
if -5.4000000000000001e153 < x1 < 5.4000000000000001e153Initial program 92.0%
Simplified99.7%
if 5.4000000000000001e153 < x1 Initial program 0.0%
Taylor expanded in x1 around 0 0.0%
Taylor expanded in x1 around 0 85.7%
fma-def85.7%
fma-neg85.7%
fma-neg85.7%
metadata-eval85.7%
metadata-eval85.7%
+-commutative85.7%
*-commutative85.7%
fma-def85.7%
*-commutative85.7%
unpow285.7%
associate-*l*85.7%
cancel-sign-sub-inv85.7%
metadata-eval85.7%
*-commutative85.7%
Simplified85.7%
Final simplification97.0%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (+ (* x1 x1) 1.0))
(t_1 (* 3.0 (- (* x2 -2.0) x1)))
(t_2 (* x1 (* x1 3.0)))
(t_3 (/ (- (+ (* x2 2.0) t_2) x1) t_0)))
(if (<= x1 -5.6e+102)
(+ x1 (+ (+ x1 (* 4.0 (* -3.0 (* x1 x2)))) (cbrt (* t_1 (* t_1 t_1)))))
(if (<= x1 1.35e+154)
(+
x1
(+
t_1
(+
x1
(+
(+
(*
t_0
(+
(* (* (* x1 2.0) t_3) (- t_3 3.0))
(* (* x1 x1) (- (* 4.0 t_3) 6.0))))
(* 3.0 t_2))
(* x1 (* x1 x1))))))
(+
x1
(fma
x1
(fma 4.0 (* x2 (fma 2.0 x2 -3.0)) -2.0)
(fma 3.0 (* x1 (* x1 (+ 3.0 (* x2 2.0)))) (* x2 -6.0))))))))
double code(double x1, double x2) {
double t_0 = (x1 * x1) + 1.0;
double t_1 = 3.0 * ((x2 * -2.0) - x1);
double t_2 = x1 * (x1 * 3.0);
double t_3 = (((x2 * 2.0) + t_2) - x1) / t_0;
double tmp;
if (x1 <= -5.6e+102) {
tmp = x1 + ((x1 + (4.0 * (-3.0 * (x1 * x2)))) + cbrt((t_1 * (t_1 * t_1))));
} else if (x1 <= 1.35e+154) {
tmp = x1 + (t_1 + (x1 + (((t_0 * ((((x1 * 2.0) * t_3) * (t_3 - 3.0)) + ((x1 * x1) * ((4.0 * t_3) - 6.0)))) + (3.0 * t_2)) + (x1 * (x1 * x1)))));
} else {
tmp = x1 + fma(x1, fma(4.0, (x2 * fma(2.0, x2, -3.0)), -2.0), fma(3.0, (x1 * (x1 * (3.0 + (x2 * 2.0)))), (x2 * -6.0)));
}
return tmp;
}
function code(x1, x2) t_0 = Float64(Float64(x1 * x1) + 1.0) t_1 = Float64(3.0 * Float64(Float64(x2 * -2.0) - x1)) t_2 = Float64(x1 * Float64(x1 * 3.0)) t_3 = Float64(Float64(Float64(Float64(x2 * 2.0) + t_2) - x1) / t_0) tmp = 0.0 if (x1 <= -5.6e+102) tmp = Float64(x1 + Float64(Float64(x1 + Float64(4.0 * Float64(-3.0 * Float64(x1 * x2)))) + cbrt(Float64(t_1 * Float64(t_1 * t_1))))); elseif (x1 <= 1.35e+154) tmp = Float64(x1 + Float64(t_1 + Float64(x1 + Float64(Float64(Float64(t_0 * Float64(Float64(Float64(Float64(x1 * 2.0) * t_3) * Float64(t_3 - 3.0)) + Float64(Float64(x1 * x1) * Float64(Float64(4.0 * t_3) - 6.0)))) + Float64(3.0 * t_2)) + Float64(x1 * Float64(x1 * x1)))))); else tmp = Float64(x1 + fma(x1, fma(4.0, Float64(x2 * fma(2.0, x2, -3.0)), -2.0), fma(3.0, Float64(x1 * Float64(x1 * Float64(3.0 + Float64(x2 * 2.0)))), Float64(x2 * -6.0)))); end return tmp end
code[x1_, x2_] := Block[{t$95$0 = N[(N[(x1 * x1), $MachinePrecision] + 1.0), $MachinePrecision]}, Block[{t$95$1 = N[(3.0 * N[(N[(x2 * -2.0), $MachinePrecision] - x1), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x1 * N[(x1 * 3.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[(N[(N[(x2 * 2.0), $MachinePrecision] + t$95$2), $MachinePrecision] - x1), $MachinePrecision] / t$95$0), $MachinePrecision]}, If[LessEqual[x1, -5.6e+102], N[(x1 + N[(N[(x1 + N[(4.0 * N[(-3.0 * N[(x1 * x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[Power[N[(t$95$1 * N[(t$95$1 * t$95$1), $MachinePrecision]), $MachinePrecision], 1/3], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 1.35e+154], N[(x1 + N[(t$95$1 + N[(x1 + N[(N[(N[(t$95$0 * 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[(4.0 * t$95$3), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(3.0 * t$95$2), $MachinePrecision]), $MachinePrecision] + N[(x1 * N[(x1 * x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x1 + N[(x1 * N[(4.0 * N[(x2 * N[(2.0 * x2 + -3.0), $MachinePrecision]), $MachinePrecision] + -2.0), $MachinePrecision] + N[(3.0 * N[(x1 * N[(x1 * N[(3.0 + N[(x2 * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(x2 * -6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x1 \cdot x1 + 1\\
t_1 := 3 \cdot \left(x2 \cdot -2 - x1\right)\\
t_2 := x1 \cdot \left(x1 \cdot 3\right)\\
t_3 := \frac{\left(x2 \cdot 2 + t_2\right) - x1}{t_0}\\
\mathbf{if}\;x1 \leq -5.6 \cdot 10^{+102}:\\
\;\;\;\;x1 + \left(\left(x1 + 4 \cdot \left(-3 \cdot \left(x1 \cdot x2\right)\right)\right) + \sqrt[3]{t_1 \cdot \left(t_1 \cdot t_1\right)}\right)\\
\mathbf{elif}\;x1 \leq 1.35 \cdot 10^{+154}:\\
\;\;\;\;x1 + \left(t_1 + \left(x1 + \left(\left(t_0 \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(4 \cdot t_3 - 6\right)\right) + 3 \cdot t_2\right) + x1 \cdot \left(x1 \cdot x1\right)\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x1 + \mathsf{fma}\left(x1, \mathsf{fma}\left(4, x2 \cdot \mathsf{fma}\left(2, x2, -3\right), -2\right), \mathsf{fma}\left(3, x1 \cdot \left(x1 \cdot \left(3 + x2 \cdot 2\right)\right), x2 \cdot -6\right)\right)\\
\end{array}
\end{array}
if x1 < -5.60000000000000037e102Initial program 0.0%
Taylor expanded in x1 around 0 0.1%
Taylor expanded in x2 around 0 3.1%
Taylor expanded in x1 around 0 25.2%
+-commutative25.2%
neg-mul-125.2%
unsub-neg25.2%
*-commutative25.2%
Simplified25.2%
add-cbrt-cube89.7%
Applied egg-rr89.7%
if -5.60000000000000037e102 < x1 < 1.35000000000000003e154Initial program 99.3%
Taylor expanded in x1 around inf 98.4%
Taylor expanded in x1 around 0 99.3%
+-commutative53.5%
neg-mul-153.5%
unsub-neg53.5%
*-commutative53.5%
Simplified99.3%
if 1.35000000000000003e154 < x1 Initial program 0.0%
Taylor expanded in x1 around 0 0.0%
Taylor expanded in x1 around 0 85.7%
fma-def85.7%
fma-neg85.7%
fma-neg85.7%
metadata-eval85.7%
metadata-eval85.7%
+-commutative85.7%
*-commutative85.7%
fma-def85.7%
*-commutative85.7%
unpow285.7%
associate-*l*85.7%
cancel-sign-sub-inv85.7%
metadata-eval85.7%
*-commutative85.7%
Simplified85.7%
Final simplification96.4%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (+ (* x1 x1) 1.0))
(t_1 (* 3.0 (- (* x2 -2.0) x1)))
(t_2 (* x1 (* x1 3.0)))
(t_3 (/ (- (+ (* x2 2.0) t_2) x1) t_0)))
(if (<= x1 -5.6e+102)
(+ x1 (+ (+ x1 (* 4.0 (* -3.0 (* x1 x2)))) (cbrt (* t_1 (* t_1 t_1)))))
(if (<= x1 1.35e+154)
(+
x1
(+
t_1
(+
x1
(+
(+
(*
t_0
(+
(* (* (* x1 2.0) t_3) (- t_3 3.0))
(* (* x1 x1) (- (* 4.0 t_3) 6.0))))
(* 3.0 t_2))
(* x1 (* x1 x1))))))
(+
x1
(+
(* x1 (- (* 4.0 (* x2 (- (* x2 2.0) 3.0))) 2.0))
(+ (* x2 -6.0) (* 3.0 (* (pow x1 2.0) (- 3.0 (* x2 -2.0)))))))))))
double code(double x1, double x2) {
double t_0 = (x1 * x1) + 1.0;
double t_1 = 3.0 * ((x2 * -2.0) - x1);
double t_2 = x1 * (x1 * 3.0);
double t_3 = (((x2 * 2.0) + t_2) - x1) / t_0;
double tmp;
if (x1 <= -5.6e+102) {
tmp = x1 + ((x1 + (4.0 * (-3.0 * (x1 * x2)))) + cbrt((t_1 * (t_1 * t_1))));
} else if (x1 <= 1.35e+154) {
tmp = x1 + (t_1 + (x1 + (((t_0 * ((((x1 * 2.0) * t_3) * (t_3 - 3.0)) + ((x1 * x1) * ((4.0 * t_3) - 6.0)))) + (3.0 * t_2)) + (x1 * (x1 * x1)))));
} else {
tmp = x1 + ((x1 * ((4.0 * (x2 * ((x2 * 2.0) - 3.0))) - 2.0)) + ((x2 * -6.0) + (3.0 * (pow(x1, 2.0) * (3.0 - (x2 * -2.0))))));
}
return tmp;
}
public static double code(double x1, double x2) {
double t_0 = (x1 * x1) + 1.0;
double t_1 = 3.0 * ((x2 * -2.0) - x1);
double t_2 = x1 * (x1 * 3.0);
double t_3 = (((x2 * 2.0) + t_2) - x1) / t_0;
double tmp;
if (x1 <= -5.6e+102) {
tmp = x1 + ((x1 + (4.0 * (-3.0 * (x1 * x2)))) + Math.cbrt((t_1 * (t_1 * t_1))));
} else if (x1 <= 1.35e+154) {
tmp = x1 + (t_1 + (x1 + (((t_0 * ((((x1 * 2.0) * t_3) * (t_3 - 3.0)) + ((x1 * x1) * ((4.0 * t_3) - 6.0)))) + (3.0 * t_2)) + (x1 * (x1 * x1)))));
} else {
tmp = x1 + ((x1 * ((4.0 * (x2 * ((x2 * 2.0) - 3.0))) - 2.0)) + ((x2 * -6.0) + (3.0 * (Math.pow(x1, 2.0) * (3.0 - (x2 * -2.0))))));
}
return tmp;
}
function code(x1, x2) t_0 = Float64(Float64(x1 * x1) + 1.0) t_1 = Float64(3.0 * Float64(Float64(x2 * -2.0) - x1)) t_2 = Float64(x1 * Float64(x1 * 3.0)) t_3 = Float64(Float64(Float64(Float64(x2 * 2.0) + t_2) - x1) / t_0) tmp = 0.0 if (x1 <= -5.6e+102) tmp = Float64(x1 + Float64(Float64(x1 + Float64(4.0 * Float64(-3.0 * Float64(x1 * x2)))) + cbrt(Float64(t_1 * Float64(t_1 * t_1))))); elseif (x1 <= 1.35e+154) tmp = Float64(x1 + Float64(t_1 + Float64(x1 + Float64(Float64(Float64(t_0 * Float64(Float64(Float64(Float64(x1 * 2.0) * t_3) * Float64(t_3 - 3.0)) + Float64(Float64(x1 * x1) * Float64(Float64(4.0 * t_3) - 6.0)))) + Float64(3.0 * t_2)) + Float64(x1 * Float64(x1 * x1)))))); else tmp = Float64(x1 + Float64(Float64(x1 * Float64(Float64(4.0 * Float64(x2 * Float64(Float64(x2 * 2.0) - 3.0))) - 2.0)) + Float64(Float64(x2 * -6.0) + Float64(3.0 * Float64((x1 ^ 2.0) * Float64(3.0 - Float64(x2 * -2.0))))))); end return tmp end
code[x1_, x2_] := Block[{t$95$0 = N[(N[(x1 * x1), $MachinePrecision] + 1.0), $MachinePrecision]}, Block[{t$95$1 = N[(3.0 * N[(N[(x2 * -2.0), $MachinePrecision] - x1), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x1 * N[(x1 * 3.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[(N[(N[(x2 * 2.0), $MachinePrecision] + t$95$2), $MachinePrecision] - x1), $MachinePrecision] / t$95$0), $MachinePrecision]}, If[LessEqual[x1, -5.6e+102], N[(x1 + N[(N[(x1 + N[(4.0 * N[(-3.0 * N[(x1 * x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[Power[N[(t$95$1 * N[(t$95$1 * t$95$1), $MachinePrecision]), $MachinePrecision], 1/3], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 1.35e+154], N[(x1 + N[(t$95$1 + N[(x1 + N[(N[(N[(t$95$0 * 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[(4.0 * t$95$3), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(3.0 * t$95$2), $MachinePrecision]), $MachinePrecision] + N[(x1 * N[(x1 * x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x1 + N[(N[(x1 * N[(N[(4.0 * N[(x2 * N[(N[(x2 * 2.0), $MachinePrecision] - 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - 2.0), $MachinePrecision]), $MachinePrecision] + N[(N[(x2 * -6.0), $MachinePrecision] + N[(3.0 * N[(N[Power[x1, 2.0], $MachinePrecision] * N[(3.0 - N[(x2 * -2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x1 \cdot x1 + 1\\
t_1 := 3 \cdot \left(x2 \cdot -2 - x1\right)\\
t_2 := x1 \cdot \left(x1 \cdot 3\right)\\
t_3 := \frac{\left(x2 \cdot 2 + t_2\right) - x1}{t_0}\\
\mathbf{if}\;x1 \leq -5.6 \cdot 10^{+102}:\\
\;\;\;\;x1 + \left(\left(x1 + 4 \cdot \left(-3 \cdot \left(x1 \cdot x2\right)\right)\right) + \sqrt[3]{t_1 \cdot \left(t_1 \cdot t_1\right)}\right)\\
\mathbf{elif}\;x1 \leq 1.35 \cdot 10^{+154}:\\
\;\;\;\;x1 + \left(t_1 + \left(x1 + \left(\left(t_0 \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(4 \cdot t_3 - 6\right)\right) + 3 \cdot t_2\right) + x1 \cdot \left(x1 \cdot x1\right)\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x1 + \left(x1 \cdot \left(4 \cdot \left(x2 \cdot \left(x2 \cdot 2 - 3\right)\right) - 2\right) + \left(x2 \cdot -6 + 3 \cdot \left({x1}^{2} \cdot \left(3 - x2 \cdot -2\right)\right)\right)\right)\\
\end{array}
\end{array}
if x1 < -5.60000000000000037e102Initial program 0.0%
Taylor expanded in x1 around 0 0.1%
Taylor expanded in x2 around 0 3.1%
Taylor expanded in x1 around 0 25.2%
+-commutative25.2%
neg-mul-125.2%
unsub-neg25.2%
*-commutative25.2%
Simplified25.2%
add-cbrt-cube89.7%
Applied egg-rr89.7%
if -5.60000000000000037e102 < x1 < 1.35000000000000003e154Initial program 99.3%
Taylor expanded in x1 around inf 98.4%
Taylor expanded in x1 around 0 99.3%
+-commutative53.5%
neg-mul-153.5%
unsub-neg53.5%
*-commutative53.5%
Simplified99.3%
if 1.35000000000000003e154 < x1 Initial program 0.0%
Taylor expanded in x1 around 0 0.0%
Taylor expanded in x1 around 0 85.7%
Final simplification96.4%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (* x1 (* x1 3.0)))
(t_1 (+ (* x1 x1) 1.0))
(t_2 (/ (- (+ (* x2 2.0) t_0) x1) t_1)))
(if (<= x1 -1.32e+154)
(+
x1
(+
(+ x1 (* 4.0 (* -3.0 (* x1 x2))))
(* 3.0 (- (fma (* x1 x1) (+ 3.0 (* x2 2.0)) (* x2 -2.0)) x1))))
(if (<= x1 -5.5e+102)
(+
x1
(+
(+ x1 (* 6.0 (pow x1 4.0)))
(* 3.0 (/ (- (- t_0 (* x2 2.0)) x1) t_1))))
(if (<= x1 1.35e+154)
(+
x1
(+
(* 3.0 (- (* x2 -2.0) x1))
(+
x1
(+
(+
(*
t_1
(+
(* (* (* x1 2.0) t_2) (- t_2 3.0))
(* (* x1 x1) (- (* 4.0 t_2) 6.0))))
(* 3.0 t_0))
(* x1 (* x1 x1))))))
(+
x1
(+
(* x1 (- (* 4.0 (* x2 (- (* x2 2.0) 3.0))) 2.0))
(+ (* x2 -6.0) (* 3.0 (* (pow x1 2.0) (- 3.0 (* x2 -2.0))))))))))))
double code(double x1, double x2) {
double t_0 = x1 * (x1 * 3.0);
double t_1 = (x1 * x1) + 1.0;
double t_2 = (((x2 * 2.0) + t_0) - x1) / t_1;
double tmp;
if (x1 <= -1.32e+154) {
tmp = x1 + ((x1 + (4.0 * (-3.0 * (x1 * x2)))) + (3.0 * (fma((x1 * x1), (3.0 + (x2 * 2.0)), (x2 * -2.0)) - x1)));
} else if (x1 <= -5.5e+102) {
tmp = x1 + ((x1 + (6.0 * pow(x1, 4.0))) + (3.0 * (((t_0 - (x2 * 2.0)) - x1) / t_1)));
} else if (x1 <= 1.35e+154) {
tmp = x1 + ((3.0 * ((x2 * -2.0) - x1)) + (x1 + (((t_1 * ((((x1 * 2.0) * t_2) * (t_2 - 3.0)) + ((x1 * x1) * ((4.0 * t_2) - 6.0)))) + (3.0 * t_0)) + (x1 * (x1 * x1)))));
} else {
tmp = x1 + ((x1 * ((4.0 * (x2 * ((x2 * 2.0) - 3.0))) - 2.0)) + ((x2 * -6.0) + (3.0 * (pow(x1, 2.0) * (3.0 - (x2 * -2.0))))));
}
return tmp;
}
function code(x1, x2) t_0 = Float64(x1 * Float64(x1 * 3.0)) t_1 = Float64(Float64(x1 * x1) + 1.0) t_2 = Float64(Float64(Float64(Float64(x2 * 2.0) + t_0) - x1) / t_1) tmp = 0.0 if (x1 <= -1.32e+154) tmp = Float64(x1 + Float64(Float64(x1 + Float64(4.0 * Float64(-3.0 * Float64(x1 * x2)))) + Float64(3.0 * Float64(fma(Float64(x1 * x1), Float64(3.0 + Float64(x2 * 2.0)), Float64(x2 * -2.0)) - x1)))); elseif (x1 <= -5.5e+102) tmp = Float64(x1 + Float64(Float64(x1 + Float64(6.0 * (x1 ^ 4.0))) + Float64(3.0 * Float64(Float64(Float64(t_0 - Float64(x2 * 2.0)) - x1) / t_1)))); elseif (x1 <= 1.35e+154) tmp = Float64(x1 + Float64(Float64(3.0 * Float64(Float64(x2 * -2.0) - x1)) + Float64(x1 + Float64(Float64(Float64(t_1 * Float64(Float64(Float64(Float64(x1 * 2.0) * t_2) * Float64(t_2 - 3.0)) + Float64(Float64(x1 * x1) * Float64(Float64(4.0 * t_2) - 6.0)))) + Float64(3.0 * t_0)) + Float64(x1 * Float64(x1 * x1)))))); else tmp = Float64(x1 + Float64(Float64(x1 * Float64(Float64(4.0 * Float64(x2 * Float64(Float64(x2 * 2.0) - 3.0))) - 2.0)) + Float64(Float64(x2 * -6.0) + Float64(3.0 * Float64((x1 ^ 2.0) * Float64(3.0 - Float64(x2 * -2.0))))))); end return tmp end
code[x1_, x2_] := Block[{t$95$0 = N[(x1 * N[(x1 * 3.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(N[(x1 * x1), $MachinePrecision] + 1.0), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[(N[(x2 * 2.0), $MachinePrecision] + t$95$0), $MachinePrecision] - x1), $MachinePrecision] / t$95$1), $MachinePrecision]}, If[LessEqual[x1, -1.32e+154], N[(x1 + N[(N[(x1 + N[(4.0 * N[(-3.0 * N[(x1 * x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(3.0 * N[(N[(N[(x1 * x1), $MachinePrecision] * N[(3.0 + N[(x2 * 2.0), $MachinePrecision]), $MachinePrecision] + N[(x2 * -2.0), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, -5.5e+102], N[(x1 + N[(N[(x1 + N[(6.0 * N[Power[x1, 4.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(3.0 * N[(N[(N[(t$95$0 - N[(x2 * 2.0), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 1.35e+154], N[(x1 + N[(N[(3.0 * N[(N[(x2 * -2.0), $MachinePrecision] - x1), $MachinePrecision]), $MachinePrecision] + N[(x1 + N[(N[(N[(t$95$1 * N[(N[(N[(N[(x1 * 2.0), $MachinePrecision] * t$95$2), $MachinePrecision] * N[(t$95$2 - 3.0), $MachinePrecision]), $MachinePrecision] + N[(N[(x1 * x1), $MachinePrecision] * N[(N[(4.0 * t$95$2), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(3.0 * t$95$0), $MachinePrecision]), $MachinePrecision] + N[(x1 * N[(x1 * x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x1 + N[(N[(x1 * N[(N[(4.0 * N[(x2 * N[(N[(x2 * 2.0), $MachinePrecision] - 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - 2.0), $MachinePrecision]), $MachinePrecision] + N[(N[(x2 * -6.0), $MachinePrecision] + N[(3.0 * N[(N[Power[x1, 2.0], $MachinePrecision] * N[(3.0 - N[(x2 * -2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x1 \cdot \left(x1 \cdot 3\right)\\
t_1 := x1 \cdot x1 + 1\\
t_2 := \frac{\left(x2 \cdot 2 + t_0\right) - x1}{t_1}\\
\mathbf{if}\;x1 \leq -1.32 \cdot 10^{+154}:\\
\;\;\;\;x1 + \left(\left(x1 + 4 \cdot \left(-3 \cdot \left(x1 \cdot x2\right)\right)\right) + 3 \cdot \left(\mathsf{fma}\left(x1 \cdot x1, 3 + x2 \cdot 2, x2 \cdot -2\right) - x1\right)\right)\\
\mathbf{elif}\;x1 \leq -5.5 \cdot 10^{+102}:\\
\;\;\;\;x1 + \left(\left(x1 + 6 \cdot {x1}^{4}\right) + 3 \cdot \frac{\left(t_0 - x2 \cdot 2\right) - x1}{t_1}\right)\\
\mathbf{elif}\;x1 \leq 1.35 \cdot 10^{+154}:\\
\;\;\;\;x1 + \left(3 \cdot \left(x2 \cdot -2 - x1\right) + \left(x1 + \left(\left(t_1 \cdot \left(\left(\left(x1 \cdot 2\right) \cdot t_2\right) \cdot \left(t_2 - 3\right) + \left(x1 \cdot x1\right) \cdot \left(4 \cdot t_2 - 6\right)\right) + 3 \cdot t_0\right) + x1 \cdot \left(x1 \cdot x1\right)\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x1 + \left(x1 \cdot \left(4 \cdot \left(x2 \cdot \left(x2 \cdot 2 - 3\right)\right) - 2\right) + \left(x2 \cdot -6 + 3 \cdot \left({x1}^{2} \cdot \left(3 - x2 \cdot -2\right)\right)\right)\right)\\
\end{array}
\end{array}
if x1 < -1.31999999999999998e154Initial program 0.0%
Taylor expanded in x1 around 0 0.0%
Taylor expanded in x2 around 0 0.0%
Taylor expanded in x1 around 0 87.5%
+-commutative87.5%
neg-mul-187.5%
unsub-neg87.5%
+-commutative87.5%
*-commutative87.5%
fma-def87.5%
unpow287.5%
cancel-sign-sub-inv87.5%
metadata-eval87.5%
*-commutative87.5%
Simplified87.5%
if -1.31999999999999998e154 < x1 < -5.49999999999999981e102Initial program 0.0%
Taylor expanded in x1 around inf 100.0%
*-commutative100.0%
Simplified100.0%
if -5.49999999999999981e102 < x1 < 1.35000000000000003e154Initial program 99.3%
Taylor expanded in x1 around inf 98.4%
Taylor expanded in x1 around 0 99.3%
+-commutative53.5%
neg-mul-153.5%
unsub-neg53.5%
*-commutative53.5%
Simplified99.3%
if 1.35000000000000003e154 < x1 Initial program 0.0%
Taylor expanded in x1 around 0 0.0%
Taylor expanded in x1 around 0 85.7%
Final simplification96.8%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (* x1 (* x1 3.0)))
(t_1 (+ (* x1 x1) 1.0))
(t_2 (/ (- (+ (* x2 2.0) t_0) x1) t_1)))
(if (<= x1 -1.32e+154)
(+
x1
(+
(+ x1 (* 4.0 (* -3.0 (* x1 x2))))
(* 3.0 (- (fma (* x1 x1) (+ 3.0 (* x2 2.0)) (* x2 -2.0)) x1))))
(if (<= x1 -1e+105)
(+
x1
(+
(+ x1 (* 6.0 (pow x1 4.0)))
(* 3.0 (/ (- (- t_0 (* x2 2.0)) x1) t_1))))
(if (<= x1 1.8e+149)
(+
x1
(+
(* 3.0 (- (* x2 -2.0) x1))
(+
x1
(+
(+
(*
t_1
(+
(* (* (* x1 2.0) t_2) (- t_2 3.0))
(* (* x1 x1) (- (* 4.0 t_2) 6.0))))
(* 3.0 t_0))
(* x1 (* x1 x1))))))
(+
x1
(+
(+ x1 (* 4.0 (* x2 (* x1 (- (* x2 2.0) 3.0)))))
(* 3.0 (* x2 -2.0)))))))))
double code(double x1, double x2) {
double t_0 = x1 * (x1 * 3.0);
double t_1 = (x1 * x1) + 1.0;
double t_2 = (((x2 * 2.0) + t_0) - x1) / t_1;
double tmp;
if (x1 <= -1.32e+154) {
tmp = x1 + ((x1 + (4.0 * (-3.0 * (x1 * x2)))) + (3.0 * (fma((x1 * x1), (3.0 + (x2 * 2.0)), (x2 * -2.0)) - x1)));
} else if (x1 <= -1e+105) {
tmp = x1 + ((x1 + (6.0 * pow(x1, 4.0))) + (3.0 * (((t_0 - (x2 * 2.0)) - x1) / t_1)));
} else if (x1 <= 1.8e+149) {
tmp = x1 + ((3.0 * ((x2 * -2.0) - x1)) + (x1 + (((t_1 * ((((x1 * 2.0) * t_2) * (t_2 - 3.0)) + ((x1 * x1) * ((4.0 * t_2) - 6.0)))) + (3.0 * t_0)) + (x1 * (x1 * x1)))));
} else {
tmp = x1 + ((x1 + (4.0 * (x2 * (x1 * ((x2 * 2.0) - 3.0))))) + (3.0 * (x2 * -2.0)));
}
return tmp;
}
function code(x1, x2) t_0 = Float64(x1 * Float64(x1 * 3.0)) t_1 = Float64(Float64(x1 * x1) + 1.0) t_2 = Float64(Float64(Float64(Float64(x2 * 2.0) + t_0) - x1) / t_1) tmp = 0.0 if (x1 <= -1.32e+154) tmp = Float64(x1 + Float64(Float64(x1 + Float64(4.0 * Float64(-3.0 * Float64(x1 * x2)))) + Float64(3.0 * Float64(fma(Float64(x1 * x1), Float64(3.0 + Float64(x2 * 2.0)), Float64(x2 * -2.0)) - x1)))); elseif (x1 <= -1e+105) tmp = Float64(x1 + Float64(Float64(x1 + Float64(6.0 * (x1 ^ 4.0))) + Float64(3.0 * Float64(Float64(Float64(t_0 - Float64(x2 * 2.0)) - x1) / t_1)))); elseif (x1 <= 1.8e+149) tmp = Float64(x1 + Float64(Float64(3.0 * Float64(Float64(x2 * -2.0) - x1)) + Float64(x1 + Float64(Float64(Float64(t_1 * Float64(Float64(Float64(Float64(x1 * 2.0) * t_2) * Float64(t_2 - 3.0)) + Float64(Float64(x1 * x1) * Float64(Float64(4.0 * t_2) - 6.0)))) + Float64(3.0 * t_0)) + Float64(x1 * Float64(x1 * x1)))))); else tmp = Float64(x1 + Float64(Float64(x1 + Float64(4.0 * Float64(x2 * Float64(x1 * Float64(Float64(x2 * 2.0) - 3.0))))) + Float64(3.0 * Float64(x2 * -2.0)))); end return tmp end
code[x1_, x2_] := Block[{t$95$0 = N[(x1 * N[(x1 * 3.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(N[(x1 * x1), $MachinePrecision] + 1.0), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[(N[(x2 * 2.0), $MachinePrecision] + t$95$0), $MachinePrecision] - x1), $MachinePrecision] / t$95$1), $MachinePrecision]}, If[LessEqual[x1, -1.32e+154], N[(x1 + N[(N[(x1 + N[(4.0 * N[(-3.0 * N[(x1 * x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(3.0 * N[(N[(N[(x1 * x1), $MachinePrecision] * N[(3.0 + N[(x2 * 2.0), $MachinePrecision]), $MachinePrecision] + N[(x2 * -2.0), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, -1e+105], N[(x1 + N[(N[(x1 + N[(6.0 * N[Power[x1, 4.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(3.0 * N[(N[(N[(t$95$0 - N[(x2 * 2.0), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 1.8e+149], N[(x1 + N[(N[(3.0 * N[(N[(x2 * -2.0), $MachinePrecision] - x1), $MachinePrecision]), $MachinePrecision] + N[(x1 + N[(N[(N[(t$95$1 * N[(N[(N[(N[(x1 * 2.0), $MachinePrecision] * t$95$2), $MachinePrecision] * N[(t$95$2 - 3.0), $MachinePrecision]), $MachinePrecision] + N[(N[(x1 * x1), $MachinePrecision] * N[(N[(4.0 * t$95$2), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(3.0 * t$95$0), $MachinePrecision]), $MachinePrecision] + N[(x1 * N[(x1 * x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x1 + N[(N[(x1 + N[(4.0 * N[(x2 * N[(x1 * N[(N[(x2 * 2.0), $MachinePrecision] - 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(3.0 * N[(x2 * -2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x1 \cdot \left(x1 \cdot 3\right)\\
t_1 := x1 \cdot x1 + 1\\
t_2 := \frac{\left(x2 \cdot 2 + t_0\right) - x1}{t_1}\\
\mathbf{if}\;x1 \leq -1.32 \cdot 10^{+154}:\\
\;\;\;\;x1 + \left(\left(x1 + 4 \cdot \left(-3 \cdot \left(x1 \cdot x2\right)\right)\right) + 3 \cdot \left(\mathsf{fma}\left(x1 \cdot x1, 3 + x2 \cdot 2, x2 \cdot -2\right) - x1\right)\right)\\
\mathbf{elif}\;x1 \leq -1 \cdot 10^{+105}:\\
\;\;\;\;x1 + \left(\left(x1 + 6 \cdot {x1}^{4}\right) + 3 \cdot \frac{\left(t_0 - x2 \cdot 2\right) - x1}{t_1}\right)\\
\mathbf{elif}\;x1 \leq 1.8 \cdot 10^{+149}:\\
\;\;\;\;x1 + \left(3 \cdot \left(x2 \cdot -2 - x1\right) + \left(x1 + \left(\left(t_1 \cdot \left(\left(\left(x1 \cdot 2\right) \cdot t_2\right) \cdot \left(t_2 - 3\right) + \left(x1 \cdot x1\right) \cdot \left(4 \cdot t_2 - 6\right)\right) + 3 \cdot t_0\right) + x1 \cdot \left(x1 \cdot x1\right)\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x1 + \left(\left(x1 + 4 \cdot \left(x2 \cdot \left(x1 \cdot \left(x2 \cdot 2 - 3\right)\right)\right)\right) + 3 \cdot \left(x2 \cdot -2\right)\right)\\
\end{array}
\end{array}
if x1 < -1.31999999999999998e154Initial program 0.0%
Taylor expanded in x1 around 0 0.0%
Taylor expanded in x2 around 0 0.0%
Taylor expanded in x1 around 0 87.5%
+-commutative87.5%
neg-mul-187.5%
unsub-neg87.5%
+-commutative87.5%
*-commutative87.5%
fma-def87.5%
unpow287.5%
cancel-sign-sub-inv87.5%
metadata-eval87.5%
*-commutative87.5%
Simplified87.5%
if -1.31999999999999998e154 < x1 < -9.9999999999999994e104Initial program 0.0%
Taylor expanded in x1 around inf 100.0%
*-commutative100.0%
Simplified100.0%
if -9.9999999999999994e104 < x1 < 1.79999999999999997e149Initial program 99.3%
Taylor expanded in x1 around inf 98.3%
Taylor expanded in x1 around 0 99.3%
+-commutative53.0%
neg-mul-153.0%
unsub-neg53.0%
*-commutative53.0%
Simplified99.3%
if 1.79999999999999997e149 < x1 Initial program 6.7%
Taylor expanded in x1 around 0 6.7%
Taylor expanded in x1 around 0 68.8%
*-commutative68.8%
Simplified68.8%
Final simplification94.7%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (+ (* x1 x1) 1.0))
(t_1 (* x1 (* x1 3.0)))
(t_2 (/ (- (+ (* x2 2.0) t_1) x1) t_0)))
(if (<= x1 -5.6e+102)
(+
x1
(+
(+ x1 (* 4.0 (* -3.0 (* x1 x2))))
(* 3.0 (- (fma (* x1 x1) (+ 3.0 (* x2 2.0)) (* x2 -2.0)) x1))))
(if (<= x1 1.8e+149)
(+
x1
(+
(* 3.0 (- (* x2 -2.0) x1))
(+
x1
(+
(+
(*
t_0
(+
(* (* (* x1 2.0) t_2) (- t_2 3.0))
(* (* x1 x1) (- (* 4.0 t_2) 6.0))))
(* 3.0 t_1))
(* x1 (* x1 x1))))))
(+
x1
(+
(+ x1 (* 4.0 (* x2 (* x1 (- (* x2 2.0) 3.0)))))
(* 3.0 (* x2 -2.0))))))))
double code(double x1, double x2) {
double t_0 = (x1 * x1) + 1.0;
double t_1 = x1 * (x1 * 3.0);
double t_2 = (((x2 * 2.0) + t_1) - x1) / t_0;
double tmp;
if (x1 <= -5.6e+102) {
tmp = x1 + ((x1 + (4.0 * (-3.0 * (x1 * x2)))) + (3.0 * (fma((x1 * x1), (3.0 + (x2 * 2.0)), (x2 * -2.0)) - x1)));
} else if (x1 <= 1.8e+149) {
tmp = x1 + ((3.0 * ((x2 * -2.0) - x1)) + (x1 + (((t_0 * ((((x1 * 2.0) * t_2) * (t_2 - 3.0)) + ((x1 * x1) * ((4.0 * t_2) - 6.0)))) + (3.0 * t_1)) + (x1 * (x1 * x1)))));
} else {
tmp = x1 + ((x1 + (4.0 * (x2 * (x1 * ((x2 * 2.0) - 3.0))))) + (3.0 * (x2 * -2.0)));
}
return tmp;
}
function code(x1, x2) t_0 = Float64(Float64(x1 * x1) + 1.0) t_1 = Float64(x1 * Float64(x1 * 3.0)) t_2 = Float64(Float64(Float64(Float64(x2 * 2.0) + t_1) - x1) / t_0) tmp = 0.0 if (x1 <= -5.6e+102) tmp = Float64(x1 + Float64(Float64(x1 + Float64(4.0 * Float64(-3.0 * Float64(x1 * x2)))) + Float64(3.0 * Float64(fma(Float64(x1 * x1), Float64(3.0 + Float64(x2 * 2.0)), Float64(x2 * -2.0)) - x1)))); elseif (x1 <= 1.8e+149) tmp = Float64(x1 + Float64(Float64(3.0 * Float64(Float64(x2 * -2.0) - x1)) + Float64(x1 + Float64(Float64(Float64(t_0 * Float64(Float64(Float64(Float64(x1 * 2.0) * t_2) * Float64(t_2 - 3.0)) + Float64(Float64(x1 * x1) * Float64(Float64(4.0 * t_2) - 6.0)))) + Float64(3.0 * t_1)) + Float64(x1 * Float64(x1 * x1)))))); else tmp = Float64(x1 + Float64(Float64(x1 + Float64(4.0 * Float64(x2 * Float64(x1 * Float64(Float64(x2 * 2.0) - 3.0))))) + Float64(3.0 * Float64(x2 * -2.0)))); end return tmp end
code[x1_, x2_] := Block[{t$95$0 = N[(N[(x1 * x1), $MachinePrecision] + 1.0), $MachinePrecision]}, Block[{t$95$1 = N[(x1 * N[(x1 * 3.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[(N[(x2 * 2.0), $MachinePrecision] + t$95$1), $MachinePrecision] - x1), $MachinePrecision] / t$95$0), $MachinePrecision]}, If[LessEqual[x1, -5.6e+102], N[(x1 + N[(N[(x1 + N[(4.0 * N[(-3.0 * N[(x1 * x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(3.0 * N[(N[(N[(x1 * x1), $MachinePrecision] * N[(3.0 + N[(x2 * 2.0), $MachinePrecision]), $MachinePrecision] + N[(x2 * -2.0), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 1.8e+149], N[(x1 + N[(N[(3.0 * N[(N[(x2 * -2.0), $MachinePrecision] - x1), $MachinePrecision]), $MachinePrecision] + N[(x1 + N[(N[(N[(t$95$0 * N[(N[(N[(N[(x1 * 2.0), $MachinePrecision] * t$95$2), $MachinePrecision] * N[(t$95$2 - 3.0), $MachinePrecision]), $MachinePrecision] + N[(N[(x1 * x1), $MachinePrecision] * N[(N[(4.0 * t$95$2), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(3.0 * t$95$1), $MachinePrecision]), $MachinePrecision] + N[(x1 * N[(x1 * x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x1 + N[(N[(x1 + N[(4.0 * N[(x2 * N[(x1 * N[(N[(x2 * 2.0), $MachinePrecision] - 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(3.0 * N[(x2 * -2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x1 \cdot x1 + 1\\
t_1 := x1 \cdot \left(x1 \cdot 3\right)\\
t_2 := \frac{\left(x2 \cdot 2 + t_1\right) - x1}{t_0}\\
\mathbf{if}\;x1 \leq -5.6 \cdot 10^{+102}:\\
\;\;\;\;x1 + \left(\left(x1 + 4 \cdot \left(-3 \cdot \left(x1 \cdot x2\right)\right)\right) + 3 \cdot \left(\mathsf{fma}\left(x1 \cdot x1, 3 + x2 \cdot 2, x2 \cdot -2\right) - x1\right)\right)\\
\mathbf{elif}\;x1 \leq 1.8 \cdot 10^{+149}:\\
\;\;\;\;x1 + \left(3 \cdot \left(x2 \cdot -2 - x1\right) + \left(x1 + \left(\left(t_0 \cdot \left(\left(\left(x1 \cdot 2\right) \cdot t_2\right) \cdot \left(t_2 - 3\right) + \left(x1 \cdot x1\right) \cdot \left(4 \cdot t_2 - 6\right)\right) + 3 \cdot t_1\right) + x1 \cdot \left(x1 \cdot x1\right)\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x1 + \left(\left(x1 + 4 \cdot \left(x2 \cdot \left(x1 \cdot \left(x2 \cdot 2 - 3\right)\right)\right)\right) + 3 \cdot \left(x2 \cdot -2\right)\right)\\
\end{array}
\end{array}
if x1 < -5.60000000000000037e102Initial program 0.0%
Taylor expanded in x1 around 0 0.1%
Taylor expanded in x2 around 0 3.1%
Taylor expanded in x1 around 0 64.5%
+-commutative64.5%
neg-mul-164.5%
unsub-neg64.5%
+-commutative64.5%
*-commutative64.5%
fma-def64.5%
unpow264.5%
cancel-sign-sub-inv64.5%
metadata-eval64.5%
*-commutative64.5%
Simplified64.5%
if -5.60000000000000037e102 < x1 < 1.79999999999999997e149Initial program 99.3%
Taylor expanded in x1 around inf 98.3%
Taylor expanded in x1 around 0 99.3%
+-commutative53.0%
neg-mul-153.0%
unsub-neg53.0%
*-commutative53.0%
Simplified99.3%
if 1.79999999999999997e149 < x1 Initial program 6.7%
Taylor expanded in x1 around 0 6.7%
Taylor expanded in x1 around 0 68.8%
*-commutative68.8%
Simplified68.8%
Final simplification90.4%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (+ (* x1 x1) 1.0))
(t_1 (* x1 (* x1 3.0)))
(t_2 (/ (- (+ (* x2 2.0) t_1) x1) t_0)))
(if (<= x1 -5.6e+102)
(+
x1
(+
(* x2 -6.0)
(+
(* 3.0 (* (pow x1 2.0) (- 3.0 (* x2 -2.0))))
(* x1 (- (* x2 -12.0) 2.0)))))
(if (<= x1 1.8e+149)
(+
x1
(+
(* 3.0 (- (* x2 -2.0) x1))
(+
x1
(+
(+
(*
t_0
(+
(* (* (* x1 2.0) t_2) (- t_2 3.0))
(* (* x1 x1) (- (* 4.0 t_2) 6.0))))
(* 3.0 t_1))
(* x1 (* x1 x1))))))
(+
x1
(+
(+ x1 (* 4.0 (* x2 (* x1 (- (* x2 2.0) 3.0)))))
(* 3.0 (* x2 -2.0))))))))
double code(double x1, double x2) {
double t_0 = (x1 * x1) + 1.0;
double t_1 = x1 * (x1 * 3.0);
double t_2 = (((x2 * 2.0) + t_1) - x1) / t_0;
double tmp;
if (x1 <= -5.6e+102) {
tmp = x1 + ((x2 * -6.0) + ((3.0 * (pow(x1, 2.0) * (3.0 - (x2 * -2.0)))) + (x1 * ((x2 * -12.0) - 2.0))));
} else if (x1 <= 1.8e+149) {
tmp = x1 + ((3.0 * ((x2 * -2.0) - x1)) + (x1 + (((t_0 * ((((x1 * 2.0) * t_2) * (t_2 - 3.0)) + ((x1 * x1) * ((4.0 * t_2) - 6.0)))) + (3.0 * t_1)) + (x1 * (x1 * x1)))));
} else {
tmp = x1 + ((x1 + (4.0 * (x2 * (x1 * ((x2 * 2.0) - 3.0))))) + (3.0 * (x2 * -2.0)));
}
return tmp;
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
real(8) :: t_0
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_0 = (x1 * x1) + 1.0d0
t_1 = x1 * (x1 * 3.0d0)
t_2 = (((x2 * 2.0d0) + t_1) - x1) / t_0
if (x1 <= (-5.6d+102)) then
tmp = x1 + ((x2 * (-6.0d0)) + ((3.0d0 * ((x1 ** 2.0d0) * (3.0d0 - (x2 * (-2.0d0))))) + (x1 * ((x2 * (-12.0d0)) - 2.0d0))))
else if (x1 <= 1.8d+149) then
tmp = x1 + ((3.0d0 * ((x2 * (-2.0d0)) - x1)) + (x1 + (((t_0 * ((((x1 * 2.0d0) * t_2) * (t_2 - 3.0d0)) + ((x1 * x1) * ((4.0d0 * t_2) - 6.0d0)))) + (3.0d0 * t_1)) + (x1 * (x1 * x1)))))
else
tmp = x1 + ((x1 + (4.0d0 * (x2 * (x1 * ((x2 * 2.0d0) - 3.0d0))))) + (3.0d0 * (x2 * (-2.0d0))))
end if
code = tmp
end function
public static double code(double x1, double x2) {
double t_0 = (x1 * x1) + 1.0;
double t_1 = x1 * (x1 * 3.0);
double t_2 = (((x2 * 2.0) + t_1) - x1) / t_0;
double tmp;
if (x1 <= -5.6e+102) {
tmp = x1 + ((x2 * -6.0) + ((3.0 * (Math.pow(x1, 2.0) * (3.0 - (x2 * -2.0)))) + (x1 * ((x2 * -12.0) - 2.0))));
} else if (x1 <= 1.8e+149) {
tmp = x1 + ((3.0 * ((x2 * -2.0) - x1)) + (x1 + (((t_0 * ((((x1 * 2.0) * t_2) * (t_2 - 3.0)) + ((x1 * x1) * ((4.0 * t_2) - 6.0)))) + (3.0 * t_1)) + (x1 * (x1 * x1)))));
} else {
tmp = x1 + ((x1 + (4.0 * (x2 * (x1 * ((x2 * 2.0) - 3.0))))) + (3.0 * (x2 * -2.0)));
}
return tmp;
}
def code(x1, x2): t_0 = (x1 * x1) + 1.0 t_1 = x1 * (x1 * 3.0) t_2 = (((x2 * 2.0) + t_1) - x1) / t_0 tmp = 0 if x1 <= -5.6e+102: tmp = x1 + ((x2 * -6.0) + ((3.0 * (math.pow(x1, 2.0) * (3.0 - (x2 * -2.0)))) + (x1 * ((x2 * -12.0) - 2.0)))) elif x1 <= 1.8e+149: tmp = x1 + ((3.0 * ((x2 * -2.0) - x1)) + (x1 + (((t_0 * ((((x1 * 2.0) * t_2) * (t_2 - 3.0)) + ((x1 * x1) * ((4.0 * t_2) - 6.0)))) + (3.0 * t_1)) + (x1 * (x1 * x1))))) else: tmp = x1 + ((x1 + (4.0 * (x2 * (x1 * ((x2 * 2.0) - 3.0))))) + (3.0 * (x2 * -2.0))) return tmp
function code(x1, x2) t_0 = Float64(Float64(x1 * x1) + 1.0) t_1 = Float64(x1 * Float64(x1 * 3.0)) t_2 = Float64(Float64(Float64(Float64(x2 * 2.0) + t_1) - x1) / t_0) tmp = 0.0 if (x1 <= -5.6e+102) tmp = Float64(x1 + Float64(Float64(x2 * -6.0) + Float64(Float64(3.0 * Float64((x1 ^ 2.0) * Float64(3.0 - Float64(x2 * -2.0)))) + Float64(x1 * Float64(Float64(x2 * -12.0) - 2.0))))); elseif (x1 <= 1.8e+149) tmp = Float64(x1 + Float64(Float64(3.0 * Float64(Float64(x2 * -2.0) - x1)) + Float64(x1 + Float64(Float64(Float64(t_0 * Float64(Float64(Float64(Float64(x1 * 2.0) * t_2) * Float64(t_2 - 3.0)) + Float64(Float64(x1 * x1) * Float64(Float64(4.0 * t_2) - 6.0)))) + Float64(3.0 * t_1)) + Float64(x1 * Float64(x1 * x1)))))); else tmp = Float64(x1 + Float64(Float64(x1 + Float64(4.0 * Float64(x2 * Float64(x1 * Float64(Float64(x2 * 2.0) - 3.0))))) + Float64(3.0 * Float64(x2 * -2.0)))); end return tmp end
function tmp_2 = code(x1, x2) t_0 = (x1 * x1) + 1.0; t_1 = x1 * (x1 * 3.0); t_2 = (((x2 * 2.0) + t_1) - x1) / t_0; tmp = 0.0; if (x1 <= -5.6e+102) tmp = x1 + ((x2 * -6.0) + ((3.0 * ((x1 ^ 2.0) * (3.0 - (x2 * -2.0)))) + (x1 * ((x2 * -12.0) - 2.0)))); elseif (x1 <= 1.8e+149) tmp = x1 + ((3.0 * ((x2 * -2.0) - x1)) + (x1 + (((t_0 * ((((x1 * 2.0) * t_2) * (t_2 - 3.0)) + ((x1 * x1) * ((4.0 * t_2) - 6.0)))) + (3.0 * t_1)) + (x1 * (x1 * x1))))); else tmp = x1 + ((x1 + (4.0 * (x2 * (x1 * ((x2 * 2.0) - 3.0))))) + (3.0 * (x2 * -2.0))); end tmp_2 = tmp; end
code[x1_, x2_] := Block[{t$95$0 = N[(N[(x1 * x1), $MachinePrecision] + 1.0), $MachinePrecision]}, Block[{t$95$1 = N[(x1 * N[(x1 * 3.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[(N[(x2 * 2.0), $MachinePrecision] + t$95$1), $MachinePrecision] - x1), $MachinePrecision] / t$95$0), $MachinePrecision]}, If[LessEqual[x1, -5.6e+102], N[(x1 + N[(N[(x2 * -6.0), $MachinePrecision] + N[(N[(3.0 * N[(N[Power[x1, 2.0], $MachinePrecision] * N[(3.0 - N[(x2 * -2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(x1 * N[(N[(x2 * -12.0), $MachinePrecision] - 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 1.8e+149], N[(x1 + N[(N[(3.0 * N[(N[(x2 * -2.0), $MachinePrecision] - x1), $MachinePrecision]), $MachinePrecision] + N[(x1 + N[(N[(N[(t$95$0 * N[(N[(N[(N[(x1 * 2.0), $MachinePrecision] * t$95$2), $MachinePrecision] * N[(t$95$2 - 3.0), $MachinePrecision]), $MachinePrecision] + N[(N[(x1 * x1), $MachinePrecision] * N[(N[(4.0 * t$95$2), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(3.0 * t$95$1), $MachinePrecision]), $MachinePrecision] + N[(x1 * N[(x1 * x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x1 + N[(N[(x1 + N[(4.0 * N[(x2 * N[(x1 * N[(N[(x2 * 2.0), $MachinePrecision] - 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(3.0 * N[(x2 * -2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x1 \cdot x1 + 1\\
t_1 := x1 \cdot \left(x1 \cdot 3\right)\\
t_2 := \frac{\left(x2 \cdot 2 + t_1\right) - x1}{t_0}\\
\mathbf{if}\;x1 \leq -5.6 \cdot 10^{+102}:\\
\;\;\;\;x1 + \left(x2 \cdot -6 + \left(3 \cdot \left({x1}^{2} \cdot \left(3 - x2 \cdot -2\right)\right) + x1 \cdot \left(x2 \cdot -12 - 2\right)\right)\right)\\
\mathbf{elif}\;x1 \leq 1.8 \cdot 10^{+149}:\\
\;\;\;\;x1 + \left(3 \cdot \left(x2 \cdot -2 - x1\right) + \left(x1 + \left(\left(t_0 \cdot \left(\left(\left(x1 \cdot 2\right) \cdot t_2\right) \cdot \left(t_2 - 3\right) + \left(x1 \cdot x1\right) \cdot \left(4 \cdot t_2 - 6\right)\right) + 3 \cdot t_1\right) + x1 \cdot \left(x1 \cdot x1\right)\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x1 + \left(\left(x1 + 4 \cdot \left(x2 \cdot \left(x1 \cdot \left(x2 \cdot 2 - 3\right)\right)\right)\right) + 3 \cdot \left(x2 \cdot -2\right)\right)\\
\end{array}
\end{array}
if x1 < -5.60000000000000037e102Initial program 0.0%
Taylor expanded in x1 around 0 0.1%
Taylor expanded in x2 around 0 3.1%
Taylor expanded in x1 around 0 64.5%
if -5.60000000000000037e102 < x1 < 1.79999999999999997e149Initial program 99.3%
Taylor expanded in x1 around inf 98.3%
Taylor expanded in x1 around 0 99.3%
+-commutative53.0%
neg-mul-153.0%
unsub-neg53.0%
*-commutative53.0%
Simplified99.3%
if 1.79999999999999997e149 < x1 Initial program 6.7%
Taylor expanded in x1 around 0 6.7%
Taylor expanded in x1 around 0 68.8%
*-commutative68.8%
Simplified68.8%
Final simplification90.4%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (* x1 (* x1 3.0)))
(t_1 (+ (* x1 x1) 1.0))
(t_2 (/ (- (+ (* x2 2.0) t_0) x1) t_1)))
(if (<= x1 -5.6e+102)
(* x1 (+ (* x2 -12.0) -1.0))
(if (<= x1 1.8e+149)
(+
x1
(+
(* 3.0 (- (* x2 -2.0) x1))
(+
x1
(+
(+
(*
t_1
(+
(* (* (* x1 2.0) t_2) (- t_2 3.0))
(* (* x1 x1) (- (* 4.0 t_2) 6.0))))
(* 3.0 t_0))
(* x1 (* x1 x1))))))
(+
x1
(+
(+ x1 (* 4.0 (* x2 (* x1 (- (* x2 2.0) 3.0)))))
(* 3.0 (* x2 -2.0))))))))
double code(double x1, double x2) {
double t_0 = x1 * (x1 * 3.0);
double t_1 = (x1 * x1) + 1.0;
double t_2 = (((x2 * 2.0) + t_0) - x1) / t_1;
double tmp;
if (x1 <= -5.6e+102) {
tmp = x1 * ((x2 * -12.0) + -1.0);
} else if (x1 <= 1.8e+149) {
tmp = x1 + ((3.0 * ((x2 * -2.0) - x1)) + (x1 + (((t_1 * ((((x1 * 2.0) * t_2) * (t_2 - 3.0)) + ((x1 * x1) * ((4.0 * t_2) - 6.0)))) + (3.0 * t_0)) + (x1 * (x1 * x1)))));
} else {
tmp = x1 + ((x1 + (4.0 * (x2 * (x1 * ((x2 * 2.0) - 3.0))))) + (3.0 * (x2 * -2.0)));
}
return tmp;
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
real(8) :: t_0
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_0 = x1 * (x1 * 3.0d0)
t_1 = (x1 * x1) + 1.0d0
t_2 = (((x2 * 2.0d0) + t_0) - x1) / t_1
if (x1 <= (-5.6d+102)) then
tmp = x1 * ((x2 * (-12.0d0)) + (-1.0d0))
else if (x1 <= 1.8d+149) then
tmp = x1 + ((3.0d0 * ((x2 * (-2.0d0)) - x1)) + (x1 + (((t_1 * ((((x1 * 2.0d0) * t_2) * (t_2 - 3.0d0)) + ((x1 * x1) * ((4.0d0 * t_2) - 6.0d0)))) + (3.0d0 * t_0)) + (x1 * (x1 * x1)))))
else
tmp = x1 + ((x1 + (4.0d0 * (x2 * (x1 * ((x2 * 2.0d0) - 3.0d0))))) + (3.0d0 * (x2 * (-2.0d0))))
end if
code = tmp
end function
public static double code(double x1, double x2) {
double t_0 = x1 * (x1 * 3.0);
double t_1 = (x1 * x1) + 1.0;
double t_2 = (((x2 * 2.0) + t_0) - x1) / t_1;
double tmp;
if (x1 <= -5.6e+102) {
tmp = x1 * ((x2 * -12.0) + -1.0);
} else if (x1 <= 1.8e+149) {
tmp = x1 + ((3.0 * ((x2 * -2.0) - x1)) + (x1 + (((t_1 * ((((x1 * 2.0) * t_2) * (t_2 - 3.0)) + ((x1 * x1) * ((4.0 * t_2) - 6.0)))) + (3.0 * t_0)) + (x1 * (x1 * x1)))));
} else {
tmp = x1 + ((x1 + (4.0 * (x2 * (x1 * ((x2 * 2.0) - 3.0))))) + (3.0 * (x2 * -2.0)));
}
return tmp;
}
def code(x1, x2): t_0 = x1 * (x1 * 3.0) t_1 = (x1 * x1) + 1.0 t_2 = (((x2 * 2.0) + t_0) - x1) / t_1 tmp = 0 if x1 <= -5.6e+102: tmp = x1 * ((x2 * -12.0) + -1.0) elif x1 <= 1.8e+149: tmp = x1 + ((3.0 * ((x2 * -2.0) - x1)) + (x1 + (((t_1 * ((((x1 * 2.0) * t_2) * (t_2 - 3.0)) + ((x1 * x1) * ((4.0 * t_2) - 6.0)))) + (3.0 * t_0)) + (x1 * (x1 * x1))))) else: tmp = x1 + ((x1 + (4.0 * (x2 * (x1 * ((x2 * 2.0) - 3.0))))) + (3.0 * (x2 * -2.0))) return tmp
function code(x1, x2) t_0 = Float64(x1 * Float64(x1 * 3.0)) t_1 = Float64(Float64(x1 * x1) + 1.0) t_2 = Float64(Float64(Float64(Float64(x2 * 2.0) + t_0) - x1) / t_1) tmp = 0.0 if (x1 <= -5.6e+102) tmp = Float64(x1 * Float64(Float64(x2 * -12.0) + -1.0)); elseif (x1 <= 1.8e+149) tmp = Float64(x1 + Float64(Float64(3.0 * Float64(Float64(x2 * -2.0) - x1)) + Float64(x1 + Float64(Float64(Float64(t_1 * Float64(Float64(Float64(Float64(x1 * 2.0) * t_2) * Float64(t_2 - 3.0)) + Float64(Float64(x1 * x1) * Float64(Float64(4.0 * t_2) - 6.0)))) + Float64(3.0 * t_0)) + Float64(x1 * Float64(x1 * x1)))))); else tmp = Float64(x1 + Float64(Float64(x1 + Float64(4.0 * Float64(x2 * Float64(x1 * Float64(Float64(x2 * 2.0) - 3.0))))) + Float64(3.0 * Float64(x2 * -2.0)))); end return tmp end
function tmp_2 = code(x1, x2) t_0 = x1 * (x1 * 3.0); t_1 = (x1 * x1) + 1.0; t_2 = (((x2 * 2.0) + t_0) - x1) / t_1; tmp = 0.0; if (x1 <= -5.6e+102) tmp = x1 * ((x2 * -12.0) + -1.0); elseif (x1 <= 1.8e+149) tmp = x1 + ((3.0 * ((x2 * -2.0) - x1)) + (x1 + (((t_1 * ((((x1 * 2.0) * t_2) * (t_2 - 3.0)) + ((x1 * x1) * ((4.0 * t_2) - 6.0)))) + (3.0 * t_0)) + (x1 * (x1 * x1))))); else tmp = x1 + ((x1 + (4.0 * (x2 * (x1 * ((x2 * 2.0) - 3.0))))) + (3.0 * (x2 * -2.0))); end tmp_2 = tmp; end
code[x1_, x2_] := Block[{t$95$0 = N[(x1 * N[(x1 * 3.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(N[(x1 * x1), $MachinePrecision] + 1.0), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[(N[(x2 * 2.0), $MachinePrecision] + t$95$0), $MachinePrecision] - x1), $MachinePrecision] / t$95$1), $MachinePrecision]}, If[LessEqual[x1, -5.6e+102], N[(x1 * N[(N[(x2 * -12.0), $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 1.8e+149], N[(x1 + N[(N[(3.0 * N[(N[(x2 * -2.0), $MachinePrecision] - x1), $MachinePrecision]), $MachinePrecision] + N[(x1 + N[(N[(N[(t$95$1 * N[(N[(N[(N[(x1 * 2.0), $MachinePrecision] * t$95$2), $MachinePrecision] * N[(t$95$2 - 3.0), $MachinePrecision]), $MachinePrecision] + N[(N[(x1 * x1), $MachinePrecision] * N[(N[(4.0 * t$95$2), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(3.0 * t$95$0), $MachinePrecision]), $MachinePrecision] + N[(x1 * N[(x1 * x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x1 + N[(N[(x1 + N[(4.0 * N[(x2 * N[(x1 * N[(N[(x2 * 2.0), $MachinePrecision] - 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(3.0 * N[(x2 * -2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x1 \cdot \left(x1 \cdot 3\right)\\
t_1 := x1 \cdot x1 + 1\\
t_2 := \frac{\left(x2 \cdot 2 + t_0\right) - x1}{t_1}\\
\mathbf{if}\;x1 \leq -5.6 \cdot 10^{+102}:\\
\;\;\;\;x1 \cdot \left(x2 \cdot -12 + -1\right)\\
\mathbf{elif}\;x1 \leq 1.8 \cdot 10^{+149}:\\
\;\;\;\;x1 + \left(3 \cdot \left(x2 \cdot -2 - x1\right) + \left(x1 + \left(\left(t_1 \cdot \left(\left(\left(x1 \cdot 2\right) \cdot t_2\right) \cdot \left(t_2 - 3\right) + \left(x1 \cdot x1\right) \cdot \left(4 \cdot t_2 - 6\right)\right) + 3 \cdot t_0\right) + x1 \cdot \left(x1 \cdot x1\right)\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x1 + \left(\left(x1 + 4 \cdot \left(x2 \cdot \left(x1 \cdot \left(x2 \cdot 2 - 3\right)\right)\right)\right) + 3 \cdot \left(x2 \cdot -2\right)\right)\\
\end{array}
\end{array}
if x1 < -5.60000000000000037e102Initial program 0.0%
Taylor expanded in x1 around 0 0.1%
Taylor expanded in x2 around 0 3.1%
Taylor expanded in x1 around 0 25.2%
+-commutative25.2%
neg-mul-125.2%
unsub-neg25.2%
*-commutative25.2%
Simplified25.2%
Taylor expanded in x1 around inf 25.2%
if -5.60000000000000037e102 < x1 < 1.79999999999999997e149Initial program 99.3%
Taylor expanded in x1 around inf 98.3%
Taylor expanded in x1 around 0 99.3%
+-commutative53.0%
neg-mul-153.0%
unsub-neg53.0%
*-commutative53.0%
Simplified99.3%
if 1.79999999999999997e149 < x1 Initial program 6.7%
Taylor expanded in x1 around 0 6.7%
Taylor expanded in x1 around 0 68.8%
*-commutative68.8%
Simplified68.8%
Final simplification84.4%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (* x1 (* x1 3.0)))
(t_1 (+ (* x1 x1) 1.0))
(t_2 (/ (- (+ (* x2 2.0) t_0) x1) t_1)))
(if (<= x1 -5.6e+102)
(* x1 (+ (* x2 -12.0) -1.0))
(if (<= x1 1.8e+149)
(+
x1
(+
(* 3.0 (/ (- (- t_0 (* x2 2.0)) x1) t_1))
(+
x1
(+
(* x1 (* x1 x1))
(+
(* 3.0 t_0)
(*
t_1
(+ (* (* (* x1 2.0) t_2) (- t_2 3.0)) (* (* x1 x1) 6.0))))))))
(+
x1
(+
(+ x1 (* 4.0 (* x2 (* x1 (- (* x2 2.0) 3.0)))))
(* 3.0 (* x2 -2.0))))))))
double code(double x1, double x2) {
double t_0 = x1 * (x1 * 3.0);
double t_1 = (x1 * x1) + 1.0;
double t_2 = (((x2 * 2.0) + t_0) - x1) / t_1;
double tmp;
if (x1 <= -5.6e+102) {
tmp = x1 * ((x2 * -12.0) + -1.0);
} else if (x1 <= 1.8e+149) {
tmp = x1 + ((3.0 * (((t_0 - (x2 * 2.0)) - x1) / t_1)) + (x1 + ((x1 * (x1 * x1)) + ((3.0 * t_0) + (t_1 * ((((x1 * 2.0) * t_2) * (t_2 - 3.0)) + ((x1 * x1) * 6.0)))))));
} else {
tmp = x1 + ((x1 + (4.0 * (x2 * (x1 * ((x2 * 2.0) - 3.0))))) + (3.0 * (x2 * -2.0)));
}
return tmp;
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
real(8) :: t_0
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_0 = x1 * (x1 * 3.0d0)
t_1 = (x1 * x1) + 1.0d0
t_2 = (((x2 * 2.0d0) + t_0) - x1) / t_1
if (x1 <= (-5.6d+102)) then
tmp = x1 * ((x2 * (-12.0d0)) + (-1.0d0))
else if (x1 <= 1.8d+149) then
tmp = x1 + ((3.0d0 * (((t_0 - (x2 * 2.0d0)) - x1) / t_1)) + (x1 + ((x1 * (x1 * x1)) + ((3.0d0 * t_0) + (t_1 * ((((x1 * 2.0d0) * t_2) * (t_2 - 3.0d0)) + ((x1 * x1) * 6.0d0)))))))
else
tmp = x1 + ((x1 + (4.0d0 * (x2 * (x1 * ((x2 * 2.0d0) - 3.0d0))))) + (3.0d0 * (x2 * (-2.0d0))))
end if
code = tmp
end function
public static double code(double x1, double x2) {
double t_0 = x1 * (x1 * 3.0);
double t_1 = (x1 * x1) + 1.0;
double t_2 = (((x2 * 2.0) + t_0) - x1) / t_1;
double tmp;
if (x1 <= -5.6e+102) {
tmp = x1 * ((x2 * -12.0) + -1.0);
} else if (x1 <= 1.8e+149) {
tmp = x1 + ((3.0 * (((t_0 - (x2 * 2.0)) - x1) / t_1)) + (x1 + ((x1 * (x1 * x1)) + ((3.0 * t_0) + (t_1 * ((((x1 * 2.0) * t_2) * (t_2 - 3.0)) + ((x1 * x1) * 6.0)))))));
} else {
tmp = x1 + ((x1 + (4.0 * (x2 * (x1 * ((x2 * 2.0) - 3.0))))) + (3.0 * (x2 * -2.0)));
}
return tmp;
}
def code(x1, x2): t_0 = x1 * (x1 * 3.0) t_1 = (x1 * x1) + 1.0 t_2 = (((x2 * 2.0) + t_0) - x1) / t_1 tmp = 0 if x1 <= -5.6e+102: tmp = x1 * ((x2 * -12.0) + -1.0) elif x1 <= 1.8e+149: tmp = x1 + ((3.0 * (((t_0 - (x2 * 2.0)) - x1) / t_1)) + (x1 + ((x1 * (x1 * x1)) + ((3.0 * t_0) + (t_1 * ((((x1 * 2.0) * t_2) * (t_2 - 3.0)) + ((x1 * x1) * 6.0))))))) else: tmp = x1 + ((x1 + (4.0 * (x2 * (x1 * ((x2 * 2.0) - 3.0))))) + (3.0 * (x2 * -2.0))) return tmp
function code(x1, x2) t_0 = Float64(x1 * Float64(x1 * 3.0)) t_1 = Float64(Float64(x1 * x1) + 1.0) t_2 = Float64(Float64(Float64(Float64(x2 * 2.0) + t_0) - x1) / t_1) tmp = 0.0 if (x1 <= -5.6e+102) tmp = Float64(x1 * Float64(Float64(x2 * -12.0) + -1.0)); elseif (x1 <= 1.8e+149) tmp = Float64(x1 + Float64(Float64(3.0 * Float64(Float64(Float64(t_0 - Float64(x2 * 2.0)) - x1) / t_1)) + Float64(x1 + Float64(Float64(x1 * Float64(x1 * x1)) + Float64(Float64(3.0 * t_0) + Float64(t_1 * Float64(Float64(Float64(Float64(x1 * 2.0) * t_2) * Float64(t_2 - 3.0)) + Float64(Float64(x1 * x1) * 6.0)))))))); else tmp = Float64(x1 + Float64(Float64(x1 + Float64(4.0 * Float64(x2 * Float64(x1 * Float64(Float64(x2 * 2.0) - 3.0))))) + Float64(3.0 * Float64(x2 * -2.0)))); end return tmp end
function tmp_2 = code(x1, x2) t_0 = x1 * (x1 * 3.0); t_1 = (x1 * x1) + 1.0; t_2 = (((x2 * 2.0) + t_0) - x1) / t_1; tmp = 0.0; if (x1 <= -5.6e+102) tmp = x1 * ((x2 * -12.0) + -1.0); elseif (x1 <= 1.8e+149) tmp = x1 + ((3.0 * (((t_0 - (x2 * 2.0)) - x1) / t_1)) + (x1 + ((x1 * (x1 * x1)) + ((3.0 * t_0) + (t_1 * ((((x1 * 2.0) * t_2) * (t_2 - 3.0)) + ((x1 * x1) * 6.0))))))); else tmp = x1 + ((x1 + (4.0 * (x2 * (x1 * ((x2 * 2.0) - 3.0))))) + (3.0 * (x2 * -2.0))); end tmp_2 = tmp; end
code[x1_, x2_] := Block[{t$95$0 = N[(x1 * N[(x1 * 3.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(N[(x1 * x1), $MachinePrecision] + 1.0), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[(N[(x2 * 2.0), $MachinePrecision] + t$95$0), $MachinePrecision] - x1), $MachinePrecision] / t$95$1), $MachinePrecision]}, If[LessEqual[x1, -5.6e+102], N[(x1 * N[(N[(x2 * -12.0), $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 1.8e+149], N[(x1 + N[(N[(3.0 * N[(N[(N[(t$95$0 - N[(x2 * 2.0), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$1), $MachinePrecision]), $MachinePrecision] + N[(x1 + N[(N[(x1 * N[(x1 * x1), $MachinePrecision]), $MachinePrecision] + N[(N[(3.0 * t$95$0), $MachinePrecision] + N[(t$95$1 * N[(N[(N[(N[(x1 * 2.0), $MachinePrecision] * t$95$2), $MachinePrecision] * N[(t$95$2 - 3.0), $MachinePrecision]), $MachinePrecision] + N[(N[(x1 * x1), $MachinePrecision] * 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x1 + N[(N[(x1 + N[(4.0 * N[(x2 * N[(x1 * N[(N[(x2 * 2.0), $MachinePrecision] - 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(3.0 * N[(x2 * -2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x1 \cdot \left(x1 \cdot 3\right)\\
t_1 := x1 \cdot x1 + 1\\
t_2 := \frac{\left(x2 \cdot 2 + t_0\right) - x1}{t_1}\\
\mathbf{if}\;x1 \leq -5.6 \cdot 10^{+102}:\\
\;\;\;\;x1 \cdot \left(x2 \cdot -12 + -1\right)\\
\mathbf{elif}\;x1 \leq 1.8 \cdot 10^{+149}:\\
\;\;\;\;x1 + \left(3 \cdot \frac{\left(t_0 - x2 \cdot 2\right) - x1}{t_1} + \left(x1 + \left(x1 \cdot \left(x1 \cdot x1\right) + \left(3 \cdot t_0 + t_1 \cdot \left(\left(\left(x1 \cdot 2\right) \cdot t_2\right) \cdot \left(t_2 - 3\right) + \left(x1 \cdot x1\right) \cdot 6\right)\right)\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x1 + \left(\left(x1 + 4 \cdot \left(x2 \cdot \left(x1 \cdot \left(x2 \cdot 2 - 3\right)\right)\right)\right) + 3 \cdot \left(x2 \cdot -2\right)\right)\\
\end{array}
\end{array}
if x1 < -5.60000000000000037e102Initial program 0.0%
Taylor expanded in x1 around 0 0.1%
Taylor expanded in x2 around 0 3.1%
Taylor expanded in x1 around 0 25.2%
+-commutative25.2%
neg-mul-125.2%
unsub-neg25.2%
*-commutative25.2%
Simplified25.2%
Taylor expanded in x1 around inf 25.2%
if -5.60000000000000037e102 < x1 < 1.79999999999999997e149Initial program 99.3%
Taylor expanded in x1 around inf 97.0%
Taylor expanded in x1 around inf 96.9%
if 1.79999999999999997e149 < x1 Initial program 6.7%
Taylor expanded in x1 around 0 6.7%
Taylor expanded in x1 around 0 68.8%
*-commutative68.8%
Simplified68.8%
Final simplification82.7%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (* x1 (* x1 3.0)))
(t_1 (* 4.0 (* x2 (* x1 (- (* x2 2.0) 3.0)))))
(t_2 (+ (* x1 x1) 1.0))
(t_3 (* (* x1 x1) (- (* 4.0 (/ (- (+ (* x2 2.0) t_0) x1) t_2)) 6.0)))
(t_4 (* x1 (* x1 x1)))
(t_5 (* 3.0 (/ (- (- t_0 (* x2 2.0)) x1) t_2)))
(t_6 (* 3.0 t_0)))
(if (<= x1 -5.6e+102)
(* x1 (+ (* x2 -12.0) -1.0))
(if (<= x1 -2.3e+33)
(+ x1 (+ t_5 (+ x1 (+ t_4 (+ t_6 (* t_2 (+ (* x1 2.0) t_3)))))))
(if (<= x1 1.8e+149)
(+ x1 (+ t_5 (+ x1 (+ t_4 (+ t_6 (* t_2 (+ t_3 t_1)))))))
(+ x1 (+ (+ x1 t_1) (* 3.0 (* x2 -2.0)))))))))
double code(double x1, double x2) {
double t_0 = x1 * (x1 * 3.0);
double t_1 = 4.0 * (x2 * (x1 * ((x2 * 2.0) - 3.0)));
double t_2 = (x1 * x1) + 1.0;
double t_3 = (x1 * x1) * ((4.0 * ((((x2 * 2.0) + t_0) - x1) / t_2)) - 6.0);
double t_4 = x1 * (x1 * x1);
double t_5 = 3.0 * (((t_0 - (x2 * 2.0)) - x1) / t_2);
double t_6 = 3.0 * t_0;
double tmp;
if (x1 <= -5.6e+102) {
tmp = x1 * ((x2 * -12.0) + -1.0);
} else if (x1 <= -2.3e+33) {
tmp = x1 + (t_5 + (x1 + (t_4 + (t_6 + (t_2 * ((x1 * 2.0) + t_3))))));
} else if (x1 <= 1.8e+149) {
tmp = x1 + (t_5 + (x1 + (t_4 + (t_6 + (t_2 * (t_3 + t_1))))));
} else {
tmp = x1 + ((x1 + t_1) + (3.0 * (x2 * -2.0)));
}
return tmp;
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
real(8) :: t_0
real(8) :: t_1
real(8) :: t_2
real(8) :: t_3
real(8) :: t_4
real(8) :: t_5
real(8) :: t_6
real(8) :: tmp
t_0 = x1 * (x1 * 3.0d0)
t_1 = 4.0d0 * (x2 * (x1 * ((x2 * 2.0d0) - 3.0d0)))
t_2 = (x1 * x1) + 1.0d0
t_3 = (x1 * x1) * ((4.0d0 * ((((x2 * 2.0d0) + t_0) - x1) / t_2)) - 6.0d0)
t_4 = x1 * (x1 * x1)
t_5 = 3.0d0 * (((t_0 - (x2 * 2.0d0)) - x1) / t_2)
t_6 = 3.0d0 * t_0
if (x1 <= (-5.6d+102)) then
tmp = x1 * ((x2 * (-12.0d0)) + (-1.0d0))
else if (x1 <= (-2.3d+33)) then
tmp = x1 + (t_5 + (x1 + (t_4 + (t_6 + (t_2 * ((x1 * 2.0d0) + t_3))))))
else if (x1 <= 1.8d+149) then
tmp = x1 + (t_5 + (x1 + (t_4 + (t_6 + (t_2 * (t_3 + t_1))))))
else
tmp = x1 + ((x1 + t_1) + (3.0d0 * (x2 * (-2.0d0))))
end if
code = tmp
end function
public static double code(double x1, double x2) {
double t_0 = x1 * (x1 * 3.0);
double t_1 = 4.0 * (x2 * (x1 * ((x2 * 2.0) - 3.0)));
double t_2 = (x1 * x1) + 1.0;
double t_3 = (x1 * x1) * ((4.0 * ((((x2 * 2.0) + t_0) - x1) / t_2)) - 6.0);
double t_4 = x1 * (x1 * x1);
double t_5 = 3.0 * (((t_0 - (x2 * 2.0)) - x1) / t_2);
double t_6 = 3.0 * t_0;
double tmp;
if (x1 <= -5.6e+102) {
tmp = x1 * ((x2 * -12.0) + -1.0);
} else if (x1 <= -2.3e+33) {
tmp = x1 + (t_5 + (x1 + (t_4 + (t_6 + (t_2 * ((x1 * 2.0) + t_3))))));
} else if (x1 <= 1.8e+149) {
tmp = x1 + (t_5 + (x1 + (t_4 + (t_6 + (t_2 * (t_3 + t_1))))));
} else {
tmp = x1 + ((x1 + t_1) + (3.0 * (x2 * -2.0)));
}
return tmp;
}
def code(x1, x2): t_0 = x1 * (x1 * 3.0) t_1 = 4.0 * (x2 * (x1 * ((x2 * 2.0) - 3.0))) t_2 = (x1 * x1) + 1.0 t_3 = (x1 * x1) * ((4.0 * ((((x2 * 2.0) + t_0) - x1) / t_2)) - 6.0) t_4 = x1 * (x1 * x1) t_5 = 3.0 * (((t_0 - (x2 * 2.0)) - x1) / t_2) t_6 = 3.0 * t_0 tmp = 0 if x1 <= -5.6e+102: tmp = x1 * ((x2 * -12.0) + -1.0) elif x1 <= -2.3e+33: tmp = x1 + (t_5 + (x1 + (t_4 + (t_6 + (t_2 * ((x1 * 2.0) + t_3)))))) elif x1 <= 1.8e+149: tmp = x1 + (t_5 + (x1 + (t_4 + (t_6 + (t_2 * (t_3 + t_1)))))) else: tmp = x1 + ((x1 + t_1) + (3.0 * (x2 * -2.0))) return tmp
function code(x1, x2) t_0 = Float64(x1 * Float64(x1 * 3.0)) t_1 = Float64(4.0 * Float64(x2 * Float64(x1 * Float64(Float64(x2 * 2.0) - 3.0)))) t_2 = Float64(Float64(x1 * x1) + 1.0) t_3 = Float64(Float64(x1 * x1) * Float64(Float64(4.0 * Float64(Float64(Float64(Float64(x2 * 2.0) + t_0) - x1) / t_2)) - 6.0)) t_4 = Float64(x1 * Float64(x1 * x1)) t_5 = Float64(3.0 * Float64(Float64(Float64(t_0 - Float64(x2 * 2.0)) - x1) / t_2)) t_6 = Float64(3.0 * t_0) tmp = 0.0 if (x1 <= -5.6e+102) tmp = Float64(x1 * Float64(Float64(x2 * -12.0) + -1.0)); elseif (x1 <= -2.3e+33) tmp = Float64(x1 + Float64(t_5 + Float64(x1 + Float64(t_4 + Float64(t_6 + Float64(t_2 * Float64(Float64(x1 * 2.0) + t_3))))))); elseif (x1 <= 1.8e+149) tmp = Float64(x1 + Float64(t_5 + Float64(x1 + Float64(t_4 + Float64(t_6 + Float64(t_2 * Float64(t_3 + t_1))))))); else tmp = Float64(x1 + Float64(Float64(x1 + t_1) + Float64(3.0 * Float64(x2 * -2.0)))); end return tmp end
function tmp_2 = code(x1, x2) t_0 = x1 * (x1 * 3.0); t_1 = 4.0 * (x2 * (x1 * ((x2 * 2.0) - 3.0))); t_2 = (x1 * x1) + 1.0; t_3 = (x1 * x1) * ((4.0 * ((((x2 * 2.0) + t_0) - x1) / t_2)) - 6.0); t_4 = x1 * (x1 * x1); t_5 = 3.0 * (((t_0 - (x2 * 2.0)) - x1) / t_2); t_6 = 3.0 * t_0; tmp = 0.0; if (x1 <= -5.6e+102) tmp = x1 * ((x2 * -12.0) + -1.0); elseif (x1 <= -2.3e+33) tmp = x1 + (t_5 + (x1 + (t_4 + (t_6 + (t_2 * ((x1 * 2.0) + t_3)))))); elseif (x1 <= 1.8e+149) tmp = x1 + (t_5 + (x1 + (t_4 + (t_6 + (t_2 * (t_3 + t_1)))))); else tmp = x1 + ((x1 + t_1) + (3.0 * (x2 * -2.0))); end tmp_2 = tmp; end
code[x1_, x2_] := Block[{t$95$0 = N[(x1 * N[(x1 * 3.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(4.0 * N[(x2 * N[(x1 * N[(N[(x2 * 2.0), $MachinePrecision] - 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(x1 * x1), $MachinePrecision] + 1.0), $MachinePrecision]}, Block[{t$95$3 = N[(N[(x1 * x1), $MachinePrecision] * N[(N[(4.0 * N[(N[(N[(N[(x2 * 2.0), $MachinePrecision] + t$95$0), $MachinePrecision] - x1), $MachinePrecision] / t$95$2), $MachinePrecision]), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[(x1 * N[(x1 * x1), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$5 = N[(3.0 * N[(N[(N[(t$95$0 - N[(x2 * 2.0), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$2), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$6 = N[(3.0 * t$95$0), $MachinePrecision]}, If[LessEqual[x1, -5.6e+102], N[(x1 * N[(N[(x2 * -12.0), $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, -2.3e+33], N[(x1 + N[(t$95$5 + N[(x1 + N[(t$95$4 + N[(t$95$6 + N[(t$95$2 * N[(N[(x1 * 2.0), $MachinePrecision] + t$95$3), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 1.8e+149], N[(x1 + N[(t$95$5 + N[(x1 + N[(t$95$4 + N[(t$95$6 + N[(t$95$2 * N[(t$95$3 + t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x1 + N[(N[(x1 + t$95$1), $MachinePrecision] + N[(3.0 * N[(x2 * -2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x1 \cdot \left(x1 \cdot 3\right)\\
t_1 := 4 \cdot \left(x2 \cdot \left(x1 \cdot \left(x2 \cdot 2 - 3\right)\right)\right)\\
t_2 := x1 \cdot x1 + 1\\
t_3 := \left(x1 \cdot x1\right) \cdot \left(4 \cdot \frac{\left(x2 \cdot 2 + t_0\right) - x1}{t_2} - 6\right)\\
t_4 := x1 \cdot \left(x1 \cdot x1\right)\\
t_5 := 3 \cdot \frac{\left(t_0 - x2 \cdot 2\right) - x1}{t_2}\\
t_6 := 3 \cdot t_0\\
\mathbf{if}\;x1 \leq -5.6 \cdot 10^{+102}:\\
\;\;\;\;x1 \cdot \left(x2 \cdot -12 + -1\right)\\
\mathbf{elif}\;x1 \leq -2.3 \cdot 10^{+33}:\\
\;\;\;\;x1 + \left(t_5 + \left(x1 + \left(t_4 + \left(t_6 + t_2 \cdot \left(x1 \cdot 2 + t_3\right)\right)\right)\right)\right)\\
\mathbf{elif}\;x1 \leq 1.8 \cdot 10^{+149}:\\
\;\;\;\;x1 + \left(t_5 + \left(x1 + \left(t_4 + \left(t_6 + t_2 \cdot \left(t_3 + t_1\right)\right)\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x1 + \left(\left(x1 + t_1\right) + 3 \cdot \left(x2 \cdot -2\right)\right)\\
\end{array}
\end{array}
if x1 < -5.60000000000000037e102Initial program 0.0%
Taylor expanded in x1 around 0 0.1%
Taylor expanded in x2 around 0 3.1%
Taylor expanded in x1 around 0 25.2%
+-commutative25.2%
neg-mul-125.2%
unsub-neg25.2%
*-commutative25.2%
Simplified25.2%
Taylor expanded in x1 around inf 25.2%
if -5.60000000000000037e102 < x1 < -2.30000000000000011e33Initial program 99.2%
Taylor expanded in x1 around 0 75.2%
Taylor expanded in x1 around inf 75.2%
Taylor expanded in x1 around inf 84.6%
*-commutative84.6%
Simplified84.6%
if -2.30000000000000011e33 < x1 < 1.79999999999999997e149Initial program 99.3%
Taylor expanded in x1 around 0 94.8%
Taylor expanded in x1 around inf 94.3%
Taylor expanded in x1 around 0 93.8%
if 1.79999999999999997e149 < x1 Initial program 6.7%
Taylor expanded in x1 around 0 6.7%
Taylor expanded in x1 around 0 68.8%
*-commutative68.8%
Simplified68.8%
Final simplification79.8%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (* x1 (* x1 3.0))) (t_1 (+ (* x1 x1) 1.0)))
(if (<= x1 -5.6e+102)
(* x1 (+ (* x2 -12.0) -1.0))
(if (<= x1 2.05e+142)
(+
x1
(+
(* 3.0 (/ (- (- t_0 (* x2 2.0)) x1) t_1))
(+
x1
(+
(* x1 (* x1 x1))
(+
(* 3.0 t_0)
(*
t_1
(+
(* (* x1 x1) 6.0)
(*
(- (/ (- (+ (* x2 2.0) t_0) x1) t_1) 3.0)
(* (* x1 2.0) (- (* x2 2.0) x1))))))))))
(+
x1
(+
(+ x1 (* 4.0 (* x2 (* x1 (- (* x2 2.0) 3.0)))))
(* 3.0 (* x2 -2.0))))))))
double code(double x1, double x2) {
double t_0 = x1 * (x1 * 3.0);
double t_1 = (x1 * x1) + 1.0;
double tmp;
if (x1 <= -5.6e+102) {
tmp = x1 * ((x2 * -12.0) + -1.0);
} else if (x1 <= 2.05e+142) {
tmp = x1 + ((3.0 * (((t_0 - (x2 * 2.0)) - x1) / t_1)) + (x1 + ((x1 * (x1 * x1)) + ((3.0 * t_0) + (t_1 * (((x1 * x1) * 6.0) + ((((((x2 * 2.0) + t_0) - x1) / t_1) - 3.0) * ((x1 * 2.0) * ((x2 * 2.0) - x1)))))))));
} else {
tmp = x1 + ((x1 + (4.0 * (x2 * (x1 * ((x2 * 2.0) - 3.0))))) + (3.0 * (x2 * -2.0)));
}
return tmp;
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
real(8) :: t_0
real(8) :: t_1
real(8) :: tmp
t_0 = x1 * (x1 * 3.0d0)
t_1 = (x1 * x1) + 1.0d0
if (x1 <= (-5.6d+102)) then
tmp = x1 * ((x2 * (-12.0d0)) + (-1.0d0))
else if (x1 <= 2.05d+142) then
tmp = x1 + ((3.0d0 * (((t_0 - (x2 * 2.0d0)) - x1) / t_1)) + (x1 + ((x1 * (x1 * x1)) + ((3.0d0 * t_0) + (t_1 * (((x1 * x1) * 6.0d0) + ((((((x2 * 2.0d0) + t_0) - x1) / t_1) - 3.0d0) * ((x1 * 2.0d0) * ((x2 * 2.0d0) - x1)))))))))
else
tmp = x1 + ((x1 + (4.0d0 * (x2 * (x1 * ((x2 * 2.0d0) - 3.0d0))))) + (3.0d0 * (x2 * (-2.0d0))))
end if
code = tmp
end function
public static double code(double x1, double x2) {
double t_0 = x1 * (x1 * 3.0);
double t_1 = (x1 * x1) + 1.0;
double tmp;
if (x1 <= -5.6e+102) {
tmp = x1 * ((x2 * -12.0) + -1.0);
} else if (x1 <= 2.05e+142) {
tmp = x1 + ((3.0 * (((t_0 - (x2 * 2.0)) - x1) / t_1)) + (x1 + ((x1 * (x1 * x1)) + ((3.0 * t_0) + (t_1 * (((x1 * x1) * 6.0) + ((((((x2 * 2.0) + t_0) - x1) / t_1) - 3.0) * ((x1 * 2.0) * ((x2 * 2.0) - x1)))))))));
} else {
tmp = x1 + ((x1 + (4.0 * (x2 * (x1 * ((x2 * 2.0) - 3.0))))) + (3.0 * (x2 * -2.0)));
}
return tmp;
}
def code(x1, x2): t_0 = x1 * (x1 * 3.0) t_1 = (x1 * x1) + 1.0 tmp = 0 if x1 <= -5.6e+102: tmp = x1 * ((x2 * -12.0) + -1.0) elif x1 <= 2.05e+142: tmp = x1 + ((3.0 * (((t_0 - (x2 * 2.0)) - x1) / t_1)) + (x1 + ((x1 * (x1 * x1)) + ((3.0 * t_0) + (t_1 * (((x1 * x1) * 6.0) + ((((((x2 * 2.0) + t_0) - x1) / t_1) - 3.0) * ((x1 * 2.0) * ((x2 * 2.0) - x1))))))))) else: tmp = x1 + ((x1 + (4.0 * (x2 * (x1 * ((x2 * 2.0) - 3.0))))) + (3.0 * (x2 * -2.0))) return tmp
function code(x1, x2) t_0 = Float64(x1 * Float64(x1 * 3.0)) t_1 = Float64(Float64(x1 * x1) + 1.0) tmp = 0.0 if (x1 <= -5.6e+102) tmp = Float64(x1 * Float64(Float64(x2 * -12.0) + -1.0)); elseif (x1 <= 2.05e+142) tmp = Float64(x1 + Float64(Float64(3.0 * Float64(Float64(Float64(t_0 - Float64(x2 * 2.0)) - x1) / t_1)) + Float64(x1 + Float64(Float64(x1 * Float64(x1 * x1)) + Float64(Float64(3.0 * t_0) + Float64(t_1 * Float64(Float64(Float64(x1 * x1) * 6.0) + Float64(Float64(Float64(Float64(Float64(Float64(x2 * 2.0) + t_0) - x1) / t_1) - 3.0) * Float64(Float64(x1 * 2.0) * Float64(Float64(x2 * 2.0) - x1)))))))))); else tmp = Float64(x1 + Float64(Float64(x1 + Float64(4.0 * Float64(x2 * Float64(x1 * Float64(Float64(x2 * 2.0) - 3.0))))) + Float64(3.0 * Float64(x2 * -2.0)))); end return tmp end
function tmp_2 = code(x1, x2) t_0 = x1 * (x1 * 3.0); t_1 = (x1 * x1) + 1.0; tmp = 0.0; if (x1 <= -5.6e+102) tmp = x1 * ((x2 * -12.0) + -1.0); elseif (x1 <= 2.05e+142) tmp = x1 + ((3.0 * (((t_0 - (x2 * 2.0)) - x1) / t_1)) + (x1 + ((x1 * (x1 * x1)) + ((3.0 * t_0) + (t_1 * (((x1 * x1) * 6.0) + ((((((x2 * 2.0) + t_0) - x1) / t_1) - 3.0) * ((x1 * 2.0) * ((x2 * 2.0) - x1))))))))); else tmp = x1 + ((x1 + (4.0 * (x2 * (x1 * ((x2 * 2.0) - 3.0))))) + (3.0 * (x2 * -2.0))); end tmp_2 = tmp; end
code[x1_, x2_] := Block[{t$95$0 = N[(x1 * N[(x1 * 3.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(N[(x1 * x1), $MachinePrecision] + 1.0), $MachinePrecision]}, If[LessEqual[x1, -5.6e+102], N[(x1 * N[(N[(x2 * -12.0), $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 2.05e+142], N[(x1 + N[(N[(3.0 * N[(N[(N[(t$95$0 - N[(x2 * 2.0), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$1), $MachinePrecision]), $MachinePrecision] + N[(x1 + N[(N[(x1 * N[(x1 * x1), $MachinePrecision]), $MachinePrecision] + N[(N[(3.0 * t$95$0), $MachinePrecision] + N[(t$95$1 * N[(N[(N[(x1 * x1), $MachinePrecision] * 6.0), $MachinePrecision] + N[(N[(N[(N[(N[(N[(x2 * 2.0), $MachinePrecision] + t$95$0), $MachinePrecision] - x1), $MachinePrecision] / t$95$1), $MachinePrecision] - 3.0), $MachinePrecision] * N[(N[(x1 * 2.0), $MachinePrecision] * N[(N[(x2 * 2.0), $MachinePrecision] - x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x1 + N[(N[(x1 + N[(4.0 * N[(x2 * N[(x1 * N[(N[(x2 * 2.0), $MachinePrecision] - 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(3.0 * N[(x2 * -2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x1 \cdot \left(x1 \cdot 3\right)\\
t_1 := x1 \cdot x1 + 1\\
\mathbf{if}\;x1 \leq -5.6 \cdot 10^{+102}:\\
\;\;\;\;x1 \cdot \left(x2 \cdot -12 + -1\right)\\
\mathbf{elif}\;x1 \leq 2.05 \cdot 10^{+142}:\\
\;\;\;\;x1 + \left(3 \cdot \frac{\left(t_0 - x2 \cdot 2\right) - x1}{t_1} + \left(x1 + \left(x1 \cdot \left(x1 \cdot x1\right) + \left(3 \cdot t_0 + t_1 \cdot \left(\left(x1 \cdot x1\right) \cdot 6 + \left(\frac{\left(x2 \cdot 2 + t_0\right) - x1}{t_1} - 3\right) \cdot \left(\left(x1 \cdot 2\right) \cdot \left(x2 \cdot 2 - x1\right)\right)\right)\right)\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x1 + \left(\left(x1 + 4 \cdot \left(x2 \cdot \left(x1 \cdot \left(x2 \cdot 2 - 3\right)\right)\right)\right) + 3 \cdot \left(x2 \cdot -2\right)\right)\\
\end{array}
\end{array}
if x1 < -5.60000000000000037e102Initial program 0.0%
Taylor expanded in x1 around 0 0.1%
Taylor expanded in x2 around 0 3.1%
Taylor expanded in x1 around 0 25.2%
+-commutative25.2%
neg-mul-125.2%
unsub-neg25.2%
*-commutative25.2%
Simplified25.2%
Taylor expanded in x1 around inf 25.2%
if -5.60000000000000037e102 < x1 < 2.04999999999999991e142Initial program 99.3%
Taylor expanded in x1 around 0 93.4%
Taylor expanded in x1 around inf 92.9%
Taylor expanded in x1 around inf 92.8%
if 2.04999999999999991e142 < x1 Initial program 12.5%
Taylor expanded in x1 around 0 9.6%
Taylor expanded in x1 around 0 67.9%
*-commutative67.9%
Simplified67.9%
Final simplification79.4%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (* x1 (* x1 3.0)))
(t_1 (+ (* x1 x1) 1.0))
(t_2 (* 3.0 (/ (- (- t_0 (* x2 2.0)) x1) t_1)))
(t_3
(+
x1
(+
t_2
(+
x1
(+
(* x1 (* x1 x1))
(+
(* 3.0 t_0)
(*
t_1
(+
(* x1 2.0)
(*
(* x1 x1)
(- (* 4.0 (/ (- (+ (* x2 2.0) t_0) x1) t_1)) 6.0)))))))))))
(if (<= x1 -5.6e+102)
(* x1 (+ (* x2 -12.0) -1.0))
(if (<= x1 -6.7)
t_3
(if (<= x1 530000000.0)
(+ x1 (+ t_2 (+ x1 (* 8.0 (* x2 (* x1 x2))))))
(if (<= x1 1.8e+149)
t_3
(+
x1
(+
(+ x1 (* 4.0 (* x2 (* x1 (- (* x2 2.0) 3.0)))))
(* 3.0 (* x2 -2.0))))))))))
double code(double x1, double x2) {
double t_0 = x1 * (x1 * 3.0);
double t_1 = (x1 * x1) + 1.0;
double t_2 = 3.0 * (((t_0 - (x2 * 2.0)) - x1) / t_1);
double t_3 = x1 + (t_2 + (x1 + ((x1 * (x1 * x1)) + ((3.0 * t_0) + (t_1 * ((x1 * 2.0) + ((x1 * x1) * ((4.0 * ((((x2 * 2.0) + t_0) - x1) / t_1)) - 6.0))))))));
double tmp;
if (x1 <= -5.6e+102) {
tmp = x1 * ((x2 * -12.0) + -1.0);
} else if (x1 <= -6.7) {
tmp = t_3;
} else if (x1 <= 530000000.0) {
tmp = x1 + (t_2 + (x1 + (8.0 * (x2 * (x1 * x2)))));
} else if (x1 <= 1.8e+149) {
tmp = t_3;
} else {
tmp = x1 + ((x1 + (4.0 * (x2 * (x1 * ((x2 * 2.0) - 3.0))))) + (3.0 * (x2 * -2.0)));
}
return tmp;
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
real(8) :: t_0
real(8) :: t_1
real(8) :: t_2
real(8) :: t_3
real(8) :: tmp
t_0 = x1 * (x1 * 3.0d0)
t_1 = (x1 * x1) + 1.0d0
t_2 = 3.0d0 * (((t_0 - (x2 * 2.0d0)) - x1) / t_1)
t_3 = x1 + (t_2 + (x1 + ((x1 * (x1 * x1)) + ((3.0d0 * t_0) + (t_1 * ((x1 * 2.0d0) + ((x1 * x1) * ((4.0d0 * ((((x2 * 2.0d0) + t_0) - x1) / t_1)) - 6.0d0))))))))
if (x1 <= (-5.6d+102)) then
tmp = x1 * ((x2 * (-12.0d0)) + (-1.0d0))
else if (x1 <= (-6.7d0)) then
tmp = t_3
else if (x1 <= 530000000.0d0) then
tmp = x1 + (t_2 + (x1 + (8.0d0 * (x2 * (x1 * x2)))))
else if (x1 <= 1.8d+149) then
tmp = t_3
else
tmp = x1 + ((x1 + (4.0d0 * (x2 * (x1 * ((x2 * 2.0d0) - 3.0d0))))) + (3.0d0 * (x2 * (-2.0d0))))
end if
code = tmp
end function
public static double code(double x1, double x2) {
double t_0 = x1 * (x1 * 3.0);
double t_1 = (x1 * x1) + 1.0;
double t_2 = 3.0 * (((t_0 - (x2 * 2.0)) - x1) / t_1);
double t_3 = x1 + (t_2 + (x1 + ((x1 * (x1 * x1)) + ((3.0 * t_0) + (t_1 * ((x1 * 2.0) + ((x1 * x1) * ((4.0 * ((((x2 * 2.0) + t_0) - x1) / t_1)) - 6.0))))))));
double tmp;
if (x1 <= -5.6e+102) {
tmp = x1 * ((x2 * -12.0) + -1.0);
} else if (x1 <= -6.7) {
tmp = t_3;
} else if (x1 <= 530000000.0) {
tmp = x1 + (t_2 + (x1 + (8.0 * (x2 * (x1 * x2)))));
} else if (x1 <= 1.8e+149) {
tmp = t_3;
} else {
tmp = x1 + ((x1 + (4.0 * (x2 * (x1 * ((x2 * 2.0) - 3.0))))) + (3.0 * (x2 * -2.0)));
}
return tmp;
}
def code(x1, x2): t_0 = x1 * (x1 * 3.0) t_1 = (x1 * x1) + 1.0 t_2 = 3.0 * (((t_0 - (x2 * 2.0)) - x1) / t_1) t_3 = x1 + (t_2 + (x1 + ((x1 * (x1 * x1)) + ((3.0 * t_0) + (t_1 * ((x1 * 2.0) + ((x1 * x1) * ((4.0 * ((((x2 * 2.0) + t_0) - x1) / t_1)) - 6.0)))))))) tmp = 0 if x1 <= -5.6e+102: tmp = x1 * ((x2 * -12.0) + -1.0) elif x1 <= -6.7: tmp = t_3 elif x1 <= 530000000.0: tmp = x1 + (t_2 + (x1 + (8.0 * (x2 * (x1 * x2))))) elif x1 <= 1.8e+149: tmp = t_3 else: tmp = x1 + ((x1 + (4.0 * (x2 * (x1 * ((x2 * 2.0) - 3.0))))) + (3.0 * (x2 * -2.0))) return tmp
function code(x1, x2) t_0 = Float64(x1 * Float64(x1 * 3.0)) t_1 = Float64(Float64(x1 * x1) + 1.0) t_2 = Float64(3.0 * Float64(Float64(Float64(t_0 - Float64(x2 * 2.0)) - x1) / t_1)) t_3 = Float64(x1 + Float64(t_2 + Float64(x1 + Float64(Float64(x1 * Float64(x1 * x1)) + Float64(Float64(3.0 * t_0) + Float64(t_1 * Float64(Float64(x1 * 2.0) + Float64(Float64(x1 * x1) * Float64(Float64(4.0 * Float64(Float64(Float64(Float64(x2 * 2.0) + t_0) - x1) / t_1)) - 6.0))))))))) tmp = 0.0 if (x1 <= -5.6e+102) tmp = Float64(x1 * Float64(Float64(x2 * -12.0) + -1.0)); elseif (x1 <= -6.7) tmp = t_3; elseif (x1 <= 530000000.0) tmp = Float64(x1 + Float64(t_2 + Float64(x1 + Float64(8.0 * Float64(x2 * Float64(x1 * x2)))))); elseif (x1 <= 1.8e+149) tmp = t_3; else tmp = Float64(x1 + Float64(Float64(x1 + Float64(4.0 * Float64(x2 * Float64(x1 * Float64(Float64(x2 * 2.0) - 3.0))))) + Float64(3.0 * Float64(x2 * -2.0)))); end return tmp end
function tmp_2 = code(x1, x2) t_0 = x1 * (x1 * 3.0); t_1 = (x1 * x1) + 1.0; t_2 = 3.0 * (((t_0 - (x2 * 2.0)) - x1) / t_1); t_3 = x1 + (t_2 + (x1 + ((x1 * (x1 * x1)) + ((3.0 * t_0) + (t_1 * ((x1 * 2.0) + ((x1 * x1) * ((4.0 * ((((x2 * 2.0) + t_0) - x1) / t_1)) - 6.0)))))))); tmp = 0.0; if (x1 <= -5.6e+102) tmp = x1 * ((x2 * -12.0) + -1.0); elseif (x1 <= -6.7) tmp = t_3; elseif (x1 <= 530000000.0) tmp = x1 + (t_2 + (x1 + (8.0 * (x2 * (x1 * x2))))); elseif (x1 <= 1.8e+149) tmp = t_3; else tmp = x1 + ((x1 + (4.0 * (x2 * (x1 * ((x2 * 2.0) - 3.0))))) + (3.0 * (x2 * -2.0))); end tmp_2 = tmp; end
code[x1_, x2_] := Block[{t$95$0 = N[(x1 * N[(x1 * 3.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(N[(x1 * x1), $MachinePrecision] + 1.0), $MachinePrecision]}, Block[{t$95$2 = N[(3.0 * N[(N[(N[(t$95$0 - N[(x2 * 2.0), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$1), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(x1 + N[(t$95$2 + N[(x1 + N[(N[(x1 * N[(x1 * x1), $MachinePrecision]), $MachinePrecision] + N[(N[(3.0 * t$95$0), $MachinePrecision] + N[(t$95$1 * N[(N[(x1 * 2.0), $MachinePrecision] + N[(N[(x1 * x1), $MachinePrecision] * N[(N[(4.0 * N[(N[(N[(N[(x2 * 2.0), $MachinePrecision] + t$95$0), $MachinePrecision] - x1), $MachinePrecision] / t$95$1), $MachinePrecision]), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x1, -5.6e+102], N[(x1 * N[(N[(x2 * -12.0), $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, -6.7], t$95$3, If[LessEqual[x1, 530000000.0], N[(x1 + N[(t$95$2 + N[(x1 + N[(8.0 * N[(x2 * N[(x1 * x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 1.8e+149], t$95$3, N[(x1 + N[(N[(x1 + N[(4.0 * N[(x2 * N[(x1 * N[(N[(x2 * 2.0), $MachinePrecision] - 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(3.0 * N[(x2 * -2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x1 \cdot \left(x1 \cdot 3\right)\\
t_1 := x1 \cdot x1 + 1\\
t_2 := 3 \cdot \frac{\left(t_0 - x2 \cdot 2\right) - x1}{t_1}\\
t_3 := x1 + \left(t_2 + \left(x1 + \left(x1 \cdot \left(x1 \cdot x1\right) + \left(3 \cdot t_0 + t_1 \cdot \left(x1 \cdot 2 + \left(x1 \cdot x1\right) \cdot \left(4 \cdot \frac{\left(x2 \cdot 2 + t_0\right) - x1}{t_1} - 6\right)\right)\right)\right)\right)\right)\\
\mathbf{if}\;x1 \leq -5.6 \cdot 10^{+102}:\\
\;\;\;\;x1 \cdot \left(x2 \cdot -12 + -1\right)\\
\mathbf{elif}\;x1 \leq -6.7:\\
\;\;\;\;t_3\\
\mathbf{elif}\;x1 \leq 530000000:\\
\;\;\;\;x1 + \left(t_2 + \left(x1 + 8 \cdot \left(x2 \cdot \left(x1 \cdot x2\right)\right)\right)\right)\\
\mathbf{elif}\;x1 \leq 1.8 \cdot 10^{+149}:\\
\;\;\;\;t_3\\
\mathbf{else}:\\
\;\;\;\;x1 + \left(\left(x1 + 4 \cdot \left(x2 \cdot \left(x1 \cdot \left(x2 \cdot 2 - 3\right)\right)\right)\right) + 3 \cdot \left(x2 \cdot -2\right)\right)\\
\end{array}
\end{array}
if x1 < -5.60000000000000037e102Initial program 0.0%
Taylor expanded in x1 around 0 0.1%
Taylor expanded in x2 around 0 3.1%
Taylor expanded in x1 around 0 25.2%
+-commutative25.2%
neg-mul-125.2%
unsub-neg25.2%
*-commutative25.2%
Simplified25.2%
Taylor expanded in x1 around inf 25.2%
if -5.60000000000000037e102 < x1 < -6.70000000000000018 or 5.3e8 < x1 < 1.79999999999999997e149Initial program 99.4%
Taylor expanded in x1 around 0 81.9%
Taylor expanded in x1 around inf 81.9%
Taylor expanded in x1 around inf 81.1%
*-commutative81.1%
Simplified81.1%
if -6.70000000000000018 < x1 < 5.3e8Initial program 99.3%
Taylor expanded in x1 around inf 97.9%
Taylor expanded in x2 around inf 89.0%
associate-/l*89.0%
unpow289.0%
+-commutative89.0%
unpow289.0%
fma-udef89.0%
Simplified89.0%
Taylor expanded in x1 around 0 88.1%
unpow288.1%
associate-*l*97.7%
Simplified97.7%
if 1.79999999999999997e149 < x1 Initial program 6.7%
Taylor expanded in x1 around 0 6.7%
Taylor expanded in x1 around 0 68.8%
*-commutative68.8%
Simplified68.8%
Final simplification79.6%
(FPCore (x1 x2)
:precision binary64
(if (<= x1 -7.5e+77)
(* x1 (+ (* x2 -12.0) -1.0))
(if (<= x1 1.8e+149)
(+
x1
(+
(* 3.0 (/ (- (- (* x1 (* x1 3.0)) (* x2 2.0)) x1) (+ (* x1 x1) 1.0)))
(+ x1 (* 8.0 (* x2 (* x1 x2))))))
(if (<= x1 4.4e+193)
(/ (- (* x1 x1) (* (* x2 x2) 36.0)) (- x1 (* x2 -6.0)))
(+ x1 (* x1 (+ 1.0 (* 4.0 (* x2 (- (* x2 2.0) 3.0))))))))))
double code(double x1, double x2) {
double tmp;
if (x1 <= -7.5e+77) {
tmp = x1 * ((x2 * -12.0) + -1.0);
} else if (x1 <= 1.8e+149) {
tmp = x1 + ((3.0 * ((((x1 * (x1 * 3.0)) - (x2 * 2.0)) - x1) / ((x1 * x1) + 1.0))) + (x1 + (8.0 * (x2 * (x1 * x2)))));
} else if (x1 <= 4.4e+193) {
tmp = ((x1 * x1) - ((x2 * x2) * 36.0)) / (x1 - (x2 * -6.0));
} else {
tmp = x1 + (x1 * (1.0 + (4.0 * (x2 * ((x2 * 2.0) - 3.0)))));
}
return tmp;
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
real(8) :: tmp
if (x1 <= (-7.5d+77)) then
tmp = x1 * ((x2 * (-12.0d0)) + (-1.0d0))
else if (x1 <= 1.8d+149) then
tmp = x1 + ((3.0d0 * ((((x1 * (x1 * 3.0d0)) - (x2 * 2.0d0)) - x1) / ((x1 * x1) + 1.0d0))) + (x1 + (8.0d0 * (x2 * (x1 * x2)))))
else if (x1 <= 4.4d+193) then
tmp = ((x1 * x1) - ((x2 * x2) * 36.0d0)) / (x1 - (x2 * (-6.0d0)))
else
tmp = x1 + (x1 * (1.0d0 + (4.0d0 * (x2 * ((x2 * 2.0d0) - 3.0d0)))))
end if
code = tmp
end function
public static double code(double x1, double x2) {
double tmp;
if (x1 <= -7.5e+77) {
tmp = x1 * ((x2 * -12.0) + -1.0);
} else if (x1 <= 1.8e+149) {
tmp = x1 + ((3.0 * ((((x1 * (x1 * 3.0)) - (x2 * 2.0)) - x1) / ((x1 * x1) + 1.0))) + (x1 + (8.0 * (x2 * (x1 * x2)))));
} else if (x1 <= 4.4e+193) {
tmp = ((x1 * x1) - ((x2 * x2) * 36.0)) / (x1 - (x2 * -6.0));
} else {
tmp = x1 + (x1 * (1.0 + (4.0 * (x2 * ((x2 * 2.0) - 3.0)))));
}
return tmp;
}
def code(x1, x2): tmp = 0 if x1 <= -7.5e+77: tmp = x1 * ((x2 * -12.0) + -1.0) elif x1 <= 1.8e+149: tmp = x1 + ((3.0 * ((((x1 * (x1 * 3.0)) - (x2 * 2.0)) - x1) / ((x1 * x1) + 1.0))) + (x1 + (8.0 * (x2 * (x1 * x2))))) elif x1 <= 4.4e+193: tmp = ((x1 * x1) - ((x2 * x2) * 36.0)) / (x1 - (x2 * -6.0)) else: tmp = x1 + (x1 * (1.0 + (4.0 * (x2 * ((x2 * 2.0) - 3.0))))) return tmp
function code(x1, x2) tmp = 0.0 if (x1 <= -7.5e+77) tmp = Float64(x1 * Float64(Float64(x2 * -12.0) + -1.0)); elseif (x1 <= 1.8e+149) tmp = Float64(x1 + Float64(Float64(3.0 * Float64(Float64(Float64(Float64(x1 * Float64(x1 * 3.0)) - Float64(x2 * 2.0)) - x1) / Float64(Float64(x1 * x1) + 1.0))) + Float64(x1 + Float64(8.0 * Float64(x2 * Float64(x1 * x2)))))); elseif (x1 <= 4.4e+193) tmp = Float64(Float64(Float64(x1 * x1) - Float64(Float64(x2 * x2) * 36.0)) / Float64(x1 - Float64(x2 * -6.0))); else tmp = Float64(x1 + Float64(x1 * Float64(1.0 + Float64(4.0 * Float64(x2 * Float64(Float64(x2 * 2.0) - 3.0)))))); end return tmp end
function tmp_2 = code(x1, x2) tmp = 0.0; if (x1 <= -7.5e+77) tmp = x1 * ((x2 * -12.0) + -1.0); elseif (x1 <= 1.8e+149) tmp = x1 + ((3.0 * ((((x1 * (x1 * 3.0)) - (x2 * 2.0)) - x1) / ((x1 * x1) + 1.0))) + (x1 + (8.0 * (x2 * (x1 * x2))))); elseif (x1 <= 4.4e+193) tmp = ((x1 * x1) - ((x2 * x2) * 36.0)) / (x1 - (x2 * -6.0)); else tmp = x1 + (x1 * (1.0 + (4.0 * (x2 * ((x2 * 2.0) - 3.0))))); end tmp_2 = tmp; end
code[x1_, x2_] := If[LessEqual[x1, -7.5e+77], N[(x1 * N[(N[(x2 * -12.0), $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 1.8e+149], N[(x1 + N[(N[(3.0 * N[(N[(N[(N[(x1 * N[(x1 * 3.0), $MachinePrecision]), $MachinePrecision] - N[(x2 * 2.0), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / N[(N[(x1 * x1), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(x1 + N[(8.0 * N[(x2 * N[(x1 * x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 4.4e+193], N[(N[(N[(x1 * x1), $MachinePrecision] - N[(N[(x2 * x2), $MachinePrecision] * 36.0), $MachinePrecision]), $MachinePrecision] / N[(x1 - N[(x2 * -6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x1 + N[(x1 * N[(1.0 + N[(4.0 * N[(x2 * N[(N[(x2 * 2.0), $MachinePrecision] - 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x1 \leq -7.5 \cdot 10^{+77}:\\
\;\;\;\;x1 \cdot \left(x2 \cdot -12 + -1\right)\\
\mathbf{elif}\;x1 \leq 1.8 \cdot 10^{+149}:\\
\;\;\;\;x1 + \left(3 \cdot \frac{\left(x1 \cdot \left(x1 \cdot 3\right) - x2 \cdot 2\right) - x1}{x1 \cdot x1 + 1} + \left(x1 + 8 \cdot \left(x2 \cdot \left(x1 \cdot x2\right)\right)\right)\right)\\
\mathbf{elif}\;x1 \leq 4.4 \cdot 10^{+193}:\\
\;\;\;\;\frac{x1 \cdot x1 - \left(x2 \cdot x2\right) \cdot 36}{x1 - x2 \cdot -6}\\
\mathbf{else}:\\
\;\;\;\;x1 + x1 \cdot \left(1 + 4 \cdot \left(x2 \cdot \left(x2 \cdot 2 - 3\right)\right)\right)\\
\end{array}
\end{array}
if x1 < -7.49999999999999955e77Initial program 9.3%
Taylor expanded in x1 around 0 0.1%
Taylor expanded in x2 around 0 3.0%
Taylor expanded in x1 around 0 23.2%
+-commutative23.2%
neg-mul-123.2%
unsub-neg23.2%
*-commutative23.2%
Simplified23.2%
Taylor expanded in x1 around inf 23.2%
if -7.49999999999999955e77 < x1 < 1.79999999999999997e149Initial program 99.3%
Taylor expanded in x1 around inf 96.9%
Taylor expanded in x2 around inf 71.8%
associate-/l*71.8%
unpow271.8%
+-commutative71.8%
unpow271.8%
fma-udef71.8%
Simplified71.8%
Taylor expanded in x1 around 0 69.4%
unpow269.4%
associate-*l*76.3%
Simplified76.3%
if 1.79999999999999997e149 < x1 < 4.39999999999999972e193Initial program 18.2%
Taylor expanded in x1 around 0 18.2%
Taylor expanded in x1 around 0 5.3%
*-commutative5.3%
Simplified5.3%
flip-+81.8%
Applied egg-rr81.8%
swap-sqr81.8%
metadata-eval81.8%
Simplified81.8%
if 4.39999999999999972e193 < x1 Initial program 0.0%
Taylor expanded in x1 around 0 0.0%
Taylor expanded in x1 around inf 80.8%
Final simplification67.9%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (* x1 (+ (* x2 -12.0) -1.0))))
(if (<= x1 -1.2e+85)
t_0
(if (or (<= x1 -1e-246) (not (<= x1 1.65e-230)))
(+ x1 (+ (* x2 -6.0) (* x1 (- (* 4.0 (* x2 (- (* x2 2.0) 3.0))) 2.0))))
(+ (* x2 -6.0) t_0)))))
double code(double x1, double x2) {
double t_0 = x1 * ((x2 * -12.0) + -1.0);
double tmp;
if (x1 <= -1.2e+85) {
tmp = t_0;
} else if ((x1 <= -1e-246) || !(x1 <= 1.65e-230)) {
tmp = x1 + ((x2 * -6.0) + (x1 * ((4.0 * (x2 * ((x2 * 2.0) - 3.0))) - 2.0)));
} else {
tmp = (x2 * -6.0) + 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 * ((x2 * (-12.0d0)) + (-1.0d0))
if (x1 <= (-1.2d+85)) then
tmp = t_0
else if ((x1 <= (-1d-246)) .or. (.not. (x1 <= 1.65d-230))) then
tmp = x1 + ((x2 * (-6.0d0)) + (x1 * ((4.0d0 * (x2 * ((x2 * 2.0d0) - 3.0d0))) - 2.0d0)))
else
tmp = (x2 * (-6.0d0)) + t_0
end if
code = tmp
end function
public static double code(double x1, double x2) {
double t_0 = x1 * ((x2 * -12.0) + -1.0);
double tmp;
if (x1 <= -1.2e+85) {
tmp = t_0;
} else if ((x1 <= -1e-246) || !(x1 <= 1.65e-230)) {
tmp = x1 + ((x2 * -6.0) + (x1 * ((4.0 * (x2 * ((x2 * 2.0) - 3.0))) - 2.0)));
} else {
tmp = (x2 * -6.0) + t_0;
}
return tmp;
}
def code(x1, x2): t_0 = x1 * ((x2 * -12.0) + -1.0) tmp = 0 if x1 <= -1.2e+85: tmp = t_0 elif (x1 <= -1e-246) or not (x1 <= 1.65e-230): tmp = x1 + ((x2 * -6.0) + (x1 * ((4.0 * (x2 * ((x2 * 2.0) - 3.0))) - 2.0))) else: tmp = (x2 * -6.0) + t_0 return tmp
function code(x1, x2) t_0 = Float64(x1 * Float64(Float64(x2 * -12.0) + -1.0)) tmp = 0.0 if (x1 <= -1.2e+85) tmp = t_0; elseif ((x1 <= -1e-246) || !(x1 <= 1.65e-230)) tmp = Float64(x1 + Float64(Float64(x2 * -6.0) + Float64(x1 * Float64(Float64(4.0 * Float64(x2 * Float64(Float64(x2 * 2.0) - 3.0))) - 2.0)))); else tmp = Float64(Float64(x2 * -6.0) + t_0); end return tmp end
function tmp_2 = code(x1, x2) t_0 = x1 * ((x2 * -12.0) + -1.0); tmp = 0.0; if (x1 <= -1.2e+85) tmp = t_0; elseif ((x1 <= -1e-246) || ~((x1 <= 1.65e-230))) tmp = x1 + ((x2 * -6.0) + (x1 * ((4.0 * (x2 * ((x2 * 2.0) - 3.0))) - 2.0))); else tmp = (x2 * -6.0) + t_0; end tmp_2 = tmp; end
code[x1_, x2_] := Block[{t$95$0 = N[(x1 * N[(N[(x2 * -12.0), $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x1, -1.2e+85], t$95$0, If[Or[LessEqual[x1, -1e-246], N[Not[LessEqual[x1, 1.65e-230]], $MachinePrecision]], N[(x1 + N[(N[(x2 * -6.0), $MachinePrecision] + N[(x1 * N[(N[(4.0 * N[(x2 * N[(N[(x2 * 2.0), $MachinePrecision] - 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x2 * -6.0), $MachinePrecision] + t$95$0), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x1 \cdot \left(x2 \cdot -12 + -1\right)\\
\mathbf{if}\;x1 \leq -1.2 \cdot 10^{+85}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;x1 \leq -1 \cdot 10^{-246} \lor \neg \left(x1 \leq 1.65 \cdot 10^{-230}\right):\\
\;\;\;\;x1 + \left(x2 \cdot -6 + x1 \cdot \left(4 \cdot \left(x2 \cdot \left(x2 \cdot 2 - 3\right)\right) - 2\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x2 \cdot -6 + t_0\\
\end{array}
\end{array}
if x1 < -1.19999999999999998e85Initial program 7.1%
Taylor expanded in x1 around 0 0.1%
Taylor expanded in x2 around 0 3.0%
Taylor expanded in x1 around 0 23.7%
+-commutative23.7%
neg-mul-123.7%
unsub-neg23.7%
*-commutative23.7%
Simplified23.7%
Taylor expanded in x1 around inf 23.7%
if -1.19999999999999998e85 < x1 < -9.99999999999999956e-247 or 1.64999999999999997e-230 < x1 Initial program 84.1%
Taylor expanded in x1 around 0 60.7%
Taylor expanded in x1 around 0 67.8%
if -9.99999999999999956e-247 < x1 < 1.64999999999999997e-230Initial program 99.5%
Taylor expanded in x1 around 0 99.5%
Taylor expanded in x2 around 0 91.6%
Taylor expanded in x1 around 0 91.6%
+-commutative91.6%
neg-mul-191.6%
unsub-neg91.6%
*-commutative91.6%
Simplified91.6%
Taylor expanded in x1 around 0 91.9%
Final simplification63.4%
(FPCore (x1 x2)
:precision binary64
(if (or (<= x2 -1.08e+21) (not (<= x2 2.6e+24)))
(+
x1
(+ (+ x1 (* 4.0 (* x2 (* x1 (- (* x2 2.0) 3.0))))) (* 3.0 (* x2 -2.0))))
(+ x1 (+ (* x2 (- (* x1 -12.0) 6.0)) (+ x1 (* x1 -3.0))))))
double code(double x1, double x2) {
double tmp;
if ((x2 <= -1.08e+21) || !(x2 <= 2.6e+24)) {
tmp = x1 + ((x1 + (4.0 * (x2 * (x1 * ((x2 * 2.0) - 3.0))))) + (3.0 * (x2 * -2.0)));
} else {
tmp = x1 + ((x2 * ((x1 * -12.0) - 6.0)) + (x1 + (x1 * -3.0)));
}
return tmp;
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
real(8) :: tmp
if ((x2 <= (-1.08d+21)) .or. (.not. (x2 <= 2.6d+24))) then
tmp = x1 + ((x1 + (4.0d0 * (x2 * (x1 * ((x2 * 2.0d0) - 3.0d0))))) + (3.0d0 * (x2 * (-2.0d0))))
else
tmp = x1 + ((x2 * ((x1 * (-12.0d0)) - 6.0d0)) + (x1 + (x1 * (-3.0d0))))
end if
code = tmp
end function
public static double code(double x1, double x2) {
double tmp;
if ((x2 <= -1.08e+21) || !(x2 <= 2.6e+24)) {
tmp = x1 + ((x1 + (4.0 * (x2 * (x1 * ((x2 * 2.0) - 3.0))))) + (3.0 * (x2 * -2.0)));
} else {
tmp = x1 + ((x2 * ((x1 * -12.0) - 6.0)) + (x1 + (x1 * -3.0)));
}
return tmp;
}
def code(x1, x2): tmp = 0 if (x2 <= -1.08e+21) or not (x2 <= 2.6e+24): tmp = x1 + ((x1 + (4.0 * (x2 * (x1 * ((x2 * 2.0) - 3.0))))) + (3.0 * (x2 * -2.0))) else: tmp = x1 + ((x2 * ((x1 * -12.0) - 6.0)) + (x1 + (x1 * -3.0))) return tmp
function code(x1, x2) tmp = 0.0 if ((x2 <= -1.08e+21) || !(x2 <= 2.6e+24)) tmp = Float64(x1 + Float64(Float64(x1 + Float64(4.0 * Float64(x2 * Float64(x1 * Float64(Float64(x2 * 2.0) - 3.0))))) + Float64(3.0 * Float64(x2 * -2.0)))); else tmp = Float64(x1 + Float64(Float64(x2 * Float64(Float64(x1 * -12.0) - 6.0)) + Float64(x1 + Float64(x1 * -3.0)))); end return tmp end
function tmp_2 = code(x1, x2) tmp = 0.0; if ((x2 <= -1.08e+21) || ~((x2 <= 2.6e+24))) tmp = x1 + ((x1 + (4.0 * (x2 * (x1 * ((x2 * 2.0) - 3.0))))) + (3.0 * (x2 * -2.0))); else tmp = x1 + ((x2 * ((x1 * -12.0) - 6.0)) + (x1 + (x1 * -3.0))); end tmp_2 = tmp; end
code[x1_, x2_] := If[Or[LessEqual[x2, -1.08e+21], N[Not[LessEqual[x2, 2.6e+24]], $MachinePrecision]], N[(x1 + N[(N[(x1 + N[(4.0 * N[(x2 * N[(x1 * N[(N[(x2 * 2.0), $MachinePrecision] - 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(3.0 * N[(x2 * -2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x1 + N[(N[(x2 * N[(N[(x1 * -12.0), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision] + N[(x1 + N[(x1 * -3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x2 \leq -1.08 \cdot 10^{+21} \lor \neg \left(x2 \leq 2.6 \cdot 10^{+24}\right):\\
\;\;\;\;x1 + \left(\left(x1 + 4 \cdot \left(x2 \cdot \left(x1 \cdot \left(x2 \cdot 2 - 3\right)\right)\right)\right) + 3 \cdot \left(x2 \cdot -2\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x1 + \left(x2 \cdot \left(x1 \cdot -12 - 6\right) + \left(x1 + x1 \cdot -3\right)\right)\\
\end{array}
\end{array}
if x2 < -1.08e21 or 2.5999999999999998e24 < x2 Initial program 72.7%
Taylor expanded in x1 around 0 58.5%
Taylor expanded in x1 around 0 73.3%
*-commutative73.3%
Simplified73.3%
if -1.08e21 < x2 < 2.5999999999999998e24Initial program 73.9%
Taylor expanded in x1 around 0 52.4%
Taylor expanded in x2 around 0 52.4%
Taylor expanded in x1 around 0 53.6%
+-commutative53.6%
neg-mul-153.6%
unsub-neg53.6%
*-commutative53.6%
Simplified53.6%
Taylor expanded in x2 around 0 54.4%
Final simplification63.4%
(FPCore (x1 x2)
:precision binary64
(if (<= x1 -1.9e+84)
(* x1 (+ (* x2 -12.0) -1.0))
(+
x1
(+
(* 3.0 (- (* x2 -2.0) x1))
(+ x1 (* 4.0 (* x2 (* x1 (- (* x2 2.0) 3.0)))))))))
double code(double x1, double x2) {
double tmp;
if (x1 <= -1.9e+84) {
tmp = x1 * ((x2 * -12.0) + -1.0);
} else {
tmp = x1 + ((3.0 * ((x2 * -2.0) - x1)) + (x1 + (4.0 * (x2 * (x1 * ((x2 * 2.0) - 3.0))))));
}
return tmp;
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
real(8) :: tmp
if (x1 <= (-1.9d+84)) then
tmp = x1 * ((x2 * (-12.0d0)) + (-1.0d0))
else
tmp = x1 + ((3.0d0 * ((x2 * (-2.0d0)) - x1)) + (x1 + (4.0d0 * (x2 * (x1 * ((x2 * 2.0d0) - 3.0d0))))))
end if
code = tmp
end function
public static double code(double x1, double x2) {
double tmp;
if (x1 <= -1.9e+84) {
tmp = x1 * ((x2 * -12.0) + -1.0);
} else {
tmp = x1 + ((3.0 * ((x2 * -2.0) - x1)) + (x1 + (4.0 * (x2 * (x1 * ((x2 * 2.0) - 3.0))))));
}
return tmp;
}
def code(x1, x2): tmp = 0 if x1 <= -1.9e+84: tmp = x1 * ((x2 * -12.0) + -1.0) else: tmp = x1 + ((3.0 * ((x2 * -2.0) - x1)) + (x1 + (4.0 * (x2 * (x1 * ((x2 * 2.0) - 3.0)))))) return tmp
function code(x1, x2) tmp = 0.0 if (x1 <= -1.9e+84) tmp = Float64(x1 * Float64(Float64(x2 * -12.0) + -1.0)); else tmp = Float64(x1 + Float64(Float64(3.0 * Float64(Float64(x2 * -2.0) - x1)) + Float64(x1 + Float64(4.0 * Float64(x2 * Float64(x1 * Float64(Float64(x2 * 2.0) - 3.0))))))); end return tmp end
function tmp_2 = code(x1, x2) tmp = 0.0; if (x1 <= -1.9e+84) tmp = x1 * ((x2 * -12.0) + -1.0); else tmp = x1 + ((3.0 * ((x2 * -2.0) - x1)) + (x1 + (4.0 * (x2 * (x1 * ((x2 * 2.0) - 3.0)))))); end tmp_2 = tmp; end
code[x1_, x2_] := If[LessEqual[x1, -1.9e+84], N[(x1 * N[(N[(x2 * -12.0), $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision], 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[(x2 * 2.0), $MachinePrecision] - 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x1 \leq -1.9 \cdot 10^{+84}:\\
\;\;\;\;x1 \cdot \left(x2 \cdot -12 + -1\right)\\
\mathbf{else}:\\
\;\;\;\;x1 + \left(3 \cdot \left(x2 \cdot -2 - x1\right) + \left(x1 + 4 \cdot \left(x2 \cdot \left(x1 \cdot \left(x2 \cdot 2 - 3\right)\right)\right)\right)\right)\\
\end{array}
\end{array}
if x1 < -1.9e84Initial program 7.1%
Taylor expanded in x1 around 0 0.1%
Taylor expanded in x2 around 0 3.0%
Taylor expanded in x1 around 0 23.7%
+-commutative23.7%
neg-mul-123.7%
unsub-neg23.7%
*-commutative23.7%
Simplified23.7%
Taylor expanded in x1 around inf 23.7%
if -1.9e84 < x1 Initial program 86.3%
Taylor expanded in x1 around 0 66.1%
Taylor expanded in x1 around 0 74.2%
+-commutative49.1%
neg-mul-149.1%
unsub-neg49.1%
*-commutative49.1%
Simplified74.2%
Final simplification65.9%
(FPCore (x1 x2) :precision binary64 (if (or (<= x2 -1.78e+75) (not (<= x2 7.2e+202))) (+ x1 (* x2 (* x2 (* x1 8.0)))) (+ x1 (+ (* x2 (- (* x1 -12.0) 6.0)) (+ x1 (* x1 -3.0))))))
double code(double x1, double x2) {
double tmp;
if ((x2 <= -1.78e+75) || !(x2 <= 7.2e+202)) {
tmp = x1 + (x2 * (x2 * (x1 * 8.0)));
} else {
tmp = x1 + ((x2 * ((x1 * -12.0) - 6.0)) + (x1 + (x1 * -3.0)));
}
return tmp;
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
real(8) :: tmp
if ((x2 <= (-1.78d+75)) .or. (.not. (x2 <= 7.2d+202))) then
tmp = x1 + (x2 * (x2 * (x1 * 8.0d0)))
else
tmp = x1 + ((x2 * ((x1 * (-12.0d0)) - 6.0d0)) + (x1 + (x1 * (-3.0d0))))
end if
code = tmp
end function
public static double code(double x1, double x2) {
double tmp;
if ((x2 <= -1.78e+75) || !(x2 <= 7.2e+202)) {
tmp = x1 + (x2 * (x2 * (x1 * 8.0)));
} else {
tmp = x1 + ((x2 * ((x1 * -12.0) - 6.0)) + (x1 + (x1 * -3.0)));
}
return tmp;
}
def code(x1, x2): tmp = 0 if (x2 <= -1.78e+75) or not (x2 <= 7.2e+202): tmp = x1 + (x2 * (x2 * (x1 * 8.0))) else: tmp = x1 + ((x2 * ((x1 * -12.0) - 6.0)) + (x1 + (x1 * -3.0))) return tmp
function code(x1, x2) tmp = 0.0 if ((x2 <= -1.78e+75) || !(x2 <= 7.2e+202)) tmp = Float64(x1 + Float64(x2 * Float64(x2 * Float64(x1 * 8.0)))); else tmp = Float64(x1 + Float64(Float64(x2 * Float64(Float64(x1 * -12.0) - 6.0)) + Float64(x1 + Float64(x1 * -3.0)))); end return tmp end
function tmp_2 = code(x1, x2) tmp = 0.0; if ((x2 <= -1.78e+75) || ~((x2 <= 7.2e+202))) tmp = x1 + (x2 * (x2 * (x1 * 8.0))); else tmp = x1 + ((x2 * ((x1 * -12.0) - 6.0)) + (x1 + (x1 * -3.0))); end tmp_2 = tmp; end
code[x1_, x2_] := If[Or[LessEqual[x2, -1.78e+75], N[Not[LessEqual[x2, 7.2e+202]], $MachinePrecision]], N[(x1 + N[(x2 * N[(x2 * N[(x1 * 8.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x1 + N[(N[(x2 * N[(N[(x1 * -12.0), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision] + N[(x1 + N[(x1 * -3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x2 \leq -1.78 \cdot 10^{+75} \lor \neg \left(x2 \leq 7.2 \cdot 10^{+202}\right):\\
\;\;\;\;x1 + x2 \cdot \left(x2 \cdot \left(x1 \cdot 8\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x1 + \left(x2 \cdot \left(x1 \cdot -12 - 6\right) + \left(x1 + x1 \cdot -3\right)\right)\\
\end{array}
\end{array}
if x2 < -1.78e75 or 7.20000000000000016e202 < x2 Initial program 74.4%
Taylor expanded in x1 around 0 69.7%
Taylor expanded in x2 around inf 67.4%
*-commutative67.4%
associate-*r*67.4%
unpow267.4%
associate-*r*73.9%
*-commutative73.9%
Simplified73.9%
if -1.78e75 < x2 < 7.20000000000000016e202Initial program 72.9%
Taylor expanded in x1 around 0 50.2%
Taylor expanded in x2 around 0 47.6%
Taylor expanded in x1 around 0 50.8%
+-commutative50.8%
neg-mul-150.8%
unsub-neg50.8%
*-commutative50.8%
Simplified50.8%
Taylor expanded in x2 around 0 51.3%
Final simplification57.2%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (+ x1 (* 8.0 (* x1 (* x2 x2))))))
(if (<= x2 -4.8e+74)
t_0
(if (<= x2 -5.8e-134)
(* x2 -6.0)
(if (<= x2 4.2e-172)
(* x1 (+ (* x2 -12.0) -1.0))
(if (<= x2 3e+199) (+ x1 (* x2 (- (* x1 -12.0) 6.0))) t_0))))))
double code(double x1, double x2) {
double t_0 = x1 + (8.0 * (x1 * (x2 * x2)));
double tmp;
if (x2 <= -4.8e+74) {
tmp = t_0;
} else if (x2 <= -5.8e-134) {
tmp = x2 * -6.0;
} else if (x2 <= 4.2e-172) {
tmp = x1 * ((x2 * -12.0) + -1.0);
} else if (x2 <= 3e+199) {
tmp = x1 + (x2 * ((x1 * -12.0) - 6.0));
} else {
tmp = t_0;
}
return tmp;
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
real(8) :: t_0
real(8) :: tmp
t_0 = x1 + (8.0d0 * (x1 * (x2 * x2)))
if (x2 <= (-4.8d+74)) then
tmp = t_0
else if (x2 <= (-5.8d-134)) then
tmp = x2 * (-6.0d0)
else if (x2 <= 4.2d-172) then
tmp = x1 * ((x2 * (-12.0d0)) + (-1.0d0))
else if (x2 <= 3d+199) then
tmp = x1 + (x2 * ((x1 * (-12.0d0)) - 6.0d0))
else
tmp = t_0
end if
code = tmp
end function
public static double code(double x1, double x2) {
double t_0 = x1 + (8.0 * (x1 * (x2 * x2)));
double tmp;
if (x2 <= -4.8e+74) {
tmp = t_0;
} else if (x2 <= -5.8e-134) {
tmp = x2 * -6.0;
} else if (x2 <= 4.2e-172) {
tmp = x1 * ((x2 * -12.0) + -1.0);
} else if (x2 <= 3e+199) {
tmp = x1 + (x2 * ((x1 * -12.0) - 6.0));
} else {
tmp = t_0;
}
return tmp;
}
def code(x1, x2): t_0 = x1 + (8.0 * (x1 * (x2 * x2))) tmp = 0 if x2 <= -4.8e+74: tmp = t_0 elif x2 <= -5.8e-134: tmp = x2 * -6.0 elif x2 <= 4.2e-172: tmp = x1 * ((x2 * -12.0) + -1.0) elif x2 <= 3e+199: tmp = x1 + (x2 * ((x1 * -12.0) - 6.0)) else: tmp = t_0 return tmp
function code(x1, x2) t_0 = Float64(x1 + Float64(8.0 * Float64(x1 * Float64(x2 * x2)))) tmp = 0.0 if (x2 <= -4.8e+74) tmp = t_0; elseif (x2 <= -5.8e-134) tmp = Float64(x2 * -6.0); elseif (x2 <= 4.2e-172) tmp = Float64(x1 * Float64(Float64(x2 * -12.0) + -1.0)); elseif (x2 <= 3e+199) tmp = Float64(x1 + Float64(x2 * Float64(Float64(x1 * -12.0) - 6.0))); else tmp = t_0; end return tmp end
function tmp_2 = code(x1, x2) t_0 = x1 + (8.0 * (x1 * (x2 * x2))); tmp = 0.0; if (x2 <= -4.8e+74) tmp = t_0; elseif (x2 <= -5.8e-134) tmp = x2 * -6.0; elseif (x2 <= 4.2e-172) tmp = x1 * ((x2 * -12.0) + -1.0); elseif (x2 <= 3e+199) tmp = x1 + (x2 * ((x1 * -12.0) - 6.0)); else tmp = t_0; end tmp_2 = tmp; end
code[x1_, x2_] := Block[{t$95$0 = N[(x1 + N[(8.0 * N[(x1 * N[(x2 * x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x2, -4.8e+74], t$95$0, If[LessEqual[x2, -5.8e-134], N[(x2 * -6.0), $MachinePrecision], If[LessEqual[x2, 4.2e-172], N[(x1 * N[(N[(x2 * -12.0), $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[x2, 3e+199], N[(x1 + N[(x2 * N[(N[(x1 * -12.0), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$0]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x1 + 8 \cdot \left(x1 \cdot \left(x2 \cdot x2\right)\right)\\
\mathbf{if}\;x2 \leq -4.8 \cdot 10^{+74}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;x2 \leq -5.8 \cdot 10^{-134}:\\
\;\;\;\;x2 \cdot -6\\
\mathbf{elif}\;x2 \leq 4.2 \cdot 10^{-172}:\\
\;\;\;\;x1 \cdot \left(x2 \cdot -12 + -1\right)\\
\mathbf{elif}\;x2 \leq 3 \cdot 10^{+199}:\\
\;\;\;\;x1 + x2 \cdot \left(x1 \cdot -12 - 6\right)\\
\mathbf{else}:\\
\;\;\;\;t_0\\
\end{array}
\end{array}
if x2 < -4.80000000000000017e74 or 3.0000000000000001e199 < x2 Initial program 74.4%
Taylor expanded in x1 around 0 69.7%
Taylor expanded in x2 around inf 67.4%
*-commutative67.4%
*-commutative67.4%
unpow267.4%
Simplified67.4%
if -4.80000000000000017e74 < x2 < -5.79999999999999986e-134Initial program 82.8%
Taylor expanded in x1 around 0 58.8%
Taylor expanded in x1 around 0 49.1%
*-commutative49.1%
Simplified49.1%
Taylor expanded in x1 around 0 50.2%
*-commutative50.2%
Simplified50.2%
if -5.79999999999999986e-134 < x2 < 4.1999999999999999e-172Initial program 66.7%
Taylor expanded in x1 around 0 48.5%
Taylor expanded in x2 around 0 48.5%
Taylor expanded in x1 around 0 49.6%
+-commutative49.6%
neg-mul-149.6%
unsub-neg49.6%
*-commutative49.6%
Simplified49.6%
Taylor expanded in x1 around inf 43.3%
if 4.1999999999999999e-172 < x2 < 3.0000000000000001e199Initial program 73.7%
Taylor expanded in x1 around 0 47.9%
Taylor expanded in x2 around 0 43.4%
Taylor expanded in x1 around 0 49.5%
+-commutative49.5%
neg-mul-149.5%
unsub-neg49.5%
*-commutative49.5%
Simplified49.5%
Taylor expanded in x2 around inf 43.6%
Final simplification50.7%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (+ x1 (* x2 (* x2 (* x1 8.0))))))
(if (<= x2 -1.15e+70)
t_0
(if (<= x2 -5.3e-134)
(* x2 -6.0)
(if (<= x2 9.5e-172)
(* x1 (+ (* x2 -12.0) -1.0))
(if (<= x2 4e+198) (+ x1 (* x2 (- (* x1 -12.0) 6.0))) t_0))))))
double code(double x1, double x2) {
double t_0 = x1 + (x2 * (x2 * (x1 * 8.0)));
double tmp;
if (x2 <= -1.15e+70) {
tmp = t_0;
} else if (x2 <= -5.3e-134) {
tmp = x2 * -6.0;
} else if (x2 <= 9.5e-172) {
tmp = x1 * ((x2 * -12.0) + -1.0);
} else if (x2 <= 4e+198) {
tmp = x1 + (x2 * ((x1 * -12.0) - 6.0));
} else {
tmp = t_0;
}
return tmp;
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
real(8) :: t_0
real(8) :: tmp
t_0 = x1 + (x2 * (x2 * (x1 * 8.0d0)))
if (x2 <= (-1.15d+70)) then
tmp = t_0
else if (x2 <= (-5.3d-134)) then
tmp = x2 * (-6.0d0)
else if (x2 <= 9.5d-172) then
tmp = x1 * ((x2 * (-12.0d0)) + (-1.0d0))
else if (x2 <= 4d+198) then
tmp = x1 + (x2 * ((x1 * (-12.0d0)) - 6.0d0))
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 tmp;
if (x2 <= -1.15e+70) {
tmp = t_0;
} else if (x2 <= -5.3e-134) {
tmp = x2 * -6.0;
} else if (x2 <= 9.5e-172) {
tmp = x1 * ((x2 * -12.0) + -1.0);
} else if (x2 <= 4e+198) {
tmp = x1 + (x2 * ((x1 * -12.0) - 6.0));
} else {
tmp = t_0;
}
return tmp;
}
def code(x1, x2): t_0 = x1 + (x2 * (x2 * (x1 * 8.0))) tmp = 0 if x2 <= -1.15e+70: tmp = t_0 elif x2 <= -5.3e-134: tmp = x2 * -6.0 elif x2 <= 9.5e-172: tmp = x1 * ((x2 * -12.0) + -1.0) elif x2 <= 4e+198: tmp = x1 + (x2 * ((x1 * -12.0) - 6.0)) else: tmp = t_0 return tmp
function code(x1, x2) t_0 = Float64(x1 + Float64(x2 * Float64(x2 * Float64(x1 * 8.0)))) tmp = 0.0 if (x2 <= -1.15e+70) tmp = t_0; elseif (x2 <= -5.3e-134) tmp = Float64(x2 * -6.0); elseif (x2 <= 9.5e-172) tmp = Float64(x1 * Float64(Float64(x2 * -12.0) + -1.0)); elseif (x2 <= 4e+198) tmp = Float64(x1 + Float64(x2 * Float64(Float64(x1 * -12.0) - 6.0))); else tmp = t_0; end return tmp end
function tmp_2 = code(x1, x2) t_0 = x1 + (x2 * (x2 * (x1 * 8.0))); tmp = 0.0; if (x2 <= -1.15e+70) tmp = t_0; elseif (x2 <= -5.3e-134) tmp = x2 * -6.0; elseif (x2 <= 9.5e-172) tmp = x1 * ((x2 * -12.0) + -1.0); elseif (x2 <= 4e+198) tmp = x1 + (x2 * ((x1 * -12.0) - 6.0)); else tmp = t_0; end tmp_2 = tmp; end
code[x1_, x2_] := Block[{t$95$0 = N[(x1 + N[(x2 * N[(x2 * N[(x1 * 8.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x2, -1.15e+70], t$95$0, If[LessEqual[x2, -5.3e-134], N[(x2 * -6.0), $MachinePrecision], If[LessEqual[x2, 9.5e-172], N[(x1 * N[(N[(x2 * -12.0), $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[x2, 4e+198], N[(x1 + N[(x2 * N[(N[(x1 * -12.0), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$0]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x1 + x2 \cdot \left(x2 \cdot \left(x1 \cdot 8\right)\right)\\
\mathbf{if}\;x2 \leq -1.15 \cdot 10^{+70}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;x2 \leq -5.3 \cdot 10^{-134}:\\
\;\;\;\;x2 \cdot -6\\
\mathbf{elif}\;x2 \leq 9.5 \cdot 10^{-172}:\\
\;\;\;\;x1 \cdot \left(x2 \cdot -12 + -1\right)\\
\mathbf{elif}\;x2 \leq 4 \cdot 10^{+198}:\\
\;\;\;\;x1 + x2 \cdot \left(x1 \cdot -12 - 6\right)\\
\mathbf{else}:\\
\;\;\;\;t_0\\
\end{array}
\end{array}
if x2 < -1.14999999999999997e70 or 4.00000000000000007e198 < x2 Initial program 74.4%
Taylor expanded in x1 around 0 69.7%
Taylor expanded in x2 around inf 67.4%
*-commutative67.4%
associate-*r*67.4%
unpow267.4%
associate-*r*73.9%
*-commutative73.9%
Simplified73.9%
if -1.14999999999999997e70 < x2 < -5.30000000000000003e-134Initial program 82.8%
Taylor expanded in x1 around 0 58.8%
Taylor expanded in x1 around 0 49.1%
*-commutative49.1%
Simplified49.1%
Taylor expanded in x1 around 0 50.2%
*-commutative50.2%
Simplified50.2%
if -5.30000000000000003e-134 < x2 < 9.50000000000000053e-172Initial program 66.7%
Taylor expanded in x1 around 0 48.5%
Taylor expanded in x2 around 0 48.5%
Taylor expanded in x1 around 0 49.6%
+-commutative49.6%
neg-mul-149.6%
unsub-neg49.6%
*-commutative49.6%
Simplified49.6%
Taylor expanded in x1 around inf 43.3%
if 9.50000000000000053e-172 < x2 < 4.00000000000000007e198Initial program 73.7%
Taylor expanded in x1 around 0 47.9%
Taylor expanded in x2 around 0 43.4%
Taylor expanded in x1 around 0 49.5%
+-commutative49.5%
neg-mul-149.5%
unsub-neg49.5%
*-commutative49.5%
Simplified49.5%
Taylor expanded in x2 around inf 43.6%
Final simplification52.4%
(FPCore (x1 x2) :precision binary64 (if (or (<= x2 -2e+75) (not (<= x2 5.4e+200))) (+ x1 (* x2 (* x2 (* x1 8.0)))) (+ (* x2 -6.0) (* x1 (+ (* x2 -12.0) -1.0)))))
double code(double x1, double x2) {
double tmp;
if ((x2 <= -2e+75) || !(x2 <= 5.4e+200)) {
tmp = x1 + (x2 * (x2 * (x1 * 8.0)));
} else {
tmp = (x2 * -6.0) + (x1 * ((x2 * -12.0) + -1.0));
}
return tmp;
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
real(8) :: tmp
if ((x2 <= (-2d+75)) .or. (.not. (x2 <= 5.4d+200))) then
tmp = x1 + (x2 * (x2 * (x1 * 8.0d0)))
else
tmp = (x2 * (-6.0d0)) + (x1 * ((x2 * (-12.0d0)) + (-1.0d0)))
end if
code = tmp
end function
public static double code(double x1, double x2) {
double tmp;
if ((x2 <= -2e+75) || !(x2 <= 5.4e+200)) {
tmp = x1 + (x2 * (x2 * (x1 * 8.0)));
} else {
tmp = (x2 * -6.0) + (x1 * ((x2 * -12.0) + -1.0));
}
return tmp;
}
def code(x1, x2): tmp = 0 if (x2 <= -2e+75) or not (x2 <= 5.4e+200): tmp = x1 + (x2 * (x2 * (x1 * 8.0))) else: tmp = (x2 * -6.0) + (x1 * ((x2 * -12.0) + -1.0)) return tmp
function code(x1, x2) tmp = 0.0 if ((x2 <= -2e+75) || !(x2 <= 5.4e+200)) tmp = Float64(x1 + Float64(x2 * Float64(x2 * Float64(x1 * 8.0)))); else tmp = Float64(Float64(x2 * -6.0) + Float64(x1 * Float64(Float64(x2 * -12.0) + -1.0))); end return tmp end
function tmp_2 = code(x1, x2) tmp = 0.0; if ((x2 <= -2e+75) || ~((x2 <= 5.4e+200))) tmp = x1 + (x2 * (x2 * (x1 * 8.0))); else tmp = (x2 * -6.0) + (x1 * ((x2 * -12.0) + -1.0)); end tmp_2 = tmp; end
code[x1_, x2_] := If[Or[LessEqual[x2, -2e+75], N[Not[LessEqual[x2, 5.4e+200]], $MachinePrecision]], N[(x1 + N[(x2 * N[(x2 * N[(x1 * 8.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x2 * -6.0), $MachinePrecision] + N[(x1 * N[(N[(x2 * -12.0), $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x2 \leq -2 \cdot 10^{+75} \lor \neg \left(x2 \leq 5.4 \cdot 10^{+200}\right):\\
\;\;\;\;x1 + x2 \cdot \left(x2 \cdot \left(x1 \cdot 8\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x2 \cdot -6 + x1 \cdot \left(x2 \cdot -12 + -1\right)\\
\end{array}
\end{array}
if x2 < -1.99999999999999985e75 or 5.40000000000000031e200 < x2 Initial program 74.4%
Taylor expanded in x1 around 0 69.7%
Taylor expanded in x2 around inf 67.4%
*-commutative67.4%
associate-*r*67.4%
unpow267.4%
associate-*r*73.9%
*-commutative73.9%
Simplified73.9%
if -1.99999999999999985e75 < x2 < 5.40000000000000031e200Initial program 72.9%
Taylor expanded in x1 around 0 50.2%
Taylor expanded in x2 around 0 47.6%
Taylor expanded in x1 around 0 50.8%
+-commutative50.8%
neg-mul-150.8%
unsub-neg50.8%
*-commutative50.8%
Simplified50.8%
Taylor expanded in x1 around 0 51.1%
Final simplification57.1%
(FPCore (x1 x2) :precision binary64 (if (or (<= x2 -5.5e-134) (not (<= x2 3.8e-172))) (+ x1 (* x2 (- (* x1 -12.0) 6.0))) (* x1 (+ (* x2 -12.0) -1.0))))
double code(double x1, double x2) {
double tmp;
if ((x2 <= -5.5e-134) || !(x2 <= 3.8e-172)) {
tmp = x1 + (x2 * ((x1 * -12.0) - 6.0));
} else {
tmp = x1 * ((x2 * -12.0) + -1.0);
}
return tmp;
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
real(8) :: tmp
if ((x2 <= (-5.5d-134)) .or. (.not. (x2 <= 3.8d-172))) then
tmp = x1 + (x2 * ((x1 * (-12.0d0)) - 6.0d0))
else
tmp = x1 * ((x2 * (-12.0d0)) + (-1.0d0))
end if
code = tmp
end function
public static double code(double x1, double x2) {
double tmp;
if ((x2 <= -5.5e-134) || !(x2 <= 3.8e-172)) {
tmp = x1 + (x2 * ((x1 * -12.0) - 6.0));
} else {
tmp = x1 * ((x2 * -12.0) + -1.0);
}
return tmp;
}
def code(x1, x2): tmp = 0 if (x2 <= -5.5e-134) or not (x2 <= 3.8e-172): tmp = x1 + (x2 * ((x1 * -12.0) - 6.0)) else: tmp = x1 * ((x2 * -12.0) + -1.0) return tmp
function code(x1, x2) tmp = 0.0 if ((x2 <= -5.5e-134) || !(x2 <= 3.8e-172)) tmp = Float64(x1 + Float64(x2 * Float64(Float64(x1 * -12.0) - 6.0))); else tmp = Float64(x1 * Float64(Float64(x2 * -12.0) + -1.0)); end return tmp end
function tmp_2 = code(x1, x2) tmp = 0.0; if ((x2 <= -5.5e-134) || ~((x2 <= 3.8e-172))) tmp = x1 + (x2 * ((x1 * -12.0) - 6.0)); else tmp = x1 * ((x2 * -12.0) + -1.0); end tmp_2 = tmp; end
code[x1_, x2_] := If[Or[LessEqual[x2, -5.5e-134], N[Not[LessEqual[x2, 3.8e-172]], $MachinePrecision]], N[(x1 + N[(x2 * N[(N[(x1 * -12.0), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x1 * N[(N[(x2 * -12.0), $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x2 \leq -5.5 \cdot 10^{-134} \lor \neg \left(x2 \leq 3.8 \cdot 10^{-172}\right):\\
\;\;\;\;x1 + x2 \cdot \left(x1 \cdot -12 - 6\right)\\
\mathbf{else}:\\
\;\;\;\;x1 \cdot \left(x2 \cdot -12 + -1\right)\\
\end{array}
\end{array}
if x2 < -5.5000000000000002e-134 or 3.79999999999999987e-172 < x2 Initial program 75.7%
Taylor expanded in x1 around 0 57.8%
Taylor expanded in x2 around 0 37.3%
Taylor expanded in x1 around 0 43.2%
+-commutative43.2%
neg-mul-143.2%
unsub-neg43.2%
*-commutative43.2%
Simplified43.2%
Taylor expanded in x2 around inf 39.3%
if -5.5000000000000002e-134 < x2 < 3.79999999999999987e-172Initial program 66.7%
Taylor expanded in x1 around 0 48.5%
Taylor expanded in x2 around 0 48.5%
Taylor expanded in x1 around 0 49.6%
+-commutative49.6%
neg-mul-149.6%
unsub-neg49.6%
*-commutative49.6%
Simplified49.6%
Taylor expanded in x1 around inf 43.3%
Final simplification40.3%
(FPCore (x1 x2) :precision binary64 (if (or (<= x1 -2.55e-138) (not (<= x1 8.4e-70))) (* x1 (+ (* x2 -12.0) -1.0)) (* x2 -6.0)))
double code(double x1, double x2) {
double tmp;
if ((x1 <= -2.55e-138) || !(x1 <= 8.4e-70)) {
tmp = x1 * ((x2 * -12.0) + -1.0);
} else {
tmp = x2 * -6.0;
}
return tmp;
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
real(8) :: tmp
if ((x1 <= (-2.55d-138)) .or. (.not. (x1 <= 8.4d-70))) then
tmp = x1 * ((x2 * (-12.0d0)) + (-1.0d0))
else
tmp = x2 * (-6.0d0)
end if
code = tmp
end function
public static double code(double x1, double x2) {
double tmp;
if ((x1 <= -2.55e-138) || !(x1 <= 8.4e-70)) {
tmp = x1 * ((x2 * -12.0) + -1.0);
} else {
tmp = x2 * -6.0;
}
return tmp;
}
def code(x1, x2): tmp = 0 if (x1 <= -2.55e-138) or not (x1 <= 8.4e-70): tmp = x1 * ((x2 * -12.0) + -1.0) else: tmp = x2 * -6.0 return tmp
function code(x1, x2) tmp = 0.0 if ((x1 <= -2.55e-138) || !(x1 <= 8.4e-70)) tmp = Float64(x1 * Float64(Float64(x2 * -12.0) + -1.0)); else tmp = Float64(x2 * -6.0); end return tmp end
function tmp_2 = code(x1, x2) tmp = 0.0; if ((x1 <= -2.55e-138) || ~((x1 <= 8.4e-70))) tmp = x1 * ((x2 * -12.0) + -1.0); else tmp = x2 * -6.0; end tmp_2 = tmp; end
code[x1_, x2_] := If[Or[LessEqual[x1, -2.55e-138], N[Not[LessEqual[x1, 8.4e-70]], $MachinePrecision]], N[(x1 * N[(N[(x2 * -12.0), $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision], N[(x2 * -6.0), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x1 \leq -2.55 \cdot 10^{-138} \lor \neg \left(x1 \leq 8.4 \cdot 10^{-70}\right):\\
\;\;\;\;x1 \cdot \left(x2 \cdot -12 + -1\right)\\
\mathbf{else}:\\
\;\;\;\;x2 \cdot -6\\
\end{array}
\end{array}
if x1 < -2.5500000000000001e-138 or 8.4000000000000004e-70 < x1 Initial program 61.7%
Taylor expanded in x1 around 0 35.6%
Taylor expanded in x2 around 0 20.0%
Taylor expanded in x1 around 0 26.8%
+-commutative26.8%
neg-mul-126.8%
unsub-neg26.8%
*-commutative26.8%
Simplified26.8%
Taylor expanded in x1 around inf 23.0%
if -2.5500000000000001e-138 < x1 < 8.4000000000000004e-70Initial program 99.4%
Taylor expanded in x1 around 0 99.4%
Taylor expanded in x1 around 0 67.0%
*-commutative67.0%
Simplified67.0%
Taylor expanded in x1 around 0 67.5%
*-commutative67.5%
Simplified67.5%
Final simplification36.7%
(FPCore (x1 x2) :precision binary64 (if (<= x2 -7.6e-134) (* x2 -6.0) (if (<= x2 2.5e-171) (- x1) (+ x1 (* x2 -6.0)))))
double code(double x1, double x2) {
double tmp;
if (x2 <= -7.6e-134) {
tmp = x2 * -6.0;
} else if (x2 <= 2.5e-171) {
tmp = -x1;
} else {
tmp = x1 + (x2 * -6.0);
}
return tmp;
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
real(8) :: tmp
if (x2 <= (-7.6d-134)) then
tmp = x2 * (-6.0d0)
else if (x2 <= 2.5d-171) then
tmp = -x1
else
tmp = x1 + (x2 * (-6.0d0))
end if
code = tmp
end function
public static double code(double x1, double x2) {
double tmp;
if (x2 <= -7.6e-134) {
tmp = x2 * -6.0;
} else if (x2 <= 2.5e-171) {
tmp = -x1;
} else {
tmp = x1 + (x2 * -6.0);
}
return tmp;
}
def code(x1, x2): tmp = 0 if x2 <= -7.6e-134: tmp = x2 * -6.0 elif x2 <= 2.5e-171: tmp = -x1 else: tmp = x1 + (x2 * -6.0) return tmp
function code(x1, x2) tmp = 0.0 if (x2 <= -7.6e-134) tmp = Float64(x2 * -6.0); elseif (x2 <= 2.5e-171) tmp = Float64(-x1); else tmp = Float64(x1 + Float64(x2 * -6.0)); end return tmp end
function tmp_2 = code(x1, x2) tmp = 0.0; if (x2 <= -7.6e-134) tmp = x2 * -6.0; elseif (x2 <= 2.5e-171) tmp = -x1; else tmp = x1 + (x2 * -6.0); end tmp_2 = tmp; end
code[x1_, x2_] := If[LessEqual[x2, -7.6e-134], N[(x2 * -6.0), $MachinePrecision], If[LessEqual[x2, 2.5e-171], (-x1), N[(x1 + N[(x2 * -6.0), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x2 \leq -7.6 \cdot 10^{-134}:\\
\;\;\;\;x2 \cdot -6\\
\mathbf{elif}\;x2 \leq 2.5 \cdot 10^{-171}:\\
\;\;\;\;-x1\\
\mathbf{else}:\\
\;\;\;\;x1 + x2 \cdot -6\\
\end{array}
\end{array}
if x2 < -7.60000000000000006e-134Initial program 83.3%
Taylor expanded in x1 around 0 67.4%
Taylor expanded in x1 around 0 35.6%
*-commutative35.6%
Simplified35.6%
Taylor expanded in x1 around 0 36.1%
*-commutative36.1%
Simplified36.1%
if -7.60000000000000006e-134 < x2 < 2.49999999999999996e-171Initial program 66.7%
Taylor expanded in x1 around 0 48.5%
Taylor expanded in x2 around 0 48.5%
Taylor expanded in x1 around 0 49.6%
+-commutative49.6%
neg-mul-149.6%
unsub-neg49.6%
*-commutative49.6%
Simplified49.6%
Taylor expanded in x2 around 0 42.8%
distribute-rgt-out43.3%
metadata-eval43.3%
*-commutative43.3%
neg-mul-143.3%
Simplified43.3%
if 2.49999999999999996e-171 < x2 Initial program 70.7%
Taylor expanded in x1 around 0 51.5%
Taylor expanded in x1 around 0 30.2%
*-commutative30.2%
Simplified30.2%
Final simplification35.4%
(FPCore (x1 x2) :precision binary64 (if (<= x2 -6.5e-134) (* x2 -6.0) (if (<= x2 2.7e-171) (- x1) (* x2 -6.0))))
double code(double x1, double x2) {
double tmp;
if (x2 <= -6.5e-134) {
tmp = x2 * -6.0;
} else if (x2 <= 2.7e-171) {
tmp = -x1;
} else {
tmp = x2 * -6.0;
}
return tmp;
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
real(8) :: tmp
if (x2 <= (-6.5d-134)) then
tmp = x2 * (-6.0d0)
else if (x2 <= 2.7d-171) then
tmp = -x1
else
tmp = x2 * (-6.0d0)
end if
code = tmp
end function
public static double code(double x1, double x2) {
double tmp;
if (x2 <= -6.5e-134) {
tmp = x2 * -6.0;
} else if (x2 <= 2.7e-171) {
tmp = -x1;
} else {
tmp = x2 * -6.0;
}
return tmp;
}
def code(x1, x2): tmp = 0 if x2 <= -6.5e-134: tmp = x2 * -6.0 elif x2 <= 2.7e-171: tmp = -x1 else: tmp = x2 * -6.0 return tmp
function code(x1, x2) tmp = 0.0 if (x2 <= -6.5e-134) tmp = Float64(x2 * -6.0); elseif (x2 <= 2.7e-171) tmp = Float64(-x1); else tmp = Float64(x2 * -6.0); end return tmp end
function tmp_2 = code(x1, x2) tmp = 0.0; if (x2 <= -6.5e-134) tmp = x2 * -6.0; elseif (x2 <= 2.7e-171) tmp = -x1; else tmp = x2 * -6.0; end tmp_2 = tmp; end
code[x1_, x2_] := If[LessEqual[x2, -6.5e-134], N[(x2 * -6.0), $MachinePrecision], If[LessEqual[x2, 2.7e-171], (-x1), N[(x2 * -6.0), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x2 \leq -6.5 \cdot 10^{-134}:\\
\;\;\;\;x2 \cdot -6\\
\mathbf{elif}\;x2 \leq 2.7 \cdot 10^{-171}:\\
\;\;\;\;-x1\\
\mathbf{else}:\\
\;\;\;\;x2 \cdot -6\\
\end{array}
\end{array}
if x2 < -6.4999999999999998e-134 or 2.70000000000000014e-171 < x2 Initial program 75.7%
Taylor expanded in x1 around 0 57.8%
Taylor expanded in x1 around 0 32.3%
*-commutative32.3%
Simplified32.3%
Taylor expanded in x1 around 0 32.0%
*-commutative32.0%
Simplified32.0%
if -6.4999999999999998e-134 < x2 < 2.70000000000000014e-171Initial program 66.7%
Taylor expanded in x1 around 0 48.5%
Taylor expanded in x2 around 0 48.5%
Taylor expanded in x1 around 0 49.6%
+-commutative49.6%
neg-mul-149.6%
unsub-neg49.6%
*-commutative49.6%
Simplified49.6%
Taylor expanded in x2 around 0 42.8%
distribute-rgt-out43.3%
metadata-eval43.3%
*-commutative43.3%
neg-mul-143.3%
Simplified43.3%
Final simplification35.0%
(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 73.3%
Taylor expanded in x1 around 0 55.3%
Taylor expanded in x2 around 0 40.3%
Taylor expanded in x1 around 0 44.9%
+-commutative44.9%
neg-mul-144.9%
unsub-neg44.9%
*-commutative44.9%
Simplified44.9%
Taylor expanded in x2 around 0 15.8%
distribute-rgt-out16.0%
metadata-eval16.0%
*-commutative16.0%
neg-mul-116.0%
Simplified16.0%
Final simplification16.0%
(FPCore (x1 x2) :precision binary64 x1)
double code(double x1, double x2) {
return x1;
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
code = x1
end function
public static double code(double x1, double x2) {
return x1;
}
def code(x1, x2): return x1
function code(x1, x2) return x1 end
function tmp = code(x1, x2) tmp = x1; end
code[x1_, x2_] := x1
\begin{array}{l}
\\
x1
\end{array}
Initial program 73.3%
Taylor expanded in x1 around 0 55.3%
Taylor expanded in x1 around 0 25.6%
*-commutative25.6%
Simplified25.6%
Taylor expanded in x1 around inf 3.2%
Final simplification3.2%
herbie shell --seed 2023194
(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))))))