I would like to use all bits to represent fractions. For signed types this seems to work: a fpm::fixed<int8_t, int16_t, 7> gives a range of [-1, 0.992188].
This doesn't work for unsigned types however. fpm::fixed<uint8_t, uint16_t, 7> gives a range of [0, 1.99219]. A fpm::fixed<uint8_t, uint16_t, 8> would give the expected result, but this type is blocked by a static_assert.
I would like to use all bits to represent fractions. For signed types this seems to work: a fpm::fixed<int8_t, int16_t, 7> gives a range of [-1, 0.992188].
This doesn't work for unsigned types however. fpm::fixed<uint8_t, uint16_t, 7> gives a range of [0, 1.99219]. A fpm::fixed<uint8_t, uint16_t, 8> would give the expected result, but this type is blocked by a static_assert.