\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 r502435 = x;
double r502436 = r502435 * r502435;
double r502437 = y;
double r502438 = r502437 * r502437;
double r502439 = r502436 + r502438;
double r502440 = r502439 + r502438;
double r502441 = r502440 + r502438;
return r502441;
}
double f(double x, double y) {
double r502442 = x;
double r502443 = 3.0;
double r502444 = y;
double r502445 = r502443 * r502444;
double r502446 = r502445 * r502444;
double r502447 = fma(r502442, r502442, r502446);
return r502447;
}




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 2020047 +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)))