Sort:  

The abs() is because a logarithm from a negative number is not possible, so they have to make it positive before the logarithm. No need to worry :)