x \cdot \cos y - z \cdot \sin y
\begin{array}{l}
t_0 := \sin y \cdot z\\
\mathsf{fma}\left(x, \cos y, -t_0\right) + \mathsf{fma}\left(-\sin y, z, t_0\right)
\end{array}
(FPCore (x y z) :precision binary64 (- (* x (cos y)) (* z (sin y))))
(FPCore (x y z) :precision binary64 (let* ((t_0 (* (sin y) z))) (+ (fma x (cos y) (- t_0)) (fma (- (sin y)) z t_0))))
double code(double x, double y, double z) {
return (x * cos(y)) - (z * sin(y));
}
double code(double x, double y, double z) {
double t_0 = sin(y) * z;
return fma(x, cos(y), -t_0) + fma(-sin(y), z, t_0);
}



Bits error versus x



Bits error versus y



Bits error versus z
Initial program 0.1
Applied prod-diff_binary640.1
Final simplification0.1
herbie shell --seed 2022077
(FPCore (x y z)
:name "Diagrams.ThreeD.Transform:aboutX from diagrams-lib-1.3.0.3, A"
:precision binary64
(- (* x (cos y)) (* z (sin y))))