\[{\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: 28.3 s
Input Error: 30.9
Output Error: 8.4
Log:
Profile: 🕒
\(\begin{cases} \frac{1}{n \cdot x} - \left(\frac{\log x}{{n}^2 \cdot x} + \frac{1}{2} \cdot \frac{1}{n \cdot {x}^2}\right) & \text{when } n \le -91874156718365.66 \\ {\left(x + 1\right)}^{\left(\frac{1}{n}\right)} - {x}^{\left(\frac{1}{n}\right)} & \text{when } n \le 1.888112624037396 \cdot 10^{+21} \\ \frac{1}{n \cdot x} - \left(\frac{\log x}{{n}^2 \cdot x} + \frac{1}{2} \cdot \frac{1}{n \cdot {x}^2}\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

    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

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