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

Diff for /OpenXM_contrib/gmp/mpf/Attic/div_ui.c between version 1.1.1.2 and 1.1.1.3

version 1.1.1.2, 2000/09/09 14:13:12 version 1.1.1.3, 2003/08/25 16:06:35
Line 1 
Line 1 
 /* mpf_div_ui -- Divide a float with an unsigned integer.  /* mpf_div_ui -- Divide a float with an unsigned integer.
   
 Copyright (C) 1993, 1994, 1996, 2000 Free Software Foundation, Inc.  Copyright 1993, 1994, 1996, 2000, 2001, 2002 Free Software Foundation, Inc.
   
 This file is part of the GNU MP Library.  This file is part of the GNU MP Library.
   
Line 24  MA 02111-1307, USA. */
Line 24  MA 02111-1307, USA. */
 #include "longlong.h"  #include "longlong.h"
   
 void  void
 #if __STDC__  
 mpf_div_ui (mpf_ptr r, mpf_srcptr u, unsigned long int v)  mpf_div_ui (mpf_ptr r, mpf_srcptr u, unsigned long int v)
 #else  
 mpf_div_ui (r, u, v)  
      mpf_ptr r;  
      mpf_srcptr u;  
      unsigned long int v;  
 #endif  
 {  {
   mp_srcptr up;    mp_srcptr up;
   mp_ptr rp, tp, rtp;    mp_ptr rp, tp, rtp;
Line 42  mpf_div_ui (r, u, v)
Line 35  mpf_div_ui (r, u, v)
   mp_limb_t q_limb;    mp_limb_t q_limb;
   mp_exp_t rexp;    mp_exp_t rexp;
   TMP_DECL (marker);    TMP_DECL (marker);
   
   #if GMP_NAIL_BITS != 0
     if (v > GMP_NUMB_MAX)
       {
         mpf_t vf;
         mp_limb_t vl[2];
         SIZ(vf) = 2;
         EXP(vf) = 2;
         PTR(vf) = vl;
         vl[0] = v & GMP_NUMB_MASK;
         vl[1] = v >> GMP_NUMB_BITS;
         mpf_div (r, u, vf);
         return;
       }
   #endif
   
   usize = u->_mp_size;    usize = u->_mp_size;
   sign_quotient = usize;    sign_quotient = usize;

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

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