\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.5912783554820192 \cdot 10^{23}:\\
\;\;\;\;\left(\frac{-1}{\sin B} + \frac{1}{\sin B \cdot {F}^{2}}\right) - \frac{x \cdot 1}{\tan B}\\
\mathbf{elif}\;F \le 5.00369694459504041 \cdot 10^{153}:\\
\;\;\;\;\frac{F}{\sin B \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\frac{1}{2}\right)}} - \frac{1}{\frac{\tan B}{x \cdot 1}}\\
\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 r37738 = x;
double r37739 = 1.0;
double r37740 = B;
double r37741 = tan(r37740);
double r37742 = r37739 / r37741;
double r37743 = r37738 * r37742;
double r37744 = -r37743;
double r37745 = F;
double r37746 = sin(r37740);
double r37747 = r37745 / r37746;
double r37748 = r37745 * r37745;
double r37749 = 2.0;
double r37750 = r37748 + r37749;
double r37751 = r37749 * r37738;
double r37752 = r37750 + r37751;
double r37753 = r37739 / r37749;
double r37754 = -r37753;
double r37755 = pow(r37752, r37754);
double r37756 = r37747 * r37755;
double r37757 = r37744 + r37756;
return r37757;
}
double f(double F, double B, double x) {
double r37758 = F;
double r37759 = -1.5912783554820192e+23;
bool r37760 = r37758 <= r37759;
double r37761 = -1.0;
double r37762 = B;
double r37763 = sin(r37762);
double r37764 = r37761 / r37763;
double r37765 = 1.0;
double r37766 = 2.0;
double r37767 = pow(r37758, r37766);
double r37768 = r37763 * r37767;
double r37769 = r37765 / r37768;
double r37770 = r37764 + r37769;
double r37771 = x;
double r37772 = r37771 * r37765;
double r37773 = tan(r37762);
double r37774 = r37772 / r37773;
double r37775 = r37770 - r37774;
double r37776 = 5.0036969445950404e+153;
bool r37777 = r37758 <= r37776;
double r37778 = r37758 * r37758;
double r37779 = 2.0;
double r37780 = r37778 + r37779;
double r37781 = r37779 * r37771;
double r37782 = r37780 + r37781;
double r37783 = r37765 / r37779;
double r37784 = pow(r37782, r37783);
double r37785 = r37763 * r37784;
double r37786 = r37758 / r37785;
double r37787 = 1.0;
double r37788 = r37773 / r37772;
double r37789 = r37787 / r37788;
double r37790 = r37786 - r37789;
double r37791 = r37787 / r37763;
double r37792 = r37791 - r37769;
double r37793 = r37792 - r37774;
double r37794 = r37777 ? r37790 : r37793;
double r37795 = r37760 ? r37775 : r37794;
return r37795;
}



Bits error versus F



Bits error versus B



Bits error versus x
Results
if F < -1.5912783554820192e+23Initial program 24.9
Simplified24.9
rmApplied pow-neg24.9
Applied frac-times19.3
Simplified19.3
rmApplied associate-*r/19.3
Taylor expanded around -inf 0.2
Simplified0.2
if -1.5912783554820192e+23 < F < 5.0036969445950404e+153Initial program 1.8
Simplified1.8
rmApplied pow-neg1.8
Applied frac-times0.4
Simplified0.4
rmApplied associate-*r/0.3
rmApplied clear-num0.4
if 5.0036969445950404e+153 < F Initial program 41.9
Simplified41.9
rmApplied pow-neg41.9
Applied frac-times35.4
Simplified35.4
rmApplied associate-*r/35.3
Taylor expanded around inf 0.2
Simplified0.2
Final simplification0.3
herbie shell --seed 2020042
(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))))))