\left(\left(x \cdot x + y \cdot y\right) + y \cdot y\right) + y \cdot y
\left(y \cdot y + \left(x \cdot x + y \cdot y\right)\right) + y \cdot y
double f(double x, double y) {
double r465095 = x;
double r465096 = r465095 * r465095;
double r465097 = y;
double r465098 = r465097 * r465097;
double r465099 = r465096 + r465098;
double r465100 = r465099 + r465098;
double r465101 = r465100 + r465098;
return r465101;
}
double f(double x, double y) {
double r465102 = y;
double r465103 = r465102 * r465102;
double r465104 = x;
double r465105 = r465104 * r465104;
double r465106 = r465105 + r465103;
double r465107 = r465103 + r465106;
double r465108 = r465107 + r465103;
return r465108;
}




Bits error versus x




Bits error versus y
Results
| Original | 0.1 |
|---|---|
| Target | 0.1 |
| Herbie | 0.1 |
Initial program 0.1
rmApplied +-commutative0.1
Final simplification0.1
herbie shell --seed 2020036
(FPCore (x y)
:name "Linear.Quaternion:$c/ from linear-1.19.1.3, E"
:precision binary64
:herbie-target
(+ (* x x) (* y (+ y (+ y y))))
(+ (+ (+ (* x x) (* y y)) (* y y)) (* y y)))