-
Type: Bug
-
Resolution: Fixed
-
Priority: Major - P3
-
Affects Version/s: bson-4.0.2
-
Component/s: None
-
Empty show more show less
-
Not Needed
https://github.com/mongodb/js-bson/issues/334
Hello. Decimal128.fromString is working incorrect, you can reproduce bug using negative numbers of pattern 0.00XX :
bson.Decimal128.fromString('-0.0097').toString() // -0.0000 bson.Decimal128.fromString('-0.0011').toString() // -0.0000
Same numbers, but with different zero count will work:
bson.Decimal128.fromString('-0.00970').toString() // -0.00970 bson.Decimal128.fromString('-0.00110').toString() // -0.00110 bson.Decimal128.fromString('-0.00010').toString() // -0.00110
bson package version is 4.0.2
- is related to
-
NODE-3594 Incorrect binary data Decimal128.fromString (bson-ext)
- Backlog
- links to