summaryrefslogtreecommitdiff
path: root/ui_sub.c
diff options
context:
space:
mode:
authorvlefevre <vlefevre@280ebfd0-de03-0410-8827-d642c229c3f4>2002-02-04 01:04:59 +0000
committervlefevre <vlefevre@280ebfd0-de03-0410-8827-d642c229c3f4>2002-02-04 01:04:59 +0000
commit0a6ebfd2487ea512bebedfb443fa21215317fa6d (patch)
treef18ce79265c836f999a0e4d03c4603390d5004c2 /ui_sub.c
parentefda43b6e76bc87eee0892e260b610faebf8416c (diff)
downloadmpfr-0a6ebfd2487ea512bebedfb443fa21215317fa6d.tar.gz
Misc bug fixes and code clean-up.
git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@1681 280ebfd0-de03-0410-8827-d642c229c3f4
Diffstat (limited to 'ui_sub.c')
-rw-r--r--ui_sub.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/ui_sub.c b/ui_sub.c
index 144a9b942..65e96456c 100644
--- a/ui_sub.c
+++ b/ui_sub.c
@@ -1,6 +1,6 @@
-/* mpfr_ui_sub -- divide a machine integer by a floating-point number
+/* mpfr_ui_sub -- subtract a floating-point number from an integer
-Copyright (C) 2000, 2001 Free Software Foundation, Inc.
+Copyright (C) 2000-2002 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 <stdio.h>
#include "gmp.h"
#include "gmp-impl.h"
#include "longlong.h"
@@ -36,7 +35,7 @@ mpfr_ui_sub (mpfr_ptr y, unsigned long int u, mpfr_srcptr x, mp_rnd_t rnd_mode)
if (MPFR_IS_NAN(x))
{
MPFR_SET_NAN(y);
- return 1; /* a NaN is inexact */
+ MPFR_RET_NAN;
}
MPFR_CLEAR_NAN(y);
@@ -46,7 +45,7 @@ mpfr_ui_sub (mpfr_ptr y, unsigned long int u, mpfr_srcptr x, mp_rnd_t rnd_mode)
MPFR_SET_INF(y);
if (MPFR_SIGN(x) == MPFR_SIGN(y))
MPFR_CHANGE_SIGN(y);
- return 0; /* +/-infinity is exact */
+ MPFR_RET(0); /* +/-infinity is exact */
}
if (u) {