\[{\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: 22.7 s
Input Error: 14.6
Output Error: 10.0
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 -1021.6977f0 \\ {\left(\log \left(e^{\sqrt[3]{{\left(x + 1\right)}^{\left(\frac{1}{n}\right)} - {x}^{\left(\frac{1}{n}\right)}}}\right)\right)}^3 & \text{otherwise} \end{cases}\)

    if n < -1021.6977f0

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

    if -1021.6977f0 < n

    1. Started with
      \[{\left(x + 1\right)}^{\left(\frac{1}{n}\right)} - {x}^{\left(\frac{1}{n}\right)}\]
      12.0
    2. Using strategy rm
      12.0
    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}\]
      12.0
    4. Using strategy rm
      12.0
    5. Applied add-log-exp 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(\log \left(e^{\sqrt[3]{{\left(x + 1\right)}^{\left(\frac{1}{n}\right)} - {x}^{\left(\frac{1}{n}\right)}}}\right)\right)}}^3\]
      12.2

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