Average Error: 0.0 → 0.0
Time: 4.3s
Precision: 64
\[\frac{x + 1}{1 - x}\]
\[\frac{1}{\frac{1 - x}{x + 1}}\]
\frac{x + 1}{1 - x}
\frac{1}{\frac{1 - x}{x + 1}}
double f(double x) {
        double r48555 = x;
        double r48556 = 1.0;
        double r48557 = r48555 + r48556;
        double r48558 = r48556 - r48555;
        double r48559 = r48557 / r48558;
        return r48559;
}

double f(double x) {
        double r48560 = 1.0;
        double r48561 = 1.0;
        double r48562 = x;
        double r48563 = r48561 - r48562;
        double r48564 = r48562 + r48561;
        double r48565 = r48563 / r48564;
        double r48566 = r48560 / r48565;
        return r48566;
}

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{1}{\frac{1 - x}{x + 1}}\]

Reproduce

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