Average Error: 0.0 → 0.0
Time: 1.2s
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 r36018 = x;
        double r36019 = 1.0;
        double r36020 = r36018 + r36019;
        double r36021 = r36019 - r36018;
        double r36022 = r36020 / r36021;
        return r36022;
}

double f(double x) {
        double r36023 = 1.0;
        double r36024 = 1.0;
        double r36025 = x;
        double r36026 = r36024 - r36025;
        double r36027 = r36025 + r36024;
        double r36028 = r36026 / r36027;
        double r36029 = r36023 / r36028;
        return r36029;
}

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