Average Error: 13.8 → 0.2
Time: 41.3s
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 -280062729.45830857753753662109375:\\ \;\;\;\;\left(\frac{1}{F \cdot \left(\sin B \cdot F\right)} - \frac{1}{\sin B}\right) - \frac{x \cdot 1}{\tan B}\\ \mathbf{elif}\;F \le 355522549.61417949199676513671875:\\ \;\;\;\;\frac{F}{\sin B \cdot {\left(F \cdot F + \left(x \cdot 2 + 2\right)\right)}^{\left(\frac{1}{2}\right)}} - \frac{x \cdot 1}{\tan B}\\ \mathbf{else}:\\ \;\;\;\;\left(\frac{1}{\sin B} - \frac{1}{F \cdot \left(\sin B \cdot F\right)}\right) - \frac{x \cdot 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 -280062729.45830857753753662109375:\\
\;\;\;\;\left(\frac{1}{F \cdot \left(\sin B \cdot F\right)} - \frac{1}{\sin B}\right) - \frac{x \cdot 1}{\tan B}\\

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

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

\end{array}
double f(double F, double B, double x) {
        double r96258 = x;
        double r96259 = 1.0;
        double r96260 = B;
        double r96261 = tan(r96260);
        double r96262 = r96259 / r96261;
        double r96263 = r96258 * r96262;
        double r96264 = -r96263;
        double r96265 = F;
        double r96266 = sin(r96260);
        double r96267 = r96265 / r96266;
        double r96268 = r96265 * r96265;
        double r96269 = 2.0;
        double r96270 = r96268 + r96269;
        double r96271 = r96269 * r96258;
        double r96272 = r96270 + r96271;
        double r96273 = r96259 / r96269;
        double r96274 = -r96273;
        double r96275 = pow(r96272, r96274);
        double r96276 = r96267 * r96275;
        double r96277 = r96264 + r96276;
        return r96277;
}

double f(double F, double B, double x) {
        double r96278 = F;
        double r96279 = -280062729.4583086;
        bool r96280 = r96278 <= r96279;
        double r96281 = 1.0;
        double r96282 = B;
        double r96283 = sin(r96282);
        double r96284 = r96283 * r96278;
        double r96285 = r96278 * r96284;
        double r96286 = r96281 / r96285;
        double r96287 = 1.0;
        double r96288 = r96287 / r96283;
        double r96289 = r96286 - r96288;
        double r96290 = x;
        double r96291 = r96290 * r96281;
        double r96292 = tan(r96282);
        double r96293 = r96291 / r96292;
        double r96294 = r96289 - r96293;
        double r96295 = 355522549.6141795;
        bool r96296 = r96278 <= r96295;
        double r96297 = r96278 * r96278;
        double r96298 = 2.0;
        double r96299 = r96290 * r96298;
        double r96300 = r96299 + r96298;
        double r96301 = r96297 + r96300;
        double r96302 = r96281 / r96298;
        double r96303 = pow(r96301, r96302);
        double r96304 = r96283 * r96303;
        double r96305 = r96278 / r96304;
        double r96306 = r96305 - r96293;
        double r96307 = r96288 - r96286;
        double r96308 = r96307 - r96293;
        double r96309 = r96296 ? r96306 : r96308;
        double r96310 = r96280 ? r96294 : r96309;
        return r96310;
}

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 < -280062729.4583086

    1. Initial program 25.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. Simplified19.4

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

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

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

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

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

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

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

    if -280062729.4583086 < F < 355522549.6141795

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

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

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

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

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

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

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

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

    if 355522549.6141795 < F

    1. Initial program 25.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. Simplified20.1

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

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

      \[\leadsto F \cdot \color{blue}{\left(\frac{1}{\sin B} \cdot {\left(\left(x \cdot 2 + 2\right) + F \cdot F\right)}^{\left(-\frac{1}{2}\right)}\right)} - \frac{x \cdot 1}{\tan B}\]
    6. Using strategy rm
    7. Applied pow-neg20.0

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

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

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

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

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

Reproduce

herbie shell --seed 2019194 
(FPCore (F B x)
  :name "VandenBroeck and Keller, Equation (23)"
  (+ (- (* x (/ 1.0 (tan B)))) (* (/ F (sin B)) (pow (+ (+ (* F F) 2.0) (* 2.0 x)) (- (/ 1.0 2.0))))))