dbms: addition to prev. revision [#CONV-2944].

This commit is contained in:
Alexey Milovidov 2012-12-14 18:47:50 +00:00
parent a74b574004
commit a8cf550864

View File

@ -51,6 +51,8 @@ static void numWidthVector(const std::vector<T> & a, std::vector<UInt64> & c)
for (size_t i = 0; i < size; ++i)
if (a[i] >= 0)
c[i] = a[i] ? 1 + log10(a[i]) : 1;
else if (std::tr1::is_signed<T>::value && a[i] == std::numeric_limits<T>::min())
c[i] = 2 + log10(std::numeric_limits<T>::max());
else
c[i] = 2 + log10(-a[i]);
}