\left(x + y\right) \cdot \left(x + y\right)
\mathsf{fma}\left(x, x + y, x \cdot y\right) + y \cdot ydouble f(double x, double y) {
double r930040 = x;
double r930041 = y;
double r930042 = r930040 + r930041;
double r930043 = r930042 * r930042;
return r930043;
}
double f(double x, double y) {
double r930044 = x;
double r930045 = y;
double r930046 = r930044 + r930045;
double r930047 = r930044 * r930045;
double r930048 = fma(r930044, r930046, r930047);
double r930049 = r930045 * r930045;
double r930050 = r930048 + r930049;
return r930050;
}




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-+r+0.0
Simplified0.0
Final simplification0.0
herbie shell --seed 2020034 +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)))