\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 r2726 = x;
double r2727 = r2726 * r2726;
double r2728 = y;
double r2729 = r2728 * r2728;
double r2730 = r2727 + r2729;
double r2731 = r2730 + r2729;
double r2732 = r2731 + r2729;
return r2732;
}
double f(double x, double y) {
double r2733 = x;
double r2734 = r2733 * r2733;
double r2735 = 3.0;
double r2736 = y;
double r2737 = r2735 * r2736;
double r2738 = r2737 * r2736;
double r2739 = r2734 + r2738;
return r2739;
}




Bits error versus x




Bits error versus y
Results
| Original | 0.1 |
|---|---|
| Target | 0.1 |
| Herbie | 0.1 |
Initial program 0.1
rmApplied associate-+l+0.1
Simplified0.1
rmApplied associate-+l+0.1
Simplified0.1
Final simplification0.1
herbie shell --seed 2020025
(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)))