Average Error: 0.0 → 0.0
Time: 10.8s
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 r43741 = x;
        double r43742 = 1.0;
        double r43743 = r43741 + r43742;
        double r43744 = r43742 - r43741;
        double r43745 = r43743 / r43744;
        return r43745;
}

double f(double x) {
        double r43746 = x;
        double r43747 = 1.0;
        double r43748 = r43746 + r43747;
        double r43749 = r43747 - r43746;
        double r43750 = r43748 / r43749;
        double r43751 = exp(r43750);
        double r43752 = log(r43751);
        return r43752;
}

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