* simplified random(int64) code

git-svn-id: trunk@42513 -
This commit is contained in:
Jonas Maebe 2019-07-28 12:03:46 +00:00
parent 3fb7c19482
commit b0683edfcb

View File

@ -688,11 +688,14 @@ var
carry: qword;
begin
if (l < 0) then
inc(l);
q:=qword(l);
if q>qword(low(int64)) then
q:=qword(-l);
a:=mtwist_u32rand;
begin
inc(l);
q:=qword(-l)
end
else
q:=qword(l);
a:=mtwist_u32rand;
b:=mtwist_u32rand;
c:=q shr 32;