\frac{\sin ky}{\sqrt{{\left(\sin kx\right)}^{2} + {\left(\sin ky\right)}^{2}}} \cdot \sin th\sin ky \cdot \frac{1 \cdot \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 r43779 = ky;
double r43780 = sin(r43779);
double r43781 = kx;
double r43782 = sin(r43781);
double r43783 = 2.0;
double r43784 = pow(r43782, r43783);
double r43785 = pow(r43780, r43783);
double r43786 = r43784 + r43785;
double r43787 = sqrt(r43786);
double r43788 = r43780 / r43787;
double r43789 = th;
double r43790 = sin(r43789);
double r43791 = r43788 * r43790;
return r43791;
}
double f(double kx, double ky, double th) {
double r43792 = ky;
double r43793 = sin(r43792);
double r43794 = 1.0;
double r43795 = th;
double r43796 = sin(r43795);
double r43797 = r43794 * r43796;
double r43798 = kx;
double r43799 = sin(r43798);
double r43800 = 2.0;
double r43801 = 2.0;
double r43802 = r43800 / r43801;
double r43803 = pow(r43799, r43802);
double r43804 = pow(r43793, r43802);
double r43805 = hypot(r43803, r43804);
double r43806 = r43797 / r43805;
double r43807 = r43793 * r43806;
return r43807;
}



Bits error versus kx



Bits error versus ky



Bits error versus th
Results
Initial program 12.5
rmApplied sqr-pow12.5
Applied sqr-pow12.5
Applied hypot-def8.8
rmApplied pow18.8
rmApplied div-inv8.9
Applied associate-*l*9.0
Simplified8.9
Final simplification8.9
herbie shell --seed 2019353 +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)))