\left(x + y\right) \cdot \left(x + y\right)
x \cdot x + y \cdot \left(\left(x + x\right) + y\right)
double f(double x, double y) {
double r481638 = x;
double r481639 = y;
double r481640 = r481638 + r481639;
double r481641 = r481640 * r481640;
return r481641;
}
double f(double x, double y) {
double r481642 = x;
double r481643 = r481642 * r481642;
double r481644 = y;
double r481645 = r481642 + r481642;
double r481646 = r481645 + r481644;
double r481647 = r481644 * r481646;
double r481648 = r481643 + r481647;
return r481648;
}




Bits error versus x




Bits error versus y
Results
| 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
rmApplied associate-+r+0.0
Final simplification0.0
herbie shell --seed 2020003
(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)))