use C++11's std::round from <numeric> instead of C-style round from cstdlib