Average Error: 13.8 → 0.5
Time: 10.7s
Precision: 64
\[\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.0328200120067305 \cdot 10^{162}:\\ \;\;\;\;\frac{\frac{\frac{1}{F}}{F} - 1}{\sin B} - \frac{x \cdot 1}{\tan B}\\ \mathbf{elif}\;F \le 3.06813447084506089 \cdot 10^{147}:\\ \;\;\;\;\frac{\frac{F}{{\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\frac{1}{2}\right)}}}{\sin B} - \frac{x \cdot 1}{\tan B}\\ \mathbf{else}:\\ \;\;\;\;\frac{F \cdot \left(\frac{1}{F} - 1 \cdot \frac{1}{{F}^{3}}\right)}{\sin B} - \frac{x \cdot 1}{\tan B}\\ \end{array}\]
\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.0328200120067305 \cdot 10^{162}:\\
\;\;\;\;\frac{\frac{\frac{1}{F}}{F} - 1}{\sin B} - \frac{x \cdot 1}{\tan B}\\

\mathbf{elif}\;F \le 3.06813447084506089 \cdot 10^{147}:\\
\;\;\;\;\frac{\frac{F}{{\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\frac{1}{2}\right)}}}{\sin B} - \frac{x \cdot 1}{\tan B}\\

\mathbf{else}:\\
\;\;\;\;\frac{F \cdot \left(\frac{1}{F} - 1 \cdot \frac{1}{{F}^{3}}\right)}{\sin B} - \frac{x \cdot 1}{\tan B}\\

\end{array}
double code(double F, double B, double x) {
	return ((double) (((double) -(((double) (x * ((double) (1.0 / ((double) tan(B)))))))) + ((double) (((double) (F / ((double) sin(B)))) * ((double) pow(((double) (((double) (((double) (F * F)) + 2.0)) + ((double) (2.0 * x)))), ((double) -(((double) (1.0 / 2.0))))))))));
}
double code(double F, double B, double x) {
	double VAR;
	if ((F <= -1.0328200120067305e+162)) {
		VAR = ((double) (((double) (((double) (((double) (((double) (1.0 / F)) / F)) - 1.0)) / ((double) sin(B)))) - ((double) (((double) (x * 1.0)) / ((double) tan(B))))));
	} else {
		double VAR_1;
		if ((F <= 3.068134470845061e+147)) {
			VAR_1 = ((double) (((double) (((double) (F / ((double) pow(((double) (((double) (((double) (F * F)) + 2.0)) + ((double) (2.0 * x)))), ((double) (1.0 / 2.0)))))) / ((double) sin(B)))) - ((double) (((double) (x * 1.0)) / ((double) tan(B))))));
		} else {
			VAR_1 = ((double) (((double) (((double) (F * ((double) (((double) (1.0 / F)) - ((double) (1.0 * ((double) (1.0 / ((double) pow(F, 3.0)))))))))) / ((double) sin(B)))) - ((double) (((double) (x * 1.0)) / ((double) tan(B))))));
		}
		VAR = VAR_1;
	}
	return VAR;
}

Error

Bits error versus F

Bits error versus B

Bits error versus x

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Derivation

  1. Split input into 3 regimes
  2. if F < -1.0328200120067305e+162

    1. Initial program 42.0

      \[\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)}\]
    2. Simplified42.0

      \[\leadsto \color{blue}{\frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} - x \cdot \frac{1}{\tan B}}\]
    3. Using strategy rm
    4. Applied associate-*l/36.2

      \[\leadsto \color{blue}{\frac{F \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}}{\sin B}} - x \cdot \frac{1}{\tan B}\]
    5. Using strategy rm
    6. Applied associate-*r/36.1

      \[\leadsto \frac{F \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}}{\sin B} - \color{blue}{\frac{x \cdot 1}{\tan B}}\]
    7. Taylor expanded around -inf 0.1

      \[\leadsto \frac{\color{blue}{1 \cdot \frac{1}{{F}^{2}} - 1}}{\sin B} - \frac{x \cdot 1}{\tan B}\]
    8. Simplified0.1

      \[\leadsto \frac{\color{blue}{\frac{\frac{1}{F}}{F} - 1}}{\sin B} - \frac{x \cdot 1}{\tan B}\]

    if -1.0328200120067305e+162 < F < 3.068134470845061e+147

    1. Initial program 2.8

      \[\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)}\]
    2. Simplified2.8

      \[\leadsto \color{blue}{\frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} - x \cdot \frac{1}{\tan B}}\]
    3. Using strategy rm
    4. Applied associate-*l/0.8

      \[\leadsto \color{blue}{\frac{F \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}}{\sin B}} - x \cdot \frac{1}{\tan B}\]
    5. Using strategy rm
    6. Applied associate-*r/0.7

      \[\leadsto \frac{F \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}}{\sin B} - \color{blue}{\frac{x \cdot 1}{\tan B}}\]
    7. Using strategy rm
    8. Applied pow-neg0.7

      \[\leadsto \frac{F \cdot \color{blue}{\frac{1}{{\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\frac{1}{2}\right)}}}}{\sin B} - \frac{x \cdot 1}{\tan B}\]
    9. Applied un-div-inv0.7

      \[\leadsto \frac{\color{blue}{\frac{F}{{\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\frac{1}{2}\right)}}}}{\sin B} - \frac{x \cdot 1}{\tan B}\]

    if 3.068134470845061e+147 < F

    1. Initial program 39.2

      \[\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)}\]
    2. Simplified39.2

      \[\leadsto \color{blue}{\frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} - x \cdot \frac{1}{\tan B}}\]
    3. Using strategy rm
    4. Applied associate-*l/33.1

      \[\leadsto \color{blue}{\frac{F \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}}{\sin B}} - x \cdot \frac{1}{\tan B}\]
    5. Using strategy rm
    6. Applied associate-*r/33.0

      \[\leadsto \frac{F \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}}{\sin B} - \color{blue}{\frac{x \cdot 1}{\tan B}}\]
    7. Taylor expanded around inf 0.2

      \[\leadsto \frac{F \cdot \color{blue}{\left(\frac{1}{F} - 1 \cdot \frac{1}{{F}^{3}}\right)}}{\sin B} - \frac{x \cdot 1}{\tan B}\]
  3. Recombined 3 regimes into one program.
  4. Final simplification0.5

    \[\leadsto \begin{array}{l} \mathbf{if}\;F \le -1.0328200120067305 \cdot 10^{162}:\\ \;\;\;\;\frac{\frac{\frac{1}{F}}{F} - 1}{\sin B} - \frac{x \cdot 1}{\tan B}\\ \mathbf{elif}\;F \le 3.06813447084506089 \cdot 10^{147}:\\ \;\;\;\;\frac{\frac{F}{{\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\frac{1}{2}\right)}}}{\sin B} - \frac{x \cdot 1}{\tan B}\\ \mathbf{else}:\\ \;\;\;\;\frac{F \cdot \left(\frac{1}{F} - 1 \cdot \frac{1}{{F}^{3}}\right)}{\sin B} - \frac{x \cdot 1}{\tan B}\\ \end{array}\]

Reproduce

herbie shell --seed 2020122 
(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))))))