\frac{\sin ky}{\sqrt{{\left(\sin kx\right)}^{2} + {\left(\sin ky\right)}^{2}}} \cdot \sin th\frac{\sin th}{\frac{\mathsf{hypot}\left({\left(\sin kx\right)}^{\left(\frac{2}{2}\right)}, {\left(\sin ky\right)}^{\left(\frac{2}{2}\right)}\right)}{\sin ky}}double f(double kx, double ky, double th) {
double r48252 = ky;
double r48253 = sin(r48252);
double r48254 = kx;
double r48255 = sin(r48254);
double r48256 = 2.0;
double r48257 = pow(r48255, r48256);
double r48258 = pow(r48253, r48256);
double r48259 = r48257 + r48258;
double r48260 = sqrt(r48259);
double r48261 = r48253 / r48260;
double r48262 = th;
double r48263 = sin(r48262);
double r48264 = r48261 * r48263;
return r48264;
}
double f(double kx, double ky, double th) {
double r48265 = th;
double r48266 = sin(r48265);
double r48267 = kx;
double r48268 = sin(r48267);
double r48269 = 2.0;
double r48270 = 2.0;
double r48271 = r48269 / r48270;
double r48272 = pow(r48268, r48271);
double r48273 = ky;
double r48274 = sin(r48273);
double r48275 = pow(r48274, r48271);
double r48276 = hypot(r48272, r48275);
double r48277 = r48276 / r48274;
double r48278 = r48266 / r48277;
return r48278;
}



Bits error versus kx



Bits error versus ky



Bits error versus th
Results
Initial program 12.2
rmApplied sqr-pow12.2
Applied sqr-pow12.2
Applied hypot-def8.7
rmApplied clear-num8.7
rmApplied associate-*l/8.7
Simplified8.7
Final simplification8.7
herbie shell --seed 2019194 +o rules:numerics
(FPCore (kx ky th)
:name "Toniolo and Linder, Equation (3b), real"
(* (/ (sin ky) (sqrt (+ (pow (sin kx) 2.0) (pow (sin ky) 2.0)))) (sin th)))