Average Error: 0.2 → 0.2
Time: 14.6s
Precision: 64
\[\left(-x \cdot \frac{1}{\tan B}\right) + \frac{1}{\sin B}\]
\[\frac{1}{\sin B} + \frac{-1}{\frac{\tan B}{x \cdot 1}}\]
\left(-x \cdot \frac{1}{\tan B}\right) + \frac{1}{\sin B}
\frac{1}{\sin B} + \frac{-1}{\frac{\tan B}{x \cdot 1}}
double f(double B, double x) {
        double r17899 = x;
        double r17900 = 1.0;
        double r17901 = B;
        double r17902 = tan(r17901);
        double r17903 = r17900 / r17902;
        double r17904 = r17899 * r17903;
        double r17905 = -r17904;
        double r17906 = sin(r17901);
        double r17907 = r17900 / r17906;
        double r17908 = r17905 + r17907;
        return r17908;
}

double f(double B, double x) {
        double r17909 = 1.0;
        double r17910 = B;
        double r17911 = sin(r17910);
        double r17912 = r17909 / r17911;
        double r17913 = -1.0;
        double r17914 = tan(r17910);
        double r17915 = x;
        double r17916 = r17915 * r17909;
        double r17917 = r17914 / r17916;
        double r17918 = r17913 / r17917;
        double r17919 = r17912 + r17918;
        return r17919;
}

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

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

Reproduce

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