\left(x + y\right) \cdot \left(x + y\right)
y \cdot y + x \cdot \left(x + y \cdot 2\right)
double f(double x, double y) {
double r485984 = x;
double r485985 = y;
double r485986 = r485984 + r485985;
double r485987 = r485986 * r485986;
return r485987;
}
double f(double x, double y) {
double r485988 = y;
double r485989 = r485988 * r485988;
double r485990 = x;
double r485991 = 2.0;
double r485992 = r485988 * r485991;
double r485993 = r485990 + r485992;
double r485994 = r485990 * r485993;
double r485995 = r485989 + r485994;
return r485995;
}




Bits error versus x




Bits error versus y
Results
| Original | 0.0 |
|---|---|
| Target | 0.0 |
| Herbie | 0.0 |
Initial program 0.0
Taylor expanded around 0 0.0
Simplified0.0
rmApplied distribute-lft-in0.0
Applied associate-+l+0.0
Simplified0.0
Final simplification0.0
herbie shell --seed 2019209
(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)))