diff options
author | pelissip <pelissip@280ebfd0-de03-0410-8827-d642c229c3f4> | 2005-06-02 07:40:56 +0000 |
---|---|---|
committer | pelissip <pelissip@280ebfd0-de03-0410-8827-d642c229c3f4> | 2005-06-02 07:40:56 +0000 |
commit | ec74eb2b3c69c8472392bdc2c262d5d0ca58e309 (patch) | |
tree | b8d9139c5b128a33100aa3dfb7cd5cb598b3c83e /tests/tconst_pi.c | |
parent | 48033b252ade6819b0c2407f8c48c3fdc425aaf6 (diff) | |
download | mpfr-ec74eb2b3c69c8472392bdc2c262d5d0ca58e309.tar.gz |
Fix input precision of mp_prec_t.
May be outside 'int' range. So it uses 'long' instead and
a proper check.
git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@3598 280ebfd0-de03-0410-8827-d642c229c3f4
Diffstat (limited to 'tests/tconst_pi.c')
-rw-r--r-- | tests/tconst_pi.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/tests/tconst_pi.c b/tests/tconst_pi.c index 432381edb..0db098d6b 100644 --- a/tests/tconst_pi.c +++ b/tests/tconst_pi.c @@ -56,7 +56,7 @@ int main (int argc, char *argv[]) { mpfr_t x; - int p; + mp_prec_t p; mp_rnd_t rnd; tests_start_mpfr (); @@ -64,8 +64,8 @@ main (int argc, char *argv[]) p = 53; if (argc > 1) { - int a = atoi (argv[1]); - if (a != 0) + long a = atol (argv[1]); + if (a >= MPFR_PREC_MIN && a <= MPFR_PREC_MAX) p = a; } |