\frac{\sin ky}{\sqrt{{\left(\sin kx\right)}^{2} + {\left(\sin ky\right)}^{2}}} \cdot \sin th\frac{\sin ky}{\mathsf{hypot}\left(\sin ky, \sin kx\right)} \cdot \sin thdouble f(double kx, double ky, double th) {
double r34587 = ky;
double r34588 = sin(r34587);
double r34589 = kx;
double r34590 = sin(r34589);
double r34591 = 2.0;
double r34592 = pow(r34590, r34591);
double r34593 = pow(r34588, r34591);
double r34594 = r34592 + r34593;
double r34595 = sqrt(r34594);
double r34596 = r34588 / r34595;
double r34597 = th;
double r34598 = sin(r34597);
double r34599 = r34596 * r34598;
return r34599;
}
double f(double kx, double ky, double th) {
double r34600 = ky;
double r34601 = sin(r34600);
double r34602 = kx;
double r34603 = sin(r34602);
double r34604 = hypot(r34601, r34603);
double r34605 = r34601 / r34604;
double r34606 = th;
double r34607 = sin(r34606);
double r34608 = r34605 * r34607;
return r34608;
}



Bits error versus kx



Bits error versus ky



Bits error versus th
Results
Initial program 12.1
Taylor expanded around inf 12.1
Simplified8.6
rmApplied div-inv8.7
Applied associate-*l*8.8
Simplified8.7
rmApplied clear-num8.8
rmApplied associate-/r/8.8
Applied associate-*r*8.7
Simplified8.6
Final simplification8.6
herbie shell --seed 2019303 +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)))