Average Error: 0.2 → 0.1
Time: 26.9s
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 r526258 = x;
        double r526259 = 1.0;
        double r526260 = B;
        double r526261 = tan(r526260);
        double r526262 = r526259 / r526261;
        double r526263 = r526258 * r526262;
        double r526264 = -r526263;
        double r526265 = sin(r526260);
        double r526266 = r526259 / r526265;
        double r526267 = r526264 + r526266;
        return r526267;
}

double f(double B, double x) {
        double r526268 = 1.0;
        double r526269 = B;
        double r526270 = sin(r526269);
        double r526271 = r526268 / r526270;
        double r526272 = x;
        double r526273 = tan(r526269);
        double r526274 = r526272 / r526273;
        double r526275 = r526271 - r526274;
        return r526275;
}

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))))