\left(\left(x \cdot x + y \cdot y\right) + y \cdot y\right) + y \cdot y
\mathsf{fma}\left(3, y \cdot y, x \cdot x\right)double f(double x, double y) {
double r532578 = x;
double r532579 = r532578 * r532578;
double r532580 = y;
double r532581 = r532580 * r532580;
double r532582 = r532579 + r532581;
double r532583 = r532582 + r532581;
double r532584 = r532583 + r532581;
return r532584;
}
double f(double x, double y) {
double r532585 = 3.0;
double r532586 = y;
double r532587 = r532586 * r532586;
double r532588 = x;
double r532589 = r532588 * r532588;
double r532590 = fma(r532585, r532587, r532589);
return r532590;
}




Bits error versus x




Bits error versus y
| Original | 0.1 |
|---|---|
| Target | 0.1 |
| Herbie | 0.1 |
Initial program 0.1
Simplified0.1
Final simplification0.1
herbie shell --seed 2020001 +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)))