Calc_dm.pro calculates the distance modulus in magnitudes for given z, ,
and w. For some basic reference about the w parameter, see [3,4]. However you can also use the function without using this parameter (see IIB below).
The function checks if the passed parameters would result in a bouncing universe which means that the universe has a turning point in its past, that is, it collapsed from infinite size to a finite radius and is now reexpanding. If the functions detects parameters which describe such a bouncing universe, it returns a large negative number (see sections IIC and V below).