Average Error: 13.2 → 0.2
Time: 36.1s
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.1491247194378224 \cdot 10^{+64}:\\ \;\;\;\;\frac{\frac{1}{F \cdot F} - 1}{\sin B} - \frac{x}{\tan B}\\ \mathbf{elif}\;F \le 11813.229538844102:\\ \;\;\;\;\frac{F \cdot \sqrt[3]{{\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\frac{-1}{2}} \cdot \left({\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\frac{-1}{2}} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\frac{-1}{2}}\right)}}{\sin B} - \frac{x}{\tan B}\\ \mathbf{else}:\\ \;\;\;\;\frac{1 - \frac{1}{F \cdot F}}{\sin B} - \frac{x}{\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.1491247194378224 \cdot 10^{+64}:\\
\;\;\;\;\frac{\frac{1}{F \cdot F} - 1}{\sin B} - \frac{x}{\tan B}\\

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

\mathbf{else}:\\
\;\;\;\;\frac{1 - \frac{1}{F \cdot F}}{\sin B} - \frac{x}{\tan B}\\

\end{array}
double f(double F, double B, double x) {
        double r1382894 = x;
        double r1382895 = 1.0;
        double r1382896 = B;
        double r1382897 = tan(r1382896);
        double r1382898 = r1382895 / r1382897;
        double r1382899 = r1382894 * r1382898;
        double r1382900 = -r1382899;
        double r1382901 = F;
        double r1382902 = sin(r1382896);
        double r1382903 = r1382901 / r1382902;
        double r1382904 = r1382901 * r1382901;
        double r1382905 = 2.0;
        double r1382906 = r1382904 + r1382905;
        double r1382907 = r1382905 * r1382894;
        double r1382908 = r1382906 + r1382907;
        double r1382909 = r1382895 / r1382905;
        double r1382910 = -r1382909;
        double r1382911 = pow(r1382908, r1382910);
        double r1382912 = r1382903 * r1382911;
        double r1382913 = r1382900 + r1382912;
        return r1382913;
}

double f(double F, double B, double x) {
        double r1382914 = F;
        double r1382915 = -1.1491247194378224e+64;
        bool r1382916 = r1382914 <= r1382915;
        double r1382917 = 1.0;
        double r1382918 = r1382914 * r1382914;
        double r1382919 = r1382917 / r1382918;
        double r1382920 = r1382919 - r1382917;
        double r1382921 = B;
        double r1382922 = sin(r1382921);
        double r1382923 = r1382920 / r1382922;
        double r1382924 = x;
        double r1382925 = tan(r1382921);
        double r1382926 = r1382924 / r1382925;
        double r1382927 = r1382923 - r1382926;
        double r1382928 = 11813.229538844102;
        bool r1382929 = r1382914 <= r1382928;
        double r1382930 = 2.0;
        double r1382931 = r1382918 + r1382930;
        double r1382932 = r1382930 * r1382924;
        double r1382933 = r1382931 + r1382932;
        double r1382934 = -0.5;
        double r1382935 = pow(r1382933, r1382934);
        double r1382936 = r1382935 * r1382935;
        double r1382937 = r1382935 * r1382936;
        double r1382938 = cbrt(r1382937);
        double r1382939 = r1382914 * r1382938;
        double r1382940 = r1382939 / r1382922;
        double r1382941 = r1382940 - r1382926;
        double r1382942 = r1382917 - r1382919;
        double r1382943 = r1382942 / r1382922;
        double r1382944 = r1382943 - r1382926;
        double r1382945 = r1382929 ? r1382941 : r1382944;
        double r1382946 = r1382916 ? r1382927 : r1382945;
        return r1382946;
}

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.1491247194378224e+64

    1. Initial program 29.5

      \[\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. Simplified23.4

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

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

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

    if -1.1491247194378224e+64 < F < 11813.229538844102

    1. Initial program 0.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. Simplified0.3

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

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

    if 11813.229538844102 < F

    1. Initial program 23.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. Simplified18.7

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

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

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

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

Reproduce

herbie shell --seed 2019162 
(FPCore (F B x)
  :name "VandenBroeck and Keller, Equation (23)"
  (+ (- (* x (/ 1 (tan B)))) (* (/ F (sin B)) (pow (+ (+ (* F F) 2) (* 2 x)) (- (/ 1 2))))))