Average Error: 13.8 → 0.3
Time: 12.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 -8.2736045584269209 \cdot 10^{38}:\\ \;\;\;\;\left(-\frac{x \cdot 1}{\tan B}\right) + \frac{F}{{\left(\frac{1}{{-1}^{1}}\right)}^{1} \cdot \left(\sin B \cdot F\right) + 1 \cdot \left({\left(\frac{1}{{-1}^{1} \cdot {F}^{1}}\right)}^{1} \cdot \sin B\right)}\\ \mathbf{elif}\;F \le 63011.2659022378575:\\ \;\;\;\;\left(-\frac{x \cdot 1}{\tan B}\right) + \frac{F}{\sin B \cdot \left({\left(\sqrt{\left(F \cdot F + 2\right) + 2 \cdot x}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\sqrt{\left(F \cdot F + 2\right) + 2 \cdot x}\right)}^{\left(\frac{1}{2}\right)}\right)}\\ \mathbf{else}:\\ \;\;\;\;\left(-\frac{x \cdot 1}{\tan B}\right) + \frac{F}{1 \cdot \left(\sin B \cdot {\left(\frac{1}{{F}^{1}}\right)}^{1}\right) + \sin B \cdot F}\\ \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 -8.2736045584269209 \cdot 10^{38}:\\
\;\;\;\;\left(-\frac{x \cdot 1}{\tan B}\right) + \frac{F}{{\left(\frac{1}{{-1}^{1}}\right)}^{1} \cdot \left(\sin B \cdot F\right) + 1 \cdot \left({\left(\frac{1}{{-1}^{1} \cdot {F}^{1}}\right)}^{1} \cdot \sin B\right)}\\

\mathbf{elif}\;F \le 63011.2659022378575:\\
\;\;\;\;\left(-\frac{x \cdot 1}{\tan B}\right) + \frac{F}{\sin B \cdot \left({\left(\sqrt{\left(F \cdot F + 2\right) + 2 \cdot x}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\sqrt{\left(F \cdot F + 2\right) + 2 \cdot x}\right)}^{\left(\frac{1}{2}\right)}\right)}\\

\mathbf{else}:\\
\;\;\;\;\left(-\frac{x \cdot 1}{\tan B}\right) + \frac{F}{1 \cdot \left(\sin B \cdot {\left(\frac{1}{{F}^{1}}\right)}^{1}\right) + \sin B \cdot F}\\

\end{array}
double f(double F, double B, double x) {
        double r39745 = x;
        double r39746 = 1.0;
        double r39747 = B;
        double r39748 = tan(r39747);
        double r39749 = r39746 / r39748;
        double r39750 = r39745 * r39749;
        double r39751 = -r39750;
        double r39752 = F;
        double r39753 = sin(r39747);
        double r39754 = r39752 / r39753;
        double r39755 = r39752 * r39752;
        double r39756 = 2.0;
        double r39757 = r39755 + r39756;
        double r39758 = r39756 * r39745;
        double r39759 = r39757 + r39758;
        double r39760 = r39746 / r39756;
        double r39761 = -r39760;
        double r39762 = pow(r39759, r39761);
        double r39763 = r39754 * r39762;
        double r39764 = r39751 + r39763;
        return r39764;
}

