Boost logo

Boost :

From: Marshall Clow (marshall_at_[hidden])
Date: 2001-05-15 13:25:32


At 2:17 PM -0400 5/15/01, Beman Dawes wrote:
>Daniel Frey wrote:
>
> >In finance there is another, sometimes important way of rounding: On a
> >tie, round so that the last digit is even. To illustrate that:
>
>Gabriel Dos Reis wrote:
>
> > I think the ability of choosing rounding mode should not be
> > overlooked. It is an essential part of LIA-1 and later standards.
>
>I'm convinced.
>
>So a question is do you support that by having a whole bunch of different
>functions, or by the class template taking some kind of a parameter
>(perhaps a traits or policy class) performing the rounding desired?

I like the idea of having a policy class for rounding.

The question that I think needs to be answered is:
        Will fixed point numbers that have different rounding rules
need to interoperate?

If not, then a policy class is the way to go.
If so, then we should do something else.

-- 
-- Marshall
Marshall Clow     Idio Software   <mailto:mclow_at_[hidden]>
It is by caffeine alone I set my mind in motion.
It is by the beans of Java that thoughts acquire speed,
the hands acquire shaking, the shaking becomes a warning.
It is by caffeine alone I set my mind in motion.

Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk