diff options
author | Kevin Ryde <user42@zip.com.au> | 2001-10-26 02:44:02 +0200 |
---|---|---|
committer | Kevin Ryde <user42@zip.com.au> | 2001-10-26 02:44:02 +0200 |
commit | ad93724dd8f9038cb8f2a669629082374b644d7c (patch) | |
tree | 4357e998196acf9408ad22f8deaac875310f8ba4 /tests | |
parent | 8fa8eb0904890c90ea4bf8a1d14d14e99dfdeb2e (diff) | |
download | gmp-ad93724dd8f9038cb8f2a669629082374b644d7c.tar.gz |
* tests/mpq/t-get_d.c: Limit the size of "eps" for vax.
Diffstat (limited to 'tests')
-rw-r--r-- | tests/mpq/t-get_d.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/tests/mpq/t-get_d.c b/tests/mpq/t-get_d.c index 9743ef790..91e0282a5 100644 --- a/tests/mpq/t-get_d.c +++ b/tests/mpq/t-get_d.c @@ -30,9 +30,14 @@ MA 02111-1307, USA. */ #define SIZE 8 #endif +/* VAX D floats only have an 8 bit signed exponent, so anything 2^128 or + bigger will overflow, that being 4 limbs. */ #if defined (__vax__) && SIZE > 4 #undef SIZE #define SIZE 4 +#define EPSIZE 3 +#else +#define EPSIZE SIZE #endif void dump _PROTO ((mpq_t)); @@ -78,9 +83,9 @@ main (int argc, char **argv) mpq_set_d (qlast_d, last_d); for (j = 0; j < 10; j++) { - size = urandom () % SIZE + 1; + size = urandom () % EPSIZE + 1; mpz_random2 (mpq_numref (eps), size); - size = urandom () % SIZE + 1; + size = urandom () % EPSIZE + 1; mpz_random2 (mpq_denref (eps), size); mpq_canonicalize (eps); |