\frac{\sin ky}{\sqrt{{\left(\sin kx\right)}^{2} + {\left(\sin ky\right)}^{2}}} \cdot \sin th\sin th \cdot \frac{\frac{\sin ky}{\sqrt{\mathsf{hypot}\left(\sin ky, \sin kx\right)}}}{\sqrt{\mathsf{hypot}\left(\sin ky, \sin kx\right)}}double f(double kx, double ky, double th) {
double r846687 = ky;
double r846688 = sin(r846687);
double r846689 = kx;
double r846690 = sin(r846689);
double r846691 = 2.0;
double r846692 = pow(r846690, r846691);
double r846693 = pow(r846688, r846691);
double r846694 = r846692 + r846693;
double r846695 = sqrt(r846694);
double r846696 = r846688 / r846695;
double r846697 = th;
double r846698 = sin(r846697);
double r846699 = r846696 * r846698;
return r846699;
}
double f(double kx, double ky, double th) {
double r846700 = th;
double r846701 = sin(r846700);
double r846702 = ky;
double r846703 = sin(r846702);
double r846704 = kx;
double r846705 = sin(r846704);
double r846706 = hypot(r846703, r846705);
double r846707 = sqrt(r846706);
double r846708 = r846703 / r846707;
double r846709 = r846708 / r846707;
double r846710 = r846701 * r846709;
return r846710;
}



Bits error versus kx



Bits error versus ky



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