\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.53027071662928663 \cdot 10^{158}:\\
\;\;\;\;\frac{F}{{\left(\frac{1}{{-1}^{1}}\right)}^{1} \cdot \left(\sin B \cdot F\right) + 1 \cdot \left({\left(\frac{1}{{-1}^{1} \cdot {F}^{1}}\right)}^{1} \cdot \sin B\right)} - \frac{\sqrt{1} \cdot x}{\frac{\tan B}{\sqrt{1}}}\\
\mathbf{elif}\;F \le 9.1482776373528414 \cdot 10^{134}:\\
\;\;\;\;\frac{1}{\frac{\sin B \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\frac{1}{2}\right)}}{F}} - \frac{\sqrt{1} \cdot x}{\frac{\tan B}{\sqrt{1}}}\\
\mathbf{else}:\\
\;\;\;\;\frac{F}{\sin B \cdot \left({\left(\frac{1}{F}\right)}^{-1} + 1 \cdot {\left(\frac{1}{{F}^{1}}\right)}^{1}\right)} - \frac{\sqrt{1} \cdot x}{\frac{\tan B}{\sqrt{1}}}\\
\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 temp;
if ((F <= -1.5302707166292866e+158)) {
temp = ((F / ((pow((1.0 / pow(-1.0, 1.0)), 1.0) * (sin(B) * F)) + (1.0 * (pow((1.0 / (pow(-1.0, 1.0) * pow(F, 1.0))), 1.0) * sin(B))))) - ((sqrt(1.0) * x) / (tan(B) / sqrt(1.0))));
} else {
double temp_1;
if ((F <= 9.148277637352841e+134)) {
temp_1 = ((1.0 / ((sin(B) * pow((((F * F) + 2.0) + (2.0 * x)), (1.0 / 2.0))) / F)) - ((sqrt(1.0) * x) / (tan(B) / sqrt(1.0))));
} else {
temp_1 = ((F / (sin(B) * (pow((1.0 / F), -1.0) + (1.0 * pow((1.0 / pow(F, 1.0)), 1.0))))) - ((sqrt(1.0) * x) / (tan(B) / sqrt(1.0))));
}
temp = temp_1;
}
return temp;
}



Bits error versus F



Bits error versus B



Bits error versus x
Results
if F < -1.5302707166292866e+158Initial program 42.5
Simplified42.5
rmApplied pow-neg42.5
Applied frac-times36.3
Simplified36.3
rmApplied add-sqr-sqrt36.3
Applied associate-/l*36.3
Applied associate-*r/36.2
Simplified36.2
Taylor expanded around -inf 0.2
if -1.5302707166292866e+158 < F < 9.148277637352841e+134Initial program 2.5
Simplified2.5
rmApplied pow-neg2.5
Applied frac-times0.5
Simplified0.5
rmApplied add-sqr-sqrt0.5
Applied associate-/l*0.5
Applied associate-*r/0.4
Simplified0.4
rmApplied clear-num0.4
if 9.148277637352841e+134 < F Initial program 38.6
Simplified38.6
rmApplied pow-neg38.6
Applied frac-times33.2
Simplified33.2
rmApplied add-sqr-sqrt33.2
Applied associate-/l*33.2
Applied associate-*r/33.2
Simplified33.2
Taylor expanded around inf 0.3
Final simplification0.4
herbie shell --seed 2020066
(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))))))