Average Error: 13.5 → 0.3
Time: 12.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.80016373400143867247275818172190658331 \cdot 10^{124}:\\ \;\;\;\;\left(-\frac{x \cdot 1}{\tan B}\right) + \frac{F \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{0}}{{\left(\frac{1}{{-1}^{1}}\right)}^{1} \cdot \left(\sin B \cdot F\right) + 1 \cdot \left({\left(\frac{1}{{-1}^{1} \cdot {F}^{1}}\right)}^{1} \cdot \sin B\right)}\\ \mathbf{elif}\;F \le 60420.70132716573425568640232086181640625:\\ \;\;\;\;\left(-1 \cdot \frac{x \cdot \cos B}{\sin B}\right) + \frac{F \cdot {\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.80016373400143867247275818172190658331 \cdot 10^{124}:\\
\;\;\;\;\left(-\frac{x \cdot 1}{\tan B}\right) + \frac{F \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{0}}{{\left(\frac{1}{{-1}^{1}}\right)}^{1} \cdot \left(\sin B \cdot F\right) + 1 \cdot \left({\left(\frac{1}{{-1}^{1} \cdot {F}^{1}}\right)}^{1} \cdot \sin B\right)}\\

\mathbf{elif}\;F \le 60420.70132716573425568640232086181640625:\\
\;\;\;\;\left(-1 \cdot \frac{x \cdot \cos B}{\sin B}\right) + \frac{F \cdot {\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 r42305 = x;
        double r42306 = 1.0;
        double r42307 = B;
        double r42308 = tan(r42307);
        double r42309 = r42306 / r42308;
        double r42310 = r42305 * r42309;
        double r42311 = -r42310;
        double r42312 = F;
        double r42313 = sin(r42307);
        double r42314 = r42312 / r42313;
        double r42315 = r42312 * r42312;
        double r42316 = 2.0;
        double r42317 = r42315 + r42316;
        double r42318 = r42316 * r42305;
        double r42319 = r42317 + r42318;
        double r42320 = r42306 / r42316;
        double r42321 = -r42320;
        double r42322 = pow(r42319, r42321);
        double r42323 = r42314 * r42322;
        double r42324 = r42311 + r42323;
        return r42324;
}

double f(double F, double B, double x) {
        double r42325 = F;
        double r42326 = -1.8001637340014387e+124;
        bool r42327 = r42325 <= r42326;
        double r42328 = x;
        double r42329 = 1.0;
        double r42330 = r42328 * r42329;
        double r42331 = B;
        double r42332 = tan(r42331);
        double r42333 = r42330 / r42332;
        double r42334 = -r42333;
        double r42335 = r42325 * r42325;
        double r42336 = 2.0;
        double r42337 = r42335 + r42336;
        double r42338 = r42336 * r42328;
        double r42339 = r42337 + r42338;
        double r42340 = 0.0;
        double r42341 = pow(r42339, r42340);
        double r42342 = r42325 * r42341;
        double r42343 = 1.0;
        double r42344 = -1.0;
        double r42345 = pow(r42344, r42329);
        double r42346 = r42343 / r42345;
        double r42347 = pow(r42346, r42329);
        double r42348 = sin(r42331);
        double r42349 = r42348 * r42325;
        double r42350 = r42347 * r42349;
        double r42351 = pow(r42325, r42329);
        double r42352 = r42345 * r42351;
        double r42353 = r42343 / r42352;
        double r42354 = pow(r42353, r42329);
        double r42355 = r42354 * r42348;
        double r42356 = r42329 * r42355;
        double r42357 = r42350 + r42356;
        double r42358 = r42342 / r42357;
        double r42359 = r42334 + r42358;
        double r42360 = 60420.701327165734;
        bool r42361 = r42325 <= r42360;
        double r42362 = cos(r42331);
        double r42363 = r42328 * r42362;
        double r42364 = r42363 / r42348;
        double r42365 = r42329 * r42364;
        double r42366 = -r42365;
        double r42367 = r42329 / r42336;
        double r42368 = -r42367;
        double r42369 = pow(r42339, r42368);
        double r42370 = r42325 * r42369;
        double r42371 = r42370 / r42348;
        double r42372 = r42366 + r42371;
        double r42373 = r42329 / r42325;
        double r42374 = r42373 / r42325;
        double r42375 = r42343 - r42374;
        double r42376 = r42375 / r42348;
        double r42377 = r42334 + r42376;
        double r42378 = r42361 ? r42372 : r42377;
        double r42379 = r42327 ? r42359 : r42378;
        return r42379;
}

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.8001637340014387e+124

    1. Initial program 37.2

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

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

      \[\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 neg-sub030.4

      \[\leadsto \left(-\frac{x \cdot 1}{\tan B}\right) + \frac{F \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\color{blue}{\left(0 - \frac{1}{2}\right)}}}{\sin B}\]
    8. Applied pow-sub30.4

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

      \[\leadsto \left(-\frac{x \cdot 1}{\tan B}\right) + \frac{\color{blue}{\frac{F \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{0}}{{\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\frac{1}{2}\right)}}}}{\sin B}\]
    10. Applied associate-/l/30.4

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

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

    if -1.8001637340014387e+124 < F < 60420.701327165734

    1. Initial program 1.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 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. Taylor expanded around inf 0.3

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

    if 60420.701327165734 < F

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;F \le -1.80016373400143867247275818172190658331 \cdot 10^{124}:\\ \;\;\;\;\left(-\frac{x \cdot 1}{\tan B}\right) + \frac{F \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{0}}{{\left(\frac{1}{{-1}^{1}}\right)}^{1} \cdot \left(\sin B \cdot F\right) + 1 \cdot \left({\left(\frac{1}{{-1}^{1} \cdot {F}^{1}}\right)}^{1} \cdot \sin B\right)}\\ \mathbf{elif}\;F \le 60420.70132716573425568640232086181640625:\\ \;\;\;\;\left(-1 \cdot \frac{x \cdot \cos B}{\sin B}\right) + \frac{F \cdot {\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 2019347 
(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))))))