Ranvars have buckets that spread over multiple values.
The first such bucket is the 65th (meaning that the probability for 65 and 66 are always the same in a ranvar), so dirac(65) actually spread over two values (65 and 66).
We have again 64 buckets with 2 values each,, and then 64 buckets with four values, etc .. so the thresholds are : 64, 196, 452, … (every one being of the form $\sum_{0..n}(64*2^n)$ )
To complete this, ranvar values are bounded to 67108800 (roughly 2^26), enabling ranvar to have a bounded storage need.
Creating a ranvar with values outside of this bound will raise error "Cannot create ranvar with domain [x .. y]".
Ranvars have buckets that spread over multiple values.
The first such bucket is the 65th (meaning that the probability for 65 and 66 are always the same in a ranvar), so
dirac(65)
actually spread over two values (65 and 66).We have again 64 buckets with 2 values each,, and then 64 buckets with four values, etc .. so the thresholds are : 64, 196, 452, … (every one being of the form $\sum_{0..n}(64*2^n)$ )
Example script: https://try.lokad.com/6rk5wgpaf4mp0?tab=Output
Sorry my link was private, please find here the shareable one: https://try.lokad.com/s/ranvar_buckets_example
To complete this, ranvar values are bounded to 67108800 (roughly 2^26), enabling ranvar to have a bounded storage need.
Creating a ranvar with values outside of this bound will raise error "Cannot create ranvar with domain [x .. y]".