Average Error: 14.2 → 0.2
Time: 31.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 -2496357.5085318577475845813751220703125:\\ \;\;\;\;\frac{\frac{\frac{1}{F}}{F} - 1}{\sin B} - \frac{x \cdot 1}{\tan B}\\ \mathbf{elif}\;F \le 1.370399360362204449783393619439938931865 \cdot 10^{85}:\\ \;\;\;\;\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)}} - \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 -2496357.5085318577475845813751220703125:\\
\;\;\;\;\frac{\frac{\frac{1}{F}}{F} - 1}{\sin B} - \frac{x \cdot 1}{\tan B}\\

\mathbf{elif}\;F \le 1.370399360362204449783393619439938931865 \cdot 10^{85}:\\
\;\;\;\;\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)}} - \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 r50519 = x;
        double r50520 = 1.0;
        double r50521 = B;
        double r50522 = tan(r50521);
        double r50523 = r50520 / r50522;
        double r50524 = r50519 * r50523;
        double r50525 = -r50524;
        double r50526 = F;
        double r50527 = sin(r50521);
        double r50528 = r50526 / r50527;
        double r50529 = r50526 * r50526;
        double r50530 = 2.0;
        double r50531 = r50529 + r50530;
        double r50532 = r50530 * r50519;
        double r50533 = r50531 + r50532;
        double r50534 = r50520 / r50530;
        double r50535 = -r50534;
        double r50536 = pow(r50533, r50535);
        double r50537 = r50528 * r50536;
        double r50538 = r50525 + r50537;
        return r50538;
}

double f(double F, double B, double x) {
        double r50539 = F;
        double r50540 = -2496357.5085318577;
        bool r50541 = r50539 <= r50540;
        double r50542 = 1.0;
        double r50543 = r50542 / r50539;
        double r50544 = r50543 / r50539;
        double r50545 = 1.0;
        double r50546 = r50544 - r50545;
        double r50547 = B;
        double r50548 = sin(r50547);
        double r50549 = r50546 / r50548;
        double r50550 = x;
        double r50551 = r50550 * r50542;
        double r50552 = tan(r50547);
        double r50553 = r50551 / r50552;
        double r50554 = r50549 - r50553;
        double r50555 = 1.3703993603622044e+85;
        bool r50556 = r50539 <= r50555;
        double r50557 = r50539 * r50539;
        double r50558 = 2.0;
        double r50559 = r50557 + r50558;
        double r50560 = r50558 * r50550;
        double r50561 = r50559 + r50560;
        double r50562 = 0.0;
        double r50563 = pow(r50561, r50562);
        double r50564 = r50539 * r50563;
        double r50565 = r50542 / r50558;
        double r50566 = pow(r50561, r50565);
        double r50567 = r50548 * r50566;
        double r50568 = r50564 / r50567;
        double r50569 = r50568 - r50553;
        double r50570 = r50545 / r50548;
        double r50571 = 2.0;
        double r50572 = pow(r50539, r50571);
        double r50573 = r50548 * r50572;
        double r50574 = r50545 / r50573;
        double r50575 = r50542 * r50574;
        double r50576 = r50570 - r50575;
        double r50577 = r50576 - r50553;
        double r50578 = r50556 ? r50569 : r50577;
        double r50579 = r50541 ? r50554 : r50578;
        return r50579;
}

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

    1. Initial program 26.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. Simplified26.3

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

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

      \[\leadsto \frac{F \cdot {\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}}\]
    7. Taylor expanded around -inf 0.2

      \[\leadsto \frac{\color{blue}{1 \cdot \frac{1}{{F}^{2}} - 1}}{\sin B} - \frac{x \cdot 1}{\tan B}\]
    8. Simplified0.2

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

    if -2496357.5085318577 < F < 1.3703993603622044e+85

    1. Initial program 0.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. Simplified0.7

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

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

      \[\leadsto \frac{F \cdot {\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}}\]
    7. Using strategy rm
    8. Applied neg-sub00.3

      \[\leadsto \frac{F \cdot {\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}\]
    9. Applied pow-sub0.3

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

      \[\leadsto \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} - \frac{x \cdot 1}{\tan B}\]
    11. Applied associate-/l/0.3

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

    if 1.3703993603622044e+85 < F

    1. Initial program 33.0

      \[\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. Simplified33.0

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

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

      \[\leadsto \frac{F \cdot {\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}}\]
    7. 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 -2496357.5085318577475845813751220703125:\\ \;\;\;\;\frac{\frac{\frac{1}{F}}{F} - 1}{\sin B} - \frac{x \cdot 1}{\tan B}\\ \mathbf{elif}\;F \le 1.370399360362204449783393619439938931865 \cdot 10^{85}:\\ \;\;\;\;\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)}} - \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 2019298 
(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))))))