Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"
 
PerlMonks  

Re^3: How to generate different random numbers?

by ranjan_jajodia (Monk)
on Sep 05, 2004 at 06:26 UTC ( [id://388578]=note: print w/replies, xml ) Need Help??


in reply to Re^2: How to generate different random numbers?
in thread How to generate distinct random numbers?

hi johnnywang,
As soon as you talk about 'distinct', 'random' goes out of the window. So i assume you need distinct numbers upon which you can't apply any pattern. The best way is to write a hash function on the current date + time which ofcourse must not give always increasing or decreasing numbers. Use google to find a suitable algorithm ( i am sure people have done it before).
  • Comment on Re^3: How to generate different random numbers?

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://388578]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others surveying the Monastery: (2)
As of 2024-04-25 23:02 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found