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 r495952 = 2.0;
double r495953 = x;
double r495954 = r495953 * r495953;
double r495955 = y;
double r495956 = r495953 * r495955;
double r495957 = r495954 - r495956;
double r495958 = r495952 * r495957;
return r495958;
}
double f(double x, double y) {
double r495959 = 2.0;
double r495960 = x;
double r495961 = y;
double r495962 = r495960 * r495961;
double r495963 = -r495962;
double r495964 = fma(r495960, r495960, r495963);
double r495965 = r495959 * r495964;
return r495965;
}




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