Average Error: 0 → 0
Time: 8.6s
Precision: 64
\[b \lt m\]
\[\left(f - 1\right) \cdot \left(1 - \frac{b}{m}\right)\]
\[\left(f - 1\right) \cdot \left(1 - \frac{b}{m}\right)\]
\left(f - 1\right) \cdot \left(1 - \frac{b}{m}\right)
\left(f - 1\right) \cdot \left(1 - \frac{b}{m}\right)
double f(double f, double b, double m) {
        double r2493282 = f;
        double r2493283 = 1.0;
        double r2493284 = r2493282 - r2493283;
        double r2493285 = b;
        double r2493286 = m;
        double r2493287 = r2493285 / r2493286;
        double r2493288 = r2493283 - r2493287;
        double r2493289 = r2493284 * r2493288;
        return r2493289;
}

double f(double f, double b, double m) {
        double r2493290 = f;
        double r2493291 = 1.0;
        double r2493292 = r2493290 - r2493291;
        double r2493293 = b;
        double r2493294 = m;
        double r2493295 = r2493293 / r2493294;
        double r2493296 = r2493291 - r2493295;
        double r2493297 = r2493292 * r2493296;
        return r2493297;
}

Error

Bits error versus f

Bits error versus b

Bits error versus m

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Derivation

  1. Initial program 0

    \[\left(f - 1\right) \cdot \left(1 - \frac{b}{m}\right)\]
  2. Final simplification0

    \[\leadsto \left(f - 1\right) \cdot \left(1 - \frac{b}{m}\right)\]

Reproduce

herbie shell --seed 1 
(FPCore (f b m)
  :name "(f-1.0)*(1.0-b/m)"
  :precision binary32
  :pre (< b m)
  (* (- f 1) (- 1 (/ b m))))