?

Average Error: 32.7 → 6.9
Time: 42.2s
Precision: binary64
Cost: 132164

?

\[{\left(x + 1\right)}^{\left(\frac{1}{n}\right)} - {x}^{\left(\frac{1}{n}\right)} \]
\[\begin{array}{l} t_0 := \log \left(1 + x\right)\\ \mathbf{if}\;x \leq 1.1:\\ \;\;\;\;\left(\frac{t_0}{n} + 0.16666666666666666 \cdot \frac{{t_0}^{3}}{{n}^{3}}\right) + \left(0.041666666666666664 \cdot \frac{{t_0}^{4}}{{n}^{4}} + \left(0.5 \cdot \frac{{t_0}^{2}}{{n}^{2}} - \left(0.5 \cdot \frac{{\log x}^{2}}{{n}^{2}} + \left(\frac{\log x}{n} + \left(0.16666666666666666 \cdot \frac{{\log x}^{3}}{{n}^{3}} + 0.041666666666666664 \cdot \frac{{\log x}^{4}}{{n}^{4}}\right)\right)\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{e^{-\frac{\log \left(\frac{1}{x}\right)}{n}}}{x \cdot n}\\ \end{array} \]
(FPCore (x n)
 :precision binary64
 (- (pow (+ x 1.0) (/ 1.0 n)) (pow x (/ 1.0 n))))
(FPCore (x n)
 :precision binary64
 (let* ((t_0 (log (+ 1.0 x))))
   (if (<= x 1.1)
     (+
      (+ (/ t_0 n) (* 0.16666666666666666 (/ (pow t_0 3.0) (pow n 3.0))))
      (+
       (* 0.041666666666666664 (/ (pow t_0 4.0) (pow n 4.0)))
       (-
        (* 0.5 (/ (pow t_0 2.0) (pow n 2.0)))
        (+
         (* 0.5 (/ (pow (log x) 2.0) (pow n 2.0)))
         (+
          (/ (log x) n)
          (+
           (* 0.16666666666666666 (/ (pow (log x) 3.0) (pow n 3.0)))
           (* 0.041666666666666664 (/ (pow (log x) 4.0) (pow n 4.0)))))))))
     (/ (exp (- (/ (log (/ 1.0 x)) n))) (* x n)))))
double code(double x, double n) {
	return pow((x + 1.0), (1.0 / n)) - pow(x, (1.0 / n));
}
double code(double x, double n) {
	double t_0 = log((1.0 + x));
	double tmp;
	if (x <= 1.1) {
		tmp = ((t_0 / n) + (0.16666666666666666 * (pow(t_0, 3.0) / pow(n, 3.0)))) + ((0.041666666666666664 * (pow(t_0, 4.0) / pow(n, 4.0))) + ((0.5 * (pow(t_0, 2.0) / pow(n, 2.0))) - ((0.5 * (pow(log(x), 2.0) / pow(n, 2.0))) + ((log(x) / n) + ((0.16666666666666666 * (pow(log(x), 3.0) / pow(n, 3.0))) + (0.041666666666666664 * (pow(log(x), 4.0) / pow(n, 4.0))))))));
	} else {
		tmp = exp(-(log((1.0 / x)) / n)) / (x * n);
	}
	return tmp;
}
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
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 = log((1.0d0 + x))
    if (x <= 1.1d0) then
        tmp = ((t_0 / n) + (0.16666666666666666d0 * ((t_0 ** 3.0d0) / (n ** 3.0d0)))) + ((0.041666666666666664d0 * ((t_0 ** 4.0d0) / (n ** 4.0d0))) + ((0.5d0 * ((t_0 ** 2.0d0) / (n ** 2.0d0))) - ((0.5d0 * ((log(x) ** 2.0d0) / (n ** 2.0d0))) + ((log(x) / n) + ((0.16666666666666666d0 * ((log(x) ** 3.0d0) / (n ** 3.0d0))) + (0.041666666666666664d0 * ((log(x) ** 4.0d0) / (n ** 4.0d0))))))))
    else
        tmp = exp(-(log((1.0d0 / x)) / n)) / (x * n)
    end if
    code = tmp
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));
}
public static double code(double x, double n) {
	double t_0 = Math.log((1.0 + x));
	double tmp;
	if (x <= 1.1) {
		tmp = ((t_0 / n) + (0.16666666666666666 * (Math.pow(t_0, 3.0) / Math.pow(n, 3.0)))) + ((0.041666666666666664 * (Math.pow(t_0, 4.0) / Math.pow(n, 4.0))) + ((0.5 * (Math.pow(t_0, 2.0) / Math.pow(n, 2.0))) - ((0.5 * (Math.pow(Math.log(x), 2.0) / Math.pow(n, 2.0))) + ((Math.log(x) / n) + ((0.16666666666666666 * (Math.pow(Math.log(x), 3.0) / Math.pow(n, 3.0))) + (0.041666666666666664 * (Math.pow(Math.log(x), 4.0) / Math.pow(n, 4.0))))))));
	} else {
		tmp = Math.exp(-(Math.log((1.0 / x)) / n)) / (x * n);
	}
	return tmp;
}
def code(x, n):
	return math.pow((x + 1.0), (1.0 / n)) - math.pow(x, (1.0 / n))
