2 \cdot \left(x \cdot x - x \cdot y\right)
2 \cdot \mathsf{fma}\left(x, x, -x \cdot y\right)double f(double x, double y) {
double r540740 = 2.0;
double r540741 = x;
double r540742 = r540741 * r540741;
double r540743 = y;
double r540744 = r540741 * r540743;
double r540745 = r540742 - r540744;
double r540746 = r540740 * r540745;
return r540746;
}
double f(double x, double y) {
double r540747 = 2.0;
double r540748 = x;
double r540749 = y;
double r540750 = r540748 * r540749;
double r540751 = -r540750;
double r540752 = fma(r540748, r540748, r540751);
double r540753 = r540747 * r540752;
return r540753;
}




Bits error versus x




Bits error versus y
| Original | 0.0 |
|---|---|
| Target | 0.0 |
| Herbie | 0.0 |
Initial program 0.0
rmApplied fma-neg0.0
Final simplification0.0
herbie shell --seed 2020024 +o rules:numerics
(FPCore (x y)
:name "Linear.Matrix:fromQuaternion from linear-1.19.1.3, A"
:precision binary64
:herbie-target
(* (* x 2) (- x y))
(* 2 (- (* x x) (* x y))))