diff options
author | tobi <tobi@138bc75d-0d04-0410-961f-82ee72b054a4> | 2004-06-29 22:52:58 +0000 |
---|---|---|
committer | tobi <tobi@138bc75d-0d04-0410-961f-82ee72b054a4> | 2004-06-29 22:52:58 +0000 |
commit | 8acd583624bdd14dacda3f0f1deb04180ae05bac (patch) | |
tree | 33f194e6e87cabdd4b26008174916dc89723b98d /libgfortran | |
parent | 9d6f56533d2775a66d64d2fa4daebfe53e2fe2b7 (diff) | |
download | gcc-8acd583624bdd14dacda3f0f1deb04180ae05bac.tar.gz |
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.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@83880 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libgfortran')
-rw-r--r-- | libgfortran/ChangeLog | 7 | ||||
-rw-r--r-- | libgfortran/intrinsics/rand.c | 2 | ||||
-rw-r--r-- | libgfortran/runtime/normalize.c | 4 |
3 files changed, 10 insertions, 3 deletions
diff --git a/libgfortran/ChangeLog b/libgfortran/ChangeLog index 65841f833f7..749b11f3e6d 100644 --- a/libgfortran/ChangeLog +++ b/libgfortran/ChangeLog @@ -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 diff --git a/libgfortran/intrinsics/rand.c b/libgfortran/intrinsics/rand.c index d9add00af6f..4678de4aa0a 100644 --- a/libgfortran/intrinsics/rand.c +++ b/libgfortran/intrinsics/rand.c @@ -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); } diff --git a/libgfortran/runtime/normalize.c b/libgfortran/runtime/normalize.c index a62d71dc5f0..ce553762a0b 100644 --- a/libgfortran/runtime/normalize.c +++ b/libgfortran/runtime/normalize.c @@ -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 |