Average Error: 0.2 → 0.2
Time: 22.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 r1252297 = x;
        double r1252298 = 1.0;
        double r1252299 = B;
        double r1252300 = tan(r1252299);
        double r1252301 = r1252298 / r1252300;
        double r1252302 = r1252297 * r1252301;
        double r1252303 = -r1252302;
        double r1252304 = sin(r1252299);
        double r1252305 = r1252298 / r1252304;
        double r1252306 = r1252303 + r1252305;
        return r1252306;
}

double f(double B, double x) {
        double r1252307 = B;
        double r1252308 = tan(r1252307);
        double r1252309 = sin(r1252307);
        double r1252310 = r1252308 / r1252309;
        double r1252311 = x;
        double r1252312 = r1252310 - r1252311;
        double r1252313 = r1252312 / r1252308;
        return r1252313;
}

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))))