glen herrmannsfeldt <g...@ugcs.caltech.edu> wrote:
> Richard Maine <nos...@see.signature> wrote:
[discussion about random_seed]
Well, I suppose I shouldn't spend too much effort in defending the
standard's treatment of random number generation. Even the person who
allegedly (it was before my time on the committee, so I wasn't there)
wrote the words once said that he had intended to specify a few more
things about seeding, but failed to actually write that part and forgot
that he hadn't. Thus, those parts ended up getting left processor
dependent in ways that have subsequently caused annoyances.
I recall this because the author tried to use this explanation as
justification for adding the specification in response to a defect
report. However, just because he wrote the words, didn't give him
"ownership" of them. The specification that he claimed had been his
intention in the first place was not presented to, discusssed, or voted
on by the committee during the development of f90, so his personal
intent could not be taken as that of the committee as a whole.
In the interim, multiple vendors had implemented random number
generators using different approaches, as allowed by the words actually
in the standard. Redoing the standard's specification at that point
would have been an incompatible change, invalidating existing compilers
and code. I'm sure there are still people who think it should have been
changed anyway, but that's not what passed. It was left processor
dependent and remains so today.
(No I don't recall exactly what variant he claimed to have intended. It
was quite a while ago. But I do very much recall the attempt to claim
that his previously unwritten personal intent should be taken as the
"intent of the committee". It had to do with the behavior when the
program never called random_seed or when it was called with no
arguments.)
-- Richard Maine | Good judgment comes from experience;
email: last name at domain . net | experience comes from bad judgment.
domain: summertriangle | -- Mark Twain
> > Richard Maine <nos...@see.signature> wrote:
> [discussion about random_seed]
> Well, I suppose I shouldn't spend too much effort in defending the
> standard's treatment of random number generation. Even the person who
> allegedly (it was before my time on the committee, so I wasn't there)
> wrote the words once said that he had intended to specify a few more
> things about seeding, but failed to actually write that part and forgot
> that he hadn't. Thus, those parts ended up getting left processor
> dependent in ways that have subsequently caused annoyances.
> I recall this because the author tried to use this explanation as
> justification for adding the specification in response to a defect
> report. However, just because he wrote the words, didn't give him
> "ownership" of them. The specification that he claimed had been his
> intention in the first place was not presented to, discusssed, or voted
> on by the committee during the development of f90, so his personal
> intent could not be taken as that of the committee as a whole.
> In the interim, multiple vendors had implemented random number
> generators using different approaches, as allowed by the words actually
> in the standard. Redoing the standard's specification at that point
> would have been an incompatible change, invalidating existing compilers
> and code. I'm sure there are still people who think it should have been
> changed anyway, but that's not what passed. It was left processor
> dependent and remains so today.
> (No I don't recall exactly what variant he claimed to have intended. It
> was quite a while ago. But I do very much recall the attempt to claim
> that his previously unwritten personal intent should be taken as the
> "intent of the committee". It had to do with the behavior when the
> program never called random_seed or when it was called with no
> arguments.)
> -- > Richard Maine | Good judgment comes from experience;
> email: last name at domain . net | experience comes from bad judgment.
> domain: summertriangle | -- Mark Twain
The PRNG was first added to the draft of Fortran 90 (then known as Fortran 8x) at the meeting in Halifax in August, 1986. Not only do I still remember the lobster dinner, but I still have my notes of the meeting. FWIW, this is what I wrote:
" A persistent request has been for Fortran to provide a random number intrinsic function [sic]. As was clear from the discussion, it is not intended that the results of the function be portable, only the interface. There were two proposals, both containing a means to set or extract the seed, one being a function, the other a subroutine. The function was initially favoured 20-5-7. There was a long discussion on the effect a function has on optimization and on side-effects - the fact that the value of the seed is changed at each call is a clear side-effect and therefore inappropriate for a function. Additionly, a scalar value returned as part of an array-valued expression would broadcast its single value over the whole expression, which would certainly surprise the naive user. Sentiment turned against the function, 8-11-3, and towards the subroutine, 13-3-14. (I voted against both as I had increasing misgivings about the wisdom of standardizing on something which is inherently non-portable without appearing to be so.) After more furious[!] debate, the subroutine was finally passed 15-12. My motion to change the range from 0.0 <= x <= 1.0 to 0.0 <= x < 1.0 the passed 28-0. I would be happy to discuss this intrinsic with anyone interesred."
<michaelmetc...@compuserve.com> wrote:
> Am Freitag, 6. April 2012 17:35:33 UTC+2 schrieb Richard Maine:
> > Well, I suppose I shouldn't spend too much effort in defending the
> > standard's treatment of random number generation. Even the person who
> > allegedly (it was before my time on the committee, so I wasn't there)
> > wrote the words once said that he had intended to specify a few more
> > things about seeding, but failed to actually write that part and forgot
> > that he hadn't. Thus, those parts ended up getting left processor
> > dependent in ways that have subsequently caused annoyances.
..
> > (No I don't recall exactly what variant he claimed to have intended. It
> > was quite a while ago. But I do very much recall the attempt to claim
> > that his previously unwritten personal intent should be taken as the
> > "intent of the committee". It had to do with the behavior when the
> > program never called random_seed or when it was called with no
> > arguments.)
> The PRNG was first added to the draft of Fortran 90 (then known as Fortran
8x) at the meeting in Halifax in August, 1986. Not only do I still
remember the lobster dinner, but I still have my notes of the meeting.
FWIW, this is what I wrote:
[elided]
The problem I recall had more to do with whether you get the same result
each time or a different result each time if you call random_seed with
no arguments, or if you don't call random_seed at all.
-- Richard Maine | Good judgment comes from experience;
email: last name at domain . net | experience comes from bad judgment.
domain: summertriangle | -- Mark Twain