\frac{\sin ky}{\sqrt{{\left(\sin kx\right)}^{2} + {\left(\sin ky\right)}^{2}}} \cdot \sin th\frac{\sin th}{\frac{\mathsf{hypot}\left(\sin ky, \sin kx\right)}{\sin ky}}double f(double kx, double ky, double th) {
double r33686 = ky;
double r33687 = sin(r33686);
double r33688 = kx;
double r33689 = sin(r33688);
double r33690 = 2.0;
double r33691 = pow(r33689, r33690);
double r33692 = pow(r33687, r33690);
double r33693 = r33691 + r33692;
double r33694 = sqrt(r33693);
double r33695 = r33687 / r33694;
double r33696 = th;
double r33697 = sin(r33696);
double r33698 = r33695 * r33697;
return r33698;
}
double f(double kx, double ky, double th) {
double r33699 = th;
double r33700 = sin(r33699);
double r33701 = ky;
double r33702 = sin(r33701);
double r33703 = kx;
double r33704 = sin(r33703);
double r33705 = hypot(r33702, r33704);
double r33706 = r33705 / r33702;
double r33707 = r33700 / r33706;
return r33707;
}



Bits error versus kx



Bits error versus ky



Bits error versus th
Results
Initial program 4.1
Taylor expanded around inf 4.1
Simplified0.2
rmApplied *-commutative0.2
rmApplied clear-num0.3
rmApplied *-un-lft-identity0.3
Applied associate-*l*0.3
Simplified0.2
Final simplification0.2
herbie shell --seed 2020062 +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)))