Uploaded image for project: 'Documentation'
  1. Documentation
  2. DOCS-15738

$rand should specify inclusive/exclusive

    XMLWordPrintableJSON

Details

    Description

      https://www.mongodb.com/docs/manual/reference/operator/query/rand/ states "$rand returns a random float between 0 and 1". This implies that 1 is inclusive, or is at least ambiguous. The docs should specify "between 0 (inclusive) and 1 (exclusive)". 

      See https://jira.mongodb.org/browse/SERVER-70107

      Attachments

        Activity

          People

            Unassigned Unassigned
            maxim.katcharov@mongodb.com Maxim Katcharov
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              1 year, 12 weeks, 2 days ago