limit on number of digits when printing?

ami ... amidamaru_swe at
Fri Sep 3 17:56:23 CEST 2004


There seems to be an upper limit on the possible
number of digits during output.

Consider this program:
#include <stdio.h> 
#include <gmp.h> 

int main() { 
  mpz_t m; 
  mpz_setbit(m, 1000000);
  mpz_out_str (stdout, 10, m) ; 
  //no problem printing this one...

  //works fine up to here

  mpz_out_str(stdout, 10, m);
  //this is where the program ends with a stack
overflow or something.

return 0; 

The same thing happens when I try to write to a file.
Is there some way to get around this?

I've compiled gmp in mingw with the following

./configure --disable-shared --enable-static

as well as: 

./configure --disable-shared --enable-static

and finally 

./configure --disable-shared --enable-static


Höstrusk och grå moln - köp en resa till solen på Yahoo! Resor på adressen

More information about the gmp-discuss mailing list