\frac{\sin ky}{\sqrt{{\left(\sin kx\right)}^{2} + {\left(\sin ky\right)}^{2}}} \cdot \sin th\left(\sqrt[3]{\frac{\sin ky}{\mathsf{hypot}\left(\sin ky, \sin kx\right)}} \cdot \sqrt[3]{\frac{\sin ky}{\mathsf{hypot}\left(\sin ky, \sin kx\right)}}\right) \cdot \left(\sin th \cdot \sqrt[3]{\frac{\sin ky}{\mathsf{hypot}\left(\sin ky, \sin kx\right)}}\right)double f(double kx, double ky, double th) {
double r1247963 = ky;
double r1247964 = sin(r1247963);
double r1247965 = kx;
double r1247966 = sin(r1247965);
double r1247967 = 2.0;
double r1247968 = pow(r1247966, r1247967);
double r1247969 = pow(r1247964, r1247967);
double r1247970 = r1247968 + r1247969;
double r1247971 = sqrt(r1247970);
double r1247972 = r1247964 / r1247971;
double r1247973 = th;
double r1247974 = sin(r1247973);
double r1247975 = r1247972 * r1247974;
return r1247975;
}
double f(double kx, double ky, double th) {
double r1247976 = ky;
double r1247977 = sin(r1247976);
double r1247978 = kx;
double r1247979 = sin(r1247978);
double r1247980 = hypot(r1247977, r1247979);
double r1247981 = r1247977 / r1247980;
double r1247982 = cbrt(r1247981);
double r1247983 = r1247982 * r1247982;
double r1247984 = th;
double r1247985 = sin(r1247984);
double r1247986 = r1247985 * r1247982;
double r1247987 = r1247983 * r1247986;
return r1247987;
}



Bits error versus kx



Bits error versus ky



Bits error versus th
Results
Initial program 12.5
Taylor expanded around inf 12.5
Simplified8.9
rmApplied add-cube-cbrt9.2
Applied associate-*l*9.3
rmApplied *-un-lft-identity9.3
Final simplification9.3
herbie shell --seed 2019171 +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)))