Average Error: 32.6 → 7.0
Time: 59.9s
Precision: 64
Internal Precision: 1344
\[{\left(x + 1\right)}^{\left(\frac{1}{n}\right)} - {x}^{\left(\frac{1}{n}\right)}\]
\[\begin{array}{l} \mathbf{if}\;x \le 0.5096559954462845:\\ \;\;\;\;\left({\left(1 + x\right)}^{\left(\frac{1}{n}\right)} - 1\right) - \left(\frac{\frac{\frac{1}{2}}{n}}{n} \cdot \left(\log x \cdot \log x\right) + \frac{\log x}{n}\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{\frac{1}{n}}{x}}{e^{\frac{\frac{1}{2}}{x}}} \cdot e^{\frac{\log x}{n}}\\ \end{array}\]

Error

Bits error versus x

Bits error versus n

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Derivation

  1. Split input into 2 regimes
  2. if x < 0.5096559954462845

    1. Initial program 47.3

      \[{\left(x + 1\right)}^{\left(\frac{1}{n}\right)} - {x}^{\left(\frac{1}{n}\right)}\]
    2. Using strategy rm
    3. Applied add-exp-log48.2

      \[\leadsto \color{blue}{e^{\log \left({\left(x + 1\right)}^{\left(\frac{1}{n}\right)} - {x}^{\left(\frac{1}{n}\right)}\right)}}\]
    4. Taylor expanded around inf 60.3

      \[\leadsto e^{\log \left({\left(x + 1\right)}^{\left(\frac{1}{n}\right)} - \color{blue}{\left(\left(1 + \frac{1}{2} \cdot \frac{{\left(\log \left(\frac{1}{x}\right)\right)}^{2}}{{n}^{2}}\right) - \frac{\log \left(\frac{1}{x}\right)}{n}\right)}\right)}\]
    5. Applied simplify14.7

      \[\leadsto \color{blue}{\left({\left(1 + x\right)}^{\left(\frac{1}{n}\right)} - 1\right) - \left(\frac{\frac{\frac{1}{2}}{n}}{n} \cdot \left(\log x \cdot \log x\right) + \frac{\log x}{n}\right)}\]

    if 0.5096559954462845 < x

    1. Initial program 20.3

      \[{\left(x + 1\right)}^{\left(\frac{1}{n}\right)} - {x}^{\left(\frac{1}{n}\right)}\]
    2. Using strategy rm
    3. Applied add-exp-log20.3

      \[\leadsto \color{blue}{e^{\log \left({\left(x + 1\right)}^{\left(\frac{1}{n}\right)} - {x}^{\left(\frac{1}{n}\right)}\right)}}\]
    4. Taylor expanded around inf 43.4

      \[\leadsto e^{\color{blue}{\left(\log \left(\frac{1}{x}\right) + \log \left(\frac{1}{n}\right)\right) - \left(\frac{1}{2} \cdot \frac{1}{x} + \frac{\log \left(\frac{1}{x}\right)}{n}\right)}}\]
    5. Applied simplify0.6

      \[\leadsto \color{blue}{\frac{\frac{\frac{1}{n}}{x}}{e^{\frac{\frac{1}{2}}{x}}} \cdot e^{\frac{\log x}{n}}}\]
  3. Recombined 2 regimes into one program.

Runtime

Time bar (total: 59.9s)Debug log

herbie shell --seed '#(2775764126 3555076145 3898259844 1891440260 2599947619 1948460636)' 
(FPCore (x n)
  :name "pow(x+1,1/n)-pow(x,1/n)"
  (- (pow (+ x 1) (/ 1 n)) (pow x (/ 1 n))))