\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 r49965 = ky;
double r49966 = sin(r49965);
double r49967 = kx;
double r49968 = sin(r49967);
double r49969 = 2.0;
double r49970 = pow(r49968, r49969);
double r49971 = pow(r49966, r49969);
double r49972 = r49970 + r49971;
double r49973 = sqrt(r49972);
double r49974 = r49966 / r49973;
double r49975 = th;
double r49976 = sin(r49975);
double r49977 = r49974 * r49976;
return r49977;
}
double f(double kx, double ky, double th) {
double r49978 = ky;
double r49979 = sin(r49978);
double r49980 = kx;
double r49981 = sin(r49980);
double r49982 = 2.0;
double r49983 = 2.0;
double r49984 = r49982 / r49983;
double r49985 = pow(r49981, r49984);
double r49986 = pow(r49979, r49984);
double r49987 = hypot(r49985, r49986);
double r49988 = r49979 / r49987;
double r49989 = expm1(r49988);
double r49990 = log1p(r49989);
double r49991 = th;
double r49992 = sin(r49991);
double r49993 = r49990 * r49992;
return r49993;
}



Bits error versus kx



Bits error versus ky



Bits error versus th
Results
Initial program 3.8
rmApplied sqr-pow3.8
Applied sqr-pow3.8
Applied hypot-def0.2
rmApplied log1p-expm1-u0.2
Final simplification0.2
herbie shell --seed 2020057 +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)))