I want to make a list of floats of N
length whose total sum is always 1 and each float is incremented by d
amount.
For example, let N = 4
and d = 0.01
:
The desired outcome would be like so:
[0.90, 0.02, 0.03, 0.05]
[0.89, 0.02, 0.03, 0.06]
....
# And continues until all possible sums of 1 with the above settings is reached.
# An individual value CAN NOT = 0
I'm trying to think of some logic for this but I need some help. Previously I had asked a question of similar nature, but uses random numbers instead of all possible combinations.