diff options
author | zimmerma <zimmerma@280ebfd0-de03-0410-8827-d642c229c3f4> | 2004-02-12 11:06:02 +0000 |
---|---|---|
committer | zimmerma <zimmerma@280ebfd0-de03-0410-8827-d642c229c3f4> | 2004-02-12 11:06:02 +0000 |
commit | de270d93ff8bda096cf06fb8cee328ef221a5da8 (patch) | |
tree | fbab636f164aa6780ac6b1ea787ee578d8c70e74 /dim.c | |
parent | 42b84d65710af7fb156a581dd9715332a10e6765 (diff) | |
download | mpfr-de270d93ff8bda096cf06fb8cee328ef221a5da8.tar.gz |
new test file for mpfr_dim
git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@2679 280ebfd0-de03-0410-8827-d642c229c3f4
Diffstat (limited to 'dim.c')
-rw-r--r-- | dim.c | 10 |
1 files changed, 5 insertions, 5 deletions
@@ -1,4 +1,4 @@ -/* mpfr_dim -- dim of x, y +/* mpfr_dim -- positive difference Copyright 2001, 2002, 2004 Free Software Foundation. @@ -21,11 +21,11 @@ MA 02111-1307, USA. */ #include "mpfr-impl.h" - /* The computation of z=dim(x,y) +/* dim (x,y) is defined as: x-y if x > y +0 if x <= y - */ +*/ int mpfr_dim (mpfr_ptr z, mpfr_srcptr x ,mpfr_srcptr y , mp_rnd_t rnd_mode) @@ -39,8 +39,8 @@ mpfr_dim (mpfr_ptr z, mpfr_srcptr x ,mpfr_srcptr y , mp_rnd_t rnd_mode) } } - if (mpfr_cmp(x,y) > 0) - return mpfr_sub(z, x, y, rnd_mode); + if (mpfr_cmp (x,y) > 0) + return mpfr_sub (z, x, y, rnd_mode); else { MPFR_SET_ZERO(z); |