\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 \leq -1.0279393567136411 \cdot 10^{+111}:\\
\;\;\;\;\frac{-1 + \frac{1}{F \cdot F}}{\sin B} - \frac{1 \cdot x}{\tan B}\\
\mathbf{elif}\;F \leq 4.9267265883090964 \cdot 10^{+20}:\\
\;\;\;\;\frac{F \cdot {\left(\left(F \cdot F + 2\right) + x \cdot 2\right)}^{\left(-\frac{1}{2}\right)}}{\sin B} - \frac{1}{\frac{\tan B}{1 \cdot x}}\\
\mathbf{else}:\\
\;\;\;\;\frac{1 - \frac{1}{F \cdot F}}{\sin B} - \frac{1 \cdot x}{\tan B}\\
\end{array}(FPCore (F B x) :precision binary64 (+ (- (* x (/ 1.0 (tan B)))) (* (/ F (sin B)) (pow (+ (+ (* F F) 2.0) (* 2.0 x)) (- (/ 1.0 2.0))))))
(FPCore (F B x)
:precision binary64
(if (<= F -1.0279393567136411e+111)
(- (/ (+ -1.0 (/ 1.0 (* F F))) (sin B)) (/ (* 1.0 x) (tan B)))
(if (<= F 4.9267265883090964e+20)
(-
(/ (* F (pow (+ (+ (* F F) 2.0) (* x 2.0)) (- (/ 1.0 2.0)))) (sin B))
(/ 1.0 (/ (tan B) (* 1.0 x))))
(- (/ (- 1.0 (/ 1.0 (* F F))) (sin B)) (/ (* 1.0 x) (tan B))))))double code(double F, double B, double x) {
return ((double) (((double) -(((double) (x * (1.0 / ((double) tan(B))))))) + ((double) ((F / ((double) sin(B))) * ((double) pow(((double) (((double) (((double) (F * F)) + 2.0)) + ((double) (2.0 * x)))), ((double) -((1.0 / 2.0)))))))));
}
double code(double F, double B, double x) {
double tmp;
if ((F <= -1.0279393567136411e+111)) {
tmp = ((double) ((((double) (-1.0 + (1.0 / ((double) (F * F))))) / ((double) sin(B))) - (((double) (1.0 * x)) / ((double) tan(B)))));
} else {
double tmp_1;
if ((F <= 4.9267265883090964e+20)) {
tmp_1 = ((double) ((((double) (F * ((double) pow(((double) (((double) (((double) (F * F)) + 2.0)) + ((double) (x * 2.0)))), ((double) -((1.0 / 2.0))))))) / ((double) sin(B))) - (1.0 / (((double) tan(B)) / ((double) (1.0 * x))))));
} else {
tmp_1 = ((double) ((((double) (1.0 - (1.0 / ((double) (F * F))))) / ((double) sin(B))) - (((double) (1.0 * x)) / ((double) tan(B)))));
}
tmp = tmp_1;
}
return tmp;
}



Bits error versus F



Bits error versus B



Bits error versus x
Results
if F < -1.0279393567136411e111Initial program 34.9
Simplified34.9
rmApplied associate-*l/_binary6428.4
Simplified28.4
rmApplied associate-*r/_binary6428.4
Taylor expanded around -inf 0.2
Simplified0.2
if -1.0279393567136411e111 < F < 492672658830909640000Initial program 1.0
Simplified1.0
rmApplied associate-*l/_binary640.4
Simplified0.4
rmApplied associate-*r/_binary640.3
rmApplied clear-num_binary640.4
if 492672658830909640000 < F Initial program 27.1
Simplified27.1
rmApplied associate-*l/_binary6421.4
Simplified21.4
rmApplied associate-*r/_binary6421.3
Taylor expanded around inf 0.2
Simplified0.2
Final simplification0.3
herbie shell --seed 2020205
(FPCore (F B x)
:name "VandenBroeck and Keller, Equation (23)"
:precision binary64
(+ (- (* x (/ 1.0 (tan B)))) (* (/ F (sin B)) (pow (+ (+ (* F F) 2.0) (* 2.0 x)) (- (/ 1.0 2.0))))))