calculating dilution factor in mining