You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It seems there are two cases where 0 standard deviation is problematic:
the truncation points are equal
they're unequal but the mean does not lie between them
If the truncation points are unequal and the mean does lie between them, a standard deviation of 0 work just fine and rand always produces the mean. I think in your case, where the mean and both truncation points are all equal, rand should indeed produce the mean. If the mean lies outside of the truncated region and the standard deviation is 0, since no value within the region has nonzero probability, the result should probably be NaN.
Using Distributions v0.25.87, the following results in an infinite loop:
Perhaps setting standard deviation to
0.0
is an odd thing to do, but I was expecting it to just return204.764679086758
on all calls torand
.The text was updated successfully, but these errors were encountered: