\frac{\sin ky}{\sqrt{{\left(\sin kx\right)}^{2} + {\left(\sin ky\right)}^{2}}} \cdot \sin th\sin ky \cdot \frac{\sin th}{\mathsf{hypot}\left({\left(\sin kx\right)}^{\left(\frac{2}{2}\right)}, {\left(\sin ky\right)}^{\left(\frac{2}{2}\right)}\right)}double f(double kx, double ky, double th) {
double r56977 = ky;
double r56978 = sin(r56977);
double r56979 = kx;
double r56980 = sin(r56979);
double r56981 = 2.0;
double r56982 = pow(r56980, r56981);
double r56983 = pow(r56978, r56981);
double r56984 = r56982 + r56983;
double r56985 = sqrt(r56984);
double r56986 = r56978 / r56985;
double r56987 = th;
double r56988 = sin(r56987);
double r56989 = r56986 * r56988;
return r56989;
}
double f(double kx, double ky, double th) {
double r56990 = ky;
double r56991 = sin(r56990);
double r56992 = th;
double r56993 = sin(r56992);
double r56994 = kx;
double r56995 = sin(r56994);
double r56996 = 2.0;
double r56997 = 2.0;
double r56998 = r56996 / r56997;
double r56999 = pow(r56995, r56998);
double r57000 = pow(r56991, r56998);
double r57001 = hypot(r56999, r57000);
double r57002 = r56993 / r57001;
double r57003 = r56991 * r57002;
return r57003;
}



Bits error versus kx



Bits error versus ky



Bits error versus th
Results
Initial program 12.3
rmApplied sqr-pow12.3
Applied sqr-pow12.3
Applied hypot-def8.9
rmApplied div-inv9.0
Applied associate-*l*9.0
Simplified8.9
Final simplification8.9
herbie shell --seed 2020020 +o rules:numerics
(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)))