\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 r1033828 = ky;
double r1033829 = sin(r1033828);
double r1033830 = kx;
double r1033831 = sin(r1033830);
double r1033832 = 2.0;
double r1033833 = pow(r1033831, r1033832);
double r1033834 = pow(r1033829, r1033832);
double r1033835 = r1033833 + r1033834;
double r1033836 = sqrt(r1033835);
double r1033837 = r1033829 / r1033836;
double r1033838 = th;
double r1033839 = sin(r1033838);
double r1033840 = r1033837 * r1033839;
return r1033840;
}
double f(double kx, double ky, double th) {
double r1033841 = th;
double r1033842 = sin(r1033841);
double r1033843 = ky;
double r1033844 = sin(r1033843);
double r1033845 = kx;
double r1033846 = sin(r1033845);
double r1033847 = hypot(r1033844, r1033846);
double r1033848 = r1033844 / r1033847;
double r1033849 = r1033842 * r1033848;
return r1033849;
}



Bits error versus kx



Bits error versus ky



Bits error versus th
Results
Initial program 12.5
Taylor expanded around inf 12.5
Simplified8.9
rmApplied *-un-lft-identity8.9
Applied *-un-lft-identity8.9
Applied times-frac8.9
Simplified8.9
Final simplification8.9
herbie shell --seed 2019172 +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)))