A geometric distribution sampler with probability 'p' restricted to values inside [1, max]. Because of this restriction, very low values of 'p' coupled with low 'max' return increasingly uniform populations in the interval [1, max].
trunc_geom(p, max)
the sampled value
the parameter of the geometric distribution
the maximum value allowed to be sampled