Paul Brook <paul@codesourcery.com>
authorTobias Schlüter <tobias.schlueter@physik.uni-muenchen.de>
Tue, 29 Jun 2004 22:52:58 +0000 (00:52 +0200)
committerTobias Schlüter <tobi@gcc.gnu.org>
Tue, 29 Jun 2004 22:52:58 +0000 (00:52 +0200)
2004-06-29  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
Paul Brook  <paul@codesourcery.com>

* runtime/normalize.c (normalize_r4_i4, normalize_r8_i8): Fix
comments.
* intrinsics/rand.c (rand): Call irand() in call to normalize_r4_i4.

Co-Authored-By: Paul Brook <paul@codesourcery.com>
From-SVN: r83880

libgfortran/ChangeLog
libgfortran/intrinsics/rand.c
libgfortran/runtime/normalize.c

index 65841f8..749b11f 100644 (file)
@@ -1,3 +1,10 @@
+2004-06-29  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
+       Paul Brook  <paul@codesourcery.com>
+
+       * runtime/normalize.c (normalize_r4_i4, normalize_r8_i8): Fix
+       comments.
+       * intrinsics/rand.c (rand): Call irand() in call to normalize_r4_i4.
+
 2004-06-27  Bud Davis  <bdavis9659@comcast.net>
 
        PR gfortran/12839
index d9add00..4678de4 100644 (file)
@@ -82,5 +82,5 @@ prefix(irand) (GFC_INTEGER_4 *i)
 GFC_REAL_4
 prefix(rand) (GFC_INTEGER_4 *i)
 {
-  return normalize_r4_i4 (i - 1, GFC_RAND_M1);
+  return normalize_r4_i4 (irand (i) - 1, GFC_RAND_M1 - 1);
 }
index a62d71d..ce55376 100644 (file)
@@ -81,7 +81,7 @@ almostone_r8 ()
 }
 
 
-/* Convert an unsigned integer in the range [0..x) into a
+/* Convert an unsigned integer in the range [0..x] into a
    real the range [0..1).  */
 
 GFC_REAL_4
@@ -96,7 +96,7 @@ normalize_r4_i4 (GFC_UINTEGER_4 i, GFC_UINTEGER_4 x)
 }
 
 
-/* Convert an unsigned integer in the range [0..x) into a
+/* Convert an unsigned integer in the range [0..x] into a
    real the range [0..1).  */
 
 GFC_REAL_8