\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 kx, \sin ky\right)}double f(double kx, double ky, double th) {
double r1143653 = ky;
double r1143654 = sin(r1143653);
double r1143655 = kx;
double r1143656 = sin(r1143655);
double r1143657 = 2.0;
double r1143658 = pow(r1143656, r1143657);
double r1143659 = pow(r1143654, r1143657);
double r1143660 = r1143658 + r1143659;
double r1143661 = sqrt(r1143660);
double r1143662 = r1143654 / r1143661;
double r1143663 = th;
double r1143664 = sin(r1143663);
double r1143665 = r1143662 * r1143664;
return r1143665;
}
double f(double kx, double ky, double th) {
double r1143666 = ky;
double r1143667 = sin(r1143666);
double r1143668 = th;
double r1143669 = sin(r1143668);
double r1143670 = kx;
double r1143671 = sin(r1143670);
double r1143672 = hypot(r1143671, r1143667);
double r1143673 = r1143669 / r1143672;
double r1143674 = r1143667 * r1143673;
return r1143674;
}



Bits error versus kx



Bits error versus ky



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