[COMPASS-3667] decimal128: comparing NaN and Infinity with other values of dec128 Created: 26/May/19 Updated: 10/Jan/24 Resolved: 30/Aug/21 |
|
| Status: | Closed |
| Project: | Compass |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | No version |
| Type: | Task | Priority: | Major - P3 |
| Reporter: | Irina Shestak (Inactive) | Assignee: | Unassigned |
| Resolution: | Won't Do | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Epic Link: | COMPASS-3669 |
| Story Points: | 2 |
| Documentation Changes: | Not Needed |
| Description |
|
Need to add a check to compare values of NaNs and Infinities with other values of Decimal128. Current implementation will work when you compare -NaN and NaN for example, but not +NaN and 1.24E+4.
For reference, check the c-sharp implementation: https://github.com/mongodb/mongo-csharp-driver/blob/v2.8.1/src/MongoDB.Bson/ObjectModel/Decimal128.cs#L1901 or ideally the java implementation which has the clearest overview imo: https://github.com/mongodb/mongo-java-driver/blob/r3.10.1/bson/src/main/org/bson/types/Decimal128.java#L387-L407 |