-
Type: Bug
-
Resolution: Unresolved
-
Priority: Minor - P4
-
None
-
Affects Version/s: 2.4.0
-
Component/s: JavaScript
-
ALL
Problem:
Passing a flat into NumberInt() and NumberLong() has some inconsistent behavior.
Correct:
> r = NumberInt(-4.1);
NumberInt(-4)
> r = NumberLong(-4.1);
NumberLong(-4)
Incorrect:
> r = NumberLong(Number.MIN_VALUE);
NumberLong(0)
> r = NumberLong(Number.MAX_VALUE);
NumberLong("-9223372036854775808")
> r = NumberInt(Number.MIN_VALUE);
NumberInt(0)
> r = NumberInt(Number.MAX_VALUE);
NumberInt(0)
- related to
-
SERVER-7812 NumberLong(max_of_int64) returns wrong result in mongo shell
- Closed