Average Error: 0.0 → 0.1
Time: 1.3s
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 r125062 = x;
        double r125063 = 1.0;
        double r125064 = r125063 - r125062;
        double r125065 = r125062 / r125064;
        return r125065;
}

double f(double x) {
        double r125066 = x;
        double r125067 = 1.0;
        double r125068 = 1.0;
        double r125069 = r125068 - r125066;
        double r125070 = r125067 / r125069;
        double r125071 = r125066 * r125070;
        return r125071;
}

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 2020033 +o rules:numerics
(FPCore (x)
  :name "Numeric.Integration.TanhSinh:nonNegative from integration-0.2.1"
  :precision binary64
  (/ x (- 1 x)))