Average Error: 0.0 → 0.0
Time: 1.7m
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 r46551083 = x;
        double r46551084 = 1.0;
        double r46551085 = r46551083 + r46551084;
        double r46551086 = r46551083 - r46551084;
        double r46551087 = r46551085 / r46551086;
        return r46551087;
}

double f(double x) {
        double r46551088 = x;
        double r46551089 = 1.0;
        double r46551090 = r46551088 + r46551089;
        double r46551091 = r46551088 - r46551089;
        double r46551092 = r46551090 / r46551091;
        return r46551092;
}

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