\frac{\sin ky}{\sqrt{{\left(\sin kx\right)}^{2} + {\left(\sin ky\right)}^{2}}} \cdot \sin th\left(\sin ky \cdot \frac{1}{\mathsf{hypot}\left(\sin ky, \sin kx\right)}\right) \cdot \sin thdouble f(double kx, double ky, double th) {
double r33803 = ky;
double r33804 = sin(r33803);
double r33805 = kx;
double r33806 = sin(r33805);
double r33807 = 2.0;
double r33808 = pow(r33806, r33807);
double r33809 = pow(r33804, r33807);
double r33810 = r33808 + r33809;
double r33811 = sqrt(r33810);
double r33812 = r33804 / r33811;
double r33813 = th;
double r33814 = sin(r33813);
double r33815 = r33812 * r33814;
return r33815;
}
double f(double kx, double ky, double th) {
double r33816 = ky;
double r33817 = sin(r33816);
double r33818 = 1.0;
double r33819 = kx;
double r33820 = sin(r33819);
double r33821 = hypot(r33817, r33820);
double r33822 = r33818 / r33821;
double r33823 = r33817 * r33822;
double r33824 = th;
double r33825 = sin(r33824);
double r33826 = r33823 * r33825;
return r33826;
}



Bits error versus kx



Bits error versus ky



Bits error versus th
Results
Initial program 12.5
Taylor expanded around inf 12.5
Simplified8.7
rmApplied expm1-log1p-u8.8
rmApplied div-inv8.9
Simplified8.8
Final simplification8.8
herbie shell --seed 2020027 +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)))