diff options
author | zimmerma <zimmerma@280ebfd0-de03-0410-8827-d642c229c3f4> | 2004-02-03 10:06:53 +0000 |
---|---|---|
committer | zimmerma <zimmerma@280ebfd0-de03-0410-8827-d642c229c3f4> | 2004-02-03 10:06:53 +0000 |
commit | a3bad9513b29aed9518992a4488556788a4248a6 (patch) | |
tree | e7924f8fc42d75d781487fff204b885dea2387e7 /mpfr.texi | |
parent | eddbad0b931c43cfbca69f0e1b43396ddbc3ebbb (diff) | |
download | mpfr-a3bad9513b29aed9518992a4488556788a4248a6.tar.gz |
fixed bug in get_str (case pow2, rnd=up or down)
git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@2655 280ebfd0-de03-0410-8827-d642c229c3f4
Diffstat (limited to 'mpfr.texi')
-rw-r--r-- | mpfr.texi | 10 |
1 files changed, 6 insertions, 4 deletions
@@ -821,12 +821,14 @@ behavior is undefined. @deftypefun {char *} mpfr_get_str (char *@var{str}, mp_exp_t *@var{expptr}, int @var{base}, size_t @var{n}, mpfr_t @var{op}, mp_rnd_t @var{rnd}) Convert @var{op} to a string of digits in base @var{base}, with rounding in -direction @var{rnd}. The base may vary -from 2 to 36. +direction @var{rnd}. The base may vary from 2 to 36. The generated string is a fraction, with an implicit radix point immediately -to the left of the first digit. For example, the number 3.1416 would be -returned as "31416" in the string and 1 written at @var{expptr}. +to the left of the first digit. For example, the number -3.1416 would be +returned as "-31416" in the string and 1 written at @var{expptr}. +If @var{rnd} is to nearest, and @var{op} is exactly in the middle of two +possible outputs, the one with an even last digit is chosen +(for an odd base, this may not correspond to an even mantissa). If @var{n} is zero, the number of digits of the mantissa is determined automatically from the precision of @var{op} and the value of @var{base}. |