formatting output with gmp_printf
Info Account
info at PerryResearch.com
Thu Sep 18 01:28:30 CEST 2003
I am having some problems with formatted output, maybe someone here can show me
how to do this.
mpz_t target, base;
mpz_init(target);
mpz_init(base);
I've got a large number stuffed into target, say 123654789
I want to be able to output one digit at a time, with single digit precision.
For example
9
8
7
4
5
6
3
2
1
Is there a way with gmp_printf to specify specific portions of target, and only
output them with whatever precision specified? Are there any other string
handling functions other than gmp_printf?
Also, what would be the easiest way to take target, and convert it to an
arbitrary base (larger than 256)?
Thanks in advance, just starting out with gmp.
Greg
---------------------------------
Perry Research, Inc.
5450 Bruce B. Downs Blvd #313
Wesley Chapel, FL 33543
p: 813-864-7659 f: 813-862-2015
http://www.PerryResearch.com
More information about the gmp-discuss
mailing list