Average Error: 0 → 0
Time: 5.4s
Precision: 64
\[\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 r2493022 = f;
        double r2493023 = 1.0;
        double r2493024 = r2493022 - r2493023;
        double r2493025 = b;
        double r2493026 = m;
        double r2493027 = r2493025 / r2493026;
        double r2493028 = r2493023 - r2493027;
        double r2493029 = r2493024 * r2493028;
        return r2493029;
}

double f(double f, double b, double m) {
        double r2493030 = f;
        double r2493031 = 1.0;
        double r2493032 = r2493030 - r2493031;
        double r2493033 = b;
        double r2493034 = m;
        double r2493035 = r2493033 / r2493034;
        double r2493036 = r2493031 - r2493035;
        double r2493037 = r2493032 * r2493036;
        return r2493037;
}

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)*(1.0-b/m)"
  :precision binary32
  (* (- f 1) (- 1 (/ b m))))