\frac{\sin ky}{\sqrt{{\left(\sin kx\right)}^{2} + {\left(\sin ky\right)}^{2}}} \cdot \sin th\mathsf{log1p}\left(\mathsf{expm1}\left(\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)} \cdot \sin th\right)\right)double f(double kx, double ky, double th) {
double r46543 = ky;
double r46544 = sin(r46543);
double r46545 = kx;
double r46546 = sin(r46545);
double r46547 = 2.0;
double r46548 = pow(r46546, r46547);
double r46549 = pow(r46544, r46547);
double r46550 = r46548 + r46549;
double r46551 = sqrt(r46550);
double r46552 = r46544 / r46551;
double r46553 = th;
double r46554 = sin(r46553);
double r46555 = r46552 * r46554;
return r46555;
}
double f(double kx, double ky, double th) {
double r46556 = ky;
double r46557 = sin(r46556);
double r46558 = kx;
double r46559 = sin(r46558);
double r46560 = 2.0;
double r46561 = 2.0;
double r46562 = r46560 / r46561;
double r46563 = pow(r46559, r46562);
double r46564 = pow(r46557, r46562);
double r46565 = hypot(r46563, r46564);
double r46566 = r46557 / r46565;
double r46567 = th;
double r46568 = sin(r46567);
double r46569 = r46566 * r46568;
double r46570 = expm1(r46569);
double r46571 = log1p(r46570);
return r46571;
}



Bits error versus kx



Bits error versus ky



Bits error versus th
Results
Initial program 12.2
rmApplied sqr-pow12.2
Applied sqr-pow12.2
Applied hypot-def8.5
rmApplied log1p-expm1-u8.5
Final simplification8.5
herbie shell --seed 2020056 +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)))