[Bug fortran/32879] New: Document algorithm used for random generator

burnus at gcc dot gnu dot org gcc-bugzilla@gcc.gnu.org
Tue Jul 24 15:09:00 GMT 2007


gfortran has:
 irand() - g77
 rand() - g77
 random_number() - Fortran 90

The algorithm used is different.
Expected:
- State something about the used algorithm
- Point rand() users to random_number() as this algorithm is seemingly better.
  (or make at least clear(er) that the algorithms are different)

Cf. http://gcc.gnu.org/ml/fortran/2007-07/msg00454.html
> There are two random number generators in gfortran, one is a simple modulo 
> generator that is there for compatibility with g77, this is what you get when 
> you call RAND().
>
> The other is the RNG that implements the Fortran 90 RANDOM_NUMBER intrinsic. 
> [...] George Marsaglia's KISS (Keep It Simple Stupid)


-- 
           Summary: Document algorithm used for random generator
           Product: gcc
           Version: 4.3.0
            Status: UNCONFIRMED
          Keywords: documentation
          Severity: normal
          Priority: P3
         Component: fortran
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: burnus at gcc dot gnu dot org


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32879



More information about the Gcc-bugs mailing list