Average Error: 0.2 → 0.2
Time: 25.0s
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 r556311 = x;
        double r556312 = 1.0;
        double r556313 = B;
        double r556314 = tan(r556313);
        double r556315 = r556312 / r556314;
        double r556316 = r556311 * r556315;
        double r556317 = -r556316;
        double r556318 = sin(r556313);
        double r556319 = r556312 / r556318;
        double r556320 = r556317 + r556319;
        return r556320;
}

double f(double B, double x) {
        double r556321 = 1.0;
        double r556322 = B;
        double r556323 = sin(r556322);
        double r556324 = r556321 / r556323;
        double r556325 = x;
        double r556326 = tan(r556322);
        double r556327 = r556325 / r556326;
        double r556328 = r556324 - r556327;
        return r556328;
}

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 2019139 
(FPCore (B x)
  :name "VandenBroeck and Keller, Equation (24)"
  (+ (- (* x (/ 1 (tan B)))) (/ 1 (sin B))))