\frac{\sin ky}{\sqrt{{\left(\sin kx\right)}^{2} + {\left(\sin ky\right)}^{2}}} \cdot \sin th\sin th \cdot \frac{\sin ky}{\mathsf{hypot}\left(\left(\sin kx\right), \left(\sin ky\right)\right)}double f(double kx, double ky, double th) {
double r1257556 = ky;
double r1257557 = sin(r1257556);
double r1257558 = kx;
double r1257559 = sin(r1257558);
double r1257560 = 2.0;
double r1257561 = pow(r1257559, r1257560);
double r1257562 = pow(r1257557, r1257560);
double r1257563 = r1257561 + r1257562;
double r1257564 = sqrt(r1257563);
double r1257565 = r1257557 / r1257564;
double r1257566 = th;
double r1257567 = sin(r1257566);
double r1257568 = r1257565 * r1257567;
return r1257568;
}
double f(double kx, double ky, double th) {
double r1257569 = th;
double r1257570 = sin(r1257569);
double r1257571 = ky;
double r1257572 = sin(r1257571);
double r1257573 = kx;
double r1257574 = sin(r1257573);
double r1257575 = hypot(r1257574, r1257572);
double r1257576 = r1257572 / r1257575;
double r1257577 = r1257570 * r1257576;
return r1257577;
}



Bits error versus kx



Bits error versus ky



Bits error versus th
Results
Initial program 12.7
Simplified11.3
rmApplied *-un-lft-identity11.3
Applied times-frac9.0
Simplified9.0
rmApplied *-commutative9.0
Final simplification9.0
herbie shell --seed 2019124 +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)))