
On 4/23/13 1:59 PM, Dmitriy Gorbel wrote:
Michael Marcin-3 wrote
Still this representation makes sense because it specifies both parameters in terms 2^x. It also supports something like <17,1> to give a 16 bit type that has the range [-131072, 131071] in increments of 2.
If use notation from C++1y proposal, I plan that value witch set resolution always be negative, and minimal resolution: 2^-1 = 1/2 I don't plan to implement something like <17,1>. You think this is really necessary feature?
No but IMO it was the only cool feature that fell out naturally from the interface. Without it I would strongly prefer the fixed< MagnitudeBits, FractionalBits > interface. Which more closely aligns with common fixed-point convention: http://en.wikipedia.org/wiki/Fixed-point_arithmetic#Notation http://en.wikipedia.org/wiki/Q_(number_format) http://en.wikipedia.org/wiki/Binary_scaling