\left(x + y\right) \cdot \left(x + y\right)
x \cdot \left(\left(x + y\right) + y\right) + y \cdot y
double f(double x, double y) {
double r874353 = x;
double r874354 = y;
double r874355 = r874353 + r874354;
double r874356 = r874355 * r874355;
return r874356;
}
double f(double x, double y) {
double r874357 = x;
double r874358 = y;
double r874359 = r874357 + r874358;
double r874360 = r874359 + r874358;
double r874361 = r874357 * r874360;
double r874362 = r874358 * r874358;
double r874363 = r874361 + r874362;
return r874363;
}




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