Average Error: 0.0 → 0.0
Time: 6.0s
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 r1302291 = x;
        double r1302292 = 1.0;
        double r1302293 = r1302291 + r1302292;
        double r1302294 = r1302291 - r1302292;
        double r1302295 = r1302293 / r1302294;
        return r1302295;
}

double f(double x) {
        double r1302296 = x;
        double r1302297 = 1.0;
        double r1302298 = r1302296 + r1302297;
        double r1302299 = r1302296 - r1302297;
        double r1302300 = r1302298 / r1302299;
        return r1302300;
}

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)"
  :precision binary64
  (/ (+ x 1) (- x 1)))