swirl
Guide to OmniMark 7   OmniMark home
docs home 
IndexConceptsTasksSyntaxLibrariesLegacy LibrariesErrors
 
      Other Library Functions  
function  

random.exponential

 
 

Library: Math, Random number utilities (OMRANDOM)
Import: omrandom.xmd
Return type: Integer
Returns: 

Random numbers based on the exponential distribution.


Declaration

  define external integer function random.exponential
    average value integer lambda


Purpose

Use this function to generate random numbers based on the exponential distribution. Over a large number of trials, the average over all of the generated random numbers will tend towards the argument lambda.

Example:

This program generates 1000 random numbers with an exponential distribution and an average value of 20.

  import "omrandom.xmd" prefixed by random.

  process
       repeat for integer i from 1 to 1000
          output "d" % i || ": "
              || "d" % random.exponential average 20
              || "%n"
       again

        Other Library Functions
   random.exponential
   random.omrandom-version
   random.set-seed
   random.uniform
 
 

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

OmniMark 7.1.2 Documentation Generated: June 28, 2005 at 5:45:41 pm
If you have any comments about this section of the documentation, send email to [email protected]

Copyright © Stilo Corporation, 1988-2005.