Average Error: 14.7 → 0.4
Time: 1.2m
Precision: 64
Internal Precision: 128
\[\frac{1}{x + 1} - \frac{1}{x - 1}\]
\[\frac{1}{x \cdot x - 1} \cdot -2\]

Error

Bits error versus x

Derivation

  1. Initial program 14.7

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

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

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

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

    \[\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--14.0

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

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

    \[\leadsto \frac{1}{x \cdot x - 1} \cdot \color{blue}{-2}\]
  10. Final simplification0.4

    \[\leadsto \frac{1}{x \cdot x - 1} \cdot -2\]

Reproduce

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