\frac{\sin ky}{\sqrt{{\left(\sin kx\right)}^{2} + {\left(\sin ky\right)}^{2}}} \cdot \sin th\left(\sqrt[3]{\frac{\sin ky}{\mathsf{hypot}\left(\sin ky, \sin kx\right)}} \cdot \sqrt[3]{\frac{\sin ky}{\mathsf{hypot}\left(\sin ky, \sin kx\right)}}\right) \cdot \left(\sin th \cdot \sqrt[3]{\frac{\sin ky}{\mathsf{hypot}\left(\sin ky, \sin kx\right)}}\right)double f(double kx, double ky, double th) {
double r1068517 = ky;
double r1068518 = sin(r1068517);
double r1068519 = kx;
double r1068520 = sin(r1068519);
double r1068521 = 2.0;
double r1068522 = pow(r1068520, r1068521);
double r1068523 = pow(r1068518, r1068521);
double r1068524 = r1068522 + r1068523;
double r1068525 = sqrt(r1068524);
double r1068526 = r1068518 / r1068525;
double r1068527 = th;
double r1068528 = sin(r1068527);
double r1068529 = r1068526 * r1068528;
return r1068529;
}
double f(double kx, double ky, double th) {
double r1068530 = ky;
double r1068531 = sin(r1068530);
double r1068532 = kx;
double r1068533 = sin(r1068532);
double r1068534 = hypot(r1068531, r1068533);
double r1068535 = r1068531 / r1068534;
double r1068536 = cbrt(r1068535);
double r1068537 = r1068536 * r1068536;
double r1068538 = th;
double r1068539 = sin(r1068538);
double r1068540 = r1068539 * r1068536;
double r1068541 = r1068537 * r1068540;
return r1068541;
}



Bits error versus kx



Bits error versus ky



Bits error versus th
Results
Initial program 12.5
Taylor expanded around inf 12.5
Simplified8.9
rmApplied add-cube-cbrt9.2
Applied associate-*l*9.3
rmApplied *-un-lft-identity9.3
Final simplification9.3
herbie shell --seed 2019171 +o rules:numerics
(FPCore (kx ky th)
:name "Toniolo and Linder, Equation (3b), real"
(* (/ (sin ky) (sqrt (+ (pow (sin kx) 2.0) (pow (sin ky) 2.0)))) (sin th)))