
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (* (* 3.0 x1) x1))
(t_1 (+ (* x1 x1) 1.0))
(t_2 (/ (- (+ t_0 (* 2.0 x2)) x1) t_1)))
(+
x1
(+
(+
(+
(+
(*
(+
(* (* (* 2.0 x1) t_2) (- t_2 3.0))
(* (* x1 x1) (- (* 4.0 t_2) 6.0)))
t_1)
(* t_0 t_2))
(* (* x1 x1) x1))
x1)
(* 3.0 (/ (- (- t_0 (* 2.0 x2)) x1) t_1))))))
double code(double x1, double x2) {
double t_0 = (3.0 * x1) * x1;
double t_1 = (x1 * x1) + 1.0;
double t_2 = ((t_0 + (2.0 * x2)) - x1) / t_1;
return x1 + (((((((((2.0 * x1) * t_2) * (t_2 - 3.0)) + ((x1 * x1) * ((4.0 * t_2) - 6.0))) * t_1) + (t_0 * t_2)) + ((x1 * x1) * x1)) + x1) + (3.0 * (((t_0 - (2.0 * x2)) - x1) / t_1)));
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
real(8) :: t_0
real(8) :: t_1
real(8) :: t_2
t_0 = (3.0d0 * x1) * x1
t_1 = (x1 * x1) + 1.0d0
t_2 = ((t_0 + (2.0d0 * x2)) - x1) / t_1
code = x1 + (((((((((2.0d0 * x1) * t_2) * (t_2 - 3.0d0)) + ((x1 * x1) * ((4.0d0 * t_2) - 6.0d0))) * t_1) + (t_0 * t_2)) + ((x1 * x1) * x1)) + x1) + (3.0d0 * (((t_0 - (2.0d0 * x2)) - x1) / t_1)))
end function
public static double code(double x1, double x2) {
double t_0 = (3.0 * x1) * x1;
double t_1 = (x1 * x1) + 1.0;
double t_2 = ((t_0 + (2.0 * x2)) - x1) / t_1;
return x1 + (((((((((2.0 * x1) * t_2) * (t_2 - 3.0)) + ((x1 * x1) * ((4.0 * t_2) - 6.0))) * t_1) + (t_0 * t_2)) + ((x1 * x1) * x1)) + x1) + (3.0 * (((t_0 - (2.0 * x2)) - x1) / t_1)));
}
def code(x1, x2): t_0 = (3.0 * x1) * x1 t_1 = (x1 * x1) + 1.0 t_2 = ((t_0 + (2.0 * x2)) - x1) / t_1 return x1 + (((((((((2.0 * x1) * t_2) * (t_2 - 3.0)) + ((x1 * x1) * ((4.0 * t_2) - 6.0))) * t_1) + (t_0 * t_2)) + ((x1 * x1) * x1)) + x1) + (3.0 * (((t_0 - (2.0 * x2)) - x1) / t_1)))
function code(x1, x2) t_0 = Float64(Float64(3.0 * x1) * x1) t_1 = Float64(Float64(x1 * x1) + 1.0) t_2 = Float64(Float64(Float64(t_0 + Float64(2.0 * x2)) - x1) / t_1) return Float64(x1 + Float64(Float64(Float64(Float64(Float64(Float64(Float64(Float64(Float64(2.0 * x1) * t_2) * Float64(t_2 - 3.0)) + Float64(Float64(x1 * x1) * Float64(Float64(4.0 * t_2) - 6.0))) * t_1) + Float64(t_0 * t_2)) + Float64(Float64(x1 * x1) * x1)) + x1) + Float64(3.0 * Float64(Float64(Float64(t_0 - Float64(2.0 * x2)) - x1) / t_1)))) end
function tmp = code(x1, x2) t_0 = (3.0 * x1) * x1; t_1 = (x1 * x1) + 1.0; t_2 = ((t_0 + (2.0 * x2)) - x1) / t_1; tmp = x1 + (((((((((2.0 * x1) * t_2) * (t_2 - 3.0)) + ((x1 * x1) * ((4.0 * t_2) - 6.0))) * t_1) + (t_0 * t_2)) + ((x1 * x1) * x1)) + x1) + (3.0 * (((t_0 - (2.0 * x2)) - x1) / t_1))); end
code[x1_, x2_] := Block[{t$95$0 = N[(N[(3.0 * x1), $MachinePrecision] * x1), $MachinePrecision]}, Block[{t$95$1 = N[(N[(x1 * x1), $MachinePrecision] + 1.0), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[(t$95$0 + N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$1), $MachinePrecision]}, N[(x1 + N[(N[(N[(N[(N[(N[(N[(N[(N[(2.0 * x1), $MachinePrecision] * t$95$2), $MachinePrecision] * N[(t$95$2 - 3.0), $MachinePrecision]), $MachinePrecision] + N[(N[(x1 * x1), $MachinePrecision] * N[(N[(4.0 * t$95$2), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * t$95$1), $MachinePrecision] + N[(t$95$0 * t$95$2), $MachinePrecision]), $MachinePrecision] + N[(N[(x1 * x1), $MachinePrecision] * x1), $MachinePrecision]), $MachinePrecision] + x1), $MachinePrecision] + N[(3.0 * N[(N[(N[(t$95$0 - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \left(3 \cdot x1\right) \cdot x1\\
t_1 := x1 \cdot x1 + 1\\
t_2 := \frac{\left(t\_0 + 2 \cdot x2\right) - x1}{t\_1}\\
x1 + \left(\left(\left(\left(\left(\left(\left(2 \cdot x1\right) \cdot t\_2\right) \cdot \left(t\_2 - 3\right) + \left(x1 \cdot x1\right) \cdot \left(4 \cdot t\_2 - 6\right)\right) \cdot t\_1 + t\_0 \cdot t\_2\right) + \left(x1 \cdot x1\right) \cdot x1\right) + x1\right) + 3 \cdot \frac{\left(t\_0 - 2 \cdot x2\right) - x1}{t\_1}\right)
\end{array}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 24 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (* (* 3.0 x1) x1))
(t_1 (+ (* x1 x1) 1.0))
(t_2 (/ (- (+ t_0 (* 2.0 x2)) x1) t_1)))
(+
x1
(+
(+
(+
(+
(*
(+
(* (* (* 2.0 x1) t_2) (- t_2 3.0))
(* (* x1 x1) (- (* 4.0 t_2) 6.0)))
t_1)
(* t_0 t_2))
(* (* x1 x1) x1))
x1)
(* 3.0 (/ (- (- t_0 (* 2.0 x2)) x1) t_1))))))
double code(double x1, double x2) {
double t_0 = (3.0 * x1) * x1;
double t_1 = (x1 * x1) + 1.0;
double t_2 = ((t_0 + (2.0 * x2)) - x1) / t_1;
return x1 + (((((((((2.0 * x1) * t_2) * (t_2 - 3.0)) + ((x1 * x1) * ((4.0 * t_2) - 6.0))) * t_1) + (t_0 * t_2)) + ((x1 * x1) * x1)) + x1) + (3.0 * (((t_0 - (2.0 * x2)) - x1) / t_1)));
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
real(8) :: t_0
real(8) :: t_1
real(8) :: t_2
t_0 = (3.0d0 * x1) * x1
t_1 = (x1 * x1) + 1.0d0
t_2 = ((t_0 + (2.0d0 * x2)) - x1) / t_1
code = x1 + (((((((((2.0d0 * x1) * t_2) * (t_2 - 3.0d0)) + ((x1 * x1) * ((4.0d0 * t_2) - 6.0d0))) * t_1) + (t_0 * t_2)) + ((x1 * x1) * x1)) + x1) + (3.0d0 * (((t_0 - (2.0d0 * x2)) - x1) / t_1)))
end function
public static double code(double x1, double x2) {
double t_0 = (3.0 * x1) * x1;
double t_1 = (x1 * x1) + 1.0;
double t_2 = ((t_0 + (2.0 * x2)) - x1) / t_1;
return x1 + (((((((((2.0 * x1) * t_2) * (t_2 - 3.0)) + ((x1 * x1) * ((4.0 * t_2) - 6.0))) * t_1) + (t_0 * t_2)) + ((x1 * x1) * x1)) + x1) + (3.0 * (((t_0 - (2.0 * x2)) - x1) / t_1)));
}
def code(x1, x2): t_0 = (3.0 * x1) * x1 t_1 = (x1 * x1) + 1.0 t_2 = ((t_0 + (2.0 * x2)) - x1) / t_1 return x1 + (((((((((2.0 * x1) * t_2) * (t_2 - 3.0)) + ((x1 * x1) * ((4.0 * t_2) - 6.0))) * t_1) + (t_0 * t_2)) + ((x1 * x1) * x1)) + x1) + (3.0 * (((t_0 - (2.0 * x2)) - x1) / t_1)))
function code(x1, x2) t_0 = Float64(Float64(3.0 * x1) * x1) t_1 = Float64(Float64(x1 * x1) + 1.0) t_2 = Float64(Float64(Float64(t_0 + Float64(2.0 * x2)) - x1) / t_1) return Float64(x1 + Float64(Float64(Float64(Float64(Float64(Float64(Float64(Float64(Float64(2.0 * x1) * t_2) * Float64(t_2 - 3.0)) + Float64(Float64(x1 * x1) * Float64(Float64(4.0 * t_2) - 6.0))) * t_1) + Float64(t_0 * t_2)) + Float64(Float64(x1 * x1) * x1)) + x1) + Float64(3.0 * Float64(Float64(Float64(t_0 - Float64(2.0 * x2)) - x1) / t_1)))) end
function tmp = code(x1, x2) t_0 = (3.0 * x1) * x1; t_1 = (x1 * x1) + 1.0; t_2 = ((t_0 + (2.0 * x2)) - x1) / t_1; tmp = x1 + (((((((((2.0 * x1) * t_2) * (t_2 - 3.0)) + ((x1 * x1) * ((4.0 * t_2) - 6.0))) * t_1) + (t_0 * t_2)) + ((x1 * x1) * x1)) + x1) + (3.0 * (((t_0 - (2.0 * x2)) - x1) / t_1))); end
code[x1_, x2_] := Block[{t$95$0 = N[(N[(3.0 * x1), $MachinePrecision] * x1), $MachinePrecision]}, Block[{t$95$1 = N[(N[(x1 * x1), $MachinePrecision] + 1.0), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[(t$95$0 + N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$1), $MachinePrecision]}, N[(x1 + N[(N[(N[(N[(N[(N[(N[(N[(N[(2.0 * x1), $MachinePrecision] * t$95$2), $MachinePrecision] * N[(t$95$2 - 3.0), $MachinePrecision]), $MachinePrecision] + N[(N[(x1 * x1), $MachinePrecision] * N[(N[(4.0 * t$95$2), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * t$95$1), $MachinePrecision] + N[(t$95$0 * t$95$2), $MachinePrecision]), $MachinePrecision] + N[(N[(x1 * x1), $MachinePrecision] * x1), $MachinePrecision]), $MachinePrecision] + x1), $MachinePrecision] + N[(3.0 * N[(N[(N[(t$95$0 - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \left(3 \cdot x1\right) \cdot x1\\
t_1 := x1 \cdot x1 + 1\\
t_2 := \frac{\left(t\_0 + 2 \cdot x2\right) - x1}{t\_1}\\
x1 + \left(\left(\left(\left(\left(\left(\left(2 \cdot x1\right) \cdot t\_2\right) \cdot \left(t\_2 - 3\right) + \left(x1 \cdot x1\right) \cdot \left(4 \cdot t\_2 - 6\right)\right) \cdot t\_1 + t\_0 \cdot t\_2\right) + \left(x1 \cdot x1\right) \cdot x1\right) + x1\right) + 3 \cdot \frac{\left(t\_0 - 2 \cdot x2\right) - x1}{t\_1}\right)
\end{array}
\end{array}
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (* x1 (* x1 3.0)))
(t_1 (+ (* x1 x1) 1.0))
(t_2 (/ (- (+ t_0 (* 2.0 x2)) x1) t_1))
(t_3
(+
x1
(+
(+
x1
(+
(+
(*
t_1
(+
(* (* (* x1 2.0) t_2) (- t_2 3.0))
(* (* x1 x1) (- (* t_2 4.0) 6.0))))
(* t_0 t_2))
(* x1 (* x1 x1))))
(* 3.0 (/ (- (- t_0 (* 2.0 x2)) x1) t_1))))))
(if (<= t_3 INFINITY)
t_3
(*
x1
(fma
x1
(fma x1 (fma x1 6.0 -3.0) (fma 4.0 (fma x2 2.0 -3.0) 9.0))
1.0)))))
double code(double x1, double x2) {
double t_0 = x1 * (x1 * 3.0);
double t_1 = (x1 * x1) + 1.0;
double t_2 = ((t_0 + (2.0 * x2)) - x1) / t_1;
double t_3 = x1 + ((x1 + (((t_1 * ((((x1 * 2.0) * t_2) * (t_2 - 3.0)) + ((x1 * x1) * ((t_2 * 4.0) - 6.0)))) + (t_0 * t_2)) + (x1 * (x1 * x1)))) + (3.0 * (((t_0 - (2.0 * x2)) - x1) / t_1)));
double tmp;
if (t_3 <= ((double) INFINITY)) {
tmp = t_3;
} else {
tmp = x1 * fma(x1, fma(x1, fma(x1, 6.0, -3.0), fma(4.0, fma(x2, 2.0, -3.0), 9.0)), 1.0);
}
return tmp;
}
function code(x1, x2) t_0 = Float64(x1 * Float64(x1 * 3.0)) t_1 = Float64(Float64(x1 * x1) + 1.0) t_2 = Float64(Float64(Float64(t_0 + Float64(2.0 * x2)) - x1) / t_1) t_3 = Float64(x1 + Float64(Float64(x1 + Float64(Float64(Float64(t_1 * Float64(Float64(Float64(Float64(x1 * 2.0) * t_2) * Float64(t_2 - 3.0)) + Float64(Float64(x1 * x1) * Float64(Float64(t_2 * 4.0) - 6.0)))) + Float64(t_0 * t_2)) + Float64(x1 * Float64(x1 * x1)))) + Float64(3.0 * Float64(Float64(Float64(t_0 - Float64(2.0 * x2)) - x1) / t_1)))) tmp = 0.0 if (t_3 <= Inf) tmp = t_3; else tmp = Float64(x1 * fma(x1, fma(x1, fma(x1, 6.0, -3.0), fma(4.0, fma(x2, 2.0, -3.0), 9.0)), 1.0)); end return tmp end
code[x1_, x2_] := Block[{t$95$0 = N[(x1 * N[(x1 * 3.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(N[(x1 * x1), $MachinePrecision] + 1.0), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[(t$95$0 + N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$1), $MachinePrecision]}, Block[{t$95$3 = N[(x1 + N[(N[(x1 + N[(N[(N[(t$95$1 * N[(N[(N[(N[(x1 * 2.0), $MachinePrecision] * t$95$2), $MachinePrecision] * N[(t$95$2 - 3.0), $MachinePrecision]), $MachinePrecision] + N[(N[(x1 * x1), $MachinePrecision] * N[(N[(t$95$2 * 4.0), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(t$95$0 * t$95$2), $MachinePrecision]), $MachinePrecision] + N[(x1 * N[(x1 * x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(3.0 * N[(N[(N[(t$95$0 - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$3, Infinity], t$95$3, N[(x1 * N[(x1 * N[(x1 * N[(x1 * 6.0 + -3.0), $MachinePrecision] + N[(4.0 * N[(x2 * 2.0 + -3.0), $MachinePrecision] + 9.0), $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x1 \cdot \left(x1 \cdot 3\right)\\
t_1 := x1 \cdot x1 + 1\\
t_2 := \frac{\left(t\_0 + 2 \cdot x2\right) - x1}{t\_1}\\
t_3 := x1 + \left(\left(x1 + \left(\left(t\_1 \cdot \left(\left(\left(x1 \cdot 2\right) \cdot t\_2\right) \cdot \left(t\_2 - 3\right) + \left(x1 \cdot x1\right) \cdot \left(t\_2 \cdot 4 - 6\right)\right) + t\_0 \cdot t\_2\right) + x1 \cdot \left(x1 \cdot x1\right)\right)\right) + 3 \cdot \frac{\left(t\_0 - 2 \cdot x2\right) - x1}{t\_1}\right)\\
\mathbf{if}\;t\_3 \leq \infty:\\
\;\;\;\;t\_3\\
\mathbf{else}:\\
\;\;\;\;x1 \cdot \mathsf{fma}\left(x1, \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), 1\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.5%
if +inf.0 < (+.f64 x1 (+.f64 (+.f64 (+.f64 (+.f64 (*.f64 (+.f64 (*.f64 (*.f64 (*.f64 #s(literal 2 binary64) x1) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64)))) (-.f64 (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))) #s(literal 3 binary64))) (*.f64 (*.f64 x1 x1) (-.f64 (*.f64 #s(literal 4 binary64) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64)))) #s(literal 6 binary64)))) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))) (*.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))))) (*.f64 (*.f64 x1 x1) x1)) x1) (*.f64 #s(literal 3 binary64) (/.f64 (-.f64 (-.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64)))))) Initial program 0.0%
Taylor expanded in x1 around -inf
*-lowering-*.f64N/A
pow-lowering-pow.f64N/A
mul-1-negN/A
unsub-negN/A
--lowering--.f64N/A
/-lowering-/.f64N/A
Simplified100.0%
Taylor expanded in x1 around 0
*-lowering-*.f64N/A
+-commutativeN/A
accelerator-lowering-fma.f64N/A
associate-+r+N/A
+-commutativeN/A
accelerator-lowering-fma.f64N/A
sub-negN/A
*-commutativeN/A
metadata-evalN/A
accelerator-lowering-fma.f64N/A
+-commutativeN/A
accelerator-lowering-fma.f64N/A
sub-negN/A
metadata-evalN/A
*-commutativeN/A
accelerator-lowering-fma.f64100.0
Simplified100.0%
Final simplification99.7%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (* x1 (* x1 3.0)))
(t_1 (fma (* x2 (* x1 8.0)) x2 x1))
(t_2 (+ (* x1 x1) 1.0))
(t_3 (/ (- (+ t_0 (* 2.0 x2)) x1) t_2))
(t_4
(+
x1
(+
(+
x1
(+
(+
(*
t_2
(+
(* (* (* x1 2.0) t_3) (- t_3 3.0))
(* (* x1 x1) (- (* t_3 4.0) 6.0))))
(* t_0 t_3))
(* x1 (* x1 x1))))
(* 3.0 (/ (- (- t_0 (* 2.0 x2)) x1) t_2))))))
(if (<= t_4 -5e+271)
t_1
(if (<= t_4 4e+279)
(+ x1 (fma x1 (fma x2 -12.0 -2.0) (* x2 -6.0)))
(if (<= t_4 INFINITY) t_1 (+ x1 (* x2 (* x1 (* x1 8.0)))))))))
double code(double x1, double x2) {
double t_0 = x1 * (x1 * 3.0);
double t_1 = fma((x2 * (x1 * 8.0)), x2, x1);
double t_2 = (x1 * x1) + 1.0;
double t_3 = ((t_0 + (2.0 * x2)) - x1) / t_2;
double t_4 = x1 + ((x1 + (((t_2 * ((((x1 * 2.0) * t_3) * (t_3 - 3.0)) + ((x1 * x1) * ((t_3 * 4.0) - 6.0)))) + (t_0 * t_3)) + (x1 * (x1 * x1)))) + (3.0 * (((t_0 - (2.0 * x2)) - x1) / t_2)));
double tmp;
if (t_4 <= -5e+271) {
tmp = t_1;
} else if (t_4 <= 4e+279) {
tmp = x1 + fma(x1, fma(x2, -12.0, -2.0), (x2 * -6.0));
} else if (t_4 <= ((double) INFINITY)) {
tmp = t_1;
} else {
tmp = x1 + (x2 * (x1 * (x1 * 8.0)));
}
return tmp;
}
function code(x1, x2) t_0 = Float64(x1 * Float64(x1 * 3.0)) t_1 = fma(Float64(x2 * Float64(x1 * 8.0)), x2, x1) t_2 = Float64(Float64(x1 * x1) + 1.0) t_3 = Float64(Float64(Float64(t_0 + Float64(2.0 * x2)) - x1) / t_2) t_4 = Float64(x1 + Float64(Float64(x1 + Float64(Float64(Float64(t_2 * Float64(Float64(Float64(Float64(x1 * 2.0) * t_3) * Float64(t_3 - 3.0)) + Float64(Float64(x1 * x1) * Float64(Float64(t_3 * 4.0) - 6.0)))) + Float64(t_0 * t_3)) + Float64(x1 * Float64(x1 * x1)))) + Float64(3.0 * Float64(Float64(Float64(t_0 - Float64(2.0 * x2)) - x1) / t_2)))) tmp = 0.0 if (t_4 <= -5e+271) tmp = t_1; elseif (t_4 <= 4e+279) tmp = Float64(x1 + fma(x1, fma(x2, -12.0, -2.0), Float64(x2 * -6.0))); elseif (t_4 <= Inf) tmp = t_1; else tmp = Float64(x1 + Float64(x2 * Float64(x1 * Float64(x1 * 8.0)))); end return tmp end
code[x1_, x2_] := Block[{t$95$0 = N[(x1 * N[(x1 * 3.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(N[(x2 * N[(x1 * 8.0), $MachinePrecision]), $MachinePrecision] * x2 + x1), $MachinePrecision]}, Block[{t$95$2 = N[(N[(x1 * x1), $MachinePrecision] + 1.0), $MachinePrecision]}, Block[{t$95$3 = N[(N[(N[(t$95$0 + N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$2), $MachinePrecision]}, Block[{t$95$4 = N[(x1 + N[(N[(x1 + N[(N[(N[(t$95$2 * N[(N[(N[(N[(x1 * 2.0), $MachinePrecision] * t$95$3), $MachinePrecision] * N[(t$95$3 - 3.0), $MachinePrecision]), $MachinePrecision] + N[(N[(x1 * x1), $MachinePrecision] * N[(N[(t$95$3 * 4.0), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(t$95$0 * t$95$3), $MachinePrecision]), $MachinePrecision] + N[(x1 * N[(x1 * x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(3.0 * N[(N[(N[(t$95$0 - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$4, -5e+271], t$95$1, If[LessEqual[t$95$4, 4e+279], N[(x1 + N[(x1 * N[(x2 * -12.0 + -2.0), $MachinePrecision] + N[(x2 * -6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$4, Infinity], t$95$1, N[(x1 + N[(x2 * N[(x1 * N[(x1 * 8.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x1 \cdot \left(x1 \cdot 3\right)\\
t_1 := \mathsf{fma}\left(x2 \cdot \left(x1 \cdot 8\right), x2, x1\right)\\
t_2 := x1 \cdot x1 + 1\\
t_3 := \frac{\left(t\_0 + 2 \cdot x2\right) - x1}{t\_2}\\
t_4 := x1 + \left(\left(x1 + \left(\left(t\_2 \cdot \left(\left(\left(x1 \cdot 2\right) \cdot t\_3\right) \cdot \left(t\_3 - 3\right) + \left(x1 \cdot x1\right) \cdot \left(t\_3 \cdot 4 - 6\right)\right) + t\_0 \cdot t\_3\right) + x1 \cdot \left(x1 \cdot x1\right)\right)\right) + 3 \cdot \frac{\left(t\_0 - 2 \cdot x2\right) - x1}{t\_2}\right)\\
\mathbf{if}\;t\_4 \leq -5 \cdot 10^{+271}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t\_4 \leq 4 \cdot 10^{+279}:\\
\;\;\;\;x1 + \mathsf{fma}\left(x1, \mathsf{fma}\left(x2, -12, -2\right), x2 \cdot -6\right)\\
\mathbf{elif}\;t\_4 \leq \infty:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;x1 + x2 \cdot \left(x1 \cdot \left(x1 \cdot 8\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.0000000000000003e271 or 4.00000000000000023e279 < (+.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
accelerator-lowering-fma.f64N/A
sub-negN/A
*-commutativeN/A
associate-*l*N/A
*-commutativeN/A
metadata-evalN/A
accelerator-lowering-fma.f64N/A
sub-negN/A
distribute-lft-inN/A
accelerator-lowering-fma.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
metadata-evalN/A
metadata-evalN/A
*-commutativeN/A
*-lowering-*.f6453.8
Simplified53.8%
Taylor expanded in x2 around inf
*-lowering-*.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6454.3
Simplified54.3%
+-commutativeN/A
associate-*r*N/A
associate-*r*N/A
accelerator-lowering-fma.f64N/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f6457.7
Applied egg-rr57.7%
if -5.0000000000000003e271 < (+.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.00000000000000023e279Initial program 99.4%
Taylor expanded in x1 around 0
+-commutativeN/A
accelerator-lowering-fma.f64N/A
sub-negN/A
*-commutativeN/A
associate-*l*N/A
*-commutativeN/A
metadata-evalN/A
accelerator-lowering-fma.f64N/A
sub-negN/A
distribute-lft-inN/A
accelerator-lowering-fma.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
metadata-evalN/A
metadata-evalN/A
*-commutativeN/A
*-lowering-*.f6473.1
Simplified73.1%
Taylor expanded in x2 around 0
Simplified79.3%
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 x2 around inf
Simplified6.8%
Taylor expanded in x1 around inf
associate-*r/N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6435.8
Simplified35.8%
Taylor expanded in x2 around 0
*-commutativeN/A
unpow2N/A
associate-*l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f6433.0
Simplified33.0%
Final simplification61.5%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (* x1 (* x1 3.0)))
(t_1 (fma (* x2 (* x1 8.0)) x2 x1))
(t_2 (+ (* x1 x1) 1.0))
(t_3 (/ (- (+ t_0 (* 2.0 x2)) x1) t_2))
(t_4
(+
x1
(+
(+
x1
(+
(+
(*
t_2
(+
(* (* (* x1 2.0) t_3) (- t_3 3.0))
(* (* x1 x1) (- (* t_3 4.0) 6.0))))
(* t_0 t_3))
(* x1 (* x1 x1))))
(* 3.0 (/ (- (- t_0 (* 2.0 x2)) x1) t_2))))))
(if (<= t_4 -5e+271)
t_1
(if (<= t_4 1e+273)
(fma x2 (fma x1 -12.0 -6.0) (- 0.0 x1))
(if (<= t_4 INFINITY) t_1 (+ x1 (* x2 (* x1 (* x1 8.0)))))))))
double code(double x1, double x2) {
double t_0 = x1 * (x1 * 3.0);
double t_1 = fma((x2 * (x1 * 8.0)), x2, x1);
double t_2 = (x1 * x1) + 1.0;
double t_3 = ((t_0 + (2.0 * x2)) - x1) / t_2;
double t_4 = x1 + ((x1 + (((t_2 * ((((x1 * 2.0) * t_3) * (t_3 - 3.0)) + ((x1 * x1) * ((t_3 * 4.0) - 6.0)))) + (t_0 * t_3)) + (x1 * (x1 * x1)))) + (3.0 * (((t_0 - (2.0 * x2)) - x1) / t_2)));
double tmp;
if (t_4 <= -5e+271) {
tmp = t_1;
} else if (t_4 <= 1e+273) {
tmp = fma(x2, fma(x1, -12.0, -6.0), (0.0 - x1));
} else if (t_4 <= ((double) INFINITY)) {
tmp = t_1;
} else {
tmp = x1 + (x2 * (x1 * (x1 * 8.0)));
}
return tmp;
}
function code(x1, x2) t_0 = Float64(x1 * Float64(x1 * 3.0)) t_1 = fma(Float64(x2 * Float64(x1 * 8.0)), x2, x1) t_2 = Float64(Float64(x1 * x1) + 1.0) t_3 = Float64(Float64(Float64(t_0 + Float64(2.0 * x2)) - x1) / t_2) t_4 = Float64(x1 + Float64(Float64(x1 + Float64(Float64(Float64(t_2 * Float64(Float64(Float64(Float64(x1 * 2.0) * t_3) * Float64(t_3 - 3.0)) + Float64(Float64(x1 * x1) * Float64(Float64(t_3 * 4.0) - 6.0)))) + Float64(t_0 * t_3)) + Float64(x1 * Float64(x1 * x1)))) + Float64(3.0 * Float64(Float64(Float64(t_0 - Float64(2.0 * x2)) - x1) / t_2)))) tmp = 0.0 if (t_4 <= -5e+271) tmp = t_1; elseif (t_4 <= 1e+273) tmp = fma(x2, fma(x1, -12.0, -6.0), Float64(0.0 - x1)); elseif (t_4 <= Inf) tmp = t_1; else tmp = Float64(x1 + Float64(x2 * Float64(x1 * Float64(x1 * 8.0)))); end return tmp end
code[x1_, x2_] := Block[{t$95$0 = N[(x1 * N[(x1 * 3.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(N[(x2 * N[(x1 * 8.0), $MachinePrecision]), $MachinePrecision] * x2 + x1), $MachinePrecision]}, Block[{t$95$2 = N[(N[(x1 * x1), $MachinePrecision] + 1.0), $MachinePrecision]}, Block[{t$95$3 = N[(N[(N[(t$95$0 + N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$2), $MachinePrecision]}, Block[{t$95$4 = N[(x1 + N[(N[(x1 + N[(N[(N[(t$95$2 * N[(N[(N[(N[(x1 * 2.0), $MachinePrecision] * t$95$3), $MachinePrecision] * N[(t$95$3 - 3.0), $MachinePrecision]), $MachinePrecision] + N[(N[(x1 * x1), $MachinePrecision] * N[(N[(t$95$3 * 4.0), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(t$95$0 * t$95$3), $MachinePrecision]), $MachinePrecision] + N[(x1 * N[(x1 * x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(3.0 * N[(N[(N[(t$95$0 - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$4, -5e+271], t$95$1, If[LessEqual[t$95$4, 1e+273], N[(x2 * N[(x1 * -12.0 + -6.0), $MachinePrecision] + N[(0.0 - x1), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$4, Infinity], t$95$1, N[(x1 + N[(x2 * N[(x1 * N[(x1 * 8.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x1 \cdot \left(x1 \cdot 3\right)\\
t_1 := \mathsf{fma}\left(x2 \cdot \left(x1 \cdot 8\right), x2, x1\right)\\
t_2 := x1 \cdot x1 + 1\\
t_3 := \frac{\left(t\_0 + 2 \cdot x2\right) - x1}{t\_2}\\
t_4 := x1 + \left(\left(x1 + \left(\left(t\_2 \cdot \left(\left(\left(x1 \cdot 2\right) \cdot t\_3\right) \cdot \left(t\_3 - 3\right) + \left(x1 \cdot x1\right) \cdot \left(t\_3 \cdot 4 - 6\right)\right) + t\_0 \cdot t\_3\right) + x1 \cdot \left(x1 \cdot x1\right)\right)\right) + 3 \cdot \frac{\left(t\_0 - 2 \cdot x2\right) - x1}{t\_2}\right)\\
\mathbf{if}\;t\_4 \leq -5 \cdot 10^{+271}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t\_4 \leq 10^{+273}:\\
\;\;\;\;\mathsf{fma}\left(x2, \mathsf{fma}\left(x1, -12, -6\right), 0 - x1\right)\\
\mathbf{elif}\;t\_4 \leq \infty:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;x1 + x2 \cdot \left(x1 \cdot \left(x1 \cdot 8\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.0000000000000003e271 or 9.99999999999999945e272 < (+.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
accelerator-lowering-fma.f64N/A
sub-negN/A
*-commutativeN/A
associate-*l*N/A
*-commutativeN/A
metadata-evalN/A
accelerator-lowering-fma.f64N/A
sub-negN/A
distribute-lft-inN/A
accelerator-lowering-fma.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
metadata-evalN/A
metadata-evalN/A
*-commutativeN/A
*-lowering-*.f6452.0
Simplified52.0%
Taylor expanded in x2 around inf
*-lowering-*.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6452.5
Simplified52.5%
+-commutativeN/A
associate-*r*N/A
associate-*r*N/A
accelerator-lowering-fma.f64N/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f6457.4
Applied egg-rr57.4%
if -5.0000000000000003e271 < (+.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)))))) < 9.99999999999999945e272Initial program 99.4%
Taylor expanded in x1 around 0
+-commutativeN/A
accelerator-lowering-fma.f64N/A
sub-negN/A
*-commutativeN/A
associate-*l*N/A
*-commutativeN/A
metadata-evalN/A
accelerator-lowering-fma.f64N/A
sub-negN/A
distribute-lft-inN/A
accelerator-lowering-fma.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
metadata-evalN/A
metadata-evalN/A
*-commutativeN/A
*-lowering-*.f6474.2
Simplified74.2%
Taylor expanded in x2 around 0
+-commutativeN/A
+-commutativeN/A
associate-+l+N/A
distribute-lft1-inN/A
metadata-evalN/A
accelerator-lowering-fma.f64N/A
sub-negN/A
*-commutativeN/A
metadata-evalN/A
accelerator-lowering-fma.f64N/A
mul-1-negN/A
neg-sub0N/A
--lowering--.f6479.7
Simplified79.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 x2 around inf
Simplified6.8%
Taylor expanded in x1 around inf
associate-*r/N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6435.8
Simplified35.8%
Taylor expanded in x2 around 0
*-commutativeN/A
unpow2N/A
associate-*l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f6433.0
Simplified33.0%
Final simplification61.5%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (* x1 (* x1 3.0)))
(t_1 (fma (* x2 (* x1 8.0)) x2 x1))
(t_2 (+ (* x1 x1) 1.0))
(t_3 (/ (- (+ t_0 (* 2.0 x2)) x1) t_2))
(t_4
(+
x1
(+
(+
x1
(+
(+
(*
t_2
(+
(* (* (* x1 2.0) t_3) (- t_3 3.0))
(* (* x1 x1) (- (* t_3 4.0) 6.0))))
(* t_0 t_3))
(* x1 (* x1 x1))))
(* 3.0 (/ (- (- t_0 (* 2.0 x2)) x1) t_2))))))
(if (<= t_4 -5e+271)
t_1
(if (<= t_4 1e+273) (fma x2 (fma x1 -12.0 -6.0) (- 0.0 x1)) t_1))))
double code(double x1, double x2) {
double t_0 = x1 * (x1 * 3.0);
double t_1 = fma((x2 * (x1 * 8.0)), x2, x1);
double t_2 = (x1 * x1) + 1.0;
double t_3 = ((t_0 + (2.0 * x2)) - x1) / t_2;
double t_4 = x1 + ((x1 + (((t_2 * ((((x1 * 2.0) * t_3) * (t_3 - 3.0)) + ((x1 * x1) * ((t_3 * 4.0) - 6.0)))) + (t_0 * t_3)) + (x1 * (x1 * x1)))) + (3.0 * (((t_0 - (2.0 * x2)) - x1) / t_2)));
double tmp;
if (t_4 <= -5e+271) {
tmp = t_1;
} else if (t_4 <= 1e+273) {
tmp = fma(x2, fma(x1, -12.0, -6.0), (0.0 - x1));
} else {
tmp = t_1;
}
return tmp;
}
function code(x1, x2) t_0 = Float64(x1 * Float64(x1 * 3.0)) t_1 = fma(Float64(x2 * Float64(x1 * 8.0)), x2, x1) t_2 = Float64(Float64(x1 * x1) + 1.0) t_3 = Float64(Float64(Float64(t_0 + Float64(2.0 * x2)) - x1) / t_2) t_4 = Float64(x1 + Float64(Float64(x1 + Float64(Float64(Float64(t_2 * Float64(Float64(Float64(Float64(x1 * 2.0) * t_3) * Float64(t_3 - 3.0)) + Float64(Float64(x1 * x1) * Float64(Float64(t_3 * 4.0) - 6.0)))) + Float64(t_0 * t_3)) + Float64(x1 * Float64(x1 * x1)))) + Float64(3.0 * Float64(Float64(Float64(t_0 - Float64(2.0 * x2)) - x1) / t_2)))) tmp = 0.0 if (t_4 <= -5e+271) tmp = t_1; elseif (t_4 <= 1e+273) tmp = fma(x2, fma(x1, -12.0, -6.0), Float64(0.0 - x1)); else tmp = t_1; end return tmp end
code[x1_, x2_] := Block[{t$95$0 = N[(x1 * N[(x1 * 3.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(N[(x2 * N[(x1 * 8.0), $MachinePrecision]), $MachinePrecision] * x2 + x1), $MachinePrecision]}, Block[{t$95$2 = N[(N[(x1 * x1), $MachinePrecision] + 1.0), $MachinePrecision]}, Block[{t$95$3 = N[(N[(N[(t$95$0 + N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$2), $MachinePrecision]}, Block[{t$95$4 = N[(x1 + N[(N[(x1 + N[(N[(N[(t$95$2 * N[(N[(N[(N[(x1 * 2.0), $MachinePrecision] * t$95$3), $MachinePrecision] * N[(t$95$3 - 3.0), $MachinePrecision]), $MachinePrecision] + N[(N[(x1 * x1), $MachinePrecision] * N[(N[(t$95$3 * 4.0), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(t$95$0 * t$95$3), $MachinePrecision]), $MachinePrecision] + N[(x1 * N[(x1 * x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(3.0 * N[(N[(N[(t$95$0 - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$4, -5e+271], t$95$1, If[LessEqual[t$95$4, 1e+273], N[(x2 * N[(x1 * -12.0 + -6.0), $MachinePrecision] + N[(0.0 - x1), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x1 \cdot \left(x1 \cdot 3\right)\\
t_1 := \mathsf{fma}\left(x2 \cdot \left(x1 \cdot 8\right), x2, x1\right)\\
t_2 := x1 \cdot x1 + 1\\
t_3 := \frac{\left(t\_0 + 2 \cdot x2\right) - x1}{t\_2}\\
t_4 := x1 + \left(\left(x1 + \left(\left(t\_2 \cdot \left(\left(\left(x1 \cdot 2\right) \cdot t\_3\right) \cdot \left(t\_3 - 3\right) + \left(x1 \cdot x1\right) \cdot \left(t\_3 \cdot 4 - 6\right)\right) + t\_0 \cdot t\_3\right) + x1 \cdot \left(x1 \cdot x1\right)\right)\right) + 3 \cdot \frac{\left(t\_0 - 2 \cdot x2\right) - x1}{t\_2}\right)\\
\mathbf{if}\;t\_4 \leq -5 \cdot 10^{+271}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t\_4 \leq 10^{+273}:\\
\;\;\;\;\mathsf{fma}\left(x2, \mathsf{fma}\left(x1, -12, -6\right), 0 - x1\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\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.0000000000000003e271 or 9.99999999999999945e272 < (+.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 43.3%
Taylor expanded in x1 around 0
+-commutativeN/A
accelerator-lowering-fma.f64N/A
sub-negN/A
*-commutativeN/A
associate-*l*N/A
*-commutativeN/A
metadata-evalN/A
accelerator-lowering-fma.f64N/A
sub-negN/A
distribute-lft-inN/A
accelerator-lowering-fma.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
metadata-evalN/A
metadata-evalN/A
*-commutativeN/A
*-lowering-*.f6435.2
Simplified35.2%
Taylor expanded in x2 around inf
*-lowering-*.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6436.4
Simplified36.4%
+-commutativeN/A
associate-*r*N/A
associate-*r*N/A
accelerator-lowering-fma.f64N/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f6438.5
Applied egg-rr38.5%
if -5.0000000000000003e271 < (+.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)))))) < 9.99999999999999945e272Initial program 99.4%
Taylor expanded in x1 around 0
+-commutativeN/A
accelerator-lowering-fma.f64N/A
sub-negN/A
*-commutativeN/A
associate-*l*N/A
*-commutativeN/A
metadata-evalN/A
accelerator-lowering-fma.f64N/A
sub-negN/A
distribute-lft-inN/A
accelerator-lowering-fma.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
metadata-evalN/A
metadata-evalN/A
*-commutativeN/A
*-lowering-*.f6474.2
Simplified74.2%
Taylor expanded in x2 around 0
+-commutativeN/A
+-commutativeN/A
associate-+l+N/A
distribute-lft1-inN/A
metadata-evalN/A
accelerator-lowering-fma.f64N/A
sub-negN/A
*-commutativeN/A
metadata-evalN/A
accelerator-lowering-fma.f64N/A
mul-1-negN/A
neg-sub0N/A
--lowering--.f6479.7
Simplified79.7%
Final simplification59.0%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (* x1 (* x1 3.0)))
(t_1 (* 8.0 (* x1 (* x2 x2))))
(t_2 (+ (* x1 x1) 1.0))
(t_3 (/ (- (+ t_0 (* 2.0 x2)) x1) t_2))
(t_4
(+
x1
(+
(+
x1
(+
(+
(*
t_2
(+
(* (* (* x1 2.0) t_3) (- t_3 3.0))
(* (* x1 x1) (- (* t_3 4.0) 6.0))))
(* t_0 t_3))
(* x1 (* x1 x1))))
(* 3.0 (/ (- (- t_0 (* 2.0 x2)) x1) t_2))))))
(if (<= t_4 -2e+289)
t_1
(if (<= t_4 4e+279) (+ x1 (fma x1 -2.0 (* x2 -6.0))) t_1))))
double code(double x1, double x2) {
double t_0 = x1 * (x1 * 3.0);
double t_1 = 8.0 * (x1 * (x2 * x2));
double t_2 = (x1 * x1) + 1.0;
double t_3 = ((t_0 + (2.0 * x2)) - x1) / t_2;
double t_4 = x1 + ((x1 + (((t_2 * ((((x1 * 2.0) * t_3) * (t_3 - 3.0)) + ((x1 * x1) * ((t_3 * 4.0) - 6.0)))) + (t_0 * t_3)) + (x1 * (x1 * x1)))) + (3.0 * (((t_0 - (2.0 * x2)) - x1) / t_2)));
double tmp;
if (t_4 <= -2e+289) {
tmp = t_1;
} else if (t_4 <= 4e+279) {
tmp = x1 + fma(x1, -2.0, (x2 * -6.0));
} else {
tmp = t_1;
}
return tmp;
}
function code(x1, x2) t_0 = Float64(x1 * Float64(x1 * 3.0)) t_1 = Float64(8.0 * Float64(x1 * Float64(x2 * x2))) t_2 = Float64(Float64(x1 * x1) + 1.0) t_3 = Float64(Float64(Float64(t_0 + Float64(2.0 * x2)) - x1) / t_2) t_4 = Float64(x1 + Float64(Float64(x1 + Float64(Float64(Float64(t_2 * Float64(Float64(Float64(Float64(x1 * 2.0) * t_3) * Float64(t_3 - 3.0)) + Float64(Float64(x1 * x1) * Float64(Float64(t_3 * 4.0) - 6.0)))) + Float64(t_0 * t_3)) + Float64(x1 * Float64(x1 * x1)))) + Float64(3.0 * Float64(Float64(Float64(t_0 - Float64(2.0 * x2)) - x1) / t_2)))) tmp = 0.0 if (t_4 <= -2e+289) tmp = t_1; elseif (t_4 <= 4e+279) tmp = Float64(x1 + fma(x1, -2.0, Float64(x2 * -6.0))); else tmp = t_1; end return tmp end
code[x1_, x2_] := Block[{t$95$0 = N[(x1 * N[(x1 * 3.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(8.0 * N[(x1 * N[(x2 * x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(x1 * x1), $MachinePrecision] + 1.0), $MachinePrecision]}, Block[{t$95$3 = N[(N[(N[(t$95$0 + N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$2), $MachinePrecision]}, Block[{t$95$4 = N[(x1 + N[(N[(x1 + N[(N[(N[(t$95$2 * N[(N[(N[(N[(x1 * 2.0), $MachinePrecision] * t$95$3), $MachinePrecision] * N[(t$95$3 - 3.0), $MachinePrecision]), $MachinePrecision] + N[(N[(x1 * x1), $MachinePrecision] * N[(N[(t$95$3 * 4.0), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(t$95$0 * t$95$3), $MachinePrecision]), $MachinePrecision] + N[(x1 * N[(x1 * x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(3.0 * N[(N[(N[(t$95$0 - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$4, -2e+289], t$95$1, If[LessEqual[t$95$4, 4e+279], N[(x1 + N[(x1 * -2.0 + N[(x2 * -6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x1 \cdot \left(x1 \cdot 3\right)\\
t_1 := 8 \cdot \left(x1 \cdot \left(x2 \cdot x2\right)\right)\\
t_2 := x1 \cdot x1 + 1\\
t_3 := \frac{\left(t\_0 + 2 \cdot x2\right) - x1}{t\_2}\\
t_4 := x1 + \left(\left(x1 + \left(\left(t\_2 \cdot \left(\left(\left(x1 \cdot 2\right) \cdot t\_3\right) \cdot \left(t\_3 - 3\right) + \left(x1 \cdot x1\right) \cdot \left(t\_3 \cdot 4 - 6\right)\right) + t\_0 \cdot t\_3\right) + x1 \cdot \left(x1 \cdot x1\right)\right)\right) + 3 \cdot \frac{\left(t\_0 - 2 \cdot x2\right) - x1}{t\_2}\right)\\
\mathbf{if}\;t\_4 \leq -2 \cdot 10^{+289}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t\_4 \leq 4 \cdot 10^{+279}:\\
\;\;\;\;x1 + \mathsf{fma}\left(x1, -2, x2 \cdot -6\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\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)))))) < -2.0000000000000001e289 or 4.00000000000000023e279 < (+.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 41.1%
Taylor expanded in x1 around 0
+-commutativeN/A
accelerator-lowering-fma.f64N/A
sub-negN/A
*-commutativeN/A
associate-*l*N/A
*-commutativeN/A
metadata-evalN/A
accelerator-lowering-fma.f64N/A
sub-negN/A
distribute-lft-inN/A
accelerator-lowering-fma.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
metadata-evalN/A
metadata-evalN/A
*-commutativeN/A
*-lowering-*.f6436.3
Simplified36.3%
Taylor expanded in x2 around inf
*-lowering-*.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6436.8
Simplified36.8%
if -2.0000000000000001e289 < (+.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.00000000000000023e279Initial program 99.4%
Taylor expanded in x1 around 0
+-commutativeN/A
accelerator-lowering-fma.f64N/A
sub-negN/A
*-commutativeN/A
associate-*l*N/A
*-commutativeN/A
metadata-evalN/A
accelerator-lowering-fma.f64N/A
sub-negN/A
distribute-lft-inN/A
accelerator-lowering-fma.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
metadata-evalN/A
metadata-evalN/A
*-commutativeN/A
*-lowering-*.f6471.6
Simplified71.6%
Taylor expanded in x2 around 0
Simplified78.3%
Final simplification58.2%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (- (fma 3.0 (* x1 x1) (* 2.0 x2)) x1))
(t_1 (* x1 (* x1 3.0)))
(t_2 (+ (* x1 x1) 1.0))
(t_3 (/ (- (+ t_1 (* 2.0 x2)) x1) t_2)))
(if (<=
(+
x1
(+
(+
x1
(+
(+
(*
t_2
(+
(* (* (* x1 2.0) t_3) (- t_3 3.0))
(* (* x1 x1) (- (* t_3 4.0) 6.0))))
(* t_1 t_3))
(* x1 (* x1 x1))))
(* 3.0 (/ (- (- t_1 (* 2.0 x2)) x1) t_2))))
INFINITY)
(+
x1
(fma
(/ (- t_1 (fma 2.0 x2 x1)) (fma x1 x1 1.0))
3.0
(fma
x1
(* 3.0 (/ (* x1 t_0) (fma x1 x1 1.0)))
(fma
(fma x1 x1 1.0)
(fma
2.0
(*
(/
x1
(/ (fma x1 x1 1.0) (fma x1 (* x1 3.0) (fma 2.0 x2 (- 0.0 x1)))))
(+ -3.0 (/ t_0 (fma x1 x1 1.0))))
(* x1 (* x1 (fma 3.0 4.0 -6.0))))
(* x1 (fma x1 x1 1.0))))))
(*
x1
(fma
x1
(fma x1 (fma x1 6.0 -3.0) (fma 4.0 (fma x2 2.0 -3.0) 9.0))
1.0)))))
double code(double x1, double x2) {
double t_0 = fma(3.0, (x1 * x1), (2.0 * x2)) - x1;
double t_1 = x1 * (x1 * 3.0);
double t_2 = (x1 * x1) + 1.0;
double t_3 = ((t_1 + (2.0 * x2)) - x1) / t_2;
double tmp;
if ((x1 + ((x1 + (((t_2 * ((((x1 * 2.0) * t_3) * (t_3 - 3.0)) + ((x1 * x1) * ((t_3 * 4.0) - 6.0)))) + (t_1 * t_3)) + (x1 * (x1 * x1)))) + (3.0 * (((t_1 - (2.0 * x2)) - x1) / t_2)))) <= ((double) INFINITY)) {
tmp = x1 + fma(((t_1 - fma(2.0, x2, x1)) / fma(x1, x1, 1.0)), 3.0, fma(x1, (3.0 * ((x1 * t_0) / fma(x1, x1, 1.0))), fma(fma(x1, x1, 1.0), fma(2.0, ((x1 / (fma(x1, x1, 1.0) / fma(x1, (x1 * 3.0), fma(2.0, x2, (0.0 - x1))))) * (-3.0 + (t_0 / fma(x1, x1, 1.0)))), (x1 * (x1 * fma(3.0, 4.0, -6.0)))), (x1 * fma(x1, x1, 1.0)))));
} else {
tmp = x1 * fma(x1, fma(x1, fma(x1, 6.0, -3.0), fma(4.0, fma(x2, 2.0, -3.0), 9.0)), 1.0);
}
return tmp;
}
function code(x1, x2) t_0 = Float64(fma(3.0, Float64(x1 * x1), Float64(2.0 * x2)) - x1) t_1 = Float64(x1 * Float64(x1 * 3.0)) t_2 = Float64(Float64(x1 * x1) + 1.0) t_3 = Float64(Float64(Float64(t_1 + Float64(2.0 * x2)) - x1) / t_2) tmp = 0.0 if (Float64(x1 + Float64(Float64(x1 + Float64(Float64(Float64(t_2 * Float64(Float64(Float64(Float64(x1 * 2.0) * t_3) * Float64(t_3 - 3.0)) + Float64(Float64(x1 * x1) * Float64(Float64(t_3 * 4.0) - 6.0)))) + Float64(t_1 * t_3)) + Float64(x1 * Float64(x1 * x1)))) + Float64(3.0 * Float64(Float64(Float64(t_1 - Float64(2.0 * x2)) - x1) / t_2)))) <= Inf) tmp = Float64(x1 + fma(Float64(Float64(t_1 - fma(2.0, x2, x1)) / fma(x1, x1, 1.0)), 3.0, fma(x1, Float64(3.0 * Float64(Float64(x1 * t_0) / fma(x1, x1, 1.0))), fma(fma(x1, x1, 1.0), fma(2.0, Float64(Float64(x1 / Float64(fma(x1, x1, 1.0) / fma(x1, Float64(x1 * 3.0), fma(2.0, x2, Float64(0.0 - x1))))) * Float64(-3.0 + Float64(t_0 / fma(x1, x1, 1.0)))), Float64(x1 * Float64(x1 * fma(3.0, 4.0, -6.0)))), Float64(x1 * fma(x1, x1, 1.0)))))); else tmp = Float64(x1 * fma(x1, fma(x1, fma(x1, 6.0, -3.0), fma(4.0, fma(x2, 2.0, -3.0), 9.0)), 1.0)); end return tmp end
code[x1_, x2_] := Block[{t$95$0 = N[(N[(3.0 * N[(x1 * x1), $MachinePrecision] + N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision]}, Block[{t$95$1 = N[(x1 * N[(x1 * 3.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(x1 * x1), $MachinePrecision] + 1.0), $MachinePrecision]}, Block[{t$95$3 = N[(N[(N[(t$95$1 + N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$2), $MachinePrecision]}, If[LessEqual[N[(x1 + N[(N[(x1 + N[(N[(N[(t$95$2 * N[(N[(N[(N[(x1 * 2.0), $MachinePrecision] * t$95$3), $MachinePrecision] * N[(t$95$3 - 3.0), $MachinePrecision]), $MachinePrecision] + N[(N[(x1 * x1), $MachinePrecision] * N[(N[(t$95$3 * 4.0), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(t$95$1 * t$95$3), $MachinePrecision]), $MachinePrecision] + N[(x1 * N[(x1 * x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(3.0 * N[(N[(N[(t$95$1 - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], Infinity], N[(x1 + N[(N[(N[(t$95$1 - N[(2.0 * x2 + x1), $MachinePrecision]), $MachinePrecision] / N[(x1 * x1 + 1.0), $MachinePrecision]), $MachinePrecision] * 3.0 + N[(x1 * N[(3.0 * N[(N[(x1 * t$95$0), $MachinePrecision] / N[(x1 * x1 + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(x1 * x1 + 1.0), $MachinePrecision] * N[(2.0 * N[(N[(x1 / N[(N[(x1 * x1 + 1.0), $MachinePrecision] / N[(x1 * N[(x1 * 3.0), $MachinePrecision] + N[(2.0 * x2 + N[(0.0 - x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(-3.0 + N[(t$95$0 / N[(x1 * x1 + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(x1 * N[(x1 * N[(3.0 * 4.0 + -6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(x1 * N[(x1 * x1 + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x1 * N[(x1 * N[(x1 * N[(x1 * 6.0 + -3.0), $MachinePrecision] + N[(4.0 * N[(x2 * 2.0 + -3.0), $MachinePrecision] + 9.0), $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \mathsf{fma}\left(3, x1 \cdot x1, 2 \cdot x2\right) - x1\\
t_1 := x1 \cdot \left(x1 \cdot 3\right)\\
t_2 := x1 \cdot x1 + 1\\
t_3 := \frac{\left(t\_1 + 2 \cdot x2\right) - x1}{t\_2}\\
\mathbf{if}\;x1 + \left(\left(x1 + \left(\left(t\_2 \cdot \left(\left(\left(x1 \cdot 2\right) \cdot t\_3\right) \cdot \left(t\_3 - 3\right) + \left(x1 \cdot x1\right) \cdot \left(t\_3 \cdot 4 - 6\right)\right) + t\_1 \cdot t\_3\right) + x1 \cdot \left(x1 \cdot x1\right)\right)\right) + 3 \cdot \frac{\left(t\_1 - 2 \cdot x2\right) - x1}{t\_2}\right) \leq \infty:\\
\;\;\;\;x1 + \mathsf{fma}\left(\frac{t\_1 - \mathsf{fma}\left(2, x2, x1\right)}{\mathsf{fma}\left(x1, x1, 1\right)}, 3, \mathsf{fma}\left(x1, 3 \cdot \frac{x1 \cdot t\_0}{\mathsf{fma}\left(x1, x1, 1\right)}, \mathsf{fma}\left(\mathsf{fma}\left(x1, x1, 1\right), \mathsf{fma}\left(2, \frac{x1}{\frac{\mathsf{fma}\left(x1, x1, 1\right)}{\mathsf{fma}\left(x1, x1 \cdot 3, \mathsf{fma}\left(2, x2, 0 - x1\right)\right)}} \cdot \left(-3 + \frac{t\_0}{\mathsf{fma}\left(x1, x1, 1\right)}\right), x1 \cdot \left(x1 \cdot \mathsf{fma}\left(3, 4, -6\right)\right)\right), x1 \cdot \mathsf{fma}\left(x1, x1, 1\right)\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x1 \cdot \mathsf{fma}\left(x1, \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), 1\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.5%
Applied egg-rr94.3%
Taylor expanded in x1 around inf
Simplified93.1%
associate-/l*N/A
clear-numN/A
un-div-invN/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
accelerator-lowering-fma.f64N/A
associate--l+N/A
*-commutativeN/A
associate-*r*N/A
accelerator-lowering-fma.f64N/A
*-lowering-*.f64N/A
sub-negN/A
accelerator-lowering-fma.f64N/A
sub0-negN/A
--lowering--.f6498.5
Applied egg-rr98.5%
if +inf.0 < (+.f64 x1 (+.f64 (+.f64 (+.f64 (+.f64 (*.f64 (+.f64 (*.f64 (*.f64 (*.f64 #s(literal 2 binary64) x1) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64)))) (-.f64 (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))) #s(literal 3 binary64))) (*.f64 (*.f64 x1 x1) (-.f64 (*.f64 #s(literal 4 binary64) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64)))) #s(literal 6 binary64)))) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))) (*.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))))) (*.f64 (*.f64 x1 x1) x1)) x1) (*.f64 #s(literal 3 binary64) (/.f64 (-.f64 (-.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64)))))) Initial program 0.0%
Taylor expanded in x1 around -inf
*-lowering-*.f64N/A
pow-lowering-pow.f64N/A
mul-1-negN/A
unsub-negN/A
--lowering--.f64N/A
/-lowering-/.f64N/A
Simplified100.0%
Taylor expanded in x1 around 0
*-lowering-*.f64N/A
+-commutativeN/A
accelerator-lowering-fma.f64N/A
associate-+r+N/A
+-commutativeN/A
accelerator-lowering-fma.f64N/A
sub-negN/A
*-commutativeN/A
metadata-evalN/A
accelerator-lowering-fma.f64N/A
+-commutativeN/A
accelerator-lowering-fma.f64N/A
sub-negN/A
metadata-evalN/A
*-commutativeN/A
accelerator-lowering-fma.f64100.0
Simplified100.0%
Final simplification99.0%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (- (fma 3.0 (* x1 x1) (* 2.0 x2)) x1))
(t_1 (/ (* x1 t_0) (fma x1 x1 1.0)))
(t_2
(*
x1
(fma
x1
(fma x1 (fma x1 6.0 -3.0) (fma 4.0 (fma x2 2.0 -3.0) 9.0))
1.0))))
(if (<= x1 -1.85e+68)
t_2
(if (<= x1 1.7e+57)
(+
x1
(fma
(/ (- (* x1 (* x1 3.0)) (fma 2.0 x2 x1)) (fma x1 x1 1.0))
3.0
(fma
x1
(* 3.0 t_1)
(fma
(fma x1 x1 1.0)
(fma
2.0
(* t_1 (+ -3.0 (/ t_0 (fma x1 x1 1.0))))
(* x1 (* x1 (fma 3.0 4.0 -6.0))))
(* x1 (fma x1 x1 1.0))))))
t_2))))
double code(double x1, double x2) {
double t_0 = fma(3.0, (x1 * x1), (2.0 * x2)) - x1;
double t_1 = (x1 * t_0) / fma(x1, x1, 1.0);
double t_2 = x1 * fma(x1, fma(x1, fma(x1, 6.0, -3.0), fma(4.0, fma(x2, 2.0, -3.0), 9.0)), 1.0);
double tmp;
if (x1 <= -1.85e+68) {
tmp = t_2;
} else if (x1 <= 1.7e+57) {
tmp = x1 + fma((((x1 * (x1 * 3.0)) - fma(2.0, x2, x1)) / fma(x1, x1, 1.0)), 3.0, fma(x1, (3.0 * t_1), fma(fma(x1, x1, 1.0), fma(2.0, (t_1 * (-3.0 + (t_0 / fma(x1, x1, 1.0)))), (x1 * (x1 * fma(3.0, 4.0, -6.0)))), (x1 * fma(x1, x1, 1.0)))));
} else {
tmp = t_2;
}
return tmp;
}
function code(x1, x2) t_0 = Float64(fma(3.0, Float64(x1 * x1), Float64(2.0 * x2)) - x1) t_1 = Float64(Float64(x1 * t_0) / fma(x1, x1, 1.0)) t_2 = Float64(x1 * fma(x1, fma(x1, fma(x1, 6.0, -3.0), fma(4.0, fma(x2, 2.0, -3.0), 9.0)), 1.0)) tmp = 0.0 if (x1 <= -1.85e+68) tmp = t_2; elseif (x1 <= 1.7e+57) tmp = Float64(x1 + fma(Float64(Float64(Float64(x1 * Float64(x1 * 3.0)) - fma(2.0, x2, x1)) / fma(x1, x1, 1.0)), 3.0, fma(x1, Float64(3.0 * t_1), fma(fma(x1, x1, 1.0), fma(2.0, Float64(t_1 * Float64(-3.0 + Float64(t_0 / fma(x1, x1, 1.0)))), Float64(x1 * Float64(x1 * fma(3.0, 4.0, -6.0)))), Float64(x1 * fma(x1, x1, 1.0)))))); else tmp = t_2; end return tmp end
code[x1_, x2_] := Block[{t$95$0 = N[(N[(3.0 * N[(x1 * x1), $MachinePrecision] + N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision]}, Block[{t$95$1 = N[(N[(x1 * t$95$0), $MachinePrecision] / N[(x1 * x1 + 1.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x1 * N[(x1 * N[(x1 * N[(x1 * 6.0 + -3.0), $MachinePrecision] + N[(4.0 * N[(x2 * 2.0 + -3.0), $MachinePrecision] + 9.0), $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x1, -1.85e+68], t$95$2, If[LessEqual[x1, 1.7e+57], N[(x1 + N[(N[(N[(N[(x1 * N[(x1 * 3.0), $MachinePrecision]), $MachinePrecision] - N[(2.0 * x2 + x1), $MachinePrecision]), $MachinePrecision] / N[(x1 * x1 + 1.0), $MachinePrecision]), $MachinePrecision] * 3.0 + N[(x1 * N[(3.0 * t$95$1), $MachinePrecision] + N[(N[(x1 * x1 + 1.0), $MachinePrecision] * N[(2.0 * N[(t$95$1 * N[(-3.0 + N[(t$95$0 / N[(x1 * x1 + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(x1 * N[(x1 * N[(3.0 * 4.0 + -6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(x1 * N[(x1 * x1 + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$2]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \mathsf{fma}\left(3, x1 \cdot x1, 2 \cdot x2\right) - x1\\
t_1 := \frac{x1 \cdot t\_0}{\mathsf{fma}\left(x1, x1, 1\right)}\\
t_2 := x1 \cdot \mathsf{fma}\left(x1, \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), 1\right)\\
\mathbf{if}\;x1 \leq -1.85 \cdot 10^{+68}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;x1 \leq 1.7 \cdot 10^{+57}:\\
\;\;\;\;x1 + \mathsf{fma}\left(\frac{x1 \cdot \left(x1 \cdot 3\right) - \mathsf{fma}\left(2, x2, x1\right)}{\mathsf{fma}\left(x1, x1, 1\right)}, 3, \mathsf{fma}\left(x1, 3 \cdot t\_1, \mathsf{fma}\left(\mathsf{fma}\left(x1, x1, 1\right), \mathsf{fma}\left(2, t\_1 \cdot \left(-3 + \frac{t\_0}{\mathsf{fma}\left(x1, x1, 1\right)}\right), x1 \cdot \left(x1 \cdot \mathsf{fma}\left(3, 4, -6\right)\right)\right), x1 \cdot \mathsf{fma}\left(x1, x1, 1\right)\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if x1 < -1.84999999999999999e68 or 1.69999999999999996e57 < x1 Initial program 27.9%
Taylor expanded in x1 around -inf
*-lowering-*.f64N/A
pow-lowering-pow.f64N/A
mul-1-negN/A
unsub-negN/A
--lowering--.f64N/A
/-lowering-/.f64N/A
Simplified100.0%
Taylor expanded in x1 around 0
*-lowering-*.f64N/A
+-commutativeN/A
accelerator-lowering-fma.f64N/A
associate-+r+N/A
+-commutativeN/A
accelerator-lowering-fma.f64N/A
sub-negN/A
*-commutativeN/A
metadata-evalN/A
accelerator-lowering-fma.f64N/A
+-commutativeN/A
accelerator-lowering-fma.f64N/A
sub-negN/A
metadata-evalN/A
*-commutativeN/A
accelerator-lowering-fma.f64100.0
Simplified100.0%
if -1.84999999999999999e68 < x1 < 1.69999999999999996e57Initial program 98.9%
Applied egg-rr99.1%
Taylor expanded in x1 around inf
Simplified98.3%
Final simplification99.0%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0
(*
x1
(fma
x1
(fma x1 (fma x1 6.0 -3.0) (fma 4.0 (fma x2 2.0 -3.0) 9.0))
1.0)))
(t_1 (- (fma 3.0 (* x1 x1) (* 2.0 x2)) x1)))
(if (<= x1 -3.6e+71)
t_0
(if (<= x1 3.4e+57)
(+
x1
(fma
(/ (- (* x1 (* x1 3.0)) (fma 2.0 x2 x1)) (fma x1 x1 1.0))
3.0
(fma
x1
(* 3.0 (* x1 3.0))
(fma
(fma x1 x1 1.0)
(fma
2.0
(* (/ (* x1 t_1) (fma x1 x1 1.0)) (+ -3.0 (/ t_1 (fma x1 x1 1.0))))
(* x1 (* x1 (fma 3.0 4.0 -6.0))))
(* x1 (fma x1 x1 1.0))))))
t_0))))
double code(double x1, double x2) {
double t_0 = x1 * fma(x1, fma(x1, fma(x1, 6.0, -3.0), fma(4.0, fma(x2, 2.0, -3.0), 9.0)), 1.0);
double t_1 = fma(3.0, (x1 * x1), (2.0 * x2)) - x1;
double tmp;
if (x1 <= -3.6e+71) {
tmp = t_0;
} else if (x1 <= 3.4e+57) {
tmp = x1 + fma((((x1 * (x1 * 3.0)) - fma(2.0, x2, x1)) / fma(x1, x1, 1.0)), 3.0, fma(x1, (3.0 * (x1 * 3.0)), fma(fma(x1, x1, 1.0), fma(2.0, (((x1 * t_1) / fma(x1, x1, 1.0)) * (-3.0 + (t_1 / fma(x1, x1, 1.0)))), (x1 * (x1 * fma(3.0, 4.0, -6.0)))), (x1 * fma(x1, x1, 1.0)))));
} else {
tmp = t_0;
}
return tmp;
}
function code(x1, x2) t_0 = Float64(x1 * fma(x1, fma(x1, fma(x1, 6.0, -3.0), fma(4.0, fma(x2, 2.0, -3.0), 9.0)), 1.0)) t_1 = Float64(fma(3.0, Float64(x1 * x1), Float64(2.0 * x2)) - x1) tmp = 0.0 if (x1 <= -3.6e+71) tmp = t_0; elseif (x1 <= 3.4e+57) tmp = Float64(x1 + fma(Float64(Float64(Float64(x1 * Float64(x1 * 3.0)) - fma(2.0, x2, x1)) / fma(x1, x1, 1.0)), 3.0, fma(x1, Float64(3.0 * Float64(x1 * 3.0)), fma(fma(x1, x1, 1.0), fma(2.0, Float64(Float64(Float64(x1 * t_1) / fma(x1, x1, 1.0)) * Float64(-3.0 + Float64(t_1 / fma(x1, x1, 1.0)))), Float64(x1 * Float64(x1 * fma(3.0, 4.0, -6.0)))), Float64(x1 * fma(x1, x1, 1.0)))))); else tmp = t_0; end return tmp end
code[x1_, x2_] := Block[{t$95$0 = N[(x1 * N[(x1 * N[(x1 * N[(x1 * 6.0 + -3.0), $MachinePrecision] + N[(4.0 * N[(x2 * 2.0 + -3.0), $MachinePrecision] + 9.0), $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(N[(3.0 * N[(x1 * x1), $MachinePrecision] + N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision]}, If[LessEqual[x1, -3.6e+71], t$95$0, If[LessEqual[x1, 3.4e+57], N[(x1 + N[(N[(N[(N[(x1 * N[(x1 * 3.0), $MachinePrecision]), $MachinePrecision] - N[(2.0 * x2 + x1), $MachinePrecision]), $MachinePrecision] / N[(x1 * x1 + 1.0), $MachinePrecision]), $MachinePrecision] * 3.0 + N[(x1 * N[(3.0 * N[(x1 * 3.0), $MachinePrecision]), $MachinePrecision] + N[(N[(x1 * x1 + 1.0), $MachinePrecision] * N[(2.0 * N[(N[(N[(x1 * t$95$1), $MachinePrecision] / N[(x1 * x1 + 1.0), $MachinePrecision]), $MachinePrecision] * N[(-3.0 + N[(t$95$1 / N[(x1 * x1 + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(x1 * N[(x1 * N[(3.0 * 4.0 + -6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(x1 * N[(x1 * x1 + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$0]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x1 \cdot \mathsf{fma}\left(x1, \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), 1\right)\\
t_1 := \mathsf{fma}\left(3, x1 \cdot x1, 2 \cdot x2\right) - x1\\
\mathbf{if}\;x1 \leq -3.6 \cdot 10^{+71}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;x1 \leq 3.4 \cdot 10^{+57}:\\
\;\;\;\;x1 + \mathsf{fma}\left(\frac{x1 \cdot \left(x1 \cdot 3\right) - \mathsf{fma}\left(2, x2, x1\right)}{\mathsf{fma}\left(x1, x1, 1\right)}, 3, \mathsf{fma}\left(x1, 3 \cdot \left(x1 \cdot 3\right), \mathsf{fma}\left(\mathsf{fma}\left(x1, x1, 1\right), \mathsf{fma}\left(2, \frac{x1 \cdot t\_1}{\mathsf{fma}\left(x1, x1, 1\right)} \cdot \left(-3 + \frac{t\_1}{\mathsf{fma}\left(x1, x1, 1\right)}\right), x1 \cdot \left(x1 \cdot \mathsf{fma}\left(3, 4, -6\right)\right)\right), x1 \cdot \mathsf{fma}\left(x1, x1, 1\right)\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
if x1 < -3.6e71 or 3.39999999999999992e57 < x1 Initial program 27.9%
Taylor expanded in x1 around -inf
*-lowering-*.f64N/A
pow-lowering-pow.f64N/A
mul-1-negN/A
unsub-negN/A
--lowering--.f64N/A
/-lowering-/.f64N/A
Simplified100.0%
Taylor expanded in x1 around 0
*-lowering-*.f64N/A
+-commutativeN/A
accelerator-lowering-fma.f64N/A
associate-+r+N/A
+-commutativeN/A
accelerator-lowering-fma.f64N/A
sub-negN/A
*-commutativeN/A
metadata-evalN/A
accelerator-lowering-fma.f64N/A
+-commutativeN/A
accelerator-lowering-fma.f64N/A
sub-negN/A
metadata-evalN/A
*-commutativeN/A
accelerator-lowering-fma.f64100.0
Simplified100.0%
if -3.6e71 < x1 < 3.39999999999999992e57Initial program 98.9%
Applied egg-rr99.1%
Taylor expanded in x1 around inf
Simplified98.3%
Taylor expanded in x1 around inf
*-commutativeN/A
*-lowering-*.f6498.3
Simplified98.3%
Final simplification99.0%
(FPCore (x1 x2)
:precision binary64
(if (<= x1 -1.9e+16)
(+
x1
(* (* x1 x1) (fma x1 (fma x1 6.0 -3.0) (fma 4.0 (fma x2 2.0 -3.0) 9.0))))
(if (<= x1 980.0)
(fma x2 (fma x1 -12.0 (fma 8.0 (* x1 x2) -6.0)) (- 0.0 x1))
(+
x1
(*
(pow x1 4.0)
(+
6.0
(/
(-
(/
(fma
4.0
(fma x2 2.0 -3.0)
(- 9.0 (/ (* (fma x2 2.0 -3.0) -6.0) x1)))
x1)
3.0)
x1)))))))
double code(double x1, double x2) {
double tmp;
if (x1 <= -1.9e+16) {
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 <= 980.0) {
tmp = fma(x2, fma(x1, -12.0, fma(8.0, (x1 * x2), -6.0)), (0.0 - x1));
} else {
tmp = x1 + (pow(x1, 4.0) * (6.0 + (((fma(4.0, fma(x2, 2.0, -3.0), (9.0 - ((fma(x2, 2.0, -3.0) * -6.0) / x1))) / x1) - 3.0) / x1)));
}
return tmp;
}
function code(x1, x2) tmp = 0.0 if (x1 <= -1.9e+16) 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 <= 980.0) tmp = fma(x2, fma(x1, -12.0, fma(8.0, Float64(x1 * x2), -6.0)), Float64(0.0 - x1)); else tmp = Float64(x1 + Float64((x1 ^ 4.0) * Float64(6.0 + Float64(Float64(Float64(fma(4.0, fma(x2, 2.0, -3.0), Float64(9.0 - Float64(Float64(fma(x2, 2.0, -3.0) * -6.0) / x1))) / x1) - 3.0) / x1)))); end return tmp end
code[x1_, x2_] := If[LessEqual[x1, -1.9e+16], 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, 980.0], N[(x2 * N[(x1 * -12.0 + N[(8.0 * N[(x1 * x2), $MachinePrecision] + -6.0), $MachinePrecision]), $MachinePrecision] + N[(0.0 - x1), $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] + N[(9.0 - N[(N[(N[(x2 * 2.0 + -3.0), $MachinePrecision] * -6.0), $MachinePrecision] / x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / x1), $MachinePrecision] - 3.0), $MachinePrecision] / x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x1 \leq -1.9 \cdot 10^{+16}:\\
\;\;\;\;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 980:\\
\;\;\;\;\mathsf{fma}\left(x2, \mathsf{fma}\left(x1, -12, \mathsf{fma}\left(8, x1 \cdot x2, -6\right)\right), 0 - x1\right)\\
\mathbf{else}:\\
\;\;\;\;x1 + {x1}^{4} \cdot \left(6 + \frac{\frac{\mathsf{fma}\left(4, \mathsf{fma}\left(x2, 2, -3\right), 9 - \frac{\mathsf{fma}\left(x2, 2, -3\right) \cdot -6}{x1}\right)}{x1} - 3}{x1}\right)\\
\end{array}
\end{array}
if x1 < -1.9e16Initial program 27.8%
Taylor expanded in x1 around -inf
*-lowering-*.f64N/A
pow-lowering-pow.f64N/A
mul-1-negN/A
unsub-negN/A
--lowering--.f64N/A
/-lowering-/.f64N/A
Simplified97.9%
Taylor expanded in x1 around 0
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
associate-+r+N/A
+-commutativeN/A
accelerator-lowering-fma.f64N/A
sub-negN/A
*-commutativeN/A
metadata-evalN/A
accelerator-lowering-fma.f64N/A
+-commutativeN/A
accelerator-lowering-fma.f64N/A
sub-negN/A
metadata-evalN/A
*-commutativeN/A
accelerator-lowering-fma.f6497.9
Simplified97.9%
if -1.9e16 < x1 < 980Initial program 98.8%
Taylor expanded in x1 around 0
+-commutativeN/A
accelerator-lowering-fma.f64N/A
sub-negN/A
*-commutativeN/A
associate-*l*N/A
*-commutativeN/A
metadata-evalN/A
accelerator-lowering-fma.f64N/A
sub-negN/A
distribute-lft-inN/A
accelerator-lowering-fma.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
metadata-evalN/A
metadata-evalN/A
*-commutativeN/A
*-lowering-*.f6483.5
Simplified83.5%
Taylor expanded in x2 around 0
+-commutativeN/A
+-commutativeN/A
associate-+l+N/A
distribute-lft1-inN/A
metadata-evalN/A
accelerator-lowering-fma.f64N/A
associate--l+N/A
*-commutativeN/A
accelerator-lowering-fma.f64N/A
sub-negN/A
metadata-evalN/A
accelerator-lowering-fma.f64N/A
*-lowering-*.f64N/A
mul-1-negN/A
neg-sub0N/A
--lowering--.f6499.3
Simplified99.3%
if 980 < x1 Initial program 49.1%
Taylor expanded in x1 around -inf
*-lowering-*.f64N/A
pow-lowering-pow.f64N/A
mul-1-negN/A
unsub-negN/A
--lowering--.f64N/A
/-lowering-/.f64N/A
Simplified94.5%
Final simplification97.7%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (fma 4.0 (fma x2 2.0 -3.0) 9.0)))
(if (<= x1 -1.4e+14)
(+ x1 (* (* x1 x1) (fma x1 (fma x1 6.0 -3.0) t_0)))
(if (<= x1 8500.0)
(fma x2 (fma x1 -12.0 (fma 8.0 (* x1 x2) -6.0)) (- 0.0 x1))
(+ x1 (* (pow x1 4.0) (+ 6.0 (/ (- (/ t_0 x1) 3.0) x1))))))))
double code(double x1, double x2) {
double t_0 = fma(4.0, fma(x2, 2.0, -3.0), 9.0);
double tmp;
if (x1 <= -1.4e+14) {
tmp = x1 + ((x1 * x1) * fma(x1, fma(x1, 6.0, -3.0), t_0));
} else if (x1 <= 8500.0) {
tmp = fma(x2, fma(x1, -12.0, fma(8.0, (x1 * x2), -6.0)), (0.0 - x1));
} else {
tmp = x1 + (pow(x1, 4.0) * (6.0 + (((t_0 / x1) - 3.0) / x1)));
}
return tmp;
}
function code(x1, x2) t_0 = fma(4.0, fma(x2, 2.0, -3.0), 9.0) tmp = 0.0 if (x1 <= -1.4e+14) tmp = Float64(x1 + Float64(Float64(x1 * x1) * fma(x1, fma(x1, 6.0, -3.0), t_0))); elseif (x1 <= 8500.0) tmp = fma(x2, fma(x1, -12.0, fma(8.0, Float64(x1 * x2), -6.0)), Float64(0.0 - x1)); else tmp = Float64(x1 + Float64((x1 ^ 4.0) * Float64(6.0 + Float64(Float64(Float64(t_0 / x1) - 3.0) / x1)))); end return tmp end
code[x1_, x2_] := Block[{t$95$0 = N[(4.0 * N[(x2 * 2.0 + -3.0), $MachinePrecision] + 9.0), $MachinePrecision]}, If[LessEqual[x1, -1.4e+14], N[(x1 + N[(N[(x1 * x1), $MachinePrecision] * N[(x1 * N[(x1 * 6.0 + -3.0), $MachinePrecision] + t$95$0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 8500.0], N[(x2 * N[(x1 * -12.0 + N[(8.0 * N[(x1 * x2), $MachinePrecision] + -6.0), $MachinePrecision]), $MachinePrecision] + N[(0.0 - x1), $MachinePrecision]), $MachinePrecision], N[(x1 + N[(N[Power[x1, 4.0], $MachinePrecision] * N[(6.0 + N[(N[(N[(t$95$0 / x1), $MachinePrecision] - 3.0), $MachinePrecision] / x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \mathsf{fma}\left(4, \mathsf{fma}\left(x2, 2, -3\right), 9\right)\\
\mathbf{if}\;x1 \leq -1.4 \cdot 10^{+14}:\\
\;\;\;\;x1 + \left(x1 \cdot x1\right) \cdot \mathsf{fma}\left(x1, \mathsf{fma}\left(x1, 6, -3\right), t\_0\right)\\
\mathbf{elif}\;x1 \leq 8500:\\
\;\;\;\;\mathsf{fma}\left(x2, \mathsf{fma}\left(x1, -12, \mathsf{fma}\left(8, x1 \cdot x2, -6\right)\right), 0 - x1\right)\\
\mathbf{else}:\\
\;\;\;\;x1 + {x1}^{4} \cdot \left(6 + \frac{\frac{t\_0}{x1} - 3}{x1}\right)\\
\end{array}
\end{array}
if x1 < -1.4e14Initial program 27.8%
Taylor expanded in x1 around -inf
*-lowering-*.f64N/A
pow-lowering-pow.f64N/A
mul-1-negN/A
unsub-negN/A
--lowering--.f64N/A
/-lowering-/.f64N/A
Simplified97.9%
Taylor expanded in x1 around 0
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
associate-+r+N/A
+-commutativeN/A
accelerator-lowering-fma.f64N/A
sub-negN/A
*-commutativeN/A
metadata-evalN/A
accelerator-lowering-fma.f64N/A
+-commutativeN/A
accelerator-lowering-fma.f64N/A
sub-negN/A
metadata-evalN/A
*-commutativeN/A
accelerator-lowering-fma.f6497.9
Simplified97.9%
if -1.4e14 < x1 < 8500Initial program 98.8%
Taylor expanded in x1 around 0
+-commutativeN/A
accelerator-lowering-fma.f64N/A
sub-negN/A
*-commutativeN/A
associate-*l*N/A
*-commutativeN/A
metadata-evalN/A
accelerator-lowering-fma.f64N/A
sub-negN/A
distribute-lft-inN/A
accelerator-lowering-fma.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
metadata-evalN/A
metadata-evalN/A
*-commutativeN/A
*-lowering-*.f6483.5
Simplified83.5%
Taylor expanded in x2 around 0
+-commutativeN/A
+-commutativeN/A
associate-+l+N/A
distribute-lft1-inN/A
metadata-evalN/A
accelerator-lowering-fma.f64N/A
associate--l+N/A
*-commutativeN/A
accelerator-lowering-fma.f64N/A
sub-negN/A
metadata-evalN/A
accelerator-lowering-fma.f64N/A
*-lowering-*.f64N/A
mul-1-negN/A
neg-sub0N/A
--lowering--.f6499.3
Simplified99.3%
if 8500 < x1 Initial program 49.1%
Taylor expanded in x1 around -inf
*-lowering-*.f64N/A
pow-lowering-pow.f64N/A
mul-1-negN/A
unsub-negN/A
--lowering--.f64N/A
/-lowering-/.f64N/A
Simplified94.5%
Final simplification97.7%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (fma (* x1 (* x1 (fma x1 x1 0.0))) 6.0 x1))
(t_1 (fma x1 (fma x2 (fma x2 8.0 -12.0) -1.0) (* x2 -6.0))))
(if (<= x1 -1.4e+14)
t_0
(if (<= x1 -3.1e-226)
t_1
(if (<= x1 1.15e-237)
(+ x1 (fma x1 -2.0 (* x2 -6.0)))
(if (<= x1 6.5e+24) t_1 t_0))))))
double code(double x1, double x2) {
double t_0 = fma((x1 * (x1 * fma(x1, x1, 0.0))), 6.0, x1);
double t_1 = fma(x1, fma(x2, fma(x2, 8.0, -12.0), -1.0), (x2 * -6.0));
double tmp;
if (x1 <= -1.4e+14) {
tmp = t_0;
} else if (x1 <= -3.1e-226) {
tmp = t_1;
} else if (x1 <= 1.15e-237) {
tmp = x1 + fma(x1, -2.0, (x2 * -6.0));
} else if (x1 <= 6.5e+24) {
tmp = t_1;
} else {
tmp = t_0;
}
return tmp;
}
function code(x1, x2) t_0 = fma(Float64(x1 * Float64(x1 * fma(x1, x1, 0.0))), 6.0, x1) t_1 = fma(x1, fma(x2, fma(x2, 8.0, -12.0), -1.0), Float64(x2 * -6.0)) tmp = 0.0 if (x1 <= -1.4e+14) tmp = t_0; elseif (x1 <= -3.1e-226) tmp = t_1; elseif (x1 <= 1.15e-237) tmp = Float64(x1 + fma(x1, -2.0, Float64(x2 * -6.0))); elseif (x1 <= 6.5e+24) tmp = t_1; else tmp = t_0; end return tmp end
code[x1_, x2_] := Block[{t$95$0 = N[(N[(x1 * N[(x1 * N[(x1 * x1 + 0.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * 6.0 + x1), $MachinePrecision]}, Block[{t$95$1 = N[(x1 * N[(x2 * N[(x2 * 8.0 + -12.0), $MachinePrecision] + -1.0), $MachinePrecision] + N[(x2 * -6.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x1, -1.4e+14], t$95$0, If[LessEqual[x1, -3.1e-226], t$95$1, If[LessEqual[x1, 1.15e-237], N[(x1 + N[(x1 * -2.0 + N[(x2 * -6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 6.5e+24], t$95$1, t$95$0]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \mathsf{fma}\left(x1 \cdot \left(x1 \cdot \mathsf{fma}\left(x1, x1, 0\right)\right), 6, x1\right)\\
t_1 := \mathsf{fma}\left(x1, \mathsf{fma}\left(x2, \mathsf{fma}\left(x2, 8, -12\right), -1\right), x2 \cdot -6\right)\\
\mathbf{if}\;x1 \leq -1.4 \cdot 10^{+14}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;x1 \leq -3.1 \cdot 10^{-226}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;x1 \leq 1.15 \cdot 10^{-237}:\\
\;\;\;\;x1 + \mathsf{fma}\left(x1, -2, x2 \cdot -6\right)\\
\mathbf{elif}\;x1 \leq 6.5 \cdot 10^{+24}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
if x1 < -1.4e14 or 6.4999999999999996e24 < x1 Initial program 37.2%
Taylor expanded in x1 around inf
*-lowering-*.f64N/A
pow-lowering-pow.f6494.1
Simplified94.1%
+-commutativeN/A
metadata-evalN/A
pow-powN/A
pow2N/A
pow2N/A
*-commutativeN/A
accelerator-lowering-fma.f64N/A
associate-*l*N/A
associate-*l*N/A
*-lowering-*.f64N/A
associate-*l*N/A
*-lowering-*.f64N/A
+-lft-identityN/A
+-commutativeN/A
distribute-rgt-outN/A
mul0-lftN/A
accelerator-lowering-fma.f6494.2
Applied egg-rr94.2%
if -1.4e14 < x1 < -3.09999999999999989e-226 or 1.15000000000000006e-237 < x1 < 6.4999999999999996e24Initial program 98.5%
Taylor expanded in x1 around 0
+-commutativeN/A
accelerator-lowering-fma.f64N/A
sub-negN/A
*-commutativeN/A
associate-*l*N/A
*-commutativeN/A
metadata-evalN/A
accelerator-lowering-fma.f64N/A
sub-negN/A
distribute-lft-inN/A
accelerator-lowering-fma.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
metadata-evalN/A
metadata-evalN/A
*-commutativeN/A
*-lowering-*.f6487.4
Simplified87.4%
Taylor expanded in x1 around 0
+-commutativeN/A
accelerator-lowering-fma.f64N/A
sub-negN/A
metadata-evalN/A
accelerator-lowering-fma.f64N/A
sub-negN/A
*-commutativeN/A
metadata-evalN/A
accelerator-lowering-fma.f64N/A
*-commutativeN/A
*-lowering-*.f6487.4
Simplified87.4%
if -3.09999999999999989e-226 < x1 < 1.15000000000000006e-237Initial program 99.6%
Taylor expanded in x1 around 0
+-commutativeN/A
accelerator-lowering-fma.f64N/A
sub-negN/A
*-commutativeN/A
associate-*l*N/A
*-commutativeN/A
metadata-evalN/A
accelerator-lowering-fma.f64N/A
sub-negN/A
distribute-lft-inN/A
accelerator-lowering-fma.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
metadata-evalN/A
metadata-evalN/A
*-commutativeN/A
*-lowering-*.f6468.7
Simplified68.7%
Taylor expanded in x2 around 0
Simplified99.3%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (fma x1 (fma x1 6.0 -3.0) (fma 4.0 (fma x2 2.0 -3.0) 9.0))))
(if (<= x1 -1.4e+14)
(+ x1 (* (* x1 x1) t_0))
(if (<= x1 35.0)
(fma x2 (fma x1 -12.0 (fma 8.0 (* x1 x2) -6.0)) (- 0.0 x1))
(* x1 (fma x1 t_0 1.0))))))
double code(double x1, double x2) {
double t_0 = fma(x1, fma(x1, 6.0, -3.0), fma(4.0, fma(x2, 2.0, -3.0), 9.0));
double tmp;
if (x1 <= -1.4e+14) {
tmp = x1 + ((x1 * x1) * t_0);
} else if (x1 <= 35.0) {
tmp = fma(x2, fma(x1, -12.0, fma(8.0, (x1 * x2), -6.0)), (0.0 - x1));
} else {
tmp = x1 * fma(x1, t_0, 1.0);
}
return tmp;
}
function code(x1, x2) t_0 = fma(x1, fma(x1, 6.0, -3.0), fma(4.0, fma(x2, 2.0, -3.0), 9.0)) tmp = 0.0 if (x1 <= -1.4e+14) tmp = Float64(x1 + Float64(Float64(x1 * x1) * t_0)); elseif (x1 <= 35.0) tmp = fma(x2, fma(x1, -12.0, fma(8.0, Float64(x1 * x2), -6.0)), Float64(0.0 - x1)); else tmp = Float64(x1 * fma(x1, t_0, 1.0)); end return tmp end
code[x1_, x2_] := Block[{t$95$0 = N[(x1 * N[(x1 * 6.0 + -3.0), $MachinePrecision] + N[(4.0 * N[(x2 * 2.0 + -3.0), $MachinePrecision] + 9.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x1, -1.4e+14], N[(x1 + N[(N[(x1 * x1), $MachinePrecision] * t$95$0), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 35.0], N[(x2 * N[(x1 * -12.0 + N[(8.0 * N[(x1 * x2), $MachinePrecision] + -6.0), $MachinePrecision]), $MachinePrecision] + N[(0.0 - x1), $MachinePrecision]), $MachinePrecision], N[(x1 * N[(x1 * t$95$0 + 1.0), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \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{if}\;x1 \leq -1.4 \cdot 10^{+14}:\\
\;\;\;\;x1 + \left(x1 \cdot x1\right) \cdot t\_0\\
\mathbf{elif}\;x1 \leq 35:\\
\;\;\;\;\mathsf{fma}\left(x2, \mathsf{fma}\left(x1, -12, \mathsf{fma}\left(8, x1 \cdot x2, -6\right)\right), 0 - x1\right)\\
\mathbf{else}:\\
\;\;\;\;x1 \cdot \mathsf{fma}\left(x1, t\_0, 1\right)\\
\end{array}
\end{array}
if x1 < -1.4e14Initial program 27.8%
Taylor expanded in x1 around -inf
*-lowering-*.f64N/A
pow-lowering-pow.f64N/A
mul-1-negN/A
unsub-negN/A
--lowering--.f64N/A
/-lowering-/.f64N/A
Simplified97.9%
Taylor expanded in x1 around 0
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
associate-+r+N/A
+-commutativeN/A
accelerator-lowering-fma.f64N/A
sub-negN/A
*-commutativeN/A
metadata-evalN/A
accelerator-lowering-fma.f64N/A
+-commutativeN/A
accelerator-lowering-fma.f64N/A
sub-negN/A
metadata-evalN/A
*-commutativeN/A
accelerator-lowering-fma.f6497.9
Simplified97.9%
if -1.4e14 < x1 < 35Initial program 98.8%
Taylor expanded in x1 around 0
+-commutativeN/A
accelerator-lowering-fma.f64N/A
sub-negN/A
*-commutativeN/A
associate-*l*N/A
*-commutativeN/A
metadata-evalN/A
accelerator-lowering-fma.f64N/A
sub-negN/A
distribute-lft-inN/A
accelerator-lowering-fma.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
metadata-evalN/A
metadata-evalN/A
*-commutativeN/A
*-lowering-*.f6483.5
Simplified83.5%
Taylor expanded in x2 around 0
+-commutativeN/A
+-commutativeN/A
associate-+l+N/A
distribute-lft1-inN/A
metadata-evalN/A
accelerator-lowering-fma.f64N/A
associate--l+N/A
*-commutativeN/A
accelerator-lowering-fma.f64N/A
sub-negN/A
metadata-evalN/A
accelerator-lowering-fma.f64N/A
*-lowering-*.f64N/A
mul-1-negN/A
neg-sub0N/A
--lowering--.f6499.3
Simplified99.3%
if 35 < x1 Initial program 49.1%
Taylor expanded in x1 around -inf
*-lowering-*.f64N/A
pow-lowering-pow.f64N/A
mul-1-negN/A
unsub-negN/A
--lowering--.f64N/A
/-lowering-/.f64N/A
Simplified94.5%
Taylor expanded in x1 around 0
*-lowering-*.f64N/A
+-commutativeN/A
accelerator-lowering-fma.f64N/A
associate-+r+N/A
+-commutativeN/A
accelerator-lowering-fma.f64N/A
sub-negN/A
*-commutativeN/A
metadata-evalN/A
accelerator-lowering-fma.f64N/A
+-commutativeN/A
accelerator-lowering-fma.f64N/A
sub-negN/A
metadata-evalN/A
*-commutativeN/A
accelerator-lowering-fma.f6494.5
Simplified94.5%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0
(*
x1
(fma
x1
(fma x1 (fma x1 6.0 -3.0) (fma 4.0 (fma x2 2.0 -3.0) 9.0))
1.0))))
(if (<= x1 -1.4e+14)
t_0
(if (<= x1 2700.0)
(fma x2 (fma x1 -12.0 (fma 8.0 (* x1 x2) -6.0)) (- 0.0 x1))
t_0))))
double code(double x1, double x2) {
double t_0 = x1 * fma(x1, fma(x1, fma(x1, 6.0, -3.0), fma(4.0, fma(x2, 2.0, -3.0), 9.0)), 1.0);
double tmp;
if (x1 <= -1.4e+14) {
tmp = t_0;
} else if (x1 <= 2700.0) {
tmp = fma(x2, fma(x1, -12.0, fma(8.0, (x1 * x2), -6.0)), (0.0 - x1));
} else {
tmp = t_0;
}
return tmp;
}
function code(x1, x2) t_0 = Float64(x1 * fma(x1, fma(x1, fma(x1, 6.0, -3.0), fma(4.0, fma(x2, 2.0, -3.0), 9.0)), 1.0)) tmp = 0.0 if (x1 <= -1.4e+14) tmp = t_0; elseif (x1 <= 2700.0) tmp = fma(x2, fma(x1, -12.0, fma(8.0, Float64(x1 * x2), -6.0)), Float64(0.0 - x1)); else tmp = t_0; end return tmp end
code[x1_, x2_] := Block[{t$95$0 = N[(x1 * N[(x1 * N[(x1 * N[(x1 * 6.0 + -3.0), $MachinePrecision] + N[(4.0 * N[(x2 * 2.0 + -3.0), $MachinePrecision] + 9.0), $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x1, -1.4e+14], t$95$0, If[LessEqual[x1, 2700.0], N[(x2 * N[(x1 * -12.0 + N[(8.0 * N[(x1 * x2), $MachinePrecision] + -6.0), $MachinePrecision]), $MachinePrecision] + N[(0.0 - x1), $MachinePrecision]), $MachinePrecision], t$95$0]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x1 \cdot \mathsf{fma}\left(x1, \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), 1\right)\\
\mathbf{if}\;x1 \leq -1.4 \cdot 10^{+14}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;x1 \leq 2700:\\
\;\;\;\;\mathsf{fma}\left(x2, \mathsf{fma}\left(x1, -12, \mathsf{fma}\left(8, x1 \cdot x2, -6\right)\right), 0 - x1\right)\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
if x1 < -1.4e14 or 2700 < x1 Initial program 40.3%
Taylor expanded in x1 around -inf
*-lowering-*.f64N/A
pow-lowering-pow.f64N/A
mul-1-negN/A
unsub-negN/A
--lowering--.f64N/A
/-lowering-/.f64N/A
Simplified95.9%
Taylor expanded in x1 around 0
*-lowering-*.f64N/A
+-commutativeN/A
accelerator-lowering-fma.f64N/A
associate-+r+N/A
+-commutativeN/A
accelerator-lowering-fma.f64N/A
sub-negN/A
*-commutativeN/A
metadata-evalN/A
accelerator-lowering-fma.f64N/A
+-commutativeN/A
accelerator-lowering-fma.f64N/A
sub-negN/A
metadata-evalN/A
*-commutativeN/A
accelerator-lowering-fma.f6495.9
Simplified95.9%
if -1.4e14 < x1 < 2700Initial program 98.8%
Taylor expanded in x1 around 0
+-commutativeN/A
accelerator-lowering-fma.f64N/A
sub-negN/A
*-commutativeN/A
associate-*l*N/A
*-commutativeN/A
metadata-evalN/A
accelerator-lowering-fma.f64N/A
sub-negN/A
distribute-lft-inN/A
accelerator-lowering-fma.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
metadata-evalN/A
metadata-evalN/A
*-commutativeN/A
*-lowering-*.f6483.5
Simplified83.5%
Taylor expanded in x2 around 0
+-commutativeN/A
+-commutativeN/A
associate-+l+N/A
distribute-lft1-inN/A
metadata-evalN/A
accelerator-lowering-fma.f64N/A
associate--l+N/A
*-commutativeN/A
accelerator-lowering-fma.f64N/A
sub-negN/A
metadata-evalN/A
accelerator-lowering-fma.f64N/A
*-lowering-*.f64N/A
mul-1-negN/A
neg-sub0N/A
--lowering--.f6499.3
Simplified99.3%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (fma (* x1 (* x1 (fma x1 x1 0.0))) 6.0 x1)))
(if (<= x1 -5.2e+14)
t_0
(if (<= x1 -2.6e-26)
(fma (* x2 (* x1 8.0)) x2 x1)
(if (<= x1 1.35)
(+ x1 (fma x1 (fma x2 -12.0 -2.0) (* x2 -6.0)))
t_0)))))
double code(double x1, double x2) {
double t_0 = fma((x1 * (x1 * fma(x1, x1, 0.0))), 6.0, x1);
double tmp;
if (x1 <= -5.2e+14) {
tmp = t_0;
} else if (x1 <= -2.6e-26) {
tmp = fma((x2 * (x1 * 8.0)), x2, x1);
} else if (x1 <= 1.35) {
tmp = x1 + fma(x1, fma(x2, -12.0, -2.0), (x2 * -6.0));
} else {
tmp = t_0;
}
return tmp;
}
function code(x1, x2) t_0 = fma(Float64(x1 * Float64(x1 * fma(x1, x1, 0.0))), 6.0, x1) tmp = 0.0 if (x1 <= -5.2e+14) tmp = t_0; elseif (x1 <= -2.6e-26) tmp = fma(Float64(x2 * Float64(x1 * 8.0)), x2, x1); elseif (x1 <= 1.35) tmp = Float64(x1 + fma(x1, fma(x2, -12.0, -2.0), Float64(x2 * -6.0))); else tmp = t_0; end return tmp end
code[x1_, x2_] := Block[{t$95$0 = N[(N[(x1 * N[(x1 * N[(x1 * x1 + 0.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * 6.0 + x1), $MachinePrecision]}, If[LessEqual[x1, -5.2e+14], t$95$0, If[LessEqual[x1, -2.6e-26], N[(N[(x2 * N[(x1 * 8.0), $MachinePrecision]), $MachinePrecision] * x2 + x1), $MachinePrecision], If[LessEqual[x1, 1.35], N[(x1 + N[(x1 * N[(x2 * -12.0 + -2.0), $MachinePrecision] + N[(x2 * -6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$0]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \mathsf{fma}\left(x1 \cdot \left(x1 \cdot \mathsf{fma}\left(x1, x1, 0\right)\right), 6, x1\right)\\
\mathbf{if}\;x1 \leq -5.2 \cdot 10^{+14}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;x1 \leq -2.6 \cdot 10^{-26}:\\
\;\;\;\;\mathsf{fma}\left(x2 \cdot \left(x1 \cdot 8\right), x2, x1\right)\\
\mathbf{elif}\;x1 \leq 1.35:\\
\;\;\;\;x1 + \mathsf{fma}\left(x1, \mathsf{fma}\left(x2, -12, -2\right), x2 \cdot -6\right)\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
if x1 < -5.2e14 or 1.3500000000000001 < x1 Initial program 40.8%
Taylor expanded in x1 around inf
*-lowering-*.f64N/A
pow-lowering-pow.f6490.1
Simplified90.1%
+-commutativeN/A
metadata-evalN/A
pow-powN/A
pow2N/A
pow2N/A
*-commutativeN/A
accelerator-lowering-fma.f64N/A
associate-*l*N/A
associate-*l*N/A
*-lowering-*.f64N/A
associate-*l*N/A
*-lowering-*.f64N/A
+-lft-identityN/A
+-commutativeN/A
distribute-rgt-outN/A
mul0-lftN/A
accelerator-lowering-fma.f6490.1
Applied egg-rr90.1%
if -5.2e14 < x1 < -2.6000000000000001e-26Initial program 100.0%
Taylor expanded in x1 around 0
+-commutativeN/A
accelerator-lowering-fma.f64N/A
sub-negN/A
*-commutativeN/A
associate-*l*N/A
*-commutativeN/A
metadata-evalN/A
accelerator-lowering-fma.f64N/A
sub-negN/A
distribute-lft-inN/A
accelerator-lowering-fma.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
metadata-evalN/A
metadata-evalN/A
*-commutativeN/A
*-lowering-*.f6481.6
Simplified81.6%
Taylor expanded in x2 around inf
*-lowering-*.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6481.6
Simplified81.6%
+-commutativeN/A
associate-*r*N/A
associate-*r*N/A
accelerator-lowering-fma.f64N/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f64100.0
Applied egg-rr100.0%
if -2.6000000000000001e-26 < x1 < 1.3500000000000001Initial program 98.8%
Taylor expanded in x1 around 0
+-commutativeN/A
accelerator-lowering-fma.f64N/A
sub-negN/A
*-commutativeN/A
associate-*l*N/A
*-commutativeN/A
metadata-evalN/A
accelerator-lowering-fma.f64N/A
sub-negN/A
distribute-lft-inN/A
accelerator-lowering-fma.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
metadata-evalN/A
metadata-evalN/A
*-commutativeN/A
*-lowering-*.f6483.5
Simplified83.5%
Taylor expanded in x2 around 0
Simplified80.0%
Final simplification85.2%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (* x1 (fma 6.0 (* x1 (* x1 x1)) 1.0))))
(if (<= x1 -2e+14)
t_0
(if (<= x1 -1.7e-25)
(fma (* x2 (* x1 8.0)) x2 x1)
(if (<= x1 1.35)
(+ x1 (fma x1 (fma x2 -12.0 -2.0) (* x2 -6.0)))
t_0)))))
double code(double x1, double x2) {
double t_0 = x1 * fma(6.0, (x1 * (x1 * x1)), 1.0);
double tmp;
if (x1 <= -2e+14) {
tmp = t_0;
} else if (x1 <= -1.7e-25) {
tmp = fma((x2 * (x1 * 8.0)), x2, x1);
} else if (x1 <= 1.35) {
tmp = x1 + fma(x1, fma(x2, -12.0, -2.0), (x2 * -6.0));
} else {
tmp = t_0;
}
return tmp;
}
function code(x1, x2) t_0 = Float64(x1 * fma(6.0, Float64(x1 * Float64(x1 * x1)), 1.0)) tmp = 0.0 if (x1 <= -2e+14) tmp = t_0; elseif (x1 <= -1.7e-25) tmp = fma(Float64(x2 * Float64(x1 * 8.0)), x2, x1); elseif (x1 <= 1.35) tmp = Float64(x1 + fma(x1, fma(x2, -12.0, -2.0), Float64(x2 * -6.0))); else tmp = t_0; end return tmp end
code[x1_, x2_] := Block[{t$95$0 = N[(x1 * N[(6.0 * N[(x1 * N[(x1 * x1), $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x1, -2e+14], t$95$0, If[LessEqual[x1, -1.7e-25], N[(N[(x2 * N[(x1 * 8.0), $MachinePrecision]), $MachinePrecision] * x2 + x1), $MachinePrecision], If[LessEqual[x1, 1.35], N[(x1 + N[(x1 * N[(x2 * -12.0 + -2.0), $MachinePrecision] + N[(x2 * -6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$0]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x1 \cdot \mathsf{fma}\left(6, x1 \cdot \left(x1 \cdot x1\right), 1\right)\\
\mathbf{if}\;x1 \leq -2 \cdot 10^{+14}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;x1 \leq -1.7 \cdot 10^{-25}:\\
\;\;\;\;\mathsf{fma}\left(x2 \cdot \left(x1 \cdot 8\right), x2, x1\right)\\
\mathbf{elif}\;x1 \leq 1.35:\\
\;\;\;\;x1 + \mathsf{fma}\left(x1, \mathsf{fma}\left(x2, -12, -2\right), x2 \cdot -6\right)\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
if x1 < -2e14 or 1.3500000000000001 < x1 Initial program 40.8%
Taylor expanded in x1 around inf
*-lowering-*.f64N/A
pow-lowering-pow.f6490.1
Simplified90.1%
Taylor expanded in x1 around 0
*-lowering-*.f64N/A
+-commutativeN/A
accelerator-lowering-fma.f64N/A
cube-multN/A
unpow2N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6490.1
Simplified90.1%
if -2e14 < x1 < -1.70000000000000001e-25Initial program 100.0%
Taylor expanded in x1 around 0
+-commutativeN/A
accelerator-lowering-fma.f64N/A
sub-negN/A
*-commutativeN/A
associate-*l*N/A
*-commutativeN/A
metadata-evalN/A
accelerator-lowering-fma.f64N/A
sub-negN/A
distribute-lft-inN/A
accelerator-lowering-fma.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
metadata-evalN/A
metadata-evalN/A
*-commutativeN/A
*-lowering-*.f6481.6
Simplified81.6%
Taylor expanded in x2 around inf
*-lowering-*.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6481.6
Simplified81.6%
+-commutativeN/A
associate-*r*N/A
associate-*r*N/A
accelerator-lowering-fma.f64N/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f64100.0
Applied egg-rr100.0%
if -1.70000000000000001e-25 < x1 < 1.3500000000000001Initial program 98.8%
Taylor expanded in x1 around 0
+-commutativeN/A
accelerator-lowering-fma.f64N/A
sub-negN/A
*-commutativeN/A
associate-*l*N/A
*-commutativeN/A
metadata-evalN/A
accelerator-lowering-fma.f64N/A
sub-negN/A
distribute-lft-inN/A
accelerator-lowering-fma.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
metadata-evalN/A
metadata-evalN/A
*-commutativeN/A
*-lowering-*.f6483.5
Simplified83.5%
Taylor expanded in x2 around 0
Simplified80.0%
Final simplification85.2%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (fma (* x1 (* x1 (fma x1 x1 0.0))) 6.0 x1)))
(if (<= x1 -1.9e+16)
t_0
(if (<= x1 6.5e+24)
(fma x2 (fma x1 -12.0 (fma 8.0 (* x1 x2) -6.0)) (- 0.0 x1))
t_0))))
double code(double x1, double x2) {
double t_0 = fma((x1 * (x1 * fma(x1, x1, 0.0))), 6.0, x1);
double tmp;
if (x1 <= -1.9e+16) {
tmp = t_0;
} else if (x1 <= 6.5e+24) {
tmp = fma(x2, fma(x1, -12.0, fma(8.0, (x1 * x2), -6.0)), (0.0 - x1));
} else {
tmp = t_0;
}
return tmp;
}
function code(x1, x2) t_0 = fma(Float64(x1 * Float64(x1 * fma(x1, x1, 0.0))), 6.0, x1) tmp = 0.0 if (x1 <= -1.9e+16) tmp = t_0; elseif (x1 <= 6.5e+24) tmp = fma(x2, fma(x1, -12.0, fma(8.0, Float64(x1 * x2), -6.0)), Float64(0.0 - x1)); else tmp = t_0; end return tmp end
code[x1_, x2_] := Block[{t$95$0 = N[(N[(x1 * N[(x1 * N[(x1 * x1 + 0.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * 6.0 + x1), $MachinePrecision]}, If[LessEqual[x1, -1.9e+16], t$95$0, If[LessEqual[x1, 6.5e+24], N[(x2 * N[(x1 * -12.0 + N[(8.0 * N[(x1 * x2), $MachinePrecision] + -6.0), $MachinePrecision]), $MachinePrecision] + N[(0.0 - x1), $MachinePrecision]), $MachinePrecision], t$95$0]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \mathsf{fma}\left(x1 \cdot \left(x1 \cdot \mathsf{fma}\left(x1, x1, 0\right)\right), 6, x1\right)\\
\mathbf{if}\;x1 \leq -1.9 \cdot 10^{+16}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;x1 \leq 6.5 \cdot 10^{+24}:\\
\;\;\;\;\mathsf{fma}\left(x2, \mathsf{fma}\left(x1, -12, \mathsf{fma}\left(8, x1 \cdot x2, -6\right)\right), 0 - x1\right)\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
if x1 < -1.9e16 or 6.4999999999999996e24 < x1 Initial program 37.2%
Taylor expanded in x1 around inf
*-lowering-*.f64N/A
pow-lowering-pow.f6494.1
Simplified94.1%
+-commutativeN/A
metadata-evalN/A
pow-powN/A
pow2N/A
pow2N/A
*-commutativeN/A
accelerator-lowering-fma.f64N/A
associate-*l*N/A
associate-*l*N/A
*-lowering-*.f64N/A
associate-*l*N/A
*-lowering-*.f64N/A
+-lft-identityN/A
+-commutativeN/A
distribute-rgt-outN/A
mul0-lftN/A
accelerator-lowering-fma.f6494.2
Applied egg-rr94.2%
if -1.9e16 < x1 < 6.4999999999999996e24Initial program 98.8%
Taylor expanded in x1 around 0
+-commutativeN/A
accelerator-lowering-fma.f64N/A
sub-negN/A
*-commutativeN/A
associate-*l*N/A
*-commutativeN/A
metadata-evalN/A
accelerator-lowering-fma.f64N/A
sub-negN/A
distribute-lft-inN/A
accelerator-lowering-fma.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
metadata-evalN/A
metadata-evalN/A
*-commutativeN/A
*-lowering-*.f6481.5
Simplified81.5%
Taylor expanded in x2 around 0
+-commutativeN/A
+-commutativeN/A
associate-+l+N/A
distribute-lft1-inN/A
metadata-evalN/A
accelerator-lowering-fma.f64N/A
associate--l+N/A
*-commutativeN/A
accelerator-lowering-fma.f64N/A
sub-negN/A
metadata-evalN/A
accelerator-lowering-fma.f64N/A
*-lowering-*.f64N/A
mul-1-negN/A
neg-sub0N/A
--lowering--.f6496.6
Simplified96.6%
(FPCore (x1 x2)
:precision binary64
(if (<= x1 -3e+141)
(/ (fma x1 x1 0.0) (- 0.0 x1))
(if (<= x1 2.4e-12)
(+ x1 (fma x1 (fma x2 -12.0 -2.0) (* x2 -6.0)))
(if (<= x1 2e+271)
(fma (* x2 (* x1 8.0)) x2 x1)
(* x2 (+ -6.0 (/ x1 x2)))))))
double code(double x1, double x2) {
double tmp;
if (x1 <= -3e+141) {
tmp = fma(x1, x1, 0.0) / (0.0 - x1);
} else if (x1 <= 2.4e-12) {
tmp = x1 + fma(x1, fma(x2, -12.0, -2.0), (x2 * -6.0));
} else if (x1 <= 2e+271) {
tmp = fma((x2 * (x1 * 8.0)), x2, x1);
} else {
tmp = x2 * (-6.0 + (x1 / x2));
}
return tmp;
}
function code(x1, x2) tmp = 0.0 if (x1 <= -3e+141) tmp = Float64(fma(x1, x1, 0.0) / Float64(0.0 - x1)); elseif (x1 <= 2.4e-12) tmp = Float64(x1 + fma(x1, fma(x2, -12.0, -2.0), Float64(x2 * -6.0))); elseif (x1 <= 2e+271) tmp = fma(Float64(x2 * Float64(x1 * 8.0)), x2, x1); else tmp = Float64(x2 * Float64(-6.0 + Float64(x1 / x2))); end return tmp end
code[x1_, x2_] := If[LessEqual[x1, -3e+141], N[(N[(x1 * x1 + 0.0), $MachinePrecision] / N[(0.0 - x1), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 2.4e-12], N[(x1 + N[(x1 * N[(x2 * -12.0 + -2.0), $MachinePrecision] + N[(x2 * -6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 2e+271], N[(N[(x2 * N[(x1 * 8.0), $MachinePrecision]), $MachinePrecision] * x2 + x1), $MachinePrecision], N[(x2 * N[(-6.0 + N[(x1 / x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x1 \leq -3 \cdot 10^{+141}:\\
\;\;\;\;\frac{\mathsf{fma}\left(x1, x1, 0\right)}{0 - x1}\\
\mathbf{elif}\;x1 \leq 2.4 \cdot 10^{-12}:\\
\;\;\;\;x1 + \mathsf{fma}\left(x1, \mathsf{fma}\left(x2, -12, -2\right), x2 \cdot -6\right)\\
\mathbf{elif}\;x1 \leq 2 \cdot 10^{+271}:\\
\;\;\;\;\mathsf{fma}\left(x2 \cdot \left(x1 \cdot 8\right), x2, x1\right)\\
\mathbf{else}:\\
\;\;\;\;x2 \cdot \left(-6 + \frac{x1}{x2}\right)\\
\end{array}
\end{array}
if x1 < -2.9999999999999999e141Initial program 0.0%
Taylor expanded in x1 around 0
+-commutativeN/A
accelerator-lowering-fma.f64N/A
sub-negN/A
*-commutativeN/A
associate-*l*N/A
*-commutativeN/A
metadata-evalN/A
accelerator-lowering-fma.f64N/A
sub-negN/A
distribute-lft-inN/A
accelerator-lowering-fma.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
metadata-evalN/A
metadata-evalN/A
*-commutativeN/A
*-lowering-*.f643.2
Simplified3.2%
Taylor expanded in x2 around 0
distribute-rgt1-inN/A
metadata-evalN/A
mul-1-negN/A
neg-sub0N/A
--lowering--.f646.9
Simplified6.9%
flip--N/A
+-lft-identityN/A
/-lowering-/.f64N/A
metadata-evalN/A
--lowering--.f64N/A
+-lft-identityN/A
+-commutativeN/A
distribute-rgt-outN/A
mul0-lftN/A
accelerator-lowering-fma.f6490.5
Applied egg-rr90.5%
if -2.9999999999999999e141 < x1 < 2.39999999999999987e-12Initial program 95.6%
Taylor expanded in x1 around 0
+-commutativeN/A
accelerator-lowering-fma.f64N/A
sub-negN/A
*-commutativeN/A
associate-*l*N/A
*-commutativeN/A
metadata-evalN/A
accelerator-lowering-fma.f64N/A
sub-negN/A
distribute-lft-inN/A
accelerator-lowering-fma.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
metadata-evalN/A
metadata-evalN/A
*-commutativeN/A
*-lowering-*.f6474.3
Simplified74.3%
Taylor expanded in x2 around 0
Simplified70.1%
if 2.39999999999999987e-12 < x1 < 1.99999999999999991e271Initial program 59.1%
Taylor expanded in x1 around 0
+-commutativeN/A
accelerator-lowering-fma.f64N/A
sub-negN/A
*-commutativeN/A
associate-*l*N/A
*-commutativeN/A
metadata-evalN/A
accelerator-lowering-fma.f64N/A
sub-negN/A
distribute-lft-inN/A
accelerator-lowering-fma.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
metadata-evalN/A
metadata-evalN/A
*-commutativeN/A
*-lowering-*.f6436.5
Simplified36.5%
Taylor expanded in x2 around inf
*-lowering-*.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6439.7
Simplified39.7%
+-commutativeN/A
associate-*r*N/A
associate-*r*N/A
accelerator-lowering-fma.f64N/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f6439.7
Applied egg-rr39.7%
if 1.99999999999999991e271 < x1 Initial program 0.0%
Taylor expanded in x1 around 0
*-commutativeN/A
*-lowering-*.f6410.4
Simplified10.4%
Taylor expanded in x2 around inf
*-lowering-*.f64N/A
sub-negN/A
metadata-evalN/A
+-lowering-+.f64N/A
/-lowering-/.f6476.1
Simplified76.1%
Final simplification65.1%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (+ x1 (* -6.0 (+ x1 x2)))))
(if (<= (* 2.0 x2) -1e-193)
t_0
(if (<= (* 2.0 x2) 1e-144) (- 0.0 x1) t_0))))
double code(double x1, double x2) {
double t_0 = x1 + (-6.0 * (x1 + x2));
double tmp;
if ((2.0 * x2) <= -1e-193) {
tmp = t_0;
} else if ((2.0 * x2) <= 1e-144) {
tmp = 0.0 - x1;
} else {
tmp = t_0;
}
return tmp;
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
real(8) :: t_0
real(8) :: tmp
t_0 = x1 + ((-6.0d0) * (x1 + x2))
if ((2.0d0 * x2) <= (-1d-193)) then
tmp = t_0
else if ((2.0d0 * x2) <= 1d-144) then
tmp = 0.0d0 - x1
else
tmp = t_0
end if
code = tmp
end function
public static double code(double x1, double x2) {
double t_0 = x1 + (-6.0 * (x1 + x2));
double tmp;
if ((2.0 * x2) <= -1e-193) {
tmp = t_0;
} else if ((2.0 * x2) <= 1e-144) {
tmp = 0.0 - x1;
} else {
tmp = t_0;
}
return tmp;
}
def code(x1, x2): t_0 = x1 + (-6.0 * (x1 + x2)) tmp = 0 if (2.0 * x2) <= -1e-193: tmp = t_0 elif (2.0 * x2) <= 1e-144: tmp = 0.0 - x1 else: tmp = t_0 return tmp
function code(x1, x2) t_0 = Float64(x1 + Float64(-6.0 * Float64(x1 + x2))) tmp = 0.0 if (Float64(2.0 * x2) <= -1e-193) tmp = t_0; elseif (Float64(2.0 * x2) <= 1e-144) tmp = Float64(0.0 - x1); else tmp = t_0; end return tmp end
function tmp_2 = code(x1, x2) t_0 = x1 + (-6.0 * (x1 + x2)); tmp = 0.0; if ((2.0 * x2) <= -1e-193) tmp = t_0; elseif ((2.0 * x2) <= 1e-144) tmp = 0.0 - x1; else tmp = t_0; end tmp_2 = tmp; end
code[x1_, x2_] := Block[{t$95$0 = N[(x1 + N[(-6.0 * N[(x1 + x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(2.0 * x2), $MachinePrecision], -1e-193], t$95$0, If[LessEqual[N[(2.0 * x2), $MachinePrecision], 1e-144], N[(0.0 - x1), $MachinePrecision], t$95$0]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x1 + -6 \cdot \left(x1 + x2\right)\\
\mathbf{if}\;2 \cdot x2 \leq -1 \cdot 10^{-193}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;2 \cdot x2 \leq 10^{-144}:\\
\;\;\;\;0 - x1\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
if (*.f64 #s(literal 2 binary64) x2) < -1e-193 or 9.9999999999999995e-145 < (*.f64 #s(literal 2 binary64) x2) Initial program 70.4%
Taylor expanded in x1 around inf
unpow2N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
--lowering--.f64N/A
associate-*r/N/A
metadata-evalN/A
/-lowering-/.f6449.1
Simplified49.1%
associate-+l+N/A
*-commutativeN/A
associate-*r*N/A
accelerator-lowering-fma.f64N/A
Applied egg-rr54.9%
Taylor expanded in x1 around 0
distribute-lft-outN/A
*-lowering-*.f64N/A
+-lowering-+.f6438.0
Simplified38.0%
if -1e-193 < (*.f64 #s(literal 2 binary64) x2) < 9.9999999999999995e-145Initial program 73.8%
Taylor expanded in x1 around 0
+-commutativeN/A
accelerator-lowering-fma.f64N/A
sub-negN/A
*-commutativeN/A
associate-*l*N/A
*-commutativeN/A
metadata-evalN/A
accelerator-lowering-fma.f64N/A
sub-negN/A
distribute-lft-inN/A
accelerator-lowering-fma.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
metadata-evalN/A
metadata-evalN/A
*-commutativeN/A
*-lowering-*.f6449.7
Simplified49.7%
Taylor expanded in x2 around 0
distribute-rgt1-inN/A
metadata-evalN/A
mul-1-negN/A
neg-sub0N/A
--lowering--.f6443.9
Simplified43.9%
sub0-negN/A
neg-lowering-neg.f6443.9
Applied egg-rr43.9%
Final simplification39.3%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (+ x1 (* x2 -6.0))))
(if (<= (* 2.0 x2) -5e-191)
t_0
(if (<= (* 2.0 x2) 5e-150) (- 0.0 x1) t_0))))
double code(double x1, double x2) {
double t_0 = x1 + (x2 * -6.0);
double tmp;
if ((2.0 * x2) <= -5e-191) {
tmp = t_0;
} else if ((2.0 * x2) <= 5e-150) {
tmp = 0.0 - x1;
} else {
tmp = t_0;
}
return tmp;
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
real(8) :: t_0
real(8) :: tmp
t_0 = x1 + (x2 * (-6.0d0))
if ((2.0d0 * x2) <= (-5d-191)) then
tmp = t_0
else if ((2.0d0 * x2) <= 5d-150) then
tmp = 0.0d0 - x1
else
tmp = t_0
end if
code = tmp
end function
public static double code(double x1, double x2) {
double t_0 = x1 + (x2 * -6.0);
double tmp;
if ((2.0 * x2) <= -5e-191) {
tmp = t_0;
} else if ((2.0 * x2) <= 5e-150) {
tmp = 0.0 - x1;
} else {
tmp = t_0;
}
return tmp;
}
def code(x1, x2): t_0 = x1 + (x2 * -6.0) tmp = 0 if (2.0 * x2) <= -5e-191: tmp = t_0 elif (2.0 * x2) <= 5e-150: tmp = 0.0 - x1 else: tmp = t_0 return tmp
function code(x1, x2) t_0 = Float64(x1 + Float64(x2 * -6.0)) tmp = 0.0 if (Float64(2.0 * x2) <= -5e-191) tmp = t_0; elseif (Float64(2.0 * x2) <= 5e-150) tmp = Float64(0.0 - x1); else tmp = t_0; end return tmp end
function tmp_2 = code(x1, x2) t_0 = x1 + (x2 * -6.0); tmp = 0.0; if ((2.0 * x2) <= -5e-191) tmp = t_0; elseif ((2.0 * x2) <= 5e-150) tmp = 0.0 - x1; else tmp = t_0; end tmp_2 = tmp; end
code[x1_, x2_] := Block[{t$95$0 = N[(x1 + N[(x2 * -6.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(2.0 * x2), $MachinePrecision], -5e-191], t$95$0, If[LessEqual[N[(2.0 * x2), $MachinePrecision], 5e-150], N[(0.0 - x1), $MachinePrecision], t$95$0]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x1 + x2 \cdot -6\\
\mathbf{if}\;2 \cdot x2 \leq -5 \cdot 10^{-191}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;2 \cdot x2 \leq 5 \cdot 10^{-150}:\\
\;\;\;\;0 - x1\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
if (*.f64 #s(literal 2 binary64) x2) < -5.0000000000000001e-191 or 4.9999999999999999e-150 < (*.f64 #s(literal 2 binary64) x2) Initial program 70.9%
Taylor expanded in x1 around 0
*-commutativeN/A
*-lowering-*.f6437.5
Simplified37.5%
if -5.0000000000000001e-191 < (*.f64 #s(literal 2 binary64) x2) < 4.9999999999999999e-150Initial program 72.0%
Taylor expanded in x1 around 0
+-commutativeN/A
accelerator-lowering-fma.f64N/A
sub-negN/A
*-commutativeN/A
associate-*l*N/A
*-commutativeN/A
metadata-evalN/A
accelerator-lowering-fma.f64N/A
sub-negN/A
distribute-lft-inN/A
accelerator-lowering-fma.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
metadata-evalN/A
metadata-evalN/A
*-commutativeN/A
*-lowering-*.f6449.8
Simplified49.8%
Taylor expanded in x2 around 0
distribute-rgt1-inN/A
metadata-evalN/A
mul-1-negN/A
neg-sub0N/A
--lowering--.f6444.0
Simplified44.0%
sub0-negN/A
neg-lowering-neg.f6444.0
Applied egg-rr44.0%
Final simplification38.9%
(FPCore (x1 x2) :precision binary64 (if (<= (* 2.0 x2) -5e-191) (fma x2 -6.0 x1) (if (<= (* 2.0 x2) 2e-140) (- 0.0 x1) (fma x2 -6.0 x1))))
double code(double x1, double x2) {
double tmp;
if ((2.0 * x2) <= -5e-191) {
tmp = fma(x2, -6.0, x1);
} else if ((2.0 * x2) <= 2e-140) {
tmp = 0.0 - x1;
} else {
tmp = fma(x2, -6.0, x1);
}
return tmp;
}
function code(x1, x2) tmp = 0.0 if (Float64(2.0 * x2) <= -5e-191) tmp = fma(x2, -6.0, x1); elseif (Float64(2.0 * x2) <= 2e-140) tmp = Float64(0.0 - x1); else tmp = fma(x2, -6.0, x1); end return tmp end
code[x1_, x2_] := If[LessEqual[N[(2.0 * x2), $MachinePrecision], -5e-191], N[(x2 * -6.0 + x1), $MachinePrecision], If[LessEqual[N[(2.0 * x2), $MachinePrecision], 2e-140], N[(0.0 - x1), $MachinePrecision], N[(x2 * -6.0 + x1), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;2 \cdot x2 \leq -5 \cdot 10^{-191}:\\
\;\;\;\;\mathsf{fma}\left(x2, -6, x1\right)\\
\mathbf{elif}\;2 \cdot x2 \leq 2 \cdot 10^{-140}:\\
\;\;\;\;0 - x1\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(x2, -6, x1\right)\\
\end{array}
\end{array}
if (*.f64 #s(literal 2 binary64) x2) < -5.0000000000000001e-191 or 2e-140 < (*.f64 #s(literal 2 binary64) x2) Initial program 70.5%
Taylor expanded in x1 around 0
*-commutativeN/A
*-lowering-*.f6437.6
Simplified37.6%
+-commutativeN/A
accelerator-lowering-fma.f6437.6
Applied egg-rr37.6%
if -5.0000000000000001e-191 < (*.f64 #s(literal 2 binary64) x2) < 2e-140Initial program 73.4%
Taylor expanded in x1 around 0
+-commutativeN/A
accelerator-lowering-fma.f64N/A
sub-negN/A
*-commutativeN/A
associate-*l*N/A
*-commutativeN/A
metadata-evalN/A
accelerator-lowering-fma.f64N/A
sub-negN/A
distribute-lft-inN/A
accelerator-lowering-fma.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
metadata-evalN/A
metadata-evalN/A
*-commutativeN/A
*-lowering-*.f6450.7
Simplified50.7%
Taylor expanded in x2 around 0
distribute-rgt1-inN/A
metadata-evalN/A
mul-1-negN/A
neg-sub0N/A
--lowering--.f6443.5
Simplified43.5%
sub0-negN/A
neg-lowering-neg.f6443.5
Applied egg-rr43.5%
Final simplification38.9%
(FPCore (x1 x2) :precision binary64 (if (<= (* 2.0 x2) -5e-191) (* x2 -6.0) (if (<= (* 2.0 x2) 5e-150) (- 0.0 x1) (* x2 -6.0))))
double code(double x1, double x2) {
double tmp;
if ((2.0 * x2) <= -5e-191) {
tmp = x2 * -6.0;
} else if ((2.0 * x2) <= 5e-150) {
tmp = 0.0 - 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-191)) then
tmp = x2 * (-6.0d0)
else if ((2.0d0 * x2) <= 5d-150) then
tmp = 0.0d0 - 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-191) {
tmp = x2 * -6.0;
} else if ((2.0 * x2) <= 5e-150) {
tmp = 0.0 - x1;
} else {
tmp = x2 * -6.0;
}
return tmp;
}
def code(x1, x2): tmp = 0 if (2.0 * x2) <= -5e-191: tmp = x2 * -6.0 elif (2.0 * x2) <= 5e-150: tmp = 0.0 - x1 else: tmp = x2 * -6.0 return tmp
function code(x1, x2) tmp = 0.0 if (Float64(2.0 * x2) <= -5e-191) tmp = Float64(x2 * -6.0); elseif (Float64(2.0 * x2) <= 5e-150) tmp = Float64(0.0 - 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-191) tmp = x2 * -6.0; elseif ((2.0 * x2) <= 5e-150) tmp = 0.0 - x1; else tmp = x2 * -6.0; end tmp_2 = tmp; end
code[x1_, x2_] := If[LessEqual[N[(2.0 * x2), $MachinePrecision], -5e-191], N[(x2 * -6.0), $MachinePrecision], If[LessEqual[N[(2.0 * x2), $MachinePrecision], 5e-150], N[(0.0 - x1), $MachinePrecision], N[(x2 * -6.0), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;2 \cdot x2 \leq -5 \cdot 10^{-191}:\\
\;\;\;\;x2 \cdot -6\\
\mathbf{elif}\;2 \cdot x2 \leq 5 \cdot 10^{-150}:\\
\;\;\;\;0 - x1\\
\mathbf{else}:\\
\;\;\;\;x2 \cdot -6\\
\end{array}
\end{array}
if (*.f64 #s(literal 2 binary64) x2) < -5.0000000000000001e-191 or 4.9999999999999999e-150 < (*.f64 #s(literal 2 binary64) x2) Initial program 70.9%
Taylor expanded in x1 around 0
*-commutativeN/A
*-lowering-*.f6437.5
Simplified37.5%
Taylor expanded in x1 around 0
*-commutativeN/A
*-lowering-*.f6437.3
Simplified37.3%
if -5.0000000000000001e-191 < (*.f64 #s(literal 2 binary64) x2) < 4.9999999999999999e-150Initial program 72.0%
Taylor expanded in x1 around 0
+-commutativeN/A
accelerator-lowering-fma.f64N/A
sub-negN/A
*-commutativeN/A
associate-*l*N/A
*-commutativeN/A
metadata-evalN/A
accelerator-lowering-fma.f64N/A
sub-negN/A
distribute-lft-inN/A
accelerator-lowering-fma.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
metadata-evalN/A
metadata-evalN/A
*-commutativeN/A
*-lowering-*.f6449.8
Simplified49.8%
Taylor expanded in x2 around 0
distribute-rgt1-inN/A
metadata-evalN/A
mul-1-negN/A
neg-sub0N/A
--lowering--.f6444.0
Simplified44.0%
sub0-negN/A
neg-lowering-neg.f6444.0
Applied egg-rr44.0%
Final simplification38.7%
(FPCore (x1 x2) :precision binary64 (+ x1 (fma x1 -2.0 (* x2 -6.0))))
double code(double x1, double x2) {
return x1 + fma(x1, -2.0, (x2 * -6.0));
}
function code(x1, x2) return Float64(x1 + fma(x1, -2.0, Float64(x2 * -6.0))) end
code[x1_, x2_] := N[(x1 + N[(x1 * -2.0 + N[(x2 * -6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x1 + \mathsf{fma}\left(x1, -2, x2 \cdot -6\right)
\end{array}
Initial program 71.2%
Taylor expanded in x1 around 0
+-commutativeN/A
accelerator-lowering-fma.f64N/A
sub-negN/A
*-commutativeN/A
associate-*l*N/A
*-commutativeN/A
metadata-evalN/A
accelerator-lowering-fma.f64N/A
sub-negN/A
distribute-lft-inN/A
accelerator-lowering-fma.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
metadata-evalN/A
metadata-evalN/A
*-commutativeN/A
*-lowering-*.f6454.5
Simplified54.5%
Taylor expanded in x2 around 0
Simplified41.8%
(FPCore (x1 x2) :precision binary64 (- 0.0 x1))
double code(double x1, double x2) {
return 0.0 - x1;
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
code = 0.0d0 - x1
end function
public static double code(double x1, double x2) {
return 0.0 - x1;
}
def code(x1, x2): return 0.0 - x1
function code(x1, x2) return Float64(0.0 - x1) end
function tmp = code(x1, x2) tmp = 0.0 - x1; end
code[x1_, x2_] := N[(0.0 - x1), $MachinePrecision]
\begin{array}{l}
\\
0 - x1
\end{array}
Initial program 71.2%
Taylor expanded in x1 around 0
+-commutativeN/A
accelerator-lowering-fma.f64N/A
sub-negN/A
*-commutativeN/A
associate-*l*N/A
*-commutativeN/A
metadata-evalN/A
accelerator-lowering-fma.f64N/A
sub-negN/A
distribute-lft-inN/A
accelerator-lowering-fma.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
metadata-evalN/A
metadata-evalN/A
*-commutativeN/A
*-lowering-*.f6454.5
Simplified54.5%
Taylor expanded in x2 around 0
distribute-rgt1-inN/A
metadata-evalN/A
mul-1-negN/A
neg-sub0N/A
--lowering--.f6412.9
Simplified12.9%
sub0-negN/A
neg-lowering-neg.f6412.9
Applied egg-rr12.9%
Final simplification12.9%
(FPCore (x1 x2) :precision binary64 x1)
double code(double x1, double x2) {
return x1;
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
code = x1
end function
public static double code(double x1, double x2) {
return x1;
}
def code(x1, x2): return x1
function code(x1, x2) return x1 end
function tmp = code(x1, x2) tmp = x1; end
code[x1_, x2_] := x1
\begin{array}{l}
\\
x1
\end{array}
Initial program 71.2%
Taylor expanded in x1 around 0
*-commutativeN/A
*-lowering-*.f6431.4
Simplified31.4%
Taylor expanded in x1 around inf
Simplified3.4%
herbie shell --seed 2024195
(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))))))