Boost logo

Boost :

From: Paul A. Bristow (pbristow_at_[hidden])
Date: 2001-04-19 12:10:44


As I see it, the problem is that everyone is naively expecting
something different, and agreement about C++ names seemed impossible
to achieve on my first floating
(especially with lots of C and C++ prewritten code about).

So I have ducked these issues providing a lowest common denominator
list, and leave users to do there own packaging,
perhaps as the examples I gave (from previous suggestions).
I can see nothing wrong with your proposal either.

The key thing about the constants is their ACCURACY which
helps program portability, an important BOOST objective.

Paul

PS 'Continued fraction constant' is used in calculating
a number of 'special functions', gamma, beta, erf,
used, for example, in statistics.
Ask a real mathematician if you want to know more!

> -----Original Message-----
> From: Peter Schmitteckert (boost) [mailto:boost_at_[hidden]]
> Sent: Thursday, April 19, 2001 11:40 AM
> To: boost_at_[hidden]
> Subject: Re: [boost] Re: TODAY: Math Constants library formal review
> starts
>
>
> Salut,
>
> On Thursday 19 April 2001 00:00, you wrote:
> [...]
> > - Naively I was expecting something like:
> >
> > namespace boost {
> > namespace math {
> > namespace F {
> > const float pi = 3.14159265358979323846264338327950288F;
> > //...
> > }
> > namespace D {
> > const double pi = 3.14159265358979323846264338327950288;
> > //...
> > }
> > namespace L {
> > const long double pi = 3.14159265358979323846264338327950288L;
> > //...
> > }
> > template <typename T> // just for the idea, details might need
> > work
> > pi(const T&) { return boost::math::L::pi; }
> > //...
> > }
> > }
> [...]
> I would prefer this too, without any macros.
> Maybe one should spend a few letters, sinf L could also refer to long int,
> e.g. namespace Float{ ...
>
> or
>
> .h:
>
> using namespace std;
>
> namespace boost
> {
> namespace math
> {
> template <typename T> class Constants
> {
> static const T pi;
> static const T e;
> };
> }
> };
>
> const double boost::math::Constants<double>::pi = 3.1415;
> const interval<double>
> boost::math::Constants<interval<double> >::pi = ( 3.1415, 0.0001);
>
> In addition, dear Paul Bristow,
>
> #define BOOST_CF 1.03064083410071293588177609411693684L /*
> Continued fraction
> (base 10) */
>
> could you please explain this constant.
>
> Best wishes
> Peter
>
>
>
> To unsubscribe, send email to: <mailto:boost-unsubscribe_at_[hidden]>
>
>
> Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
>
>
>
>


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