bug-gawk
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Apparent issue with srand() in gawk


From: Andreas Schwab
Subject: Re: Apparent issue with srand() in gawk
Date: Sun, 15 Jun 2025 14:33:29 +0200
User-agent: Gnus/5.13 (Gnus v5.13)

On Jun 12 2025, Jim Mellander wrote:

> Thanks! I found that on 64 bit systems, the same issue occurs with seeds >=
> 2^63. Changing the cast of the input from 'long' to 'unsigned long'
> corrects the issue.

That just shifts the boundary from LONG_MAX to ULONG_MAX, with the same
unpredictable result.

-- 
Andreas Schwab, schwab@linux-m68k.org
GPG Key fingerprint = 7578 EB47 D4E5 4D69 2510  2552 DF73 E780 A9DA AEC1
"And now for something completely different."



reply via email to

[Prev in Thread] Current Thread [Next in Thread]