Average Error: 13.5 → 0.3
Time: 16.6s
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.5912783554820192 \cdot 10^{23}:\\ \;\;\;\;\left(-\frac{x \cdot 1}{\tan B}\right) + \left(\frac{-1}{\sin B} + \frac{1}{\sin B \cdot {F}^{2}}\right)\\ \mathbf{elif}\;F \le 5.00369694459504041 \cdot 10^{153}:\\ \;\;\;\;\left(-\frac{1}{\frac{\tan B}{x \cdot 1}}\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) + \left(\frac{1}{\sin B} - \frac{1}{\sin B \cdot {F}^{2}}\right)\\ \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.5912783554820192 \cdot 10^{23}:\\
\;\;\;\;\left(-\frac{x \cdot 1}{\tan B}\right) + \left(\frac{-1}{\sin B} + \frac{1}{\sin B \cdot {F}^{2}}\right)\\

\mathbf{elif}\;F \le 5.00369694459504041 \cdot 10^{153}:\\
\;\;\;\;\left(-\frac{1}{\frac{\tan B}{x \cdot 1}}\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) + \left(\frac{1}{\sin B} - \frac{1}{\sin B \cdot {F}^{2}}\right)\\

\end{array}
double f(double F, double B, double x) {
        double r38241 = x;
        double r38242 = 1.0;
        double r38243 = B;
        double r38244 = tan(r38243);
        double r38245 = r38242 / r38244;
        double r38246 = r38241 * r38245;
        double r38247 = -r38246;
        double r38248 = F;
        double r38249 = sin(r38243);
        double r38250 = r38248 / r38249;
        double r38251 = r38248 * r38248;
        double r38252 = 2.0;
        double r38253 = r38251 + r38252;
        double r38254 = r38252 * r38241;
        double r38255 = r38253 + r38254;
        double r38256 = r38242 / r38252;
        double r38257 = -r38256;
        double r38258 = pow(r38255, r38257);
        double r38259 = r38250 * r38258;
        double r38260 = r38247 + r38259;
        return r38260;
}

double f(double F, double B, double x) {
        double r38261 = F;
        double r38262 = -1.5912783554820192e+23;
        bool r38263 = r38261 <= r38262;
        double r38264 = x;
        double r38265 = 1.0;
        double r38266 = r38264 * r38265;
        double r38267 = B;
        double r38268 = tan(r38267);
        double r38269 = r38266 / r38268;
        double r38270 = -r38269;
        double r38271 = -1.0;
        double r38272 = sin(r38267);
        double r38273 = r38271 / r38272;
        double r38274 = 2.0;
        double r38275 = pow(r38261, r38274);
        double r38276 = r38272 * r38275;
        double r38277 = r38265 / r38276;
        double r38278 = r38273 + r38277;
        double r38279 = r38270 + r38278;
        double r38280 = 5.0036969445950404e+153;
        bool r38281 = r38261 <= r38280;
        double r38282 = 1.0;
        double r38283 = r38268 / r38266;
        double r38284 = r38282 / r38283;
        double r38285 = -r38284;
        double r38286 = r38261 * r38261;
        double r38287 = 2.0;
        double r38288 = r38286 + r38287;
        double r38289 = r38287 * r38264;
        double r38290 = r38288 + r38289;
        double r38291 = r38265 / r38287;
        double r38292 = pow(r38290, r38291);
        double r38293 = r38272 * r38292;
        double r38294 = r38261 / r38293;
        double r38295 = r38285 + r38294;
        double r38296 = r38282 / r38272;
        double r38297 = r38296 - r38277;
        double r38298 = r38270 + r38297;
        double r38299 = r38281 ? r38295 : r38298;
        double r38300 = r38263 ? r38279 : r38299;
        return r38300;
}

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.5912783554820192e+23

    1. Initial program 24.9

      \[\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 pow-neg24.9

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

      \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \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)}}}\]
    5. Simplified19.3

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

      \[\leadsto \left(-\color{blue}{\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)}}\]
    8. Taylor expanded around -inf 0.2

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

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

    if -1.5912783554820192e+23 < F < 5.0036969445950404e+153

    1. Initial program 1.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 pow-neg1.8

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

      \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \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)}}}\]
    5. Simplified0.4

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

      \[\leadsto \left(-\color{blue}{\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)}}\]
    8. Using strategy rm
    9. Applied clear-num0.4

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

    if 5.0036969445950404e+153 < F

    1. Initial program 41.9

      \[\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 pow-neg41.9

      \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \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)}}}\]
    4. Applied frac-times35.4

      \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \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)}}}\]
    5. Simplified35.4

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

      \[\leadsto \left(-\color{blue}{\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)}}\]
    8. Taylor expanded around inf 0.2

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

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

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

Reproduce

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