Average Error: 14.3 → 0.3
Time: 11.1s
Precision: 64
\[\frac{1}{x + 1} - \frac{1}{x - 1}\]
\[\left(\frac{1}{x - 1} \cdot 2\right) \cdot \frac{\frac{\frac{-1}{\sqrt[3]{x + 1}}}{\sqrt[3]{x + 1}}}{\sqrt[3]{x + 1}}\]
\frac{1}{x + 1} - \frac{1}{x - 1}
\left(\frac{1}{x - 1} \cdot 2\right) \cdot \frac{\frac{\frac{-1}{\sqrt[3]{x + 1}}}{\sqrt[3]{x + 1}}}{\sqrt[3]{x + 1}}
double f(double x) {
        double r94725 = 1.0;
        double r94726 = x;
        double r94727 = r94726 + r94725;
        double r94728 = r94725 / r94727;
        double r94729 = r94726 - r94725;
        double r94730 = r94725 / r94729;
        double r94731 = r94728 - r94730;
        return r94731;
}

double f(double x) {
        double r94732 = 1.0;
        double r94733 = x;
        double r94734 = r94733 - r94732;
        double r94735 = r94732 / r94734;
        double r94736 = 2.0;
        double r94737 = r94735 * r94736;
        double r94738 = -1.0;
        double r94739 = r94733 + r94732;
        double r94740 = cbrt(r94739);
        double r94741 = r94738 / r94740;
        double r94742 = r94741 / r94740;
        double r94743 = r94742 / r94740;
        double r94744 = r94737 * r94743;
        return r94744;
}

Error

Bits error versus x

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Derivation

  1. Initial program 14.3

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

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

    \[\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.3

    \[\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. Taylor expanded around 0 0.4

    \[\leadsto \frac{1}{x \cdot x - 1 \cdot 1} \cdot \color{blue}{\left(-2\right)}\]
  9. Using strategy rm
  10. Applied difference-of-squares0.4

    \[\leadsto \frac{1}{\color{blue}{\left(x + 1\right) \cdot \left(x - 1\right)}} \cdot \left(-2\right)\]
  11. Applied *-un-lft-identity0.4

    \[\leadsto \frac{\color{blue}{1 \cdot 1}}{\left(x + 1\right) \cdot \left(x - 1\right)} \cdot \left(-2\right)\]
  12. Applied times-frac0.1

    \[\leadsto \color{blue}{\left(\frac{1}{x + 1} \cdot \frac{1}{x - 1}\right)} \cdot \left(-2\right)\]
  13. Applied associate-*l*0.1

    \[\leadsto \color{blue}{\frac{1}{x + 1} \cdot \left(\frac{1}{x - 1} \cdot \left(-2\right)\right)}\]
  14. Using strategy rm
  15. Applied add-cube-cbrt0.3

    \[\leadsto \frac{1}{\color{blue}{\left(\sqrt[3]{x + 1} \cdot \sqrt[3]{x + 1}\right) \cdot \sqrt[3]{x + 1}}} \cdot \left(\frac{1}{x - 1} \cdot \left(-2\right)\right)\]
  16. Applied associate-/r*0.3

    \[\leadsto \color{blue}{\frac{\frac{1}{\sqrt[3]{x + 1} \cdot \sqrt[3]{x + 1}}}{\sqrt[3]{x + 1}}} \cdot \left(\frac{1}{x - 1} \cdot \left(-2\right)\right)\]
  17. Simplified0.3

    \[\leadsto \frac{\color{blue}{\frac{\frac{1}{\sqrt[3]{x + 1}}}{\sqrt[3]{x + 1}}}}{\sqrt[3]{x + 1}} \cdot \left(\frac{1}{x - 1} \cdot \left(-2\right)\right)\]
  18. Final simplification0.3

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

Reproduce

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