\left(x + y\right) \cdot \left(x + y\right)
x \cdot x + \mathsf{fma}\left(y, x, y \cdot \left(x + y\right)\right)double f(double x, double y) {
double r673831 = x;
double r673832 = y;
double r673833 = r673831 + r673832;
double r673834 = r673833 * r673833;
return r673834;
}
double f(double x, double y) {
double r673835 = x;
double r673836 = r673835 * r673835;
double r673837 = y;
double r673838 = r673835 + r673837;
double r673839 = r673837 * r673838;
double r673840 = fma(r673837, r673835, r673839);
double r673841 = r673836 + r673840;
return r673841;
}




Bits error versus x




Bits error versus y
| Original | 0.0 |
|---|---|
| Target | 0.0 |
| Herbie | 0.0 |
Initial program 0.0
rmApplied distribute-lft-in0.0
Simplified0.0
Simplified0.0
rmApplied distribute-lft-in0.0
Applied associate-+l+0.0
Simplified0.0
Final simplification0.0
herbie shell --seed 2020027 +o rules:numerics
(FPCore (x y)
:name "Examples.Basics.BasicTests:f3 from sbv-4.4"
:precision binary64
:herbie-target
(+ (* x x) (+ (* y y) (* 2 (* y x))))
(* (+ x y) (+ x y)))