summaryrefslogtreecommitdiff
path: root/eint.c
diff options
context:
space:
mode:
authorvlefevre <vlefevre@280ebfd0-de03-0410-8827-d642c229c3f4>2006-11-10 14:54:19 +0000
committervlefevre <vlefevre@280ebfd0-de03-0410-8827-d642c229c3f4>2006-11-10 14:54:19 +0000
commitaf1059b4ef8fdb4832ce68c459ebfc4a7743c594 (patch)
tree974ebefefdd44a098cd62d9486847330350210dc /eint.c
parent8610af7640d22c352fdfdd7c15c941157671a4b1 (diff)
downloadmpfr-af1059b4ef8fdb4832ce68c459ebfc4a7743c594.tar.gz
Added warnings support.
* configure.in: added --enable-warnings configure option. * mpfr-impl.h: defined MPFR_WARNING(W) macro. * eint.c, erfc.c: use MPFR_WARNING instead of fprintf. * tests/Makefile.am (new-generic-tests branch): run the tests with MPFR_QUIET=1 to avoid output of useless warnings, as some tests (with large arguments) can generate such warnings, which are all expected. git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@4208 280ebfd0-de03-0410-8827-d642c229c3f4
Diffstat (limited to 'eint.c')
-rw-r--r--eint.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/eint.c b/eint.c
index 099f67060..c70e1d9f3 100644
--- a/eint.c
+++ b/eint.c
@@ -19,7 +19,8 @@ along with the MPFR Library; see the file COPYING.LIB. If not, write to
the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
MA 02110-1301, USA. */
-#include <stdio.h>
+#include <stdio.h> /* for MPFR_WARNING */
+#include <stdlib.h> /* for MPFR_WARNING */
#include <limits.h>
#define MPFR_NEED_LONGLONG_H
#include "mpfr-impl.h"
@@ -232,7 +233,7 @@ mpfr_eint (mpfr_ptr y, mpfr_srcptr x, mp_rnd_t rnd)
/* FIXME: Improve the algorithm to be able to compute the actual
value. For the time being, we regard this as a range error,
so that the caller can cleanly deal with the problem. */
- fprintf (stderr, "MPFR: Error, too large input in mpfr_eint\n");
+ MPFR_WARNING ("Too large input in mpfr_eint, returning NaN");
MPFR_ZIV_FREE (loop);
mpfr_clear (tmp);
mpfr_clear (ump);