summaryrefslogtreecommitdiff
path: root/set_prc_raw.c
diff options
context:
space:
mode:
authorvlefevre <vlefevre@280ebfd0-de03-0410-8827-d642c229c3f4>2004-01-14 17:18:34 +0000
committervlefevre <vlefevre@280ebfd0-de03-0410-8827-d642c229c3f4>2004-01-14 17:18:34 +0000
commitf9106da753829c3adca5c0cf8c38c4608cc34218 (patch)
tree2cbb6e0fc012305dc760d50ec8cb93f5b8e746ce /set_prc_raw.c
parent0a40b14f2ae6f51268df552f999845f23de4a321 (diff)
downloadmpfr-f9106da753829c3adca5c0cf8c38c4608cc34218.tar.gz
Changed some error messages into assertions.
Removed some useless #include's. git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@2622 280ebfd0-de03-0410-8827-d642c229c3f4
Diffstat (limited to 'set_prc_raw.c')
-rw-r--r--set_prc_raw.c14
1 files changed, 3 insertions, 11 deletions
diff --git a/set_prc_raw.c b/set_prc_raw.c
index 2bc8e1d45..aa1eb5afe 100644
--- a/set_prc_raw.c
+++ b/set_prc_raw.c
@@ -1,6 +1,6 @@
/* mpfr_set_prec_raw -- reset the precision of a floating-point number
-Copyright 2000, 2001 Free Software Foundation, Inc.
+Copyright 2000, 2001, 2004 Free Software Foundation, Inc.
This file is part of the MPFR Library.
@@ -19,8 +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 <stdio.h>
-#include <stdlib.h>
#include "gmp.h"
#include "gmp-impl.h"
#include "mpfr.h"
@@ -29,13 +27,7 @@ MA 02111-1307, USA. */
void
mpfr_set_prec_raw (mpfr_ptr x, mpfr_prec_t p)
{
- MPFR_ASSERTN(p >= MPFR_PREC_MIN && p <= MPFR_PREC_MAX);
-
- if (p > (mpfr_prec_t) MPFR_GET_ALLOC_SIZE(x) * BITS_PER_MP_LIMB)
- {
- fprintf (stderr, "*** precision too large for allocated space\n");
- exit (1);
- }
-
+ MPFR_ASSERTN (p >= MPFR_PREC_MIN && p <= MPFR_PREC_MAX);
+ MPFR_ASSERTN (p <= (mpfr_prec_t) MPFR_GET_ALLOC_SIZE(x) * BITS_PER_MP_LIMB);
MPFR_PREC(x) = p;
}