From 13d6ac68914adace11ba9adf81f91051ee0e9114 Mon Sep 17 00:00:00 2001 From: Kevin Ryde Date: Tue, 15 Jan 2002 01:21:21 +0100 Subject: * mpf/out_str.c: Use MPF_SIGNIFICANT_DIGITS, so mpf_out_str and mpf_get_str give the same for ndigits==0. --- mpf/out_str.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'mpf/out_str.c') diff --git a/mpf/out_str.c b/mpf/out_str.c index 156399fbe..e49982913 100644 --- a/mpf/out_str.c +++ b/mpf/out_str.c @@ -2,7 +2,7 @@ the float OP to STREAM in base BASE. Return the number of characters written, or 0 if an error occurred. -Copyright 1996, 1997, 2001 Free Software Foundation, Inc. +Copyright 1996, 1997, 2001, 2002 Free Software Foundation, Inc. This file is part of the GNU MP Library. @@ -46,8 +46,7 @@ mpf_out_str (FILE *stream, int base, size_t n_digits, mpf_srcptr op) if (base == 0) base = 10; if (n_digits == 0) - n_digits = (((op->_mp_prec - 1) * BITS_PER_MP_LIMB) - * __mp_bases[base].chars_per_bit_exactly); + MPF_SIGNIFICANT_DIGITS (n_digits, base, op->_mp_prec); if (stream == 0) stream = stdout; -- cgit v1.2.1