[BACK]Return to add.c CVS log [TXT][DIR] Up to [local] / OpenXM_contrib / gmp / mpf

Diff for /OpenXM_contrib/gmp/mpf/Attic/add.c between version 1.1.1.1 and 1.1.1.3

version 1.1.1.1, 2000/01/10 15:35:22 version 1.1.1.3, 2003/08/25 16:06:35
Line 1 
Line 1 
 /* mpf_add -- Add two floats.  /* mpf_add -- Add two floats.
   
 Copyright (C) 1993, 1994, 1996 Free Software Foundation, Inc.  Copyright 1993, 1994, 1996, 2000, 2001 Free Software Foundation, Inc.
   
 This file is part of the GNU MP Library.  This file is part of the GNU MP Library.
   
 The GNU MP Library is free software; you can redistribute it and/or modify  The GNU MP 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  it under the terms of the GNU Lesser General Public License as published by
 the Free Software Foundation; either version 2 of the License, or (at your  the Free Software Foundation; either version 2.1 of the License, or (at your
 option) any later version.  option) any later version.
   
 The GNU MP Library is distributed in the hope that it will be useful, but  The GNU MP Library is distributed in the hope that it will be useful, but
 WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY  WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
 or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Library General Public  or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Lesser General Public
 License for more details.  License for more details.
   
 You should have received a copy of the GNU Library General Public License  You should have received a copy of the GNU Lesser General Public License
 along with the GNU MP Library; see the file COPYING.LIB.  If not, write to  along with the GNU MP Library; see the file COPYING.LIB.  If not, write to
 the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,  the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
 MA 02111-1307, USA. */  MA 02111-1307, USA. */
Line 23  MA 02111-1307, USA. */
Line 23  MA 02111-1307, USA. */
 #include "gmp-impl.h"  #include "gmp-impl.h"
   
 void  void
 #if __STDC__  
 mpf_add (mpf_ptr r, mpf_srcptr u, mpf_srcptr v)  mpf_add (mpf_ptr r, mpf_srcptr u, mpf_srcptr v)
 #else  
 mpf_add (r, u, v)  
      mpf_ptr r;  
      mpf_srcptr u;  
      mpf_srcptr v;  
 #endif  
 {  {
   mp_srcptr up, vp;    mp_srcptr up, vp;
   mp_ptr rp, tp;    mp_ptr rp, tp;
Line 48  mpf_add (r, u, v)
Line 41  mpf_add (r, u, v)
   /* Handle special cases that don't work in generic code below.  */    /* Handle special cases that don't work in generic code below.  */
   if (usize == 0)    if (usize == 0)
     {      {
       mpf_set (r, v);      set_r_v_maybe:
         if (r != v)
           mpf_set (r, v);
       return;        return;
     }      }
   if (vsize == 0)    if (vsize == 0)
     {      {
       mpf_set (r, u);        v = u;
       return;        goto set_r_v_maybe;
     }      }
   
   /* If signs of U and V are different, perform subtraction.  */    /* If signs of U and V are different, perform subtraction.  */
Line 122  mpf_add (r, u, v)
Line 117  mpf_add (r, u, v)
   if (ediff >= prec)    if (ediff >= prec)
     {      {
       /* V completely cancelled.  */        /* V completely cancelled.  */
       if (tp != up)        if (rp != up)
         MPN_COPY (rp, up, usize);          MPN_COPY_INCR (rp, up, usize);
       rsize = usize;        rsize = usize;
     }      }
   else    else

Legend:
Removed from v.1.1.1.1  
changed lines
  Added in v.1.1.1.3

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>