[Bug fortran/67039] Documentation of pseudorandom number intrinsics is incorrect
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67039 Dominique d'Humieres changed: What|Removed |Added Status|WAITING |RESOLVED Resolution|--- |FIXED --- Comment #9 from Dominique d'Humieres --- Jerry, Thanks for the review. > I think this word should be singular. > > +@code{RANDOM_SEED} to initialize the pseudo-random numbers <= no 's' Done, closing as FIXED.
[Bug fortran/67039] Documentation of pseudorandom number intrinsics is incorrect
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67039 --- Comment #8 from dominiq at gcc dot gnu.org --- Author: dominiq Date: Wed Apr 13 15:04:57 2016 New Revision: 234946 URL: https://gcc.gnu.org/viewcvs?rev=234946=gcc=rev Log: 2016-04-13 Dominique d'HumieresPR fortran/67039 * intrinsic.texi: Correct the documentation of pseudorandom number intrinsics. Modified: trunk/gcc/fortran/ChangeLog trunk/gcc/fortran/intrinsic.texi
[Bug fortran/67039] Documentation of pseudorandom number intrinsics is incorrect
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67039 Jerry DeLisle changed: What|Removed |Added CC||jvdelisle at gcc dot gnu.org --- Comment #7 from Jerry DeLisle --- (In reply to Dominique d'Humieres from comment #6) > I am planning to submit the following patch ---snip--- I think this word should be singular. > +@code{RANDOM_SEED} to initialize the pseudo-random numbers <= no 's' > +generator and @code{RANDOM_NUMBER} to generate pseudo-random numbers. > +These subroutines should be used in new codes. Even if internally there may be multiple 'generators' involved, from the user perspective it is just one generator.
[Bug fortran/67039] Documentation of pseudorandom number intrinsics is incorrect
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67039 --- Comment #6 from Dominique d'Humieres --- I am planning to submit the following patch --- ../_clean/gcc/fortran/intrinsic.texi2016-01-04 19:51:09.0 +0100 +++ gcc/fortran/intrinsic.texi 2016-04-06 17:15:01.0 +0200 @@ -12628,10 +12628,12 @@ Does not return anything. See @code{RAND} and @code{IRAND} for examples. @item @emph{Notes}: -The Fortran 2003 standard specifies the intrinsic @code{RANDOM_SEED} to -initialize the pseudo-random numbers generator and @code{RANDOM_NUMBER} -to generate pseudo-random numbers. Please note that in -GNU Fortran, these two sets of intrinsics (@code{RAND}, +The Fortran standard specifies the intrinsic subroutines +@code{RANDOM_SEED} to initialize the pseudo-random numbers +generator and @code{RANDOM_NUMBER} to generate pseudo-random numbers. +These subroutines should be used in new codes. + +Please note that in GNU Fortran, these two sets of intrinsics (@code{RAND}, @code{IRAND} and @code{SRAND} on the one hand, @code{RANDOM_NUMBER} and @code{RANDOM_SEED} on the other hand) access two independent pseudo-random number generators.
[Bug fortran/67039] Documentation of pseudorandom number intrinsics is incorrect
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67039 --- Comment #5 from kargl at gcc dot gnu.org --- (In reply to Dominique d'Humieres from comment #4) > > > Resolved as WONTFIX? > > > > Probably not. See the last 2 paragraphs in comment #1. > > Sorry, but my question was motivated by the reading of these two > paragraphs!-( > Thus two more explicit questions: > > (1) Shall I submit a patch to replace in the manual all the "Fortran 95 and > later" with "Fortran 90 and later" where appropriate? No. gfortran never tried to address the Fortran 90 standard. Whatever is stated in F90 is irrelevant to the extent that gfortran is a Fortran 95 compiler and F90 beget F95. > > (2) Shall I submit a patch to replace > > The Fortran 2003 standard specifies the intrinsic RANDOM_SEED to initialize > the pseudo-random numbers generator and RANDOM_NUMBER to generate > pseudo-random numbers. > > with > > The Fortran 9? standard specifies the intrinsic RANDOM_SEED to initialize > the pseudo-random numbers generator and RANDOM_NUMBER to generate > pseudo-random numbers. These intrinsics should be used in new codes. > I would not not call out a particular standard version. Probably something like The Fortran standard specifies the intrinsic subroutine RANDOM_SEED to initialize the pseudo-random numbers generator and the intrinsic subroutine RANDOM_NUMBER to generate pseudo-random numbers. These subroutines should be used in new codes.
[Bug fortran/67039] Documentation of pseudorandom number intrinsics is incorrect
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67039 --- Comment #4 from Dominique d'Humieres dominiq at lps dot ens.fr --- Resolved as WONTFIX? Probably not. See the last 2 paragraphs in comment #1. Sorry, but my question was motivated by the reading of these two paragraphs!-( Thus two more explicit questions: (1) Shall I submit a patch to replace in the manual all the Fortran 95 and later with Fortran 90 and later where appropriate? (2) Shall I submit a patch to replace The Fortran 2003 standard specifies the intrinsic RANDOM_SEED to initialize the pseudo-random numbers generator and RANDOM_NUMBER to generate pseudo-random numbers. with The Fortran 9? standard specifies the intrinsic RANDOM_SEED to initialize the pseudo-random numbers generator and RANDOM_NUMBER to generate pseudo-random numbers. These intrinsics should be used in new codes. ?
[Bug fortran/67039] Documentation of pseudorandom number intrinsics is incorrect
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67039 Dominique d'Humieres dominiq at lps dot ens.fr changed: What|Removed |Added Status|UNCONFIRMED |WAITING Last reconfirmed||2015-08-29 Ever confirmed|0 |1 --- Comment #2 from Dominique d'Humieres dominiq at lps dot ens.fr --- Resolved as WONTFIX?
[Bug fortran/67039] Documentation of pseudorandom number intrinsics is incorrect
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67039 --- Comment #3 from kargl at gcc dot gnu.org --- (In reply to Dominique d'Humieres from comment #2) Resolved as WONTFIX? Probably not. See the last 2 paragraphs in comment #1.
[Bug fortran/67039] Documentation of pseudorandom number intrinsics is incorrect
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67039 kargl at gcc dot gnu.org changed: What|Removed |Added CC||kargl at gcc dot gnu.org --- Comment #1 from kargl at gcc dot gnu.org --- (In reply to Brian Taylor from comment #0) The gfortran documentation for the RANDOM_NUMBER and RANDOM_SEED subroutines indicates that they are part of Fortran 95 and later. Well, they are part of Fortran 95 and later standards. In fact, they were included in the Fortran 90 standard. Which is irrelevant as gfortran started life with the ambitions to be a Fortran 95 compiler. You'll note that there isn't a -std=f90 nor -std=f77 mode. In fact, you'll find all intrinsic procedures in the documentation that are listed in the Fortran 95 and that also appear Fortran 90 are listed as Fortran 95 and later. The gfortran documentation for the SRAND subroutine, a GNU extension, includes in the Notes section the following: The Fortran 2003 standard specifies the intrinsic RANDOM_SEED to initialize the pseudo-random numbers generator and RANDOM_NUMBER to generate pseudo-random numbers. The reference here should be to the Fortran 90 standard, not 2003. Yeah, this could use some word smithing. It appears to be an attempt to discourage use of srand and rand in favor of the standard intrinsic subprograms. You also left out the most incorrect part of the documentation. gfortran uses 4 independent KISS generators, but implementation details should probably be removed here.