\left(\left(x \cdot x + y \cdot y\right) + y \cdot y\right) + y \cdot y
\left(y \cdot 3\right) \cdot y + x \cdot x
double f(double x, double y) {
double r95673429 = x;
double r95673430 = r95673429 * r95673429;
double r95673431 = y;
double r95673432 = r95673431 * r95673431;
double r95673433 = r95673430 + r95673432;
double r95673434 = r95673433 + r95673432;
double r95673435 = r95673434 + r95673432;
return r95673435;
}
double f(double x, double y) {
double r95673436 = y;
double r95673437 = 3.0;
double r95673438 = r95673436 * r95673437;
double r95673439 = r95673438 * r95673436;
double r95673440 = x;
double r95673441 = r95673440 * r95673440;
double r95673442 = r95673439 + r95673441;
return r95673442;
}




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
rmApplied add-sqr-sqrt0.3
rmApplied sqrt-prod32.1
Applied sqrt-prod32.2
Applied swap-sqr32.2
Simplified32.2
Simplified0.1
Final simplification0.1
herbie shell --seed 2019173
(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)))