Boost logo

Boost :

Subject: Re: [boost] [math distributions] where to check for validity of distribution variables?
From: John Maddock (john_at_[hidden])
Date: 2008-11-22 14:28:39


Thijs van den Berg wrote:
>> I we have the following code that constructs a faulty distribution
>> and
>> uses that in follow-up steps,
>> what would be wanted behavior regarding error handling?
>>
>> 1: normal N(0,0); // a normal distribution with invalid std
>> 2: double y = pdf(N, 0.3);
>> 3: double k = kurtosis(N);

IMO, we should probably follow this one (but might not where the result is
the same constant for all parameter values).

However, as noted previously an error might not trigger an exception: we
might be required to return a specific error value instead.

John.


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