Average Error: 13.5 → 0.2
Time: 1.2m
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 -3089525351529144.5:\\ \;\;\;\;\frac{\frac{1}{F \cdot F} - 1}{\sin B} - \frac{x}{\tan B}\\ \mathbf{elif}\;F \le 14454.235416553534:\\ \;\;\;\;\frac{F \cdot \sqrt[3]{{\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\frac{-1}{2}} \cdot \left({\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\frac{-1}{2}} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\frac{-1}{2}}\right)}}{\sin B} - \frac{x}{\tan B}\\ \mathbf{else}:\\ \;\;\;\;\frac{1 - \frac{1}{F \cdot F}}{\sin B} - \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 -3089525351529144.5:\\
\;\;\;\;\frac{\frac{1}{F \cdot F} - 1}{\sin B} - \frac{x}{\tan B}\\

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

\mathbf{else}:\\
\;\;\;\;\frac{1 - \frac{1}{F \cdot F}}{\sin B} - \frac{x}{\tan B}\\

\end{array}
double f(double F, double B, double x) {
        double r3981059 = x;
        double r3981060 = 1.0;
        double r3981061 = B;
        double r3981062 = tan(r3981061);
        double r3981063 = r3981060 / r3981062;
        double r3981064 = r3981059 * r3981063;
        double r3981065 = -r3981064;
        double r3981066 = F;
        double r3981067 = sin(r3981061);
        double r3981068 = r3981066 / r3981067;
        double r3981069 = r3981066 * r3981066;
        double r3981070 = 2.0;
        double r3981071 = r3981069 + r3981070;
        double r3981072 = r3981070 * r3981059;
        double r3981073 = r3981071 + r3981072;
        double r3981074 = r3981060 / r3981070;
        double r3981075 = -r3981074;
        double r3981076 = pow(r3981073, r3981075);
        double r3981077 = r3981068 * r3981076;
        double r3981078 = r3981065 + r3981077;
        return r3981078;
}

double f(double F, double B, double x) {
        double r3981079 = F;
        double r3981080 = -3089525351529144.5;
        bool r3981081 = r3981079 <= r3981080;
        double r3981082 = 1.0;
        double r3981083 = r3981079 * r3981079;
        double r3981084 = r3981082 / r3981083;
        double r3981085 = r3981084 - r3981082;
        double r3981086 = B;
        double r3981087 = sin(r3981086);
        double r3981088 = r3981085 / r3981087;
        double r3981089 = x;
        double r3981090 = tan(r3981086);
        double r3981091 = r3981089 / r3981090;
        double r3981092 = r3981088 - r3981091;
        double r3981093 = 14454.235416553534;
        bool r3981094 = r3981079 <= r3981093;
        double r3981095 = 2.0;
        double r3981096 = r3981083 + r3981095;
        double r3981097 = r3981095 * r3981089;
        double r3981098 = r3981096 + r3981097;
        double r3981099 = -0.5;
        double r3981100 = pow(r3981098, r3981099);
        double r3981101 = r3981100 * r3981100;
        double r3981102 = r3981100 * r3981101;
        double r3981103 = cbrt(r3981102);
        double r3981104 = r3981079 * r3981103;
        double r3981105 = r3981104 / r3981087;
        double r3981106 = r3981105 - r3981091;
        double r3981107 = r3981082 - r3981084;
        double r3981108 = r3981107 / r3981087;
        double r3981109 = r3981108 - r3981091;
        double r3981110 = r3981094 ? r3981106 : r3981109;
        double r3981111 = r3981081 ? r3981092 : r3981110;
        return r3981111;
}

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

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

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

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

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

    if -3089525351529144.5 < F < 14454.235416553534

    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) + 2 \cdot x\right)}^{\frac{-1}{2}} \cdot F}{\sin B} - \frac{x}{\tan B}}\]
    3. Using strategy rm
    4. Applied add-cbrt-cube0.3

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

    if 14454.235416553534 < F

    1. Initial program 24.8

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

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

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

      \[\leadsto \frac{\color{blue}{1 - \frac{1}{F \cdot F}}}{\sin B} - \frac{x}{\tan B}\]
  3. Recombined 3 regimes into one program.
  4. Final simplification0.2

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

Reproduce

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