\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 r36283 = ky;
double r36284 = sin(r36283);
double r36285 = kx;
double r36286 = sin(r36285);
double r36287 = 2.0;
double r36288 = pow(r36286, r36287);
double r36289 = pow(r36284, r36287);
double r36290 = r36288 + r36289;
double r36291 = sqrt(r36290);
double r36292 = r36284 / r36291;
double r36293 = th;
double r36294 = sin(r36293);
double r36295 = r36292 * r36294;
return r36295;
}
double f(double kx, double ky, double th) {
double r36296 = ky;
double r36297 = sin(r36296);
double r36298 = th;
double r36299 = sin(r36298);
double r36300 = kx;
double r36301 = sin(r36300);
double r36302 = hypot(r36297, r36301);
double r36303 = r36299 / r36302;
double r36304 = r36297 * r36303;
return r36304;
}



Bits error versus kx



Bits error versus ky



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