\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 r462502 = x;
double r462503 = r462502 * r462502;
double r462504 = y;
double r462505 = r462504 * r462504;
double r462506 = r462503 + r462505;
double r462507 = r462506 + r462505;
double r462508 = r462507 + r462505;
return r462508;
}
double f(double x, double y) {
double r462509 = x;
double r462510 = 3.0;
double r462511 = y;
double r462512 = r462510 * r462511;
double r462513 = r462512 * r462511;
double r462514 = fma(r462509, r462509, r462513);
return r462514;
}




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