2nthrt (problem 3.4.6)

Percentage Accurate: 53.5% → 85.7%
Time: 39.1s
Alternatives: 18
Speedup: 1.9×

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 18 alternatives:

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

Initial Program: 53.5% 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.7% accurate, 0.7× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := {x}^{\left(\frac{1}{n}\right)}\\ \mathbf{if}\;\frac{1}{n} \leq -5 \cdot 10^{-42}:\\ \;\;\;\;\frac{\frac{t\_0}{n}}{x}\\ \mathbf{elif}\;\frac{1}{n} \leq 2 \cdot 10^{-17}:\\ \;\;\;\;\frac{\log \left(\frac{1 + x}{x}\right)}{n}\\ \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) -5e-42)
     (/ (/ t_0 n) x)
     (if (<= (/ 1.0 n) 2e-17)
       (/ (log (/ (+ 1.0 x) x)) n)
       (- (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) <= -5e-42) {
		tmp = (t_0 / n) / x;
	} else if ((1.0 / n) <= 2e-17) {
		tmp = log(((1.0 + x) / x)) / n;
	} 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) <= -5e-42) {
		tmp = (t_0 / n) / x;
	} else if ((1.0 / n) <= 2e-17) {
		tmp = Math.log(((1.0 + x) / x)) / n;
	} 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) <= -5e-42:
		tmp = (t_0 / n) / x
	elif (1.0 / n) <= 2e-17:
		tmp = math.log(((1.0 + x) / x)) / n
	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) <= -5e-42)
		tmp = Float64(Float64(t_0 / n) / x);
	elseif (Float64(1.0 / n) <= 2e-17)
		tmp = Float64(log(Float64(Float64(1.0 + x) / x)) / n);
	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], -5e-42], N[(N[(t$95$0 / n), $MachinePrecision] / x), $MachinePrecision], If[LessEqual[N[(1.0 / n), $MachinePrecision], 2e-17], N[(N[Log[N[(N[(1.0 + x), $MachinePrecision] / x), $MachinePrecision]], $MachinePrecision] / n), $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 -5 \cdot 10^{-42}:\\
\;\;\;\;\frac{\frac{t\_0}{n}}{x}\\

\mathbf{elif}\;\frac{1}{n} \leq 2 \cdot 10^{-17}:\\
\;\;\;\;\frac{\log \left(\frac{1 + x}{x}\right)}{n}\\

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


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

    1. Initial program 88.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 inf 28.7%

      \[\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}} \]
    4. Step-by-step derivation
      1. Simplified28.7%

        \[\leadsto \color{blue}{\frac{\frac{e^{-\frac{-\log x}{n}}}{n} + e^{-\frac{-\log x}{n}} \cdot \frac{\frac{0.5}{{n}^{2}} - \frac{0.5}{n}}{x}}{x}} \]
      2. Taylor expanded in x around inf 96.1%

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

          \[\leadsto \frac{\frac{e^{-\frac{\color{blue}{-\log x}}{n}}}{n}}{x} \]
        2. neg-mul-196.1%

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

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

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

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

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

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

          \[\leadsto \frac{\frac{e^{\color{blue}{\left(\log x \cdot \frac{1}{n}\right)} \cdot 1}}{n}}{x} \]
        9. *-rgt-identity96.1%

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

          \[\leadsto \frac{\frac{\color{blue}{{x}^{\left(\frac{1}{n}\right)}}}{n}}{x} \]
      4. Simplified96.1%

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

      if -5.00000000000000003e-42 < (/.f64 #s(literal 1 binary64) n) < 2.00000000000000014e-17

      1. Initial program 35.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 83.0%

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

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

        \[\leadsto \color{blue}{\frac{\mathsf{log1p}\left(x\right) - \log x}{n}} \]
      6. Step-by-step derivation
        1. log1p-undefine83.0%

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

          \[\leadsto \frac{\color{blue}{\log \left(\frac{1 + x}{x}\right)}}{n} \]
      7. Applied egg-rr83.1%

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

      if 2.00000000000000014e-17 < (/.f64 #s(literal 1 binary64) n)

      1. Initial program 54.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 0 54.4%

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

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

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

    Alternative 2: 82.2% accurate, 1.6× speedup?

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

      1. Initial program 88.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 inf 28.7%

        \[\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}} \]
      4. Step-by-step derivation
        1. Simplified28.7%

          \[\leadsto \color{blue}{\frac{\frac{e^{-\frac{-\log x}{n}}}{n} + e^{-\frac{-\log x}{n}} \cdot \frac{\frac{0.5}{{n}^{2}} - \frac{0.5}{n}}{x}}{x}} \]
        2. Taylor expanded in x around inf 96.1%

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

            \[\leadsto \frac{\frac{e^{-\frac{\color{blue}{-\log x}}{n}}}{n}}{x} \]
          2. neg-mul-196.1%

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

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

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

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

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

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

            \[\leadsto \frac{\frac{e^{\color{blue}{\left(\log x \cdot \frac{1}{n}\right)} \cdot 1}}{n}}{x} \]
          9. *-rgt-identity96.1%

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

            \[\leadsto \frac{\frac{\color{blue}{{x}^{\left(\frac{1}{n}\right)}}}{n}}{x} \]
        4. Simplified96.1%

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

        if -5.00000000000000003e-42 < (/.f64 #s(literal 1 binary64) n) < 5.0000000000000001e-9

        1. Initial program 34.7%

          \[{\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 81.8%

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

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

          \[\leadsto \color{blue}{\frac{\mathsf{log1p}\left(x\right) - \log x}{n}} \]
        6. Step-by-step derivation
          1. log1p-undefine81.8%

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

            \[\leadsto \frac{\color{blue}{\log \left(\frac{1 + x}{x}\right)}}{n} \]
        7. Applied egg-rr81.9%

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

        if 5.0000000000000001e-9 < (/.f64 #s(literal 1 binary64) n)

        1. Initial program 56.5%

          \[{\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 79.0%

          \[\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)} \]
        4. Taylor expanded in n around inf 79.0%

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

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

      Alternative 3: 81.8% accurate, 1.6× speedup?

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

        1. Initial program 88.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 inf 28.7%

          \[\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}} \]
        4. Step-by-step derivation
          1. Simplified28.7%

            \[\leadsto \color{blue}{\frac{\frac{e^{-\frac{-\log x}{n}}}{n} + e^{-\frac{-\log x}{n}} \cdot \frac{\frac{0.5}{{n}^{2}} - \frac{0.5}{n}}{x}}{x}} \]
          2. Taylor expanded in x around inf 96.1%

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

              \[\leadsto \frac{\frac{e^{-\frac{\color{blue}{-\log x}}{n}}}{n}}{x} \]
            2. neg-mul-196.1%

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

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

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

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

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

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

              \[\leadsto \frac{\frac{e^{\color{blue}{\left(\log x \cdot \frac{1}{n}\right)} \cdot 1}}{n}}{x} \]
            9. *-rgt-identity96.1%

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

              \[\leadsto \frac{\frac{\color{blue}{{x}^{\left(\frac{1}{n}\right)}}}{n}}{x} \]
          4. Simplified96.1%

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

          if -5.00000000000000003e-42 < (/.f64 #s(literal 1 binary64) n) < 5.0000000000000001e-9

          1. Initial program 34.7%

            \[{\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 81.8%

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

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

            \[\leadsto \color{blue}{\frac{\mathsf{log1p}\left(x\right) - \log x}{n}} \]
          6. Step-by-step derivation
            1. log1p-undefine81.8%

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

              \[\leadsto \frac{\color{blue}{\log \left(\frac{1 + x}{x}\right)}}{n} \]
          7. Applied egg-rr81.9%

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

          if 5.0000000000000001e-9 < (/.f64 #s(literal 1 binary64) n) < 1.00000000000000002e151

          1. Initial program 76.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 78.4%

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

          if 1.00000000000000002e151 < (/.f64 #s(literal 1 binary64) n)

          1. Initial program 28.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 7.4%

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

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

            \[\leadsto \color{blue}{\frac{\mathsf{log1p}\left(x\right) - \log x}{n}} \]
          6. Taylor expanded in x around 0 7.4%

            \[\leadsto \frac{\color{blue}{x} - \log x}{n} \]
          7. Step-by-step derivation
            1. log1p-expm1-u74.7%

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

              \[\leadsto \frac{x - \mathsf{log1p}\left(\color{blue}{e^{\log x} - 1}\right)}{n} \]
            3. add-exp-log74.7%

              \[\leadsto \frac{x - \mathsf{log1p}\left(\color{blue}{x} - 1\right)}{n} \]
          8. Applied egg-rr74.7%

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

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

        Alternative 4: 81.7% accurate, 1.6× speedup?

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

          1. Initial program 88.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 inf 28.7%

            \[\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}} \]
          4. Step-by-step derivation
            1. Simplified28.7%

              \[\leadsto \color{blue}{\frac{\frac{e^{-\frac{-\log x}{n}}}{n} + e^{-\frac{-\log x}{n}} \cdot \frac{\frac{0.5}{{n}^{2}} - \frac{0.5}{n}}{x}}{x}} \]
            2. Taylor expanded in x around inf 96.1%

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

                \[\leadsto \frac{\frac{e^{-\frac{\color{blue}{-\log x}}{n}}}{n}}{x} \]
              2. neg-mul-196.1%

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

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

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

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

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

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

                \[\leadsto \frac{\frac{e^{\color{blue}{\left(\log x \cdot \frac{1}{n}\right)} \cdot 1}}{n}}{x} \]
              9. *-rgt-identity96.1%

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

                \[\leadsto \frac{\frac{\color{blue}{{x}^{\left(\frac{1}{n}\right)}}}{n}}{x} \]
            4. Simplified96.1%

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

            if -5.00000000000000003e-42 < (/.f64 #s(literal 1 binary64) n) < 5.0000000000000001e-9

            1. Initial program 34.7%

              \[{\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 81.8%

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

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

              \[\leadsto \color{blue}{\frac{\mathsf{log1p}\left(x\right) - \log x}{n}} \]
            6. Step-by-step derivation
              1. log1p-undefine81.8%

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

                \[\leadsto \frac{\color{blue}{\log \left(\frac{1 + x}{x}\right)}}{n} \]
            7. Applied egg-rr81.9%

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

            if 5.0000000000000001e-9 < (/.f64 #s(literal 1 binary64) n) < 1.00000000000000002e151

            1. Initial program 76.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 76.1%

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

            if 1.00000000000000002e151 < (/.f64 #s(literal 1 binary64) n)

            1. Initial program 28.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 7.4%

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

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

              \[\leadsto \color{blue}{\frac{\mathsf{log1p}\left(x\right) - \log x}{n}} \]
            6. Taylor expanded in x around 0 7.4%

              \[\leadsto \frac{\color{blue}{x} - \log x}{n} \]
            7. Step-by-step derivation
              1. log1p-expm1-u74.7%

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

                \[\leadsto \frac{x - \mathsf{log1p}\left(\color{blue}{e^{\log x} - 1}\right)}{n} \]
              3. add-exp-log74.7%

                \[\leadsto \frac{x - \mathsf{log1p}\left(\color{blue}{x} - 1\right)}{n} \]
            8. Applied egg-rr74.7%

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

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

          Alternative 5: 74.1% accurate, 1.6× speedup?

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

            1. Initial program 98.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 46.5%

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

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

              \[\leadsto \color{blue}{\frac{\mathsf{log1p}\left(x\right) - \log x}{n}} \]
            6. Taylor expanded in x around -inf 42.4%

              \[\leadsto \color{blue}{-1 \cdot \frac{-1 \cdot \frac{0.3333333333333333 \cdot \frac{1}{n \cdot x} - 0.5 \cdot \frac{1}{n}}{x} - \frac{1}{n}}{x}} \]
            7. Taylor expanded in x around 0 75.2%

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

            if -5.00000000000000031e-10 < (/.f64 #s(literal 1 binary64) n) < 5.0000000000000001e-9

            1. Initial program 34.1%

              \[{\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 79.1%

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

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

              \[\leadsto \color{blue}{\frac{\mathsf{log1p}\left(x\right) - \log x}{n}} \]
            6. Step-by-step derivation
              1. log1p-undefine79.1%

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

                \[\leadsto \frac{\color{blue}{\log \left(\frac{1 + x}{x}\right)}}{n} \]
            7. Applied egg-rr79.3%

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

            if 5.0000000000000001e-9 < (/.f64 #s(literal 1 binary64) n) < 1.00000000000000002e151

            1. Initial program 76.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 76.1%

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

            if 1.00000000000000002e151 < (/.f64 #s(literal 1 binary64) n)

            1. Initial program 28.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 7.4%

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

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

              \[\leadsto \color{blue}{\frac{\mathsf{log1p}\left(x\right) - \log x}{n}} \]
            6. Taylor expanded in x around 0 7.4%

              \[\leadsto \frac{\color{blue}{x} - \log x}{n} \]
            7. Step-by-step derivation
              1. log1p-expm1-u74.7%

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

                \[\leadsto \frac{x - \mathsf{log1p}\left(\color{blue}{e^{\log x} - 1}\right)}{n} \]
              3. add-exp-log74.7%

                \[\leadsto \frac{x - \mathsf{log1p}\left(\color{blue}{x} - 1\right)}{n} \]
            8. Applied egg-rr74.7%

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

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

          Alternative 6: 73.3% accurate, 1.7× speedup?

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

            1. Initial program 87.7%

              \[{\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 41.8%

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

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

              \[\leadsto \color{blue}{\frac{\mathsf{log1p}\left(x\right) - \log x}{n}} \]
            6. Taylor expanded in x around -inf 48.5%

              \[\leadsto \color{blue}{-1 \cdot \frac{-1 \cdot \frac{0.3333333333333333 \cdot \frac{1}{n \cdot x} - 0.5 \cdot \frac{1}{n}}{x} - \frac{1}{n}}{x}} \]
            7. Taylor expanded in x around 0 77.2%

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

            if -5.00000000000000031e-10 < (/.f64 #s(literal 1 binary64) n) < 5.0000000000000001e-9

            1. Initial program 34.1%

              \[{\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 79.1%

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

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

              \[\leadsto \color{blue}{\frac{\mathsf{log1p}\left(x\right) - \log x}{n}} \]
            6. Step-by-step derivation
              1. log1p-undefine79.1%

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

                \[\leadsto \frac{\color{blue}{\log \left(\frac{1 + x}{x}\right)}}{n} \]
            7. Applied egg-rr79.3%

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

            if 5.0000000000000001e-9 < (/.f64 #s(literal 1 binary64) n) < 3.99999999999999988e224

            1. Initial program 68.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 68.6%

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

          Alternative 7: 60.9% accurate, 1.8× speedup?

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

            1. Initial program 80.5%

              \[{\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 80.5%

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

            if 5e-277 < x < 1

            1. Initial program 40.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 51.7%

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

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

              \[\leadsto \color{blue}{\frac{\mathsf{log1p}\left(x\right) - \log x}{n}} \]
            6. Taylor expanded in x around 0 51.7%

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

            if 1 < x < 2.8e114

            1. Initial program 44.1%

              \[{\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 36.2%

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

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

              \[\leadsto \color{blue}{\frac{\mathsf{log1p}\left(x\right) - \log x}{n}} \]
            6. Step-by-step derivation
              1. div-inv36.2%

                \[\leadsto \color{blue}{\left(\mathsf{log1p}\left(x\right) - \log x\right) \cdot \frac{1}{n}} \]
            7. Applied egg-rr36.2%

              \[\leadsto \color{blue}{\left(\mathsf{log1p}\left(x\right) - \log x\right) \cdot \frac{1}{n}} \]
            8. Taylor expanded in x around inf 74.2%

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

                \[\leadsto \frac{1 - \color{blue}{\frac{0.5 \cdot 1}{x}}}{x} \cdot \frac{1}{n} \]
              2. metadata-eval74.2%

                \[\leadsto \frac{1 - \frac{\color{blue}{0.5}}{x}}{x} \cdot \frac{1}{n} \]
            10. Simplified74.2%

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

            if 2.8e114 < x

            1. Initial program 86.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 53.0%

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

              \[\leadsto 1 - \color{blue}{1} \]
            5. Step-by-step derivation
              1. metadata-eval86.9%

                \[\leadsto \color{blue}{0} \]
            6. Applied egg-rr86.9%

              \[\leadsto \color{blue}{0} \]
          3. Recombined 4 regimes into one program.
          4. Final simplification66.3%

            \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq 5 \cdot 10^{-277}:\\ \;\;\;\;1 - {x}^{\left(\frac{1}{n}\right)}\\ \mathbf{elif}\;x \leq 1:\\ \;\;\;\;\frac{x - \log x}{n}\\ \mathbf{elif}\;x \leq 2.8 \cdot 10^{+114}:\\ \;\;\;\;\frac{1}{n} \cdot \frac{1 - \frac{0.5}{x}}{x}\\ \mathbf{else}:\\ \;\;\;\;0\\ \end{array} \]
          5. Add Preprocessing

          Alternative 8: 60.7% accurate, 1.9× speedup?

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

            1. Initial program 43.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 49.2%

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

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

              \[\leadsto \color{blue}{\frac{\mathsf{log1p}\left(x\right) - \log x}{n}} \]
            6. Taylor expanded in x around 0 49.2%

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

            if 1 < x < 1.10000000000000005e113

            1. Initial program 44.1%

              \[{\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 36.2%

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

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

              \[\leadsto \color{blue}{\frac{\mathsf{log1p}\left(x\right) - \log x}{n}} \]
            6. Step-by-step derivation
              1. div-inv36.2%

                \[\leadsto \color{blue}{\left(\mathsf{log1p}\left(x\right) - \log x\right) \cdot \frac{1}{n}} \]
            7. Applied egg-rr36.2%

              \[\leadsto \color{blue}{\left(\mathsf{log1p}\left(x\right) - \log x\right) \cdot \frac{1}{n}} \]
            8. Taylor expanded in x around inf 74.2%

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

                \[\leadsto \frac{1 - \color{blue}{\frac{0.5 \cdot 1}{x}}}{x} \cdot \frac{1}{n} \]
              2. metadata-eval74.2%

                \[\leadsto \frac{1 - \frac{\color{blue}{0.5}}{x}}{x} \cdot \frac{1}{n} \]
            10. Simplified74.2%

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

            if 1.10000000000000005e113 < x

            1. Initial program 86.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 53.0%

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

              \[\leadsto 1 - \color{blue}{1} \]
            5. Step-by-step derivation
              1. metadata-eval86.9%

                \[\leadsto \color{blue}{0} \]
            6. Applied egg-rr86.9%

              \[\leadsto \color{blue}{0} \]
          3. Recombined 3 regimes into one program.
          4. Final simplification63.3%

            \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq 1:\\ \;\;\;\;\frac{x - \log x}{n}\\ \mathbf{elif}\;x \leq 1.1 \cdot 10^{+113}:\\ \;\;\;\;\frac{1}{n} \cdot \frac{1 - \frac{0.5}{x}}{x}\\ \mathbf{else}:\\ \;\;\;\;0\\ \end{array} \]
          5. Add Preprocessing

          Alternative 9: 60.4% accurate, 1.9× speedup?

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

            1. Initial program 43.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 43.2%

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

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

                \[\leadsto \color{blue}{\frac{-1 \cdot \log x}{n}} \]
              2. neg-mul-148.9%

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

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

            if 0.680000000000000049 < x < 6.5000000000000001e113

            1. Initial program 44.1%

              \[{\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 36.2%

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

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

              \[\leadsto \color{blue}{\frac{\mathsf{log1p}\left(x\right) - \log x}{n}} \]
            6. Step-by-step derivation
              1. div-inv36.2%

                \[\leadsto \color{blue}{\left(\mathsf{log1p}\left(x\right) - \log x\right) \cdot \frac{1}{n}} \]
            7. Applied egg-rr36.2%

              \[\leadsto \color{blue}{\left(\mathsf{log1p}\left(x\right) - \log x\right) \cdot \frac{1}{n}} \]
            8. Taylor expanded in x around inf 74.2%

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

                \[\leadsto \frac{1 - \color{blue}{\frac{0.5 \cdot 1}{x}}}{x} \cdot \frac{1}{n} \]
              2. metadata-eval74.2%

                \[\leadsto \frac{1 - \frac{\color{blue}{0.5}}{x}}{x} \cdot \frac{1}{n} \]
            10. Simplified74.2%

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

            if 6.5000000000000001e113 < x

            1. Initial program 86.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 53.0%

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

              \[\leadsto 1 - \color{blue}{1} \]
            5. Step-by-step derivation
              1. metadata-eval86.9%

                \[\leadsto \color{blue}{0} \]
            6. Applied egg-rr86.9%

              \[\leadsto \color{blue}{0} \]
          3. Recombined 3 regimes into one program.
          4. Final simplification63.1%

            \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq 0.68:\\ \;\;\;\;\frac{\log x}{-n}\\ \mathbf{elif}\;x \leq 6.5 \cdot 10^{+113}:\\ \;\;\;\;\frac{1}{n} \cdot \frac{1 - \frac{0.5}{x}}{x}\\ \mathbf{else}:\\ \;\;\;\;0\\ \end{array} \]
          5. Add Preprocessing

          Alternative 10: 50.1% accurate, 10.5× speedup?

          \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;x \leq 5 \cdot 10^{+113}:\\ \;\;\;\;\frac{-1 + \frac{0.5 + \frac{-0.3333333333333333}{x}}{x}}{n} \cdot \frac{-1}{x}\\ \mathbf{else}:\\ \;\;\;\;0\\ \end{array} \end{array} \]
          (FPCore (x n)
           :precision binary64
           (if (<= x 5e+113)
             (* (/ (+ -1.0 (/ (+ 0.5 (/ -0.3333333333333333 x)) x)) n) (/ -1.0 x))
             0.0))
          double code(double x, double n) {
          	double tmp;
          	if (x <= 5e+113) {
          		tmp = ((-1.0 + ((0.5 + (-0.3333333333333333 / x)) / x)) / n) * (-1.0 / x);
          	} else {
          		tmp = 0.0;
          	}
          	return tmp;
          }
          
          real(8) function code(x, n)
              real(8), intent (in) :: x
              real(8), intent (in) :: n
              real(8) :: tmp
              if (x <= 5d+113) then
                  tmp = (((-1.0d0) + ((0.5d0 + ((-0.3333333333333333d0) / x)) / x)) / n) * ((-1.0d0) / x)
              else
                  tmp = 0.0d0
              end if
              code = tmp
          end function
          
          public static double code(double x, double n) {
          	double tmp;
          	if (x <= 5e+113) {
          		tmp = ((-1.0 + ((0.5 + (-0.3333333333333333 / x)) / x)) / n) * (-1.0 / x);
          	} else {
          		tmp = 0.0;
          	}
          	return tmp;
          }
          
          def code(x, n):
          	tmp = 0
          	if x <= 5e+113:
          		tmp = ((-1.0 + ((0.5 + (-0.3333333333333333 / x)) / x)) / n) * (-1.0 / x)
          	else:
          		tmp = 0.0
          	return tmp
          
          function code(x, n)
          	tmp = 0.0
          	if (x <= 5e+113)
          		tmp = Float64(Float64(Float64(-1.0 + Float64(Float64(0.5 + Float64(-0.3333333333333333 / x)) / x)) / n) * Float64(-1.0 / x));
          	else
          		tmp = 0.0;
          	end
          	return tmp
          end
          
          function tmp_2 = code(x, n)
          	tmp = 0.0;
          	if (x <= 5e+113)
          		tmp = ((-1.0 + ((0.5 + (-0.3333333333333333 / x)) / x)) / n) * (-1.0 / x);
          	else
          		tmp = 0.0;
          	end
          	tmp_2 = tmp;
          end
          
          code[x_, n_] := If[LessEqual[x, 5e+113], N[(N[(N[(-1.0 + N[(N[(0.5 + N[(-0.3333333333333333 / x), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision] / n), $MachinePrecision] * N[(-1.0 / x), $MachinePrecision]), $MachinePrecision], 0.0]
          
          \begin{array}{l}
          
          \\
          \begin{array}{l}
          \mathbf{if}\;x \leq 5 \cdot 10^{+113}:\\
          \;\;\;\;\frac{-1 + \frac{0.5 + \frac{-0.3333333333333333}{x}}{x}}{n} \cdot \frac{-1}{x}\\
          
          \mathbf{else}:\\
          \;\;\;\;0\\
          
          
          \end{array}
          \end{array}
          
          Derivation
          1. Split input into 2 regimes
          2. if x < 5e113

            1. Initial program 43.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 46.4%

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

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

              \[\leadsto \color{blue}{\frac{\mathsf{log1p}\left(x\right) - \log x}{n}} \]
            6. Taylor expanded in x around -inf 39.9%

              \[\leadsto \color{blue}{-1 \cdot \frac{-1 \cdot \frac{0.3333333333333333 \cdot \frac{1}{n \cdot x} - 0.5 \cdot \frac{1}{n}}{x} - \frac{1}{n}}{x}} \]
            7. Taylor expanded in n around 0 39.9%

              \[\leadsto -1 \cdot \frac{\color{blue}{\frac{-1 \cdot \frac{0.3333333333333333 \cdot \frac{1}{x} - 0.5}{x} - 1}{n}}}{x} \]
            8. Step-by-step derivation
              1. sub-neg39.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                \[\leadsto -1 \cdot \left(\frac{\color{blue}{-1 + \frac{\frac{-0.3333333333333333}{x} + 0.5}{x}}}{n} \cdot \frac{1}{x}\right) \]
            11. Applied egg-rr39.9%

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

            if 5e113 < x

            1. Initial program 86.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 53.0%

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

              \[\leadsto 1 - \color{blue}{1} \]
            5. Step-by-step derivation
              1. metadata-eval86.9%

                \[\leadsto \color{blue}{0} \]
            6. Applied egg-rr86.9%

              \[\leadsto \color{blue}{0} \]
          3. Recombined 2 regimes into one program.
          4. Final simplification52.6%

            \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq 5 \cdot 10^{+113}:\\ \;\;\;\;\frac{-1 + \frac{0.5 + \frac{-0.3333333333333333}{x}}{x}}{n} \cdot \frac{-1}{x}\\ \mathbf{else}:\\ \;\;\;\;0\\ \end{array} \]
          5. Add Preprocessing

          Alternative 11: 50.0% accurate, 10.5× speedup?

          \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;x \leq 2.5 \cdot 10^{+114}:\\ \;\;\;\;\frac{\frac{1}{n} + \frac{-0.5 + \frac{0.3333333333333333}{x}}{n \cdot x}}{x}\\ \mathbf{else}:\\ \;\;\;\;0\\ \end{array} \end{array} \]
          (FPCore (x n)
           :precision binary64
           (if (<= x 2.5e+114)
             (/ (+ (/ 1.0 n) (/ (+ -0.5 (/ 0.3333333333333333 x)) (* n x))) x)
             0.0))
          double code(double x, double n) {
          	double tmp;
          	if (x <= 2.5e+114) {
          		tmp = ((1.0 / n) + ((-0.5 + (0.3333333333333333 / x)) / (n * x))) / x;
          	} else {
          		tmp = 0.0;
          	}
          	return tmp;
          }
          
          real(8) function code(x, n)
              real(8), intent (in) :: x
              real(8), intent (in) :: n
              real(8) :: tmp
              if (x <= 2.5d+114) then
                  tmp = ((1.0d0 / n) + (((-0.5d0) + (0.3333333333333333d0 / x)) / (n * x))) / x
              else
                  tmp = 0.0d0
              end if
              code = tmp
          end function
          
          public static double code(double x, double n) {
          	double tmp;
          	if (x <= 2.5e+114) {
          		tmp = ((1.0 / n) + ((-0.5 + (0.3333333333333333 / x)) / (n * x))) / x;
          	} else {
          		tmp = 0.0;
          	}
          	return tmp;
          }
          
          def code(x, n):
          	tmp = 0
          	if x <= 2.5e+114:
          		tmp = ((1.0 / n) + ((-0.5 + (0.3333333333333333 / x)) / (n * x))) / x
          	else:
          		tmp = 0.0
          	return tmp
          
          function code(x, n)
          	tmp = 0.0
          	if (x <= 2.5e+114)
          		tmp = Float64(Float64(Float64(1.0 / n) + Float64(Float64(-0.5 + Float64(0.3333333333333333 / x)) / Float64(n * x))) / x);
          	else
          		tmp = 0.0;
          	end
          	return tmp
          end
          
          function tmp_2 = code(x, n)
          	tmp = 0.0;
          	if (x <= 2.5e+114)
          		tmp = ((1.0 / n) + ((-0.5 + (0.3333333333333333 / x)) / (n * x))) / x;
          	else
          		tmp = 0.0;
          	end
          	tmp_2 = tmp;
          end
          
          code[x_, n_] := If[LessEqual[x, 2.5e+114], N[(N[(N[(1.0 / n), $MachinePrecision] + N[(N[(-0.5 + N[(0.3333333333333333 / x), $MachinePrecision]), $MachinePrecision] / N[(n * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision], 0.0]
          
          \begin{array}{l}
          
          \\
          \begin{array}{l}
          \mathbf{if}\;x \leq 2.5 \cdot 10^{+114}:\\
          \;\;\;\;\frac{\frac{1}{n} + \frac{-0.5 + \frac{0.3333333333333333}{x}}{n \cdot x}}{x}\\
          
          \mathbf{else}:\\
          \;\;\;\;0\\
          
          
          \end{array}
          \end{array}
          
          Derivation
          1. Split input into 2 regimes
          2. if x < 2.5e114

            1. Initial program 43.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 46.4%

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

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

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

                \[\leadsto \frac{\color{blue}{\log \left(1 + x\right)} - \log x}{n} \]
              2. diff-log46.5%

                \[\leadsto \frac{\color{blue}{\log \left(\frac{1 + x}{x}\right)}}{n} \]
            7. Applied egg-rr46.5%

              \[\leadsto \frac{\color{blue}{\log \left(\frac{1 + x}{x}\right)}}{n} \]
            8. Taylor expanded in x around inf 23.7%

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

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

            if 2.5e114 < x

            1. Initial program 86.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 53.0%

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

              \[\leadsto 1 - \color{blue}{1} \]
            5. Step-by-step derivation
              1. metadata-eval86.9%

                \[\leadsto \color{blue}{0} \]
            6. Applied egg-rr86.9%

              \[\leadsto \color{blue}{0} \]
          3. Recombined 2 regimes into one program.
          4. Final simplification52.6%

            \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq 2.5 \cdot 10^{+114}:\\ \;\;\;\;\frac{\frac{1}{n} + \frac{-0.5 + \frac{0.3333333333333333}{x}}{n \cdot x}}{x}\\ \mathbf{else}:\\ \;\;\;\;0\\ \end{array} \]
          5. Add Preprocessing

          Alternative 12: 50.0% accurate, 11.1× speedup?

          \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;x \leq 3.3 \cdot 10^{+115}:\\ \;\;\;\;\frac{\frac{\frac{\frac{-0.3333333333333333}{-x} - 0.5}{x} - -1}{n}}{x}\\ \mathbf{else}:\\ \;\;\;\;0\\ \end{array} \end{array} \]
          (FPCore (x n)
           :precision binary64
           (if (<= x 3.3e+115)
             (/ (/ (- (/ (- (/ -0.3333333333333333 (- x)) 0.5) x) -1.0) n) x)
             0.0))
          double code(double x, double n) {
          	double tmp;
          	if (x <= 3.3e+115) {
          		tmp = (((((-0.3333333333333333 / -x) - 0.5) / x) - -1.0) / n) / x;
          	} else {
          		tmp = 0.0;
          	}
          	return tmp;
          }
          
          real(8) function code(x, n)
              real(8), intent (in) :: x
              real(8), intent (in) :: n
              real(8) :: tmp
              if (x <= 3.3d+115) then
                  tmp = ((((((-0.3333333333333333d0) / -x) - 0.5d0) / x) - (-1.0d0)) / n) / x
              else
                  tmp = 0.0d0
              end if
              code = tmp
          end function
          
          public static double code(double x, double n) {
          	double tmp;
          	if (x <= 3.3e+115) {
          		tmp = (((((-0.3333333333333333 / -x) - 0.5) / x) - -1.0) / n) / x;
          	} else {
          		tmp = 0.0;
          	}
          	return tmp;
          }
          
          def code(x, n):
          	tmp = 0
          	if x <= 3.3e+115:
          		tmp = (((((-0.3333333333333333 / -x) - 0.5) / x) - -1.0) / n) / x
          	else:
          		tmp = 0.0
          	return tmp
          
          function code(x, n)
          	tmp = 0.0
          	if (x <= 3.3e+115)
          		tmp = Float64(Float64(Float64(Float64(Float64(Float64(-0.3333333333333333 / Float64(-x)) - 0.5) / x) - -1.0) / n) / x);
          	else
          		tmp = 0.0;
          	end
          	return tmp
          end
          
          function tmp_2 = code(x, n)
          	tmp = 0.0;
          	if (x <= 3.3e+115)
          		tmp = (((((-0.3333333333333333 / -x) - 0.5) / x) - -1.0) / n) / x;
          	else
          		tmp = 0.0;
          	end
          	tmp_2 = tmp;
          end
          
          code[x_, n_] := If[LessEqual[x, 3.3e+115], N[(N[(N[(N[(N[(N[(-0.3333333333333333 / (-x)), $MachinePrecision] - 0.5), $MachinePrecision] / x), $MachinePrecision] - -1.0), $MachinePrecision] / n), $MachinePrecision] / x), $MachinePrecision], 0.0]
          
          \begin{array}{l}
          
          \\
          \begin{array}{l}
          \mathbf{if}\;x \leq 3.3 \cdot 10^{+115}:\\
          \;\;\;\;\frac{\frac{\frac{\frac{-0.3333333333333333}{-x} - 0.5}{x} - -1}{n}}{x}\\
          
          \mathbf{else}:\\
          \;\;\;\;0\\
          
          
          \end{array}
          \end{array}
          
          Derivation
          1. Split input into 2 regimes
          2. if x < 3.30000000000000005e115

            1. Initial program 43.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 46.4%

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

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

              \[\leadsto \color{blue}{\frac{\mathsf{log1p}\left(x\right) - \log x}{n}} \]
            6. Taylor expanded in x around -inf 39.9%

              \[\leadsto \color{blue}{-1 \cdot \frac{-1 \cdot \frac{0.3333333333333333 \cdot \frac{1}{n \cdot x} - 0.5 \cdot \frac{1}{n}}{x} - \frac{1}{n}}{x}} \]
            7. Taylor expanded in n around 0 39.9%

              \[\leadsto -1 \cdot \frac{\color{blue}{\frac{-1 \cdot \frac{0.3333333333333333 \cdot \frac{1}{x} - 0.5}{x} - 1}{n}}}{x} \]
            8. Step-by-step derivation
              1. sub-neg39.9%

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

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

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

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

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

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

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

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

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

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

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

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

              \[\leadsto -1 \cdot \frac{\color{blue}{\frac{\frac{\frac{-0.3333333333333333}{x} + 0.5}{x} + -1}{n}}}{x} \]
            10. Step-by-step derivation
              1. associate-*r/39.9%

                \[\leadsto \color{blue}{\frac{-1 \cdot \frac{\frac{\frac{-0.3333333333333333}{x} + 0.5}{x} + -1}{n}}{x}} \]
              2. neg-mul-139.9%

                \[\leadsto \frac{\color{blue}{-\frac{\frac{\frac{-0.3333333333333333}{x} + 0.5}{x} + -1}{n}}}{x} \]
              3. distribute-neg-frac239.9%

                \[\leadsto \frac{\color{blue}{\frac{\frac{\frac{-0.3333333333333333}{x} + 0.5}{x} + -1}{-n}}}{x} \]
              4. +-commutative39.9%

                \[\leadsto \frac{\frac{\color{blue}{-1 + \frac{\frac{-0.3333333333333333}{x} + 0.5}{x}}}{-n}}{x} \]
            11. Applied egg-rr39.9%

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

            if 3.30000000000000005e115 < x

            1. Initial program 86.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 53.0%

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

              \[\leadsto 1 - \color{blue}{1} \]
            5. Step-by-step derivation
              1. metadata-eval86.9%

                \[\leadsto \color{blue}{0} \]
            6. Applied egg-rr86.9%

              \[\leadsto \color{blue}{0} \]
          3. Recombined 2 regimes into one program.
          4. Final simplification52.6%

            \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq 3.3 \cdot 10^{+115}:\\ \;\;\;\;\frac{\frac{\frac{\frac{-0.3333333333333333}{-x} - 0.5}{x} - -1}{n}}{x}\\ \mathbf{else}:\\ \;\;\;\;0\\ \end{array} \]
          5. Add Preprocessing

          Alternative 13: 50.1% accurate, 11.7× speedup?

          \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;x \leq 2.9 \cdot 10^{+112}:\\ \;\;\;\;\frac{\frac{1 + \frac{-0.5 + \frac{0.3333333333333333}{x}}{x}}{x}}{n}\\ \mathbf{else}:\\ \;\;\;\;0\\ \end{array} \end{array} \]
          (FPCore (x n)
           :precision binary64
           (if (<= x 2.9e+112)
             (/ (/ (+ 1.0 (/ (+ -0.5 (/ 0.3333333333333333 x)) x)) x) n)
             0.0))
          double code(double x, double n) {
          	double tmp;
          	if (x <= 2.9e+112) {
          		tmp = ((1.0 + ((-0.5 + (0.3333333333333333 / x)) / x)) / x) / n;
          	} else {
          		tmp = 0.0;
          	}
          	return tmp;
          }
          
          real(8) function code(x, n)
              real(8), intent (in) :: x
              real(8), intent (in) :: n
              real(8) :: tmp
              if (x <= 2.9d+112) then
                  tmp = ((1.0d0 + (((-0.5d0) + (0.3333333333333333d0 / x)) / x)) / x) / n
              else
                  tmp = 0.0d0
              end if
              code = tmp
          end function
          
          public static double code(double x, double n) {
          	double tmp;
          	if (x <= 2.9e+112) {
          		tmp = ((1.0 + ((-0.5 + (0.3333333333333333 / x)) / x)) / x) / n;
          	} else {
          		tmp = 0.0;
          	}
          	return tmp;
          }
          
          def code(x, n):
          	tmp = 0
          	if x <= 2.9e+112:
          		tmp = ((1.0 + ((-0.5 + (0.3333333333333333 / x)) / x)) / x) / n
          	else:
          		tmp = 0.0
          	return tmp
          
          function code(x, n)
          	tmp = 0.0
          	if (x <= 2.9e+112)
          		tmp = Float64(Float64(Float64(1.0 + Float64(Float64(-0.5 + Float64(0.3333333333333333 / x)) / x)) / x) / n);
          	else
          		tmp = 0.0;
          	end
          	return tmp
          end
          
          function tmp_2 = code(x, n)
          	tmp = 0.0;
          	if (x <= 2.9e+112)
          		tmp = ((1.0 + ((-0.5 + (0.3333333333333333 / x)) / x)) / x) / n;
          	else
          		tmp = 0.0;
          	end
          	tmp_2 = tmp;
          end
          
          code[x_, n_] := If[LessEqual[x, 2.9e+112], N[(N[(N[(1.0 + N[(N[(-0.5 + N[(0.3333333333333333 / x), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision] / n), $MachinePrecision], 0.0]
          
          \begin{array}{l}
          
          \\
          \begin{array}{l}
          \mathbf{if}\;x \leq 2.9 \cdot 10^{+112}:\\
          \;\;\;\;\frac{\frac{1 + \frac{-0.5 + \frac{0.3333333333333333}{x}}{x}}{x}}{n}\\
          
          \mathbf{else}:\\
          \;\;\;\;0\\
          
          
          \end{array}
          \end{array}
          
          Derivation
          1. Split input into 2 regimes
          2. if x < 2.9000000000000002e112

            1. Initial program 43.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 46.4%

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

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

              \[\leadsto \color{blue}{\frac{\mathsf{log1p}\left(x\right) - \log x}{n}} \]
            6. Step-by-step derivation
              1. log1p-expm1-u30.7%

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

                \[\leadsto \frac{x - \mathsf{log1p}\left(\color{blue}{e^{\log x} - 1}\right)}{n} \]
              3. add-exp-log30.7%

                \[\leadsto \frac{x - \mathsf{log1p}\left(\color{blue}{x} - 1\right)}{n} \]
            7. Applied egg-rr37.4%

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

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

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

            if 2.9000000000000002e112 < x

            1. Initial program 86.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 53.0%

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

              \[\leadsto 1 - \color{blue}{1} \]
            5. Step-by-step derivation
              1. metadata-eval86.9%

                \[\leadsto \color{blue}{0} \]
            6. Applied egg-rr86.9%

              \[\leadsto \color{blue}{0} \]
          3. Recombined 2 regimes into one program.
          4. Add Preprocessing

          Alternative 14: 49.9% accurate, 11.7× speedup?

          \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;x \leq 4.2 \cdot 10^{+112}:\\ \;\;\;\;\frac{1 - \frac{0.5 + \frac{-0.3333333333333333}{x}}{x}}{n \cdot x}\\ \mathbf{else}:\\ \;\;\;\;0\\ \end{array} \end{array} \]
          (FPCore (x n)
           :precision binary64
           (if (<= x 4.2e+112)
             (/ (- 1.0 (/ (+ 0.5 (/ -0.3333333333333333 x)) x)) (* n x))
             0.0))
          double code(double x, double n) {
          	double tmp;
          	if (x <= 4.2e+112) {
          		tmp = (1.0 - ((0.5 + (-0.3333333333333333 / x)) / x)) / (n * x);
          	} else {
          		tmp = 0.0;
          	}
          	return tmp;
          }
          
          real(8) function code(x, n)
              real(8), intent (in) :: x
              real(8), intent (in) :: n
              real(8) :: tmp
              if (x <= 4.2d+112) then
                  tmp = (1.0d0 - ((0.5d0 + ((-0.3333333333333333d0) / x)) / x)) / (n * x)
              else
                  tmp = 0.0d0
              end if
              code = tmp
          end function
          
          public static double code(double x, double n) {
          	double tmp;
          	if (x <= 4.2e+112) {
          		tmp = (1.0 - ((0.5 + (-0.3333333333333333 / x)) / x)) / (n * x);
          	} else {
          		tmp = 0.0;
          	}
          	return tmp;
          }
          
          def code(x, n):
          	tmp = 0
          	if x <= 4.2e+112:
          		tmp = (1.0 - ((0.5 + (-0.3333333333333333 / x)) / x)) / (n * x)
          	else:
          		tmp = 0.0
          	return tmp
          
          function code(x, n)
          	tmp = 0.0
          	if (x <= 4.2e+112)
          		tmp = Float64(Float64(1.0 - Float64(Float64(0.5 + Float64(-0.3333333333333333 / x)) / x)) / Float64(n * x));
          	else
          		tmp = 0.0;
          	end
          	return tmp
          end
          
          function tmp_2 = code(x, n)
          	tmp = 0.0;
          	if (x <= 4.2e+112)
          		tmp = (1.0 - ((0.5 + (-0.3333333333333333 / x)) / x)) / (n * x);
          	else
          		tmp = 0.0;
          	end
          	tmp_2 = tmp;
          end
          
          code[x_, n_] := If[LessEqual[x, 4.2e+112], N[(N[(1.0 - N[(N[(0.5 + N[(-0.3333333333333333 / x), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision] / N[(n * x), $MachinePrecision]), $MachinePrecision], 0.0]
          
          \begin{array}{l}
          
          \\
          \begin{array}{l}
          \mathbf{if}\;x \leq 4.2 \cdot 10^{+112}:\\
          \;\;\;\;\frac{1 - \frac{0.5 + \frac{-0.3333333333333333}{x}}{x}}{n \cdot x}\\
          
          \mathbf{else}:\\
          \;\;\;\;0\\
          
          
          \end{array}
          \end{array}
          
          Derivation
          1. Split input into 2 regimes
          2. if x < 4.1999999999999998e112

            1. Initial program 43.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 46.4%

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

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

              \[\leadsto \color{blue}{\frac{\mathsf{log1p}\left(x\right) - \log x}{n}} \]
            6. Taylor expanded in x around -inf 39.9%

              \[\leadsto \color{blue}{-1 \cdot \frac{-1 \cdot \frac{0.3333333333333333 \cdot \frac{1}{n \cdot x} - 0.5 \cdot \frac{1}{n}}{x} - \frac{1}{n}}{x}} \]
            7. Taylor expanded in n around -inf 39.5%

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

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

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

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

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

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

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

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

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

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

            if 4.1999999999999998e112 < x

            1. Initial program 86.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 53.0%

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

              \[\leadsto 1 - \color{blue}{1} \]
            5. Step-by-step derivation
              1. metadata-eval86.9%

                \[\leadsto \color{blue}{0} \]
            6. Applied egg-rr86.9%

              \[\leadsto \color{blue}{0} \]
          3. Recombined 2 regimes into one program.
          4. Final simplification52.3%

            \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq 4.2 \cdot 10^{+112}:\\ \;\;\;\;\frac{1 - \frac{0.5 + \frac{-0.3333333333333333}{x}}{x}}{n \cdot x}\\ \mathbf{else}:\\ \;\;\;\;0\\ \end{array} \]
          5. Add Preprocessing

          Alternative 15: 44.2% accurate, 17.6× speedup?

          \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;x \leq 3.8 \cdot 10^{+113}:\\ \;\;\;\;\frac{1}{n} \cdot \frac{1}{x}\\ \mathbf{else}:\\ \;\;\;\;0\\ \end{array} \end{array} \]
          (FPCore (x n)
           :precision binary64
           (if (<= x 3.8e+113) (* (/ 1.0 n) (/ 1.0 x)) 0.0))
          double code(double x, double n) {
          	double tmp;
          	if (x <= 3.8e+113) {
          		tmp = (1.0 / n) * (1.0 / x);
          	} else {
          		tmp = 0.0;
          	}
          	return tmp;
          }
          
          real(8) function code(x, n)
              real(8), intent (in) :: x
              real(8), intent (in) :: n
              real(8) :: tmp
              if (x <= 3.8d+113) then
                  tmp = (1.0d0 / n) * (1.0d0 / x)
              else
                  tmp = 0.0d0
              end if
              code = tmp
          end function
          
          public static double code(double x, double n) {
          	double tmp;
          	if (x <= 3.8e+113) {
          		tmp = (1.0 / n) * (1.0 / x);
          	} else {
          		tmp = 0.0;
          	}
          	return tmp;
          }
          
          def code(x, n):
          	tmp = 0
          	if x <= 3.8e+113:
          		tmp = (1.0 / n) * (1.0 / x)
          	else:
          		tmp = 0.0
          	return tmp
          
          function code(x, n)
          	tmp = 0.0
          	if (x <= 3.8e+113)
          		tmp = Float64(Float64(1.0 / n) * Float64(1.0 / x));
          	else
          		tmp = 0.0;
          	end
          	return tmp
          end
          
          function tmp_2 = code(x, n)
          	tmp = 0.0;
          	if (x <= 3.8e+113)
          		tmp = (1.0 / n) * (1.0 / x);
          	else
          		tmp = 0.0;
          	end
          	tmp_2 = tmp;
          end
          
          code[x_, n_] := If[LessEqual[x, 3.8e+113], N[(N[(1.0 / n), $MachinePrecision] * N[(1.0 / x), $MachinePrecision]), $MachinePrecision], 0.0]
          
          \begin{array}{l}
          
          \\
          \begin{array}{l}
          \mathbf{if}\;x \leq 3.8 \cdot 10^{+113}:\\
          \;\;\;\;\frac{1}{n} \cdot \frac{1}{x}\\
          
          \mathbf{else}:\\
          \;\;\;\;0\\
          
          
          \end{array}
          \end{array}
          
          Derivation
          1. Split input into 2 regimes
          2. if x < 3.8000000000000003e113

            1. Initial program 43.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 46.4%

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

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

              \[\leadsto \color{blue}{\frac{\mathsf{log1p}\left(x\right) - \log x}{n}} \]
            6. Step-by-step derivation
              1. div-inv46.4%

                \[\leadsto \color{blue}{\left(\mathsf{log1p}\left(x\right) - \log x\right) \cdot \frac{1}{n}} \]
            7. Applied egg-rr46.4%

              \[\leadsto \color{blue}{\left(\mathsf{log1p}\left(x\right) - \log x\right) \cdot \frac{1}{n}} \]
            8. Taylor expanded in x around inf 34.8%

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

            if 3.8000000000000003e113 < x

            1. Initial program 86.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 53.0%

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

              \[\leadsto 1 - \color{blue}{1} \]
            5. Step-by-step derivation
              1. metadata-eval86.9%

                \[\leadsto \color{blue}{0} \]
            6. Applied egg-rr86.9%

              \[\leadsto \color{blue}{0} \]
          3. Recombined 2 regimes into one program.
          4. Final simplification48.9%

            \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq 3.8 \cdot 10^{+113}:\\ \;\;\;\;\frac{1}{n} \cdot \frac{1}{x}\\ \mathbf{else}:\\ \;\;\;\;0\\ \end{array} \]
          5. Add Preprocessing

          Alternative 16: 44.2% accurate, 21.1× speedup?

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

            1. Initial program 43.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 inf 19.2%

              \[\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}} \]
            4. Step-by-step derivation
              1. Simplified19.0%

                \[\leadsto \color{blue}{\frac{\frac{e^{-\frac{-\log x}{n}}}{n} + e^{-\frac{-\log x}{n}} \cdot \frac{\frac{0.5}{{n}^{2}} - \frac{0.5}{n}}{x}}{x}} \]
              2. Taylor expanded in x around inf 41.7%

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

                  \[\leadsto \frac{\frac{e^{-\frac{\color{blue}{-\log x}}{n}}}{n}}{x} \]
                2. neg-mul-141.7%

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

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

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

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

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

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

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

                  \[\leadsto \frac{\frac{e^{\color{blue}{\log x \cdot \frac{1}{n}}}}{n}}{x} \]
                10. exp-to-pow41.7%

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

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

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

              if 3.49999999999999997e112 < x

              1. Initial program 86.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 53.0%

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

                \[\leadsto 1 - \color{blue}{1} \]
              5. Step-by-step derivation
                1. metadata-eval86.9%

                  \[\leadsto \color{blue}{0} \]
              6. Applied egg-rr86.9%

                \[\leadsto \color{blue}{0} \]
            5. Recombined 2 regimes into one program.
            6. Add Preprocessing

            Alternative 17: 43.9% accurate, 21.1× speedup?

            \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;x \leq 7 \cdot 10^{+114}:\\ \;\;\;\;\frac{1}{n \cdot x}\\ \mathbf{else}:\\ \;\;\;\;0\\ \end{array} \end{array} \]
            (FPCore (x n) :precision binary64 (if (<= x 7e+114) (/ 1.0 (* n x)) 0.0))
            double code(double x, double n) {
            	double tmp;
            	if (x <= 7e+114) {
            		tmp = 1.0 / (n * x);
            	} else {
            		tmp = 0.0;
            	}
            	return tmp;
            }
            
            real(8) function code(x, n)
                real(8), intent (in) :: x
                real(8), intent (in) :: n
                real(8) :: tmp
                if (x <= 7d+114) then
                    tmp = 1.0d0 / (n * x)
                else
                    tmp = 0.0d0
                end if
                code = tmp
            end function
            
            public static double code(double x, double n) {
            	double tmp;
            	if (x <= 7e+114) {
            		tmp = 1.0 / (n * x);
            	} else {
            		tmp = 0.0;
            	}
            	return tmp;
            }
            
            def code(x, n):
            	tmp = 0
            	if x <= 7e+114:
            		tmp = 1.0 / (n * x)
            	else:
            		tmp = 0.0
            	return tmp
            
            function code(x, n)
            	tmp = 0.0
            	if (x <= 7e+114)
            		tmp = Float64(1.0 / Float64(n * x));
            	else
            		tmp = 0.0;
            	end
            	return tmp
            end
            
            function tmp_2 = code(x, n)
            	tmp = 0.0;
            	if (x <= 7e+114)
            		tmp = 1.0 / (n * x);
            	else
            		tmp = 0.0;
            	end
            	tmp_2 = tmp;
            end
            
            code[x_, n_] := If[LessEqual[x, 7e+114], N[(1.0 / N[(n * x), $MachinePrecision]), $MachinePrecision], 0.0]
            
            \begin{array}{l}
            
            \\
            \begin{array}{l}
            \mathbf{if}\;x \leq 7 \cdot 10^{+114}:\\
            \;\;\;\;\frac{1}{n \cdot x}\\
            
            \mathbf{else}:\\
            \;\;\;\;0\\
            
            
            \end{array}
            \end{array}
            
            Derivation
            1. Split input into 2 regimes
            2. if x < 7.0000000000000001e114

              1. Initial program 43.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 46.4%

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

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

                \[\leadsto \color{blue}{\frac{\mathsf{log1p}\left(x\right) - \log x}{n}} \]
              6. Taylor expanded in x around inf 34.5%

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

                  \[\leadsto \frac{1}{\color{blue}{x \cdot n}} \]
              8. Simplified34.5%

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

              if 7.0000000000000001e114 < x

              1. Initial program 86.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 53.0%

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

                \[\leadsto 1 - \color{blue}{1} \]
              5. Step-by-step derivation
                1. metadata-eval86.9%

                  \[\leadsto \color{blue}{0} \]
              6. Applied egg-rr86.9%

                \[\leadsto \color{blue}{0} \]
            3. Recombined 2 regimes into one program.
            4. Final simplification48.6%

              \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq 7 \cdot 10^{+114}:\\ \;\;\;\;\frac{1}{n \cdot x}\\ \mathbf{else}:\\ \;\;\;\;0\\ \end{array} \]
            5. Add Preprocessing

            Alternative 18: 31.3% accurate, 211.0× speedup?

            \[\begin{array}{l} \\ 0 \end{array} \]
            (FPCore (x n) :precision binary64 0.0)
            double code(double x, double n) {
            	return 0.0;
            }
            
            real(8) function code(x, n)
                real(8), intent (in) :: x
                real(8), intent (in) :: n
                code = 0.0d0
            end function
            
            public static double code(double x, double n) {
            	return 0.0;
            }
            
            def code(x, n):
            	return 0.0
            
            function code(x, n)
            	return 0.0
            end
            
            function tmp = code(x, n)
            	tmp = 0.0;
            end
            
            code[x_, n_] := 0.0
            
            \begin{array}{l}
            
            \\
            0
            \end{array}
            
            Derivation
            1. Initial program 55.5%

              \[{\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.2%

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

              \[\leadsto 1 - \color{blue}{1} \]
            5. Step-by-step derivation
              1. metadata-eval32.4%

                \[\leadsto \color{blue}{0} \]
            6. Applied egg-rr32.4%

              \[\leadsto \color{blue}{0} \]
            7. Add Preprocessing

            Reproduce

            ?
            herbie shell --seed 2024169 
            (FPCore (x n)
              :name "2nthrt (problem 3.4.6)"
              :precision binary64
              (- (pow (+ x 1.0) (/ 1.0 n)) (pow x (/ 1.0 n))))