Average Error: 0.0 → 0.0
Time: 1.3s
Precision: 64
\[\frac{x}{1 - x}\]
\[\frac{x}{1 - x}\]
\frac{x}{1 - x}
\frac{x}{1 - x}
double f(double x) {
        double r123779 = x;
        double r123780 = 1.0;
        double r123781 = r123780 - r123779;
        double r123782 = r123779 / r123781;
        return r123782;
}

double f(double x) {
        double r123783 = x;
        double r123784 = 1.0;
        double r123785 = r123784 - r123783;
        double r123786 = r123783 / r123785;
        return r123786;
}

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 clear-num0.1

    \[\leadsto \color{blue}{\frac{1}{\frac{1 - x}{x}}}\]
  4. Using strategy rm
  5. Applied *-un-lft-identity0.1

    \[\leadsto \frac{1}{\frac{1 - x}{\color{blue}{1 \cdot x}}}\]
  6. Applied *-un-lft-identity0.1

    \[\leadsto \frac{1}{\frac{\color{blue}{1 \cdot \left(1 - x\right)}}{1 \cdot x}}\]
  7. Applied times-frac0.1

    \[\leadsto \frac{1}{\color{blue}{\frac{1}{1} \cdot \frac{1 - x}{x}}}\]
  8. Applied add-cube-cbrt0.1

    \[\leadsto \frac{\color{blue}{\left(\sqrt[3]{1} \cdot \sqrt[3]{1}\right) \cdot \sqrt[3]{1}}}{\frac{1}{1} \cdot \frac{1 - x}{x}}\]
  9. Applied times-frac0.1

    \[\leadsto \color{blue}{\frac{\sqrt[3]{1} \cdot \sqrt[3]{1}}{\frac{1}{1}} \cdot \frac{\sqrt[3]{1}}{\frac{1 - x}{x}}}\]
  10. Simplified0.1

    \[\leadsto \color{blue}{1} \cdot \frac{\sqrt[3]{1}}{\frac{1 - x}{x}}\]
  11. Simplified0.0

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

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

Reproduce

herbie shell --seed 2020039 
(FPCore (x)
  :name "Numeric.Integration.TanhSinh:nonNegative from integration-0.2.1"
  :precision binary64
  (/ x (- 1 x)))