mirror of git://gcc.gnu.org/git/gcc.git
random.c: Fix several spelling and formatting mistakes in comments.
* random.c: Fix several spelling and formatting mistakes in comments. (random_r8): Fix loop to make random numbers range in [0,1(. Co-Authored-By: Tobias Schlüter <tobias.schlueter@physik.uni-muenchen.de> From-SVN: r83063
This commit is contained in:
parent
9d409075cb
commit
cdaa9fc44c
|
|
@ -1,3 +1,11 @@
|
|||
2004-06-13 Steven G. Kargl <kargls@comcast.net>
|
||||
Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
|
||||
|
||||
* random.c: Fix several spelling and formatting mistakes in
|
||||
comments.
|
||||
(random_r8): Fix loop to make random numbers range in [0,1(.
|
||||
|
||||
|
||||
2004-06-13 Steven G. Kargl <kargls@comcast.net>
|
||||
|
||||
* random.c (random_r4): Burn a random number.
|
||||
|
|
|
|||
|
|
@ -449,7 +449,7 @@ kiss_random_kernel(void)
|
|||
|
||||
}
|
||||
|
||||
/* This function produces a REAL(4) value in the uniform distribution
|
||||
/* This function produces a REAL(4) value from the uniform distribution
|
||||
with range [0,1). */
|
||||
|
||||
void
|
||||
|
|
@ -485,7 +485,7 @@ prefix(random_r8) (GFC_REAL_8 *x)
|
|||
+ kiss_random_kernel ();
|
||||
*x = (GFC_REAL_8)kiss / (GFC_REAL_8)(~(GFC_UINTEGER_8) 0);
|
||||
}
|
||||
while (*x == 0);
|
||||
while (*x == 1.0);
|
||||
|
||||
}
|
||||
|
||||
|
|
@ -554,7 +554,7 @@ prefix(arandom_r4) (gfc_array_r4 *x)
|
|||
}
|
||||
}
|
||||
|
||||
/* This function fills a REAL(8) array with valuse from the uniform
|
||||
/* This function fills a REAL(8) array with values from the uniform
|
||||
distribution with range [0,1). */
|
||||
|
||||
void
|
||||
|
|
@ -620,7 +620,7 @@ prefix(arandom_r8) (gfc_array_r8 *x)
|
|||
}
|
||||
|
||||
/* prefix(random_seed) is used to seed the PRNG with either a default
|
||||
set of seeds or user specified set of seed. prefix(random_seed)
|
||||
set of seeds or user specified set of seeds. prefix(random_seed)
|
||||
must be called with no argument or exactly one argument. */
|
||||
|
||||
void
|
||||
|
|
@ -645,11 +645,11 @@ random_seed (GFC_INTEGER_4 *size, gfc_array_i4 * put,
|
|||
|
||||
if (put != NULL)
|
||||
{
|
||||
/* If the rank of the array is not 1, abort */
|
||||
/* If the rank of the array is not 1, abort. */
|
||||
if (GFC_DESCRIPTOR_RANK (put) != 1)
|
||||
runtime_error ("Array rank of PUT is not 1.");
|
||||
|
||||
/* If the array is too small, abort */
|
||||
/* If the array is too small, abort. */
|
||||
if (((put->dim[0].ubound + 1 - put->dim[0].lbound)) < kiss_size)
|
||||
runtime_error ("Array size of PUT is too small.");
|
||||
|
||||
|
|
@ -661,7 +661,7 @@ random_seed (GFC_INTEGER_4 *size, gfc_array_i4 * put,
|
|||
kiss_seed[i] =(GFC_UINTEGER_4) put->data[i * put->dim[0].stride];
|
||||
}
|
||||
|
||||
/* Return the seed to GET data */
|
||||
/* Return the seed to GET data. */
|
||||
if (get != NULL)
|
||||
{
|
||||
/* If the rank of the array is not 1, abort. */
|
||||
|
|
|
|||
Loading…
Reference in New Issue