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.

采纳的回答

Titus Edelhofer
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 个)

类别

Help CenterFile Exchange 中查找有关 Logical 的更多信息

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by