$include_dir="/home/hyper-archives/boost/include"; include("$include_dir/msg-header.inc") ?>
From: Alan Stokes (alan_at_[hidden])
Date: 2006-06-01 07:07:45
Maybe I'm missing something, but the implementation of the exponential
dsitribution looks like this:
template<class Engine>
result_type operator()(Engine& eng)
{
return -result_type(1) / _lambda * log(result_type(1)-eng());
}
That seems to assume that the Engine has a rane of [0, 1). Certainly
if I pass it in (say) a mt19937 engine it goes rather badly wrong,
attempting to take the log of a large negative number.
But the documentation contains no such requirement - it merely says it
needs a UniformRandomNumberGenerator, which explicitly allows for any
range.
- Alan