Average Error: 13.5 → 0.2
Time: 51.3s
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 -6.519456150228116 \cdot 10^{+18}:\\ \;\;\;\;\left(\frac{1}{\sin B \cdot \left(F \cdot F\right)} - \frac{1}{\sin B}\right) - \frac{x}{\tan B}\\ \mathbf{elif}\;F \le 15215.487136152646:\\ \;\;\;\;\left(F \cdot {\left(2 + \left(F \cdot F + x \cdot 2\right)\right)}^{\frac{-1}{2}}\right) \cdot \frac{1}{\sin B} - \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 -6.519456150228116 \cdot 10^{+18}:\\
\;\;\;\;\left(\frac{1}{\sin B \cdot \left(F \cdot F\right)} - \frac{1}{\sin B}\right) - \frac{x}{\tan B}\\

\mathbf{elif}\;F \le 15215.487136152646:\\
\;\;\;\;\left(F \cdot {\left(2 + \left(F \cdot F + x \cdot 2\right)\right)}^{\frac{-1}{2}}\right) \cdot \frac{1}{\sin B} - \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 r1288714 = x;
        double r1288715 = 1.0;
        double r1288716 = B;
        double r1288717 = tan(r1288716);
        double r1288718 = r1288715 / r1288717;
        double r1288719 = r1288714 * r1288718;
        double r1288720 = -r1288719;
        double r1288721 = F;
        double r1288722 = sin(r1288716);
        double r1288723 = r1288721 / r1288722;
        double r1288724 = r1288721 * r1288721;
        double r1288725 = 2.0;
        double r1288726 = r1288724 + r1288725;
        double r1288727 = r1288725 * r1288714;
        double r1288728 = r1288726 + r1288727;
        double r1288729 = r1288715 / r1288725;
        double r1288730 = -r1288729;
        double r1288731 = pow(r1288728, r1288730);
        double r1288732 = r1288723 * r1288731;
        double r1288733 = r1288720 + r1288732;
        return r1288733;
}

double f(double F, double B, double x) {
        double r1288734 = F;
        double r1288735 = -6.519456150228116e+18;
        bool r1288736 = r1288734 <= r1288735;
        double r1288737 = 1.0;
        double r1288738 = B;
        double r1288739 = sin(r1288738);
        double r1288740 = r1288734 * r1288734;
        double r1288741 = r1288739 * r1288740;
        double r1288742 = r1288737 / r1288741;
        double r1288743 = r1288737 / r1288739;
        double r1288744 = r1288742 - r1288743;
        double r1288745 = x;
        double r1288746 = tan(r1288738);
        double r1288747 = r1288745 / r1288746;
        double r1288748 = r1288744 - r1288747;
        double r1288749 = 15215.487136152646;
        bool r1288750 = r1288734 <= r1288749;
        double r1288751 = 2.0;
        double r1288752 = r1288745 * r1288751;
        double r1288753 = r1288740 + r1288752;
        double r1288754 = r1288751 + r1288753;
        double r1288755 = -0.5;
        double r1288756 = pow(r1288754, r1288755);
        double r1288757 = r1288734 * r1288756;
        double r1288758 = r1288757 * r1288743;
        double r1288759 = r1288758 - r1288747;
        double r1288760 = r1288743 - r1288742;
        double r1288761 = r1288760 - r1288747;
        double r1288762 = r1288750 ? r1288759 : r1288761;
        double r1288763 = r1288736 ? r1288748 : r1288762;
        return r1288763;
}

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 < -6.519456150228116e+18

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

      \[\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. 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}\]
    4. Simplified0.2

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

    if -6.519456150228116e+18 < F < 15215.487136152646

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

      \[\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 *-un-lft-identity0.3

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

      \[\leadsto \frac{\color{blue}{{1}^{\frac{-1}{2}} \cdot {\left(\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-frac0.3

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

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

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

    if 15215.487136152646 < F

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

      \[\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. 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}\]
    4. 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 -6.519456150228116 \cdot 10^{+18}:\\ \;\;\;\;\left(\frac{1}{\sin B \cdot \left(F \cdot F\right)} - \frac{1}{\sin B}\right) - \frac{x}{\tan B}\\ \mathbf{elif}\;F \le 15215.487136152646:\\ \;\;\;\;\left(F \cdot {\left(2 + \left(F \cdot F + x \cdot 2\right)\right)}^{\frac{-1}{2}}\right) \cdot \frac{1}{\sin B} - \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 2019155 
(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))))))