Average Error: 13.5 → 0.2
Time: 33.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 -8575.24190677927:\\ \;\;\;\;\left(\frac{\frac{1}{F \cdot F}}{\sin B} - \frac{1}{\sin B}\right) - \frac{x}{\tan B}\\ \mathbf{elif}\;F \le 60130.553479946095:\\ \;\;\;\;\frac{{\left(\sqrt{x \cdot 2 + \left(2 + F \cdot F\right)}\right)}^{\frac{-1}{2}}}{\frac{1}{F}} \cdot \frac{{\left(\sqrt{\sqrt{x \cdot 2 + \left(2 + F \cdot F\right)}} \cdot \sqrt{\sqrt{x \cdot 2 + \left(2 + F \cdot F\right)}}\right)}^{\frac{-1}{2}}}{\sin B} - \frac{x}{\tan B}\\ \mathbf{else}:\\ \;\;\;\;\left(\frac{1}{\sin B} - \frac{\frac{1}{F \cdot F}}{\sin B}\right) - \frac{x}{\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 -8575.24190677927:\\
\;\;\;\;\left(\frac{\frac{1}{F \cdot F}}{\sin B} - \frac{1}{\sin B}\right) - \frac{x}{\tan B}\\

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

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

\end{array}
double f(double F, double B, double x) {
        double r878650 = x;
        double r878651 = 1.0;
        double r878652 = B;
        double r878653 = tan(r878652);
        double r878654 = r878651 / r878653;
        double r878655 = r878650 * r878654;
        double r878656 = -r878655;
        double r878657 = F;
        double r878658 = sin(r878652);
        double r878659 = r878657 / r878658;
        double r878660 = r878657 * r878657;
        double r878661 = 2.0;
        double r878662 = r878660 + r878661;
        double r878663 = r878661 * r878650;
        double r878664 = r878662 + r878663;
        double r878665 = r878651 / r878661;
        double r878666 = -r878665;
        double r878667 = pow(r878664, r878666);
        double r878668 = r878659 * r878667;
        double r878669 = r878656 + r878668;
        return r878669;
}

double f(double F, double B, double x) {
        double r878670 = F;
        double r878671 = -8575.24190677927;
        bool r878672 = r878670 <= r878671;
        double r878673 = 1.0;
        double r878674 = r878670 * r878670;
        double r878675 = r878673 / r878674;
        double r878676 = B;
        double r878677 = sin(r878676);
        double r878678 = r878675 / r878677;
        double r878679 = r878673 / r878677;
        double r878680 = r878678 - r878679;
        double r878681 = x;
        double r878682 = tan(r878676);
        double r878683 = r878681 / r878682;
        double r878684 = r878680 - r878683;
        double r878685 = 60130.553479946095;
        bool r878686 = r878670 <= r878685;
        double r878687 = 2.0;
        double r878688 = r878681 * r878687;
        double r878689 = r878687 + r878674;
        double r878690 = r878688 + r878689;
        double r878691 = sqrt(r878690);
        double r878692 = -0.5;
        double r878693 = pow(r878691, r878692);
        double r878694 = r878673 / r878670;
        double r878695 = r878693 / r878694;
        double r878696 = sqrt(r878691);
        double r878697 = r878696 * r878696;
        double r878698 = pow(r878697, r878692);
        double r878699 = r878698 / r878677;
        double r878700 = r878695 * r878699;
        double r878701 = r878700 - r878683;
        double r878702 = r878679 - r878678;
        double r878703 = r878702 - r878683;
        double r878704 = r878686 ? r878701 : r878703;
        double r878705 = r878672 ? r878684 : r878704;
        return r878705;
}

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

    1. Initial program 26.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. Simplified25.4

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

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

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

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

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

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

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

    if -8575.24190677927 < F < 60130.553479946095

    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{{\left(\left(2 + F \cdot F\right) + x \cdot 2\right)}^{\frac{-1}{2}}}{\frac{\sin B}{F}} - \frac{x}{\tan B}}\]
    3. Using strategy rm
    4. Applied div-inv0.3

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

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

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

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

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

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

    if 60130.553479946095 < F

    1. Initial program 23.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. Simplified22.8

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

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

      \[\leadsto \frac{{\color{blue}{\left(\sqrt{\left(2 + F \cdot F\right) + x \cdot 2} \cdot \sqrt{\left(2 + F \cdot F\right) + x \cdot 2}\right)}}^{\frac{-1}{2}}}{\sin B \cdot \frac{1}{F}} - \frac{x}{\tan B}\]
    6. Applied unpow-prod-down22.8

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

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

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

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

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

Reproduce

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