Average Error: 13.6 → 0.2
Time: 35.7s
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 -7181092.308785896:\\ \;\;\;\;\left(\frac{\frac{1}{F \cdot F}}{\sin B} - \frac{1}{\sin B}\right) - \frac{x}{\tan B}\\ \mathbf{elif}\;F \le 3174.6489492657015:\\ \;\;\;\;F \cdot \left({\left(x \cdot 2 + \left(2 + F \cdot F\right)\right)}^{\frac{-1}{4}} \cdot \frac{{\left(x \cdot 2 + \left(2 + F \cdot F\right)\right)}^{\frac{-1}{4}}}{\sin B}\right) - \frac{x}{\tan B}\\ \mathbf{else}:\\ \;\;\;\;\left(\frac{1}{\sin B} - \frac{1}{\sin B \cdot \left(F \cdot F\right)}\right) - \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 -7181092.308785896:\\
\;\;\;\;\left(\frac{\frac{1}{F \cdot F}}{\sin B} - \frac{1}{\sin B}\right) - \frac{x}{\tan B}\\

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

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

\end{array}
double f(double F, double B, double x) {
        double r893095 = x;
        double r893096 = 1.0;
        double r893097 = B;
        double r893098 = tan(r893097);
        double r893099 = r893096 / r893098;
        double r893100 = r893095 * r893099;
        double r893101 = -r893100;
        double r893102 = F;
        double r893103 = sin(r893097);
        double r893104 = r893102 / r893103;
        double r893105 = r893102 * r893102;
        double r893106 = 2.0;
        double r893107 = r893105 + r893106;
        double r893108 = r893106 * r893095;
        double r893109 = r893107 + r893108;
        double r893110 = r893096 / r893106;
        double r893111 = -r893110;
        double r893112 = pow(r893109, r893111);
        double r893113 = r893104 * r893112;
        double r893114 = r893101 + r893113;
        return r893114;
}

double f(double F, double B, double x) {
        double r893115 = F;
        double r893116 = -7181092.308785896;
        bool r893117 = r893115 <= r893116;
        double r893118 = 1.0;
        double r893119 = r893115 * r893115;
        double r893120 = r893118 / r893119;
        double r893121 = B;
        double r893122 = sin(r893121);
        double r893123 = r893120 / r893122;
        double r893124 = r893118 / r893122;
        double r893125 = r893123 - r893124;
        double r893126 = x;
        double r893127 = tan(r893121);
        double r893128 = r893126 / r893127;
        double r893129 = r893125 - r893128;
        double r893130 = 3174.6489492657015;
        bool r893131 = r893115 <= r893130;
        double r893132 = 2.0;
        double r893133 = r893126 * r893132;
        double r893134 = r893132 + r893119;
        double r893135 = r893133 + r893134;
        double r893136 = -0.25;
        double r893137 = pow(r893135, r893136);
        double r893138 = r893137 / r893122;
        double r893139 = r893137 * r893138;
        double r893140 = r893115 * r893139;
        double r893141 = r893140 - r893128;
        double r893142 = r893122 * r893119;
        double r893143 = r893118 / r893142;
        double r893144 = r893124 - r893143;
        double r893145 = r893144 - r893128;
        double r893146 = r893131 ? r893141 : r893145;
        double r893147 = r893117 ? r893129 : r893146;
        return r893147;
}

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

    1. Initial program 25.3

      \[\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.3

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

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

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

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

    if -7181092.308785896 < F < 3174.6489492657015

    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.3

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

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

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

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

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

    if 3174.6489492657015 < F

    1. Initial program 25.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. Simplified24.2

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

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

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

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

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

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

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

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

Reproduce

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