Average Error: 0.2 → 0.1
Time: 25.6s
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 r1728926 = x;
        double r1728927 = 1.0;
        double r1728928 = B;
        double r1728929 = tan(r1728928);
        double r1728930 = r1728927 / r1728929;
        double r1728931 = r1728926 * r1728930;
        double r1728932 = -r1728931;
        double r1728933 = sin(r1728928);
        double r1728934 = r1728927 / r1728933;
        double r1728935 = r1728932 + r1728934;
        return r1728935;
}

double f(double B, double x) {
        double r1728936 = 1.0;
        double r1728937 = B;
        double r1728938 = sin(r1728937);
        double r1728939 = r1728936 / r1728938;
        double r1728940 = x;
        double r1728941 = tan(r1728937);
        double r1728942 = r1728940 / r1728941;
        double r1728943 = r1728939 - r1728942;
        return r1728943;
}

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.1

    \[\leadsto \color{blue}{\frac{1}{\sin B} - \frac{x}{\tan B}}\]
  3. Taylor expanded around inf 0.1

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

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

Reproduce

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