#include <iostream>
#include <iomanip>
#include <cfenv>
int main()
{
std::cout << std::setprecision(0) << std::scientific;
std::fesetround(FE_DOWNWARD);
std::cout << "round down: " << 0.52 << "\n";
std::fesetround(FE_UPWARD);
std::cout << "round up: " << 0.52;
}
/*
run:
round down: 5e-01
round up: 6e-01
*/