Average Error: 13.5 → 0.2
Time: 14.0s
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 -3.67414424466315638 \cdot 10^{36}:\\ \;\;\;\;\left(1 \cdot \frac{1}{\sin B \cdot {F}^{2}} - \frac{1}{\sin B}\right) - \frac{x \cdot 1}{\tan B}\\ \mathbf{elif}\;F \le 880497.349540160852:\\ \;\;\;\;F \cdot \frac{1}{\frac{\sin B}{{\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}}} - \frac{x \cdot 1}{\tan B}\\ \mathbf{else}:\\ \;\;\;\;\left(\frac{1}{\sin B} - 1 \cdot \frac{1}{\sin B \cdot {F}^{2}}\right) - \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 -3.67414424466315638 \cdot 10^{36}:\\
\;\;\;\;\left(1 \cdot \frac{1}{\sin B \cdot {F}^{2}} - \frac{1}{\sin B}\right) - \frac{x \cdot 1}{\tan B}\\

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

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

\end{array}
double f(double F, double B, double x) {
        double r55986 = x;
        double r55987 = 1.0;
        double r55988 = B;
        double r55989 = tan(r55988);
        double r55990 = r55987 / r55989;
        double r55991 = r55986 * r55990;
        double r55992 = -r55991;
        double r55993 = F;
        double r55994 = sin(r55988);
        double r55995 = r55993 / r55994;
        double r55996 = r55993 * r55993;
        double r55997 = 2.0;
        double r55998 = r55996 + r55997;
        double r55999 = r55997 * r55986;
        double r56000 = r55998 + r55999;
        double r56001 = r55987 / r55997;
        double r56002 = -r56001;
        double r56003 = pow(r56000, r56002);
        double r56004 = r55995 * r56003;
        double r56005 = r55992 + r56004;
        return r56005;
}

double f(double F, double B, double x) {
        double r56006 = F;
        double r56007 = -3.6741442446631564e+36;
        bool r56008 = r56006 <= r56007;
        double r56009 = 1.0;
        double r56010 = 1.0;
        double r56011 = B;
        double r56012 = sin(r56011);
        double r56013 = 2.0;
        double r56014 = pow(r56006, r56013);
        double r56015 = r56012 * r56014;
        double r56016 = r56010 / r56015;
        double r56017 = r56009 * r56016;
        double r56018 = r56010 / r56012;
        double r56019 = r56017 - r56018;
        double r56020 = x;
        double r56021 = r56020 * r56009;
        double r56022 = tan(r56011);
        double r56023 = r56021 / r56022;
        double r56024 = r56019 - r56023;
        double r56025 = 880497.3495401609;
        bool r56026 = r56006 <= r56025;
        double r56027 = r56006 * r56006;
        double r56028 = 2.0;
        double r56029 = r56027 + r56028;
        double r56030 = r56028 * r56020;
        double r56031 = r56029 + r56030;
        double r56032 = r56009 / r56028;
        double r56033 = -r56032;
        double r56034 = pow(r56031, r56033);
        double r56035 = r56012 / r56034;
        double r56036 = r56010 / r56035;
        double r56037 = r56006 * r56036;
        double r56038 = r56037 - r56023;
        double r56039 = r56018 - r56017;
        double r56040 = r56039 - r56023;
        double r56041 = r56026 ? r56038 : r56040;
        double r56042 = r56008 ? r56024 : r56041;
        return r56042;
}

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 < -3.6741442446631564e+36

    1. Initial program 27.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. Simplified27.6

      \[\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 div-inv27.6

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

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

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

      \[\leadsto F \cdot \frac{{\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}}\]
    9. Taylor expanded around -inf 0.2

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

    if -3.6741442446631564e+36 < F < 880497.3495401609

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

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

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

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

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

      \[\leadsto F \cdot \frac{{\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}}\]
    9. Using strategy rm
    10. Applied clear-num0.3

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

    if 880497.3495401609 < F

    1. Initial program 25.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. Simplified25.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 div-inv25.0

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

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

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

      \[\leadsto F \cdot \frac{{\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}}\]
    9. Taylor expanded around inf 0.1

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

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

Reproduce

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