\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 -2.9768268976581668 \cdot 10^{119}:\\
\;\;\;\;\left(-x \cdot \frac{1}{\tan B}\right) + \left(1 \cdot \frac{1}{\sin B \cdot {F}^{2}} - \frac{1}{\sin B}\right)\\
\mathbf{elif}\;F \le 7.0203905594146349 \cdot 10^{-5}:\\
\;\;\;\;\left(-\left(1 \cdot \frac{x}{\sin B}\right) \cdot \cos B\right) + \frac{F}{\sin B \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\frac{1}{2}\right)}}\\
\mathbf{else}:\\
\;\;\;\;\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B \cdot \left({\left(\frac{1}{F}\right)}^{-1} + 1 \cdot {\left(\frac{1}{{F}^{1}}\right)}^{1}\right)}\\
\end{array}double code(double F, double B, double x) {
return (-(x * (1.0 / tan(B))) + ((F / sin(B)) * pow((((F * F) + 2.0) + (2.0 * x)), -(1.0 / 2.0))));
}
double code(double F, double B, double x) {
double temp;
if ((F <= -2.9768268976581668e+119)) {
temp = (-(x * (1.0 / tan(B))) + ((1.0 * (1.0 / (sin(B) * pow(F, 2.0)))) - (1.0 / sin(B))));
} else {
double temp_1;
if ((F <= 7.020390559414635e-05)) {
temp_1 = (-((1.0 * (x / sin(B))) * cos(B)) + (F / (sin(B) * pow((((F * F) + 2.0) + (2.0 * x)), (1.0 / 2.0)))));
} else {
temp_1 = (-(x * (1.0 / tan(B))) + (F / (sin(B) * (pow((1.0 / F), -1.0) + (1.0 * pow((1.0 / pow(F, 1.0)), 1.0))))));
}
temp = temp_1;
}
return temp;
}



Bits error versus F



Bits error versus B



Bits error versus x
Results
if F < -2.9768268976581668e+119Initial program 37.2
Taylor expanded around -inf 0.2
if -2.9768268976581668e+119 < F < 7.020390559414635e-05Initial program 1.1
rmApplied pow-neg1.1
Applied frac-times0.4
Simplified0.4
rmApplied tan-quot0.4
Applied associate-/r/0.4
Applied associate-*r*0.4
Taylor expanded around inf 0.3
if 7.020390559414635e-05 < F Initial program 25.3
rmApplied pow-neg25.3
Applied frac-times19.8
Simplified19.8
Taylor expanded around inf 0.9
Final simplification0.5
herbie shell --seed 2020066
(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))))))