What happens when numbers get very small?
14 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
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 commentaires
Réponse acceptée
Iain
le 12 Fév 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 commentaires
Plus de réponses (1)
Andreas Goser
le 12 Fév 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 commentaires
Voir également
Catégories
En savoir plus sur Whos dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!