|
Boost : |
Subject: Re: [boost] [boostcon][proto] Suggestion for LIAW session: fixed-pointnumbers
From: Joel Falcou (joel.falcou_at_[hidden])
Date: 2011-03-16 02:17:13
On 16/03/11 05:10, Gruenke, Matt wrote:
>
> I'm not sure we're talking about the same thing, here. The template parameters of the results returned by my operators were determined by those of the operands. For instance, 8.16 + 8.8 would return a 9.16. If the result is then stored into a 16.8, then a right-shift of 8 bits is performed as part of the assignment. In the case of 0.16 * 8.8, the result is 8.24.
>
> So, the only thing you have to think about is whether you need to force a conversion in the middle of an complex expression to avoid running out of range. But that can easily be managed by breaking up complex expressions into smaller, simpler ones.
>
I think the idea was to use proto to actually look at the whoel
expression as a whole and figure out the needed bit storage directly
then work within it
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk