\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(\sin ky, \sin kx\right)}double f(double kx, double ky, double th) {
double r33631 = ky;
double r33632 = sin(r33631);
double r33633 = kx;
double r33634 = sin(r33633);
double r33635 = 2.0;
double r33636 = pow(r33634, r33635);
double r33637 = pow(r33632, r33635);
double r33638 = r33636 + r33637;
double r33639 = sqrt(r33638);
double r33640 = r33632 / r33639;
double r33641 = th;
double r33642 = sin(r33641);
double r33643 = r33640 * r33642;
return r33643;
}
double f(double kx, double ky, double th) {
double r33644 = ky;
double r33645 = sin(r33644);
double r33646 = th;
double r33647 = sin(r33646);
double r33648 = kx;
double r33649 = sin(r33648);
double r33650 = hypot(r33645, r33649);
double r33651 = r33647 / r33650;
double r33652 = r33645 * r33651;
return r33652;
}



Bits error versus kx



Bits error versus ky



Bits error versus th
Results
Initial program 4.0
Taylor expanded around inf 4.0
Simplified0.2
rmApplied div-inv0.3
Applied associate-*l*0.4
Simplified0.3
Final simplification0.3
herbie shell --seed 2020059 +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)))