[SERVER-68233] MongoShell numberDecimalsAlmostEqual(NumberDecimal(0), NumberDecimal(0)) returns false Created: 22/Jul/22 Updated: 29/Oct/23 Resolved: 22/Aug/22 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | 6.0.3, 6.1.0-rc0 |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Denis Grebennicov | Assignee: | Denis Grebennicov |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | neweng, quick-tech-debt | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||
| Backwards Compatibility: | Fully Compatible | ||||||||
| Operating System: | ALL | ||||||||
| Backport Requested: |
v6.0
|
||||||||
| Sprint: | QE 2022-08-08, QE 2022-08-22 | ||||||||
| Participants: | |||||||||
| Linked BF Score: | 160 | ||||||||
| Description |
|
Shell function `numberDecimalsAlmostEqual` returns false when passing two zeros as an input. The reason for that is taking logarithm of the values, which is `NaN` for 0. The whole approximated comparison algorithm works under assumption that these values are not zero. |
| Comments |
| Comment by Githook User [ 06/Oct/22 ] |
|
Author: {'name': 'Denis Grebennicov', 'email': 'denis.grebennicov@mongodb.com', 'username': 'denis631'}Message: |
| Comment by Githook User [ 22/Aug/22 ] |
|
Author: {'name': 'Denis Grebennicov', 'email': 'denis.grebennicov@mongodb.com', 'username': 'denis631'}Message: |