\frac{\sin ky}{\sqrt{{\left(\sin kx\right)}^{2} + {\left(\sin ky\right)}^{2}}} \cdot \sin th\frac{\sin ky}{\mathsf{hypot}\left({\left(\sin kx\right)}^{\left(\frac{2}{2}\right)}, {\left(\sin ky\right)}^{\left(\frac{2}{2}\right)}\right)} \cdot \sin thdouble f(double kx, double ky, double th) {
double r108 = ky;
double r109 = sin(r108);
double r110 = kx;
double r111 = sin(r110);
double r112 = 2.0;
double r113 = pow(r111, r112);
double r114 = pow(r109, r112);
double r115 = r113 + r114;
double r116 = sqrt(r115);
double r117 = r109 / r116;
double r118 = th;
double r119 = sin(r118);
double r120 = r117 * r119;
return r120;
}
double f(double kx, double ky, double th) {
double r121 = ky;
double r122 = sin(r121);
double r123 = kx;
double r124 = sin(r123);
double r125 = 2.0;
double r126 = 2.0;
double r127 = r125 / r126;
double r128 = pow(r124, r127);
double r129 = pow(r122, r127);
double r130 = hypot(r128, r129);
double r131 = r122 / r130;
double r132 = th;
double r133 = sin(r132);
double r134 = r131 * r133;
return r134;
}



Bits error versus kx



Bits error versus ky



Bits error versus th
Results
Initial program 12.6
rmApplied sqr-pow12.6
Applied sqr-pow12.6
Applied hypot-def9.0
Final simplification9.0
herbie shell --seed 2020025 +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)))