\frac{\sin ky}{\sqrt{{\left(\sin kx\right)}^{2} + {\left(\sin ky\right)}^{2}}} \cdot \sin th\frac{\sin th}{\mathsf{hypot}\left(\sin ky, \sin kx\right)} \cdot \sin kydouble f(double kx, double ky, double th) {
double r31562 = ky;
double r31563 = sin(r31562);
double r31564 = kx;
double r31565 = sin(r31564);
double r31566 = 2.0;
double r31567 = pow(r31565, r31566);
double r31568 = pow(r31563, r31566);
double r31569 = r31567 + r31568;
double r31570 = sqrt(r31569);
double r31571 = r31563 / r31570;
double r31572 = th;
double r31573 = sin(r31572);
double r31574 = r31571 * r31573;
return r31574;
}
double f(double kx, double ky, double th) {
double r31575 = th;
double r31576 = sin(r31575);
double r31577 = ky;
double r31578 = sin(r31577);
double r31579 = kx;
double r31580 = sin(r31579);
double r31581 = hypot(r31578, r31580);
double r31582 = r31576 / r31581;
double r31583 = r31582 * r31578;
return r31583;
}



Bits error versus kx



Bits error versus ky



Bits error versus th
Results
Initial program 12.2
Taylor expanded around inf 12.2
Simplified8.5
rmApplied div-inv8.6
Applied associate-*l*8.6
Simplified8.5
rmApplied *-un-lft-identity8.5
Applied *-un-lft-identity8.5
Applied times-frac8.5
Simplified8.5
Final simplification8.5
herbie shell --seed 2019347 +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)))