\frac{\sin ky}{\sqrt{{\left(\sin kx\right)}^{2} + {\left(\sin ky\right)}^{2}}} \cdot \sin th\sin ky \cdot \frac{\sin th}{1 \cdot \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 r48948 = ky;
double r48949 = sin(r48948);
double r48950 = kx;
double r48951 = sin(r48950);
double r48952 = 2.0;
double r48953 = pow(r48951, r48952);
double r48954 = pow(r48949, r48952);
double r48955 = r48953 + r48954;
double r48956 = sqrt(r48955);
double r48957 = r48949 / r48956;
double r48958 = th;
double r48959 = sin(r48958);
double r48960 = r48957 * r48959;
return r48960;
}
double f(double kx, double ky, double th) {
double r48961 = ky;
double r48962 = sin(r48961);
double r48963 = th;
double r48964 = sin(r48963);
double r48965 = 1.0;
double r48966 = kx;
double r48967 = sin(r48966);
double r48968 = 2.0;
double r48969 = 2.0;
double r48970 = r48968 / r48969;
double r48971 = pow(r48967, r48970);
double r48972 = pow(r48962, r48970);
double r48973 = hypot(r48971, r48972);
double r48974 = r48965 * r48973;
double r48975 = r48964 / r48974;
double r48976 = r48962 * r48975;
return r48976;
}



Bits error versus kx



Bits error versus ky



Bits error versus th
Results
Initial program 12.2
rmApplied sqr-pow12.2
Applied sqr-pow12.2
Applied hypot-def8.5
rmApplied div-inv8.6
Applied associate-*l*8.6
Simplified8.5
rmApplied *-un-lft-identity8.5
Final simplification8.5
herbie shell --seed 2019347 +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)))