Info

이 질문은 마감되었습니다. 편집하거나 답변을 올리려면 질문을 다시 여십시오.

How can I increase the precision if I have around 45,000.

조회 수: 1 (최근 30일)
Arnav Mohan
Arnav Mohan 2013년 7월 9일
마감: MATLAB Answer Bot 2021년 8월 20일
In an multinomial expansion I have 45,000 terms to add. The result should be less than 1. However due to addition of so many terms the error also gets magnified; and gives random deviations of significant values in the result. Using double() doesn't help either.
  댓글 수: 2
Jan
Jan 2013년 7월 9일
Using "double()" instead of what? Please describe the input data more explicitly.
Arnav Mohan
Arnav Mohan 2013년 7월 19일
I mean instead of calculating F=f(x)+g(x); I use F=double(f(x))+ double(g(x))

답변 (2개)

Jan
Jan 2013년 7월 9일
I'm not sure if I understand the problem correctly: You calculate the summ and suffer from the limited accuracy? This would be one effect of the nature of the sum, which is numerical instable. As workaround you can increase the precision to 128 or 196 bit floating point accumulation using the "Knuth" methods in: FEX: XSum.
  댓글 수: 1
Arnav Mohan
Arnav Mohan 2013년 7월 19일
Yes; that's right, i suffer from a limited accuracy. for so many terms even if I write a multinomial series which should result in 0; I was getting around 10000. whereas for lower number of terms I get the right answer which is 0.
And do you have the matlab code for XSum also?

Arnav Mohan
Arnav Mohan 2013년 7월 19일
Yes; that's right, i suffer from a limited accuracy. for so many terms even if I write a multinomial series which should result in 0; I was getting around 10000. whereas for lower number of terms I get the right answer which is 0.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by