\frac{\sin ky}{\sqrt{{\left(\sin kx\right)}^{2} + {\left(\sin ky\right)}^{2}}} \cdot \sin th\sin ky \cdot \frac{\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 r48122 = ky;
double r48123 = sin(r48122);
double r48124 = kx;
double r48125 = sin(r48124);
double r48126 = 2.0;
double r48127 = pow(r48125, r48126);
double r48128 = pow(r48123, r48126);
double r48129 = r48127 + r48128;
double r48130 = sqrt(r48129);
double r48131 = r48123 / r48130;
double r48132 = th;
double r48133 = sin(r48132);
double r48134 = r48131 * r48133;
return r48134;
}
double f(double kx, double ky, double th) {
double r48135 = ky;
double r48136 = sin(r48135);
double r48137 = th;
double r48138 = sin(r48137);
double r48139 = kx;
double r48140 = sin(r48139);
double r48141 = 2.0;
double r48142 = 2.0;
double r48143 = r48141 / r48142;
double r48144 = pow(r48140, r48143);
double r48145 = pow(r48136, r48143);
double r48146 = hypot(r48144, r48145);
double r48147 = r48138 / r48146;
double r48148 = r48136 * r48147;
return r48148;
}



Bits error versus kx



Bits error versus ky



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