diff options
author | Torbjorn Granlund <tege@gmplib.org> | 2010-11-22 22:26:05 +0100 |
---|---|---|
committer | Torbjorn Granlund <tege@gmplib.org> | 2010-11-22 22:26:05 +0100 |
commit | 198a1add0f2d556eb75bf2d85c7fceb9fafe9f51 (patch) | |
tree | c4fa3b97e983d3f057c0ba032faf39fe303d8f3b /mpq/get_str.c | |
parent | d7afa9ea9c7dae166cb6719c3b11db9c96cca519 (diff) | |
download | gmp-198a1add0f2d556eb75bf2d85c7fceb9fafe9f51.tar.gz |
Whitespace cleanup.
Diffstat (limited to 'mpq/get_str.c')
-rw-r--r-- | mpq/get_str.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/mpq/get_str.c b/mpq/get_str.c index be5dcc6c0..074c48c9f 100644 --- a/mpq/get_str.c +++ b/mpq/get_str.c @@ -34,12 +34,12 @@ mpq_get_str (char *str, int base, mpq_srcptr q) if (str == NULL) { /* This is an overestimate since we don't bother checking how much of - the high limbs of num and den are used. +2 for rounding up the - chars per bit of num and den. +3 for sign, slash and '\0'. */ + the high limbs of num and den are used. +2 for rounding up the + chars per bit of num and den. +3 for sign, slash and '\0'. */ str_alloc = ((size_t) ((ABS (q->_mp_num._mp_size) + q->_mp_den._mp_size) - * GMP_LIMB_BITS - * mp_bases[ABS(base)].chars_per_bit_exactly)) - + 5; + * GMP_LIMB_BITS + * mp_bases[ABS(base)].chars_per_bit_exactly)) + + 5; str = (char *) (*__gmp_allocate_func) (str_alloc); } @@ -55,8 +55,8 @@ mpq_get_str (char *str, int base, mpq_srcptr q) ASSERT (len == strlen(str)); ASSERT (str_alloc == 0 || len+1 <= str_alloc); ASSERT (len+1 <= /* size recommended to applications */ - mpz_sizeinbase (mpq_numref(q), ABS(base)) + - mpz_sizeinbase (mpq_denref(q), ABS(base)) + 3); + mpz_sizeinbase (mpq_numref(q), ABS(base)) + + mpz_sizeinbase (mpq_denref(q), ABS(base)) + 3); if (str_alloc != 0) __GMP_REALLOCATE_FUNC_MAYBE_TYPE (str, str_alloc, len+1, char); |