\[\left(\frac{1}{x + 1} - \frac{2}{x}\right) + \frac{1}{x - 1}\]
Test:
NMSE problem 3.3.3
Bits:
128 bits
Bits error versus x
Time: 7.0 s
Input Error: 10.7
Output Error: 0.3
Log:
Profile: 🕒
\(\begin{cases} \left(\frac{2}{{x}^{5}} + \frac{2}{{x}^{7}}\right) + \frac{2}{{x}^3} & \text{when } x \le -2.633003449024554 \\ \left(-2\right) \cdot (\left((x * x + 1)_*\right) * x + \left(\frac{1}{x}\right))_* & \text{when } x \le 228205724867.64624 \\ \left(\frac{2}{{x}^{5}} + \frac{2}{{x}^{7}}\right) + \frac{2}{{x}^3} & \text{otherwise} \end{cases}\)

    if x < -2.633003449024554 or 228205724867.64624 < x

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

    if -2.633003449024554 < x < 228205724867.64624

    1. Started with
      \[\left(\frac{1}{x + 1} - \frac{2}{x}\right) + \frac{1}{x - 1}\]
      1.5
    2. Applied taylor to get
      \[\left(\frac{1}{x + 1} - \frac{2}{x}\right) + \frac{1}{x - 1} \leadsto -\left(2 \cdot {x}^{3} + \left(2 \cdot \frac{1}{x} + 2 \cdot x\right)\right)\]
      0.0
    3. Taylor expanded around 0 to get
      \[\color{red}{-\left(2 \cdot {x}^{3} + \left(2 \cdot \frac{1}{x} + 2 \cdot x\right)\right)} \leadsto \color{blue}{-\left(2 \cdot {x}^{3} + \left(2 \cdot \frac{1}{x} + 2 \cdot x\right)\right)}\]
      0.0
    4. Applied simplify to get
      \[\color{red}{-\left(2 \cdot {x}^{3} + \left(2 \cdot \frac{1}{x} + 2 \cdot x\right)\right)} \leadsto \color{blue}{\left(-2\right) \cdot (\left((x * x + 1)_*\right) * x + \left(\frac{1}{x}\right))_*}\]
      0.0

  1. Removed slow pow expressions

Original test:


(lambda ((x default))
  #:name "NMSE problem 3.3.3"
  (+ (- (/ 1 (+ x 1)) (/ 2 x)) (/ 1 (- x 1)))
  #:target
  (/ 2 (* x (- (sqr x) 1))))