\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(\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 r33100 = ky;
double r33101 = sin(r33100);
double r33102 = kx;
double r33103 = sin(r33102);
double r33104 = 2.0;
double r33105 = pow(r33103, r33104);
double r33106 = pow(r33101, r33104);
double r33107 = r33105 + r33106;
double r33108 = sqrt(r33107);
double r33109 = r33101 / r33108;
double r33110 = th;
double r33111 = sin(r33110);
double r33112 = r33109 * r33111;
return r33112;
}
double f(double kx, double ky, double th) {
double r33113 = ky;
double r33114 = sin(r33113);
double r33115 = kx;
double r33116 = sin(r33115);
double r33117 = hypot(r33114, r33116);
double r33118 = r33114 / r33117;
double r33119 = cbrt(r33118);
double r33120 = r33119 * r33119;
double r33121 = th;
double r33122 = sin(r33121);
double r33123 = r33119 * r33122;
double r33124 = r33120 * r33123;
return r33124;
}



Bits error versus kx



Bits error versus ky



Bits error versus th
Results
Initial program 12.2
Taylor expanded around inf 12.2
Simplified8.6
rmApplied add-cube-cbrt8.9
Applied associate-*l*8.9
Final simplification8.9
herbie shell --seed 2019325 +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)))