Average Error: 0.2 → 0.2
Time: 23.8s
Precision: 64
\[\left(-x \cdot \frac{1}{\tan B}\right) + \frac{1}{\sin B}\]
\[\frac{\frac{\tan B}{\sin B} - x}{\tan B}\]
\left(-x \cdot \frac{1}{\tan B}\right) + \frac{1}{\sin B}
\frac{\frac{\tan B}{\sin B} - x}{\tan B}
double f(double B, double x) {
        double r649053 = x;
        double r649054 = 1.0;
        double r649055 = B;
        double r649056 = tan(r649055);
        double r649057 = r649054 / r649056;
        double r649058 = r649053 * r649057;
        double r649059 = -r649058;
        double r649060 = sin(r649055);
        double r649061 = r649054 / r649060;
        double r649062 = r649059 + r649061;
        return r649062;
}

double f(double B, double x) {
        double r649063 = B;
        double r649064 = tan(r649063);
        double r649065 = sin(r649063);
        double r649066 = r649064 / r649065;
        double r649067 = x;
        double r649068 = r649066 - r649067;
        double r649069 = r649068 / r649064;
        return r649069;
}

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. Using strategy rm
  4. Applied frac-sub10.4

    \[\leadsto \color{blue}{\frac{1 \cdot \tan B - \sin B \cdot x}{\sin B \cdot \tan B}}\]
  5. Simplified10.4

    \[\leadsto \frac{\color{blue}{\tan B - x \cdot \sin B}}{\sin B \cdot \tan B}\]
  6. Using strategy rm
  7. Applied associate-/r*0.2

    \[\leadsto \color{blue}{\frac{\frac{\tan B - x \cdot \sin B}{\sin B}}{\tan B}}\]
  8. Simplified0.2

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

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

Reproduce

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