\frac{\sin ky}{\sqrt{{\left(\sin kx\right)}^{2} + {\left(\sin ky\right)}^{2}}} \cdot \sin th\left(\sin th \cdot \frac{\sin ky}{\mathsf{hypot}\left({\left(\sin kx\right)}^{\left(\frac{2}{2}\right)}, {\left(\sin ky\right)}^{\left(\frac{2}{2}\right)}\right)}\right) \cdot \sqrt{1}double f(double kx, double ky, double th) {
double r58521 = ky;
double r58522 = sin(r58521);
double r58523 = kx;
double r58524 = sin(r58523);
double r58525 = 2.0;
double r58526 = pow(r58524, r58525);
double r58527 = pow(r58522, r58525);
double r58528 = r58526 + r58527;
double r58529 = sqrt(r58528);
double r58530 = r58522 / r58529;
double r58531 = th;
double r58532 = sin(r58531);
double r58533 = r58530 * r58532;
return r58533;
}
double f(double kx, double ky, double th) {
double r58534 = th;
double r58535 = sin(r58534);
double r58536 = ky;
double r58537 = sin(r58536);
double r58538 = kx;
double r58539 = sin(r58538);
double r58540 = 2.0;
double r58541 = 2.0;
double r58542 = r58540 / r58541;
double r58543 = pow(r58539, r58542);
double r58544 = pow(r58537, r58542);
double r58545 = hypot(r58543, r58544);
double r58546 = r58537 / r58545;
double r58547 = r58535 * r58546;
double r58548 = 1.0;
double r58549 = sqrt(r58548);
double r58550 = r58547 * r58549;
return r58550;
}



Bits error versus kx



Bits error versus ky



Bits error versus th
Results
Initial program 12.1
rmApplied sqr-pow12.1
Applied sqr-pow12.1
Applied hypot-def8.7
rmApplied clear-num8.7
rmApplied *-un-lft-identity8.7
Applied *-un-lft-identity8.7
Applied times-frac8.7
Applied add-sqr-sqrt8.7
Applied times-frac8.7
Applied associate-*l*8.7
Simplified8.7
rmApplied div-inv8.7
Simplified8.7
Final simplification8.7
herbie shell --seed 2020021 +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)))