From: Peder Holt (peder.holt_at_[hidden])
Date: 2005-06-08 12:44:38
On 6/8/05, Cromwell Enage <sponage_at_[hidden]> wrote:
> --- Sérgio Vale e Pace wrote:
> > I can't say for everyone else, but I am very
> > interested, but AFAIK there is a current development
> > in this area on mpl, but I can be wrong,
> No, you are correct, I just haven't gotten around to
> decimals yet.
> > but yor code looks promising. how well does it
> > integrate with other mpl stuff?
> I would like to know as well. I second the request to
> have it uploaded to
> > On 6/8/05, Peder Holt wrote:
> > > Is there any interest in a compile-time
> > > meta-version of double?
> Most definitely.
> > > Syntax:
> > >
> > > //Definition
> > > typedef META_DOUBLE(3.1415926535897932384626433)
> > > pi;
> > > //Or
> > > META_DOUBLE(3.1415926535897932384626433) pi_;
> Yes, very compact.
> > > //Mathematical operations
> > > typedef math::meta::add<pi,pi>::type pi2;
> You can specialize the MPL plus metafunction so that
> it works on your double metatype. Or I can do that
> for you :)
I'll get right to it. Sounds like an interesting challenge :)
> > > //Evaluation:
> > >
> > > assert(META_DOUBLE_EVAL(pi2)==
> > > 3.1415926535897932384626433*2);
> > >
> > > This implementation uses two ints to represent the
> > > decimals, and a short to represent the exponent.
> Like I said, please upload to the sandbox vault so
> that we can examine the implementation.
It's there: meta_double.hpp
> Cromwell D. Enage
> Do you Yahoo!?
> Make Yahoo! your home page
> Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk