\[\frac{1}{\sqrt{x}} - \frac{1}{\sqrt{x + 1}}\]
Test:
NMSE example 3.6
Bits:
128 bits
Bits error versus x
Time: 11.3 s
Input Error: 8.4
Output Error: 0.3
Log:
Profile: 🕒
\(\frac{1}{\frac{\frac{x}{\sqrt{x}} + \frac{x}{\sqrt{1 + x}}}{\frac{1}{1 + x}}}\)
  1. Started with
    \[\frac{1}{\sqrt{x}} - \frac{1}{\sqrt{x + 1}}\]
    8.4
  2. Using strategy rm
    8.4
  3. Applied flip-- to get
    \[\color{red}{\frac{1}{\sqrt{x}} - \frac{1}{\sqrt{x + 1}}} \leadsto \color{blue}{\frac{{\left(\frac{1}{\sqrt{x}}\right)}^2 - {\left(\frac{1}{\sqrt{x + 1}}\right)}^2}{\frac{1}{\sqrt{x}} + \frac{1}{\sqrt{x + 1}}}}\]
    8.4
  4. Applied simplify to get
    \[\frac{\color{red}{{\left(\frac{1}{\sqrt{x}}\right)}^2 - {\left(\frac{1}{\sqrt{x + 1}}\right)}^2}}{\frac{1}{\sqrt{x}} + \frac{1}{\sqrt{x + 1}}} \leadsto \frac{\color{blue}{\frac{1}{x} - \frac{1}{1 + x}}}{\frac{1}{\sqrt{x}} + \frac{1}{\sqrt{x + 1}}}\]
    8.3
  5. Using strategy rm
    8.3
  6. Applied frac-sub to get
    \[\frac{\color{red}{\frac{1}{x} - \frac{1}{1 + x}}}{\frac{1}{\sqrt{x}} + \frac{1}{\sqrt{x + 1}}} \leadsto \frac{\color{blue}{\frac{1 \cdot \left(1 + x\right) - x \cdot 1}{x \cdot \left(1 + x\right)}}}{\frac{1}{\sqrt{x}} + \frac{1}{\sqrt{x + 1}}}\]
    7.4
  7. Applied associate-/l/ to get
    \[\color{red}{\frac{\frac{1 \cdot \left(1 + x\right) - x \cdot 1}{x \cdot \left(1 + x\right)}}{\frac{1}{\sqrt{x}} + \frac{1}{\sqrt{x + 1}}}} \leadsto \color{blue}{\frac{1 \cdot \left(1 + x\right) - x \cdot 1}{\left(\frac{1}{\sqrt{x}} + \frac{1}{\sqrt{x + 1}}\right) \cdot \left(x \cdot \left(1 + x\right)\right)}}\]
    7.3
  8. Using strategy rm
    7.3
  9. Applied clear-num to get
    \[\color{red}{\frac{1 \cdot \left(1 + x\right) - x \cdot 1}{\left(\frac{1}{\sqrt{x}} + \frac{1}{\sqrt{x + 1}}\right) \cdot \left(x \cdot \left(1 + x\right)\right)}} \leadsto \color{blue}{\frac{1}{\frac{\left(\frac{1}{\sqrt{x}} + \frac{1}{\sqrt{x + 1}}\right) \cdot \left(x \cdot \left(1 + x\right)\right)}{1 \cdot \left(1 + x\right) - x \cdot 1}}}\]
    7.3
  10. Applied simplify to get
    \[\frac{1}{\color{red}{\frac{\left(\frac{1}{\sqrt{x}} + \frac{1}{\sqrt{x + 1}}\right) \cdot \left(x \cdot \left(1 + x\right)\right)}{1 \cdot \left(1 + x\right) - x \cdot 1}}} \leadsto \frac{1}{\color{blue}{\frac{\frac{x}{\sqrt{x}} + \frac{x}{\sqrt{1 + x}}}{\frac{1}{1 + x}}}}\]
    0.3

  11. Removed slow pow expressions

Original test:


(lambda ((x default))
  #:name "NMSE example 3.6"
  (- (/ 1 (sqrt x)) (/ 1 (sqrt (+ x 1))))
  #:target
  (/ 1 (+ (* (+ x 1) (sqrt x)) (* x (sqrt (+ x 1))))))