\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 \leq -311106551405.7238:\\
\;\;\;\;\frac{1}{\sin B} \cdot \left(\frac{1}{F \cdot F} + -1\right) - \frac{1 \cdot x}{\tan B}\\
\mathbf{elif}\;F \leq 390.90111054659343:\\
\;\;\;\;\frac{F}{\sin B \cdot {\left(\left(F \cdot F + 2\right) + x \cdot 2\right)}^{\left(\frac{1}{2}\right)}} - 1 \cdot \frac{x \cdot \cos B}{\sin B}\\
\mathbf{else}:\\
\;\;\;\;\frac{F}{\sin B \cdot \left(F + 1 \cdot {\left(\frac{1}{{F}^{1}}\right)}^{1}\right)} - \frac{1 \cdot x}{\tan B}\\
\end{array}(FPCore (F B x) :precision binary64 (+ (- (* x (/ 1.0 (tan B)))) (* (/ F (sin B)) (pow (+ (+ (* F F) 2.0) (* 2.0 x)) (- (/ 1.0 2.0))))))
(FPCore (F B x)
:precision binary64
(if (<= F -311106551405.7238)
(- (* (/ 1.0 (sin B)) (+ (/ 1.0 (* F F)) -1.0)) (/ (* 1.0 x) (tan B)))
(if (<= F 390.90111054659343)
(-
(/ F (* (sin B) (pow (+ (+ (* F F) 2.0) (* x 2.0)) (/ 1.0 2.0))))
(* 1.0 (/ (* x (cos B)) (sin B))))
(-
(/ F (* (sin B) (+ F (* 1.0 (pow (/ 1.0 (pow F 1.0)) 1.0)))))
(/ (* 1.0 x) (tan B))))))double code(double F, double B, double x) {
return ((double) (((double) -(((double) (x * (1.0 / ((double) tan(B))))))) + ((double) ((F / ((double) sin(B))) * ((double) pow(((double) (((double) (((double) (F * F)) + 2.0)) + ((double) (2.0 * x)))), ((double) -((1.0 / 2.0)))))))));
}
double code(double F, double B, double x) {
double tmp;
if ((F <= -311106551405.7238)) {
tmp = ((double) (((double) ((1.0 / ((double) sin(B))) * ((double) ((1.0 / ((double) (F * F))) + -1.0)))) - (((double) (1.0 * x)) / ((double) tan(B)))));
} else {
double tmp_1;
if ((F <= 390.90111054659343)) {
tmp_1 = ((double) ((F / ((double) (((double) sin(B)) * ((double) pow(((double) (((double) (((double) (F * F)) + 2.0)) + ((double) (x * 2.0)))), (1.0 / 2.0)))))) - ((double) (1.0 * (((double) (x * ((double) cos(B)))) / ((double) sin(B)))))));
} else {
tmp_1 = ((double) ((F / ((double) (((double) sin(B)) * ((double) (F + ((double) (1.0 * ((double) pow((1.0 / ((double) pow(F, 1.0))), 1.0))))))))) - (((double) (1.0 * x)) / ((double) tan(B)))));
}
tmp = tmp_1;
}
return tmp;
}



Bits error versus F



Bits error versus B



Bits error versus x
Results
if F < -311106551405.723816Initial program 26.6
Simplified26.6
rmApplied pow-neg_binary6426.6
Applied frac-times_binary6420.1
Simplified20.1
Simplified20.1
rmApplied associate-*r/_binary6420.1
Taylor expanded around -inf 0.1
Simplified0.1
if -311106551405.723816 < F < 390.901110546593429Initial program 0.4
Simplified0.4
rmApplied pow-neg_binary640.4
Applied frac-times_binary640.4
Simplified0.4
Simplified0.4
Taylor expanded around inf 0.3
if 390.901110546593429 < F Initial program 23.9
Simplified23.9
rmApplied pow-neg_binary6423.8
Applied frac-times_binary6418.3
Simplified18.3
Simplified18.3
rmApplied associate-*r/_binary6418.2
Taylor expanded around inf 0.3
Simplified0.3
Final simplification0.3
herbie shell --seed 2020204
(FPCore (F B x)
:name "VandenBroeck and Keller, Equation (23)"
:precision binary64
(+ (- (* x (/ 1.0 (tan B)))) (* (/ F (sin B)) (pow (+ (+ (* F F) 2.0) (* 2.0 x)) (- (/ 1.0 2.0))))))