Average Error: 0.0 → 0.0
Time: 11.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 r37781 = x;
        double r37782 = 1.0;
        double r37783 = r37781 + r37782;
        double r37784 = r37782 - r37781;
        double r37785 = r37783 / r37784;
        return r37785;
}

double f(double x) {
        double r37786 = 1.0;
        double r37787 = 1.0;
        double r37788 = x;
        double r37789 = r37787 - r37788;
        double r37790 = r37788 + r37787;
        double r37791 = r37789 / r37790;
        double r37792 = r37786 / r37791;
        return r37792;
}

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 2019208 
(FPCore (x)
  :name "Prelude:atanh from fay-base-0.20.0.1"
  :precision binary64
  (/ (+ x 1) (- 1 x)))