What happens when numbers get very small?
14 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
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 Commenti
Risposta accettata
Iain
il 12 Feb 2014
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 Commenti
Più risposte (1)
Andreas Goser
il 12 Feb 2014
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 Commenti
Vedere anche
Categorie
Scopri di più su Whos in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!