|
Boost : |
Subject: Re: [boost] [Boost.FixedPoint] Choose notation
From: John Maddock (john_at_[hidden])
Date: 2013-04-29 04:03:51
> If you absolutely needed an 8.4 type then you need fixed-width integer
> support beyond that provided by <cstdint>. You could provide an
> implementation of integer<12> that is a 12 bit integer and then make
> fixed<integer<12>,4>. In my opinion this is another library outside the
> scope of a fixed-point library.
Can I just point out that the multiprecision lib will do a 12-bit int type
if that's what you want:
typedef number<cpp_int<12, 12, unsigned_magnitude, unchecked, void> >
my_int12_t;
Of course the signed version is signed-magnitude not 2's complement....
BTW, it may well also be worth investigating using multiprecision::number as
the front end for these types?
Now I'll go back to lurking ;-) John.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk