\frac{\sin ky}{\sqrt{{\left(\sin kx\right)}^{2} + {\left(\sin ky\right)}^{2}}} \cdot \sin th\sin ky \cdot \frac{1}{\frac{\sqrt{{\left(\sin kx\right)}^{2} + {\left(\sin ky\right)}^{2}}}{\sin th}}double code(double kx, double ky, double th) {
return ((sin(ky) / sqrt((pow(sin(kx), 2.0) + pow(sin(ky), 2.0)))) * sin(th));
}
double code(double kx, double ky, double th) {
return (sin(ky) * (1.0 / (sqrt((pow(sin(kx), 2.0) + pow(sin(ky), 2.0))) / sin(th))));
}



Bits error versus kx



Bits error versus ky



Bits error versus th
Results
Initial program 3.8
rmApplied div-inv3.9
Applied associate-*l*4.0
Simplified3.9
rmApplied clear-num4.0
Final simplification4.0
herbie shell --seed 2020100
(FPCore (kx ky th)
:name "Toniolo and Linder, Equation (3b), real"
:precision binary64
(* (/ (sin ky) (sqrt (+ (pow (sin kx) 2) (pow (sin ky) 2)))) (sin th)))