\frac{\sin ky}{\sqrt{{\left(\sin kx\right)}^{2} + {\left(\sin ky\right)}^{2}}} \cdot \sin th\mathsf{expm1}\left(\mathsf{log1p}\left(\sin th \cdot \frac{\sin ky}{\mathsf{hypot}\left(\sin ky, \sin kx\right)}\right)\right)double f(double kx, double ky, double th) {
double r489689 = ky;
double r489690 = sin(r489689);
double r489691 = kx;
double r489692 = sin(r489691);
double r489693 = 2.0;
double r489694 = pow(r489692, r489693);
double r489695 = pow(r489690, r489693);
double r489696 = r489694 + r489695;
double r489697 = sqrt(r489696);
double r489698 = r489690 / r489697;
double r489699 = th;
double r489700 = sin(r489699);
double r489701 = r489698 * r489700;
return r489701;
}
double f(double kx, double ky, double th) {
double r489702 = th;
double r489703 = sin(r489702);
double r489704 = ky;
double r489705 = sin(r489704);
double r489706 = kx;
double r489707 = sin(r489706);
double r489708 = hypot(r489705, r489707);
double r489709 = r489705 / r489708;
double r489710 = r489703 * r489709;
double r489711 = log1p(r489710);
double r489712 = expm1(r489711);
return r489712;
}



Bits error versus kx



Bits error versus ky



Bits error versus th
Results
Initial program 12.6
Simplified9.0
rmApplied *-un-lft-identity9.0
Applied associate-/r*9.0
Simplified9.0
rmApplied expm1-log1p-u9.1
Final simplification9.1
herbie shell --seed 2019153 +o rules:numerics
(FPCore (kx ky th)
:name "Toniolo and Linder, Equation (3b), real"
(* (/ (sin ky) (sqrt (+ (pow (sin kx) 2) (pow (sin ky) 2)))) (sin th)))