\frac{\sin ky}{\sqrt{{\left(\sin kx\right)}^{2} + {\left(\sin ky\right)}^{2}}} \cdot \sin th\frac{\sin ky}{\mathsf{hypot}\left({\left(\sin kx\right)}^{\left(\frac{2}{2}\right)}, {\left(\sin ky\right)}^{\left(\frac{2}{2}\right)}\right)} \cdot \sin thdouble f(double kx, double ky, double th) {
double r47380 = ky;
double r47381 = sin(r47380);
double r47382 = kx;
double r47383 = sin(r47382);
double r47384 = 2.0;
double r47385 = pow(r47383, r47384);
double r47386 = pow(r47381, r47384);
double r47387 = r47385 + r47386;
double r47388 = sqrt(r47387);
double r47389 = r47381 / r47388;
double r47390 = th;
double r47391 = sin(r47390);
double r47392 = r47389 * r47391;
return r47392;
}
double f(double kx, double ky, double th) {
double r47393 = ky;
double r47394 = sin(r47393);
double r47395 = kx;
double r47396 = sin(r47395);
double r47397 = 2.0;
double r47398 = 2.0;
double r47399 = r47397 / r47398;
double r47400 = pow(r47396, r47399);
double r47401 = pow(r47394, r47399);
double r47402 = hypot(r47400, r47401);
double r47403 = r47394 / r47402;
double r47404 = th;
double r47405 = sin(r47404);
double r47406 = r47403 * r47405;
return r47406;
}



Bits error versus kx



Bits error versus ky



Bits error versus th
Results
Initial program 12.1
rmApplied sqr-pow12.1
Applied sqr-pow12.1
Applied hypot-def8.6
rmApplied div-inv8.7
Applied associate-*l*8.8
Simplified8.7
rmApplied clear-num8.8
rmApplied associate-/r/8.8
Applied associate-*r*8.7
Simplified8.6
Final simplification8.6
herbie shell --seed 2019303 +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)))