Boost logo

Boost :

From: Paul A. Bristow (pbristow_at_[hidden])
Date: 2001-04-26 12:28:00


I have not noticed before the suggestion of a sub-namespace for constants
WITHIN the math namespace.

> namespace boost
{
        namespace math
        {
                namespace constants {...

We could therefore create a new and separate namespace functions within
namespace math when these functions
(beta, Bessel, Gamma, normal, students_t and other distributions ...) become
available.

For example:

namespace boost{ namespace math { namespace functions {
        template<typename T> students_t(template<typename T>)
        {
                return 2; // Approximation to t
        } //
}}}

double t = boost::math::functions::students_t<double>(0.5);

Is there any merit in doing this now in preparation for NIST or someone to
produce definitive algorithms?
(Assuming they will produce C++ versions and not just FORTRAN!).

Paul

Dr Paul A Bristow, hetp Chromatography
Prizet Farmhouse
Kendal, Cumbria
LA8 8AB UK
+44 1539 561830
mailto:pbristow_at_[hidden]

> -----Original Message-----
> From: Mark Rodgers [mailto:mark.rodgers_at_[hidden]]
> Sent: Wednesday, April 25, 2001 8:49 PM
> To: boost_at_[hidden]
> Subject: Re: [boost] Math Constants Library formal review results

> Was the following option discussed, and if so what is wrong with it?
>
> namespace boost { namespace math { namespace constants {
> template<typename T> T pi();
> ....


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