\frac{\sin ky}{\sqrt{{\left(\sin kx\right)}^{2} + {\left(\sin ky\right)}^{2}}} \cdot \sin th\sin ky \cdot \frac{\sin th}{\mathsf{hypot}\left({\left(\sin kx\right)}^{\left(\frac{2}{2}\right)}, {\left(\sin ky\right)}^{\left(\frac{2}{2}\right)}\right)}double f(double kx, double ky, double th) {
double r54169 = ky;
double r54170 = sin(r54169);
double r54171 = kx;
double r54172 = sin(r54171);
double r54173 = 2.0;
double r54174 = pow(r54172, r54173);
double r54175 = pow(r54170, r54173);
double r54176 = r54174 + r54175;
double r54177 = sqrt(r54176);
double r54178 = r54170 / r54177;
double r54179 = th;
double r54180 = sin(r54179);
double r54181 = r54178 * r54180;
return r54181;
}
double f(double kx, double ky, double th) {
double r54182 = ky;
double r54183 = sin(r54182);
double r54184 = th;
double r54185 = sin(r54184);
double r54186 = kx;
double r54187 = sin(r54186);
double r54188 = 2.0;
double r54189 = 2.0;
double r54190 = r54188 / r54189;
double r54191 = pow(r54187, r54190);
double r54192 = pow(r54183, r54190);
double r54193 = hypot(r54191, r54192);
double r54194 = r54185 / r54193;
double r54195 = r54183 * r54194;
return r54195;
}



Bits error versus kx



Bits error versus ky



Bits error versus th
Results
Initial program 4.2
rmApplied sqr-pow4.2
Applied sqr-pow4.2
Applied hypot-def0.2
rmApplied div-inv0.3
Applied associate-*l*0.4
Simplified0.3
Final simplification0.3
herbie shell --seed 2020046 +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)))