Average Error: 0.0 → 0.0
Time: 8.2s
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 r1553653 = x;
        double r1553654 = 1.0;
        double r1553655 = r1553653 + r1553654;
        double r1553656 = r1553654 - r1553653;
        double r1553657 = r1553655 / r1553656;
        return r1553657;
}

double f(double x) {
        double r1553658 = 1.0;
        double r1553659 = x;
        double r1553660 = r1553658 + r1553659;
        double r1553661 = r1553658 - r1553659;
        double r1553662 = r1553660 / r1553661;
        double r1553663 = exp(r1553662);
        double r1553664 = log(r1553663);
        return r1553664;
}

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 2019164 
(FPCore (x)
  :name "Prelude:atanh from fay-base-0.20.0.1"
  (/ (+ x 1.0) (- 1.0 x)))