summaryrefslogtreecommitdiff
path: root/tests/tadd.c
diff options
context:
space:
mode:
authorpelissip <pelissip@280ebfd0-de03-0410-8827-d642c229c3f4>2003-12-15 14:39:35 +0000
committerpelissip <pelissip@280ebfd0-de03-0410-8827-d642c229c3f4>2003-12-15 14:39:35 +0000
commit2c85730f36ac232ff81bda66687af824546a81c7 (patch)
tree686c58a7b3d868f56d430a31800748713801680e /tests/tadd.c
parentc0fca7cac78d758cb0bb6eaaad5f4463b96bd376 (diff)
downloadmpfr-2c85730f36ac232ff81bda66687af824546a81c7.tar.gz
+ Optimize a few div.c
+ Remove some warnings in asin.c, atan.c. + Include limits.h before gmp-impl.h in mpfr-impl.h + mpfr-tests.h doesn't include anumore standard include files. + Test files include only standard includes and mpfr-tests.h. + Add some forgotten mpfr_clear in mpf[r]_compat. + Remove some warnings in the tests. git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@2576 280ebfd0-de03-0410-8827-d642c229c3f4
Diffstat (limited to 'tests/tadd.c')
-rw-r--r--tests/tadd.c14
1 files changed, 10 insertions, 4 deletions
diff --git a/tests/tadd.c b/tests/tadd.c
index c910cc264..df32b5e97 100644
--- a/tests/tadd.c
+++ b/tests/tadd.c
@@ -25,10 +25,7 @@ MA 02111-1307, USA. */
#include <stdlib.h>
#include <float.h>
#include <time.h>
-#include "gmp.h"
-#include "gmp-impl.h"
-#include "mpfr.h"
-#include "mpfr-impl.h"
+
#include "mpfr-test.h"
/* Parameter "z1" of check() used to be last in the argument list, but that
@@ -61,10 +58,19 @@ _check (double x, double y, double z1, mp_rnd_t rnd_mode, unsigned int px,
mpfr_set_d (yy, z2, GMP_RNDN);
if (!mpfr_cmp (zz, yy) && cert && z1!=z2 && !(Isnan(z1) && Isnan(z2)))
{
+ /* If the format is not IEEE, we can't really check if it fails
+ (The mantissa could be != 53 bits and the base could be 10)*/
+#if _GMP_IEEE_FLOATS
printf ("expected sum is %1.20e, got %1.20e\n", z1, z2);
printf ("mpfr_add failed for x=%1.20e y=%1.20e with rnd_mode=%s\n",
x, y, mpfr_print_rnd_mode (rnd_mode));
exit (1);
+#else
+ printf ("Warning: expected sum is %1.20e, got %1.20e\n", z1, z2);
+ printf ("mpfr_add could have failed for x=%1.20e y=%1.20e"
+ "with rnd_mode=%s\n",
+ x, y, mpfr_print_rnd_mode (rnd_mode));
+#endif
}
mpfr_clear (xx);
mpfr_clear (yy);