Average Error: 14.4 → 0.1
Time: 1.5m
Precision: 64
Internal Precision: 832
\[\frac{1}{x + 1} - \frac{1}{x - 1}\]
\[-\frac{\frac{1 + 1}{x + 1}}{x - 1}\]

Error

Bits error versus x

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Derivation

  1. Initial program 14.4

    \[\frac{1}{x + 1} - \frac{1}{x - 1}\]
  2. Initial simplification14.4

    \[\leadsto \frac{1}{x + 1} - \frac{1}{x - 1}\]
  3. Using strategy rm
  4. Applied flip--29.1

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

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

    \[\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)\]
  7. Applied associate-/r/14.4

    \[\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)\]
  8. Applied distribute-lft-out--13.8

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

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

    \[\leadsto \frac{1}{x \cdot x - 1} \cdot \color{blue}{\left(\left(0 - 1\right) - 1\right)}\]
  11. Using strategy rm
  12. Applied difference-of-sqr-10.4

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

    \[\leadsto \color{blue}{\frac{\frac{1}{x + 1}}{x - 1}} \cdot \left(\left(0 - 1\right) - 1\right)\]
  14. Using strategy rm
  15. Applied flip3--0.1

    \[\leadsto \frac{\frac{1}{x + 1}}{x - 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)}}\]
  16. Applied frac-times0.1

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

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

    \[\leadsto \frac{\frac{-\left(1 + 1\right)}{x + 1}}{\color{blue}{x - 1}}\]
  19. Final simplification0.1

    \[\leadsto -\frac{\frac{1 + 1}{x + 1}}{x - 1}\]

Runtime

Time bar (total: 1.5m)Debug logProfile

herbie shell --seed 2018225 +o rules:numerics
(FPCore (x)
  :name "Asymptote A"
  (- (/ 1 (+ x 1)) (/ 1 (- x 1))))