\frac{\sin ky}{\sqrt{{\left(\sin kx\right)}^{2} + {\left(\sin ky\right)}^{2}}} \cdot \sin th\frac{\sin ky}{\sqrt{1}} \cdot \frac{\sin th}{\mathsf{hypot}\left(\sin ky, \sin kx\right)}double f(double kx, double ky, double th) {
double r38583 = ky;
double r38584 = sin(r38583);
double r38585 = kx;
double r38586 = sin(r38585);
double r38587 = 2.0;
double r38588 = pow(r38586, r38587);
double r38589 = pow(r38584, r38587);
double r38590 = r38588 + r38589;
double r38591 = sqrt(r38590);
double r38592 = r38584 / r38591;
double r38593 = th;
double r38594 = sin(r38593);
double r38595 = r38592 * r38594;
return r38595;
}
double f(double kx, double ky, double th) {
double r38596 = ky;
double r38597 = sin(r38596);
double r38598 = 1.0;
double r38599 = sqrt(r38598);
double r38600 = r38597 / r38599;
double r38601 = th;
double r38602 = sin(r38601);
double r38603 = kx;
double r38604 = sin(r38603);
double r38605 = hypot(r38597, r38604);
double r38606 = r38602 / r38605;
double r38607 = r38600 * r38606;
return r38607;
}



Bits error versus kx



Bits error versus ky



Bits error versus th
Results
Initial program 12.4
Taylor expanded around inf 12.4
Simplified8.6
rmApplied add-sqr-sqrt8.9
Applied associate-/r*8.9
rmApplied *-un-lft-identity8.9
Applied sqrt-prod8.9
Applied div-inv9.0
Applied times-frac9.0
Applied associate-*l*9.0
Simplified8.7
Final simplification8.7
herbie shell --seed 2020035 +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)))