\frac{\sin ky}{\sqrt{{\left(\sin kx\right)}^{2} + {\left(\sin ky\right)}^{2}}} \cdot \sin th\begin{array}{l}
\mathbf{if}\;kx \le -2.1002849544539553 \cdot 10^{-256}:\\
\;\;\;\;\left(\sqrt{\frac{1}{{\left(\sin kx\right)}^{2} + {\left(\sin ky\right)}^{2}}} \cdot \sin ky\right) \cdot \sin th\\
\mathbf{elif}\;kx \le -1.87767470466880026 \cdot 10^{-272}:\\
\;\;\;\;\left(1 - \frac{1}{6} \cdot {kx}^{2}\right) \cdot \sin th\\
\mathbf{else}:\\
\;\;\;\;\left(\sin ky \cdot \frac{1}{\sqrt{{\left(\sin kx\right)}^{2} + {\left(\sin ky\right)}^{2}}}\right) \cdot \sin th\\
\end{array}double code(double kx, double ky, double th) {
return ((double) (((double) (((double) sin(ky)) / ((double) sqrt(((double) (((double) pow(((double) sin(kx)), 2.0)) + ((double) pow(((double) sin(ky)), 2.0)))))))) * ((double) sin(th))));
}
double code(double kx, double ky, double th) {
double VAR;
if ((kx <= -2.1002849544539553e-256)) {
VAR = ((double) (((double) (((double) sqrt(((double) (1.0 / ((double) (((double) pow(((double) sin(kx)), 2.0)) + ((double) pow(((double) sin(ky)), 2.0)))))))) * ((double) sin(ky)))) * ((double) sin(th))));
} else {
double VAR_1;
if ((kx <= -1.8776747046688003e-272)) {
VAR_1 = ((double) (((double) (1.0 - ((double) (0.16666666666666666 * ((double) pow(kx, 2.0)))))) * ((double) sin(th))));
} else {
VAR_1 = ((double) (((double) (((double) sin(ky)) * ((double) (1.0 / ((double) sqrt(((double) (((double) pow(((double) sin(kx)), 2.0)) + ((double) pow(((double) sin(ky)), 2.0)))))))))) * ((double) sin(th))));
}
VAR = VAR_1;
}
return VAR;
}



Bits error versus kx



Bits error versus ky



Bits error versus th
Results
if kx < -2.1002849544539553e-256Initial program 2.9
Taylor expanded around inf 3.1
if -2.1002849544539553e-256 < kx < -1.87767470466880026e-272Initial program 18.6
Taylor expanded around inf 18.7
Taylor expanded around 0 32.4
if -1.87767470466880026e-272 < kx Initial program 4.3
rmApplied div-inv4.4
Final simplification4.2
herbie shell --seed 2020161
(FPCore (kx ky th)
:name "Toniolo and Linder, Equation (3b), real"
:precision binary64
(* (/ (sin ky) (sqrt (+ (pow (sin kx) 2.0) (pow (sin ky) 2.0)))) (sin th)))