Average Error: 0.2 → 0.2
Time: 17.0s
Precision: 64
\[\left(-x \cdot \frac{1}{\tan B}\right) + \frac{1}{\sin B}\]
\[\frac{\frac{-1}{\tan B}}{\frac{1}{x \cdot 1}} + \frac{1}{\sin B}\]
\left(-x \cdot \frac{1}{\tan B}\right) + \frac{1}{\sin B}
\frac{\frac{-1}{\tan B}}{\frac{1}{x \cdot 1}} + \frac{1}{\sin B}
double f(double B, double x) {
        double r23363 = x;
        double r23364 = 1.0;
        double r23365 = B;
        double r23366 = tan(r23365);
        double r23367 = r23364 / r23366;
        double r23368 = r23363 * r23367;
        double r23369 = -r23368;
        double r23370 = sin(r23365);
        double r23371 = r23364 / r23370;
        double r23372 = r23369 + r23371;
        return r23372;
}

double f(double B, double x) {
        double r23373 = -1.0;
        double r23374 = B;
        double r23375 = tan(r23374);
        double r23376 = r23373 / r23375;
        double r23377 = 1.0;
        double r23378 = x;
        double r23379 = 1.0;
        double r23380 = r23378 * r23379;
        double r23381 = r23377 / r23380;
        double r23382 = r23376 / r23381;
        double r23383 = sin(r23374);
        double r23384 = r23379 / r23383;
        double r23385 = r23382 + r23384;
        return r23385;
}

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. Using strategy rm
  3. Applied associate-*r/0.2

    \[\leadsto \left(-\color{blue}{\frac{x \cdot 1}{\tan B}}\right) + \frac{1}{\sin B}\]
  4. Using strategy rm
  5. Applied clear-num0.2

    \[\leadsto \left(-\color{blue}{\frac{1}{\frac{\tan B}{x \cdot 1}}}\right) + \frac{1}{\sin B}\]
  6. Using strategy rm
  7. Applied div-inv0.3

    \[\leadsto \left(-\frac{1}{\color{blue}{\tan B \cdot \frac{1}{x \cdot 1}}}\right) + \frac{1}{\sin B}\]
  8. Applied associate-/r*0.2

    \[\leadsto \left(-\color{blue}{\frac{\frac{1}{\tan B}}{\frac{1}{x \cdot 1}}}\right) + \frac{1}{\sin B}\]
  9. Final simplification0.2

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

Reproduce

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