def code(x, n):
	t_0 = math.log((1.0 + x))
	tmp = 0
	if x <= 1.1:
		tmp = ((t_0 / n) + (0.16666666666666666 * (math.pow(t_0, 3.0) / math.pow(n, 3.0)))) + ((0.041666666666666664 * (math.pow(t_0, 4.0) / math.pow(n, 4.0))) + ((0.5 * (math.pow(t_0, 2.0) / math.pow(n, 2.0))) - ((0.5 * (math.pow(math.log(x), 2.0) / math.pow(n, 2.0))) + ((math.log(x) / n) + ((0.16666666666666666 * (math.pow(math.log(x), 3.0) / math.pow(n, 3.0))) + (0.041666666666666664 * (math.pow(math.log(x), 4.0) / math.pow(n, 4.0))))))))
	else:
		tmp = math.exp(-(math.log((1.0 / x)) / n)) / (x * n)
	return tmp
function code(x, n)
	return Float64((Float64(x + 1.0) ^ Float64(1.0 / n)) - (x ^ Float64(1.0 / n)))
end
function code(x, n)
	t_0 = log(Float64(1.0 + x))
	tmp = 0.0
	if (x <= 1.1)
		tmp = Float64(Float64(Float64(t_0 / n) + Float64(0.16666666666666666 * Float64((t_0 ^ 3.0) / (n ^ 3.0)))) + Float64(Float64(0.041666666666666664 * Float64((t_0 ^ 4.0) / (n ^ 4.0))) + Float64(Float64(0.5 * Float64((t_0 ^ 2.0) / (n ^ 2.0))) - Float64(Float64(0.5 * Float64((log(x) ^ 2.0) / (n ^ 2.0))) + Float64(Float64(log(x) / n) + Float64(Float64(0.16666666666666666 * Float64((log(x) ^ 3.0) / (n ^ 3.0))) + Float64(0.041666666666666664 * Float64((log(x) ^ 4.0) / (n ^ 4.0)))))))));
	else
		tmp = Float64(exp(Float64(-Float64(log(Float64(1.0 / x)) / n))) / Float64(x * n));
	end
	return tmp
end
function tmp = code(x, n)
	tmp = ((x + 1.0) ^ (1.0 / n)) - (x ^ (1.0 / n));
