\left(\left(x \cdot x + y \cdot y\right) + y \cdot y\right) + y \cdot y
x \cdot x + \left(3 \cdot y\right) \cdot y
double f(double x, double y) {
double r1244351 = x;
double r1244352 = r1244351 * r1244351;
double r1244353 = y;
double r1244354 = r1244353 * r1244353;
double r1244355 = r1244352 + r1244354;
double r1244356 = r1244355 + r1244354;
double r1244357 = r1244356 + r1244354;
return r1244357;
}
double f(double x, double y) {
double r1244358 = x;
double r1244359 = r1244358 * r1244358;
double r1244360 = 3.0;
double r1244361 = y;
double r1244362 = r1244360 * r1244361;
double r1244363 = r1244362 * r1244361;
double r1244364 = r1244359 + r1244363;
return r1244364;
}




Bits error versus x




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