Average Error: 0.0 → 0.0
Time: 7.3s
Precision: 64
\[\frac{x + 1}{1 - x}\]
\[\frac{x + 1}{1 - x}\]
\frac{x + 1}{1 - x}
\frac{x + 1}{1 - x}
double f(double x) {
        double r45410 = x;
        double r45411 = 1.0;
        double r45412 = r45410 + r45411;
        double r45413 = r45411 - r45410;
        double r45414 = r45412 / r45413;
        return r45414;
}

double f(double x) {
        double r45415 = x;
        double r45416 = 1.0;
        double r45417 = r45415 + r45416;
        double r45418 = r45416 - r45415;
        double r45419 = r45417 / r45418;
        return r45419;
}

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

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

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

Reproduce

herbie shell --seed 2019298 
(FPCore (x)
  :name "Prelude:atanh from fay-base-0.20.0.1"
  :precision binary64
  (/ (+ x 1) (- 1 x)))