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

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

\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 r42517 = x;
        double r42518 = 1.0;
        double r42519 = B;
        double r42520 = tan(r42519);
        double r42521 = r42518 / r42520;
        double r42522 = r42517 * r42521;
        double r42523 = -r42522;
        double r42524 = F;
        double r42525 = sin(r42519);
        double r42526 = r42524 / r42525;
        double r42527 = r42524 * r42524;
        double r42528 = 2.0;
        double r42529 = r42527 + r42528;
        double r42530 = r42528 * r42517;
        double r42531 = r42529 + r42530;
        double r42532 = r42518 / r42528;
        double r42533 = -r42532;
        double r42534 = pow(r42531, r42533);
        double r42535 = r42526 * r42534;
        double r42536 = r42523 + r42535;
        return r42536;
}

double f(double F, double B, double x) {
        double r42537 = F;
        double r42538 = -67836704772650.625;
        bool r42539 = r42537 <= r42538;
        double r42540 = x;
        double r42541 = 1.0;
        double r42542 = r42540 * r42541;
        double r42543 = B;
        double r42544 = tan(r42543);
        double r42545 = r42542 / r42544;
        double r42546 = -r42545;
        double r42547 = sin(r42543);
        double r42548 = 2.0;
        double r42549 = pow(r42537, r42548);
        double r42550 = r42547 * r42549;
        double r42551 = r42541 / r42550;
        double r42552 = 1.0;
        double r42553 = r42552 / r42547;
        double r42554 = r42551 - r42553;
        double r42555 = r42546 + r42554;
        double r42556 = 16387.002115766478;
        bool r42557 = r42537 <= r42556;
        double r42558 = r42537 * r42537;
        double r42559 = 2.0;
        double r42560 = r42558 + r42559;
        double r42561 = r42559 * r42540;
        double r42562 = r42560 + r42561;
        double r42563 = 0.0;
        double r42564 = pow(r42562, r42563);
        double r42565 = r42537 * r42564;
        double r42566 = r42541 / r42559;
        double r42567 = pow(r42562, r42566);
        double r42568 = r42547 * r42567;
        double r42569 = r42565 / r42568;
        double r42570 = r42546 + r42569;
        double r42571 = r42553 - r42551;
        double r42572 = r42546 + r42571;
        double r42573 = r42557 ? r42570 : r42572;
        double r42574 = r42539 ? r42555 : r42573;
        return r42574;
}

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

    1. Initial program 25.7

      \[\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 associate-*l/19.6

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

      \[\leadsto \left(-\color{blue}{\frac{x \cdot 1}{\tan B}}\right) + \frac{F \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}}{\sin B}\]
    6. Using strategy rm
    7. Applied neg-sub019.5

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

      \[\leadsto \left(-\frac{x \cdot 1}{\tan B}\right) + \frac{F \cdot \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}\]
    9. Applied associate-*r/19.5

      \[\leadsto \left(-\frac{x \cdot 1}{\tan B}\right) + \frac{\color{blue}{\frac{F \cdot {\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}\]
    10. Applied associate-/l/19.5

      \[\leadsto \left(-\frac{x \cdot 1}{\tan B}\right) + \color{blue}{\frac{F \cdot {\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)}}}\]
    11. Taylor expanded around -inf 0.1

      \[\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)}\]
    12. Simplified0.1

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

    if -67836704772650.625 < F < 16387.002115766478

    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. Using strategy rm
    3. Applied associate-*l/0.4

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

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

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

      \[\leadsto \left(-\frac{x \cdot 1}{\tan B}\right) + \frac{F \cdot \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}\]
    9. Applied associate-*r/0.3

      \[\leadsto \left(-\frac{x \cdot 1}{\tan B}\right) + \frac{\color{blue}{\frac{F \cdot {\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}\]
    10. Applied associate-/l/0.3

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

    if 16387.002115766478 < F

    1. Initial program 25.7

      \[\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 associate-*l/19.2

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

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

      \[\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)}\]
    7. Simplified0.1

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;F \le -67836704772650.625:\\ \;\;\;\;\left(-\frac{x \cdot 1}{\tan B}\right) + \left(\frac{1}{\sin B \cdot {F}^{2}} - \frac{1}{\sin B}\right)\\ \mathbf{elif}\;F \le 16387.0021157664778:\\ \;\;\;\;\left(-\frac{x \cdot 1}{\tan B}\right) + \frac{F \cdot {\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)}}\\ \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 2020045 
(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))))))