\frac{\sin ky}{\sqrt{{\left(\sin kx\right)}^{2} + {\left(\sin ky\right)}^{2}}} \cdot \sin th\left(\frac{1}{\sqrt{\mathsf{hypot}\left(\sin ky, \sin kx\right)}} \cdot \frac{\sin ky}{\sqrt{\mathsf{hypot}\left(\sin ky, \sin kx\right)}}\right) \cdot \sin thdouble f(double kx, double ky, double th) {
double r604772 = ky;
double r604773 = sin(r604772);
double r604774 = kx;
double r604775 = sin(r604774);
double r604776 = 2.0;
double r604777 = pow(r604775, r604776);
double r604778 = pow(r604773, r604776);
double r604779 = r604777 + r604778;
double r604780 = sqrt(r604779);
double r604781 = r604773 / r604780;
double r604782 = th;
double r604783 = sin(r604782);
double r604784 = r604781 * r604783;
return r604784;
}
double f(double kx, double ky, double th) {
double r604785 = 1.0;
double r604786 = ky;
double r604787 = sin(r604786);
double r604788 = kx;
double r604789 = sin(r604788);
double r604790 = hypot(r604787, r604789);
double r604791 = sqrt(r604790);
double r604792 = r604785 / r604791;
double r604793 = r604787 / r604791;
double r604794 = r604792 * r604793;
double r604795 = th;
double r604796 = sin(r604795);
double r604797 = r604794 * r604796;
return r604797;
}



Bits error versus kx



Bits error versus ky



Bits error versus th
Results
Initial program 12.4
Simplified9.0
rmApplied add-sqr-sqrt9.3
Applied *-un-lft-identity9.3
Applied times-frac9.3
Final simplification9.3
herbie shell --seed 2019152 +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)))