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 8138841
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T11:37:56+00:00 2026-06-06T11:37:56+00:00

Which is more random? rand() OR rand() + rand() OR rand() * rand() Just

  • 0

Which is more random?

rand()

OR

rand() + rand()

OR

rand() * rand()

Just how can one determine this? I mean. This is really puzzling me! One feels that they may all be equally random, but how can one be absolutely sure?!

Anyone?

  • 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-06-06T11:37:58+00:00Added an answer on June 6, 2026 at 11:37 am

    The concept of being “more random” doesn’t really make sense. Your three methods give different distributions of random numbers. I can illustrate this in Matlab. First define a function f that, when called, gives you an array of 10,000 random numbers:

    f = @() rand(10000,1);
    

    Now look at the distribution of your three methods.

    Your first method, hist(f()) gives a uniform distribution:

    enter image description here

    Your second method hist(f() + f()) gives a distribution which is peaked in the centre:

    enter image description here

    Your third method hist(f() .* f()) gives a distribution where numbers close to zero are more likely:

    enter image description here

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

Sidebar

Related Questions

I can't get my head around this, which is more random? rand() OR :
soooo i have this function that prints one of 5 random texts ON an
I am wondering which is more efficient, to store temporary data (related to that
While going through one of our own projects, that other developer used rand() to
This is a different question from the one I just asked and it is
This is a more general question, but which has wider implications for a data
I'd like to create this function, which selects a random element from a Set
So I am bashing my head against the wall over a question which more
Which is more better , powerful and flexible between Graphiti or Draw2D, As i
Which is more expensive and by how much: List<cards> cardList = getMyList(small);//returns a list

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.