Average Error: 13.6 → 0.3
Time: 54.2s
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.352157093766344 \cdot 10^{+114}:\\ \;\;\;\;\left(\frac{\frac{\frac{1}{F}}{F}}{\sin B} - \frac{1}{\sin B}\right) - \frac{\cos B \cdot x}{\sin B}\\ \mathbf{elif}\;F \le 641096.8187916952:\\ \;\;\;\;F \cdot \frac{{\left(\sqrt{\left(x \cdot 2 + F \cdot F\right) + 2}\right)}^{\frac{-1}{2}}}{\frac{\sin B}{{\left(\sqrt{\left(x \cdot 2 + F \cdot F\right) + 2}\right)}^{\frac{-1}{2}}}} - \frac{\cos B \cdot x}{\sin B}\\ \mathbf{else}:\\ \;\;\;\;\left(\frac{1}{\sin B} - \frac{\frac{\frac{1}{F}}{F}}{\sin B}\right) - \frac{\cos B \cdot x}{\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 -7.352157093766344 \cdot 10^{+114}:\\
\;\;\;\;\left(\frac{\frac{\frac{1}{F}}{F}}{\sin B} - \frac{1}{\sin B}\right) - \frac{\cos B \cdot x}{\sin B}\\

\mathbf{elif}\;F \le 641096.8187916952:\\
\;\;\;\;F \cdot \frac{{\left(\sqrt{\left(x \cdot 2 + F \cdot F\right) + 2}\right)}^{\frac{-1}{2}}}{\frac{\sin B}{{\left(\sqrt{\left(x \cdot 2 + F \cdot F\right) + 2}\right)}^{\frac{-1}{2}}}} - \frac{\cos B \cdot x}{\sin B}\\

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

\end{array}
double f(double F, double B, double x) {
        double r3357292 = x;
        double r3357293 = 1.0;
        double r3357294 = B;
        double r3357295 = tan(r3357294);
        double r3357296 = r3357293 / r3357295;
        double r3357297 = r3357292 * r3357296;
        double r3357298 = -r3357297;
        double r3357299 = F;
        double r3357300 = sin(r3357294);
        double r3357301 = r3357299 / r3357300;
        double r3357302 = r3357299 * r3357299;
        double r3357303 = 2.0;
        double r3357304 = r3357302 + r3357303;
        double r3357305 = r3357303 * r3357292;
        double r3357306 = r3357304 + r3357305;
        double r3357307 = r3357293 / r3357303;
        double r3357308 = -r3357307;
        double r3357309 = pow(r3357306, r3357308);
        double r3357310 = r3357301 * r3357309;
        double r3357311 = r3357298 + r3357310;
        return r3357311;
}

double f(double F, double B, double x) {
        double r3357312 = F;
        double r3357313 = -7.352157093766344e+114;
        bool r3357314 = r3357312 <= r3357313;
        double r3357315 = 1.0;
        double r3357316 = r3357315 / r3357312;
        double r3357317 = r3357316 / r3357312;
        double r3357318 = B;
        double r3357319 = sin(r3357318);
        double r3357320 = r3357317 / r3357319;
        double r3357321 = r3357315 / r3357319;
        double r3357322 = r3357320 - r3357321;
        double r3357323 = cos(r3357318);
        double r3357324 = x;
        double r3357325 = r3357323 * r3357324;
        double r3357326 = r3357325 / r3357319;
        double r3357327 = r3357322 - r3357326;
        double r3357328 = 641096.8187916952;
        bool r3357329 = r3357312 <= r3357328;
        double r3357330 = 2.0;
        double r3357331 = r3357324 * r3357330;
        double r3357332 = r3357312 * r3357312;
        double r3357333 = r3357331 + r3357332;
        double r3357334 = r3357333 + r3357330;
        double r3357335 = sqrt(r3357334);
        double r3357336 = -0.5;
        double r3357337 = pow(r3357335, r3357336);
        double r3357338 = r3357319 / r3357337;
        double r3357339 = r3357337 / r3357338;
        double r3357340 = r3357312 * r3357339;
        double r3357341 = r3357340 - r3357326;
        double r3357342 = r3357321 - r3357320;
        double r3357343 = r3357342 - r3357326;
        double r3357344 = r3357329 ? r3357341 : r3357343;
        double r3357345 = r3357314 ? r3357327 : r3357344;
        return r3357345;
}

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.352157093766344e+114

    1. Initial program 35.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. Simplified30.7

      \[\leadsto \color{blue}{\frac{{\left(2 + \left(2 \cdot x + F \cdot F\right)\right)}^{\frac{-1}{2}} \cdot F}{\sin B} - \frac{x}{\tan B}}\]
    3. Using strategy rm
    4. Applied clear-num30.7

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

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

      \[\leadsto \frac{1}{\color{blue}{1 \cdot \frac{\sin B}{{\left(2 + \left(2 \cdot x + F \cdot F\right)\right)}^{\frac{-1}{2}} \cdot F}}} - \frac{x \cdot \cos B}{\sin B}\]
    8. Applied add-sqr-sqrt30.7

      \[\leadsto \frac{\color{blue}{\sqrt{1} \cdot \sqrt{1}}}{1 \cdot \frac{\sin B}{{\left(2 + \left(2 \cdot x + F \cdot F\right)\right)}^{\frac{-1}{2}} \cdot F}} - \frac{x \cdot \cos B}{\sin B}\]
    9. Applied times-frac30.7

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

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

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

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

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

    if -7.352157093766344e+114 < F < 641096.8187916952

    1. Initial program 1.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. Simplified0.3

      \[\leadsto \color{blue}{\frac{{\left(2 + \left(2 \cdot x + F \cdot F\right)\right)}^{\frac{-1}{2}} \cdot F}{\sin B} - \frac{x}{\tan B}}\]
    3. Using strategy rm
    4. Applied clear-num0.3

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

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

      \[\leadsto \frac{1}{\color{blue}{1 \cdot \frac{\sin B}{{\left(2 + \left(2 \cdot x + F \cdot F\right)\right)}^{\frac{-1}{2}} \cdot F}}} - \frac{x \cdot \cos B}{\sin B}\]
    8. Applied add-sqr-sqrt0.3

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

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

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

      \[\leadsto 1 \cdot \color{blue}{\left(F \cdot \frac{{\left(\left(2 \cdot x + F \cdot F\right) + 2\right)}^{\frac{-1}{2}}}{\sin B}\right)} - \frac{x \cdot \cos B}{\sin B}\]
    12. Using strategy rm
    13. Applied add-sqr-sqrt0.4

      \[\leadsto 1 \cdot \left(F \cdot \frac{{\color{blue}{\left(\sqrt{\left(2 \cdot x + F \cdot F\right) + 2} \cdot \sqrt{\left(2 \cdot x + F \cdot F\right) + 2}\right)}}^{\frac{-1}{2}}}{\sin B}\right) - \frac{x \cdot \cos B}{\sin B}\]
    14. Applied unpow-prod-down0.4

      \[\leadsto 1 \cdot \left(F \cdot \frac{\color{blue}{{\left(\sqrt{\left(2 \cdot x + F \cdot F\right) + 2}\right)}^{\frac{-1}{2}} \cdot {\left(\sqrt{\left(2 \cdot x + F \cdot F\right) + 2}\right)}^{\frac{-1}{2}}}}{\sin B}\right) - \frac{x \cdot \cos B}{\sin B}\]
    15. Applied associate-/l*0.4

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

    if 641096.8187916952 < F

    1. Initial program 24.6

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

      \[\leadsto \color{blue}{\frac{{\left(2 + \left(2 \cdot x + F \cdot F\right)\right)}^{\frac{-1}{2}} \cdot F}{\sin B} - \frac{x}{\tan B}}\]
    3. Using strategy rm
    4. Applied clear-num19.3

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

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

      \[\leadsto \frac{1}{\color{blue}{1 \cdot \frac{\sin B}{{\left(2 + \left(2 \cdot x + F \cdot F\right)\right)}^{\frac{-1}{2}} \cdot F}}} - \frac{x \cdot \cos B}{\sin B}\]
    8. Applied add-sqr-sqrt19.3

      \[\leadsto \frac{\color{blue}{\sqrt{1} \cdot \sqrt{1}}}{1 \cdot \frac{\sin B}{{\left(2 + \left(2 \cdot x + F \cdot F\right)\right)}^{\frac{-1}{2}} \cdot F}} - \frac{x \cdot \cos B}{\sin B}\]
    9. Applied times-frac19.3

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

      \[\leadsto \color{blue}{1} \cdot \frac{\sqrt{1}}{\frac{\sin B}{{\left(2 + \left(2 \cdot x + F \cdot F\right)\right)}^{\frac{-1}{2}} \cdot F}} - \frac{x \cdot \cos B}{\sin B}\]
    11. Simplified19.4

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;F \le -7.352157093766344 \cdot 10^{+114}:\\ \;\;\;\;\left(\frac{\frac{\frac{1}{F}}{F}}{\sin B} - \frac{1}{\sin B}\right) - \frac{\cos B \cdot x}{\sin B}\\ \mathbf{elif}\;F \le 641096.8187916952:\\ \;\;\;\;F \cdot \frac{{\left(\sqrt{\left(x \cdot 2 + F \cdot F\right) + 2}\right)}^{\frac{-1}{2}}}{\frac{\sin B}{{\left(\sqrt{\left(x \cdot 2 + F \cdot F\right) + 2}\right)}^{\frac{-1}{2}}}} - \frac{\cos B \cdot x}{\sin B}\\ \mathbf{else}:\\ \;\;\;\;\left(\frac{1}{\sin B} - \frac{\frac{\frac{1}{F}}{F}}{\sin B}\right) - \frac{\cos B \cdot x}{\sin B}\\ \end{array}\]

Reproduce

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