Average Error: 13.9 → 0.2
Time: 13.2s
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 -4.5418304184155408 \cdot 10^{42}:\\ \;\;\;\;\frac{\frac{\frac{1}{F}}{F} - 1}{\sin B} - \frac{x \cdot 1}{\tan B}\\ \mathbf{elif}\;F \le 25978.9918088808517:\\ \;\;\;\;F \cdot \frac{{\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}}{\sin B} - \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 -4.5418304184155408 \cdot 10^{42}:\\
\;\;\;\;\frac{\frac{\frac{1}{F}}{F} - 1}{\sin B} - \frac{x \cdot 1}{\tan B}\\

\mathbf{elif}\;F \le 25978.9918088808517:\\
\;\;\;\;F \cdot \frac{{\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}}{\sin B} - \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 r44726 = x;
        double r44727 = 1.0;
        double r44728 = B;
        double r44729 = tan(r44728);
        double r44730 = r44727 / r44729;
        double r44731 = r44726 * r44730;
        double r44732 = -r44731;
        double r44733 = F;
        double r44734 = sin(r44728);
        double r44735 = r44733 / r44734;
        double r44736 = r44733 * r44733;
        double r44737 = 2.0;
        double r44738 = r44736 + r44737;
        double r44739 = r44737 * r44726;
        double r44740 = r44738 + r44739;
        double r44741 = r44727 / r44737;
        double r44742 = -r44741;
        double r44743 = pow(r44740, r44742);
        double r44744 = r44735 * r44743;
        double r44745 = r44732 + r44744;
        return r44745;
}

double f(double F, double B, double x) {
        double r44746 = F;
        double r44747 = -4.541830418415541e+42;
        bool r44748 = r44746 <= r44747;
        double r44749 = 1.0;
        double r44750 = r44749 / r44746;
        double r44751 = r44750 / r44746;
        double r44752 = 1.0;
        double r44753 = r44751 - r44752;
        double r44754 = B;
        double r44755 = sin(r44754);
        double r44756 = r44753 / r44755;
        double r44757 = x;
        double r44758 = r44757 * r44749;
        double r44759 = tan(r44754);
        double r44760 = r44758 / r44759;
        double r44761 = r44756 - r44760;
        double r44762 = 25978.99180888085;
        bool r44763 = r44746 <= r44762;
        double r44764 = r44746 * r44746;
        double r44765 = 2.0;
        double r44766 = r44764 + r44765;
        double r44767 = r44765 * r44757;
        double r44768 = r44766 + r44767;
        double r44769 = r44749 / r44765;
        double r44770 = -r44769;
        double r44771 = pow(r44768, r44770);
        double r44772 = r44771 / r44755;
        double r44773 = r44746 * r44772;
        double r44774 = r44773 - r44760;
        double r44775 = r44752 / r44755;
        double r44776 = 2.0;
        double r44777 = pow(r44746, r44776);
        double r44778 = r44755 * r44777;
        double r44779 = r44752 / r44778;
        double r44780 = r44749 * r44779;
        double r44781 = r44775 - r44780;
        double r44782 = r44781 - r44760;
        double r44783 = r44763 ? r44774 : r44782;
        double r44784 = r44748 ? r44761 : r44783;
        return r44784;
}

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 < -4.541830418415541e+42

    1. Initial program 28.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. Simplified28.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/22.8

      \[\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/22.7

      \[\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 \frac{\color{blue}{1 \cdot \frac{1}{{F}^{2}} - 1}}{\sin B} - \frac{x \cdot 1}{\tan B}\]
    8. Simplified0.1

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

    if -4.541830418415541e+42 < F < 25978.99180888085

    1. Initial program 0.5

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

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

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

      \[\leadsto \color{blue}{\frac{F}{1} \cdot \frac{{\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. Simplified0.3

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

    if 25978.99180888085 < F

    1. Initial program 25.2

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

      \[\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/19.0

      \[\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/19.0

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

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

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

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