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

UTIL_ExpRand

 
 

Library: Utilities (OMUTIL) legacy library
Include: omutil.xin
Return type: Integer

Returns: Random numbers based on the exponential distribution.


Declaration

define external integer function UTIL_ExpRand (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.

  
  include "omutil.xin"
  
  process
       local integer lambda initial {20} ; average value
  
       repeat for integer i from 1 to 1000
          output "d" % i || ": "
              || "d" % UTIL_ExpRand(lambda) || "%n"
       again
  

        Other Library Functions
   UTIL_Env
   UTIL_ExpRand
   UTIL_GetEnv
   UTIL_GetMilliSecondTimer
   UTIL_GetProcessId
   UTIL_IsVersionCompatible
   UTIL_LibraryVersion
   UTIL_Rand
   UTIL_Sleep
   UTIL_SortIntegersByKey
   UTIL_SortIntegersByValue
   UTIL_SortStreamsByKey
   UTIL_SortStreamsByValue
   UTIL_SortSwitchesByKey
   UTIL_Srand
   UTIL_UniformRand
 
 

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

OmniMark 8.2.0 Documentation Generated: March 13, 2008 at 3:27:39 pm
If you have any comments about this section of the documentation, please use this form.

Copyright © Stilo International plc, 1988-2008.