std::trunc is not available with g++-4.8 on android (and also likely not msvc)