What happens when numbers get very small?
조회 수: 14 (최근 30일)
이전 댓글 표시
Hi
My computation works with very small physical quantities. I have numbers in the order of 10^-14 which will be multiplied with numbers in about the order of 10^3 to 10^-8. Typing "eps" on the console results in something around 10^-16.
Does Matlab automatically adjust precision to handle these extremely small numbers? Do I have to worry about quantization errors when numbers get small? What about performance issues?
(Basically, I could also change the units of physical constants to bigger values, but I'd like to avoid this.)
Best regards, Michael
댓글 수: 0
채택된 답변
Iain
2014년 2월 12일
Matlab simply uses standard double format numbers.
This gives you about 15 significant figures of precision from 10^-300 to 10^300 -ish.
When multiplying "a * b" you're likely to get quantisation errors in the order of: eps(a*b), eps(a) * b or eps(b)*a.
You should worry about these quantisations errors when you add large numbers of small values to bigger values (like the obvious way to numerically integrate).
댓글 수: 0
추가 답변 (1개)
Andreas Goser
2014년 2월 12일
In most applications I am aware of, one simply uses scaling like multiplying each datapoint by 1e12 etc. In my experience very small numbers are not a problem per se - only in situations where there very different order of magnitudes in ONE matrix or there are operation with data with very different order of magnitudes.
댓글 수: 0
참고 항목
카테고리
Help Center 및 File Exchange에서 Whos에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!