
(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 20 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 (+ (* x1 x1) 1.0))
(t_1 (fma 2.0 x2 (fma x1 (* x1 3.0) (- x1))))
(t_2 (- -1.0 (* x1 x1)))
(t_3 (* x1 (* x1 3.0)))
(t_4 (- (+ t_3 (* 2.0 x2)) x1))
(t_5 (/ t_4 t_0))
(t_6 (/ t_4 t_2))
(t_7
(+
x1
(+
(+
(*
(+
(* (* x1 x1) (+ 6.0 (* 4.0 t_6)))
(* (* (* x1 2.0) t_5) (+ 3.0 t_6)))
t_2)
(* t_3 t_5))
(* x1 (* x1 x1)))))
(t_8 (+ x1 (+ t_7 (* 3.0 (/ (- (- t_3 (* 2.0 x2)) x1) t_0)))))
(t_9 (/ t_1 (fma x1 x1 1.0))))
(if (<= t_8 5e+262)
(+
x1
(fma
(/ (- t_3 (fma 2.0 x2 x1)) (fma x1 x1 1.0))
3.0
(fma
(fma x1 x1 1.0)
(fma
x1
(* x1 (fma t_9 4.0 -6.0))
(/ (* (+ -3.0 t_9) (* (* x1 2.0) t_1)) (fma x1 x1 1.0)))
(fma x1 (* (* x1 3.0) t_9) (fma x1 (* x1 x1) x1)))))
(if (<= t_8 INFINITY)
(+ x1 (+ t_7 (* 3.0 3.0)))
(+ x1 (* (* x1 x1) (* x1 (* x1 6.0))))))))
double code(double x1, double x2) {
double t_0 = (x1 * x1) + 1.0;
double t_1 = fma(2.0, x2, fma(x1, (x1 * 3.0), -x1));
double t_2 = -1.0 - (x1 * x1);
double t_3 = x1 * (x1 * 3.0);
double t_4 = (t_3 + (2.0 * x2)) - x1;
double t_5 = t_4 / t_0;
double t_6 = t_4 / t_2;
double t_7 = x1 + ((((((x1 * x1) * (6.0 + (4.0 * t_6))) + (((x1 * 2.0) * t_5) * (3.0 + t_6))) * t_2) + (t_3 * t_5)) + (x1 * (x1 * x1)));
double t_8 = x1 + (t_7 + (3.0 * (((t_3 - (2.0 * x2)) - x1) / t_0)));
double t_9 = t_1 / fma(x1, x1, 1.0);
double tmp;
if (t_8 <= 5e+262) {
tmp = x1 + fma(((t_3 - fma(2.0, x2, x1)) / fma(x1, x1, 1.0)), 3.0, fma(fma(x1, x1, 1.0), fma(x1, (x1 * fma(t_9, 4.0, -6.0)), (((-3.0 + t_9) * ((x1 * 2.0) * t_1)) / fma(x1, x1, 1.0))), fma(x1, ((x1 * 3.0) * t_9), fma(x1, (x1 * x1), x1))));
} else if (t_8 <= ((double) INFINITY)) {
tmp = x1 + (t_7 + (3.0 * 3.0));
} else {
tmp = x1 + ((x1 * x1) * (x1 * (x1 * 6.0)));
}
return tmp;
}
function code(x1, x2) t_0 = Float64(Float64(x1 * x1) + 1.0) t_1 = fma(2.0, x2, fma(x1, Float64(x1 * 3.0), Float64(-x1))) t_2 = Float64(-1.0 - Float64(x1 * x1)) t_3 = Float64(x1 * Float64(x1 * 3.0)) t_4 = Float64(Float64(t_3 + Float64(2.0 * x2)) - x1) t_5 = Float64(t_4 / t_0) t_6 = Float64(t_4 / t_2) t_7 = Float64(x1 + Float64(Float64(Float64(Float64(Float64(Float64(x1 * x1) * Float64(6.0 + Float64(4.0 * t_6))) + Float64(Float64(Float64(x1 * 2.0) * t_5) * Float64(3.0 + t_6))) * t_2) + Float64(t_3 * t_5)) + Float64(x1 * Float64(x1 * x1)))) t_8 = Float64(x1 + Float64(t_7 + Float64(3.0 * Float64(Float64(Float64(t_3 - Float64(2.0 * x2)) - x1) / t_0)))) t_9 = Float64(t_1 / fma(x1, x1, 1.0)) tmp = 0.0 if (t_8 <= 5e+262) tmp = Float64(x1 + fma(Float64(Float64(t_3 - fma(2.0, x2, x1)) / fma(x1, x1, 1.0)), 3.0, fma(fma(x1, x1, 1.0), fma(x1, Float64(x1 * fma(t_9, 4.0, -6.0)), Float64(Float64(Float64(-3.0 + t_9) * Float64(Float64(x1 * 2.0) * t_1)) / fma(x1, x1, 1.0))), fma(x1, Float64(Float64(x1 * 3.0) * t_9), fma(x1, Float64(x1 * x1), x1))))); elseif (t_8 <= Inf) tmp = Float64(x1 + Float64(t_7 + Float64(3.0 * 3.0))); else tmp = Float64(x1 + Float64(Float64(x1 * x1) * Float64(x1 * Float64(x1 * 6.0)))); end return tmp end
code[x1_, x2_] := Block[{t$95$0 = N[(N[(x1 * x1), $MachinePrecision] + 1.0), $MachinePrecision]}, Block[{t$95$1 = N[(2.0 * x2 + N[(x1 * N[(x1 * 3.0), $MachinePrecision] + (-x1)), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(-1.0 - N[(x1 * x1), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(x1 * N[(x1 * 3.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[(N[(t$95$3 + N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision]}, Block[{t$95$5 = N[(t$95$4 / t$95$0), $MachinePrecision]}, Block[{t$95$6 = N[(t$95$4 / t$95$2), $MachinePrecision]}, Block[{t$95$7 = N[(x1 + N[(N[(N[(N[(N[(N[(x1 * x1), $MachinePrecision] * N[(6.0 + N[(4.0 * t$95$6), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(N[(x1 * 2.0), $MachinePrecision] * t$95$5), $MachinePrecision] * N[(3.0 + t$95$6), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * t$95$2), $MachinePrecision] + N[(t$95$3 * t$95$5), $MachinePrecision]), $MachinePrecision] + N[(x1 * N[(x1 * x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$8 = N[(x1 + N[(t$95$7 + N[(3.0 * N[(N[(N[(t$95$3 - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$9 = N[(t$95$1 / N[(x1 * x1 + 1.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$8, 5e+262], N[(x1 + N[(N[(N[(t$95$3 - N[(2.0 * x2 + x1), $MachinePrecision]), $MachinePrecision] / N[(x1 * x1 + 1.0), $MachinePrecision]), $MachinePrecision] * 3.0 + N[(N[(x1 * x1 + 1.0), $MachinePrecision] * N[(x1 * N[(x1 * N[(t$95$9 * 4.0 + -6.0), $MachinePrecision]), $MachinePrecision] + N[(N[(N[(-3.0 + t$95$9), $MachinePrecision] * N[(N[(x1 * 2.0), $MachinePrecision] * t$95$1), $MachinePrecision]), $MachinePrecision] / N[(x1 * x1 + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(x1 * N[(N[(x1 * 3.0), $MachinePrecision] * t$95$9), $MachinePrecision] + N[(x1 * N[(x1 * x1), $MachinePrecision] + x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$8, Infinity], N[(x1 + N[(t$95$7 + N[(3.0 * 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x1 + N[(N[(x1 * x1), $MachinePrecision] * N[(x1 * N[(x1 * 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x1 \cdot x1 + 1\\
t_1 := \mathsf{fma}\left(2, x2, \mathsf{fma}\left(x1, x1 \cdot 3, -x1\right)\right)\\
t_2 := -1 - x1 \cdot x1\\
t_3 := x1 \cdot \left(x1 \cdot 3\right)\\
t_4 := \left(t\_3 + 2 \cdot x2\right) - x1\\
t_5 := \frac{t\_4}{t\_0}\\
t_6 := \frac{t\_4}{t\_2}\\
t_7 := x1 + \left(\left(\left(\left(x1 \cdot x1\right) \cdot \left(6 + 4 \cdot t\_6\right) + \left(\left(x1 \cdot 2\right) \cdot t\_5\right) \cdot \left(3 + t\_6\right)\right) \cdot t\_2 + t\_3 \cdot t\_5\right) + x1 \cdot \left(x1 \cdot x1\right)\right)\\
t_8 := x1 + \left(t\_7 + 3 \cdot \frac{\left(t\_3 - 2 \cdot x2\right) - x1}{t\_0}\right)\\
t_9 := \frac{t\_1}{\mathsf{fma}\left(x1, x1, 1\right)}\\
\mathbf{if}\;t\_8 \leq 5 \cdot 10^{+262}:\\
\;\;\;\;x1 + \mathsf{fma}\left(\frac{t\_3 - \mathsf{fma}\left(2, x2, x1\right)}{\mathsf{fma}\left(x1, x1, 1\right)}, 3, \mathsf{fma}\left(\mathsf{fma}\left(x1, x1, 1\right), \mathsf{fma}\left(x1, x1 \cdot \mathsf{fma}\left(t\_9, 4, -6\right), \frac{\left(-3 + t\_9\right) \cdot \left(\left(x1 \cdot 2\right) \cdot t\_1\right)}{\mathsf{fma}\left(x1, x1, 1\right)}\right), \mathsf{fma}\left(x1, \left(x1 \cdot 3\right) \cdot t\_9, \mathsf{fma}\left(x1, x1 \cdot x1, x1\right)\right)\right)\right)\\
\mathbf{elif}\;t\_8 \leq \infty:\\
\;\;\;\;x1 + \left(t\_7 + 3 \cdot 3\right)\\
\mathbf{else}:\\
\;\;\;\;x1 + \left(x1 \cdot x1\right) \cdot \left(x1 \cdot \left(x1 \cdot 6\right)\right)\\
\end{array}
\end{array}
if (+.f64 x1 (+.f64 (+.f64 (+.f64 (+.f64 (*.f64 (+.f64 (*.f64 (*.f64 (*.f64 #s(literal 2 binary64) x1) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64)))) (-.f64 (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))) #s(literal 3 binary64))) (*.f64 (*.f64 x1 x1) (-.f64 (*.f64 #s(literal 4 binary64) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64)))) #s(literal 6 binary64)))) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))) (*.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))))) (*.f64 (*.f64 x1 x1) x1)) x1) (*.f64 #s(literal 3 binary64) (/.f64 (-.f64 (-.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64)))))) < 5.00000000000000008e262Initial program 99.3%
Applied rewrites99.6%
if 5.00000000000000008e262 < (+.f64 x1 (+.f64 (+.f64 (+.f64 (+.f64 (*.f64 (+.f64 (*.f64 (*.f64 (*.f64 #s(literal 2 binary64) x1) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64)))) (-.f64 (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))) #s(literal 3 binary64))) (*.f64 (*.f64 x1 x1) (-.f64 (*.f64 #s(literal 4 binary64) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64)))) #s(literal 6 binary64)))) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))) (*.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))))) (*.f64 (*.f64 x1 x1) x1)) x1) (*.f64 #s(literal 3 binary64) (/.f64 (-.f64 (-.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64)))))) < +inf.0Initial program 99.9%
Taylor expanded in x1 around inf
Applied rewrites99.9%
if +inf.0 < (+.f64 x1 (+.f64 (+.f64 (+.f64 (+.f64 (*.f64 (+.f64 (*.f64 (*.f64 (*.f64 #s(literal 2 binary64) x1) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64)))) (-.f64 (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))) #s(literal 3 binary64))) (*.f64 (*.f64 x1 x1) (-.f64 (*.f64 #s(literal 4 binary64) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64)))) #s(literal 6 binary64)))) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))) (*.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))))) (*.f64 (*.f64 x1 x1) x1)) x1) (*.f64 #s(literal 3 binary64) (/.f64 (-.f64 (-.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64)))))) Initial program 0.0%
Taylor expanded in x1 around inf
lower-*.f64N/A
lower-pow.f64N/A
+-commutativeN/A
associate--l+N/A
lower-+.f64N/A
Applied rewrites100.0%
Taylor expanded in x1 around 0
Applied rewrites100.0%
Taylor expanded in x2 around inf
Applied rewrites100.0%
Taylor expanded in x1 around inf
Applied rewrites100.0%
Final simplification99.8%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (+ (* x1 x1) 1.0))
(t_1 (* x1 (* x1 3.0)))
(t_2 (- (+ t_1 (* 2.0 x2)) x1))
(t_3 (/ t_2 t_0))
(t_4 (* x1 (fma 9.0 x1 -1.0)))
(t_5 (- -1.0 (* x1 x1)))
(t_6 (/ t_2 t_5))
(t_7
(+
x1
(+
(+
x1
(+
(+
(*
(+
(* (* x1 x1) (+ 6.0 (* 4.0 t_6)))
(* (* (* x1 2.0) t_3) (+ 3.0 t_6)))
t_5)
(* t_1 t_3))
(* x1 (* x1 x1))))
(* 3.0 (/ (- (- t_1 (* 2.0 x2)) x1) t_0)))))
(t_8 (* x2 (* x2 (* x1 8.0)))))
(if (<= t_7 -5e+263)
t_8
(if (<= t_7 -1e-58)
(* x2 -6.0)
(if (<= t_7 2e-6)
t_4
(if (<= t_7 5e+186) (* x2 -6.0) (if (<= t_7 INFINITY) t_8 t_4)))))))
double code(double x1, double x2) {
double t_0 = (x1 * x1) + 1.0;
double t_1 = x1 * (x1 * 3.0);
double t_2 = (t_1 + (2.0 * x2)) - x1;
double t_3 = t_2 / t_0;
double t_4 = x1 * fma(9.0, x1, -1.0);
double t_5 = -1.0 - (x1 * x1);
double t_6 = t_2 / t_5;
double t_7 = x1 + ((x1 + ((((((x1 * x1) * (6.0 + (4.0 * t_6))) + (((x1 * 2.0) * t_3) * (3.0 + t_6))) * t_5) + (t_1 * t_3)) + (x1 * (x1 * x1)))) + (3.0 * (((t_1 - (2.0 * x2)) - x1) / t_0)));
double t_8 = x2 * (x2 * (x1 * 8.0));
double tmp;
if (t_7 <= -5e+263) {
tmp = t_8;
} else if (t_7 <= -1e-58) {
tmp = x2 * -6.0;
} else if (t_7 <= 2e-6) {
tmp = t_4;
} else if (t_7 <= 5e+186) {
tmp = x2 * -6.0;
} else if (t_7 <= ((double) INFINITY)) {
tmp = t_8;
} else {
tmp = t_4;
}
return tmp;
}
function code(x1, x2) t_0 = Float64(Float64(x1 * x1) + 1.0) t_1 = Float64(x1 * Float64(x1 * 3.0)) t_2 = Float64(Float64(t_1 + Float64(2.0 * x2)) - x1) t_3 = Float64(t_2 / t_0) t_4 = Float64(x1 * fma(9.0, x1, -1.0)) t_5 = Float64(-1.0 - Float64(x1 * x1)) t_6 = Float64(t_2 / t_5) t_7 = Float64(x1 + Float64(Float64(x1 + Float64(Float64(Float64(Float64(Float64(Float64(x1 * x1) * Float64(6.0 + Float64(4.0 * t_6))) + Float64(Float64(Float64(x1 * 2.0) * t_3) * Float64(3.0 + t_6))) * t_5) + Float64(t_1 * t_3)) + Float64(x1 * Float64(x1 * x1)))) + Float64(3.0 * Float64(Float64(Float64(t_1 - Float64(2.0 * x2)) - x1) / t_0)))) t_8 = Float64(x2 * Float64(x2 * Float64(x1 * 8.0))) tmp = 0.0 if (t_7 <= -5e+263) tmp = t_8; elseif (t_7 <= -1e-58) tmp = Float64(x2 * -6.0); elseif (t_7 <= 2e-6) tmp = t_4; elseif (t_7 <= 5e+186) tmp = Float64(x2 * -6.0); elseif (t_7 <= Inf) tmp = t_8; else tmp = t_4; end return tmp end
code[x1_, x2_] := Block[{t$95$0 = N[(N[(x1 * x1), $MachinePrecision] + 1.0), $MachinePrecision]}, Block[{t$95$1 = N[(x1 * N[(x1 * 3.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(t$95$1 + N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision]}, Block[{t$95$3 = N[(t$95$2 / t$95$0), $MachinePrecision]}, Block[{t$95$4 = N[(x1 * N[(9.0 * x1 + -1.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$5 = N[(-1.0 - N[(x1 * x1), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$6 = N[(t$95$2 / t$95$5), $MachinePrecision]}, Block[{t$95$7 = N[(x1 + N[(N[(x1 + N[(N[(N[(N[(N[(N[(x1 * x1), $MachinePrecision] * N[(6.0 + N[(4.0 * t$95$6), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(N[(x1 * 2.0), $MachinePrecision] * t$95$3), $MachinePrecision] * N[(3.0 + t$95$6), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * t$95$5), $MachinePrecision] + N[(t$95$1 * t$95$3), $MachinePrecision]), $MachinePrecision] + N[(x1 * N[(x1 * x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(3.0 * N[(N[(N[(t$95$1 - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$8 = N[(x2 * N[(x2 * N[(x1 * 8.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$7, -5e+263], t$95$8, If[LessEqual[t$95$7, -1e-58], N[(x2 * -6.0), $MachinePrecision], If[LessEqual[t$95$7, 2e-6], t$95$4, If[LessEqual[t$95$7, 5e+186], N[(x2 * -6.0), $MachinePrecision], If[LessEqual[t$95$7, Infinity], t$95$8, t$95$4]]]]]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x1 \cdot x1 + 1\\
t_1 := x1 \cdot \left(x1 \cdot 3\right)\\
t_2 := \left(t\_1 + 2 \cdot x2\right) - x1\\
t_3 := \frac{t\_2}{t\_0}\\
t_4 := x1 \cdot \mathsf{fma}\left(9, x1, -1\right)\\
t_5 := -1 - x1 \cdot x1\\
t_6 := \frac{t\_2}{t\_5}\\
t_7 := x1 + \left(\left(x1 + \left(\left(\left(\left(x1 \cdot x1\right) \cdot \left(6 + 4 \cdot t\_6\right) + \left(\left(x1 \cdot 2\right) \cdot t\_3\right) \cdot \left(3 + t\_6\right)\right) \cdot t\_5 + t\_1 \cdot t\_3\right) + x1 \cdot \left(x1 \cdot x1\right)\right)\right) + 3 \cdot \frac{\left(t\_1 - 2 \cdot x2\right) - x1}{t\_0}\right)\\
t_8 := x2 \cdot \left(x2 \cdot \left(x1 \cdot 8\right)\right)\\
\mathbf{if}\;t\_7 \leq -5 \cdot 10^{+263}:\\
\;\;\;\;t\_8\\
\mathbf{elif}\;t\_7 \leq -1 \cdot 10^{-58}:\\
\;\;\;\;x2 \cdot -6\\
\mathbf{elif}\;t\_7 \leq 2 \cdot 10^{-6}:\\
\;\;\;\;t\_4\\
\mathbf{elif}\;t\_7 \leq 5 \cdot 10^{+186}:\\
\;\;\;\;x2 \cdot -6\\
\mathbf{elif}\;t\_7 \leq \infty:\\
\;\;\;\;t\_8\\
\mathbf{else}:\\
\;\;\;\;t\_4\\
\end{array}
\end{array}
if (+.f64 x1 (+.f64 (+.f64 (+.f64 (+.f64 (*.f64 (+.f64 (*.f64 (*.f64 (*.f64 #s(literal 2 binary64) x1) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64)))) (-.f64 (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))) #s(literal 3 binary64))) (*.f64 (*.f64 x1 x1) (-.f64 (*.f64 #s(literal 4 binary64) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64)))) #s(literal 6 binary64)))) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))) (*.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))))) (*.f64 (*.f64 x1 x1) x1)) x1) (*.f64 #s(literal 3 binary64) (/.f64 (-.f64 (-.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64)))))) < -5.00000000000000022e263 or 4.99999999999999954e186 < (+.f64 x1 (+.f64 (+.f64 (+.f64 (+.f64 (*.f64 (+.f64 (*.f64 (*.f64 (*.f64 #s(literal 2 binary64) x1) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64)))) (-.f64 (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))) #s(literal 3 binary64))) (*.f64 (*.f64 x1 x1) (-.f64 (*.f64 #s(literal 4 binary64) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64)))) #s(literal 6 binary64)))) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))) (*.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))))) (*.f64 (*.f64 x1 x1) x1)) x1) (*.f64 #s(literal 3 binary64) (/.f64 (-.f64 (-.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64)))))) < +inf.0Initial program 99.8%
Taylor expanded in x1 around 0
*-commutativeN/A
lower-*.f643.1
Applied rewrites3.1%
Taylor expanded in x1 around 0
Applied rewrites47.7%
Taylor expanded in x2 around 0
Applied rewrites61.2%
Taylor expanded in x2 around inf
Applied rewrites60.0%
if -5.00000000000000022e263 < (+.f64 x1 (+.f64 (+.f64 (+.f64 (+.f64 (*.f64 (+.f64 (*.f64 (*.f64 (*.f64 #s(literal 2 binary64) x1) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64)))) (-.f64 (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))) #s(literal 3 binary64))) (*.f64 (*.f64 x1 x1) (-.f64 (*.f64 #s(literal 4 binary64) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64)))) #s(literal 6 binary64)))) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))) (*.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))))) (*.f64 (*.f64 x1 x1) x1)) x1) (*.f64 #s(literal 3 binary64) (/.f64 (-.f64 (-.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64)))))) < -1e-58 or 1.99999999999999991e-6 < (+.f64 x1 (+.f64 (+.f64 (+.f64 (+.f64 (*.f64 (+.f64 (*.f64 (*.f64 (*.f64 #s(literal 2 binary64) x1) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64)))) (-.f64 (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))) #s(literal 3 binary64))) (*.f64 (*.f64 x1 x1) (-.f64 (*.f64 #s(literal 4 binary64) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64)))) #s(literal 6 binary64)))) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))) (*.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))))) (*.f64 (*.f64 x1 x1) x1)) x1) (*.f64 #s(literal 3 binary64) (/.f64 (-.f64 (-.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64)))))) < 4.99999999999999954e186Initial program 99.4%
Taylor expanded in x1 around 0
*-commutativeN/A
lower-*.f6466.4
Applied rewrites66.4%
Taylor expanded in x1 around 0
*-commutativeN/A
lower-*.f6466.7
Applied rewrites66.7%
if -1e-58 < (+.f64 x1 (+.f64 (+.f64 (+.f64 (+.f64 (*.f64 (+.f64 (*.f64 (*.f64 (*.f64 #s(literal 2 binary64) x1) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64)))) (-.f64 (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))) #s(literal 3 binary64))) (*.f64 (*.f64 x1 x1) (-.f64 (*.f64 #s(literal 4 binary64) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64)))) #s(literal 6 binary64)))) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))) (*.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))))) (*.f64 (*.f64 x1 x1) x1)) x1) (*.f64 #s(literal 3 binary64) (/.f64 (-.f64 (-.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64)))))) < 1.99999999999999991e-6 or +inf.0 < (+.f64 x1 (+.f64 (+.f64 (+.f64 (+.f64 (*.f64 (+.f64 (*.f64 (*.f64 (*.f64 #s(literal 2 binary64) x1) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64)))) (-.f64 (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))) #s(literal 3 binary64))) (*.f64 (*.f64 x1 x1) (-.f64 (*.f64 #s(literal 4 binary64) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64)))) #s(literal 6 binary64)))) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))) (*.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))))) (*.f64 (*.f64 x1 x1) x1)) x1) (*.f64 #s(literal 3 binary64) (/.f64 (-.f64 (-.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64)))))) Initial program 38.4%
Taylor expanded in x1 around 0
*-commutativeN/A
lower-*.f6416.3
Applied rewrites16.3%
Taylor expanded in x1 around 0
Applied rewrites82.9%
Taylor expanded in x2 around 0
Applied rewrites75.8%
Final simplification69.6%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (+ (* x1 x1) 1.0))
(t_1 (* x1 (* x1 3.0)))
(t_2 (- (+ t_1 (* 2.0 x2)) x1))
(t_3 (/ t_2 t_0))
(t_4 (* x1 (fma 9.0 x1 -1.0)))
(t_5 (- -1.0 (* x1 x1)))
(t_6 (/ t_2 t_5))
(t_7
(+
x1
(+
(+
x1
(+
(+
(*
(+
(* (* x1 x1) (+ 6.0 (* 4.0 t_6)))
(* (* (* x1 2.0) t_3) (+ 3.0 t_6)))
t_5)
(* t_1 t_3))
(* x1 (* x1 x1))))
(* 3.0 (/ (- (- t_1 (* 2.0 x2)) x1) t_0)))))
(t_8 (* 8.0 (* x1 (* x2 x2)))))
(if (<= t_7 -5e+263)
t_8
(if (<= t_7 -1e-58)
(* x2 -6.0)
(if (<= t_7 2e-6)
t_4
(if (<= t_7 5e+186) (* x2 -6.0) (if (<= t_7 INFINITY) t_8 t_4)))))))
double code(double x1, double x2) {
double t_0 = (x1 * x1) + 1.0;
double t_1 = x1 * (x1 * 3.0);
double t_2 = (t_1 + (2.0 * x2)) - x1;
double t_3 = t_2 / t_0;
double t_4 = x1 * fma(9.0, x1, -1.0);
double t_5 = -1.0 - (x1 * x1);
double t_6 = t_2 / t_5;
double t_7 = x1 + ((x1 + ((((((x1 * x1) * (6.0 + (4.0 * t_6))) + (((x1 * 2.0) * t_3) * (3.0 + t_6))) * t_5) + (t_1 * t_3)) + (x1 * (x1 * x1)))) + (3.0 * (((t_1 - (2.0 * x2)) - x1) / t_0)));
double t_8 = 8.0 * (x1 * (x2 * x2));
double tmp;
if (t_7 <= -5e+263) {
tmp = t_8;
} else if (t_7 <= -1e-58) {
tmp = x2 * -6.0;
} else if (t_7 <= 2e-6) {
tmp = t_4;
} else if (t_7 <= 5e+186) {
tmp = x2 * -6.0;
} else if (t_7 <= ((double) INFINITY)) {
tmp = t_8;
} else {
tmp = t_4;
}
return tmp;
}
function code(x1, x2) t_0 = Float64(Float64(x1 * x1) + 1.0) t_1 = Float64(x1 * Float64(x1 * 3.0)) t_2 = Float64(Float64(t_1 + Float64(2.0 * x2)) - x1) t_3 = Float64(t_2 / t_0) t_4 = Float64(x1 * fma(9.0, x1, -1.0)) t_5 = Float64(-1.0 - Float64(x1 * x1)) t_6 = Float64(t_2 / t_5) t_7 = Float64(x1 + Float64(Float64(x1 + Float64(Float64(Float64(Float64(Float64(Float64(x1 * x1) * Float64(6.0 + Float64(4.0 * t_6))) + Float64(Float64(Float64(x1 * 2.0) * t_3) * Float64(3.0 + t_6))) * t_5) + Float64(t_1 * t_3)) + Float64(x1 * Float64(x1 * x1)))) + Float64(3.0 * Float64(Float64(Float64(t_1 - Float64(2.0 * x2)) - x1) / t_0)))) t_8 = Float64(8.0 * Float64(x1 * Float64(x2 * x2))) tmp = 0.0 if (t_7 <= -5e+263) tmp = t_8; elseif (t_7 <= -1e-58) tmp = Float64(x2 * -6.0); elseif (t_7 <= 2e-6) tmp = t_4; elseif (t_7 <= 5e+186) tmp = Float64(x2 * -6.0); elseif (t_7 <= Inf) tmp = t_8; else tmp = t_4; end return tmp end
code[x1_, x2_] := Block[{t$95$0 = N[(N[(x1 * x1), $MachinePrecision] + 1.0), $MachinePrecision]}, Block[{t$95$1 = N[(x1 * N[(x1 * 3.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(t$95$1 + N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision]}, Block[{t$95$3 = N[(t$95$2 / t$95$0), $MachinePrecision]}, Block[{t$95$4 = N[(x1 * N[(9.0 * x1 + -1.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$5 = N[(-1.0 - N[(x1 * x1), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$6 = N[(t$95$2 / t$95$5), $MachinePrecision]}, Block[{t$95$7 = N[(x1 + N[(N[(x1 + N[(N[(N[(N[(N[(N[(x1 * x1), $MachinePrecision] * N[(6.0 + N[(4.0 * t$95$6), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(N[(x1 * 2.0), $MachinePrecision] * t$95$3), $MachinePrecision] * N[(3.0 + t$95$6), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * t$95$5), $MachinePrecision] + N[(t$95$1 * t$95$3), $MachinePrecision]), $MachinePrecision] + N[(x1 * N[(x1 * x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(3.0 * N[(N[(N[(t$95$1 - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$8 = N[(8.0 * N[(x1 * N[(x2 * x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$7, -5e+263], t$95$8, If[LessEqual[t$95$7, -1e-58], N[(x2 * -6.0), $MachinePrecision], If[LessEqual[t$95$7, 2e-6], t$95$4, If[LessEqual[t$95$7, 5e+186], N[(x2 * -6.0), $MachinePrecision], If[LessEqual[t$95$7, Infinity], t$95$8, t$95$4]]]]]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x1 \cdot x1 + 1\\
t_1 := x1 \cdot \left(x1 \cdot 3\right)\\
t_2 := \left(t\_1 + 2 \cdot x2\right) - x1\\
t_3 := \frac{t\_2}{t\_0}\\
t_4 := x1 \cdot \mathsf{fma}\left(9, x1, -1\right)\\
t_5 := -1 - x1 \cdot x1\\
t_6 := \frac{t\_2}{t\_5}\\
t_7 := x1 + \left(\left(x1 + \left(\left(\left(\left(x1 \cdot x1\right) \cdot \left(6 + 4 \cdot t\_6\right) + \left(\left(x1 \cdot 2\right) \cdot t\_3\right) \cdot \left(3 + t\_6\right)\right) \cdot t\_5 + t\_1 \cdot t\_3\right) + x1 \cdot \left(x1 \cdot x1\right)\right)\right) + 3 \cdot \frac{\left(t\_1 - 2 \cdot x2\right) - x1}{t\_0}\right)\\
t_8 := 8 \cdot \left(x1 \cdot \left(x2 \cdot x2\right)\right)\\
\mathbf{if}\;t\_7 \leq -5 \cdot 10^{+263}:\\
\;\;\;\;t\_8\\
\mathbf{elif}\;t\_7 \leq -1 \cdot 10^{-58}:\\
\;\;\;\;x2 \cdot -6\\
\mathbf{elif}\;t\_7 \leq 2 \cdot 10^{-6}:\\
\;\;\;\;t\_4\\
\mathbf{elif}\;t\_7 \leq 5 \cdot 10^{+186}:\\
\;\;\;\;x2 \cdot -6\\
\mathbf{elif}\;t\_7 \leq \infty:\\
\;\;\;\;t\_8\\
\mathbf{else}:\\
\;\;\;\;t\_4\\
\end{array}
\end{array}
if (+.f64 x1 (+.f64 (+.f64 (+.f64 (+.f64 (*.f64 (+.f64 (*.f64 (*.f64 (*.f64 #s(literal 2 binary64) x1) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64)))) (-.f64 (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))) #s(literal 3 binary64))) (*.f64 (*.f64 x1 x1) (-.f64 (*.f64 #s(literal 4 binary64) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64)))) #s(literal 6 binary64)))) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))) (*.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))))) (*.f64 (*.f64 x1 x1) x1)) x1) (*.f64 #s(literal 3 binary64) (/.f64 (-.f64 (-.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64)))))) < -5.00000000000000022e263 or 4.99999999999999954e186 < (+.f64 x1 (+.f64 (+.f64 (+.f64 (+.f64 (*.f64 (+.f64 (*.f64 (*.f64 (*.f64 #s(literal 2 binary64) x1) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64)))) (-.f64 (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))) #s(literal 3 binary64))) (*.f64 (*.f64 x1 x1) (-.f64 (*.f64 #s(literal 4 binary64) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64)))) #s(literal 6 binary64)))) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))) (*.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))))) (*.f64 (*.f64 x1 x1) x1)) x1) (*.f64 #s(literal 3 binary64) (/.f64 (-.f64 (-.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64)))))) < +inf.0Initial program 99.8%
Taylor expanded in x1 around 0
*-commutativeN/A
lower-*.f643.1
Applied rewrites3.1%
Taylor expanded in x1 around 0
Applied rewrites47.7%
Taylor expanded in x2 around inf
Applied rewrites46.5%
if -5.00000000000000022e263 < (+.f64 x1 (+.f64 (+.f64 (+.f64 (+.f64 (*.f64 (+.f64 (*.f64 (*.f64 (*.f64 #s(literal 2 binary64) x1) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64)))) (-.f64 (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))) #s(literal 3 binary64))) (*.f64 (*.f64 x1 x1) (-.f64 (*.f64 #s(literal 4 binary64) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64)))) #s(literal 6 binary64)))) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))) (*.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))))) (*.f64 (*.f64 x1 x1) x1)) x1) (*.f64 #s(literal 3 binary64) (/.f64 (-.f64 (-.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64)))))) < -1e-58 or 1.99999999999999991e-6 < (+.f64 x1 (+.f64 (+.f64 (+.f64 (+.f64 (*.f64 (+.f64 (*.f64 (*.f64 (*.f64 #s(literal 2 binary64) x1) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64)))) (-.f64 (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))) #s(literal 3 binary64))) (*.f64 (*.f64 x1 x1) (-.f64 (*.f64 #s(literal 4 binary64) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64)))) #s(literal 6 binary64)))) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))) (*.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))))) (*.f64 (*.f64 x1 x1) x1)) x1) (*.f64 #s(literal 3 binary64) (/.f64 (-.f64 (-.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64)))))) < 4.99999999999999954e186Initial program 99.4%
Taylor expanded in x1 around 0
*-commutativeN/A
lower-*.f6466.4
Applied rewrites66.4%
Taylor expanded in x1 around 0
*-commutativeN/A
lower-*.f6466.7
Applied rewrites66.7%
if -1e-58 < (+.f64 x1 (+.f64 (+.f64 (+.f64 (+.f64 (*.f64 (+.f64 (*.f64 (*.f64 (*.f64 #s(literal 2 binary64) x1) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64)))) (-.f64 (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))) #s(literal 3 binary64))) (*.f64 (*.f64 x1 x1) (-.f64 (*.f64 #s(literal 4 binary64) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64)))) #s(literal 6 binary64)))) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))) (*.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))))) (*.f64 (*.f64 x1 x1) x1)) x1) (*.f64 #s(literal 3 binary64) (/.f64 (-.f64 (-.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64)))))) < 1.99999999999999991e-6 or +inf.0 < (+.f64 x1 (+.f64 (+.f64 (+.f64 (+.f64 (*.f64 (+.f64 (*.f64 (*.f64 (*.f64 #s(literal 2 binary64) x1) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64)))) (-.f64 (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))) #s(literal 3 binary64))) (*.f64 (*.f64 x1 x1) (-.f64 (*.f64 #s(literal 4 binary64) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64)))) #s(literal 6 binary64)))) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))) (*.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))))) (*.f64 (*.f64 x1 x1) x1)) x1) (*.f64 #s(literal 3 binary64) (/.f64 (-.f64 (-.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64)))))) Initial program 38.4%
Taylor expanded in x1 around 0
*-commutativeN/A
lower-*.f6416.3
Applied rewrites16.3%
Taylor expanded in x1 around 0
Applied rewrites82.9%
Taylor expanded in x2 around 0
Applied rewrites75.8%
Final simplification66.3%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (+ (* x1 x1) 1.0))
(t_1 (* x1 (* x1 3.0)))
(t_2 (- (+ t_1 (* 2.0 x2)) x1))
(t_3 (/ t_2 t_0))
(t_4 (* x1 (fma 9.0 x1 -1.0)))
(t_5 (- -1.0 (* x1 x1)))
(t_6 (/ t_2 t_5))
(t_7
(+
x1
(+
(+
x1
(+
(+
(*
(+
(* (* x1 x1) (+ 6.0 (* 4.0 t_6)))
(* (* (* x1 2.0) t_3) (+ 3.0 t_6)))
t_5)
(* t_1 t_3))
(* x1 (* x1 x1))))
(* 3.0 (/ (- (- t_1 (* 2.0 x2)) x1) t_0)))))
(t_8 (* x2 (* x2 (* x1 8.0)))))
(if (<= t_7 -5e+263)
t_8
(if (<= t_7 5e+186) (fma x2 -6.0 t_4) (if (<= t_7 INFINITY) t_8 t_4)))))
double code(double x1, double x2) {
double t_0 = (x1 * x1) + 1.0;
double t_1 = x1 * (x1 * 3.0);
double t_2 = (t_1 + (2.0 * x2)) - x1;
double t_3 = t_2 / t_0;
double t_4 = x1 * fma(9.0, x1, -1.0);
double t_5 = -1.0 - (x1 * x1);
double t_6 = t_2 / t_5;
double t_7 = x1 + ((x1 + ((((((x1 * x1) * (6.0 + (4.0 * t_6))) + (((x1 * 2.0) * t_3) * (3.0 + t_6))) * t_5) + (t_1 * t_3)) + (x1 * (x1 * x1)))) + (3.0 * (((t_1 - (2.0 * x2)) - x1) / t_0)));
double t_8 = x2 * (x2 * (x1 * 8.0));
double tmp;
if (t_7 <= -5e+263) {
tmp = t_8;
} else if (t_7 <= 5e+186) {
tmp = fma(x2, -6.0, t_4);
} else if (t_7 <= ((double) INFINITY)) {
tmp = t_8;
} else {
tmp = t_4;
}
return tmp;
}
function code(x1, x2) t_0 = Float64(Float64(x1 * x1) + 1.0) t_1 = Float64(x1 * Float64(x1 * 3.0)) t_2 = Float64(Float64(t_1 + Float64(2.0 * x2)) - x1) t_3 = Float64(t_2 / t_0) t_4 = Float64(x1 * fma(9.0, x1, -1.0)) t_5 = Float64(-1.0 - Float64(x1 * x1)) t_6 = Float64(t_2 / t_5) t_7 = Float64(x1 + Float64(Float64(x1 + Float64(Float64(Float64(Float64(Float64(Float64(x1 * x1) * Float64(6.0 + Float64(4.0 * t_6))) + Float64(Float64(Float64(x1 * 2.0) * t_3) * Float64(3.0 + t_6))) * t_5) + Float64(t_1 * t_3)) + Float64(x1 * Float64(x1 * x1)))) + Float64(3.0 * Float64(Float64(Float64(t_1 - Float64(2.0 * x2)) - x1) / t_0)))) t_8 = Float64(x2 * Float64(x2 * Float64(x1 * 8.0))) tmp = 0.0 if (t_7 <= -5e+263) tmp = t_8; elseif (t_7 <= 5e+186) tmp = fma(x2, -6.0, t_4); elseif (t_7 <= Inf) tmp = t_8; else tmp = t_4; end return tmp end
code[x1_, x2_] := Block[{t$95$0 = N[(N[(x1 * x1), $MachinePrecision] + 1.0), $MachinePrecision]}, Block[{t$95$1 = N[(x1 * N[(x1 * 3.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(t$95$1 + N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision]}, Block[{t$95$3 = N[(t$95$2 / t$95$0), $MachinePrecision]}, Block[{t$95$4 = N[(x1 * N[(9.0 * x1 + -1.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$5 = N[(-1.0 - N[(x1 * x1), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$6 = N[(t$95$2 / t$95$5), $MachinePrecision]}, Block[{t$95$7 = N[(x1 + N[(N[(x1 + N[(N[(N[(N[(N[(N[(x1 * x1), $MachinePrecision] * N[(6.0 + N[(4.0 * t$95$6), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(N[(x1 * 2.0), $MachinePrecision] * t$95$3), $MachinePrecision] * N[(3.0 + t$95$6), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * t$95$5), $MachinePrecision] + N[(t$95$1 * t$95$3), $MachinePrecision]), $MachinePrecision] + N[(x1 * N[(x1 * x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(3.0 * N[(N[(N[(t$95$1 - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$8 = N[(x2 * N[(x2 * N[(x1 * 8.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$7, -5e+263], t$95$8, If[LessEqual[t$95$7, 5e+186], N[(x2 * -6.0 + t$95$4), $MachinePrecision], If[LessEqual[t$95$7, Infinity], t$95$8, t$95$4]]]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x1 \cdot x1 + 1\\
t_1 := x1 \cdot \left(x1 \cdot 3\right)\\
t_2 := \left(t\_1 + 2 \cdot x2\right) - x1\\
t_3 := \frac{t\_2}{t\_0}\\
t_4 := x1 \cdot \mathsf{fma}\left(9, x1, -1\right)\\
t_5 := -1 - x1 \cdot x1\\
t_6 := \frac{t\_2}{t\_5}\\
t_7 := x1 + \left(\left(x1 + \left(\left(\left(\left(x1 \cdot x1\right) \cdot \left(6 + 4 \cdot t\_6\right) + \left(\left(x1 \cdot 2\right) \cdot t\_3\right) \cdot \left(3 + t\_6\right)\right) \cdot t\_5 + t\_1 \cdot t\_3\right) + x1 \cdot \left(x1 \cdot x1\right)\right)\right) + 3 \cdot \frac{\left(t\_1 - 2 \cdot x2\right) - x1}{t\_0}\right)\\
t_8 := x2 \cdot \left(x2 \cdot \left(x1 \cdot 8\right)\right)\\
\mathbf{if}\;t\_7 \leq -5 \cdot 10^{+263}:\\
\;\;\;\;t\_8\\
\mathbf{elif}\;t\_7 \leq 5 \cdot 10^{+186}:\\
\;\;\;\;\mathsf{fma}\left(x2, -6, t\_4\right)\\
\mathbf{elif}\;t\_7 \leq \infty:\\
\;\;\;\;t\_8\\
\mathbf{else}:\\
\;\;\;\;t\_4\\
\end{array}
\end{array}
if (+.f64 x1 (+.f64 (+.f64 (+.f64 (+.f64 (*.f64 (+.f64 (*.f64 (*.f64 (*.f64 #s(literal 2 binary64) x1) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64)))) (-.f64 (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))) #s(literal 3 binary64))) (*.f64 (*.f64 x1 x1) (-.f64 (*.f64 #s(literal 4 binary64) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64)))) #s(literal 6 binary64)))) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))) (*.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))))) (*.f64 (*.f64 x1 x1) x1)) x1) (*.f64 #s(literal 3 binary64) (/.f64 (-.f64 (-.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64)))))) < -5.00000000000000022e263 or 4.99999999999999954e186 < (+.f64 x1 (+.f64 (+.f64 (+.f64 (+.f64 (*.f64 (+.f64 (*.f64 (*.f64 (*.f64 #s(literal 2 binary64) x1) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64)))) (-.f64 (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))) #s(literal 3 binary64))) (*.f64 (*.f64 x1 x1) (-.f64 (*.f64 #s(literal 4 binary64) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64)))) #s(literal 6 binary64)))) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))) (*.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))))) (*.f64 (*.f64 x1 x1) x1)) x1) (*.f64 #s(literal 3 binary64) (/.f64 (-.f64 (-.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64)))))) < +inf.0Initial program 99.8%
Taylor expanded in x1 around 0
*-commutativeN/A
lower-*.f643.1
Applied rewrites3.1%
Taylor expanded in x1 around 0
Applied rewrites47.7%
Taylor expanded in x2 around 0
Applied rewrites61.2%
Taylor expanded in x2 around inf
Applied rewrites60.0%
if -5.00000000000000022e263 < (+.f64 x1 (+.f64 (+.f64 (+.f64 (+.f64 (*.f64 (+.f64 (*.f64 (*.f64 (*.f64 #s(literal 2 binary64) x1) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64)))) (-.f64 (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))) #s(literal 3 binary64))) (*.f64 (*.f64 x1 x1) (-.f64 (*.f64 #s(literal 4 binary64) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64)))) #s(literal 6 binary64)))) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))) (*.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))))) (*.f64 (*.f64 x1 x1) x1)) x1) (*.f64 #s(literal 3 binary64) (/.f64 (-.f64 (-.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64)))))) < 4.99999999999999954e186Initial program 99.2%
Taylor expanded in x1 around 0
*-commutativeN/A
lower-*.f6453.7
Applied rewrites53.7%
Taylor expanded in x1 around 0
Applied rewrites80.3%
Taylor expanded in x2 around 0
Applied rewrites89.5%
Taylor expanded in x1 around 0
Applied rewrites84.7%
if +inf.0 < (+.f64 x1 (+.f64 (+.f64 (+.f64 (+.f64 (*.f64 (+.f64 (*.f64 (*.f64 (*.f64 #s(literal 2 binary64) x1) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64)))) (-.f64 (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))) #s(literal 3 binary64))) (*.f64 (*.f64 x1 x1) (-.f64 (*.f64 #s(literal 4 binary64) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64)))) #s(literal 6 binary64)))) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))) (*.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))))) (*.f64 (*.f64 x1 x1) x1)) x1) (*.f64 #s(literal 3 binary64) (/.f64 (-.f64 (-.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64)))))) Initial program 0.0%
Taylor expanded in x1 around 0
*-commutativeN/A
lower-*.f643.9
Applied rewrites3.9%
Taylor expanded in x1 around 0
Applied rewrites72.4%
Taylor expanded in x2 around 0
Applied rewrites85.9%
Final simplification79.2%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (+ (* x1 x1) 1.0))
(t_1 (* x1 (* x1 3.0)))
(t_2 (- (+ t_1 (* 2.0 x2)) x1))
(t_3 (/ t_2 t_0))
(t_4 (- -1.0 (* x1 x1)))
(t_5 (/ t_2 t_4))
(t_6
(+
x1
(+
(+
x1
(+
(+
(*
(+
(* (* x1 x1) (+ 6.0 (* 4.0 t_5)))
(* (* (* x1 2.0) t_3) (+ 3.0 t_5)))
t_4)
(* t_1 t_3))
(* x1 (* x1 x1))))
(* 3.0 (/ (- (- t_1 (* 2.0 x2)) x1) t_0))))))
(if (<= t_6 -1e-58)
(* x2 -6.0)
(if (<= t_6 1e-25)
(- x1)
(if (<= t_6 5e+186) (* x2 -6.0) (* x1 (* x1 9.0)))))))
double code(double x1, double x2) {
double t_0 = (x1 * x1) + 1.0;
double t_1 = x1 * (x1 * 3.0);
double t_2 = (t_1 + (2.0 * x2)) - x1;
double t_3 = t_2 / t_0;
double t_4 = -1.0 - (x1 * x1);
double t_5 = t_2 / t_4;
double t_6 = x1 + ((x1 + ((((((x1 * x1) * (6.0 + (4.0 * t_5))) + (((x1 * 2.0) * t_3) * (3.0 + t_5))) * t_4) + (t_1 * t_3)) + (x1 * (x1 * x1)))) + (3.0 * (((t_1 - (2.0 * x2)) - x1) / t_0)));
double tmp;
if (t_6 <= -1e-58) {
tmp = x2 * -6.0;
} else if (t_6 <= 1e-25) {
tmp = -x1;
} else if (t_6 <= 5e+186) {
tmp = x2 * -6.0;
} else {
tmp = x1 * (x1 * 9.0);
}
return tmp;
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
real(8) :: t_0
real(8) :: t_1
real(8) :: t_2
real(8) :: t_3
real(8) :: t_4
real(8) :: t_5
real(8) :: t_6
real(8) :: tmp
t_0 = (x1 * x1) + 1.0d0
t_1 = x1 * (x1 * 3.0d0)
t_2 = (t_1 + (2.0d0 * x2)) - x1
t_3 = t_2 / t_0
t_4 = (-1.0d0) - (x1 * x1)
t_5 = t_2 / t_4
t_6 = x1 + ((x1 + ((((((x1 * x1) * (6.0d0 + (4.0d0 * t_5))) + (((x1 * 2.0d0) * t_3) * (3.0d0 + t_5))) * t_4) + (t_1 * t_3)) + (x1 * (x1 * x1)))) + (3.0d0 * (((t_1 - (2.0d0 * x2)) - x1) / t_0)))
if (t_6 <= (-1d-58)) then
tmp = x2 * (-6.0d0)
else if (t_6 <= 1d-25) then
tmp = -x1
else if (t_6 <= 5d+186) then
tmp = x2 * (-6.0d0)
else
tmp = x1 * (x1 * 9.0d0)
end if
code = tmp
end function
public static double code(double x1, double x2) {
double t_0 = (x1 * x1) + 1.0;
double t_1 = x1 * (x1 * 3.0);
double t_2 = (t_1 + (2.0 * x2)) - x1;
double t_3 = t_2 / t_0;
double t_4 = -1.0 - (x1 * x1);
double t_5 = t_2 / t_4;
double t_6 = x1 + ((x1 + ((((((x1 * x1) * (6.0 + (4.0 * t_5))) + (((x1 * 2.0) * t_3) * (3.0 + t_5))) * t_4) + (t_1 * t_3)) + (x1 * (x1 * x1)))) + (3.0 * (((t_1 - (2.0 * x2)) - x1) / t_0)));
double tmp;
if (t_6 <= -1e-58) {
tmp = x2 * -6.0;
} else if (t_6 <= 1e-25) {
tmp = -x1;
} else if (t_6 <= 5e+186) {
tmp = x2 * -6.0;
} else {
tmp = x1 * (x1 * 9.0);
}
return tmp;
}
def code(x1, x2): t_0 = (x1 * x1) + 1.0 t_1 = x1 * (x1 * 3.0) t_2 = (t_1 + (2.0 * x2)) - x1 t_3 = t_2 / t_0 t_4 = -1.0 - (x1 * x1) t_5 = t_2 / t_4 t_6 = x1 + ((x1 + ((((((x1 * x1) * (6.0 + (4.0 * t_5))) + (((x1 * 2.0) * t_3) * (3.0 + t_5))) * t_4) + (t_1 * t_3)) + (x1 * (x1 * x1)))) + (3.0 * (((t_1 - (2.0 * x2)) - x1) / t_0))) tmp = 0 if t_6 <= -1e-58: tmp = x2 * -6.0 elif t_6 <= 1e-25: tmp = -x1 elif t_6 <= 5e+186: tmp = x2 * -6.0 else: tmp = x1 * (x1 * 9.0) return tmp
function code(x1, x2) t_0 = Float64(Float64(x1 * x1) + 1.0) t_1 = Float64(x1 * Float64(x1 * 3.0)) t_2 = Float64(Float64(t_1 + Float64(2.0 * x2)) - x1) t_3 = Float64(t_2 / t_0) t_4 = Float64(-1.0 - Float64(x1 * x1)) t_5 = Float64(t_2 / t_4) t_6 = Float64(x1 + Float64(Float64(x1 + Float64(Float64(Float64(Float64(Float64(Float64(x1 * x1) * Float64(6.0 + Float64(4.0 * t_5))) + Float64(Float64(Float64(x1 * 2.0) * t_3) * Float64(3.0 + t_5))) * t_4) + Float64(t_1 * t_3)) + Float64(x1 * Float64(x1 * x1)))) + Float64(3.0 * Float64(Float64(Float64(t_1 - Float64(2.0 * x2)) - x1) / t_0)))) tmp = 0.0 if (t_6 <= -1e-58) tmp = Float64(x2 * -6.0); elseif (t_6 <= 1e-25) tmp = Float64(-x1); elseif (t_6 <= 5e+186) tmp = Float64(x2 * -6.0); else tmp = Float64(x1 * Float64(x1 * 9.0)); end return tmp end
function tmp_2 = code(x1, x2) t_0 = (x1 * x1) + 1.0; t_1 = x1 * (x1 * 3.0); t_2 = (t_1 + (2.0 * x2)) - x1; t_3 = t_2 / t_0; t_4 = -1.0 - (x1 * x1); t_5 = t_2 / t_4; t_6 = x1 + ((x1 + ((((((x1 * x1) * (6.0 + (4.0 * t_5))) + (((x1 * 2.0) * t_3) * (3.0 + t_5))) * t_4) + (t_1 * t_3)) + (x1 * (x1 * x1)))) + (3.0 * (((t_1 - (2.0 * x2)) - x1) / t_0))); tmp = 0.0; if (t_6 <= -1e-58) tmp = x2 * -6.0; elseif (t_6 <= 1e-25) tmp = -x1; elseif (t_6 <= 5e+186) tmp = x2 * -6.0; else tmp = x1 * (x1 * 9.0); end tmp_2 = tmp; end
code[x1_, x2_] := Block[{t$95$0 = N[(N[(x1 * x1), $MachinePrecision] + 1.0), $MachinePrecision]}, Block[{t$95$1 = N[(x1 * N[(x1 * 3.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(t$95$1 + N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision]}, Block[{t$95$3 = N[(t$95$2 / t$95$0), $MachinePrecision]}, Block[{t$95$4 = N[(-1.0 - N[(x1 * x1), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$5 = N[(t$95$2 / t$95$4), $MachinePrecision]}, Block[{t$95$6 = N[(x1 + N[(N[(x1 + N[(N[(N[(N[(N[(N[(x1 * x1), $MachinePrecision] * N[(6.0 + N[(4.0 * t$95$5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(N[(x1 * 2.0), $MachinePrecision] * t$95$3), $MachinePrecision] * N[(3.0 + t$95$5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * t$95$4), $MachinePrecision] + N[(t$95$1 * t$95$3), $MachinePrecision]), $MachinePrecision] + N[(x1 * N[(x1 * x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(3.0 * N[(N[(N[(t$95$1 - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$6, -1e-58], N[(x2 * -6.0), $MachinePrecision], If[LessEqual[t$95$6, 1e-25], (-x1), If[LessEqual[t$95$6, 5e+186], N[(x2 * -6.0), $MachinePrecision], N[(x1 * N[(x1 * 9.0), $MachinePrecision]), $MachinePrecision]]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x1 \cdot x1 + 1\\
t_1 := x1 \cdot \left(x1 \cdot 3\right)\\
t_2 := \left(t\_1 + 2 \cdot x2\right) - x1\\
t_3 := \frac{t\_2}{t\_0}\\
t_4 := -1 - x1 \cdot x1\\
t_5 := \frac{t\_2}{t\_4}\\
t_6 := x1 + \left(\left(x1 + \left(\left(\left(\left(x1 \cdot x1\right) \cdot \left(6 + 4 \cdot t\_5\right) + \left(\left(x1 \cdot 2\right) \cdot t\_3\right) \cdot \left(3 + t\_5\right)\right) \cdot t\_4 + t\_1 \cdot t\_3\right) + x1 \cdot \left(x1 \cdot x1\right)\right)\right) + 3 \cdot \frac{\left(t\_1 - 2 \cdot x2\right) - x1}{t\_0}\right)\\
\mathbf{if}\;t\_6 \leq -1 \cdot 10^{-58}:\\
\;\;\;\;x2 \cdot -6\\
\mathbf{elif}\;t\_6 \leq 10^{-25}:\\
\;\;\;\;-x1\\
\mathbf{elif}\;t\_6 \leq 5 \cdot 10^{+186}:\\
\;\;\;\;x2 \cdot -6\\
\mathbf{else}:\\
\;\;\;\;x1 \cdot \left(x1 \cdot 9\right)\\
\end{array}
\end{array}
if (+.f64 x1 (+.f64 (+.f64 (+.f64 (+.f64 (*.f64 (+.f64 (*.f64 (*.f64 (*.f64 #s(literal 2 binary64) x1) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64)))) (-.f64 (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))) #s(literal 3 binary64))) (*.f64 (*.f64 x1 x1) (-.f64 (*.f64 #s(literal 4 binary64) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64)))) #s(literal 6 binary64)))) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))) (*.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))))) (*.f64 (*.f64 x1 x1) x1)) x1) (*.f64 #s(literal 3 binary64) (/.f64 (-.f64 (-.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64)))))) < -1e-58 or 1.00000000000000004e-25 < (+.f64 x1 (+.f64 (+.f64 (+.f64 (+.f64 (*.f64 (+.f64 (*.f64 (*.f64 (*.f64 #s(literal 2 binary64) x1) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64)))) (-.f64 (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))) #s(literal 3 binary64))) (*.f64 (*.f64 x1 x1) (-.f64 (*.f64 #s(literal 4 binary64) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64)))) #s(literal 6 binary64)))) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))) (*.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))))) (*.f64 (*.f64 x1 x1) x1)) x1) (*.f64 #s(literal 3 binary64) (/.f64 (-.f64 (-.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64)))))) < 4.99999999999999954e186Initial program 99.5%
Taylor expanded in x1 around 0
*-commutativeN/A
lower-*.f6454.4
Applied rewrites54.4%
Taylor expanded in x1 around 0
*-commutativeN/A
lower-*.f6454.7
Applied rewrites54.7%
if -1e-58 < (+.f64 x1 (+.f64 (+.f64 (+.f64 (+.f64 (*.f64 (+.f64 (*.f64 (*.f64 (*.f64 #s(literal 2 binary64) x1) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64)))) (-.f64 (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))) #s(literal 3 binary64))) (*.f64 (*.f64 x1 x1) (-.f64 (*.f64 #s(literal 4 binary64) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64)))) #s(literal 6 binary64)))) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))) (*.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))))) (*.f64 (*.f64 x1 x1) x1)) x1) (*.f64 #s(literal 3 binary64) (/.f64 (-.f64 (-.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64)))))) < 1.00000000000000004e-25Initial program 98.9%
Taylor expanded in x1 around 0
*-commutativeN/A
lower-*.f6435.5
Applied rewrites35.5%
Taylor expanded in x1 around 0
Applied rewrites99.9%
Taylor expanded in x2 around 0
Applied rewrites61.3%
Taylor expanded in x1 around 0
Applied rewrites61.3%
if 4.99999999999999954e186 < (+.f64 x1 (+.f64 (+.f64 (+.f64 (+.f64 (*.f64 (+.f64 (*.f64 (*.f64 (*.f64 #s(literal 2 binary64) x1) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64)))) (-.f64 (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))) #s(literal 3 binary64))) (*.f64 (*.f64 x1 x1) (-.f64 (*.f64 #s(literal 4 binary64) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64)))) #s(literal 6 binary64)))) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))) (*.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))))) (*.f64 (*.f64 x1 x1) x1)) x1) (*.f64 #s(literal 3 binary64) (/.f64 (-.f64 (-.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64)))))) Initial program 37.3%
Taylor expanded in x1 around 0
*-commutativeN/A
lower-*.f643.3
Applied rewrites3.3%
Taylor expanded in x1 around 0
Applied rewrites60.5%
Taylor expanded in x2 around 0
Applied rewrites55.6%
Taylor expanded in x1 around inf
Applied rewrites55.7%
Final simplification56.3%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (+ (* x1 x1) 1.0))
(t_1 (* x1 (* x1 3.0)))
(t_2 (- (+ t_1 (* 2.0 x2)) x1))
(t_3 (/ t_2 t_0))
(t_4 (- -1.0 (* x1 x1)))
(t_5 (/ t_2 t_4))
(t_6
(+
x1
(+
(+
(*
(+
(* (* x1 x1) (+ 6.0 (* 4.0 t_5)))
(* (* (* x1 2.0) t_3) (+ 3.0 t_5)))
t_4)
(* t_1 t_3))
(* x1 (* x1 x1)))))
(t_7 (+ x1 (+ t_6 (* 3.0 (/ (- (- t_1 (* 2.0 x2)) x1) t_0))))))
(if (<= t_7 1e+22)
(fma
x2
(fma x1 (fma 12.0 x1 (fma x2 8.0 -12.0)) -6.0)
(* x1 (fma 9.0 x1 -1.0)))
(if (<= t_7 INFINITY)
(+ x1 (+ t_6 (* 3.0 3.0)))
(+ x1 (* (* x1 x1) (* x1 (* x1 6.0))))))))
double code(double x1, double x2) {
double t_0 = (x1 * x1) + 1.0;
double t_1 = x1 * (x1 * 3.0);
double t_2 = (t_1 + (2.0 * x2)) - x1;
double t_3 = t_2 / t_0;
double t_4 = -1.0 - (x1 * x1);
double t_5 = t_2 / t_4;
double t_6 = x1 + ((((((x1 * x1) * (6.0 + (4.0 * t_5))) + (((x1 * 2.0) * t_3) * (3.0 + t_5))) * t_4) + (t_1 * t_3)) + (x1 * (x1 * x1)));
double t_7 = x1 + (t_6 + (3.0 * (((t_1 - (2.0 * x2)) - x1) / t_0)));
double tmp;
if (t_7 <= 1e+22) {
tmp = fma(x2, fma(x1, fma(12.0, x1, fma(x2, 8.0, -12.0)), -6.0), (x1 * fma(9.0, x1, -1.0)));
} else if (t_7 <= ((double) INFINITY)) {
tmp = x1 + (t_6 + (3.0 * 3.0));
} else {
tmp = x1 + ((x1 * x1) * (x1 * (x1 * 6.0)));
}
return tmp;
}
function code(x1, x2) t_0 = Float64(Float64(x1 * x1) + 1.0) t_1 = Float64(x1 * Float64(x1 * 3.0)) t_2 = Float64(Float64(t_1 + Float64(2.0 * x2)) - x1) t_3 = Float64(t_2 / t_0) t_4 = Float64(-1.0 - Float64(x1 * x1)) t_5 = Float64(t_2 / t_4) t_6 = Float64(x1 + Float64(Float64(Float64(Float64(Float64(Float64(x1 * x1) * Float64(6.0 + Float64(4.0 * t_5))) + Float64(Float64(Float64(x1 * 2.0) * t_3) * Float64(3.0 + t_5))) * t_4) + Float64(t_1 * t_3)) + Float64(x1 * Float64(x1 * x1)))) t_7 = Float64(x1 + Float64(t_6 + Float64(3.0 * Float64(Float64(Float64(t_1 - Float64(2.0 * x2)) - x1) / t_0)))) tmp = 0.0 if (t_7 <= 1e+22) tmp = fma(x2, fma(x1, fma(12.0, x1, fma(x2, 8.0, -12.0)), -6.0), Float64(x1 * fma(9.0, x1, -1.0))); elseif (t_7 <= Inf) tmp = Float64(x1 + Float64(t_6 + Float64(3.0 * 3.0))); else tmp = Float64(x1 + Float64(Float64(x1 * x1) * Float64(x1 * Float64(x1 * 6.0)))); end return tmp end
code[x1_, x2_] := Block[{t$95$0 = N[(N[(x1 * x1), $MachinePrecision] + 1.0), $MachinePrecision]}, Block[{t$95$1 = N[(x1 * N[(x1 * 3.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(t$95$1 + N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision]}, Block[{t$95$3 = N[(t$95$2 / t$95$0), $MachinePrecision]}, Block[{t$95$4 = N[(-1.0 - N[(x1 * x1), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$5 = N[(t$95$2 / t$95$4), $MachinePrecision]}, Block[{t$95$6 = N[(x1 + N[(N[(N[(N[(N[(N[(x1 * x1), $MachinePrecision] * N[(6.0 + N[(4.0 * t$95$5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(N[(x1 * 2.0), $MachinePrecision] * t$95$3), $MachinePrecision] * N[(3.0 + t$95$5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * t$95$4), $MachinePrecision] + N[(t$95$1 * t$95$3), $MachinePrecision]), $MachinePrecision] + N[(x1 * N[(x1 * x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$7 = N[(x1 + N[(t$95$6 + N[(3.0 * N[(N[(N[(t$95$1 - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$7, 1e+22], N[(x2 * N[(x1 * N[(12.0 * x1 + N[(x2 * 8.0 + -12.0), $MachinePrecision]), $MachinePrecision] + -6.0), $MachinePrecision] + N[(x1 * N[(9.0 * x1 + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$7, Infinity], N[(x1 + N[(t$95$6 + N[(3.0 * 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x1 + N[(N[(x1 * x1), $MachinePrecision] * N[(x1 * N[(x1 * 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x1 \cdot x1 + 1\\
t_1 := x1 \cdot \left(x1 \cdot 3\right)\\
t_2 := \left(t\_1 + 2 \cdot x2\right) - x1\\
t_3 := \frac{t\_2}{t\_0}\\
t_4 := -1 - x1 \cdot x1\\
t_5 := \frac{t\_2}{t\_4}\\
t_6 := x1 + \left(\left(\left(\left(x1 \cdot x1\right) \cdot \left(6 + 4 \cdot t\_5\right) + \left(\left(x1 \cdot 2\right) \cdot t\_3\right) \cdot \left(3 + t\_5\right)\right) \cdot t\_4 + t\_1 \cdot t\_3\right) + x1 \cdot \left(x1 \cdot x1\right)\right)\\
t_7 := x1 + \left(t\_6 + 3 \cdot \frac{\left(t\_1 - 2 \cdot x2\right) - x1}{t\_0}\right)\\
\mathbf{if}\;t\_7 \leq 10^{+22}:\\
\;\;\;\;\mathsf{fma}\left(x2, \mathsf{fma}\left(x1, \mathsf{fma}\left(12, x1, \mathsf{fma}\left(x2, 8, -12\right)\right), -6\right), x1 \cdot \mathsf{fma}\left(9, x1, -1\right)\right)\\
\mathbf{elif}\;t\_7 \leq \infty:\\
\;\;\;\;x1 + \left(t\_6 + 3 \cdot 3\right)\\
\mathbf{else}:\\
\;\;\;\;x1 + \left(x1 \cdot x1\right) \cdot \left(x1 \cdot \left(x1 \cdot 6\right)\right)\\
\end{array}
\end{array}
if (+.f64 x1 (+.f64 (+.f64 (+.f64 (+.f64 (*.f64 (+.f64 (*.f64 (*.f64 (*.f64 #s(literal 2 binary64) x1) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64)))) (-.f64 (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))) #s(literal 3 binary64))) (*.f64 (*.f64 x1 x1) (-.f64 (*.f64 #s(literal 4 binary64) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64)))) #s(literal 6 binary64)))) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))) (*.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))))) (*.f64 (*.f64 x1 x1) x1)) x1) (*.f64 #s(literal 3 binary64) (/.f64 (-.f64 (-.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64)))))) < 1e22Initial program 99.3%
Taylor expanded in x1 around 0
*-commutativeN/A
lower-*.f6451.4
Applied rewrites51.4%
Taylor expanded in x1 around 0
Applied rewrites88.1%
Taylor expanded in x2 around 0
Applied rewrites99.6%
if 1e22 < (+.f64 x1 (+.f64 (+.f64 (+.f64 (+.f64 (*.f64 (+.f64 (*.f64 (*.f64 (*.f64 #s(literal 2 binary64) x1) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64)))) (-.f64 (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))) #s(literal 3 binary64))) (*.f64 (*.f64 x1 x1) (-.f64 (*.f64 #s(literal 4 binary64) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64)))) #s(literal 6 binary64)))) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))) (*.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))))) (*.f64 (*.f64 x1 x1) x1)) x1) (*.f64 #s(literal 3 binary64) (/.f64 (-.f64 (-.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64)))))) < +inf.0Initial program 99.5%
Taylor expanded in x1 around inf
Applied rewrites88.8%
if +inf.0 < (+.f64 x1 (+.f64 (+.f64 (+.f64 (+.f64 (*.f64 (+.f64 (*.f64 (*.f64 (*.f64 #s(literal 2 binary64) x1) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64)))) (-.f64 (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))) #s(literal 3 binary64))) (*.f64 (*.f64 x1 x1) (-.f64 (*.f64 #s(literal 4 binary64) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64)))) #s(literal 6 binary64)))) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))) (*.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))))) (*.f64 (*.f64 x1 x1) x1)) x1) (*.f64 #s(literal 3 binary64) (/.f64 (-.f64 (-.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64)))))) Initial program 0.0%
Taylor expanded in x1 around inf
lower-*.f64N/A
lower-pow.f64N/A
+-commutativeN/A
associate--l+N/A
lower-+.f64N/A
Applied rewrites100.0%
Taylor expanded in x1 around 0
Applied rewrites100.0%
Taylor expanded in x2 around inf
Applied rewrites100.0%
Taylor expanded in x1 around inf
Applied rewrites100.0%
Final simplification96.8%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (+ (* x1 x1) 1.0))
(t_1 (* x1 (* x1 3.0)))
(t_2 (- (+ t_1 (* 2.0 x2)) x1))
(t_3 (/ t_2 t_0))
(t_4 (- -1.0 (* x1 x1)))
(t_5 (/ t_2 t_4))
(t_6
(+
x1
(+
(+
x1
(+
(+
(*
(+
(* (* x1 x1) (+ 6.0 (* 4.0 t_5)))
(* (* (* x1 2.0) t_3) (+ 3.0 t_5)))
t_4)
(* t_1 t_3))
(* x1 (* x1 x1))))
(* 3.0 (/ (- (- t_1 (* 2.0 x2)) x1) t_0))))))
(if (<= t_6 -5e+263)
(* x2 (* x2 (* x1 8.0)))
(if (<= t_6 1e+78)
(fma x2 -6.0 (* x1 (fma 9.0 x1 -1.0)))
(+ x1 (* (* x1 x1) (* x1 (* x1 6.0))))))))
double code(double x1, double x2) {
double t_0 = (x1 * x1) + 1.0;
double t_1 = x1 * (x1 * 3.0);
double t_2 = (t_1 + (2.0 * x2)) - x1;
double t_3 = t_2 / t_0;
double t_4 = -1.0 - (x1 * x1);
double t_5 = t_2 / t_4;
double t_6 = x1 + ((x1 + ((((((x1 * x1) * (6.0 + (4.0 * t_5))) + (((x1 * 2.0) * t_3) * (3.0 + t_5))) * t_4) + (t_1 * t_3)) + (x1 * (x1 * x1)))) + (3.0 * (((t_1 - (2.0 * x2)) - x1) / t_0)));
double tmp;
if (t_6 <= -5e+263) {
tmp = x2 * (x2 * (x1 * 8.0));
} else if (t_6 <= 1e+78) {
tmp = fma(x2, -6.0, (x1 * fma(9.0, x1, -1.0)));
} else {
tmp = x1 + ((x1 * x1) * (x1 * (x1 * 6.0)));
}
return tmp;
}
function code(x1, x2) t_0 = Float64(Float64(x1 * x1) + 1.0) t_1 = Float64(x1 * Float64(x1 * 3.0)) t_2 = Float64(Float64(t_1 + Float64(2.0 * x2)) - x1) t_3 = Float64(t_2 / t_0) t_4 = Float64(-1.0 - Float64(x1 * x1)) t_5 = Float64(t_2 / t_4) t_6 = Float64(x1 + Float64(Float64(x1 + Float64(Float64(Float64(Float64(Float64(Float64(x1 * x1) * Float64(6.0 + Float64(4.0 * t_5))) + Float64(Float64(Float64(x1 * 2.0) * t_3) * Float64(3.0 + t_5))) * t_4) + Float64(t_1 * t_3)) + Float64(x1 * Float64(x1 * x1)))) + Float64(3.0 * Float64(Float64(Float64(t_1 - Float64(2.0 * x2)) - x1) / t_0)))) tmp = 0.0 if (t_6 <= -5e+263) tmp = Float64(x2 * Float64(x2 * Float64(x1 * 8.0))); elseif (t_6 <= 1e+78) tmp = fma(x2, -6.0, Float64(x1 * fma(9.0, x1, -1.0))); else tmp = Float64(x1 + Float64(Float64(x1 * x1) * Float64(x1 * Float64(x1 * 6.0)))); end return tmp end
code[x1_, x2_] := Block[{t$95$0 = N[(N[(x1 * x1), $MachinePrecision] + 1.0), $MachinePrecision]}, Block[{t$95$1 = N[(x1 * N[(x1 * 3.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(t$95$1 + N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision]}, Block[{t$95$3 = N[(t$95$2 / t$95$0), $MachinePrecision]}, Block[{t$95$4 = N[(-1.0 - N[(x1 * x1), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$5 = N[(t$95$2 / t$95$4), $MachinePrecision]}, Block[{t$95$6 = N[(x1 + N[(N[(x1 + N[(N[(N[(N[(N[(N[(x1 * x1), $MachinePrecision] * N[(6.0 + N[(4.0 * t$95$5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(N[(x1 * 2.0), $MachinePrecision] * t$95$3), $MachinePrecision] * N[(3.0 + t$95$5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * t$95$4), $MachinePrecision] + N[(t$95$1 * t$95$3), $MachinePrecision]), $MachinePrecision] + N[(x1 * N[(x1 * x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(3.0 * N[(N[(N[(t$95$1 - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$6, -5e+263], N[(x2 * N[(x2 * N[(x1 * 8.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$6, 1e+78], N[(x2 * -6.0 + N[(x1 * N[(9.0 * x1 + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x1 + N[(N[(x1 * x1), $MachinePrecision] * N[(x1 * N[(x1 * 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x1 \cdot x1 + 1\\
t_1 := x1 \cdot \left(x1 \cdot 3\right)\\
t_2 := \left(t\_1 + 2 \cdot x2\right) - x1\\
t_3 := \frac{t\_2}{t\_0}\\
t_4 := -1 - x1 \cdot x1\\
t_5 := \frac{t\_2}{t\_4}\\
t_6 := x1 + \left(\left(x1 + \left(\left(\left(\left(x1 \cdot x1\right) \cdot \left(6 + 4 \cdot t\_5\right) + \left(\left(x1 \cdot 2\right) \cdot t\_3\right) \cdot \left(3 + t\_5\right)\right) \cdot t\_4 + t\_1 \cdot t\_3\right) + x1 \cdot \left(x1 \cdot x1\right)\right)\right) + 3 \cdot \frac{\left(t\_1 - 2 \cdot x2\right) - x1}{t\_0}\right)\\
\mathbf{if}\;t\_6 \leq -5 \cdot 10^{+263}:\\
\;\;\;\;x2 \cdot \left(x2 \cdot \left(x1 \cdot 8\right)\right)\\
\mathbf{elif}\;t\_6 \leq 10^{+78}:\\
\;\;\;\;\mathsf{fma}\left(x2, -6, x1 \cdot \mathsf{fma}\left(9, x1, -1\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x1 + \left(x1 \cdot x1\right) \cdot \left(x1 \cdot \left(x1 \cdot 6\right)\right)\\
\end{array}
\end{array}
if (+.f64 x1 (+.f64 (+.f64 (+.f64 (+.f64 (*.f64 (+.f64 (*.f64 (*.f64 (*.f64 #s(literal 2 binary64) x1) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64)))) (-.f64 (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))) #s(literal 3 binary64))) (*.f64 (*.f64 x1 x1) (-.f64 (*.f64 #s(literal 4 binary64) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64)))) #s(literal 6 binary64)))) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))) (*.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))))) (*.f64 (*.f64 x1 x1) x1)) x1) (*.f64 #s(literal 3 binary64) (/.f64 (-.f64 (-.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64)))))) < -5.00000000000000022e263Initial program 100.0%
Taylor expanded in x1 around 0
*-commutativeN/A
lower-*.f645.4
Applied rewrites5.4%
Taylor expanded in x1 around 0
Applied rewrites69.8%
Taylor expanded in x2 around 0
Applied rewrites100.0%
Taylor expanded in x2 around inf
Applied rewrites100.0%
if -5.00000000000000022e263 < (+.f64 x1 (+.f64 (+.f64 (+.f64 (+.f64 (*.f64 (+.f64 (*.f64 (*.f64 (*.f64 #s(literal 2 binary64) x1) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64)))) (-.f64 (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))) #s(literal 3 binary64))) (*.f64 (*.f64 x1 x1) (-.f64 (*.f64 #s(literal 4 binary64) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64)))) #s(literal 6 binary64)))) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))) (*.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))))) (*.f64 (*.f64 x1 x1) x1)) x1) (*.f64 #s(literal 3 binary64) (/.f64 (-.f64 (-.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64)))))) < 1.00000000000000001e78Initial program 99.2%
Taylor expanded in x1 around 0
*-commutativeN/A
lower-*.f6457.9
Applied rewrites57.9%
Taylor expanded in x1 around 0
Applied rewrites88.8%
Taylor expanded in x2 around 0
Applied rewrites96.8%
Taylor expanded in x1 around 0
Applied rewrites94.9%
if 1.00000000000000001e78 < (+.f64 x1 (+.f64 (+.f64 (+.f64 (+.f64 (*.f64 (+.f64 (*.f64 (*.f64 (*.f64 #s(literal 2 binary64) x1) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64)))) (-.f64 (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))) #s(literal 3 binary64))) (*.f64 (*.f64 x1 x1) (-.f64 (*.f64 #s(literal 4 binary64) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64)))) #s(literal 6 binary64)))) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))) (*.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))))) (*.f64 (*.f64 x1 x1) x1)) x1) (*.f64 #s(literal 3 binary64) (/.f64 (-.f64 (-.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64)))))) Initial program 46.0%
Taylor expanded in x1 around inf
lower-*.f64N/A
lower-pow.f64N/A
+-commutativeN/A
associate--l+N/A
lower-+.f64N/A
Applied rewrites81.5%
Taylor expanded in x1 around 0
Applied rewrites81.6%
Taylor expanded in x2 around inf
Applied rewrites81.6%
Taylor expanded in x1 around inf
Applied rewrites80.8%
Final simplification87.3%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (+ (* x1 x1) 1.0))
(t_1 (* x1 (* x1 3.0)))
(t_2 (- (+ t_1 (* 2.0 x2)) x1))
(t_3 (/ t_2 t_0))
(t_4 (- -1.0 (* x1 x1)))
(t_5 (/ t_2 t_4))
(t_6
(+
x1
(+
(+
x1
(+
(+
(*
(+
(* (* x1 x1) (+ 6.0 (* 4.0 t_5)))
(* (* (* x1 2.0) t_3) (+ 3.0 t_5)))
t_4)
(* t_1 t_3))
(* x1 (* x1 x1))))
(* 3.0 (/ (- (- t_1 (* 2.0 x2)) x1) t_0))))))
(if (<= t_6 INFINITY) t_6 (+ x1 (* (* x1 x1) (* x1 (* x1 6.0)))))))
double code(double x1, double x2) {
double t_0 = (x1 * x1) + 1.0;
double t_1 = x1 * (x1 * 3.0);
double t_2 = (t_1 + (2.0 * x2)) - x1;
double t_3 = t_2 / t_0;
double t_4 = -1.0 - (x1 * x1);
double t_5 = t_2 / t_4;
double t_6 = x1 + ((x1 + ((((((x1 * x1) * (6.0 + (4.0 * t_5))) + (((x1 * 2.0) * t_3) * (3.0 + t_5))) * t_4) + (t_1 * t_3)) + (x1 * (x1 * x1)))) + (3.0 * (((t_1 - (2.0 * x2)) - x1) / t_0)));
double tmp;
if (t_6 <= ((double) INFINITY)) {
tmp = t_6;
} else {
tmp = x1 + ((x1 * x1) * (x1 * (x1 * 6.0)));
}
return tmp;
}
public static double code(double x1, double x2) {
double t_0 = (x1 * x1) + 1.0;
double t_1 = x1 * (x1 * 3.0);
double t_2 = (t_1 + (2.0 * x2)) - x1;
double t_3 = t_2 / t_0;
double t_4 = -1.0 - (x1 * x1);
double t_5 = t_2 / t_4;
double t_6 = x1 + ((x1 + ((((((x1 * x1) * (6.0 + (4.0 * t_5))) + (((x1 * 2.0) * t_3) * (3.0 + t_5))) * t_4) + (t_1 * t_3)) + (x1 * (x1 * x1)))) + (3.0 * (((t_1 - (2.0 * x2)) - x1) / t_0)));
double tmp;
if (t_6 <= Double.POSITIVE_INFINITY) {
tmp = t_6;
} else {
tmp = x1 + ((x1 * x1) * (x1 * (x1 * 6.0)));
}
return tmp;
}
def code(x1, x2): t_0 = (x1 * x1) + 1.0 t_1 = x1 * (x1 * 3.0) t_2 = (t_1 + (2.0 * x2)) - x1 t_3 = t_2 / t_0 t_4 = -1.0 - (x1 * x1) t_5 = t_2 / t_4 t_6 = x1 + ((x1 + ((((((x1 * x1) * (6.0 + (4.0 * t_5))) + (((x1 * 2.0) * t_3) * (3.0 + t_5))) * t_4) + (t_1 * t_3)) + (x1 * (x1 * x1)))) + (3.0 * (((t_1 - (2.0 * x2)) - x1) / t_0))) tmp = 0 if t_6 <= math.inf: tmp = t_6 else: tmp = x1 + ((x1 * x1) * (x1 * (x1 * 6.0))) return tmp
function code(x1, x2) t_0 = Float64(Float64(x1 * x1) + 1.0) t_1 = Float64(x1 * Float64(x1 * 3.0)) t_2 = Float64(Float64(t_1 + Float64(2.0 * x2)) - x1) t_3 = Float64(t_2 / t_0) t_4 = Float64(-1.0 - Float64(x1 * x1)) t_5 = Float64(t_2 / t_4) t_6 = Float64(x1 + Float64(Float64(x1 + Float64(Float64(Float64(Float64(Float64(Float64(x1 * x1) * Float64(6.0 + Float64(4.0 * t_5))) + Float64(Float64(Float64(x1 * 2.0) * t_3) * Float64(3.0 + t_5))) * t_4) + Float64(t_1 * t_3)) + Float64(x1 * Float64(x1 * x1)))) + Float64(3.0 * Float64(Float64(Float64(t_1 - Float64(2.0 * x2)) - x1) / t_0)))) tmp = 0.0 if (t_6 <= Inf) tmp = t_6; else tmp = Float64(x1 + Float64(Float64(x1 * x1) * Float64(x1 * Float64(x1 * 6.0)))); end return tmp end
function tmp_2 = code(x1, x2) t_0 = (x1 * x1) + 1.0; t_1 = x1 * (x1 * 3.0); t_2 = (t_1 + (2.0 * x2)) - x1; t_3 = t_2 / t_0; t_4 = -1.0 - (x1 * x1); t_5 = t_2 / t_4; t_6 = x1 + ((x1 + ((((((x1 * x1) * (6.0 + (4.0 * t_5))) + (((x1 * 2.0) * t_3) * (3.0 + t_5))) * t_4) + (t_1 * t_3)) + (x1 * (x1 * x1)))) + (3.0 * (((t_1 - (2.0 * x2)) - x1) / t_0))); tmp = 0.0; if (t_6 <= Inf) tmp = t_6; else tmp = x1 + ((x1 * x1) * (x1 * (x1 * 6.0))); end tmp_2 = tmp; end
code[x1_, x2_] := Block[{t$95$0 = N[(N[(x1 * x1), $MachinePrecision] + 1.0), $MachinePrecision]}, Block[{t$95$1 = N[(x1 * N[(x1 * 3.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(t$95$1 + N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision]}, Block[{t$95$3 = N[(t$95$2 / t$95$0), $MachinePrecision]}, Block[{t$95$4 = N[(-1.0 - N[(x1 * x1), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$5 = N[(t$95$2 / t$95$4), $MachinePrecision]}, Block[{t$95$6 = N[(x1 + N[(N[(x1 + N[(N[(N[(N[(N[(N[(x1 * x1), $MachinePrecision] * N[(6.0 + N[(4.0 * t$95$5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(N[(x1 * 2.0), $MachinePrecision] * t$95$3), $MachinePrecision] * N[(3.0 + t$95$5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * t$95$4), $MachinePrecision] + N[(t$95$1 * t$95$3), $MachinePrecision]), $MachinePrecision] + N[(x1 * N[(x1 * x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(3.0 * N[(N[(N[(t$95$1 - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$6, Infinity], t$95$6, N[(x1 + N[(N[(x1 * x1), $MachinePrecision] * N[(x1 * N[(x1 * 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x1 \cdot x1 + 1\\
t_1 := x1 \cdot \left(x1 \cdot 3\right)\\
t_2 := \left(t\_1 + 2 \cdot x2\right) - x1\\
t_3 := \frac{t\_2}{t\_0}\\
t_4 := -1 - x1 \cdot x1\\
t_5 := \frac{t\_2}{t\_4}\\
t_6 := x1 + \left(\left(x1 + \left(\left(\left(\left(x1 \cdot x1\right) \cdot \left(6 + 4 \cdot t\_5\right) + \left(\left(x1 \cdot 2\right) \cdot t\_3\right) \cdot \left(3 + t\_5\right)\right) \cdot t\_4 + t\_1 \cdot t\_3\right) + x1 \cdot \left(x1 \cdot x1\right)\right)\right) + 3 \cdot \frac{\left(t\_1 - 2 \cdot x2\right) - x1}{t\_0}\right)\\
\mathbf{if}\;t\_6 \leq \infty:\\
\;\;\;\;t\_6\\
\mathbf{else}:\\
\;\;\;\;x1 + \left(x1 \cdot x1\right) \cdot \left(x1 \cdot \left(x1 \cdot 6\right)\right)\\
\end{array}
\end{array}
if (+.f64 x1 (+.f64 (+.f64 (+.f64 (+.f64 (*.f64 (+.f64 (*.f64 (*.f64 (*.f64 #s(literal 2 binary64) x1) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64)))) (-.f64 (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))) #s(literal 3 binary64))) (*.f64 (*.f64 x1 x1) (-.f64 (*.f64 #s(literal 4 binary64) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64)))) #s(literal 6 binary64)))) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))) (*.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))))) (*.f64 (*.f64 x1 x1) x1)) x1) (*.f64 #s(literal 3 binary64) (/.f64 (-.f64 (-.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64)))))) < +inf.0Initial program 99.4%
if +inf.0 < (+.f64 x1 (+.f64 (+.f64 (+.f64 (+.f64 (*.f64 (+.f64 (*.f64 (*.f64 (*.f64 #s(literal 2 binary64) x1) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64)))) (-.f64 (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))) #s(literal 3 binary64))) (*.f64 (*.f64 x1 x1) (-.f64 (*.f64 #s(literal 4 binary64) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64)))) #s(literal 6 binary64)))) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))) (*.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))))) (*.f64 (*.f64 x1 x1) x1)) x1) (*.f64 #s(literal 3 binary64) (/.f64 (-.f64 (-.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64)))))) Initial program 0.0%
Taylor expanded in x1 around inf
lower-*.f64N/A
lower-pow.f64N/A
+-commutativeN/A
associate--l+N/A
lower-+.f64N/A
Applied rewrites100.0%
Taylor expanded in x1 around 0
Applied rewrites100.0%
Taylor expanded in x2 around inf
Applied rewrites100.0%
Taylor expanded in x1 around inf
Applied rewrites100.0%
Final simplification99.6%
(FPCore (x1 x2)
:precision binary64
(if (<= x1 -31000.0)
(+
x1
(*
(pow x1 4.0)
(+
(fma (fma x2 2.0 -3.0) (/ 4.0 (* x1 x1)) (/ 9.0 (* x1 x1)))
(+ 6.0 (/ -3.0 x1)))))
(if (<= x1 4.8e+21)
(fma
x2
(fma x1 (fma 12.0 x1 (fma x2 8.0 -12.0)) -6.0)
(* x1 (fma 9.0 x1 -1.0)))
(+
x1
(*
(pow x1 4.0)
(+ 6.0 (/ (- (/ (fma 4.0 (fma x2 2.0 -3.0) 9.0) x1) 3.0) x1)))))))
double code(double x1, double x2) {
double tmp;
if (x1 <= -31000.0) {
tmp = x1 + (pow(x1, 4.0) * (fma(fma(x2, 2.0, -3.0), (4.0 / (x1 * x1)), (9.0 / (x1 * x1))) + (6.0 + (-3.0 / x1))));
} else if (x1 <= 4.8e+21) {
tmp = fma(x2, fma(x1, fma(12.0, x1, fma(x2, 8.0, -12.0)), -6.0), (x1 * fma(9.0, x1, -1.0)));
} else {
tmp = x1 + (pow(x1, 4.0) * (6.0 + (((fma(4.0, fma(x2, 2.0, -3.0), 9.0) / x1) - 3.0) / x1)));
}
return tmp;
}
function code(x1, x2) tmp = 0.0 if (x1 <= -31000.0) tmp = Float64(x1 + Float64((x1 ^ 4.0) * Float64(fma(fma(x2, 2.0, -3.0), Float64(4.0 / Float64(x1 * x1)), Float64(9.0 / Float64(x1 * x1))) + Float64(6.0 + Float64(-3.0 / x1))))); elseif (x1 <= 4.8e+21) tmp = fma(x2, fma(x1, fma(12.0, x1, fma(x2, 8.0, -12.0)), -6.0), Float64(x1 * fma(9.0, x1, -1.0))); else tmp = Float64(x1 + Float64((x1 ^ 4.0) * Float64(6.0 + Float64(Float64(Float64(fma(4.0, fma(x2, 2.0, -3.0), 9.0) / x1) - 3.0) / x1)))); end return tmp end
code[x1_, x2_] := If[LessEqual[x1, -31000.0], N[(x1 + N[(N[Power[x1, 4.0], $MachinePrecision] * N[(N[(N[(x2 * 2.0 + -3.0), $MachinePrecision] * N[(4.0 / N[(x1 * x1), $MachinePrecision]), $MachinePrecision] + N[(9.0 / N[(x1 * x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(6.0 + N[(-3.0 / x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 4.8e+21], N[(x2 * N[(x1 * N[(12.0 * x1 + N[(x2 * 8.0 + -12.0), $MachinePrecision]), $MachinePrecision] + -6.0), $MachinePrecision] + N[(x1 * N[(9.0 * x1 + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x1 + N[(N[Power[x1, 4.0], $MachinePrecision] * N[(6.0 + N[(N[(N[(N[(4.0 * N[(x2 * 2.0 + -3.0), $MachinePrecision] + 9.0), $MachinePrecision] / x1), $MachinePrecision] - 3.0), $MachinePrecision] / x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x1 \leq -31000:\\
\;\;\;\;x1 + {x1}^{4} \cdot \left(\mathsf{fma}\left(\mathsf{fma}\left(x2, 2, -3\right), \frac{4}{x1 \cdot x1}, \frac{9}{x1 \cdot x1}\right) + \left(6 + \frac{-3}{x1}\right)\right)\\
\mathbf{elif}\;x1 \leq 4.8 \cdot 10^{+21}:\\
\;\;\;\;\mathsf{fma}\left(x2, \mathsf{fma}\left(x1, \mathsf{fma}\left(12, x1, \mathsf{fma}\left(x2, 8, -12\right)\right), -6\right), x1 \cdot \mathsf{fma}\left(9, x1, -1\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x1 + {x1}^{4} \cdot \left(6 + \frac{\frac{\mathsf{fma}\left(4, \mathsf{fma}\left(x2, 2, -3\right), 9\right)}{x1} - 3}{x1}\right)\\
\end{array}
\end{array}
if x1 < -31000Initial program 37.3%
Taylor expanded in x1 around inf
lower-*.f64N/A
lower-pow.f64N/A
+-commutativeN/A
associate--l+N/A
lower-+.f64N/A
Applied rewrites93.6%
if -31000 < x1 < 4.8e21Initial program 99.3%
Taylor expanded in x1 around 0
*-commutativeN/A
lower-*.f6449.7
Applied rewrites49.7%
Taylor expanded in x1 around 0
Applied rewrites82.8%
Taylor expanded in x2 around 0
Applied rewrites97.5%
if 4.8e21 < x1 Initial program 41.1%
Taylor expanded in x1 around -inf
lower-*.f64N/A
lower-pow.f64N/A
mul-1-negN/A
unsub-negN/A
lower--.f64N/A
lower-/.f64N/A
Applied rewrites95.6%
Final simplification96.1%
(FPCore (x1 x2)
:precision binary64
(if (<= x1 -31000.0)
(+
x1
(fma
(* x1 (* x1 (fma (/ 1.0 (* x1 x1)) (fma x2 8.0 -3.0) 6.0)))
(* x1 x1)
(* -3.0 (* x1 (* x1 x1)))))
(if (<= x1 4.8e+21)
(fma
x2
(fma x1 (fma 12.0 x1 (fma x2 8.0 -12.0)) -6.0)
(* x1 (fma 9.0 x1 -1.0)))
(+
x1
(*
(pow x1 4.0)
(+ 6.0 (/ (- (/ (fma 4.0 (fma x2 2.0 -3.0) 9.0) x1) 3.0) x1)))))))
double code(double x1, double x2) {
double tmp;
if (x1 <= -31000.0) {
tmp = x1 + fma((x1 * (x1 * fma((1.0 / (x1 * x1)), fma(x2, 8.0, -3.0), 6.0))), (x1 * x1), (-3.0 * (x1 * (x1 * x1))));
} else if (x1 <= 4.8e+21) {
tmp = fma(x2, fma(x1, fma(12.0, x1, fma(x2, 8.0, -12.0)), -6.0), (x1 * fma(9.0, x1, -1.0)));
} else {
tmp = x1 + (pow(x1, 4.0) * (6.0 + (((fma(4.0, fma(x2, 2.0, -3.0), 9.0) / x1) - 3.0) / x1)));
}
return tmp;
}
function code(x1, x2) tmp = 0.0 if (x1 <= -31000.0) tmp = Float64(x1 + fma(Float64(x1 * Float64(x1 * fma(Float64(1.0 / Float64(x1 * x1)), fma(x2, 8.0, -3.0), 6.0))), Float64(x1 * x1), Float64(-3.0 * Float64(x1 * Float64(x1 * x1))))); elseif (x1 <= 4.8e+21) tmp = fma(x2, fma(x1, fma(12.0, x1, fma(x2, 8.0, -12.0)), -6.0), Float64(x1 * fma(9.0, x1, -1.0))); else tmp = Float64(x1 + Float64((x1 ^ 4.0) * Float64(6.0 + Float64(Float64(Float64(fma(4.0, fma(x2, 2.0, -3.0), 9.0) / x1) - 3.0) / x1)))); end return tmp end
code[x1_, x2_] := If[LessEqual[x1, -31000.0], N[(x1 + N[(N[(x1 * N[(x1 * N[(N[(1.0 / N[(x1 * x1), $MachinePrecision]), $MachinePrecision] * N[(x2 * 8.0 + -3.0), $MachinePrecision] + 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(x1 * x1), $MachinePrecision] + N[(-3.0 * N[(x1 * N[(x1 * x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 4.8e+21], N[(x2 * N[(x1 * N[(12.0 * x1 + N[(x2 * 8.0 + -12.0), $MachinePrecision]), $MachinePrecision] + -6.0), $MachinePrecision] + N[(x1 * N[(9.0 * x1 + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x1 + N[(N[Power[x1, 4.0], $MachinePrecision] * N[(6.0 + N[(N[(N[(N[(4.0 * N[(x2 * 2.0 + -3.0), $MachinePrecision] + 9.0), $MachinePrecision] / x1), $MachinePrecision] - 3.0), $MachinePrecision] / x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x1 \leq -31000:\\
\;\;\;\;x1 + \mathsf{fma}\left(x1 \cdot \left(x1 \cdot \mathsf{fma}\left(\frac{1}{x1 \cdot x1}, \mathsf{fma}\left(x2, 8, -3\right), 6\right)\right), x1 \cdot x1, -3 \cdot \left(x1 \cdot \left(x1 \cdot x1\right)\right)\right)\\
\mathbf{elif}\;x1 \leq 4.8 \cdot 10^{+21}:\\
\;\;\;\;\mathsf{fma}\left(x2, \mathsf{fma}\left(x1, \mathsf{fma}\left(12, x1, \mathsf{fma}\left(x2, 8, -12\right)\right), -6\right), x1 \cdot \mathsf{fma}\left(9, x1, -1\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x1 + {x1}^{4} \cdot \left(6 + \frac{\frac{\mathsf{fma}\left(4, \mathsf{fma}\left(x2, 2, -3\right), 9\right)}{x1} - 3}{x1}\right)\\
\end{array}
\end{array}
if x1 < -31000Initial program 37.3%
Taylor expanded in x1 around inf
lower-*.f64N/A
lower-pow.f64N/A
+-commutativeN/A
associate--l+N/A
lower-+.f64N/A
Applied rewrites93.6%
Applied rewrites92.0%
Applied rewrites92.0%
Applied rewrites93.6%
if -31000 < x1 < 4.8e21Initial program 99.3%
Taylor expanded in x1 around 0
*-commutativeN/A
lower-*.f6449.7
Applied rewrites49.7%
Taylor expanded in x1 around 0
Applied rewrites82.8%
Taylor expanded in x2 around 0
Applied rewrites97.5%
if 4.8e21 < x1 Initial program 41.1%
Taylor expanded in x1 around -inf
lower-*.f64N/A
lower-pow.f64N/A
mul-1-negN/A
unsub-negN/A
lower--.f64N/A
lower-/.f64N/A
Applied rewrites95.6%
Final simplification96.1%
(FPCore (x1 x2)
:precision binary64
(if (<= x1 -31000.0)
(+
x1
(fma
(* x1 (* x1 (fma (/ 1.0 (* x1 x1)) (fma x2 8.0 -3.0) 6.0)))
(* x1 x1)
(* -3.0 (* x1 (* x1 x1)))))
(if (<= x1 4.8e+21)
(fma
x2
(fma x1 (fma 12.0 x1 (fma x2 8.0 -12.0)) -6.0)
(* x1 (fma 9.0 x1 -1.0)))
(+ x1 (* (* x1 x1) (fma x1 (fma x1 6.0 -3.0) (* x2 8.0)))))))
double code(double x1, double x2) {
double tmp;
if (x1 <= -31000.0) {
tmp = x1 + fma((x1 * (x1 * fma((1.0 / (x1 * x1)), fma(x2, 8.0, -3.0), 6.0))), (x1 * x1), (-3.0 * (x1 * (x1 * x1))));
} else if (x1 <= 4.8e+21) {
tmp = fma(x2, fma(x1, fma(12.0, x1, fma(x2, 8.0, -12.0)), -6.0), (x1 * fma(9.0, x1, -1.0)));
} else {
tmp = x1 + ((x1 * x1) * fma(x1, fma(x1, 6.0, -3.0), (x2 * 8.0)));
}
return tmp;
}
function code(x1, x2) tmp = 0.0 if (x1 <= -31000.0) tmp = Float64(x1 + fma(Float64(x1 * Float64(x1 * fma(Float64(1.0 / Float64(x1 * x1)), fma(x2, 8.0, -3.0), 6.0))), Float64(x1 * x1), Float64(-3.0 * Float64(x1 * Float64(x1 * x1))))); elseif (x1 <= 4.8e+21) tmp = fma(x2, fma(x1, fma(12.0, x1, fma(x2, 8.0, -12.0)), -6.0), Float64(x1 * fma(9.0, x1, -1.0))); else tmp = Float64(x1 + Float64(Float64(x1 * x1) * fma(x1, fma(x1, 6.0, -3.0), Float64(x2 * 8.0)))); end return tmp end
code[x1_, x2_] := If[LessEqual[x1, -31000.0], N[(x1 + N[(N[(x1 * N[(x1 * N[(N[(1.0 / N[(x1 * x1), $MachinePrecision]), $MachinePrecision] * N[(x2 * 8.0 + -3.0), $MachinePrecision] + 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(x1 * x1), $MachinePrecision] + N[(-3.0 * N[(x1 * N[(x1 * x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 4.8e+21], N[(x2 * N[(x1 * N[(12.0 * x1 + N[(x2 * 8.0 + -12.0), $MachinePrecision]), $MachinePrecision] + -6.0), $MachinePrecision] + N[(x1 * N[(9.0 * x1 + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x1 + N[(N[(x1 * x1), $MachinePrecision] * N[(x1 * N[(x1 * 6.0 + -3.0), $MachinePrecision] + N[(x2 * 8.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x1 \leq -31000:\\
\;\;\;\;x1 + \mathsf{fma}\left(x1 \cdot \left(x1 \cdot \mathsf{fma}\left(\frac{1}{x1 \cdot x1}, \mathsf{fma}\left(x2, 8, -3\right), 6\right)\right), x1 \cdot x1, -3 \cdot \left(x1 \cdot \left(x1 \cdot x1\right)\right)\right)\\
\mathbf{elif}\;x1 \leq 4.8 \cdot 10^{+21}:\\
\;\;\;\;\mathsf{fma}\left(x2, \mathsf{fma}\left(x1, \mathsf{fma}\left(12, x1, \mathsf{fma}\left(x2, 8, -12\right)\right), -6\right), x1 \cdot \mathsf{fma}\left(9, x1, -1\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x1 + \left(x1 \cdot x1\right) \cdot \mathsf{fma}\left(x1, \mathsf{fma}\left(x1, 6, -3\right), x2 \cdot 8\right)\\
\end{array}
\end{array}
if x1 < -31000Initial program 37.3%
Taylor expanded in x1 around inf
lower-*.f64N/A
lower-pow.f64N/A
+-commutativeN/A
associate--l+N/A
lower-+.f64N/A
Applied rewrites93.6%
Applied rewrites92.0%
Applied rewrites92.0%
Applied rewrites93.6%
if -31000 < x1 < 4.8e21Initial program 99.3%
Taylor expanded in x1 around 0
*-commutativeN/A
lower-*.f6449.7
Applied rewrites49.7%
Taylor expanded in x1 around 0
Applied rewrites82.8%
Taylor expanded in x2 around 0
Applied rewrites97.5%
if 4.8e21 < x1 Initial program 41.1%
Taylor expanded in x1 around inf
lower-*.f64N/A
lower-pow.f64N/A
+-commutativeN/A
associate--l+N/A
lower-+.f64N/A
Applied rewrites95.6%
Taylor expanded in x1 around 0
Applied rewrites95.6%
Taylor expanded in x2 around inf
Applied rewrites95.6%
Final simplification96.1%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (fma x2 -6.0 (* x1 (fma x2 (fma x2 8.0 -12.0) -1.0)))))
(if (<= x1 -31000.0)
(+ x1 (* x1 (* x1 (fma x1 (fma 6.0 x1 -3.0) -3.0))))
(if (<= x1 -1.62e-174)
t_0
(if (<= x1 1.3e-209)
(fma x2 -6.0 (* x1 (fma 9.0 x1 -1.0)))
(if (<= x1 4.8e+21) t_0 (+ x1 (* 6.0 (* x1 (* x1 (* x1 x1)))))))))))
double code(double x1, double x2) {
double t_0 = fma(x2, -6.0, (x1 * fma(x2, fma(x2, 8.0, -12.0), -1.0)));
double tmp;
if (x1 <= -31000.0) {
tmp = x1 + (x1 * (x1 * fma(x1, fma(6.0, x1, -3.0), -3.0)));
} else if (x1 <= -1.62e-174) {
tmp = t_0;
} else if (x1 <= 1.3e-209) {
tmp = fma(x2, -6.0, (x1 * fma(9.0, x1, -1.0)));
} else if (x1 <= 4.8e+21) {
tmp = t_0;
} else {
tmp = x1 + (6.0 * (x1 * (x1 * (x1 * x1))));
}
return tmp;
}
function code(x1, x2) t_0 = fma(x2, -6.0, Float64(x1 * fma(x2, fma(x2, 8.0, -12.0), -1.0))) tmp = 0.0 if (x1 <= -31000.0) tmp = Float64(x1 + Float64(x1 * Float64(x1 * fma(x1, fma(6.0, x1, -3.0), -3.0)))); elseif (x1 <= -1.62e-174) tmp = t_0; elseif (x1 <= 1.3e-209) tmp = fma(x2, -6.0, Float64(x1 * fma(9.0, x1, -1.0))); elseif (x1 <= 4.8e+21) tmp = t_0; else tmp = Float64(x1 + Float64(6.0 * Float64(x1 * Float64(x1 * Float64(x1 * x1))))); end return tmp end
code[x1_, x2_] := Block[{t$95$0 = N[(x2 * -6.0 + N[(x1 * N[(x2 * N[(x2 * 8.0 + -12.0), $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x1, -31000.0], N[(x1 + N[(x1 * N[(x1 * N[(x1 * N[(6.0 * x1 + -3.0), $MachinePrecision] + -3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, -1.62e-174], t$95$0, If[LessEqual[x1, 1.3e-209], N[(x2 * -6.0 + N[(x1 * N[(9.0 * x1 + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 4.8e+21], t$95$0, N[(x1 + N[(6.0 * N[(x1 * N[(x1 * N[(x1 * x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \mathsf{fma}\left(x2, -6, x1 \cdot \mathsf{fma}\left(x2, \mathsf{fma}\left(x2, 8, -12\right), -1\right)\right)\\
\mathbf{if}\;x1 \leq -31000:\\
\;\;\;\;x1 + x1 \cdot \left(x1 \cdot \mathsf{fma}\left(x1, \mathsf{fma}\left(6, x1, -3\right), -3\right)\right)\\
\mathbf{elif}\;x1 \leq -1.62 \cdot 10^{-174}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;x1 \leq 1.3 \cdot 10^{-209}:\\
\;\;\;\;\mathsf{fma}\left(x2, -6, x1 \cdot \mathsf{fma}\left(9, x1, -1\right)\right)\\
\mathbf{elif}\;x1 \leq 4.8 \cdot 10^{+21}:\\
\;\;\;\;t\_0\\
\mathbf{else}:\\
\;\;\;\;x1 + 6 \cdot \left(x1 \cdot \left(x1 \cdot \left(x1 \cdot x1\right)\right)\right)\\
\end{array}
\end{array}
if x1 < -31000Initial program 37.3%
Taylor expanded in x1 around inf
lower-*.f64N/A
lower-pow.f64N/A
+-commutativeN/A
associate--l+N/A
lower-+.f64N/A
Applied rewrites93.6%
Taylor expanded in x1 around 0
Applied rewrites93.6%
Taylor expanded in x2 around 0
Applied rewrites90.7%
if -31000 < x1 < -1.6200000000000001e-174 or 1.29999999999999992e-209 < x1 < 4.8e21Initial program 99.2%
Taylor expanded in x1 around 0
*-commutativeN/A
lower-*.f6434.6
Applied rewrites34.6%
Taylor expanded in x1 around 0
Applied rewrites88.9%
Taylor expanded in x1 around 0
Applied rewrites87.8%
if -1.6200000000000001e-174 < x1 < 1.29999999999999992e-209Initial program 99.6%
Taylor expanded in x1 around 0
*-commutativeN/A
lower-*.f6480.9
Applied rewrites80.9%
Taylor expanded in x1 around 0
Applied rewrites70.0%
Taylor expanded in x2 around 0
Applied rewrites99.9%
Taylor expanded in x1 around 0
Applied rewrites90.7%
if 4.8e21 < x1 Initial program 41.1%
Taylor expanded in x1 around inf
lower-*.f64N/A
lower-pow.f6494.8
Applied rewrites94.8%
Applied rewrites94.8%
Final simplification90.7%
(FPCore (x1 x2)
:precision binary64
(if (<= x1 -31000.0)
(+
x1
(* (* x1 x1) (fma x1 (fma x1 6.0 -3.0) (fma 4.0 (fma x2 2.0 -3.0) 9.0))))
(if (<= x1 4.8e+21)
(fma
x2
(fma x1 (fma 12.0 x1 (fma x2 8.0 -12.0)) -6.0)
(* x1 (fma 9.0 x1 -1.0)))
(+ x1 (* (* x1 x1) (fma x1 (fma x1 6.0 -3.0) (* x2 8.0)))))))
double code(double x1, double x2) {
double tmp;
if (x1 <= -31000.0) {
tmp = x1 + ((x1 * x1) * fma(x1, fma(x1, 6.0, -3.0), fma(4.0, fma(x2, 2.0, -3.0), 9.0)));
} else if (x1 <= 4.8e+21) {
tmp = fma(x2, fma(x1, fma(12.0, x1, fma(x2, 8.0, -12.0)), -6.0), (x1 * fma(9.0, x1, -1.0)));
} else {
tmp = x1 + ((x1 * x1) * fma(x1, fma(x1, 6.0, -3.0), (x2 * 8.0)));
}
return tmp;
}
function code(x1, x2) tmp = 0.0 if (x1 <= -31000.0) tmp = Float64(x1 + Float64(Float64(x1 * x1) * fma(x1, fma(x1, 6.0, -3.0), fma(4.0, fma(x2, 2.0, -3.0), 9.0)))); elseif (x1 <= 4.8e+21) tmp = fma(x2, fma(x1, fma(12.0, x1, fma(x2, 8.0, -12.0)), -6.0), Float64(x1 * fma(9.0, x1, -1.0))); else tmp = Float64(x1 + Float64(Float64(x1 * x1) * fma(x1, fma(x1, 6.0, -3.0), Float64(x2 * 8.0)))); end return tmp end
code[x1_, x2_] := If[LessEqual[x1, -31000.0], N[(x1 + N[(N[(x1 * x1), $MachinePrecision] * N[(x1 * N[(x1 * 6.0 + -3.0), $MachinePrecision] + N[(4.0 * N[(x2 * 2.0 + -3.0), $MachinePrecision] + 9.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 4.8e+21], N[(x2 * N[(x1 * N[(12.0 * x1 + N[(x2 * 8.0 + -12.0), $MachinePrecision]), $MachinePrecision] + -6.0), $MachinePrecision] + N[(x1 * N[(9.0 * x1 + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x1 + N[(N[(x1 * x1), $MachinePrecision] * N[(x1 * N[(x1 * 6.0 + -3.0), $MachinePrecision] + N[(x2 * 8.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x1 \leq -31000:\\
\;\;\;\;x1 + \left(x1 \cdot x1\right) \cdot \mathsf{fma}\left(x1, \mathsf{fma}\left(x1, 6, -3\right), \mathsf{fma}\left(4, \mathsf{fma}\left(x2, 2, -3\right), 9\right)\right)\\
\mathbf{elif}\;x1 \leq 4.8 \cdot 10^{+21}:\\
\;\;\;\;\mathsf{fma}\left(x2, \mathsf{fma}\left(x1, \mathsf{fma}\left(12, x1, \mathsf{fma}\left(x2, 8, -12\right)\right), -6\right), x1 \cdot \mathsf{fma}\left(9, x1, -1\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x1 + \left(x1 \cdot x1\right) \cdot \mathsf{fma}\left(x1, \mathsf{fma}\left(x1, 6, -3\right), x2 \cdot 8\right)\\
\end{array}
\end{array}
if x1 < -31000Initial program 37.3%
Taylor expanded in x1 around inf
lower-*.f64N/A
lower-pow.f64N/A
+-commutativeN/A
associate--l+N/A
lower-+.f64N/A
Applied rewrites93.6%
Taylor expanded in x1 around 0
Applied rewrites93.6%
if -31000 < x1 < 4.8e21Initial program 99.3%
Taylor expanded in x1 around 0
*-commutativeN/A
lower-*.f6449.7
Applied rewrites49.7%
Taylor expanded in x1 around 0
Applied rewrites82.8%
Taylor expanded in x2 around 0
Applied rewrites97.5%
if 4.8e21 < x1 Initial program 41.1%
Taylor expanded in x1 around inf
lower-*.f64N/A
lower-pow.f64N/A
+-commutativeN/A
associate--l+N/A
lower-+.f64N/A
Applied rewrites95.6%
Taylor expanded in x1 around 0
Applied rewrites95.6%
Taylor expanded in x2 around inf
Applied rewrites95.6%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (+ x1 (* (* x1 x1) (fma x1 (fma x1 6.0 -3.0) (* x2 8.0))))))
(if (<= x1 -31000.0)
t_0
(if (<= x1 4.8e+21)
(fma
x2
(fma x1 (fma 12.0 x1 (fma x2 8.0 -12.0)) -6.0)
(* x1 (fma 9.0 x1 -1.0)))
t_0))))
double code(double x1, double x2) {
double t_0 = x1 + ((x1 * x1) * fma(x1, fma(x1, 6.0, -3.0), (x2 * 8.0)));
double tmp;
if (x1 <= -31000.0) {
tmp = t_0;
} else if (x1 <= 4.8e+21) {
tmp = fma(x2, fma(x1, fma(12.0, x1, fma(x2, 8.0, -12.0)), -6.0), (x1 * fma(9.0, x1, -1.0)));
} else {
tmp = t_0;
}
return tmp;
}
function code(x1, x2) t_0 = Float64(x1 + Float64(Float64(x1 * x1) * fma(x1, fma(x1, 6.0, -3.0), Float64(x2 * 8.0)))) tmp = 0.0 if (x1 <= -31000.0) tmp = t_0; elseif (x1 <= 4.8e+21) tmp = fma(x2, fma(x1, fma(12.0, x1, fma(x2, 8.0, -12.0)), -6.0), Float64(x1 * fma(9.0, x1, -1.0))); else tmp = t_0; end return tmp end
code[x1_, x2_] := Block[{t$95$0 = N[(x1 + N[(N[(x1 * x1), $MachinePrecision] * N[(x1 * N[(x1 * 6.0 + -3.0), $MachinePrecision] + N[(x2 * 8.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x1, -31000.0], t$95$0, If[LessEqual[x1, 4.8e+21], N[(x2 * N[(x1 * N[(12.0 * x1 + N[(x2 * 8.0 + -12.0), $MachinePrecision]), $MachinePrecision] + -6.0), $MachinePrecision] + N[(x1 * N[(9.0 * x1 + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$0]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x1 + \left(x1 \cdot x1\right) \cdot \mathsf{fma}\left(x1, \mathsf{fma}\left(x1, 6, -3\right), x2 \cdot 8\right)\\
\mathbf{if}\;x1 \leq -31000:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;x1 \leq 4.8 \cdot 10^{+21}:\\
\;\;\;\;\mathsf{fma}\left(x2, \mathsf{fma}\left(x1, \mathsf{fma}\left(12, x1, \mathsf{fma}\left(x2, 8, -12\right)\right), -6\right), x1 \cdot \mathsf{fma}\left(9, x1, -1\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
if x1 < -31000 or 4.8e21 < x1 Initial program 39.2%
Taylor expanded in x1 around inf
lower-*.f64N/A
lower-pow.f64N/A
+-commutativeN/A
associate--l+N/A
lower-+.f64N/A
Applied rewrites94.6%
Taylor expanded in x1 around 0
Applied rewrites94.6%
Taylor expanded in x2 around inf
Applied rewrites94.5%
if -31000 < x1 < 4.8e21Initial program 99.3%
Taylor expanded in x1 around 0
*-commutativeN/A
lower-*.f6449.7
Applied rewrites49.7%
Taylor expanded in x1 around 0
Applied rewrites82.8%
Taylor expanded in x2 around 0
Applied rewrites97.5%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (+ x1 (* (* x1 x1) (fma x1 (fma x1 6.0 -3.0) (* x2 8.0))))))
(if (<= x1 -31000.0)
t_0
(if (<= x1 4.8e+21)
(fma x2 (fma x1 (fma 12.0 x1 (fma x2 8.0 -12.0)) -6.0) (- x1))
t_0))))
double code(double x1, double x2) {
double t_0 = x1 + ((x1 * x1) * fma(x1, fma(x1, 6.0, -3.0), (x2 * 8.0)));
double tmp;
if (x1 <= -31000.0) {
tmp = t_0;
} else if (x1 <= 4.8e+21) {
tmp = fma(x2, fma(x1, fma(12.0, x1, fma(x2, 8.0, -12.0)), -6.0), -x1);
} else {
tmp = t_0;
}
return tmp;
}
function code(x1, x2) t_0 = Float64(x1 + Float64(Float64(x1 * x1) * fma(x1, fma(x1, 6.0, -3.0), Float64(x2 * 8.0)))) tmp = 0.0 if (x1 <= -31000.0) tmp = t_0; elseif (x1 <= 4.8e+21) tmp = fma(x2, fma(x1, fma(12.0, x1, fma(x2, 8.0, -12.0)), -6.0), Float64(-x1)); else tmp = t_0; end return tmp end
code[x1_, x2_] := Block[{t$95$0 = N[(x1 + N[(N[(x1 * x1), $MachinePrecision] * N[(x1 * N[(x1 * 6.0 + -3.0), $MachinePrecision] + N[(x2 * 8.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x1, -31000.0], t$95$0, If[LessEqual[x1, 4.8e+21], N[(x2 * N[(x1 * N[(12.0 * x1 + N[(x2 * 8.0 + -12.0), $MachinePrecision]), $MachinePrecision] + -6.0), $MachinePrecision] + (-x1)), $MachinePrecision], t$95$0]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x1 + \left(x1 \cdot x1\right) \cdot \mathsf{fma}\left(x1, \mathsf{fma}\left(x1, 6, -3\right), x2 \cdot 8\right)\\
\mathbf{if}\;x1 \leq -31000:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;x1 \leq 4.8 \cdot 10^{+21}:\\
\;\;\;\;\mathsf{fma}\left(x2, \mathsf{fma}\left(x1, \mathsf{fma}\left(12, x1, \mathsf{fma}\left(x2, 8, -12\right)\right), -6\right), -x1\right)\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
if x1 < -31000 or 4.8e21 < x1 Initial program 39.2%
Taylor expanded in x1 around inf
lower-*.f64N/A
lower-pow.f64N/A
+-commutativeN/A
associate--l+N/A
lower-+.f64N/A
Applied rewrites94.6%
Taylor expanded in x1 around 0
Applied rewrites94.6%
Taylor expanded in x2 around inf
Applied rewrites94.5%
if -31000 < x1 < 4.8e21Initial program 99.3%
Taylor expanded in x1 around 0
*-commutativeN/A
lower-*.f6449.7
Applied rewrites49.7%
Taylor expanded in x1 around 0
Applied rewrites82.8%
Taylor expanded in x2 around 0
Applied rewrites97.5%
Taylor expanded in x1 around 0
Applied rewrites96.7%
(FPCore (x1 x2)
:precision binary64
(if (<= x1 -31000.0)
(+ x1 (* x1 (* x1 (fma x1 (fma 6.0 x1 -3.0) -3.0))))
(if (<= x1 4.8e+21)
(fma x2 (fma x1 (fma 12.0 x1 (fma x2 8.0 -12.0)) -6.0) (- x1))
(+ x1 (* 6.0 (* x1 (* x1 (* x1 x1))))))))
double code(double x1, double x2) {
double tmp;
if (x1 <= -31000.0) {
tmp = x1 + (x1 * (x1 * fma(x1, fma(6.0, x1, -3.0), -3.0)));
} else if (x1 <= 4.8e+21) {
tmp = fma(x2, fma(x1, fma(12.0, x1, fma(x2, 8.0, -12.0)), -6.0), -x1);
} else {
tmp = x1 + (6.0 * (x1 * (x1 * (x1 * x1))));
}
return tmp;
}
function code(x1, x2) tmp = 0.0 if (x1 <= -31000.0) tmp = Float64(x1 + Float64(x1 * Float64(x1 * fma(x1, fma(6.0, x1, -3.0), -3.0)))); elseif (x1 <= 4.8e+21) tmp = fma(x2, fma(x1, fma(12.0, x1, fma(x2, 8.0, -12.0)), -6.0), Float64(-x1)); else tmp = Float64(x1 + Float64(6.0 * Float64(x1 * Float64(x1 * Float64(x1 * x1))))); end return tmp end
code[x1_, x2_] := If[LessEqual[x1, -31000.0], N[(x1 + N[(x1 * N[(x1 * N[(x1 * N[(6.0 * x1 + -3.0), $MachinePrecision] + -3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 4.8e+21], N[(x2 * N[(x1 * N[(12.0 * x1 + N[(x2 * 8.0 + -12.0), $MachinePrecision]), $MachinePrecision] + -6.0), $MachinePrecision] + (-x1)), $MachinePrecision], N[(x1 + N[(6.0 * N[(x1 * N[(x1 * N[(x1 * x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x1 \leq -31000:\\
\;\;\;\;x1 + x1 \cdot \left(x1 \cdot \mathsf{fma}\left(x1, \mathsf{fma}\left(6, x1, -3\right), -3\right)\right)\\
\mathbf{elif}\;x1 \leq 4.8 \cdot 10^{+21}:\\
\;\;\;\;\mathsf{fma}\left(x2, \mathsf{fma}\left(x1, \mathsf{fma}\left(12, x1, \mathsf{fma}\left(x2, 8, -12\right)\right), -6\right), -x1\right)\\
\mathbf{else}:\\
\;\;\;\;x1 + 6 \cdot \left(x1 \cdot \left(x1 \cdot \left(x1 \cdot x1\right)\right)\right)\\
\end{array}
\end{array}
if x1 < -31000Initial program 37.3%
Taylor expanded in x1 around inf
lower-*.f64N/A
lower-pow.f64N/A
+-commutativeN/A
associate--l+N/A
lower-+.f64N/A
Applied rewrites93.6%
Taylor expanded in x1 around 0
Applied rewrites93.6%
Taylor expanded in x2 around 0
Applied rewrites90.7%
if -31000 < x1 < 4.8e21Initial program 99.3%
Taylor expanded in x1 around 0
*-commutativeN/A
lower-*.f6449.7
Applied rewrites49.7%
Taylor expanded in x1 around 0
Applied rewrites82.8%
Taylor expanded in x2 around 0
Applied rewrites97.5%
Taylor expanded in x1 around 0
Applied rewrites96.7%
if 4.8e21 < x1 Initial program 41.1%
Taylor expanded in x1 around inf
lower-*.f64N/A
lower-pow.f6494.8
Applied rewrites94.8%
Applied rewrites94.8%
Final simplification94.7%
(FPCore (x1 x2) :precision binary64 (if (<= (* 2.0 x2) -5e-103) (* x2 -6.0) (if (<= (* 2.0 x2) 2e-62) (- x1) (+ x1 (* x2 -6.0)))))
double code(double x1, double x2) {
double tmp;
if ((2.0 * x2) <= -5e-103) {
tmp = x2 * -6.0;
} else if ((2.0 * x2) <= 2e-62) {
tmp = -x1;
} else {
tmp = x1 + (x2 * -6.0);
}
return tmp;
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
real(8) :: tmp
if ((2.0d0 * x2) <= (-5d-103)) then
tmp = x2 * (-6.0d0)
else if ((2.0d0 * x2) <= 2d-62) then
tmp = -x1
else
tmp = x1 + (x2 * (-6.0d0))
end if
code = tmp
end function
public static double code(double x1, double x2) {
double tmp;
if ((2.0 * x2) <= -5e-103) {
tmp = x2 * -6.0;
} else if ((2.0 * x2) <= 2e-62) {
tmp = -x1;
} else {
tmp = x1 + (x2 * -6.0);
}
return tmp;
}
def code(x1, x2): tmp = 0 if (2.0 * x2) <= -5e-103: tmp = x2 * -6.0 elif (2.0 * x2) <= 2e-62: tmp = -x1 else: tmp = x1 + (x2 * -6.0) return tmp
function code(x1, x2) tmp = 0.0 if (Float64(2.0 * x2) <= -5e-103) tmp = Float64(x2 * -6.0); elseif (Float64(2.0 * x2) <= 2e-62) tmp = Float64(-x1); else tmp = Float64(x1 + Float64(x2 * -6.0)); end return tmp end
function tmp_2 = code(x1, x2) tmp = 0.0; if ((2.0 * x2) <= -5e-103) tmp = x2 * -6.0; elseif ((2.0 * x2) <= 2e-62) tmp = -x1; else tmp = x1 + (x2 * -6.0); end tmp_2 = tmp; end
code[x1_, x2_] := If[LessEqual[N[(2.0 * x2), $MachinePrecision], -5e-103], N[(x2 * -6.0), $MachinePrecision], If[LessEqual[N[(2.0 * x2), $MachinePrecision], 2e-62], (-x1), N[(x1 + N[(x2 * -6.0), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;2 \cdot x2 \leq -5 \cdot 10^{-103}:\\
\;\;\;\;x2 \cdot -6\\
\mathbf{elif}\;2 \cdot x2 \leq 2 \cdot 10^{-62}:\\
\;\;\;\;-x1\\
\mathbf{else}:\\
\;\;\;\;x1 + x2 \cdot -6\\
\end{array}
\end{array}
if (*.f64 #s(literal 2 binary64) x2) < -4.99999999999999966e-103Initial program 67.8%
Taylor expanded in x1 around 0
*-commutativeN/A
lower-*.f6429.5
Applied rewrites29.5%
Taylor expanded in x1 around 0
*-commutativeN/A
lower-*.f6429.9
Applied rewrites29.9%
if -4.99999999999999966e-103 < (*.f64 #s(literal 2 binary64) x2) < 2.0000000000000001e-62Initial program 61.2%
Taylor expanded in x1 around 0
*-commutativeN/A
lower-*.f6412.1
Applied rewrites12.1%
Taylor expanded in x1 around 0
Applied rewrites76.6%
Taylor expanded in x2 around 0
Applied rewrites66.9%
Taylor expanded in x1 around 0
Applied rewrites33.0%
if 2.0000000000000001e-62 < (*.f64 #s(literal 2 binary64) x2) Initial program 81.5%
Taylor expanded in x1 around 0
*-commutativeN/A
lower-*.f6443.0
Applied rewrites43.0%
(FPCore (x1 x2) :precision binary64 (if (<= (* 2.0 x2) -5e-103) (* x2 -6.0) (if (<= (* 2.0 x2) 2e-62) (- x1) (* x2 -6.0))))
double code(double x1, double x2) {
double tmp;
if ((2.0 * x2) <= -5e-103) {
tmp = x2 * -6.0;
} else if ((2.0 * x2) <= 2e-62) {
tmp = -x1;
} else {
tmp = x2 * -6.0;
}
return tmp;
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
real(8) :: tmp
if ((2.0d0 * x2) <= (-5d-103)) then
tmp = x2 * (-6.0d0)
else if ((2.0d0 * x2) <= 2d-62) then
tmp = -x1
else
tmp = x2 * (-6.0d0)
end if
code = tmp
end function
public static double code(double x1, double x2) {
double tmp;
if ((2.0 * x2) <= -5e-103) {
tmp = x2 * -6.0;
} else if ((2.0 * x2) <= 2e-62) {
tmp = -x1;
} else {
tmp = x2 * -6.0;
}
return tmp;
}
def code(x1, x2): tmp = 0 if (2.0 * x2) <= -5e-103: tmp = x2 * -6.0 elif (2.0 * x2) <= 2e-62: tmp = -x1 else: tmp = x2 * -6.0 return tmp
function code(x1, x2) tmp = 0.0 if (Float64(2.0 * x2) <= -5e-103) tmp = Float64(x2 * -6.0); elseif (Float64(2.0 * x2) <= 2e-62) tmp = Float64(-x1); else tmp = Float64(x2 * -6.0); end return tmp end
function tmp_2 = code(x1, x2) tmp = 0.0; if ((2.0 * x2) <= -5e-103) tmp = x2 * -6.0; elseif ((2.0 * x2) <= 2e-62) tmp = -x1; else tmp = x2 * -6.0; end tmp_2 = tmp; end
code[x1_, x2_] := If[LessEqual[N[(2.0 * x2), $MachinePrecision], -5e-103], N[(x2 * -6.0), $MachinePrecision], If[LessEqual[N[(2.0 * x2), $MachinePrecision], 2e-62], (-x1), N[(x2 * -6.0), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;2 \cdot x2 \leq -5 \cdot 10^{-103}:\\
\;\;\;\;x2 \cdot -6\\
\mathbf{elif}\;2 \cdot x2 \leq 2 \cdot 10^{-62}:\\
\;\;\;\;-x1\\
\mathbf{else}:\\
\;\;\;\;x2 \cdot -6\\
\end{array}
\end{array}
if (*.f64 #s(literal 2 binary64) x2) < -4.99999999999999966e-103 or 2.0000000000000001e-62 < (*.f64 #s(literal 2 binary64) x2) Initial program 75.3%
Taylor expanded in x1 around 0
*-commutativeN/A
lower-*.f6436.9
Applied rewrites36.9%
Taylor expanded in x1 around 0
*-commutativeN/A
lower-*.f6436.8
Applied rewrites36.8%
if -4.99999999999999966e-103 < (*.f64 #s(literal 2 binary64) x2) < 2.0000000000000001e-62Initial program 61.2%
Taylor expanded in x1 around 0
*-commutativeN/A
lower-*.f6412.1
Applied rewrites12.1%
Taylor expanded in x1 around 0
Applied rewrites76.6%
Taylor expanded in x2 around 0
Applied rewrites66.9%
Taylor expanded in x1 around 0
Applied rewrites33.0%
(FPCore (x1 x2) :precision binary64 (let* ((t_0 (* x1 (fma 9.0 x1 -1.0)))) (if (<= x1 -1.75e-48) t_0 (if (<= x1 5.6e-86) (* x2 -6.0) t_0))))
double code(double x1, double x2) {
double t_0 = x1 * fma(9.0, x1, -1.0);
double tmp;
if (x1 <= -1.75e-48) {
tmp = t_0;
} else if (x1 <= 5.6e-86) {
tmp = x2 * -6.0;
} else {
tmp = t_0;
}
return tmp;
}
function code(x1, x2) t_0 = Float64(x1 * fma(9.0, x1, -1.0)) tmp = 0.0 if (x1 <= -1.75e-48) tmp = t_0; elseif (x1 <= 5.6e-86) tmp = Float64(x2 * -6.0); else tmp = t_0; end return tmp end
code[x1_, x2_] := Block[{t$95$0 = N[(x1 * N[(9.0 * x1 + -1.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x1, -1.75e-48], t$95$0, If[LessEqual[x1, 5.6e-86], N[(x2 * -6.0), $MachinePrecision], t$95$0]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x1 \cdot \mathsf{fma}\left(9, x1, -1\right)\\
\mathbf{if}\;x1 \leq -1.75 \cdot 10^{-48}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;x1 \leq 5.6 \cdot 10^{-86}:\\
\;\;\;\;x2 \cdot -6\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
if x1 < -1.74999999999999996e-48 or 5.60000000000000019e-86 < x1 Initial program 50.3%
Taylor expanded in x1 around 0
*-commutativeN/A
lower-*.f643.8
Applied rewrites3.8%
Taylor expanded in x1 around 0
Applied rewrites62.8%
Taylor expanded in x2 around 0
Applied rewrites54.1%
if -1.74999999999999996e-48 < x1 < 5.60000000000000019e-86Initial program 99.5%
Taylor expanded in x1 around 0
*-commutativeN/A
lower-*.f6462.4
Applied rewrites62.4%
Taylor expanded in x1 around 0
*-commutativeN/A
lower-*.f6462.8
Applied rewrites62.8%
(FPCore (x1 x2) :precision binary64 (- x1))
double code(double x1, double x2) {
return -x1;
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
code = -x1
end function
public static double code(double x1, double x2) {
return -x1;
}
def code(x1, x2): return -x1
function code(x1, x2) return Float64(-x1) end
function tmp = code(x1, x2) tmp = -x1; end
code[x1_, x2_] := (-x1)
\begin{array}{l}
\\
-x1
\end{array}
Initial program 69.5%
Taylor expanded in x1 around 0
*-commutativeN/A
lower-*.f6426.7
Applied rewrites26.7%
Taylor expanded in x1 around 0
Applied rewrites70.2%
Taylor expanded in x2 around 0
Applied rewrites41.1%
Taylor expanded in x1 around 0
Applied rewrites15.1%
herbie shell --seed 2024219
(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))))))