summaryrefslogtreecommitdiff
path: root/tests/tgamma.c
diff options
context:
space:
mode:
authorvlefevre <vlefevre@280ebfd0-de03-0410-8827-d642c229c3f4>2006-11-20 11:36:25 +0000
committervlefevre <vlefevre@280ebfd0-de03-0410-8827-d642c229c3f4>2006-11-20 11:36:25 +0000
commit453177eaa82149417edf497a06d38635121b915c (patch)
tree5685e2ac31a876a4d132985d87e3871a087451d7 /tests/tgamma.c
parent329346c8c76a7cc9ffa5ab792276e06ab983ad44 (diff)
downloadmpfr-453177eaa82149417edf497a06d38635121b915c.tar.gz
tests/tgamma.c: restore emin and emax to their default values.
git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@4250 280ebfd0-de03-0410-8827-d642c229c3f4
Diffstat (limited to 'tests/tgamma.c')
-rw-r--r--tests/tgamma.c15
1 files changed, 9 insertions, 6 deletions
diff --git a/tests/tgamma.c b/tests/tgamma.c
index 9e8ca7746..73b0526de 100644
--- a/tests/tgamma.c
+++ b/tests/tgamma.c
@@ -196,9 +196,12 @@ static void
special_overflow (void)
{
mpfr_t x, y;
- mp_exp_t emin = mpfr_get_emin ();
+ mp_exp_t emin, emax;
int inex;
+ emin = mpfr_get_emin ();
+ emax = mpfr_get_emax ();
+
set_emin (-125);
set_emax (128);
@@ -254,7 +257,7 @@ special_overflow (void)
printf ("got "); mpfr_dump (y);
exit (1);
}
-
+
/* another tests from Kenneth Wilder, 31 Aug 2005 */
set_emax (200);
set_emin (-200);
@@ -309,7 +312,7 @@ special_overflow (void)
mpfr_set_prec (x, 171);
mpfr_set_prec (y, 38);
mpfr_set_str (x, "-2993155353253689176481146537402947624254601559176535", 10,
- GMP_RNDN);
+ GMP_RNDN);
mpfr_div_2exp (x, x, 170, GMP_RNDN);
mpfr_gamma (y, x, GMP_RNDN);
mpfr_set_prec (x, 38);
@@ -327,7 +330,7 @@ special_overflow (void)
mpfr_set_prec (x, 337);
mpfr_set_prec (y, 38);
mpfr_set_str (x, "-30000.000000000000000000000000000000000000000000001", 10,
- GMP_RNDN);
+ GMP_RNDN);
mpfr_gamma (y, x, GMP_RNDN);
mpfr_set_prec (x, 38);
mpfr_set_str (x, "-3.623795987425E-121243", 10, GMP_RNDN);
@@ -390,8 +393,8 @@ special_overflow (void)
mpfr_clear (y);
mpfr_clear (x);
- set_emin (MPFR_EMIN_MIN);
- set_emax (MPFR_EMAX_MAX);
+ set_emin (emin);
+ set_emax (emax);
}
int