aspose file tools
The moose likes Java in General and the fly likes Minimum and maximum random number? Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


JavaRanch » Java Forums » Java » Java in General
Reply Bookmark "Minimum and maximum random number?" Watch "Minimum and maximum random number?" New topic
Author

Minimum and maximum random number?

Jon Camilleri
Ranch Hand

Joined: Apr 25, 2008
Posts: 659

I would like to generate a function (unless one is already available), that computes the minimum and maximum values that can be generated by a random number generating formula:



Jon
Matthew Brown
Bartender

Joined: Apr 06, 2010
Posts: 3865
    
    1

The easiest way is often to read the documentation. Random.nextDouble() returns a value between 0 and 1. Or did you mean something else?

If you just had a "black box" random number function, there'd be no way of getting a definitive answer. All you could do is call it lots of times and get an indication of what the distribution might be.
 
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
 
subject: Minimum and maximum random number?
 
Similar Threads
Simple: Turning A Program Into An Applet
Minimum Value and Sum of Values in Array
Dice probability program, using nested loops.
read next byte