
17 Mar
2011
17 Mar
'11
5:28 a.m.
On Wednesday 16 March 2011 19:24:31 Gruenke, Matt wrote:
In the system you proposed, what are the template parameters for the fixed- point number with the following range?
{ 0, 1, ..., 15 } x 2^{-11}
11 fractional bits.
Or, the fixed-point number holding values in the following range?
{ 0, 1, ..., 15 } x 2^{11}
15 integer bits.
Suboptimal at best, and usually unacceptable because it leads to overflow of the underlying type (int64, for example) much sooner than necessary in complex expressions. The way it is usually avoided is to specify (in your notation) the examples above as -7.11 and 15.-11, which, while consistent, is completely unintuitive and unobvious. Regards, Ravi