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 r574861 = 2.0;
double r574862 = x;
double r574863 = r574862 * r574862;
double r574864 = y;
double r574865 = r574862 * r574864;
double r574866 = r574863 - r574865;
double r574867 = r574861 * r574866;
return r574867;
}
double f(double x, double y) {
double r574868 = 2.0;
double r574869 = x;
double r574870 = y;
double r574871 = r574869 * r574870;
double r574872 = -r574871;
double r574873 = fma(r574869, r574869, r574872);
double r574874 = r574868 * r574873;
return r574874;
}




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