\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 r471030 = x;
double r471031 = r471030 * r471030;
double r471032 = y;
double r471033 = r471032 * r471032;
double r471034 = r471031 + r471033;
double r471035 = r471034 + r471033;
double r471036 = r471035 + r471033;
return r471036;
}
double f(double x, double y) {
double r471037 = 3.0;
double r471038 = y;
double r471039 = r471038 * r471038;
double r471040 = x;
double r471041 = r471040 * r471040;
double r471042 = fma(r471037, r471039, r471041);
return r471042;
}




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