Change num_instances to a float

Integer division floors the result to 0, so any *_percent condition will always evaluate to true
Merge pull request #322 from srodrig0209/patch-3

Change num_instances to a float