2nthrt (problem 3.4.6)

Percentage Accurate: 53.4% → 82.8%
Time: 29.7s
Alternatives: 19
Speedup: 2.0×

Specification

?
\[\begin{array}{l} \\ {\left(x + 1\right)}^{\left(\frac{1}{n}\right)} - {x}^{\left(\frac{1}{n}\right)} \end{array} \]
(FPCore (x n)
 :precision binary64
 (- (pow (+ x 1.0) (/ 1.0 n)) (pow x (/ 1.0 n))))
double code(double x, double n) {
	return pow((x + 1.0), (1.0 / n)) - pow(x, (1.0 / n));
}
real(8) function code(x, n)
    real(8), intent (in) :: x
    real(8), intent (in) :: n
    code = ((x + 1.0d0) ** (1.0d0 / n)) - (x ** (1.0d0 / n))
end function
public static double code(double x, double n) {
	return Math.pow((x + 1.0), (1.0 / n)) - Math.pow(x, (1.0 / n));
}
def code(x, n):
	return math.pow((x + 1.0), (1.0 / n)) - math.pow(x, (1.0 / n))
function code(x, n)
	return Float64((Float64(x + 1.0) ^ Float64(1.0 / n)) - (x ^ Float64(1.0 / n)))
end
function tmp = code(x, n)
	tmp = ((x + 1.0) ^ (1.0 / n)) - (x ^ (1.0 / n));
end
code[x_, n_] := N[(N[Power[N[(x + 1.0), $MachinePrecision], N[(1.0 / n), $MachinePrecision]], $MachinePrecision] - N[Power[x, N[(1.0 / n), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

\\
{\left(x + 1\right)}^{\left(\frac{1}{n}\right)} - {x}^{\left(\frac{1}{n}\right)}
\end{array}

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

The average percentage accuracy by input value. Horizontal axis shows value of an input variable; the variable is choosen in the title. Vertical axis is accuracy; higher is better. Red represent the original program, while blue represents Herbie's suggestion. These can be toggled with buttons below the plot. The line is an average while dots represent individual samples.

Accuracy vs Speed?

Herbie found 19 alternatives:

AlternativeAccuracySpeedup
The accuracy (vertical axis) and speed (horizontal axis) of each alternatives. Up and to the right is better. The red square shows the initial program, and each blue circle shows an alternative.The line shows the best available speed-accuracy tradeoffs.

Initial Program: 53.4% accurate, 1.0× speedup?

\[\begin{array}{l} \\ {\left(x + 1\right)}^{\left(\frac{1}{n}\right)} - {x}^{\left(\frac{1}{n}\right)} \end{array} \]
(FPCore (x n)
 :precision binary64
 (- (pow (+ x 1.0) (/ 1.0 n)) (pow x (/ 1.0 n))))
double code(double x, double n) {
	return pow((x + 1.0), (1.0 / n)) - pow(x, (1.0 / n));
}
real(8) function code(x, n)
    real(8), intent (in) :: x
    real(8), intent (in) :: n
    code = ((x + 1.0d0) ** (1.0d0 / n)) - (x ** (1.0d0 / n))
end function
public static double code(double x, double n) {
	return Math.pow((x + 1.0), (1.0 / n)) - Math.pow(x, (1.0 / n));
}
def code(x, n):
	return math.pow((x + 1.0), (1.0 / n)) - math.pow(x, (1.0 / n))
function code(x, n)
	return Float64((Float64(x + 1.0) ^ Float64(1.0 / n)) - (x ^ Float64(1.0 / n)))
end
function tmp = code(x, n)
	tmp = ((x + 1.0) ^ (1.0 / n)) - (x ^ (1.0 / n));
end
code[x_, n_] := N[(N[Power[N[(x + 1.0), $MachinePrecision], N[(1.0 / n), $MachinePrecision]], $MachinePrecision] - N[Power[x, N[(1.0 / n), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

\\
{\left(x + 1\right)}^{\left(\frac{1}{n}\right)} - {x}^{\left(\frac{1}{n}\right)}
\end{array}

Alternative 1: 82.8% accurate, 0.9× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := {x}^{\left(\frac{1}{n}\right)}\\ t_1 := \frac{\mathsf{log1p}\left(x\right) - \log x}{n}\\ t_2 := \frac{t_0}{n \cdot x}\\ t_3 := t_2 + \frac{\frac{\frac{-0.5}{n}}{x}}{x}\\ t_4 := \frac{t_0}{x}\\ \mathbf{if}\;\frac{1}{n} \leq -1 \cdot 10^{-5}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;\frac{1}{n} \leq 4 \cdot 10^{-206}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;\frac{1}{n} \leq 5 \cdot 10^{-134}:\\ \;\;\;\;t_4 \cdot \frac{\frac{0.5}{n \cdot n} - \frac{0.5}{n}}{x} + \frac{1}{n} \cdot t_4\\ \mathbf{elif}\;\frac{1}{n} \leq 2 \cdot 10^{-114}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;\frac{1}{n} \leq 5 \cdot 10^{-73}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;\frac{1}{n} \leq 5 \cdot 10^{-51}:\\ \;\;\;\;\frac{-\log x}{n}\\ \mathbf{elif}\;\frac{1}{n} \leq 10^{-11}:\\ \;\;\;\;t_3\\ \mathbf{else}:\\ \;\;\;\;e^{\frac{x}{n}} - t_0\\ \end{array} \end{array} \]
(FPCore (x n)
 :precision binary64
 (let* ((t_0 (pow x (/ 1.0 n)))
        (t_1 (/ (- (log1p x) (log x)) n))
        (t_2 (/ t_0 (* n x)))
        (t_3 (+ t_2 (/ (/ (/ -0.5 n) x) x)))
        (t_4 (/ t_0 x)))
   (if (<= (/ 1.0 n) -1e-5)
     t_2
     (if (<= (/ 1.0 n) 4e-206)
       t_1
       (if (<= (/ 1.0 n) 5e-134)
         (+ (* t_4 (/ (- (/ 0.5 (* n n)) (/ 0.5 n)) x)) (* (/ 1.0 n) t_4))
         (if (<= (/ 1.0 n) 2e-114)
           t_1
           (if (<= (/ 1.0 n) 5e-73)
             t_3
             (if (<= (/ 1.0 n) 5e-51)
               (/ (- (log x)) n)
               (if (<= (/ 1.0 n) 1e-11) t_3 (- (exp (/ x n)) t_0))))))))))
double code(double x, double n) {
	double t_0 = pow(x, (1.0 / n));
	double t_1 = (log1p(x) - log(x)) / n;
	double t_2 = t_0 / (n * x);
	double t_3 = t_2 + (((-0.5 / n) / x) / x);
	double t_4 = t_0 / x;
	double tmp;
	if ((1.0 / n) <= -1e-5) {
		tmp = t_2;
	} else if ((1.0 / n) <= 4e-206) {
		tmp = t_1;
	} else if ((1.0 / n) <= 5e-134) {
		tmp = (t_4 * (((0.5 / (n * n)) - (0.5 / n)) / x)) + ((1.0 / n) * t_4);
	} else if ((1.0 / n) <= 2e-114) {
		tmp = t_1;
	} else if ((1.0 / n) <= 5e-73) {
		tmp = t_3;
	} else if ((1.0 / n) <= 5e-51) {
		tmp = -log(x) / n;
	} else if ((1.0 / n) <= 1e-11) {
		tmp = t_3;
	} else {
		tmp = exp((x / n)) - t_0;
	}
	return tmp;
}
public static double code(double x, double n) {
	double t_0 = Math.pow(x, (1.0 / n));
	double t_1 = (Math.log1p(x) - Math.log(x)) / n;
	double t_2 = t_0 / (n * x);
	double t_3 = t_2 + (((-0.5 / n) / x) / x);
	double t_4 = t_0 / x;
	double tmp;
	if ((1.0 / n) <= -1e-5) {
		tmp = t_2;
	} else if ((1.0 / n) <= 4e-206) {
		tmp = t_1;
	} else if ((1.0 / n) <= 5e-134) {
		tmp = (t_4 * (((0.5 / (n * n)) - (0.5 / n)) / x)) + ((1.0 / n) * t_4);
	} else if ((1.0 / n) <= 2e-114) {
		tmp = t_1;
	} else if ((1.0 / n) <= 5e-73) {
		tmp = t_3;
	} else if ((1.0 / n) <= 5e-51) {
		tmp = -Math.log(x) / n;
	} else if ((1.0 / n) <= 1e-11) {
		tmp = t_3;
	} else {
		tmp = Math.exp((x / n)) - t_0;
	}
	return tmp;
}
def code(x, n):
	t_0 = math.pow(x, (1.0 / n))
	t_1 = (math.log1p(x) - math.log(x)) / n
	t_2 = t_0 / (n * x)
	t_3 = t_2 + (((-0.5 / n) / x) / x)
	t_4 = t_0 / x
	tmp = 0
	if (1.0 / n) <= -1e-5:
		tmp = t_2
	elif (1.0 / n) <= 4e-206:
		tmp = t_1
	elif (1.0 / n) <= 5e-134:
		tmp = (t_4 * (((0.5 / (n * n)) - (0.5 / n)) / x)) + ((1.0 / n) * t_4)
	elif (1.0 / n) <= 2e-114:
		tmp = t_1
	elif (1.0 / n) <= 5e-73:
		tmp = t_3
	elif (1.0 / n) <= 5e-51:
		tmp = -math.log(x) / n
	elif (1.0 / n) <= 1e-11:
		tmp = t_3
	else:
		tmp = math.exp((x / n)) - t_0
	return tmp
function code(x, n)
	t_0 = x ^ Float64(1.0 / n)
	t_1 = Float64(Float64(log1p(x) - log(x)) / n)
	t_2 = Float64(t_0 / Float64(n * x))
	t_3 = Float64(t_2 + Float64(Float64(Float64(-0.5 / n) / x) / x))
	t_4 = Float64(t_0 / x)
	tmp = 0.0
	if (Float64(1.0 / n) <= -1e-5)
		tmp = t_2;
	elseif (Float64(1.0 / n) <= 4e-206)
		tmp = t_1;
	elseif (Float64(1.0 / n) <= 5e-134)
		tmp = Float64(Float64(t_4 * Float64(Float64(Float64(0.5 / Float64(n * n)) - Float64(0.5 / n)) / x)) + Float64(Float64(1.0 / n) * t_4));
	elseif (Float64(1.0 / n) <= 2e-114)
		tmp = t_1;
	elseif (Float64(1.0 / n) <= 5e-73)
		tmp = t_3;
	elseif (Float64(1.0 / n) <= 5e-51)
		tmp = Float64(Float64(-log(x)) / n);
	elseif (Float64(1.0 / n) <= 1e-11)
		tmp = t_3;
	else
		tmp = Float64(exp(Float64(x / n)) - t_0);
	end
	return tmp
end
code[x_, n_] := Block[{t$95$0 = N[Power[x, N[(1.0 / n), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$1 = N[(N[(N[Log[1 + x], $MachinePrecision] - N[Log[x], $MachinePrecision]), $MachinePrecision] / n), $MachinePrecision]}, Block[{t$95$2 = N[(t$95$0 / N[(n * x), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(t$95$2 + N[(N[(N[(-0.5 / n), $MachinePrecision] / x), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[(t$95$0 / x), $MachinePrecision]}, If[LessEqual[N[(1.0 / n), $MachinePrecision], -1e-5], t$95$2, If[LessEqual[N[(1.0 / n), $MachinePrecision], 4e-206], t$95$1, If[LessEqual[N[(1.0 / n), $MachinePrecision], 5e-134], N[(N[(t$95$4 * N[(N[(N[(0.5 / N[(n * n), $MachinePrecision]), $MachinePrecision] - N[(0.5 / n), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision] + N[(N[(1.0 / n), $MachinePrecision] * t$95$4), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(1.0 / n), $MachinePrecision], 2e-114], t$95$1, If[LessEqual[N[(1.0 / n), $MachinePrecision], 5e-73], t$95$3, If[LessEqual[N[(1.0 / n), $MachinePrecision], 5e-51], N[((-N[Log[x], $MachinePrecision]) / n), $MachinePrecision], If[LessEqual[N[(1.0 / n), $MachinePrecision], 1e-11], t$95$3, N[(N[Exp[N[(x / n), $MachinePrecision]], $MachinePrecision] - t$95$0), $MachinePrecision]]]]]]]]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_0 := {x}^{\left(\frac{1}{n}\right)}\\
t_1 := \frac{\mathsf{log1p}\left(x\right) - \log x}{n}\\
t_2 := \frac{t_0}{n \cdot x}\\
t_3 := t_2 + \frac{\frac{\frac{-0.5}{n}}{x}}{x}\\
t_4 := \frac{t_0}{x}\\
\mathbf{if}\;\frac{1}{n} \leq -1 \cdot 10^{-5}:\\
\;\;\;\;t_2\\

\mathbf{elif}\;\frac{1}{n} \leq 4 \cdot 10^{-206}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;\frac{1}{n} \leq 5 \cdot 10^{-134}:\\
\;\;\;\;t_4 \cdot \frac{\frac{0.5}{n \cdot n} - \frac{0.5}{n}}{x} + \frac{1}{n} \cdot t_4\\

\mathbf{elif}\;\frac{1}{n} \leq 2 \cdot 10^{-114}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;\frac{1}{n} \leq 5 \cdot 10^{-73}:\\
\;\;\;\;t_3\\

\mathbf{elif}\;\frac{1}{n} \leq 5 \cdot 10^{-51}:\\
\;\;\;\;\frac{-\log x}{n}\\

\mathbf{elif}\;\frac{1}{n} \leq 10^{-11}:\\
\;\;\;\;t_3\\

\mathbf{else}:\\
\;\;\;\;e^{\frac{x}{n}} - t_0\\


\end{array}
\end{array}
Derivation
  1. Split input into 6 regimes
  2. if (/.f64 1 n) < -1.00000000000000008e-5

    1. Initial program 97.3%

      \[{\left(x + 1\right)}^{\left(\frac{1}{n}\right)} - {x}^{\left(\frac{1}{n}\right)} \]
    2. Taylor expanded in x around inf 100.0%

      \[\leadsto \color{blue}{\frac{e^{-1 \cdot \frac{\log \left(\frac{1}{x}\right)}{n}}}{n \cdot x}} \]
    3. Step-by-step derivation
      1. log-rec100.0%

        \[\leadsto \frac{e^{-1 \cdot \frac{\color{blue}{-\log x}}{n}}}{n \cdot x} \]
      2. mul-1-neg100.0%

        \[\leadsto \frac{e^{-1 \cdot \frac{\color{blue}{-1 \cdot \log x}}{n}}}{n \cdot x} \]
      3. associate-*r/100.0%

        \[\leadsto \frac{e^{\color{blue}{\frac{-1 \cdot \left(-1 \cdot \log x\right)}{n}}}}{n \cdot x} \]
      4. neg-mul-1100.0%

        \[\leadsto \frac{e^{\frac{\color{blue}{--1 \cdot \log x}}{n}}}{n \cdot x} \]
      5. mul-1-neg100.0%

        \[\leadsto \frac{e^{\frac{-\color{blue}{\left(-\log x\right)}}{n}}}{n \cdot x} \]
      6. remove-double-neg100.0%

        \[\leadsto \frac{e^{\frac{\color{blue}{\log x}}{n}}}{n \cdot x} \]
      7. *-commutative100.0%

        \[\leadsto \frac{e^{\frac{\log x}{n}}}{\color{blue}{x \cdot n}} \]
    4. Simplified100.0%

      \[\leadsto \color{blue}{\frac{e^{\frac{\log x}{n}}}{x \cdot n}} \]
    5. Taylor expanded in x around 0 100.0%

      \[\leadsto \color{blue}{\frac{e^{\frac{\log x}{n}}}{n \cdot x}} \]
    6. Step-by-step derivation
      1. *-rgt-identity100.0%

        \[\leadsto \frac{e^{\frac{\color{blue}{\log x \cdot 1}}{n}}}{n \cdot x} \]
      2. associate-*r/100.0%

        \[\leadsto \frac{e^{\color{blue}{\log x \cdot \frac{1}{n}}}}{n \cdot x} \]
      3. exp-to-pow100.0%

        \[\leadsto \frac{\color{blue}{{x}^{\left(\frac{1}{n}\right)}}}{n \cdot x} \]
      4. *-commutative100.0%

        \[\leadsto \frac{{x}^{\left(\frac{1}{n}\right)}}{\color{blue}{x \cdot n}} \]
    7. Simplified100.0%

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

    if -1.00000000000000008e-5 < (/.f64 1 n) < 4.00000000000000011e-206 or 5.0000000000000003e-134 < (/.f64 1 n) < 2.0000000000000001e-114

    1. Initial program 35.6%

      \[{\left(x + 1\right)}^{\left(\frac{1}{n}\right)} - {x}^{\left(\frac{1}{n}\right)} \]
    2. Taylor expanded in n around inf 84.6%

      \[\leadsto \color{blue}{\frac{\log \left(1 + x\right) - \log x}{n}} \]
    3. Step-by-step derivation
      1. +-rgt-identity84.6%

        \[\leadsto \frac{\color{blue}{\left(\log \left(1 + x\right) + 0\right)} - \log x}{n} \]
      2. +-rgt-identity84.6%

        \[\leadsto \frac{\color{blue}{\log \left(1 + x\right)} - \log x}{n} \]
      3. log1p-def84.6%

        \[\leadsto \frac{\color{blue}{\mathsf{log1p}\left(x\right)} - \log x}{n} \]
    4. Simplified84.6%

      \[\leadsto \color{blue}{\frac{\mathsf{log1p}\left(x\right) - \log x}{n}} \]

    if 4.00000000000000011e-206 < (/.f64 1 n) < 5.0000000000000003e-134

    1. Initial program 39.9%

      \[{\left(x + 1\right)}^{\left(\frac{1}{n}\right)} - {x}^{\left(\frac{1}{n}\right)} \]
    2. Taylor expanded in n around 0 39.9%

      \[\leadsto \color{blue}{e^{\frac{\log \left(1 + x\right)}{n}}} - {x}^{\left(\frac{1}{n}\right)} \]
    3. Step-by-step derivation
      1. log1p-def39.9%

        \[\leadsto e^{\frac{\color{blue}{\mathsf{log1p}\left(x\right)}}{n}} - {x}^{\left(\frac{1}{n}\right)} \]
    4. Simplified39.9%

      \[\leadsto \color{blue}{e^{\frac{\mathsf{log1p}\left(x\right)}{n}}} - {x}^{\left(\frac{1}{n}\right)} \]
    5. Taylor expanded in x around inf 78.1%

      \[\leadsto \color{blue}{\frac{e^{-1 \cdot \frac{\log \left(\frac{1}{x}\right)}{n}} \cdot \left(0.5 \cdot \frac{1}{{n}^{2}} - 0.5 \cdot \frac{1}{n}\right)}{{x}^{2}} + \frac{e^{-1 \cdot \frac{\log \left(\frac{1}{x}\right)}{n}}}{n \cdot x}} \]
    6. Step-by-step derivation
      1. Simplified78.1%

        \[\leadsto \color{blue}{\frac{{x}^{\left(\frac{1}{n}\right)}}{x} \cdot \frac{\frac{0.5}{n \cdot n} - \frac{0.5}{n}}{x} + \frac{{x}^{\left(\frac{1}{n}\right)}}{x \cdot n}} \]
      2. Step-by-step derivation
        1. associate-/r*82.6%

          \[\leadsto \frac{{x}^{\left(\frac{1}{n}\right)}}{x} \cdot \frac{\frac{0.5}{n \cdot n} - \frac{0.5}{n}}{x} + \color{blue}{\frac{\frac{{x}^{\left(\frac{1}{n}\right)}}{x}}{n}} \]
        2. div-inv82.4%

          \[\leadsto \frac{{x}^{\left(\frac{1}{n}\right)}}{x} \cdot \frac{\frac{0.5}{n \cdot n} - \frac{0.5}{n}}{x} + \color{blue}{\frac{{x}^{\left(\frac{1}{n}\right)}}{x} \cdot \frac{1}{n}} \]
      3. Applied egg-rr82.4%

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

      if 2.0000000000000001e-114 < (/.f64 1 n) < 4.9999999999999998e-73 or 5.00000000000000004e-51 < (/.f64 1 n) < 9.99999999999999939e-12

      1. Initial program 13.0%

        \[{\left(x + 1\right)}^{\left(\frac{1}{n}\right)} - {x}^{\left(\frac{1}{n}\right)} \]
      2. Taylor expanded in n around 0 13.0%

        \[\leadsto \color{blue}{e^{\frac{\log \left(1 + x\right)}{n}}} - {x}^{\left(\frac{1}{n}\right)} \]
      3. Step-by-step derivation
        1. log1p-def13.0%

          \[\leadsto e^{\frac{\color{blue}{\mathsf{log1p}\left(x\right)}}{n}} - {x}^{\left(\frac{1}{n}\right)} \]
      4. Simplified13.0%

        \[\leadsto \color{blue}{e^{\frac{\mathsf{log1p}\left(x\right)}{n}}} - {x}^{\left(\frac{1}{n}\right)} \]
      5. Taylor expanded in x around inf 87.0%

        \[\leadsto \color{blue}{\frac{e^{-1 \cdot \frac{\log \left(\frac{1}{x}\right)}{n}} \cdot \left(0.5 \cdot \frac{1}{{n}^{2}} - 0.5 \cdot \frac{1}{n}\right)}{{x}^{2}} + \frac{e^{-1 \cdot \frac{\log \left(\frac{1}{x}\right)}{n}}}{n \cdot x}} \]
      6. Step-by-step derivation
        1. Simplified87.0%

          \[\leadsto \color{blue}{\frac{{x}^{\left(\frac{1}{n}\right)}}{x} \cdot \frac{\frac{0.5}{n \cdot n} - \frac{0.5}{n}}{x} + \frac{{x}^{\left(\frac{1}{n}\right)}}{x \cdot n}} \]
        2. Taylor expanded in n around inf 87.0%

          \[\leadsto \color{blue}{\frac{-0.5}{n \cdot {x}^{2}}} + \frac{{x}^{\left(\frac{1}{n}\right)}}{x \cdot n} \]
        3. Step-by-step derivation
          1. associate-/r*87.0%

            \[\leadsto \color{blue}{\frac{\frac{-0.5}{n}}{{x}^{2}}} + \frac{{x}^{\left(\frac{1}{n}\right)}}{x \cdot n} \]
          2. metadata-eval87.0%

            \[\leadsto \frac{\frac{\color{blue}{-0.5}}{n}}{{x}^{2}} + \frac{{x}^{\left(\frac{1}{n}\right)}}{x \cdot n} \]
          3. distribute-neg-frac87.0%

            \[\leadsto \frac{\color{blue}{-\frac{0.5}{n}}}{{x}^{2}} + \frac{{x}^{\left(\frac{1}{n}\right)}}{x \cdot n} \]
          4. metadata-eval87.0%

            \[\leadsto \frac{-\frac{\color{blue}{0.5 \cdot 1}}{n}}{{x}^{2}} + \frac{{x}^{\left(\frac{1}{n}\right)}}{x \cdot n} \]
          5. associate-*r/87.0%

            \[\leadsto \frac{-\color{blue}{0.5 \cdot \frac{1}{n}}}{{x}^{2}} + \frac{{x}^{\left(\frac{1}{n}\right)}}{x \cdot n} \]
          6. unpow287.0%

            \[\leadsto \frac{-0.5 \cdot \frac{1}{n}}{\color{blue}{x \cdot x}} + \frac{{x}^{\left(\frac{1}{n}\right)}}{x \cdot n} \]
          7. associate-/r*87.0%

            \[\leadsto \color{blue}{\frac{\frac{-0.5 \cdot \frac{1}{n}}{x}}{x}} + \frac{{x}^{\left(\frac{1}{n}\right)}}{x \cdot n} \]
          8. associate-*r/87.0%

            \[\leadsto \frac{\frac{-\color{blue}{\frac{0.5 \cdot 1}{n}}}{x}}{x} + \frac{{x}^{\left(\frac{1}{n}\right)}}{x \cdot n} \]
          9. metadata-eval87.0%

            \[\leadsto \frac{\frac{-\frac{\color{blue}{0.5}}{n}}{x}}{x} + \frac{{x}^{\left(\frac{1}{n}\right)}}{x \cdot n} \]
          10. distribute-neg-frac87.0%

            \[\leadsto \frac{\frac{\color{blue}{\frac{-0.5}{n}}}{x}}{x} + \frac{{x}^{\left(\frac{1}{n}\right)}}{x \cdot n} \]
          11. metadata-eval87.0%

            \[\leadsto \frac{\frac{\frac{\color{blue}{-0.5}}{n}}{x}}{x} + \frac{{x}^{\left(\frac{1}{n}\right)}}{x \cdot n} \]
        4. Simplified87.0%

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

        if 4.9999999999999998e-73 < (/.f64 1 n) < 5.00000000000000004e-51

        1. Initial program 3.6%

          \[{\left(x + 1\right)}^{\left(\frac{1}{n}\right)} - {x}^{\left(\frac{1}{n}\right)} \]
        2. Taylor expanded in x around 0 3.6%

          \[\leadsto \color{blue}{1} - {x}^{\left(\frac{1}{n}\right)} \]
        3. Taylor expanded in n around inf 99.1%

          \[\leadsto \color{blue}{-1 \cdot \frac{\log x}{n}} \]
        4. Step-by-step derivation
          1. mul-1-neg99.1%

            \[\leadsto \color{blue}{-\frac{\log x}{n}} \]
        5. Simplified99.1%

          \[\leadsto \color{blue}{-\frac{\log x}{n}} \]

        if 9.99999999999999939e-12 < (/.f64 1 n)

        1. Initial program 48.9%

          \[{\left(x + 1\right)}^{\left(\frac{1}{n}\right)} - {x}^{\left(\frac{1}{n}\right)} \]
        2. Taylor expanded in n around 0 48.9%

          \[\leadsto \color{blue}{e^{\frac{\log \left(1 + x\right)}{n}}} - {x}^{\left(\frac{1}{n}\right)} \]
        3. Step-by-step derivation
          1. log1p-def98.7%

            \[\leadsto e^{\frac{\color{blue}{\mathsf{log1p}\left(x\right)}}{n}} - {x}^{\left(\frac{1}{n}\right)} \]
        4. Simplified98.7%

          \[\leadsto \color{blue}{e^{\frac{\mathsf{log1p}\left(x\right)}{n}}} - {x}^{\left(\frac{1}{n}\right)} \]
        5. Taylor expanded in x around 0 98.7%

          \[\leadsto e^{\color{blue}{\frac{x}{n}}} - {x}^{\left(\frac{1}{n}\right)} \]
      7. Recombined 6 regimes into one program.
      8. Final simplification91.1%

        \[\leadsto \begin{array}{l} \mathbf{if}\;\frac{1}{n} \leq -1 \cdot 10^{-5}:\\ \;\;\;\;\frac{{x}^{\left(\frac{1}{n}\right)}}{n \cdot x}\\ \mathbf{elif}\;\frac{1}{n} \leq 4 \cdot 10^{-206}:\\ \;\;\;\;\frac{\mathsf{log1p}\left(x\right) - \log x}{n}\\ \mathbf{elif}\;\frac{1}{n} \leq 5 \cdot 10^{-134}:\\ \;\;\;\;\frac{{x}^{\left(\frac{1}{n}\right)}}{x} \cdot \frac{\frac{0.5}{n \cdot n} - \frac{0.5}{n}}{x} + \frac{1}{n} \cdot \frac{{x}^{\left(\frac{1}{n}\right)}}{x}\\ \mathbf{elif}\;\frac{1}{n} \leq 2 \cdot 10^{-114}:\\ \;\;\;\;\frac{\mathsf{log1p}\left(x\right) - \log x}{n}\\ \mathbf{elif}\;\frac{1}{n} \leq 5 \cdot 10^{-73}:\\ \;\;\;\;\frac{{x}^{\left(\frac{1}{n}\right)}}{n \cdot x} + \frac{\frac{\frac{-0.5}{n}}{x}}{x}\\ \mathbf{elif}\;\frac{1}{n} \leq 5 \cdot 10^{-51}:\\ \;\;\;\;\frac{-\log x}{n}\\ \mathbf{elif}\;\frac{1}{n} \leq 10^{-11}:\\ \;\;\;\;\frac{{x}^{\left(\frac{1}{n}\right)}}{n \cdot x} + \frac{\frac{\frac{-0.5}{n}}{x}}{x}\\ \mathbf{else}:\\ \;\;\;\;e^{\frac{x}{n}} - {x}^{\left(\frac{1}{n}\right)}\\ \end{array} \]

      Alternative 2: 85.3% accurate, 0.1× speedup?

      \[\begin{array}{l} \\ \begin{array}{l} t_0 := {x}^{\left(\frac{1}{n}\right)}\\ t_1 := \log \left(1 + x\right)\\ t_2 := \frac{0.5}{n \cdot n}\\ t_3 := \frac{t_0}{x} \cdot \frac{t_2 - \frac{0.5}{n}}{x} + \left(\frac{t_0 \cdot \left(\frac{0.3333333333333333}{n} + \left(\frac{0.16666666666666666}{{n}^{3}} - t_2\right)\right)}{{x}^{3}} + \frac{t_0}{n \cdot x}\right)\\ \mathbf{if}\;n \leq -165000:\\ \;\;\;\;\left(0.5 \cdot \frac{{t_1}^{2}}{{n}^{2}} + \left(0.041666666666666664 \cdot \frac{{t_1}^{4}}{{n}^{4}} + \left(\frac{t_1 - \log x}{n} - \frac{-0.16666666666666666 \cdot {t_1}^{3} - -0.16666666666666666 \cdot {\log x}^{3}}{{n}^{3}}\right)\right)\right) - \left(0.5 \cdot \frac{{\log x}^{2}}{{n}^{2}} + 0.041666666666666664 \cdot \frac{{\log x}^{4}}{{n}^{4}}\right)\\ \mathbf{elif}\;n \leq 650000000:\\ \;\;\;\;e^{\frac{x}{n}} - t_0\\ \mathbf{elif}\;n \leq 1.3 \cdot 10^{+49}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;n \leq 1.2 \cdot 10^{+72}:\\ \;\;\;\;\frac{\frac{3 \cdot \mathsf{log1p}\left(x\right) - 3 \cdot \log x}{n}}{\mathsf{fma}\left(t_0, t_0 + e^{\frac{\mathsf{log1p}\left(x\right)}{n}}, {\left(1 + x\right)}^{\left(\frac{2}{n}\right)}\right)}\\ \mathbf{elif}\;n \leq 1.25 \cdot 10^{+107}:\\ \;\;\;\;t_3\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{log1p}\left(x\right) - \log x}{n}\\ \end{array} \end{array} \]
      (FPCore (x n)
       :precision binary64
       (let* ((t_0 (pow x (/ 1.0 n)))
              (t_1 (log (+ 1.0 x)))
              (t_2 (/ 0.5 (* n n)))
              (t_3
               (+
                (* (/ t_0 x) (/ (- t_2 (/ 0.5 n)) x))
                (+
                 (/
                  (*
                   t_0
                   (+
                    (/ 0.3333333333333333 n)
                    (- (/ 0.16666666666666666 (pow n 3.0)) t_2)))
                  (pow x 3.0))
                 (/ t_0 (* n x))))))
         (if (<= n -165000.0)
           (-
            (+
             (* 0.5 (/ (pow t_1 2.0) (pow n 2.0)))
             (+
              (* 0.041666666666666664 (/ (pow t_1 4.0) (pow n 4.0)))
              (-
               (/ (- t_1 (log x)) n)
               (/
                (-
                 (* -0.16666666666666666 (pow t_1 3.0))
                 (* -0.16666666666666666 (pow (log x) 3.0)))
                (pow n 3.0)))))
            (+
             (* 0.5 (/ (pow (log x) 2.0) (pow n 2.0)))
             (* 0.041666666666666664 (/ (pow (log x) 4.0) (pow n 4.0)))))
           (if (<= n 650000000.0)
             (- (exp (/ x n)) t_0)
             (if (<= n 1.3e+49)
               t_3
               (if (<= n 1.2e+72)
                 (/
                  (/ (- (* 3.0 (log1p x)) (* 3.0 (log x))) n)
                  (fma t_0 (+ t_0 (exp (/ (log1p x) n))) (pow (+ 1.0 x) (/ 2.0 n))))
                 (if (<= n 1.25e+107) t_3 (/ (- (log1p x) (log x)) n))))))))
      double code(double x, double n) {
      	double t_0 = pow(x, (1.0 / n));
      	double t_1 = log((1.0 + x));
      	double t_2 = 0.5 / (n * n);
      	double t_3 = ((t_0 / x) * ((t_2 - (0.5 / n)) / x)) + (((t_0 * ((0.3333333333333333 / n) + ((0.16666666666666666 / pow(n, 3.0)) - t_2))) / pow(x, 3.0)) + (t_0 / (n * x)));
      	double tmp;
      	if (n <= -165000.0) {
      		tmp = ((0.5 * (pow(t_1, 2.0) / pow(n, 2.0))) + ((0.041666666666666664 * (pow(t_1, 4.0) / pow(n, 4.0))) + (((t_1 - log(x)) / n) - (((-0.16666666666666666 * pow(t_1, 3.0)) - (-0.16666666666666666 * pow(log(x), 3.0))) / pow(n, 3.0))))) - ((0.5 * (pow(log(x), 2.0) / pow(n, 2.0))) + (0.041666666666666664 * (pow(log(x), 4.0) / pow(n, 4.0))));
      	} else if (n <= 650000000.0) {
      		tmp = exp((x / n)) - t_0;
      	} else if (n <= 1.3e+49) {
      		tmp = t_3;
      	} else if (n <= 1.2e+72) {
      		tmp = (((3.0 * log1p(x)) - (3.0 * log(x))) / n) / fma(t_0, (t_0 + exp((log1p(x) / n))), pow((1.0 + x), (2.0 / n)));
      	} else if (n <= 1.25e+107) {
      		tmp = t_3;
      	} else {
      		tmp = (log1p(x) - log(x)) / n;
      	}
      	return tmp;
      }
      
      function code(x, n)
      	t_0 = x ^ Float64(1.0 / n)
      	t_1 = log(Float64(1.0 + x))
      	t_2 = Float64(0.5 / Float64(n * n))
      	t_3 = Float64(Float64(Float64(t_0 / x) * Float64(Float64(t_2 - Float64(0.5 / n)) / x)) + Float64(Float64(Float64(t_0 * Float64(Float64(0.3333333333333333 / n) + Float64(Float64(0.16666666666666666 / (n ^ 3.0)) - t_2))) / (x ^ 3.0)) + Float64(t_0 / Float64(n * x))))
      	tmp = 0.0
      	if (n <= -165000.0)
      		tmp = Float64(Float64(Float64(0.5 * Float64((t_1 ^ 2.0) / (n ^ 2.0))) + Float64(Float64(0.041666666666666664 * Float64((t_1 ^ 4.0) / (n ^ 4.0))) + Float64(Float64(Float64(t_1 - log(x)) / n) - Float64(Float64(Float64(-0.16666666666666666 * (t_1 ^ 3.0)) - Float64(-0.16666666666666666 * (log(x) ^ 3.0))) / (n ^ 3.0))))) - Float64(Float64(0.5 * Float64((log(x) ^ 2.0) / (n ^ 2.0))) + Float64(0.041666666666666664 * Float64((log(x) ^ 4.0) / (n ^ 4.0)))));
      	elseif (n <= 650000000.0)
      		tmp = Float64(exp(Float64(x / n)) - t_0);
      	elseif (n <= 1.3e+49)
      		tmp = t_3;
      	elseif (n <= 1.2e+72)
      		tmp = Float64(Float64(Float64(Float64(3.0 * log1p(x)) - Float64(3.0 * log(x))) / n) / fma(t_0, Float64(t_0 + exp(Float64(log1p(x) / n))), (Float64(1.0 + x) ^ Float64(2.0 / n))));
      	elseif (n <= 1.25e+107)
      		tmp = t_3;
      	else
      		tmp = Float64(Float64(log1p(x) - log(x)) / n);
      	end
      	return tmp
      end
      
      code[x_, n_] := Block[{t$95$0 = N[Power[x, N[(1.0 / n), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$1 = N[Log[N[(1.0 + x), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$2 = N[(0.5 / N[(n * n), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[(N[(t$95$0 / x), $MachinePrecision] * N[(N[(t$95$2 - N[(0.5 / n), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision] + N[(N[(N[(t$95$0 * N[(N[(0.3333333333333333 / n), $MachinePrecision] + N[(N[(0.16666666666666666 / N[Power[n, 3.0], $MachinePrecision]), $MachinePrecision] - t$95$2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[Power[x, 3.0], $MachinePrecision]), $MachinePrecision] + N[(t$95$0 / N[(n * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[n, -165000.0], N[(N[(N[(0.5 * N[(N[Power[t$95$1, 2.0], $MachinePrecision] / N[Power[n, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(0.041666666666666664 * N[(N[Power[t$95$1, 4.0], $MachinePrecision] / N[Power[n, 4.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(N[(t$95$1 - N[Log[x], $MachinePrecision]), $MachinePrecision] / n), $MachinePrecision] - N[(N[(N[(-0.16666666666666666 * N[Power[t$95$1, 3.0], $MachinePrecision]), $MachinePrecision] - N[(-0.16666666666666666 * N[Power[N[Log[x], $MachinePrecision], 3.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[Power[n, 3.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[(0.5 * N[(N[Power[N[Log[x], $MachinePrecision], 2.0], $MachinePrecision] / N[Power[n, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(0.041666666666666664 * N[(N[Power[N[Log[x], $MachinePrecision], 4.0], $MachinePrecision] / N[Power[n, 4.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[n, 650000000.0], N[(N[Exp[N[(x / n), $MachinePrecision]], $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[n, 1.3e+49], t$95$3, If[LessEqual[n, 1.2e+72], N[(N[(N[(N[(3.0 * N[Log[1 + x], $MachinePrecision]), $MachinePrecision] - N[(3.0 * N[Log[x], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / n), $MachinePrecision] / N[(t$95$0 * N[(t$95$0 + N[Exp[N[(N[Log[1 + x], $MachinePrecision] / n), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] + N[Power[N[(1.0 + x), $MachinePrecision], N[(2.0 / n), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[n, 1.25e+107], t$95$3, N[(N[(N[Log[1 + x], $MachinePrecision] - N[Log[x], $MachinePrecision]), $MachinePrecision] / n), $MachinePrecision]]]]]]]]]]
      
      \begin{array}{l}
      
      \\
      \begin{array}{l}
      t_0 := {x}^{\left(\frac{1}{n}\right)}\\
      t_1 := \log \left(1 + x\right)\\
      t_2 := \frac{0.5}{n \cdot n}\\
      t_3 := \frac{t_0}{x} \cdot \frac{t_2 - \frac{0.5}{n}}{x} + \left(\frac{t_0 \cdot \left(\frac{0.3333333333333333}{n} + \left(\frac{0.16666666666666666}{{n}^{3}} - t_2\right)\right)}{{x}^{3}} + \frac{t_0}{n \cdot x}\right)\\
      \mathbf{if}\;n \leq -165000:\\
      \;\;\;\;\left(0.5 \cdot \frac{{t_1}^{2}}{{n}^{2}} + \left(0.041666666666666664 \cdot \frac{{t_1}^{4}}{{n}^{4}} + \left(\frac{t_1 - \log x}{n} - \frac{-0.16666666666666666 \cdot {t_1}^{3} - -0.16666666666666666 \cdot {\log x}^{3}}{{n}^{3}}\right)\right)\right) - \left(0.5 \cdot \frac{{\log x}^{2}}{{n}^{2}} + 0.041666666666666664 \cdot \frac{{\log x}^{4}}{{n}^{4}}\right)\\
      
      \mathbf{elif}\;n \leq 650000000:\\
      \;\;\;\;e^{\frac{x}{n}} - t_0\\
      
      \mathbf{elif}\;n \leq 1.3 \cdot 10^{+49}:\\
      \;\;\;\;t_3\\
      
      \mathbf{elif}\;n \leq 1.2 \cdot 10^{+72}:\\
      \;\;\;\;\frac{\frac{3 \cdot \mathsf{log1p}\left(x\right) - 3 \cdot \log x}{n}}{\mathsf{fma}\left(t_0, t_0 + e^{\frac{\mathsf{log1p}\left(x\right)}{n}}, {\left(1 + x\right)}^{\left(\frac{2}{n}\right)}\right)}\\
      
      \mathbf{elif}\;n \leq 1.25 \cdot 10^{+107}:\\
      \;\;\;\;t_3\\
      
      \mathbf{else}:\\
      \;\;\;\;\frac{\mathsf{log1p}\left(x\right) - \log x}{n}\\
      
      
      \end{array}
      \end{array}
      
      Derivation
      1. Split input into 5 regimes
      2. if n < -165000

        1. Initial program 30.8%

          \[{\left(x + 1\right)}^{\left(\frac{1}{n}\right)} - {x}^{\left(\frac{1}{n}\right)} \]
        2. Taylor expanded in n around -inf 83.6%

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

        if -165000 < n < 6.5e8

        1. Initial program 81.9%

          \[{\left(x + 1\right)}^{\left(\frac{1}{n}\right)} - {x}^{\left(\frac{1}{n}\right)} \]
        2. Taylor expanded in n around 0 81.9%

          \[\leadsto \color{blue}{e^{\frac{\log \left(1 + x\right)}{n}}} - {x}^{\left(\frac{1}{n}\right)} \]
        3. Step-by-step derivation
          1. log1p-def97.7%

            \[\leadsto e^{\frac{\color{blue}{\mathsf{log1p}\left(x\right)}}{n}} - {x}^{\left(\frac{1}{n}\right)} \]
        4. Simplified97.7%

          \[\leadsto \color{blue}{e^{\frac{\mathsf{log1p}\left(x\right)}{n}}} - {x}^{\left(\frac{1}{n}\right)} \]
        5. Taylor expanded in x around 0 97.8%

          \[\leadsto e^{\color{blue}{\frac{x}{n}}} - {x}^{\left(\frac{1}{n}\right)} \]

        if 6.5e8 < n < 1.29999999999999994e49 or 1.20000000000000005e72 < n < 1.25e107

        1. Initial program 8.6%

          \[{\left(x + 1\right)}^{\left(\frac{1}{n}\right)} - {x}^{\left(\frac{1}{n}\right)} \]
        2. Taylor expanded in n around 0 8.6%

          \[\leadsto \color{blue}{e^{\frac{\log \left(1 + x\right)}{n}}} - {x}^{\left(\frac{1}{n}\right)} \]
        3. Step-by-step derivation
          1. log1p-def8.6%

            \[\leadsto e^{\frac{\color{blue}{\mathsf{log1p}\left(x\right)}}{n}} - {x}^{\left(\frac{1}{n}\right)} \]
        4. Simplified8.6%

          \[\leadsto \color{blue}{e^{\frac{\mathsf{log1p}\left(x\right)}{n}}} - {x}^{\left(\frac{1}{n}\right)} \]
        5. Taylor expanded in x around inf 86.9%

          \[\leadsto \color{blue}{\frac{e^{-1 \cdot \frac{\log \left(\frac{1}{x}\right)}{n}} \cdot \left(0.5 \cdot \frac{1}{{n}^{2}} - 0.5 \cdot \frac{1}{n}\right)}{{x}^{2}} + \left(\frac{e^{-1 \cdot \frac{\log \left(\frac{1}{x}\right)}{n}} \cdot \left(\left(0.3333333333333333 \cdot \frac{1}{n} + 0.16666666666666666 \cdot \frac{1}{{n}^{3}}\right) - 0.5 \cdot \frac{1}{{n}^{2}}\right)}{{x}^{3}} + \frac{e^{-1 \cdot \frac{\log \left(\frac{1}{x}\right)}{n}}}{n \cdot x}\right)} \]
        6. Simplified86.9%

          \[\leadsto \color{blue}{\frac{{x}^{\left(\frac{1}{n}\right)}}{x} \cdot \frac{\frac{0.5}{n \cdot n} - \frac{0.5}{n}}{x} + \left(\frac{\left(\frac{0.3333333333333333}{n} + \left(\frac{0.16666666666666666}{{n}^{3}} - \frac{0.5}{n \cdot n}\right)\right) \cdot {x}^{\left(\frac{1}{n}\right)}}{{x}^{3}} + \frac{{x}^{\left(\frac{1}{n}\right)}}{x \cdot n}\right)} \]

        if 1.29999999999999994e49 < n < 1.20000000000000005e72

        1. Initial program 3.6%

          \[{\left(x + 1\right)}^{\left(\frac{1}{n}\right)} - {x}^{\left(\frac{1}{n}\right)} \]
        2. Step-by-step derivation
          1. flip3--3.6%

            \[\leadsto \color{blue}{\frac{{\left({\left(x + 1\right)}^{\left(\frac{1}{n}\right)}\right)}^{3} - {\left({x}^{\left(\frac{1}{n}\right)}\right)}^{3}}{{\left(x + 1\right)}^{\left(\frac{1}{n}\right)} \cdot {\left(x + 1\right)}^{\left(\frac{1}{n}\right)} + \left({x}^{\left(\frac{1}{n}\right)} \cdot {x}^{\left(\frac{1}{n}\right)} + {\left(x + 1\right)}^{\left(\frac{1}{n}\right)} \cdot {x}^{\left(\frac{1}{n}\right)}\right)}} \]
          2. div-inv3.6%

            \[\leadsto \color{blue}{\left({\left({\left(x + 1\right)}^{\left(\frac{1}{n}\right)}\right)}^{3} - {\left({x}^{\left(\frac{1}{n}\right)}\right)}^{3}\right) \cdot \frac{1}{{\left(x + 1\right)}^{\left(\frac{1}{n}\right)} \cdot {\left(x + 1\right)}^{\left(\frac{1}{n}\right)} + \left({x}^{\left(\frac{1}{n}\right)} \cdot {x}^{\left(\frac{1}{n}\right)} + {\left(x + 1\right)}^{\left(\frac{1}{n}\right)} \cdot {x}^{\left(\frac{1}{n}\right)}\right)}} \]
          3. pow-to-exp3.6%

            \[\leadsto \left({\color{blue}{\left(e^{\log \left(x + 1\right) \cdot \frac{1}{n}}\right)}}^{3} - {\left({x}^{\left(\frac{1}{n}\right)}\right)}^{3}\right) \cdot \frac{1}{{\left(x + 1\right)}^{\left(\frac{1}{n}\right)} \cdot {\left(x + 1\right)}^{\left(\frac{1}{n}\right)} + \left({x}^{\left(\frac{1}{n}\right)} \cdot {x}^{\left(\frac{1}{n}\right)} + {\left(x + 1\right)}^{\left(\frac{1}{n}\right)} \cdot {x}^{\left(\frac{1}{n}\right)}\right)} \]
          4. pow-exp3.6%

            \[\leadsto \left(\color{blue}{e^{\left(\log \left(x + 1\right) \cdot \frac{1}{n}\right) \cdot 3}} - {\left({x}^{\left(\frac{1}{n}\right)}\right)}^{3}\right) \cdot \frac{1}{{\left(x + 1\right)}^{\left(\frac{1}{n}\right)} \cdot {\left(x + 1\right)}^{\left(\frac{1}{n}\right)} + \left({x}^{\left(\frac{1}{n}\right)} \cdot {x}^{\left(\frac{1}{n}\right)} + {\left(x + 1\right)}^{\left(\frac{1}{n}\right)} \cdot {x}^{\left(\frac{1}{n}\right)}\right)} \]
          5. un-div-inv3.6%

            \[\leadsto \left(e^{\color{blue}{\frac{\log \left(x + 1\right)}{n}} \cdot 3} - {\left({x}^{\left(\frac{1}{n}\right)}\right)}^{3}\right) \cdot \frac{1}{{\left(x + 1\right)}^{\left(\frac{1}{n}\right)} \cdot {\left(x + 1\right)}^{\left(\frac{1}{n}\right)} + \left({x}^{\left(\frac{1}{n}\right)} \cdot {x}^{\left(\frac{1}{n}\right)} + {\left(x + 1\right)}^{\left(\frac{1}{n}\right)} \cdot {x}^{\left(\frac{1}{n}\right)}\right)} \]
          6. +-commutative3.6%

            \[\leadsto \left(e^{\frac{\log \color{blue}{\left(1 + x\right)}}{n} \cdot 3} - {\left({x}^{\left(\frac{1}{n}\right)}\right)}^{3}\right) \cdot \frac{1}{{\left(x + 1\right)}^{\left(\frac{1}{n}\right)} \cdot {\left(x + 1\right)}^{\left(\frac{1}{n}\right)} + \left({x}^{\left(\frac{1}{n}\right)} \cdot {x}^{\left(\frac{1}{n}\right)} + {\left(x + 1\right)}^{\left(\frac{1}{n}\right)} \cdot {x}^{\left(\frac{1}{n}\right)}\right)} \]
          7. log1p-udef3.6%

            \[\leadsto \left(e^{\frac{\color{blue}{\mathsf{log1p}\left(x\right)}}{n} \cdot 3} - {\left({x}^{\left(\frac{1}{n}\right)}\right)}^{3}\right) \cdot \frac{1}{{\left(x + 1\right)}^{\left(\frac{1}{n}\right)} \cdot {\left(x + 1\right)}^{\left(\frac{1}{n}\right)} + \left({x}^{\left(\frac{1}{n}\right)} \cdot {x}^{\left(\frac{1}{n}\right)} + {\left(x + 1\right)}^{\left(\frac{1}{n}\right)} \cdot {x}^{\left(\frac{1}{n}\right)}\right)} \]
          8. inv-pow3.6%

            \[\leadsto \left(e^{\frac{\mathsf{log1p}\left(x\right)}{n} \cdot 3} - {\left({x}^{\color{blue}{\left({n}^{-1}\right)}}\right)}^{3}\right) \cdot \frac{1}{{\left(x + 1\right)}^{\left(\frac{1}{n}\right)} \cdot {\left(x + 1\right)}^{\left(\frac{1}{n}\right)} + \left({x}^{\left(\frac{1}{n}\right)} \cdot {x}^{\left(\frac{1}{n}\right)} + {\left(x + 1\right)}^{\left(\frac{1}{n}\right)} \cdot {x}^{\left(\frac{1}{n}\right)}\right)} \]
        3. Applied egg-rr3.6%

          \[\leadsto \color{blue}{\left(e^{\frac{\mathsf{log1p}\left(x\right)}{n} \cdot 3} - {\left({x}^{\left({n}^{-1}\right)}\right)}^{3}\right) \cdot \frac{1}{\mathsf{fma}\left({x}^{\left({n}^{-1}\right)}, e^{\frac{\mathsf{log1p}\left(x\right)}{n}} + {x}^{\left({n}^{-1}\right)}, {\left(e^{\frac{\mathsf{log1p}\left(x\right)}{n}}\right)}^{2}\right)}} \]
        4. Simplified3.6%

          \[\leadsto \color{blue}{\frac{{\left(e^{3}\right)}^{\left(\frac{\mathsf{log1p}\left(x\right)}{n}\right)} - {\left({x}^{\left(\frac{1}{n}\right)}\right)}^{3}}{\mathsf{fma}\left({x}^{\left(\frac{1}{n}\right)}, e^{\frac{\mathsf{log1p}\left(x\right)}{n}} + {x}^{\left(\frac{1}{n}\right)}, {\left(1 + x\right)}^{\left(\frac{2}{n}\right)}\right)}} \]
        5. Taylor expanded in n around inf 99.8%

          \[\leadsto \frac{\color{blue}{\frac{3 \cdot \log \left(1 + x\right) - \left(2 \cdot \log x + \log x\right)}{n}}}{\mathsf{fma}\left({x}^{\left(\frac{1}{n}\right)}, e^{\frac{\mathsf{log1p}\left(x\right)}{n}} + {x}^{\left(\frac{1}{n}\right)}, {\left(1 + x\right)}^{\left(\frac{2}{n}\right)}\right)} \]
        6. Step-by-step derivation
          1. log1p-def99.8%

            \[\leadsto \frac{\frac{3 \cdot \color{blue}{\mathsf{log1p}\left(x\right)} - \left(2 \cdot \log x + \log x\right)}{n}}{\mathsf{fma}\left({x}^{\left(\frac{1}{n}\right)}, e^{\frac{\mathsf{log1p}\left(x\right)}{n}} + {x}^{\left(\frac{1}{n}\right)}, {\left(1 + x\right)}^{\left(\frac{2}{n}\right)}\right)} \]
          2. distribute-lft1-in99.8%

            \[\leadsto \frac{\frac{3 \cdot \mathsf{log1p}\left(x\right) - \color{blue}{\left(2 + 1\right) \cdot \log x}}{n}}{\mathsf{fma}\left({x}^{\left(\frac{1}{n}\right)}, e^{\frac{\mathsf{log1p}\left(x\right)}{n}} + {x}^{\left(\frac{1}{n}\right)}, {\left(1 + x\right)}^{\left(\frac{2}{n}\right)}\right)} \]
          3. metadata-eval99.8%

            \[\leadsto \frac{\frac{3 \cdot \mathsf{log1p}\left(x\right) - \color{blue}{3} \cdot \log x}{n}}{\mathsf{fma}\left({x}^{\left(\frac{1}{n}\right)}, e^{\frac{\mathsf{log1p}\left(x\right)}{n}} + {x}^{\left(\frac{1}{n}\right)}, {\left(1 + x\right)}^{\left(\frac{2}{n}\right)}\right)} \]
        7. Simplified99.8%

          \[\leadsto \frac{\color{blue}{\frac{3 \cdot \mathsf{log1p}\left(x\right) - 3 \cdot \log x}{n}}}{\mathsf{fma}\left({x}^{\left(\frac{1}{n}\right)}, e^{\frac{\mathsf{log1p}\left(x\right)}{n}} + {x}^{\left(\frac{1}{n}\right)}, {\left(1 + x\right)}^{\left(\frac{2}{n}\right)}\right)} \]

        if 1.25e107 < n

        1. Initial program 46.1%

          \[{\left(x + 1\right)}^{\left(\frac{1}{n}\right)} - {x}^{\left(\frac{1}{n}\right)} \]
        2. Taylor expanded in n around inf 79.9%

          \[\leadsto \color{blue}{\frac{\log \left(1 + x\right) - \log x}{n}} \]
        3. Step-by-step derivation
          1. +-rgt-identity79.9%

            \[\leadsto \frac{\color{blue}{\left(\log \left(1 + x\right) + 0\right)} - \log x}{n} \]
          2. +-rgt-identity79.9%

            \[\leadsto \frac{\color{blue}{\log \left(1 + x\right)} - \log x}{n} \]
          3. log1p-def79.9%

            \[\leadsto \frac{\color{blue}{\mathsf{log1p}\left(x\right)} - \log x}{n} \]
        4. Simplified79.9%

          \[\leadsto \color{blue}{\frac{\mathsf{log1p}\left(x\right) - \log x}{n}} \]
      3. Recombined 5 regimes into one program.
      4. Final simplification89.4%

        \[\leadsto \begin{array}{l} \mathbf{if}\;n \leq -165000:\\ \;\;\;\;\left(0.5 \cdot \frac{{\log \left(1 + x\right)}^{2}}{{n}^{2}} + \left(0.041666666666666664 \cdot \frac{{\log \left(1 + x\right)}^{4}}{{n}^{4}} + \left(\frac{\log \left(1 + x\right) - \log x}{n} - \frac{-0.16666666666666666 \cdot {\log \left(1 + x\right)}^{3} - -0.16666666666666666 \cdot {\log x}^{3}}{{n}^{3}}\right)\right)\right) - \left(0.5 \cdot \frac{{\log x}^{2}}{{n}^{2}} + 0.041666666666666664 \cdot \frac{{\log x}^{4}}{{n}^{4}}\right)\\ \mathbf{elif}\;n \leq 650000000:\\ \;\;\;\;e^{\frac{x}{n}} - {x}^{\left(\frac{1}{n}\right)}\\ \mathbf{elif}\;n \leq 1.3 \cdot 10^{+49}:\\ \;\;\;\;\frac{{x}^{\left(\frac{1}{n}\right)}}{x} \cdot \frac{\frac{0.5}{n \cdot n} - \frac{0.5}{n}}{x} + \left(\frac{{x}^{\left(\frac{1}{n}\right)} \cdot \left(\frac{0.3333333333333333}{n} + \left(\frac{0.16666666666666666}{{n}^{3}} - \frac{0.5}{n \cdot n}\right)\right)}{{x}^{3}} + \frac{{x}^{\left(\frac{1}{n}\right)}}{n \cdot x}\right)\\ \mathbf{elif}\;n \leq 1.2 \cdot 10^{+72}:\\ \;\;\;\;\frac{\frac{3 \cdot \mathsf{log1p}\left(x\right) - 3 \cdot \log x}{n}}{\mathsf{fma}\left({x}^{\left(\frac{1}{n}\right)}, {x}^{\left(\frac{1}{n}\right)} + e^{\frac{\mathsf{log1p}\left(x\right)}{n}}, {\left(1 + x\right)}^{\left(\frac{2}{n}\right)}\right)}\\ \mathbf{elif}\;n \leq 1.25 \cdot 10^{+107}:\\ \;\;\;\;\frac{{x}^{\left(\frac{1}{n}\right)}}{x} \cdot \frac{\frac{0.5}{n \cdot n} - \frac{0.5}{n}}{x} + \left(\frac{{x}^{\left(\frac{1}{n}\right)} \cdot \left(\frac{0.3333333333333333}{n} + \left(\frac{0.16666666666666666}{{n}^{3}} - \frac{0.5}{n \cdot n}\right)\right)}{{x}^{3}} + \frac{{x}^{\left(\frac{1}{n}\right)}}{n \cdot x}\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{log1p}\left(x\right) - \log x}{n}\\ \end{array} \]

      Alternative 3: 85.3% accurate, 0.2× speedup?

      \[\begin{array}{l} \\ \begin{array}{l} t_0 := \frac{0.5}{n \cdot n}\\ t_1 := {x}^{\left(\frac{1}{n}\right)}\\ t_2 := \frac{\mathsf{log1p}\left(x\right)}{n}\\ t_3 := \frac{t_1}{x} \cdot \frac{t_0 - \frac{0.5}{n}}{x} + \left(\frac{t_1 \cdot \left(\frac{0.3333333333333333}{n} + \left(\frac{0.16666666666666666}{{n}^{3}} - t_0\right)\right)}{{x}^{3}} + \frac{t_1}{n \cdot x}\right)\\ \mathbf{if}\;n \leq -1450000:\\ \;\;\;\;\left(\left(0.5 \cdot {t_2}^{2} - \frac{-0.16666666666666666 \cdot \left({\left(\mathsf{log1p}\left(x\right)\right)}^{3} - {\log x}^{3}\right)}{{n}^{3}}\right) - \frac{\mathsf{fma}\left(-1, \mathsf{log1p}\left(x\right), \log x\right)}{n}\right) + -0.5 \cdot {\left(\frac{\log x}{n}\right)}^{2}\\ \mathbf{elif}\;n \leq 460000000:\\ \;\;\;\;e^{\frac{x}{n}} - t_1\\ \mathbf{elif}\;n \leq 7.8 \cdot 10^{+47}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;n \leq 2.6 \cdot 10^{+72}:\\ \;\;\;\;\frac{\frac{3 \cdot \mathsf{log1p}\left(x\right) - 3 \cdot \log x}{n}}{\mathsf{fma}\left(t_1, t_1 + e^{t_2}, {\left(1 + x\right)}^{\left(\frac{2}{n}\right)}\right)}\\ \mathbf{elif}\;n \leq 2.8 \cdot 10^{+106}:\\ \;\;\;\;t_3\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{log1p}\left(x\right) - \log x}{n}\\ \end{array} \end{array} \]
      (FPCore (x n)
       :precision binary64
       (let* ((t_0 (/ 0.5 (* n n)))
              (t_1 (pow x (/ 1.0 n)))
              (t_2 (/ (log1p x) n))
              (t_3
               (+
                (* (/ t_1 x) (/ (- t_0 (/ 0.5 n)) x))
                (+
                 (/
                  (*
                   t_1
                   (+
                    (/ 0.3333333333333333 n)
                    (- (/ 0.16666666666666666 (pow n 3.0)) t_0)))
                  (pow x 3.0))
                 (/ t_1 (* n x))))))
         (if (<= n -1450000.0)
           (+
            (-
             (-
              (* 0.5 (pow t_2 2.0))
              (/
               (* -0.16666666666666666 (- (pow (log1p x) 3.0) (pow (log x) 3.0)))
               (pow n 3.0)))
             (/ (fma -1.0 (log1p x) (log x)) n))
            (* -0.5 (pow (/ (log x) n) 2.0)))
           (if (<= n 460000000.0)
             (- (exp (/ x n)) t_1)
             (if (<= n 7.8e+47)
               t_3
               (if (<= n 2.6e+72)
                 (/
                  (/ (- (* 3.0 (log1p x)) (* 3.0 (log x))) n)
                  (fma t_1 (+ t_1 (exp t_2)) (pow (+ 1.0 x) (/ 2.0 n))))
                 (if (<= n 2.8e+106) t_3 (/ (- (log1p x) (log x)) n))))))))
      double code(double x, double n) {
      	double t_0 = 0.5 / (n * n);
      	double t_1 = pow(x, (1.0 / n));
      	double t_2 = log1p(x) / n;
      	double t_3 = ((t_1 / x) * ((t_0 - (0.5 / n)) / x)) + (((t_1 * ((0.3333333333333333 / n) + ((0.16666666666666666 / pow(n, 3.0)) - t_0))) / pow(x, 3.0)) + (t_1 / (n * x)));
      	double tmp;
      	if (n <= -1450000.0) {
      		tmp = (((0.5 * pow(t_2, 2.0)) - ((-0.16666666666666666 * (pow(log1p(x), 3.0) - pow(log(x), 3.0))) / pow(n, 3.0))) - (fma(-1.0, log1p(x), log(x)) / n)) + (-0.5 * pow((log(x) / n), 2.0));
      	} else if (n <= 460000000.0) {
      		tmp = exp((x / n)) - t_1;
      	} else if (n <= 7.8e+47) {
      		tmp = t_3;
      	} else if (n <= 2.6e+72) {
      		tmp = (((3.0 * log1p(x)) - (3.0 * log(x))) / n) / fma(t_1, (t_1 + exp(t_2)), pow((1.0 + x), (2.0 / n)));
      	} else if (n <= 2.8e+106) {
      		tmp = t_3;
      	} else {
      		tmp = (log1p(x) - log(x)) / n;
      	}
      	return tmp;
      }
      
      function code(x, n)
      	t_0 = Float64(0.5 / Float64(n * n))
      	t_1 = x ^ Float64(1.0 / n)
      	t_2 = Float64(log1p(x) / n)
      	t_3 = Float64(Float64(Float64(t_1 / x) * Float64(Float64(t_0 - Float64(0.5 / n)) / x)) + Float64(Float64(Float64(t_1 * Float64(Float64(0.3333333333333333 / n) + Float64(Float64(0.16666666666666666 / (n ^ 3.0)) - t_0))) / (x ^ 3.0)) + Float64(t_1 / Float64(n * x))))
      	tmp = 0.0
      	if (n <= -1450000.0)
      		tmp = Float64(Float64(Float64(Float64(0.5 * (t_2 ^ 2.0)) - Float64(Float64(-0.16666666666666666 * Float64((log1p(x) ^ 3.0) - (log(x) ^ 3.0))) / (n ^ 3.0))) - Float64(fma(-1.0, log1p(x), log(x)) / n)) + Float64(-0.5 * (Float64(log(x) / n) ^ 2.0)));
      	elseif (n <= 460000000.0)
      		tmp = Float64(exp(Float64(x / n)) - t_1);
      	elseif (n <= 7.8e+47)
      		tmp = t_3;
      	elseif (n <= 2.6e+72)
      		tmp = Float64(Float64(Float64(Float64(3.0 * log1p(x)) - Float64(3.0 * log(x))) / n) / fma(t_1, Float64(t_1 + exp(t_2)), (Float64(1.0 + x) ^ Float64(2.0 / n))));
      	elseif (n <= 2.8e+106)
      		tmp = t_3;
      	else
      		tmp = Float64(Float64(log1p(x) - log(x)) / n);
      	end
      	return tmp
      end
      
      code[x_, n_] := Block[{t$95$0 = N[(0.5 / N[(n * n), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[Power[x, N[(1.0 / n), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$2 = N[(N[Log[1 + x], $MachinePrecision] / n), $MachinePrecision]}, Block[{t$95$3 = N[(N[(N[(t$95$1 / x), $MachinePrecision] * N[(N[(t$95$0 - N[(0.5 / n), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision] + N[(N[(N[(t$95$1 * N[(N[(0.3333333333333333 / n), $MachinePrecision] + N[(N[(0.16666666666666666 / N[Power[n, 3.0], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[Power[x, 3.0], $MachinePrecision]), $MachinePrecision] + N[(t$95$1 / N[(n * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[n, -1450000.0], N[(N[(N[(N[(0.5 * N[Power[t$95$2, 2.0], $MachinePrecision]), $MachinePrecision] - N[(N[(-0.16666666666666666 * N[(N[Power[N[Log[1 + x], $MachinePrecision], 3.0], $MachinePrecision] - N[Power[N[Log[x], $MachinePrecision], 3.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[Power[n, 3.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[(-1.0 * N[Log[1 + x], $MachinePrecision] + N[Log[x], $MachinePrecision]), $MachinePrecision] / n), $MachinePrecision]), $MachinePrecision] + N[(-0.5 * N[Power[N[(N[Log[x], $MachinePrecision] / n), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[n, 460000000.0], N[(N[Exp[N[(x / n), $MachinePrecision]], $MachinePrecision] - t$95$1), $MachinePrecision], If[LessEqual[n, 7.8e+47], t$95$3, If[LessEqual[n, 2.6e+72], N[(N[(N[(N[(3.0 * N[Log[1 + x], $MachinePrecision]), $MachinePrecision] - N[(3.0 * N[Log[x], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / n), $MachinePrecision] / N[(t$95$1 * N[(t$95$1 + N[Exp[t$95$2], $MachinePrecision]), $MachinePrecision] + N[Power[N[(1.0 + x), $MachinePrecision], N[(2.0 / n), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[n, 2.8e+106], t$95$3, N[(N[(N[Log[1 + x], $MachinePrecision] - N[Log[x], $MachinePrecision]), $MachinePrecision] / n), $MachinePrecision]]]]]]]]]]
      
      \begin{array}{l}
      
      \\
      \begin{array}{l}
      t_0 := \frac{0.5}{n \cdot n}\\
      t_1 := {x}^{\left(\frac{1}{n}\right)}\\
      t_2 := \frac{\mathsf{log1p}\left(x\right)}{n}\\
      t_3 := \frac{t_1}{x} \cdot \frac{t_0 - \frac{0.5}{n}}{x} + \left(\frac{t_1 \cdot \left(\frac{0.3333333333333333}{n} + \left(\frac{0.16666666666666666}{{n}^{3}} - t_0\right)\right)}{{x}^{3}} + \frac{t_1}{n \cdot x}\right)\\
      \mathbf{if}\;n \leq -1450000:\\
      \;\;\;\;\left(\left(0.5 \cdot {t_2}^{2} - \frac{-0.16666666666666666 \cdot \left({\left(\mathsf{log1p}\left(x\right)\right)}^{3} - {\log x}^{3}\right)}{{n}^{3}}\right) - \frac{\mathsf{fma}\left(-1, \mathsf{log1p}\left(x\right), \log x\right)}{n}\right) + -0.5 \cdot {\left(\frac{\log x}{n}\right)}^{2}\\
      
      \mathbf{elif}\;n \leq 460000000:\\
      \;\;\;\;e^{\frac{x}{n}} - t_1\\
      
      \mathbf{elif}\;n \leq 7.8 \cdot 10^{+47}:\\
      \;\;\;\;t_3\\
      
      \mathbf{elif}\;n \leq 2.6 \cdot 10^{+72}:\\
      \;\;\;\;\frac{\frac{3 \cdot \mathsf{log1p}\left(x\right) - 3 \cdot \log x}{n}}{\mathsf{fma}\left(t_1, t_1 + e^{t_2}, {\left(1 + x\right)}^{\left(\frac{2}{n}\right)}\right)}\\
      
      \mathbf{elif}\;n \leq 2.8 \cdot 10^{+106}:\\
      \;\;\;\;t_3\\
      
      \mathbf{else}:\\
      \;\;\;\;\frac{\mathsf{log1p}\left(x\right) - \log x}{n}\\
      
      
      \end{array}
      \end{array}
      
      Derivation
      1. Split input into 5 regimes
      2. if n < -1.45e6

        1. Initial program 30.1%

          \[{\left(x + 1\right)}^{\left(\frac{1}{n}\right)} - {x}^{\left(\frac{1}{n}\right)} \]
        2. Taylor expanded in n around 0 30.1%

          \[\leadsto \color{blue}{e^{\frac{\log \left(1 + x\right)}{n}}} - {x}^{\left(\frac{1}{n}\right)} \]
        3. Step-by-step derivation
          1. log1p-def30.1%

            \[\leadsto e^{\frac{\color{blue}{\mathsf{log1p}\left(x\right)}}{n}} - {x}^{\left(\frac{1}{n}\right)} \]
        4. Simplified30.1%

          \[\leadsto \color{blue}{e^{\frac{\mathsf{log1p}\left(x\right)}{n}}} - {x}^{\left(\frac{1}{n}\right)} \]
        5. Taylor expanded in n around -inf 83.3%

          \[\leadsto \color{blue}{\left(0.5 \cdot \frac{{\log \left(1 + x\right)}^{2}}{{n}^{2}} + \left(-1 \cdot \frac{-0.16666666666666666 \cdot {\log \left(1 + x\right)}^{3} - -0.16666666666666666 \cdot {\log x}^{3}}{{n}^{3}} + -1 \cdot \frac{-1 \cdot \log \left(1 + x\right) - -1 \cdot \log x}{n}\right)\right) - 0.5 \cdot \frac{{\log x}^{2}}{{n}^{2}}} \]
        6. Step-by-step derivation
          1. cancel-sign-sub-inv83.3%

            \[\leadsto \color{blue}{\left(0.5 \cdot \frac{{\log \left(1 + x\right)}^{2}}{{n}^{2}} + \left(-1 \cdot \frac{-0.16666666666666666 \cdot {\log \left(1 + x\right)}^{3} - -0.16666666666666666 \cdot {\log x}^{3}}{{n}^{3}} + -1 \cdot \frac{-1 \cdot \log \left(1 + x\right) - -1 \cdot \log x}{n}\right)\right) + \left(-0.5\right) \cdot \frac{{\log x}^{2}}{{n}^{2}}} \]
        7. Simplified83.3%

          \[\leadsto \color{blue}{\left(\left(0.5 \cdot {\left(\frac{\mathsf{log1p}\left(x\right)}{n}\right)}^{2} - \frac{-0.16666666666666666 \cdot \left({\left(\mathsf{log1p}\left(x\right)\right)}^{3} - {\log x}^{3}\right)}{{n}^{3}}\right) - \frac{\mathsf{fma}\left(-1, \mathsf{log1p}\left(x\right), \log x\right)}{n}\right) + -0.5 \cdot {\left(\frac{\log x}{n}\right)}^{2}} \]

        if -1.45e6 < n < 4.6e8

        1. Initial program 82.0%

          \[{\left(x + 1\right)}^{\left(\frac{1}{n}\right)} - {x}^{\left(\frac{1}{n}\right)} \]
        2. Taylor expanded in n around 0 82.0%

          \[\leadsto \color{blue}{e^{\frac{\log \left(1 + x\right)}{n}}} - {x}^{\left(\frac{1}{n}\right)} \]
        3. Step-by-step derivation
          1. log1p-def97.6%

            \[\leadsto e^{\frac{\color{blue}{\mathsf{log1p}\left(x\right)}}{n}} - {x}^{\left(\frac{1}{n}\right)} \]
        4. Simplified97.6%

          \[\leadsto \color{blue}{e^{\frac{\mathsf{log1p}\left(x\right)}{n}}} - {x}^{\left(\frac{1}{n}\right)} \]
        5. Taylor expanded in x around 0 97.7%

          \[\leadsto e^{\color{blue}{\frac{x}{n}}} - {x}^{\left(\frac{1}{n}\right)} \]

        if 4.6e8 < n < 7.8000000000000005e47 or 2.59999999999999981e72 < n < 2.79999999999999993e106

        1. Initial program 8.6%

          \[{\left(x + 1\right)}^{\left(\frac{1}{n}\right)} - {x}^{\left(\frac{1}{n}\right)} \]
        2. Taylor expanded in n around 0 8.6%

          \[\leadsto \color{blue}{e^{\frac{\log \left(1 + x\right)}{n}}} - {x}^{\left(\frac{1}{n}\right)} \]
        3. Step-by-step derivation
          1. log1p-def8.6%

            \[\leadsto e^{\frac{\color{blue}{\mathsf{log1p}\left(x\right)}}{n}} - {x}^{\left(\frac{1}{n}\right)} \]
        4. Simplified8.6%

          \[\leadsto \color{blue}{e^{\frac{\mathsf{log1p}\left(x\right)}{n}}} - {x}^{\left(\frac{1}{n}\right)} \]
        5. Taylor expanded in x around inf 86.9%

          \[\leadsto \color{blue}{\frac{e^{-1 \cdot \frac{\log \left(\frac{1}{x}\right)}{n}} \cdot \left(0.5 \cdot \frac{1}{{n}^{2}} - 0.5 \cdot \frac{1}{n}\right)}{{x}^{2}} + \left(\frac{e^{-1 \cdot \frac{\log \left(\frac{1}{x}\right)}{n}} \cdot \left(\left(0.3333333333333333 \cdot \frac{1}{n} + 0.16666666666666666 \cdot \frac{1}{{n}^{3}}\right) - 0.5 \cdot \frac{1}{{n}^{2}}\right)}{{x}^{3}} + \frac{e^{-1 \cdot \frac{\log \left(\frac{1}{x}\right)}{n}}}{n \cdot x}\right)} \]
        6. Simplified86.9%

          \[\leadsto \color{blue}{\frac{{x}^{\left(\frac{1}{n}\right)}}{x} \cdot \frac{\frac{0.5}{n \cdot n} - \frac{0.5}{n}}{x} + \left(\frac{\left(\frac{0.3333333333333333}{n} + \left(\frac{0.16666666666666666}{{n}^{3}} - \frac{0.5}{n \cdot n}\right)\right) \cdot {x}^{\left(\frac{1}{n}\right)}}{{x}^{3}} + \frac{{x}^{\left(\frac{1}{n}\right)}}{x \cdot n}\right)} \]

        if 7.8000000000000005e47 < n < 2.59999999999999981e72

        1. Initial program 3.6%

          \[{\left(x + 1\right)}^{\left(\frac{1}{n}\right)} - {x}^{\left(\frac{1}{n}\right)} \]
        2. Step-by-step derivation
          1. flip3--3.6%

            \[\leadsto \color{blue}{\frac{{\left({\left(x + 1\right)}^{\left(\frac{1}{n}\right)}\right)}^{3} - {\left({x}^{\left(\frac{1}{n}\right)}\right)}^{3}}{{\left(x + 1\right)}^{\left(\frac{1}{n}\right)} \cdot {\left(x + 1\right)}^{\left(\frac{1}{n}\right)} + \left({x}^{\left(\frac{1}{n}\right)} \cdot {x}^{\left(\frac{1}{n}\right)} + {\left(x + 1\right)}^{\left(\frac{1}{n}\right)} \cdot {x}^{\left(\frac{1}{n}\right)}\right)}} \]
          2. div-inv3.6%

            \[\leadsto \color{blue}{\left({\left({\left(x + 1\right)}^{\left(\frac{1}{n}\right)}\right)}^{3} - {\left({x}^{\left(\frac{1}{n}\right)}\right)}^{3}\right) \cdot \frac{1}{{\left(x + 1\right)}^{\left(\frac{1}{n}\right)} \cdot {\left(x + 1\right)}^{\left(\frac{1}{n}\right)} + \left({x}^{\left(\frac{1}{n}\right)} \cdot {x}^{\left(\frac{1}{n}\right)} + {\left(x + 1\right)}^{\left(\frac{1}{n}\right)} \cdot {x}^{\left(\frac{1}{n}\right)}\right)}} \]
          3. pow-to-exp3.6%

            \[\leadsto \left({\color{blue}{\left(e^{\log \left(x + 1\right) \cdot \frac{1}{n}}\right)}}^{3} - {\left({x}^{\left(\frac{1}{n}\right)}\right)}^{3}\right) \cdot \frac{1}{{\left(x + 1\right)}^{\left(\frac{1}{n}\right)} \cdot {\left(x + 1\right)}^{\left(\frac{1}{n}\right)} + \left({x}^{\left(\frac{1}{n}\right)} \cdot {x}^{\left(\frac{1}{n}\right)} + {\left(x + 1\right)}^{\left(\frac{1}{n}\right)} \cdot {x}^{\left(\frac{1}{n}\right)}\right)} \]
          4. pow-exp3.6%

            \[\leadsto \left(\color{blue}{e^{\left(\log \left(x + 1\right) \cdot \frac{1}{n}\right) \cdot 3}} - {\left({x}^{\left(\frac{1}{n}\right)}\right)}^{3}\right) \cdot \frac{1}{{\left(x + 1\right)}^{\left(\frac{1}{n}\right)} \cdot {\left(x + 1\right)}^{\left(\frac{1}{n}\right)} + \left({x}^{\left(\frac{1}{n}\right)} \cdot {x}^{\left(\frac{1}{n}\right)} + {\left(x + 1\right)}^{\left(\frac{1}{n}\right)} \cdot {x}^{\left(\frac{1}{n}\right)}\right)} \]
          5. un-div-inv3.6%

            \[\leadsto \left(e^{\color{blue}{\frac{\log \left(x + 1\right)}{n}} \cdot 3} - {\left({x}^{\left(\frac{1}{n}\right)}\right)}^{3}\right) \cdot \frac{1}{{\left(x + 1\right)}^{\left(\frac{1}{n}\right)} \cdot {\left(x + 1\right)}^{\left(\frac{1}{n}\right)} + \left({x}^{\left(\frac{1}{n}\right)} \cdot {x}^{\left(\frac{1}{n}\right)} + {\left(x + 1\right)}^{\left(\frac{1}{n}\right)} \cdot {x}^{\left(\frac{1}{n}\right)}\right)} \]
          6. +-commutative3.6%

            \[\leadsto \left(e^{\frac{\log \color{blue}{\left(1 + x\right)}}{n} \cdot 3} - {\left({x}^{\left(\frac{1}{n}\right)}\right)}^{3}\right) \cdot \frac{1}{{\left(x + 1\right)}^{\left(\frac{1}{n}\right)} \cdot {\left(x + 1\right)}^{\left(\frac{1}{n}\right)} + \left({x}^{\left(\frac{1}{n}\right)} \cdot {x}^{\left(\frac{1}{n}\right)} + {\left(x + 1\right)}^{\left(\frac{1}{n}\right)} \cdot {x}^{\left(\frac{1}{n}\right)}\right)} \]
          7. log1p-udef3.6%

            \[\leadsto \left(e^{\frac{\color{blue}{\mathsf{log1p}\left(x\right)}}{n} \cdot 3} - {\left({x}^{\left(\frac{1}{n}\right)}\right)}^{3}\right) \cdot \frac{1}{{\left(x + 1\right)}^{\left(\frac{1}{n}\right)} \cdot {\left(x + 1\right)}^{\left(\frac{1}{n}\right)} + \left({x}^{\left(\frac{1}{n}\right)} \cdot {x}^{\left(\frac{1}{n}\right)} + {\left(x + 1\right)}^{\left(\frac{1}{n}\right)} \cdot {x}^{\left(\frac{1}{n}\right)}\right)} \]
          8. inv-pow3.6%

            \[\leadsto \left(e^{\frac{\mathsf{log1p}\left(x\right)}{n} \cdot 3} - {\left({x}^{\color{blue}{\left({n}^{-1}\right)}}\right)}^{3}\right) \cdot \frac{1}{{\left(x + 1\right)}^{\left(\frac{1}{n}\right)} \cdot {\left(x + 1\right)}^{\left(\frac{1}{n}\right)} + \left({x}^{\left(\frac{1}{n}\right)} \cdot {x}^{\left(\frac{1}{n}\right)} + {\left(x + 1\right)}^{\left(\frac{1}{n}\right)} \cdot {x}^{\left(\frac{1}{n}\right)}\right)} \]
        3. Applied egg-rr3.6%

          \[\leadsto \color{blue}{\left(e^{\frac{\mathsf{log1p}\left(x\right)}{n} \cdot 3} - {\left({x}^{\left({n}^{-1}\right)}\right)}^{3}\right) \cdot \frac{1}{\mathsf{fma}\left({x}^{\left({n}^{-1}\right)}, e^{\frac{\mathsf{log1p}\left(x\right)}{n}} + {x}^{\left({n}^{-1}\right)}, {\left(e^{\frac{\mathsf{log1p}\left(x\right)}{n}}\right)}^{2}\right)}} \]
        4. Simplified3.6%

          \[\leadsto \color{blue}{\frac{{\left(e^{3}\right)}^{\left(\frac{\mathsf{log1p}\left(x\right)}{n}\right)} - {\left({x}^{\left(\frac{1}{n}\right)}\right)}^{3}}{\mathsf{fma}\left({x}^{\left(\frac{1}{n}\right)}, e^{\frac{\mathsf{log1p}\left(x\right)}{n}} + {x}^{\left(\frac{1}{n}\right)}, {\left(1 + x\right)}^{\left(\frac{2}{n}\right)}\right)}} \]
        5. Taylor expanded in n around inf 99.8%

          \[\leadsto \frac{\color{blue}{\frac{3 \cdot \log \left(1 + x\right) - \left(2 \cdot \log x + \log x\right)}{n}}}{\mathsf{fma}\left({x}^{\left(\frac{1}{n}\right)}, e^{\frac{\mathsf{log1p}\left(x\right)}{n}} + {x}^{\left(\frac{1}{n}\right)}, {\left(1 + x\right)}^{\left(\frac{2}{n}\right)}\right)} \]
        6. Step-by-step derivation
          1. log1p-def99.8%

            \[\leadsto \frac{\frac{3 \cdot \color{blue}{\mathsf{log1p}\left(x\right)} - \left(2 \cdot \log x + \log x\right)}{n}}{\mathsf{fma}\left({x}^{\left(\frac{1}{n}\right)}, e^{\frac{\mathsf{log1p}\left(x\right)}{n}} + {x}^{\left(\frac{1}{n}\right)}, {\left(1 + x\right)}^{\left(\frac{2}{n}\right)}\right)} \]
          2. distribute-lft1-in99.8%

            \[\leadsto \frac{\frac{3 \cdot \mathsf{log1p}\left(x\right) - \color{blue}{\left(2 + 1\right) \cdot \log x}}{n}}{\mathsf{fma}\left({x}^{\left(\frac{1}{n}\right)}, e^{\frac{\mathsf{log1p}\left(x\right)}{n}} + {x}^{\left(\frac{1}{n}\right)}, {\left(1 + x\right)}^{\left(\frac{2}{n}\right)}\right)} \]
          3. metadata-eval99.8%

            \[\leadsto \frac{\frac{3 \cdot \mathsf{log1p}\left(x\right) - \color{blue}{3} \cdot \log x}{n}}{\mathsf{fma}\left({x}^{\left(\frac{1}{n}\right)}, e^{\frac{\mathsf{log1p}\left(x\right)}{n}} + {x}^{\left(\frac{1}{n}\right)}, {\left(1 + x\right)}^{\left(\frac{2}{n}\right)}\right)} \]
        7. Simplified99.8%

          \[\leadsto \frac{\color{blue}{\frac{3 \cdot \mathsf{log1p}\left(x\right) - 3 \cdot \log x}{n}}}{\mathsf{fma}\left({x}^{\left(\frac{1}{n}\right)}, e^{\frac{\mathsf{log1p}\left(x\right)}{n}} + {x}^{\left(\frac{1}{n}\right)}, {\left(1 + x\right)}^{\left(\frac{2}{n}\right)}\right)} \]

        if 2.79999999999999993e106 < n

        1. Initial program 46.1%

          \[{\left(x + 1\right)}^{\left(\frac{1}{n}\right)} - {x}^{\left(\frac{1}{n}\right)} \]
        2. Taylor expanded in n around inf 79.9%

          \[\leadsto \color{blue}{\frac{\log \left(1 + x\right) - \log x}{n}} \]
        3. Step-by-step derivation
          1. +-rgt-identity79.9%

            \[\leadsto \frac{\color{blue}{\left(\log \left(1 + x\right) + 0\right)} - \log x}{n} \]
          2. +-rgt-identity79.9%

            \[\leadsto \frac{\color{blue}{\log \left(1 + x\right)} - \log x}{n} \]
          3. log1p-def79.9%

            \[\leadsto \frac{\color{blue}{\mathsf{log1p}\left(x\right)} - \log x}{n} \]
        4. Simplified79.9%

          \[\leadsto \color{blue}{\frac{\mathsf{log1p}\left(x\right) - \log x}{n}} \]
      3. Recombined 5 regimes into one program.
      4. Final simplification89.3%

        \[\leadsto \begin{array}{l} \mathbf{if}\;n \leq -1450000:\\ \;\;\;\;\left(\left(0.5 \cdot {\left(\frac{\mathsf{log1p}\left(x\right)}{n}\right)}^{2} - \frac{-0.16666666666666666 \cdot \left({\left(\mathsf{log1p}\left(x\right)\right)}^{3} - {\log x}^{3}\right)}{{n}^{3}}\right) - \frac{\mathsf{fma}\left(-1, \mathsf{log1p}\left(x\right), \log x\right)}{n}\right) + -0.5 \cdot {\left(\frac{\log x}{n}\right)}^{2}\\ \mathbf{elif}\;n \leq 460000000:\\ \;\;\;\;e^{\frac{x}{n}} - {x}^{\left(\frac{1}{n}\right)}\\ \mathbf{elif}\;n \leq 7.8 \cdot 10^{+47}:\\ \;\;\;\;\frac{{x}^{\left(\frac{1}{n}\right)}}{x} \cdot \frac{\frac{0.5}{n \cdot n} - \frac{0.5}{n}}{x} + \left(\frac{{x}^{\left(\frac{1}{n}\right)} \cdot \left(\frac{0.3333333333333333}{n} + \left(\frac{0.16666666666666666}{{n}^{3}} - \frac{0.5}{n \cdot n}\right)\right)}{{x}^{3}} + \frac{{x}^{\left(\frac{1}{n}\right)}}{n \cdot x}\right)\\ \mathbf{elif}\;n \leq 2.6 \cdot 10^{+72}:\\ \;\;\;\;\frac{\frac{3 \cdot \mathsf{log1p}\left(x\right) - 3 \cdot \log x}{n}}{\mathsf{fma}\left({x}^{\left(\frac{1}{n}\right)}, {x}^{\left(\frac{1}{n}\right)} + e^{\frac{\mathsf{log1p}\left(x\right)}{n}}, {\left(1 + x\right)}^{\left(\frac{2}{n}\right)}\right)}\\ \mathbf{elif}\;n \leq 2.8 \cdot 10^{+106}:\\ \;\;\;\;\frac{{x}^{\left(\frac{1}{n}\right)}}{x} \cdot \frac{\frac{0.5}{n \cdot n} - \frac{0.5}{n}}{x} + \left(\frac{{x}^{\left(\frac{1}{n}\right)} \cdot \left(\frac{0.3333333333333333}{n} + \left(\frac{0.16666666666666666}{{n}^{3}} - \frac{0.5}{n \cdot n}\right)\right)}{{x}^{3}} + \frac{{x}^{\left(\frac{1}{n}\right)}}{n \cdot x}\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{log1p}\left(x\right) - \log x}{n}\\ \end{array} \]

      Alternative 4: 85.3% accurate, 0.3× speedup?

      \[\begin{array}{l} \\ \begin{array}{l} t_0 := \frac{0.5}{n \cdot n}\\ t_1 := {x}^{\left(\frac{1}{n}\right)}\\ t_2 := \frac{t_1}{x} \cdot \frac{t_0 - \frac{0.5}{n}}{x} + \left(\frac{t_1 \cdot \left(\frac{0.3333333333333333}{n} + \left(\frac{0.16666666666666666}{{n}^{3}} - t_0\right)\right)}{{x}^{3}} + \frac{t_1}{n \cdot x}\right)\\ t_3 := \frac{\mathsf{log1p}\left(x\right) - \log x}{n}\\ \mathbf{if}\;n \leq -31000000:\\ \;\;\;\;\mathsf{fma}\left(0.5, \frac{{\left(\mathsf{log1p}\left(x\right)\right)}^{2}}{n \cdot n}, t_3 - 0.5 \cdot \frac{{\log x}^{2}}{n \cdot n}\right)\\ \mathbf{elif}\;n \leq 1400000000:\\ \;\;\;\;e^{\frac{x}{n}} - t_1\\ \mathbf{elif}\;n \leq 1.45 \cdot 10^{+49}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;n \leq 3.3 \cdot 10^{+72}:\\ \;\;\;\;\frac{\frac{3 \cdot \mathsf{log1p}\left(x\right) - 3 \cdot \log x}{n}}{\mathsf{fma}\left(t_1, t_1 + e^{\frac{\mathsf{log1p}\left(x\right)}{n}}, {\left(1 + x\right)}^{\left(\frac{2}{n}\right)}\right)}\\ \mathbf{elif}\;n \leq 5.9 \cdot 10^{+106}:\\ \;\;\;\;t_2\\ \mathbf{else}:\\ \;\;\;\;t_3\\ \end{array} \end{array} \]
      (FPCore (x n)
       :precision binary64
       (let* ((t_0 (/ 0.5 (* n n)))
              (t_1 (pow x (/ 1.0 n)))
              (t_2
               (+
                (* (/ t_1 x) (/ (- t_0 (/ 0.5 n)) x))
                (+
                 (/
                  (*
                   t_1
                   (+
                    (/ 0.3333333333333333 n)
                    (- (/ 0.16666666666666666 (pow n 3.0)) t_0)))
                  (pow x 3.0))
                 (/ t_1 (* n x)))))
              (t_3 (/ (- (log1p x) (log x)) n)))
         (if (<= n -31000000.0)
           (fma
            0.5
            (/ (pow (log1p x) 2.0) (* n n))
            (- t_3 (* 0.5 (/ (pow (log x) 2.0) (* n n)))))
           (if (<= n 1400000000.0)
             (- (exp (/ x n)) t_1)
             (if (<= n 1.45e+49)
               t_2
               (if (<= n 3.3e+72)
                 (/
                  (/ (- (* 3.0 (log1p x)) (* 3.0 (log x))) n)
                  (fma t_1 (+ t_1 (exp (/ (log1p x) n))) (pow (+ 1.0 x) (/ 2.0 n))))
                 (if (<= n 5.9e+106) t_2 t_3)))))))
      double code(double x, double n) {
      	double t_0 = 0.5 / (n * n);
      	double t_1 = pow(x, (1.0 / n));
      	double t_2 = ((t_1 / x) * ((t_0 - (0.5 / n)) / x)) + (((t_1 * ((0.3333333333333333 / n) + ((0.16666666666666666 / pow(n, 3.0)) - t_0))) / pow(x, 3.0)) + (t_1 / (n * x)));
      	double t_3 = (log1p(x) - log(x)) / n;
      	double tmp;
      	if (n <= -31000000.0) {
      		tmp = fma(0.5, (pow(log1p(x), 2.0) / (n * n)), (t_3 - (0.5 * (pow(log(x), 2.0) / (n * n)))));
      	} else if (n <= 1400000000.0) {
      		tmp = exp((x / n)) - t_1;
      	} else if (n <= 1.45e+49) {
      		tmp = t_2;
      	} else if (n <= 3.3e+72) {
      		tmp = (((3.0 * log1p(x)) - (3.0 * log(x))) / n) / fma(t_1, (t_1 + exp((log1p(x) / n))), pow((1.0 + x), (2.0 / n)));
      	} else if (n <= 5.9e+106) {
      		tmp = t_2;
      	} else {
      		tmp = t_3;
      	}
      	return tmp;
      }
      
      function code(x, n)
      	t_0 = Float64(0.5 / Float64(n * n))
      	t_1 = x ^ Float64(1.0 / n)
      	t_2 = Float64(Float64(Float64(t_1 / x) * Float64(Float64(t_0 - Float64(0.5 / n)) / x)) + Float64(Float64(Float64(t_1 * Float64(Float64(0.3333333333333333 / n) + Float64(Float64(0.16666666666666666 / (n ^ 3.0)) - t_0))) / (x ^ 3.0)) + Float64(t_1 / Float64(n * x))))
      	t_3 = Float64(Float64(log1p(x) - log(x)) / n)
      	tmp = 0.0
      	if (n <= -31000000.0)
      		tmp = fma(0.5, Float64((log1p(x) ^ 2.0) / Float64(n * n)), Float64(t_3 - Float64(0.5 * Float64((log(x) ^ 2.0) / Float64(n * n)))));
      	elseif (n <= 1400000000.0)
      		tmp = Float64(exp(Float64(x / n)) - t_1);
      	elseif (n <= 1.45e+49)
      		tmp = t_2;
      	elseif (n <= 3.3e+72)
      		tmp = Float64(Float64(Float64(Float64(3.0 * log1p(x)) - Float64(3.0 * log(x))) / n) / fma(t_1, Float64(t_1 + exp(Float64(log1p(x) / n))), (Float64(1.0 + x) ^ Float64(2.0 / n))));
      	elseif (n <= 5.9e+106)
      		tmp = t_2;
      	else
      		tmp = t_3;
      	end
      	return tmp
      end
      
      code[x_, n_] := Block[{t$95$0 = N[(0.5 / N[(n * n), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[Power[x, N[(1.0 / n), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[(t$95$1 / x), $MachinePrecision] * N[(N[(t$95$0 - N[(0.5 / n), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision] + N[(N[(N[(t$95$1 * N[(N[(0.3333333333333333 / n), $MachinePrecision] + N[(N[(0.16666666666666666 / N[Power[n, 3.0], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[Power[x, 3.0], $MachinePrecision]), $MachinePrecision] + N[(t$95$1 / N[(n * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[(N[Log[1 + x], $MachinePrecision] - N[Log[x], $MachinePrecision]), $MachinePrecision] / n), $MachinePrecision]}, If[LessEqual[n, -31000000.0], N[(0.5 * N[(N[Power[N[Log[1 + x], $MachinePrecision], 2.0], $MachinePrecision] / N[(n * n), $MachinePrecision]), $MachinePrecision] + N[(t$95$3 - N[(0.5 * N[(N[Power[N[Log[x], $MachinePrecision], 2.0], $MachinePrecision] / N[(n * n), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[n, 1400000000.0], N[(N[Exp[N[(x / n), $MachinePrecision]], $MachinePrecision] - t$95$1), $MachinePrecision], If[LessEqual[n, 1.45e+49], t$95$2, If[LessEqual[n, 3.3e+72], N[(N[(N[(N[(3.0 * N[Log[1 + x], $MachinePrecision]), $MachinePrecision] - N[(3.0 * N[Log[x], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / n), $MachinePrecision] / N[(t$95$1 * N[(t$95$1 + N[Exp[N[(N[Log[1 + x], $MachinePrecision] / n), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] + N[Power[N[(1.0 + x), $MachinePrecision], N[(2.0 / n), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[n, 5.9e+106], t$95$2, t$95$3]]]]]]]]]
      
      \begin{array}{l}
      
      \\
      \begin{array}{l}
      t_0 := \frac{0.5}{n \cdot n}\\
      t_1 := {x}^{\left(\frac{1}{n}\right)}\\
      t_2 := \frac{t_1}{x} \cdot \frac{t_0 - \frac{0.5}{n}}{x} + \left(\frac{t_1 \cdot \left(\frac{0.3333333333333333}{n} + \left(\frac{0.16666666666666666}{{n}^{3}} - t_0\right)\right)}{{x}^{3}} + \frac{t_1}{n \cdot x}\right)\\
      t_3 := \frac{\mathsf{log1p}\left(x\right) - \log x}{n}\\
      \mathbf{if}\;n \leq -31000000:\\
      \;\;\;\;\mathsf{fma}\left(0.5, \frac{{\left(\mathsf{log1p}\left(x\right)\right)}^{2}}{n \cdot n}, t_3 - 0.5 \cdot \frac{{\log x}^{2}}{n \cdot n}\right)\\
      
      \mathbf{elif}\;n \leq 1400000000:\\
      \;\;\;\;e^{\frac{x}{n}} - t_1\\
      
      \mathbf{elif}\;n \leq 1.45 \cdot 10^{+49}:\\
      \;\;\;\;t_2\\
      
      \mathbf{elif}\;n \leq 3.3 \cdot 10^{+72}:\\
      \;\;\;\;\frac{\frac{3 \cdot \mathsf{log1p}\left(x\right) - 3 \cdot \log x}{n}}{\mathsf{fma}\left(t_1, t_1 + e^{\frac{\mathsf{log1p}\left(x\right)}{n}}, {\left(1 + x\right)}^{\left(\frac{2}{n}\right)}\right)}\\
      
      \mathbf{elif}\;n \leq 5.9 \cdot 10^{+106}:\\
      \;\;\;\;t_2\\
      
      \mathbf{else}:\\
      \;\;\;\;t_3\\
      
      
      \end{array}
      \end{array}
      
      Derivation
      1. Split input into 5 regimes
      2. if n < -3.1e7

        1. Initial program 29.4%

          \[{\left(x + 1\right)}^{\left(\frac{1}{n}\right)} - {x}^{\left(\frac{1}{n}\right)} \]
        2. Taylor expanded in n around inf 83.1%

          \[\leadsto \color{blue}{\left(0.5 \cdot \frac{{\log \left(1 + x\right)}^{2}}{{n}^{2}} + \frac{\log \left(1 + x\right)}{n}\right) - \left(\frac{\log x}{n} + 0.5 \cdot \frac{{\log x}^{2}}{{n}^{2}}\right)} \]
        3. Step-by-step derivation
          1. associate--l+74.9%

            \[\leadsto \color{blue}{0.5 \cdot \frac{{\log \left(1 + x\right)}^{2}}{{n}^{2}} + \left(\frac{\log \left(1 + x\right)}{n} - \left(\frac{\log x}{n} + 0.5 \cdot \frac{{\log x}^{2}}{{n}^{2}}\right)\right)} \]
          2. fma-def74.9%

            \[\leadsto \color{blue}{\mathsf{fma}\left(0.5, \frac{{\log \left(1 + x\right)}^{2}}{{n}^{2}}, \frac{\log \left(1 + x\right)}{n} - \left(\frac{\log x}{n} + 0.5 \cdot \frac{{\log x}^{2}}{{n}^{2}}\right)\right)} \]
          3. log1p-def74.9%

            \[\leadsto \mathsf{fma}\left(0.5, \frac{{\color{blue}{\left(\mathsf{log1p}\left(x\right)\right)}}^{2}}{{n}^{2}}, \frac{\log \left(1 + x\right)}{n} - \left(\frac{\log x}{n} + 0.5 \cdot \frac{{\log x}^{2}}{{n}^{2}}\right)\right) \]
          4. unpow274.9%

            \[\leadsto \mathsf{fma}\left(0.5, \frac{{\left(\mathsf{log1p}\left(x\right)\right)}^{2}}{\color{blue}{n \cdot n}}, \frac{\log \left(1 + x\right)}{n} - \left(\frac{\log x}{n} + 0.5 \cdot \frac{{\log x}^{2}}{{n}^{2}}\right)\right) \]
          5. associate--r+83.1%

            \[\leadsto \mathsf{fma}\left(0.5, \frac{{\left(\mathsf{log1p}\left(x\right)\right)}^{2}}{n \cdot n}, \color{blue}{\left(\frac{\log \left(1 + x\right)}{n} - \frac{\log x}{n}\right) - 0.5 \cdot \frac{{\log x}^{2}}{{n}^{2}}}\right) \]
          6. +-rgt-identity83.1%

            \[\leadsto \mathsf{fma}\left(0.5, \frac{{\left(\mathsf{log1p}\left(x\right)\right)}^{2}}{n \cdot n}, \left(\frac{\color{blue}{\log \left(1 + x\right) + 0}}{n} - \frac{\log x}{n}\right) - 0.5 \cdot \frac{{\log x}^{2}}{{n}^{2}}\right) \]
          7. div-sub83.2%

            \[\leadsto \mathsf{fma}\left(0.5, \frac{{\left(\mathsf{log1p}\left(x\right)\right)}^{2}}{n \cdot n}, \color{blue}{\frac{\left(\log \left(1 + x\right) + 0\right) - \log x}{n}} - 0.5 \cdot \frac{{\log x}^{2}}{{n}^{2}}\right) \]
          8. +-rgt-identity83.2%

            \[\leadsto \mathsf{fma}\left(0.5, \frac{{\left(\mathsf{log1p}\left(x\right)\right)}^{2}}{n \cdot n}, \frac{\color{blue}{\log \left(1 + x\right)} - \log x}{n} - 0.5 \cdot \frac{{\log x}^{2}}{{n}^{2}}\right) \]
          9. log1p-def83.2%

            \[\leadsto \mathsf{fma}\left(0.5, \frac{{\left(\mathsf{log1p}\left(x\right)\right)}^{2}}{n \cdot n}, \frac{\color{blue}{\mathsf{log1p}\left(x\right)} - \log x}{n} - 0.5 \cdot \frac{{\log x}^{2}}{{n}^{2}}\right) \]
          10. unpow283.2%

            \[\leadsto \mathsf{fma}\left(0.5, \frac{{\left(\mathsf{log1p}\left(x\right)\right)}^{2}}{n \cdot n}, \frac{\mathsf{log1p}\left(x\right) - \log x}{n} - 0.5 \cdot \frac{{\log x}^{2}}{\color{blue}{n \cdot n}}\right) \]
        4. Simplified83.2%

          \[\leadsto \color{blue}{\mathsf{fma}\left(0.5, \frac{{\left(\mathsf{log1p}\left(x\right)\right)}^{2}}{n \cdot n}, \frac{\mathsf{log1p}\left(x\right) - \log x}{n} - 0.5 \cdot \frac{{\log x}^{2}}{n \cdot n}\right)} \]

        if -3.1e7 < n < 1.4e9

        1. Initial program 82.0%

          \[{\left(x + 1\right)}^{\left(\frac{1}{n}\right)} - {x}^{\left(\frac{1}{n}\right)} \]
        2. Taylor expanded in n around 0 82.0%

          \[\leadsto \color{blue}{e^{\frac{\log \left(1 + x\right)}{n}}} - {x}^{\left(\frac{1}{n}\right)} \]
        3. Step-by-step derivation
          1. log1p-def97.4%

            \[\leadsto e^{\frac{\color{blue}{\mathsf{log1p}\left(x\right)}}{n}} - {x}^{\left(\frac{1}{n}\right)} \]
        4. Simplified97.4%

          \[\leadsto \color{blue}{e^{\frac{\mathsf{log1p}\left(x\right)}{n}}} - {x}^{\left(\frac{1}{n}\right)} \]
        5. Taylor expanded in x around 0 97.5%

          \[\leadsto e^{\color{blue}{\frac{x}{n}}} - {x}^{\left(\frac{1}{n}\right)} \]

        if 1.4e9 < n < 1.45e49 or 3.3e72 < n < 5.90000000000000027e106

        1. Initial program 8.6%

          \[{\left(x + 1\right)}^{\left(\frac{1}{n}\right)} - {x}^{\left(\frac{1}{n}\right)} \]
        2. Taylor expanded in n around 0 8.6%

          \[\leadsto \color{blue}{e^{\frac{\log \left(1 + x\right)}{n}}} - {x}^{\left(\frac{1}{n}\right)} \]
        3. Step-by-step derivation
          1. log1p-def8.6%

            \[\leadsto e^{\frac{\color{blue}{\mathsf{log1p}\left(x\right)}}{n}} - {x}^{\left(\frac{1}{n}\right)} \]
        4. Simplified8.6%

          \[\leadsto \color{blue}{e^{\frac{\mathsf{log1p}\left(x\right)}{n}}} - {x}^{\left(\frac{1}{n}\right)} \]
        5. Taylor expanded in x around inf 86.9%

          \[\leadsto \color{blue}{\frac{e^{-1 \cdot \frac{\log \left(\frac{1}{x}\right)}{n}} \cdot \left(0.5 \cdot \frac{1}{{n}^{2}} - 0.5 \cdot \frac{1}{n}\right)}{{x}^{2}} + \left(\frac{e^{-1 \cdot \frac{\log \left(\frac{1}{x}\right)}{n}} \cdot \left(\left(0.3333333333333333 \cdot \frac{1}{n} + 0.16666666666666666 \cdot \frac{1}{{n}^{3}}\right) - 0.5 \cdot \frac{1}{{n}^{2}}\right)}{{x}^{3}} + \frac{e^{-1 \cdot \frac{\log \left(\frac{1}{x}\right)}{n}}}{n \cdot x}\right)} \]
        6. Simplified86.9%

          \[\leadsto \color{blue}{\frac{{x}^{\left(\frac{1}{n}\right)}}{x} \cdot \frac{\frac{0.5}{n \cdot n} - \frac{0.5}{n}}{x} + \left(\frac{\left(\frac{0.3333333333333333}{n} + \left(\frac{0.16666666666666666}{{n}^{3}} - \frac{0.5}{n \cdot n}\right)\right) \cdot {x}^{\left(\frac{1}{n}\right)}}{{x}^{3}} + \frac{{x}^{\left(\frac{1}{n}\right)}}{x \cdot n}\right)} \]

        if 1.45e49 < n < 3.3e72

        1. Initial program 3.6%

          \[{\left(x + 1\right)}^{\left(\frac{1}{n}\right)} - {x}^{\left(\frac{1}{n}\right)} \]
        2. Step-by-step derivation
          1. flip3--3.6%

            \[\leadsto \color{blue}{\frac{{\left({\left(x + 1\right)}^{\left(\frac{1}{n}\right)}\right)}^{3} - {\left({x}^{\left(\frac{1}{n}\right)}\right)}^{3}}{{\left(x + 1\right)}^{\left(\frac{1}{n}\right)} \cdot {\left(x + 1\right)}^{\left(\frac{1}{n}\right)} + \left({x}^{\left(\frac{1}{n}\right)} \cdot {x}^{\left(\frac{1}{n}\right)} + {\left(x + 1\right)}^{\left(\frac{1}{n}\right)} \cdot {x}^{\left(\frac{1}{n}\right)}\right)}} \]
          2. div-inv3.6%

            \[\leadsto \color{blue}{\left({\left({\left(x + 1\right)}^{\left(\frac{1}{n}\right)}\right)}^{3} - {\left({x}^{\left(\frac{1}{n}\right)}\right)}^{3}\right) \cdot \frac{1}{{\left(x + 1\right)}^{\left(\frac{1}{n}\right)} \cdot {\left(x + 1\right)}^{\left(\frac{1}{n}\right)} + \left({x}^{\left(\frac{1}{n}\right)} \cdot {x}^{\left(\frac{1}{n}\right)} + {\left(x + 1\right)}^{\left(\frac{1}{n}\right)} \cdot {x}^{\left(\frac{1}{n}\right)}\right)}} \]
          3. pow-to-exp3.6%

            \[\leadsto \left({\color{blue}{\left(e^{\log \left(x + 1\right) \cdot \frac{1}{n}}\right)}}^{3} - {\left({x}^{\left(\frac{1}{n}\right)}\right)}^{3}\right) \cdot \frac{1}{{\left(x + 1\right)}^{\left(\frac{1}{n}\right)} \cdot {\left(x + 1\right)}^{\left(\frac{1}{n}\right)} + \left({x}^{\left(\frac{1}{n}\right)} \cdot {x}^{\left(\frac{1}{n}\right)} + {\left(x + 1\right)}^{\left(\frac{1}{n}\right)} \cdot {x}^{\left(\frac{1}{n}\right)}\right)} \]
          4. pow-exp3.6%

            \[\leadsto \left(\color{blue}{e^{\left(\log \left(x + 1\right) \cdot \frac{1}{n}\right) \cdot 3}} - {\left({x}^{\left(\frac{1}{n}\right)}\right)}^{3}\right) \cdot \frac{1}{{\left(x + 1\right)}^{\left(\frac{1}{n}\right)} \cdot {\left(x + 1\right)}^{\left(\frac{1}{n}\right)} + \left({x}^{\left(\frac{1}{n}\right)} \cdot {x}^{\left(\frac{1}{n}\right)} + {\left(x + 1\right)}^{\left(\frac{1}{n}\right)} \cdot {x}^{\left(\frac{1}{n}\right)}\right)} \]
          5. un-div-inv3.6%

            \[\leadsto \left(e^{\color{blue}{\frac{\log \left(x + 1\right)}{n}} \cdot 3} - {\left({x}^{\left(\frac{1}{n}\right)}\right)}^{3}\right) \cdot \frac{1}{{\left(x + 1\right)}^{\left(\frac{1}{n}\right)} \cdot {\left(x + 1\right)}^{\left(\frac{1}{n}\right)} + \left({x}^{\left(\frac{1}{n}\right)} \cdot {x}^{\left(\frac{1}{n}\right)} + {\left(x + 1\right)}^{\left(\frac{1}{n}\right)} \cdot {x}^{\left(\frac{1}{n}\right)}\right)} \]
          6. +-commutative3.6%

            \[\leadsto \left(e^{\frac{\log \color{blue}{\left(1 + x\right)}}{n} \cdot 3} - {\left({x}^{\left(\frac{1}{n}\right)}\right)}^{3}\right) \cdot \frac{1}{{\left(x + 1\right)}^{\left(\frac{1}{n}\right)} \cdot {\left(x + 1\right)}^{\left(\frac{1}{n}\right)} + \left({x}^{\left(\frac{1}{n}\right)} \cdot {x}^{\left(\frac{1}{n}\right)} + {\left(x + 1\right)}^{\left(\frac{1}{n}\right)} \cdot {x}^{\left(\frac{1}{n}\right)}\right)} \]
          7. log1p-udef3.6%

            \[\leadsto \left(e^{\frac{\color{blue}{\mathsf{log1p}\left(x\right)}}{n} \cdot 3} - {\left({x}^{\left(\frac{1}{n}\right)}\right)}^{3}\right) \cdot \frac{1}{{\left(x + 1\right)}^{\left(\frac{1}{n}\right)} \cdot {\left(x + 1\right)}^{\left(\frac{1}{n}\right)} + \left({x}^{\left(\frac{1}{n}\right)} \cdot {x}^{\left(\frac{1}{n}\right)} + {\left(x + 1\right)}^{\left(\frac{1}{n}\right)} \cdot {x}^{\left(\frac{1}{n}\right)}\right)} \]
          8. inv-pow3.6%

            \[\leadsto \left(e^{\frac{\mathsf{log1p}\left(x\right)}{n} \cdot 3} - {\left({x}^{\color{blue}{\left({n}^{-1}\right)}}\right)}^{3}\right) \cdot \frac{1}{{\left(x + 1\right)}^{\left(\frac{1}{n}\right)} \cdot {\left(x + 1\right)}^{\left(\frac{1}{n}\right)} + \left({x}^{\left(\frac{1}{n}\right)} \cdot {x}^{\left(\frac{1}{n}\right)} + {\left(x + 1\right)}^{\left(\frac{1}{n}\right)} \cdot {x}^{\left(\frac{1}{n}\right)}\right)} \]
        3. Applied egg-rr3.6%

          \[\leadsto \color{blue}{\left(e^{\frac{\mathsf{log1p}\left(x\right)}{n} \cdot 3} - {\left({x}^{\left({n}^{-1}\right)}\right)}^{3}\right) \cdot \frac{1}{\mathsf{fma}\left({x}^{\left({n}^{-1}\right)}, e^{\frac{\mathsf{log1p}\left(x\right)}{n}} + {x}^{\left({n}^{-1}\right)}, {\left(e^{\frac{\mathsf{log1p}\left(x\right)}{n}}\right)}^{2}\right)}} \]
        4. Simplified3.6%

          \[\leadsto \color{blue}{\frac{{\left(e^{3}\right)}^{\left(\frac{\mathsf{log1p}\left(x\right)}{n}\right)} - {\left({x}^{\left(\frac{1}{n}\right)}\right)}^{3}}{\mathsf{fma}\left({x}^{\left(\frac{1}{n}\right)}, e^{\frac{\mathsf{log1p}\left(x\right)}{n}} + {x}^{\left(\frac{1}{n}\right)}, {\left(1 + x\right)}^{\left(\frac{2}{n}\right)}\right)}} \]
        5. Taylor expanded in n around inf 99.8%

          \[\leadsto \frac{\color{blue}{\frac{3 \cdot \log \left(1 + x\right) - \left(2 \cdot \log x + \log x\right)}{n}}}{\mathsf{fma}\left({x}^{\left(\frac{1}{n}\right)}, e^{\frac{\mathsf{log1p}\left(x\right)}{n}} + {x}^{\left(\frac{1}{n}\right)}, {\left(1 + x\right)}^{\left(\frac{2}{n}\right)}\right)} \]
        6. Step-by-step derivation
          1. log1p-def99.8%

            \[\leadsto \frac{\frac{3 \cdot \color{blue}{\mathsf{log1p}\left(x\right)} - \left(2 \cdot \log x + \log x\right)}{n}}{\mathsf{fma}\left({x}^{\left(\frac{1}{n}\right)}, e^{\frac{\mathsf{log1p}\left(x\right)}{n}} + {x}^{\left(\frac{1}{n}\right)}, {\left(1 + x\right)}^{\left(\frac{2}{n}\right)}\right)} \]
          2. distribute-lft1-in99.8%

            \[\leadsto \frac{\frac{3 \cdot \mathsf{log1p}\left(x\right) - \color{blue}{\left(2 + 1\right) \cdot \log x}}{n}}{\mathsf{fma}\left({x}^{\left(\frac{1}{n}\right)}, e^{\frac{\mathsf{log1p}\left(x\right)}{n}} + {x}^{\left(\frac{1}{n}\right)}, {\left(1 + x\right)}^{\left(\frac{2}{n}\right)}\right)} \]
          3. metadata-eval99.8%

            \[\leadsto \frac{\frac{3 \cdot \mathsf{log1p}\left(x\right) - \color{blue}{3} \cdot \log x}{n}}{\mathsf{fma}\left({x}^{\left(\frac{1}{n}\right)}, e^{\frac{\mathsf{log1p}\left(x\right)}{n}} + {x}^{\left(\frac{1}{n}\right)}, {\left(1 + x\right)}^{\left(\frac{2}{n}\right)}\right)} \]
        7. Simplified99.8%

          \[\leadsto \frac{\color{blue}{\frac{3 \cdot \mathsf{log1p}\left(x\right) - 3 \cdot \log x}{n}}}{\mathsf{fma}\left({x}^{\left(\frac{1}{n}\right)}, e^{\frac{\mathsf{log1p}\left(x\right)}{n}} + {x}^{\left(\frac{1}{n}\right)}, {\left(1 + x\right)}^{\left(\frac{2}{n}\right)}\right)} \]

        if 5.90000000000000027e106 < n

        1. Initial program 46.1%

          \[{\left(x + 1\right)}^{\left(\frac{1}{n}\right)} - {x}^{\left(\frac{1}{n}\right)} \]
        2. Taylor expanded in n around inf 79.9%

          \[\leadsto \color{blue}{\frac{\log \left(1 + x\right) - \log x}{n}} \]
        3. Step-by-step derivation
          1. +-rgt-identity79.9%

            \[\leadsto \frac{\color{blue}{\left(\log \left(1 + x\right) + 0\right)} - \log x}{n} \]
          2. +-rgt-identity79.9%

            \[\leadsto \frac{\color{blue}{\log \left(1 + x\right)} - \log x}{n} \]
          3. log1p-def79.9%

            \[\leadsto \frac{\color{blue}{\mathsf{log1p}\left(x\right)} - \log x}{n} \]
        4. Simplified79.9%

          \[\leadsto \color{blue}{\frac{\mathsf{log1p}\left(x\right) - \log x}{n}} \]
      3. Recombined 5 regimes into one program.
      4. Final simplification89.2%

        \[\leadsto \begin{array}{l} \mathbf{if}\;n \leq -31000000:\\ \;\;\;\;\mathsf{fma}\left(0.5, \frac{{\left(\mathsf{log1p}\left(x\right)\right)}^{2}}{n \cdot n}, \frac{\mathsf{log1p}\left(x\right) - \log x}{n} - 0.5 \cdot \frac{{\log x}^{2}}{n \cdot n}\right)\\ \mathbf{elif}\;n \leq 1400000000:\\ \;\;\;\;e^{\frac{x}{n}} - {x}^{\left(\frac{1}{n}\right)}\\ \mathbf{elif}\;n \leq 1.45 \cdot 10^{+49}:\\ \;\;\;\;\frac{{x}^{\left(\frac{1}{n}\right)}}{x} \cdot \frac{\frac{0.5}{n \cdot n} - \frac{0.5}{n}}{x} + \left(\frac{{x}^{\left(\frac{1}{n}\right)} \cdot \left(\frac{0.3333333333333333}{n} + \left(\frac{0.16666666666666666}{{n}^{3}} - \frac{0.5}{n \cdot n}\right)\right)}{{x}^{3}} + \frac{{x}^{\left(\frac{1}{n}\right)}}{n \cdot x}\right)\\ \mathbf{elif}\;n \leq 3.3 \cdot 10^{+72}:\\ \;\;\;\;\frac{\frac{3 \cdot \mathsf{log1p}\left(x\right) - 3 \cdot \log x}{n}}{\mathsf{fma}\left({x}^{\left(\frac{1}{n}\right)}, {x}^{\left(\frac{1}{n}\right)} + e^{\frac{\mathsf{log1p}\left(x\right)}{n}}, {\left(1 + x\right)}^{\left(\frac{2}{n}\right)}\right)}\\ \mathbf{elif}\;n \leq 5.9 \cdot 10^{+106}:\\ \;\;\;\;\frac{{x}^{\left(\frac{1}{n}\right)}}{x} \cdot \frac{\frac{0.5}{n \cdot n} - \frac{0.5}{n}}{x} + \left(\frac{{x}^{\left(\frac{1}{n}\right)} \cdot \left(\frac{0.3333333333333333}{n} + \left(\frac{0.16666666666666666}{{n}^{3}} - \frac{0.5}{n \cdot n}\right)\right)}{{x}^{3}} + \frac{{x}^{\left(\frac{1}{n}\right)}}{n \cdot x}\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{log1p}\left(x\right) - \log x}{n}\\ \end{array} \]

      Alternative 5: 85.0% accurate, 0.3× speedup?

      \[\begin{array}{l} \\ \begin{array}{l} t_0 := \frac{0.5}{n \cdot n}\\ t_1 := {x}^{\left(\frac{1}{n}\right)}\\ t_2 := \frac{t_1}{x} \cdot \frac{t_0 - \frac{0.5}{n}}{x} + \left(\frac{t_1 \cdot \left(\frac{0.3333333333333333}{n} + \left(\frac{0.16666666666666666}{{n}^{3}} - t_0\right)\right)}{{x}^{3}} + \frac{t_1}{n \cdot x}\right)\\ t_3 := \frac{\log x}{n}\\ t_4 := \frac{\mathsf{log1p}\left(x\right) - \log x}{n}\\ \mathbf{if}\;n \leq -13200000:\\ \;\;\;\;\mathsf{fma}\left(0.5, \frac{{\left(\mathsf{log1p}\left(x\right)\right)}^{2}}{n \cdot n}, t_4 - 0.5 \cdot \frac{{\log x}^{2}}{n \cdot n}\right)\\ \mathbf{elif}\;n \leq 2500000000:\\ \;\;\;\;e^{\frac{x}{n}} - t_1\\ \mathbf{elif}\;n \leq 8.6 \cdot 10^{+47}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;n \leq 3.2 \cdot 10^{+72}:\\ \;\;\;\;\mathsf{fma}\left(-0.5, {t_3}^{2}, -0.16666666666666666 \cdot {t_3}^{3}\right) + \frac{-1}{\frac{n}{\log x}}\\ \mathbf{elif}\;n \leq 2.8 \cdot 10^{+106}:\\ \;\;\;\;t_2\\ \mathbf{else}:\\ \;\;\;\;t_4\\ \end{array} \end{array} \]
      (FPCore (x n)
       :precision binary64
       (let* ((t_0 (/ 0.5 (* n n)))
              (t_1 (pow x (/ 1.0 n)))
              (t_2
               (+
                (* (/ t_1 x) (/ (- t_0 (/ 0.5 n)) x))
                (+
                 (/
                  (*
                   t_1
                   (+
                    (/ 0.3333333333333333 n)
                    (- (/ 0.16666666666666666 (pow n 3.0)) t_0)))
                  (pow x 3.0))
                 (/ t_1 (* n x)))))
              (t_3 (/ (log x) n))
              (t_4 (/ (- (log1p x) (log x)) n)))
         (if (<= n -13200000.0)
           (fma
            0.5
            (/ (pow (log1p x) 2.0) (* n n))
            (- t_4 (* 0.5 (/ (pow (log x) 2.0) (* n n)))))
           (if (<= n 2500000000.0)
             (- (exp (/ x n)) t_1)
             (if (<= n 8.6e+47)
               t_2
               (if (<= n 3.2e+72)
                 (+
                  (fma -0.5 (pow t_3 2.0) (* -0.16666666666666666 (pow t_3 3.0)))
                  (/ -1.0 (/ n (log x))))
                 (if (<= n 2.8e+106) t_2 t_4)))))))
      double code(double x, double n) {
      	double t_0 = 0.5 / (n * n);
      	double t_1 = pow(x, (1.0 / n));
      	double t_2 = ((t_1 / x) * ((t_0 - (0.5 / n)) / x)) + (((t_1 * ((0.3333333333333333 / n) + ((0.16666666666666666 / pow(n, 3.0)) - t_0))) / pow(x, 3.0)) + (t_1 / (n * x)));
      	double t_3 = log(x) / n;
      	double t_4 = (log1p(x) - log(x)) / n;
      	double tmp;
      	if (n <= -13200000.0) {
      		tmp = fma(0.5, (pow(log1p(x), 2.0) / (n * n)), (t_4 - (0.5 * (pow(log(x), 2.0) / (n * n)))));
      	} else if (n <= 2500000000.0) {
      		tmp = exp((x / n)) - t_1;
      	} else if (n <= 8.6e+47) {
      		tmp = t_2;
      	} else if (n <= 3.2e+72) {
      		tmp = fma(-0.5, pow(t_3, 2.0), (-0.16666666666666666 * pow(t_3, 3.0))) + (-1.0 / (n / log(x)));
      	} else if (n <= 2.8e+106) {
      		tmp = t_2;
      	} else {
      		tmp = t_4;
      	}
      	return tmp;
      }
      
      function code(x, n)
      	t_0 = Float64(0.5 / Float64(n * n))
      	t_1 = x ^ Float64(1.0 / n)
      	t_2 = Float64(Float64(Float64(t_1 / x) * Float64(Float64(t_0 - Float64(0.5 / n)) / x)) + Float64(Float64(Float64(t_1 * Float64(Float64(0.3333333333333333 / n) + Float64(Float64(0.16666666666666666 / (n ^ 3.0)) - t_0))) / (x ^ 3.0)) + Float64(t_1 / Float64(n * x))))
      	t_3 = Float64(log(x) / n)
      	t_4 = Float64(Float64(log1p(x) - log(x)) / n)
      	tmp = 0.0
      	if (n <= -13200000.0)
      		tmp = fma(0.5, Float64((log1p(x) ^ 2.0) / Float64(n * n)), Float64(t_4 - Float64(0.5 * Float64((log(x) ^ 2.0) / Float64(n * n)))));
      	elseif (n <= 2500000000.0)
      		tmp = Float64(exp(Float64(x / n)) - t_1);
      	elseif (n <= 8.6e+47)
      		tmp = t_2;
      	elseif (n <= 3.2e+72)
      		tmp = Float64(fma(-0.5, (t_3 ^ 2.0), Float64(-0.16666666666666666 * (t_3 ^ 3.0))) + Float64(-1.0 / Float64(n / log(x))));
      	elseif (n <= 2.8e+106)
      		tmp = t_2;
      	else
      		tmp = t_4;
      	end
      	return tmp
      end
      
      code[x_, n_] := Block[{t$95$0 = N[(0.5 / N[(n * n), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[Power[x, N[(1.0 / n), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[(t$95$1 / x), $MachinePrecision] * N[(N[(t$95$0 - N[(0.5 / n), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision] + N[(N[(N[(t$95$1 * N[(N[(0.3333333333333333 / n), $MachinePrecision] + N[(N[(0.16666666666666666 / N[Power[n, 3.0], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[Power[x, 3.0], $MachinePrecision]), $MachinePrecision] + N[(t$95$1 / N[(n * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[Log[x], $MachinePrecision] / n), $MachinePrecision]}, Block[{t$95$4 = N[(N[(N[Log[1 + x], $MachinePrecision] - N[Log[x], $MachinePrecision]), $MachinePrecision] / n), $MachinePrecision]}, If[LessEqual[n, -13200000.0], N[(0.5 * N[(N[Power[N[Log[1 + x], $MachinePrecision], 2.0], $MachinePrecision] / N[(n * n), $MachinePrecision]), $MachinePrecision] + N[(t$95$4 - N[(0.5 * N[(N[Power[N[Log[x], $MachinePrecision], 2.0], $MachinePrecision] / N[(n * n), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[n, 2500000000.0], N[(N[Exp[N[(x / n), $MachinePrecision]], $MachinePrecision] - t$95$1), $MachinePrecision], If[LessEqual[n, 8.6e+47], t$95$2, If[LessEqual[n, 3.2e+72], N[(N[(-0.5 * N[Power[t$95$3, 2.0], $MachinePrecision] + N[(-0.16666666666666666 * N[Power[t$95$3, 3.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(-1.0 / N[(n / N[Log[x], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[n, 2.8e+106], t$95$2, t$95$4]]]]]]]]]]
      
      \begin{array}{l}
      
      \\
      \begin{array}{l}
      t_0 := \frac{0.5}{n \cdot n}\\
      t_1 := {x}^{\left(\frac{1}{n}\right)}\\
      t_2 := \frac{t_1}{x} \cdot \frac{t_0 - \frac{0.5}{n}}{x} + \left(\frac{t_1 \cdot \left(\frac{0.3333333333333333}{n} + \left(\frac{0.16666666666666666}{{n}^{3}} - t_0\right)\right)}{{x}^{3}} + \frac{t_1}{n \cdot x}\right)\\
      t_3 := \frac{\log x}{n}\\
      t_4 := \frac{\mathsf{log1p}\left(x\right) - \log x}{n}\\
      \mathbf{if}\;n \leq -13200000:\\
      \;\;\;\;\mathsf{fma}\left(0.5, \frac{{\left(\mathsf{log1p}\left(x\right)\right)}^{2}}{n \cdot n}, t_4 - 0.5 \cdot \frac{{\log x}^{2}}{n \cdot n}\right)\\
      
      \mathbf{elif}\;n \leq 2500000000:\\
      \;\;\;\;e^{\frac{x}{n}} - t_1\\
      
      \mathbf{elif}\;n \leq 8.6 \cdot 10^{+47}:\\
      \;\;\;\;t_2\\
      
      \mathbf{elif}\;n \leq 3.2 \cdot 10^{+72}:\\
      \;\;\;\;\mathsf{fma}\left(-0.5, {t_3}^{2}, -0.16666666666666666 \cdot {t_3}^{3}\right) + \frac{-1}{\frac{n}{\log x}}\\
      
      \mathbf{elif}\;n \leq 2.8 \cdot 10^{+106}:\\
      \;\;\;\;t_2\\
      
      \mathbf{else}:\\
      \;\;\;\;t_4\\
      
      
      \end{array}
      \end{array}
      
      Derivation
      1. Split input into 5 regimes
      2. if n < -1.32e7

        1. Initial program 29.4%

          \[{\left(x + 1\right)}^{\left(\frac{1}{n}\right)} - {x}^{\left(\frac{1}{n}\right)} \]
        2. Taylor expanded in n around inf 83.1%

          \[\leadsto \color{blue}{\left(0.5 \cdot \frac{{\log \left(1 + x\right)}^{2}}{{n}^{2}} + \frac{\log \left(1 + x\right)}{n}\right) - \left(\frac{\log x}{n} + 0.5 \cdot \frac{{\log x}^{2}}{{n}^{2}}\right)} \]
        3. Step-by-step derivation
          1. associate--l+74.9%

            \[\leadsto \color{blue}{0.5 \cdot \frac{{\log \left(1 + x\right)}^{2}}{{n}^{2}} + \left(\frac{\log \left(1 + x\right)}{n} - \left(\frac{\log x}{n} + 0.5 \cdot \frac{{\log x}^{2}}{{n}^{2}}\right)\right)} \]
          2. fma-def74.9%

            \[\leadsto \color{blue}{\mathsf{fma}\left(0.5, \frac{{\log \left(1 + x\right)}^{2}}{{n}^{2}}, \frac{\log \left(1 + x\right)}{n} - \left(\frac{\log x}{n} + 0.5 \cdot \frac{{\log x}^{2}}{{n}^{2}}\right)\right)} \]
          3. log1p-def74.9%

            \[\leadsto \mathsf{fma}\left(0.5, \frac{{\color{blue}{\left(\mathsf{log1p}\left(x\right)\right)}}^{2}}{{n}^{2}}, \frac{\log \left(1 + x\right)}{n} - \left(\frac{\log x}{n} + 0.5 \cdot \frac{{\log x}^{2}}{{n}^{2}}\right)\right) \]
          4. unpow274.9%

            \[\leadsto \mathsf{fma}\left(0.5, \frac{{\left(\mathsf{log1p}\left(x\right)\right)}^{2}}{\color{blue}{n \cdot n}}, \frac{\log \left(1 + x\right)}{n} - \left(\frac{\log x}{n} + 0.5 \cdot \frac{{\log x}^{2}}{{n}^{2}}\right)\right) \]
          5. associate--r+83.1%

            \[\leadsto \mathsf{fma}\left(0.5, \frac{{\left(\mathsf{log1p}\left(x\right)\right)}^{2}}{n \cdot n}, \color{blue}{\left(\frac{\log \left(1 + x\right)}{n} - \frac{\log x}{n}\right) - 0.5 \cdot \frac{{\log x}^{2}}{{n}^{2}}}\right) \]
          6. +-rgt-identity83.1%

            \[\leadsto \mathsf{fma}\left(0.5, \frac{{\left(\mathsf{log1p}\left(x\right)\right)}^{2}}{n \cdot n}, \left(\frac{\color{blue}{\log \left(1 + x\right) + 0}}{n} - \frac{\log x}{n}\right) - 0.5 \cdot \frac{{\log x}^{2}}{{n}^{2}}\right) \]
          7. div-sub83.2%

            \[\leadsto \mathsf{fma}\left(0.5, \frac{{\left(\mathsf{log1p}\left(x\right)\right)}^{2}}{n \cdot n}, \color{blue}{\frac{\left(\log \left(1 + x\right) + 0\right) - \log x}{n}} - 0.5 \cdot \frac{{\log x}^{2}}{{n}^{2}}\right) \]
          8. +-rgt-identity83.2%

            \[\leadsto \mathsf{fma}\left(0.5, \frac{{\left(\mathsf{log1p}\left(x\right)\right)}^{2}}{n \cdot n}, \frac{\color{blue}{\log \left(1 + x\right)} - \log x}{n} - 0.5 \cdot \frac{{\log x}^{2}}{{n}^{2}}\right) \]
          9. log1p-def83.2%

            \[\leadsto \mathsf{fma}\left(0.5, \frac{{\left(\mathsf{log1p}\left(x\right)\right)}^{2}}{n \cdot n}, \frac{\color{blue}{\mathsf{log1p}\left(x\right)} - \log x}{n} - 0.5 \cdot \frac{{\log x}^{2}}{{n}^{2}}\right) \]
          10. unpow283.2%

            \[\leadsto \mathsf{fma}\left(0.5, \frac{{\left(\mathsf{log1p}\left(x\right)\right)}^{2}}{n \cdot n}, \frac{\mathsf{log1p}\left(x\right) - \log x}{n} - 0.5 \cdot \frac{{\log x}^{2}}{\color{blue}{n \cdot n}}\right) \]
        4. Simplified83.2%

          \[\leadsto \color{blue}{\mathsf{fma}\left(0.5, \frac{{\left(\mathsf{log1p}\left(x\right)\right)}^{2}}{n \cdot n}, \frac{\mathsf{log1p}\left(x\right) - \log x}{n} - 0.5 \cdot \frac{{\log x}^{2}}{n \cdot n}\right)} \]

        if -1.32e7 < n < 2.5e9

        1. Initial program 82.0%

          \[{\left(x + 1\right)}^{\left(\frac{1}{n}\right)} - {x}^{\left(\frac{1}{n}\right)} \]
        2. Taylor expanded in n around 0 82.0%

          \[\leadsto \color{blue}{e^{\frac{\log \left(1 + x\right)}{n}}} - {x}^{\left(\frac{1}{n}\right)} \]
        3. Step-by-step derivation
          1. log1p-def97.4%

            \[\leadsto e^{\frac{\color{blue}{\mathsf{log1p}\left(x\right)}}{n}} - {x}^{\left(\frac{1}{n}\right)} \]
        4. Simplified97.4%

          \[\leadsto \color{blue}{e^{\frac{\mathsf{log1p}\left(x\right)}{n}}} - {x}^{\left(\frac{1}{n}\right)} \]
        5. Taylor expanded in x around 0 97.5%

          \[\leadsto e^{\color{blue}{\frac{x}{n}}} - {x}^{\left(\frac{1}{n}\right)} \]

        if 2.5e9 < n < 8.59999999999999989e47 or 3.2000000000000001e72 < n < 2.79999999999999993e106

        1. Initial program 8.6%

          \[{\left(x + 1\right)}^{\left(\frac{1}{n}\right)} - {x}^{\left(\frac{1}{n}\right)} \]
        2. Taylor expanded in n around 0 8.6%

          \[\leadsto \color{blue}{e^{\frac{\log \left(1 + x\right)}{n}}} - {x}^{\left(\frac{1}{n}\right)} \]
        3. Step-by-step derivation
          1. log1p-def8.6%

            \[\leadsto e^{\frac{\color{blue}{\mathsf{log1p}\left(x\right)}}{n}} - {x}^{\left(\frac{1}{n}\right)} \]
        4. Simplified8.6%

          \[\leadsto \color{blue}{e^{\frac{\mathsf{log1p}\left(x\right)}{n}}} - {x}^{\left(\frac{1}{n}\right)} \]
        5. Taylor expanded in x around inf 86.9%

          \[\leadsto \color{blue}{\frac{e^{-1 \cdot \frac{\log \left(\frac{1}{x}\right)}{n}} \cdot \left(0.5 \cdot \frac{1}{{n}^{2}} - 0.5 \cdot \frac{1}{n}\right)}{{x}^{2}} + \left(\frac{e^{-1 \cdot \frac{\log \left(\frac{1}{x}\right)}{n}} \cdot \left(\left(0.3333333333333333 \cdot \frac{1}{n} + 0.16666666666666666 \cdot \frac{1}{{n}^{3}}\right) - 0.5 \cdot \frac{1}{{n}^{2}}\right)}{{x}^{3}} + \frac{e^{-1 \cdot \frac{\log \left(\frac{1}{x}\right)}{n}}}{n \cdot x}\right)} \]
        6. Simplified86.9%

          \[\leadsto \color{blue}{\frac{{x}^{\left(\frac{1}{n}\right)}}{x} \cdot \frac{\frac{0.5}{n \cdot n} - \frac{0.5}{n}}{x} + \left(\frac{\left(\frac{0.3333333333333333}{n} + \left(\frac{0.16666666666666666}{{n}^{3}} - \frac{0.5}{n \cdot n}\right)\right) \cdot {x}^{\left(\frac{1}{n}\right)}}{{x}^{3}} + \frac{{x}^{\left(\frac{1}{n}\right)}}{x \cdot n}\right)} \]

        if 8.59999999999999989e47 < n < 3.2000000000000001e72

        1. Initial program 3.6%

          \[{\left(x + 1\right)}^{\left(\frac{1}{n}\right)} - {x}^{\left(\frac{1}{n}\right)} \]
        2. Taylor expanded in x around 0 3.6%

          \[\leadsto \color{blue}{1} - {x}^{\left(\frac{1}{n}\right)} \]
        3. Taylor expanded in n around inf 99.1%

          \[\leadsto \color{blue}{-1 \cdot \frac{\log x}{n} + \left(-0.5 \cdot \frac{{\log x}^{2}}{{n}^{2}} + -0.16666666666666666 \cdot \frac{{\log x}^{3}}{{n}^{3}}\right)} \]
        4. Step-by-step derivation
          1. +-commutative99.1%

            \[\leadsto \color{blue}{\left(-0.5 \cdot \frac{{\log x}^{2}}{{n}^{2}} + -0.16666666666666666 \cdot \frac{{\log x}^{3}}{{n}^{3}}\right) + -1 \cdot \frac{\log x}{n}} \]
          2. mul-1-neg99.1%

            \[\leadsto \left(-0.5 \cdot \frac{{\log x}^{2}}{{n}^{2}} + -0.16666666666666666 \cdot \frac{{\log x}^{3}}{{n}^{3}}\right) + \color{blue}{\left(-\frac{\log x}{n}\right)} \]
          3. unsub-neg99.1%

            \[\leadsto \color{blue}{\left(-0.5 \cdot \frac{{\log x}^{2}}{{n}^{2}} + -0.16666666666666666 \cdot \frac{{\log x}^{3}}{{n}^{3}}\right) - \frac{\log x}{n}} \]
          4. fma-def99.1%

            \[\leadsto \color{blue}{\mathsf{fma}\left(-0.5, \frac{{\log x}^{2}}{{n}^{2}}, -0.16666666666666666 \cdot \frac{{\log x}^{3}}{{n}^{3}}\right)} - \frac{\log x}{n} \]
          5. unpow299.1%

            \[\leadsto \mathsf{fma}\left(-0.5, \frac{\color{blue}{\log x \cdot \log x}}{{n}^{2}}, -0.16666666666666666 \cdot \frac{{\log x}^{3}}{{n}^{3}}\right) - \frac{\log x}{n} \]
          6. unpow299.1%

            \[\leadsto \mathsf{fma}\left(-0.5, \frac{\log x \cdot \log x}{\color{blue}{n \cdot n}}, -0.16666666666666666 \cdot \frac{{\log x}^{3}}{{n}^{3}}\right) - \frac{\log x}{n} \]
          7. times-frac99.1%

            \[\leadsto \mathsf{fma}\left(-0.5, \color{blue}{\frac{\log x}{n} \cdot \frac{\log x}{n}}, -0.16666666666666666 \cdot \frac{{\log x}^{3}}{{n}^{3}}\right) - \frac{\log x}{n} \]
          8. unpow299.1%

            \[\leadsto \mathsf{fma}\left(-0.5, \color{blue}{{\left(\frac{\log x}{n}\right)}^{2}}, -0.16666666666666666 \cdot \frac{{\log x}^{3}}{{n}^{3}}\right) - \frac{\log x}{n} \]
          9. cube-div99.1%

            \[\leadsto \mathsf{fma}\left(-0.5, {\left(\frac{\log x}{n}\right)}^{2}, -0.16666666666666666 \cdot \color{blue}{{\left(\frac{\log x}{n}\right)}^{3}}\right) - \frac{\log x}{n} \]
        5. Simplified99.1%

          \[\leadsto \color{blue}{\mathsf{fma}\left(-0.5, {\left(\frac{\log x}{n}\right)}^{2}, -0.16666666666666666 \cdot {\left(\frac{\log x}{n}\right)}^{3}\right) - \frac{\log x}{n}} \]
        6. Step-by-step derivation
          1. clear-num99.3%

            \[\leadsto \mathsf{fma}\left(-0.5, {\left(\frac{\log x}{n}\right)}^{2}, -0.16666666666666666 \cdot {\left(\frac{\log x}{n}\right)}^{3}\right) - \color{blue}{\frac{1}{\frac{n}{\log x}}} \]
          2. inv-pow99.3%

            \[\leadsto \mathsf{fma}\left(-0.5, {\left(\frac{\log x}{n}\right)}^{2}, -0.16666666666666666 \cdot {\left(\frac{\log x}{n}\right)}^{3}\right) - \color{blue}{{\left(\frac{n}{\log x}\right)}^{-1}} \]
        7. Applied egg-rr99.3%

          \[\leadsto \mathsf{fma}\left(-0.5, {\left(\frac{\log x}{n}\right)}^{2}, -0.16666666666666666 \cdot {\left(\frac{\log x}{n}\right)}^{3}\right) - \color{blue}{{\left(\frac{n}{\log x}\right)}^{-1}} \]
        8. Step-by-step derivation
          1. unpow-199.3%

            \[\leadsto \mathsf{fma}\left(-0.5, {\left(\frac{\log x}{n}\right)}^{2}, -0.16666666666666666 \cdot {\left(\frac{\log x}{n}\right)}^{3}\right) - \color{blue}{\frac{1}{\frac{n}{\log x}}} \]
        9. Simplified99.3%

          \[\leadsto \mathsf{fma}\left(-0.5, {\left(\frac{\log x}{n}\right)}^{2}, -0.16666666666666666 \cdot {\left(\frac{\log x}{n}\right)}^{3}\right) - \color{blue}{\frac{1}{\frac{n}{\log x}}} \]

        if 2.79999999999999993e106 < n

        1. Initial program 46.1%

          \[{\left(x + 1\right)}^{\left(\frac{1}{n}\right)} - {x}^{\left(\frac{1}{n}\right)} \]
        2. Taylor expanded in n around inf 79.9%

          \[\leadsto \color{blue}{\frac{\log \left(1 + x\right) - \log x}{n}} \]
        3. Step-by-step derivation
          1. +-rgt-identity79.9%

            \[\leadsto \frac{\color{blue}{\left(\log \left(1 + x\right) + 0\right)} - \log x}{n} \]
          2. +-rgt-identity79.9%

            \[\leadsto \frac{\color{blue}{\log \left(1 + x\right)} - \log x}{n} \]
          3. log1p-def79.9%

            \[\leadsto \frac{\color{blue}{\mathsf{log1p}\left(x\right)} - \log x}{n} \]
        4. Simplified79.9%

          \[\leadsto \color{blue}{\frac{\mathsf{log1p}\left(x\right) - \log x}{n}} \]
      3. Recombined 5 regimes into one program.
      4. Final simplification89.2%

        \[\leadsto \begin{array}{l} \mathbf{if}\;n \leq -13200000:\\ \;\;\;\;\mathsf{fma}\left(0.5, \frac{{\left(\mathsf{log1p}\left(x\right)\right)}^{2}}{n \cdot n}, \frac{\mathsf{log1p}\left(x\right) - \log x}{n} - 0.5 \cdot \frac{{\log x}^{2}}{n \cdot n}\right)\\ \mathbf{elif}\;n \leq 2500000000:\\ \;\;\;\;e^{\frac{x}{n}} - {x}^{\left(\frac{1}{n}\right)}\\ \mathbf{elif}\;n \leq 8.6 \cdot 10^{+47}:\\ \;\;\;\;\frac{{x}^{\left(\frac{1}{n}\right)}}{x} \cdot \frac{\frac{0.5}{n \cdot n} - \frac{0.5}{n}}{x} + \left(\frac{{x}^{\left(\frac{1}{n}\right)} \cdot \left(\frac{0.3333333333333333}{n} + \left(\frac{0.16666666666666666}{{n}^{3}} - \frac{0.5}{n \cdot n}\right)\right)}{{x}^{3}} + \frac{{x}^{\left(\frac{1}{n}\right)}}{n \cdot x}\right)\\ \mathbf{elif}\;n \leq 3.2 \cdot 10^{+72}:\\ \;\;\;\;\mathsf{fma}\left(-0.5, {\left(\frac{\log x}{n}\right)}^{2}, -0.16666666666666666 \cdot {\left(\frac{\log x}{n}\right)}^{3}\right) + \frac{-1}{\frac{n}{\log x}}\\ \mathbf{elif}\;n \leq 2.8 \cdot 10^{+106}:\\ \;\;\;\;\frac{{x}^{\left(\frac{1}{n}\right)}}{x} \cdot \frac{\frac{0.5}{n \cdot n} - \frac{0.5}{n}}{x} + \left(\frac{{x}^{\left(\frac{1}{n}\right)} \cdot \left(\frac{0.3333333333333333}{n} + \left(\frac{0.16666666666666666}{{n}^{3}} - \frac{0.5}{n \cdot n}\right)\right)}{{x}^{3}} + \frac{{x}^{\left(\frac{1}{n}\right)}}{n \cdot x}\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{log1p}\left(x\right) - \log x}{n}\\ \end{array} \]

      Alternative 6: 85.0% accurate, 0.3× speedup?

      \[\begin{array}{l} \\ \begin{array}{l} t_0 := {x}^{\left(\frac{1}{n}\right)}\\ t_1 := \frac{\log x}{n}\\ t_2 := \frac{\mathsf{log1p}\left(x\right) - \log x}{n}\\ t_3 := \frac{0.5}{n \cdot n}\\ t_4 := \frac{t_0}{x} \cdot \frac{t_3 - \frac{0.5}{n}}{x} + \left(\frac{t_0 \cdot \left(\frac{0.3333333333333333}{n} + \left(\frac{0.16666666666666666}{{n}^{3}} - t_3\right)\right)}{{x}^{3}} + \frac{t_0}{n \cdot x}\right)\\ \mathbf{if}\;n \leq -24500000000:\\ \;\;\;\;t_2\\ \mathbf{elif}\;n \leq 4400000000:\\ \;\;\;\;e^{\frac{x}{n}} - t_0\\ \mathbf{elif}\;n \leq 1.45 \cdot 10^{+50}:\\ \;\;\;\;t_4\\ \mathbf{elif}\;n \leq 2.6 \cdot 10^{+72}:\\ \;\;\;\;\mathsf{fma}\left(-0.5, {t_1}^{2}, -0.16666666666666666 \cdot {t_1}^{3}\right) + \frac{-1}{\frac{n}{\log x}}\\ \mathbf{elif}\;n \leq 2.7 \cdot 10^{+109}:\\ \;\;\;\;t_4\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array} \end{array} \]
      (FPCore (x n)
       :precision binary64
       (let* ((t_0 (pow x (/ 1.0 n)))
              (t_1 (/ (log x) n))
              (t_2 (/ (- (log1p x) (log x)) n))
              (t_3 (/ 0.5 (* n n)))
              (t_4
               (+
                (* (/ t_0 x) (/ (- t_3 (/ 0.5 n)) x))
                (+
                 (/
                  (*
                   t_0
                   (+
                    (/ 0.3333333333333333 n)
                    (- (/ 0.16666666666666666 (pow n 3.0)) t_3)))
                  (pow x 3.0))
                 (/ t_0 (* n x))))))
         (if (<= n -24500000000.0)
           t_2
           (if (<= n 4400000000.0)
             (- (exp (/ x n)) t_0)
             (if (<= n 1.45e+50)
               t_4
               (if (<= n 2.6e+72)
                 (+
                  (fma -0.5 (pow t_1 2.0) (* -0.16666666666666666 (pow t_1 3.0)))
                  (/ -1.0 (/ n (log x))))
                 (if (<= n 2.7e+109) t_4 t_2)))))))
      double code(double x, double n) {
      	double t_0 = pow(x, (1.0 / n));
      	double t_1 = log(x) / n;
      	double t_2 = (log1p(x) - log(x)) / n;
      	double t_3 = 0.5 / (n * n);
      	double t_4 = ((t_0 / x) * ((t_3 - (0.5 / n)) / x)) + (((t_0 * ((0.3333333333333333 / n) + ((0.16666666666666666 / pow(n, 3.0)) - t_3))) / pow(x, 3.0)) + (t_0 / (n * x)));
      	double tmp;
      	if (n <= -24500000000.0) {
      		tmp = t_2;
      	} else if (n <= 4400000000.0) {
      		tmp = exp((x / n)) - t_0;
      	} else if (n <= 1.45e+50) {
      		tmp = t_4;
      	} else if (n <= 2.6e+72) {
      		tmp = fma(-0.5, pow(t_1, 2.0), (-0.16666666666666666 * pow(t_1, 3.0))) + (-1.0 / (n / log(x)));
      	} else if (n <= 2.7e+109) {
      		tmp = t_4;
      	} else {
      		tmp = t_2;
      	}
      	return tmp;
      }
      
      function code(x, n)
      	t_0 = x ^ Float64(1.0 / n)
      	t_1 = Float64(log(x) / n)
      	t_2 = Float64(Float64(log1p(x) - log(x)) / n)
      	t_3 = Float64(0.5 / Float64(n * n))
      	t_4 = Float64(Float64(Float64(t_0 / x) * Float64(Float64(t_3 - Float64(0.5 / n)) / x)) + Float64(Float64(Float64(t_0 * Float64(Float64(0.3333333333333333 / n) + Float64(Float64(0.16666666666666666 / (n ^ 3.0)) - t_3))) / (x ^ 3.0)) + Float64(t_0 / Float64(n * x))))
      	tmp = 0.0
      	if (n <= -24500000000.0)
      		tmp = t_2;
      	elseif (n <= 4400000000.0)
      		tmp = Float64(exp(Float64(x / n)) - t_0);
      	elseif (n <= 1.45e+50)
      		tmp = t_4;
      	elseif (n <= 2.6e+72)
      		tmp = Float64(fma(-0.5, (t_1 ^ 2.0), Float64(-0.16666666666666666 * (t_1 ^ 3.0))) + Float64(-1.0 / Float64(n / log(x))));
      	elseif (n <= 2.7e+109)
      		tmp = t_4;
      	else
      		tmp = t_2;
      	end
      	return tmp
      end
      
      code[x_, n_] := Block[{t$95$0 = N[Power[x, N[(1.0 / n), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$1 = N[(N[Log[x], $MachinePrecision] / n), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[Log[1 + x], $MachinePrecision] - N[Log[x], $MachinePrecision]), $MachinePrecision] / n), $MachinePrecision]}, Block[{t$95$3 = N[(0.5 / N[(n * n), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[(N[(N[(t$95$0 / x), $MachinePrecision] * N[(N[(t$95$3 - N[(0.5 / n), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision] + N[(N[(N[(t$95$0 * N[(N[(0.3333333333333333 / n), $MachinePrecision] + N[(N[(0.16666666666666666 / N[Power[n, 3.0], $MachinePrecision]), $MachinePrecision] - t$95$3), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[Power[x, 3.0], $MachinePrecision]), $MachinePrecision] + N[(t$95$0 / N[(n * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[n, -24500000000.0], t$95$2, If[LessEqual[n, 4400000000.0], N[(N[Exp[N[(x / n), $MachinePrecision]], $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[n, 1.45e+50], t$95$4, If[LessEqual[n, 2.6e+72], N[(N[(-0.5 * N[Power[t$95$1, 2.0], $MachinePrecision] + N[(-0.16666666666666666 * N[Power[t$95$1, 3.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(-1.0 / N[(n / N[Log[x], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[n, 2.7e+109], t$95$4, t$95$2]]]]]]]]]]
      
      \begin{array}{l}
      
      \\
      \begin{array}{l}
      t_0 := {x}^{\left(\frac{1}{n}\right)}\\
      t_1 := \frac{\log x}{n}\\
      t_2 := \frac{\mathsf{log1p}\left(x\right) - \log x}{n}\\
      t_3 := \frac{0.5}{n \cdot n}\\
      t_4 := \frac{t_0}{x} \cdot \frac{t_3 - \frac{0.5}{n}}{x} + \left(\frac{t_0 \cdot \left(\frac{0.3333333333333333}{n} + \left(\frac{0.16666666666666666}{{n}^{3}} - t_3\right)\right)}{{x}^{3}} + \frac{t_0}{n \cdot x}\right)\\
      \mathbf{if}\;n \leq -24500000000:\\
      \;\;\;\;t_2\\
      
      \mathbf{elif}\;n \leq 4400000000:\\
      \;\;\;\;e^{\frac{x}{n}} - t_0\\
      
      \mathbf{elif}\;n \leq 1.45 \cdot 10^{+50}:\\
      \;\;\;\;t_4\\
      
      \mathbf{elif}\;n \leq 2.6 \cdot 10^{+72}:\\
      \;\;\;\;\mathsf{fma}\left(-0.5, {t_1}^{2}, -0.16666666666666666 \cdot {t_1}^{3}\right) + \frac{-1}{\frac{n}{\log x}}\\
      
      \mathbf{elif}\;n \leq 2.7 \cdot 10^{+109}:\\
      \;\;\;\;t_4\\
      
      \mathbf{else}:\\
      \;\;\;\;t_2\\
      
      
      \end{array}
      \end{array}
      
      Derivation
      1. Split input into 4 regimes
      2. if n < -2.45e10 or 2.70000000000000001e109 < n

        1. Initial program 35.9%

          \[{\left(x + 1\right)}^{\left(\frac{1}{n}\right)} - {x}^{\left(\frac{1}{n}\right)} \]
        2. Taylor expanded in n around inf 81.9%

          \[\leadsto \color{blue}{\frac{\log \left(1 + x\right) - \log x}{n}} \]
        3. Step-by-step derivation
          1. +-rgt-identity81.9%

            \[\leadsto \frac{\color{blue}{\left(\log \left(1 + x\right) + 0\right)} - \log x}{n} \]
          2. +-rgt-identity81.9%

            \[\leadsto \frac{\color{blue}{\log \left(1 + x\right)} - \log x}{n} \]
          3. log1p-def81.9%

            \[\leadsto \frac{\color{blue}{\mathsf{log1p}\left(x\right)} - \log x}{n} \]
        4. Simplified81.9%

          \[\leadsto \color{blue}{\frac{\mathsf{log1p}\left(x\right) - \log x}{n}} \]

        if -2.45e10 < n < 4.4e9

        1. Initial program 82.0%

          \[{\left(x + 1\right)}^{\left(\frac{1}{n}\right)} - {x}^{\left(\frac{1}{n}\right)} \]
        2. Taylor expanded in n around 0 82.0%

          \[\leadsto \color{blue}{e^{\frac{\log \left(1 + x\right)}{n}}} - {x}^{\left(\frac{1}{n}\right)} \]
        3. Step-by-step derivation
          1. log1p-def97.4%

            \[\leadsto e^{\frac{\color{blue}{\mathsf{log1p}\left(x\right)}}{n}} - {x}^{\left(\frac{1}{n}\right)} \]
        4. Simplified97.4%

          \[\leadsto \color{blue}{e^{\frac{\mathsf{log1p}\left(x\right)}{n}}} - {x}^{\left(\frac{1}{n}\right)} \]
        5. Taylor expanded in x around 0 97.5%

          \[\leadsto e^{\color{blue}{\frac{x}{n}}} - {x}^{\left(\frac{1}{n}\right)} \]

        if 4.4e9 < n < 1.45e50 or 2.59999999999999981e72 < n < 2.70000000000000001e109

        1. Initial program 8.6%

          \[{\left(x + 1\right)}^{\left(\frac{1}{n}\right)} - {x}^{\left(\frac{1}{n}\right)} \]
        2. Taylor expanded in n around 0 8.6%

          \[\leadsto \color{blue}{e^{\frac{\log \left(1 + x\right)}{n}}} - {x}^{\left(\frac{1}{n}\right)} \]
        3. Step-by-step derivation
          1. log1p-def8.6%

            \[\leadsto e^{\frac{\color{blue}{\mathsf{log1p}\left(x\right)}}{n}} - {x}^{\left(\frac{1}{n}\right)} \]
        4. Simplified8.6%

          \[\leadsto \color{blue}{e^{\frac{\mathsf{log1p}\left(x\right)}{n}}} - {x}^{\left(\frac{1}{n}\right)} \]
        5. Taylor expanded in x around inf 86.9%

          \[\leadsto \color{blue}{\frac{e^{-1 \cdot \frac{\log \left(\frac{1}{x}\right)}{n}} \cdot \left(0.5 \cdot \frac{1}{{n}^{2}} - 0.5 \cdot \frac{1}{n}\right)}{{x}^{2}} + \left(\frac{e^{-1 \cdot \frac{\log \left(\frac{1}{x}\right)}{n}} \cdot \left(\left(0.3333333333333333 \cdot \frac{1}{n} + 0.16666666666666666 \cdot \frac{1}{{n}^{3}}\right) - 0.5 \cdot \frac{1}{{n}^{2}}\right)}{{x}^{3}} + \frac{e^{-1 \cdot \frac{\log \left(\frac{1}{x}\right)}{n}}}{n \cdot x}\right)} \]
        6. Simplified86.9%

          \[\leadsto \color{blue}{\frac{{x}^{\left(\frac{1}{n}\right)}}{x} \cdot \frac{\frac{0.5}{n \cdot n} - \frac{0.5}{n}}{x} + \left(\frac{\left(\frac{0.3333333333333333}{n} + \left(\frac{0.16666666666666666}{{n}^{3}} - \frac{0.5}{n \cdot n}\right)\right) \cdot {x}^{\left(\frac{1}{n}\right)}}{{x}^{3}} + \frac{{x}^{\left(\frac{1}{n}\right)}}{x \cdot n}\right)} \]

        if 1.45e50 < n < 2.59999999999999981e72

        1. Initial program 3.6%

          \[{\left(x + 1\right)}^{\left(\frac{1}{n}\right)} - {x}^{\left(\frac{1}{n}\right)} \]
        2. Taylor expanded in x around 0 3.6%

          \[\leadsto \color{blue}{1} - {x}^{\left(\frac{1}{n}\right)} \]
        3. Taylor expanded in n around inf 99.1%

          \[\leadsto \color{blue}{-1 \cdot \frac{\log x}{n} + \left(-0.5 \cdot \frac{{\log x}^{2}}{{n}^{2}} + -0.16666666666666666 \cdot \frac{{\log x}^{3}}{{n}^{3}}\right)} \]
        4. Step-by-step derivation
          1. +-commutative99.1%

            \[\leadsto \color{blue}{\left(-0.5 \cdot \frac{{\log x}^{2}}{{n}^{2}} + -0.16666666666666666 \cdot \frac{{\log x}^{3}}{{n}^{3}}\right) + -1 \cdot \frac{\log x}{n}} \]
          2. mul-1-neg99.1%

            \[\leadsto \left(-0.5 \cdot \frac{{\log x}^{2}}{{n}^{2}} + -0.16666666666666666 \cdot \frac{{\log x}^{3}}{{n}^{3}}\right) + \color{blue}{\left(-\frac{\log x}{n}\right)} \]
          3. unsub-neg99.1%

            \[\leadsto \color{blue}{\left(-0.5 \cdot \frac{{\log x}^{2}}{{n}^{2}} + -0.16666666666666666 \cdot \frac{{\log x}^{3}}{{n}^{3}}\right) - \frac{\log x}{n}} \]
          4. fma-def99.1%

            \[\leadsto \color{blue}{\mathsf{fma}\left(-0.5, \frac{{\log x}^{2}}{{n}^{2}}, -0.16666666666666666 \cdot \frac{{\log x}^{3}}{{n}^{3}}\right)} - \frac{\log x}{n} \]
          5. unpow299.1%

            \[\leadsto \mathsf{fma}\left(-0.5, \frac{\color{blue}{\log x \cdot \log x}}{{n}^{2}}, -0.16666666666666666 \cdot \frac{{\log x}^{3}}{{n}^{3}}\right) - \frac{\log x}{n} \]
          6. unpow299.1%

            \[\leadsto \mathsf{fma}\left(-0.5, \frac{\log x \cdot \log x}{\color{blue}{n \cdot n}}, -0.16666666666666666 \cdot \frac{{\log x}^{3}}{{n}^{3}}\right) - \frac{\log x}{n} \]
          7. times-frac99.1%

            \[\leadsto \mathsf{fma}\left(-0.5, \color{blue}{\frac{\log x}{n} \cdot \frac{\log x}{n}}, -0.16666666666666666 \cdot \frac{{\log x}^{3}}{{n}^{3}}\right) - \frac{\log x}{n} \]
          8. unpow299.1%

            \[\leadsto \mathsf{fma}\left(-0.5, \color{blue}{{\left(\frac{\log x}{n}\right)}^{2}}, -0.16666666666666666 \cdot \frac{{\log x}^{3}}{{n}^{3}}\right) - \frac{\log x}{n} \]
          9. cube-div99.1%

            \[\leadsto \mathsf{fma}\left(-0.5, {\left(\frac{\log x}{n}\right)}^{2}, -0.16666666666666666 \cdot \color{blue}{{\left(\frac{\log x}{n}\right)}^{3}}\right) - \frac{\log x}{n} \]
        5. Simplified99.1%

          \[\leadsto \color{blue}{\mathsf{fma}\left(-0.5, {\left(\frac{\log x}{n}\right)}^{2}, -0.16666666666666666 \cdot {\left(\frac{\log x}{n}\right)}^{3}\right) - \frac{\log x}{n}} \]
        6. Step-by-step derivation
          1. clear-num99.3%

            \[\leadsto \mathsf{fma}\left(-0.5, {\left(\frac{\log x}{n}\right)}^{2}, -0.16666666666666666 \cdot {\left(\frac{\log x}{n}\right)}^{3}\right) - \color{blue}{\frac{1}{\frac{n}{\log x}}} \]
          2. inv-pow99.3%

            \[\leadsto \mathsf{fma}\left(-0.5, {\left(\frac{\log x}{n}\right)}^{2}, -0.16666666666666666 \cdot {\left(\frac{\log x}{n}\right)}^{3}\right) - \color{blue}{{\left(\frac{n}{\log x}\right)}^{-1}} \]
        7. Applied egg-rr99.3%

          \[\leadsto \mathsf{fma}\left(-0.5, {\left(\frac{\log x}{n}\right)}^{2}, -0.16666666666666666 \cdot {\left(\frac{\log x}{n}\right)}^{3}\right) - \color{blue}{{\left(\frac{n}{\log x}\right)}^{-1}} \]
        8. Step-by-step derivation
          1. unpow-199.3%

            \[\leadsto \mathsf{fma}\left(-0.5, {\left(\frac{\log x}{n}\right)}^{2}, -0.16666666666666666 \cdot {\left(\frac{\log x}{n}\right)}^{3}\right) - \color{blue}{\frac{1}{\frac{n}{\log x}}} \]
        9. Simplified99.3%

          \[\leadsto \mathsf{fma}\left(-0.5, {\left(\frac{\log x}{n}\right)}^{2}, -0.16666666666666666 \cdot {\left(\frac{\log x}{n}\right)}^{3}\right) - \color{blue}{\frac{1}{\frac{n}{\log x}}} \]
      3. Recombined 4 regimes into one program.
      4. Final simplification89.2%

        \[\leadsto \begin{array}{l} \mathbf{if}\;n \leq -24500000000:\\ \;\;\;\;\frac{\mathsf{log1p}\left(x\right) - \log x}{n}\\ \mathbf{elif}\;n \leq 4400000000:\\ \;\;\;\;e^{\frac{x}{n}} - {x}^{\left(\frac{1}{n}\right)}\\ \mathbf{elif}\;n \leq 1.45 \cdot 10^{+50}:\\ \;\;\;\;\frac{{x}^{\left(\frac{1}{n}\right)}}{x} \cdot \frac{\frac{0.5}{n \cdot n} - \frac{0.5}{n}}{x} + \left(\frac{{x}^{\left(\frac{1}{n}\right)} \cdot \left(\frac{0.3333333333333333}{n} + \left(\frac{0.16666666666666666}{{n}^{3}} - \frac{0.5}{n \cdot n}\right)\right)}{{x}^{3}} + \frac{{x}^{\left(\frac{1}{n}\right)}}{n \cdot x}\right)\\ \mathbf{elif}\;n \leq 2.6 \cdot 10^{+72}:\\ \;\;\;\;\mathsf{fma}\left(-0.5, {\left(\frac{\log x}{n}\right)}^{2}, -0.16666666666666666 \cdot {\left(\frac{\log x}{n}\right)}^{3}\right) + \frac{-1}{\frac{n}{\log x}}\\ \mathbf{elif}\;n \leq 2.7 \cdot 10^{+109}:\\ \;\;\;\;\frac{{x}^{\left(\frac{1}{n}\right)}}{x} \cdot \frac{\frac{0.5}{n \cdot n} - \frac{0.5}{n}}{x} + \left(\frac{{x}^{\left(\frac{1}{n}\right)} \cdot \left(\frac{0.3333333333333333}{n} + \left(\frac{0.16666666666666666}{{n}^{3}} - \frac{0.5}{n \cdot n}\right)\right)}{{x}^{3}} + \frac{{x}^{\left(\frac{1}{n}\right)}}{n \cdot x}\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{log1p}\left(x\right) - \log x}{n}\\ \end{array} \]

      Alternative 7: 85.0% accurate, 0.4× speedup?

      \[\begin{array}{l} \\ \begin{array}{l} t_0 := {x}^{\left(\frac{1}{n}\right)}\\ t_1 := \frac{\mathsf{log1p}\left(x\right) - \log x}{n}\\ t_2 := \frac{0.5}{n \cdot n}\\ t_3 := \frac{t_0}{x} \cdot \frac{t_2 - \frac{0.5}{n}}{x} + \left(\frac{t_0 \cdot \left(\frac{0.3333333333333333}{n} + \left(\frac{0.16666666666666666}{{n}^{3}} - t_2\right)\right)}{{x}^{3}} + \frac{t_0}{n \cdot x}\right)\\ \mathbf{if}\;n \leq -1950000000:\\ \;\;\;\;t_1\\ \mathbf{elif}\;n \leq 4600000000:\\ \;\;\;\;e^{\frac{x}{n}} - t_0\\ \mathbf{elif}\;n \leq 8.2 \cdot 10^{+47}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;n \leq 2.5 \cdot 10^{+72}:\\ \;\;\;\;\frac{-\log x}{n}\\ \mathbf{elif}\;n \leq 2.8 \cdot 10^{+106}:\\ \;\;\;\;t_3\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \end{array} \]
      (FPCore (x n)
       :precision binary64
       (let* ((t_0 (pow x (/ 1.0 n)))
              (t_1 (/ (- (log1p x) (log x)) n))
              (t_2 (/ 0.5 (* n n)))
              (t_3
               (+
                (* (/ t_0 x) (/ (- t_2 (/ 0.5 n)) x))
                (+
                 (/
                  (*
                   t_0
                   (+
                    (/ 0.3333333333333333 n)
                    (- (/ 0.16666666666666666 (pow n 3.0)) t_2)))
                  (pow x 3.0))
                 (/ t_0 (* n x))))))
         (if (<= n -1950000000.0)
           t_1
           (if (<= n 4600000000.0)
             (- (exp (/ x n)) t_0)
             (if (<= n 8.2e+47)
               t_3
               (if (<= n 2.5e+72)
                 (/ (- (log x)) n)
                 (if (<= n 2.8e+106) t_3 t_1)))))))
      double code(double x, double n) {
      	double t_0 = pow(x, (1.0 / n));
      	double t_1 = (log1p(x) - log(x)) / n;
      	double t_2 = 0.5 / (n * n);
      	double t_3 = ((t_0 / x) * ((t_2 - (0.5 / n)) / x)) + (((t_0 * ((0.3333333333333333 / n) + ((0.16666666666666666 / pow(n, 3.0)) - t_2))) / pow(x, 3.0)) + (t_0 / (n * x)));
      	double tmp;
      	if (n <= -1950000000.0) {
      		tmp = t_1;
      	} else if (n <= 4600000000.0) {
      		tmp = exp((x / n)) - t_0;
      	} else if (n <= 8.2e+47) {
      		tmp = t_3;
      	} else if (n <= 2.5e+72) {
      		tmp = -log(x) / n;
      	} else if (n <= 2.8e+106) {
      		tmp = t_3;
      	} else {
      		tmp = t_1;
      	}
      	return tmp;
      }
      
      public static double code(double x, double n) {
      	double t_0 = Math.pow(x, (1.0 / n));
      	double t_1 = (Math.log1p(x) - Math.log(x)) / n;
      	double t_2 = 0.5 / (n * n);
      	double t_3 = ((t_0 / x) * ((t_2 - (0.5 / n)) / x)) + (((t_0 * ((0.3333333333333333 / n) + ((0.16666666666666666 / Math.pow(n, 3.0)) - t_2))) / Math.pow(x, 3.0)) + (t_0 / (n * x)));
      	double tmp;
      	if (n <= -1950000000.0) {
      		tmp = t_1;
      	} else if (n <= 4600000000.0) {
      		tmp = Math.exp((x / n)) - t_0;
      	} else if (n <= 8.2e+47) {
      		tmp = t_3;
      	} else if (n <= 2.5e+72) {
      		tmp = -Math.log(x) / n;
      	} else if (n <= 2.8e+106) {
      		tmp = t_3;
      	} else {
      		tmp = t_1;
      	}
      	return tmp;
      }
      
      def code(x, n):
      	t_0 = math.pow(x, (1.0 / n))
      	t_1 = (math.log1p(x) - math.log(x)) / n
      	t_2 = 0.5 / (n * n)
      	t_3 = ((t_0 / x) * ((t_2 - (0.5 / n)) / x)) + (((t_0 * ((0.3333333333333333 / n) + ((0.16666666666666666 / math.pow(n, 3.0)) - t_2))) / math.pow(x, 3.0)) + (t_0 / (n * x)))
      	tmp = 0
      	if n <= -1950000000.0:
      		tmp = t_1
      	elif n <= 4600000000.0:
      		tmp = math.exp((x / n)) - t_0
      	elif n <= 8.2e+47:
      		tmp = t_3
      	elif n <= 2.5e+72:
      		tmp = -math.log(x) / n
      	elif n <= 2.8e+106:
      		tmp = t_3
      	else:
      		tmp = t_1
      	return tmp
      
      function code(x, n)
      	t_0 = x ^ Float64(1.0 / n)
      	t_1 = Float64(Float64(log1p(x) - log(x)) / n)
      	t_2 = Float64(0.5 / Float64(n * n))
      	t_3 = Float64(Float64(Float64(t_0 / x) * Float64(Float64(t_2 - Float64(0.5 / n)) / x)) + Float64(Float64(Float64(t_0 * Float64(Float64(0.3333333333333333 / n) + Float64(Float64(0.16666666666666666 / (n ^ 3.0)) - t_2))) / (x ^ 3.0)) + Float64(t_0 / Float64(n * x))))
      	tmp = 0.0
      	if (n <= -1950000000.0)
      		tmp = t_1;
      	elseif (n <= 4600000000.0)
      		tmp = Float64(exp(Float64(x / n)) - t_0);
      	elseif (n <= 8.2e+47)
      		tmp = t_3;
      	elseif (n <= 2.5e+72)
      		tmp = Float64(Float64(-log(x)) / n);
      	elseif (n <= 2.8e+106)
      		tmp = t_3;
      	else
      		tmp = t_1;
      	end
      	return tmp
      end
      
      code[x_, n_] := Block[{t$95$0 = N[Power[x, N[(1.0 / n), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$1 = N[(N[(N[Log[1 + x], $MachinePrecision] - N[Log[x], $MachinePrecision]), $MachinePrecision] / n), $MachinePrecision]}, Block[{t$95$2 = N[(0.5 / N[(n * n), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[(N[(t$95$0 / x), $MachinePrecision] * N[(N[(t$95$2 - N[(0.5 / n), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision] + N[(N[(N[(t$95$0 * N[(N[(0.3333333333333333 / n), $MachinePrecision] + N[(N[(0.16666666666666666 / N[Power[n, 3.0], $MachinePrecision]), $MachinePrecision] - t$95$2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[Power[x, 3.0], $MachinePrecision]), $MachinePrecision] + N[(t$95$0 / N[(n * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[n, -1950000000.0], t$95$1, If[LessEqual[n, 4600000000.0], N[(N[Exp[N[(x / n), $MachinePrecision]], $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[n, 8.2e+47], t$95$3, If[LessEqual[n, 2.5e+72], N[((-N[Log[x], $MachinePrecision]) / n), $MachinePrecision], If[LessEqual[n, 2.8e+106], t$95$3, t$95$1]]]]]]]]]
      
      \begin{array}{l}
      
      \\
      \begin{array}{l}
      t_0 := {x}^{\left(\frac{1}{n}\right)}\\
      t_1 := \frac{\mathsf{log1p}\left(x\right) - \log x}{n}\\
      t_2 := \frac{0.5}{n \cdot n}\\
      t_3 := \frac{t_0}{x} \cdot \frac{t_2 - \frac{0.5}{n}}{x} + \left(\frac{t_0 \cdot \left(\frac{0.3333333333333333}{n} + \left(\frac{0.16666666666666666}{{n}^{3}} - t_2\right)\right)}{{x}^{3}} + \frac{t_0}{n \cdot x}\right)\\
      \mathbf{if}\;n \leq -1950000000:\\
      \;\;\;\;t_1\\
      
      \mathbf{elif}\;n \leq 4600000000:\\
      \;\;\;\;e^{\frac{x}{n}} - t_0\\
      
      \mathbf{elif}\;n \leq 8.2 \cdot 10^{+47}:\\
      \;\;\;\;t_3\\
      
      \mathbf{elif}\;n \leq 2.5 \cdot 10^{+72}:\\
      \;\;\;\;\frac{-\log x}{n}\\
      
      \mathbf{elif}\;n \leq 2.8 \cdot 10^{+106}:\\
      \;\;\;\;t_3\\
      
      \mathbf{else}:\\
      \;\;\;\;t_1\\
      
      
      \end{array}
      \end{array}
      
      Derivation
      1. Split input into 4 regimes
      2. if n < -1.95e9 or 2.79999999999999993e106 < n

        1. Initial program 35.9%

          \[{\left(x + 1\right)}^{\left(\frac{1}{n}\right)} - {x}^{\left(\frac{1}{n}\right)} \]
        2. Taylor expanded in n around inf 81.9%

          \[\leadsto \color{blue}{\frac{\log \left(1 + x\right) - \log x}{n}} \]
        3. Step-by-step derivation
          1. +-rgt-identity81.9%

            \[\leadsto \frac{\color{blue}{\left(\log \left(1 + x\right) + 0\right)} - \log x}{n} \]
          2. +-rgt-identity81.9%

            \[\leadsto \frac{\color{blue}{\log \left(1 + x\right)} - \log x}{n} \]
          3. log1p-def81.9%

            \[\leadsto \frac{\color{blue}{\mathsf{log1p}\left(x\right)} - \log x}{n} \]
        4. Simplified81.9%

          \[\leadsto \color{blue}{\frac{\mathsf{log1p}\left(x\right) - \log x}{n}} \]

        if -1.95e9 < n < 4.6e9

        1. Initial program 82.0%

          \[{\left(x + 1\right)}^{\left(\frac{1}{n}\right)} - {x}^{\left(\frac{1}{n}\right)} \]
        2. Taylor expanded in n around 0 82.0%

          \[\leadsto \color{blue}{e^{\frac{\log \left(1 + x\right)}{n}}} - {x}^{\left(\frac{1}{n}\right)} \]
        3. Step-by-step derivation
          1. log1p-def97.4%

            \[\leadsto e^{\frac{\color{blue}{\mathsf{log1p}\left(x\right)}}{n}} - {x}^{\left(\frac{1}{n}\right)} \]
        4. Simplified97.4%

          \[\leadsto \color{blue}{e^{\frac{\mathsf{log1p}\left(x\right)}{n}}} - {x}^{\left(\frac{1}{n}\right)} \]
        5. Taylor expanded in x around 0 97.5%

          \[\leadsto e^{\color{blue}{\frac{x}{n}}} - {x}^{\left(\frac{1}{n}\right)} \]

        if 4.6e9 < n < 8.2000000000000002e47 or 2.49999999999999996e72 < n < 2.79999999999999993e106

        1. Initial program 8.6%

          \[{\left(x + 1\right)}^{\left(\frac{1}{n}\right)} - {x}^{\left(\frac{1}{n}\right)} \]
        2. Taylor expanded in n around 0 8.6%

          \[\leadsto \color{blue}{e^{\frac{\log \left(1 + x\right)}{n}}} - {x}^{\left(\frac{1}{n}\right)} \]
        3. Step-by-step derivation
          1. log1p-def8.6%

            \[\leadsto e^{\frac{\color{blue}{\mathsf{log1p}\left(x\right)}}{n}} - {x}^{\left(\frac{1}{n}\right)} \]
        4. Simplified8.6%

          \[\leadsto \color{blue}{e^{\frac{\mathsf{log1p}\left(x\right)}{n}}} - {x}^{\left(\frac{1}{n}\right)} \]
        5. Taylor expanded in x around inf 86.9%

          \[\leadsto \color{blue}{\frac{e^{-1 \cdot \frac{\log \left(\frac{1}{x}\right)}{n}} \cdot \left(0.5 \cdot \frac{1}{{n}^{2}} - 0.5 \cdot \frac{1}{n}\right)}{{x}^{2}} + \left(\frac{e^{-1 \cdot \frac{\log \left(\frac{1}{x}\right)}{n}} \cdot \left(\left(0.3333333333333333 \cdot \frac{1}{n} + 0.16666666666666666 \cdot \frac{1}{{n}^{3}}\right) - 0.5 \cdot \frac{1}{{n}^{2}}\right)}{{x}^{3}} + \frac{e^{-1 \cdot \frac{\log \left(\frac{1}{x}\right)}{n}}}{n \cdot x}\right)} \]
        6. Simplified86.9%

          \[\leadsto \color{blue}{\frac{{x}^{\left(\frac{1}{n}\right)}}{x} \cdot \frac{\frac{0.5}{n \cdot n} - \frac{0.5}{n}}{x} + \left(\frac{\left(\frac{0.3333333333333333}{n} + \left(\frac{0.16666666666666666}{{n}^{3}} - \frac{0.5}{n \cdot n}\right)\right) \cdot {x}^{\left(\frac{1}{n}\right)}}{{x}^{3}} + \frac{{x}^{\left(\frac{1}{n}\right)}}{x \cdot n}\right)} \]

        if 8.2000000000000002e47 < n < 2.49999999999999996e72

        1. Initial program 3.6%

          \[{\left(x + 1\right)}^{\left(\frac{1}{n}\right)} - {x}^{\left(\frac{1}{n}\right)} \]
        2. Taylor expanded in x around 0 3.6%

          \[\leadsto \color{blue}{1} - {x}^{\left(\frac{1}{n}\right)} \]
        3. Taylor expanded in n around inf 99.1%

          \[\leadsto \color{blue}{-1 \cdot \frac{\log x}{n}} \]
        4. Step-by-step derivation
          1. mul-1-neg99.1%

            \[\leadsto \color{blue}{-\frac{\log x}{n}} \]
        5. Simplified99.1%

          \[\leadsto \color{blue}{-\frac{\log x}{n}} \]
      3. Recombined 4 regimes into one program.
      4. Final simplification89.2%

        \[\leadsto \begin{array}{l} \mathbf{if}\;n \leq -1950000000:\\ \;\;\;\;\frac{\mathsf{log1p}\left(x\right) - \log x}{n}\\ \mathbf{elif}\;n \leq 4600000000:\\ \;\;\;\;e^{\frac{x}{n}} - {x}^{\left(\frac{1}{n}\right)}\\ \mathbf{elif}\;n \leq 8.2 \cdot 10^{+47}:\\ \;\;\;\;\frac{{x}^{\left(\frac{1}{n}\right)}}{x} \cdot \frac{\frac{0.5}{n \cdot n} - \frac{0.5}{n}}{x} + \left(\frac{{x}^{\left(\frac{1}{n}\right)} \cdot \left(\frac{0.3333333333333333}{n} + \left(\frac{0.16666666666666666}{{n}^{3}} - \frac{0.5}{n \cdot n}\right)\right)}{{x}^{3}} + \frac{{x}^{\left(\frac{1}{n}\right)}}{n \cdot x}\right)\\ \mathbf{elif}\;n \leq 2.5 \cdot 10^{+72}:\\ \;\;\;\;\frac{-\log x}{n}\\ \mathbf{elif}\;n \leq 2.8 \cdot 10^{+106}:\\ \;\;\;\;\frac{{x}^{\left(\frac{1}{n}\right)}}{x} \cdot \frac{\frac{0.5}{n \cdot n} - \frac{0.5}{n}}{x} + \left(\frac{{x}^{\left(\frac{1}{n}\right)} \cdot \left(\frac{0.3333333333333333}{n} + \left(\frac{0.16666666666666666}{{n}^{3}} - \frac{0.5}{n \cdot n}\right)\right)}{{x}^{3}} + \frac{{x}^{\left(\frac{1}{n}\right)}}{n \cdot x}\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{log1p}\left(x\right) - \log x}{n}\\ \end{array} \]

      Alternative 8: 81.1% accurate, 0.9× speedup?

      \[\begin{array}{l} \\ \begin{array}{l} t_0 := {x}^{\left(\frac{1}{n}\right)}\\ t_1 := \frac{t_0}{n \cdot x}\\ t_2 := t_1 + \frac{\frac{\frac{-0.5}{n}}{x}}{x}\\ \mathbf{if}\;\frac{1}{n} \leq -1 \cdot 10^{-5}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;\frac{1}{n} \leq 2 \cdot 10^{-114}:\\ \;\;\;\;\frac{\mathsf{log1p}\left(x\right) - \log x}{n}\\ \mathbf{elif}\;\frac{1}{n} \leq 5 \cdot 10^{-73}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;\frac{1}{n} \leq 5 \cdot 10^{-51}:\\ \;\;\;\;\frac{-\log x}{n}\\ \mathbf{elif}\;\frac{1}{n} \leq 10^{-11}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;\frac{1}{n} \leq 10^{+131}:\\ \;\;\;\;\left(\left(\frac{0.5}{n \cdot n} - \frac{0.5}{n}\right) \cdot \left(x \cdot x\right) + \left(1 + \frac{x}{n}\right)\right) - t_0\\ \mathbf{else}:\\ \;\;\;\;\sqrt{{\left(n \cdot x\right)}^{-2}}\\ \end{array} \end{array} \]
      (FPCore (x n)
       :precision binary64
       (let* ((t_0 (pow x (/ 1.0 n)))
              (t_1 (/ t_0 (* n x)))
              (t_2 (+ t_1 (/ (/ (/ -0.5 n) x) x))))
         (if (<= (/ 1.0 n) -1e-5)
           t_1
           (if (<= (/ 1.0 n) 2e-114)
             (/ (- (log1p x) (log x)) n)
             (if (<= (/ 1.0 n) 5e-73)
               t_2
               (if (<= (/ 1.0 n) 5e-51)
                 (/ (- (log x)) n)
                 (if (<= (/ 1.0 n) 1e-11)
                   t_2
                   (if (<= (/ 1.0 n) 1e+131)
                     (-
                      (+ (* (- (/ 0.5 (* n n)) (/ 0.5 n)) (* x x)) (+ 1.0 (/ x n)))
                      t_0)
                     (sqrt (pow (* n x) -2.0))))))))))
      double code(double x, double n) {
      	double t_0 = pow(x, (1.0 / n));
      	double t_1 = t_0 / (n * x);
      	double t_2 = t_1 + (((-0.5 / n) / x) / x);
      	double tmp;
      	if ((1.0 / n) <= -1e-5) {
      		tmp = t_1;
      	} else if ((1.0 / n) <= 2e-114) {
      		tmp = (log1p(x) - log(x)) / n;
      	} else if ((1.0 / n) <= 5e-73) {
      		tmp = t_2;
      	} else if ((1.0 / n) <= 5e-51) {
      		tmp = -log(x) / n;
      	} else if ((1.0 / n) <= 1e-11) {
      		tmp = t_2;
      	} else if ((1.0 / n) <= 1e+131) {
      		tmp = ((((0.5 / (n * n)) - (0.5 / n)) * (x * x)) + (1.0 + (x / n))) - t_0;
      	} else {
      		tmp = sqrt(pow((n * x), -2.0));
      	}
      	return tmp;
      }
      
      public static double code(double x, double n) {
      	double t_0 = Math.pow(x, (1.0 / n));
      	double t_1 = t_0 / (n * x);
      	double t_2 = t_1 + (((-0.5 / n) / x) / x);
      	double tmp;
      	if ((1.0 / n) <= -1e-5) {
      		tmp = t_1;
      	} else if ((1.0 / n) <= 2e-114) {
      		tmp = (Math.log1p(x) - Math.log(x)) / n;
      	} else if ((1.0 / n) <= 5e-73) {
      		tmp = t_2;
      	} else if ((1.0 / n) <= 5e-51) {
      		tmp = -Math.log(x) / n;
      	} else if ((1.0 / n) <= 1e-11) {
      		tmp = t_2;
      	} else if ((1.0 / n) <= 1e+131) {
      		tmp = ((((0.5 / (n * n)) - (0.5 / n)) * (x * x)) + (1.0 + (x / n))) - t_0;
      	} else {
      		tmp = Math.sqrt(Math.pow((n * x), -2.0));
      	}
      	return tmp;
      }
      
      def code(x, n):
      	t_0 = math.pow(x, (1.0 / n))
      	t_1 = t_0 / (n * x)
      	t_2 = t_1 + (((-0.5 / n) / x) / x)
      	tmp = 0
      	if (1.0 / n) <= -1e-5:
      		tmp = t_1
      	elif (1.0 / n) <= 2e-114:
      		tmp = (math.log1p(x) - math.log(x)) / n
      	elif (1.0 / n) <= 5e-73:
      		tmp = t_2
      	elif (1.0 / n) <= 5e-51:
      		tmp = -math.log(x) / n
      	elif (1.0 / n) <= 1e-11:
      		tmp = t_2
      	elif (1.0 / n) <= 1e+131:
      		tmp = ((((0.5 / (n * n)) - (0.5 / n)) * (x * x)) + (1.0 + (x / n))) - t_0
      	else:
      		tmp = math.sqrt(math.pow((n * x), -2.0))
      	return tmp
      
      function code(x, n)
      	t_0 = x ^ Float64(1.0 / n)
      	t_1 = Float64(t_0 / Float64(n * x))
      	t_2 = Float64(t_1 + Float64(Float64(Float64(-0.5 / n) / x) / x))
      	tmp = 0.0
      	if (Float64(1.0 / n) <= -1e-5)
      		tmp = t_1;
      	elseif (Float64(1.0 / n) <= 2e-114)
      		tmp = Float64(Float64(log1p(x) - log(x)) / n);
      	elseif (Float64(1.0 / n) <= 5e-73)
      		tmp = t_2;
      	elseif (Float64(1.0 / n) <= 5e-51)
      		tmp = Float64(Float64(-log(x)) / n);
      	elseif (Float64(1.0 / n) <= 1e-11)
      		tmp = t_2;
      	elseif (Float64(1.0 / n) <= 1e+131)
      		tmp = Float64(Float64(Float64(Float64(Float64(0.5 / Float64(n * n)) - Float64(0.5 / n)) * Float64(x * x)) + Float64(1.0 + Float64(x / n))) - t_0);
      	else
      		tmp = sqrt((Float64(n * x) ^ -2.0));
      	end
      	return tmp
      end
      
      code[x_, n_] := Block[{t$95$0 = N[Power[x, N[(1.0 / n), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$1 = N[(t$95$0 / N[(n * x), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(t$95$1 + N[(N[(N[(-0.5 / n), $MachinePrecision] / x), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(1.0 / n), $MachinePrecision], -1e-5], t$95$1, If[LessEqual[N[(1.0 / n), $MachinePrecision], 2e-114], N[(N[(N[Log[1 + x], $MachinePrecision] - N[Log[x], $MachinePrecision]), $MachinePrecision] / n), $MachinePrecision], If[LessEqual[N[(1.0 / n), $MachinePrecision], 5e-73], t$95$2, If[LessEqual[N[(1.0 / n), $MachinePrecision], 5e-51], N[((-N[Log[x], $MachinePrecision]) / n), $MachinePrecision], If[LessEqual[N[(1.0 / n), $MachinePrecision], 1e-11], t$95$2, If[LessEqual[N[(1.0 / n), $MachinePrecision], 1e+131], N[(N[(N[(N[(N[(0.5 / N[(n * n), $MachinePrecision]), $MachinePrecision] - N[(0.5 / n), $MachinePrecision]), $MachinePrecision] * N[(x * x), $MachinePrecision]), $MachinePrecision] + N[(1.0 + N[(x / n), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], N[Sqrt[N[Power[N[(n * x), $MachinePrecision], -2.0], $MachinePrecision]], $MachinePrecision]]]]]]]]]]
      
      \begin{array}{l}
      
      \\
      \begin{array}{l}
      t_0 := {x}^{\left(\frac{1}{n}\right)}\\
      t_1 := \frac{t_0}{n \cdot x}\\
      t_2 := t_1 + \frac{\frac{\frac{-0.5}{n}}{x}}{x}\\
      \mathbf{if}\;\frac{1}{n} \leq -1 \cdot 10^{-5}:\\
      \;\;\;\;t_1\\
      
      \mathbf{elif}\;\frac{1}{n} \leq 2 \cdot 10^{-114}:\\
      \;\;\;\;\frac{\mathsf{log1p}\left(x\right) - \log x}{n}\\
      
      \mathbf{elif}\;\frac{1}{n} \leq 5 \cdot 10^{-73}:\\
      \;\;\;\;t_2\\
      
      \mathbf{elif}\;\frac{1}{n} \leq 5 \cdot 10^{-51}:\\
      \;\;\;\;\frac{-\log x}{n}\\
      
      \mathbf{elif}\;\frac{1}{n} \leq 10^{-11}:\\
      \;\;\;\;t_2\\
      
      \mathbf{elif}\;\frac{1}{n} \leq 10^{+131}:\\
      \;\;\;\;\left(\left(\frac{0.5}{n \cdot n} - \frac{0.5}{n}\right) \cdot \left(x \cdot x\right) + \left(1 + \frac{x}{n}\right)\right) - t_0\\
      
      \mathbf{else}:\\
      \;\;\;\;\sqrt{{\left(n \cdot x\right)}^{-2}}\\
      
      
      \end{array}
      \end{array}
      
      Derivation
      1. Split input into 6 regimes
      2. if (/.f64 1 n) < -1.00000000000000008e-5

        1. Initial program 97.3%

          \[{\left(x + 1\right)}^{\left(\frac{1}{n}\right)} - {x}^{\left(\frac{1}{n}\right)} \]
        2. Taylor expanded in x around inf 100.0%

          \[\leadsto \color{blue}{\frac{e^{-1 \cdot \frac{\log \left(\frac{1}{x}\right)}{n}}}{n \cdot x}} \]
        3. Step-by-step derivation
          1. log-rec100.0%

            \[\leadsto \frac{e^{-1 \cdot \frac{\color{blue}{-\log x}}{n}}}{n \cdot x} \]
          2. mul-1-neg100.0%

            \[\leadsto \frac{e^{-1 \cdot \frac{\color{blue}{-1 \cdot \log x}}{n}}}{n \cdot x} \]
          3. associate-*r/100.0%

            \[\leadsto \frac{e^{\color{blue}{\frac{-1 \cdot \left(-1 \cdot \log x\right)}{n}}}}{n \cdot x} \]
          4. neg-mul-1100.0%

            \[\leadsto \frac{e^{\frac{\color{blue}{--1 \cdot \log x}}{n}}}{n \cdot x} \]
          5. mul-1-neg100.0%

            \[\leadsto \frac{e^{\frac{-\color{blue}{\left(-\log x\right)}}{n}}}{n \cdot x} \]
          6. remove-double-neg100.0%

            \[\leadsto \frac{e^{\frac{\color{blue}{\log x}}{n}}}{n \cdot x} \]
          7. *-commutative100.0%

            \[\leadsto \frac{e^{\frac{\log x}{n}}}{\color{blue}{x \cdot n}} \]
        4. Simplified100.0%

          \[\leadsto \color{blue}{\frac{e^{\frac{\log x}{n}}}{x \cdot n}} \]
        5. Taylor expanded in x around 0 100.0%

          \[\leadsto \color{blue}{\frac{e^{\frac{\log x}{n}}}{n \cdot x}} \]
        6. Step-by-step derivation
          1. *-rgt-identity100.0%

            \[\leadsto \frac{e^{\frac{\color{blue}{\log x \cdot 1}}{n}}}{n \cdot x} \]
          2. associate-*r/100.0%

            \[\leadsto \frac{e^{\color{blue}{\log x \cdot \frac{1}{n}}}}{n \cdot x} \]
          3. exp-to-pow100.0%

            \[\leadsto \frac{\color{blue}{{x}^{\left(\frac{1}{n}\right)}}}{n \cdot x} \]
          4. *-commutative100.0%

            \[\leadsto \frac{{x}^{\left(\frac{1}{n}\right)}}{\color{blue}{x \cdot n}} \]
        7. Simplified100.0%

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

        if -1.00000000000000008e-5 < (/.f64 1 n) < 2.0000000000000001e-114

        1. Initial program 36.2%

          \[{\left(x + 1\right)}^{\left(\frac{1}{n}\right)} - {x}^{\left(\frac{1}{n}\right)} \]
        2. Taylor expanded in n around inf 81.1%

          \[\leadsto \color{blue}{\frac{\log \left(1 + x\right) - \log x}{n}} \]
        3. Step-by-step derivation
          1. +-rgt-identity81.1%

            \[\leadsto \frac{\color{blue}{\left(\log \left(1 + x\right) + 0\right)} - \log x}{n} \]
          2. +-rgt-identity81.1%

            \[\leadsto \frac{\color{blue}{\log \left(1 + x\right)} - \log x}{n} \]
          3. log1p-def81.1%

            \[\leadsto \frac{\color{blue}{\mathsf{log1p}\left(x\right)} - \log x}{n} \]
        4. Simplified81.1%

          \[\leadsto \color{blue}{\frac{\mathsf{log1p}\left(x\right) - \log x}{n}} \]

        if 2.0000000000000001e-114 < (/.f64 1 n) < 4.9999999999999998e-73 or 5.00000000000000004e-51 < (/.f64 1 n) < 9.99999999999999939e-12

        1. Initial program 13.0%

          \[{\left(x + 1\right)}^{\left(\frac{1}{n}\right)} - {x}^{\left(\frac{1}{n}\right)} \]
        2. Taylor expanded in n around 0 13.0%

          \[\leadsto \color{blue}{e^{\frac{\log \left(1 + x\right)}{n}}} - {x}^{\left(\frac{1}{n}\right)} \]
        3. Step-by-step derivation
          1. log1p-def13.0%

            \[\leadsto e^{\frac{\color{blue}{\mathsf{log1p}\left(x\right)}}{n}} - {x}^{\left(\frac{1}{n}\right)} \]
        4. Simplified13.0%

          \[\leadsto \color{blue}{e^{\frac{\mathsf{log1p}\left(x\right)}{n}}} - {x}^{\left(\frac{1}{n}\right)} \]
        5. Taylor expanded in x around inf 87.0%

          \[\leadsto \color{blue}{\frac{e^{-1 \cdot \frac{\log \left(\frac{1}{x}\right)}{n}} \cdot \left(0.5 \cdot \frac{1}{{n}^{2}} - 0.5 \cdot \frac{1}{n}\right)}{{x}^{2}} + \frac{e^{-1 \cdot \frac{\log \left(\frac{1}{x}\right)}{n}}}{n \cdot x}} \]
        6. Step-by-step derivation
          1. Simplified87.0%

            \[\leadsto \color{blue}{\frac{{x}^{\left(\frac{1}{n}\right)}}{x} \cdot \frac{\frac{0.5}{n \cdot n} - \frac{0.5}{n}}{x} + \frac{{x}^{\left(\frac{1}{n}\right)}}{x \cdot n}} \]
          2. Taylor expanded in n around inf 87.0%

            \[\leadsto \color{blue}{\frac{-0.5}{n \cdot {x}^{2}}} + \frac{{x}^{\left(\frac{1}{n}\right)}}{x \cdot n} \]
          3. Step-by-step derivation
            1. associate-/r*87.0%

              \[\leadsto \color{blue}{\frac{\frac{-0.5}{n}}{{x}^{2}}} + \frac{{x}^{\left(\frac{1}{n}\right)}}{x \cdot n} \]
            2. metadata-eval87.0%

              \[\leadsto \frac{\frac{\color{blue}{-0.5}}{n}}{{x}^{2}} + \frac{{x}^{\left(\frac{1}{n}\right)}}{x \cdot n} \]
            3. distribute-neg-frac87.0%

              \[\leadsto \frac{\color{blue}{-\frac{0.5}{n}}}{{x}^{2}} + \frac{{x}^{\left(\frac{1}{n}\right)}}{x \cdot n} \]
            4. metadata-eval87.0%

              \[\leadsto \frac{-\frac{\color{blue}{0.5 \cdot 1}}{n}}{{x}^{2}} + \frac{{x}^{\left(\frac{1}{n}\right)}}{x \cdot n} \]
            5. associate-*r/87.0%

              \[\leadsto \frac{-\color{blue}{0.5 \cdot \frac{1}{n}}}{{x}^{2}} + \frac{{x}^{\left(\frac{1}{n}\right)}}{x \cdot n} \]
            6. unpow287.0%

              \[\leadsto \frac{-0.5 \cdot \frac{1}{n}}{\color{blue}{x \cdot x}} + \frac{{x}^{\left(\frac{1}{n}\right)}}{x \cdot n} \]
            7. associate-/r*87.0%

              \[\leadsto \color{blue}{\frac{\frac{-0.5 \cdot \frac{1}{n}}{x}}{x}} + \frac{{x}^{\left(\frac{1}{n}\right)}}{x \cdot n} \]
            8. associate-*r/87.0%

              \[\leadsto \frac{\frac{-\color{blue}{\frac{0.5 \cdot 1}{n}}}{x}}{x} + \frac{{x}^{\left(\frac{1}{n}\right)}}{x \cdot n} \]
            9. metadata-eval87.0%

              \[\leadsto \frac{\frac{-\frac{\color{blue}{0.5}}{n}}{x}}{x} + \frac{{x}^{\left(\frac{1}{n}\right)}}{x \cdot n} \]
            10. distribute-neg-frac87.0%

              \[\leadsto \frac{\frac{\color{blue}{\frac{-0.5}{n}}}{x}}{x} + \frac{{x}^{\left(\frac{1}{n}\right)}}{x \cdot n} \]
            11. metadata-eval87.0%

              \[\leadsto \frac{\frac{\frac{\color{blue}{-0.5}}{n}}{x}}{x} + \frac{{x}^{\left(\frac{1}{n}\right)}}{x \cdot n} \]
          4. Simplified87.0%

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

          if 4.9999999999999998e-73 < (/.f64 1 n) < 5.00000000000000004e-51

          1. Initial program 3.6%

            \[{\left(x + 1\right)}^{\left(\frac{1}{n}\right)} - {x}^{\left(\frac{1}{n}\right)} \]
          2. Taylor expanded in x around 0 3.6%

            \[\leadsto \color{blue}{1} - {x}^{\left(\frac{1}{n}\right)} \]
          3. Taylor expanded in n around inf 99.1%

            \[\leadsto \color{blue}{-1 \cdot \frac{\log x}{n}} \]
          4. Step-by-step derivation
            1. mul-1-neg99.1%

              \[\leadsto \color{blue}{-\frac{\log x}{n}} \]
          5. Simplified99.1%

            \[\leadsto \color{blue}{-\frac{\log x}{n}} \]

          if 9.99999999999999939e-12 < (/.f64 1 n) < 9.9999999999999991e130

          1. Initial program 80.6%

            \[{\left(x + 1\right)}^{\left(\frac{1}{n}\right)} - {x}^{\left(\frac{1}{n}\right)} \]
          2. Taylor expanded in x around 0 75.5%

            \[\leadsto \color{blue}{\left(\frac{x}{n} + \left(1 + \left(0.5 \cdot \frac{1}{{n}^{2}} - 0.5 \cdot \frac{1}{n}\right) \cdot {x}^{2}\right)\right)} - {x}^{\left(\frac{1}{n}\right)} \]
          3. Step-by-step derivation
            1. associate-+r+75.5%

              \[\leadsto \color{blue}{\left(\left(\frac{x}{n} + 1\right) + \left(0.5 \cdot \frac{1}{{n}^{2}} - 0.5 \cdot \frac{1}{n}\right) \cdot {x}^{2}\right)} - {x}^{\left(\frac{1}{n}\right)} \]
            2. +-commutative75.5%

              \[\leadsto \left(\color{blue}{\left(1 + \frac{x}{n}\right)} + \left(0.5 \cdot \frac{1}{{n}^{2}} - 0.5 \cdot \frac{1}{n}\right) \cdot {x}^{2}\right) - {x}^{\left(\frac{1}{n}\right)} \]
            3. associate-*r/75.5%

              \[\leadsto \left(\left(1 + \frac{x}{n}\right) + \left(\color{blue}{\frac{0.5 \cdot 1}{{n}^{2}}} - 0.5 \cdot \frac{1}{n}\right) \cdot {x}^{2}\right) - {x}^{\left(\frac{1}{n}\right)} \]
            4. metadata-eval75.5%

              \[\leadsto \left(\left(1 + \frac{x}{n}\right) + \left(\frac{\color{blue}{0.5}}{{n}^{2}} - 0.5 \cdot \frac{1}{n}\right) \cdot {x}^{2}\right) - {x}^{\left(\frac{1}{n}\right)} \]
            5. unpow275.5%

              \[\leadsto \left(\left(1 + \frac{x}{n}\right) + \left(\frac{0.5}{\color{blue}{n \cdot n}} - 0.5 \cdot \frac{1}{n}\right) \cdot {x}^{2}\right) - {x}^{\left(\frac{1}{n}\right)} \]
            6. associate-*r/75.5%

              \[\leadsto \left(\left(1 + \frac{x}{n}\right) + \left(\frac{0.5}{n \cdot n} - \color{blue}{\frac{0.5 \cdot 1}{n}}\right) \cdot {x}^{2}\right) - {x}^{\left(\frac{1}{n}\right)} \]
            7. metadata-eval75.5%

              \[\leadsto \left(\left(1 + \frac{x}{n}\right) + \left(\frac{0.5}{n \cdot n} - \frac{\color{blue}{0.5}}{n}\right) \cdot {x}^{2}\right) - {x}^{\left(\frac{1}{n}\right)} \]
            8. unpow275.5%

              \[\leadsto \left(\left(1 + \frac{x}{n}\right) + \left(\frac{0.5}{n \cdot n} - \frac{0.5}{n}\right) \cdot \color{blue}{\left(x \cdot x\right)}\right) - {x}^{\left(\frac{1}{n}\right)} \]
          4. Simplified75.5%

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

          if 9.9999999999999991e130 < (/.f64 1 n)

          1. Initial program 15.3%

            \[{\left(x + 1\right)}^{\left(\frac{1}{n}\right)} - {x}^{\left(\frac{1}{n}\right)} \]
          2. Taylor expanded in x around inf 0.6%

            \[\leadsto \color{blue}{\frac{e^{-1 \cdot \frac{\log \left(\frac{1}{x}\right)}{n}}}{n \cdot x}} \]
          3. Step-by-step derivation
            1. log-rec0.6%

              \[\leadsto \frac{e^{-1 \cdot \frac{\color{blue}{-\log x}}{n}}}{n \cdot x} \]
            2. mul-1-neg0.6%

              \[\leadsto \frac{e^{-1 \cdot \frac{\color{blue}{-1 \cdot \log x}}{n}}}{n \cdot x} \]
            3. associate-*r/0.6%

              \[\leadsto \frac{e^{\color{blue}{\frac{-1 \cdot \left(-1 \cdot \log x\right)}{n}}}}{n \cdot x} \]
            4. neg-mul-10.6%

              \[\leadsto \frac{e^{\frac{\color{blue}{--1 \cdot \log x}}{n}}}{n \cdot x} \]
            5. mul-1-neg0.6%

              \[\leadsto \frac{e^{\frac{-\color{blue}{\left(-\log x\right)}}{n}}}{n \cdot x} \]
            6. remove-double-neg0.6%

              \[\leadsto \frac{e^{\frac{\color{blue}{\log x}}{n}}}{n \cdot x} \]
            7. *-commutative0.6%

              \[\leadsto \frac{e^{\frac{\log x}{n}}}{\color{blue}{x \cdot n}} \]
          4. Simplified0.6%

            \[\leadsto \color{blue}{\frac{e^{\frac{\log x}{n}}}{x \cdot n}} \]
          5. Taylor expanded in n around inf 52.9%

            \[\leadsto \color{blue}{\frac{1}{n \cdot x}} \]
          6. Step-by-step derivation
            1. *-commutative52.9%

              \[\leadsto \frac{1}{\color{blue}{x \cdot n}} \]
          7. Simplified52.9%

            \[\leadsto \color{blue}{\frac{1}{x \cdot n}} \]
          8. Step-by-step derivation
            1. add-sqr-sqrt52.9%

              \[\leadsto \color{blue}{\sqrt{\frac{1}{x \cdot n}} \cdot \sqrt{\frac{1}{x \cdot n}}} \]
            2. sqrt-unprod82.1%

              \[\leadsto \color{blue}{\sqrt{\frac{1}{x \cdot n} \cdot \frac{1}{x \cdot n}}} \]
            3. inv-pow82.1%

              \[\leadsto \sqrt{\color{blue}{{\left(x \cdot n\right)}^{-1}} \cdot \frac{1}{x \cdot n}} \]
            4. inv-pow82.1%

              \[\leadsto \sqrt{{\left(x \cdot n\right)}^{-1} \cdot \color{blue}{{\left(x \cdot n\right)}^{-1}}} \]
            5. pow-prod-up82.1%

              \[\leadsto \sqrt{\color{blue}{{\left(x \cdot n\right)}^{\left(-1 + -1\right)}}} \]
            6. *-commutative82.1%

              \[\leadsto \sqrt{{\color{blue}{\left(n \cdot x\right)}}^{\left(-1 + -1\right)}} \]
            7. metadata-eval82.1%

              \[\leadsto \sqrt{{\left(n \cdot x\right)}^{\color{blue}{-2}}} \]
          9. Applied egg-rr82.1%

            \[\leadsto \color{blue}{\sqrt{{\left(n \cdot x\right)}^{-2}}} \]
          10. Step-by-step derivation
            1. *-commutative82.1%

              \[\leadsto \sqrt{{\color{blue}{\left(x \cdot n\right)}}^{-2}} \]
          11. Simplified82.1%

            \[\leadsto \color{blue}{\sqrt{{\left(x \cdot n\right)}^{-2}}} \]
        7. Recombined 6 regimes into one program.
        8. Final simplification87.0%

          \[\leadsto \begin{array}{l} \mathbf{if}\;\frac{1}{n} \leq -1 \cdot 10^{-5}:\\ \;\;\;\;\frac{{x}^{\left(\frac{1}{n}\right)}}{n \cdot x}\\ \mathbf{elif}\;\frac{1}{n} \leq 2 \cdot 10^{-114}:\\ \;\;\;\;\frac{\mathsf{log1p}\left(x\right) - \log x}{n}\\ \mathbf{elif}\;\frac{1}{n} \leq 5 \cdot 10^{-73}:\\ \;\;\;\;\frac{{x}^{\left(\frac{1}{n}\right)}}{n \cdot x} + \frac{\frac{\frac{-0.5}{n}}{x}}{x}\\ \mathbf{elif}\;\frac{1}{n} \leq 5 \cdot 10^{-51}:\\ \;\;\;\;\frac{-\log x}{n}\\ \mathbf{elif}\;\frac{1}{n} \leq 10^{-11}:\\ \;\;\;\;\frac{{x}^{\left(\frac{1}{n}\right)}}{n \cdot x} + \frac{\frac{\frac{-0.5}{n}}{x}}{x}\\ \mathbf{elif}\;\frac{1}{n} \leq 10^{+131}:\\ \;\;\;\;\left(\left(\frac{0.5}{n \cdot n} - \frac{0.5}{n}\right) \cdot \left(x \cdot x\right) + \left(1 + \frac{x}{n}\right)\right) - {x}^{\left(\frac{1}{n}\right)}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{{\left(n \cdot x\right)}^{-2}}\\ \end{array} \]

        Alternative 9: 84.8% accurate, 0.9× speedup?

        \[\begin{array}{l} \\ \begin{array}{l} t_0 := {x}^{\left(\frac{1}{n}\right)}\\ t_1 := \frac{t_0}{n \cdot x}\\ t_2 := t_1 + \frac{\frac{\frac{-0.5}{n}}{x}}{x}\\ \mathbf{if}\;\frac{1}{n} \leq -1 \cdot 10^{-5}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;\frac{1}{n} \leq 2 \cdot 10^{-114}:\\ \;\;\;\;\frac{\mathsf{log1p}\left(x\right) - \log x}{n}\\ \mathbf{elif}\;\frac{1}{n} \leq 5 \cdot 10^{-73}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;\frac{1}{n} \leq 5 \cdot 10^{-51}:\\ \;\;\;\;\frac{-\log x}{n}\\ \mathbf{elif}\;\frac{1}{n} \leq 10^{-11}:\\ \;\;\;\;t_2\\ \mathbf{else}:\\ \;\;\;\;e^{\frac{x}{n}} - t_0\\ \end{array} \end{array} \]
        (FPCore (x n)
         :precision binary64
         (let* ((t_0 (pow x (/ 1.0 n)))
                (t_1 (/ t_0 (* n x)))
                (t_2 (+ t_1 (/ (/ (/ -0.5 n) x) x))))
           (if (<= (/ 1.0 n) -1e-5)
             t_1
             (if (<= (/ 1.0 n) 2e-114)
               (/ (- (log1p x) (log x)) n)
               (if (<= (/ 1.0 n) 5e-73)
                 t_2
                 (if (<= (/ 1.0 n) 5e-51)
                   (/ (- (log x)) n)
                   (if (<= (/ 1.0 n) 1e-11) t_2 (- (exp (/ x n)) t_0))))))))
        double code(double x, double n) {
        	double t_0 = pow(x, (1.0 / n));
        	double t_1 = t_0 / (n * x);
        	double t_2 = t_1 + (((-0.5 / n) / x) / x);
        	double tmp;
        	if ((1.0 / n) <= -1e-5) {
        		tmp = t_1;
        	} else if ((1.0 / n) <= 2e-114) {
        		tmp = (log1p(x) - log(x)) / n;
        	} else if ((1.0 / n) <= 5e-73) {
        		tmp = t_2;
        	} else if ((1.0 / n) <= 5e-51) {
        		tmp = -log(x) / n;
        	} else if ((1.0 / n) <= 1e-11) {
        		tmp = t_2;
        	} else {
        		tmp = exp((x / n)) - t_0;
        	}
        	return tmp;
        }
        
        public static double code(double x, double n) {
        	double t_0 = Math.pow(x, (1.0 / n));
        	double t_1 = t_0 / (n * x);
        	double t_2 = t_1 + (((-0.5 / n) / x) / x);
        	double tmp;
        	if ((1.0 / n) <= -1e-5) {
        		tmp = t_1;
        	} else if ((1.0 / n) <= 2e-114) {
        		tmp = (Math.log1p(x) - Math.log(x)) / n;
        	} else if ((1.0 / n) <= 5e-73) {
        		tmp = t_2;
        	} else if ((1.0 / n) <= 5e-51) {
        		tmp = -Math.log(x) / n;
        	} else if ((1.0 / n) <= 1e-11) {
        		tmp = t_2;
        	} else {
        		tmp = Math.exp((x / n)) - t_0;
        	}
        	return tmp;
        }
        
        def code(x, n):
        	t_0 = math.pow(x, (1.0 / n))
        	t_1 = t_0 / (n * x)
        	t_2 = t_1 + (((-0.5 / n) / x) / x)
        	tmp = 0
        	if (1.0 / n) <= -1e-5:
        		tmp = t_1
        	elif (1.0 / n) <= 2e-114:
        		tmp = (math.log1p(x) - math.log(x)) / n
        	elif (1.0 / n) <= 5e-73:
        		tmp = t_2
        	elif (1.0 / n) <= 5e-51:
        		tmp = -math.log(x) / n
        	elif (1.0 / n) <= 1e-11:
        		tmp = t_2
        	else:
        		tmp = math.exp((x / n)) - t_0
        	return tmp
        
        function code(x, n)
        	t_0 = x ^ Float64(1.0 / n)
        	t_1 = Float64(t_0 / Float64(n * x))
        	t_2 = Float64(t_1 + Float64(Float64(Float64(-0.5 / n) / x) / x))
        	tmp = 0.0
        	if (Float64(1.0 / n) <= -1e-5)
        		tmp = t_1;
        	elseif (Float64(1.0 / n) <= 2e-114)
        		tmp = Float64(Float64(log1p(x) - log(x)) / n);
        	elseif (Float64(1.0 / n) <= 5e-73)
        		tmp = t_2;
        	elseif (Float64(1.0 / n) <= 5e-51)
        		tmp = Float64(Float64(-log(x)) / n);
        	elseif (Float64(1.0 / n) <= 1e-11)
        		tmp = t_2;
        	else
        		tmp = Float64(exp(Float64(x / n)) - t_0);
        	end
        	return tmp
        end
        
        code[x_, n_] := Block[{t$95$0 = N[Power[x, N[(1.0 / n), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$1 = N[(t$95$0 / N[(n * x), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(t$95$1 + N[(N[(N[(-0.5 / n), $MachinePrecision] / x), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(1.0 / n), $MachinePrecision], -1e-5], t$95$1, If[LessEqual[N[(1.0 / n), $MachinePrecision], 2e-114], N[(N[(N[Log[1 + x], $MachinePrecision] - N[Log[x], $MachinePrecision]), $MachinePrecision] / n), $MachinePrecision], If[LessEqual[N[(1.0 / n), $MachinePrecision], 5e-73], t$95$2, If[LessEqual[N[(1.0 / n), $MachinePrecision], 5e-51], N[((-N[Log[x], $MachinePrecision]) / n), $MachinePrecision], If[LessEqual[N[(1.0 / n), $MachinePrecision], 1e-11], t$95$2, N[(N[Exp[N[(x / n), $MachinePrecision]], $MachinePrecision] - t$95$0), $MachinePrecision]]]]]]]]]
        
        \begin{array}{l}
        
        \\
        \begin{array}{l}
        t_0 := {x}^{\left(\frac{1}{n}\right)}\\
        t_1 := \frac{t_0}{n \cdot x}\\
        t_2 := t_1 + \frac{\frac{\frac{-0.5}{n}}{x}}{x}\\
        \mathbf{if}\;\frac{1}{n} \leq -1 \cdot 10^{-5}:\\
        \;\;\;\;t_1\\
        
        \mathbf{elif}\;\frac{1}{n} \leq 2 \cdot 10^{-114}:\\
        \;\;\;\;\frac{\mathsf{log1p}\left(x\right) - \log x}{n}\\
        
        \mathbf{elif}\;\frac{1}{n} \leq 5 \cdot 10^{-73}:\\
        \;\;\;\;t_2\\
        
        \mathbf{elif}\;\frac{1}{n} \leq 5 \cdot 10^{-51}:\\
        \;\;\;\;\frac{-\log x}{n}\\
        
        \mathbf{elif}\;\frac{1}{n} \leq 10^{-11}:\\
        \;\;\;\;t_2\\
        
        \mathbf{else}:\\
        \;\;\;\;e^{\frac{x}{n}} - t_0\\
        
        
        \end{array}
        \end{array}
        
        Derivation
        1. Split input into 5 regimes
        2. if (/.f64 1 n) < -1.00000000000000008e-5

          1. Initial program 97.3%

            \[{\left(x + 1\right)}^{\left(\frac{1}{n}\right)} - {x}^{\left(\frac{1}{n}\right)} \]
          2. Taylor expanded in x around inf 100.0%

            \[\leadsto \color{blue}{\frac{e^{-1 \cdot \frac{\log \left(\frac{1}{x}\right)}{n}}}{n \cdot x}} \]
          3. Step-by-step derivation
            1. log-rec100.0%

              \[\leadsto \frac{e^{-1 \cdot \frac{\color{blue}{-\log x}}{n}}}{n \cdot x} \]
            2. mul-1-neg100.0%

              \[\leadsto \frac{e^{-1 \cdot \frac{\color{blue}{-1 \cdot \log x}}{n}}}{n \cdot x} \]
            3. associate-*r/100.0%

              \[\leadsto \frac{e^{\color{blue}{\frac{-1 \cdot \left(-1 \cdot \log x\right)}{n}}}}{n \cdot x} \]
            4. neg-mul-1100.0%

              \[\leadsto \frac{e^{\frac{\color{blue}{--1 \cdot \log x}}{n}}}{n \cdot x} \]
            5. mul-1-neg100.0%

              \[\leadsto \frac{e^{\frac{-\color{blue}{\left(-\log x\right)}}{n}}}{n \cdot x} \]
            6. remove-double-neg100.0%

              \[\leadsto \frac{e^{\frac{\color{blue}{\log x}}{n}}}{n \cdot x} \]
            7. *-commutative100.0%

              \[\leadsto \frac{e^{\frac{\log x}{n}}}{\color{blue}{x \cdot n}} \]
          4. Simplified100.0%

            \[\leadsto \color{blue}{\frac{e^{\frac{\log x}{n}}}{x \cdot n}} \]
          5. Taylor expanded in x around 0 100.0%

            \[\leadsto \color{blue}{\frac{e^{\frac{\log x}{n}}}{n \cdot x}} \]
          6. Step-by-step derivation
            1. *-rgt-identity100.0%

              \[\leadsto \frac{e^{\frac{\color{blue}{\log x \cdot 1}}{n}}}{n \cdot x} \]
            2. associate-*r/100.0%

              \[\leadsto \frac{e^{\color{blue}{\log x \cdot \frac{1}{n}}}}{n \cdot x} \]
            3. exp-to-pow100.0%

              \[\leadsto \frac{\color{blue}{{x}^{\left(\frac{1}{n}\right)}}}{n \cdot x} \]
            4. *-commutative100.0%

              \[\leadsto \frac{{x}^{\left(\frac{1}{n}\right)}}{\color{blue}{x \cdot n}} \]
          7. Simplified100.0%

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

          if -1.00000000000000008e-5 < (/.f64 1 n) < 2.0000000000000001e-114

          1. Initial program 36.2%

            \[{\left(x + 1\right)}^{\left(\frac{1}{n}\right)} - {x}^{\left(\frac{1}{n}\right)} \]
          2. Taylor expanded in n around inf 81.1%

            \[\leadsto \color{blue}{\frac{\log \left(1 + x\right) - \log x}{n}} \]
          3. Step-by-step derivation
            1. +-rgt-identity81.1%

              \[\leadsto \frac{\color{blue}{\left(\log \left(1 + x\right) + 0\right)} - \log x}{n} \]
            2. +-rgt-identity81.1%

              \[\leadsto \frac{\color{blue}{\log \left(1 + x\right)} - \log x}{n} \]
            3. log1p-def81.1%

              \[\leadsto \frac{\color{blue}{\mathsf{log1p}\left(x\right)} - \log x}{n} \]
          4. Simplified81.1%

            \[\leadsto \color{blue}{\frac{\mathsf{log1p}\left(x\right) - \log x}{n}} \]

          if 2.0000000000000001e-114 < (/.f64 1 n) < 4.9999999999999998e-73 or 5.00000000000000004e-51 < (/.f64 1 n) < 9.99999999999999939e-12

          1. Initial program 13.0%

            \[{\left(x + 1\right)}^{\left(\frac{1}{n}\right)} - {x}^{\left(\frac{1}{n}\right)} \]
          2. Taylor expanded in n around 0 13.0%

            \[\leadsto \color{blue}{e^{\frac{\log \left(1 + x\right)}{n}}} - {x}^{\left(\frac{1}{n}\right)} \]
          3. Step-by-step derivation
            1. log1p-def13.0%

              \[\leadsto e^{\frac{\color{blue}{\mathsf{log1p}\left(x\right)}}{n}} - {x}^{\left(\frac{1}{n}\right)} \]
          4. Simplified13.0%

            \[\leadsto \color{blue}{e^{\frac{\mathsf{log1p}\left(x\right)}{n}}} - {x}^{\left(\frac{1}{n}\right)} \]
          5. Taylor expanded in x around inf 87.0%

            \[\leadsto \color{blue}{\frac{e^{-1 \cdot \frac{\log \left(\frac{1}{x}\right)}{n}} \cdot \left(0.5 \cdot \frac{1}{{n}^{2}} - 0.5 \cdot \frac{1}{n}\right)}{{x}^{2}} + \frac{e^{-1 \cdot \frac{\log \left(\frac{1}{x}\right)}{n}}}{n \cdot x}} \]
          6. Step-by-step derivation
            1. Simplified87.0%

              \[\leadsto \color{blue}{\frac{{x}^{\left(\frac{1}{n}\right)}}{x} \cdot \frac{\frac{0.5}{n \cdot n} - \frac{0.5}{n}}{x} + \frac{{x}^{\left(\frac{1}{n}\right)}}{x \cdot n}} \]
            2. Taylor expanded in n around inf 87.0%

              \[\leadsto \color{blue}{\frac{-0.5}{n \cdot {x}^{2}}} + \frac{{x}^{\left(\frac{1}{n}\right)}}{x \cdot n} \]
            3. Step-by-step derivation
              1. associate-/r*87.0%

                \[\leadsto \color{blue}{\frac{\frac{-0.5}{n}}{{x}^{2}}} + \frac{{x}^{\left(\frac{1}{n}\right)}}{x \cdot n} \]
              2. metadata-eval87.0%

                \[\leadsto \frac{\frac{\color{blue}{-0.5}}{n}}{{x}^{2}} + \frac{{x}^{\left(\frac{1}{n}\right)}}{x \cdot n} \]
              3. distribute-neg-frac87.0%

                \[\leadsto \frac{\color{blue}{-\frac{0.5}{n}}}{{x}^{2}} + \frac{{x}^{\left(\frac{1}{n}\right)}}{x \cdot n} \]
              4. metadata-eval87.0%

                \[\leadsto \frac{-\frac{\color{blue}{0.5 \cdot 1}}{n}}{{x}^{2}} + \frac{{x}^{\left(\frac{1}{n}\right)}}{x \cdot n} \]
              5. associate-*r/87.0%

                \[\leadsto \frac{-\color{blue}{0.5 \cdot \frac{1}{n}}}{{x}^{2}} + \frac{{x}^{\left(\frac{1}{n}\right)}}{x \cdot n} \]
              6. unpow287.0%

                \[\leadsto \frac{-0.5 \cdot \frac{1}{n}}{\color{blue}{x \cdot x}} + \frac{{x}^{\left(\frac{1}{n}\right)}}{x \cdot n} \]
              7. associate-/r*87.0%

                \[\leadsto \color{blue}{\frac{\frac{-0.5 \cdot \frac{1}{n}}{x}}{x}} + \frac{{x}^{\left(\frac{1}{n}\right)}}{x \cdot n} \]
              8. associate-*r/87.0%

                \[\leadsto \frac{\frac{-\color{blue}{\frac{0.5 \cdot 1}{n}}}{x}}{x} + \frac{{x}^{\left(\frac{1}{n}\right)}}{x \cdot n} \]
              9. metadata-eval87.0%

                \[\leadsto \frac{\frac{-\frac{\color{blue}{0.5}}{n}}{x}}{x} + \frac{{x}^{\left(\frac{1}{n}\right)}}{x \cdot n} \]
              10. distribute-neg-frac87.0%

                \[\leadsto \frac{\frac{\color{blue}{\frac{-0.5}{n}}}{x}}{x} + \frac{{x}^{\left(\frac{1}{n}\right)}}{x \cdot n} \]
              11. metadata-eval87.0%

                \[\leadsto \frac{\frac{\frac{\color{blue}{-0.5}}{n}}{x}}{x} + \frac{{x}^{\left(\frac{1}{n}\right)}}{x \cdot n} \]
            4. Simplified87.0%

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

            if 4.9999999999999998e-73 < (/.f64 1 n) < 5.00000000000000004e-51

            1. Initial program 3.6%

              \[{\left(x + 1\right)}^{\left(\frac{1}{n}\right)} - {x}^{\left(\frac{1}{n}\right)} \]
            2. Taylor expanded in x around 0 3.6%

              \[\leadsto \color{blue}{1} - {x}^{\left(\frac{1}{n}\right)} \]
            3. Taylor expanded in n around inf 99.1%

              \[\leadsto \color{blue}{-1 \cdot \frac{\log x}{n}} \]
            4. Step-by-step derivation
              1. mul-1-neg99.1%

                \[\leadsto \color{blue}{-\frac{\log x}{n}} \]
            5. Simplified99.1%

              \[\leadsto \color{blue}{-\frac{\log x}{n}} \]

            if 9.99999999999999939e-12 < (/.f64 1 n)

            1. Initial program 48.9%

              \[{\left(x + 1\right)}^{\left(\frac{1}{n}\right)} - {x}^{\left(\frac{1}{n}\right)} \]
            2. Taylor expanded in n around 0 48.9%

              \[\leadsto \color{blue}{e^{\frac{\log \left(1 + x\right)}{n}}} - {x}^{\left(\frac{1}{n}\right)} \]
            3. Step-by-step derivation
              1. log1p-def98.7%

                \[\leadsto e^{\frac{\color{blue}{\mathsf{log1p}\left(x\right)}}{n}} - {x}^{\left(\frac{1}{n}\right)} \]
            4. Simplified98.7%

              \[\leadsto \color{blue}{e^{\frac{\mathsf{log1p}\left(x\right)}{n}}} - {x}^{\left(\frac{1}{n}\right)} \]
            5. Taylor expanded in x around 0 98.7%

              \[\leadsto e^{\color{blue}{\frac{x}{n}}} - {x}^{\left(\frac{1}{n}\right)} \]
          7. Recombined 5 regimes into one program.
          8. Final simplification89.6%

            \[\leadsto \begin{array}{l} \mathbf{if}\;\frac{1}{n} \leq -1 \cdot 10^{-5}:\\ \;\;\;\;\frac{{x}^{\left(\frac{1}{n}\right)}}{n \cdot x}\\ \mathbf{elif}\;\frac{1}{n} \leq 2 \cdot 10^{-114}:\\ \;\;\;\;\frac{\mathsf{log1p}\left(x\right) - \log x}{n}\\ \mathbf{elif}\;\frac{1}{n} \leq 5 \cdot 10^{-73}:\\ \;\;\;\;\frac{{x}^{\left(\frac{1}{n}\right)}}{n \cdot x} + \frac{\frac{\frac{-0.5}{n}}{x}}{x}\\ \mathbf{elif}\;\frac{1}{n} \leq 5 \cdot 10^{-51}:\\ \;\;\;\;\frac{-\log x}{n}\\ \mathbf{elif}\;\frac{1}{n} \leq 10^{-11}:\\ \;\;\;\;\frac{{x}^{\left(\frac{1}{n}\right)}}{n \cdot x} + \frac{\frac{\frac{-0.5}{n}}{x}}{x}\\ \mathbf{else}:\\ \;\;\;\;e^{\frac{x}{n}} - {x}^{\left(\frac{1}{n}\right)}\\ \end{array} \]

          Alternative 10: 71.8% accurate, 1.0× speedup?

          \[\begin{array}{l} \\ \begin{array}{l} t_0 := \frac{-\log x}{n}\\ t_1 := 1 + \frac{x}{n}\\ t_2 := {x}^{\left(\frac{1}{n}\right)}\\ \mathbf{if}\;x \leq 6.5 \cdot 10^{-255}:\\ \;\;\;\;t_1 - t_2\\ \mathbf{elif}\;x \leq 6.6 \cdot 10^{-156}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;x \leq 9.5 \cdot 10^{-137}:\\ \;\;\;\;\left(\left(\frac{0.5}{n \cdot n} - \frac{0.5}{n}\right) \cdot \left(x \cdot x\right) + t_1\right) - t_2\\ \mathbf{elif}\;x \leq 3.2 \cdot 10^{-38}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;x \leq 6.2 \cdot 10^{-22}:\\ \;\;\;\;\mathsf{log1p}\left(\mathsf{expm1}\left(\frac{1}{n \cdot x}\right)\right)\\ \mathbf{elif}\;x \leq 0.0076:\\ \;\;\;\;\frac{x - \log x}{n}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{t_2}{x}}{n}\\ \end{array} \end{array} \]
          (FPCore (x n)
           :precision binary64
           (let* ((t_0 (/ (- (log x)) n)) (t_1 (+ 1.0 (/ x n))) (t_2 (pow x (/ 1.0 n))))
             (if (<= x 6.5e-255)
               (- t_1 t_2)
               (if (<= x 6.6e-156)
                 t_0
                 (if (<= x 9.5e-137)
                   (- (+ (* (- (/ 0.5 (* n n)) (/ 0.5 n)) (* x x)) t_1) t_2)
                   (if (<= x 3.2e-38)
                     t_0
                     (if (<= x 6.2e-22)
                       (log1p (expm1 (/ 1.0 (* n x))))
                       (if (<= x 0.0076) (/ (- x (log x)) n) (/ (/ t_2 x) n)))))))))
          double code(double x, double n) {
          	double t_0 = -log(x) / n;
          	double t_1 = 1.0 + (x / n);
          	double t_2 = pow(x, (1.0 / n));
          	double tmp;
          	if (x <= 6.5e-255) {
          		tmp = t_1 - t_2;
          	} else if (x <= 6.6e-156) {
          		tmp = t_0;
          	} else if (x <= 9.5e-137) {
          		tmp = ((((0.5 / (n * n)) - (0.5 / n)) * (x * x)) + t_1) - t_2;
          	} else if (x <= 3.2e-38) {
          		tmp = t_0;
          	} else if (x <= 6.2e-22) {
          		tmp = log1p(expm1((1.0 / (n * x))));
          	} else if (x <= 0.0076) {
          		tmp = (x - log(x)) / n;
          	} else {
          		tmp = (t_2 / x) / n;
          	}
          	return tmp;
          }
          
          public static double code(double x, double n) {
          	double t_0 = -Math.log(x) / n;
          	double t_1 = 1.0 + (x / n);
          	double t_2 = Math.pow(x, (1.0 / n));
          	double tmp;
          	if (x <= 6.5e-255) {
          		tmp = t_1 - t_2;
          	} else if (x <= 6.6e-156) {
          		tmp = t_0;
          	} else if (x <= 9.5e-137) {
          		tmp = ((((0.5 / (n * n)) - (0.5 / n)) * (x * x)) + t_1) - t_2;
          	} else if (x <= 3.2e-38) {
          		tmp = t_0;
          	} else if (x <= 6.2e-22) {
          		tmp = Math.log1p(Math.expm1((1.0 / (n * x))));
          	} else if (x <= 0.0076) {
          		tmp = (x - Math.log(x)) / n;
          	} else {
          		tmp = (t_2 / x) / n;
          	}
          	return tmp;
          }
          
          def code(x, n):
          	t_0 = -math.log(x) / n
          	t_1 = 1.0 + (x / n)
          	t_2 = math.pow(x, (1.0 / n))
          	tmp = 0
          	if x <= 6.5e-255:
          		tmp = t_1 - t_2
          	elif x <= 6.6e-156:
          		tmp = t_0
          	elif x <= 9.5e-137:
          		tmp = ((((0.5 / (n * n)) - (0.5 / n)) * (x * x)) + t_1) - t_2
          	elif x <= 3.2e-38:
          		tmp = t_0
          	elif x <= 6.2e-22:
          		tmp = math.log1p(math.expm1((1.0 / (n * x))))
          	elif x <= 0.0076:
          		tmp = (x - math.log(x)) / n
          	else:
          		tmp = (t_2 / x) / n
          	return tmp
          
          function code(x, n)
          	t_0 = Float64(Float64(-log(x)) / n)
          	t_1 = Float64(1.0 + Float64(x / n))
          	t_2 = x ^ Float64(1.0 / n)
          	tmp = 0.0
          	if (x <= 6.5e-255)
          		tmp = Float64(t_1 - t_2);
          	elseif (x <= 6.6e-156)
          		tmp = t_0;
          	elseif (x <= 9.5e-137)
          		tmp = Float64(Float64(Float64(Float64(Float64(0.5 / Float64(n * n)) - Float64(0.5 / n)) * Float64(x * x)) + t_1) - t_2);
          	elseif (x <= 3.2e-38)
          		tmp = t_0;
          	elseif (x <= 6.2e-22)
          		tmp = log1p(expm1(Float64(1.0 / Float64(n * x))));
          	elseif (x <= 0.0076)
          		tmp = Float64(Float64(x - log(x)) / n);
          	else
          		tmp = Float64(Float64(t_2 / x) / n);
          	end
          	return tmp
          end
          
          code[x_, n_] := Block[{t$95$0 = N[((-N[Log[x], $MachinePrecision]) / n), $MachinePrecision]}, Block[{t$95$1 = N[(1.0 + N[(x / n), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[Power[x, N[(1.0 / n), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[x, 6.5e-255], N[(t$95$1 - t$95$2), $MachinePrecision], If[LessEqual[x, 6.6e-156], t$95$0, If[LessEqual[x, 9.5e-137], N[(N[(N[(N[(N[(0.5 / N[(n * n), $MachinePrecision]), $MachinePrecision] - N[(0.5 / n), $MachinePrecision]), $MachinePrecision] * N[(x * x), $MachinePrecision]), $MachinePrecision] + t$95$1), $MachinePrecision] - t$95$2), $MachinePrecision], If[LessEqual[x, 3.2e-38], t$95$0, If[LessEqual[x, 6.2e-22], N[Log[1 + N[(Exp[N[(1.0 / N[(n * x), $MachinePrecision]), $MachinePrecision]] - 1), $MachinePrecision]], $MachinePrecision], If[LessEqual[x, 0.0076], N[(N[(x - N[Log[x], $MachinePrecision]), $MachinePrecision] / n), $MachinePrecision], N[(N[(t$95$2 / x), $MachinePrecision] / n), $MachinePrecision]]]]]]]]]]
          
          \begin{array}{l}
          
          \\
          \begin{array}{l}
          t_0 := \frac{-\log x}{n}\\
          t_1 := 1 + \frac{x}{n}\\
          t_2 := {x}^{\left(\frac{1}{n}\right)}\\
          \mathbf{if}\;x \leq 6.5 \cdot 10^{-255}:\\
          \;\;\;\;t_1 - t_2\\
          
          \mathbf{elif}\;x \leq 6.6 \cdot 10^{-156}:\\
          \;\;\;\;t_0\\
          
          \mathbf{elif}\;x \leq 9.5 \cdot 10^{-137}:\\
          \;\;\;\;\left(\left(\frac{0.5}{n \cdot n} - \frac{0.5}{n}\right) \cdot \left(x \cdot x\right) + t_1\right) - t_2\\
          
          \mathbf{elif}\;x \leq 3.2 \cdot 10^{-38}:\\
          \;\;\;\;t_0\\
          
          \mathbf{elif}\;x \leq 6.2 \cdot 10^{-22}:\\
          \;\;\;\;\mathsf{log1p}\left(\mathsf{expm1}\left(\frac{1}{n \cdot x}\right)\right)\\
          
          \mathbf{elif}\;x \leq 0.0076:\\
          \;\;\;\;\frac{x - \log x}{n}\\
          
          \mathbf{else}:\\
          \;\;\;\;\frac{\frac{t_2}{x}}{n}\\
          
          
          \end{array}
          \end{array}
          
          Derivation
          1. Split input into 6 regimes
          2. if x < 6.5e-255

            1. Initial program 63.7%

              \[{\left(x + 1\right)}^{\left(\frac{1}{n}\right)} - {x}^{\left(\frac{1}{n}\right)} \]
            2. Taylor expanded in x around 0 63.7%

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

            if 6.5e-255 < x < 6.5999999999999997e-156 or 9.5000000000000007e-137 < x < 3.19999999999999977e-38

            1. Initial program 36.6%

              \[{\left(x + 1\right)}^{\left(\frac{1}{n}\right)} - {x}^{\left(\frac{1}{n}\right)} \]
            2. Taylor expanded in x around 0 36.6%

              \[\leadsto \color{blue}{1} - {x}^{\left(\frac{1}{n}\right)} \]
            3. Taylor expanded in n around inf 59.8%

              \[\leadsto \color{blue}{-1 \cdot \frac{\log x}{n}} \]
            4. Step-by-step derivation
              1. mul-1-neg59.8%

                \[\leadsto \color{blue}{-\frac{\log x}{n}} \]
            5. Simplified59.8%

              \[\leadsto \color{blue}{-\frac{\log x}{n}} \]

            if 6.5999999999999997e-156 < x < 9.5000000000000007e-137

            1. Initial program 69.5%

              \[{\left(x + 1\right)}^{\left(\frac{1}{n}\right)} - {x}^{\left(\frac{1}{n}\right)} \]
            2. Taylor expanded in x around 0 84.4%

              \[\leadsto \color{blue}{\left(\frac{x}{n} + \left(1 + \left(0.5 \cdot \frac{1}{{n}^{2}} - 0.5 \cdot \frac{1}{n}\right) \cdot {x}^{2}\right)\right)} - {x}^{\left(\frac{1}{n}\right)} \]
            3. Step-by-step derivation
              1. associate-+r+84.4%

                \[\leadsto \color{blue}{\left(\left(\frac{x}{n} + 1\right) + \left(0.5 \cdot \frac{1}{{n}^{2}} - 0.5 \cdot \frac{1}{n}\right) \cdot {x}^{2}\right)} - {x}^{\left(\frac{1}{n}\right)} \]
              2. +-commutative84.4%

                \[\leadsto \left(\color{blue}{\left(1 + \frac{x}{n}\right)} + \left(0.5 \cdot \frac{1}{{n}^{2}} - 0.5 \cdot \frac{1}{n}\right) \cdot {x}^{2}\right) - {x}^{\left(\frac{1}{n}\right)} \]
              3. associate-*r/84.4%

                \[\leadsto \left(\left(1 + \frac{x}{n}\right) + \left(\color{blue}{\frac{0.5 \cdot 1}{{n}^{2}}} - 0.5 \cdot \frac{1}{n}\right) \cdot {x}^{2}\right) - {x}^{\left(\frac{1}{n}\right)} \]
              4. metadata-eval84.4%

                \[\leadsto \left(\left(1 + \frac{x}{n}\right) + \left(\frac{\color{blue}{0.5}}{{n}^{2}} - 0.5 \cdot \frac{1}{n}\right) \cdot {x}^{2}\right) - {x}^{\left(\frac{1}{n}\right)} \]
              5. unpow284.4%

                \[\leadsto \left(\left(1 + \frac{x}{n}\right) + \left(\frac{0.5}{\color{blue}{n \cdot n}} - 0.5 \cdot \frac{1}{n}\right) \cdot {x}^{2}\right) - {x}^{\left(\frac{1}{n}\right)} \]
              6. associate-*r/84.4%

                \[\leadsto \left(\left(1 + \frac{x}{n}\right) + \left(\frac{0.5}{n \cdot n} - \color{blue}{\frac{0.5 \cdot 1}{n}}\right) \cdot {x}^{2}\right) - {x}^{\left(\frac{1}{n}\right)} \]
              7. metadata-eval84.4%

                \[\leadsto \left(\left(1 + \frac{x}{n}\right) + \left(\frac{0.5}{n \cdot n} - \frac{\color{blue}{0.5}}{n}\right) \cdot {x}^{2}\right) - {x}^{\left(\frac{1}{n}\right)} \]
              8. unpow284.4%

                \[\leadsto \left(\left(1 + \frac{x}{n}\right) + \left(\frac{0.5}{n \cdot n} - \frac{0.5}{n}\right) \cdot \color{blue}{\left(x \cdot x\right)}\right) - {x}^{\left(\frac{1}{n}\right)} \]
            4. Simplified84.4%

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

            if 3.19999999999999977e-38 < x < 6.20000000000000025e-22

            1. Initial program 41.1%

              \[{\left(x + 1\right)}^{\left(\frac{1}{n}\right)} - {x}^{\left(\frac{1}{n}\right)} \]
            2. Taylor expanded in x around inf 41.0%

              \[\leadsto \color{blue}{\frac{e^{-1 \cdot \frac{\log \left(\frac{1}{x}\right)}{n}}}{n \cdot x}} \]
            3. Step-by-step derivation
              1. log-rec41.0%

                \[\leadsto \frac{e^{-1 \cdot \frac{\color{blue}{-\log x}}{n}}}{n \cdot x} \]
              2. mul-1-neg41.0%

                \[\leadsto \frac{e^{-1 \cdot \frac{\color{blue}{-1 \cdot \log x}}{n}}}{n \cdot x} \]
              3. associate-*r/41.0%

                \[\leadsto \frac{e^{\color{blue}{\frac{-1 \cdot \left(-1 \cdot \log x\right)}{n}}}}{n \cdot x} \]
              4. neg-mul-141.0%

                \[\leadsto \frac{e^{\frac{\color{blue}{--1 \cdot \log x}}{n}}}{n \cdot x} \]
              5. mul-1-neg41.0%

                \[\leadsto \frac{e^{\frac{-\color{blue}{\left(-\log x\right)}}{n}}}{n \cdot x} \]
              6. remove-double-neg41.0%

                \[\leadsto \frac{e^{\frac{\color{blue}{\log x}}{n}}}{n \cdot x} \]
              7. *-commutative41.0%

                \[\leadsto \frac{e^{\frac{\log x}{n}}}{\color{blue}{x \cdot n}} \]
            4. Simplified41.0%

              \[\leadsto \color{blue}{\frac{e^{\frac{\log x}{n}}}{x \cdot n}} \]
            5. Taylor expanded in n around inf 6.0%

              \[\leadsto \color{blue}{\frac{1}{n \cdot x}} \]
            6. Step-by-step derivation
              1. *-commutative6.0%

                \[\leadsto \frac{1}{\color{blue}{x \cdot n}} \]
            7. Simplified6.0%

              \[\leadsto \color{blue}{\frac{1}{x \cdot n}} \]
            8. Step-by-step derivation
              1. log1p-expm1-u78.9%

                \[\leadsto \color{blue}{\mathsf{log1p}\left(\mathsf{expm1}\left(\frac{1}{x \cdot n}\right)\right)} \]
              2. *-commutative78.9%

                \[\leadsto \mathsf{log1p}\left(\mathsf{expm1}\left(\frac{1}{\color{blue}{n \cdot x}}\right)\right) \]
            9. Applied egg-rr78.9%

              \[\leadsto \color{blue}{\mathsf{log1p}\left(\mathsf{expm1}\left(\frac{1}{n \cdot x}\right)\right)} \]

            if 6.20000000000000025e-22 < x < 0.00759999999999999998

            1. Initial program 24.0%

              \[{\left(x + 1\right)}^{\left(\frac{1}{n}\right)} - {x}^{\left(\frac{1}{n}\right)} \]
            2. Taylor expanded in n around 0 24.0%

              \[\leadsto \color{blue}{e^{\frac{\log \left(1 + x\right)}{n}}} - {x}^{\left(\frac{1}{n}\right)} \]
            3. Step-by-step derivation
              1. log1p-def24.0%

                \[\leadsto e^{\frac{\color{blue}{\mathsf{log1p}\left(x\right)}}{n}} - {x}^{\left(\frac{1}{n}\right)} \]
            4. Simplified24.0%

              \[\leadsto \color{blue}{e^{\frac{\mathsf{log1p}\left(x\right)}{n}}} - {x}^{\left(\frac{1}{n}\right)} \]
            5. Taylor expanded in x around 0 24.0%

              \[\leadsto e^{\color{blue}{\frac{x}{n}}} - {x}^{\left(\frac{1}{n}\right)} \]
            6. Taylor expanded in n around inf 73.8%

              \[\leadsto \color{blue}{\frac{x - \log x}{n}} \]

            if 0.00759999999999999998 < x

            1. Initial program 63.0%

              \[{\left(x + 1\right)}^{\left(\frac{1}{n}\right)} - {x}^{\left(\frac{1}{n}\right)} \]
            2. Taylor expanded in x around inf 95.6%

              \[\leadsto \color{blue}{\frac{e^{-1 \cdot \frac{\log \left(\frac{1}{x}\right)}{n}}}{n \cdot x}} \]
            3. Step-by-step derivation
              1. log-rec95.6%

                \[\leadsto \frac{e^{-1 \cdot \frac{\color{blue}{-\log x}}{n}}}{n \cdot x} \]
              2. mul-1-neg95.6%

                \[\leadsto \frac{e^{-1 \cdot \frac{\color{blue}{-1 \cdot \log x}}{n}}}{n \cdot x} \]
              3. associate-*r/95.6%

                \[\leadsto \frac{e^{\color{blue}{\frac{-1 \cdot \left(-1 \cdot \log x\right)}{n}}}}{n \cdot x} \]
              4. neg-mul-195.6%

                \[\leadsto \frac{e^{\frac{\color{blue}{--1 \cdot \log x}}{n}}}{n \cdot x} \]
              5. mul-1-neg95.6%

                \[\leadsto \frac{e^{\frac{-\color{blue}{\left(-\log x\right)}}{n}}}{n \cdot x} \]
              6. remove-double-neg95.6%

                \[\leadsto \frac{e^{\frac{\color{blue}{\log x}}{n}}}{n \cdot x} \]
              7. *-commutative95.6%

                \[\leadsto \frac{e^{\frac{\log x}{n}}}{\color{blue}{x \cdot n}} \]
            4. Simplified95.6%

              \[\leadsto \color{blue}{\frac{e^{\frac{\log x}{n}}}{x \cdot n}} \]
            5. Step-by-step derivation
              1. div-inv95.6%

                \[\leadsto \frac{e^{\color{blue}{\log x \cdot \frac{1}{n}}}}{x \cdot n} \]
              2. pow-to-exp95.6%

                \[\leadsto \frac{\color{blue}{{x}^{\left(\frac{1}{n}\right)}}}{x \cdot n} \]
              3. *-un-lft-identity95.6%

                \[\leadsto \frac{\color{blue}{1 \cdot {x}^{\left(\frac{1}{n}\right)}}}{x \cdot n} \]
              4. *-commutative95.6%

                \[\leadsto \frac{1 \cdot {x}^{\left(\frac{1}{n}\right)}}{\color{blue}{n \cdot x}} \]
              5. times-frac98.0%

                \[\leadsto \color{blue}{\frac{1}{n} \cdot \frac{{x}^{\left(\frac{1}{n}\right)}}{x}} \]
            6. Applied egg-rr98.0%

              \[\leadsto \color{blue}{\frac{1}{n} \cdot \frac{{x}^{\left(\frac{1}{n}\right)}}{x}} \]
            7. Step-by-step derivation
              1. associate-*l/98.0%

                \[\leadsto \color{blue}{\frac{1 \cdot \frac{{x}^{\left(\frac{1}{n}\right)}}{x}}{n}} \]
              2. *-un-lft-identity98.0%

                \[\leadsto \frac{\color{blue}{\frac{{x}^{\left(\frac{1}{n}\right)}}{x}}}{n} \]
            8. Applied egg-rr98.0%

              \[\leadsto \color{blue}{\frac{\frac{{x}^{\left(\frac{1}{n}\right)}}{x}}{n}} \]
          3. Recombined 6 regimes into one program.
          4. Final simplification79.7%

            \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq 6.5 \cdot 10^{-255}:\\ \;\;\;\;\left(1 + \frac{x}{n}\right) - {x}^{\left(\frac{1}{n}\right)}\\ \mathbf{elif}\;x \leq 6.6 \cdot 10^{-156}:\\ \;\;\;\;\frac{-\log x}{n}\\ \mathbf{elif}\;x \leq 9.5 \cdot 10^{-137}:\\ \;\;\;\;\left(\left(\frac{0.5}{n \cdot n} - \frac{0.5}{n}\right) \cdot \left(x \cdot x\right) + \left(1 + \frac{x}{n}\right)\right) - {x}^{\left(\frac{1}{n}\right)}\\ \mathbf{elif}\;x \leq 3.2 \cdot 10^{-38}:\\ \;\;\;\;\frac{-\log x}{n}\\ \mathbf{elif}\;x \leq 6.2 \cdot 10^{-22}:\\ \;\;\;\;\mathsf{log1p}\left(\mathsf{expm1}\left(\frac{1}{n \cdot x}\right)\right)\\ \mathbf{elif}\;x \leq 0.0076:\\ \;\;\;\;\frac{x - \log x}{n}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{{x}^{\left(\frac{1}{n}\right)}}{x}}{n}\\ \end{array} \]

          Alternative 11: 72.1% accurate, 1.6× speedup?

          \[\begin{array}{l} \\ \begin{array}{l} t_0 := 1 + \frac{x}{n}\\ t_1 := {x}^{\left(\frac{1}{n}\right)}\\ \mathbf{if}\;x \leq 1.8 \cdot 10^{-255}:\\ \;\;\;\;t_0 - t_1\\ \mathbf{elif}\;x \leq 6.6 \cdot 10^{-156}:\\ \;\;\;\;\frac{-\log x}{n}\\ \mathbf{elif}\;x \leq 9.5 \cdot 10^{-137}:\\ \;\;\;\;\left(\left(\frac{0.5}{n \cdot n} - \frac{0.5}{n}\right) \cdot \left(x \cdot x\right) + t_0\right) - t_1\\ \mathbf{elif}\;x \leq 0.044:\\ \;\;\;\;\frac{x - \log x}{n}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{t_1}{x}}{n}\\ \end{array} \end{array} \]
          (FPCore (x n)
           :precision binary64
           (let* ((t_0 (+ 1.0 (/ x n))) (t_1 (pow x (/ 1.0 n))))
             (if (<= x 1.8e-255)
               (- t_0 t_1)
               (if (<= x 6.6e-156)
                 (/ (- (log x)) n)
                 (if (<= x 9.5e-137)
                   (- (+ (* (- (/ 0.5 (* n n)) (/ 0.5 n)) (* x x)) t_0) t_1)
                   (if (<= x 0.044) (/ (- x (log x)) n) (/ (/ t_1 x) n)))))))
          double code(double x, double n) {
          	double t_0 = 1.0 + (x / n);
          	double t_1 = pow(x, (1.0 / n));
          	double tmp;
          	if (x <= 1.8e-255) {
          		tmp = t_0 - t_1;
          	} else if (x <= 6.6e-156) {
          		tmp = -log(x) / n;
          	} else if (x <= 9.5e-137) {
          		tmp = ((((0.5 / (n * n)) - (0.5 / n)) * (x * x)) + t_0) - t_1;
          	} else if (x <= 0.044) {
          		tmp = (x - log(x)) / n;
          	} else {
          		tmp = (t_1 / x) / n;
          	}
          	return tmp;
          }
          
          real(8) function code(x, n)
              real(8), intent (in) :: x
              real(8), intent (in) :: n
              real(8) :: t_0
              real(8) :: t_1
              real(8) :: tmp
              t_0 = 1.0d0 + (x / n)
              t_1 = x ** (1.0d0 / n)
              if (x <= 1.8d-255) then
                  tmp = t_0 - t_1
              else if (x <= 6.6d-156) then
                  tmp = -log(x) / n
              else if (x <= 9.5d-137) then
                  tmp = ((((0.5d0 / (n * n)) - (0.5d0 / n)) * (x * x)) + t_0) - t_1
              else if (x <= 0.044d0) then
                  tmp = (x - log(x)) / n
              else
                  tmp = (t_1 / x) / n
              end if
              code = tmp
          end function
          
          public static double code(double x, double n) {
          	double t_0 = 1.0 + (x / n);
          	double t_1 = Math.pow(x, (1.0 / n));
          	double tmp;
          	if (x <= 1.8e-255) {
          		tmp = t_0 - t_1;
          	} else if (x <= 6.6e-156) {
          		tmp = -Math.log(x) / n;
          	} else if (x <= 9.5e-137) {
          		tmp = ((((0.5 / (n * n)) - (0.5 / n)) * (x * x)) + t_0) - t_1;
          	} else if (x <= 0.044) {
          		tmp = (x - Math.log(x)) / n;
          	} else {
          		tmp = (t_1 / x) / n;
          	}
          	return tmp;
          }
          
          def code(x, n):
          	t_0 = 1.0 + (x / n)
          	t_1 = math.pow(x, (1.0 / n))
          	tmp = 0
          	if x <= 1.8e-255:
          		tmp = t_0 - t_1
          	elif x <= 6.6e-156:
          		tmp = -math.log(x) / n
          	elif x <= 9.5e-137:
          		tmp = ((((0.5 / (n * n)) - (0.5 / n)) * (x * x)) + t_0) - t_1
          	elif x <= 0.044:
          		tmp = (x - math.log(x)) / n
          	else:
          		tmp = (t_1 / x) / n
          	return tmp
          
          function code(x, n)
          	t_0 = Float64(1.0 + Float64(x / n))
          	t_1 = x ^ Float64(1.0 / n)
          	tmp = 0.0
          	if (x <= 1.8e-255)
          		tmp = Float64(t_0 - t_1);
          	elseif (x <= 6.6e-156)
          		tmp = Float64(Float64(-log(x)) / n);
          	elseif (x <= 9.5e-137)
          		tmp = Float64(Float64(Float64(Float64(Float64(0.5 / Float64(n * n)) - Float64(0.5 / n)) * Float64(x * x)) + t_0) - t_1);
          	elseif (x <= 0.044)
          		tmp = Float64(Float64(x - log(x)) / n);
          	else
          		tmp = Float64(Float64(t_1 / x) / n);
          	end
          	return tmp
          end
          
          function tmp_2 = code(x, n)
          	t_0 = 1.0 + (x / n);
          	t_1 = x ^ (1.0 / n);
          	tmp = 0.0;
          	if (x <= 1.8e-255)
          		tmp = t_0 - t_1;
          	elseif (x <= 6.6e-156)
          		tmp = -log(x) / n;
          	elseif (x <= 9.5e-137)
          		tmp = ((((0.5 / (n * n)) - (0.5 / n)) * (x * x)) + t_0) - t_1;
          	elseif (x <= 0.044)
          		tmp = (x - log(x)) / n;
          	else
          		tmp = (t_1 / x) / n;
          	end
          	tmp_2 = tmp;
          end
          
          code[x_, n_] := Block[{t$95$0 = N[(1.0 + N[(x / n), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[Power[x, N[(1.0 / n), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[x, 1.8e-255], N[(t$95$0 - t$95$1), $MachinePrecision], If[LessEqual[x, 6.6e-156], N[((-N[Log[x], $MachinePrecision]) / n), $MachinePrecision], If[LessEqual[x, 9.5e-137], N[(N[(N[(N[(N[(0.5 / N[(n * n), $MachinePrecision]), $MachinePrecision] - N[(0.5 / n), $MachinePrecision]), $MachinePrecision] * N[(x * x), $MachinePrecision]), $MachinePrecision] + t$95$0), $MachinePrecision] - t$95$1), $MachinePrecision], If[LessEqual[x, 0.044], N[(N[(x - N[Log[x], $MachinePrecision]), $MachinePrecision] / n), $MachinePrecision], N[(N[(t$95$1 / x), $MachinePrecision] / n), $MachinePrecision]]]]]]]
          
          \begin{array}{l}
          
          \\
          \begin{array}{l}
          t_0 := 1 + \frac{x}{n}\\
          t_1 := {x}^{\left(\frac{1}{n}\right)}\\
          \mathbf{if}\;x \leq 1.8 \cdot 10^{-255}:\\
          \;\;\;\;t_0 - t_1\\
          
          \mathbf{elif}\;x \leq 6.6 \cdot 10^{-156}:\\
          \;\;\;\;\frac{-\log x}{n}\\
          
          \mathbf{elif}\;x \leq 9.5 \cdot 10^{-137}:\\
          \;\;\;\;\left(\left(\frac{0.5}{n \cdot n} - \frac{0.5}{n}\right) \cdot \left(x \cdot x\right) + t_0\right) - t_1\\
          
          \mathbf{elif}\;x \leq 0.044:\\
          \;\;\;\;\frac{x - \log x}{n}\\
          
          \mathbf{else}:\\
          \;\;\;\;\frac{\frac{t_1}{x}}{n}\\
          
          
          \end{array}
          \end{array}
          
          Derivation
          1. Split input into 5 regimes
          2. if x < 1.8000000000000001e-255

            1. Initial program 63.7%

              \[{\left(x + 1\right)}^{\left(\frac{1}{n}\right)} - {x}^{\left(\frac{1}{n}\right)} \]
            2. Taylor expanded in x around 0 63.7%

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

            if 1.8000000000000001e-255 < x < 6.5999999999999997e-156

            1. Initial program 43.3%

              \[{\left(x + 1\right)}^{\left(\frac{1}{n}\right)} - {x}^{\left(\frac{1}{n}\right)} \]
            2. Taylor expanded in x around 0 43.3%

              \[\leadsto \color{blue}{1} - {x}^{\left(\frac{1}{n}\right)} \]
            3. Taylor expanded in n around inf 59.0%

              \[\leadsto \color{blue}{-1 \cdot \frac{\log x}{n}} \]
            4. Step-by-step derivation
              1. mul-1-neg59.0%

                \[\leadsto \color{blue}{-\frac{\log x}{n}} \]
            5. Simplified59.0%

              \[\leadsto \color{blue}{-\frac{\log x}{n}} \]

            if 6.5999999999999997e-156 < x < 9.5000000000000007e-137

            1. Initial program 69.5%

              \[{\left(x + 1\right)}^{\left(\frac{1}{n}\right)} - {x}^{\left(\frac{1}{n}\right)} \]
            2. Taylor expanded in x around 0 84.4%

              \[\leadsto \color{blue}{\left(\frac{x}{n} + \left(1 + \left(0.5 \cdot \frac{1}{{n}^{2}} - 0.5 \cdot \frac{1}{n}\right) \cdot {x}^{2}\right)\right)} - {x}^{\left(\frac{1}{n}\right)} \]
            3. Step-by-step derivation
              1. associate-+r+84.4%

                \[\leadsto \color{blue}{\left(\left(\frac{x}{n} + 1\right) + \left(0.5 \cdot \frac{1}{{n}^{2}} - 0.5 \cdot \frac{1}{n}\right) \cdot {x}^{2}\right)} - {x}^{\left(\frac{1}{n}\right)} \]
              2. +-commutative84.4%

                \[\leadsto \left(\color{blue}{\left(1 + \frac{x}{n}\right)} + \left(0.5 \cdot \frac{1}{{n}^{2}} - 0.5 \cdot \frac{1}{n}\right) \cdot {x}^{2}\right) - {x}^{\left(\frac{1}{n}\right)} \]
              3. associate-*r/84.4%

                \[\leadsto \left(\left(1 + \frac{x}{n}\right) + \left(\color{blue}{\frac{0.5 \cdot 1}{{n}^{2}}} - 0.5 \cdot \frac{1}{n}\right) \cdot {x}^{2}\right) - {x}^{\left(\frac{1}{n}\right)} \]
              4. metadata-eval84.4%

                \[\leadsto \left(\left(1 + \frac{x}{n}\right) + \left(\frac{\color{blue}{0.5}}{{n}^{2}} - 0.5 \cdot \frac{1}{n}\right) \cdot {x}^{2}\right) - {x}^{\left(\frac{1}{n}\right)} \]
              5. unpow284.4%

                \[\leadsto \left(\left(1 + \frac{x}{n}\right) + \left(\frac{0.5}{\color{blue}{n \cdot n}} - 0.5 \cdot \frac{1}{n}\right) \cdot {x}^{2}\right) - {x}^{\left(\frac{1}{n}\right)} \]
              6. associate-*r/84.4%

                \[\leadsto \left(\left(1 + \frac{x}{n}\right) + \left(\frac{0.5}{n \cdot n} - \color{blue}{\frac{0.5 \cdot 1}{n}}\right) \cdot {x}^{2}\right) - {x}^{\left(\frac{1}{n}\right)} \]
              7. metadata-eval84.4%

                \[\leadsto \left(\left(1 + \frac{x}{n}\right) + \left(\frac{0.5}{n \cdot n} - \frac{\color{blue}{0.5}}{n}\right) \cdot {x}^{2}\right) - {x}^{\left(\frac{1}{n}\right)} \]
              8. unpow284.4%

                \[\leadsto \left(\left(1 + \frac{x}{n}\right) + \left(\frac{0.5}{n \cdot n} - \frac{0.5}{n}\right) \cdot \color{blue}{\left(x \cdot x\right)}\right) - {x}^{\left(\frac{1}{n}\right)} \]
            4. Simplified84.4%

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

            if 9.5000000000000007e-137 < x < 0.043999999999999997

            1. Initial program 29.8%

              \[{\left(x + 1\right)}^{\left(\frac{1}{n}\right)} - {x}^{\left(\frac{1}{n}\right)} \]
            2. Taylor expanded in n around 0 29.8%

              \[\leadsto \color{blue}{e^{\frac{\log \left(1 + x\right)}{n}}} - {x}^{\left(\frac{1}{n}\right)} \]
            3. Step-by-step derivation
              1. log1p-def50.7%

                \[\leadsto e^{\frac{\color{blue}{\mathsf{log1p}\left(x\right)}}{n}} - {x}^{\left(\frac{1}{n}\right)} \]
            4. Simplified50.7%

              \[\leadsto \color{blue}{e^{\frac{\mathsf{log1p}\left(x\right)}{n}}} - {x}^{\left(\frac{1}{n}\right)} \]
            5. Taylor expanded in x around 0 50.7%

              \[\leadsto e^{\color{blue}{\frac{x}{n}}} - {x}^{\left(\frac{1}{n}\right)} \]
            6. Taylor expanded in n around inf 54.4%

              \[\leadsto \color{blue}{\frac{x - \log x}{n}} \]

            if 0.043999999999999997 < x

            1. Initial program 63.0%

              \[{\left(x + 1\right)}^{\left(\frac{1}{n}\right)} - {x}^{\left(\frac{1}{n}\right)} \]
            2. Taylor expanded in x around inf 95.6%

              \[\leadsto \color{blue}{\frac{e^{-1 \cdot \frac{\log \left(\frac{1}{x}\right)}{n}}}{n \cdot x}} \]
            3. Step-by-step derivation
              1. log-rec95.6%

                \[\leadsto \frac{e^{-1 \cdot \frac{\color{blue}{-\log x}}{n}}}{n \cdot x} \]
              2. mul-1-neg95.6%

                \[\leadsto \frac{e^{-1 \cdot \frac{\color{blue}{-1 \cdot \log x}}{n}}}{n \cdot x} \]
              3. associate-*r/95.6%

                \[\leadsto \frac{e^{\color{blue}{\frac{-1 \cdot \left(-1 \cdot \log x\right)}{n}}}}{n \cdot x} \]
              4. neg-mul-195.6%

                \[\leadsto \frac{e^{\frac{\color{blue}{--1 \cdot \log x}}{n}}}{n \cdot x} \]
              5. mul-1-neg95.6%

                \[\leadsto \frac{e^{\frac{-\color{blue}{\left(-\log x\right)}}{n}}}{n \cdot x} \]
              6. remove-double-neg95.6%

                \[\leadsto \frac{e^{\frac{\color{blue}{\log x}}{n}}}{n \cdot x} \]
              7. *-commutative95.6%

                \[\leadsto \frac{e^{\frac{\log x}{n}}}{\color{blue}{x \cdot n}} \]
            4. Simplified95.6%

              \[\leadsto \color{blue}{\frac{e^{\frac{\log x}{n}}}{x \cdot n}} \]
            5. Step-by-step derivation
              1. div-inv95.6%

                \[\leadsto \frac{e^{\color{blue}{\log x \cdot \frac{1}{n}}}}{x \cdot n} \]
              2. pow-to-exp95.6%

                \[\leadsto \frac{\color{blue}{{x}^{\left(\frac{1}{n}\right)}}}{x \cdot n} \]
              3. *-un-lft-identity95.6%

                \[\leadsto \frac{\color{blue}{1 \cdot {x}^{\left(\frac{1}{n}\right)}}}{x \cdot n} \]
              4. *-commutative95.6%

                \[\leadsto \frac{1 \cdot {x}^{\left(\frac{1}{n}\right)}}{\color{blue}{n \cdot x}} \]
              5. times-frac98.0%

                \[\leadsto \color{blue}{\frac{1}{n} \cdot \frac{{x}^{\left(\frac{1}{n}\right)}}{x}} \]
            6. Applied egg-rr98.0%

              \[\leadsto \color{blue}{\frac{1}{n} \cdot \frac{{x}^{\left(\frac{1}{n}\right)}}{x}} \]
            7. Step-by-step derivation
              1. associate-*l/98.0%

                \[\leadsto \color{blue}{\frac{1 \cdot \frac{{x}^{\left(\frac{1}{n}\right)}}{x}}{n}} \]
              2. *-un-lft-identity98.0%

                \[\leadsto \frac{\color{blue}{\frac{{x}^{\left(\frac{1}{n}\right)}}{x}}}{n} \]
            8. Applied egg-rr98.0%

              \[\leadsto \color{blue}{\frac{\frac{{x}^{\left(\frac{1}{n}\right)}}{x}}{n}} \]
          3. Recombined 5 regimes into one program.
          4. Final simplification77.0%

            \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq 1.8 \cdot 10^{-255}:\\ \;\;\;\;\left(1 + \frac{x}{n}\right) - {x}^{\left(\frac{1}{n}\right)}\\ \mathbf{elif}\;x \leq 6.6 \cdot 10^{-156}:\\ \;\;\;\;\frac{-\log x}{n}\\ \mathbf{elif}\;x \leq 9.5 \cdot 10^{-137}:\\ \;\;\;\;\left(\left(\frac{0.5}{n \cdot n} - \frac{0.5}{n}\right) \cdot \left(x \cdot x\right) + \left(1 + \frac{x}{n}\right)\right) - {x}^{\left(\frac{1}{n}\right)}\\ \mathbf{elif}\;x \leq 0.044:\\ \;\;\;\;\frac{x - \log x}{n}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{{x}^{\left(\frac{1}{n}\right)}}{x}}{n}\\ \end{array} \]

          Alternative 12: 71.7% accurate, 1.8× speedup?

          \[\begin{array}{l} \\ \begin{array}{l} t_0 := {x}^{\left(\frac{1}{n}\right)}\\ t_1 := 1 - t_0\\ \mathbf{if}\;x \leq 3.4 \cdot 10^{-254}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;x \leq 8 \cdot 10^{-180}:\\ \;\;\;\;\frac{-\log x}{n}\\ \mathbf{elif}\;x \leq 2.3 \cdot 10^{-136}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;x \leq 0.25:\\ \;\;\;\;\frac{x - \log x}{n}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{t_0}{x}}{n}\\ \end{array} \end{array} \]
          (FPCore (x n)
           :precision binary64
           (let* ((t_0 (pow x (/ 1.0 n))) (t_1 (- 1.0 t_0)))
             (if (<= x 3.4e-254)
               t_1
               (if (<= x 8e-180)
                 (/ (- (log x)) n)
                 (if (<= x 2.3e-136)
                   t_1
                   (if (<= x 0.25) (/ (- x (log x)) n) (/ (/ t_0 x) n)))))))
          double code(double x, double n) {
          	double t_0 = pow(x, (1.0 / n));
          	double t_1 = 1.0 - t_0;
          	double tmp;
          	if (x <= 3.4e-254) {
          		tmp = t_1;
          	} else if (x <= 8e-180) {
          		tmp = -log(x) / n;
          	} else if (x <= 2.3e-136) {
          		tmp = t_1;
          	} else if (x <= 0.25) {
          		tmp = (x - log(x)) / n;
          	} else {
          		tmp = (t_0 / x) / n;
          	}
          	return tmp;
          }
          
          real(8) function code(x, n)
              real(8), intent (in) :: x
              real(8), intent (in) :: n
              real(8) :: t_0
              real(8) :: t_1
              real(8) :: tmp
              t_0 = x ** (1.0d0 / n)
              t_1 = 1.0d0 - t_0
              if (x <= 3.4d-254) then
                  tmp = t_1
              else if (x <= 8d-180) then
                  tmp = -log(x) / n
              else if (x <= 2.3d-136) then
                  tmp = t_1
              else if (x <= 0.25d0) then
                  tmp = (x - log(x)) / n
              else
                  tmp = (t_0 / x) / n
              end if
              code = tmp
          end function
          
          public static double code(double x, double n) {
          	double t_0 = Math.pow(x, (1.0 / n));
          	double t_1 = 1.0 - t_0;
          	double tmp;
          	if (x <= 3.4e-254) {
          		tmp = t_1;
          	} else if (x <= 8e-180) {
          		tmp = -Math.log(x) / n;
          	} else if (x <= 2.3e-136) {
          		tmp = t_1;
          	} else if (x <= 0.25) {
          		tmp = (x - Math.log(x)) / n;
          	} else {
          		tmp = (t_0 / x) / n;
          	}
          	return tmp;
          }
          
          def code(x, n):
          	t_0 = math.pow(x, (1.0 / n))
          	t_1 = 1.0 - t_0
          	tmp = 0
          	if x <= 3.4e-254:
          		tmp = t_1
          	elif x <= 8e-180:
          		tmp = -math.log(x) / n
          	elif x <= 2.3e-136:
          		tmp = t_1
          	elif x <= 0.25:
          		tmp = (x - math.log(x)) / n
          	else:
          		tmp = (t_0 / x) / n
          	return tmp
          
          function code(x, n)
          	t_0 = x ^ Float64(1.0 / n)
          	t_1 = Float64(1.0 - t_0)
          	tmp = 0.0
          	if (x <= 3.4e-254)
          		tmp = t_1;
          	elseif (x <= 8e-180)
          		tmp = Float64(Float64(-log(x)) / n);
          	elseif (x <= 2.3e-136)
          		tmp = t_1;
          	elseif (x <= 0.25)
          		tmp = Float64(Float64(x - log(x)) / n);
          	else
          		tmp = Float64(Float64(t_0 / x) / n);
          	end
          	return tmp
          end
          
          function tmp_2 = code(x, n)
          	t_0 = x ^ (1.0 / n);
          	t_1 = 1.0 - t_0;
          	tmp = 0.0;
          	if (x <= 3.4e-254)
          		tmp = t_1;
          	elseif (x <= 8e-180)
          		tmp = -log(x) / n;
          	elseif (x <= 2.3e-136)
          		tmp = t_1;
          	elseif (x <= 0.25)
          		tmp = (x - log(x)) / n;
          	else
          		tmp = (t_0 / x) / n;
          	end
          	tmp_2 = tmp;
          end
          
          code[x_, n_] := Block[{t$95$0 = N[Power[x, N[(1.0 / n), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$1 = N[(1.0 - t$95$0), $MachinePrecision]}, If[LessEqual[x, 3.4e-254], t$95$1, If[LessEqual[x, 8e-180], N[((-N[Log[x], $MachinePrecision]) / n), $MachinePrecision], If[LessEqual[x, 2.3e-136], t$95$1, If[LessEqual[x, 0.25], N[(N[(x - N[Log[x], $MachinePrecision]), $MachinePrecision] / n), $MachinePrecision], N[(N[(t$95$0 / x), $MachinePrecision] / n), $MachinePrecision]]]]]]]
          
          \begin{array}{l}
          
          \\
          \begin{array}{l}
          t_0 := {x}^{\left(\frac{1}{n}\right)}\\
          t_1 := 1 - t_0\\
          \mathbf{if}\;x \leq 3.4 \cdot 10^{-254}:\\
          \;\;\;\;t_1\\
          
          \mathbf{elif}\;x \leq 8 \cdot 10^{-180}:\\
          \;\;\;\;\frac{-\log x}{n}\\
          
          \mathbf{elif}\;x \leq 2.3 \cdot 10^{-136}:\\
          \;\;\;\;t_1\\
          
          \mathbf{elif}\;x \leq 0.25:\\
          \;\;\;\;\frac{x - \log x}{n}\\
          
          \mathbf{else}:\\
          \;\;\;\;\frac{\frac{t_0}{x}}{n}\\
          
          
          \end{array}
          \end{array}
          
          Derivation
          1. Split input into 4 regimes
          2. if x < 3.39999999999999993e-254 or 8.0000000000000002e-180 < x < 2.29999999999999998e-136

            1. Initial program 61.2%

              \[{\left(x + 1\right)}^{\left(\frac{1}{n}\right)} - {x}^{\left(\frac{1}{n}\right)} \]
            2. Taylor expanded in x around 0 61.2%

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

            if 3.39999999999999993e-254 < x < 8.0000000000000002e-180

            1. Initial program 36.6%

              \[{\left(x + 1\right)}^{\left(\frac{1}{n}\right)} - {x}^{\left(\frac{1}{n}\right)} \]
            2. Taylor expanded in x around 0 36.6%

              \[\leadsto \color{blue}{1} - {x}^{\left(\frac{1}{n}\right)} \]
            3. Taylor expanded in n around inf 62.5%

              \[\leadsto \color{blue}{-1 \cdot \frac{\log x}{n}} \]
            4. Step-by-step derivation
              1. mul-1-neg62.5%

                \[\leadsto \color{blue}{-\frac{\log x}{n}} \]
            5. Simplified62.5%

              \[\leadsto \color{blue}{-\frac{\log x}{n}} \]

            if 2.29999999999999998e-136 < x < 0.25

            1. Initial program 29.8%

              \[{\left(x + 1\right)}^{\left(\frac{1}{n}\right)} - {x}^{\left(\frac{1}{n}\right)} \]
            2. Taylor expanded in n around 0 29.8%

              \[\leadsto \color{blue}{e^{\frac{\log \left(1 + x\right)}{n}}} - {x}^{\left(\frac{1}{n}\right)} \]
            3. Step-by-step derivation
              1. log1p-def50.7%

                \[\leadsto e^{\frac{\color{blue}{\mathsf{log1p}\left(x\right)}}{n}} - {x}^{\left(\frac{1}{n}\right)} \]
            4. Simplified50.7%

              \[\leadsto \color{blue}{e^{\frac{\mathsf{log1p}\left(x\right)}{n}}} - {x}^{\left(\frac{1}{n}\right)} \]
            5. Taylor expanded in x around 0 50.7%

              \[\leadsto e^{\color{blue}{\frac{x}{n}}} - {x}^{\left(\frac{1}{n}\right)} \]
            6. Taylor expanded in n around inf 54.4%

              \[\leadsto \color{blue}{\frac{x - \log x}{n}} \]

            if 0.25 < x

            1. Initial program 63.0%

              \[{\left(x + 1\right)}^{\left(\frac{1}{n}\right)} - {x}^{\left(\frac{1}{n}\right)} \]
            2. Taylor expanded in x around inf 95.6%

              \[\leadsto \color{blue}{\frac{e^{-1 \cdot \frac{\log \left(\frac{1}{x}\right)}{n}}}{n \cdot x}} \]
            3. Step-by-step derivation
              1. log-rec95.6%

                \[\leadsto \frac{e^{-1 \cdot \frac{\color{blue}{-\log x}}{n}}}{n \cdot x} \]
              2. mul-1-neg95.6%

                \[\leadsto \frac{e^{-1 \cdot \frac{\color{blue}{-1 \cdot \log x}}{n}}}{n \cdot x} \]
              3. associate-*r/95.6%

                \[\leadsto \frac{e^{\color{blue}{\frac{-1 \cdot \left(-1 \cdot \log x\right)}{n}}}}{n \cdot x} \]
              4. neg-mul-195.6%

                \[\leadsto \frac{e^{\frac{\color{blue}{--1 \cdot \log x}}{n}}}{n \cdot x} \]
              5. mul-1-neg95.6%

                \[\leadsto \frac{e^{\frac{-\color{blue}{\left(-\log x\right)}}{n}}}{n \cdot x} \]
              6. remove-double-neg95.6%

                \[\leadsto \frac{e^{\frac{\color{blue}{\log x}}{n}}}{n \cdot x} \]
              7. *-commutative95.6%

                \[\leadsto \frac{e^{\frac{\log x}{n}}}{\color{blue}{x \cdot n}} \]
            4. Simplified95.6%

              \[\leadsto \color{blue}{\frac{e^{\frac{\log x}{n}}}{x \cdot n}} \]
            5. Step-by-step derivation
              1. div-inv95.6%

                \[\leadsto \frac{e^{\color{blue}{\log x \cdot \frac{1}{n}}}}{x \cdot n} \]
              2. pow-to-exp95.6%

                \[\leadsto \frac{\color{blue}{{x}^{\left(\frac{1}{n}\right)}}}{x \cdot n} \]
              3. *-un-lft-identity95.6%

                \[\leadsto \frac{\color{blue}{1 \cdot {x}^{\left(\frac{1}{n}\right)}}}{x \cdot n} \]
              4. *-commutative95.6%

                \[\leadsto \frac{1 \cdot {x}^{\left(\frac{1}{n}\right)}}{\color{blue}{n \cdot x}} \]
              5. times-frac98.0%

                \[\leadsto \color{blue}{\frac{1}{n} \cdot \frac{{x}^{\left(\frac{1}{n}\right)}}{x}} \]
            6. Applied egg-rr98.0%

              \[\leadsto \color{blue}{\frac{1}{n} \cdot \frac{{x}^{\left(\frac{1}{n}\right)}}{x}} \]
            7. Step-by-step derivation
              1. associate-*l/98.0%

                \[\leadsto \color{blue}{\frac{1 \cdot \frac{{x}^{\left(\frac{1}{n}\right)}}{x}}{n}} \]
              2. *-un-lft-identity98.0%

                \[\leadsto \frac{\color{blue}{\frac{{x}^{\left(\frac{1}{n}\right)}}{x}}}{n} \]
            8. Applied egg-rr98.0%

              \[\leadsto \color{blue}{\frac{\frac{{x}^{\left(\frac{1}{n}\right)}}{x}}{n}} \]
          3. Recombined 4 regimes into one program.
          4. Final simplification76.3%

            \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq 3.4 \cdot 10^{-254}:\\ \;\;\;\;1 - {x}^{\left(\frac{1}{n}\right)}\\ \mathbf{elif}\;x \leq 8 \cdot 10^{-180}:\\ \;\;\;\;\frac{-\log x}{n}\\ \mathbf{elif}\;x \leq 2.3 \cdot 10^{-136}:\\ \;\;\;\;1 - {x}^{\left(\frac{1}{n}\right)}\\ \mathbf{elif}\;x \leq 0.25:\\ \;\;\;\;\frac{x - \log x}{n}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{{x}^{\left(\frac{1}{n}\right)}}{x}}{n}\\ \end{array} \]

          Alternative 13: 71.7% accurate, 1.8× speedup?

          \[\begin{array}{l} \\ \begin{array}{l} t_0 := {x}^{\left(\frac{1}{n}\right)}\\ t_1 := \left(1 + \frac{x}{n}\right) - t_0\\ \mathbf{if}\;x \leq 5.8 \cdot 10^{-253}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;x \leq 6.5 \cdot 10^{-180}:\\ \;\;\;\;\frac{-\log x}{n}\\ \mathbf{elif}\;x \leq 1.1 \cdot 10^{-136}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;x \leq 0.049:\\ \;\;\;\;\frac{x - \log x}{n}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{t_0}{x}}{n}\\ \end{array} \end{array} \]
          (FPCore (x n)
           :precision binary64
           (let* ((t_0 (pow x (/ 1.0 n))) (t_1 (- (+ 1.0 (/ x n)) t_0)))
             (if (<= x 5.8e-253)
               t_1
               (if (<= x 6.5e-180)
                 (/ (- (log x)) n)
                 (if (<= x 1.1e-136)
                   t_1
                   (if (<= x 0.049) (/ (- x (log x)) n) (/ (/ t_0 x) n)))))))
          double code(double x, double n) {
          	double t_0 = pow(x, (1.0 / n));
          	double t_1 = (1.0 + (x / n)) - t_0;
          	double tmp;
          	if (x <= 5.8e-253) {
          		tmp = t_1;
          	} else if (x <= 6.5e-180) {
          		tmp = -log(x) / n;
          	} else if (x <= 1.1e-136) {
          		tmp = t_1;
          	} else if (x <= 0.049) {
          		tmp = (x - log(x)) / n;
          	} else {
          		tmp = (t_0 / x) / n;
          	}
          	return tmp;
          }
          
          real(8) function code(x, n)
              real(8), intent (in) :: x
              real(8), intent (in) :: n
              real(8) :: t_0
              real(8) :: t_1
              real(8) :: tmp
              t_0 = x ** (1.0d0 / n)
              t_1 = (1.0d0 + (x / n)) - t_0
              if (x <= 5.8d-253) then
                  tmp = t_1
              else if (x <= 6.5d-180) then
                  tmp = -log(x) / n
              else if (x <= 1.1d-136) then
                  tmp = t_1
              else if (x <= 0.049d0) then
                  tmp = (x - log(x)) / n
              else
                  tmp = (t_0 / x) / n
              end if
              code = tmp
          end function
          
          public static double code(double x, double n) {
          	double t_0 = Math.pow(x, (1.0 / n));
          	double t_1 = (1.0 + (x / n)) - t_0;
          	double tmp;
          	if (x <= 5.8e-253) {
          		tmp = t_1;
          	} else if (x <= 6.5e-180) {
          		tmp = -Math.log(x) / n;
          	} else if (x <= 1.1e-136) {
          		tmp = t_1;
          	} else if (x <= 0.049) {
          		tmp = (x - Math.log(x)) / n;
          	} else {
          		tmp = (t_0 / x) / n;
          	}
          	return tmp;
          }
          
          def code(x, n):
          	t_0 = math.pow(x, (1.0 / n))
          	t_1 = (1.0 + (x / n)) - t_0
          	tmp = 0
          	if x <= 5.8e-253:
          		tmp = t_1
          	elif x <= 6.5e-180:
          		tmp = -math.log(x) / n
          	elif x <= 1.1e-136:
          		tmp = t_1
          	elif x <= 0.049:
          		tmp = (x - math.log(x)) / n
          	else:
          		tmp = (t_0 / x) / n
          	return tmp
          
          function code(x, n)
          	t_0 = x ^ Float64(1.0 / n)
          	t_1 = Float64(Float64(1.0 + Float64(x / n)) - t_0)
          	tmp = 0.0
          	if (x <= 5.8e-253)
          		tmp = t_1;
          	elseif (x <= 6.5e-180)
          		tmp = Float64(Float64(-log(x)) / n);
          	elseif (x <= 1.1e-136)
          		tmp = t_1;
          	elseif (x <= 0.049)
          		tmp = Float64(Float64(x - log(x)) / n);
          	else
          		tmp = Float64(Float64(t_0 / x) / n);
          	end
          	return tmp
          end
          
          function tmp_2 = code(x, n)
          	t_0 = x ^ (1.0 / n);
          	t_1 = (1.0 + (x / n)) - t_0;
          	tmp = 0.0;
          	if (x <= 5.8e-253)
          		tmp = t_1;
          	elseif (x <= 6.5e-180)
          		tmp = -log(x) / n;
          	elseif (x <= 1.1e-136)
          		tmp = t_1;
          	elseif (x <= 0.049)
          		tmp = (x - log(x)) / n;
          	else
          		tmp = (t_0 / x) / n;
          	end
          	tmp_2 = tmp;
          end
          
          code[x_, n_] := Block[{t$95$0 = N[Power[x, N[(1.0 / n), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$1 = N[(N[(1.0 + N[(x / n), $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]}, If[LessEqual[x, 5.8e-253], t$95$1, If[LessEqual[x, 6.5e-180], N[((-N[Log[x], $MachinePrecision]) / n), $MachinePrecision], If[LessEqual[x, 1.1e-136], t$95$1, If[LessEqual[x, 0.049], N[(N[(x - N[Log[x], $MachinePrecision]), $MachinePrecision] / n), $MachinePrecision], N[(N[(t$95$0 / x), $MachinePrecision] / n), $MachinePrecision]]]]]]]
          
          \begin{array}{l}
          
          \\
          \begin{array}{l}
          t_0 := {x}^{\left(\frac{1}{n}\right)}\\
          t_1 := \left(1 + \frac{x}{n}\right) - t_0\\
          \mathbf{if}\;x \leq 5.8 \cdot 10^{-253}:\\
          \;\;\;\;t_1\\
          
          \mathbf{elif}\;x \leq 6.5 \cdot 10^{-180}:\\
          \;\;\;\;\frac{-\log x}{n}\\
          
          \mathbf{elif}\;x \leq 1.1 \cdot 10^{-136}:\\
          \;\;\;\;t_1\\
          
          \mathbf{elif}\;x \leq 0.049:\\
          \;\;\;\;\frac{x - \log x}{n}\\
          
          \mathbf{else}:\\
          \;\;\;\;\frac{\frac{t_0}{x}}{n}\\
          
          
          \end{array}
          \end{array}
          
          Derivation
          1. Split input into 4 regimes
          2. if x < 5.7999999999999996e-253 or 6.50000000000000013e-180 < x < 1.1000000000000001e-136

            1. Initial program 61.2%

              \[{\left(x + 1\right)}^{\left(\frac{1}{n}\right)} - {x}^{\left(\frac{1}{n}\right)} \]
            2. Taylor expanded in x around 0 61.2%

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

            if 5.7999999999999996e-253 < x < 6.50000000000000013e-180

            1. Initial program 36.6%

              \[{\left(x + 1\right)}^{\left(\frac{1}{n}\right)} - {x}^{\left(\frac{1}{n}\right)} \]
            2. Taylor expanded in x around 0 36.6%

              \[\leadsto \color{blue}{1} - {x}^{\left(\frac{1}{n}\right)} \]
            3. Taylor expanded in n around inf 62.5%

              \[\leadsto \color{blue}{-1 \cdot \frac{\log x}{n}} \]
            4. Step-by-step derivation
              1. mul-1-neg62.5%

                \[\leadsto \color{blue}{-\frac{\log x}{n}} \]
            5. Simplified62.5%

              \[\leadsto \color{blue}{-\frac{\log x}{n}} \]

            if 1.1000000000000001e-136 < x < 0.049000000000000002

            1. Initial program 29.8%

              \[{\left(x + 1\right)}^{\left(\frac{1}{n}\right)} - {x}^{\left(\frac{1}{n}\right)} \]
            2. Taylor expanded in n around 0 29.8%

              \[\leadsto \color{blue}{e^{\frac{\log \left(1 + x\right)}{n}}} - {x}^{\left(\frac{1}{n}\right)} \]
            3. Step-by-step derivation
              1. log1p-def50.7%

                \[\leadsto e^{\frac{\color{blue}{\mathsf{log1p}\left(x\right)}}{n}} - {x}^{\left(\frac{1}{n}\right)} \]
            4. Simplified50.7%

              \[\leadsto \color{blue}{e^{\frac{\mathsf{log1p}\left(x\right)}{n}}} - {x}^{\left(\frac{1}{n}\right)} \]
            5. Taylor expanded in x around 0 50.7%

              \[\leadsto e^{\color{blue}{\frac{x}{n}}} - {x}^{\left(\frac{1}{n}\right)} \]
            6. Taylor expanded in n around inf 54.4%

              \[\leadsto \color{blue}{\frac{x - \log x}{n}} \]

            if 0.049000000000000002 < x

            1. Initial program 63.0%

              \[{\left(x + 1\right)}^{\left(\frac{1}{n}\right)} - {x}^{\left(\frac{1}{n}\right)} \]
            2. Taylor expanded in x around inf 95.6%

              \[\leadsto \color{blue}{\frac{e^{-1 \cdot \frac{\log \left(\frac{1}{x}\right)}{n}}}{n \cdot x}} \]
            3. Step-by-step derivation
              1. log-rec95.6%

                \[\leadsto \frac{e^{-1 \cdot \frac{\color{blue}{-\log x}}{n}}}{n \cdot x} \]
              2. mul-1-neg95.6%

                \[\leadsto \frac{e^{-1 \cdot \frac{\color{blue}{-1 \cdot \log x}}{n}}}{n \cdot x} \]
              3. associate-*r/95.6%

                \[\leadsto \frac{e^{\color{blue}{\frac{-1 \cdot \left(-1 \cdot \log x\right)}{n}}}}{n \cdot x} \]
              4. neg-mul-195.6%

                \[\leadsto \frac{e^{\frac{\color{blue}{--1 \cdot \log x}}{n}}}{n \cdot x} \]
              5. mul-1-neg95.6%

                \[\leadsto \frac{e^{\frac{-\color{blue}{\left(-\log x\right)}}{n}}}{n \cdot x} \]
              6. remove-double-neg95.6%

                \[\leadsto \frac{e^{\frac{\color{blue}{\log x}}{n}}}{n \cdot x} \]
              7. *-commutative95.6%

                \[\leadsto \frac{e^{\frac{\log x}{n}}}{\color{blue}{x \cdot n}} \]
            4. Simplified95.6%

              \[\leadsto \color{blue}{\frac{e^{\frac{\log x}{n}}}{x \cdot n}} \]
            5. Step-by-step derivation
              1. div-inv95.6%

                \[\leadsto \frac{e^{\color{blue}{\log x \cdot \frac{1}{n}}}}{x \cdot n} \]
              2. pow-to-exp95.6%

                \[\leadsto \frac{\color{blue}{{x}^{\left(\frac{1}{n}\right)}}}{x \cdot n} \]
              3. *-un-lft-identity95.6%

                \[\leadsto \frac{\color{blue}{1 \cdot {x}^{\left(\frac{1}{n}\right)}}}{x \cdot n} \]
              4. *-commutative95.6%

                \[\leadsto \frac{1 \cdot {x}^{\left(\frac{1}{n}\right)}}{\color{blue}{n \cdot x}} \]
              5. times-frac98.0%

                \[\leadsto \color{blue}{\frac{1}{n} \cdot \frac{{x}^{\left(\frac{1}{n}\right)}}{x}} \]
            6. Applied egg-rr98.0%

              \[\leadsto \color{blue}{\frac{1}{n} \cdot \frac{{x}^{\left(\frac{1}{n}\right)}}{x}} \]
            7. Step-by-step derivation
              1. associate-*l/98.0%

                \[\leadsto \color{blue}{\frac{1 \cdot \frac{{x}^{\left(\frac{1}{n}\right)}}{x}}{n}} \]
              2. *-un-lft-identity98.0%

                \[\leadsto \frac{\color{blue}{\frac{{x}^{\left(\frac{1}{n}\right)}}{x}}}{n} \]
            8. Applied egg-rr98.0%

              \[\leadsto \color{blue}{\frac{\frac{{x}^{\left(\frac{1}{n}\right)}}{x}}{n}} \]
          3. Recombined 4 regimes into one program.
          4. Final simplification76.3%

            \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq 5.8 \cdot 10^{-253}:\\ \;\;\;\;\left(1 + \frac{x}{n}\right) - {x}^{\left(\frac{1}{n}\right)}\\ \mathbf{elif}\;x \leq 6.5 \cdot 10^{-180}:\\ \;\;\;\;\frac{-\log x}{n}\\ \mathbf{elif}\;x \leq 1.1 \cdot 10^{-136}:\\ \;\;\;\;\left(1 + \frac{x}{n}\right) - {x}^{\left(\frac{1}{n}\right)}\\ \mathbf{elif}\;x \leq 0.049:\\ \;\;\;\;\frac{x - \log x}{n}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{{x}^{\left(\frac{1}{n}\right)}}{x}}{n}\\ \end{array} \]

          Alternative 14: 56.6% accurate, 1.9× speedup?

          \[\begin{array}{l} \\ \begin{array}{l} t_0 := 1 - {x}^{\left(\frac{1}{n}\right)}\\ \mathbf{if}\;x \leq 4.5 \cdot 10^{-255}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;x \leq 7.4 \cdot 10^{-180}:\\ \;\;\;\;\frac{-\log x}{n}\\ \mathbf{elif}\;x \leq 9.5 \cdot 10^{-137}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;x \leq 1:\\ \;\;\;\;\frac{x - \log x}{n}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{1}{n}}{x}\\ \end{array} \end{array} \]
          (FPCore (x n)
           :precision binary64
           (let* ((t_0 (- 1.0 (pow x (/ 1.0 n)))))
             (if (<= x 4.5e-255)
               t_0
               (if (<= x 7.4e-180)
                 (/ (- (log x)) n)
                 (if (<= x 9.5e-137)
                   t_0
                   (if (<= x 1.0) (/ (- x (log x)) n) (/ (/ 1.0 n) x)))))))
          double code(double x, double n) {
          	double t_0 = 1.0 - pow(x, (1.0 / n));
          	double tmp;
          	if (x <= 4.5e-255) {
          		tmp = t_0;
          	} else if (x <= 7.4e-180) {
          		tmp = -log(x) / n;
          	} else if (x <= 9.5e-137) {
          		tmp = t_0;
          	} else if (x <= 1.0) {
          		tmp = (x - log(x)) / n;
          	} else {
          		tmp = (1.0 / n) / x;
          	}
          	return tmp;
          }
          
          real(8) function code(x, n)
              real(8), intent (in) :: x
              real(8), intent (in) :: n
              real(8) :: t_0
              real(8) :: tmp
              t_0 = 1.0d0 - (x ** (1.0d0 / n))
              if (x <= 4.5d-255) then
                  tmp = t_0
              else if (x <= 7.4d-180) then
                  tmp = -log(x) / n
              else if (x <= 9.5d-137) then
                  tmp = t_0
              else if (x <= 1.0d0) then
                  tmp = (x - log(x)) / n
              else
                  tmp = (1.0d0 / n) / x
              end if
              code = tmp
          end function
          
          public static double code(double x, double n) {
          	double t_0 = 1.0 - Math.pow(x, (1.0 / n));
          	double tmp;
          	if (x <= 4.5e-255) {
          		tmp = t_0;
          	} else if (x <= 7.4e-180) {
          		tmp = -Math.log(x) / n;
          	} else if (x <= 9.5e-137) {
          		tmp = t_0;
          	} else if (x <= 1.0) {
          		tmp = (x - Math.log(x)) / n;
          	} else {
          		tmp = (1.0 / n) / x;
          	}
          	return tmp;
          }
          
          def code(x, n):
          	t_0 = 1.0 - math.pow(x, (1.0 / n))
          	tmp = 0
          	if x <= 4.5e-255:
          		tmp = t_0
          	elif x <= 7.4e-180:
          		tmp = -math.log(x) / n
          	elif x <= 9.5e-137:
          		tmp = t_0
          	elif x <= 1.0:
          		tmp = (x - math.log(x)) / n
          	else:
          		tmp = (1.0 / n) / x
          	return tmp
          
          function code(x, n)
          	t_0 = Float64(1.0 - (x ^ Float64(1.0 / n)))
          	tmp = 0.0
          	if (x <= 4.5e-255)
          		tmp = t_0;
          	elseif (x <= 7.4e-180)
          		tmp = Float64(Float64(-log(x)) / n);
          	elseif (x <= 9.5e-137)
          		tmp = t_0;
          	elseif (x <= 1.0)
          		tmp = Float64(Float64(x - log(x)) / n);
          	else
          		tmp = Float64(Float64(1.0 / n) / x);
          	end
          	return tmp
          end
          
          function tmp_2 = code(x, n)
          	t_0 = 1.0 - (x ^ (1.0 / n));
          	tmp = 0.0;
          	if (x <= 4.5e-255)
          		tmp = t_0;
          	elseif (x <= 7.4e-180)
          		tmp = -log(x) / n;
          	elseif (x <= 9.5e-137)
          		tmp = t_0;
          	elseif (x <= 1.0)
          		tmp = (x - log(x)) / n;
          	else
          		tmp = (1.0 / n) / x;
          	end
          	tmp_2 = tmp;
          end
          
          code[x_, n_] := Block[{t$95$0 = N[(1.0 - N[Power[x, N[(1.0 / n), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, 4.5e-255], t$95$0, If[LessEqual[x, 7.4e-180], N[((-N[Log[x], $MachinePrecision]) / n), $MachinePrecision], If[LessEqual[x, 9.5e-137], t$95$0, If[LessEqual[x, 1.0], N[(N[(x - N[Log[x], $MachinePrecision]), $MachinePrecision] / n), $MachinePrecision], N[(N[(1.0 / n), $MachinePrecision] / x), $MachinePrecision]]]]]]
          
          \begin{array}{l}
          
          \\
          \begin{array}{l}
          t_0 := 1 - {x}^{\left(\frac{1}{n}\right)}\\
          \mathbf{if}\;x \leq 4.5 \cdot 10^{-255}:\\
          \;\;\;\;t_0\\
          
          \mathbf{elif}\;x \leq 7.4 \cdot 10^{-180}:\\
          \;\;\;\;\frac{-\log x}{n}\\
          
          \mathbf{elif}\;x \leq 9.5 \cdot 10^{-137}:\\
          \;\;\;\;t_0\\
          
          \mathbf{elif}\;x \leq 1:\\
          \;\;\;\;\frac{x - \log x}{n}\\
          
          \mathbf{else}:\\
          \;\;\;\;\frac{\frac{1}{n}}{x}\\
          
          
          \end{array}
          \end{array}
          
          Derivation
          1. Split input into 4 regimes
          2. if x < 4.49999999999999979e-255 or 7.40000000000000032e-180 < x < 9.5000000000000007e-137

            1. Initial program 61.2%

              \[{\left(x + 1\right)}^{\left(\frac{1}{n}\right)} - {x}^{\left(\frac{1}{n}\right)} \]
            2. Taylor expanded in x around 0 61.2%

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

            if 4.49999999999999979e-255 < x < 7.40000000000000032e-180

            1. Initial program 36.6%

              \[{\left(x + 1\right)}^{\left(\frac{1}{n}\right)} - {x}^{\left(\frac{1}{n}\right)} \]
            2. Taylor expanded in x around 0 36.6%

              \[\leadsto \color{blue}{1} - {x}^{\left(\frac{1}{n}\right)} \]
            3. Taylor expanded in n around inf 62.5%

              \[\leadsto \color{blue}{-1 \cdot \frac{\log x}{n}} \]
            4. Step-by-step derivation
              1. mul-1-neg62.5%

                \[\leadsto \color{blue}{-\frac{\log x}{n}} \]
            5. Simplified62.5%

              \[\leadsto \color{blue}{-\frac{\log x}{n}} \]

            if 9.5000000000000007e-137 < x < 1

            1. Initial program 29.8%

              \[{\left(x + 1\right)}^{\left(\frac{1}{n}\right)} - {x}^{\left(\frac{1}{n}\right)} \]
            2. Taylor expanded in n around 0 29.8%

              \[\leadsto \color{blue}{e^{\frac{\log \left(1 + x\right)}{n}}} - {x}^{\left(\frac{1}{n}\right)} \]
            3. Step-by-step derivation
              1. log1p-def50.7%

                \[\leadsto e^{\frac{\color{blue}{\mathsf{log1p}\left(x\right)}}{n}} - {x}^{\left(\frac{1}{n}\right)} \]
            4. Simplified50.7%

              \[\leadsto \color{blue}{e^{\frac{\mathsf{log1p}\left(x\right)}{n}}} - {x}^{\left(\frac{1}{n}\right)} \]
            5. Taylor expanded in x around 0 50.7%

              \[\leadsto e^{\color{blue}{\frac{x}{n}}} - {x}^{\left(\frac{1}{n}\right)} \]
            6. Taylor expanded in n around inf 54.4%

              \[\leadsto \color{blue}{\frac{x - \log x}{n}} \]

            if 1 < x

            1. Initial program 63.0%

              \[{\left(x + 1\right)}^{\left(\frac{1}{n}\right)} - {x}^{\left(\frac{1}{n}\right)} \]
            2. Taylor expanded in x around inf 95.6%

              \[\leadsto \color{blue}{\frac{e^{-1 \cdot \frac{\log \left(\frac{1}{x}\right)}{n}}}{n \cdot x}} \]
            3. Step-by-step derivation
              1. log-rec95.6%

                \[\leadsto \frac{e^{-1 \cdot \frac{\color{blue}{-\log x}}{n}}}{n \cdot x} \]
              2. mul-1-neg95.6%

                \[\leadsto \frac{e^{-1 \cdot \frac{\color{blue}{-1 \cdot \log x}}{n}}}{n \cdot x} \]
              3. associate-*r/95.6%

                \[\leadsto \frac{e^{\color{blue}{\frac{-1 \cdot \left(-1 \cdot \log x\right)}{n}}}}{n \cdot x} \]
              4. neg-mul-195.6%

                \[\leadsto \frac{e^{\frac{\color{blue}{--1 \cdot \log x}}{n}}}{n \cdot x} \]
              5. mul-1-neg95.6%

                \[\leadsto \frac{e^{\frac{-\color{blue}{\left(-\log x\right)}}{n}}}{n \cdot x} \]
              6. remove-double-neg95.6%

                \[\leadsto \frac{e^{\frac{\color{blue}{\log x}}{n}}}{n \cdot x} \]
              7. *-commutative95.6%

                \[\leadsto \frac{e^{\frac{\log x}{n}}}{\color{blue}{x \cdot n}} \]
            4. Simplified95.6%

              \[\leadsto \color{blue}{\frac{e^{\frac{\log x}{n}}}{x \cdot n}} \]
            5. Step-by-step derivation
              1. div-inv95.6%

                \[\leadsto \frac{e^{\color{blue}{\log x \cdot \frac{1}{n}}}}{x \cdot n} \]
              2. pow-to-exp95.6%

                \[\leadsto \frac{\color{blue}{{x}^{\left(\frac{1}{n}\right)}}}{x \cdot n} \]
              3. *-un-lft-identity95.6%

                \[\leadsto \frac{\color{blue}{1 \cdot {x}^{\left(\frac{1}{n}\right)}}}{x \cdot n} \]
              4. *-commutative95.6%

                \[\leadsto \frac{1 \cdot {x}^{\left(\frac{1}{n}\right)}}{\color{blue}{n \cdot x}} \]
              5. times-frac98.0%

                \[\leadsto \color{blue}{\frac{1}{n} \cdot \frac{{x}^{\left(\frac{1}{n}\right)}}{x}} \]
            6. Applied egg-rr98.0%

              \[\leadsto \color{blue}{\frac{1}{n} \cdot \frac{{x}^{\left(\frac{1}{n}\right)}}{x}} \]
            7. Taylor expanded in n around inf 68.6%

              \[\leadsto \color{blue}{\frac{1}{n \cdot x}} \]
            8. Step-by-step derivation
              1. associate-/r*70.9%

                \[\leadsto \color{blue}{\frac{\frac{1}{n}}{x}} \]
            9. Simplified70.9%

              \[\leadsto \color{blue}{\frac{\frac{1}{n}}{x}} \]
          3. Recombined 4 regimes into one program.
          4. Final simplification64.2%

            \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq 4.5 \cdot 10^{-255}:\\ \;\;\;\;1 - {x}^{\left(\frac{1}{n}\right)}\\ \mathbf{elif}\;x \leq 7.4 \cdot 10^{-180}:\\ \;\;\;\;\frac{-\log x}{n}\\ \mathbf{elif}\;x \leq 9.5 \cdot 10^{-137}:\\ \;\;\;\;1 - {x}^{\left(\frac{1}{n}\right)}\\ \mathbf{elif}\;x \leq 1:\\ \;\;\;\;\frac{x - \log x}{n}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{1}{n}}{x}\\ \end{array} \]

          Alternative 15: 56.5% accurate, 2.0× speedup?

          \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;x \leq 1:\\ \;\;\;\;\frac{x - \log x}{n}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{1}{n}}{x}\\ \end{array} \end{array} \]
          (FPCore (x n)
           :precision binary64
           (if (<= x 1.0) (/ (- x (log x)) n) (/ (/ 1.0 n) x)))
          double code(double x, double n) {
          	double tmp;
          	if (x <= 1.0) {
          		tmp = (x - log(x)) / n;
          	} else {
          		tmp = (1.0 / n) / x;
          	}
          	return tmp;
          }
          
          real(8) function code(x, n)
              real(8), intent (in) :: x
              real(8), intent (in) :: n
              real(8) :: tmp
              if (x <= 1.0d0) then
                  tmp = (x - log(x)) / n
              else
                  tmp = (1.0d0 / n) / x
              end if
              code = tmp
          end function
          
          public static double code(double x, double n) {
          	double tmp;
          	if (x <= 1.0) {
          		tmp = (x - Math.log(x)) / n;
          	} else {
          		tmp = (1.0 / n) / x;
          	}
          	return tmp;
          }
          
          def code(x, n):
          	tmp = 0
          	if x <= 1.0:
          		tmp = (x - math.log(x)) / n
          	else:
          		tmp = (1.0 / n) / x
          	return tmp
          
          function code(x, n)
          	tmp = 0.0
          	if (x <= 1.0)
          		tmp = Float64(Float64(x - log(x)) / n);
          	else
          		tmp = Float64(Float64(1.0 / n) / x);
          	end
          	return tmp
          end
          
          function tmp_2 = code(x, n)
          	tmp = 0.0;
          	if (x <= 1.0)
          		tmp = (x - log(x)) / n;
          	else
          		tmp = (1.0 / n) / x;
          	end
          	tmp_2 = tmp;
          end
          
          code[x_, n_] := If[LessEqual[x, 1.0], N[(N[(x - N[Log[x], $MachinePrecision]), $MachinePrecision] / n), $MachinePrecision], N[(N[(1.0 / n), $MachinePrecision] / x), $MachinePrecision]]
          
          \begin{array}{l}
          
          \\
          \begin{array}{l}
          \mathbf{if}\;x \leq 1:\\
          \;\;\;\;\frac{x - \log x}{n}\\
          
          \mathbf{else}:\\
          \;\;\;\;\frac{\frac{1}{n}}{x}\\
          
          
          \end{array}
          \end{array}
          
          Derivation
          1. Split input into 2 regimes
          2. if x < 1

            1. Initial program 43.1%

              \[{\left(x + 1\right)}^{\left(\frac{1}{n}\right)} - {x}^{\left(\frac{1}{n}\right)} \]
            2. Taylor expanded in n around 0 43.1%

              \[\leadsto \color{blue}{e^{\frac{\log \left(1 + x\right)}{n}}} - {x}^{\left(\frac{1}{n}\right)} \]
            3. Step-by-step derivation
              1. log1p-def54.7%

                \[\leadsto e^{\frac{\color{blue}{\mathsf{log1p}\left(x\right)}}{n}} - {x}^{\left(\frac{1}{n}\right)} \]
            4. Simplified54.7%

              \[\leadsto \color{blue}{e^{\frac{\mathsf{log1p}\left(x\right)}{n}}} - {x}^{\left(\frac{1}{n}\right)} \]
            5. Taylor expanded in x around 0 54.7%

              \[\leadsto e^{\color{blue}{\frac{x}{n}}} - {x}^{\left(\frac{1}{n}\right)} \]
            6. Taylor expanded in n around inf 50.9%

              \[\leadsto \color{blue}{\frac{x - \log x}{n}} \]

            if 1 < x

            1. Initial program 63.0%

              \[{\left(x + 1\right)}^{\left(\frac{1}{n}\right)} - {x}^{\left(\frac{1}{n}\right)} \]
            2. Taylor expanded in x around inf 95.6%

              \[\leadsto \color{blue}{\frac{e^{-1 \cdot \frac{\log \left(\frac{1}{x}\right)}{n}}}{n \cdot x}} \]
            3. Step-by-step derivation
              1. log-rec95.6%

                \[\leadsto \frac{e^{-1 \cdot \frac{\color{blue}{-\log x}}{n}}}{n \cdot x} \]
              2. mul-1-neg95.6%

                \[\leadsto \frac{e^{-1 \cdot \frac{\color{blue}{-1 \cdot \log x}}{n}}}{n \cdot x} \]
              3. associate-*r/95.6%

                \[\leadsto \frac{e^{\color{blue}{\frac{-1 \cdot \left(-1 \cdot \log x\right)}{n}}}}{n \cdot x} \]
              4. neg-mul-195.6%

                \[\leadsto \frac{e^{\frac{\color{blue}{--1 \cdot \log x}}{n}}}{n \cdot x} \]
              5. mul-1-neg95.6%

                \[\leadsto \frac{e^{\frac{-\color{blue}{\left(-\log x\right)}}{n}}}{n \cdot x} \]
              6. remove-double-neg95.6%

                \[\leadsto \frac{e^{\frac{\color{blue}{\log x}}{n}}}{n \cdot x} \]
              7. *-commutative95.6%

                \[\leadsto \frac{e^{\frac{\log x}{n}}}{\color{blue}{x \cdot n}} \]
            4. Simplified95.6%

              \[\leadsto \color{blue}{\frac{e^{\frac{\log x}{n}}}{x \cdot n}} \]
            5. Step-by-step derivation
              1. div-inv95.6%

                \[\leadsto \frac{e^{\color{blue}{\log x \cdot \frac{1}{n}}}}{x \cdot n} \]
              2. pow-to-exp95.6%

                \[\leadsto \frac{\color{blue}{{x}^{\left(\frac{1}{n}\right)}}}{x \cdot n} \]
              3. *-un-lft-identity95.6%

                \[\leadsto \frac{\color{blue}{1 \cdot {x}^{\left(\frac{1}{n}\right)}}}{x \cdot n} \]
              4. *-commutative95.6%

                \[\leadsto \frac{1 \cdot {x}^{\left(\frac{1}{n}\right)}}{\color{blue}{n \cdot x}} \]
              5. times-frac98.0%

                \[\leadsto \color{blue}{\frac{1}{n} \cdot \frac{{x}^{\left(\frac{1}{n}\right)}}{x}} \]
            6. Applied egg-rr98.0%

              \[\leadsto \color{blue}{\frac{1}{n} \cdot \frac{{x}^{\left(\frac{1}{n}\right)}}{x}} \]
            7. Taylor expanded in n around inf 68.6%

              \[\leadsto \color{blue}{\frac{1}{n \cdot x}} \]
            8. Step-by-step derivation
              1. associate-/r*70.9%

                \[\leadsto \color{blue}{\frac{\frac{1}{n}}{x}} \]
            9. Simplified70.9%

              \[\leadsto \color{blue}{\frac{\frac{1}{n}}{x}} \]
          3. Recombined 2 regimes into one program.
          4. Final simplification59.8%

            \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq 1:\\ \;\;\;\;\frac{x - \log x}{n}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{1}{n}}{x}\\ \end{array} \]

          Alternative 16: 56.2% accurate, 2.0× speedup?

          \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;x \leq 0.55:\\ \;\;\;\;\frac{-\log x}{n}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{1}{n}}{x}\\ \end{array} \end{array} \]
          (FPCore (x n)
           :precision binary64
           (if (<= x 0.55) (/ (- (log x)) n) (/ (/ 1.0 n) x)))
          double code(double x, double n) {
          	double tmp;
          	if (x <= 0.55) {
          		tmp = -log(x) / n;
          	} else {
          		tmp = (1.0 / n) / x;
          	}
          	return tmp;
          }
          
          real(8) function code(x, n)
              real(8), intent (in) :: x
              real(8), intent (in) :: n
              real(8) :: tmp
              if (x <= 0.55d0) then
                  tmp = -log(x) / n
              else
                  tmp = (1.0d0 / n) / x
              end if
              code = tmp
          end function
          
          public static double code(double x, double n) {
          	double tmp;
          	if (x <= 0.55) {
          		tmp = -Math.log(x) / n;
          	} else {
          		tmp = (1.0 / n) / x;
          	}
          	return tmp;
          }
          
          def code(x, n):
          	tmp = 0
          	if x <= 0.55:
          		tmp = -math.log(x) / n
          	else:
          		tmp = (1.0 / n) / x
          	return tmp
          
          function code(x, n)
          	tmp = 0.0
          	if (x <= 0.55)
          		tmp = Float64(Float64(-log(x)) / n);
          	else
          		tmp = Float64(Float64(1.0 / n) / x);
          	end
          	return tmp
          end
          
          function tmp_2 = code(x, n)
          	tmp = 0.0;
          	if (x <= 0.55)
          		tmp = -log(x) / n;
          	else
          		tmp = (1.0 / n) / x;
          	end
          	tmp_2 = tmp;
          end
          
          code[x_, n_] := If[LessEqual[x, 0.55], N[((-N[Log[x], $MachinePrecision]) / n), $MachinePrecision], N[(N[(1.0 / n), $MachinePrecision] / x), $MachinePrecision]]
          
          \begin{array}{l}
          
          \\
          \begin{array}{l}
          \mathbf{if}\;x \leq 0.55:\\
          \;\;\;\;\frac{-\log x}{n}\\
          
          \mathbf{else}:\\
          \;\;\;\;\frac{\frac{1}{n}}{x}\\
          
          
          \end{array}
          \end{array}
          
          Derivation
          1. Split input into 2 regimes
          2. if x < 0.55000000000000004

            1. Initial program 43.1%

              \[{\left(x + 1\right)}^{\left(\frac{1}{n}\right)} - {x}^{\left(\frac{1}{n}\right)} \]
            2. Taylor expanded in x around 0 42.4%

              \[\leadsto \color{blue}{1} - {x}^{\left(\frac{1}{n}\right)} \]
            3. Taylor expanded in n around inf 50.8%

              \[\leadsto \color{blue}{-1 \cdot \frac{\log x}{n}} \]
            4. Step-by-step derivation
              1. mul-1-neg50.8%

                \[\leadsto \color{blue}{-\frac{\log x}{n}} \]
            5. Simplified50.8%

              \[\leadsto \color{blue}{-\frac{\log x}{n}} \]

            if 0.55000000000000004 < x

            1. Initial program 63.0%

              \[{\left(x + 1\right)}^{\left(\frac{1}{n}\right)} - {x}^{\left(\frac{1}{n}\right)} \]
            2. Taylor expanded in x around inf 95.6%

              \[\leadsto \color{blue}{\frac{e^{-1 \cdot \frac{\log \left(\frac{1}{x}\right)}{n}}}{n \cdot x}} \]
            3. Step-by-step derivation
              1. log-rec95.6%

                \[\leadsto \frac{e^{-1 \cdot \frac{\color{blue}{-\log x}}{n}}}{n \cdot x} \]
              2. mul-1-neg95.6%

                \[\leadsto \frac{e^{-1 \cdot \frac{\color{blue}{-1 \cdot \log x}}{n}}}{n \cdot x} \]
              3. associate-*r/95.6%

                \[\leadsto \frac{e^{\color{blue}{\frac{-1 \cdot \left(-1 \cdot \log x\right)}{n}}}}{n \cdot x} \]
              4. neg-mul-195.6%

                \[\leadsto \frac{e^{\frac{\color{blue}{--1 \cdot \log x}}{n}}}{n \cdot x} \]
              5. mul-1-neg95.6%

                \[\leadsto \frac{e^{\frac{-\color{blue}{\left(-\log x\right)}}{n}}}{n \cdot x} \]
              6. remove-double-neg95.6%

                \[\leadsto \frac{e^{\frac{\color{blue}{\log x}}{n}}}{n \cdot x} \]
              7. *-commutative95.6%

                \[\leadsto \frac{e^{\frac{\log x}{n}}}{\color{blue}{x \cdot n}} \]
            4. Simplified95.6%

              \[\leadsto \color{blue}{\frac{e^{\frac{\log x}{n}}}{x \cdot n}} \]
            5. Step-by-step derivation
              1. div-inv95.6%

                \[\leadsto \frac{e^{\color{blue}{\log x \cdot \frac{1}{n}}}}{x \cdot n} \]
              2. pow-to-exp95.6%

                \[\leadsto \frac{\color{blue}{{x}^{\left(\frac{1}{n}\right)}}}{x \cdot n} \]
              3. *-un-lft-identity95.6%

                \[\leadsto \frac{\color{blue}{1 \cdot {x}^{\left(\frac{1}{n}\right)}}}{x \cdot n} \]
              4. *-commutative95.6%

                \[\leadsto \frac{1 \cdot {x}^{\left(\frac{1}{n}\right)}}{\color{blue}{n \cdot x}} \]
              5. times-frac98.0%

                \[\leadsto \color{blue}{\frac{1}{n} \cdot \frac{{x}^{\left(\frac{1}{n}\right)}}{x}} \]
            6. Applied egg-rr98.0%

              \[\leadsto \color{blue}{\frac{1}{n} \cdot \frac{{x}^{\left(\frac{1}{n}\right)}}{x}} \]
            7. Taylor expanded in n around inf 68.6%

              \[\leadsto \color{blue}{\frac{1}{n \cdot x}} \]
            8. Step-by-step derivation
              1. associate-/r*70.9%

                \[\leadsto \color{blue}{\frac{\frac{1}{n}}{x}} \]
            9. Simplified70.9%

              \[\leadsto \color{blue}{\frac{\frac{1}{n}}{x}} \]
          3. Recombined 2 regimes into one program.
          4. Final simplification59.8%

            \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq 0.55:\\ \;\;\;\;\frac{-\log x}{n}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{1}{n}}{x}\\ \end{array} \]

          Alternative 17: 40.1% accurate, 42.2× speedup?

          \[\begin{array}{l} \\ \frac{1}{n \cdot x} \end{array} \]
          (FPCore (x n) :precision binary64 (/ 1.0 (* n x)))
          double code(double x, double n) {
          	return 1.0 / (n * x);
          }
          
          real(8) function code(x, n)
              real(8), intent (in) :: x
              real(8), intent (in) :: n
              code = 1.0d0 / (n * x)
          end function
          
          public static double code(double x, double n) {
          	return 1.0 / (n * x);
          }
          
          def code(x, n):
          	return 1.0 / (n * x)
          
          function code(x, n)
          	return Float64(1.0 / Float64(n * x))
          end
          
          function tmp = code(x, n)
          	tmp = 1.0 / (n * x);
          end
          
          code[x_, n_] := N[(1.0 / N[(n * x), $MachinePrecision]), $MachinePrecision]
          
          \begin{array}{l}
          
          \\
          \frac{1}{n \cdot x}
          \end{array}
          
          Derivation
          1. Initial program 52.0%

            \[{\left(x + 1\right)}^{\left(\frac{1}{n}\right)} - {x}^{\left(\frac{1}{n}\right)} \]
          2. Taylor expanded in x around inf 59.5%

            \[\leadsto \color{blue}{\frac{e^{-1 \cdot \frac{\log \left(\frac{1}{x}\right)}{n}}}{n \cdot x}} \]
          3. Step-by-step derivation
            1. log-rec59.5%

              \[\leadsto \frac{e^{-1 \cdot \frac{\color{blue}{-\log x}}{n}}}{n \cdot x} \]
            2. mul-1-neg59.5%

              \[\leadsto \frac{e^{-1 \cdot \frac{\color{blue}{-1 \cdot \log x}}{n}}}{n \cdot x} \]
            3. associate-*r/59.5%

              \[\leadsto \frac{e^{\color{blue}{\frac{-1 \cdot \left(-1 \cdot \log x\right)}{n}}}}{n \cdot x} \]
            4. neg-mul-159.5%

              \[\leadsto \frac{e^{\frac{\color{blue}{--1 \cdot \log x}}{n}}}{n \cdot x} \]
            5. mul-1-neg59.5%

              \[\leadsto \frac{e^{\frac{-\color{blue}{\left(-\log x\right)}}{n}}}{n \cdot x} \]
            6. remove-double-neg59.5%

              \[\leadsto \frac{e^{\frac{\color{blue}{\log x}}{n}}}{n \cdot x} \]
            7. *-commutative59.5%

              \[\leadsto \frac{e^{\frac{\log x}{n}}}{\color{blue}{x \cdot n}} \]
          4. Simplified59.5%

            \[\leadsto \color{blue}{\frac{e^{\frac{\log x}{n}}}{x \cdot n}} \]
          5. Taylor expanded in n around inf 42.7%

            \[\leadsto \color{blue}{\frac{1}{n \cdot x}} \]
          6. Step-by-step derivation
            1. *-commutative42.7%

              \[\leadsto \frac{1}{\color{blue}{x \cdot n}} \]
          7. Simplified42.7%

            \[\leadsto \color{blue}{\frac{1}{x \cdot n}} \]
          8. Final simplification42.7%

            \[\leadsto \frac{1}{n \cdot x} \]

          Alternative 18: 40.6% accurate, 42.2× speedup?

          \[\begin{array}{l} \\ \frac{\frac{1}{n}}{x} \end{array} \]
          (FPCore (x n) :precision binary64 (/ (/ 1.0 n) x))
          double code(double x, double n) {
          	return (1.0 / n) / x;
          }
          
          real(8) function code(x, n)
              real(8), intent (in) :: x
              real(8), intent (in) :: n
              code = (1.0d0 / n) / x
          end function
          
          public static double code(double x, double n) {
          	return (1.0 / n) / x;
          }
          
          def code(x, n):
          	return (1.0 / n) / x
          
          function code(x, n)
          	return Float64(Float64(1.0 / n) / x)
          end
          
          function tmp = code(x, n)
          	tmp = (1.0 / n) / x;
          end
          
          code[x_, n_] := N[(N[(1.0 / n), $MachinePrecision] / x), $MachinePrecision]
          
          \begin{array}{l}
          
          \\
          \frac{\frac{1}{n}}{x}
          \end{array}
          
          Derivation
          1. Initial program 52.0%

            \[{\left(x + 1\right)}^{\left(\frac{1}{n}\right)} - {x}^{\left(\frac{1}{n}\right)} \]
          2. Taylor expanded in x around inf 59.5%

            \[\leadsto \color{blue}{\frac{e^{-1 \cdot \frac{\log \left(\frac{1}{x}\right)}{n}}}{n \cdot x}} \]
          3. Step-by-step derivation
            1. log-rec59.5%

              \[\leadsto \frac{e^{-1 \cdot \frac{\color{blue}{-\log x}}{n}}}{n \cdot x} \]
            2. mul-1-neg59.5%

              \[\leadsto \frac{e^{-1 \cdot \frac{\color{blue}{-1 \cdot \log x}}{n}}}{n \cdot x} \]
            3. associate-*r/59.5%

              \[\leadsto \frac{e^{\color{blue}{\frac{-1 \cdot \left(-1 \cdot \log x\right)}{n}}}}{n \cdot x} \]
            4. neg-mul-159.5%

              \[\leadsto \frac{e^{\frac{\color{blue}{--1 \cdot \log x}}{n}}}{n \cdot x} \]
            5. mul-1-neg59.5%

              \[\leadsto \frac{e^{\frac{-\color{blue}{\left(-\log x\right)}}{n}}}{n \cdot x} \]
            6. remove-double-neg59.5%

              \[\leadsto \frac{e^{\frac{\color{blue}{\log x}}{n}}}{n \cdot x} \]
            7. *-commutative59.5%

              \[\leadsto \frac{e^{\frac{\log x}{n}}}{\color{blue}{x \cdot n}} \]
          4. Simplified59.5%

            \[\leadsto \color{blue}{\frac{e^{\frac{\log x}{n}}}{x \cdot n}} \]
          5. Step-by-step derivation
            1. div-inv59.5%

              \[\leadsto \frac{e^{\color{blue}{\log x \cdot \frac{1}{n}}}}{x \cdot n} \]
            2. pow-to-exp59.5%

              \[\leadsto \frac{\color{blue}{{x}^{\left(\frac{1}{n}\right)}}}{x \cdot n} \]
            3. *-un-lft-identity59.5%

              \[\leadsto \frac{\color{blue}{1 \cdot {x}^{\left(\frac{1}{n}\right)}}}{x \cdot n} \]
            4. *-commutative59.5%

              \[\leadsto \frac{1 \cdot {x}^{\left(\frac{1}{n}\right)}}{\color{blue}{n \cdot x}} \]
            5. times-frac60.7%

              \[\leadsto \color{blue}{\frac{1}{n} \cdot \frac{{x}^{\left(\frac{1}{n}\right)}}{x}} \]
          6. Applied egg-rr60.7%

            \[\leadsto \color{blue}{\frac{1}{n} \cdot \frac{{x}^{\left(\frac{1}{n}\right)}}{x}} \]
          7. Taylor expanded in n around inf 42.7%

            \[\leadsto \color{blue}{\frac{1}{n \cdot x}} \]
          8. Step-by-step derivation
            1. associate-/r*43.8%

              \[\leadsto \color{blue}{\frac{\frac{1}{n}}{x}} \]
          9. Simplified43.8%

            \[\leadsto \color{blue}{\frac{\frac{1}{n}}{x}} \]
          10. Final simplification43.8%

            \[\leadsto \frac{\frac{1}{n}}{x} \]

          Alternative 19: 3.2% accurate, 70.3× speedup?

          \[\begin{array}{l} \\ n \cdot x \end{array} \]
          (FPCore (x n) :precision binary64 (* n x))
          double code(double x, double n) {
          	return n * x;
          }
          
          real(8) function code(x, n)
              real(8), intent (in) :: x
              real(8), intent (in) :: n
              code = n * x
          end function
          
          public static double code(double x, double n) {
          	return n * x;
          }
          
          def code(x, n):
          	return n * x
          
          function code(x, n)
          	return Float64(n * x)
          end
          
          function tmp = code(x, n)
          	tmp = n * x;
          end
          
          code[x_, n_] := N[(n * x), $MachinePrecision]
          
          \begin{array}{l}
          
          \\
          n \cdot x
          \end{array}
          
          Derivation
          1. Initial program 52.0%

            \[{\left(x + 1\right)}^{\left(\frac{1}{n}\right)} - {x}^{\left(\frac{1}{n}\right)} \]
          2. Taylor expanded in x around inf 59.5%

            \[\leadsto \color{blue}{\frac{e^{-1 \cdot \frac{\log \left(\frac{1}{x}\right)}{n}}}{n \cdot x}} \]
          3. Step-by-step derivation
            1. log-rec59.5%

              \[\leadsto \frac{e^{-1 \cdot \frac{\color{blue}{-\log x}}{n}}}{n \cdot x} \]
            2. mul-1-neg59.5%

              \[\leadsto \frac{e^{-1 \cdot \frac{\color{blue}{-1 \cdot \log x}}{n}}}{n \cdot x} \]
            3. associate-*r/59.5%

              \[\leadsto \frac{e^{\color{blue}{\frac{-1 \cdot \left(-1 \cdot \log x\right)}{n}}}}{n \cdot x} \]
            4. neg-mul-159.5%

              \[\leadsto \frac{e^{\frac{\color{blue}{--1 \cdot \log x}}{n}}}{n \cdot x} \]
            5. mul-1-neg59.5%

              \[\leadsto \frac{e^{\frac{-\color{blue}{\left(-\log x\right)}}{n}}}{n \cdot x} \]
            6. remove-double-neg59.5%

              \[\leadsto \frac{e^{\frac{\color{blue}{\log x}}{n}}}{n \cdot x} \]
            7. *-commutative59.5%

              \[\leadsto \frac{e^{\frac{\log x}{n}}}{\color{blue}{x \cdot n}} \]
          4. Simplified59.5%

            \[\leadsto \color{blue}{\frac{e^{\frac{\log x}{n}}}{x \cdot n}} \]
          5. Step-by-step derivation
            1. div-inv59.5%

              \[\leadsto \frac{e^{\color{blue}{\log x \cdot \frac{1}{n}}}}{x \cdot n} \]
            2. pow-to-exp59.5%

              \[\leadsto \frac{\color{blue}{{x}^{\left(\frac{1}{n}\right)}}}{x \cdot n} \]
            3. *-un-lft-identity59.5%

              \[\leadsto \frac{\color{blue}{1 \cdot {x}^{\left(\frac{1}{n}\right)}}}{x \cdot n} \]
            4. *-commutative59.5%

              \[\leadsto \frac{1 \cdot {x}^{\left(\frac{1}{n}\right)}}{\color{blue}{n \cdot x}} \]
            5. times-frac60.7%

              \[\leadsto \color{blue}{\frac{1}{n} \cdot \frac{{x}^{\left(\frac{1}{n}\right)}}{x}} \]
          6. Applied egg-rr60.7%

            \[\leadsto \color{blue}{\frac{1}{n} \cdot \frac{{x}^{\left(\frac{1}{n}\right)}}{x}} \]
          7. Taylor expanded in n around inf 42.7%

            \[\leadsto \color{blue}{\frac{1}{n \cdot x}} \]
          8. Step-by-step derivation
            1. associate-/r*43.8%

              \[\leadsto \color{blue}{\frac{\frac{1}{n}}{x}} \]
          9. Simplified43.8%

            \[\leadsto \color{blue}{\frac{\frac{1}{n}}{x}} \]
          10. Step-by-step derivation
            1. associate-/l/42.7%

              \[\leadsto \color{blue}{\frac{1}{x \cdot n}} \]
            2. *-commutative42.7%

              \[\leadsto \frac{1}{\color{blue}{n \cdot x}} \]
            3. add-exp-log21.1%

              \[\leadsto \frac{1}{\color{blue}{e^{\log \left(n \cdot x\right)}}} \]
            4. exp-neg21.1%

              \[\leadsto \color{blue}{e^{-\log \left(n \cdot x\right)}} \]
            5. expm1-log1p-u21.1%

              \[\leadsto \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(e^{-\log \left(n \cdot x\right)}\right)\right)} \]
            6. expm1-udef12.8%

              \[\leadsto \color{blue}{e^{\mathsf{log1p}\left(e^{-\log \left(n \cdot x\right)}\right)} - 1} \]
            7. add-sqr-sqrt3.7%

              \[\leadsto e^{\mathsf{log1p}\left(e^{\color{blue}{\sqrt{-\log \left(n \cdot x\right)} \cdot \sqrt{-\log \left(n \cdot x\right)}}}\right)} - 1 \]
            8. sqrt-unprod4.4%

              \[\leadsto e^{\mathsf{log1p}\left(e^{\color{blue}{\sqrt{\left(-\log \left(n \cdot x\right)\right) \cdot \left(-\log \left(n \cdot x\right)\right)}}}\right)} - 1 \]
            9. sqr-neg4.4%

              \[\leadsto e^{\mathsf{log1p}\left(e^{\sqrt{\color{blue}{\log \left(n \cdot x\right) \cdot \log \left(n \cdot x\right)}}}\right)} - 1 \]
            10. sqrt-unprod0.6%

              \[\leadsto e^{\mathsf{log1p}\left(e^{\color{blue}{\sqrt{\log \left(n \cdot x\right)} \cdot \sqrt{\log \left(n \cdot x\right)}}}\right)} - 1 \]
            11. add-sqr-sqrt1.2%

              \[\leadsto e^{\mathsf{log1p}\left(e^{\color{blue}{\log \left(n \cdot x\right)}}\right)} - 1 \]
            12. add-exp-log7.9%

              \[\leadsto e^{\mathsf{log1p}\left(\color{blue}{n \cdot x}\right)} - 1 \]
            13. *-commutative7.9%

              \[\leadsto e^{\mathsf{log1p}\left(\color{blue}{x \cdot n}\right)} - 1 \]
          11. Applied egg-rr7.9%

            \[\leadsto \color{blue}{e^{\mathsf{log1p}\left(x \cdot n\right)} - 1} \]
          12. Step-by-step derivation
            1. expm1-def2.4%

              \[\leadsto \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(x \cdot n\right)\right)} \]
            2. expm1-log1p3.1%

              \[\leadsto \color{blue}{x \cdot n} \]
          13. Simplified3.1%

            \[\leadsto \color{blue}{x \cdot n} \]
          14. Final simplification3.1%

            \[\leadsto n \cdot x \]

          Reproduce

          ?
          herbie shell --seed 2023257 
          (FPCore (x n)
            :name "2nthrt (problem 3.4.6)"
            :precision binary64
            (- (pow (+ x 1.0) (/ 1.0 n)) (pow x (/ 1.0 n))))