\left(x + y\right) \cdot \left(x + y\right)
x \cdot x + y \cdot \left(x + \left(x + y\right)\right)
double f(double x, double y) {
double r639070 = x;
double r639071 = y;
double r639072 = r639070 + r639071;
double r639073 = r639072 * r639072;
return r639073;
}
double f(double x, double y) {
double r639074 = x;
double r639075 = r639074 * r639074;
double r639076 = y;
double r639077 = r639074 + r639076;
double r639078 = r639074 + r639077;
double r639079 = r639076 * r639078;
double r639080 = r639075 + r639079;
return r639080;
}




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
rmApplied distribute-lft-in0.0
Applied associate-+l+0.0
Simplified0.0
Final simplification0.0
herbie shell --seed 2020046 +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)))