Fixed-point precision, why half?
1 回表示 (過去 30 日間)
古いコメントを表示
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 件のコメント
採用された回答
Titus Edelhofer
2012 年 8 月 3 日
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 件のコメント
その他の回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Logical についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!