
2 Aug
2008
2 Aug
'08
6:04 p.m.
On Fri, Aug 1, 2008 at 04:21, Matt Gruenke <mgruenke@intellivid.com> wrote:
The result of x * y is obviously: result_int_bits = x_int_bits + y_int_bits result_frac_bits = x_frac_bits + y_frac_bits
For unsigned, yes, but if int_bits includes the sign bit, it's result_int_bits = x_int_bits + y_int_bits - 1 (And it looked in the code like int_bits did, which does match what boost.integer does, and means you can do fixed_pt<16,16,int32_t>, which I think is more intuitive than that not actually fitting.)