avoid log(0.0)
try to move qual_max 40 to outside
qual_max: const int -> define
Merge pull request #9 from cielavenir/ciel1

avoid log(0.0)