swirl
Guide to OmniMark 9   OmniMark home
docs home 
IndexConceptsTasksSyntaxLibrariesLegacy LibrariesErrors
 
Functions    
 

Random number utilities (OMRANDOM)

 
 

OMRANDOM provides functions for generating pseudo-random numbers. Exponential and uniform distributions are supported.

A uniform distribution of random numbers is a flat distribution, where every number has an equal chance of occuring. Flipping a coin is an example of a uniform distribution, because each time you flip you have an equal chance of getting heads or tails.

The exponential distribution is commonly used to model the lifetime of units which have a constant failure or decay rate. (The rate is constant if it does not depend on how long the unit has survived.)

For instance, if a unit has 50% chance of failing during any year, then half of the units will probably fail the first year, half of the remaining units (or one quarter) will fail the next, half again (or one eighth) the year after that, and so on. If you plot these lifetimes, you will get an exponential distribution.

Usage note

The OMRANDOM library is packaged as a module. To use OMRANDOM, you must import the OMRANDOM module into your program using a statement like this:

  import "omrandom.xmd" prefixed by random.

Note that the prefix "random.", which is attached to all functions, constants, and opaque data types exported by this library, is set in this statement and can be changed. For readability, we recommend that you always use the standard prefix when importing modules supplied by OmniMark.

Functions
 
 

Top [ INDEX ] [ CONCEPTS ] [ TASKS ] [ SYNTAX ] [ LIBRARIES ] [ LEGACY LIBRARIES ] [ ERRORS ]

OmniMark 9.1.0 Documentation Generated: September 2, 2010 at 1:54:44 pm
If you have any comments about this section of the documentation, please use this form.

Copyright © Stilo International plc, 1988-2010.