Average Error: 0.2 → 0.2
Time: 23.3s
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 r1151762 = x;
        double r1151763 = 1.0;
        double r1151764 = B;
        double r1151765 = tan(r1151764);
        double r1151766 = r1151763 / r1151765;
        double r1151767 = r1151762 * r1151766;
        double r1151768 = -r1151767;
        double r1151769 = sin(r1151764);
        double r1151770 = r1151763 / r1151769;
        double r1151771 = r1151768 + r1151770;
        return r1151771;
}

double f(double B, double x) {
        double r1151772 = 1.0;
        double r1151773 = B;
        double r1151774 = sin(r1151773);
        double r1151775 = r1151772 / r1151774;
        double r1151776 = x;
        double r1151777 = tan(r1151773);
        double r1151778 = r1151776 / r1151777;
        double r1151779 = r1151775 - r1151778;
        return r1151779;
}

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. Taylor expanded around inf 0.2

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

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

Reproduce

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