\frac{\sin ky}{\sqrt{{\left(\sin kx\right)}^{2} + {\left(\sin ky\right)}^{2}}} \cdot \sin th\sin ky \cdot \left(\sin th \cdot \frac{1}{\mathsf{hypot}\left(\sin ky, \sin kx\right)}\right)double f(double kx, double ky, double th) {
double r460168 = ky;
double r460169 = sin(r460168);
double r460170 = kx;
double r460171 = sin(r460170);
double r460172 = 2.0;
double r460173 = pow(r460171, r460172);
double r460174 = pow(r460169, r460172);
double r460175 = r460173 + r460174;
double r460176 = sqrt(r460175);
double r460177 = r460169 / r460176;
double r460178 = th;
double r460179 = sin(r460178);
double r460180 = r460177 * r460179;
return r460180;
}
double f(double kx, double ky, double th) {
double r460181 = ky;
double r460182 = sin(r460181);
double r460183 = th;
double r460184 = sin(r460183);
double r460185 = 1.0;
double r460186 = kx;
double r460187 = sin(r460186);
double r460188 = hypot(r460182, r460187);
double r460189 = r460185 / r460188;
double r460190 = r460184 * r460189;
double r460191 = r460182 * r460190;
return r460191;
}



Bits error versus kx



Bits error versus ky



Bits error versus th
Results
Initial program 12.6
Simplified8.9
rmApplied div-inv8.9
rmApplied add-sqr-sqrt9.2
Applied associate-/r*9.2
rmApplied *-un-lft-identity9.2
Applied associate-*l*9.2
Simplified9.0
Final simplification9.0
herbie shell --seed 2019155 +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)))