\frac{\sin ky}{\sqrt{{\left(\sin kx\right)}^{2} + {\left(\sin ky\right)}^{2}}} \cdot \sin th\left(\frac{\sqrt[3]{\sin ky} \cdot \sqrt[3]{\sin ky}}{\sqrt[3]{\mathsf{hypot}\left(\sin ky, \sin kx\right)} \cdot \sqrt[3]{\mathsf{hypot}\left(\sin ky, \sin kx\right)}} \cdot \frac{\sqrt[3]{\sin ky}}{\sqrt[3]{\mathsf{hypot}\left(\sin ky, \sin kx\right)}}\right) \cdot \sin thdouble f(double kx, double ky, double th) {
double r40611 = ky;
double r40612 = sin(r40611);
double r40613 = kx;
double r40614 = sin(r40613);
double r40615 = 2.0;
double r40616 = pow(r40614, r40615);
double r40617 = pow(r40612, r40615);
double r40618 = r40616 + r40617;
double r40619 = sqrt(r40618);
double r40620 = r40612 / r40619;
double r40621 = th;
double r40622 = sin(r40621);
double r40623 = r40620 * r40622;
return r40623;
}
double f(double kx, double ky, double th) {
double r40624 = ky;
double r40625 = sin(r40624);
double r40626 = cbrt(r40625);
double r40627 = r40626 * r40626;
double r40628 = kx;
double r40629 = sin(r40628);
double r40630 = hypot(r40625, r40629);
double r40631 = cbrt(r40630);
double r40632 = r40631 * r40631;
double r40633 = r40627 / r40632;
double r40634 = r40626 / r40631;
double r40635 = r40633 * r40634;
double r40636 = th;
double r40637 = sin(r40636);
double r40638 = r40635 * r40637;
return r40638;
}



Bits error versus kx



Bits error versus ky



Bits error versus th
Results
Initial program 12.3
Taylor expanded around inf 12.3
Simplified8.8
rmApplied add-cube-cbrt9.7
Applied add-cube-cbrt9.3
Applied times-frac9.3
Final simplification9.3
herbie shell --seed 2020001 +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)))