|
Boost : |
Subject: Re: [boost] [math distributions] Laplace distribution
From: Paul A. Bristow (pbristow_at_[hidden])
Date: 2008-11-28 05:31:32
> -----Original Message-----
> From: boost-bounces_at_[hidden] [mailto:boost-bounces_at_[hidden]]
On
> Behalf Of Thijs van den Berg
> Sent: 27 November 2008 20:59
> To: boost_at_[hidden]
> Subject: Re: [boost] [math distributions] Laplace distribution
>
> I solved those by changing
> > int test_main(int, char* [])
> into
> > BOOST_AUTO_TEST_CASE( test1 )
> hope that's ok...
More than - an improvement - using the latest recommended way of starting
Boost.Test
> Anyway, I'll be able to add some validated code to the sandbox soon.
Ping when committed.
PS Take care to follow other distribution tests as examples - there are
several of pits (into which I have fallen, serially)
Since I think the formulae only use built-in functions like exp, they should
be quite accurate and you should be able to set the tolerance as a few eps
even when round tripping.
Don't forget too that (for full portability) constants should be declared
and long double
static_cast<RealType>(0.53958342416056554201085167134004L)
(unless they are 'exactly representable' like 0.5, 0.25...)
> After that ...multi-dim-Gaussian's!
Now the real fun will begin!
Paul
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk