Average Error: 0.2 → 0.2
Time: 28.1s
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 r498282 = x;
        double r498283 = 1.0;
        double r498284 = B;
        double r498285 = tan(r498284);
        double r498286 = r498283 / r498285;
        double r498287 = r498282 * r498286;
        double r498288 = -r498287;
        double r498289 = sin(r498284);
        double r498290 = r498283 / r498289;
        double r498291 = r498288 + r498290;
        return r498291;
}

double f(double B, double x) {
        double r498292 = 1.0;
        double r498293 = B;
        double r498294 = sin(r498293);
        double r498295 = r498292 / r498294;
        double r498296 = x;
        double r498297 = tan(r498293);
        double r498298 = r498296 / r498297;
        double r498299 = r498295 - r498298;
        return r498299;
}

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 2019124 
(FPCore (B x)
  :name "VandenBroeck and Keller, Equation (24)"
  (+ (- (* x (/ 1 (tan B)))) (/ 1 (sin B))))