Skip to main content

I would just expand the exponents into the Taylor series with 100 terms or so and update the sums of powers, which have trivial cumulative dynamics. The programming issue is that summing $x_i^100$$x_i^{100}$ directly even in the float point arithmetic is not very nice, so I would just keep the polynomial in the form $\sum_{k=0}^100 \frac{(a_k/T)^k}$$\sum_{k=0}^{100} (a_k/T)^k$ and update $a_k$ as $$ a_k'=(a_k^k+x_n^{k+1}/k!)^{1/k}=M\cdot(1+q^k)^{1/k} $$ where $M=\max(a_k,y_n)$, $q=\min(a_k,y_n)/\max(a_k,y_n)$, $y_n=(x_n)^{1+1/k}/v_k$ and $v_k=(k!)^{1/k}=exp(-\frac 1k\sum_{j=2}^k\log j)$. This way you should be able to get away with double precision arithmetic in all but most extreme cases and still have reasonable accuracy in the final answer.

Solving a polynomial (in $1/T$) equation of this form should not be a problem.

I would just expand the exponents into the Taylor series with 100 terms or so and update the sums of powers, which have trivial cumulative dynamics. The programming issue is that summing $x_i^100$ directly even in the float point arithmetic is not very nice, so I would just keep the polynomial in the form $\sum_{k=0}^100 \frac{(a_k/T)^k}$ and update $a_k$ as $$ a_k'=(a_k^k+x_n^{k+1}/k!)^{1/k}=M\cdot(1+q^k)^{1/k} $$ where $M=\max(a_k,y_n)$, $q=\min(a_k,y_n)/\max(a_k,y_n)$, $y_n=(x_n)^{1+1/k}/v_k$ and $v_k=(k!)^{1/k}=exp(-\frac 1k\sum_{j=2}^k\log j)$. This way you should be able to get away with double precision arithmetic in all but most extreme cases and still have reasonable accuracy in the final answer.

Solving a polynomial (in $1/T$) equation of this form should not be a problem.

I would just expand the exponents into the Taylor series with 100 terms or so and update the sums of powers, which have trivial cumulative dynamics. The programming issue is that summing $x_i^{100}$ directly even in the float point arithmetic is not very nice, so I would just keep the polynomial in the form $\sum_{k=0}^{100} (a_k/T)^k$ and update $a_k$ as $$ a_k'=(a_k^k+x_n^{k+1}/k!)^{1/k}=M\cdot(1+q^k)^{1/k} $$ where $M=\max(a_k,y_n)$, $q=\min(a_k,y_n)/\max(a_k,y_n)$, $y_n=(x_n)^{1+1/k}/v_k$ and $v_k=(k!)^{1/k}=exp(-\frac 1k\sum_{j=2}^k\log j)$. This way you should be able to get away with double precision arithmetic in all but most extreme cases and still have reasonable accuracy in the final answer.

Solving a polynomial (in $1/T$) equation of this form should not be a problem.

Source Link
fedja
  • 61.9k
  • 11
  • 160
  • 302

I would just expand the exponents into the Taylor series with 100 terms or so and update the sums of powers, which have trivial cumulative dynamics. The programming issue is that summing $x_i^100$ directly even in the float point arithmetic is not very nice, so I would just keep the polynomial in the form $\sum_{k=0}^100 \frac{(a_k/T)^k}$ and update $a_k$ as $$ a_k'=(a_k^k+x_n^{k+1}/k!)^{1/k}=M\cdot(1+q^k)^{1/k} $$ where $M=\max(a_k,y_n)$, $q=\min(a_k,y_n)/\max(a_k,y_n)$, $y_n=(x_n)^{1+1/k}/v_k$ and $v_k=(k!)^{1/k}=exp(-\frac 1k\sum_{j=2}^k\log j)$. This way you should be able to get away with double precision arithmetic in all but most extreme cases and still have reasonable accuracy in the final answer.

Solving a polynomial (in $1/T$) equation of this form should not be a problem.