\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 r495730 = x;
double r495731 = r495730 * r495730;
double r495732 = y;
double r495733 = r495732 * r495732;
double r495734 = r495731 + r495733;
double r495735 = r495734 + r495733;
double r495736 = r495735 + r495733;
return r495736;
}
double f(double x, double y) {
double r495737 = 3.0;
double r495738 = y;
double r495739 = r495737 * r495738;
double r495740 = r495739 * r495738;
double r495741 = x;
double r495742 = r495741 * r495741;
double r495743 = r495740 + r495742;
return r495743;
}




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 *-un-lft-identity0.1
rmApplied associate-*r*0.1
Final simplification0.1
herbie shell --seed 2020081
(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)))