Average Error: 0.0 → 0.1
Time: 9.5s
Precision: 64
\[\frac{x}{1 - x}\]
\[x \cdot \frac{1}{1 - x}\]
\frac{x}{1 - x}
x \cdot \frac{1}{1 - x}
double f(double x) {
        double r112755 = x;
        double r112756 = 1.0;
        double r112757 = r112756 - r112755;
        double r112758 = r112755 / r112757;
        return r112758;
}

double f(double x) {
        double r112759 = x;
        double r112760 = 1.0;
        double r112761 = 1.0;
        double r112762 = r112761 - r112759;
        double r112763 = r112760 / r112762;
        double r112764 = r112759 * r112763;
        return r112764;
}

Error

Bits error versus x

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Derivation

  1. Initial program 0.0

    \[\frac{x}{1 - x}\]
  2. Using strategy rm
  3. Applied div-inv0.1

    \[\leadsto \color{blue}{x \cdot \frac{1}{1 - x}}\]
  4. Final simplification0.1

    \[\leadsto x \cdot \frac{1}{1 - x}\]

Reproduce

herbie shell --seed 2019303 +o rules:numerics
(FPCore (x)
  :name "Numeric.Integration.TanhSinh:nonNegative from integration-0.2.1"
  :precision binary64
  (/ x (- 1 x)))