From: Jeff Garland (jeff_at_[hidden])
Date: 2002-03-09 10:54:08
This looks pretty good to me. Here are couple of thoughts.
The use of the term precision (despite any C++ precedent) I think is actually
incorrect. Someone pointed this out to me that what I was calling 'precision'
in date-times is actually more accurately described as 'resolution'. That is,
the smallest representable quantity. There are some nice web references that
describe the terminology at the bottom of this page on the Wiki:
I not sure I see the need for the rounding function base class. Is it so the
operators can operate smoothly?
Speaking of the operators, it would be nice to see a quick synopsis of showing
the 'proxy' operators in action. The only examples are in the policy design
section which is what we "can't" do.
The default rounding mode selection by macro is odd to me. I would much rather
see the policy-based template implementation you reject later in the paper. To
me one additional template parameter is much easier to understand for the user
than a 'macro' parameter. I would be fine with having to 'cast' decimals with
different rounding modes to a compatible type to perform operations.
A detail not mentioned, but the I/O functions should be in a decimal_io.hpp file
to avoid extra io includes.
I would like to see a to_string function added.
> -----Original Message-----
> From: Bill Seymour [mailto:bill-at-the-office_at_[hidden]]
> Sent: Saturday, March 09, 2002 7:51 AM
> To: boost_at_[hidden]
> Subject: [boost] Fixed-Point Decimal Proposal
> I've just uploaded decimal.html to the files section.
> (I didn't zip it...it's only about 34k, and folks can
> just load it right into their browser.)
> I don't want to upload the source code just yet because
> the only compiler I have access to right now doesn't
> seem to be able to deduce non-type template arguments,
> so I can't compile anything that passes a decimal<>
> to a function that has the precision as a template
> parameter. 8-( I hope to get a decent compiler
> Real Soon Now.
> In the mean time, folks who are interested can check out
> the interface and decide whether it seems reasonable.
> --Bill Seymour
> Info: http://www.boost.org Send unsubscribe requests to:
> Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
Boost list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk