\frac{\sin ky}{\sqrt{{\left(\sin kx\right)}^{2.0} + {\left(\sin ky\right)}^{2.0}}} \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 r1049119 = ky;
double r1049120 = sin(r1049119);
double r1049121 = kx;
double r1049122 = sin(r1049121);
double r1049123 = 2.0;
double r1049124 = pow(r1049122, r1049123);
double r1049125 = pow(r1049120, r1049123);
double r1049126 = r1049124 + r1049125;
double r1049127 = sqrt(r1049126);
double r1049128 = r1049120 / r1049127;
double r1049129 = th;
double r1049130 = sin(r1049129);
double r1049131 = r1049128 * r1049130;
return r1049131;
}
double f(double kx, double ky, double th) {
double r1049132 = ky;
double r1049133 = sin(r1049132);
double r1049134 = th;
double r1049135 = sin(r1049134);
double r1049136 = kx;
double r1049137 = sin(r1049136);
double r1049138 = hypot(r1049133, r1049137);
double r1049139 = r1049135 / r1049138;
double r1049140 = r1049133 * r1049139;
return r1049140;
}



Bits error versus kx



Bits error versus ky



Bits error versus th
Results
Initial program 12.3
Taylor expanded around inf 12.3
Simplified8.8
rmApplied div-inv8.9
Applied associate-*l*8.9
Simplified8.8
Final simplification8.8
herbie shell --seed 2019165 +o rules:numerics
(FPCore (kx ky th)
:name "Toniolo and Linder, Equation (3b), real"
(* (/ (sin ky) (sqrt (+ (pow (sin kx) 2.0) (pow (sin ky) 2.0)))) (sin th)))