Average Error: 14.0 → 0.2
Time: 13.1s
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 -143202766.454613477:\\ \;\;\;\;\left(\frac{\frac{1}{{F}^{2}}}{\sin B} - \frac{1}{\sin B}\right) - \frac{x \cdot 1}{\tan B}\\ \mathbf{elif}\;F \le 69713870.9354893416:\\ \;\;\;\;F \cdot \frac{{\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{0}}{\sin B \cdot {\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 -143202766.454613477:\\
\;\;\;\;\left(\frac{\frac{1}{{F}^{2}}}{\sin B} - \frac{1}{\sin B}\right) - \frac{x \cdot 1}{\tan B}\\

\mathbf{elif}\;F \le 69713870.9354893416:\\
\;\;\;\;F \cdot \frac{{\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{0}}{\sin B \cdot {\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 r47332 = x;
        double r47333 = 1.0;
        double r47334 = B;
        double r47335 = tan(r47334);
        double r47336 = r47333 / r47335;
        double r47337 = r47332 * r47336;
        double r47338 = -r47337;
        double r47339 = F;
        double r47340 = sin(r47334);
        double r47341 = r47339 / r47340;
        double r47342 = r47339 * r47339;
        double r47343 = 2.0;
        double r47344 = r47342 + r47343;
        double r47345 = r47343 * r47332;
        double r47346 = r47344 + r47345;
        double r47347 = r47333 / r47343;
        double r47348 = -r47347;
        double r47349 = pow(r47346, r47348);
        double r47350 = r47341 * r47349;
        double r47351 = r47338 + r47350;
        return r47351;
}

double f(double F, double B, double x) {
        double r47352 = F;
        double r47353 = -143202766.45461348;
        bool r47354 = r47352 <= r47353;
        double r47355 = 1.0;
        double r47356 = 2.0;
        double r47357 = pow(r47352, r47356);
        double r47358 = r47355 / r47357;
        double r47359 = B;
        double r47360 = sin(r47359);
        double r47361 = r47358 / r47360;
        double r47362 = 1.0;
        double r47363 = r47362 / r47360;
        double r47364 = r47361 - r47363;
        double r47365 = x;
        double r47366 = r47365 * r47355;
        double r47367 = tan(r47359);
        double r47368 = r47366 / r47367;
        double r47369 = r47364 - r47368;
        double r47370 = 69713870.93548934;
        bool r47371 = r47352 <= r47370;
        double r47372 = r47352 * r47352;
        double r47373 = 2.0;
        double r47374 = r47372 + r47373;
        double r47375 = r47373 * r47365;
        double r47376 = r47374 + r47375;
        double r47377 = 0.0;
        double r47378 = pow(r47376, r47377);
        double r47379 = r47355 / r47373;
        double r47380 = pow(r47376, r47379);
        double r47381 = r47360 * r47380;
        double r47382 = r47378 / r47381;
        double r47383 = r47352 * r47382;
        double r47384 = r47383 - r47368;
        double r47385 = r47360 * r47357;
        double r47386 = r47362 / r47385;
        double r47387 = r47355 * r47386;
        double r47388 = r47363 - r47387;
        double r47389 = r47388 - r47368;
        double r47390 = r47371 ? r47384 : r47389;
        double r47391 = r47354 ? r47369 : r47390;
        return r47391;
}

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

    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. Simplified25.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-inv25.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*19.5

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

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

      \[\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 neg-sub019.5

      \[\leadsto F \cdot \frac{{\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\color{blue}{\left(0 - \frac{1}{2}\right)}}}{\sin B} - \frac{x \cdot 1}{\tan B}\]
    11. Applied pow-sub19.4

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

      \[\leadsto F \cdot \color{blue}{\frac{{\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{0}}{\sin B \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\frac{1}{2}\right)}}} - \frac{x \cdot 1}{\tan B}\]
    13. 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}\]
    14. Simplified0.2

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

    if -143202766.45461348 < F < 69713870.93548934

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

      \[\leadsto F \cdot \frac{{\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\color{blue}{\left(0 - \frac{1}{2}\right)}}}{\sin B} - \frac{x \cdot 1}{\tan B}\]
    11. Applied pow-sub0.3

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

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

    if 69713870.93548934 < F

    1. Initial program 25.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. Simplified25.8

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

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

      \[\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/20.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.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 -143202766.454613477:\\ \;\;\;\;\left(\frac{\frac{1}{{F}^{2}}}{\sin B} - \frac{1}{\sin B}\right) - \frac{x \cdot 1}{\tan B}\\ \mathbf{elif}\;F \le 69713870.9354893416:\\ \;\;\;\;F \cdot \frac{{\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{0}}{\sin B \cdot {\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 2020100 
(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))))))