Average Error: 0.0 → 0.0
Time: 13.1s
Precision: 64
\[\frac{\frac{x}{x - 1}}{x - 2}\]
\[\frac{x \cdot \frac{1}{x - 1}}{x - 2}\]
\frac{\frac{x}{x - 1}}{x - 2}
\frac{x \cdot \frac{1}{x - 1}}{x - 2}
double f(double x) {
        double r1523852 = x;
        double r1523853 = 1.0;
        double r1523854 = r1523852 - r1523853;
        double r1523855 = r1523852 / r1523854;
        double r1523856 = 2.0;
        double r1523857 = r1523852 - r1523856;
        double r1523858 = r1523855 / r1523857;
        return r1523858;
}

double f(double x) {
        double r1523859 = x;
        double r1523860 = 1.0;
        double r1523861 = 1.0;
        double r1523862 = r1523859 - r1523861;
        double r1523863 = r1523860 / r1523862;
        double r1523864 = r1523859 * r1523863;
        double r1523865 = 2.0;
        double r1523866 = r1523859 - r1523865;
        double r1523867 = r1523864 / r1523866;
        return r1523867;
}

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{\frac{x}{x - 1}}{x - 2}\]
  2. Using strategy rm
  3. Applied div-inv0.0

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

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

Reproduce

herbie shell --seed 1 
(FPCore (x)
  :name "(x/(x-1)/(x-2))"
  :precision binary64
  (/ (/ x (- x 1)) (- x 2)))