Average Error: 13.3 → 0.3
Time: 19.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 -4.060657734187693706877879794747009471683 \cdot 10^{158}:\\ \;\;\;\;\frac{-1 + \frac{1}{F \cdot F}}{\sin B} - \frac{x \cdot 1}{\tan B}\\ \mathbf{elif}\;F \le 1344.095327323162791799404658377170562744:\\ \;\;\;\;\frac{\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}\\ \mathbf{else}:\\ \;\;\;\;\left(\frac{1}{\sin B} - \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.060657734187693706877879794747009471683 \cdot 10^{158}:\\
\;\;\;\;\frac{-1 + \frac{1}{F \cdot F}}{\sin B} - \frac{x \cdot 1}{\tan B}\\

\mathbf{elif}\;F \le 1344.095327323162791799404658377170562744:\\
\;\;\;\;\frac{\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}\\

\mathbf{else}:\\
\;\;\;\;\left(\frac{1}{\sin B} - \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 r45128 = x;
        double r45129 = 1.0;
        double r45130 = B;
        double r45131 = tan(r45130);
        double r45132 = r45129 / r45131;
        double r45133 = r45128 * r45132;
        double r45134 = -r45133;
        double r45135 = F;
        double r45136 = sin(r45130);
        double r45137 = r45135 / r45136;
        double r45138 = r45135 * r45135;
        double r45139 = 2.0;
        double r45140 = r45138 + r45139;
        double r45141 = r45139 * r45128;
        double r45142 = r45140 + r45141;
        double r45143 = r45129 / r45139;
        double r45144 = -r45143;
        double r45145 = pow(r45142, r45144);
        double r45146 = r45137 * r45145;
        double r45147 = r45134 + r45146;
        return r45147;
}

double f(double F, double B, double x) {
        double r45148 = F;
        double r45149 = -4.0606577341876937e+158;
        bool r45150 = r45148 <= r45149;
        double r45151 = -1.0;
        double r45152 = 1.0;
        double r45153 = r45148 * r45148;
        double r45154 = r45152 / r45153;
        double r45155 = r45151 + r45154;
        double r45156 = B;
        double r45157 = sin(r45156);
        double r45158 = r45155 / r45157;
        double r45159 = x;
        double r45160 = r45159 * r45152;
        double r45161 = tan(r45156);
        double r45162 = r45160 / r45161;
        double r45163 = r45158 - r45162;
        double r45164 = 1344.0953273231628;
        bool r45165 = r45148 <= r45164;
        double r45166 = 2.0;
        double r45167 = r45153 + r45166;
        double r45168 = r45166 * r45159;
        double r45169 = r45167 + r45168;
        double r45170 = r45152 / r45166;
        double r45171 = pow(r45169, r45170);
        double r45172 = r45148 / r45171;
        double r45173 = r45172 / r45157;
        double r45174 = r45173 - r45162;
        double r45175 = 1.0;
        double r45176 = r45175 / r45157;
        double r45177 = 2.0;
        double r45178 = pow(r45148, r45177);
        double r45179 = r45157 * r45178;
        double r45180 = r45152 / r45179;
        double r45181 = r45176 - r45180;
        double r45182 = r45181 - r45162;
        double r45183 = r45165 ? r45174 : r45182;
        double r45184 = r45150 ? r45163 : r45183;
        return r45184;
}

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.0606577341876937e+158

    1. Initial program 41.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. Simplified41.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-*l/36.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/35.9

      \[\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}{-1 + \frac{1}{F \cdot F}}}{\sin B} - \frac{x \cdot 1}{\tan B}\]

    if -4.0606577341876937e+158 < F < 1344.0953273231628

    1. Initial program 1.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. Simplified1.8

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

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

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

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

      \[\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}\]

    if 1344.0953273231628 < F

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;F \le -4.060657734187693706877879794747009471683 \cdot 10^{158}:\\ \;\;\;\;\frac{-1 + \frac{1}{F \cdot F}}{\sin B} - \frac{x \cdot 1}{\tan B}\\ \mathbf{elif}\;F \le 1344.095327323162791799404658377170562744:\\ \;\;\;\;\frac{\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}\\ \mathbf{else}:\\ \;\;\;\;\left(\frac{1}{\sin B} - \frac{1}{\sin B \cdot {F}^{2}}\right) - \frac{x \cdot 1}{\tan B}\\ \end{array}\]

Reproduce

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