Average Error: 13.5 → 0.3
Time: 31.9s
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.075278742403119353146230783398273202316 \cdot 10^{155}:\\ \;\;\;\;\left(-\frac{x \cdot 1}{\tan B}\right) + \frac{1}{\sin B} \cdot \frac{F}{{\left(\frac{-1}{F}\right)}^{-1} + 1 \cdot {\left(\frac{1}{{-1}^{1} \cdot {F}^{1}}\right)}^{1}}\\ \mathbf{elif}\;F \le 1.38108368975320571828530424503053905873 \cdot 10^{150}:\\ \;\;\;\;\left(-\frac{x \cdot 1}{\tan B}\right) + \frac{1}{\sin B} \cdot \frac{F}{{\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\frac{1}{2}\right)}}\\ \mathbf{else}:\\ \;\;\;\;\left(-\frac{x \cdot 1}{\tan B}\right) + \frac{F}{1 \cdot \left(\sin B \cdot {\left(\frac{1}{{F}^{1}}\right)}^{1}\right) + \sin B \cdot F}\\ \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.075278742403119353146230783398273202316 \cdot 10^{155}:\\
\;\;\;\;\left(-\frac{x \cdot 1}{\tan B}\right) + \frac{1}{\sin B} \cdot \frac{F}{{\left(\frac{-1}{F}\right)}^{-1} + 1 \cdot {\left(\frac{1}{{-1}^{1} \cdot {F}^{1}}\right)}^{1}}\\

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

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

\end{array}
double f(double F, double B, double x) {
        double r49246 = x;
        double r49247 = 1.0;
        double r49248 = B;
        double r49249 = tan(r49248);
        double r49250 = r49247 / r49249;
        double r49251 = r49246 * r49250;
        double r49252 = -r49251;
        double r49253 = F;
        double r49254 = sin(r49248);
        double r49255 = r49253 / r49254;
        double r49256 = r49253 * r49253;
        double r49257 = 2.0;
        double r49258 = r49256 + r49257;
        double r49259 = r49257 * r49246;
        double r49260 = r49258 + r49259;
        double r49261 = r49247 / r49257;
        double r49262 = -r49261;
        double r49263 = pow(r49260, r49262);
        double r49264 = r49255 * r49263;
        double r49265 = r49252 + r49264;
        return r49265;
}

double f(double F, double B, double x) {
        double r49266 = F;
        double r49267 = -4.0752787424031194e+155;
        bool r49268 = r49266 <= r49267;
        double r49269 = x;
        double r49270 = 1.0;
        double r49271 = r49269 * r49270;
        double r49272 = B;
        double r49273 = tan(r49272);
        double r49274 = r49271 / r49273;
        double r49275 = -r49274;
        double r49276 = 1.0;
        double r49277 = sin(r49272);
        double r49278 = r49276 / r49277;
        double r49279 = -1.0;
        double r49280 = r49279 / r49266;
        double r49281 = -1.0;
        double r49282 = pow(r49280, r49281);
        double r49283 = pow(r49279, r49270);
        double r49284 = pow(r49266, r49270);
        double r49285 = r49283 * r49284;
        double r49286 = r49276 / r49285;
        double r49287 = pow(r49286, r49270);
        double r49288 = r49270 * r49287;
        double r49289 = r49282 + r49288;
        double r49290 = r49266 / r49289;
        double r49291 = r49278 * r49290;
        double r49292 = r49275 + r49291;
        double r49293 = 1.3810836897532057e+150;
        bool r49294 = r49266 <= r49293;
        double r49295 = r49266 * r49266;
        double r49296 = 2.0;
        double r49297 = r49295 + r49296;
        double r49298 = r49296 * r49269;
        double r49299 = r49297 + r49298;
        double r49300 = r49270 / r49296;
        double r49301 = pow(r49299, r49300);
        double r49302 = r49266 / r49301;
        double r49303 = r49278 * r49302;
        double r49304 = r49275 + r49303;
        double r49305 = r49276 / r49284;
        double r49306 = pow(r49305, r49270);
        double r49307 = r49277 * r49306;
        double r49308 = r49270 * r49307;
        double r49309 = r49277 * r49266;
        double r49310 = r49308 + r49309;
        double r49311 = r49266 / r49310;
        double r49312 = r49275 + r49311;
        double r49313 = r49294 ? r49304 : r49312;
        double r49314 = r49268 ? r49292 : r49313;
        return r49314;
}

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.0752787424031194e+155

    1. Initial program 41.3

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

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

      \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \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)}}}\]
    5. Simplified35.5

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

      \[\leadsto \left(-\color{blue}{\frac{x \cdot 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)}}\]
    8. Using strategy rm
    9. Applied *-un-lft-identity35.4

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

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

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

    if -4.0752787424031194e+155 < F < 1.3810836897532057e+150

    1. Initial program 2.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. Using strategy rm
    3. Applied pow-neg2.6

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

      \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \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)}}}\]
    5. Simplified0.4

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

      \[\leadsto \left(-\color{blue}{\frac{x \cdot 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)}}\]
    8. Using strategy rm
    9. Applied *-un-lft-identity0.3

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

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

    if 1.3810836897532057e+150 < F

    1. Initial program 41.0

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

      \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \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)}}}\]
    4. Applied frac-times35.8

      \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \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)}}}\]
    5. Simplified35.8

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

      \[\leadsto \left(-\color{blue}{\frac{x \cdot 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)}}\]
    8. Taylor expanded around inf 0.3

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

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

Reproduce

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