diff options
Diffstat (limited to 'tests')
-rw-r--r-- | tests/tadd.c | 2 | ||||
-rw-r--r-- | tests/tcmp.c | 3 | ||||
-rw-r--r-- | tests/tcos.c | 3 | ||||
-rw-r--r-- | tests/tdiv.c | 2 | ||||
-rw-r--r-- | tests/tdiv_ui.c | 2 | ||||
-rw-r--r-- | tests/texp.c | 3 | ||||
-rw-r--r-- | tests/tlog.c | 3 | ||||
-rw-r--r-- | tests/tmul.c | 2 | ||||
-rw-r--r-- | tests/tset_d.c | 2 | ||||
-rw-r--r-- | tests/tsin.c | 3 | ||||
-rw-r--r-- | tests/tsin_cos.c | 26 | ||||
-rw-r--r-- | tests/tsqrt.c | 3 | ||||
-rw-r--r-- | tests/tsqrt_ui.c | 3 | ||||
-rw-r--r-- | tests/tsub_ui.c | 3 |
14 files changed, 29 insertions, 31 deletions
diff --git a/tests/tadd.c b/tests/tadd.c index 24a941d24..00fa49ec0 100644 --- a/tests/tadd.c +++ b/tests/tadd.c @@ -1,6 +1,6 @@ /* Test file for mpfr_add and mpfr_sub. -Copyright 1999, 2000, 2001, 2002 Free Software Foundation. +Copyright 1999, 2000, 2001, 2002, 2003 Free Software Foundation. This file is part of the MPFR Library. diff --git a/tests/tcmp.c b/tests/tcmp.c index e16b862ed..a1bf851be 100644 --- a/tests/tcmp.c +++ b/tests/tcmp.c @@ -1,6 +1,6 @@ /* Test file for mpfr_cmp. -Copyright 1999, 2001, 2002 Free Software Foundation, Inc. +Copyright 1999, 2001, 2002, 2003 Free Software Foundation, Inc. This file is part of the MPFR Library. @@ -21,7 +21,6 @@ MA 02111-1307, USA. */ #include <stdio.h> #include <stdlib.h> -#include <math.h> #include "gmp.h" #include "mpfr.h" #include "mpfr-impl.h" diff --git a/tests/tcos.c b/tests/tcos.c index c0581e2eb..65c5c2100 100644 --- a/tests/tcos.c +++ b/tests/tcos.c @@ -1,6 +1,6 @@ /* Test file for mpfr_cos. -Copyright 2001, 2002 Free Software Foundation, Inc. +Copyright 2001, 2002, 2003 Free Software Foundation, Inc. This file is part of the MPFR Library. @@ -21,7 +21,6 @@ MA 02111-1307, USA. */ #include <stdio.h> #include <stdlib.h> -#include <math.h> #include "gmp.h" #include "mpfr.h" #include "mpfr-impl.h" diff --git a/tests/tdiv.c b/tests/tdiv.c index 338bb061b..029cedb12 100644 --- a/tests/tdiv.c +++ b/tests/tdiv.c @@ -1,6 +1,6 @@ /* Test file for mpfr_div. -Copyright 1999, 2001, 2002 Free Software Foundation, Inc. +Copyright 1999, 2001, 2002, 2003 Free Software Foundation, Inc. This file is part of the MPFR Library. diff --git a/tests/tdiv_ui.c b/tests/tdiv_ui.c index 7cebf8c94..2feecaf07 100644 --- a/tests/tdiv_ui.c +++ b/tests/tdiv_ui.c @@ -1,6 +1,6 @@ /* Test file for mpfr_div_ui. -Copyright 1999, 2000, 2001, 2002 Free Software Foundation. +Copyright 1999, 2000, 2001, 2002, 2003 Free Software Foundation. This file is part of the MPFR Library. diff --git a/tests/texp.c b/tests/texp.c index da2cf1ab9..c5af39d69 100644 --- a/tests/texp.c +++ b/tests/texp.c @@ -1,6 +1,6 @@ /* Test file for mpfr_exp. -Copyright 1999, 2001, 2002 Free Software Foundation, Inc. +Copyright 1999, 2001, 2002, 2003 Free Software Foundation, Inc. This file is part of the MPFR Library. @@ -19,7 +19,6 @@ along with the MPFR Library; see the file COPYING.LIB. If not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -#include <math.h> #include <stdio.h> #include <stdlib.h> #include <time.h> diff --git a/tests/tlog.c b/tests/tlog.c index af388488e..df5d26c62 100644 --- a/tests/tlog.c +++ b/tests/tlog.c @@ -1,6 +1,6 @@ /* Test file for mpfr_log. -Copyright 1999, 2001, 2002 Free Software Foundation, Inc. +Copyright 1999, 2001, 2002, 2003 Free Software Foundation, Inc. This file is part of the MPFR Library. @@ -21,7 +21,6 @@ MA 02111-1307, USA. */ #include <stdio.h> #include <stdlib.h> -#include <math.h> #include <time.h> #include "gmp.h" #include "mpfr.h" diff --git a/tests/tmul.c b/tests/tmul.c index 533ceef5e..9394594ee 100644 --- a/tests/tmul.c +++ b/tests/tmul.c @@ -1,6 +1,6 @@ /* Test file for mpfr_mul. -Copyright 1999, 2001, 2002 Free Software Foundation, Inc. +Copyright 1999, 2001, 2002, 2003 Free Software Foundation, Inc. This file is part of the MPFR Library. diff --git a/tests/tset_d.c b/tests/tset_d.c index 5a30148a4..2b3c4578b 100644 --- a/tests/tset_d.c +++ b/tests/tset_d.c @@ -1,6 +1,6 @@ /* Test file for mpfr_set_d and mpfr_get_d. -Copyright 1999, 2000, 2001, 2002 Free Software Foundation, Inc. +Copyright 1999, 2000, 2001, 2002, 2003 Free Software Foundation, Inc. This file is part of the MPFR Library. diff --git a/tests/tsin.c b/tests/tsin.c index 68ccd006d..85795bef8 100644 --- a/tests/tsin.c +++ b/tests/tsin.c @@ -1,6 +1,6 @@ /* Test file for mpfr_sin. -Copyright 2001, 2002 Free Software Foundation, Inc. +Copyright 2001, 2002, 2003 Free Software Foundation, Inc. This file is part of the MPFR Library. @@ -21,7 +21,6 @@ MA 02111-1307, USA. */ #include <stdio.h> #include <stdlib.h> -#include <math.h> #include "gmp.h" #include "mpfr.h" #include "mpfr-impl.h" diff --git a/tests/tsin_cos.c b/tests/tsin_cos.c index 0a2559e5e..582f37aa9 100644 --- a/tests/tsin_cos.c +++ b/tests/tsin_cos.c @@ -1,6 +1,6 @@ /* Test file for mpfr_sin_cos. -Copyright 2000, 2001, 2002 Free Software Foundation, Inc. +Copyright 2000, 2001, 2002, 2003 Free Software Foundation, Inc. This file is part of the MPFR Library. @@ -21,9 +21,10 @@ MA 02111-1307, USA. */ #include <stdio.h> #include <stdlib.h> -#include <math.h> #include "gmp.h" #include "mpfr.h" +#include "mpfr-impl.h" +#include "mpfr-test.h" void large_test _PROTO ((int, int)); void check53 _PROTO ((double, double, double, mp_rnd_t)); @@ -79,12 +80,13 @@ void check53 (double x, double sin_x, double cos_x, mp_rnd_t rnd_mode) void check53sin (double x, double sin_x, mp_rnd_t rnd_mode) { - mpfr_t xx, s; + mpfr_t xx, s, c; mpfr_init2 (xx, 53); mpfr_init2 (s, 53); + mpfr_init2 (c, 53); mpfr_set_d (xx, x, rnd_mode); /* should be exact */ - mpfr_sin_cos (s, NULL, xx, rnd_mode); + mpfr_sin_cos (s, c, xx, rnd_mode); if (mpfr_get_d1 (s) != sin_x && !(Isnan(sin_x) && mpfr_nan_p(s))) { fprintf (stderr, "mpfr_sin_cos failed for x=%1.20e, rnd=%s\n", x, @@ -95,16 +97,18 @@ void check53sin (double x, double sin_x, mp_rnd_t rnd_mode) } mpfr_clear (xx); mpfr_clear (s); + mpfr_clear (c); } void check53cos (double x, double cos_x, mp_rnd_t rnd_mode) { - mpfr_t xx, c; + mpfr_t xx, c, s; mpfr_init2 (xx, 53); mpfr_init2 (c, 53); + mpfr_init2 (s, 53); mpfr_set_d (xx, x, rnd_mode); /* should be exact */ - mpfr_sin_cos (NULL, c, xx, rnd_mode); + mpfr_sin_cos (s, c, xx, rnd_mode); if (mpfr_get_d1 (c) != cos_x && !(Isnan(cos_x) && mpfr_nan_p(c))) { fprintf (stderr, "mpfr_sin_cos failed for x=%1.20e, rnd=%s\n", x, @@ -115,15 +119,17 @@ void check53cos (double x, double cos_x, mp_rnd_t rnd_mode) } mpfr_clear (xx); mpfr_clear (c); + mpfr_clear (s); } /* tsin_cos prec [N] performs N tests with prec bits */ int main(int argc, char *argv[]) { - if (argc > 1) { - large_test (atoi (argv[1]), (argc > 2) ? atoi (argv[2]) : 1); - } + if (argc > 1) + { + large_test (atoi (argv[1]), (argc > 2) ? atoi (argv[2]) : 1); + } #ifdef HAVE_INFS check53 (DBL_NAN, DBL_NAN, DBL_NAN, GMP_RNDN); @@ -148,7 +154,7 @@ main(int argc, char *argv[]) check53 (1.00591265847407274059, 8.446508805292128885e-1, 0.53531755997839769456, GMP_RNDN); - /* check with one argument NULL */ + /* check one argument only */ check53sin (1.00591265847407274059, 8.446508805292128885e-1, GMP_RNDN); check53cos (1.00591265847407274059, 0.53531755997839769456, GMP_RNDN); diff --git a/tests/tsqrt.c b/tests/tsqrt.c index 32850baf9..dc97700b2 100644 --- a/tests/tsqrt.c +++ b/tests/tsqrt.c @@ -1,6 +1,6 @@ /* Test file for mpfr_sqrt. -Copyright 1999, 2001, 2002 Free Software Foundation, Inc. +Copyright 1999, 2001, 2002, 2003 Free Software Foundation, Inc. This file is part of the MPFR Library. @@ -19,7 +19,6 @@ along with the MPFR Library; see the file COPYING.LIB. If not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -#include <math.h> #include <stdio.h> #include <stdlib.h> #include <time.h> diff --git a/tests/tsqrt_ui.c b/tests/tsqrt_ui.c index 1ccef56e9..558515507 100644 --- a/tests/tsqrt_ui.c +++ b/tests/tsqrt_ui.c @@ -1,6 +1,6 @@ /* Test file for mpfr_sqrt_ui. -Copyright 2000, 2001, 2002 Free Software Foundation, Inc. +Copyright 2000, 2001, 2002, 2003 Free Software Foundation, Inc. This file is part of the MPFR Library. @@ -19,7 +19,6 @@ along with the MPFR Library; see the file COPYING.LIB. If not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -#include <math.h> #include <stdio.h> #include <stdlib.h> #include <time.h> diff --git a/tests/tsub_ui.c b/tests/tsub_ui.c index b5f2d0034..354a22539 100644 --- a/tests/tsub_ui.c +++ b/tests/tsub_ui.c @@ -1,6 +1,6 @@ /* Test file for mpfr_sub_ui -Copyright 2000, 2001, 2002 Free Software Foundation. +Copyright 2000, 2001, 2002, 2003 Free Software Foundation. This file is part of the MPFR Library. @@ -19,7 +19,6 @@ along with the MPFR Library; see the file COPYING.LIB. If not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -#include <math.h> #include <stdio.h> #include <stdlib.h> #include <float.h> |