Average Error: 13.8 → 0.7
Time: 11.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 -1.27155791236283758 \cdot 10^{49}:\\ \;\;\;\;\left(1 \cdot \frac{1}{\sin B \cdot {F}^{2}} - \frac{1}{\sin B}\right) - \frac{x \cdot 1}{\tan B}\\ \mathbf{elif}\;F \le 6.6108987237771317 \cdot 10^{-11}:\\ \;\;\;\;\frac{\frac{F}{\sin B}}{{\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 -1.27155791236283758 \cdot 10^{49}:\\
\;\;\;\;\left(1 \cdot \frac{1}{\sin B \cdot {F}^{2}} - \frac{1}{\sin B}\right) - \frac{x \cdot 1}{\tan B}\\

\mathbf{elif}\;F \le 6.6108987237771317 \cdot 10^{-11}:\\
\;\;\;\;\frac{\frac{F}{\sin B}}{{\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 r37775 = x;
        double r37776 = 1.0;
        double r37777 = B;
        double r37778 = tan(r37777);
        double r37779 = r37776 / r37778;
        double r37780 = r37775 * r37779;
        double r37781 = -r37780;
        double r37782 = F;
        double r37783 = sin(r37777);
        double r37784 = r37782 / r37783;
        double r37785 = r37782 * r37782;
        double r37786 = 2.0;
        double r37787 = r37785 + r37786;
        double r37788 = r37786 * r37775;
        double r37789 = r37787 + r37788;
        double r37790 = r37776 / r37786;
        double r37791 = -r37790;
        double r37792 = pow(r37789, r37791);
        double r37793 = r37784 * r37792;
        double r37794 = r37781 + r37793;
        return r37794;
}

double f(double F, double B, double x) {
        double r37795 = F;
        double r37796 = -1.2715579123628376e+49;
        bool r37797 = r37795 <= r37796;
        double r37798 = 1.0;
        double r37799 = 1.0;
        double r37800 = B;
        double r37801 = sin(r37800);
        double r37802 = 2.0;
        double r37803 = pow(r37795, r37802);
        double r37804 = r37801 * r37803;
        double r37805 = r37799 / r37804;
        double r37806 = r37798 * r37805;
        double r37807 = r37799 / r37801;
        double r37808 = r37806 - r37807;
        double r37809 = x;
        double r37810 = r37809 * r37798;
        double r37811 = tan(r37800);
        double r37812 = r37810 / r37811;
        double r37813 = r37808 - r37812;
        double r37814 = 6.610898723777132e-11;
        bool r37815 = r37795 <= r37814;
        double r37816 = r37795 / r37801;
        double r37817 = r37795 * r37795;
        double r37818 = 2.0;
        double r37819 = r37817 + r37818;
        double r37820 = r37818 * r37809;
        double r37821 = r37819 + r37820;
        double r37822 = r37798 / r37818;
        double r37823 = pow(r37821, r37822);
        double r37824 = r37816 / r37823;
        double r37825 = r37824 - r37812;
        double r37826 = r37807 - r37806;
        double r37827 = r37826 - r37812;
        double r37828 = r37815 ? r37825 : r37827;
        double r37829 = r37797 ? r37813 : r37828;
        return r37829;
}

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 < -1.2715579123628376e+49

    1. Initial program 28.1

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

      \[\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-*r/28.1

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

    if -1.2715579123628376e+49 < F < 6.610898723777132e-11

    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-*r/0.5

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

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

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

    if 6.610898723777132e-11 < F

    1. Initial program 24.6

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

      \[\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-*r/24.5

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;F \le -1.27155791236283758 \cdot 10^{49}:\\ \;\;\;\;\left(1 \cdot \frac{1}{\sin B \cdot {F}^{2}} - \frac{1}{\sin B}\right) - \frac{x \cdot 1}{\tan B}\\ \mathbf{elif}\;F \le 6.6108987237771317 \cdot 10^{-11}:\\ \;\;\;\;\frac{\frac{F}{\sin B}}{{\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 2020018 
(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))))))