Average Error: 0.0 → 0.0
Time: 11.3s
Precision: 64
\[\frac{x + 1}{x - 1}\]
\[\frac{x + 1}{x - 1}\]
\frac{x + 1}{x - 1}
\frac{x + 1}{x - 1}
double f(double x) {
        double r9442877 = x;
        double r9442878 = 1.0;
        double r9442879 = r9442877 + r9442878;
        double r9442880 = r9442877 - r9442878;
        double r9442881 = r9442879 / r9442880;
        return r9442881;
}

double f(double x) {
        double r9442882 = x;
        double r9442883 = 1.0;
        double r9442884 = r9442882 + r9442883;
        double r9442885 = r9442882 - r9442883;
        double r9442886 = r9442884 / r9442885;
        return r9442886;
}

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 - 1}\]
  2. Final simplification0.0

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

Reproduce

herbie shell --seed 1 
(FPCore (x)
  :name "(x+1)/(x-1)"
  (/ (+ x 1) (- x 1)))