\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(\sin ky, \sin kx\right)}double f(double kx, double ky, double th) {
double r633584 = ky;
double r633585 = sin(r633584);
double r633586 = kx;
double r633587 = sin(r633586);
double r633588 = 2.0;
double r633589 = pow(r633587, r633588);
double r633590 = pow(r633585, r633588);
double r633591 = r633589 + r633590;
double r633592 = sqrt(r633591);
double r633593 = r633585 / r633592;
double r633594 = th;
double r633595 = sin(r633594);
double r633596 = r633593 * r633595;
return r633596;
}
double f(double kx, double ky, double th) {
double r633597 = th;
double r633598 = sin(r633597);
double r633599 = ky;
double r633600 = sin(r633599);
double r633601 = kx;
double r633602 = sin(r633601);
double r633603 = hypot(r633600, r633602);
double r633604 = r633600 / r633603;
double r633605 = r633598 * r633604;
return r633605;
}



Bits error versus kx



Bits error versus ky



Bits error versus th
Results
Initial program 12.5
Simplified8.9
rmApplied add-sqr-sqrt9.2
Applied *-un-lft-identity9.2
Applied times-frac9.2
rmApplied *-un-lft-identity9.2
Applied associate-*l*9.2
Simplified8.9
Final simplification8.9
herbie shell --seed 2019144 +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)))