\frac{\sin ky}{\sqrt{{\left(\sin kx\right)}^{2} + {\left(\sin ky\right)}^{2}}} \cdot \sin th\frac{\sin ky}{\sqrt{{\left(\sin kx\right)}^{2} + {\left(\sin ky\right)}^{2}}} \cdot \sin thdouble 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) / 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 12.3
rmApplied add-sqr-sqrt12.3
Applied sqrt-prod12.6
Applied *-un-lft-identity12.6
Applied times-frac12.6
Applied associate-*l*13.1
rmApplied associate-*r*12.6
Simplified12.3
Final simplification12.3
herbie shell --seed 2020057
(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)))