Average Error: 13.6 → 0.5
Time: 12.1s
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 -7.195943820391100817093222758978625856681 \cdot 10^{162}:\\ \;\;\;\;\frac{1}{{\left(\frac{1}{{-1}^{1}}\right)}^{1} \cdot \sin B} - \frac{x \cdot 1}{\tan B}\\ \mathbf{elif}\;F \le 1.228239713656369469284411208624973497026 \cdot 10^{151}:\\ \;\;\;\;\frac{\frac{1}{\sin B}}{\frac{{\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\frac{1}{2}\right)}}{F}} - \frac{x \cdot 1}{\tan B}\\ \mathbf{else}:\\ \;\;\;\;\frac{F}{1 \cdot \left(\sin B \cdot {\left(\frac{1}{{F}^{1}}\right)}^{1}\right) + \sin B \cdot F} - x \cdot \frac{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 -7.195943820391100817093222758978625856681 \cdot 10^{162}:\\
\;\;\;\;\frac{1}{{\left(\frac{1}{{-1}^{1}}\right)}^{1} \cdot \sin B} - \frac{x \cdot 1}{\tan B}\\

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

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

\end{array}
double f(double F, double B, double x) {
        double r38327 = x;
        double r38328 = 1.0;
        double r38329 = B;
        double r38330 = tan(r38329);
        double r38331 = r38328 / r38330;
        double r38332 = r38327 * r38331;
        double r38333 = -r38332;
        double r38334 = F;
        double r38335 = sin(r38329);
        double r38336 = r38334 / r38335;
        double r38337 = r38334 * r38334;
        double r38338 = 2.0;
        double r38339 = r38337 + r38338;
        double r38340 = r38338 * r38327;
        double r38341 = r38339 + r38340;
        double r38342 = r38328 / r38338;
        double r38343 = -r38342;
        double r38344 = pow(r38341, r38343);
        double r38345 = r38336 * r38344;
        double r38346 = r38333 + r38345;
        return r38346;
}

double f(double F, double B, double x) {
        double r38347 = F;
        double r38348 = -7.195943820391101e+162;
        bool r38349 = r38347 <= r38348;
        double r38350 = 1.0;
        double r38351 = -1.0;
        double r38352 = 1.0;
        double r38353 = pow(r38351, r38352);
        double r38354 = r38350 / r38353;
        double r38355 = pow(r38354, r38352);
        double r38356 = B;
        double r38357 = sin(r38356);
        double r38358 = r38355 * r38357;
        double r38359 = r38350 / r38358;
        double r38360 = x;
        double r38361 = r38360 * r38352;
        double r38362 = tan(r38356);
        double r38363 = r38361 / r38362;
        double r38364 = r38359 - r38363;
        double r38365 = 1.2282397136563695e+151;
        bool r38366 = r38347 <= r38365;
        double r38367 = r38350 / r38357;
        double r38368 = r38347 * r38347;
        double r38369 = 2.0;
        double r38370 = r38368 + r38369;
        double r38371 = r38369 * r38360;
        double r38372 = r38370 + r38371;
        double r38373 = r38352 / r38369;
        double r38374 = pow(r38372, r38373);
        double r38375 = r38374 / r38347;
        double r38376 = r38367 / r38375;
        double r38377 = r38376 - r38363;
        double r38378 = pow(r38347, r38352);
        double r38379 = r38350 / r38378;
        double r38380 = pow(r38379, r38352);
        double r38381 = r38357 * r38380;
        double r38382 = r38352 * r38381;
        double r38383 = r38357 * r38347;
        double r38384 = r38382 + r38383;
        double r38385 = r38347 / r38384;
        double r38386 = r38352 / r38362;
        double r38387 = r38360 * r38386;
        double r38388 = r38385 - r38387;
        double r38389 = r38366 ? r38377 : r38388;
        double r38390 = r38349 ? r38364 : r38389;
        return r38390;
}

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 < -7.195943820391101e+162

    1. Initial program 39.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. Simplified39.7

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

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

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

      \[\leadsto \frac{\color{blue}{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}\]
    7. Using strategy rm
    8. Applied associate-*r/34.1

      \[\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}}\]
    9. Using strategy rm
    10. Applied clear-num34.1

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

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

    if -7.195943820391101e+162 < F < 1.2282397136563695e+151

    1. Initial program 2.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. Simplified2.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 pow-neg2.8

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

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

      \[\leadsto \frac{\color{blue}{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}\]
    7. Using strategy rm
    8. Applied associate-*r/0.6

      \[\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}}\]
    9. Using strategy rm
    10. Applied clear-num0.6

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

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

      \[\leadsto \frac{1}{\color{blue}{\frac{\sin B}{1} \cdot \frac{{\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\frac{1}{2}\right)}}{F}}} - \frac{x \cdot 1}{\tan B}\]
    14. Applied associate-/r*0.6

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

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

    if 1.2282397136563695e+151 < F

    1. Initial program 40.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. Simplified40.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 pow-neg40.9

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

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

      \[\leadsto \frac{\color{blue}{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}\]
    7. Taylor expanded around inf 0.3

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

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

Reproduce

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