Average Error: 0.0 → 0.1
Time: 11.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 r89851 = x;
        double r89852 = 1.0;
        double r89853 = r89852 - r89851;
        double r89854 = r89851 / r89853;
        return r89854;
}

double f(double x) {
        double r89855 = x;
        double r89856 = 1.0;
        double r89857 = 1.0;
        double r89858 = r89857 - r89855;
        double r89859 = r89856 / r89858;
        double r89860 = r89855 * r89859;
        return r89860;
}

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)))