\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 -5781402953055721472:\\
\;\;\;\;\left(\frac{-1}{\sin B} + \frac{1}{\sin B \cdot {F}^{2}}\right) - \frac{x \cdot 1}{\tan B}\\
\mathbf{elif}\;F \le 1230529.51555462740361690521240234375:\\
\;\;\;\;\frac{\frac{F}{\sin B}}{{\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\frac{1}{2}\right)}} - \frac{x \cdot 1}{\tan B}\\
\mathbf{else}:\\
\;\;\;\;\left(\frac{1}{\sin B} - \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 r47621 = x;
double r47622 = 1.0;
double r47623 = B;
double r47624 = tan(r47623);
double r47625 = r47622 / r47624;
double r47626 = r47621 * r47625;
double r47627 = -r47626;
double r47628 = F;
double r47629 = sin(r47623);
double r47630 = r47628 / r47629;
double r47631 = r47628 * r47628;
double r47632 = 2.0;
double r47633 = r47631 + r47632;
double r47634 = r47632 * r47621;
double r47635 = r47633 + r47634;
double r47636 = r47622 / r47632;
double r47637 = -r47636;
double r47638 = pow(r47635, r47637);
double r47639 = r47630 * r47638;
double r47640 = r47627 + r47639;
return r47640;
}
double f(double F, double B, double x) {
double r47641 = F;
double r47642 = -5.781402953055721e+18;
bool r47643 = r47641 <= r47642;
double r47644 = -1.0;
double r47645 = B;
double r47646 = sin(r47645);
double r47647 = r47644 / r47646;
double r47648 = 1.0;
double r47649 = 2.0;
double r47650 = pow(r47641, r47649);
double r47651 = r47646 * r47650;
double r47652 = r47648 / r47651;
double r47653 = r47647 + r47652;
double r47654 = x;
double r47655 = r47654 * r47648;
double r47656 = tan(r47645);
double r47657 = r47655 / r47656;
double r47658 = r47653 - r47657;
double r47659 = 1230529.5155546274;
bool r47660 = r47641 <= r47659;
double r47661 = r47641 / r47646;
double r47662 = r47641 * r47641;
double r47663 = 2.0;
double r47664 = r47662 + r47663;
double r47665 = r47663 * r47654;
double r47666 = r47664 + r47665;
double r47667 = r47648 / r47663;
double r47668 = pow(r47666, r47667);
double r47669 = r47661 / r47668;
double r47670 = r47669 - r47657;
double r47671 = 1.0;
double r47672 = r47671 / r47646;
double r47673 = r47672 - r47652;
double r47674 = r47673 - r47657;
double r47675 = r47660 ? r47670 : r47674;
double r47676 = r47643 ? r47658 : r47675;
return r47676;
}



Bits error versus F



Bits error versus B



Bits error versus x
Results
if F < -5.781402953055721e+18Initial program 26.8
Simplified26.8
rmApplied pow-neg26.7
Applied frac-times20.6
Simplified20.6
rmApplied associate-*r/20.6
Taylor expanded around -inf 0.1
Simplified0.1
if -5.781402953055721e+18 < F < 1230529.5155546274Initial program 0.4
Simplified0.4
rmApplied pow-neg0.5
Applied frac-times0.4
Simplified0.4
rmApplied associate-*r/0.3
rmApplied associate-/r*0.3
if 1230529.5155546274 < F Initial program 25.5
Simplified25.5
rmApplied pow-neg25.5
Applied frac-times19.8
Simplified19.8
rmApplied associate-*r/19.8
Taylor expanded around inf 0.1
Simplified0.1
Final simplification0.2
herbie shell --seed 2019305
(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))))))