
Can we please change assert(min_arg < max_arg); to assert (min_arg <= max_arg) ? Otherwise, breaks on corner case.

I believe in uniform_real, assertion should be changed to assert (min_arg <= max_arg) What about uniform_smallint? Does min_arg == max_arg make sense?

On Apr 29, 2008, at 5:37 PM, Neal Becker wrote:
I believe in uniform_real, assertion should be changed to assert (min_arg <= max_arg)
What about uniform_smallint? Does min_arg == max_arg make sense?
For uniform integers min_arg == max_arg actually makes sense in contrast to uniform real, since here the convention is to include the upper limit Matthias

On Apr 29, 2008, at 4:01 PM, Neal Becker wrote:
Can we please change
assert(min_arg < max_arg);
to assert (min_arg <= max_arg)
? Otherwise, breaks on corner case.
Actually for uniform real the range is [min_arg,max_arg) and thus min_arg == max_arg is the empty set. Hence the test is correct as it is Matthias
participants (2)
-
Matthias Troyer
-
Neal Becker