Boost logo

Boost :

From: Chris Weed (chrisweed_at_[hidden])
Date: 2005-09-12 21:35:38


On 9/12/05, Peder Holt <peder.holt_at_[hidden]> wrote:
> On 9/11/05, Chris Weed <chrisweed_at_[hidden]> wrote:
> > Hi,
> > I was trying to test the trigonometric functions and add an exp
> > function in the metamath library. I am not sure how to call them.
>
> I have modified the sine_impl implementation in CVS, so now you can use:
> typedef sine_double<number> type;
> double result=type();
>
> In metamath/double/sine.hpp
> I added:
> template<typename Angle>
> struct sine_double :
> detail::times_double_double<Angle,typename
> detail::sine_series<Angle,mpl::int_<0>,mpl::int_<13> >::type >
> {
> };
>
>
> >
> > Also line 58 of string_to_double.hpp needs to be changed to the
> > following to compile in gcc:
> >
> > typedef typename pow_impl<unsigned_exponent>::template apply<T>::type
> > positive_pow;
>
> Great! changes applied to cvs.
>
> Regards,
> Peder
>
> >

Hi,
I have attached updated versions of sine.hpp, limits.hpp, times.hpp, I
changed to get a sine example to compile in g++.
Additionally, I have created a file for exp (exp.hpp).

It might be better to have the integer version of exp just calculate
something like pow(e,Arg) where e is a constant.
Also, I am not sure how to test the *_impl<> versions of these functions.

Chris




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