Average Error: 13.9 → 0.2
Time: 10.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 -125465839.257105276:\\ \;\;\;\;\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 406748.63273850258:\\ \;\;\;\;\frac{F}{\left(\sin B \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)}} - \frac{x \cdot 1}{\tan B}\\ \mathbf{else}:\\ \;\;\;\;\frac{F}{1 \cdot \left(\sin B \cdot {\left(\frac{1}{{F}^{1}}\right)}^{1}\right) + \sin B \cdot F} - \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 -125465839.257105276:\\
\;\;\;\;\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 406748.63273850258:\\
\;\;\;\;\frac{F}{\left(\sin B \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)}} - \frac{x \cdot 1}{\tan B}\\

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

\end{array}
double f(double F, double B, double x) {
        double r35986 = x;
        double r35987 = 1.0;
        double r35988 = B;
        double r35989 = tan(r35988);
        double r35990 = r35987 / r35989;
        double r35991 = r35986 * r35990;
        double r35992 = -r35991;
        double r35993 = F;
        double r35994 = sin(r35988);
        double r35995 = r35993 / r35994;
        double r35996 = r35993 * r35993;
        double r35997 = 2.0;
        double r35998 = r35996 + r35997;
        double r35999 = r35997 * r35986;
        double r36000 = r35998 + r35999;
        double r36001 = r35987 / r35997;
        double r36002 = -r36001;
        double r36003 = pow(r36000, r36002);
        double r36004 = r35995 * r36003;
        double r36005 = r35992 + r36004;
        return r36005;
}

double f(double F, double B, double x) {
        double r36006 = F;
        double r36007 = -125465839.25710528;
        bool r36008 = r36006 <= r36007;
        double r36009 = 1.0;
        double r36010 = 1.0;
        double r36011 = B;
        double r36012 = sin(r36011);
        double r36013 = 2.0;
        double r36014 = pow(r36006, r36013);
        double r36015 = r36012 * r36014;
        double r36016 = r36010 / r36015;
        double r36017 = r36009 * r36016;
        double r36018 = r36010 / r36012;
        double r36019 = r36017 - r36018;
        double r36020 = x;
        double r36021 = r36020 * r36009;
        double r36022 = tan(r36011);
        double r36023 = r36021 / r36022;
        double r36024 = r36019 - r36023;
        double r36025 = 406748.6327385026;
        bool r36026 = r36006 <= r36025;
        double r36027 = r36006 * r36006;
        double r36028 = 2.0;
        double r36029 = r36027 + r36028;
        double r36030 = r36028 * r36020;
        double r36031 = r36029 + r36030;
        double r36032 = sqrt(r36031);
        double r36033 = r36009 / r36028;
        double r36034 = pow(r36032, r36033);
        double r36035 = r36012 * r36034;
        double r36036 = r36035 * r36034;
        double r36037 = r36006 / r36036;
        double r36038 = r36037 - r36023;
        double r36039 = pow(r36006, r36009);
        double r36040 = r36010 / r36039;
        double r36041 = pow(r36040, r36009);
        double r36042 = r36012 * r36041;
        double r36043 = r36009 * r36042;
        double r36044 = r36012 * r36006;
        double r36045 = r36043 + r36044;
        double r36046 = r36006 / r36045;
        double r36047 = r36046 - r36023;
        double r36048 = r36026 ? r36038 : r36047;
        double r36049 = r36008 ? r36024 : r36048;
        return r36049;
}

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 < -125465839.25710528

    1. Initial program 24.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. Simplified24.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 pow-neg24.4

      \[\leadsto \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)}}} - x \cdot \frac{1}{\tan B}\]
    5. Applied frac-times18.8

      \[\leadsto \color{blue}{\frac{F \cdot 1}{\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}\]
    6. Simplified18.8

      \[\leadsto \frac{\color{blue}{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}\]
    7. Using strategy rm
    8. Applied associate-*r/18.7

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

      \[\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 -125465839.25710528 < F < 406748.6327385026

    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 pow-neg0.4

      \[\leadsto \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)}}} - x \cdot \frac{1}{\tan B}\]
    5. Applied frac-times0.4

      \[\leadsto \color{blue}{\frac{F \cdot 1}{\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}\]
    6. Simplified0.4

      \[\leadsto \frac{\color{blue}{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}\]
    7. Using strategy rm
    8. Applied associate-*r/0.3

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

      \[\leadsto \frac{F}{\sin B \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)}} - \frac{x \cdot 1}{\tan B}\]
    11. Applied unpow-prod-down0.3

      \[\leadsto \frac{F}{\sin B \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)}} - \frac{x \cdot 1}{\tan B}\]
    12. Applied associate-*r*0.3

      \[\leadsto \frac{F}{\color{blue}{\left(\sin B \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)}}} - \frac{x \cdot 1}{\tan B}\]

    if 406748.6327385026 < F

    1. Initial program 26.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. Simplified26.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 pow-neg26.2

      \[\leadsto \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)}}} - x \cdot \frac{1}{\tan B}\]
    5. Applied frac-times20.7

      \[\leadsto \color{blue}{\frac{F \cdot 1}{\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}\]
    6. Simplified20.7

      \[\leadsto \frac{\color{blue}{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}\]
    7. Using strategy rm
    8. Applied associate-*r/20.7

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

      \[\leadsto \frac{F}{\color{blue}{1 \cdot \left(\sin B \cdot {\left(\frac{1}{{F}^{1}}\right)}^{1}\right) + \sin B \cdot F}} - \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 -125465839.257105276:\\ \;\;\;\;\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 406748.63273850258:\\ \;\;\;\;\frac{F}{\left(\sin B \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)}} - \frac{x \cdot 1}{\tan B}\\ \mathbf{else}:\\ \;\;\;\;\frac{F}{1 \cdot \left(\sin B \cdot {\left(\frac{1}{{F}^{1}}\right)}^{1}\right) + \sin B \cdot F} - \frac{x \cdot 1}{\tan B}\\ \end{array}\]

Reproduce

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