mirror of
https://github.com/data61/MP-SPDZ.git
synced 2026-01-08 21:18:03 -05:00
Nearest rounding in text input.
This commit is contained in:
@@ -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
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user