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!