From: Vadim Egorov (egorovv_at_[hidden])
Date: 2002-03-12 12:25:12
Bill Seymour <bill-at-the-office_at_[hidden]> writes:
> Jeff wrote:
>> I'm asking you to re-examine the basic design decision
>> that associates the rounding mode with the operation
>> instead of the type. While I agree from a theoretical
>> sense that this is correct I don't see the advantage
>> to the user. ... I have worked on applications where
>> the 'type centric' approach would have been useful.
>> I haven't worked on any applications where I would need
>> the rounding mode by operation feature.
> My design decision was sort of _a priori_; and I can't
> give any examples from real code in which it would be
> preferable; so I'll have to admit that you're right
> unless somebody else comes to my defense. 8-)
> The question is: should the rounding mode bind to
> the operation or to the operand?
Ideally, fixed-point arithmetic shoud yield a kind of floating-point result,
preserving as much precision as possible/makes sence. Rounding should not
occur until assignment at which point it determined by the target type's
> If the latter, should it be a compile-time mechanism
> (one obvious implementation being a template parameter
> that specifies a rounding policy, thus making the
> rounding mode a part of the type) or a run-time
> mechanism (perhaps a mutable pointer to a rounding
> mode and a member function for changing it)?
> I'll be happy to go with the flow.
> --Bill Seymour
-- Thanks, Vadim _________________________________________________________ Do You Yahoo!? Get your free @yahoo.com address at http://mail.yahoo.com
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk