Re: Reg: gcc option for printing large number (large double)

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

 



On Thu, 2013-09-12 at 21:36 -0700, emailstorbala wrote:
> Hi,

> I know that in gcc, there is an option for getting this done. Can any body
> help me with that option?
> 
> Thanks and Regards,
> Balamurugan R
> 
> 

I would suggest you have a look at the Gnu MP library, which deals with
big integers, floats and gives you lots of things that you can normally
find in languages like Python, Go or Java.

An example would be:
    mpz_t a;
    mpz_init(a);
    mpz_set_str(a, "10000000000000000000000000000", 10);
    gmp_printf("%Zd", a);
    mpz_clear(a);
which will print this number back to you, and %Zx will print the Hex
version of it.

-- 
Xinyun Zhou





[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux