\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 -7.352157093766344 \cdot 10^{+114}:\\
\;\;\;\;\left(\frac{\frac{\frac{1}{F}}{F}}{\sin B} - \frac{1}{\sin B}\right) - \frac{\cos B \cdot x}{\sin B}\\
\mathbf{elif}\;F \le 641096.8187916952:\\
\;\;\;\;F \cdot \frac{{\left(\sqrt{\left(x \cdot 2 + F \cdot F\right) + 2}\right)}^{\frac{-1}{2}}}{\frac{\sin B}{{\left(\sqrt{\left(x \cdot 2 + F \cdot F\right) + 2}\right)}^{\frac{-1}{2}}}} - \frac{\cos B \cdot x}{\sin B}\\
\mathbf{else}:\\
\;\;\;\;\left(\frac{1}{\sin B} - \frac{\frac{\frac{1}{F}}{F}}{\sin B}\right) - \frac{\cos B \cdot x}{\sin B}\\
\end{array}double f(double F, double B, double x) {
double r3357292 = x;
double r3357293 = 1.0;
double r3357294 = B;
double r3357295 = tan(r3357294);
double r3357296 = r3357293 / r3357295;
double r3357297 = r3357292 * r3357296;
double r3357298 = -r3357297;
double r3357299 = F;
double r3357300 = sin(r3357294);
double r3357301 = r3357299 / r3357300;
double r3357302 = r3357299 * r3357299;
double r3357303 = 2.0;
double r3357304 = r3357302 + r3357303;
double r3357305 = r3357303 * r3357292;
double r3357306 = r3357304 + r3357305;
double r3357307 = r3357293 / r3357303;
double r3357308 = -r3357307;
double r3357309 = pow(r3357306, r3357308);
double r3357310 = r3357301 * r3357309;
double r3357311 = r3357298 + r3357310;
return r3357311;
}
double f(double F, double B, double x) {
double r3357312 = F;
double r3357313 = -7.352157093766344e+114;
bool r3357314 = r3357312 <= r3357313;
double r3357315 = 1.0;
double r3357316 = r3357315 / r3357312;
double r3357317 = r3357316 / r3357312;
double r3357318 = B;
double r3357319 = sin(r3357318);
double r3357320 = r3357317 / r3357319;
double r3357321 = r3357315 / r3357319;
double r3357322 = r3357320 - r3357321;
double r3357323 = cos(r3357318);
double r3357324 = x;
double r3357325 = r3357323 * r3357324;
double r3357326 = r3357325 / r3357319;
double r3357327 = r3357322 - r3357326;
double r3357328 = 641096.8187916952;
bool r3357329 = r3357312 <= r3357328;
double r3357330 = 2.0;
double r3357331 = r3357324 * r3357330;
double r3357332 = r3357312 * r3357312;
double r3357333 = r3357331 + r3357332;
double r3357334 = r3357333 + r3357330;
double r3357335 = sqrt(r3357334);
double r3357336 = -0.5;
double r3357337 = pow(r3357335, r3357336);
double r3357338 = r3357319 / r3357337;
double r3357339 = r3357337 / r3357338;
double r3357340 = r3357312 * r3357339;
double r3357341 = r3357340 - r3357326;
double r3357342 = r3357321 - r3357320;
double r3357343 = r3357342 - r3357326;
double r3357344 = r3357329 ? r3357341 : r3357343;
double r3357345 = r3357314 ? r3357327 : r3357344;
return r3357345;
}



Bits error versus F



Bits error versus B



Bits error versus x
Results
if F < -7.352157093766344e+114Initial program 35.9
Simplified30.7
rmApplied clear-num30.7
Taylor expanded around inf 30.7
rmApplied *-un-lft-identity30.7
Applied add-sqr-sqrt30.7
Applied times-frac30.7
Simplified30.7
Simplified30.7
Taylor expanded around -inf 0.2
Simplified0.2
if -7.352157093766344e+114 < F < 641096.8187916952Initial program 1.1
Simplified0.3
rmApplied clear-num0.3
Taylor expanded around inf 0.3
rmApplied *-un-lft-identity0.3
Applied add-sqr-sqrt0.3
Applied times-frac0.3
Simplified0.3
Simplified0.3
rmApplied add-sqr-sqrt0.4
Applied unpow-prod-down0.4
Applied associate-/l*0.4
if 641096.8187916952 < F Initial program 24.6
Simplified19.3
rmApplied clear-num19.3
Taylor expanded around inf 19.3
rmApplied *-un-lft-identity19.3
Applied add-sqr-sqrt19.3
Applied times-frac19.3
Simplified19.3
Simplified19.4
Taylor expanded around inf 0.2
Simplified0.2
Final simplification0.3
herbie shell --seed 2019138
(FPCore (F B x)
:name "VandenBroeck and Keller, Equation (23)"
(+ (- (* x (/ 1 (tan B)))) (* (/ F (sin B)) (pow (+ (+ (* F F) 2) (* 2 x)) (- (/ 1 2))))))