Nearest rounding in text input.

This commit is contained in:
Marcel Keller
2023-05-01 21:37:50 +10:00
parent 97e16288d6
commit f9ff6b273a

View File

@@ -12,7 +12,7 @@ void FixInput_<Integer>::read(std::istream& in, const int* params)
{ {
double x; double x;
in >> x; in >> x;
items[0] = x * exp2(*params); items[0] = round(x * exp2(*params));
} }
template<> template<>
@@ -25,6 +25,6 @@ void FixInput_<bigint>::read(std::istream& in, const int* params)
#else #else
double x; double x;
in >> x; in >> x;
items[0] = x * exp2(*params); items[0] = round(x * exp2(*params));
#endif #endif
} }