Average Error: 13.5 → 0.2
Time: 22.5s
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 -99771073.7748098224:\\ \;\;\;\;\left(-\frac{x \cdot \left(\sqrt[3]{1} \cdot \sqrt[3]{1}\right)}{\frac{\tan B}{\sqrt[3]{1}}}\right) + \left(1 \cdot \frac{1}{\sin B \cdot {F}^{2}} - \frac{1}{\sin B}\right)\\ \mathbf{elif}\;F \le 3.99929698532464133 \cdot 10^{93}:\\ \;\;\;\;\left(-\frac{x \cdot \left(\sqrt[3]{1} \cdot \sqrt[3]{1}\right)}{\frac{\tan B}{\sqrt[3]{1}}}\right) + \frac{-1}{\left(-\sin B\right) \cdot {\left(\sqrt{\left(F \cdot F + 2\right) + 2 \cdot x}\right)}^{\left(\frac{1}{2}\right)}} \cdot \frac{F}{{\left(\sqrt{\left(F \cdot F + 2\right) + 2 \cdot x}\right)}^{\left(\frac{1}{2}\right)}}\\ \mathbf{else}:\\ \;\;\;\;\left(-\frac{x \cdot \left(\sqrt[3]{1} \cdot \sqrt[3]{1}\right)}{\frac{\tan B}{\sqrt[3]{1}}}\right) + \left(\frac{1}{\sin B} - 1 \cdot \frac{1}{\sin B \cdot {F}^{2}}\right)\\ \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 -99771073.7748098224:\\
\;\;\;\;\left(-\frac{x \cdot \left(\sqrt[3]{1} \cdot \sqrt[3]{1}\right)}{\frac{\tan B}{\sqrt[3]{1}}}\right) + \left(1 \cdot \frac{1}{\sin B \cdot {F}^{2}} - \frac{1}{\sin B}\right)\\

\mathbf{elif}\;F \le 3.99929698532464133 \cdot 10^{93}:\\
\;\;\;\;\left(-\frac{x \cdot \left(\sqrt[3]{1} \cdot \sqrt[3]{1}\right)}{\frac{\tan B}{\sqrt[3]{1}}}\right) + \frac{-1}{\left(-\sin B\right) \cdot {\left(\sqrt{\left(F \cdot F + 2\right) + 2 \cdot x}\right)}^{\left(\frac{1}{2}\right)}} \cdot \frac{F}{{\left(\sqrt{\left(F \cdot F + 2\right) + 2 \cdot x}\right)}^{\left(\frac{1}{2}\right)}}\\

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

