|
Boost : |
From: Cromwell Enage (sponage_at_[hidden])
Date: 2005-11-09 12:10:44
--- Peder Holt wrote:
> --- Cromwell Enage wrote:
> > There's an existing implementation of arctangent
> > that should work for all real numbers.
Correction: it also only converges for |x| <= 1.
> I didn't notice. I'll check it out an look at its
> convergence rate.
It's the Maclaurin series, and it's rather slow.
> > If all interested parties agree with this plan,
> > the next question is, where should we put pi<>?
So
> > far, I have two candidates:
> >
> > * boost::mpl::math, since zero<> also resides
> > there
> > * boost::mpl::math::constants
>
> boost::mpl::math, then probably.
I'll take a shot at it for the next update.
> > Only backward-compatibility concerns have held me
> > back from employing this technique elsewhere. (I
> > don't have a Class B compiler on-hand though, so I
> > don't know if my fears are unjustified.)
>
> Don't think this is an issue.
> MSVC6.5 at least prefers BOOST_STATIC_CONSTANT, as
> they are much easier to handle than excessive
> template instantiations.
Noted.
> > I'll #ifdef 0 out the code to be replaced.
>
> Ok.
And what did I do instead? I reimplemeted a majority
of the advanced metafunctions by using
Boost.Preprocessor to unroll the recursion. (You must
now #define the corresponding limit macro for each
metafunction, and you have a hard limit of 255
depending on the metafunction, but it beats exceeding
the template instantiation depth.) Best of all,
euler.cpp compiles and works just fine.
Cromwell D. Enage
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
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