On 07/08/2012 08:39 PM, Burton Samograd
That was the problem. I'm running a simulation with hundreds of
thousands of agents and that blue moon shows up pretty frequently.
I tried your idea of subtracting from 1 on CCL (SBCL is being too
finicky right now) and it doesn't seem to follow the standard of
[0.0...1.0). I ended up just adding 1E-32 to (random 1.0); I
really don't think it will make a difference (famous last words).
Careful that U+epsilon doesn't exceed 1.0 or you will mess up the
distribution where it counts. It probably would be better to throw
away U's that are less than epsilon. All your doing then is cutting
off the tails way out there somewhere.
It might be very small numbers will kill log also. If that's the case,
then you could figure out the threshold for smallest argument to log,
and put some logic in there to exclude those cases (regen another
Maybe but since my tiny addition I haven't had the problem so I'm
satisfied with it as a solution for now.