\frac{\sin ky}{\sqrt{{\left(\sin kx\right)}^{2} + {\left(\sin ky\right)}^{2}}} \cdot \sin th\frac{\sin ky}{\mathsf{expm1}\left(\mathsf{log1p}\left(\mathsf{hypot}\left({\left(\sin kx\right)}^{\left(\frac{2}{2}\right)}, {\left(\sin ky\right)}^{\left(\frac{2}{2}\right)}\right)\right)\right)} \cdot \sin thdouble f(double kx, double ky, double th) {
double r59571 = ky;
double r59572 = sin(r59571);
double r59573 = kx;
double r59574 = sin(r59573);
double r59575 = 2.0;
double r59576 = pow(r59574, r59575);
double r59577 = pow(r59572, r59575);
double r59578 = r59576 + r59577;
double r59579 = sqrt(r59578);
double r59580 = r59572 / r59579;
double r59581 = th;
double r59582 = sin(r59581);
double r59583 = r59580 * r59582;
return r59583;
}
double f(double kx, double ky, double th) {
double r59584 = ky;
double r59585 = sin(r59584);
double r59586 = kx;
double r59587 = sin(r59586);
double r59588 = 2.0;
double r59589 = 2.0;
double r59590 = r59588 / r59589;
double r59591 = pow(r59587, r59590);
double r59592 = pow(r59585, r59590);
double r59593 = hypot(r59591, r59592);
double r59594 = log1p(r59593);
double r59595 = expm1(r59594);
double r59596 = r59585 / r59595;
double r59597 = th;
double r59598 = sin(r59597);
double r59599 = r59596 * r59598;
return r59599;
}



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 expm1-log1p-u8.9
Final simplification8.9
herbie shell --seed 2019199 +o rules:numerics
(FPCore (kx ky th)
:name "Toniolo and Linder, Equation (3b), real"
(* (/ (sin ky) (sqrt (+ (pow (sin kx) 2.0) (pow (sin ky) 2.0)))) (sin th)))