For the case that multiple values, i.e. r0 < r1 < r2 are specified, the calculation of number of positions was wrong