end
function tmp_2 = code(x, n)
	t_0 = log((1.0 + x));
	tmp = 0.0;
	if (x <= 1.1)
		tmp = ((t_0 / n) + (0.16666666666666666 * ((t_0 ^ 3.0) / (n ^ 3.0)))) + ((0.041666666666666664 * ((t_0 ^ 4.0) / (n ^ 4.0))) + ((0.5 * ((t_0 ^ 2.0) / (n ^ 2.0))) - ((0.5 * ((log(x) ^ 2.0) / (n ^ 2.0))) + ((log(x) / n) + ((0.16666666666666666 * ((log(x) ^ 3.0) / (n ^ 3.0))) + (0.041666666666666664 * ((log(x) ^ 4.0) / (n ^ 4.0))))))));
	else
		tmp = exp(-(log((1.0 / x)) / n)) / (x * n);
	end
	tmp_2 = tmp;
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]
code[x_, n_] := Block[{t$95$0 = N[Log[N[(1.0 + x), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[x, 1.1], N[(N[(N[(t$95$0 / n), $MachinePrecision] + N[(0.16666666666666666 * N[(N[Power[t$95$0, 3.0], $MachinePrecision] / N[Power[n, 3.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(0.041666666666666664 * N[(N[Power[t$95$0, 4.0], $MachinePrecision] / N[Power[n, 4.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(0.5 * N[(N[Power[t$95$0, 2.0], $MachinePrecision] / N[Power[n, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[(0.5 * N[(N[Power[N[Log[x], $MachinePrecision], 2.0], $MachinePrecision] / N[Power[n, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(N[Log[x], $MachinePrecision] / n), $MachinePrecision] + N[(N[(0.16666666666666666 * N[(N[Power[N[Log[x], $MachinePrecision], 3.0], $MachinePrecision] / N[Power[n, 3.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(0.041666666666666664 * N[(N[Power[N[Log[x], $MachinePrecision], 4.0], $MachinePrecision] / N[Power[n, 4.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[Exp[(-N[(N[Log[N[(1.0 / x), $MachinePrecision]], $MachinePrecision] / n), $MachinePrecision])], $MachinePrecision] / N[(x * n), $MachinePrecision]), $MachinePrecision]]]
{\left(x + 1\right)}^{\left(\frac{1}{n}\right)} - {x}^{\left(\frac{1}{n}\right)}
\begin{array}{l}
t_0 := \log \left(1 + x\right)\\
\mathbf{if}\;x \leq 1.1:\\
\;\;\;\;\left(\frac{t_0}{n} + 0.16666666666666666 \cdot \frac{{t_0}^{3}}{{n}^{3}}\right) + \left(0.041666666666666664 \cdot \frac{{t_0}^{4}}{{n}^{4}} + \left(0.5 \cdot \frac{{t_0}^{2}}{{n}^{2}} - \left(0.5 \cdot \frac{{\log x}^{2}}{{n}^{2}} + \left(\frac{\log x}{n} + \left(0.16666666666666666 \cdot \frac{{\log x}^{3}}{{n}^{3}} + 0.041666666666666664 \cdot \frac{{\log x}^{4}}{{n}^{4}}\right)\right)\right)\right)\right)\\

\mathbf{else}:\\
\;\;\;\;\frac{e^{-\frac{\log \left(\frac{1}{x}\right)}{n}}}{x \cdot n}\\


\end{array}

Error?

Try it out?

Your Program's Arguments

Results

Enter valid numbers for all inputs

Derivation?

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

    1. Initial program 47.5

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

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

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

      [Start]13.3

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

      rational.json-simplify-48 [=>]13.3

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

      rational.json-simplify-1 [=>]13.3

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

      rational.json-simplify-1 [=>]13.3

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

    if 1.1000000000000001 < x

    1. Initial program 20.5

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

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

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

      [Start]1.6

      \[ \frac{e^{-1 \cdot \frac{\log \left(\frac{1}{x}\right)}{n}}}{n \cdot x} \]

      rational.json-simplify-2 [=>]1.6

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

      rational.json-simplify-9 [=>]1.6

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

      rational.json-simplify-2 [=>]1.6

      \[ \frac{e^{-\frac{\log \left(\frac{1}{x}\right)}{n}}}{\color{blue}{x \cdot n}} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification6.9

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq 1.1:\\ \;\;\;\;\left(\frac{\log \left(1 + x\right)}{n} + 0.16666666666666666 \cdot \frac{{\log \left(1 + x\right)}^{3}}{{n}^{3}}\right) + \left(0.041666666666666664 \cdot \frac{{\log \left(1 + x\right)}^{4}}{{n}^{4}} + \left(0.5 \cdot \frac{{\log \left(1 + x\right)}^{2}}{{n}^{2}} - \left(0.5 \cdot \frac{{\log x}^{2}}{{n}^{2}} + \left(\frac{\log x}{n} + \left(0.16666666666666666 \cdot \frac{{\log x}^{3}}{{n}^{3}} + 0.041666666666666664 \cdot \frac{{\log x}^{4}}{{n}^{4}}\right)\right)\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{e^{-\frac{\log \left(\frac{1}{x}\right)}{n}}}{x \cdot n}\\ \end{array} \]

Alternatives

Alternative 1
Error6.8
Cost85700
\[\begin{array}{l} t_0 := \log \left(1 + x\right)\\ \mathbf{if}\;x \leq 1.1:\\ \;\;\;\;\left(-\left(\frac{\log x - t_0}{n} + \left({t_0}^{3} - {\log x}^{3}\right) \cdot \frac{-0.16666666666666666}{{n}^{3}}\right)\right) + 0.5 \cdot \left(\frac{{t_0}^{2}}{{n}^{2}} - \frac{{\log x}^{2}}{{n}^{2}}\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{e^{-\frac{\log \left(\frac{1}{x}\right)}{n}}}{x \cdot n}\\ \end{array} \]
Alternative 2
Error15.6
Cost13776
\[\begin{array}{l} t_0 := \frac{\log \left(x - -1\right) - \log x}{n}\\ \mathbf{if}\;x \leq 1.1:\\ \;\;\;\;t_0\\ \mathbf{elif}\;x \leq 9.2 \cdot 10^{+94}:\\ \;\;\;\;\frac{\frac{1}{x} - 0.5 \cdot \frac{1}{{x}^{2}}}{n}\\ \mathbf{elif}\;x \leq 6.8 \cdot 10^{+146}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;x \leq 2.35 \cdot 10^{+201}:\\ \;\;\;\;\frac{\frac{1}{x}}{n}\\ \mathbf{else}:\\ \;\;\;\;t_0\\ \end{array} \]
Alternative 3
Error6.9
Cost13572
\[\begin{array}{l} \mathbf{if}\;x \leq 1.1:\\ \;\;\;\;\frac{\log \left(x - -1\right) - \log x}{n}\\ \mathbf{else}:\\ \;\;\;\;\frac{e^{-\frac{\log \left(\frac{1}{x}\right)}{n}}}{x \cdot n}\\ \end{array} \]
Alternative 4
Error15.7
Cost7432
\[\begin{array}{l} \mathbf{if}\;x \leq 1:\\ \;\;\;\;\left(-\frac{\log x}{n}\right) + \frac{x}{n}\\ \mathbf{elif}\;x \leq 7.6 \cdot 10^{+200}:\\ \;\;\;\;\frac{\frac{1}{x} - 0.5 \cdot \frac{1}{{x}^{2}}}{n}\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \frac{x}{n \cdot \left(x \cdot \left(x + x\right)\right)}\\ \end{array} \]
Alternative 5
Error15.9
Cost7044
\[\begin{array}{l} \mathbf{if}\;x \leq 1:\\ \;\;\;\;\left(-\frac{\log x}{n}\right) + \frac{x}{n}\\ \mathbf{elif}\;x \leq 8.2 \cdot 10^{+200}:\\ \;\;\;\;\frac{\frac{1}{n}}{x}\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \frac{x}{n \cdot \left(x \cdot \left(x + x\right)\right)}\\ \end{array} \]
Alternative 6
Error15.9
Cost6852
\[\begin{array}{l} \mathbf{if}\;x \leq 1:\\ \;\;\;\;\frac{x - \log x}{n}\\ \mathbf{elif}\;x \leq 1.3 \cdot 10^{+201}:\\ \;\;\;\;\frac{\frac{1}{n}}{x}\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \frac{x}{n \cdot \left(x \cdot \left(x + x\right)\right)}\\ \end{array} \]
Alternative 7
Error16.1
Cost6788
\[\begin{array}{l} \mathbf{if}\;x \leq 1.15:\\ \;\;\;\;\frac{-\log x}{n}\\ \mathbf{elif}\;x \leq 1.95 \cdot 10^{+201}:\\ \;\;\;\;\frac{\frac{1}{n}}{x}\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \frac{x}{n \cdot \left(x \cdot \left(x + x\right)\right)}\\ \end{array} \]
Alternative 8
Error32.5
Cost1032
\[\begin{array}{l} \mathbf{if}\;n \leq -6.4:\\ \;\;\;\;-\frac{1}{n \cdot \left(\left(-x\right) + -0.5\right)}\\ \mathbf{elif}\;n \leq -1.1 \cdot 10^{-286}:\\ \;\;\;\;2 \cdot \frac{x}{n \cdot \left(x \cdot \left(x + x\right)\right)}\\ \mathbf{else}:\\ \;\;\;\;-\frac{1}{n \cdot \left(x \cdot -1\right) + n \cdot -0.5}\\ \end{array} \]
Alternative 9
Error32.8
Cost964
\[\begin{array}{l} \mathbf{if}\;\frac{1}{n} \leq -2 \cdot 10^{+36}:\\ \;\;\;\;2 \cdot \frac{x}{n \cdot \left(x \cdot \left(x + x\right)\right)}\\ \mathbf{else}:\\ \;\;\;\;-\frac{1}{n \cdot \left(\left(-x\right) + -0.5\right)}\\ \end{array} \]
Alternative 10
Error37.8
Cost576
\[-\frac{1}{n \cdot \left(\left(-x\right) + -0.5\right)} \]
Alternative 11
Error40.4
Cost320
\[\frac{1}{x \cdot n} \]
Alternative 12
Error40.0
Cost320
\[\frac{\frac{1}{n}}{x} \]
Alternative 13
Error61.1
Cost192
\[\frac{x}{n} \]

Error

Reproduce?

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