about precision and format
Décio Luiz Gazzoni Filho
decio at decpp.net
Thu Jul 13 19:57:19 CEST 2006
On Jul 13, 2006, at 8:18 AM, glassy wrote:
> two questions:
> in the GMP manual :
> mpf_set_default_prec (unsigned long int prec) : sets the default
> precision to be at least prec bits.
> okay if we want the precision 2048 bits, how may digits will be at
> the right of the mantissa if we want a decimal number ?
2048*log10(2) = 616.51 digits.
> second question: in the gmp_sprintf(s, "%77.72Fe" , @r) what is
> the meaning of the format string "%77.72Fe" how could we
> interpret it.
> and also gmp_sprintz(s, "%Zd" , @r) how could we intepret the
> string "%Zd"
This is described in the manual:
http://www.swox.com/gmp/manual/Formatted-Output-Strings.html
Décio
-------------- next part --------------
A non-text attachment was scrubbed...
Name: PGP.sig
Type: application/pgp-signature
Size: 186 bytes
Desc: This is a digitally signed message part
Url : http://gmplib.org/list-archives/gmp-discuss/attachments/20060713/3422df0e/PGP.bin
More information about the gmp-discuss
mailing list