Average Error: 0.2 → 0.2
Time: 27.2s
Precision: 64
\[\left(-x \cdot \frac{1}{\tan B}\right) + \frac{1}{\sin B}\]
\[\frac{1}{\sin B} - \frac{x}{\tan B}\]
\left(-x \cdot \frac{1}{\tan B}\right) + \frac{1}{\sin B}
\frac{1}{\sin B} - \frac{x}{\tan B}
double f(double B, double x) {
        double r1671441 = x;
        double r1671442 = 1.0;
        double r1671443 = B;
        double r1671444 = tan(r1671443);
        double r1671445 = r1671442 / r1671444;
        double r1671446 = r1671441 * r1671445;
        double r1671447 = -r1671446;
        double r1671448 = sin(r1671443);
        double r1671449 = r1671442 / r1671448;
        double r1671450 = r1671447 + r1671449;
        return r1671450;
}

double f(double B, double x) {
        double r1671451 = 1.0;
        double r1671452 = B;
        double r1671453 = sin(r1671452);
        double r1671454 = r1671451 / r1671453;
        double r1671455 = x;
        double r1671456 = tan(r1671452);
        double r1671457 = r1671455 / r1671456;
        double r1671458 = r1671454 - r1671457;
        return r1671458;
}

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.2

    \[\leadsto \color{blue}{\frac{1}{\sin B} - \frac{x}{\tan B}}\]
  3. Taylor expanded around -inf 0.2

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

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

Reproduce

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