\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 r55291 = ky;
double r55292 = sin(r55291);
double r55293 = kx;
double r55294 = sin(r55293);
double r55295 = 2.0;
double r55296 = pow(r55294, r55295);
double r55297 = pow(r55292, r55295);
double r55298 = r55296 + r55297;
double r55299 = sqrt(r55298);
double r55300 = r55292 / r55299;
double r55301 = th;
double r55302 = sin(r55301);
double r55303 = r55300 * r55302;
return r55303;
}
double f(double kx, double ky, double th) {
double r55304 = ky;
double r55305 = sin(r55304);
double r55306 = th;
double r55307 = sin(r55306);
double r55308 = kx;
double r55309 = sin(r55308);
double r55310 = 2.0;
double r55311 = 2.0;
double r55312 = r55310 / r55311;
double r55313 = pow(r55309, r55312);
double r55314 = pow(r55305, r55312);
double r55315 = hypot(r55313, r55314);
double r55316 = r55307 / r55315;
double r55317 = r55305 * r55316;
return r55317;
}



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-def8.9
rmApplied div-inv9.0
Applied associate-*l*9.0
Simplified8.9
Final simplification8.9
herbie shell --seed 2019351 +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)))