GEN41
Prev | Score Statements and GEN Routines | Next

## GEN41

GEN41 — Generates a random list of numerical pairs.

## Description

Generates a discrete random distribution function by giving a list of numerical pairs.

## Syntax

    f # time size -41 value1 prob1 value2 prob2 value3 prob3 ... valueN probN

## Performance

The first number of each pair is a value, and the second is the probability of that value to be chosen by a random algorithm. Even if any number can be assigned to the probability element of each pair, it is suggested to give it a percent value, in order to make it clearer for the user.

This subroutine is designed to be used together with duserrnd and urd opcodes (see duserrnd for more information).

## Credits

Author: Gabriel Maldonado

Prev | Up | Next
GEN40 | Home | GEN42