diff options
author | vlefevre <vlefevre@280ebfd0-de03-0410-8827-d642c229c3f4> | 2009-02-27 15:46:06 +0000 |
---|---|---|
committer | vlefevre <vlefevre@280ebfd0-de03-0410-8827-d642c229c3f4> | 2009-02-27 15:46:06 +0000 |
commit | df7fc35899973db44b5462170f3d533898589d36 (patch) | |
tree | 3ec96a320edcf8957b3327f21acf2e98f15c8516 /div_ui.c | |
parent | 206f7135b7061a5536e612846b29f5fefbcb716f (diff) | |
download | mpfr-df7fc35899973db44b5462170f3d533898589d36.tar.gz |
Untabified and deleted trailing spaces (for patches).
git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@6043 280ebfd0-de03-0410-8827-d642c229c3f4
Diffstat (limited to 'div_ui.c')
-rw-r--r-- | div_ui.c | 90 |
1 files changed, 45 insertions, 45 deletions
@@ -194,51 +194,51 @@ mpfr_div_ui (mpfr_ptr y, mpfr_srcptr x, unsigned long int u, mp_rnd_t rnd_mode) { MPFR_UPDATE2_RND_MODE(rnd_mode, MPFR_SIGN (y)); switch (rnd_mode) - { - case GMP_RNDZ: - inexact = - MPFR_INT_SIGN (y); /* result is inexact */ - nexttoinf = 0; - break; - - case GMP_RNDA: - inexact = MPFR_INT_SIGN (y); - nexttoinf = 1; - break; - - default: /* should be GMP_RNDN */ - MPFR_ASSERTD (rnd_mode == GMP_RNDN); - /* We have one more significant bit in yn. */ - if (sh && d < (MPFR_LIMB_ONE << (sh - 1))) - { - inexact = - MPFR_INT_SIGN (y); - nexttoinf = 0; - } - else if (sh && d > (MPFR_LIMB_ONE << (sh - 1))) - { - inexact = MPFR_INT_SIGN (y); - nexttoinf = 1; - } - else /* sh = 0 or d = 1 << (sh-1) */ - { - /* The first case is "false" even rounding (significant bits - indicate even rounding, but the result is inexact, so up) ; - The second case is the case where middle should be used to - decide the direction of rounding (no further bit computed) ; - The third is the true even rounding. - */ - if ((sh && inexact) || (!sh && middle > 0) || - (!inexact && *yp & (MPFR_LIMB_ONE << sh))) - { - inexact = MPFR_INT_SIGN (y); - nexttoinf = 1; - } - else - { - inexact = - MPFR_INT_SIGN (y); - nexttoinf = 0; - } - } - } + { + case GMP_RNDZ: + inexact = - MPFR_INT_SIGN (y); /* result is inexact */ + nexttoinf = 0; + break; + + case GMP_RNDA: + inexact = MPFR_INT_SIGN (y); + nexttoinf = 1; + break; + + default: /* should be GMP_RNDN */ + MPFR_ASSERTD (rnd_mode == GMP_RNDN); + /* We have one more significant bit in yn. */ + if (sh && d < (MPFR_LIMB_ONE << (sh - 1))) + { + inexact = - MPFR_INT_SIGN (y); + nexttoinf = 0; + } + else if (sh && d > (MPFR_LIMB_ONE << (sh - 1))) + { + inexact = MPFR_INT_SIGN (y); + nexttoinf = 1; + } + else /* sh = 0 or d = 1 << (sh-1) */ + { + /* The first case is "false" even rounding (significant bits + indicate even rounding, but the result is inexact, so up) ; + The second case is the case where middle should be used to + decide the direction of rounding (no further bit computed) ; + The third is the true even rounding. + */ + if ((sh && inexact) || (!sh && middle > 0) || + (!inexact && *yp & (MPFR_LIMB_ONE << sh))) + { + inexact = MPFR_INT_SIGN (y); + nexttoinf = 1; + } + else + { + inexact = - MPFR_INT_SIGN (y); + nexttoinf = 0; + } + } + } } if (nexttoinf && |