Average Error: 14.2 → 0.1
Time: 10.5s
Precision: 64
\[\frac{1}{x + 1} - \frac{1}{x - 1}\]
\[\frac{\frac{\frac{-2 \cdot {1}^{4}}{1 + x}}{x - 1}}{1 \cdot 1 + \left(\left(-1\right) \cdot 1 + 1 \cdot 1\right)}\]
\frac{1}{x + 1} - \frac{1}{x - 1}
\frac{\frac{\frac{-2 \cdot {1}^{4}}{1 + x}}{x - 1}}{1 \cdot 1 + \left(\left(-1\right) \cdot 1 + 1 \cdot 1\right)}
double f(double x) {
        double r75984 = 1.0;
        double r75985 = x;
        double r75986 = r75985 + r75984;
        double r75987 = r75984 / r75986;
        double r75988 = r75985 - r75984;
        double r75989 = r75984 / r75988;
        double r75990 = r75987 - r75989;
        return r75990;
}

double f(double x) {
        double r75991 = -2.0;
        double r75992 = 1.0;
        double r75993 = 4.0;
        double r75994 = pow(r75992, r75993);
        double r75995 = r75991 * r75994;
        double r75996 = x;
        double r75997 = r75992 + r75996;
        double r75998 = r75995 / r75997;
        double r75999 = r75996 - r75992;
        double r76000 = r75998 / r75999;
        double r76001 = r75992 * r75992;
        double r76002 = -r75992;
        double r76003 = r76002 * r75992;
        double r76004 = r76003 + r76001;
        double r76005 = r76001 + r76004;
        double r76006 = r76000 / r76005;
        return r76006;
}

Error

Bits error versus x

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Derivation

  1. Initial program 14.2

    \[\frac{1}{x + 1} - \frac{1}{x - 1}\]
  2. Using strategy rm
  3. Applied flip--29.4

    \[\leadsto \frac{1}{x + 1} - \frac{1}{\color{blue}{\frac{x \cdot x - 1 \cdot 1}{x + 1}}}\]
  4. Applied associate-/r/29.4

    \[\leadsto \frac{1}{x + 1} - \color{blue}{\frac{1}{x \cdot x - 1 \cdot 1} \cdot \left(x + 1\right)}\]
  5. Applied flip-+14.3

    \[\leadsto \frac{1}{\color{blue}{\frac{x \cdot x - 1 \cdot 1}{x - 1}}} - \frac{1}{x \cdot x - 1 \cdot 1} \cdot \left(x + 1\right)\]
  6. Applied associate-/r/14.2

    \[\leadsto \color{blue}{\frac{1}{x \cdot x - 1 \cdot 1} \cdot \left(x - 1\right)} - \frac{1}{x \cdot x - 1 \cdot 1} \cdot \left(x + 1\right)\]
  7. Applied distribute-lft-out--13.7

    \[\leadsto \color{blue}{\frac{1}{x \cdot x - 1 \cdot 1} \cdot \left(\left(x - 1\right) - \left(x + 1\right)\right)}\]
  8. Simplified0.4

    \[\leadsto \frac{1}{x \cdot x - 1 \cdot 1} \cdot \color{blue}{\left(\left(0 - 1\right) - 1\right)}\]
  9. Using strategy rm
  10. Applied flip3--0.4

    \[\leadsto \frac{1}{x \cdot x - 1 \cdot 1} \cdot \color{blue}{\frac{{\left(0 - 1\right)}^{3} - {1}^{3}}{\left(0 - 1\right) \cdot \left(0 - 1\right) + \left(1 \cdot 1 + \left(0 - 1\right) \cdot 1\right)}}\]
  11. Applied associate-*r/0.4

    \[\leadsto \color{blue}{\frac{\frac{1}{x \cdot x - 1 \cdot 1} \cdot \left({\left(0 - 1\right)}^{3} - {1}^{3}\right)}{\left(0 - 1\right) \cdot \left(0 - 1\right) + \left(1 \cdot 1 + \left(0 - 1\right) \cdot 1\right)}}\]
  12. Simplified0.1

    \[\leadsto \frac{\color{blue}{\frac{\frac{2 \cdot \left(-{1}^{4}\right)}{1 + x}}{x - 1}}}{\left(0 - 1\right) \cdot \left(0 - 1\right) + \left(1 \cdot 1 + \left(0 - 1\right) \cdot 1\right)}\]
  13. Final simplification0.1

    \[\leadsto \frac{\frac{\frac{-2 \cdot {1}^{4}}{1 + x}}{x - 1}}{1 \cdot 1 + \left(\left(-1\right) \cdot 1 + 1 \cdot 1\right)}\]

Reproduce

herbie shell --seed 2019325 
(FPCore (x)
  :name "Asymptote A"
  :precision binary64
  (- (/ 1 (+ x 1)) (/ 1 (- x 1))))