x \cdot \cos y + z \cdot \sin y
\mathsf{fma}\left(x, \cos y, z \cdot \sin y\right)
(FPCore (x y z) :precision binary64 (+ (* x (cos y)) (* z (sin y))))
(FPCore (x y z) :precision binary64 (fma x (cos y) (* z (sin y))))
double code(double x, double y, double z) {
return (x * cos(y)) + (z * sin(y));
}
double code(double x, double y, double z) {
return fma(x, cos(y), (z * sin(y)));
}



Bits error versus x



Bits error versus y



Bits error versus z
Initial program 0.1
Simplified0.1
Final simplification0.1
herbie shell --seed 2021275
(FPCore (x y z)
:name "Diagrams.ThreeD.Transform:aboutY from diagrams-lib-1.3.0.3"
:precision binary64
(+ (* x (cos y)) (* z (sin y))))