\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({\left(\sin kx\right)}^{\left(\frac{2}{2}\right)}, {\left(\sin ky\right)}^{\left(\frac{2}{2}\right)}\right)}double f(double kx, double ky, double th) {
double r53175 = ky;
double r53176 = sin(r53175);
double r53177 = kx;
double r53178 = sin(r53177);
double r53179 = 2.0;
double r53180 = pow(r53178, r53179);
double r53181 = pow(r53176, r53179);
double r53182 = r53180 + r53181;
double r53183 = sqrt(r53182);
double r53184 = r53176 / r53183;
double r53185 = th;
double r53186 = sin(r53185);
double r53187 = r53184 * r53186;
return r53187;
}
double f(double kx, double ky, double th) {
double r53188 = ky;
double r53189 = sin(r53188);
double r53190 = th;
double r53191 = sin(r53190);
double r53192 = kx;
double r53193 = sin(r53192);
double r53194 = 2.0;
double r53195 = 2.0;
double r53196 = r53194 / r53195;
double r53197 = pow(r53193, r53196);
double r53198 = pow(r53189, r53196);
double r53199 = hypot(r53197, r53198);
double r53200 = r53191 / r53199;
double r53201 = r53189 * r53200;
return r53201;
}



Bits error versus kx



Bits error versus ky



Bits error versus th
Results
Initial program 12.8
rmApplied sqr-pow12.8
Applied sqr-pow12.8
Applied hypot-def9.1
rmApplied div-inv9.2
Applied associate-*l*9.3
Simplified9.2
Final simplification9.2
herbie shell --seed 2019212 +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)))