Constraint randomization of an array

In reply to dave_59:

Hi Dave,

That problem is due to the fact that the resulting value from array.sum() has the same type as each element in the array. That means it does not handle overflow unless you change type of each element being summed. My example does not have that problem because I was constraining the value of each element to a relatively small value that would never overflow.

Can you elaborate on this ?

Thanks,
Madhu