Average Error: 13.8 → 0.2
Time: 18.4s
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 -2.1024600832345152 \cdot 10^{95}:\\ \;\;\;\;\left(-\frac{x \cdot 1}{\tan B}\right) + \frac{\frac{1}{F \cdot F} - 1}{\sin B}\\ \mathbf{elif}\;F \le 1829504.7016831513:\\ \;\;\;\;\left(-\frac{x \cdot 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)}}\\ \mathbf{else}:\\ \;\;\;\;\left(-\frac{x \cdot 1}{\tan B}\right) + \frac{1 - \frac{1}{F \cdot F}}{\sin 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 -2.1024600832345152 \cdot 10^{95}:\\
\;\;\;\;\left(-\frac{x \cdot 1}{\tan B}\right) + \frac{\frac{1}{F \cdot F} - 1}{\sin B}\\

\mathbf{elif}\;F \le 1829504.7016831513:\\
\;\;\;\;\left(-\frac{x \cdot 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)}}\\

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

\end{array}
double f(double F, double B, double x) {
        double r44934 = x;
        double r44935 = 1.0;
        double r44936 = B;
        double r44937 = tan(r44936);
        double r44938 = r44935 / r44937;
        double r44939 = r44934 * r44938;
        double r44940 = -r44939;
        double r44941 = F;
        double r44942 = sin(r44936);
        double r44943 = r44941 / r44942;
        double r44944 = r44941 * r44941;
        double r44945 = 2.0;
        double r44946 = r44944 + r44945;
        double r44947 = r44945 * r44934;
        double r44948 = r44946 + r44947;
        double r44949 = r44935 / r44945;
        double r44950 = -r44949;
        double r44951 = pow(r44948, r44950);
        double r44952 = r44943 * r44951;
        double r44953 = r44940 + r44952;
        return r44953;
}

double f(double F, double B, double x) {
        double r44954 = F;
        double r44955 = -2.1024600832345152e+95;
        bool r44956 = r44954 <= r44955;
        double r44957 = x;
        double r44958 = 1.0;
        double r44959 = r44957 * r44958;
        double r44960 = B;
        double r44961 = tan(r44960);
        double r44962 = r44959 / r44961;
        double r44963 = -r44962;
        double r44964 = r44954 * r44954;
        double r44965 = r44958 / r44964;
        double r44966 = 1.0;
        double r44967 = r44965 - r44966;
        double r44968 = sin(r44960);
        double r44969 = r44967 / r44968;
        double r44970 = r44963 + r44969;
        double r44971 = 1829504.7016831513;
        bool r44972 = r44954 <= r44971;
        double r44973 = 2.0;
        double r44974 = r44964 + r44973;
        double r44975 = r44973 * r44957;
        double r44976 = r44974 + r44975;
        double r44977 = r44958 / r44973;
        double r44978 = pow(r44976, r44977);
        double r44979 = r44968 * r44978;
        double r44980 = r44954 / r44979;
        double r44981 = r44963 + r44980;
        double r44982 = r44966 - r44965;
        double r44983 = r44982 / r44968;
        double r44984 = r44963 + r44983;
        double r44985 = r44972 ? r44981 : r44984;
        double r44986 = r44956 ? r44970 : r44985;
        return r44986;
}

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 < -2.1024600832345152e+95

    1. Initial program 32.7

      \[\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 associate-*l/26.0

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

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

      \[\leadsto \left(-\frac{x \cdot 1}{\tan B}\right) + \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}\]
    8. Applied un-div-inv25.9

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

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

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

    if -2.1024600832345152e+95 < F < 1829504.7016831513

    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 associate-*l/0.4

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

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

      \[\leadsto \left(-\frac{x \cdot 1}{\tan B}\right) + \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}\]
    8. Applied un-div-inv0.3

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

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

    if 1829504.7016831513 < F

    1. Initial program 25.4

      \[\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 associate-*l/19.4

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;F \le -2.1024600832345152 \cdot 10^{95}:\\ \;\;\;\;\left(-\frac{x \cdot 1}{\tan B}\right) + \frac{\frac{1}{F \cdot F} - 1}{\sin B}\\ \mathbf{elif}\;F \le 1829504.7016831513:\\ \;\;\;\;\left(-\frac{x \cdot 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)}}\\ \mathbf{else}:\\ \;\;\;\;\left(-\frac{x \cdot 1}{\tan B}\right) + \frac{1 - \frac{1}{F \cdot F}}{\sin B}\\ \end{array}\]

Reproduce

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