Average Error: 0.2 → 0.2
Time: 5.8s
Precision: 64
\[\left(-x \cdot \frac{1}{\tan B}\right) + \frac{1}{\sin B}\]
\[1 \cdot \left(\frac{1}{\sin B} - \frac{x \cdot \cos B}{\sin B}\right)\]
\left(-x \cdot \frac{1}{\tan B}\right) + \frac{1}{\sin B}
1 \cdot \left(\frac{1}{\sin B} - \frac{x \cdot \cos B}{\sin B}\right)
double f(double B, double x) {
        double r13068 = x;
        double r13069 = 1.0;
        double r13070 = B;
        double r13071 = tan(r13070);
        double r13072 = r13069 / r13071;
        double r13073 = r13068 * r13072;
        double r13074 = -r13073;
        double r13075 = sin(r13070);
        double r13076 = r13069 / r13075;
        double r13077 = r13074 + r13076;
        return r13077;
}

double f(double B, double x) {
        double r13078 = 1.0;
        double r13079 = 1.0;
        double r13080 = B;
        double r13081 = sin(r13080);
        double r13082 = r13079 / r13081;
        double r13083 = x;
        double r13084 = cos(r13080);
        double r13085 = r13083 * r13084;
        double r13086 = r13085 / r13081;
        double r13087 = r13082 - r13086;
        double r13088 = r13078 * r13087;
        return r13088;
}

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

    \[\leadsto \left(-\color{blue}{\frac{x \cdot 1}{\tan B}}\right) + \frac{1}{\sin B}\]
  4. Taylor expanded around inf 0.2

    \[\leadsto \color{blue}{1 \cdot \frac{1}{\sin B} - 1 \cdot \frac{x \cdot \cos B}{\sin B}}\]
  5. Simplified0.2

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

    \[\leadsto 1 \cdot \left(\frac{1}{\sin B} - \frac{x \cdot \cos B}{\sin B}\right)\]

Reproduce

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