Average Error: 29.4 → 0.0
Time: 7.9m
Precision: 64
Internal Precision: 128
\[\frac{x}{x + 1} - \frac{x + 1}{x - 1}\]
\[\frac{\left(-2 + \frac{-1}{x}\right) - 1}{\left(x + 1\right) - \frac{x + 1}{x}}\]

Error

Bits error versus x

Derivation

  1. Initial program 29.4

    \[\frac{x}{x + 1} - \frac{x + 1}{x - 1}\]
  2. Using strategy rm
  3. Applied *-un-lft-identity29.4

    \[\leadsto \frac{x}{x + 1} - \frac{x + 1}{x - \color{blue}{1 \cdot 1}}\]
  4. Applied *-un-lft-identity29.4

    \[\leadsto \frac{x}{x + 1} - \frac{x + 1}{\color{blue}{1 \cdot x} - 1 \cdot 1}\]
  5. Applied distribute-lft-out--29.4

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

    \[\leadsto \frac{x}{x + 1} - \color{blue}{\frac{\frac{x + 1}{1}}{x - 1}}\]
  7. Applied *-un-lft-identity29.4

    \[\leadsto \frac{\color{blue}{1 \cdot x}}{x + 1} - \frac{\frac{x + 1}{1}}{x - 1}\]
  8. Applied associate-/l*29.4

    \[\leadsto \color{blue}{\frac{1}{\frac{x + 1}{x}}} - \frac{\frac{x + 1}{1}}{x - 1}\]
  9. Applied frac-sub29.1

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

    \[\leadsto \frac{\color{blue}{\left(x - \left(x + 1\right) \cdot \frac{x + 1}{x}\right) - 1}}{\frac{x + 1}{x} \cdot \left(x - 1\right)}\]
  11. Taylor expanded around inf 0.1

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

    \[\leadsto \frac{\color{blue}{\left(\frac{-1}{x} + -2\right)} - 1}{\frac{x + 1}{x} \cdot \left(x - 1\right)}\]
  13. Using strategy rm
  14. Applied *-un-lft-identity0.1

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

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

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

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

Reproduce

herbie shell --seed 2019072 
(FPCore (x)
  :name "Asymptote C"
  (- (/ x (+ x 1)) (/ (+ x 1) (- x 1))))