Average Error: 0.0 → 0.0
Time: 34.6s
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 r1915624 = x;
        double r1915625 = 1.0;
        double r1915626 = r1915624 + r1915625;
        double r1915627 = r1915625 - r1915624;
        double r1915628 = r1915626 / r1915627;
        return r1915628;
}

double f(double x) {
        double r1915629 = 1.0;
        double r1915630 = x;
        double r1915631 = r1915629 + r1915630;
        double r1915632 = r1915629 - r1915630;
        double r1915633 = r1915631 / r1915632;
        double r1915634 = exp(r1915633);
        double r1915635 = log(r1915634);
        return r1915635;
}

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)))