aboutsummaryrefslogtreecommitdiff
path: root/libgfortran/libgfortran.h
diff options
context:
space:
mode:
authorThomas Koenig <Thomas.Koenig@online.de>2006-08-01 17:15:04 +0000
committerThomas Koenig <tkoenig@gcc.gnu.org>2006-08-01 17:15:04 +0000
commitcdc5524fc8255e6303ae90f3089e93998dc8a626 (patch)
tree2c5173e380e77a7fd222230cb14ad82228f9ce72 /libgfortran/libgfortran.h
parenta82f93ac13c4280fdf2b5d48648bfc3f7668406b (diff)
downloadgcc-cdc5524fc8255e6303ae90f3089e93998dc8a626.zip
gcc-cdc5524fc8255e6303ae90f3089e93998dc8a626.tar.gz
gcc-cdc5524fc8255e6303ae90f3089e93998dc8a626.tar.bz2
re PR libfortran/28452 (__gfortran_random_r10 not found)
2006-08-01 Thomas Koenig <Thomas.Koenig@online.de> PR libfortran/28542 * Makefile.am: Remove normalize.c. * aclocal.m4: Regenerate using aclocal 1.9.3. * Makefile.in: Regenerate using automake 1.9.3. * libgfortran.h: #include <float.h>. Define GFC_REAL_*_DIGITS and GFC_REAL_*_RADIX. Remove prototypes for normalize_r4_i4 and normalize_r8_i8. * intrinsics/random.c (top level): Add prototypes for random_r10, arandom_r10, random_r16 and arandom_r16. (rnumber_4): New static function. (rnumber_8): New static function. (rnumber_10): New static function. (rnumber_16): New static function. (top level): Set to kiss_size to 12 if we have REAL(KIND=16), to 8 otherwise. Define KISS_DEFAULT_SEED_1, KISS_DEFAULT_SEED_2 and KISS_DEFAULT_SEED_3. (kiss_random_kernel): Take argument to differentiate between different random number generators. (random_r4): Add argument to call to kiss_random_kernel, use rnumber_*. (random_r8): Likewise. (random_r10): New function. (random_r16): New function. (arandom_r4): Add argument to call to kiss_random_kernel, use_rnumber_*. (arandom_r8): Likewise. (arandom_r10): New function. (arandom_r16): New function. * intrinsics/rand.c (rand): Use shift and mask. * runtime/normalize.c: Remove. 2006-08-01 Thomas Koenig <Thomas.Koenig@online.de> PR libfortran/28542 * gfortran.dg/random_3.f90: New test. From-SVN: r115858
Diffstat (limited to 'libgfortran/libgfortran.h')
-rw-r--r--libgfortran/libgfortran.h27
1 files changed, 19 insertions, 8 deletions
diff --git a/libgfortran/libgfortran.h b/libgfortran/libgfortran.h
index 27abfe8..4d27b65 100644
--- a/libgfortran/libgfortran.h
+++ b/libgfortran/libgfortran.h
@@ -33,6 +33,7 @@ Boston, MA 02110-1301, USA. */
#include <math.h>
#include <stddef.h>
+#include <float.h>
#ifndef M_PI
#define M_PI 3.14159265358979323846264338327
@@ -240,6 +241,24 @@ internal_proto(l8_to_l4_offset);
#define GFC_REAL_16_HUGE LDBL_MAX
#endif
+#define GFC_REAL_4_DIGITS FLT_MANT_DIG
+#define GFC_REAL_8_DIGITS DBL_MANT_DIG
+#ifdef HAVE_GFC_REAL_10
+#define GFC_REAL_10_DIGITS LDBL_MANT_DIG
+#endif
+#ifdef HAVE_GFC_REAL_16
+#define GFC_REAL_16_DIGITS LDBL_MANT_DIG
+#endif
+
+#define GFC_REAL_4_RADIX FLT_RADIX
+#define GFC_REAL_8_RADIX FLT_RADIX
+#ifdef HAVE_GFC_REAL_10
+#define GFC_REAL_10_RADIX FLT_RADIX
+#endif
+#ifdef HAVE_GFC_REAL_16
+#define GFC_REAL_16_RADIX FLT_RADIX
+#endif
+
#ifndef GFC_MAX_DIMENSIONS
#define GFC_MAX_DIMENSIONS 7
#endif
@@ -639,14 +658,6 @@ extern void random_seed (GFC_INTEGER_4 * size, gfc_array_i4 * put,
gfc_array_i4 * get);
iexport_proto(random_seed);
-/* normalize.c */
-
-extern GFC_REAL_4 normalize_r4_i4 (GFC_UINTEGER_4, GFC_UINTEGER_4);
-internal_proto(normalize_r4_i4);
-
-extern GFC_REAL_8 normalize_r8_i8 (GFC_UINTEGER_8, GFC_UINTEGER_8);
-internal_proto(normalize_r8_i8);
-
/* size.c */
typedef GFC_ARRAY_DESCRIPTOR (GFC_MAX_DIMENSIONS, void) array_t;