\left(\left(x \cdot x + y \cdot y\right) + y \cdot y\right) + y \cdot y
\mathsf{fma}\left(x, x, \left(3 \cdot y\right) \cdot y\right)double f(double x, double y) {
double r698575 = x;
double r698576 = r698575 * r698575;
double r698577 = y;
double r698578 = r698577 * r698577;
double r698579 = r698576 + r698578;
double r698580 = r698579 + r698578;
double r698581 = r698580 + r698578;
return r698581;
}
double f(double x, double y) {
double r698582 = x;
double r698583 = 3.0;
double r698584 = y;
double r698585 = r698583 * r698584;
double r698586 = r698585 * r698584;
double r698587 = fma(r698582, r698582, r698586);
return r698587;
}




Bits error versus x




Bits error versus y
| 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 2019351 +o rules:numerics
(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)))