\[\frac{1}{x + 1} - \frac{1}{x}\]
Test:
NMSE problem 3.3.1
Bits:
128 bits
Bits error versus x
Time: 4.3 s
Input Error: 5.7
Output Error: 0.2
Log:
Profile: 🕒
\(\begin{cases} \frac{\frac{1}{x}}{x \cdot x} - \frac{\frac{1}{x}}{x} & \text{when } x \le -295.29782f0 \\ \frac{1}{x + 1} - \frac{1}{x} & \text{when } x \le 1205.5272f0 \\ \frac{\frac{1}{x}}{x \cdot x} - \frac{\frac{1}{x}}{x} & \text{otherwise} \end{cases}\)

    if x < -295.29782f0 or 1205.5272f0 < x

    1. Started with
      \[\frac{1}{x + 1} - \frac{1}{x}\]
      12.1
    2. Applied taylor to get
      \[\frac{1}{x + 1} - \frac{1}{x} \leadsto \left(\left(\frac{1}{x} + \frac{1}{{x}^{3}}\right) - \frac{1}{{x}^2}\right) - \frac{1}{x}\]
      5.3
    3. Taylor expanded around inf to get
      \[\color{red}{\left(\left(\frac{1}{x} + \frac{1}{{x}^{3}}\right) - \frac{1}{{x}^2}\right)} - \frac{1}{x} \leadsto \color{blue}{\left(\left(\frac{1}{x} + \frac{1}{{x}^{3}}\right) - \frac{1}{{x}^2}\right)} - \frac{1}{x}\]
      5.3
    4. Applied simplify to get
      \[\color{red}{\left(\left(\frac{1}{x} + \frac{1}{{x}^{3}}\right) - \frac{1}{{x}^2}\right) - \frac{1}{x}} \leadsto \color{blue}{\frac{\frac{1}{x}}{x \cdot x} - \frac{\frac{1}{x}}{x}}\]
      0.1

    if -295.29782f0 < x < 1205.5272f0

    1. Started with
      \[\frac{1}{x + 1} - \frac{1}{x}\]
      0.2

  1. Removed slow pow expressions

Original test:


(lambda ((x default))
  #:name "NMSE problem 3.3.1"
  (- (/ 1 (+ x 1)) (/ 1 x)))