\[{\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: 20.9 s
Input Error: 19.3
Output Error: 17.4
Log:
Profile: 🕒
\(\begin{cases} (\left(\frac{\log_* (1 + \frac{1}{x})}{n}\right) * \left((\left(\frac{\log_* (1 + \frac{1}{x})}{n}\right) * \frac{1}{2} + 1)_*\right) + \left(1 - {x}^{\left(\frac{1}{n}\right)}\right))_* & \text{when } n \le -4.3714314f+08 \\ e^{\log_* (1 + (e^{\frac{\log_* (1 + x)}{n}} - 1)^*)} - {x}^{\left(\frac{1}{n}\right)} & \text{when } n \le 1.00002963f+09 \\ (\left(\frac{\log_* (1 + \frac{1}{x})}{n}\right) * \left((\left(\frac{\log_* (1 + \frac{1}{x})}{n}\right) * \frac{1}{2} + 1)_*\right) + \left(1 - {x}^{\left(\frac{1}{n}\right)}\right))_* & \text{otherwise} \end{cases}\)

    if n < -4.3714314f+08 or 1.00002963f+09 < n

    1. Started with
      \[{\left(x + 1\right)}^{\left(\frac{1}{n}\right)} - {x}^{\left(\frac{1}{n}\right)}\]
      28.4
    2. Using strategy rm
      28.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)}\]
      28.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)}\]
      28.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)}\]
      28.4
    6. Applied taylor to get
      \[e^{\frac{\log_* (1 + x)}{n}} - {x}^{\left(\frac{1}{n}\right)} \leadsto \left(\frac{\log_* (1 + \frac{1}{x})}{n} + \left(1 + \frac{1}{2} \cdot \frac{{\left(\log_* (1 + \frac{1}{x})\right)}^2}{{n}^2}\right)\right) - {x}^{\left(\frac{1}{n}\right)}\]
      27.5
    7. Taylor expanded around inf to get
      \[\color{red}{\left(\frac{\log_* (1 + \frac{1}{x})}{n} + \left(1 + \frac{1}{2} \cdot \frac{{\left(\log_* (1 + \frac{1}{x})\right)}^2}{{n}^2}\right)\right)} - {x}^{\left(\frac{1}{n}\right)} \leadsto \color{blue}{\left(\frac{\log_* (1 + \frac{1}{x})}{n} + \left(1 + \frac{1}{2} \cdot \frac{{\left(\log_* (1 + \frac{1}{x})\right)}^2}{{n}^2}\right)\right)} - {x}^{\left(\frac{1}{n}\right)}\]
      27.5
    8. Applied simplify to get
      \[\color{red}{\left(\frac{\log_* (1 + \frac{1}{x})}{n} + \left(1 + \frac{1}{2} \cdot \frac{{\left(\log_* (1 + \frac{1}{x})\right)}^2}{{n}^2}\right)\right) - {x}^{\left(\frac{1}{n}\right)}} \leadsto \color{blue}{(\left(\frac{\log_* (1 + \frac{1}{x})}{n}\right) * \left((\left(\frac{\log_* (1 + \frac{1}{x})}{n}\right) * \frac{1}{2} + 1)_*\right) + \left(1 - {x}^{\left(\frac{1}{n}\right)}\right))_*}\]
      25.8

    if -4.3714314f+08 < n < 1.00002963f+09

    1. Started with
      \[{\left(x + 1\right)}^{\left(\frac{1}{n}\right)} - {x}^{\left(\frac{1}{n}\right)}\]
      8.0
    2. Using strategy rm
      8.0
    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)}\]
      8.1
    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)}\]
      8.1
    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)}\]
      6.9
    6. Using strategy rm
      6.9
    7. Applied log1p-expm1-u to get
      \[e^{\color{red}{\frac{\log_* (1 + x)}{n}}} - {x}^{\left(\frac{1}{n}\right)} \leadsto e^{\color{blue}{\log_* (1 + (e^{\frac{\log_* (1 + x)}{n}} - 1)^*)}} - {x}^{\left(\frac{1}{n}\right)}\]
      7.0

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