\[\frac{1}{\sqrt{x}} - \frac{1}{\sqrt{x + 1}}\]
Test:
NMSE example 3.6
Bits:
128 bits
Bits error versus x
Time: 14.0 s
Input Error: 19.4
Output Error: 5.6
Log:
Profile: 🕒
\(\begin{cases} \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)} & \text{when } x \le 10651329494355302.0 \\ \frac{\left(\frac{1}{{x}^2} + \frac{1}{{x}^{4}}\right) - \frac{1}{{x}^{3}}}{\frac{1}{\sqrt{x}} + \frac{1}{\sqrt{x + 1}}} & \text{otherwise} \end{cases}\)

    if x < 10651329494355302.0

    1. Started with
      \[\frac{1}{\sqrt{x}} - \frac{1}{\sqrt{x + 1}}\]
      1.7
    2. Using strategy rm
      1.7
    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}}}}\]
      1.8
    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}}}\]
      1.8
    5. Using strategy rm
      1.8
    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}}}\]
      0.5
    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)}}\]
      0.4

    if 10651329494355302.0 < x

    1. Started with
      \[\frac{1}{\sqrt{x}} - \frac{1}{\sqrt{x + 1}}\]
      39.8
    2. Using strategy rm
      39.8
    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}}}}\]
      39.8
    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}}}\]
      39.8
    5. Applied taylor to get
      \[\frac{\frac{1}{x} - \frac{1}{1 + x}}{\frac{1}{\sqrt{x}} + \frac{1}{\sqrt{x + 1}}} \leadsto \frac{\left(\frac{1}{{x}^2} + \frac{1}{{x}^{4}}\right) - \frac{1}{{x}^{3}}}{\frac{1}{\sqrt{x}} + \frac{1}{\sqrt{x + 1}}}\]
      11.6
    6. Taylor expanded around inf to get
      \[\frac{\color{red}{\left(\frac{1}{{x}^2} + \frac{1}{{x}^{4}}\right) - \frac{1}{{x}^{3}}}}{\frac{1}{\sqrt{x}} + \frac{1}{\sqrt{x + 1}}} \leadsto \frac{\color{blue}{\left(\frac{1}{{x}^2} + \frac{1}{{x}^{4}}\right) - \frac{1}{{x}^{3}}}}{\frac{1}{\sqrt{x}} + \frac{1}{\sqrt{x + 1}}}\]
      11.6

  1. 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))))))