\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}\begin{array}{l}
\mathbf{if}\;F \le -99771073.7748098224:\\
\;\;\;\;\left(-\frac{x}{\frac{\tan B}{1}}\right) + \left(1 \cdot \frac{1}{\sin B \cdot {F}^{2}} - \frac{1}{\sin B}\right)\\
\mathbf{elif}\;F \le 3.99929698532464133 \cdot 10^{93}:\\
\;\;\;\;\left(-\frac{x}{\frac{\tan B}{1}}\right) + \frac{1}{\left(-\sin B\right) \cdot {\left(\sqrt{\left(F \cdot F + 2\right) + 2 \cdot x}\right)}^{\left(\frac{1}{2}\right)}} \cdot \frac{-F}{{\left(\sqrt{\left(F \cdot F + 2\right) + 2 \cdot x}\right)}^{\left(\frac{1}{2}\right)}}\\
\mathbf{else}:\\
\;\;\;\;\left(-\frac{x}{\frac{\tan B}{1}}\right) + \left(\frac{1}{\sin B} - 1 \cdot \frac{1}{\sin B \cdot {F}^{2}}\right)\\
\end{array}double code(double F, double B, double x) {
return ((double) (((double) -(((double) (x * ((double) (1.0 / ((double) tan(B)))))))) + ((double) (((double) (F / ((double) sin(B)))) * ((double) pow(((double) (((double) (((double) (F * F)) + 2.0)) + ((double) (2.0 * x)))), ((double) -(((double) (1.0 / 2.0))))))))));
}
double code(double F, double B, double x) {
double VAR;
if ((F <= -99771073.77480982)) {
VAR = ((double) (((double) -(((double) (x / ((double) (((double) tan(B)) / 1.0)))))) + ((double) (((double) (1.0 * ((double) (1.0 / ((double) (((double) sin(B)) * ((double) pow(F, 2.0)))))))) - ((double) (1.0 / ((double) sin(B))))))));
} else {
double VAR_1;
if ((F <= 3.9992969853246413e+93)) {
VAR_1 = ((double) (((double) -(((double) (x / ((double) (((double) tan(B)) / 1.0)))))) + ((double) (((double) (1.0 / ((double) (((double) -(((double) sin(B)))) * ((double) pow(((double) sqrt(((double) (((double) (((double) (F * F)) + 2.0)) + ((double) (2.0 * x)))))), ((double) (1.0 / 2.0)))))))) * ((double) (((double) -(F)) / ((double) pow(((double) sqrt(((double) (((double) (((double) (F * F)) + 2.0)) + ((double) (2.0 * x)))))), ((double) (1.0 / 2.0))))))))));
} else {
VAR_1 = ((double) (((double) -(((double) (x / ((double) (((double) tan(B)) / 1.0)))))) + ((double) (((double) (1.0 / ((double) sin(B)))) - ((double) (1.0 * ((double) (1.0 / ((double) (((double) sin(B)) * ((double) pow(F, 2.0))))))))))));
}
VAR = VAR_1;
}
return VAR;
}



Bits error versus F



Bits error versus B



Bits error versus x
Results
if F < -99771073.77480982Initial program 25.6
rmApplied pow-neg25.6
Applied frac-2neg25.6
Applied frac-times19.4
Simplified19.4
rmApplied clear-num19.4
Applied un-div-inv19.4
Taylor expanded around -inf 0.1
if -99771073.77480982 < F < 3.9992969853246413e+93Initial program 0.8
rmApplied pow-neg0.9
Applied frac-2neg0.9
Applied frac-times0.4
Simplified0.4
rmApplied clear-num0.4
Applied un-div-inv0.3
rmApplied add-sqr-sqrt0.3
Applied unpow-prod-down0.3
Applied associate-*r*0.3
Applied *-un-lft-identity0.3
Applied times-frac0.3
if 3.9992969853246413e+93 < F Initial program 31.9
rmApplied pow-neg31.9
Applied frac-2neg31.9
Applied frac-times25.6
Simplified25.6
rmApplied clear-num25.6
Applied un-div-inv25.5
Taylor expanded around inf 0.1
Final simplification0.2
herbie shell --seed 2020114 +o rules:numerics
(FPCore (F B x)
:name "VandenBroeck and Keller, Equation (23)"
:precision binary64
(+ (- (* x (/ 1 (tan B)))) (* (/ F (sin B)) (pow (+ (+ (* F F) 2) (* 2 x)) (- (/ 1 2))))))