Average Error: 13.8 → 0.6
Time: 11.8s
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.514749380973243 \cdot 10^{125}:\\ \;\;\;\;\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}} - \frac{x \cdot 1}{\tan B}\\ \mathbf{elif}\;F \le 19373.4447765834666:\\ \;\;\;\;\frac{\frac{F}{\sin B}}{{\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\frac{1}{2}\right)}} - \frac{x \cdot 1}{\tan B}\\ \mathbf{else}:\\ \;\;\;\;\left(\frac{1}{\sin B} - 1 \cdot \frac{1}{\sin B \cdot {F}^{2}}\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 -1.514749380973243 \cdot 10^{125}:\\
\;\;\;\;\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}} - \frac{x \cdot 1}{\tan B}\\

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

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

\end{array}
double f(double F, double B, double x) {
        double r39183 = x;
        double r39184 = 1.0;
        double r39185 = B;
        double r39186 = tan(r39185);
        double r39187 = r39184 / r39186;
        double r39188 = r39183 * r39187;
        double r39189 = -r39188;
        double r39190 = F;
        double r39191 = sin(r39185);
        double r39192 = r39190 / r39191;
        double r39193 = r39190 * r39190;
        double r39194 = 2.0;
        double r39195 = r39193 + r39194;
        double r39196 = r39194 * r39183;
        double r39197 = r39195 + r39196;
        double r39198 = r39184 / r39194;
        double r39199 = -r39198;
        double r39200 = pow(r39197, r39199);
        double r39201 = r39192 * r39200;
        double r39202 = r39189 + r39201;
        return r39202;
}

double f(double F, double B, double x) {
        double r39203 = F;
        double r39204 = -1.514749380973243e+125;
        bool r39205 = r39203 <= r39204;
        double r39206 = 1.0;
        double r39207 = B;
        double r39208 = sin(r39207);
        double r39209 = r39206 / r39208;
        double r39210 = -1.0;
        double r39211 = r39210 / r39203;
        double r39212 = -1.0;
        double r39213 = pow(r39211, r39212);
        double r39214 = 1.0;
        double r39215 = pow(r39210, r39214);
        double r39216 = pow(r39203, r39214);
        double r39217 = r39215 * r39216;
        double r39218 = r39206 / r39217;
        double r39219 = pow(r39218, r39214);
        double r39220 = r39214 * r39219;
        double r39221 = r39213 + r39220;
        double r39222 = r39203 / r39221;
        double r39223 = r39209 * r39222;
        double r39224 = x;
        double r39225 = r39224 * r39214;
        double r39226 = tan(r39207);
        double r39227 = r39225 / r39226;
        double r39228 = r39223 - r39227;
        double r39229 = 19373.444776583467;
        bool r39230 = r39203 <= r39229;
        double r39231 = r39203 / r39208;
        double r39232 = r39203 * r39203;
        double r39233 = 2.0;
        double r39234 = r39232 + r39233;
        double r39235 = r39233 * r39224;
        double r39236 = r39234 + r39235;
        double r39237 = r39214 / r39233;
        double r39238 = pow(r39236, r39237);
        double r39239 = r39231 / r39238;
        double r39240 = r39239 - r39227;
        double r39241 = 2.0;
        double r39242 = pow(r39203, r39241);
        double r39243 = r39208 * r39242;
        double r39244 = r39206 / r39243;
        double r39245 = r39214 * r39244;
        double r39246 = r39209 - r39245;
        double r39247 = r39246 - r39227;
        double r39248 = r39230 ? r39240 : r39247;
        double r39249 = r39205 ? r39228 : r39248;
        return r39249;
}

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.514749380973243e+125

    1. Initial program 36.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. Simplified36.1

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

      \[\leadsto \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)}}} - x \cdot \frac{1}{\tan B}\]
    5. Applied frac-times30.2

      \[\leadsto \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)}}} - x \cdot \frac{1}{\tan B}\]
    6. Simplified30.2

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

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

      \[\leadsto \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)}} - \frac{x \cdot 1}{\tan B}\]
    11. Applied times-frac30.1

      \[\leadsto \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)}}} - \frac{x \cdot 1}{\tan B}\]
    12. Taylor expanded around -inf 0.3

      \[\leadsto \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}}} - \frac{x \cdot 1}{\tan B}\]

    if -1.514749380973243e+125 < F < 19373.444776583467

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

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

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

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

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

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

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

    if 19373.444776583467 < F

    1. Initial program 25.8

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

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

      \[\leadsto \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)}}} - x \cdot \frac{1}{\tan B}\]
    5. Applied frac-times20.1

      \[\leadsto \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)}}} - x \cdot \frac{1}{\tan B}\]
    6. Simplified20.1

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

      \[\leadsto \frac{F}{\sin B \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\frac{1}{2}\right)}} - \color{blue}{\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}{\sin B \cdot {F}^{2}}\right)} - \frac{x \cdot 1}{\tan B}\]
  3. Recombined 3 regimes into one program.
  4. Final simplification0.6

    \[\leadsto \begin{array}{l} \mathbf{if}\;F \le -1.514749380973243 \cdot 10^{125}:\\ \;\;\;\;\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}} - \frac{x \cdot 1}{\tan B}\\ \mathbf{elif}\;F \le 19373.4447765834666:\\ \;\;\;\;\frac{\frac{F}{\sin B}}{{\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\frac{1}{2}\right)}} - \frac{x \cdot 1}{\tan B}\\ \mathbf{else}:\\ \;\;\;\;\left(\frac{1}{\sin B} - 1 \cdot \frac{1}{\sin B \cdot {F}^{2}}\right) - \frac{x \cdot 1}{\tan B}\\ \end{array}\]

Reproduce

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