
(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 15 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
(if (<= x 520000.0)
(*
(-
(log (/ x (+ x 1.0)))
(/
(fma
0.16666666666666666
(/ (- (pow (log1p x) 3.0) (pow (log x) 3.0)) n)
(* 0.5 (- (pow (log1p x) 2.0) (pow (log x) 2.0))))
n))
(/ -1.0 n))
(/ (cbrt (pow x (/ 3.0 n))) (* x n))))
double code(double x, double n) {
double tmp;
if (x <= 520000.0) {
tmp = (log((x / (x + 1.0))) - (fma(0.16666666666666666, ((pow(log1p(x), 3.0) - pow(log(x), 3.0)) / n), (0.5 * (pow(log1p(x), 2.0) - pow(log(x), 2.0)))) / n)) * (-1.0 / n);
} else {
tmp = cbrt(pow(x, (3.0 / n))) / (x * n);
}
return tmp;
}
function code(x, n) tmp = 0.0 if (x <= 520000.0) tmp = Float64(Float64(log(Float64(x / Float64(x + 1.0))) - Float64(fma(0.16666666666666666, Float64(Float64((log1p(x) ^ 3.0) - (log(x) ^ 3.0)) / n), Float64(0.5 * Float64((log1p(x) ^ 2.0) - (log(x) ^ 2.0)))) / n)) * Float64(-1.0 / n)); else tmp = Float64(cbrt((x ^ Float64(3.0 / n))) / Float64(x * n)); end return tmp end
code[x_, n_] := If[LessEqual[x, 520000.0], N[(N[(N[Log[N[(x / N[(x + 1.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] - N[(N[(0.16666666666666666 * N[(N[(N[Power[N[Log[1 + x], $MachinePrecision], 3.0], $MachinePrecision] - N[Power[N[Log[x], $MachinePrecision], 3.0], $MachinePrecision]), $MachinePrecision] / n), $MachinePrecision] + N[(0.5 * N[(N[Power[N[Log[1 + x], $MachinePrecision], 2.0], $MachinePrecision] - N[Power[N[Log[x], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / n), $MachinePrecision]), $MachinePrecision] * N[(-1.0 / n), $MachinePrecision]), $MachinePrecision], N[(N[Power[N[Power[x, N[(3.0 / n), $MachinePrecision]], $MachinePrecision], 1/3], $MachinePrecision] / N[(x * n), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq 520000:\\
\;\;\;\;\left(\log \left(\frac{x}{x + 1}\right) - \frac{\mathsf{fma}\left(0.16666666666666666, \frac{{\left(\mathsf{log1p}\left(x\right)\right)}^{3} - {\log x}^{3}}{n}, 0.5 \cdot \left({\left(\mathsf{log1p}\left(x\right)\right)}^{2} - {\log x}^{2}\right)\right)}{n}\right) \cdot \frac{-1}{n}\\
\mathbf{else}:\\
\;\;\;\;\frac{\sqrt[3]{{x}^{\left(\frac{3}{n}\right)}}}{x \cdot n}\\
\end{array}
\end{array}
if x < 5.2e5Initial program 35.7%
Taylor expanded in n around -inf 82.1%
Simplified82.1%
div-inv82.0%
associate--r+82.0%
+-commutative82.0%
associate-/l*82.0%
fma-define82.0%
Applied egg-rr82.0%
log1p-undefine82.0%
diff-log82.2%
Applied egg-rr82.2%
+-commutative82.2%
Simplified82.2%
if 5.2e5 < x Initial program 66.2%
Taylor expanded in x around inf 98.8%
mul-1-neg98.8%
log-rec98.8%
mul-1-neg98.8%
distribute-neg-frac98.8%
mul-1-neg98.8%
remove-double-neg98.8%
*-commutative98.8%
Simplified98.8%
div-inv98.7%
pow-to-exp98.7%
add-cbrt-cube98.7%
pow1/398.7%
pow398.7%
pow-pow98.8%
Applied egg-rr98.8%
unpow1/398.8%
associate-*l/98.8%
metadata-eval98.8%
Simplified98.8%
Final simplification89.3%
(FPCore (x n)
:precision binary64
(if (<= x 520000.0)
(/
(-
(+
(log1p x)
(/
(+
(* 0.5 (- (pow (log1p x) 2.0) (pow (log x) 2.0)))
(/
(* 0.16666666666666666 (- (pow (log1p x) 3.0) (pow (log x) 3.0)))
n))
n))
(log x))
n)
(/ (cbrt (pow x (/ 3.0 n))) (* x n))))
double code(double x, double n) {
double tmp;
if (x <= 520000.0) {
tmp = ((log1p(x) + (((0.5 * (pow(log1p(x), 2.0) - pow(log(x), 2.0))) + ((0.16666666666666666 * (pow(log1p(x), 3.0) - pow(log(x), 3.0))) / n)) / n)) - log(x)) / n;
} else {
tmp = cbrt(pow(x, (3.0 / n))) / (x * n);
}
return tmp;
}
public static double code(double x, double n) {
double tmp;
if (x <= 520000.0) {
tmp = ((Math.log1p(x) + (((0.5 * (Math.pow(Math.log1p(x), 2.0) - Math.pow(Math.log(x), 2.0))) + ((0.16666666666666666 * (Math.pow(Math.log1p(x), 3.0) - Math.pow(Math.log(x), 3.0))) / n)) / n)) - Math.log(x)) / n;
} else {
tmp = Math.cbrt(Math.pow(x, (3.0 / n))) / (x * n);
}
return tmp;
}
function code(x, n) tmp = 0.0 if (x <= 520000.0) tmp = Float64(Float64(Float64(log1p(x) + Float64(Float64(Float64(0.5 * Float64((log1p(x) ^ 2.0) - (log(x) ^ 2.0))) + Float64(Float64(0.16666666666666666 * Float64((log1p(x) ^ 3.0) - (log(x) ^ 3.0))) / n)) / n)) - log(x)) / n); else tmp = Float64(cbrt((x ^ Float64(3.0 / n))) / Float64(x * n)); end return tmp end
code[x_, n_] := If[LessEqual[x, 520000.0], N[(N[(N[(N[Log[1 + x], $MachinePrecision] + N[(N[(N[(0.5 * N[(N[Power[N[Log[1 + x], $MachinePrecision], 2.0], $MachinePrecision] - N[Power[N[Log[x], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(0.16666666666666666 * N[(N[Power[N[Log[1 + x], $MachinePrecision], 3.0], $MachinePrecision] - N[Power[N[Log[x], $MachinePrecision], 3.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / n), $MachinePrecision]), $MachinePrecision] / n), $MachinePrecision]), $MachinePrecision] - N[Log[x], $MachinePrecision]), $MachinePrecision] / n), $MachinePrecision], N[(N[Power[N[Power[x, N[(3.0 / n), $MachinePrecision]], $MachinePrecision], 1/3], $MachinePrecision] / N[(x * n), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq 520000:\\
\;\;\;\;\frac{\left(\mathsf{log1p}\left(x\right) + \frac{0.5 \cdot \left({\left(\mathsf{log1p}\left(x\right)\right)}^{2} - {\log x}^{2}\right) + \frac{0.16666666666666666 \cdot \left({\left(\mathsf{log1p}\left(x\right)\right)}^{3} - {\log x}^{3}\right)}{n}}{n}\right) - \log x}{n}\\
\mathbf{else}:\\
\;\;\;\;\frac{\sqrt[3]{{x}^{\left(\frac{3}{n}\right)}}}{x \cdot n}\\
\end{array}
\end{array}
if x < 5.2e5Initial program 35.7%
Taylor expanded in n around -inf 82.1%
Simplified82.1%
if 5.2e5 < x Initial program 66.2%
Taylor expanded in x around inf 98.8%
mul-1-neg98.8%
log-rec98.8%
mul-1-neg98.8%
distribute-neg-frac98.8%
mul-1-neg98.8%
remove-double-neg98.8%
*-commutative98.8%
Simplified98.8%
div-inv98.7%
pow-to-exp98.7%
add-cbrt-cube98.7%
pow1/398.7%
pow398.7%
pow-pow98.8%
Applied egg-rr98.8%
unpow1/398.8%
associate-*l/98.8%
metadata-eval98.8%
Simplified98.8%
Final simplification89.2%
(FPCore (x n)
:precision binary64
(if (<= x 2.3e-14)
(/
(-
(/
(+
(* -0.16666666666666666 (/ (pow (log x) 3.0) n))
(* (pow (log x) 2.0) -0.5))
n)
(log x))
n)
(if (<= x 1850000.0)
(/ (- (log1p x) (* 2.0 (log (sqrt x)))) n)
(/ (cbrt (pow x (/ 3.0 n))) (* x n)))))
double code(double x, double n) {
double tmp;
if (x <= 2.3e-14) {
tmp = ((((-0.16666666666666666 * (pow(log(x), 3.0) / n)) + (pow(log(x), 2.0) * -0.5)) / n) - log(x)) / n;
} else if (x <= 1850000.0) {
tmp = (log1p(x) - (2.0 * log(sqrt(x)))) / n;
} else {
tmp = cbrt(pow(x, (3.0 / n))) / (x * n);
}
return tmp;
}
public static double code(double x, double n) {
double tmp;
if (x <= 2.3e-14) {
tmp = ((((-0.16666666666666666 * (Math.pow(Math.log(x), 3.0) / n)) + (Math.pow(Math.log(x), 2.0) * -0.5)) / n) - Math.log(x)) / n;
} else if (x <= 1850000.0) {
tmp = (Math.log1p(x) - (2.0 * Math.log(Math.sqrt(x)))) / n;
} else {
tmp = Math.cbrt(Math.pow(x, (3.0 / n))) / (x * n);
}
return tmp;
}
function code(x, n) tmp = 0.0 if (x <= 2.3e-14) tmp = Float64(Float64(Float64(Float64(Float64(-0.16666666666666666 * Float64((log(x) ^ 3.0) / n)) + Float64((log(x) ^ 2.0) * -0.5)) / n) - log(x)) / n); elseif (x <= 1850000.0) tmp = Float64(Float64(log1p(x) - Float64(2.0 * log(sqrt(x)))) / n); else tmp = Float64(cbrt((x ^ Float64(3.0 / n))) / Float64(x * n)); end return tmp end
code[x_, n_] := If[LessEqual[x, 2.3e-14], N[(N[(N[(N[(N[(-0.16666666666666666 * N[(N[Power[N[Log[x], $MachinePrecision], 3.0], $MachinePrecision] / n), $MachinePrecision]), $MachinePrecision] + N[(N[Power[N[Log[x], $MachinePrecision], 2.0], $MachinePrecision] * -0.5), $MachinePrecision]), $MachinePrecision] / n), $MachinePrecision] - N[Log[x], $MachinePrecision]), $MachinePrecision] / n), $MachinePrecision], If[LessEqual[x, 1850000.0], N[(N[(N[Log[1 + x], $MachinePrecision] - N[(2.0 * N[Log[N[Sqrt[x], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / n), $MachinePrecision], N[(N[Power[N[Power[x, N[(3.0 / n), $MachinePrecision]], $MachinePrecision], 1/3], $MachinePrecision] / N[(x * n), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq 2.3 \cdot 10^{-14}:\\
\;\;\;\;\frac{\frac{-0.16666666666666666 \cdot \frac{{\log x}^{3}}{n} + {\log x}^{2} \cdot -0.5}{n} - \log x}{n}\\
\mathbf{elif}\;x \leq 1850000:\\
\;\;\;\;\frac{\mathsf{log1p}\left(x\right) - 2 \cdot \log \left(\sqrt{x}\right)}{n}\\
\mathbf{else}:\\
\;\;\;\;\frac{\sqrt[3]{{x}^{\left(\frac{3}{n}\right)}}}{x \cdot n}\\
\end{array}
\end{array}
if x < 2.29999999999999998e-14Initial program 38.8%
Taylor expanded in x around 0 38.8%
*-rgt-identity38.8%
associate-/l*38.8%
exp-to-pow38.8%
Simplified38.8%
Taylor expanded in n around -inf 82.4%
mul-1-neg82.4%
Simplified82.4%
if 2.29999999999999998e-14 < x < 1.85e6Initial program 8.8%
Taylor expanded in n around inf 79.6%
log1p-define79.6%
Simplified79.6%
add-sqr-sqrt79.3%
log-prod79.8%
Applied egg-rr79.8%
count-279.8%
Simplified79.8%
if 1.85e6 < x Initial program 66.2%
Taylor expanded in x around inf 98.8%
mul-1-neg98.8%
log-rec98.8%
mul-1-neg98.8%
distribute-neg-frac98.8%
mul-1-neg98.8%
remove-double-neg98.8%
*-commutative98.8%
Simplified98.8%
div-inv98.7%
pow-to-exp98.7%
add-cbrt-cube98.7%
pow1/398.7%
pow398.7%
pow-pow98.8%
Applied egg-rr98.8%
unpow1/398.8%
associate-*l/98.8%
metadata-eval98.8%
Simplified98.8%
Final simplification89.3%
(FPCore (x n) :precision binary64 (if (<= x 0.72) (* x (+ (/ 1.0 n) (/ (log (/ 1.0 x)) (* x n)))) (/ (cbrt (pow x (/ 3.0 n))) (* x n))))
double code(double x, double n) {
double tmp;
if (x <= 0.72) {
tmp = x * ((1.0 / n) + (log((1.0 / x)) / (x * n)));
} else {
tmp = cbrt(pow(x, (3.0 / n))) / (x * n);
}
return tmp;
}
public static double code(double x, double n) {
double tmp;
if (x <= 0.72) {
tmp = x * ((1.0 / n) + (Math.log((1.0 / x)) / (x * n)));
} else {
tmp = Math.cbrt(Math.pow(x, (3.0 / n))) / (x * n);
}
return tmp;
}
function code(x, n) tmp = 0.0 if (x <= 0.72) tmp = Float64(x * Float64(Float64(1.0 / n) + Float64(log(Float64(1.0 / x)) / Float64(x * n)))); else tmp = Float64(cbrt((x ^ Float64(3.0 / n))) / Float64(x * n)); end return tmp end
code[x_, n_] := If[LessEqual[x, 0.72], N[(x * N[(N[(1.0 / n), $MachinePrecision] + N[(N[Log[N[(1.0 / x), $MachinePrecision]], $MachinePrecision] / N[(x * n), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[Power[N[Power[x, N[(3.0 / n), $MachinePrecision]], $MachinePrecision], 1/3], $MachinePrecision] / N[(x * n), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq 0.72:\\
\;\;\;\;x \cdot \left(\frac{1}{n} + \frac{\log \left(\frac{1}{x}\right)}{x \cdot n}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{\sqrt[3]{{x}^{\left(\frac{3}{n}\right)}}}{x \cdot n}\\
\end{array}
\end{array}
if x < 0.71999999999999997Initial program 37.3%
Taylor expanded in n around inf 60.5%
log1p-define60.5%
Simplified60.5%
Taylor expanded in x around 0 59.5%
neg-mul-159.5%
distribute-neg-frac59.5%
log-rec59.5%
+-commutative59.5%
log-rec59.5%
distribute-neg-frac59.5%
unsub-neg59.5%
Simplified59.5%
Taylor expanded in x around inf 75.9%
if 0.71999999999999997 < x Initial program 62.5%
Taylor expanded in x around inf 95.6%
mul-1-neg95.6%
log-rec95.6%
mul-1-neg95.6%
distribute-neg-frac95.6%
mul-1-neg95.6%
remove-double-neg95.6%
*-commutative95.6%
Simplified95.6%
div-inv95.6%
pow-to-exp95.6%
add-cbrt-cube95.6%
pow1/395.6%
pow395.6%
pow-pow95.6%
Applied egg-rr95.6%
unpow1/395.6%
associate-*l/95.7%
metadata-eval95.7%
Simplified95.7%
Final simplification84.9%
(FPCore (x n) :precision binary64 (if (<= x 0.72) (* x (+ (/ 1.0 n) (/ (log (/ 1.0 x)) (* x n)))) (/ (+ 1.0 (+ (pow x (/ 1.0 n)) -1.0)) (* x n))))
double code(double x, double n) {
double tmp;
if (x <= 0.72) {
tmp = x * ((1.0 / n) + (log((1.0 / x)) / (x * n)));
} else {
tmp = (1.0 + (pow(x, (1.0 / n)) + -1.0)) / (x * n);
}
return tmp;
}
real(8) function code(x, n)
real(8), intent (in) :: x
real(8), intent (in) :: n
real(8) :: tmp
if (x <= 0.72d0) then
tmp = x * ((1.0d0 / n) + (log((1.0d0 / x)) / (x * n)))
else
tmp = (1.0d0 + ((x ** (1.0d0 / n)) + (-1.0d0))) / (x * n)
end if
code = tmp
end function
public static double code(double x, double n) {
double tmp;
if (x <= 0.72) {
tmp = x * ((1.0 / n) + (Math.log((1.0 / x)) / (x * n)));
} else {
tmp = (1.0 + (Math.pow(x, (1.0 / n)) + -1.0)) / (x * n);
}
return tmp;
}
def code(x, n): tmp = 0 if x <= 0.72: tmp = x * ((1.0 / n) + (math.log((1.0 / x)) / (x * n))) else: tmp = (1.0 + (math.pow(x, (1.0 / n)) + -1.0)) / (x * n) return tmp
function code(x, n) tmp = 0.0 if (x <= 0.72) tmp = Float64(x * Float64(Float64(1.0 / n) + Float64(log(Float64(1.0 / x)) / Float64(x * n)))); else tmp = Float64(Float64(1.0 + Float64((x ^ Float64(1.0 / n)) + -1.0)) / Float64(x * n)); end return tmp end
function tmp_2 = code(x, n) tmp = 0.0; if (x <= 0.72) tmp = x * ((1.0 / n) + (log((1.0 / x)) / (x * n))); else tmp = (1.0 + ((x ^ (1.0 / n)) + -1.0)) / (x * n); end tmp_2 = tmp; end
code[x_, n_] := If[LessEqual[x, 0.72], N[(x * N[(N[(1.0 / n), $MachinePrecision] + N[(N[Log[N[(1.0 / x), $MachinePrecision]], $MachinePrecision] / N[(x * n), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 + N[(N[Power[x, N[(1.0 / n), $MachinePrecision]], $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision] / N[(x * n), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq 0.72:\\
\;\;\;\;x \cdot \left(\frac{1}{n} + \frac{\log \left(\frac{1}{x}\right)}{x \cdot n}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{1 + \left({x}^{\left(\frac{1}{n}\right)} + -1\right)}{x \cdot n}\\
\end{array}
\end{array}
if x < 0.71999999999999997Initial program 37.3%
Taylor expanded in n around inf 60.5%
log1p-define60.5%
Simplified60.5%
Taylor expanded in x around 0 59.5%
neg-mul-159.5%
distribute-neg-frac59.5%
log-rec59.5%
+-commutative59.5%
log-rec59.5%
distribute-neg-frac59.5%
unsub-neg59.5%
Simplified59.5%
Taylor expanded in x around inf 75.9%
if 0.71999999999999997 < x Initial program 62.5%
Taylor expanded in x around inf 95.6%
mul-1-neg95.6%
log-rec95.6%
mul-1-neg95.6%
distribute-neg-frac95.6%
mul-1-neg95.6%
remove-double-neg95.6%
*-commutative95.6%
Simplified95.6%
div-inv95.6%
pow-to-exp95.6%
expm1-log1p-u95.7%
expm1-undefine95.6%
log1p-undefine95.6%
add-exp-log95.6%
Applied egg-rr95.6%
associate--l+95.6%
Simplified95.6%
Final simplification84.9%
(FPCore (x n) :precision binary64 (if (<= x 0.72) (/ (- (* x (+ 1.0 (* x -0.5))) (log x)) n) (/ (+ 1.0 (+ (pow x (/ 1.0 n)) -1.0)) (* x n))))
double code(double x, double n) {
double tmp;
if (x <= 0.72) {
tmp = ((x * (1.0 + (x * -0.5))) - log(x)) / n;
} else {
tmp = (1.0 + (pow(x, (1.0 / n)) + -1.0)) / (x * n);
}
return tmp;
}
real(8) function code(x, n)
real(8), intent (in) :: x
real(8), intent (in) :: n
real(8) :: tmp
if (x <= 0.72d0) then
tmp = ((x * (1.0d0 + (x * (-0.5d0)))) - log(x)) / n
else
tmp = (1.0d0 + ((x ** (1.0d0 / n)) + (-1.0d0))) / (x * n)
end if
code = tmp
end function
public static double code(double x, double n) {
double tmp;
if (x <= 0.72) {
tmp = ((x * (1.0 + (x * -0.5))) - Math.log(x)) / n;
} else {
tmp = (1.0 + (Math.pow(x, (1.0 / n)) + -1.0)) / (x * n);
}
return tmp;
}
def code(x, n): tmp = 0 if x <= 0.72: tmp = ((x * (1.0 + (x * -0.5))) - math.log(x)) / n else: tmp = (1.0 + (math.pow(x, (1.0 / n)) + -1.0)) / (x * n) return tmp
function code(x, n) tmp = 0.0 if (x <= 0.72) tmp = Float64(Float64(Float64(x * Float64(1.0 + Float64(x * -0.5))) - log(x)) / n); else tmp = Float64(Float64(1.0 + Float64((x ^ Float64(1.0 / n)) + -1.0)) / Float64(x * n)); end return tmp end
function tmp_2 = code(x, n) tmp = 0.0; if (x <= 0.72) tmp = ((x * (1.0 + (x * -0.5))) - log(x)) / n; else tmp = (1.0 + ((x ^ (1.0 / n)) + -1.0)) / (x * n); end tmp_2 = tmp; end
code[x_, n_] := If[LessEqual[x, 0.72], N[(N[(N[(x * N[(1.0 + N[(x * -0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[Log[x], $MachinePrecision]), $MachinePrecision] / n), $MachinePrecision], N[(N[(1.0 + N[(N[Power[x, N[(1.0 / n), $MachinePrecision]], $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision] / N[(x * n), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq 0.72:\\
\;\;\;\;\frac{x \cdot \left(1 + x \cdot -0.5\right) - \log x}{n}\\
\mathbf{else}:\\
\;\;\;\;\frac{1 + \left({x}^{\left(\frac{1}{n}\right)} + -1\right)}{x \cdot n}\\
\end{array}
\end{array}
if x < 0.71999999999999997Initial program 37.3%
Taylor expanded in n around inf 60.5%
log1p-define60.5%
Simplified60.5%
Taylor expanded in x around 0 59.7%
*-commutative59.7%
Simplified59.7%
if 0.71999999999999997 < x Initial program 62.5%
Taylor expanded in x around inf 95.6%
mul-1-neg95.6%
log-rec95.6%
mul-1-neg95.6%
distribute-neg-frac95.6%
mul-1-neg95.6%
remove-double-neg95.6%
*-commutative95.6%
Simplified95.6%
div-inv95.6%
pow-to-exp95.6%
expm1-log1p-u95.7%
expm1-undefine95.6%
log1p-undefine95.6%
add-exp-log95.6%
Applied egg-rr95.6%
associate--l+95.6%
Simplified95.6%
Final simplification76.1%
(FPCore (x n) :precision binary64 (if (<= x 0.72) (/ (- (* x (+ 1.0 (* x -0.5))) (log x)) n) (/ 1.0 (* x (/ n (pow x (/ 1.0 n)))))))
double code(double x, double n) {
double tmp;
if (x <= 0.72) {
tmp = ((x * (1.0 + (x * -0.5))) - log(x)) / n;
} else {
tmp = 1.0 / (x * (n / pow(x, (1.0 / n))));
}
return tmp;
}
real(8) function code(x, n)
real(8), intent (in) :: x
real(8), intent (in) :: n
real(8) :: tmp
if (x <= 0.72d0) then
tmp = ((x * (1.0d0 + (x * (-0.5d0)))) - log(x)) / n
else
tmp = 1.0d0 / (x * (n / (x ** (1.0d0 / n))))
end if
code = tmp
end function
public static double code(double x, double n) {
double tmp;
if (x <= 0.72) {
tmp = ((x * (1.0 + (x * -0.5))) - Math.log(x)) / n;
} else {
tmp = 1.0 / (x * (n / Math.pow(x, (1.0 / n))));
}
return tmp;
}
def code(x, n): tmp = 0 if x <= 0.72: tmp = ((x * (1.0 + (x * -0.5))) - math.log(x)) / n else: tmp = 1.0 / (x * (n / math.pow(x, (1.0 / n)))) return tmp
function code(x, n) tmp = 0.0 if (x <= 0.72) tmp = Float64(Float64(Float64(x * Float64(1.0 + Float64(x * -0.5))) - log(x)) / n); else tmp = Float64(1.0 / Float64(x * Float64(n / (x ^ Float64(1.0 / n))))); end return tmp end
function tmp_2 = code(x, n) tmp = 0.0; if (x <= 0.72) tmp = ((x * (1.0 + (x * -0.5))) - log(x)) / n; else tmp = 1.0 / (x * (n / (x ^ (1.0 / n)))); end tmp_2 = tmp; end
code[x_, n_] := If[LessEqual[x, 0.72], N[(N[(N[(x * N[(1.0 + N[(x * -0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[Log[x], $MachinePrecision]), $MachinePrecision] / n), $MachinePrecision], N[(1.0 / N[(x * N[(n / N[Power[x, N[(1.0 / n), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq 0.72:\\
\;\;\;\;\frac{x \cdot \left(1 + x \cdot -0.5\right) - \log x}{n}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{x \cdot \frac{n}{{x}^{\left(\frac{1}{n}\right)}}}\\
\end{array}
\end{array}
if x < 0.71999999999999997Initial program 37.3%
Taylor expanded in n around inf 60.5%
log1p-define60.5%
Simplified60.5%
Taylor expanded in x around 0 59.7%
*-commutative59.7%
Simplified59.7%
if 0.71999999999999997 < x Initial program 62.5%
Taylor expanded in x around inf 95.6%
mul-1-neg95.6%
log-rec95.6%
mul-1-neg95.6%
distribute-neg-frac95.6%
mul-1-neg95.6%
remove-double-neg95.6%
*-commutative95.6%
Simplified95.6%
clear-num95.6%
inv-pow95.6%
div-inv95.6%
pow-to-exp95.6%
Applied egg-rr95.6%
unpow-195.6%
associate-/l*95.6%
Simplified95.6%
(FPCore (x n) :precision binary64 (if (<= x 0.72) (/ (- x (log x)) n) (/ 1.0 (* x (/ n (pow x (/ 1.0 n)))))))
double code(double x, double n) {
double tmp;
if (x <= 0.72) {
tmp = (x - log(x)) / n;
} else {
tmp = 1.0 / (x * (n / pow(x, (1.0 / n))));
}
return tmp;
}
real(8) function code(x, n)
real(8), intent (in) :: x
real(8), intent (in) :: n
real(8) :: tmp
if (x <= 0.72d0) then
tmp = (x - log(x)) / n
else
tmp = 1.0d0 / (x * (n / (x ** (1.0d0 / n))))
end if
code = tmp
end function
public static double code(double x, double n) {
double tmp;
if (x <= 0.72) {
tmp = (x - Math.log(x)) / n;
} else {
tmp = 1.0 / (x * (n / Math.pow(x, (1.0 / n))));
}
return tmp;
}
def code(x, n): tmp = 0 if x <= 0.72: tmp = (x - math.log(x)) / n else: tmp = 1.0 / (x * (n / math.pow(x, (1.0 / n)))) return tmp
function code(x, n) tmp = 0.0 if (x <= 0.72) tmp = Float64(Float64(x - log(x)) / n); else tmp = Float64(1.0 / Float64(x * Float64(n / (x ^ Float64(1.0 / n))))); end return tmp end
function tmp_2 = code(x, n) tmp = 0.0; if (x <= 0.72) tmp = (x - log(x)) / n; else tmp = 1.0 / (x * (n / (x ^ (1.0 / n)))); end tmp_2 = tmp; end
code[x_, n_] := If[LessEqual[x, 0.72], N[(N[(x - N[Log[x], $MachinePrecision]), $MachinePrecision] / n), $MachinePrecision], N[(1.0 / N[(x * N[(n / N[Power[x, N[(1.0 / n), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq 0.72:\\
\;\;\;\;\frac{x - \log x}{n}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{x \cdot \frac{n}{{x}^{\left(\frac{1}{n}\right)}}}\\
\end{array}
\end{array}
if x < 0.71999999999999997Initial program 37.3%
Taylor expanded in n around inf 60.5%
log1p-define60.5%
Simplified60.5%
Taylor expanded in x around 0 59.5%
if 0.71999999999999997 < x Initial program 62.5%
Taylor expanded in x around inf 95.6%
mul-1-neg95.6%
log-rec95.6%
mul-1-neg95.6%
distribute-neg-frac95.6%
mul-1-neg95.6%
remove-double-neg95.6%
*-commutative95.6%
Simplified95.6%
clear-num95.6%
inv-pow95.6%
div-inv95.6%
pow-to-exp95.6%
Applied egg-rr95.6%
unpow-195.6%
associate-/l*95.6%
Simplified95.6%
(FPCore (x n) :precision binary64 (if (<= x 0.72) (/ (- x (log x)) n) (/ (pow x (/ 1.0 n)) (* x n))))
double code(double x, double n) {
double tmp;
if (x <= 0.72) {
tmp = (x - log(x)) / n;
} else {
tmp = pow(x, (1.0 / n)) / (x * n);
}
return tmp;
}
real(8) function code(x, n)
real(8), intent (in) :: x
real(8), intent (in) :: n
real(8) :: tmp
if (x <= 0.72d0) then
tmp = (x - log(x)) / n
else
tmp = (x ** (1.0d0 / n)) / (x * n)
end if
code = tmp
end function
public static double code(double x, double n) {
double tmp;
if (x <= 0.72) {
tmp = (x - Math.log(x)) / n;
} else {
tmp = Math.pow(x, (1.0 / n)) / (x * n);
}
return tmp;
}
def code(x, n): tmp = 0 if x <= 0.72: tmp = (x - math.log(x)) / n else: tmp = math.pow(x, (1.0 / n)) / (x * n) return tmp
function code(x, n) tmp = 0.0 if (x <= 0.72) tmp = Float64(Float64(x - log(x)) / n); else tmp = Float64((x ^ Float64(1.0 / n)) / Float64(x * n)); end return tmp end
function tmp_2 = code(x, n) tmp = 0.0; if (x <= 0.72) tmp = (x - log(x)) / n; else tmp = (x ^ (1.0 / n)) / (x * n); end tmp_2 = tmp; end
code[x_, n_] := If[LessEqual[x, 0.72], N[(N[(x - N[Log[x], $MachinePrecision]), $MachinePrecision] / n), $MachinePrecision], N[(N[Power[x, N[(1.0 / n), $MachinePrecision]], $MachinePrecision] / N[(x * n), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq 0.72:\\
\;\;\;\;\frac{x - \log x}{n}\\
\mathbf{else}:\\
\;\;\;\;\frac{{x}^{\left(\frac{1}{n}\right)}}{x \cdot n}\\
\end{array}
\end{array}
if x < 0.71999999999999997Initial program 37.3%
Taylor expanded in n around inf 60.5%
log1p-define60.5%
Simplified60.5%
Taylor expanded in x around 0 59.5%
if 0.71999999999999997 < x Initial program 62.5%
Taylor expanded in x around inf 95.6%
mul-1-neg95.6%
log-rec95.6%
distribute-frac-neg95.6%
remove-double-neg95.6%
*-rgt-identity95.6%
associate-/l*95.6%
exp-to-pow95.6%
*-commutative95.6%
Simplified95.6%
(FPCore (x n)
:precision binary64
(if (<= x 0.9)
(/ (- x (log x)) n)
(/
(/
(+ 1.0 (/ (- (/ (+ 0.3333333333333333 (* 0.25 (/ -1.0 x))) x) 0.5) x))
x)
n)))
double code(double x, double n) {
double tmp;
if (x <= 0.9) {
tmp = (x - log(x)) / n;
} else {
tmp = ((1.0 + ((((0.3333333333333333 + (0.25 * (-1.0 / x))) / x) - 0.5) / x)) / x) / n;
}
return tmp;
}
real(8) function code(x, n)
real(8), intent (in) :: x
real(8), intent (in) :: n
real(8) :: tmp
if (x <= 0.9d0) then
tmp = (x - log(x)) / n
else
tmp = ((1.0d0 + ((((0.3333333333333333d0 + (0.25d0 * ((-1.0d0) / x))) / x) - 0.5d0) / x)) / x) / n
end if
code = tmp
end function
public static double code(double x, double n) {
double tmp;
if (x <= 0.9) {
tmp = (x - Math.log(x)) / n;
} else {
tmp = ((1.0 + ((((0.3333333333333333 + (0.25 * (-1.0 / x))) / x) - 0.5) / x)) / x) / n;
}
return tmp;
}
def code(x, n): tmp = 0 if x <= 0.9: tmp = (x - math.log(x)) / n else: tmp = ((1.0 + ((((0.3333333333333333 + (0.25 * (-1.0 / x))) / x) - 0.5) / x)) / x) / n return tmp
function code(x, n) tmp = 0.0 if (x <= 0.9) tmp = Float64(Float64(x - log(x)) / n); else tmp = Float64(Float64(Float64(1.0 + Float64(Float64(Float64(Float64(0.3333333333333333 + Float64(0.25 * Float64(-1.0 / x))) / x) - 0.5) / x)) / x) / n); end return tmp end
function tmp_2 = code(x, n) tmp = 0.0; if (x <= 0.9) tmp = (x - log(x)) / n; else tmp = ((1.0 + ((((0.3333333333333333 + (0.25 * (-1.0 / x))) / x) - 0.5) / x)) / x) / n; end tmp_2 = tmp; end
code[x_, n_] := If[LessEqual[x, 0.9], N[(N[(x - N[Log[x], $MachinePrecision]), $MachinePrecision] / n), $MachinePrecision], N[(N[(N[(1.0 + N[(N[(N[(N[(0.3333333333333333 + N[(0.25 * N[(-1.0 / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision] - 0.5), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision] / n), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq 0.9:\\
\;\;\;\;\frac{x - \log x}{n}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{1 + \frac{\frac{0.3333333333333333 + 0.25 \cdot \frac{-1}{x}}{x} - 0.5}{x}}{x}}{n}\\
\end{array}
\end{array}
if x < 0.900000000000000022Initial program 37.3%
Taylor expanded in n around inf 60.5%
log1p-define60.5%
Simplified60.5%
Taylor expanded in x around 0 59.5%
if 0.900000000000000022 < x Initial program 62.5%
Taylor expanded in n around inf 67.1%
log1p-define67.1%
Simplified67.1%
Taylor expanded in x around -inf 74.9%
Final simplification66.6%
(FPCore (x n)
:precision binary64
(if (<= x 0.7)
(/ (log x) (- n))
(/
(/
(+ 1.0 (/ (- (/ (+ 0.3333333333333333 (* 0.25 (/ -1.0 x))) x) 0.5) x))
x)
n)))
double code(double x, double n) {
double tmp;
if (x <= 0.7) {
tmp = log(x) / -n;
} else {
tmp = ((1.0 + ((((0.3333333333333333 + (0.25 * (-1.0 / x))) / x) - 0.5) / x)) / x) / n;
}
return tmp;
}
real(8) function code(x, n)
real(8), intent (in) :: x
real(8), intent (in) :: n
real(8) :: tmp
if (x <= 0.7d0) then
tmp = log(x) / -n
else
tmp = ((1.0d0 + ((((0.3333333333333333d0 + (0.25d0 * ((-1.0d0) / x))) / x) - 0.5d0) / x)) / x) / n
end if
code = tmp
end function
public static double code(double x, double n) {
double tmp;
if (x <= 0.7) {
tmp = Math.log(x) / -n;
} else {
tmp = ((1.0 + ((((0.3333333333333333 + (0.25 * (-1.0 / x))) / x) - 0.5) / x)) / x) / n;
}
return tmp;
}
def code(x, n): tmp = 0 if x <= 0.7: tmp = math.log(x) / -n else: tmp = ((1.0 + ((((0.3333333333333333 + (0.25 * (-1.0 / x))) / x) - 0.5) / x)) / x) / n return tmp
function code(x, n) tmp = 0.0 if (x <= 0.7) tmp = Float64(log(x) / Float64(-n)); else tmp = Float64(Float64(Float64(1.0 + Float64(Float64(Float64(Float64(0.3333333333333333 + Float64(0.25 * Float64(-1.0 / x))) / x) - 0.5) / x)) / x) / n); end return tmp end
function tmp_2 = code(x, n) tmp = 0.0; if (x <= 0.7) tmp = log(x) / -n; else tmp = ((1.0 + ((((0.3333333333333333 + (0.25 * (-1.0 / x))) / x) - 0.5) / x)) / x) / n; end tmp_2 = tmp; end
code[x_, n_] := If[LessEqual[x, 0.7], N[(N[Log[x], $MachinePrecision] / (-n)), $MachinePrecision], N[(N[(N[(1.0 + N[(N[(N[(N[(0.3333333333333333 + N[(0.25 * N[(-1.0 / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision] - 0.5), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision] / n), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq 0.7:\\
\;\;\;\;\frac{\log x}{-n}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{1 + \frac{\frac{0.3333333333333333 + 0.25 \cdot \frac{-1}{x}}{x} - 0.5}{x}}{x}}{n}\\
\end{array}
\end{array}
if x < 0.69999999999999996Initial program 37.6%
Taylor expanded in x around 0 37.4%
*-rgt-identity37.4%
associate-/l*37.4%
exp-to-pow37.4%
Simplified37.4%
Taylor expanded in n around inf 58.7%
associate-*r/58.7%
neg-mul-158.7%
Simplified58.7%
if 0.69999999999999996 < x Initial program 62.0%
Taylor expanded in n around inf 67.4%
log1p-define67.4%
Simplified67.4%
Taylor expanded in x around -inf 74.4%
Final simplification66.0%
(FPCore (x n) :precision binary64 (/ (+ (/ 1.0 n) (/ (- (/ 0.3333333333333333 (* x n)) (/ 0.5 n)) x)) x))
double code(double x, double n) {
return ((1.0 / n) + (((0.3333333333333333 / (x * n)) - (0.5 / n)) / x)) / x;
}
real(8) function code(x, n)
real(8), intent (in) :: x
real(8), intent (in) :: n
code = ((1.0d0 / n) + (((0.3333333333333333d0 / (x * n)) - (0.5d0 / n)) / x)) / x
end function
public static double code(double x, double n) {
return ((1.0 / n) + (((0.3333333333333333 / (x * n)) - (0.5 / n)) / x)) / x;
}
def code(x, n): return ((1.0 / n) + (((0.3333333333333333 / (x * n)) - (0.5 / n)) / x)) / x
function code(x, n) return Float64(Float64(Float64(1.0 / n) + Float64(Float64(Float64(0.3333333333333333 / Float64(x * n)) - Float64(0.5 / n)) / x)) / x) end
function tmp = code(x, n) tmp = ((1.0 / n) + (((0.3333333333333333 / (x * n)) - (0.5 / n)) / x)) / x; end
code[x_, n_] := N[(N[(N[(1.0 / n), $MachinePrecision] + N[(N[(N[(0.3333333333333333 / N[(x * n), $MachinePrecision]), $MachinePrecision] - N[(0.5 / n), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision]
\begin{array}{l}
\\
\frac{\frac{1}{n} + \frac{\frac{0.3333333333333333}{x \cdot n} - \frac{0.5}{n}}{x}}{x}
\end{array}
Initial program 48.8%
Taylor expanded in n around inf 63.5%
log1p-define63.5%
Simplified63.5%
Taylor expanded in x around -inf 50.1%
mul-1-neg50.1%
mul-1-neg50.1%
associate-*r/50.1%
metadata-eval50.1%
*-commutative50.1%
associate-*r/50.1%
metadata-eval50.1%
Simplified50.1%
Final simplification50.1%
(FPCore (x n) :precision binary64 (/ (/ 1.0 x) n))
double code(double x, double n) {
return (1.0 / x) / n;
}
real(8) function code(x, n)
real(8), intent (in) :: x
real(8), intent (in) :: n
code = (1.0d0 / x) / n
end function
public static double code(double x, double n) {
return (1.0 / x) / n;
}
def code(x, n): return (1.0 / x) / n
function code(x, n) return Float64(Float64(1.0 / x) / n) end
function tmp = code(x, n) tmp = (1.0 / x) / n; end
code[x_, n_] := N[(N[(1.0 / x), $MachinePrecision] / n), $MachinePrecision]
\begin{array}{l}
\\
\frac{\frac{1}{x}}{n}
\end{array}
Initial program 48.8%
Taylor expanded in x around inf 58.2%
mul-1-neg58.2%
log-rec58.2%
mul-1-neg58.2%
distribute-neg-frac58.2%
mul-1-neg58.2%
remove-double-neg58.2%
*-commutative58.2%
Simplified58.2%
Taylor expanded in n around inf 45.9%
*-commutative45.9%
associate-/r*46.1%
Simplified46.1%
(FPCore (x n) :precision binary64 (/ 1.0 (* x n)))
double code(double x, double n) {
return 1.0 / (x * n);
}
real(8) function code(x, n)
real(8), intent (in) :: x
real(8), intent (in) :: n
code = 1.0d0 / (x * n)
end function
public static double code(double x, double n) {
return 1.0 / (x * n);
}
def code(x, n): return 1.0 / (x * n)
function code(x, n) return Float64(1.0 / Float64(x * n)) end
function tmp = code(x, n) tmp = 1.0 / (x * n); end
code[x_, n_] := N[(1.0 / N[(x * n), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{1}{x \cdot n}
\end{array}
Initial program 48.8%
Taylor expanded in x around inf 58.2%
mul-1-neg58.2%
log-rec58.2%
mul-1-neg58.2%
distribute-neg-frac58.2%
mul-1-neg58.2%
remove-double-neg58.2%
*-commutative58.2%
Simplified58.2%
Taylor expanded in n around inf 45.9%
(FPCore (x n) :precision binary64 (/ x n))
double code(double x, double n) {
return x / n;
}
real(8) function code(x, n)
real(8), intent (in) :: x
real(8), intent (in) :: n
code = x / n
end function
public static double code(double x, double n) {
return x / n;
}
def code(x, n): return x / n
function code(x, n) return Float64(x / n) end
function tmp = code(x, n) tmp = x / n; end
code[x_, n_] := N[(x / n), $MachinePrecision]
\begin{array}{l}
\\
\frac{x}{n}
\end{array}
Initial program 48.8%
Taylor expanded in x around inf 58.2%
mul-1-neg58.2%
log-rec58.2%
mul-1-neg58.2%
distribute-neg-frac58.2%
mul-1-neg58.2%
remove-double-neg58.2%
*-commutative58.2%
Simplified58.2%
Taylor expanded in n around inf 45.9%
associate-/r*46.1%
div-inv46.1%
add-exp-log45.3%
add-sqr-sqrt13.1%
sqrt-unprod14.9%
log-rec14.9%
log-rec14.9%
sqr-neg14.9%
sqrt-unprod1.9%
add-sqr-sqrt5.1%
add-exp-log5.1%
Applied egg-rr5.1%
associate-*r/5.1%
*-rgt-identity5.1%
Simplified5.1%
herbie shell --seed 2024132
(FPCore (x n)
:name "2nthrt (problem 3.4.6)"
:precision binary64
(- (pow (+ x 1.0) (/ 1.0 n)) (pow x (/ 1.0 n))))