Initial program 9.5
\[\left(\frac{1}{x + 1} - \frac{2}{x}\right) + \frac{1}{x - 1}
\]
Simplified9.5
\[\leadsto \color{blue}{\frac{1}{1 + x} + \left(\frac{1}{x + -1} + \frac{-2}{x}\right)}
\]
Proof
(+.f64 (/.f64 1 (+.f64 1 x)) (+.f64 (/.f64 1 (+.f64 x -1)) (/.f64 -2 x))): 0 points increase in error, 0 points decrease in error
(+.f64 (/.f64 1 (Rewrite<= +-commutative_binary64 (+.f64 x 1))) (+.f64 (/.f64 1 (+.f64 x -1)) (/.f64 -2 x))): 0 points increase in error, 0 points decrease in error
(+.f64 (/.f64 1 (+.f64 x 1)) (+.f64 (/.f64 1 (+.f64 x (Rewrite<= metadata-eval (neg.f64 1)))) (/.f64 -2 x))): 0 points increase in error, 0 points decrease in error
(+.f64 (/.f64 1 (+.f64 x 1)) (+.f64 (/.f64 1 (Rewrite<= sub-neg_binary64 (-.f64 x 1))) (/.f64 -2 x))): 0 points increase in error, 0 points decrease in error
(+.f64 (/.f64 1 (+.f64 x 1)) (+.f64 (/.f64 1 (-.f64 x 1)) (/.f64 (Rewrite<= metadata-eval (neg.f64 2)) x))): 0 points increase in error, 0 points decrease in error
(+.f64 (/.f64 1 (+.f64 x 1)) (+.f64 (/.f64 1 (-.f64 x 1)) (Rewrite<= distribute-neg-frac_binary64 (neg.f64 (/.f64 2 x))))): 0 points increase in error, 0 points decrease in error
(+.f64 (/.f64 1 (+.f64 x 1)) (Rewrite<= +-commutative_binary64 (+.f64 (neg.f64 (/.f64 2 x)) (/.f64 1 (-.f64 x 1))))): 0 points increase in error, 0 points decrease in error
(Rewrite<= associate-+l+_binary64 (+.f64 (+.f64 (/.f64 1 (+.f64 x 1)) (neg.f64 (/.f64 2 x))) (/.f64 1 (-.f64 x 1)))): 0 points increase in error, 0 points decrease in error
(+.f64 (Rewrite<= sub-neg_binary64 (-.f64 (/.f64 1 (+.f64 x 1)) (/.f64 2 x))) (/.f64 1 (-.f64 x 1))): 0 points increase in error, 0 points decrease in error
Applied egg-rr25.0
\[\leadsto \color{blue}{\frac{\mathsf{fma}\left(-1, x \cdot \left(x + -1\right), \mathsf{fma}\left(x, -1, -1\right) \cdot \mathsf{fma}\left(x + -1, -2, x\right)\right)}{\mathsf{fma}\left(x, -1, -1\right) \cdot \left(x \cdot \left(x + -1\right)\right)}}
\]
Taylor expanded in x around 0 0.2
\[\leadsto \frac{\color{blue}{-2}}{\mathsf{fma}\left(x, -1, -1\right) \cdot \left(x \cdot \left(x + -1\right)\right)}
\]
Applied egg-rr0.1
\[\leadsto \color{blue}{0 + \frac{\frac{-2}{\mathsf{fma}\left(x, -1, -1\right)}}{\mathsf{fma}\left(x, x, -x\right)}}
\]
Final simplification0.1
\[\leadsto \frac{\frac{-2}{\mathsf{fma}\left(x, -1, -1\right)}}{\mathsf{fma}\left(x, x, -x\right)}
\]