\frac{\sin ky}{\sqrt{{\left(\sin kx\right)}^{2} + {\left(\sin ky\right)}^{2}}} \cdot \sin th\frac{\sqrt[3]{\frac{\sin ky}{\mathsf{hypot}\left(\sin ky, \sin kx\right)}} \cdot \sqrt[3]{\sin ky}}{\sqrt[3]{\mathsf{hypot}\left(\sin ky, \sin kx\right)}} \cdot \left(\sqrt[3]{\frac{\sin ky}{\mathsf{hypot}\left(\sin ky, \sin kx\right)}} \cdot \sin th\right)double f(double kx, double ky, double th) {
double r37085 = ky;
double r37086 = sin(r37085);
double r37087 = kx;
double r37088 = sin(r37087);
double r37089 = 2.0;
double r37090 = pow(r37088, r37089);
double r37091 = pow(r37086, r37089);
double r37092 = r37090 + r37091;
double r37093 = sqrt(r37092);
double r37094 = r37086 / r37093;
double r37095 = th;
double r37096 = sin(r37095);
double r37097 = r37094 * r37096;
return r37097;
}
double f(double kx, double ky, double th) {
double r37098 = ky;
double r37099 = sin(r37098);
double r37100 = kx;
double r37101 = sin(r37100);
double r37102 = hypot(r37099, r37101);
double r37103 = r37099 / r37102;
double r37104 = cbrt(r37103);
double r37105 = cbrt(r37099);
double r37106 = r37104 * r37105;
double r37107 = cbrt(r37102);
double r37108 = r37106 / r37107;
double r37109 = th;
double r37110 = sin(r37109);
double r37111 = r37104 * r37110;
double r37112 = r37108 * r37111;
return r37112;
}



Bits error versus kx



Bits error versus ky



Bits error versus th
Results
Initial program 12.9
Taylor expanded around inf 12.9
Simplified9.1
rmApplied add-cube-cbrt9.5
Applied associate-*l*9.5
rmApplied cbrt-div9.4
Applied associate-*r/9.4
Final simplification9.4
herbie shell --seed 2020024 +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)))