\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 r49095 = ky;
double r49096 = sin(r49095);
double r49097 = kx;
double r49098 = sin(r49097);
double r49099 = 2.0;
double r49100 = pow(r49098, r49099);
double r49101 = pow(r49096, r49099);
double r49102 = r49100 + r49101;
double r49103 = sqrt(r49102);
double r49104 = r49096 / r49103;
double r49105 = th;
double r49106 = sin(r49105);
double r49107 = r49104 * r49106;
return r49107;
}
double f(double kx, double ky, double th) {
double r49108 = ky;
double r49109 = sin(r49108);
double r49110 = th;
double r49111 = sin(r49110);
double r49112 = kx;
double r49113 = sin(r49112);
double r49114 = 2.0;
double r49115 = 2.0;
double r49116 = r49114 / r49115;
double r49117 = pow(r49113, r49116);
double r49118 = pow(r49109, r49116);
double r49119 = hypot(r49117, r49118);
double r49120 = r49111 / r49119;
double r49121 = r49109 * r49120;
return r49121;
}



Bits error versus kx



Bits error versus ky



Bits error versus th
Results
Initial program 12.4
rmApplied sqr-pow12.4
Applied sqr-pow12.4
Applied hypot-def8.6
rmApplied div-inv8.7
Applied associate-*l*8.7
Simplified8.6
Final simplification8.6
herbie shell --seed 2019195 +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)))