double f(double F, double B, double x) {
        double r39765 = F;
        double r39766 = -8.273604558426921e+38;
        bool r39767 = r39765 <= r39766;
        double r39768 = x;
        double r39769 = 1.0;
        double r39770 = r39768 * r39769;
        double r39771 = B;
        double r39772 = tan(r39771);
        double r39773 = r39770 / r39772;
        double r39774 = -r39773;
        double r39775 = 1.0;
        double r39776 = -1.0;
        double r39777 = pow(r39776, r39769);
        double r39778 = r39775 / r39777;
        double r39779 = pow(r39778, r39769);
        double r39780 = sin(r39771);
        double r39781 = r39780 * r39765;
        double r39782 = r39779 * r39781;
        double r39783 = pow(r39765, r39769);
        double r39784 = r39777 * r39783;
        double r39785 = r39775 / r39784;
        double r39786 = pow(r39785, r39769);
        double r39787 = r39786 * r39780;
        double r39788 = r39769 * r39787;
        double r39789 = r39782 + r39788;
        double r39790 = r39765 / r39789;
        double r39791 = r39774 + r39790;
        double r39792 = 63011.26590223786;
        bool r39793 = r39765 <= r39792;
        double r39794 = r39765 * r39765;
        double r39795 = 2.0;
        double r39796 = r39794 + r39795;
        double r39797 = r39795 * r39768;
        double r39798 = r39796 + r39797;
        double r39799 = sqrt(r39798);
        double r39800 = r39769 / r39795;
        double r39801 = pow(r39799, r39800);
        double r39802 = r39801 * r39801;
        double r39803 = r39780 * r39802;
        double r39804 = r39765 / r39803;
        double r39805 = r39774 + r39804;
        double r39806 = r39775 / r39783;
        double r39807 = pow(r39806, r39769);
        double r39808 = r39780 * r39807;
        double r39809 = r39769 * r39808;
        double r39810 = r39809 + r39781;
        double r39811 = r39765 / r39810;
        double r39812 = r39774 + r39811;
        double r39813 = r39793 ? r39805 : r39812;
        double r39814 = r39767 ? r39791 : r39813;
        return r39814;
}

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 < -8.273604558426921e+38

    1. Initial program 27.9

      \[\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 pow-neg27.9

      \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \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)}}}\]
    4. Applied frac-times21.3

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

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

      \[\leadsto \left(-\color{blue}{\frac{x \cdot 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)}}\]
    8. Taylor expanded around -inf 0.2

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

    if -8.273604558426921e+38 < F < 63011.26590223786

    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 pow-neg0.5

      \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \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)}}}\]
    4. Applied frac-times0.4

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

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

      \[\leadsto \left(-\color{blue}{\frac{x \cdot 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)}}\]
    8. Using strategy rm
    9. Applied add-sqr-sqrt0.3

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

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

    if 63011.26590223786 < 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. Using strategy rm
    3. Applied pow-neg24.7

      \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \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)}}}\]
    4. Applied frac-times19.2

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

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

      \[\leadsto \left(-\color{blue}{\frac{x \cdot 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)}}\]
    8. Taylor expanded around inf 0.2

      \[\leadsto \left(-\frac{x \cdot 1}{\tan B}\right) + \frac{F}{\color{blue}{1 \cdot \left(\sin B \cdot {\left(\frac{1}{{F}^{1}}\right)}^{1}\right) + \sin B \cdot F}}\]
  3. Recombined 3 regimes into one program.
  4. Final simplification0.3

    \[\leadsto \begin{array}{l} \mathbf{if}\;F \le -8.2736045584269209 \cdot 10^{38}:\\ \;\;\;\;\left(-\frac{x \cdot 1}{\tan B}\right) + \frac{F}{{\left(\frac{1}{{-1}^{1}}\right)}^{1} \cdot \left(\sin B \cdot F\right) + 1 \cdot \left({\left(\frac{1}{{-1}^{1} \cdot {F}^{1}}\right)}^{1} \cdot \sin B\right)}\\ \mathbf{elif}\;F \le 63011.2659022378575:\\ \;\;\;\;\left(-\frac{x \cdot 1}{\tan B}\right) + \frac{F}{\sin B \cdot \left({\left(\sqrt{\left(F \cdot F + 2\right) + 2 \cdot x}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\sqrt{\left(F \cdot F + 2\right) + 2 \cdot x}\right)}^{\left(\frac{1}{2}\right)}\right)}\\ \mathbf{else}:\\ \;\;\;\;\left(-\frac{x \cdot 1}{\tan B}\right) + \frac{F}{1 \cdot \left(\sin B \cdot {\left(\frac{1}{{F}^{1}}\right)}^{1}\right) + \sin B \cdot F}\\ \end{array}\]

Reproduce

herbie shell --seed 2020021 
(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))))))