double f(double F, double B, double x) {
double r24495222 = x;
double r24495223 = 1.0;
double r24495224 = B;
double r24495225 = tan(r24495224);
double r24495226 = r24495223 / r24495225;
double r24495227 = r24495222 * r24495226;
double r24495228 = -r24495227;
double r24495229 = F;
double r24495230 = sin(r24495224);
double r24495231 = r24495229 / r24495230;
double r24495232 = r24495229 * r24495229;
double r24495233 = 2.0;
double r24495234 = r24495232 + r24495233;
double r24495235 = r24495233 * r24495222;
double r24495236 = r24495234 + r24495235;
double r24495237 = r24495223 / r24495233;
double r24495238 = -r24495237;
double r24495239 = pow(r24495236, r24495238);
double r24495240 = r24495231 * r24495239;
double r24495241 = r24495228 + r24495240;
return r24495241;
}
double f(double F, double B, double x) {
double r24495242 = F;
double r24495243 = -858534606529.7429;
bool r24495244 = r24495242 <= r24495243;
double r24495245 = 1.0;
double r24495246 = r24495242 * r24495242;
double r24495247 = r24495245 / r24495246;
double r24495248 = r24495247 - r24495245;
double r24495249 = B;
double r24495250 = sin(r24495249);
double r24495251 = r24495248 / r24495250;
double r24495252 = x;
double r24495253 = tan(r24495249);
double r24495254 = r24495252 / r24495253;
double r24495255 = r24495251 - r24495254;
double r24495256 = 3467869.845259974;
bool r24495257 = r24495242 <= r24495256;
double r24495258 = 2.0;
double r24495259 = fma(r24495242, r24495242, r24495258);
double r24495260 = fma(r24495258, r24495252, r24495259);
double r24495261 = -0.5;
double r24495262 = pow(r24495260, r24495261);
double r24495263 = r24495250 / r24495242;
double r24495264 = r24495262 / r24495263;
double r24495265 = cos(r24495249);
double r24495266 = r24495252 / r24495250;
double r24495267 = r24495265 * r24495266;
double r24495268 = r24495264 - r24495267;
double r24495269 = r24495245 / r24495250;
double r24495270 = r24495269 / r24495246;
double r24495271 = r24495269 - r24495270;
double r24495272 = r24495271 - r24495254;
double r24495273 = r24495257 ? r24495268 : r24495272;
double r24495274 = r24495244 ? r24495255 : r24495273;
return r24495274;
}
\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 -858534606529.7429:\\
\;\;\;\;\frac{\frac{1}{F \cdot F} - 1}{\sin B} - \frac{x}{\tan B}\\
\mathbf{elif}\;F \le 3467869.845259974:\\
\;\;\;\;\frac{{\left((2 \cdot x + \left((F \cdot F + 2)_*\right))_*\right)}^{\frac{-1}{2}}}{\frac{\sin B}{F}} - \cos B \cdot \frac{x}{\sin B}\\
\mathbf{else}:\\
\;\;\;\;\left(\frac{1}{\sin B} - \frac{\frac{1}{\sin B}}{F \cdot F}\right) - \frac{x}{\tan B}\\
\end{array}


Bits error versus F



Bits error versus B



Bits error versus x
if F < -858534606529.7429Initial program 26.1
Simplified25.4
rmApplied div-inv25.4
Applied add-sqr-sqrt25.4
Applied unpow-prod-down25.5
Applied times-frac21.1
rmApplied associate-*l/21.1
Simplified21.0
Taylor expanded around -inf 0.1
Simplified0.1
if -858534606529.7429 < F < 3467869.845259974Initial program 0.4
Simplified0.3
rmApplied tan-quot0.3
Applied associate-/r/0.3
if 3467869.845259974 < F Initial program 23.0
Simplified22.3
rmApplied div-inv22.3
Applied add-sqr-sqrt22.3
Applied unpow-prod-down22.4
Applied times-frac18.6
rmApplied associate-*l/18.6
Simplified18.5
rmApplied associate-/l/18.5
Simplified18.5
Taylor expanded around inf 0.2
Simplified0.2
Final simplification0.2
herbie shell --seed 2019101 +o rules:numerics
(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))))))