Average Error: 13.6 → 0.2
Time: 16.6s
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.392922525369412338376935562155274877622 \cdot 10^{83}:\\ \;\;\;\;\left(-\frac{x \cdot 1}{\tan B}\right) + \left(1 \cdot \frac{1}{\sin B \cdot {F}^{2}} - \frac{1}{\sin B}\right)\\ \mathbf{elif}\;F \le 2.466808584585446080702427287374767981034 \cdot 10^{51}:\\ \;\;\;\;\left(-\frac{x \cdot 1}{\tan B}\right) + F \cdot \frac{{\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}}{\sin B}\\ \mathbf{else}:\\ \;\;\;\;\left(-\frac{x \cdot 1}{\tan B}\right) + \frac{1 - \frac{\frac{1}{F}}{F}}{\sin 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.392922525369412338376935562155274877622 \cdot 10^{83}:\\
\;\;\;\;\left(-\frac{x \cdot 1}{\tan B}\right) + \left(1 \cdot \frac{1}{\sin B \cdot {F}^{2}} - \frac{1}{\sin B}\right)\\

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

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

\end{array}
double f(double F, double B, double x) {
        double r53315 = x;
        double r53316 = 1.0;
        double r53317 = B;
        double r53318 = tan(r53317);
        double r53319 = r53316 / r53318;
        double r53320 = r53315 * r53319;
        double r53321 = -r53320;
        double r53322 = F;
        double r53323 = sin(r53317);
        double r53324 = r53322 / r53323;
        double r53325 = r53322 * r53322;
        double r53326 = 2.0;
        double r53327 = r53325 + r53326;
        double r53328 = r53326 * r53315;
        double r53329 = r53327 + r53328;
        double r53330 = r53316 / r53326;
        double r53331 = -r53330;
        double r53332 = pow(r53329, r53331);
        double r53333 = r53324 * r53332;
        double r53334 = r53321 + r53333;
        return r53334;
}

double f(double F, double B, double x) {
        double r53335 = F;
        double r53336 = -1.3929225253694123e+83;
        bool r53337 = r53335 <= r53336;
        double r53338 = x;
        double r53339 = 1.0;
        double r53340 = r53338 * r53339;
        double r53341 = B;
        double r53342 = tan(r53341);
        double r53343 = r53340 / r53342;
        double r53344 = -r53343;
        double r53345 = 1.0;
        double r53346 = sin(r53341);
        double r53347 = 2.0;
        double r53348 = pow(r53335, r53347);
        double r53349 = r53346 * r53348;
        double r53350 = r53345 / r53349;
        double r53351 = r53339 * r53350;
        double r53352 = r53345 / r53346;
        double r53353 = r53351 - r53352;
        double r53354 = r53344 + r53353;
        double r53355 = 2.466808584585446e+51;
        bool r53356 = r53335 <= r53355;
        double r53357 = r53335 * r53335;
        double r53358 = 2.0;
        double r53359 = r53357 + r53358;
        double r53360 = r53358 * r53338;
        double r53361 = r53359 + r53360;
        double r53362 = r53339 / r53358;
        double r53363 = -r53362;
        double r53364 = pow(r53361, r53363);
        double r53365 = r53364 / r53346;
        double r53366 = r53335 * r53365;
        double r53367 = r53344 + r53366;
        double r53368 = r53339 / r53335;
        double r53369 = r53368 / r53335;
        double r53370 = r53345 - r53369;
        double r53371 = r53370 / r53346;
        double r53372 = r53344 + r53371;
        double r53373 = r53356 ? r53367 : r53372;
        double r53374 = r53337 ? r53354 : r53373;
        return r53374;
}

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.3929225253694123e+83

    1. Initial program 32.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. Using strategy rm
    3. Applied associate-*l/26.2

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

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

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

    if -1.3929225253694123e+83 < F < 2.466808584585446e+51

    1. Initial program 0.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. Using strategy rm
    3. Applied associate-*l/0.4

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

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

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

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

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

    if 2.466808584585446e+51 < F

    1. Initial program 27.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 associate-*l/21.8

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

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

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

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

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

Reproduce

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