?

Average Error: 50.51% → 11.36%
Time: 32.1s
Precision: binary64
Cost: 451780

?

\[{\left(x + 1\right)}^{\left(\frac{1}{n}\right)} - {x}^{\left(\frac{1}{n}\right)} \]
\[\begin{array}{l} t_0 := {\log x}^{2}\\ t_1 := \mathsf{log1p}\left(x\right) - \log x\\ t_2 := {\left(\mathsf{log1p}\left(x\right)\right)}^{2}\\ t_3 := \frac{\frac{\mathsf{log1p}\left(x\right)}{-3}}{t_1}\\ t_4 := \log \left(\mathsf{fma}\left(x, x, x\right)\right)\\ t_5 := \frac{\frac{t_4}{-3}}{t_1}\\ t_6 := -3 \cdot t_1\\ t_7 := {t_6}^{2}\\ t_8 := \frac{\log x}{t_6}\\ t_9 := t_0 - t_2\\ \mathbf{if}\;x \leq 820000:\\ \;\;\;\;\frac{1}{\mathsf{fma}\left(-1, \frac{\left(\mathsf{fma}\left(2, \frac{t_0}{t_6}, \mathsf{fma}\left(2, \frac{t_2}{t_6}, \frac{0.5 \cdot {t_4}^{2}}{t_6}\right)\right) + \frac{\frac{13.5 \cdot \left(t_2 - t_0\right)}{t_7} - \mathsf{fma}\left(-1, t_5, -2 \cdot \left(t_3 + t_8\right)\right)}{\frac{t_6}{-4.5 \cdot t_9}}\right) + \frac{13.5 \cdot \left({\left(\mathsf{log1p}\left(x\right)\right)}^{3} - {\log x}^{3}\right)}{t_7}}{n}, \mathsf{fma}\left(-1, t_5, \mathsf{fma}\left(-2, t_3, \mathsf{fma}\left(-3, \frac{\frac{n}{-3}}{t_1}, -2 \cdot t_8\right)\right)\right)\right) + \frac{13.5 \cdot t_9}{t_7}}\\ \mathbf{else}:\\ \;\;\;\;\frac{e^{\frac{\log x}{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 (pow (log x) 2.0))
        (t_1 (- (log1p x) (log x)))
        (t_2 (pow (log1p x) 2.0))
        (t_3 (/ (/ (log1p x) -3.0) t_1))
        (t_4 (log (fma x x x)))
        (t_5 (/ (/ t_4 -3.0) t_1))
        (t_6 (* -3.0 t_1))
        (t_7 (pow t_6 2.0))
        (t_8 (/ (log x) t_6))
        (t_9 (- t_0 t_2)))
   (if (<= x 820000.0)
     (/
      1.0
      (+
       (fma
        -1.0
        (/
         (+
          (+
           (fma
            2.0
            (/ t_0 t_6)
            (fma 2.0 (/ t_2 t_6) (/ (* 0.5 (pow t_4 2.0)) t_6)))
           (/
            (-
             (/ (* 13.5 (- t_2 t_0)) t_7)
             (fma -1.0 t_5 (* -2.0 (+ t_3 t_8))))
            (/ t_6 (* -4.5 t_9))))
          (/ (* 13.5 (- (pow (log1p x) 3.0) (pow (log x) 3.0))) t_7))
         n)
        (fma
         -1.0
         t_5
         (fma -2.0 t_3 (fma -3.0 (/ (/ n -3.0) t_1) (* -2.0 t_8)))))
       (/ (* 13.5 t_9) t_7)))
     (/ (exp (/ (log 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 = pow(log(x), 2.0);
	double t_1 = log1p(x) - log(x);
	double t_2 = pow(log1p(x), 2.0);
	double t_3 = (log1p(x) / -3.0) / t_1;
	double t_4 = log(fma(x, x, x));
	double t_5 = (t_4 / -3.0) / t_1;
	double t_6 = -3.0 * t_1;
	double t_7 = pow(t_6, 2.0);
	double t_8 = log(x) / t_6;
	double t_9 = t_0 - t_2;
	double tmp;
	if (x <= 820000.0) {
		tmp = 1.0 / (fma(-1.0, (((fma(2.0, (t_0 / t_6), fma(2.0, (t_2 / t_6), ((0.5 * pow(t_4, 2.0)) / t_6))) + ((((13.5 * (t_2 - t_0)) / t_7) - fma(-1.0, t_5, (-2.0 * (t_3 + t_8)))) / (t_6 / (-4.5 * t_9)))) + ((13.5 * (pow(log1p(x), 3.0) - pow(log(x), 3.0))) / t_7)) / n), fma(-1.0, t_5, fma(-2.0, t_3, fma(-3.0, ((n / -3.0) / t_1), (-2.0 * t_8))))) + ((13.5 * t_9) / t_7));
	} else {
		tmp = exp((log(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(x) ^ 2.0
	t_1 = Float64(log1p(x) - log(x))
	t_2 = log1p(x) ^ 2.0
	t_3 = Float64(Float64(log1p(x) / -3.0) / t_1)
	t_4 = log(fma(x, x, x))
	t_5 = Float64(Float64(t_4 / -3.0) / t_1)
	t_6 = Float64(-3.0 * t_1)
	t_7 = t_6 ^ 2.0
	t_8 = Float64(log(x) / t_6)
	t_9 = Float64(t_0 - t_2)
	tmp = 0.0
	if (x <= 820000.0)
		tmp = Float64(1.0 / Float64(fma(-1.0, Float64(Float64(Float64(fma(2.0, Float64(t_0 / t_6), fma(2.0, Float64(t_2 / t_6), Float64(Float64(0.5 * (t_4 ^ 2.0)) / t_6))) + Float64(Float64(Float64(Float64(13.5 * Float64(t_2 - t_0)) / t_7) - fma(-1.0, t_5, Float64(-2.0 * Float64(t_3 + t_8)))) / Float64(t_6 / Float64(-4.5 * t_9)))) + Float64(Float64(13.5 * Float64((log1p(x) ^ 3.0) - (log(x) ^ 3.0))) / t_7)) / n), fma(-1.0, t_5, fma(-2.0, t_3, fma(-3.0, Float64(Float64(n / -3.0) / t_1), Float64(-2.0 * t_8))))) + Float64(Float64(13.5 * t_9) / t_7)));
	else
		tmp = Float64(exp(Float64(log(x) / n)) / Float64(x * n));
	end
	return 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[Power[N[Log[x], $MachinePrecision], 2.0], $MachinePrecision]}, Block[{t$95$1 = N[(N[Log[1 + x], $MachinePrecision] - N[Log[x], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[Power[N[Log[1 + x], $MachinePrecision], 2.0], $MachinePrecision]}, Block[{t$95$3 = N[(N[(N[Log[1 + x], $MachinePrecision] / -3.0), $MachinePrecision] / t$95$1), $MachinePrecision]}, Block[{t$95$4 = N[Log[N[(x * x + x), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$5 = N[(N[(t$95$4 / -3.0), $MachinePrecision] / t$95$1), $MachinePrecision]}, Block[{t$95$6 = N[(-3.0 * t$95$1), $MachinePrecision]}, Block[{t$95$7 = N[Power[t$95$6, 2.0], $MachinePrecision]}, Block[{t$95$8 = N[(N[Log[x], $MachinePrecision] / t$95$6), $MachinePrecision]}, Block[{t$95$9 = N[(t$95$0 - t$95$2), $MachinePrecision]}, If[LessEqual[x, 820000.0], N[(1.0 / N[(N[(-1.0 * N[(N[(N[(N[(2.0 * N[(t$95$0 / t$95$6), $MachinePrecision] + N[(2.0 * N[(t$95$2 / t$95$6), $MachinePrecision] + N[(N[(0.5 * N[Power[t$95$4, 2.0], $MachinePrecision]), $MachinePrecision] / t$95$6), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(N[(N[(13.5 * N[(t$95$2 - t$95$0), $MachinePrecision]), $MachinePrecision] / t$95$7), $MachinePrecision] - N[(-1.0 * t$95$5 + N[(-2.0 * N[(t$95$3 + t$95$8), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(t$95$6 / N[(-4.5 * t$95$9), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(13.5 * N[(N[Power[N[Log[1 + x], $MachinePrecision], 3.0], $MachinePrecision] - N[Power[N[Log[x], $MachinePrecision], 3.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / t$95$7), $MachinePrecision]), $MachinePrecision] / n), $MachinePrecision] + N[(-1.0 * t$95$5 + N[(-2.0 * t$95$3 + N[(-3.0 * N[(N[(n / -3.0), $MachinePrecision] / t$95$1), $MachinePrecision] + N[(-2.0 * t$95$8), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(13.5 * t$95$9), $MachinePrecision] / t$95$7), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[Exp[N[(N[Log[x], $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 x}^{2}\\
t_1 := \mathsf{log1p}\left(x\right) - \log x\\
t_2 := {\left(\mathsf{log1p}\left(x\right)\right)}^{2}\\
t_3 := \frac{\frac{\mathsf{log1p}\left(x\right)}{-3}}{t_1}\\
t_4 := \log \left(\mathsf{fma}\left(x, x, x\right)\right)\\
t_5 := \frac{\frac{t_4}{-3}}{t_1}\\
t_6 := -3 \cdot t_1\\
t_7 := {t_6}^{2}\\
t_8 := \frac{\log x}{t_6}\\
t_9 := t_0 - t_2\\
\mathbf{if}\;x \leq 820000:\\
\;\;\;\;\frac{1}{\mathsf{fma}\left(-1, \frac{\left(\mathsf{fma}\left(2, \frac{t_0}{t_6}, \mathsf{fma}\left(2, \frac{t_2}{t_6}, \frac{0.5 \cdot {t_4}^{2}}{t_6}\right)\right) + \frac{\frac{13.5 \cdot \left(t_2 - t_0\right)}{t_7} - \mathsf{fma}\left(-1, t_5, -2 \cdot \left(t_3 + t_8\right)\right)}{\frac{t_6}{-4.5 \cdot t_9}}\right) + \frac{13.5 \cdot \left({\left(\mathsf{log1p}\left(x\right)\right)}^{3} - {\log x}^{3}\right)}{t_7}}{n}, \mathsf{fma}\left(-1, t_5, \mathsf{fma}\left(-2, t_3, \mathsf{fma}\left(-3, \frac{\frac{n}{-3}}{t_1}, -2 \cdot t_8\right)\right)\right)\right) + \frac{13.5 \cdot t_9}{t_7}}\\

\mathbf{else}:\\
\;\;\;\;\frac{e^{\frac{\log x}{n}}}{x \cdot n}\\


\end{array}

Error?

Derivation?

  1. Split input into 2 regimes
  2. if x < 8.2e5

    1. Initial program 72

      \[{\left(x + 1\right)}^{\left(\frac{1}{n}\right)} - {x}^{\left(\frac{1}{n}\right)} \]
    2. Applied egg-rr72.8

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

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

      [Start]72.8

      \[ \left({\left(x + 1\right)}^{\left(\frac{3}{n}\right)} - {x}^{\left(\frac{3}{n}\right)}\right) \cdot \frac{1}{{\left(x + x \cdot x\right)}^{\left({n}^{-1}\right)} + \left({\left(x + 1\right)}^{\left(\frac{2}{n}\right)} + {x}^{\left(\frac{2}{n}\right)}\right)} \]

      associate-*r/ [=>]72.8

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

      /-rgt-identity [<=]72.8

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

      /-rgt-identity [=>]72.8

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

      +-commutative [=>]72.8

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

      distribute-rgt1-in [=>]72.8

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

      +-commutative [=>]72.8

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

      unpow-1 [=>]72.8

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

      +-commutative [=>]72.8

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

      +-commutative [=>]72.8

      \[ \frac{\left({\left(1 + x\right)}^{\left(\frac{3}{n}\right)} - {x}^{\left(\frac{3}{n}\right)}\right) \cdot 1}{{\left(\left(1 + x\right) \cdot x\right)}^{\left(\frac{1}{n}\right)} + \left({x}^{\left(\frac{2}{n}\right)} + {\color{blue}{\left(1 + x\right)}}^{\left(\frac{2}{n}\right)}\right)} \]
    4. Applied egg-rr72.8

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

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

      [Start]72.8

      \[ {\left(\frac{{\left(x + x \cdot x\right)}^{\left(\frac{1}{n}\right)} + \left({x}^{\left(\frac{2}{n}\right)} + {\left(1 + x\right)}^{\left(\frac{2}{n}\right)}\right)}{{\left(1 + x\right)}^{\left(\frac{3}{n}\right)} - {x}^{\left(\frac{3}{n}\right)}}\right)}^{-1} \]

      unpow-1 [=>]72.8

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

      +-commutative [=>]72.8

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

      +-commutative [=>]72.8

      \[ \frac{1}{\frac{{\left(x + x \cdot x\right)}^{\left(\frac{1}{n}\right)} + \left({x}^{\left(\frac{2}{n}\right)} + {\left(x + 1\right)}^{\left(\frac{2}{n}\right)}\right)}{{\color{blue}{\left(x + 1\right)}}^{\left(\frac{3}{n}\right)} - {x}^{\left(\frac{3}{n}\right)}}} \]
    6. Taylor expanded in n around -inf 22.16

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

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

      [Start]22.16

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

    if 8.2e5 < x

    1. Initial program 31.6

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

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

      \[\leadsto \color{blue}{\frac{e^{\frac{\log x}{n}}}{x \cdot n}} \]
      Proof

      [Start]1.9

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

      mul-1-neg [=>]1.9

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

      log-rec [=>]1.9

      \[ \frac{e^{-\frac{\color{blue}{-\log x}}{n}}}{n \cdot x} \]

      mul-1-neg [<=]1.9

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

      distribute-neg-frac [=>]1.9

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

      mul-1-neg [=>]1.9

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

      remove-double-neg [=>]1.9

      \[ \frac{e^{\frac{\color{blue}{\log x}}{n}}}{n \cdot x} \]

      *-commutative [=>]1.9

      \[ \frac{e^{\frac{\log x}{n}}}{\color{blue}{x \cdot n}} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification11.36

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq 820000:\\ \;\;\;\;\frac{1}{\mathsf{fma}\left(-1, \frac{\left(\mathsf{fma}\left(2, \frac{{\log x}^{2}}{-3 \cdot \left(\mathsf{log1p}\left(x\right) - \log x\right)}, \mathsf{fma}\left(2, \frac{{\left(\mathsf{log1p}\left(x\right)\right)}^{2}}{-3 \cdot \left(\mathsf{log1p}\left(x\right) - \log x\right)}, \frac{0.5 \cdot {\log \left(\mathsf{fma}\left(x, x, x\right)\right)}^{2}}{-3 \cdot \left(\mathsf{log1p}\left(x\right) - \log x\right)}\right)\right) + \frac{\frac{13.5 \cdot \left({\left(\mathsf{log1p}\left(x\right)\right)}^{2} - {\log x}^{2}\right)}{{\left(-3 \cdot \left(\mathsf{log1p}\left(x\right) - \log x\right)\right)}^{2}} - \mathsf{fma}\left(-1, \frac{\frac{\log \left(\mathsf{fma}\left(x, x, x\right)\right)}{-3}}{\mathsf{log1p}\left(x\right) - \log x}, -2 \cdot \left(\frac{\frac{\mathsf{log1p}\left(x\right)}{-3}}{\mathsf{log1p}\left(x\right) - \log x} + \frac{\log x}{-3 \cdot \left(\mathsf{log1p}\left(x\right) - \log x\right)}\right)\right)}{\frac{-3 \cdot \left(\mathsf{log1p}\left(x\right) - \log x\right)}{-4.5 \cdot \left({\log x}^{2} - {\left(\mathsf{log1p}\left(x\right)\right)}^{2}\right)}}\right) + \frac{13.5 \cdot \left({\left(\mathsf{log1p}\left(x\right)\right)}^{3} - {\log x}^{3}\right)}{{\left(-3 \cdot \left(\mathsf{log1p}\left(x\right) - \log x\right)\right)}^{2}}}{n}, \mathsf{fma}\left(-1, \frac{\frac{\log \left(\mathsf{fma}\left(x, x, x\right)\right)}{-3}}{\mathsf{log1p}\left(x\right) - \log x}, \mathsf{fma}\left(-2, \frac{\frac{\mathsf{log1p}\left(x\right)}{-3}}{\mathsf{log1p}\left(x\right) - \log x}, \mathsf{fma}\left(-3, \frac{\frac{n}{-3}}{\mathsf{log1p}\left(x\right) - \log x}, -2 \cdot \frac{\log x}{-3 \cdot \left(\mathsf{log1p}\left(x\right) - \log x\right)}\right)\right)\right)\right) + \frac{13.5 \cdot \left({\log x}^{2} - {\left(\mathsf{log1p}\left(x\right)\right)}^{2}\right)}{{\left(-3 \cdot \left(\mathsf{log1p}\left(x\right) - \log x\right)\right)}^{2}}}\\ \mathbf{else}:\\ \;\;\;\;\frac{e^{\frac{\log x}{n}}}{x \cdot n}\\ \end{array} \]

Alternatives

Alternative 1
Error11.34%
Cost413188
\[\begin{array}{l} t_0 := {\log x}^{2}\\ t_1 := \log \left(x + {x}^{2}\right)\\ t_2 := \log \left(x + 1\right)\\ t_3 := {t_2}^{2}\\ t_4 := -3 \cdot t_2 + \log x \cdot 3\\ t_5 := \frac{t_1}{t_4}\\ t_6 := \frac{\log x}{t_4}\\ t_7 := {t_4}^{2}\\ t_8 := 4.5 \cdot t_3 + t_0 \cdot -4.5\\ t_9 := \frac{t_2}{t_4}\\ \mathbf{if}\;x \leq 21000:\\ \;\;\;\;\frac{1}{\left(\frac{\left(-2 \cdot \frac{t_0}{t_4} + \left(-2 \cdot \frac{t_3}{t_4} + \frac{{t_1}^{2}}{t_4} \cdot -0.5\right)\right) - \left(\frac{t_8 \cdot \left(-3 \cdot \frac{t_0 \cdot 4.5 + t_3 \cdot -4.5}{t_7} + \left(t_5 + \left(2 \cdot t_9 + 2 \cdot t_6\right)\right)\right)}{t_4} + -3 \cdot \frac{-4.5 \cdot {t_2}^{3} + 4.5 \cdot {\log x}^{3}}{t_7}\right)}{n} + \left(\left(-2 \cdot t_9 + \left(-2 \cdot t_6 + -3 \cdot \frac{n}{t_4}\right)\right) - t_5\right)\right) + -3 \cdot \frac{t_8}{t_7}}\\ \mathbf{else}:\\ \;\;\;\;\frac{e^{\frac{\log x}{n}}}{x \cdot n}\\ \end{array} \]
Alternative 2
Error11.64%
Cost91972
\[\begin{array}{l} \mathbf{if}\;x \leq 9500:\\ \;\;\;\;\left(\mathsf{fma}\left(0.5, \frac{{\left(\mathsf{log1p}\left(x\right)\right)}^{2}}{n \cdot n}, 0.16666666666666666 \cdot \frac{{\left(\mathsf{log1p}\left(x\right)\right)}^{3}}{{n}^{3}}\right) + \frac{\mathsf{log1p}\left(x\right) - \log x}{n}\right) - \mathsf{fma}\left(0.5, \frac{{\log x}^{2}}{n \cdot n}, \frac{0.16666666666666666}{\frac{{n}^{3}}{{\log x}^{3}}}\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{e^{\frac{\log x}{n}}}{x \cdot n}\\ \end{array} \]
Alternative 3
Error11.63%
Cost85380
\[\begin{array}{l} \mathbf{if}\;x \leq 9000:\\ \;\;\;\;\mathsf{fma}\left(0.5, \frac{{\left(\mathsf{log1p}\left(x\right)\right)}^{2}}{n \cdot n}, \left(\frac{\left({\left(\mathsf{log1p}\left(x\right)\right)}^{3} - {\log x}^{3}\right) \cdot 0.16666666666666666}{{n}^{3}} - \frac{\mathsf{fma}\left(-1, \mathsf{log1p}\left(x\right), \log x\right)}{n}\right) + \frac{{\log x}^{2}}{n \cdot n} \cdot -0.5\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{e^{\frac{\log x}{n}}}{x \cdot n}\\ \end{array} \]
Alternative 4
Error12.24%
Cost26756
\[\begin{array}{l} t_0 := \frac{\log x}{n}\\ \mathbf{if}\;x \leq 0.55:\\ \;\;\;\;{t_0}^{2} \cdot \left(-0.5 + t_0 \cdot -0.16666666666666666\right) - t_0\\ \mathbf{else}:\\ \;\;\;\;\frac{e^{t_0}}{x \cdot n}\\ \end{array} \]
Alternative 5
Error19.25%
Cost13649
\[\begin{array}{l} \mathbf{if}\;n \leq -3.05 \cdot 10^{+155}:\\ \;\;\;\;\frac{\log \left(\frac{x + 1}{x}\right)}{n}\\ \mathbf{elif}\;n \leq -1.8 \cdot 10^{+107}:\\ \;\;\;\;\frac{1}{n \cdot \left(x + 0.5\right)}\\ \mathbf{elif}\;n \leq -5 \cdot 10^{-307} \lor \neg \left(n \leq 60000000000\right):\\ \;\;\;\;\frac{\mathsf{log1p}\left(x\right) - \log x}{n}\\ \mathbf{else}:\\ \;\;\;\;\left(1 + \frac{x}{n}\right) - {x}^{\left(\frac{1}{n}\right)}\\ \end{array} \]
Alternative 6
Error19.3%
Cost13649
\[\begin{array}{l} t_0 := \mathsf{log1p}\left(x\right) - \log x\\ \mathbf{if}\;n \leq -2.9 \cdot 10^{+155}:\\ \;\;\;\;\frac{1}{\frac{n}{t_0}}\\ \mathbf{elif}\;n \leq -2 \cdot 10^{+106}:\\ \;\;\;\;\frac{1}{n \cdot \left(x + 0.5\right)}\\ \mathbf{elif}\;n \leq -5 \cdot 10^{-307} \lor \neg \left(n \leq 55000000000\right):\\ \;\;\;\;\frac{t_0}{n}\\ \mathbf{else}:\\ \;\;\;\;\left(1 + \frac{x}{n}\right) - {x}^{\left(\frac{1}{n}\right)}\\ \end{array} \]
Alternative 7
Error11.78%
Cost13380
\[\begin{array}{l} \mathbf{if}\;x \leq 5500:\\ \;\;\;\;\frac{\mathsf{log1p}\left(x\right) - \log x}{n}\\ \mathbf{else}:\\ \;\;\;\;\frac{e^{\frac{\log x}{n}}}{x \cdot n}\\ \end{array} \]
Alternative 8
Error39.8%
Cost9124
\[\begin{array}{l} t_0 := \frac{1}{x \cdot n}\\ t_1 := -\frac{\log x}{n}\\ t_2 := \frac{1}{n \cdot \left(x + 0.5\right)}\\ \mathbf{if}\;\frac{1}{n} \leq -1 \cdot 10^{+158}:\\ \;\;\;\;-1 + \left(1 + x \cdot n\right)\\ \mathbf{elif}\;\frac{1}{n} \leq -2 \cdot 10^{-9}:\\ \;\;\;\;-1 + \left(1 + t_0\right)\\ \mathbf{elif}\;\frac{1}{n} \leq -2 \cdot 10^{-54}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;\frac{1}{n} \leq -1 \cdot 10^{-183}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;\frac{1}{n} \leq -4 \cdot 10^{-211}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;\frac{1}{n} \leq -2 \cdot 10^{-233}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;\frac{1}{n} \leq 5 \cdot 10^{-281}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;\frac{1}{n} \leq 2 \cdot 10^{-160}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;\frac{1}{n} \leq 2 \cdot 10^{-11}:\\ \;\;\;\;\frac{x - \log x}{n}\\ \mathbf{else}:\\ \;\;\;\;1 - {x}^{\left(\frac{1}{n}\right)}\\ \end{array} \]
Alternative 9
Error39.81%
Cost9124
\[\begin{array}{l} t_0 := \frac{1}{x \cdot n}\\ t_1 := -\frac{\log x}{n}\\ t_2 := \frac{1}{n \cdot \left(x + 0.5\right)}\\ \mathbf{if}\;\frac{1}{n} \leq -1 \cdot 10^{+158}:\\ \;\;\;\;-1 + \left(1 + x \cdot n\right)\\ \mathbf{elif}\;\frac{1}{n} \leq -2 \cdot 10^{-9}:\\ \;\;\;\;-1 + \left(1 + t_0\right)\\ \mathbf{elif}\;\frac{1}{n} \leq -2 \cdot 10^{-54}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;\frac{1}{n} \leq -1 \cdot 10^{-183}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;\frac{1}{n} \leq -4 \cdot 10^{-211}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;\frac{1}{n} \leq -2 \cdot 10^{-233}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;\frac{1}{n} \leq 5 \cdot 10^{-281}:\\ \;\;\;\;\frac{1}{\frac{-n}{\log x}}\\ \mathbf{elif}\;\frac{1}{n} \leq 2 \cdot 10^{-160}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;\frac{1}{n} \leq 2 \cdot 10^{-11}:\\ \;\;\;\;\frac{x - \log x}{n}\\ \mathbf{else}:\\ \;\;\;\;1 - {x}^{\left(\frac{1}{n}\right)}\\ \end{array} \]
Alternative 10
Error40.08%
Cost9060
\[\begin{array}{l} t_0 := \frac{1}{x \cdot n}\\ t_1 := -\frac{\log x}{n}\\ t_2 := \frac{1}{n \cdot \left(x + 0.5\right)}\\ \mathbf{if}\;\frac{1}{n} \leq -1 \cdot 10^{+158}:\\ \;\;\;\;-1 + \left(1 + x \cdot n\right)\\ \mathbf{elif}\;\frac{1}{n} \leq -2 \cdot 10^{-9}:\\ \;\;\;\;-1 + \left(1 + t_0\right)\\ \mathbf{elif}\;\frac{1}{n} \leq -2 \cdot 10^{-54}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;\frac{1}{n} \leq -1 \cdot 10^{-183}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;\frac{1}{n} \leq -4 \cdot 10^{-211}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;\frac{1}{n} \leq -2 \cdot 10^{-233}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;\frac{1}{n} \leq 5 \cdot 10^{-281}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;\frac{1}{n} \leq 2 \cdot 10^{-160}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;\frac{1}{n} \leq 10^{-6}:\\ \;\;\;\;\frac{x - \log x}{n}\\ \mathbf{else}:\\ \;\;\;\;1\\ \end{array} \]
Alternative 11
Error40.22%
Cost8996
\[\begin{array}{l} t_0 := \frac{1}{x \cdot n}\\ t_1 := -\frac{\log x}{n}\\ t_2 := \frac{1}{n \cdot \left(x + 0.5\right)}\\ \mathbf{if}\;\frac{1}{n} \leq -1 \cdot 10^{+158}:\\ \;\;\;\;-1 + \left(1 + x \cdot n\right)\\ \mathbf{elif}\;\frac{1}{n} \leq -2 \cdot 10^{-9}:\\ \;\;\;\;-1 + \left(1 + t_0\right)\\ \mathbf{elif}\;\frac{1}{n} \leq -2 \cdot 10^{-54}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;\frac{1}{n} \leq -1 \cdot 10^{-183}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;\frac{1}{n} \leq -4 \cdot 10^{-211}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;\frac{1}{n} \leq -2 \cdot 10^{-233}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;\frac{1}{n} \leq 5 \cdot 10^{-281}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;\frac{1}{n} \leq 2 \cdot 10^{-160}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;\frac{1}{n} \leq 10^{-6}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;1\\ \end{array} \]
Alternative 12
Error19.19%
Cost7569
\[\begin{array}{l} t_0 := \frac{\log \left(\frac{x + 1}{x}\right)}{n}\\ \mathbf{if}\;n \leq -3 \cdot 10^{+155}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;n \leq -7.5 \cdot 10^{+111}:\\ \;\;\;\;\frac{1}{n \cdot \left(x + 0.5\right)}\\ \mathbf{elif}\;n \leq -5 \cdot 10^{-307} \lor \neg \left(n \leq 55000000000\right):\\ \;\;\;\;t_0\\ \mathbf{else}:\\ \;\;\;\;\left(1 + \frac{x}{n}\right) - {x}^{\left(\frac{1}{n}\right)}\\ \end{array} \]
Alternative 13
Error19.41%
Cost7377
\[\begin{array}{l} t_0 := \frac{\log \left(\frac{x + 1}{x}\right)}{n}\\ \mathbf{if}\;n \leq -3.5 \cdot 10^{+155}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;n \leq -3.6 \cdot 10^{+113}:\\ \;\;\;\;\frac{1}{n \cdot \left(x + 0.5\right)}\\ \mathbf{elif}\;n \leq -5 \cdot 10^{-307} \lor \neg \left(n \leq 5200000000\right):\\ \;\;\;\;t_0\\ \mathbf{else}:\\ \;\;\;\;1 - {x}^{\left(\frac{1}{n}\right)}\\ \end{array} \]
Alternative 14
Error25.58%
Cost7048
\[\begin{array}{l} \mathbf{if}\;x \leq 0.96:\\ \;\;\;\;\frac{x - \log x}{n}\\ \mathbf{elif}\;x \leq 8.5 \cdot 10^{+85}:\\ \;\;\;\;\frac{\frac{1}{x} + \frac{\frac{-0.5}{x}}{x}}{n}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{-0.25}{{x}^{4}}}{n}\\ \end{array} \]
Alternative 15
Error38.64%
Cost976
\[\begin{array}{l} t_0 := \frac{1}{n \cdot \left(x + 0.5\right)}\\ \mathbf{if}\;n \leq -16.5:\\ \;\;\;\;t_0\\ \mathbf{elif}\;n \leq -1.4 \cdot 10^{-157}:\\ \;\;\;\;-1 + \left(1 + \frac{1}{x \cdot n}\right)\\ \mathbf{elif}\;n \leq -5 \cdot 10^{-307}:\\ \;\;\;\;-1 + \left(1 + x \cdot n\right)\\ \mathbf{elif}\;n \leq 55:\\ \;\;\;\;1\\ \mathbf{else}:\\ \;\;\;\;t_0\\ \end{array} \]
Alternative 16
Error43.2%
Cost968
\[\begin{array}{l} \mathbf{if}\;\frac{1}{n} \leq -4 \cdot 10^{+87}:\\ \;\;\;\;-1 + \left(1 + x \cdot n\right)\\ \mathbf{elif}\;\frac{1}{n} \leq 4 \cdot 10^{-6}:\\ \;\;\;\;\frac{1}{n \cdot \left(x + 0.5\right)}\\ \mathbf{else}:\\ \;\;\;\;1\\ \end{array} \]
Alternative 17
Error46.24%
Cost716
\[\begin{array}{l} t_0 := \frac{\frac{1}{x}}{n}\\ \mathbf{if}\;n \leq -3.7 \cdot 10^{-85}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;n \leq -5 \cdot 10^{-307}:\\ \;\;\;\;-1 + \left(1 + x \cdot n\right)\\ \mathbf{elif}\;n \leq 130:\\ \;\;\;\;1\\ \mathbf{else}:\\ \;\;\;\;t_0\\ \end{array} \]
Alternative 18
Error54.06%
Cost585
\[\begin{array}{l} \mathbf{if}\;n \leq -1.75 \cdot 10^{-157} \lor \neg \left(n \leq 10.5\right):\\ \;\;\;\;\frac{1}{x \cdot n}\\ \mathbf{else}:\\ \;\;\;\;1\\ \end{array} \]
Alternative 19
Error53.42%
Cost585
\[\begin{array}{l} \mathbf{if}\;n \leq -7.5 \cdot 10^{-158} \lor \neg \left(n \leq 225\right):\\ \;\;\;\;\frac{\frac{1}{n}}{x}\\ \mathbf{else}:\\ \;\;\;\;1\\ \end{array} \]
Alternative 20
Error53.43%
Cost585
\[\begin{array}{l} \mathbf{if}\;n \leq -2.65 \cdot 10^{-157} \lor \neg \left(n \leq 55\right):\\ \;\;\;\;\frac{\frac{1}{x}}{n}\\ \mathbf{else}:\\ \;\;\;\;1\\ \end{array} \]
Alternative 21
Error87.44%
Cost64
\[1 \]

Error

Reproduce?

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