diff options
author | zimmerma <zimmerma@280ebfd0-de03-0410-8827-d642c229c3f4> | 2001-10-12 12:19:49 +0000 |
---|---|---|
committer | zimmerma <zimmerma@280ebfd0-de03-0410-8827-d642c229c3f4> | 2001-10-12 12:19:49 +0000 |
commit | 7ce367c13c886efa67c48700ac6e0ddfed50496c (patch) | |
tree | a71f9205e6c77e013d657eeb55ae53548760052f /neg.c | |
parent | c8e74671b4d7975cf386535eecdc2977c29abb29 (diff) | |
download | mpfr-7ce367c13c886efa67c48700ac6e0ddfed50496c.tar.gz |
implemented inexact flag
git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@1237 280ebfd0-de03-0410-8827-d642c229c3f4
Diffstat (limited to 'neg.c')
-rw-r--r-- | neg.c | 15 |
1 files changed, 10 insertions, 5 deletions
@@ -1,8 +1,9 @@ /* mpfr_neg -- change the sign of a floating-point number -Copyright (C) 1999 Free Software Foundation. +Copyright (C) 1999-2001 Free Software Foundation. This file is part of the MPFR Library. +Contributed by the Spaces project (LORIA/LIP6). The MPFR Library is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published by @@ -24,7 +25,7 @@ MA 02111-1307, USA. */ #include "mpfr.h" #include "mpfr-impl.h" -void +int #if __STDC__ mpfr_neg (mpfr_ptr a, mpfr_srcptr b, mp_rnd_t rnd_mode) #else @@ -34,7 +35,11 @@ mpfr_neg (a, b, rnd_mode) mp_rnd_t rnd_mode; #endif { - if (a != b) mpfr_set4(a, b, rnd_mode, -MPFR_SIGN(b)); - else MPFR_CHANGE_SIGN(a); - return; + if (a != b) + return mpfr_set4 (a, b, rnd_mode, -MPFR_SIGN(b)); + else + { + MPFR_CHANGE_SIGN(a); + return 0; + } } |