move IMF CDF calculus outside of the mass_dist function to speed up the code