Details
-
Bug
-
Resolution: Won't Fix
-
Major - P3
-
None
-
None
-
None
-
Query
-
ALL
Description
The sizeEdge function triggered a warning in MSVC. It needs to be investigated to verify if the code warning should be ignored. The code was introduced in SERVER-15576.
// Relative error = epsilon_(max-min). ldexp() is just a direct translation to
|
// floating point exponent, and should be exact.
|
double GeoHashConverter::sizeEdge(unsigned level) const {
|
invariant(level >= 0);
|
invariant((int)level <= _params.bits);
|
#pragma warning(push)
|
// C4146: unary minus operator applied to unsigned type, result still unsigned
|
#pragma warning(disable : 4146)
|
return ldexp(_params.max - _params.min, -level);
|
#pragma warning(pop)
|
}
|