Average Error: 0.0 → 0.0
Time: 3.0s
Precision: 64
\[\frac{x + 1}{1 - x}\]
\[\log \left(e^{\frac{x + 1}{1 - x}}\right)\]
\frac{x + 1}{1 - x}
\log \left(e^{\frac{x + 1}{1 - x}}\right)
double f(double x) {
        double r39745 = x;
        double r39746 = 1.0;
        double r39747 = r39745 + r39746;
        double r39748 = r39746 - r39745;
        double r39749 = r39747 / r39748;
        return r39749;
}

double f(double x) {
        double r39750 = x;
        double r39751 = 1.0;
        double r39752 = r39750 + r39751;
        double r39753 = r39751 - r39750;
        double r39754 = r39752 / r39753;
        double r39755 = exp(r39754);
        double r39756 = log(r39755);
        return r39756;
}

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 add-log-exp0.0

    \[\leadsto \color{blue}{\log \left(e^{\frac{x + 1}{1 - x}}\right)}\]
  4. Final simplification0.0

    \[\leadsto \log \left(e^{\frac{x + 1}{1 - x}}\right)\]

Reproduce

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