\left(x + y\right) \cdot \left(x + y\right)
y \cdot y + \left(y + \left(y + x\right)\right) \cdot x
double f(double x, double y) {
double r30107922 = x;
double r30107923 = y;
double r30107924 = r30107922 + r30107923;
double r30107925 = r30107924 * r30107924;
return r30107925;
}
double f(double x, double y) {
double r30107926 = y;
double r30107927 = r30107926 * r30107926;
double r30107928 = x;
double r30107929 = r30107926 + r30107928;
double r30107930 = r30107926 + r30107929;
double r30107931 = r30107930 * r30107928;
double r30107932 = r30107927 + r30107931;
return r30107932;
}




Bits error versus x




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