\[\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: 8.2 s
Input Error: 9.6
Output Error: 0.2
Log:
Profile: 🕒
\(\begin{cases} \left(\frac{2}{{x}^{5}} + \frac{2}{{x}^{7}}\right) + \frac{\frac{2}{x}}{x \cdot x} & \text{when } x \le -0.09197678863246804 \\ \left(\frac{1}{x + 1} - \frac{2}{x}\right) + \frac{1}{x - 1} & \text{when } x \le 36050.53017192879 \\ \left(\frac{2}{{x}^{5}} + \frac{2}{{x}^{7}}\right) + \frac{2}{{x}^{3}} & \text{otherwise} \end{cases}\)

    if x < -0.09197678863246804

    1. Started with
      \[\left(\frac{1}{x + 1} - \frac{2}{x}\right) + \frac{1}{x - 1}\]
      19.0
    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
    5. Using strategy rm
      0.6
    6. Applied cube-mult to get
      \[\left(\frac{2}{{x}^{5}} + \frac{2}{{x}^{7}}\right) + \frac{2}{\color{red}{{x}^3}} \leadsto \left(\frac{2}{{x}^{5}} + \frac{2}{{x}^{7}}\right) + \frac{2}{\color{blue}{x \cdot \left(x \cdot x\right)}}\]
      0.6
    7. Applied associate-/r* to get
      \[\left(\frac{2}{{x}^{5}} + \frac{2}{{x}^{7}}\right) + \color{red}{\frac{2}{x \cdot \left(x \cdot x\right)}} \leadsto \left(\frac{2}{{x}^{5}} + \frac{2}{{x}^{7}}\right) + \color{blue}{\frac{\frac{2}{x}}{x \cdot x}}\]
      0.1

    if -0.09197678863246804 < x < 36050.53017192879

    1. Started with
      \[\left(\frac{1}{x + 1} - \frac{2}{x}\right) + \frac{1}{x - 1}\]
      0.1

    if 36050.53017192879 < x

    1. Started with
      \[\left(\frac{1}{x + 1} - \frac{2}{x}\right) + \frac{1}{x - 1}\]
      19.4
    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.5
    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.5
    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.5
    5. Using strategy rm
      0.5
    6. Applied pow3 to get
      \[\left(\frac{2}{{x}^{5}} + \frac{2}{{x}^{7}}\right) + \frac{2}{\color{red}{{x}^3}} \leadsto \left(\frac{2}{{x}^{5}} + \frac{2}{{x}^{7}}\right) + \frac{2}{\color{blue}{{x}^{3}}}\]
      0.5

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