Average Error: 0.0 → 0.0
Time: 2.7s
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 r52054 = x;
        double r52055 = 1.0;
        double r52056 = r52054 + r52055;
        double r52057 = r52055 - r52054;
        double r52058 = r52056 / r52057;
        return r52058;
}

double f(double x) {
        double r52059 = 1.0;
        double r52060 = 1.0;
        double r52061 = x;
        double r52062 = r52060 - r52061;
        double r52063 = r52061 + r52060;
        double r52064 = r52062 / r52063;
        double r52065 = r52059 / r52064;
        return r52065;
}

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