Update comper.py

Got rid of dependence on math.py module.