\left(\left(x \cdot y + y \cdot y\right) - y \cdot z\right) - y \cdot y
\mathsf{fma}\left(y, x, \left(-y\right) \cdot z\right)double f(double x, double y, double z) {
double r1286862 = x;
double r1286863 = y;
double r1286864 = r1286862 * r1286863;
double r1286865 = r1286863 * r1286863;
double r1286866 = r1286864 + r1286865;
double r1286867 = z;
double r1286868 = r1286863 * r1286867;
double r1286869 = r1286866 - r1286868;
double r1286870 = r1286869 - r1286865;
return r1286870;
}
double f(double x, double y, double z) {
double r1286871 = y;
double r1286872 = x;
double r1286873 = -r1286871;
double r1286874 = z;
double r1286875 = r1286873 * r1286874;
double r1286876 = fma(r1286871, r1286872, r1286875);
return r1286876;
}




Bits error versus x




Bits error versus y




Bits error versus z
| Original | 17.3 |
|---|---|
| Target | 0.0 |
| Herbie | 0.0 |
Initial program 17.3
Simplified0.0
rmApplied sub-neg0.0
Applied distribute-lft-in0.0
Simplified0.0
rmApplied fma-def0.0
Final simplification0.0
herbie shell --seed 2019194 +o rules:numerics
(FPCore (x y z)
:name "Linear.Quaternion:$c/ from linear-1.19.1.3, C"
:herbie-target
(* (- x z) y)
(- (- (+ (* x y) (* y y)) (* y z)) (* y y)))