\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 -1.7231308537094901 \cdot 10^{155}:\\
\;\;\;\;\frac{1}{\sin B} \cdot \left(\frac{\frac{1}{F}}{F} - 1\right) - \frac{x \cdot 1}{\tan B}\\
\mathbf{elif}\;F \le 29707.114427757369:\\
\;\;\;\;\frac{F}{\sin B \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\frac{1}{2}\right)}} - \frac{x \cdot 1}{\sin B} \cdot \cos B\\
\mathbf{else}:\\
\;\;\;\;\left(\frac{1}{\sin B} - 1 \cdot \frac{1}{\sin B \cdot {F}^{2}}\right) - \frac{x \cdot 1}{\tan B}\\
\end{array}double f(double F, double B, double x) {
double r39295 = x;
double r39296 = 1.0;
double r39297 = B;
double r39298 = tan(r39297);
double r39299 = r39296 / r39298;
double r39300 = r39295 * r39299;
double r39301 = -r39300;
double r39302 = F;
double r39303 = sin(r39297);
double r39304 = r39302 / r39303;
double r39305 = r39302 * r39302;
double r39306 = 2.0;
double r39307 = r39305 + r39306;
double r39308 = r39306 * r39295;
double r39309 = r39307 + r39308;
double r39310 = r39296 / r39306;
double r39311 = -r39310;
double r39312 = pow(r39309, r39311);
double r39313 = r39304 * r39312;
double r39314 = r39301 + r39313;
return r39314;
}
double f(double F, double B, double x) {
double r39315 = F;
double r39316 = -1.72313085370949e+155;
bool r39317 = r39315 <= r39316;
double r39318 = 1.0;
double r39319 = B;
double r39320 = sin(r39319);
double r39321 = r39318 / r39320;
double r39322 = 1.0;
double r39323 = r39322 / r39315;
double r39324 = r39323 / r39315;
double r39325 = r39324 - r39318;
double r39326 = r39321 * r39325;
double r39327 = x;
double r39328 = r39327 * r39322;
double r39329 = tan(r39319);
double r39330 = r39328 / r39329;
double r39331 = r39326 - r39330;
double r39332 = 29707.11442775737;
bool r39333 = r39315 <= r39332;
double r39334 = r39315 * r39315;
double r39335 = 2.0;
double r39336 = r39334 + r39335;
double r39337 = r39335 * r39327;
double r39338 = r39336 + r39337;
double r39339 = r39322 / r39335;
double r39340 = pow(r39338, r39339);
double r39341 = r39320 * r39340;
double r39342 = r39315 / r39341;
double r39343 = r39328 / r39320;
double r39344 = cos(r39319);
double r39345 = r39343 * r39344;
double r39346 = r39342 - r39345;
double r39347 = 2.0;
double r39348 = pow(r39315, r39347);
double r39349 = r39320 * r39348;
double r39350 = r39318 / r39349;
double r39351 = r39322 * r39350;
double r39352 = r39321 - r39351;
double r39353 = r39352 - r39330;
double r39354 = r39333 ? r39346 : r39353;
double r39355 = r39317 ? r39331 : r39354;
return r39355;
}



Bits error versus F



Bits error versus B



Bits error versus x
Results
if F < -1.72313085370949e+155Initial program 41.7
Simplified41.7
rmApplied pow-neg41.7
Applied frac-times35.9
Simplified35.9
rmApplied associate-*r/35.8
rmApplied *-un-lft-identity35.8
Applied times-frac35.8
Taylor expanded around -inf 0.1
Simplified0.1
if -1.72313085370949e+155 < F < 29707.11442775737Initial program 1.7
Simplified1.7
rmApplied pow-neg1.7
Applied frac-times0.4
Simplified0.4
rmApplied associate-*r/0.3
rmApplied tan-quot0.4
Applied associate-/r/0.4
if 29707.11442775737 < F Initial program 25.0
Simplified25.0
rmApplied pow-neg24.9
Applied frac-times19.1
Simplified19.1
rmApplied associate-*r/19.0
Taylor expanded around inf 0.2
Final simplification0.3
herbie shell --seed 2020089
(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))))))