round switch to boost::math::round.
isinf switch to boost::math::isinf.
max switch to std::max<double>) and  log2 switch to log(x)/log(2).
switch to IDE vs2012.