\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 r48043 = ky;
double r48044 = sin(r48043);
double r48045 = kx;
double r48046 = sin(r48045);
double r48047 = 2.0;
double r48048 = pow(r48046, r48047);
double r48049 = pow(r48044, r48047);
double r48050 = r48048 + r48049;
double r48051 = sqrt(r48050);
double r48052 = r48044 / r48051;
double r48053 = th;
double r48054 = sin(r48053);
double r48055 = r48052 * r48054;
return r48055;
}
double f(double kx, double ky, double th) {
double r48056 = ky;
double r48057 = sin(r48056);
double r48058 = th;
double r48059 = sin(r48058);
double r48060 = kx;
double r48061 = sin(r48060);
double r48062 = hypot(r48057, r48061);
double r48063 = r48059 / r48062;
double r48064 = r48057 * r48063;
return r48064;
}



Bits error versus kx



Bits error versus ky



Bits error versus th
Results
Initial program 12.2
Taylor expanded around inf 12.2
Simplified8.5
rmApplied div-inv8.6
Applied associate-*l*8.7
Simplified8.6
Final simplification8.6
herbie shell --seed 2020046 +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)))