[DOCS-16190] Document behavioral change for $mod Created: 08/Jun/23 Updated: 30/Oct/23 Resolved: 12/Jul/23 |
|
| Status: | Closed |
| Project: | Documentation |
| Component/s: | manual, Server |
| Affects Version/s: | None |
| Fix Version/s: | Server_Docs_20231030 |
| Type: | Task | Priority: | Minor - P4 |
| Reporter: | Peter Volk | Assignee: | Alison Huh |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | quick-win, server-docs-bug-bash | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Participants: | |
| Days since reply: | 32 weeks ago |
| Description |
|
In https://www.mongodb.com/docs/manual/reference/operator/query/mod/ the behaviour of $mod with Infinity and NaN are documented. Yet what is missing is that the function will return false in the case of Infinity as input from the document. |
| Comments |
| Comment by Peter Volk [ 28/Jun/23 ] | ||
|
you can use the following sequence:
The find command will not error out and will not return any data as $mod against infinity returns a boolean false.
| ||
| Comment by Alison Huh [ 27/Jun/23 ] | ||
|
Hi peter.volk@mongodb.com, could you share an example that shows this behavior? Upon testing on my own instance, it seems to just error and not return false. |