Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 802477
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T23:36:33+00:00 2026-05-14T23:36:33+00:00

I would like to use newId to generate random numbers. Usually you would use

  • 0

I would like to use newId to generate random numbers. Usually you would use it just once, but I might be generating up to 10 random numbers per newId.

Is it random enough?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-14T23:36:34+00:00Added an answer on May 14, 2026 at 11:36 pm

    Usually you would use it just once, but I might be generating up to 10 random numbers per newId. Is it random enough?

    It depends on how you extract the numbers from the newid. You cannot treat it as 128 independently random bits.

    For example if you use the first 8 bits for generating one random number between 0 and 255, use the next 8 bits to generate another number, etc. then you will see that your numbers will not be uniformly random.

                  v
    
    E058D654-35A8-47F2-AE40-1C4EEBBDC549
    01461481-ED8D-4B85-90FA-C08621D98DAE
    AE861E4E-3469-4BDB-A38B-0031DACC8DAE
    AF8905D0-E41B-4300-94F2-33BB45698CD1
    003308A6-AE0A-4E20-9F24-047A6955E748
    76F9B7ED-79AB-4EB1-B361-8C0AF5177CE3
    B8F1CAC0-591D-436B-BB21-FAAD9EECA983
    7FBEAEFD-2163-4315-A783-8106909E47D8
    85E2FC60-E7B3-400F-B20A-CEFBECAEE4F9
    17ED0A03-ADAD-4521-97EE-04815A867B32
    
                  ^
                  |
                  always 4
    

    You should also try to avoid reusing the same bits to generate different random numbers as your numbers will become related. If in doubt, don’t reuse the same number.

    Note that there is also a RAND function which you can call. This returns numbers from a uniform distribution.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

No related questions found

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.