\[{\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: 18.1 s
Input Error: 42.6
Output Error: 8.9
Log:
Profile: 🕒
\(\begin{cases} \log_* (1 + \left(\frac{1}{n \cdot x} - \frac{\frac{1}{2}}{n \cdot \left(x \cdot x\right)}\right)) & \text{when } n \le -846584004.9676423 \\ e^{\frac{\log_* (1 + x)}{n}} - {x}^{\left(\frac{1}{n}\right)} & \text{when } n \le 1.0094449940811532 \cdot 10^{+18} \\ \log_* (1 + \left(\frac{1}{n \cdot x} - \frac{\frac{1}{2}}{n \cdot \left(x \cdot x\right)}\right)) & \text{otherwise} \end{cases}\)

    if n < -846584004.9676423 or 1.0094449940811532e+18 < n

    1. Started with
      \[{\left(x + 1\right)}^{\left(\frac{1}{n}\right)} - {x}^{\left(\frac{1}{n}\right)}\]
      52.9
    2. Using strategy rm
      52.9
    3. Applied add-log-exp to get
      \[{\left(x + 1\right)}^{\left(\frac{1}{n}\right)} - \color{red}{{x}^{\left(\frac{1}{n}\right)}} \leadsto {\left(x + 1\right)}^{\left(\frac{1}{n}\right)} - \color{blue}{\log \left(e^{{x}^{\left(\frac{1}{n}\right)}}\right)}\]
      52.9
    4. Applied add-log-exp to get
      \[\color{red}{{\left(x + 1\right)}^{\left(\frac{1}{n}\right)}} - \log \left(e^{{x}^{\left(\frac{1}{n}\right)}}\right) \leadsto \color{blue}{\log \left(e^{{\left(x + 1\right)}^{\left(\frac{1}{n}\right)}}\right)} - \log \left(e^{{x}^{\left(\frac{1}{n}\right)}}\right)\]
      52.9
    5. Applied diff-log to get
      \[\color{red}{\log \left(e^{{\left(x + 1\right)}^{\left(\frac{1}{n}\right)}}\right) - \log \left(e^{{x}^{\left(\frac{1}{n}\right)}}\right)} \leadsto \color{blue}{\log \left(\frac{e^{{\left(x + 1\right)}^{\left(\frac{1}{n}\right)}}}{e^{{x}^{\left(\frac{1}{n}\right)}}}\right)}\]
      52.9
    6. Applied simplify to get
      \[\log \color{red}{\left(\frac{e^{{\left(x + 1\right)}^{\left(\frac{1}{n}\right)}}}{e^{{x}^{\left(\frac{1}{n}\right)}}}\right)} \leadsto \log \color{blue}{\left(e^{{\left(x + 1\right)}^{\left(\frac{1}{n}\right)} - {x}^{\left(\frac{1}{n}\right)}}\right)}\]
      52.9
    7. Applied taylor to get
      \[\log \left(e^{{\left(x + 1\right)}^{\left(\frac{1}{n}\right)} - {x}^{\left(\frac{1}{n}\right)}}\right) \leadsto \log \left(\left(1 + \frac{1}{n \cdot x}\right) - \frac{1}{2} \cdot \frac{1}{n \cdot {x}^2}\right)\]
      36.4
    8. Taylor expanded around inf to get
      \[\log \color{red}{\left(\left(1 + \frac{1}{n \cdot x}\right) - \frac{1}{2} \cdot \frac{1}{n \cdot {x}^2}\right)} \leadsto \log \color{blue}{\left(\left(1 + \frac{1}{n \cdot x}\right) - \frac{1}{2} \cdot \frac{1}{n \cdot {x}^2}\right)}\]
      36.4
    9. Applied simplify to get
      \[\log \left(\left(1 + \frac{1}{n \cdot x}\right) - \frac{1}{2} \cdot \frac{1}{n \cdot {x}^2}\right) \leadsto \log_* (1 + \left(\frac{1}{n \cdot x} - \frac{\frac{1}{2}}{n \cdot \left(x \cdot x\right)}\right))\]
      10.2

    10. Applied final simplification

    if -846584004.9676423 < n < 1.0094449940811532e+18

    1. Started with
      \[{\left(x + 1\right)}^{\left(\frac{1}{n}\right)} - {x}^{\left(\frac{1}{n}\right)}\]
      5.4
    2. Using strategy rm
      5.4
    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)}\]
      5.4
    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)}\]
      5.4
    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)}\]
      4.5

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