swirl
Guide to OmniMark 8   OmniMark home
docs home 
IndexConceptsTasksSyntaxLibrariesLegacy LibrariesErrors
 
Functions       Platforms  
 

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 OMX's 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
   random.exponential
   random.omrandom-version
   random.set-seed
   random.uniform
 
Platforms
   HP/UX
   HP-UX Itanium 2
   IBM AIX 5.3
   Linux (Intel)
   Linux Red Hat Enterprise 5
   MS Windows 98/ME
   MS Windows NT/2000/XP
   MS Windows Vista
   Sun Solaris 8
 
 

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

OmniMark 8.2.0 Documentation Generated: May 6, 2008 at 10:12:26 am
If you have any comments about this section of the documentation, please use this form.

Copyright © Stilo International plc, 1988-2008.