2nthrt (problem 3.4.6)

Percentage Accurate: 54.4% → 85.3%
Time: 1.1min
Alternatives: 21
Speedup: 1.6×

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 21 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: 54.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: 85.3% accurate, 0.6× speedup?

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

\\
\begin{array}{l}
t_0 := {x}^{\left(\frac{1}{n}\right)}\\
\mathbf{if}\;\frac{1}{n} \leq -2 \cdot 10^{-77}:\\
\;\;\;\;\frac{{x}^{\left(\frac{1}{n} + -1\right)}}{n}\\

\mathbf{elif}\;\frac{1}{n} \leq 5 \cdot 10^{-80}:\\
\;\;\;\;\frac{\mathsf{log1p}\left(x\right) - \log x}{n}\\

\mathbf{elif}\;\frac{1}{n} \leq 2 \cdot 10^{-5}:\\
\;\;\;\;\frac{\frac{t\_0}{n} + t\_0 \cdot \frac{\frac{0.5}{{n}^{2}} + \frac{-0.5}{n}}{x}}{x}\\

\mathbf{else}:\\
\;\;\;\;e^{\frac{\mathsf{log1p}\left(x\right)}{n}} - t\_0\\


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if (/.f64 #s(literal 1 binary64) n) < -1.9999999999999999e-77

    1. Initial program 85.2%

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

      \[\leadsto \color{blue}{\frac{e^{-1 \cdot \frac{\log \left(\frac{1}{x}\right)}{n}}}{n \cdot x}} \]
    4. Step-by-step derivation
      1. mul-1-neg91.8%

        \[\leadsto \frac{e^{\color{blue}{-\frac{\log \left(\frac{1}{x}\right)}{n}}}}{n \cdot x} \]
      2. log-rec91.8%

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

        \[\leadsto \frac{e^{-\frac{\color{blue}{-1 \cdot \log x}}{n}}}{n \cdot x} \]
      4. distribute-neg-frac91.8%

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

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

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

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

      \[\leadsto \color{blue}{\frac{e^{\frac{\log x}{n}}}{x \cdot n}} \]
    6. Step-by-step derivation
      1. *-un-lft-identity91.8%

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

        \[\leadsto 1 \cdot \color{blue}{\frac{\frac{e^{\frac{\log x}{n}}}{x}}{n}} \]
      3. div-inv92.6%

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

        \[\leadsto 1 \cdot \frac{\frac{\color{blue}{{x}^{\left(\frac{1}{n}\right)}}}{x}}{n} \]
      5. pow192.6%

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

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

      \[\leadsto \color{blue}{1 \cdot \frac{{x}^{\left(\frac{1}{n} - 1\right)}}{n}} \]
    8. Step-by-step derivation
      1. *-lft-identity92.6%

        \[\leadsto \color{blue}{\frac{{x}^{\left(\frac{1}{n} - 1\right)}}{n}} \]
      2. sub-neg92.6%

        \[\leadsto \frac{{x}^{\color{blue}{\left(\frac{1}{n} + \left(-1\right)\right)}}}{n} \]
      3. metadata-eval92.6%

        \[\leadsto \frac{{x}^{\left(\frac{1}{n} + \color{blue}{-1}\right)}}{n} \]
    9. Simplified92.6%

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

    if -1.9999999999999999e-77 < (/.f64 #s(literal 1 binary64) n) < 5e-80

    1. Initial program 33.4%

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

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

        \[\leadsto \frac{\color{blue}{\mathsf{log1p}\left(x\right)} - \log x}{n} \]
    5. Simplified88.2%

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

    if 5e-80 < (/.f64 #s(literal 1 binary64) n) < 2.00000000000000016e-5

    1. Initial program 13.2%

      \[{\left(x + 1\right)}^{\left(\frac{1}{n}\right)} - {x}^{\left(\frac{1}{n}\right)} \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. add-log-exp12.9%

        \[\leadsto \color{blue}{\log \left(e^{{\left(x + 1\right)}^{\left(\frac{1}{n}\right)} - {x}^{\left(\frac{1}{n}\right)}}\right)} \]
      2. pow-to-exp12.9%

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

        \[\leadsto \log \left(e^{e^{\color{blue}{\frac{\log \left(x + 1\right)}{n}}} - {x}^{\left(\frac{1}{n}\right)}}\right) \]
      4. +-commutative12.9%

        \[\leadsto \log \left(e^{e^{\frac{\log \color{blue}{\left(1 + x\right)}}{n}} - {x}^{\left(\frac{1}{n}\right)}}\right) \]
      5. log1p-define12.9%

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

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

      \[\leadsto \color{blue}{\frac{\frac{e^{-1 \cdot \frac{\log \left(\frac{1}{x}\right)}{n}}}{n} + \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}}{x}} \]
    6. Step-by-step derivation
      1. Simplified85.0%

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

      if 2.00000000000000016e-5 < (/.f64 #s(literal 1 binary64) n)

      1. Initial program 67.8%

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

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

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

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

      \[\leadsto \begin{array}{l} \mathbf{if}\;\frac{1}{n} \leq -2 \cdot 10^{-77}:\\ \;\;\;\;\frac{{x}^{\left(\frac{1}{n} + -1\right)}}{n}\\ \mathbf{elif}\;\frac{1}{n} \leq 5 \cdot 10^{-80}:\\ \;\;\;\;\frac{\mathsf{log1p}\left(x\right) - \log x}{n}\\ \mathbf{elif}\;\frac{1}{n} \leq 2 \cdot 10^{-5}:\\ \;\;\;\;\frac{\frac{{x}^{\left(\frac{1}{n}\right)}}{n} + {x}^{\left(\frac{1}{n}\right)} \cdot \frac{\frac{0.5}{{n}^{2}} + \frac{-0.5}{n}}{x}}{x}\\ \mathbf{else}:\\ \;\;\;\;e^{\frac{\mathsf{log1p}\left(x\right)}{n}} - {x}^{\left(\frac{1}{n}\right)}\\ \end{array} \]
    9. Add Preprocessing

    Alternative 2: 86.3% accurate, 0.2× speedup?

    \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;x \leq 3.5:\\ \;\;\;\;\frac{\left(\mathsf{log1p}\left(x\right) + \frac{0.5 \cdot \left({\left(\mathsf{log1p}\left(x\right)\right)}^{2} - {\log x}^{2}\right) + 0.16666666666666666 \cdot \frac{{\left(\mathsf{log1p}\left(x\right)\right)}^{3} - {\log x}^{3}}{n}}{n}\right) - \log x}{n}\\ \mathbf{else}:\\ \;\;\;\;\frac{{x}^{\left(\frac{1}{n} + -1\right)}}{n}\\ \end{array} \end{array} \]
    (FPCore (x n)
     :precision binary64
     (if (<= x 3.5)
       (/
        (-
         (+
          (log1p x)
          (/
           (+
            (* 0.5 (- (pow (log1p x) 2.0) (pow (log x) 2.0)))
            (*
             0.16666666666666666
             (/ (- (pow (log1p x) 3.0) (pow (log x) 3.0)) n)))
           n))
         (log x))
        n)
       (/ (pow x (+ (/ 1.0 n) -1.0)) n)))
    double code(double x, double n) {
    	double tmp;
    	if (x <= 3.5) {
    		tmp = ((log1p(x) + (((0.5 * (pow(log1p(x), 2.0) - pow(log(x), 2.0))) + (0.16666666666666666 * ((pow(log1p(x), 3.0) - pow(log(x), 3.0)) / n))) / n)) - log(x)) / n;
    	} else {
    		tmp = pow(x, ((1.0 / n) + -1.0)) / n;
    	}
    	return tmp;
    }
    
    public static double code(double x, double n) {
    	double tmp;
    	if (x <= 3.5) {
    		tmp = ((Math.log1p(x) + (((0.5 * (Math.pow(Math.log1p(x), 2.0) - Math.pow(Math.log(x), 2.0))) + (0.16666666666666666 * ((Math.pow(Math.log1p(x), 3.0) - Math.pow(Math.log(x), 3.0)) / n))) / n)) - Math.log(x)) / n;
    	} else {
    		tmp = Math.pow(x, ((1.0 / n) + -1.0)) / n;
    	}
    	return tmp;
    }
    
    def code(x, n):
    	tmp = 0
    	if x <= 3.5:
    		tmp = ((math.log1p(x) + (((0.5 * (math.pow(math.log1p(x), 2.0) - math.pow(math.log(x), 2.0))) + (0.16666666666666666 * ((math.pow(math.log1p(x), 3.0) - math.pow(math.log(x), 3.0)) / n))) / n)) - math.log(x)) / n
    	else:
    		tmp = math.pow(x, ((1.0 / n) + -1.0)) / n
    	return tmp
    
    function code(x, n)
    	tmp = 0.0
    	if (x <= 3.5)
    		tmp = Float64(Float64(Float64(log1p(x) + Float64(Float64(Float64(0.5 * Float64((log1p(x) ^ 2.0) - (log(x) ^ 2.0))) + Float64(0.16666666666666666 * Float64(Float64((log1p(x) ^ 3.0) - (log(x) ^ 3.0)) / n))) / n)) - log(x)) / n);
    	else
    		tmp = Float64((x ^ Float64(Float64(1.0 / n) + -1.0)) / n);
    	end
    	return tmp
    end
    
    code[x_, n_] := If[LessEqual[x, 3.5], N[(N[(N[(N[Log[1 + x], $MachinePrecision] + N[(N[(N[(0.5 * N[(N[Power[N[Log[1 + x], $MachinePrecision], 2.0], $MachinePrecision] - N[Power[N[Log[x], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(0.16666666666666666 * N[(N[(N[Power[N[Log[1 + x], $MachinePrecision], 3.0], $MachinePrecision] - N[Power[N[Log[x], $MachinePrecision], 3.0], $MachinePrecision]), $MachinePrecision] / n), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / n), $MachinePrecision]), $MachinePrecision] - N[Log[x], $MachinePrecision]), $MachinePrecision] / n), $MachinePrecision], N[(N[Power[x, N[(N[(1.0 / n), $MachinePrecision] + -1.0), $MachinePrecision]], $MachinePrecision] / n), $MachinePrecision]]
    
    \begin{array}{l}
    
    \\
    \begin{array}{l}
    \mathbf{if}\;x \leq 3.5:\\
    \;\;\;\;\frac{\left(\mathsf{log1p}\left(x\right) + \frac{0.5 \cdot \left({\left(\mathsf{log1p}\left(x\right)\right)}^{2} - {\log x}^{2}\right) + 0.16666666666666666 \cdot \frac{{\left(\mathsf{log1p}\left(x\right)\right)}^{3} - {\log x}^{3}}{n}}{n}\right) - \log x}{n}\\
    
    \mathbf{else}:\\
    \;\;\;\;\frac{{x}^{\left(\frac{1}{n} + -1\right)}}{n}\\
    
    
    \end{array}
    \end{array}
    
    Derivation
    1. Split input into 2 regimes
    2. if x < 3.5

      1. Initial program 40.8%

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

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

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

      if 3.5 < x

      1. Initial program 68.0%

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

        \[\leadsto \color{blue}{\frac{e^{-1 \cdot \frac{\log \left(\frac{1}{x}\right)}{n}}}{n \cdot x}} \]
      4. Step-by-step derivation
        1. mul-1-neg97.7%

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

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

          \[\leadsto \frac{e^{-\frac{\color{blue}{-1 \cdot \log x}}{n}}}{n \cdot x} \]
        4. distribute-neg-frac97.7%

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

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

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

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

        \[\leadsto \color{blue}{\frac{e^{\frac{\log x}{n}}}{x \cdot n}} \]
      6. Step-by-step derivation
        1. *-un-lft-identity97.7%

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

          \[\leadsto 1 \cdot \color{blue}{\frac{\frac{e^{\frac{\log x}{n}}}{x}}{n}} \]
        3. div-inv99.2%

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

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

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

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

        \[\leadsto \color{blue}{1 \cdot \frac{{x}^{\left(\frac{1}{n} - 1\right)}}{n}} \]
      8. Step-by-step derivation
        1. *-lft-identity99.1%

          \[\leadsto \color{blue}{\frac{{x}^{\left(\frac{1}{n} - 1\right)}}{n}} \]
        2. sub-neg99.1%

          \[\leadsto \frac{{x}^{\color{blue}{\left(\frac{1}{n} + \left(-1\right)\right)}}}{n} \]
        3. metadata-eval99.1%

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

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

      \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq 3.5:\\ \;\;\;\;\frac{\left(\mathsf{log1p}\left(x\right) + \frac{0.5 \cdot \left({\left(\mathsf{log1p}\left(x\right)\right)}^{2} - {\log x}^{2}\right) + 0.16666666666666666 \cdot \frac{{\left(\mathsf{log1p}\left(x\right)\right)}^{3} - {\log x}^{3}}{n}}{n}\right) - \log x}{n}\\ \mathbf{else}:\\ \;\;\;\;\frac{{x}^{\left(\frac{1}{n} + -1\right)}}{n}\\ \end{array} \]
    5. Add Preprocessing

    Alternative 3: 85.6% accurate, 0.3× speedup?

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

      1. Initial program 40.8%

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

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

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

      if 0.52000000000000002 < x

      1. Initial program 68.0%

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

        \[\leadsto \color{blue}{\frac{e^{-1 \cdot \frac{\log \left(\frac{1}{x}\right)}{n}}}{n \cdot x}} \]
      4. Step-by-step derivation
        1. mul-1-neg97.7%

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

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

          \[\leadsto \frac{e^{-\frac{\color{blue}{-1 \cdot \log x}}{n}}}{n \cdot x} \]
        4. distribute-neg-frac97.7%

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

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

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

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

        \[\leadsto \color{blue}{\frac{e^{\frac{\log x}{n}}}{x \cdot n}} \]
      6. Step-by-step derivation
        1. *-un-lft-identity97.7%

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

          \[\leadsto 1 \cdot \color{blue}{\frac{\frac{e^{\frac{\log x}{n}}}{x}}{n}} \]
        3. div-inv99.2%

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

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

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

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

        \[\leadsto \color{blue}{1 \cdot \frac{{x}^{\left(\frac{1}{n} - 1\right)}}{n}} \]
      8. Step-by-step derivation
        1. *-lft-identity99.1%

          \[\leadsto \color{blue}{\frac{{x}^{\left(\frac{1}{n} - 1\right)}}{n}} \]
        2. sub-neg99.1%

          \[\leadsto \frac{{x}^{\color{blue}{\left(\frac{1}{n} + \left(-1\right)\right)}}}{n} \]
        3. metadata-eval99.1%

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

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

      \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq 0.52:\\ \;\;\;\;\frac{-0.16666666666666666 \cdot \frac{{\log x}^{3}}{{n}^{2}} - \left(\log x + 0.5 \cdot \frac{{\log x}^{2}}{n}\right)}{n}\\ \mathbf{else}:\\ \;\;\;\;\frac{{x}^{\left(\frac{1}{n} + -1\right)}}{n}\\ \end{array} \]
    5. Add Preprocessing

    Alternative 4: 85.8% accurate, 0.4× speedup?

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

      1. Initial program 40.8%

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

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

        \[\leadsto \color{blue}{-1 \cdot \frac{-1 \cdot \frac{-0.16666666666666666 \cdot \frac{{\log x}^{3}}{n} - 0.5 \cdot {\log x}^{2}}{n} - -1 \cdot \log x}{n}} \]
      5. Step-by-step derivation
        1. mul-1-neg81.4%

          \[\leadsto \color{blue}{-\frac{-1 \cdot \frac{-0.16666666666666666 \cdot \frac{{\log x}^{3}}{n} - 0.5 \cdot {\log x}^{2}}{n} - -1 \cdot \log x}{n}} \]
      6. Simplified81.4%

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

      if 0.23999999999999999 < x

      1. Initial program 68.0%

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

        \[\leadsto \color{blue}{\frac{e^{-1 \cdot \frac{\log \left(\frac{1}{x}\right)}{n}}}{n \cdot x}} \]
      4. Step-by-step derivation
        1. mul-1-neg97.7%

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

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

          \[\leadsto \frac{e^{-\frac{\color{blue}{-1 \cdot \log x}}{n}}}{n \cdot x} \]
        4. distribute-neg-frac97.7%

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

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

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

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

        \[\leadsto \color{blue}{\frac{e^{\frac{\log x}{n}}}{x \cdot n}} \]
      6. Step-by-step derivation
        1. *-un-lft-identity97.7%

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

          \[\leadsto 1 \cdot \color{blue}{\frac{\frac{e^{\frac{\log x}{n}}}{x}}{n}} \]
        3. div-inv99.2%

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

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

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

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

        \[\leadsto \color{blue}{1 \cdot \frac{{x}^{\left(\frac{1}{n} - 1\right)}}{n}} \]
      8. Step-by-step derivation
        1. *-lft-identity99.1%

          \[\leadsto \color{blue}{\frac{{x}^{\left(\frac{1}{n} - 1\right)}}{n}} \]
        2. sub-neg99.1%

          \[\leadsto \frac{{x}^{\color{blue}{\left(\frac{1}{n} + \left(-1\right)\right)}}}{n} \]
        3. metadata-eval99.1%

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

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

      \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq 0.24:\\ \;\;\;\;\frac{\frac{-0.16666666666666666 \cdot \frac{{\log x}^{3}}{n} + {\log x}^{2} \cdot -0.5}{n} - \log x}{n}\\ \mathbf{else}:\\ \;\;\;\;\frac{{x}^{\left(\frac{1}{n} + -1\right)}}{n}\\ \end{array} \]
    5. Add Preprocessing

    Alternative 5: 85.3% accurate, 0.6× speedup?

    \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;\frac{1}{n} \leq -2 \cdot 10^{-77}:\\ \;\;\;\;\frac{{x}^{\left(\frac{1}{n} + -1\right)}}{n}\\ \mathbf{elif}\;\frac{1}{n} \leq 5 \cdot 10^{-80}:\\ \;\;\;\;\frac{\mathsf{log1p}\left(x\right) - \log x}{n}\\ \mathbf{elif}\;\frac{1}{n} \leq 2 \cdot 10^{-5}:\\ \;\;\;\;\frac{\frac{\left(1 + \left(\frac{0.3333333333333333}{{x}^{2}} - \frac{\log \left(\frac{1}{x}\right)}{n}\right)\right) + 0.5 \cdot \frac{-1}{x}}{x}}{n}\\ \mathbf{else}:\\ \;\;\;\;e^{\frac{\mathsf{log1p}\left(x\right)}{n}} - {x}^{\left(\frac{1}{n}\right)}\\ \end{array} \end{array} \]
    (FPCore (x n)
     :precision binary64
     (if (<= (/ 1.0 n) -2e-77)
       (/ (pow x (+ (/ 1.0 n) -1.0)) n)
       (if (<= (/ 1.0 n) 5e-80)
         (/ (- (log1p x) (log x)) n)
         (if (<= (/ 1.0 n) 2e-5)
           (/
            (/
             (+
              (+ 1.0 (- (/ 0.3333333333333333 (pow x 2.0)) (/ (log (/ 1.0 x)) n)))
              (* 0.5 (/ -1.0 x)))
             x)
            n)
           (- (exp (/ (log1p x) n)) (pow x (/ 1.0 n)))))))
    double code(double x, double n) {
    	double tmp;
    	if ((1.0 / n) <= -2e-77) {
    		tmp = pow(x, ((1.0 / n) + -1.0)) / n;
    	} else if ((1.0 / n) <= 5e-80) {
    		tmp = (log1p(x) - log(x)) / n;
    	} else if ((1.0 / n) <= 2e-5) {
    		tmp = (((1.0 + ((0.3333333333333333 / pow(x, 2.0)) - (log((1.0 / x)) / n))) + (0.5 * (-1.0 / x))) / x) / n;
    	} else {
    		tmp = exp((log1p(x) / n)) - pow(x, (1.0 / n));
    	}
    	return tmp;
    }
    
    public static double code(double x, double n) {
    	double tmp;
    	if ((1.0 / n) <= -2e-77) {
    		tmp = Math.pow(x, ((1.0 / n) + -1.0)) / n;
    	} else if ((1.0 / n) <= 5e-80) {
    		tmp = (Math.log1p(x) - Math.log(x)) / n;
    	} else if ((1.0 / n) <= 2e-5) {
    		tmp = (((1.0 + ((0.3333333333333333 / Math.pow(x, 2.0)) - (Math.log((1.0 / x)) / n))) + (0.5 * (-1.0 / x))) / x) / n;
    	} else {
    		tmp = Math.exp((Math.log1p(x) / n)) - Math.pow(x, (1.0 / n));
    	}
    	return tmp;
    }
    
    def code(x, n):
    	tmp = 0
    	if (1.0 / n) <= -2e-77:
    		tmp = math.pow(x, ((1.0 / n) + -1.0)) / n
    	elif (1.0 / n) <= 5e-80:
    		tmp = (math.log1p(x) - math.log(x)) / n
    	elif (1.0 / n) <= 2e-5:
    		tmp = (((1.0 + ((0.3333333333333333 / math.pow(x, 2.0)) - (math.log((1.0 / x)) / n))) + (0.5 * (-1.0 / x))) / x) / n
    	else:
    		tmp = math.exp((math.log1p(x) / n)) - math.pow(x, (1.0 / n))
    	return tmp
    
    function code(x, n)
    	tmp = 0.0
    	if (Float64(1.0 / n) <= -2e-77)
    		tmp = Float64((x ^ Float64(Float64(1.0 / n) + -1.0)) / n);
    	elseif (Float64(1.0 / n) <= 5e-80)
    		tmp = Float64(Float64(log1p(x) - log(x)) / n);
    	elseif (Float64(1.0 / n) <= 2e-5)
    		tmp = Float64(Float64(Float64(Float64(1.0 + Float64(Float64(0.3333333333333333 / (x ^ 2.0)) - Float64(log(Float64(1.0 / x)) / n))) + Float64(0.5 * Float64(-1.0 / x))) / x) / n);
    	else
    		tmp = Float64(exp(Float64(log1p(x) / n)) - (x ^ Float64(1.0 / n)));
    	end
    	return tmp
    end
    
    code[x_, n_] := If[LessEqual[N[(1.0 / n), $MachinePrecision], -2e-77], N[(N[Power[x, N[(N[(1.0 / n), $MachinePrecision] + -1.0), $MachinePrecision]], $MachinePrecision] / n), $MachinePrecision], If[LessEqual[N[(1.0 / n), $MachinePrecision], 5e-80], N[(N[(N[Log[1 + x], $MachinePrecision] - N[Log[x], $MachinePrecision]), $MachinePrecision] / n), $MachinePrecision], If[LessEqual[N[(1.0 / n), $MachinePrecision], 2e-5], N[(N[(N[(N[(1.0 + N[(N[(0.3333333333333333 / N[Power[x, 2.0], $MachinePrecision]), $MachinePrecision] - N[(N[Log[N[(1.0 / x), $MachinePrecision]], $MachinePrecision] / n), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(0.5 * N[(-1.0 / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision] / n), $MachinePrecision], N[(N[Exp[N[(N[Log[1 + x], $MachinePrecision] / n), $MachinePrecision]], $MachinePrecision] - N[Power[x, N[(1.0 / n), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]
    
    \begin{array}{l}
    
    \\
    \begin{array}{l}
    \mathbf{if}\;\frac{1}{n} \leq -2 \cdot 10^{-77}:\\
    \;\;\;\;\frac{{x}^{\left(\frac{1}{n} + -1\right)}}{n}\\
    
    \mathbf{elif}\;\frac{1}{n} \leq 5 \cdot 10^{-80}:\\
    \;\;\;\;\frac{\mathsf{log1p}\left(x\right) - \log x}{n}\\
    
    \mathbf{elif}\;\frac{1}{n} \leq 2 \cdot 10^{-5}:\\
    \;\;\;\;\frac{\frac{\left(1 + \left(\frac{0.3333333333333333}{{x}^{2}} - \frac{\log \left(\frac{1}{x}\right)}{n}\right)\right) + 0.5 \cdot \frac{-1}{x}}{x}}{n}\\
    
    \mathbf{else}:\\
    \;\;\;\;e^{\frac{\mathsf{log1p}\left(x\right)}{n}} - {x}^{\left(\frac{1}{n}\right)}\\
    
    
    \end{array}
    \end{array}
    
    Derivation
    1. Split input into 4 regimes
    2. if (/.f64 #s(literal 1 binary64) n) < -1.9999999999999999e-77

      1. Initial program 85.2%

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

        \[\leadsto \color{blue}{\frac{e^{-1 \cdot \frac{\log \left(\frac{1}{x}\right)}{n}}}{n \cdot x}} \]
      4. Step-by-step derivation
        1. mul-1-neg91.8%

          \[\leadsto \frac{e^{\color{blue}{-\frac{\log \left(\frac{1}{x}\right)}{n}}}}{n \cdot x} \]
        2. log-rec91.8%

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

          \[\leadsto \frac{e^{-\frac{\color{blue}{-1 \cdot \log x}}{n}}}{n \cdot x} \]
        4. distribute-neg-frac91.8%

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

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

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

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

        \[\leadsto \color{blue}{\frac{e^{\frac{\log x}{n}}}{x \cdot n}} \]
      6. Step-by-step derivation
        1. *-un-lft-identity91.8%

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

          \[\leadsto 1 \cdot \color{blue}{\frac{\frac{e^{\frac{\log x}{n}}}{x}}{n}} \]
        3. div-inv92.6%

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

          \[\leadsto 1 \cdot \frac{\frac{\color{blue}{{x}^{\left(\frac{1}{n}\right)}}}{x}}{n} \]
        5. pow192.6%

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

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

        \[\leadsto \color{blue}{1 \cdot \frac{{x}^{\left(\frac{1}{n} - 1\right)}}{n}} \]
      8. Step-by-step derivation
        1. *-lft-identity92.6%

          \[\leadsto \color{blue}{\frac{{x}^{\left(\frac{1}{n} - 1\right)}}{n}} \]
        2. sub-neg92.6%

          \[\leadsto \frac{{x}^{\color{blue}{\left(\frac{1}{n} + \left(-1\right)\right)}}}{n} \]
        3. metadata-eval92.6%

          \[\leadsto \frac{{x}^{\left(\frac{1}{n} + \color{blue}{-1}\right)}}{n} \]
      9. Simplified92.6%

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

      if -1.9999999999999999e-77 < (/.f64 #s(literal 1 binary64) n) < 5e-80

      1. Initial program 33.4%

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

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

          \[\leadsto \frac{\color{blue}{\mathsf{log1p}\left(x\right)} - \log x}{n} \]
      5. Simplified88.2%

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

      if 5e-80 < (/.f64 #s(literal 1 binary64) n) < 2.00000000000000016e-5

      1. Initial program 13.2%

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

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

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

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

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

        if 2.00000000000000016e-5 < (/.f64 #s(literal 1 binary64) n)

        1. Initial program 67.8%

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

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

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

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

        \[\leadsto \begin{array}{l} \mathbf{if}\;\frac{1}{n} \leq -2 \cdot 10^{-77}:\\ \;\;\;\;\frac{{x}^{\left(\frac{1}{n} + -1\right)}}{n}\\ \mathbf{elif}\;\frac{1}{n} \leq 5 \cdot 10^{-80}:\\ \;\;\;\;\frac{\mathsf{log1p}\left(x\right) - \log x}{n}\\ \mathbf{elif}\;\frac{1}{n} \leq 2 \cdot 10^{-5}:\\ \;\;\;\;\frac{\frac{\left(1 + \left(\frac{0.3333333333333333}{{x}^{2}} - \frac{\log \left(\frac{1}{x}\right)}{n}\right)\right) + 0.5 \cdot \frac{-1}{x}}{x}}{n}\\ \mathbf{else}:\\ \;\;\;\;e^{\frac{\mathsf{log1p}\left(x\right)}{n}} - {x}^{\left(\frac{1}{n}\right)}\\ \end{array} \]
      7. Add Preprocessing

      Alternative 6: 81.9% accurate, 0.9× speedup?

      \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;\frac{1}{n} \leq -2 \cdot 10^{-77}:\\ \;\;\;\;\frac{{x}^{\left(\frac{1}{n} + -1\right)}}{n}\\ \mathbf{elif}\;\frac{1}{n} \leq 5 \cdot 10^{-80}:\\ \;\;\;\;\frac{\mathsf{log1p}\left(x\right) - \log x}{n}\\ \mathbf{elif}\;\frac{1}{n} \leq 2 \cdot 10^{-5}:\\ \;\;\;\;\frac{\frac{\left(1 + \left(\frac{0.3333333333333333}{{x}^{2}} - \frac{\log \left(\frac{1}{x}\right)}{n}\right)\right) + 0.5 \cdot \frac{-1}{x}}{x}}{n}\\ \mathbf{else}:\\ \;\;\;\;\left(1 + x \cdot \left(\frac{1}{n} + x \cdot \left(0.5 \cdot \frac{1}{{n}^{2}} + 0.5 \cdot \frac{-1}{n}\right)\right)\right) - {x}^{\left(\frac{1}{n}\right)}\\ \end{array} \end{array} \]
      (FPCore (x n)
       :precision binary64
       (if (<= (/ 1.0 n) -2e-77)
         (/ (pow x (+ (/ 1.0 n) -1.0)) n)
         (if (<= (/ 1.0 n) 5e-80)
           (/ (- (log1p x) (log x)) n)
           (if (<= (/ 1.0 n) 2e-5)
             (/
              (/
               (+
                (+ 1.0 (- (/ 0.3333333333333333 (pow x 2.0)) (/ (log (/ 1.0 x)) n)))
                (* 0.5 (/ -1.0 x)))
               x)
              n)
             (-
              (+
               1.0
               (*
                x
                (+
                 (/ 1.0 n)
                 (* x (+ (* 0.5 (/ 1.0 (pow n 2.0))) (* 0.5 (/ -1.0 n)))))))
              (pow x (/ 1.0 n)))))))
      double code(double x, double n) {
      	double tmp;
      	if ((1.0 / n) <= -2e-77) {
      		tmp = pow(x, ((1.0 / n) + -1.0)) / n;
      	} else if ((1.0 / n) <= 5e-80) {
      		tmp = (log1p(x) - log(x)) / n;
      	} else if ((1.0 / n) <= 2e-5) {
      		tmp = (((1.0 + ((0.3333333333333333 / pow(x, 2.0)) - (log((1.0 / x)) / n))) + (0.5 * (-1.0 / x))) / x) / n;
      	} else {
      		tmp = (1.0 + (x * ((1.0 / n) + (x * ((0.5 * (1.0 / pow(n, 2.0))) + (0.5 * (-1.0 / n))))))) - pow(x, (1.0 / n));
      	}
      	return tmp;
      }
      
      public static double code(double x, double n) {
      	double tmp;
      	if ((1.0 / n) <= -2e-77) {
      		tmp = Math.pow(x, ((1.0 / n) + -1.0)) / n;
      	} else if ((1.0 / n) <= 5e-80) {
      		tmp = (Math.log1p(x) - Math.log(x)) / n;
      	} else if ((1.0 / n) <= 2e-5) {
      		tmp = (((1.0 + ((0.3333333333333333 / Math.pow(x, 2.0)) - (Math.log((1.0 / x)) / n))) + (0.5 * (-1.0 / x))) / x) / n;
      	} else {
      		tmp = (1.0 + (x * ((1.0 / n) + (x * ((0.5 * (1.0 / Math.pow(n, 2.0))) + (0.5 * (-1.0 / n))))))) - Math.pow(x, (1.0 / n));
      	}
      	return tmp;
      }
      
      def code(x, n):
      	tmp = 0
      	if (1.0 / n) <= -2e-77:
      		tmp = math.pow(x, ((1.0 / n) + -1.0)) / n
      	elif (1.0 / n) <= 5e-80:
      		tmp = (math.log1p(x) - math.log(x)) / n
      	elif (1.0 / n) <= 2e-5:
      		tmp = (((1.0 + ((0.3333333333333333 / math.pow(x, 2.0)) - (math.log((1.0 / x)) / n))) + (0.5 * (-1.0 / x))) / x) / n
      	else:
      		tmp = (1.0 + (x * ((1.0 / n) + (x * ((0.5 * (1.0 / math.pow(n, 2.0))) + (0.5 * (-1.0 / n))))))) - math.pow(x, (1.0 / n))
      	return tmp
      
      function code(x, n)
      	tmp = 0.0
      	if (Float64(1.0 / n) <= -2e-77)
      		tmp = Float64((x ^ Float64(Float64(1.0 / n) + -1.0)) / n);
      	elseif (Float64(1.0 / n) <= 5e-80)
      		tmp = Float64(Float64(log1p(x) - log(x)) / n);
      	elseif (Float64(1.0 / n) <= 2e-5)
      		tmp = Float64(Float64(Float64(Float64(1.0 + Float64(Float64(0.3333333333333333 / (x ^ 2.0)) - Float64(log(Float64(1.0 / x)) / n))) + Float64(0.5 * Float64(-1.0 / x))) / x) / n);
      	else
      		tmp = Float64(Float64(1.0 + Float64(x * Float64(Float64(1.0 / n) + Float64(x * Float64(Float64(0.5 * Float64(1.0 / (n ^ 2.0))) + Float64(0.5 * Float64(-1.0 / n))))))) - (x ^ Float64(1.0 / n)));
      	end
      	return tmp
      end
      
      code[x_, n_] := If[LessEqual[N[(1.0 / n), $MachinePrecision], -2e-77], N[(N[Power[x, N[(N[(1.0 / n), $MachinePrecision] + -1.0), $MachinePrecision]], $MachinePrecision] / n), $MachinePrecision], If[LessEqual[N[(1.0 / n), $MachinePrecision], 5e-80], N[(N[(N[Log[1 + x], $MachinePrecision] - N[Log[x], $MachinePrecision]), $MachinePrecision] / n), $MachinePrecision], If[LessEqual[N[(1.0 / n), $MachinePrecision], 2e-5], N[(N[(N[(N[(1.0 + N[(N[(0.3333333333333333 / N[Power[x, 2.0], $MachinePrecision]), $MachinePrecision] - N[(N[Log[N[(1.0 / x), $MachinePrecision]], $MachinePrecision] / n), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(0.5 * N[(-1.0 / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision] / n), $MachinePrecision], N[(N[(1.0 + N[(x * N[(N[(1.0 / n), $MachinePrecision] + N[(x * N[(N[(0.5 * N[(1.0 / N[Power[n, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(0.5 * N[(-1.0 / n), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[Power[x, N[(1.0 / n), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]
      
      \begin{array}{l}
      
      \\
      \begin{array}{l}
      \mathbf{if}\;\frac{1}{n} \leq -2 \cdot 10^{-77}:\\
      \;\;\;\;\frac{{x}^{\left(\frac{1}{n} + -1\right)}}{n}\\
      
      \mathbf{elif}\;\frac{1}{n} \leq 5 \cdot 10^{-80}:\\
      \;\;\;\;\frac{\mathsf{log1p}\left(x\right) - \log x}{n}\\
      
      \mathbf{elif}\;\frac{1}{n} \leq 2 \cdot 10^{-5}:\\
      \;\;\;\;\frac{\frac{\left(1 + \left(\frac{0.3333333333333333}{{x}^{2}} - \frac{\log \left(\frac{1}{x}\right)}{n}\right)\right) + 0.5 \cdot \frac{-1}{x}}{x}}{n}\\
      
      \mathbf{else}:\\
      \;\;\;\;\left(1 + x \cdot \left(\frac{1}{n} + x \cdot \left(0.5 \cdot \frac{1}{{n}^{2}} + 0.5 \cdot \frac{-1}{n}\right)\right)\right) - {x}^{\left(\frac{1}{n}\right)}\\
      
      
      \end{array}
      \end{array}
      
      Derivation
      1. Split input into 4 regimes
      2. if (/.f64 #s(literal 1 binary64) n) < -1.9999999999999999e-77

        1. Initial program 85.2%

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

          \[\leadsto \color{blue}{\frac{e^{-1 \cdot \frac{\log \left(\frac{1}{x}\right)}{n}}}{n \cdot x}} \]
        4. Step-by-step derivation
          1. mul-1-neg91.8%

            \[\leadsto \frac{e^{\color{blue}{-\frac{\log \left(\frac{1}{x}\right)}{n}}}}{n \cdot x} \]
          2. log-rec91.8%

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

            \[\leadsto \frac{e^{-\frac{\color{blue}{-1 \cdot \log x}}{n}}}{n \cdot x} \]
          4. distribute-neg-frac91.8%

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

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

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

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

          \[\leadsto \color{blue}{\frac{e^{\frac{\log x}{n}}}{x \cdot n}} \]
        6. Step-by-step derivation
          1. *-un-lft-identity91.8%

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

            \[\leadsto 1 \cdot \color{blue}{\frac{\frac{e^{\frac{\log x}{n}}}{x}}{n}} \]
          3. div-inv92.6%

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

            \[\leadsto 1 \cdot \frac{\frac{\color{blue}{{x}^{\left(\frac{1}{n}\right)}}}{x}}{n} \]
          5. pow192.6%

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

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

          \[\leadsto \color{blue}{1 \cdot \frac{{x}^{\left(\frac{1}{n} - 1\right)}}{n}} \]
        8. Step-by-step derivation
          1. *-lft-identity92.6%

            \[\leadsto \color{blue}{\frac{{x}^{\left(\frac{1}{n} - 1\right)}}{n}} \]
          2. sub-neg92.6%

            \[\leadsto \frac{{x}^{\color{blue}{\left(\frac{1}{n} + \left(-1\right)\right)}}}{n} \]
          3. metadata-eval92.6%

            \[\leadsto \frac{{x}^{\left(\frac{1}{n} + \color{blue}{-1}\right)}}{n} \]
        9. Simplified92.6%

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

        if -1.9999999999999999e-77 < (/.f64 #s(literal 1 binary64) n) < 5e-80

        1. Initial program 33.4%

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

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

            \[\leadsto \frac{\color{blue}{\mathsf{log1p}\left(x\right)} - \log x}{n} \]
        5. Simplified88.2%

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

        if 5e-80 < (/.f64 #s(literal 1 binary64) n) < 2.00000000000000016e-5

        1. Initial program 13.2%

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

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

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

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

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

          if 2.00000000000000016e-5 < (/.f64 #s(literal 1 binary64) n)

          1. Initial program 67.8%

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

            \[\leadsto \color{blue}{\left(1 + x \cdot \left(x \cdot \left(0.5 \cdot \frac{1}{{n}^{2}} - 0.5 \cdot \frac{1}{n}\right) + \frac{1}{n}\right)\right)} - {x}^{\left(\frac{1}{n}\right)} \]
        5. Recombined 4 regimes into one program.
        6. Final simplification87.5%

          \[\leadsto \begin{array}{l} \mathbf{if}\;\frac{1}{n} \leq -2 \cdot 10^{-77}:\\ \;\;\;\;\frac{{x}^{\left(\frac{1}{n} + -1\right)}}{n}\\ \mathbf{elif}\;\frac{1}{n} \leq 5 \cdot 10^{-80}:\\ \;\;\;\;\frac{\mathsf{log1p}\left(x\right) - \log x}{n}\\ \mathbf{elif}\;\frac{1}{n} \leq 2 \cdot 10^{-5}:\\ \;\;\;\;\frac{\frac{\left(1 + \left(\frac{0.3333333333333333}{{x}^{2}} - \frac{\log \left(\frac{1}{x}\right)}{n}\right)\right) + 0.5 \cdot \frac{-1}{x}}{x}}{n}\\ \mathbf{else}:\\ \;\;\;\;\left(1 + x \cdot \left(\frac{1}{n} + x \cdot \left(0.5 \cdot \frac{1}{{n}^{2}} + 0.5 \cdot \frac{-1}{n}\right)\right)\right) - {x}^{\left(\frac{1}{n}\right)}\\ \end{array} \]
        7. Add Preprocessing

        Alternative 7: 79.5% accurate, 0.9× speedup?

        \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;\frac{1}{n} \leq -2 \cdot 10^{-77}:\\ \;\;\;\;\frac{{x}^{\left(\frac{1}{n} + -1\right)}}{n}\\ \mathbf{elif}\;\frac{1}{n} \leq 5 \cdot 10^{-80}:\\ \;\;\;\;\frac{\mathsf{log1p}\left(x\right) - \log x}{n}\\ \mathbf{elif}\;\frac{1}{n} \leq 2 \cdot 10^{-5}:\\ \;\;\;\;\frac{\frac{\left(1 + \left(\frac{0.3333333333333333}{{x}^{2}} - \frac{\log \left(\frac{1}{x}\right)}{n}\right)\right) + 0.5 \cdot \frac{-1}{x}}{x}}{n}\\ \mathbf{else}:\\ \;\;\;\;{\left(x + 1\right)}^{\left(\frac{1}{n}\right)} - {x}^{\left(\frac{1}{n}\right)}\\ \end{array} \end{array} \]
        (FPCore (x n)
         :precision binary64
         (if (<= (/ 1.0 n) -2e-77)
           (/ (pow x (+ (/ 1.0 n) -1.0)) n)
           (if (<= (/ 1.0 n) 5e-80)
             (/ (- (log1p x) (log x)) n)
             (if (<= (/ 1.0 n) 2e-5)
               (/
                (/
                 (+
                  (+ 1.0 (- (/ 0.3333333333333333 (pow x 2.0)) (/ (log (/ 1.0 x)) n)))
                  (* 0.5 (/ -1.0 x)))
                 x)
                n)
               (- (pow (+ x 1.0) (/ 1.0 n)) (pow x (/ 1.0 n)))))))
        double code(double x, double n) {
        	double tmp;
        	if ((1.0 / n) <= -2e-77) {
        		tmp = pow(x, ((1.0 / n) + -1.0)) / n;
        	} else if ((1.0 / n) <= 5e-80) {
        		tmp = (log1p(x) - log(x)) / n;
        	} else if ((1.0 / n) <= 2e-5) {
        		tmp = (((1.0 + ((0.3333333333333333 / pow(x, 2.0)) - (log((1.0 / x)) / n))) + (0.5 * (-1.0 / x))) / x) / n;
        	} else {
        		tmp = pow((x + 1.0), (1.0 / n)) - pow(x, (1.0 / n));
        	}
        	return tmp;
        }
        
        public static double code(double x, double n) {
        	double tmp;
        	if ((1.0 / n) <= -2e-77) {
        		tmp = Math.pow(x, ((1.0 / n) + -1.0)) / n;
        	} else if ((1.0 / n) <= 5e-80) {
        		tmp = (Math.log1p(x) - Math.log(x)) / n;
        	} else if ((1.0 / n) <= 2e-5) {
        		tmp = (((1.0 + ((0.3333333333333333 / Math.pow(x, 2.0)) - (Math.log((1.0 / x)) / n))) + (0.5 * (-1.0 / x))) / x) / n;
        	} else {
        		tmp = Math.pow((x + 1.0), (1.0 / n)) - Math.pow(x, (1.0 / n));
        	}
        	return tmp;
        }
        
        def code(x, n):
        	tmp = 0
        	if (1.0 / n) <= -2e-77:
        		tmp = math.pow(x, ((1.0 / n) + -1.0)) / n
        	elif (1.0 / n) <= 5e-80:
        		tmp = (math.log1p(x) - math.log(x)) / n
        	elif (1.0 / n) <= 2e-5:
        		tmp = (((1.0 + ((0.3333333333333333 / math.pow(x, 2.0)) - (math.log((1.0 / x)) / n))) + (0.5 * (-1.0 / x))) / x) / n
        	else:
        		tmp = math.pow((x + 1.0), (1.0 / n)) - math.pow(x, (1.0 / n))
        	return tmp
        
        function code(x, n)
        	tmp = 0.0
        	if (Float64(1.0 / n) <= -2e-77)
        		tmp = Float64((x ^ Float64(Float64(1.0 / n) + -1.0)) / n);
        	elseif (Float64(1.0 / n) <= 5e-80)
        		tmp = Float64(Float64(log1p(x) - log(x)) / n);
        	elseif (Float64(1.0 / n) <= 2e-5)
        		tmp = Float64(Float64(Float64(Float64(1.0 + Float64(Float64(0.3333333333333333 / (x ^ 2.0)) - Float64(log(Float64(1.0 / x)) / n))) + Float64(0.5 * Float64(-1.0 / x))) / x) / n);
        	else
        		tmp = Float64((Float64(x + 1.0) ^ Float64(1.0 / n)) - (x ^ Float64(1.0 / n)));
        	end
        	return tmp
        end
        
        code[x_, n_] := If[LessEqual[N[(1.0 / n), $MachinePrecision], -2e-77], N[(N[Power[x, N[(N[(1.0 / n), $MachinePrecision] + -1.0), $MachinePrecision]], $MachinePrecision] / n), $MachinePrecision], If[LessEqual[N[(1.0 / n), $MachinePrecision], 5e-80], N[(N[(N[Log[1 + x], $MachinePrecision] - N[Log[x], $MachinePrecision]), $MachinePrecision] / n), $MachinePrecision], If[LessEqual[N[(1.0 / n), $MachinePrecision], 2e-5], N[(N[(N[(N[(1.0 + N[(N[(0.3333333333333333 / N[Power[x, 2.0], $MachinePrecision]), $MachinePrecision] - N[(N[Log[N[(1.0 / x), $MachinePrecision]], $MachinePrecision] / n), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(0.5 * N[(-1.0 / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision] / n), $MachinePrecision], 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}
        
        \\
        \begin{array}{l}
        \mathbf{if}\;\frac{1}{n} \leq -2 \cdot 10^{-77}:\\
        \;\;\;\;\frac{{x}^{\left(\frac{1}{n} + -1\right)}}{n}\\
        
        \mathbf{elif}\;\frac{1}{n} \leq 5 \cdot 10^{-80}:\\
        \;\;\;\;\frac{\mathsf{log1p}\left(x\right) - \log x}{n}\\
        
        \mathbf{elif}\;\frac{1}{n} \leq 2 \cdot 10^{-5}:\\
        \;\;\;\;\frac{\frac{\left(1 + \left(\frac{0.3333333333333333}{{x}^{2}} - \frac{\log \left(\frac{1}{x}\right)}{n}\right)\right) + 0.5 \cdot \frac{-1}{x}}{x}}{n}\\
        
        \mathbf{else}:\\
        \;\;\;\;{\left(x + 1\right)}^{\left(\frac{1}{n}\right)} - {x}^{\left(\frac{1}{n}\right)}\\
        
        
        \end{array}
        \end{array}
        
        Derivation
        1. Split input into 4 regimes
        2. if (/.f64 #s(literal 1 binary64) n) < -1.9999999999999999e-77

          1. Initial program 85.2%

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

            \[\leadsto \color{blue}{\frac{e^{-1 \cdot \frac{\log \left(\frac{1}{x}\right)}{n}}}{n \cdot x}} \]
          4. Step-by-step derivation
            1. mul-1-neg91.8%

              \[\leadsto \frac{e^{\color{blue}{-\frac{\log \left(\frac{1}{x}\right)}{n}}}}{n \cdot x} \]
            2. log-rec91.8%

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

              \[\leadsto \frac{e^{-\frac{\color{blue}{-1 \cdot \log x}}{n}}}{n \cdot x} \]
            4. distribute-neg-frac91.8%

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

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

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

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

            \[\leadsto \color{blue}{\frac{e^{\frac{\log x}{n}}}{x \cdot n}} \]
          6. Step-by-step derivation
            1. *-un-lft-identity91.8%

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

              \[\leadsto 1 \cdot \color{blue}{\frac{\frac{e^{\frac{\log x}{n}}}{x}}{n}} \]
            3. div-inv92.6%

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

              \[\leadsto 1 \cdot \frac{\frac{\color{blue}{{x}^{\left(\frac{1}{n}\right)}}}{x}}{n} \]
            5. pow192.6%

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

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

            \[\leadsto \color{blue}{1 \cdot \frac{{x}^{\left(\frac{1}{n} - 1\right)}}{n}} \]
          8. Step-by-step derivation
            1. *-lft-identity92.6%

              \[\leadsto \color{blue}{\frac{{x}^{\left(\frac{1}{n} - 1\right)}}{n}} \]
            2. sub-neg92.6%

              \[\leadsto \frac{{x}^{\color{blue}{\left(\frac{1}{n} + \left(-1\right)\right)}}}{n} \]
            3. metadata-eval92.6%

              \[\leadsto \frac{{x}^{\left(\frac{1}{n} + \color{blue}{-1}\right)}}{n} \]
          9. Simplified92.6%

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

          if -1.9999999999999999e-77 < (/.f64 #s(literal 1 binary64) n) < 5e-80

          1. Initial program 33.4%

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

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

              \[\leadsto \frac{\color{blue}{\mathsf{log1p}\left(x\right)} - \log x}{n} \]
          5. Simplified88.2%

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

          if 5e-80 < (/.f64 #s(literal 1 binary64) n) < 2.00000000000000016e-5

          1. Initial program 13.2%

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

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

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

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

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

            if 2.00000000000000016e-5 < (/.f64 #s(literal 1 binary64) n)

            1. Initial program 67.8%

              \[{\left(x + 1\right)}^{\left(\frac{1}{n}\right)} - {x}^{\left(\frac{1}{n}\right)} \]
            2. Add Preprocessing
          5. Recombined 4 regimes into one program.
          6. Final simplification87.3%

            \[\leadsto \begin{array}{l} \mathbf{if}\;\frac{1}{n} \leq -2 \cdot 10^{-77}:\\ \;\;\;\;\frac{{x}^{\left(\frac{1}{n} + -1\right)}}{n}\\ \mathbf{elif}\;\frac{1}{n} \leq 5 \cdot 10^{-80}:\\ \;\;\;\;\frac{\mathsf{log1p}\left(x\right) - \log x}{n}\\ \mathbf{elif}\;\frac{1}{n} \leq 2 \cdot 10^{-5}:\\ \;\;\;\;\frac{\frac{\left(1 + \left(\frac{0.3333333333333333}{{x}^{2}} - \frac{\log \left(\frac{1}{x}\right)}{n}\right)\right) + 0.5 \cdot \frac{-1}{x}}{x}}{n}\\ \mathbf{else}:\\ \;\;\;\;{\left(x + 1\right)}^{\left(\frac{1}{n}\right)} - {x}^{\left(\frac{1}{n}\right)}\\ \end{array} \]
          7. Add Preprocessing

          Alternative 8: 79.5% accurate, 0.9× speedup?

          \[\begin{array}{l} \\ \begin{array}{l} t_0 := \frac{{x}^{\left(\frac{1}{n} + -1\right)}}{n}\\ \mathbf{if}\;\frac{1}{n} \leq -2 \cdot 10^{-77}:\\ \;\;\;\;t\_0\\ \mathbf{elif}\;\frac{1}{n} \leq 5 \cdot 10^{-80}:\\ \;\;\;\;\frac{\mathsf{log1p}\left(x\right) - \log x}{n}\\ \mathbf{elif}\;\frac{1}{n} \leq 2 \cdot 10^{-5}:\\ \;\;\;\;t\_0\\ \mathbf{else}:\\ \;\;\;\;{\left(x + 1\right)}^{\left(\frac{1}{n}\right)} - {x}^{\left(\frac{1}{n}\right)}\\ \end{array} \end{array} \]
          (FPCore (x n)
           :precision binary64
           (let* ((t_0 (/ (pow x (+ (/ 1.0 n) -1.0)) n)))
             (if (<= (/ 1.0 n) -2e-77)
               t_0
               (if (<= (/ 1.0 n) 5e-80)
                 (/ (- (log1p x) (log x)) n)
                 (if (<= (/ 1.0 n) 2e-5)
                   t_0
                   (- (pow (+ x 1.0) (/ 1.0 n)) (pow x (/ 1.0 n))))))))
          double code(double x, double n) {
          	double t_0 = pow(x, ((1.0 / n) + -1.0)) / n;
          	double tmp;
          	if ((1.0 / n) <= -2e-77) {
          		tmp = t_0;
          	} else if ((1.0 / n) <= 5e-80) {
          		tmp = (log1p(x) - log(x)) / n;
          	} else if ((1.0 / n) <= 2e-5) {
          		tmp = t_0;
          	} else {
          		tmp = pow((x + 1.0), (1.0 / n)) - pow(x, (1.0 / n));
          	}
          	return tmp;
          }
          
          public static double code(double x, double n) {
          	double t_0 = Math.pow(x, ((1.0 / n) + -1.0)) / n;
          	double tmp;
          	if ((1.0 / n) <= -2e-77) {
          		tmp = t_0;
          	} else if ((1.0 / n) <= 5e-80) {
          		tmp = (Math.log1p(x) - Math.log(x)) / n;
          	} else if ((1.0 / n) <= 2e-5) {
          		tmp = t_0;
          	} else {
          		tmp = Math.pow((x + 1.0), (1.0 / n)) - Math.pow(x, (1.0 / n));
          	}
          	return tmp;
          }
          
          def code(x, n):
          	t_0 = math.pow(x, ((1.0 / n) + -1.0)) / n
          	tmp = 0
          	if (1.0 / n) <= -2e-77:
          		tmp = t_0
          	elif (1.0 / n) <= 5e-80:
          		tmp = (math.log1p(x) - math.log(x)) / n
          	elif (1.0 / n) <= 2e-5:
          		tmp = t_0
          	else:
          		tmp = math.pow((x + 1.0), (1.0 / n)) - math.pow(x, (1.0 / n))
          	return tmp
          
          function code(x, n)
          	t_0 = Float64((x ^ Float64(Float64(1.0 / n) + -1.0)) / n)
          	tmp = 0.0
          	if (Float64(1.0 / n) <= -2e-77)
          		tmp = t_0;
          	elseif (Float64(1.0 / n) <= 5e-80)
          		tmp = Float64(Float64(log1p(x) - log(x)) / n);
          	elseif (Float64(1.0 / n) <= 2e-5)
          		tmp = t_0;
          	else
          		tmp = Float64((Float64(x + 1.0) ^ Float64(1.0 / n)) - (x ^ Float64(1.0 / n)));
          	end
          	return tmp
          end
          
          code[x_, n_] := Block[{t$95$0 = N[(N[Power[x, N[(N[(1.0 / n), $MachinePrecision] + -1.0), $MachinePrecision]], $MachinePrecision] / n), $MachinePrecision]}, If[LessEqual[N[(1.0 / n), $MachinePrecision], -2e-77], t$95$0, If[LessEqual[N[(1.0 / n), $MachinePrecision], 5e-80], N[(N[(N[Log[1 + x], $MachinePrecision] - N[Log[x], $MachinePrecision]), $MachinePrecision] / n), $MachinePrecision], If[LessEqual[N[(1.0 / n), $MachinePrecision], 2e-5], t$95$0, 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}
          
          \\
          \begin{array}{l}
          t_0 := \frac{{x}^{\left(\frac{1}{n} + -1\right)}}{n}\\
          \mathbf{if}\;\frac{1}{n} \leq -2 \cdot 10^{-77}:\\
          \;\;\;\;t\_0\\
          
          \mathbf{elif}\;\frac{1}{n} \leq 5 \cdot 10^{-80}:\\
          \;\;\;\;\frac{\mathsf{log1p}\left(x\right) - \log x}{n}\\
          
          \mathbf{elif}\;\frac{1}{n} \leq 2 \cdot 10^{-5}:\\
          \;\;\;\;t\_0\\
          
          \mathbf{else}:\\
          \;\;\;\;{\left(x + 1\right)}^{\left(\frac{1}{n}\right)} - {x}^{\left(\frac{1}{n}\right)}\\
          
          
          \end{array}
          \end{array}
          
          Derivation
          1. Split input into 3 regimes
          2. if (/.f64 #s(literal 1 binary64) n) < -1.9999999999999999e-77 or 5e-80 < (/.f64 #s(literal 1 binary64) n) < 2.00000000000000016e-5

            1. Initial program 71.2%

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

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

                \[\leadsto \frac{e^{\color{blue}{-\frac{\log \left(\frac{1}{x}\right)}{n}}}}{n \cdot x} \]
              2. log-rec90.0%

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

                \[\leadsto \frac{e^{-\frac{\color{blue}{-1 \cdot \log x}}{n}}}{n \cdot x} \]
              4. distribute-neg-frac90.0%

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

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

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

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

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

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

                \[\leadsto 1 \cdot \color{blue}{\frac{\frac{e^{\frac{\log x}{n}}}{x}}{n}} \]
              3. div-inv90.9%

                \[\leadsto 1 \cdot \frac{\frac{e^{\color{blue}{\log x \cdot \frac{1}{n}}}}{x}}{n} \]
              4. pow-to-exp90.9%

                \[\leadsto 1 \cdot \frac{\frac{\color{blue}{{x}^{\left(\frac{1}{n}\right)}}}{x}}{n} \]
              5. pow190.9%

                \[\leadsto 1 \cdot \frac{\frac{{x}^{\left(\frac{1}{n}\right)}}{\color{blue}{{x}^{1}}}}{n} \]
              6. pow-div90.8%

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

              \[\leadsto \color{blue}{1 \cdot \frac{{x}^{\left(\frac{1}{n} - 1\right)}}{n}} \]
            8. Step-by-step derivation
              1. *-lft-identity90.8%

                \[\leadsto \color{blue}{\frac{{x}^{\left(\frac{1}{n} - 1\right)}}{n}} \]
              2. sub-neg90.8%

                \[\leadsto \frac{{x}^{\color{blue}{\left(\frac{1}{n} + \left(-1\right)\right)}}}{n} \]
              3. metadata-eval90.8%

                \[\leadsto \frac{{x}^{\left(\frac{1}{n} + \color{blue}{-1}\right)}}{n} \]
            9. Simplified90.8%

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

            if -1.9999999999999999e-77 < (/.f64 #s(literal 1 binary64) n) < 5e-80

            1. Initial program 33.4%

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

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

                \[\leadsto \frac{\color{blue}{\mathsf{log1p}\left(x\right)} - \log x}{n} \]
            5. Simplified88.2%

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

            if 2.00000000000000016e-5 < (/.f64 #s(literal 1 binary64) n)

            1. Initial program 67.8%

              \[{\left(x + 1\right)}^{\left(\frac{1}{n}\right)} - {x}^{\left(\frac{1}{n}\right)} \]
            2. Add Preprocessing
          3. Recombined 3 regimes into one program.
          4. Final simplification87.3%

            \[\leadsto \begin{array}{l} \mathbf{if}\;\frac{1}{n} \leq -2 \cdot 10^{-77}:\\ \;\;\;\;\frac{{x}^{\left(\frac{1}{n} + -1\right)}}{n}\\ \mathbf{elif}\;\frac{1}{n} \leq 5 \cdot 10^{-80}:\\ \;\;\;\;\frac{\mathsf{log1p}\left(x\right) - \log x}{n}\\ \mathbf{elif}\;\frac{1}{n} \leq 2 \cdot 10^{-5}:\\ \;\;\;\;\frac{{x}^{\left(\frac{1}{n} + -1\right)}}{n}\\ \mathbf{else}:\\ \;\;\;\;{\left(x + 1\right)}^{\left(\frac{1}{n}\right)} - {x}^{\left(\frac{1}{n}\right)}\\ \end{array} \]
          5. Add Preprocessing

          Alternative 9: 79.1% accurate, 1.0× speedup?

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

            1. Initial program 71.2%

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

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

                \[\leadsto \frac{e^{\color{blue}{-\frac{\log \left(\frac{1}{x}\right)}{n}}}}{n \cdot x} \]
              2. log-rec90.0%

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

                \[\leadsto \frac{e^{-\frac{\color{blue}{-1 \cdot \log x}}{n}}}{n \cdot x} \]
              4. distribute-neg-frac90.0%

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

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

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

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

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

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

                \[\leadsto 1 \cdot \color{blue}{\frac{\frac{e^{\frac{\log x}{n}}}{x}}{n}} \]
              3. div-inv90.9%

                \[\leadsto 1 \cdot \frac{\frac{e^{\color{blue}{\log x \cdot \frac{1}{n}}}}{x}}{n} \]
              4. pow-to-exp90.9%

                \[\leadsto 1 \cdot \frac{\frac{\color{blue}{{x}^{\left(\frac{1}{n}\right)}}}{x}}{n} \]
              5. pow190.9%

                \[\leadsto 1 \cdot \frac{\frac{{x}^{\left(\frac{1}{n}\right)}}{\color{blue}{{x}^{1}}}}{n} \]
              6. pow-div90.8%

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

              \[\leadsto \color{blue}{1 \cdot \frac{{x}^{\left(\frac{1}{n} - 1\right)}}{n}} \]
            8. Step-by-step derivation
              1. *-lft-identity90.8%

                \[\leadsto \color{blue}{\frac{{x}^{\left(\frac{1}{n} - 1\right)}}{n}} \]
              2. sub-neg90.8%

                \[\leadsto \frac{{x}^{\color{blue}{\left(\frac{1}{n} + \left(-1\right)\right)}}}{n} \]
              3. metadata-eval90.8%

                \[\leadsto \frac{{x}^{\left(\frac{1}{n} + \color{blue}{-1}\right)}}{n} \]
            9. Simplified90.8%

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

            if -1.9999999999999999e-77 < (/.f64 #s(literal 1 binary64) n) < 5e-80

            1. Initial program 33.4%

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

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

                \[\leadsto \frac{\color{blue}{\mathsf{log1p}\left(x\right)} - \log x}{n} \]
            5. Simplified88.2%

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

            if 2.00000000000000016e-5 < (/.f64 #s(literal 1 binary64) n)

            1. Initial program 67.8%

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

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

            \[\leadsto \begin{array}{l} \mathbf{if}\;\frac{1}{n} \leq -2 \cdot 10^{-77}:\\ \;\;\;\;\frac{{x}^{\left(\frac{1}{n} + -1\right)}}{n}\\ \mathbf{elif}\;\frac{1}{n} \leq 5 \cdot 10^{-80}:\\ \;\;\;\;\frac{\mathsf{log1p}\left(x\right) - \log x}{n}\\ \mathbf{elif}\;\frac{1}{n} \leq 2 \cdot 10^{-5}:\\ \;\;\;\;\frac{{x}^{\left(\frac{1}{n} + -1\right)}}{n}\\ \mathbf{else}:\\ \;\;\;\;\left(1 + \frac{x}{n}\right) - {x}^{\left(\frac{1}{n}\right)}\\ \end{array} \]
          5. Add Preprocessing

          Alternative 10: 60.2% accurate, 1.5× speedup?

          \[\begin{array}{l} \\ \begin{array}{l} t_0 := \frac{\frac{1}{n} + \frac{\frac{-0.5}{n} + \frac{\frac{0.3333333333333333}{x}}{n}}{x}}{x}\\ \mathbf{if}\;n \leq -5.8 \cdot 10^{+76}:\\ \;\;\;\;\frac{\log x}{-n}\\ \mathbf{elif}\;n \leq -2.9 \cdot 10^{+17}:\\ \;\;\;\;t\_0\\ \mathbf{elif}\;n \leq -330000:\\ \;\;\;\;\frac{-1}{\frac{n}{\log x}}\\ \mathbf{elif}\;n \leq 4.9 \cdot 10^{-202}:\\ \;\;\;\;\frac{0.3333333333333333}{n \cdot {x}^{3}}\\ \mathbf{elif}\;n \leq 58000:\\ \;\;\;\;1 - {x}^{\left(\frac{1}{n}\right)}\\ \mathbf{elif}\;n \leq 1.7 \cdot 10^{+79}:\\ \;\;\;\;t\_0\\ \mathbf{elif}\;n \leq 7.2 \cdot 10^{+122}:\\ \;\;\;\;\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 n) (/ (+ (/ -0.5 n) (/ (/ 0.3333333333333333 x) n)) x))
                    x)))
             (if (<= n -5.8e+76)
               (/ (log x) (- n))
               (if (<= n -2.9e+17)
                 t_0
                 (if (<= n -330000.0)
                   (/ -1.0 (/ n (log x)))
                   (if (<= n 4.9e-202)
                     (/ 0.3333333333333333 (* n (pow x 3.0)))
                     (if (<= n 58000.0)
                       (- 1.0 (pow x (/ 1.0 n)))
                       (if (<= n 1.7e+79)
                         t_0
                         (if (<= n 7.2e+122) (/ (- x (log x)) n) (/ (/ 1.0 n) x))))))))))
          double code(double x, double n) {
          	double t_0 = ((1.0 / n) + (((-0.5 / n) + ((0.3333333333333333 / x) / n)) / x)) / x;
          	double tmp;
          	if (n <= -5.8e+76) {
          		tmp = log(x) / -n;
          	} else if (n <= -2.9e+17) {
          		tmp = t_0;
          	} else if (n <= -330000.0) {
          		tmp = -1.0 / (n / log(x));
          	} else if (n <= 4.9e-202) {
          		tmp = 0.3333333333333333 / (n * pow(x, 3.0));
          	} else if (n <= 58000.0) {
          		tmp = 1.0 - pow(x, (1.0 / n));
          	} else if (n <= 1.7e+79) {
          		tmp = t_0;
          	} else if (n <= 7.2e+122) {
          		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 / n) + ((((-0.5d0) / n) + ((0.3333333333333333d0 / x) / n)) / x)) / x
              if (n <= (-5.8d+76)) then
                  tmp = log(x) / -n
              else if (n <= (-2.9d+17)) then
                  tmp = t_0
              else if (n <= (-330000.0d0)) then
                  tmp = (-1.0d0) / (n / log(x))
              else if (n <= 4.9d-202) then
                  tmp = 0.3333333333333333d0 / (n * (x ** 3.0d0))
              else if (n <= 58000.0d0) then
                  tmp = 1.0d0 - (x ** (1.0d0 / n))
              else if (n <= 1.7d+79) then
                  tmp = t_0
              else if (n <= 7.2d+122) 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 / n) + (((-0.5 / n) + ((0.3333333333333333 / x) / n)) / x)) / x;
          	double tmp;
          	if (n <= -5.8e+76) {
          		tmp = Math.log(x) / -n;
          	} else if (n <= -2.9e+17) {
          		tmp = t_0;
          	} else if (n <= -330000.0) {
          		tmp = -1.0 / (n / Math.log(x));
          	} else if (n <= 4.9e-202) {
          		tmp = 0.3333333333333333 / (n * Math.pow(x, 3.0));
          	} else if (n <= 58000.0) {
          		tmp = 1.0 - Math.pow(x, (1.0 / n));
          	} else if (n <= 1.7e+79) {
          		tmp = t_0;
          	} else if (n <= 7.2e+122) {
          		tmp = (x - Math.log(x)) / n;
          	} else {
          		tmp = (1.0 / n) / x;
          	}
          	return tmp;
          }
          
          def code(x, n):
          	t_0 = ((1.0 / n) + (((-0.5 / n) + ((0.3333333333333333 / x) / n)) / x)) / x
          	tmp = 0
          	if n <= -5.8e+76:
          		tmp = math.log(x) / -n
          	elif n <= -2.9e+17:
          		tmp = t_0
          	elif n <= -330000.0:
          		tmp = -1.0 / (n / math.log(x))
          	elif n <= 4.9e-202:
          		tmp = 0.3333333333333333 / (n * math.pow(x, 3.0))
          	elif n <= 58000.0:
          		tmp = 1.0 - math.pow(x, (1.0 / n))
          	elif n <= 1.7e+79:
          		tmp = t_0
          	elif n <= 7.2e+122:
          		tmp = (x - math.log(x)) / n
          	else:
          		tmp = (1.0 / n) / x
          	return tmp
          
          function code(x, n)
          	t_0 = Float64(Float64(Float64(1.0 / n) + Float64(Float64(Float64(-0.5 / n) + Float64(Float64(0.3333333333333333 / x) / n)) / x)) / x)
          	tmp = 0.0
          	if (n <= -5.8e+76)
          		tmp = Float64(log(x) / Float64(-n));
          	elseif (n <= -2.9e+17)
          		tmp = t_0;
          	elseif (n <= -330000.0)
          		tmp = Float64(-1.0 / Float64(n / log(x)));
          	elseif (n <= 4.9e-202)
          		tmp = Float64(0.3333333333333333 / Float64(n * (x ^ 3.0)));
          	elseif (n <= 58000.0)
          		tmp = Float64(1.0 - (x ^ Float64(1.0 / n)));
          	elseif (n <= 1.7e+79)
          		tmp = t_0;
          	elseif (n <= 7.2e+122)
          		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 / n) + (((-0.5 / n) + ((0.3333333333333333 / x) / n)) / x)) / x;
          	tmp = 0.0;
          	if (n <= -5.8e+76)
          		tmp = log(x) / -n;
          	elseif (n <= -2.9e+17)
          		tmp = t_0;
          	elseif (n <= -330000.0)
          		tmp = -1.0 / (n / log(x));
          	elseif (n <= 4.9e-202)
          		tmp = 0.3333333333333333 / (n * (x ^ 3.0));
          	elseif (n <= 58000.0)
          		tmp = 1.0 - (x ^ (1.0 / n));
          	elseif (n <= 1.7e+79)
          		tmp = t_0;
          	elseif (n <= 7.2e+122)
          		tmp = (x - log(x)) / n;
          	else
          		tmp = (1.0 / n) / x;
          	end
          	tmp_2 = tmp;
          end
          
          code[x_, n_] := Block[{t$95$0 = N[(N[(N[(1.0 / n), $MachinePrecision] + N[(N[(N[(-0.5 / n), $MachinePrecision] + N[(N[(0.3333333333333333 / x), $MachinePrecision] / n), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision]}, If[LessEqual[n, -5.8e+76], N[(N[Log[x], $MachinePrecision] / (-n)), $MachinePrecision], If[LessEqual[n, -2.9e+17], t$95$0, If[LessEqual[n, -330000.0], N[(-1.0 / N[(n / N[Log[x], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[n, 4.9e-202], N[(0.3333333333333333 / N[(n * N[Power[x, 3.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[n, 58000.0], N[(1.0 - N[Power[x, N[(1.0 / n), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[n, 1.7e+79], t$95$0, If[LessEqual[n, 7.2e+122], 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 := \frac{\frac{1}{n} + \frac{\frac{-0.5}{n} + \frac{\frac{0.3333333333333333}{x}}{n}}{x}}{x}\\
          \mathbf{if}\;n \leq -5.8 \cdot 10^{+76}:\\
          \;\;\;\;\frac{\log x}{-n}\\
          
          \mathbf{elif}\;n \leq -2.9 \cdot 10^{+17}:\\
          \;\;\;\;t\_0\\
          
          \mathbf{elif}\;n \leq -330000:\\
          \;\;\;\;\frac{-1}{\frac{n}{\log x}}\\
          
          \mathbf{elif}\;n \leq 4.9 \cdot 10^{-202}:\\
          \;\;\;\;\frac{0.3333333333333333}{n \cdot {x}^{3}}\\
          
          \mathbf{elif}\;n \leq 58000:\\
          \;\;\;\;1 - {x}^{\left(\frac{1}{n}\right)}\\
          
          \mathbf{elif}\;n \leq 1.7 \cdot 10^{+79}:\\
          \;\;\;\;t\_0\\
          
          \mathbf{elif}\;n \leq 7.2 \cdot 10^{+122}:\\
          \;\;\;\;\frac{x - \log x}{n}\\
          
          \mathbf{else}:\\
          \;\;\;\;\frac{\frac{1}{n}}{x}\\
          
          
          \end{array}
          \end{array}
          
          Derivation
          1. Split input into 7 regimes
          2. if n < -5.8000000000000003e76

            1. Initial program 30.9%

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

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

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

                \[\leadsto \color{blue}{-\frac{\log x}{n}} \]
              2. distribute-neg-frac265.7%

                \[\leadsto \color{blue}{\frac{\log x}{-n}} \]
            6. Simplified65.7%

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

            if -5.8000000000000003e76 < n < -2.9e17 or 58000 < n < 1.70000000000000016e79

            1. Initial program 12.6%

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

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

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

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

                \[\leadsto \color{blue}{\frac{\left(1 + 0.3333333333333333 \cdot \frac{1}{{x}^{2}}\right) - 0.5 \cdot \frac{1}{x}}{n \cdot x}} \]
              4. Step-by-step derivation
                1. sub-neg73.8%

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

                  \[\leadsto \frac{\color{blue}{\left(0.3333333333333333 \cdot \frac{1}{{x}^{2}} + 1\right)} + \left(-0.5 \cdot \frac{1}{x}\right)}{n \cdot x} \]
                3. associate-+l+73.8%

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

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

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

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

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

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

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

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

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

                \[\leadsto \color{blue}{\frac{\left(\frac{0.3333333333333333}{n \cdot {x}^{2}} + \frac{1}{n}\right) - \frac{0.5}{n \cdot x}}{x}} \]
              7. Step-by-step derivation
                1. Simplified75.5%

                  \[\leadsto \color{blue}{\frac{\frac{1}{n} + \frac{\frac{\frac{0.3333333333333333}{x}}{n} + \frac{-0.5}{n}}{x}}{x}} \]

                if -2.9e17 < n < -3.3e5

                1. Initial program 53.2%

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

                  \[\leadsto \color{blue}{1} - {x}^{\left(\frac{1}{n}\right)} \]
                4. Step-by-step derivation
                  1. add-cbrt-cube53.2%

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

                    \[\leadsto \sqrt[3]{\color{blue}{{\left(1 - {x}^{\left(\frac{1}{n}\right)}\right)}^{3}}} \]
                5. Applied egg-rr53.2%

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

                  \[\leadsto \sqrt[3]{{\color{blue}{\left(-1 \cdot \frac{\log x}{n}\right)}}^{3}} \]
                7. Step-by-step derivation
                  1. mul-1-neg69.9%

                    \[\leadsto \color{blue}{-\frac{\log x}{n}} \]
                  2. distribute-neg-frac269.9%

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

                  \[\leadsto \sqrt[3]{{\color{blue}{\left(\frac{\log x}{-n}\right)}}^{3}} \]
                9. Step-by-step derivation
                  1. rem-cbrt-cube69.9%

                    \[\leadsto \color{blue}{\frac{\log x}{-n}} \]
                  2. clear-num70.0%

                    \[\leadsto \color{blue}{\frac{1}{\frac{-n}{\log x}}} \]
                  3. frac-2neg70.0%

                    \[\leadsto \color{blue}{\frac{-1}{-\frac{-n}{\log x}}} \]
                  4. metadata-eval70.0%

                    \[\leadsto \frac{\color{blue}{-1}}{-\frac{-n}{\log x}} \]
                  5. add-sqr-sqrt70.0%

                    \[\leadsto \frac{-1}{-\frac{\color{blue}{\sqrt{-n} \cdot \sqrt{-n}}}{\log x}} \]
                  6. sqrt-unprod70.0%

                    \[\leadsto \frac{-1}{-\frac{\color{blue}{\sqrt{\left(-n\right) \cdot \left(-n\right)}}}{\log x}} \]
                  7. sqr-neg70.0%

                    \[\leadsto \frac{-1}{-\frac{\sqrt{\color{blue}{n \cdot n}}}{\log x}} \]
                  8. sqrt-unprod0.0%

                    \[\leadsto \frac{-1}{-\frac{\color{blue}{\sqrt{n} \cdot \sqrt{n}}}{\log x}} \]
                  9. add-sqr-sqrt1.6%

                    \[\leadsto \frac{-1}{-\frac{\color{blue}{n}}{\log x}} \]
                  10. distribute-frac-neg1.6%

                    \[\leadsto \frac{-1}{\color{blue}{\frac{-n}{\log x}}} \]
                  11. add-sqr-sqrt1.6%

                    \[\leadsto \frac{-1}{\frac{\color{blue}{\sqrt{-n} \cdot \sqrt{-n}}}{\log x}} \]
                  12. sqrt-unprod1.6%

                    \[\leadsto \frac{-1}{\frac{\color{blue}{\sqrt{\left(-n\right) \cdot \left(-n\right)}}}{\log x}} \]
                  13. sqr-neg1.6%

                    \[\leadsto \frac{-1}{\frac{\sqrt{\color{blue}{n \cdot n}}}{\log x}} \]
                  14. sqrt-unprod0.0%

                    \[\leadsto \frac{-1}{\frac{\color{blue}{\sqrt{n} \cdot \sqrt{n}}}{\log x}} \]
                  15. add-sqr-sqrt70.0%

                    \[\leadsto \frac{-1}{\frac{\color{blue}{n}}{\log x}} \]
                10. Applied egg-rr70.0%

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

                if -3.3e5 < n < 4.9000000000000004e-202

                1. Initial program 93.9%

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

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

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

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

                    \[\leadsto \color{blue}{\frac{\left(1 + 0.3333333333333333 \cdot \frac{1}{{x}^{2}}\right) - 0.5 \cdot \frac{1}{x}}{n \cdot x}} \]
                  4. Step-by-step derivation
                    1. sub-neg47.5%

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

                      \[\leadsto \frac{\color{blue}{\left(0.3333333333333333 \cdot \frac{1}{{x}^{2}} + 1\right)} + \left(-0.5 \cdot \frac{1}{x}\right)}{n \cdot x} \]
                    3. associate-+l+47.5%

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

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

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

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

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

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

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

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

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

                    \[\leadsto \color{blue}{\frac{0.3333333333333333}{n \cdot {x}^{3}}} \]

                  if 4.9000000000000004e-202 < n < 58000

                  1. Initial program 80.8%

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

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

                  if 1.70000000000000016e79 < n < 7.2000000000000005e122

                  1. Initial program 13.8%

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

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

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

                  if 7.2000000000000005e122 < n

                  1. Initial program 40.3%

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

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

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

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

                      \[\leadsto \frac{e^{-\frac{\color{blue}{-1 \cdot \log x}}{n}}}{n \cdot x} \]
                    4. distribute-neg-frac54.5%

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

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

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

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

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

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

                      \[\leadsto \color{blue}{\frac{\frac{1}{n}}{x}} \]
                  8. Simplified55.0%

                    \[\leadsto \color{blue}{\frac{\frac{1}{n}}{x}} \]
                5. Recombined 7 regimes into one program.
                6. Final simplification73.0%

                  \[\leadsto \begin{array}{l} \mathbf{if}\;n \leq -5.8 \cdot 10^{+76}:\\ \;\;\;\;\frac{\log x}{-n}\\ \mathbf{elif}\;n \leq -2.9 \cdot 10^{+17}:\\ \;\;\;\;\frac{\frac{1}{n} + \frac{\frac{-0.5}{n} + \frac{\frac{0.3333333333333333}{x}}{n}}{x}}{x}\\ \mathbf{elif}\;n \leq -330000:\\ \;\;\;\;\frac{-1}{\frac{n}{\log x}}\\ \mathbf{elif}\;n \leq 4.9 \cdot 10^{-202}:\\ \;\;\;\;\frac{0.3333333333333333}{n \cdot {x}^{3}}\\ \mathbf{elif}\;n \leq 58000:\\ \;\;\;\;1 - {x}^{\left(\frac{1}{n}\right)}\\ \mathbf{elif}\;n \leq 1.7 \cdot 10^{+79}:\\ \;\;\;\;\frac{\frac{1}{n} + \frac{\frac{-0.5}{n} + \frac{\frac{0.3333333333333333}{x}}{n}}{x}}{x}\\ \mathbf{elif}\;n \leq 7.2 \cdot 10^{+122}:\\ \;\;\;\;\frac{x - \log x}{n}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{1}{n}}{x}\\ \end{array} \]
                7. Add Preprocessing

                Alternative 11: 71.2% accurate, 1.6× speedup?

                \[\begin{array}{l} \\ \begin{array}{l} t_0 := \frac{1 - \frac{0.5 + \frac{-0.3333333333333333}{x}}{x}}{x \cdot n}\\ \mathbf{if}\;x \leq 2.7 \cdot 10^{-226}:\\ \;\;\;\;\log x \cdot \frac{-1}{n}\\ \mathbf{elif}\;x \leq 3.5 \cdot 10^{-215}:\\ \;\;\;\;t\_0\\ \mathbf{elif}\;x \leq 2.05 \cdot 10^{-129}:\\ \;\;\;\;\frac{-1}{\frac{n}{\log x}}\\ \mathbf{elif}\;x \leq 7.8 \cdot 10^{-125}:\\ \;\;\;\;t\_0\\ \mathbf{elif}\;x \leq 0.043:\\ \;\;\;\;\frac{x - \log x}{n}\\ \mathbf{else}:\\ \;\;\;\;\frac{{x}^{\left(\frac{1}{n} + -1\right)}}{n}\\ \end{array} \end{array} \]
                (FPCore (x n)
                 :precision binary64
                 (let* ((t_0 (/ (- 1.0 (/ (+ 0.5 (/ -0.3333333333333333 x)) x)) (* x n))))
                   (if (<= x 2.7e-226)
                     (* (log x) (/ -1.0 n))
                     (if (<= x 3.5e-215)
                       t_0
                       (if (<= x 2.05e-129)
                         (/ -1.0 (/ n (log x)))
                         (if (<= x 7.8e-125)
                           t_0
                           (if (<= x 0.043)
                             (/ (- x (log x)) n)
                             (/ (pow x (+ (/ 1.0 n) -1.0)) n))))))))
                double code(double x, double n) {
                	double t_0 = (1.0 - ((0.5 + (-0.3333333333333333 / x)) / x)) / (x * n);
                	double tmp;
                	if (x <= 2.7e-226) {
                		tmp = log(x) * (-1.0 / n);
                	} else if (x <= 3.5e-215) {
                		tmp = t_0;
                	} else if (x <= 2.05e-129) {
                		tmp = -1.0 / (n / log(x));
                	} else if (x <= 7.8e-125) {
                		tmp = t_0;
                	} else if (x <= 0.043) {
                		tmp = (x - log(x)) / n;
                	} else {
                		tmp = pow(x, ((1.0 / n) + -1.0)) / 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) :: tmp
                    t_0 = (1.0d0 - ((0.5d0 + ((-0.3333333333333333d0) / x)) / x)) / (x * n)
                    if (x <= 2.7d-226) then
                        tmp = log(x) * ((-1.0d0) / n)
                    else if (x <= 3.5d-215) then
                        tmp = t_0
                    else if (x <= 2.05d-129) then
                        tmp = (-1.0d0) / (n / log(x))
                    else if (x <= 7.8d-125) then
                        tmp = t_0
                    else if (x <= 0.043d0) then
                        tmp = (x - log(x)) / n
                    else
                        tmp = (x ** ((1.0d0 / n) + (-1.0d0))) / n
                    end if
                    code = tmp
                end function
                
                public static double code(double x, double n) {
                	double t_0 = (1.0 - ((0.5 + (-0.3333333333333333 / x)) / x)) / (x * n);
                	double tmp;
                	if (x <= 2.7e-226) {
                		tmp = Math.log(x) * (-1.0 / n);
                	} else if (x <= 3.5e-215) {
                		tmp = t_0;
                	} else if (x <= 2.05e-129) {
                		tmp = -1.0 / (n / Math.log(x));
                	} else if (x <= 7.8e-125) {
                		tmp = t_0;
                	} else if (x <= 0.043) {
                		tmp = (x - Math.log(x)) / n;
                	} else {
                		tmp = Math.pow(x, ((1.0 / n) + -1.0)) / n;
                	}
                	return tmp;
                }
                
                def code(x, n):
                	t_0 = (1.0 - ((0.5 + (-0.3333333333333333 / x)) / x)) / (x * n)
                	tmp = 0
                	if x <= 2.7e-226:
                		tmp = math.log(x) * (-1.0 / n)
                	elif x <= 3.5e-215:
                		tmp = t_0
                	elif x <= 2.05e-129:
                		tmp = -1.0 / (n / math.log(x))
                	elif x <= 7.8e-125:
                		tmp = t_0
                	elif x <= 0.043:
                		tmp = (x - math.log(x)) / n
                	else:
                		tmp = math.pow(x, ((1.0 / n) + -1.0)) / n
                	return tmp
                
                function code(x, n)
                	t_0 = Float64(Float64(1.0 - Float64(Float64(0.5 + Float64(-0.3333333333333333 / x)) / x)) / Float64(x * n))
                	tmp = 0.0
                	if (x <= 2.7e-226)
                		tmp = Float64(log(x) * Float64(-1.0 / n));
                	elseif (x <= 3.5e-215)
                		tmp = t_0;
                	elseif (x <= 2.05e-129)
                		tmp = Float64(-1.0 / Float64(n / log(x)));
                	elseif (x <= 7.8e-125)
                		tmp = t_0;
                	elseif (x <= 0.043)
                		tmp = Float64(Float64(x - log(x)) / n);
                	else
                		tmp = Float64((x ^ Float64(Float64(1.0 / n) + -1.0)) / n);
                	end
                	return tmp
                end
                
                function tmp_2 = code(x, n)
                	t_0 = (1.0 - ((0.5 + (-0.3333333333333333 / x)) / x)) / (x * n);
                	tmp = 0.0;
                	if (x <= 2.7e-226)
                		tmp = log(x) * (-1.0 / n);
                	elseif (x <= 3.5e-215)
                		tmp = t_0;
                	elseif (x <= 2.05e-129)
                		tmp = -1.0 / (n / log(x));
                	elseif (x <= 7.8e-125)
                		tmp = t_0;
                	elseif (x <= 0.043)
                		tmp = (x - log(x)) / n;
                	else
                		tmp = (x ^ ((1.0 / n) + -1.0)) / n;
                	end
                	tmp_2 = tmp;
                end
                
                code[x_, n_] := Block[{t$95$0 = N[(N[(1.0 - N[(N[(0.5 + N[(-0.3333333333333333 / x), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision] / N[(x * n), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, 2.7e-226], N[(N[Log[x], $MachinePrecision] * N[(-1.0 / n), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 3.5e-215], t$95$0, If[LessEqual[x, 2.05e-129], N[(-1.0 / N[(n / N[Log[x], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 7.8e-125], t$95$0, If[LessEqual[x, 0.043], N[(N[(x - N[Log[x], $MachinePrecision]), $MachinePrecision] / n), $MachinePrecision], N[(N[Power[x, N[(N[(1.0 / n), $MachinePrecision] + -1.0), $MachinePrecision]], $MachinePrecision] / n), $MachinePrecision]]]]]]]
                
                \begin{array}{l}
                
                \\
                \begin{array}{l}
                t_0 := \frac{1 - \frac{0.5 + \frac{-0.3333333333333333}{x}}{x}}{x \cdot n}\\
                \mathbf{if}\;x \leq 2.7 \cdot 10^{-226}:\\
                \;\;\;\;\log x \cdot \frac{-1}{n}\\
                
                \mathbf{elif}\;x \leq 3.5 \cdot 10^{-215}:\\
                \;\;\;\;t\_0\\
                
                \mathbf{elif}\;x \leq 2.05 \cdot 10^{-129}:\\
                \;\;\;\;\frac{-1}{\frac{n}{\log x}}\\
                
                \mathbf{elif}\;x \leq 7.8 \cdot 10^{-125}:\\
                \;\;\;\;t\_0\\
                
                \mathbf{elif}\;x \leq 0.043:\\
                \;\;\;\;\frac{x - \log x}{n}\\
                
                \mathbf{else}:\\
                \;\;\;\;\frac{{x}^{\left(\frac{1}{n} + -1\right)}}{n}\\
                
                
                \end{array}
                \end{array}
                
                Derivation
                1. Split input into 5 regimes
                2. if x < 2.70000000000000014e-226

                  1. Initial program 42.4%

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

                    \[\leadsto \color{blue}{1} - {x}^{\left(\frac{1}{n}\right)} \]
                  4. Step-by-step derivation
                    1. add-cbrt-cube42.4%

                      \[\leadsto \color{blue}{\sqrt[3]{\left(\left(1 - {x}^{\left(\frac{1}{n}\right)}\right) \cdot \left(1 - {x}^{\left(\frac{1}{n}\right)}\right)\right) \cdot \left(1 - {x}^{\left(\frac{1}{n}\right)}\right)}} \]
                    2. pow342.5%

                      \[\leadsto \sqrt[3]{\color{blue}{{\left(1 - {x}^{\left(\frac{1}{n}\right)}\right)}^{3}}} \]
                  5. Applied egg-rr42.5%

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

                    \[\leadsto \sqrt[3]{{\color{blue}{\left(-1 \cdot \frac{\log x}{n}\right)}}^{3}} \]
                  7. Step-by-step derivation
                    1. mul-1-neg57.9%

                      \[\leadsto \color{blue}{-\frac{\log x}{n}} \]
                    2. distribute-neg-frac257.9%

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

                    \[\leadsto \sqrt[3]{{\color{blue}{\left(\frac{\log x}{-n}\right)}}^{3}} \]
                  9. Step-by-step derivation
                    1. rem-cbrt-cube57.9%

                      \[\leadsto \color{blue}{\frac{\log x}{-n}} \]
                    2. frac-2neg57.9%

                      \[\leadsto \color{blue}{\frac{-\log x}{-\left(-n\right)}} \]
                    3. div-inv58.0%

                      \[\leadsto \color{blue}{\left(-\log x\right) \cdot \frac{1}{-\left(-n\right)}} \]
                    4. remove-double-neg58.0%

                      \[\leadsto \left(-\log x\right) \cdot \frac{1}{\color{blue}{n}} \]
                  10. Applied egg-rr58.0%

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

                  if 2.70000000000000014e-226 < x < 3.5000000000000002e-215 or 2.05e-129 < x < 7.79999999999999965e-125

                  1. Initial program 83.9%

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

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

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

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

                      \[\leadsto \color{blue}{\frac{\left(1 + 0.3333333333333333 \cdot \frac{1}{{x}^{2}}\right) - 0.5 \cdot \frac{1}{x}}{n \cdot x}} \]
                    4. Step-by-step derivation
                      1. sub-neg91.9%

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

                        \[\leadsto \frac{\color{blue}{\left(0.3333333333333333 \cdot \frac{1}{{x}^{2}} + 1\right)} + \left(-0.5 \cdot \frac{1}{x}\right)}{n \cdot x} \]
                      3. associate-+l+91.9%

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

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

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

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

                        \[\leadsto \frac{\frac{0.3333333333333333}{{x}^{2}} + \left(1 + \left(-\frac{\color{blue}{0.5}}{x}\right)\right)}{n \cdot x} \]
                      8. distribute-neg-frac91.9%

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

                        \[\leadsto \frac{\frac{0.3333333333333333}{{x}^{2}} + \left(1 + \frac{\color{blue}{-0.5}}{x}\right)}{n \cdot x} \]
                      10. *-commutative91.9%

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

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

                      \[\leadsto \frac{\color{blue}{1 + -1 \cdot \frac{0.5 - 0.3333333333333333 \cdot \frac{1}{x}}{x}}}{x \cdot n} \]
                    7. Step-by-step derivation
                      1. mul-1-neg91.9%

                        \[\leadsto \frac{1 + \color{blue}{\left(-\frac{0.5 - 0.3333333333333333 \cdot \frac{1}{x}}{x}\right)}}{x \cdot n} \]
                      2. unsub-neg91.9%

                        \[\leadsto \frac{\color{blue}{1 - \frac{0.5 - 0.3333333333333333 \cdot \frac{1}{x}}{x}}}{x \cdot n} \]
                      3. sub-neg91.9%

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

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

                        \[\leadsto \frac{1 - \frac{0.5 + \left(-\frac{\color{blue}{0.3333333333333333}}{x}\right)}{x}}{x \cdot n} \]
                      6. distribute-neg-frac91.9%

                        \[\leadsto \frac{1 - \frac{0.5 + \color{blue}{\frac{-0.3333333333333333}{x}}}{x}}{x \cdot n} \]
                      7. metadata-eval91.9%

                        \[\leadsto \frac{1 - \frac{0.5 + \frac{\color{blue}{-0.3333333333333333}}{x}}{x}}{x \cdot n} \]
                    8. Simplified91.9%

                      \[\leadsto \frac{\color{blue}{1 - \frac{0.5 + \frac{-0.3333333333333333}{x}}{x}}}{x \cdot n} \]

                    if 3.5000000000000002e-215 < x < 2.05e-129

                    1. Initial program 27.1%

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

                      \[\leadsto \color{blue}{1} - {x}^{\left(\frac{1}{n}\right)} \]
                    4. Step-by-step derivation
                      1. add-cbrt-cube27.1%

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

                        \[\leadsto \sqrt[3]{\color{blue}{{\left(1 - {x}^{\left(\frac{1}{n}\right)}\right)}^{3}}} \]
                    5. Applied egg-rr27.1%

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

                      \[\leadsto \sqrt[3]{{\color{blue}{\left(-1 \cdot \frac{\log x}{n}\right)}}^{3}} \]
                    7. Step-by-step derivation
                      1. mul-1-neg78.4%

                        \[\leadsto \color{blue}{-\frac{\log x}{n}} \]
                      2. distribute-neg-frac278.4%

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

                      \[\leadsto \sqrt[3]{{\color{blue}{\left(\frac{\log x}{-n}\right)}}^{3}} \]
                    9. Step-by-step derivation
                      1. rem-cbrt-cube78.4%

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

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

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

                        \[\leadsto \frac{\color{blue}{-1}}{-\frac{-n}{\log x}} \]
                      5. add-sqr-sqrt38.8%

                        \[\leadsto \frac{-1}{-\frac{\color{blue}{\sqrt{-n} \cdot \sqrt{-n}}}{\log x}} \]
                      6. sqrt-unprod14.1%

                        \[\leadsto \frac{-1}{-\frac{\color{blue}{\sqrt{\left(-n\right) \cdot \left(-n\right)}}}{\log x}} \]
                      7. sqr-neg14.1%

                        \[\leadsto \frac{-1}{-\frac{\sqrt{\color{blue}{n \cdot n}}}{\log x}} \]
                      8. sqrt-unprod1.9%

                        \[\leadsto \frac{-1}{-\frac{\color{blue}{\sqrt{n} \cdot \sqrt{n}}}{\log x}} \]
                      9. add-sqr-sqrt3.5%

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

                        \[\leadsto \frac{-1}{\color{blue}{\frac{-n}{\log x}}} \]
                      11. add-sqr-sqrt1.6%

                        \[\leadsto \frac{-1}{\frac{\color{blue}{\sqrt{-n} \cdot \sqrt{-n}}}{\log x}} \]
                      12. sqrt-unprod17.7%

                        \[\leadsto \frac{-1}{\frac{\color{blue}{\sqrt{\left(-n\right) \cdot \left(-n\right)}}}{\log x}} \]
                      13. sqr-neg17.7%

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

                        \[\leadsto \frac{-1}{\frac{\color{blue}{\sqrt{n} \cdot \sqrt{n}}}{\log x}} \]
                      15. add-sqr-sqrt78.5%

                        \[\leadsto \frac{-1}{\frac{\color{blue}{n}}{\log x}} \]
                    10. Applied egg-rr78.5%

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

                    if 7.79999999999999965e-125 < x < 0.042999999999999997

                    1. Initial program 37.7%

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

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

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

                    if 0.042999999999999997 < x

                    1. Initial program 68.0%

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

                      \[\leadsto \color{blue}{\frac{e^{-1 \cdot \frac{\log \left(\frac{1}{x}\right)}{n}}}{n \cdot x}} \]
                    4. Step-by-step derivation
                      1. mul-1-neg97.7%

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

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

                        \[\leadsto \frac{e^{-\frac{\color{blue}{-1 \cdot \log x}}{n}}}{n \cdot x} \]
                      4. distribute-neg-frac97.7%

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

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

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

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

                      \[\leadsto \color{blue}{\frac{e^{\frac{\log x}{n}}}{x \cdot n}} \]
                    6. Step-by-step derivation
                      1. *-un-lft-identity97.7%

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

                        \[\leadsto 1 \cdot \color{blue}{\frac{\frac{e^{\frac{\log x}{n}}}{x}}{n}} \]
                      3. div-inv99.2%

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

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

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

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

                      \[\leadsto \color{blue}{1 \cdot \frac{{x}^{\left(\frac{1}{n} - 1\right)}}{n}} \]
                    8. Step-by-step derivation
                      1. *-lft-identity99.1%

                        \[\leadsto \color{blue}{\frac{{x}^{\left(\frac{1}{n} - 1\right)}}{n}} \]
                      2. sub-neg99.1%

                        \[\leadsto \frac{{x}^{\color{blue}{\left(\frac{1}{n} + \left(-1\right)\right)}}}{n} \]
                      3. metadata-eval99.1%

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

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

                    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq 2.7 \cdot 10^{-226}:\\ \;\;\;\;\log x \cdot \frac{-1}{n}\\ \mathbf{elif}\;x \leq 3.5 \cdot 10^{-215}:\\ \;\;\;\;\frac{1 - \frac{0.5 + \frac{-0.3333333333333333}{x}}{x}}{x \cdot n}\\ \mathbf{elif}\;x \leq 2.05 \cdot 10^{-129}:\\ \;\;\;\;\frac{-1}{\frac{n}{\log x}}\\ \mathbf{elif}\;x \leq 7.8 \cdot 10^{-125}:\\ \;\;\;\;\frac{1 - \frac{0.5 + \frac{-0.3333333333333333}{x}}{x}}{x \cdot n}\\ \mathbf{elif}\;x \leq 0.043:\\ \;\;\;\;\frac{x - \log x}{n}\\ \mathbf{else}:\\ \;\;\;\;\frac{{x}^{\left(\frac{1}{n} + -1\right)}}{n}\\ \end{array} \]
                  7. Add Preprocessing

                  Alternative 12: 71.6% accurate, 1.6× speedup?

                  \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;x \leq 1.7 \cdot 10^{-226}:\\ \;\;\;\;\log x \cdot \frac{-1}{n}\\ \mathbf{elif}\;x \leq 4.6 \cdot 10^{-215}:\\ \;\;\;\;\left(1 + \frac{x}{n}\right) - {x}^{\left(\frac{1}{n}\right)}\\ \mathbf{elif}\;x \leq 2.3 \cdot 10^{-129}:\\ \;\;\;\;\frac{-1}{\frac{n}{\log x}}\\ \mathbf{elif}\;x \leq 4.5 \cdot 10^{-125}:\\ \;\;\;\;\frac{1 - \frac{0.5 + \frac{-0.3333333333333333}{x}}{x}}{x \cdot n}\\ \mathbf{elif}\;x \leq 0.046:\\ \;\;\;\;\frac{x - \log x}{n}\\ \mathbf{else}:\\ \;\;\;\;\frac{{x}^{\left(\frac{1}{n} + -1\right)}}{n}\\ \end{array} \end{array} \]
                  (FPCore (x n)
                   :precision binary64
                   (if (<= x 1.7e-226)
                     (* (log x) (/ -1.0 n))
                     (if (<= x 4.6e-215)
                       (- (+ 1.0 (/ x n)) (pow x (/ 1.0 n)))
                       (if (<= x 2.3e-129)
                         (/ -1.0 (/ n (log x)))
                         (if (<= x 4.5e-125)
                           (/ (- 1.0 (/ (+ 0.5 (/ -0.3333333333333333 x)) x)) (* x n))
                           (if (<= x 0.046)
                             (/ (- x (log x)) n)
                             (/ (pow x (+ (/ 1.0 n) -1.0)) n)))))))
                  double code(double x, double n) {
                  	double tmp;
                  	if (x <= 1.7e-226) {
                  		tmp = log(x) * (-1.0 / n);
                  	} else if (x <= 4.6e-215) {
                  		tmp = (1.0 + (x / n)) - pow(x, (1.0 / n));
                  	} else if (x <= 2.3e-129) {
                  		tmp = -1.0 / (n / log(x));
                  	} else if (x <= 4.5e-125) {
                  		tmp = (1.0 - ((0.5 + (-0.3333333333333333 / x)) / x)) / (x * n);
                  	} else if (x <= 0.046) {
                  		tmp = (x - log(x)) / n;
                  	} else {
                  		tmp = pow(x, ((1.0 / n) + -1.0)) / n;
                  	}
                  	return tmp;
                  }
                  
                  real(8) function code(x, n)
                      real(8), intent (in) :: x
                      real(8), intent (in) :: n
                      real(8) :: tmp
                      if (x <= 1.7d-226) then
                          tmp = log(x) * ((-1.0d0) / n)
                      else if (x <= 4.6d-215) then
                          tmp = (1.0d0 + (x / n)) - (x ** (1.0d0 / n))
                      else if (x <= 2.3d-129) then
                          tmp = (-1.0d0) / (n / log(x))
                      else if (x <= 4.5d-125) then
                          tmp = (1.0d0 - ((0.5d0 + ((-0.3333333333333333d0) / x)) / x)) / (x * n)
                      else if (x <= 0.046d0) then
                          tmp = (x - log(x)) / n
                      else
                          tmp = (x ** ((1.0d0 / n) + (-1.0d0))) / n
                      end if
                      code = tmp
                  end function
                  
                  public static double code(double x, double n) {
                  	double tmp;
                  	if (x <= 1.7e-226) {
                  		tmp = Math.log(x) * (-1.0 / n);
                  	} else if (x <= 4.6e-215) {
                  		tmp = (1.0 + (x / n)) - Math.pow(x, (1.0 / n));
                  	} else if (x <= 2.3e-129) {
                  		tmp = -1.0 / (n / Math.log(x));
                  	} else if (x <= 4.5e-125) {
                  		tmp = (1.0 - ((0.5 + (-0.3333333333333333 / x)) / x)) / (x * n);
                  	} else if (x <= 0.046) {
                  		tmp = (x - Math.log(x)) / n;
                  	} else {
                  		tmp = Math.pow(x, ((1.0 / n) + -1.0)) / n;
                  	}
                  	return tmp;
                  }
                  
                  def code(x, n):
                  	tmp = 0
                  	if x <= 1.7e-226:
                  		tmp = math.log(x) * (-1.0 / n)
                  	elif x <= 4.6e-215:
                  		tmp = (1.0 + (x / n)) - math.pow(x, (1.0 / n))
                  	elif x <= 2.3e-129:
                  		tmp = -1.0 / (n / math.log(x))
                  	elif x <= 4.5e-125:
                  		tmp = (1.0 - ((0.5 + (-0.3333333333333333 / x)) / x)) / (x * n)
                  	elif x <= 0.046:
                  		tmp = (x - math.log(x)) / n
                  	else:
                  		tmp = math.pow(x, ((1.0 / n) + -1.0)) / n
                  	return tmp
                  
                  function code(x, n)
                  	tmp = 0.0
                  	if (x <= 1.7e-226)
                  		tmp = Float64(log(x) * Float64(-1.0 / n));
                  	elseif (x <= 4.6e-215)
                  		tmp = Float64(Float64(1.0 + Float64(x / n)) - (x ^ Float64(1.0 / n)));
                  	elseif (x <= 2.3e-129)
                  		tmp = Float64(-1.0 / Float64(n / log(x)));
                  	elseif (x <= 4.5e-125)
                  		tmp = Float64(Float64(1.0 - Float64(Float64(0.5 + Float64(-0.3333333333333333 / x)) / x)) / Float64(x * n));
                  	elseif (x <= 0.046)
                  		tmp = Float64(Float64(x - log(x)) / n);
                  	else
                  		tmp = Float64((x ^ Float64(Float64(1.0 / n) + -1.0)) / n);
                  	end
                  	return tmp
                  end
                  
                  function tmp_2 = code(x, n)
                  	tmp = 0.0;
                  	if (x <= 1.7e-226)
                  		tmp = log(x) * (-1.0 / n);
                  	elseif (x <= 4.6e-215)
                  		tmp = (1.0 + (x / n)) - (x ^ (1.0 / n));
                  	elseif (x <= 2.3e-129)
                  		tmp = -1.0 / (n / log(x));
                  	elseif (x <= 4.5e-125)
                  		tmp = (1.0 - ((0.5 + (-0.3333333333333333 / x)) / x)) / (x * n);
                  	elseif (x <= 0.046)
                  		tmp = (x - log(x)) / n;
                  	else
                  		tmp = (x ^ ((1.0 / n) + -1.0)) / n;
                  	end
                  	tmp_2 = tmp;
                  end
                  
                  code[x_, n_] := If[LessEqual[x, 1.7e-226], N[(N[Log[x], $MachinePrecision] * N[(-1.0 / n), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 4.6e-215], N[(N[(1.0 + N[(x / n), $MachinePrecision]), $MachinePrecision] - N[Power[x, N[(1.0 / n), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 2.3e-129], N[(-1.0 / N[(n / N[Log[x], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 4.5e-125], N[(N[(1.0 - N[(N[(0.5 + N[(-0.3333333333333333 / x), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision] / N[(x * n), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 0.046], N[(N[(x - N[Log[x], $MachinePrecision]), $MachinePrecision] / n), $MachinePrecision], N[(N[Power[x, N[(N[(1.0 / n), $MachinePrecision] + -1.0), $MachinePrecision]], $MachinePrecision] / n), $MachinePrecision]]]]]]
                  
                  \begin{array}{l}
                  
                  \\
                  \begin{array}{l}
                  \mathbf{if}\;x \leq 1.7 \cdot 10^{-226}:\\
                  \;\;\;\;\log x \cdot \frac{-1}{n}\\
                  
                  \mathbf{elif}\;x \leq 4.6 \cdot 10^{-215}:\\
                  \;\;\;\;\left(1 + \frac{x}{n}\right) - {x}^{\left(\frac{1}{n}\right)}\\
                  
                  \mathbf{elif}\;x \leq 2.3 \cdot 10^{-129}:\\
                  \;\;\;\;\frac{-1}{\frac{n}{\log x}}\\
                  
                  \mathbf{elif}\;x \leq 4.5 \cdot 10^{-125}:\\
                  \;\;\;\;\frac{1 - \frac{0.5 + \frac{-0.3333333333333333}{x}}{x}}{x \cdot n}\\
                  
                  \mathbf{elif}\;x \leq 0.046:\\
                  \;\;\;\;\frac{x - \log x}{n}\\
                  
                  \mathbf{else}:\\
                  \;\;\;\;\frac{{x}^{\left(\frac{1}{n} + -1\right)}}{n}\\
                  
                  
                  \end{array}
                  \end{array}
                  
                  Derivation
                  1. Split input into 6 regimes
                  2. if x < 1.70000000000000004e-226

                    1. Initial program 42.4%

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

                      \[\leadsto \color{blue}{1} - {x}^{\left(\frac{1}{n}\right)} \]
                    4. Step-by-step derivation
                      1. add-cbrt-cube42.4%

                        \[\leadsto \color{blue}{\sqrt[3]{\left(\left(1 - {x}^{\left(\frac{1}{n}\right)}\right) \cdot \left(1 - {x}^{\left(\frac{1}{n}\right)}\right)\right) \cdot \left(1 - {x}^{\left(\frac{1}{n}\right)}\right)}} \]
                      2. pow342.5%

                        \[\leadsto \sqrt[3]{\color{blue}{{\left(1 - {x}^{\left(\frac{1}{n}\right)}\right)}^{3}}} \]
                    5. Applied egg-rr42.5%

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

                      \[\leadsto \sqrt[3]{{\color{blue}{\left(-1 \cdot \frac{\log x}{n}\right)}}^{3}} \]
                    7. Step-by-step derivation
                      1. mul-1-neg57.9%

                        \[\leadsto \color{blue}{-\frac{\log x}{n}} \]
                      2. distribute-neg-frac257.9%

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

                      \[\leadsto \sqrt[3]{{\color{blue}{\left(\frac{\log x}{-n}\right)}}^{3}} \]
                    9. Step-by-step derivation
                      1. rem-cbrt-cube57.9%

                        \[\leadsto \color{blue}{\frac{\log x}{-n}} \]
                      2. frac-2neg57.9%

                        \[\leadsto \color{blue}{\frac{-\log x}{-\left(-n\right)}} \]
                      3. div-inv58.0%

                        \[\leadsto \color{blue}{\left(-\log x\right) \cdot \frac{1}{-\left(-n\right)}} \]
                      4. remove-double-neg58.0%

                        \[\leadsto \left(-\log x\right) \cdot \frac{1}{\color{blue}{n}} \]
                    10. Applied egg-rr58.0%

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

                    if 1.70000000000000004e-226 < x < 4.5999999999999998e-215

                    1. Initial program 83.9%

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

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

                    if 4.5999999999999998e-215 < x < 2.3e-129

                    1. Initial program 27.1%

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

                      \[\leadsto \color{blue}{1} - {x}^{\left(\frac{1}{n}\right)} \]
                    4. Step-by-step derivation
                      1. add-cbrt-cube27.1%

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

                        \[\leadsto \sqrt[3]{\color{blue}{{\left(1 - {x}^{\left(\frac{1}{n}\right)}\right)}^{3}}} \]
                    5. Applied egg-rr27.1%

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

                      \[\leadsto \sqrt[3]{{\color{blue}{\left(-1 \cdot \frac{\log x}{n}\right)}}^{3}} \]
                    7. Step-by-step derivation
                      1. mul-1-neg78.4%

                        \[\leadsto \color{blue}{-\frac{\log x}{n}} \]
                      2. distribute-neg-frac278.4%

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

                      \[\leadsto \sqrt[3]{{\color{blue}{\left(\frac{\log x}{-n}\right)}}^{3}} \]
                    9. Step-by-step derivation
                      1. rem-cbrt-cube78.4%

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

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

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

                        \[\leadsto \frac{\color{blue}{-1}}{-\frac{-n}{\log x}} \]
                      5. add-sqr-sqrt38.8%

                        \[\leadsto \frac{-1}{-\frac{\color{blue}{\sqrt{-n} \cdot \sqrt{-n}}}{\log x}} \]
                      6. sqrt-unprod14.1%

                        \[\leadsto \frac{-1}{-\frac{\color{blue}{\sqrt{\left(-n\right) \cdot \left(-n\right)}}}{\log x}} \]
                      7. sqr-neg14.1%

                        \[\leadsto \frac{-1}{-\frac{\sqrt{\color{blue}{n \cdot n}}}{\log x}} \]
                      8. sqrt-unprod1.9%

                        \[\leadsto \frac{-1}{-\frac{\color{blue}{\sqrt{n} \cdot \sqrt{n}}}{\log x}} \]
                      9. add-sqr-sqrt3.5%

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

                        \[\leadsto \frac{-1}{\color{blue}{\frac{-n}{\log x}}} \]
                      11. add-sqr-sqrt1.6%

                        \[\leadsto \frac{-1}{\frac{\color{blue}{\sqrt{-n} \cdot \sqrt{-n}}}{\log x}} \]
                      12. sqrt-unprod17.7%

                        \[\leadsto \frac{-1}{\frac{\color{blue}{\sqrt{\left(-n\right) \cdot \left(-n\right)}}}{\log x}} \]
                      13. sqr-neg17.7%

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

                        \[\leadsto \frac{-1}{\frac{\color{blue}{\sqrt{n} \cdot \sqrt{n}}}{\log x}} \]
                      15. add-sqr-sqrt78.5%

                        \[\leadsto \frac{-1}{\frac{\color{blue}{n}}{\log x}} \]
                    10. Applied egg-rr78.5%

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

                    if 2.3e-129 < x < 4.50000000000000012e-125

                    1. Initial program 83.9%

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

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

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

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

                        \[\leadsto \color{blue}{\frac{\left(1 + 0.3333333333333333 \cdot \frac{1}{{x}^{2}}\right) - 0.5 \cdot \frac{1}{x}}{n \cdot x}} \]
                      4. Step-by-step derivation
                        1. sub-neg100.0%

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

                          \[\leadsto \frac{\color{blue}{\left(0.3333333333333333 \cdot \frac{1}{{x}^{2}} + 1\right)} + \left(-0.5 \cdot \frac{1}{x}\right)}{n \cdot x} \]
                        3. associate-+l+100.0%

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

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

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

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

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

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

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

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

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

                        \[\leadsto \frac{\color{blue}{1 + -1 \cdot \frac{0.5 - 0.3333333333333333 \cdot \frac{1}{x}}{x}}}{x \cdot n} \]
                      7. Step-by-step derivation
                        1. mul-1-neg100.0%

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

                          \[\leadsto \frac{\color{blue}{1 - \frac{0.5 - 0.3333333333333333 \cdot \frac{1}{x}}{x}}}{x \cdot n} \]
                        3. sub-neg100.0%

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

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

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

                          \[\leadsto \frac{1 - \frac{0.5 + \color{blue}{\frac{-0.3333333333333333}{x}}}{x}}{x \cdot n} \]
                        7. metadata-eval100.0%

                          \[\leadsto \frac{1 - \frac{0.5 + \frac{\color{blue}{-0.3333333333333333}}{x}}{x}}{x \cdot n} \]
                      8. Simplified100.0%

                        \[\leadsto \frac{\color{blue}{1 - \frac{0.5 + \frac{-0.3333333333333333}{x}}{x}}}{x \cdot n} \]

                      if 4.50000000000000012e-125 < x < 0.045999999999999999

                      1. Initial program 37.7%

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

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

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

                      if 0.045999999999999999 < x

                      1. Initial program 68.0%

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

                        \[\leadsto \color{blue}{\frac{e^{-1 \cdot \frac{\log \left(\frac{1}{x}\right)}{n}}}{n \cdot x}} \]
                      4. Step-by-step derivation
                        1. mul-1-neg97.7%

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

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

                          \[\leadsto \frac{e^{-\frac{\color{blue}{-1 \cdot \log x}}{n}}}{n \cdot x} \]
                        4. distribute-neg-frac97.7%

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

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

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

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

                        \[\leadsto \color{blue}{\frac{e^{\frac{\log x}{n}}}{x \cdot n}} \]
                      6. Step-by-step derivation
                        1. *-un-lft-identity97.7%

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

                          \[\leadsto 1 \cdot \color{blue}{\frac{\frac{e^{\frac{\log x}{n}}}{x}}{n}} \]
                        3. div-inv99.2%

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

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

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

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

                        \[\leadsto \color{blue}{1 \cdot \frac{{x}^{\left(\frac{1}{n} - 1\right)}}{n}} \]
                      8. Step-by-step derivation
                        1. *-lft-identity99.1%

                          \[\leadsto \color{blue}{\frac{{x}^{\left(\frac{1}{n} - 1\right)}}{n}} \]
                        2. sub-neg99.1%

                          \[\leadsto \frac{{x}^{\color{blue}{\left(\frac{1}{n} + \left(-1\right)\right)}}}{n} \]
                        3. metadata-eval99.1%

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

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

                      \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq 1.7 \cdot 10^{-226}:\\ \;\;\;\;\log x \cdot \frac{-1}{n}\\ \mathbf{elif}\;x \leq 4.6 \cdot 10^{-215}:\\ \;\;\;\;\left(1 + \frac{x}{n}\right) - {x}^{\left(\frac{1}{n}\right)}\\ \mathbf{elif}\;x \leq 2.3 \cdot 10^{-129}:\\ \;\;\;\;\frac{-1}{\frac{n}{\log x}}\\ \mathbf{elif}\;x \leq 4.5 \cdot 10^{-125}:\\ \;\;\;\;\frac{1 - \frac{0.5 + \frac{-0.3333333333333333}{x}}{x}}{x \cdot n}\\ \mathbf{elif}\;x \leq 0.046:\\ \;\;\;\;\frac{x - \log x}{n}\\ \mathbf{else}:\\ \;\;\;\;\frac{{x}^{\left(\frac{1}{n} + -1\right)}}{n}\\ \end{array} \]
                    7. Add Preprocessing

                    Alternative 13: 56.6% accurate, 1.6× speedup?

                    \[\begin{array}{l} \\ \begin{array}{l} t_0 := \frac{-1}{\frac{n}{\log x}}\\ t_1 := \frac{1 - \frac{0.5 + \frac{-0.3333333333333333}{x}}{x}}{x \cdot n}\\ \mathbf{if}\;x \leq 6.1 \cdot 10^{-226}:\\ \;\;\;\;t\_0\\ \mathbf{elif}\;x \leq 3.5 \cdot 10^{-215}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;x \leq 2.3 \cdot 10^{-129}:\\ \;\;\;\;t\_0\\ \mathbf{elif}\;x \leq 4.5 \cdot 10^{-125}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;x \leq 0.85:\\ \;\;\;\;\frac{x - \log x}{n}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{1}{n} + \frac{\frac{-0.5}{n} + \frac{\frac{0.3333333333333333}{x}}{n}}{x}}{x}\\ \end{array} \end{array} \]
                    (FPCore (x n)
                     :precision binary64
                     (let* ((t_0 (/ -1.0 (/ n (log x))))
                            (t_1 (/ (- 1.0 (/ (+ 0.5 (/ -0.3333333333333333 x)) x)) (* x n))))
                       (if (<= x 6.1e-226)
                         t_0
                         (if (<= x 3.5e-215)
                           t_1
                           (if (<= x 2.3e-129)
                             t_0
                             (if (<= x 4.5e-125)
                               t_1
                               (if (<= x 0.85)
                                 (/ (- x (log x)) n)
                                 (/
                                  (+ (/ 1.0 n) (/ (+ (/ -0.5 n) (/ (/ 0.3333333333333333 x) n)) x))
                                  x))))))))
                    double code(double x, double n) {
                    	double t_0 = -1.0 / (n / log(x));
                    	double t_1 = (1.0 - ((0.5 + (-0.3333333333333333 / x)) / x)) / (x * n);
                    	double tmp;
                    	if (x <= 6.1e-226) {
                    		tmp = t_0;
                    	} else if (x <= 3.5e-215) {
                    		tmp = t_1;
                    	} else if (x <= 2.3e-129) {
                    		tmp = t_0;
                    	} else if (x <= 4.5e-125) {
                    		tmp = t_1;
                    	} else if (x <= 0.85) {
                    		tmp = (x - log(x)) / n;
                    	} else {
                    		tmp = ((1.0 / n) + (((-0.5 / n) + ((0.3333333333333333 / x) / n)) / x)) / 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) :: t_1
                        real(8) :: tmp
                        t_0 = (-1.0d0) / (n / log(x))
                        t_1 = (1.0d0 - ((0.5d0 + ((-0.3333333333333333d0) / x)) / x)) / (x * n)
                        if (x <= 6.1d-226) then
                            tmp = t_0
                        else if (x <= 3.5d-215) then
                            tmp = t_1
                        else if (x <= 2.3d-129) then
                            tmp = t_0
                        else if (x <= 4.5d-125) then
                            tmp = t_1
                        else if (x <= 0.85d0) then
                            tmp = (x - log(x)) / n
                        else
                            tmp = ((1.0d0 / n) + ((((-0.5d0) / n) + ((0.3333333333333333d0 / x) / n)) / x)) / x
                        end if
                        code = tmp
                    end function
                    
                    public static double code(double x, double n) {
                    	double t_0 = -1.0 / (n / Math.log(x));
                    	double t_1 = (1.0 - ((0.5 + (-0.3333333333333333 / x)) / x)) / (x * n);
                    	double tmp;
                    	if (x <= 6.1e-226) {
                    		tmp = t_0;
                    	} else if (x <= 3.5e-215) {
                    		tmp = t_1;
                    	} else if (x <= 2.3e-129) {
                    		tmp = t_0;
                    	} else if (x <= 4.5e-125) {
                    		tmp = t_1;
                    	} else if (x <= 0.85) {
                    		tmp = (x - Math.log(x)) / n;
                    	} else {
                    		tmp = ((1.0 / n) + (((-0.5 / n) + ((0.3333333333333333 / x) / n)) / x)) / x;
                    	}
                    	return tmp;
                    }
                    
                    def code(x, n):
                    	t_0 = -1.0 / (n / math.log(x))
                    	t_1 = (1.0 - ((0.5 + (-0.3333333333333333 / x)) / x)) / (x * n)
                    	tmp = 0
                    	if x <= 6.1e-226:
                    		tmp = t_0
                    	elif x <= 3.5e-215:
                    		tmp = t_1
                    	elif x <= 2.3e-129:
                    		tmp = t_0
                    	elif x <= 4.5e-125:
                    		tmp = t_1
                    	elif x <= 0.85:
                    		tmp = (x - math.log(x)) / n
                    	else:
                    		tmp = ((1.0 / n) + (((-0.5 / n) + ((0.3333333333333333 / x) / n)) / x)) / x
                    	return tmp
                    
                    function code(x, n)
                    	t_0 = Float64(-1.0 / Float64(n / log(x)))
                    	t_1 = Float64(Float64(1.0 - Float64(Float64(0.5 + Float64(-0.3333333333333333 / x)) / x)) / Float64(x * n))
                    	tmp = 0.0
                    	if (x <= 6.1e-226)
                    		tmp = t_0;
                    	elseif (x <= 3.5e-215)
                    		tmp = t_1;
                    	elseif (x <= 2.3e-129)
                    		tmp = t_0;
                    	elseif (x <= 4.5e-125)
                    		tmp = t_1;
                    	elseif (x <= 0.85)
                    		tmp = Float64(Float64(x - log(x)) / n);
                    	else
                    		tmp = Float64(Float64(Float64(1.0 / n) + Float64(Float64(Float64(-0.5 / n) + Float64(Float64(0.3333333333333333 / x) / n)) / x)) / x);
                    	end
                    	return tmp
                    end
                    
                    function tmp_2 = code(x, n)
                    	t_0 = -1.0 / (n / log(x));
                    	t_1 = (1.0 - ((0.5 + (-0.3333333333333333 / x)) / x)) / (x * n);
                    	tmp = 0.0;
                    	if (x <= 6.1e-226)
                    		tmp = t_0;
                    	elseif (x <= 3.5e-215)
                    		tmp = t_1;
                    	elseif (x <= 2.3e-129)
                    		tmp = t_0;
                    	elseif (x <= 4.5e-125)
                    		tmp = t_1;
                    	elseif (x <= 0.85)
                    		tmp = (x - log(x)) / n;
                    	else
                    		tmp = ((1.0 / n) + (((-0.5 / n) + ((0.3333333333333333 / x) / n)) / x)) / x;
                    	end
                    	tmp_2 = tmp;
                    end
                    
                    code[x_, n_] := Block[{t$95$0 = N[(-1.0 / N[(n / N[Log[x], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(N[(1.0 - N[(N[(0.5 + N[(-0.3333333333333333 / x), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision] / N[(x * n), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, 6.1e-226], t$95$0, If[LessEqual[x, 3.5e-215], t$95$1, If[LessEqual[x, 2.3e-129], t$95$0, If[LessEqual[x, 4.5e-125], t$95$1, If[LessEqual[x, 0.85], N[(N[(x - N[Log[x], $MachinePrecision]), $MachinePrecision] / n), $MachinePrecision], N[(N[(N[(1.0 / n), $MachinePrecision] + N[(N[(N[(-0.5 / n), $MachinePrecision] + N[(N[(0.3333333333333333 / x), $MachinePrecision] / n), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision]]]]]]]]
                    
                    \begin{array}{l}
                    
                    \\
                    \begin{array}{l}
                    t_0 := \frac{-1}{\frac{n}{\log x}}\\
                    t_1 := \frac{1 - \frac{0.5 + \frac{-0.3333333333333333}{x}}{x}}{x \cdot n}\\
                    \mathbf{if}\;x \leq 6.1 \cdot 10^{-226}:\\
                    \;\;\;\;t\_0\\
                    
                    \mathbf{elif}\;x \leq 3.5 \cdot 10^{-215}:\\
                    \;\;\;\;t\_1\\
                    
                    \mathbf{elif}\;x \leq 2.3 \cdot 10^{-129}:\\
                    \;\;\;\;t\_0\\
                    
                    \mathbf{elif}\;x \leq 4.5 \cdot 10^{-125}:\\
                    \;\;\;\;t\_1\\
                    
                    \mathbf{elif}\;x \leq 0.85:\\
                    \;\;\;\;\frac{x - \log x}{n}\\
                    
                    \mathbf{else}:\\
                    \;\;\;\;\frac{\frac{1}{n} + \frac{\frac{-0.5}{n} + \frac{\frac{0.3333333333333333}{x}}{n}}{x}}{x}\\
                    
                    
                    \end{array}
                    \end{array}
                    
                    Derivation
                    1. Split input into 4 regimes
                    2. if x < 6.0999999999999998e-226 or 3.5000000000000002e-215 < x < 2.3e-129

                      1. Initial program 35.8%

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

                        \[\leadsto \color{blue}{1} - {x}^{\left(\frac{1}{n}\right)} \]
                      4. Step-by-step derivation
                        1. add-cbrt-cube35.8%

                          \[\leadsto \color{blue}{\sqrt[3]{\left(\left(1 - {x}^{\left(\frac{1}{n}\right)}\right) \cdot \left(1 - {x}^{\left(\frac{1}{n}\right)}\right)\right) \cdot \left(1 - {x}^{\left(\frac{1}{n}\right)}\right)}} \]
                        2. pow335.9%

                          \[\leadsto \sqrt[3]{\color{blue}{{\left(1 - {x}^{\left(\frac{1}{n}\right)}\right)}^{3}}} \]
                      5. Applied egg-rr35.9%

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

                        \[\leadsto \sqrt[3]{{\color{blue}{\left(-1 \cdot \frac{\log x}{n}\right)}}^{3}} \]
                      7. Step-by-step derivation
                        1. mul-1-neg66.7%

                          \[\leadsto \color{blue}{-\frac{\log x}{n}} \]
                        2. distribute-neg-frac266.7%

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

                        \[\leadsto \sqrt[3]{{\color{blue}{\left(\frac{\log x}{-n}\right)}}^{3}} \]
                      9. Step-by-step derivation
                        1. rem-cbrt-cube66.7%

                          \[\leadsto \color{blue}{\frac{\log x}{-n}} \]
                        2. clear-num66.8%

                          \[\leadsto \color{blue}{\frac{1}{\frac{-n}{\log x}}} \]
                        3. frac-2neg66.8%

                          \[\leadsto \color{blue}{\frac{-1}{-\frac{-n}{\log x}}} \]
                        4. metadata-eval66.8%

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

                          \[\leadsto \frac{-1}{-\frac{\color{blue}{\sqrt{-n} \cdot \sqrt{-n}}}{\log x}} \]
                        6. sqrt-unprod22.1%

                          \[\leadsto \frac{-1}{-\frac{\color{blue}{\sqrt{\left(-n\right) \cdot \left(-n\right)}}}{\log x}} \]
                        7. sqr-neg22.1%

                          \[\leadsto \frac{-1}{-\frac{\sqrt{\color{blue}{n \cdot n}}}{\log x}} \]
                        8. sqrt-unprod1.5%

                          \[\leadsto \frac{-1}{-\frac{\color{blue}{\sqrt{n} \cdot \sqrt{n}}}{\log x}} \]
                        9. add-sqr-sqrt2.8%

                          \[\leadsto \frac{-1}{-\frac{\color{blue}{n}}{\log x}} \]
                        10. distribute-frac-neg2.8%

                          \[\leadsto \frac{-1}{\color{blue}{\frac{-n}{\log x}}} \]
                        11. add-sqr-sqrt1.3%

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

                          \[\leadsto \frac{-1}{\frac{\color{blue}{\sqrt{\left(-n\right) \cdot \left(-n\right)}}}{\log x}} \]
                        13. sqr-neg18.2%

                          \[\leadsto \frac{-1}{\frac{\sqrt{\color{blue}{n \cdot n}}}{\log x}} \]
                        14. sqrt-unprod33.4%

                          \[\leadsto \frac{-1}{\frac{\color{blue}{\sqrt{n} \cdot \sqrt{n}}}{\log x}} \]
                        15. add-sqr-sqrt66.8%

                          \[\leadsto \frac{-1}{\frac{\color{blue}{n}}{\log x}} \]
                      10. Applied egg-rr66.8%

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

                      if 6.0999999999999998e-226 < x < 3.5000000000000002e-215 or 2.3e-129 < x < 4.50000000000000012e-125

                      1. Initial program 83.9%

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

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

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

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

                          \[\leadsto \color{blue}{\frac{\left(1 + 0.3333333333333333 \cdot \frac{1}{{x}^{2}}\right) - 0.5 \cdot \frac{1}{x}}{n \cdot x}} \]
                        4. Step-by-step derivation
                          1. sub-neg91.9%

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

                            \[\leadsto \frac{\color{blue}{\left(0.3333333333333333 \cdot \frac{1}{{x}^{2}} + 1\right)} + \left(-0.5 \cdot \frac{1}{x}\right)}{n \cdot x} \]
                          3. associate-+l+91.9%

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

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

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

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

                            \[\leadsto \frac{\frac{0.3333333333333333}{{x}^{2}} + \left(1 + \left(-\frac{\color{blue}{0.5}}{x}\right)\right)}{n \cdot x} \]
                          8. distribute-neg-frac91.9%

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

                            \[\leadsto \frac{\frac{0.3333333333333333}{{x}^{2}} + \left(1 + \frac{\color{blue}{-0.5}}{x}\right)}{n \cdot x} \]
                          10. *-commutative91.9%

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

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

                          \[\leadsto \frac{\color{blue}{1 + -1 \cdot \frac{0.5 - 0.3333333333333333 \cdot \frac{1}{x}}{x}}}{x \cdot n} \]
                        7. Step-by-step derivation
                          1. mul-1-neg91.9%

                            \[\leadsto \frac{1 + \color{blue}{\left(-\frac{0.5 - 0.3333333333333333 \cdot \frac{1}{x}}{x}\right)}}{x \cdot n} \]
                          2. unsub-neg91.9%

                            \[\leadsto \frac{\color{blue}{1 - \frac{0.5 - 0.3333333333333333 \cdot \frac{1}{x}}{x}}}{x \cdot n} \]
                          3. sub-neg91.9%

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

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

                            \[\leadsto \frac{1 - \frac{0.5 + \left(-\frac{\color{blue}{0.3333333333333333}}{x}\right)}{x}}{x \cdot n} \]
                          6. distribute-neg-frac91.9%

                            \[\leadsto \frac{1 - \frac{0.5 + \color{blue}{\frac{-0.3333333333333333}{x}}}{x}}{x \cdot n} \]
                          7. metadata-eval91.9%

                            \[\leadsto \frac{1 - \frac{0.5 + \frac{\color{blue}{-0.3333333333333333}}{x}}{x}}{x \cdot n} \]
                        8. Simplified91.9%

                          \[\leadsto \frac{\color{blue}{1 - \frac{0.5 + \frac{-0.3333333333333333}{x}}{x}}}{x \cdot n} \]

                        if 4.50000000000000012e-125 < x < 0.849999999999999978

                        1. Initial program 37.7%

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

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

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

                        if 0.849999999999999978 < x

                        1. Initial program 68.0%

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

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

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

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

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

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

                              \[\leadsto \frac{\color{blue}{\left(0.3333333333333333 \cdot \frac{1}{{x}^{2}} + 1\right)} + \left(-0.5 \cdot \frac{1}{x}\right)}{n \cdot x} \]
                            3. associate-+l+63.1%

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

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

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

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

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

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

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

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

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

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

                              \[\leadsto \color{blue}{\frac{\frac{1}{n} + \frac{\frac{\frac{0.3333333333333333}{x}}{n} + \frac{-0.5}{n}}{x}}{x}} \]
                          8. Recombined 4 regimes into one program.
                          9. Final simplification65.4%

                            \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq 6.1 \cdot 10^{-226}:\\ \;\;\;\;\frac{-1}{\frac{n}{\log x}}\\ \mathbf{elif}\;x \leq 3.5 \cdot 10^{-215}:\\ \;\;\;\;\frac{1 - \frac{0.5 + \frac{-0.3333333333333333}{x}}{x}}{x \cdot n}\\ \mathbf{elif}\;x \leq 2.3 \cdot 10^{-129}:\\ \;\;\;\;\frac{-1}{\frac{n}{\log x}}\\ \mathbf{elif}\;x \leq 4.5 \cdot 10^{-125}:\\ \;\;\;\;\frac{1 - \frac{0.5 + \frac{-0.3333333333333333}{x}}{x}}{x \cdot n}\\ \mathbf{elif}\;x \leq 0.85:\\ \;\;\;\;\frac{x - \log x}{n}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{1}{n} + \frac{\frac{-0.5}{n} + \frac{\frac{0.3333333333333333}{x}}{n}}{x}}{x}\\ \end{array} \]
                          10. Add Preprocessing

                          Alternative 14: 56.5% accurate, 1.6× speedup?

                          \[\begin{array}{l} \\ \begin{array}{l} t_0 := \frac{1 - \frac{0.5 + \frac{-0.3333333333333333}{x}}{x}}{x \cdot n}\\ \mathbf{if}\;x \leq 5.5 \cdot 10^{-226}:\\ \;\;\;\;\log x \cdot \frac{-1}{n}\\ \mathbf{elif}\;x \leq 3.5 \cdot 10^{-215}:\\ \;\;\;\;t\_0\\ \mathbf{elif}\;x \leq 2.05 \cdot 10^{-129}:\\ \;\;\;\;\frac{-1}{\frac{n}{\log x}}\\ \mathbf{elif}\;x \leq 4.5 \cdot 10^{-125}:\\ \;\;\;\;t\_0\\ \mathbf{elif}\;x \leq 0.85:\\ \;\;\;\;\frac{x - \log x}{n}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{1}{n} + \frac{\frac{-0.5}{n} + \frac{\frac{0.3333333333333333}{x}}{n}}{x}}{x}\\ \end{array} \end{array} \]
                          (FPCore (x n)
                           :precision binary64
                           (let* ((t_0 (/ (- 1.0 (/ (+ 0.5 (/ -0.3333333333333333 x)) x)) (* x n))))
                             (if (<= x 5.5e-226)
                               (* (log x) (/ -1.0 n))
                               (if (<= x 3.5e-215)
                                 t_0
                                 (if (<= x 2.05e-129)
                                   (/ -1.0 (/ n (log x)))
                                   (if (<= x 4.5e-125)
                                     t_0
                                     (if (<= x 0.85)
                                       (/ (- x (log x)) n)
                                       (/
                                        (+ (/ 1.0 n) (/ (+ (/ -0.5 n) (/ (/ 0.3333333333333333 x) n)) x))
                                        x))))))))
                          double code(double x, double n) {
                          	double t_0 = (1.0 - ((0.5 + (-0.3333333333333333 / x)) / x)) / (x * n);
                          	double tmp;
                          	if (x <= 5.5e-226) {
                          		tmp = log(x) * (-1.0 / n);
                          	} else if (x <= 3.5e-215) {
                          		tmp = t_0;
                          	} else if (x <= 2.05e-129) {
                          		tmp = -1.0 / (n / log(x));
                          	} else if (x <= 4.5e-125) {
                          		tmp = t_0;
                          	} else if (x <= 0.85) {
                          		tmp = (x - log(x)) / n;
                          	} else {
                          		tmp = ((1.0 / n) + (((-0.5 / n) + ((0.3333333333333333 / x) / n)) / x)) / 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 - ((0.5d0 + ((-0.3333333333333333d0) / x)) / x)) / (x * n)
                              if (x <= 5.5d-226) then
                                  tmp = log(x) * ((-1.0d0) / n)
                              else if (x <= 3.5d-215) then
                                  tmp = t_0
                              else if (x <= 2.05d-129) then
                                  tmp = (-1.0d0) / (n / log(x))
                              else if (x <= 4.5d-125) then
                                  tmp = t_0
                              else if (x <= 0.85d0) then
                                  tmp = (x - log(x)) / n
                              else
                                  tmp = ((1.0d0 / n) + ((((-0.5d0) / n) + ((0.3333333333333333d0 / x) / n)) / x)) / x
                              end if
                              code = tmp
                          end function
                          
                          public static double code(double x, double n) {
                          	double t_0 = (1.0 - ((0.5 + (-0.3333333333333333 / x)) / x)) / (x * n);
                          	double tmp;
                          	if (x <= 5.5e-226) {
                          		tmp = Math.log(x) * (-1.0 / n);
                          	} else if (x <= 3.5e-215) {
                          		tmp = t_0;
                          	} else if (x <= 2.05e-129) {
                          		tmp = -1.0 / (n / Math.log(x));
                          	} else if (x <= 4.5e-125) {
                          		tmp = t_0;
                          	} else if (x <= 0.85) {
                          		tmp = (x - Math.log(x)) / n;
                          	} else {
                          		tmp = ((1.0 / n) + (((-0.5 / n) + ((0.3333333333333333 / x) / n)) / x)) / x;
                          	}
                          	return tmp;
                          }
                          
                          def code(x, n):
                          	t_0 = (1.0 - ((0.5 + (-0.3333333333333333 / x)) / x)) / (x * n)
                          	tmp = 0
                          	if x <= 5.5e-226:
                          		tmp = math.log(x) * (-1.0 / n)
                          	elif x <= 3.5e-215:
                          		tmp = t_0
                          	elif x <= 2.05e-129:
                          		tmp = -1.0 / (n / math.log(x))
                          	elif x <= 4.5e-125:
                          		tmp = t_0
                          	elif x <= 0.85:
                          		tmp = (x - math.log(x)) / n
                          	else:
                          		tmp = ((1.0 / n) + (((-0.5 / n) + ((0.3333333333333333 / x) / n)) / x)) / x
                          	return tmp
                          
                          function code(x, n)
                          	t_0 = Float64(Float64(1.0 - Float64(Float64(0.5 + Float64(-0.3333333333333333 / x)) / x)) / Float64(x * n))
                          	tmp = 0.0
                          	if (x <= 5.5e-226)
                          		tmp = Float64(log(x) * Float64(-1.0 / n));
                          	elseif (x <= 3.5e-215)
                          		tmp = t_0;
                          	elseif (x <= 2.05e-129)
                          		tmp = Float64(-1.0 / Float64(n / log(x)));
                          	elseif (x <= 4.5e-125)
                          		tmp = t_0;
                          	elseif (x <= 0.85)
                          		tmp = Float64(Float64(x - log(x)) / n);
                          	else
                          		tmp = Float64(Float64(Float64(1.0 / n) + Float64(Float64(Float64(-0.5 / n) + Float64(Float64(0.3333333333333333 / x) / n)) / x)) / x);
                          	end
                          	return tmp
                          end
                          
                          function tmp_2 = code(x, n)
                          	t_0 = (1.0 - ((0.5 + (-0.3333333333333333 / x)) / x)) / (x * n);
                          	tmp = 0.0;
                          	if (x <= 5.5e-226)
                          		tmp = log(x) * (-1.0 / n);
                          	elseif (x <= 3.5e-215)
                          		tmp = t_0;
                          	elseif (x <= 2.05e-129)
                          		tmp = -1.0 / (n / log(x));
                          	elseif (x <= 4.5e-125)
                          		tmp = t_0;
                          	elseif (x <= 0.85)
                          		tmp = (x - log(x)) / n;
                          	else
                          		tmp = ((1.0 / n) + (((-0.5 / n) + ((0.3333333333333333 / x) / n)) / x)) / x;
                          	end
                          	tmp_2 = tmp;
                          end
                          
                          code[x_, n_] := Block[{t$95$0 = N[(N[(1.0 - N[(N[(0.5 + N[(-0.3333333333333333 / x), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision] / N[(x * n), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, 5.5e-226], N[(N[Log[x], $MachinePrecision] * N[(-1.0 / n), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 3.5e-215], t$95$0, If[LessEqual[x, 2.05e-129], N[(-1.0 / N[(n / N[Log[x], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 4.5e-125], t$95$0, If[LessEqual[x, 0.85], N[(N[(x - N[Log[x], $MachinePrecision]), $MachinePrecision] / n), $MachinePrecision], N[(N[(N[(1.0 / n), $MachinePrecision] + N[(N[(N[(-0.5 / n), $MachinePrecision] + N[(N[(0.3333333333333333 / x), $MachinePrecision] / n), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision]]]]]]]
                          
                          \begin{array}{l}
                          
                          \\
                          \begin{array}{l}
                          t_0 := \frac{1 - \frac{0.5 + \frac{-0.3333333333333333}{x}}{x}}{x \cdot n}\\
                          \mathbf{if}\;x \leq 5.5 \cdot 10^{-226}:\\
                          \;\;\;\;\log x \cdot \frac{-1}{n}\\
                          
                          \mathbf{elif}\;x \leq 3.5 \cdot 10^{-215}:\\
                          \;\;\;\;t\_0\\
                          
                          \mathbf{elif}\;x \leq 2.05 \cdot 10^{-129}:\\
                          \;\;\;\;\frac{-1}{\frac{n}{\log x}}\\
                          
                          \mathbf{elif}\;x \leq 4.5 \cdot 10^{-125}:\\
                          \;\;\;\;t\_0\\
                          
                          \mathbf{elif}\;x \leq 0.85:\\
                          \;\;\;\;\frac{x - \log x}{n}\\
                          
                          \mathbf{else}:\\
                          \;\;\;\;\frac{\frac{1}{n} + \frac{\frac{-0.5}{n} + \frac{\frac{0.3333333333333333}{x}}{n}}{x}}{x}\\
                          
                          
                          \end{array}
                          \end{array}
                          
                          Derivation
                          1. Split input into 5 regimes
                          2. if x < 5.5e-226

                            1. Initial program 42.4%

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

                              \[\leadsto \color{blue}{1} - {x}^{\left(\frac{1}{n}\right)} \]
                            4. Step-by-step derivation
                              1. add-cbrt-cube42.4%

                                \[\leadsto \color{blue}{\sqrt[3]{\left(\left(1 - {x}^{\left(\frac{1}{n}\right)}\right) \cdot \left(1 - {x}^{\left(\frac{1}{n}\right)}\right)\right) \cdot \left(1 - {x}^{\left(\frac{1}{n}\right)}\right)}} \]
                              2. pow342.5%

                                \[\leadsto \sqrt[3]{\color{blue}{{\left(1 - {x}^{\left(\frac{1}{n}\right)}\right)}^{3}}} \]
                            5. Applied egg-rr42.5%

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

                              \[\leadsto \sqrt[3]{{\color{blue}{\left(-1 \cdot \frac{\log x}{n}\right)}}^{3}} \]
                            7. Step-by-step derivation
                              1. mul-1-neg57.9%

                                \[\leadsto \color{blue}{-\frac{\log x}{n}} \]
                              2. distribute-neg-frac257.9%

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

                              \[\leadsto \sqrt[3]{{\color{blue}{\left(\frac{\log x}{-n}\right)}}^{3}} \]
                            9. Step-by-step derivation
                              1. rem-cbrt-cube57.9%

                                \[\leadsto \color{blue}{\frac{\log x}{-n}} \]
                              2. frac-2neg57.9%

                                \[\leadsto \color{blue}{\frac{-\log x}{-\left(-n\right)}} \]
                              3. div-inv58.0%

                                \[\leadsto \color{blue}{\left(-\log x\right) \cdot \frac{1}{-\left(-n\right)}} \]
                              4. remove-double-neg58.0%

                                \[\leadsto \left(-\log x\right) \cdot \frac{1}{\color{blue}{n}} \]
                            10. Applied egg-rr58.0%

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

                            if 5.5e-226 < x < 3.5000000000000002e-215 or 2.05e-129 < x < 4.50000000000000012e-125

                            1. Initial program 83.9%

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

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

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

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

                                \[\leadsto \color{blue}{\frac{\left(1 + 0.3333333333333333 \cdot \frac{1}{{x}^{2}}\right) - 0.5 \cdot \frac{1}{x}}{n \cdot x}} \]
                              4. Step-by-step derivation
                                1. sub-neg91.9%

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

                                  \[\leadsto \frac{\color{blue}{\left(0.3333333333333333 \cdot \frac{1}{{x}^{2}} + 1\right)} + \left(-0.5 \cdot \frac{1}{x}\right)}{n \cdot x} \]
                                3. associate-+l+91.9%

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

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

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

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

                                  \[\leadsto \frac{\frac{0.3333333333333333}{{x}^{2}} + \left(1 + \left(-\frac{\color{blue}{0.5}}{x}\right)\right)}{n \cdot x} \]
                                8. distribute-neg-frac91.9%

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

                                  \[\leadsto \frac{\frac{0.3333333333333333}{{x}^{2}} + \left(1 + \frac{\color{blue}{-0.5}}{x}\right)}{n \cdot x} \]
                                10. *-commutative91.9%

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

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

                                \[\leadsto \frac{\color{blue}{1 + -1 \cdot \frac{0.5 - 0.3333333333333333 \cdot \frac{1}{x}}{x}}}{x \cdot n} \]
                              7. Step-by-step derivation
                                1. mul-1-neg91.9%

                                  \[\leadsto \frac{1 + \color{blue}{\left(-\frac{0.5 - 0.3333333333333333 \cdot \frac{1}{x}}{x}\right)}}{x \cdot n} \]
                                2. unsub-neg91.9%

                                  \[\leadsto \frac{\color{blue}{1 - \frac{0.5 - 0.3333333333333333 \cdot \frac{1}{x}}{x}}}{x \cdot n} \]
                                3. sub-neg91.9%

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

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

                                  \[\leadsto \frac{1 - \frac{0.5 + \left(-\frac{\color{blue}{0.3333333333333333}}{x}\right)}{x}}{x \cdot n} \]
                                6. distribute-neg-frac91.9%

                                  \[\leadsto \frac{1 - \frac{0.5 + \color{blue}{\frac{-0.3333333333333333}{x}}}{x}}{x \cdot n} \]
                                7. metadata-eval91.9%

                                  \[\leadsto \frac{1 - \frac{0.5 + \frac{\color{blue}{-0.3333333333333333}}{x}}{x}}{x \cdot n} \]
                              8. Simplified91.9%

                                \[\leadsto \frac{\color{blue}{1 - \frac{0.5 + \frac{-0.3333333333333333}{x}}{x}}}{x \cdot n} \]

                              if 3.5000000000000002e-215 < x < 2.05e-129

                              1. Initial program 27.1%

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

                                \[\leadsto \color{blue}{1} - {x}^{\left(\frac{1}{n}\right)} \]
                              4. Step-by-step derivation
                                1. add-cbrt-cube27.1%

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

                                  \[\leadsto \sqrt[3]{\color{blue}{{\left(1 - {x}^{\left(\frac{1}{n}\right)}\right)}^{3}}} \]
                              5. Applied egg-rr27.1%

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

                                \[\leadsto \sqrt[3]{{\color{blue}{\left(-1 \cdot \frac{\log x}{n}\right)}}^{3}} \]
                              7. Step-by-step derivation
                                1. mul-1-neg78.4%

                                  \[\leadsto \color{blue}{-\frac{\log x}{n}} \]
                                2. distribute-neg-frac278.4%

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

                                \[\leadsto \sqrt[3]{{\color{blue}{\left(\frac{\log x}{-n}\right)}}^{3}} \]
                              9. Step-by-step derivation
                                1. rem-cbrt-cube78.4%

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

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

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

                                  \[\leadsto \frac{\color{blue}{-1}}{-\frac{-n}{\log x}} \]
                                5. add-sqr-sqrt38.8%

                                  \[\leadsto \frac{-1}{-\frac{\color{blue}{\sqrt{-n} \cdot \sqrt{-n}}}{\log x}} \]
                                6. sqrt-unprod14.1%

                                  \[\leadsto \frac{-1}{-\frac{\color{blue}{\sqrt{\left(-n\right) \cdot \left(-n\right)}}}{\log x}} \]
                                7. sqr-neg14.1%

                                  \[\leadsto \frac{-1}{-\frac{\sqrt{\color{blue}{n \cdot n}}}{\log x}} \]
                                8. sqrt-unprod1.9%

                                  \[\leadsto \frac{-1}{-\frac{\color{blue}{\sqrt{n} \cdot \sqrt{n}}}{\log x}} \]
                                9. add-sqr-sqrt3.5%

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

                                  \[\leadsto \frac{-1}{\color{blue}{\frac{-n}{\log x}}} \]
                                11. add-sqr-sqrt1.6%

                                  \[\leadsto \frac{-1}{\frac{\color{blue}{\sqrt{-n} \cdot \sqrt{-n}}}{\log x}} \]
                                12. sqrt-unprod17.7%

                                  \[\leadsto \frac{-1}{\frac{\color{blue}{\sqrt{\left(-n\right) \cdot \left(-n\right)}}}{\log x}} \]
                                13. sqr-neg17.7%

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

                                  \[\leadsto \frac{-1}{\frac{\color{blue}{\sqrt{n} \cdot \sqrt{n}}}{\log x}} \]
                                15. add-sqr-sqrt78.5%

                                  \[\leadsto \frac{-1}{\frac{\color{blue}{n}}{\log x}} \]
                              10. Applied egg-rr78.5%

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

                              if 4.50000000000000012e-125 < x < 0.849999999999999978

                              1. Initial program 37.7%

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

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

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

                              if 0.849999999999999978 < x

                              1. Initial program 68.0%

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

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

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

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

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

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

                                    \[\leadsto \frac{\color{blue}{\left(0.3333333333333333 \cdot \frac{1}{{x}^{2}} + 1\right)} + \left(-0.5 \cdot \frac{1}{x}\right)}{n \cdot x} \]
                                  3. associate-+l+63.1%

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

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

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

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

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

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

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

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

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

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

                                    \[\leadsto \color{blue}{\frac{\frac{1}{n} + \frac{\frac{\frac{0.3333333333333333}{x}}{n} + \frac{-0.5}{n}}{x}}{x}} \]
                                8. Recombined 5 regimes into one program.
                                9. Final simplification65.4%

                                  \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq 5.5 \cdot 10^{-226}:\\ \;\;\;\;\log x \cdot \frac{-1}{n}\\ \mathbf{elif}\;x \leq 3.5 \cdot 10^{-215}:\\ \;\;\;\;\frac{1 - \frac{0.5 + \frac{-0.3333333333333333}{x}}{x}}{x \cdot n}\\ \mathbf{elif}\;x \leq 2.05 \cdot 10^{-129}:\\ \;\;\;\;\frac{-1}{\frac{n}{\log x}}\\ \mathbf{elif}\;x \leq 4.5 \cdot 10^{-125}:\\ \;\;\;\;\frac{1 - \frac{0.5 + \frac{-0.3333333333333333}{x}}{x}}{x \cdot n}\\ \mathbf{elif}\;x \leq 0.85:\\ \;\;\;\;\frac{x - \log x}{n}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{1}{n} + \frac{\frac{-0.5}{n} + \frac{\frac{0.3333333333333333}{x}}{n}}{x}}{x}\\ \end{array} \]
                                10. Add Preprocessing

                                Alternative 15: 56.3% accurate, 1.6× speedup?

                                \[\begin{array}{l} \\ \begin{array}{l} t_0 := \frac{\log x}{-n}\\ t_1 := \frac{1 - \frac{0.5 + \frac{-0.3333333333333333}{x}}{x}}{x \cdot n}\\ \mathbf{if}\;x \leq 5.5 \cdot 10^{-226}:\\ \;\;\;\;t\_0\\ \mathbf{elif}\;x \leq 3.5 \cdot 10^{-215}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;x \leq 2.3 \cdot 10^{-129}:\\ \;\;\;\;t\_0\\ \mathbf{elif}\;x \leq 4.8 \cdot 10^{-125}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;x \leq 0.6:\\ \;\;\;\;t\_0\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{1}{n} + \frac{\frac{-0.5}{n} + \frac{\frac{0.3333333333333333}{x}}{n}}{x}}{x}\\ \end{array} \end{array} \]
                                (FPCore (x n)
                                 :precision binary64
                                 (let* ((t_0 (/ (log x) (- n)))
                                        (t_1 (/ (- 1.0 (/ (+ 0.5 (/ -0.3333333333333333 x)) x)) (* x n))))
                                   (if (<= x 5.5e-226)
                                     t_0
                                     (if (<= x 3.5e-215)
                                       t_1
                                       (if (<= x 2.3e-129)
                                         t_0
                                         (if (<= x 4.8e-125)
                                           t_1
                                           (if (<= x 0.6)
                                             t_0
                                             (/
                                              (+ (/ 1.0 n) (/ (+ (/ -0.5 n) (/ (/ 0.3333333333333333 x) n)) x))
                                              x))))))))
                                double code(double x, double n) {
                                	double t_0 = log(x) / -n;
                                	double t_1 = (1.0 - ((0.5 + (-0.3333333333333333 / x)) / x)) / (x * n);
                                	double tmp;
                                	if (x <= 5.5e-226) {
                                		tmp = t_0;
                                	} else if (x <= 3.5e-215) {
                                		tmp = t_1;
                                	} else if (x <= 2.3e-129) {
                                		tmp = t_0;
                                	} else if (x <= 4.8e-125) {
                                		tmp = t_1;
                                	} else if (x <= 0.6) {
                                		tmp = t_0;
                                	} else {
                                		tmp = ((1.0 / n) + (((-0.5 / n) + ((0.3333333333333333 / x) / n)) / x)) / 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) :: t_1
                                    real(8) :: tmp
                                    t_0 = log(x) / -n
                                    t_1 = (1.0d0 - ((0.5d0 + ((-0.3333333333333333d0) / x)) / x)) / (x * n)
                                    if (x <= 5.5d-226) then
                                        tmp = t_0
                                    else if (x <= 3.5d-215) then
                                        tmp = t_1
                                    else if (x <= 2.3d-129) then
                                        tmp = t_0
                                    else if (x <= 4.8d-125) then
                                        tmp = t_1
                                    else if (x <= 0.6d0) then
                                        tmp = t_0
                                    else
                                        tmp = ((1.0d0 / n) + ((((-0.5d0) / n) + ((0.3333333333333333d0 / x) / n)) / x)) / x
                                    end if
                                    code = tmp
                                end function
                                
                                public static double code(double x, double n) {
                                	double t_0 = Math.log(x) / -n;
                                	double t_1 = (1.0 - ((0.5 + (-0.3333333333333333 / x)) / x)) / (x * n);
                                	double tmp;
                                	if (x <= 5.5e-226) {
                                		tmp = t_0;
                                	} else if (x <= 3.5e-215) {
                                		tmp = t_1;
                                	} else if (x <= 2.3e-129) {
                                		tmp = t_0;
                                	} else if (x <= 4.8e-125) {
                                		tmp = t_1;
                                	} else if (x <= 0.6) {
                                		tmp = t_0;
                                	} else {
                                		tmp = ((1.0 / n) + (((-0.5 / n) + ((0.3333333333333333 / x) / n)) / x)) / x;
                                	}
                                	return tmp;
                                }
                                
                                def code(x, n):
                                	t_0 = math.log(x) / -n
                                	t_1 = (1.0 - ((0.5 + (-0.3333333333333333 / x)) / x)) / (x * n)
                                	tmp = 0
                                	if x <= 5.5e-226:
                                		tmp = t_0
                                	elif x <= 3.5e-215:
                                		tmp = t_1
                                	elif x <= 2.3e-129:
                                		tmp = t_0
                                	elif x <= 4.8e-125:
                                		tmp = t_1
                                	elif x <= 0.6:
                                		tmp = t_0
                                	else:
                                		tmp = ((1.0 / n) + (((-0.5 / n) + ((0.3333333333333333 / x) / n)) / x)) / x
                                	return tmp
                                
                                function code(x, n)
                                	t_0 = Float64(log(x) / Float64(-n))
                                	t_1 = Float64(Float64(1.0 - Float64(Float64(0.5 + Float64(-0.3333333333333333 / x)) / x)) / Float64(x * n))
                                	tmp = 0.0
                                	if (x <= 5.5e-226)
                                		tmp = t_0;
                                	elseif (x <= 3.5e-215)
                                		tmp = t_1;
                                	elseif (x <= 2.3e-129)
                                		tmp = t_0;
                                	elseif (x <= 4.8e-125)
                                		tmp = t_1;
                                	elseif (x <= 0.6)
                                		tmp = t_0;
                                	else
                                		tmp = Float64(Float64(Float64(1.0 / n) + Float64(Float64(Float64(-0.5 / n) + Float64(Float64(0.3333333333333333 / x) / n)) / x)) / x);
                                	end
                                	return tmp
                                end
                                
                                function tmp_2 = code(x, n)
                                	t_0 = log(x) / -n;
                                	t_1 = (1.0 - ((0.5 + (-0.3333333333333333 / x)) / x)) / (x * n);
                                	tmp = 0.0;
                                	if (x <= 5.5e-226)
                                		tmp = t_0;
                                	elseif (x <= 3.5e-215)
                                		tmp = t_1;
                                	elseif (x <= 2.3e-129)
                                		tmp = t_0;
                                	elseif (x <= 4.8e-125)
                                		tmp = t_1;
                                	elseif (x <= 0.6)
                                		tmp = t_0;
                                	else
                                		tmp = ((1.0 / n) + (((-0.5 / n) + ((0.3333333333333333 / x) / n)) / x)) / x;
                                	end
                                	tmp_2 = tmp;
                                end
                                
                                code[x_, n_] := Block[{t$95$0 = N[(N[Log[x], $MachinePrecision] / (-n)), $MachinePrecision]}, Block[{t$95$1 = N[(N[(1.0 - N[(N[(0.5 + N[(-0.3333333333333333 / x), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision] / N[(x * n), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, 5.5e-226], t$95$0, If[LessEqual[x, 3.5e-215], t$95$1, If[LessEqual[x, 2.3e-129], t$95$0, If[LessEqual[x, 4.8e-125], t$95$1, If[LessEqual[x, 0.6], t$95$0, N[(N[(N[(1.0 / n), $MachinePrecision] + N[(N[(N[(-0.5 / n), $MachinePrecision] + N[(N[(0.3333333333333333 / x), $MachinePrecision] / n), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision]]]]]]]]
                                
                                \begin{array}{l}
                                
                                \\
                                \begin{array}{l}
                                t_0 := \frac{\log x}{-n}\\
                                t_1 := \frac{1 - \frac{0.5 + \frac{-0.3333333333333333}{x}}{x}}{x \cdot n}\\
                                \mathbf{if}\;x \leq 5.5 \cdot 10^{-226}:\\
                                \;\;\;\;t\_0\\
                                
                                \mathbf{elif}\;x \leq 3.5 \cdot 10^{-215}:\\
                                \;\;\;\;t\_1\\
                                
                                \mathbf{elif}\;x \leq 2.3 \cdot 10^{-129}:\\
                                \;\;\;\;t\_0\\
                                
                                \mathbf{elif}\;x \leq 4.8 \cdot 10^{-125}:\\
                                \;\;\;\;t\_1\\
                                
                                \mathbf{elif}\;x \leq 0.6:\\
                                \;\;\;\;t\_0\\
                                
                                \mathbf{else}:\\
                                \;\;\;\;\frac{\frac{1}{n} + \frac{\frac{-0.5}{n} + \frac{\frac{0.3333333333333333}{x}}{n}}{x}}{x}\\
                                
                                
                                \end{array}
                                \end{array}
                                
                                Derivation
                                1. Split input into 3 regimes
                                2. if x < 5.5e-226 or 3.5000000000000002e-215 < x < 2.3e-129 or 4.8000000000000003e-125 < x < 0.599999999999999978

                                  1. Initial program 36.6%

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

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

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

                                      \[\leadsto \color{blue}{-\frac{\log x}{n}} \]
                                    2. distribute-neg-frac263.7%

                                      \[\leadsto \color{blue}{\frac{\log x}{-n}} \]
                                  6. Simplified63.7%

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

                                  if 5.5e-226 < x < 3.5000000000000002e-215 or 2.3e-129 < x < 4.8000000000000003e-125

                                  1. Initial program 83.9%

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

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

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

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

                                      \[\leadsto \color{blue}{\frac{\left(1 + 0.3333333333333333 \cdot \frac{1}{{x}^{2}}\right) - 0.5 \cdot \frac{1}{x}}{n \cdot x}} \]
                                    4. Step-by-step derivation
                                      1. sub-neg91.9%

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

                                        \[\leadsto \frac{\color{blue}{\left(0.3333333333333333 \cdot \frac{1}{{x}^{2}} + 1\right)} + \left(-0.5 \cdot \frac{1}{x}\right)}{n \cdot x} \]
                                      3. associate-+l+91.9%

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

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

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

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

                                        \[\leadsto \frac{\frac{0.3333333333333333}{{x}^{2}} + \left(1 + \left(-\frac{\color{blue}{0.5}}{x}\right)\right)}{n \cdot x} \]
                                      8. distribute-neg-frac91.9%

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

                                        \[\leadsto \frac{\frac{0.3333333333333333}{{x}^{2}} + \left(1 + \frac{\color{blue}{-0.5}}{x}\right)}{n \cdot x} \]
                                      10. *-commutative91.9%

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

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

                                      \[\leadsto \frac{\color{blue}{1 + -1 \cdot \frac{0.5 - 0.3333333333333333 \cdot \frac{1}{x}}{x}}}{x \cdot n} \]
                                    7. Step-by-step derivation
                                      1. mul-1-neg91.9%

                                        \[\leadsto \frac{1 + \color{blue}{\left(-\frac{0.5 - 0.3333333333333333 \cdot \frac{1}{x}}{x}\right)}}{x \cdot n} \]
                                      2. unsub-neg91.9%

                                        \[\leadsto \frac{\color{blue}{1 - \frac{0.5 - 0.3333333333333333 \cdot \frac{1}{x}}{x}}}{x \cdot n} \]
                                      3. sub-neg91.9%

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

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

                                        \[\leadsto \frac{1 - \frac{0.5 + \left(-\frac{\color{blue}{0.3333333333333333}}{x}\right)}{x}}{x \cdot n} \]
                                      6. distribute-neg-frac91.9%

                                        \[\leadsto \frac{1 - \frac{0.5 + \color{blue}{\frac{-0.3333333333333333}{x}}}{x}}{x \cdot n} \]
                                      7. metadata-eval91.9%

                                        \[\leadsto \frac{1 - \frac{0.5 + \frac{\color{blue}{-0.3333333333333333}}{x}}{x}}{x \cdot n} \]
                                    8. Simplified91.9%

                                      \[\leadsto \frac{\color{blue}{1 - \frac{0.5 + \frac{-0.3333333333333333}{x}}{x}}}{x \cdot n} \]

                                    if 0.599999999999999978 < x

                                    1. Initial program 68.0%

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

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

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

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

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

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

                                          \[\leadsto \frac{\color{blue}{\left(0.3333333333333333 \cdot \frac{1}{{x}^{2}} + 1\right)} + \left(-0.5 \cdot \frac{1}{x}\right)}{n \cdot x} \]
                                        3. associate-+l+63.1%

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

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

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

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

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

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

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

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

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

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

                                          \[\leadsto \color{blue}{\frac{\frac{1}{n} + \frac{\frac{\frac{0.3333333333333333}{x}}{n} + \frac{-0.5}{n}}{x}}{x}} \]
                                      8. Recombined 3 regimes into one program.
                                      9. Final simplification65.3%

                                        \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq 5.5 \cdot 10^{-226}:\\ \;\;\;\;\frac{\log x}{-n}\\ \mathbf{elif}\;x \leq 3.5 \cdot 10^{-215}:\\ \;\;\;\;\frac{1 - \frac{0.5 + \frac{-0.3333333333333333}{x}}{x}}{x \cdot n}\\ \mathbf{elif}\;x \leq 2.3 \cdot 10^{-129}:\\ \;\;\;\;\frac{\log x}{-n}\\ \mathbf{elif}\;x \leq 4.8 \cdot 10^{-125}:\\ \;\;\;\;\frac{1 - \frac{0.5 + \frac{-0.3333333333333333}{x}}{x}}{x \cdot n}\\ \mathbf{elif}\;x \leq 0.6:\\ \;\;\;\;\frac{\log x}{-n}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{1}{n} + \frac{\frac{-0.5}{n} + \frac{\frac{0.3333333333333333}{x}}{n}}{x}}{x}\\ \end{array} \]
                                      10. Add Preprocessing

                                      Alternative 16: 56.3% accurate, 1.6× speedup?

                                      \[\begin{array}{l} \\ \begin{array}{l} t_0 := \frac{-1}{\frac{n}{\log x}}\\ t_1 := \frac{1 - \frac{0.5 + \frac{-0.3333333333333333}{x}}{x}}{x \cdot n}\\ \mathbf{if}\;x \leq 6.1 \cdot 10^{-226}:\\ \;\;\;\;t\_0\\ \mathbf{elif}\;x \leq 3.5 \cdot 10^{-215}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;x \leq 2.3 \cdot 10^{-129}:\\ \;\;\;\;t\_0\\ \mathbf{elif}\;x \leq 1.35 \cdot 10^{-124}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;x \leq 0.6:\\ \;\;\;\;\frac{\log x}{-n}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{1}{n} + \frac{\frac{-0.5}{n} + \frac{\frac{0.3333333333333333}{x}}{n}}{x}}{x}\\ \end{array} \end{array} \]
                                      (FPCore (x n)
                                       :precision binary64
                                       (let* ((t_0 (/ -1.0 (/ n (log x))))
                                              (t_1 (/ (- 1.0 (/ (+ 0.5 (/ -0.3333333333333333 x)) x)) (* x n))))
                                         (if (<= x 6.1e-226)
                                           t_0
                                           (if (<= x 3.5e-215)
                                             t_1
                                             (if (<= x 2.3e-129)
                                               t_0
                                               (if (<= x 1.35e-124)
                                                 t_1
                                                 (if (<= x 0.6)
                                                   (/ (log x) (- n))
                                                   (/
                                                    (+ (/ 1.0 n) (/ (+ (/ -0.5 n) (/ (/ 0.3333333333333333 x) n)) x))
                                                    x))))))))
                                      double code(double x, double n) {
                                      	double t_0 = -1.0 / (n / log(x));
                                      	double t_1 = (1.0 - ((0.5 + (-0.3333333333333333 / x)) / x)) / (x * n);
                                      	double tmp;
                                      	if (x <= 6.1e-226) {
                                      		tmp = t_0;
                                      	} else if (x <= 3.5e-215) {
                                      		tmp = t_1;
                                      	} else if (x <= 2.3e-129) {
                                      		tmp = t_0;
                                      	} else if (x <= 1.35e-124) {
                                      		tmp = t_1;
                                      	} else if (x <= 0.6) {
                                      		tmp = log(x) / -n;
                                      	} else {
                                      		tmp = ((1.0 / n) + (((-0.5 / n) + ((0.3333333333333333 / x) / n)) / x)) / 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) :: t_1
                                          real(8) :: tmp
                                          t_0 = (-1.0d0) / (n / log(x))
                                          t_1 = (1.0d0 - ((0.5d0 + ((-0.3333333333333333d0) / x)) / x)) / (x * n)
                                          if (x <= 6.1d-226) then
                                              tmp = t_0
                                          else if (x <= 3.5d-215) then
                                              tmp = t_1
                                          else if (x <= 2.3d-129) then
                                              tmp = t_0
                                          else if (x <= 1.35d-124) then
                                              tmp = t_1
                                          else if (x <= 0.6d0) then
                                              tmp = log(x) / -n
                                          else
                                              tmp = ((1.0d0 / n) + ((((-0.5d0) / n) + ((0.3333333333333333d0 / x) / n)) / x)) / x
                                          end if
                                          code = tmp
                                      end function
                                      
                                      public static double code(double x, double n) {
                                      	double t_0 = -1.0 / (n / Math.log(x));
                                      	double t_1 = (1.0 - ((0.5 + (-0.3333333333333333 / x)) / x)) / (x * n);
                                      	double tmp;
                                      	if (x <= 6.1e-226) {
                                      		tmp = t_0;
                                      	} else if (x <= 3.5e-215) {
                                      		tmp = t_1;
                                      	} else if (x <= 2.3e-129) {
                                      		tmp = t_0;
                                      	} else if (x <= 1.35e-124) {
                                      		tmp = t_1;
                                      	} else if (x <= 0.6) {
                                      		tmp = Math.log(x) / -n;
                                      	} else {
                                      		tmp = ((1.0 / n) + (((-0.5 / n) + ((0.3333333333333333 / x) / n)) / x)) / x;
                                      	}
                                      	return tmp;
                                      }
                                      
                                      def code(x, n):
                                      	t_0 = -1.0 / (n / math.log(x))
                                      	t_1 = (1.0 - ((0.5 + (-0.3333333333333333 / x)) / x)) / (x * n)
                                      	tmp = 0
                                      	if x <= 6.1e-226:
                                      		tmp = t_0
                                      	elif x <= 3.5e-215:
                                      		tmp = t_1
                                      	elif x <= 2.3e-129:
                                      		tmp = t_0
                                      	elif x <= 1.35e-124:
                                      		tmp = t_1
                                      	elif x <= 0.6:
                                      		tmp = math.log(x) / -n
                                      	else:
                                      		tmp = ((1.0 / n) + (((-0.5 / n) + ((0.3333333333333333 / x) / n)) / x)) / x
                                      	return tmp
                                      
                                      function code(x, n)
                                      	t_0 = Float64(-1.0 / Float64(n / log(x)))
                                      	t_1 = Float64(Float64(1.0 - Float64(Float64(0.5 + Float64(-0.3333333333333333 / x)) / x)) / Float64(x * n))
                                      	tmp = 0.0
                                      	if (x <= 6.1e-226)
                                      		tmp = t_0;
                                      	elseif (x <= 3.5e-215)
                                      		tmp = t_1;
                                      	elseif (x <= 2.3e-129)
                                      		tmp = t_0;
                                      	elseif (x <= 1.35e-124)
                                      		tmp = t_1;
                                      	elseif (x <= 0.6)
                                      		tmp = Float64(log(x) / Float64(-n));
                                      	else
                                      		tmp = Float64(Float64(Float64(1.0 / n) + Float64(Float64(Float64(-0.5 / n) + Float64(Float64(0.3333333333333333 / x) / n)) / x)) / x);
                                      	end
                                      	return tmp
                                      end
                                      
                                      function tmp_2 = code(x, n)
                                      	t_0 = -1.0 / (n / log(x));
                                      	t_1 = (1.0 - ((0.5 + (-0.3333333333333333 / x)) / x)) / (x * n);
                                      	tmp = 0.0;
                                      	if (x <= 6.1e-226)
                                      		tmp = t_0;
                                      	elseif (x <= 3.5e-215)
                                      		tmp = t_1;
                                      	elseif (x <= 2.3e-129)
                                      		tmp = t_0;
                                      	elseif (x <= 1.35e-124)
                                      		tmp = t_1;
                                      	elseif (x <= 0.6)
                                      		tmp = log(x) / -n;
                                      	else
                                      		tmp = ((1.0 / n) + (((-0.5 / n) + ((0.3333333333333333 / x) / n)) / x)) / x;
                                      	end
                                      	tmp_2 = tmp;
                                      end
                                      
                                      code[x_, n_] := Block[{t$95$0 = N[(-1.0 / N[(n / N[Log[x], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(N[(1.0 - N[(N[(0.5 + N[(-0.3333333333333333 / x), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision] / N[(x * n), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, 6.1e-226], t$95$0, If[LessEqual[x, 3.5e-215], t$95$1, If[LessEqual[x, 2.3e-129], t$95$0, If[LessEqual[x, 1.35e-124], t$95$1, If[LessEqual[x, 0.6], N[(N[Log[x], $MachinePrecision] / (-n)), $MachinePrecision], N[(N[(N[(1.0 / n), $MachinePrecision] + N[(N[(N[(-0.5 / n), $MachinePrecision] + N[(N[(0.3333333333333333 / x), $MachinePrecision] / n), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision]]]]]]]]
                                      
                                      \begin{array}{l}
                                      
                                      \\
                                      \begin{array}{l}
                                      t_0 := \frac{-1}{\frac{n}{\log x}}\\
                                      t_1 := \frac{1 - \frac{0.5 + \frac{-0.3333333333333333}{x}}{x}}{x \cdot n}\\
                                      \mathbf{if}\;x \leq 6.1 \cdot 10^{-226}:\\
                                      \;\;\;\;t\_0\\
                                      
                                      \mathbf{elif}\;x \leq 3.5 \cdot 10^{-215}:\\
                                      \;\;\;\;t\_1\\
                                      
                                      \mathbf{elif}\;x \leq 2.3 \cdot 10^{-129}:\\
                                      \;\;\;\;t\_0\\
                                      
                                      \mathbf{elif}\;x \leq 1.35 \cdot 10^{-124}:\\
                                      \;\;\;\;t\_1\\
                                      
                                      \mathbf{elif}\;x \leq 0.6:\\
                                      \;\;\;\;\frac{\log x}{-n}\\
                                      
                                      \mathbf{else}:\\
                                      \;\;\;\;\frac{\frac{1}{n} + \frac{\frac{-0.5}{n} + \frac{\frac{0.3333333333333333}{x}}{n}}{x}}{x}\\
                                      
                                      
                                      \end{array}
                                      \end{array}
                                      
                                      Derivation
                                      1. Split input into 4 regimes
                                      2. if x < 6.0999999999999998e-226 or 3.5000000000000002e-215 < x < 2.3e-129

                                        1. Initial program 35.8%

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

                                          \[\leadsto \color{blue}{1} - {x}^{\left(\frac{1}{n}\right)} \]
                                        4. Step-by-step derivation
                                          1. add-cbrt-cube35.8%

                                            \[\leadsto \color{blue}{\sqrt[3]{\left(\left(1 - {x}^{\left(\frac{1}{n}\right)}\right) \cdot \left(1 - {x}^{\left(\frac{1}{n}\right)}\right)\right) \cdot \left(1 - {x}^{\left(\frac{1}{n}\right)}\right)}} \]
                                          2. pow335.9%

                                            \[\leadsto \sqrt[3]{\color{blue}{{\left(1 - {x}^{\left(\frac{1}{n}\right)}\right)}^{3}}} \]
                                        5. Applied egg-rr35.9%

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

                                          \[\leadsto \sqrt[3]{{\color{blue}{\left(-1 \cdot \frac{\log x}{n}\right)}}^{3}} \]
                                        7. Step-by-step derivation
                                          1. mul-1-neg66.7%

                                            \[\leadsto \color{blue}{-\frac{\log x}{n}} \]
                                          2. distribute-neg-frac266.7%

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

                                          \[\leadsto \sqrt[3]{{\color{blue}{\left(\frac{\log x}{-n}\right)}}^{3}} \]
                                        9. Step-by-step derivation
                                          1. rem-cbrt-cube66.7%

                                            \[\leadsto \color{blue}{\frac{\log x}{-n}} \]
                                          2. clear-num66.8%

                                            \[\leadsto \color{blue}{\frac{1}{\frac{-n}{\log x}}} \]
                                          3. frac-2neg66.8%

                                            \[\leadsto \color{blue}{\frac{-1}{-\frac{-n}{\log x}}} \]
                                          4. metadata-eval66.8%

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

                                            \[\leadsto \frac{-1}{-\frac{\color{blue}{\sqrt{-n} \cdot \sqrt{-n}}}{\log x}} \]
                                          6. sqrt-unprod22.1%

                                            \[\leadsto \frac{-1}{-\frac{\color{blue}{\sqrt{\left(-n\right) \cdot \left(-n\right)}}}{\log x}} \]
                                          7. sqr-neg22.1%

                                            \[\leadsto \frac{-1}{-\frac{\sqrt{\color{blue}{n \cdot n}}}{\log x}} \]
                                          8. sqrt-unprod1.5%

                                            \[\leadsto \frac{-1}{-\frac{\color{blue}{\sqrt{n} \cdot \sqrt{n}}}{\log x}} \]
                                          9. add-sqr-sqrt2.8%

                                            \[\leadsto \frac{-1}{-\frac{\color{blue}{n}}{\log x}} \]
                                          10. distribute-frac-neg2.8%

                                            \[\leadsto \frac{-1}{\color{blue}{\frac{-n}{\log x}}} \]
                                          11. add-sqr-sqrt1.3%

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

                                            \[\leadsto \frac{-1}{\frac{\color{blue}{\sqrt{\left(-n\right) \cdot \left(-n\right)}}}{\log x}} \]
                                          13. sqr-neg18.2%

                                            \[\leadsto \frac{-1}{\frac{\sqrt{\color{blue}{n \cdot n}}}{\log x}} \]
                                          14. sqrt-unprod33.4%

                                            \[\leadsto \frac{-1}{\frac{\color{blue}{\sqrt{n} \cdot \sqrt{n}}}{\log x}} \]
                                          15. add-sqr-sqrt66.8%

                                            \[\leadsto \frac{-1}{\frac{\color{blue}{n}}{\log x}} \]
                                        10. Applied egg-rr66.8%

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

                                        if 6.0999999999999998e-226 < x < 3.5000000000000002e-215 or 2.3e-129 < x < 1.35000000000000009e-124

                                        1. Initial program 83.9%

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

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

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

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

                                            \[\leadsto \color{blue}{\frac{\left(1 + 0.3333333333333333 \cdot \frac{1}{{x}^{2}}\right) - 0.5 \cdot \frac{1}{x}}{n \cdot x}} \]
                                          4. Step-by-step derivation
                                            1. sub-neg91.9%

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

                                              \[\leadsto \frac{\color{blue}{\left(0.3333333333333333 \cdot \frac{1}{{x}^{2}} + 1\right)} + \left(-0.5 \cdot \frac{1}{x}\right)}{n \cdot x} \]
                                            3. associate-+l+91.9%

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

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

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

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

                                              \[\leadsto \frac{\frac{0.3333333333333333}{{x}^{2}} + \left(1 + \left(-\frac{\color{blue}{0.5}}{x}\right)\right)}{n \cdot x} \]
                                            8. distribute-neg-frac91.9%

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

                                              \[\leadsto \frac{\frac{0.3333333333333333}{{x}^{2}} + \left(1 + \frac{\color{blue}{-0.5}}{x}\right)}{n \cdot x} \]
                                            10. *-commutative91.9%

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

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

                                            \[\leadsto \frac{\color{blue}{1 + -1 \cdot \frac{0.5 - 0.3333333333333333 \cdot \frac{1}{x}}{x}}}{x \cdot n} \]
                                          7. Step-by-step derivation
                                            1. mul-1-neg91.9%

                                              \[\leadsto \frac{1 + \color{blue}{\left(-\frac{0.5 - 0.3333333333333333 \cdot \frac{1}{x}}{x}\right)}}{x \cdot n} \]
                                            2. unsub-neg91.9%

                                              \[\leadsto \frac{\color{blue}{1 - \frac{0.5 - 0.3333333333333333 \cdot \frac{1}{x}}{x}}}{x \cdot n} \]
                                            3. sub-neg91.9%

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

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

                                              \[\leadsto \frac{1 - \frac{0.5 + \left(-\frac{\color{blue}{0.3333333333333333}}{x}\right)}{x}}{x \cdot n} \]
                                            6. distribute-neg-frac91.9%

                                              \[\leadsto \frac{1 - \frac{0.5 + \color{blue}{\frac{-0.3333333333333333}{x}}}{x}}{x \cdot n} \]
                                            7. metadata-eval91.9%

                                              \[\leadsto \frac{1 - \frac{0.5 + \frac{\color{blue}{-0.3333333333333333}}{x}}{x}}{x \cdot n} \]
                                          8. Simplified91.9%

                                            \[\leadsto \frac{\color{blue}{1 - \frac{0.5 + \frac{-0.3333333333333333}{x}}{x}}}{x \cdot n} \]

                                          if 1.35000000000000009e-124 < x < 0.599999999999999978

                                          1. Initial program 37.7%

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

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

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

                                              \[\leadsto \color{blue}{-\frac{\log x}{n}} \]
                                            2. distribute-neg-frac259.6%

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

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

                                          if 0.599999999999999978 < x

                                          1. Initial program 68.0%

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

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

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

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

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

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

                                                \[\leadsto \frac{\color{blue}{\left(0.3333333333333333 \cdot \frac{1}{{x}^{2}} + 1\right)} + \left(-0.5 \cdot \frac{1}{x}\right)}{n \cdot x} \]
                                              3. associate-+l+63.1%

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

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

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

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

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

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

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

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

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

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

                                                \[\leadsto \color{blue}{\frac{\frac{1}{n} + \frac{\frac{\frac{0.3333333333333333}{x}}{n} + \frac{-0.5}{n}}{x}}{x}} \]
                                            8. Recombined 4 regimes into one program.
                                            9. Final simplification65.3%

                                              \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq 6.1 \cdot 10^{-226}:\\ \;\;\;\;\frac{-1}{\frac{n}{\log x}}\\ \mathbf{elif}\;x \leq 3.5 \cdot 10^{-215}:\\ \;\;\;\;\frac{1 - \frac{0.5 + \frac{-0.3333333333333333}{x}}{x}}{x \cdot n}\\ \mathbf{elif}\;x \leq 2.3 \cdot 10^{-129}:\\ \;\;\;\;\frac{-1}{\frac{n}{\log x}}\\ \mathbf{elif}\;x \leq 1.35 \cdot 10^{-124}:\\ \;\;\;\;\frac{1 - \frac{0.5 + \frac{-0.3333333333333333}{x}}{x}}{x \cdot n}\\ \mathbf{elif}\;x \leq 0.6:\\ \;\;\;\;\frac{\log x}{-n}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{1}{n} + \frac{\frac{-0.5}{n} + \frac{\frac{0.3333333333333333}{x}}{n}}{x}}{x}\\ \end{array} \]
                                            10. Add Preprocessing

                                            Alternative 17: 46.2% accurate, 12.4× speedup?

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

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

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

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

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

                                                \[\leadsto \color{blue}{\frac{\left(1 + 0.3333333333333333 \cdot \frac{1}{{x}^{2}}\right) - 0.5 \cdot \frac{1}{x}}{n \cdot x}} \]
                                              4. Step-by-step derivation
                                                1. sub-neg44.9%

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

                                                  \[\leadsto \frac{\color{blue}{\left(0.3333333333333333 \cdot \frac{1}{{x}^{2}} + 1\right)} + \left(-0.5 \cdot \frac{1}{x}\right)}{n \cdot x} \]
                                                3. associate-+l+44.9%

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

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

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

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

                                                  \[\leadsto \frac{\frac{0.3333333333333333}{{x}^{2}} + \left(1 + \left(-\frac{\color{blue}{0.5}}{x}\right)\right)}{n \cdot x} \]
                                                8. distribute-neg-frac44.9%

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

                                                  \[\leadsto \frac{\frac{0.3333333333333333}{{x}^{2}} + \left(1 + \frac{\color{blue}{-0.5}}{x}\right)}{n \cdot x} \]
                                                10. *-commutative44.9%

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

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

                                                \[\leadsto \color{blue}{\frac{\left(\frac{0.3333333333333333}{n \cdot {x}^{2}} + \frac{1}{n}\right) - \frac{0.5}{n \cdot x}}{x}} \]
                                              7. Step-by-step derivation
                                                1. Simplified45.5%

                                                  \[\leadsto \color{blue}{\frac{\frac{1}{n} + \frac{\frac{\frac{0.3333333333333333}{x}}{n} + \frac{-0.5}{n}}{x}}{x}} \]
                                                2. Final simplification45.5%

                                                  \[\leadsto \frac{\frac{1}{n} + \frac{\frac{-0.5}{n} + \frac{\frac{0.3333333333333333}{x}}{n}}{x}}{x} \]
                                                3. Add Preprocessing

                                                Alternative 18: 45.8% accurate, 16.2× speedup?

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

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

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

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

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

                                                    \[\leadsto \color{blue}{\frac{\left(1 + 0.3333333333333333 \cdot \frac{1}{{x}^{2}}\right) - 0.5 \cdot \frac{1}{x}}{n \cdot x}} \]
                                                  4. Step-by-step derivation
                                                    1. sub-neg44.9%

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

                                                      \[\leadsto \frac{\color{blue}{\left(0.3333333333333333 \cdot \frac{1}{{x}^{2}} + 1\right)} + \left(-0.5 \cdot \frac{1}{x}\right)}{n \cdot x} \]
                                                    3. associate-+l+44.9%

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

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

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

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

                                                      \[\leadsto \frac{\frac{0.3333333333333333}{{x}^{2}} + \left(1 + \left(-\frac{\color{blue}{0.5}}{x}\right)\right)}{n \cdot x} \]
                                                    8. distribute-neg-frac44.9%

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

                                                      \[\leadsto \frac{\frac{0.3333333333333333}{{x}^{2}} + \left(1 + \frac{\color{blue}{-0.5}}{x}\right)}{n \cdot x} \]
                                                    10. *-commutative44.9%

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

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

                                                    \[\leadsto \frac{\color{blue}{1 + -1 \cdot \frac{0.5 - 0.3333333333333333 \cdot \frac{1}{x}}{x}}}{x \cdot n} \]
                                                  7. Step-by-step derivation
                                                    1. mul-1-neg44.9%

                                                      \[\leadsto \frac{1 + \color{blue}{\left(-\frac{0.5 - 0.3333333333333333 \cdot \frac{1}{x}}{x}\right)}}{x \cdot n} \]
                                                    2. unsub-neg44.9%

                                                      \[\leadsto \frac{\color{blue}{1 - \frac{0.5 - 0.3333333333333333 \cdot \frac{1}{x}}{x}}}{x \cdot n} \]
                                                    3. sub-neg44.9%

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

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

                                                      \[\leadsto \frac{1 - \frac{0.5 + \left(-\frac{\color{blue}{0.3333333333333333}}{x}\right)}{x}}{x \cdot n} \]
                                                    6. distribute-neg-frac44.9%

                                                      \[\leadsto \frac{1 - \frac{0.5 + \color{blue}{\frac{-0.3333333333333333}{x}}}{x}}{x \cdot n} \]
                                                    7. metadata-eval44.9%

                                                      \[\leadsto \frac{1 - \frac{0.5 + \frac{\color{blue}{-0.3333333333333333}}{x}}{x}}{x \cdot n} \]
                                                  8. Simplified44.9%

                                                    \[\leadsto \frac{\color{blue}{1 - \frac{0.5 + \frac{-0.3333333333333333}{x}}{x}}}{x \cdot n} \]
                                                  9. Final simplification44.9%

                                                    \[\leadsto \frac{1 - \frac{0.5 + \frac{-0.3333333333333333}{x}}{x}}{x \cdot n} \]
                                                  10. Add Preprocessing

                                                  Alternative 19: 40.2% accurate, 42.2× speedup?

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

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

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

                                                      \[\leadsto \frac{e^{\color{blue}{-\frac{\log \left(\frac{1}{x}\right)}{n}}}}{n \cdot x} \]
                                                    2. log-rec60.0%

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

                                                      \[\leadsto \frac{e^{-\frac{\color{blue}{-1 \cdot \log x}}{n}}}{n \cdot x} \]
                                                    4. distribute-neg-frac60.0%

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

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

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

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

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

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

                                                    \[\leadsto \frac{1}{x \cdot n} \]
                                                  8. Add Preprocessing

                                                  Alternative 20: 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 53.6%

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

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

                                                      \[\leadsto \frac{e^{\color{blue}{-\frac{\log \left(\frac{1}{x}\right)}{n}}}}{n \cdot x} \]
                                                    2. log-rec60.0%

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

                                                      \[\leadsto \frac{e^{-\frac{\color{blue}{-1 \cdot \log x}}{n}}}{n \cdot x} \]
                                                    4. distribute-neg-frac60.0%

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

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

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

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

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

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

                                                      \[\leadsto \color{blue}{\frac{\frac{1}{n}}{x}} \]
                                                  8. Simplified40.0%

                                                    \[\leadsto \color{blue}{\frac{\frac{1}{n}}{x}} \]
                                                  9. Final simplification40.0%

                                                    \[\leadsto \frac{\frac{1}{n}}{x} \]
                                                  10. Add Preprocessing

                                                  Alternative 21: 4.5% accurate, 70.3× speedup?

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

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

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

                                                    \[\leadsto \color{blue}{\frac{x}{n}} \]
                                                  5. Final simplification4.2%

                                                    \[\leadsto \frac{x}{n} \]
                                                  6. Add Preprocessing

                                                  Reproduce

                                                  ?
                                                  herbie shell --seed 2024095 
                                                  (FPCore (x n)
                                                    :name "2nthrt (problem 3.4.6)"
                                                    :precision binary64
                                                    (- (pow (+ x 1.0) (/ 1.0 n)) (pow x (/ 1.0 n))))