mathematical functions in python