Defining Logic > Functions > Math Functions > Random

Random

Returns a random value n between 0 and X (0 <= n < X) where X is the result of the expression.

To generate random numbers between the expression and a number other than zero, use the expression as the range between the maximum and minimum values, and then add the minimum to the random number. For example, the statement Attr1 = 2 + RAND(3) generates a random number from two up to, but not including, five. An alternate method is to use a uniform distribution. Note that the Random function works very similar to a uniform distribution.

 

This function returns a realA real number is any number ranging from 1.7 X 10 -308 to 1.7 X 10 +308, including decimals. Real values may not include commas. As such, the number 5,380.5 should be entered as 5380.5. number, although the real value may be converted to an integerAn integer number is a whole number ranging from -2,147,483,648 to 2,147,483,647. Integer values may not include commas. Therefore, the number 5,380 should be entered as 5380. using the Truncate function.


© 2015 ProModel Corporation • 556 East Technology Avenue • Orem, UT 84097 • Support: 888-776-6633 • www.promodel.com