\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 <= -99771073.77480982)) {
		VAR = ((double) (((double) -(((double) (((double) (x * ((double) (((double) cbrt(1.0)) * ((double) cbrt(1.0)))))) / ((double) (((double) tan(B)) / ((double) cbrt(1.0)))))))) + ((double) (((double) (1.0 * ((double) (1.0 / ((double) (((double) sin(B)) * ((double) pow(F, 2.0)))))))) - ((double) (1.0 / ((double) sin(B))))))));
	} else {
		double VAR_1;
		if ((F <= 3.9992969853246413e+93)) {
			VAR_1 = ((double) (((double) -(((double) (((double) (x * ((double) (((double) cbrt(1.0)) * ((double) cbrt(1.0)))))) / ((double) (((double) tan(B)) / ((double) cbrt(1.0)))))))) + ((double) (((double) (((double) -(1.0)) / ((double) (((double) -(((double) sin(B)))) * ((double) pow(((double) sqrt(((double) (((double) (((double) (F * F)) + 2.0)) + ((double) (2.0 * x)))))), ((double) (1.0 / 2.0)))))))) * ((double) (F / ((double) pow(((double) sqrt(((double) (((double) (((double) (F * F)) + 2.0)) + ((double) (2.0 * x)))))), ((double) (1.0 / 2.0))))))))));
		} else {
			VAR_1 = ((double) (((double) -(((double) (((double) (x * ((double) (((double) cbrt(1.0)) * ((double) cbrt(1.0)))))) / ((double) (((double) tan(B)) / ((double) cbrt(1.0)))))))) + ((double) (((double) (1.0 / ((double) sin(B)))) - ((double) (1.0 * ((double) (1.0 / ((double) (((double) sin(B)) * ((double) pow(F, 2.0))))))))))));
		}
		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 < -99771073.77480982

    1. Initial program 25.6

      \[\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. Using strategy rm
    3. Applied pow-neg25.6

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

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

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

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

      \[\leadsto \left(-x \cdot \frac{\color{blue}{\left(\sqrt[3]{1} \cdot \sqrt[3]{1}\right) \cdot \sqrt[3]{1}}}{\tan B}\right) + \frac{-F}{\left(-\sin B\right) \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\frac{1}{2}\right)}}\]
    9. Applied associate-/l*19.4

      \[\leadsto \left(-x \cdot \color{blue}{\frac{\sqrt[3]{1} \cdot \sqrt[3]{1}}{\frac{\tan B}{\sqrt[3]{1}}}}\right) + \frac{-F}{\left(-\sin B\right) \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\frac{1}{2}\right)}}\]
    10. Applied associate-*r/19.4

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

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

    if -99771073.77480982 < F < 3.9992969853246413e+93

    1. Initial program 0.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. Using strategy rm
    3. Applied pow-neg0.9

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

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

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

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

      \[\leadsto \left(-x \cdot \frac{\color{blue}{\left(\sqrt[3]{1} \cdot \sqrt[3]{1}\right) \cdot \sqrt[3]{1}}}{\tan B}\right) + \frac{-F}{\left(-\sin B\right) \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\frac{1}{2}\right)}}\]
    9. Applied associate-/l*0.4

      \[\leadsto \left(-x \cdot \color{blue}{\frac{\sqrt[3]{1} \cdot \sqrt[3]{1}}{\frac{\tan B}{\sqrt[3]{1}}}}\right) + \frac{-F}{\left(-\sin B\right) \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\frac{1}{2}\right)}}\]
    10. Applied associate-*r/0.3

      \[\leadsto \left(-\color{blue}{\frac{x \cdot \left(\sqrt[3]{1} \cdot \sqrt[3]{1}\right)}{\frac{\tan B}{\sqrt[3]{1}}}}\right) + \frac{-F}{\left(-\sin B\right) \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\frac{1}{2}\right)}}\]
    11. Using strategy rm
    12. Applied add-sqr-sqrt0.3

      \[\leadsto \left(-\frac{x \cdot \left(\sqrt[3]{1} \cdot \sqrt[3]{1}\right)}{\frac{\tan B}{\sqrt[3]{1}}}\right) + \frac{-F}{\left(-\sin B\right) \cdot {\color{blue}{\left(\sqrt{\left(F \cdot F + 2\right) + 2 \cdot x} \cdot \sqrt{\left(F \cdot F + 2\right) + 2 \cdot x}\right)}}^{\left(\frac{1}{2}\right)}}\]
    13. Applied unpow-prod-down0.3

      \[\leadsto \left(-\frac{x \cdot \left(\sqrt[3]{1} \cdot \sqrt[3]{1}\right)}{\frac{\tan B}{\sqrt[3]{1}}}\right) + \frac{-F}{\left(-\sin B\right) \cdot \color{blue}{\left({\left(\sqrt{\left(F \cdot F + 2\right) + 2 \cdot x}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\sqrt{\left(F \cdot F + 2\right) + 2 \cdot x}\right)}^{\left(\frac{1}{2}\right)}\right)}}\]
    14. Applied associate-*r*0.3

      \[\leadsto \left(-\frac{x \cdot \left(\sqrt[3]{1} \cdot \sqrt[3]{1}\right)}{\frac{\tan B}{\sqrt[3]{1}}}\right) + \frac{-F}{\color{blue}{\left(\left(-\sin B\right) \cdot {\left(\sqrt{\left(F \cdot F + 2\right) + 2 \cdot x}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot {\left(\sqrt{\left(F \cdot F + 2\right) + 2 \cdot x}\right)}^{\left(\frac{1}{2}\right)}}}\]
    15. Applied *-un-lft-identity0.3

      \[\leadsto \left(-\frac{x \cdot \left(\sqrt[3]{1} \cdot \sqrt[3]{1}\right)}{\frac{\tan B}{\sqrt[3]{1}}}\right) + \frac{-\color{blue}{1 \cdot F}}{\left(\left(-\sin B\right) \cdot {\left(\sqrt{\left(F \cdot F + 2\right) + 2 \cdot x}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot {\left(\sqrt{\left(F \cdot F + 2\right) + 2 \cdot x}\right)}^{\left(\frac{1}{2}\right)}}\]
    16. Applied distribute-lft-neg-in0.3

      \[\leadsto \left(-\frac{x \cdot \left(\sqrt[3]{1} \cdot \sqrt[3]{1}\right)}{\frac{\tan B}{\sqrt[3]{1}}}\right) + \frac{\color{blue}{\left(-1\right) \cdot F}}{\left(\left(-\sin B\right) \cdot {\left(\sqrt{\left(F \cdot F + 2\right) + 2 \cdot x}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot {\left(\sqrt{\left(F \cdot F + 2\right) + 2 \cdot x}\right)}^{\left(\frac{1}{2}\right)}}\]
    17. Applied times-frac0.3

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

    if 3.9992969853246413e+93 < F

    1. Initial program 31.9

      \[\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. Using strategy rm
    3. Applied pow-neg31.9

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

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

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

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

      \[\leadsto \left(-x \cdot \frac{\color{blue}{\left(\sqrt[3]{1} \cdot \sqrt[3]{1}\right) \cdot \sqrt[3]{1}}}{\tan B}\right) + \frac{-F}{\left(-\sin B\right) \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\frac{1}{2}\right)}}\]
    9. Applied associate-/l*25.6

      \[\leadsto \left(-x \cdot \color{blue}{\frac{\sqrt[3]{1} \cdot \sqrt[3]{1}}{\frac{\tan B}{\sqrt[3]{1}}}}\right) + \frac{-F}{\left(-\sin B\right) \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\frac{1}{2}\right)}}\]
    10. Applied associate-*r/25.5

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

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

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

Reproduce

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