Re: Random Integers from 0 to 999
In article <H_idnWvuAfFCe8 jfRVn-vQ@comcast.com> , Eric Sosman <esosman@acm-dot-org.invalid> writes:[color=blue]
> Michael Wojcik wrote:[color=green]
> >
> > At any rate, I agree with the basic point: if you're dissatisfied, or
> > think you might be, with rand(), better generators are not hard to
> > come by.[/color]
>
> Since the quality of rand() is implementation-specific,
> "better" is hard to justify in a universal sense.[/color]
Sure. In this case, though, a "better" one is merely one that
produces less dissatisfaction in the subject (since dissatisfaction
with rand() is a precondition). Especially perverse cases aside that
looks eminently achievable, as you yourself suggest:
[color=blue]
> It seems that everybody[*] eventually latches onto a favorite
> substitute for rand().[/color]
There you are, then. Everyone will be able to find a "better"
substitute for rand, on the grounds that they will feel that it's
better, and so it will displease them less. What's programming for,
if not to console programmers?
[color=blue]
> My own not-so-humble opinion is that the C Standard should leave the
> requirements on rand() as weak as they are today, but should describe
> it as a "coarse" source of variates, suitable for "casual" use but
> not for serious work.[/color]
Agreed.
--
Michael Wojcik michael.wojcik@ microfocus.com
What is it with this warm, quiet, nauseating bond between them?
-- Rumiko Takahashi, _Maison Ikkoku_, trans. Mari Morimoto, adapt. Gerard
Jones
In article <H_idnWvuAfFCe8 jfRVn-vQ@comcast.com> , Eric Sosman <esosman@acm-dot-org.invalid> writes:[color=blue]
> Michael Wojcik wrote:[color=green]
> >
> > At any rate, I agree with the basic point: if you're dissatisfied, or
> > think you might be, with rand(), better generators are not hard to
> > come by.[/color]
>
> Since the quality of rand() is implementation-specific,
> "better" is hard to justify in a universal sense.[/color]
Sure. In this case, though, a "better" one is merely one that
produces less dissatisfaction in the subject (since dissatisfaction
with rand() is a precondition). Especially perverse cases aside that
looks eminently achievable, as you yourself suggest:
[color=blue]
> It seems that everybody[*] eventually latches onto a favorite
> substitute for rand().[/color]
There you are, then. Everyone will be able to find a "better"
substitute for rand, on the grounds that they will feel that it's
better, and so it will displease them less. What's programming for,
if not to console programmers?
[color=blue]
> My own not-so-humble opinion is that the C Standard should leave the
> requirements on rand() as weak as they are today, but should describe
> it as a "coarse" source of variates, suitable for "casual" use but
> not for serious work.[/color]
Agreed.
--
Michael Wojcik michael.wojcik@ microfocus.com
What is it with this warm, quiet, nauseating bond between them?
-- Rumiko Takahashi, _Maison Ikkoku_, trans. Mari Morimoto, adapt. Gerard
Jones
Comment