Eliminate cmath

This PR is correpond to #677  

We should not use cmath functions like `abs` `exp` `log` etc..
It's harmful and maybe inflate the size of executable.
We should unify these functions to be `std::abs` `std::exp` `std::log` etc..