Fixed-point precision, why half?
1 vue (au cours des 30 derniers jours)
Afficher commentaires plus anciens
In reading the Mathworks documentation. I really don't understand why fixed-point fractional precison is half of (1/2^FL) instead of (1/2^FL).
Can anyone please kindly comment on this.
From the fixed-point toolbox documentation
Precision The precision of a fixed-point number is the difference between successive values representable by its data type and scaling, which is equal to the value of its least significant bit. The value of the least significant bit, and therefore the precision of the number, is determined by the number of fractional bits. A fixed-point value can be represented to within half of the precision of its data type and scaling.
For example, a fixed-point representation with four bits to the right of the binary point has a precision of 2^4 or 0.0625, which is the value of its least significant bit. Any number within the range of this data type and scaling can be represented to within (2^4)/2 or 0.03125, which is half the precision. This is an example of representing a number with finite precision.
0 commentaires
Réponse acceptée
Titus Edelhofer
le 3 Août 2012
If you look at the example of 2^4: Let's take the number 1. The number 1 represents all numbers in the interval [1-0.03125, 1+0.03125]. So the difference between two successive numbers is 0.0625, nevertheless the difference between any number and it's closest representative is at most 0.03125.
Titus
0 commentaires
Plus de réponses (0)
Voir également
Catégories
En savoir plus sur Logical 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!