Average Error: 0.0 → 0.0
Time: 8.8s
Precision: 64
\[\frac{x + 1}{1 - x}\]
\[\log \left(e^{\frac{1 + x}{1 - x}}\right)\]
\frac{x + 1}{1 - x}
\log \left(e^{\frac{1 + x}{1 - x}}\right)
double f(double x) {
        double r1683871 = x;
        double r1683872 = 1.0;
        double r1683873 = r1683871 + r1683872;
        double r1683874 = r1683872 - r1683871;
        double r1683875 = r1683873 / r1683874;
        return r1683875;
}

double f(double x) {
        double r1683876 = 1.0;
        double r1683877 = x;
        double r1683878 = r1683876 + r1683877;
        double r1683879 = r1683876 - r1683877;
        double r1683880 = r1683878 / r1683879;
        double r1683881 = exp(r1683880);
        double r1683882 = log(r1683881);
        return r1683882;
}

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{1 + x}{1 - x}}\right)\]

Reproduce

herbie shell --seed 2019172 
(FPCore (x)
  :name "Prelude:atanh from fay-base-0.20.0.1"
  (/ (+ x 1.0) (- 1.0 x)))