\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.31023864142774599 \cdot 10^{145}:\\
\;\;\;\;\left(1 \cdot \frac{1}{\sin B \cdot {F}^{2}} - \frac{1}{\sin B}\right) - x \cdot \frac{1}{\tan B}\\
\mathbf{elif}\;F \le 170093912.087266892:\\
\;\;\;\;F \cdot \frac{{\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}}{\sin B} - \frac{x \cdot 1}{\tan 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 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 VAR;
if ((F <= -2.310238641427746e+145)) {
VAR = (((1.0 * (1.0 / (sin(B) * pow(F, 2.0)))) - (1.0 / sin(B))) - (x * (1.0 / tan(B))));
} else {
double VAR_1;
if ((F <= 170093912.0872669)) {
VAR_1 = ((F * (pow((((F * F) + 2.0) + (2.0 * x)), -(1.0 / 2.0)) / sin(B))) - ((x * 1.0) / tan(B)));
} else {
VAR_1 = (((1.0 / sin(B)) - (1.0 * (1.0 / (sin(B) * pow(F, 2.0))))) - ((x * 1.0) / tan(B)));
}
VAR = VAR_1;
}
return VAR;
}



Bits error versus F



Bits error versus B



Bits error versus x
Results
if F < -2.310238641427746e+145Initial program 39.7
Simplified39.7
Taylor expanded around -inf 0.2
if -2.310238641427746e+145 < F < 170093912.0872669Initial program 1.6
Simplified1.6
rmApplied div-inv1.6
Applied associate-*l*0.4
Simplified0.4
rmApplied associate-*r/0.3
if 170093912.0872669 < F Initial program 25.8
Simplified25.8
rmApplied div-inv25.8
Applied associate-*l*20.3
Simplified20.3
rmApplied associate-*r/20.2
Taylor expanded around inf 0.1
Final simplification0.2
herbie shell --seed 2020100
(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))))))