Average Error: 0.0 → 0.1
Time: 10.8s
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 r124325 = x;
        double r124326 = 1.0;
        double r124327 = r124326 - r124325;
        double r124328 = r124325 / r124327;
        return r124328;
}

double f(double x) {
        double r124329 = x;
        double r124330 = 1.0;
        double r124331 = 1.0;
        double r124332 = r124331 - r124329;
        double r124333 = r124330 / r124332;
        double r124334 = r124329 * r124333;
        return r124334;
}

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