\frac{\sin ky}{\sqrt{{\left(\sin kx\right)}^{2} + {\left(\sin ky\right)}^{2}}} \cdot \sin th\mathsf{log1p}\left(\mathsf{expm1}\left(\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)}\right)\right) \cdot \sin thdouble f(double kx, double ky, double th) {
double r48065 = ky;
double r48066 = sin(r48065);
double r48067 = kx;
double r48068 = sin(r48067);
double r48069 = 2.0;
double r48070 = pow(r48068, r48069);
double r48071 = pow(r48066, r48069);
double r48072 = r48070 + r48071;
double r48073 = sqrt(r48072);
double r48074 = r48066 / r48073;
double r48075 = th;
double r48076 = sin(r48075);
double r48077 = r48074 * r48076;
return r48077;
}
double f(double kx, double ky, double th) {
double r48078 = ky;
double r48079 = sin(r48078);
double r48080 = kx;
double r48081 = sin(r48080);
double r48082 = 2.0;
double r48083 = 2.0;
double r48084 = r48082 / r48083;
double r48085 = pow(r48081, r48084);
double r48086 = pow(r48079, r48084);
double r48087 = hypot(r48085, r48086);
double r48088 = r48079 / r48087;
double r48089 = expm1(r48088);
double r48090 = log1p(r48089);
double r48091 = th;
double r48092 = sin(r48091);
double r48093 = r48090 * r48092;
return r48093;
}



Bits error versus kx



Bits error versus ky



Bits error versus th
Results
Initial program 12.5
rmApplied sqr-pow12.5
Applied sqr-pow12.5
Applied hypot-def8.9
rmApplied log1p-expm1-u8.9
Final simplification8.9
herbie shell --seed 2020036 +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)))