
(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:
Herbie found 18 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(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}
(FPCore (x n)
:precision binary64
(let* ((t_0 (pow x (/ 1.0 n))))
(if (<= (/ 1.0 n) -2e-122)
(/ t_0 (* n x))
(if (<= (/ 1.0 n) 5e-9)
(+
(-
(/ (- (log1p x) (log x)) n)
(/
-0.16666666666666666
(/ (pow n 3.0) (- (pow (log1p x) 3.0) (pow (log x) 3.0)))))
(fma
0.5
(* (pow n -2.0) (pow (log1p x) 2.0))
(* (/ (pow (log x) 2.0) (* n n)) -0.5)))
(- (exp (/ (log1p x) n)) t_0)))))
double code(double x, double n) {
double t_0 = pow(x, (1.0 / n));
double tmp;
if ((1.0 / n) <= -2e-122) {
tmp = t_0 / (n * x);
} else if ((1.0 / n) <= 5e-9) {
tmp = (((log1p(x) - log(x)) / n) - (-0.16666666666666666 / (pow(n, 3.0) / (pow(log1p(x), 3.0) - pow(log(x), 3.0))))) + fma(0.5, (pow(n, -2.0) * pow(log1p(x), 2.0)), ((pow(log(x), 2.0) / (n * n)) * -0.5));
} else {
tmp = exp((log1p(x) / n)) - t_0;
}
return tmp;
}
function code(x, n) t_0 = x ^ Float64(1.0 / n) tmp = 0.0 if (Float64(1.0 / n) <= -2e-122) tmp = Float64(t_0 / Float64(n * x)); elseif (Float64(1.0 / n) <= 5e-9) tmp = Float64(Float64(Float64(Float64(log1p(x) - log(x)) / n) - Float64(-0.16666666666666666 / Float64((n ^ 3.0) / Float64((log1p(x) ^ 3.0) - (log(x) ^ 3.0))))) + fma(0.5, Float64((n ^ -2.0) * (log1p(x) ^ 2.0)), Float64(Float64((log(x) ^ 2.0) / Float64(n * n)) * -0.5))); else tmp = Float64(exp(Float64(log1p(x) / n)) - t_0); end return tmp end
code[x_, n_] := Block[{t$95$0 = N[Power[x, N[(1.0 / n), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[N[(1.0 / n), $MachinePrecision], -2e-122], N[(t$95$0 / N[(n * x), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(1.0 / n), $MachinePrecision], 5e-9], N[(N[(N[(N[(N[Log[1 + x], $MachinePrecision] - N[Log[x], $MachinePrecision]), $MachinePrecision] / n), $MachinePrecision] - N[(-0.16666666666666666 / N[(N[Power[n, 3.0], $MachinePrecision] / N[(N[Power[N[Log[1 + x], $MachinePrecision], 3.0], $MachinePrecision] - N[Power[N[Log[x], $MachinePrecision], 3.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(0.5 * N[(N[Power[n, -2.0], $MachinePrecision] * N[Power[N[Log[1 + x], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] + N[(N[(N[Power[N[Log[x], $MachinePrecision], 2.0], $MachinePrecision] / N[(n * n), $MachinePrecision]), $MachinePrecision] * -0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[Exp[N[(N[Log[1 + x], $MachinePrecision] / n), $MachinePrecision]], $MachinePrecision] - t$95$0), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := {x}^{\left(\frac{1}{n}\right)}\\
\mathbf{if}\;\frac{1}{n} \leq -2 \cdot 10^{-122}:\\
\;\;\;\;\frac{t_0}{n \cdot x}\\
\mathbf{elif}\;\frac{1}{n} \leq 5 \cdot 10^{-9}:\\
\;\;\;\;\left(\frac{\mathsf{log1p}\left(x\right) - \log x}{n} - \frac{-0.16666666666666666}{\frac{{n}^{3}}{{\left(\mathsf{log1p}\left(x\right)\right)}^{3} - {\log x}^{3}}}\right) + \mathsf{fma}\left(0.5, {n}^{-2} \cdot {\left(\mathsf{log1p}\left(x\right)\right)}^{2}, \frac{{\log x}^{2}}{n \cdot n} \cdot -0.5\right)\\
\mathbf{else}:\\
\;\;\;\;e^{\frac{\mathsf{log1p}\left(x\right)}{n}} - t_0\\
\end{array}
\end{array}
if (/.f64 1 n) < -2.00000000000000012e-122Initial program 76.2%
Taylor expanded in x around inf 89.4%
log-rec89.4%
mul-1-neg89.4%
associate-*r/89.4%
neg-mul-189.4%
mul-1-neg89.4%
remove-double-neg89.4%
*-commutative89.4%
Simplified89.4%
*-un-lft-identity89.4%
div-inv89.4%
pow-to-exp89.4%
Applied egg-rr89.4%
*-lft-identity89.4%
Simplified89.4%
if -2.00000000000000012e-122 < (/.f64 1 n) < 5.0000000000000001e-9Initial program 33.4%
Taylor expanded in n around -inf 82.6%
Simplified82.5%
if 5.0000000000000001e-9 < (/.f64 1 n) Initial program 52.4%
Taylor expanded in n around 0 52.4%
log1p-def97.3%
Simplified97.3%
Final simplification87.6%
(FPCore (x n)
:precision binary64
(let* ((t_0 (pow x (/ 1.0 n))))
(if (<= (/ 1.0 n) -2e-122)
(/ t_0 (* n x))
(if (<= (/ 1.0 n) 5e-9)
(fma
0.5
(/ (pow (log1p x) 2.0) (* n n))
(- (/ (- (log1p x) (log x)) n) (* 0.5 (/ (pow (log x) 2.0) (* n 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) <= -2e-122) {
tmp = t_0 / (n * x);
} else if ((1.0 / n) <= 5e-9) {
tmp = fma(0.5, (pow(log1p(x), 2.0) / (n * n)), (((log1p(x) - log(x)) / n) - (0.5 * (pow(log(x), 2.0) / (n * n)))));
} else {
tmp = exp((log1p(x) / n)) - t_0;
}
return tmp;
}
function code(x, n) t_0 = x ^ Float64(1.0 / n) tmp = 0.0 if (Float64(1.0 / n) <= -2e-122) tmp = Float64(t_0 / Float64(n * x)); elseif (Float64(1.0 / n) <= 5e-9) tmp = fma(0.5, Float64((log1p(x) ^ 2.0) / Float64(n * n)), Float64(Float64(Float64(log1p(x) - log(x)) / n) - Float64(0.5 * Float64((log(x) ^ 2.0) / Float64(n * 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], -2e-122], N[(t$95$0 / N[(n * x), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(1.0 / n), $MachinePrecision], 5e-9], N[(0.5 * N[(N[Power[N[Log[1 + x], $MachinePrecision], 2.0], $MachinePrecision] / N[(n * n), $MachinePrecision]), $MachinePrecision] + N[(N[(N[(N[Log[1 + x], $MachinePrecision] - N[Log[x], $MachinePrecision]), $MachinePrecision] / n), $MachinePrecision] - N[(0.5 * N[(N[Power[N[Log[x], $MachinePrecision], 2.0], $MachinePrecision] / N[(n * n), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[Exp[N[(N[Log[1 + x], $MachinePrecision] / n), $MachinePrecision]], $MachinePrecision] - t$95$0), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := {x}^{\left(\frac{1}{n}\right)}\\
\mathbf{if}\;\frac{1}{n} \leq -2 \cdot 10^{-122}:\\
\;\;\;\;\frac{t_0}{n \cdot x}\\
\mathbf{elif}\;\frac{1}{n} \leq 5 \cdot 10^{-9}:\\
\;\;\;\;\mathsf{fma}\left(0.5, \frac{{\left(\mathsf{log1p}\left(x\right)\right)}^{2}}{n \cdot n}, \frac{\mathsf{log1p}\left(x\right) - \log x}{n} - 0.5 \cdot \frac{{\log x}^{2}}{n \cdot n}\right)\\
\mathbf{else}:\\
\;\;\;\;e^{\frac{\mathsf{log1p}\left(x\right)}{n}} - t_0\\
\end{array}
\end{array}
if (/.f64 1 n) < -2.00000000000000012e-122Initial program 76.2%
Taylor expanded in x around inf 89.4%
log-rec89.4%
mul-1-neg89.4%
associate-*r/89.4%
neg-mul-189.4%
mul-1-neg89.4%
remove-double-neg89.4%
*-commutative89.4%
Simplified89.4%
*-un-lft-identity89.4%
div-inv89.4%
pow-to-exp89.4%
Applied egg-rr89.4%
*-lft-identity89.4%
Simplified89.4%
if -2.00000000000000012e-122 < (/.f64 1 n) < 5.0000000000000001e-9Initial program 33.4%
Taylor expanded in n around inf 82.4%
associate--l+79.3%
fma-def79.3%
log1p-def79.3%
unpow279.3%
associate--r+82.4%
+-rgt-identity82.4%
div-sub82.4%
+-rgt-identity82.4%
log1p-def82.4%
unpow282.4%
Simplified82.4%
if 5.0000000000000001e-9 < (/.f64 1 n) Initial program 52.4%
Taylor expanded in n around 0 52.4%
log1p-def97.3%
Simplified97.3%
Final simplification87.6%
(FPCore (x n)
:precision binary64
(let* ((t_0 (pow x (/ 1.0 n))))
(if (<= (/ 1.0 n) -2e-122)
(/ t_0 (* n x))
(if (<= (/ 1.0 n) 1e-15)
(/ (- (log1p x) (log 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) <= -2e-122) {
tmp = t_0 / (n * x);
} else if ((1.0 / n) <= 1e-15) {
tmp = (log1p(x) - log(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) <= -2e-122) {
tmp = t_0 / (n * x);
} else if ((1.0 / n) <= 1e-15) {
tmp = (Math.log1p(x) - Math.log(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) <= -2e-122: tmp = t_0 / (n * x) elif (1.0 / n) <= 1e-15: tmp = (math.log1p(x) - math.log(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) <= -2e-122) tmp = Float64(t_0 / Float64(n * x)); elseif (Float64(1.0 / n) <= 1e-15) tmp = Float64(Float64(log1p(x) - log(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], -2e-122], N[(t$95$0 / N[(n * x), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(1.0 / n), $MachinePrecision], 1e-15], N[(N[(N[Log[1 + x], $MachinePrecision] - N[Log[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 -2 \cdot 10^{-122}:\\
\;\;\;\;\frac{t_0}{n \cdot x}\\
\mathbf{elif}\;\frac{1}{n} \leq 10^{-15}:\\
\;\;\;\;\frac{\mathsf{log1p}\left(x\right) - \log x}{n}\\
\mathbf{else}:\\
\;\;\;\;e^{\frac{\mathsf{log1p}\left(x\right)}{n}} - t_0\\
\end{array}
\end{array}
if (/.f64 1 n) < -2.00000000000000012e-122Initial program 76.2%
Taylor expanded in x around inf 89.4%
log-rec89.4%
mul-1-neg89.4%
associate-*r/89.4%
neg-mul-189.4%
mul-1-neg89.4%
remove-double-neg89.4%
*-commutative89.4%
Simplified89.4%
*-un-lft-identity89.4%
div-inv89.4%
pow-to-exp89.4%
Applied egg-rr89.4%
*-lft-identity89.4%
Simplified89.4%
if -2.00000000000000012e-122 < (/.f64 1 n) < 1.0000000000000001e-15Initial program 33.0%
Taylor expanded in n around inf 82.2%
+-rgt-identity82.2%
+-rgt-identity82.2%
log1p-def82.2%
Simplified82.2%
if 1.0000000000000001e-15 < (/.f64 1 n) Initial program 53.0%
Taylor expanded in n around 0 53.0%
log1p-def96.7%
Simplified96.7%
Final simplification87.5%
(FPCore (x n)
:precision binary64
(let* ((t_0 (pow x (/ 1.0 n))))
(if (<= (/ 1.0 n) -2e-122)
(/ t_0 (* n x))
(if (<= (/ 1.0 n) 1e-15)
(/ (- (log1p x) (log x)) n)
(- (exp (/ x n)) t_0)))))
double code(double x, double n) {
double t_0 = pow(x, (1.0 / n));
double tmp;
if ((1.0 / n) <= -2e-122) {
tmp = t_0 / (n * x);
} else if ((1.0 / n) <= 1e-15) {
tmp = (log1p(x) - log(x)) / n;
} else {
tmp = exp((x / n)) - t_0;
}
return tmp;
}
public static double code(double x, double n) {
double t_0 = Math.pow(x, (1.0 / n));
double tmp;
if ((1.0 / n) <= -2e-122) {
tmp = t_0 / (n * x);
} else if ((1.0 / n) <= 1e-15) {
tmp = (Math.log1p(x) - Math.log(x)) / n;
} else {
tmp = Math.exp((x / n)) - t_0;
}
return tmp;
}
def code(x, n): t_0 = math.pow(x, (1.0 / n)) tmp = 0 if (1.0 / n) <= -2e-122: tmp = t_0 / (n * x) elif (1.0 / n) <= 1e-15: tmp = (math.log1p(x) - math.log(x)) / n else: tmp = math.exp((x / n)) - t_0 return tmp
function code(x, n) t_0 = x ^ Float64(1.0 / n) tmp = 0.0 if (Float64(1.0 / n) <= -2e-122) tmp = Float64(t_0 / Float64(n * x)); elseif (Float64(1.0 / n) <= 1e-15) tmp = Float64(Float64(log1p(x) - log(x)) / n); else tmp = Float64(exp(Float64(x / n)) - t_0); end return tmp end
code[x_, n_] := Block[{t$95$0 = N[Power[x, N[(1.0 / n), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[N[(1.0 / n), $MachinePrecision], -2e-122], N[(t$95$0 / N[(n * x), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(1.0 / n), $MachinePrecision], 1e-15], N[(N[(N[Log[1 + x], $MachinePrecision] - N[Log[x], $MachinePrecision]), $MachinePrecision] / n), $MachinePrecision], N[(N[Exp[N[(x / n), $MachinePrecision]], $MachinePrecision] - t$95$0), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := {x}^{\left(\frac{1}{n}\right)}\\
\mathbf{if}\;\frac{1}{n} \leq -2 \cdot 10^{-122}:\\
\;\;\;\;\frac{t_0}{n \cdot x}\\
\mathbf{elif}\;\frac{1}{n} \leq 10^{-15}:\\
\;\;\;\;\frac{\mathsf{log1p}\left(x\right) - \log x}{n}\\
\mathbf{else}:\\
\;\;\;\;e^{\frac{x}{n}} - t_0\\
\end{array}
\end{array}
if (/.f64 1 n) < -2.00000000000000012e-122Initial program 76.2%
Taylor expanded in x around inf 89.4%
log-rec89.4%
mul-1-neg89.4%
associate-*r/89.4%
neg-mul-189.4%
mul-1-neg89.4%
remove-double-neg89.4%
*-commutative89.4%
Simplified89.4%
*-un-lft-identity89.4%
div-inv89.4%
pow-to-exp89.4%
Applied egg-rr89.4%
*-lft-identity89.4%
Simplified89.4%
if -2.00000000000000012e-122 < (/.f64 1 n) < 1.0000000000000001e-15Initial program 33.0%
Taylor expanded in n around inf 82.2%
+-rgt-identity82.2%
+-rgt-identity82.2%
log1p-def82.2%
Simplified82.2%
if 1.0000000000000001e-15 < (/.f64 1 n) Initial program 53.0%
Taylor expanded in n around 0 53.0%
log1p-def96.7%
Simplified96.7%
Taylor expanded in x around 0 96.6%
Final simplification87.4%
(FPCore (x n)
:precision binary64
(let* ((t_0 (pow x (/ 1.0 n))) (t_1 (* (log x) (/ -1.0 n))))
(if (<= x 2e-218)
(- (/ (log x) n))
(if (<= x 1.4e-154)
(- (+ 1.0 (/ x n)) t_0)
(if (<= x 3.4e-118)
t_1
(if (<= x 6.5e-92)
(log1p (expm1 (/ 1.0 (* n x))))
(if (<= x 1.02e-25) t_1 (/ t_0 (* n x)))))))))
double code(double x, double n) {
double t_0 = pow(x, (1.0 / n));
double t_1 = log(x) * (-1.0 / n);
double tmp;
if (x <= 2e-218) {
tmp = -(log(x) / n);
} else if (x <= 1.4e-154) {
tmp = (1.0 + (x / n)) - t_0;
} else if (x <= 3.4e-118) {
tmp = t_1;
} else if (x <= 6.5e-92) {
tmp = log1p(expm1((1.0 / (n * x))));
} else if (x <= 1.02e-25) {
tmp = t_1;
} else {
tmp = t_0 / (n * x);
}
return tmp;
}
public static double code(double x, double n) {
double t_0 = Math.pow(x, (1.0 / n));
double t_1 = Math.log(x) * (-1.0 / n);
double tmp;
if (x <= 2e-218) {
tmp = -(Math.log(x) / n);
} else if (x <= 1.4e-154) {
tmp = (1.0 + (x / n)) - t_0;
} else if (x <= 3.4e-118) {
tmp = t_1;
} else if (x <= 6.5e-92) {
tmp = Math.log1p(Math.expm1((1.0 / (n * x))));
} else if (x <= 1.02e-25) {
tmp = t_1;
} else {
tmp = t_0 / (n * x);
}
return tmp;
}
def code(x, n): t_0 = math.pow(x, (1.0 / n)) t_1 = math.log(x) * (-1.0 / n) tmp = 0 if x <= 2e-218: tmp = -(math.log(x) / n) elif x <= 1.4e-154: tmp = (1.0 + (x / n)) - t_0 elif x <= 3.4e-118: tmp = t_1 elif x <= 6.5e-92: tmp = math.log1p(math.expm1((1.0 / (n * x)))) elif x <= 1.02e-25: tmp = t_1 else: tmp = t_0 / (n * x) return tmp
function code(x, n) t_0 = x ^ Float64(1.0 / n) t_1 = Float64(log(x) * Float64(-1.0 / n)) tmp = 0.0 if (x <= 2e-218) tmp = Float64(-Float64(log(x) / n)); elseif (x <= 1.4e-154) tmp = Float64(Float64(1.0 + Float64(x / n)) - t_0); elseif (x <= 3.4e-118) tmp = t_1; elseif (x <= 6.5e-92) tmp = log1p(expm1(Float64(1.0 / Float64(n * x)))); elseif (x <= 1.02e-25) tmp = t_1; else tmp = Float64(t_0 / Float64(n * x)); end return tmp end
code[x_, n_] := Block[{t$95$0 = N[Power[x, N[(1.0 / n), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$1 = N[(N[Log[x], $MachinePrecision] * N[(-1.0 / n), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, 2e-218], (-N[(N[Log[x], $MachinePrecision] / n), $MachinePrecision]), If[LessEqual[x, 1.4e-154], N[(N[(1.0 + N[(x / n), $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[x, 3.4e-118], t$95$1, If[LessEqual[x, 6.5e-92], N[Log[1 + N[(Exp[N[(1.0 / N[(n * x), $MachinePrecision]), $MachinePrecision]] - 1), $MachinePrecision]], $MachinePrecision], If[LessEqual[x, 1.02e-25], t$95$1, N[(t$95$0 / N[(n * x), $MachinePrecision]), $MachinePrecision]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := {x}^{\left(\frac{1}{n}\right)}\\
t_1 := \log x \cdot \frac{-1}{n}\\
\mathbf{if}\;x \leq 2 \cdot 10^{-218}:\\
\;\;\;\;-\frac{\log x}{n}\\
\mathbf{elif}\;x \leq 1.4 \cdot 10^{-154}:\\
\;\;\;\;\left(1 + \frac{x}{n}\right) - t_0\\
\mathbf{elif}\;x \leq 3.4 \cdot 10^{-118}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;x \leq 6.5 \cdot 10^{-92}:\\
\;\;\;\;\mathsf{log1p}\left(\mathsf{expm1}\left(\frac{1}{n \cdot x}\right)\right)\\
\mathbf{elif}\;x \leq 1.02 \cdot 10^{-25}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;\frac{t_0}{n \cdot x}\\
\end{array}
\end{array}
if x < 2.0000000000000001e-218Initial program 45.0%
Taylor expanded in x around 0 45.0%
Taylor expanded in n around inf 57.0%
associate-*r/57.0%
neg-mul-157.0%
Simplified57.0%
if 2.0000000000000001e-218 < x < 1.40000000000000006e-154Initial program 63.2%
Taylor expanded in x around 0 63.2%
if 1.40000000000000006e-154 < x < 3.39999999999999991e-118 or 6.50000000000000035e-92 < x < 1.01999999999999998e-25Initial program 30.8%
Taylor expanded in x around 0 30.8%
Taylor expanded in n around inf 58.9%
associate-*r/58.9%
neg-mul-158.9%
Simplified58.9%
add-cube-cbrt58.0%
pow358.0%
Applied egg-rr58.0%
rem-cube-cbrt58.9%
frac-2neg58.9%
div-inv59.0%
remove-double-neg59.0%
metadata-eval59.0%
distribute-neg-frac59.0%
metadata-eval59.0%
frac-2neg59.0%
distribute-neg-frac59.0%
metadata-eval59.0%
Applied egg-rr59.0%
if 3.39999999999999991e-118 < x < 6.50000000000000035e-92Initial program 38.3%
Taylor expanded in x around inf 30.7%
log-rec30.7%
mul-1-neg30.7%
associate-*r/30.7%
neg-mul-130.7%
mul-1-neg30.7%
remove-double-neg30.7%
*-commutative30.7%
Simplified30.7%
Taylor expanded in n around inf 26.7%
*-commutative26.7%
Simplified26.7%
log1p-expm1-u65.5%
Applied egg-rr65.5%
if 1.01999999999999998e-25 < x Initial program 68.9%
Taylor expanded in x around inf 96.8%
log-rec96.8%
mul-1-neg96.8%
associate-*r/96.8%
neg-mul-196.8%
mul-1-neg96.8%
remove-double-neg96.8%
*-commutative96.8%
Simplified96.8%
*-un-lft-identity96.8%
div-inv96.8%
pow-to-exp96.8%
Applied egg-rr96.8%
*-lft-identity96.8%
Simplified96.8%
Final simplification77.3%
(FPCore (x n)
:precision binary64
(let* ((t_0 (pow x (/ 1.0 n))))
(if (<= (/ 1.0 n) -2e-122)
(/ t_0 (* n x))
(if (<= (/ 1.0 n) 1e-15)
(/ (- (log1p x) (log x)) n)
(-
(+ (* (- (/ 0.5 (* n n)) (/ 0.5 n)) (* x x)) (+ 1.0 (/ x n)))
t_0)))))
double code(double x, double n) {
double t_0 = pow(x, (1.0 / n));
double tmp;
if ((1.0 / n) <= -2e-122) {
tmp = t_0 / (n * x);
} else if ((1.0 / n) <= 1e-15) {
tmp = (log1p(x) - log(x)) / n;
} else {
tmp = ((((0.5 / (n * n)) - (0.5 / n)) * (x * x)) + (1.0 + (x / n))) - t_0;
}
return tmp;
}
public static double code(double x, double n) {
double t_0 = Math.pow(x, (1.0 / n));
double tmp;
if ((1.0 / n) <= -2e-122) {
tmp = t_0 / (n * x);
} else if ((1.0 / n) <= 1e-15) {
tmp = (Math.log1p(x) - Math.log(x)) / n;
} else {
tmp = ((((0.5 / (n * n)) - (0.5 / n)) * (x * x)) + (1.0 + (x / n))) - t_0;
}
return tmp;
}
def code(x, n): t_0 = math.pow(x, (1.0 / n)) tmp = 0 if (1.0 / n) <= -2e-122: tmp = t_0 / (n * x) elif (1.0 / n) <= 1e-15: tmp = (math.log1p(x) - math.log(x)) / n else: tmp = ((((0.5 / (n * n)) - (0.5 / n)) * (x * x)) + (1.0 + (x / n))) - t_0 return tmp
function code(x, n) t_0 = x ^ Float64(1.0 / n) tmp = 0.0 if (Float64(1.0 / n) <= -2e-122) tmp = Float64(t_0 / Float64(n * x)); elseif (Float64(1.0 / n) <= 1e-15) tmp = Float64(Float64(log1p(x) - log(x)) / n); else tmp = Float64(Float64(Float64(Float64(Float64(0.5 / Float64(n * n)) - Float64(0.5 / n)) * Float64(x * x)) + Float64(1.0 + Float64(x / n))) - t_0); end return tmp end
code[x_, n_] := Block[{t$95$0 = N[Power[x, N[(1.0 / n), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[N[(1.0 / n), $MachinePrecision], -2e-122], N[(t$95$0 / N[(n * x), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(1.0 / n), $MachinePrecision], 1e-15], N[(N[(N[Log[1 + x], $MachinePrecision] - N[Log[x], $MachinePrecision]), $MachinePrecision] / n), $MachinePrecision], N[(N[(N[(N[(N[(0.5 / N[(n * n), $MachinePrecision]), $MachinePrecision] - N[(0.5 / n), $MachinePrecision]), $MachinePrecision] * N[(x * x), $MachinePrecision]), $MachinePrecision] + N[(1.0 + N[(x / n), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := {x}^{\left(\frac{1}{n}\right)}\\
\mathbf{if}\;\frac{1}{n} \leq -2 \cdot 10^{-122}:\\
\;\;\;\;\frac{t_0}{n \cdot x}\\
\mathbf{elif}\;\frac{1}{n} \leq 10^{-15}:\\
\;\;\;\;\frac{\mathsf{log1p}\left(x\right) - \log x}{n}\\
\mathbf{else}:\\
\;\;\;\;\left(\left(\frac{0.5}{n \cdot n} - \frac{0.5}{n}\right) \cdot \left(x \cdot x\right) + \left(1 + \frac{x}{n}\right)\right) - t_0\\
\end{array}
\end{array}
if (/.f64 1 n) < -2.00000000000000012e-122Initial program 76.2%
Taylor expanded in x around inf 89.4%
log-rec89.4%
mul-1-neg89.4%
associate-*r/89.4%
neg-mul-189.4%
mul-1-neg89.4%
remove-double-neg89.4%
*-commutative89.4%
Simplified89.4%
*-un-lft-identity89.4%
div-inv89.4%
pow-to-exp89.4%
Applied egg-rr89.4%
*-lft-identity89.4%
Simplified89.4%
if -2.00000000000000012e-122 < (/.f64 1 n) < 1.0000000000000001e-15Initial program 33.0%
Taylor expanded in n around inf 82.2%
+-rgt-identity82.2%
+-rgt-identity82.2%
log1p-def82.2%
Simplified82.2%
if 1.0000000000000001e-15 < (/.f64 1 n) Initial program 53.0%
Taylor expanded in x around 0 68.8%
associate-+r+68.8%
+-commutative68.8%
associate-*r/68.8%
metadata-eval68.8%
unpow268.8%
associate-*r/68.8%
metadata-eval68.8%
unpow268.8%
Simplified68.8%
Final simplification83.2%
(FPCore (x n)
:precision binary64
(let* ((t_0 (- 1.0 (pow x (/ 1.0 n)))))
(if (<= x 8.4e-218)
(- (/ (log x) n))
(if (<= x 1.4e-154)
t_0
(if (<= x 4.2e-24)
(* (log x) (/ -1.0 n))
(if (<= x 4800000000.0) t_0 (/ (/ 1.0 n) x)))))))
double code(double x, double n) {
double t_0 = 1.0 - pow(x, (1.0 / n));
double tmp;
if (x <= 8.4e-218) {
tmp = -(log(x) / n);
} else if (x <= 1.4e-154) {
tmp = t_0;
} else if (x <= 4.2e-24) {
tmp = log(x) * (-1.0 / n);
} else if (x <= 4800000000.0) {
tmp = t_0;
} else {
tmp = (1.0 / n) / x;
}
return tmp;
}
real(8) function code(x, n)
real(8), intent (in) :: x
real(8), intent (in) :: n
real(8) :: t_0
real(8) :: tmp
t_0 = 1.0d0 - (x ** (1.0d0 / n))
if (x <= 8.4d-218) then
tmp = -(log(x) / n)
else if (x <= 1.4d-154) then
tmp = t_0
else if (x <= 4.2d-24) then
tmp = log(x) * ((-1.0d0) / n)
else if (x <= 4800000000.0d0) then
tmp = t_0
else
tmp = (1.0d0 / n) / x
end if
code = tmp
end function
public static double code(double x, double n) {
double t_0 = 1.0 - Math.pow(x, (1.0 / n));
double tmp;
if (x <= 8.4e-218) {
tmp = -(Math.log(x) / n);
} else if (x <= 1.4e-154) {
tmp = t_0;
} else if (x <= 4.2e-24) {
tmp = Math.log(x) * (-1.0 / n);
} else if (x <= 4800000000.0) {
tmp = t_0;
} else {
tmp = (1.0 / n) / x;
}
return tmp;
}
def code(x, n): t_0 = 1.0 - math.pow(x, (1.0 / n)) tmp = 0 if x <= 8.4e-218: tmp = -(math.log(x) / n) elif x <= 1.4e-154: tmp = t_0 elif x <= 4.2e-24: tmp = math.log(x) * (-1.0 / n) elif x <= 4800000000.0: tmp = t_0 else: tmp = (1.0 / n) / x return tmp
function code(x, n) t_0 = Float64(1.0 - (x ^ Float64(1.0 / n))) tmp = 0.0 if (x <= 8.4e-218) tmp = Float64(-Float64(log(x) / n)); elseif (x <= 1.4e-154) tmp = t_0; elseif (x <= 4.2e-24) tmp = Float64(log(x) * Float64(-1.0 / n)); elseif (x <= 4800000000.0) tmp = t_0; else tmp = Float64(Float64(1.0 / n) / x); end return tmp end
function tmp_2 = code(x, n) t_0 = 1.0 - (x ^ (1.0 / n)); tmp = 0.0; if (x <= 8.4e-218) tmp = -(log(x) / n); elseif (x <= 1.4e-154) tmp = t_0; elseif (x <= 4.2e-24) tmp = log(x) * (-1.0 / n); elseif (x <= 4800000000.0) tmp = t_0; else tmp = (1.0 / n) / x; end tmp_2 = tmp; end
code[x_, n_] := Block[{t$95$0 = N[(1.0 - N[Power[x, N[(1.0 / n), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, 8.4e-218], (-N[(N[Log[x], $MachinePrecision] / n), $MachinePrecision]), If[LessEqual[x, 1.4e-154], t$95$0, If[LessEqual[x, 4.2e-24], N[(N[Log[x], $MachinePrecision] * N[(-1.0 / n), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 4800000000.0], t$95$0, N[(N[(1.0 / n), $MachinePrecision] / x), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := 1 - {x}^{\left(\frac{1}{n}\right)}\\
\mathbf{if}\;x \leq 8.4 \cdot 10^{-218}:\\
\;\;\;\;-\frac{\log x}{n}\\
\mathbf{elif}\;x \leq 1.4 \cdot 10^{-154}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;x \leq 4.2 \cdot 10^{-24}:\\
\;\;\;\;\log x \cdot \frac{-1}{n}\\
\mathbf{elif}\;x \leq 4800000000:\\
\;\;\;\;t_0\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{1}{n}}{x}\\
\end{array}
\end{array}
if x < 8.39999999999999976e-218Initial program 45.0%
Taylor expanded in x around 0 45.0%
Taylor expanded in n around inf 57.0%
associate-*r/57.0%
neg-mul-157.0%
Simplified57.0%
if 8.39999999999999976e-218 < x < 1.40000000000000006e-154 or 4.1999999999999999e-24 < x < 4.8e9Initial program 70.1%
Taylor expanded in x around 0 60.1%
if 1.40000000000000006e-154 < x < 4.1999999999999999e-24Initial program 32.2%
Taylor expanded in x around 0 32.2%
Taylor expanded in n around inf 54.0%
associate-*r/54.0%
neg-mul-154.0%
Simplified54.0%
add-cube-cbrt53.2%
pow353.2%
Applied egg-rr53.2%
rem-cube-cbrt54.0%
frac-2neg54.0%
div-inv54.1%
remove-double-neg54.1%
metadata-eval54.1%
distribute-neg-frac54.1%
metadata-eval54.1%
frac-2neg54.1%
distribute-neg-frac54.1%
metadata-eval54.1%
Applied egg-rr54.1%
if 4.8e9 < x Initial program 67.1%
Taylor expanded in x around inf 98.9%
log-rec98.9%
mul-1-neg98.9%
associate-*r/98.9%
neg-mul-198.9%
mul-1-neg98.9%
remove-double-neg98.9%
*-commutative98.9%
Simplified98.9%
*-un-lft-identity98.9%
div-inv98.9%
pow-to-exp98.9%
Applied egg-rr98.9%
*-lft-identity98.9%
Simplified98.9%
Taylor expanded in n around inf 67.6%
associate-/r*68.6%
Simplified68.6%
Final simplification61.5%
(FPCore (x n)
:precision binary64
(let* ((t_0 (pow x (/ 1.0 n))))
(if (<= x 6.2e-218)
(- (/ (log x) n))
(if (<= x 3.2e-154)
(- 1.0 t_0)
(if (<= x 4.2e-24) (* (log x) (/ -1.0 n)) (/ t_0 (* n x)))))))
double code(double x, double n) {
double t_0 = pow(x, (1.0 / n));
double tmp;
if (x <= 6.2e-218) {
tmp = -(log(x) / n);
} else if (x <= 3.2e-154) {
tmp = 1.0 - t_0;
} else if (x <= 4.2e-24) {
tmp = log(x) * (-1.0 / n);
} else {
tmp = t_0 / (n * x);
}
return tmp;
}
real(8) function code(x, n)
real(8), intent (in) :: x
real(8), intent (in) :: n
real(8) :: t_0
real(8) :: tmp
t_0 = x ** (1.0d0 / n)
if (x <= 6.2d-218) then
tmp = -(log(x) / n)
else if (x <= 3.2d-154) then
tmp = 1.0d0 - t_0
else if (x <= 4.2d-24) then
tmp = log(x) * ((-1.0d0) / n)
else
tmp = t_0 / (n * x)
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 (x <= 6.2e-218) {
tmp = -(Math.log(x) / n);
} else if (x <= 3.2e-154) {
tmp = 1.0 - t_0;
} else if (x <= 4.2e-24) {
tmp = Math.log(x) * (-1.0 / n);
} else {
tmp = t_0 / (n * x);
}
return tmp;
}
def code(x, n): t_0 = math.pow(x, (1.0 / n)) tmp = 0 if x <= 6.2e-218: tmp = -(math.log(x) / n) elif x <= 3.2e-154: tmp = 1.0 - t_0 elif x <= 4.2e-24: tmp = math.log(x) * (-1.0 / n) else: tmp = t_0 / (n * x) return tmp
function code(x, n) t_0 = x ^ Float64(1.0 / n) tmp = 0.0 if (x <= 6.2e-218) tmp = Float64(-Float64(log(x) / n)); elseif (x <= 3.2e-154) tmp = Float64(1.0 - t_0); elseif (x <= 4.2e-24) tmp = Float64(log(x) * Float64(-1.0 / n)); else tmp = Float64(t_0 / Float64(n * x)); end return tmp end
function tmp_2 = code(x, n) t_0 = x ^ (1.0 / n); tmp = 0.0; if (x <= 6.2e-218) tmp = -(log(x) / n); elseif (x <= 3.2e-154) tmp = 1.0 - t_0; elseif (x <= 4.2e-24) tmp = log(x) * (-1.0 / n); else tmp = t_0 / (n * x); end tmp_2 = tmp; end
code[x_, n_] := Block[{t$95$0 = N[Power[x, N[(1.0 / n), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[x, 6.2e-218], (-N[(N[Log[x], $MachinePrecision] / n), $MachinePrecision]), If[LessEqual[x, 3.2e-154], N[(1.0 - t$95$0), $MachinePrecision], If[LessEqual[x, 4.2e-24], N[(N[Log[x], $MachinePrecision] * N[(-1.0 / n), $MachinePrecision]), $MachinePrecision], N[(t$95$0 / N[(n * x), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := {x}^{\left(\frac{1}{n}\right)}\\
\mathbf{if}\;x \leq 6.2 \cdot 10^{-218}:\\
\;\;\;\;-\frac{\log x}{n}\\
\mathbf{elif}\;x \leq 3.2 \cdot 10^{-154}:\\
\;\;\;\;1 - t_0\\
\mathbf{elif}\;x \leq 4.2 \cdot 10^{-24}:\\
\;\;\;\;\log x \cdot \frac{-1}{n}\\
\mathbf{else}:\\
\;\;\;\;\frac{t_0}{n \cdot x}\\
\end{array}
\end{array}
if x < 6.19999999999999994e-218Initial program 45.0%
Taylor expanded in x around 0 45.0%
Taylor expanded in n around inf 57.0%
associate-*r/57.0%
neg-mul-157.0%
Simplified57.0%
if 6.19999999999999994e-218 < x < 3.20000000000000005e-154Initial program 63.2%
Taylor expanded in x around 0 63.2%
if 3.20000000000000005e-154 < x < 4.1999999999999999e-24Initial program 32.2%
Taylor expanded in x around 0 32.2%
Taylor expanded in n around inf 54.0%
associate-*r/54.0%
neg-mul-154.0%
Simplified54.0%
add-cube-cbrt53.2%
pow353.2%
Applied egg-rr53.2%
rem-cube-cbrt54.0%
frac-2neg54.0%
div-inv54.1%
remove-double-neg54.1%
metadata-eval54.1%
distribute-neg-frac54.1%
metadata-eval54.1%
frac-2neg54.1%
distribute-neg-frac54.1%
metadata-eval54.1%
Applied egg-rr54.1%
if 4.1999999999999999e-24 < x Initial program 68.9%
Taylor expanded in x around inf 96.8%
log-rec96.8%
mul-1-neg96.8%
associate-*r/96.8%
neg-mul-196.8%
mul-1-neg96.8%
remove-double-neg96.8%
*-commutative96.8%
Simplified96.8%
*-un-lft-identity96.8%
div-inv96.8%
pow-to-exp96.8%
Applied egg-rr96.8%
*-lft-identity96.8%
Simplified96.8%
Final simplification75.6%
(FPCore (x n)
:precision binary64
(let* ((t_0 (pow x (/ 1.0 n))))
(if (<= x 1.9e-218)
(- (/ (log x) n))
(if (<= x 2.85e-154)
(- (+ 1.0 (/ x n)) t_0)
(if (<= x 3.8e-24) (* (log x) (/ -1.0 n)) (/ t_0 (* n x)))))))
double code(double x, double n) {
double t_0 = pow(x, (1.0 / n));
double tmp;
if (x <= 1.9e-218) {
tmp = -(log(x) / n);
} else if (x <= 2.85e-154) {
tmp = (1.0 + (x / n)) - t_0;
} else if (x <= 3.8e-24) {
tmp = log(x) * (-1.0 / n);
} else {
tmp = t_0 / (n * x);
}
return tmp;
}
real(8) function code(x, n)
real(8), intent (in) :: x
real(8), intent (in) :: n
real(8) :: t_0
real(8) :: tmp
t_0 = x ** (1.0d0 / n)
if (x <= 1.9d-218) then
tmp = -(log(x) / n)
else if (x <= 2.85d-154) then
tmp = (1.0d0 + (x / n)) - t_0
else if (x <= 3.8d-24) then
tmp = log(x) * ((-1.0d0) / n)
else
tmp = t_0 / (n * x)
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 (x <= 1.9e-218) {
tmp = -(Math.log(x) / n);
} else if (x <= 2.85e-154) {
tmp = (1.0 + (x / n)) - t_0;
} else if (x <= 3.8e-24) {
tmp = Math.log(x) * (-1.0 / n);
} else {
tmp = t_0 / (n * x);
}
return tmp;
}
def code(x, n): t_0 = math.pow(x, (1.0 / n)) tmp = 0 if x <= 1.9e-218: tmp = -(math.log(x) / n) elif x <= 2.85e-154: tmp = (1.0 + (x / n)) - t_0 elif x <= 3.8e-24: tmp = math.log(x) * (-1.0 / n) else: tmp = t_0 / (n * x) return tmp
function code(x, n) t_0 = x ^ Float64(1.0 / n) tmp = 0.0 if (x <= 1.9e-218) tmp = Float64(-Float64(log(x) / n)); elseif (x <= 2.85e-154) tmp = Float64(Float64(1.0 + Float64(x / n)) - t_0); elseif (x <= 3.8e-24) tmp = Float64(log(x) * Float64(-1.0 / n)); else tmp = Float64(t_0 / Float64(n * x)); end return tmp end
function tmp_2 = code(x, n) t_0 = x ^ (1.0 / n); tmp = 0.0; if (x <= 1.9e-218) tmp = -(log(x) / n); elseif (x <= 2.85e-154) tmp = (1.0 + (x / n)) - t_0; elseif (x <= 3.8e-24) tmp = log(x) * (-1.0 / n); else tmp = t_0 / (n * x); end tmp_2 = tmp; end
code[x_, n_] := Block[{t$95$0 = N[Power[x, N[(1.0 / n), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[x, 1.9e-218], (-N[(N[Log[x], $MachinePrecision] / n), $MachinePrecision]), If[LessEqual[x, 2.85e-154], N[(N[(1.0 + N[(x / n), $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[x, 3.8e-24], N[(N[Log[x], $MachinePrecision] * N[(-1.0 / n), $MachinePrecision]), $MachinePrecision], N[(t$95$0 / N[(n * x), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := {x}^{\left(\frac{1}{n}\right)}\\
\mathbf{if}\;x \leq 1.9 \cdot 10^{-218}:\\
\;\;\;\;-\frac{\log x}{n}\\
\mathbf{elif}\;x \leq 2.85 \cdot 10^{-154}:\\
\;\;\;\;\left(1 + \frac{x}{n}\right) - t_0\\
\mathbf{elif}\;x \leq 3.8 \cdot 10^{-24}:\\
\;\;\;\;\log x \cdot \frac{-1}{n}\\
\mathbf{else}:\\
\;\;\;\;\frac{t_0}{n \cdot x}\\
\end{array}
\end{array}
if x < 1.8999999999999999e-218Initial program 45.0%
Taylor expanded in x around 0 45.0%
Taylor expanded in n around inf 57.0%
associate-*r/57.0%
neg-mul-157.0%
Simplified57.0%
if 1.8999999999999999e-218 < x < 2.8499999999999999e-154Initial program 63.2%
Taylor expanded in x around 0 63.2%
if 2.8499999999999999e-154 < x < 3.80000000000000026e-24Initial program 32.2%
Taylor expanded in x around 0 32.2%
Taylor expanded in n around inf 54.0%
associate-*r/54.0%
neg-mul-154.0%
Simplified54.0%
add-cube-cbrt53.2%
pow353.2%
Applied egg-rr53.2%
rem-cube-cbrt54.0%
frac-2neg54.0%
div-inv54.1%
remove-double-neg54.1%
metadata-eval54.1%
distribute-neg-frac54.1%
metadata-eval54.1%
frac-2neg54.1%
distribute-neg-frac54.1%
metadata-eval54.1%
Applied egg-rr54.1%
if 3.80000000000000026e-24 < x Initial program 68.9%
Taylor expanded in x around inf 96.8%
log-rec96.8%
mul-1-neg96.8%
associate-*r/96.8%
neg-mul-196.8%
mul-1-neg96.8%
remove-double-neg96.8%
*-commutative96.8%
Simplified96.8%
*-un-lft-identity96.8%
div-inv96.8%
pow-to-exp96.8%
Applied egg-rr96.8%
*-lft-identity96.8%
Simplified96.8%
Final simplification75.6%
(FPCore (x n) :precision binary64 (if (<= x 0.0175) (* (log x) (/ -1.0 n)) (/ (/ 1.0 n) x)))
double code(double x, double n) {
double tmp;
if (x <= 0.0175) {
tmp = log(x) * (-1.0 / n);
} else {
tmp = (1.0 / n) / x;
}
return tmp;
}
real(8) function code(x, n)
real(8), intent (in) :: x
real(8), intent (in) :: n
real(8) :: tmp
if (x <= 0.0175d0) then
tmp = log(x) * ((-1.0d0) / n)
else
tmp = (1.0d0 / n) / x
end if
code = tmp
end function
public static double code(double x, double n) {
double tmp;
if (x <= 0.0175) {
tmp = Math.log(x) * (-1.0 / n);
} else {
tmp = (1.0 / n) / x;
}
return tmp;
}
def code(x, n): tmp = 0 if x <= 0.0175: tmp = math.log(x) * (-1.0 / n) else: tmp = (1.0 / n) / x return tmp
function code(x, n) tmp = 0.0 if (x <= 0.0175) tmp = Float64(log(x) * Float64(-1.0 / n)); else tmp = Float64(Float64(1.0 / n) / x); end return tmp end
function tmp_2 = code(x, n) tmp = 0.0; if (x <= 0.0175) tmp = log(x) * (-1.0 / n); else tmp = (1.0 / n) / x; end tmp_2 = tmp; end
code[x_, n_] := If[LessEqual[x, 0.0175], N[(N[Log[x], $MachinePrecision] * N[(-1.0 / n), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 / n), $MachinePrecision] / x), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq 0.0175:\\
\;\;\;\;\log x \cdot \frac{-1}{n}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{1}{n}}{x}\\
\end{array}
\end{array}
if x < 0.017500000000000002Initial program 43.3%
Taylor expanded in x around 0 43.3%
Taylor expanded in n around inf 50.6%
associate-*r/50.6%
neg-mul-150.6%
Simplified50.6%
add-cube-cbrt49.9%
pow349.9%
Applied egg-rr49.9%
rem-cube-cbrt50.6%
frac-2neg50.6%
div-inv50.6%
remove-double-neg50.6%
metadata-eval50.6%
distribute-neg-frac50.6%
metadata-eval50.6%
frac-2neg50.6%
distribute-neg-frac50.6%
metadata-eval50.6%
Applied egg-rr50.6%
if 0.017500000000000002 < x Initial program 68.6%
Taylor expanded in x around inf 98.9%
log-rec98.9%
mul-1-neg98.9%
associate-*r/98.9%
neg-mul-198.9%
mul-1-neg98.9%
remove-double-neg98.9%
*-commutative98.9%
Simplified98.9%
*-un-lft-identity98.9%
div-inv98.9%
pow-to-exp98.9%
Applied egg-rr98.9%
*-lft-identity98.9%
Simplified98.9%
Taylor expanded in n around inf 64.6%
associate-/r*65.6%
Simplified65.6%
Final simplification57.1%
(FPCore (x n) :precision binary64 (if (<= x 0.0175) (/ (- x (log x)) n) (/ (/ 1.0 n) x)))
double code(double x, double n) {
double tmp;
if (x <= 0.0175) {
tmp = (x - log(x)) / n;
} else {
tmp = (1.0 / n) / x;
}
return tmp;
}
real(8) function code(x, n)
real(8), intent (in) :: x
real(8), intent (in) :: n
real(8) :: tmp
if (x <= 0.0175d0) then
tmp = (x - log(x)) / n
else
tmp = (1.0d0 / n) / x
end if
code = tmp
end function
public static double code(double x, double n) {
double tmp;
if (x <= 0.0175) {
tmp = (x - Math.log(x)) / n;
} else {
tmp = (1.0 / n) / x;
}
return tmp;
}
def code(x, n): tmp = 0 if x <= 0.0175: tmp = (x - math.log(x)) / n else: tmp = (1.0 / n) / x return tmp
function code(x, n) tmp = 0.0 if (x <= 0.0175) tmp = Float64(Float64(x - log(x)) / n); else tmp = Float64(Float64(1.0 / n) / x); end return tmp end
function tmp_2 = code(x, n) tmp = 0.0; if (x <= 0.0175) tmp = (x - log(x)) / n; else tmp = (1.0 / n) / x; end tmp_2 = tmp; end
code[x_, n_] := If[LessEqual[x, 0.0175], N[(N[(x - N[Log[x], $MachinePrecision]), $MachinePrecision] / n), $MachinePrecision], N[(N[(1.0 / n), $MachinePrecision] / x), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq 0.0175:\\
\;\;\;\;\frac{x - \log x}{n}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{1}{n}}{x}\\
\end{array}
\end{array}
if x < 0.017500000000000002Initial program 43.3%
Taylor expanded in x around 0 33.1%
associate-+r+33.1%
+-commutative33.1%
associate-*r/33.1%
metadata-eval33.1%
unpow233.1%
associate-*r/33.1%
metadata-eval33.1%
unpow233.1%
Simplified33.1%
Taylor expanded in n around inf 51.0%
*-commutative51.0%
fma-def51.0%
unpow251.0%
Simplified51.0%
Taylor expanded in x around 0 50.8%
if 0.017500000000000002 < x Initial program 68.6%
Taylor expanded in x around inf 98.9%
log-rec98.9%
mul-1-neg98.9%
associate-*r/98.9%
neg-mul-198.9%
mul-1-neg98.9%
remove-double-neg98.9%
*-commutative98.9%
Simplified98.9%
*-un-lft-identity98.9%
div-inv98.9%
pow-to-exp98.9%
Applied egg-rr98.9%
*-lft-identity98.9%
Simplified98.9%
Taylor expanded in n around inf 64.6%
associate-/r*65.6%
Simplified65.6%
Final simplification57.2%
(FPCore (x n) :precision binary64 (if (<= x 0.0175) (- (/ (log x) n)) (/ (/ 1.0 n) x)))
double code(double x, double n) {
double tmp;
if (x <= 0.0175) {
tmp = -(log(x) / n);
} else {
tmp = (1.0 / n) / x;
}
return tmp;
}
real(8) function code(x, n)
real(8), intent (in) :: x
real(8), intent (in) :: n
real(8) :: tmp
if (x <= 0.0175d0) then
tmp = -(log(x) / n)
else
tmp = (1.0d0 / n) / x
end if
code = tmp
end function
public static double code(double x, double n) {
double tmp;
if (x <= 0.0175) {
tmp = -(Math.log(x) / n);
} else {
tmp = (1.0 / n) / x;
}
return tmp;
}
def code(x, n): tmp = 0 if x <= 0.0175: tmp = -(math.log(x) / n) else: tmp = (1.0 / n) / x return tmp
function code(x, n) tmp = 0.0 if (x <= 0.0175) tmp = Float64(-Float64(log(x) / n)); else tmp = Float64(Float64(1.0 / n) / x); end return tmp end
function tmp_2 = code(x, n) tmp = 0.0; if (x <= 0.0175) tmp = -(log(x) / n); else tmp = (1.0 / n) / x; end tmp_2 = tmp; end
code[x_, n_] := If[LessEqual[x, 0.0175], (-N[(N[Log[x], $MachinePrecision] / n), $MachinePrecision]), N[(N[(1.0 / n), $MachinePrecision] / x), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq 0.0175:\\
\;\;\;\;-\frac{\log x}{n}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{1}{n}}{x}\\
\end{array}
\end{array}
if x < 0.017500000000000002Initial program 43.3%
Taylor expanded in x around 0 43.3%
Taylor expanded in n around inf 50.6%
associate-*r/50.6%
neg-mul-150.6%
Simplified50.6%
if 0.017500000000000002 < x Initial program 68.6%
Taylor expanded in x around inf 98.9%
log-rec98.9%
mul-1-neg98.9%
associate-*r/98.9%
neg-mul-198.9%
mul-1-neg98.9%
remove-double-neg98.9%
*-commutative98.9%
Simplified98.9%
*-un-lft-identity98.9%
div-inv98.9%
pow-to-exp98.9%
Applied egg-rr98.9%
*-lft-identity98.9%
Simplified98.9%
Taylor expanded in n around inf 64.6%
associate-/r*65.6%
Simplified65.6%
Final simplification57.1%
(FPCore (x n) :precision binary64 (if (<= (/ 1.0 n) 1e+45) (/ (/ 1.0 n) x) (* x (* x (/ (+ (* (* n n) -0.5) (* n 0.5)) (* n (* n n)))))))
double code(double x, double n) {
double tmp;
if ((1.0 / n) <= 1e+45) {
tmp = (1.0 / n) / x;
} else {
tmp = x * (x * ((((n * n) * -0.5) + (n * 0.5)) / (n * (n * n))));
}
return tmp;
}
real(8) function code(x, n)
real(8), intent (in) :: x
real(8), intent (in) :: n
real(8) :: tmp
if ((1.0d0 / n) <= 1d+45) then
tmp = (1.0d0 / n) / x
else
tmp = x * (x * ((((n * n) * (-0.5d0)) + (n * 0.5d0)) / (n * (n * n))))
end if
code = tmp
end function
public static double code(double x, double n) {
double tmp;
if ((1.0 / n) <= 1e+45) {
tmp = (1.0 / n) / x;
} else {
tmp = x * (x * ((((n * n) * -0.5) + (n * 0.5)) / (n * (n * n))));
}
return tmp;
}
def code(x, n): tmp = 0 if (1.0 / n) <= 1e+45: tmp = (1.0 / n) / x else: tmp = x * (x * ((((n * n) * -0.5) + (n * 0.5)) / (n * (n * n)))) return tmp
function code(x, n) tmp = 0.0 if (Float64(1.0 / n) <= 1e+45) tmp = Float64(Float64(1.0 / n) / x); else tmp = Float64(x * Float64(x * Float64(Float64(Float64(Float64(n * n) * -0.5) + Float64(n * 0.5)) / Float64(n * Float64(n * n))))); end return tmp end
function tmp_2 = code(x, n) tmp = 0.0; if ((1.0 / n) <= 1e+45) tmp = (1.0 / n) / x; else tmp = x * (x * ((((n * n) * -0.5) + (n * 0.5)) / (n * (n * n)))); end tmp_2 = tmp; end
code[x_, n_] := If[LessEqual[N[(1.0 / n), $MachinePrecision], 1e+45], N[(N[(1.0 / n), $MachinePrecision] / x), $MachinePrecision], N[(x * N[(x * N[(N[(N[(N[(n * n), $MachinePrecision] * -0.5), $MachinePrecision] + N[(n * 0.5), $MachinePrecision]), $MachinePrecision] / N[(n * N[(n * n), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\frac{1}{n} \leq 10^{+45}:\\
\;\;\;\;\frac{\frac{1}{n}}{x}\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(x \cdot \frac{\left(n \cdot n\right) \cdot -0.5 + n \cdot 0.5}{n \cdot \left(n \cdot n\right)}\right)\\
\end{array}
\end{array}
if (/.f64 1 n) < 9.9999999999999993e44Initial program 55.8%
Taylor expanded in x around inf 66.8%
log-rec66.8%
mul-1-neg66.8%
associate-*r/66.8%
neg-mul-166.8%
mul-1-neg66.8%
remove-double-neg66.8%
*-commutative66.8%
Simplified66.8%
*-un-lft-identity66.8%
div-inv66.8%
pow-to-exp66.8%
Applied egg-rr66.8%
*-lft-identity66.8%
Simplified66.8%
Taylor expanded in n around inf 42.1%
associate-/r*42.6%
Simplified42.6%
if 9.9999999999999993e44 < (/.f64 1 n) Initial program 43.2%
Taylor expanded in x around 0 64.0%
associate-+r+64.0%
+-commutative64.0%
associate-*r/64.0%
metadata-eval64.0%
unpow264.0%
associate-*r/64.0%
metadata-eval64.0%
unpow264.0%
Simplified64.0%
Taylor expanded in x around inf 35.4%
*-commutative35.4%
unpow235.4%
associate-*r/35.4%
metadata-eval35.4%
unpow235.4%
associate-*r/35.4%
metadata-eval35.4%
associate-*l*42.6%
sub-neg42.6%
distribute-neg-frac42.6%
metadata-eval42.6%
Simplified42.6%
+-commutative42.6%
frac-add48.7%
Applied egg-rr48.7%
Final simplification43.3%
(FPCore (x n) :precision binary64 (if (<= (/ 1.0 n) 1e+45) (/ (/ 1.0 n) x) (* x (* x (/ 0.5 (* n n))))))
double code(double x, double n) {
double tmp;
if ((1.0 / n) <= 1e+45) {
tmp = (1.0 / n) / x;
} else {
tmp = x * (x * (0.5 / (n * n)));
}
return tmp;
}
real(8) function code(x, n)
real(8), intent (in) :: x
real(8), intent (in) :: n
real(8) :: tmp
if ((1.0d0 / n) <= 1d+45) then
tmp = (1.0d0 / n) / x
else
tmp = x * (x * (0.5d0 / (n * n)))
end if
code = tmp
end function
public static double code(double x, double n) {
double tmp;
if ((1.0 / n) <= 1e+45) {
tmp = (1.0 / n) / x;
} else {
tmp = x * (x * (0.5 / (n * n)));
}
return tmp;
}
def code(x, n): tmp = 0 if (1.0 / n) <= 1e+45: tmp = (1.0 / n) / x else: tmp = x * (x * (0.5 / (n * n))) return tmp
function code(x, n) tmp = 0.0 if (Float64(1.0 / n) <= 1e+45) tmp = Float64(Float64(1.0 / n) / x); else tmp = Float64(x * Float64(x * Float64(0.5 / Float64(n * n)))); end return tmp end
function tmp_2 = code(x, n) tmp = 0.0; if ((1.0 / n) <= 1e+45) tmp = (1.0 / n) / x; else tmp = x * (x * (0.5 / (n * n))); end tmp_2 = tmp; end
code[x_, n_] := If[LessEqual[N[(1.0 / n), $MachinePrecision], 1e+45], N[(N[(1.0 / n), $MachinePrecision] / x), $MachinePrecision], N[(x * N[(x * N[(0.5 / N[(n * n), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\frac{1}{n} \leq 10^{+45}:\\
\;\;\;\;\frac{\frac{1}{n}}{x}\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(x \cdot \frac{0.5}{n \cdot n}\right)\\
\end{array}
\end{array}
if (/.f64 1 n) < 9.9999999999999993e44Initial program 55.8%
Taylor expanded in x around inf 66.8%
log-rec66.8%
mul-1-neg66.8%
associate-*r/66.8%
neg-mul-166.8%
mul-1-neg66.8%
remove-double-neg66.8%
*-commutative66.8%
Simplified66.8%
*-un-lft-identity66.8%
div-inv66.8%
pow-to-exp66.8%
Applied egg-rr66.8%
*-lft-identity66.8%
Simplified66.8%
Taylor expanded in n around inf 42.1%
associate-/r*42.6%
Simplified42.6%
if 9.9999999999999993e44 < (/.f64 1 n) Initial program 43.2%
Taylor expanded in x around 0 64.0%
associate-+r+64.0%
+-commutative64.0%
associate-*r/64.0%
metadata-eval64.0%
unpow264.0%
associate-*r/64.0%
metadata-eval64.0%
unpow264.0%
Simplified64.0%
Taylor expanded in x around inf 35.4%
*-commutative35.4%
unpow235.4%
associate-*r/35.4%
metadata-eval35.4%
unpow235.4%
associate-*r/35.4%
metadata-eval35.4%
associate-*l*42.6%
sub-neg42.6%
distribute-neg-frac42.6%
metadata-eval42.6%
Simplified42.6%
Taylor expanded in n around 0 42.6%
unpow242.6%
Simplified42.6%
Final simplification42.6%
(FPCore (x n) :precision binary64 (/ 1.0 (* n x)))
double code(double x, double n) {
return 1.0 / (n * x);
}
real(8) function code(x, n)
real(8), intent (in) :: x
real(8), intent (in) :: n
code = 1.0d0 / (n * x)
end function
public static double code(double x, double n) {
return 1.0 / (n * x);
}
def code(x, n): return 1.0 / (n * x)
function code(x, n) return Float64(1.0 / Float64(n * x)) end
function tmp = code(x, n) tmp = 1.0 / (n * x); end
code[x_, n_] := N[(1.0 / N[(n * x), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{1}{n \cdot x}
\end{array}
Initial program 54.3%
Taylor expanded in x around inf 59.1%
log-rec59.1%
mul-1-neg59.1%
associate-*r/59.1%
neg-mul-159.1%
mul-1-neg59.1%
remove-double-neg59.1%
*-commutative59.1%
Simplified59.1%
Taylor expanded in n around inf 40.4%
*-commutative40.4%
Simplified40.4%
Final simplification40.4%
(FPCore (x n) :precision binary64 (/ (/ 1.0 n) x))
double code(double x, double n) {
return (1.0 / n) / x;
}
real(8) function code(x, n)
real(8), intent (in) :: x
real(8), intent (in) :: n
code = (1.0d0 / n) / x
end function
public static double code(double x, double n) {
return (1.0 / n) / x;
}
def code(x, n): return (1.0 / n) / x
function code(x, n) return Float64(Float64(1.0 / n) / x) end
function tmp = code(x, n) tmp = (1.0 / n) / x; end
code[x_, n_] := N[(N[(1.0 / n), $MachinePrecision] / x), $MachinePrecision]
\begin{array}{l}
\\
\frac{\frac{1}{n}}{x}
\end{array}
Initial program 54.3%
Taylor expanded in x around inf 59.1%
log-rec59.1%
mul-1-neg59.1%
associate-*r/59.1%
neg-mul-159.1%
mul-1-neg59.1%
remove-double-neg59.1%
*-commutative59.1%
Simplified59.1%
*-un-lft-identity59.1%
div-inv59.1%
pow-to-exp59.1%
Applied egg-rr59.1%
*-lft-identity59.1%
Simplified59.1%
Taylor expanded in n around inf 40.4%
associate-/r*40.8%
Simplified40.8%
Final simplification40.8%
(FPCore (x n) :precision binary64 (* n x))
double code(double x, double n) {
return n * x;
}
real(8) function code(x, n)
real(8), intent (in) :: x
real(8), intent (in) :: n
code = n * x
end function
public static double code(double x, double n) {
return n * x;
}
def code(x, n): return n * x
function code(x, n) return Float64(n * x) end
function tmp = code(x, n) tmp = n * x; end
code[x_, n_] := N[(n * x), $MachinePrecision]
\begin{array}{l}
\\
n \cdot x
\end{array}
Initial program 54.3%
Taylor expanded in x around inf 59.1%
log-rec59.1%
mul-1-neg59.1%
associate-*r/59.1%
neg-mul-159.1%
mul-1-neg59.1%
remove-double-neg59.1%
*-commutative59.1%
Simplified59.1%
*-un-lft-identity59.1%
div-inv59.1%
pow-to-exp59.1%
Applied egg-rr59.1%
*-lft-identity59.1%
Simplified59.1%
Taylor expanded in n around inf 40.4%
associate-/r*40.8%
Simplified40.8%
associate-/l/40.4%
add-exp-log15.9%
exp-neg15.9%
neg-sub015.9%
metadata-eval15.9%
log-prod16.2%
associate--r+16.2%
metadata-eval16.2%
neg-sub016.2%
add-sqr-sqrt4.1%
sqrt-unprod4.6%
sqr-neg4.6%
sqrt-unprod0.5%
add-sqr-sqrt2.1%
log-div2.5%
add-exp-log4.4%
add-log-exp23.3%
*-un-lft-identity23.3%
log-prod23.3%
metadata-eval23.3%
add-log-exp4.4%
add-exp-log2.5%
log-div2.1%
Applied egg-rr3.2%
+-lft-identity3.2%
Simplified3.2%
Final simplification3.2%
(FPCore (x n) :precision binary64 (/ n x))
double code(double x, double n) {
return n / x;
}
real(8) function code(x, n)
real(8), intent (in) :: x
real(8), intent (in) :: n
code = n / x
end function
public static double code(double x, double n) {
return n / x;
}
def code(x, n): return n / x
function code(x, n) return Float64(n / x) end
function tmp = code(x, n) tmp = n / x; end
code[x_, n_] := N[(n / x), $MachinePrecision]
\begin{array}{l}
\\
\frac{n}{x}
\end{array}
Initial program 54.3%
Taylor expanded in x around inf 59.1%
log-rec59.1%
mul-1-neg59.1%
associate-*r/59.1%
neg-mul-159.1%
mul-1-neg59.1%
remove-double-neg59.1%
*-commutative59.1%
Simplified59.1%
*-un-lft-identity59.1%
div-inv59.1%
pow-to-exp59.1%
Applied egg-rr59.1%
*-lft-identity59.1%
Simplified59.1%
Taylor expanded in n around inf 40.4%
associate-/r*40.8%
Simplified40.8%
associate-/l/40.4%
add-exp-log15.9%
exp-neg15.9%
add-sqr-sqrt3.6%
sqrt-unprod4.1%
sqr-neg4.1%
sqrt-unprod0.5%
add-sqr-sqrt1.5%
add-exp-log3.2%
*-commutative3.2%
add-exp-log3.2%
add-sqr-sqrt1.1%
sqrt-unprod3.0%
sqr-neg3.0%
sqrt-unprod1.9%
add-sqr-sqrt10.7%
rec-exp10.7%
add-exp-log10.7%
div-inv10.7%
add-cube-cbrt10.7%
*-un-lft-identity10.7%
times-frac10.7%
Applied egg-rr10.7%
/-rgt-identity10.7%
associate-*r/10.7%
unpow210.7%
rem-3cbrt-lft10.7%
Simplified10.7%
Final simplification10.7%
herbie shell --seed 2023187
(FPCore (x n)
:name "2nthrt (problem 3.4.6)"
:precision binary64
(- (pow (+ x 1.0) (/ 1.0 n)) (pow x (/ 1.0 n))))