Average Error: 0.2 → 0.2
Time: 20.0s
Precision: 64
\[\left(-x \cdot \frac{1}{\tan B}\right) + \frac{1}{\sin B}\]
\[\frac{1}{\sin B} - \frac{1}{\tan B} \cdot x\]
\left(-x \cdot \frac{1}{\tan B}\right) + \frac{1}{\sin B}
\frac{1}{\sin B} - \frac{1}{\tan B} \cdot x
double f(double B, double x) {
        double r743035 = x;
        double r743036 = 1.0;
        double r743037 = B;
        double r743038 = tan(r743037);
        double r743039 = r743036 / r743038;
        double r743040 = r743035 * r743039;
        double r743041 = -r743040;
        double r743042 = sin(r743037);
        double r743043 = r743036 / r743042;
        double r743044 = r743041 + r743043;
        return r743044;
}

double f(double B, double x) {
        double r743045 = 1.0;
        double r743046 = B;
        double r743047 = sin(r743046);
        double r743048 = r743045 / r743047;
        double r743049 = tan(r743046);
        double r743050 = r743045 / r743049;
        double r743051 = x;
        double r743052 = r743050 * r743051;
        double r743053 = r743048 - r743052;
        return r743053;
}

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 div-inv0.2

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

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

Reproduce

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