* random(int64) added

This commit is contained in:
peter 2004-04-22 17:10:38 +00:00
parent 93d838bd4d
commit 0fbb1fe9e8
2 changed files with 14 additions and 2 deletions

View File

@ -461,6 +461,11 @@ begin
random := longint((int64(cardinal(genrand_MT19937))*l) shr 32);
end;
function random(l:int64): int64;
begin
random := longint((int64(cardinal(genrand_MT19937))*l) shr 32);
end;
function random: extended;
begin
random := cardinal(genrand_MT19937) * (1.0/(int64(1) shl 32));
@ -876,7 +881,10 @@ end;
{
$Log$
Revision 1.54 2004-02-20 11:01:20 daniel
Revision 1.55 2004-04-22 17:10:38 peter
* random(int64) added
Revision 1.54 2004/02/20 11:01:20 daniel
* Applied
Revision 1.53 2004/02/06 20:17:13 daniel

View File

@ -423,6 +423,7 @@ Function Swap (X:Int64):Int64;{$ifdef SYSTEMINLINE}inline;{$endif}
Function Random(l:cardinal):cardinal;
Function Random(l:longint):longint;
Function Random(l:int64):int64;
Function Random: extended;
Procedure Randomize;
@ -736,7 +737,10 @@ const
{
$Log$
Revision 1.87 2004-03-23 22:35:45 peter
Revision 1.88 2004-04-22 17:10:38 peter
* random(int64) added
Revision 1.87 2004/03/23 22:35:45 peter
* new compiler has smallint,longint,word internal defined
Revision 1.86 2004/02/20 22:15:16 florian