\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 r1163711 = ky;
double r1163712 = sin(r1163711);
double r1163713 = kx;
double r1163714 = sin(r1163713);
double r1163715 = 2.0;
double r1163716 = pow(r1163714, r1163715);
double r1163717 = pow(r1163712, r1163715);
double r1163718 = r1163716 + r1163717;
double r1163719 = sqrt(r1163718);
double r1163720 = r1163712 / r1163719;
double r1163721 = th;
double r1163722 = sin(r1163721);
double r1163723 = r1163720 * r1163722;
return r1163723;
}
double f(double kx, double ky, double th) {
double r1163724 = ky;
double r1163725 = sin(r1163724);
double r1163726 = th;
double r1163727 = sin(r1163726);
double r1163728 = kx;
double r1163729 = sin(r1163728);
double r1163730 = hypot(r1163725, r1163729);
double r1163731 = r1163727 / r1163730;
double r1163732 = r1163725 * r1163731;
return r1163732;
}



Bits error versus kx



Bits error versus ky



Bits error versus th
Results
Initial program 12.7
Taylor expanded around inf 12.7
Simplified8.9
rmApplied div-inv9.0
Applied associate-*l*9.0
Simplified8.9
Final simplification8.9
herbie shell --seed 2019168 +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)))