Warning: mysqli::__construct(): (HY000/1203): User howardkn already has more than 'max_user_connections' active connections in D:\Inetpub\vhosts\howardknight.net\al.howardknight.net\includes\artfuncs.php on line 21
Failed to connect to MySQL: (1203) User howardkn already has more than 'max_user_connections' active connections
Warning: mysqli::query(): Couldn't fetch mysqli in D:\Inetpub\vhosts\howardknight.net\al.howardknight.net\index.php on line 66
Article <vj3f11$3l0qi$1@dont-email.me>
Deutsch   English   Français   Italiano  
<vj3f11$3l0qi$1@dont-email.me>

View for Bookmarking (what is this?)
Look up another Usenet article

Path: ...!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: porkchop@invalid.foo (Mike Sanders)
Newsgroups: comp.lang.awk
Subject: Re: 100 Random Single Variable Linear Equations
Date: Sun, 8 Dec 2024 06:40:33 -0000 (UTC)
Organization: A noiseless patient Spider
Lines: 33
Sender: Mike Sanders <busybox@sdf.org>
Message-ID: <vj3f11$3l0qi$1@dont-email.me>
References: <vits2o$240vr$1@dont-email.me> <vitvta$24sm3$1@dont-email.me> <viurhe$2bces$1@dont-email.me> <viuunp$2c1ev$1@dont-email.me> <vivsd0$2jij8$1@dont-email.me> <vj09j9$2mf7i$2@dont-email.me> <vj0bff$2n2c2$1@dont-email.me>
Injection-Date: Sun, 08 Dec 2024 07:40:33 +0100 (CET)
Injection-Info: dont-email.me; posting-host="0513f042c00441571518d761624f4bea";
	logging-data="3834706"; mail-complaints-to="abuse@eternal-september.org";	posting-account="U2FsdGVkX1+gTHpr8yPyONczQjUX23Vk"
User-Agent: tin/2.6.2-20221225 ("Pittyvaich") (NetBSD/9.3 (amd64))
Cancel-Lock: sha1:Og9A+eX6X24ywgrjKRRRtqzagls=
Bytes: 1939

Janis Papanagnou <janis_papanagnou+ng@hotmail.com> wrote:

> A deliberately chosen seed of 0 gets overwritten?
> 
> How about (since you're expecting a number)
> 
>    if (SEED=="") SEED = 1
> 
> or (for good measure) the more general pattern for
> an "uninitialized" variable 'var'
> 
>    if (var=="" && var==0) ...   # uninitialized
>    else ...   # initialized (including "" and 0)
> 
> But is a seed of 1 "better" than a seed of 0 ?
> Both create deterministic random number sequences.
> 
> Only srand() (i.e. without argument) creates a
> time-depending quasi non-deterministic sequence.
> 
> My choice would probably be
> 
>    if (var=="" && var==0) srand()   # random start
>    else srand(var)   # deterministic
> 
> to have both options.

See downthread, tell me what you think please kind sir...

-- 
:wq
Mike Sanders