\[{\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.6 s
Input Error: 14.4
Output Error: 5.3
Log:
Profile: 🕒
\(\begin{cases} \left(\frac{1}{n \cdot x} - \frac{\frac{\frac{1}{2}}{n}}{x \cdot x}\right) - \frac{\frac{\log x}{n \cdot x}}{n} & \text{when } n \le -36550324.0f0 \\ {\left({\left(\sqrt[3]{\sqrt[3]{{\left(x + 1\right)}^{\left(\frac{1}{n}\right)} - {x}^{\left(\frac{1}{n}\right)}}}\right)}^3\right)}^3 & \text{when } n \le 150622.2f0 \\ \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 < -36550324.0f0

    1. Started with
      \[{\left(x + 1\right)}^{\left(\frac{1}{n}\right)} - {x}^{\left(\frac{1}{n}\right)}\]
      20.1
    2. Using strategy rm
      20.1
    3. Applied add-cube-cbrt to get
      \[\color{red}{{\left(x + 1\right)}^{\left(\frac{1}{n}\right)} - {x}^{\left(\frac{1}{n}\right)}} \leadsto \color{blue}{{\left(\sqrt[3]{{\left(x + 1\right)}^{\left(\frac{1}{n}\right)} - {x}^{\left(\frac{1}{n}\right)}}\right)}^3}\]
      20.1
    4. Applied taylor to get
      \[{\left(\sqrt[3]{{\left(x + 1\right)}^{\left(\frac{1}{n}\right)} - {x}^{\left(\frac{1}{n}\right)}}\right)}^3 \leadsto {\left(\sqrt[3]{\frac{1}{n \cdot x} - \left(\frac{\log x}{{n}^2 \cdot x} + \frac{1}{2} \cdot \frac{1}{n \cdot {x}^2}\right)}\right)}^3\]
      5.2
    5. Taylor expanded around inf to get
      \[{\left(\sqrt[3]{\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)}}\right)}^3 \leadsto {\left(\sqrt[3]{\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)}}\right)}^3\]
      5.2
    6. Applied simplify to get
      \[\color{red}{{\left(\sqrt[3]{\frac{1}{n \cdot x} - \left(\frac{\log x}{{n}^2 \cdot x} + \frac{1}{2} \cdot \frac{1}{n \cdot {x}^2}\right)}\right)}^3} \leadsto \color{blue}{\left(\frac{1}{n \cdot x} - \frac{\frac{\frac{1}{2}}{n}}{x \cdot x}\right) - \frac{\frac{\log x}{n \cdot x}}{n}}\]
      4.9

    if -36550324.0f0 < n < 150622.2f0

    1. Started with
      \[{\left(x + 1\right)}^{\left(\frac{1}{n}\right)} - {x}^{\left(\frac{1}{n}\right)}\]
      5.8
    2. Using strategy rm
      5.8
    3. Applied add-cube-cbrt to get
      \[\color{red}{{\left(x + 1\right)}^{\left(\frac{1}{n}\right)} - {x}^{\left(\frac{1}{n}\right)}} \leadsto \color{blue}{{\left(\sqrt[3]{{\left(x + 1\right)}^{\left(\frac{1}{n}\right)} - {x}^{\left(\frac{1}{n}\right)}}\right)}^3}\]
      5.9
    4. Using strategy rm
      5.9
    5. Applied add-cube-cbrt to get
      \[{\color{red}{\left(\sqrt[3]{{\left(x + 1\right)}^{\left(\frac{1}{n}\right)} - {x}^{\left(\frac{1}{n}\right)}}\right)}}^3 \leadsto {\color{blue}{\left({\left(\sqrt[3]{\sqrt[3]{{\left(x + 1\right)}^{\left(\frac{1}{n}\right)} - {x}^{\left(\frac{1}{n}\right)}}}\right)}^3\right)}}^3\]
      5.9

    if 150622.2f0 < n

    1. Started with
      \[{\left(x + 1\right)}^{\left(\frac{1}{n}\right)} - {x}^{\left(\frac{1}{n}\right)}\]
      21.0
    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)\]
      4.8
    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)}\]
      4.8

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