\left(\left(x \cdot x + y \cdot y\right) + y \cdot y\right) + y \cdot y
\left(3 \cdot y\right) \cdot y + x \cdot x
double f(double x, double y) {
double r23613532 = x;
double r23613533 = r23613532 * r23613532;
double r23613534 = y;
double r23613535 = r23613534 * r23613534;
double r23613536 = r23613533 + r23613535;
double r23613537 = r23613536 + r23613535;
double r23613538 = r23613537 + r23613535;
return r23613538;
}
double f(double x, double y) {
double r23613539 = 3.0;
double r23613540 = y;
double r23613541 = r23613539 * r23613540;
double r23613542 = r23613541 * r23613540;
double r23613543 = x;
double r23613544 = r23613543 * r23613543;
double r23613545 = r23613542 + r23613544;
return r23613545;
}




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 2019168
(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)))