\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 r472188 = ky;
double r472189 = sin(r472188);
double r472190 = kx;
double r472191 = sin(r472190);
double r472192 = 2.0;
double r472193 = pow(r472191, r472192);
double r472194 = pow(r472189, r472192);
double r472195 = r472193 + r472194;
double r472196 = sqrt(r472195);
double r472197 = r472189 / r472196;
double r472198 = th;
double r472199 = sin(r472198);
double r472200 = r472197 * r472199;
return r472200;
}
double f(double kx, double ky, double th) {
double r472201 = ky;
double r472202 = sin(r472201);
double r472203 = th;
double r472204 = sin(r472203);
double r472205 = kx;
double r472206 = sin(r472205);
double r472207 = hypot(r472202, r472206);
double r472208 = r472204 / r472207;
double r472209 = r472202 * r472208;
return r472209;
}



Bits error versus kx



Bits error versus ky



Bits error versus th
Results
Initial program 12.6
Simplified9.0
rmApplied *-commutative9.0
rmApplied div-inv9.1
Applied associate-*l*9.2
Simplified9.1
Final simplification9.1
herbie shell --seed 2019153 +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)))