Average Error: 13.9 → 0.2
Time: 31.5s
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 -58754817260598526291738624:\\ \;\;\;\;\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 2173295.4413889716379344463348388671875:\\ \;\;\;\;\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) - \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 -58754817260598526291738624:\\
\;\;\;\;\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 2173295.4413889716379344463348388671875:\\
\;\;\;\;\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) - \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 r46205 = x;
        double r46206 = 1.0;
        double r46207 = B;
        double r46208 = tan(r46207);
        double r46209 = r46206 / r46208;
        double r46210 = r46205 * r46209;
        double r46211 = -r46210;
        double r46212 = F;
        double r46213 = sin(r46207);
        double r46214 = r46212 / r46213;
        double r46215 = r46212 * r46212;
        double r46216 = 2.0;
        double r46217 = r46215 + r46216;
        double r46218 = r46216 * r46205;
        double r46219 = r46217 + r46218;
        double r46220 = r46206 / r46216;
        double r46221 = -r46220;
        double r46222 = pow(r46219, r46221);
        double r46223 = r46214 * r46222;
        double r46224 = r46211 + r46223;
        return r46224;
}

double f(double F, double B, double x) {
        double r46225 = F;
        double r46226 = -5.875481726059853e+25;
        bool r46227 = r46225 <= r46226;
        double r46228 = 1.0;
        double r46229 = 1.0;
        double r46230 = B;
        double r46231 = sin(r46230);
        double r46232 = 2.0;
        double r46233 = pow(r46225, r46232);
        double r46234 = r46231 * r46233;
        double r46235 = r46229 / r46234;
        double r46236 = r46228 * r46235;
        double r46237 = r46229 / r46231;
        double r46238 = r46236 - r46237;
        double r46239 = x;
        double r46240 = r46239 * r46228;
        double r46241 = tan(r46230);
        double r46242 = r46240 / r46241;
        double r46243 = r46238 - r46242;
        double r46244 = 2173295.4413889716;
        bool r46245 = r46225 <= r46244;
        double r46246 = r46225 / r46231;
        double r46247 = r46225 * r46225;
        double r46248 = 2.0;
        double r46249 = r46247 + r46248;
        double r46250 = r46248 * r46239;
        double r46251 = r46249 + r46250;
        double r46252 = sqrt(r46251);
        double r46253 = r46228 / r46248;
        double r46254 = -r46253;
        double r46255 = pow(r46252, r46254);
        double r46256 = r46255 * r46255;
        double r46257 = r46246 * r46256;
        double r46258 = r46257 - r46242;
        double r46259 = r46237 - r46236;
        double r46260 = r46259 - r46242;
        double r46261 = r46245 ? r46258 : r46260;
        double r46262 = r46227 ? r46243 : r46261;
        return r46262;
}

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 < -5.875481726059853e+25

    1. Initial program 26.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. Simplified26.9

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

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

      \[\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 -5.875481726059853e+25 < F < 2173295.4413889716

    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.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-*r/0.3

      \[\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 add-sqr-sqrt0.3

      \[\leadsto \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)} - \frac{x \cdot 1}{\tan B}\]
    7. Applied unpow-prod-down0.3

      \[\leadsto \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)} - \frac{x \cdot 1}{\tan B}\]

    if 2173295.4413889716 < F

    1. Initial program 25.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. Simplified25.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/25.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 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 -58754817260598526291738624:\\ \;\;\;\;\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 2173295.4413889716379344463348388671875:\\ \;\;\;\;\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) - \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 2019291 
(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))))))