\[{\left(x + 1\right)}^{\left(\frac{1}{n}\right)} - {x}^{\left(\frac{1}{n}\right)}\]
Test:
NMSE problem 3.4.6
Bits:
128 bits
Bits error versus x
Bits error versus n
Time: 29.1 s
Input Error: 30.9
Output Error: 7.7
Log:
Profile: 🕒
\(\begin{cases} \left(\frac{\frac{1}{n}}{x} - \frac{\frac{1}{2}}{{x}^2 \cdot n}\right) + \frac{\log x}{x \cdot \left(n \cdot n\right)} & \text{when } n \le -91874156718365.66 \\ e^{\frac{\log_* (1 + x)}{n}} - {x}^{\left(\frac{1}{n}\right)} & \text{when } n \le 1.888112624037396 \cdot 10^{+21} \\ \left(\frac{\frac{1}{n}}{x} - \frac{\frac{1}{2}}{{x}^2 \cdot n}\right) + \frac{\log x}{x \cdot \left(n \cdot n\right)} & \text{otherwise} \end{cases}\)

    if n < -91874156718365.66 or 1.888112624037396e+21 < n

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

    7. Applied final simplification

    if -91874156718365.66 < n < 1.888112624037396e+21

    1. Started with
      \[{\left(x + 1\right)}^{\left(\frac{1}{n}\right)} - {x}^{\left(\frac{1}{n}\right)}\]
      6.6
    2. Using strategy rm
      6.6
    3. Applied add-exp-log to get
      \[{\color{red}{\left(x + 1\right)}}^{\left(\frac{1}{n}\right)} - {x}^{\left(\frac{1}{n}\right)} \leadsto {\color{blue}{\left(e^{\log \left(x + 1\right)}\right)}}^{\left(\frac{1}{n}\right)} - {x}^{\left(\frac{1}{n}\right)}\]
      6.6
    4. Applied pow-exp to get
      \[\color{red}{{\left(e^{\log \left(x + 1\right)}\right)}^{\left(\frac{1}{n}\right)}} - {x}^{\left(\frac{1}{n}\right)} \leadsto \color{blue}{e^{\log \left(x + 1\right) \cdot \frac{1}{n}}} - {x}^{\left(\frac{1}{n}\right)}\]
      6.6
    5. Applied simplify to get
      \[e^{\color{red}{\log \left(x + 1\right) \cdot \frac{1}{n}}} - {x}^{\left(\frac{1}{n}\right)} \leadsto e^{\color{blue}{\frac{\log_* (1 + x)}{n}}} - {x}^{\left(\frac{1}{n}\right)}\]
      5.7

  1. Removed slow pow expressions

Original test:


(lambda ((x default) (n default))
  #:name "NMSE problem 3.4.6"
  (- (pow (+ x 1) (/ 1 n)) (pow x (/ 1 n))))