\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(\sin ky, \sin kx\right)}double f(double kx, double ky, double th) {
double r1191253 = ky;
double r1191254 = sin(r1191253);
double r1191255 = kx;
double r1191256 = sin(r1191255);
double r1191257 = 2.0;
double r1191258 = pow(r1191256, r1191257);
double r1191259 = pow(r1191254, r1191257);
double r1191260 = r1191258 + r1191259;
double r1191261 = sqrt(r1191260);
double r1191262 = r1191254 / r1191261;
double r1191263 = th;
double r1191264 = sin(r1191263);
double r1191265 = r1191262 * r1191264;
return r1191265;
}
double f(double kx, double ky, double th) {
double r1191266 = ky;
double r1191267 = sin(r1191266);
double r1191268 = th;
double r1191269 = sin(r1191268);
double r1191270 = kx;
double r1191271 = sin(r1191270);
double r1191272 = hypot(r1191267, r1191271);
double r1191273 = r1191269 / r1191272;
double r1191274 = r1191267 * r1191273;
return r1191274;
}



Bits error versus kx



Bits error versus ky



Bits error versus th
Results
Initial program 12.6
Simplified9.1
rmApplied add-sqr-sqrt9.4
Applied *-un-lft-identity9.4
Applied times-frac9.4
Applied associate-*r*9.5
Simplified9.4
rmApplied *-un-lft-identity9.4
Applied associate-*l*9.4
Simplified9.2
Final simplification9.2
herbie shell --seed 2019163 +o rules:numerics
(FPCore (kx ky th)
:name "Toniolo and Linder, Equation (3b), real"
(* (/ (sin ky) (sqrt (+ (pow (sin kx) 2) (pow (sin ky) 2)))) (sin th)))