Version

UltraCalcFunctionRand Class

Generates a pseudorandom number from zero up to (but not including) one.
Syntax
'Declaration
 
Public Class UltraCalcFunctionRand 
   Inherits BuiltInFunctionBase
public class UltraCalcFunctionRand : BuiltInFunctionBase 
Remarks

RAND()

The RAND() function will generate another pseudorandom number each time it is evaluated. It returns a fractional number on a unit basis, therefore you can use RAND() to produce numbers between 0 and C by multiplying the RAND() result by C. It follows that to produce a pseudorandom number between A and B you could translate the result by A like this:

RAND() * ( [B] - [A] ) + [A]

The number generation of the RAND() function derives from the system clock, and therefore may not be entirely random. It should not be used for applications requiring cryptographically-strong randomness or uniform probability distributions.

Requirements

Target Platforms: Windows 10, Windows 8.1, Windows 8, Windows 7, Windows Server 2012, Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also