Average Error: 14.4 → 0.1
Time: 1.5m
Precision: 64
Internal Precision: 832
\[\frac{1}{x + 1} - \frac{1}{x - 1}\]
\[\frac{\frac{-2}{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. Using strategy rm
  3. Applied frac-sub13.9

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

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

    \[\leadsto \frac{\left(x - 1\right) - \left(x + 1\right)}{\color{blue}{x \cdot x - 1}}\]
  6. Taylor expanded around 0 0.3

    \[\leadsto \frac{\color{blue}{-2}}{x \cdot x - 1}\]
  7. Using strategy rm
  8. Applied difference-of-sqr-10.4

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

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

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

Runtime

Time bar (total: 1.5m)Debug logProfile

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