Likewise with the full 100 digits this algorithm has a 1% chance of generating a number less than 10, while the correct proportion would be 1e-100.
The algorithm also does not generate numbers with zero in them (presumably to avoid leading zeroes, but this will skew results somewhat).
I think the correct algorithm would be to generate 100 digits and then remove the leading zeroes.
Likewise with the full 100 digits this algorithm has a 1% chance of generating a number less than 10, while the correct proportion would be 1e-100.
The algorithm also does not generate numbers with zero in them (presumably to avoid leading zeroes, but this will skew results somewhat).
I think the correct algorithm would be to generate 100 digits and then remove the leading zeroes.