
(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 24 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (* (* 3.0 x1) x1))
(t_1 (+ (* x1 x1) 1.0))
(t_2 (/ (- (+ t_0 (* 2.0 x2)) x1) t_1)))
(+
x1
(+
(+
(+
(+
(*
(+
(* (* (* 2.0 x1) t_2) (- t_2 3.0))
(* (* x1 x1) (- (* 4.0 t_2) 6.0)))
t_1)
(* t_0 t_2))
(* (* x1 x1) x1))
x1)
(* 3.0 (/ (- (- t_0 (* 2.0 x2)) x1) t_1))))))
double code(double x1, double x2) {
double t_0 = (3.0 * x1) * x1;
double t_1 = (x1 * x1) + 1.0;
double t_2 = ((t_0 + (2.0 * x2)) - x1) / t_1;
return x1 + (((((((((2.0 * x1) * t_2) * (t_2 - 3.0)) + ((x1 * x1) * ((4.0 * t_2) - 6.0))) * t_1) + (t_0 * t_2)) + ((x1 * x1) * x1)) + x1) + (3.0 * (((t_0 - (2.0 * x2)) - x1) / t_1)));
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
real(8) :: t_0
real(8) :: t_1
real(8) :: t_2
t_0 = (3.0d0 * x1) * x1
t_1 = (x1 * x1) + 1.0d0
t_2 = ((t_0 + (2.0d0 * x2)) - x1) / t_1
code = x1 + (((((((((2.0d0 * x1) * t_2) * (t_2 - 3.0d0)) + ((x1 * x1) * ((4.0d0 * t_2) - 6.0d0))) * t_1) + (t_0 * t_2)) + ((x1 * x1) * x1)) + x1) + (3.0d0 * (((t_0 - (2.0d0 * x2)) - x1) / t_1)))
end function
public static double code(double x1, double x2) {
double t_0 = (3.0 * x1) * x1;
double t_1 = (x1 * x1) + 1.0;
double t_2 = ((t_0 + (2.0 * x2)) - x1) / t_1;
return x1 + (((((((((2.0 * x1) * t_2) * (t_2 - 3.0)) + ((x1 * x1) * ((4.0 * t_2) - 6.0))) * t_1) + (t_0 * t_2)) + ((x1 * x1) * x1)) + x1) + (3.0 * (((t_0 - (2.0 * x2)) - x1) / t_1)));
}
def code(x1, x2): t_0 = (3.0 * x1) * x1 t_1 = (x1 * x1) + 1.0 t_2 = ((t_0 + (2.0 * x2)) - x1) / t_1 return x1 + (((((((((2.0 * x1) * t_2) * (t_2 - 3.0)) + ((x1 * x1) * ((4.0 * t_2) - 6.0))) * t_1) + (t_0 * t_2)) + ((x1 * x1) * x1)) + x1) + (3.0 * (((t_0 - (2.0 * x2)) - x1) / t_1)))
function code(x1, x2) t_0 = Float64(Float64(3.0 * x1) * x1) t_1 = Float64(Float64(x1 * x1) + 1.0) t_2 = Float64(Float64(Float64(t_0 + Float64(2.0 * x2)) - x1) / t_1) return Float64(x1 + Float64(Float64(Float64(Float64(Float64(Float64(Float64(Float64(Float64(2.0 * x1) * t_2) * Float64(t_2 - 3.0)) + Float64(Float64(x1 * x1) * Float64(Float64(4.0 * t_2) - 6.0))) * t_1) + Float64(t_0 * t_2)) + Float64(Float64(x1 * x1) * x1)) + x1) + Float64(3.0 * Float64(Float64(Float64(t_0 - Float64(2.0 * x2)) - x1) / t_1)))) end
function tmp = code(x1, x2) t_0 = (3.0 * x1) * x1; t_1 = (x1 * x1) + 1.0; t_2 = ((t_0 + (2.0 * x2)) - x1) / t_1; tmp = x1 + (((((((((2.0 * x1) * t_2) * (t_2 - 3.0)) + ((x1 * x1) * ((4.0 * t_2) - 6.0))) * t_1) + (t_0 * t_2)) + ((x1 * x1) * x1)) + x1) + (3.0 * (((t_0 - (2.0 * x2)) - x1) / t_1))); end
code[x1_, x2_] := Block[{t$95$0 = N[(N[(3.0 * x1), $MachinePrecision] * x1), $MachinePrecision]}, Block[{t$95$1 = N[(N[(x1 * x1), $MachinePrecision] + 1.0), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[(t$95$0 + N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$1), $MachinePrecision]}, N[(x1 + N[(N[(N[(N[(N[(N[(N[(N[(N[(2.0 * x1), $MachinePrecision] * t$95$2), $MachinePrecision] * N[(t$95$2 - 3.0), $MachinePrecision]), $MachinePrecision] + N[(N[(x1 * x1), $MachinePrecision] * N[(N[(4.0 * t$95$2), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * t$95$1), $MachinePrecision] + N[(t$95$0 * t$95$2), $MachinePrecision]), $MachinePrecision] + N[(N[(x1 * x1), $MachinePrecision] * x1), $MachinePrecision]), $MachinePrecision] + x1), $MachinePrecision] + N[(3.0 * N[(N[(N[(t$95$0 - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \left(3 \cdot x1\right) \cdot x1\\
t_1 := x1 \cdot x1 + 1\\
t_2 := \frac{\left(t_0 + 2 \cdot x2\right) - x1}{t_1}\\
x1 + \left(\left(\left(\left(\left(\left(\left(2 \cdot x1\right) \cdot t_2\right) \cdot \left(t_2 - 3\right) + \left(x1 \cdot x1\right) \cdot \left(4 \cdot t_2 - 6\right)\right) \cdot t_1 + t_0 \cdot t_2\right) + \left(x1 \cdot x1\right) \cdot x1\right) + x1\right) + 3 \cdot \frac{\left(t_0 - 2 \cdot x2\right) - x1}{t_1}\right)
\end{array}
\end{array}
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (fma x1 (* x1 3.0) (fma 2.0 x2 (- x1)))))
(if (<= x1 -1e+156)
(+ x1 (+ (+ x1 (* -4.0 (pow x1 5.0))) (* 3.0 (* x2 -2.0))))
(if (<= x1 2e+123)
(+
x1
(fma
3.0
(/ (- (* x1 (* x1 3.0)) (fma 2.0 x2 x1)) (fma x1 x1 1.0))
(fma
x1
(* x1 (/ t_0 (/ (fma x1 x1 1.0) 3.0)))
(*
(fma x1 x1 1.0)
(+
x1
(+
(* x1 (* x1 -6.0))
(*
(/ t_0 (fma x1 x1 1.0))
(+
(* x1 (+ -6.0 (/ t_0 (/ (fma x1 x1 1.0) 2.0))))
(* (* x1 x1) 4.0)))))))))
(+ x1 (+ x1 (* 3.0 (- (* (* x1 x1) (+ x1 3.0)) x1))))))))
double code(double x1, double x2) {
double t_0 = fma(x1, (x1 * 3.0), fma(2.0, x2, -x1));
double tmp;
if (x1 <= -1e+156) {
tmp = x1 + ((x1 + (-4.0 * pow(x1, 5.0))) + (3.0 * (x2 * -2.0)));
} else if (x1 <= 2e+123) {
tmp = x1 + fma(3.0, (((x1 * (x1 * 3.0)) - fma(2.0, x2, x1)) / fma(x1, x1, 1.0)), fma(x1, (x1 * (t_0 / (fma(x1, x1, 1.0) / 3.0))), (fma(x1, x1, 1.0) * (x1 + ((x1 * (x1 * -6.0)) + ((t_0 / fma(x1, x1, 1.0)) * ((x1 * (-6.0 + (t_0 / (fma(x1, x1, 1.0) / 2.0)))) + ((x1 * x1) * 4.0))))))));
} else {
tmp = x1 + (x1 + (3.0 * (((x1 * x1) * (x1 + 3.0)) - x1)));
}
return tmp;
}
function code(x1, x2) t_0 = fma(x1, Float64(x1 * 3.0), fma(2.0, x2, Float64(-x1))) tmp = 0.0 if (x1 <= -1e+156) tmp = Float64(x1 + Float64(Float64(x1 + Float64(-4.0 * (x1 ^ 5.0))) + Float64(3.0 * Float64(x2 * -2.0)))); elseif (x1 <= 2e+123) 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_0 / Float64(fma(x1, x1, 1.0) / 3.0))), Float64(fma(x1, x1, 1.0) * Float64(x1 + Float64(Float64(x1 * Float64(x1 * -6.0)) + Float64(Float64(t_0 / fma(x1, x1, 1.0)) * Float64(Float64(x1 * Float64(-6.0 + Float64(t_0 / Float64(fma(x1, x1, 1.0) / 2.0)))) + Float64(Float64(x1 * x1) * 4.0))))))))); else tmp = Float64(x1 + Float64(x1 + Float64(3.0 * Float64(Float64(Float64(x1 * x1) * Float64(x1 + 3.0)) - x1)))); end return tmp end
code[x1_, x2_] := Block[{t$95$0 = N[(x1 * N[(x1 * 3.0), $MachinePrecision] + N[(2.0 * x2 + (-x1)), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x1, -1e+156], N[(x1 + N[(N[(x1 + N[(-4.0 * N[Power[x1, 5.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(3.0 * N[(x2 * -2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 2e+123], 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$0 / N[(N[(x1 * x1 + 1.0), $MachinePrecision] / 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(x1 * x1 + 1.0), $MachinePrecision] * N[(x1 + N[(N[(x1 * N[(x1 * -6.0), $MachinePrecision]), $MachinePrecision] + N[(N[(t$95$0 / N[(x1 * x1 + 1.0), $MachinePrecision]), $MachinePrecision] * N[(N[(x1 * N[(-6.0 + N[(t$95$0 / N[(N[(x1 * x1 + 1.0), $MachinePrecision] / 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(x1 * x1), $MachinePrecision] * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x1 + N[(x1 + N[(3.0 * N[(N[(N[(x1 * x1), $MachinePrecision] * N[(x1 + 3.0), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \mathsf{fma}\left(x1, x1 \cdot 3, \mathsf{fma}\left(2, x2, -x1\right)\right)\\
\mathbf{if}\;x1 \leq -1 \cdot 10^{+156}:\\
\;\;\;\;x1 + \left(\left(x1 + -4 \cdot {x1}^{5}\right) + 3 \cdot \left(x2 \cdot -2\right)\right)\\
\mathbf{elif}\;x1 \leq 2 \cdot 10^{+123}:\\
\;\;\;\;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_0}{\frac{\mathsf{fma}\left(x1, x1, 1\right)}{3}}, \mathsf{fma}\left(x1, x1, 1\right) \cdot \left(x1 + \left(x1 \cdot \left(x1 \cdot -6\right) + \frac{t_0}{\mathsf{fma}\left(x1, x1, 1\right)} \cdot \left(x1 \cdot \left(-6 + \frac{t_0}{\frac{\mathsf{fma}\left(x1, x1, 1\right)}{2}}\right) + \left(x1 \cdot x1\right) \cdot 4\right)\right)\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x1 + \left(x1 + 3 \cdot \left(\left(x1 \cdot x1\right) \cdot \left(x1 + 3\right) - x1\right)\right)\\
\end{array}
\end{array}
if x1 < -9.9999999999999998e155Initial program 0.0%
Taylor expanded in x1 around 0 0.0%
+-commutative0.0%
neg-mul-10.0%
unsub-neg0.0%
*-commutative0.0%
Simplified0.0%
Taylor expanded in x1 around 0 0.0%
*-commutative0.0%
Simplified0.0%
Taylor expanded in x1 around inf 100.0%
if -9.9999999999999998e155 < x1 < 1.99999999999999996e123Initial program 91.8%
Simplified99.6%
if 1.99999999999999996e123 < x1 Initial program 11.6%
Taylor expanded in x1 around 0 5.0%
Taylor expanded in x1 around 0 83.7%
+-commutative83.7%
mul-1-neg83.7%
unsub-neg83.7%
*-commutative83.7%
fma-def83.7%
+-commutative83.7%
cube-mult83.7%
unpow283.7%
distribute-rgt-out97.7%
unpow297.7%
*-commutative97.7%
Simplified97.7%
Taylor expanded in x2 around 0 100.0%
unpow2100.0%
Simplified100.0%
Final simplification99.7%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (* x1 (* x1 x1)))
(t_1 (* x1 (* x1 3.0)))
(t_2 (+ 1.0 (* x1 x1)))
(t_3 (* 3.0 (/ (- (- t_1 (* x2 2.0)) x1) t_2)))
(t_4 (/ (- (+ t_1 (* x2 2.0)) x1) t_2))
(t_5 (* (* x1 2.0) t_4))
(t_6 (* t_1 t_4))
(t_7
(+
x1
(+
t_3
(+
x1
(+
t_0
(+
t_6
(*
t_2
(+
(* (* x1 x1) (- (* 4.0 t_4) 6.0))
(*
t_5
(+
(* 2.0 (/ x2 (* x1 x1)))
(- (/ -1.0 x1) (/ 3.0 (* x1 x1)))))))))))))
(t_8 (- (* x2 2.0) x1)))
(if (<= x1 -1e+103)
(+ x1 (+ (+ x1 (* -4.0 (pow x1 5.0))) (* 3.0 (* x2 -2.0))))
(if (<= x1 -1.4)
t_7
(if (<= x1 0.86)
(+
x1
(+
t_3
(+
x1
(+
t_0
(+
t_6
(*
t_2
(+ (* t_5 (- t_8 3.0)) (* (* x1 x1) (- (* 4.0 t_8) 6.0)))))))))
(if (<= x1 5.8e+82)
t_7
(+ x1 (* 3.0 (* x1 (* x1 (+ x1 (+ 3.0 (* x2 2.0)))))))))))))
double code(double x1, double x2) {
double t_0 = x1 * (x1 * x1);
double t_1 = x1 * (x1 * 3.0);
double t_2 = 1.0 + (x1 * x1);
double t_3 = 3.0 * (((t_1 - (x2 * 2.0)) - x1) / t_2);
double t_4 = ((t_1 + (x2 * 2.0)) - x1) / t_2;
double t_5 = (x1 * 2.0) * t_4;
double t_6 = t_1 * t_4;
double t_7 = x1 + (t_3 + (x1 + (t_0 + (t_6 + (t_2 * (((x1 * x1) * ((4.0 * t_4) - 6.0)) + (t_5 * ((2.0 * (x2 / (x1 * x1))) + ((-1.0 / x1) - (3.0 / (x1 * x1)))))))))));
double t_8 = (x2 * 2.0) - x1;
double tmp;
if (x1 <= -1e+103) {
tmp = x1 + ((x1 + (-4.0 * pow(x1, 5.0))) + (3.0 * (x2 * -2.0)));
} else if (x1 <= -1.4) {
tmp = t_7;
} else if (x1 <= 0.86) {
tmp = x1 + (t_3 + (x1 + (t_0 + (t_6 + (t_2 * ((t_5 * (t_8 - 3.0)) + ((x1 * x1) * ((4.0 * t_8) - 6.0))))))));
} else if (x1 <= 5.8e+82) {
tmp = t_7;
} else {
tmp = x1 + (3.0 * (x1 * (x1 * (x1 + (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) :: t_7
real(8) :: t_8
real(8) :: tmp
t_0 = x1 * (x1 * x1)
t_1 = x1 * (x1 * 3.0d0)
t_2 = 1.0d0 + (x1 * x1)
t_3 = 3.0d0 * (((t_1 - (x2 * 2.0d0)) - x1) / t_2)
t_4 = ((t_1 + (x2 * 2.0d0)) - x1) / t_2
t_5 = (x1 * 2.0d0) * t_4
t_6 = t_1 * t_4
t_7 = x1 + (t_3 + (x1 + (t_0 + (t_6 + (t_2 * (((x1 * x1) * ((4.0d0 * t_4) - 6.0d0)) + (t_5 * ((2.0d0 * (x2 / (x1 * x1))) + (((-1.0d0) / x1) - (3.0d0 / (x1 * x1)))))))))))
t_8 = (x2 * 2.0d0) - x1
if (x1 <= (-1d+103)) then
tmp = x1 + ((x1 + ((-4.0d0) * (x1 ** 5.0d0))) + (3.0d0 * (x2 * (-2.0d0))))
else if (x1 <= (-1.4d0)) then
tmp = t_7
else if (x1 <= 0.86d0) then
tmp = x1 + (t_3 + (x1 + (t_0 + (t_6 + (t_2 * ((t_5 * (t_8 - 3.0d0)) + ((x1 * x1) * ((4.0d0 * t_8) - 6.0d0))))))))
else if (x1 <= 5.8d+82) then
tmp = t_7
else
tmp = x1 + (3.0d0 * (x1 * (x1 * (x1 + (3.0d0 + (x2 * 2.0d0))))))
end if
code = tmp
end function
public static double code(double x1, double x2) {
double t_0 = x1 * (x1 * x1);
double t_1 = x1 * (x1 * 3.0);
double t_2 = 1.0 + (x1 * x1);
double t_3 = 3.0 * (((t_1 - (x2 * 2.0)) - x1) / t_2);
double t_4 = ((t_1 + (x2 * 2.0)) - x1) / t_2;
double t_5 = (x1 * 2.0) * t_4;
double t_6 = t_1 * t_4;
double t_7 = x1 + (t_3 + (x1 + (t_0 + (t_6 + (t_2 * (((x1 * x1) * ((4.0 * t_4) - 6.0)) + (t_5 * ((2.0 * (x2 / (x1 * x1))) + ((-1.0 / x1) - (3.0 / (x1 * x1)))))))))));
double t_8 = (x2 * 2.0) - x1;
double tmp;
if (x1 <= -1e+103) {
tmp = x1 + ((x1 + (-4.0 * Math.pow(x1, 5.0))) + (3.0 * (x2 * -2.0)));
} else if (x1 <= -1.4) {
tmp = t_7;
} else if (x1 <= 0.86) {
tmp = x1 + (t_3 + (x1 + (t_0 + (t_6 + (t_2 * ((t_5 * (t_8 - 3.0)) + ((x1 * x1) * ((4.0 * t_8) - 6.0))))))));
} else if (x1 <= 5.8e+82) {
tmp = t_7;
} else {
tmp = x1 + (3.0 * (x1 * (x1 * (x1 + (3.0 + (x2 * 2.0))))));
}
return tmp;
}
def code(x1, x2): t_0 = x1 * (x1 * x1) t_1 = x1 * (x1 * 3.0) t_2 = 1.0 + (x1 * x1) t_3 = 3.0 * (((t_1 - (x2 * 2.0)) - x1) / t_2) t_4 = ((t_1 + (x2 * 2.0)) - x1) / t_2 t_5 = (x1 * 2.0) * t_4 t_6 = t_1 * t_4 t_7 = x1 + (t_3 + (x1 + (t_0 + (t_6 + (t_2 * (((x1 * x1) * ((4.0 * t_4) - 6.0)) + (t_5 * ((2.0 * (x2 / (x1 * x1))) + ((-1.0 / x1) - (3.0 / (x1 * x1))))))))))) t_8 = (x2 * 2.0) - x1 tmp = 0 if x1 <= -1e+103: tmp = x1 + ((x1 + (-4.0 * math.pow(x1, 5.0))) + (3.0 * (x2 * -2.0))) elif x1 <= -1.4: tmp = t_7 elif x1 <= 0.86: tmp = x1 + (t_3 + (x1 + (t_0 + (t_6 + (t_2 * ((t_5 * (t_8 - 3.0)) + ((x1 * x1) * ((4.0 * t_8) - 6.0)))))))) elif x1 <= 5.8e+82: tmp = t_7 else: tmp = x1 + (3.0 * (x1 * (x1 * (x1 + (3.0 + (x2 * 2.0)))))) return tmp
function code(x1, x2) t_0 = Float64(x1 * Float64(x1 * x1)) t_1 = Float64(x1 * Float64(x1 * 3.0)) t_2 = Float64(1.0 + Float64(x1 * x1)) t_3 = Float64(3.0 * Float64(Float64(Float64(t_1 - Float64(x2 * 2.0)) - x1) / t_2)) t_4 = Float64(Float64(Float64(t_1 + Float64(x2 * 2.0)) - x1) / t_2) t_5 = Float64(Float64(x1 * 2.0) * t_4) t_6 = Float64(t_1 * t_4) t_7 = Float64(x1 + Float64(t_3 + Float64(x1 + Float64(t_0 + Float64(t_6 + Float64(t_2 * Float64(Float64(Float64(x1 * x1) * Float64(Float64(4.0 * t_4) - 6.0)) + Float64(t_5 * Float64(Float64(2.0 * Float64(x2 / Float64(x1 * x1))) + Float64(Float64(-1.0 / x1) - Float64(3.0 / Float64(x1 * x1)))))))))))) t_8 = Float64(Float64(x2 * 2.0) - x1) tmp = 0.0 if (x1 <= -1e+103) tmp = Float64(x1 + Float64(Float64(x1 + Float64(-4.0 * (x1 ^ 5.0))) + Float64(3.0 * Float64(x2 * -2.0)))); elseif (x1 <= -1.4) tmp = t_7; elseif (x1 <= 0.86) tmp = Float64(x1 + Float64(t_3 + Float64(x1 + Float64(t_0 + Float64(t_6 + Float64(t_2 * Float64(Float64(t_5 * Float64(t_8 - 3.0)) + Float64(Float64(x1 * x1) * Float64(Float64(4.0 * t_8) - 6.0))))))))); elseif (x1 <= 5.8e+82) tmp = t_7; else tmp = Float64(x1 + Float64(3.0 * Float64(x1 * Float64(x1 * Float64(x1 + Float64(3.0 + Float64(x2 * 2.0))))))); end return tmp end
function tmp_2 = code(x1, x2) t_0 = x1 * (x1 * x1); t_1 = x1 * (x1 * 3.0); t_2 = 1.0 + (x1 * x1); t_3 = 3.0 * (((t_1 - (x2 * 2.0)) - x1) / t_2); t_4 = ((t_1 + (x2 * 2.0)) - x1) / t_2; t_5 = (x1 * 2.0) * t_4; t_6 = t_1 * t_4; t_7 = x1 + (t_3 + (x1 + (t_0 + (t_6 + (t_2 * (((x1 * x1) * ((4.0 * t_4) - 6.0)) + (t_5 * ((2.0 * (x2 / (x1 * x1))) + ((-1.0 / x1) - (3.0 / (x1 * x1))))))))))); t_8 = (x2 * 2.0) - x1; tmp = 0.0; if (x1 <= -1e+103) tmp = x1 + ((x1 + (-4.0 * (x1 ^ 5.0))) + (3.0 * (x2 * -2.0))); elseif (x1 <= -1.4) tmp = t_7; elseif (x1 <= 0.86) tmp = x1 + (t_3 + (x1 + (t_0 + (t_6 + (t_2 * ((t_5 * (t_8 - 3.0)) + ((x1 * x1) * ((4.0 * t_8) - 6.0)))))))); elseif (x1 <= 5.8e+82) tmp = t_7; else tmp = x1 + (3.0 * (x1 * (x1 * (x1 + (3.0 + (x2 * 2.0)))))); end tmp_2 = tmp; end
code[x1_, x2_] := Block[{t$95$0 = N[(x1 * N[(x1 * x1), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(x1 * N[(x1 * 3.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(1.0 + N[(x1 * x1), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(3.0 * N[(N[(N[(t$95$1 - N[(x2 * 2.0), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$2), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[(N[(N[(t$95$1 + N[(x2 * 2.0), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$2), $MachinePrecision]}, Block[{t$95$5 = N[(N[(x1 * 2.0), $MachinePrecision] * t$95$4), $MachinePrecision]}, Block[{t$95$6 = N[(t$95$1 * t$95$4), $MachinePrecision]}, Block[{t$95$7 = N[(x1 + N[(t$95$3 + N[(x1 + N[(t$95$0 + N[(t$95$6 + N[(t$95$2 * N[(N[(N[(x1 * x1), $MachinePrecision] * N[(N[(4.0 * t$95$4), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision] + N[(t$95$5 * N[(N[(2.0 * N[(x2 / N[(x1 * x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(-1.0 / x1), $MachinePrecision] - N[(3.0 / N[(x1 * x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$8 = N[(N[(x2 * 2.0), $MachinePrecision] - x1), $MachinePrecision]}, If[LessEqual[x1, -1e+103], N[(x1 + N[(N[(x1 + N[(-4.0 * N[Power[x1, 5.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(3.0 * N[(x2 * -2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, -1.4], t$95$7, If[LessEqual[x1, 0.86], N[(x1 + N[(t$95$3 + N[(x1 + N[(t$95$0 + N[(t$95$6 + N[(t$95$2 * N[(N[(t$95$5 * N[(t$95$8 - 3.0), $MachinePrecision]), $MachinePrecision] + N[(N[(x1 * x1), $MachinePrecision] * N[(N[(4.0 * t$95$8), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 5.8e+82], t$95$7, N[(x1 + N[(3.0 * N[(x1 * N[(x1 * N[(x1 + 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 x1\right)\\
t_1 := x1 \cdot \left(x1 \cdot 3\right)\\
t_2 := 1 + x1 \cdot x1\\
t_3 := 3 \cdot \frac{\left(t_1 - x2 \cdot 2\right) - x1}{t_2}\\
t_4 := \frac{\left(t_1 + x2 \cdot 2\right) - x1}{t_2}\\
t_5 := \left(x1 \cdot 2\right) \cdot t_4\\
t_6 := t_1 \cdot t_4\\
t_7 := x1 + \left(t_3 + \left(x1 + \left(t_0 + \left(t_6 + t_2 \cdot \left(\left(x1 \cdot x1\right) \cdot \left(4 \cdot t_4 - 6\right) + t_5 \cdot \left(2 \cdot \frac{x2}{x1 \cdot x1} + \left(\frac{-1}{x1} - \frac{3}{x1 \cdot x1}\right)\right)\right)\right)\right)\right)\right)\\
t_8 := x2 \cdot 2 - x1\\
\mathbf{if}\;x1 \leq -1 \cdot 10^{+103}:\\
\;\;\;\;x1 + \left(\left(x1 + -4 \cdot {x1}^{5}\right) + 3 \cdot \left(x2 \cdot -2\right)\right)\\
\mathbf{elif}\;x1 \leq -1.4:\\
\;\;\;\;t_7\\
\mathbf{elif}\;x1 \leq 0.86:\\
\;\;\;\;x1 + \left(t_3 + \left(x1 + \left(t_0 + \left(t_6 + t_2 \cdot \left(t_5 \cdot \left(t_8 - 3\right) + \left(x1 \cdot x1\right) \cdot \left(4 \cdot t_8 - 6\right)\right)\right)\right)\right)\right)\\
\mathbf{elif}\;x1 \leq 5.8 \cdot 10^{+82}:\\
\;\;\;\;t_7\\
\mathbf{else}:\\
\;\;\;\;x1 + 3 \cdot \left(x1 \cdot \left(x1 \cdot \left(x1 + \left(3 + x2 \cdot 2\right)\right)\right)\right)\\
\end{array}
\end{array}
if x1 < -1e103Initial program 0.0%
Taylor expanded in x1 around 0 0.0%
+-commutative0.0%
neg-mul-10.0%
unsub-neg0.0%
*-commutative0.0%
Simplified0.0%
Taylor expanded in x1 around 0 0.0%
*-commutative0.0%
Simplified0.0%
Taylor expanded in x1 around inf 100.0%
if -1e103 < x1 < -1.3999999999999999 or 0.859999999999999987 < x1 < 5.8000000000000003e82Initial program 99.0%
fma-def99.0%
*-commutative99.0%
fma-def99.1%
add-cube-cbrt98.8%
Applied egg-rr98.8%
Taylor expanded in x1 around inf 96.4%
unpow296.4%
associate-*r/96.4%
metadata-eval96.4%
unpow296.4%
Simplified96.4%
if -1.3999999999999999 < x1 < 0.859999999999999987Initial program 99.3%
Taylor expanded in x1 around 0 99.2%
+-commutative99.2%
neg-mul-199.2%
unsub-neg99.2%
*-commutative99.2%
Simplified99.2%
Taylor expanded in x1 around 0 99.2%
+-commutative99.2%
neg-mul-199.2%
unsub-neg99.2%
*-commutative99.2%
Simplified99.2%
if 5.8000000000000003e82 < x1 Initial program 24.5%
Taylor expanded in x1 around 0 11.9%
Taylor expanded in x1 around 0 81.1%
+-commutative81.1%
mul-1-neg81.1%
unsub-neg81.1%
*-commutative81.1%
fma-def81.1%
+-commutative81.1%
cube-mult81.1%
unpow281.1%
distribute-rgt-out92.5%
unpow292.5%
*-commutative92.5%
Simplified92.5%
Taylor expanded in x1 around inf 81.1%
distribute-lft-out81.1%
*-commutative81.1%
unpow381.1%
unpow281.1%
distribute-lft-in96.2%
+-commutative96.2%
unpow296.2%
associate-*l*96.2%
*-commutative96.2%
cancel-sign-sub-inv96.2%
metadata-eval96.2%
*-commutative96.2%
Simplified96.2%
Final simplification98.2%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (* x1 (* x1 3.0)))
(t_1 (+ 1.0 (* x1 x1)))
(t_2 (/ (- (+ t_0 (* x2 2.0)) x1) t_1)))
(if (<= x1 -1e+103)
(+ x1 (+ (+ x1 (* -4.0 (pow x1 5.0))) (* 3.0 (* x2 -2.0))))
(if (<= x1 5.8e+82)
(+
x1
(+
(+
x1
(+
(+
(*
t_1
(+
(* (* (* x1 2.0) t_2) (- t_2 3.0))
(* (* x1 x1) (- (* 4.0 t_2) 6.0))))
(* t_0 t_2))
(* x1 (* x1 x1))))
(* 3.0 (/ (- (- t_0 (* x2 2.0)) x1) t_1))))
(+ x1 (* 3.0 (* x1 (* x1 (+ x1 (+ 3.0 (* x2 2.0)))))))))))
double code(double x1, double x2) {
double t_0 = x1 * (x1 * 3.0);
double t_1 = 1.0 + (x1 * x1);
double t_2 = ((t_0 + (x2 * 2.0)) - x1) / t_1;
double tmp;
if (x1 <= -1e+103) {
tmp = x1 + ((x1 + (-4.0 * pow(x1, 5.0))) + (3.0 * (x2 * -2.0)));
} else if (x1 <= 5.8e+82) {
tmp = x1 + ((x1 + (((t_1 * ((((x1 * 2.0) * t_2) * (t_2 - 3.0)) + ((x1 * x1) * ((4.0 * t_2) - 6.0)))) + (t_0 * t_2)) + (x1 * (x1 * x1)))) + (3.0 * (((t_0 - (x2 * 2.0)) - x1) / t_1)));
} else {
tmp = x1 + (3.0 * (x1 * (x1 * (x1 + (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 = 1.0d0 + (x1 * x1)
t_2 = ((t_0 + (x2 * 2.0d0)) - x1) / t_1
if (x1 <= (-1d+103)) then
tmp = x1 + ((x1 + ((-4.0d0) * (x1 ** 5.0d0))) + (3.0d0 * (x2 * (-2.0d0))))
else if (x1 <= 5.8d+82) then
tmp = x1 + ((x1 + (((t_1 * ((((x1 * 2.0d0) * t_2) * (t_2 - 3.0d0)) + ((x1 * x1) * ((4.0d0 * t_2) - 6.0d0)))) + (t_0 * t_2)) + (x1 * (x1 * x1)))) + (3.0d0 * (((t_0 - (x2 * 2.0d0)) - x1) / t_1)))
else
tmp = x1 + (3.0d0 * (x1 * (x1 * (x1 + (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 = 1.0 + (x1 * x1);
double t_2 = ((t_0 + (x2 * 2.0)) - x1) / t_1;
double tmp;
if (x1 <= -1e+103) {
tmp = x1 + ((x1 + (-4.0 * Math.pow(x1, 5.0))) + (3.0 * (x2 * -2.0)));
} else if (x1 <= 5.8e+82) {
tmp = x1 + ((x1 + (((t_1 * ((((x1 * 2.0) * t_2) * (t_2 - 3.0)) + ((x1 * x1) * ((4.0 * t_2) - 6.0)))) + (t_0 * t_2)) + (x1 * (x1 * x1)))) + (3.0 * (((t_0 - (x2 * 2.0)) - x1) / t_1)));
} else {
tmp = x1 + (3.0 * (x1 * (x1 * (x1 + (3.0 + (x2 * 2.0))))));
}
return tmp;
}
def code(x1, x2): t_0 = x1 * (x1 * 3.0) t_1 = 1.0 + (x1 * x1) t_2 = ((t_0 + (x2 * 2.0)) - x1) / t_1 tmp = 0 if x1 <= -1e+103: tmp = x1 + ((x1 + (-4.0 * math.pow(x1, 5.0))) + (3.0 * (x2 * -2.0))) elif x1 <= 5.8e+82: tmp = x1 + ((x1 + (((t_1 * ((((x1 * 2.0) * t_2) * (t_2 - 3.0)) + ((x1 * x1) * ((4.0 * t_2) - 6.0)))) + (t_0 * t_2)) + (x1 * (x1 * x1)))) + (3.0 * (((t_0 - (x2 * 2.0)) - x1) / t_1))) else: tmp = x1 + (3.0 * (x1 * (x1 * (x1 + (3.0 + (x2 * 2.0)))))) return tmp
function code(x1, x2) t_0 = Float64(x1 * Float64(x1 * 3.0)) t_1 = Float64(1.0 + Float64(x1 * x1)) t_2 = Float64(Float64(Float64(t_0 + Float64(x2 * 2.0)) - x1) / t_1) tmp = 0.0 if (x1 <= -1e+103) tmp = Float64(x1 + Float64(Float64(x1 + Float64(-4.0 * (x1 ^ 5.0))) + Float64(3.0 * Float64(x2 * -2.0)))); elseif (x1 <= 5.8e+82) tmp = Float64(x1 + Float64(Float64(x1 + Float64(Float64(Float64(t_1 * Float64(Float64(Float64(Float64(x1 * 2.0) * t_2) * Float64(t_2 - 3.0)) + Float64(Float64(x1 * x1) * Float64(Float64(4.0 * t_2) - 6.0)))) + Float64(t_0 * t_2)) + Float64(x1 * Float64(x1 * x1)))) + Float64(3.0 * Float64(Float64(Float64(t_0 - Float64(x2 * 2.0)) - x1) / t_1)))); else tmp = Float64(x1 + Float64(3.0 * Float64(x1 * Float64(x1 * Float64(x1 + 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 = 1.0 + (x1 * x1); t_2 = ((t_0 + (x2 * 2.0)) - x1) / t_1; tmp = 0.0; if (x1 <= -1e+103) tmp = x1 + ((x1 + (-4.0 * (x1 ^ 5.0))) + (3.0 * (x2 * -2.0))); elseif (x1 <= 5.8e+82) tmp = x1 + ((x1 + (((t_1 * ((((x1 * 2.0) * t_2) * (t_2 - 3.0)) + ((x1 * x1) * ((4.0 * t_2) - 6.0)))) + (t_0 * t_2)) + (x1 * (x1 * x1)))) + (3.0 * (((t_0 - (x2 * 2.0)) - x1) / t_1))); else tmp = x1 + (3.0 * (x1 * (x1 * (x1 + (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[(1.0 + N[(x1 * x1), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[(t$95$0 + N[(x2 * 2.0), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$1), $MachinePrecision]}, If[LessEqual[x1, -1e+103], N[(x1 + N[(N[(x1 + N[(-4.0 * N[Power[x1, 5.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(3.0 * N[(x2 * -2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 5.8e+82], N[(x1 + N[(N[(x1 + N[(N[(N[(t$95$1 * N[(N[(N[(N[(x1 * 2.0), $MachinePrecision] * t$95$2), $MachinePrecision] * N[(t$95$2 - 3.0), $MachinePrecision]), $MachinePrecision] + N[(N[(x1 * x1), $MachinePrecision] * N[(N[(4.0 * t$95$2), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(t$95$0 * t$95$2), $MachinePrecision]), $MachinePrecision] + N[(x1 * N[(x1 * x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(3.0 * N[(N[(N[(t$95$0 - N[(x2 * 2.0), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x1 + N[(3.0 * N[(x1 * N[(x1 * N[(x1 + 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 := 1 + x1 \cdot x1\\
t_2 := \frac{\left(t_0 + x2 \cdot 2\right) - x1}{t_1}\\
\mathbf{if}\;x1 \leq -1 \cdot 10^{+103}:\\
\;\;\;\;x1 + \left(\left(x1 + -4 \cdot {x1}^{5}\right) + 3 \cdot \left(x2 \cdot -2\right)\right)\\
\mathbf{elif}\;x1 \leq 5.8 \cdot 10^{+82}:\\
\;\;\;\;x1 + \left(\left(x1 + \left(\left(t_1 \cdot \left(\left(\left(x1 \cdot 2\right) \cdot t_2\right) \cdot \left(t_2 - 3\right) + \left(x1 \cdot x1\right) \cdot \left(4 \cdot t_2 - 6\right)\right) + t_0 \cdot t_2\right) + x1 \cdot \left(x1 \cdot x1\right)\right)\right) + 3 \cdot \frac{\left(t_0 - x2 \cdot 2\right) - x1}{t_1}\right)\\
\mathbf{else}:\\
\;\;\;\;x1 + 3 \cdot \left(x1 \cdot \left(x1 \cdot \left(x1 + \left(3 + x2 \cdot 2\right)\right)\right)\right)\\
\end{array}
\end{array}
if x1 < -1e103Initial program 0.0%
Taylor expanded in x1 around 0 0.0%
+-commutative0.0%
neg-mul-10.0%
unsub-neg0.0%
*-commutative0.0%
Simplified0.0%
Taylor expanded in x1 around 0 0.0%
*-commutative0.0%
Simplified0.0%
Taylor expanded in x1 around inf 100.0%
if -1e103 < x1 < 5.8000000000000003e82Initial program 99.2%
if 5.8000000000000003e82 < x1 Initial program 24.5%
Taylor expanded in x1 around 0 11.9%
Taylor expanded in x1 around 0 81.1%
+-commutative81.1%
mul-1-neg81.1%
unsub-neg81.1%
*-commutative81.1%
fma-def81.1%
+-commutative81.1%
cube-mult81.1%
unpow281.1%
distribute-rgt-out92.5%
unpow292.5%
*-commutative92.5%
Simplified92.5%
Taylor expanded in x1 around inf 81.1%
distribute-lft-out81.1%
*-commutative81.1%
unpow381.1%
unpow281.1%
distribute-lft-in96.2%
+-commutative96.2%
unpow296.2%
associate-*l*96.2%
*-commutative96.2%
cancel-sign-sub-inv96.2%
metadata-eval96.2%
*-commutative96.2%
Simplified96.2%
Final simplification98.7%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (* x1 (* x1 3.0)))
(t_1 (+ 1.0 (* x1 x1)))
(t_2 (/ (- (+ t_0 (* x2 2.0)) x1) t_1)))
(if (or (<= x1 -5.5e+102) (not (<= x1 5.8e+82)))
(+ x1 (* 3.0 (* x1 (* x1 (+ x1 (+ 3.0 (* x2 2.0)))))))
(+
x1
(+
(* 3.0 (/ (- (- t_0 (* x2 2.0)) x1) t_1))
(+
x1
(+
(* x1 (* x1 x1))
(+
(*
t_1
(+
(* (* (* x1 2.0) t_2) (- t_2 3.0))
(* (* x1 x1) (- (* 4.0 t_2) 6.0))))
(* t_0 (* x2 2.0))))))))))
double code(double x1, double x2) {
double t_0 = x1 * (x1 * 3.0);
double t_1 = 1.0 + (x1 * x1);
double t_2 = ((t_0 + (x2 * 2.0)) - x1) / t_1;
double tmp;
if ((x1 <= -5.5e+102) || !(x1 <= 5.8e+82)) {
tmp = x1 + (3.0 * (x1 * (x1 * (x1 + (3.0 + (x2 * 2.0))))));
} else {
tmp = x1 + ((3.0 * (((t_0 - (x2 * 2.0)) - x1) / t_1)) + (x1 + ((x1 * (x1 * x1)) + ((t_1 * ((((x1 * 2.0) * t_2) * (t_2 - 3.0)) + ((x1 * x1) * ((4.0 * t_2) - 6.0)))) + (t_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 = 1.0d0 + (x1 * x1)
t_2 = ((t_0 + (x2 * 2.0d0)) - x1) / t_1
if ((x1 <= (-5.5d+102)) .or. (.not. (x1 <= 5.8d+82))) then
tmp = x1 + (3.0d0 * (x1 * (x1 * (x1 + (3.0d0 + (x2 * 2.0d0))))))
else
tmp = x1 + ((3.0d0 * (((t_0 - (x2 * 2.0d0)) - x1) / t_1)) + (x1 + ((x1 * (x1 * x1)) + ((t_1 * ((((x1 * 2.0d0) * t_2) * (t_2 - 3.0d0)) + ((x1 * x1) * ((4.0d0 * t_2) - 6.0d0)))) + (t_0 * (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 = 1.0 + (x1 * x1);
double t_2 = ((t_0 + (x2 * 2.0)) - x1) / t_1;
double tmp;
if ((x1 <= -5.5e+102) || !(x1 <= 5.8e+82)) {
tmp = x1 + (3.0 * (x1 * (x1 * (x1 + (3.0 + (x2 * 2.0))))));
} else {
tmp = x1 + ((3.0 * (((t_0 - (x2 * 2.0)) - x1) / t_1)) + (x1 + ((x1 * (x1 * x1)) + ((t_1 * ((((x1 * 2.0) * t_2) * (t_2 - 3.0)) + ((x1 * x1) * ((4.0 * t_2) - 6.0)))) + (t_0 * (x2 * 2.0))))));
}
return tmp;
}
def code(x1, x2): t_0 = x1 * (x1 * 3.0) t_1 = 1.0 + (x1 * x1) t_2 = ((t_0 + (x2 * 2.0)) - x1) / t_1 tmp = 0 if (x1 <= -5.5e+102) or not (x1 <= 5.8e+82): tmp = x1 + (3.0 * (x1 * (x1 * (x1 + (3.0 + (x2 * 2.0)))))) else: tmp = x1 + ((3.0 * (((t_0 - (x2 * 2.0)) - x1) / t_1)) + (x1 + ((x1 * (x1 * x1)) + ((t_1 * ((((x1 * 2.0) * t_2) * (t_2 - 3.0)) + ((x1 * x1) * ((4.0 * t_2) - 6.0)))) + (t_0 * (x2 * 2.0)))))) return tmp
function code(x1, x2) t_0 = Float64(x1 * Float64(x1 * 3.0)) t_1 = Float64(1.0 + Float64(x1 * x1)) t_2 = Float64(Float64(Float64(t_0 + Float64(x2 * 2.0)) - x1) / t_1) tmp = 0.0 if ((x1 <= -5.5e+102) || !(x1 <= 5.8e+82)) tmp = Float64(x1 + Float64(3.0 * Float64(x1 * Float64(x1 * Float64(x1 + Float64(3.0 + Float64(x2 * 2.0))))))); else 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(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(t_0 * Float64(x2 * 2.0))))))); end return tmp end
function tmp_2 = code(x1, x2) t_0 = x1 * (x1 * 3.0); t_1 = 1.0 + (x1 * x1); t_2 = ((t_0 + (x2 * 2.0)) - x1) / t_1; tmp = 0.0; if ((x1 <= -5.5e+102) || ~((x1 <= 5.8e+82))) tmp = x1 + (3.0 * (x1 * (x1 * (x1 + (3.0 + (x2 * 2.0)))))); else tmp = x1 + ((3.0 * (((t_0 - (x2 * 2.0)) - x1) / t_1)) + (x1 + ((x1 * (x1 * x1)) + ((t_1 * ((((x1 * 2.0) * t_2) * (t_2 - 3.0)) + ((x1 * x1) * ((4.0 * t_2) - 6.0)))) + (t_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[(1.0 + N[(x1 * x1), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[(t$95$0 + N[(x2 * 2.0), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$1), $MachinePrecision]}, If[Or[LessEqual[x1, -5.5e+102], N[Not[LessEqual[x1, 5.8e+82]], $MachinePrecision]], N[(x1 + N[(3.0 * N[(x1 * N[(x1 * N[(x1 + N[(3.0 + N[(x2 * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 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[(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[(t$95$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 := 1 + x1 \cdot x1\\
t_2 := \frac{\left(t_0 + x2 \cdot 2\right) - x1}{t_1}\\
\mathbf{if}\;x1 \leq -5.5 \cdot 10^{+102} \lor \neg \left(x1 \leq 5.8 \cdot 10^{+82}\right):\\
\;\;\;\;x1 + 3 \cdot \left(x1 \cdot \left(x1 \cdot \left(x1 + \left(3 + x2 \cdot 2\right)\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;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(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) + t_0 \cdot \left(x2 \cdot 2\right)\right)\right)\right)\right)\\
\end{array}
\end{array}
if x1 < -5.49999999999999981e102 or 5.8000000000000003e82 < x1 Initial program 14.0%
Taylor expanded in x1 around 0 6.8%
Taylor expanded in x1 around 0 46.2%
+-commutative46.2%
mul-1-neg46.2%
unsub-neg46.2%
*-commutative46.2%
fma-def46.2%
+-commutative46.2%
cube-mult46.2%
unpow246.2%
distribute-rgt-out52.7%
unpow252.7%
*-commutative52.7%
Simplified52.7%
Taylor expanded in x1 around inf 46.2%
distribute-lft-out46.2%
*-commutative46.2%
unpow346.2%
unpow246.2%
distribute-lft-in59.1%
+-commutative59.1%
unpow259.1%
associate-*l*59.1%
*-commutative59.1%
cancel-sign-sub-inv59.1%
metadata-eval59.1%
*-commutative59.1%
Simplified59.1%
if -5.49999999999999981e102 < x1 < 5.8000000000000003e82Initial program 99.2%
Taylor expanded in x1 around 0 93.0%
*-commutative90.7%
Simplified93.0%
Final simplification80.7%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (* x1 (* x1 3.0)))
(t_1 (+ 1.0 (* x1 x1)))
(t_2 (/ (- (+ t_0 (* x2 2.0)) x1) t_1)))
(if (<= x1 -3.4e+84)
(+ x1 (* 3.0 (* x1 (* x1 (+ x1 (+ 3.0 (* x2 2.0)))))))
(if (<= x1 5e+110)
(+
x1
(+
(* 3.0 (/ (- (- t_0 (* x2 2.0)) x1) t_1))
(+
x1
(+
(* x1 (* x1 x1))
(+
(* t_0 t_2)
(*
t_1
(+
(* (* x1 x1) (- (* 4.0 t_2) 6.0))
(* (* (* x1 2.0) t_2) (- (* x2 2.0) 3.0)))))))))
(+ x1 (+ x1 (* 3.0 (- (* (* x1 x1) (+ x1 3.0)) x1))))))))
double code(double x1, double x2) {
double t_0 = x1 * (x1 * 3.0);
double t_1 = 1.0 + (x1 * x1);
double t_2 = ((t_0 + (x2 * 2.0)) - x1) / t_1;
double tmp;
if (x1 <= -3.4e+84) {
tmp = x1 + (3.0 * (x1 * (x1 * (x1 + (3.0 + (x2 * 2.0))))));
} else if (x1 <= 5e+110) {
tmp = x1 + ((3.0 * (((t_0 - (x2 * 2.0)) - x1) / t_1)) + (x1 + ((x1 * (x1 * x1)) + ((t_0 * t_2) + (t_1 * (((x1 * x1) * ((4.0 * t_2) - 6.0)) + (((x1 * 2.0) * t_2) * ((x2 * 2.0) - 3.0))))))));
} else {
tmp = x1 + (x1 + (3.0 * (((x1 * x1) * (x1 + 3.0)) - x1)));
}
return tmp;
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
real(8) :: t_0
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_0 = x1 * (x1 * 3.0d0)
t_1 = 1.0d0 + (x1 * x1)
t_2 = ((t_0 + (x2 * 2.0d0)) - x1) / t_1
if (x1 <= (-3.4d+84)) then
tmp = x1 + (3.0d0 * (x1 * (x1 * (x1 + (3.0d0 + (x2 * 2.0d0))))))
else if (x1 <= 5d+110) then
tmp = x1 + ((3.0d0 * (((t_0 - (x2 * 2.0d0)) - x1) / t_1)) + (x1 + ((x1 * (x1 * x1)) + ((t_0 * t_2) + (t_1 * (((x1 * x1) * ((4.0d0 * t_2) - 6.0d0)) + (((x1 * 2.0d0) * t_2) * ((x2 * 2.0d0) - 3.0d0))))))))
else
tmp = x1 + (x1 + (3.0d0 * (((x1 * x1) * (x1 + 3.0d0)) - x1)))
end if
code = tmp
end function
public static double code(double x1, double x2) {
double t_0 = x1 * (x1 * 3.0);
double t_1 = 1.0 + (x1 * x1);
double t_2 = ((t_0 + (x2 * 2.0)) - x1) / t_1;
double tmp;
if (x1 <= -3.4e+84) {
tmp = x1 + (3.0 * (x1 * (x1 * (x1 + (3.0 + (x2 * 2.0))))));
} else if (x1 <= 5e+110) {
tmp = x1 + ((3.0 * (((t_0 - (x2 * 2.0)) - x1) / t_1)) + (x1 + ((x1 * (x1 * x1)) + ((t_0 * t_2) + (t_1 * (((x1 * x1) * ((4.0 * t_2) - 6.0)) + (((x1 * 2.0) * t_2) * ((x2 * 2.0) - 3.0))))))));
} else {
tmp = x1 + (x1 + (3.0 * (((x1 * x1) * (x1 + 3.0)) - x1)));
}
return tmp;
}
def code(x1, x2): t_0 = x1 * (x1 * 3.0) t_1 = 1.0 + (x1 * x1) t_2 = ((t_0 + (x2 * 2.0)) - x1) / t_1 tmp = 0 if x1 <= -3.4e+84: tmp = x1 + (3.0 * (x1 * (x1 * (x1 + (3.0 + (x2 * 2.0)))))) elif x1 <= 5e+110: tmp = x1 + ((3.0 * (((t_0 - (x2 * 2.0)) - x1) / t_1)) + (x1 + ((x1 * (x1 * x1)) + ((t_0 * t_2) + (t_1 * (((x1 * x1) * ((4.0 * t_2) - 6.0)) + (((x1 * 2.0) * t_2) * ((x2 * 2.0) - 3.0)))))))) else: tmp = x1 + (x1 + (3.0 * (((x1 * x1) * (x1 + 3.0)) - x1))) return tmp
function code(x1, x2) t_0 = Float64(x1 * Float64(x1 * 3.0)) t_1 = Float64(1.0 + Float64(x1 * x1)) t_2 = Float64(Float64(Float64(t_0 + Float64(x2 * 2.0)) - x1) / t_1) tmp = 0.0 if (x1 <= -3.4e+84) tmp = Float64(x1 + Float64(3.0 * Float64(x1 * Float64(x1 * Float64(x1 + Float64(3.0 + Float64(x2 * 2.0))))))); elseif (x1 <= 5e+110) 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(t_0 * t_2) + Float64(t_1 * Float64(Float64(Float64(x1 * x1) * Float64(Float64(4.0 * t_2) - 6.0)) + Float64(Float64(Float64(x1 * 2.0) * t_2) * Float64(Float64(x2 * 2.0) - 3.0))))))))); else tmp = Float64(x1 + Float64(x1 + Float64(3.0 * Float64(Float64(Float64(x1 * x1) * Float64(x1 + 3.0)) - x1)))); end return tmp end
function tmp_2 = code(x1, x2) t_0 = x1 * (x1 * 3.0); t_1 = 1.0 + (x1 * x1); t_2 = ((t_0 + (x2 * 2.0)) - x1) / t_1; tmp = 0.0; if (x1 <= -3.4e+84) tmp = x1 + (3.0 * (x1 * (x1 * (x1 + (3.0 + (x2 * 2.0)))))); elseif (x1 <= 5e+110) tmp = x1 + ((3.0 * (((t_0 - (x2 * 2.0)) - x1) / t_1)) + (x1 + ((x1 * (x1 * x1)) + ((t_0 * t_2) + (t_1 * (((x1 * x1) * ((4.0 * t_2) - 6.0)) + (((x1 * 2.0) * t_2) * ((x2 * 2.0) - 3.0)))))))); else tmp = x1 + (x1 + (3.0 * (((x1 * x1) * (x1 + 3.0)) - x1))); end tmp_2 = tmp; end
code[x1_, x2_] := Block[{t$95$0 = N[(x1 * N[(x1 * 3.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(1.0 + N[(x1 * x1), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[(t$95$0 + N[(x2 * 2.0), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$1), $MachinePrecision]}, If[LessEqual[x1, -3.4e+84], N[(x1 + N[(3.0 * N[(x1 * N[(x1 * N[(x1 + N[(3.0 + N[(x2 * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 5e+110], 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[(t$95$0 * t$95$2), $MachinePrecision] + N[(t$95$1 * N[(N[(N[(x1 * x1), $MachinePrecision] * N[(N[(4.0 * t$95$2), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision] + N[(N[(N[(x1 * 2.0), $MachinePrecision] * t$95$2), $MachinePrecision] * N[(N[(x2 * 2.0), $MachinePrecision] - 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x1 + N[(x1 + N[(3.0 * N[(N[(N[(x1 * x1), $MachinePrecision] * N[(x1 + 3.0), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x1 \cdot \left(x1 \cdot 3\right)\\
t_1 := 1 + x1 \cdot x1\\
t_2 := \frac{\left(t_0 + x2 \cdot 2\right) - x1}{t_1}\\
\mathbf{if}\;x1 \leq -3.4 \cdot 10^{+84}:\\
\;\;\;\;x1 + 3 \cdot \left(x1 \cdot \left(x1 \cdot \left(x1 + \left(3 + x2 \cdot 2\right)\right)\right)\right)\\
\mathbf{elif}\;x1 \leq 5 \cdot 10^{+110}:\\
\;\;\;\;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(t_0 \cdot t_2 + t_1 \cdot \left(\left(x1 \cdot x1\right) \cdot \left(4 \cdot t_2 - 6\right) + \left(\left(x1 \cdot 2\right) \cdot t_2\right) \cdot \left(x2 \cdot 2 - 3\right)\right)\right)\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x1 + \left(x1 + 3 \cdot \left(\left(x1 \cdot x1\right) \cdot \left(x1 + 3\right) - x1\right)\right)\\
\end{array}
\end{array}
if x1 < -3.3999999999999998e84Initial program 2.4%
Taylor expanded in x1 around 0 0.1%
Taylor expanded in x1 around 0 0.0%
+-commutative0.0%
mul-1-neg0.0%
unsub-neg0.0%
*-commutative0.0%
fma-def0.0%
+-commutative0.0%
cube-mult0.0%
unpow20.0%
distribute-rgt-out0.0%
unpow20.0%
*-commutative0.0%
Simplified0.0%
Taylor expanded in x1 around inf 2.4%
distribute-lft-out2.4%
*-commutative2.4%
unpow32.4%
unpow22.4%
distribute-lft-in12.2%
+-commutative12.2%
unpow212.2%
associate-*l*12.2%
*-commutative12.2%
cancel-sign-sub-inv12.2%
metadata-eval12.2%
*-commutative12.2%
Simplified12.2%
if -3.3999999999999998e84 < x1 < 4.99999999999999978e110Initial program 98.6%
Taylor expanded in x1 around 0 90.8%
*-commutative90.8%
Simplified90.8%
if 4.99999999999999978e110 < x1 Initial program 22.0%
Taylor expanded in x1 around 0 10.5%
Taylor expanded in x1 around 0 82.0%
+-commutative82.0%
mul-1-neg82.0%
unsub-neg82.0%
*-commutative82.0%
fma-def82.0%
+-commutative82.0%
cube-mult82.0%
unpow282.0%
distribute-rgt-out94.0%
unpow294.0%
*-commutative94.0%
Simplified94.0%
Taylor expanded in x2 around 0 98.0%
unpow298.0%
Simplified98.0%
Final simplification79.6%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (+ 1.0 (* x1 x1)))
(t_1 (* x1 (* x1 3.0)))
(t_2 (/ (- (+ t_1 (* x2 2.0)) x1) t_0)))
(if (<= x1 -8e+102)
(/ (fma x1 x1 (* (* x2 x2) -36.0)) (+ x1 (* x2 6.0)))
(if (<= x1 5.8e+82)
(+
x1
(+
(* 3.0 (/ (- (- t_1 (* x2 2.0)) x1) t_0))
(+
x1
(+
(* x1 (* x1 x1))
(+
(*
t_0
(+
(* (* (* x1 2.0) t_2) (- t_2 3.0))
(* (* x1 x1) (- (* 4.0 t_2) 6.0))))
(* t_1 (* x2 2.0)))))))
(+ x1 (* 3.0 (* x1 (* x1 (+ x1 (+ 3.0 (* x2 2.0)))))))))))
double code(double x1, double x2) {
double t_0 = 1.0 + (x1 * x1);
double t_1 = x1 * (x1 * 3.0);
double t_2 = ((t_1 + (x2 * 2.0)) - x1) / t_0;
double tmp;
if (x1 <= -8e+102) {
tmp = fma(x1, x1, ((x2 * x2) * -36.0)) / (x1 + (x2 * 6.0));
} else if (x1 <= 5.8e+82) {
tmp = x1 + ((3.0 * (((t_1 - (x2 * 2.0)) - x1) / t_0)) + (x1 + ((x1 * (x1 * x1)) + ((t_0 * ((((x1 * 2.0) * t_2) * (t_2 - 3.0)) + ((x1 * x1) * ((4.0 * t_2) - 6.0)))) + (t_1 * (x2 * 2.0))))));
} else {
tmp = x1 + (3.0 * (x1 * (x1 * (x1 + (3.0 + (x2 * 2.0))))));
}
return tmp;
}
function code(x1, x2) t_0 = Float64(1.0 + Float64(x1 * x1)) t_1 = Float64(x1 * Float64(x1 * 3.0)) t_2 = Float64(Float64(Float64(t_1 + Float64(x2 * 2.0)) - x1) / t_0) tmp = 0.0 if (x1 <= -8e+102) tmp = Float64(fma(x1, x1, Float64(Float64(x2 * x2) * -36.0)) / Float64(x1 + Float64(x2 * 6.0))); elseif (x1 <= 5.8e+82) tmp = Float64(x1 + Float64(Float64(3.0 * Float64(Float64(Float64(t_1 - Float64(x2 * 2.0)) - x1) / t_0)) + Float64(x1 + Float64(Float64(x1 * Float64(x1 * x1)) + Float64(Float64(t_0 * Float64(Float64(Float64(Float64(x1 * 2.0) * t_2) * Float64(t_2 - 3.0)) + Float64(Float64(x1 * x1) * Float64(Float64(4.0 * t_2) - 6.0)))) + Float64(t_1 * Float64(x2 * 2.0))))))); else tmp = Float64(x1 + Float64(3.0 * Float64(x1 * Float64(x1 * Float64(x1 + Float64(3.0 + Float64(x2 * 2.0))))))); end return tmp end
code[x1_, x2_] := Block[{t$95$0 = N[(1.0 + N[(x1 * x1), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(x1 * N[(x1 * 3.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[(t$95$1 + N[(x2 * 2.0), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$0), $MachinePrecision]}, If[LessEqual[x1, -8e+102], N[(N[(x1 * x1 + N[(N[(x2 * x2), $MachinePrecision] * -36.0), $MachinePrecision]), $MachinePrecision] / N[(x1 + N[(x2 * 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 5.8e+82], N[(x1 + N[(N[(3.0 * N[(N[(N[(t$95$1 - N[(x2 * 2.0), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$0), $MachinePrecision]), $MachinePrecision] + N[(x1 + N[(N[(x1 * N[(x1 * x1), $MachinePrecision]), $MachinePrecision] + N[(N[(t$95$0 * N[(N[(N[(N[(x1 * 2.0), $MachinePrecision] * t$95$2), $MachinePrecision] * N[(t$95$2 - 3.0), $MachinePrecision]), $MachinePrecision] + N[(N[(x1 * x1), $MachinePrecision] * N[(N[(4.0 * t$95$2), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(t$95$1 * N[(x2 * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x1 + N[(3.0 * N[(x1 * N[(x1 * N[(x1 + N[(3.0 + N[(x2 * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := 1 + x1 \cdot x1\\
t_1 := x1 \cdot \left(x1 \cdot 3\right)\\
t_2 := \frac{\left(t_1 + x2 \cdot 2\right) - x1}{t_0}\\
\mathbf{if}\;x1 \leq -8 \cdot 10^{+102}:\\
\;\;\;\;\frac{\mathsf{fma}\left(x1, x1, \left(x2 \cdot x2\right) \cdot -36\right)}{x1 + x2 \cdot 6}\\
\mathbf{elif}\;x1 \leq 5.8 \cdot 10^{+82}:\\
\;\;\;\;x1 + \left(3 \cdot \frac{\left(t_1 - x2 \cdot 2\right) - x1}{t_0} + \left(x1 + \left(x1 \cdot \left(x1 \cdot x1\right) + \left(t_0 \cdot \left(\left(\left(x1 \cdot 2\right) \cdot t_2\right) \cdot \left(t_2 - 3\right) + \left(x1 \cdot x1\right) \cdot \left(4 \cdot t_2 - 6\right)\right) + t_1 \cdot \left(x2 \cdot 2\right)\right)\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x1 + 3 \cdot \left(x1 \cdot \left(x1 \cdot \left(x1 + \left(3 + x2 \cdot 2\right)\right)\right)\right)\\
\end{array}
\end{array}
if x1 < -7.99999999999999982e102Initial program 0.0%
Taylor expanded in x1 around 0 0.1%
Taylor expanded in x1 around 0 0.2%
*-commutative0.2%
Simplified0.2%
flip-+0.1%
Applied egg-rr0.1%
fma-neg10.1%
swap-sqr10.1%
unpow210.1%
distribute-rgt-neg-in10.1%
unpow210.1%
metadata-eval10.1%
metadata-eval10.1%
*-commutative10.1%
cancel-sign-sub-inv10.1%
metadata-eval10.1%
*-commutative10.1%
Simplified10.1%
if -7.99999999999999982e102 < x1 < 5.8000000000000003e82Initial program 99.2%
Taylor expanded in x1 around 0 93.0%
*-commutative90.7%
Simplified93.0%
if 5.8000000000000003e82 < x1 Initial program 24.5%
Taylor expanded in x1 around 0 11.9%
Taylor expanded in x1 around 0 81.1%
+-commutative81.1%
mul-1-neg81.1%
unsub-neg81.1%
*-commutative81.1%
fma-def81.1%
+-commutative81.1%
cube-mult81.1%
unpow281.1%
distribute-rgt-out92.5%
unpow292.5%
*-commutative92.5%
Simplified92.5%
Taylor expanded in x1 around inf 81.1%
distribute-lft-out81.1%
*-commutative81.1%
unpow381.1%
unpow281.1%
distribute-lft-in96.2%
+-commutative96.2%
unpow296.2%
associate-*l*96.2%
*-commutative96.2%
cancel-sign-sub-inv96.2%
metadata-eval96.2%
*-commutative96.2%
Simplified96.2%
Final simplification80.7%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (+ 1.0 (* x1 x1)))
(t_1 (* x1 (* x1 3.0)))
(t_2 (/ (- (+ t_1 (* x2 2.0)) x1) t_0)))
(if (<= x1 -5e+93)
(+ x1 (+ (+ x1 (* -4.0 (pow x1 5.0))) (* 3.0 (* x2 -2.0))))
(if (<= x1 5.8e+82)
(+
x1
(+
(* 3.0 (/ (- (- t_1 (* x2 2.0)) x1) t_0))
(+
x1
(+
(* x1 (* x1 x1))
(+
(*
t_0
(+
(* (* (* x1 2.0) t_2) (- t_2 3.0))
(* (* x1 x1) (- (* 4.0 t_2) 6.0))))
(* t_1 (* x2 2.0)))))))
(+ x1 (* 3.0 (* x1 (* x1 (+ x1 (+ 3.0 (* x2 2.0)))))))))))
double code(double x1, double x2) {
double t_0 = 1.0 + (x1 * x1);
double t_1 = x1 * (x1 * 3.0);
double t_2 = ((t_1 + (x2 * 2.0)) - x1) / t_0;
double tmp;
if (x1 <= -5e+93) {
tmp = x1 + ((x1 + (-4.0 * pow(x1, 5.0))) + (3.0 * (x2 * -2.0)));
} else if (x1 <= 5.8e+82) {
tmp = x1 + ((3.0 * (((t_1 - (x2 * 2.0)) - x1) / t_0)) + (x1 + ((x1 * (x1 * x1)) + ((t_0 * ((((x1 * 2.0) * t_2) * (t_2 - 3.0)) + ((x1 * x1) * ((4.0 * t_2) - 6.0)))) + (t_1 * (x2 * 2.0))))));
} else {
tmp = x1 + (3.0 * (x1 * (x1 * (x1 + (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 = 1.0d0 + (x1 * x1)
t_1 = x1 * (x1 * 3.0d0)
t_2 = ((t_1 + (x2 * 2.0d0)) - x1) / t_0
if (x1 <= (-5d+93)) then
tmp = x1 + ((x1 + ((-4.0d0) * (x1 ** 5.0d0))) + (3.0d0 * (x2 * (-2.0d0))))
else if (x1 <= 5.8d+82) then
tmp = x1 + ((3.0d0 * (((t_1 - (x2 * 2.0d0)) - x1) / t_0)) + (x1 + ((x1 * (x1 * x1)) + ((t_0 * ((((x1 * 2.0d0) * t_2) * (t_2 - 3.0d0)) + ((x1 * x1) * ((4.0d0 * t_2) - 6.0d0)))) + (t_1 * (x2 * 2.0d0))))))
else
tmp = x1 + (3.0d0 * (x1 * (x1 * (x1 + (3.0d0 + (x2 * 2.0d0))))))
end if
code = tmp
end function
public static double code(double x1, double x2) {
double t_0 = 1.0 + (x1 * x1);
double t_1 = x1 * (x1 * 3.0);
double t_2 = ((t_1 + (x2 * 2.0)) - x1) / t_0;
double tmp;
if (x1 <= -5e+93) {
tmp = x1 + ((x1 + (-4.0 * Math.pow(x1, 5.0))) + (3.0 * (x2 * -2.0)));
} else if (x1 <= 5.8e+82) {
tmp = x1 + ((3.0 * (((t_1 - (x2 * 2.0)) - x1) / t_0)) + (x1 + ((x1 * (x1 * x1)) + ((t_0 * ((((x1 * 2.0) * t_2) * (t_2 - 3.0)) + ((x1 * x1) * ((4.0 * t_2) - 6.0)))) + (t_1 * (x2 * 2.0))))));
} else {
tmp = x1 + (3.0 * (x1 * (x1 * (x1 + (3.0 + (x2 * 2.0))))));
}
return tmp;
}
def code(x1, x2): t_0 = 1.0 + (x1 * x1) t_1 = x1 * (x1 * 3.0) t_2 = ((t_1 + (x2 * 2.0)) - x1) / t_0 tmp = 0 if x1 <= -5e+93: tmp = x1 + ((x1 + (-4.0 * math.pow(x1, 5.0))) + (3.0 * (x2 * -2.0))) elif x1 <= 5.8e+82: tmp = x1 + ((3.0 * (((t_1 - (x2 * 2.0)) - x1) / t_0)) + (x1 + ((x1 * (x1 * x1)) + ((t_0 * ((((x1 * 2.0) * t_2) * (t_2 - 3.0)) + ((x1 * x1) * ((4.0 * t_2) - 6.0)))) + (t_1 * (x2 * 2.0)))))) else: tmp = x1 + (3.0 * (x1 * (x1 * (x1 + (3.0 + (x2 * 2.0)))))) return tmp
function code(x1, x2) t_0 = Float64(1.0 + Float64(x1 * x1)) t_1 = Float64(x1 * Float64(x1 * 3.0)) t_2 = Float64(Float64(Float64(t_1 + Float64(x2 * 2.0)) - x1) / t_0) tmp = 0.0 if (x1 <= -5e+93) tmp = Float64(x1 + Float64(Float64(x1 + Float64(-4.0 * (x1 ^ 5.0))) + Float64(3.0 * Float64(x2 * -2.0)))); elseif (x1 <= 5.8e+82) tmp = Float64(x1 + Float64(Float64(3.0 * Float64(Float64(Float64(t_1 - Float64(x2 * 2.0)) - x1) / t_0)) + Float64(x1 + Float64(Float64(x1 * Float64(x1 * x1)) + Float64(Float64(t_0 * Float64(Float64(Float64(Float64(x1 * 2.0) * t_2) * Float64(t_2 - 3.0)) + Float64(Float64(x1 * x1) * Float64(Float64(4.0 * t_2) - 6.0)))) + Float64(t_1 * Float64(x2 * 2.0))))))); else tmp = Float64(x1 + Float64(3.0 * Float64(x1 * Float64(x1 * Float64(x1 + Float64(3.0 + Float64(x2 * 2.0))))))); end return tmp end
function tmp_2 = code(x1, x2) t_0 = 1.0 + (x1 * x1); t_1 = x1 * (x1 * 3.0); t_2 = ((t_1 + (x2 * 2.0)) - x1) / t_0; tmp = 0.0; if (x1 <= -5e+93) tmp = x1 + ((x1 + (-4.0 * (x1 ^ 5.0))) + (3.0 * (x2 * -2.0))); elseif (x1 <= 5.8e+82) tmp = x1 + ((3.0 * (((t_1 - (x2 * 2.0)) - x1) / t_0)) + (x1 + ((x1 * (x1 * x1)) + ((t_0 * ((((x1 * 2.0) * t_2) * (t_2 - 3.0)) + ((x1 * x1) * ((4.0 * t_2) - 6.0)))) + (t_1 * (x2 * 2.0)))))); else tmp = x1 + (3.0 * (x1 * (x1 * (x1 + (3.0 + (x2 * 2.0)))))); end tmp_2 = tmp; end
code[x1_, x2_] := Block[{t$95$0 = N[(1.0 + N[(x1 * x1), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(x1 * N[(x1 * 3.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[(t$95$1 + N[(x2 * 2.0), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$0), $MachinePrecision]}, If[LessEqual[x1, -5e+93], N[(x1 + N[(N[(x1 + N[(-4.0 * N[Power[x1, 5.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(3.0 * N[(x2 * -2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 5.8e+82], N[(x1 + N[(N[(3.0 * N[(N[(N[(t$95$1 - N[(x2 * 2.0), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$0), $MachinePrecision]), $MachinePrecision] + N[(x1 + N[(N[(x1 * N[(x1 * x1), $MachinePrecision]), $MachinePrecision] + N[(N[(t$95$0 * N[(N[(N[(N[(x1 * 2.0), $MachinePrecision] * t$95$2), $MachinePrecision] * N[(t$95$2 - 3.0), $MachinePrecision]), $MachinePrecision] + N[(N[(x1 * x1), $MachinePrecision] * N[(N[(4.0 * t$95$2), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(t$95$1 * N[(x2 * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x1 + N[(3.0 * N[(x1 * N[(x1 * N[(x1 + N[(3.0 + N[(x2 * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := 1 + x1 \cdot x1\\
t_1 := x1 \cdot \left(x1 \cdot 3\right)\\
t_2 := \frac{\left(t_1 + x2 \cdot 2\right) - x1}{t_0}\\
\mathbf{if}\;x1 \leq -5 \cdot 10^{+93}:\\
\;\;\;\;x1 + \left(\left(x1 + -4 \cdot {x1}^{5}\right) + 3 \cdot \left(x2 \cdot -2\right)\right)\\
\mathbf{elif}\;x1 \leq 5.8 \cdot 10^{+82}:\\
\;\;\;\;x1 + \left(3 \cdot \frac{\left(t_1 - x2 \cdot 2\right) - x1}{t_0} + \left(x1 + \left(x1 \cdot \left(x1 \cdot x1\right) + \left(t_0 \cdot \left(\left(\left(x1 \cdot 2\right) \cdot t_2\right) \cdot \left(t_2 - 3\right) + \left(x1 \cdot x1\right) \cdot \left(4 \cdot t_2 - 6\right)\right) + t_1 \cdot \left(x2 \cdot 2\right)\right)\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x1 + 3 \cdot \left(x1 \cdot \left(x1 \cdot \left(x1 + \left(3 + x2 \cdot 2\right)\right)\right)\right)\\
\end{array}
\end{array}
if x1 < -5.0000000000000001e93Initial program 0.0%
Taylor expanded in x1 around 0 0.0%
+-commutative0.0%
neg-mul-10.0%
unsub-neg0.0%
*-commutative0.0%
Simplified0.0%
Taylor expanded in x1 around 0 0.0%
*-commutative0.0%
Simplified0.0%
Taylor expanded in x1 around inf 100.0%
if -5.0000000000000001e93 < x1 < 5.8000000000000003e82Initial program 99.2%
Taylor expanded in x1 around 0 93.0%
*-commutative90.7%
Simplified93.0%
if 5.8000000000000003e82 < x1 Initial program 24.5%
Taylor expanded in x1 around 0 11.9%
Taylor expanded in x1 around 0 81.1%
+-commutative81.1%
mul-1-neg81.1%
unsub-neg81.1%
*-commutative81.1%
fma-def81.1%
+-commutative81.1%
cube-mult81.1%
unpow281.1%
distribute-rgt-out92.5%
unpow292.5%
*-commutative92.5%
Simplified92.5%
Taylor expanded in x1 around inf 81.1%
distribute-lft-out81.1%
*-commutative81.1%
unpow381.1%
unpow281.1%
distribute-lft-in96.2%
+-commutative96.2%
unpow296.2%
associate-*l*96.2%
*-commutative96.2%
cancel-sign-sub-inv96.2%
metadata-eval96.2%
*-commutative96.2%
Simplified96.2%
Final simplification94.8%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (+ 1.0 (* x1 x1)))
(t_1 (* x1 (* x1 x1)))
(t_2 (* x1 (* x1 3.0)))
(t_3 (* 3.0 (/ (- (- t_2 (* x2 2.0)) x1) t_0)))
(t_4 (/ (- (+ t_2 (* x2 2.0)) x1) t_0))
(t_5 (* (* x1 x1) (- (* 4.0 t_4) 6.0)))
(t_6 (* t_2 t_4))
(t_7 (- t_4 3.0))
(t_8 (- (* x2 2.0) x1)))
(if (<= x1 -3.4e+84)
(+ x1 (* 3.0 (* x1 (* x1 (+ x1 (+ 3.0 (* x2 2.0)))))))
(if (<= x1 -22000000000.0)
(+
x1
(+
(+ x1 (+ t_1 (+ t_6 (* t_0 (+ t_5 (* t_7 (* (* x1 2.0) t_8)))))))
(- 9.0 (/ 3.0 x1))))
(if (<= x1 170.0)
(+
x1
(+
t_3
(+
x1
(+
t_1
(+
(*
t_0
(+
(* (* (* x1 2.0) t_4) t_7)
(* (* x1 x1) (- (* 4.0 t_8) 6.0))))
(* t_2 t_8))))))
(if (<= x1 2e+123)
(+
x1
(+
t_3
(+
x1
(+
t_1
(+
t_6
(* t_0 (+ t_5 (* 4.0 (* x2 (* x1 (- (* x2 2.0) 3.0)))))))))))
(+ x1 (+ x1 (* 3.0 (- (* (* x1 x1) (+ x1 3.0)) x1))))))))))
double code(double x1, double x2) {
double t_0 = 1.0 + (x1 * x1);
double t_1 = x1 * (x1 * x1);
double t_2 = x1 * (x1 * 3.0);
double t_3 = 3.0 * (((t_2 - (x2 * 2.0)) - x1) / t_0);
double t_4 = ((t_2 + (x2 * 2.0)) - x1) / t_0;
double t_5 = (x1 * x1) * ((4.0 * t_4) - 6.0);
double t_6 = t_2 * t_4;
double t_7 = t_4 - 3.0;
double t_8 = (x2 * 2.0) - x1;
double tmp;
if (x1 <= -3.4e+84) {
tmp = x1 + (3.0 * (x1 * (x1 * (x1 + (3.0 + (x2 * 2.0))))));
} else if (x1 <= -22000000000.0) {
tmp = x1 + ((x1 + (t_1 + (t_6 + (t_0 * (t_5 + (t_7 * ((x1 * 2.0) * t_8))))))) + (9.0 - (3.0 / x1)));
} else if (x1 <= 170.0) {
tmp = x1 + (t_3 + (x1 + (t_1 + ((t_0 * ((((x1 * 2.0) * t_4) * t_7) + ((x1 * x1) * ((4.0 * t_8) - 6.0)))) + (t_2 * t_8)))));
} else if (x1 <= 2e+123) {
tmp = x1 + (t_3 + (x1 + (t_1 + (t_6 + (t_0 * (t_5 + (4.0 * (x2 * (x1 * ((x2 * 2.0) - 3.0))))))))));
} else {
tmp = x1 + (x1 + (3.0 * (((x1 * x1) * (x1 + 3.0)) - x1)));
}
return tmp;
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
real(8) :: t_0
real(8) :: t_1
real(8) :: t_2
real(8) :: t_3
real(8) :: t_4
real(8) :: t_5
real(8) :: t_6
real(8) :: t_7
real(8) :: t_8
real(8) :: tmp
t_0 = 1.0d0 + (x1 * x1)
t_1 = x1 * (x1 * x1)
t_2 = x1 * (x1 * 3.0d0)
t_3 = 3.0d0 * (((t_2 - (x2 * 2.0d0)) - x1) / t_0)
t_4 = ((t_2 + (x2 * 2.0d0)) - x1) / t_0
t_5 = (x1 * x1) * ((4.0d0 * t_4) - 6.0d0)
t_6 = t_2 * t_4
t_7 = t_4 - 3.0d0
t_8 = (x2 * 2.0d0) - x1
if (x1 <= (-3.4d+84)) then
tmp = x1 + (3.0d0 * (x1 * (x1 * (x1 + (3.0d0 + (x2 * 2.0d0))))))
else if (x1 <= (-22000000000.0d0)) then
tmp = x1 + ((x1 + (t_1 + (t_6 + (t_0 * (t_5 + (t_7 * ((x1 * 2.0d0) * t_8))))))) + (9.0d0 - (3.0d0 / x1)))
else if (x1 <= 170.0d0) then
tmp = x1 + (t_3 + (x1 + (t_1 + ((t_0 * ((((x1 * 2.0d0) * t_4) * t_7) + ((x1 * x1) * ((4.0d0 * t_8) - 6.0d0)))) + (t_2 * t_8)))))
else if (x1 <= 2d+123) then
tmp = x1 + (t_3 + (x1 + (t_1 + (t_6 + (t_0 * (t_5 + (4.0d0 * (x2 * (x1 * ((x2 * 2.0d0) - 3.0d0))))))))))
else
tmp = x1 + (x1 + (3.0d0 * (((x1 * x1) * (x1 + 3.0d0)) - x1)))
end if
code = tmp
end function
public static double code(double x1, double x2) {
double t_0 = 1.0 + (x1 * x1);
double t_1 = x1 * (x1 * x1);
double t_2 = x1 * (x1 * 3.0);
double t_3 = 3.0 * (((t_2 - (x2 * 2.0)) - x1) / t_0);
double t_4 = ((t_2 + (x2 * 2.0)) - x1) / t_0;
double t_5 = (x1 * x1) * ((4.0 * t_4) - 6.0);
double t_6 = t_2 * t_4;
double t_7 = t_4 - 3.0;
double t_8 = (x2 * 2.0) - x1;
double tmp;
if (x1 <= -3.4e+84) {
tmp = x1 + (3.0 * (x1 * (x1 * (x1 + (3.0 + (x2 * 2.0))))));
} else if (x1 <= -22000000000.0) {
tmp = x1 + ((x1 + (t_1 + (t_6 + (t_0 * (t_5 + (t_7 * ((x1 * 2.0) * t_8))))))) + (9.0 - (3.0 / x1)));
} else if (x1 <= 170.0) {
tmp = x1 + (t_3 + (x1 + (t_1 + ((t_0 * ((((x1 * 2.0) * t_4) * t_7) + ((x1 * x1) * ((4.0 * t_8) - 6.0)))) + (t_2 * t_8)))));
} else if (x1 <= 2e+123) {
tmp = x1 + (t_3 + (x1 + (t_1 + (t_6 + (t_0 * (t_5 + (4.0 * (x2 * (x1 * ((x2 * 2.0) - 3.0))))))))));
} else {
tmp = x1 + (x1 + (3.0 * (((x1 * x1) * (x1 + 3.0)) - x1)));
}
return tmp;
}
def code(x1, x2): t_0 = 1.0 + (x1 * x1) t_1 = x1 * (x1 * x1) t_2 = x1 * (x1 * 3.0) t_3 = 3.0 * (((t_2 - (x2 * 2.0)) - x1) / t_0) t_4 = ((t_2 + (x2 * 2.0)) - x1) / t_0 t_5 = (x1 * x1) * ((4.0 * t_4) - 6.0) t_6 = t_2 * t_4 t_7 = t_4 - 3.0 t_8 = (x2 * 2.0) - x1 tmp = 0 if x1 <= -3.4e+84: tmp = x1 + (3.0 * (x1 * (x1 * (x1 + (3.0 + (x2 * 2.0)))))) elif x1 <= -22000000000.0: tmp = x1 + ((x1 + (t_1 + (t_6 + (t_0 * (t_5 + (t_7 * ((x1 * 2.0) * t_8))))))) + (9.0 - (3.0 / x1))) elif x1 <= 170.0: tmp = x1 + (t_3 + (x1 + (t_1 + ((t_0 * ((((x1 * 2.0) * t_4) * t_7) + ((x1 * x1) * ((4.0 * t_8) - 6.0)))) + (t_2 * t_8))))) elif x1 <= 2e+123: tmp = x1 + (t_3 + (x1 + (t_1 + (t_6 + (t_0 * (t_5 + (4.0 * (x2 * (x1 * ((x2 * 2.0) - 3.0)))))))))) else: tmp = x1 + (x1 + (3.0 * (((x1 * x1) * (x1 + 3.0)) - x1))) return tmp
function code(x1, x2) t_0 = Float64(1.0 + Float64(x1 * x1)) t_1 = Float64(x1 * Float64(x1 * x1)) t_2 = Float64(x1 * Float64(x1 * 3.0)) t_3 = Float64(3.0 * Float64(Float64(Float64(t_2 - Float64(x2 * 2.0)) - x1) / t_0)) t_4 = Float64(Float64(Float64(t_2 + Float64(x2 * 2.0)) - x1) / t_0) t_5 = Float64(Float64(x1 * x1) * Float64(Float64(4.0 * t_4) - 6.0)) t_6 = Float64(t_2 * t_4) t_7 = Float64(t_4 - 3.0) t_8 = Float64(Float64(x2 * 2.0) - x1) tmp = 0.0 if (x1 <= -3.4e+84) tmp = Float64(x1 + Float64(3.0 * Float64(x1 * Float64(x1 * Float64(x1 + Float64(3.0 + Float64(x2 * 2.0))))))); elseif (x1 <= -22000000000.0) tmp = Float64(x1 + Float64(Float64(x1 + Float64(t_1 + Float64(t_6 + Float64(t_0 * Float64(t_5 + Float64(t_7 * Float64(Float64(x1 * 2.0) * t_8))))))) + Float64(9.0 - Float64(3.0 / x1)))); elseif (x1 <= 170.0) tmp = Float64(x1 + Float64(t_3 + Float64(x1 + Float64(t_1 + Float64(Float64(t_0 * Float64(Float64(Float64(Float64(x1 * 2.0) * t_4) * t_7) + Float64(Float64(x1 * x1) * Float64(Float64(4.0 * t_8) - 6.0)))) + Float64(t_2 * t_8)))))); elseif (x1 <= 2e+123) tmp = Float64(x1 + Float64(t_3 + Float64(x1 + Float64(t_1 + Float64(t_6 + Float64(t_0 * Float64(t_5 + Float64(4.0 * Float64(x2 * Float64(x1 * Float64(Float64(x2 * 2.0) - 3.0))))))))))); else tmp = Float64(x1 + Float64(x1 + Float64(3.0 * Float64(Float64(Float64(x1 * x1) * Float64(x1 + 3.0)) - x1)))); end return tmp end
function tmp_2 = code(x1, x2) t_0 = 1.0 + (x1 * x1); t_1 = x1 * (x1 * x1); t_2 = x1 * (x1 * 3.0); t_3 = 3.0 * (((t_2 - (x2 * 2.0)) - x1) / t_0); t_4 = ((t_2 + (x2 * 2.0)) - x1) / t_0; t_5 = (x1 * x1) * ((4.0 * t_4) - 6.0); t_6 = t_2 * t_4; t_7 = t_4 - 3.0; t_8 = (x2 * 2.0) - x1; tmp = 0.0; if (x1 <= -3.4e+84) tmp = x1 + (3.0 * (x1 * (x1 * (x1 + (3.0 + (x2 * 2.0)))))); elseif (x1 <= -22000000000.0) tmp = x1 + ((x1 + (t_1 + (t_6 + (t_0 * (t_5 + (t_7 * ((x1 * 2.0) * t_8))))))) + (9.0 - (3.0 / x1))); elseif (x1 <= 170.0) tmp = x1 + (t_3 + (x1 + (t_1 + ((t_0 * ((((x1 * 2.0) * t_4) * t_7) + ((x1 * x1) * ((4.0 * t_8) - 6.0)))) + (t_2 * t_8))))); elseif (x1 <= 2e+123) tmp = x1 + (t_3 + (x1 + (t_1 + (t_6 + (t_0 * (t_5 + (4.0 * (x2 * (x1 * ((x2 * 2.0) - 3.0)))))))))); else tmp = x1 + (x1 + (3.0 * (((x1 * x1) * (x1 + 3.0)) - x1))); end tmp_2 = tmp; end
code[x1_, x2_] := Block[{t$95$0 = N[(1.0 + N[(x1 * x1), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(x1 * N[(x1 * x1), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x1 * N[(x1 * 3.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(3.0 * N[(N[(N[(t$95$2 - N[(x2 * 2.0), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[(N[(N[(t$95$2 + N[(x2 * 2.0), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$0), $MachinePrecision]}, Block[{t$95$5 = N[(N[(x1 * x1), $MachinePrecision] * N[(N[(4.0 * t$95$4), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$6 = N[(t$95$2 * t$95$4), $MachinePrecision]}, Block[{t$95$7 = N[(t$95$4 - 3.0), $MachinePrecision]}, Block[{t$95$8 = N[(N[(x2 * 2.0), $MachinePrecision] - x1), $MachinePrecision]}, If[LessEqual[x1, -3.4e+84], N[(x1 + N[(3.0 * N[(x1 * N[(x1 * N[(x1 + N[(3.0 + N[(x2 * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, -22000000000.0], N[(x1 + N[(N[(x1 + N[(t$95$1 + N[(t$95$6 + N[(t$95$0 * N[(t$95$5 + N[(t$95$7 * N[(N[(x1 * 2.0), $MachinePrecision] * t$95$8), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(9.0 - N[(3.0 / x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 170.0], N[(x1 + N[(t$95$3 + N[(x1 + N[(t$95$1 + N[(N[(t$95$0 * N[(N[(N[(N[(x1 * 2.0), $MachinePrecision] * t$95$4), $MachinePrecision] * t$95$7), $MachinePrecision] + N[(N[(x1 * x1), $MachinePrecision] * N[(N[(4.0 * t$95$8), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(t$95$2 * t$95$8), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 2e+123], N[(x1 + N[(t$95$3 + N[(x1 + N[(t$95$1 + N[(t$95$6 + N[(t$95$0 * N[(t$95$5 + N[(4.0 * N[(x2 * N[(x1 * N[(N[(x2 * 2.0), $MachinePrecision] - 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x1 + N[(x1 + N[(3.0 * N[(N[(N[(x1 * x1), $MachinePrecision] * N[(x1 + 3.0), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := 1 + x1 \cdot x1\\
t_1 := x1 \cdot \left(x1 \cdot x1\right)\\
t_2 := x1 \cdot \left(x1 \cdot 3\right)\\
t_3 := 3 \cdot \frac{\left(t_2 - x2 \cdot 2\right) - x1}{t_0}\\
t_4 := \frac{\left(t_2 + x2 \cdot 2\right) - x1}{t_0}\\
t_5 := \left(x1 \cdot x1\right) \cdot \left(4 \cdot t_4 - 6\right)\\
t_6 := t_2 \cdot t_4\\
t_7 := t_4 - 3\\
t_8 := x2 \cdot 2 - x1\\
\mathbf{if}\;x1 \leq -3.4 \cdot 10^{+84}:\\
\;\;\;\;x1 + 3 \cdot \left(x1 \cdot \left(x1 \cdot \left(x1 + \left(3 + x2 \cdot 2\right)\right)\right)\right)\\
\mathbf{elif}\;x1 \leq -22000000000:\\
\;\;\;\;x1 + \left(\left(x1 + \left(t_1 + \left(t_6 + t_0 \cdot \left(t_5 + t_7 \cdot \left(\left(x1 \cdot 2\right) \cdot t_8\right)\right)\right)\right)\right) + \left(9 - \frac{3}{x1}\right)\right)\\
\mathbf{elif}\;x1 \leq 170:\\
\;\;\;\;x1 + \left(t_3 + \left(x1 + \left(t_1 + \left(t_0 \cdot \left(\left(\left(x1 \cdot 2\right) \cdot t_4\right) \cdot t_7 + \left(x1 \cdot x1\right) \cdot \left(4 \cdot t_8 - 6\right)\right) + t_2 \cdot t_8\right)\right)\right)\right)\\
\mathbf{elif}\;x1 \leq 2 \cdot 10^{+123}:\\
\;\;\;\;x1 + \left(t_3 + \left(x1 + \left(t_1 + \left(t_6 + t_0 \cdot \left(t_5 + 4 \cdot \left(x2 \cdot \left(x1 \cdot \left(x2 \cdot 2 - 3\right)\right)\right)\right)\right)\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x1 + \left(x1 + 3 \cdot \left(\left(x1 \cdot x1\right) \cdot \left(x1 + 3\right) - x1\right)\right)\\
\end{array}
\end{array}
if x1 < -3.3999999999999998e84Initial program 2.4%
Taylor expanded in x1 around 0 0.1%
Taylor expanded in x1 around 0 0.0%
+-commutative0.0%
mul-1-neg0.0%
unsub-neg0.0%
*-commutative0.0%
fma-def0.0%
+-commutative0.0%
cube-mult0.0%
unpow20.0%
distribute-rgt-out0.0%
unpow20.0%
*-commutative0.0%
Simplified0.0%
Taylor expanded in x1 around inf 2.4%
distribute-lft-out2.4%
*-commutative2.4%
unpow32.4%
unpow22.4%
distribute-lft-in12.2%
+-commutative12.2%
unpow212.2%
associate-*l*12.2%
*-commutative12.2%
cancel-sign-sub-inv12.2%
metadata-eval12.2%
*-commutative12.2%
Simplified12.2%
if -3.3999999999999998e84 < x1 < -2.2e10Initial program 99.2%
Taylor expanded in x1 around 0 81.9%
+-commutative35.2%
neg-mul-135.2%
unsub-neg35.2%
*-commutative35.2%
Simplified81.9%
Taylor expanded in x1 around inf 81.9%
associate-*r/81.9%
metadata-eval81.9%
Simplified81.9%
if -2.2e10 < x1 < 170Initial program 99.3%
Taylor expanded in x1 around 0 97.5%
+-commutative97.5%
neg-mul-197.5%
unsub-neg97.5%
*-commutative97.5%
Simplified97.5%
Taylor expanded in x1 around 0 97.5%
+-commutative97.5%
neg-mul-197.5%
unsub-neg97.5%
*-commutative97.5%
Simplified97.5%
if 170 < x1 < 1.99999999999999996e123Initial program 93.1%
Taylor expanded in x1 around 0 75.4%
+-commutative20.2%
neg-mul-120.2%
unsub-neg20.2%
*-commutative20.2%
Simplified75.4%
Taylor expanded in x1 around 0 81.3%
if 1.99999999999999996e123 < x1 Initial program 11.6%
Taylor expanded in x1 around 0 5.0%
Taylor expanded in x1 around 0 83.7%
+-commutative83.7%
mul-1-neg83.7%
unsub-neg83.7%
*-commutative83.7%
fma-def83.7%
+-commutative83.7%
cube-mult83.7%
unpow283.7%
distribute-rgt-out97.7%
unpow297.7%
*-commutative97.7%
Simplified97.7%
Taylor expanded in x2 around 0 100.0%
unpow2100.0%
Simplified100.0%
Final simplification81.2%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (+ 1.0 (* x1 x1)))
(t_1 (* x1 (* x1 x1)))
(t_2 (* x1 (* x1 3.0)))
(t_3 (* 3.0 (/ (- (- t_2 (* x2 2.0)) x1) t_0)))
(t_4 (/ (- (+ t_2 (* x2 2.0)) x1) t_0))
(t_5 (* (* x1 x1) (- (* 4.0 t_4) 6.0)))
(t_6 (* t_2 t_4)))
(if (<= x1 -3.4e+84)
(+ x1 (* 3.0 (* x1 (* x1 (+ x1 (+ 3.0 (* x2 2.0)))))))
(if (<= x1 -3.6e+28)
(+
x1
(+
(+
x1
(+
t_1
(+
t_6
(* t_0 (+ t_5 (* (- t_4 3.0) (* (* x1 2.0) (- (* x2 2.0) x1))))))))
(- 9.0 (/ 3.0 x1))))
(if (<= x1 200.0)
(+ x1 (+ t_3 (+ x1 (* 8.0 (/ x2 (/ (+ x1 (/ 1.0 x1)) x2))))))
(if (<= x1 2e+123)
(+
x1
(+
t_3
(+
x1
(+
t_1
(+
t_6
(* t_0 (+ t_5 (* 4.0 (* x2 (* x1 (- (* x2 2.0) 3.0)))))))))))
(+ x1 (+ x1 (* 3.0 (- (* (* x1 x1) (+ x1 3.0)) x1))))))))))
double code(double x1, double x2) {
double t_0 = 1.0 + (x1 * x1);
double t_1 = x1 * (x1 * x1);
double t_2 = x1 * (x1 * 3.0);
double t_3 = 3.0 * (((t_2 - (x2 * 2.0)) - x1) / t_0);
double t_4 = ((t_2 + (x2 * 2.0)) - x1) / t_0;
double t_5 = (x1 * x1) * ((4.0 * t_4) - 6.0);
double t_6 = t_2 * t_4;
double tmp;
if (x1 <= -3.4e+84) {
tmp = x1 + (3.0 * (x1 * (x1 * (x1 + (3.0 + (x2 * 2.0))))));
} else if (x1 <= -3.6e+28) {
tmp = x1 + ((x1 + (t_1 + (t_6 + (t_0 * (t_5 + ((t_4 - 3.0) * ((x1 * 2.0) * ((x2 * 2.0) - x1)))))))) + (9.0 - (3.0 / x1)));
} else if (x1 <= 200.0) {
tmp = x1 + (t_3 + (x1 + (8.0 * (x2 / ((x1 + (1.0 / x1)) / x2)))));
} else if (x1 <= 2e+123) {
tmp = x1 + (t_3 + (x1 + (t_1 + (t_6 + (t_0 * (t_5 + (4.0 * (x2 * (x1 * ((x2 * 2.0) - 3.0))))))))));
} else {
tmp = x1 + (x1 + (3.0 * (((x1 * x1) * (x1 + 3.0)) - x1)));
}
return tmp;
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
real(8) :: t_0
real(8) :: t_1
real(8) :: t_2
real(8) :: t_3
real(8) :: t_4
real(8) :: t_5
real(8) :: t_6
real(8) :: tmp
t_0 = 1.0d0 + (x1 * x1)
t_1 = x1 * (x1 * x1)
t_2 = x1 * (x1 * 3.0d0)
t_3 = 3.0d0 * (((t_2 - (x2 * 2.0d0)) - x1) / t_0)
t_4 = ((t_2 + (x2 * 2.0d0)) - x1) / t_0
t_5 = (x1 * x1) * ((4.0d0 * t_4) - 6.0d0)
t_6 = t_2 * t_4
if (x1 <= (-3.4d+84)) then
tmp = x1 + (3.0d0 * (x1 * (x1 * (x1 + (3.0d0 + (x2 * 2.0d0))))))
else if (x1 <= (-3.6d+28)) then
tmp = x1 + ((x1 + (t_1 + (t_6 + (t_0 * (t_5 + ((t_4 - 3.0d0) * ((x1 * 2.0d0) * ((x2 * 2.0d0) - x1)))))))) + (9.0d0 - (3.0d0 / x1)))
else if (x1 <= 200.0d0) then
tmp = x1 + (t_3 + (x1 + (8.0d0 * (x2 / ((x1 + (1.0d0 / x1)) / x2)))))
else if (x1 <= 2d+123) then
tmp = x1 + (t_3 + (x1 + (t_1 + (t_6 + (t_0 * (t_5 + (4.0d0 * (x2 * (x1 * ((x2 * 2.0d0) - 3.0d0))))))))))
else
tmp = x1 + (x1 + (3.0d0 * (((x1 * x1) * (x1 + 3.0d0)) - x1)))
end if
code = tmp
end function
public static double code(double x1, double x2) {
double t_0 = 1.0 + (x1 * x1);
double t_1 = x1 * (x1 * x1);
double t_2 = x1 * (x1 * 3.0);
double t_3 = 3.0 * (((t_2 - (x2 * 2.0)) - x1) / t_0);
double t_4 = ((t_2 + (x2 * 2.0)) - x1) / t_0;
double t_5 = (x1 * x1) * ((4.0 * t_4) - 6.0);
double t_6 = t_2 * t_4;
double tmp;
if (x1 <= -3.4e+84) {
tmp = x1 + (3.0 * (x1 * (x1 * (x1 + (3.0 + (x2 * 2.0))))));
} else if (x1 <= -3.6e+28) {
tmp = x1 + ((x1 + (t_1 + (t_6 + (t_0 * (t_5 + ((t_4 - 3.0) * ((x1 * 2.0) * ((x2 * 2.0) - x1)))))))) + (9.0 - (3.0 / x1)));
} else if (x1 <= 200.0) {
tmp = x1 + (t_3 + (x1 + (8.0 * (x2 / ((x1 + (1.0 / x1)) / x2)))));
} else if (x1 <= 2e+123) {
tmp = x1 + (t_3 + (x1 + (t_1 + (t_6 + (t_0 * (t_5 + (4.0 * (x2 * (x1 * ((x2 * 2.0) - 3.0))))))))));
} else {
tmp = x1 + (x1 + (3.0 * (((x1 * x1) * (x1 + 3.0)) - x1)));
}
return tmp;
}
def code(x1, x2): t_0 = 1.0 + (x1 * x1) t_1 = x1 * (x1 * x1) t_2 = x1 * (x1 * 3.0) t_3 = 3.0 * (((t_2 - (x2 * 2.0)) - x1) / t_0) t_4 = ((t_2 + (x2 * 2.0)) - x1) / t_0 t_5 = (x1 * x1) * ((4.0 * t_4) - 6.0) t_6 = t_2 * t_4 tmp = 0 if x1 <= -3.4e+84: tmp = x1 + (3.0 * (x1 * (x1 * (x1 + (3.0 + (x2 * 2.0)))))) elif x1 <= -3.6e+28: tmp = x1 + ((x1 + (t_1 + (t_6 + (t_0 * (t_5 + ((t_4 - 3.0) * ((x1 * 2.0) * ((x2 * 2.0) - x1)))))))) + (9.0 - (3.0 / x1))) elif x1 <= 200.0: tmp = x1 + (t_3 + (x1 + (8.0 * (x2 / ((x1 + (1.0 / x1)) / x2))))) elif x1 <= 2e+123: tmp = x1 + (t_3 + (x1 + (t_1 + (t_6 + (t_0 * (t_5 + (4.0 * (x2 * (x1 * ((x2 * 2.0) - 3.0)))))))))) else: tmp = x1 + (x1 + (3.0 * (((x1 * x1) * (x1 + 3.0)) - x1))) return tmp
function code(x1, x2) t_0 = Float64(1.0 + Float64(x1 * x1)) t_1 = Float64(x1 * Float64(x1 * x1)) t_2 = Float64(x1 * Float64(x1 * 3.0)) t_3 = Float64(3.0 * Float64(Float64(Float64(t_2 - Float64(x2 * 2.0)) - x1) / t_0)) t_4 = Float64(Float64(Float64(t_2 + Float64(x2 * 2.0)) - x1) / t_0) t_5 = Float64(Float64(x1 * x1) * Float64(Float64(4.0 * t_4) - 6.0)) t_6 = Float64(t_2 * t_4) tmp = 0.0 if (x1 <= -3.4e+84) tmp = Float64(x1 + Float64(3.0 * Float64(x1 * Float64(x1 * Float64(x1 + Float64(3.0 + Float64(x2 * 2.0))))))); elseif (x1 <= -3.6e+28) tmp = Float64(x1 + Float64(Float64(x1 + Float64(t_1 + Float64(t_6 + Float64(t_0 * Float64(t_5 + Float64(Float64(t_4 - 3.0) * Float64(Float64(x1 * 2.0) * Float64(Float64(x2 * 2.0) - x1)))))))) + Float64(9.0 - Float64(3.0 / x1)))); elseif (x1 <= 200.0) tmp = Float64(x1 + Float64(t_3 + Float64(x1 + Float64(8.0 * Float64(x2 / Float64(Float64(x1 + Float64(1.0 / x1)) / x2)))))); elseif (x1 <= 2e+123) tmp = Float64(x1 + Float64(t_3 + Float64(x1 + Float64(t_1 + Float64(t_6 + Float64(t_0 * Float64(t_5 + Float64(4.0 * Float64(x2 * Float64(x1 * Float64(Float64(x2 * 2.0) - 3.0))))))))))); else tmp = Float64(x1 + Float64(x1 + Float64(3.0 * Float64(Float64(Float64(x1 * x1) * Float64(x1 + 3.0)) - x1)))); end return tmp end
function tmp_2 = code(x1, x2) t_0 = 1.0 + (x1 * x1); t_1 = x1 * (x1 * x1); t_2 = x1 * (x1 * 3.0); t_3 = 3.0 * (((t_2 - (x2 * 2.0)) - x1) / t_0); t_4 = ((t_2 + (x2 * 2.0)) - x1) / t_0; t_5 = (x1 * x1) * ((4.0 * t_4) - 6.0); t_6 = t_2 * t_4; tmp = 0.0; if (x1 <= -3.4e+84) tmp = x1 + (3.0 * (x1 * (x1 * (x1 + (3.0 + (x2 * 2.0)))))); elseif (x1 <= -3.6e+28) tmp = x1 + ((x1 + (t_1 + (t_6 + (t_0 * (t_5 + ((t_4 - 3.0) * ((x1 * 2.0) * ((x2 * 2.0) - x1)))))))) + (9.0 - (3.0 / x1))); elseif (x1 <= 200.0) tmp = x1 + (t_3 + (x1 + (8.0 * (x2 / ((x1 + (1.0 / x1)) / x2))))); elseif (x1 <= 2e+123) tmp = x1 + (t_3 + (x1 + (t_1 + (t_6 + (t_0 * (t_5 + (4.0 * (x2 * (x1 * ((x2 * 2.0) - 3.0)))))))))); else tmp = x1 + (x1 + (3.0 * (((x1 * x1) * (x1 + 3.0)) - x1))); end tmp_2 = tmp; end
code[x1_, x2_] := Block[{t$95$0 = N[(1.0 + N[(x1 * x1), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(x1 * N[(x1 * x1), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x1 * N[(x1 * 3.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(3.0 * N[(N[(N[(t$95$2 - N[(x2 * 2.0), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[(N[(N[(t$95$2 + N[(x2 * 2.0), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$0), $MachinePrecision]}, Block[{t$95$5 = N[(N[(x1 * x1), $MachinePrecision] * N[(N[(4.0 * t$95$4), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$6 = N[(t$95$2 * t$95$4), $MachinePrecision]}, If[LessEqual[x1, -3.4e+84], N[(x1 + N[(3.0 * N[(x1 * N[(x1 * N[(x1 + N[(3.0 + N[(x2 * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, -3.6e+28], N[(x1 + N[(N[(x1 + N[(t$95$1 + N[(t$95$6 + N[(t$95$0 * N[(t$95$5 + N[(N[(t$95$4 - 3.0), $MachinePrecision] * N[(N[(x1 * 2.0), $MachinePrecision] * N[(N[(x2 * 2.0), $MachinePrecision] - x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(9.0 - N[(3.0 / x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 200.0], N[(x1 + N[(t$95$3 + N[(x1 + N[(8.0 * N[(x2 / N[(N[(x1 + N[(1.0 / x1), $MachinePrecision]), $MachinePrecision] / x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 2e+123], N[(x1 + N[(t$95$3 + N[(x1 + N[(t$95$1 + N[(t$95$6 + N[(t$95$0 * N[(t$95$5 + N[(4.0 * N[(x2 * N[(x1 * N[(N[(x2 * 2.0), $MachinePrecision] - 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x1 + N[(x1 + N[(3.0 * N[(N[(N[(x1 * x1), $MachinePrecision] * N[(x1 + 3.0), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := 1 + x1 \cdot x1\\
t_1 := x1 \cdot \left(x1 \cdot x1\right)\\
t_2 := x1 \cdot \left(x1 \cdot 3\right)\\
t_3 := 3 \cdot \frac{\left(t_2 - x2 \cdot 2\right) - x1}{t_0}\\
t_4 := \frac{\left(t_2 + x2 \cdot 2\right) - x1}{t_0}\\
t_5 := \left(x1 \cdot x1\right) \cdot \left(4 \cdot t_4 - 6\right)\\
t_6 := t_2 \cdot t_4\\
\mathbf{if}\;x1 \leq -3.4 \cdot 10^{+84}:\\
\;\;\;\;x1 + 3 \cdot \left(x1 \cdot \left(x1 \cdot \left(x1 + \left(3 + x2 \cdot 2\right)\right)\right)\right)\\
\mathbf{elif}\;x1 \leq -3.6 \cdot 10^{+28}:\\
\;\;\;\;x1 + \left(\left(x1 + \left(t_1 + \left(t_6 + t_0 \cdot \left(t_5 + \left(t_4 - 3\right) \cdot \left(\left(x1 \cdot 2\right) \cdot \left(x2 \cdot 2 - x1\right)\right)\right)\right)\right)\right) + \left(9 - \frac{3}{x1}\right)\right)\\
\mathbf{elif}\;x1 \leq 200:\\
\;\;\;\;x1 + \left(t_3 + \left(x1 + 8 \cdot \frac{x2}{\frac{x1 + \frac{1}{x1}}{x2}}\right)\right)\\
\mathbf{elif}\;x1 \leq 2 \cdot 10^{+123}:\\
\;\;\;\;x1 + \left(t_3 + \left(x1 + \left(t_1 + \left(t_6 + t_0 \cdot \left(t_5 + 4 \cdot \left(x2 \cdot \left(x1 \cdot \left(x2 \cdot 2 - 3\right)\right)\right)\right)\right)\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x1 + \left(x1 + 3 \cdot \left(\left(x1 \cdot x1\right) \cdot \left(x1 + 3\right) - x1\right)\right)\\
\end{array}
\end{array}
if x1 < -3.3999999999999998e84Initial program 2.4%
Taylor expanded in x1 around 0 0.1%
Taylor expanded in x1 around 0 0.0%
+-commutative0.0%
mul-1-neg0.0%
unsub-neg0.0%
*-commutative0.0%
fma-def0.0%
+-commutative0.0%
cube-mult0.0%
unpow20.0%
distribute-rgt-out0.0%
unpow20.0%
*-commutative0.0%
Simplified0.0%
Taylor expanded in x1 around inf 2.4%
distribute-lft-out2.4%
*-commutative2.4%
unpow32.4%
unpow22.4%
distribute-lft-in12.2%
+-commutative12.2%
unpow212.2%
associate-*l*12.2%
*-commutative12.2%
cancel-sign-sub-inv12.2%
metadata-eval12.2%
*-commutative12.2%
Simplified12.2%
if -3.3999999999999998e84 < x1 < -3.5999999999999999e28Initial program 99.1%
Taylor expanded in x1 around 0 91.9%
+-commutative34.5%
neg-mul-134.5%
unsub-neg34.5%
*-commutative34.5%
Simplified91.9%
Taylor expanded in x1 around inf 91.9%
associate-*r/91.9%
metadata-eval91.9%
Simplified91.9%
if -3.5999999999999999e28 < x1 < 200Initial program 99.3%
Taylor expanded in x2 around inf 83.2%
associate-/l*83.2%
unpow283.2%
+-commutative83.2%
unpow283.2%
fma-udef83.2%
Simplified83.2%
Taylor expanded in x1 around 0 83.2%
Taylor expanded in x2 around 0 83.2%
unpow283.2%
associate-/l*95.9%
Simplified95.9%
if 200 < x1 < 1.99999999999999996e123Initial program 93.1%
Taylor expanded in x1 around 0 75.4%
+-commutative20.2%
neg-mul-120.2%
unsub-neg20.2%
*-commutative20.2%
Simplified75.4%
Taylor expanded in x1 around 0 81.3%
if 1.99999999999999996e123 < x1 Initial program 11.6%
Taylor expanded in x1 around 0 5.0%
Taylor expanded in x1 around 0 83.7%
+-commutative83.7%
mul-1-neg83.7%
unsub-neg83.7%
*-commutative83.7%
fma-def83.7%
+-commutative83.7%
cube-mult83.7%
unpow283.7%
distribute-rgt-out97.7%
unpow297.7%
*-commutative97.7%
Simplified97.7%
Taylor expanded in x2 around 0 100.0%
unpow2100.0%
Simplified100.0%
Final simplification81.1%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (* x1 (* x1 3.0)))
(t_1 (+ 1.0 (* x1 x1)))
(t_2 (/ (- (+ t_0 (* x2 2.0)) x1) t_1)))
(if (<= x1 -3.4e+84)
(+ x1 (* 3.0 (* x1 (* x1 (+ x1 (+ 3.0 (* x2 2.0)))))))
(if (<= x1 2e+123)
(+
x1
(+
(* 3.0 (/ (- (- t_0 (* x2 2.0)) x1) t_1))
(+
x1
(+
(* x1 (* x1 x1))
(+
(* t_0 t_2)
(*
t_1
(+
(* (* x1 x1) (- (* 4.0 t_2) 6.0))
(* 4.0 (* x2 (* x1 (- (* x2 2.0) 3.0)))))))))))
(+ x1 (+ x1 (* 3.0 (- (* (* x1 x1) (+ x1 3.0)) x1))))))))
double code(double x1, double x2) {
double t_0 = x1 * (x1 * 3.0);
double t_1 = 1.0 + (x1 * x1);
double t_2 = ((t_0 + (x2 * 2.0)) - x1) / t_1;
double tmp;
if (x1 <= -3.4e+84) {
tmp = x1 + (3.0 * (x1 * (x1 * (x1 + (3.0 + (x2 * 2.0))))));
} else if (x1 <= 2e+123) {
tmp = x1 + ((3.0 * (((t_0 - (x2 * 2.0)) - x1) / t_1)) + (x1 + ((x1 * (x1 * x1)) + ((t_0 * t_2) + (t_1 * (((x1 * x1) * ((4.0 * t_2) - 6.0)) + (4.0 * (x2 * (x1 * ((x2 * 2.0) - 3.0))))))))));
} else {
tmp = x1 + (x1 + (3.0 * (((x1 * x1) * (x1 + 3.0)) - x1)));
}
return tmp;
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
real(8) :: t_0
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_0 = x1 * (x1 * 3.0d0)
t_1 = 1.0d0 + (x1 * x1)
t_2 = ((t_0 + (x2 * 2.0d0)) - x1) / t_1
if (x1 <= (-3.4d+84)) then
tmp = x1 + (3.0d0 * (x1 * (x1 * (x1 + (3.0d0 + (x2 * 2.0d0))))))
else if (x1 <= 2d+123) then
tmp = x1 + ((3.0d0 * (((t_0 - (x2 * 2.0d0)) - x1) / t_1)) + (x1 + ((x1 * (x1 * x1)) + ((t_0 * t_2) + (t_1 * (((x1 * x1) * ((4.0d0 * t_2) - 6.0d0)) + (4.0d0 * (x2 * (x1 * ((x2 * 2.0d0) - 3.0d0))))))))))
else
tmp = x1 + (x1 + (3.0d0 * (((x1 * x1) * (x1 + 3.0d0)) - x1)))
end if
code = tmp
end function
public static double code(double x1, double x2) {
double t_0 = x1 * (x1 * 3.0);
double t_1 = 1.0 + (x1 * x1);
double t_2 = ((t_0 + (x2 * 2.0)) - x1) / t_1;
double tmp;
if (x1 <= -3.4e+84) {
tmp = x1 + (3.0 * (x1 * (x1 * (x1 + (3.0 + (x2 * 2.0))))));
} else if (x1 <= 2e+123) {
tmp = x1 + ((3.0 * (((t_0 - (x2 * 2.0)) - x1) / t_1)) + (x1 + ((x1 * (x1 * x1)) + ((t_0 * t_2) + (t_1 * (((x1 * x1) * ((4.0 * t_2) - 6.0)) + (4.0 * (x2 * (x1 * ((x2 * 2.0) - 3.0))))))))));
} else {
tmp = x1 + (x1 + (3.0 * (((x1 * x1) * (x1 + 3.0)) - x1)));
}
return tmp;
}
def code(x1, x2): t_0 = x1 * (x1 * 3.0) t_1 = 1.0 + (x1 * x1) t_2 = ((t_0 + (x2 * 2.0)) - x1) / t_1 tmp = 0 if x1 <= -3.4e+84: tmp = x1 + (3.0 * (x1 * (x1 * (x1 + (3.0 + (x2 * 2.0)))))) elif x1 <= 2e+123: tmp = x1 + ((3.0 * (((t_0 - (x2 * 2.0)) - x1) / t_1)) + (x1 + ((x1 * (x1 * x1)) + ((t_0 * t_2) + (t_1 * (((x1 * x1) * ((4.0 * t_2) - 6.0)) + (4.0 * (x2 * (x1 * ((x2 * 2.0) - 3.0)))))))))) else: tmp = x1 + (x1 + (3.0 * (((x1 * x1) * (x1 + 3.0)) - x1))) return tmp
function code(x1, x2) t_0 = Float64(x1 * Float64(x1 * 3.0)) t_1 = Float64(1.0 + Float64(x1 * x1)) t_2 = Float64(Float64(Float64(t_0 + Float64(x2 * 2.0)) - x1) / t_1) tmp = 0.0 if (x1 <= -3.4e+84) tmp = Float64(x1 + Float64(3.0 * Float64(x1 * Float64(x1 * Float64(x1 + Float64(3.0 + Float64(x2 * 2.0))))))); elseif (x1 <= 2e+123) 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(t_0 * t_2) + Float64(t_1 * Float64(Float64(Float64(x1 * x1) * Float64(Float64(4.0 * t_2) - 6.0)) + Float64(4.0 * Float64(x2 * Float64(x1 * Float64(Float64(x2 * 2.0) - 3.0))))))))))); else tmp = Float64(x1 + Float64(x1 + Float64(3.0 * Float64(Float64(Float64(x1 * x1) * Float64(x1 + 3.0)) - x1)))); end return tmp end
function tmp_2 = code(x1, x2) t_0 = x1 * (x1 * 3.0); t_1 = 1.0 + (x1 * x1); t_2 = ((t_0 + (x2 * 2.0)) - x1) / t_1; tmp = 0.0; if (x1 <= -3.4e+84) tmp = x1 + (3.0 * (x1 * (x1 * (x1 + (3.0 + (x2 * 2.0)))))); elseif (x1 <= 2e+123) tmp = x1 + ((3.0 * (((t_0 - (x2 * 2.0)) - x1) / t_1)) + (x1 + ((x1 * (x1 * x1)) + ((t_0 * t_2) + (t_1 * (((x1 * x1) * ((4.0 * t_2) - 6.0)) + (4.0 * (x2 * (x1 * ((x2 * 2.0) - 3.0)))))))))); else tmp = x1 + (x1 + (3.0 * (((x1 * x1) * (x1 + 3.0)) - x1))); end tmp_2 = tmp; end
code[x1_, x2_] := Block[{t$95$0 = N[(x1 * N[(x1 * 3.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(1.0 + N[(x1 * x1), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[(t$95$0 + N[(x2 * 2.0), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$1), $MachinePrecision]}, If[LessEqual[x1, -3.4e+84], N[(x1 + N[(3.0 * N[(x1 * N[(x1 * N[(x1 + N[(3.0 + N[(x2 * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 2e+123], 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[(t$95$0 * t$95$2), $MachinePrecision] + N[(t$95$1 * N[(N[(N[(x1 * x1), $MachinePrecision] * N[(N[(4.0 * t$95$2), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision] + N[(4.0 * N[(x2 * N[(x1 * N[(N[(x2 * 2.0), $MachinePrecision] - 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x1 + N[(x1 + N[(3.0 * N[(N[(N[(x1 * x1), $MachinePrecision] * N[(x1 + 3.0), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x1 \cdot \left(x1 \cdot 3\right)\\
t_1 := 1 + x1 \cdot x1\\
t_2 := \frac{\left(t_0 + x2 \cdot 2\right) - x1}{t_1}\\
\mathbf{if}\;x1 \leq -3.4 \cdot 10^{+84}:\\
\;\;\;\;x1 + 3 \cdot \left(x1 \cdot \left(x1 \cdot \left(x1 + \left(3 + x2 \cdot 2\right)\right)\right)\right)\\
\mathbf{elif}\;x1 \leq 2 \cdot 10^{+123}:\\
\;\;\;\;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(t_0 \cdot t_2 + t_1 \cdot \left(\left(x1 \cdot x1\right) \cdot \left(4 \cdot t_2 - 6\right) + 4 \cdot \left(x2 \cdot \left(x1 \cdot \left(x2 \cdot 2 - 3\right)\right)\right)\right)\right)\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x1 + \left(x1 + 3 \cdot \left(\left(x1 \cdot x1\right) \cdot \left(x1 + 3\right) - x1\right)\right)\\
\end{array}
\end{array}
if x1 < -3.3999999999999998e84Initial program 2.4%
Taylor expanded in x1 around 0 0.1%
Taylor expanded in x1 around 0 0.0%
+-commutative0.0%
mul-1-neg0.0%
unsub-neg0.0%
*-commutative0.0%
fma-def0.0%
+-commutative0.0%
cube-mult0.0%
unpow20.0%
distribute-rgt-out0.0%
unpow20.0%
*-commutative0.0%
Simplified0.0%
Taylor expanded in x1 around inf 2.4%
distribute-lft-out2.4%
*-commutative2.4%
unpow32.4%
unpow22.4%
distribute-lft-in12.2%
+-commutative12.2%
unpow212.2%
associate-*l*12.2%
*-commutative12.2%
cancel-sign-sub-inv12.2%
metadata-eval12.2%
*-commutative12.2%
Simplified12.2%
if -3.3999999999999998e84 < x1 < 1.99999999999999996e123Initial program 98.1%
Taylor expanded in x1 around 0 91.2%
+-commutative77.3%
neg-mul-177.3%
unsub-neg77.3%
*-commutative77.3%
Simplified91.2%
Taylor expanded in x1 around 0 90.5%
if 1.99999999999999996e123 < x1 Initial program 11.6%
Taylor expanded in x1 around 0 5.0%
Taylor expanded in x1 around 0 83.7%
+-commutative83.7%
mul-1-neg83.7%
unsub-neg83.7%
*-commutative83.7%
fma-def83.7%
+-commutative83.7%
cube-mult83.7%
unpow283.7%
distribute-rgt-out97.7%
unpow297.7%
*-commutative97.7%
Simplified97.7%
Taylor expanded in x2 around 0 100.0%
unpow2100.0%
Simplified100.0%
Final simplification79.6%
(FPCore (x1 x2)
:precision binary64
(if (or (<= x1 -1.1e+77) (not (<= x1 7.6e+81)))
(+ x1 (* 3.0 (* x1 (* x1 (+ x1 (+ 3.0 (* x2 2.0)))))))
(+
x1
(+
(* 3.0 (/ (- (- (* x1 (* x1 3.0)) (* x2 2.0)) x1) (+ 1.0 (* x1 x1))))
(+ x1 (* 4.0 (* x2 (* x1 (- (* x2 2.0) 3.0)))))))))
double code(double x1, double x2) {
double tmp;
if ((x1 <= -1.1e+77) || !(x1 <= 7.6e+81)) {
tmp = x1 + (3.0 * (x1 * (x1 * (x1 + (3.0 + (x2 * 2.0))))));
} else {
tmp = x1 + ((3.0 * ((((x1 * (x1 * 3.0)) - (x2 * 2.0)) - x1) / (1.0 + (x1 * 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.1d+77)) .or. (.not. (x1 <= 7.6d+81))) then
tmp = x1 + (3.0d0 * (x1 * (x1 * (x1 + (3.0d0 + (x2 * 2.0d0))))))
else
tmp = x1 + ((3.0d0 * ((((x1 * (x1 * 3.0d0)) - (x2 * 2.0d0)) - x1) / (1.0d0 + (x1 * 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.1e+77) || !(x1 <= 7.6e+81)) {
tmp = x1 + (3.0 * (x1 * (x1 * (x1 + (3.0 + (x2 * 2.0))))));
} else {
tmp = x1 + ((3.0 * ((((x1 * (x1 * 3.0)) - (x2 * 2.0)) - x1) / (1.0 + (x1 * x1)))) + (x1 + (4.0 * (x2 * (x1 * ((x2 * 2.0) - 3.0))))));
}
return tmp;
}
def code(x1, x2): tmp = 0 if (x1 <= -1.1e+77) or not (x1 <= 7.6e+81): tmp = x1 + (3.0 * (x1 * (x1 * (x1 + (3.0 + (x2 * 2.0)))))) else: tmp = x1 + ((3.0 * ((((x1 * (x1 * 3.0)) - (x2 * 2.0)) - x1) / (1.0 + (x1 * x1)))) + (x1 + (4.0 * (x2 * (x1 * ((x2 * 2.0) - 3.0)))))) return tmp
function code(x1, x2) tmp = 0.0 if ((x1 <= -1.1e+77) || !(x1 <= 7.6e+81)) tmp = Float64(x1 + Float64(3.0 * Float64(x1 * Float64(x1 * Float64(x1 + Float64(3.0 + Float64(x2 * 2.0))))))); else tmp = Float64(x1 + Float64(Float64(3.0 * Float64(Float64(Float64(Float64(x1 * Float64(x1 * 3.0)) - Float64(x2 * 2.0)) - x1) / Float64(1.0 + Float64(x1 * 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.1e+77) || ~((x1 <= 7.6e+81))) tmp = x1 + (3.0 * (x1 * (x1 * (x1 + (3.0 + (x2 * 2.0)))))); else tmp = x1 + ((3.0 * ((((x1 * (x1 * 3.0)) - (x2 * 2.0)) - x1) / (1.0 + (x1 * x1)))) + (x1 + (4.0 * (x2 * (x1 * ((x2 * 2.0) - 3.0)))))); end tmp_2 = tmp; end
code[x1_, x2_] := If[Or[LessEqual[x1, -1.1e+77], N[Not[LessEqual[x1, 7.6e+81]], $MachinePrecision]], N[(x1 + N[(3.0 * N[(x1 * N[(x1 * N[(x1 + N[(3.0 + N[(x2 * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 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[(1.0 + N[(x1 * x1), $MachinePrecision]), $MachinePrecision]), $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.1 \cdot 10^{+77} \lor \neg \left(x1 \leq 7.6 \cdot 10^{+81}\right):\\
\;\;\;\;x1 + 3 \cdot \left(x1 \cdot \left(x1 \cdot \left(x1 + \left(3 + x2 \cdot 2\right)\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x1 + \left(3 \cdot \frac{\left(x1 \cdot \left(x1 \cdot 3\right) - x2 \cdot 2\right) - x1}{1 + x1 \cdot x1} + \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.1e77 or 7.599999999999999e81 < x1 Initial program 17.5%
Taylor expanded in x1 around 0 6.6%
Taylor expanded in x1 around 0 44.4%
+-commutative44.4%
mul-1-neg44.4%
unsub-neg44.4%
*-commutative44.4%
fma-def44.4%
+-commutative44.4%
cube-mult44.4%
unpow244.4%
distribute-rgt-out50.6%
unpow250.6%
*-commutative50.6%
Simplified50.6%
Taylor expanded in x1 around inf 45.5%
distribute-lft-out45.5%
*-commutative45.5%
unpow345.5%
unpow245.5%
distribute-lft-in57.9%
+-commutative57.9%
unpow257.9%
associate-*l*57.9%
*-commutative57.9%
cancel-sign-sub-inv57.9%
metadata-eval57.9%
*-commutative57.9%
Simplified57.9%
if -1.1e77 < x1 < 7.599999999999999e81Initial program 99.2%
Taylor expanded in x1 around 0 82.3%
Final simplification73.0%
(FPCore (x1 x2)
:precision binary64
(if (or (<= x1 -1.75e+76) (not (<= x1 7.6e+81)))
(+ x1 (* 3.0 (* x1 (* x1 (+ x1 (+ 3.0 (* x2 2.0)))))))
(+
x1
(+
(* 3.0 (/ (- (- (* x1 (* x1 3.0)) (* x2 2.0)) x1) (+ 1.0 (* x1 x1))))
(+ x1 (* 8.0 (/ x2 (/ (+ x1 (/ 1.0 x1)) x2))))))))
double code(double x1, double x2) {
double tmp;
if ((x1 <= -1.75e+76) || !(x1 <= 7.6e+81)) {
tmp = x1 + (3.0 * (x1 * (x1 * (x1 + (3.0 + (x2 * 2.0))))));
} else {
tmp = x1 + ((3.0 * ((((x1 * (x1 * 3.0)) - (x2 * 2.0)) - x1) / (1.0 + (x1 * x1)))) + (x1 + (8.0 * (x2 / ((x1 + (1.0 / x1)) / x2)))));
}
return tmp;
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
real(8) :: tmp
if ((x1 <= (-1.75d+76)) .or. (.not. (x1 <= 7.6d+81))) then
tmp = x1 + (3.0d0 * (x1 * (x1 * (x1 + (3.0d0 + (x2 * 2.0d0))))))
else
tmp = x1 + ((3.0d0 * ((((x1 * (x1 * 3.0d0)) - (x2 * 2.0d0)) - x1) / (1.0d0 + (x1 * x1)))) + (x1 + (8.0d0 * (x2 / ((x1 + (1.0d0 / x1)) / x2)))))
end if
code = tmp
end function
public static double code(double x1, double x2) {
double tmp;
if ((x1 <= -1.75e+76) || !(x1 <= 7.6e+81)) {
tmp = x1 + (3.0 * (x1 * (x1 * (x1 + (3.0 + (x2 * 2.0))))));
} else {
tmp = x1 + ((3.0 * ((((x1 * (x1 * 3.0)) - (x2 * 2.0)) - x1) / (1.0 + (x1 * x1)))) + (x1 + (8.0 * (x2 / ((x1 + (1.0 / x1)) / x2)))));
}
return tmp;
}
def code(x1, x2): tmp = 0 if (x1 <= -1.75e+76) or not (x1 <= 7.6e+81): tmp = x1 + (3.0 * (x1 * (x1 * (x1 + (3.0 + (x2 * 2.0)))))) else: tmp = x1 + ((3.0 * ((((x1 * (x1 * 3.0)) - (x2 * 2.0)) - x1) / (1.0 + (x1 * x1)))) + (x1 + (8.0 * (x2 / ((x1 + (1.0 / x1)) / x2))))) return tmp
function code(x1, x2) tmp = 0.0 if ((x1 <= -1.75e+76) || !(x1 <= 7.6e+81)) tmp = Float64(x1 + Float64(3.0 * Float64(x1 * Float64(x1 * Float64(x1 + Float64(3.0 + Float64(x2 * 2.0))))))); else tmp = Float64(x1 + Float64(Float64(3.0 * Float64(Float64(Float64(Float64(x1 * Float64(x1 * 3.0)) - Float64(x2 * 2.0)) - x1) / Float64(1.0 + Float64(x1 * x1)))) + Float64(x1 + Float64(8.0 * Float64(x2 / Float64(Float64(x1 + Float64(1.0 / x1)) / x2)))))); end return tmp end
function tmp_2 = code(x1, x2) tmp = 0.0; if ((x1 <= -1.75e+76) || ~((x1 <= 7.6e+81))) tmp = x1 + (3.0 * (x1 * (x1 * (x1 + (3.0 + (x2 * 2.0)))))); else tmp = x1 + ((3.0 * ((((x1 * (x1 * 3.0)) - (x2 * 2.0)) - x1) / (1.0 + (x1 * x1)))) + (x1 + (8.0 * (x2 / ((x1 + (1.0 / x1)) / x2))))); end tmp_2 = tmp; end
code[x1_, x2_] := If[Or[LessEqual[x1, -1.75e+76], N[Not[LessEqual[x1, 7.6e+81]], $MachinePrecision]], N[(x1 + N[(3.0 * N[(x1 * N[(x1 * N[(x1 + N[(3.0 + N[(x2 * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 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[(1.0 + N[(x1 * x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(x1 + N[(8.0 * N[(x2 / N[(N[(x1 + N[(1.0 / x1), $MachinePrecision]), $MachinePrecision] / x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x1 \leq -1.75 \cdot 10^{+76} \lor \neg \left(x1 \leq 7.6 \cdot 10^{+81}\right):\\
\;\;\;\;x1 + 3 \cdot \left(x1 \cdot \left(x1 \cdot \left(x1 + \left(3 + x2 \cdot 2\right)\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x1 + \left(3 \cdot \frac{\left(x1 \cdot \left(x1 \cdot 3\right) - x2 \cdot 2\right) - x1}{1 + x1 \cdot x1} + \left(x1 + 8 \cdot \frac{x2}{\frac{x1 + \frac{1}{x1}}{x2}}\right)\right)\\
\end{array}
\end{array}
if x1 < -1.75e76 or 7.599999999999999e81 < x1 Initial program 17.5%
Taylor expanded in x1 around 0 6.6%
Taylor expanded in x1 around 0 44.4%
+-commutative44.4%
mul-1-neg44.4%
unsub-neg44.4%
*-commutative44.4%
fma-def44.4%
+-commutative44.4%
cube-mult44.4%
unpow244.4%
distribute-rgt-out50.6%
unpow250.6%
*-commutative50.6%
Simplified50.6%
Taylor expanded in x1 around inf 45.5%
distribute-lft-out45.5%
*-commutative45.5%
unpow345.5%
unpow245.5%
distribute-lft-in57.9%
+-commutative57.9%
unpow257.9%
associate-*l*57.9%
*-commutative57.9%
cancel-sign-sub-inv57.9%
metadata-eval57.9%
*-commutative57.9%
Simplified57.9%
if -1.75e76 < x1 < 7.599999999999999e81Initial program 99.2%
Taylor expanded in x2 around inf 73.7%
associate-/l*74.3%
unpow274.3%
+-commutative74.3%
unpow274.3%
fma-udef74.3%
Simplified74.3%
Taylor expanded in x1 around 0 74.3%
Taylor expanded in x2 around 0 74.3%
unpow274.3%
associate-/l*84.4%
Simplified84.4%
Final simplification74.4%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0
(+
x1
(+ (* x1 (- (* 4.0 (* x2 (- (* x2 2.0) 3.0))) 2.0)) (* x2 -6.0)))))
(if (<= x1 -1.6e-201)
t_0
(if (<= x1 2.3e-209)
(+ x1 (* x2 -6.0))
(if (<= x1 7.6e+81)
t_0
(+ x1 (* 3.0 (* x1 (* x1 (+ x1 (+ 3.0 (* x2 2.0))))))))))))
double code(double x1, double x2) {
double t_0 = x1 + ((x1 * ((4.0 * (x2 * ((x2 * 2.0) - 3.0))) - 2.0)) + (x2 * -6.0));
double tmp;
if (x1 <= -1.6e-201) {
tmp = t_0;
} else if (x1 <= 2.3e-209) {
tmp = x1 + (x2 * -6.0);
} else if (x1 <= 7.6e+81) {
tmp = t_0;
} else {
tmp = x1 + (3.0 * (x1 * (x1 * (x1 + (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) :: tmp
t_0 = x1 + ((x1 * ((4.0d0 * (x2 * ((x2 * 2.0d0) - 3.0d0))) - 2.0d0)) + (x2 * (-6.0d0)))
if (x1 <= (-1.6d-201)) then
tmp = t_0
else if (x1 <= 2.3d-209) then
tmp = x1 + (x2 * (-6.0d0))
else if (x1 <= 7.6d+81) then
tmp = t_0
else
tmp = x1 + (3.0d0 * (x1 * (x1 * (x1 + (3.0d0 + (x2 * 2.0d0))))))
end if
code = tmp
end function
public static double code(double x1, double x2) {
double t_0 = x1 + ((x1 * ((4.0 * (x2 * ((x2 * 2.0) - 3.0))) - 2.0)) + (x2 * -6.0));
double tmp;
if (x1 <= -1.6e-201) {
tmp = t_0;
} else if (x1 <= 2.3e-209) {
tmp = x1 + (x2 * -6.0);
} else if (x1 <= 7.6e+81) {
tmp = t_0;
} else {
tmp = x1 + (3.0 * (x1 * (x1 * (x1 + (3.0 + (x2 * 2.0))))));
}
return tmp;
}
def code(x1, x2): t_0 = x1 + ((x1 * ((4.0 * (x2 * ((x2 * 2.0) - 3.0))) - 2.0)) + (x2 * -6.0)) tmp = 0 if x1 <= -1.6e-201: tmp = t_0 elif x1 <= 2.3e-209: tmp = x1 + (x2 * -6.0) elif x1 <= 7.6e+81: tmp = t_0 else: tmp = x1 + (3.0 * (x1 * (x1 * (x1 + (3.0 + (x2 * 2.0)))))) return tmp
function code(x1, x2) t_0 = Float64(x1 + Float64(Float64(x1 * Float64(Float64(4.0 * Float64(x2 * Float64(Float64(x2 * 2.0) - 3.0))) - 2.0)) + Float64(x2 * -6.0))) tmp = 0.0 if (x1 <= -1.6e-201) tmp = t_0; elseif (x1 <= 2.3e-209) tmp = Float64(x1 + Float64(x2 * -6.0)); elseif (x1 <= 7.6e+81) tmp = t_0; else tmp = Float64(x1 + Float64(3.0 * Float64(x1 * Float64(x1 * Float64(x1 + Float64(3.0 + Float64(x2 * 2.0))))))); end return tmp end
function tmp_2 = code(x1, x2) t_0 = x1 + ((x1 * ((4.0 * (x2 * ((x2 * 2.0) - 3.0))) - 2.0)) + (x2 * -6.0)); tmp = 0.0; if (x1 <= -1.6e-201) tmp = t_0; elseif (x1 <= 2.3e-209) tmp = x1 + (x2 * -6.0); elseif (x1 <= 7.6e+81) tmp = t_0; else tmp = x1 + (3.0 * (x1 * (x1 * (x1 + (3.0 + (x2 * 2.0)))))); end tmp_2 = tmp; end
code[x1_, x2_] := Block[{t$95$0 = N[(x1 + N[(N[(x1 * N[(N[(4.0 * N[(x2 * N[(N[(x2 * 2.0), $MachinePrecision] - 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - 2.0), $MachinePrecision]), $MachinePrecision] + N[(x2 * -6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x1, -1.6e-201], t$95$0, If[LessEqual[x1, 2.3e-209], N[(x1 + N[(x2 * -6.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 7.6e+81], t$95$0, N[(x1 + N[(3.0 * N[(x1 * N[(x1 * N[(x1 + N[(3.0 + N[(x2 * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x1 + \left(x1 \cdot \left(4 \cdot \left(x2 \cdot \left(x2 \cdot 2 - 3\right)\right) - 2\right) + x2 \cdot -6\right)\\
\mathbf{if}\;x1 \leq -1.6 \cdot 10^{-201}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;x1 \leq 2.3 \cdot 10^{-209}:\\
\;\;\;\;x1 + x2 \cdot -6\\
\mathbf{elif}\;x1 \leq 7.6 \cdot 10^{+81}:\\
\;\;\;\;t_0\\
\mathbf{else}:\\
\;\;\;\;x1 + 3 \cdot \left(x1 \cdot \left(x1 \cdot \left(x1 + \left(3 + x2 \cdot 2\right)\right)\right)\right)\\
\end{array}
\end{array}
if x1 < -1.6000000000000001e-201 or 2.3e-209 < x1 < 7.599999999999999e81Initial program 75.7%
Taylor expanded in x1 around 0 58.0%
Taylor expanded in x1 around 0 55.1%
if -1.6000000000000001e-201 < x1 < 2.3e-209Initial program 99.5%
Taylor expanded in x1 around 0 99.5%
Taylor expanded in x1 around 0 86.3%
*-commutative86.3%
Simplified86.3%
if 7.599999999999999e81 < x1 Initial program 25.9%
Taylor expanded in x1 around 0 11.8%
Taylor expanded in x1 around 0 79.8%
+-commutative79.8%
mul-1-neg79.8%
unsub-neg79.8%
*-commutative79.8%
fma-def79.8%
+-commutative79.8%
cube-mult79.8%
unpow279.8%
distribute-rgt-out90.9%
unpow290.9%
*-commutative90.9%
Simplified90.9%
Taylor expanded in x1 around inf 79.8%
distribute-lft-out79.8%
*-commutative79.8%
unpow379.8%
unpow279.8%
distribute-lft-in94.6%
+-commutative94.6%
unpow294.6%
associate-*l*94.6%
*-commutative94.6%
cancel-sign-sub-inv94.6%
metadata-eval94.6%
*-commutative94.6%
Simplified94.6%
Final simplification67.4%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (- (* x2 2.0) 3.0))
(t_1 (+ x1 (+ (* x1 (- (* 4.0 (* x2 t_0)) 2.0)) (* x2 -6.0)))))
(if (<= x1 -6.8e-196)
t_1
(if (<= x1 1.32e-194)
(+ x1 (+ (* 3.0 (* x2 -2.0)) (+ x1 (* 4.0 (* x2 (* x1 t_0))))))
(if (<= x1 9e+81)
t_1
(+ x1 (* 3.0 (* x1 (* x1 (+ x1 (+ 3.0 (* x2 2.0))))))))))))
double code(double x1, double x2) {
double t_0 = (x2 * 2.0) - 3.0;
double t_1 = x1 + ((x1 * ((4.0 * (x2 * t_0)) - 2.0)) + (x2 * -6.0));
double tmp;
if (x1 <= -6.8e-196) {
tmp = t_1;
} else if (x1 <= 1.32e-194) {
tmp = x1 + ((3.0 * (x2 * -2.0)) + (x1 + (4.0 * (x2 * (x1 * t_0)))));
} else if (x1 <= 9e+81) {
tmp = t_1;
} else {
tmp = x1 + (3.0 * (x1 * (x1 * (x1 + (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 = (x2 * 2.0d0) - 3.0d0
t_1 = x1 + ((x1 * ((4.0d0 * (x2 * t_0)) - 2.0d0)) + (x2 * (-6.0d0)))
if (x1 <= (-6.8d-196)) then
tmp = t_1
else if (x1 <= 1.32d-194) then
tmp = x1 + ((3.0d0 * (x2 * (-2.0d0))) + (x1 + (4.0d0 * (x2 * (x1 * t_0)))))
else if (x1 <= 9d+81) then
tmp = t_1
else
tmp = x1 + (3.0d0 * (x1 * (x1 * (x1 + (3.0d0 + (x2 * 2.0d0))))))
end if
code = tmp
end function
public static double code(double x1, double x2) {
double t_0 = (x2 * 2.0) - 3.0;
double t_1 = x1 + ((x1 * ((4.0 * (x2 * t_0)) - 2.0)) + (x2 * -6.0));
double tmp;
if (x1 <= -6.8e-196) {
tmp = t_1;
} else if (x1 <= 1.32e-194) {
tmp = x1 + ((3.0 * (x2 * -2.0)) + (x1 + (4.0 * (x2 * (x1 * t_0)))));
} else if (x1 <= 9e+81) {
tmp = t_1;
} else {
tmp = x1 + (3.0 * (x1 * (x1 * (x1 + (3.0 + (x2 * 2.0))))));
}
return tmp;
}
def code(x1, x2): t_0 = (x2 * 2.0) - 3.0 t_1 = x1 + ((x1 * ((4.0 * (x2 * t_0)) - 2.0)) + (x2 * -6.0)) tmp = 0 if x1 <= -6.8e-196: tmp = t_1 elif x1 <= 1.32e-194: tmp = x1 + ((3.0 * (x2 * -2.0)) + (x1 + (4.0 * (x2 * (x1 * t_0))))) elif x1 <= 9e+81: tmp = t_1 else: tmp = x1 + (3.0 * (x1 * (x1 * (x1 + (3.0 + (x2 * 2.0)))))) return tmp
function code(x1, x2) t_0 = Float64(Float64(x2 * 2.0) - 3.0) t_1 = Float64(x1 + Float64(Float64(x1 * Float64(Float64(4.0 * Float64(x2 * t_0)) - 2.0)) + Float64(x2 * -6.0))) tmp = 0.0 if (x1 <= -6.8e-196) tmp = t_1; elseif (x1 <= 1.32e-194) tmp = Float64(x1 + Float64(Float64(3.0 * Float64(x2 * -2.0)) + Float64(x1 + Float64(4.0 * Float64(x2 * Float64(x1 * t_0)))))); elseif (x1 <= 9e+81) tmp = t_1; else tmp = Float64(x1 + Float64(3.0 * Float64(x1 * Float64(x1 * Float64(x1 + Float64(3.0 + Float64(x2 * 2.0))))))); end return tmp end
function tmp_2 = code(x1, x2) t_0 = (x2 * 2.0) - 3.0; t_1 = x1 + ((x1 * ((4.0 * (x2 * t_0)) - 2.0)) + (x2 * -6.0)); tmp = 0.0; if (x1 <= -6.8e-196) tmp = t_1; elseif (x1 <= 1.32e-194) tmp = x1 + ((3.0 * (x2 * -2.0)) + (x1 + (4.0 * (x2 * (x1 * t_0))))); elseif (x1 <= 9e+81) tmp = t_1; else tmp = x1 + (3.0 * (x1 * (x1 * (x1 + (3.0 + (x2 * 2.0)))))); end tmp_2 = tmp; end
code[x1_, x2_] := Block[{t$95$0 = N[(N[(x2 * 2.0), $MachinePrecision] - 3.0), $MachinePrecision]}, Block[{t$95$1 = N[(x1 + N[(N[(x1 * N[(N[(4.0 * N[(x2 * t$95$0), $MachinePrecision]), $MachinePrecision] - 2.0), $MachinePrecision]), $MachinePrecision] + N[(x2 * -6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x1, -6.8e-196], t$95$1, If[LessEqual[x1, 1.32e-194], N[(x1 + N[(N[(3.0 * N[(x2 * -2.0), $MachinePrecision]), $MachinePrecision] + N[(x1 + N[(4.0 * N[(x2 * N[(x1 * t$95$0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 9e+81], t$95$1, N[(x1 + N[(3.0 * N[(x1 * N[(x1 * N[(x1 + N[(3.0 + N[(x2 * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x2 \cdot 2 - 3\\
t_1 := x1 + \left(x1 \cdot \left(4 \cdot \left(x2 \cdot t_0\right) - 2\right) + x2 \cdot -6\right)\\
\mathbf{if}\;x1 \leq -6.8 \cdot 10^{-196}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;x1 \leq 1.32 \cdot 10^{-194}:\\
\;\;\;\;x1 + \left(3 \cdot \left(x2 \cdot -2\right) + \left(x1 + 4 \cdot \left(x2 \cdot \left(x1 \cdot t_0\right)\right)\right)\right)\\
\mathbf{elif}\;x1 \leq 9 \cdot 10^{+81}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;x1 + 3 \cdot \left(x1 \cdot \left(x1 \cdot \left(x1 + \left(3 + x2 \cdot 2\right)\right)\right)\right)\\
\end{array}
\end{array}
if x1 < -6.8e-196 or 1.32e-194 < x1 < 9.00000000000000034e81Initial program 74.5%
Taylor expanded in x1 around 0 55.9%
Taylor expanded in x1 around 0 54.1%
if -6.8e-196 < x1 < 1.32e-194Initial program 99.6%
Taylor expanded in x1 around 0 99.6%
Taylor expanded in x1 around 0 96.3%
*-commutative96.3%
Simplified96.3%
if 9.00000000000000034e81 < x1 Initial program 25.9%
Taylor expanded in x1 around 0 11.8%
Taylor expanded in x1 around 0 79.8%
+-commutative79.8%
mul-1-neg79.8%
unsub-neg79.8%
*-commutative79.8%
fma-def79.8%
+-commutative79.8%
cube-mult79.8%
unpow279.8%
distribute-rgt-out90.9%
unpow290.9%
*-commutative90.9%
Simplified90.9%
Taylor expanded in x1 around inf 79.8%
distribute-lft-out79.8%
*-commutative79.8%
unpow379.8%
unpow279.8%
distribute-lft-in94.6%
+-commutative94.6%
unpow294.6%
associate-*l*94.6%
*-commutative94.6%
cancel-sign-sub-inv94.6%
metadata-eval94.6%
*-commutative94.6%
Simplified94.6%
Final simplification69.4%
(FPCore (x1 x2)
:precision binary64
(if (<= x1 9.5e+81)
(+
x1
(+
(+ x1 (* 4.0 (* x2 (* x1 (- (* x2 2.0) 3.0)))))
(* 3.0 (- (* x2 -2.0) x1))))
(+ x1 (* 3.0 (* x1 (* x1 (+ x1 (+ 3.0 (* x2 2.0)))))))))
double code(double x1, double x2) {
double tmp;
if (x1 <= 9.5e+81) {
tmp = x1 + ((x1 + (4.0 * (x2 * (x1 * ((x2 * 2.0) - 3.0))))) + (3.0 * ((x2 * -2.0) - x1)));
} else {
tmp = x1 + (3.0 * (x1 * (x1 * (x1 + (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) :: tmp
if (x1 <= 9.5d+81) then
tmp = x1 + ((x1 + (4.0d0 * (x2 * (x1 * ((x2 * 2.0d0) - 3.0d0))))) + (3.0d0 * ((x2 * (-2.0d0)) - x1)))
else
tmp = x1 + (3.0d0 * (x1 * (x1 * (x1 + (3.0d0 + (x2 * 2.0d0))))))
end if
code = tmp
end function
public static double code(double x1, double x2) {
double tmp;
if (x1 <= 9.5e+81) {
tmp = x1 + ((x1 + (4.0 * (x2 * (x1 * ((x2 * 2.0) - 3.0))))) + (3.0 * ((x2 * -2.0) - x1)));
} else {
tmp = x1 + (3.0 * (x1 * (x1 * (x1 + (3.0 + (x2 * 2.0))))));
}
return tmp;
}
def code(x1, x2): tmp = 0 if x1 <= 9.5e+81: tmp = x1 + ((x1 + (4.0 * (x2 * (x1 * ((x2 * 2.0) - 3.0))))) + (3.0 * ((x2 * -2.0) - x1))) else: tmp = x1 + (3.0 * (x1 * (x1 * (x1 + (3.0 + (x2 * 2.0)))))) return tmp
function code(x1, x2) tmp = 0.0 if (x1 <= 9.5e+81) tmp = Float64(x1 + Float64(Float64(x1 + Float64(4.0 * Float64(x2 * Float64(x1 * Float64(Float64(x2 * 2.0) - 3.0))))) + Float64(3.0 * Float64(Float64(x2 * -2.0) - x1)))); else tmp = Float64(x1 + Float64(3.0 * Float64(x1 * Float64(x1 * Float64(x1 + Float64(3.0 + Float64(x2 * 2.0))))))); end return tmp end
function tmp_2 = code(x1, x2) tmp = 0.0; if (x1 <= 9.5e+81) tmp = x1 + ((x1 + (4.0 * (x2 * (x1 * ((x2 * 2.0) - 3.0))))) + (3.0 * ((x2 * -2.0) - x1))); else tmp = x1 + (3.0 * (x1 * (x1 * (x1 + (3.0 + (x2 * 2.0)))))); end tmp_2 = tmp; end
code[x1_, x2_] := If[LessEqual[x1, 9.5e+81], 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[(N[(x2 * -2.0), $MachinePrecision] - x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x1 + N[(3.0 * N[(x1 * N[(x1 * N[(x1 + N[(3.0 + N[(x2 * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x1 \leq 9.5 \cdot 10^{+81}:\\
\;\;\;\;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 - x1\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x1 + 3 \cdot \left(x1 \cdot \left(x1 \cdot \left(x1 + \left(3 + x2 \cdot 2\right)\right)\right)\right)\\
\end{array}
\end{array}
if x1 < 9.50000000000000083e81Initial program 79.6%
Taylor expanded in x1 around 0 64.8%
Taylor expanded in x1 around 0 64.9%
+-commutative64.9%
mul-1-neg64.9%
unsub-neg64.9%
*-commutative64.9%
Simplified64.9%
if 9.50000000000000083e81 < x1 Initial program 25.9%
Taylor expanded in x1 around 0 11.8%
Taylor expanded in x1 around 0 79.8%
+-commutative79.8%
mul-1-neg79.8%
unsub-neg79.8%
*-commutative79.8%
fma-def79.8%
+-commutative79.8%
cube-mult79.8%
unpow279.8%
distribute-rgt-out90.9%
unpow290.9%
*-commutative90.9%
Simplified90.9%
Taylor expanded in x1 around inf 79.8%
distribute-lft-out79.8%
*-commutative79.8%
unpow379.8%
unpow279.8%
distribute-lft-in94.6%
+-commutative94.6%
unpow294.6%
associate-*l*94.6%
*-commutative94.6%
cancel-sign-sub-inv94.6%
metadata-eval94.6%
*-commutative94.6%
Simplified94.6%
Final simplification71.2%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (+ x1 (/ (* (* x2 x2) 8.0) (+ x1 (/ 1.0 x1)))))
(t_1 (+ x1 (* 3.0 (* x1 (* x1 (+ x1 (+ 3.0 (* x2 2.0)))))))))
(if (<= x1 -1.35e+78)
t_1
(if (<= x1 -1.55e-69)
t_0
(if (<= x1 6.4e-84) (+ x1 (* x2 -6.0)) (if (<= x1 7.6e+81) t_0 t_1))))))
double code(double x1, double x2) {
double t_0 = x1 + (((x2 * x2) * 8.0) / (x1 + (1.0 / x1)));
double t_1 = x1 + (3.0 * (x1 * (x1 * (x1 + (3.0 + (x2 * 2.0))))));
double tmp;
if (x1 <= -1.35e+78) {
tmp = t_1;
} else if (x1 <= -1.55e-69) {
tmp = t_0;
} else if (x1 <= 6.4e-84) {
tmp = x1 + (x2 * -6.0);
} else if (x1 <= 7.6e+81) {
tmp = t_0;
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
real(8) :: t_0
real(8) :: t_1
real(8) :: tmp
t_0 = x1 + (((x2 * x2) * 8.0d0) / (x1 + (1.0d0 / x1)))
t_1 = x1 + (3.0d0 * (x1 * (x1 * (x1 + (3.0d0 + (x2 * 2.0d0))))))
if (x1 <= (-1.35d+78)) then
tmp = t_1
else if (x1 <= (-1.55d-69)) then
tmp = t_0
else if (x1 <= 6.4d-84) then
tmp = x1 + (x2 * (-6.0d0))
else if (x1 <= 7.6d+81) then
tmp = t_0
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x1, double x2) {
double t_0 = x1 + (((x2 * x2) * 8.0) / (x1 + (1.0 / x1)));
double t_1 = x1 + (3.0 * (x1 * (x1 * (x1 + (3.0 + (x2 * 2.0))))));
double tmp;
if (x1 <= -1.35e+78) {
tmp = t_1;
} else if (x1 <= -1.55e-69) {
tmp = t_0;
} else if (x1 <= 6.4e-84) {
tmp = x1 + (x2 * -6.0);
} else if (x1 <= 7.6e+81) {
tmp = t_0;
} else {
tmp = t_1;
}
return tmp;
}
def code(x1, x2): t_0 = x1 + (((x2 * x2) * 8.0) / (x1 + (1.0 / x1))) t_1 = x1 + (3.0 * (x1 * (x1 * (x1 + (3.0 + (x2 * 2.0)))))) tmp = 0 if x1 <= -1.35e+78: tmp = t_1 elif x1 <= -1.55e-69: tmp = t_0 elif x1 <= 6.4e-84: tmp = x1 + (x2 * -6.0) elif x1 <= 7.6e+81: tmp = t_0 else: tmp = t_1 return tmp
function code(x1, x2) t_0 = Float64(x1 + Float64(Float64(Float64(x2 * x2) * 8.0) / Float64(x1 + Float64(1.0 / x1)))) t_1 = Float64(x1 + Float64(3.0 * Float64(x1 * Float64(x1 * Float64(x1 + Float64(3.0 + Float64(x2 * 2.0))))))) tmp = 0.0 if (x1 <= -1.35e+78) tmp = t_1; elseif (x1 <= -1.55e-69) tmp = t_0; elseif (x1 <= 6.4e-84) tmp = Float64(x1 + Float64(x2 * -6.0)); elseif (x1 <= 7.6e+81) tmp = t_0; else tmp = t_1; end return tmp end
function tmp_2 = code(x1, x2) t_0 = x1 + (((x2 * x2) * 8.0) / (x1 + (1.0 / x1))); t_1 = x1 + (3.0 * (x1 * (x1 * (x1 + (3.0 + (x2 * 2.0)))))); tmp = 0.0; if (x1 <= -1.35e+78) tmp = t_1; elseif (x1 <= -1.55e-69) tmp = t_0; elseif (x1 <= 6.4e-84) tmp = x1 + (x2 * -6.0); elseif (x1 <= 7.6e+81) tmp = t_0; else tmp = t_1; end tmp_2 = tmp; end
code[x1_, x2_] := Block[{t$95$0 = N[(x1 + N[(N[(N[(x2 * x2), $MachinePrecision] * 8.0), $MachinePrecision] / N[(x1 + N[(1.0 / x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(x1 + N[(3.0 * N[(x1 * N[(x1 * N[(x1 + N[(3.0 + N[(x2 * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x1, -1.35e+78], t$95$1, If[LessEqual[x1, -1.55e-69], t$95$0, If[LessEqual[x1, 6.4e-84], N[(x1 + N[(x2 * -6.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 7.6e+81], t$95$0, t$95$1]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x1 + \frac{\left(x2 \cdot x2\right) \cdot 8}{x1 + \frac{1}{x1}}\\
t_1 := x1 + 3 \cdot \left(x1 \cdot \left(x1 \cdot \left(x1 + \left(3 + x2 \cdot 2\right)\right)\right)\right)\\
\mathbf{if}\;x1 \leq -1.35 \cdot 10^{+78}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;x1 \leq -1.55 \cdot 10^{-69}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;x1 \leq 6.4 \cdot 10^{-84}:\\
\;\;\;\;x1 + x2 \cdot -6\\
\mathbf{elif}\;x1 \leq 7.6 \cdot 10^{+81}:\\
\;\;\;\;t_0\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if x1 < -1.35000000000000002e78 or 7.599999999999999e81 < x1 Initial program 17.5%
Taylor expanded in x1 around 0 6.6%
Taylor expanded in x1 around 0 44.4%
+-commutative44.4%
mul-1-neg44.4%
unsub-neg44.4%
*-commutative44.4%
fma-def44.4%
+-commutative44.4%
cube-mult44.4%
unpow244.4%
distribute-rgt-out50.6%
unpow250.6%
*-commutative50.6%
Simplified50.6%
Taylor expanded in x1 around inf 45.5%
distribute-lft-out45.5%
*-commutative45.5%
unpow345.5%
unpow245.5%
distribute-lft-in57.9%
+-commutative57.9%
unpow257.9%
associate-*l*57.9%
*-commutative57.9%
cancel-sign-sub-inv57.9%
metadata-eval57.9%
*-commutative57.9%
Simplified57.9%
if -1.35000000000000002e78 < x1 < -1.55e-69 or 6.3999999999999999e-84 < x1 < 7.599999999999999e81Initial program 98.9%
Taylor expanded in x2 around inf 62.9%
associate-/l*64.2%
unpow264.2%
+-commutative64.2%
unpow264.2%
fma-udef64.2%
Simplified64.2%
Taylor expanded in x1 around 0 64.3%
Taylor expanded in x2 around inf 37.8%
associate-*r/37.8%
unpow237.8%
Simplified37.8%
if -1.55e-69 < x1 < 6.3999999999999999e-84Initial program 99.5%
Taylor expanded in x1 around 0 99.5%
Taylor expanded in x1 around 0 65.1%
*-commutative65.1%
Simplified65.1%
Final simplification55.1%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (+ x1 (* 3.0 (* x1 (* x1 (+ x1 (+ 3.0 (* x2 2.0)))))))))
(if (<= x1 -6.8e+74)
t_0
(if (<= x1 -4.3e-73)
(+ x1 (+ 9.0 (- x1 (/ (+ 3.0 (* (* x2 x2) -8.0)) x1))))
(if (<= x1 4.5e-86)
(+ x1 (* x2 -6.0))
(if (<= x1 7.6e+81)
(+ x1 (/ (* (* x2 x2) 8.0) (+ x1 (/ 1.0 x1))))
t_0))))))
double code(double x1, double x2) {
double t_0 = x1 + (3.0 * (x1 * (x1 * (x1 + (3.0 + (x2 * 2.0))))));
double tmp;
if (x1 <= -6.8e+74) {
tmp = t_0;
} else if (x1 <= -4.3e-73) {
tmp = x1 + (9.0 + (x1 - ((3.0 + ((x2 * x2) * -8.0)) / x1)));
} else if (x1 <= 4.5e-86) {
tmp = x1 + (x2 * -6.0);
} else if (x1 <= 7.6e+81) {
tmp = x1 + (((x2 * x2) * 8.0) / (x1 + (1.0 / x1)));
} else {
tmp = t_0;
}
return tmp;
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
real(8) :: t_0
real(8) :: tmp
t_0 = x1 + (3.0d0 * (x1 * (x1 * (x1 + (3.0d0 + (x2 * 2.0d0))))))
if (x1 <= (-6.8d+74)) then
tmp = t_0
else if (x1 <= (-4.3d-73)) then
tmp = x1 + (9.0d0 + (x1 - ((3.0d0 + ((x2 * x2) * (-8.0d0))) / x1)))
else if (x1 <= 4.5d-86) then
tmp = x1 + (x2 * (-6.0d0))
else if (x1 <= 7.6d+81) then
tmp = x1 + (((x2 * x2) * 8.0d0) / (x1 + (1.0d0 / x1)))
else
tmp = t_0
end if
code = tmp
end function
public static double code(double x1, double x2) {
double t_0 = x1 + (3.0 * (x1 * (x1 * (x1 + (3.0 + (x2 * 2.0))))));
double tmp;
if (x1 <= -6.8e+74) {
tmp = t_0;
} else if (x1 <= -4.3e-73) {
tmp = x1 + (9.0 + (x1 - ((3.0 + ((x2 * x2) * -8.0)) / x1)));
} else if (x1 <= 4.5e-86) {
tmp = x1 + (x2 * -6.0);
} else if (x1 <= 7.6e+81) {
tmp = x1 + (((x2 * x2) * 8.0) / (x1 + (1.0 / x1)));
} else {
tmp = t_0;
}
return tmp;
}
def code(x1, x2): t_0 = x1 + (3.0 * (x1 * (x1 * (x1 + (3.0 + (x2 * 2.0)))))) tmp = 0 if x1 <= -6.8e+74: tmp = t_0 elif x1 <= -4.3e-73: tmp = x1 + (9.0 + (x1 - ((3.0 + ((x2 * x2) * -8.0)) / x1))) elif x1 <= 4.5e-86: tmp = x1 + (x2 * -6.0) elif x1 <= 7.6e+81: tmp = x1 + (((x2 * x2) * 8.0) / (x1 + (1.0 / x1))) else: tmp = t_0 return tmp
function code(x1, x2) t_0 = Float64(x1 + Float64(3.0 * Float64(x1 * Float64(x1 * Float64(x1 + Float64(3.0 + Float64(x2 * 2.0))))))) tmp = 0.0 if (x1 <= -6.8e+74) tmp = t_0; elseif (x1 <= -4.3e-73) tmp = Float64(x1 + Float64(9.0 + Float64(x1 - Float64(Float64(3.0 + Float64(Float64(x2 * x2) * -8.0)) / x1)))); elseif (x1 <= 4.5e-86) tmp = Float64(x1 + Float64(x2 * -6.0)); elseif (x1 <= 7.6e+81) tmp = Float64(x1 + Float64(Float64(Float64(x2 * x2) * 8.0) / Float64(x1 + Float64(1.0 / x1)))); else tmp = t_0; end return tmp end
function tmp_2 = code(x1, x2) t_0 = x1 + (3.0 * (x1 * (x1 * (x1 + (3.0 + (x2 * 2.0)))))); tmp = 0.0; if (x1 <= -6.8e+74) tmp = t_0; elseif (x1 <= -4.3e-73) tmp = x1 + (9.0 + (x1 - ((3.0 + ((x2 * x2) * -8.0)) / x1))); elseif (x1 <= 4.5e-86) tmp = x1 + (x2 * -6.0); elseif (x1 <= 7.6e+81) tmp = x1 + (((x2 * x2) * 8.0) / (x1 + (1.0 / x1))); else tmp = t_0; end tmp_2 = tmp; end
code[x1_, x2_] := Block[{t$95$0 = N[(x1 + N[(3.0 * N[(x1 * N[(x1 * N[(x1 + N[(3.0 + N[(x2 * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x1, -6.8e+74], t$95$0, If[LessEqual[x1, -4.3e-73], N[(x1 + N[(9.0 + N[(x1 - N[(N[(3.0 + N[(N[(x2 * x2), $MachinePrecision] * -8.0), $MachinePrecision]), $MachinePrecision] / x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 4.5e-86], N[(x1 + N[(x2 * -6.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 7.6e+81], N[(x1 + N[(N[(N[(x2 * x2), $MachinePrecision] * 8.0), $MachinePrecision] / N[(x1 + N[(1.0 / x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$0]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x1 + 3 \cdot \left(x1 \cdot \left(x1 \cdot \left(x1 + \left(3 + x2 \cdot 2\right)\right)\right)\right)\\
\mathbf{if}\;x1 \leq -6.8 \cdot 10^{+74}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;x1 \leq -4.3 \cdot 10^{-73}:\\
\;\;\;\;x1 + \left(9 + \left(x1 - \frac{3 + \left(x2 \cdot x2\right) \cdot -8}{x1}\right)\right)\\
\mathbf{elif}\;x1 \leq 4.5 \cdot 10^{-86}:\\
\;\;\;\;x1 + x2 \cdot -6\\
\mathbf{elif}\;x1 \leq 7.6 \cdot 10^{+81}:\\
\;\;\;\;x1 + \frac{\left(x2 \cdot x2\right) \cdot 8}{x1 + \frac{1}{x1}}\\
\mathbf{else}:\\
\;\;\;\;t_0\\
\end{array}
\end{array}
if x1 < -6.7999999999999998e74 or 7.599999999999999e81 < x1 Initial program 17.5%
Taylor expanded in x1 around 0 6.6%
Taylor expanded in x1 around 0 44.4%
+-commutative44.4%
mul-1-neg44.4%
unsub-neg44.4%
*-commutative44.4%
fma-def44.4%
+-commutative44.4%
cube-mult44.4%
unpow244.4%
distribute-rgt-out50.6%
unpow250.6%
*-commutative50.6%
Simplified50.6%
Taylor expanded in x1 around inf 45.5%
distribute-lft-out45.5%
*-commutative45.5%
unpow345.5%
unpow245.5%
distribute-lft-in57.9%
+-commutative57.9%
unpow257.9%
associate-*l*57.9%
*-commutative57.9%
cancel-sign-sub-inv57.9%
metadata-eval57.9%
*-commutative57.9%
Simplified57.9%
if -6.7999999999999998e74 < x1 < -4.2999999999999999e-73Initial program 99.0%
Taylor expanded in x2 around inf 60.0%
associate-/l*60.0%
unpow260.0%
+-commutative60.0%
unpow260.0%
fma-udef60.0%
Simplified60.0%
Taylor expanded in x1 around -inf 35.7%
mul-1-neg35.7%
unsub-neg35.7%
*-commutative35.7%
unpow235.7%
Simplified35.7%
if -4.2999999999999999e-73 < x1 < 4.4999999999999998e-86Initial program 99.5%
Taylor expanded in x1 around 0 99.5%
Taylor expanded in x1 around 0 65.8%
*-commutative65.8%
Simplified65.8%
if 4.4999999999999998e-86 < x1 < 7.599999999999999e81Initial program 98.8%
Taylor expanded in x2 around inf 65.6%
associate-/l*67.8%
unpow267.8%
+-commutative67.8%
unpow267.8%
fma-udef67.8%
Simplified67.8%
Taylor expanded in x1 around 0 67.8%
Taylor expanded in x2 around inf 38.8%
associate-*r/38.8%
unpow238.8%
Simplified38.8%
Final simplification55.2%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (/ (- (* x1 x1) (* (* x2 x2) 36.0)) (- x1 (* x2 -6.0)))))
(if (<= x2 -1.16e+117)
(+ x1 (* (* x2 x2) (* x1 8.0)))
(if (<= x2 -3.2e-71)
t_0
(if (<= x2 2.6e-136)
(+ x1 (+ x1 (* 3.0 (- (* (* x1 x1) (+ x1 3.0)) x1))))
(if (<= x2 1.55e+109)
t_0
(+ x1 (* x1 (+ 1.0 (* 4.0 (* x2 (- (* x2 2.0) 3.0))))))))))))
double code(double x1, double x2) {
double t_0 = ((x1 * x1) - ((x2 * x2) * 36.0)) / (x1 - (x2 * -6.0));
double tmp;
if (x2 <= -1.16e+117) {
tmp = x1 + ((x2 * x2) * (x1 * 8.0));
} else if (x2 <= -3.2e-71) {
tmp = t_0;
} else if (x2 <= 2.6e-136) {
tmp = x1 + (x1 + (3.0 * (((x1 * x1) * (x1 + 3.0)) - x1)));
} else if (x2 <= 1.55e+109) {
tmp = t_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) :: t_0
real(8) :: tmp
t_0 = ((x1 * x1) - ((x2 * x2) * 36.0d0)) / (x1 - (x2 * (-6.0d0)))
if (x2 <= (-1.16d+117)) then
tmp = x1 + ((x2 * x2) * (x1 * 8.0d0))
else if (x2 <= (-3.2d-71)) then
tmp = t_0
else if (x2 <= 2.6d-136) then
tmp = x1 + (x1 + (3.0d0 * (((x1 * x1) * (x1 + 3.0d0)) - x1)))
else if (x2 <= 1.55d+109) then
tmp = t_0
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 t_0 = ((x1 * x1) - ((x2 * x2) * 36.0)) / (x1 - (x2 * -6.0));
double tmp;
if (x2 <= -1.16e+117) {
tmp = x1 + ((x2 * x2) * (x1 * 8.0));
} else if (x2 <= -3.2e-71) {
tmp = t_0;
} else if (x2 <= 2.6e-136) {
tmp = x1 + (x1 + (3.0 * (((x1 * x1) * (x1 + 3.0)) - x1)));
} else if (x2 <= 1.55e+109) {
tmp = t_0;
} else {
tmp = x1 + (x1 * (1.0 + (4.0 * (x2 * ((x2 * 2.0) - 3.0)))));
}
return tmp;
}
def code(x1, x2): t_0 = ((x1 * x1) - ((x2 * x2) * 36.0)) / (x1 - (x2 * -6.0)) tmp = 0 if x2 <= -1.16e+117: tmp = x1 + ((x2 * x2) * (x1 * 8.0)) elif x2 <= -3.2e-71: tmp = t_0 elif x2 <= 2.6e-136: tmp = x1 + (x1 + (3.0 * (((x1 * x1) * (x1 + 3.0)) - x1))) elif x2 <= 1.55e+109: tmp = t_0 else: tmp = x1 + (x1 * (1.0 + (4.0 * (x2 * ((x2 * 2.0) - 3.0))))) return tmp
function code(x1, x2) t_0 = Float64(Float64(Float64(x1 * x1) - Float64(Float64(x2 * x2) * 36.0)) / Float64(x1 - Float64(x2 * -6.0))) tmp = 0.0 if (x2 <= -1.16e+117) tmp = Float64(x1 + Float64(Float64(x2 * x2) * Float64(x1 * 8.0))); elseif (x2 <= -3.2e-71) tmp = t_0; elseif (x2 <= 2.6e-136) tmp = Float64(x1 + Float64(x1 + Float64(3.0 * Float64(Float64(Float64(x1 * x1) * Float64(x1 + 3.0)) - x1)))); elseif (x2 <= 1.55e+109) tmp = t_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) t_0 = ((x1 * x1) - ((x2 * x2) * 36.0)) / (x1 - (x2 * -6.0)); tmp = 0.0; if (x2 <= -1.16e+117) tmp = x1 + ((x2 * x2) * (x1 * 8.0)); elseif (x2 <= -3.2e-71) tmp = t_0; elseif (x2 <= 2.6e-136) tmp = x1 + (x1 + (3.0 * (((x1 * x1) * (x1 + 3.0)) - x1))); elseif (x2 <= 1.55e+109) tmp = t_0; else tmp = x1 + (x1 * (1.0 + (4.0 * (x2 * ((x2 * 2.0) - 3.0))))); end tmp_2 = tmp; end
code[x1_, x2_] := Block[{t$95$0 = N[(N[(N[(x1 * x1), $MachinePrecision] - N[(N[(x2 * x2), $MachinePrecision] * 36.0), $MachinePrecision]), $MachinePrecision] / N[(x1 - N[(x2 * -6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x2, -1.16e+117], N[(x1 + N[(N[(x2 * x2), $MachinePrecision] * N[(x1 * 8.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x2, -3.2e-71], t$95$0, If[LessEqual[x2, 2.6e-136], N[(x1 + N[(x1 + N[(3.0 * N[(N[(N[(x1 * x1), $MachinePrecision] * N[(x1 + 3.0), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x2, 1.55e+109], t$95$0, 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}
t_0 := \frac{x1 \cdot x1 - \left(x2 \cdot x2\right) \cdot 36}{x1 - x2 \cdot -6}\\
\mathbf{if}\;x2 \leq -1.16 \cdot 10^{+117}:\\
\;\;\;\;x1 + \left(x2 \cdot x2\right) \cdot \left(x1 \cdot 8\right)\\
\mathbf{elif}\;x2 \leq -3.2 \cdot 10^{-71}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;x2 \leq 2.6 \cdot 10^{-136}:\\
\;\;\;\;x1 + \left(x1 + 3 \cdot \left(\left(x1 \cdot x1\right) \cdot \left(x1 + 3\right) - x1\right)\right)\\
\mathbf{elif}\;x2 \leq 1.55 \cdot 10^{+109}:\\
\;\;\;\;t_0\\
\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 x2 < -1.1600000000000001e117Initial program 82.0%
Taylor expanded in x1 around 0 82.0%
Taylor expanded in x2 around inf 69.3%
*-commutative69.3%
associate-*l*69.3%
unpow269.3%
Simplified69.3%
if -1.1600000000000001e117 < x2 < -3.1999999999999999e-71 or 2.59999999999999997e-136 < x2 < 1.54999999999999996e109Initial program 68.5%
Taylor expanded in x1 around 0 47.4%
Taylor expanded in x1 around 0 42.9%
*-commutative42.9%
Simplified42.9%
flip-+55.3%
Applied egg-rr55.3%
swap-sqr55.2%
metadata-eval55.2%
Simplified55.2%
if -3.1999999999999999e-71 < x2 < 2.59999999999999997e-136Initial program 62.0%
Taylor expanded in x1 around 0 46.7%
Taylor expanded in x1 around 0 72.4%
+-commutative72.4%
mul-1-neg72.4%
unsub-neg72.4%
*-commutative72.4%
fma-def72.4%
+-commutative72.4%
cube-mult72.4%
unpow272.4%
distribute-rgt-out72.4%
unpow272.4%
*-commutative72.4%
Simplified72.4%
Taylor expanded in x2 around 0 64.4%
unpow264.4%
Simplified64.4%
if 1.54999999999999996e109 < x2 Initial program 68.8%
Taylor expanded in x1 around 0 62.3%
Taylor expanded in x1 around inf 50.1%
Final simplification58.4%
(FPCore (x1 x2) :precision binary64 (if (<= x1 -6.2e-68) (+ x1 (/ (* (* x2 x2) 8.0) (+ x1 (/ 1.0 x1)))) (if (<= x1 6.4e-84) (+ x1 (* x2 -6.0)) (+ x1 (* (* x2 x2) (* x1 8.0))))))
double code(double x1, double x2) {
double tmp;
if (x1 <= -6.2e-68) {
tmp = x1 + (((x2 * x2) * 8.0) / (x1 + (1.0 / x1)));
} else if (x1 <= 6.4e-84) {
tmp = x1 + (x2 * -6.0);
} else {
tmp = x1 + ((x2 * x2) * (x1 * 8.0));
}
return tmp;
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
real(8) :: tmp
if (x1 <= (-6.2d-68)) then
tmp = x1 + (((x2 * x2) * 8.0d0) / (x1 + (1.0d0 / x1)))
else if (x1 <= 6.4d-84) then
tmp = x1 + (x2 * (-6.0d0))
else
tmp = x1 + ((x2 * x2) * (x1 * 8.0d0))
end if
code = tmp
end function
public static double code(double x1, double x2) {
double tmp;
if (x1 <= -6.2e-68) {
tmp = x1 + (((x2 * x2) * 8.0) / (x1 + (1.0 / x1)));
} else if (x1 <= 6.4e-84) {
tmp = x1 + (x2 * -6.0);
} else {
tmp = x1 + ((x2 * x2) * (x1 * 8.0));
}
return tmp;
}
def code(x1, x2): tmp = 0 if x1 <= -6.2e-68: tmp = x1 + (((x2 * x2) * 8.0) / (x1 + (1.0 / x1))) elif x1 <= 6.4e-84: tmp = x1 + (x2 * -6.0) else: tmp = x1 + ((x2 * x2) * (x1 * 8.0)) return tmp
function code(x1, x2) tmp = 0.0 if (x1 <= -6.2e-68) tmp = Float64(x1 + Float64(Float64(Float64(x2 * x2) * 8.0) / Float64(x1 + Float64(1.0 / x1)))); elseif (x1 <= 6.4e-84) tmp = Float64(x1 + Float64(x2 * -6.0)); else tmp = Float64(x1 + Float64(Float64(x2 * x2) * Float64(x1 * 8.0))); end return tmp end
function tmp_2 = code(x1, x2) tmp = 0.0; if (x1 <= -6.2e-68) tmp = x1 + (((x2 * x2) * 8.0) / (x1 + (1.0 / x1))); elseif (x1 <= 6.4e-84) tmp = x1 + (x2 * -6.0); else tmp = x1 + ((x2 * x2) * (x1 * 8.0)); end tmp_2 = tmp; end
code[x1_, x2_] := If[LessEqual[x1, -6.2e-68], N[(x1 + N[(N[(N[(x2 * x2), $MachinePrecision] * 8.0), $MachinePrecision] / N[(x1 + N[(1.0 / x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 6.4e-84], N[(x1 + N[(x2 * -6.0), $MachinePrecision]), $MachinePrecision], N[(x1 + N[(N[(x2 * x2), $MachinePrecision] * N[(x1 * 8.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x1 \leq -6.2 \cdot 10^{-68}:\\
\;\;\;\;x1 + \frac{\left(x2 \cdot x2\right) \cdot 8}{x1 + \frac{1}{x1}}\\
\mathbf{elif}\;x1 \leq 6.4 \cdot 10^{-84}:\\
\;\;\;\;x1 + x2 \cdot -6\\
\mathbf{else}:\\
\;\;\;\;x1 + \left(x2 \cdot x2\right) \cdot \left(x1 \cdot 8\right)\\
\end{array}
\end{array}
if x1 < -6.1999999999999999e-68Initial program 41.7%
Taylor expanded in x2 around inf 22.1%
associate-/l*22.1%
unpow222.1%
+-commutative22.1%
unpow222.1%
fma-udef22.1%
Simplified22.1%
Taylor expanded in x1 around 0 22.1%
Taylor expanded in x2 around inf 13.8%
associate-*r/13.8%
unpow213.8%
Simplified13.8%
if -6.1999999999999999e-68 < x1 < 6.3999999999999999e-84Initial program 99.5%
Taylor expanded in x1 around 0 99.5%
Taylor expanded in x1 around 0 65.1%
*-commutative65.1%
Simplified65.1%
if 6.3999999999999999e-84 < x1 Initial program 57.8%
Taylor expanded in x1 around 0 33.8%
Taylor expanded in x2 around inf 35.8%
*-commutative35.8%
associate-*l*36.6%
unpow236.6%
Simplified36.6%
Final simplification40.6%
(FPCore (x1 x2) :precision binary64 (if (or (<= x1 -5.3e-73) (not (<= x1 3.4e-84))) (+ x1 (* (* x2 x2) (* x1 8.0))) (+ x1 (* x2 -6.0))))
double code(double x1, double x2) {
double tmp;
if ((x1 <= -5.3e-73) || !(x1 <= 3.4e-84)) {
tmp = x1 + ((x2 * x2) * (x1 * 8.0));
} 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 ((x1 <= (-5.3d-73)) .or. (.not. (x1 <= 3.4d-84))) then
tmp = x1 + ((x2 * x2) * (x1 * 8.0d0))
else
tmp = x1 + (x2 * (-6.0d0))
end if
code = tmp
end function
public static double code(double x1, double x2) {
double tmp;
if ((x1 <= -5.3e-73) || !(x1 <= 3.4e-84)) {
tmp = x1 + ((x2 * x2) * (x1 * 8.0));
} else {
tmp = x1 + (x2 * -6.0);
}
return tmp;
}
def code(x1, x2): tmp = 0 if (x1 <= -5.3e-73) or not (x1 <= 3.4e-84): tmp = x1 + ((x2 * x2) * (x1 * 8.0)) else: tmp = x1 + (x2 * -6.0) return tmp
function code(x1, x2) tmp = 0.0 if ((x1 <= -5.3e-73) || !(x1 <= 3.4e-84)) tmp = Float64(x1 + Float64(Float64(x2 * x2) * Float64(x1 * 8.0))); else tmp = Float64(x1 + Float64(x2 * -6.0)); end return tmp end
function tmp_2 = code(x1, x2) tmp = 0.0; if ((x1 <= -5.3e-73) || ~((x1 <= 3.4e-84))) tmp = x1 + ((x2 * x2) * (x1 * 8.0)); else tmp = x1 + (x2 * -6.0); end tmp_2 = tmp; end
code[x1_, x2_] := If[Or[LessEqual[x1, -5.3e-73], N[Not[LessEqual[x1, 3.4e-84]], $MachinePrecision]], N[(x1 + N[(N[(x2 * x2), $MachinePrecision] * N[(x1 * 8.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x1 + N[(x2 * -6.0), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x1 \leq -5.3 \cdot 10^{-73} \lor \neg \left(x1 \leq 3.4 \cdot 10^{-84}\right):\\
\;\;\;\;x1 + \left(x2 \cdot x2\right) \cdot \left(x1 \cdot 8\right)\\
\mathbf{else}:\\
\;\;\;\;x1 + x2 \cdot -6\\
\end{array}
\end{array}
if x1 < -5.29999999999999972e-73 or 3.40000000000000021e-84 < x1 Initial program 51.1%
Taylor expanded in x1 around 0 28.3%
Taylor expanded in x2 around inf 25.9%
*-commutative25.9%
associate-*l*26.4%
unpow226.4%
Simplified26.4%
if -5.29999999999999972e-73 < x1 < 3.40000000000000021e-84Initial program 99.5%
Taylor expanded in x1 around 0 99.5%
Taylor expanded in x1 around 0 65.1%
*-commutative65.1%
Simplified65.1%
Final simplification40.2%
(FPCore (x1 x2) :precision binary64 (+ x1 (* x2 -6.0)))
double code(double x1, double x2) {
return x1 + (x2 * -6.0);
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
code = x1 + (x2 * (-6.0d0))
end function
public static double code(double x1, double x2) {
return x1 + (x2 * -6.0);
}
def code(x1, x2): return x1 + (x2 * -6.0)
function code(x1, x2) return Float64(x1 + Float64(x2 * -6.0)) end
function tmp = code(x1, x2) tmp = x1 + (x2 * -6.0); end
code[x1_, x2_] := N[(x1 + N[(x2 * -6.0), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x1 + x2 \cdot -6
\end{array}
Initial program 68.3%
Taylor expanded in x1 around 0 53.6%
Taylor expanded in x1 around 0 26.8%
*-commutative26.8%
Simplified26.8%
Final simplification26.8%
(FPCore (x1 x2) :precision binary64 (+ x1 x1))
double code(double x1, double x2) {
return x1 + x1;
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
code = x1 + x1
end function
public static double code(double x1, double x2) {
return x1 + x1;
}
def code(x1, x2): return x1 + x1
function code(x1, x2) return Float64(x1 + x1) end
function tmp = code(x1, x2) tmp = x1 + x1; end
code[x1_, x2_] := N[(x1 + x1), $MachinePrecision]
\begin{array}{l}
\\
x1 + x1
\end{array}
Initial program 68.3%
Taylor expanded in x2 around inf 48.3%
associate-/l*47.5%
unpow247.5%
+-commutative47.5%
unpow247.5%
fma-udef47.5%
Simplified47.5%
Taylor expanded in x1 around inf 3.6%
+-commutative3.6%
Simplified3.6%
Taylor expanded in x1 around inf 3.5%
count-23.5%
Simplified3.5%
Final simplification3.5%
(FPCore (x1 x2) :precision binary64 9.0)
double code(double x1, double x2) {
return 9.0;
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
code = 9.0d0
end function
public static double code(double x1, double x2) {
return 9.0;
}
def code(x1, x2): return 9.0
function code(x1, x2) return 9.0 end
function tmp = code(x1, x2) tmp = 9.0; end
code[x1_, x2_] := 9.0
\begin{array}{l}
\\
9
\end{array}
Initial program 68.3%
Taylor expanded in x2 around inf 48.3%
associate-/l*47.5%
unpow247.5%
+-commutative47.5%
unpow247.5%
fma-udef47.5%
Simplified47.5%
Taylor expanded in x1 around inf 3.6%
+-commutative3.6%
Simplified3.6%
Taylor expanded in x1 around 0 3.4%
Final simplification3.4%
(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 68.3%
Taylor expanded in x1 around 0 53.6%
Taylor expanded in x1 around 0 26.8%
*-commutative26.8%
Simplified26.8%
Taylor expanded in x1 around inf 3.4%
Final simplification3.4%
herbie shell --seed 2023228
(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))))))