\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 r47154 = ky;
double r47155 = sin(r47154);
double r47156 = kx;
double r47157 = sin(r47156);
double r47158 = 2.0;
double r47159 = pow(r47157, r47158);
double r47160 = pow(r47155, r47158);
double r47161 = r47159 + r47160;
double r47162 = sqrt(r47161);
double r47163 = r47155 / r47162;
double r47164 = th;
double r47165 = sin(r47164);
double r47166 = r47163 * r47165;
return r47166;
}
double f(double kx, double ky, double th) {
double r47167 = ky;
double r47168 = sin(r47167);
double r47169 = th;
double r47170 = sin(r47169);
double r47171 = kx;
double r47172 = sin(r47171);
double r47173 = 2.0;
double r47174 = 2.0;
double r47175 = r47173 / r47174;
double r47176 = pow(r47172, r47175);
double r47177 = pow(r47168, r47175);
double r47178 = hypot(r47176, r47177);
double r47179 = r47170 / r47178;
double r47180 = r47168 * r47179;
return r47180;
}



Bits error versus kx



Bits error versus ky



Bits error versus th
Results
Initial program 12.7
rmApplied sqr-pow12.7
Applied sqr-pow12.7
Applied hypot-def9.0
rmApplied div-inv9.1
Applied associate-*l*9.2
Simplified9.1
Final simplification9.1
herbie shell --seed 2019344 +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)))