Average Error: 0.0 → 0.0
Time: 13.5s
Precision: 64
\[\frac{x + 1.0}{1.0 - x}\]
\[\log \left(e^{\frac{1.0 + x}{1.0 - x}}\right)\]
\frac{x + 1.0}{1.0 - x}
\log \left(e^{\frac{1.0 + x}{1.0 - x}}\right)
double f(double x) {
        double r1316184 = x;
        double r1316185 = 1.0;
        double r1316186 = r1316184 + r1316185;
        double r1316187 = r1316185 - r1316184;
        double r1316188 = r1316186 / r1316187;
        return r1316188;
}

double f(double x) {
        double r1316189 = 1.0;
        double r1316190 = x;
        double r1316191 = r1316189 + r1316190;
        double r1316192 = r1316189 - r1316190;
        double r1316193 = r1316191 / r1316192;
        double r1316194 = exp(r1316193);
        double r1316195 = log(r1316194);
        return r1316195;
}

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.0}{1.0 - x}\]
  2. Using strategy rm
  3. Applied add-log-exp0.0

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

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

Reproduce

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