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



Bits error versus kx



Bits error versus ky



Bits error versus th
Results
Initial program Error: 3.5 bits
rmApplied clear-numError: 3.6 bits
Final simplificationError: 3.6 bits
herbie shell --seed 2020204
(FPCore (kx ky th)
:name "Toniolo and Linder, Equation (3b), real"
:precision binary64
(* (/ (sin ky) (sqrt (+ (pow (sin kx) 2.0) (pow (sin ky) 2.0)))) (sin th)))