Average Error: 0.2 → 0.2
Time: 24.3s
Precision: 64
\[\left(-x \cdot \frac{1}{\tan B}\right) + \frac{1}{\sin B}\]
\[\frac{1}{\sin B} - \frac{1}{\frac{\tan B}{x}}\]
\left(-x \cdot \frac{1}{\tan B}\right) + \frac{1}{\sin B}
\frac{1}{\sin B} - \frac{1}{\frac{\tan B}{x}}
double f(double B, double x) {
        double r550992 = x;
        double r550993 = 1.0;
        double r550994 = B;
        double r550995 = tan(r550994);
        double r550996 = r550993 / r550995;
        double r550997 = r550992 * r550996;
        double r550998 = -r550997;
        double r550999 = sin(r550994);
        double r551000 = r550993 / r550999;
        double r551001 = r550998 + r551000;
        return r551001;
}

double f(double B, double x) {
        double r551002 = 1.0;
        double r551003 = B;
        double r551004 = sin(r551003);
        double r551005 = r551002 / r551004;
        double r551006 = tan(r551003);
        double r551007 = x;
        double r551008 = r551006 / r551007;
        double r551009 = r551002 / r551008;
        double r551010 = r551005 - r551009;
        return r551010;
}

Error

Bits error versus B

Bits error versus x

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Derivation

  1. Initial program 0.2

    \[\left(-x \cdot \frac{1}{\tan B}\right) + \frac{1}{\sin B}\]
  2. Simplified0.1

    \[\leadsto \color{blue}{\frac{1}{\sin B} - \frac{x}{\tan B}}\]
  3. Using strategy rm
  4. Applied clear-num0.2

    \[\leadsto \frac{1}{\sin B} - \color{blue}{\frac{1}{\frac{\tan B}{x}}}\]
  5. Final simplification0.2

    \[\leadsto \frac{1}{\sin B} - \frac{1}{\frac{\tan B}{x}}\]

Reproduce

herbie shell --seed 2019130 
(FPCore (B x)
  :name "VandenBroeck and Keller, Equation (24)"
  (+ (- (* x (/ 1 (tan B)))) (/ 1 (sin B))))