\left(\left(x \cdot x + y \cdot y\right) + y \cdot y\right) + y \cdot y
{x}^{2} + \left(3 \cdot y\right) \cdot ydouble f(double x, double y) {
double r519796 = x;
double r519797 = r519796 * r519796;
double r519798 = y;
double r519799 = r519798 * r519798;
double r519800 = r519797 + r519799;
double r519801 = r519800 + r519799;
double r519802 = r519801 + r519799;
return r519802;
}
double f(double x, double y) {
double r519803 = x;
double r519804 = 2.0;
double r519805 = pow(r519803, r519804);
double r519806 = 3.0;
double r519807 = y;
double r519808 = r519806 * r519807;
double r519809 = r519808 * r519807;
double r519810 = r519805 + r519809;
return r519810;
}




Bits error versus x




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