bug-gmp
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Precision of mpf_class


From: Kevin Ryde
Subject: Re: Precision of mpf_class
Date: Wed, 05 Jun 2002 08:33:11 +1000
User-agent: Gnus/5.090007 (Oort Gnus v0.07) Emacs/21.1 (i386-debian-linux-gnu)

"Edward Marti" <address@hidden> writes:
>
> When I use the setprecision and function in iostream (cout <<
> setprecision(100) << my_mpf;), the precision only prints 20 digits after the
> decimal. Adjusting the width didn't help either. Is there a way to print
> many more digits of mpf_class directly through iostream? Or do I have to
> save the digits to a string, and print the string?

The mpf output functions don't produce more digits than the precision
of the mpf implies.  If you're using the default 64 bits, that's about
20 decimal digits.

This is noted in the manual under "Formatted Output Strings", a cross
reference in the C++ section might make it easier to find.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]